@simplysf/simply-document 0.2.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 +253 -0
- package/lib/commands/simply/document/diff.d.ts +25 -0
- package/lib/commands/simply/document/diff.js +232 -0
- package/lib/commands/simply/document/diff.js.map +1 -0
- package/lib/commands/simply/document/generate.d.ts +25 -0
- package/lib/commands/simply/document/generate.js +466 -0
- package/lib/commands/simply/document/generate.js.map +1 -0
- package/lib/common/changeReportTemplate.d.ts +22 -0
- package/lib/common/changeReportTemplate.js +269 -0
- package/lib/common/changeReportTemplate.js.map +1 -0
- package/lib/common/technicalDesignDocumentTemplate.d.ts +211 -0
- package/lib/common/technicalDesignDocumentTemplate.js +1254 -0
- package/lib/common/technicalDesignDocumentTemplate.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +17 -0
- package/lib/index.js.map +1 -0
- package/messages/simply.document.diff.md +63 -0
- package/messages/simply.document.generate.md +61 -0
- package/package.json +210 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"technicalDesignDocumentTemplate.js","sourceRoot":"","sources":["../../src/common/technicalDesignDocumentTemplate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AA0HpC,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC;AAEvC,UAAU,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,OAAe,EAAU,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;AAEtF,MAAM,6BAA6B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;CAisCrC,CAAC;AAEF,MAAM,6BAA6B,GAAG,UAAU,CAAC,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAExF;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,gCAAgC,CAC9C,IAAiC,EACjC,oBAA6B;IAE7B,MAAM,MAAM,GAAG,oBAAoB,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,6BAA6B,CAAC;IAC/G,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC"}
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, Clay Chipps; Copyright (c) 2026 Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export default {};
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Generate a change report between two git refs.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Runs `git diff --name-status` between two git refs (tags, branches, or commits) in the current working directory, groups the changed files by Salesforce metadata component type, and renders a Confluence-storage-format change report suitable for pasting into a release or change-management page.
|
|
8
|
+
|
|
9
|
+
# flags.from-tag.summary
|
|
10
|
+
|
|
11
|
+
The starting git ref for the diff report.
|
|
12
|
+
|
|
13
|
+
# flags.to-tag.summary
|
|
14
|
+
|
|
15
|
+
The ending git ref for the diff report.
|
|
16
|
+
|
|
17
|
+
# flags.output-file.summary
|
|
18
|
+
|
|
19
|
+
Path to write the generated report to.
|
|
20
|
+
|
|
21
|
+
# flags.output-file.description
|
|
22
|
+
|
|
23
|
+
When specified, the generated report is written to this path instead of being printed to the terminal.
|
|
24
|
+
|
|
25
|
+
# flags.template-file.summary
|
|
26
|
+
|
|
27
|
+
Path to a custom Handlebars template to render instead of the built-in one.
|
|
28
|
+
|
|
29
|
+
# flags.template-file.description
|
|
30
|
+
|
|
31
|
+
When specified, this template is rendered with the same data the built-in report template receives, and can reuse the built-in `changeTable` partial. See this package's README "Custom Templates" section for the data shape and available partials.
|
|
32
|
+
|
|
33
|
+
# flags.output-format.summary
|
|
34
|
+
|
|
35
|
+
Output format to render the report in.
|
|
36
|
+
|
|
37
|
+
# flags.output-format.description
|
|
38
|
+
|
|
39
|
+
Currently only `html` is supported. Reserved for future formats (e.g. Markdown).
|
|
40
|
+
|
|
41
|
+
# examples
|
|
42
|
+
|
|
43
|
+
- <%= config.bin %> <%= command.id %> --from-tag v1.0.0 --to-tag v1.1.0
|
|
44
|
+
|
|
45
|
+
- <%= config.bin %> <%= command.id %> --from-tag v1.0.0 --to-tag v1.1.0 --output-file change-report.html
|
|
46
|
+
|
|
47
|
+
- <%= config.bin %> <%= command.id %> --from-tag v1.0.0 --to-tag v1.1.0 --template-file my-change-report.hbs
|
|
48
|
+
|
|
49
|
+
# error.gitDiffFailed
|
|
50
|
+
|
|
51
|
+
Failed to run git diff: %s
|
|
52
|
+
|
|
53
|
+
# error.unsupportedOutputFormat
|
|
54
|
+
|
|
55
|
+
Unsupported output format: %s
|
|
56
|
+
|
|
57
|
+
# info.generatingDiff
|
|
58
|
+
|
|
59
|
+
Generating change report from %s to %s...
|
|
60
|
+
|
|
61
|
+
# info.complete
|
|
62
|
+
|
|
63
|
+
Change report written to %s
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Generate a technical design document for a Salesforce project.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Scans a Salesforce DX project's source directory for metadata (objects, fields, Apex, Lightning components, flows, permissions, and more) and renders a Confluence-storage-format technical design document covering the data model, security model, groups/queues/permissions, solution inventory, and custom code inventory.
|
|
8
|
+
|
|
9
|
+
# flags.directory.summary
|
|
10
|
+
|
|
11
|
+
Salesforce project source directory to scan.
|
|
12
|
+
|
|
13
|
+
# flags.output-file.summary
|
|
14
|
+
|
|
15
|
+
Path to write the generated document to.
|
|
16
|
+
|
|
17
|
+
# flags.template-file.summary
|
|
18
|
+
|
|
19
|
+
Path to a custom Handlebars template to render instead of the built-in one.
|
|
20
|
+
|
|
21
|
+
# flags.template-file.description
|
|
22
|
+
|
|
23
|
+
When specified, this template is rendered with the same scanned project data the built-in technical design document template receives, and can reuse the built-in `loud` helper. See this package's README "Custom Templates" section for the data shape.
|
|
24
|
+
|
|
25
|
+
# flags.output-format.summary
|
|
26
|
+
|
|
27
|
+
Output format to render the document in.
|
|
28
|
+
|
|
29
|
+
# flags.output-format.description
|
|
30
|
+
|
|
31
|
+
Currently only `html` is supported. Reserved for future formats (e.g. Markdown).
|
|
32
|
+
|
|
33
|
+
# examples
|
|
34
|
+
|
|
35
|
+
- <%= config.bin %> <%= command.id %> --directory force-app --output-file technical-design-document.html
|
|
36
|
+
|
|
37
|
+
- <%= config.bin %> <%= command.id %> --directory force-app --output-file technical-design-document.html --template-file my-tdd-template.hbs
|
|
38
|
+
|
|
39
|
+
# error.scanFailed
|
|
40
|
+
|
|
41
|
+
Failed to scan the project directory: %s
|
|
42
|
+
|
|
43
|
+
# error.unsupportedOutputFormat
|
|
44
|
+
|
|
45
|
+
Unsupported output format: %s
|
|
46
|
+
|
|
47
|
+
# info.scanningProject
|
|
48
|
+
|
|
49
|
+
Scanning Salesforce project directory...
|
|
50
|
+
|
|
51
|
+
# info.mappingObjects
|
|
52
|
+
|
|
53
|
+
Processing and mapping custom/standard objects...
|
|
54
|
+
|
|
55
|
+
# info.renderingDocument
|
|
56
|
+
|
|
57
|
+
Rendering technical design document...
|
|
58
|
+
|
|
59
|
+
# info.complete
|
|
60
|
+
|
|
61
|
+
Technical design document written to %s
|
package/package.json
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@simplysf/simply-document",
|
|
3
|
+
"description": "Utilities for generating project documentation",
|
|
4
|
+
"version": "0.2.0",
|
|
5
|
+
"author": "@ClayChipps",
|
|
6
|
+
"homepage": "https://github.com/SimplySF/simply-node",
|
|
7
|
+
"bugs": "https://github.com/SimplySF/simply-node/issues",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/SimplySF/simply-node",
|
|
11
|
+
"directory": "packages/simply-document"
|
|
12
|
+
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=22.0.0"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"/lib",
|
|
18
|
+
"/messages",
|
|
19
|
+
"/npm-shrinkwrap.json",
|
|
20
|
+
"/oclif.lock",
|
|
21
|
+
"/oclif.manifest.json"
|
|
22
|
+
],
|
|
23
|
+
"keywords": [
|
|
24
|
+
"force",
|
|
25
|
+
"salesforce",
|
|
26
|
+
"sfdx",
|
|
27
|
+
"salesforcedx",
|
|
28
|
+
"sfdx-plugin",
|
|
29
|
+
"sf-plugin",
|
|
30
|
+
"sf"
|
|
31
|
+
],
|
|
32
|
+
"license": "Apache-2.0",
|
|
33
|
+
"exports": "./lib/index.js",
|
|
34
|
+
"type": "module",
|
|
35
|
+
"oclif": {
|
|
36
|
+
"bin": "sf",
|
|
37
|
+
"commands": "./lib/commands",
|
|
38
|
+
"devPlugins": [
|
|
39
|
+
"@oclif/plugin-command-snapshot",
|
|
40
|
+
"@oclif/plugin-help",
|
|
41
|
+
"@salesforce/plugin-command-reference"
|
|
42
|
+
],
|
|
43
|
+
"flexibleTaxonomy": true,
|
|
44
|
+
"plugins": [],
|
|
45
|
+
"repositoryPrefix": "<%- repo %>/blob/@simplysf/simply-document@<%- version %>/packages/simply-document/<%- commandPath %>",
|
|
46
|
+
"topics": {
|
|
47
|
+
"simply": {
|
|
48
|
+
"description": "Commands for simplifying Salesforce",
|
|
49
|
+
"subtopics": {
|
|
50
|
+
"document": {
|
|
51
|
+
"description": "Commands for generating project documentation"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"topicSeparator": " "
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@oclif/core": "^4.11.2",
|
|
60
|
+
"@salesforce/core": "^8.30.0",
|
|
61
|
+
"@salesforce/sf-plugins-core": "^12.2.16",
|
|
62
|
+
"@salesforce/source-deploy-retrieve": "^12.37.2",
|
|
63
|
+
"@salesforce/ts-types": "^2.0.12",
|
|
64
|
+
"handlebars": "^4.7.9"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@oclif/plugin-command-snapshot": "^5.3.19",
|
|
68
|
+
"@salesforce/plugin-command-reference": "^3.1.99",
|
|
69
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
70
|
+
"vitest": "^4.1.10"
|
|
71
|
+
},
|
|
72
|
+
"publishConfig": {
|
|
73
|
+
"access": "public"
|
|
74
|
+
},
|
|
75
|
+
"scripts": {
|
|
76
|
+
"build": "wireit",
|
|
77
|
+
"compile": "wireit",
|
|
78
|
+
"fix-license": "eslint src test --fix --rule \"header/header: [2]\"",
|
|
79
|
+
"format": "wireit",
|
|
80
|
+
"link-check": "wireit",
|
|
81
|
+
"lint": "wireit",
|
|
82
|
+
"readme": "oclif readme --no-aliases",
|
|
83
|
+
"test": "wireit",
|
|
84
|
+
"test:coverage": "vitest run --coverage --project simply-document",
|
|
85
|
+
"test:nuts": "vitest run --config vitest.nuts.config.ts --project simply-document",
|
|
86
|
+
"test:only": "wireit",
|
|
87
|
+
"test:watch": "vitest watch --project simply-document"
|
|
88
|
+
},
|
|
89
|
+
"wireit": {
|
|
90
|
+
"build": {
|
|
91
|
+
"dependencies": [
|
|
92
|
+
"command-snapshot",
|
|
93
|
+
"compile",
|
|
94
|
+
"lint"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"compile": {
|
|
98
|
+
"command": "tsc -p . --pretty --incremental",
|
|
99
|
+
"files": [
|
|
100
|
+
"src/**/*.ts",
|
|
101
|
+
"**/tsconfig.json",
|
|
102
|
+
"../../tsconfig.json",
|
|
103
|
+
"messages/**"
|
|
104
|
+
],
|
|
105
|
+
"output": [
|
|
106
|
+
"lib/**",
|
|
107
|
+
"*.tsbuildinfo"
|
|
108
|
+
],
|
|
109
|
+
"clean": "if-file-deleted"
|
|
110
|
+
},
|
|
111
|
+
"format": {
|
|
112
|
+
"command": "prettier --write \"+(src|test|schemas)/**/*.+(ts|js|json)|command-snapshot.json\"",
|
|
113
|
+
"files": [
|
|
114
|
+
"src/**/*.ts",
|
|
115
|
+
"test/**/*.ts",
|
|
116
|
+
"schemas/**/*.json",
|
|
117
|
+
"command-snapshot.json",
|
|
118
|
+
".prettier*"
|
|
119
|
+
],
|
|
120
|
+
"output": []
|
|
121
|
+
},
|
|
122
|
+
"lint": {
|
|
123
|
+
"command": "eslint src test --color --cache --cache-location .eslintcache",
|
|
124
|
+
"files": [
|
|
125
|
+
"src/**/*.ts",
|
|
126
|
+
"test/**/*.ts",
|
|
127
|
+
"messages/**",
|
|
128
|
+
"**/.eslint*",
|
|
129
|
+
"**/tsconfig.json",
|
|
130
|
+
"../../eslint.config.mjs",
|
|
131
|
+
"../../tsconfig.json"
|
|
132
|
+
],
|
|
133
|
+
"output": []
|
|
134
|
+
},
|
|
135
|
+
"test": {
|
|
136
|
+
"dependencies": [
|
|
137
|
+
"test:compile",
|
|
138
|
+
"test:only",
|
|
139
|
+
"test:command-reference",
|
|
140
|
+
"lint",
|
|
141
|
+
"test:json-schema",
|
|
142
|
+
"link-check"
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
"test:command-reference": {
|
|
146
|
+
"command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" commandreference:generate --erroronwarnings",
|
|
147
|
+
"files": [
|
|
148
|
+
"src/**/*.ts",
|
|
149
|
+
"messages/**",
|
|
150
|
+
"package.json"
|
|
151
|
+
],
|
|
152
|
+
"output": [
|
|
153
|
+
"tmp/root"
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
"command-snapshot": {
|
|
157
|
+
"command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" snapshot:generate && prettier --write command-snapshot.json",
|
|
158
|
+
"files": [
|
|
159
|
+
"src/**/*.ts"
|
|
160
|
+
],
|
|
161
|
+
"output": [
|
|
162
|
+
"command-snapshot.json"
|
|
163
|
+
],
|
|
164
|
+
"dependencies": [
|
|
165
|
+
"compile"
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
"test:json-schema": {
|
|
169
|
+
"command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" schema:compare",
|
|
170
|
+
"files": [
|
|
171
|
+
"src/**/*.ts",
|
|
172
|
+
"schemas"
|
|
173
|
+
],
|
|
174
|
+
"output": []
|
|
175
|
+
},
|
|
176
|
+
"test:compile": {
|
|
177
|
+
"command": "tsc -p \"./test\" --pretty",
|
|
178
|
+
"files": [
|
|
179
|
+
"test/**/*.ts",
|
|
180
|
+
"**/tsconfig.json",
|
|
181
|
+
"../../tsconfig.json"
|
|
182
|
+
],
|
|
183
|
+
"output": []
|
|
184
|
+
},
|
|
185
|
+
"test:only": {
|
|
186
|
+
"command": "vitest run --project simply-document",
|
|
187
|
+
"env": {
|
|
188
|
+
"FORCE_COLOR": "2"
|
|
189
|
+
},
|
|
190
|
+
"files": [
|
|
191
|
+
"test/**/*.ts",
|
|
192
|
+
"src/**/*.ts",
|
|
193
|
+
"**/tsconfig.json",
|
|
194
|
+
"../../tsconfig.json",
|
|
195
|
+
"vitest.config.ts",
|
|
196
|
+
"!*.nut.ts"
|
|
197
|
+
],
|
|
198
|
+
"output": []
|
|
199
|
+
},
|
|
200
|
+
"link-check": {
|
|
201
|
+
"command": "node -e \"process.exit(process.env.CI ? 0 : 1)\" || linkinator \"**/*.md\" --skip \"CHANGELOG.md|node_modules|test/|confluence.internal.salesforce.com|my.salesforce.com|localhost|blob/.*/lib/|%s\" --markdown --retry --directory-listing --verbosity error",
|
|
202
|
+
"files": [
|
|
203
|
+
"./*.md",
|
|
204
|
+
"./!(CHANGELOG).md",
|
|
205
|
+
"messages/**/*.md"
|
|
206
|
+
],
|
|
207
|
+
"output": []
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|