Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
62 changes: 59 additions & 3 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,60 @@
fileignoreconfig:
- filename: package-lock.json
checksum: 62d4e616575696750cc428c6bc327058f68fcf7ef0194b4a68aac3cea9551f81
version: ''
- filename: package-lock.json
checksum: 87b205a27082d15199ba291550e9ca3e8c784fe5bade7fcb89bf2acb1e850b23
- filename: pnpm-lock.yaml
checksum: d28afee9b463d66004354b9476b1e39344f903e2db3a15c5f83bd84e688c01d6
- filename: packages/contentstack-import-setup/test/unit/backup-handler.test.ts
checksum: 0582d62b88834554cf12951c8690a73ef3ddbb78b82d2804d994cf4148e1ef93
- filename: packages/contentstack-import-setup/test/config.json
checksum: 187fd202d00e7d2c3d8b00f983ff21d8535e0fdb76cebec3f39c400258c88d05
- filename: packages/contentstack-command/test/config.json
checksum: 7c15663b3a6562b99d3082ead5035932b0276e4fd53774b3f838372a19b291ef
- filename: packages/contentstack-import-setup/test/unit/modules/content-types.test.ts
checksum: ce8772281171927e7dee7d6a761a029c902393b808e2696624fdcf0f5b80ea5c
- filename: packages/contentstack-import-setup/test/unit/modules/entries.test.ts
checksum: 17652bfc125879bb37facf8ea9f54dc4f97627ca625ec148c9d551a20196d85b
- filename: packages/contentstack-import-setup/test/unit/modules/extensions.test.ts
checksum: eaafdf39fc8a947aa490232bfc7da950c882bd69b5b27a0362ef2bee21f6a177
- filename: packages/contentstack-import-setup/test/unit/modules/global-fields.test.ts
checksum: fd49cfab6d374254c0c6eb4c7e7ee8ff4fe6c2b46e7b0d7f7437cbe665d1ce8b
- filename: packages/contentstack-import-setup/test/unit/modules/marketplace-apps.test.ts
checksum: c35dfe96d685fb12427de4b77c9240b34b9bee5e158ad7489acaa0d061ad562e
- filename: packages/contentstack-import-setup/test/unit/modules/taxonomies.test.ts
checksum: 3868ff9e8833a670350590f070c6f635807f2a1f534accba677af4709fab0e4a
- filename: packages/contentstack-import-setup/test/unit/import-config-handler.test.ts
checksum: f2f2c994543c388f2eecaf8128f789eab2895f1f78d659e58ef9491972c6f9a8
- filename: packages/contentstack-import-setup/test/unit/common-helper.test.ts
checksum: a0c98c6f0ee88a398e3f1bd80cac0a6cc0ede7eee01957cf7d6e1f199f3da643
- filename: packages/contentstack-import-setup/test/unit/modules/base-setup.test.ts
checksum: 862c52e2bbd1975b963f45ce3e89c243d047858cdbe7339918395ce2fc52bf89
- filename: packages/contentstack-import-setup/test/unit/import-setup.test.ts
checksum: 1eee4f461fa5b115894d1806a14af6f45336cbe6c0392f16078bd2877fadff67
- filename: packages/contentstack-import-setup/test/unit/login-handler.test.ts
checksum: e549f9ca3a9aae0d93b7284f7e771d55c0610725ddcb4333612df2f215e92769
- filename: packages/contentstack/README.md
checksum: f46084b199b3b0d7986b363c86a657570def71e5da29b948cc343eaf94ec7e97
- filename: packages/contentstack-import-setup/test/unit/modules/assets.test.ts
checksum: 449a5e3383631a6f78d1291aa3c28c91681879289398f0a933158fba5c5d5acf
- filename: packages/contentstack-auth/env.example
checksum: 72c9ed18a449c42b03ec54795898f6bad4e15d23a3d701c05b96fb17c3bbd93b
- filename: packages/contentstack-auth/test/integration/auth.test.ts
checksum: 9933a64d17d6d6dd7dd87ff210ce5e8a215bf36fac0cfd333894612ed10fb81b
- filename: packages/contentstack-auth/src/utils/mfa-handler.ts
checksum: ca9c34a3fe6c3b957debff987aefbceb641bf4954f15541d07d901f91e5ff014
- filename: packages/contentstack-auth/messages/index.json
checksum: 95856ad6273f17a9e853cda9c2cf0bdd782e47aeab93385e73ab870b5e814f89
- filename: packages/contentstack-auth/test/utils/auth-handler.test.ts
checksum: f88dded3a326f191844e39258e7fe390a72fefeb387d09c7f97e4e8aed520c97
- filename: packages/contentstack-auth/src/commands/auth/login.ts
checksum: 89204be8dfc1f670a568af992b54f34845e49bd4a8046c0cf041dd3759150718
- filename: packages/contentstack-auth/test/unit/commands/tokens-add.test.ts
checksum: 1e7247908e1887998210381c03caca93a3983e1c8967483464cf1c3bd3209cd1
- filename: packages/contentstack-auth/test/unit/commands/logout.test.ts
checksum: cd22dd04bd6a77cafa7dd0960cd4691201a3e228216d5a10041b8e39d7ebba1f
- filename: packages/contentstack-auth/src/utils/auth-handler.ts
checksum: 1261d02e8215da2db28557b77d6a8c8c604e11df88520e1cc5c8561e26bdd150
- filename: packages/contentstack-auth/test/unit/commands/login.test.ts
checksum: f93aa9b0c964608b60c88d4c72ff33840b58ec900297c4bae1f4ea365aa51048
- filename: packages/contentstack-auth/test/utils/mfa-handler.test.ts
checksum: b067f93cf0185d794e8419cc41e8fac96ed790dea8fc48dc083ee242ccacbd4d
version: "1.0"
2,755 changes: 1,277 additions & 1,478 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/contentstack-audit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/cli-audit",
"version": "1.14.0",
"version": "1.14.1",
"description": "Contentstack audit plugin",
"author": "Contentstack CLI",
"homepage": "https://github.com/contentstack/cli",
Expand All @@ -18,8 +18,8 @@
"/oclif.manifest.json"
],
"dependencies": {
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-utilities": "~1.13.1",
"@contentstack/cli-command": "~1.6.1",
"@contentstack/cli-utilities": "~1.14.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"@oclif/plugin-plugins": "^5.4.38",
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-auth/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-auth",
"description": "Contentstack CLI plugin for authentication activities",
"version": "1.6.0",
"version": "1.6.1",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"scripts": {
Expand All @@ -22,8 +22,8 @@
"test:unit:report": "nyc --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\""
},
"dependencies": {
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-utilities": "~1.13.1",
"@contentstack/cli-command": "~1.6.1",
"@contentstack/cli-utilities": "~1.14.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"otplib": "^12.0.1"
Expand Down
8 changes: 4 additions & 4 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.15.0",
"version": "1.15.1",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"scripts": {
Expand All @@ -16,9 +16,9 @@
"test:report": "nyc --reporter=lcov mocha \"test/**/*.test.js\""
},
"dependencies": {
"@contentstack/cli-cm-seed": "~1.12.0",
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-utilities": "~1.13.1",
"@contentstack/cli-cm-seed": "~1.12.1",
"@contentstack/cli-command": "~1.6.1",
"@contentstack/cli-utilities": "~1.14.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"inquirer": "8.2.6",
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-branches/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@contentstack/cli-cm-branches",
"description": "Contentstack CLI plugin to do branches operations",
"version": "1.5.1",
"version": "1.5.2",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-command": "~1.6.1",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"@contentstack/cli-utilities": "~1.13.1",
"@contentstack/cli-utilities": "~1.14.0",
"chalk": "^4.1.2",
"just-diff": "^6.0.2",
"lodash": "^4.17.21"
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-bulk-publish/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@contentstack/cli-cm-bulk-publish",
"description": "Contentstack CLI plugin for bulk publish actions",
"version": "1.9.0",
"version": "1.9.1",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-utilities": "~1.13.1",
"@contentstack/cli-command": "~1.6.1",
"@contentstack/cli-utilities": "~1.14.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"chalk": "^4.1.2",
Expand Down
10 changes: 5 additions & 5 deletions packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@contentstack/cli-cm-clone",
"description": "Contentstack stack clone plugin",
"version": "1.15.1",
"version": "1.15.2",
"author": "Contentstack",
"bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues",
"dependencies": {
"@colors/colors": "^1.6.0",
"@contentstack/cli-cm-export": "~1.19.0",
"@contentstack/cli-cm-import": "~1.26.1",
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-utilities": "~1.13.1",
"@contentstack/cli-cm-export": "~1.20.0",
"@contentstack/cli-cm-import": "~1.26.3",
"@contentstack/cli-command": "~1.6.1",
"@contentstack/cli-utilities": "~1.14.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"chalk": "^4.1.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-command/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-command",
"description": "Contentstack CLI plugin for configuration",
"version": "1.6.0",
"version": "1.6.1",
"author": "Contentstack",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -19,7 +19,7 @@
"test:unit": "mocha --timeout 10000 --forbid-only \"test/unit/**/*.test.ts\""
},
"dependencies": {
"@contentstack/cli-utilities": "~1.13.1",
"@contentstack/cli-utilities": "~1.14.0",
"contentstack": "^3.25.3",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28"
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-config/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-config",
"description": "Contentstack CLI plugin for configuration",
"version": "1.15.0",
"version": "1.15.1",
"author": "Contentstack",
"scripts": {
"build": "npm run clean && npm run compile",
Expand All @@ -21,8 +21,8 @@
"test:unit:report": "nyc --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\""
},
"dependencies": {
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-utilities": "~1.13.1",
"@contentstack/cli-command": "~1.6.1",
"@contentstack/cli-utilities": "~1.14.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"lodash": "^4.17.21"
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-export-to-csv/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@contentstack/cli-cm-export-to-csv",
"description": "Export entities to csv",
"version": "1.9.0",
"version": "1.9.1",
"author": "Abhinav Gupta @abhinav-from-contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-utilities": "~1.13.1",
"@contentstack/cli-command": "~1.6.1",
"@contentstack/cli-utilities": "~1.14.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"fast-csv": "^4.3.6",
Expand Down
12 changes: 6 additions & 6 deletions packages/contentstack-export/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@contentstack/cli-cm-export",
"description": "Contentstack CLI plugin to export content from stack",
"version": "1.19.0",
"version": "1.20.0",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-variants": "~1.3.0",
"@contentstack/cli-command": "~1.6.1",
"@contentstack/cli-variants": "~1.3.1",
"@oclif/core": "^4.3.3",
"@contentstack/cli-utilities": "~1.13.1",
"@contentstack/cli-utilities": "~1.14.0",
"async": "^3.2.6",
"big-json": "^3.2.0",
"bluebird": "^3.7.2",
Expand All @@ -21,8 +21,8 @@
"winston": "^3.17.0"
},
"devDependencies": {
"@contentstack/cli-auth": "~1.6.0",
"@contentstack/cli-config": "~1.12.1",
"@contentstack/cli-auth": "~1.6.1",
"@contentstack/cli-config": "~1.15.1",
"@contentstack/cli-dev-dependencies": "~1.3.1",
"@oclif/plugin-help": "^6.2.28",
"@oclif/test": "^4.1.13",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ export default class ExportCommand extends Command {
description:
"[optional] The name of the branch where you want to export your content. If you don't mention the branch name, then by default the content will be exported from all the branches of your stack.",
parse: printFlagDeprecation(['-B'], ['--branch']),
exclusive: ['branch-alias'],
}),
'branch-alias': flags.string({
char: 'b',
description: '(Optional) The alias of the branch from which you want to export content.',
exclusive: ['branch'],
}),
'secured-assets': flags.boolean({
description: '[optional] Use this flag for assets that are secured.',
Expand Down Expand Up @@ -138,7 +144,7 @@ export default class ExportCommand extends Command {
log.success(`The log has been stored at '${getLogPath()}'`, exportConfig.context);
} catch (error) {
handleAndLogError(error);
log.info(`The log has been stored at '${getLogPath()}'`)
log.info(`The log has been stored at '${getLogPath()}'`);
}
}

Expand Down
29 changes: 21 additions & 8 deletions packages/contentstack-export/src/export/module-exporter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import * as path from 'path';
import { ContentstackClient, handleAndLogError, messageHandler, log } from '@contentstack/cli-utilities';
import {
ContentstackClient,
handleAndLogError,
messageHandler,
log,
getBranchFromAlias,
} from '@contentstack/cli-utilities';
import { setupBranches, setupExportDir, writeExportMetaFile } from '../utils';
import startModuleExport from './modules';
import startJSModuleExport from './modules-js';
Expand All @@ -21,14 +27,21 @@ class ModuleExporter {

async start(): Promise<any> {
// setup the branches
await setupBranches(this.exportConfig, this.stackAPIClient);
await setupExportDir(this.exportConfig);
// if branches available run it export by branches
if (this.exportConfig.branches) {
this.exportConfig.branchEnabled = true;
return this.exportByBranches();
try {
if (!this.exportConfig.branchName && this.exportConfig.branchAlias) {
this.exportConfig.branchName = await getBranchFromAlias(this.stackAPIClient, this.exportConfig.branchAlias);
}
await setupBranches(this.exportConfig, this.stackAPIClient);
await setupExportDir(this.exportConfig);
// if branches available run it export by branches
if (this.exportConfig.branches) {
this.exportConfig.branchEnabled = true;
return this.exportByBranches();
}
return this.export();
} catch (error) {
throw error;
}
return this.export();
}

async exportByBranches(): Promise<void> {
Expand Down
1 change: 1 addition & 0 deletions packages/contentstack-export/src/types/export-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default interface ExportConfig extends DefaultConfig {
forceStopMarketplaceAppsPrompt: boolean;
auth_token?: string;
branchName?: string;
branchAlias?: string;
securedAssets?: boolean;
contentTypes?: string[];
branches?: branch[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ const setupConfig = async (exportCmdFlags: any): Promise<ExportConfig> => {
config.auth_token = configHandler.get('authtoken'); // TBD handle auth token in httpClient & sdk
config.isAuthenticated = isAuthenticated();

if (exportCmdFlags['branch-alias']) {
config.branchAlias = exportCmdFlags['branch-alias'];
}
if (exportCmdFlags['branch']) {
config.branchName = exportCmdFlags['branch'];
}
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-import-setup/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@contentstack/cli-cm-import-setup",
"description": "Contentstack CLI plugin to setup the mappers and configurations for the import command",
"version": "1.4.1",
"version": "1.4.2",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-utilities": "~1.13.1",
"@contentstack/cli-command": "~1.6.1",
"@contentstack/cli-utilities": "~1.14.0",
"@oclif/core": "^4.3.0",
"big-json": "^3.2.0",
"chalk": "^4.1.2",
Expand Down
10 changes: 5 additions & 5 deletions packages/contentstack-import/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@contentstack/cli-cm-import",
"description": "Contentstack CLI plugin to import content into stack",
"version": "1.26.2",
"version": "1.26.3",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-audit": "~1.14.0",
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-utilities": "~1.13.1",
"@contentstack/cli-audit": "~1.14.1",
"@contentstack/cli-command": "~1.6.1",
"@contentstack/cli-utilities": "~1.14.0",
"@contentstack/management": "~1.22.0",
"@contentstack/cli-variants": "~1.3.0",
"@contentstack/cli-variants": "~1.3.1",
"@oclif/core": "^4.3.0",
"big-json": "^3.2.0",
"bluebird": "^3.7.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-migrate-rte/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@contentstack/cli-cm-migrate-rte",
"description": "Contentstack CLI plugin to migrate HTML RTE to JSON RTE",
"version": "1.6.0",
"version": "1.6.1",
"author": "contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-utilities": "~1.13.1",
"@contentstack/cli-command": "~1.6.1",
"@contentstack/cli-utilities": "~1.14.0",
"@contentstack/json-rte-serializer": "~2.1.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
Expand Down
Loading
Loading