sf-plugin-cms 0.3.1 → 0.5.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.
- package/README.md +334 -28
- package/lib/commands/cms/export/workspace.d.ts +6 -1
- package/lib/commands/cms/export/workspace.js +80 -3
- package/lib/commands/cms/export/workspace.js.map +1 -1
- package/lib/commands/cms/import/workspace.d.ts +14 -4
- package/lib/commands/cms/import/workspace.js +199 -24
- package/lib/commands/cms/import/workspace.js.map +1 -1
- package/lib/commands/cms/info.js +21 -2
- package/lib/commands/cms/info.js.map +1 -1
- package/lib/contracts/info.d.ts +7 -4
- package/lib/contracts/info.js +17 -8
- package/lib/contracts/info.js.map +1 -1
- package/lib/contracts/shared.d.ts +2 -1
- package/lib/contracts/shared.js +11 -3
- package/lib/contracts/shared.js.map +1 -1
- package/lib/contracts/workspace-export.d.ts +23 -3
- package/lib/contracts/workspace-export.js +118 -5
- package/lib/contracts/workspace-export.js.map +1 -1
- package/lib/contracts/workspace-import.d.ts +64 -0
- package/lib/contracts/workspace-import.js +119 -0
- package/lib/contracts/workspace-import.js.map +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/services/bulk-export-workspaces.js +10 -4
- package/lib/services/bulk-export-workspaces.js.map +1 -1
- package/lib/services/editable-raw-html-export.d.ts +26 -0
- package/lib/services/editable-raw-html-export.js +100 -0
- package/lib/services/editable-raw-html-export.js.map +1 -0
- package/lib/services/editable-raw-html-import.d.ts +25 -0
- package/lib/services/editable-raw-html-import.js +107 -0
- package/lib/services/editable-raw-html-import.js.map +1 -0
- package/lib/services/editable-raw-html.d.ts +34 -0
- package/lib/services/editable-raw-html.js +83 -0
- package/lib/services/editable-raw-html.js.map +1 -0
- package/lib/services/email-fragment.d.ts +15 -0
- package/lib/services/email-fragment.js +199 -0
- package/lib/services/email-fragment.js.map +1 -0
- package/lib/services/export-references.js +3 -1
- package/lib/services/export-references.js.map +1 -1
- package/lib/services/export-workspace.d.ts +16 -1
- package/lib/services/export-workspace.js +222 -15
- package/lib/services/export-workspace.js.map +1 -1
- package/lib/services/image-import.d.ts +91 -0
- package/lib/services/image-import.js +579 -0
- package/lib/services/image-import.js.map +1 -0
- package/lib/services/import-identities.d.ts +33 -0
- package/lib/services/import-identities.js +287 -0
- package/lib/services/import-identities.js.map +1 -0
- package/lib/services/import-workspace.d.ts +50 -1
- package/lib/services/import-workspace.js +445 -21
- package/lib/services/import-workspace.js.map +1 -1
- package/lib/services/landing-page-template.d.ts +52 -0
- package/lib/services/landing-page-template.js +421 -0
- package/lib/services/landing-page-template.js.map +1 -0
- package/lib/services/landing-page.d.ts +43 -0
- package/lib/services/landing-page.js +117 -0
- package/lib/services/landing-page.js.map +1 -0
- package/lib/services/resolve-workspace.d.ts +6 -1
- package/lib/services/resolve-workspace.js +51 -4
- package/lib/services/resolve-workspace.js.map +1 -1
- package/lib/services/variant-identity.d.ts +13 -0
- package/lib/services/variant-identity.js +34 -0
- package/lib/services/variant-identity.js.map +1 -0
- package/lib/services/web-fragment.d.ts +41 -0
- package/lib/services/web-fragment.js +245 -0
- package/lib/services/web-fragment.js.map +1 -0
- package/lib/transport/experimental-media.d.ts +30 -0
- package/lib/transport/experimental-media.js +224 -0
- package/lib/transport/experimental-media.js.map +1 -0
- package/lib/transport/json-request.d.ts +9 -1
- package/lib/transport/json-request.js +30 -3
- package/lib/transport/json-request.js.map +1 -1
- package/lib/transport/multipart-image-create.d.ts +28 -0
- package/lib/transport/multipart-image-create.js +189 -0
- package/lib/transport/multipart-image-create.js.map +1 -0
- package/messages/cms.export.workspace.md +12 -2
- package/messages/cms.import.workspace.md +29 -3
- package/package.json +1 -1
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import { Flags } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
2
3
|
import { assertWorkspaceExportSetResult, } from '../../../contracts/workspace-export.js';
|
|
3
4
|
import { assertSupportedMajor } from '../../../contracts/shared.js';
|
|
4
5
|
import { exportAllWorkspaces, normalizeWorkspaceType, } from '../../../services/bulk-export-workspaces.js';
|
|
5
6
|
import { defaultWorkspaceDestination, exportWorkspace, } from '../../../services/export-workspace.js';
|
|
7
|
+
import { preflightEditableExport } from '../../../services/editable-raw-html-export.js';
|
|
6
8
|
import { assertWorkspaceSelector, resolveWorkspace } from '../../../services/resolve-workspace.js';
|
|
7
9
|
import { apiVersionFlag, CmsCommand, targetOrgFlag } from '../../../command-base.js';
|
|
8
10
|
export default class ExportWorkspace extends CmsCommand {
|
|
9
11
|
static summary = 'Experimentally export one or all CMS workspaces using a read-only, best-effort process.';
|
|
10
|
-
static description = 'Experimentally exports one Marketing Cloud CMS workspace
|
|
12
|
+
static description = 'Experimentally exports one Marketing Cloud CMS workspace or preflights and exports all workspaces. Image candidates remain partial JSON-only records by default. Single-workspace --experimental-media explicitly opts into an undocumented read-only binary transport that forwards Salesforce authorization only to a narrowly validated Salesforce media host class. Bulk media export is unsupported. For a single workspace, --editable-dir creates an HTML-only companion beside an explicit unchanged baseline. The paths must be new and disjoint; the baseline is retained if companion creation fails. Eligible HTML is not proven dependency-free or safe and is not resolved, rewritten, sanitized, or scanned through Phase 7. This is not a complete or guaranteed backup and does not mutate org data.';
|
|
11
13
|
static examples = [
|
|
12
14
|
'<%= config.bin %> cms export workspace --target-org my-org --workspace-name "Main Site"',
|
|
13
|
-
'<%= config.bin %> cms export workspace --target-org my-org --workspace-id 0Zu... --output-dir ./cms-export',
|
|
15
|
+
'<%= config.bin %> cms export workspace --target-org my-org --workspace-id 0Zu... --output-dir ./cms-export --json',
|
|
16
|
+
'<%= config.bin %> cms export workspace --target-org my-org --workspace-id 0Zu... --output-dir ./cms-export --web-fragment-map ./web-fragments.json --json',
|
|
17
|
+
'<%= config.bin %> cms export workspace --target-org my-org --workspace-id 0Zu... --output-dir ./cms-export --landing-page-template-map ./landing-page-templates.json --json',
|
|
18
|
+
'<%= config.bin %> cms export workspace --target-org my-org --workspace-id 0Zu... --output-dir ./cms-export --landing-page-map ./landing-pages.json --json',
|
|
19
|
+
'<%= config.bin %> cms export workspace --target-org my-org --workspace-id 0Zu... --output-dir ./cms-export --experimental-media --json',
|
|
14
20
|
'<%= config.bin %> cms export workspace --target-org my-org --all --workspace-type Marketing --output-dir ./cms --contract-version 1 --json',
|
|
21
|
+
'<%= config.bin %> cms export workspace --target-org source-org --workspace-id 0ZuSOURCE --output-dir ./cms-baseline --editable-dir ./cms-editable --json',
|
|
15
22
|
];
|
|
16
23
|
static flags = {
|
|
17
24
|
'target-org': targetOrgFlag,
|
|
@@ -38,6 +45,31 @@ export default class ExportWorkspace extends CmsCommand {
|
|
|
38
45
|
parse: async (input) => normalizeWorkspaceType(input),
|
|
39
46
|
summary: 'Bulk-only workspace type filter: Marketing or Content (case-insensitive).',
|
|
40
47
|
}),
|
|
48
|
+
'web-fragment-map': Flags.file({
|
|
49
|
+
exists: true,
|
|
50
|
+
exclusive: ['all', 'landing-page-template-map', 'landing-page-map'],
|
|
51
|
+
summary: 'JSON array of exact sfdc_cms__webFragment API names to export; every name must resolve exactly once.',
|
|
52
|
+
}),
|
|
53
|
+
'landing-page-template-map': Flags.file({
|
|
54
|
+
exists: true,
|
|
55
|
+
exclusive: ['all', 'web-fragment-map', 'landing-page-map'],
|
|
56
|
+
summary: 'JSON array of exact sfdc_cms__landingPageTemplate API names to export; every name must resolve exactly once.',
|
|
57
|
+
}),
|
|
58
|
+
'landing-page-map': Flags.file({
|
|
59
|
+
exists: true,
|
|
60
|
+
exclusive: ['all', 'web-fragment-map', 'landing-page-template-map'],
|
|
61
|
+
summary: 'JSON array of exact sfdc_cms__landingPage API names to export; every name must resolve exactly once.',
|
|
62
|
+
}),
|
|
63
|
+
'experimental-media': Flags.boolean({
|
|
64
|
+
exclusive: ['all'],
|
|
65
|
+
summary: 'Single-workspace only: opt into undocumented image binary transport and strict v2 media output.',
|
|
66
|
+
}),
|
|
67
|
+
'editable-dir': Flags.directory({
|
|
68
|
+
exists: false,
|
|
69
|
+
exclusive: ['all'],
|
|
70
|
+
dependsOn: ['output-dir'],
|
|
71
|
+
summary: 'New companion directory for the native raw-email/template HTML subset; requires explicit --output-dir.',
|
|
72
|
+
}),
|
|
41
73
|
'output-dir': Flags.directory({
|
|
42
74
|
exists: false,
|
|
43
75
|
summary: 'Single: exact new destination. Bulk: parent directory. Defaults to ./cms/<name> or ./cms.',
|
|
@@ -46,6 +78,13 @@ export default class ExportWorkspace extends CmsCommand {
|
|
|
46
78
|
async run() {
|
|
47
79
|
const { flags } = await this.parse(ExportWorkspace);
|
|
48
80
|
const isBulk = flags.all === true;
|
|
81
|
+
if (flags['editable-dir'] !== undefined) {
|
|
82
|
+
if (isBulk)
|
|
83
|
+
throw new Error('--editable-dir is incompatible with --all.');
|
|
84
|
+
if (flags['output-dir'] === undefined)
|
|
85
|
+
throw new Error('--editable-dir requires explicit --output-dir.');
|
|
86
|
+
await preflightEditableExport(flags['output-dir'], flags['editable-dir']);
|
|
87
|
+
}
|
|
49
88
|
const contractVersion = flags['contract-version'] ?? 1;
|
|
50
89
|
if (contractVersion !== 1) {
|
|
51
90
|
const blocked = blockedEnvelope(contractVersion, flags['api-version'], this.pluginVersion);
|
|
@@ -76,7 +115,7 @@ export default class ExportWorkspace extends CmsCommand {
|
|
|
76
115
|
this.styledJSON(result);
|
|
77
116
|
return this.finishEnvelope(result, assertWorkspaceExportSetResult);
|
|
78
117
|
}
|
|
79
|
-
const connection = await this.
|
|
118
|
+
const { connection, orgId } = await this.getOrgContext(flags['target-org'], flags['api-version']);
|
|
80
119
|
const selected = await resolveWorkspace(connection, {
|
|
81
120
|
workspaceId: flags['workspace-id'],
|
|
82
121
|
workspaceName: flags['workspace-name'],
|
|
@@ -89,8 +128,36 @@ export default class ExportWorkspace extends CmsCommand {
|
|
|
89
128
|
}
|
|
90
129
|
destination = defaultWorkspaceDestination(workspaceName);
|
|
91
130
|
}
|
|
131
|
+
const experimentalMedia = flags['experimental-media'] === true ? resolveExperimentalMedia(connection) : undefined;
|
|
132
|
+
const selectionFile = flags['web-fragment-map'] ?? flags['landing-page-template-map'] ?? flags['landing-page-map'];
|
|
133
|
+
const selectedApiNames = selectionFile === undefined
|
|
134
|
+
? undefined
|
|
135
|
+
: JSON.parse(await readFile(selectionFile, 'utf8'));
|
|
136
|
+
if (selectedApiNames !== undefined &&
|
|
137
|
+
(!Array.isArray(selectedApiNames) ||
|
|
138
|
+
selectedApiNames.some((value) => typeof value !== 'string'))) {
|
|
139
|
+
throw new TypeError('Component map must contain a JSON array of API-name strings.');
|
|
140
|
+
}
|
|
141
|
+
let selectedContentType;
|
|
142
|
+
if (flags['web-fragment-map'] !== undefined)
|
|
143
|
+
selectedContentType = 'sfdc_cms__webFragment';
|
|
144
|
+
else if (flags['landing-page-template-map'] !== undefined)
|
|
145
|
+
selectedContentType = 'sfdc_cms__landingPageTemplate';
|
|
146
|
+
else if (flags['landing-page-map'] !== undefined)
|
|
147
|
+
selectedContentType = 'sfdc_cms__landingPage';
|
|
92
148
|
const result = await exportWorkspace(connection, selected.id, destination, {
|
|
149
|
+
editableDirectory: flags['editable-dir'],
|
|
150
|
+
...(selectedApiNames === undefined
|
|
151
|
+
? {}
|
|
152
|
+
: {
|
|
153
|
+
selection: {
|
|
154
|
+
contentType: selectedContentType,
|
|
155
|
+
apiNames: selectedApiNames,
|
|
156
|
+
},
|
|
157
|
+
}),
|
|
93
158
|
pluginVersion: this.pluginVersion,
|
|
159
|
+
sourceOrgId: orgId,
|
|
160
|
+
...(experimentalMedia === undefined ? {} : { experimentalMedia }),
|
|
94
161
|
});
|
|
95
162
|
for (const warning of result.manifest.warnings)
|
|
96
163
|
this.warn(formatWarning(warning));
|
|
@@ -98,9 +165,19 @@ export default class ExportWorkspace extends CmsCommand {
|
|
|
98
165
|
this.log(`Destination: ${result.destination}`);
|
|
99
166
|
this.log(`Exported variants: ${result.manifest.exportedCount}/${result.manifest.expectedCount} expected`);
|
|
100
167
|
}
|
|
168
|
+
if (result.manifest.completeness === 'partial')
|
|
169
|
+
process.exitCode = 2;
|
|
101
170
|
return result;
|
|
102
171
|
}
|
|
103
172
|
}
|
|
173
|
+
function resolveExperimentalMedia(connection) {
|
|
174
|
+
const connectionOptions = connection.getConnectionOptions?.();
|
|
175
|
+
const accessToken = connection.accessToken ?? connectionOptions?.accessToken;
|
|
176
|
+
if (typeof accessToken !== 'string' || accessToken.length === 0) {
|
|
177
|
+
throw new Error('--experimental-media requires an authenticated org access token.');
|
|
178
|
+
}
|
|
179
|
+
return { accessToken, instanceUrl: connection.instanceUrl };
|
|
180
|
+
}
|
|
104
181
|
function blockedEnvelope(requestedVersion, apiVersion, pluginVersion) {
|
|
105
182
|
return {
|
|
106
183
|
contract: 'sf-cms-workspace-export-set',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../src/commands/cms/export/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EACL,8BAA8B,GAE/B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAoB,MAAM,8BAA8B,CAAC;AACtF,OAAO,EACL,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,2BAA2B,EAC3B,eAAe,GAGhB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAIrF,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAwC;IAC5E,MAAM,CAAU,OAAO,GAC5B,yFAAyF,CAAC;IACrF,MAAM,CAAU,WAAW,GAChC,
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../src/commands/cms/export/workspace.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js';
|
|
1
|
+
import { type WorkspaceImageImportResultV2, type WorkspaceImportResult } from '../../../contracts/workspace-import.js';
|
|
2
2
|
import { type CmsEnvelope } from '../../../contracts/shared.js';
|
|
3
3
|
import { CmsCommand } from '../../../command-base.js';
|
|
4
|
-
|
|
4
|
+
type WorkspaceImportCommandResult = WorkspaceImportResult | WorkspaceImageImportResultV2;
|
|
5
|
+
export default class ImportWorkspace extends CmsCommand<CmsEnvelope<WorkspaceImportCommandResult>> {
|
|
5
6
|
static readonly summary = "Safely plan or apply a create-only import into a CMS workspace.";
|
|
6
|
-
static readonly description = "Validates the source workspace export locally
|
|
7
|
+
static readonly description = "Validates the complete source workspace export locally, selects a destination, and defaults to dry-run. The default profile checks source-key absence, but complete server conflict validation and destination name availability are not established. --native-copy-map selects bounded default-language raw-HTML email/template copies with fresh names and server-generated keys; --editable-dir applies verified HTML-only companion edits against the unchanged baseline. --email-fragment-map selects only the exact dependency-free sfdc_cms__emailFragment root/section/empty-column profile for create-only destination-default-language Drafts with fresh identities. --web-fragment-map selects exact sfdc_cms__webFragment API names, fresh create identities, and exact preserved or explicitly mapped Data Graph developer-name/data-space prerequisites. --landing-page-template-map selects exact sfdc_cms__landingPageTemplate API names with fresh identities and explicit typed CMS/Data Graph prerequisites. --landing-page-map selects the evidenced sfdc_cms__landingPage shape with exact image and Data Graph prerequisites; template and web-fragment references are not supported because they were not observed. --image-map selects strict workspace package v2 images for exact destination preflight and sequential create-only apply under contract version 2. Profile map flags are mutually exclusive. Native and edited HTML is not resolved, rewritten, sanitized, or scanned through Phase 7. Pass --apply with a new --report-dir. No updates, publication, activation, send, rollback, or package transaction.";
|
|
7
8
|
static readonly examples: string[];
|
|
8
9
|
static readonly flags: {
|
|
9
10
|
'target-org': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -12,11 +13,20 @@ export default class ImportWorkspace extends CmsCommand<CmsEnvelope<WorkspaceImp
|
|
|
12
13
|
'workspace-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
'workspace-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
15
|
'source-dir': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'editable-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'native-copy-map': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'email-fragment-map': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'web-fragment-map': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
'landing-page-template-map': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
'landing-page-map': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
'image-map': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
23
|
apply: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
24
|
'allow-partial': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
25
|
'report-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
26
|
};
|
|
19
|
-
run(): Promise<CmsEnvelope<
|
|
27
|
+
run(): Promise<CmsEnvelope<WorkspaceImportCommandResult>>;
|
|
20
28
|
private finish;
|
|
29
|
+
private showImagePlan;
|
|
21
30
|
private showPlan;
|
|
22
31
|
}
|
|
32
|
+
export {};
|
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
import { Flags } from '@salesforce/sf-plugins-core';
|
|
2
|
-
import {
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import { assertWorkspaceImageImportResultV2, assertWorkspaceImportResult, WORKSPACE_IMPORT_CONTRACT, WORKSPACE_IMPORT_CONTRACT_V2, } from '../../../contracts/workspace-import.js';
|
|
3
4
|
import { sanitizeDiagnostics, } from '../../../contracts/shared.js';
|
|
4
|
-
import { executeWorkspaceImport, loadWorkspaceExport, } from '../../../services/import-workspace.js';
|
|
5
|
+
import { executeWorkspaceImport, loadWorkspaceExport, planNativeWorkspaceImport, } from '../../../services/import-workspace.js';
|
|
6
|
+
import { UnsupportedWorkspacePackageVersionError } from '../../../contracts/workspace-export.js';
|
|
5
7
|
import { assertWorkspaceSelector, resolveWorkspace } from '../../../services/resolve-workspace.js';
|
|
8
|
+
import { planEmailFragmentCopies } from '../../../services/email-fragment.js';
|
|
9
|
+
import { planWebFragmentCopies } from '../../../services/web-fragment.js';
|
|
10
|
+
import { planLandingPageTemplateCopies } from '../../../services/landing-page-template.js';
|
|
11
|
+
import { planLandingPageCopies } from '../../../services/landing-page.js';
|
|
12
|
+
import { applyImageImports, planImageImports, preflightImageImports, } from '../../../services/image-import.js';
|
|
6
13
|
import { apiVersionFlag, CmsCommand, targetOrgFlag } from '../../../command-base.js';
|
|
7
14
|
export default class ImportWorkspace extends CmsCommand {
|
|
8
15
|
static summary = 'Safely plan or apply a create-only import into a CMS workspace.';
|
|
9
|
-
static description = 'Validates the source workspace export locally
|
|
16
|
+
static description = 'Validates the complete source workspace export locally, selects a destination, and defaults to dry-run. The default profile checks source-key absence, but complete server conflict validation and destination name availability are not established. --native-copy-map selects bounded default-language raw-HTML email/template copies with fresh names and server-generated keys; --editable-dir applies verified HTML-only companion edits against the unchanged baseline. --email-fragment-map selects only the exact dependency-free sfdc_cms__emailFragment root/section/empty-column profile for create-only destination-default-language Drafts with fresh identities. --web-fragment-map selects exact sfdc_cms__webFragment API names, fresh create identities, and exact preserved or explicitly mapped Data Graph developer-name/data-space prerequisites. --landing-page-template-map selects exact sfdc_cms__landingPageTemplate API names with fresh identities and explicit typed CMS/Data Graph prerequisites. --landing-page-map selects the evidenced sfdc_cms__landingPage shape with exact image and Data Graph prerequisites; template and web-fragment references are not supported because they were not observed. --image-map selects strict workspace package v2 images for exact destination preflight and sequential create-only apply under contract version 2. Profile map flags are mutually exclusive. Native and edited HTML is not resolved, rewritten, sanitized, or scanned through Phase 7. Pass --apply with a new --report-dir. No updates, publication, activation, send, rollback, or package transaction.';
|
|
10
17
|
static examples = [
|
|
11
18
|
'<%= config.bin %> cms import workspace --target-org my-org --workspace-name "Destination" --source-dir ./cms/Source',
|
|
12
19
|
'<%= 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',
|
|
20
|
+
'<%= config.bin %> cms import workspace --target-org my-org --workspace-id 0ZuTARGET --source-dir ./cms-baseline --native-copy-map ./native-copy-map.json --contract-version 1 --json',
|
|
21
|
+
'<%= config.bin %> cms import workspace --target-org my-org --workspace-id 0ZuTARGET --source-dir ./cms-baseline --native-copy-map ./native-copy-map.json --editable-dir ./cms-editable --contract-version 1 --json',
|
|
22
|
+
'<%= config.bin %> cms import workspace --target-org my-org --workspace-id 0ZuTARGET --source-dir ./cms-baseline --email-fragment-map ./email-fragment-map.json --contract-version 1 --json',
|
|
23
|
+
'<%= config.bin %> cms import workspace --target-org my-org --workspace-id 0ZuTARGET --source-dir ./cms-baseline --web-fragment-map ./web-fragment-map.json --contract-version 1 --json',
|
|
24
|
+
'<%= config.bin %> cms import workspace --target-org my-org --workspace-id 0ZuTARGET --source-dir ./cms-baseline --landing-page-template-map ./landing-page-template-map.json --contract-version 1 --json',
|
|
25
|
+
'<%= config.bin %> cms import workspace --target-org my-org --workspace-id 0ZuTARGET --source-dir ./cms-baseline --landing-page-map ./landing-page-map.json --contract-version 1 --json',
|
|
26
|
+
'<%= config.bin %> cms import workspace --target-org my-org --workspace-id 0ZuTARGET --source-dir ./cms-v2 --image-map ./image-map.json --contract-version 2 --json',
|
|
27
|
+
'<%= config.bin %> cms import workspace --target-org my-org --workspace-id 0ZuTARGET --source-dir ./cms-v2 --image-map ./image-map.json --contract-version 2 --apply --report-dir ./image-import-report --json',
|
|
13
28
|
];
|
|
14
29
|
static flags = {
|
|
15
30
|
'target-org': targetOrgFlag,
|
|
@@ -17,7 +32,7 @@ export default class ImportWorkspace extends CmsCommand {
|
|
|
17
32
|
'contract-version': Flags.integer({
|
|
18
33
|
default: 1,
|
|
19
34
|
min: 1,
|
|
20
|
-
summary: 'Machine contract major version (supported: 1).',
|
|
35
|
+
summary: 'Machine contract major version (supported: 1; --image-map requires 2).',
|
|
21
36
|
}),
|
|
22
37
|
'workspace-id': Flags.string({ summary: 'Exact destination CMS workspace ID.' }),
|
|
23
38
|
'workspace-name': Flags.string({ summary: 'Exact case-sensitive destination workspace name.' }),
|
|
@@ -26,9 +41,85 @@ export default class ImportWorkspace extends CmsCommand {
|
|
|
26
41
|
required: true,
|
|
27
42
|
summary: 'Source workspace export containing manifest.json and items/.',
|
|
28
43
|
}),
|
|
44
|
+
'editable-dir': Flags.directory({
|
|
45
|
+
exists: true,
|
|
46
|
+
dependsOn: ['native-copy-map'],
|
|
47
|
+
summary: 'Verified companion directory with editable native email/template raw HTML; original source package remains required.',
|
|
48
|
+
}),
|
|
49
|
+
'native-copy-map': Flags.file({
|
|
50
|
+
exists: true,
|
|
51
|
+
exclusive: [
|
|
52
|
+
'email-fragment-map',
|
|
53
|
+
'web-fragment-map',
|
|
54
|
+
'landing-page-template-map',
|
|
55
|
+
'landing-page-map',
|
|
56
|
+
'image-map',
|
|
57
|
+
],
|
|
58
|
+
summary: 'JSON array selecting native raw-HTML parents: sourceContentKey, language, fresh apiName and urlName. Server generates keys; no updates or publication.',
|
|
59
|
+
}),
|
|
60
|
+
'email-fragment-map': Flags.file({
|
|
61
|
+
exists: true,
|
|
62
|
+
exclusive: [
|
|
63
|
+
'native-copy-map',
|
|
64
|
+
'web-fragment-map',
|
|
65
|
+
'landing-page-template-map',
|
|
66
|
+
'landing-page-map',
|
|
67
|
+
'editable-dir',
|
|
68
|
+
'image-map',
|
|
69
|
+
],
|
|
70
|
+
summary: 'JSON array selecting exact typed cms/emailFragment API names with fresh target contentKey/apiName; source keys remain provenance.',
|
|
71
|
+
}),
|
|
72
|
+
'web-fragment-map': Flags.file({
|
|
73
|
+
exists: true,
|
|
74
|
+
exclusive: [
|
|
75
|
+
'native-copy-map',
|
|
76
|
+
'email-fragment-map',
|
|
77
|
+
'landing-page-template-map',
|
|
78
|
+
'landing-page-map',
|
|
79
|
+
'editable-dir',
|
|
80
|
+
'image-map',
|
|
81
|
+
],
|
|
82
|
+
summary: 'JSON array selecting exact cms/webFragment API names, fresh create identities, and exact Data Graph prerequisite mappings.',
|
|
83
|
+
}),
|
|
84
|
+
'landing-page-template-map': Flags.file({
|
|
85
|
+
exists: true,
|
|
86
|
+
exclusive: [
|
|
87
|
+
'native-copy-map',
|
|
88
|
+
'email-fragment-map',
|
|
89
|
+
'web-fragment-map',
|
|
90
|
+
'landing-page-map',
|
|
91
|
+
'editable-dir',
|
|
92
|
+
'image-map',
|
|
93
|
+
],
|
|
94
|
+
summary: 'JSON array selecting exact cms/landingPageTemplate API names, fresh identities, and explicit CMS/Data Graph prerequisites.',
|
|
95
|
+
}),
|
|
96
|
+
'landing-page-map': Flags.file({
|
|
97
|
+
exists: true,
|
|
98
|
+
exclusive: [
|
|
99
|
+
'native-copy-map',
|
|
100
|
+
'email-fragment-map',
|
|
101
|
+
'web-fragment-map',
|
|
102
|
+
'landing-page-template-map',
|
|
103
|
+
'editable-dir',
|
|
104
|
+
'image-map',
|
|
105
|
+
],
|
|
106
|
+
summary: 'JSON array selecting exact cms/landingPage API names, fresh identities, and evidenced image/Data Graph prerequisites.',
|
|
107
|
+
}),
|
|
108
|
+
'image-map': Flags.file({
|
|
109
|
+
exists: true,
|
|
110
|
+
exclusive: [
|
|
111
|
+
'native-copy-map',
|
|
112
|
+
'email-fragment-map',
|
|
113
|
+
'web-fragment-map',
|
|
114
|
+
'landing-page-template-map',
|
|
115
|
+
'landing-page-map',
|
|
116
|
+
'editable-dir',
|
|
117
|
+
],
|
|
118
|
+
summary: 'JSON array selecting strict v2 package images and explicit preserve/fresh/generated identity strategies; requires --contract-version 2.',
|
|
119
|
+
}),
|
|
29
120
|
apply: Flags.boolean({
|
|
30
121
|
default: false,
|
|
31
|
-
summary: 'Create
|
|
122
|
+
summary: 'Create after local validation and bounded profile preflight; dry-run does not establish full conflict or apply readiness.',
|
|
32
123
|
}),
|
|
33
124
|
'allow-partial': Flags.boolean({
|
|
34
125
|
default: false,
|
|
@@ -43,17 +134,16 @@ export default class ImportWorkspace extends CmsCommand {
|
|
|
43
134
|
async run() {
|
|
44
135
|
const { flags } = await this.parse(ImportWorkspace);
|
|
45
136
|
const requestedVersion = flags['contract-version'] ?? 1;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
]));
|
|
137
|
+
const imageProfile = flags['image-map'] !== undefined;
|
|
138
|
+
const profileContractMajor = imageProfile ? 2 : 1;
|
|
139
|
+
if (requestedVersion !== profileContractMajor) {
|
|
140
|
+
const message = imageProfile
|
|
141
|
+
? '--image-map requires --contract-version 2.'
|
|
142
|
+
: `Contract major ${requestedVersion} is unsupported for this profile; supported major is 1.`;
|
|
143
|
+
return this.finish(envelope('blocked', profileContractMajor, flags['api-version'], 'unresolved-org', this.pluginVersion, null, [{ code: 'UNSUPPORTED_CONTRACT_VERSION', message, retryable: false }]));
|
|
54
144
|
}
|
|
55
145
|
if (flags.apply && flags['report-dir'] === undefined) {
|
|
56
|
-
return this.finish(envelope('blocked', flags['api-version'], 'unresolved-org', this.pluginVersion, null, [
|
|
146
|
+
return this.finish(envelope('blocked', profileContractMajor, flags['api-version'], 'unresolved-org', this.pluginVersion, null, [
|
|
57
147
|
{
|
|
58
148
|
code: 'REPORT_DIRECTORY_REQUIRED',
|
|
59
149
|
message: '--report-dir is required when --apply is set.',
|
|
@@ -62,10 +152,43 @@ export default class ImportWorkspace extends CmsCommand {
|
|
|
62
152
|
]));
|
|
63
153
|
}
|
|
64
154
|
let source;
|
|
155
|
+
let emailFragmentMappings;
|
|
156
|
+
let imagePlans;
|
|
157
|
+
let landingPageTemplateMappings;
|
|
158
|
+
let landingPageMappings;
|
|
159
|
+
let nativeCopyMappings;
|
|
160
|
+
let webFragmentMappings;
|
|
65
161
|
try {
|
|
162
|
+
if (flags['editable-dir'] !== undefined && flags['native-copy-map'] === undefined)
|
|
163
|
+
throw new TypeError('--editable-dir requires --native-copy-map');
|
|
66
164
|
source = await loadWorkspaceExport(flags['source-dir'], {
|
|
67
165
|
allowPartial: flags['allow-partial'],
|
|
166
|
+
profile: imageProfile ? 'image' : 'general',
|
|
68
167
|
});
|
|
168
|
+
if (flags['image-map'] !== undefined) {
|
|
169
|
+
const imageMappings = JSON.parse(await readFile(flags['image-map'], 'utf8'));
|
|
170
|
+
imagePlans = planImageImports(source, imageMappings);
|
|
171
|
+
}
|
|
172
|
+
if (flags['native-copy-map'] !== undefined) {
|
|
173
|
+
nativeCopyMappings = JSON.parse(await readFile(flags['native-copy-map'], 'utf8'));
|
|
174
|
+
await planNativeWorkspaceImport(source, nativeCopyMappings, flags['editable-dir']);
|
|
175
|
+
}
|
|
176
|
+
if (flags['email-fragment-map'] !== undefined) {
|
|
177
|
+
emailFragmentMappings = JSON.parse(await readFile(flags['email-fragment-map'], 'utf8'));
|
|
178
|
+
planEmailFragmentCopies(source, emailFragmentMappings);
|
|
179
|
+
}
|
|
180
|
+
if (flags['web-fragment-map'] !== undefined) {
|
|
181
|
+
webFragmentMappings = JSON.parse(await readFile(flags['web-fragment-map'], 'utf8'));
|
|
182
|
+
planWebFragmentCopies(source, webFragmentMappings);
|
|
183
|
+
}
|
|
184
|
+
if (flags['landing-page-template-map'] !== undefined) {
|
|
185
|
+
landingPageTemplateMappings = JSON.parse(await readFile(flags['landing-page-template-map'], 'utf8'));
|
|
186
|
+
planLandingPageTemplateCopies(source, landingPageTemplateMappings);
|
|
187
|
+
}
|
|
188
|
+
if (flags['landing-page-map'] !== undefined) {
|
|
189
|
+
landingPageMappings = JSON.parse(await readFile(flags['landing-page-map'], 'utf8'));
|
|
190
|
+
planLandingPageCopies(source, landingPageMappings);
|
|
191
|
+
}
|
|
69
192
|
assertWorkspaceSelector({
|
|
70
193
|
workspaceId: flags['workspace-id'],
|
|
71
194
|
workspaceName: flags['workspace-name'],
|
|
@@ -73,8 +196,8 @@ export default class ImportWorkspace extends CmsCommand {
|
|
|
73
196
|
}
|
|
74
197
|
catch (error) {
|
|
75
198
|
const message = error instanceof Error ? error.message : String(error);
|
|
76
|
-
const packageVersionFailure =
|
|
77
|
-
return this.finish(envelope('blocked', flags['api-version'], 'unresolved-org', this.pluginVersion, null, [
|
|
199
|
+
const packageVersionFailure = error instanceof UnsupportedWorkspacePackageVersionError;
|
|
200
|
+
return this.finish(envelope('blocked', profileContractMajor, flags['api-version'], 'unresolved-org', this.pluginVersion, null, [
|
|
78
201
|
{
|
|
79
202
|
code: packageVersionFailure
|
|
80
203
|
? 'UNSUPPORTED_PACKAGE_VERSION'
|
|
@@ -90,6 +213,28 @@ export default class ImportWorkspace extends CmsCommand {
|
|
|
90
213
|
workspaceId: flags['workspace-id'],
|
|
91
214
|
workspaceName: flags['workspace-name'],
|
|
92
215
|
});
|
|
216
|
+
if (imagePlans !== undefined) {
|
|
217
|
+
const execution = flags.apply
|
|
218
|
+
? await applyImageImports({
|
|
219
|
+
connection,
|
|
220
|
+
destinationOrgId: orgId,
|
|
221
|
+
destinationWorkspaceId: selected.id,
|
|
222
|
+
plans: imagePlans,
|
|
223
|
+
reportDirectory: flags['report-dir'],
|
|
224
|
+
source,
|
|
225
|
+
})
|
|
226
|
+
: await preflightImageImports({
|
|
227
|
+
connection,
|
|
228
|
+
destinationOrgId: orgId,
|
|
229
|
+
destinationWorkspaceId: selected.id,
|
|
230
|
+
plans: imagePlans,
|
|
231
|
+
source,
|
|
232
|
+
});
|
|
233
|
+
const result = envelope('success', 2, flags['api-version'], orgId, this.pluginVersion, execution.contractResult, []);
|
|
234
|
+
if (!this.jsonEnabled())
|
|
235
|
+
this.showImagePlan(execution, result);
|
|
236
|
+
return this.finish(result);
|
|
237
|
+
}
|
|
93
238
|
const execution = await executeWorkspaceImport({
|
|
94
239
|
allowPartial: flags['allow-partial'],
|
|
95
240
|
connection,
|
|
@@ -97,18 +242,24 @@ export default class ImportWorkspace extends CmsCommand {
|
|
|
97
242
|
destinationWorkspace: selected.workspace,
|
|
98
243
|
dryRun: !flags.apply,
|
|
99
244
|
loadedSource: source,
|
|
245
|
+
editableDirectory: flags['editable-dir'],
|
|
246
|
+
emailFragmentMappings,
|
|
247
|
+
landingPageTemplateMappings,
|
|
248
|
+
landingPageMappings,
|
|
249
|
+
nativeCopyMappings,
|
|
250
|
+
webFragmentMappings,
|
|
100
251
|
reportDirectory: flags['report-dir'],
|
|
101
252
|
sourceDirectory: flags['source-dir'],
|
|
102
253
|
workspaceId: selected.id,
|
|
103
254
|
});
|
|
104
255
|
const status = source.isPartial ? 'partial' : 'success';
|
|
105
|
-
const result = envelope(status, flags['api-version'], orgId, this.pluginVersion, execution.contractResult, []);
|
|
256
|
+
const result = envelope(status, 1, flags['api-version'], orgId, this.pluginVersion, execution.contractResult, [], execution.diagnostics);
|
|
106
257
|
if (!this.jsonEnabled())
|
|
107
258
|
this.showPlan(execution, result);
|
|
108
259
|
return this.finish(result);
|
|
109
260
|
}
|
|
110
261
|
catch (error) {
|
|
111
|
-
return this.finish(envelope('failed', flags['api-version'], orgId, this.pluginVersion, null, [
|
|
262
|
+
return this.finish(envelope('failed', profileContractMajor, flags['api-version'], orgId, this.pluginVersion, null, [
|
|
112
263
|
{
|
|
113
264
|
code: 'IMPORT_FAILED',
|
|
114
265
|
message: error instanceof Error ? error.message : String(error),
|
|
@@ -118,7 +269,24 @@ export default class ImportWorkspace extends CmsCommand {
|
|
|
118
269
|
}
|
|
119
270
|
}
|
|
120
271
|
finish(result) {
|
|
121
|
-
return
|
|
272
|
+
return result.contractVersion === '2.0.0'
|
|
273
|
+
? this.finishEnvelope(result, assertWorkspaceImageImportResultV2)
|
|
274
|
+
: this.finishEnvelope(result, assertWorkspaceImportResult);
|
|
275
|
+
}
|
|
276
|
+
showImagePlan(execution, envelopeResult) {
|
|
277
|
+
this.log(`Status: ${envelopeResult.status}`);
|
|
278
|
+
this.log(`Mode: ${execution.dryRun ? 'dry-run (preflight only)' : 'apply (create-only)'}`);
|
|
279
|
+
this.log(`Destination workspace: ${execution.contractResult.target.workspaceId}`);
|
|
280
|
+
this.log(`Selected images: ${execution.contractResult.assets.length}`);
|
|
281
|
+
this.log(`Image result: ${execution.contractResult.status}`);
|
|
282
|
+
if (execution.dryRun) {
|
|
283
|
+
this.log('No images were created. Every selected identity passed exact destination preflight.');
|
|
284
|
+
this.log('Binary byte proof remains unavailable; apply is sequential and stops on first error.');
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
this.log(`Run report: ${execution.reportFile}`);
|
|
288
|
+
this.log('Images were created sequentially; metadata readback passed for every completed asset.');
|
|
289
|
+
}
|
|
122
290
|
}
|
|
123
291
|
showPlan(execution, envelopeResult) {
|
|
124
292
|
const primaryCount = execution.plan.groups.length;
|
|
@@ -131,24 +299,31 @@ export default class ImportWorkspace extends CmsCommand {
|
|
|
131
299
|
this.log(`Resolved mappings: ${execution.contractResult.mappings.length}`);
|
|
132
300
|
this.log(`Explicit unresolved/unsupported references: ${execution.contractResult.references.length}`);
|
|
133
301
|
if (execution.dryRun) {
|
|
134
|
-
this.log('No content was created.
|
|
302
|
+
this.log('No content was created. This proposal does not establish deploy readiness.');
|
|
303
|
+
for (const diagnostic of execution.diagnostics)
|
|
304
|
+
this.log(diagnostic.message);
|
|
135
305
|
}
|
|
136
306
|
else {
|
|
137
307
|
this.log(`Run report: ${execution.reportFile ?? ''}`);
|
|
308
|
+
for (const diagnostic of execution.diagnostics)
|
|
309
|
+
this.log(diagnostic.message);
|
|
138
310
|
}
|
|
139
311
|
}
|
|
140
312
|
}
|
|
141
|
-
function envelope(status, apiVersion, orgId, pluginVersion, result, errors) {
|
|
313
|
+
function envelope(status, contractMajor, apiVersion, orgId, pluginVersion, result, errors, warnings = []) {
|
|
142
314
|
return {
|
|
143
|
-
contract: WORKSPACE_IMPORT_CONTRACT,
|
|
144
|
-
contractVersion: '1.0.0',
|
|
315
|
+
contract: contractMajor === 2 ? WORKSPACE_IMPORT_CONTRACT_V2 : WORKSPACE_IMPORT_CONTRACT,
|
|
316
|
+
contractVersion: contractMajor === 2 ? '2.0.0' : '1.0.0',
|
|
145
317
|
status,
|
|
146
318
|
metadata: {
|
|
147
319
|
operation: 'workspace.import',
|
|
148
320
|
plugin: { name: 'sf-plugin-cms', version: pluginVersion },
|
|
149
321
|
apiVersion,
|
|
150
322
|
},
|
|
151
|
-
diagnostics: {
|
|
323
|
+
diagnostics: {
|
|
324
|
+
warnings: sanitizeDiagnostics(warnings, 'diagnostics.warnings'),
|
|
325
|
+
errors: sanitizeDiagnostics(errors, 'diagnostics.errors'),
|
|
326
|
+
},
|
|
152
327
|
provenance: {
|
|
153
328
|
producer: 'sf-plugin-cms',
|
|
154
329
|
sourceOrgId: orgId,
|
|
@@ -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,2BAA2B,EAC3B,yBAAyB,GAE1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,mBAAmB,GAIpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,sBAAsB,EACtB,mBAAmB,GAGpB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE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