@cparra/apex-reflection 2.17.2 → 2.19.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/dist/index.d.ts +14 -1
- package/dist/index.js +18 -2
- package/dist/out.d.ts +3 -1
- package/dist/out.js +13007 -9712
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export declare function reflect(declarationBody: string): ReflectionResult;
|
|
2
|
+
export declare function reflectAsync(declarationBody: string): Promise<ReflectionResult>;
|
|
3
|
+
export declare function reflectTrigger(declarationBody: string): TriggerReflectionResult;
|
|
4
|
+
export declare function reflectTriggerAsync(declarationBody: string): Promise<TriggerReflectionResult>;
|
|
2
5
|
export interface ParamAnnotation {
|
|
3
6
|
bodyLines: string[];
|
|
4
7
|
paramName: string;
|
|
@@ -110,11 +113,21 @@ export interface ReflectionResult {
|
|
|
110
113
|
typeMirror?: Type;
|
|
111
114
|
error?: ParsingError;
|
|
112
115
|
}
|
|
116
|
+
export interface TriggerReflectionResult {
|
|
117
|
+
triggerMirror?: TriggerMirror;
|
|
118
|
+
error?: ParsingError;
|
|
119
|
+
}
|
|
113
120
|
export interface ParsingError {
|
|
114
121
|
message: string;
|
|
115
122
|
}
|
|
116
|
-
type TypeName =
|
|
123
|
+
type TypeName = "class" | "interface" | "enum";
|
|
117
124
|
export type Type = InterfaceMirror | ClassMirror | EnumMirror;
|
|
125
|
+
export interface TriggerMirror {
|
|
126
|
+
docComment?: DocComment;
|
|
127
|
+
name: string;
|
|
128
|
+
object_name: string;
|
|
129
|
+
events: string[];
|
|
130
|
+
}
|
|
118
131
|
export interface EnumMirror {
|
|
119
132
|
annotations: Annotation[];
|
|
120
133
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.reflect = void 0;
|
|
4
|
-
require(
|
|
3
|
+
exports.reflectTriggerAsync = exports.reflectTrigger = exports.reflectAsync = exports.reflect = void 0;
|
|
4
|
+
require("./out.js");
|
|
5
5
|
function reflect(declarationBody) {
|
|
6
6
|
// @ts-expect-error "reflect" is added to self by the "out" module
|
|
7
7
|
return JSON.parse(self.reflect(declarationBody));
|
|
8
8
|
}
|
|
9
9
|
exports.reflect = reflect;
|
|
10
|
+
async function reflectAsync(declarationBody) {
|
|
11
|
+
// @ts-expect-error "reflectAsync" is added to self by the "out" module
|
|
12
|
+
const result = await self.reflectAsync(declarationBody);
|
|
13
|
+
return JSON.parse(result);
|
|
14
|
+
}
|
|
15
|
+
exports.reflectAsync = reflectAsync;
|
|
16
|
+
function reflectTrigger(declarationBody) {
|
|
17
|
+
// @ts-expect-error "reflectTrigger" is added to self by the "out" module
|
|
18
|
+
return JSON.parse(self.reflectTrigger(declarationBody));
|
|
19
|
+
}
|
|
20
|
+
exports.reflectTrigger = reflectTrigger;
|
|
21
|
+
function reflectTriggerAsync(declarationBody) {
|
|
22
|
+
// @ts-expect-error "reflectTriggerAsync" is added to self by the "out" module
|
|
23
|
+
return self.reflectTriggerAsync(declarationBody).then((result) => JSON.parse(result));
|
|
24
|
+
}
|
|
25
|
+
exports.reflectTriggerAsync = reflectTriggerAsync;
|
package/dist/out.d.ts
CHANGED