@ionic/angular 8.8.9-dev.11781024903.1e4268e5 → 8.8.9-dev.11781098612.122c6758
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/README.md +1 -1
- package/css/core.css +1 -1
- package/css/core.css.map +1 -1
- package/css/display.css +1 -1
- package/css/display.css.map +1 -1
- package/css/flex-utils.css +1 -1
- package/css/flex-utils.css.map +1 -1
- package/css/float-elements.css.map +1 -1
- package/css/global.bundle.css.map +1 -1
- package/css/ionic-swiper.css +1 -1
- package/css/ionic-swiper.css.map +1 -1
- package/css/ionic.bundle.css +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/css/normalize.css.map +1 -1
- package/css/padding.css.map +1 -1
- package/css/palettes/dark.always.css.map +1 -1
- package/css/palettes/dark.class.css.map +1 -1
- package/css/palettes/dark.system.css.map +1 -1
- package/css/palettes/high-contrast-dark.always.css.map +1 -1
- package/css/palettes/high-contrast-dark.class.css.map +1 -1
- package/css/palettes/high-contrast-dark.system.css.map +1 -1
- package/css/palettes/high-contrast.always.css.map +1 -1
- package/css/palettes/high-contrast.class.css.map +1 -1
- package/css/palettes/high-contrast.system.css.map +1 -1
- package/css/structure.css.map +1 -1
- package/css/text-alignment.css.map +1 -1
- package/css/text-transformation.css.map +1 -1
- package/css/typography.css.map +1 -1
- package/css/utils.bundle.css +1 -1
- package/css/utils.bundle.css.map +1 -1
- package/fesm2022/ionic-angular-common.mjs +107 -93
- package/fesm2022/ionic-angular-common.mjs.map +1 -1
- package/fesm2022/ionic-angular-standalone.mjs +900 -882
- package/fesm2022/ionic-angular-standalone.mjs.map +1 -1
- package/fesm2022/ionic-angular.mjs +1087 -752
- package/fesm2022/ionic-angular.mjs.map +1 -1
- package/package.json +16 -16
- package/schematics/add/index.js +2 -2
- package/schematics/utils/ast.js +35 -3
- package/schematics/utils/config.js +10 -11
- package/schematics/utils/package.js +5 -2
- package/types/ionic-angular-common.d.ts +1021 -0
- package/types/ionic-angular-standalone.d.ts +1560 -0
- package/{directives/proxies.d.ts → types/ionic-angular.d.ts} +703 -469
- package/app-initialize.d.ts +0 -3
- package/common/directives/control-value-accessors/index.d.ts +0 -1
- package/common/directives/control-value-accessors/value-accessor.d.ts +0 -36
- package/common/directives/navigation/back-button.d.ts +0 -23
- package/common/directives/navigation/nav-params.d.ts +0 -45
- package/common/directives/navigation/nav.d.ts +0 -21
- package/common/directives/navigation/router-link-delegate.d.ts +0 -60
- package/common/directives/navigation/router-outlet.d.ts +0 -104
- package/common/directives/navigation/stack-controller.d.ts +0 -42
- package/common/directives/navigation/stack-utils.d.ts +0 -38
- package/common/directives/navigation/tabs.d.ts +0 -83
- package/common/index.d.ts +0 -22
- package/common/overlays/modal.d.ts +0 -62
- package/common/overlays/popover.d.ts +0 -46
- package/common/providers/angular-delegate.d.ts +0 -28
- package/common/providers/config.d.ts +0 -11
- package/common/providers/dom-controller.d.ts +0 -16
- package/common/providers/menu-controller.d.ts +0 -78
- package/common/providers/nav-controller.d.ts +0 -116
- package/common/providers/platform.d.ts +0 -174
- package/common/types/interfaces.d.ts +0 -8
- package/common/types/ionic-lifecycle-hooks.d.ts +0 -27
- package/common/types/overlay-options.d.ts +0 -16
- package/common/utils/overlay.d.ts +0 -21
- package/common/utils/proxy.d.ts +0 -8
- package/common/utils/routing.d.ts +0 -28
- package/common/utils/util.d.ts +0 -1
- package/css/ionic/bundle.ionic.css +0 -1
- package/css/ionic/bundle.ionic.css.map +0 -1
- package/css/ionic/core.ionic.css +0 -1
- package/css/ionic/core.ionic.css.map +0 -1
- package/css/ionic/global.bundle.ionic.css +0 -1
- package/css/ionic/global.bundle.ionic.css.map +0 -1
- package/css/ionic/ionic-swiper.ionic.css +0 -1
- package/css/ionic/ionic-swiper.ionic.css.map +0 -1
- package/css/ionic/link.ionic.css +0 -1
- package/css/ionic/link.ionic.css.map +0 -1
- package/css/ionic/structure.ionic.css +0 -1
- package/css/ionic/structure.ionic.css.map +0 -1
- package/css/ionic/typography.ionic.css +0 -1
- package/css/ionic/typography.ionic.css.map +0 -1
- package/css/ionic/utils.bundle.ionic.css +0 -1
- package/css/ionic/utils.bundle.ionic.css.map +0 -1
- package/directives/angular-component-lib/utils.d.ts +0 -9
- package/directives/control-value-accessors/boolean-value-accessor.d.ts +0 -10
- package/directives/control-value-accessors/index.d.ts +0 -4
- package/directives/control-value-accessors/numeric-value-accessor.d.ts +0 -11
- package/directives/control-value-accessors/select-value-accessor.d.ts +0 -9
- package/directives/control-value-accessors/text-value-accessor.d.ts +0 -9
- package/directives/navigation/ion-back-button.d.ts +0 -9
- package/directives/navigation/ion-nav.d.ts +0 -8
- package/directives/navigation/ion-router-outlet.d.ts +0 -25
- package/directives/navigation/ion-tabs.d.ts +0 -13
- package/directives/navigation/router-link-delegate.d.ts +0 -16
- package/directives/overlays/modal.d.ts +0 -6
- package/directives/overlays/popover.d.ts +0 -6
- package/directives/proxies-list.d.ts +0 -2
- package/directives/validators/index.d.ts +0 -2
- package/directives/validators/max-validator.d.ts +0 -12
- package/directives/validators/min-validator.d.ts +0 -12
- package/esm2022/app-initialize.mjs +0 -29
- package/esm2022/common/directives/control-value-accessors/index.mjs +0 -2
- package/esm2022/common/directives/control-value-accessors/value-accessor.mjs +0 -153
- package/esm2022/common/directives/navigation/back-button.mjs +0 -61
- package/esm2022/common/directives/navigation/nav-params.mjs +0 -47
- package/esm2022/common/directives/navigation/nav.mjs +0 -49
- package/esm2022/common/directives/navigation/router-link-delegate.mjs +0 -156
- package/esm2022/common/directives/navigation/router-outlet.mjs +0 -480
- package/esm2022/common/directives/navigation/stack-controller.mjs +0 -280
- package/esm2022/common/directives/navigation/stack-utils.mjs +0 -73
- package/esm2022/common/directives/navigation/tabs.mjs +0 -279
- package/esm2022/common/index.mjs +0 -20
- package/esm2022/common/ionic-angular-common.mjs +0 -5
- package/esm2022/common/overlays/modal.mjs +0 -103
- package/esm2022/common/overlays/popover.mjs +0 -91
- package/esm2022/common/providers/angular-delegate.mjs +0 -203
- package/esm2022/common/providers/config.mjs +0 -45
- package/esm2022/common/providers/dom-controller.mjs +0 -45
- package/esm2022/common/providers/menu-controller.mjs +0 -114
- package/esm2022/common/providers/nav-controller.mjs +0 -235
- package/esm2022/common/providers/platform.mjs +0 -258
- package/esm2022/common/types/interfaces.mjs +0 -2
- package/esm2022/common/types/ionic-lifecycle-hooks.mjs +0 -5
- package/esm2022/common/types/overlay-options.mjs +0 -2
- package/esm2022/common/utils/overlay.mjs +0 -26
- package/esm2022/common/utils/proxy.mjs +0 -47
- package/esm2022/common/utils/routing.mjs +0 -55
- package/esm2022/common/utils/util.mjs +0 -10
- package/esm2022/directives/angular-component-lib/utils.mjs +0 -59
- package/esm2022/directives/control-value-accessors/boolean-value-accessor.mjs +0 -42
- package/esm2022/directives/control-value-accessors/index.mjs +0 -5
- package/esm2022/directives/control-value-accessors/numeric-value-accessor.mjs +0 -50
- package/esm2022/directives/control-value-accessors/select-value-accessor.mjs +0 -39
- package/esm2022/directives/control-value-accessors/text-value-accessor.mjs +0 -38
- package/esm2022/directives/navigation/ion-back-button.mjs +0 -24
- package/esm2022/directives/navigation/ion-nav.mjs +0 -21
- package/esm2022/directives/navigation/ion-router-outlet.mjs +0 -52
- package/esm2022/directives/navigation/ion-tabs.mjs +0 -59
- package/esm2022/directives/navigation/router-link-delegate.mjs +0 -32
- package/esm2022/directives/overlays/modal.mjs +0 -22
- package/esm2022/directives/overlays/popover.mjs +0 -18
- package/esm2022/directives/proxies-list.mjs +0 -92
- package/esm2022/directives/proxies.mjs +0 -2438
- package/esm2022/directives/validators/index.mjs +0 -3
- package/esm2022/directives/validators/max-validator.mjs +0 -27
- package/esm2022/directives/validators/min-validator.mjs +0 -27
- package/esm2022/index.mjs +0 -32
- package/esm2022/ionic-angular.mjs +0 -5
- package/esm2022/ionic-module.mjs +0 -111
- package/esm2022/providers/action-sheet-controller.mjs +0 -19
- package/esm2022/providers/alert-controller.mjs +0 -19
- package/esm2022/providers/animation-controller.mjs +0 -38
- package/esm2022/providers/gesture-controller.mjs +0 -33
- package/esm2022/providers/loading-controller.mjs +0 -19
- package/esm2022/providers/menu-controller.mjs +0 -19
- package/esm2022/providers/modal-controller.mjs +0 -26
- package/esm2022/providers/picker-controller.mjs +0 -22
- package/esm2022/providers/popover-controller.mjs +0 -19
- package/esm2022/providers/toast-controller.mjs +0 -19
- package/esm2022/standalone/directives/angular-component-lib/utils.mjs +0 -59
- package/esm2022/standalone/directives/checkbox.mjs +0 -76
- package/esm2022/standalone/directives/datetime.mjs +0 -95
- package/esm2022/standalone/directives/icon.mjs +0 -35
- package/esm2022/standalone/directives/index.mjs +0 -13
- package/esm2022/standalone/directives/input-otp.mjs +0 -90
- package/esm2022/standalone/directives/input.mjs +0 -113
- package/esm2022/standalone/directives/proxies.mjs +0 -2326
- package/esm2022/standalone/directives/radio-group.mjs +0 -60
- package/esm2022/standalone/directives/range.mjs +0 -78
- package/esm2022/standalone/directives/searchbar.mjs +0 -82
- package/esm2022/standalone/directives/segment.mjs +0 -60
- package/esm2022/standalone/directives/select.mjs +0 -84
- package/esm2022/standalone/directives/textarea.mjs +0 -91
- package/esm2022/standalone/directives/toggle.mjs +0 -76
- package/esm2022/standalone/index.mjs +0 -25
- package/esm2022/standalone/ionic-angular-standalone.mjs +0 -5
- package/esm2022/standalone/navigation/back-button.mjs +0 -32
- package/esm2022/standalone/navigation/nav.mjs +0 -28
- package/esm2022/standalone/navigation/router-link-delegate.mjs +0 -28
- package/esm2022/standalone/navigation/router-outlet.mjs +0 -60
- package/esm2022/standalone/navigation/tabs.mjs +0 -58
- package/esm2022/standalone/overlays/modal.mjs +0 -32
- package/esm2022/standalone/overlays/popover.mjs +0 -28
- package/esm2022/standalone/providers/action-sheet-controller.mjs +0 -21
- package/esm2022/standalone/providers/alert-controller.mjs +0 -21
- package/esm2022/standalone/providers/animation-controller.mjs +0 -38
- package/esm2022/standalone/providers/gesture-controller.mjs +0 -33
- package/esm2022/standalone/providers/ionic-angular.mjs +0 -38
- package/esm2022/standalone/providers/loading-controller.mjs +0 -21
- package/esm2022/standalone/providers/menu-controller.mjs +0 -19
- package/esm2022/standalone/providers/modal-controller.mjs +0 -28
- package/esm2022/standalone/providers/picker-controller.mjs +0 -24
- package/esm2022/standalone/providers/popover-controller.mjs +0 -21
- package/esm2022/standalone/providers/toast-controller.mjs +0 -21
- package/index.d.ts +0 -27
- package/ionic-module.d.ts +0 -28
- package/providers/action-sheet-controller.d.ts +0 -8
- package/providers/alert-controller.d.ts +0 -8
- package/providers/animation-controller.d.ts +0 -25
- package/providers/gesture-controller.d.ts +0 -13
- package/providers/loading-controller.d.ts +0 -8
- package/providers/menu-controller.d.ts +0 -7
- package/providers/modal-controller.d.ts +0 -12
- package/providers/picker-controller.d.ts +0 -11
- package/providers/popover-controller.d.ts +0 -9
- package/providers/toast-controller.d.ts +0 -8
- package/standalone/directives/angular-component-lib/utils.d.ts +0 -9
- package/standalone/directives/checkbox.d.ts +0 -30
- package/standalone/directives/datetime.d.ts +0 -30
- package/standalone/directives/icon.d.ts +0 -9
- package/standalone/directives/index.d.ts +0 -12
- package/standalone/directives/input-otp.d.ts +0 -49
- package/standalone/directives/input.d.ts +0 -47
- package/standalone/directives/proxies.d.ts +0 -1053
- package/standalone/directives/radio-group.d.ts +0 -18
- package/standalone/directives/range.d.ts +0 -47
- package/standalone/directives/searchbar.d.ts +0 -45
- package/standalone/directives/segment.d.ts +0 -19
- package/standalone/directives/select.d.ts +0 -34
- package/standalone/directives/textarea.d.ts +0 -37
- package/standalone/directives/toggle.d.ts +0 -28
- package/standalone/index.d.ts +0 -23
- package/standalone/navigation/back-button.d.ts +0 -9
- package/standalone/navigation/nav.d.ts +0 -8
- package/standalone/navigation/router-link-delegate.d.ts +0 -10
- package/standalone/navigation/router-outlet.d.ts +0 -25
- package/standalone/navigation/tabs.d.ts +0 -13
- package/standalone/overlays/modal.d.ts +0 -6
- package/standalone/overlays/popover.d.ts +0 -6
- package/standalone/providers/action-sheet-controller.d.ts +0 -8
- package/standalone/providers/alert-controller.d.ts +0 -8
- package/standalone/providers/animation-controller.d.ts +0 -25
- package/standalone/providers/gesture-controller.d.ts +0 -13
- package/standalone/providers/ionic-angular.d.ts +0 -7
- package/standalone/providers/loading-controller.d.ts +0 -8
- package/standalone/providers/menu-controller.d.ts +0 -7
- package/standalone/providers/modal-controller.d.ts +0 -12
- package/standalone/providers/picker-controller.d.ts +0 -11
- package/standalone/providers/popover-controller.d.ts +0 -9
- package/standalone/providers/toast-controller.d.ts +0 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ionic/angular",
|
|
3
|
-
"version": "8.8.9-dev.
|
|
3
|
+
"version": "8.8.9-dev.11781098612.122c6758",
|
|
4
4
|
"description": "Angular specific wrappers for @ionic/core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ionic",
|
|
@@ -31,39 +31,39 @@
|
|
|
31
31
|
"default": "./package.json"
|
|
32
32
|
},
|
|
33
33
|
".": {
|
|
34
|
-
"types": "./
|
|
35
|
-
"esm2022": "./esm2022/ionic-angular.mjs",
|
|
36
|
-
"esm": "./esm2022/ionic-angular.mjs",
|
|
34
|
+
"types": "./types/ionic-angular.d.ts",
|
|
37
35
|
"default": "./fesm2022/ionic-angular.mjs"
|
|
38
36
|
},
|
|
39
37
|
"./common": {
|
|
40
|
-
"types": "./common
|
|
41
|
-
"esm2022": "./esm2022/common/ionic-angular-common.mjs",
|
|
42
|
-
"esm": "./esm2022/common/ionic-angular-common.mjs",
|
|
38
|
+
"types": "./types/ionic-angular-common.d.ts",
|
|
43
39
|
"default": "./fesm2022/ionic-angular-common.mjs"
|
|
44
40
|
},
|
|
45
41
|
"./standalone": {
|
|
46
|
-
"types": "./standalone
|
|
47
|
-
"esm2022": "./esm2022/standalone/ionic-angular-standalone.mjs",
|
|
48
|
-
"esm": "./esm2022/standalone/ionic-angular-standalone.mjs",
|
|
42
|
+
"types": "./types/ionic-angular-standalone.d.ts",
|
|
49
43
|
"default": "./fesm2022/ionic-angular-standalone.mjs"
|
|
50
44
|
}
|
|
51
45
|
},
|
|
52
46
|
"dependencies": {
|
|
53
|
-
"@ionic/core": "8.8.9-dev.
|
|
47
|
+
"@ionic/core": "8.8.9-dev.11781098612.122c6758",
|
|
54
48
|
"ionicons": "^8.0.13",
|
|
55
49
|
"jsonc-parser": "^3.0.0",
|
|
56
50
|
"tslib": "^2.3.0"
|
|
57
51
|
},
|
|
58
52
|
"peerDependencies": {
|
|
59
|
-
"@angular/core": ">=
|
|
60
|
-
"@angular/forms": ">=
|
|
61
|
-
"@angular/router": ">=
|
|
53
|
+
"@angular/core": ">=18.0.0",
|
|
54
|
+
"@angular/forms": ">=18.0.0",
|
|
55
|
+
"@angular/router": ">=18.0.0",
|
|
62
56
|
"rxjs": ">=7.5.0",
|
|
63
57
|
"zone.js": ">=0.13.0"
|
|
64
58
|
},
|
|
59
|
+
"peerDependenciesMeta": {
|
|
60
|
+
"zone.js": {
|
|
61
|
+
"optional": true
|
|
62
|
+
}
|
|
63
|
+
},
|
|
65
64
|
"schematics": "./schematics/collection.json",
|
|
66
65
|
"module": "fesm2022/ionic-angular.mjs",
|
|
67
|
-
"typings": "
|
|
68
|
-
"sideEffects": false
|
|
66
|
+
"typings": "types/ionic-angular.d.ts",
|
|
67
|
+
"sideEffects": false,
|
|
68
|
+
"type": "module"
|
|
69
69
|
}
|
package/schematics/add/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = ngAdd;
|
|
3
4
|
const core_1 = require("@angular-devkit/core");
|
|
4
5
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
6
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
@@ -162,7 +163,7 @@ function ngAdd(options) {
|
|
|
162
163
|
options.project = (0, config_1.getDefaultAngularAppName)(workspace);
|
|
163
164
|
}
|
|
164
165
|
const project = workspace.projects.get(options.project);
|
|
165
|
-
if (
|
|
166
|
+
if ((project === null || project === void 0 ? void 0 : project.extensions.projectType) !== 'application') {
|
|
166
167
|
throw new schematics_1.SchematicsException(`Ionic Add requires a project type of "application".`);
|
|
167
168
|
}
|
|
168
169
|
const sourcePath = (0, core_1.join)(project.sourceRoot);
|
|
@@ -184,4 +185,3 @@ function ngAdd(options) {
|
|
|
184
185
|
]);
|
|
185
186
|
};
|
|
186
187
|
}
|
|
187
|
-
exports.default = ngAdd;
|
package/schematics/utils/ast.js
CHANGED
|
@@ -1,10 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addIonicModuleImportToNgModule =
|
|
36
|
+
exports.addIonicModuleImportToNgModule = addIonicModuleImportToNgModule;
|
|
4
37
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
38
|
const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
|
|
6
39
|
const change_1 = require("@schematics/angular/utility/change");
|
|
7
|
-
const ts = require("typescript");
|
|
40
|
+
const ts = __importStar(require("typescript"));
|
|
8
41
|
/**
|
|
9
42
|
* Reads file given path and returns TypeScript source file.
|
|
10
43
|
*/
|
|
@@ -29,4 +62,3 @@ function addIonicModuleImportToNgModule(host, modulePath) {
|
|
|
29
62
|
(0, change_1.applyToUpdateRecorder)(recorder, metadataChange);
|
|
30
63
|
host.commitUpdate(recorder);
|
|
31
64
|
}
|
|
32
|
-
exports.addIonicModuleImportToNgModule = addIonicModuleImportToNgModule;
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.readConfig = readConfig;
|
|
4
|
+
exports.writeConfig = writeConfig;
|
|
5
|
+
exports.getDefaultAngularAppName = getDefaultAngularAppName;
|
|
6
|
+
exports.addStyle = addStyle;
|
|
7
|
+
exports.addAsset = addAsset;
|
|
8
|
+
exports.addArchitectBuilder = addArchitectBuilder;
|
|
9
|
+
exports.addCli = addCli;
|
|
10
|
+
exports.addSchematics = addSchematics;
|
|
11
|
+
exports.getWorkspacePath = getWorkspacePath;
|
|
12
|
+
exports.getWorkspace = getWorkspace;
|
|
4
13
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
14
|
const jsonc_parser_1 = require("jsonc-parser");
|
|
6
15
|
const ANGULAR_JSON_PATH = 'angular.json';
|
|
7
16
|
function readConfig(host) {
|
|
8
17
|
return host.readJson(ANGULAR_JSON_PATH);
|
|
9
18
|
}
|
|
10
|
-
exports.readConfig = readConfig;
|
|
11
19
|
function writeConfig(host, config) {
|
|
12
20
|
host.overwrite(ANGULAR_JSON_PATH, JSON.stringify(config, null, 2));
|
|
13
21
|
}
|
|
14
|
-
exports.writeConfig = writeConfig;
|
|
15
22
|
function isAngularBrowserProject(projectConfig) {
|
|
16
23
|
if (projectConfig.projectType === 'application') {
|
|
17
24
|
const buildConfig = projectConfig.architect.build;
|
|
@@ -36,7 +43,6 @@ function getDefaultAngularAppName(config) {
|
|
|
36
43
|
}
|
|
37
44
|
return projectNames[0];
|
|
38
45
|
}
|
|
39
|
-
exports.getDefaultAngularAppName = getDefaultAngularAppName;
|
|
40
46
|
function getAngularJson(config, projectName) {
|
|
41
47
|
// eslint-disable-next-line no-prototype-builtins
|
|
42
48
|
if (!config.projects.hasOwnProperty(projectName)) {
|
|
@@ -62,7 +68,6 @@ function addStyle(host, projectName, stylePath) {
|
|
|
62
68
|
});
|
|
63
69
|
writeConfig(host, config);
|
|
64
70
|
}
|
|
65
|
-
exports.addStyle = addStyle;
|
|
66
71
|
function addAsset(host, projectName, architect, asset) {
|
|
67
72
|
const config = readConfig(host);
|
|
68
73
|
const angularJson = getAngularJson(config, projectName);
|
|
@@ -72,14 +77,12 @@ function addAsset(host, projectName, architect, asset) {
|
|
|
72
77
|
writeConfig(host, config);
|
|
73
78
|
}
|
|
74
79
|
}
|
|
75
|
-
exports.addAsset = addAsset;
|
|
76
80
|
function addArchitectBuilder(host, projectName, builderName, builderOpts) {
|
|
77
81
|
const config = readConfig(host);
|
|
78
82
|
const angularJson = getAngularJson(config, projectName);
|
|
79
83
|
angularJson.architect[builderName] = builderOpts;
|
|
80
84
|
writeConfig(host, config);
|
|
81
85
|
}
|
|
82
|
-
exports.addArchitectBuilder = addArchitectBuilder;
|
|
83
86
|
/**
|
|
84
87
|
* Updates the angular.json to add an additional schematic collection
|
|
85
88
|
* to the CLI configuration.
|
|
@@ -95,7 +98,6 @@ function addCli(host, collectionName) {
|
|
|
95
98
|
angularJson.cli.schematicCollections.push(collectionName);
|
|
96
99
|
writeConfig(host, angularJson);
|
|
97
100
|
}
|
|
98
|
-
exports.addCli = addCli;
|
|
99
101
|
function addSchematics(host, schematicName, schematicOpts) {
|
|
100
102
|
const angularJson = readConfig(host);
|
|
101
103
|
if (angularJson.schematics === undefined) {
|
|
@@ -104,13 +106,11 @@ function addSchematics(host, schematicName, schematicOpts) {
|
|
|
104
106
|
angularJson.schematics[schematicName] = schematicOpts;
|
|
105
107
|
writeConfig(host, angularJson);
|
|
106
108
|
}
|
|
107
|
-
exports.addSchematics = addSchematics;
|
|
108
109
|
function getWorkspacePath(host) {
|
|
109
110
|
const possibleFiles = ['/angular.json', '/.angular.json'];
|
|
110
111
|
const path = possibleFiles.filter((path) => host.exists(path))[0];
|
|
111
112
|
return path;
|
|
112
113
|
}
|
|
113
|
-
exports.getWorkspacePath = getWorkspacePath;
|
|
114
114
|
function getWorkspace(host) {
|
|
115
115
|
const path = getWorkspacePath(host);
|
|
116
116
|
const configBuffer = host.read(path);
|
|
@@ -120,4 +120,3 @@ function getWorkspace(host) {
|
|
|
120
120
|
const content = configBuffer.toString();
|
|
121
121
|
return (0, jsonc_parser_1.parse)(content);
|
|
122
122
|
}
|
|
123
|
-
exports.getWorkspace = getWorkspace;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addPackageToPackageJson =
|
|
3
|
+
exports.addPackageToPackageJson = addPackageToPackageJson;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
/**
|
|
5
6
|
* Adds a package to the package.json
|
|
6
7
|
*/
|
|
@@ -8,6 +9,9 @@ function addPackageToPackageJson(host, type, pkg, version) {
|
|
|
8
9
|
var _a;
|
|
9
10
|
if (host.exists('package.json')) {
|
|
10
11
|
const sourceText = (_a = host.read('package.json')) === null || _a === void 0 ? void 0 : _a.toString('utf-8');
|
|
12
|
+
if (sourceText === undefined) {
|
|
13
|
+
throw new schematics_1.SchematicsException('Could not read package.json');
|
|
14
|
+
}
|
|
11
15
|
const json = JSON.parse(sourceText);
|
|
12
16
|
if (!json[type]) {
|
|
13
17
|
json[type] = {};
|
|
@@ -19,4 +23,3 @@ function addPackageToPackageJson(host, type, pkg, version) {
|
|
|
19
23
|
}
|
|
20
24
|
return host;
|
|
21
25
|
}
|
|
22
|
-
exports.addPackageToPackageJson = addPackageToPackageJson;
|