@cparra/apexdocs 2.25.0-alpha.3 → 2.25.0-alpha.4
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/dist/cli/generate.js +26 -26
- package/examples/plain-markdown/docs/Miscellaneous/ns.Url.md +320 -0
- package/examples/plain-markdown/docs/index.md +82 -0
- package/examples/plain-markdown/force-app/classes/Url.cls +194 -0
- package/examples/plain-markdown/package.json +2 -1
- package/package.json +1 -1
- package/src/application/Apexdocs.ts +0 -2
- package/src/cli/args.ts +3 -1
- package/src/cli/generate.ts +1 -3
- package/src/core/adapters/__tests__/documentables.spec.ts +109 -0
- package/src/core/adapters/__tests__/references.spec.ts +12 -1
- package/src/core/adapters/apex-types.ts +1 -1
- package/src/core/adapters/documentables.ts +2 -62
- package/src/core/adapters/fields-and-properties.ts +7 -2
- package/src/core/adapters/{references.ts → inline.ts} +43 -10
- package/src/core/adapters/methods-and-constructors.ts +7 -2
- package/src/core/adapters/type-utils.ts +5 -1
- package/src/core/adapters/types.d.ts +8 -1
- package/src/core/template.ts +4 -1
- package/src/service/apex-file-reader.ts +1 -5
- package/src/settings.ts +0 -10
- package/src/test-helpers/SettingsBuilder.ts +0 -2
- package/src/transpiler/markdown/plain-markdown/constructors-partial-template.ts +1 -1
- package/src/util/fp.ts +3 -0
- package/dist/__spec__/core/expect-extensions.d.ts +0 -3
- package/dist/__spec__/core/expect-extensions.js +0 -55
- package/dist/__spec__/core/expect-extensions.js.map +0 -1
- package/dist/__spec__/core/generating-class-docs.spec.d.ts +0 -1
- package/dist/__spec__/core/generating-class-docs.spec.js +0 -444
- package/dist/__spec__/core/generating-class-docs.spec.js.map +0 -1
- package/dist/__spec__/core/generating-enum-docs.spec.d.ts +0 -1
- package/dist/__spec__/core/generating-enum-docs.spec.js +0 -306
- package/dist/__spec__/core/generating-enum-docs.spec.js.map +0 -1
- package/dist/__spec__/core/generating-interface-docs.spec.d.ts +0 -1
- package/dist/__spec__/core/generating-interface-docs.spec.js +0 -364
- package/dist/__spec__/core/generating-interface-docs.spec.js.map +0 -1
- package/dist/__spec__/core/generating-reference-guide.spec.d.ts +0 -1
- package/dist/__spec__/core/generating-reference-guide.spec.js +0 -162
- package/dist/__spec__/core/generating-reference-guide.spec.js.map +0 -1
- package/dist/__spec__/core/test-helpers.d.ts +0 -2
- package/dist/__spec__/core/test-helpers.js +0 -12
- package/dist/__spec__/core/test-helpers.js.map +0 -1
- package/dist/application/Apexdocs.d.ts +0 -15
- package/dist/application/Apexdocs.js +0 -113
- package/dist/application/Apexdocs.js.map +0 -1
- package/dist/application/generators/generate-markdown-files.d.ts +0 -3
- package/dist/application/generators/generate-markdown-files.js +0 -64
- package/dist/application/generators/generate-markdown-files.js.map +0 -1
- package/dist/cli/args.d.ts +0 -39
- package/dist/cli/args.js +0 -154
- package/dist/cli/args.js.map +0 -1
- package/dist/cli/generate.d.ts +0 -2
- package/dist/cli/generate.js.map +0 -1
- package/dist/core/__test__/inheritance-chain.test.d.ts +0 -1
- package/dist/core/__test__/inheritance-chain.test.js +0 -42
- package/dist/core/__test__/inheritance-chain.test.js.map +0 -1
- package/dist/core/adapters/apex-types.d.ts +0 -6
- package/dist/core/adapters/apex-types.js +0 -109
- package/dist/core/adapters/apex-types.js.map +0 -1
- package/dist/core/adapters/documentables.d.ts +0 -7
- package/dist/core/adapters/documentables.js +0 -154
- package/dist/core/adapters/documentables.js.map +0 -1
- package/dist/core/adapters/fields-and-properties.d.ts +0 -3
- package/dist/core/adapters/fields-and-properties.js +0 -37
- package/dist/core/adapters/fields-and-properties.js.map +0 -1
- package/dist/core/adapters/methods-and-constructors.d.ts +0 -5
- package/dist/core/adapters/methods-and-constructors.js +0 -100
- package/dist/core/adapters/methods-and-constructors.js.map +0 -1
- package/dist/core/adapters/references.d.ts +0 -4
- package/dist/core/adapters/references.js +0 -78
- package/dist/core/adapters/references.js.map +0 -1
- package/dist/core/adapters/type-utils.d.ts +0 -3
- package/dist/core/adapters/type-utils.js +0 -12
- package/dist/core/adapters/type-utils.js.map +0 -1
- package/dist/core/apex-bundle.d.ts +0 -6
- package/dist/core/apex-bundle.js +0 -11
- package/dist/core/apex-bundle.js.map +0 -1
- package/dist/core/generate-docs.d.ts +0 -28
- package/dist/core/generate-docs.js +0 -296
- package/dist/core/generate-docs.js.map +0 -1
- package/dist/core/inheritance-chain.d.ts +0 -2
- package/dist/core/inheritance-chain.js +0 -36
- package/dist/core/inheritance-chain.js.map +0 -1
- package/dist/core/manifest.d.ts +0 -22
- package/dist/core/manifest.js +0 -53
- package/dist/core/manifest.js.map +0 -1
- package/dist/core/template.d.ts +0 -10
- package/dist/core/template.js +0 -97
- package/dist/core/template.js.map +0 -1
- package/dist/core/templates/reference-guide.d.ts +0 -1
- package/dist/core/templates/reference-guide.js +0 -18
- package/dist/core/templates/reference-guide.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/model/apex-type-wrappers/ClassMirrorWrapper.d.ts +0 -7
- package/dist/model/apex-type-wrappers/ClassMirrorWrapper.js +0 -14
- package/dist/model/apex-type-wrappers/ClassMirrorWrapper.js.map +0 -1
- package/dist/model/apex-type-wrappers/MethodMirrorWrapper.d.ts +0 -7
- package/dist/model/apex-type-wrappers/MethodMirrorWrapper.js +0 -12
- package/dist/model/apex-type-wrappers/MethodMirrorWrapper.js.map +0 -1
- package/dist/model/markdown-file.d.ts +0 -16
- package/dist/model/markdown-file.js +0 -111
- package/dist/model/markdown-file.js.map +0 -1
- package/dist/model/markdown-generation-util/doc-comment-annotation-util.d.ts +0 -8
- package/dist/model/markdown-generation-util/doc-comment-annotation-util.js +0 -47
- package/dist/model/markdown-generation-util/doc-comment-annotation-util.js.map +0 -1
- package/dist/model/markdown-generation-util/field-declaration-util.d.ts +0 -3
- package/dist/model/markdown-generation-util/field-declaration-util.js +0 -55
- package/dist/model/markdown-generation-util/field-declaration-util.js.map +0 -1
- package/dist/model/markdown-generation-util/index.d.ts +0 -3
- package/dist/model/markdown-generation-util/index.js +0 -20
- package/dist/model/markdown-generation-util/index.js.map +0 -1
- package/dist/model/markdown-generation-util/method-declaration-util.d.ts +0 -4
- package/dist/model/markdown-generation-util/method-declaration-util.js +0 -115
- package/dist/model/markdown-generation-util/method-declaration-util.js.map +0 -1
- package/dist/model/markdown-generation-util/type-declaration-util.d.ts +0 -3
- package/dist/model/markdown-generation-util/type-declaration-util.js +0 -82
- package/dist/model/markdown-generation-util/type-declaration-util.js.map +0 -1
- package/dist/model/markdown-home-file.d.ts +0 -11
- package/dist/model/markdown-home-file.js +0 -57
- package/dist/model/markdown-home-file.js.map +0 -1
- package/dist/model/markdown-type-file.d.ts +0 -26
- package/dist/model/markdown-type-file.js +0 -137
- package/dist/model/markdown-type-file.js.map +0 -1
- package/dist/model/openapi/apex-doc-types.d.ts +0 -19
- package/dist/model/openapi/apex-doc-types.js +0 -5
- package/dist/model/openapi/apex-doc-types.js.map +0 -1
- package/dist/model/openapi/open-api-types.d.ts +0 -93
- package/dist/model/openapi/open-api-types.js +0 -3
- package/dist/model/openapi/open-api-types.js.map +0 -1
- package/dist/model/openapi/open-api.d.ts +0 -16
- package/dist/model/openapi/open-api.js +0 -34
- package/dist/model/openapi/open-api.js.map +0 -1
- package/dist/model/openapi/openapi-type-file.d.ts +0 -7
- package/dist/model/openapi/openapi-type-file.js +0 -17
- package/dist/model/openapi/openapi-type-file.js.map +0 -1
- package/dist/model/outputFile.d.ts +0 -10
- package/dist/model/outputFile.js +0 -22
- package/dist/model/outputFile.js.map +0 -1
- package/dist/model/types-repository.d.ts +0 -16
- package/dist/model/types-repository.js +0 -54
- package/dist/model/types-repository.js.map +0 -1
- package/dist/service/apex-file-reader.d.ts +0 -14
- package/dist/service/apex-file-reader.js +0 -49
- package/dist/service/apex-file-reader.js.map +0 -1
- package/dist/service/file-system.d.ts +0 -14
- package/dist/service/file-system.js +0 -48
- package/dist/service/file-system.js.map +0 -1
- package/dist/service/file-writer.d.ts +0 -6
- package/dist/service/file-writer.js +0 -57
- package/dist/service/file-writer.js.map +0 -1
- package/dist/service/manifest-factory.d.ts +0 -10
- package/dist/service/manifest-factory.js +0 -17
- package/dist/service/manifest-factory.js.map +0 -1
- package/dist/service/metadata-processor.d.ts +0 -3
- package/dist/service/metadata-processor.js +0 -17
- package/dist/service/metadata-processor.js.map +0 -1
- package/dist/service/parser.d.ts +0 -21
- package/dist/service/parser.js +0 -138
- package/dist/service/parser.js.map +0 -1
- package/dist/service/state.d.ts +0 -9
- package/dist/service/state.js +0 -20
- package/dist/service/state.js.map +0 -1
- package/dist/service/walkers/class-walker.d.ts +0 -4
- package/dist/service/walkers/class-walker.js +0 -33
- package/dist/service/walkers/class-walker.js.map +0 -1
- package/dist/service/walkers/enum-walker.d.ts +0 -4
- package/dist/service/walkers/enum-walker.js +0 -11
- package/dist/service/walkers/enum-walker.js.map +0 -1
- package/dist/service/walkers/interface-walker.d.ts +0 -4
- package/dist/service/walkers/interface-walker.js +0 -15
- package/dist/service/walkers/interface-walker.js.map +0 -1
- package/dist/service/walkers/walker-factory.d.ts +0 -5
- package/dist/service/walkers/walker-factory.js +0 -21
- package/dist/service/walkers/walker-factory.js.map +0 -1
- package/dist/service/walkers/walker.d.ts +0 -19
- package/dist/service/walkers/walker.js +0 -17
- package/dist/service/walkers/walker.js.map +0 -1
- package/dist/settings.d.ts +0 -67
- package/dist/settings.js +0 -92
- package/dist/settings.js.map +0 -1
- package/dist/test-helpers/AnnotationBuilder.d.ts +0 -12
- package/dist/test-helpers/AnnotationBuilder.js +0 -31
- package/dist/test-helpers/AnnotationBuilder.js.map +0 -1
- package/dist/test-helpers/ClassMirrorBuilder.d.ts +0 -22
- package/dist/test-helpers/ClassMirrorBuilder.js +0 -64
- package/dist/test-helpers/ClassMirrorBuilder.js.map +0 -1
- package/dist/test-helpers/DocCommentAnnotationBuilder.d.ts +0 -8
- package/dist/test-helpers/DocCommentAnnotationBuilder.js +0 -26
- package/dist/test-helpers/DocCommentAnnotationBuilder.js.map +0 -1
- package/dist/test-helpers/DocCommentBuilder.d.ts +0 -12
- package/dist/test-helpers/DocCommentBuilder.js +0 -38
- package/dist/test-helpers/DocCommentBuilder.js.map +0 -1
- package/dist/test-helpers/FieldMirrorBuilder.d.ts +0 -18
- package/dist/test-helpers/FieldMirrorBuilder.js +0 -54
- package/dist/test-helpers/FieldMirrorBuilder.js.map +0 -1
- package/dist/test-helpers/InterfaceMirrorBuilder.d.ts +0 -16
- package/dist/test-helpers/InterfaceMirrorBuilder.js +0 -43
- package/dist/test-helpers/InterfaceMirrorBuilder.js.map +0 -1
- package/dist/test-helpers/MethodMirrorBuilder.d.ts +0 -29
- package/dist/test-helpers/MethodMirrorBuilder.js +0 -72
- package/dist/test-helpers/MethodMirrorBuilder.js.map +0 -1
- package/dist/test-helpers/SettingsBuilder.d.ts +0 -8
- package/dist/test-helpers/SettingsBuilder.js +0 -28
- package/dist/test-helpers/SettingsBuilder.js.map +0 -1
- package/dist/transpiler/factory.d.ts +0 -6
- package/dist/transpiler/factory.js +0 -33
- package/dist/transpiler/factory.js.map +0 -1
- package/dist/transpiler/file-container.d.ts +0 -6
- package/dist/transpiler/file-container.js +0 -16
- package/dist/transpiler/file-container.js.map +0 -1
- package/dist/transpiler/generator-choices.d.ts +0 -1
- package/dist/transpiler/generator-choices.js +0 -3
- package/dist/transpiler/generator-choices.js.map +0 -1
- package/dist/transpiler/markdown/class-file-generatorHelper.d.ts +0 -9
- package/dist/transpiler/markdown/class-file-generatorHelper.js +0 -61
- package/dist/transpiler/markdown/class-file-generatorHelper.js.map +0 -1
- package/dist/transpiler/markdown/docsify/docsify-docs-processor.d.ts +0 -6
- package/dist/transpiler/markdown/docsify/docsify-docs-processor.js +0 -13
- package/dist/transpiler/markdown/docsify/docsify-docs-processor.js.map +0 -1
- package/dist/transpiler/markdown/jekyll/jekyll-docsProcessor.d.ts +0 -11
- package/dist/transpiler/markdown/jekyll/jekyll-docsProcessor.js +0 -51
- package/dist/transpiler/markdown/jekyll/jekyll-docsProcessor.js.map +0 -1
- package/dist/transpiler/markdown/markdown-transpiler-base.d.ts +0 -11
- package/dist/transpiler/markdown/markdown-transpiler-base.js +0 -27
- package/dist/transpiler/markdown/markdown-transpiler-base.js.map +0 -1
- package/dist/transpiler/markdown/plain-markdown/class-template.d.ts +0 -1
- package/dist/transpiler/markdown/plain-markdown/class-template.js +0 -77
- package/dist/transpiler/markdown/plain-markdown/class-template.js.map +0 -1
- package/dist/transpiler/markdown/plain-markdown/constructors-partial-template.d.ts +0 -1
- package/dist/transpiler/markdown/plain-markdown/constructors-partial-template.js +0 -36
- package/dist/transpiler/markdown/plain-markdown/constructors-partial-template.js.map +0 -1
- package/dist/transpiler/markdown/plain-markdown/documentable-partial-template.d.ts +0 -1
- package/dist/transpiler/markdown/plain-markdown/documentable-partial-template.js +0 -30
- package/dist/transpiler/markdown/plain-markdown/documentable-partial-template.js.map +0 -1
- package/dist/transpiler/markdown/plain-markdown/enum-template.d.ts +0 -1
- package/dist/transpiler/markdown/plain-markdown/enum-template.js +0 -16
- package/dist/transpiler/markdown/plain-markdown/enum-template.js.map +0 -1
- package/dist/transpiler/markdown/plain-markdown/fieldsPartialTemplate.d.ts +0 -1
- package/dist/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js +0 -27
- package/dist/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js.map +0 -1
- package/dist/transpiler/markdown/plain-markdown/grouped-members-partial-template.d.ts +0 -1
- package/dist/transpiler/markdown/plain-markdown/grouped-members-partial-template.js +0 -10
- package/dist/transpiler/markdown/plain-markdown/grouped-members-partial-template.js.map +0 -1
- package/dist/transpiler/markdown/plain-markdown/interface-template.d.ts +0 -1
- package/dist/transpiler/markdown/plain-markdown/interface-template.js +0 -20
- package/dist/transpiler/markdown/plain-markdown/interface-template.js.map +0 -1
- package/dist/transpiler/markdown/plain-markdown/methods-partial-template.d.ts +0 -1
- package/dist/transpiler/markdown/plain-markdown/methods-partial-template.js +0 -47
- package/dist/transpiler/markdown/plain-markdown/methods-partial-template.js.map +0 -1
- package/dist/transpiler/markdown/plain-markdown/type-doc-partial.d.ts +0 -1
- package/dist/transpiler/markdown/plain-markdown/type-doc-partial.js +0 -31
- package/dist/transpiler/markdown/plain-markdown/type-doc-partial.js.map +0 -1
- package/dist/transpiler/openapi/open-api-docs-processor.d.ts +0 -13
- package/dist/transpiler/openapi/open-api-docs-processor.js +0 -78
- package/dist/transpiler/openapi/open-api-docs-processor.js.map +0 -1
- package/dist/transpiler/openapi/parsers/Builder.d.ts +0 -16
- package/dist/transpiler/openapi/parsers/Builder.js +0 -30
- package/dist/transpiler/openapi/parsers/Builder.js.map +0 -1
- package/dist/transpiler/openapi/parsers/MethodParser.d.ts +0 -20
- package/dist/transpiler/openapi/parsers/MethodParser.js +0 -190
- package/dist/transpiler/openapi/parsers/MethodParser.js.map +0 -1
- package/dist/transpiler/openapi/parsers/ParameterObjectBuilder.d.ts +0 -7
- package/dist/transpiler/openapi/parsers/ParameterObjectBuilder.js +0 -11
- package/dist/transpiler/openapi/parsers/ParameterObjectBuilder.js.map +0 -1
- package/dist/transpiler/openapi/parsers/ReferenceBuilder.d.ts +0 -39
- package/dist/transpiler/openapi/parsers/ReferenceBuilder.js +0 -250
- package/dist/transpiler/openapi/parsers/ReferenceBuilder.js.map +0 -1
- package/dist/transpiler/openapi/parsers/RequestBodyBuilder.d.ts +0 -10
- package/dist/transpiler/openapi/parsers/RequestBodyBuilder.js +0 -20
- package/dist/transpiler/openapi/parsers/RequestBodyBuilder.js.map +0 -1
- package/dist/transpiler/openapi/parsers/ResponsesBuilder.d.ts +0 -7
- package/dist/transpiler/openapi/parsers/ResponsesBuilder.js +0 -22
- package/dist/transpiler/openapi/parsers/ResponsesBuilder.js.map +0 -1
- package/dist/transpiler/processor-type-transpiler.d.ts +0 -10
- package/dist/transpiler/processor-type-transpiler.js +0 -9
- package/dist/transpiler/processor-type-transpiler.js.map +0 -1
- package/dist/transpiler/transpiler.d.ts +0 -5
- package/dist/transpiler/transpiler.js +0 -30
- package/dist/transpiler/transpiler.js.map +0 -1
- package/dist/util/error-logger.d.ts +0 -8
- package/dist/util/error-logger.js +0 -90
- package/dist/util/error-logger.js.map +0 -1
- package/dist/util/logger.d.ts +0 -21
- package/dist/util/logger.js +0 -61
- package/dist/util/logger.js.map +0 -1
- package/dist/util/string-utils.d.ts +0 -2
- package/dist/util/string-utils.js +0 -15
- package/dist/util/string-utils.js.map +0 -1
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ClassMirror, ConstructorMirror, EnumMirror, InterfaceMirror, MethodMirror, Type } from '@cparra/apex-reflection';
|
|
2
|
-
import { WalkerListener } from '../service/walkers/walker';
|
|
3
|
-
import { MarkdownFile } from './markdown-file';
|
|
4
|
-
import { FieldMirrorWithInheritance, PropertyMirrorWithInheritance } from '../core/adapters/types';
|
|
5
|
-
export declare class MarkdownTypeFile extends MarkdownFile implements WalkerListener {
|
|
6
|
-
private type;
|
|
7
|
-
private headingLevel;
|
|
8
|
-
private isInner;
|
|
9
|
-
constructor(type: Type, headingLevel?: number, headerContent?: string, isInner?: boolean);
|
|
10
|
-
onTypeDeclaration(typeMirror: Type): void;
|
|
11
|
-
private isClass;
|
|
12
|
-
onConstructorDeclaration(className: string, constructors: ConstructorMirror[]): void;
|
|
13
|
-
onFieldsDeclaration(fields: FieldMirrorWithInheritance[]): void;
|
|
14
|
-
onPropertiesDeclaration(properties: PropertyMirrorWithInheritance[]): void;
|
|
15
|
-
onMethodsDeclaration(methods: MethodMirror[]): void;
|
|
16
|
-
onInnerEnumsDeclaration(enums: EnumMirror[]): void;
|
|
17
|
-
onInnerClassesDeclaration(classes: ClassMirror[]): void;
|
|
18
|
-
onInnerInterfacesDeclaration(interfaces: InterfaceMirror[]): void;
|
|
19
|
-
private addInnerTypes;
|
|
20
|
-
private hasGroupings;
|
|
21
|
-
private declareMethodWithGroupings;
|
|
22
|
-
private declareFieldOrProperty;
|
|
23
|
-
private startGroup;
|
|
24
|
-
private endGroup;
|
|
25
|
-
private group;
|
|
26
|
-
}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.MarkdownTypeFile = void 0;
|
|
7
|
-
const walker_factory_1 = require("../service/walkers/walker-factory");
|
|
8
|
-
const markdown_file_1 = require("./markdown-file");
|
|
9
|
-
const markdown_generation_util_1 = require("./markdown-generation-util");
|
|
10
|
-
const class_file_generatorHelper_1 = __importDefault(require("../transpiler/markdown/class-file-generatorHelper"));
|
|
11
|
-
const settings_1 = require("../settings");
|
|
12
|
-
class MarkdownTypeFile extends markdown_file_1.MarkdownFile {
|
|
13
|
-
constructor(type, headingLevel = 1, headerContent, isInner = false) {
|
|
14
|
-
super(`${settings_1.Settings.getInstance().getNamespacePrefix()}${type.name}`, class_file_generatorHelper_1.default.getSanitizedGroup(type));
|
|
15
|
-
this.type = type;
|
|
16
|
-
this.headingLevel = headingLevel;
|
|
17
|
-
this.isInner = isInner;
|
|
18
|
-
if (headerContent) {
|
|
19
|
-
this.addText(headerContent);
|
|
20
|
-
}
|
|
21
|
-
const walker = walker_factory_1.WalkerFactory.get(type);
|
|
22
|
-
walker.walk(this);
|
|
23
|
-
}
|
|
24
|
-
onTypeDeclaration(typeMirror) {
|
|
25
|
-
let fullTypeName;
|
|
26
|
-
if (this.isInner) {
|
|
27
|
-
fullTypeName = typeMirror.name;
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
// If we are dealing with a class, we want to check if it has a class
|
|
31
|
-
// modifier and add it to the name.
|
|
32
|
-
if (this.isClass(typeMirror) && typeMirror.classModifier) {
|
|
33
|
-
fullTypeName = `${typeMirror.classModifier} ${settings_1.Settings.getInstance().getNamespacePrefix()}${typeMirror.name}`;
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
fullTypeName = `${settings_1.Settings.getInstance().getNamespacePrefix()}${typeMirror.name}`;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
this.addTitle(fullTypeName, this.headingLevel);
|
|
40
|
-
(0, markdown_generation_util_1.declareType)(this, typeMirror);
|
|
41
|
-
}
|
|
42
|
-
isClass(typeMirror) {
|
|
43
|
-
return typeMirror.type_name === 'class';
|
|
44
|
-
}
|
|
45
|
-
onConstructorDeclaration(className, constructors) {
|
|
46
|
-
this.addTitle('Constructors', this.headingLevel + 1);
|
|
47
|
-
this.declareMethodWithGroupings(constructors, className);
|
|
48
|
-
}
|
|
49
|
-
onFieldsDeclaration(fields) {
|
|
50
|
-
this.addTitle('Fields', this.headingLevel + 1);
|
|
51
|
-
this.declareFieldOrProperty(fields);
|
|
52
|
-
}
|
|
53
|
-
onPropertiesDeclaration(properties) {
|
|
54
|
-
this.addTitle('Properties', this.headingLevel + 1);
|
|
55
|
-
this.declareFieldOrProperty(properties);
|
|
56
|
-
}
|
|
57
|
-
onMethodsDeclaration(methods) {
|
|
58
|
-
this.addTitle('Methods', this.headingLevel + 1);
|
|
59
|
-
this.declareMethodWithGroupings(methods);
|
|
60
|
-
}
|
|
61
|
-
onInnerEnumsDeclaration(enums) {
|
|
62
|
-
this.addInnerTypes('Enums', enums);
|
|
63
|
-
}
|
|
64
|
-
onInnerClassesDeclaration(classes) {
|
|
65
|
-
this.addInnerTypes('Classes', classes);
|
|
66
|
-
}
|
|
67
|
-
onInnerInterfacesDeclaration(interfaces) {
|
|
68
|
-
this.addInnerTypes('Interfaces', interfaces, false);
|
|
69
|
-
}
|
|
70
|
-
addInnerTypes(title, types, addSeparator = true) {
|
|
71
|
-
this.addTitle(title, this.headingLevel + 1);
|
|
72
|
-
types.forEach((currentType) => {
|
|
73
|
-
const innerFile = new MarkdownTypeFile(currentType, this.headingLevel + 2, undefined, true);
|
|
74
|
-
this.addText(innerFile._contents);
|
|
75
|
-
});
|
|
76
|
-
if (addSeparator) {
|
|
77
|
-
this.addHorizontalRule();
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
hasGroupings(groupAware) {
|
|
81
|
-
return !!groupAware.find((current) => !!current.group);
|
|
82
|
-
}
|
|
83
|
-
declareMethodWithGroupings(methods, className = '') {
|
|
84
|
-
const hasGroupings = this.hasGroupings(methods);
|
|
85
|
-
if (!hasGroupings) {
|
|
86
|
-
(0, markdown_generation_util_1.declareMethod)(this, methods, this.headingLevel, className);
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
const groupedConstructors = this.group(methods);
|
|
90
|
-
for (const key in groupedConstructors) {
|
|
91
|
-
// For the group description, we can take the first one, since they all have the same description.
|
|
92
|
-
this.startGroup(key, groupedConstructors[key][0].groupDescription);
|
|
93
|
-
const constructorsForGroup = groupedConstructors[key];
|
|
94
|
-
(0, markdown_generation_util_1.declareMethod)(this, constructorsForGroup, this.headingLevel, className);
|
|
95
|
-
this.endGroup();
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
declareFieldOrProperty(fieldsOrProperties) {
|
|
100
|
-
const hasGroupings = this.hasGroupings(fieldsOrProperties);
|
|
101
|
-
if (!hasGroupings) {
|
|
102
|
-
(0, markdown_generation_util_1.declareField)(this, fieldsOrProperties, this.headingLevel, false);
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
const groupedFields = this.group(fieldsOrProperties);
|
|
106
|
-
for (const key in groupedFields) {
|
|
107
|
-
// For the group description, we can take the first one, since they all have the same description.
|
|
108
|
-
this.startGroup(key, groupedFields[key][0].groupDescription);
|
|
109
|
-
const fieldsForGroup = groupedFields[key];
|
|
110
|
-
(0, markdown_generation_util_1.declareField)(this, fieldsForGroup, this.headingLevel, true);
|
|
111
|
-
this.endGroup();
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
startGroup(groupName, groupDescription) {
|
|
116
|
-
this.headingLevel = this.headingLevel + 2;
|
|
117
|
-
this.addTitle(groupName, this.headingLevel);
|
|
118
|
-
if (groupDescription) {
|
|
119
|
-
this.addText(groupDescription);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
endGroup() {
|
|
123
|
-
this.headingLevel = this.headingLevel - 2;
|
|
124
|
-
}
|
|
125
|
-
group(list) {
|
|
126
|
-
return list.reduce((groups, item) => {
|
|
127
|
-
var _a;
|
|
128
|
-
const groupName = (_a = item.group) !== null && _a !== void 0 ? _a : 'Other';
|
|
129
|
-
const group = groups[groupName] || [];
|
|
130
|
-
group.push(item);
|
|
131
|
-
groups[groupName] = group;
|
|
132
|
-
return groups;
|
|
133
|
-
}, {});
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
exports.MarkdownTypeFile = MarkdownTypeFile;
|
|
137
|
-
//# sourceMappingURL=markdown-type-file.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-type-file.js","sourceRoot":"","sources":["../../src/model/markdown-type-file.ts"],"names":[],"mappings":";;;;;;AAQA,sEAAkE;AAElE,mDAA+C;AAC/C,yEAAsF;AACtF,mHAAyF;AACzF,0CAAuC;AAgBvC,MAAa,gBAAiB,SAAQ,4BAAY;IAChD,YAAoB,IAAU,EAAU,eAAuB,CAAC,EAAE,aAAsB,EAAU,UAAU,KAAK;QAC/G,KAAK,CACH,GAAG,mBAAQ,CAAC,WAAW,EAAE,CAAC,kBAAkB,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,EAC5D,oCAAwB,CAAC,iBAAiB,CAAC,IAAI,CAAC,CACjD,CAAC;QAJgB,SAAI,GAAJ,IAAI,CAAM;QAAU,iBAAY,GAAZ,YAAY,CAAY;QAAkC,YAAO,GAAP,OAAO,CAAQ;QAK/G,IAAI,aAAa,EAAE,CAAC;YAClB,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC9B,CAAC;QACD,MAAM,MAAM,GAAG,8BAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,C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{
|
|
3
|
-
statusCode: number;
|
|
4
|
-
description?: string;
|
|
5
|
-
schema: ApexDocSchemaObject;
|
|
6
|
-
};
|
|
7
|
-
export type ApexDocHttpRequestBody = {
|
|
8
|
-
description?: string;
|
|
9
|
-
schema: ApexDocSchemaObject;
|
|
10
|
-
required?: boolean;
|
|
11
|
-
};
|
|
12
|
-
export type ApexDocParameterObject = {
|
|
13
|
-
name: string;
|
|
14
|
-
in: 'query' | 'header' | 'path' | 'cookie';
|
|
15
|
-
description?: string;
|
|
16
|
-
required?: boolean;
|
|
17
|
-
schema: ApexDocSchemaObject;
|
|
18
|
-
};
|
|
19
|
-
export type ApexDocSchemaObject = SchemaObjectObject | SchemaObjectArray | string;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// These are types that represent how the data is expected to be created in the ApexDoc (as YAML), which
|
|
3
|
-
// in some cases might be different from the official OpenApi spec for simplicity when writing the ApexDoc.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
//# sourceMappingURL=apex-doc-types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apex-doc-types.js","sourceRoot":"","sources":["../../../src/model/openapi/apex-doc-types.ts"],"names":[],"mappings":";AAAA,wGAAwG;AACxG,2GAA2G"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
export type InfoObject = {
|
|
2
|
-
title: string;
|
|
3
|
-
version: string;
|
|
4
|
-
};
|
|
5
|
-
export type ServerObject = {
|
|
6
|
-
url: string;
|
|
7
|
-
};
|
|
8
|
-
export type PathsObject = {
|
|
9
|
-
[index: string]: PathItemObject;
|
|
10
|
-
};
|
|
11
|
-
export type PathItemObject = {
|
|
12
|
-
description?: string;
|
|
13
|
-
get?: OperationObject;
|
|
14
|
-
put?: OperationObject;
|
|
15
|
-
post?: OperationObject;
|
|
16
|
-
delete?: OperationObject;
|
|
17
|
-
patch?: OperationObject;
|
|
18
|
-
};
|
|
19
|
-
export type OperationObject = {
|
|
20
|
-
tags?: string[];
|
|
21
|
-
description?: string;
|
|
22
|
-
summary?: string;
|
|
23
|
-
requestBody?: RequestBody;
|
|
24
|
-
parameters?: ParameterObject[];
|
|
25
|
-
responses?: ResponsesObject;
|
|
26
|
-
};
|
|
27
|
-
export type ParameterObject = {
|
|
28
|
-
name: string;
|
|
29
|
-
in: 'query' | 'header' | 'path' | 'cookie';
|
|
30
|
-
description?: string;
|
|
31
|
-
required?: boolean;
|
|
32
|
-
schema?: SchemaObject;
|
|
33
|
-
};
|
|
34
|
-
export type RequestBody = {
|
|
35
|
-
description?: string;
|
|
36
|
-
content: RequestBodyContent;
|
|
37
|
-
required?: boolean;
|
|
38
|
-
};
|
|
39
|
-
export type RequestBodyContent = {
|
|
40
|
-
[index: string]: MediaTypeObject;
|
|
41
|
-
};
|
|
42
|
-
export type MediaTypeObject = {
|
|
43
|
-
schema?: SchemaObject;
|
|
44
|
-
example?: unknown;
|
|
45
|
-
examples?: {
|
|
46
|
-
[index: string]: ExampleObject;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
export type ExampleObject = {
|
|
50
|
-
summary?: string;
|
|
51
|
-
description?: string;
|
|
52
|
-
value?: unknown;
|
|
53
|
-
};
|
|
54
|
-
export type ResponsesObject = {
|
|
55
|
-
[index: string]: ResponseObject;
|
|
56
|
-
};
|
|
57
|
-
export type ResponseObject = {
|
|
58
|
-
description: string;
|
|
59
|
-
content?: ContentObject;
|
|
60
|
-
};
|
|
61
|
-
export type ContentObject = {
|
|
62
|
-
[index: string]: {
|
|
63
|
-
schema: SchemaObject;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
export type SchemaObject = SchemaObjectObject | SchemaObjectArray | ReferenceObject;
|
|
67
|
-
export type SchemaObjectObject = {
|
|
68
|
-
type: string;
|
|
69
|
-
properties?: PropertiesObject;
|
|
70
|
-
format?: string;
|
|
71
|
-
description?: string;
|
|
72
|
-
};
|
|
73
|
-
export type PropertiesObject = {
|
|
74
|
-
[index: string]: SchemaObject;
|
|
75
|
-
};
|
|
76
|
-
export type SchemaObjectArray = {
|
|
77
|
-
type: 'array';
|
|
78
|
-
items: SchemaObject;
|
|
79
|
-
description?: string;
|
|
80
|
-
};
|
|
81
|
-
export type ReferenceObject = {
|
|
82
|
-
$ref: string;
|
|
83
|
-
description?: string;
|
|
84
|
-
};
|
|
85
|
-
export type ComponentsObject = {
|
|
86
|
-
schemas: {
|
|
87
|
-
[index: string]: SchemaObject;
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
export type TagObject = {
|
|
91
|
-
name: string;
|
|
92
|
-
description?: string;
|
|
93
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"open-api-types.js","sourceRoot":"","sources":["../../../src/model/openapi/open-api-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ComponentsObject, InfoObject, PathsObject, ServerObject, TagObject } from './open-api-types';
|
|
2
|
-
/**
|
|
3
|
-
* Represents the OpenApi 3.1.0 spec
|
|
4
|
-
* https://spec.openapis.org/oas/v3.1.0
|
|
5
|
-
*/
|
|
6
|
-
export declare class OpenApi {
|
|
7
|
-
private namespace?;
|
|
8
|
-
openapi: string;
|
|
9
|
-
info: InfoObject;
|
|
10
|
-
tags: TagObject[];
|
|
11
|
-
paths: PathsObject;
|
|
12
|
-
servers: ServerObject[];
|
|
13
|
-
components?: ComponentsObject;
|
|
14
|
-
constructor(title: string, version: string, namespace?: string | undefined);
|
|
15
|
-
private getServerUrl;
|
|
16
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OpenApi = void 0;
|
|
4
|
-
const OPEN_API_VERSION = '3.1.0';
|
|
5
|
-
const SERVER_URL = '/services/apexrest/';
|
|
6
|
-
/**
|
|
7
|
-
* Represents the OpenApi 3.1.0 spec
|
|
8
|
-
* https://spec.openapis.org/oas/v3.1.0
|
|
9
|
-
*/
|
|
10
|
-
class OpenApi {
|
|
11
|
-
constructor(title, version, namespace) {
|
|
12
|
-
this.namespace = namespace;
|
|
13
|
-
this.openapi = OPEN_API_VERSION;
|
|
14
|
-
this.info = {
|
|
15
|
-
title: title,
|
|
16
|
-
version: version,
|
|
17
|
-
};
|
|
18
|
-
this.servers = [
|
|
19
|
-
{
|
|
20
|
-
url: this.getServerUrl(),
|
|
21
|
-
},
|
|
22
|
-
];
|
|
23
|
-
this.paths = {};
|
|
24
|
-
this.tags = [];
|
|
25
|
-
}
|
|
26
|
-
getServerUrl() {
|
|
27
|
-
if (!this.namespace) {
|
|
28
|
-
return SERVER_URL;
|
|
29
|
-
}
|
|
30
|
-
return `${SERVER_URL}${this.namespace}/`;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.OpenApi = OpenApi;
|
|
34
|
-
//# sourceMappingURL=open-api.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"open-api.js","sourceRoot":"","sources":["../../../src/model/openapi/open-api.ts"],"names":[],"mappings":";;;AAEA,MAAM,gBAAgB,GAAG,OAAO,CAAC;AACjC,MAAM,UAAU,GAAG,qBAAqB,CAAC;AAEzC;;;GAGG;AACH,MAAa,OAAO;IAQlB,YAAY,KAAa,EAAE,OAAe,EAAU,SAAkB;QAAlB,cAAS,GAAT,SAAS,CAAS;QAPtE,YAAO,GAAG,gBAAgB,CAAC;QAQzB,IAAI,CAAC,IAAI,GAAG;YACV,KAAK,EAAE,KAAK;YACZ,OAAO,EAAE,OAAO;SACjB,CAAC;QAEF,IAAI,CAAC,OAAO,GAAG;YACb;gBACE,GAAG,EAAE,IAAI,CAAC,YAAY,EAAE;aACzB;SACF,CAAC;QAEF,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;IACjB,CAAC;IAEO,YAAY;QAClB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,OAAO,UAAU,CAAC;QACpB,CAAC;QAED,OAAO,GAAG,UAAU,GAAG,IAAI,CAAC,SAAS,GAAG,CAAC;IAC3C,CAAC;CACF;AA/BD,0BA+BC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OpenapiTypeFile = void 0;
|
|
4
|
-
const outputFile_1 = require("../outputFile");
|
|
5
|
-
const settings_1 = require("../../settings");
|
|
6
|
-
class OpenapiTypeFile extends outputFile_1.OutputFile {
|
|
7
|
-
constructor(openApiModel) {
|
|
8
|
-
super(settings_1.Settings.getInstance().openApiFileName(), '');
|
|
9
|
-
this.openApiModel = openApiModel;
|
|
10
|
-
this.addText(JSON.stringify(Object.assign(Object.assign({}, openApiModel), { namespace: undefined }), null, 2));
|
|
11
|
-
}
|
|
12
|
-
fileExtension() {
|
|
13
|
-
return '.json';
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.OpenapiTypeFile = OpenapiTypeFile;
|
|
17
|
-
//# sourceMappingURL=openapi-type-file.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"openapi-type-file.js","sourceRoot":"","sources":["../../../src/model/openapi/openapi-type-file.ts"],"names":[],"mappings":";;;AAAA,8CAA2C;AAE3C,6CAA0C;AAE1C,MAAa,eAAgB,SAAQ,uBAAU;IAC7C,YAAmB,YAAqB;QACtC,KAAK,CAAC,mBAAQ,CAAC,WAAW,EAAE,CAAC,eAAe,EAAE,EAAE,EAAE,CAAC,CAAC;QADnC,iBAAY,GAAZ,YAAY,CAAS;QAEtC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,iCAAM,YAAY,KAAE,SAAS,EAAE,SAAS,KAAI,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACnF,CAAC;IAED,aAAa;QACX,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AATD,0CASC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare abstract class OutputFile {
|
|
2
|
-
fileName: string;
|
|
3
|
-
dir: string;
|
|
4
|
-
_contents: string;
|
|
5
|
-
constructor(fileName: string, dir: string);
|
|
6
|
-
abstract fileExtension(): string;
|
|
7
|
-
get body(): string;
|
|
8
|
-
addText(text: string): void;
|
|
9
|
-
addBlankLine(): void;
|
|
10
|
-
}
|
package/dist/model/outputFile.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OutputFile = void 0;
|
|
4
|
-
class OutputFile {
|
|
5
|
-
constructor(fileName, dir) {
|
|
6
|
-
this.fileName = fileName;
|
|
7
|
-
this.dir = dir;
|
|
8
|
-
this._contents = '';
|
|
9
|
-
}
|
|
10
|
-
get body() {
|
|
11
|
-
return this._contents;
|
|
12
|
-
}
|
|
13
|
-
addText(text) {
|
|
14
|
-
this._contents += text;
|
|
15
|
-
this.addBlankLine();
|
|
16
|
-
}
|
|
17
|
-
addBlankLine() {
|
|
18
|
-
this._contents += '\n';
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.OutputFile = OutputFile;
|
|
22
|
-
//# sourceMappingURL=outputFile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"outputFile.js","sourceRoot":"","sources":["../../src/model/outputFile.ts"],"names":[],"mappings":";;;AAAA,MAAsB,UAAU;IAG9B,YAAmB,QAAgB,EAAS,GAAW;QAApC,aAAQ,GAAR,QAAQ,CAAQ;QAAS,QAAG,GAAH,GAAG,CAAQ;QAFvD,cAAS,GAAG,EAAE,CAAC;IAE2C,CAAC;IAI3D,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,OAAO,CAAC,IAAY;QAClB,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC;QACvB,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,YAAY;QACV,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC;IACzB,CAAC;CACF;AAnBD,gCAmBC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Type } from '@cparra/apex-reflection';
|
|
2
|
-
export type TypeBundle = {
|
|
3
|
-
type: Type;
|
|
4
|
-
isChild: boolean;
|
|
5
|
-
parentType?: Type;
|
|
6
|
-
};
|
|
7
|
-
export declare class TypesRepository {
|
|
8
|
-
private static instance;
|
|
9
|
-
private scopedTypes;
|
|
10
|
-
private allTypes;
|
|
11
|
-
static getInstance(): TypesRepository;
|
|
12
|
-
populateAll(types: Type[]): void;
|
|
13
|
-
getFromAllByName(typeName: string): TypeBundle | undefined;
|
|
14
|
-
populateScoped(types: Type[]): void;
|
|
15
|
-
getFromScopedByName(typeName: string): Type | undefined;
|
|
16
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypesRepository = void 0;
|
|
4
|
-
class TypesRepository {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.scopedTypes = [];
|
|
7
|
-
this.allTypes = [];
|
|
8
|
-
}
|
|
9
|
-
static getInstance() {
|
|
10
|
-
if (!TypesRepository.instance) {
|
|
11
|
-
TypesRepository.instance = new TypesRepository();
|
|
12
|
-
}
|
|
13
|
-
return TypesRepository.instance;
|
|
14
|
-
}
|
|
15
|
-
populateAll(types) {
|
|
16
|
-
this.allTypes = types;
|
|
17
|
-
}
|
|
18
|
-
getFromAllByName(typeName) {
|
|
19
|
-
if (typeName.includes('.')) {
|
|
20
|
-
// If it includes a dot we are assuming we are dealing with an inner class.
|
|
21
|
-
const [parentTypeName, childTypeName] = typeName.split('.');
|
|
22
|
-
const parentReference = this.allTypes.find((currentType) => currentType.name.toLowerCase() === parentTypeName.toLowerCase());
|
|
23
|
-
if (!parentReference || parentReference.type_name !== 'class') {
|
|
24
|
-
// If the parent is not found, no reason to keep searching, instead we return undefined.
|
|
25
|
-
// Similarly, if the parent is not a class, it means it cannot have children, so we return early.
|
|
26
|
-
return undefined;
|
|
27
|
-
}
|
|
28
|
-
const parentReferenceAsClass = parentReference;
|
|
29
|
-
const childTypes = [
|
|
30
|
-
...parentReferenceAsClass.classes,
|
|
31
|
-
...parentReferenceAsClass.interfaces,
|
|
32
|
-
...parentReferenceAsClass.enums,
|
|
33
|
-
];
|
|
34
|
-
const foundType = childTypes.find((currentType) => currentType.name.toLowerCase() === childTypeName);
|
|
35
|
-
if (!foundType) {
|
|
36
|
-
return undefined;
|
|
37
|
-
}
|
|
38
|
-
return { type: foundType, isChild: true, parentType: parentReference };
|
|
39
|
-
}
|
|
40
|
-
const foundType = this.allTypes.find((currentType) => currentType.name.toLowerCase() === typeName.toLowerCase());
|
|
41
|
-
if (!foundType) {
|
|
42
|
-
return undefined;
|
|
43
|
-
}
|
|
44
|
-
return { type: foundType, isChild: false };
|
|
45
|
-
}
|
|
46
|
-
populateScoped(types) {
|
|
47
|
-
this.scopedTypes = types;
|
|
48
|
-
}
|
|
49
|
-
getFromScopedByName(typeName) {
|
|
50
|
-
return this.scopedTypes.find((currentType) => currentType.name === typeName);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.TypesRepository = TypesRepository;
|
|
54
|
-
//# sourceMappingURL=types-repository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-repository.js","sourceRoot":"","sources":["../../src/model/types-repository.ts"],"names":[],"mappings":";;;AAIA,MAAa,eAAe;IAA5B;QAEU,gBAAW,GAAW,EAAE,CAAC;QACzB,aAAQ,GAAW,EAAE,CAAC;IAuDhC,CAAC;IArDQ,MAAM,CAAC,WAAW;QACvB,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC;YAC9B,eAAe,CAAC,QAAQ,GAAG,IA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AC,WAAiB,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,QAAQ,CAAC,WAAW,EAAE,CACjF,CAAC;QACF,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC7C,CAAC;IAEM,cAAc,CAAC,KAAa;QACjC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC3B,CAAC;IAEM,mBAAmB,CAAC,QAAgB;QACzC,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,WAAiB,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;IACrF,CAAC;CACF;AA1DD,0CA0DC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FileSystem } from './file-system';
|
|
2
|
-
import ApexBundle from '../core/apex-bundle';
|
|
3
|
-
/**
|
|
4
|
-
* Reads from .cls files and returns their raw body.
|
|
5
|
-
*/
|
|
6
|
-
export declare class ApexFileReader {
|
|
7
|
-
/**
|
|
8
|
-
* Reads from .cls files and returns their raw body.
|
|
9
|
-
*/
|
|
10
|
-
static processFiles(fileSystem: FileSystem, rootPath?: string): ApexBundle[];
|
|
11
|
-
private static isApexFile;
|
|
12
|
-
private static get sourceDirectory();
|
|
13
|
-
private static get readRecursively();
|
|
14
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ApexFileReader = void 0;
|
|
7
|
-
const settings_1 = require("../settings");
|
|
8
|
-
const apex_bundle_1 = __importDefault(require("../core/apex-bundle"));
|
|
9
|
-
const APEX_FILE_EXTENSION = '.cls';
|
|
10
|
-
/**
|
|
11
|
-
* Reads from .cls files and returns their raw body.
|
|
12
|
-
*/
|
|
13
|
-
class ApexFileReader {
|
|
14
|
-
/**
|
|
15
|
-
* Reads from .cls files and returns their raw body.
|
|
16
|
-
*/
|
|
17
|
-
static processFiles(fileSystem, rootPath = this.sourceDirectory) {
|
|
18
|
-
let bundles = [];
|
|
19
|
-
const directoryContents = fileSystem.readDirectory(rootPath);
|
|
20
|
-
directoryContents.forEach((currentFilePath) => {
|
|
21
|
-
const currentPath = fileSystem.joinPath(rootPath, currentFilePath);
|
|
22
|
-
if (this.readRecursively && fileSystem.isDirectory(currentPath)) {
|
|
23
|
-
bundles = bundles.concat(this.processFiles(fileSystem, currentPath));
|
|
24
|
-
}
|
|
25
|
-
if (!this.isApexFile(currentFilePath)) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
const rawApexFile = fileSystem.readFile(currentPath);
|
|
29
|
-
const metadataPath = fileSystem.joinPath(rootPath, `${currentFilePath}-meta.xml`);
|
|
30
|
-
let rawMetadataFile = null;
|
|
31
|
-
if (settings_1.Settings.getInstance().includeMetadata()) {
|
|
32
|
-
rawMetadataFile = fileSystem.exists(metadataPath) ? fileSystem.readFile(metadataPath) : null;
|
|
33
|
-
}
|
|
34
|
-
bundles.push(new apex_bundle_1.default(currentFilePath, rawApexFile, rawMetadataFile));
|
|
35
|
-
});
|
|
36
|
-
return bundles;
|
|
37
|
-
}
|
|
38
|
-
static isApexFile(currentFile) {
|
|
39
|
-
return currentFile.endsWith(APEX_FILE_EXTENSION);
|
|
40
|
-
}
|
|
41
|
-
static get sourceDirectory() {
|
|
42
|
-
return settings_1.Settings.getInstance().sourceDirectory;
|
|
43
|
-
}
|
|
44
|
-
static get readRecursively() {
|
|
45
|
-
return settings_1.Settings.getInstance().recursive;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
exports.ApexFileReader = ApexFileReader;
|
|
49
|
-
//# sourceMapping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AC,CAAC,CAAC,IAAI,CAAC;YAC/F,CAAC;YAED,OAAO,CAAC,IAAI,CAAC,IAAI,qBAAU,CAAC,eAAe,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC;QAC9E,CAAC,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACjB,CAAC;IAEO,MAAM,CAAC,UAAU,CAAC,WAAmB;QAC3C,OAAO,WAAW,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IACnD,CAAC;IAEO,MAAM,KAAK,eAAe;QAChC,OAAO,mBAAQ,CAAC,WAAW,EAAE,CAAC,eAAe,CAAC;IAChD,CAAC;IAEO,MAAM,KAAK,eAAe;QAChC,OAAO,mBAAQ,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC;IAC1C,CAAC;CACF;AAzCD,wCAyCC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface FileSystem {
|
|
2
|
-
readDirectory: (sourceDirectory: string) => string[];
|
|
3
|
-
isDirectory: (path: string) => boolean;
|
|
4
|
-
readFile: (path: string) => string;
|
|
5
|
-
joinPath: (...paths: string[]) => string;
|
|
6
|
-
exists: (path: string) => boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare class DefaultFileSystem implements FileSystem {
|
|
9
|
-
isDirectory(pathToRead: string): boolean;
|
|
10
|
-
readDirectory(sourceDirectory: string): string[];
|
|
11
|
-
readFile(pathToRead: string): string;
|
|
12
|
-
joinPath(...paths: string[]): string;
|
|
13
|
-
exists(path: string): boolean;
|
|
14
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.DefaultFileSystem = void 0;
|
|
27
|
-
const fs = __importStar(require("fs"));
|
|
28
|
-
const path = __importStar(require("path"));
|
|
29
|
-
class DefaultFileSystem {
|
|
30
|
-
isDirectory(pathToRead) {
|
|
31
|
-
return fs.statSync(pathToRead).isDirectory();
|
|
32
|
-
}
|
|
33
|
-
readDirectory(sourceDirectory) {
|
|
34
|
-
return fs.readdirSync(sourceDirectory);
|
|
35
|
-
}
|
|
36
|
-
readFile(pathToRead) {
|
|
37
|
-
const rawFile = fs.readFileSync(pathToRead);
|
|
38
|
-
return rawFile.toString();
|
|
39
|
-
}
|
|
40
|
-
joinPath(...paths) {
|
|
41
|
-
return path.join(...paths);
|
|
42
|
-
}
|
|
43
|
-
exists(path) {
|
|
44
|
-
return fs.existsSync(path);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
exports.DefaultFileSystem = DefaultFileSystem;
|
|
48
|
-
//# sourceMappingURL=file-system.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-system.js","sourceRoot":"","sources":["../../src/service/file-system.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAU7B,MAAa,iBAAiB;IAC5B,WAAW,CAAC,UAAkB;QAC5B,OAAO,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/C,CAAC;IAED,aAAa,CAAC,eAAuB;QACnC,OAAO,EAAE,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IACzC,CAAC;IAED,QAAQ,CAAC,UAAkB;QACzB,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QAC5C,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC5B,CAAC;IAED,QAAQ,CAAC,GAAG,KAAe;QACzB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,IAAY;QACjB,OAAO,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;CACF;AArBD,8CAqBC"}
|