-
Notifications
You must be signed in to change notification settings - Fork 4.6k
chore: CE split for git constants and AGF #38464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,5 @@ | ||
| package com.appsmith.git.constants; | ||
|
|
||
| public class CommonConstants { | ||
| // This field will be useful when we migrate fields within JSON files (currently this will be useful for Git | ||
| // feature) | ||
| public static Integer fileFormatVersion = 5; | ||
| public static String FILE_FORMAT_VERSION = "fileFormatVersion"; | ||
| public static final String SERVER_SCHEMA_VERSION = "serverSchemaVersion"; | ||
| public static final String CLIENT_SCHEMA_VERSION = "clientSchemaVersion"; | ||
| import com.appsmith.git.constants.ce.CommonConstantsCE; | ||
|
|
||
| public static final String CANVAS = "canvas"; | ||
|
|
||
| public static final String APPLICATION = "application"; | ||
| public static final String THEME = "theme"; | ||
| public static final String METADATA = "metadata"; | ||
| public static final String JSON_EXTENSION = ".json"; | ||
| public static final String JS_EXTENSION = ".js"; | ||
| public static final String TEXT_FILE_EXTENSION = ".txt"; | ||
| public static final String WIDGETS = "widgets"; | ||
| public static final String WIDGET_NAME = "widgetName"; | ||
| public static final String WIDGET_TYPE = "type"; | ||
| public static final String CHILDREN = "children"; | ||
|
|
||
| public static final String CANVAS_WIDGET = "CANVAS_WIDGET"; | ||
| public static final String MAIN_CONTAINER = "MainContainer"; | ||
| public static final String DELIMITER_POINT = "."; | ||
| public static final String DELIMITER_PATH = "/"; | ||
| public static final String DELIMITER_HYPHEN = "-"; | ||
| public static final String EMPTY_STRING = ""; | ||
| public static final String SEPARATOR_UNDERSCORE = "_"; | ||
| public static final String FILE_MIGRATION_MESSAGE = | ||
| "Some of the changes above are due to an improved file structure. You can safely commit them to your repository."; | ||
|
|
||
| public static final String TABS_WIDGET = "TABS_WIDGET"; | ||
|
|
||
| public static final String WIDGET_ID = "widgetId"; | ||
| public static final String PARENT_ID = "parentId"; | ||
| } | ||
| public class CommonConstants extends CommonConstantsCE {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| package com.appsmith.git.constants.ce; | ||
|
|
||
| public class CommonConstantsCE { | ||
| // This field will be useful when we migrate fields within JSON files (currently this will be useful for Git | ||
| // feature) | ||
| public static Integer fileFormatVersion = 5; | ||
| public static String FILE_FORMAT_VERSION = "fileFormatVersion"; | ||
| public static final String SERVER_SCHEMA_VERSION = "serverSchemaVersion"; | ||
| public static final String CLIENT_SCHEMA_VERSION = "clientSchemaVersion"; | ||
|
|
||
| public static final String CANVAS = "canvas"; | ||
|
|
||
| public static final String APPLICATION = "application"; | ||
| public static final String THEME = "theme"; | ||
| public static final String METADATA = "metadata"; | ||
| public static final String JSON_EXTENSION = ".json"; | ||
| public static final String JS_EXTENSION = ".js"; | ||
| public static final String TEXT_FILE_EXTENSION = ".txt"; | ||
| public static final String WIDGETS = "widgets"; | ||
| public static final String WIDGET_NAME = "widgetName"; | ||
| public static final String WIDGET_TYPE = "type"; | ||
| public static final String CHILDREN = "children"; | ||
|
|
||
| public static final String CANVAS_WIDGET = "CANVAS_WIDGET"; | ||
| public static final String MAIN_CONTAINER = "MainContainer"; | ||
| public static final String DELIMITER_POINT = "."; | ||
| public static final String DELIMITER_PATH = "/"; | ||
| public static final String DELIMITER_HYPHEN = "-"; | ||
| public static final String EMPTY_STRING = ""; | ||
| public static final String SEPARATOR_UNDERSCORE = "_"; | ||
| public static final String FILE_MIGRATION_MESSAGE = | ||
| "Some of the changes above are due to an improved file structure. You can safely commit them to your repository."; | ||
|
|
||
| public static final String TABS_WIDGET = "TABS_WIDGET"; | ||
|
|
||
| public static final String WIDGET_ID = "widgetId"; | ||
| public static final String PARENT_ID = "parentId"; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| package com.appsmith.server.applications.git; | ||
|
|
||
| import com.appsmith.external.git.FileInterface; | ||
| import com.appsmith.external.models.ApplicationGitReference; | ||
| import com.appsmith.server.actioncollections.base.ActionCollectionService; | ||
| import com.appsmith.server.dtos.ArtifactExchangeJson; | ||
| import com.appsmith.server.helpers.ArtifactGitFileUtils; | ||
| import com.appsmith.server.migrations.JsonSchemaMigration; | ||
| import com.appsmith.server.newactions.base.NewActionService; | ||
|
|
@@ -12,7 +12,7 @@ | |
|
|
||
| @Component | ||
| public class ApplicationGitFileUtilsImpl extends ApplicationGitFileUtilsCEImpl | ||
| implements ArtifactGitFileUtils<ApplicationGitReference> { | ||
| implements ArtifactGitFileUtils<ArtifactExchangeJson> { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will have EE implications probably
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be ApplicationJson?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops, yes |
||
|
|
||
| public ApplicationGitFileUtilsImpl( | ||
| Gson gson, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| package com.appsmith.server.helpers; | ||
|
|
||
| import com.appsmith.external.models.ArtifactGitReference; | ||
| import com.appsmith.server.dtos.ArtifactExchangeJson; | ||
| import com.appsmith.server.helpers.ce.ArtifactGitFileUtilsCE; | ||
|
|
||
| public interface ArtifactGitFileUtils<T extends ArtifactGitReference> extends ArtifactGitFileUtilsCE<T> {} | ||
| public interface ArtifactGitFileUtils<T extends ArtifactExchangeJson> extends ArtifactGitFileUtilsCE<T> {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,6 @@ | |
| import com.appsmith.external.helpers.Stopwatch; | ||
| import com.appsmith.external.models.ActionConfiguration; | ||
| import com.appsmith.external.models.ActionDTO; | ||
| import com.appsmith.external.models.ApplicationGitReference; | ||
| import com.appsmith.external.models.ArtifactGitReference; | ||
| import com.appsmith.external.models.BaseDomain; | ||
| import com.appsmith.external.models.DatasourceStorage; | ||
|
|
@@ -85,7 +84,7 @@ | |
| @Import({FileUtilsImpl.class}) | ||
| public class CommonGitFileUtilsCE { | ||
|
|
||
| protected final ArtifactGitFileUtils<ApplicationGitReference> applicationGitFileUtils; | ||
| protected final ArtifactGitFileUtils<ArtifactExchangeJson> applicationGitFileUtils; | ||
| private final FileInterface fileUtils; | ||
| private final FileOperations fileOperations; | ||
| private final AnalyticsService analyticsService; | ||
|
|
@@ -102,7 +101,7 @@ public class CommonGitFileUtilsCE { | |
| protected final ObjectMapper objectMapper; | ||
|
|
||
| public CommonGitFileUtilsCE( | ||
| ArtifactGitFileUtils<ApplicationGitReference> applicationGitFileUtils, | ||
| ArtifactGitFileUtils<ArtifactExchangeJson> applicationGitFileUtils, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be applicationJson? |
||
| FileInterface fileUtils, | ||
| FileOperations fileOperations, | ||
| AnalyticsService analyticsService, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Ensure method return types match the new generic parameter.
This class now implements
ArtifactGitFileUtilsCE<ArtifactExchangeJson>, yet it still declarescreateArtifactReferenceObject()returningApplicationGitReference. Revisit and align the return types/methods to prevent confusion or type mismatches.