sf-plugin-cms 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/README.md +116 -13
  2. package/lib/{commands/cms/command-base.d.ts → command-base.d.ts} +2 -1
  3. package/lib/{commands/cms/command-base.js → command-base.js} +3 -0
  4. package/lib/command-base.js.map +1 -0
  5. package/lib/commands/cms/export/workspace.d.ts +12 -5
  6. package/lib/commands/cms/export/workspace.js +102 -11
  7. package/lib/commands/cms/export/workspace.js.map +1 -1
  8. package/lib/commands/cms/get/channel.d.ts +1 -1
  9. package/lib/commands/cms/get/channel.js +1 -1
  10. package/lib/commands/cms/get/channel.js.map +1 -1
  11. package/lib/commands/cms/get/content.d.ts +1 -1
  12. package/lib/commands/cms/get/content.js +1 -1
  13. package/lib/commands/cms/get/content.js.map +1 -1
  14. package/lib/commands/cms/get/variant.d.ts +1 -1
  15. package/lib/commands/cms/get/variant.js +1 -1
  16. package/lib/commands/cms/get/variant.js.map +1 -1
  17. package/lib/commands/cms/get/workspace.d.ts +1 -1
  18. package/lib/commands/cms/get/workspace.js +1 -1
  19. package/lib/commands/cms/get/workspace.js.map +1 -1
  20. package/lib/commands/cms/import/workspace.d.ts +7 -4
  21. package/lib/commands/cms/import/workspace.js +121 -35
  22. package/lib/commands/cms/import/workspace.js.map +1 -1
  23. package/lib/commands/cms/info.d.ts +11 -10
  24. package/lib/commands/cms/info.js +123 -8
  25. package/lib/commands/cms/info.js.map +1 -1
  26. package/lib/commands/cms/list/channel.d.ts +1 -1
  27. package/lib/commands/cms/list/channel.js +1 -1
  28. package/lib/commands/cms/list/channel.js.map +1 -1
  29. package/lib/commands/cms/list/workspace.d.ts +1 -1
  30. package/lib/commands/cms/list/workspace.js +1 -1
  31. package/lib/commands/cms/list/workspace.js.map +1 -1
  32. package/lib/contracts/info.d.ts +43 -0
  33. package/lib/contracts/info.js +69 -0
  34. package/lib/contracts/info.js.map +1 -0
  35. package/lib/contracts/shared.d.ts +81 -0
  36. package/lib/contracts/shared.js +218 -0
  37. package/lib/contracts/shared.js.map +1 -0
  38. package/lib/contracts/workspace-export.d.ts +91 -0
  39. package/lib/contracts/workspace-export.js +324 -0
  40. package/lib/contracts/workspace-export.js.map +1 -0
  41. package/lib/contracts/workspace-import.d.ts +46 -0
  42. package/lib/contracts/workspace-import.js +108 -0
  43. package/lib/contracts/workspace-import.js.map +1 -0
  44. package/lib/index.d.ts +1 -1
  45. package/lib/services/bulk-export-workspaces.d.ts +25 -0
  46. package/lib/services/bulk-export-workspaces.js +272 -0
  47. package/lib/services/bulk-export-workspaces.js.map +1 -0
  48. package/lib/services/export-references.d.ts +21 -0
  49. package/lib/services/export-references.js +150 -0
  50. package/lib/services/export-references.js.map +1 -0
  51. package/lib/services/export-workspace.d.ts +10 -22
  52. package/lib/services/export-workspace.js +68 -2
  53. package/lib/services/export-workspace.js.map +1 -1
  54. package/lib/services/import-workspace.d.ts +7 -3
  55. package/lib/services/import-workspace.js +224 -96
  56. package/lib/services/import-workspace.js.map +1 -1
  57. package/lib/services/resolve-workspace.d.ts +5 -0
  58. package/lib/services/resolve-workspace.js +56 -47
  59. package/lib/services/resolve-workspace.js.map +1 -1
  60. package/messages/cms.export.workspace.md +22 -4
  61. package/messages/cms.import.workspace.md +8 -2
  62. package/messages/cms.info.md +21 -0
  63. package/package.json +3 -2
  64. package/lib/commands/cms/command-base.js.map +0 -1
@@ -1,17 +1,24 @@
1
1
  import { Flags } from '@salesforce/sf-plugins-core';
2
+ import { assertWorkspaceImportResult, WORKSPACE_IMPORT_CONTRACT, } from '../../../contracts/workspace-import.js';
3
+ import { assertCmsEnvelope, sanitizeDiagnostics, } from '../../../contracts/shared.js';
2
4
  import { executeWorkspaceImport, loadWorkspaceExport, } from '../../../services/import-workspace.js';
3
5
  import { assertWorkspaceSelector, resolveWorkspace } from '../../../services/resolve-workspace.js';
4
- import { apiVersionFlag, CmsCommand, targetOrgFlag } from '../command-base.js';
6
+ import { apiVersionFlag, CmsCommand, targetOrgFlag } from '../../../command-base.js';
5
7
  export default class ImportWorkspace extends CmsCommand {
6
8
  static summary = 'Safely plan or apply a create-only import into a CMS workspace.';
7
9
  static description = 'Validates the source workspace export locally before any org request, selects one destination workspace by exact ID or exact case-sensitive name, checks every content key for conflicts, and defaults to a non-mutating dry run. Pass --apply with a new --report-dir to create content.';
8
10
  static examples = [
9
11
  '<%= config.bin %> cms import workspace --target-org my-org --workspace-name "Destination" --source-dir ./cms/Source',
10
- '<%= config.bin %> cms import workspace --target-org my-org --workspace-id 0Zu... --source-dir ./cms/Source --apply --report-dir ./cms-import-report',
12
+ '<%= config.bin %> cms import workspace --target-org my-org --workspace-id 0Zu... --source-dir ./cms/Source --apply --report-dir ./cms-import-report --contract-version 1 --json',
11
13
  ];
12
14
  static flags = {
13
15
  'target-org': targetOrgFlag,
14
16
  'api-version': apiVersionFlag,
17
+ 'contract-version': Flags.integer({
18
+ default: 1,
19
+ min: 1,
20
+ summary: 'Machine contract major version (supported: 1).',
21
+ }),
15
22
  'workspace-id': Flags.string({ summary: 'Exact destination CMS workspace ID.' }),
16
23
  'workspace-name': Flags.string({ summary: 'Exact case-sensitive destination workspace name.' }),
17
24
  'source-dir': Flags.directory({
@@ -35,49 +42,128 @@ export default class ImportWorkspace extends CmsCommand {
35
42
  };
36
43
  async run() {
37
44
  const { flags } = await this.parse(ImportWorkspace);
45
+ const requestedVersion = flags['contract-version'] ?? 1;
46
+ if (requestedVersion !== 1) {
47
+ return this.finish(envelope('blocked', flags['api-version'], 'unresolved-org', null, [
48
+ {
49
+ code: 'UNSUPPORTED_CONTRACT_VERSION',
50
+ message: `Contract major ${requestedVersion} is unsupported; supported major is 1.`,
51
+ retryable: false,
52
+ },
53
+ ]));
54
+ }
38
55
  if (flags.apply && flags['report-dir'] === undefined) {
39
- throw new Error('--report-dir is required when --apply is set.');
56
+ return this.finish(envelope('blocked', flags['api-version'], 'unresolved-org', null, [
57
+ {
58
+ code: 'REPORT_DIRECTORY_REQUIRED',
59
+ message: '--report-dir is required when --apply is set.',
60
+ retryable: false,
61
+ },
62
+ ]));
63
+ }
64
+ let source;
65
+ try {
66
+ source = await loadWorkspaceExport(flags['source-dir'], {
67
+ allowPartial: flags['allow-partial'],
68
+ });
69
+ assertWorkspaceSelector({
70
+ workspaceId: flags['workspace-id'],
71
+ workspaceName: flags['workspace-name'],
72
+ });
73
+ }
74
+ catch (error) {
75
+ const message = error instanceof Error ? error.message : String(error);
76
+ const packageVersionFailure = /manifest contract\/version is unsupported|schemaVersion\/mode is unsupported/u.test(message);
77
+ return this.finish(envelope('blocked', flags['api-version'], 'unresolved-org', null, [
78
+ {
79
+ code: packageVersionFailure
80
+ ? 'UNSUPPORTED_PACKAGE_VERSION'
81
+ : 'PACKAGE_VALIDATION_FAILED',
82
+ message,
83
+ retryable: false,
84
+ },
85
+ ]));
40
86
  }
41
- // Reject malformed, unsafe, or disallowed partial packages before contacting the org.
42
- await loadWorkspaceExport(flags['source-dir'], { allowPartial: flags['allow-partial'] });
43
- const selector = {
44
- workspaceId: flags['workspace-id'],
45
- workspaceName: flags['workspace-name'],
46
- };
47
- assertWorkspaceSelector(selector);
48
87
  const { connection, orgId } = await this.getOrgContext(flags['target-org'], flags['api-version']);
49
- const selected = await resolveWorkspace(connection, selector);
50
- const result = await executeWorkspaceImport({
51
- allowPartial: flags['allow-partial'],
52
- connection,
53
- destinationOrgId: orgId,
54
- destinationWorkspace: selected.workspace,
55
- dryRun: !flags.apply,
56
- reportDirectory: flags['report-dir'],
57
- sourceDirectory: flags['source-dir'],
58
- workspaceId: selected.id,
59
- });
60
- if (!this.jsonEnabled())
61
- this.showPlan(result);
88
+ try {
89
+ const selected = await resolveWorkspace(connection, {
90
+ workspaceId: flags['workspace-id'],
91
+ workspaceName: flags['workspace-name'],
92
+ });
93
+ const execution = await executeWorkspaceImport({
94
+ allowPartial: flags['allow-partial'],
95
+ connection,
96
+ destinationOrgId: orgId,
97
+ destinationWorkspace: selected.workspace,
98
+ dryRun: !flags.apply,
99
+ loadedSource: source,
100
+ reportDirectory: flags['report-dir'],
101
+ sourceDirectory: flags['source-dir'],
102
+ workspaceId: selected.id,
103
+ });
104
+ const status = source.isPartial ? 'partial' : 'success';
105
+ const result = envelope(status, flags['api-version'], orgId, execution.contractResult, []);
106
+ if (!this.jsonEnabled())
107
+ this.showPlan(execution, result);
108
+ return this.finish(result);
109
+ }
110
+ catch (error) {
111
+ return this.finish(envelope('failed', flags['api-version'], orgId, null, [
112
+ {
113
+ code: 'IMPORT_FAILED',
114
+ message: error instanceof Error ? error.message : String(error),
115
+ retryable: false,
116
+ },
117
+ ]));
118
+ }
119
+ }
120
+ finish(result) {
121
+ assertCmsEnvelope(result, assertWorkspaceImportResult);
122
+ if (result.status === 'success')
123
+ process.exitCode = 0;
124
+ else if (result.status === 'partial')
125
+ process.exitCode = 2;
126
+ else
127
+ process.exitCode = 1;
62
128
  return result;
63
129
  }
64
- showPlan(result) {
65
- const primaryCount = result.plan.groups.length;
66
- const variantCount = result.plan.groups.reduce((count, group) => count + group.variants.length, 0);
67
- this.log(`Mode: ${result.dryRun ? 'dry-run (no mutations)' : 'apply (create-only)'}`);
68
- this.log(`Destination workspace: ${result.plan.destinationWorkspaceId}`);
69
- this.log(`Destination root folder: ${result.plan.rootFolderId}`);
130
+ showPlan(execution, envelopeResult) {
131
+ const primaryCount = execution.plan.groups.length;
132
+ const variantCount = execution.plan.groups.reduce((count, group) => count + group.variants.length, 0);
133
+ this.log(`Status: ${envelopeResult.status}`);
134
+ this.log(`Mode: ${execution.dryRun ? 'dry-run (no mutations)' : 'apply (create-only)'}`);
135
+ this.log(`Destination workspace: ${execution.plan.destinationWorkspaceId}`);
136
+ this.log(`Destination root folder: ${execution.plan.rootFolderId}`);
70
137
  this.log(`Planned new content: ${primaryCount} parent(s), ${variantCount} child variant(s)`);
71
- for (const group of result.plan.groups) {
72
- const childLanguages = group.variants.map(({ language }) => language).join(', ') || 'none';
73
- this.log(`- ${group.contentKey}: primary ${group.primary.language}; child languages ${childLanguages}`);
74
- }
75
- if (result.dryRun) {
138
+ this.log(`Resolved mappings: ${execution.contractResult.mappings.length}`);
139
+ this.log(`Explicit unresolved/unsupported references: ${execution.contractResult.references.length}`);
140
+ if (execution.dryRun) {
76
141
  this.log('No content was created. Re-run with --apply and a new --report-dir to mutate.');
77
142
  }
78
143
  else {
79
- this.log(`Run report: ${result.reportFile ?? ''}`);
144
+ this.log(`Run report: ${execution.reportFile ?? ''}`);
80
145
  }
81
146
  }
82
147
  }
148
+ function envelope(status, apiVersion, orgId, result, errors) {
149
+ return {
150
+ contract: WORKSPACE_IMPORT_CONTRACT,
151
+ contractVersion: '1.0.0',
152
+ status,
153
+ metadata: {
154
+ operation: 'workspace.import',
155
+ plugin: { name: 'sf-plugin-cms', version: '0.3.0' },
156
+ apiVersion,
157
+ },
158
+ diagnostics: { warnings: [], errors: sanitizeDiagnostics(errors, 'diagnostics.errors') },
159
+ provenance: {
160
+ producer: 'sf-plugin-cms',
161
+ sourceOrgId: orgId,
162
+ pluginVersion: '0.3.0',
163
+ command: 'sf cms import workspace',
164
+ generatedAt: new Date().toISOString(),
165
+ },
166
+ result,
167
+ };
168
+ }
83
169
  //# sourceMappingURL=workspace.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../src/commands/cms/import/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EACL,sBAAsB,EACtB,mBAAmB,GAEpB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE/E,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAiC;IACrE,MAAM,CAAU,OAAO,GAC5B,iEAAiE,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AE,EAAE,MAAM,EAAE,mBAAmB,CAAC,MAAM,EAAE,oBAAoB,CAAC,EAAE;QACxF,UAAU,EAAE;YACV,QAAQ,EAAE,eAAe;YACzB,WAAW,EAAE,KAAK;YAClB,aAAa,EAAE,OAAO;YACtB,OAAO,EAAE,yBAAyB;YAClC,WAAW,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACtC;QACD,MAAM;KACP,CAAC;AACJ,CAAC"}
@@ -1,12 +1,13 @@
1
- import { SfCommand } from '@salesforce/sf-plugins-core';
2
- export type InfoResult = {
3
- name: string;
4
- status: 'scaffold';
5
- };
6
- /** Reports that the CMS plugin scaffold is installed. */
7
- export default class Info extends SfCommand<InfoResult> {
8
- static readonly summary = "Show CMS plugin scaffold information.";
9
- static readonly description = "Confirms that the sf-plugin-cms command entrypoint can be loaded without making org calls.";
1
+ import { type CmsInfoResult } from '../../contracts/info.js';
2
+ import { type CmsEnvelope } from '../../contracts/shared.js';
3
+ import { CmsCommand } from '../../command-base.js';
4
+ /** Reports the offline CMS CLI contract and capability envelope. */
5
+ export default class Info extends CmsCommand<CmsEnvelope<CmsInfoResult>> {
6
+ static readonly summary = "Show offline CMS contract and capability information.";
7
+ static readonly description = "Reports the versioned CLI JSON contracts, package compatibility, tested API baseline, and truthfully evidenced CMS capabilities without contacting an org.";
10
8
  static readonly examples: string[];
11
- run(): Promise<InfoResult>;
9
+ static readonly flags: {
10
+ 'contract-version': import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
11
+ };
12
+ run(): Promise<CmsEnvelope<CmsInfoResult>>;
12
13
  }
@@ -1,13 +1,128 @@
1
- import { SfCommand } from '@salesforce/sf-plugins-core';
2
- /** Reports that the CMS plugin scaffold is installed. */
3
- export default class Info extends SfCommand {
4
- static summary = 'Show CMS plugin scaffold information.';
5
- static description = 'Confirms that the sf-plugin-cms command entrypoint can be loaded without making org calls.';
6
- static examples = ['<%= config.bin %> cms info'];
1
+ import { Flags } from '@salesforce/sf-plugins-core';
2
+ import { assertCmsInfoResult, CMS_INFO_CONTRACT, } from '../../contracts/info.js';
3
+ import { assertCmsEnvelope } from '../../contracts/shared.js';
4
+ import { CmsCommand } from '../../command-base.js';
5
+ const PLUGIN_VERSION = '0.3.0';
6
+ /** Reports the offline CMS CLI contract and capability envelope. */
7
+ export default class Info extends CmsCommand {
8
+ static summary = 'Show offline CMS contract and capability information.';
9
+ static description = 'Reports the versioned CLI JSON contracts, package compatibility, tested API baseline, and truthfully evidenced CMS capabilities without contacting an org.';
10
+ static examples = [
11
+ '<%= config.bin %> cms info',
12
+ '<%= config.bin %> cms info --json',
13
+ '<%= config.bin %> cms info --contract-version 1 --json',
14
+ ];
15
+ static flags = {
16
+ 'contract-version': Flags.integer({
17
+ default: 1,
18
+ min: 1,
19
+ summary: 'Machine contract major version (supported: 1).',
20
+ }),
21
+ };
7
22
  async run() {
8
- const result = { name: 'sf-plugin-cms', status: 'scaffold' };
9
- this.logJson(result);
23
+ const { flags } = await this.parse(Info);
24
+ const requestedVersion = flags['contract-version'] ?? 1;
25
+ const result = requestedVersion === 1 ? successEnvelope() : blockedEnvelope(requestedVersion);
26
+ assertCmsEnvelope(result, assertCmsInfoResult);
27
+ if (!this.jsonEnabled())
28
+ this.styledJSON(result);
29
+ process.exitCode = result.status === 'success' ? 0 : 1;
10
30
  return result;
11
31
  }
12
32
  }
33
+ function successEnvelope() {
34
+ return {
35
+ contract: CMS_INFO_CONTRACT,
36
+ contractVersion: '1.0.0',
37
+ status: 'success',
38
+ metadata: {
39
+ operation: 'cms.info',
40
+ plugin: { name: 'sf-plugin-cms', version: PLUGIN_VERSION },
41
+ apiVersion: null,
42
+ },
43
+ diagnostics: { warnings: [], errors: [] },
44
+ provenance: {
45
+ producer: 'sf-plugin-cms',
46
+ sourceOrgId: 'offline',
47
+ pluginVersion: PLUGIN_VERSION,
48
+ command: 'sf cms info',
49
+ generatedAt: new Date().toISOString(),
50
+ },
51
+ result: {
52
+ plugin: { name: 'sf-plugin-cms', version: PLUGIN_VERSION },
53
+ api: { defaultVersion: '67.0', testedVersions: ['67.0'] },
54
+ contracts: {
55
+ commandResults: {
56
+ info: ['1.0.0'],
57
+ workspaceExportSet: ['1.0.0'],
58
+ workspaceImport: ['1.0.0'],
59
+ },
60
+ packageManifests: { workspaceExport: ['1.0.0'] },
61
+ embeddedResults: {
62
+ externalReferenceCorrelations: ['sf-cms-external-reference-correlations@1'],
63
+ },
64
+ compatibility: {
65
+ 'workspaceExportSet@1': { workspaceExportManifestMajors: [1] },
66
+ 'workspaceImport@1': { workspaceExportManifestMajors: [1] },
67
+ },
68
+ },
69
+ capabilities: [
70
+ {
71
+ id: 'workspace.export.bulk',
72
+ state: 'implemented',
73
+ transport: 'cli-json',
74
+ contract: 'sf-cms-workspace-export-set@1',
75
+ },
76
+ {
77
+ id: 'workspace.export.dependency-closure',
78
+ state: 'unavailable',
79
+ transport: 'cli-json',
80
+ contract: 'unavailable',
81
+ },
82
+ {
83
+ id: 'workspace.export.external-reference-correlation',
84
+ state: 'experimental',
85
+ transport: 'cli-json',
86
+ contract: 'sf-cms-external-reference-correlations@1',
87
+ },
88
+ {
89
+ id: 'workspace.import.mapping',
90
+ state: 'experimental',
91
+ transport: 'cli-json',
92
+ contract: 'sf-cms-workspace-import@1',
93
+ },
94
+ ],
95
+ },
96
+ };
97
+ }
98
+ function blockedEnvelope(requestedVersion) {
99
+ return {
100
+ contract: CMS_INFO_CONTRACT,
101
+ contractVersion: '1.0.0',
102
+ status: 'blocked',
103
+ metadata: {
104
+ operation: 'cms.info',
105
+ plugin: { name: 'sf-plugin-cms', version: PLUGIN_VERSION },
106
+ apiVersion: null,
107
+ },
108
+ diagnostics: {
109
+ warnings: [],
110
+ errors: [
111
+ {
112
+ code: 'UNSUPPORTED_CONTRACT_VERSION',
113
+ message: `Contract major ${requestedVersion} is unsupported; supported major is 1.`,
114
+ retryable: false,
115
+ },
116
+ ],
117
+ },
118
+ provenance: {
119
+ producer: 'sf-plugin-cms',
120
+ sourceOrgId: 'offline',
121
+ pluginVersion: PLUGIN_VERSION,
122
+ command: 'sf cms info',
123
+ generatedAt: new Date().toISOString(),
124
+ },
125
+ result: null,
126
+ };
127
+ }
13
128
  //# sourceMappingURL=info.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"info.js","sourceRoot":"","sources":["../../../src/commands/cms/info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAOxD,yDAAyD;AACzD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,SAAqB;IAC9C,MAAM,CAAU,OAAO,GAAG,uCAAuC,CAAC;IAClE,MAAM,CAAU,WAAW,GAChC,4FAA4F,CAAC;IACxF,MAAM,CAAU,QAAQ,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAE1D,KAAK,CAAC,GAAG;QACd,MAAM,MAAM,GAAe,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;QACzE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACrB,OAAO,MAAM,CAAC;IAChB,CAAC"}
1
+ {"version":3,"file":"info.js","sourceRoot":"","sources":["../../../src/commands/cms/info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EACL,mBAAmB,EACnB,iBAAiB,GAElB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAoB,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,cAAc,GAAG,OAAO,CAAC;AAE/B,oEAAoE;AACpE,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,UAAsC;IAC/D,MAAM,CAAU,OAAO,GAAG,uDAAuD,CAAC;IAClF,MAAM,CAAU,WAAW,GAChC,4JAA4J,CAAC;IACxJ,MAAM,CAAU,QAAQ,GAAG;QAChC,4B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J,CAAC;AAED,SAAS,eAAe,CAAC,gBAAwB;IAC/C,OAAO;QACL,QAAQ,EAAE,iBAAiB;QAC3B,eAAe,EAAE,OAAO;QACxB,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE;YACR,SAAS,EAAE,UAAU;YACrB,MAAM,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,EAAE;YAC1D,UAAU,EAAE,IAAI;SACjB;QACD,WAAW,EAAE;YACX,QAAQ,EAAE,EAAE;YACZ,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,8BAA8B;oBACpC,OAAO,EAAE,kBAAkB,gBAAgB,wCAAwC;oBACnF,SAAS,EAAE,KAAK;iBACjB;aACF;SACF;QACD,UAAU,EAAE;YACV,QAAQ,EAAE,eAAe;YACzB,WAAW,EAAE,SAAS;YACtB,aAAa,EAAE,cAAc;YAC7B,OAAO,EAAE,aAAa;YACtB,WAAW,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACtC;QACD,MAAM,EAAE,IAAI;KACb,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { type CmsPage } from '../../../services/read.js';
2
- import { CmsCommand } from '../command-base.js';
2
+ import { CmsCommand } from '../../../command-base.js';
3
3
  export default class ListChannel extends CmsCommand<CmsPage> {
4
4
  static readonly summary = "List channels assigned to a CMS workspace.";
5
5
  static readonly description = "Retrieves one page of channels for an explicit workspace.";
@@ -1,6 +1,6 @@
1
1
  import { Flags } from '@salesforce/sf-plugins-core';
2
2
  import { listWorkspaceChannels } from '../../../services/read.js';
3
- import { apiVersionFlag, CmsCommand, pageFlag, pageSizeFlag, targetOrgFlag, } from '../command-base.js';
3
+ import { apiVersionFlag, CmsCommand, pageFlag, pageSizeFlag, targetOrgFlag, } from '../../../command-base.js';
4
4
  export default class ListChannel extends CmsCommand {
5
5
  static summary = 'List channels assigned to a CMS workspace.';
6
6
  static description = 'Retrieves one page of channels for an explicit workspace.';
@@ -1 +1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IAChB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { type CmsPage } from '../../../services/read.js';
2
- import { CmsCommand } from '../command-base.js';
2
+ import { CmsCommand } from '../../../command-base.js';
3
3
  export default class ListWorkspace extends CmsCommand<CmsPage> {
4
4
  static readonly summary = "List Marketing Cloud CMS workspaces.";
5
5
  static readonly description = "Lists one bounded page of CMS workspaces through the authenticated Salesforce connection.";
@@ -1,6 +1,6 @@
1
1
  import { Flags } from '@salesforce/sf-plugins-core';
2
2
  import { listWorkspaces } from '../../../services/read.js';
3
- import { apiVersionFlag, CmsCommand, pageFlag, pageSizeFlag, targetOrgFlag, } from '../command-base.js';
3
+ import { apiVersionFlag, CmsCommand, pageFlag, pageSizeFlag, targetOrgFlag, } from '../../../command-base.js';
4
4
  export default class ListWorkspace extends CmsCommand {
5
5
  static summary = 'List Marketing Cloud CMS workspaces.';
6
6
  static description = 'Lists one bounded page of CMS workspaces through the authenticated Salesforce connection.';
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../src/commands/cms/list/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,cAAc,EAAgB,MAAM,2BAA2B,CAAC;AACzE,OAAO,EACL,cAAc,EACd,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,aAAa,GACd,MAAM,oBAAoB,CAAC;AAE5B,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,UAAmB;IACrD,MAAM,CAAU,OAAO,GAAG,sCAAsC,CAAC;IACjE,MAAM,CAAU,WAAW,GAChC,2FAA2F,CAAC;IACvF,MAAM,CAAU,QAAQ,GAAG,CAAC,0DAA0D,CAAC,CAAC;IACxF,MAAM,CAAU,KAAK,GAAG;QAC7B,YAAY,EAAE,aAAa;QAC3B,aAAa,EAAE,cAAc;QAC7B,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,mDAAmD,E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;QAC/F,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,YAAY;KAC1B,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAClD,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;QACvF,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,UAAU,EAAE;YAC9C,YAAY,EAAE,KAAK,CAAC,eAAe,CAAC;YACpC,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC;SAC7B,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;QACxC,OAAO,MAAM,CAAC;IAChB,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { EXTERNAL_REFERENCE_CORRELATIONS_CONTRACT } from './workspace-export.js';
2
+ export declare const CMS_INFO_CONTRACT: "sf-cms-info";
3
+ export declare const CMS_CAPABILITY_STATES: readonly ["implemented", "experimental", "unavailable"];
4
+ export declare const CMS_CAPABILITY_TRANSPORT: "cli-json";
5
+ export type CmsCapability = {
6
+ id: 'workspace.export.bulk' | 'workspace.export.dependency-closure' | 'workspace.export.external-reference-correlation' | 'workspace.import.mapping';
7
+ state: (typeof CMS_CAPABILITY_STATES)[number];
8
+ transport: typeof CMS_CAPABILITY_TRANSPORT;
9
+ contract: 'unavailable' | 'sf-cms-workspace-export-set@1' | typeof EXTERNAL_REFERENCE_CORRELATIONS_CONTRACT | 'sf-cms-workspace-import@1';
10
+ };
11
+ export type CmsInfoResult = {
12
+ plugin: {
13
+ name: 'sf-plugin-cms';
14
+ version: string;
15
+ };
16
+ api: {
17
+ defaultVersion: '67.0';
18
+ testedVersions: ['67.0'];
19
+ };
20
+ contracts: {
21
+ commandResults: {
22
+ info: ['1.0.0'];
23
+ workspaceExportSet: ['1.0.0'];
24
+ workspaceImport: ['1.0.0'];
25
+ };
26
+ packageManifests: {
27
+ workspaceExport: ['1.0.0'];
28
+ };
29
+ embeddedResults: {
30
+ externalReferenceCorrelations: [typeof EXTERNAL_REFERENCE_CORRELATIONS_CONTRACT];
31
+ };
32
+ compatibility: {
33
+ 'workspaceExportSet@1': {
34
+ workspaceExportManifestMajors: [1];
35
+ };
36
+ 'workspaceImport@1': {
37
+ workspaceExportManifestMajors: [1];
38
+ };
39
+ };
40
+ };
41
+ capabilities: CmsCapability[];
42
+ };
43
+ export declare function assertCmsInfoResult(value: unknown): asserts value is CmsInfoResult;
@@ -0,0 +1,69 @@
1
+ import { assertExactKeys, assertIdentifier, assertNonemptyString } from './shared.js';
2
+ import { EXTERNAL_REFERENCE_CORRELATIONS_CONTRACT } from './workspace-export.js';
3
+ export const CMS_INFO_CONTRACT = 'sf-cms-info';
4
+ export const CMS_CAPABILITY_STATES = ['implemented', 'experimental', 'unavailable'];
5
+ export const CMS_CAPABILITY_TRANSPORT = 'cli-json';
6
+ export function assertCmsInfoResult(value) {
7
+ assertExactKeys(value, ['plugin', 'api', 'contracts', 'capabilities'], 'result');
8
+ assertExactKeys(value.plugin, ['name', 'version'], 'result.plugin');
9
+ if (value.plugin.name !== 'sf-plugin-cms')
10
+ throw new TypeError('result.plugin.name is invalid');
11
+ assertNonemptyString(value.plugin.version, 'result.plugin.version');
12
+ assertExactKeys(value.api, ['defaultVersion', 'testedVersions'], 'result.api');
13
+ if (value.api.defaultVersion !== '67.0' || !isExactArray(value.api.testedVersions, ['67.0'])) {
14
+ throw new TypeError('result.api is invalid');
15
+ }
16
+ assertExactKeys(value.contracts, ['commandResults', 'packageManifests', 'embeddedResults', 'compatibility'], 'result.contracts');
17
+ assertExactKeys(value.contracts.commandResults, ['info', 'workspaceExportSet', 'workspaceImport'], 'result.contracts.commandResults');
18
+ for (const key of ['info', 'workspaceExportSet', 'workspaceImport']) {
19
+ if (!isExactArray(value.contracts.commandResults[key], ['1.0.0'])) {
20
+ throw new TypeError(`result.contracts.commandResults.${key} is invalid`);
21
+ }
22
+ }
23
+ assertExactKeys(value.contracts.packageManifests, ['workspaceExport'], 'result.contracts.packageManifests');
24
+ if (!isExactArray(value.contracts.packageManifests.workspaceExport, ['1.0.0'])) {
25
+ throw new TypeError('result.contracts.packageManifests.workspaceExport is invalid');
26
+ }
27
+ assertExactKeys(value.contracts.embeddedResults, ['externalReferenceCorrelations'], 'result.contracts.embeddedResults');
28
+ if (!isExactArray(value.contracts.embeddedResults.externalReferenceCorrelations, [
29
+ EXTERNAL_REFERENCE_CORRELATIONS_CONTRACT,
30
+ ])) {
31
+ throw new TypeError('result.contracts.embeddedResults.externalReferenceCorrelations is invalid');
32
+ }
33
+ assertExactKeys(value.contracts.compatibility, ['workspaceExportSet@1', 'workspaceImport@1'], 'result.contracts.compatibility');
34
+ for (const key of ['workspaceExportSet@1', 'workspaceImport@1']) {
35
+ assertExactKeys(value.contracts.compatibility[key], ['workspaceExportManifestMajors'], `result.contracts.compatibility.${key}`);
36
+ if (!isExactArray(value.contracts.compatibility[key].workspaceExportManifestMajors, [1])) {
37
+ throw new TypeError(`result.contracts.compatibility.${key} is invalid`);
38
+ }
39
+ }
40
+ if (!Array.isArray(value.capabilities))
41
+ throw new TypeError('result.capabilities must be an array');
42
+ const seen = new Set();
43
+ for (const [index, capability] of value.capabilities.entries()) {
44
+ const label = `result.capabilities[${index}]`;
45
+ assertExactKeys(capability, ['id', 'state', 'transport', 'contract'], label);
46
+ assertIdentifier(capability.id, `${label}.id`);
47
+ if (seen.has(capability.id))
48
+ throw new TypeError(`duplicate capability: ${capability.id}`);
49
+ seen.add(capability.id);
50
+ if (!CMS_CAPABILITY_STATES.includes(capability.state)) {
51
+ throw new TypeError(`${label}.state is invalid`);
52
+ }
53
+ if (capability.transport !== CMS_CAPABILITY_TRANSPORT)
54
+ throw new TypeError(`${label}.transport is invalid`);
55
+ const expectedContracts = new Map([
56
+ ['workspace.export.bulk', 'sf-cms-workspace-export-set@1'],
57
+ ['workspace.export.dependency-closure', 'unavailable'],
58
+ ['workspace.export.external-reference-correlation', EXTERNAL_REFERENCE_CORRELATIONS_CONTRACT],
59
+ ['workspace.import.mapping', 'sf-cms-workspace-import@1'],
60
+ ]);
61
+ if (capability.contract !== expectedContracts.get(capability.id)) {
62
+ throw new TypeError(`${label}.contract does not match its capability ID`);
63
+ }
64
+ }
65
+ }
66
+ function isExactArray(value, expected) {
67
+ return Array.isArray(value) && JSON.stringify(value) === JSON.stringify(expected);
68
+ }
69
+ //# sourceMappingURL=info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"info.js","sourceRoot":"","sources":["../../src/contracts/info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACtF,OAAO,EAAE,wCAAwC,EAAE,MAAM,uBAAuB,CAAC;AAEjF,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAsB,CAAC;AACxD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,aAAa,EAAE,cAAc,EAAE,aAAa,CAAU,CAAC;AAC7F,MAAM,CAAC,MAAM,wBAAwB,GAAG,UAAmB,CAAC;AAkD5D,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAChD,eAAe,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,cAAc,CAAC,EAAE,QAAQ,CAAC,CAAC;IACjF,eAAe,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,eAAe,CAAC,CAAC;IACpE,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,eAAe;QAAE,MAAM,IAAI,SAAS,CAAC,+BAA+B,CAAC,CAAC;IAChG,oBAAoB,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,uBAAuB,CAA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