@ng-doc/builder 16.1.1 → 16.2.1
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 +3 -0
- package/classes/observable-set.js.map +1 -1
- package/engine/.cache/apps/ng-doc/src/app/pages/docs/develop/ng-doc.page.js +2 -1
- package/engine/.cache/apps/ng-doc/src/app/pages/docs/features/cache/ng-doc.page.js +41 -0
- package/engine/builder.d.ts +4 -0
- package/engine/builder.js +21 -4
- package/engine/builder.js.map +1 -1
- package/engine/entities/abstractions/entity.d.ts +11 -6
- package/engine/entities/abstractions/entity.js +162 -125
- package/engine/entities/abstractions/entity.js.map +1 -1
- package/engine/entities/api-page.entity.js +107 -94
- package/engine/entities/api-page.entity.js.map +1 -1
- package/engine/entities/api-scope.entity.d.ts +1 -0
- package/engine/entities/api-scope.entity.js +93 -76
- package/engine/entities/api-scope.entity.js.map +1 -1
- package/engine/entities/api.entity.js +103 -90
- package/engine/entities/api.entity.js.map +1 -1
- package/engine/entities/cache/cache.d.ts +19 -0
- package/engine/entities/cache/cache.js +47 -0
- package/engine/entities/cache/cache.js.map +1 -0
- package/engine/entities/cache/cached-files-initializer.d.ts +7 -0
- package/engine/entities/cache/cached-files-initializer.js +20 -0
- package/engine/entities/cache/cached-files-initializer.js.map +1 -0
- package/engine/entities/cache/cached-props-initializer.d.ts +8 -0
- package/engine/entities/cache/cached-props-initializer.js +24 -0
- package/engine/entities/cache/cached-props-initializer.js.map +1 -0
- package/engine/entities/cache/decorators/cached-entity.d.ts +12 -0
- package/engine/entities/cache/decorators/cached-entity.js +34 -0
- package/engine/entities/cache/decorators/cached-entity.js.map +1 -0
- package/engine/entities/cache/decorators/cached-files-getter.d.ts +5 -0
- package/engine/entities/cache/decorators/cached-files-getter.js +20 -0
- package/engine/entities/cache/decorators/cached-files-getter.js.map +1 -0
- package/engine/entities/cache/decorators/cached-property.d.ts +7 -0
- package/engine/entities/cache/decorators/cached-property.js +21 -0
- package/engine/entities/cache/decorators/cached-property.js.map +1 -0
- package/engine/entities/cache/decorators/index.d.ts +3 -0
- package/engine/entities/cache/decorators/index.js +7 -0
- package/engine/entities/cache/decorators/index.js.map +1 -0
- package/engine/entities/cache/helpers/create-cache-for-file.d.ts +6 -0
- package/engine/entities/cache/helpers/create-cache-for-file.js +21 -0
- package/engine/entities/cache/helpers/create-cache-for-file.js.map +1 -0
- package/engine/entities/cache/helpers/create-cache.d.ts +9 -0
- package/engine/entities/cache/helpers/create-cache.js +23 -0
- package/engine/entities/cache/helpers/create-cache.js.map +1 -0
- package/engine/entities/cache/helpers/get-cache-dir-path.d.ts +4 -0
- package/engine/entities/cache/helpers/get-cache-dir-path.js +18 -0
- package/engine/entities/cache/helpers/get-cache-dir-path.js.map +1 -0
- package/engine/entities/cache/helpers/get-cache-file-path.d.ts +6 -0
- package/engine/entities/cache/helpers/get-cache-file-path.js +17 -0
- package/engine/entities/cache/helpers/get-cache-file-path.js.map +1 -0
- package/engine/entities/cache/helpers/index.d.ts +8 -0
- package/engine/entities/cache/helpers/index.js +12 -0
- package/engine/entities/cache/helpers/index.js.map +1 -0
- package/engine/entities/cache/helpers/invalidate-cache-if-needed.d.ts +6 -0
- package/engine/entities/cache/helpers/invalidate-cache-if-needed.js +29 -0
- package/engine/entities/cache/helpers/invalidate-cache-if-needed.js.map +1 -0
- package/engine/entities/cache/helpers/is-cache-valid.d.ts +8 -0
- package/engine/entities/cache/helpers/is-cache-valid.js +21 -0
- package/engine/entities/cache/helpers/is-cache-valid.js.map +1 -0
- package/engine/entities/cache/helpers/load-cache.d.ts +7 -0
- package/engine/entities/cache/helpers/load-cache.js +23 -0
- package/engine/entities/cache/helpers/load-cache.js.map +1 -0
- package/engine/entities/cache/helpers/update-cache.d.ts +9 -0
- package/engine/entities/cache/helpers/update-cache.js +24 -0
- package/engine/entities/cache/helpers/update-cache.js.map +1 -0
- package/engine/entities/cache/index.d.ts +4 -0
- package/engine/entities/cache/index.js +8 -0
- package/engine/entities/cache/index.js.map +1 -0
- package/engine/entities/cache/interfaces/cache-accessor.d.ts +5 -0
- package/engine/entities/cache/interfaces/cache-accessor.js +3 -0
- package/engine/entities/cache/interfaces/cache-accessor.js.map +1 -0
- package/engine/entities/cache/interfaces/cached-data.d.ts +5 -0
- package/engine/entities/cache/interfaces/cached-data.js +3 -0
- package/engine/entities/cache/interfaces/cached-data.js.map +1 -0
- package/engine/entities/cache/interfaces/index.d.ts +2 -0
- package/engine/entities/cache/interfaces/index.js +6 -0
- package/engine/entities/cache/interfaces/index.js.map +1 -0
- package/engine/entities/category.entity.js +97 -84
- package/engine/entities/category.entity.js.map +1 -1
- package/engine/entities/dependencies.entity.js +137 -125
- package/engine/entities/dependencies.entity.js.map +1 -1
- package/engine/entities/index.d.ts +1 -0
- package/engine/entities/index.js +1 -0
- package/engine/entities/index.js.map +1 -1
- package/engine/entities/indexes.entity.d.ts +13 -0
- package/engine/entities/indexes.entity.js +38 -0
- package/engine/entities/indexes.entity.js.map +1 -0
- package/engine/entities/page.entity.js +131 -115
- package/engine/entities/page.entity.js.map +1 -1
- package/engine/entities/skeleton.entity.d.ts +0 -1
- package/engine/entities/skeleton.entity.js +1 -19
- package/engine/entities/skeleton.entity.js.map +1 -1
- package/engine/entity-life-cycle.js +2 -4
- package/engine/entity-life-cycle.js.map +1 -1
- package/engine/functions/build-candidates.d.ts +3 -1
- package/engine/functions/build-candidates.js +8 -4
- package/engine/functions/build-candidates.js.map +1 -1
- package/helpers/create-builder-context.js +2 -1
- package/helpers/create-builder-context.js.map +1 -1
- package/helpers/get-component-asset.js +3 -5
- package/helpers/get-component-asset.js.map +1 -1
- package/helpers/load-config.d.ts +1 -1
- package/helpers/load-config.js +2 -1
- package/helpers/load-config.js.map +1 -1
- package/helpers/process-html.js +1 -0
- package/helpers/process-html.js.map +1 -1
- package/helpers/to-template-string.js +1 -1
- package/helpers/to-template-string.js.map +1 -1
- package/helpers/typescript/create-project.js +1 -1
- package/helpers/typescript/create-project.js.map +1 -1
- package/interfaces/builder-context.d.ts +1 -0
- package/interfaces/configuration.d.ts +4 -0
- package/package.json +6 -4
|
@@ -10,101 +10,114 @@ const helpers_1 = require("../../helpers");
|
|
|
10
10
|
const build_indexes_1 = require("../../helpers/build-indexes");
|
|
11
11
|
const is_supported_declaration_1 = require("../../helpers/is-supported-declaration");
|
|
12
12
|
const route_entity_1 = require("./abstractions/route.entity");
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return this.declaration
|
|
34
|
-
? (0, helpers_1.slash)(path.join((0, helpers_1.declarationFolderName)(this.declaration), this.declarationName + (this.index ? this.index : '')))
|
|
35
|
-
: '';
|
|
36
|
-
}
|
|
37
|
-
emit() {
|
|
38
|
-
/**
|
|
39
|
-
* Just refresh source file, we don't need to emit it
|
|
40
|
-
*/
|
|
41
|
-
return (0, rxjs_1.from)(this.sourceFile.refreshFromFileSystem()).pipe((0, operators_1.mapTo)(void 0));
|
|
42
|
-
}
|
|
43
|
-
get title() {
|
|
44
|
-
return this.declarationName;
|
|
45
|
-
}
|
|
46
|
-
get editSourceFileUrl() {
|
|
47
|
-
var _a;
|
|
48
|
-
if (this.context.config.repoConfig) {
|
|
49
|
-
return (0, helpers_1.editFileInRepoUrl)(this.context.config.repoConfig, this.sourceFilePath, this.parent.route.toLowerCase(), (_a = this.declaration) === null || _a === void 0 ? void 0 : _a.getStartLineNumber(true));
|
|
13
|
+
const decorators_1 = require("./cache/decorators");
|
|
14
|
+
exports.NgDocApiPageEntity = (() => {
|
|
15
|
+
let _classDecorators = [(0, decorators_1.CachedEntity)()];
|
|
16
|
+
let _classDescriptor;
|
|
17
|
+
let _classExtraInitializers = [];
|
|
18
|
+
let _classThis;
|
|
19
|
+
var NgDocApiPageEntity = _classThis = class extends route_entity_1.NgDocRouteEntity {
|
|
20
|
+
constructor(builder, sourceFile, context, parent, declarationName, index) {
|
|
21
|
+
super(builder, sourceFile, context);
|
|
22
|
+
this.builder = builder;
|
|
23
|
+
this.sourceFile = sourceFile;
|
|
24
|
+
this.context = context;
|
|
25
|
+
this.parent = parent;
|
|
26
|
+
this.declarationName = declarationName;
|
|
27
|
+
this.index = index;
|
|
28
|
+
this.physical = false;
|
|
29
|
+
this.id = (0, helpers_1.uniqueName)(`${this.sourceFilePath}}#${this.declarationName}`);
|
|
30
|
+
this.folderName = '';
|
|
31
|
+
this.readyToBuild = true;
|
|
32
|
+
this.updateDeclaration();
|
|
50
33
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
var _a;
|
|
55
|
-
if (this.context.config.repoConfig) {
|
|
56
|
-
return (0, helpers_1.viewFileInRepoUrl)(this.context.config.repoConfig, this.sourceFilePath, (_a = this.declaration) === null || _a === void 0 ? void 0 : _a.getStartLineNumber(true));
|
|
34
|
+
get isRoot() {
|
|
35
|
+
// always false, api pages are not rooted
|
|
36
|
+
return false;
|
|
57
37
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
get buildCandidates() {
|
|
64
|
-
return [];
|
|
65
|
-
}
|
|
66
|
-
get keywords() {
|
|
67
|
-
return [this.declarationName];
|
|
68
|
-
}
|
|
69
|
-
update() {
|
|
70
|
-
this.updateDeclaration();
|
|
71
|
-
return (0, rxjs_1.of)(void 0);
|
|
72
|
-
}
|
|
73
|
-
build() {
|
|
74
|
-
return this.isReadyForBuild
|
|
75
|
-
? (0, rxjs_1.forkJoin)([this.buildModule()]).pipe((0, operators_1.map)((output) => output.filter(core_1.isPresent)))
|
|
76
|
-
: (0, rxjs_1.of)([]);
|
|
77
|
-
}
|
|
78
|
-
buildModule() {
|
|
79
|
-
const page = this.builder.renderer
|
|
80
|
-
.render('./api-page.html.nunj', {
|
|
81
|
-
context: {
|
|
82
|
-
declaration: this.declaration,
|
|
83
|
-
scope: this.parent.target,
|
|
84
|
-
},
|
|
85
|
-
})
|
|
86
|
-
.pipe((0, operators_1.switchMap)((output) => (0, helpers_1.processHtml)(this, output)), (0, operators_1.switchMap)((content) => (0, rxjs_1.from)((0, build_indexes_1.buildIndexes)({
|
|
87
|
-
title: this.title,
|
|
88
|
-
content,
|
|
89
|
-
pageType: (0, helpers_1.getPageType)(this),
|
|
90
|
-
breadcrumbs: this.breadcrumbs,
|
|
91
|
-
route: this.fullRoute,
|
|
92
|
-
})).pipe((0, operators_1.tap)((indexes) => this.indexes.push(...indexes)), (0, operators_1.mapTo)(content))));
|
|
93
|
-
return page.pipe((0, operators_1.switchMap)((pageContent) => this.builder.renderer.render('./api-page.module.ts.nunj', {
|
|
94
|
-
context: { page: this, pageContent },
|
|
95
|
-
})), (0, operators_1.map)((output) => ({ content: output, filePath: this.modulePath })));
|
|
96
|
-
}
|
|
97
|
-
updateDeclaration() {
|
|
98
|
-
const declarations = [
|
|
99
|
-
...(0, core_1.asArray)(this.sourceFile.getExportedDeclarations().get(this.declarationName)),
|
|
100
|
-
...(0, core_1.asArray)(this.sourceFile.getExportedDeclarations().get('default')),
|
|
101
|
-
].filter(is_supported_declaration_1.isSupportedDeclaration);
|
|
102
|
-
this.declaration = declarations.find((declaration) => declaration.getName() === this.declarationName);
|
|
103
|
-
// Doesnr work?
|
|
104
|
-
if (!this.declaration) {
|
|
105
|
-
this.destroy();
|
|
38
|
+
get route() {
|
|
39
|
+
return this.declaration
|
|
40
|
+
? (0, helpers_1.slash)(path.join((0, helpers_1.declarationFolderName)(this.declaration), this.declarationName + (this.index ? this.index : '')))
|
|
41
|
+
: '';
|
|
106
42
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
43
|
+
emit() {
|
|
44
|
+
/**
|
|
45
|
+
* Just refresh source file, we don't need to emit it
|
|
46
|
+
*/
|
|
47
|
+
return (0, rxjs_1.from)(this.sourceFile.refreshFromFileSystem()).pipe((0, operators_1.mapTo)(void 0));
|
|
48
|
+
}
|
|
49
|
+
get title() {
|
|
50
|
+
return this.declarationName;
|
|
51
|
+
}
|
|
52
|
+
get editSourceFileUrl() {
|
|
53
|
+
var _a;
|
|
54
|
+
if (this.context.config.repoConfig) {
|
|
55
|
+
return (0, helpers_1.editFileInRepoUrl)(this.context.config.repoConfig, this.sourceFilePath, this.parent.route.toLowerCase(), (_a = this.declaration) === null || _a === void 0 ? void 0 : _a.getStartLineNumber(true));
|
|
56
|
+
}
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
get viewSourceFileUrl() {
|
|
60
|
+
var _a;
|
|
61
|
+
if (this.context.config.repoConfig) {
|
|
62
|
+
return (0, helpers_1.viewFileInRepoUrl)(this.context.config.repoConfig, this.sourceFilePath, (_a = this.declaration) === null || _a === void 0 ? void 0 : _a.getStartLineNumber(true));
|
|
63
|
+
}
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
get folderPath() {
|
|
67
|
+
return path.join(this.parent.folderPath, this.route);
|
|
68
|
+
}
|
|
69
|
+
get buildCandidates() {
|
|
70
|
+
return [];
|
|
71
|
+
}
|
|
72
|
+
get keywords() {
|
|
73
|
+
return [this.declarationName];
|
|
74
|
+
}
|
|
75
|
+
update() {
|
|
76
|
+
this.updateDeclaration();
|
|
77
|
+
return (0, rxjs_1.of)(void 0);
|
|
78
|
+
}
|
|
79
|
+
build() {
|
|
80
|
+
return this.isReadyForBuild
|
|
81
|
+
? (0, rxjs_1.forkJoin)([this.buildModule()]).pipe((0, operators_1.map)((output) => output.filter(core_1.isPresent)))
|
|
82
|
+
: (0, rxjs_1.of)([]);
|
|
83
|
+
}
|
|
84
|
+
buildModule() {
|
|
85
|
+
const page = this.builder.renderer
|
|
86
|
+
.render('./api-page.html.nunj', {
|
|
87
|
+
context: {
|
|
88
|
+
declaration: this.declaration,
|
|
89
|
+
scope: this.parent.target,
|
|
90
|
+
},
|
|
91
|
+
})
|
|
92
|
+
.pipe((0, operators_1.switchMap)((output) => (0, helpers_1.processHtml)(this, output)), (0, operators_1.switchMap)((content) => (0, rxjs_1.from)((0, build_indexes_1.buildIndexes)({
|
|
93
|
+
title: this.title,
|
|
94
|
+
content,
|
|
95
|
+
pageType: (0, helpers_1.getPageType)(this),
|
|
96
|
+
breadcrumbs: this.breadcrumbs,
|
|
97
|
+
route: this.fullRoute,
|
|
98
|
+
})).pipe((0, operators_1.tap)((indexes) => this.indexes.push(...indexes)), (0, operators_1.mapTo)(content))));
|
|
99
|
+
return page.pipe((0, operators_1.switchMap)((pageContent) => this.builder.renderer.render('./api-page.module.ts.nunj', {
|
|
100
|
+
context: { page: this, pageContent },
|
|
101
|
+
})), (0, operators_1.map)((output) => ({ content: output, filePath: this.modulePath })));
|
|
102
|
+
}
|
|
103
|
+
updateDeclaration() {
|
|
104
|
+
const declarations = [
|
|
105
|
+
...(0, core_1.asArray)(this.sourceFile.getExportedDeclarations().get(this.declarationName)),
|
|
106
|
+
...(0, core_1.asArray)(this.sourceFile.getExportedDeclarations().get('default')),
|
|
107
|
+
].filter(is_supported_declaration_1.isSupportedDeclaration);
|
|
108
|
+
this.declaration = declarations.find((declaration) => declaration.getName() === this.declarationName);
|
|
109
|
+
// Doesnr work?
|
|
110
|
+
if (!this.declaration) {
|
|
111
|
+
this.destroy();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
tslib_1.__setFunctionName(_classThis, "NgDocApiPageEntity");
|
|
116
|
+
(() => {
|
|
117
|
+
tslib_1.__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers);
|
|
118
|
+
NgDocApiPageEntity = _classThis = _classDescriptor.value;
|
|
119
|
+
tslib_1.__runInitializers(_classThis, _classExtraInitializers);
|
|
120
|
+
})();
|
|
121
|
+
return NgDocApiPageEntity = _classThis;
|
|
122
|
+
})();
|
|
110
123
|
//# sourceMappingURL=api-page.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-page.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/api-page.entity.ts"],"names":[],"mappings":";;;;AAAA,uCAAgE;AAChE,mDAA6B;AAC7B,+BAAoD;AACpD,8CAA0D;AAG1D,2CAQuB;AACvB,+DAAyD;AACzD,qFAA8E;AAK9E,8DAA6D;
|
|
1
|
+
{"version":3,"file":"api-page.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/api-page.entity.ts"],"names":[],"mappings":";;;;AAAA,uCAAgE;AAChE,mDAA6B;AAC7B,+BAAoD;AACpD,8CAA0D;AAG1D,2CAQuB;AACvB,+DAAyD;AACzD,qFAA8E;AAK9E,8DAA6D;AAE7D,mDAAgD;AAGnC,QAAA,kBAAkB;4BAD9B,IAAA,yBAAY,GAAE;;;;QACF,kBAAkB,qBAAC,SAAQ,+BAAuB;QAQ9D,YACmB,OAAqB,EACrB,UAAsB,EACtB,OAA4B,EACrC,MAA2B,EAC3B,eAAuB,EACvB,KAAa;YAEtB,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;YAPlB,YAAO,GAAP,OAAO,CAAc;YACrB,eAAU,GAAV,UAAU,CAAY;YACtB,YAAO,GAAP,OAAO,CAAqB;YACrC,WAAM,GAAN,MAAM,CAAqB;YAC3B,oBAAe,GAAf,eAAe,CAAQ;YACvB,UAAK,GAAL,KAAK,CAAQ;YAXL,aAAQ,GAAY,KAAK,CAAC;YAC1B,OAAE,GAAW,IAAA,oBAAU,EAAC,GAAG,IAAI,CAAC,cAAc,KAAK,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;YACpF,eAAU,GAAW,EAAE,CAAC;YACd,iBAAY,GAAY,IAAI,CAAC;YAY/C,IAAI,CAAC,iB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AAI,CAAC,IAAI,CAAC,WAAW,EAAE;gBACtB,IAAI,CAAC,OAAO,EAAE,CAAC;aACf;QACF,CAAC;;;;QA7IF,gKA8IC;QA9IY,kBAAkB;QAAlB,+DAAkB;;WAAlB,kBAAkB"}
|
|
@@ -1,85 +1,102 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NgDocApiScopeEntity = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const core_1 = require("@ng-doc/core");
|
|
5
6
|
const rxjs_1 = require("rxjs");
|
|
6
7
|
const operators_1 = require("rxjs/operators");
|
|
7
8
|
const helpers_1 = require("../../helpers");
|
|
8
9
|
const route_entity_1 = require("./abstractions/route.entity");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
10
|
+
const decorators_1 = require("./cache/decorators");
|
|
11
|
+
exports.NgDocApiScopeEntity = (() => {
|
|
12
|
+
let _classDecorators = [(0, decorators_1.CachedEntity)()];
|
|
13
|
+
let _classDescriptor;
|
|
14
|
+
let _classExtraInitializers = [];
|
|
15
|
+
let _classThis;
|
|
16
|
+
var NgDocApiScopeEntity = _classThis = class extends route_entity_1.NgDocRouteEntity {
|
|
17
|
+
constructor(builder, sourceFile, context, parent, target) {
|
|
18
|
+
super(builder, sourceFile, context);
|
|
19
|
+
this.builder = builder;
|
|
20
|
+
this.sourceFile = sourceFile;
|
|
21
|
+
this.context = context;
|
|
22
|
+
this.parent = parent;
|
|
23
|
+
this.target = target;
|
|
24
|
+
this.physical = false;
|
|
25
|
+
this.readyToBuild = true;
|
|
26
|
+
this.id = (0, helpers_1.uniqueName)(`${this.sourceFilePath}#${this.target.route}`);
|
|
27
|
+
}
|
|
28
|
+
get rootFiles() {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
get isRoot() {
|
|
32
|
+
// always false, api scopes are not rooted
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
get route() {
|
|
36
|
+
return this.target.route;
|
|
37
|
+
}
|
|
38
|
+
get keywords() {
|
|
39
|
+
return [];
|
|
40
|
+
}
|
|
41
|
+
get folderName() {
|
|
42
|
+
return this.route;
|
|
43
|
+
}
|
|
44
|
+
get cachedFilePaths() {
|
|
45
|
+
return this.parent.rootFiles;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Returns full url from the root
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
*/
|
|
52
|
+
get url() {
|
|
53
|
+
return `${this.parent ? this.parent.url + '/' : ''}${this.route}`;
|
|
54
|
+
}
|
|
55
|
+
get pages() {
|
|
56
|
+
return (0, core_1.asArray)(this.children.values()).filter(helpers_1.isPageEntity);
|
|
57
|
+
}
|
|
58
|
+
get title() {
|
|
59
|
+
return this.target.name;
|
|
60
|
+
}
|
|
61
|
+
get order() {
|
|
62
|
+
return this.target.order;
|
|
63
|
+
}
|
|
64
|
+
get buildCandidates() {
|
|
65
|
+
return this.childEntities;
|
|
66
|
+
}
|
|
67
|
+
emit() {
|
|
68
|
+
// Emitting source file is not necessary for this type of entity
|
|
69
|
+
return (0, rxjs_1.of)(void 0);
|
|
70
|
+
}
|
|
71
|
+
update() {
|
|
72
|
+
return (0, rxjs_1.of)(void 0);
|
|
73
|
+
}
|
|
74
|
+
build() {
|
|
75
|
+
return this.isReadyForBuild ? (0, rxjs_1.forkJoin)([this.buildModule()]) : (0, rxjs_1.of)([]);
|
|
76
|
+
}
|
|
77
|
+
buildModule() {
|
|
78
|
+
if (this.target) {
|
|
79
|
+
return this.builder.renderer
|
|
80
|
+
.render('./api-scope.module.ts.nunj', {
|
|
81
|
+
context: {
|
|
82
|
+
scope: this,
|
|
83
|
+
},
|
|
84
|
+
})
|
|
85
|
+
.pipe((0, operators_1.map)((output) => ({ content: output, filePath: this.modulePath })));
|
|
86
|
+
}
|
|
87
|
+
return (0, rxjs_1.of)();
|
|
88
|
+
}
|
|
89
|
+
destroy() {
|
|
90
|
+
this.children.forEach((child) => child.destroy());
|
|
91
|
+
super.destroy();
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
tslib_1.__setFunctionName(_classThis, "NgDocApiScopeEntity");
|
|
95
|
+
(() => {
|
|
96
|
+
tslib_1.__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers);
|
|
97
|
+
NgDocApiScopeEntity = _classThis = _classDescriptor.value;
|
|
98
|
+
tslib_1.__runInitializers(_classThis, _classExtraInitializers);
|
|
99
|
+
})();
|
|
100
|
+
return NgDocApiScopeEntity = _classThis;
|
|
101
|
+
})();
|
|
85
102
|
//# sourceMappingURL=api-scope.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-scope.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/api-scope.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api-scope.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/api-scope.entity.ts"],"names":[],"mappings":";;;;AAAA,uCAAoD;AACpD,+BAA8C;AAC9C,8CAAmC;AAGnC,2CAAuD;AAIvD,8DAA6D;AAE7D,mDAAgD;AAInC,QAAA,mBAAmB;4BAD/B,IAAA,yBAAY,GAAE;;;;QACF,mBAAmB,qBAAC,SAAQ,+BAA+B;QAKvE,YACmB,OAAqB,EACrB,UAAsB,EACtB,OAA4B,EACrC,MAAsB,EACtB,MAAqB;YAE9B,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;YANlB,YAAO,GAAP,OAAO,CAAc;YACrB,eAAU,GAAV,UAAU,CAAY;YACtB,YAAO,GAAP,OAAO,CAAqB;YACrC,WAAM,GAAN,MAAM,CAAgB;YACtB,WAAM,GAAN,MAAM,CAAe;YATb,aAAQ,GAAY,KAAK,CAAC;YACzB,iBAAY,GAAY,IAAI,CAAC;YACvC,OAAE,GAAW,IAAA,oBAAU,EAAC,GAAG,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAUhF,CAAC;QAED,IAAa,SAAS;YACrB,OAAO,EAAE,CAAC;QACX,CAAC;QAED,IAAa,MAAM;YAClB,0CAA0C;YAC1C,OAAO,KAAK,CAAC;QACd,CAAC;QAED,IAAa,KAAK;YACjB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;QAC1B,CAAC;QAED,IAAa,QAAQ;YACpB,OAAO,EAAE,CAAC;QACX,CAAC;QA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;qBACX;iBACD,CAAC;qBACD,IAAI,CAAC,IAAA,eAAG,EAAC,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC,EAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAC,CAAC,CAAC,CAAC,CAAC;aAChF;YACD,OAAO,IAAA,SAAE,GAAE,CAAC;QACb,CAAC;QAEQ,OAAO;YACf,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAkB,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YAE/D,KAAK,CAAC,OAAO,EAAE,CAAC;QACjB,CAAC;;;;QA/FF,gKAgGC;QAhGY,mBAAmB;QAAnB,+DAAmB;;WAAnB,mBAAmB"}
|
|
@@ -7,96 +7,109 @@ const rxjs_1 = require("rxjs");
|
|
|
7
7
|
const operators_1 = require("rxjs/operators");
|
|
8
8
|
const helpers_1 = require("../../helpers");
|
|
9
9
|
const navigation_entity_1 = require("./abstractions/navigation.entity");
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
10
|
+
const decorators_1 = require("./cache/decorators");
|
|
11
|
+
exports.NgDocApiEntity = (() => {
|
|
12
|
+
let _classDecorators = [(0, decorators_1.CachedEntity)()];
|
|
13
|
+
let _classDescriptor;
|
|
14
|
+
let _classExtraInitializers = [];
|
|
15
|
+
let _classThis;
|
|
16
|
+
var NgDocApiEntity = _classThis = class extends navigation_entity_1.NgDocNavigationEntity {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.moduleFileName = `${(0, helpers_1.uniqueName)('ng-doc-api-list')}.module.ts`;
|
|
20
|
+
this.compilable = true;
|
|
21
|
+
}
|
|
22
|
+
get route() {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
return (_b = (_a = this.target) === null || _a === void 0 ? void 0 : _a.route) !== null && _b !== void 0 ? _b : 'api';
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Returns full url from the root
|
|
28
|
+
*
|
|
29
|
+
* @type {string}
|
|
30
|
+
*/
|
|
31
|
+
get url() {
|
|
32
|
+
return `${this.parent ? this.parent.url + '/' : ''}${this.route}`;
|
|
33
|
+
}
|
|
34
|
+
get isRoot() {
|
|
35
|
+
var _a;
|
|
36
|
+
return !((_a = this.target) === null || _a === void 0 ? void 0 : _a.category);
|
|
37
|
+
}
|
|
38
|
+
get title() {
|
|
39
|
+
var _a, _b;
|
|
40
|
+
return (_b = (_a = this.target) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : '';
|
|
41
|
+
}
|
|
42
|
+
get order() {
|
|
43
|
+
var _a;
|
|
44
|
+
return (_a = this.target) === null || _a === void 0 ? void 0 : _a.order;
|
|
45
|
+
}
|
|
46
|
+
get buildCandidates() {
|
|
47
|
+
return this.parentEntities;
|
|
48
|
+
}
|
|
49
|
+
get folderPath() {
|
|
50
|
+
return path.join(this.context.apiPath, this.route);
|
|
51
|
+
}
|
|
52
|
+
get keywords() {
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
childrenGenerator() {
|
|
56
|
+
this.children.forEach((child) => child.destroy());
|
|
57
|
+
return this.emit().pipe((0, operators_1.switchMap)(() => this.builder.emit(this.sourceFile)), (0, operators_1.switchMap)(() => this.update()), (0, operators_1.map)(() => (0, helpers_1.generateApiEntities)(this)));
|
|
58
|
+
}
|
|
59
|
+
update() {
|
|
60
|
+
return super.update().pipe((0, operators_1.tap)(() => {
|
|
61
|
+
if (!this.title) {
|
|
62
|
+
throw new Error(`Failed to load ${this.sourceFile.getFilePath()}. Make sure that you have a title property.`);
|
|
63
|
+
}
|
|
64
|
+
this.parent = this.getParentFromCategory();
|
|
65
|
+
}), (0, operators_1.catchError)((error) => {
|
|
66
|
+
this.readyToBuild = false;
|
|
67
|
+
this.context.context.logger.error(`\n${String(error)}`);
|
|
68
|
+
return (0, rxjs_1.of)(void 0);
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
build() {
|
|
72
|
+
return this.isReadyForBuild ? (0, rxjs_1.forkJoin)([this.buildModule(), this.buildApiList()]) : (0, rxjs_1.of)([]);
|
|
73
|
+
}
|
|
74
|
+
buildModule() {
|
|
75
|
+
if (this.target) {
|
|
76
|
+
return this.builder.renderer
|
|
77
|
+
.render('./api.module.ts.nunj', {
|
|
78
|
+
context: {
|
|
79
|
+
api: this,
|
|
80
|
+
},
|
|
81
|
+
})
|
|
82
|
+
.pipe((0, operators_1.map)((output) => ({ content: output, filePath: this.modulePath })));
|
|
57
83
|
}
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
this.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
.
|
|
84
|
+
return (0, rxjs_1.of)();
|
|
85
|
+
}
|
|
86
|
+
buildApiList() {
|
|
87
|
+
const apiItems = this.children
|
|
88
|
+
.filter(helpers_1.isApiScopeEntity)
|
|
89
|
+
.sort((a, b) => { var _a, _b; return ((_a = b.order) !== null && _a !== void 0 ? _a : 0) - ((_b = a.order) !== null && _b !== void 0 ? _b : 0); })
|
|
90
|
+
.map((scope) => ({
|
|
91
|
+
title: scope.title,
|
|
92
|
+
items: scope.children.filter(helpers_1.isApiPageEntity).map((page) => {
|
|
93
|
+
var _a, _b, _c;
|
|
94
|
+
return ({
|
|
95
|
+
route: (0, helpers_1.slash)(path.join(scope.route, page.route)),
|
|
96
|
+
type: (_a = (page.declaration && (0, helpers_1.getKindType)(page.declaration))) !== null && _a !== void 0 ? _a : '',
|
|
97
|
+
name: (_c = (_b = page.declaration) === null || _b === void 0 ? void 0 : _b.getName()) !== null && _c !== void 0 ? _c : '',
|
|
98
|
+
});
|
|
99
|
+
}),
|
|
100
|
+
}));
|
|
101
|
+
return (0, rxjs_1.of)({
|
|
102
|
+
content: JSON.stringify(apiItems, undefined, 2),
|
|
103
|
+
filePath: path.join(this.folderPath, 'ng-doc.api-list.json'),
|
|
104
|
+
});
|
|
77
105
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
var _a, _b, _c;
|
|
88
|
-
return ({
|
|
89
|
-
route: (0, helpers_1.slash)(path.join(scope.route, page.route)),
|
|
90
|
-
type: (_a = (page.declaration && (0, helpers_1.getKindType)(page.declaration))) !== null && _a !== void 0 ? _a : '',
|
|
91
|
-
name: (_c = (_b = page.declaration) === null || _b === void 0 ? void 0 : _b.getName()) !== null && _c !== void 0 ? _c : '',
|
|
92
|
-
});
|
|
93
|
-
}),
|
|
94
|
-
}));
|
|
95
|
-
return (0, rxjs_1.of)({
|
|
96
|
-
content: JSON.stringify(apiItems, undefined, 2),
|
|
97
|
-
filePath: path.join(this.folderPath, 'ng-doc.api-list.json'),
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
exports.NgDocApiEntity = NgDocApiEntity;
|
|
106
|
+
};
|
|
107
|
+
tslib_1.__setFunctionName(_classThis, "NgDocApiEntity");
|
|
108
|
+
(() => {
|
|
109
|
+
tslib_1.__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers);
|
|
110
|
+
NgDocApiEntity = _classThis = _classDescriptor.value;
|
|
111
|
+
tslib_1.__runInitializers(_classThis, _classExtraInitializers);
|
|
112
|
+
})();
|
|
113
|
+
return NgDocApiEntity = _classThis;
|
|
114
|
+
})();
|
|
102
115
|
//# sourceMappingURL=api.entity.js.map
|