Skip to content
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

DX | 26-09-2024 | Variant EA Release #1587

Merged
merged 33 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a914518
replaced personalize-url with getter methodcd
harshithad0703 Aug 28, 2024
223f80e
updated for personalize url in attributes
harshithad0703 Aug 29, 2024
01f2738
updated personalizeUrl im import, export and variants
harshithad0703 Sep 19, 2024
e5b2138
reverting
harshithad0703 Sep 19, 2024
085c92d
Merge pull request #1572 from contentstack/fix/dx-1171-replace-person…
harshithad0703 Sep 19, 2024
63722f3
refactor: entry variant api response & replaced personalization with …
aman19K Sep 20, 2024
bd74063
added build info in gitignore file
aman19K Sep 20, 2024
57a885c
refactor: replaced personalizationConfig with personalizeConfig
aman19K Sep 20, 2024
557d4bd
Added support for experience versioning
shafeeqd959 Sep 23, 2024
e5fffaf
conflicts resolved
shafeeqd959 Sep 23, 2024
f06afc1
sanitized path
shafeeqd959 Sep 23, 2024
5c48678
Merge pull request #1579 from contentstack/feat/CS-1402,CS-1401
aman19K Sep 23, 2024
9842025
Merge branch 'next-feature-update' into feat/DX-1463
aman19K Sep 23, 2024
57a9c16
refactor: experience & variant-entries code
aman19K Sep 23, 2024
9ba38ba
refactor: error handling in attribute, audiences &events
aman19K Sep 23, 2024
56d2e2a
fixed
shafeeqd959 Sep 24, 2024
6778c3d
refactor: added personalize url
aman19K Sep 24, 2024
a05b812
Merge pull request #1581 from contentstack/fix/feat/DX-1463
aman19K Sep 24, 2024
8bb3f1d
Merge pull request #1573 from contentstack/feat/DX-1463
aman19K Sep 24, 2024
1d8c5e4
Merge branch 'staging' of github.com:contentstack/cli into next-featu…
shafeeqd959 Sep 24, 2024
33ef991
version bumped
shafeeqd959 Sep 24, 2024
27e4674
Merge branch 'next-feature-update' of github.com:contentstack/cli int…
shafeeqd959 Sep 24, 2024
35e76e8
Merge pull request #1584 from contentstack/main
cs-raj Sep 24, 2024
c9c4fff
refactor: error formatting
aman19K Sep 24, 2024
a213cd0
Merge pull request #1586 from contentstack/fix/error
aman19K Sep 24, 2024
0b8e5ea
fix: handle forbidden error
aman19K Sep 24, 2024
4635359
Merge branch 'staging' into next-feature-update
aman19K Sep 24, 2024
eae602d
update lock & yaml file
aman19K Sep 25, 2024
28af8cd
Merge pull request #1582 from contentstack/next-feature-update
aman19K Sep 25, 2024
ad3f969
fix: snyk issues
aman19K Sep 25, 2024
bfbc0aa
Merge pull request #1588 from contentstack/fix/DX-1498
aman19K Sep 25, 2024
8a76cbe
fix: duplicate project error issue
aman19K Sep 25, 2024
e92c9f6
Merge pull request #1589 from contentstack/fix/duplicate-project-issue
aman19K Sep 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions packages/contentstack-audit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ EXAMPLES
$ csdx plugins
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.8/src/commands/plugins/index.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.9/src/commands/plugins/index.ts)_

## `csdx plugins:add PLUGIN`

Expand Down Expand Up @@ -343,7 +343,7 @@ EXAMPLES
$ csdx plugins:inspect myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.8/src/commands/plugins/inspect.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.9/src/commands/plugins/inspect.ts)_

## `csdx plugins:install PLUGIN`

Expand Down Expand Up @@ -392,7 +392,7 @@ EXAMPLES
$ csdx plugins:install someuser/someplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.8/src/commands/plugins/install.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.9/src/commands/plugins/install.ts)_

## `csdx plugins:link PATH`

Expand Down Expand Up @@ -422,7 +422,7 @@ EXAMPLES
$ csdx plugins:link myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.8/src/commands/plugins/link.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.9/src/commands/plugins/link.ts)_

## `csdx plugins:remove [PLUGIN]`

Expand Down Expand Up @@ -463,7 +463,7 @@ FLAGS
--reinstall Reinstall all plugins after uninstalling.
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.8/src/commands/plugins/reset.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.9/src/commands/plugins/reset.ts)_

## `csdx plugins:uninstall [PLUGIN]`

Expand Down Expand Up @@ -491,7 +491,7 @@ EXAMPLES
$ csdx plugins:uninstall myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.8/src/commands/plugins/uninstall.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.9/src/commands/plugins/uninstall.ts)_

## `csdx plugins:unlink [PLUGIN]`

Expand Down Expand Up @@ -535,5 +535,5 @@ DESCRIPTION
Update installed plugins.
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.8/src/commands/plugins/update.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.9/src/commands/plugins/update.ts)_
<!-- commandsstop -->
2 changes: 1 addition & 1 deletion packages/contentstack-bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $ npm install -g @contentstack/cli-cm-bootstrap
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-bootstrap/1.11.0 darwin-arm64 node-v22.2.0
@contentstack/cli-cm-bootstrap/1.12.0 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-bootstrap/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-cm-bootstrap",
"description": "Bootstrap contentstack apps",
"version": "1.11.0",
"version": "1.12.0",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"scripts": {
Expand All @@ -17,7 +17,7 @@
"test:report": "nyc --reporter=lcov mocha \"test/**/*.test.js\""
},
"dependencies": {
"@contentstack/cli-cm-seed": "~1.8.0",
"@contentstack/cli-cm-seed": "~1.9.0",
"@contentstack/cli-command": "~1.3.0",
"@contentstack/cli-utilities": "~1.7.2",
"inquirer": "8.2.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-clone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $ npm install -g @contentstack/cli-cm-clone
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-clone/1.11.1 darwin-arm64 node-v22.2.0
@contentstack/cli-cm-clone/1.12.0 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@contentstack/cli-cm-clone",
"description": "Contentstack stack clone plugin",
"version": "1.11.1",
"version": "1.12.0",
"author": "Contentstack",
"bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues",
"dependencies": {
"@colors/colors": "^1.5.0",
"@contentstack/cli-cm-export": "~1.12.0",
"@contentstack/cli-cm-import": "~1.17.0",
"@contentstack/cli-cm-export": "~1.13.0",
"@contentstack/cli-cm-import": "~1.18.0",
"@contentstack/cli-command": "~1.3.0",
"@contentstack/cli-utilities": "~1.7.2",
"async": "^3.2.4",
Expand Down
10 changes: 5 additions & 5 deletions packages/contentstack-config/src/utils/region-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const regions = {
name: 'NA',
'developerHubUrl': 'https://developerhub-api.contentstack.com',
'launchHubUrl': 'https://launch-api.contentstack.com',
'personalizeUrl': 'https://personalization-api.contentstack.com',
'personalizeUrl': 'https://personalize-api.contentstack.com',
},
EU: {
cma: 'https://eu-api.contentstack.com',
Expand All @@ -33,7 +33,7 @@ const regions = {
name: 'EU',
'developerHubUrl': 'https://eu-developerhub-api.contentstack.com',
'launchHubUrl': 'https://eu-launch-api.contentstack.com',
'personalizeUrl': 'Not available',
'personalizeUrl': 'https://eu-personalize-api.contentstack.com',
},
'AZURE-NA': {
cma: 'https://azure-na-api.contentstack.com',
Expand All @@ -42,7 +42,7 @@ const regions = {
name: 'AZURE-NA',
'developerHubUrl': 'https://azure-na-developerhub-api.contentstack.com',
'launchHubUrl': 'https://azure-na-launch-api.contentstack.com',
'personalizeUrl': 'Not available',
'personalizeUrl': 'https://azure-na-personalize-api.contentstack.com',
},
'AZURE-EU': {
cma: 'https://azure-eu-api.contentstack.com',
Expand All @@ -51,7 +51,7 @@ const regions = {
name: 'AZURE-EU',
'developerHubUrl': 'https://azure-eu-developerhub-api.contentstack.com',
'launchHubUrl': 'https://azure-eu-launch-api.contentstack.com',
'personalizeUrl': 'Not available',
'personalizeUrl': 'https://azure-eu-personalize-api.contentstack.com',
},
'GCP-NA': {
cma: 'https://gcp-na-api.contentstack.com',
Expand All @@ -60,7 +60,7 @@ const regions = {
name: 'GCP-NA',
'developerHubUrl': 'https://gcp-na-developerhub-api.contentstack.com',
'launchHubUrl': 'Not available',
'personalizeUrl': 'Not available',
'personalizeUrl': 'https://gcp-na-personalize-api.contentstack.com',
},
};

Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-export/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $ npm install -g @contentstack/cli-cm-export
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-export/1.12.1 darwin-arm64 node-v22.2.0
@contentstack/cli-cm-export/1.13.0 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-export/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@contentstack/cli-cm-export",
"description": "Contentstack CLI plugin to export content from stack",
"version": "1.12.1",
"version": "1.13.0",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.3.0",
"@contentstack/cli-variants": "~0.0.1-alpha",
"@contentstack/cli-variants": "~1.0.0",
"@contentstack/cli-utilities": "~1.7.2",
"@oclif/core": "^3.26.5",
"async": "^3.2.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export default class ExportCommand extends Command {
exportConfig.host = this.cmaHost;
exportConfig.region = this.region;
exportConfig.developerHubBaseUrl = this.developerHubUrl;
if (this.personalizeUrl) exportConfig.modules.personalize.baseURL[exportConfig.region.name] = this.personalizeUrl;
exportDir = exportConfig.cliLogsPath || exportConfig.data || exportConfig.exportDir;
const managementAPIClient: ContentstackClient = await managementSDKClient(exportConfig);
const moduleExporter = new ModuleExporter(managementAPIClient, exportConfig);
Expand Down
8 changes: 4 additions & 4 deletions packages/contentstack-export/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const config: DefaultConfig = {
'content-types',
'custom-roles',
'workflows',
'personalization',
'personalize',
'entries',
'labels',
'marketplace-apps',
Expand Down Expand Up @@ -144,11 +144,11 @@ const config: DefaultConfig = {
dependencies: ['locales', 'content-types'],
exportVersions: false,
},
personalization: {
personalize: {
baseURL: {
NA: 'https://personalization-api.contentstack.com',
NA: 'https://personalize-api.contentstack.com',
},
dirName: 'personalization',
dirName: 'personalize',
exportOrder: ['attributes', 'audiences', 'events', 'experiences'],
projects: {
dirName: 'projects',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import {
import { log, formatError } from '../../utils';
import { ModuleClassParams, ExportConfig } from '../../types';

export default class ExportPersonalization {
export default class ExportPersonalize {
public exportConfig: ExportConfig;
public personalizeConfig: { dirName: string; baseURL: Record<string, string> } & AnyProperty;
constructor({ exportConfig }: ModuleClassParams) {
this.exportConfig = exportConfig;
this.personalizeConfig = exportConfig.modules.personalization;
this.personalizeConfig = exportConfig.modules.personalize;
}

async start(): Promise<void> {
Expand All @@ -39,7 +39,7 @@ export default class ExportPersonalization {
experiences: new ExportExperiences(this.exportConfig),
};

const order: (keyof typeof moduleMapper)[] = this.exportConfig.modules.personalization
const order: (keyof typeof moduleMapper)[] = this.exportConfig.modules.personalize
.exportOrder as (keyof typeof moduleMapper)[];

for (const module of order) {
Expand All @@ -51,8 +51,12 @@ export default class ExportPersonalization {
}
}
} catch (error) {
if (error === 'Forbidden') {
log(this.exportConfig, "Personalize is not enabled in the given organization!", 'info');
} else {
log(this.exportConfig, error, 'error');
}
this.exportConfig.personalizationEnabled = false;
log(this.exportConfig, error, 'error');
}
}
}
2 changes: 1 addition & 1 deletion packages/contentstack-export/src/types/default-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default interface DefaultConfig {
dependencies?: Modules[];
exportVersions: boolean;
};
personalization: {
personalize: {
dirName: string;
baseURL: Record<string, string>;
} & AnyProperty;
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-export/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export type Modules =
| 'labels'
| 'marketplace-apps'
| 'taxonomies'
| 'personalization';
| 'personalize';

export type ModuleClassParams = {
stackAPIClient: ReturnType<ContentstackClient['stack']>;
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-import/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ $ npm install -g @contentstack/cli-cm-import
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-import/1.17.1 darwin-arm64 node-v22.2.0
@contentstack/cli-cm-import/1.18.0 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
Loading
Loading