@o3r/schematics 10.0.0-prerelease.103 → 10.0.0-prerelease.105

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. package/package.json +5 -5
  2. package/schematics/ng-add/index.d.ts.map +1 -1
  3. package/schematics/ng-add/index.js +28 -27
  4. package/src/rule-factories/ng-add/dependencies.d.ts +78 -0
  5. package/src/rule-factories/ng-add/dependencies.d.ts.map +1 -0
  6. package/src/rule-factories/ng-add/dependencies.js +156 -0
  7. package/src/rule-factories/ng-add/dependencies.js.map +1 -0
  8. package/src/rule-factories/ng-add/index.d.ts +3 -36
  9. package/src/rule-factories/ng-add/index.d.ts.map +1 -1
  10. package/src/rule-factories/ng-add/index.js +4 -218
  11. package/src/rule-factories/ng-add/index.js.map +1 -1
  12. package/src/rule-factories/ng-add/ng-add.helpers.d.ts +22 -0
  13. package/src/rule-factories/ng-add/ng-add.helpers.d.ts.map +1 -0
  14. package/src/rule-factories/ng-add/ng-add.helpers.js +162 -0
  15. package/src/rule-factories/ng-add/ng-add.helpers.js.map +1 -0
  16. package/src/rule-factories/ng-add/schematics-register.d.ts +17 -0
  17. package/src/rule-factories/ng-add/schematics-register.d.ts.map +1 -0
  18. package/src/rule-factories/ng-add/schematics-register.js +64 -0
  19. package/src/rule-factories/ng-add/schematics-register.js.map +1 -0
  20. package/src/rules/install.d.ts +8 -4
  21. package/src/rules/install.d.ts.map +1 -1
  22. package/src/rules/install.js +10 -8
  23. package/src/rules/install.js.map +1 -1
  24. package/src/tasks/ng-add/index.d.ts +1 -0
  25. package/src/tasks/ng-add/index.d.ts.map +1 -1
  26. package/src/tasks/ng-add/index.js +1 -0
  27. package/src/tasks/ng-add/index.js.map +1 -1
  28. package/src/tasks/package-manager/add-dev-dependency.d.ts +1 -0
  29. package/src/tasks/package-manager/add-dev-dependency.d.ts.map +1 -1
  30. package/src/tasks/package-manager/add-dev-dependency.js +1 -0
  31. package/src/tasks/package-manager/add-dev-dependency.js.map +1 -1
  32. package/src/utility/collection.d.ts.map +1 -1
  33. package/src/utility/collection.js +1 -1
  34. package/src/utility/collection.js.map +1 -1
  35. package/src/utility/dependencies.js +1 -1
  36. package/src/utility/dependencies.js.map +1 -1
  37. package/src/utility/loaders.d.ts +6 -1
  38. package/src/utility/loaders.d.ts.map +1 -1
  39. package/src/utility/loaders.js +10 -2
  40. package/src/utility/loaders.js.map +1 -1
  41. package/src/utility/matching-peers.d.ts.map +1 -1
  42. package/src/utility/matching-peers.js +1 -1
  43. package/src/utility/matching-peers.js.map +1 -1
  44. package/src/utility/wrapper.d.ts.map +1 -1
  45. package/src/utility/wrapper.js +46 -3
  46. package/src/utility/wrapper.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAA+G;AAC/G,4DAA0E;AAC1E,2EAAmG;AACnG,qCAAiE;AACjE,kCAAkC;AAClC,+BAAqC;AAIrC,+CAAwL;AAExL;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,QAAkB,EAAE,OAA8F,EAAE,eAAe,GAAG,eAAe;IACjL,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;QACpB,OAAO,iBAAI,CAAC;KACb;IACD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IAClD,wHAAwH;IACxH,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,gBAAgB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC;IACnI,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAA+B,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,CACpG,CAAC,WAAW,EAAE,OAAO,OAAO,EAAE,OAAO,KAAK,QAAQ,CAA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ACtC,yDAA+B;AAC/B,2DAAiC"}
@@ -0,0 +1,22 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ import { NodeDependencyType } from '@schematics/angular/utility/dependencies';
3
+ import type { NgAddPackageOptions } from '../../tasks/index';
4
+ /**
5
+ * Install via `ng add` a list of npm packages.
6
+ * @param packages List of packages to be installed via `ng add`
7
+ * @param options install options
8
+ * @param packageJsonPath path of the package json of the project where they will be installed
9
+ */
10
+ export declare function ngAddPackages(packages: string[], options?: Omit<NgAddPackageOptions, 'version'> & {
11
+ version?: string | (string | undefined)[];
12
+ }, packageJsonPath?: string): Rule;
13
+ /**
14
+ * Look for the peer dependencies and run ng add on the package requested version
15
+ * @param packages list of the name of the packages needed
16
+ * @param packageJsonPath path to package json that needs the peer to be resolved
17
+ * @param type how to install the dependency (dev, peer for a library or default for an application)
18
+ * @param options
19
+ * @param parentPackageInfo for logging purposes
20
+ */
21
+ export declare function ngAddPeerDependencyPackages(packages: string[], packageJsonPath: string, type: NodeDependencyType | undefined, options: NgAddPackageOptions, parentPackageInfo?: string): Rule;
22
+ //# sourceMappingURL=ng-add.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-add.helpers.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/ng-add.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,IAAI,EAA+B,MAAM,4BAA4B,CAAC;AAG/G,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAK9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAA;CAAE,EAAE,eAAe,SAAkB,GAAG,IAAI,CA0HzL;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,gCAAiD,EAC5I,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,CAAC,EAAE,MAAM,QAgBzD"}
@@ -0,0 +1,162 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ngAddPeerDependencyPackages = exports.ngAddPackages = void 0;
4
+ const schematics_1 = require("@angular-devkit/schematics");
5
+ const tasks_1 = require("@angular-devkit/schematics/tasks");
6
+ const dependencies_1 = require("@schematics/angular/utility/dependencies");
7
+ const node_fs_1 = require("node:fs");
8
+ const path = require("node:path");
9
+ const rxjs_1 = require("rxjs");
10
+ const index_1 = require("../../utility/index");
11
+ /**
12
+ * Install via `ng add` a list of npm packages.
13
+ * @param packages List of packages to be installed via `ng add`
14
+ * @param options install options
15
+ * @param packageJsonPath path of the package json of the project where they will be installed
16
+ */
17
+ function ngAddPackages(packages, options, packageJsonPath = '/package.json') {
18
+ if (!packages.length) {
19
+ return schematics_1.noop;
20
+ }
21
+ const cwd = process.cwd().replace(/[\\/]+/g, '/');
22
+ // FileSystem working directory might be different from Tree working directory (when using `yarn workspace` for example)
23
+ const fsWorkingDirectory = (options?.workingDirectory && !cwd.endsWith(options.workingDirectory)) ? options.workingDirectory : '.';
24
+ const versions = Object.fromEntries(packages.map((packageName, index) => [packageName, typeof options?.version === 'object' ? options.version[index] : options?.version]));
25
+ if (options?.workingDirectory && !packageJsonPath.startsWith(options.workingDirectory)) {
26
+ packageJsonPath = path.join(options.workingDirectory, packageJsonPath);
27
+ }
28
+ const getInstalledVersion = (packageName) => {
29
+ let versionFound;
30
+ for (const workingDirectory of new Set([fsWorkingDirectory, '.'])) {
31
+ try {
32
+ const fileSystemPackageJson = JSON.parse((0, node_fs_1.readFileSync)(path.join(workingDirectory, 'package.json'), { encoding: 'utf8' }));
33
+ let version;
34
+ if (options?.dependencyType === dependencies_1.NodeDependencyType.Dev) {
35
+ version = fileSystemPackageJson.devDependencies[packageName];
36
+ }
37
+ else if (options?.dependencyType === dependencies_1.NodeDependencyType.Peer) {
38
+ version = fileSystemPackageJson.peerDependencies[packageName];
39
+ }
40
+ else {
41
+ version = fileSystemPackageJson.dependencies[packageName];
42
+ }
43
+ if (versionFound && version !== versionFound) {
44
+ // In case of conflict between package.json files, we consider the package as not installed to force its update
45
+ return;
46
+ }
47
+ versionFound = version;
48
+ }
49
+ catch (e) {
50
+ return;
51
+ }
52
+ }
53
+ return versionFound;
54
+ };
55
+ const getNgAddSchema = (packageName, context) => {
56
+ try {
57
+ const collection = context.engine.createCollection(packageName);
58
+ return collection.createSchematic('ng-add');
59
+ }
60
+ catch {
61
+ context.logger.warn(`No ng-add found for ${packageName}`);
62
+ return undefined;
63
+ }
64
+ };
65
+ const getOptions = (schema) => {
66
+ const schemaOptions = schema.description.schemaJson?.properties || {};
67
+ return Object.entries(options || {}).reduce((accOptions, [key, value]) => {
68
+ if (schemaOptions[key]) {
69
+ accOptions[key] = value;
70
+ }
71
+ return accOptions;
72
+ }, {});
73
+ };
74
+ const installedVersions = packages.map((packageName) => getInstalledVersion(packageName));
75
+ const packageManager = (0, index_1.getPackageManager)();
76
+ const packagesToInstall = packages.filter((packageName, index) => !installedVersions[index] || installedVersions[index] !== versions[packageName]);
77
+ if (packagesToInstall.length < 1) {
78
+ return schematics_1.noop;
79
+ }
80
+ return (0, schematics_1.chain)([
81
+ // Update package.json in tree
82
+ (tree) => {
83
+ const sortDependencies = (packageJson, depType) => {
84
+ packageJson[depType] = packageJson[depType] ?
85
+ Object.fromEntries(Object.entries(packageJson[depType] || {}).sort(([key1, _val1], [key2, _val2]) => key1.localeCompare(key2))) :
86
+ undefined;
87
+ };
88
+ for (const filePath of new Set([packageJsonPath, './package.json'])) {
89
+ const packageJson = tree.readJson(filePath);
90
+ packages.forEach((packageName) => {
91
+ const version = versions[packageName] || 'latest';
92
+ if (options?.dependencyType === dependencies_1.NodeDependencyType.Dev) {
93
+ packageJson.devDependencies = { ...packageJson.devDependencies, [packageName]: version };
94
+ }
95
+ else if (options?.dependencyType === dependencies_1.NodeDependencyType.Peer) {
96
+ packageJson.peerDependencies = { ...packageJson.peerDependencies, [packageName]: version };
97
+ }
98
+ else {
99
+ packageJson.dependencies = { ...packageJson.dependencies, [packageName]: version };
100
+ }
101
+ });
102
+ ['dependencies', 'devDependencies', 'peerDependencies'].forEach((depType) => {
103
+ sortDependencies(packageJson, depType);
104
+ });
105
+ tree.overwrite(filePath, JSON.stringify(packageJson, null, 2));
106
+ }
107
+ },
108
+ // Run ng-adds
109
+ async (tree, context) => {
110
+ if (options?.skipNgAddSchematicRun) {
111
+ context.logger.info(`Package(s) '${packagesToInstall.join(', ')}' was(were) installed.
112
+ The run of 'ng-add' schematics for the package(s) is intentionally skipped. You can do the run standalone, later.`);
113
+ return schematics_1.noop;
114
+ }
115
+ new Set([packageJsonPath, './package.json']).forEach((filePath) => {
116
+ (0, node_fs_1.mkdirSync)(path.join(process.cwd(), path.dirname(filePath)), { recursive: true });
117
+ (0, node_fs_1.writeFileSync)(path.join(process.cwd(), filePath), tree.readText(filePath));
118
+ });
119
+ context.addTask(new tasks_1.NodePackageInstallTask({
120
+ packageManager: packageManager,
121
+ hideOutput: false,
122
+ quiet: false
123
+ }));
124
+ await (0, rxjs_1.lastValueFrom)(context.engine.executePostTasks());
125
+ const ngAddsToApply = packagesToInstall
126
+ .map((packageName) => ({ packageName, ngAddCollection: getNgAddSchema(packageName, context) }))
127
+ .filter(({ packageName, ngAddCollection }) => {
128
+ if (!ngAddCollection) {
129
+ context.logger.info(`No ng-add schematic found for: '${packageName}'. Skipping ng add for: ${packageName}${versions[packageName] ? ' with version: ' + versions[packageName] : ''}`);
130
+ }
131
+ return !!ngAddCollection;
132
+ })
133
+ .map(({ packageName, ngAddCollection }) => (0, schematics_1.externalSchematic)(packageName, 'ng-add', getOptions(ngAddCollection)));
134
+ return (0, schematics_1.chain)(ngAddsToApply);
135
+ }
136
+ ]);
137
+ }
138
+ exports.ngAddPackages = ngAddPackages;
139
+ /**
140
+ * Look for the peer dependencies and run ng add on the package requested version
141
+ * @param packages list of the name of the packages needed
142
+ * @param packageJsonPath path to package json that needs the peer to be resolved
143
+ * @param type how to install the dependency (dev, peer for a library or default for an application)
144
+ * @param options
145
+ * @param parentPackageInfo for logging purposes
146
+ */
147
+ function ngAddPeerDependencyPackages(packages, packageJsonPath, type = dependencies_1.NodeDependencyType.Default, options, parentPackageInfo) {
148
+ if (!packages.length) {
149
+ return schematics_1.noop;
150
+ }
151
+ const dependencies = (0, index_1.getNodeDependencyList)((0, index_1.getExternalDependenciesVersionRange)(packages, packageJsonPath), type);
152
+ return ngAddPackages(dependencies.map(({ name }) => name), {
153
+ ...options,
154
+ skipConfirmation: true,
155
+ version: dependencies.map(({ version }) => version),
156
+ parentPackageInfo,
157
+ dependencyType: type,
158
+ workingDirectory: options.workingDirectory
159
+ });
160
+ }
161
+ exports.ngAddPeerDependencyPackages = ngAddPeerDependencyPackages;
162
+ //# sourceMappingURL=ng-add.helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-add.helpers.js","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/ng-add.helpers.ts"],"names":[],"mappings":";;;AAAA,2DAA+G;AAC/G,4DAA0E;AAE1E,2EAA8E;AAC9E,qCAAiE;AACjE,kCAAkC;AAClC,+BAAqC;AAGrC,+CAAoH;AAEpH;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,QAAkB,EAAE,OAA8F,EAAE,eAAe,GAAG,eAAe;IACjL,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;QACpB,OAAO,iBAAI,CAAC;KACb;IACD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IAClD,wHAAwH;IACxH,MAAM,kBAAkB,GAAG,CAAC,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AC,CAAC;AACL,CAAC;AA1HD,sCA0HC;AAED;;;;;;;GAOG;AACH,SAAgB,2BAA2B,CAAC,QAAkB,EAAE,eAAuB,EAAE,OAA2B,iCAAkB,CAAC,OAAO,EAC5I,OAA4B,EAAE,iBAA0B;IACxD,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;QACpB,OAAO,iBAAI,CAAC;KACb;IACD,MAAM,YAAY,GAAqB,IAAA,6BAAqB,EAC1D,IAAA,2CAAmC,EAAC,QAAQ,EAAE,eAAe,CAAC,EAC9D,IAAI,CACL,CAAC;IACF,OAAO,aAAa,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE;QACzD,GAAG,OAAO;QACV,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC;QACnD,iBAAiB;QACjB,cAAc,EAAE,IAAI;QACpB,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;KAC3C,CAAC,CAAC;AACL,CAAC;AAjBD,kEAiBC"}
@@ -0,0 +1,17 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ import type { PackageJson } from 'type-fest';
3
+ import type { SchematicOptionObject } from '../../interfaces/index';
4
+ /**
5
+ * Register the given package in the Angular CLI schematics
6
+ * @param packageJson PackageJson of the project containing the collection to add to the project
7
+ * @param angularJsonFile Path to the Angular.json file. Will use the workspace root's angular.json if not specified
8
+ */
9
+ export declare function registerPackageCollectionSchematics(packageJson: PackageJson, angularJsonFile?: string): Rule;
10
+ /**
11
+ * Setup schematics default params in angular.json
12
+ * @param schematicsDefaultParams default params to setup by schematic
13
+ * @param overrideValue Define if the given value should override the one already defined in the workspace
14
+ * @param angularJsonFile Path to the Angular.json file. Will use the workspace root's angular.json if not specified
15
+ */
16
+ export declare function setupSchematicsDefaultParams(schematicsDefaultParams: Record<string, SchematicOptionObject>, overrideValue?: boolean, angularJsonFile?: string): Rule;
17
+ //# sourceMappingURL=schematics-register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schematics-register.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/schematics-register.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAIpE;;;;GAIG;AACH,wBAAgB,mCAAmC,CAAC,WAAW,EAAE,WAAW,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAY5G;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,EAAE,aAAa,UAAQ,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAgClK"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setupSchematicsDefaultParams = exports.registerPackageCollectionSchematics = void 0;
4
+ const utility_1 = require("../../utility");
5
+ /**
6
+ * Register the given package in the Angular CLI schematics
7
+ * @param packageJson PackageJson of the project containing the collection to add to the project
8
+ * @param angularJsonFile Path to the Angular.json file. Will use the workspace root's angular.json if not specified
9
+ */
10
+ function registerPackageCollectionSchematics(packageJson, angularJsonFile) {
11
+ return (tree, context) => {
12
+ if (!packageJson.name) {
13
+ return tree;
14
+ }
15
+ const workspace = (0, utility_1.getWorkspaceConfig)(tree, angularJsonFile);
16
+ if (!workspace) {
17
+ context.logger.error('No workspace found');
18
+ return tree;
19
+ }
20
+ return (0, utility_1.writeAngularJson)(tree, (0, utility_1.registerCollectionSchematics)(workspace, packageJson.name), angularJsonFile);
21
+ };
22
+ }
23
+ exports.registerPackageCollectionSchematics = registerPackageCollectionSchematics;
24
+ /**
25
+ * Setup schematics default params in angular.json
26
+ * @param schematicsDefaultParams default params to setup by schematic
27
+ * @param overrideValue Define if the given value should override the one already defined in the workspace
28
+ * @param angularJsonFile Path to the Angular.json file. Will use the workspace root's angular.json if not specified
29
+ */
30
+ function setupSchematicsDefaultParams(schematicsDefaultParams, overrideValue = false, angularJsonFile) {
31
+ return (tree, context) => {
32
+ const workspace = (0, utility_1.getWorkspaceConfig)(tree, angularJsonFile);
33
+ if (!workspace) {
34
+ context.logger.error('No workspace found');
35
+ return tree;
36
+ }
37
+ workspace.schematics ||= {};
38
+ Object.entries(schematicsDefaultParams).forEach(([schematicName, defaultParams]) => {
39
+ workspace.schematics[schematicName] = overrideValue ? {
40
+ ...workspace.schematics[schematicName],
41
+ ...defaultParams
42
+ } : {
43
+ ...defaultParams,
44
+ ...workspace.schematics[schematicName]
45
+ };
46
+ });
47
+ Object.values(workspace.projects).forEach((project) => {
48
+ Object.entries(schematicsDefaultParams).forEach(([schematicName, defaultParams]) => {
49
+ if (project.schematics?.[schematicName]) {
50
+ project.schematics[schematicName] = overrideValue ? {
51
+ ...project.schematics[schematicName],
52
+ ...defaultParams
53
+ } : {
54
+ ...defaultParams,
55
+ ...project.schematics[schematicName]
56
+ };
57
+ }
58
+ });
59
+ });
60
+ return (0, utility_1.writeAngularJson)(tree, workspace, angularJsonFile);
61
+ };
62
+ }
63
+ exports.setupSchematicsDefaultParams = setupSchematicsDefaultParams;
64
+ //# sourceMappingURL=schematics-register.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schematics-register.js","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/schematics-register.ts"],"names":[],"mappings":";;;AAGA,2CAAmG;AAGnG;;;;GAIG;AACH,SAAgB,mCAAmC,CAAC,WAAwB,EAAE,eAAwB;IACpG,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACvB,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE;YACrB,OAAO,IAAI,C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MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,EAAE,aAAa,CAAC,EAAE,EAAE;gBACjF,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,aAAa,CAAC,EAAE;oBACvC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC;wBAClD,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;wBACpC,GAAG,aAAa;qBACjB,CAAC,CAAC,CAAC;wBACF,GAAG,aAAa;wBAChB,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;qBACrC,CAAC;iBACH;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,OAAO,IAAA,0BAAgB,EAAC,IAAI,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;IAC5D,CAAC,CAAC;AACJ,CAAC;AAhCD,oEAgCC"}
@@ -1,8 +1,12 @@
1
- import type { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ import { type SupportedPackageManagers } from '../utility/package-manager-runner';
2
3
  /**
3
4
  * Install the Otter packages
4
- * @param tree
5
- * @param context
5
+ * @deprecated use {@link setupDependencies} instead, will be removed in V11
6
+ * @param options
7
+ * @param options.packageManager
6
8
  */
7
- export declare function install(tree: Tree, context: SchematicContext): Promise<Rule>;
9
+ export declare function install(options?: {
10
+ packageManager?: SupportedPackageManagers;
11
+ }): Rule;
8
12
  //# sourceMappingURL=install.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/rules/install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAK/E;;;;GAIG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAMlF"}
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/rules/install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAGvD,OAAO,EAAqB,KAAK,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAErG;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,OAAO,CAAC,EAAE;IAAC,cAAc,CAAC,EAAE,wBAAwB,CAAA;CAAC,GAAG,IAAI,CAOnF"}
@@ -6,15 +6,17 @@ const rxjs_1 = require("rxjs");
6
6
  const package_manager_runner_1 = require("../utility/package-manager-runner");
7
7
  /**
8
8
  * Install the Otter packages
9
- * @param tree
10
- * @param context
9
+ * @deprecated use {@link setupDependencies} instead, will be removed in V11
10
+ * @param options
11
+ * @param options.packageManager
11
12
  */
12
- async function install(tree, context) {
13
- const packageManager = (0, package_manager_runner_1.getPackageManager)();
14
- context.logger.info('Running application install');
15
- context.addTask(new tasks_1.NodePackageInstallTask({ packageManager }));
16
- await (0, rxjs_1.lastValueFrom)(context.engine.executePostTasks());
17
- return () => tree;
13
+ function install(options) {
14
+ return async (_, context) => {
15
+ const packageManager = options?.packageManager || (0, package_manager_runner_1.getPackageManager)();
16
+ context.logger.info('Running application install');
17
+ context.addTask(new tasks_1.NodePackageInstallTask({ packageManager }));
18
+ await (0, rxjs_1.lastValueFrom)(context.engine.executePostTasks());
19
+ };
18
20
  }
19
21
  exports.install = install;
20
22
  //# sourceMappingURL=install.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"install.js","sourceRoot":"","sources":["../../../src/rules/install.ts"],"names":[],"mappings":";;;AACA,4DAA0E;AAC1E,+BAAqC;AACrC,8EAAsE;AAEtE;;;;GAIG;AACI,KAAK,UAAU,OAAO,CAAC,IAAU,EAAE,OAAyB;IACjE,MAAM,cAAc,GAAG,IAAA,0CAAiB,GAAE,CAAC;IAC3C,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;IACnD,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,CAAC,EAAC,cAAc,EAAC,CAAC,CAAC,CAAC;IAC9D,MAAM,IAAA,oBAAa,EAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACvD,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC;AACpB,CAAC;AAND,0BAMC"}
1
+ {"version":3,"file":"install.js","sourceRoot":"","sources":["../../../src/rules/install.ts"],"names":[],"mappings":";;;AACA,4DAA0E;AAC1E,+BAAqC;AACrC,8EAAqG;AAErG;;;;;GAKG;AACH,SAAgB,OAAO,CAAC,OAAqD;IAC3E,OAAO,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAC1B,MAAM,cAAc,GAAG,OAAO,EAAE,cAAc,IAAI,IAAA,0CAAiB,GAAE,CAAC;QACtE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;QACnD,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,CAAC,EAAC,cAAc,EAAC,CAAC,CAAC,CAAC;QAC9D,MAAM,IAAA,oBAAa,EAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACzD,CAAC,CAAC;AACJ,CAAC;AAPD,0BAOC"}
@@ -22,6 +22,7 @@ export interface NgAddPackageOptions {
22
22
  /** Flag to skip the execution of ng add and only install the package. Used mostly for external packages */
23
23
  skipNgAddSchematicRun?: boolean;
24
24
  }
25
+ /** @deprecated use {@link setupDependencies} instead, will be removed in V11 */
25
26
  export declare class NodePackageNgAddTask implements TaskConfigurationGenerator<NodePackageTaskOptions> {
26
27
  packageName: string;
27
28
  options?: NgAddPackageOptions | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tasks/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,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AyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,gEAAgE;IAChE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,cAAc,CAAC,EAAE,kBAAkB,CAAC;IAEpC,2GAA2G;IAC3G,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,gFAAgF;AAChF,qBAAa,oBAAqB,YAAW,0BAA0B,CAAC,sBAAsB,CAAC;IAG1E,WAAW,EAAE,MAAM;IAAS,OAAO,CAAC;IAFhD,KAAK,UAAS;gBAEF,WAAW,EAAE,MAAM,EAAS,OAAO,CAAC,iCAAqB;IAErE,eAAe,IAAI,iBAAiB,CAAC,sBAAsB,CAAC;CAgBpE"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NodePackageNgAddTask = void 0;
4
4
  const options_1 = require("@angular-devkit/schematics/tasks/package-manager/options");
5
5
  const package_manager_runner_1 = require("../../utility/package-manager-runner");
6
+ /** @deprecated use {@link setupDependencies} instead, will be removed in V11 */
6
7
  class NodePackageNgAddTask {
7
8
  constructor(packageName, options) {
8
9
  this.packageName = packageName;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tasks/ng-add/index.ts"],"names":[],"mappings":";;;AACA,sFAAmH;AAEnH,iFAAyE;AA8BzE,MAAa,oBAAoB;IAG/B,YAAmB,WAAmB,EAAS,OAA6B;QAAzD,gBAAW,GAAX,WAAW,CAAQ;QAAS,YAAO,GAAP,OAAO,CAAsB;QAFrE,UAAK,GAAG,KAAK,CAAC;IAE0D,CAAC;IAEzE,eAAe;QACpB,MAAM,YAAY,GAAG;YACnB,IAAI,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE;YAC3D,IAAI,CAAC,OAAO,EAAE,WAAW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CAAC,KAAK;gBACjB,gBAAgB,EAAE,IAAI,CAAC,OAAO,EAAE,gBAAgB;gBAChD,WAAW,EAAE,UAAU,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;gBAC7H,cAAc,EAAE,IAAA,0CAAiB,GAAE;aACpC;SAC2C,CAAC;IACjD,CAAC;CACF;AArBD,oDAqBC"}
@@ -2,6 +2,7 @@ import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
2
2
  import { NodePackageInstallTaskOptions } from './interfaces';
3
3
  /**
4
4
  * Install new dev dependency on your package
5
+ * @deprecated use {@link setupDependencies} instead, will be removed in V11
5
6
  */
6
7
  export declare class AddDevInstall extends NodePackageInstallTask {
7
8
  quiet: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"add-dev-dependency.d.ts","sourceRoot":"","sources":["../../../../src/tasks/package-manager/add-dev-dependency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAG1E,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAE7D;;GAEG;AACH,qBAAa,aAAc,SAAQ,sBAAsB;IAChD,KAAK,UAAS;IACd,KAAK,UAAS;gBAET,OAAO,CAAC,EAAE,6BAA6B;IAUnD,kBAAkB;IACX,eAAe;;;;;;;;;;;;;CAYvB"}
1
+ {"version":3,"file":"add-dev-dependency.d.ts","sourceRoot":"","sources":["../../../../src/tasks/package-manager/add-dev-dependency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAG1E,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAE7D;;;GAGG;AACH,qBAAa,aAAc,SAAQ,sBAAsB;IAChD,KAAK,UAAS;IACd,KAAK,UAAS;gBAET,OAAO,CAAC,EAAE,6BAA6B;IAUnD,kBAAkB;IACX,eAAe;;;;;;;;;;;;;CAYvB"}
@@ -6,6 +6,7 @@ const options_1 = require("@angular-devkit/schematics/tasks/package-manager/opti
6
6
  const index_1 = require("../../utility/index");
7
7
  /**
8
8
  * Install new dev dependency on your package
9
+ * @deprecated use {@link setupDependencies} instead, will be removed in V11
9
10
  */
10
11
  class AddDevInstall extends tasks_1.NodePackageInstallTask {
11
12
  constructor(options) {
@@ -1 +1 @@
1
- {"version":3,"file":"add-dev-dependency.js","sourceRoot":"","sources":["../../../../src/tasks/package-manager/add-dev-dependency.ts"],"names":[],"mappings":";;;AAAA,4DAA0E;AAC1E,sFAA2F;AAC3F,+CAA4E;AAG5E;;GAEG;AACH,MAAa,aAAc,SAAQ,8BAAsB;IAIvD,YAAY,OAAuC;QACjD,KAAK,CAAC,OAAc,CAAC,CAAC;QAJjB,UAAK,GAAG,KAAK,CAAC;QACd,UAAK,GAAG,KAAK,CAAC;QAInB,IAAI,CAAC,cAAc,GAAG,IAAA,yBAAiB,EAAC;YACtC,eAAe,EAAE,OAAO,EAAE,IAAI,IAAI,IAAA,0BAAkB,EAAC,OAAO,CAAC,IAAI,CAAC;YAClE,kBAAkB,EAAE,OAAO,EAAE,WAAW;SACzC,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC;IAChC,CAAC;IAGD,kBAAkB;IACX,eAAe;QACpB,MAAM,aAAa,GAAG,KAAK,CAAC,eAAe,EAAE,CAAC;QAC9C,OAAO;YACL,GAAG,aAAa;YAChB,IAAI,EAAE,yBAAe;YACrB,OAAO,EAAE;gBACP,GAAG,aAAa,CAAC,OAAO;gBACxB,OAAO,EAAE,SAAS;gBAClB,WAAW,EAAE,GAAG,IAAI,CAAC,WAAY,IAAI,IAAI,CAAC,cAAc,KAAK,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,cAAc,KAAK,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE;aACtK;SACF,CAAC;IACJ,CAAC;CACF;AA3BD,sCA2BC"}
1
+ {"version":3,"file":"add-dev-dependency.js","sourceRoot":"","sources":["../../../../src/tasks/package-manager/add-dev-dependency.ts"],"names":[],"mappings":";;;AAAA,4DAA0E;AAC1E,sFAA2F;AAC3F,+CAA4E;AAG5E;;;GAGG;AACH,MAAa,aAAc,SAAQ,8BAAsB;IAIvD,YAAY,OAAuC;QACjD,KAAK,CAAC,OAAc,CAAC,CAAC;QAJjB,UAAK,GAAG,KAAK,CAAC;QACd,UAAK,GAAG,KAAK,CAAC;QAInB,IAAI,CAAC,cAAc,GAAG,IAAA,yBAAiB,EAAC;YACtC,eAAe,EAAE,OAAO,EAAE,IAAI,IAAI,IAAA,0BAAkB,EAAC,OAAO,CAAC,IAAI,CAAC;YAClE,kBAAkB,EAAE,OAAO,EAAE,WAAW;SACzC,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC;IAChC,CAAC;IAGD,kBAAkB;IACX,eAAe;QACpB,MAAM,aAAa,GAAG,KAAK,CAAC,eAAe,EAAE,CAAC;QAC9C,OAAO;YACL,GAAG,aAAa;YAChB,IAAI,EAAE,yBAAe;YACrB,OAAO,EAAE;gBACP,GAAG,aAAa,CAAC,OAAO;gBACxB,OAAO,EAAE,SAAS;gBAClB,WAAW,EAAE,GAAG,IAAI,CAAC,WAAY,IAAI,IAAI,CAAC,cAAc,KAAK,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,cAAc,KAAK,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE;aACtK;SACF,CAAC;IACJ,CAAC;CACF;AA3BD,sCA2BC"}
@@ -1 +1 @@
1
- {"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../../src/utility/collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE1E;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,GAAG,eAAe,CAO5G;AAED;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAC1C,CAAC,SAAS,mBAAmB,CAAC,KAAK,CAAC,GAAG,mBAAmB,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,eAAe,GAAG,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,CAAC,CAmBrM;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,mBAAmB,CAAC,KAAK,CAAC,GAAG,mBAAmB,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,gBAAgB,GAAG,CAAC,GAAG,SAAS,CAUxK"}
1
+ {"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../../src/utility/collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE1E;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,GAAG,eAAe,CAO5G;AAED;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAC1C,CAAC,SAAS,mBAAmB,CAAC,KAAK,CAAC,GAAG,mBAAmB,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,eAAe,GAAG,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,CAAC,CAoBrM;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,mBAAmB,CAAC,KAAK,CAAC,GAAG,mBAAmB,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,gBAAgB,GAAG,CAAC,GAAG,SAAS,CAUxK"}
@@ -38,7 +38,7 @@ function getDefaultOptionsForSchematic(workspace, collection, schematicName, opt
38
38
  return acc;
39
39
  }
40
40
  return Object.entries(schematics)
41
- .filter(([key, _]) => key === `*:${schematicName}` || key === `${collection}:*` || key === `${collection}:${schematicName}`)
41
+ .filter(([key, _]) => new RegExp(key.replace(/[*]/g, '.*')).test(`${collection}:${schematicName}`))
42
42
  .sort(([a], [b]) => (a.match(/\*/g)?.length || 0) - (b.match(/\*/g)?.length || 0))
43
43
  .map(([_, value]) => value)
44
44
  .reduce((config, value) => ({ ...config, ...value }), acc);
@@ -1 +1 @@
1
- {"version":3,"file":"collection.js","sourceRoot":"","sources":["../../../src/utility/collection.ts"],"names":[],"mappings":";;;AAGA;;;;;GAKG;AACH,SAAgB,4BAA4B,CAAC,SAA0B,EAAE,UAAkB;IACzF,SAAS,CAAC,GAAG,KAAK,EAAE,CAAC;IACrB,SAAS,CAAC,GAAG,CAAC,oBAAoB,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC/D,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,oBAAoB,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;QAC5D,SAAS,CAAC,GAAG,CAAC,oBAAoB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;KACxD;IACD,OAAO,SAAS,CAAC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E,EAAE,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC,EAAE,EAAS,CAAC,CAAC;IAE/D,OAAO,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC;AACvF,CAAC;AAVD,kDAUC"}
@@ -11,7 +11,7 @@ const fs = require("node:fs");
11
11
  function getExternalDependenciesVersionRange(packageNames, packageJsonPath) {
12
12
  const packageJsonContent = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf-8' }));
13
13
  return packageNames.reduce((acc, packageName) => {
14
- acc[packageName] = packageJsonContent.peerDependencies?.[packageName] || packageJsonContent.generatorDependencies?.[packageName];
14
+ acc[packageName] = packageJsonContent.peerDependencies?.[packageName] || packageJsonContent.generatorDependencies?.[packageName] || packageJsonContent.dependencies?.[packageName] || 'latest';
15
15
  return acc;
16
16
  }, {});
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../../../src/utility/dependencies.ts"],"names":[],"mappings":";;;AAAA,8BAA8B;AAG9B;;;;;GAKG;AACH,SAAgB,mCAAmC,CAAmB,YAAiB,EAAE,eAAuB;IAC9G,MAAM,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,EAAC,QAAQ,EAAE,OAAO,EAAC,CAAC,CAAC,CAAC;IAC7F,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC,GAA+B,EAAE,WAAW,EAAE,EAAE;QAC1E,GAAG,CAAC,WAAW,CAAC,GAAG,kBAAkB,CAAC,gBAAgB,EAAE,CAAC,WAAW,CAAC,IAAI,kBAAkB,CAAC,qBAAqB,EAAE,CAAC,WAAW,CAAC,CAAC;QACjI,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAs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EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;AACzH,CAAC;AAFD,sDAEC"}
@@ -34,10 +34,15 @@ export declare function writeAngularJson(tree: Tree, workspace: WorkspaceSchema,
34
34
  export declare function readPackageJson(tree: Tree, workspaceProject: WorkspaceProject): PackageJson;
35
35
  /**
36
36
  * Return the type of install to run depending on the project type (Peer or default)
37
+ * @deprecated use {@link getProjectNewDependenciesTypes instead}, will be removed in V11
37
38
  * @param project
38
- * @param tree
39
39
  */
40
40
  export declare function getProjectNewDependenciesType(project?: WorkspaceProject): NodeDependencyType.Default | NodeDependencyType.Peer;
41
+ /**
42
+ * Return the types of install to run depending on the project type
43
+ * @param project
44
+ */
45
+ export declare function getProjectNewDependenciesTypes(project?: WorkspaceProject): NodeDependencyType[];
41
46
  /**
42
47
  * Get the folder of the templates for a specific sub-schematics
43
48
  * @param rootPath Root directory of the schematics ran
@@ -1 +1 @@
1
- {"version":3,"file":"loaders.d.ts","sourceRoot":"","sources":["../../../src/utility/loaders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAuB,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAG9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAiB7E;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,QAAQ,EAAE,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,EAAE,iBAAiB,GAAE,MAAM,EAAsC,eAInK;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE,mBAAmB,SAAkB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AE,SAAS,UAAO,GAAG,MAAM,EAAE,CAQjH;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAGnE;AAED;;;;;GAKG;AACH,wBAAgB,2CAA2C,CAAC,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,YAOjH;AAGD;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,YAK1E;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,YAEhF;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,YAE1E;AAGD;;;GAGG;AACH,wBAAgB,mCAAmC,CAAC,IAAI,EAAE,IAAI,YAE7D"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getSourceFilesFromWorkspaceProjects = exports.getFilesFromWorkspaceProjects = exports.getFilesFromRootOfWorkspaceProjects = exports.getFilesWithExtensionFromTree = exports.getFilesInFolderFromWorkspaceProjectsInTree = exports.globInTree = exports.getAllFilesInTree = exports.getTemplateFolder = exports.getProjectNewDependenciesType = exports.readPackageJson = exports.writeAngularJson = exports.getWorkspaceConfig = exports.findFilesInTree = void 0;
3
+ exports.getSourceFilesFromWorkspaceProjects = exports.getFilesFromWorkspaceProjects = exports.getFilesFromRootOfWorkspaceProjects = exports.getFilesWithExtensionFromTree = exports.getFilesInFolderFromWorkspaceProjectsInTree = exports.globInTree = exports.getAllFilesInTree = exports.getTemplateFolder = exports.getProjectNewDependenciesTypes = exports.getProjectNewDependenciesType = exports.readPackageJson = exports.writeAngularJson = exports.getWorkspaceConfig = exports.findFilesInTree = void 0;
4
4
  const schematics_1 = require("@angular-devkit/schematics");
5
5
  const dependencies_1 = require("@schematics/angular/utility/dependencies");
6
6
  const minimatch_1 = require("minimatch");
@@ -70,13 +70,21 @@ function readPackageJson(tree, workspaceProject) {
70
70
  exports.readPackageJson = readPackageJson;
71
71
  /**
72
72
  * Return the type of install to run depending on the project type (Peer or default)
73
+ * @deprecated use {@link getProjectNewDependenciesTypes instead}, will be removed in V11
73
74
  * @param project
74
- * @param tree
75
75
  */
76
76
  function getProjectNewDependenciesType(project) {
77
77
  return project?.projectType === 'library' ? dependencies_1.NodeDependencyType.Peer : dependencies_1.NodeDependencyType.Default;
78
78
  }
79
79
  exports.getProjectNewDependenciesType = getProjectNewDependenciesType;
80
+ /**
81
+ * Return the types of install to run depending on the project type
82
+ * @param project
83
+ */
84
+ function getProjectNewDependenciesTypes(project) {
85
+ return project?.projectType === 'library' ? [dependencies_1.NodeDependencyType.Peer, dependencies_1.NodeDependencyType.Dev] : [dependencies_1.NodeDependencyType.Default];
86
+ }
87
+ exports.getProjectNewDependenciesTypes = getProjectNewDependenciesTypes;
80
88
  /**
81
89
  * Get the folder of the templates for a specific sub-schematics
82
90
  * @param rootPath Root directory of the schematics ran
@@ -1 +1 @@
1
- {"version":3,"file":"loaders.js","sourceRoot":"","sources":["../../../src/utility/loaders.ts"],"names":[],"mappings":";;;AACA,2DAAuE;AACvE,2EAA8E;AAC9E,yCAAsC;AACtC,kCAAkC;AAIlC,SAAS,kBAAkB,CAAC,MAAsB,EAAE,SAAmB,EAAE,mBAA8C,EAAE,iBAA2B;IAClJ,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;QACjF,OAAO,MAAM,CAAC;KACf;IAED,SAAS,CAAC,QAAQ;SACf,MAAM,CAAC,mBAAmB,CAAC;SAC3B,OAAO,CAAC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AAE,SAAiB;IAC/E,OAAO,2CAA2C,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC;AAC1E,CAAC;AAFD,kFAEC;AAED;;;;GAIG;AACH,SAAgB,6BAA6B,CAAC,IAAU,EAAE,SAAiB;IACzE,OAAO,2CAA2C,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;AAC7E,CAAC;AAFD,sEAEC;AAGD;;;GAGG;AACH,SAAgB,mCAAmC,CAAC,IAAU;IAC5D,OAAO,6BAA6B,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACnD,CAAC;AAFD,kFAEC"}
@@ -1 +1 @@
1
- {"version":3,"file":"matching-peers.d.ts","sourceRoot":"","sources":["../../../src/utility/matching-peers.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,GAAE,MAAM,GAAG,MAAM,EAA4B;;;;;;;EAelH;AASD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,YAAY,UAAO,EAAE,cAAc,SAAsB,EAAE,kBAAkB,SAAM;;;;EAU1I;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,MAAM,EAAE,cAAc,SAAsB;;;;EAahG"}
1
+ {"version":3,"file":"matching-peers.d.ts","sourceRoot":"","sources":["../../../src/utility/matching-peers.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,GAAE,MAAM,GAAG,MAAM,EAA4B;;;;;;;EAelH;AASD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,YAAY,UAAO,EAAE,cAAc,SAAsB,EAAE,kBAAkB,SAAK;;;;EAUzI;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,MAAM,EAAE,cAAc,SAAsB;;;;EAahG"}
@@ -33,7 +33,7 @@ const basicsPackageName = new Set([
33
33
  * @param packagePattern Pattern of the package name to look in the packages peer dependencies.
34
34
  * @param versionRangePrefix Prefix to add to the package version to determine Semver Range
35
35
  */
36
- function getO3rPeerDeps(packageJsonPath, filterBasics = true, packagePattern = /^@(?:o3r|ama-sdk)/, versionRangePrefix = '^') {
36
+ function getO3rPeerDeps(packageJsonPath, filterBasics = true, packagePattern = /^@(?:o3r|ama-sdk)/, versionRangePrefix = '') {
37
37
  const depsInfo = getPeerDepWithPattern(packageJsonPath, packagePattern);
38
38
  return {
39
39
  packageName: depsInfo.packageName,