@ng-doc/builder 17.0.0-beta.2 → 17.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/application/index.ts"],"names":[],"mappings":";;;;AAAA,yDAMmC;AACnC,iEAAiE;AACjE,+BAAkD;AAClD,8CAAuC;AAEvC,yDAAoD;AACpD,wCAAkD;AAGlD;;;;;GAKG;AACH,SAAsB,UAAU,CAAC,OAAoB,EAAE,OAAuB;;;QAC7E,MAAM,aAAa,GAAkB,OAAO,CAAC,WAAW;YACvD,CAAC,CAAC,IAAA,kCAAsB,EAAC,OAAO,CAAC,WAAW,CAAC;YAC7C,CAAC,CAAC,IAAI,CAAC;QACR,MAAM,aAAa,GAAQ,aAAa;YACvC,CAAC,CAAC,MAAM,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC;YAC/C,CAAC,CAAE,OAAe,CAAC;QACpB,MAAM,cAAc,GAAwB,IAAA,8BAAoB,EAC/D,aAAa,EACb,OAAO,EACP,MAAA,OAAO,CAAC,KAAK,0CAAE,MAAM,CACrB,CAAC;QACF,MAAM,MAAM,GAAqB,IAAA,yBAAU,EAAC,cAAc,CAAC,CAAC;QAE5D,MAAM,IAAA,qBAAc,EAAC,MAAM,CAAC,IAAI,CAAC,IAAA,iBAAK,GAAE,CAAC,CAAC,CAAC;QAE3C,OAAO,IAAA,qBAAc,EAAC,IAAA,6BAAiB,EAAC,IAAA,gCAAgB,EAAC,OAAc,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;;CACpF;AAjBD,gCAiBC;AAED,6DAA6D;AAC7D,aAAa;AACb,kBAAe,IAAA,yBAAa,EAAC,UAAU,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema",
3
3
  "title": "NgDocBuilder",
4
- "description": "NgDocBuilder Browser Schema",
4
+ "description": "NgDocBuilder Application Schema",
5
5
  "type": "object",
6
6
  "properties": {
7
7
  "assets": {
package/builders.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "$schema": "../../node_modules/@angular-devkit/architect/src/builders-schema.json",
3
3
  "builders": {
4
- "browser": {
5
- "implementation": "./browser/index.js",
6
- "schema": "./browser/schema.json",
7
- "description": "NgDoc browser"
4
+ "application": {
5
+ "implementation": "./application/index.js",
6
+ "schema": "./application/schema.json",
7
+ "description": "NgDoc Application"
8
8
  },
9
9
  "dev-server": {
10
10
  "implementation": "./dev-server/index.js",
11
11
  "schema": "./dev-server/schema.json",
12
- "description": "NgDoc dev server"
12
+ "description": "NgDoc Dev Server"
13
13
  }
14
14
  }
15
15
  }
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './browser';
1
+ export * from './application';
2
2
  export * from './dev-server';
3
3
  export * from './engine';
4
4
  export * from './interfaces';
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./browser"), exports);
4
+ tslib_1.__exportStar(require("./application"), exports);
5
5
  tslib_1.__exportStar(require("./dev-server"), exports);
6
6
  tslib_1.__exportStar(require("./engine"), exports);
7
7
  tslib_1.__exportStar(require("./interfaces"), exports);
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../libs/builder/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B;AAC1B,uDAA6B;AAC7B,mDAAyB;AACzB,uDAA6B;AAC7B,oDAA0B;AAC1B,kDAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../libs/builder/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B;AAC9B,uDAA6B;AAC7B,mDAAyB;AACzB,uDAA6B;AAC7B,oDAA0B;AAC1B,kDAAwB"}
package/package.json CHANGED
@@ -1,12 +1,18 @@
1
1
  {
2
2
  "name": "@ng-doc/builder",
3
- "version": "17.0.0-beta.2",
3
+ "version": "17.0.0-beta.4",
4
4
  "type": "commonjs",
5
5
  "builders": "./builders.json",
6
6
  "schematics": "./schematics/collection.json",
7
+ "ng-update": {
8
+ "migrations": "./schematics/migration.json",
9
+ "packageGroup": [
10
+ "ng-doc"
11
+ ]
12
+ },
7
13
  "dependencies": {
8
- "@ng-doc/core": "17.0.0-beta.2",
9
- "@ng-doc/utils": "17.0.0-beta.2",
14
+ "@ng-doc/core": "17.0.0-beta.4",
15
+ "@ng-doc/utils": "17.0.0-beta.4",
10
16
  "@angular-devkit/architect": ">=0.1700.0",
11
17
  "@angular-devkit/build-angular": ">=17.0.0",
12
18
  "chokidar": "3.5.3",
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
3
+ "schematics": {
4
+ "migration-v17": {
5
+ "version": "17.0.0",
6
+ "description": "Updates NgDoc to v17",
7
+ "factory": "./ng-update/ng17#update"
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,5 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ /**
3
+ *
4
+ */
5
+ export declare function update(): Rule;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.update = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const workspace_1 = require("@schematics/angular/utility/workspace");
6
+ const utils_1 = require("../utils");
7
+ /**
8
+ *
9
+ */
10
+ function update() {
11
+ return (tree, context) => tslib_1.__awaiter(this, void 0, void 0, function* () {
12
+ return (0, workspace_1.updateWorkspace)((workspace) => {
13
+ var _a, _b;
14
+ const logger = context.logger.createChild('migrate-to-newest-version');
15
+ context.logger.info(`[INFO]: Builders`);
16
+ logger.info(`🔄 Replacing Angular CLI builders with @ng-doc builders...`);
17
+ try {
18
+ const project = (0, utils_1.getProject)(workspace);
19
+ if (!project) {
20
+ logger.error(`❌ Project that uses @ng-doc/builder was not found.`);
21
+ return;
22
+ }
23
+ const buildTarget = project.targets.get('build');
24
+ if (buildTarget) {
25
+ buildTarget.builder = '@ng-doc/builder:application';
26
+ if (buildTarget.options) {
27
+ buildTarget.options['browser'] = buildTarget.options['main'];
28
+ delete buildTarget.options['main'];
29
+ if (buildTarget.options['polyfills']) {
30
+ buildTarget.options['polyfills'] = [buildTarget.options['polyfills']];
31
+ }
32
+ }
33
+ Object.keys((_a = buildTarget.configurations) !== null && _a !== void 0 ? _a : {}).forEach((key) => {
34
+ if (buildTarget.configurations) {
35
+ const configuration = buildTarget.configurations[key];
36
+ if (configuration) {
37
+ if ('buildOptimizer' in configuration) {
38
+ delete configuration['buildOptimizer'];
39
+ }
40
+ if ('vendorChunk' in configuration) {
41
+ delete configuration['vendorChunk'];
42
+ }
43
+ }
44
+ }
45
+ });
46
+ }
47
+ for (const target of project.targets.values()) {
48
+ Object.keys((_b = target.configurations) !== null && _b !== void 0 ? _b : {}).forEach((key) => {
49
+ if (target.configurations) {
50
+ const configuration = target.configurations[key];
51
+ if (configuration) {
52
+ if ('browserTarget' in configuration) {
53
+ configuration['buildTarget'] = configuration['browserTarget'];
54
+ delete configuration['browserTarget'];
55
+ }
56
+ }
57
+ }
58
+ });
59
+ if (target.options) {
60
+ if ('browserTarget' in target.options) {
61
+ target.options['buildTarget'] = target.options['browserTarget'];
62
+ delete target.options['browserTarget'];
63
+ }
64
+ }
65
+ }
66
+ logger.info('✅ Done!');
67
+ }
68
+ catch (e) {
69
+ logger.error(`❌ Error: ${e}`);
70
+ }
71
+ });
72
+ });
73
+ }
74
+ exports.update = update;
75
+ //# sourceMappingURL=ng17.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng17.js","sourceRoot":"","sources":["../../../../../libs/builder/schematics/ng-update/ng17.ts"],"names":[],"mappings":";;;;AACA,qEAK+C;AAE/C,oCAAsC;AAEtC;;GAEG;AACH,SAAgB,MAAM;IACrB,OAAO,CAAO,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Definition, WorkspaceDefinition } from '@angular-devkit/core/src/workspace';
2
+ /**
3
+ *
4
+ * @param workspace
5
+ */
6
+ export declare function getProject(workspace: WorkspaceDefinition): ProjectDefinition | undefined;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getProject = void 0;
4
+ /**
5
+ *
6
+ * @param workspace
7
+ */
8
+ function getProject(workspace) {
9
+ var _a;
10
+ const ngDocProject = (_a = Array.from(workspace.projects.entries()).find(([, project]) => { var _a; return (_a = project.targets.get('build')) === null || _a === void 0 ? void 0 : _a.builder.startsWith('@ng-doc/builder'); })) === null || _a === void 0 ? void 0 : _a[0];
11
+ return ngDocProject ? workspace.projects.get(ngDocProject) : undefined;
12
+ }
13
+ exports.getProject = getProject;
14
+ //# sourceMappingURL=get-project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-project.js","sourceRoot":"","sources":["../../../../../libs/builder/schematics/utils/get-project.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,SAAgB,UAAU,CAAC,SAA8B;;IACxD,MAAM,YAAY,GAAuB,MAAA,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CACrF,CAAC,CAAC,EAAE,OAAO,CAA8B,EAAE,EAAE,WAC5C,OAAA,MAAA,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,0CAAE,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAA,EAAA,CACpE,0CAAG,CAAC,CAAC,CAAC;IAEP,OAAO,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACxE,CAAC;AAPD,gCAOC"}
@@ -1,4 +1,5 @@
1
1
  export * from './extract-default-export-name';
2
2
  export * from './find-closest-file';
3
+ export * from './get-project';
3
4
  export * from './get-title';
4
5
  export * from './var-name-validation';
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./extract-default-export-name"), exports);
5
5
  tslib_1.__exportStar(require("./find-closest-file"), exports);
6
+ tslib_1.__exportStar(require("./get-project"), exports);
6
7
  tslib_1.__exportStar(require("./get-title"), exports);
7
8
  tslib_1.__exportStar(require("./var-name-validation"), exports);
8
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/builder/schematics/utils/index.ts"],"names":[],"mappings":";;;AAAA,wEAA8C;AAC9C,8DAAoC;AACpC,sDAA4B;AAC5B,gEAAsC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/builder/schematics/utils/index.ts"],"names":[],"mappings":";;;AAAA,wEAA8C;AAC9C,8DAAoC;AACpC,wDAA8B;AAC9B,sDAA4B;AAC5B,gEAAsC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/browser/index.ts"],"names":[],"mappings":";;;;AAAA,yDAMmC;AACnC,iEAAiE;AACjE,+BAAkD;AAClD,8CAAuC;AAEvC,yDAAoD;AACpD,wCAAkD;AAGlD;;;;;GAKG;AACH,SAAsB,UAAU,CAAC,OAAoB,EAAE,OAAuB;;;QAC7E,MAAM,aAAa,GAAkB,OAAO,CAAC,WAAW;YACvD,CAAC,CAAC,IAAA,kCAAsB,EAAC,OAAO,CAAC,WAAW,CAAC;YAC7C,CAAC,CAAC,IAAI,CAAC;QACR,MAAM,aAAa,GAAQ,aAAa;YACvC,CAAC,CAAC,MAAM,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC;YAC/C,CAAC,CAAE,OAAe,CAAC;QACpB,MAAM,cAAc,GAAwB,IAAA,8BAAoB,EAC/D,aAAa,EACb,OAAO,EACP,MAAA,OAAO,CAAC,KAAK,0CAAE,MAAM,CACrB,CAAC;QACF,MAAM,MAAM,GAAqB,IAAA,yBAAU,EAAC,cAAc,CAAC,CAAC;QAE5D,MAAM,IAAA,qBAAc,EAAC,MAAM,CAAC,IAAI,CAAC,IAAA,iBAAK,GAAE,CAAC,CAAC,CAAC;QAE3C,OAAO,IAAA,qBAAc,EAAC,IAAA,6BAAiB,EAAC,IAAA,gCAAgB,EAAC,OAAc,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;;CACpF;AAjBD,gCAiBC;AAED,6DAA6D;AAC7D,aAAa;AACb,kBAAe,IAAA,yBAAa,EAAC,UAAU,CAAC,CAAC"}
File without changes
File without changes