sf-decomposer 4.0.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 (47) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +341 -0
  3. package/lib/commands/decomposer/decompose.d.ts +17 -0
  4. package/lib/commands/decomposer/decompose.js +70 -0
  5. package/lib/commands/decomposer/decompose.js.map +1 -0
  6. package/lib/commands/decomposer/recompose.d.ts +16 -0
  7. package/lib/commands/decomposer/recompose.js +64 -0
  8. package/lib/commands/decomposer/recompose.js.map +1 -0
  9. package/lib/helpers/constants.d.ts +5 -0
  10. package/lib/helpers/constants.js +7 -0
  11. package/lib/helpers/constants.js.map +1 -0
  12. package/lib/hooks/scopedPostRetrieve.d.ts +12 -0
  13. package/lib/hooks/scopedPostRetrieve.js +51 -0
  14. package/lib/hooks/scopedPostRetrieve.js.map +1 -0
  15. package/lib/index.d.ts +2 -0
  16. package/lib/index.js +2 -0
  17. package/lib/index.js.map +1 -0
  18. package/lib/metadata/getPackageDirectories.d.ts +1 -0
  19. package/lib/metadata/getPackageDirectories.js +50 -0
  20. package/lib/metadata/getPackageDirectories.js.map +1 -0
  21. package/lib/metadata/getRegistryValuesBySuffix.d.ts +9 -0
  22. package/lib/metadata/getRegistryValuesBySuffix.js +38 -0
  23. package/lib/metadata/getRegistryValuesBySuffix.js.map +1 -0
  24. package/lib/metadata/getUniqueIdElements.d.ts +1 -0
  25. package/lib/metadata/getUniqueIdElements.js +13 -0
  26. package/lib/metadata/getUniqueIdElements.js.map +1 -0
  27. package/lib/metadata/uniqueIdElements.json +66 -0
  28. package/lib/service/checkLogforErrors.d.ts +2 -0
  29. package/lib/service/checkLogforErrors.js +29 -0
  30. package/lib/service/checkLogforErrors.js.map +1 -0
  31. package/lib/service/decomposeFileHandler.d.ts +7 -0
  32. package/lib/service/decomposeFileHandler.js +74 -0
  33. package/lib/service/decomposeFileHandler.js.map +1 -0
  34. package/lib/service/moveFiles.d.ts +1 -0
  35. package/lib/service/moveFiles.js +17 -0
  36. package/lib/service/moveFiles.js.map +1 -0
  37. package/lib/service/recomposeFileHandler.d.ts +6 -0
  38. package/lib/service/recomposeFileHandler.js +82 -0
  39. package/lib/service/recomposeFileHandler.js.map +1 -0
  40. package/lib/service/renameBotVersionFiles.d.ts +1 -0
  41. package/lib/service/renameBotVersionFiles.js +23 -0
  42. package/lib/service/renameBotVersionFiles.js.map +1 -0
  43. package/messages/decomposer.decompose.md +36 -0
  44. package/messages/decomposer.recompose.md +30 -0
  45. package/oclif.lock +12481 -0
  46. package/oclif.manifest.json +166 -0
  47. package/package.json +202 -0
@@ -0,0 +1,166 @@
1
+ {
2
+ "commands": {
3
+ "decomposer:decompose": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "description": "This command will read all of the original metadata files and separate them into smaller files.\n\nThese smaller decomposed files can be XMLs, YAMLs, or JSONs.\n\nYou should use this to create files for version control after retrieving metadata from an org.",
7
+ "examples": [
8
+ "`sf decomposer decompose -m \"flow\" -f \"xml\" --prepurge --postpurge --debug`",
9
+ "`sf decomposer decompose -m \"flow\" -m \"labels\" -f \"xml\" --prepurge --postpurge --debug`"
10
+ ],
11
+ "flags": {
12
+ "json": {
13
+ "description": "Format output as json.",
14
+ "helpGroup": "GLOBAL",
15
+ "name": "json",
16
+ "allowNo": false,
17
+ "type": "boolean"
18
+ },
19
+ "metadata-type": {
20
+ "char": "m",
21
+ "name": "metadata-type",
22
+ "required": true,
23
+ "summary": "The metadata suffix to process, such as 'flow', 'labels', etc. You can provide this flag multiple times to process multiple metadata types at once.",
24
+ "hasDynamicHelp": false,
25
+ "multiple": true,
26
+ "type": "option"
27
+ },
28
+ "prepurge": {
29
+ "name": "prepurge",
30
+ "required": false,
31
+ "summary": "If provided, purge directories of pre-existing decomposed files.",
32
+ "allowNo": false,
33
+ "type": "boolean"
34
+ },
35
+ "postpurge": {
36
+ "name": "postpurge",
37
+ "required": false,
38
+ "summary": "If provided, purge the original files after decomposing them.",
39
+ "allowNo": false,
40
+ "type": "boolean"
41
+ },
42
+ "debug": {
43
+ "name": "debug",
44
+ "required": false,
45
+ "summary": "If provided, debug to log file.",
46
+ "allowNo": false,
47
+ "type": "boolean"
48
+ },
49
+ "format": {
50
+ "char": "f",
51
+ "name": "format",
52
+ "required": true,
53
+ "summary": "File format for the decomposed files.",
54
+ "default": "xml",
55
+ "hasDynamicHelp": false,
56
+ "multiple": false,
57
+ "options": [
58
+ "xml",
59
+ "json",
60
+ "yaml"
61
+ ],
62
+ "type": "option"
63
+ }
64
+ },
65
+ "hasDynamicHelp": false,
66
+ "hiddenAliases": [],
67
+ "id": "decomposer:decompose",
68
+ "pluginAlias": "sf-decomposer",
69
+ "pluginName": "sf-decomposer",
70
+ "pluginType": "core",
71
+ "strict": true,
72
+ "summary": "Decomposes the metadata files created by retrievals.",
73
+ "enableJsonFlag": true,
74
+ "isESM": true,
75
+ "relativePath": [
76
+ "lib",
77
+ "commands",
78
+ "decomposer",
79
+ "decompose.js"
80
+ ],
81
+ "aliasPermutations": [],
82
+ "permutations": [
83
+ "decomposer:decompose",
84
+ "decompose:decomposer"
85
+ ]
86
+ },
87
+ "decomposer:recompose": {
88
+ "aliases": [],
89
+ "args": {},
90
+ "description": "This command will read all of the decomposed files and recreate deployment compatible metadata files in each package directory.\n\nYou should run this before you deploy the metadata to an org.",
91
+ "examples": [
92
+ "`sf decomposer recompose -m \"flow\" -f \"xml\" --postpurge --debug`",
93
+ "`sf decomposer recompose -m \"flow\" -m \"labels\" -f \"xml\" --postpurge --debug`"
94
+ ],
95
+ "flags": {
96
+ "json": {
97
+ "description": "Format output as json.",
98
+ "helpGroup": "GLOBAL",
99
+ "name": "json",
100
+ "allowNo": false,
101
+ "type": "boolean"
102
+ },
103
+ "metadata-type": {
104
+ "char": "m",
105
+ "name": "metadata-type",
106
+ "required": true,
107
+ "summary": "The metadata suffix to process, such as 'flow', 'labels', etc. You can provide this flag multiple times to process multiple metadata types at once.",
108
+ "hasDynamicHelp": false,
109
+ "multiple": true,
110
+ "type": "option"
111
+ },
112
+ "postpurge": {
113
+ "name": "postpurge",
114
+ "required": false,
115
+ "summary": "If provided, purge the decomposed files after recomposing them.",
116
+ "allowNo": false,
117
+ "type": "boolean"
118
+ },
119
+ "debug": {
120
+ "name": "debug",
121
+ "required": false,
122
+ "summary": "If provided, debug to log file.",
123
+ "allowNo": false,
124
+ "type": "boolean"
125
+ },
126
+ "format": {
127
+ "char": "f",
128
+ "name": "format",
129
+ "required": true,
130
+ "summary": "File format for the decomposed files.",
131
+ "default": "xml",
132
+ "hasDynamicHelp": false,
133
+ "multiple": false,
134
+ "options": [
135
+ "xml",
136
+ "json",
137
+ "yaml"
138
+ ],
139
+ "type": "option"
140
+ }
141
+ },
142
+ "hasDynamicHelp": false,
143
+ "hiddenAliases": [],
144
+ "id": "decomposer:recompose",
145
+ "pluginAlias": "sf-decomposer",
146
+ "pluginName": "sf-decomposer",
147
+ "pluginType": "core",
148
+ "strict": true,
149
+ "summary": "Recomposes the files created by the `decompose` command prior to deployments.",
150
+ "enableJsonFlag": true,
151
+ "isESM": true,
152
+ "relativePath": [
153
+ "lib",
154
+ "commands",
155
+ "decomposer",
156
+ "recompose.js"
157
+ ],
158
+ "aliasPermutations": [],
159
+ "permutations": [
160
+ "decomposer:recompose",
161
+ "recompose:decomposer"
162
+ ]
163
+ }
164
+ },
165
+ "version": "4.0.0"
166
+ }
package/package.json ADDED
@@ -0,0 +1,202 @@
1
+ {
2
+ "name": "sf-decomposer",
3
+ "description": "Decomposes Salesforce metadata into more manageable files.",
4
+ "version": "4.0.0",
5
+ "dependencies": {
6
+ "@oclif/core": "^3.26.0",
7
+ "@salesforce/core": "^6.5.3",
8
+ "@salesforce/sf-plugins-core": "^7.1.9",
9
+ "@salesforce/source-deploy-retrieve": "^10.7.1",
10
+ "fs-extra": "^11.2.0",
11
+ "simple-git": "^3.24.0",
12
+ "xml-disassembler": "^1.2.10",
13
+ "xml2json-disassembler": "^1.0.4",
14
+ "xml2yaml-disassembler": "^1.0.2"
15
+ },
16
+ "devDependencies": {
17
+ "@commitlint/cli": "^18.6.1",
18
+ "@commitlint/config-conventional": "^18.6.3",
19
+ "@oclif/plugin-command-snapshot": "^5.0.8",
20
+ "@salesforce/cli-plugins-testkit": "^5.1.13",
21
+ "@salesforce/dev-scripts": "^8.3.0",
22
+ "@semantic-release/changelog": "^6.0.3",
23
+ "@semantic-release/commit-analyzer": "^11.1.0",
24
+ "@semantic-release/git": "^10.0.1",
25
+ "@semantic-release/github": "^9.2.6",
26
+ "@semantic-release/npm": "^11.0.2",
27
+ "@semantic-release/release-notes-generator": "^12.1.0",
28
+ "@types/fs-extra": "^11.0.4",
29
+ "eslint-plugin-sf-plugin": "^1.17.5",
30
+ "husky": "^9.0.11",
31
+ "oclif": "^4.4.10",
32
+ "semantic-release": "^17.4.7",
33
+ "shx": "0.3.4",
34
+ "ts-node": "^10.9.2",
35
+ "typescript": "^5.4.2"
36
+ },
37
+ "engines": {
38
+ "node": ">=18.0.0"
39
+ },
40
+ "files": [
41
+ "/lib",
42
+ "/messages",
43
+ "/oclif.manifest.json",
44
+ "/oclif.lock"
45
+ ],
46
+ "keywords": [
47
+ "force",
48
+ "salesforce",
49
+ "salesforcedx",
50
+ "sf",
51
+ "sf-plugin",
52
+ "sfdx",
53
+ "sfdx-plugin",
54
+ "git"
55
+ ],
56
+ "license": "MIT",
57
+ "oclif": {
58
+ "commands": "./lib/commands",
59
+ "bin": "sf",
60
+ "topicSeparator": " ",
61
+ "devPlugins": [
62
+ "@oclif/plugin-help"
63
+ ],
64
+ "hooks": {
65
+ "scopedPostRetrieve": "./lib/hooks/scopedPostRetrieve"
66
+ },
67
+ "flexibleTaxonomy": true
68
+ },
69
+ "scripts": {
70
+ "command-docs": "oclif readme",
71
+ "build": "tsc -b",
72
+ "clean": "sf-clean",
73
+ "clean-all": "sf-clean all",
74
+ "clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json oclif.lock",
75
+ "compile": "sf-compile",
76
+ "docs": "sf-docs",
77
+ "format": "sf-format",
78
+ "lint": "wireit",
79
+ "postpack": "shx rm -f oclif.manifest.json oclif.lock",
80
+ "prepack": "sf-prepack",
81
+ "prepare": "husky install",
82
+ "test": "wireit",
83
+ "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
84
+ "test:only": "wireit",
85
+ "version": "oclif readme"
86
+ },
87
+ "publishConfig": {
88
+ "access": "public"
89
+ },
90
+ "wireit": {
91
+ "build": {
92
+ "dependencies": [
93
+ "compile",
94
+ "lint"
95
+ ]
96
+ },
97
+ "compile": {
98
+ "command": "tsc -p . --pretty --incremental",
99
+ "files": [
100
+ "src/**/*.ts",
101
+ "**/tsconfig.json",
102
+ "messages/**"
103
+ ],
104
+ "output": [
105
+ "lib/**",
106
+ "*.tsbuildinfo"
107
+ ],
108
+ "clean": "if-file-deleted"
109
+ },
110
+ "format": {
111
+ "command": "prettier --write \"+(src|test|schemas)/**/*.+(ts|js|json)|command-snapshot.json\"",
112
+ "files": [
113
+ "src/**/*.ts",
114
+ "test/**/*.ts",
115
+ "schemas/**/*.json",
116
+ "command-snapshot.json",
117
+ ".prettier*"
118
+ ],
119
+ "output": []
120
+ },
121
+ "lint": {
122
+ "command": "eslint src test --color --cache --cache-location .eslintcache",
123
+ "files": [
124
+ "src/**/*.ts",
125
+ "test/**/*.ts",
126
+ "messages/**",
127
+ "**/.eslint*",
128
+ "**/tsconfig.json"
129
+ ],
130
+ "output": []
131
+ },
132
+ "test:compile": {
133
+ "command": "tsc -p \"./test\" --pretty",
134
+ "files": [
135
+ "test/**/*.ts",
136
+ "**/tsconfig.json"
137
+ ],
138
+ "output": []
139
+ },
140
+ "test": {
141
+ "dependencies": [
142
+ "test:compile",
143
+ "test:only",
144
+ "lint"
145
+ ]
146
+ },
147
+ "test:only": {
148
+ "command": "nyc mocha \"test/**/*.test.ts\"",
149
+ "env": {
150
+ "FORCE_COLOR": "2"
151
+ },
152
+ "files": [
153
+ "test/**/*.ts",
154
+ "src/**/*.ts",
155
+ "**/tsconfig.json",
156
+ ".mocha*",
157
+ "!*.nut.ts",
158
+ ".nycrc"
159
+ ],
160
+ "output": []
161
+ },
162
+ "test:command-reference": {
163
+ "command": "\"./bin/dev\" commandreference:generate --erroronwarnings",
164
+ "files": [
165
+ "src/**/*.ts",
166
+ "messages/**",
167
+ "package.json"
168
+ ],
169
+ "output": [
170
+ "tmp/root"
171
+ ]
172
+ },
173
+ "test:deprecation-policy": {
174
+ "command": "\"./bin/dev\" snapshot:compare",
175
+ "files": [
176
+ "src/**/*.ts"
177
+ ],
178
+ "output": [],
179
+ "dependencies": [
180
+ "compile"
181
+ ]
182
+ },
183
+ "test:json-schema": {
184
+ "command": "\"./bin/dev\" schema:compare",
185
+ "files": [
186
+ "src/**/*.ts",
187
+ "schemas"
188
+ ],
189
+ "output": []
190
+ }
191
+ },
192
+ "exports": "./lib/index.js",
193
+ "type": "module",
194
+ "author": "Matt Carvin",
195
+ "repository": {
196
+ "type": "git",
197
+ "url": "git+https://github.com/mcarvin8/sf-decomposer.git"
198
+ },
199
+ "bugs": {
200
+ "url": "https://github.com/mcarvin8/sf-decomposer/issues"
201
+ }
202
+ }