@cparra/apexdocs 3.21.7 → 3.22.0-alpha.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.
|
@@ -23,8 +23,8 @@ function post(responseMessage) {
|
|
|
23
23
|
}
|
|
24
24
|
node_worker_threads_1.parentPort.postMessage(responseMessage);
|
|
25
25
|
}
|
|
26
|
-
function reflectOrThrow(rawSource) {
|
|
27
|
-
const result = (0, apex_reflection_1.reflect)(rawSource);
|
|
26
|
+
async function reflectOrThrow(rawSource) {
|
|
27
|
+
const result = await (0, apex_reflection_1.reflect)(rawSource);
|
|
28
28
|
if (result.typeMirror) {
|
|
29
29
|
return result.typeMirror;
|
|
30
30
|
}
|
|
@@ -36,14 +36,14 @@ function reflectOrThrow(rawSource) {
|
|
|
36
36
|
if (!node_worker_threads_1.parentPort) {
|
|
37
37
|
throw new Error('apex-reflection.worker started without a parentPort');
|
|
38
38
|
}
|
|
39
|
-
node_worker_threads_1.parentPort.on('message', (message) => {
|
|
39
|
+
node_worker_threads_1.parentPort.on('message', async (message) => {
|
|
40
40
|
if (!isRequestMessage(message)) {
|
|
41
41
|
// Can't correlate without a valid id; ignore.
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
const { id, payload } = message;
|
|
45
45
|
try {
|
|
46
|
-
const typeMirror = reflectOrThrow(payload.content);
|
|
46
|
+
const typeMirror = await reflectOrThrow(payload.content);
|
|
47
47
|
post({ id, ok: true, result: typeMirror });
|
|
48
48
|
}
|
|
49
49
|
catch (caughtError) {
|
package/dist/cli/generate.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var errorCollector = require('../error-collector-
|
|
4
|
+
var errorCollector = require('../error-collector-jfYyMFIZ.js');
|
|
5
5
|
var cosmiconfig = require('cosmiconfig');
|
|
6
6
|
var yargs = require('yargs');
|
|
7
7
|
var E = require('fp-ts/Either');
|
|
@@ -1431,16 +1431,12 @@ const noopReflectionDebugLogger = {
|
|
|
1431
1431
|
const noopDebugLogger = noopReflectionDebugLogger;
|
|
1432
1432
|
function reflectAsync(rawSource) {
|
|
1433
1433
|
return __async$5(this, null, function* () {
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
} else {
|
|
1441
|
-
return reject(new Error("Unknown error"));
|
|
1442
|
-
}
|
|
1443
|
-
});
|
|
1434
|
+
var _a, _b;
|
|
1435
|
+
const result = yield apexReflection.reflect(rawSource);
|
|
1436
|
+
if (result.typeMirror) {
|
|
1437
|
+
return result.typeMirror;
|
|
1438
|
+
}
|
|
1439
|
+
throw new Error((_b = (_a = result.error) == null ? void 0 : _a.message) != null ? _b : "Unknown error");
|
|
1444
1440
|
});
|
|
1445
1441
|
}
|
|
1446
1442
|
function supportsWorkerThreads() {
|
|
@@ -3483,7 +3479,7 @@ function reflectAsTask(triggerContent) {
|
|
|
3483
3479
|
}
|
|
3484
3480
|
function reflect(triggerContent) {
|
|
3485
3481
|
return __async$4(this, null, function* () {
|
|
3486
|
-
const reflectionResult = apexReflection.reflectTrigger(triggerContent);
|
|
3482
|
+
const reflectionResult = yield apexReflection.reflectTrigger(triggerContent);
|
|
3487
3483
|
if (reflectionResult.error) {
|
|
3488
3484
|
throw reflectionResult.error;
|
|
3489
3485
|
}
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cparra/apexdocs",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.22.0-alpha.0",
|
|
4
4
|
"description": "Library with CLI capabilities to generate documentation for Salesforce Apex classes.",
|
|
5
5
|
"engines": {
|
|
6
|
-
"node": ">=
|
|
6
|
+
"node": ">=22.12.0"
|
|
7
7
|
},
|
|
8
8
|
"keywords": [
|
|
9
9
|
"apex",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"test": "wireit",
|
|
26
|
-
"test:cov": "npm run build &&
|
|
26
|
+
"test:cov": "npm run build && vitest run --coverage",
|
|
27
27
|
"build": "wireit",
|
|
28
28
|
"lint": "wireit",
|
|
29
29
|
"prepare": "npm run build",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"output": []
|
|
40
40
|
},
|
|
41
41
|
"build": {
|
|
42
|
-
"command": "tsc --noEmit --pretty && pkgroll --target
|
|
42
|
+
"command": "tsc --noEmit --pretty && pkgroll --target node22 && tsc --project ./tsconfig.worker.json",
|
|
43
43
|
"dependencies": [
|
|
44
44
|
"lint"
|
|
45
45
|
],
|
|
@@ -53,12 +53,13 @@
|
|
|
53
53
|
]
|
|
54
54
|
},
|
|
55
55
|
"test": {
|
|
56
|
-
"command": "
|
|
56
|
+
"command": "vitest run",
|
|
57
57
|
"dependencies": [
|
|
58
58
|
"build"
|
|
59
59
|
],
|
|
60
60
|
"files": [
|
|
61
|
-
"src/**/*.ts"
|
|
61
|
+
"src/**/*.ts",
|
|
62
|
+
"vitest.config.ts"
|
|
62
63
|
],
|
|
63
64
|
"output": []
|
|
64
65
|
}
|
|
@@ -71,18 +72,17 @@
|
|
|
71
72
|
},
|
|
72
73
|
"devDependencies": {
|
|
73
74
|
"@eslint/js": "^9.34.0",
|
|
74
|
-
"@types/jest": "^29.5.12",
|
|
75
75
|
"@types/node": "^24.3.0",
|
|
76
|
+
"@vitest/coverage-v8": "^4.1.8",
|
|
76
77
|
"eslint": "^9.34.0",
|
|
77
78
|
"eslint-config-prettier": "^9.1.0",
|
|
78
79
|
"husky": "^9.0.11",
|
|
79
|
-
"jest": "^30.0.5",
|
|
80
80
|
"lint-staged": "^15.2.7",
|
|
81
81
|
"pkgroll": "^2.4.2",
|
|
82
82
|
"prettier": "^3.3.2",
|
|
83
|
-
"ts-jest": "^29.2.0",
|
|
84
83
|
"typescript": "^5.9.2",
|
|
85
84
|
"typescript-eslint": "^8.41.0",
|
|
85
|
+
"vitest": "^4.1.8",
|
|
86
86
|
"wireit": "^0.14.12"
|
|
87
87
|
},
|
|
88
88
|
"husky": {
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
]
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
|
-
"@cparra/apex-reflection": "
|
|
99
|
+
"@cparra/apex-reflection": "3.0.0-dev.20260614084225",
|
|
100
100
|
"@salesforce/source-deploy-retrieve": "^12.20.1",
|
|
101
101
|
"@types/js-yaml": "^4.0.9",
|
|
102
102
|
"@types/yargs": "^17.0.32",
|