@cparra/apexdocs 2.24.0 → 2.25.0-alpha.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/.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/__mocks__/chalk.js +12 -0
- package/__mocks__/log-update.js +6 -0
- 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/eslint.config.mjs +10 -0
- 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/config/project-scratch-def.json +5 -0
- package/examples/plain-markdown/docs/Miscellaneous/ns.BaseClass.md +16 -0
- package/examples/plain-markdown/docs/Miscellaneous/ns.ParentInterface.md +15 -0
- package/examples/plain-markdown/docs/Miscellaneous/ns.ReferencedEnum.md +8 -0
- package/examples/plain-markdown/docs/Miscellaneous/ns.SampleException.md +7 -0
- package/examples/plain-markdown/docs/Miscellaneous/ns.SampleInterface.md +115 -0
- package/examples/plain-markdown/docs/Sample-Enums/ns.SampleEnum.md +36 -0
- package/examples/plain-markdown/docs/SampleGroup/ns.SampleClass.md +173 -0
- package/examples/plain-markdown/docs/index.md +36 -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 +72 -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 +20 -0
- package/examples/plain-markdown/sfdx-project.json +12 -0
- package/examples/plain-markdown/template.md +3 -0
- package/jest.config.js +9 -5
- package/jest.d.ts +7 -0
- package/lib/__spec__/core/expect-extensions.d.ts +3 -0
- package/lib/__spec__/core/expect-extensions.js +54 -0
- package/lib/__spec__/core/expect-extensions.js.map +1 -0
- package/lib/__spec__/core/generating-class-docs.spec.d.ts +1 -0
- package/lib/__spec__/core/generating-class-docs.spec.js +427 -0
- package/lib/__spec__/core/generating-class-docs.spec.js.map +1 -0
- package/lib/__spec__/core/generating-enum-docs.spec.d.ts +1 -0
- package/lib/__spec__/core/generating-enum-docs.spec.js +303 -0
- package/lib/__spec__/core/generating-enum-docs.spec.js.map +1 -0
- package/lib/__spec__/core/generating-interface-docs.spec.d.ts +1 -0
- package/lib/__spec__/core/generating-interface-docs.spec.js +361 -0
- package/lib/__spec__/core/generating-interface-docs.spec.js.map +1 -0
- package/lib/__spec__/core/generating-reference-guide.spec.d.ts +1 -0
- package/lib/__spec__/core/generating-reference-guide.spec.js +161 -0
- package/lib/__spec__/core/generating-reference-guide.spec.js.map +1 -0
- package/lib/adapters/apex-types.d.ts +7 -0
- package/lib/adapters/apex-types.js +112 -0
- package/lib/adapters/apex-types.js.map +1 -0
- package/lib/adapters/documentables.d.ts +7 -0
- package/lib/adapters/documentables.js +56 -0
- package/lib/adapters/documentables.js.map +1 -0
- package/lib/adapters/fields-and-properties.d.ts +4 -0
- package/lib/adapters/fields-and-properties.js +32 -0
- package/lib/adapters/fields-and-properties.js.map +1 -0
- package/lib/adapters/methods-and-constructors.d.ts +5 -0
- package/lib/adapters/methods-and-constructors.js +92 -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 +7 -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/core/generate-docs.d.ts +23 -0
- package/lib/core/generate-docs.js +241 -0
- package/lib/core/generate-docs.js.map +1 -0
- package/lib/core/template.d.ts +10 -0
- package/lib/core/template.js +92 -0
- package/lib/core/template.js.map +1 -0
- package/lib/core/templates/reference-guide.d.ts +1 -0
- package/lib/core/templates/reference-guide.js +18 -0
- package/lib/core/templates/reference-guide.js.map +1 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +28 -17
- package/lib/index.js.map +1 -1
- 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 +52 -46
- package/lib/model/manifest.js.map +1 -1
- package/lib/model/markdown-file.d.ts +16 -16
- package/lib/model/markdown-file.js +110 -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 +45 -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 +53 -54
- package/lib/model/markdown-generation-util/field-declaration-util.js.map +1 -1
- 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 +113 -114
- package/lib/model/markdown-generation-util/method-declaration-util.js.map +1 -1
- package/lib/model/markdown-generation-util/type-declaration-util.d.ts +3 -3
- package/lib/model/markdown-generation-util/type-declaration-util.js +80 -81
- package/lib/model/markdown-generation-util/type-declaration-util.js.map +1 -1
- 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/open-api.js.map +1 -1
- 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 +21 -28
- package/lib/model/outputFile.js.map +1 -1
- package/lib/model/types-repository.d.ts +16 -16
- package/lib/model/types-repository.js +53 -53
- package/lib/model/types-repository.js.map +1 -1
- 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 +15 -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/metadata-processor.js.map +1 -1
- 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/state.js.map +1 -1
- package/lib/service/walkers/class-walker.d.ts +4 -4
- package/lib/service/walkers/class-walker.js +32 -32
- package/lib/service/walkers/class-walker.js.map +1 -1
- 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/interface-walker.js.map +1 -1
- package/lib/service/walkers/walker-factory.d.ts +5 -5
- package/lib/service/walkers/walker-factory.js +20 -20
- package/lib/service/walkers/walker-factory.js.map +1 -1
- package/lib/service/walkers/walker.d.ts +19 -19
- package/lib/service/walkers/walker.js +16 -16
- package/lib/service/walkers/walker.js.map +1 -1
- package/lib/settings.d.ts +64 -64
- package/lib/settings.js +88 -88
- package/lib/settings.js.map +1 -1
- 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/jekyll/jekyll-docsProcessor.js.map +1 -1
- 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 +77 -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 +36 -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 +28 -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 +16 -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 +27 -0
- package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/grouped-members-partial-template.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/grouped-members-partial-template.js +10 -0
- package/lib/transpiler/markdown/plain-markdown/grouped-members-partial-template.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 +47 -0
- package/lib/transpiler/markdown/plain-markdown/methods-partial-template.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.d.ts +9 -6
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js +41 -13
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js.map +1 -1
- package/lib/transpiler/markdown/plain-markdown/type-doc-partial.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/type-doc-partial.js +31 -0
- package/lib/transpiler/markdown/plain-markdown/type-doc-partial.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 +249 -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/openapi/parsers/ResponsesBuilder.js.map +1 -1
- 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/lib/util/string-utils.js.map +1 -1
- package/package.json +79 -78
- package/src/__spec__/core/expect-extensions.ts +32 -0
- package/src/__spec__/core/generating-class-docs.spec.ts +511 -0
- package/src/__spec__/core/generating-enum-docs.spec.ts +355 -0
- package/src/__spec__/core/generating-interface-docs.spec.ts +431 -0
- package/src/__spec__/core/generating-reference-guide.spec.ts +163 -0
- package/src/adapters/__tests__/interface-adapter.spec.ts +80 -0
- package/src/adapters/__tests__/references.spec.ts +115 -0
- package/src/adapters/apex-types.ts +224 -0
- package/src/adapters/documentables.ts +93 -0
- package/src/adapters/fields-and-properties.ts +38 -0
- package/src/adapters/methods-and-constructors.ts +117 -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 +96 -93
- package/src/core/generate-docs.ts +357 -0
- package/src/core/renderable/types.d.ts +131 -0
- package/src/core/template.ts +108 -0
- package/src/core/templates/reference-guide.ts +14 -0
- package/src/index.ts +3 -1
- package/src/model/__tests__/manifest.spec.ts +1 -0
- package/src/model/manifest.ts +15 -5
- package/src/model/markdown-file.ts +6 -5
- package/src/model/markdown-generation-util/doc-comment-annotation-util.ts +1 -1
- package/src/model/markdown-generation-util/method-declaration-util.ts +1 -1
- package/src/model/openapi/open-api-types.ts +2 -2
- package/src/model/outputFile.ts +2 -11
- package/src/service/__tests__/apex-file-reader.spec.ts +4 -4
- package/src/service/__tests__/manifest-factory.spec.ts +1 -2
- package/src/service/parser.ts +1 -1
- 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 +73 -0
- package/src/transpiler/markdown/plain-markdown/constructors-partial-template.ts +32 -0
- package/src/transpiler/markdown/plain-markdown/documentable-partial-template.ts +24 -0
- package/src/transpiler/markdown/plain-markdown/enum-template.ts +12 -0
- package/src/transpiler/markdown/plain-markdown/fieldsPartialTemplate.ts +23 -0
- package/src/transpiler/markdown/plain-markdown/grouped-members-partial-template.ts +6 -0
- package/src/transpiler/markdown/plain-markdown/interface-template.ts +16 -0
- package/src/transpiler/markdown/plain-markdown/methods-partial-template.ts +43 -0
- package/src/transpiler/markdown/plain-markdown/plain-docsProcessor.ts +30 -0
- package/src/transpiler/markdown/plain-markdown/type-doc-partial.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 +4 -3
- 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/.eslintrc.js +0 -12
- 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
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.classMarkdownTemplate = void 0;
|
|
4
|
+
exports.classMarkdownTemplate = `
|
|
5
|
+
{{ heading headingLevel heading }}
|
|
6
|
+
{{#if classModifier}}
|
|
7
|
+
\`{{classModifier}}\`
|
|
8
|
+
{{/if}}
|
|
9
|
+
|
|
10
|
+
{{> typeDocumentation}}
|
|
11
|
+
|
|
12
|
+
{{#if extends}}
|
|
13
|
+
**Extends**
|
|
14
|
+
{{link extends}}
|
|
15
|
+
{{/if}}
|
|
16
|
+
|
|
17
|
+
{{#if implements}}
|
|
18
|
+
**Implements**
|
|
19
|
+
{{#each implements}}
|
|
20
|
+
{{link this}}{{#unless @last}}, {{/unless}}
|
|
21
|
+
{{/each}}
|
|
22
|
+
{{/if}}
|
|
23
|
+
|
|
24
|
+
{{#if fields.value}}
|
|
25
|
+
{{#if fields.isGrouped}}
|
|
26
|
+
{{> groupedMembersPartialTemplate fields subTemplate="fieldsPartialTemplate"}}
|
|
27
|
+
{{else}}
|
|
28
|
+
{{> fieldsPartialTemplate fields}}
|
|
29
|
+
{{/if}}
|
|
30
|
+
{{/if}}
|
|
31
|
+
|
|
32
|
+
{{#if properties.value}}
|
|
33
|
+
{{#if properties.isGrouped}}
|
|
34
|
+
{{> groupedMembersPartialTemplate properties subTemplate="fieldsPartialTemplate"}}
|
|
35
|
+
{{else}}
|
|
36
|
+
{{> fieldsPartialTemplate properties}}
|
|
37
|
+
{{/if}}
|
|
38
|
+
{{/if}}
|
|
39
|
+
|
|
40
|
+
{{#if constructors.value}}
|
|
41
|
+
{{#if constructors.isGrouped}}
|
|
42
|
+
{{> groupedMembersPartialTemplate constructors subTemplate="constructorsPartialTemplate"}}
|
|
43
|
+
{{else}}
|
|
44
|
+
{{> constructorsPartialTemplate constructors}}
|
|
45
|
+
{{/if}}
|
|
46
|
+
{{/if}}
|
|
47
|
+
|
|
48
|
+
{{#if methods.value}}
|
|
49
|
+
{{#if methods.isGrouped}}
|
|
50
|
+
{{> groupedMembersPartialTemplate methods subTemplate="methodsPartialTemplate"}}
|
|
51
|
+
{{else}}
|
|
52
|
+
{{> methodsPartialTemplate methods}}
|
|
53
|
+
{{/if}}
|
|
54
|
+
{{/if}}
|
|
55
|
+
|
|
56
|
+
{{#if innerClasses.value}}
|
|
57
|
+
{{ heading innerClasses.headingLevel innerClasses.heading }}
|
|
58
|
+
{{#each innerClasses.value}}
|
|
59
|
+
{{> classTemplate this}}
|
|
60
|
+
{{/each}}
|
|
61
|
+
{{/if}}
|
|
62
|
+
|
|
63
|
+
{{#if innerEnums.value}}
|
|
64
|
+
{{ heading innerEnums.headingLevel innerEnums.heading }}
|
|
65
|
+
{{#each innerEnums.value}}
|
|
66
|
+
{{> enumTemplate this}}
|
|
67
|
+
{{/each}}
|
|
68
|
+
{{/if}}
|
|
69
|
+
|
|
70
|
+
{{#if innerInterfaces.value}}
|
|
71
|
+
{{ heading innerInterfaces.headingLevel innerInterfaces.heading }}
|
|
72
|
+
{{#each innerInterfaces.value}}
|
|
73
|
+
{{> interfaceTemplate this}}
|
|
74
|
+
{{/each}}
|
|
75
|
+
{{/if}}
|
|
76
|
+
`.trim();
|
|
77
|
+
//# sourceMappingURL=class-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-template.js","sourceRoot":"","sources":["../../../../src/transpiler/markdown/plain-markdown/class-template.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEpC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const constructorsPartialTemplate: string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.constructorsPartialTemplate = void 0;
|
|
4
|
+
exports.constructorsPartialTemplate = `
|
|
5
|
+
{{ heading headingLevel heading }}
|
|
6
|
+
{{#each value}}
|
|
7
|
+
{{{ heading headingLevel (inlineCode heading) }}}
|
|
8
|
+
|
|
9
|
+
{{#> documentablePartialTemplate}}
|
|
10
|
+
|
|
11
|
+
{{ heading signature.headingLevel signature.heading }}
|
|
12
|
+
{{ code "apex" signature.value }}
|
|
13
|
+
|
|
14
|
+
{{#if parameters.value}}
|
|
15
|
+
{{ heading parameters.headingLevel parameters.heading }}
|
|
16
|
+
| Name | Type | Description |
|
|
17
|
+
|------|------|-------------|
|
|
18
|
+
{{#each parameters.value}}
|
|
19
|
+
| {{name}} | {{type}} | {{description}} |
|
|
20
|
+
{{/each}}
|
|
21
|
+
{{/if}}
|
|
22
|
+
|
|
23
|
+
{{#if throws.value}}
|
|
24
|
+
{{ heading throws.headingLevel throws.heading }}
|
|
25
|
+
{{#each throws.value}}
|
|
26
|
+
{{link this.type}}: {{this.description}}
|
|
27
|
+
|
|
28
|
+
{{/each}}
|
|
29
|
+
{{/if}}
|
|
30
|
+
{{/documentablePartialTemplate}}
|
|
31
|
+
|
|
32
|
+
{{#unless @last}}---{{/unless}}
|
|
33
|
+
|
|
34
|
+
{{/each}}
|
|
35
|
+
`.trim();
|
|
36
|
+
//# sourceMappingURL=constructors-partial-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constructors-partial-template.js","sourceRoot":"","sources":["../../../../src/transpiler/markdown/plain-markdown/constructors-partial-template.ts"],"names":[],"mappings":";;;AAAa,QAAA,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B1C,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const documentablePartialTemplate: string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.documentablePartialTemplate = void 0;
|
|
4
|
+
exports.documentablePartialTemplate = `
|
|
5
|
+
{{#each doc.annotations}}
|
|
6
|
+
\`{{this}}\`
|
|
7
|
+
{{/each}}
|
|
8
|
+
|
|
9
|
+
{{withLinks doc.description}}
|
|
10
|
+
|
|
11
|
+
{{#each doc.customTags}}
|
|
12
|
+
**{{splitAndCapitalize name}}** {{withLinks description}}
|
|
13
|
+
|
|
14
|
+
{{/each}}
|
|
15
|
+
|
|
16
|
+
{{> @partial-block}}
|
|
17
|
+
|
|
18
|
+
{{#if doc.mermaid.value}}
|
|
19
|
+
{{ heading doc.mermaid.headingLevel doc.mermaid.heading }}
|
|
20
|
+
{{code "mermaid" doc.mermaid.value}}
|
|
21
|
+
{{/if}}
|
|
22
|
+
|
|
23
|
+
{{#if doc.example.value}}
|
|
24
|
+
{{ heading doc.example.headingLevel doc.example.heading }}
|
|
25
|
+
{{code "apex" doc.example.value}}
|
|
26
|
+
{{/if}}
|
|
27
|
+
`.trim();
|
|
28
|
+
//# sourceMappingURL=documentable-partial-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentable-partial-template.js","sourceRoot":"","sources":["../../../../src/transpiler/markdown/plain-markdown/documentable-partial-template.ts"],"names":[],"mappings":";;;AAAa,QAAA,2BAA2B,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuB1C,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const enumMarkdownTemplate: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.enumMarkdownTemplate = void 0;
|
|
4
|
+
exports.enumMarkdownTemplate = `
|
|
5
|
+
{{ heading headingLevel heading }}
|
|
6
|
+
|
|
7
|
+
{{> typeDocumentation }}
|
|
8
|
+
|
|
9
|
+
{{ heading values.headingLevel values.heading }}
|
|
10
|
+
| Value | Description |
|
|
11
|
+
|-------|-------------|
|
|
12
|
+
{{#each values.value}}
|
|
13
|
+
| {{value}} | {{description}} |
|
|
14
|
+
{{/each}}
|
|
15
|
+
`.trim();
|
|
16
|
+
//# sourceMappingURL=enum-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enum-template.js","sourceRoot":"","sources":["../../../../src/transpiler/markdown/plain-markdown/enum-template.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG;;;;;;;;;;;CAWnC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fieldsPartialTemplate: string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fieldsPartialTemplate = void 0;
|
|
4
|
+
exports.fieldsPartialTemplate = `
|
|
5
|
+
{{ heading headingLevel heading }}
|
|
6
|
+
{{#each value}}
|
|
7
|
+
{{{ heading headingLevel (inlineCode heading) }}}
|
|
8
|
+
|
|
9
|
+
{{#if inherited}}
|
|
10
|
+
*Inherited*
|
|
11
|
+
{{/if}}
|
|
12
|
+
|
|
13
|
+
{{#> documentablePartialTemplate }}
|
|
14
|
+
|
|
15
|
+
{{ heading signature.headingLevel signature.heading }}
|
|
16
|
+
{{ code "apex" signature.value }}
|
|
17
|
+
|
|
18
|
+
{{ heading type.headingLevel type.heading }}
|
|
19
|
+
{{link type.value}}
|
|
20
|
+
|
|
21
|
+
{{/documentablePartialTemplate}}
|
|
22
|
+
|
|
23
|
+
{{#unless @last}}---{{/unless}}
|
|
24
|
+
|
|
25
|
+
{{/each}}
|
|
26
|
+
`.trim();
|
|
27
|
+
//# sourceMappingURL=fieldsPartialTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fieldsPartialTemplate.js","sourceRoot":"","sources":["../../../../src/transpiler/markdown/plain-markdown/fieldsPartialTemplate.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsBpC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const groupedMembersPartialTemplate: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.groupedMembersPartialTemplate = void 0;
|
|
4
|
+
exports.groupedMembersPartialTemplate = `
|
|
5
|
+
{{ heading headingLevel heading }}
|
|
6
|
+
{{#each value}}
|
|
7
|
+
{{> (lookup .. "subTemplate") this}}
|
|
8
|
+
{{/each}}
|
|
9
|
+
`.trim();
|
|
10
|
+
//# sourceMappingURL=grouped-members-partial-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grouped-members-partial-template.js","sourceRoot":"","sources":["../../../../src/transpiler/markdown/plain-markdown/grouped-members-partial-template.ts"],"names":[],"mappings":";;;AAAa,QAAA,6BAA6B,GAAG;;;;;CAK5C,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const interfaceMarkdownTemplate: string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.interfaceMarkdownTemplate = void 0;
|
|
4
|
+
exports.interfaceMarkdownTemplate = `
|
|
5
|
+
{{ heading headingLevel heading }}
|
|
6
|
+
|
|
7
|
+
{{> typeDocumentation }}
|
|
8
|
+
|
|
9
|
+
{{#if extends}}
|
|
10
|
+
**Extends**
|
|
11
|
+
{{#each extends}}
|
|
12
|
+
{{link this}}{{#unless @last}}, {{/unless}}
|
|
13
|
+
{{/each}}
|
|
14
|
+
{{/if}}
|
|
15
|
+
|
|
16
|
+
{{#if methods}}
|
|
17
|
+
{{> methodsPartialTemplate methods}}
|
|
18
|
+
{{/if}}
|
|
19
|
+
`.trim();
|
|
20
|
+
//# sourceMappingURL=interface-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface-template.js","sourceRoot":"","sources":["../../../../src/transpiler/markdown/plain-markdown/interface-template.ts"],"names":[],"mappings":";;;AAAa,QAAA,yBAAyB,GAAG;;;;;;;;;;;;;;;CAexC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const methodsPartialTemplate: string;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.methodsPartialTemplate = void 0;
|
|
4
|
+
exports.methodsPartialTemplate = `
|
|
5
|
+
{{ heading headingLevel heading }}
|
|
6
|
+
{{#each value}}
|
|
7
|
+
{{{ heading headingLevel (inlineCode heading) }}}
|
|
8
|
+
|
|
9
|
+
{{#if inherited}}
|
|
10
|
+
*Inherited*
|
|
11
|
+
{{/if}}
|
|
12
|
+
|
|
13
|
+
{{#> documentablePartialTemplate}}
|
|
14
|
+
|
|
15
|
+
{{ heading signature.headingLevel signature.heading }}
|
|
16
|
+
{{ code "apex" signature.value }}
|
|
17
|
+
|
|
18
|
+
{{#if parameters.value}}
|
|
19
|
+
{{ heading parameters.headingLevel parameters.heading }}
|
|
20
|
+
| Name | Type | Description |
|
|
21
|
+
|------|------|-------------|
|
|
22
|
+
{{#each parameters.value}}
|
|
23
|
+
| {{name}} | {{link type}} | {{withLinks description}} |
|
|
24
|
+
{{/each}}
|
|
25
|
+
{{/if}}
|
|
26
|
+
|
|
27
|
+
{{ heading returnType.headingLevel returnType.heading }}
|
|
28
|
+
**{{link returnType.value.type}}**
|
|
29
|
+
|
|
30
|
+
{{#if returnType.value.description}}
|
|
31
|
+
{{returnType.value.description}}
|
|
32
|
+
{{/if}}
|
|
33
|
+
|
|
34
|
+
{{#if throws.value}}
|
|
35
|
+
{{ heading throws.headingLevel throws.heading }}
|
|
36
|
+
{{#each throws.value}}
|
|
37
|
+
{{link this.type}}: {{this.description}}
|
|
38
|
+
|
|
39
|
+
{{/each}}
|
|
40
|
+
{{/if}}
|
|
41
|
+
{{/documentablePartialTemplate}}
|
|
42
|
+
|
|
43
|
+
{{#unless @last}}---{{/unless}}
|
|
44
|
+
|
|
45
|
+
{{/each}}
|
|
46
|
+
`.trim();
|
|
47
|
+
//# sourceMappingURL=methods-partial-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"methods-partial-template.js","sourceRoot":"","sources":["../../../../src/transpiler/markdown/plain-markdown/methods-partial-template.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CrC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { MarkdownTranspilerBase } from '../markdown-transpiler-base';
|
|
2
|
-
import { LinkingStrategy } from '../../processor-type-transpiler';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { MarkdownTranspilerBase } from '../markdown-transpiler-base';
|
|
2
|
+
import { LinkingStrategy } from '../../processor-type-transpiler';
|
|
3
|
+
import { Type } from '@cparra/apex-reflection';
|
|
4
|
+
export declare class PlainMarkdownDocsProcessor extends MarkdownTranspilerBase {
|
|
5
|
+
onBeforeProcess: (types: Type[]) => void;
|
|
6
|
+
homeFileName(): string;
|
|
7
|
+
getLinkingStrategy(): LinkingStrategy;
|
|
8
|
+
onProcess(type: Type): void;
|
|
9
|
+
}
|
|
@@ -1,14 +1,42 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PlainMarkdownDocsProcessor = void 0;
|
|
7
|
+
const markdown_transpiler_base_1 = require("../markdown-transpiler-base");
|
|
8
|
+
const outputFile_1 = require("../../../model/outputFile");
|
|
9
|
+
const settings_1 = require("../../../settings");
|
|
10
|
+
const class_file_generatorHelper_1 = __importDefault(require("../class-file-generatorHelper"));
|
|
11
|
+
const markdown_home_file_1 = require("../../../model/markdown-home-file");
|
|
12
|
+
const generate_docs_1 = require("../../../core/generate-docs");
|
|
13
|
+
const references_1 = require("../../../adapters/references");
|
|
14
|
+
class PlainMarkdownDocsProcessor extends markdown_transpiler_base_1.MarkdownTranspilerBase {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.onBeforeProcess = (types) => {
|
|
18
|
+
this._fileContainer.pushFile(new markdown_home_file_1.MarkdownHomeFile(this.homeFileName(), types));
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
homeFileName() {
|
|
22
|
+
return 'index';
|
|
23
|
+
}
|
|
24
|
+
getLinkingStrategy() {
|
|
25
|
+
return 'path-relative';
|
|
26
|
+
}
|
|
27
|
+
onProcess(type) {
|
|
28
|
+
this._fileContainer.pushFile(new GenericFile(type));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.PlainMarkdownDocsProcessor = PlainMarkdownDocsProcessor;
|
|
32
|
+
class GenericFile extends outputFile_1.OutputFile {
|
|
33
|
+
constructor(type) {
|
|
34
|
+
super(`${settings_1.Settings.getInstance().getNamespacePrefix()}${type.name}`, class_file_generatorHelper_1.default.getSanitizedGroup(type));
|
|
35
|
+
this.type = type;
|
|
36
|
+
this.addText((0, generate_docs_1.documentType)(type, references_1.linkFromTypeNameGenerator, settings_1.Settings.getInstance().getNamespace()));
|
|
37
|
+
}
|
|
38
|
+
fileExtension() {
|
|
39
|
+
return '.md';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
14
42
|
//# sourceMappingURL=plain-docsProcessor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plain-docsProcessor.js","sourceRoot":"","sources":["../../../../src/transpiler/markdown/plain-markdown/plain-docsProcessor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plain-docsProcessor.js","sourceRoot":"","sources":["../../../../src/transpiler/markdown/plain-markdown/plain-docsProcessor.ts"],"names":[],"mappings":";;;;;;AAAA,0EAAqE;AAGrE,0DAAuD;AACvD,gDAA6C;AAC7C,+FAAqE;AACrE,0EAAqE;AACrE,+DAA2D;AAC3D,6DAAyE;AAEzE,MAAa,0BAA2B,SAAQ,iDAAsB;IAAtE;;QACE,oBAAe,GAAG,CAAC,KAAa,EAAE,EAAE;YAClC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,qCAAgB,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;QACjF,CAAC,CAAC;IAaJ,CAAC;IAXC,YAAY;QACV,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,kBAAkB;QAChB,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,SAAS,CAAC,IAAU;QAClB,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;IACtD,CAAC;CACF;AAhBD,gEAgBC;AAED,MAAM,WAAY,SAAQ,uBAAU;IAClC,YAAoB,IAAU;QAC5B,KAAK,CACH,GAAG,mBAAQ,CAAC,WAAW,EAAE,CAAC,kBAAkB,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,EAC5D,oCAAwB,CAAC,iBAAiB,CAAC,IAAI,CAAC,CACjD,CAAC;QAJgB,SAAI,GAAJ,IAAI,CAAM;QAM5B,IAAI,CAAC,OAAO,CAAC,IAAA,4BAAY,EAAC,IAAI,EAAE,sCAAyB,EAAE,mBAAQ,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IACrG,CAAC;IAED,aAAa;QACX,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const typeDocPartial: string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.typeDocPartial = void 0;
|
|
4
|
+
exports.typeDocPartial = `
|
|
5
|
+
{{#> documentablePartialTemplate}}
|
|
6
|
+
|
|
7
|
+
{{#if doc.group}}
|
|
8
|
+
**Group** {{doc.group}}
|
|
9
|
+
{{/if}}
|
|
10
|
+
|
|
11
|
+
{{#if doc.author}}
|
|
12
|
+
**Author** {{doc.author}}
|
|
13
|
+
{{/if}}
|
|
14
|
+
|
|
15
|
+
{{#if doc.date}}
|
|
16
|
+
**Date** {{doc.date}}
|
|
17
|
+
{{/if}}
|
|
18
|
+
|
|
19
|
+
{{#each doc.sees}}
|
|
20
|
+
**See** {{link this}}
|
|
21
|
+
|
|
22
|
+
{{/each}}
|
|
23
|
+
|
|
24
|
+
{{#if namespace}}
|
|
25
|
+
## Namespace
|
|
26
|
+
{{namespace}}
|
|
27
|
+
{{/if}}
|
|
28
|
+
|
|
29
|
+
{{/documentablePartialTemplate}}
|
|
30
|
+
`.trim();
|
|
31
|
+
//# sourceMappingURL=type-doc-partial.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-doc-partial.js","sourceRoot":"","sources":["../../../../src/transpiler/markdown/plain-markdown/type-doc-partial.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B7B,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import ProcessorTypeTranspiler from '../processor-type-transpiler';
|
|
2
|
-
import { FileContainer } from '../file-container';
|
|
3
|
-
import { Type } from '@cparra/apex-reflection';
|
|
4
|
-
import { OpenApi } from '../../model/openapi/open-api';
|
|
5
|
-
export declare class OpenApiDocsProcessor extends ProcessorTypeTranspiler {
|
|
6
|
-
protected readonly _fileContainer: FileContainer;
|
|
7
|
-
openApiModel: OpenApi;
|
|
8
|
-
constructor();
|
|
9
|
-
fileBuilder(): FileContainer;
|
|
10
|
-
onProcess(type: Type): void;
|
|
11
|
-
onAfterProcess: ((types: Type[]) => void) | undefined;
|
|
12
|
-
private getEndpointPath;
|
|
13
|
-
}
|
|
1
|
+
import ProcessorTypeTranspiler from '../processor-type-transpiler';
|
|
2
|
+
import { FileContainer } from '../file-container';
|
|
3
|
+
import { Type } from '@cparra/apex-reflection';
|
|
4
|
+
import { OpenApi } from '../../model/openapi/open-api';
|
|
5
|
+
export declare class OpenApiDocsProcessor extends ProcessorTypeTranspiler {
|
|
6
|
+
protected readonly _fileContainer: FileContainer;
|
|
7
|
+
openApiModel: OpenApi;
|
|
8
|
+
constructor();
|
|
9
|
+
fileBuilder(): FileContainer;
|
|
10
|
+
onProcess(type: Type): void;
|
|
11
|
+
onAfterProcess: ((types: Type[]) => void) | undefined;
|
|
12
|
+
private getEndpointPath;
|
|
13
|
+
}
|
|
@@ -1,75 +1,78 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
this.
|
|
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
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.OpenApiDocsProcessor = void 0;
|
|
7
|
+
const processor_type_transpiler_1 = __importDefault(require("../processor-type-transpiler"));
|
|
8
|
+
const file_container_1 = require("../file-container");
|
|
9
|
+
const openapi_type_file_1 = require("../../model/openapi/openapi-type-file");
|
|
10
|
+
const logger_1 = require("../../util/logger");
|
|
11
|
+
const open_api_1 = require("../../model/openapi/open-api");
|
|
12
|
+
const settings_1 = require("../../settings");
|
|
13
|
+
const MethodParser_1 = require("./parsers/MethodParser");
|
|
14
|
+
const string_utils_1 = require("../../util/string-utils");
|
|
15
|
+
class OpenApiDocsProcessor extends processor_type_transpiler_1.default {
|
|
16
|
+
constructor() {
|
|
17
|
+
super();
|
|
18
|
+
this.onAfterProcess = () => {
|
|
19
|
+
this._fileContainer.pushFile(new openapi_type_file_1.OpenapiTypeFile(this.openApiModel));
|
|
20
|
+
};
|
|
21
|
+
this._fileContainer = new file_container_1.FileContainer();
|
|
22
|
+
const title = settings_1.Settings.getInstance().getOpenApiTitle();
|
|
23
|
+
if (!title) {
|
|
24
|
+
throw Error('No OpenApi title was provided.');
|
|
25
|
+
}
|
|
26
|
+
this.openApiModel = new open_api_1.OpenApi(title, '1.0.0', settings_1.Settings.getInstance().getNamespace());
|
|
27
|
+
}
|
|
28
|
+
fileBuilder() {
|
|
29
|
+
return this._fileContainer;
|
|
30
|
+
}
|
|
31
|
+
onProcess(type) {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
logger_1.Logger.logSingle(`Processing ${type.name}`, false, 'green', false);
|
|
34
|
+
const endpointPath = this.getEndpointPath(type);
|
|
35
|
+
if (!endpointPath) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this.openApiModel.paths[endpointPath] = {};
|
|
39
|
+
if ((_a = type.docComment) === null || _a === void 0 ? void 0 : _a.description) {
|
|
40
|
+
this.openApiModel.paths[endpointPath].description = type.docComment.description;
|
|
41
|
+
}
|
|
42
|
+
// We can safely cast to a ClassMirror, since only these support the @RestResource annotation
|
|
43
|
+
const typeAsClass = type;
|
|
44
|
+
// Add tags for this Apex class to the OpenApi model
|
|
45
|
+
const tagName = (0, string_utils_1.camel2title)(endpointPath);
|
|
46
|
+
this.openApiModel.tags.push({
|
|
47
|
+
name: tagName,
|
|
48
|
+
description: (_b = type.docComment) === null || _b === void 0 ? void 0 : _b.description,
|
|
49
|
+
});
|
|
50
|
+
const parser = new MethodParser_1.MethodParser(this.openApiModel);
|
|
51
|
+
// GET
|
|
52
|
+
parser.parseMethod(typeAsClass, endpointPath, 'get', tagName);
|
|
53
|
+
// PATCH
|
|
54
|
+
parser.parseMethod(typeAsClass, endpointPath, 'patch', tagName);
|
|
55
|
+
// POST
|
|
56
|
+
parser.parseMethod(typeAsClass, endpointPath, 'post', tagName);
|
|
57
|
+
// PUT
|
|
58
|
+
parser.parseMethod(typeAsClass, endpointPath, 'put', tagName);
|
|
59
|
+
// DELETE
|
|
60
|
+
parser.parseMethod(typeAsClass, endpointPath, 'delete', tagName);
|
|
61
|
+
}
|
|
62
|
+
getEndpointPath(type) {
|
|
63
|
+
var _a;
|
|
64
|
+
const restResourceAnnotation = type.annotations.find((element) => element.name.toLowerCase() === 'restresource');
|
|
65
|
+
const urlMapping = (_a = restResourceAnnotation === null || restResourceAnnotation === void 0 ? void 0 : restResourceAnnotation.elementValues) === null || _a === void 0 ? void 0 : _a.find((element) => element.key.toLowerCase() === 'urlmapping');
|
|
66
|
+
if (!urlMapping) {
|
|
67
|
+
logger_1.Logger.error(`Type does not contain urlMapping annotation ${type.name}`);
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
let endpointPath = urlMapping.value.replaceAll('"', '').replaceAll("'", '').replaceAll('/*', '/');
|
|
71
|
+
if (endpointPath.startsWith('/')) {
|
|
72
|
+
endpointPath = endpointPath.substring(1);
|
|
73
|
+
}
|
|
74
|
+
return endpointPath;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.OpenApiDocsProcessor = OpenApiDocsProcessor;
|
|
75
78
|
//# sourceMappingURL=open-api-docs-processor.js.map
|