Skip to content

Commit 66ed229

Browse files
committed
fix: talisman issues
1 parent ccff42a commit 66ed229

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

.talismanrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,8 @@ fileignoreconfig:
158158
checksum: 9ee0a01dbdffa71a972cc8e64c24a219731e27d3c98b4607e2114337a3ebbf94
159159
- filename: packages/contentstack-import/src/utils/extension-helper.ts
160160
checksum: 147ffe7069333c30a20e63f3dcfde3c4f359748f82a8b9a071adc0361a968814
161+
- filename: packages/contentstack-import/src/commands/cm/stacks/import.ts
162+
checksum: 5290d129c6fff85450e862a4df9669492f805503cef1825c1f3bcbf9c9818d5e
163+
- filename: packages/contentstack-export/src/commands/cm/stacks/export.ts
164+
checksum: 23277452f504a246c27b58e1b69fc1d8855ec301c60b4cae60c1e8f865794926
161165
version: "1.0"

packages/contentstack-export/src/commands/cm/stacks/export.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ export default class ExportCommand extends Command {
112112
const { flags } = await this.parse(ExportCommand);
113113
const exportConfig = await setupExportConfig(flags);
114114
// Prepare the context object
115-
const stackKey = exportConfig.apiKey || exportConfig.source_stack;
116-
const context = this.createExportContext(stackKey, exportConfig.authenticationMethod);
115+
const context = this.createExportContext(exportConfig.apiKey, exportConfig.authenticationMethod);
117116
exportConfig.context = { ...context };
118117
log.info(`Using Cli Version: ${this.context?.plugin?.version}`, exportConfig.context);
119118

@@ -140,14 +139,14 @@ export default class ExportCommand extends Command {
140139
}
141140

142141
// Create export context object
143-
private createExportContext(stackKey: string, authenticationMethod?: string): Context {
142+
private createExportContext(apiKey: string, authenticationMethod?: string): Context {
144143
return {
145144
command: this.context.info.command,
146145
module: '',
147146
userId: configHandler.get('userUid'),
148147
email: configHandler.get('email'),
149148
sessionId: this.context.sessionId,
150-
apiKey: stackKey || '',
149+
apiKey: apiKey || '',
151150
orgId: configHandler.get('oauthOrgUid') || '',
152151
authenticationMethod: authenticationMethod || 'Basic Auth',
153152
};

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ export default class ImportCommand extends Command {
148148
const { flags } = await this.parse(ImportCommand);
149149
let importConfig: ImportConfig = await setupImportConfig(flags);
150150
// Prepare the context object
151-
const stackKey = importConfig.apiKey
152-
const context = this.createImportContext(stackKey, importConfig.authenticationMethod);
151+
const context = this.createImportContext(importConfig.apiKey, importConfig.authenticationMethod);
153152
importConfig.context = {...context};
154153
log.info(`Using Cli Version: ${this.context?.plugin?.version}`, importConfig.context);
155154

@@ -195,14 +194,14 @@ export default class ImportCommand extends Command {
195194
}
196195

197196
// Create export context object
198-
private createImportContext(stackKey: string, authenticationMethod?: string): Context {
197+
private createImportContext(apiKey: string, authenticationMethod?: string): Context {
199198
return {
200199
command: this.context.info.command,
201200
module: '',
202201
userId: configHandler.get('userUid'),
203202
email: configHandler.get('email'),
204203
sessionId: this.context.sessionId,
205-
apiKey: stackKey || '',
204+
apiKey: apiKey || '',
206205
orgId: configHandler.get('oauthOrgUid') || '',
207206
authenticationMethod: authenticationMethod || 'Basic Auth',
208207
};

0 commit comments

Comments
 (0)