@ng-doc/builder 16.10.0 → 16.11.0
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/classes/observable-set.d.ts +1 -0
- package/classes/observable-set.js +4 -0
- package/classes/observable-set.js.map +1 -1
- package/engine/.cache/apps/ng-doc/docs/ng-doc.api.js +3 -8
- package/engine/.cache/apps/ng-doc/docs/recipes/ignoring-file-lines/ng-doc.page.js +41 -0
- package/engine/.cache/apps/ng-doc/docs/recipes/ng-doc.category.js +30 -0
- package/engine/actions/playground.action.js +2 -2
- package/engine/actions/playground.action.js.map +1 -1
- package/engine/build-ng-doc.js +10 -2
- package/engine/build-ng-doc.js.map +1 -1
- package/engine/builder-operators/build.d.ts +2 -3
- package/engine/builder-operators/build.js +8 -4
- package/engine/builder-operators/build.js.map +1 -1
- package/engine/builder-operators/compile.d.ts +1 -1
- package/engine/builder-operators/compile.js.map +1 -1
- package/engine/builder-operators/emit.d.ts +2 -2
- package/engine/builder-operators/emit.js.map +1 -1
- package/engine/builder-operators/post-build.d.ts +6 -0
- package/engine/builder-operators/post-build.js +23 -0
- package/engine/builder-operators/post-build.js.map +1 -0
- package/engine/builder-operators/post-process.d.ts +2 -2
- package/engine/builder-operators/post-process.js +4 -5
- package/engine/builder-operators/post-process.js.map +1 -1
- package/engine/builder-operators/task.d.ts +1 -1
- package/engine/builder-operators/task.js.map +1 -1
- package/engine/builder-operators/to-builder-output.d.ts +6 -0
- package/engine/builder-operators/to-builder-output.js +13 -0
- package/engine/builder-operators/to-builder-output.js.map +1 -0
- package/engine/entities/abstractions/entity.d.ts +11 -11
- package/engine/entities/abstractions/entity.js +2 -5
- package/engine/entities/abstractions/entity.js.map +1 -1
- package/engine/entities/abstractions/file.entity.d.ts +2 -2
- package/engine/entities/abstractions/file.entity.js.map +1 -1
- package/engine/entities/abstractions/module.entity.d.ts +1 -1
- package/engine/entities/abstractions/module.entity.js.map +1 -1
- package/engine/entities/abstractions/navigation.entity.d.ts +1 -1
- package/engine/entities/abstractions/navigation.entity.js.map +1 -1
- package/engine/entities/abstractions/route.entity.d.ts +3 -4
- package/engine/entities/abstractions/route.entity.js +2 -2
- package/engine/entities/abstractions/route.entity.js.map +1 -1
- package/engine/entities/api-list.entity.d.ts +20 -0
- package/engine/entities/api-list.entity.js +69 -0
- package/engine/entities/api-list.entity.js.map +1 -0
- package/engine/entities/api-page.entity.d.ts +2 -3
- package/engine/entities/api-page.entity.js +26 -28
- package/engine/entities/api-page.entity.js.map +1 -1
- package/engine/entities/api-scope.entity.d.ts +2 -3
- package/engine/entities/api-scope.entity.js +13 -7
- package/engine/entities/api-scope.entity.js.map +1 -1
- package/engine/entities/api.entity.d.ts +3 -4
- package/engine/entities/api.entity.js +26 -29
- package/engine/entities/api.entity.js.map +1 -1
- package/engine/entities/category.entity.d.ts +2 -3
- package/engine/entities/category.entity.js +11 -13
- package/engine/entities/category.entity.js.map +1 -1
- package/engine/entities/context.entity.d.ts +11 -0
- package/engine/entities/context.entity.js +34 -0
- package/engine/entities/context.entity.js.map +1 -0
- package/engine/entities/generated-module.entity.d.ts +12 -0
- package/engine/entities/generated-module.entity.js +52 -0
- package/engine/entities/generated-module.entity.js.map +1 -0
- package/engine/entities/index-file.entity.d.ts +12 -0
- package/engine/entities/index-file.entity.js +52 -0
- package/engine/entities/index-file.entity.js.map +1 -0
- package/engine/entities/index.d.ts +8 -1
- package/engine/entities/index.js +8 -1
- package/engine/entities/index.js.map +1 -1
- package/engine/entities/indexes.entity.d.ts +3 -4
- package/engine/entities/indexes.entity.js +12 -14
- package/engine/entities/indexes.entity.js.map +1 -1
- package/engine/entities/keywords.entity.d.ts +12 -0
- package/engine/entities/keywords.entity.js +32 -0
- package/engine/entities/keywords.entity.js.map +1 -0
- package/engine/entities/page-demo.entity.d.ts +20 -0
- package/engine/entities/page-demo.entity.js +87 -0
- package/engine/entities/page-demo.entity.js.map +1 -0
- package/engine/entities/page-playground.entity.d.ts +21 -0
- package/engine/entities/page-playground.entity.js +80 -0
- package/engine/entities/page-playground.entity.js.map +1 -0
- package/engine/entities/page.entity.d.ts +6 -18
- package/engine/entities/page.entity.js +39 -107
- package/engine/entities/page.entity.js.map +1 -1
- package/engine/entities/plugins/entity-plugins/add-to-dependencies.plugin.d.ts +5 -0
- package/engine/entities/plugins/entity-plugins/add-to-dependencies.plugin.js +20 -0
- package/engine/entities/plugins/entity-plugins/add-to-dependencies.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/apply.plugin.d.ts +26 -0
- package/engine/entities/plugins/entity-plugins/apply.plugin.js +65 -0
- package/engine/entities/plugins/entity-plugins/apply.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/extract-snippets.plugin.d.ts +6 -0
- package/engine/entities/plugins/entity-plugins/extract-snippets.plugin.js +23 -0
- package/engine/entities/plugins/entity-plugins/extract-snippets.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/fill-indexes.plugin.d.ts +6 -0
- package/engine/entities/plugins/entity-plugins/fill-indexes.plugin.js +27 -0
- package/engine/entities/plugins/entity-plugins/fill-indexes.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/index.d.ts +9 -0
- package/engine/entities/plugins/entity-plugins/index.js +13 -0
- package/engine/entities/plugins/entity-plugins/index.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/markdown-to-html.plugin.d.ts +5 -0
- package/engine/entities/plugins/entity-plugins/markdown-to-html.plugin.js +21 -0
- package/engine/entities/plugins/entity-plugins/markdown-to-html.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/post-process-html.plugin.d.ts +5 -0
- package/engine/entities/plugins/entity-plugins/post-process-html.plugin.js +18 -0
- package/engine/entities/plugins/entity-plugins/post-process-html.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/process-html.plugin.d.ts +5 -0
- package/engine/entities/plugins/entity-plugins/process-html.plugin.js +18 -0
- package/engine/entities/plugins/entity-plugins/process-html.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/remove-lines.plugin.d.ts +6 -0
- package/engine/entities/plugins/entity-plugins/remove-lines.plugin.js +23 -0
- package/engine/entities/plugins/entity-plugins/remove-lines.plugin.js.map +1 -0
- package/engine/entities/plugins/entity-plugins/wrap-code.plugin.d.ts +6 -0
- package/engine/entities/plugins/entity-plugins/wrap-code.plugin.js +21 -0
- package/engine/entities/plugins/entity-plugins/wrap-code.plugin.js.map +1 -0
- package/engine/entities/plugins/helpers/execute-plugins.d.ts +10 -0
- package/engine/entities/plugins/helpers/execute-plugins.js +18 -0
- package/engine/entities/plugins/helpers/execute-plugins.js.map +1 -0
- package/engine/entities/plugins/helpers/index.d.ts +1 -0
- package/engine/entities/plugins/helpers/index.js +5 -0
- package/engine/entities/plugins/helpers/index.js.map +1 -0
- package/engine/entities/plugins/index.d.ts +3 -0
- package/engine/entities/plugins/index.js +7 -0
- package/engine/entities/plugins/index.js.map +1 -0
- package/engine/entities/plugins/types/entity-plugin.d.ts +5 -0
- package/engine/entities/plugins/types/entity-plugin.js +3 -0
- package/engine/entities/plugins/types/entity-plugin.js.map +1 -0
- package/engine/entities/plugins/types/index.d.ts +1 -0
- package/engine/entities/plugins/types/index.js +5 -0
- package/engine/entities/plugins/types/index.js.map +1 -0
- package/engine/entities/routes.entity.d.ts +11 -0
- package/engine/entities/routes.entity.js +34 -0
- package/engine/entities/routes.entity.js.map +1 -0
- package/engine/entity-store.d.ts +1 -0
- package/engine/entity-store.js +3 -0
- package/engine/entity-store.js.map +1 -1
- package/engine/nunjucks/filters.d.ts +2 -2
- package/engine/nunjucks/filters.js +3 -2
- package/engine/nunjucks/filters.js.map +1 -1
- package/engine/variables.d.ts +1 -0
- package/engine/variables.js +1 -0
- package/engine/variables.js.map +1 -1
- package/helpers/angular/get-component-assets.d.ts +8 -0
- package/helpers/angular/get-component-assets.js +15 -0
- package/helpers/angular/get-component-assets.js.map +1 -0
- package/helpers/angular/get-component-source-files.d.ts +7 -0
- package/helpers/angular/get-component-source-files.js +23 -0
- package/helpers/angular/get-component-source-files.js.map +1 -0
- package/helpers/angular/index.d.ts +2 -0
- package/helpers/angular/index.js +2 -0
- package/helpers/angular/index.js.map +1 -1
- package/helpers/build-file-assets.d.ts +7 -0
- package/helpers/build-file-assets.js +25 -0
- package/helpers/build-file-assets.js.map +1 -0
- package/helpers/build-file-entity.js +14 -1
- package/helpers/build-file-entity.js.map +1 -1
- package/helpers/demo/assets-from-component-asset.d.ts +6 -0
- package/helpers/demo/assets-from-component-asset.js +14 -0
- package/helpers/demo/assets-from-component-asset.js.map +1 -0
- package/helpers/demo/index.d.ts +1 -0
- package/helpers/demo/index.js +5 -0
- package/helpers/demo/index.js.map +1 -0
- package/helpers/emit-built-output.d.ts +2 -2
- package/helpers/emit-built-output.js.map +1 -1
- package/helpers/entity-type.d.ts +1 -1
- package/helpers/extract-docs.js +4 -4
- package/helpers/extract-docs.js.map +1 -1
- package/helpers/format-code.d.ts +1 -1
- package/helpers/format-code.js +14 -3
- package/helpers/format-code.js.map +1 -1
- package/helpers/get-code-type-from-lang.d.ts +6 -0
- package/helpers/get-code-type-from-lang.js +31 -0
- package/helpers/get-code-type-from-lang.js.map +1 -0
- package/helpers/get-demo-class-declarations.d.ts +1 -1
- package/helpers/get-demo-class-declarations.js +18 -7
- package/helpers/get-demo-class-declarations.js.map +1 -1
- package/helpers/index.d.ts +7 -3
- package/helpers/index.js +7 -3
- package/helpers/index.js.map +1 -1
- package/helpers/markdown-to-html.d.ts +10 -0
- package/helpers/{marked.js → markdown-to-html.js} +11 -8
- package/helpers/markdown-to-html.js.map +1 -0
- package/helpers/process-html.d.ts +3 -3
- package/helpers/process-html.js +14 -11
- package/helpers/process-html.js.map +1 -1
- package/helpers/process-legacy-snippets.d.ts +9 -0
- package/helpers/process-legacy-snippets.js +70 -0
- package/helpers/process-legacy-snippets.js.map +1 -0
- package/helpers/process-snippets.d.ts +5 -5
- package/helpers/process-snippets.js +63 -50
- package/helpers/process-snippets.js.map +1 -1
- package/helpers/remove-lines-from-code.d.ts +6 -0
- package/helpers/remove-lines-from-code.js +30 -0
- package/helpers/remove-lines-from-code.js.map +1 -0
- package/helpers/snippets-from-asset.d.ts +9 -0
- package/helpers/snippets-from-asset.js +26 -0
- package/helpers/snippets-from-asset.js.map +1 -0
- package/interfaces/asset.d.ts +5 -7
- package/interfaces/build-result.d.ts +10 -0
- package/{types/snippet-type.js → interfaces/build-result.js} +1 -1
- package/interfaces/build-result.js.map +1 -0
- package/interfaces/index.d.ts +3 -0
- package/interfaces/index.js +3 -0
- package/interfaces/index.js.map +1 -1
- package/interfaces/output.d.ts +1 -3
- package/interfaces/snippet-config.d.ts +8 -0
- package/interfaces/snippet-config.js +3 -0
- package/interfaces/snippet-config.js.map +1 -0
- package/interfaces/snippet.d.ts +5 -4
- package/operators/error-handler.d.ts +1 -1
- package/package.json +5 -5
- package/parsers/helpers/index.d.ts +3 -0
- package/parsers/helpers/index.js +7 -0
- package/parsers/helpers/index.js.map +1 -0
- package/parsers/helpers/number.d.ts +2 -0
- package/parsers/helpers/number.js +7 -0
- package/parsers/helpers/number.js.map +1 -0
- package/parsers/helpers/param-value.d.ts +2 -0
- package/parsers/helpers/param-value.js +8 -0
- package/parsers/helpers/param-value.js.map +1 -0
- package/parsers/helpers/param.d.ts +7 -0
- package/parsers/helpers/param.js +19 -0
- package/parsers/helpers/param.js.map +1 -0
- package/parsers/parse-code-block-params.js +8 -13
- package/parsers/parse-code-block-params.js.map +1 -1
- package/parsers/parse-snippet.d.ts +6 -0
- package/parsers/parse-snippet.js +27 -0
- package/parsers/parse-snippet.js.map +1 -0
- package/schematics/category/index.js +2 -1
- package/schematics/category/index.js.map +1 -1
- package/schematics/page/index.js +2 -1
- package/schematics/page/index.js.map +1 -1
- package/templates/demo-assets.ts.nunj +13 -4
- package/templates/page.module.ts.nunj +3 -2
- package/templates/parts/usage-notes.html.nunj +1 -1
- package/templates/playgrounds.ts.nunj +19 -9
- package/types/index.d.ts +0 -1
- package/types/index.js +0 -1
- package/types/index.js.map +1 -1
- package/engine/entities/skeleton.entity.d.ts +0 -16
- package/engine/entities/skeleton.entity.js +0 -44
- package/engine/entities/skeleton.entity.js.map +0 -1
- package/helpers/build-assets.d.ts +0 -10
- package/helpers/build-assets.js +0 -55
- package/helpers/build-assets.js.map +0 -1
- package/helpers/get-component-asset.d.ts +0 -10
- package/helpers/get-component-asset.js +0 -50
- package/helpers/get-component-asset.js.map +0 -1
- package/helpers/marked.d.ts +0 -9
- package/helpers/marked.js.map +0 -1
- package/types/snippet-type.d.ts +0 -1
- package/types/snippet-type.js.map +0 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NgDocGeneratedModuleEntity = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const path = tslib_1.__importStar(require("path"));
|
|
6
|
+
const rxjs_1 = require("rxjs");
|
|
7
|
+
const nunjucks_1 = require("../nunjucks");
|
|
8
|
+
const entity_1 = require("./abstractions/entity");
|
|
9
|
+
const cache_1 = require("./cache");
|
|
10
|
+
exports.NgDocGeneratedModuleEntity = (() => {
|
|
11
|
+
let _classDecorators = [(0, cache_1.CachedEntity)()];
|
|
12
|
+
let _classDescriptor;
|
|
13
|
+
let _classExtraInitializers = [];
|
|
14
|
+
let _classThis;
|
|
15
|
+
let _instanceExtraInitializers = [];
|
|
16
|
+
let _get_outputPath_decorators;
|
|
17
|
+
var NgDocGeneratedModuleEntity = _classThis = class extends entity_1.NgDocEntity {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.id = (tslib_1.__runInitializers(this, _instanceExtraInitializers), `NgDocGeneratedModule`);
|
|
21
|
+
this.isRoot = false;
|
|
22
|
+
this.parent = undefined;
|
|
23
|
+
this.rootFiles = [];
|
|
24
|
+
this.buildCandidates = [];
|
|
25
|
+
}
|
|
26
|
+
get outputPath() {
|
|
27
|
+
return path.join(this.context.buildPath, 'ng-doc.generated.module.ts');
|
|
28
|
+
}
|
|
29
|
+
build() {
|
|
30
|
+
return (0, rxjs_1.of)({
|
|
31
|
+
result: (0, nunjucks_1.renderTemplate)('./ng-doc.generated.module.ts.nunj'),
|
|
32
|
+
entity: this,
|
|
33
|
+
toBuilderOutput: (content) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
return ({
|
|
35
|
+
content,
|
|
36
|
+
filePath: this.outputPath,
|
|
37
|
+
});
|
|
38
|
+
}),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
tslib_1.__setFunctionName(_classThis, "NgDocGeneratedModuleEntity");
|
|
43
|
+
(() => {
|
|
44
|
+
_get_outputPath_decorators = [(0, cache_1.CachedFilesGetter)()];
|
|
45
|
+
tslib_1.__esDecorate(_classThis, null, _get_outputPath_decorators, { kind: "getter", name: "outputPath", static: false, private: false, access: { has: obj => "outputPath" in obj, get: obj => obj.outputPath } }, null, _instanceExtraInitializers);
|
|
46
|
+
tslib_1.__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers);
|
|
47
|
+
NgDocGeneratedModuleEntity = _classThis = _classDescriptor.value;
|
|
48
|
+
tslib_1.__runInitializers(_classThis, _classExtraInitializers);
|
|
49
|
+
})();
|
|
50
|
+
return NgDocGeneratedModuleEntity = _classThis;
|
|
51
|
+
})();
|
|
52
|
+
//# sourceMappingURL=generated-module.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-module.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/generated-module.entity.ts"],"names":[],"mappings":";;;;AAAA,mDAA6B;AAC7B,+BAAoC;AAGpC,0CAA2C;AAC3C,kDAAkD;AAClD,mCAAwD;AAG3C,QAAA,0BAA0B;4BADtC,IAAA,oBAAY,GAAE;;;;;;QACF,0BAA0B,qBAAC,SAAQ,oBAAW;;;YACjD,OAAE,iEAAW,sBAAsB,EAAC;YACpC,WAAM,GAAY,KAAK,CAAC;YACxB,WAAM,GAAc,SAAS,CAAC;YAC9B,cAAS,GAAa,EAAE,CAAC;YACzB,oBAAe,GAAkB,EAAE,CAAC;QAiB9C,CAAC;QAdA,IAAI,UAAU;YACb,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,4BAA4B,CAAC,CAAC;QACxE,CAAC;QAED,KAAK;YACJ,OAAO,IAAA,SAAE,EAAC;gBACT,MAAM,EAAE,IAAA,yBAAc,EAAC,mCAAmC,CAAC;gBAC3D,MAAM,EAAE,IAAI;gBACZ,eAAe,EAAE,CAAO,OAAe,EAAE,EAAE;oBAAC,OAAA,CAAC;wBAC5C,OAAO;wBACP,QAAQ,EAAE,IAAI,CAAC,UAAU;qBACzB,CAAC,CAAA;kBAAA;aACF,CAAC,CAAC;QACJ,CAAC;;;;sCAdA,IAAA,yBAAiB,GAAE;QACpB,mMAAI,UAAU,wCAEb;QAVF,gKAsBC;QAtBY,0BAA0B;QAA1B,+DAA0B;;WAA1B,0BAA0B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { NgDocBuildResult } from '../../interfaces';
|
|
3
|
+
import { NgDocEntity } from './abstractions/entity';
|
|
4
|
+
export declare class NgDocIndexFileEntity extends NgDocEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
isRoot: boolean;
|
|
7
|
+
readonly parent: undefined;
|
|
8
|
+
rootFiles: string[];
|
|
9
|
+
buildCandidates: NgDocEntity[];
|
|
10
|
+
get outputPath(): string;
|
|
11
|
+
build(): Observable<NgDocBuildResult<string>>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NgDocIndexFileEntity = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const path = tslib_1.__importStar(require("path"));
|
|
6
|
+
const rxjs_1 = require("rxjs");
|
|
7
|
+
const nunjucks_1 = require("../nunjucks");
|
|
8
|
+
const entity_1 = require("./abstractions/entity");
|
|
9
|
+
const cache_1 = require("./cache");
|
|
10
|
+
exports.NgDocIndexFileEntity = (() => {
|
|
11
|
+
let _classDecorators = [(0, cache_1.CachedEntity)()];
|
|
12
|
+
let _classDescriptor;
|
|
13
|
+
let _classExtraInitializers = [];
|
|
14
|
+
let _classThis;
|
|
15
|
+
let _instanceExtraInitializers = [];
|
|
16
|
+
let _get_outputPath_decorators;
|
|
17
|
+
var NgDocIndexFileEntity = _classThis = class extends entity_1.NgDocEntity {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.id = (tslib_1.__runInitializers(this, _instanceExtraInitializers), `NgDocIndexFile`);
|
|
21
|
+
this.isRoot = false;
|
|
22
|
+
this.parent = undefined;
|
|
23
|
+
this.rootFiles = [];
|
|
24
|
+
this.buildCandidates = [];
|
|
25
|
+
}
|
|
26
|
+
get outputPath() {
|
|
27
|
+
return path.join(this.context.buildPath, 'index.ts');
|
|
28
|
+
}
|
|
29
|
+
build() {
|
|
30
|
+
return (0, rxjs_1.of)({
|
|
31
|
+
result: (0, nunjucks_1.renderTemplate)('./index.ts.nunj'),
|
|
32
|
+
entity: this,
|
|
33
|
+
toBuilderOutput: (content) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
return ({
|
|
35
|
+
content,
|
|
36
|
+
filePath: this.outputPath,
|
|
37
|
+
});
|
|
38
|
+
}),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
tslib_1.__setFunctionName(_classThis, "NgDocIndexFileEntity");
|
|
43
|
+
(() => {
|
|
44
|
+
_get_outputPath_decorators = [(0, cache_1.CachedFilesGetter)()];
|
|
45
|
+
tslib_1.__esDecorate(_classThis, null, _get_outputPath_decorators, { kind: "getter", name: "outputPath", static: false, private: false, access: { has: obj => "outputPath" in obj, get: obj => obj.outputPath } }, null, _instanceExtraInitializers);
|
|
46
|
+
tslib_1.__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers);
|
|
47
|
+
NgDocIndexFileEntity = _classThis = _classDescriptor.value;
|
|
48
|
+
tslib_1.__runInitializers(_classThis, _classExtraInitializers);
|
|
49
|
+
})();
|
|
50
|
+
return NgDocIndexFileEntity = _classThis;
|
|
51
|
+
})();
|
|
52
|
+
//# sourceMappingURL=index-file.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-file.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/index-file.entity.ts"],"names":[],"mappings":";;;;AAAA,mDAA6B;AAC7B,+BAAoC;AAGpC,0CAA2C;AAC3C,kDAAkD;AAClD,mCAAwD;AAG3C,QAAA,oBAAoB;4BADhC,IAAA,oBAAY,GAAE;;;;;;QACF,oBAAoB,qBAAC,SAAQ,oBAAW;;;YAC3C,OAAE,iEAAW,gBAAgB,EAAC;YAC9B,WAAM,GAAY,KAAK,CAAC;YACxB,WAAM,GAAc,SAAS,CAAC;YAC9B,cAAS,GAAa,EAAE,CAAC;YACzB,oBAAe,GAAkB,EAAE,CAAC;QAiB9C,CAAC;QAdA,IAAI,UAAU;YACb,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QACtD,CAAC;QAED,KAAK;YACJ,OAAO,IAAA,SAAE,EAAC;gBACT,MAAM,EAAE,IAAA,yBAAc,EAAC,iBAAiB,CAAC;gBACzC,MAAM,EAAE,IAAI;gBACZ,eAAe,EAAE,CAAO,OAAe,EAAE,EAAE;oBAAC,OAAA,CAAC;wBAC5C,OAAO;wBACP,QAAQ,EAAE,IAAI,CAAC,UAAU;qBACzB,CAAC,CAAA;kBAAA;aACF,CAAC,CAAC;QACJ,CAAC;;;;sCAdA,IAAA,yBAAiB,GAAE;QACpB,mMAAI,UAAU,wCAEb;QAVF,gKAsBC;QAtBY,oBAAoB;QAApB,+DAAoB;;WAApB,oBAAoB"}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
export * from './api.entity';
|
|
2
|
+
export * from './api-list.entity';
|
|
2
3
|
export * from './api-page.entity';
|
|
3
4
|
export * from './api-scope.entity';
|
|
4
5
|
export * from './category.entity';
|
|
6
|
+
export * from './context.entity';
|
|
7
|
+
export * from './generated-module.entity';
|
|
8
|
+
export * from './index-file.entity';
|
|
5
9
|
export * from './indexes.entity';
|
|
10
|
+
export * from './keywords.entity';
|
|
6
11
|
export * from './page.entity';
|
|
7
|
-
export * from './
|
|
12
|
+
export * from './page-demo.entity';
|
|
13
|
+
export * from './page-playground.entity';
|
|
14
|
+
export * from './routes.entity';
|
package/engine/entities/index.js
CHANGED
|
@@ -2,10 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./api.entity"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./api-list.entity"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./api-page.entity"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./api-scope.entity"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./category.entity"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./context.entity"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./generated-module.entity"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./index-file.entity"), exports);
|
|
8
12
|
tslib_1.__exportStar(require("./indexes.entity"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./keywords.entity"), exports);
|
|
9
14
|
tslib_1.__exportStar(require("./page.entity"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./
|
|
15
|
+
tslib_1.__exportStar(require("./page-demo.entity"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./page-playground.entity"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./routes.entity"), exports);
|
|
11
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,4DAAkC;AAClC,6DAAmC;AACnC,4DAAkC;AAClC,2DAAiC;AACjC,wDAA8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,4DAAkC;AAClC,4DAAkC;AAClC,6DAAmC;AACnC,4DAAkC;AAClC,2DAAiC;AACjC,oEAA0C;AAC1C,8DAAoC;AACpC,2DAAiC;AACjC,4DAAkC;AAClC,wDAA8B;AAC9B,6DAAmC;AACnC,mEAAyC;AACzC,0DAAgC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { NgDocPageIndex } from '@ng-doc/core';
|
|
1
2
|
import { Observable } from 'rxjs';
|
|
2
|
-
import {
|
|
3
|
+
import { NgDocBuildResult } from '../../interfaces';
|
|
3
4
|
import { NgDocEntity } from './abstractions/entity';
|
|
4
5
|
export declare class NgDocIndexesEntity extends NgDocEntity {
|
|
5
6
|
readonly id: string;
|
|
@@ -7,7 +8,5 @@ export declare class NgDocIndexesEntity extends NgDocEntity {
|
|
|
7
8
|
readonly rootFiles: string[];
|
|
8
9
|
readonly parent: undefined;
|
|
9
10
|
readonly buildCandidates: NgDocEntity[];
|
|
10
|
-
|
|
11
|
-
private buildIndexes;
|
|
12
|
-
private buildExportedKeywords;
|
|
11
|
+
build(): Observable<NgDocBuildResult<NgDocPageIndex[]>>;
|
|
13
12
|
}
|
|
@@ -4,7 +4,6 @@ exports.NgDocIndexesEntity = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
6
|
const rxjs_1 = require("rxjs");
|
|
7
|
-
const operators_1 = require("rxjs/operators");
|
|
8
7
|
const entity_1 = require("./abstractions/entity");
|
|
9
8
|
class NgDocIndexesEntity extends entity_1.NgDocEntity {
|
|
10
9
|
constructor() {
|
|
@@ -15,22 +14,21 @@ class NgDocIndexesEntity extends entity_1.NgDocEntity {
|
|
|
15
14
|
this.parent = undefined;
|
|
16
15
|
this.buildCandidates = [];
|
|
17
16
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
buildIndexes() {
|
|
22
|
-
const allIndexes = this.store
|
|
17
|
+
build() {
|
|
18
|
+
const result = this.store
|
|
23
19
|
.asArray()
|
|
24
20
|
.map((entity) => entity.indexes)
|
|
25
21
|
.flat();
|
|
26
|
-
return (0, rxjs_1.of)(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
return (0, rxjs_1.of)({
|
|
23
|
+
result,
|
|
24
|
+
entity: this,
|
|
25
|
+
toBuilderOutput: (content) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
return ({
|
|
27
|
+
content: JSON.stringify(content, null, 2),
|
|
28
|
+
filePath: path_1.default.join(this.context.assetsPath, 'indexes.json'),
|
|
29
|
+
});
|
|
30
|
+
}),
|
|
31
|
+
});
|
|
34
32
|
}
|
|
35
33
|
}
|
|
36
34
|
exports.NgDocIndexesEntity = NgDocIndexesEntity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexes.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/indexes.entity.ts"],"names":[],"mappings":";;;;AACA,wDAAwB;AACxB,+
|
|
1
|
+
{"version":3,"file":"indexes.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/indexes.entity.ts"],"names":[],"mappings":";;;;AACA,wDAAwB;AACxB,+BAAoC;AAGpC,kDAAkD;AAElD,MAAa,kBAAmB,SAAQ,oBAAW;IAAnD;;QACU,OAAE,GAAW,oBAAoB,CAAC;QAClC,WAAM,GAAY,IAAI,CAAC;QACvB,cAAS,GAAa,EAAE,CAAC;QACzB,WAAM,GAAc,SAAS,CAAC;QAC9B,oBAAe,GAAkB,EAAE,CAAC;IAiB9C,CAAC;IAfA,KAAK;QACJ,MAAM,MAAM,GAAqB,IAAI,CAAC,KAAK;aACzC,OAAO,EAAE;aACT,GAAG,CAAC,CAAC,MAAmB,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;aAC5C,IAAI,EAAE,CAAC;QAET,OAAO,IAAA,SAAE,EAAC;YACT,MAAM;YACN,MAAM,EAAE,IAAI;YACZ,eAAe,EAAE,CAAO,OAAyB,EAAE,EAAE;gBAAC,OAAA,CAAC;oBACtD,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;oBACzC,QAAQ,EAAE,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC;iBAC5D,CAAC,CAAA;cAAA;SACF,CAAC,CAAC;IACJ,CAAC;CACD;AAtBD,gDAsBC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NgDocKeyword } from '@ng-doc/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { NgDocBuildResult } from '../../interfaces';
|
|
4
|
+
import { NgDocEntity } from './abstractions/entity';
|
|
5
|
+
export declare class NgDocKeywordsEntity extends NgDocEntity {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly isRoot: boolean;
|
|
8
|
+
readonly rootFiles: string[];
|
|
9
|
+
readonly parent: undefined;
|
|
10
|
+
readonly buildCandidates: NgDocEntity[];
|
|
11
|
+
build(): Observable<NgDocBuildResult<Record<string, NgDocKeyword>>>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NgDocKeywordsEntity = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
|
+
const rxjs_1 = require("rxjs");
|
|
7
|
+
const entity_1 = require("./abstractions/entity");
|
|
8
|
+
class NgDocKeywordsEntity extends entity_1.NgDocEntity {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.id = 'NgDocKeywordsEntity';
|
|
12
|
+
this.isRoot = true;
|
|
13
|
+
this.rootFiles = [];
|
|
14
|
+
this.parent = undefined;
|
|
15
|
+
this.buildCandidates = [];
|
|
16
|
+
}
|
|
17
|
+
build() {
|
|
18
|
+
const result = this.store.getKeywords();
|
|
19
|
+
return (0, rxjs_1.of)({
|
|
20
|
+
result,
|
|
21
|
+
entity: this,
|
|
22
|
+
toBuilderOutput: (content) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
return ({
|
|
24
|
+
content: JSON.stringify(content),
|
|
25
|
+
filePath: path_1.default.join(this.context.assetsPath, 'keywords.json'),
|
|
26
|
+
});
|
|
27
|
+
}),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.NgDocKeywordsEntity = NgDocKeywordsEntity;
|
|
32
|
+
//# sourceMappingURL=keywords.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keywords.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/keywords.entity.ts"],"names":[],"mappings":";;;;AACA,wDAAwB;AACxB,+BAAoC;AAGpC,kDAAkD;AAElD,MAAa,mBAAoB,SAAQ,oBAAW;IAApD;;QACU,OAAE,GAAW,qBAAqB,CAAC;QACnC,WAAM,GAAY,IAAI,CAAC;QACvB,cAAS,GAAa,EAAE,CAAC;QACzB,WAAM,GAAc,SAAS,CAAC;QAC9B,oBAAe,GAAkB,EAAE,CAAC;IAc9C,CAAC;IAZA,KAAK;QACJ,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QAExC,OAAO,IAAA,SAAE,EAAC;YACT,MAAM;YACN,MAAM,EAAE,IAAI;YACZ,eAAe,EAAE,CAAO,OAAqC,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAClE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;oBAChC,QAAQ,EAAE,cAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,eAAe,CAAC;iBAC7D,CAAC,CAAA;cAAA;SACF,CAAC,CAAC;IACJ,CAAC;CACD;AAnBD,kDAmBC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { NgDocBuilderContext, NgDocBuildResult } from '../../interfaces';
|
|
3
|
+
import { NgDocComponentAsset } from '../../types';
|
|
4
|
+
import { NgDocEntityStore } from '../entity-store';
|
|
5
|
+
import { NgDocEntity } from './abstractions/entity';
|
|
6
|
+
import { NgDocCache } from './cache';
|
|
7
|
+
import { NgDocPageEntity } from './page.entity';
|
|
8
|
+
export declare class NgDocPageDemoEntity extends NgDocEntity {
|
|
9
|
+
readonly store: NgDocEntityStore;
|
|
10
|
+
readonly cache: NgDocCache;
|
|
11
|
+
readonly context: NgDocBuilderContext;
|
|
12
|
+
readonly parent: NgDocPageEntity;
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly isRoot: boolean;
|
|
15
|
+
constructor(store: NgDocEntityStore, cache: NgDocCache, context: NgDocBuilderContext, parent: NgDocPageEntity);
|
|
16
|
+
get rootFiles(): string[];
|
|
17
|
+
get buildCandidates(): NgDocEntity[];
|
|
18
|
+
get outputPath(): string;
|
|
19
|
+
build(): Observable<NgDocBuildResult<NgDocComponentAsset>>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NgDocPageDemoEntity = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
|
+
const rxjs_1 = require("rxjs");
|
|
7
|
+
const helpers_1 = require("../../helpers");
|
|
8
|
+
const nunjucks_1 = require("../nunjucks");
|
|
9
|
+
const entity_1 = require("./abstractions/entity");
|
|
10
|
+
const cache_1 = require("./cache");
|
|
11
|
+
const plugins_1 = require("./plugins");
|
|
12
|
+
const apply_plugin_1 = require("./plugins/entity-plugins/apply.plugin");
|
|
13
|
+
const wrap_code_plugin_1 = require("./plugins/entity-plugins/wrap-code.plugin");
|
|
14
|
+
exports.NgDocPageDemoEntity = (() => {
|
|
15
|
+
let _classDecorators = [(0, cache_1.CachedEntity)()];
|
|
16
|
+
let _classDescriptor;
|
|
17
|
+
let _classExtraInitializers = [];
|
|
18
|
+
let _classThis;
|
|
19
|
+
let _instanceExtraInitializers = [];
|
|
20
|
+
let _get_outputPath_decorators;
|
|
21
|
+
var NgDocPageDemoEntity = _classThis = class extends entity_1.NgDocEntity {
|
|
22
|
+
constructor(store, cache, context, parent) {
|
|
23
|
+
super(store, cache, context);
|
|
24
|
+
this.store = (tslib_1.__runInitializers(this, _instanceExtraInitializers), store);
|
|
25
|
+
this.cache = cache;
|
|
26
|
+
this.context = context;
|
|
27
|
+
this.parent = parent;
|
|
28
|
+
this.id = `${this.parent.id}#demo`;
|
|
29
|
+
this.isRoot = false;
|
|
30
|
+
}
|
|
31
|
+
get rootFiles() {
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
get buildCandidates() {
|
|
35
|
+
return [this.parent];
|
|
36
|
+
}
|
|
37
|
+
get outputPath() {
|
|
38
|
+
return path_1.default.join(this.parent.folderPath, 'demo-assets.ts');
|
|
39
|
+
}
|
|
40
|
+
build() {
|
|
41
|
+
const objectExpression = this.parent.objectExpression;
|
|
42
|
+
if (objectExpression) {
|
|
43
|
+
this.parent.refreshDependencies();
|
|
44
|
+
const classDeclarations = (0, helpers_1.getDemoClassDeclarations)(objectExpression);
|
|
45
|
+
const componentAssets = Object.keys(classDeclarations).reduce((acc, key) => Object.assign(acc, { [key]: (0, helpers_1.getComponentAssets)(classDeclarations[key]) }), {});
|
|
46
|
+
return (0, rxjs_1.of)({
|
|
47
|
+
result: componentAssets,
|
|
48
|
+
entity: this,
|
|
49
|
+
toBuilderOutput: (demoAssets) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
return ({
|
|
51
|
+
content: (0, nunjucks_1.renderTemplate)('./demo-assets.ts.nunj', { context: { demoAssets } }),
|
|
52
|
+
filePath: this.outputPath,
|
|
53
|
+
});
|
|
54
|
+
}),
|
|
55
|
+
postBuildPlugins: [
|
|
56
|
+
(0, apply_plugin_1.applyPlugin)((0, plugins_1.forObjectValues)(), () => [
|
|
57
|
+
(0, plugins_1.extractSnippetsPlugin)(),
|
|
58
|
+
(0, plugins_1.removeLinesPlugin)(),
|
|
59
|
+
(0, apply_plugin_1.applyPlugin)((0, plugins_1.forArrayItems)(), (asset) => [
|
|
60
|
+
(0, apply_plugin_1.applyPlugin)((0, plugins_1.forObjectValue)('code'), () => [(0, wrap_code_plugin_1.wrapCodePlugin)(asset.lang), (0, plugins_1.processHtmlPlugin)()]),
|
|
61
|
+
(0, apply_plugin_1.applyPlugin)((0, plugins_1.forObjectValue)('filePath'), () => [(0, plugins_1.addToDependenciesPlugin)()]),
|
|
62
|
+
]),
|
|
63
|
+
]),
|
|
64
|
+
],
|
|
65
|
+
postProcessPlugins: [
|
|
66
|
+
(0, apply_plugin_1.applyPlugin)((0, plugins_1.forObjectValues)(), () => [
|
|
67
|
+
(0, apply_plugin_1.applyPlugin)((0, plugins_1.forArrayItems)(), (asset) => [
|
|
68
|
+
(0, apply_plugin_1.applyPlugin)((0, plugins_1.forObjectValue)('code'), () => [(0, plugins_1.postProcessHtmlPlugin)()]),
|
|
69
|
+
]),
|
|
70
|
+
]),
|
|
71
|
+
],
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
throw new Error(`The entity "${this.id}" is not loaded.`);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
tslib_1.__setFunctionName(_classThis, "NgDocPageDemoEntity");
|
|
78
|
+
(() => {
|
|
79
|
+
_get_outputPath_decorators = [(0, cache_1.CachedFilesGetter)()];
|
|
80
|
+
tslib_1.__esDecorate(_classThis, null, _get_outputPath_decorators, { kind: "getter", name: "outputPath", static: false, private: false, access: { has: obj => "outputPath" in obj, get: obj => obj.outputPath } }, null, _instanceExtraInitializers);
|
|
81
|
+
tslib_1.__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers);
|
|
82
|
+
NgDocPageDemoEntity = _classThis = _classDescriptor.value;
|
|
83
|
+
tslib_1.__runInitializers(_classThis, _classExtraInitializers);
|
|
84
|
+
})();
|
|
85
|
+
return NgDocPageDemoEntity = _classThis;
|
|
86
|
+
})();
|
|
87
|
+
//# sourceMappingURL=page-demo.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-demo.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/page-demo.entity.ts"],"names":[],"mappings":";;;;AAAA,wDAAwB;AACxB,+BAAoC;AAEpC,2CAA2E;AAI3E,0CAA2C;AAC3C,kDAAkD;AAClD,mCAAoE;AAEpE,uCAQmB;AACnB,wEAAkE;AAClE,gFAAyE;AAG5D,QAAA,mBAAmB;4BAD/B,IAAA,oBAAY,GAAE;;;;;;QACF,mBAAmB,qBAAC,SAAQ,oBAAW;QAInD,YACmB,KAAuB,EACvB,KAAiB,EACjB,OAA4B,EACrC,MAAuB;YAEhC,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;YALX,UAAK,iEAAL,KAAK,EAA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derContext, NgDocBuildResult, NgDocPlaygroundMetadata } from '../../interfaces';
|
|
3
|
+
import { NgDocEntityStore } from '../entity-store';
|
|
4
|
+
import { NgDocEntity } from './abstractions/entity';
|
|
5
|
+
import { NgDocCache } from './cache';
|
|
6
|
+
import { NgDocPageEntity } from './page.entity';
|
|
7
|
+
export declare class NgDocPagePlaygroundEntity extends NgDocEntity {
|
|
8
|
+
readonly store: NgDocEntityStore;
|
|
9
|
+
readonly cache: NgDocCache;
|
|
10
|
+
readonly context: NgDocBuilderContext;
|
|
11
|
+
readonly parent: NgDocPageEntity;
|
|
12
|
+
id: string;
|
|
13
|
+
isRoot: boolean;
|
|
14
|
+
metadata: Record<string, NgDocPlaygroundMetadata>;
|
|
15
|
+
constructor(store: NgDocEntityStore, cache: NgDocCache, context: NgDocBuilderContext, parent: NgDocPageEntity);
|
|
16
|
+
get rootFiles(): string[];
|
|
17
|
+
get buildCandidates(): NgDocEntity[];
|
|
18
|
+
get outputPath(): string;
|
|
19
|
+
build(): Observable<NgDocBuildResult<string, this>>;
|
|
20
|
+
private getMetadata;
|
|
21
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NgDocPagePlaygroundEntity = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
|
+
const rxjs_1 = require("rxjs");
|
|
7
|
+
const helpers_1 = require("../../helpers");
|
|
8
|
+
const nunjucks_1 = require("../nunjucks");
|
|
9
|
+
const entity_1 = require("./abstractions/entity");
|
|
10
|
+
const cache_1 = require("./cache");
|
|
11
|
+
exports.NgDocPagePlaygroundEntity = (() => {
|
|
12
|
+
var _a;
|
|
13
|
+
let _instanceExtraInitializers = [];
|
|
14
|
+
let _get_outputPath_decorators;
|
|
15
|
+
return _a = class NgDocPagePlaygroundEntity extends entity_1.NgDocEntity {
|
|
16
|
+
constructor(store, cache, context, parent) {
|
|
17
|
+
super(store, cache, context);
|
|
18
|
+
this.store = (tslib_1.__runInitializers(this, _instanceExtraInitializers), store);
|
|
19
|
+
this.cache = cache;
|
|
20
|
+
this.context = context;
|
|
21
|
+
this.parent = parent;
|
|
22
|
+
this.id = `${this.parent.id}#playground`;
|
|
23
|
+
this.isRoot = false;
|
|
24
|
+
this.metadata = {};
|
|
25
|
+
}
|
|
26
|
+
get rootFiles() {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
get buildCandidates() {
|
|
30
|
+
return [this.parent];
|
|
31
|
+
}
|
|
32
|
+
get outputPath() {
|
|
33
|
+
return path_1.default.join(this.parent.folderPath, 'playgrounds.ts');
|
|
34
|
+
}
|
|
35
|
+
build() {
|
|
36
|
+
this.metadata = this.getMetadata();
|
|
37
|
+
const result = (0, nunjucks_1.renderTemplate)('./playgrounds.ts.nunj', {
|
|
38
|
+
context: {
|
|
39
|
+
playgroundMetadata: this.metadata,
|
|
40
|
+
hasImports: this.parent.hasImports,
|
|
41
|
+
targetImportPath: this.parent.importPath,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
return (0, rxjs_1.of)({
|
|
45
|
+
result,
|
|
46
|
+
entity: this,
|
|
47
|
+
toBuilderOutput: (content) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
return ({
|
|
49
|
+
content,
|
|
50
|
+
filePath: this.outputPath,
|
|
51
|
+
});
|
|
52
|
+
}),
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
getMetadata() {
|
|
56
|
+
if (this.parent.objectExpression) {
|
|
57
|
+
this.parent.refreshDependencies();
|
|
58
|
+
const expression = (0, helpers_1.getPlaygroundsExpression)(this.parent.objectExpression);
|
|
59
|
+
if (expression) {
|
|
60
|
+
return (0, helpers_1.getPlaygroundsIds)(expression).reduce((metadata, id) => {
|
|
61
|
+
if (expression) {
|
|
62
|
+
const playground = (0, helpers_1.getPlaygroundById)(expression, id);
|
|
63
|
+
if (playground) {
|
|
64
|
+
metadata[id] = (0, helpers_1.buildPlaygroundMetadata)(id, playground);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return metadata;
|
|
68
|
+
}, {});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return {};
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
(() => {
|
|
75
|
+
_get_outputPath_decorators = [(0, cache_1.CachedFilesGetter)()];
|
|
76
|
+
tslib_1.__esDecorate(_a, null, _get_outputPath_decorators, { kind: "getter", name: "outputPath", static: false, private: false, access: { has: obj => "outputPath" in obj, get: obj => obj.outputPath } }, null, _instanceExtraInitializers);
|
|
77
|
+
})(),
|
|
78
|
+
_a;
|
|
79
|
+
})();
|
|
80
|
+
//# sourceMappingURL=page-playground.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-playground.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/page-playground.entity.ts"],"names":[],"mappings":";;;;AAAA,wDAAwB;AACxB,+BAAoC;AAGpC,2CAAsH;AAGtH,0CAA2C;AAC3C,kDAAkD;AAClD,mCAAsD;AAGzC,QAAA,yBAAyB;;;;sBAAzB,yBAA0B,SAAQ,oBAAW;YAKzD,YACmB,KAAuB,EACvB,KAAiB,EACjB,OAA4B,EACrC,MAAuB;gBAEhC,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;gBALX,UAAK,iEAAL,KAAK,EAAkB;gBACvB,UAAK,GAAL,KAAK,CAAY;gBACjB,YAAO,GAAP,OAAO,CAAqB;gBACrC,WAAM,GAAN,MAAM,CAAiB;gBARxB,OAAE,GAAW,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;gBAC5C,WAAM,GAAY,KAAK,CAAC;gBACjC,aAAQ,GAA4C,EAAE,CAAC;YASvD,CAAC;YAED,IAAa,SAAS;gBACrB,OAAO,EAAE,CAAC;YACX,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f,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAA,iCAAuB,EAAC,EAAE,EAAE,UAAU,CAAC,CAAC;iCACvD;6BACD;4BACD,OAAO,QAAQ,CAAC;wBACjB,CAAC,EAAE,EAAE,CAAC,CAAC;qBACP;iBACD;gBAED,OAAO,EAAE,CAAC;YACX,CAAC;;;0CA/CA,IAAA,yBAAiB,GAAE;YACpB,2LAAI,UAAU,wCAEb"}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { NgDocPage } from '@ng-doc/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
4
|
-
import { NgDocAsset, NgDocBuildOutput, NgDocEntityKeyword, NgDocPlaygroundMetadata } from '../../interfaces';
|
|
3
|
+
import { NgDocBuildResult, NgDocEntityKeyword } from '../../interfaces';
|
|
5
4
|
import { NgDocEntity } from './abstractions/entity';
|
|
6
5
|
import { NgDocNavigationEntity } from './abstractions/navigation.entity';
|
|
7
6
|
import { NgDocCategoryEntity } from './category.entity';
|
|
7
|
+
import { NgDocPagePlaygroundEntity } from './page-playground.entity';
|
|
8
8
|
export declare class NgDocPageEntity extends NgDocNavigationEntity<NgDocPage> {
|
|
9
|
-
playgroundsExpression: ObjectLiteralExpression | undefined;
|
|
10
|
-
demoClassDeclarations: ClassDeclaration[];
|
|
11
|
-
playgroundMetadata: Record<string, NgDocPlaygroundMetadata>;
|
|
12
9
|
parent?: NgDocCategoryEntity;
|
|
13
|
-
private componentAssets;
|
|
14
10
|
get route(): string;
|
|
15
11
|
get isRoot(): boolean;
|
|
16
12
|
get title(): string;
|
|
@@ -27,20 +23,12 @@ export declare class NgDocPageEntity extends NgDocNavigationEntity<NgDocPage> {
|
|
|
27
23
|
get url(): string;
|
|
28
24
|
get mdPath(): string;
|
|
29
25
|
get mdFolder(): string;
|
|
30
|
-
get assets(): NgDocAsset[];
|
|
31
|
-
get assetsFolder(): string;
|
|
32
|
-
get demoAssetsPath(): string;
|
|
33
|
-
get demoAssetsImport(): string;
|
|
34
|
-
get demoAssets(): string | undefined;
|
|
35
|
-
get playgroundsPath(): string;
|
|
36
|
-
get playgroundIds(): string[];
|
|
37
26
|
get hasImports(): boolean;
|
|
38
27
|
setParentDynamically(): void;
|
|
39
28
|
dependenciesChanged(): void;
|
|
29
|
+
childrenGenerator(): Observable<NgDocEntity[]>;
|
|
30
|
+
get playgroundEntity(): NgDocPagePlaygroundEntity;
|
|
40
31
|
protected loadImpl(): Observable<void>;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
private buildModule;
|
|
44
|
-
private buildPlaygrounds;
|
|
45
|
-
private buildDemoAssets;
|
|
32
|
+
build(): Observable<NgDocBuildResult<string, this>>;
|
|
33
|
+
refreshDependencies(): void;
|
|
46
34
|
}
|