@cparra/apex-reflection 2.18.0 → 2.20.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 +2 -2
- package/dist/index.d.ts +12 -0
- package/dist/index.js +11 -1
- package/dist/out.js +5485 -5228
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -81,13 +81,13 @@ which lives in `lib/antrl4-4.9.2`.
|
|
|
81
81
|
|
|
82
82
|
To generate the Antlr4 Apex output run:
|
|
83
83
|
|
|
84
|
-
```
|
|
84
|
+
```shell
|
|
85
85
|
antlr4 -Dlanguage=Dart lib/src/antlr/grammars/apex/ApexLexer.g4 lib/src/antlr/grammars/apex/ApexParser.g4 -o lib/src/antlr/lib/apex/
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
To generate the Antlr4 Apexdoc output run:
|
|
89
89
|
|
|
90
|
-
```
|
|
90
|
+
```shell
|
|
91
91
|
antlr4 -Dlanguage=Dart lib/src/antlr/grammars/apexdoc/ApexdocLexer.g4 lib/src/antlr/grammars/apexdoc/ApexdocParser.g4 -o lib/src/antlr/lib/apexdoc/
|
|
92
92
|
```
|
|
93
93
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare function reflect(declarationBody: string): ReflectionResult;
|
|
2
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>;
|
|
3
5
|
export interface ParamAnnotation {
|
|
4
6
|
bodyLines: string[];
|
|
5
7
|
paramName: string;
|
|
@@ -111,11 +113,21 @@ export interface ReflectionResult {
|
|
|
111
113
|
typeMirror?: Type;
|
|
112
114
|
error?: ParsingError;
|
|
113
115
|
}
|
|
116
|
+
export interface TriggerReflectionResult {
|
|
117
|
+
triggerMirror?: TriggerMirror;
|
|
118
|
+
error?: ParsingError;
|
|
119
|
+
}
|
|
114
120
|
export interface ParsingError {
|
|
115
121
|
message: string;
|
|
116
122
|
}
|
|
117
123
|
type TypeName = "class" | "interface" | "enum";
|
|
118
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
|
+
}
|
|
119
131
|
export interface EnumMirror {
|
|
120
132
|
annotations: Annotation[];
|
|
121
133
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.reflectAsync = exports.reflect = void 0;
|
|
3
|
+
exports.reflectTriggerAsync = exports.reflectTrigger = exports.reflectAsync = exports.reflect = void 0;
|
|
4
4
|
require("./out.js");
|
|
5
5
|
function reflect(declarationBody) {
|
|
6
6
|
// @ts-expect-error "reflect" is added to self by the "out" module
|
|
@@ -13,3 +13,13 @@ async function reflectAsync(declarationBody) {
|
|
|
13
13
|
return JSON.parse(result);
|
|
14
14
|
}
|
|
15
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;
|