igniteui-cli 15.1.0-beta.0 → 15.2.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/lib/PromptSession.d.ts +4 -14
- package/lib/PromptSession.js +12 -96
- package/lib/cli.js +1 -9
- package/lib/commands/add.js +6 -6
- package/lib/commands/ai-config.d.ts +9 -3
- package/lib/commands/ai-config.js +150 -19
- package/lib/commands/build.js +2 -2
- package/lib/commands/generate.js +4 -4
- package/lib/commands/list.js +7 -6
- package/lib/commands/mcp.js +0 -1
- package/lib/commands/new.js +23 -10
- package/lib/commands/start.js +0 -1
- package/lib/commands/types.d.ts +0 -2
- package/lib/commands/upgrade.js +2 -2
- package/package.json +4 -4
- package/templates/blazor/igb/index.d.ts +1 -0
- package/templates/blazor/igb/index.js +12 -0
- package/templates/blazor/igb/projects/ai-config/files/AGENTS.md +65 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/AGENTS.md +65 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/README.md +61 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/SKILL.md +118 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/charts.md +302 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/data-display.md +350 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/feedback.md +178 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/form-controls.md +365 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout-manager.md +180 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout.md +322 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/mcp-setup.md +78 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/setup.md +214 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/SKILL.md +284 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/component-mapping.md +281 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-generate-from-image-design/references/gotchas.md +503 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/SKILL.md +188 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/data-operations.md +264 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/editing.md +297 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/features.md +447 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/mcp-setup.md +78 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/paging-remote.md +299 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/sizing.md +284 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/state.md +160 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/structure.md +497 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-grids/references/types.md +553 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/SKILL.md +259 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/common-patterns.md +276 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/references/mcp-setup.md +81 -0
- package/templates/blazor/igb/projects/ai-config/index.d.ts +22 -0
- package/templates/blazor/igb/projects/ai-config/index.js +62 -0
- package/templates/blazor/index.d.ts +3 -0
- package/templates/blazor/index.js +11 -0
- package/templates/react/igr-ts/grid/basic/index.js +1 -1
- package/templates/react/igr-ts/grid/index.js +2 -2
- package/templates/react/igr-ts/projects/_base/files/package.json +1 -1
- package/templates/react/igr-ts/projects/ai-config/index.d.ts +22 -0
- package/templates/react/igr-ts/projects/ai-config/index.js +74 -0
- package/templates/webcomponents/igc-ts/dock-manager/default/index.js +1 -1
- package/templates/webcomponents/igc-ts/projects/_base/files/package.json +1 -1
- package/templates/webcomponents/igc-ts/projects/_base_with_home/files/package.json +2 -2
- package/templates/webcomponents/igc-ts/projects/ai-config/index.d.ts +22 -0
- package/templates/webcomponents/igc-ts/projects/ai-config/index.js +62 -0
- package/templates/react/igr-ts/projects/_base/files/__dot__claude/CLAUDE.md +0 -3
- package/templates/react/igr-ts/projects/_base/files/__dot__github/copilot-instructions.md +0 -3
- package/templates/webcomponents/igc-ts/projects/_base/files/__dot__claude/CLAUDE.md +0 -3
- package/templates/webcomponents/igc-ts/projects/_base/files/__dot__github/copilot-instructions.md +0 -3
- /package/templates/react/igr-ts/projects/{_base → ai-config}/files/AGENTS.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/README.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/SKILL.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/reference/CHARTS-GRIDS.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/reference/COMPONENT-CATALOGUE.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/reference/EVENT-HANDLING.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/reference/INSTALLATION.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/reference/JSX-PATTERNS.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/reference/MCP-SERVER.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/reference/REFS-FORMS.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-components/reference/TROUBLESHOOTING.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-customize-theme/SKILL.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-customize-theme/reference/CSS-THEMING.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-customize-theme/reference/MCP-SERVER.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-customize-theme/reference/TROUBLESHOOTING.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-generate-from-image-design/SKILL.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-generate-from-image-design/reference/component-mapping.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-generate-from-image-design/reference/gotchas.md +0 -0
- /package/templates/react/igr-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-react-optimize-bundle-size/SKILL.md +0 -0
- /package/templates/webcomponents/igc-ts/projects/{_base → ai-config}/files/AGENTS.md +0 -0
- /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/README.md +0 -0
- /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-choose-components/SKILL.md +0 -0
- /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-choose-components/reference/mcp-setup.md +0 -0
- /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-customize-component-theme/SKILL.md +0 -0
- /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-generate-from-image-design/SKILL.md +0 -0
- /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-generate-from-image-design/references/component-mapping.md +0 -0
- /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-generate-from-image-design/references/gotchas.md +0 -0
- /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-integrate-with-framework/SKILL.md +0 -0
- /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-integrate-with-framework/references/angular.md +0 -0
- /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-integrate-with-framework/references/react.md +0 -0
- /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-integrate-with-framework/references/vanilla-js.md +0 -0
- /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-integrate-with-framework/references/vue.md +0 -0
- /package/templates/webcomponents/igc-ts/projects/{_base/files/__dot__claude → ai-config/files}/skills/igniteui-wc-optimize-bundle-size/SKILL.md +0 -0
package/lib/PromptSession.d.ts
CHANGED
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import { BasePromptSession, PromptTaskContext, Task } from "@igniteui/cli-core";
|
|
2
|
-
import { TemplateManager } from "./TemplateManager";
|
|
1
|
+
import { BasePromptSession, Framework, ProjectLibrary, PromptTaskContext, Task } from "@igniteui/cli-core";
|
|
3
2
|
export declare class PromptSession extends BasePromptSession {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Start questions session for project creation
|
|
8
|
-
*/
|
|
9
|
-
start(): Promise<void>;
|
|
3
|
+
static chooseTerm(): Promise<string>;
|
|
4
|
+
protected getProjectLibrary(framework: Framework): Promise<ProjectLibrary>;
|
|
10
5
|
protected completeAndRun(port?: number): Promise<void>;
|
|
11
6
|
protected upgradePackages(): Promise<void>;
|
|
12
|
-
protected configureAI(): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Get user name and set template's extra configurations if any
|
|
15
|
-
* @param projectLibrary to add component to
|
|
16
|
-
* @param component to get template for
|
|
17
|
-
*/
|
|
7
|
+
protected configureAI(frameworkId: string): Promise<void>;
|
|
18
8
|
protected templateSelectedTask(type?: "component" | "view"): Task<PromptTaskContext>;
|
|
19
9
|
}
|
package/lib/PromptSession.js
CHANGED
|
@@ -1,27 +1,4 @@
|
|
|
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 (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -37,89 +14,35 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
15
|
exports.PromptSession = void 0;
|
|
39
16
|
const cli_core_1 = require("@igniteui/cli-core");
|
|
40
|
-
const path = __importStar(require("path"));
|
|
41
17
|
const add_1 = __importDefault(require("./commands/add"));
|
|
42
18
|
const ai_config_1 = require("./commands/ai-config");
|
|
43
19
|
const start_1 = __importDefault(require("./commands/start"));
|
|
44
20
|
const upgrade_1 = __importDefault(require("./commands/upgrade"));
|
|
45
21
|
class PromptSession extends cli_core_1.BasePromptSession {
|
|
46
|
-
constructor(templateManager) {
|
|
47
|
-
super(templateManager);
|
|
48
|
-
}
|
|
49
22
|
static chooseTerm() {
|
|
50
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
51
24
|
const answer = yield cli_core_1.InquirerWrapper.input({
|
|
52
|
-
default: null,
|
|
53
25
|
message: "Enter a search term",
|
|
54
26
|
});
|
|
55
27
|
if (answer) {
|
|
56
28
|
return answer;
|
|
57
29
|
}
|
|
58
30
|
else {
|
|
59
|
-
|
|
60
|
-
return retProm;
|
|
31
|
+
return this.chooseTerm();
|
|
61
32
|
}
|
|
62
33
|
});
|
|
63
34
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
35
|
+
getProjectLibrary(framework) {
|
|
36
|
+
const _super = Object.create(null, {
|
|
37
|
+
getProjectLibrary: { get: () => super.getProjectLibrary }
|
|
38
|
+
});
|
|
68
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
let projLibrary;
|
|
74
|
-
let theme;
|
|
75
|
-
add_1.default.templateManager = this.templateManager;
|
|
76
|
-
this.config = cli_core_1.ProjectConfig.getConfig();
|
|
77
|
-
const defaultProjName = "IG Project";
|
|
78
|
-
if (cli_core_1.ProjectConfig.hasLocalConfig() && !this.config.project.isShowcase) {
|
|
79
|
-
projLibrary = this.templateManager.getProjectLibrary(this.config.project.framework, this.config.project.projectType);
|
|
80
|
-
theme = this.config.project.theme;
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
cli_core_1.Util.log(""); /* new line */
|
|
84
|
-
const projectName = yield this.getUserInput({
|
|
85
|
-
type: "input",
|
|
86
|
-
name: "projectName",
|
|
87
|
-
message: "Enter a name for your project:",
|
|
88
|
-
default: cli_core_1.Util.getAvailableName(defaultProjName, true),
|
|
89
|
-
choices: null,
|
|
90
|
-
validate: this.nameIsValid
|
|
91
|
-
});
|
|
92
|
-
const frameRes = yield this.getUserInput({
|
|
93
|
-
type: "list",
|
|
94
|
-
name: "framework",
|
|
95
|
-
message: "Choose framework:",
|
|
96
|
-
choices: this.getFrameworkNames(),
|
|
97
|
-
default: "Angular"
|
|
98
|
-
});
|
|
99
|
-
const framework = this.templateManager.getFrameworkByName(frameRes);
|
|
100
|
-
// app name validation???
|
|
101
|
-
projLibrary = yield this.getProjectLibrary(framework);
|
|
102
|
-
if (frameRes === "Angular" && projLibrary.projectType === "igx-ts") {
|
|
103
|
-
cli_core_1.Util.log("Psst! Did you know you can also use our schematics package with Angular CLI to create and modify your projects?", "yellow");
|
|
104
|
-
cli_core_1.Util.log("Read more at: https://www.infragistics.com/products/ignite-ui-angular/angular/components/general/cli-overview", "yellow");
|
|
105
|
-
}
|
|
106
|
-
const projTemplate = yield this.getProjectTemplate(projLibrary);
|
|
107
|
-
// project options:
|
|
108
|
-
theme = yield this.getTheme(projLibrary);
|
|
109
|
-
cli_core_1.Util.log(" Generating project structure.");
|
|
110
|
-
const config = projTemplate.generateConfig(projectName, theme);
|
|
111
|
-
for (const templatePath of projTemplate.templatePaths) {
|
|
112
|
-
yield cli_core_1.Util.processTemplates(templatePath, path.join(process.cwd(), projectName), config, projTemplate.delimiters, false);
|
|
113
|
-
}
|
|
114
|
-
cli_core_1.Util.log(cli_core_1.Util.greenCheck() + " Project structure generated.");
|
|
115
|
-
if (!this.config.skipGit) {
|
|
116
|
-
cli_core_1.Util.gitInit(process.cwd(), projectName);
|
|
117
|
-
}
|
|
118
|
-
// move cwd to project folder
|
|
119
|
-
process.chdir(projectName);
|
|
40
|
+
const result = yield _super.getProjectLibrary.call(this, framework);
|
|
41
|
+
if (framework.name === "Angular" && result.projectType === "igx-ts") {
|
|
42
|
+
cli_core_1.Util.log("Psst! Did you know you can also use our schematics package with Angular CLI to create and modify your projects?", "yellow");
|
|
43
|
+
cli_core_1.Util.log("Read more at: https://www.infragistics.com/products/ignite-ui-angular/angular/components/general/cli-overview", "yellow");
|
|
120
44
|
}
|
|
121
|
-
|
|
122
|
-
//TODO: restore cwd?
|
|
45
|
+
return result;
|
|
123
46
|
});
|
|
124
47
|
}
|
|
125
48
|
completeAndRun(port) {
|
|
@@ -130,21 +53,14 @@ class PromptSession extends cli_core_1.BasePromptSession {
|
|
|
130
53
|
}
|
|
131
54
|
upgradePackages() {
|
|
132
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
-
upgrade_1.default.templateManager = this.templateManager;
|
|
134
56
|
yield upgrade_1.default.upgrade({ skipInstall: true, _: ["upgrade"], $0: "upgrade" });
|
|
135
57
|
});
|
|
136
58
|
}
|
|
137
|
-
configureAI() {
|
|
59
|
+
configureAI(frameworkId) {
|
|
138
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
-
|
|
140
|
-
(0, ai_config_1.configure)(false);
|
|
61
|
+
yield (0, ai_config_1.configure)(frameworkId);
|
|
141
62
|
});
|
|
142
63
|
}
|
|
143
|
-
/**
|
|
144
|
-
* Get user name and set template's extra configurations if any
|
|
145
|
-
* @param projectLibrary to add component to
|
|
146
|
-
* @param component to get template for
|
|
147
|
-
*/
|
|
148
64
|
templateSelectedTask(type = "component") {
|
|
149
65
|
return (_runner, context) => __awaiter(this, void 0, void 0, function* () {
|
|
150
66
|
const name = yield this.chooseTemplateName(context.template, type);
|
package/lib/cli.js
CHANGED
|
@@ -29,16 +29,8 @@ function run() {
|
|
|
29
29
|
return __awaiter(this, arguments, void 0, function* (args = null) {
|
|
30
30
|
cli_core_1.App.initialize();
|
|
31
31
|
const templateManager = new TemplateManager_1.TemplateManager();
|
|
32
|
-
// TODO: Refactor all code to use TemplateManager from the App container:
|
|
33
32
|
cli_core_1.App.container.set(cli_core_1.TEMPLATE_MANAGER, templateManager);
|
|
34
33
|
commands_1.newCommand.addChoices(templateManager.getFrameworkIds());
|
|
35
|
-
commands_1.newCommand.templateManager = templateManager;
|
|
36
|
-
commands_1.add.templateManager = templateManager;
|
|
37
|
-
commands_1.build.templateManager = templateManager;
|
|
38
|
-
commands_1.start.templateManager = templateManager;
|
|
39
|
-
commands_1.generate.templateManager = templateManager;
|
|
40
|
-
commands_1.list.templateManager = templateManager;
|
|
41
|
-
commands_1.upgrade.templateManager = templateManager;
|
|
42
34
|
const registeredCommands = [
|
|
43
35
|
commands_1.newCommand, commands_1.add, commands_1.build, commands_1.start, commands_1.generate, commands_1.config, commands_1.doc, commands_1.test, commands_1.list, commands_1.upgrade, commands_1.mcp, commands_1.aiConfig
|
|
44
36
|
];
|
|
@@ -69,7 +61,7 @@ function run() {
|
|
|
69
61
|
else {
|
|
70
62
|
cli_core_1.Util.log("Starting Step by step mode.", "green");
|
|
71
63
|
cli_core_1.Util.log("For available commands, stop this execution and use --help.", "green");
|
|
72
|
-
const prompts = new PromptSession_1.PromptSession(
|
|
64
|
+
const prompts = new PromptSession_1.PromptSession();
|
|
73
65
|
prompts.start();
|
|
74
66
|
}
|
|
75
67
|
})
|
package/lib/commands/add.js
CHANGED
|
@@ -15,7 +15,6 @@ let yargsContext;
|
|
|
15
15
|
const command = {
|
|
16
16
|
command: "add [template] [name]",
|
|
17
17
|
describe: "Adds a component or view template to the current project",
|
|
18
|
-
templateManager: null,
|
|
19
18
|
builder: (yargs) => {
|
|
20
19
|
yargsContext = yargs;
|
|
21
20
|
return yargs
|
|
@@ -79,14 +78,15 @@ const command = {
|
|
|
79
78
|
cli_core_1.Util.error("Showcases projects don't support the add command", "red");
|
|
80
79
|
return;
|
|
81
80
|
}
|
|
82
|
-
const
|
|
81
|
+
const templateManager = cli_core_1.App.container.get(cli_core_1.TEMPLATE_MANAGER);
|
|
82
|
+
const framework = templateManager.getFrameworkById(config.project.framework);
|
|
83
83
|
if (!framework) {
|
|
84
84
|
cli_core_1.Util.error("Framework not supported", "red");
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
|
-
const frameworkLibrary =
|
|
87
|
+
const frameworkLibrary = templateManager.getProjectLibrary(config.project.framework, config.project.projectType);
|
|
88
88
|
if (!argv.template && !argv.name) {
|
|
89
|
-
const prompts = new PromptSession_1.PromptSession(
|
|
89
|
+
const prompts = new PromptSession_1.PromptSession();
|
|
90
90
|
yield prompts.chooseActionLoop(frameworkLibrary);
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
@@ -117,7 +117,7 @@ const command = {
|
|
|
117
117
|
skipRoute: argv.skipRoute
|
|
118
118
|
});
|
|
119
119
|
yield cli_core_1.PackageManager.flushQueue(true);
|
|
120
|
-
yield cli_core_1.PackageManager.ensureIgniteUISource(config.packagesInstalled,
|
|
120
|
+
yield cli_core_1.PackageManager.ensureIgniteUISource(config.packagesInstalled, templateManager);
|
|
121
121
|
}
|
|
122
122
|
});
|
|
123
123
|
},
|
|
@@ -158,7 +158,7 @@ const command = {
|
|
|
158
158
|
}
|
|
159
159
|
if (!fail && templatePaths.length) {
|
|
160
160
|
template.registerInProject(process.cwd(), fileName, options || {});
|
|
161
|
-
|
|
161
|
+
cli_core_1.App.container.get(cli_core_1.TEMPLATE_MANAGER).updateProjectConfiguration(template);
|
|
162
162
|
template.packages.forEach(x => cli_core_1.PackageManager.queuePackage(x));
|
|
163
163
|
cli_core_1.Util.log(`${cli_core_1.Util.greenCheck()} View '${name}' added.`);
|
|
164
164
|
return true;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import { type AIAgentTarget, type AiCodingAssistant } from "@igniteui/cli-core";
|
|
1
2
|
import { CommandModule } from "yargs";
|
|
2
|
-
export declare function configureMCP(): void;
|
|
3
|
-
export declare function configureSkills(): void;
|
|
4
|
-
|
|
3
|
+
export declare function configureMCP(assistants: AiCodingAssistant[]): void;
|
|
4
|
+
export declare function configureSkills(agents: AIAgentTarget[], framework: string): void;
|
|
5
|
+
type AIAgentOption = AIAgentTarget | "none";
|
|
6
|
+
type AIAssistantOption = AiCodingAssistant | "none";
|
|
7
|
+
export declare function configure(framework: string, agents?: AIAgentOption[], assistants?: AIAssistantOption[], skills?: boolean): Promise<{
|
|
8
|
+
agents: AIAgentTarget[];
|
|
9
|
+
assistants: AiCodingAssistant[];
|
|
10
|
+
}>;
|
|
5
11
|
declare const command: CommandModule;
|
|
6
12
|
export default command;
|
|
@@ -13,16 +13,20 @@ exports.configureMCP = configureMCP;
|
|
|
13
13
|
exports.configureSkills = configureSkills;
|
|
14
14
|
exports.configure = configure;
|
|
15
15
|
const cli_core_1 = require("@igniteui/cli-core");
|
|
16
|
-
function configureMCP() {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
function configureMCP(assistants) {
|
|
17
|
+
for (const assistant of assistants) {
|
|
18
|
+
const { mcpFilePath } = cli_core_1.AI_ASSISTANT_MCP_CONFIGS[assistant];
|
|
19
|
+
const modified = (0, cli_core_1.addMcpServers)(assistant);
|
|
20
|
+
if (!modified) {
|
|
21
|
+
cli_core_1.Util.log(` Ignite UI MCP servers already configured in ${mcpFilePath}`);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
cli_core_1.Util.log(cli_core_1.Util.greenCheck() + ` MCP servers configured in ${mcpFilePath}`);
|
|
25
|
+
}
|
|
21
26
|
}
|
|
22
|
-
cli_core_1.Util.log(cli_core_1.Util.greenCheck() + ` MCP servers configured in ${cli_core_1.VS_CODE_MCP_PATH}`);
|
|
23
27
|
}
|
|
24
|
-
function configureSkills() {
|
|
25
|
-
const result = (0, cli_core_1.copyAISkillsToProject)();
|
|
28
|
+
function configureSkills(agents, framework) {
|
|
29
|
+
const result = (0, cli_core_1.copyAISkillsToProject)(agents, framework);
|
|
26
30
|
if (result.found === 0) {
|
|
27
31
|
cli_core_1.Util.warn("No AI skill files found. Make sure packages are installed (npm install) " +
|
|
28
32
|
"and your Ignite UI packages are up-to-date.", "yellow");
|
|
@@ -38,28 +42,155 @@ function configureSkills() {
|
|
|
38
42
|
cli_core_1.Util.log(cli_core_1.Util.greenCheck() + ` ${written} AI skill file(s) created or updated.`);
|
|
39
43
|
}
|
|
40
44
|
}
|
|
41
|
-
function configure(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
function configure(framework_1) {
|
|
46
|
+
return __awaiter(this, arguments, void 0, function* (framework, agents = [], assistants = [], skills = true) {
|
|
47
|
+
if (framework === "jquery") {
|
|
48
|
+
// currently not supported
|
|
49
|
+
return { agents: [], assistants: [] };
|
|
50
|
+
}
|
|
51
|
+
if (!agents.length) {
|
|
52
|
+
agents = yield promptForAgents();
|
|
53
|
+
}
|
|
54
|
+
if (!assistants.length) {
|
|
55
|
+
assistants = yield promptForAssistant();
|
|
56
|
+
}
|
|
57
|
+
const resolvedAgents = agents.includes("none") ? [] : agents;
|
|
58
|
+
const resolvedAssistants = assistants.includes("none") ? [] : assistants;
|
|
59
|
+
if (!resolvedAssistants.length) {
|
|
60
|
+
cli_core_1.Util.log("No MCP configuration selected. Skipping.");
|
|
61
|
+
}
|
|
62
|
+
configureMCP(resolvedAssistants);
|
|
63
|
+
if (!resolvedAgents.length) {
|
|
64
|
+
cli_core_1.Util.log("No AI configuration selected. Skipping.");
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
if (skills) {
|
|
68
|
+
configureSkills(resolvedAgents, framework);
|
|
69
|
+
}
|
|
70
|
+
(0, cli_core_1.copyAgentInstructionFiles)(resolvedAgents, framework);
|
|
71
|
+
}
|
|
72
|
+
return { agents: resolvedAgents, assistants: resolvedAssistants };
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
const AI_AGENT_CHECKBOX_DEFAULTS = ["generic", "claude"];
|
|
76
|
+
const AI_ASSISTANT_CHECKBOX_DEFAULTS = ["generic"];
|
|
77
|
+
const AI_AGENT_CHECKBOX_CHOICES = [
|
|
78
|
+
{ value: "none", name: "None (skip skills and instructions)" },
|
|
79
|
+
...cli_core_1.AI_AGENT_CHOICES.map(agent => ({
|
|
80
|
+
value: agent,
|
|
81
|
+
name: cli_core_1.AI_AGENT_LABELS[agent],
|
|
82
|
+
checked: AI_AGENT_CHECKBOX_DEFAULTS.includes(agent)
|
|
83
|
+
}))
|
|
84
|
+
];
|
|
85
|
+
const AI_ASSISTANT_CHECKBOX_CHOICES = [
|
|
86
|
+
{ value: "none", name: "None (skip MCP configuration)" },
|
|
87
|
+
...cli_core_1.AI_ASSISTANT_CHOICES.map(a => ({
|
|
88
|
+
value: a,
|
|
89
|
+
name: cli_core_1.AI_ASSISTANT_LABELS[a],
|
|
90
|
+
checked: AI_ASSISTANT_CHECKBOX_DEFAULTS.includes(a)
|
|
91
|
+
}))
|
|
92
|
+
];
|
|
93
|
+
function promptForAgents() {
|
|
94
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
let selected = AI_AGENT_CHECKBOX_DEFAULTS;
|
|
96
|
+
if (cli_core_1.Util.canPrompt()) {
|
|
97
|
+
const result = yield cli_core_1.InquirerWrapper.checkbox({
|
|
98
|
+
message: "Which AI agents do you want to generate skills and instructions for?",
|
|
99
|
+
required: true,
|
|
100
|
+
choices: AI_AGENT_CHECKBOX_CHOICES
|
|
101
|
+
});
|
|
102
|
+
selected = result;
|
|
103
|
+
}
|
|
104
|
+
return selected;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function promptForAssistant() {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
let selected = AI_ASSISTANT_CHECKBOX_DEFAULTS;
|
|
110
|
+
if (cli_core_1.Util.canPrompt()) {
|
|
111
|
+
const result = yield cli_core_1.InquirerWrapper.checkbox({
|
|
112
|
+
message: "Which coding assistants should MCP servers be configured for?",
|
|
113
|
+
required: true,
|
|
114
|
+
choices: AI_ASSISTANT_CHECKBOX_CHOICES
|
|
115
|
+
});
|
|
116
|
+
selected = result;
|
|
117
|
+
}
|
|
118
|
+
return selected;
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
/** delayed call so it's not immediate on module import for testing purposes */
|
|
122
|
+
function getTemplateManager() {
|
|
123
|
+
return cli_core_1.App.container.get(cli_core_1.TEMPLATE_MANAGER);
|
|
124
|
+
}
|
|
125
|
+
/** Separate from the PromptSession prompt due to step by step config w/ jQuery and w/o Blazor */
|
|
126
|
+
function promptForFrameworkId() {
|
|
127
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
128
|
+
const tm = getTemplateManager();
|
|
129
|
+
const frameRes = yield cli_core_1.InquirerWrapper.select({
|
|
130
|
+
name: "framework",
|
|
131
|
+
message: "Choose framework:",
|
|
132
|
+
choices: tm.getFrameworkNames(true).filter(x => x !== "jQuery"),
|
|
133
|
+
default: "Angular"
|
|
134
|
+
});
|
|
135
|
+
return tm.getFrameworkByName(frameRes).id;
|
|
136
|
+
});
|
|
46
137
|
}
|
|
47
138
|
const command = {
|
|
48
139
|
command: "ai-config",
|
|
49
|
-
describe: "Configures Ignite UI AI tooling (MCP servers
|
|
50
|
-
builder: (yargs) =>
|
|
51
|
-
|
|
140
|
+
describe: "Configures Ignite UI AI tooling (MCP servers, AI coding skills and instructions)",
|
|
141
|
+
builder: (yargs) => {
|
|
142
|
+
var _a;
|
|
143
|
+
return yargs
|
|
144
|
+
.usage("")
|
|
145
|
+
.option("agents", {
|
|
146
|
+
describe: "AI agents/tools to generate configuration files for",
|
|
147
|
+
choices: [...cli_core_1.AI_AGENT_CHOICES, "none"],
|
|
148
|
+
type: "array"
|
|
149
|
+
})
|
|
150
|
+
.option("assistants", {
|
|
151
|
+
describe: "Coding assistant(s) to configure MCP servers for",
|
|
152
|
+
choices: [...cli_core_1.AI_ASSISTANT_CHOICES, "none"],
|
|
153
|
+
type: "array"
|
|
154
|
+
})
|
|
155
|
+
.option("framework", {
|
|
156
|
+
alias: "f",
|
|
157
|
+
describe: "Manually set project framework to configure AI for.",
|
|
158
|
+
choices: (_a = getTemplateManager()) === null || _a === void 0 ? void 0 : _a.getFrameworkIds(true).filter(x => x !== "jquery"),
|
|
159
|
+
type: "string"
|
|
160
|
+
});
|
|
161
|
+
},
|
|
162
|
+
handler(argv) {
|
|
52
163
|
return __awaiter(this, void 0, void 0, function* () {
|
|
164
|
+
var _a, _b, _c, _d;
|
|
165
|
+
const agents = ((_a = argv.agents) !== null && _a !== void 0 ? _a : []);
|
|
166
|
+
const assistants = ((_b = argv.assistants) !== null && _b !== void 0 ? _b : []);
|
|
53
167
|
cli_core_1.GoogleAnalytics.post({
|
|
54
168
|
t: "screenview",
|
|
55
|
-
cd: "
|
|
169
|
+
cd: "Ai Config"
|
|
56
170
|
});
|
|
171
|
+
let framework = (_c = argv.framework) !== null && _c !== void 0 ? _c : (0, cli_core_1.detectFramework)();
|
|
172
|
+
if (!framework) {
|
|
173
|
+
cli_core_1.Util.log("Framework not provided and couldn't detect project from config or structure.");
|
|
174
|
+
if (cli_core_1.Util.canPrompt()) {
|
|
175
|
+
framework = yield promptForFrameworkId();
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
return cli_core_1.Util.error("Please provide --framework argument.", "red");
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
if (!((_d = getTemplateManager()) === null || _d === void 0 ? void 0 : _d.getFrameworkById(framework))) {
|
|
182
|
+
return cli_core_1.Util.error("Framework not supported", "red");
|
|
183
|
+
}
|
|
184
|
+
if (framework === "jquery") {
|
|
185
|
+
cli_core_1.Util.log("AI Config currently not available for jQuery projects.");
|
|
186
|
+
}
|
|
187
|
+
const result = yield configure(framework, agents, assistants);
|
|
57
188
|
cli_core_1.GoogleAnalytics.post({
|
|
58
189
|
t: "event",
|
|
59
190
|
ec: "$ig ai-config",
|
|
60
|
-
ea: "
|
|
191
|
+
ea: `agent: ${result.agents.join(", ") || "none"}; assistant: ${result.assistants.join(", ") || "none"}`,
|
|
192
|
+
cd1: framework
|
|
61
193
|
});
|
|
62
|
-
configure();
|
|
63
194
|
});
|
|
64
195
|
}
|
|
65
196
|
};
|
package/lib/commands/build.js
CHANGED
|
@@ -39,7 +39,6 @@ const command = {
|
|
|
39
39
|
command: "build",
|
|
40
40
|
describe: "Builds the project",
|
|
41
41
|
builder: (yargs) => yargs,
|
|
42
|
-
templateManager: null,
|
|
43
42
|
handler(argv) {
|
|
44
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
44
|
cli_core_1.GoogleAnalytics.post({
|
|
@@ -52,7 +51,8 @@ const command = {
|
|
|
52
51
|
build() {
|
|
53
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
53
|
cli_core_1.Util.log("Build started.");
|
|
55
|
-
|
|
54
|
+
const templateManager = cli_core_1.App.container.get(cli_core_1.TEMPLATE_MANAGER);
|
|
55
|
+
yield cli_core_1.PackageManager.ensureIgniteUISource(true, templateManager);
|
|
56
56
|
if (!cli_core_1.ProjectConfig.hasLocalConfig()) {
|
|
57
57
|
cli_core_1.Util.error("Build command is supported only on existing project created with igniteui-cli", "red");
|
|
58
58
|
return;
|
package/lib/commands/generate.js
CHANGED
|
@@ -57,18 +57,19 @@ function handler(argv) {
|
|
|
57
57
|
cli_core_1.Util.error(`Folder '${argv.name}' already exists!`, "red");
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
const templateManager = cli_core_1.App.container.get(cli_core_1.TEMPLATE_MANAGER);
|
|
61
|
+
if (templateManager.getFrameworkById(argv.framework) === undefined) {
|
|
61
62
|
return cli_core_1.Util.error("Framework not supported", "red");
|
|
62
63
|
}
|
|
63
64
|
let projectLib;
|
|
64
65
|
if (argv.type) {
|
|
65
|
-
projectLib =
|
|
66
|
+
projectLib = templateManager.getProjectLibrary(argv.framework, argv.type);
|
|
66
67
|
if (!projectLib) {
|
|
67
68
|
return cli_core_1.Util.error(`Project type '${argv.type}' not found in framework '${argv.framework}'`);
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
else {
|
|
71
|
-
projectLib =
|
|
72
|
+
projectLib = templateManager.getProjectLibrary(argv.framework);
|
|
72
73
|
argv.type = projectLib.projectType;
|
|
73
74
|
}
|
|
74
75
|
const res = yield cli_core_1.Util.processTemplates(projectLib.generateTemplateFolderPath, outDir, {
|
|
@@ -101,7 +102,6 @@ const command = {
|
|
|
101
102
|
aliases: ["g"],
|
|
102
103
|
command: "generate",
|
|
103
104
|
describe: "Generates custom templates (see subcommands)",
|
|
104
|
-
templateManager: null,
|
|
105
105
|
builder: yargs => {
|
|
106
106
|
yargs
|
|
107
107
|
.command({
|
package/lib/commands/list.js
CHANGED
|
@@ -21,7 +21,6 @@ const command = {
|
|
|
21
21
|
.example("$0 list", "Show all frameworks and their project templates")
|
|
22
22
|
.example("$0 list -f angular", "List component templates for Angular");
|
|
23
23
|
},
|
|
24
|
-
templateManager: null,
|
|
25
24
|
handler(argv) {
|
|
26
25
|
cli_core_1.GoogleAnalytics.post({
|
|
27
26
|
t: "screenview",
|
|
@@ -43,19 +42,20 @@ const command = {
|
|
|
43
42
|
}
|
|
44
43
|
const templatesByGroup = [];
|
|
45
44
|
const controlGroups = [];
|
|
46
|
-
const
|
|
45
|
+
const templateManager = cli_core_1.App.container.get(cli_core_1.TEMPLATE_MANAGER);
|
|
46
|
+
const framework = templateManager.getFrameworkById(argv.framework);
|
|
47
47
|
if (!framework) {
|
|
48
48
|
return cli_core_1.Util.error("Wrong framework provided", "red");
|
|
49
49
|
}
|
|
50
50
|
let projectLib;
|
|
51
51
|
if (argv.type) {
|
|
52
|
-
projectLib =
|
|
52
|
+
projectLib = templateManager.getProjectLibrary(argv.framework, argv.type);
|
|
53
53
|
if (!projectLib) {
|
|
54
54
|
return cli_core_1.Util.error(`Project type '${argv.type}' not found in framework '${argv.framework}'`, "red");
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
else {
|
|
58
|
-
projectLib =
|
|
58
|
+
projectLib = templateManager.getProjectLibrary(argv.framework);
|
|
59
59
|
}
|
|
60
60
|
let maxIdLength = 0;
|
|
61
61
|
projectLib.templates
|
|
@@ -102,9 +102,10 @@ const command = {
|
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
function listAllFrameworks() {
|
|
105
|
-
const
|
|
105
|
+
const templateManager = cli_core_1.App.container.get(cli_core_1.TEMPLATE_MANAGER);
|
|
106
|
+
const frameworkIds = templateManager.getFrameworkIds();
|
|
106
107
|
const frameworks = frameworkIds
|
|
107
|
-
.map(id =>
|
|
108
|
+
.map(id => templateManager.getFrameworkById(id))
|
|
108
109
|
.filter(f => !!f);
|
|
109
110
|
cli_core_1.GoogleAnalytics.post({
|
|
110
111
|
t: "event",
|
package/lib/commands/mcp.js
CHANGED
package/lib/commands/new.js
CHANGED
|
@@ -35,7 +35,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
35
35
|
const cli_core_1 = require("@igniteui/cli-core");
|
|
36
36
|
const path = __importStar(require("path"));
|
|
37
37
|
const PromptSession_1 = require("./../PromptSession");
|
|
38
|
-
const
|
|
38
|
+
const ai_config_1 = require("./ai-config");
|
|
39
39
|
// explicit typing because `type: "string"` will be inferred as `type: string` which yargs will not like
|
|
40
40
|
const _framework = {
|
|
41
41
|
alias: "f",
|
|
@@ -82,13 +82,22 @@ const command = {
|
|
|
82
82
|
.option("template", {
|
|
83
83
|
describe: "Project template",
|
|
84
84
|
type: "string"
|
|
85
|
+
})
|
|
86
|
+
.option("agents", {
|
|
87
|
+
describe: "AI agents/tools to generate configuration files for",
|
|
88
|
+
choices: [...cli_core_1.AI_AGENT_CHOICES, "none"],
|
|
89
|
+
type: "array"
|
|
90
|
+
})
|
|
91
|
+
.option("assistants", {
|
|
92
|
+
describe: "Coding assistant(s) to configure MCP servers for",
|
|
93
|
+
choices: [...cli_core_1.AI_ASSISTANT_CHOICES, "none"],
|
|
94
|
+
type: "array"
|
|
85
95
|
})
|
|
86
96
|
.example("$0 new my-app", "Scaffold a new project interactively")
|
|
87
97
|
.example("$0 new my-app -f angular -t igx-ts", "Scaffold an Ignite UI for Angular project");
|
|
88
98
|
},
|
|
89
99
|
handler(argv) {
|
|
90
100
|
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
-
var _a, _b, _c, _d;
|
|
92
101
|
cli_core_1.GoogleAnalytics.post({
|
|
93
102
|
t: "screenview",
|
|
94
103
|
cd: "New"
|
|
@@ -96,8 +105,9 @@ const command = {
|
|
|
96
105
|
if (cli_core_1.ProjectConfig.hasLocalConfig()) {
|
|
97
106
|
return cli_core_1.Util.error("There is already an existing project.", "red");
|
|
98
107
|
}
|
|
108
|
+
const templateManager = cli_core_1.App.container.get(cli_core_1.TEMPLATE_MANAGER);
|
|
99
109
|
if (!argv.name) {
|
|
100
|
-
const prompts = new PromptSession_1.PromptSession(
|
|
110
|
+
const prompts = new PromptSession_1.PromptSession();
|
|
101
111
|
yield prompts.start();
|
|
102
112
|
return;
|
|
103
113
|
}
|
|
@@ -113,20 +123,20 @@ const command = {
|
|
|
113
123
|
cli_core_1.Util.error(`Folder "${argv.name}" already exists!`, "red");
|
|
114
124
|
return;
|
|
115
125
|
}
|
|
116
|
-
if ((
|
|
126
|
+
if ((templateManager === null || templateManager === void 0 ? void 0 : templateManager.getFrameworkById(argv.framework)) === undefined) {
|
|
117
127
|
return cli_core_1.Util.error("Framework not supported", "red");
|
|
118
128
|
}
|
|
119
129
|
let projectLib;
|
|
120
130
|
if (argv.type) {
|
|
121
|
-
projectLib =
|
|
131
|
+
projectLib = templateManager === null || templateManager === void 0 ? void 0 : templateManager.getProjectLibrary(argv.framework, argv.type);
|
|
122
132
|
if (!projectLib) {
|
|
123
133
|
return cli_core_1.Util.error(`Project type "${argv.type}" not found in framework '${argv.framework}'`);
|
|
124
134
|
}
|
|
125
135
|
}
|
|
126
136
|
else {
|
|
127
|
-
projectLib =
|
|
137
|
+
projectLib = templateManager === null || templateManager === void 0 ? void 0 : templateManager.getProjectLibrary(argv.framework);
|
|
128
138
|
}
|
|
129
|
-
if ((
|
|
139
|
+
if ((templateManager === null || templateManager === void 0 ? void 0 : templateManager.getFrameworkById(argv.framework).id) === "angular" && projectLib.projectType === "igx-ts") {
|
|
130
140
|
cli_core_1.Util.warn("Psst! Did you know you can use our schematics package with Angular CLI to create and modify your projects?", "yellow");
|
|
131
141
|
cli_core_1.Util.warn("Read more at: https://www.infragistics.com/products/ignite-ui-angular/angular/components/general/cli-overview", "yellow");
|
|
132
142
|
}
|
|
@@ -163,15 +173,18 @@ const command = {
|
|
|
163
173
|
for (const templatePath of projTemplate.templatePaths) {
|
|
164
174
|
yield cli_core_1.Util.processTemplates(templatePath, path.join(process.cwd(), argv.name), config, projTemplate.delimiters, false);
|
|
165
175
|
}
|
|
176
|
+
process.chdir(argv.name);
|
|
177
|
+
yield (0, ai_config_1.configure)(argv.framework, argv.agents, argv.assistants);
|
|
178
|
+
process.chdir("..");
|
|
166
179
|
cli_core_1.Util.log(cli_core_1.Util.greenCheck() + " Project Created");
|
|
167
|
-
if (!argv["skip-git"] && !cli_core_1.ProjectConfig.getConfig().skipGit) {
|
|
168
|
-
cli_core_1.Util.gitInit(process.cwd(), argv.name);
|
|
169
|
-
}
|
|
170
180
|
if (!argv.skipInstall) {
|
|
171
181
|
process.chdir(argv.name);
|
|
172
182
|
yield cli_core_1.PackageManager.installPackages();
|
|
173
183
|
process.chdir("..");
|
|
174
184
|
}
|
|
185
|
+
if (!argv["skip-git"] && !cli_core_1.ProjectConfig.getConfig().skipGit) {
|
|
186
|
+
cli_core_1.Util.gitInit(process.cwd(), argv.name);
|
|
187
|
+
}
|
|
175
188
|
cli_core_1.Util.log("");
|
|
176
189
|
cli_core_1.Util.log("Next Steps:");
|
|
177
190
|
cli_core_1.Util.log(` cd ${argv.name}`);
|