@cparra/apexdocs 2.24.0 → 2.25.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.
- package/.eslintrc.js +12 -12
- package/.github/workflows/ci.yaml +22 -0
- package/.github/workflows/close_stale.yml +22 -22
- package/.prettierrc.js +7 -7
- package/LICENSE +21 -21
- package/README.md +742 -718
- package/apexdocs.config.ts +13 -13
- package/docs/{README.md → __old/README.md} +1 -1
- package/docs/{restapi.json → __old/restapi.json} +589 -589
- package/docs/{types → __old/types}/Classes/nspc.ChildClass.md +97 -97
- package/docs/{types → __old/types}/Main/nspc.SampleClass.md +189 -189
- package/examples/force-app/main/default/classes/AnotherInterface.cls +16 -16
- package/examples/force-app/main/default/classes/ChildClass.cls +42 -42
- package/examples/force-app/main/default/classes/EscapedAnnotations.cls +5 -5
- package/examples/force-app/main/default/classes/GrandparentClass.cls +4 -4
- package/examples/force-app/main/default/classes/GroupedClass.cls +8 -8
- package/examples/force-app/main/default/classes/MemberGrouping.cls +17 -17
- package/examples/force-app/main/default/classes/ParentClass.cls +16 -16
- package/examples/force-app/main/default/classes/SampleClass.cls +166 -166
- package/examples/force-app/main/default/classes/SampleClass.cls-meta.xml +5 -5
- package/examples/force-app/main/default/classes/SampleClassWithoutModifier.cls +9 -9
- package/examples/force-app/main/default/classes/SampleInterface.cls +16 -16
- package/examples/force-app/main/default/restapi/SampleRestResource.cls +195 -195
- package/examples/force-app/main/default/restapi/SampleRestResourceToSkip.cls +35 -35
- package/examples/force-app/main/default/restapi/SampleRestResourceWithInnerClass.cls +24 -24
- package/examples/force-app/main/default/restapi/SampleRestResourceWithoutApexDocs.cls +15 -15
- package/examples/force-app/main/default/restapi/references/Reference1.cls +9 -9
- package/examples/force-app/main/default/restapi/references/Reference2.cls +9 -9
- package/examples/force-app/main/default/restapi/references/Reference3.cls +3 -3
- package/examples/force-app/main/default/restapi/references/Reference4.cls +3 -3
- package/examples/force-app/main/default/restapi/references/Reference5.cls +3 -3
- package/examples/force-app/main/default/restapi/references/Reference6.cls +6 -6
- package/examples/force-app/main/default/restapi/references/Reference7.cls +3 -3
- package/examples/includes/header.md +3 -3
- package/examples/plain-markdown/.forceignore +12 -0
- package/examples/plain-markdown/README.md +301 -0
- package/examples/plain-markdown/config/project-scratch-def.json +5 -0
- package/examples/plain-markdown/force-app/classes/BaseClass.cls +3 -0
- package/examples/plain-markdown/force-app/classes/ParentInterface.cls +3 -0
- package/examples/plain-markdown/force-app/classes/ReferencedEnum.cls +3 -0
- package/examples/plain-markdown/force-app/classes/SampleClass.cls +35 -0
- package/examples/plain-markdown/force-app/classes/SampleEnum.cls +30 -0
- package/examples/plain-markdown/force-app/classes/SampleException.cls +1 -0
- package/examples/plain-markdown/force-app/classes/SampleInterface.cls +46 -0
- package/examples/plain-markdown/package-lock.json +665 -0
- package/examples/plain-markdown/package.json +24 -0
- package/examples/plain-markdown/sfdx-project.json +12 -0
- package/examples/plain-markdown/template.md +3 -0
- package/jest.config.js +5 -5
- package/lib/adapters/apex-types.d.ts +5 -0
- package/lib/adapters/apex-types.js +34 -0
- package/lib/adapters/apex-types.js.map +1 -0
- package/lib/adapters/documentables.d.ts +6 -0
- package/lib/adapters/documentables.js +41 -0
- package/lib/adapters/documentables.js.map +1 -0
- package/lib/adapters/fields-and-properties.d.ts +3 -0
- package/lib/adapters/fields-and-properties.js +10 -0
- package/lib/adapters/fields-and-properties.js.map +1 -0
- package/lib/adapters/methods-and-constructors.d.ts +4 -0
- package/lib/adapters/methods-and-constructors.js +49 -0
- package/lib/adapters/methods-and-constructors.js.map +1 -0
- package/lib/adapters/references.d.ts +5 -0
- package/lib/adapters/references.js +82 -0
- package/lib/adapters/references.js.map +1 -0
- package/lib/adapters/type-utils.d.ts +2 -0
- package/lib/adapters/type-utils.js +8 -0
- package/lib/adapters/type-utils.js.map +1 -0
- package/lib/application/Apexdocs.d.ts +13 -13
- package/lib/application/Apexdocs.js +79 -76
- package/lib/application/Apexdocs.js.map +1 -1
- package/lib/cli/generate.d.ts +2 -2
- package/lib/cli/generate.js +156 -130
- package/lib/cli/generate.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +17 -17
- package/lib/model/apex-bundle.d.ts +6 -6
- package/lib/model/apex-bundle.js +10 -10
- package/lib/model/apex-type-wrappers/ClassMirrorWrapper.d.ts +7 -7
- package/lib/model/apex-type-wrappers/ClassMirrorWrapper.js +13 -13
- package/lib/model/apex-type-wrappers/MethodMirrorWrapper.d.ts +7 -7
- package/lib/model/apex-type-wrappers/MethodMirrorWrapper.js +11 -11
- package/lib/model/inheritance.d.ts +8 -8
- package/lib/model/inheritance.js +2 -2
- package/lib/model/manifest.d.ts +22 -22
- package/lib/model/manifest.js +46 -46
- package/lib/model/manifest.js.map +1 -1
- package/lib/model/markdown-file.d.ts +16 -16
- package/lib/model/markdown-file.js +109 -106
- package/lib/model/markdown-file.js.map +1 -1
- package/lib/model/markdown-generation-util/doc-comment-annotation-util.d.ts +8 -8
- package/lib/model/markdown-generation-util/doc-comment-annotation-util.js +46 -43
- package/lib/model/markdown-generation-util/doc-comment-annotation-util.js.map +1 -1
- package/lib/model/markdown-generation-util/field-declaration-util.d.ts +3 -3
- package/lib/model/markdown-generation-util/field-declaration-util.js +54 -54
- package/lib/model/markdown-generation-util/index.d.ts +3 -3
- package/lib/model/markdown-generation-util/index.js +19 -19
- package/lib/model/markdown-generation-util/method-declaration-util.d.ts +4 -4
- package/lib/model/markdown-generation-util/method-declaration-util.js +114 -114
- package/lib/model/markdown-generation-util/type-declaration-util.d.ts +3 -3
- package/lib/model/markdown-generation-util/type-declaration-util.js +81 -81
- package/lib/model/markdown-home-file.d.ts +11 -11
- package/lib/model/markdown-home-file.js +56 -53
- package/lib/model/markdown-home-file.js.map +1 -1
- package/lib/model/markdown-type-file.d.ts +26 -26
- package/lib/model/markdown-type-file.js +136 -133
- package/lib/model/markdown-type-file.js.map +1 -1
- package/lib/model/openapi/apex-doc-types.d.ts +19 -19
- package/lib/model/openapi/apex-doc-types.js +4 -4
- package/lib/model/openapi/open-api-types.d.ts +93 -93
- package/lib/model/openapi/open-api-types.js +2 -2
- package/lib/model/openapi/open-api.d.ts +16 -16
- package/lib/model/openapi/open-api.js +33 -33
- package/lib/model/openapi/openapi-type-file.d.ts +7 -7
- package/lib/model/openapi/openapi-type-file.js +16 -16
- package/lib/model/outputFile.d.ts +10 -10
- package/lib/model/outputFile.js +28 -28
- package/lib/model/types-repository.d.ts +16 -16
- package/lib/model/types-repository.js +53 -53
- package/lib/service/apex-file-reader.d.ts +14 -14
- package/lib/service/apex-file-reader.js +48 -45
- package/lib/service/apex-file-reader.js.map +1 -1
- package/lib/service/file-system.d.ts +14 -14
- package/lib/service/file-system.js +47 -24
- package/lib/service/file-system.js.map +1 -1
- package/lib/service/file-writer.d.ts +6 -6
- package/lib/service/file-writer.js +56 -33
- package/lib/service/file-writer.js.map +1 -1
- package/lib/service/manifest-factory.d.ts +10 -10
- package/lib/service/manifest-factory.js +16 -13
- package/lib/service/manifest-factory.js.map +1 -1
- package/lib/service/metadata-processor.d.ts +3 -3
- package/lib/service/metadata-processor.js +16 -16
- package/lib/service/parser.d.ts +21 -21
- package/lib/service/parser.js +137 -134
- package/lib/service/parser.js.map +1 -1
- package/lib/service/state.d.ts +9 -9
- package/lib/service/state.js +19 -19
- package/lib/service/walkers/class-walker.d.ts +4 -4
- package/lib/service/walkers/class-walker.js +32 -32
- package/lib/service/walkers/enum-walker.d.ts +4 -4
- package/lib/service/walkers/enum-walker.js +10 -10
- package/lib/service/walkers/interface-walker.d.ts +4 -4
- package/lib/service/walkers/interface-walker.js +14 -14
- package/lib/service/walkers/walker-factory.d.ts +5 -5
- package/lib/service/walkers/walker-factory.js +20 -20
- package/lib/service/walkers/walker.d.ts +19 -19
- package/lib/service/walkers/walker.js +16 -16
- package/lib/settings.d.ts +70 -64
- package/lib/settings.js +99 -88
- package/lib/settings.js.map +1 -1
- package/lib/templating/compile.d.ts +7 -0
- package/lib/templating/compile.js +98 -0
- package/lib/templating/compile.js.map +1 -0
- package/lib/templating/helpers.d.ts +2 -0
- package/lib/templating/helpers.js +18 -0
- package/lib/templating/helpers.js.map +1 -0
- package/lib/test-helpers/AnnotationBuilder.d.ts +12 -12
- package/lib/test-helpers/AnnotationBuilder.js +30 -30
- package/lib/test-helpers/ClassMirrorBuilder.d.ts +18 -18
- package/lib/test-helpers/ClassMirrorBuilder.js +53 -53
- package/lib/test-helpers/DocCommentAnnotationBuilder.d.ts +8 -8
- package/lib/test-helpers/DocCommentAnnotationBuilder.js +25 -25
- package/lib/test-helpers/DocCommentBuilder.d.ts +12 -12
- package/lib/test-helpers/DocCommentBuilder.js +37 -37
- package/lib/test-helpers/FieldMirrorBuilder.d.ts +18 -18
- package/lib/test-helpers/FieldMirrorBuilder.js +53 -53
- package/lib/test-helpers/InterfaceMirrorBuilder.d.ts +16 -0
- package/lib/test-helpers/InterfaceMirrorBuilder.js +43 -0
- package/lib/test-helpers/InterfaceMirrorBuilder.js.map +1 -0
- package/lib/test-helpers/MethodMirrorBuilder.d.ts +29 -10
- package/lib/test-helpers/MethodMirrorBuilder.js +71 -36
- package/lib/test-helpers/MethodMirrorBuilder.js.map +1 -1
- package/lib/test-helpers/SettingsBuilder.d.ts +8 -8
- package/lib/test-helpers/SettingsBuilder.js +26 -26
- package/lib/transpiler/factory.d.ts +6 -6
- package/lib/transpiler/factory.js +34 -31
- package/lib/transpiler/factory.js.map +1 -1
- package/lib/transpiler/file-container.d.ts +6 -6
- package/lib/transpiler/file-container.js +15 -15
- package/lib/transpiler/generator-choices.d.ts +1 -1
- package/lib/transpiler/generator-choices.js +2 -2
- package/lib/transpiler/markdown/class-file-generatorHelper.d.ts +11 -8
- package/lib/transpiler/markdown/class-file-generatorHelper.js +74 -55
- package/lib/transpiler/markdown/class-file-generatorHelper.js.map +1 -1
- package/lib/transpiler/markdown/docsify/docsify-docs-processor.d.ts +6 -6
- package/lib/transpiler/markdown/docsify/docsify-docs-processor.js +12 -12
- package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.d.ts +11 -11
- package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js +50 -50
- package/lib/transpiler/markdown/markdown-transpiler-base.d.ts +11 -11
- package/lib/transpiler/markdown/markdown-transpiler-base.js +26 -23
- package/lib/transpiler/markdown/markdown-transpiler-base.js.map +1 -1
- package/lib/transpiler/markdown/plain-markdown/class-template.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/class-template.js +36 -0
- package/lib/transpiler/markdown/plain-markdown/class-template.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.js +39 -0
- package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.js +25 -0
- package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/enum-template.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/enum-template.js +15 -0
- package/lib/transpiler/markdown/plain-markdown/enum-template.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js +24 -0
- package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/interface-template.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/interface-template.js +20 -0
- package/lib/transpiler/markdown/plain-markdown/interface-template.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/methods-partial-template.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/methods-partial-template.js +49 -0
- package/lib/transpiler/markdown/plain-markdown/methods-partial-template.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.d.ts +13 -6
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js +121 -13
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js.map +1 -1
- package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.js +31 -0
- package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.js.map +1 -0
- package/lib/transpiler/openapi/open-api-docs-processor.d.ts +13 -13
- package/lib/transpiler/openapi/open-api-docs-processor.js +77 -74
- package/lib/transpiler/openapi/open-api-docs-processor.js.map +1 -1
- package/lib/transpiler/openapi/parsers/Builder.d.ts +16 -16
- package/lib/transpiler/openapi/parsers/Builder.js +29 -29
- package/lib/transpiler/openapi/parsers/Builder.js.map +1 -1
- package/lib/transpiler/openapi/parsers/MethodParser.d.ts +20 -20
- package/lib/transpiler/openapi/parsers/MethodParser.js +189 -166
- package/lib/transpiler/openapi/parsers/MethodParser.js.map +1 -1
- package/lib/transpiler/openapi/parsers/ParameterObjectBuilder.d.ts +7 -7
- package/lib/transpiler/openapi/parsers/ParameterObjectBuilder.js +10 -10
- package/lib/transpiler/openapi/parsers/ReferenceBuilder.d.ts +39 -39
- package/lib/transpiler/openapi/parsers/ReferenceBuilder.js +248 -225
- package/lib/transpiler/openapi/parsers/ReferenceBuilder.js.map +1 -1
- package/lib/transpiler/openapi/parsers/RequestBodyBuilder.d.ts +10 -10
- package/lib/transpiler/openapi/parsers/RequestBodyBuilder.js +19 -19
- package/lib/transpiler/openapi/parsers/ResponsesBuilder.d.ts +7 -7
- package/lib/transpiler/openapi/parsers/ResponsesBuilder.js +21 -21
- package/lib/transpiler/processor-type-transpiler.d.ts +10 -10
- package/lib/transpiler/processor-type-transpiler.js +8 -8
- package/lib/transpiler/transpiler.d.ts +5 -5
- package/lib/transpiler/transpiler.js +29 -26
- package/lib/transpiler/transpiler.js.map +1 -1
- package/lib/util/error-logger.d.ts +8 -8
- package/lib/util/error-logger.js +89 -89
- package/lib/util/error-logger.js.map +1 -1
- package/lib/util/logger.d.ts +21 -21
- package/lib/util/logger.js +60 -57
- package/lib/util/logger.js.map +1 -1
- package/lib/util/string-utils.d.ts +2 -2
- package/lib/util/string-utils.js +14 -14
- package/package.json +79 -78
- package/src/adapters/__tests__/interface-adapter.spec.ts +76 -0
- package/src/adapters/__tests__/references.spec.ts +115 -0
- package/src/adapters/apex-types.ts +67 -0
- package/src/adapters/documentables.ts +58 -0
- package/src/adapters/fields-and-properties.ts +14 -0
- package/src/adapters/methods-and-constructors.ts +78 -0
- package/src/adapters/references.ts +113 -0
- package/src/adapters/type-utils.ts +5 -0
- package/src/adapters/types.d.ts +8 -0
- package/src/cli/generate.ts +3 -0
- package/src/model/__tests__/manifest.spec.ts +1 -0
- package/src/model/manifest.ts +3 -3
- package/src/model/markdown-file.ts +1 -1
- package/src/model/openapi/open-api-types.ts +2 -2
- package/src/service/__tests__/apex-file-reader.spec.ts +4 -4
- package/src/service/__tests__/manifest-factory.spec.ts +1 -2
- package/src/settings.ts +15 -0
- package/src/templating/__tests__/compile.spec.ts +741 -0
- package/src/templating/compile.ts +187 -0
- package/src/templating/helpers.ts +14 -0
- package/src/templating/types.d.ts +104 -0
- package/src/test-helpers/FieldMirrorBuilder.ts +1 -1
- package/src/test-helpers/InterfaceMirrorBuilder.ts +44 -0
- package/src/test-helpers/MethodMirrorBuilder.ts +46 -6
- package/src/transpiler/markdown/class-file-generatorHelper.ts +22 -2
- package/src/transpiler/markdown/plain-markdown/class-template.ts +32 -0
- package/src/transpiler/markdown/plain-markdown/constructors-partial-template.ts +35 -0
- package/src/transpiler/markdown/plain-markdown/documentable-partial-template.ts +21 -0
- package/src/transpiler/markdown/plain-markdown/enum-template.ts +11 -0
- package/src/transpiler/markdown/plain-markdown/fieldsPartialTemplate.ts +20 -0
- package/src/transpiler/markdown/plain-markdown/interface-template.ts +16 -0
- package/src/transpiler/markdown/plain-markdown/methods-partial-template.ts +45 -0
- package/src/transpiler/markdown/plain-markdown/plain-docsProcessor.ts +122 -0
- package/src/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.ts +27 -0
- package/src/transpiler/openapi/parsers/Builder.ts +1 -1
- package/src/transpiler/openapi/parsers/MethodParser.ts +1 -1
- package/src/transpiler/openapi/parsers/ReferenceBuilder.ts +1 -1
- package/src/util/error-logger.ts +4 -4
- package/src/util/logger.ts +3 -3
- package/tsconfig.json +21 -20
- package/tslint.json +5 -5
- package/lib/model/manifest-diff.d.ts +0 -27
- package/lib/model/manifest-diff.js +0 -69
- package/lib/model/manifest-diff.js.map +0 -1
- package/src/model/__tests__/manifest-diff.spec.ts +0 -139
- package/src/model/manifest-diff.ts +0 -94
- /package/docs/{index.html → __old/index.html} +0 -0
- /package/docs/{types → __old/types}/Classes/nspc.AnotherInterface.md +0 -0
- /package/docs/{types → __old/types}/Main/nspc.GroupedClass.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.EscapedAnnotations.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.GrandparentClass.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.InterfaceWithInheritance.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.MemberGrouping.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.ParentClass.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.Reference1.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.Reference2.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.Reference3.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.Reference4.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.Reference5.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.Reference6.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.Reference7.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.SampleClassWithoutModifier.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.SampleRestResource.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.SampleRestResourceWithInnerClass.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.SampleRestResourceWithoutApexDocs.md +0 -0
- /package/docs/{types → __old/types}/README.md +0 -0
- /package/docs/{types → __old/types}/Sample-Interfaces/nspc.SampleInterface.md +0 -0
package/lib/cli/generate.js
CHANGED
|
@@ -1,131 +1,157 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
type: '
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
type: 'string',
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
type: '
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
const yargs = __importStar(require("yargs"));
|
|
28
|
+
const settings_1 = require("../settings");
|
|
29
|
+
const Apexdocs_1 = require("../application/Apexdocs");
|
|
30
|
+
const cosmiconfig_1 = require("cosmiconfig");
|
|
31
|
+
const result = (0, cosmiconfig_1.cosmiconfig)('apexdocs').search();
|
|
32
|
+
result.then((config) => {
|
|
33
|
+
var _a, _b, _c, _d, _e, _f;
|
|
34
|
+
yargs.config(config === null || config === void 0 ? void 0 : config.config);
|
|
35
|
+
let argv = yargs.options({
|
|
36
|
+
sourceDir: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
alias: 's',
|
|
39
|
+
demandOption: true,
|
|
40
|
+
describe: 'The directory location which contains your apex .cls classes.',
|
|
41
|
+
},
|
|
42
|
+
targetDir: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
alias: 't',
|
|
45
|
+
default: './docs/',
|
|
46
|
+
describe: 'The directory location where documentation will be generated to.',
|
|
47
|
+
},
|
|
48
|
+
recursive: {
|
|
49
|
+
type: 'boolean',
|
|
50
|
+
alias: 'r',
|
|
51
|
+
default: true,
|
|
52
|
+
describe: 'Whether .cls classes will be searched for recursively in the directory provided.',
|
|
53
|
+
},
|
|
54
|
+
scope: {
|
|
55
|
+
type: 'array',
|
|
56
|
+
alias: 'p',
|
|
57
|
+
default: ['global'],
|
|
58
|
+
describe: 'A list of scopes to document. Values should be separated by a space, e.g --scope global public namespaceaccessible. ' +
|
|
59
|
+
'Annotations are supported and should be passed lowercased and without the @ symbol, e.g. namespaceaccessible auraenabled. ' +
|
|
60
|
+
'Note that this setting is ignored if generating an OpenApi REST specification since that looks for classes annotated with @RestResource.',
|
|
61
|
+
},
|
|
62
|
+
targetGenerator: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
alias: 'g',
|
|
65
|
+
default: 'jekyll',
|
|
66
|
+
choices: ['jekyll', 'docsify', 'plain-markdown', 'openapi'],
|
|
67
|
+
describe: 'Define the static file generator for which the documents will be created. ' +
|
|
68
|
+
'Currently supports jekyll, docsify, plain markdown, and OpenAPI v3.1.0.',
|
|
69
|
+
},
|
|
70
|
+
indexOnly: {
|
|
71
|
+
type: 'boolean',
|
|
72
|
+
default: false,
|
|
73
|
+
describe: 'Defines whether only the index file should be generated.',
|
|
74
|
+
},
|
|
75
|
+
defaultGroupName: {
|
|
76
|
+
type: 'string',
|
|
77
|
+
default: 'Miscellaneous',
|
|
78
|
+
describe: 'Defines the @group name to be used when a file does not specify it.',
|
|
79
|
+
},
|
|
80
|
+
sanitizeHtml: {
|
|
81
|
+
type: 'boolean',
|
|
82
|
+
default: true,
|
|
83
|
+
describe: 'When on, any special character within your ApexDocs is converted into its HTML code representation. ' +
|
|
84
|
+
'This is specially useful when generic objects are described within the docs, e.g. "List< Foo>", "Map<Foo, Bar>" ' +
|
|
85
|
+
'because otherwise the content within < and > would be treated as HTML tags and not shown in the output. ' +
|
|
86
|
+
'Content in @example blocks are never sanitized.',
|
|
87
|
+
},
|
|
88
|
+
openApiTitle: {
|
|
89
|
+
type: 'string',
|
|
90
|
+
default: 'Apex REST Api',
|
|
91
|
+
describe: 'If using "openapi" as the target generator, this allows you to specify the OpenApi title value.',
|
|
92
|
+
},
|
|
93
|
+
title: {
|
|
94
|
+
type: 'string',
|
|
95
|
+
describe: "If this allows you to specify the title of the generated documentation's home file.",
|
|
96
|
+
default: 'Classes',
|
|
97
|
+
},
|
|
98
|
+
namespace: {
|
|
99
|
+
type: 'string',
|
|
100
|
+
describe: 'The package namespace, if any. If this value is provided the namespace will be added as a prefix to all of the parsed files. ' +
|
|
101
|
+
"If generating an OpenApi definition, it will be added to the file's Server Url.",
|
|
102
|
+
},
|
|
103
|
+
openApiFileName: {
|
|
104
|
+
type: 'string',
|
|
105
|
+
describe: 'If using "openapi" as the target generator, this allows you to specify the name of the output file.',
|
|
106
|
+
default: 'openapi',
|
|
107
|
+
},
|
|
108
|
+
sortMembersAlphabetically: {
|
|
109
|
+
type: 'boolean',
|
|
110
|
+
describe: 'Whether to sort members alphabetically.',
|
|
111
|
+
default: false,
|
|
112
|
+
},
|
|
113
|
+
includeMetadata: {
|
|
114
|
+
type: 'boolean',
|
|
115
|
+
describe: "Whether to include the file's meta.xml information: Whether it is active and and the API version",
|
|
116
|
+
default: false,
|
|
117
|
+
},
|
|
118
|
+
documentationRootDir: {
|
|
119
|
+
type: 'string',
|
|
120
|
+
describe: 'Allows you to specify the root documentation directory where the files are being generated. This can be helpful when embedding the generated docs into an existing site so that the links are generated correctly.',
|
|
121
|
+
},
|
|
122
|
+
}).argv;
|
|
123
|
+
if (config) {
|
|
124
|
+
argv = Object.assign(Object.assign({}, config.config), argv);
|
|
125
|
+
}
|
|
126
|
+
settings_1.Settings.build({
|
|
127
|
+
sourceDirectory: argv.sourceDir,
|
|
128
|
+
recursive: argv.recursive,
|
|
129
|
+
scope: argv.scope,
|
|
130
|
+
outputDir: argv.targetDir,
|
|
131
|
+
targetGenerator: argv.targetGenerator,
|
|
132
|
+
indexOnly: argv.indexOnly,
|
|
133
|
+
defaultGroupName: argv.defaultGroupName,
|
|
134
|
+
sanitizeHtml: argv.sanitizeHtml,
|
|
135
|
+
openApiTitle: argv.openApiTitle,
|
|
136
|
+
title: argv.title,
|
|
137
|
+
namespace: argv.namespace,
|
|
138
|
+
openApiFileName: argv.openApiFileName,
|
|
139
|
+
sortMembersAlphabetically: argv.sortMembersAlphabetically,
|
|
140
|
+
includeMetadata: argv.includeMetadata,
|
|
141
|
+
rootDir: argv.documentationRootDir,
|
|
142
|
+
onAfterProcess: (_a = config === null || config === void 0 ? void 0 : config.config) === null || _a === void 0 ? void 0 : _a.onAfterProcess,
|
|
143
|
+
onBeforeFileWrite: (_b = config === null || config === void 0 ? void 0 : config.config) === null || _b === void 0 ? void 0 : _b.onBeforeFileWrite,
|
|
144
|
+
frontMatterHeader: (_c = config === null || config === void 0 ? void 0 : config.config) === null || _c === void 0 ? void 0 : _c.frontMatterHeader,
|
|
145
|
+
singleFile: (_d = config === null || config === void 0 ? void 0 : config.config) === null || _d === void 0 ? void 0 : _d.singleFile,
|
|
146
|
+
fileName: (_e = config === null || config === void 0 ? void 0 : config.config) === null || _e === void 0 ? void 0 : _e.fileName,
|
|
147
|
+
templateFilePath: (_f = config === null || config === void 0 ? void 0 : config.config) === null || _f === void 0 ? void 0 : _f.templateFilePath,
|
|
148
|
+
});
|
|
149
|
+
try {
|
|
150
|
+
Apexdocs_1.Apexdocs.generate();
|
|
151
|
+
}
|
|
152
|
+
catch (error) {
|
|
153
|
+
console.error(error);
|
|
154
|
+
process.exit(1);
|
|
155
|
+
}
|
|
156
|
+
});
|
|
131
157
|
//# sourceMappingURL=generate.js.map
|
package/lib/cli/generate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/cli/generate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/cli/generate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAA+B;AAE/B,0CAAuC;AACvC,sDAAmD;AAEnD,6CAA0C;AAE1C,MAAM,MAAM,GAAG,IAAA,yBAAW,EAAC,UAAU,CAAC,CAAC,MAAM,EAAE,CAAC;AAChD,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;;IACrB,KAAK,CAAC,MAAM,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,CAAC,CAAC;IAC7B,IAAI,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC;QACvB,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,GAAG;YACV,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,+DAA+D;SAC1E;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,SAAS;YAClB,QAAQ,EAAE,kEAAkE;SAC7E;QACD,SAAS,EAAE;YACT,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,kFAAkF;SAC7F;QACD,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,CAAC,QAAQ,CAAC;YACnB,QAAQ,EACN,sHAAsH;gBACtH,4HAA4H;gBAC5H,0IAA0I;SAC7I;QACD,eAAe,EAAE;YACf,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,CAAC;YAC3D,QAAQ,EACN,4EAA4E;gBAC5E,yEAAyE;SAC5E;QACD,SAAS,EAAE;YACT,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,0DAA0D;SACrE;QACD,gBAAgB,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,eAAe;YACxB,QAAQ,EAAE,qEAAqE;SAChF;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,IAAI;YACb,QAAQ,EACN,sGAAsG;gBACtG,kHAAkH;gBAClH,0GAA0G;gBAC1G,iDAAiD;SACpD;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,eAAe;YACxB,QAAQ,EAAE,iGAAiG;SAC5G;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,qFAAqF;YAC/F,OAAO,EAAE,SAAS;SACnB;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,QAAQ,EACN,+HAA+H;gBAC/H,iFAAiF;SACpF;QACD,eAAe,EAAE;YACf,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,qGAAqG;YAC/G,OAAO,EAAE,SAAS;SACnB;QACD,yBAAyB,EAAE;YACzB,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,yCAAyC;YACnD,OAAO,EAAE,KAAK;SACf;QACD,eAAe,EAAE;YACf,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,kGAAkG;YAC5G,OAAO,EAAE,KAAK;SACf;QACD,oBAAoB,EAAE;YACpB,IAAI,EAAE,QAAQ;YACd,QAAQ,EACN,oNAAoN;SACvN;KACF,CAAC,CAAC,IAAI,CAAC;IAER,IAAI,MAAM,EAAE;QACV,IAAI,mCAAQ,MAAM,CAAC,MAAM,GAAK,IAAI,CAAE,CAAC;KACtC;IAED,mBAAQ,CAAC,KAAK,CAAC;QACb,eAAe,EAAE,IAAI,CAAC,SAAS;QAC/B,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,eAAe,EAAE,IAAI,CAAC,eAAmC;QACzD,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;QACvC,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,eAAe,EAAE,IAAI,CAAC,eAAe;QACrC,yBAAyB,EAAE,IAAI,CAAC,yBAAyB;QACzD,eAAe,EAAE,IAAI,CAAC,eAAe;QACrC,OAAO,EAAE,IAAI,CAAC,oBAAoB;QAClC,cAAc,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,0CAAE,cAAc;QAC9C,iBAAiB,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,0CAAE,iBAAiB;QACpD,iBAAiB,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,0CAAE,iBAAiB;QACpD,UAAU,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,0CAAE,UAAU;QACtC,QAAQ,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,0CAAE,QAAQ;QAClC,gBAAgB,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,0CAAE,gBAAgB;KACnD,CAAC,CAAC;IAEH,IAAI;QACF,mBAAQ,CAAC,QAAQ,EAAE,CAAC;KACrB;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;AACH,CAAC,CAAC,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './service/manifest-factory';
|
|
1
|
+
export * from './service/manifest-factory';
|
package/lib/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./service/manifest-factory"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./service/manifest-factory"), exports);
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export default class ApexBundle {
|
|
2
|
-
filePath: string;
|
|
3
|
-
rawTypeContent: string;
|
|
4
|
-
rawMetadataContent: string | null;
|
|
5
|
-
constructor(filePath: string, rawTypeContent: string, rawMetadataContent: string | null);
|
|
6
|
-
}
|
|
1
|
+
export default class ApexBundle {
|
|
2
|
+
filePath: string;
|
|
3
|
+
rawTypeContent: string;
|
|
4
|
+
rawMetadataContent: string | null;
|
|
5
|
+
constructor(filePath: string, rawTypeContent: string, rawMetadataContent: string | null);
|
|
6
|
+
}
|
package/lib/model/apex-bundle.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class ApexBundle {
|
|
4
|
-
constructor(filePath, rawTypeContent, rawMetadataContent) {
|
|
5
|
-
this.filePath = filePath;
|
|
6
|
-
this.rawTypeContent = rawTypeContent;
|
|
7
|
-
this.rawMetadataContent = rawMetadataContent;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.default = ApexBundle;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class ApexBundle {
|
|
4
|
+
constructor(filePath, rawTypeContent, rawMetadataContent) {
|
|
5
|
+
this.filePath = filePath;
|
|
6
|
+
this.rawTypeContent = rawTypeContent;
|
|
7
|
+
this.rawMetadataContent = rawMetadataContent;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.default = ApexBundle;
|
|
11
11
|
//# sourceMappingURL=apex-bundle.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ClassMirror, MethodMirror } from '@cparra/apex-reflection';
|
|
2
|
-
export declare class ClassMirrorWrapper {
|
|
3
|
-
classMirror: ClassMirror;
|
|
4
|
-
constructor(classMirror: ClassMirror);
|
|
5
|
-
getMethodsByAnnotation(annotation: string): MethodMirror[];
|
|
6
|
-
private hasAnnotation;
|
|
7
|
-
}
|
|
1
|
+
import { ClassMirror, MethodMirror } from '@cparra/apex-reflection';
|
|
2
|
+
export declare class ClassMirrorWrapper {
|
|
3
|
+
classMirror: ClassMirror;
|
|
4
|
+
constructor(classMirror: ClassMirror);
|
|
5
|
+
getMethodsByAnnotation(annotation: string): MethodMirror[];
|
|
6
|
+
private hasAnnotation;
|
|
7
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ClassMirrorWrapper = void 0;
|
|
4
|
-
class ClassMirrorWrapper {
|
|
5
|
-
constructor(classMirror) {
|
|
6
|
-
this.classMirror = classMirror;
|
|
7
|
-
this.hasAnnotation = (method, annotationName) => method.annotations.some((annotation) => annotation.name.toLowerCase() === annotationName);
|
|
8
|
-
}
|
|
9
|
-
getMethodsByAnnotation(annotation) {
|
|
10
|
-
return this.classMirror.methods.filter((method) => this.hasAnnotation(method, annotation));
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.ClassMirrorWrapper = ClassMirrorWrapper;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClassMirrorWrapper = void 0;
|
|
4
|
+
class ClassMirrorWrapper {
|
|
5
|
+
constructor(classMirror) {
|
|
6
|
+
this.classMirror = classMirror;
|
|
7
|
+
this.hasAnnotation = (method, annotationName) => method.annotations.some((annotation) => annotation.name.toLowerCase() === annotationName);
|
|
8
|
+
}
|
|
9
|
+
getMethodsByAnnotation(annotation) {
|
|
10
|
+
return this.classMirror.methods.filter((method) => this.hasAnnotation(method, annotation));
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.ClassMirrorWrapper = ClassMirrorWrapper;
|
|
14
14
|
//# sourceMappingURL=ClassMirrorWrapper.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DocCommentAnnotation, MethodMirror } from '@cparra/apex-reflection';
|
|
2
|
-
export declare class MethodMirrorWrapper {
|
|
3
|
-
methodMirror: MethodMirror;
|
|
4
|
-
constructor(methodMirror: MethodMirror);
|
|
5
|
-
hasDocCommentAnnotation: (annotationName: string) => boolean | undefined;
|
|
6
|
-
getDocCommentAnnotation: (annotationName: string) => DocCommentAnnotation | undefined;
|
|
7
|
-
}
|
|
1
|
+
import { DocCommentAnnotation, MethodMirror } from '@cparra/apex-reflection';
|
|
2
|
+
export declare class MethodMirrorWrapper {
|
|
3
|
+
methodMirror: MethodMirror;
|
|
4
|
+
constructor(methodMirror: MethodMirror);
|
|
5
|
+
hasDocCommentAnnotation: (annotationName: string) => boolean | undefined;
|
|
6
|
+
getDocCommentAnnotation: (annotationName: string) => DocCommentAnnotation | undefined;
|
|
7
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MethodMirrorWrapper = void 0;
|
|
4
|
-
class MethodMirrorWrapper {
|
|
5
|
-
constructor(methodMirror) {
|
|
6
|
-
this.methodMirror = methodMirror;
|
|
7
|
-
this.hasDocCommentAnnotation = (annotationName) => { var _a; return (_a = this.methodMirror.docComment) === null || _a === void 0 ? void 0 : _a.annotations.some((annotation) => annotation.name.toLowerCase() === annotationName); };
|
|
8
|
-
this.getDocCommentAnnotation = (annotationName) => { var _a; return (_a = this.methodMirror.docComment) === null || _a === void 0 ? void 0 : _a.annotations.find((annotation) => annotation.name.toLowerCase() === annotationName); };
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
exports.MethodMirrorWrapper = MethodMirrorWrapper;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MethodMirrorWrapper = void 0;
|
|
4
|
+
class MethodMirrorWrapper {
|
|
5
|
+
constructor(methodMirror) {
|
|
6
|
+
this.methodMirror = methodMirror;
|
|
7
|
+
this.hasDocCommentAnnotation = (annotationName) => { var _a; return (_a = this.methodMirror.docComment) === null || _a === void 0 ? void 0 : _a.annotations.some((annotation) => annotation.name.toLowerCase() === annotationName); };
|
|
8
|
+
this.getDocCommentAnnotation = (annotationName) => { var _a; return (_a = this.methodMirror.docComment) === null || _a === void 0 ? void 0 : _a.annotations.find((annotation) => annotation.name.toLowerCase() === annotationName); };
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.MethodMirrorWrapper = MethodMirrorWrapper;
|
|
12
12
|
//# sourceMappingURL=MethodMirrorWrapper.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FieldMirror, MethodMirror, PropertyMirror } from '@cparra/apex-reflection';
|
|
2
|
-
export type InheritanceSupport = {
|
|
3
|
-
inherited: boolean;
|
|
4
|
-
};
|
|
5
|
-
export type FieldMirrorWithInheritance = FieldMirror & InheritanceSupport;
|
|
6
|
-
export type PropertyMirrorWithInheritance = PropertyMirror & InheritanceSupport;
|
|
7
|
-
export type MethodMirrorWithInheritance = MethodMirror & InheritanceSupport;
|
|
8
|
-
export type FieldOrProperty = FieldMirrorWithInheritance | PropertyMirrorWithInheritance;
|
|
1
|
+
import { FieldMirror, MethodMirror, PropertyMirror } from '@cparra/apex-reflection';
|
|
2
|
+
export type InheritanceSupport = {
|
|
3
|
+
inherited: boolean;
|
|
4
|
+
};
|
|
5
|
+
export type FieldMirrorWithInheritance = FieldMirror & InheritanceSupport;
|
|
6
|
+
export type PropertyMirrorWithInheritance = PropertyMirror & InheritanceSupport;
|
|
7
|
+
export type MethodMirrorWithInheritance = MethodMirror & InheritanceSupport;
|
|
8
|
+
export type FieldOrProperty = FieldMirrorWithInheritance | PropertyMirrorWithInheritance;
|
package/lib/model/inheritance.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=inheritance.js.map
|
package/lib/model/manifest.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Type, Annotation, DocComment } from '@cparra/apex-reflection';
|
|
2
|
-
type AccessAndDocAware = {
|
|
3
|
-
access_modifier: string;
|
|
4
|
-
annotations: Annotation[];
|
|
5
|
-
docComment?: DocComment;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Represents the full library of Apex top-level types (classes, enums, and interface) for a Salesforce project.
|
|
9
|
-
*/
|
|
10
|
-
export default class Manifest {
|
|
11
|
-
types: Type[];
|
|
12
|
-
isForInnerTypes: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Constructs a new Manifest object.
|
|
15
|
-
* @param types List of types to be wrapped by this object.
|
|
16
|
-
* @param isForInnerTypes Whether this manifest represent an inner type or not.
|
|
17
|
-
*/
|
|
18
|
-
constructor(types: Type[], isForInnerTypes?: boolean);
|
|
19
|
-
filteredByAccessModifierAndAnnotations(modifiers: string[]): Type[];
|
|
20
|
-
filterAccessibleModifier(
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
1
|
+
import { Type, Annotation, DocComment } from '@cparra/apex-reflection';
|
|
2
|
+
type AccessAndDocAware = {
|
|
3
|
+
access_modifier: string;
|
|
4
|
+
annotations: Annotation[];
|
|
5
|
+
docComment?: DocComment;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Represents the full library of Apex top-level types (classes, enums, and interface) for a Salesforce project.
|
|
9
|
+
*/
|
|
10
|
+
export default class Manifest {
|
|
11
|
+
types: Type[];
|
|
12
|
+
isForInnerTypes: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Constructs a new Manifest object.
|
|
15
|
+
* @param types List of types to be wrapped by this object.
|
|
16
|
+
* @param isForInnerTypes Whether this manifest represent an inner type or not.
|
|
17
|
+
*/
|
|
18
|
+
constructor(types: Type[], isForInnerTypes?: boolean);
|
|
19
|
+
filteredByAccessModifierAndAnnotations(modifiers: string[]): Type[];
|
|
20
|
+
filterAccessibleModifier(accessAndDocAware: AccessAndDocAware[], modifiers: string[]): AccessAndDocAware[];
|
|
21
|
+
}
|
|
22
|
+
export {};
|