igniteui-cli 13.1.0-beta.2 → 13.1.0-beta.3
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/migrations/migration-collection.json +7 -1
- package/migrations/schema.json +14 -0
- package/migrations/update-13_1_0/index.d.ts +2 -0
- package/migrations/update-13_1_0/index.js +20 -0
- package/migrations/update-13_1_0/index.spec.d.ts +1 -0
- package/migrations/update-13_1_0/index.spec.js +74 -0
- package/package.json +3 -3
|
@@ -30,6 +30,12 @@
|
|
|
30
30
|
"version": "5.0.3",
|
|
31
31
|
"description": "Updates Ignite UI for Angular project from CLI 5.0.x to 5.0.3",
|
|
32
32
|
"factory": "./update-5_0_3"
|
|
33
|
-
}
|
|
33
|
+
},
|
|
34
|
+
"migration-07": {
|
|
35
|
+
"version": "13.1.0",
|
|
36
|
+
"description": "Updates Ignite UI for Angular Schematics project from 13.0.x to 13.1.x",
|
|
37
|
+
"factory": "./update-13_1_0",
|
|
38
|
+
"schema": "./schema.json"
|
|
39
|
+
}
|
|
34
40
|
}
|
|
35
41
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "igniteui-cli",
|
|
4
|
+
"title": "IgniteUI CLI schematic",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"applyMigrations": {
|
|
8
|
+
"type": "boolean",
|
|
9
|
+
"description": "Apply migrations to the project.",
|
|
10
|
+
"default": true,
|
|
11
|
+
"x-prompt": "Would you like to apply automated migrations?"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function default_1(options) {
|
|
4
|
+
return (host, context) => {
|
|
5
|
+
var _a;
|
|
6
|
+
if (!options.applyMigrations) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
context.logger.info("Updating project to Ignite UI CLI 13.1.0");
|
|
10
|
+
const igConfig = "./igniteui-cli.json";
|
|
11
|
+
if (host.exists(igConfig)) {
|
|
12
|
+
const content = JSON.parse(host.read(igConfig).toString());
|
|
13
|
+
if (((_a = content === null || content === void 0 ? void 0 : content.project) === null || _a === void 0 ? void 0 : _a.projectType) === "igx-ts") {
|
|
14
|
+
content.project.projectType = "igx-ts-legacy";
|
|
15
|
+
host.overwrite(igConfig, JSON.stringify(content, null, 4));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
exports.default = default_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const path = require("path");
|
|
13
|
+
// tslint:disable:no-implicit-dependencies
|
|
14
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
15
|
+
// tslint:disable-next-line:no-submodule-imports
|
|
16
|
+
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
17
|
+
describe("Update 13.1.0", () => {
|
|
18
|
+
let appTree;
|
|
19
|
+
const schematicRunner = new testing_1.SchematicTestRunner("ig-migrate", path.join(__dirname, "../migration-collection.json"));
|
|
20
|
+
beforeEach(() => {
|
|
21
|
+
appTree = new testing_1.UnitTestTree(new schematics_1.EmptyTree());
|
|
22
|
+
});
|
|
23
|
+
it("change projectType to legacy", (done) => __awaiter(void 0, void 0, void 0, function* () {
|
|
24
|
+
appTree.create("./igniteui-cli.json", `{
|
|
25
|
+
"igPackageRegistry": "https://packages.infragistics.com/npm/js-licensed/",
|
|
26
|
+
"customTemplates": [],
|
|
27
|
+
"skipGit": false,
|
|
28
|
+
"skipAnalytic": false,
|
|
29
|
+
"version": "13.0.1",
|
|
30
|
+
"project": {
|
|
31
|
+
"defaultPort": 4200,
|
|
32
|
+
"framework": "angular",
|
|
33
|
+
"projectType": "igx-ts",
|
|
34
|
+
"projectTemplate": "side-nav",
|
|
35
|
+
"theme": "Default",
|
|
36
|
+
"themePath": "node_modules/igniteui-angular/styles/igniteui-angular.css",
|
|
37
|
+
"isBundle": false,
|
|
38
|
+
"bundleFilePath": "",
|
|
39
|
+
"igniteuiSource": "",
|
|
40
|
+
"components": [],
|
|
41
|
+
"sourceFiles": [],
|
|
42
|
+
"isShowcase": false,
|
|
43
|
+
"version": ""
|
|
44
|
+
},
|
|
45
|
+
"build": {}
|
|
46
|
+
}`);
|
|
47
|
+
const tree = yield schematicRunner.runSchematicAsync("migration-07", { applyMigrations: true }, appTree).toPromise();
|
|
48
|
+
expect(tree.readContent("./igniteui-cli.json"))
|
|
49
|
+
.toEqual(`{
|
|
50
|
+
"igPackageRegistry": "https://packages.infragistics.com/npm/js-licensed/",
|
|
51
|
+
"customTemplates": [],
|
|
52
|
+
"skipGit": false,
|
|
53
|
+
"skipAnalytic": false,
|
|
54
|
+
"version": "13.0.1",
|
|
55
|
+
"project": {
|
|
56
|
+
"defaultPort": 4200,
|
|
57
|
+
"framework": "angular",
|
|
58
|
+
"projectType": "igx-ts-legacy",
|
|
59
|
+
"projectTemplate": "side-nav",
|
|
60
|
+
"theme": "Default",
|
|
61
|
+
"themePath": "node_modules/igniteui-angular/styles/igniteui-angular.css",
|
|
62
|
+
"isBundle": false,
|
|
63
|
+
"bundleFilePath": "",
|
|
64
|
+
"igniteuiSource": "",
|
|
65
|
+
"components": [],
|
|
66
|
+
"sourceFiles": [],
|
|
67
|
+
"isShowcase": false,
|
|
68
|
+
"version": ""
|
|
69
|
+
},
|
|
70
|
+
"build": {}
|
|
71
|
+
}`);
|
|
72
|
+
done();
|
|
73
|
+
}));
|
|
74
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "igniteui-cli",
|
|
3
|
-
"version": "13.1.0-beta.
|
|
3
|
+
"version": "13.1.0-beta.3",
|
|
4
4
|
"description": "CLI tool for creating Ignite UI projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"CLI",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"all": true
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@igniteui/angular-templates": "~17.
|
|
76
|
-
"@igniteui/cli-core": "~13.1.0-beta.
|
|
75
|
+
"@igniteui/angular-templates": "~17.1.1310-beta.3",
|
|
76
|
+
"@igniteui/cli-core": "~13.1.0-beta.3",
|
|
77
77
|
"chalk": "^2.3.2",
|
|
78
78
|
"fs-extra": "^3.0.1",
|
|
79
79
|
"glob": "^7.1.2",
|