sf-plugin-cms 0.1.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/LICENSE +21 -0
- package/README.md +277 -0
- package/lib/commands/cms/command-base.d.ts +16 -0
- package/lib/commands/cms/command-base.js +42 -0
- package/lib/commands/cms/command-base.js.map +1 -0
- package/lib/commands/cms/export/workspace.d.ts +14 -0
- package/lib/commands/cms/export/workspace.js +42 -0
- package/lib/commands/cms/export/workspace.js.map +1 -0
- package/lib/commands/cms/get/channel.d.ts +13 -0
- package/lib/commands/cms/get/channel.js +23 -0
- package/lib/commands/cms/get/channel.js.map +1 -0
- package/lib/commands/cms/get/content.d.ts +17 -0
- package/lib/commands/cms/get/content.js +35 -0
- package/lib/commands/cms/get/content.js.map +1 -0
- package/lib/commands/cms/get/variant.d.ts +13 -0
- package/lib/commands/cms/get/variant.js +23 -0
- package/lib/commands/cms/get/variant.js.map +1 -0
- package/lib/commands/cms/get/workspace.d.ts +13 -0
- package/lib/commands/cms/get/workspace.js +23 -0
- package/lib/commands/cms/get/workspace.js.map +1 -0
- package/lib/commands/cms/import/workspace.d.ts +18 -0
- package/lib/commands/cms/import/workspace.js +77 -0
- package/lib/commands/cms/import/workspace.js.map +1 -0
- package/lib/commands/cms/info.d.ts +12 -0
- package/lib/commands/cms/info.js +13 -0
- package/lib/commands/cms/info.js.map +1 -0
- package/lib/commands/cms/list/channel.d.ts +15 -0
- package/lib/commands/cms/list/channel.js +28 -0
- package/lib/commands/cms/list/channel.js.map +1 -0
- package/lib/commands/cms/list/workspace.d.ts +15 -0
- package/lib/commands/cms/list/workspace.js +27 -0
- package/lib/commands/cms/list/workspace.js.map +1 -0
- package/lib/generated/operations.d.ts +233 -0
- package/lib/generated/operations.js +317 -0
- package/lib/generated/operations.js.map +1 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -0
- package/lib/openapi/generate.d.ts +30 -0
- package/lib/openapi/generate.js +150 -0
- package/lib/openapi/generate.js.map +1 -0
- package/lib/openapi/intake.d.ts +26 -0
- package/lib/openapi/intake.js +176 -0
- package/lib/openapi/intake.js.map +1 -0
- package/lib/openapi/selected.d.ts +11 -0
- package/lib/openapi/selected.js +49 -0
- package/lib/openapi/selected.js.map +1 -0
- package/lib/services/export-workspace.d.ts +37 -0
- package/lib/services/export-workspace.js +214 -0
- package/lib/services/export-workspace.js.map +1 -0
- package/lib/services/import-workspace.d.ts +112 -0
- package/lib/services/import-workspace.js +570 -0
- package/lib/services/import-workspace.js.map +1 -0
- package/lib/services/read.d.ts +20 -0
- package/lib/services/read.js +73 -0
- package/lib/services/read.js.map +1 -0
- package/lib/services/write.d.ts +27 -0
- package/lib/services/write.js +21 -0
- package/lib/services/write.js.map +1 -0
- package/lib/transport/json-mutation.d.ts +15 -0
- package/lib/transport/json-mutation.js +81 -0
- package/lib/transport/json-mutation.js.map +1 -0
- package/lib/transport/json-request.d.ts +26 -0
- package/lib/transport/json-request.js +135 -0
- package/lib/transport/json-request.js.map +1 -0
- package/lib/transport/redact-secrets.d.ts +6 -0
- package/lib/transport/redact-secrets.js +31 -0
- package/lib/transport/redact-secrets.js.map +1 -0
- package/messages/cms.export.workspace.md +29 -0
- package/messages/cms.get.channel.md +25 -0
- package/messages/cms.get.content.md +41 -0
- package/messages/cms.get.variant.md +25 -0
- package/messages/cms.get.workspace.md +25 -0
- package/messages/cms.import.workspace.md +45 -0
- package/messages/cms.list.channel.md +33 -0
- package/messages/cms.list.workspace.md +32 -0
- package/package.json +98 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Safely plan or apply a create-only import into a CMS workspace.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Validates an exported workspace package locally, checks every content key for destination conflicts, and defaults to a non-mutating dry run. Pass --apply with a new --report-dir to create content.
|
|
8
|
+
|
|
9
|
+
# examples
|
|
10
|
+
|
|
11
|
+
- Validate and preflight an import without creating content:
|
|
12
|
+
|
|
13
|
+
<%= config.bin %> <%= command.id %> --target-org my-org --workspace-id 0Zu... --source-dir ./cms-export
|
|
14
|
+
|
|
15
|
+
- Apply a conflict-free plan and write a durable run report:
|
|
16
|
+
|
|
17
|
+
<%= config.bin %> <%= command.id %> --target-org my-org --workspace-id 0Zu... --source-dir ./cms-export --apply --report-dir ./cms-import-report
|
|
18
|
+
|
|
19
|
+
# flags.target-org.summary
|
|
20
|
+
|
|
21
|
+
Username or alias of the target Salesforce org.
|
|
22
|
+
|
|
23
|
+
# flags.api-version.summary
|
|
24
|
+
|
|
25
|
+
Salesforce API version used for CMS requests.
|
|
26
|
+
|
|
27
|
+
# flags.workspace-id.summary
|
|
28
|
+
|
|
29
|
+
Destination CMS workspace ID.
|
|
30
|
+
|
|
31
|
+
# flags.source-dir.summary
|
|
32
|
+
|
|
33
|
+
Workspace export directory containing manifest.json and items/.
|
|
34
|
+
|
|
35
|
+
# flags.apply.summary
|
|
36
|
+
|
|
37
|
+
Create the planned content after all validation and conflict checks pass.
|
|
38
|
+
|
|
39
|
+
# flags.allow-partial.summary
|
|
40
|
+
|
|
41
|
+
Accept an export whose manifest records omissions or incomplete coverage.
|
|
42
|
+
|
|
43
|
+
# flags.report-dir.summary
|
|
44
|
+
|
|
45
|
+
New directory for the durable applied-import run report.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
List channels assigned to a CMS workspace.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Retrieves one page of channels for an explicit workspace.
|
|
8
|
+
|
|
9
|
+
# examples
|
|
10
|
+
|
|
11
|
+
- List workspace channels:
|
|
12
|
+
|
|
13
|
+
<%= config.bin %> <%= command.id %> --target-org my-org --workspace-id 0Zu...
|
|
14
|
+
|
|
15
|
+
# flags.target-org.summary
|
|
16
|
+
|
|
17
|
+
Username or alias of the target Salesforce org.
|
|
18
|
+
|
|
19
|
+
# flags.api-version.summary
|
|
20
|
+
|
|
21
|
+
Salesforce API version used for CMS requests.
|
|
22
|
+
|
|
23
|
+
# flags.workspace-id.summary
|
|
24
|
+
|
|
25
|
+
CMS workspace content-space ID.
|
|
26
|
+
|
|
27
|
+
# flags.page.summary
|
|
28
|
+
|
|
29
|
+
Zero-based page number.
|
|
30
|
+
|
|
31
|
+
# flags.page-size.summary
|
|
32
|
+
|
|
33
|
+
Maximum items requested per page.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
List Marketing Cloud CMS workspaces.
|
|
4
|
+
# description
|
|
5
|
+
|
|
6
|
+
Lists one bounded page of CMS workspaces through the authenticated Salesforce connection.
|
|
7
|
+
|
|
8
|
+
# examples
|
|
9
|
+
|
|
10
|
+
- List workspaces:
|
|
11
|
+
|
|
12
|
+
<%= config.bin %> <%= command.id %> --target-org my-org
|
|
13
|
+
|
|
14
|
+
# flags.target-org.summary
|
|
15
|
+
|
|
16
|
+
Username or alias of the target Salesforce org.
|
|
17
|
+
|
|
18
|
+
# flags.api-version.summary
|
|
19
|
+
|
|
20
|
+
Salesforce API version used for CMS requests.
|
|
21
|
+
|
|
22
|
+
# flags.name-fragment.summary
|
|
23
|
+
|
|
24
|
+
Return workspaces whose names contain this value.
|
|
25
|
+
|
|
26
|
+
# flags.page.summary
|
|
27
|
+
|
|
28
|
+
Zero-based page number.
|
|
29
|
+
|
|
30
|
+
# flags.page-size.summary
|
|
31
|
+
|
|
32
|
+
Maximum items requested per page.
|
package/package.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sf-plugin-cms",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Salesforce CLI plugin scaffold for Marketing Cloud CMS",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Jörn Berkefeld",
|
|
7
|
+
"email": "joern.berkefeld@gmail.com"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/JoernBerkefeld/sf-plugin-cms.git"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/JoernBerkefeld/sf-plugin-cms/issues"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/JoernBerkefeld/sf-plugin-cms#readme",
|
|
18
|
+
"type": "module",
|
|
19
|
+
"exports": "./lib/index.js",
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=20 <25"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"lib",
|
|
25
|
+
"messages",
|
|
26
|
+
"LICENSE",
|
|
27
|
+
"README.md"
|
|
28
|
+
],
|
|
29
|
+
"keywords": [
|
|
30
|
+
"salesforce",
|
|
31
|
+
"salesforcedx",
|
|
32
|
+
"sf",
|
|
33
|
+
"sf-plugin",
|
|
34
|
+
"marketing-cloud",
|
|
35
|
+
"cms"
|
|
36
|
+
],
|
|
37
|
+
"oclif": {
|
|
38
|
+
"bin": "sf",
|
|
39
|
+
"commands": "./lib/commands",
|
|
40
|
+
"topicSeparator": " ",
|
|
41
|
+
"flexibleTaxonomy": true,
|
|
42
|
+
"topics": {
|
|
43
|
+
"cms": {
|
|
44
|
+
"description": "Marketing Cloud CMS commands."
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "npm run compile",
|
|
50
|
+
"clean": "node -e \"import('node:fs').then(({rmSync}) => rmSync('lib', {recursive:true, force:true}))\"",
|
|
51
|
+
"compile": "tsc -p tsconfig.json",
|
|
52
|
+
"format": "prettier --write .",
|
|
53
|
+
"format:check": "prettier --check .",
|
|
54
|
+
"generate": "npm run compile && node scripts/generate-openapi.mjs",
|
|
55
|
+
"generate:check": "npm run compile && node scripts/generate-openapi.mjs --check",
|
|
56
|
+
"intake:canonical": "npm run compile && node scripts/intake-openapi.mjs resources/openapi/connect-rest-api-cms-v67.yaml --canonical",
|
|
57
|
+
"lint": "eslint src test eslint.config.js",
|
|
58
|
+
"lint:fix": "eslint src test eslint.config.js --fix",
|
|
59
|
+
"intake:check": "npm run compile && node scripts/intake-openapi.mjs resources/openapi/connect-rest-api-cms-v67.yaml --canonical",
|
|
60
|
+
"prepare": "husky || true",
|
|
61
|
+
"test": "npm run compile && nyc mocha",
|
|
62
|
+
"validate:package": "node scripts/validate-package.mjs"
|
|
63
|
+
},
|
|
64
|
+
"publishConfig": {
|
|
65
|
+
"access": "public"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"@oclif/core": "4.13.2",
|
|
69
|
+
"@salesforce/core": "8.32.6",
|
|
70
|
+
"@salesforce/sf-plugins-core": "12.2.28"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@eslint/js": "9.39.4",
|
|
74
|
+
"@oclif/plugin-command-snapshot": "5.3.33",
|
|
75
|
+
"@salesforce/cli-plugins-testkit": "5.3.64",
|
|
76
|
+
"@salesforce/dev-config": "4.3.3",
|
|
77
|
+
"@types/chai": "4.3.20",
|
|
78
|
+
"@types/mocha": "10.0.10",
|
|
79
|
+
"@types/node": "24.10.1",
|
|
80
|
+
"@types/sinon": "17.0.4",
|
|
81
|
+
"chai": "4.5.0",
|
|
82
|
+
"eslint": "9.39.4",
|
|
83
|
+
"eslint-config-prettier": "10.1.8",
|
|
84
|
+
"eslint-plugin-jsdoc": "54.7.0",
|
|
85
|
+
"eslint-plugin-prettier": "5.5.6",
|
|
86
|
+
"eslint-plugin-unicorn": "64.0.0",
|
|
87
|
+
"globals": "17.9.0",
|
|
88
|
+
"husky": "9.1.7",
|
|
89
|
+
"mocha": "11.8.0",
|
|
90
|
+
"nyc": "17.1.0",
|
|
91
|
+
"prettier": "3.9.6",
|
|
92
|
+
"sinon": "18.0.1",
|
|
93
|
+
"ts-node": "10.9.2",
|
|
94
|
+
"typescript": "5.9.3",
|
|
95
|
+
"typescript-eslint": "8.67.0",
|
|
96
|
+
"yaml": "2.9.0"
|
|
97
|
+
}
|
|
98
|
+
}
|