@ng-doc/builder 16.1.0 → 16.2.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.
Files changed (112) hide show
  1. package/classes/observable-set.d.ts +1 -0
  2. package/classes/observable-set.js +3 -0
  3. package/classes/observable-set.js.map +1 -1
  4. package/engine/.cache/apps/ng-doc/src/app/pages/docs/develop/ng-doc.page.js +2 -1
  5. package/engine/.cache/apps/ng-doc/src/app/pages/docs/features/cache/ng-doc.page.js +41 -0
  6. package/engine/builder.d.ts +4 -0
  7. package/engine/builder.js +21 -4
  8. package/engine/builder.js.map +1 -1
  9. package/engine/entities/abstractions/entity.d.ts +11 -6
  10. package/engine/entities/abstractions/entity.js +162 -125
  11. package/engine/entities/abstractions/entity.js.map +1 -1
  12. package/engine/entities/api-page.entity.js +107 -94
  13. package/engine/entities/api-page.entity.js.map +1 -1
  14. package/engine/entities/api-scope.entity.d.ts +1 -0
  15. package/engine/entities/api-scope.entity.js +93 -76
  16. package/engine/entities/api-scope.entity.js.map +1 -1
  17. package/engine/entities/api.entity.js +103 -90
  18. package/engine/entities/api.entity.js.map +1 -1
  19. package/engine/entities/cache/cache.d.ts +19 -0
  20. package/engine/entities/cache/cache.js +47 -0
  21. package/engine/entities/cache/cache.js.map +1 -0
  22. package/engine/entities/cache/cached-files-initializer.d.ts +7 -0
  23. package/engine/entities/cache/cached-files-initializer.js +20 -0
  24. package/engine/entities/cache/cached-files-initializer.js.map +1 -0
  25. package/engine/entities/cache/cached-props-initializer.d.ts +8 -0
  26. package/engine/entities/cache/cached-props-initializer.js +24 -0
  27. package/engine/entities/cache/cached-props-initializer.js.map +1 -0
  28. package/engine/entities/cache/decorators/cached-entity.d.ts +12 -0
  29. package/engine/entities/cache/decorators/cached-entity.js +34 -0
  30. package/engine/entities/cache/decorators/cached-entity.js.map +1 -0
  31. package/engine/entities/cache/decorators/cached-files-getter.d.ts +5 -0
  32. package/engine/entities/cache/decorators/cached-files-getter.js +20 -0
  33. package/engine/entities/cache/decorators/cached-files-getter.js.map +1 -0
  34. package/engine/entities/cache/decorators/cached-property.d.ts +7 -0
  35. package/engine/entities/cache/decorators/cached-property.js +21 -0
  36. package/engine/entities/cache/decorators/cached-property.js.map +1 -0
  37. package/engine/entities/cache/decorators/index.d.ts +3 -0
  38. package/engine/entities/cache/decorators/index.js +7 -0
  39. package/engine/entities/cache/decorators/index.js.map +1 -0
  40. package/engine/entities/cache/helpers/create-cache-for-file.d.ts +6 -0
  41. package/engine/entities/cache/helpers/create-cache-for-file.js +21 -0
  42. package/engine/entities/cache/helpers/create-cache-for-file.js.map +1 -0
  43. package/engine/entities/cache/helpers/create-cache.d.ts +9 -0
  44. package/engine/entities/cache/helpers/create-cache.js +23 -0
  45. package/engine/entities/cache/helpers/create-cache.js.map +1 -0
  46. package/engine/entities/cache/helpers/get-cache-dir-path.d.ts +4 -0
  47. package/engine/entities/cache/helpers/get-cache-dir-path.js +18 -0
  48. package/engine/entities/cache/helpers/get-cache-dir-path.js.map +1 -0
  49. package/engine/entities/cache/helpers/get-cache-file-path.d.ts +6 -0
  50. package/engine/entities/cache/helpers/get-cache-file-path.js +17 -0
  51. package/engine/entities/cache/helpers/get-cache-file-path.js.map +1 -0
  52. package/engine/entities/cache/helpers/index.d.ts +8 -0
  53. package/engine/entities/cache/helpers/index.js +12 -0
  54. package/engine/entities/cache/helpers/index.js.map +1 -0
  55. package/engine/entities/cache/helpers/invalidate-cache-if-needed.d.ts +6 -0
  56. package/engine/entities/cache/helpers/invalidate-cache-if-needed.js +29 -0
  57. package/engine/entities/cache/helpers/invalidate-cache-if-needed.js.map +1 -0
  58. package/engine/entities/cache/helpers/is-cache-valid.d.ts +8 -0
  59. package/engine/entities/cache/helpers/is-cache-valid.js +21 -0
  60. package/engine/entities/cache/helpers/is-cache-valid.js.map +1 -0
  61. package/engine/entities/cache/helpers/load-cache.d.ts +7 -0
  62. package/engine/entities/cache/helpers/load-cache.js +23 -0
  63. package/engine/entities/cache/helpers/load-cache.js.map +1 -0
  64. package/engine/entities/cache/helpers/update-cache.d.ts +9 -0
  65. package/engine/entities/cache/helpers/update-cache.js +24 -0
  66. package/engine/entities/cache/helpers/update-cache.js.map +1 -0
  67. package/engine/entities/cache/index.d.ts +4 -0
  68. package/engine/entities/cache/index.js +8 -0
  69. package/engine/entities/cache/index.js.map +1 -0
  70. package/engine/entities/cache/interfaces/cache-accessor.d.ts +5 -0
  71. package/engine/entities/cache/interfaces/cache-accessor.js +3 -0
  72. package/engine/entities/cache/interfaces/cache-accessor.js.map +1 -0
  73. package/engine/entities/cache/interfaces/cached-data.d.ts +5 -0
  74. package/engine/entities/cache/interfaces/cached-data.js +3 -0
  75. package/engine/entities/cache/interfaces/cached-data.js.map +1 -0
  76. package/engine/entities/cache/interfaces/index.d.ts +2 -0
  77. package/engine/entities/cache/interfaces/index.js +6 -0
  78. package/engine/entities/cache/interfaces/index.js.map +1 -0
  79. package/engine/entities/category.entity.js +97 -84
  80. package/engine/entities/category.entity.js.map +1 -1
  81. package/engine/entities/dependencies.entity.js +137 -125
  82. package/engine/entities/dependencies.entity.js.map +1 -1
  83. package/engine/entities/index.d.ts +1 -0
  84. package/engine/entities/index.js +1 -0
  85. package/engine/entities/index.js.map +1 -1
  86. package/engine/entities/indexes.entity.d.ts +13 -0
  87. package/engine/entities/indexes.entity.js +38 -0
  88. package/engine/entities/indexes.entity.js.map +1 -0
  89. package/engine/entities/page.entity.js +131 -115
  90. package/engine/entities/page.entity.js.map +1 -1
  91. package/engine/entities/skeleton.entity.d.ts +0 -1
  92. package/engine/entities/skeleton.entity.js +1 -19
  93. package/engine/entities/skeleton.entity.js.map +1 -1
  94. package/engine/entity-life-cycle.js +2 -4
  95. package/engine/entity-life-cycle.js.map +1 -1
  96. package/engine/functions/build-candidates.d.ts +3 -1
  97. package/engine/functions/build-candidates.js +8 -4
  98. package/engine/functions/build-candidates.js.map +1 -1
  99. package/helpers/create-builder-context.js +2 -1
  100. package/helpers/create-builder-context.js.map +1 -1
  101. package/helpers/get-component-asset.js +3 -5
  102. package/helpers/get-component-asset.js.map +1 -1
  103. package/helpers/load-config.d.ts +1 -1
  104. package/helpers/load-config.js +2 -1
  105. package/helpers/load-config.js.map +1 -1
  106. package/helpers/process-html.js +1 -0
  107. package/helpers/process-html.js.map +1 -1
  108. package/helpers/typescript/create-project.js +1 -1
  109. package/helpers/typescript/create-project.js.map +1 -1
  110. package/interfaces/builder-context.d.ts +1 -0
  111. package/interfaces/configuration.d.ts +4 -0
  112. 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
- class NgDocApiPageEntity extends route_entity_1.NgDocRouteEntity {
14
- constructor(builder, sourceFile, context, parent, declarationName, index) {
15
- super(builder, sourceFile, context);
16
- this.builder = builder;
17
- this.sourceFile = sourceFile;
18
- this.context = context;
19
- this.parent = parent;
20
- this.declarationName = declarationName;
21
- this.index = index;
22
- this.physical = false;
23
- this.id = (0, helpers_1.uniqueName)(`${this.sourceFilePath}}#${this.declarationName}`);
24
- this.folderName = '';
25
- this.readyToBuild = true;
26
- this.updateDeclaration();
27
- }
28
- get isRoot() {
29
- // always false, api pages are not rooted
30
- return false;
31
- }
32
- get route() {
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
- return undefined;
52
- }
53
- get viewSourceFileUrl() {
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
- return undefined;
59
- }
60
- get folderPath() {
61
- return path.join(this.parent.folderPath, this.route);
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
- exports.NgDocApiPageEntity = NgDocApiPageEntity;
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;AAG7D,MAAa,kBAAmB,SAAQ,+BAAuB;IAQ9D,YACmB,OAAqB,EACrB,UAAsB,EACtB,OAA4B,EACrC,MAA2B,EAC3B,eAAuB,EACvB,KAAa;QAEtB,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAPlB,YAAO,GAAP,OAAO,CAAc;QACrB,eAAU,GAAV,UAAU,CAAY;QACtB,YAAO,GAAP,OAAO,CAAqB;QACrC,WAAM,GAAN,MAAM,CAAqB;QAC3B,oBAAe,GAAf,eAAe,CAAQ;QACvB,UAAK,GAAL,KAAK,CAAQ;QAXL,aAAQ,GAAY,KAAK,CAAC;QAC1B,OAAE,GAAW,IAAA,oBAAU,EAAC,GAAG,IAAI,CAAC,cAAc,KAAK,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;QACpF,eAAU,GAAW,EAAE,CAAC;QACd,iBAAY,GAAY,IAAI,CAAC;QAY/C,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC1B,CAA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C,OAAO,EAAE,CAAC;SACf;IACF,CAAC;CACD;AA9ID,gDA8IC"}
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,iBAAiB,EAAE,CAAC;QAC1B,CAAC;QAED,IAAa,MAAM;YAClB,yCAAyC;YACzC,OAAO,KAAK,CAAC;QACd,CAAC;QAED,IAAa,KAAK;YACjB,OAAO,IAAI,CAAC,WAAW;gBACtB,CAAC,CAAC,IAAA,eAAK,EAAC,IAAI,CAAC,IAAI,CAAC,IAAA,+BAAqB,EAAC,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,eAAe,GAAG,CAAC,IAAI,CAAC,K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AAC,CAAC,EACjE,IAAA,iBAAK,EAAC,OAAO,CAAC,CACd,CACD,CACD,CAAC;YAEH,OAAO,IAAI,CAAC,IAAI,CACf,IAAA,qBAAS,EAAC,CAAC,WAAmB,EAAE,EAAE,CACjC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,2BAA2B,EAAE;gBACzD,OAAO,EAAE,EAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAC;aAClC,CAAC,CACF,EACD,IAAA,eAAG,EAAC,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC,EAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAC,CAAC,CAAC,CACvE,CAAC;QACH,CAAC;QAEO,iBAAiB;YACxB,MAAM,YAAY,GAAiC;gBAClD,GAAG,IAAA,cAAO,EAAC,IAAI,CAAC,UAAU,CAAC,uBAAuB,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;gBAC/E,GAAG,IAAA,cAAO,EAAC,IAAI,CAAC,UAAU,CAAC,uBAAuB,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;aACpE,CAAC,MAAM,CAAC,iDAAsB,CAAC,CAAC;YAEjC,IAAI,CAAC,WAAW,GAAG,YAAY,CAAC,IAAI,CACnC,CAAC,WAAuC,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,KAAK,IAAI,CAAC,eAAe,CAC3F,CAAC;YAEF,eAAe;YACf,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;gBACtB,IAAI,CAAC,OAAO,EAAE,CAAC;aACf;QACF,CAAC;;;;QA7IF,gKA8IC;QA9IY,kBAAkB;QAAlB,+DAAkB;;WAAlB,kBAAkB"}
@@ -22,6 +22,7 @@ export declare class NgDocApiScopeEntity extends NgDocRouteEntity<NgDocApiScope>
22
22
  get route(): string;
23
23
  get keywords(): string[];
24
24
  get folderName(): string;
25
+ get cachedFilePaths(): string[];
25
26
  /**
26
27
  * Returns full url from the root
27
28
  *
@@ -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
- class NgDocApiScopeEntity extends route_entity_1.NgDocRouteEntity {
10
- constructor(builder, sourceFile, context, parent, target) {
11
- super(builder, sourceFile, context);
12
- this.builder = builder;
13
- this.sourceFile = sourceFile;
14
- this.context = context;
15
- this.parent = parent;
16
- this.target = target;
17
- this.physical = false;
18
- this.readyToBuild = true;
19
- this.id = (0, helpers_1.uniqueName)(`${this.sourceFilePath}#${this.target.route}`);
20
- }
21
- get rootFiles() {
22
- return [];
23
- }
24
- get isRoot() {
25
- // always false, api scopes are not rooted
26
- return false;
27
- }
28
- get route() {
29
- return this.target.route;
30
- }
31
- get keywords() {
32
- return [];
33
- }
34
- get folderName() {
35
- return this.route;
36
- }
37
- /**
38
- * Returns full url from the root
39
- *
40
- * @type {string}
41
- */
42
- get url() {
43
- return `${this.parent ? this.parent.url + '/' : ''}${this.route}`;
44
- }
45
- get pages() {
46
- return (0, core_1.asArray)(this.children.values()).filter(helpers_1.isPageEntity);
47
- }
48
- get title() {
49
- return this.target.name;
50
- }
51
- get order() {
52
- return this.target.order;
53
- }
54
- get buildCandidates() {
55
- return this.childEntities;
56
- }
57
- emit() {
58
- // Emitting source file is not necessary for this type of entity
59
- return (0, rxjs_1.of)(void 0);
60
- }
61
- update() {
62
- return (0, rxjs_1.of)(void 0);
63
- }
64
- build() {
65
- return this.isReadyForBuild ? (0, rxjs_1.forkJoin)([this.buildModule()]) : (0, rxjs_1.of)([]);
66
- }
67
- buildModule() {
68
- if (this.target) {
69
- return this.builder.renderer
70
- .render('./api-scope.module.ts.nunj', {
71
- context: {
72
- scope: this,
73
- },
74
- })
75
- .pipe((0, operators_1.map)((output) => ({ content: output, filePath: this.modulePath })));
76
- }
77
- return (0, rxjs_1.of)();
78
- }
79
- destroy() {
80
- this.children.forEach((child) => child.destroy());
81
- super.destroy();
82
- }
83
- }
84
- exports.NgDocApiScopeEntity = NgDocApiScopeEntity;
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":";;;AAAA,uCAAoD;AACpD,+BAA8C;AAC9C,8CAAmC;AAGnC,2CAAuD;AAIvD,8DAA6D;AAI7D,MAAa,mBAAoB,SAAQ,+BAA+B;IAKvE,YACmB,OAAqB,EACrB,UAAsB,EACtB,OAA4B,EACrC,MAAsB,EACtB,MAAqB;QAE9B,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QANlB,YAAO,GAAP,OAAO,CAAc;QACrB,eAAU,GAAV,UAAU,CAAY;QACtB,YAAO,GAAP,OAAO,CAAqB;QACrC,WAAM,GAAN,MAAM,CAAgB;QACtB,WAAM,GAAN,MAAM,CAAe;QATb,aA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EkB,KAAK;QACvB,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAA,eAAQ,EAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAA,SAAE,EAAC,EAAE,CAAC,CAAC;IACvE,CAAC;IAEO,WAAW;QAClB,IAAI,IAAI,CAAC,MAAM,EAAE;YAChB,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;iBAC1B,MAAM,CAAC,4BAA4B,EAAE;gBACrC,OAAO,EAAE;oBACR,KAAK,EAAE,IAAI;iBACX;aACD,CAAC;iBACD,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;SAChF;QACD,OAAO,IAAA,SAAE,GAAE,CAAC;IACb,CAAC;IAEQ,OAAO;QACf,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAkB,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAE/D,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;CACD;AA5FD,kDA4FC"}
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,eA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,aAAa,CAAC;QAC3B,CAAC;QAEQ,IAAI;YACZ,gEAAgE;YAChE,OAAO,IAAA,SAAE,EAAC,KAAK,CAAC,CAAC,CAAC;QACnB,CAAC;QAEQ,MAAM;YACd,OAAO,IAAA,SAAE,EAAC,KAAK,CAAC,CAAC,CAAC;QACnB,CAAC;QAEkB,KAAK;YACvB,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAA,eAAQ,EAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAA,SAAE,EAAC,EAAE,CAAC,CAAC;QACvE,CAAC;QAEO,WAAW;YAClB,IAAI,IAAI,CAAC,MAAM,EAAE;gBAChB,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;qBAC1B,MAAM,CAAC,4BAA4B,EAAE;oBACrC,OAAO,EAAE;wBACR,KAAK,EAAE,IAAI;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
- class NgDocApiEntity extends navigation_entity_1.NgDocNavigationEntity {
11
- constructor() {
12
- super(...arguments);
13
- this.moduleFileName = `${(0, helpers_1.uniqueName)('ng-doc-api-list')}.module.ts`;
14
- this.compilable = true;
15
- }
16
- get route() {
17
- var _a, _b;
18
- return (_b = (_a = this.target) === null || _a === void 0 ? void 0 : _a.route) !== null && _b !== void 0 ? _b : 'api';
19
- }
20
- /**
21
- * Returns full url from the root
22
- *
23
- * @type {string}
24
- */
25
- get url() {
26
- return `${this.parent ? this.parent.url + '/' : ''}${this.route}`;
27
- }
28
- get isRoot() {
29
- var _a;
30
- return !((_a = this.target) === null || _a === void 0 ? void 0 : _a.category);
31
- }
32
- get title() {
33
- var _a, _b;
34
- return (_b = (_a = this.target) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : '';
35
- }
36
- get order() {
37
- var _a;
38
- return (_a = this.target) === null || _a === void 0 ? void 0 : _a.order;
39
- }
40
- get buildCandidates() {
41
- return this.parentEntities;
42
- }
43
- get folderPath() {
44
- return path.join(this.context.apiPath, this.route);
45
- }
46
- get keywords() {
47
- return [];
48
- }
49
- childrenGenerator() {
50
- this.children.forEach((child) => child.destroy());
51
- 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)));
52
- }
53
- update() {
54
- return super.update().pipe((0, operators_1.tap)(() => {
55
- if (!this.title) {
56
- throw new Error(`Failed to load ${this.sourceFile.getFilePath()}. Make sure that you have a title property.`);
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
- this.parent = this.getParentFromCategory();
59
- }), (0, operators_1.catchError)((error) => {
60
- this.readyToBuild = false;
61
- this.context.context.logger.error(`\n${String(error)}`);
62
- return (0, rxjs_1.of)(void 0);
63
- }));
64
- }
65
- build() {
66
- return this.isReadyForBuild ? (0, rxjs_1.forkJoin)([this.buildModule(), this.buildApiList()]) : (0, rxjs_1.of)([]);
67
- }
68
- buildModule() {
69
- if (this.target) {
70
- return this.builder.renderer
71
- .render('./api.module.ts.nunj', {
72
- context: {
73
- api: this,
74
- },
75
- })
76
- .pipe((0, operators_1.map)((output) => ({ content: output, filePath: this.modulePath })));
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
- return (0, rxjs_1.of)();
79
- }
80
- buildApiList() {
81
- const apiItems = this.children
82
- .filter(helpers_1.isApiScopeEntity)
83
- .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); })
84
- .map((scope) => ({
85
- title: scope.title,
86
- items: scope.children.filter(helpers_1.isApiPageEntity).map((page) => {
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