@ng-doc/builder 16.3.6 → 16.4.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/browser/index.js +14 -11
- package/browser/index.js.map +1 -1
- package/dev-server/index.js +5 -5
- package/dev-server/index.js.map +1 -1
- package/engine/actions/playground.action.js +9 -21
- package/engine/actions/playground.action.js.map +1 -1
- package/engine/build-ng-doc.d.ts +9 -0
- package/engine/build-ng-doc.js +61 -0
- package/engine/build-ng-doc.js.map +1 -0
- package/engine/builder-operators/add-build-candidates.d.ts +8 -0
- package/engine/builder-operators/add-build-candidates.js +27 -0
- package/engine/builder-operators/add-build-candidates.js.map +1 -0
- package/engine/builder-operators/build.d.ts +13 -0
- package/engine/builder-operators/build.js +20 -0
- package/engine/builder-operators/build.js.map +1 -0
- package/engine/builder-operators/collect-garbage.d.ts +8 -0
- package/engine/builder-operators/collect-garbage.js +21 -0
- package/engine/builder-operators/collect-garbage.js.map +1 -0
- package/engine/builder-operators/compile.d.ts +6 -0
- package/engine/builder-operators/compile.js +20 -0
- package/engine/builder-operators/compile.js.map +1 -0
- package/engine/builder-operators/dependency-changes.d.ts +10 -0
- package/engine/builder-operators/dependency-changes.js +25 -0
- package/engine/builder-operators/dependency-changes.js.map +1 -0
- package/engine/builder-operators/emit.d.ts +6 -0
- package/engine/builder-operators/emit.js +14 -0
- package/engine/builder-operators/emit.js.map +1 -0
- package/engine/builder-operators/index.d.ts +8 -0
- package/engine/builder-operators/index.js +12 -0
- package/engine/builder-operators/index.js.map +1 -0
- package/engine/builder-operators/load.d.ts +6 -0
- package/engine/builder-operators/load.js +20 -0
- package/engine/builder-operators/load.js.map +1 -0
- package/engine/builder-operators/post-process.d.ts +13 -0
- package/engine/builder-operators/post-process.js +32 -0
- package/engine/builder-operators/post-process.js.map +1 -0
- package/engine/builder-operators/print-output.d.ts +8 -0
- package/engine/builder-operators/print-output.js +53 -0
- package/engine/builder-operators/print-output.js.map +1 -0
- package/engine/builder-operators/refresh.d.ts +6 -0
- package/engine/builder-operators/refresh.js +20 -0
- package/engine/builder-operators/refresh.js.map +1 -0
- package/engine/builder-operators/task.d.ts +25 -0
- package/engine/builder-operators/task.js +46 -0
- package/engine/builder-operators/task.js.map +1 -0
- package/engine/entities/abstractions/entity.d.ts +18 -16
- package/engine/entities/abstractions/entity.js +21 -19
- package/engine/entities/abstractions/entity.js.map +1 -1
- package/engine/entities/abstractions/file.entity.d.ts +11 -1
- package/engine/entities/abstractions/file.entity.js +32 -13
- package/engine/entities/abstractions/file.entity.js.map +1 -1
- package/engine/entities/abstractions/route.entity.d.ts +9 -1
- package/engine/entities/abstractions/route.entity.js +49 -27
- package/engine/entities/abstractions/route.entity.js.map +1 -1
- package/engine/entities/abstractions/source-file.entity.d.ts +11 -9
- package/engine/entities/abstractions/source-file.entity.js +18 -13
- package/engine/entities/abstractions/source-file.entity.js.map +1 -1
- package/engine/entities/api-page.entity.d.ts +13 -11
- package/engine/entities/api-page.entity.js +41 -28
- package/engine/entities/api-page.entity.js.map +1 -1
- package/engine/entities/api-scope.entity.d.ts +12 -10
- package/engine/entities/api-scope.entity.js +15 -13
- package/engine/entities/api-scope.entity.js.map +1 -1
- package/engine/entities/api.entity.d.ts +5 -5
- package/engine/entities/api.entity.js +18 -17
- package/engine/entities/api.entity.js.map +1 -1
- package/engine/entities/cache/decorators/cached-entity.d.ts +7 -5
- package/engine/entities/cache/decorators/cached-entity.js +11 -16
- package/engine/entities/cache/decorators/cached-entity.js.map +1 -1
- package/engine/entities/category.entity.d.ts +5 -5
- package/engine/entities/category.entity.js +16 -20
- package/engine/entities/category.entity.js.map +1 -1
- package/engine/entities/indexes.entity.d.ts +2 -3
- package/engine/entities/indexes.entity.js +2 -5
- package/engine/entities/indexes.entity.js.map +1 -1
- package/engine/entities/page.entity.d.ts +10 -10
- package/engine/entities/page.entity.js +83 -73
- package/engine/entities/page.entity.js.map +1 -1
- package/engine/entities/skeleton.entity.d.ts +2 -4
- package/engine/entities/skeleton.entity.js +11 -25
- package/engine/entities/skeleton.entity.js.map +1 -1
- package/engine/entity-emitter.d.ts +19 -0
- package/engine/entity-emitter.js +52 -0
- package/engine/entity-emitter.js.map +1 -0
- package/engine/entity-store.d.ts +1 -0
- package/engine/entity-store.js +7 -4
- package/engine/entity-store.js.map +1 -1
- package/engine/functions/build-candidates.js +16 -5
- package/engine/functions/build-candidates.js.map +1 -1
- package/engine/index.d.ts +3 -2
- package/engine/index.js +3 -2
- package/engine/index.js.map +1 -1
- package/engine/nunjucks/extentions/index.d.ts +1 -0
- package/engine/nunjucks/extentions/index.extension.js.map +1 -0
- package/engine/nunjucks/extentions/index.js +5 -0
- package/engine/nunjucks/extentions/index.js.map +1 -0
- package/engine/nunjucks/filters.d.ts +2 -0
- package/engine/{template-filters.js → nunjucks/filters.js} +5 -9
- package/engine/nunjucks/filters.js.map +1 -0
- package/engine/nunjucks/index.d.ts +2 -0
- package/engine/nunjucks/index.js +6 -0
- package/engine/nunjucks/index.js.map +1 -0
- package/engine/nunjucks/render-template.d.ts +8 -0
- package/engine/nunjucks/render-template.js +46 -0
- package/engine/nunjucks/render-template.js.map +1 -0
- package/engine/variables.d.ts +0 -2
- package/engine/variables.js +1 -3
- package/engine/variables.js.map +1 -1
- package/engine/watcher.d.ts +3 -5
- package/engine/watcher.js +13 -9
- package/engine/watcher.js.map +1 -1
- package/helpers/angular/{component-decorator.d.ts → get-component-decorator.d.ts} +1 -1
- package/helpers/angular/{component-decorator.js → get-component-decorator.js} +4 -4
- package/helpers/angular/get-component-decorator.js.map +1 -0
- package/helpers/angular/{directive-decorator.d.ts → get-directive-decorator.d.ts} +1 -1
- package/helpers/angular/{directive-decorator.js → get-directive-decorator.js} +4 -4
- package/helpers/angular/get-directive-decorator.js.map +1 -0
- package/helpers/angular/get-pipe-decorator.d.ts +8 -0
- package/helpers/angular/get-pipe-decorator.js +26 -0
- package/helpers/angular/get-pipe-decorator.js.map +1 -0
- package/helpers/angular/index.d.ts +3 -2
- package/helpers/angular/index.js +3 -2
- package/helpers/angular/index.js.map +1 -1
- package/helpers/angular/is-standalone.js +6 -4
- package/helpers/angular/is-standalone.js.map +1 -1
- package/helpers/build-entity-keyword.d.ts +10 -0
- package/helpers/build-entity-keyword.js +28 -0
- package/helpers/build-entity-keyword.js.map +1 -0
- package/helpers/build-file-entity.js +36 -34
- package/helpers/build-file-entity.js.map +1 -1
- package/helpers/build-indexes.js +43 -40
- package/helpers/build-indexes.js.map +1 -1
- package/helpers/emit-built-output.d.ts +2 -2
- package/helpers/emit-built-output.js +1 -1
- package/helpers/emit-built-output.js.map +1 -1
- package/helpers/entity-type.d.ts +6 -0
- package/helpers/entity-type.js +10 -1
- package/helpers/entity-type.js.map +1 -1
- package/helpers/extract-docs.js +2 -2
- package/helpers/extract-docs.js.map +1 -1
- package/helpers/extract-selectors.js +1 -1
- package/helpers/extract-selectors.js.map +1 -1
- package/helpers/generate-api-entities.js +4 -3
- package/helpers/generate-api-entities.js.map +1 -1
- package/helpers/get-component-asset.js +4 -11
- package/helpers/get-component-asset.js.map +1 -1
- package/helpers/index.d.ts +3 -5
- package/helpers/index.js +3 -5
- package/helpers/index.js.map +1 -1
- package/helpers/playground/build-playground-metadata.d.ts +9 -0
- package/helpers/playground/build-playground-metadata.js +66 -0
- package/helpers/playground/build-playground-metadata.js.map +1 -0
- package/helpers/playground/get-content-for-playground.d.ts +8 -0
- package/helpers/playground/get-content-for-playground.js +39 -0
- package/helpers/playground/get-content-for-playground.js.map +1 -0
- package/helpers/playground/get-playground-by-id.js.map +1 -0
- package/helpers/playground/get-playground-inputs.d.ts +12 -0
- package/helpers/playground/get-playground-inputs.js +72 -0
- package/helpers/playground/get-playground-inputs.js.map +1 -0
- package/helpers/playground/get-playground-template-inputs.d.ts +7 -0
- package/helpers/playground/get-playground-template-inputs.js +17 -0
- package/helpers/playground/get-playground-template-inputs.js.map +1 -0
- package/helpers/playground/get-playgrounds-expression.js.map +1 -0
- package/helpers/playground/get-playgrounds-ids.js.map +1 -0
- package/helpers/playground/get-target-for-playground.d.ts +8 -0
- package/helpers/playground/get-target-for-playground.js +26 -0
- package/helpers/playground/get-target-for-playground.js.map +1 -0
- package/helpers/playground/get-template-for-playground.d.ts +8 -0
- package/helpers/playground/get-template-for-playground.js +22 -0
- package/helpers/playground/get-template-for-playground.js.map +1 -0
- package/helpers/playground/index.d.ts +9 -0
- package/helpers/playground/index.js +13 -0
- package/helpers/playground/index.js.map +1 -0
- package/helpers/print.d.ts +24 -0
- package/helpers/print.js +46 -0
- package/helpers/print.js.map +1 -0
- package/helpers/process-html.d.ts +9 -2
- package/helpers/process-html.js +29 -10
- package/helpers/process-html.js.map +1 -1
- package/helpers/typescript/accessor/group-accessors.js +2 -2
- package/helpers/typescript/accessor/group-accessors.js.map +1 -1
- package/helpers/typescript/create-project.js +1 -18
- package/helpers/typescript/create-project.js.map +1 -1
- package/interfaces/entity-keyword.d.ts +5 -0
- package/interfaces/entity-keyword.js +3 -0
- package/interfaces/entity-keyword.js.map +1 -0
- package/interfaces/index.d.ts +3 -1
- package/interfaces/index.js +3 -1
- package/interfaces/index.js.map +1 -1
- package/interfaces/output.d.ts +6 -0
- package/interfaces/{built-output.js → output.js} +1 -1
- package/interfaces/output.js.map +1 -0
- package/interfaces/playground-metadata.d.ts +12 -0
- package/interfaces/playground-metadata.js +3 -0
- package/interfaces/playground-metadata.js.map +1 -0
- package/operators/error-handler.d.ts +8 -0
- package/operators/error-handler.js +22 -0
- package/operators/error-handler.js.map +1 -0
- package/package.json +3 -3
- package/schematics/api/index.js +1 -1
- package/schematics/api/index.js.map +1 -1
- package/schematics/category/index.js +1 -1
- package/schematics/category/index.js.map +1 -1
- package/schematics/migrations/standalone-pages/index.js +2 -9
- package/schematics/migrations/standalone-pages/index.js.map +1 -1
- package/schematics/page/index.js +1 -7
- package/schematics/page/index.js.map +1 -1
- package/templates/helpers/accessor.html.nunj +2 -1
- package/templates/helpers/constructor.html.nunj +1 -1
- package/templates/helpers/members.html.nunj +2 -1
- package/templates/helpers/method.html.nunj +1 -1
- package/templates/helpers/parameters.html.nunj +2 -2
- package/templates/helpers/properties.html.nunj +1 -1
- package/templates/playgrounds.ts.nunj +15 -19
- package/engine/builder.d.ts +0 -23
- package/engine/builder.js +0 -125
- package/engine/builder.js.map +0 -1
- package/engine/entity-life-cycle.d.ts +0 -15
- package/engine/entity-life-cycle.js +0 -32
- package/engine/entity-life-cycle.js.map +0 -1
- package/engine/extentions/index.extension.js.map +0 -1
- package/engine/renderer.d.ts +0 -7
- package/engine/renderer.js +0 -49
- package/engine/renderer.js.map +0 -1
- package/engine/template-filters.d.ts +0 -2
- package/engine/template-filters.js.map +0 -1
- package/helpers/angular/component-decorator.js.map +0 -1
- package/helpers/angular/directive-decorator.js.map +0 -1
- package/helpers/get-playground-by-id.js.map +0 -1
- package/helpers/get-playground-properties.d.ts +0 -25
- package/helpers/get-playground-properties.js +0 -113
- package/helpers/get-playground-properties.js.map +0 -1
- package/helpers/get-playground-targets.d.ts +0 -6
- package/helpers/get-playground-targets.js +0 -21
- package/helpers/get-playground-targets.js.map +0 -1
- package/helpers/get-playgrounds-expression.js.map +0 -1
- package/helpers/get-playgrounds-ids.js.map +0 -1
- package/helpers/print-progress.d.ts +0 -6
- package/helpers/print-progress.js +0 -19
- package/helpers/print-progress.js.map +0 -1
- package/interfaces/built-output.d.ts +0 -4
- package/interfaces/built-output.js.map +0 -1
- /package/engine/{extentions → nunjucks/extentions}/index.extension.d.ts +0 -0
- /package/engine/{extentions → nunjucks/extentions}/index.extension.js +0 -0
- /package/helpers/{get-playground-by-id.d.ts → playground/get-playground-by-id.d.ts} +0 -0
- /package/helpers/{get-playground-by-id.js → playground/get-playground-by-id.js} +0 -0
- /package/helpers/{get-playgrounds-expression.d.ts → playground/get-playgrounds-expression.d.ts} +0 -0
- /package/helpers/{get-playgrounds-expression.js → playground/get-playgrounds-expression.js} +0 -0
- /package/helpers/{get-playgrounds-ids.d.ts → playground/get-playgrounds-ids.d.ts} +0 -0
- /package/helpers/{get-playgrounds-ids.js → playground/get-playgrounds-ids.js} +0 -0
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isStandalone = void 0;
|
|
4
|
-
const
|
|
4
|
+
const get_component_decorator_1 = require("./get-component-decorator");
|
|
5
|
+
const get_directive_decorator_1 = require("./get-directive-decorator");
|
|
6
|
+
const get_pipe_decorator_1 = require("./get-pipe-decorator");
|
|
5
7
|
/**
|
|
6
8
|
*
|
|
7
9
|
* @param cls
|
|
8
10
|
* @param notFoundResult
|
|
9
11
|
*/
|
|
10
12
|
function isStandalone(cls, notFoundResult = false) {
|
|
11
|
-
var _a;
|
|
12
|
-
const decorator = (0,
|
|
13
|
-
return (
|
|
13
|
+
var _a, _b, _c;
|
|
14
|
+
const decorator = (_b = (_a = (0, get_component_decorator_1.getComponentDecorator)(cls)) !== null && _a !== void 0 ? _a : (0, get_directive_decorator_1.getDirectiveDecorator)(cls)) !== null && _b !== void 0 ? _b : (0, get_pipe_decorator_1.getPipeDecorator)(cls);
|
|
15
|
+
return (_c = decorator === null || decorator === void 0 ? void 0 : decorator.standalone) !== null && _c !== void 0 ? _c : notFoundResult;
|
|
14
16
|
}
|
|
15
17
|
exports.isStandalone = isStandalone;
|
|
16
18
|
//# sourceMappingURL=is-standalone.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-standalone.js","sourceRoot":"","sources":["../../../../../libs/builder/helpers/angular/is-standalone.ts"],"names":[],"mappings":";;;AAGA
|
|
1
|
+
{"version":3,"file":"is-standalone.js","sourceRoot":"","sources":["../../../../../libs/builder/helpers/angular/is-standalone.ts"],"names":[],"mappings":";;;AAGA,uEAAgE;AAChE,uEAAgE;AAChE,6DAAsD;AAEtD;;;;GAIG;AACH,SAAgB,YAAY,CAAC,GAAqB,EAAE,iBAA0B,KAAK;;IAClF,MAAM,SAAS,GACd,MAAA,MAAA,IAAA,+CAAqB,EAAC,GAAG,CAAC,mCAAI,IAAA,+CAAqB,EAAC,GAAG,CAAC,mCAAI,IAAA,qCAAgB,EAAC,GAAG,CAAC,CAAC;IAEnF,OAAO,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,UAAU,mCAAI,cAAc,CAAC;AAChD,CAAC;AALD,oCAKC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NgDocEntityKeyword } from '@ng-doc/builder';
|
|
2
|
+
import { NgDocEntityAnchor } from '@ng-doc/core';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param key
|
|
6
|
+
* @param title
|
|
7
|
+
* @param path
|
|
8
|
+
* @param anchor
|
|
9
|
+
*/
|
|
10
|
+
export declare function buildEntityKeyword(key: string, title: string, path: string, anchor: NgDocEntityAnchor): NgDocEntityKeyword;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildEntityKeyword = void 0;
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param key
|
|
7
|
+
* @param title
|
|
8
|
+
* @param path
|
|
9
|
+
* @param anchor
|
|
10
|
+
*/
|
|
11
|
+
function buildEntityKeyword(key, title, path, anchor) {
|
|
12
|
+
if (anchor.type === 'heading') {
|
|
13
|
+
return {
|
|
14
|
+
key: `${key}#${anchor.anchor}`,
|
|
15
|
+
title: `${title} [${anchor.title}]`,
|
|
16
|
+
path: `${path}#${anchor.anchor}`,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return {
|
|
21
|
+
key: `${key}.${anchor.anchor}`,
|
|
22
|
+
title: `${title}.${anchor.title}`,
|
|
23
|
+
path: `${path}#${anchor.anchor}`,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.buildEntityKeyword = buildEntityKeyword;
|
|
28
|
+
//# sourceMappingURL=build-entity-keyword.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-entity-keyword.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/build-entity-keyword.ts"],"names":[],"mappings":";;;AAGA;;;;;;GAMG;AACH,SAAgB,kBAAkB,CACjC,GAAW,EACX,KAAa,EACb,IAAY,EACZ,MAAyB;IAEzB,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE;QAC9B,OAAO;YACN,GAAG,EAAE,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE;YAC9B,KAAK,EAAE,GAAG,KAAK,KAAK,MAAM,CAAC,KAAK,GAAG;YACnC,IAAI,EAAE,GAAG,IAAI,IAAI,MAAM,CAAC,MAAM,EAAE;SAChC,CAAC;KACF;SAAM;QACN,OAAO;YACN,GAAG,EAAE,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE;YAC9B,KAAK,EAAE,GAAG,KAAK,IAAI,MAAM,CAAC,KAAK,EAAE;YACjC,IAAI,EAAE,GAAG,IAAI,IAAI,MAAM,CAAC,MAAM,EAAE;SAChC,CAAC;KACF;AACF,CAAC;AAnBD,gDAmBC"}
|
|
@@ -15,45 +15,47 @@ const typescript_1 = require("./typescript");
|
|
|
15
15
|
* @param tsconfig - path to tsconfig file
|
|
16
16
|
* @param outbase - path to the outbase directory
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
function buildFileEntity(sourceFile, tsconfig, outbase) {
|
|
19
19
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* Remove module, demo and playgrounds properties from the default export
|
|
25
|
-
* if the file is a page. This is done to prevent compiling the page dependencies
|
|
26
|
-
* that are not needed for the NgDoc builder
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
if ((0, minimatch_1.minimatch)(p, engine_1.PAGE_PATTERN)) {
|
|
30
|
-
const objectLiteralExpression = (0, typescript_1.getObjectExpressionFromDefault)(sourceFile);
|
|
20
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
let code = sourceFile.getFullText();
|
|
22
|
+
const p = path.relative(outbase, sourceFile.getFilePath());
|
|
23
|
+
const outPath = path.join(engine_1.CACHE_PATH, p).replace(/\.ts$/, '.js');
|
|
31
24
|
/**
|
|
32
|
-
*
|
|
25
|
+
* Remove `imports`, `providers`, `demos` and `playgrounds` properties from the default export
|
|
26
|
+
* if the file is a page. This is done to prevent compiling the page dependencies
|
|
27
|
+
* that are not needed for the NgDoc builder to work or may cause performance issues.
|
|
28
|
+
*
|
|
33
29
|
*/
|
|
34
|
-
if (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
if ((0, minimatch_1.minimatch)(p, engine_1.PAGE_PATTERN)) {
|
|
31
|
+
const objectLiteralExpression = (0, typescript_1.getObjectExpressionFromDefault)(sourceFile);
|
|
32
|
+
/**
|
|
33
|
+
* We use regex to remove the properties because ts-morph does it slowly
|
|
34
|
+
*/
|
|
35
|
+
if (objectLiteralExpression) {
|
|
36
|
+
code = replaceCodeProperty(code, (_b = (_a = objectLiteralExpression.getProperty('imports')) === null || _a === void 0 ? void 0 : _a.getText()) !== null && _b !== void 0 ? _b : '');
|
|
37
|
+
code = replaceCodeProperty(code, (_d = (_c = objectLiteralExpression.getProperty('providers')) === null || _c === void 0 ? void 0 : _c.getText()) !== null && _d !== void 0 ? _d : '');
|
|
38
|
+
code = replaceCodeProperty(code, (_f = (_e = objectLiteralExpression.getProperty('demos')) === null || _e === void 0 ? void 0 : _e.getText()) !== null && _f !== void 0 ? _f : '');
|
|
39
|
+
code = replaceCodeProperty(code, (_h = (_g = objectLiteralExpression.getProperty('playgrounds')) === null || _g === void 0 ? void 0 : _g.getText()) !== null && _h !== void 0 ? _h : '');
|
|
40
|
+
}
|
|
39
41
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
42
|
+
yield esbuild.build({
|
|
43
|
+
stdin: {
|
|
44
|
+
contents: code,
|
|
45
|
+
resolveDir: path.dirname(p),
|
|
46
|
+
loader: 'ts',
|
|
47
|
+
sourcefile: p,
|
|
48
|
+
},
|
|
49
|
+
tsconfig,
|
|
50
|
+
bundle: true,
|
|
51
|
+
format: 'cjs',
|
|
52
|
+
treeShaking: true,
|
|
53
|
+
outbase,
|
|
54
|
+
outfile: outPath,
|
|
55
|
+
});
|
|
56
|
+
yield sourceFile.refreshFromFileSystem();
|
|
57
|
+
return outPath;
|
|
54
58
|
});
|
|
55
|
-
await sourceFile.refreshFromFileSystem();
|
|
56
|
-
return outPath;
|
|
57
59
|
}
|
|
58
60
|
exports.buildFileEntity = buildFileEntity;
|
|
59
61
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-file-entity.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/build-file-entity.ts"],"names":[],"mappings":";;;;AAAA,uCAA0C;AAC1C,yDAAmC;AACnC,yCAAoC;AACpC,mDAA6B;AAG7B,sCAAmD;AACnD,6CAA4D;AAE5D;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"build-file-entity.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/build-file-entity.ts"],"names":[],"mappings":";;;;AAAA,uCAA0C;AAC1C,yDAAmC;AACnC,yCAAoC;AACpC,mDAA6B;AAG7B,sCAAmD;AACnD,6CAA4D;AAE5D;;;;;;GAMG;AACH,SAAsB,eAAe,CAAC,UAAsB,EAAE,QAAgB,EAAE,OAAe;;;QAC9F,IAAI,IAAI,GAAW,UAAU,CAAC,WAAW,EAAE,CAAC;QAC5C,MAAM,CAAC,GAAW,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,UAAU,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AAC;QAEH,MAAM,UAAU,CAAC,qBAAqB,EAAE,CAAC;QAEzC,OAAO,OAAO,CAAC;;CACf;AA3CD,0CA2CC;AAED;;;;GAIG;AACH,SAAS,mBAAmB,CAAC,IAAY,EAAE,QAAgB;IAC1D,MAAM,KAAK,GAAW,IAAI,MAAM,CAAC,GAAG,IAAA,mBAAY,EAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEhE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAChC,CAAC"}
|
package/helpers/build-indexes.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildIndexes = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const orama_1 = require("@orama/orama");
|
|
5
6
|
const plugin_parsedoc_1 = require("@orama/plugin-parsedoc");
|
|
6
7
|
const rxjs_1 = require("rxjs");
|
|
@@ -11,44 +12,44 @@ const import_es_module_1 = require("./import-es-module");
|
|
|
11
12
|
*
|
|
12
13
|
* @param config
|
|
13
14
|
*/
|
|
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
|
-
}
|
|
15
|
+
function buildIndexes(config) {
|
|
16
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
const pages = [];
|
|
18
|
+
const db = yield (0, orama_1.create)({
|
|
19
|
+
schema: Object.assign({}, plugin_parsedoc_1.defaultHtmlSchema)
|
|
20
|
+
});
|
|
21
|
+
const indexableContent = yield removeNotIndexableContent(config.content);
|
|
22
|
+
yield (0, plugin_parsedoc_1.populate)(db, indexableContent, 'html', {
|
|
23
|
+
transformFn: (node) => transformFn(node),
|
|
24
|
+
});
|
|
25
|
+
let section;
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
Object.values(db.data.docs.docs)
|
|
29
|
+
.filter(isIndexable)
|
|
30
|
+
.forEach((doc) => {
|
|
31
|
+
var _a;
|
|
32
|
+
if (doc) {
|
|
33
|
+
if (isHeading(doc)) {
|
|
34
|
+
section = doc;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
pages.push({
|
|
38
|
+
breadcrumbs: config.breadcrumbs,
|
|
39
|
+
pageType: config.pageType,
|
|
40
|
+
title: config.title,
|
|
41
|
+
section: (_a = section === null || section === void 0 ? void 0 : section.content) !== null && _a !== void 0 ? _a : '',
|
|
42
|
+
route: config.route,
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
fragment: (section === null || section === void 0 ? void 0 : section.properties) && section.properties['id'],
|
|
46
|
+
content: doc.content.toString() === '%%API_NAME_ANCHOR%%' ? undefined : doc.content.toString(),
|
|
47
|
+
});
|
|
48
|
+
}
|
|
48
49
|
}
|
|
49
|
-
}
|
|
50
|
+
});
|
|
51
|
+
return pages;
|
|
50
52
|
});
|
|
51
|
-
return pages;
|
|
52
53
|
}
|
|
53
54
|
exports.buildIndexes = buildIndexes;
|
|
54
55
|
/**
|
|
@@ -84,7 +85,7 @@ function transformFn(node) {
|
|
|
84
85
|
case 'b':
|
|
85
86
|
case 'p':
|
|
86
87
|
case 'ul':
|
|
87
|
-
return {
|
|
88
|
+
return Object.assign(Object.assign({}, node), { raw: `<p>${node.content}</p>` });
|
|
88
89
|
default:
|
|
89
90
|
return node;
|
|
90
91
|
}
|
|
@@ -93,8 +94,10 @@ function transformFn(node) {
|
|
|
93
94
|
*
|
|
94
95
|
* @param html
|
|
95
96
|
*/
|
|
96
|
-
|
|
97
|
-
return (
|
|
98
|
-
.
|
|
97
|
+
function removeNotIndexableContent(html) {
|
|
98
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
return (0, rxjs_1.firstValueFrom)((0, rxjs_1.from)((0, import_es_module_1.importEsModule)('@ng-doc/utils'))
|
|
100
|
+
.pipe((0, operators_1.switchMap)((utils) => utils.removeNotIndexableContent(html))));
|
|
101
|
+
});
|
|
99
102
|
}
|
|
100
103
|
//# sourceMappingURL=build-indexes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-indexes.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/build-indexes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build-indexes.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/build-indexes.ts"],"names":[],"mappings":";;;;AAEA,wCAAoC;AACpC,4DAAgF;AAChF,+BAA0C;AAC1C,8CAAyC;AAEzC,yDAAkD;AAUlD;;;;GAIG;AACH,SAAsB,YAAY,CAAC,MAA+B;;QACjE,MAAM,KAAK,GAAqB,EAAE,CAAC;QAEnC,MAAM,EAAE,GAAG,MAAM,IAAA,cAAM,EAAC;YACvB,MAAM,oBACF,mCAAiB,CACpB;SACD,CAAC,CAAC;QAEH,MAAM,gBAAgB,GAAW,MAAM,yBAAyB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAEjF,MAAM,IAAA,0BAAQ,EAAC,EAAE,EAAE,gBAAgB,EAAE,MAAM,EAAE;YAC5C,WAAW,EAAE,CAAC,IAAiB,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC;SACrD,CAAC,CAAC;QAEH,IAAI,OAA6C,CAAC;QAEl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I,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,UAAU,CAAA,IAAI,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAC/G,CAAC;AAED;;;;GAIG;AACH,SAAS,WAAW,CAAC,IAAiB;IACrC,QAAQ,IAAI,CAAC,GAAG,EAAE;QACjB,KAAK,QAAQ,CAAC;QACd,KAAK,GAAG,CAAC;QACT,KAAK,MAAM,CAAC;QACZ,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb,KAAK,GAAG,CAAC;QACT,KAAK,GAAG,CAAC;QACT,KAAK,IAAI;YACR,uCAAW,IAAI,KAAE,GAAG,EAAE,MAAM,IAAI,CAAC,OAAO,MAAM,IAAE;QACjD;YACC,OAAO,IAAI,CAAC;KACb;AACF,CAAC;AAED;;;GAGG;AACH,SAAe,yBAAyB,CAAC,IAAY;;QACpD,OAAO,IAAA,qBAAc,EAAC,IAAA,WAAI,EAAC,IAAA,iCAAc,EAAiC,eAAe,CAAC,CAAC;aACzF,IAAI,CAAC,IAAA,qBAAS,EAAC,CAAC,KAAqC,EAAE,EAAE,CAAC,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,CAAC;CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NgDocBuildOutput } from '../interfaces';
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param {...any} outputs
|
|
5
5
|
*/
|
|
6
|
-
export declare function emitBuiltOutput(
|
|
6
|
+
export declare function emitBuiltOutput(outputs: NgDocBuildOutput[]): void;
|
|
@@ -8,7 +8,7 @@ const path = tslib_1.__importStar(require("path"));
|
|
|
8
8
|
*
|
|
9
9
|
* @param {...any} outputs
|
|
10
10
|
*/
|
|
11
|
-
function emitBuiltOutput(
|
|
11
|
+
function emitBuiltOutput(outputs) {
|
|
12
12
|
outputs.forEach((output) => {
|
|
13
13
|
fs.mkdirSync(path.dirname(output.filePath), { recursive: true });
|
|
14
14
|
fs.writeFileSync(output.filePath, output.content);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emit-built-output.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/emit-built-output.ts"],"names":[],"mappings":";;;;AAAA,+CAAyB;AACzB,mDAA6B;AAI7B;;;GAGG;AACH,SAAgB,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"emit-built-output.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/emit-built-output.ts"],"names":[],"mappings":";;;;AAAA,+CAAyB;AACzB,mDAA6B;AAI7B;;;GAGG;AACH,SAAgB,eAAe,CAAC,OAA2B;IAC1D,OAAO,CAAC,OAAO,CAAC,CAAC,MAAwB,EAAE,EAAE;QAC5C,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;QAC/D,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;AACJ,CAAC;AALD,0CAKC"}
|
package/helpers/entity-type.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { NgDocApiEntity, NgDocApiPageEntity, NgDocApiScopeEntity, NgDocCategoryE
|
|
|
2
2
|
import { NgDocFileEntity } from '../engine/entities/abstractions/file.entity';
|
|
3
3
|
import { NgDocNavigationEntity } from '../engine/entities/abstractions/navigation.entity';
|
|
4
4
|
import { NgDocRouteEntity } from '../engine/entities/abstractions/route.entity';
|
|
5
|
+
import { NgDocSourceFileEntity } from '../engine/entities/abstractions/source-file.entity';
|
|
5
6
|
import { Constructable } from '../types';
|
|
6
7
|
/**
|
|
7
8
|
*
|
|
@@ -13,6 +14,11 @@ export declare function isPageEntity(page: InstanceType<Constructable>): page is
|
|
|
13
14
|
* @param page
|
|
14
15
|
*/
|
|
15
16
|
export declare function isCategoryEntity(page: InstanceType<Constructable>): page is NgDocCategoryEntity;
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @param page
|
|
20
|
+
*/
|
|
21
|
+
export declare function isSourceFileEntity(page: InstanceType<Constructable>): page is NgDocSourceFileEntity;
|
|
16
22
|
/**
|
|
17
23
|
*
|
|
18
24
|
* @param page
|
package/helpers/entity-type.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isRouteEntity = exports.isApiScopeEntity = exports.isApiPageEntity = exports.isFileEntity = exports.isApiEntity = exports.isNavigationEntity = exports.isCategoryEntity = exports.isPageEntity = void 0;
|
|
3
|
+
exports.isRouteEntity = exports.isApiScopeEntity = exports.isApiPageEntity = exports.isFileEntity = exports.isApiEntity = exports.isNavigationEntity = exports.isSourceFileEntity = exports.isCategoryEntity = exports.isPageEntity = void 0;
|
|
4
4
|
const engine_1 = require("../engine");
|
|
5
5
|
const file_entity_1 = require("../engine/entities/abstractions/file.entity");
|
|
6
6
|
const navigation_entity_1 = require("../engine/entities/abstractions/navigation.entity");
|
|
7
7
|
const route_entity_1 = require("../engine/entities/abstractions/route.entity");
|
|
8
|
+
const source_file_entity_1 = require("../engine/entities/abstractions/source-file.entity");
|
|
8
9
|
/**
|
|
9
10
|
*
|
|
10
11
|
* @param page
|
|
@@ -21,6 +22,14 @@ function isCategoryEntity(page) {
|
|
|
21
22
|
return page instanceof engine_1.NgDocCategoryEntity;
|
|
22
23
|
}
|
|
23
24
|
exports.isCategoryEntity = isCategoryEntity;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @param page
|
|
28
|
+
*/
|
|
29
|
+
function isSourceFileEntity(page) {
|
|
30
|
+
return page instanceof source_file_entity_1.NgDocSourceFileEntity;
|
|
31
|
+
}
|
|
32
|
+
exports.isSourceFileEntity = isSourceFileEntity;
|
|
24
33
|
/**
|
|
25
34
|
*
|
|
26
35
|
* @param page
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-type.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/entity-type.ts"],"names":[],"mappings":";;;AAAA,sCAAwH;AACxH,6EAA4E;AAC5E,yFAAwF;AACxF,+EAA8E;
|
|
1
|
+
{"version":3,"file":"entity-type.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/entity-type.ts"],"names":[],"mappings":";;;AAAA,sCAAwH;AACxH,6EAA4E;AAC5E,yFAAwF;AACxF,+EAA8E;AAC9E,2FAAyF;AAGzF;;;GAGG;AACH,SAAgB,YAAY,CAAC,IAAiC;IAC7D,OAAO,IAAI,YAAY,wBAAe,CAAC;AACxC,CAAC;AAFD,oCAEC;AAED;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,IAAiC;IACjE,OAAO,IAAI,YAAY,4BAAmB,CAAC;AAC5C,CAAC;AAFD,4CAEC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,IAAiC;IACnE,OAAO,IAAI,YAAY,0CAAqB,CAAC;AAC9C,CAAC;AAFD,gDAEC;AAED;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,IAAiC;IACnE,OAAO,IAAI,YAAY,yCAAqB,CAAC;AAC9C,CAAC;AAFD,gDAEC;AAED;;;GAGG;AACH,SAAgB,WAAW,CAAC,IAAiC;IAC5D,OAAO,IAAI,YAAY,uBAAc,CAAC;AACvC,CAAC;AAFD,kCAEC;AAED;;;GAGG;AACH,SAAgB,YAAY,CAAI,IAAiC;IAChE,OAAO,IAAI,YAAY,6BAAe,CAAC;AACxC,CAAC;AAFD,oCAEC;AAED;;;GAGG;AACH,SAAgB,eAAe,CAAC,IAAiC;IAChE,OAAO,IAAI,YAAY,2BAAkB,CAAC;AAC3C,CAAC;AAFD,0CAEC;AAED;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,IAAiC;IACjE,OAAO,IAAI,YAAY,4BAAmB,CAAC;AAC5C,CAAC;AAFD,4CAEC;AAED;;;GAGG;AACH,SAAgB,aAAa,CAAC,IAAiC;IAC9D,OAAO,IAAI,YAAY,+BAAgB,CAAC;AACzC,CAAC;AAFD,sCAEC"}
|
package/helpers/extract-docs.js
CHANGED
|
@@ -23,7 +23,7 @@ function extractDocs(node, customTag) {
|
|
|
23
23
|
: ts_doc_formatter_1.TsDocFormatter.renderDocNode(context.docComment.summarySection);
|
|
24
24
|
})
|
|
25
25
|
.join('');
|
|
26
|
-
return (0, marked_1.marked)(docs);
|
|
26
|
+
return (0, marked_1.marked)(docs).trim();
|
|
27
27
|
}
|
|
28
28
|
exports.extractDocs = extractDocs;
|
|
29
29
|
/**
|
|
@@ -58,7 +58,7 @@ function extractParameterDocs(node, paramName) {
|
|
|
58
58
|
return paramBlock ? ts_doc_formatter_1.TsDocFormatter.renderDocNode(paramBlock.content) : '';
|
|
59
59
|
})
|
|
60
60
|
.join('');
|
|
61
|
-
return (0, marked_1.marked)(docs);
|
|
61
|
+
return (0, marked_1.marked)(docs).trim();
|
|
62
62
|
}
|
|
63
63
|
exports.extractParameterDocs = extractParameterDocs;
|
|
64
64
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-docs.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/extract-docs.ts"],"names":[],"mappings":";;;AAAA,4CAO0B;AAE1B,uCAAqC;AAGrC,iEAA0D;AAC1D,qCAAgC;AAEhC;;;;;;GAMG;AACH,SAAgB,WAAW,CAAC,IAAmB,EAAE,SAAkB;IAClE,MAAM,MAAM,GAAY,IAAA,cAAO,EAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACrD,MAAM,MAAM,GAAgB,IAAI,mBAAW,CAAC,qBAAqB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GAAU,EAAE,EAAE;QACnB,MAAM,OAAO,GAAkB,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QACjE,MAAM,UAAU,GAA8B,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;QAErG,OAAO,UAAU,CAAC,CAAC,CAAC,iCAAc,CAAC,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3E,CAAC,CAAC;SACD,IAAI,CAAC,EAAE,CAAC,CAAC;IAEX,OAAO,IAAA,eAAM,EAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;AAC5B,CAAC;AAbD,oDAaC;AAED;;GAEG;AACH,SAAS,qBAAqB;IAC7B,MAAM,UAAU,GAAyB;QACxC,IAAI,0BAAkB,CAAC,EAAC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,0BAAkB,CAAC,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAC,CAAC;KAC/G,CAAC;IAEF,MAAM,aAAa,GAAuB,IAAI,0BAAkB,EAAE,CAAC;IAEnE,UAAU,CAAC,OAAO,CAAC,CAAC,GAAuB,EAAE,EAAE,CAAC,aAAa,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;IAErF,OAAO,aAAa,CAAC;AACtB,CAAC"}
|
|
@@ -10,7 +10,7 @@ const angular_1 = require("./angular");
|
|
|
10
10
|
function extractSelectors(declaration) {
|
|
11
11
|
var _a, _b, _c;
|
|
12
12
|
if (ts_morph_1.Node.isClassDeclaration(declaration)) {
|
|
13
|
-
const decorator = (_a = (0, angular_1.
|
|
13
|
+
const decorator = (_a = (0, angular_1.getComponentDecorator)(declaration)) !== null && _a !== void 0 ? _a : (0, angular_1.getDirectiveDecorator)(declaration);
|
|
14
14
|
if (decorator) {
|
|
15
15
|
return (_c = (_b = decorator.selector) === null || _b === void 0 ? void 0 : _b.split(',').map((s) => s.trim())) !== null && _c !== void 0 ? _c : [];
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-selectors.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/extract-selectors.ts"],"names":[],"mappings":";;;AACA,uCAA8B;AAG9B,
|
|
1
|
+
{"version":3,"file":"extract-selectors.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/extract-selectors.ts"],"names":[],"mappings":";;;AACA,uCAA8B;AAG9B,uCAAuE;AAEvE;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,WAAuC;;IACvE,IAAI,eAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE;QACzC,MAAM,SAAS,GACd,MAAA,IAAA,+BAAqB,EAAC,WAAW,CAAC,mCAAI,IAAA,+BAAqB,EAAC,WAAW,CAAC,CAAC;QAE1E,IAAI,SAAS,EAAE;YACd,OAAO,MAAA,MAAA,SAAS,CAAC,QAAQ,0CAAE,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,mCAAI,EAAE,CAAC;SACzE;KACD;IAED,OAAO,EAAE,CAAC;AACX,CAAC;AAXD,4CAWC"}
|
|
@@ -16,7 +16,7 @@ function generateApiEntities(apiRootEntity) {
|
|
|
16
16
|
const scopes = new Map();
|
|
17
17
|
const duplicatesInScope = new Map();
|
|
18
18
|
const paths = (_b = (_a = apiRootEntity.target) === null || _a === void 0 ? void 0 : _a.scopes.map((scope) => {
|
|
19
|
-
const scopeEntity = new engine_1.NgDocApiScopeEntity(apiRootEntity.
|
|
19
|
+
const scopeEntity = new engine_1.NgDocApiScopeEntity(apiRootEntity.store, apiRootEntity.cache, apiRootEntity.context, apiRootEntity.sourceFile, apiRootEntity, scope);
|
|
20
20
|
const files = (0, core_1.asArray)(scope.include)
|
|
21
21
|
.map((i) => glob.sync(i, {
|
|
22
22
|
ignore: scope.exclude,
|
|
@@ -27,7 +27,8 @@ function generateApiEntities(apiRootEntity) {
|
|
|
27
27
|
result.push(scopeEntity);
|
|
28
28
|
return files;
|
|
29
29
|
}).flat()) !== null && _b !== void 0 ? _b : [];
|
|
30
|
-
apiRootEntity.
|
|
30
|
+
apiRootEntity.sourceFile
|
|
31
|
+
.getProject()
|
|
31
32
|
.addSourceFilesAtPaths(paths)
|
|
32
33
|
.map((sourceFile) => sourceFile.getExportedDeclarations())
|
|
33
34
|
.reduce((acc, declarations) => {
|
|
@@ -46,7 +47,7 @@ function generateApiEntities(apiRootEntity) {
|
|
|
46
47
|
if (scope) {
|
|
47
48
|
const duplicates = (_a = duplicatesInScope.get(scope)) !== null && _a !== void 0 ? _a : new Map();
|
|
48
49
|
const count = (_b = duplicates.get(name)) !== null && _b !== void 0 ? _b : 0;
|
|
49
|
-
const page = new engine_1.NgDocApiPageEntity(apiRootEntity.
|
|
50
|
+
const page = new engine_1.NgDocApiPageEntity(apiRootEntity.store, apiRootEntity.cache, apiRootEntity.context, sourceFile, scope, name, count);
|
|
50
51
|
duplicates.set(name, count + 1);
|
|
51
52
|
duplicatesInScope.set(scope, duplicates);
|
|
52
53
|
result.push(page);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-api-entities.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/generate-api-entities.ts"],"names":[],"mappings":";;;;AAAA,uCAAoD;AACpD,mDAA6B;AAG7B,sCAAkF;AAElF,yEAAkE;AAElE;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,aAA6B;;IAChE,MAAM,MAAM,GAAoD,EAAE,CAAC;IACnE,MAAM,MAAM,GAAqC,IAAI,GAAG,EAAE,CAAC;IAC3D,MAAM,iBAAiB,GAAkD,IAAI,GAAG,EAAE,CAAC;IAEnF,MAAM,KAAK,GACV,MAAA,MAAA,aAAa,CAAC,MAAM,0CAAE,MAAM,CAC1B,GAAG,CAAC,CAAC,KAAoB,EAAE,EAAE;QAC7B,MAAM,WAAW,GAAwB,IAAI,4BAAmB,CAC/D,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"generate-api-entities.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/generate-api-entities.ts"],"names":[],"mappings":";;;;AAAA,uCAAoD;AACpD,mDAA6B;AAG7B,sCAAkF;AAElF,yEAAkE;AAElE;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,aAA6B;;IAChE,MAAM,MAAM,GAAoD,EAAE,CAAC;IACnE,MAAM,MAAM,GAAqC,IAAI,GAAG,EAAE,CAAC;IAC3D,MAAM,iBAAiB,GAAkD,IAAI,GAAG,EAAE,CAAC;IAEnF,MAAM,KAAK,GACV,MAAA,MAAA,aAAa,CAAC,MAAM,0CAAE,MAAM,CAC1B,GAAG,CAAC,CAAC,KAAoB,EAAE,EAAE;QAC7B,MAAM,WAAW,GAAwB,IAAI,4BAAmB,CAC/D,aAAa,CAAC,KAAK,EACnB,aAAa,CAAC,KAAK,EACnB,aAAa,CAAC,OAAO,EACrB,aAAa,CAAC,UAAU,EACxB,aAAa,EACb,KAAK,CACL,CAAC;QACF,MAAM,KAAK,GAAa,IAAA,cAAO,EAAC,KAAK,CAAC,OAAO,CAAC;aAC5C,GAAG,CAAC,CAAC,CAAS,EAAE,EAAE,CAClB,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE;YACZ,MAAM,EAAE,KAAK,CAAC,OAAO;YACrB,QAAQ,EAAE,IAAI;SACd,CAAC,CACF;aACA,IAAI,EAAE,CAAC;QAET,KAAK,CAAC,OAAO,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;QAEzD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAEzB,OAAO,KAAK,CAAC;IACd,CAAC,EACA,IAAI,EAAE,mCAAI,EAAE,CAAC;IAEhB,aAAa,CAAC,UAAU;SACtB,UAAU,EAAE;SACZ,qBAAqB,CAAC,KAAK,CAAC;SAC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,OAAO,EACrB,UAAU,EACV,KAAK,EACL,IAAI,EACJ,KAAK,CACL,CAAC;gBAEF,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;gBAChC,iBAAiB,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;gBAEzC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAClB;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEJ,OAAO,MAAM,CAAC;AACf,CAAC;AA9ED,kDA8EC"}
|
|
@@ -4,7 +4,7 @@ exports.getComponentAsset = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const core_1 = require("@ng-doc/core");
|
|
6
6
|
const path = tslib_1.__importStar(require("path"));
|
|
7
|
-
const
|
|
7
|
+
const nunjucks_1 = require("../engine/nunjucks");
|
|
8
8
|
const angular_1 = require("./angular");
|
|
9
9
|
const build_assets_1 = require("./build-assets");
|
|
10
10
|
const format_code_1 = require("./format-code");
|
|
@@ -17,7 +17,7 @@ const slash_1 = require("./slash");
|
|
|
17
17
|
*/
|
|
18
18
|
function getComponentAsset(classDeclaration, inlineStyleLang, outDir) {
|
|
19
19
|
var _a;
|
|
20
|
-
const decoratorData = (0, angular_1.
|
|
20
|
+
const decoratorData = (0, angular_1.getComponentDecorator)(classDeclaration);
|
|
21
21
|
if (decoratorData) {
|
|
22
22
|
const filePath = classDeclaration.getSourceFile().getFilePath();
|
|
23
23
|
const fileDir = path.dirname(filePath);
|
|
@@ -35,19 +35,12 @@ function getComponentAsset(classDeclaration, inlineStyleLang, outDir) {
|
|
|
35
35
|
[(_a = classDeclaration.getName()) !== null && _a !== void 0 ? _a : '']: assets.map((asset, i) => {
|
|
36
36
|
var _a;
|
|
37
37
|
const code = (0, format_code_1.formatCode)(asset.output, asset.type);
|
|
38
|
-
return {
|
|
39
|
-
...asset,
|
|
40
|
-
code,
|
|
41
|
-
output: new renderer_1.NgDocRenderer()
|
|
42
|
-
.renderSync('./code.html.nunj', {
|
|
38
|
+
return Object.assign(Object.assign({}, asset), { code, output: (0, nunjucks_1.renderTemplate)('./code.html.nunj', {
|
|
43
39
|
context: {
|
|
44
40
|
code,
|
|
45
41
|
lang: asset.type,
|
|
46
42
|
},
|
|
47
|
-
})
|
|
48
|
-
.trim(),
|
|
49
|
-
outputPath: (0, slash_1.slash)(path.join(outDir, (_a = classDeclaration.getName()) !== null && _a !== void 0 ? _a : '', asset.type, `${asset.name}${i}.html`)),
|
|
50
|
-
};
|
|
43
|
+
}).trim(), outputPath: (0, slash_1.slash)(path.join(outDir, (_a = classDeclaration.getName()) !== null && _a !== void 0 ? _a : '', asset.type, `${asset.name}${i}.html`)) });
|
|
51
44
|
}),
|
|
52
45
|
};
|
|
53
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-component-asset.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-component-asset.ts"],"names":[],"mappings":";;;;AACA,uCAAqD;AACrD,mDAA6B;AAG7B,
|
|
1
|
+
{"version":3,"file":"get-component-asset.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/get-component-asset.ts"],"names":[],"mappings":";;;;AACA,uCAAqD;AACrD,mDAA6B;AAG7B,iDAAkD;AAGlD,uCAAgD;AAChD,iDAA2C;AAC3C,+CAAyC;AACzC,mCAA8B;AAE9B;;;;;GAKG;AACH,SAAgB,iBAAiB,CAChC,gBAAkC,EAClC,eAA+B,EAC/B,MAAc;;IAEd,MAAM,aAAa,GAA0B,IAAA,+BAAqB,EAAC,gBAAgB,CAAC,CAAC;IAErF,IAAI,aAAa,EAAE;QAClB,MAAM,QAAQ,GAAW,gBAAgB,CAAC,aAAa,EAAE,CAAC,WAAW,EAAE,CAAC;QACxE,MAAM,OAAO,GAAW,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAE/C,MAAM,MAAM,GAA0C;YACrD,oCAAoC;YACpC,GAAG,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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './angular';
|
|
2
2
|
export * from './build-assets';
|
|
3
|
+
export * from './build-entity-keyword';
|
|
3
4
|
export * from './build-file-entity';
|
|
4
5
|
export * from './code-type-from-ext';
|
|
5
6
|
export * from './create-builder-context';
|
|
@@ -19,10 +20,6 @@ export * from './get-entity-constructor';
|
|
|
19
20
|
export * from './get-keyword-type-from-entity';
|
|
20
21
|
export * from './get-kind-type';
|
|
21
22
|
export * from './get-page-type';
|
|
22
|
-
export * from './get-playground-by-id';
|
|
23
|
-
export * from './get-playground-properties';
|
|
24
|
-
export * from './get-playground-targets';
|
|
25
|
-
export * from './get-playgrounds-ids';
|
|
26
23
|
export * from './import-es-module';
|
|
27
24
|
export * from './is-not-excluded-path';
|
|
28
25
|
export * from './is-supported-declaration';
|
|
@@ -31,8 +28,9 @@ export * from './mini-pattern';
|
|
|
31
28
|
export * from './no-empty';
|
|
32
29
|
export * from './no-line-breaks';
|
|
33
30
|
export * from './not-empty-assets';
|
|
31
|
+
export * from './playground';
|
|
34
32
|
export * from './presentation';
|
|
35
|
-
export * from './print
|
|
33
|
+
export * from './print';
|
|
36
34
|
export * from './process-html';
|
|
37
35
|
export * from './process-snippets';
|
|
38
36
|
export * from './repo-link';
|
package/helpers/index.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./angular"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./build-assets"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./build-entity-keyword"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./build-file-entity"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./code-type-from-ext"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./create-builder-context"), exports);
|
|
@@ -22,10 +23,6 @@ tslib_1.__exportStar(require("./get-entity-constructor"), exports);
|
|
|
22
23
|
tslib_1.__exportStar(require("./get-keyword-type-from-entity"), exports);
|
|
23
24
|
tslib_1.__exportStar(require("./get-kind-type"), exports);
|
|
24
25
|
tslib_1.__exportStar(require("./get-page-type"), exports);
|
|
25
|
-
tslib_1.__exportStar(require("./get-playground-by-id"), exports);
|
|
26
|
-
tslib_1.__exportStar(require("./get-playground-properties"), exports);
|
|
27
|
-
tslib_1.__exportStar(require("./get-playground-targets"), exports);
|
|
28
|
-
tslib_1.__exportStar(require("./get-playgrounds-ids"), exports);
|
|
29
26
|
tslib_1.__exportStar(require("./import-es-module"), exports);
|
|
30
27
|
tslib_1.__exportStar(require("./is-not-excluded-path"), exports);
|
|
31
28
|
tslib_1.__exportStar(require("./is-supported-declaration"), exports);
|
|
@@ -34,8 +31,9 @@ tslib_1.__exportStar(require("./mini-pattern"), exports);
|
|
|
34
31
|
tslib_1.__exportStar(require("./no-empty"), exports);
|
|
35
32
|
tslib_1.__exportStar(require("./no-line-breaks"), exports);
|
|
36
33
|
tslib_1.__exportStar(require("./not-empty-assets"), exports);
|
|
34
|
+
tslib_1.__exportStar(require("./playground"), exports);
|
|
37
35
|
tslib_1.__exportStar(require("./presentation"), exports);
|
|
38
|
-
tslib_1.__exportStar(require("./print
|
|
36
|
+
tslib_1.__exportStar(require("./print"), exports);
|
|
39
37
|
tslib_1.__exportStar(require("./process-html"), exports);
|
|
40
38
|
tslib_1.__exportStar(require("./process-snippets"), exports);
|
|
41
39
|
tslib_1.__exportStar(require("./repo-link"), exports);
|
package/helpers/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B;AAC1B,yDAA+B;AAC/B,8DAAoC;AACpC,+DAAqC;AACrC,mEAAyC;AACzC,oEAA0C;AAC1C,8DAAoC;AACpC,wDAA8B;AAC9B,yDAA+B;AAC/B,gEAAsC;AACtC,8DAAoC;AACpC,mEAAyC;AACzC,wDAA8B;AAC9B,kEAAwC;AACxC,gEAAsC;AACtC,iEAAuC;AACvC,wEAA8C;AAC9C,mEAAyC;AACzC,yEAA+C;AAC/C,0DAAgC;AAChC,0DAAgC;AAChC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B;AAC1B,yDAA+B;AAC/B,iEAAuC;AACvC,8DAAoC;AACpC,+DAAqC;AACrC,mEAAyC;AACzC,oEAA0C;AAC1C,8DAAoC;AACpC,wDAA8B;AAC9B,yDAA+B;AAC/B,gEAAsC;AACtC,8DAAoC;AACpC,mEAAyC;AACzC,wDAA8B;AAC9B,kEAAwC;AACxC,gEAAsC;AACtC,iEAAuC;AACvC,wEAA8C;AAC9C,mEAAyC;AACzC,yEAA+C;AAC/C,0DAAgC;AAChC,0DAAgC;AAChC,6DAAmC;AACnC,iEAAuC;AACvC,qEAA2C;AAC3C,mDAAyB;AACzB,yDAA+B;AAC/B,qDAA2B;AAC3B,2DAAiC;AACjC,6DAAmC;AACnC,uDAA6B;AAC7B,yDAA+B;AAC/B,kDAAwB;AACxB,yDAA+B;AAC/B,6DAAmC;AACnC,sDAA4B;AAC5B,kDAAwB;AACxB,qEAA2C;AAC3C,8DAAoC;AACpC,+DAAqC;AACrC,uDAA6B;AAC7B,wDAA8B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ObjectLiteralExpression } from 'ts-morph';
|
|
2
|
+
import { NgDocPlaygroundMetadata } from '../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Collects all the information about a playground that is needed to render and build it.
|
|
5
|
+
*
|
|
6
|
+
* @param id - The id of the playground
|
|
7
|
+
* @param playground - The playground object
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildPlaygroundMetadata(id: string, playground: ObjectLiteralExpression): NgDocPlaygroundMetadata;
|