@o3r/stylelint-plugin 12.3.0-prerelease.48 → 12.3.0-prerelease.49

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": "@o3r/stylelint-plugin",
3
- "version": "12.3.0-prerelease.48",
3
+ "version": "12.3.0-prerelease.49",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -23,12 +23,13 @@
23
23
  "build:builders": "tsc -b tsconfig.builders.json --pretty && yarn generate-cjs-manifest"
24
24
  },
25
25
  "dependencies": {
26
+ "@o3r/schematics": "^12.3.0-prerelease.49",
26
27
  "ts-node": "~10.9.2",
27
28
  "tslib": "^2.6.2"
28
29
  },
29
30
  "peerDependencies": {
30
31
  "@angular-devkit/schematics": "^19.0.0",
31
- "@o3r/schematics": "^12.3.0-prerelease.48",
32
+ "@o3r/schematics": "^12.3.0-prerelease.49",
32
33
  "@schematics/angular": "^19.0.0",
33
34
  "postcss": "^8.4.5",
34
35
  "postcss-scss": "^4.0.9",
@@ -56,11 +57,10 @@
56
57
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
57
58
  "@nx/eslint-plugin": "~20.8.0",
58
59
  "@nx/jest": "~20.8.0",
59
- "@o3r/build-helpers": "^12.3.0-prerelease.48",
60
- "@o3r/eslint-config": "^12.3.0-prerelease.48",
61
- "@o3r/eslint-plugin": "^12.3.0-prerelease.48",
62
- "@o3r/schematics": "^12.3.0-prerelease.48",
63
- "@o3r/test-helpers": "^12.3.0-prerelease.48",
60
+ "@o3r/build-helpers": "^12.3.0-prerelease.49",
61
+ "@o3r/eslint-config": "^12.3.0-prerelease.49",
62
+ "@o3r/eslint-plugin": "^12.3.0-prerelease.49",
63
+ "@o3r/test-helpers": "^12.3.0-prerelease.49",
64
64
  "@schematics/angular": "~19.2.0",
65
65
  "@stylistic/eslint-plugin": "~3.1.0",
66
66
  "@types/css-tree": "~2.3.0",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,IAAI,EACL,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AA2DlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,KAAG,IAKtD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,IAAI,EACL,MAAM,4BAA4B,CAAC;AAUpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AA2ClB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
@@ -2,18 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ngAdd = void 0;
4
4
  const path = require("node:path");
5
+ const schematics_1 = require("@o3r/schematics");
5
6
  const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
6
7
  const dependenciesToInstall = [
7
8
  'postcss',
8
9
  'postcss-scss',
9
10
  'stylelint'
10
11
  ];
11
- const reportMissingSchematicsDep = (logger) => (reason) => {
12
- logger.error(`[ERROR]: Adding @o3r/stylelint-plugin has failed.
13
- If the error is related to missing @o3r dependencies you need to install '@o3r/core' to be able to use the mobile package. Please run 'ng add @o3r/core' .
14
- Otherwise, use the error message as guidance.`);
15
- throw reason;
16
- };
17
12
  /**
18
13
  * Add Otter stylelint-plugin to an Angular Project
19
14
  * @param options
@@ -21,20 +16,19 @@ Otherwise, use the error message as guidance.`);
21
16
  function ngAddFn(options) {
22
17
  /* ng add rules */
23
18
  return async (tree, context) => {
24
- const { getExternalDependenciesVersionRange, getPackageInstallConfig, getProjectNewDependenciesTypes, getO3rPeerDeps, getWorkspaceConfig, setupDependencies } = await Promise.resolve().then(() => require('@o3r/schematics'));
25
19
  const { NodeDependencyType } = await Promise.resolve().then(() => require('@schematics/angular/utility/dependencies'));
26
- const depsInfo = getO3rPeerDeps(packageJsonPath);
27
- const workspaceProject = options.projectName ? getWorkspaceConfig(tree)?.projects[options.projectName] : undefined;
20
+ const depsInfo = (0, schematics_1.getO3rPeerDeps)(packageJsonPath);
21
+ const workspaceProject = options.projectName ? (0, schematics_1.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
28
22
  const dependencies = depsInfo.o3rPeerDeps.reduce((acc, dep) => {
29
23
  acc[dep] = {
30
24
  inManifest: [{
31
25
  range: `~${depsInfo.packageVersion}`,
32
- types: getProjectNewDependenciesTypes(workspaceProject)
26
+ types: (0, schematics_1.getProjectNewDependenciesTypes)(workspaceProject)
33
27
  }]
34
28
  };
35
29
  return acc;
36
- }, getPackageInstallConfig(packageJsonPath, tree, options.projectName, true, !!options.exactO3rVersion));
37
- Object.entries(getExternalDependenciesVersionRange(dependenciesToInstall, packageJsonPath, context.logger)).forEach(([dep, range]) => {
30
+ }, (0, schematics_1.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, true, !!options.exactO3rVersion));
31
+ Object.entries((0, schematics_1.getExternalDependenciesVersionRange)(dependenciesToInstall, packageJsonPath, context.logger)).forEach(([dep, range]) => {
38
32
  dependencies[dep] = {
39
33
  inManifest: [{
40
34
  range,
@@ -42,7 +36,7 @@ function ngAddFn(options) {
42
36
  }]
43
37
  };
44
38
  });
45
- return setupDependencies({
39
+ return (0, schematics_1.setupDependencies)({
46
40
  projectName: options.projectName,
47
41
  dependencies
48
42
  });
@@ -52,9 +46,6 @@ function ngAddFn(options) {
52
46
  * Add Otter stylelint-plugin to an Angular Project
53
47
  * @param options
54
48
  */
55
- const ngAdd = (options) => async (_, { logger }) => {
56
- const { createOtterSchematic } = await Promise.resolve().then(() => require('@o3r/schematics')).catch(reportMissingSchematicsDep(logger));
57
- return createOtterSchematic(ngAddFn)(options);
58
- };
49
+ const ngAdd = (options) => (0, schematics_1.createOtterSchematic)(ngAddFn)(options);
59
50
  exports.ngAdd = ngAdd;
60
51
  //# sourceMappingURL=index.js.map