@igniteui/angular-schematics 19.0.1431 → 19.0.1432-beta.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@igniteui/angular-schematics",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.1432-beta.0",
|
|
4
4
|
"description": "Ignite UI for Angular Schematics for ng new and ng generate",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,14 +22,16 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@angular-devkit/core": "^19.0.0",
|
|
24
24
|
"@angular-devkit/schematics": "^19.0.0",
|
|
25
|
-
"@igniteui/angular-templates": "~19.0.
|
|
26
|
-
"@igniteui/cli-core": "~14.3.
|
|
25
|
+
"@igniteui/angular-templates": "~19.0.1432-beta.0",
|
|
26
|
+
"@igniteui/cli-core": "~14.3.2-beta.0",
|
|
27
27
|
"@schematics/angular": "~19.0.0",
|
|
28
|
-
"rxjs": "^7.8.1"
|
|
28
|
+
"rxjs": "^7.8.1",
|
|
29
|
+
"minimatch": "^10.0.1"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"@types/jasmine": "^5.1.4",
|
|
32
33
|
"@types/node": "^22.5.5",
|
|
34
|
+
"@types/minimatch": "^5.1.2",
|
|
33
35
|
"jasmine": "^5.3.0",
|
|
34
36
|
"typescript": "~5.6.2"
|
|
35
37
|
},
|
|
@@ -17,6 +17,7 @@ const SchematicsTemplateManager_1 = require("../SchematicsTemplateManager");
|
|
|
17
17
|
const NgFileSystem_1 = require("../utils/NgFileSystem");
|
|
18
18
|
function default_1(options) {
|
|
19
19
|
return (tree, context) => {
|
|
20
|
+
var _a, _b, _c;
|
|
20
21
|
cli_core_1.App.initialize("angular-cli");
|
|
21
22
|
cli_core_1.GoogleAnalytics.post({
|
|
22
23
|
t: "screenview",
|
|
@@ -24,9 +25,9 @@ function default_1(options) {
|
|
|
24
25
|
});
|
|
25
26
|
const templateManager = new SchematicsTemplateManager_1.SchematicsTemplateManager();
|
|
26
27
|
const config = cli_core_1.ProjectConfig.getConfig();
|
|
27
|
-
const library = templateManager.getProjectLibrary(
|
|
28
|
+
const library = templateManager.getProjectLibrary('angular', ((_a = config.project) === null || _a === void 0 ? void 0 : _a.projectType) || 'igx-ts');
|
|
28
29
|
let project;
|
|
29
|
-
if (!config.project.projectTemplate || !library.hasProject(config.project.projectTemplate)) {
|
|
30
|
+
if (!((_b = config.project) === null || _b === void 0 ? void 0 : _b.projectTemplate) || !library.hasProject((_c = config.project) === null || _c === void 0 ? void 0 : _c.projectTemplate)) {
|
|
30
31
|
// in case project template is missing from the config we provide backward.
|
|
31
32
|
project = library.getProject(library.projectIds[0]);
|
|
32
33
|
}
|
|
@@ -4,15 +4,15 @@ export declare class NgTreeFileSystem implements IFileSystem {
|
|
|
4
4
|
private tree;
|
|
5
5
|
constructor(tree: Tree);
|
|
6
6
|
fileExists(filePath: string): boolean;
|
|
7
|
-
readFile(filePath: string,
|
|
7
|
+
readFile(filePath: string, _encoding?: string): string;
|
|
8
8
|
writeFile(filePath: string, text: string): void;
|
|
9
9
|
directoryExists(dirPath: string): boolean;
|
|
10
10
|
/**
|
|
11
11
|
* Returns a list of file paths under a directory based on a match pattern
|
|
12
12
|
* @param dirPath Root dir to search in
|
|
13
|
-
* @param pattern Supports only recursive wildcard
|
|
14
|
-
* @param
|
|
13
|
+
* @param pattern Supports only recursive wildcard `\*\*\/\*`
|
|
14
|
+
* @param ignorePatterns Optional patterns to ignore for each subdirectory
|
|
15
15
|
*/
|
|
16
|
-
glob(dirPath: string, pattern: string,
|
|
16
|
+
glob(dirPath: string, pattern: string, ignorePatterns?: string[]): string[];
|
|
17
17
|
}
|
|
18
18
|
export declare function setVirtual(tree: Tree): void;
|
|
@@ -1,8 +1,33 @@
|
|
|
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
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.NgTreeFileSystem = void 0;
|
|
4
27
|
exports.setVirtual = setVirtual;
|
|
5
28
|
const cli_core_1 = require("@igniteui/cli-core");
|
|
29
|
+
const minimatch_1 = require("minimatch");
|
|
30
|
+
const path = __importStar(require("path"));
|
|
6
31
|
class NgTreeFileSystem {
|
|
7
32
|
constructor(tree) {
|
|
8
33
|
this.tree = tree;
|
|
@@ -10,7 +35,7 @@ class NgTreeFileSystem {
|
|
|
10
35
|
fileExists(filePath) {
|
|
11
36
|
return this.tree.exists(filePath);
|
|
12
37
|
}
|
|
13
|
-
readFile(filePath,
|
|
38
|
+
readFile(filePath, _encoding) {
|
|
14
39
|
return (this.tree.read(filePath) || "").toString();
|
|
15
40
|
}
|
|
16
41
|
writeFile(filePath, text) {
|
|
@@ -23,21 +48,38 @@ class NgTreeFileSystem {
|
|
|
23
48
|
/**
|
|
24
49
|
* Returns a list of file paths under a directory based on a match pattern
|
|
25
50
|
* @param dirPath Root dir to search in
|
|
26
|
-
* @param pattern Supports only recursive wildcard
|
|
27
|
-
* @param
|
|
51
|
+
* @param pattern Supports only recursive wildcard `\*\*\/\*`
|
|
52
|
+
* @param ignorePatterns Optional patterns to ignore for each subdirectory
|
|
28
53
|
*/
|
|
29
|
-
glob(dirPath, pattern,
|
|
54
|
+
glob(dirPath, pattern, ignorePatterns) {
|
|
30
55
|
const dir = this.tree.getDir(dirPath);
|
|
31
56
|
const entries = [];
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (ignorePattern && (entry === null || entry === void 0 ? void 0 : entry.path.includes(ignorePattern))) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
if (entry === null || entry === void 0 ? void 0 : entry.path.endsWith(pattern)) {
|
|
57
|
+
const visitor = (_fullPath, entry) => {
|
|
58
|
+
if (entry && (0, minimatch_1.minimatch)(entry.path, pattern)) {
|
|
38
59
|
entries.push(entry.path);
|
|
39
60
|
}
|
|
40
|
-
}
|
|
61
|
+
};
|
|
62
|
+
if (ignorePatterns === null || ignorePatterns === void 0 ? void 0 : ignorePatterns.length) {
|
|
63
|
+
const recurse = (dir) => {
|
|
64
|
+
for (const subdirPath of dir.subdirs) {
|
|
65
|
+
if (ignorePatterns.every(p => !(0, minimatch_1.minimatch)(subdirPath, p))) {
|
|
66
|
+
const subDir = dir.dir(subdirPath);
|
|
67
|
+
if (subDir.subdirs.length) {
|
|
68
|
+
recurse(subDir);
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
for (const file of dir.subfiles) {
|
|
72
|
+
if ((0, minimatch_1.minimatch)(file, pattern) && ignorePatterns.every(p => !(0, minimatch_1.minimatch)(file, p))) {
|
|
73
|
+
entries.push(path.posix.normalize(`${dir.path}/${file}`));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
recurse(dir);
|
|
80
|
+
return entries;
|
|
81
|
+
}
|
|
82
|
+
dir.visit(visitor);
|
|
41
83
|
return entries;
|
|
42
84
|
}
|
|
43
85
|
}
|