@cparra/apexdocs 3.3.0-alpha.0 → 3.3.1
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 +3 -3
- package/dist/cli/generate.js +54 -54
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2 -10
- package/dist/{logger-DIyKhj0a.js → logger-Q5m1eQv2.js} +27 -10
- package/package.json +3 -4
- package/dist/defaults-BcE8DTat.js +0 -13
- package/dist/defaults-D07y_bq4.js +0 -40
- package/dist/defaults-DGKfeZq-.js +0 -13
- package/dist/defaults-gPzwP66p.js +0 -14
- package/dist/logger-B2A8nHRs.js +0 -3606
- package/dist/logger-B5u-6nWE.js +0 -3591
- package/dist/logger-BATX7-be.js +0 -3278
- package/dist/logger-BEbUIfqN.js +0 -3282
- package/dist/logger-BGuf1PnL.js +0 -3281
- package/dist/logger-BXUC1ahq.js +0 -3286
- package/dist/logger-BcdDreNr.js +0 -3530
- package/dist/logger-BfBICfFT.js +0 -3563
- package/dist/logger-Bgcwkvk-.js +0 -3285
- package/dist/logger-BkOBDUBk.js +0 -3285
- package/dist/logger-Bzta93eQ.js +0 -3585
- package/dist/logger-C3kCwNpQ.js +0 -3696
- package/dist/logger-CI-X0fAY.js +0 -3557
- package/dist/logger-CJkeJmPo.js +0 -3587
- package/dist/logger-CWBRF2za.js +0 -3284
- package/dist/logger-CWGrKpqK.js +0 -3563
- package/dist/logger-Caah2QkF.js +0 -3655
- package/dist/logger-CdBmDEN1.js +0 -3283
- package/dist/logger-Ce4QqPFR.js +0 -3278
- package/dist/logger-CnilRXR3.js +0 -3582
- package/dist/logger-Co5Tpv_S.js +0 -3590
- package/dist/logger-CyEVYaAC.js +0 -3284
- package/dist/logger-D7a83ycP.js +0 -3277
- package/dist/logger-DACnhhgx.js +0 -3556
- package/dist/logger-DGaHeBKk.js +0 -3279
- package/dist/logger-DQcjS-4R.js +0 -3551
- package/dist/logger-DY_QM8Kh.js +0 -3284
- package/dist/logger-DiWszgHt.js +0 -3559
- package/dist/logger-Dqhl_lO_.js +0 -3278
- package/dist/logger-DyoX8rF_.js +0 -3693
- package/dist/logger-aySSWi0G.js +0 -3280
- package/dist/logger-azR-eh1k.js +0 -3290
- package/dist/logger-qLCcAtiy.js +0 -3284
- package/dist/logger-sq_8g3m0.js +0 -3286
- package/dist/logger-ym_OFInF.js +0 -3582
- package/dist/logger-zIT1H0bw.js +0 -3595
package/README.md
CHANGED
|
@@ -168,6 +168,7 @@ apexdocs openapi -s force-app -t docs -n MyNamespace --title "My Custom OpenApi
|
|
|
168
168
|
| `--targetDir` | `-t` | The directory location where the changelog file will be generated. | `./docs/` | No |
|
|
169
169
|
| `--fileName` | N/A | The name of the changelog file to be generated. | `changelog` | No |
|
|
170
170
|
| `--scope` | N/A | The list of scope to respect when generating the changelog. | ['global'] | No |
|
|
171
|
+
| `--skipIfNoChanges` | N/A | Whether to skip generating the changelog if there are no changes. | `true` | No |
|
|
171
172
|
|
|
172
173
|
#### Sample Usage
|
|
173
174
|
|
|
@@ -263,9 +264,8 @@ export default {
|
|
|
263
264
|
|
|
264
265
|
Then you only need to run the top level `apexdocs` command, and it will generate both types of documentation.
|
|
265
266
|
|
|
266
|
-
|
|
267
|
-
apexdocs
|
|
268
|
-
```
|
|
267
|
+
Note that you can still run the individual commands if you only want to generate one type of documentation by
|
|
268
|
+
providing the subcommand, e.g `apexdocs markdown` or `apexdocs changelog`.
|
|
269
269
|
|
|
270
270
|
### Excluding Tags from Appearing in the Documentation
|
|
271
271
|
|
package/dist/cli/generate.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var logger$1 = require('../logger-
|
|
4
|
+
var logger$1 = require('../logger-Q5m1eQv2.js');
|
|
5
|
+
var module$1 = require('module');
|
|
5
6
|
var cosmiconfig = require('cosmiconfig');
|
|
6
|
-
var yargs = require('yargs');
|
|
7
7
|
var E = require('fp-ts/Either');
|
|
8
8
|
var cosmiconfigTypescriptLoader = require('cosmiconfig-typescript-loader');
|
|
9
9
|
var _function = require('fp-ts/function');
|
|
10
10
|
require('fp-ts/TaskEither');
|
|
11
|
-
require('simple-git');
|
|
12
11
|
require('js-yaml');
|
|
13
12
|
require('path');
|
|
14
13
|
require('fp-ts/Task');
|
|
@@ -21,30 +20,34 @@ require('fp-ts/boolean');
|
|
|
21
20
|
require('fs');
|
|
22
21
|
require('fp-ts/lib/TaskEither');
|
|
23
22
|
require('minimatch');
|
|
24
|
-
require('node:path');
|
|
25
|
-
require('node:fs');
|
|
26
23
|
require('chalk');
|
|
27
24
|
|
|
25
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
28
26
|
function _interopNamespaceDefault(e) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
var n = Object.create(null);
|
|
28
|
+
if (e) {
|
|
29
|
+
Object.keys(e).forEach(function (k) {
|
|
30
|
+
if (k !== 'default') {
|
|
31
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
32
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return e[k]; }
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
n.default = e;
|
|
40
|
+
return Object.freeze(n);
|
|
43
41
|
}
|
|
44
42
|
|
|
45
|
-
var yargs__namespace = /*#__PURE__*/_interopNamespaceDefault(yargs);
|
|
46
43
|
var E__namespace = /*#__PURE__*/_interopNamespaceDefault(E);
|
|
47
44
|
|
|
45
|
+
var require$1 = (
|
|
46
|
+
false
|
|
47
|
+
? /* @__PURE__ */ module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli/generate.js', document.baseURI).href)))
|
|
48
|
+
: require
|
|
49
|
+
);
|
|
50
|
+
|
|
48
51
|
const markdownOptions = {
|
|
49
52
|
sourceDir: {
|
|
50
53
|
type: "string",
|
|
@@ -136,18 +139,7 @@ const changeLogOptions = {
|
|
|
136
139
|
type: "string",
|
|
137
140
|
alias: "p",
|
|
138
141
|
demandOption: true,
|
|
139
|
-
describe: "The directory location of the previous version of the source code.
|
|
140
|
-
},
|
|
141
|
-
// TODO: Validate that if previousGitReference is provided, repoPath is also provided.
|
|
142
|
-
repoPath: {
|
|
143
|
-
type: "string",
|
|
144
|
-
alias: "g",
|
|
145
|
-
describe: "The path to the git repository. Must be provided if previousGitReference is provided."
|
|
146
|
-
},
|
|
147
|
-
previousGitReference: {
|
|
148
|
-
type: "string",
|
|
149
|
-
alias: "r",
|
|
150
|
-
describe: "The git reference of the previous version of the source code."
|
|
142
|
+
describe: "The directory location of the previous version of the source code."
|
|
151
143
|
},
|
|
152
144
|
currentVersionDir: {
|
|
153
145
|
type: "string",
|
|
@@ -172,6 +164,11 @@ const changeLogOptions = {
|
|
|
172
164
|
alias: "s",
|
|
173
165
|
default: logger$1.changeLogDefaults.scope,
|
|
174
166
|
describe: "The list of scope to respect when generating the changelog. Values should be separated by a space, e.g --scope global public namespaceaccessible. Annotations are supported and should be passed lowercased and without the @ symbol, e.g. namespaceaccessible auraenabled."
|
|
167
|
+
},
|
|
168
|
+
skipIfNoChanges: {
|
|
169
|
+
type: "boolean",
|
|
170
|
+
default: logger$1.changeLogDefaults.skipIfNoChanges,
|
|
171
|
+
describe: "Skip the changelog generation if there are no changes between the previous and current version."
|
|
175
172
|
}
|
|
176
173
|
};
|
|
177
174
|
|
|
@@ -214,6 +211,7 @@ var __async$1 = (__this, __arguments, generator) => {
|
|
|
214
211
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
215
212
|
});
|
|
216
213
|
};
|
|
214
|
+
const yargs = require$1("yargs");
|
|
217
215
|
const configOnlyMarkdownDefaults = {
|
|
218
216
|
targetGenerator: "markdown",
|
|
219
217
|
excludeTags: [],
|
|
@@ -279,22 +277,32 @@ function extractArgsForCommandProvidedThroughCli(extractFromProcessFn, config) {
|
|
|
279
277
|
}
|
|
280
278
|
}
|
|
281
279
|
function extractArgsForCommandsProvidedInConfig(extractFromProcessFn, config) {
|
|
282
|
-
const
|
|
280
|
+
const providedThroughCli = yargs.parseSync(extractFromProcessFn());
|
|
281
|
+
const hasACommandBeenProvided = providedThroughCli._.length > 0;
|
|
282
|
+
const configs = Object.entries(config).filter(([generator]) => hasACommandBeenProvided ? providedThroughCli._[0] === generator : true).map(([generator, generatorConfig]) => {
|
|
283
283
|
switch (generator) {
|
|
284
284
|
case "markdown":
|
|
285
285
|
return _function.pipe(
|
|
286
|
-
|
|
287
|
-
E__namespace.map(() =>
|
|
286
|
+
extractMultiCommandConfig(extractFromProcessFn, "markdown", generatorConfig),
|
|
287
|
+
E__namespace.map((cliArgs) => {
|
|
288
|
+
console.log("markdown", cliArgs);
|
|
289
|
+
return cliArgs;
|
|
290
|
+
}),
|
|
291
|
+
E__namespace.map((cliArgs) => __spreadValues(__spreadValues(__spreadValues({}, configOnlyMarkdownDefaults), generatorConfig), cliArgs))
|
|
288
292
|
);
|
|
289
293
|
case "openapi":
|
|
290
294
|
return _function.pipe(
|
|
291
|
-
|
|
292
|
-
E__namespace.map(() => __spreadValues(__spreadValues({}, configOnlyOpenApiDefaults), generatorConfig))
|
|
295
|
+
extractMultiCommandConfig(extractFromProcessFn, "openapi", generatorConfig),
|
|
296
|
+
E__namespace.map((cliArgs) => __spreadValues(__spreadValues(__spreadValues({}, configOnlyOpenApiDefaults), generatorConfig), cliArgs))
|
|
293
297
|
);
|
|
294
298
|
case "changelog":
|
|
295
299
|
return _function.pipe(
|
|
296
|
-
|
|
297
|
-
E__namespace.map(() =>
|
|
300
|
+
extractMultiCommandConfig(extractFromProcessFn, "changelog", generatorConfig),
|
|
301
|
+
E__namespace.map((cliArgs) => {
|
|
302
|
+
console.log("changelog", cliArgs);
|
|
303
|
+
return cliArgs;
|
|
304
|
+
}),
|
|
305
|
+
E__namespace.map((cliArgs) => __spreadValues(__spreadValues(__spreadValues({}, configOnlyChangelogDefaults), generatorConfig), cliArgs))
|
|
298
306
|
);
|
|
299
307
|
}
|
|
300
308
|
});
|
|
@@ -321,21 +329,21 @@ function getConfigType(config) {
|
|
|
321
329
|
return E__namespace.right({ _type: "single-command-config" });
|
|
322
330
|
}
|
|
323
331
|
function extractYargsDemandingCommand(extractFromProcessFn, config) {
|
|
324
|
-
return
|
|
332
|
+
return yargs.config(config.config).command(
|
|
325
333
|
"markdown",
|
|
326
334
|
"Generate documentation from Apex classes as a Markdown site.",
|
|
327
335
|
(yargs2) => yargs2.options(markdownOptions)
|
|
328
336
|
).command(
|
|
329
337
|
"openapi",
|
|
330
338
|
"Generate an OpenApi REST specification from Apex classes.",
|
|
331
|
-
() =>
|
|
339
|
+
() => yargs.options(openApiOptions)
|
|
332
340
|
).command(
|
|
333
341
|
"changelog",
|
|
334
342
|
"Generate a changelog from 2 versions of the source code.",
|
|
335
|
-
() =>
|
|
343
|
+
() => yargs.options(changeLogOptions)
|
|
336
344
|
).demandCommand().parseSync(extractFromProcessFn());
|
|
337
345
|
}
|
|
338
|
-
function
|
|
346
|
+
function extractMultiCommandConfig(extractFromProcessFn, command, config) {
|
|
339
347
|
function getOptions(generator) {
|
|
340
348
|
switch (generator) {
|
|
341
349
|
case "markdown":
|
|
@@ -347,19 +355,11 @@ function validateMultiCommandConfig(extractFromProcessFn, command, config) {
|
|
|
347
355
|
}
|
|
348
356
|
}
|
|
349
357
|
const options = getOptions(command);
|
|
358
|
+
console.log("config", config);
|
|
350
359
|
return E__namespace.tryCatch(() => {
|
|
351
|
-
|
|
352
|
-
if (argv._.length > 0) {
|
|
353
|
-
throw new Error(
|
|
354
|
-
`Unexpected command "${argv._[0]}".
|
|
355
|
-
The command name should be provided in the configuration when using the current configuration format.`
|
|
356
|
-
);
|
|
357
|
-
} else {
|
|
358
|
-
return true;
|
|
359
|
-
}
|
|
360
|
-
}).fail((msg) => {
|
|
360
|
+
return yargs(extractFromProcessFn()).config(config).options(options).fail((msg) => {
|
|
361
361
|
throw new Error(`Invalid configuration for command "${command}": ${msg}`);
|
|
362
|
-
}).
|
|
362
|
+
}).parseSync();
|
|
363
363
|
}, E__namespace.toError);
|
|
364
364
|
}
|
|
365
365
|
|
package/dist/index.d.ts
CHANGED
|
@@ -40,13 +40,12 @@ type UserDefinedOpenApiConfig = {
|
|
|
40
40
|
type UserDefinedChangelogConfig = {
|
|
41
41
|
targetGenerator: 'changelog';
|
|
42
42
|
previousVersionDir: string;
|
|
43
|
-
repoPath?: string;
|
|
44
|
-
previousGitReference?: string;
|
|
45
43
|
currentVersionDir: string;
|
|
46
44
|
targetDir: string;
|
|
47
45
|
fileName: string;
|
|
48
46
|
scope: string[];
|
|
49
47
|
exclude: string[];
|
|
48
|
+
skipIfNoChanges: boolean;
|
|
50
49
|
};
|
|
51
50
|
|
|
52
51
|
type UserDefinedConfig = UserDefinedMarkdownConfig | UserDefinedOpenApiConfig | UserDefinedChangelogConfig;
|
|
@@ -138,6 +137,11 @@ type TransformDocPage = (
|
|
|
138
137
|
doc: DocPageData,
|
|
139
138
|
) => Partial<ConfigurableDocPageData> | Promise<Partial<ConfigurableDocPageData>>;
|
|
140
139
|
|
|
140
|
+
/**
|
|
141
|
+
* Represents a file to be skipped.
|
|
142
|
+
*/
|
|
143
|
+
declare function skip(): Skip;
|
|
144
|
+
|
|
141
145
|
type CallableConfig = Partial<UserDefinedConfig> & {
|
|
142
146
|
sourceDir: string;
|
|
143
147
|
targetGenerator: Generators;
|
|
@@ -166,9 +170,5 @@ type ConfigurableChangelogConfig = Omit<Partial<UserDefinedChangelogConfig>, 'ta
|
|
|
166
170
|
* @param config The configuration to use.
|
|
167
171
|
*/
|
|
168
172
|
declare function defineChangelogConfig(config: ConfigurableChangelogConfig): Partial<UserDefinedChangelogConfig>;
|
|
169
|
-
/**
|
|
170
|
-
* Represents a file to be skipped.
|
|
171
|
-
*/
|
|
172
|
-
declare function skip(): Skip;
|
|
173
173
|
|
|
174
174
|
export { type ConfigurableChangelogConfig, type ConfigurableDocPageData, type ConfigurableDocPageReference, type ConfigurableHooks, type ConfigurableMarkdownConfig, type ConfigurableOpenApiConfig, type DocPageData, type DocPageReference, type ReferenceGuidePageData, type Skip, type TransformDocPage, type TransformDocs, type TransformReference, type TransformReferenceGuide, defineChangelogConfig, defineMarkdownConfig, defineOpenApiConfig, process, skip };
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
3
|
+
var logger = require('./logger-Q5m1eQv2.js');
|
|
4
4
|
var E = require('fp-ts/Either');
|
|
5
5
|
require('fp-ts/function');
|
|
6
6
|
require('fp-ts/TaskEither');
|
|
7
|
-
require('simple-git');
|
|
8
7
|
require('js-yaml');
|
|
9
8
|
require('path');
|
|
10
9
|
require('fp-ts/Task');
|
|
@@ -17,8 +16,6 @@ require('fp-ts/boolean');
|
|
|
17
16
|
require('fs');
|
|
18
17
|
require('fp-ts/lib/TaskEither');
|
|
19
18
|
require('minimatch');
|
|
20
|
-
require('node:path');
|
|
21
|
-
require('node:fs');
|
|
22
19
|
require('chalk');
|
|
23
20
|
|
|
24
21
|
function _interopNamespaceDefault(e) {
|
|
@@ -140,14 +137,9 @@ function defineChangelogConfig(config) {
|
|
|
140
137
|
targetGenerator: "changelog"
|
|
141
138
|
});
|
|
142
139
|
}
|
|
143
|
-
function skip() {
|
|
144
|
-
return {
|
|
145
|
-
_tag: "Skip"
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
140
|
|
|
141
|
+
exports.skip = logger.skip;
|
|
149
142
|
exports.defineChangelogConfig = defineChangelogConfig;
|
|
150
143
|
exports.defineMarkdownConfig = defineMarkdownConfig;
|
|
151
144
|
exports.defineOpenApiConfig = defineOpenApiConfig;
|
|
152
145
|
exports.process = process;
|
|
153
|
-
exports.skip = skip;
|
|
@@ -1355,7 +1355,8 @@ const openApiDefaults = __spreadProps$b(__spreadValues$b({}, commonDefaults), {
|
|
|
1355
1355
|
const changeLogDefaults = __spreadProps$b(__spreadValues$b({}, commonDefaults), {
|
|
1356
1356
|
fileName: "changelog",
|
|
1357
1357
|
scope: ["global"],
|
|
1358
|
-
exclude: []
|
|
1358
|
+
exclude: [],
|
|
1359
|
+
skipIfNoChanges: true
|
|
1359
1360
|
});
|
|
1360
1361
|
|
|
1361
1362
|
const convertToDocumentationBundle = (referenceGuideTitle, referenceGuideTemplate, { referencesByGroup, renderables }) => ({
|
|
@@ -1603,6 +1604,11 @@ function sortClassMembers(shouldSort, classType) {
|
|
|
1603
1604
|
});
|
|
1604
1605
|
}
|
|
1605
1606
|
|
|
1607
|
+
function skip() {
|
|
1608
|
+
return {
|
|
1609
|
+
_tag: "Skip"
|
|
1610
|
+
};
|
|
1611
|
+
}
|
|
1606
1612
|
function isSkip(value) {
|
|
1607
1613
|
return Object.prototype.hasOwnProperty.call(value, "_tag") && value._tag === "Skip";
|
|
1608
1614
|
}
|
|
@@ -3057,6 +3063,9 @@ function areMethodsEqual(method1, method2) {
|
|
|
3057
3063
|
return true;
|
|
3058
3064
|
}
|
|
3059
3065
|
|
|
3066
|
+
function hasChanges(changelog) {
|
|
3067
|
+
return changelog.newTypes.length > 0 || changelog.removedTypes.length > 0 || changelog.newOrModifiedMembers.length > 0;
|
|
3068
|
+
}
|
|
3060
3069
|
function processChangelog(oldVersion, newVersion) {
|
|
3061
3070
|
return {
|
|
3062
3071
|
newTypes: getNewTypes(oldVersion, newVersion),
|
|
@@ -3313,18 +3322,22 @@ function generateChangeLog(oldBundles, newBundles, config) {
|
|
|
3313
3322
|
return _function.pipe(reflectBundles(sourceFiles), TE__namespace.map(filterOutOfScope));
|
|
3314
3323
|
}
|
|
3315
3324
|
const convertToPageData = apply(toPageData, config.fileName);
|
|
3325
|
+
function handleConversion({ changelog, newManifest }) {
|
|
3326
|
+
if (config.skipIfNoChanges && !hasChanges(changelog)) {
|
|
3327
|
+
return skip();
|
|
3328
|
+
}
|
|
3329
|
+
return _function.pipe(convertToRenderableChangelog(changelog, newManifest.types), compile, convertToPageData);
|
|
3330
|
+
}
|
|
3316
3331
|
return _function.pipe(
|
|
3317
3332
|
reflect(oldBundles),
|
|
3318
3333
|
TE__namespace.bindTo("oldVersion"),
|
|
3319
3334
|
TE__namespace.bind("newVersion", () => reflect(newBundles)),
|
|
3320
3335
|
TE__namespace.map(toManifests),
|
|
3321
3336
|
TE__namespace.map(({ oldManifest, newManifest }) => ({
|
|
3322
|
-
|
|
3337
|
+
changelog: processChangelog(oldManifest, newManifest),
|
|
3323
3338
|
newManifest
|
|
3324
3339
|
})),
|
|
3325
|
-
TE__namespace.map(
|
|
3326
|
-
TE__namespace.map(compile),
|
|
3327
|
-
TE__namespace.map(convertToPageData)
|
|
3340
|
+
TE__namespace.map(handleConversion)
|
|
3328
3341
|
);
|
|
3329
3342
|
}
|
|
3330
3343
|
function toManifests({ oldVersion, newVersion }) {
|
|
@@ -3353,15 +3366,19 @@ function toPageData(fileName, content) {
|
|
|
3353
3366
|
}
|
|
3354
3367
|
|
|
3355
3368
|
function generate(oldBundles, newBundles, config) {
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3369
|
+
function handleFile(file) {
|
|
3370
|
+
if (isSkip(file)) {
|
|
3371
|
+
return TE__namespace.right("\u2714\uFE0F Done! Skipped writing files to the system.");
|
|
3372
|
+
}
|
|
3373
|
+
return writeFilesToSystem(file, config.targetDir);
|
|
3374
|
+
}
|
|
3375
|
+
return _function.pipe(generateChangeLog(oldBundles, newBundles, config), TE__namespace.flatMap(handleFile));
|
|
3360
3376
|
}
|
|
3361
3377
|
function writeFilesToSystem(pageData, outputDir) {
|
|
3362
3378
|
return _function.pipe(
|
|
3363
3379
|
[pageData],
|
|
3364
3380
|
(files) => writeFiles(files, outputDir),
|
|
3381
|
+
TE__namespace.map(() => "\u2714\uFE0F Changelog generated successfully!"),
|
|
3365
3382
|
TE__namespace.mapLeft((error) => {
|
|
3366
3383
|
return new FileWritingError("An error occurred while writing files to the system.", error);
|
|
3367
3384
|
})
|
|
@@ -3583,7 +3600,6 @@ function processChangeLog(config) {
|
|
|
3583
3600
|
return _function.pipe(
|
|
3584
3601
|
TE__namespace.tryCatch(loadFiles, (e) => new FileReadingError("An error occurred while reading files.", e)),
|
|
3585
3602
|
TE__namespace.flatMap(([previous, current]) => generate(previous, current, config)),
|
|
3586
|
-
TE__namespace.map(() => "\u2714\uFE0F Changelog generated successfully!"),
|
|
3587
3603
|
TE__namespace.mapLeft(toErrors)
|
|
3588
3604
|
);
|
|
3589
3605
|
});
|
|
@@ -3656,3 +3672,4 @@ exports.StdOutLogger = StdOutLogger;
|
|
|
3656
3672
|
exports.changeLogDefaults = changeLogDefaults;
|
|
3657
3673
|
exports.markdownDefaults = markdownDefaults;
|
|
3658
3674
|
exports.openApiDefaults = openApiDefaults;
|
|
3675
|
+
exports.skip = skip;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cparra/apexdocs",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "Library with CLI capabilities to generate documentation for Salesforce Apex classes.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"apex",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"scripts": {
|
|
22
22
|
"test": "npm run build && jest",
|
|
23
23
|
"test:cov": "npm run build && jest --coverage",
|
|
24
|
-
"build": "rimraf ./
|
|
24
|
+
"build": "rimraf ./dist && npm run lint && tsc --noEmit && pkgroll",
|
|
25
25
|
"lint": "eslint \"./src/**/*.{js,ts}\" --quiet --fix",
|
|
26
26
|
"prepare": "npm run build",
|
|
27
27
|
"version": "npm run format && git add -A src",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
]
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@cparra/apex-reflection": "2.
|
|
64
|
+
"@cparra/apex-reflection": "2.15.0",
|
|
65
65
|
"@types/js-yaml": "^4.0.9",
|
|
66
66
|
"@types/yargs": "^17.0.32",
|
|
67
67
|
"chalk": "^4.1.2",
|
|
@@ -72,7 +72,6 @@
|
|
|
72
72
|
"handlebars": "^4.7.8",
|
|
73
73
|
"js-yaml": "^4.1.0",
|
|
74
74
|
"minimatch": "^10.0.1",
|
|
75
|
-
"simple-git": "^3.27.0",
|
|
76
75
|
"yargs": "^17.7.2"
|
|
77
76
|
},
|
|
78
77
|
"imports": {
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const defaults = {
|
|
4
|
-
targetGenerator: "markdown",
|
|
5
|
-
targetDir: "./docs/",
|
|
6
|
-
scope: ["global"],
|
|
7
|
-
defaultGroupName: "Miscellaneous",
|
|
8
|
-
includeMetadata: false,
|
|
9
|
-
sortAlphabetically: false,
|
|
10
|
-
linkingStrategy: "relative"
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
exports.defaults = defaults;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
-
var __spreadValues = (a, b) => {
|
|
11
|
-
for (var prop in b || (b = {}))
|
|
12
|
-
if (__hasOwnProp.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
if (__getOwnPropSymbols)
|
|
15
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
-
if (__propIsEnum.call(b, prop))
|
|
17
|
-
__defNormalProp(a, prop, b[prop]);
|
|
18
|
-
}
|
|
19
|
-
return a;
|
|
20
|
-
};
|
|
21
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
|
-
const commonDefaults = {
|
|
23
|
-
targetDir: "./docs/"
|
|
24
|
-
};
|
|
25
|
-
const markdownDefaults = __spreadProps(__spreadValues({}, commonDefaults), {
|
|
26
|
-
scope: ["global"],
|
|
27
|
-
defaultGroupName: "Miscellaneous",
|
|
28
|
-
includeMetadata: false,
|
|
29
|
-
sortAlphabetically: false,
|
|
30
|
-
linkingStrategy: "relative",
|
|
31
|
-
referenceGuideTitle: "Apex Reference Guide"
|
|
32
|
-
});
|
|
33
|
-
const openApiDefaults = __spreadProps(__spreadValues({}, commonDefaults), {
|
|
34
|
-
fileName: "openapi",
|
|
35
|
-
title: "Apex REST API",
|
|
36
|
-
apiVersion: "1.0.0"
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
exports.markdownDefaults = markdownDefaults;
|
|
40
|
-
exports.openApiDefaults = openApiDefaults;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const defaults = {
|
|
4
|
-
targetGenerator: "markdown",
|
|
5
|
-
targetDir: "./docs/",
|
|
6
|
-
scope: ["global"],
|
|
7
|
-
defaultGroupName: "Miscellaneous",
|
|
8
|
-
includeMetadata: false,
|
|
9
|
-
sortMembersAlphabetically: false,
|
|
10
|
-
linkingStrategy: "relative"
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
exports.defaults = defaults;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const defaults = {
|
|
4
|
-
targetGenerator: "markdown",
|
|
5
|
-
targetDir: "./docs/",
|
|
6
|
-
scope: ["global"],
|
|
7
|
-
defaultGroupName: "Miscellaneous",
|
|
8
|
-
includeMetadata: false,
|
|
9
|
-
sortAlphabetically: false,
|
|
10
|
-
linkingStrategy: "relative",
|
|
11
|
-
referenceGuideTitle: "Apex Reference Guide"
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
exports.defaults = defaults;
|