Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
040b54f
Fixed kickstart apps breaking issue in bootstrap command
sunil-lakshman Feb 2, 2026
8e2db71
update pnpm-lock
harshithad0703 Feb 2, 2026
de797ee
update changelog
harshithad0703 Feb 2, 2026
ef2c357
Fixed region issue
sunil-lakshman Feb 3, 2026
33413d6
Merge branch 'development' into fix/kickstart-apps
sunil-lakshman Feb 3, 2026
0c7febe
add types in interface
harshithad0703 Feb 3, 2026
af5750e
Support kickstart apps in dev environment
sunil-lakshman Feb 3, 2026
6c560f3
Fixed security issues
sunil-lakshman Feb 3, 2026
0f91563
Region support added
sunil-lakshman Feb 3, 2026
3c63dff
Merge pull request #2369 from contentstack/fix/kickstart-apps
sunil-lakshman Feb 4, 2026
5525041
Merge branch 'development' into enh/dx-3902-Refactor-Endpoints-Integr…
harshithad0703 Feb 4, 2026
96a7046
version bump
harshithad0703 Feb 4, 2026
31eb010
Updated package and pnpm lock files
sunil-lakshman Feb 4, 2026
26baf62
Merge pull request #2357 from contentstack/enh/dx-3902-Refactor-Endpo…
harshithad0703 Feb 5, 2026
81ca843
Merge pull request #2376 from contentstack/development
harshithad0703 Feb 6, 2026
34e1537
Merge pull request #2379 from contentstack/staging
harshithad0703 Feb 9, 2026
5f770ed
Merge pull request #2382 from contentstack/main
harshithad0703 Feb 9, 2026
7e74046
Fix: Dependency Updated
cs-raj Feb 12, 2026
ff433d9
Merge pull request #2388 from contentstack/fix/sre
cs-raj Feb 12, 2026
fd79840
fix: Removed Management SDK from seed, core and import
cs-raj Feb 13, 2026
1d66094
Added management sdk in contentstack core
cs-raj Feb 13, 2026
d6d95e5
Added management sdk in contentstack core
cs-raj Feb 15, 2026
fcd6280
version bump
cs-raj Feb 15, 2026
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
647 changes: 221 additions & 426 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/contentstack-audit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"chalk": "^4.1.2",
"fast-csv": "^4.3.6",
"fs-extra": "^11.3.0",
"lodash": "^4.17.21",
"lodash": "^4.17.23",
"uuid": "^9.0.1",
"winston": "^3.17.0"
},
Expand Down
10 changes: 5 additions & 5 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": "2.0.0-beta.6",
"version": "2.0.0-beta.7",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"scripts": {
Expand All @@ -16,14 +16,14 @@
"test:report": "nyc --reporter=lcov mocha \"test/**/*.test.js\""
},
"dependencies": {
"@contentstack/cli-cm-seed": "~2.0.0-beta.6",
"@contentstack/cli-cm-seed": "~2.0.0-beta.7",
"@contentstack/cli-command": "~1.7.2",
"@contentstack/cli-utilities": "~1.17.2",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"@oclif/plugin-help": "^6.2.37",
"inquirer": "8.2.7",
"mkdirp": "^1.0.4",
"tar": "^7.5.6 "
"tar": "^7.5.7"
},
"devDependencies": {
"@oclif/test": "^4.1.13",
Expand All @@ -38,7 +38,7 @@
"mocha": "10.8.2",
"nyc": "^15.1.0",
"oclif": "^4.17.46",
"tmp": "^0.2.3",
"tmp": "^0.2.5",
"ts-node": "^8.10.2",
"typescript": "^4.9.5"
},
Expand Down
49 changes: 41 additions & 8 deletions packages/contentstack-bootstrap/src/bootstrap/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { cliux, pathValidator, sanitizePath } from '@contentstack/cli-utilities'
import { continueBootstrapCommand } from '../bootstrap/interactive';
import { AppConfig } from '../config';
import messageHandler from '../messages';
import { regions } from '@contentstack/cli-config/lib/utils/region-handler';

interface EnvironmentVariables {
api_key: string;
Expand Down Expand Up @@ -187,27 +188,59 @@ const envFileHandler = async (
const cdnHost = region?.cda?.substring('8');
const appHost = region?.uiHost?.substring(8);
const isUSRegion = regionName === 'us' || regionName === 'na';

const isPredefinedRegion = region?.name && Object.keys(regions).some(
key => key.toLowerCase() === region.name.toLowerCase()
);

if (regionName !== 'eu' && !isUSRegion) {
customHost = region?.cma?.substring(8);
}
let graphqlHost = "graphql.contentstack.com";
if(regionName != 'na'){
graphqlHost = `${regionName}-.graphql.contentstack.com`;
}


// Construct image hostname based on the actual host being used
let imageHostname = '*-images.contentstack.com'; // default fallback
if (region?.cda) {
const getGraphqlHost = (): string => {
if (!isPredefinedRegion) {
return cdnHost.replace('-cdn.', '-graphql.');
}
const normalizedRegion = regionName?.toLowerCase();
if (!normalizedRegion || normalizedRegion === 'na' || normalizedRegion === 'aws-na' || normalizedRegion === 'us') {
return cdnHost.replace('cdn.', 'graphql.').replace('.io', '.com');
}
return cdnHost.replace('-cdn.', '-graphql.');
};
const graphqlHost = getGraphqlHost();

let imageHostname: string;
if (isPredefinedRegion && region?.cda) {
const baseHost = region.cda.replace(/^https?:\/\//, '').replace(/^[^.]+\./, '');
imageHostname = `images.${baseHost}`;
} else if (region?.cda) {
const baseHost = region.cda.replace(/^https?:\/\//, '').replace(/^[^.]+\./, '');
imageHostname = `*-images.${baseHost}`;
} else {
//default
imageHostname = '*-images.contentstack.com';
}
const production = environmentVariables.environment === 'production' ? true : false;
switch (appConfigKey) {
case 'kickstart-next':
case 'kickstart-next-ssr':
case 'kickstart-next-ssg':
case 'kickstart-next-middleware':
fileName = `.env`;
filePath = pathValidator(path.join(sanitizePath(clonedDirectory), sanitizePath(fileName)));
content = `NEXT_PUBLIC_CONTENTSTACK_API_KEY=${environmentVariables.api_key
}\nNEXT_PUBLIC_CONTENTSTACK_DELIVERY_TOKEN=${environmentVariables.deliveryToken
}\nNEXT_PUBLIC_CONTENTSTACK_PREVIEW_TOKEN=${environmentVariables.preview_token || ''
}\nNEXT_PUBLIC_CONTENTSTACK_ENVIRONMENT=${environmentVariables.environment
}\nNEXT_PUBLIC_CONTENTSTACK_REGION=${regionName
}\nNEXT_PUBLIC_CONTENTSTACK_PREVIEW=${livePreviewEnabled ? 'true' : 'false'
}\nNEXT_PUBLIC_CONTENTSTACK_CONTENT_DELIVERY = ${cdnHost
}\nNEXT_PUBLIC_CONTENTSTACK_CONTENT_APPLICATION = ${appHost
}\nNEXT_PUBLIC_CONTENTSTACK_PREVIEW_HOST = ${previewHost
}\nNEXT_PUBLIC_CONTENTSTACK_IMAGE_HOSTNAME=${imageHostname}`;

result = await writeEnvFile(content, filePath);
break;
case 'kickstart-next-graphql':
fileName = `.env`;
filePath = pathValidator(path.join(sanitizePath(clonedDirectory), sanitizePath(fileName)));
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-branches/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@contentstack/cli-utilities": "~1.17.2",
"chalk": "^4.1.2",
"just-diff": "^6.0.2",
"lodash": "^4.17.21"
"lodash": "^4.17.23"
},
"devDependencies": {
"@contentstack/cli-dev-dependencies": "~1.3.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
"dependencies": {
"@colors/colors": "^1.6.0",
"@contentstack/cli-cm-export": "~2.0.0-beta.7",
"@contentstack/cli-cm-import": "~2.0.0-beta.6",
"@contentstack/cli-cm-import": "~2.0.0-beta.7",
"@contentstack/cli-command": "~1.7.2",
"@contentstack/cli-utilities": "~1.17.2",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"chalk": "^4.1.2",
"inquirer": "8.2.7",
"lodash": "^4.17.21",
"lodash": "^4.17.23",
"merge": "^2.1.1",
"ora": "^5.4.1",
"prompt": "^1.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@contentstack/utils": "~1.7.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"lodash": "^4.17.21"
"lodash": "^4.17.23"
},
"devDependencies": {
"@oclif/test": "^4.1.13",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-dev-dependencies/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"license": "MIT",
"dependencies": {
"@oclif/core": "^4.3.0",
"lodash": "^4.17.21",
"lodash": "^4.17.23",
"fancy-test": "^2.0.42",
"@oclif/test": "^4.1.13"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-export/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"big-json": "^3.2.0",
"bluebird": "^3.7.2",
"chalk": "^4.1.2",
"lodash": "^4.17.21",
"lodash": "^4.17.23",
"merge": "^2.1.1",
"mkdirp": "^1.0.4",
"progress-stream": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-import-setup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"big-json": "^3.2.0",
"chalk": "^4.1.2",
"fs-extra": "^11.3.0",
"lodash": "^4.17.21",
"lodash": "^4.17.23",
"merge": "^2.1.1",
"mkdirp": "^1.0.4",
"winston": "^3.17.0"
Expand Down
13 changes: 6 additions & 7 deletions packages/contentstack-import/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
{
"name": "@contentstack/cli-cm-import",
"description": "Contentstack CLI plugin to import content into stack",
"version": "2.0.0-beta.6",
"version": "2.0.0-beta.7",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-audit": "~1.17.1",
"@contentstack/cli-command": "~1.7.1",
"@contentstack/cli-command": "~1.7.2",
"@contentstack/cli-utilities": "~1.17.2",
"@contentstack/management": "~1.27.3",
"@contentstack/cli-variants": "~2.0.0-beta.4",
"@oclif/core": "^4.3.0",
"big-json": "^3.2.0",
"bluebird": "^3.7.2",
"chalk": "^4.1.2",
"debug": "^4.4.1",
"fs-extra": "^11.3.0",
"lodash": "^4.17.21",
"debug": "^4.4.3",
"fs-extra": "^11.3.3",
"lodash": "^4.17.23",
"marked": "^4.3.0",
"merge": "^2.1.1",
"mkdirp": "^1.0.4",
Expand All @@ -25,7 +24,7 @@
"winston": "^3.17.0"
},
"devDependencies": {
"@oclif/test": "^4.1.13",
"@oclif/test": "^4.1.16",
"@types/big-json": "^3.2.5",
"@types/bluebird": "^3.5.42",
"@types/fs-extra": "^11.0.4",
Expand Down
33 changes: 18 additions & 15 deletions packages/contentstack-import/src/import/modules/base-class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@ import isEmpty from 'lodash/isEmpty';
import entries from 'lodash/entries';
import isEqual from 'lodash/isEqual';
import omit from 'lodash/omit';
import { Stack } from '@contentstack/management/types/stack';
import { AssetData } from '@contentstack/management/types/stack/asset';
import { LocaleData } from '@contentstack/management/types/stack/locale';
import { PublishConfig } from '@contentstack/management/types/utility/publish';
import { FolderData } from '@contentstack/management/types/stack/asset/folder';
import { ExtensionData } from '@contentstack/management/types/stack/extension';
import { EnvironmentData } from '@contentstack/management/types/stack/environment';
import { LabelData } from '@contentstack/management/types/stack/label';
import { WebhookData } from '@contentstack/management/types/stack/webhook';
import { WorkflowData } from '@contentstack/management/types/stack/workflow';
import { RoleData } from '@contentstack/management/types/stack/role';
import { log, CLIProgressManager, configHandler } from '@contentstack/cli-utilities';

import {
log,
ManagementStack,
AssetData,
LocaleData,
PublishConfig,
FolderData,
ExtensionData,
EnvironmentData,
LabelData,
WebhookData,
WorkflowData,
RoleData,
CLIProgressManager,
configHandler
} from '@contentstack/cli-utilities';
import { ImportConfig, ModuleClassParams } from '../../types';
import cloneDeep from 'lodash/cloneDeep';

Expand Down Expand Up @@ -93,7 +96,7 @@ export type CustomPromiseHandlerInput = {
export type CustomPromiseHandler = (input: CustomPromiseHandlerInput) => Promise<any>;

export default abstract class BaseClass {
readonly client: Stack;
readonly client: ManagementStack;

public importConfig: ImportConfig;

Expand All @@ -107,7 +110,7 @@ export default abstract class BaseClass {
this.modulesConfig = importConfig.modules;
}

get stack(): Stack {
get stack(): ManagementStack {
return this.client;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,15 @@

import * as path from 'path';
import { isEmpty, cloneDeep } from 'lodash';
import { GlobalField } from '@contentstack/management/types/stack/globalField';
import { sanitizePath, log, handleAndLogError } from '@contentstack/cli-utilities';

import {
fsUtil,
import { sanitizePath, log, handleAndLogError, GlobalFieldData, GlobalField } from '@contentstack/cli-utilities';
import { fsUtil,
fileHelper,
lookupExtension,
removeReferenceFields,
PROCESS_NAMES,
MODULE_CONTEXTS,
PROCESS_STATUS,
MODULE_NAMES,
} from '../../utils';
MODULE_NAMES } from '../../utils';
import { ImportConfig, ModuleClassParams } from '../../types';
import BaseClass, { ApiOptions } from './base-class';
import { gfSchemaTemplate } from '../../utils/global-field-helper';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export default class ImportWorkflows extends BaseClass {
workflow: Record<string, any>,
newWorkflowStages: Record<string, any>[],
oldWorkflowStages: Record<string, any>[],
) {
): Promise<any> {
newWorkflowStages = map(newWorkflowStages, (newStage, index) => {
const oldStage = oldWorkflowStages[index];
if (!isEmpty(oldStage.next_available_stages)) {
Expand Down
17 changes: 8 additions & 9 deletions packages/contentstack-seed/package.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
{
"name": "@contentstack/cli-cm-seed",
"description": "create a Stack from existing content types, entries, assets, etc.",
"version": "2.0.0-beta.6",
"version": "2.0.0-beta.7",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-cm-import": "~2.0.0-beta.6",
"@contentstack/cli-cm-import": "~2.0.0-beta.7",
"@contentstack/cli-command": "~1.7.2",
"@contentstack/cli-utilities": "~1.17.2",
"@contentstack/management": "~1.27.3",
"inquirer": "8.2.7",
"mkdirp": "^1.0.4",
"tar": "^7.5.4",
"tmp": "^0.2.3"
"tar": "^7.5.7",
"tmp": "^0.2.5"
},
"devDependencies": {
"@types/inquirer": "^9.0.8",
"@types/inquirer": "^9.0.9",
"@types/jest": "^26.0.24",
"@types/mkdirp": "^1.0.2",
"@types/node": "^14.18.63",
"@types/tar": "^6.1.13",
"@types/tmp": "^0.2.6",
"axios": "^1.8.2",
"axios": "^1.13.5",
"eslint": "^8.57.1",
"eslint-config-oclif": "^6.0.62",
"eslint-config-oclif": "^6.0.137",
"eslint-config-oclif-typescript": "^3.1.14",
"jest": "^29.7.0",
"oclif": "^4.17.46",
"ts-jest": "^29.3.4",
"ts-jest": "^29.4.6",
"ts-node": "^8.10.2",
"typescript": "^4.9.5"
},
Expand Down
5 changes: 2 additions & 3 deletions packages/contentstack-seed/src/seed/contentstack/client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import ContentstackError from './error';
import { managementSDKClient, configHandler } from '@contentstack/cli-utilities';
import * as ContentstackManagementSDK from '@contentstack/management';
import { managementSDKClient, configHandler, ContentstackClient as ContentstackAPIClient } from '@contentstack/cli-utilities';

export interface Organization {
uid: string;
Expand Down Expand Up @@ -44,7 +43,7 @@ export interface createManagementTokenOptions{
}

export default class ContentstackClient {
instance: Promise<ContentstackManagementSDK.ContentstackClient>;
instance: Promise<ContentstackAPIClient>;

limit: number;

Expand Down
10 changes: 5 additions & 5 deletions packages/contentstack-utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@
"author": "contentstack",
"license": "MIT",
"dependencies": {
"@contentstack/management": "~1.27.3",
"@contentstack/marketplace-sdk": "^1.4.0",
"@contentstack/management": "~1.27.5",
"@contentstack/marketplace-sdk": "^1.5.0",
"@oclif/core": "^4.3.0",
"axios": "^1.9.0",
"axios": "^1.13.5",
"chalk": "^4.1.2",
"cli-cursor": "^3.1.0",
"cli-progress": "^3.12.0",
"cli-table": "^0.3.11",
"conf": "^10.2.0",
"dotenv": "^16.5.0",
"dotenv": "^16.6.1",
"figures": "^3.2.0",
"inquirer": "8.2.7",
"inquirer-search-checkbox": "^1.0.0",
"inquirer-search-list": "^1.2.6",
"js-yaml": "^4.1.1",
"klona": "^2.0.6",
"lodash": "^4.17.21",
"lodash": "^4.17.23",
"mkdirp": "^1.0.4",
"open": "^8.4.2",
"ora": "^5.4.1",
Expand Down
Loading
Loading