@cparra/apexdocs 2.25.0-alpha.0 → 2.25.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/README.md +37 -0
- package/__mocks__/chalk.js +12 -0
- package/__mocks__/log-update.js +6 -0
- package/dist/cli/generate.js +2963 -0
- package/dist/defaults-DUwru49Q.js +12 -0
- package/dist/defaults-SH0Rsi5E.js +11 -0
- package/dist/defaults-jLXD2y8-.js +13 -0
- package/dist/index.d.ts +101 -0
- package/dist/index.js +36 -0
- package/eslint.config.mjs +10 -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 +112 -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/MultiInheritanceClass.cls +1 -0
- package/examples/{plain-markdown → markdown}/force-app/classes/SampleClass.cls +37 -0
- package/examples/markdown/force-app/classes/SampleException.cls +17 -0
- package/examples/markdown/force-app/classes/Url.cls +194 -0
- package/examples/{plain-markdown → markdown}/package.json +4 -8
- 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 +29 -30
- package/src/application/Apexdocs.ts +17 -70
- package/src/application/__tests__/apex-file-reader.spec.ts +104 -0
- package/src/application/apex-file-reader.ts +42 -0
- package/src/application/file-writer.ts +21 -0
- package/src/application/generators/markdown.ts +58 -0
- package/src/application/generators/openapi.ts +56 -0
- package/src/cli/args.ts +43 -0
- package/src/cli/commands/markdown.ts +52 -0
- package/src/cli/generate.ts +10 -134
- 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 +735 -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/{adapters → core/markdown/adapters}/__tests__/references.spec.ts +23 -2
- package/src/core/markdown/adapters/apex-types.ts +238 -0
- package/src/core/markdown/adapters/documentables.ts +116 -0
- package/src/core/markdown/adapters/fields-and-properties.ts +45 -0
- package/src/{adapters/references.ts → core/markdown/adapters/inline.ts} +43 -13
- package/src/core/markdown/adapters/methods-and-constructors.ts +133 -0
- package/src/core/markdown/adapters/reference-guide.ts +35 -0
- package/src/core/markdown/adapters/renderable-bundle.ts +78 -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 +216 -0
- package/src/core/markdown/reflection/error-handling.ts +37 -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 +45 -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/{transpiler/markdown/plain-markdown → core/markdown/templates}/interface-template.ts +4 -4
- 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/{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 +9 -10
- package/src/core/openapi/openapi-type-file.ts +12 -0
- package/src/{service → core/openapi}/parser.ts +9 -9
- package/src/{transpiler → core}/openapi/parsers/Builder.ts +2 -2
- package/src/{transpiler → core}/openapi/parsers/MethodParser.ts +5 -5
- package/src/{transpiler → core}/openapi/parsers/ParameterObjectBuilder.ts +2 -2
- package/src/{transpiler → core}/openapi/parsers/ReferenceBuilder.ts +6 -5
- 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 +14 -0
- package/src/core/settings.ts +56 -0
- package/src/core/shared/types.d.ts +131 -0
- package/src/core/shared/utils.ts +5 -0
- package/src/defaults.ts +9 -0
- package/src/index.ts +41 -1
- package/src/test-helpers/ClassMirrorBuilder.ts +14 -1
- package/src/test-helpers/InterfaceMirrorBuilder.ts +0 -5
- package/src/test-helpers/SettingsBuilder.ts +1 -4
- package/src/util/fp.ts +3 -0
- package/src/util/logger.ts +3 -3
- package/src/util/string-utils.ts +0 -4
- package/tsconfig.json +7 -3
- package/.eslintrc.js +0 -12
- package/apexdocs.config.ts +0 -13
- package/docs/.nojekyll +0 -0
- package/docs/__old/README.md +0 -1
- package/docs/__old/index.html +0 -22
- package/docs/__old/restapi.json +0 -589
- package/docs/__old/types/Classes/nspc.AnotherInterface.md +0 -22
- package/docs/__old/types/Classes/nspc.ChildClass.md +0 -97
- package/docs/__old/types/Main/nspc.GroupedClass.md +0 -10
- package/docs/__old/types/Main/nspc.SampleClass.md +0 -189
- package/docs/__old/types/Misc-Group/nspc.EscapedAnnotations.md +0 -4
- package/docs/__old/types/Misc-Group/nspc.GrandparentClass.md +0 -13
- package/docs/__old/types/Misc-Group/nspc.InterfaceWithInheritance.md +0 -29
- package/docs/__old/types/Misc-Group/nspc.MemberGrouping.md +0 -13
- package/docs/__old/types/Misc-Group/nspc.ParentClass.md +0 -37
- package/docs/__old/types/Misc-Group/nspc.Reference1.md +0 -18
- package/docs/__old/types/Misc-Group/nspc.Reference2.md +0 -12
- package/docs/__old/types/Misc-Group/nspc.Reference3.md +0 -7
- package/docs/__old/types/Misc-Group/nspc.Reference4.md +0 -7
- package/docs/__old/types/Misc-Group/nspc.Reference5.md +0 -7
- package/docs/__old/types/Misc-Group/nspc.Reference6.md +0 -9
- package/docs/__old/types/Misc-Group/nspc.Reference7.md +0 -7
- package/docs/__old/types/Misc-Group/nspc.SampleClassWithoutModifier.md +0 -11
- package/docs/__old/types/Misc-Group/nspc.SampleRestResource.md +0 -104
- package/docs/__old/types/Misc-Group/nspc.SampleRestResourceWithInnerClass.md +0 -33
- package/docs/__old/types/Misc-Group/nspc.SampleRestResourceWithoutApexDocs.md +0 -14
- package/docs/__old/types/README.md +0 -97
- package/docs/__old/types/Sample-Interfaces/nspc.SampleInterface.md +0 -23
- package/examples/includes/header.md +0 -3
- package/examples/plain-markdown/README.md +0 -301
- package/examples/plain-markdown/force-app/classes/SampleException.cls +0 -1
- package/examples/plain-markdown/template.md +0 -3
- package/lib/adapters/apex-types.d.ts +0 -5
- package/lib/adapters/apex-types.js +0 -34
- package/lib/adapters/apex-types.js.map +0 -1
- package/lib/adapters/documentables.d.ts +0 -6
- package/lib/adapters/documentables.js +0 -41
- package/lib/adapters/documentables.js.map +0 -1
- package/lib/adapters/fields-and-properties.d.ts +0 -3
- package/lib/adapters/fields-and-properties.js +0 -10
- package/lib/adapters/fields-and-properties.js.map +0 -1
- package/lib/adapters/methods-and-constructors.d.ts +0 -4
- package/lib/adapters/methods-and-constructors.js +0 -49
- package/lib/adapters/methods-and-constructors.js.map +0 -1
- package/lib/adapters/references.d.ts +0 -5
- package/lib/adapters/references.js +0 -82
- package/lib/adapters/references.js.map +0 -1
- package/lib/adapters/type-utils.d.ts +0 -2
- package/lib/adapters/type-utils.js +0 -8
- package/lib/adapters/type-utils.js.map +0 -1
- package/lib/application/Apexdocs.d.ts +0 -13
- package/lib/application/Apexdocs.js +0 -80
- package/lib/application/Apexdocs.js.map +0 -1
- package/lib/cli/generate.d.ts +0 -2
- package/lib/cli/generate.js +0 -157
- 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.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 -110
- 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 -47
- 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 -57
- 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 -137
- 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 -49
- 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 -48
- 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 -57
- 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 -17
- 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 -138
- 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 -70
- package/lib/settings.js +0 -100
- package/lib/settings.js.map +0 -1
- package/lib/templating/compile.d.ts +0 -7
- package/lib/templating/compile.js +0 -98
- package/lib/templating/compile.js.map +0 -1
- package/lib/templating/helpers.d.ts +0 -2
- package/lib/templating/helpers.js +0 -18
- package/lib/templating/helpers.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/InterfaceMirrorBuilder.d.ts +0 -16
- package/lib/test-helpers/InterfaceMirrorBuilder.js +0 -43
- package/lib/test-helpers/InterfaceMirrorBuilder.js.map +0 -1
- package/lib/test-helpers/MethodMirrorBuilder.d.ts +0 -29
- package/lib/test-helpers/MethodMirrorBuilder.js +0 -72
- 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 -35
- 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 -11
- package/lib/transpiler/markdown/class-file-generatorHelper.js +0 -75
- 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 -27
- package/lib/transpiler/markdown/markdown-transpiler-base.js.map +0 -1
- package/lib/transpiler/markdown/plain-markdown/class-template.d.ts +0 -1
- package/lib/transpiler/markdown/plain-markdown/class-template.js +0 -36
- package/lib/transpiler/markdown/plain-markdown/class-template.js.map +0 -1
- package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.d.ts +0 -1
- package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.js +0 -39
- package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.js.map +0 -1
- package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.d.ts +0 -1
- package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.js +0 -25
- package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.js.map +0 -1
- package/lib/transpiler/markdown/plain-markdown/enum-template.d.ts +0 -1
- package/lib/transpiler/markdown/plain-markdown/enum-template.js +0 -15
- package/lib/transpiler/markdown/plain-markdown/enum-template.js.map +0 -1
- package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.d.ts +0 -1
- package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js +0 -24
- package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js.map +0 -1
- package/lib/transpiler/markdown/plain-markdown/interface-template.d.ts +0 -1
- package/lib/transpiler/markdown/plain-markdown/interface-template.js +0 -20
- package/lib/transpiler/markdown/plain-markdown/interface-template.js.map +0 -1
- package/lib/transpiler/markdown/plain-markdown/methods-partial-template.d.ts +0 -1
- package/lib/transpiler/markdown/plain-markdown/methods-partial-template.js +0 -49
- package/lib/transpiler/markdown/plain-markdown/methods-partial-template.js.map +0 -1
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.d.ts +0 -13
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js +0 -122
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js.map +0 -1
- package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.d.ts +0 -1
- package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.js +0 -31
- package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.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 -78
- 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 -190
- 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 -249
- 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 -30
- 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 -61
- 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/adapters/__tests__/interface-adapter.spec.ts +0 -76
- package/src/adapters/apex-types.ts +0 -67
- package/src/adapters/documentables.ts +0 -58
- package/src/adapters/fields-and-properties.ts +0 -14
- package/src/adapters/methods-and-constructors.ts +0 -78
- package/src/adapters/type-utils.ts +0 -5
- package/src/adapters/types.d.ts +0 -8
- package/src/model/apex-bundle.ts +0 -3
- package/src/model/inheritance.ts +0 -7
- 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-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 -162
- package/src/templating/__tests__/compile.spec.ts +0 -741
- package/src/templating/compile.ts +0 -187
- package/src/templating/helpers.ts +0 -14
- package/src/templating/types.d.ts +0 -104
- 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 -78
- 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/class-template.ts +0 -32
- package/src/transpiler/markdown/plain-markdown/constructors-partial-template.ts +0 -35
- package/src/transpiler/markdown/plain-markdown/documentable-partial-template.ts +0 -21
- package/src/transpiler/markdown/plain-markdown/enum-template.ts +0 -11
- package/src/transpiler/markdown/plain-markdown/fieldsPartialTemplate.ts +0 -20
- package/src/transpiler/markdown/plain-markdown/methods-partial-template.ts +0 -45
- package/src/transpiler/markdown/plain-markdown/plain-docsProcessor.ts +0 -134
- package/src/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.ts +0 -27
- package/src/transpiler/processor-type-transpiler.ts +0 -18
- /package/examples/{plain-markdown → markdown}/.forceignore +0 -0
- /package/examples/{plain-markdown → markdown}/config/project-scratch-def.json +0 -0
- /package/examples/{plain-markdown → markdown}/force-app/classes/BaseClass.cls +0 -0
- /package/examples/{plain-markdown → markdown}/force-app/classes/ParentInterface.cls +0 -0
- /package/examples/{plain-markdown → markdown}/force-app/classes/ReferencedEnum.cls +0 -0
- /package/examples/{plain-markdown → markdown}/force-app/classes/SampleEnum.cls +0 -0
- /package/examples/{plain-markdown → markdown}/force-app/classes/SampleInterface.cls +0 -0
- /package/examples/{plain-markdown → markdown}/package-lock.json +0 -0
- /package/examples/{plain-markdown → markdown}/sfdx-project.json +0 -0
- /package/src/{service → application}/file-system.ts +0 -0
- /package/src/{model/__tests__ → core/__test__}/manifest.spec.ts +0 -0
- /package/src/{service → core/openapi}/__tests__/manifest-factory.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-types.ts +0 -0
- /package/src/{model → core}/openapi/open-api.ts +0 -0
|
@@ -1,301 +0,0 @@
|
|
|
1
|
-
# Template file
|
|
2
|
-
|
|
3
|
-
# BaseClass Class
|
|
4
|
-
`abstract`
|
|
5
|
-
|
|
6
|
-
## Namespace
|
|
7
|
-
ns
|
|
8
|
-
|
|
9
|
-
## Fields
|
|
10
|
-
### `sampleEnumFromBase`
|
|
11
|
-
|
|
12
|
-
#### Type
|
|
13
|
-
[ns.SampleEnum](../Sample-Enums/ns.SampleEnum.md)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
# ParentInterface Interface
|
|
19
|
-
|
|
20
|
-
## Namespace
|
|
21
|
-
ns
|
|
22
|
-
|
|
23
|
-
## Methods
|
|
24
|
-
### `sampleParentMethod()`
|
|
25
|
-
|
|
26
|
-
### Signature
|
|
27
|
-
```apex
|
|
28
|
-
public void sampleParentMethod()
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Returns
|
|
32
|
-
**void**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
# ReferencedEnum Enum
|
|
38
|
-
|
|
39
|
-
## Namespace
|
|
40
|
-
ns
|
|
41
|
-
|
|
42
|
-
## Enum Values
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
# SampleClass Class
|
|
48
|
-
`virtual`
|
|
49
|
-
|
|
50
|
-
aliquip ex sunt officia ullamco anim deserunt magna aliquip nisi eiusmod in sit officia veniam ex
|
|
51
|
-
|
|
52
|
-
deserunt ea officia exercitation laboris enim in duis quis enim eiusmod eu amet cupidatat.
|
|
53
|
-
|
|
54
|
-
**Group** SampleGroup
|
|
55
|
-
|
|
56
|
-
## Namespace
|
|
57
|
-
ns
|
|
58
|
-
|
|
59
|
-
## Example
|
|
60
|
-
```apex
|
|
61
|
-
SampleClass sample = new SampleClass();
|
|
62
|
-
sample.doSomething();
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
**Extends**
|
|
66
|
-
[ns.BaseClass](../Miscellaneous/ns.BaseClass.md)
|
|
67
|
-
|
|
68
|
-
**Implements**
|
|
69
|
-
[ns.SampleInterface](../Miscellaneous/ns.SampleInterface.md),
|
|
70
|
-
[ns.ParentInterface](../Miscellaneous/ns.ParentInterface.md)
|
|
71
|
-
|
|
72
|
-
## Fields
|
|
73
|
-
### `name`
|
|
74
|
-
|
|
75
|
-
This is a sample field.
|
|
76
|
-
|
|
77
|
-
#### Type
|
|
78
|
-
String
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
### `sampleEnumFromBase`
|
|
83
|
-
|
|
84
|
-
*Inherited*
|
|
85
|
-
|
|
86
|
-
#### Type
|
|
87
|
-
[ns.SampleEnum](../Sample-Enums/ns.SampleEnum.md)
|
|
88
|
-
|
|
89
|
-
## Constructors
|
|
90
|
-
### `SampleClass()`
|
|
91
|
-
|
|
92
|
-
This is a sample constructor.
|
|
93
|
-
|
|
94
|
-
### Signature
|
|
95
|
-
```apex
|
|
96
|
-
public SampleClass()
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
### `SampleClass(name)`
|
|
101
|
-
|
|
102
|
-
### Signature
|
|
103
|
-
```apex
|
|
104
|
-
public SampleClass(String name)
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### Parameters
|
|
108
|
-
| Name | Type | Description |
|
|
109
|
-
|------|------|-------------|
|
|
110
|
-
| name | String | |
|
|
111
|
-
|
|
112
|
-
## Methods
|
|
113
|
-
### `sayHello()`
|
|
114
|
-
|
|
115
|
-
`DEPRECATED`
|
|
116
|
-
|
|
117
|
-
This is a sample method.
|
|
118
|
-
|
|
119
|
-
### Signature
|
|
120
|
-
```apex
|
|
121
|
-
public virtual String sayHello()
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### Returns
|
|
125
|
-
**String**
|
|
126
|
-
|
|
127
|
-
A string value.
|
|
128
|
-
|
|
129
|
-
### Example
|
|
130
|
-
```apex
|
|
131
|
-
SampleClass sample = new SampleClass();
|
|
132
|
-
sample.doSomething();
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
# SampleEnum Enum
|
|
139
|
-
|
|
140
|
-
`NAMESPACEACCESSIBLE`
|
|
141
|
-
|
|
142
|
-
This is a sample enum. This references [ns.ReferencedEnum](../Miscellaneous/ns.ReferencedEnum.md) .
|
|
143
|
-
|
|
144
|
-
This description has several lines
|
|
145
|
-
|
|
146
|
-
**Some Custom**
|
|
147
|
-
|
|
148
|
-
**Group** Sample Enums
|
|
149
|
-
|
|
150
|
-
**Author** John Doe
|
|
151
|
-
|
|
152
|
-
**Date** 2022-01-01
|
|
153
|
-
|
|
154
|
-
**See** [ns.ReferencedEnum](../Miscellaneous/ns.ReferencedEnum.md)
|
|
155
|
-
|
|
156
|
-
## Namespace
|
|
157
|
-
ns
|
|
158
|
-
|
|
159
|
-
```mermaid
|
|
160
|
-
graph TD
|
|
161
|
-
A[SampleEnum] -->|references| B[ReferencedEnum]
|
|
162
|
-
B -->|referenced by| A
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
## Enum Values
|
|
166
|
-
### VALUE1
|
|
167
|
-
This is value 1
|
|
168
|
-
### VALUE2
|
|
169
|
-
This is value 2
|
|
170
|
-
### VALUE3
|
|
171
|
-
This is value 3
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
---
|
|
175
|
-
|
|
176
|
-
# SampleException Class
|
|
177
|
-
|
|
178
|
-
## Namespace
|
|
179
|
-
ns
|
|
180
|
-
|
|
181
|
-
**Extends**
|
|
182
|
-
Exception
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
---
|
|
186
|
-
|
|
187
|
-
# SampleInterface Interface
|
|
188
|
-
|
|
189
|
-
`NAMESPACEACCESSIBLE`
|
|
190
|
-
|
|
191
|
-
This is a sample interface
|
|
192
|
-
|
|
193
|
-
**Author** John Doe
|
|
194
|
-
|
|
195
|
-
**Date** 2020-01-01
|
|
196
|
-
|
|
197
|
-
**See** [ns.SampleEnum](../Sample-Enums/ns.SampleEnum.md)
|
|
198
|
-
|
|
199
|
-
**See** [ns.ReferencedEnum](./ns.ReferencedEnum.md)
|
|
200
|
-
|
|
201
|
-
## Namespace
|
|
202
|
-
ns
|
|
203
|
-
|
|
204
|
-
```mermaid
|
|
205
|
-
graph TD
|
|
206
|
-
A[SampleInterface] -->|extends| B[ParentInterface]
|
|
207
|
-
B -->|extends| C[GrandParentInterface]
|
|
208
|
-
C -->|extends| D[GreatGrandParentInterface]
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
## Example
|
|
212
|
-
```apex
|
|
213
|
-
SampleInterface sampleInterface = new SampleInterface();
|
|
214
|
-
sampleInterface.sampleMethod();
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
**Extends**
|
|
218
|
-
[ns.ParentInterface](./ns.ParentInterface.md)
|
|
219
|
-
|
|
220
|
-
## Methods
|
|
221
|
-
### `sampleMethod()`
|
|
222
|
-
|
|
223
|
-
`NAMESPACEACCESSIBLE`
|
|
224
|
-
|
|
225
|
-
This is a sample method
|
|
226
|
-
|
|
227
|
-
**Custom Tag**
|
|
228
|
-
|
|
229
|
-
**Another Custom Tag**
|
|
230
|
-
|
|
231
|
-
### Signature
|
|
232
|
-
```apex
|
|
233
|
-
public String sampleMethod()
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
### Returns
|
|
237
|
-
**String**
|
|
238
|
-
|
|
239
|
-
Some return value
|
|
240
|
-
|
|
241
|
-
### Throws
|
|
242
|
-
[ns.SampleException](./ns.SampleException.md): This is a sample exception
|
|
243
|
-
|
|
244
|
-
AnotherSampleException: This is another sample exception
|
|
245
|
-
|
|
246
|
-
```mermaid
|
|
247
|
-
graph TD
|
|
248
|
-
A[SampleInterface] -->|extends| B[ParentInterface]
|
|
249
|
-
B -->|extends| C[GrandParentInterface]
|
|
250
|
-
C -->|extends| D[GreatGrandParentInterface]
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
### Example
|
|
254
|
-
```apex
|
|
255
|
-
SampleInterface sampleInterface = new SampleInterface();
|
|
256
|
-
sampleInterface.sampleMethod();
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
---
|
|
260
|
-
|
|
261
|
-
### `sampleMethodWithParams(param1, param2, theEnum)`
|
|
262
|
-
|
|
263
|
-
`NAMESPACEACCESSIBLE`
|
|
264
|
-
`DEPRECATED`
|
|
265
|
-
|
|
266
|
-
This is a sample method with parameters
|
|
267
|
-
|
|
268
|
-
Sometimes it won't be possible to find a NonExistent link.
|
|
269
|
-
|
|
270
|
-
### Signature
|
|
271
|
-
```apex
|
|
272
|
-
public SampleEnum sampleMethodWithParams(String param1, Integer param2, SampleEnum theEnum)
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
### Parameters
|
|
276
|
-
| Name | Type | Description |
|
|
277
|
-
|------|------|-------------|
|
|
278
|
-
| param1 | String | This is the first parameter |
|
|
279
|
-
| param2 | Integer | This is the second parameter |
|
|
280
|
-
| theEnum | [ns.SampleEnum](../Sample-Enums/ns.SampleEnum.md) | This is an enum parameter |
|
|
281
|
-
|
|
282
|
-
### Returns
|
|
283
|
-
**[ns.SampleEnum](../Sample-Enums/ns.SampleEnum.md)**
|
|
284
|
-
|
|
285
|
-
Some return value
|
|
286
|
-
|
|
287
|
-
---
|
|
288
|
-
|
|
289
|
-
### `sampleParentMethod()`
|
|
290
|
-
|
|
291
|
-
*Inherited*
|
|
292
|
-
|
|
293
|
-
### Signature
|
|
294
|
-
```apex
|
|
295
|
-
public void sampleParentMethod()
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
### Returns
|
|
299
|
-
**void**
|
|
300
|
-
|
|
301
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
public class SampleException extends Exception {}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ClassMirror, EnumMirror, InterfaceMirror } from '@cparra/apex-reflection';
|
|
2
|
-
import { ClassSource, EnumSource, InterfaceSource } from '../templating/types';
|
|
3
|
-
export declare function enumTypeToEnumSource(enumType: EnumMirror): EnumSource;
|
|
4
|
-
export declare function interfaceTypeToInterfaceSource(interfaceType: InterfaceMirror): InterfaceSource;
|
|
5
|
-
export declare function classTypeToClassSource(classType: ClassMirror): ClassSource;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.classTypeToClassSource = exports.interfaceTypeToInterfaceSource = exports.enumTypeToEnumSource = void 0;
|
|
4
|
-
const documentables_1 = require("./documentables");
|
|
5
|
-
const references_1 = require("./references");
|
|
6
|
-
const methods_and_constructors_1 = require("./methods-and-constructors");
|
|
7
|
-
const fields_and_properties_1 = require("./fields-and-properties");
|
|
8
|
-
function baseTypeAdapter(type) {
|
|
9
|
-
function extractAnnotationBody(type, annotationName) {
|
|
10
|
-
var _a, _b;
|
|
11
|
-
return (_b = (_a = type.docComment) === null || _a === void 0 ? void 0 : _a.annotations.find((currentAnnotation) => currentAnnotation.name.toLowerCase() === annotationName)) === null || _b === void 0 ? void 0 : _b.body;
|
|
12
|
-
}
|
|
13
|
-
function extractSeeAnnotations(type) {
|
|
14
|
-
var _a, _b;
|
|
15
|
-
return ((_b = (_a = type.docComment) === null || _a === void 0 ? void 0 : _a.annotations.filter((currentAnnotation) => currentAnnotation.name.toLowerCase() === 'see').map((currentAnnotation) => currentAnnotation.body)) !== null && _b !== void 0 ? _b : []);
|
|
16
|
-
}
|
|
17
|
-
return Object.assign(Object.assign({}, (0, documentables_1.adaptDocumentable)(type)), { accessModifier: type.access_modifier, name: type.name, group: extractAnnotationBody(type, 'group'), author: extractAnnotationBody(type, 'author'), date: extractAnnotationBody(type, 'date'), sees: extractSeeAnnotations(type).map(references_1.linkFromTypeNameGenerator) });
|
|
18
|
-
}
|
|
19
|
-
function enumTypeToEnumSource(enumType) {
|
|
20
|
-
return Object.assign(Object.assign({ __type: 'enum' }, baseTypeAdapter(enumType)), { values: enumType.values.map((value) => {
|
|
21
|
-
var _a;
|
|
22
|
-
return (Object.assign(Object.assign({}, (0, documentables_1.adaptDescribable)((_a = value.docComment) === null || _a === void 0 ? void 0 : _a.descriptionLines)), { value: value.name }));
|
|
23
|
-
}) });
|
|
24
|
-
}
|
|
25
|
-
exports.enumTypeToEnumSource = enumTypeToEnumSource;
|
|
26
|
-
function interfaceTypeToInterfaceSource(interfaceType) {
|
|
27
|
-
return Object.assign(Object.assign({ __type: 'interface' }, baseTypeAdapter(interfaceType)), { extends: interfaceType.extended_interfaces.map(references_1.linkFromTypeNameGenerator), methods: interfaceType.methods.map(methods_and_constructors_1.adaptMethod) });
|
|
28
|
-
}
|
|
29
|
-
exports.interfaceTypeToInterfaceSource = interfaceTypeToInterfaceSource;
|
|
30
|
-
function classTypeToClassSource(classType) {
|
|
31
|
-
return Object.assign(Object.assign({ __type: 'class' }, baseTypeAdapter(classType)), { classModifier: classType.classModifier, sharingModifier: classType.sharingModifier, implements: classType.implemented_interfaces.map(references_1.linkFromTypeNameGenerator), extends: classType.extended_class ? (0, references_1.linkFromTypeNameGenerator)(classType.extended_class) : undefined, methods: classType.methods.map(methods_and_constructors_1.adaptMethod), constructors: classType.constructors.map((constructor) => (0, methods_and_constructors_1.adaptConstructor)(classType.name, constructor)), fields: classType.fields.map((field) => (0, fields_and_properties_1.adaptField)(field)) });
|
|
32
|
-
}
|
|
33
|
-
exports.classTypeToClassSource = classTypeToClassSource;
|
|
34
|
-
//# sourceMappingURL=apex-types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apex-types.js","sourceRoot":"","sources":["../../src/adapters/apex-types.ts"],"names":[],"mappings":";;;AAEA,mDAAsE;AACtE,6CAAyD;AAEzD,yEAA2E;AAC3E,mEAAqD;AAErD,SAAS,eAAe,CAAC,IAAgD;IACvE,SAAS,qBAAqB,CAAC,IAAU,EAAE,cAAsB;;QAC/D,OAAO,MAAA,MAAA,IAAI,CAAC,UAAU,0CAAE,WAAW,CAAC,IAAI,CACtC,CAAC,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,cAAc,CAC/E,0CAAE,IAAI,CAAC;IACV,CAAC;IAED,SAAS,qBAAqB,CAAC,IAAU;;QACvC,OAAO,CACL,MAAA,MAAA,IAAI,CAAC,UAAU,0CAAE,WAAW,CACzB,MAAM,CAAC,CAAC,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,KAAK,EAC5E,GAAG,CAAC,CAAC,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,mCAAI,EAAE,CAC5D,CAAC;IACJ,CAAC;IAED,uCACK,IAAA,iCAAiB,EAAC,IAAI,CAAC,KAC1B,cAAc,EAAE,IAAI,CAAC,eAAe,EACpC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,qBAAqB,CAA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AE,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,sCAAW,CAAC,EAC3C,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,IAAA,2CAAgB,EAAC,SAAS,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,EACxG,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,kCAAU,EAAC,KAAmC,CAAC,CAAC,IACxF;AACJ,CAAC;AAZD,wDAYC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DocumentableSource, RenderableContent } from '../templating/types';
|
|
2
|
-
import { Describable, Documentable } from './types';
|
|
3
|
-
export declare function adaptDescribable(describable: Describable): {
|
|
4
|
-
description?: RenderableContent[];
|
|
5
|
-
};
|
|
6
|
-
export declare function adaptDocumentable(documentable: Documentable): DocumentableSource;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.adaptDocumentable = exports.adaptDescribable = void 0;
|
|
4
|
-
const references_1 = require("./references");
|
|
5
|
-
const type_utils_1 = require("./type-utils");
|
|
6
|
-
function adaptDescribable(describable) {
|
|
7
|
-
function describableToRenderableContent(describable) {
|
|
8
|
-
if (!describable) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
return (describable
|
|
12
|
-
.map((line) => [
|
|
13
|
-
...(0, references_1.replaceInlineReferences)(line),
|
|
14
|
-
{
|
|
15
|
-
type: 'empty-line',
|
|
16
|
-
},
|
|
17
|
-
])
|
|
18
|
-
.flatMap((line) => line)
|
|
19
|
-
// If the last element is an empty line, remove it
|
|
20
|
-
.filter((line, index, lines) => !((0, type_utils_1.isEmptyLine)(line) && index === lines.length - 1)));
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
description: describableToRenderableContent(describable),
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
exports.adaptDescribable = adaptDescribable;
|
|
27
|
-
function adaptDocumentable(documentable) {
|
|
28
|
-
var _a, _b, _c;
|
|
29
|
-
function extractCustomTags(type) {
|
|
30
|
-
var _a, _b;
|
|
31
|
-
const baseTags = ['description', 'group', 'author', 'date', 'see', 'example', 'mermaid', 'throws', 'exception'];
|
|
32
|
-
return ((_b = (_a = type.docComment) === null || _a === void 0 ? void 0 : _a.annotations.filter((currentAnnotation) => !baseTags.includes(currentAnnotation.name.toLowerCase())).map((currentAnnotation) => (Object.assign(Object.assign({}, adaptDescribable(currentAnnotation.bodyLines)), { name: currentAnnotation.name })))) !== null && _b !== void 0 ? _b : []);
|
|
33
|
-
}
|
|
34
|
-
function extractAnnotationBodyLines(type, annotationName) {
|
|
35
|
-
var _a, _b;
|
|
36
|
-
return (_b = (_a = type.docComment) === null || _a === void 0 ? void 0 : _a.annotations.find((currentAnnotation) => currentAnnotation.name.toLowerCase() === annotationName)) === null || _b === void 0 ? void 0 : _b.bodyLines;
|
|
37
|
-
}
|
|
38
|
-
return Object.assign(Object.assign({}, adaptDescribable((_a = documentable.docComment) === null || _a === void 0 ? void 0 : _a.descriptionLines)), { annotations: documentable.annotations.map((annotation) => annotation.type.toUpperCase()), customTags: extractCustomTags(documentable), mermaid: extractAnnotationBodyLines(documentable, 'mermaid'), example: (_c = (_b = documentable.docComment) === null || _b === void 0 ? void 0 : _b.exampleAnnotation) === null || _c === void 0 ? void 0 : _c.bodyLines });
|
|
39
|
-
}
|
|
40
|
-
exports.adaptDocumentable = adaptDocumentable;
|
|
41
|
-
//# sourceMappingURL=documentables.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"documentables.js","sourceRoot":"","sources":["../../src/adapters/documentables.ts"],"names":[],"mappings":";;;AAEA,6CAAuD;AACvD,6CAA2C;AAE3C,SAAgB,gBAAgB,CAAC,WAAwB;IACvD,SAAS,8BAA8B,CAAC,WAAwB;QAC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AA,MAAA,IAAI,CAAC,UAAU,0CAAE,WAAW,CAAC,IAAI,CACtC,CAAC,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,cAAc,CAC/E,0CAAE,SAAS,CAAC;IACf,CAAC;IAED,uCACK,gBAAgB,CAAC,MAAA,YAAY,CAAC,UAAU,0CAAE,gBAAgB,CAAC,KAC9D,WAAW,EAAE,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,EACxF,UAAU,EAAE,iBAAiB,CAAC,YAAY,CAAC,EAC3C,OAAO,EAAE,0BAA0B,CAAC,YAAY,EAAE,SAAS,CAAC,EAC5D,OAAO,EAAE,MAAA,MAAA,YAAY,CAAC,UAAU,0CAAE,iBAAiB,0CAAE,SAAS,IAC9D;AACJ,CAAC;AA3BD,8CA2BC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.adaptField = void 0;
|
|
4
|
-
const documentables_1 = require("./documentables");
|
|
5
|
-
const references_1 = require("./references");
|
|
6
|
-
function adaptField(field) {
|
|
7
|
-
return Object.assign(Object.assign({}, (0, documentables_1.adaptDocumentable)(field)), { name: field.name, type: (0, references_1.linkFromTypeNameGenerator)(field.typeReference.rawDeclaration), inherited: field.inherited, accessModifier: field.access_modifier });
|
|
8
|
-
}
|
|
9
|
-
exports.adaptField = adaptField;
|
|
10
|
-
//# sourceMappingURL=fields-and-properties.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fields-and-properties.js","sourceRoot":"","sources":["../../src/adapters/fields-and-properties.ts"],"names":[],"mappings":";;;AAEA,mDAAoD;AACpD,6CAAyD;AAEzD,SAAgB,UAAU,CAAC,KAAiC;IAC1D,uCACK,IAAA,iCAAiB,EAAC,KAAK,CAAC,KAC3B,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,IAAI,EAAE,IAAA,sCAAyB,EAAC,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,EACnE,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,cAAc,EAAE,KAAK,CAAC,eAAe,IACrC;AACJ,CAAC;AARD,gCAQC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ConstructorMirror, MethodMirror } from '@cparra/apex-reflection';
|
|
2
|
-
import { ConstructorSource, MethodSource } from '../templating/types';
|
|
3
|
-
export declare function adaptMethod(method: MethodMirror): MethodSource;
|
|
4
|
-
export declare function adaptConstructor(typeName: string, constructor: ConstructorMirror): ConstructorSource;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.adaptConstructor = exports.adaptMethod = void 0;
|
|
4
|
-
const documentables_1 = require("./documentables");
|
|
5
|
-
const references_1 = require("./references");
|
|
6
|
-
function adaptMethod(method) {
|
|
7
|
-
var _a, _b, _c;
|
|
8
|
-
function buildTitle(method) {
|
|
9
|
-
const { name, parameters } = method;
|
|
10
|
-
const parametersString = parameters.map((param) => param.name).join(', ');
|
|
11
|
-
return `${name}(${parametersString})`;
|
|
12
|
-
}
|
|
13
|
-
function buildSignature(method) {
|
|
14
|
-
const { access_modifier, typeReference, name, memberModifiers } = method;
|
|
15
|
-
const parameters = method.parameters
|
|
16
|
-
.map((param) => `${param.typeReference.rawDeclaration} ${param.name}`)
|
|
17
|
-
.join(', ');
|
|
18
|
-
const members = memberModifiers.length > 0 ? `${memberModifiers.join(' ')} ` : '';
|
|
19
|
-
return `${access_modifier} ${members}${typeReference.rawDeclaration} ${name}(${parameters})`;
|
|
20
|
-
}
|
|
21
|
-
return Object.assign(Object.assign({}, (0, documentables_1.adaptDocumentable)(method)), { title: buildTitle(method), signature: buildSignature(method), returnType: Object.assign(Object.assign({}, (0, documentables_1.adaptDescribable)((_b = (_a = method.docComment) === null || _a === void 0 ? void 0 : _a.returnAnnotation) === null || _b === void 0 ? void 0 : _b.bodyLines)), { type: (0, references_1.linkFromTypeNameGenerator)(method.typeReference.rawDeclaration) }), throws: (_c = method.docComment) === null || _c === void 0 ? void 0 : _c.throwsAnnotations.map((thrown) => mapThrows(thrown)), parameters: method.parameters.map((param) => mapParameters(method, param)), inherited: method.inherited });
|
|
22
|
-
}
|
|
23
|
-
exports.adaptMethod = adaptMethod;
|
|
24
|
-
function adaptConstructor(typeName, constructor) {
|
|
25
|
-
var _a;
|
|
26
|
-
function buildTitle(name, constructor) {
|
|
27
|
-
const { parameters } = constructor;
|
|
28
|
-
const parametersString = parameters.map((param) => param.name).join(', ');
|
|
29
|
-
return `${name}(${parametersString})`;
|
|
30
|
-
}
|
|
31
|
-
function buildSignature(name, constructor) {
|
|
32
|
-
const { access_modifier } = constructor;
|
|
33
|
-
const parameters = constructor.parameters
|
|
34
|
-
.map((param) => `${param.typeReference.rawDeclaration} ${param.name}`)
|
|
35
|
-
.join(', ');
|
|
36
|
-
return `${access_modifier} ${name}(${parameters})`;
|
|
37
|
-
}
|
|
38
|
-
return Object.assign(Object.assign({}, (0, documentables_1.adaptDocumentable)(constructor)), { title: buildTitle(typeName, constructor), signature: buildSignature(typeName, constructor), parameters: constructor.parameters.map((param) => mapParameters(constructor, param)), throws: (_a = constructor.docComment) === null || _a === void 0 ? void 0 : _a.throwsAnnotations.map((thrown) => mapThrows(thrown)) });
|
|
39
|
-
}
|
|
40
|
-
exports.adaptConstructor = adaptConstructor;
|
|
41
|
-
function mapParameters(documentable, param) {
|
|
42
|
-
var _a;
|
|
43
|
-
const paramAnnotation = (_a = documentable.docComment) === null || _a === void 0 ? void 0 : _a.paramAnnotations.find((pa) => pa.paramName.toLowerCase() === param.name.toLowerCase());
|
|
44
|
-
return Object.assign(Object.assign({}, (0, documentables_1.adaptDescribable)(paramAnnotation === null || paramAnnotation === void 0 ? void 0 : paramAnnotation.bodyLines)), { name: param.name, type: (0, references_1.linkFromTypeNameGenerator)(param.typeReference.rawDeclaration) });
|
|
45
|
-
}
|
|
46
|
-
function mapThrows(thrown) {
|
|
47
|
-
return Object.assign(Object.assign({}, (0, documentables_1.adaptDescribable)(thrown.bodyLines)), { type: (0, references_1.linkFromTypeNameGenerator)(thrown.exceptionName) });
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=methods-and-constructors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"methods-and-constructors.js","sourceRoot":"","sources":["../../src/adapters/methods-and-constructors.ts"],"names":[],"mappings":";;;AAGA,mDAAsE;AACtE,6CAAyD;AAGzD,SAAgB,WAAW,CAAC,MAAoB;;IAC9C,SAAS,UAAU,CAAC,MAAmC;QACrD,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QACpC,MAAM,gBAAgB,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1E,OAAO,GAAG,IAAI,IAAI,gBAAgB,GAAG,CAAC;IACxC,CAAC;IAED,SAAS,cAAc,CAAC,MAAmC;QACzD,MAAM,EAAE,eAAe,EAAE,aAAa,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;QACzE,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU;aACjC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;aACrE,IAAI,CAAC,IAAI,CAAC,CAAC;QACd,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAClF,O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AE,IAAA,sCAAyB,EAAC,MAAM,CAAC,aAAa,CAAC,IACrD;AACJ,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { RenderableContent, StringOrLink } from '../templating/types';
|
|
2
|
-
export type GetRenderableContentByTypeName = (typeName: string) => StringOrLink;
|
|
3
|
-
export declare const linkFromTypeNameGenerator: GetRenderableContentByTypeName;
|
|
4
|
-
export declare function replaceInlineReferences(text: string, linkReplacer?: GetRenderableContentByTypeName, emailReplacer?: GetRenderableContentByTypeName): RenderableContent[];
|
|
5
|
-
export declare function replaceInlineEmails(renderableContents: RenderableContent[], getLinkByTypeName: GetRenderableContentByTypeName): RenderableContent[];
|
|
@@ -1,82 +0,0 @@
|
|
|
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.replaceInlineEmails = exports.replaceInlineReferences = exports.linkFromTypeNameGenerator = void 0;
|
|
7
|
-
const class_file_generatorHelper_1 = __importDefault(require("../transpiler/markdown/class-file-generatorHelper"));
|
|
8
|
-
exports.linkFromTypeNameGenerator = class_file_generatorHelper_1.default.getRenderableLinkByTypeName;
|
|
9
|
-
function defaultGetEmailByReference(email) {
|
|
10
|
-
return {
|
|
11
|
-
title: email,
|
|
12
|
-
url: `mailto:${email}`,
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
function replaceInlineReferences(text, linkReplacer = exports.linkFromTypeNameGenerator, emailReplacer = defaultGetEmailByReference) {
|
|
16
|
-
return replaceInlineEmails(replaceInlineLinks([text], linkReplacer), emailReplacer);
|
|
17
|
-
}
|
|
18
|
-
exports.replaceInlineReferences = replaceInlineReferences;
|
|
19
|
-
function replaceInlineLinks(renderableContents, getLinkByTypeName) {
|
|
20
|
-
return renderableContents.flatMap((renderableContent) => inlineLinkContent(renderableContent, getLinkByTypeName));
|
|
21
|
-
}
|
|
22
|
-
function inlineLinkContent(renderableContent, getLinkByTypeName) {
|
|
23
|
-
if (typeof renderableContent !== 'string') {
|
|
24
|
-
return [renderableContent];
|
|
25
|
-
}
|
|
26
|
-
const text = renderableContent;
|
|
27
|
-
// Matches either `<<ClassName>>` or `{@link ClassName}`
|
|
28
|
-
const linkFormatRegEx = '{@link (.*?)}|<<([^>]+)>>';
|
|
29
|
-
const matches = match(linkFormatRegEx, text);
|
|
30
|
-
return createRenderableContents(matches, text, getLinkByTypeName);
|
|
31
|
-
}
|
|
32
|
-
function replaceInlineEmails(renderableContents, getLinkByTypeName) {
|
|
33
|
-
return renderableContents.flatMap((renderableContent) => inlineEmailContent(renderableContent, getLinkByTypeName));
|
|
34
|
-
}
|
|
35
|
-
exports.replaceInlineEmails = replaceInlineEmails;
|
|
36
|
-
function inlineEmailContent(renderableContent, getLinkByTypeName) {
|
|
37
|
-
if (typeof renderableContent !== 'string') {
|
|
38
|
-
return [renderableContent];
|
|
39
|
-
}
|
|
40
|
-
const text = renderableContent;
|
|
41
|
-
// Parsing references using the format '{@email email}'
|
|
42
|
-
const linkFormatRegEx = '{@email (.*?)}';
|
|
43
|
-
const matches = match(linkFormatRegEx, text);
|
|
44
|
-
return createRenderableContents(matches, text, getLinkByTypeName);
|
|
45
|
-
}
|
|
46
|
-
function match(regex, text) {
|
|
47
|
-
const expression = new RegExp(regex, 'gi');
|
|
48
|
-
let match;
|
|
49
|
-
const matches = [];
|
|
50
|
-
do {
|
|
51
|
-
match = expression.exec(text);
|
|
52
|
-
if (match) {
|
|
53
|
-
matches.push(match);
|
|
54
|
-
}
|
|
55
|
-
} while (match);
|
|
56
|
-
return matches;
|
|
57
|
-
}
|
|
58
|
-
function createRenderableContents(matches, text, linker) {
|
|
59
|
-
if (matches.length === 0) {
|
|
60
|
-
return [text];
|
|
61
|
-
}
|
|
62
|
-
const result = [];
|
|
63
|
-
let lastIndex = 0;
|
|
64
|
-
for (const match of matches) {
|
|
65
|
-
const index = match.index;
|
|
66
|
-
const length = match[0].length;
|
|
67
|
-
// loop through the matches (skip the first one, which is the full match)
|
|
68
|
-
// until we find the first capturing group that has a value
|
|
69
|
-
const capturedGroup = match.slice(1).find((group) => group);
|
|
70
|
-
if (!capturedGroup) {
|
|
71
|
-
continue;
|
|
72
|
-
}
|
|
73
|
-
result.push(text.slice(lastIndex, index));
|
|
74
|
-
result.push(linker(capturedGroup));
|
|
75
|
-
lastIndex = index + length;
|
|
76
|
-
}
|
|
77
|
-
if (lastIndex < text.length) {
|
|
78
|
-
result.push(text.slice(lastIndex));
|
|
79
|
-
}
|
|
80
|
-
return result;
|
|
81
|
-
}
|
|
82
|
-
//# sourceMappingURL=references.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"references.js","sourceRoot":"","sources":["../../src/adapters/references.ts"],"names":[],"mappings":";;;;;;AAAA,mHAAyF;AAK5E,QAAA,yBAAyB,GACpC,oCAAwB,CAAC,2BAA2B,CAAC;AAEvD,SAAS,0BAA0B,CAAC,KAAa;IAC/C,OAAO;QACL,KAAK,EAAE,KAAK;QACZ,GAAG,EAAE,UAAU,KAAK,EAAE;KACvB,CAAC;AACJ,CAAC;AAED,SAAgB,uBAAuB,CACrC,IAAY,EACZ,eAA+C,iCAAyB,EACxE,gBAAgD,0BAA0B;IAE1E,OAAO,mBAAmB,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,EAAE,aAAa,CAAC,CAAC;AACtF,CAAC;AAND,0DAMC;AAED,SAAS,kBAAkB,CACzB,kBAAuC,EACvC,iBAAiD;IAEjD,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAC,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC,CAAC;AACpH,CAAC;AAED,SAAS,iBAAiB,CACxB,iBAAoC,EACpC,iBAAiD;IAEjD,IAAI,OAAO,iBAAiB,K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AAE;IAEhB,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,wBAAwB,CAAC,OAA0B,EAAE,IAAY,EAAE,MAAsC;IAChH,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;QACxB,OAAO,CAAC,IAAI,CAAC,CAAC;KACf;IAED,MAAM,MAAM,GAAwB,EAAE,CAAC;IACvC,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE;QAC3B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAC1B,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAE/B,yEAAyE;QACzE,2DAA2D;QAC3D,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;QAC5D,IAAI,CAAC,aAAa,EAAE;YAClB,SAAS;SACV;QACD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;QAC1C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;QAEnC,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;KAC5B;IAED,IAAI,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE;QAC3B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;KACpC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isEmptyLine = void 0;
|
|
4
|
-
function isEmptyLine(content) {
|
|
5
|
-
return Object.keys(content).includes('type') && content.type === 'empty-line';
|
|
6
|
-
}
|
|
7
|
-
exports.isEmptyLine = isEmptyLine;
|
|
8
|
-
//# sourceMappingURL=type-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type-utils.js","sourceRoot":"","sources":["../../src/adapters/type-utils.ts"],"names":[],"mappings":";;;AAEA,SAAgB,WAAW,CAAC,OAA0B;IACpD,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAK,OAA4B,CAAC,IAAI,KAAK,YAAY,CAAC;AACtG,CAAC;AAFD,kCAEC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ReflectionResult } from '@cparra/apex-reflection';
|
|
2
|
-
import ApexBundle from '../model/apex-bundle';
|
|
3
|
-
/**
|
|
4
|
-
* Application entry-point to generate documentation out of Apex source files.
|
|
5
|
-
*/
|
|
6
|
-
export declare class Apexdocs {
|
|
7
|
-
/**
|
|
8
|
-
* Generates documentation out of Apex source files.
|
|
9
|
-
*/
|
|
10
|
-
static generate(): void;
|
|
11
|
-
private static filterByScopes;
|
|
12
|
-
static _reflectionWithLogger: (apexBundle: ApexBundle) => ReflectionResult;
|
|
13
|
-
}
|