@o3r/schematics 10.3.0-prerelease.9 → 10.3.0-rc.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment.js","sourceRoot":"","sources":["../../cli/environment.ts"],"names":[],"mappings":";;AAAA,gDAAmE;AAEnE,OAAO,CAAC,IAAI,CAAC,4BAA4B,IAAA,mCAA2B,GAAE,EAAE,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/schematics",
3
- "version": "10.3.0-prerelease.9",
3
+ "version": "10.3.0-rc.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -30,7 +30,7 @@
30
30
  "@angular-devkit/core": "~17.3.0",
31
31
  "@angular-devkit/schematics": "~17.3.0",
32
32
  "@angular/cli": "~17.3.0",
33
- "@o3r/telemetry": "^10.3.0-prerelease.9",
33
+ "@o3r/telemetry": "^10.3.0-rc.1",
34
34
  "@schematics/angular": "~17.3.0",
35
35
  "eslint": "^8.42.0",
36
36
  "rxjs": "^7.8.1",
@@ -78,13 +78,13 @@
78
78
  "@babel/core": "~7.24.0",
79
79
  "@babel/preset-typescript": "~7.24.0",
80
80
  "@compodoc/compodoc": "^1.1.19",
81
- "@nx/eslint": "~18.2.0",
82
- "@nx/eslint-plugin": "~18.2.0",
83
- "@nx/jest": "~18.2.0",
84
- "@nx/js": "~18.2.0",
85
- "@o3r/build-helpers": "^10.3.0-prerelease.9",
86
- "@o3r/eslint-plugin": "^10.3.0-prerelease.9",
87
- "@o3r/telemetry": "^10.3.0-prerelease.9",
81
+ "@nx/eslint": "~18.3.0",
82
+ "@nx/eslint-plugin": "~18.3.0",
83
+ "@nx/jest": "~18.3.0",
84
+ "@nx/js": "~18.3.0",
85
+ "@o3r/build-helpers": "^10.3.0-rc.1",
86
+ "@o3r/eslint-plugin": "^10.3.0-rc.1",
87
+ "@o3r/telemetry": "^10.3.0-rc.1",
88
88
  "@schematics/angular": "~17.3.0",
89
89
  "@stylistic/eslint-plugin-ts": "^1.5.4",
90
90
  "@types/inquirer": "~8.2.10",
@@ -104,7 +104,7 @@
104
104
  "jest-junit": "~16.0.0",
105
105
  "jsonc-eslint-parser": "~2.4.0",
106
106
  "jsonschema": "~1.4.1",
107
- "nx": "~18.2.0",
107
+ "nx": "~18.3.0",
108
108
  "rxjs": "^7.8.1",
109
109
  "ts-jest": "~29.1.2",
110
110
  "ts-node": "~10.9.2",
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAEA,2EAA8E;AAC9E,kCAAkC;AAGlC;;;GAGG;AACH,SAAS,OAAO,CAAC,OAA8B;IAC7C,MAAM,sBAAsB,GAAG,CAAC,2BAA2B,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,QAAQ,CAAC,CAAC;IACpJ,OAAO,KAAK,IAAI,EAAE;QAChB,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QAC5E,MAAM,EAAE,mCAAmC,EAAE,iBAAiB,EAAE,GAAG,2CAAa,iBAAiB,EAAC,CAAC;QACnG,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,mCAAmC,CAAC,sBAAsB,EAAE,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC7I,GAAG,CAAC,GAAG,CAAC,GAAG;gBACT,UAAU,EAAE,CAAC;wBACX,KAAK;wBACL,KAAK,EAAE,CAAC,iCAAkB,CAAC,GAAG,CAAC;qBAChC,CAAC;aACH,CAAC;YACF,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,EAAqC,CAAC,CAAC;QAC1C,MAAM,CAAC,OAAO,CAAC,mCAAmC,CAAC,sBAAsB,EAAE,eAAe,CAAC,CAAC;aACzF,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YACxB,YAAY,CAAC,GAAG,CAAC,GAAG;gBAClB,UAAU,EAAE,CAAC;wBACX,KAAK;wBACL,KAAK,EAAE,CAAC,iCAAkB,CAAC,GAAG,CAAC;qBAChC,CAAC;aACH,CAAC;QACJ,CAAC,CAAC,CAAC;QACL,OAAO,iBAAiB,CAAC;YACvB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,YAAY;YACZ,WAAW,EAAE,KAAK;SACnB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACI,MAAM,KAAK,GAAG,CAAC,OAA8B,EAAQ,EAAE,CAAC,KAAK,IAAI,EAAE;IACxE,MAAM,EAAE,qCAAqC,EAAE,GAAG,2CAAa,iBAAiB,EAAC,CAAC;IAClF,OAAO,qCAAqC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;AACjE,CAAC,CAAC;AAHW,QAAA,KAAK,SAGhB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":""}
@@ -1,5 +1,9 @@
1
- import { Rule } from '@angular-devkit/schematics';
1
+ import { Rule, type TaskId } from '@angular-devkit/schematics';
2
2
  import { LinterOptions } from '../../tasks/index';
3
+ interface ApplyEslintFixOption extends LinterOptions {
4
+ /** List of task to wait to run the linter */
5
+ dependencyTaskIds?: TaskId[];
6
+ }
3
7
  /**
4
8
  * Apply EsLint fix
5
9
  * @param prootPath Root path
@@ -7,5 +11,6 @@ import { LinterOptions } from '../../tasks/index';
7
11
  * @param extension List of file extensions to lint
8
12
  * @param options Linter options
9
13
  */
10
- export declare function applyEsLintFix(_prootPath?: string, extension?: string[], options?: LinterOptions): Rule;
14
+ export declare function applyEsLintFix(_prootPath?: string, extension?: string[], options?: ApplyEslintFixOption): Rule;
15
+ export {};
11
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/eslint-fix/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAE1F,OAAO,EAAiB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEjE;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,SAAM,EAAE,SAAS,GAAE,MAAM,EAAW,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAoE5G"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/eslint-fix/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,IAAI,EAAoB,KAAK,MAAM,EAAQ,MAAM,4BAA4B,CAAC;AAEvG,OAAO,EAAiB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEjE,UAAU,oBAAqB,SAAQ,aAAa;IAClD,6CAA6C;IAC7C,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,SAAM,EAAE,SAAS,GAAE,MAAM,EAAW,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAqEnH"}
@@ -55,7 +55,7 @@ You can consider to run later the following command to add otter linter rules: n
55
55
  return acc;
56
56
  }, new Set());
57
57
  if (files.size) {
58
- context.addTask(new index_1.EslintFixTask(Array.from(files), undefined, eslintFile, linterOptions));
58
+ context.addTask(new index_1.EslintFixTask(Array.from(files), undefined, eslintFile, linterOptions), options?.dependencyTaskIds);
59
59
  }
60
60
  return tree;
61
61
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rule-factories/eslint-fix/index.ts"],"names":[],"mappings":";;;AAAA,2DAA0F;AAC1F,yCAA0C;AAC1C,6CAAiE;AAEjE;;;;;;GAMG;AACH,SAAgB,cAAc,CAAC,UAAU,G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{ NodePackageTaskOptions } from '@angular-devkit/schematics/tasks/package-manager/options';
3
+ import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
4
+ import type { WorkspaceSchema } from '../../interfaces';
3
5
  /**
4
6
  * Linter options
5
7
  */
@@ -14,13 +16,18 @@ export interface LinterOptions {
14
16
  * @default true
15
17
  */
16
18
  hideWarnings?: boolean;
19
+ /** Workspace configuration file */
20
+ workspaceConfig?: WorkspaceSchema;
21
+ /** Enforced NPM Package */
22
+ enforcedNpmManager?: string;
17
23
  }
18
- export declare class EslintFixTask implements TaskConfigurationGenerator<NodePackageTaskOptions> {
24
+ export declare class EslintFixTask extends NodePackageInstallTask implements TaskConfigurationGenerator<NodePackageTaskOptions> {
19
25
  files: string[];
20
26
  workingDirectory?: string | undefined;
21
27
  configFile?: string | undefined;
22
28
  linterOptions: LinterOptions;
23
29
  constructor(files: string[], workingDirectory?: string | undefined, configFile?: string | undefined, options?: LinterOptions);
30
+ /** @inheritdoc */
24
31
  toConfiguration(): TaskConfiguration<NodePackageTaskOptions>;
25
32
  }
26
33
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tasks/eslint/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAC3F,OAAO,EAAmB,sBAAsB,EAAE,MAAM,0DAA0D,CAAC;AAGnH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,qBAAa,aAAc,YAAW,0BAA0B,CAAC,sBAAsB,CAAC;IAGnE,KAAK,EAAE,MAAM,EAAE;IAAS,gBAAgB,CAAC;IAAiB,UAAU,CAAC;IAFjF,aAAa,EAAE,aAAa,CAAC;gBAEjB,KAAK,EAAE,MAAM,EAAE,EAAS,gBAAgB,CAAC,oBAAQ,EAAS,UAAU,CAAC,oBAAQ,EAAE,OAAO,CAAC,EAAE,aAAa;IAQlH,eAAe,IAAI,iBAAiB,CAAC,sBAAsB,CAAC;CAmBpE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tasks/eslint/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAC3F,OAAO,EAAmB,sBAAsB,EAAE,MAAM,0DAA0D,CAAC;AAEnH,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,mCAAmC;IACnC,eAAe,CAAC,EAAE,eAAe,CAAC;IAElC,2BAA2B;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,qBAAa,aAAc,SAAQ,sBAAuB,YAAW,0BAA0B,CAAC,sBAAsB,CAAC;IAGlG,KAAK,EAAE,MAAM,EAAE;IAAS,gBAAgB,CAAC;IAAiB,UAAU,CAAC;IAFjF,aAAa,EAAE,aAAa,CAAC;gBAEjB,KAAK,EAAE,MAAM,EAAE,EAAS,gBAAgB,CAAC,oBAAQ,EAAS,UAAU,CAAC,oBAAQ,EAAE,OAAO,CAAC,EAAE,aAAa;IAWzH,kBAAkB;IACX,eAAe,IAAI,iBAAiB,CAAC,sBAAsB,CAAC;CAqBpE"}
@@ -3,8 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EslintFixTask = 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
- class EslintFixTask {
6
+ const tasks_1 = require("@angular-devkit/schematics/tasks");
7
+ class EslintFixTask extends tasks_1.NodePackageInstallTask {
7
8
  constructor(files, workingDirectory, configFile, options) {
9
+ super({
10
+ packageManager: (0, package_manager_runner_1.getPackageManager)(options)
11
+ });
8
12
  this.files = files;
9
13
  this.workingDirectory = workingDirectory;
10
14
  this.configFile = configFile;
@@ -14,6 +18,7 @@ class EslintFixTask {
14
18
  ...options
15
19
  };
16
20
  }
21
+ /** @inheritdoc */
17
22
  toConfiguration() {
18
23
  return {
19
24
  name: options_1.NodePackageName,
@@ -22,8 +27,10 @@ class EslintFixTask {
22
27
  quiet: false,
23
28
  workingDirectory: this.workingDirectory,
24
29
  packageName: [
30
+ 'exec',
25
31
  'eslint',
26
32
  ...this.files,
33
+ ...(this.packageName !== 'npm' ? [] : ['--']),
27
34
  '--fix',
28
35
  ...(this.linterOptions?.hideWarnings ? ['--quiet'] : []),
29
36
  ...(this.configFile ? ['--config', this.configFile] : []),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tasks/eslint/index.ts"],"names":[],"mappings":";;;AACA,sFAAmH;AACnH,iFAAyE;AAkBzE,MAAa,aAAa;IAGxB,YAAmB,KAAe,EAAS,gBAAyB,EAAS,UAAmB,EAAE,OAAuB;QAAtG,UAAK,GAAL,KAAK,CAAU;QAAS,qBAAgB,GAAhB,gBAAgB,CAAS;QAAS,eAAU,GAAV,UAAU,CAAS;QAC9F,IAAI,CAAC,aAAa,GAAG;YACnB,eAAe,EAAE,IAAI;YACrB,YAAY,EAAE,IAAI;YAClB,GAAG,OAAO;SACX,CAAC;IACJ,CAAC;IAEM,eAAe;QACpB,OAAO;YACL,IAAI,EAAE,yBAAe;YACrB,OAAO,EAAE;gBACP,OAAO,EAAE,MAAM;gBACf,KAAK,EAAE,KAAK;gBACZ,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;gBACvC,WAAW,EAAE;oBACX,QAAQ;oBACR,GAAG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MAAM;oBACN,QAAQ;oBACR,GAAG,IAAI,CAAC,KAAK;oBACb,GAAG,CAAC,IAAI,CAAC,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;oBAC7C,OAAO;oBACP,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;oBACxD,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;oBACzD,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;iBAC9D,CAAC,IAAI,CAAC,GAAG,CAAC;gBACX,cAAc,EAAE,IAAA,0CAAiB,GAAE;aACpC;SACF,CAAC;IACJ,CAAC;CACF;AApCD,sCAoCC"}
@@ -3,7 +3,7 @@ import type { WorkspaceLayout, WorkspaceProject, WorkspaceSchema } from '../inte
3
3
  /**
4
4
  * Find the relative path to a configuration file at the monorepo root
5
5
  * @param tree
6
- * @param files List of files to look for, the first of the list will used
6
+ * @param files List of files to look for, the first of the list will be used
7
7
  * @param originPath Path from where to calculate the relative path
8
8
  * @returns
9
9
  */
@@ -15,6 +15,7 @@ export declare function findConfigFileRelativePath(tree: Tree, files: string[],
15
15
  export declare function isNxContext(tree: Tree): boolean;
16
16
  /**
17
17
  * Determine if a repository is standalone (not part of a monorepo)
18
+ * @deprecated no longer in use. Will be removed in V12
18
19
  * @param tree
19
20
  */
20
21
  export declare function isStandaloneRepository(tree: Tree): boolean | null;
@@ -1 +1 @@
1
- {"version":3,"file":"monorepo.d.ts","sourceRoot":"","sources":["../../../src/utility/monorepo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,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AE,EAAE,UAAU,EAAE,MAAM,UAOzF;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,WAErC;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,kBAGhD;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,WAEhD;AAED,mFAAmF;AACnF,eAAO,MAAM,qBAAqB,SAAS,CAAC;AAC5C,sFAAsF;AACtF,eAAO,MAAM,wBAAwB,SAAS,CAAC;AAE/C,oEAAoE;AACpE,eAAO,MAAM,oBAAoB,EAAE,eAGlC,CAAC;AAEF,uDAAuD;AACvD,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,MAAM,eAAe,CAGhG,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,CAAC,EAAE,gBAAgB,CAAC,aAAa,CAAC,OAQtJ"}
@@ -7,7 +7,7 @@ const loaders_1 = require("./loaders");
7
7
  /**
8
8
  * Find the relative path to a configuration file at the monorepo root
9
9
  * @param tree
10
- * @param files List of files to look for, the first of the list will used
10
+ * @param files List of files to look for, the first of the list will be used
11
11
  * @param originPath Path from where to calculate the relative path
12
12
  * @returns
13
13
  */
@@ -29,6 +29,7 @@ function isNxContext(tree) {
29
29
  exports.isNxContext = isNxContext;
30
30
  /**
31
31
  * Determine if a repository is standalone (not part of a monorepo)
32
+ * @deprecated no longer in use. Will be removed in V12
32
33
  * @param tree
33
34
  */
34
35
  function isStandaloneRepository(tree) {
@@ -1 +1 @@
1
- {"version":3,"file":"monorepo.js","sourceRoot":"","sources":["../../../src/utility/monorepo.ts"],"names":[],"mappings":";;;AACA,kCAAkC;AAElC,6CAAmD;AAEnD,uCAA+C;AAE/C;;;;;;GAMG;AACH,SAA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