Skip to content

Commit

Permalink
fixed entry publishing issue for the localised entries and version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
cs-raj committed Jul 4, 2024
1 parent 0d664a4 commit f5cde1e
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 33 deletions.
22 changes: 11 additions & 11 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"@colors/colors": "^1.5.0",
"@contentstack/cli-cm-export": "~1.11.5",
"@contentstack/cli-cm-import": "~1.16.0",
"@contentstack/cli-cm-import": "~1.16.1",
"@contentstack/cli-command": "~1.2.18",
"@contentstack/cli-utilities": "~1.6.3",
"async": "^3.2.4",
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.16.0 darwin-arm64 node-v22.2.0
@contentstack/cli-cm-import/1.16.1 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-import/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-cm-import",
"description": "Contentstack CLI plugin to import content into stack",
"version": "1.16.0",
"version": "1.16.1",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
Expand Down
28 changes: 24 additions & 4 deletions packages/contentstack-import/src/import/modules/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,25 @@ export default class EntriesImport extends BaseClass {
this.entriesUIDMapperPath = path.join(sanitizePath(this.entriesMapperPath), 'uid-mapping.json');
this.uniqueUidMapperPath = path.join(sanitizePath(this.entriesMapperPath), 'unique-mapping.json');
this.modifiedCTsPath = path.join(sanitizePath(this.entriesMapperPath), 'modified-schemas.json');
this.marketplaceAppMapperPath = path.join(sanitizePath(this.importConfig.data), 'mapper', 'marketplace_apps', 'uid-mapping.json');
this.taxonomiesPath = path.join(sanitizePath(this.importConfig.data), 'mapper', 'taxonomies', 'terms', 'success.json');
this.marketplaceAppMapperPath = path.join(
sanitizePath(this.importConfig.data),
'mapper',
'marketplace_apps',
'uid-mapping.json',
);
this.taxonomiesPath = path.join(
sanitizePath(this.importConfig.data),
'mapper',
'taxonomies',
'terms',
'success.json',
);
this.entriesConfig = importConfig.modules.entries;
this.entriesPath = path.resolve(sanitizePath(importConfig.data), sanitizePath(this.entriesConfig.dirName));
this.cTsPath = path.resolve(sanitizePath(importConfig.data), sanitizePath(importConfig.modules['content-types'].dirName));
this.cTsPath = path.resolve(
sanitizePath(importConfig.data),
sanitizePath(importConfig.modules['content-types'].dirName),
);
this.localesPath = path.resolve(
sanitizePath(importConfig.data),
sanitizePath(importConfig.modules.locales.dirName),
Expand Down Expand Up @@ -944,9 +958,15 @@ export default class EntriesImport extends BaseClass {
requestObject.environments.push(this.envs[pubObject.environment].name);
}
if (pubObject.locale && indexOf(requestObject.locales, pubObject.locale) === -1) {
requestObject.locales.push(pubObject.locale);
if (pubObject.locale === entry.locale) {
requestObject.locales.push(pubObject.locale);
}
}
});
if (!requestObject.locales.length) {
apiOptions.apiData = null;
return apiOptions;
}
} else {
apiOptions.apiData = null;
return apiOptions;
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-seed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-cm-import": "~1.16.0",
"@contentstack/cli-cm-import": "~1.16.1",
"@contentstack/cli-command": "~1.2.18",
"@contentstack/cli-utilities": "~1.6.3",
"inquirer": "8.2.4",
Expand Down
22 changes: 12 additions & 10 deletions packages/contentstack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3220,16 +3220,18 @@ Launch related operations

```
USAGE
$ csdx launch [--type GitHub|FileUpload] [--framework Gatsby|NextJs|Other] [--org <value>] [-n <value>]
[-e <value>] [--branch <value>] [--build-command <value>] [--out-dir <value>]
$ csdx launch [--type GitHub|FileUpload] [--framework Other|Gatsby|NextJs|CRA (Create React App)|CSR
(Client-Side Rendered)|Angular|VueJs] [--org <value>] [-n <value>] [-e <value>] [--branch <value>] [--build-command
<value>] [--out-dir <value>]
FLAGS
-e, --environment=<value> [Optional] Environment name for the Launch project
-n, --name=<value> [Optional] Name of the project
--branch=<value> [Optional] GitHub branch name
--build-command=<value> [Optional] Build Command
--framework=<option> [Optional] Type of framework
<options: Gatsby|NextJs|Other>
<options: Other|Gatsby|NextJs|CRA (Create React App)|CSR (Client-Side
Rendered)|Angular|VueJs>
--org=<value> [Optional] Provide the organization UID to create a new project or deployment
--out-dir=<value> [Optional] Output Directory
--type=<option> [Optional] Choose the type of adapters
Expand Down Expand Up @@ -3496,7 +3498,7 @@ EXAMPLES
$ csdx plugins
```

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

## `csdx plugins:add PLUGIN`

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

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

## `csdx plugins:install PLUGIN`

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

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

## `csdx plugins:link PATH`

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

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

## `csdx plugins:remove [PLUGIN]`

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

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

## `csdx plugins:uninstall [PLUGIN]`

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

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

## `csdx plugins:unlink [PLUGIN]`

Expand Down Expand Up @@ -3762,7 +3764,7 @@ DESCRIPTION
Update installed plugins.
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.2.4/src/commands/plugins/update.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.3.3/src/commands/plugins/update.ts)_

## `csdx tokens`

Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@contentstack/cli-cm-export": "~1.11.5",
"@contentstack/cli-cm-clone": "~1.10.6",
"@contentstack/cli-cm-export-to-csv": "~1.7.1",
"@contentstack/cli-cm-import": "~1.16.0",
"@contentstack/cli-cm-import": "~1.16.1",
"@contentstack/cli-cm-migrate-rte": "~1.4.17",
"@contentstack/cli-cm-seed": "~1.7.6",
"@contentstack/cli-command": "~1.2.18",
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

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

0 comments on commit f5cde1e

Please sign in to comment.