Skip to content

Commit f256226

Browse files
update import setup
1 parent feffa46 commit f256226

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

packages/contentstack-import-setup/src/commands/cm/stacks/import-setup.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,18 @@ export default class ImportSetupCommand extends Command {
109109
}
110110
}
111111

112+
113+
// Create import setup context object
114+
private createImportSetupContext(apiKey: string, authenticationMethod?: string, module?: string): Context {
115+
return {
116+
command: this.context?.info?.command || 'cm:stacks:import-setup',
117+
module: module || '',
118+
userId: configHandler.get('userUid') || undefined,
119+
email: configHandler.get('email') || undefined,
120+
sessionId: this.context?.sessionId,
121+
apiKey: apiKey || '',
122+
orgId: configHandler.get('oauthOrgUid') || '',
123+
authenticationMethod: authenticationMethod || 'Basic Auth',
124+
};
125+
}
112126
}

packages/contentstack-import-setup/src/types/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,12 @@ export type TaxonomyQueryParams = {
154154
};
155155

156156
export interface Context {
157+
command: string;
157158
module: string;
159+
userId: string | undefined;
160+
email: string | undefined;
161+
sessionId: string | undefined;
162+
apiKey: string;
163+
orgId: string;
164+
authenticationMethod?: string;
158165
}

0 commit comments

Comments
 (0)