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
527 changes: 276 additions & 251 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion packages/contentstack-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"@contentstack/cli-audit": "~1.17.1",
"@contentstack/cli-command": "~1.7.2",
"@contentstack/cli-utilities": "~1.17.2",
"@contentstack/management": "~1.27.5",
"@contentstack/cli-variants": "~1.3.7",
"@oclif/core": "^4.3.0",
"big-json": "^3.2.0",
Expand Down
30 changes: 16 additions & 14 deletions packages/contentstack-import/src/import/modules/base-class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ 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 } from '@contentstack/cli-utilities';
import {
log,
ManagementStack,
AssetData,
LocaleData,
PublishConfig,
FolderData,
ExtensionData,
EnvironmentData,
LabelData,
WebhookData,
WorkflowData,
RoleData,
} from '@contentstack/cli-utilities';
import { ImportConfig, ModuleClassParams } from '../../types';
import cloneDeep from 'lodash/cloneDeep';

Expand Down Expand Up @@ -85,7 +87,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 @@ -97,7 +99,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,8 +7,7 @@

import * as path from 'path';
import { isEmpty, cloneDeep } from 'lodash';
import { cliux, sanitizePath, log, handleAndLogError } from '@contentstack/cli-utilities';
import { GlobalFieldData, GlobalField } from '@contentstack/management/types/stack/globalField';
import { cliux, sanitizePath, log, handleAndLogError, GlobalFieldData, GlobalField } from '@contentstack/cli-utilities';
import { fsUtil,fileHelper, lookupExtension, removeReferenceFields } from '../../utils';
import { ImportConfig, ModuleClassParams } from '../../types';
import BaseClass, { ApiOptions } from './base-class';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,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
1 change: 0 additions & 1 deletion packages/contentstack-seed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"@contentstack/cli-cm-import": "~1.31.3",
"@contentstack/cli-command": "~1.7.2",
"@contentstack/cli-utilities": "~1.17.2",
"@contentstack/management": "~1.27.5",
"inquirer": "8.2.7",
"mkdirp": "^1.0.4",
"tar": "^7.5.7",
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
1 change: 1 addition & 0 deletions packages/contentstack-utilities/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export {
ContentstackClient,
ContentstackConfig,
} from './contentstack-management-sdk';
export * from './management-types';
export { default as printFlagDeprecation } from './flag-deprecation-check';
export * from './http-client';
export * from './fs-utility';
Expand Down
16 changes: 16 additions & 0 deletions packages/contentstack-utilities/src/management-types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* Re-export of @contentstack/management types for CLI consumers.
* Import these from @contentstack/cli-utilities instead of @contentstack/management.
*/
export type { Stack as ManagementStack } from '@contentstack/management/types/stack';
export type { AssetData } from '@contentstack/management/types/stack/asset';
export type { LocaleData } from '@contentstack/management/types/stack/locale';
export type { PublishConfig } from '@contentstack/management/types/utility/publish';
export type { FolderData } from '@contentstack/management/types/stack/asset/folder';
export type { ExtensionData } from '@contentstack/management/types/stack/extension';
export type { EnvironmentData } from '@contentstack/management/types/stack/environment';
export type { LabelData } from '@contentstack/management/types/stack/label';
export type { WebhookData } from '@contentstack/management/types/stack/webhook';
export type { WorkflowData } from '@contentstack/management/types/stack/workflow';
export type { RoleData } from '@contentstack/management/types/stack/role';
export type { GlobalFieldData, GlobalField } from '@contentstack/management/types/stack/globalField';
Loading
Loading