@cparra/apexdocs 2.25.0 → 3.0.0-alpha.10
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/README.md +73 -12
- package/__mocks__/chalk.js +12 -0
- package/__mocks__/log-update.js +6 -0
- package/dist/cli/generate.js +3181 -0
- package/dist/defaults-DGKfeZq-.js +13 -0
- package/dist/index.d.ts +117 -0
- package/dist/index.js +36 -0
- package/eslint.config.mjs +10 -0
- package/examples/markdown/.forceignore +12 -0
- package/examples/markdown/config/project-scratch-def.json +5 -0
- package/examples/markdown/docs/index.md +109 -0
- package/examples/markdown/docs/miscellaneous/BaseClass.md +16 -0
- package/examples/markdown/docs/miscellaneous/MultiInheritanceClass.md +72 -0
- package/examples/markdown/docs/miscellaneous/ParentInterface.md +15 -0
- package/examples/markdown/docs/miscellaneous/ReferencedEnum.md +8 -0
- package/examples/markdown/docs/miscellaneous/SampleException.md +24 -0
- package/examples/markdown/docs/miscellaneous/SampleInterface.md +116 -0
- package/examples/markdown/docs/miscellaneous/Url.md +309 -0
- package/examples/markdown/docs/sample-enums/SampleEnum.md +36 -0
- package/examples/markdown/docs/samplegroup/SampleClass.md +170 -0
- package/examples/markdown/force-app/classes/BaseClass.cls +3 -0
- package/examples/markdown/force-app/classes/MultiInheritanceClass.cls +1 -0
- package/examples/markdown/force-app/classes/ParentInterface.cls +3 -0
- package/examples/markdown/force-app/classes/ReferencedEnum.cls +3 -0
- package/examples/markdown/force-app/classes/SampleClass.cls +72 -0
- package/examples/markdown/force-app/classes/SampleEnum.cls +30 -0
- package/examples/markdown/force-app/classes/SampleException.cls +17 -0
- package/examples/markdown/force-app/classes/SampleInterface.cls +50 -0
- package/examples/markdown/force-app/classes/Url.cls +194 -0
- package/examples/markdown/package-lock.json +665 -0
- package/examples/markdown/package.json +20 -0
- package/examples/markdown/sfdx-project.json +12 -0
- package/examples/vitepress/.forceignore +12 -0
- package/examples/vitepress/apexdocs.config.ts +106 -0
- package/examples/vitepress/config/project-scratch-def.json +13 -0
- package/examples/vitepress/docs/.vitepress/cache/deps/@theme_index.js +259 -0
- package/examples/vitepress/docs/.vitepress/cache/deps/@theme_index.js.map +7 -0
- package/examples/vitepress/docs/.vitepress/cache/deps/_metadata.json +40 -0
- package/examples/vitepress/docs/.vitepress/cache/deps/chunk-574YRH25.js +11474 -0
- package/examples/vitepress/docs/.vitepress/cache/deps/chunk-574YRH25.js.map +7 -0
- package/examples/vitepress/docs/.vitepress/cache/deps/chunk-E5DZZB2I.js +9172 -0
- package/examples/vitepress/docs/.vitepress/cache/deps/chunk-E5DZZB2I.js.map +7 -0
- package/examples/vitepress/docs/.vitepress/cache/deps/package.json +3 -0
- package/examples/vitepress/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +4339 -0
- package/examples/vitepress/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +7 -0
- package/examples/vitepress/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +567 -0
- package/examples/vitepress/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +7 -0
- package/examples/vitepress/docs/.vitepress/cache/deps/vue.js +323 -0
- package/examples/vitepress/docs/.vitepress/cache/deps/vue.js.map +7 -0
- package/examples/vitepress/docs/.vitepress/config.mts +21 -0
- package/examples/vitepress/docs/.vitepress/sidebar.json +119 -0
- package/examples/vitepress/docs/api-examples.md +49 -0
- package/examples/vitepress/docs/index-frontmatter.md +16 -0
- package/examples/vitepress/docs/index.md +56 -0
- package/examples/vitepress/docs/markdown-examples.md +85 -0
- package/examples/vitepress/docs/miscellaneous/BaseClass.md +20 -0
- package/examples/vitepress/docs/miscellaneous/MultiInheritanceClass.md +76 -0
- package/examples/vitepress/docs/miscellaneous/ParentInterface.md +19 -0
- package/examples/vitepress/docs/miscellaneous/ReferencedEnum.md +15 -0
- package/examples/vitepress/docs/miscellaneous/SampleException.md +28 -0
- package/examples/vitepress/docs/miscellaneous/SampleInterface.md +116 -0
- package/examples/vitepress/docs/miscellaneous/Url.md +317 -0
- package/examples/vitepress/docs/sample-enums/SampleEnum.md +40 -0
- package/examples/vitepress/docs/samplegroup/SampleClass.md +174 -0
- package/examples/vitepress/force-app/main/default/classes/BaseClass.cls +3 -0
- package/examples/vitepress/force-app/main/default/classes/MultiInheritanceClass.cls +1 -0
- package/examples/vitepress/force-app/main/default/classes/ParentInterface.cls +3 -0
- package/examples/vitepress/force-app/main/default/classes/ReferencedEnum.cls +5 -0
- package/examples/vitepress/force-app/main/default/classes/SampleClass.cls +72 -0
- package/examples/vitepress/force-app/main/default/classes/SampleEnum.cls +30 -0
- package/examples/vitepress/force-app/main/default/classes/SampleException.cls +17 -0
- package/examples/vitepress/force-app/main/default/classes/SampleInterface.cls +46 -0
- package/examples/vitepress/force-app/main/default/classes/Url.cls +198 -0
- package/examples/vitepress/package-lock.json +2574 -0
- package/examples/vitepress/package.json +18 -0
- package/examples/vitepress/sfdx-project.json +12 -0
- package/jest.config.js +6 -1
- package/jest.d.ts +7 -0
- package/package.json +34 -36
- package/src/application/Apexdocs.ts +58 -68
- package/src/application/__tests__/apex-file-reader.spec.ts +104 -0
- package/src/application/apex-file-reader.ts +55 -0
- package/src/application/file-system.ts +69 -0
- package/src/application/file-writer.ts +43 -0
- package/src/application/generators/markdown.ts +45 -0
- package/src/application/generators/openapi.ts +60 -0
- package/src/cli/args.ts +43 -0
- package/src/cli/commands/markdown.ts +53 -0
- package/src/cli/generate.ts +10 -131
- package/src/core/manifest.ts +90 -0
- package/src/core/markdown/__test__/expect-extensions.ts +32 -0
- package/src/core/markdown/__test__/generating-class-docs.spec.ts +733 -0
- package/src/core/markdown/__test__/generating-enum-docs.spec.ts +385 -0
- package/src/core/markdown/__test__/generating-interface-docs.spec.ts +461 -0
- package/src/core/markdown/__test__/generating-reference-guide.spec.ts +180 -0
- package/src/core/markdown/__test__/inheritance-chain.test.ts +54 -0
- package/src/core/markdown/__test__/test-helpers.ts +23 -0
- package/src/core/markdown/adapters/__tests__/documentables.spec.ts +109 -0
- package/src/core/markdown/adapters/__tests__/interface-adapter.spec.ts +148 -0
- package/src/core/markdown/adapters/__tests__/link-generator.spec.ts +130 -0
- package/src/core/markdown/adapters/__tests__/references.spec.ts +136 -0
- package/src/core/markdown/adapters/apex-types.ts +238 -0
- package/src/core/markdown/adapters/documentables.ts +115 -0
- package/src/core/markdown/adapters/fields-and-properties.ts +45 -0
- package/src/core/markdown/adapters/generate-link.ts +82 -0
- package/src/core/markdown/adapters/inline.ts +143 -0
- package/src/core/markdown/adapters/methods-and-constructors.ts +133 -0
- package/src/core/markdown/adapters/reference-guide.ts +37 -0
- package/src/core/markdown/adapters/renderable-bundle.ts +61 -0
- package/src/core/markdown/adapters/renderable-to-page-data.ts +89 -0
- package/src/core/markdown/adapters/type-utils.ts +13 -0
- package/src/core/markdown/adapters/types.d.ts +180 -0
- package/src/core/markdown/generate-docs.ts +212 -0
- package/src/core/markdown/reflection/filter-scope.ts +13 -0
- package/src/core/markdown/reflection/inheritance-chain-expanion.ts +22 -0
- package/src/core/markdown/reflection/inheritance-chain.ts +23 -0
- package/src/core/markdown/reflection/inherited-member-expansion.ts +105 -0
- package/src/core/markdown/reflection/reflect-source.ts +123 -0
- package/src/core/markdown/reflection/sort-members.ts +59 -0
- package/src/core/markdown/templates/class-template.ts +75 -0
- package/src/core/markdown/templates/constructors-partial-template.ts +32 -0
- package/src/core/markdown/templates/documentable-partial-template.ts +26 -0
- package/src/core/markdown/templates/enum-template.ts +12 -0
- package/src/core/markdown/templates/fieldsPartialTemplate.ts +23 -0
- package/src/core/markdown/templates/grouped-members-partial-template.ts +6 -0
- package/src/core/markdown/templates/hookable.ts +7 -0
- package/src/core/markdown/templates/interface-template.ts +16 -0
- package/src/core/markdown/templates/methods-partial-template.ts +43 -0
- package/src/core/markdown/templates/reference-guide.ts +14 -0
- package/src/core/markdown/templates/template.ts +114 -0
- package/src/core/markdown/templates/type-doc-partial.ts +27 -0
- package/src/core/markdown/utils.ts +3 -0
- package/src/{service → core/openapi}/__tests__/manifest-factory.spec.ts +1 -2
- package/src/{transpiler → core}/openapi/__tests__/open-api-docs-processor.spec.ts +1 -1
- package/src/{model → core/openapi}/apex-type-wrappers/__tests__/ClassMirrorWrapper.spec.ts +3 -3
- package/src/core/openapi/file-container.ts +13 -0
- package/src/{service → core/openapi}/manifest-factory.ts +3 -3
- package/src/{transpiler → core}/openapi/open-api-docs-processor.ts +10 -11
- package/src/{model → core}/openapi/open-api-types.ts +2 -2
- package/src/core/openapi/openapi-type-file.ts +12 -0
- package/src/{service → core/openapi}/parser.ts +7 -21
- package/src/{transpiler → core}/openapi/parsers/Builder.ts +3 -3
- package/src/{transpiler → core}/openapi/parsers/MethodParser.ts +6 -6
- package/src/{transpiler → core}/openapi/parsers/ParameterObjectBuilder.ts +2 -2
- package/src/{transpiler → core}/openapi/parsers/ReferenceBuilder.ts +7 -6
- package/src/{transpiler → core}/openapi/parsers/RequestBodyBuilder.ts +2 -2
- package/src/{transpiler → core}/openapi/parsers/ResponsesBuilder.ts +2 -2
- package/src/{transpiler → core}/openapi/parsers/__tests__/MethodParser.spec.ts +1 -1
- package/src/{transpiler → core}/openapi/parsers/__tests__/ParameterObjectBuilder.spec.ts +2 -2
- package/src/{transpiler → core}/openapi/parsers/__tests__/ReferenceBuilder.spec.ts +2 -2
- package/src/{transpiler → core}/openapi/parsers/__tests__/RequestBodyBuilder.spec.ts +2 -2
- package/src/{transpiler → core}/openapi/parsers/__tests__/ResponsesBuilder.spec.ts +1 -1
- package/src/{transpiler → core/openapi}/transpiler.ts +2 -6
- package/src/{model → core/openapi}/types-repository.ts +0 -9
- package/src/core/parse-apex-metadata.ts +30 -0
- package/src/core/settings.ts +56 -0
- package/src/core/shared/types.d.ts +147 -0
- package/src/core/shared/utils.ts +5 -0
- package/src/defaults.ts +9 -0
- package/src/index.ts +36 -1
- package/src/test-helpers/ClassMirrorBuilder.ts +14 -1
- package/src/test-helpers/FieldMirrorBuilder.ts +1 -1
- package/src/test-helpers/InterfaceMirrorBuilder.ts +39 -0
- package/src/test-helpers/MethodMirrorBuilder.ts +46 -6
- package/src/test-helpers/SettingsBuilder.ts +1 -4
- package/src/util/error-logger.ts +4 -4
- package/src/util/fp.ts +3 -0
- package/src/util/logger.ts +12 -25
- package/src/util/string-utils.ts +0 -4
- package/tsconfig.json +8 -3
- package/.eslintrc.js +0 -12
- package/apexdocs.config.ts +0 -13
- package/docs/.nojekyll +0 -0
- package/docs/README.md +0 -1
- package/docs/index.html +0 -22
- package/docs/restapi.json +0 -589
- package/docs/types/Classes/nspc.AnotherInterface.md +0 -22
- package/docs/types/Classes/nspc.ChildClass.md +0 -97
- package/docs/types/Main/nspc.GroupedClass.md +0 -10
- package/docs/types/Main/nspc.SampleClass.md +0 -190
- package/docs/types/Misc-Group/nspc.EscapedAnnotations.md +0 -4
- package/docs/types/Misc-Group/nspc.GrandparentClass.md +0 -13
- package/docs/types/Misc-Group/nspc.InterfaceWithInheritance.md +0 -29
- package/docs/types/Misc-Group/nspc.MemberGrouping.md +0 -13
- package/docs/types/Misc-Group/nspc.ParentClass.md +0 -37
- package/docs/types/Misc-Group/nspc.Reference1.md +0 -18
- package/docs/types/Misc-Group/nspc.Reference2.md +0 -12
- package/docs/types/Misc-Group/nspc.Reference3.md +0 -7
- package/docs/types/Misc-Group/nspc.Reference4.md +0 -7
- package/docs/types/Misc-Group/nspc.Reference5.md +0 -7
- package/docs/types/Misc-Group/nspc.Reference6.md +0 -9
- package/docs/types/Misc-Group/nspc.Reference7.md +0 -7
- package/docs/types/Misc-Group/nspc.SampleClassWithoutModifier.md +0 -11
- package/docs/types/Misc-Group/nspc.SampleRestResource.md +0 -211
- package/docs/types/Misc-Group/nspc.SampleRestResourceWithInnerClass.md +0 -34
- package/docs/types/Misc-Group/nspc.SampleRestResourceWithoutApexDocs.md +0 -14
- package/docs/types/README.md +0 -97
- package/docs/types/Sample-Interfaces/nspc.SampleInterface.md +0 -23
- package/examples/includes/header.md +0 -3
- package/lib/application/Apexdocs.d.ts +0 -13
- package/lib/application/Apexdocs.js +0 -77
- package/lib/application/Apexdocs.js.map +0 -1
- package/lib/cli/generate.d.ts +0 -2
- package/lib/cli/generate.js +0 -131
- package/lib/cli/generate.js.map +0 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -18
- package/lib/index.js.map +0 -1
- package/lib/model/apex-bundle.d.ts +0 -6
- package/lib/model/apex-bundle.js +0 -11
- package/lib/model/apex-bundle.js.map +0 -1
- package/lib/model/apex-type-wrappers/ClassMirrorWrapper.d.ts +0 -7
- package/lib/model/apex-type-wrappers/ClassMirrorWrapper.js +0 -14
- package/lib/model/apex-type-wrappers/ClassMirrorWrapper.js.map +0 -1
- package/lib/model/apex-type-wrappers/MethodMirrorWrapper.d.ts +0 -7
- package/lib/model/apex-type-wrappers/MethodMirrorWrapper.js +0 -12
- package/lib/model/apex-type-wrappers/MethodMirrorWrapper.js.map +0 -1
- package/lib/model/inheritance.d.ts +0 -8
- package/lib/model/inheritance.js +0 -3
- package/lib/model/inheritance.js.map +0 -1
- 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/lib/model/manifest.d.ts +0 -22
- package/lib/model/manifest.js +0 -47
- package/lib/model/manifest.js.map +0 -1
- package/lib/model/markdown-file.d.ts +0 -16
- package/lib/model/markdown-file.js +0 -107
- package/lib/model/markdown-file.js.map +0 -1
- package/lib/model/markdown-generation-util/doc-comment-annotation-util.d.ts +0 -8
- package/lib/model/markdown-generation-util/doc-comment-annotation-util.js +0 -44
- package/lib/model/markdown-generation-util/doc-comment-annotation-util.js.map +0 -1
- package/lib/model/markdown-generation-util/field-declaration-util.d.ts +0 -3
- package/lib/model/markdown-generation-util/field-declaration-util.js +0 -55
- package/lib/model/markdown-generation-util/field-declaration-util.js.map +0 -1
- package/lib/model/markdown-generation-util/index.d.ts +0 -3
- package/lib/model/markdown-generation-util/index.js +0 -20
- package/lib/model/markdown-generation-util/index.js.map +0 -1
- package/lib/model/markdown-generation-util/method-declaration-util.d.ts +0 -4
- package/lib/model/markdown-generation-util/method-declaration-util.js +0 -115
- package/lib/model/markdown-generation-util/method-declaration-util.js.map +0 -1
- package/lib/model/markdown-generation-util/type-declaration-util.d.ts +0 -3
- package/lib/model/markdown-generation-util/type-declaration-util.js +0 -82
- package/lib/model/markdown-generation-util/type-declaration-util.js.map +0 -1
- package/lib/model/markdown-home-file.d.ts +0 -11
- package/lib/model/markdown-home-file.js +0 -54
- package/lib/model/markdown-home-file.js.map +0 -1
- package/lib/model/markdown-type-file.d.ts +0 -26
- package/lib/model/markdown-type-file.js +0 -134
- package/lib/model/markdown-type-file.js.map +0 -1
- package/lib/model/openapi/apex-doc-types.d.ts +0 -19
- package/lib/model/openapi/apex-doc-types.js +0 -5
- package/lib/model/openapi/apex-doc-types.js.map +0 -1
- package/lib/model/openapi/open-api-types.d.ts +0 -93
- package/lib/model/openapi/open-api-types.js +0 -3
- package/lib/model/openapi/open-api-types.js.map +0 -1
- package/lib/model/openapi/open-api.d.ts +0 -16
- package/lib/model/openapi/open-api.js +0 -34
- package/lib/model/openapi/open-api.js.map +0 -1
- package/lib/model/openapi/openapi-type-file.d.ts +0 -7
- package/lib/model/openapi/openapi-type-file.js +0 -17
- package/lib/model/openapi/openapi-type-file.js.map +0 -1
- package/lib/model/outputFile.d.ts +0 -10
- package/lib/model/outputFile.js +0 -29
- package/lib/model/outputFile.js.map +0 -1
- package/lib/model/types-repository.d.ts +0 -16
- package/lib/model/types-repository.js +0 -54
- package/lib/model/types-repository.js.map +0 -1
- package/lib/service/apex-file-reader.d.ts +0 -14
- package/lib/service/apex-file-reader.js +0 -46
- package/lib/service/apex-file-reader.js.map +0 -1
- package/lib/service/file-system.d.ts +0 -14
- package/lib/service/file-system.js +0 -25
- package/lib/service/file-system.js.map +0 -1
- package/lib/service/file-writer.d.ts +0 -6
- package/lib/service/file-writer.js +0 -34
- package/lib/service/file-writer.js.map +0 -1
- package/lib/service/manifest-factory.d.ts +0 -10
- package/lib/service/manifest-factory.js +0 -14
- package/lib/service/manifest-factory.js.map +0 -1
- package/lib/service/metadata-processor.d.ts +0 -3
- package/lib/service/metadata-processor.js +0 -17
- package/lib/service/metadata-processor.js.map +0 -1
- package/lib/service/parser.d.ts +0 -21
- package/lib/service/parser.js +0 -135
- package/lib/service/parser.js.map +0 -1
- package/lib/service/state.d.ts +0 -9
- package/lib/service/state.js +0 -20
- package/lib/service/state.js.map +0 -1
- package/lib/service/walkers/class-walker.d.ts +0 -4
- package/lib/service/walkers/class-walker.js +0 -33
- package/lib/service/walkers/class-walker.js.map +0 -1
- package/lib/service/walkers/enum-walker.d.ts +0 -4
- package/lib/service/walkers/enum-walker.js +0 -11
- package/lib/service/walkers/enum-walker.js.map +0 -1
- package/lib/service/walkers/interface-walker.d.ts +0 -4
- package/lib/service/walkers/interface-walker.js +0 -15
- package/lib/service/walkers/interface-walker.js.map +0 -1
- package/lib/service/walkers/walker-factory.d.ts +0 -5
- package/lib/service/walkers/walker-factory.js +0 -21
- package/lib/service/walkers/walker-factory.js.map +0 -1
- package/lib/service/walkers/walker.d.ts +0 -19
- package/lib/service/walkers/walker.js +0 -17
- package/lib/service/walkers/walker.js.map +0 -1
- package/lib/settings.d.ts +0 -64
- package/lib/settings.js +0 -89
- package/lib/settings.js.map +0 -1
- package/lib/test-helpers/AnnotationBuilder.d.ts +0 -12
- package/lib/test-helpers/AnnotationBuilder.js +0 -31
- package/lib/test-helpers/AnnotationBuilder.js.map +0 -1
- package/lib/test-helpers/ClassMirrorBuilder.d.ts +0 -18
- package/lib/test-helpers/ClassMirrorBuilder.js +0 -54
- package/lib/test-helpers/ClassMirrorBuilder.js.map +0 -1
- package/lib/test-helpers/DocCommentAnnotationBuilder.d.ts +0 -8
- package/lib/test-helpers/DocCommentAnnotationBuilder.js +0 -26
- package/lib/test-helpers/DocCommentAnnotationBuilder.js.map +0 -1
- package/lib/test-helpers/DocCommentBuilder.d.ts +0 -12
- package/lib/test-helpers/DocCommentBuilder.js +0 -38
- package/lib/test-helpers/DocCommentBuilder.js.map +0 -1
- package/lib/test-helpers/FieldMirrorBuilder.d.ts +0 -18
- package/lib/test-helpers/FieldMirrorBuilder.js +0 -54
- package/lib/test-helpers/FieldMirrorBuilder.js.map +0 -1
- package/lib/test-helpers/MethodMirrorBuilder.d.ts +0 -10
- package/lib/test-helpers/MethodMirrorBuilder.js +0 -37
- package/lib/test-helpers/MethodMirrorBuilder.js.map +0 -1
- package/lib/test-helpers/SettingsBuilder.d.ts +0 -8
- package/lib/test-helpers/SettingsBuilder.js +0 -27
- package/lib/test-helpers/SettingsBuilder.js.map +0 -1
- package/lib/transpiler/factory.d.ts +0 -6
- package/lib/transpiler/factory.js +0 -32
- package/lib/transpiler/factory.js.map +0 -1
- package/lib/transpiler/file-container.d.ts +0 -6
- package/lib/transpiler/file-container.js +0 -16
- package/lib/transpiler/file-container.js.map +0 -1
- package/lib/transpiler/generator-choices.d.ts +0 -1
- package/lib/transpiler/generator-choices.js +0 -3
- package/lib/transpiler/generator-choices.js.map +0 -1
- package/lib/transpiler/markdown/class-file-generatorHelper.d.ts +0 -8
- package/lib/transpiler/markdown/class-file-generatorHelper.js +0 -56
- package/lib/transpiler/markdown/class-file-generatorHelper.js.map +0 -1
- package/lib/transpiler/markdown/docsify/docsify-docs-processor.d.ts +0 -6
- package/lib/transpiler/markdown/docsify/docsify-docs-processor.js +0 -13
- package/lib/transpiler/markdown/docsify/docsify-docs-processor.js.map +0 -1
- package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.d.ts +0 -11
- package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js +0 -51
- package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js.map +0 -1
- package/lib/transpiler/markdown/markdown-transpiler-base.d.ts +0 -11
- package/lib/transpiler/markdown/markdown-transpiler-base.js +0 -24
- package/lib/transpiler/markdown/markdown-transpiler-base.js.map +0 -1
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.d.ts +0 -6
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js +0 -14
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js.map +0 -1
- package/lib/transpiler/openapi/open-api-docs-processor.d.ts +0 -13
- package/lib/transpiler/openapi/open-api-docs-processor.js +0 -75
- package/lib/transpiler/openapi/open-api-docs-processor.js.map +0 -1
- package/lib/transpiler/openapi/parsers/Builder.d.ts +0 -16
- package/lib/transpiler/openapi/parsers/Builder.js +0 -30
- package/lib/transpiler/openapi/parsers/Builder.js.map +0 -1
- package/lib/transpiler/openapi/parsers/MethodParser.d.ts +0 -20
- package/lib/transpiler/openapi/parsers/MethodParser.js +0 -167
- package/lib/transpiler/openapi/parsers/MethodParser.js.map +0 -1
- package/lib/transpiler/openapi/parsers/ParameterObjectBuilder.d.ts +0 -7
- package/lib/transpiler/openapi/parsers/ParameterObjectBuilder.js +0 -11
- package/lib/transpiler/openapi/parsers/ParameterObjectBuilder.js.map +0 -1
- package/lib/transpiler/openapi/parsers/ReferenceBuilder.d.ts +0 -39
- package/lib/transpiler/openapi/parsers/ReferenceBuilder.js +0 -226
- package/lib/transpiler/openapi/parsers/ReferenceBuilder.js.map +0 -1
- package/lib/transpiler/openapi/parsers/RequestBodyBuilder.d.ts +0 -10
- package/lib/transpiler/openapi/parsers/RequestBodyBuilder.js +0 -20
- package/lib/transpiler/openapi/parsers/RequestBodyBuilder.js.map +0 -1
- package/lib/transpiler/openapi/parsers/ResponsesBuilder.d.ts +0 -7
- package/lib/transpiler/openapi/parsers/ResponsesBuilder.js +0 -22
- package/lib/transpiler/openapi/parsers/ResponsesBuilder.js.map +0 -1
- package/lib/transpiler/processor-type-transpiler.d.ts +0 -10
- package/lib/transpiler/processor-type-transpiler.js +0 -9
- package/lib/transpiler/processor-type-transpiler.js.map +0 -1
- package/lib/transpiler/transpiler.d.ts +0 -5
- package/lib/transpiler/transpiler.js +0 -27
- package/lib/transpiler/transpiler.js.map +0 -1
- package/lib/util/error-logger.d.ts +0 -8
- package/lib/util/error-logger.js +0 -90
- package/lib/util/error-logger.js.map +0 -1
- package/lib/util/logger.d.ts +0 -21
- package/lib/util/logger.js +0 -58
- package/lib/util/logger.js.map +0 -1
- package/lib/util/string-utils.d.ts +0 -2
- package/lib/util/string-utils.js +0 -15
- package/lib/util/string-utils.js.map +0 -1
- package/src/model/__tests__/manifest-diff.spec.ts +0 -147
- package/src/model/apex-bundle.ts +0 -3
- package/src/model/inheritance.ts +0 -7
- package/src/model/manifest-diff.ts +0 -94
- package/src/model/manifest.ts +0 -74
- package/src/model/markdown-file.ts +0 -121
- package/src/model/markdown-generation-util/doc-comment-annotation-util.ts +0 -50
- package/src/model/markdown-generation-util/field-declaration-util.ts +0 -71
- package/src/model/markdown-generation-util/index.ts +0 -3
- package/src/model/markdown-generation-util/method-declaration-util.ts +0 -166
- package/src/model/markdown-generation-util/type-declaration-util.ts +0 -91
- package/src/model/markdown-home-file.ts +0 -58
- package/src/model/markdown-type-file.ts +0 -165
- package/src/model/openapi/openapi-type-file.ts +0 -14
- package/src/model/outputFile.ts +0 -29
- package/src/service/__tests__/apex-file-reader.spec.ts +0 -92
- package/src/service/apex-file-reader.ts +0 -51
- package/src/service/file-system.ts +0 -33
- package/src/service/file-writer.ts +0 -34
- package/src/service/metadata-processor.ts +0 -16
- package/src/service/state.ts +0 -24
- package/src/service/walkers/class-walker.ts +0 -30
- package/src/service/walkers/enum-walker.ts +0 -7
- package/src/service/walkers/interface-walker.ts +0 -12
- package/src/service/walkers/walker-factory.ts +0 -19
- package/src/service/walkers/walker.ts +0 -42
- package/src/settings.ts +0 -147
- package/src/transpiler/factory.ts +0 -33
- package/src/transpiler/file-container.ts +0 -13
- package/src/transpiler/generator-choices.ts +0 -1
- package/src/transpiler/markdown/class-file-generatorHelper.ts +0 -58
- package/src/transpiler/markdown/docsify/docsify-docs-processor.ts +0 -12
- package/src/transpiler/markdown/jekyll/jekyll-docsProcessor.ts +0 -50
- package/src/transpiler/markdown/markdown-transpiler-base.ts +0 -28
- package/src/transpiler/markdown/plain-markdown/plain-docsProcessor.ts +0 -12
- package/src/transpiler/processor-type-transpiler.ts +0 -18
- /package/src/{model/__tests__ → core/__test__}/manifest.spec.ts +0 -0
- /package/src/{model → core}/openapi/__tests__/open-api.spec.ts +0 -0
- /package/src/{model → core}/openapi/apex-doc-types.ts +0 -0
- /package/src/{model → core/openapi}/apex-type-wrappers/ClassMirrorWrapper.ts +0 -0
- /package/src/{model → core/openapi}/apex-type-wrappers/MethodMirrorWrapper.ts +0 -0
- /package/src/{model → core}/openapi/open-api.ts +0 -0
package/lib/settings.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Settings = void 0;
|
|
4
|
-
class Settings {
|
|
5
|
-
constructor(config) {
|
|
6
|
-
this.config = config;
|
|
7
|
-
}
|
|
8
|
-
static build(config) {
|
|
9
|
-
Settings.instance = new Settings(config);
|
|
10
|
-
}
|
|
11
|
-
static getInstance() {
|
|
12
|
-
if (!Settings.instance) {
|
|
13
|
-
throw new Error('Settings has not been initialized');
|
|
14
|
-
}
|
|
15
|
-
return Settings.instance;
|
|
16
|
-
}
|
|
17
|
-
get sourceDirectory() {
|
|
18
|
-
return this.config.sourceDirectory;
|
|
19
|
-
}
|
|
20
|
-
get recursive() {
|
|
21
|
-
return this.config.recursive;
|
|
22
|
-
}
|
|
23
|
-
get scope() {
|
|
24
|
-
return this.config.scope;
|
|
25
|
-
}
|
|
26
|
-
get outputDir() {
|
|
27
|
-
return this.config.outputDir;
|
|
28
|
-
}
|
|
29
|
-
get targetGenerator() {
|
|
30
|
-
return this.config.targetGenerator;
|
|
31
|
-
}
|
|
32
|
-
get indexOnly() {
|
|
33
|
-
return this.config.indexOnly;
|
|
34
|
-
}
|
|
35
|
-
get sanitizeHtml() {
|
|
36
|
-
return this.config.sanitizeHtml;
|
|
37
|
-
}
|
|
38
|
-
getDefaultGroupName() {
|
|
39
|
-
return this.config.defaultGroupName;
|
|
40
|
-
}
|
|
41
|
-
getOpenApiTitle() {
|
|
42
|
-
var _a;
|
|
43
|
-
return (_a = this.config.openApiTitle) !== null && _a !== void 0 ? _a : this.config.title;
|
|
44
|
-
}
|
|
45
|
-
getTitle() {
|
|
46
|
-
return this.config.title;
|
|
47
|
-
}
|
|
48
|
-
getNamespace() {
|
|
49
|
-
return this.config.namespace;
|
|
50
|
-
}
|
|
51
|
-
getNamespacePrefix() {
|
|
52
|
-
if (!this.config.namespace) {
|
|
53
|
-
return '';
|
|
54
|
-
}
|
|
55
|
-
return `${this.config.namespace}.`;
|
|
56
|
-
}
|
|
57
|
-
openApiFileName() {
|
|
58
|
-
return this.config.openApiFileName;
|
|
59
|
-
}
|
|
60
|
-
includeMetadata() {
|
|
61
|
-
return this.config.includeMetadata;
|
|
62
|
-
}
|
|
63
|
-
sortMembersAlphabetically() {
|
|
64
|
-
var _a;
|
|
65
|
-
return (_a = this.config.sortMembersAlphabetically) !== null && _a !== void 0 ? _a : false;
|
|
66
|
-
}
|
|
67
|
-
getRootDir() {
|
|
68
|
-
return this.config.rootDir;
|
|
69
|
-
}
|
|
70
|
-
onAfterProcess(files) {
|
|
71
|
-
if (this.config.onAfterProcess) {
|
|
72
|
-
this.config.onAfterProcess(files);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
onBeforeFileWrite(file) {
|
|
76
|
-
if (this.config.onBeforeFileWrite) {
|
|
77
|
-
return this.config.onBeforeFileWrite(file);
|
|
78
|
-
}
|
|
79
|
-
return file;
|
|
80
|
-
}
|
|
81
|
-
frontMatterHeader(file) {
|
|
82
|
-
if (this.config.frontMatterHeader) {
|
|
83
|
-
return this.config.frontMatterHeader(file);
|
|
84
|
-
}
|
|
85
|
-
return [];
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
exports.Settings = Settings;
|
|
89
|
-
//# sourceMappingURL=settings.js.map
|
package/lib/settings.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":";;;AA4CA,MAAa,QAAQ;IAGnB,YAA2B,MAAsB;QAAtB,WAAM,GAAN,MAAM,CAAgB;IAAG,CAAC;IAE9C,MAAM,CAAC,KAAK,CAAC,MAAsB;QACxC,QAAQ,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IAEM,MAAM,CAAC,WAAW;QACvB,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACtB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;SACtD;QACD,OAAO,QAAQ,CAAC,QAAQ,CAAC;IAC3B,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;IACrC,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;IACrC,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;IAClC,CAAC;IAEM,mBAAmB;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;IACtC,CAAC;IAEM,eAAe;;QACpB,OAAO,MAAA,IAAI,CAAC,MAAM,CAAC,YAAY,mCAAI,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IACvD,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IAC3B,CAAC;IAEM,YAAY;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IAC/B,CAAC;IAEM,kBAAkB;QACvB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;YAC1B,OAAO,EAAE,CAAC;SACX;QACD,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC;IACrC,CAAC;IAEM,eAAe;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;IACrC,CAAC;IAEM,eAAe;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;IACrC,CAAC;IAEM,yBAAyB;;QAC9B,OAAO,MAAA,IAAI,CAAC,MAAM,CAAC,yBAAyB,mCAAI,KAAK,CAAC;IACxD,CAAC;IAEM,UAAU;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;IAC7B,CAAC;IAEM,cAAc,CAAC,KAAmB;QACvC,IAAI,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE;YAC9B,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;SACnC;IACH,CAAC;IAEM,iBAAiB,CAAC,IAAgB;QACvC,IAAI,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE;YACjC,OAAO,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;SAC5C;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,iBAAiB,CAAC,IAAgB;QACvC,IAAI,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE;YACjC,OAAO,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;SAC5C;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAtGD,4BAsGC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Annotation, AnnotationElementValue } from '@cparra/apex-reflection';
|
|
2
|
-
/**
|
|
3
|
-
* Builder class to create Annotation objects.
|
|
4
|
-
* For testing purposes only.
|
|
5
|
-
*/
|
|
6
|
-
export declare class AnnotationBuilder {
|
|
7
|
-
private name;
|
|
8
|
-
private elementValues;
|
|
9
|
-
withName(name: string): AnnotationBuilder;
|
|
10
|
-
addElementValue(elementValue: AnnotationElementValue): AnnotationBuilder;
|
|
11
|
-
build(): Annotation;
|
|
12
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AnnotationBuilder = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Builder class to create Annotation objects.
|
|
6
|
-
* For testing purposes only.
|
|
7
|
-
*/
|
|
8
|
-
class AnnotationBuilder {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.name = 'restresource';
|
|
11
|
-
this.elementValues = [];
|
|
12
|
-
}
|
|
13
|
-
withName(name) {
|
|
14
|
-
this.name = name;
|
|
15
|
-
return this;
|
|
16
|
-
}
|
|
17
|
-
addElementValue(elementValue) {
|
|
18
|
-
this.elementValues.push(elementValue);
|
|
19
|
-
return this;
|
|
20
|
-
}
|
|
21
|
-
build() {
|
|
22
|
-
return {
|
|
23
|
-
rawDeclaration: '',
|
|
24
|
-
name: this.name,
|
|
25
|
-
type: this.name,
|
|
26
|
-
elementValues: this.elementValues,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.AnnotationBuilder = AnnotationBuilder;
|
|
31
|
-
//# sourceMappingURL=AnnotationBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AnnotationBuilder.js","sourceRoot":"","sources":["../../src/test-helpers/AnnotationBuilder.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAa,iBAAiB;IAA9B;QACU,SAAI,GAAG,cAAc,CAAC;QACtB,kBAAa,GAA6B,EAAE,CAAC;IAoBvD,CAAC;IAlBC,QAAQ,CAAC,IAAY;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,eAAe,CAAC,YAAoC;QAClD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK;QACH,OAAO;YACL,cAAc,EAAE,EAAE;YAClB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,aAAa,EAAE,IAAI,CAAC,aAAa;SAClC,CAAC;IACJ,CAAC;CACF;AAtBD,8CAsBC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Annotation, ClassMirror, DocComment, FieldMirror, MethodMirror } from '@cparra/apex-reflection';
|
|
2
|
-
/**
|
|
3
|
-
* Builder class to create ClassMirror objects.
|
|
4
|
-
* For testing purposes only.
|
|
5
|
-
*/
|
|
6
|
-
export declare class ClassMirrorBuilder {
|
|
7
|
-
private name;
|
|
8
|
-
private annotations;
|
|
9
|
-
private docComment?;
|
|
10
|
-
private methods;
|
|
11
|
-
private fields;
|
|
12
|
-
withName(name: string): ClassMirrorBuilder;
|
|
13
|
-
addAnnotation(annotation: Annotation): ClassMirrorBuilder;
|
|
14
|
-
withDocComment(docComment: DocComment): ClassMirrorBuilder;
|
|
15
|
-
addMethod(method: MethodMirror): ClassMirrorBuilder;
|
|
16
|
-
addFiled(field: FieldMirror): ClassMirrorBuilder;
|
|
17
|
-
build(): ClassMirror;
|
|
18
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ClassMirrorBuilder = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Builder class to create ClassMirror objects.
|
|
6
|
-
* For testing purposes only.
|
|
7
|
-
*/
|
|
8
|
-
class ClassMirrorBuilder {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.name = 'SampleClass';
|
|
11
|
-
this.annotations = [];
|
|
12
|
-
this.methods = [];
|
|
13
|
-
this.fields = [];
|
|
14
|
-
}
|
|
15
|
-
withName(name) {
|
|
16
|
-
this.name = name;
|
|
17
|
-
return this;
|
|
18
|
-
}
|
|
19
|
-
addAnnotation(annotation) {
|
|
20
|
-
this.annotations.push(annotation);
|
|
21
|
-
return this;
|
|
22
|
-
}
|
|
23
|
-
withDocComment(docComment) {
|
|
24
|
-
this.docComment = docComment;
|
|
25
|
-
return this;
|
|
26
|
-
}
|
|
27
|
-
addMethod(method) {
|
|
28
|
-
this.methods.push(method);
|
|
29
|
-
return this;
|
|
30
|
-
}
|
|
31
|
-
addFiled(field) {
|
|
32
|
-
this.fields.push(field);
|
|
33
|
-
return this;
|
|
34
|
-
}
|
|
35
|
-
build() {
|
|
36
|
-
return {
|
|
37
|
-
annotations: this.annotations,
|
|
38
|
-
name: this.name,
|
|
39
|
-
type_name: 'class',
|
|
40
|
-
methods: this.methods,
|
|
41
|
-
implemented_interfaces: [],
|
|
42
|
-
properties: [],
|
|
43
|
-
fields: this.fields,
|
|
44
|
-
constructors: [],
|
|
45
|
-
enums: [],
|
|
46
|
-
interfaces: [],
|
|
47
|
-
classes: [],
|
|
48
|
-
access_modifier: 'public',
|
|
49
|
-
docComment: this.docComment,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.ClassMirrorBuilder = ClassMirrorBuilder;
|
|
54
|
-
//# sourceMappingURL=ClassMirrorBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ClassMirrorBuilder.js","sourceRoot":"","sources":["../../src/test-helpers/ClassMirrorBuilder.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAa,kBAAkB;IAA/B;QACU,SAAI,GAAG,aAAa,CAAC;QACrB,gBAAW,GAAiB,EAAE,CAAC;QAE/B,YAAO,GAAmB,EAAE,CAAC;QAC7B,WAAM,GAAkB,EAAE,CAAC;IA4CrC,CAAC;IA1CC,QAAQ,CAAC,IAAY;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,aAAa,CAAC,UAAsB;QAClC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,cAAc,CAAC,UAAsB;QACnC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,CAAC,MAAoB;QAC5B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ,CAAC,KAAkB;QACzB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK;QACH,OAAO;YACL,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,SAAS,EAAE,OAAO;YAClB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,sBAAsB,EAAE,EAAE;YAC1B,UAAU,EAAE,EAAE;YACd,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,YAAY,EAAE,EAAE;YAChB,KAAK,EAAE,EAAE;YACT,UAAU,EAAE,EAAE;YACd,OAAO,EAAE,EAAE;YACX,eAAe,EAAE,QAAQ;YACzB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC;IACJ,CAAC;CACF;AAjDD,gDAiDC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DocCommentAnnotation } from '@cparra/apex-reflection';
|
|
2
|
-
export declare class DocCommentAnnotationBuilder {
|
|
3
|
-
private name;
|
|
4
|
-
private bodyLines;
|
|
5
|
-
withName(name: string): DocCommentAnnotationBuilder;
|
|
6
|
-
withBodyLines(bodyLines: string[]): DocCommentAnnotationBuilder;
|
|
7
|
-
build(): DocCommentAnnotation;
|
|
8
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DocCommentAnnotationBuilder = void 0;
|
|
4
|
-
class DocCommentAnnotationBuilder {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.name = '';
|
|
7
|
-
this.bodyLines = [];
|
|
8
|
-
}
|
|
9
|
-
withName(name) {
|
|
10
|
-
this.name = name;
|
|
11
|
-
return this;
|
|
12
|
-
}
|
|
13
|
-
withBodyLines(bodyLines) {
|
|
14
|
-
this.bodyLines = bodyLines;
|
|
15
|
-
return this;
|
|
16
|
-
}
|
|
17
|
-
build() {
|
|
18
|
-
return {
|
|
19
|
-
name: this.name,
|
|
20
|
-
body: '',
|
|
21
|
-
bodyLines: this.bodyLines,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.DocCommentAnnotationBuilder = DocCommentAnnotationBuilder;
|
|
26
|
-
//# sourceMappingURL=DocCommentAnnotationBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DocCommentAnnotationBuilder.js","sourceRoot":"","sources":["../../src/test-helpers/DocCommentAnnotationBuilder.ts"],"names":[],"mappings":";;;AAEA,MAAa,2BAA2B;IAAxC;QACU,SAAI,GAAG,EAAE,CAAC;QACV,cAAS,GAAa,EAAE,CAAC;IAmBnC,CAAC;IAjBC,QAAQ,CAAC,IAAY;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,aAAa,CAAC,SAAmB;QAC/B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK;QACH,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,EAAE;YACR,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;IACJ,CAAC;CACF;AArBD,kEAqBC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DocComment, DocCommentAnnotation } from '@cparra/apex-reflection';
|
|
2
|
-
/**
|
|
3
|
-
* Builder class to create DocComment objects.
|
|
4
|
-
* For testing purposes only.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DocCommentBuilder {
|
|
7
|
-
private description?;
|
|
8
|
-
private annotations;
|
|
9
|
-
addAnnotation(annotation: DocCommentAnnotation): DocCommentBuilder;
|
|
10
|
-
withDescription(description: string): DocCommentBuilder;
|
|
11
|
-
build(): DocComment;
|
|
12
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DocCommentBuilder = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Builder class to create DocComment objects.
|
|
6
|
-
* For testing purposes only.
|
|
7
|
-
*/
|
|
8
|
-
class DocCommentBuilder {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.annotations = [];
|
|
11
|
-
}
|
|
12
|
-
addAnnotation(annotation) {
|
|
13
|
-
this.annotations.push(annotation);
|
|
14
|
-
return this;
|
|
15
|
-
}
|
|
16
|
-
withDescription(description) {
|
|
17
|
-
this.description = description;
|
|
18
|
-
return this;
|
|
19
|
-
}
|
|
20
|
-
build() {
|
|
21
|
-
var _a;
|
|
22
|
-
return {
|
|
23
|
-
paramAnnotations: [],
|
|
24
|
-
returnAnnotation: {
|
|
25
|
-
bodyLines: [],
|
|
26
|
-
},
|
|
27
|
-
exampleAnnotation: {
|
|
28
|
-
bodyLines: [],
|
|
29
|
-
},
|
|
30
|
-
throwsAnnotations: [],
|
|
31
|
-
annotations: this.annotations,
|
|
32
|
-
descriptionLines: [],
|
|
33
|
-
description: (_a = this.description) !== null && _a !== void 0 ? _a : 'Sample Description',
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.DocCommentBuilder = DocCommentBuilder;
|
|
38
|
-
//# sourceMappingURL=DocCommentBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DocCommentBuilder.js","sourceRoot":"","sources":["../../src/test-helpers/DocCommentBuilder.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAa,iBAAiB;IAA9B;QAEU,gBAAW,GAA2B,EAAE,CAAC;IA2BnD,CAAC;IAzBC,aAAa,CAAC,UAAgC;QAC5C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,eAAe,CAAC,WAAmB;QACjC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK;;QACH,OAAO;YACL,gBAAgB,EAAE,EAAE;YACpB,gBAAgB,EAAE;gBAChB,SAAS,EAAE,EAAE;aACd;YACD,iBAAiB,EAAE;gBACjB,SAAS,EAAE,EAAE;aACd;YACD,iBAAiB,EAAE,EAAE;YACrB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,gBAAgB,EAAE,EAAE;YACpB,WAAW,EAAE,MAAA,IAAI,CAAC,WAAW,mCAAI,oBAAoB;SACtD,CAAC;IACJ,CAAC;CACF;AA7BD,8CA6BC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DocComment, FieldMirror } from '@cparra/apex-reflection';
|
|
2
|
-
import { ReferencedType } from '@cparra/apex-reflection/index';
|
|
3
|
-
type MemberModifier = 'static' | 'webservice' | 'final' | 'override' | 'testmethod' | 'transient';
|
|
4
|
-
export declare class FieldMirrorBuilder {
|
|
5
|
-
private docComment;
|
|
6
|
-
private accessModifier;
|
|
7
|
-
private name;
|
|
8
|
-
private memberModifiers;
|
|
9
|
-
private type;
|
|
10
|
-
withAccessModifier(accessModifier: string): FieldMirrorBuilder;
|
|
11
|
-
withName(name: string): FieldMirrorBuilder;
|
|
12
|
-
withType(type: string): FieldMirrorBuilder;
|
|
13
|
-
withReferencedType(type: ReferencedType): FieldMirrorBuilder;
|
|
14
|
-
addMemberModifier(memberModifier: MemberModifier): FieldMirrorBuilder;
|
|
15
|
-
withDocComment(docComment: DocComment): FieldMirrorBuilder;
|
|
16
|
-
build(): FieldMirror;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FieldMirrorBuilder = void 0;
|
|
4
|
-
class FieldMirrorBuilder {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.docComment = undefined;
|
|
7
|
-
this.accessModifier = 'public';
|
|
8
|
-
this.name = 'fieldName';
|
|
9
|
-
this.memberModifiers = [];
|
|
10
|
-
this.type = {
|
|
11
|
-
type: 'String',
|
|
12
|
-
rawDeclaration: 'String',
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
withAccessModifier(accessModifier) {
|
|
16
|
-
this.accessModifier = accessModifier;
|
|
17
|
-
return this;
|
|
18
|
-
}
|
|
19
|
-
withName(name) {
|
|
20
|
-
this.name = name;
|
|
21
|
-
return this;
|
|
22
|
-
}
|
|
23
|
-
withType(type) {
|
|
24
|
-
this.type = {
|
|
25
|
-
rawDeclaration: type,
|
|
26
|
-
type: type,
|
|
27
|
-
};
|
|
28
|
-
return this;
|
|
29
|
-
}
|
|
30
|
-
withReferencedType(type) {
|
|
31
|
-
this.type = type;
|
|
32
|
-
return this;
|
|
33
|
-
}
|
|
34
|
-
addMemberModifier(memberModifier) {
|
|
35
|
-
this.memberModifiers.push(memberModifier);
|
|
36
|
-
return this;
|
|
37
|
-
}
|
|
38
|
-
withDocComment(docComment) {
|
|
39
|
-
this.docComment = docComment;
|
|
40
|
-
return this;
|
|
41
|
-
}
|
|
42
|
-
build() {
|
|
43
|
-
return {
|
|
44
|
-
access_modifier: this.accessModifier,
|
|
45
|
-
annotations: [],
|
|
46
|
-
name: this.name,
|
|
47
|
-
memberModifiers: this.memberModifiers,
|
|
48
|
-
typeReference: this.type,
|
|
49
|
-
docComment: this.docComment,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.FieldMirrorBuilder = FieldMirrorBuilder;
|
|
54
|
-
//# sourceMappingURL=FieldMirrorBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FieldMirrorBuilder.js","sourceRoot":"","sources":["../../src/test-helpers/FieldMirrorBuilder.ts"],"names":[],"mappings":";;;AAKA,MAAa,kBAAkB;IAA/B;QACU,eAAU,GAA2B,SAAS,CAAC;QAC/C,mBAAc,GAAG,QAAQ,CAAC;QAC1B,SAAI,GAAG,WAAW,CAAC;QACnB,oBAAe,GAAqB,EAAE,CAAC;QACvC,SAAI,GAAmB;YAC7B,IAAI,EAAE,QAAQ;YACd,cAAc,EAAE,QAAQ;SACzB,CAAC;IA6CJ,CAAC;IA3CC,kBAAkB,CAAC,cAAsB;QACvC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ,CAAC,IAAY;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ,CAAC,IAAY;QACnB,IAAI,CAAC,IAAI,GAAG;YACV,cAAc,EAAE,IAAI;YACpB,IAAI,EAAE,IAAI;SACX,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kBAAkB,CAAC,IAAoB;QACrC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,iBAAiB,CAAC,cAA8B;QAC9C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,cAAc,CAAC,UAAsB;QACnC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK;QACH,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,cAAc;YACpC,WAAW,EAAE,EAAE;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,aAAa,EAAE,IAAI,CAAC,IAAI;YACxB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC;IACJ,CAAC;CACF;AArDD,gDAqDC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Annotation, DocComment, MethodMirror } from '@cparra/apex-reflection';
|
|
2
|
-
export declare class MethodMirrorBuilder {
|
|
3
|
-
private name;
|
|
4
|
-
private annotations;
|
|
5
|
-
private docComment?;
|
|
6
|
-
withName(name: string): MethodMirrorBuilder;
|
|
7
|
-
addAnnotation(annotation: Annotation): MethodMirrorBuilder;
|
|
8
|
-
withDocComment(docComment: DocComment): MethodMirrorBuilder;
|
|
9
|
-
build(): MethodMirror;
|
|
10
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MethodMirrorBuilder = void 0;
|
|
4
|
-
class MethodMirrorBuilder {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.name = 'sampleMethod';
|
|
7
|
-
this.annotations = [];
|
|
8
|
-
}
|
|
9
|
-
withName(name) {
|
|
10
|
-
this.name = name;
|
|
11
|
-
return this;
|
|
12
|
-
}
|
|
13
|
-
addAnnotation(annotation) {
|
|
14
|
-
this.annotations.push(annotation);
|
|
15
|
-
return this;
|
|
16
|
-
}
|
|
17
|
-
withDocComment(docComment) {
|
|
18
|
-
this.docComment = docComment;
|
|
19
|
-
return this;
|
|
20
|
-
}
|
|
21
|
-
build() {
|
|
22
|
-
return {
|
|
23
|
-
access_modifier: 'public',
|
|
24
|
-
annotations: this.annotations,
|
|
25
|
-
name: this.name,
|
|
26
|
-
memberModifiers: [],
|
|
27
|
-
typeReference: {
|
|
28
|
-
type: 'void',
|
|
29
|
-
rawDeclaration: 'void',
|
|
30
|
-
},
|
|
31
|
-
parameters: [],
|
|
32
|
-
docComment: this.docComment,
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
exports.MethodMirrorBuilder = MethodMirrorBuilder;
|
|
37
|
-
//# sourceMappingURL=MethodMirrorBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MethodMirrorBuilder.js","sourceRoot":"","sources":["../../src/test-helpers/MethodMirrorBuilder.ts"],"names":[],"mappings":";;;AAEA,MAAa,mBAAmB;IAAhC;QACU,SAAI,GAAG,cAAc,CAAC;QACtB,gBAAW,GAAiB,EAAE,CAAC;IAgCzC,CAAC;IA7BC,QAAQ,CAAC,IAAY;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,aAAa,CAAC,UAAsB;QAClC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,cAAc,CAAC,UAAsB;QACnC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK;QACH,OAAO;YACL,eAAe,EAAE,QAAQ;YACzB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,eAAe,EAAE,EAAE;YACnB,aAAa,EAAE;gBACb,IAAI,EAAE,MAAM;gBACZ,cAAc,EAAE,MAAM;aACvB;YACD,UAAU,EAAE,EAAE;YACd,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC;IACJ,CAAC;CACF;AAlCD,kDAkCC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SettingsBuilder = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Builder class to create SettingsConfig objects.
|
|
6
|
-
* For testing purposes only.
|
|
7
|
-
*/
|
|
8
|
-
class SettingsBuilder {
|
|
9
|
-
build() {
|
|
10
|
-
return {
|
|
11
|
-
sourceDirectory: './',
|
|
12
|
-
recursive: true,
|
|
13
|
-
scope: [],
|
|
14
|
-
outputDir: './',
|
|
15
|
-
targetGenerator: 'openapi',
|
|
16
|
-
indexOnly: false,
|
|
17
|
-
defaultGroupName: 'Misc',
|
|
18
|
-
sanitizeHtml: true,
|
|
19
|
-
openApiTitle: 'Apex API',
|
|
20
|
-
openApiFileName: 'openapi',
|
|
21
|
-
title: 'Classes',
|
|
22
|
-
includeMetadata: false,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.SettingsBuilder = SettingsBuilder;
|
|
27
|
-
//# sourceMappingURL=SettingsBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsBuilder.js","sourceRoot":"","sources":["../../src/test-helpers/SettingsBuilder.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAa,eAAe;IAC1B,KAAK;QACH,OAAO;YACL,eAAe,EAAE,IAAI;YACrB,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,EAAE;YACT,SAAS,EAAE,IAAI;YACf,eAAe,EAAE,SAAS;YAC1B,SAAS,EAAE,KAAK;YAChB,gBAAgB,EAAE,MAAM;YACxB,YAAY,EAAE,IAAI;YAClB,YAAY,EAAE,UAAU;YACxB,eAAe,EAAE,SAAS;YAC1B,KAAK,EAAE,SAAS;YAChB,eAAe,EAAE,KAAK;SACvB,CAAC;IACJ,CAAC;CACF;AAjBD,0CAiBC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import ProcessorTypeTranspiler from './processor-type-transpiler';
|
|
2
|
-
import { GeneratorChoices } from './generator-choices';
|
|
3
|
-
export declare class TypeTranspilerFactory {
|
|
4
|
-
private static typeTranspilerCache?;
|
|
5
|
-
static get(generator: GeneratorChoices): ProcessorTypeTranspiler;
|
|
6
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypeTranspilerFactory = void 0;
|
|
4
|
-
const jekyll_docsProcessor_1 = require("./markdown/jekyll/jekyll-docsProcessor");
|
|
5
|
-
const docsify_docs_processor_1 = require("./markdown/docsify/docsify-docs-processor");
|
|
6
|
-
const plain_docsProcessor_1 = require("./markdown/plain-markdown/plain-docsProcessor");
|
|
7
|
-
const open_api_docs_processor_1 = require("./openapi/open-api-docs-processor");
|
|
8
|
-
class TypeTranspilerFactory {
|
|
9
|
-
static get(generator) {
|
|
10
|
-
if (this.typeTranspilerCache) {
|
|
11
|
-
return this.typeTranspilerCache;
|
|
12
|
-
}
|
|
13
|
-
switch (generator) {
|
|
14
|
-
case 'jekyll':
|
|
15
|
-
this.typeTranspilerCache = new jekyll_docsProcessor_1.JekyllDocsProcessor();
|
|
16
|
-
return this.typeTranspilerCache;
|
|
17
|
-
case 'docsify':
|
|
18
|
-
this.typeTranspilerCache = new docsify_docs_processor_1.default();
|
|
19
|
-
return this.typeTranspilerCache;
|
|
20
|
-
case 'plain-markdown':
|
|
21
|
-
this.typeTranspilerCache = new plain_docsProcessor_1.PlainMarkdownDocsProcessor();
|
|
22
|
-
return this.typeTranspilerCache;
|
|
23
|
-
case 'openapi':
|
|
24
|
-
this.typeTranspilerCache = new open_api_docs_processor_1.OpenApiDocsProcessor();
|
|
25
|
-
return this.typeTranspilerCache;
|
|
26
|
-
default:
|
|
27
|
-
throw Error('Invalid target generator');
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.TypeTranspilerFactory = TypeTranspilerFactory;
|
|
32
|
-
//# sourceMappingURL=factory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../src/transpiler/factory.ts"],"names":[],"mappings":";;;AAEA,iFAA6E;AAC7E,sFAA6E;AAC7E,uFAA2F;AAC3F,+EAAyE;AAEzE,MAAa,qBAAqB;IAGzB,MAAM,CAAC,GAAG,CAAC,SAA2B;QAC3C,IAAI,IAAI,CAAC,mBAAmB,EAAE;YAC5B,OAAO,IAAI,CAAC,mBAAmB,CAAC;SACjC;QAED,QAAQ,SAAS,EAAE;YACjB,KAAK,QAAQ;gBACX,IAAI,CAAC,mBAAmB,GAAG,IAAI,0CAAmB,EAAE,CAAC;gBACrD,OAAO,IAAI,CAAC,mBAAmB,CAAC;YAClC,KAAK,SAAS;gBACZ,IAAI,CAAC,mBAAmB,GAAG,IAAI,gCAAoB,EAAE,CAAC;gBACtD,OAAO,IAAI,CAAC,mBAAmB,CAAC;YAClC,KAAK,gBAAgB;gBACnB,IAAI,CAAC,mBAAmB,GAAG,IAAI,gDAA0B,EAAE,CAAC;gBAC5D,OAAO,IAAI,CAAC,mBAAmB,CAAC;YAClC,KAAK,SAAS;gBACZ,IAAI,CAAC,mBAAmB,GAAG,IAAI,8CAAoB,EAAE,CAAC;gBACtD,OAAO,IAAI,CAAC,mBAAmB,CAAC;YAClC;gBACE,MAAM,KAAK,CAAC,0BAA0B,CAAC,CAAC;SAC3C;IACH,CAAC;CACF;AAzBD,sDAyBC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FileContainer = void 0;
|
|
4
|
-
class FileContainer {
|
|
5
|
-
constructor() {
|
|
6
|
-
this._files = [];
|
|
7
|
-
}
|
|
8
|
-
files() {
|
|
9
|
-
return this._files;
|
|
10
|
-
}
|
|
11
|
-
pushFile(file) {
|
|
12
|
-
this._files.push(file);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.FileContainer = FileContainer;
|
|
16
|
-
//# sourceMappingURL=file-container.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-container.js","sourceRoot":"","sources":["../../src/transpiler/file-container.ts"],"names":[],"mappings":";;;AAEA,MAAa,aAAa;IAA1B;QACE,WAAM,GAAiB,EAAE,CAAC;IAS5B,CAAC;IAPC,KAAK;QACH,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,QAAQ,CAAC,IAAgB;QACvB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;CACF;AAVD,sCAUC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type GeneratorChoices = 'jekyll' | 'docsify' | 'plain-markdown' | 'openapi';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generator-choices.js","sourceRoot":"","sources":["../../src/transpiler/generator-choices.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Type } from '@cparra/apex-reflection';
|
|
2
|
-
export default class ClassFileGeneratorHelper {
|
|
3
|
-
static getSanitizedGroup(classModel: Type): string;
|
|
4
|
-
static getFileLink(classModel: Type): string;
|
|
5
|
-
static getFileLinkByTypeName(typeName: string): string;
|
|
6
|
-
private static getDirectoryRoot;
|
|
7
|
-
private static getClassGroup;
|
|
8
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const types_repository_1 = require("../../model/types-repository");
|
|
4
|
-
const settings_1 = require("../../settings");
|
|
5
|
-
const state_1 = require("../../service/state");
|
|
6
|
-
const factory_1 = require("../factory");
|
|
7
|
-
class ClassFileGeneratorHelper {
|
|
8
|
-
static getSanitizedGroup(classModel) {
|
|
9
|
-
return this.getClassGroup(classModel).replace(/ /g, '-').replace('.', '');
|
|
10
|
-
}
|
|
11
|
-
static getFileLink(classModel) {
|
|
12
|
-
var _a;
|
|
13
|
-
const documentationRoot = (_a = settings_1.Settings.getInstance().getRootDir()) !== null && _a !== void 0 ? _a : '';
|
|
14
|
-
const directoryRoot = `${documentationRoot}${this.getDirectoryRoot(classModel)}`;
|
|
15
|
-
const fullClassName = `${settings_1.Settings.getInstance().getNamespacePrefix()}${classModel.name}`;
|
|
16
|
-
return `[${fullClassName}](${directoryRoot}${fullClassName}.md)`;
|
|
17
|
-
}
|
|
18
|
-
static getFileLinkByTypeName(typeName) {
|
|
19
|
-
const type = types_repository_1.TypesRepository.getInstance().getFromScopedByName(typeName);
|
|
20
|
-
if (!type) {
|
|
21
|
-
// If the type is not found, we return a Markdown hyperlink with whatever we received.
|
|
22
|
-
return `[${typeName}](${typeName})`;
|
|
23
|
-
}
|
|
24
|
-
return this.getFileLink(type);
|
|
25
|
-
}
|
|
26
|
-
static getDirectoryRoot(classModel) {
|
|
27
|
-
// root-relative links start from the root by using a leading '/'
|
|
28
|
-
const generator = settings_1.Settings.getInstance().targetGenerator;
|
|
29
|
-
if (factory_1.TypeTranspilerFactory.get(generator).getLinkingStrategy() === 'root-relative') {
|
|
30
|
-
return `/${this.getSanitizedGroup(classModel)}/`;
|
|
31
|
-
}
|
|
32
|
-
// path-relative links traverse the directory structure
|
|
33
|
-
const typeBeingProcessed = state_1.default.getInstance().getTypeBeingProcessed();
|
|
34
|
-
if (typeBeingProcessed) {
|
|
35
|
-
if (this.getClassGroup(typeBeingProcessed) === this.getClassGroup(classModel)) {
|
|
36
|
-
// If the types the same groups then we simply link directly to that file
|
|
37
|
-
return './';
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
// If the types have different groups, then we have to go up a directory
|
|
41
|
-
return `../${this.getSanitizedGroup(classModel)}/`;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
// If nothing is being processed, then we assume we are at the root and links should include the groups
|
|
46
|
-
return `./${this.getSanitizedGroup(classModel)}/`;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
static getClassGroup(classModel) {
|
|
50
|
-
var _a, _b;
|
|
51
|
-
const groupAnnotation = (_a = classModel.docComment) === null || _a === void 0 ? void 0 : _a.annotations.find((annotation) => annotation.name.toLowerCase() === 'group');
|
|
52
|
-
return (_b = groupAnnotation === null || groupAnnotation === void 0 ? void 0 : groupAnnotation.body) !== null && _b !== void 0 ? _b : settings_1.Settings.getInstance().getDefaultGroupName();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
exports.default = ClassFileGeneratorHelper;
|
|
56
|
-
//# sourceMappingURL=class-file-generatorHelper.js.map
|