@cparra/apexdocs 3.15.0-alpha.1 → 3.15.0-beta.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 +80 -132
- package/dist/cli/generate.js +11 -28
- package/dist/index.d.ts +20 -8
- package/dist/index.js +6 -8
- package/dist/{logger-B7fARcrW.js → logger-CtMtZSXq.js} +824 -1014
- package/package.json +8 -12
- package/dist/core/reflection/worker-thread/reflection-worker.js +0 -58
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cparra/apexdocs",
|
|
3
|
-
"version": "3.15.0-
|
|
3
|
+
"version": "3.15.0-beta.1",
|
|
4
4
|
"description": "Library with CLI capabilities to generate documentation for Salesforce Apex classes.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"apex",
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"test": "wireit",
|
|
23
23
|
"test:cov": "npm run build && jest --coverage",
|
|
24
24
|
"build": "wireit",
|
|
25
|
-
"build:worker": "tsc src/core/reflection/worker-thread/reflection-worker.ts --outDir dist/core/reflection/worker-thread --target es6 --module commonjs --moduleResolution node --esModuleInterop --lib ES2021",
|
|
26
25
|
"lint": "wireit",
|
|
27
26
|
"prepare": "npm run build",
|
|
28
27
|
"version": "npm run format && git add -A src",
|
|
@@ -37,7 +36,7 @@
|
|
|
37
36
|
"output": []
|
|
38
37
|
},
|
|
39
38
|
"build": {
|
|
40
|
-
"command": "tsc --noEmit --pretty && pkgroll
|
|
39
|
+
"command": "tsc --noEmit --pretty && pkgroll",
|
|
41
40
|
"dependencies": [
|
|
42
41
|
"lint"
|
|
43
42
|
],
|
|
@@ -67,20 +66,19 @@
|
|
|
67
66
|
"url": "https://github.com/cesarParra/apexdocs"
|
|
68
67
|
},
|
|
69
68
|
"devDependencies": {
|
|
70
|
-
"@eslint/js": "^9.
|
|
71
|
-
"@types/eslint__js": "^8.42.3",
|
|
69
|
+
"@eslint/js": "^9.34.0",
|
|
72
70
|
"@types/jest": "^29.5.12",
|
|
73
|
-
"@types/node": "^
|
|
74
|
-
"eslint": "^
|
|
71
|
+
"@types/node": "^24.3.0",
|
|
72
|
+
"eslint": "^9.34.0",
|
|
75
73
|
"eslint-config-prettier": "^9.1.0",
|
|
76
74
|
"husky": "^9.0.11",
|
|
77
|
-
"jest": "^
|
|
75
|
+
"jest": "^30.0.5",
|
|
78
76
|
"lint-staged": "^15.2.7",
|
|
79
77
|
"pkgroll": "^2.4.2",
|
|
80
78
|
"prettier": "^3.3.2",
|
|
81
79
|
"ts-jest": "^29.2.0",
|
|
82
|
-
"typescript": "^5.
|
|
83
|
-
"typescript-eslint": "^
|
|
80
|
+
"typescript": "^5.9.2",
|
|
81
|
+
"typescript-eslint": "^8.41.0",
|
|
84
82
|
"wireit": "^0.14.12"
|
|
85
83
|
},
|
|
86
84
|
"husky": {
|
|
@@ -97,7 +95,6 @@
|
|
|
97
95
|
"@cparra/apex-reflection": "2.19.0",
|
|
98
96
|
"@salesforce/source-deploy-retrieve": "^12.20.1",
|
|
99
97
|
"@types/js-yaml": "^4.0.9",
|
|
100
|
-
"@types/uuid": "^10.0.0",
|
|
101
98
|
"@types/yargs": "^17.0.32",
|
|
102
99
|
"chalk": "^4.1.2",
|
|
103
100
|
"cosmiconfig": "^9.0.0",
|
|
@@ -107,7 +104,6 @@
|
|
|
107
104
|
"handlebars": "^4.7.8",
|
|
108
105
|
"js-yaml": "^4.1.0",
|
|
109
106
|
"minimatch": "^10.0.1",
|
|
110
|
-
"uuid": "^11.1.0",
|
|
111
107
|
"yargs": "^17.7.2"
|
|
112
108
|
},
|
|
113
109
|
"imports": {
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const worker_threads_1 = require("worker_threads");
|
|
13
|
-
const apex_reflection_1 = require("@cparra/apex-reflection");
|
|
14
|
-
function processReflectionTask(task) {
|
|
15
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
-
try {
|
|
17
|
-
let result;
|
|
18
|
-
if (task.type === 'apex') {
|
|
19
|
-
const reflectionResult = (0, apex_reflection_1.reflect)(task.content);
|
|
20
|
-
if (reflectionResult.error) {
|
|
21
|
-
throw reflectionResult.error;
|
|
22
|
-
}
|
|
23
|
-
result = reflectionResult.typeMirror;
|
|
24
|
-
}
|
|
25
|
-
else if (task.type === 'trigger') {
|
|
26
|
-
const reflectionResult = yield (0, apex_reflection_1.reflectTriggerAsync)(task.content);
|
|
27
|
-
if (reflectionResult.error) {
|
|
28
|
-
throw reflectionResult.error;
|
|
29
|
-
}
|
|
30
|
-
result = reflectionResult.triggerMirror;
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
throw new Error(`Unknown reflection type: ${task.type}`);
|
|
34
|
-
}
|
|
35
|
-
return {
|
|
36
|
-
id: task.id,
|
|
37
|
-
success: true,
|
|
38
|
-
result,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
catch (error) {
|
|
42
|
-
return {
|
|
43
|
-
id: task.id,
|
|
44
|
-
success: false,
|
|
45
|
-
error: {
|
|
46
|
-
message: error.message,
|
|
47
|
-
filePath: task.filePath,
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
if (worker_threads_1.parentPort) {
|
|
54
|
-
worker_threads_1.parentPort.on('message', (task) => __awaiter(void 0, void 0, void 0, function* () {
|
|
55
|
-
const result = yield processReflectionTask(task);
|
|
56
|
-
worker_threads_1.parentPort.postMessage(result);
|
|
57
|
-
}));
|
|
58
|
-
}
|