igniteui-cli 13.1.4 → 13.1.6-beta.1
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/lib/commands/upgrade.js +4 -5
- package/package.json +3 -3
- package/templates/Update.d.ts +1 -0
- package/templates/Update.js +125 -0
- package/templates/react/igr-ts/projects/_base/index.js +2 -1
- package/templates/react/package-resolve.d.ts +44 -0
- package/templates/react/package-resolve.js +64 -0
- package/templates/webcomponents/igc-ts/projects/_base/index.js +2 -1
- package/templates/webcomponents/package-resolve.d.ts +38 -5
- package/templates/webcomponents/package-resolve.js +39 -3
package/lib/commands/upgrade.js
CHANGED
|
@@ -42,11 +42,10 @@ command = {
|
|
|
42
42
|
case "jquery":
|
|
43
43
|
cli_core_1.Util.log("Upgrading packages for jQuery projects is currently not supported!");
|
|
44
44
|
return;
|
|
45
|
-
case "react":
|
|
46
|
-
cli_core_1.Util.log("Upgrading packages for React projects is currently not supported!");
|
|
47
|
-
return;
|
|
48
45
|
case "angular":
|
|
49
|
-
|
|
46
|
+
case "react":
|
|
47
|
+
case "webcomponents":
|
|
48
|
+
if (projectType === "igx-ts" || projectType === "igr-ts" || projectType === "igc-ts") {
|
|
50
49
|
const projectLibrary = command.templateManager.getProjectLibrary(framework, projectType);
|
|
51
50
|
let project;
|
|
52
51
|
if (!config.project.projectTemplate || !projectLibrary.hasProject(config.project.projectTemplate)) {
|
|
@@ -69,7 +68,7 @@ command = {
|
|
|
69
68
|
}
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
|
-
else {
|
|
71
|
+
else if (framework.toLowerCase() === "angular") {
|
|
73
72
|
cli_core_1.Util.log("Upgrading packages for Angular Wrappers projects is currently not supported!");
|
|
74
73
|
return;
|
|
75
74
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "igniteui-cli",
|
|
3
|
-
"version": "13.1.
|
|
3
|
+
"version": "13.1.6-beta.1",
|
|
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.1
|
|
76
|
-
"@igniteui/cli-core": "~13.1.
|
|
75
|
+
"@igniteui/angular-templates": "~17.0.1316-beta.1",
|
|
76
|
+
"@igniteui/cli-core": "~13.1.6-beta.1",
|
|
77
77
|
"chalk": "^2.3.2",
|
|
78
78
|
"fs-extra": "^3.0.1",
|
|
79
79
|
"glob": "^7.1.2",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function updateWorkspace(rootPath: string): Promise<boolean>;
|
|
@@ -0,0 +1,125 @@
|
|
|
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
|
+
exports.updateWorkspace = void 0;
|
|
13
|
+
const cli_core_1 = require("@igniteui/cli-core");
|
|
14
|
+
const path = require("path");
|
|
15
|
+
const package_resolve_1 = require("./react/package-resolve");
|
|
16
|
+
const package_resolve_2 = require("./webcomponents/package-resolve");
|
|
17
|
+
function updateWorkspace(rootPath) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
let guideLink = "";
|
|
20
|
+
let logicFilesExtension = "";
|
|
21
|
+
let upgradeable = [];
|
|
22
|
+
const config = cli_core_1.ProjectConfig.getConfig();
|
|
23
|
+
const framework = config.project.framework;
|
|
24
|
+
switch (framework.toLowerCase()) {
|
|
25
|
+
// case "angular":
|
|
26
|
+
// guideLink =
|
|
27
|
+
// "https://www.infragistics.com/products/ignite-ui-angular/angular/components/general/ignite-ui-licensing";
|
|
28
|
+
// break;
|
|
29
|
+
case "react":
|
|
30
|
+
guideLink = "https://www.infragistics.com/products/ignite-ui-react/react/components/general-licensing";
|
|
31
|
+
logicFilesExtension = "tsx";
|
|
32
|
+
upgradeable = (0, package_resolve_1.getReactUpgradeablePackages)();
|
|
33
|
+
break;
|
|
34
|
+
case "webcomponents":
|
|
35
|
+
guideLink = "https://www.infragistics.com/products/ignite-ui-web-components/web-components/components/general-licensing";
|
|
36
|
+
logicFilesExtension = "ts";
|
|
37
|
+
upgradeable = (0, package_resolve_2.getWebcomponentsUpgradeablePackages)();
|
|
38
|
+
break;
|
|
39
|
+
default:
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
if (!upgradeable.length) {
|
|
43
|
+
cli_core_1.Util.log("Your app is already using packages from the Infragistics registry. You are good to go.", "green");
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
const packageJsonPath = path.join(rootPath, "package.json");
|
|
47
|
+
const fs = cli_core_1.App.container.get(cli_core_1.FS_TOKEN);
|
|
48
|
+
const fileString = fs.readFile(packageJsonPath);
|
|
49
|
+
if (!fileString) {
|
|
50
|
+
cli_core_1.Util.log("Package.json not found!");
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
const pkgJSON = JSON.parse(fileString);
|
|
54
|
+
const errorMsg = "Something went wrong, please follow the steps in this guide: " + guideLink;
|
|
55
|
+
if (!cli_core_1.PackageManager.ensureRegistryUser(config, errorMsg)) {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
const workspace = path.join(rootPath, "src");
|
|
59
|
+
const logicFiles = [];
|
|
60
|
+
logicFiles.push(...fs.glob(workspace, "**/*." + logicFilesExtension));
|
|
61
|
+
for (const packageDef of upgradeable) {
|
|
62
|
+
updatePackageJSON(packageDef.trial, packageDef.licensed, pkgJSON);
|
|
63
|
+
}
|
|
64
|
+
fs.writeFile(packageJsonPath, cli_core_1.Util.formatPackageJson(pkgJSON));
|
|
65
|
+
updateFileImports(logicFiles, upgradeable, fs);
|
|
66
|
+
createNpmrc(rootPath, fs);
|
|
67
|
+
updateWorkflows(fs);
|
|
68
|
+
return true;
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
exports.updateWorkspace = updateWorkspace;
|
|
72
|
+
function updateFileContent(fileContent, regexString, replaceWith) {
|
|
73
|
+
const match = fileContent.match(new RegExp(regexString));
|
|
74
|
+
if (match) {
|
|
75
|
+
fileContent = fileContent.replace(new RegExp(regexString, "g"), `$1${replaceWith}$2${match.length === 4 ? "$3" : ""}`);
|
|
76
|
+
}
|
|
77
|
+
return fileContent;
|
|
78
|
+
}
|
|
79
|
+
function updateFileImports(logicFiles, packageDefs, fs) {
|
|
80
|
+
for (const file of logicFiles) {
|
|
81
|
+
let fileContent = fs.readFile(file);
|
|
82
|
+
let fileChange = false;
|
|
83
|
+
for (const packageDef of packageDefs) {
|
|
84
|
+
if (fileContent.includes(packageDef.trial)) {
|
|
85
|
+
const regexFrom = String.raw `(from ["'])${packageDef.trial}(?<submodules>\/.*?)?(["'])`;
|
|
86
|
+
let newContent = updateFileContent(fileContent, regexFrom, packageDef.licensed);
|
|
87
|
+
const regexImport = String.raw `(import ["'])${packageDef.trial}(?<submodules>\/.*?)?(["'])`;
|
|
88
|
+
newContent = updateFileContent(newContent, regexImport, packageDef.licensed);
|
|
89
|
+
fileChange = fileContent !== newContent;
|
|
90
|
+
fileContent = newContent;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (fileChange) {
|
|
94
|
+
fs.writeFile(file, fileContent);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function updatePackageJSON(initName, replaceWith, pkgJSON) {
|
|
99
|
+
// update dependencies
|
|
100
|
+
if (!pkgJSON.dependencies.hasOwnProperty(initName)) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
pkgJSON.dependencies[replaceWith] = pkgJSON.dependencies[initName];
|
|
104
|
+
delete pkgJSON.dependencies[initName];
|
|
105
|
+
}
|
|
106
|
+
function updateWorkflows(fs) {
|
|
107
|
+
const workflowPath = ".github/workflows/node.js.yml";
|
|
108
|
+
let workflow = fs.readFile(workflowPath);
|
|
109
|
+
if (workflow) {
|
|
110
|
+
const oldNmpInstall = "- run: npm i # replace with \'npm ci\' after committing lock file from first install";
|
|
111
|
+
const newNpmInstall = `- run: echo "@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/" >> ~/.npmrc
|
|
112
|
+
- run: echo "//packages.infragistics.com/npm/js-licensed/:_auth=\${{ secrets.NPM_AUTH_TOKEN }}" >> ~/.npmrc
|
|
113
|
+
- run: echo "//packages.infragistics.com/npm/js-licensed/:always-auth=true" >> ~/.npmrc
|
|
114
|
+
- run: npm i # replace with \'npm ci\' after committing lock file from first install`;
|
|
115
|
+
workflow = workflow.replace(oldNmpInstall, newNpmInstall);
|
|
116
|
+
fs.writeFile(workflowPath, workflow);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function createNpmrc(rootPath, fs) {
|
|
120
|
+
const npmrcPath = path.join(rootPath, ".npmrc");
|
|
121
|
+
const fileContent = `@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/
|
|
122
|
+
//packages.infragistics.com/npm/js-licensed/:always-auth=true
|
|
123
|
+
`;
|
|
124
|
+
fs.writeFile(npmrcPath, fileContent);
|
|
125
|
+
}
|
|
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.BaseIgrTsProject = void 0;
|
|
13
13
|
const cli_core_1 = require("@igniteui/cli-core");
|
|
14
|
+
const Update_1 = require("./../../../../Update");
|
|
14
15
|
const path = require("path");
|
|
15
16
|
class BaseIgrTsProject {
|
|
16
17
|
constructor() {
|
|
@@ -33,7 +34,7 @@ class BaseIgrTsProject {
|
|
|
33
34
|
}
|
|
34
35
|
upgradeIgniteUIPackages(projectPath, packagePath) {
|
|
35
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
|
|
37
|
+
return (0, Update_1.updateWorkspace)(projectPath);
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
40
|
getExtraConfiguration() {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { PackageDefinition } from "@igniteui/cli-core";
|
|
2
|
+
export declare const NPM_REACT = "igniteui-react";
|
|
3
|
+
export declare const FEED_REACT = "@infragistics/igniteui-react";
|
|
4
|
+
export declare const NPM_REACT_CORE = "igniteui-react-core";
|
|
5
|
+
export declare const FEED_REACT_CORE = "@infragistics/igniteui-react-core";
|
|
6
|
+
export declare const NPM_REACT_CHARTS = "igniteui-react-charts";
|
|
7
|
+
export declare const FEED_REACT_CHARTS = "@infragistics/igniteui-react-charts";
|
|
8
|
+
export declare const NPM_REACT_GAUGES = "igniteui-react-gauges";
|
|
9
|
+
export declare const FEED_REACT_GAUGES = "@infragistics/igniteui-react-gauges";
|
|
10
|
+
export declare const NPM_REACT_GRIDS = "igniteui-react-grids";
|
|
11
|
+
export declare const FEED_REACT_GRIDS = "@infragistics/igniteui-react-grids";
|
|
12
|
+
export declare const NPM_REACT_INPUTS = "igniteui-react-inputs";
|
|
13
|
+
export declare const FEED_REACT_INPUTS = "@infragistics/igniteui-react-inputs";
|
|
14
|
+
export declare const NPM_REACT_LAYOUTS = "igniteui-react-layouts";
|
|
15
|
+
export declare const FEED_REACT_LAYOUTS = "@infragistics/igniteui-react-layouts";
|
|
16
|
+
export declare const NPM_REACT_MAPS = "igniteui-react-maps";
|
|
17
|
+
export declare const FEED_REACT_MAPS = "@infragistics/igniteui-react-maps";
|
|
18
|
+
export declare const NPM_REACT_EXCEL = "igniteui-react-excel";
|
|
19
|
+
export declare const FEED_REACT_EXCEL = "@infragistics/igniteui-react-excel";
|
|
20
|
+
export declare const NPM_REACT_DATASOURCES = "igniteui-react-datasources";
|
|
21
|
+
export declare const FEED_REACT_DATASOURCES = "@infragistics/igniteui-react-datasources";
|
|
22
|
+
export declare const NPM_REACT_SPREADSHEET = "igniteui-react-spreadsheet";
|
|
23
|
+
export declare const FEED_REACT_SPREADSHEET = "@infragistics/igniteui-react-spreadsheet";
|
|
24
|
+
export declare const NPM_REACT_SPREADSHEET_CHART_ADAPTER = "igniteui-react-spreadsheet-chart-adapter";
|
|
25
|
+
export declare const FEED_REACT_SPREADSHEET_CHART_ADAPTER = "@infragistics/igniteui-react-spreadsheet-chart-adapter";
|
|
26
|
+
export declare const NPM_DOCK_MANAGER = "igniteui-dockmanager";
|
|
27
|
+
export declare const FEED_DOCK_MANAGER = "@infragistics/igniteui-dockmanager";
|
|
28
|
+
/** packages map of `trial: licensed` names */
|
|
29
|
+
export declare const UPGRADEABLE_PACKAGES: {
|
|
30
|
+
"igniteui-react": string;
|
|
31
|
+
"igniteui-react-core": string;
|
|
32
|
+
"igniteui-react-charts": string;
|
|
33
|
+
"igniteui-react-gauges": string;
|
|
34
|
+
"igniteui-react-grids": string;
|
|
35
|
+
"igniteui-react-inputs": string;
|
|
36
|
+
"igniteui-react-layouts": string;
|
|
37
|
+
"igniteui-react-maps": string;
|
|
38
|
+
"igniteui-react-excel": string;
|
|
39
|
+
"igniteui-react-datasources": string;
|
|
40
|
+
"igniteui-react-spreadsheet": string;
|
|
41
|
+
"igniteui-react-spreadsheet-chart-adapter": string;
|
|
42
|
+
"igniteui-dockmanager": string;
|
|
43
|
+
};
|
|
44
|
+
export declare function getReactUpgradeablePackages(): PackageDefinition[];
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getReactUpgradeablePackages = exports.UPGRADEABLE_PACKAGES = exports.FEED_DOCK_MANAGER = exports.NPM_DOCK_MANAGER = exports.FEED_REACT_SPREADSHEET_CHART_ADAPTER = exports.NPM_REACT_SPREADSHEET_CHART_ADAPTER = exports.FEED_REACT_SPREADSHEET = exports.NPM_REACT_SPREADSHEET = exports.FEED_REACT_DATASOURCES = exports.NPM_REACT_DATASOURCES = exports.FEED_REACT_EXCEL = exports.NPM_REACT_EXCEL = exports.FEED_REACT_MAPS = exports.NPM_REACT_MAPS = exports.FEED_REACT_LAYOUTS = exports.NPM_REACT_LAYOUTS = exports.FEED_REACT_INPUTS = exports.NPM_REACT_INPUTS = exports.FEED_REACT_GRIDS = exports.NPM_REACT_GRIDS = exports.FEED_REACT_GAUGES = exports.NPM_REACT_GAUGES = exports.FEED_REACT_CHARTS = exports.NPM_REACT_CHARTS = exports.FEED_REACT_CORE = exports.NPM_REACT_CORE = exports.FEED_REACT = exports.NPM_REACT = void 0;
|
|
4
|
+
const cli_core_1 = require("@igniteui/cli-core");
|
|
5
|
+
exports.NPM_REACT = "igniteui-react";
|
|
6
|
+
exports.FEED_REACT = "@infragistics/igniteui-react";
|
|
7
|
+
exports.NPM_REACT_CORE = "igniteui-react-core";
|
|
8
|
+
exports.FEED_REACT_CORE = "@infragistics/igniteui-react-core";
|
|
9
|
+
exports.NPM_REACT_CHARTS = "igniteui-react-charts";
|
|
10
|
+
exports.FEED_REACT_CHARTS = "@infragistics/igniteui-react-charts";
|
|
11
|
+
exports.NPM_REACT_GAUGES = "igniteui-react-gauges";
|
|
12
|
+
exports.FEED_REACT_GAUGES = "@infragistics/igniteui-react-gauges";
|
|
13
|
+
exports.NPM_REACT_GRIDS = "igniteui-react-grids";
|
|
14
|
+
exports.FEED_REACT_GRIDS = "@infragistics/igniteui-react-grids";
|
|
15
|
+
exports.NPM_REACT_INPUTS = "igniteui-react-inputs";
|
|
16
|
+
exports.FEED_REACT_INPUTS = "@infragistics/igniteui-react-inputs";
|
|
17
|
+
exports.NPM_REACT_LAYOUTS = "igniteui-react-layouts";
|
|
18
|
+
exports.FEED_REACT_LAYOUTS = "@infragistics/igniteui-react-layouts";
|
|
19
|
+
exports.NPM_REACT_MAPS = "igniteui-react-maps";
|
|
20
|
+
exports.FEED_REACT_MAPS = "@infragistics/igniteui-react-maps";
|
|
21
|
+
exports.NPM_REACT_EXCEL = "igniteui-react-excel";
|
|
22
|
+
exports.FEED_REACT_EXCEL = "@infragistics/igniteui-react-excel";
|
|
23
|
+
exports.NPM_REACT_DATASOURCES = "igniteui-react-datasources";
|
|
24
|
+
exports.FEED_REACT_DATASOURCES = "@infragistics/igniteui-react-datasources";
|
|
25
|
+
exports.NPM_REACT_SPREADSHEET = "igniteui-react-spreadsheet";
|
|
26
|
+
exports.FEED_REACT_SPREADSHEET = "@infragistics/igniteui-react-spreadsheet";
|
|
27
|
+
exports.NPM_REACT_SPREADSHEET_CHART_ADAPTER = "igniteui-react-spreadsheet-chart-adapter";
|
|
28
|
+
exports.FEED_REACT_SPREADSHEET_CHART_ADAPTER = "@infragistics/igniteui-react-spreadsheet-chart-adapter";
|
|
29
|
+
exports.NPM_DOCK_MANAGER = "igniteui-dockmanager";
|
|
30
|
+
exports.FEED_DOCK_MANAGER = "@infragistics/igniteui-dockmanager";
|
|
31
|
+
/** packages map of `trial: licensed` names */
|
|
32
|
+
exports.UPGRADEABLE_PACKAGES = {
|
|
33
|
+
[exports.NPM_REACT]: exports.FEED_REACT,
|
|
34
|
+
[exports.NPM_REACT_CORE]: exports.FEED_REACT_CORE,
|
|
35
|
+
[exports.NPM_REACT_CHARTS]: exports.FEED_REACT_CHARTS,
|
|
36
|
+
[exports.NPM_REACT_GAUGES]: exports.FEED_REACT_GAUGES,
|
|
37
|
+
[exports.NPM_REACT_GRIDS]: exports.FEED_REACT_GRIDS,
|
|
38
|
+
[exports.NPM_REACT_INPUTS]: exports.FEED_REACT_INPUTS,
|
|
39
|
+
[exports.NPM_REACT_LAYOUTS]: exports.FEED_REACT_LAYOUTS,
|
|
40
|
+
[exports.NPM_REACT_MAPS]: exports.FEED_REACT_MAPS,
|
|
41
|
+
[exports.NPM_REACT_EXCEL]: exports.FEED_REACT_EXCEL,
|
|
42
|
+
[exports.NPM_REACT_DATASOURCES]: exports.FEED_REACT_DATASOURCES,
|
|
43
|
+
[exports.NPM_REACT_SPREADSHEET]: exports.FEED_REACT_SPREADSHEET,
|
|
44
|
+
[exports.NPM_REACT_SPREADSHEET_CHART_ADAPTER]: exports.FEED_REACT_SPREADSHEET_CHART_ADAPTER,
|
|
45
|
+
[exports.NPM_DOCK_MANAGER]: exports.FEED_DOCK_MANAGER
|
|
46
|
+
};
|
|
47
|
+
function getReactUpgradeablePackages() {
|
|
48
|
+
const fs = cli_core_1.App.container.get(cli_core_1.FS_TOKEN);
|
|
49
|
+
const upgradeable = [];
|
|
50
|
+
if (fs.fileExists("./package.json")) {
|
|
51
|
+
const packageJson = JSON.parse(fs.readFile("./package.json"));
|
|
52
|
+
const dependencies = packageJson["dependencies"];
|
|
53
|
+
for (const packageEntry in exports.UPGRADEABLE_PACKAGES) {
|
|
54
|
+
if (dependencies[packageEntry]) {
|
|
55
|
+
upgradeable.push({
|
|
56
|
+
trial: packageEntry,
|
|
57
|
+
licensed: exports.UPGRADEABLE_PACKAGES[packageEntry]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return upgradeable;
|
|
63
|
+
}
|
|
64
|
+
exports.getReactUpgradeablePackages = getReactUpgradeablePackages;
|
|
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.BaseIgcProject = void 0;
|
|
13
13
|
const cli_core_1 = require("@igniteui/cli-core");
|
|
14
|
+
const Update_1 = require("./../../../../Update");
|
|
14
15
|
const path = require("path");
|
|
15
16
|
class BaseIgcProject {
|
|
16
17
|
constructor() {
|
|
@@ -31,7 +32,7 @@ class BaseIgcProject {
|
|
|
31
32
|
}
|
|
32
33
|
upgradeIgniteUIPackages(projectPath, packagePath) {
|
|
33
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
|
|
35
|
+
return (0, Update_1.updateWorkspace)(projectPath);
|
|
35
36
|
});
|
|
36
37
|
}
|
|
37
38
|
getExtraConfiguration() {
|
|
@@ -1,12 +1,45 @@
|
|
|
1
|
+
import { PackageDefinition } from "@igniteui/cli-core";
|
|
2
|
+
export declare const NPM_WEBCOMPONENTS_CHARTS = "igniteui-webcomponents-charts";
|
|
3
|
+
export declare const FEED_WEBCOMPONENTS_CHARTS = "@infragistics/igniteui-webcomponents-charts";
|
|
4
|
+
export declare const NPM_WEBCOMPONENTS_CORE = "igniteui-webcomponents-core";
|
|
5
|
+
export declare const FEED_WEBCOMPONENTS_CORE = "@infragistics/igniteui-webcomponents-core";
|
|
6
|
+
export declare const NPM_WEBCOMPONENTS_DATASOURCES = "igniteui-webcomponents-datasources";
|
|
7
|
+
export declare const FEED_WEBCOMPONENTS_DATASOURCES = "@infragistics/igniteui-webcomponents-datasources";
|
|
8
|
+
export declare const NPM_WEBCOMPONENTS_EXCEL = "igniteui-webcomponents-excel";
|
|
9
|
+
export declare const FEED_WEBCOMPONENTS_EXCEL = "@infragistics/igniteui-webcomponents-excel";
|
|
10
|
+
export declare const NPM_WEBCOMPONENTS_FDC3 = "igniteui-webcomponents-fdc3";
|
|
11
|
+
export declare const FEED_WEBCOMPONENTS_FDC3 = "@infragistics/igniteui-webcomponents-fdc3";
|
|
12
|
+
export declare const NPM_WEBCOMPONENTS_GAUGES = "igniteui-webcomponents-gauges";
|
|
13
|
+
export declare const FEED_WEBCOMPONENTS_GAUGES = "@infragistics/igniteui-webcomponents-gauges";
|
|
14
|
+
export declare const NPM_WEBCOMPONENTS_GRIDS = "igniteui-webcomponents-grids";
|
|
15
|
+
export declare const FEED_WEBCOMPONENTS_GRIDS = "@infragistics/igniteui-webcomponents-grids";
|
|
16
|
+
export declare const NPM_WEBCOMPONENTS_INPUTS = "igniteui-webcomponents-inputs";
|
|
17
|
+
export declare const FEED_WEBCOMPONENTS_INPUTS = "@infragistics/igniteui-webcomponents-inputs";
|
|
18
|
+
export declare const NPM_WEBCOMPONENTS_LAYOUTS = "igniteui-webcomponents-layouts";
|
|
19
|
+
export declare const FEED_WEBCOMPONENTS_LAYOUTS = "@infragistics/igniteui-webcomponents-layouts";
|
|
20
|
+
export declare const NPM_WEBCOMPONENTS_MAPS = "igniteui-webcomponents-maps";
|
|
21
|
+
export declare const FEED_WEBCOMPONENTS_MAPS = "@infragistics/igniteui-webcomponents-maps";
|
|
22
|
+
export declare const NPM_WEBCOMPONENTS_SPREADSHEET = "igniteui-webcomponents-spreadsheet";
|
|
23
|
+
export declare const FEED_WEBCOMPONENTS_SPREADSHEET = "@infragistics/igniteui-webcomponents-spreadsheet";
|
|
24
|
+
export declare const NPM_WEBCOMPONENTS_CHART_ADAPTER = "igniteui-webcomponents-spreadsheet-chart-adapter";
|
|
25
|
+
export declare const FEED_WEBCOMPONENTS_CHART_ADAPTER = "@infragistics/igniteui-webcomponents-spreadsheet-chart-adapter";
|
|
1
26
|
export declare const NPM_DOCK_MANAGER = "igniteui-dockmanager";
|
|
2
27
|
export declare const FEED_DOCK_MANAGER = "@infragistics/igniteui-dockmanager";
|
|
3
|
-
export interface PackageDefinition {
|
|
4
|
-
trial: string;
|
|
5
|
-
licensed: string;
|
|
6
|
-
}
|
|
7
28
|
/** packages map of `trial: licensed` names */
|
|
8
29
|
export declare const UPGRADEABLE_PACKAGES: {
|
|
30
|
+
"igniteui-webcomponents-charts": string;
|
|
31
|
+
"igniteui-webcomponents-core": string;
|
|
32
|
+
"igniteui-webcomponents-datasources": string;
|
|
33
|
+
"igniteui-webcomponents-excel": string;
|
|
34
|
+
"igniteui-webcomponents-fdc3": string;
|
|
35
|
+
"igniteui-webcomponents-gauges": string;
|
|
36
|
+
"igniteui-webcomponents-grids": string;
|
|
37
|
+
"igniteui-webcomponents-inputs": string;
|
|
38
|
+
"igniteui-webcomponents-layouts": string;
|
|
39
|
+
"igniteui-webcomponents-maps": string;
|
|
40
|
+
"igniteui-webcomponents-spreadsheet": string;
|
|
41
|
+
"igniteui-webcomponents-spreadsheet-chart-adapter": string;
|
|
9
42
|
"igniteui-dockmanager": string;
|
|
10
43
|
};
|
|
11
44
|
export declare function resolveIgcPackage(packageName: keyof typeof UPGRADEABLE_PACKAGES): string;
|
|
12
|
-
export declare function
|
|
45
|
+
export declare function getWebcomponentsUpgradeablePackages(): PackageDefinition[];
|
|
@@ -1,11 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getWebcomponentsUpgradeablePackages = exports.resolveIgcPackage = exports.UPGRADEABLE_PACKAGES = exports.FEED_DOCK_MANAGER = exports.NPM_DOCK_MANAGER = exports.FEED_WEBCOMPONENTS_CHART_ADAPTER = exports.NPM_WEBCOMPONENTS_CHART_ADAPTER = exports.FEED_WEBCOMPONENTS_SPREADSHEET = exports.NPM_WEBCOMPONENTS_SPREADSHEET = exports.FEED_WEBCOMPONENTS_MAPS = exports.NPM_WEBCOMPONENTS_MAPS = exports.FEED_WEBCOMPONENTS_LAYOUTS = exports.NPM_WEBCOMPONENTS_LAYOUTS = exports.FEED_WEBCOMPONENTS_INPUTS = exports.NPM_WEBCOMPONENTS_INPUTS = exports.FEED_WEBCOMPONENTS_GRIDS = exports.NPM_WEBCOMPONENTS_GRIDS = exports.FEED_WEBCOMPONENTS_GAUGES = exports.NPM_WEBCOMPONENTS_GAUGES = exports.FEED_WEBCOMPONENTS_FDC3 = exports.NPM_WEBCOMPONENTS_FDC3 = exports.FEED_WEBCOMPONENTS_EXCEL = exports.NPM_WEBCOMPONENTS_EXCEL = exports.FEED_WEBCOMPONENTS_DATASOURCES = exports.NPM_WEBCOMPONENTS_DATASOURCES = exports.FEED_WEBCOMPONENTS_CORE = exports.NPM_WEBCOMPONENTS_CORE = exports.FEED_WEBCOMPONENTS_CHARTS = exports.NPM_WEBCOMPONENTS_CHARTS = void 0;
|
|
4
4
|
const cli_core_1 = require("@igniteui/cli-core");
|
|
5
|
+
exports.NPM_WEBCOMPONENTS_CHARTS = "igniteui-webcomponents-charts";
|
|
6
|
+
exports.FEED_WEBCOMPONENTS_CHARTS = "@infragistics/igniteui-webcomponents-charts";
|
|
7
|
+
exports.NPM_WEBCOMPONENTS_CORE = "igniteui-webcomponents-core";
|
|
8
|
+
exports.FEED_WEBCOMPONENTS_CORE = "@infragistics/igniteui-webcomponents-core";
|
|
9
|
+
exports.NPM_WEBCOMPONENTS_DATASOURCES = "igniteui-webcomponents-datasources";
|
|
10
|
+
exports.FEED_WEBCOMPONENTS_DATASOURCES = "@infragistics/igniteui-webcomponents-datasources";
|
|
11
|
+
exports.NPM_WEBCOMPONENTS_EXCEL = "igniteui-webcomponents-excel";
|
|
12
|
+
exports.FEED_WEBCOMPONENTS_EXCEL = "@infragistics/igniteui-webcomponents-excel";
|
|
13
|
+
exports.NPM_WEBCOMPONENTS_FDC3 = "igniteui-webcomponents-fdc3";
|
|
14
|
+
exports.FEED_WEBCOMPONENTS_FDC3 = "@infragistics/igniteui-webcomponents-fdc3";
|
|
15
|
+
exports.NPM_WEBCOMPONENTS_GAUGES = "igniteui-webcomponents-gauges";
|
|
16
|
+
exports.FEED_WEBCOMPONENTS_GAUGES = "@infragistics/igniteui-webcomponents-gauges";
|
|
17
|
+
exports.NPM_WEBCOMPONENTS_GRIDS = "igniteui-webcomponents-grids";
|
|
18
|
+
exports.FEED_WEBCOMPONENTS_GRIDS = "@infragistics/igniteui-webcomponents-grids";
|
|
19
|
+
exports.NPM_WEBCOMPONENTS_INPUTS = "igniteui-webcomponents-inputs";
|
|
20
|
+
exports.FEED_WEBCOMPONENTS_INPUTS = "@infragistics/igniteui-webcomponents-inputs";
|
|
21
|
+
exports.NPM_WEBCOMPONENTS_LAYOUTS = "igniteui-webcomponents-layouts";
|
|
22
|
+
exports.FEED_WEBCOMPONENTS_LAYOUTS = "@infragistics/igniteui-webcomponents-layouts";
|
|
23
|
+
exports.NPM_WEBCOMPONENTS_MAPS = "igniteui-webcomponents-maps";
|
|
24
|
+
exports.FEED_WEBCOMPONENTS_MAPS = "@infragistics/igniteui-webcomponents-maps";
|
|
25
|
+
exports.NPM_WEBCOMPONENTS_SPREADSHEET = "igniteui-webcomponents-spreadsheet";
|
|
26
|
+
exports.FEED_WEBCOMPONENTS_SPREADSHEET = "@infragistics/igniteui-webcomponents-spreadsheet";
|
|
27
|
+
exports.NPM_WEBCOMPONENTS_CHART_ADAPTER = "igniteui-webcomponents-spreadsheet-chart-adapter";
|
|
28
|
+
exports.FEED_WEBCOMPONENTS_CHART_ADAPTER = "@infragistics/igniteui-webcomponents-spreadsheet-chart-adapter";
|
|
5
29
|
exports.NPM_DOCK_MANAGER = "igniteui-dockmanager";
|
|
6
30
|
exports.FEED_DOCK_MANAGER = "@infragistics/igniteui-dockmanager";
|
|
7
31
|
/** packages map of `trial: licensed` names */
|
|
8
32
|
exports.UPGRADEABLE_PACKAGES = {
|
|
33
|
+
[exports.NPM_WEBCOMPONENTS_CHARTS]: exports.FEED_WEBCOMPONENTS_CHARTS,
|
|
34
|
+
[exports.NPM_WEBCOMPONENTS_CORE]: exports.FEED_WEBCOMPONENTS_CORE,
|
|
35
|
+
[exports.NPM_WEBCOMPONENTS_DATASOURCES]: exports.FEED_WEBCOMPONENTS_DATASOURCES,
|
|
36
|
+
[exports.NPM_WEBCOMPONENTS_EXCEL]: exports.FEED_WEBCOMPONENTS_EXCEL,
|
|
37
|
+
[exports.NPM_WEBCOMPONENTS_FDC3]: exports.FEED_WEBCOMPONENTS_FDC3,
|
|
38
|
+
[exports.NPM_WEBCOMPONENTS_GAUGES]: exports.FEED_WEBCOMPONENTS_GAUGES,
|
|
39
|
+
[exports.NPM_WEBCOMPONENTS_GRIDS]: exports.FEED_WEBCOMPONENTS_GRIDS,
|
|
40
|
+
[exports.NPM_WEBCOMPONENTS_INPUTS]: exports.FEED_WEBCOMPONENTS_INPUTS,
|
|
41
|
+
[exports.NPM_WEBCOMPONENTS_LAYOUTS]: exports.FEED_WEBCOMPONENTS_LAYOUTS,
|
|
42
|
+
[exports.NPM_WEBCOMPONENTS_MAPS]: exports.FEED_WEBCOMPONENTS_MAPS,
|
|
43
|
+
[exports.NPM_WEBCOMPONENTS_SPREADSHEET]: exports.FEED_WEBCOMPONENTS_SPREADSHEET,
|
|
44
|
+
[exports.NPM_WEBCOMPONENTS_CHART_ADAPTER]: exports.FEED_WEBCOMPONENTS_CHART_ADAPTER,
|
|
9
45
|
[exports.NPM_DOCK_MANAGER]: exports.FEED_DOCK_MANAGER
|
|
10
46
|
};
|
|
11
47
|
function resolveIgcPackage(packageName) {
|
|
@@ -22,7 +58,7 @@ function resolveIgcPackage(packageName) {
|
|
|
22
58
|
return packageName;
|
|
23
59
|
}
|
|
24
60
|
exports.resolveIgcPackage = resolveIgcPackage;
|
|
25
|
-
function
|
|
61
|
+
function getWebcomponentsUpgradeablePackages() {
|
|
26
62
|
const fs = cli_core_1.App.container.get(cli_core_1.FS_TOKEN);
|
|
27
63
|
const upgradeable = [];
|
|
28
64
|
if (fs.fileExists("./package.json")) {
|
|
@@ -39,4 +75,4 @@ function getUpgradeablePackages() {
|
|
|
39
75
|
}
|
|
40
76
|
return upgradeable;
|
|
41
77
|
}
|
|
42
|
-
exports.
|
|
78
|
+
exports.getWebcomponentsUpgradeablePackages = getWebcomponentsUpgradeablePackages;
|