Skip to content

Commit ff0282f

Browse files
authored
Merge pull request #2272 from contentstack/fix/composable-studio
updated UI text composable studio to studio
2 parents 619b507 + 75e0992 commit ff0282f

File tree

7 files changed

+96
-103
lines changed

7 files changed

+96
-103
lines changed

packages/contentstack-config/src/commands/config/set/region.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ export default class RegionSetCommand extends BaseCommand<typeof RegionSetComman
4848
launch: _flags.string({
4949
description: 'Custom host to set for Launch API',
5050
}),
51-
'composable-studio': _flags.string({
52-
description: 'Custom host to set for Composable Studio API',
51+
studio: _flags.string({
52+
description: 'Custom host to set for Studio API',
5353
}),
5454
};
5555
static examples = [
@@ -65,8 +65,8 @@ export default class RegionSetCommand extends BaseCommand<typeof RegionSetComman
6565
'$ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name "India" --developer-hub <custom_developer_hub_url>',
6666
'$ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name "India" --personalize <custom_personalize_url>',
6767
'$ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name "India" --launch <custom_launch_url>',
68-
'$ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name "India" --composable-studio <custom_composable_studio_url>',
69-
'$ csdx config:set:region --cda <custom_cda_host_url> --cma <custom_cma_host_url> --ui-host <custom_ui_host_url> --name "India" --developer-hub <custom_developer_hub_url> --launch <custom_launch_url> --personalize <custom_personalize_url> --composable-studio <custom_composable_studio_url>',
68+
'$ csdx config:set:region --cma <custom_cma_host_url> --cda <custom_cda_host_url> --ui-host <custom_ui_host_url> --name "India" --studio <custom_studio_url>',
69+
'$ csdx config:set:region --cda <custom_cda_host_url> --cma <custom_cma_host_url> --ui-host <custom_ui_host_url> --name "India" --developer-hub <custom_developer_hub_url> --launch <custom_launch_url> --personalize <custom_personalize_url> --studio <custom_studio_url>',
7070
];
7171

7272
static args: ArgInput = {
@@ -82,7 +82,7 @@ export default class RegionSetCommand extends BaseCommand<typeof RegionSetComman
8282
let developerHubUrl = regionSetFlags['developer-hub'];
8383
let personalizeUrl = regionSetFlags['personalize'];
8484
let launchHubUrl = regionSetFlags['launch'];
85-
let composableStudioUrl = regionSetFlags['composable-studio'];
85+
let composableStudioUrl = regionSetFlags['studio'];
8686
let selectedRegion = args.region;
8787
if (!(cda && cma && uiHost && name) && !selectedRegion) {
8888
selectedRegion = await interactive.askRegions();
@@ -132,7 +132,7 @@ export default class RegionSetCommand extends BaseCommand<typeof RegionSetComman
132132
cliux.success(`Developer Hub URL: ${customRegion.developerHubUrl}`);
133133
cliux.success(`Personalize URL: ${customRegion.personalizeUrl}`);
134134
cliux.success(`Launch URL: ${customRegion.launchHubUrl}`);
135-
cliux.success(`Composable Studio URL: ${customRegion.composableStudioUrl}`);
135+
cliux.success(`Studio URL: ${customRegion.composableStudioUrl}`);
136136
} catch (error) {
137137
this.logger.error('failed to set the region', error);
138138
cliux.error(`Failed to set region due to: ${error.message}`);
@@ -151,7 +151,7 @@ export default class RegionSetCommand extends BaseCommand<typeof RegionSetComman
151151
cliux.success(`Developer Hub URL: ${regionDetails.developerHubUrl}`);
152152
cliux.success(`Personalize URL: ${regionDetails.personalizeUrl}`);
153153
cliux.success(`Launch URL: ${regionDetails.launchHubUrl}`);
154-
cliux.success(`Composable Studio URL: ${regionDetails.composableStudioUrl}`);
154+
cliux.success(`Studio URL: ${regionDetails.composableStudioUrl}`);
155155
} else {
156156
cliux.error(`Invalid region specified.`);
157157
}

packages/contentstack-config/test/unit/commands/region.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ describe('Region command', function () {
274274
expect(result.launchHubUrl).to.equal(customRegion.launchHubUrl);
275275
});
276276

277-
it('should set a custom region with composable studio URL', function () {
277+
it('should set a custom region with studio URL', function () {
278278
const customRegion = {
279279
cma: 'https://custom-cma.com',
280280
cda: 'https://custom-cda.com',
Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,75 @@
11
{
2-
"ASSET_EXPORT_COMPLETE": "Asset export process completed successfully",
3-
"ASSET_FOLDERS_EXPORT_COMPLETE": "Asset folder structure exported successfully",
4-
"ASSET_METADATA_EXPORT_COMPLETE": "Asset metadata exported successfully",
5-
"ASSET_VERSIONED_METADATA_EXPORT_COMPLETE": "Versioned asset metadata exported successfully",
6-
"ASSET_DOWNLOAD_COMPLETE": "Asset download completed successfully",
7-
"ASSET_DOWNLOAD_SUCCESS": "Asset '%s' (UID: %s) downloaded successfully",
8-
"ASSET_DOWNLOAD_FAILED": "Failed to download asset '%s' (UID: %s)",
9-
"ASSET_WRITE_FAILED": "Failed to write asset file '%s' (UID: %s)",
10-
"ASSET_QUERY_FAILED": "Failed to query asset data from the API",
11-
"ASSET_VERSIONED_QUERY_FAILED": "Failed to query versioned asset data from the API",
12-
"ASSET_COUNT_QUERY_FAILED": "Failed to retrieve total asset count",
2+
"ASSET_EXPORT_COMPLETE": "Asset export process completed successfully",
3+
"ASSET_FOLDERS_EXPORT_COMPLETE": "Asset folder structure exported successfully",
4+
"ASSET_METADATA_EXPORT_COMPLETE": "Asset metadata exported successfully",
5+
"ASSET_VERSIONED_METADATA_EXPORT_COMPLETE": "Versioned asset metadata exported successfully",
6+
"ASSET_DOWNLOAD_COMPLETE": "Asset download completed successfully",
7+
"ASSET_DOWNLOAD_SUCCESS": "Asset '%s' (UID: %s) downloaded successfully",
8+
"ASSET_DOWNLOAD_FAILED": "Failed to download asset '%s' (UID: %s)",
9+
"ASSET_WRITE_FAILED": "Failed to write asset file '%s' (UID: %s)",
10+
"ASSET_QUERY_FAILED": "Failed to query asset data from the API",
11+
"ASSET_VERSIONED_QUERY_FAILED": "Failed to query versioned asset data from the API",
12+
"ASSET_COUNT_QUERY_FAILED": "Failed to retrieve total asset count",
1313

14-
"CONTENT_TYPE_EXPORT_COMPLETE": "Content types exported successfully",
15-
"CONTENT_TYPE_NO_TYPES": "No content types found",
16-
"CONTENT_TYPE_EXPORT_FAILED": "Failed to export content types",
17-
"CONTENT_TYPE_NO_TYPES_RETURNED": "API returned no content types for the given query",
14+
"CONTENT_TYPE_EXPORT_COMPLETE": "Content types exported successfully",
15+
"CONTENT_TYPE_NO_TYPES": "No content types found",
16+
"CONTENT_TYPE_EXPORT_FAILED": "Failed to export content types",
17+
"CONTENT_TYPE_NO_TYPES_RETURNED": "API returned no content types for the given query",
1818

19-
"ENVIRONMENT_EXPORT_COMPLETE": "Successfully exported %s environment(s)",
20-
"ENVIRONMENT_EXPORT_SUCCESS": "Environment '%s' exported successfully",
21-
"ENVIRONMENT_NOT_FOUND": "No environments found in the current stack",
19+
"ENVIRONMENT_EXPORT_COMPLETE": "Successfully exported %s environment(s)",
20+
"ENVIRONMENT_EXPORT_SUCCESS": "Environment '%s' exported successfully",
21+
"ENVIRONMENT_NOT_FOUND": "No environments found in the current stack",
2222

23-
"EXTENSION_EXPORT_COMPLETE": "Successfully exported %s extension(s)",
24-
"EXTENSION_EXPORT_SUCCESS": "Extension '%s' exported successfully",
25-
"EXTENSION_NOT_FOUND": "No extensions found in the current stack",
23+
"EXTENSION_EXPORT_COMPLETE": "Successfully exported %s extension(s)",
24+
"EXTENSION_EXPORT_SUCCESS": "Extension '%s' exported successfully",
25+
"EXTENSION_NOT_FOUND": "No extensions found in the current stack",
2626

27-
"GLOBAL_FIELDS_EXPORT_COMPLETE": "Successfully exported %s global field(s)",
27+
"GLOBAL_FIELDS_EXPORT_COMPLETE": "Successfully exported %s global field(s)",
2828

29-
"LABELS_EXPORT_COMPLETE": "Successfully exported %s label(s)",
30-
"LABEL_EXPORT_SUCCESS": "Label '%s' exported successfully",
31-
"LABELS_NOT_FOUND": "No labels found in the current stack",
29+
"LABELS_EXPORT_COMPLETE": "Successfully exported %s label(s)",
30+
"LABEL_EXPORT_SUCCESS": "Label '%s' exported successfully",
31+
"LABELS_NOT_FOUND": "No labels found in the current stack",
3232

33-
"LOCALES_EXPORT_COMPLETE": "Successfully exported %s locale(s) including %s master locale(s)",
33+
"LOCALES_EXPORT_COMPLETE": "Successfully exported %s locale(s) including %s master locale(s)",
3434

35-
"TAXONOMY_EXPORT_COMPLETE": "Successfully exported %s taxonomy entries",
36-
"TAXONOMY_EXPORT_SUCCESS": "Taxonomy '%s' exported successfully",
37-
"TAXONOMY_NOT_FOUND": "No taxonomies found in the current stack",
35+
"TAXONOMY_EXPORT_COMPLETE": "Successfully exported %s taxonomy entries",
36+
"TAXONOMY_EXPORT_SUCCESS": "Taxonomy '%s' exported successfully",
37+
"TAXONOMY_NOT_FOUND": "No taxonomies found in the current stack",
3838

39-
"WEBHOOK_EXPORT_COMPLETE": "Successfully exported %s webhook(s)",
40-
"WEBHOOK_EXPORT_SUCCESS": "Webhook '%s' exported successfully",
41-
"WEBHOOK_NOT_FOUND": "No webhooks found in the current stack",
39+
"WEBHOOK_EXPORT_COMPLETE": "Successfully exported %s webhook(s)",
40+
"WEBHOOK_EXPORT_SUCCESS": "Webhook '%s' exported successfully",
41+
"WEBHOOK_NOT_FOUND": "No webhooks found in the current stack",
4242

43-
"WORKFLOW_EXPORT_COMPLETE": "Successfully exported %s workflow(s)",
44-
"WORKFLOW_EXPORT_SUCCESS": "Workflow '%s' exported successfully",
45-
"WORKFLOW_NOT_FOUND": "No workflows found in the current stack",
43+
"WORKFLOW_EXPORT_COMPLETE": "Successfully exported %s workflow(s)",
44+
"WORKFLOW_EXPORT_SUCCESS": "Workflow '%s' exported successfully",
45+
"WORKFLOW_NOT_FOUND": "No workflows found in the current stack",
4646

47-
"PERSONALIZE_URL_NOT_SET": "Cannot export Personalize project: URL not configured",
48-
"PERSONALIZE_SKIPPING_WITH_MANAGEMENT_TOKEN": "Skipping Personalize project export: Management token not supported",
49-
"PERSONALIZE_MODULE_NOT_IMPLEMENTED": "Module '%s' implementation not found",
50-
"PERSONALIZE_NOT_ENABLED": "Personalize feature is not enabled for this organization",
47+
"PERSONALIZE_URL_NOT_SET": "Cannot export Personalize project: URL not configured",
48+
"PERSONALIZE_SKIPPING_WITH_MANAGEMENT_TOKEN": "Skipping Personalize project export: Management token not supported",
49+
"PERSONALIZE_MODULE_NOT_IMPLEMENTED": "Module '%s' implementation not found",
50+
"PERSONALIZE_NOT_ENABLED": "Personalize feature is not enabled for this organization",
5151

52-
"MARKETPLACE_APPS_EXPORT_COMPLETE": "Successfully exported %s marketplace app(s)",
53-
"MARKETPLACE_APP_CONFIG_EXPORT": "Exporting configuration for app '%s'",
54-
"MARKETPLACE_APP_CONFIG_SUCCESS": "Successfully exported configuration for app '%s'",
55-
"MARKETPLACE_APP_EXPORT_SUCCESS": "Successfully exported app '%s'",
56-
"MARKETPLACE_APPS_NOT_FOUND": "No marketplace apps found in the current stack",
57-
"MARKETPLACE_APP_CONFIG_EXPORT_FAILED": "Failed to export configuration for app '%s'",
58-
"MARKETPLACE_APP_MANIFEST_EXPORT_FAILED": "Failed to export manifest for app '%s'",
52+
"MARKETPLACE_APPS_EXPORT_COMPLETE": "Successfully exported %s marketplace app(s)",
53+
"MARKETPLACE_APP_CONFIG_EXPORT": "Exporting configuration for app '%s'",
54+
"MARKETPLACE_APP_CONFIG_SUCCESS": "Successfully exported configuration for app '%s'",
55+
"MARKETPLACE_APP_EXPORT_SUCCESS": "Successfully exported app '%s'",
56+
"MARKETPLACE_APPS_NOT_FOUND": "No marketplace apps found in the current stack",
57+
"MARKETPLACE_APP_CONFIG_EXPORT_FAILED": "Failed to export configuration for app '%s'",
58+
"MARKETPLACE_APP_MANIFEST_EXPORT_FAILED": "Failed to export manifest for app '%s'",
5959

60-
"COMPOSABLE_STUDIO_EXPORT_START": "Starting Composable Studio project export...",
61-
"COMPOSABLE_STUDIO_NOT_FOUND": "No Composable Studio project found for this stack",
62-
"COMPOSABLE_STUDIO_EXPORT_COMPLETE": "Successfully exported Composable Studio project '%s'",
63-
"COMPOSABLE_STUDIO_EXPORT_FAILED": "Failed to export Composable Studio project: %s",
64-
"COMPOSABLE_STUDIO_AUTH_REQUIRED": "To export Composable Studio projects, you must be logged in",
60+
"COMPOSABLE_STUDIO_EXPORT_START": "Starting Studio project export...",
61+
"COMPOSABLE_STUDIO_NOT_FOUND": "No Studio project found for this stack",
62+
"COMPOSABLE_STUDIO_EXPORT_COMPLETE": "Successfully exported Studio project '%s'",
63+
"COMPOSABLE_STUDIO_EXPORT_FAILED": "Failed to export Studio project: %s",
64+
"COMPOSABLE_STUDIO_AUTH_REQUIRED": "To export Studio projects, you must be logged in",
6565

66-
"ENTRIES_EXPORT_COMPLETE": "Successfully exported entries (Content Type: %s, Locale: %s)",
67-
"ENTRIES_EXPORT_SUCCESS": "All entries exported successfully",
68-
"ENTRIES_VERSIONED_EXPORT_SUCCESS": "Successfully exported versioned entry (Content Type: %s, UID: %s, Locale: %s)",
69-
"ENTRIES_EXPORT_VERSIONS_FAILED": "Failed to export versions for content type '%s' (UID: %s)",
66+
"ENTRIES_EXPORT_COMPLETE": "Successfully exported entries (Content Type: %s, Locale: %s)",
67+
"ENTRIES_EXPORT_SUCCESS": "All entries exported successfully",
68+
"ENTRIES_VERSIONED_EXPORT_SUCCESS": "Successfully exported versioned entry (Content Type: %s, UID: %s, Locale: %s)",
69+
"ENTRIES_EXPORT_VERSIONS_FAILED": "Failed to export versions for content type '%s' (UID: %s)",
7070

71-
"BRANCH_EXPORT_FAILED": "Failed to export contents from branch (UID: %s)",
71+
"BRANCH_EXPORT_FAILED": "Failed to export contents from branch (UID: %s)",
7272

73-
"ROLES_NO_CUSTOM_ROLES": "No custom roles found in the current stack",
74-
"ROLES_EXPORTING_ROLE": "Exporting role '%s'"
73+
"ROLES_NO_CUSTOM_ROLES": "No custom roles found in the current stack",
74+
"ROLES_EXPORTING_ROLE": "Exporting role '%s'"
7575
}

packages/contentstack-export/src/commands/cm/stacks/export.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default class ExportCommand extends Command {
7777
module: flags.string({
7878
char: 'm',
7979
description:
80-
'[optional] Specific module name. If not specified, the export command will export all the modules to the stack. The available modules are assets, content-types, entries, environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks, workflows, custom-roles, taxonomies, and composable-studio.',
80+
'[optional] Specific module name. If not specified, the export command will export all the modules to the stack. The available modules are assets, content-types, entries, environments, extensions, marketplace-apps, global-fields, labels, locales, webhooks, workflows, custom-roles, taxonomies, and studio.',
8181
parse: printFlagDeprecation(['-m'], ['--module']),
8282
}),
8383
'content-types': flags.string({

packages/contentstack-export/src/export/modules/composable-studio.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ export default class ExportComposableStudio {
2424
this.composableStudioConfig = exportConfig.modules['composable-studio'];
2525
this.exportConfig.context.module = 'composable-studio';
2626

27-
// Initialize HttpClient with Composable Studio API base URL
27+
// Initialize HttpClient with Studio API base URL
2828
this.apiClient = new HttpClient();
2929
this.apiClient.baseUrl(`${this.composableStudioConfig.apiBaseUrl}/${this.composableStudioConfig.apiVersion}`);
3030
}
3131

3232
async start(): Promise<void> {
33-
log.debug('Starting Composable Studio project export process...', this.exportConfig.context);
33+
log.debug('Starting Studio project export process...', this.exportConfig.context);
3434

3535
if (!isAuthenticated()) {
3636
cliux.print(
37-
'WARNING!!! To export Composable Studio projects, you must be logged in. Please check csdx auth:login --help to log in',
37+
'WARNING!!! To export Studio projects, you must be logged in. Please check csdx auth:login --help to log in',
3838
{ color: 'yellow' },
3939
);
4040
return Promise.resolve();
@@ -45,27 +45,27 @@ export default class ExportComposableStudio {
4545
this.exportConfig.branchName || '',
4646
this.composableStudioConfig.dirName,
4747
);
48-
log.debug(`Composable Studio folder path: ${this.composableStudioPath}`, this.exportConfig.context);
48+
log.debug(`Studio folder path: ${this.composableStudioPath}`, this.exportConfig.context);
4949

5050
await fsUtil.makeDirectory(this.composableStudioPath);
51-
log.debug('Created Composable Studio directory', this.exportConfig.context);
51+
log.debug('Created Studio directory', this.exportConfig.context);
5252

5353
this.exportConfig.org_uid = this.exportConfig.org_uid || (await getOrgUid(this.exportConfig));
5454
log.debug(`Organization UID: ${this.exportConfig.org_uid}`, this.exportConfig.context);
5555

5656
await this.exportProjects();
57-
log.debug('Composable Studio project export process completed', this.exportConfig.context);
57+
log.debug('Studio project export process completed', this.exportConfig.context);
5858
}
5959

6060
/**
61-
* Export Composable Studio projects connected to the current stack
61+
* Export Studio projects connected to the current stack
6262
*/
6363
async exportProjects(): Promise<void> {
64-
log.debug('Starting Composable Studio project export...', this.exportConfig.context);
64+
log.debug('Starting Studio project export...', this.exportConfig.context);
6565

6666
try {
6767
// Get authentication details - following personalization-api-adapter pattern
68-
log.debug('Initializing Composable Studio API authentication...', this.exportConfig.context);
68+
log.debug('Initializing Studio API authentication...', this.exportConfig.context);
6969
await authenticationHandler.getAuthDetails();
7070
const token = authenticationHandler.accessToken;
7171
log.debug(
@@ -116,11 +116,11 @@ export default class ExportComposableStudio {
116116

117117
// Use the first connected project (stacks should have only one project)
118118
this.composableStudioProject = connectedProject[0];
119-
log.debug(`Found Composable Studio project: ${this.composableStudioProject.name}`, this.exportConfig.context);
119+
log.debug(`Found Studio project: ${this.composableStudioProject.name}`, this.exportConfig.context);
120120

121121
// Write the project to file
122122
const composableStudioFilePath = pResolve(this.composableStudioPath, this.composableStudioConfig.fileName);
123-
log.debug(`Writing Composable Studio project to: ${composableStudioFilePath}`, this.exportConfig.context);
123+
log.debug(`Writing Studio project to: ${composableStudioFilePath}`, this.exportConfig.context);
124124

125125
fsUtil.writeFile(composableStudioFilePath, this.composableStudioProject as unknown as Record<string, unknown>);
126126

@@ -129,7 +129,7 @@ export default class ExportComposableStudio {
129129
this.exportConfig.context,
130130
);
131131
} catch (error: any) {
132-
log.debug('Error occurred while exporting Composable Studio project', this.exportConfig.context);
132+
log.debug('Error occurred while exporting Studio project', this.exportConfig.context);
133133
handleAndLogError(error, {
134134
...this.exportConfig.context,
135135
});

packages/contentstack-import/messages/index.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"COMPOSABLE_STUDIO_IMPORT_START": "Starting Composable Studio project import...",
3-
"COMPOSABLE_STUDIO_NOT_FOUND": "No Composable Studio project found in exported data",
4-
"COMPOSABLE_STUDIO_SKIP_EXISTING": "Skipping Composable Studio import - target stack already has a connected project",
5-
"COMPOSABLE_STUDIO_IMPORT_COMPLETE": "Successfully imported Composable Studio project '%s'",
6-
"COMPOSABLE_STUDIO_IMPORT_FAILED": "Failed to import Composable Studio project: %s",
2+
"COMPOSABLE_STUDIO_IMPORT_START": "Starting Studio project import...",
3+
"COMPOSABLE_STUDIO_NOT_FOUND": "No Studio project found in exported data",
4+
"COMPOSABLE_STUDIO_SKIP_EXISTING": "Skipping Studio import - target stack already has a connected project",
5+
"COMPOSABLE_STUDIO_IMPORT_COMPLETE": "Successfully imported Studio project '%s'",
6+
"COMPOSABLE_STUDIO_IMPORT_FAILED": "Failed to import Studio project: %s",
77
"COMPOSABLE_STUDIO_NAME_CONFLICT": "Project name '%s' already exists. Please provide a new name:",
88
"COMPOSABLE_STUDIO_SUGGEST_NAME": "Suggested name: %s",
99
"COMPOSABLE_STUDIO_ENV_MAPPING_FAILED": "Warning: Could not map environment '%s', using empty environment"

0 commit comments

Comments
 (0)