@cparra/apexdocs 2.25.0-alpha.1 → 2.25.0-alpha.3
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/{lib → dist}/__spec__/core/expect-extensions.js +3 -2
- package/dist/__spec__/core/expect-extensions.js.map +1 -0
- package/{lib → dist}/__spec__/core/generating-class-docs.spec.js +54 -37
- package/dist/__spec__/core/generating-class-docs.spec.js.map +1 -0
- package/{lib → dist}/__spec__/core/generating-enum-docs.spec.js +25 -22
- package/dist/__spec__/core/generating-enum-docs.spec.js.map +1 -0
- package/{lib → dist}/__spec__/core/generating-interface-docs.spec.js +33 -30
- package/dist/__spec__/core/generating-interface-docs.spec.js.map +1 -0
- package/{lib → dist}/__spec__/core/generating-reference-guide.spec.js +8 -7
- package/dist/__spec__/core/generating-reference-guide.spec.js.map +1 -0
- package/dist/__spec__/core/test-helpers.d.ts +2 -0
- package/dist/__spec__/core/test-helpers.js +12 -0
- package/dist/__spec__/core/test-helpers.js.map +1 -0
- package/{lib → dist}/application/Apexdocs.d.ts +4 -2
- package/{lib → dist}/application/Apexdocs.js +49 -16
- package/dist/application/Apexdocs.js.map +1 -0
- package/dist/application/generators/generate-markdown-files.d.ts +3 -0
- package/dist/application/generators/generate-markdown-files.js +64 -0
- package/dist/application/generators/generate-markdown-files.js.map +1 -0
- package/dist/cli/args.d.ts +39 -0
- package/{lib/cli/generate.js → dist/cli/args.js} +37 -40
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/generate.js +291 -0
- package/dist/cli/generate.js.map +1 -0
- package/dist/core/__test__/inheritance-chain.test.d.ts +1 -0
- package/dist/core/__test__/inheritance-chain.test.js +42 -0
- package/dist/core/__test__/inheritance-chain.test.js.map +1 -0
- package/dist/core/adapters/apex-types.d.ts +6 -0
- package/{lib → dist/core}/adapters/apex-types.js +18 -21
- package/dist/core/adapters/apex-types.js.map +1 -0
- package/{lib → dist/core}/adapters/documentables.d.ts +1 -1
- package/dist/core/adapters/documentables.js +154 -0
- package/dist/core/adapters/documentables.js.map +1 -0
- package/{lib → dist/core}/adapters/fields-and-properties.d.ts +1 -2
- package/{lib → dist/core}/adapters/fields-and-properties.js +11 -6
- package/dist/core/adapters/fields-and-properties.js.map +1 -0
- package/{lib → dist/core}/adapters/methods-and-constructors.d.ts +1 -1
- package/{lib → dist/core}/adapters/methods-and-constructors.js +24 -16
- package/dist/core/adapters/methods-and-constructors.js.map +1 -0
- package/{lib → dist/core}/adapters/references.d.ts +2 -3
- package/{lib → dist/core}/adapters/references.js +5 -9
- package/dist/core/adapters/references.js.map +1 -0
- package/dist/core/adapters/type-utils.d.ts +3 -0
- package/dist/core/adapters/type-utils.js +12 -0
- package/dist/core/adapters/type-utils.js.map +1 -0
- package/dist/core/apex-bundle.js.map +1 -0
- package/{lib → dist}/core/generate-docs.d.ts +8 -3
- package/{lib → dist}/core/generate-docs.js +79 -24
- package/dist/core/generate-docs.js.map +1 -0
- package/dist/core/inheritance-chain.d.ts +2 -0
- package/{lib/index.js → dist/core/inheritance-chain.js} +11 -4
- package/dist/core/inheritance-chain.js.map +1 -0
- package/dist/core/manifest.js.map +1 -0
- package/{lib → dist}/core/template.js +12 -7
- package/{lib → dist}/core/template.js.map +1 -1
- package/{lib → dist}/core/templates/reference-guide.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/{lib → dist}/model/markdown-file.d.ts +1 -1
- package/{lib → dist}/model/markdown-file.js +1 -1
- package/dist/model/markdown-file.js.map +1 -0
- package/{lib → dist}/model/markdown-generation-util/doc-comment-annotation-util.js +3 -2
- package/dist/model/markdown-generation-util/doc-comment-annotation-util.js.map +1 -0
- package/{lib → dist}/model/markdown-generation-util/field-declaration-util.d.ts +1 -1
- package/{lib → dist}/model/markdown-generation-util/field-declaration-util.js +2 -1
- package/dist/model/markdown-generation-util/field-declaration-util.js.map +1 -0
- package/{lib → dist}/model/markdown-generation-util/method-declaration-util.d.ts +1 -1
- package/{lib → dist}/model/markdown-generation-util/method-declaration-util.js +2 -1
- package/dist/model/markdown-generation-util/method-declaration-util.js.map +1 -0
- package/{lib → dist}/model/markdown-generation-util/type-declaration-util.js +2 -1
- package/dist/model/markdown-generation-util/type-declaration-util.js.map +1 -0
- package/{lib → dist}/model/markdown-type-file.d.ts +1 -1
- package/dist/model/markdown-type-file.js.map +1 -0
- package/{lib → dist}/service/apex-file-reader.d.ts +1 -1
- package/{lib → dist}/service/apex-file-reader.js +1 -1
- package/{lib → dist}/service/apex-file-reader.js.map +1 -1
- package/{lib → dist}/service/manifest-factory.d.ts +2 -2
- package/{lib → dist}/service/manifest-factory.js +3 -2
- package/dist/service/manifest-factory.js.map +1 -0
- package/{lib → dist}/service/parser.d.ts +1 -1
- package/{lib → dist}/settings.d.ts +3 -0
- package/{lib → dist}/settings.js +3 -0
- package/{lib → dist}/settings.js.map +1 -1
- package/{lib → dist}/test-helpers/ClassMirrorBuilder.d.ts +4 -0
- package/{lib → dist}/test-helpers/ClassMirrorBuilder.js +11 -1
- package/dist/test-helpers/ClassMirrorBuilder.js.map +1 -0
- package/{lib → dist}/test-helpers/SettingsBuilder.js +1 -0
- package/{lib → dist}/test-helpers/SettingsBuilder.js.map +1 -1
- package/{lib → dist}/transpiler/factory.js +2 -4
- package/dist/transpiler/factory.js.map +1 -0
- package/{lib → dist}/transpiler/markdown/class-file-generatorHelper.d.ts +0 -2
- package/{lib → dist}/transpiler/markdown/class-file-generatorHelper.js +1 -15
- package/dist/transpiler/markdown/class-file-generatorHelper.js.map +1 -0
- package/{lib → dist}/transpiler/markdown/plain-markdown/class-template.js +3 -3
- package/{lib → dist}/transpiler/markdown/plain-markdown/constructors-partial-template.js +1 -1
- package/{lib → dist}/transpiler/markdown/plain-markdown/documentable-partial-template.js +6 -4
- package/{lib → dist}/transpiler/markdown/plain-markdown/documentable-partial-template.js.map +1 -1
- package/{lib → dist}/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js +1 -1
- package/{lib → dist}/transpiler/markdown/plain-markdown/methods-partial-template.js +2 -2
- package/{lib → dist}/util/logger.js +1 -1
- package/{lib → dist}/util/logger.js.map +1 -1
- package/{lib → dist}/util/string-utils.js +2 -2
- package/{lib → dist}/util/string-utils.js.map +1 -1
- package/examples/plain-markdown/docs/Miscellaneous/ns.MultiInheritanceClass.md +73 -0
- package/examples/plain-markdown/docs/Miscellaneous/ns.SampleException.md +19 -1
- package/examples/plain-markdown/docs/Miscellaneous/ns.SampleInterface.md +6 -2
- package/examples/plain-markdown/docs/Sample-Enums/ns.SampleEnum.md +3 -1
- package/examples/plain-markdown/docs/SampleGroup/ns.SampleClass.md +2 -2
- package/examples/plain-markdown/docs/index.md +12 -13
- package/examples/plain-markdown/force-app/classes/MultiInheritanceClass.cls +1 -0
- package/examples/plain-markdown/force-app/classes/SampleException.cls +16 -0
- package/jest.config.js +1 -1
- package/package.json +13 -15
- package/src/__spec__/core/generating-class-docs.spec.ts +57 -37
- package/src/__spec__/core/generating-enum-docs.spec.ts +25 -22
- package/src/__spec__/core/generating-interface-docs.spec.ts +33 -30
- package/src/__spec__/core/generating-reference-guide.spec.ts +8 -7
- package/src/__spec__/core/test-helpers.ts +9 -0
- package/src/application/Apexdocs.ts +56 -19
- package/src/application/generators/generate-markdown-files.ts +53 -0
- package/src/cli/args.ts +136 -0
- package/src/cli/generate.ts +11 -135
- package/src/core/__test__/inheritance-chain.test.ts +54 -0
- package/src/{adapters → core/adapters}/__tests__/interface-adapter.spec.ts +13 -11
- package/src/{adapters → core/adapters}/__tests__/references.spec.ts +11 -1
- package/src/{adapters → core/adapters}/apex-types.ts +54 -44
- package/src/core/adapters/documentables.ts +195 -0
- package/src/{adapters → core/adapters}/fields-and-properties.ts +13 -11
- package/src/{adapters → core/adapters}/methods-and-constructors.ts +31 -20
- package/src/{adapters → core/adapters}/references.ts +3 -6
- package/src/core/adapters/type-utils.ts +9 -0
- package/src/core/{renderable → adapters}/types.d.ts +36 -5
- package/src/core/generate-docs.ts +106 -31
- package/src/core/inheritance-chain.ts +23 -0
- package/src/core/template.ts +12 -9
- package/src/core/templates/reference-guide.ts +1 -1
- package/src/model/__tests__/manifest.spec.ts +1 -1
- package/src/model/markdown-file.ts +1 -1
- package/src/model/markdown-generation-util/field-declaration-util.ts +1 -1
- package/src/model/markdown-generation-util/method-declaration-util.ts +1 -1
- package/src/model/markdown-type-file.ts +5 -1
- package/src/service/__tests__/apex-file-reader.spec.ts +1 -0
- package/src/service/apex-file-reader.ts +1 -1
- package/src/service/manifest-factory.ts +2 -2
- package/src/service/parser.ts +1 -1
- package/src/settings.ts +6 -0
- package/src/test-helpers/ClassMirrorBuilder.ts +14 -1
- package/src/test-helpers/SettingsBuilder.ts +1 -0
- package/src/transpiler/factory.ts +2 -4
- package/src/transpiler/markdown/class-file-generatorHelper.ts +1 -18
- package/src/transpiler/markdown/plain-markdown/class-template.ts +3 -3
- package/src/transpiler/markdown/plain-markdown/constructors-partial-template.ts +1 -1
- package/src/transpiler/markdown/plain-markdown/documentable-partial-template.ts +6 -4
- package/src/transpiler/markdown/plain-markdown/fieldsPartialTemplate.ts +1 -1
- package/src/transpiler/markdown/plain-markdown/methods-partial-template.ts +2 -2
- package/src/util/logger.ts +1 -1
- package/tsconfig.json +1 -1
- 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/lib/__spec__/core/expect-extensions.js.map +0 -1
- package/lib/__spec__/core/generating-class-docs.spec.js.map +0 -1
- package/lib/__spec__/core/generating-enum-docs.spec.js.map +0 -1
- package/lib/__spec__/core/generating-interface-docs.spec.js.map +0 -1
- package/lib/__spec__/core/generating-reference-guide.spec.js.map +0 -1
- package/lib/adapters/apex-types.d.ts +0 -7
- package/lib/adapters/apex-types.js.map +0 -1
- package/lib/adapters/documentables.js +0 -56
- package/lib/adapters/documentables.js.map +0 -1
- package/lib/adapters/fields-and-properties.js.map +0 -1
- package/lib/adapters/methods-and-constructors.js.map +0 -1
- package/lib/adapters/references.js.map +0 -1
- package/lib/adapters/type-utils.d.ts +0 -2
- package/lib/adapters/type-utils.js +0 -7
- package/lib/adapters/type-utils.js.map +0 -1
- package/lib/application/Apexdocs.js.map +0 -1
- package/lib/cli/generate.js.map +0 -1
- package/lib/core/generate-docs.js.map +0 -1
- package/lib/index.d.ts +0 -2
- package/lib/model/apex-bundle.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.js.map +0 -1
- package/lib/model/markdown-file.js.map +0 -1
- package/lib/model/markdown-generation-util/doc-comment-annotation-util.js.map +0 -1
- package/lib/model/markdown-generation-util/field-declaration-util.js.map +0 -1
- package/lib/model/markdown-generation-util/method-declaration-util.js.map +0 -1
- package/lib/model/markdown-generation-util/type-declaration-util.js.map +0 -1
- package/lib/model/markdown-type-file.js.map +0 -1
- package/lib/service/manifest-factory.js.map +0 -1
- package/lib/test-helpers/ClassMirrorBuilder.js.map +0 -1
- package/lib/transpiler/factory.js.map +0 -1
- package/lib/transpiler/markdown/class-file-generatorHelper.js.map +0 -1
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.d.ts +0 -9
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js +0 -42
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js.map +0 -1
- package/src/adapters/documentables.ts +0 -93
- package/src/adapters/type-utils.ts +0 -5
- package/src/adapters/types.d.ts +0 -8
- package/src/model/inheritance.ts +0 -7
- package/src/transpiler/markdown/plain-markdown/plain-docsProcessor.ts +0 -42
- /package/{lib → dist}/__spec__/core/expect-extensions.d.ts +0 -0
- /package/{lib → dist}/__spec__/core/generating-class-docs.spec.d.ts +0 -0
- /package/{lib → dist}/__spec__/core/generating-enum-docs.spec.d.ts +0 -0
- /package/{lib → dist}/__spec__/core/generating-interface-docs.spec.d.ts +0 -0
- /package/{lib → dist}/__spec__/core/generating-reference-guide.spec.d.ts +0 -0
- /package/{lib → dist}/cli/generate.d.ts +0 -0
- /package/{lib/model → dist/core}/apex-bundle.d.ts +0 -0
- /package/{lib/model → dist/core}/apex-bundle.js +0 -0
- /package/{lib/model → dist/core}/manifest.d.ts +0 -0
- /package/{lib/model → dist/core}/manifest.js +0 -0
- /package/{lib → dist}/core/template.d.ts +0 -0
- /package/{lib → dist}/core/templates/reference-guide.d.ts +0 -0
- /package/{lib → dist}/core/templates/reference-guide.js.map +0 -0
- /package/{lib → dist}/index.js.map +0 -0
- /package/{lib → dist}/model/apex-type-wrappers/ClassMirrorWrapper.d.ts +0 -0
- /package/{lib → dist}/model/apex-type-wrappers/ClassMirrorWrapper.js +0 -0
- /package/{lib → dist}/model/apex-type-wrappers/ClassMirrorWrapper.js.map +0 -0
- /package/{lib → dist}/model/apex-type-wrappers/MethodMirrorWrapper.d.ts +0 -0
- /package/{lib → dist}/model/apex-type-wrappers/MethodMirrorWrapper.js +0 -0
- /package/{lib → dist}/model/apex-type-wrappers/MethodMirrorWrapper.js.map +0 -0
- /package/{lib → dist}/model/markdown-generation-util/doc-comment-annotation-util.d.ts +0 -0
- /package/{lib → dist}/model/markdown-generation-util/index.d.ts +0 -0
- /package/{lib → dist}/model/markdown-generation-util/index.js +0 -0
- /package/{lib → dist}/model/markdown-generation-util/index.js.map +0 -0
- /package/{lib → dist}/model/markdown-generation-util/type-declaration-util.d.ts +0 -0
- /package/{lib → dist}/model/markdown-home-file.d.ts +0 -0
- /package/{lib → dist}/model/markdown-home-file.js +0 -0
- /package/{lib → dist}/model/markdown-home-file.js.map +0 -0
- /package/{lib → dist}/model/markdown-type-file.js +0 -0
- /package/{lib → dist}/model/openapi/apex-doc-types.d.ts +0 -0
- /package/{lib → dist}/model/openapi/apex-doc-types.js +0 -0
- /package/{lib → dist}/model/openapi/apex-doc-types.js.map +0 -0
- /package/{lib → dist}/model/openapi/open-api-types.d.ts +0 -0
- /package/{lib → dist}/model/openapi/open-api-types.js +0 -0
- /package/{lib → dist}/model/openapi/open-api-types.js.map +0 -0
- /package/{lib → dist}/model/openapi/open-api.d.ts +0 -0
- /package/{lib → dist}/model/openapi/open-api.js +0 -0
- /package/{lib → dist}/model/openapi/open-api.js.map +0 -0
- /package/{lib → dist}/model/openapi/openapi-type-file.d.ts +0 -0
- /package/{lib → dist}/model/openapi/openapi-type-file.js +0 -0
- /package/{lib → dist}/model/openapi/openapi-type-file.js.map +0 -0
- /package/{lib → dist}/model/outputFile.d.ts +0 -0
- /package/{lib → dist}/model/outputFile.js +0 -0
- /package/{lib → dist}/model/outputFile.js.map +0 -0
- /package/{lib → dist}/model/types-repository.d.ts +0 -0
- /package/{lib → dist}/model/types-repository.js +0 -0
- /package/{lib → dist}/model/types-repository.js.map +0 -0
- /package/{lib → dist}/service/file-system.d.ts +0 -0
- /package/{lib → dist}/service/file-system.js +0 -0
- /package/{lib → dist}/service/file-system.js.map +0 -0
- /package/{lib → dist}/service/file-writer.d.ts +0 -0
- /package/{lib → dist}/service/file-writer.js +0 -0
- /package/{lib → dist}/service/file-writer.js.map +0 -0
- /package/{lib → dist}/service/metadata-processor.d.ts +0 -0
- /package/{lib → dist}/service/metadata-processor.js +0 -0
- /package/{lib → dist}/service/metadata-processor.js.map +0 -0
- /package/{lib → dist}/service/parser.js +0 -0
- /package/{lib → dist}/service/parser.js.map +0 -0
- /package/{lib → dist}/service/state.d.ts +0 -0
- /package/{lib → dist}/service/state.js +0 -0
- /package/{lib → dist}/service/state.js.map +0 -0
- /package/{lib → dist}/service/walkers/class-walker.d.ts +0 -0
- /package/{lib → dist}/service/walkers/class-walker.js +0 -0
- /package/{lib → dist}/service/walkers/class-walker.js.map +0 -0
- /package/{lib → dist}/service/walkers/enum-walker.d.ts +0 -0
- /package/{lib → dist}/service/walkers/enum-walker.js +0 -0
- /package/{lib → dist}/service/walkers/enum-walker.js.map +0 -0
- /package/{lib → dist}/service/walkers/interface-walker.d.ts +0 -0
- /package/{lib → dist}/service/walkers/interface-walker.js +0 -0
- /package/{lib → dist}/service/walkers/interface-walker.js.map +0 -0
- /package/{lib → dist}/service/walkers/walker-factory.d.ts +0 -0
- /package/{lib → dist}/service/walkers/walker-factory.js +0 -0
- /package/{lib → dist}/service/walkers/walker-factory.js.map +0 -0
- /package/{lib → dist}/service/walkers/walker.d.ts +0 -0
- /package/{lib → dist}/service/walkers/walker.js +0 -0
- /package/{lib → dist}/service/walkers/walker.js.map +0 -0
- /package/{lib → dist}/test-helpers/AnnotationBuilder.d.ts +0 -0
- /package/{lib → dist}/test-helpers/AnnotationBuilder.js +0 -0
- /package/{lib → dist}/test-helpers/AnnotationBuilder.js.map +0 -0
- /package/{lib → dist}/test-helpers/DocCommentAnnotationBuilder.d.ts +0 -0
- /package/{lib → dist}/test-helpers/DocCommentAnnotationBuilder.js +0 -0
- /package/{lib → dist}/test-helpers/DocCommentAnnotationBuilder.js.map +0 -0
- /package/{lib → dist}/test-helpers/DocCommentBuilder.d.ts +0 -0
- /package/{lib → dist}/test-helpers/DocCommentBuilder.js +0 -0
- /package/{lib → dist}/test-helpers/DocCommentBuilder.js.map +0 -0
- /package/{lib → dist}/test-helpers/FieldMirrorBuilder.d.ts +0 -0
- /package/{lib → dist}/test-helpers/FieldMirrorBuilder.js +0 -0
- /package/{lib → dist}/test-helpers/FieldMirrorBuilder.js.map +0 -0
- /package/{lib → dist}/test-helpers/InterfaceMirrorBuilder.d.ts +0 -0
- /package/{lib → dist}/test-helpers/InterfaceMirrorBuilder.js +0 -0
- /package/{lib → dist}/test-helpers/InterfaceMirrorBuilder.js.map +0 -0
- /package/{lib → dist}/test-helpers/MethodMirrorBuilder.d.ts +0 -0
- /package/{lib → dist}/test-helpers/MethodMirrorBuilder.js +0 -0
- /package/{lib → dist}/test-helpers/MethodMirrorBuilder.js.map +0 -0
- /package/{lib → dist}/test-helpers/SettingsBuilder.d.ts +0 -0
- /package/{lib → dist}/transpiler/factory.d.ts +0 -0
- /package/{lib → dist}/transpiler/file-container.d.ts +0 -0
- /package/{lib → dist}/transpiler/file-container.js +0 -0
- /package/{lib → dist}/transpiler/file-container.js.map +0 -0
- /package/{lib → dist}/transpiler/generator-choices.d.ts +0 -0
- /package/{lib → dist}/transpiler/generator-choices.js +0 -0
- /package/{lib → dist}/transpiler/generator-choices.js.map +0 -0
- /package/{lib → dist}/transpiler/markdown/docsify/docsify-docs-processor.d.ts +0 -0
- /package/{lib → dist}/transpiler/markdown/docsify/docsify-docs-processor.js +0 -0
- /package/{lib → dist}/transpiler/markdown/docsify/docsify-docs-processor.js.map +0 -0
- /package/{lib → dist}/transpiler/markdown/jekyll/jekyll-docsProcessor.d.ts +0 -0
- /package/{lib → dist}/transpiler/markdown/jekyll/jekyll-docsProcessor.js +0 -0
- /package/{lib → dist}/transpiler/markdown/jekyll/jekyll-docsProcessor.js.map +0 -0
- /package/{lib → dist}/transpiler/markdown/markdown-transpiler-base.d.ts +0 -0
- /package/{lib → dist}/transpiler/markdown/markdown-transpiler-base.js +0 -0
- /package/{lib → dist}/transpiler/markdown/markdown-transpiler-base.js.map +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/class-template.d.ts +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/class-template.js.map +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/constructors-partial-template.d.ts +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/constructors-partial-template.js.map +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/documentable-partial-template.d.ts +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/enum-template.d.ts +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/enum-template.js +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/enum-template.js.map +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/fieldsPartialTemplate.d.ts +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js.map +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/grouped-members-partial-template.d.ts +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/grouped-members-partial-template.js +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/grouped-members-partial-template.js.map +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/interface-template.d.ts +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/interface-template.js +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/interface-template.js.map +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/methods-partial-template.d.ts +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/methods-partial-template.js.map +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/type-doc-partial.d.ts +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/type-doc-partial.js +0 -0
- /package/{lib → dist}/transpiler/markdown/plain-markdown/type-doc-partial.js.map +0 -0
- /package/{lib → dist}/transpiler/openapi/open-api-docs-processor.d.ts +0 -0
- /package/{lib → dist}/transpiler/openapi/open-api-docs-processor.js +0 -0
- /package/{lib → dist}/transpiler/openapi/open-api-docs-processor.js.map +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/Builder.d.ts +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/Builder.js +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/Builder.js.map +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/MethodParser.d.ts +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/MethodParser.js +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/MethodParser.js.map +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/ParameterObjectBuilder.d.ts +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/ParameterObjectBuilder.js +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/ParameterObjectBuilder.js.map +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/ReferenceBuilder.d.ts +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/ReferenceBuilder.js +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/ReferenceBuilder.js.map +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/RequestBodyBuilder.d.ts +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/RequestBodyBuilder.js +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/RequestBodyBuilder.js.map +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/ResponsesBuilder.d.ts +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/ResponsesBuilder.js +0 -0
- /package/{lib → dist}/transpiler/openapi/parsers/ResponsesBuilder.js.map +0 -0
- /package/{lib → dist}/transpiler/processor-type-transpiler.d.ts +0 -0
- /package/{lib → dist}/transpiler/processor-type-transpiler.js +0 -0
- /package/{lib → dist}/transpiler/processor-type-transpiler.js.map +0 -0
- /package/{lib → dist}/transpiler/transpiler.d.ts +0 -0
- /package/{lib → dist}/transpiler/transpiler.js +0 -0
- /package/{lib → dist}/transpiler/transpiler.js.map +0 -0
- /package/{lib → dist}/util/error-logger.d.ts +0 -0
- /package/{lib → dist}/util/error-logger.js +0 -0
- /package/{lib → dist}/util/error-logger.js.map +0 -0
- /package/{lib → dist}/util/logger.d.ts +0 -0
- /package/{lib → dist}/util/string-utils.d.ts +0 -0
- /package/src/{model → core}/apex-bundle.ts +0 -0
- /package/src/{model → core}/manifest.ts +0 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";var Tn=Object.defineProperty;var a=(n,e)=>Tn(n,"name",{value:e,configurable:!0});var Ln=require("fs"),On=require("path"),wt=require("@cparra/apex-reflection"),Tt=require("chalk"),Lt=require("log-update"),An=require("fast-xml-parser"),xn=require("js-yaml"),In=require("fp-ts/Option"),b=require("fp-ts/function"),Dn=require("fp-ts/Either"),g=require("handlebars"),En=require("cosmiconfig"),Sn=require("yargs");function E(n){var e=Object.create(null);return n&&Object.keys(n).forEach(function(t){if(t!=="default"){var r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:function(){return n[t]}})}}),e.default=n,Object.freeze(e)}a(E,"_interopNamespaceDefault");var P=E(Ln),oe=E(On),Ot=E(xn),w=E(In),y=E(Dn),Rn=E(Sn);const A=class A{constructor(e){this.config=e}static build(e){A.instance=new A(e)}static getInstance(){if(!A.instance)throw new Error("Settings has not been initialized");return A.instance}get sourceDirectory(){return this.config.sourceDirectory}get recursive(){return this.config.recursive}get scope(){return this.config.scope}get outputDir(){return this.config.outputDir}get targetGenerator(){return this.config.targetGenerator}get indexOnly(){return this.config.indexOnly}get sanitizeHtml(){return this.config.sanitizeHtml}getDefaultGroupName(){return this.config.defaultGroupName}getOpenApiTitle(){var e;return(e=this.config.openApiTitle)!=null?e:this.config.title}getTitle(){return this.config.title}getNamespace(){return this.config.namespace}getNamespacePrefix(){return this.config.namespace?`${this.config.namespace}.`:""}openApiFileName(){return this.config.openApiFileName}includeMetadata(){return this.config.includeMetadata}sortMembersAlphabetically(){var e;return(e=this.config.sortMembersAlphabetically)!=null?e:!1}getRootDir(){return this.config.rootDir}onAfterProcess(e){this.config.onAfterProcess&&this.config.onAfterProcess(e)}onBeforeFileWrite(e){return this.config.onBeforeFileWrite?this.config.onBeforeFileWrite(e):e}frontMatterHeader(e){return this.config.frontMatterHeader?this.config.frontMatterHeader(e):[]}getLinkingStrategy(){return this.config.linkingStrategy}};a(A,"Settings");let u=A;const ke=class ke{constructor(e,t,r){this.filePath=e,this.rawTypeContent=t,this.rawMetadataContent=r}};a(ke,"ApexBundle");let ce=ke;const jn=".cls",qe=class qe{static processFiles(e,t=this.sourceDirectory){let r=[];return e.readDirectory(t).forEach(s=>{const o=e.joinPath(t,s);if(this.readRecursively&&e.isDirectory(o)&&(r=r.concat(this.processFiles(e,o))),!this.isApexFile(s))return;const c=e.readFile(o),l=e.joinPath(t,`${s}-meta.xml`);let d=null;u.getInstance().includeMetadata()&&(d=e.exists(l)?e.readFile(l):null),r.push(new ce(s,c,d))}),r}static isApexFile(e){return e.endsWith(jn)}static get sourceDirectory(){return u.getInstance().sourceDirectory}static get readRecursively(){return u.getInstance().recursive}};a(qe,"ApexFileReader");let le=qe;const We=class We{isDirectory(e){return P.statSync(e).isDirectory()}readDirectory(e){return P.readdirSync(e)}readFile(e){return P.readFileSync(e).toString()}joinPath(...e){return oe.join(...e)}exists(e){return P.existsSync(e)}};a(We,"DefaultFileSystem");let de=We;const Ve=class Ve{static log(e,...t){this.logSingle(e),t.forEach(r=>{this.logSingle(r)})}static error(e,...t){this.logSingle(e,!1,"red",!1),t.forEach(()=>{this.logSingle(e,!1,"red",!1)})}static logSingle(e,t=!0,r="green",i=!0){this.currentFrame>9&&(this.currentFrame=0);const s=t?`${this.frames[this.currentFrame++]}`:"";let o;r==="green"?o=`${Tt.green(new Date().toLocaleString()+": ")}${e}
|
|
3
|
+
`:o=`${Tt.red(new Date().toLocaleString()+": ")}${e}
|
|
4
|
+
`,i?Lt(`${s} ${o}`):process.stdout.write(`${s} ${o}`)}static clear(){Lt.clear()}};a(Ve,"Logger");let p=Ve;p.currentFrame=0,p.frames=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];var Bn=Object.defineProperty,Nn=Object.defineProperties,Mn=Object.getOwnPropertyDescriptors,At=Object.getOwnPropertySymbols,Fn=Object.prototype.hasOwnProperty,Gn=Object.prototype.propertyIsEnumerable,xt=a((n,e,t)=>e in n?Bn(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp$9"),pe=a((n,e)=>{for(var t in e||(e={}))Fn.call(e,t)&&xt(n,t,e[t]);if(At)for(var t of At(e))Gn.call(e,t)&&xt(n,t,e[t]);return n},"__spreadValues$9"),ue=a((n,e)=>Nn(n,Mn(e)),"__spreadProps$8");const ie=class ie{constructor(e,t=!1){this.types=e,this.isForInnerTypes=t}filteredByAccessModifierAndAnnotations(e){const t=this.filterAccessibleModifier(this.types,e),r=[];for(const i of t){const s=i;if(s.type_name==="enum"){r.push(s);continue}if(s.type_name==="interface"){const l=s;r.push(ue(pe({},s),{methods:this.filterAccessibleModifier(l.methods,e)}));continue}const o=s;let c=ue(pe({},s),{methods:this.filterAccessibleModifier(o.methods,e),properties:this.filterAccessibleModifier(o.properties,e),fields:this.filterAccessibleModifier(o.fields,e),constructors:this.filterAccessibleModifier(o.constructors,e)});this.isForInnerTypes||(c=ue(pe({},c),{enums:this.filterAccessibleModifier(o.enums,e),interfaces:this.filterAccessibleModifier(o.interfaces,e),classes:new ie(o.classes,!0).filteredByAccessModifierAndAnnotations(e)})),r.push(c)}return r}filterAccessibleModifier(e,t){return e.filter(r=>{var i;return((i=r.docComment)==null?void 0:i.annotations.some(o=>o.name.toLowerCase()==="ignore"))?!1:t.includes(r.access_modifier)||r.annotations.some(o=>t.includes(o.type.toLowerCase()))})}};a(ie,"Manifest");let z=ie;function zn(n,e){return new z(n.parse(e))}a(zn,"createManifest");const Ue=class Ue{static process(e){var t;const r=new Map,i=new An.XMLParser().parse(e);return r.set("apiVersion",(t=i.ApexClass.apiVersion)!=null?t:""),i.ApexClass.status&&r.set("status",i.ApexClass.status),r}};a(Ue,"MetadataProcessor");let k=Ue;var kn=Object.defineProperty,qn=Object.defineProperties,Wn=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,Vn=Object.prototype.hasOwnProperty,Un=Object.prototype.propertyIsEnumerable,Dt=a((n,e,t)=>e in n?kn(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp$8"),fe=a((n,e)=>{for(var t in e||(e={}))Vn.call(e,t)&&Dt(n,t,e[t]);if(It)for(var t of It(e))Un.call(e,t)&&Dt(n,t,e[t]);return n},"__spreadValues$8"),he=a((n,e)=>qn(n,Wn(e)),"__spreadProps$7");const Xe=class Xe{constructor(e){this.typeBundles=e}parse(e){const t=this.typeBundles.map(r=>{p.log(`Parsing file: ${r.filePath}`);const i=e(r);return i.typeMirror&&r.rawMetadataContent&&k.process(r.rawMetadataContent).forEach((o,c)=>{var l;const d=`${c}: ${o}`;(l=i.typeMirror)==null||l.annotations.push({rawDeclaration:d,name:d,type:d})}),i}).filter(r=>r.typeMirror).map(r=>r.typeMirror);return this.addFieldsFromParent(t)}addFieldsFromParent(e){const t=[];for(const r of e){if(r.type_name!=="class"&&r.type_name!=="interface"){t.push(r);continue}if(r.type_name==="class"){let s=r;if(!s.extended_class){t.push(r);continue}s=this.addMembersFromParent(s,e),t.push(s);continue}let i=r;if(!i.extended_interfaces.length){t.push(r);continue}i=this.addMethodsFromParent(i,e),t.push(i)}return t}addMembersFromParent(e,t){if(!e.extended_class)return e;const r=t.find(s=>s.name===e.extended_class);if(!r||r.type_name!=="class")return e;let i=r;return i.extended_class&&(i=this.addMembersFromParent(i,t)),e.fields=[...e.fields,...this.getInheritedFields(i,e)],e.properties=[...e.properties,...this.getInheritedProperties(i,e)],e.methods=[...e.methods,...this.getInheritedMethods(i,e)],e}addMethodsFromParent(e,t){if(!e.extended_interfaces.length)return e;const r=[];for(const i of e.extended_interfaces){const s=t.find(o=>o.name===i);s&&r.push(s)}for(const i of r){let s=i;s.extended_interfaces.length&&(s=this.addMethodsFromParent(s,t)),e.methods=[...e.methods,...this.getInheritedMethods(s,e)]}return e}getInheritedFields(e,t){return e.fields.filter(r=>r.access_modifier.toLowerCase()!=="private").filter(r=>!this.memberExists(t.fields,r.name)).map(r=>he(fe({},r),{inherited:!0}))}getInheritedProperties(e,t){return e.properties.filter(r=>r.access_modifier.toLowerCase()!=="private").filter(r=>!this.memberExists(t.properties,r.name)).map(r=>he(fe({},r),{inherited:!0}))}getInheritedMethods(e,t){return e.methods.filter(r=>r.access_modifier.toLowerCase()!=="private").filter(r=>!this.memberExists(t.methods,r.name)).map(r=>he(fe({},r),{inherited:!0}))}memberExists(e,t){return e.map(i=>i.name).includes(t)}};a(Xe,"RawBodyParser");let me=Xe;const x=class x{constructor(){}static getInstance(){return x.instance||(x.instance=new x),x.instance}setTypeBeingProcessed(e){this.typeBeingProcessed=e}getTypeBeingProcessed(){return this.typeBeingProcessed}};a(x,"State");let q=x;const He=class He{static generate(e,t){var r,i;const s=e.sort((o,c)=>o.name<c.name?-1:o.name>c.name?1:0);(r=t.onBeforeProcess)==null||r.call(t,s),!u.getInstance().indexOnly&&(s.forEach(o=>{q.getInstance().setTypeBeingProcessed(o),t.onProcess(o)}),(i=t.onAfterProcess)==null||i.call(t,s))}};a(He,"Transpiler");let ge=He;const Ye=class Ye{static write(e,t){const r=a(i=>u.getInstance().onBeforeFileWrite(i),"onBeforeFileWrite");e.forEach(i=>{const s=this.getTargetLocation(i,r),o=oe.join(s.dir.baseDir,s.dir.fileDir);P.existsSync(o)||P.mkdirSync(o,{recursive:!0});const c=oe.join(o,`${s.name}${s.extension}`);P.writeFileSync(c,i.body,"utf8"),t(s)})}static getTargetLocation(e,t){const r={name:e.fileName,extension:e.fileExtension(),dir:{baseDir:u.getInstance().outputDir,fileDir:e.dir}};return t(r)}};a(Ye,"FileWriter");let W=Ye;const Ze=class Ze{static logErrors(e){e.forEach(t=>{this.logErrorsForSingleType(t)})}static logErrorsForSingleType(e){this.logTypeErrors(e),e.type_name==="class"?this.logErrorsForClass(e):e.type_name==="interface"&&this.logErrorsForInterface(e)}static logTypeErrors(e,t){var r;if((r=e.docComment)!=null&&r.error){const i=t?`${t.name}.${e.name}`:e.name;p.error(`${i} - Doc comment parsing error. Level: Type`),p.error(`Comment:
|
|
5
|
+
${e.docComment.rawDeclaration}`),p.error(e.docComment.error),p.error("=================================")}}static logErrorsForClass(e,t){const r=t?`${t.name}.${e.name}`:e.name;e.constructors.forEach(i=>{var s;(s=i.docComment)!=null&&s.error&&(p.error(`${r} - Doc comment parsing error. Level: Constructor`),p.error(`Comment:
|
|
6
|
+
${i.docComment.rawDeclaration}`),p.error(i.docComment.error),p.error("================================="))}),e.fields.forEach(i=>{var s;(s=i.docComment)!=null&&s.error&&(p.error(`${r} - Doc comment parsing error. Level: Field`),p.error(`Comment:
|
|
7
|
+
${i.docComment.rawDeclaration}`),p.error(i.docComment.error),p.error("================================="))}),e.properties.forEach(i=>{var s;(s=i.docComment)!=null&&s.error&&(p.error(`${r} - Doc comment parsing error. Level: Property`),p.error(`Comment:
|
|
8
|
+
${i.docComment.rawDeclaration}`),p.error(i.docComment.error),p.error("================================="))}),e.methods.forEach(i=>{var s;(s=i.docComment)!=null&&s.error&&(p.error(`${r} - Doc comment parsing error. Level: Method`),p.error(`Comment:
|
|
9
|
+
${i.docComment.rawDeclaration}`),p.error(i.docComment.error),p.error("================================="))}),e.enums.forEach(i=>{this.logErrorsForSingleType(i)}),e.interfaces.forEach(i=>{this.logErrorsForSingleType(i)}),e.classes.forEach(i=>{this.logErrorsForSingleType(i)})}static logErrorsForInterface(e){e.methods.forEach(t=>{var r;(r=t.docComment)!=null&&r.error&&(p.error(`${e.name} - Doc comment parsing error. Level: Method`),p.error(`Comment: ${t.docComment.rawDeclaration}`),p.error(t.docComment.error),p.error("================================="))})}};a(Ze,"ErrorLogger");let ye=Ze;const I=class I{constructor(){this.scopedTypes=[],this.allTypes=[]}static getInstance(){return I.instance||(I.instance=new I),I.instance}populateAll(e){this.allTypes=e}getFromAllByName(e){if(e.includes(".")){const[r,i]=e.split("."),s=this.allTypes.find(d=>d.name.toLowerCase()===r.toLowerCase());if(!s||s.type_name!=="class")return;const o=s,l=[...o.classes,...o.interfaces,...o.enums].find(d=>d.name.toLowerCase()===i);return l?{type:l,isChild:!0,parentType:s}:void 0}const t=this.allTypes.find(r=>r.name.toLowerCase()===e.toLowerCase());if(t)return{type:t,isChild:!1}}populateScoped(e){this.scopedTypes=e}getFromScopedByName(e){return this.scopedTypes.find(t=>t.name===e)}};a(I,"TypesRepository");let $=I;const Je=class Je{getLinkingStrategy(){return"root-relative"}};a(Je,"ProcessorTypeTranspiler");let V=Je;const Qe=class Qe{constructor(){this._files=[]}files(){return this._files}pushFile(e){this._files.push(e)}};a(Qe,"FileContainer");let U=Qe;const se=class se{static getSanitizedGroup(e){return this.getClassGroup(e).replace(/ /g,"-").replace(".","")}static getFileLink(e){const[t,r]=se.getFileLinkTuple(e);return`[${t}](${r})`}static getFileLinkTuple(e){var t;const i=`${(t=u.getInstance().getRootDir())!=null?t:""}${this.getDirectoryRoot(e)}`,s=`${u.getInstance().getNamespacePrefix()}${e.name}`;return[s,`${i}${s}.md`]}static getFileLinkByTypeName(e){const t=$.getInstance().getFromScopedByName(e);return t?this.getFileLink(t):`[${e}](${e})`}static getDirectoryRoot(e){if(u.getInstance().getLinkingStrategy()==="root-relative")return`/${this.getSanitizedGroup(e)}/`;const t=q.getInstance().getTypeBeingProcessed();return t?this.getClassGroup(t)===this.getClassGroup(e)?"./":`../${this.getSanitizedGroup(e)}/`:`./${this.getSanitizedGroup(e)}/`}static getClassGroup(e){var t,r;const i=(t=e.docComment)==null?void 0:t.annotations.find(s=>s.name.toLowerCase()==="group");return(r=i==null?void 0:i.body)!=null?r:u.getInstance().getDefaultGroupName()}};a(se,"ClassFileGeneratorHelper");let T=se;const Ke=class Ke{constructor(e,t){this.fileName=e,this.dir=t,this._contents=""}get body(){return this._contents}addText(e){this._contents+=e,this.addBlankLine()}addBlankLine(){this._contents+=`
|
|
10
|
+
`}};a(Ke,"OutputFile");let X=Ke;const G=class G extends X{fileExtension(){return".md"}addTitle(e,t=1){let r="";for(let i=0;i<t;i++)r+="#";r+=" ",r+=e,this._contents+=r,this.addBlankLine()}addText(e){return super.addText(e),this}addLink(e){this.addText(`{@link ${e}}`)}startCodeBlock(e="apex"){this.addText(`\`\`\`${e}`)}endCodeBlock(){this.addText("```"),this.addBlankLine()}addHorizontalRule(){this._contents+="---",this.addBlankLine()}initializeTable(...e){this.addBlankLine(),this._contents+="|",e.forEach(t=>{this._contents+=t+"|"}),this.addBlankLine(),this._contents+="|",e.forEach(()=>{this._contents+="---|"}),this.addBlankLine()}addTableRow(...e){this._contents+="|",e.forEach(t=>{this._contents+=this._replaceInlineReferences(t)+"|"}),this.addBlankLine()}addListItem(e){this._contents+=`* ${e}`}static replaceInlineLinks(e){const t=e.match(/<<.*?>>/g);t==null||t.forEach(c=>{const l=c.replace("<<","").replace(">>","");e=e.replace(c,T.getFileLinkByTypeName(l))});const r="{@link (.*?)}",i=new RegExp(r,"gi");let s;const o=[];do s=i.exec(e),s&&o.push(s);while(s);for(const c of o)e=e.replace(c[0],T.getFileLinkByTypeName(c[1]));return e}static replaceInlineEmails(e){const t="{@email (.*?)}",r=new RegExp(t,"gi");let i;const s=[];do i=r.exec(e),i&&s.push(i);while(i);for(const o of s)e=e.replace(o[0],`[${o[1]}](mailto:${o[1]})`);return e}_replaceInlineReferences(e){return e=G.replaceInlineLinks(e),e=G.replaceInlineEmails(e),e}};a(G,"MarkdownFile");let S=G;function Xn(n,e){return n.length>e?n.substr(0,e-1)+"…":n}a(Xn,"truncate");const Hn=a(n=>n.replace(/\//g," ").replace(/([A-Z])/g,e=>` ${e}`).replace(/\b\w/g,e=>e.toUpperCase()).replace(/^./,e=>e.toUpperCase()).trim(),"camel2title"),et=class et extends S{constructor(e,t,r){super(e,""),this.fileName=e,this.types=t,r&&this.addText(r),this.addTitle(u.getInstance().getTitle()),this.addTypeEntries(t)}addTypeEntries(e){this.group(e).forEach((r,i)=>{this.addTitle(i,2),r.forEach(s=>{this.addTypeEntry(s)})})}addTypeEntry(e){var t;if(this.addBlankLine(),this.addTitle(T.getFileLink(e),3),this.addBlankLine(),(t=e.docComment)!=null&&t.descriptionLines){const r=e.docComment.descriptionLines.reduce((i,s)=>i+s+`
|
|
11
|
+
`,"");this.addText(Xn(r,300)),this.addBlankLine()}}group(e){return e.reduce((t,r)=>{const i=this.getClassGroup(r),s=t.get(i)||[];return s.push(r),t.set(i,s),t},new Map)}getClassGroup(e){var t,r,i;return(i=(r=(t=e.docComment)==null?void 0:t.annotations.find(s=>s.name==="group"))==null?void 0:r.body)!=null?i:u.getInstance().getDefaultGroupName()}};a(et,"MarkdownHomeFile");let H=et;const tt=class tt{constructor(e){this.type=e}sortType(e){return u.getInstance().sortMembersAlphabetically()?e.sort((t,r)=>t.name.localeCompare(r.name)):e}};a(tt,"Walker");let B=tt;const nt=class nt extends B{walk(e){e.onTypeDeclaration(this.type);const t=this.type;t.constructors.length&&e.onConstructorDeclaration(this.type.name,t.constructors),t.fields.length&&e.onFieldsDeclaration(this.sortType(t.fields)),t.properties.length&&e.onPropertiesDeclaration(this.sortType(t.properties)),t.methods.length&&e.onMethodsDeclaration(this.sortType(t.methods)),t.enums.length&&e.onInnerEnumsDeclaration(this.sortType(t.enums)),t.classes.length&&e.onInnerClassesDeclaration(this.sortType(t.classes)),t.interfaces.length&&e.onInnerInterfacesDeclaration(this.sortType(t.interfaces))}};a(nt,"ClassWalker");let ve=nt;const rt=class rt extends B{walk(e){e.onTypeDeclaration(this.type)}};a(rt,"EnumWalker");let _e=rt;const it=class it extends B{walk(e){e.onTypeDeclaration(this.type);const t=this.type;t.methods.length&&e.onMethodsDeclaration(this.sortType(t.methods))}};a(it,"InterfaceWalker");let Ce=it;const st=class st{static get(e){switch(e.type_name){case"class":return new ve(e);case"enum":return new _e(e);case"interface":return new Ce(e)}throw Error("Walker not found for type.")}};a(st,"WalkerFactory");let be=st;function Et(n,e){var t;const r=(t=e.docComment)==null?void 0:t.annotations.find(i=>i.name==="mermaid");r&&(n.addBlankLine(),n.startCodeBlock("mermaid"),r.bodyLines.forEach(i=>{n.addText(i)}),n.endCodeBlock(),n.addBlankLine())}a(Et,"addMermaid");function St(n,e){var t;(t=e.docComment)==null||t.annotations.filter(s=>s.name!=="description").filter(s=>s.name!=="mermaid").forEach(s=>{n.addBlankLine(),n.addText(i(s)),n.addBlankLine()});function r(s){const o=s.split(/[-_]+/),c=[];for(const l of o)c.push(l.charAt(0).toUpperCase()+l.slice(1));return c.join(" ")}a(r,"splitAndCapitalize");function i(s){let o=s.body;return s.name.toLowerCase()==="see"&&(o=T.getFileLinkByTypeName(s.body)),`**${r(s.name)}** ${o}`}a(i,"buildDocAnnotationText")}a(St,"addCustomDocCommentAnnotations");function Yn(n,e){var t;if(e.annotations.forEach(r=>{n.addBlankLine(),n.addText(`\`${r.type.toUpperCase()}\``)}),(t=e.docComment)!=null&&t.descriptionLines){n.addBlankLine();for(const r of e.docComment.descriptionLines)n.addText(r);n.addBlankLine()}e.type_name==="class"&&Zn(e,n),e.type_name==="interface"&&Jn(e,n),St(n,e),Et(n,e)}a(Yn,"declareType");function Zn(n,e){const t=n;if(t.extended_class&&(e.addBlankLine(),e.addText("**Inheritance**"),e.addBlankLine(),Rt(e,t),e.addText(n.name),e.addBlankLine()),t.implemented_interfaces.length){e.addBlankLine(),e.addText("**Implemented types**"),e.addBlankLine();for(let r=0;r<t.implemented_interfaces.length;r++){const i=t.implemented_interfaces[r];e.addLink(i),r<t.implemented_interfaces.length-1&&e.addText(", ")}e.addBlankLine()}}a(Zn,"addInheritanceSectionForClass");function Jn(n,e){const t=n;if(t.extended_interfaces.length){e.addBlankLine(),e.addText("**Extended types**"),e.addBlankLine();for(let r=0;r<t.extended_interfaces.length;r++){const i=t.extended_interfaces[r];e.addLink(i),r<t.extended_interfaces.length-1&&e.addText(", ")}}}a(Jn,"addInheritanceSectionForInterface");function Rt(n,e){if(!e.extended_class)return;const t=$.getInstance().getFromScopedByName(e.extended_class);t&&(t.type_name==="class"&&Rt(n,t),n.addLink(t.name),n.addText(" > "))}a(Rt,"addParent");function jt(n,e,t,r=""){e.forEach(i=>{var s,o;const c=Y(i)?`${i.typeReference.rawDeclaration} ${i.name}`:r;n.addTitle(`\`${Qn(i.access_modifier,c,i)}\``,t+2),Y(i)&&i.inherited&&(n.addBlankLine(),n.addText("*Inherited*"),n.addBlankLine()),i.annotations.forEach(l=>{n.addBlankLine(),n.addText(`\`${l.type.toUpperCase()}\``)}),(s=i.docComment)!=null&&s.description&&(n.addBlankLine(),n.addText(i.docComment.description),n.addBlankLine()),i.parameters.length&&Kn(n,i,t),Y(i)&&er(n,i,t),tr(n,i,t),St(n,i),Et(n,i),(o=i.docComment)!=null&&o.exampleAnnotation&&nr(n,i,t)}),n.addHorizontalRule()}a(jt,"declareMethod");function Qn(n,e,t){let r=`${e}(`;Y(t)&&t.memberModifiers.length?r=n+" "+t.memberModifiers.join(" ")+" "+r:r=n+" "+r;const i=t.parameters.map(s=>`${s.typeReference.rawDeclaration} ${s.name}`);return r+=i.join(", "),`${r})`}a(Qn,"buildSignature");function Kn(n,e,t){var r,i;(r=e.docComment)!=null&&r.paramAnnotations.length&&(n.addTitle("Parameters",t+3),n.initializeTable("Param","Description"),(i=e.docComment)==null||i.paramAnnotations.forEach(s=>{const o=s.paramName,c=s.bodyLines.join(" ");n.addTableRow(`\`${o}\``,c)}),n.addBlankLine())}a(Kn,"addParameters");function er(n,e,t){var r,i;(r=e.docComment)!=null&&r.returnAnnotation&&(n.addTitle("Returns",t+3),n.initializeTable("Type","Description"),n.addTableRow(`\`${e.typeReference.rawDeclaration}\``,(i=e.docComment)==null?void 0:i.returnAnnotation.bodyLines.join(" ")),n.addBlankLine())}a(er,"addReturns");function tr(n,e,t){var r,i;(r=e.docComment)!=null&&r.throwsAnnotations.length&&(n.addTitle("Throws",t+3),n.initializeTable("Exception","Description"),(i=e.docComment)==null||i.throwsAnnotations.forEach(s=>{const o=s.exceptionName,c=s.bodyLines.join(" ");n.addTableRow(`\`${o}\``,c)}),n.addBlankLine())}a(tr,"addThrowsBlock");function nr(n,e,t){var r;n.addTitle("Example",t+3),n.startCodeBlock(),(r=e.docComment)==null||r.exampleAnnotation.bodyLines.forEach(i=>{n.addText(i)}),n.endCodeBlock(),n.addBlankLine()}a(nr,"addExample");function Y(n){return n.typeReference!==void 0}a(Y,"isMethod");function Bt(n,e,t,r=!1){n.addBlankLine(),e.forEach(i=>{rr(n,i,t,r)}),n.addHorizontalRule()}a(Bt,"declareField");function rr(n,e,t,r){var i,s,o;if(!r)n.addTitle(`\`${e.access_modifier} ${e.name}\` \u2192 \`${e.typeReference.rawDeclaration}\``,t+2),n.addBlankLine(),e.inherited&&n.addText("*Inherited*"),e.annotations.forEach(c=>{n.addText(`\`${c.type.toUpperCase()}\` `)}),(i=e.docComment)!=null&&i.description&&(n.addBlankLine(),n.addText(e.docComment.description)),n.addBlankLine();else{let c="";const l=!!e.annotations.length;l&&(c+=" ["),e.annotations.forEach(h=>{c+=`\`${h.type.toUpperCase()}\` `}),l&&(c+="]");let d="";(s=e.docComment)!=null&&s.description&&(d=` - ${(o=e.docComment)==null?void 0:o.description}`);let f=`\`${e.access_modifier} ${e.name}\` \u2192 \`${e.typeReference.rawDeclaration}\``;e.inherited&&(f+="(*Inherited*)"),f+=`${c} ${d}`,n.addListItem(f),n.addBlankLine()}}a(rr,"addFieldSection");const ae=class ae extends S{constructor(e,t=1,r,i=!1){super(`${u.getInstance().getNamespacePrefix()}${e.name}`,T.getSanitizedGroup(e)),this.type=e,this.headingLevel=t,this.isInner=i,r&&this.addText(r),be.get(e).walk(this)}onTypeDeclaration(e){let t;this.isInner?t=e.name:this.isClass(e)&&e.classModifier?t=`${e.classModifier} ${u.getInstance().getNamespacePrefix()}${e.name}`:t=`${u.getInstance().getNamespacePrefix()}${e.name}`,this.addTitle(t,this.headingLevel),Yn(this,e)}isClass(e){return e.type_name==="class"}onConstructorDeclaration(e,t){this.addTitle("Constructors",this.headingLevel+1),this.declareMethodWithGroupings(t,e)}onFieldsDeclaration(e){this.addTitle("Fields",this.headingLevel+1),this.declareFieldOrProperty(e)}onPropertiesDeclaration(e){this.addTitle("Properties",this.headingLevel+1),this.declareFieldOrProperty(e)}onMethodsDeclaration(e){this.addTitle("Methods",this.headingLevel+1),this.declareMethodWithGroupings(e)}onInnerEnumsDeclaration(e){this.addInnerTypes("Enums",e)}onInnerClassesDeclaration(e){this.addInnerTypes("Classes",e)}onInnerInterfacesDeclaration(e){this.addInnerTypes("Interfaces",e,!1)}addInnerTypes(e,t,r=!0){this.addTitle(e,this.headingLevel+1),t.forEach(i=>{const s=new ae(i,this.headingLevel+2,void 0,!0);this.addText(s._contents)}),r&&this.addHorizontalRule()}hasGroupings(e){return!!e.find(t=>!!t.group)}declareMethodWithGroupings(e,t=""){if(!this.hasGroupings(e))jt(this,e,this.headingLevel,t);else{const i=this.group(e);for(const s in i){this.startGroup(s,i[s][0].groupDescription);const o=i[s];jt(this,o,this.headingLevel,t),this.endGroup()}}}declareFieldOrProperty(e){if(!this.hasGroupings(e))Bt(this,e,this.headingLevel,!1);else{const r=this.group(e);for(const i in r){this.startGroup(i,r[i][0].groupDescription);const s=r[i];Bt(this,s,this.headingLevel,!0),this.endGroup()}}}startGroup(e,t){this.headingLevel=this.headingLevel+2,this.addTitle(e,this.headingLevel),t&&this.addText(t)}endGroup(){this.headingLevel=this.headingLevel-2}group(e){return e.reduce((t,r)=>{var i;const s=(i=r.group)!=null?i:"Other",o=t[s]||[];return o.push(r),t[s]=o,t},{})}};a(ae,"MarkdownTypeFile");let Z=ae;const at=class at extends V{constructor(){super(),this.onBeforeProcess=e=>{this._fileContainer.pushFile(new H(this.homeFileName(),e))},this._fileContainer=new U}fileBuilder(){return this._fileContainer}onProcess(e){this._fileContainer.pushFile(new Z(e))}};a(at,"MarkdownTranspilerBase");let J=at;const ot=class ot extends J{constructor(){super(...arguments),this.onBeforeProcess=e=>{this._fileContainer.pushFile(new H(this.homeFileName(),e,this.frontMatterForHomeFile))}}homeFileName(){return"index"}onProcess(e){this._fileContainer.pushFile(new Z(e,1,this.getFrontMatterHeader(e)))}get frontMatterForHomeFile(){return`---
|
|
12
|
+
layout: default
|
|
13
|
+
---`}getFrontMatterHeader(e){var t;const r=["---"];r.push("layout: default");const i={name:e.name,typeName:e.type_name,accessModifier:e.access_modifier,group:e.group,description:(t=e.docComment)==null?void 0:t.description},s=u.getInstance().frontMatterHeader(i);return s&&s.forEach(o=>{r.push(o)}),r.push("---"),r.join(`
|
|
14
|
+
`)}getLinkingStrategy(){return"path-relative"}};a(ot,"JekyllDocsProcessor");let $e=ot;const ct=class ct extends J{homeFileName(){return"README"}getLinkingStrategy(){return"root-relative"}};a(ct,"DocsifyDocsProcessor");let Pe=ct;var ir=Object.defineProperty,sr=Object.defineProperties,ar=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertySymbols,or=Object.prototype.hasOwnProperty,cr=Object.prototype.propertyIsEnumerable,Mt=a((n,e,t)=>e in n?ir(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp$7"),lr=a((n,e)=>{for(var t in e||(e={}))or.call(e,t)&&Mt(n,t,e[t]);if(Nt)for(var t of Nt(e))cr.call(e,t)&&Mt(n,t,e[t]);return n},"__spreadValues$7"),dr=a((n,e)=>sr(n,ar(e)),"__spreadProps$6");const lt=class lt extends X{constructor(e){super(u.getInstance().openApiFileName(),""),this.openApiModel=e,this.addText(JSON.stringify(dr(lr({},e),{namespace:void 0}),null,2))}fileExtension(){return".json"}};a(lt,"OpenapiTypeFile");let we=lt;const pr="3.1.0",Ft="/services/apexrest/",dt=class dt{constructor(e,t,r){this.namespace=r,this.openapi=pr,this.info={title:e,version:t},this.servers=[{url:this.getServerUrl()}],this.paths={},this.tags=[]}getServerUrl(){return this.namespace?`${Ft}${this.namespace}/`:Ft}};a(dt,"OpenApi");let Te=dt;const pt=class pt{constructor(e){this.classMirror=e,this.hasAnnotation=(t,r)=>t.annotations.some(i=>i.name.toLowerCase()===r)}getMethodsByAnnotation(e){return this.classMirror.methods.filter(t=>this.hasAnnotation(t,e))}};a(pt,"ClassMirrorWrapper");let Le=pt;var ur=Object.defineProperty,fr=Object.defineProperties,hr=Object.getOwnPropertyDescriptors,Gt=Object.getOwnPropertySymbols,mr=Object.prototype.hasOwnProperty,gr=Object.prototype.propertyIsEnumerable,zt=a((n,e,t)=>e in n?ur(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp$6"),Oe=a((n,e)=>{for(var t in e||(e={}))mr.call(e,t)&&zt(n,t,e[t]);if(Gt)for(var t of Gt(e))gr.call(e,t)&&zt(n,t,e[t]);return n},"__spreadValues$6"),Ae=a((n,e)=>fr(n,hr(e)),"__spreadProps$5");const ut=class ut{constructor(){this.isReferenceString=e=>typeof e=="string"||e instanceof String}build(e){const t=e,r=/\[(.*?)]/g,i=e.match(r);let s=[];i&&i.length>0&&(s=xe.build(i[0]),e=e.replace(r,""));const[o,c]=this.handlePossibleCollectionReference(e),l=$.getInstance().getFromAllByName(o);if(!l)throw new Error(`The referenced type ${e} was not found.`);if(l.type.type_name!=="class")throw new Error(`Expected the referenced type to be a class, but found a ${l.type.type_name}.`);const d=Ae(Oe({},l),{originalTypeName:t,isCollection:c,referenceOverrides:s});return this.buildReferenceFromType(d)}handlePossibleCollectionReference(e){return e=e.toLowerCase(),e.startsWith("list<")&&e.endsWith(">")?(e=e.replace("list<",""),e=e.replace(">",""),[e,!0]):e.startsWith("set<")&&e.endsWith(">")?(e=e.replace("set<",""),e=e.replace(">",""),[e,!0]):[e,!1]}buildReferenceFromType(e){const t=[...e.type.properties,...e.type.fields].filter(o=>!o.memberModifiers.includes("static")).filter(o=>!o.memberModifiers.includes("transient")),r={};let i=[];return t.forEach(o=>{var c,l;const d=e.referenceOverrides.find(f=>f.propertyName.toLowerCase()===o.name.toLowerCase());if(d){const f=this.build(d.referenceName);r[o.name]=f.entrypointReferenceObject,f.referenceComponents.forEach(h=>i.push(h))}else{const f=(c=o.docComment)==null?void 0:c.annotations.find(h=>h.name.toLowerCase()==="http-schema");if(f)this.handleOverriddenSchema(f,r,o,i);else{const h=this.getReferenceType(o.typeReference);r[o.name]=h.schema,i.push(...h.referenceComponents)}}r[o.name].description=(l=o.docComment)==null?void 0:l.description}),i=[...this.buildMainReferenceComponent(e,r),...i],{entrypointReferenceObject:{$ref:`#/components/schemas/${this.getReferenceName(e)}`},referenceComponents:i}}handleOverriddenSchema(e,t,r,i){const s=e==null?void 0:e.bodyLines.reduce((l,d)=>l+`
|
|
15
|
+
`+d),o=Ot.load(s);if(this.isReferenceString(o)){const l=this.build(o);t[r.name]=l.entrypointReferenceObject,l.referenceComponents.forEach(d=>i.push(d))}else t[r.name]=o}getReferenceName(e){var t;let r=e.type.name;return e.isChild&&(r=`${(t=e.parentType)==null?void 0:t.name}.${e.type.name}`),e.isCollection&&(r=`${r}_array`),e.referenceOverrides.length&&(r=`${r}_${e.originalTypeName}`),r}buildMainReferenceComponent(e,t){const r=this.getReferenceName(Ae(Oe({},e),{isCollection:!1})),s=[{referencedClass:r,schema:{type:"object",properties:t}}];return e.isCollection?[{referencedClass:this.getReferenceName(e),schema:{type:"array",items:{$ref:`#/components/schemas/${r}`}}},...s]:s}getReferenceType(e){const t=e.type.toLowerCase();switch(t){case"boolean":return{schema:{type:"boolean"},referenceComponents:[]};case"date":return{schema:{type:"string",format:"date"},referenceComponents:[]};case"datetime":return{schema:{type:"string",format:"date-time"},referenceComponents:[]};case"decimal":return{schema:{type:"number"},referenceComponents:[]};case"double":return{schema:{type:"number"},referenceComponents:[]};case"id":return{schema:{type:"string"},referenceComponents:[]};case"integer":return{schema:{type:"integer"},referenceComponents:[]};case"long":return{schema:{type:"integer",format:"int64"},referenceComponents:[]};case"string":return{schema:{type:"string"},referenceComponents:[]};case"time":return{schema:{type:"string",format:"time"},referenceComponents:[]};case"list":return this.buildCollectionPair(e);case"set":return this.buildCollectionPair(e);case"map":return{schema:{type:"object"},referenceComponents:[]};case"object":return{schema:{type:"object"},referenceComponents:[]};default:{const r=$.getInstance().getFromAllByName(t);if(!r)return{schema:{type:"object"},referenceComponents:[]};const i=this.buildReferenceFromType(Ae(Oe({},r),{isCollection:!1,referenceOverrides:[],originalTypeName:t}));return{schema:i.entrypointReferenceObject,referenceComponents:[...i.referenceComponents]}}}}buildCollectionPair(e){const t=this.getReferenceType(e.ofType);return{schema:{type:"array",items:t.schema},referenceComponents:[...t.referenceComponents]}}};a(ut,"ReferenceBuilder");let N=ut;const ft=class ft{static build(e){return e.replace(/[[\]]/g,"").split(",").map(i=>i.replace(/\s/g,"")).map(i=>{const[s,o]=i.split(":");return{propertyName:s,referenceName:o}})}};a(ft,"ReferenceOverrides");let xe=ft;const ht=class ht{constructor(){this.isReferenceString=e=>typeof e=="string"||e instanceof String}build(e){let t;return this.isReferenceString(e.schema)&&(t=new N().build(e.schema)),{reference:t,body:this.buildBody(e,t)}}getOpenApiSchemaFromApexDocSchema(e,t){return this.isReferenceString(e.schema)?t.entrypointReferenceObject:e.schema}};a(ht,"Builder");let M=ht;var yr=Object.defineProperty,vr=Object.defineProperties,_r=Object.getOwnPropertyDescriptors,kt=Object.getOwnPropertySymbols,Cr=Object.prototype.hasOwnProperty,br=Object.prototype.propertyIsEnumerable,qt=a((n,e,t)=>e in n?yr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp$5"),$r=a((n,e)=>{for(var t in e||(e={}))Cr.call(e,t)&&qt(n,t,e[t]);if(kt)for(var t of kt(e))br.call(e,t)&&qt(n,t,e[t]);return n},"__spreadValues$5"),Pr=a((n,e)=>vr(n,_r(e)),"__spreadProps$4");const mt=class mt extends M{buildBody(e,t){return Pr($r({},e),{schema:this.getOpenApiSchemaFromApexDocSchema(e,t)})}};a(mt,"ParameterObjectBuilder");let Ie=mt;const gt=class gt extends M{buildBody(e,t){let r=`Status code ${e.statusCode}`;return e.description&&(r=e.description),{description:r,content:{"application/json":{schema:this.getOpenApiSchemaFromApexDocSchema(e,t)}}}}};a(gt,"ResponsesBuilder");let De=gt;const yt=class yt extends M{buildBody(e,t){return{description:e.description,content:{"application/json":{schema:this.getOpenApiSchemaFromApexDocSchema(e,t)}},required:e.required}}};a(yt,"RequestBodyBuilder");let Q=yt;const vt=class vt{constructor(e){this.methodMirror=e,this.hasDocCommentAnnotation=t=>{var r;return(r=this.methodMirror.docComment)==null?void 0:r.annotations.some(i=>i.name.toLowerCase()===t)},this.getDocCommentAnnotation=t=>{var r;return(r=this.methodMirror.docComment)==null?void 0:r.annotations.find(i=>i.name.toLowerCase()===t)}}};a(vt,"MethodMirrorWrapper");let Ee=vt;const _t=class _t{constructor(e){this.openApiModel=e}parseMethod(e,t,r,i){var s,o;const l=new Le(e).getMethodsByAnnotation(`http${r}`);if(!l.length)return;const d=l[0];this.openApiModel.paths[t][r]={},this.openApiModel.paths[t][r].tags=[i],(s=d.docComment)!=null&&s.description&&(this.openApiModel.paths[t][r].description=d.docComment.description);const f=new Ee(d);f.hasDocCommentAnnotation("summary")&&(this.openApiModel.paths[t][r].summary=(o=f.getDocCommentAnnotation("summary"))==null?void 0:o.body),this.parseHttpAnnotation(d,t,r,"http-request-body",this.addRequestBodyToOpenApi.bind(this),this.fallbackHttpRequestBodyParser(t,r)),this.parseHttpAnnotation(d,t,r,"http-parameter",this.addParametersToOpenApi.bind(this)),this.parseHttpAnnotation(d,t,r,"http-response",this.addHttpResponsesToOpenApi.bind(this),this.getFallbackHttpResponseParser(t,r))}parseHttpAnnotation(e,t,r,i,s,o){var c;const l=(c=e.docComment)==null?void 0:c.annotations.filter(d=>d.name===i);if(!(l!=null&&l.length)){o&&o(e);return}for(const d of l){const f=d==null?void 0:d.bodyLines.reduce((h,m)=>h+`
|
|
16
|
+
`+m);if(!f)return;this.addToOpenApiStrategy(f,t,r,s)}}addToOpenApiStrategy(e,t,r,i){const s=Ot.load(e),o=new Q().build(s);i(s,t,r),this.addReference(o)}addRequestBodyToOpenApi(e,t,r){const i=new Q().build(e);this.openApiModel.paths[t][r].requestBody=i.body}addParametersToOpenApi(e,t,r){const i=new Ie().build(e);this.openApiModel.paths[t][r].parameters===void 0&&(this.openApiModel.paths[t][r].parameters=[]),this.openApiModel.paths[t][r].parameters.push(i.body)}addHttpResponsesToOpenApi(e,t,r){const i=new De().build(e);this.openApiModel.paths[t][r].responses===void 0&&(this.openApiModel.paths[t][r].responses={}),this.openApiModel.paths[t][r].responses[e.statusCode]=i.body}fallbackHttpRequestBodyParser(e,t){return r=>{const i=r.parameters;if(!i.length)return;const s={};i.forEach(o=>{const c=o.name,l=new N().getReferenceType(o.typeReference);s[c]=l.schema,this.addReference({reference:{entrypointReferenceObject:l.schema,referenceComponents:l.referenceComponents}})}),this.openApiModel.paths[e][t].requestBody={content:{"application/json":{schema:{type:"object",properties:s}}}}}}getFallbackHttpResponseParser(e,t){return r=>{var i,s;const o=r.typeReference;if(o.type.toLowerCase()==="void")return;const c=new N().getReferenceType(o);this.addReference({reference:{entrypointReferenceObject:c.schema,referenceComponents:c.referenceComponents}}),this.openApiModel.paths[e][t].responses===void 0&&(this.openApiModel.paths[e][t].responses={}),this.openApiModel.paths[e][t].responses[200]={description:(s=(i=r.docComment)==null?void 0:i.description)!=null?s:"Status code 200",content:{"application/json":{schema:c.schema}}}}}addReference(e){if(e.reference){if(this.openApiModel.components===void 0&&(this.openApiModel.components={schemas:{}}),!e.reference.referenceComponents.length)return;e.reference.referenceComponents.forEach(t=>{this.openApiModel.components.schemas[t.referencedClass]=t.schema})}}};a(_t,"MethodParser");let Se=_t;const Ct=class Ct extends V{constructor(){super(),this.onAfterProcess=()=>{this._fileContainer.pushFile(new we(this.openApiModel))},this._fileContainer=new U;const e=u.getInstance().getOpenApiTitle();if(!e)throw Error("No OpenApi title was provided.");this.openApiModel=new Te(e,"1.0.0",u.getInstance().getNamespace())}fileBuilder(){return this._fileContainer}onProcess(e){var t,r;p.logSingle(`Processing ${e.name}`,!1,"green",!1);const i=this.getEndpointPath(e);if(!i)return;this.openApiModel.paths[i]={},(t=e.docComment)!=null&&t.description&&(this.openApiModel.paths[i].description=e.docComment.description);const s=e,o=Hn(i);this.openApiModel.tags.push({name:o,description:(r=e.docComment)==null?void 0:r.description});const c=new Se(this.openApiModel);c.parseMethod(s,i,"get",o),c.parseMethod(s,i,"patch",o),c.parseMethod(s,i,"post",o),c.parseMethod(s,i,"put",o),c.parseMethod(s,i,"delete",o)}getEndpointPath(e){var t;const r=e.annotations.find(o=>o.name.toLowerCase()==="restresource"),i=(t=r==null?void 0:r.elementValues)==null?void 0:t.find(o=>o.key.toLowerCase()==="urlmapping");if(!i)return p.error(`Type does not contain urlMapping annotation ${e.name}`),null;let s=i.value.replaceAll('"',"").replaceAll("'","").replaceAll("/*","/");return s.startsWith("/")&&(s=s.substring(1)),s}};a(Ct,"OpenApiDocsProcessor");let Re=Ct;const bt=class bt{static get(e){if(this.typeTranspilerCache)return this.typeTranspilerCache;switch(e){case"jekyll":return this.typeTranspilerCache=new $e,this.typeTranspilerCache;case"docsify":return this.typeTranspilerCache=new Pe,this.typeTranspilerCache;case"openapi":return this.typeTranspilerCache=new Re,this.typeTranspilerCache;case"plain-markdown":throw Error("Plain Markdown processor is not supported through this factory anymore.");default:throw Error("Invalid target generator")}}};a(bt,"TypeTranspilerFactory");let K=bt;function wr(n){return{__type:"link",title:n,url:`mailto:${n}`}}a(wr,"defaultGetEmailByReference");function Tr(n,e,t=wr){return Ar(Lr([n],e),t)}a(Tr,"replaceInlineReferences");function Lr(n,e){return n.flatMap(t=>Or(t,e))}a(Lr,"replaceInlineLinks");function Or(n,e){if(typeof n!="string")return[n];const t=n,i=Wt("{@link (.*?)}|<<([^>]+)>>",t);return Vt(i,t,e)}a(Or,"inlineLinkContent");function Ar(n,e){return n.flatMap(t=>xr(t,e))}a(Ar,"replaceInlineEmails");function xr(n,e){if(typeof n!="string")return[n];const t=n,i=Wt("{@email (.*?)}",t);return Vt(i,t,e)}a(xr,"inlineEmailContent");function Wt(n,e){const t=new RegExp(n,"gi");let r;const i=[];do r=t.exec(e),r&&i.push(r);while(r);return i}a(Wt,"match");function Vt(n,e,t){if(n.length===0)return[e];const r=[];let i=0;for(const s of n){const o=s.index,c=s[0].length,l=s.slice(1).find(d=>d);l&&(r.push(e.slice(i,o)),r.push(t(l)),i=o+c)}return i<e.length&&r.push(e.slice(i)),r}a(Vt,"createRenderableContents");function Ut(n){return Object.keys(n).includes("__type")&&n.__type==="empty-line"}a(Ut,"isEmptyLine");function Ir(n){return Object.keys(n).includes("__type")&&n.__type==="code-block"}a(Ir,"isCodeBlock");var Dr=Object.defineProperty,Er=Object.defineProperties,Sr=Object.getOwnPropertyDescriptors,Xt=Object.getOwnPropertySymbols,Rr=Object.prototype.hasOwnProperty,jr=Object.prototype.propertyIsEnumerable,Ht=a((n,e,t)=>e in n?Dr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp$4"),Yt=a((n,e)=>{for(var t in e||(e={}))Rr.call(e,t)&&Ht(n,t,e[t]);if(Xt)for(var t of Xt(e))jr.call(e,t)&&Ht(n,t,e[t]);return n},"__spreadValues$4"),Zt=a((n,e)=>Er(n,Sr(e)),"__spreadProps$3");function L(n,e){function t(r){if(!r)return;let i=[];for(let s=0;s<r.length;s++){const o=r[s],c=o.match(/^```([a-zA-Z]*)$/);if(c){const l=c[1]||"apex",d=[];for(s++;s<r.length;){const f=r[s];if(f.trim()==="```")break;d.push(f),s++}console.log("codeBlockLines",d),i=[...i,{__type:"code-block",language:l,content:d},{__type:"empty-line"}];continue}i=[...i,...Tr(o,e),{__type:"empty-line"}]}return i.flatMap(s=>s).filter((s,o,c)=>!(Ut(s)&&o===c.length-1))}return a(t,"describableToRenderableContent"),{description:t(n)}}a(L,"adaptDescribable");function ee(n,e,t){var r,i,s;function o(h){var m,v;const _=["description","group","author","date","see","example","mermaid","throws","exception"];return(v=(m=h.docComment)==null?void 0:m.annotations.filter(C=>!_.includes(C.name.toLowerCase())).map(C=>Zt(Yt({},L(C.bodyLines,e)),{name:C.name})))!=null?v:[]}a(o,"extractCustomTags");function c(h,m){var v,_;return(_=(v=h.docComment)==null?void 0:v.annotations.find(C=>C.name.toLowerCase()===m))==null?void 0:_.bodyLines}a(c,"extractAnnotationBodyLines");function l(h,m){var v,_;return(_=(v=h.docComment)==null?void 0:v.annotations.find(C=>C.name.toLowerCase()===m))==null?void 0:_.body}a(l,"extractAnnotationBody");function d(h){var m,v;return(v=(m=h.docComment)==null?void 0:m.annotations.filter(_=>_.name.toLowerCase()==="see").map(_=>_.body))!=null?v:[]}a(d,"extractSeeAnnotations");function f(h,m){if(m)return{__type:"code-block",language:h,content:m}}return a(f,"bodyLinesToCodeBlock"),Zt(Yt({},L((r=n.docComment)==null?void 0:r.descriptionLines,e)),{annotations:n.annotations.map(h=>h.type.toUpperCase()),customTags:o(n),mermaid:{headingLevel:t,heading:"Diagram",value:f("mermaid",c(n,"mermaid"))},example:{headingLevel:t,heading:"Example",value:f("apex",(s=(i=n.docComment)==null?void 0:i.exampleAnnotation)==null?void 0:s.bodyLines)},group:l(n,"group"),author:l(n,"author"),date:l(n,"date"),sees:d(n).map(e)})}a(ee,"adaptDocumentable");var Br=Object.defineProperty,Nr=Object.defineProperties,Mr=Object.getOwnPropertyDescriptors,Jt=Object.getOwnPropertySymbols,Fr=Object.prototype.hasOwnProperty,Gr=Object.prototype.propertyIsEnumerable,Qt=a((n,e,t)=>e in n?Br(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp$3"),je=a((n,e)=>{for(var t in e||(e={}))Fr.call(e,t)&&Qt(n,t,e[t]);if(Jt)for(var t of Jt(e))Gr.call(e,t)&&Qt(n,t,e[t]);return n},"__spreadValues$3"),Be=a((n,e)=>Nr(n,Mr(e)),"__spreadProps$2");function Kt(n,e,t){var r,i,s;function o(l){const{name:d,parameters:f}=l,h=f.map(m=>m.name).join(", ");return`${d}(${h})`}a(o,"buildTitle");function c(l){const{access_modifier:d,typeReference:f,name:h,memberModifiers:m}=l,v=l.parameters.map(C=>`${C.typeReference.rawDeclaration} ${C.name}`).join(", "),_=m.length>0?`${m.join(" ")} `:"";return{__type:"code-block",language:"apex",content:[`${d} ${_}${f.rawDeclaration} ${h}(${v})`]}}return a(c,"buildSignature"),{headingLevel:t,doc:ee(n,e,t+1),heading:o(n),signature:{headingLevel:t+1,heading:"Signature",value:c(n)},returnType:{headingLevel:t+1,heading:"Return Type",value:Be(je({},L((i=(r=n.docComment)==null?void 0:r.returnAnnotation)==null?void 0:i.bodyLines,e)),{type:e(n.typeReference.rawDeclaration)})},throws:{headingLevel:t+1,heading:"Throws",value:(s=n.docComment)==null?void 0:s.throwsAnnotations.map(l=>tn(l,e))},parameters:{headingLevel:t+1,heading:"Parameters",value:n.parameters.map(l=>en(n,l,e))},inherited:n.inherited}}a(Kt,"adaptMethod");function zr(n,e,t,r){var i;function s(c,l){const{parameters:d}=l,f=d.map(h=>h.name).join(", ");return`${c}(${f})`}a(s,"buildTitle");function o(c,l){const{access_modifier:d}=l,f=l.parameters.map(h=>`${h.typeReference.rawDeclaration} ${h.name}`).join(", ");return{__type:"code-block",language:"apex",content:[`${d} ${c}(${f})`]}}return a(o,"buildSignature"),{doc:ee(e,t,r+1),headingLevel:r,heading:s(n,e),signature:{headingLevel:r+1,heading:"Signature",value:o(n,e)},parameters:{headingLevel:r+1,heading:"Parameters",value:e.parameters.map(c=>en(e,c,t))},throws:{headingLevel:r+1,heading:"Throws",value:(i=e.docComment)==null?void 0:i.throwsAnnotations.map(c=>tn(c,t))}}}a(zr,"adaptConstructor");function en(n,e,t){var r;const i=(r=n.docComment)==null?void 0:r.paramAnnotations.find(s=>s.paramName.toLowerCase()===e.name.toLowerCase());return Be(je({},L(i==null?void 0:i.bodyLines,t)),{name:e.name,type:t(e.typeReference.rawDeclaration)})}a(en,"mapParameters");function tn(n,e){return Be(je({},L(n.bodyLines,e)),{type:e(n.exceptionName)})}a(tn,"mapThrows");function nn(n,e,t){function r(){const{access_modifier:i,name:s}=n,o=n.memberModifiers.join(" ");return{__type:"code-block",language:"apex",content:[`${i} ${o} ${s}`.replace(/ {2}/g," ")]}}return a(r,"buildSignature"),{headingLevel:t,doc:ee(n,e,t+1),heading:n.name,type:{headingLevel:t+1,heading:"Type",value:e(n.typeReference.rawDeclaration)},inherited:n.inherited,accessModifier:n.access_modifier,signature:{headingLevel:t+1,heading:"Signature",value:r()}}}a(nn,"adaptFieldOrProperty");var kr=Object.defineProperty,qr=Object.defineProperties,Wr=Object.getOwnPropertyDescriptors,rn=Object.getOwnPropertySymbols,Vr=Object.prototype.hasOwnProperty,Ur=Object.prototype.propertyIsEnumerable,sn=a((n,e,t)=>e in n?kr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp$2"),R=a((n,e)=>{for(var t in e||(e={}))Vr.call(e,t)&&sn(n,t,e[t]);if(rn)for(var t of rn(e))Ur.call(e,t)&&sn(n,t,e[t]);return n},"__spreadValues$2"),j=a((n,e)=>qr(n,Wr(e)),"__spreadProps$1");function Xr(n,e,t){function r(){switch(n.type_name){case"enum":return an(n,e);case"interface":return on(n,e);case"class":return cn(n,e)}}return a(r,"getRenderable"),j(R({},r()),{namespace:t})}a(Xr,"typeToRenderable");function Ne(n,e,t){function r(i){const s={class:"Class",interface:"Interface",enum:"Enum"};return`${i.name} ${s[i.type_name]}`}return a(r,"getHeading"),{headingLevel:t,heading:r(n),doc:ee(n,e,t+1),name:n.name,meta:{accessModifier:n.access_modifier}}}a(Ne,"baseTypeAdapter");function an(n,e,t=1){return j(R({type:"enum"},Ne(n,e,t)),{values:{headingLevel:t+1,heading:"Values",value:n.values.map(r=>{var i;return j(R({},L((i=r.docComment)==null?void 0:i.descriptionLines,e)),{value:r.name})})}})}a(an,"enumTypeToEnumSource");function on(n,e,t=1){return j(R({type:"interface"},Ne(n,e,t)),{extends:n.extended_interfaces.map(e),methods:{headingLevel:t+1,heading:"Methods",value:n.methods.map(r=>Kt(r,e,t+2))}})}a(on,"interfaceTypeToInterfaceSource");function cn(n,e,t=1){return j(R({type:"class"},Ne(n,e,t)),{classModifier:n.classModifier,sharingModifier:n.sharingModifier,implements:n.implemented_interfaces.map(e),extends:n.inheritanceChain.map(e),methods:te("Methods",n.methods,Kt,e,t+1),constructors:te("Constructors",n.constructors,(r,i,s)=>zr(n.name,r,i,s),e,t+1),fields:te("Fields",n.fields,nn,e,t+1),properties:te("Properties",n.properties,nn,e,t+1),innerClasses:{headingLevel:t+1,heading:"Classes",value:n.classes.map(r=>cn(j(R({},r),{inheritanceChain:[]}),e,t+2))},innerEnums:{headingLevel:t+1,heading:"Enums",value:n.enums.map(r=>an(r,e,t+2))},innerInterfaces:{headingLevel:t+1,heading:"Interfaces",value:n.interfaces.map(r=>on(r,e,t+2))}})}a(cn,"classTypeToClassSource");function te(n,e,t,r,i){return{headingLevel:i,heading:n,isGrouped:ln(e),value:ln(e)?Hr(e,t,r,i+1):dn(e,t,r,i+1)}}a(te,"adaptMembers");function ln(n){return n.some(e=>e.group)}a(ln,"hasGroup");function dn(n,e,t,r){return n.map(i=>e(i,t,r))}a(dn,"toFlat");function Hr(n,e,t,r){const i=Yr(n);return Object.entries(i).map(([s,o])=>Zr(r,s,e,o,t))}a(Hr,"toGroupedMembers");function Yr(n){return n.reduce((e,t)=>{var r,i;const s=(r=t.group)!=null?r:"Other";return e[s]=(i=e[s])!=null?i:[],e[s].push(t),e},{})}a(Yr,"groupByGroupName");function Zr(n,e,t,r,i){return{headingLevel:n,heading:e,groupDescription:r[0].groupDescription,value:dn(r,t,i,n+1)}}a(Zr,"singleGroup");const Jr=`
|
|
17
|
+
{{#> documentablePartialTemplate}}
|
|
18
|
+
|
|
19
|
+
{{#if doc.group}}
|
|
20
|
+
**Group** {{doc.group}}
|
|
21
|
+
{{/if}}
|
|
22
|
+
|
|
23
|
+
{{#if doc.author}}
|
|
24
|
+
**Author** {{doc.author}}
|
|
25
|
+
{{/if}}
|
|
26
|
+
|
|
27
|
+
{{#if doc.date}}
|
|
28
|
+
**Date** {{doc.date}}
|
|
29
|
+
{{/if}}
|
|
30
|
+
|
|
31
|
+
{{#each doc.sees}}
|
|
32
|
+
**See** {{link this}}
|
|
33
|
+
|
|
34
|
+
{{/each}}
|
|
35
|
+
|
|
36
|
+
{{#if namespace}}
|
|
37
|
+
## Namespace
|
|
38
|
+
{{namespace}}
|
|
39
|
+
{{/if}}
|
|
40
|
+
|
|
41
|
+
{{/documentablePartialTemplate}}
|
|
42
|
+
`.trim(),Qr=`
|
|
43
|
+
{{#each doc.annotations}}
|
|
44
|
+
\`{{this}}\`
|
|
45
|
+
{{/each}}
|
|
46
|
+
|
|
47
|
+
{{{renderContent doc.description}}}
|
|
48
|
+
|
|
49
|
+
{{#each doc.customTags}}
|
|
50
|
+
**{{splitAndCapitalize name}}**
|
|
51
|
+
|
|
52
|
+
{{{renderContent description}}}
|
|
53
|
+
|
|
54
|
+
{{/each}}
|
|
55
|
+
|
|
56
|
+
{{> @partial-block}}
|
|
57
|
+
|
|
58
|
+
{{#if doc.mermaid.value}}
|
|
59
|
+
{{ heading doc.mermaid.headingLevel doc.mermaid.heading }}
|
|
60
|
+
{{code doc.mermaid.value}}
|
|
61
|
+
{{/if}}
|
|
62
|
+
|
|
63
|
+
{{#if doc.example.value}}
|
|
64
|
+
{{ heading doc.example.headingLevel doc.example.heading }}
|
|
65
|
+
{{code doc.example.value}}
|
|
66
|
+
{{/if}}
|
|
67
|
+
`.trim(),Kr=`
|
|
68
|
+
{{ heading headingLevel heading }}
|
|
69
|
+
{{#each value}}
|
|
70
|
+
{{{ heading headingLevel (inlineCode heading) }}}
|
|
71
|
+
|
|
72
|
+
{{#if inherited}}
|
|
73
|
+
*Inherited*
|
|
74
|
+
{{/if}}
|
|
75
|
+
|
|
76
|
+
{{#> documentablePartialTemplate}}
|
|
77
|
+
|
|
78
|
+
{{ heading signature.headingLevel signature.heading }}
|
|
79
|
+
{{ code signature.value }}
|
|
80
|
+
|
|
81
|
+
{{#if parameters.value}}
|
|
82
|
+
{{ heading parameters.headingLevel parameters.heading }}
|
|
83
|
+
| Name | Type | Description |
|
|
84
|
+
|------|------|-------------|
|
|
85
|
+
{{#each parameters.value}}
|
|
86
|
+
| {{name}} | {{link type}} | {{{renderContent description}}} |
|
|
87
|
+
{{/each}}
|
|
88
|
+
{{/if}}
|
|
89
|
+
|
|
90
|
+
{{ heading returnType.headingLevel returnType.heading }}
|
|
91
|
+
**{{link returnType.value.type}}**
|
|
92
|
+
|
|
93
|
+
{{#if returnType.value.description}}
|
|
94
|
+
{{returnType.value.description}}
|
|
95
|
+
{{/if}}
|
|
96
|
+
|
|
97
|
+
{{#if throws.value}}
|
|
98
|
+
{{ heading throws.headingLevel throws.heading }}
|
|
99
|
+
{{#each throws.value}}
|
|
100
|
+
{{link this.type}}: {{this.description}}
|
|
101
|
+
|
|
102
|
+
{{/each}}
|
|
103
|
+
{{/if}}
|
|
104
|
+
{{/documentablePartialTemplate}}
|
|
105
|
+
|
|
106
|
+
{{#unless @last}}---{{/unless}}
|
|
107
|
+
|
|
108
|
+
{{/each}}
|
|
109
|
+
`.trim(),ei=`
|
|
110
|
+
{{ heading headingLevel heading }}
|
|
111
|
+
{{#each value}}
|
|
112
|
+
{{{ heading headingLevel (inlineCode heading) }}}
|
|
113
|
+
|
|
114
|
+
{{#> documentablePartialTemplate}}
|
|
115
|
+
|
|
116
|
+
{{ heading signature.headingLevel signature.heading }}
|
|
117
|
+
{{ code signature.value }}
|
|
118
|
+
|
|
119
|
+
{{#if parameters.value}}
|
|
120
|
+
{{ heading parameters.headingLevel parameters.heading }}
|
|
121
|
+
| Name | Type | Description |
|
|
122
|
+
|------|------|-------------|
|
|
123
|
+
{{#each parameters.value}}
|
|
124
|
+
| {{name}} | {{type}} | {{description}} |
|
|
125
|
+
{{/each}}
|
|
126
|
+
{{/if}}
|
|
127
|
+
|
|
128
|
+
{{#if throws.value}}
|
|
129
|
+
{{ heading throws.headingLevel throws.heading }}
|
|
130
|
+
{{#each throws.value}}
|
|
131
|
+
{{link this.type}}: {{this.description}}
|
|
132
|
+
|
|
133
|
+
{{/each}}
|
|
134
|
+
{{/if}}
|
|
135
|
+
{{/documentablePartialTemplate}}
|
|
136
|
+
|
|
137
|
+
{{#unless @last}}---{{/unless}}
|
|
138
|
+
|
|
139
|
+
{{/each}}
|
|
140
|
+
`.trim(),ti=`
|
|
141
|
+
{{ heading headingLevel heading }}
|
|
142
|
+
{{#each value}}
|
|
143
|
+
{{{ heading headingLevel (inlineCode heading) }}}
|
|
144
|
+
|
|
145
|
+
{{#if inherited}}
|
|
146
|
+
*Inherited*
|
|
147
|
+
{{/if}}
|
|
148
|
+
|
|
149
|
+
{{#> documentablePartialTemplate }}
|
|
150
|
+
|
|
151
|
+
{{ heading signature.headingLevel signature.heading }}
|
|
152
|
+
{{ code signature.value }}
|
|
153
|
+
|
|
154
|
+
{{ heading type.headingLevel type.heading }}
|
|
155
|
+
{{link type.value}}
|
|
156
|
+
|
|
157
|
+
{{/documentablePartialTemplate}}
|
|
158
|
+
|
|
159
|
+
{{#unless @last}}---{{/unless}}
|
|
160
|
+
|
|
161
|
+
{{/each}}
|
|
162
|
+
`.trim(),pn=`
|
|
163
|
+
{{ heading headingLevel heading }}
|
|
164
|
+
{{#if classModifier}}
|
|
165
|
+
\`{{classModifier}}\`
|
|
166
|
+
{{/if}}
|
|
167
|
+
|
|
168
|
+
{{> typeDocumentation}}
|
|
169
|
+
|
|
170
|
+
{{#if extends.length}}
|
|
171
|
+
**Inheritance**
|
|
172
|
+
{{#each extends}}{{link this}}{{#unless @last}} < {{/unless}}{{/each}}
|
|
173
|
+
{{/if}}
|
|
174
|
+
|
|
175
|
+
{{#if implements}}
|
|
176
|
+
**Implements**
|
|
177
|
+
{{#each implements}}
|
|
178
|
+
{{link this}}{{#unless @last}}, {{/unless}}
|
|
179
|
+
{{/each}}
|
|
180
|
+
{{/if}}
|
|
181
|
+
|
|
182
|
+
{{#if fields.value}}
|
|
183
|
+
{{#if fields.isGrouped}}
|
|
184
|
+
{{> groupedMembersPartialTemplate fields subTemplate="fieldsPartialTemplate"}}
|
|
185
|
+
{{else}}
|
|
186
|
+
{{> fieldsPartialTemplate fields}}
|
|
187
|
+
{{/if}}
|
|
188
|
+
{{/if}}
|
|
189
|
+
|
|
190
|
+
{{#if properties.value}}
|
|
191
|
+
{{#if properties.isGrouped}}
|
|
192
|
+
{{> groupedMembersPartialTemplate properties subTemplate="fieldsPartialTemplate"}}
|
|
193
|
+
{{else}}
|
|
194
|
+
{{> fieldsPartialTemplate properties}}
|
|
195
|
+
{{/if}}
|
|
196
|
+
{{/if}}
|
|
197
|
+
|
|
198
|
+
{{#if constructors.value}}
|
|
199
|
+
{{#if constructors.isGrouped}}
|
|
200
|
+
{{> groupedMembersPartialTemplate constructors subTemplate="constructorsPartialTemplate"}}
|
|
201
|
+
{{else}}
|
|
202
|
+
{{> constructorsPartialTemplate constructors}}
|
|
203
|
+
{{/if}}
|
|
204
|
+
{{/if}}
|
|
205
|
+
|
|
206
|
+
{{#if methods.value}}
|
|
207
|
+
{{#if methods.isGrouped}}
|
|
208
|
+
{{> groupedMembersPartialTemplate methods subTemplate="methodsPartialTemplate"}}
|
|
209
|
+
{{else}}
|
|
210
|
+
{{> methodsPartialTemplate methods}}
|
|
211
|
+
{{/if}}
|
|
212
|
+
{{/if}}
|
|
213
|
+
|
|
214
|
+
{{#if innerClasses.value}}
|
|
215
|
+
{{ heading innerClasses.headingLevel innerClasses.heading }}
|
|
216
|
+
{{#each innerClasses.value}}
|
|
217
|
+
{{> classTemplate this}}
|
|
218
|
+
{{/each}}
|
|
219
|
+
{{/if}}
|
|
220
|
+
|
|
221
|
+
{{#if innerEnums.value}}
|
|
222
|
+
{{ heading innerEnums.headingLevel innerEnums.heading }}
|
|
223
|
+
{{#each innerEnums.value}}
|
|
224
|
+
{{> enumTemplate this}}
|
|
225
|
+
{{/each}}
|
|
226
|
+
{{/if}}
|
|
227
|
+
|
|
228
|
+
{{#if innerInterfaces.value}}
|
|
229
|
+
{{ heading innerInterfaces.headingLevel innerInterfaces.heading }}
|
|
230
|
+
{{#each innerInterfaces.value}}
|
|
231
|
+
{{> interfaceTemplate this}}
|
|
232
|
+
{{/each}}
|
|
233
|
+
{{/if}}
|
|
234
|
+
`.trim(),un=`
|
|
235
|
+
{{ heading headingLevel heading }}
|
|
236
|
+
|
|
237
|
+
{{> typeDocumentation }}
|
|
238
|
+
|
|
239
|
+
{{ heading values.headingLevel values.heading }}
|
|
240
|
+
| Value | Description |
|
|
241
|
+
|-------|-------------|
|
|
242
|
+
{{#each values.value}}
|
|
243
|
+
| {{value}} | {{description}} |
|
|
244
|
+
{{/each}}
|
|
245
|
+
`.trim(),fn=`
|
|
246
|
+
{{ heading headingLevel heading }}
|
|
247
|
+
|
|
248
|
+
{{> typeDocumentation }}
|
|
249
|
+
|
|
250
|
+
{{#if extends}}
|
|
251
|
+
**Extends**
|
|
252
|
+
{{#each extends}}
|
|
253
|
+
{{link this}}{{#unless @last}}, {{/unless}}
|
|
254
|
+
{{/each}}
|
|
255
|
+
{{/if}}
|
|
256
|
+
|
|
257
|
+
{{#if methods}}
|
|
258
|
+
{{> methodsPartialTemplate methods}}
|
|
259
|
+
{{/if}}
|
|
260
|
+
`.trim(),ni=`
|
|
261
|
+
{{ heading headingLevel heading }}
|
|
262
|
+
{{#each value}}
|
|
263
|
+
{{> (lookup .. "subTemplate") this}}
|
|
264
|
+
{{/each}}
|
|
265
|
+
`.trim(),D=class D{constructor(){g.registerPartial("typeDocumentation",Jr),g.registerPartial("documentablePartialTemplate",Qr),g.registerPartial("methodsPartialTemplate",Kr),g.registerPartial("constructorsPartialTemplate",ei),g.registerPartial("groupedMembersPartialTemplate",ni),g.registerPartial("fieldsPartialTemplate",ti),g.registerPartial("classTemplate",pn),g.registerPartial("enumTemplate",un),g.registerPartial("interfaceTemplate",fn),g.registerHelper("link",mn),g.registerHelper("code",hn),g.registerHelper("renderContent",ai),g.registerHelper("heading",ii),g.registerHelper("inlineCode",si),g.registerHelper("splitAndCapitalize",ri)}static getInstance(){return D.instance||(D.instance=new D),D.instance}compile(e){return g.compile(e.template)(e.source).trim().replace(/\n{3,}/g,`
|
|
266
|
+
|
|
267
|
+
`)}};a(D,"Template");let Me=D;const ri=a(n=>{const e=n.split(/[-_]+/),t=[];for(const r of e)t.push(r.charAt(0).toUpperCase()+r.slice(1));return t.join(" ")},"splitAndCapitalize"),ii=a((n,e)=>`${"#".repeat(n)} ${e}`,"heading"),si=a(n=>new g.SafeString(`\`${n}\``),"inlineCode"),hn=a(n=>new g.SafeString(`
|
|
268
|
+
\`\`\`${n.language}
|
|
269
|
+
${n.content.join(`
|
|
270
|
+
`)}
|
|
271
|
+
\`\`\`
|
|
272
|
+
`.trim()),"convertCodeBlock"),ai=a(n=>{if(!n)return"";function e(t,r){return Ut(r)?t+`
|
|
273
|
+
|
|
274
|
+
`:Ir(r)?t+hn(r)+`
|
|
275
|
+
`:t+g.escapeExpression(mn(r)).trim()+" "}return a(e,"reduceDescription"),n.reduce(e,"").trim()},"resolveRenderableContent"),mn=a(n=>typeof n=="string"?n:`[${n.title}](${n.url})`,"link"),oi=`
|
|
276
|
+
# Apex Reference Guide
|
|
277
|
+
|
|
278
|
+
{{#each this}}
|
|
279
|
+
## {{@key}}
|
|
280
|
+
|
|
281
|
+
{{#each this}}
|
|
282
|
+
### {{link title}}
|
|
283
|
+
|
|
284
|
+
{{{renderContent description}}}
|
|
285
|
+
|
|
286
|
+
{{/each}}
|
|
287
|
+
{{/each}}
|
|
288
|
+
`.trim();function gn(n,e){return b.pipe(w.fromNullable(e.extended_class),w.match(()=>[],t=>ci(n,t)))}a(gn,"createInheritanceChain");function ci(n,e){return b.pipe(w.fromNullable(n.find(t=>t.name.toLowerCase()===e.toLowerCase())),w.match(()=>[e],t=>[e,...gn(n,t)]))}a(ci,"inheritanceChainFromParentClassName");var li=Object.defineProperty,di=Object.defineProperties,pi=Object.getOwnPropertyDescriptors,yn=Object.getOwnPropertySymbols,ui=Object.prototype.hasOwnProperty,fi=Object.prototype.propertyIsEnumerable,vn=a((n,e,t)=>e in n?li(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp$1"),O=a((n,e)=>{for(var t in e||(e={}))ui.call(e,t)&&vn(n,t,e[t]);if(yn)for(var t of yn(e))fi.call(e,t)&&vn(n,t,e[t]);return n},"__spreadValues$1"),F=a((n,e)=>di(n,pi(e)),"__spreadProps");const hi={scope:["public"],outputDir:"docs",defaultGroupName:"Miscellaneous",referenceGuideTemplate:oi};function mi(n,e){const t=O(O({},hi),e);return b.pipe(n,r=>r.map(i=>$i(i)),Ci,y.map(r=>_i(r,t.scope)),y.map(r=>r.map(i=>wi(i,r))),y.map(r=>r.map(i=>Ti(i,r))),y.map(r=>gi(r,t)),y.map(({references:r,renderables:i})=>({referenceGuide:b.pipe(vi(r,t.referenceGuideTemplate)),docs:i.map(s=>yi(Object.values(r).flat(),s))})),y.map(({referenceGuide:r,docs:i})=>({format:"markdown",referenceGuide:r,docs:i})))}a(mi,"generateDocs");function gi(n,e){return n.reduce((t,r)=>{var i;const s=Xr(r,d=>Ai(r,n,d,e),e.namespace);t.renderables.push(s);const o=(i=r.docComment)==null?void 0:i.descriptionLines,c={typeName:r.name,directory:ze(e,r),title:Di(e,r),description:L(o,d=>Ii(e,d,Cn(n,d))).description},l=ne(r,e);return t.references[l]||(t.references[l]=[]),t.references[l].push(c),t},{references:{},renderables:[]})}a(gi,"typesToRenderableBundle");function yi(n,e){function t(r,i){return{directory:n.find(o=>o.typeName.toLowerCase()===r.name.toLowerCase()).directory,docContents:i,typeName:r.name,type:r.type}}return a(t,"buildDocOutput"),b.pipe(e,Pi,_n,r=>t(e,r))}a(yi,"renderableToOutputDoc");function vi(n,e){function t(r){return Object.keys(r).sort((i,s)=>i.localeCompare(s)).reduce((i,s)=>(i[s]=r[s].sort((o,c)=>o.title.toString().localeCompare(c.title.toString())),i),{})}return a(t,"alphabetizeReferences"),b.pipe(n,t,r=>_n({template:e,source:r}))}a(vi,"referencesToReferenceGuide");function _i(n,e){return new z(n).filteredByAccessModifierAndAnnotations(e)}a(_i,"filterTypesOutOfScope");function Ci(n){function e(t){return t.reduce((r,i)=>(y.isLeft(i)?r.errors.push(i.left):r.types.push(i.right),r),{errors:[],types:[]})}return a(e,"reduceReflectionResultIntoSingleEither"),b.pipe(n,e,({errors:t,types:r})=>t.length?y.left(t):y.right(r))}a(Ci,"checkForReflectionErrors");function bi(n,e){return b.pipe(w.fromNullable(e),w.map(t=>(k.process(t).forEach((i,s)=>{const o=`${s}: ${i}`;n.annotations.push({rawDeclaration:o,name:o,type:o})}),n)),w.getOrElse(()=>n))}a(bi,"addFileMetadataToTypeAnnotation");const $t=class $t{constructor(e,t){this.file=e,this.message=t}};a($t,"ReflectionError");let Fe=$t;function $i(n){const{filePath:e,rawTypeContent:t,rawMetadataContent:r}=n,i=wt.reflect(t);return i.error?y.left(new Fe(e,i.error.message)):y.right(bi(i.typeMirror,r))}a($i,"reflectSourceBody");function Pi(n){function e(t){switch(t.type){case"enum":return un;case"interface":return fn;case"class":return pn}}return a(e,"getTemplate"),{template:e(n),source:n}}a(Pi,"resolveApexTypeTemplate");function _n(n){return Me.getInstance().compile(n)}a(_n,"compile");function Cn(n,e){return n.find(t=>t.name.toLowerCase()===e.toLowerCase())}a(Cn,"findType");function wi(n,e){return n.type_name==="enum"?n:n.type_name==="interface"?Li(n,e):Oi(n,e)}a(wi,"addInheritedMembers");function Ti(n,e){if(n.type_name==="enum"||n.type_name==="interface")return n;{const t=gn(e,n);return F(O({},n),{inheritanceChain:t})}}a(Ti,"addInheritanceChain");function Ge(n,e,t){return b.pipe(n(e),r=>r.map(i=>t.find(s=>s.name===i)),(r=[])=>r.filter(i=>i!==void 0),r=>r.reduce((i,s)=>[...i,...Ge(n,s,t)],r))}a(Ge,"getParents");function Li(n,e){function t(s,o){return o.some(c=>c.name.toLowerCase()===s.toLowerCase())}a(t,"methodAlreadyExists");function r(s){return s.extended_interfaces}a(r,"parentExtractor");const i=Ge(r,n,e);return F(O({},n),{methods:i.reduce((s,o)=>[...s,...o.methods.filter(c=>!t(c.name,s)).map(c=>F(O({},c),{inherited:!0}))],n.methods)})}a(Li,"addInheritedInterfaceMethods");function Oi(n,e){function t(o,c){return c.some(l=>l.name.toLowerCase()===o.toLowerCase())}a(t,"memberAlreadyExists");function r(o){return o.extended_class?[o.extended_class]:[]}a(r,"parentExtractor");function i(o,c){return o.filter(l=>l.access_modifier.toLowerCase()!=="private").filter(l=>!t(l.name,c)).map(l=>F(O({},l),{inherited:!0}))}a(i,"filterMember");const s=Ge(r,n,e);return F(O({},n),{fields:s.reduce((o,c)=>[...o,...i(c.fields,o)],n.fields),properties:s.reduce((o,c)=>[...o,...i(c.properties,o)],n.properties),methods:s.reduce((o,c)=>[...o,...i(c.methods,o)],n.methods)})}a(Oi,"addInheritedClassMembers");function Ai(n,e,t,r){const i=Cn(e,t);if(!i)return t;const[s,o]=xi(n,i,r);return{__type:"link",title:s,url:o}}a(Ai,"linkFromTypeNameGenerator");function xi(n,e,t){const r=t.namespace?`${t.namespace}.`:"",i=`${Ei(n,e,t)}`,s=`${r}${e.name}`;return[s,`${i}${s}.md`]}a(xi,"getFileLinkTuple");function ze(n,e){return e?`./${bn(e,n)}`:""}a(ze,"getDirectoryFromRoot");function Ii(n,e,t){if(!t)return e;const i=`${n.namespace?`${n.namespace}.`:""}${t.name}`;return{__type:"link",title:i,url:`${ze(n,t)}/${i}.md`}}a(Ii,"getPossibleLinkFromRoot");function Di(n,e){const r=`${n.namespace?`${n.namespace}.`:""}${e.name}`;return{__type:"link",title:r,url:`${ze(n,e)}/${r}.md`}}a(Di,"getLinkFromRoot");function Ei(n,e,t){return ne(n,t)===ne(e,t)?"./":`../${bn(e,t)}/`}a(Ei,"getDirectoryRoot");function ne(n,e){var t,r;const i=(t=n.docComment)==null?void 0:t.annotations.find(s=>s.name.toLowerCase()==="group");return(r=i==null?void 0:i.body)!=null?r:e.defaultGroupName}a(ne,"getTypeGroup");function bn(n,e){return ne(n,e).replace(/ /g,"-").replace(".","")}a(bn,"getSanitizedGroup");const Si=b.flow(Ri,y.map(ji),y.map(Bi),y.mapLeft(n=>{const e=["Error(s) occurred while parsing files. Please review the following issues:",...n.map(Ni)].join(`
|
|
289
|
+
`);p.error(e)}));function Ri(n){return mi(n,{scope:u.getInstance().scope,outputDir:u.getInstance().outputDir,namespace:u.getInstance().getNamespace(),sortMembersAlphabetically:u.getInstance().sortMembersAlphabetically(),defaultGroupName:u.getInstance().getDefaultGroupName()})}a(Ri,"generateDocumentationBundle");function ji(n){return[new S("index","").addText(n.referenceGuide),...n.docs.map(e=>new S(`${u.getInstance().getNamespacePrefix()}${e.typeName}`,e.directory).addText(e.docContents))]}a(ji,"convertToMarkdownFiles");function Bi(n){W.write(n,e=>{p.logSingle(`${e.name} processed.`,!1,"green",!1)})}a(Bi,"writeFilesToSystem");function Ni(n){return`Source file: ${n.file}
|
|
290
|
+
${n.message}
|
|
291
|
+
`}a(Ni,"formatReflectionError");const Pt=class Pt{static generate(e){p.logSingle("Initializing...",!1),this.initializeSettings(e);const t=le.processFiles(new de);if(u.getInstance().targetGenerator==="plain-markdown")Si(t);else{const r=zn(new me(t),this._reflectionWithLogger);$.getInstance().populateAll(r.types);const i=this.filterByScopes(r);$.getInstance().populateScoped(i);const s=K.get(u.getInstance().targetGenerator);ge.generate(i,s);const o=s.fileBuilder().files(),c=[];W.write(o,l=>{p.logSingle(`${l.name} processed.`,!1,"green",!1),c.push(l)}),u.getInstance().onAfterProcess(c),ye.logErrors(i)}}static initializeSettings(e){const t=e.targetGenerator;u.build({sourceDirectory:e.sourceDir,recursive:e.recursive,scope:e.scope,outputDir:e.targetDir,targetGenerator:t,indexOnly:e.indexOnly,defaultGroupName:e.defaultGroupName,sanitizeHtml:e.sanitizeHtml,openApiTitle:e.openApiTitle,title:e.title,namespace:e.namespace,openApiFileName:e.openApiFileName,sortMembersAlphabetically:e.sortMembersAlphabetically,includeMetadata:e.includeMetadata,rootDir:e.documentationRootDir,onAfterProcess:e.onAfterProcess,onBeforeFileWrite:e.onBeforeFileWrite,frontMatterHeader:e.frontMatterHeader,linkingStrategy:t==="plain-markdown"?"path-relative":K.get(t).getLinkingStrategy()})}static filterByScopes(e){let t,r;return u.getInstance().config.targetGenerator!=="openapi"?(t=e.filteredByAccessModifierAndAnnotations(u.getInstance().scope),r=`Filtered ${e.types.length-t.length} file(s) based on scope: ${u.getInstance().scope}`):(t=e.filteredByAccessModifierAndAnnotations(["restresource","httpdelete","httpget","httppatch","httppost","httpput"]),r=`Filtered ${e.types.length-t.length} file(s), only keeping classes annotated as @RestResource.`),p.clear(),p.logSingle(r,!1,"green",!1),p.logSingle(`Creating documentation for ${t.length} file(s)`,!1,"green",!1),t}};a(Pt,"Apexdocs");let re=Pt;re._reflectionWithLogger=n=>{var e;const t=wt.reflect(n.rawTypeContent);return t.error&&p.error(`${n.filePath} - Parsing error ${(e=t.error)==null?void 0:e.message}`),t};var Mi=Object.defineProperty,$n=Object.getOwnPropertySymbols,Fi=Object.prototype.hasOwnProperty,Gi=Object.prototype.propertyIsEnumerable,Pn=a((n,e,t)=>e in n?Mi(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp"),wn=a((n,e)=>{for(var t in e||(e={}))Fi.call(e,t)&&Pn(n,t,e[t]);if($n)for(var t of $n(e))Gi.call(e,t)&&Pn(n,t,e[t]);return n},"__spreadValues"),zi=a((n,e,t)=>new Promise((r,i)=>{var s=a(l=>{try{c(t.next(l))}catch(d){i(d)}},"fulfilled"),o=a(l=>{try{c(t.throw(l))}catch(d){i(d)}},"rejected"),c=a(l=>l.done?r(l.value):Promise.resolve(l.value).then(s,o),"step");c((t=t.apply(n,e)).next())}),"__async");function ki(){return En.cosmiconfig("apexdocs").search()}a(ki,"_extractConfig");function qi(n){return Rn.config(n==null?void 0:n.config).options({sourceDir:{type:"string",alias:"s",demandOption:!0,describe:"The directory location which contains your apex .cls classes."},targetDir:{type:"string",alias:"t",default:"./docs/",describe:"The directory location where documentation will be generated to."},recursive:{type:"boolean",alias:"r",default:!0,describe:"Whether .cls classes will be searched for recursively in the directory provided."},scope:{type:"string",array:!0,alias:"p",default:["global"],describe:"A list of scopes to document. Values should be separated by a space, e.g --scope global public namespaceaccessible. Annotations are supported and should be passed lowercased and without the @ symbol, e.g. namespaceaccessible auraenabled. Note that this setting is ignored if generating an OpenApi REST specification since that looks for classes annotated with @RestResource."},targetGenerator:{type:"string",alias:"g",default:"jekyll",choices:["jekyll","docsify","plain-markdown","openapi"],describe:"Define the static file generator for which the documents will be created. Currently supports jekyll, docsify, plain markdown, and OpenAPI v3.1.0."},indexOnly:{type:"boolean",default:!1,describe:"Defines whether only the index file should be generated."},defaultGroupName:{type:"string",default:"Miscellaneous",describe:"Defines the @group name to be used when a file does not specify it."},sanitizeHtml:{type:"boolean",default:!0,describe:'When on, any special character within your ApexDocs is converted into its HTML code representation. This is specially useful when generic objects are described within the docs, e.g. "List< Foo>", "Map<Foo, Bar>" because otherwise the content within < and > would be treated as HTML tags and not shown in the output. Content in @example blocks are never sanitized.'},openApiTitle:{type:"string",default:"Apex REST Api",describe:'If using "openapi" as the target generator, this allows you to specify the OpenApi title value.'},title:{type:"string",describe:"If this allows you to specify the title of the generated documentation's home file.",default:"Classes"},namespace:{type:"string",describe:"The package namespace, if any. If this value is provided the namespace will be added as a prefix to all of the parsed files. If generating an OpenApi definition, it will be added to the file's Server Url."},openApiFileName:{type:"string",describe:'If using "openapi" as the target generator, this allows you to specify the name of the output file.',default:"openapi"},sortMembersAlphabetically:{type:"boolean",describe:"Whether to sort members alphabetically.",default:!1},includeMetadata:{type:"boolean",describe:"Whether to include the file's meta.xml information: Whether it is active and and the API version",default:!1},documentationRootDir:{type:"string",describe:"Allows you to specify the root documentation directory where the files are being generated. This can be helpful when embedding the generated docs into an existing site so that the links are generated correctly."}}).parseSync()}a(qi,"_extractYargs");function Wi(){return zi(this,null,function*(){const n=yield ki(),e=qi(n);return wn(wn({},n==null?void 0:n.config),e)})}a(Wi,"extractArgs");function Vi(){Wi().then(n=>{re.generate(n)}).catch(n=>{console.error(n),process.exit(1)})}a(Vi,"main"),Vi();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/cli/generate.ts"],"names":[],"mappings":";;;AACA,sDAAmD;AACnD,iCAAqC;AAErC,SAAS,IAAI;IACX,IAAA,kBAAW,GAAE;SACV,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;QACf,mBAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ClassMirrorBuilder_1 = require("../../test-helpers/ClassMirrorBuilder");
|
|
4
|
+
const inheritance_chain_1 = require("../inheritance-chain");
|
|
5
|
+
describe('inheritance chain for classes', () => {
|
|
6
|
+
test('returns an empty list of the class does not extend any other class', () => {
|
|
7
|
+
const classMirror = new ClassMirrorBuilder_1.ClassMirrorBuilder().build();
|
|
8
|
+
const repository = [classMirror];
|
|
9
|
+
const inheritanceChain = (0, inheritance_chain_1.createInheritanceChain)(repository, classMirror);
|
|
10
|
+
expect(inheritanceChain).toEqual([]);
|
|
11
|
+
});
|
|
12
|
+
test('returns the name of the extended class if it is not found in the repository', () => {
|
|
13
|
+
const classMirror = new ClassMirrorBuilder_1.ClassMirrorBuilder().withExtendedClass('ExtendedClass').build();
|
|
14
|
+
const repository = [classMirror];
|
|
15
|
+
const inheritanceChain = (0, inheritance_chain_1.createInheritanceChain)(repository, classMirror);
|
|
16
|
+
expect(inheritanceChain).toEqual(['ExtendedClass']);
|
|
17
|
+
});
|
|
18
|
+
test('returns the extended class when it is present in the repository', () => {
|
|
19
|
+
const classMirror = new ClassMirrorBuilder_1.ClassMirrorBuilder().withExtendedClass('ExtendedClass').build();
|
|
20
|
+
const extendedClass = new ClassMirrorBuilder_1.ClassMirrorBuilder().withName('ExtendedClass').build();
|
|
21
|
+
const repository = [classMirror, extendedClass];
|
|
22
|
+
const inheritanceChain = (0, inheritance_chain_1.createInheritanceChain)(repository, classMirror);
|
|
23
|
+
expect(inheritanceChain).toEqual(['ExtendedClass']);
|
|
24
|
+
});
|
|
25
|
+
test('returns the full inheritance chain when the extended class is also extended', () => {
|
|
26
|
+
const classMirror = new ClassMirrorBuilder_1.ClassMirrorBuilder().withExtendedClass('ExtendedClass').build();
|
|
27
|
+
const extendedClass = new ClassMirrorBuilder_1.ClassMirrorBuilder().withName('ExtendedClass').withExtendedClass('SuperClass').build();
|
|
28
|
+
const superClass = new ClassMirrorBuilder_1.ClassMirrorBuilder().withName('SuperClass').build();
|
|
29
|
+
const repository = [classMirror, extendedClass, superClass];
|
|
30
|
+
const inheritanceChain = (0, inheritance_chain_1.createInheritanceChain)(repository, classMirror);
|
|
31
|
+
expect(inheritanceChain).toEqual(['ExtendedClass', 'SuperClass']);
|
|
32
|
+
});
|
|
33
|
+
test('returns the inheritance for a class that extends an inner class', () => {
|
|
34
|
+
const classMirror = new ClassMirrorBuilder_1.ClassMirrorBuilder().withExtendedClass('OuterClass.InnerClass').build();
|
|
35
|
+
const innerClass = new ClassMirrorBuilder_1.ClassMirrorBuilder().withName('InnerClass').build();
|
|
36
|
+
const outerClass = new ClassMirrorBuilder_1.ClassMirrorBuilder().withName('OuterClass').addInnerClass(innerClass).build();
|
|
37
|
+
const repository = [classMirror, outerClass];
|
|
38
|
+
const inheritanceChain = (0, inheritance_chain_1.createInheritanceChain)(repository, classMirror);
|
|
39
|
+
expect(inheritanceChain).toEqual(['OuterClass.InnerClass']);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=inheritance-chain.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inheritance-chain.test.js","sourceRoot":"","sources":["../../../src/core/__test__/inheritance-chain.test.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ClassMirror, InterfaceMirror, Type } from '@cparra/apex-reflection';
|
|
2
|
+
import { RenderableClass, RenderableEnum, RenderableInterface } from './types';
|
|
3
|
+
import { GetRenderableContentByTypeName } from './references';
|
|
4
|
+
type GetReturnRenderable<T extends Type> = T extends InterfaceMirror ? RenderableInterface : T extends ClassMirror ? RenderableClass : RenderableEnum;
|
|
5
|
+
export declare function typeToRenderable<T extends Type>(type: T, linkGenerator: GetRenderableContentByTypeName, namespace?: string): GetReturnRenderable<T>;
|
|
6
|
+
export {};
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.enumTypeToEnumSource = enumTypeToEnumSource;
|
|
5
|
-
exports.interfaceTypeToInterfaceSource = interfaceTypeToInterfaceSource;
|
|
6
|
-
exports.classTypeToClassSource = classTypeToClassSource;
|
|
3
|
+
exports.typeToRenderable = void 0;
|
|
7
4
|
const documentables_1 = require("./documentables");
|
|
8
|
-
const references_1 = require("./references");
|
|
9
5
|
const methods_and_constructors_1 = require("./methods-and-constructors");
|
|
10
6
|
const fields_and_properties_1 = require("./fields-and-properties");
|
|
7
|
+
function typeToRenderable(type, linkGenerator, namespace) {
|
|
8
|
+
function getRenderable() {
|
|
9
|
+
switch (type.type_name) {
|
|
10
|
+
case 'enum':
|
|
11
|
+
return enumTypeToEnumSource(type, linkGenerator);
|
|
12
|
+
case 'interface':
|
|
13
|
+
return interfaceTypeToInterfaceSource(type, linkGenerator);
|
|
14
|
+
case 'class':
|
|
15
|
+
return classTypeToClassSource(type, linkGenerator);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return Object.assign(Object.assign({}, getRenderable()), { namespace });
|
|
19
|
+
}
|
|
20
|
+
exports.typeToRenderable = typeToRenderable;
|
|
11
21
|
function baseTypeAdapter(type, linkGenerator, baseHeadingLevel) {
|
|
12
22
|
function getHeading(type) {
|
|
13
23
|
const suffixMap = {
|
|
@@ -27,19 +37,6 @@ function baseTypeAdapter(type, linkGenerator, baseHeadingLevel) {
|
|
|
27
37
|
},
|
|
28
38
|
};
|
|
29
39
|
}
|
|
30
|
-
function typeToRenderableType(type, linkGenerator, namespace) {
|
|
31
|
-
function getRenderable() {
|
|
32
|
-
switch (type.type_name) {
|
|
33
|
-
case 'enum':
|
|
34
|
-
return enumTypeToEnumSource(type, linkGenerator);
|
|
35
|
-
case 'interface':
|
|
36
|
-
return interfaceTypeToInterfaceSource(type, linkGenerator);
|
|
37
|
-
case 'class':
|
|
38
|
-
return classTypeToClassSource(type, linkGenerator);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return Object.assign(Object.assign({}, getRenderable()), { namespace });
|
|
42
|
-
}
|
|
43
40
|
function enumTypeToEnumSource(enumType, linkGenerator, baseHeadingLevel = 1) {
|
|
44
41
|
return Object.assign(Object.assign({ type: 'enum' }, baseTypeAdapter(enumType, linkGenerator, baseHeadingLevel)), { values: {
|
|
45
42
|
headingLevel: baseHeadingLevel + 1,
|
|
@@ -51,17 +48,17 @@ function enumTypeToEnumSource(enumType, linkGenerator, baseHeadingLevel = 1) {
|
|
|
51
48
|
} });
|
|
52
49
|
}
|
|
53
50
|
function interfaceTypeToInterfaceSource(interfaceType, linkGenerator, baseHeadingLevel = 1) {
|
|
54
|
-
return Object.assign(Object.assign({ type: 'interface' }, baseTypeAdapter(interfaceType, linkGenerator, baseHeadingLevel)), { extends: interfaceType.extended_interfaces.map(
|
|
51
|
+
return Object.assign(Object.assign({ type: 'interface' }, baseTypeAdapter(interfaceType, linkGenerator, baseHeadingLevel)), { extends: interfaceType.extended_interfaces.map(linkGenerator), methods: {
|
|
55
52
|
headingLevel: baseHeadingLevel + 1,
|
|
56
53
|
heading: 'Methods',
|
|
57
54
|
value: interfaceType.methods.map((method) => (0, methods_and_constructors_1.adaptMethod)(method, linkGenerator, baseHeadingLevel + 2)),
|
|
58
55
|
} });
|
|
59
56
|
}
|
|
60
57
|
function classTypeToClassSource(classType, linkGenerator, baseHeadingLevel = 1) {
|
|
61
|
-
return Object.assign(Object.assign({ type: 'class' }, baseTypeAdapter(classType, linkGenerator, baseHeadingLevel)), { classModifier: classType.classModifier, sharingModifier: classType.sharingModifier, implements: classType.implemented_interfaces.map(
|
|
58
|
+
return Object.assign(Object.assign({ type: 'class' }, baseTypeAdapter(classType, linkGenerator, baseHeadingLevel)), { classModifier: classType.classModifier, sharingModifier: classType.sharingModifier, implements: classType.implemented_interfaces.map(linkGenerator), extends: classType.inheritanceChain.map(linkGenerator), methods: adaptMembers('Methods', classType.methods, methods_and_constructors_1.adaptMethod, linkGenerator, baseHeadingLevel + 1), constructors: adaptMembers('Constructors', classType.constructors, (constructor, linkGenerator, baseHeadingLevel) => (0, methods_and_constructors_1.adaptConstructor)(classType.name, constructor, linkGenerator, baseHeadingLevel), linkGenerator, baseHeadingLevel + 1), fields: adaptMembers('Fields', classType.fields, fields_and_properties_1.adaptFieldOrProperty, linkGenerator, baseHeadingLevel + 1), properties: adaptMembers('Properties', classType.properties, fields_and_properties_1.adaptFieldOrProperty, linkGenerator, baseHeadingLevel + 1), innerClasses: {
|
|
62
59
|
headingLevel: baseHeadingLevel + 1,
|
|
63
60
|
heading: 'Classes',
|
|
64
|
-
value: classType.classes.map((innerClass) => classTypeToClassSource(innerClass, linkGenerator, baseHeadingLevel + 2)),
|
|
61
|
+
value: classType.classes.map((innerClass) => classTypeToClassSource(Object.assign(Object.assign({}, innerClass), { inheritanceChain: [] }), linkGenerator, baseHeadingLevel + 2)),
|
|
65
62
|
}, innerEnums: {
|
|
66
63
|
headingLevel: baseHeadingLevel + 1,
|
|
67
64
|
heading: 'Enums',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apex-types.js","sourceRoot":"","sources":["../../../src/core/adapters/apex-types.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RenderableDocumentation, RenderableContent } from '
|
|
1
|
+
import { RenderableDocumentation, RenderableContent } from './types';
|
|
2
2
|
import { Describable, Documentable } from './types';
|
|
3
3
|
import { GetRenderableContentByTypeName } from './references';
|
|
4
4
|
export declare function adaptDescribable(describable: Describable, linkGenerator: GetRenderableContentByTypeName): {
|