@equinor/roma-nx-plugin 6.3.0 → 6.4.1

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.
Files changed (119) hide show
  1. package/CHANGELOG.md +116 -255
  2. package/README.md +5 -0
  3. package/biome-baseline.json +95 -0
  4. package/executors.json +5 -0
  5. package/generators.json +5 -0
  6. package/migrations.json +5 -0
  7. package/package.json +8 -2
  8. package/src/executors/build/build.d.ts +1 -1
  9. package/src/executors/build/build.js +3 -3
  10. package/src/executors/build/build.js.map +1 -1
  11. package/src/executors/build/executor.d.ts +1 -1
  12. package/src/executors/build/executor.js.map +1 -1
  13. package/src/executors/build/minify.d.ts +1 -1
  14. package/src/executors/build/minify.js.map +1 -1
  15. package/src/executors/build/normalizeRootForFusion.d.ts +1 -1
  16. package/src/executors/build/normalizeRootForFusion.js.map +1 -1
  17. package/src/executors/build/schema.d.ts +1 -1
  18. package/src/executors/build/schema.json +1 -2
  19. package/src/executors/component-test/executor.d.ts +2 -2
  20. package/src/executors/component-test/executor.js +9 -2
  21. package/src/executors/component-test/executor.js.map +1 -1
  22. package/src/executors/create-vite-config.d.ts +1 -1
  23. package/src/executors/create-vite-config.js +8 -11
  24. package/src/executors/create-vite-config.js.map +1 -1
  25. package/src/executors/executor-context.d.ts +1 -1
  26. package/src/executors/lint/biome.d.ts +3 -0
  27. package/src/executors/lint/biome.js +18 -0
  28. package/src/executors/lint/biome.js.map +1 -0
  29. package/src/executors/lint/boundaries.d.ts +14 -0
  30. package/src/executors/lint/boundaries.js +41 -0
  31. package/src/executors/lint/boundaries.js.map +1 -0
  32. package/src/executors/lint/executor.d.ts +5 -0
  33. package/src/executors/lint/executor.js +65 -0
  34. package/src/executors/lint/executor.js.map +1 -0
  35. package/src/executors/lint/schema.d.ts +7 -0
  36. package/src/executors/lint/schema.json +37 -0
  37. package/src/executors/publish/environment.d.ts +0 -1
  38. package/src/executors/publish/executor.d.ts +2 -2
  39. package/src/executors/publish/manifest-model.d.ts +1 -1
  40. package/src/executors/publish/publish-script.js +2 -2
  41. package/src/executors/publish/publish-script.js.map +1 -1
  42. package/src/executors/publish/readme.md +5 -5
  43. package/src/executors/publish/schema.d.ts +1 -1
  44. package/src/executors/serve/executor.d.ts +2 -2
  45. package/src/executors/serve/get-manifest.d.ts +1 -1
  46. package/src/executors/serve/get-manifest.js +1 -1
  47. package/src/executors/serve/get-manifest.js.map +1 -1
  48. package/src/executors/serve/readme.md +1 -1
  49. package/src/executors/serve/schema.json +1 -1
  50. package/src/executors/serve/server.d.ts +1 -1
  51. package/src/executors/serve/server.js +12 -12
  52. package/src/executors/serve/server.js.map +1 -1
  53. package/src/executors/utils/csp/csp-check-plugin.js.map +1 -1
  54. package/src/executors/utils/csp/extract-urls.js +4 -6
  55. package/src/executors/utils/csp/extract-urls.js.map +1 -1
  56. package/src/executors/utils/load-services.js.map +1 -1
  57. package/src/executors/utils/logger.d.ts +2 -2
  58. package/src/executors/utils/logger.js +6 -2
  59. package/src/executors/utils/logger.js.map +1 -1
  60. package/src/executors/utils/read-manifest.d.ts +1 -1
  61. package/src/executors/utils/read-manifest.js.map +1 -1
  62. package/src/executors/utils/verify-manifest.d.ts +1 -1
  63. package/src/generators/app/files/src/App.tsx.template +1 -1
  64. package/src/generators/app/files/src/config.ts.template +1 -2
  65. package/src/generators/app/files/src/index.ts.template +3 -5
  66. package/src/generators/app/files/vite.config.mts.template +1 -1
  67. package/src/generators/app/files/vite.config.ts.template +1 -1
  68. package/src/generators/app/files-routing/src/routes.ts.template +1 -1
  69. package/src/generators/app/generator.d.ts +3 -3
  70. package/src/generators/app/generator.js +5 -3
  71. package/src/generators/app/generator.js.map +1 -1
  72. package/src/generators/app/readme.md +1 -1
  73. package/src/generators/app/schema.json +5 -35
  74. package/src/generators/component-test/generator.d.ts +2 -2
  75. package/src/generators/lint-setup/generator.d.ts +6 -0
  76. package/src/generators/lint-setup/generator.js +115 -0
  77. package/src/generators/lint-setup/generator.js.map +1 -0
  78. package/src/generators/lint-setup/schema.d.ts +5 -0
  79. package/src/generators/lint-setup/schema.json +27 -0
  80. package/src/generators/preset/generator.d.ts +2 -2
  81. package/src/generators/preset/schema.json +4 -32
  82. package/src/generators/skill/files/roma-app-development/generators.md +17 -8
  83. package/src/generators/skill/generator.d.ts +2 -2
  84. package/src/generators/skill/generator.js.map +1 -1
  85. package/src/migrations/add-publish-target/add-publish-target.d.ts +1 -1
  86. package/src/migrations/add-publish-target/add-publish-target.js.map +1 -1
  87. package/src/migrations/migrate-fusion-manifest/migrate-fusion-manifest.d.ts +1 -1
  88. package/src/migrations/migrate-fusion-manifest/migrate-fusion-manifest.js.map +1 -1
  89. package/src/migrations/migrate-fusion-manifest/old-format.json +1 -3
  90. package/src/migrations/migrate-fusion-manifest/update-manifest.d.ts +3 -3
  91. package/src/migrations/migrate-fusion-manifest/update-manifest.js.map +1 -1
  92. package/src/migrations/migrate-fusion-router/detect.d.ts +1 -1
  93. package/src/migrations/migrate-fusion-router/detect.js.map +1 -1
  94. package/src/migrations/migrate-fusion-router/ensure-default-exports.d.ts +1 -1
  95. package/src/migrations/migrate-fusion-router/ensure-default-exports.js.map +1 -1
  96. package/src/migrations/migrate-fusion-router/generate-routes-file.d.ts +1 -1
  97. package/src/migrations/migrate-fusion-router/generate-routes-file.js +12 -4
  98. package/src/migrations/migrate-fusion-router/generate-routes-file.js.map +1 -1
  99. package/src/migrations/migrate-fusion-router/migrate-fusion-router.d.ts +1 -1
  100. package/src/migrations/migrate-fusion-router/migrate-fusion-router.js +9 -4
  101. package/src/migrations/migrate-fusion-router/migrate-fusion-router.js.map +1 -1
  102. package/src/migrations/migrate-fusion-router/transform-app.js +27 -13
  103. package/src/migrations/migrate-fusion-router/transform-app.js.map +1 -1
  104. package/src/migrations/migrate-fusion-router/update-vite-config.js.map +1 -1
  105. package/src/migrations/migrate-global-navigation/migrate-global-navigation.d.ts +1 -1
  106. package/src/migrations/migrate-global-navigation/migrate-global-navigation.js.map +1 -1
  107. package/src/migrations/migrate-to-biome/migrate-to-biome.d.ts +2 -0
  108. package/src/migrations/migrate-to-biome/migrate-to-biome.js +19 -0
  109. package/src/migrations/migrate-to-biome/migrate-to-biome.js.map +1 -0
  110. package/src/migrations/move-fusion-manifest/move-fusion-manifest.d.ts +1 -1
  111. package/src/migrations/move-fusion-manifest/move-fusion-manifest.js +0 -1
  112. package/src/migrations/move-fusion-manifest/move-fusion-manifest.js.map +1 -1
  113. package/src/migrations/remove-fusion-cli/remove-fusion-cli.d.ts +1 -1
  114. package/src/migrations/remove-fusion-cli/remove-fusion-cli.js +0 -1
  115. package/src/migrations/remove-fusion-cli/remove-fusion-cli.js.map +1 -1
  116. package/src/migrations/swap-eds-to-roma-ui/swap-eds-to-roma-ui.d.ts +1 -1
  117. package/src/migrations/update-acquire-access-token/README.md +2 -1
  118. package/src/migrations/update-acquire-access-token/update-acquire-access-token.d.ts +1 -1
  119. package/src/generators/app/files/eslint.config.js.template +0 -105
package/README.md CHANGED
@@ -40,3 +40,8 @@ nx run roma:generate-csp
40
40
  The check is disabled automatically (no warnings) if the bundled snapshot is missing or
41
41
  unparseable.
42
42
 
43
+ ## Linting
44
+
45
+ The `lint` executor runs the pinned Biome version with `biome-baseline.json` and checks tag-based module
46
+ boundaries. `nx g @equinor/roma-nx-plugin:lint-setup --all` migrates projects from ESLint, and the
47
+ `migrate-to-biome` migration (v7) does the same automatically. Docs: roma-docs → Nx Plugin → Linting.
@@ -0,0 +1,95 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/2.6.9/schema.json",
3
+ "root": true,
4
+ "files": {
5
+ "ignoreUnknown": true,
6
+ "includes": [
7
+ "**",
8
+ "!**/dist",
9
+ "!**/node_modules",
10
+ "!**/coverage",
11
+ "!**/*.timestamp*",
12
+ "!**/*.md",
13
+ "!**/*.mdx",
14
+ "!**/*.yml",
15
+ "!**/*.yaml",
16
+ "!**/.nx",
17
+ "!**/out-tsc",
18
+ "!**/tmp"
19
+ ]
20
+ },
21
+ "formatter": {
22
+ "enabled": true,
23
+ "indentStyle": "space",
24
+ "indentWidth": 2,
25
+ "lineWidth": 80,
26
+ "lineEnding": "lf"
27
+ },
28
+ "javascript": {
29
+ "formatter": {
30
+ "quoteStyle": "single",
31
+ "jsxQuoteStyle": "double",
32
+ "trailingCommas": "es5",
33
+ "semicolons": "always"
34
+ }
35
+ },
36
+ "assist": {
37
+ "enabled": true,
38
+ "actions": {
39
+ "source": {
40
+ "organizeImports": "on"
41
+ }
42
+ }
43
+ },
44
+ "linter": {
45
+ "enabled": true,
46
+ "rules": {
47
+ "preset": "recommended",
48
+ "suspicious": {
49
+ "noExplicitAny": "warn",
50
+ "noArrayIndexKey": "error"
51
+ },
52
+ "style": {
53
+ "useConsistentTypeDefinitions": {
54
+ "level": "warn",
55
+ "options": {
56
+ "style": "type"
57
+ }
58
+ },
59
+ "useConsistentArrayType": {
60
+ "level": "warn",
61
+ "options": {
62
+ "syntax": "generic"
63
+ }
64
+ }
65
+ },
66
+ "correctness": {
67
+ "useExhaustiveDependencies": "error",
68
+ "useHookAtTopLevel": "error"
69
+ }
70
+ }
71
+ },
72
+ "overrides": [
73
+ {
74
+ "includes": [
75
+ "**/*.spec.ts",
76
+ "**/*.spec.tsx",
77
+ "**/*.test.ts",
78
+ "**/*.test.tsx",
79
+ "**/*.cy.ts",
80
+ "**/*.cy.tsx"
81
+ ],
82
+ "linter": {
83
+ "rules": {
84
+ "a11y": "off",
85
+ "suspicious": {
86
+ "noExplicitAny": "off"
87
+ },
88
+ "correctness": {
89
+ "noComponentHookFactories": "off"
90
+ }
91
+ }
92
+ }
93
+ }
94
+ ]
95
+ }
package/executors.json CHANGED
@@ -19,6 +19,11 @@
19
19
  "implementation": "./src/executors/component-test/executor",
20
20
  "schema": "./src/executors/component-test/schema.json",
21
21
  "description": "Run cypress component tests"
22
+ },
23
+ "lint": {
24
+ "implementation": "./src/executors/lint/executor",
25
+ "schema": "./src/executors/lint/schema.json",
26
+ "description": "Lint and format-check a project with the Roma Biome baseline and check module boundaries"
22
27
  }
23
28
  }
24
29
  }
package/generators.json CHANGED
@@ -20,6 +20,11 @@
20
20
  "factory": "./src/generators/skill/generator",
21
21
  "schema": "./src/generators/skill/schema.json",
22
22
  "description": "Add the Roma development skill for AI assistants"
23
+ },
24
+ "lint-setup": {
25
+ "factory": "./src/generators/lint-setup/generator",
26
+ "schema": "./src/generators/lint-setup/schema.json",
27
+ "description": "Switch projects from ESLint to the Roma Biome lint executor"
23
28
  }
24
29
  }
25
30
  }
package/migrations.json CHANGED
@@ -39,6 +39,11 @@
39
39
  "version": "6.3.0-beta.0",
40
40
  "description": "Swap @equinor/eds-core-react imports and dependency for @equinor/roma-ui",
41
41
  "implementation": "./src/migrations/swap-eds-to-roma-ui/swap-eds-to-roma-ui"
42
+ },
43
+ "migrate-to-biome": {
44
+ "version": "7.0.0",
45
+ "description": "Replace ESLint with the Roma Biome lint executor (@equinor/roma-nx-plugin:lint)",
46
+ "implementation": "./src/migrations/migrate-to-biome/migrate-to-biome"
42
47
  }
43
48
  },
44
49
  "packageJsonUpdates": {
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@equinor/roma-nx-plugin",
3
3
  "private": false,
4
- "version": "6.3.0",
4
+ "version": "6.4.1",
5
5
  "repository": "https://github.com/equinor/tops-roma",
6
6
  "dependencies": {
7
7
  "@azure/identity": "^4.14.1",
8
+ "@biomejs/biome": "2.6.9",
8
9
  "@equinor/fusion-framework-module-app": "8.3.0",
9
10
  "@equinor/roma-framework": "6.2.0",
10
11
  "@nx/devkit": "^22.7.12",
11
12
  "@nx/react": "^22.7.12",
12
13
  "@vitejs/plugin-react": "^6.3.0",
13
- "cypress": "^15.21.2",
14
14
  "esbuild": "0.27.7",
15
15
  "express": "^4.22.3",
16
16
  "get-port": "^7.2.0",
@@ -28,8 +28,14 @@
28
28
  "@nx/devkit": "^22.0.3",
29
29
  "@nx/react": "^22.0.3",
30
30
  "@nx/vite": "^22.0.3",
31
+ "cypress": "^15.0.0",
31
32
  "nx": "^22.0.3"
32
33
  },
34
+ "peerDependenciesMeta": {
35
+ "cypress": {
36
+ "optional": true
37
+ }
38
+ },
33
39
  "devDependencies": {
34
40
  "@types/express": "^4.17.25"
35
41
  },
@@ -1,4 +1,4 @@
1
- import { ExecutorContext } from '@nx/devkit';
1
+ import type { ExecutorContext } from '@nx/devkit';
2
2
  export default function (context: ExecutorContext, watch?: boolean): Promise<{
3
3
  success: boolean;
4
4
  }>;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = default_1;
4
- const create_vite_config_1 = require("../create-vite-config");
5
- const vite_1 = require("vite");
6
4
  const node_fs_1 = require("node:fs");
7
5
  const node_path_1 = require("node:path");
8
6
  const path_1 = require("path");
9
- const logger_1 = require("../utils/logger");
7
+ const vite_1 = require("vite");
8
+ const create_vite_config_1 = require("../create-vite-config");
10
9
  const get_vite_config_1 = require("../utils/get-vite-config");
10
+ const logger_1 = require("../utils/logger");
11
11
  const read_manifest_1 = require("../utils/read-manifest");
12
12
  const logger = new logger_1.Logger();
13
13
  async function default_1(context, watch = false) {
@@ -1 +1 @@
1
- {"version":3,"file":"build.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/build/build.ts"],"names":[],"mappings":";;AAaA,4BA0CC;AAvDD,8DAA6D;AAC7D,+BAAiD;AACjD,qCAAwC;AACxC,yCAAiC;AAEjC,+BAA+B;AAE/B,4CAAyC;AACzC,8DAAyD;AACzD,0DAAsD;AAEtD,MAAM,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;AAEb,KAAK,oBAClB,OAAwB,EACxB,KAAK,GAAG,KAAK;IAEb,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IACxC,MAAM,OAAO,GAAG,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACrE,MAAM,IAAI,GAAG,IAAA,cAAO,EAAC,OAAO,CAA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,EAAE,EAAE;YAC5C,MAAM,QAAQ,GAAG,IAAA,4BAAY,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC3C,IAAA,uBAAa,EACX,IAAA,gBAAI,EAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,eAAe,CAAC,EAC1C,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,EACjC,MAAM,CACP,CAAC;YACF,OAAO,CAA6B,CAAC;QACvC,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,IAAI,KAAK,EAAE,CAAC;gBACV,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC3C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;oBACtB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;oBAC9B,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC7B,CAAC,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACZ,MAAM,CAAC,KAAK,CAAC,mBAAmB,WAAW,GAAG,CAAC,CAAC;QAChD,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACjB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC"}
@@ -1,5 +1,5 @@
1
- import { BuildExecutorSchema } from './schema';
2
1
  import type { ExecutorContext } from '@nx/devkit';
2
+ import type { BuildExecutorSchema } from './schema';
3
3
  export default function runExecutor(options: BuildExecutorSchema, context: ExecutorContext): Promise<{
4
4
  success: boolean;
5
5
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/build/executor.ts"],"names":[],"mappings":";;AAIA,8BAKC;;AAPD,4DAA4B;AAEb,KAAK,UAAU,WAAW,CACvC,OAA4B,EAC5B,OAAwB;IAExB,OAAO,IAAA,eAAK,EAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;AACvC,CAAC"}
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/build/executor.ts"],"names":[],"mappings":";;AAIA,8BAKC;;AARD,4DAA4B;AAGb,KAAK,UAAU,WAAW,CACvC,OAA4B,EAC5B,OAAwB;IAExB,OAAO,IAAA,eAAK,EAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;AACvC,CAAC"}
@@ -1,2 +1,2 @@
1
- import { Plugin } from 'vite';
1
+ import type { Plugin } from 'vite';
2
2
  export declare function minifyEs(): Plugin;
@@ -1 +1 @@
1
- {"version":3,"file":"minify.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/build/minify.ts"],"names":[],"mappings":";;AAGA,4BAsBC;AAxBD,qCAAoC;AAEpC,SAAgB,QAAQ;IACtB,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE;YACX,KAAK,EAAE,MAAM;YACb,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,aAAa;gBACtC,IAAI,aAAa,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;oBAClC,MAAM,SAAS,GAAG,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC;oBAC5C,MAAM,MAAM,GAAG,MAAM,IAAA,mBAAS,EAAC,IAAI,EAAE;wBACnC,gBAAgB,EAAE,IAAI;wBACtB,YAAY,EAAE,IAAI;wBAClB,SAAS;qBACV,CAAC,CAAC;oBACH,OAAO;wBACL,IAAI,EAAE,MAAM,CAAC,IAAI;wBACjB,GAAG,EAAE,SAAS,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI;qBACjD,CAAC;gBACJ,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC;SACF;KACQ,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"minify.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/build/minify.ts"],"names":[],"mappings":";;AAGA,4BAsBC;AAzBD,qCAAoC;AAGpC,SAAgB,QAAQ;IACtB,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE;YACX,KAAK,EAAE,MAAM;YACb,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,aAAa;gBACtC,IAAI,aAAa,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;oBAClC,MAAM,SAAS,GAAG,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC;oBAC5C,MAAM,MAAM,GAAG,MAAM,IAAA,mBAAS,EAAC,IAAI,EAAE;wBACnC,gBAAgB,EAAE,IAAI;wBACtB,YAAY,EAAE,IAAI;wBAClB,SAAS;qBACV,CAAC,CAAC;oBACH,OAAO;wBACL,IAAI,EAAE,MAAM,CAAC,IAAI;wBACjB,GAAG,EAAE,SAAS,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI;qBACjD,CAAC;gBACJ,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC;SACF;KACQ,CAAC;AACd,CAAC"}
@@ -1,2 +1,2 @@
1
- import { Plugin } from 'vite';
1
+ import { type Plugin } from 'vite';
2
2
  export declare const normalizeRootForFusionRouter: Plugin;
@@ -1 +1 @@
1
- {"version":3,"file":"normalizeRootForFusion.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/build/normalizeRootForFusion.ts"],"names":[],"mappings":";;;AAAA,+BAA6C;AAEhC,QAAA,4BAA4B,GAAW;IAClD,IAAI,EAAE,kCAAkC;IACxC,OAAO,EAAE,KAAK;IACd,MAAM,CAAC,MAAM;QACX,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACpC,OAAO,EAAE,IAAI,EAAE,IAAA,oBAAa,EAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,CAAC;IACH,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"normalizeRootForFusion.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/build/normalizeRootForFusion.ts"],"names":[],"mappings":";;;AAAA,+BAAkD;AAErC,QAAA,4BAA4B,GAAW;IAClD,IAAI,EAAE,kCAAkC;IACxC,OAAO,EAAE,KAAK;IACd,MAAM,CAAC,MAAM;QACX,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACpC,OAAO,EAAE,IAAI,EAAE,IAAA,oBAAa,EAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,CAAC;IACH,CAAC;CACF,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export type BuildExecutorSchema = {
2
2
  watch?: boolean;
3
- }
3
+ };
@@ -4,7 +4,6 @@
4
4
  "title": "Build executor",
5
5
  "description": "",
6
6
  "type": "object",
7
- "properties": {
8
- },
7
+ "properties": {},
9
8
  "required": []
10
9
  }
@@ -1,4 +1,4 @@
1
- import { PromiseExecutor } from '@nx/devkit';
2
- import { ComponentTestExecutorSchema } from './schema';
1
+ import type { PromiseExecutor } from '@nx/devkit';
2
+ import type { ComponentTestExecutorSchema } from './schema';
3
3
  declare const runExecutor: PromiseExecutor<ComponentTestExecutorSchema>;
4
4
  export default runExecutor;
@@ -1,12 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const path_1 = require("path");
5
4
  const node_child_process_1 = require("node:child_process");
6
5
  const node_util_1 = require("node:util");
6
+ const path_1 = require("path");
7
7
  const exec = (0, node_util_1.promisify)(node_child_process_1.exec);
8
8
  const runExecutor = async (options, context) => {
9
- const cypress = await Promise.resolve().then(() => tslib_1.__importStar(require('cypress')));
9
+ let cypress;
10
+ try {
11
+ cypress = await Promise.resolve().then(() => tslib_1.__importStar(require('cypress')));
12
+ }
13
+ catch (_a) {
14
+ console.error('Cypress is not installed. Run the @equinor/roma-nx-plugin:component-test generator or add "cypress" to your devDependencies.');
15
+ return { success: false };
16
+ }
10
17
  const { projectName, projectsConfigurations, root } = context;
11
18
  const workdir = (0, path_1.join)(root, projectsConfigurations.projects[projectName].root);
12
19
  let success = true;
@@ -1 +1 @@
1
- {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/component-test/executor.ts"],"names":[],"mappings":";;;AAGA,+BAA4B;AAC5B,2DAAoD;AACpD,yCAAsC;AAGtC,MAAM,IAAI,GAAG,IAAA,qBAAS,EAAC,yBAAM,CAAC,CAAC;AAE/B,MAAM,WAAW,GAAiD,KAAK,EACrE,OAAO,EACP,OAAO,EACP,EAAE;IACF,MAAM,OAAO,GAAG,gEAAa,SAAS,GAAC,CAAC;IACxC,MAAM,EAAE,WAAW,EAAE,sBAAsB,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IAC9D,MAAM,OAAO,GAAG,IAAA,WAAI,EAAC,IAAI,EAAE,sBAAsB,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;IAC9E,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,MAAM,MAAM,GAAG;QACb,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,WAAW,EAAE,WAAoB;KAClC,CAAC;IACF,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK;YAClC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;YACtB,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;QACzB,IAAI,OAAO,IAAI,UAAU,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,GAAG,CAAC;YAC1D,OAAO,GAAG,KAAK,CAAC;QAClB,IAAI,OAAO,IAAI,MAAM,IAAI,OAAO,EAAE,CAAC;YACjC,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;gBACtC,qFAAqF;gBACrF,MAAM,KAA2B,GAAG,CAAC,aAAa,EAA5C,EAAE,KAAK,EAAE,GAAG,OAAgC,EAA3B,KAAK,sBAAtB,gBAAwB,CAAoB,CAAC;gBACnD,uBACE,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,IAChB,KAAK,EACR;YACJ,CAAC,CAAC,CAAC;YACH,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,GAAG,KAAK,CAAC;IAClB,CAAC;IACD,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACvB,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,wCAAwC,CAAC,CAAC;QAC/D,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;IACD,OAAO,CAAC,GAAG,CACT,OAAO;QACL,CAAC,CAAC,kCAAkC;QACpC,CAAC,CAAC,+BAA+B,CACpC,CAAC;IACF,OAAO;QACL,OAAO;KACR,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/component-test/executor.ts"],"names":[],"mappings":";;;AAAA,2DAAoD;AACpD,yC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KAAK,EAAE,GAAG,OAAgC,EAA3B,KAAK,sBAAtB,gBAAwB,CAAoB,CAAC;gBACnD,uBACE,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,IAChB,KAAK,EACR;YACJ,CAAC,CAAC,CAAC;YACH,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,GAAG,KAAK,CAAC;IAClB,CAAC;IACD,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACvB,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,wCAAwC,CAAC,CAAC;QAC/D,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;IACD,OAAO,CAAC,GAAG,CACT,OAAO;QACL,CAAC,CAAC,kCAAkC;QACpC,CAAC,CAAC,+BAA+B,CACpC,CAAC;IACF,OAAO;QACL,OAAO;KACR,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC"}
@@ -1,3 +1,3 @@
1
- import { UserConfig } from 'vite';
2
1
  import type { ExecutorContext } from '@nx/devkit';
2
+ import { type UserConfig } from 'vite';
3
3
  export declare const createRomaViteConfig: (config: UserConfig, context: ExecutorContext, watch?: boolean, hmrPort?: number) => Promise<UserConfig>;
@@ -2,19 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createRomaViteConfig = void 0;
4
4
  const tslib_1 = require("tslib");
5
- /* eslint-disable @typescript-eslint/ban-ts-comment */
5
+ const nx_tsconfig_paths_plugin_1 = require("@nx/vite/plugins/nx-tsconfig-paths.plugin");
6
+ const plugin_react_1 = tslib_1.__importDefault(require("@vitejs/plugin-react"));
7
+ const path_1 = require("path");
6
8
  const vite_1 = require("vite");
9
+ const vite_plugin_checker_1 = tslib_1.__importDefault(require("vite-plugin-checker"));
7
10
  const vite_plugin_environment_1 = tslib_1.__importDefault(require("vite-plugin-environment"));
8
- const path_1 = require("path");
9
- const plugin_react_1 = tslib_1.__importDefault(require("@vitejs/plugin-react"));
10
- const logger_1 = require("./utils/logger");
11
- const nx_tsconfig_paths_plugin_1 = require("@nx/vite/plugins/nx-tsconfig-paths.plugin");
12
11
  const minify_1 = require("./build/minify");
13
- const vite_plugin_checker_1 = tslib_1.__importDefault(require("vite-plugin-checker"));
14
- const get_version_1 = require("./utils/get-version");
15
12
  const normalizeRootForFusion_1 = require("./build/normalizeRootForFusion");
16
- const parse_csp_1 = require("./utils/csp/parse-csp");
17
13
  const csp_check_plugin_1 = require("./utils/csp/csp-check-plugin");
14
+ const parse_csp_1 = require("./utils/csp/parse-csp");
15
+ const get_version_1 = require("./utils/get-version");
16
+ const logger_1 = require("./utils/logger");
18
17
  const createRomaViteConfig = async (config, context, watch = false, hmrPort = 42000) => {
19
18
  var _a;
20
19
  const isServe = context.targetName === 'serve';
@@ -90,9 +89,7 @@ const createRomaViteConfig = async (config, context, watch = false, hmrPort = 42
90
89
  plugins.push((0, minify_1.minifyEs)());
91
90
  }
92
91
  if (options.typeCheck) {
93
- plugins.push(
94
- // @ts-ignore
95
- (0, vite_plugin_checker_1.default)({
92
+ plugins.push((0, vite_plugin_checker_1.default)({
96
93
  typescript: {
97
94
  root: (0, path_1.resolve)(context.root, project.root),
98
95
  tsconfigPath: 'tsconfig.app.json',
@@ -1 +1 @@
1
- {"version":3,"file":"create-vite-config.js","sourceRoot":"","sources":["../../../../../plugins/roma/src/executors/create-vite-config.ts"],"names":[],"mappings":";;;;AAAA,sDAAsD;AACtD,+BAMc;AACd,8FAA8C;AAC9C,+BAAqC;AACrC,gFAAyC;AACzC,2CAAwC;AAGxC,wFAA0E;AAC1E,2CAA0C;AAE1C,sFAA0C;AAC1C,qDAAiD;AACjD,2EAA8E;AAC9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AY,EAAE,IAAI,eAAM,EAAE;QAC1B,QAAQ,EAAE,IAAA,cAAO,EACf,OAAO,CAAC,IAAI,EACZ,cAAc,EACd,OAAO,EACP,OAAO,CAAC,WAAW,CACpB;QACD,aAAa,EAAE,CAAC,GAAG,aAAa,wBAAwB,CAAC;QACzD,IAAI,EAAE,IAAI;QACV,MAAM,EAAE;YACN,cAAc,EAAE,IAAI;YACpB,GAAG,EAAE;gBACH,IAAI,EAAE,OAAO;aACd;SACF;QACD,OAAO,EAAE,QAAQ;QACjB,MAAM,EAAE;YACN,0BAA0B,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YACnD,aAAa,EAAE,EAAE;SAClB;QACD,KAAK,EAAE;YACL,MAAM,EAAE,IAAA,cAAO,EAAC,aAAa,EAAE,UAAU,CAAC;YAC1C,KAAK,EAAE,KAAK;gBACV,CAAC,CAAC;oBACE,WAAW,EAAE,IAAI;iBAClB;gBACH,CAAC,CAAC,SAAS;SACd;QACD,OAAO,EAAE;YACP,IAAA,sBAAK,GAAE;YACP,IAAA,wCAAa,GAAE;YACf,IAAA,iCAAO,EAAC;gBACN,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa;aAC/C,CAAC;YACF,GAAG,OAAO;SACX;KACY,CAAC;IAChB,OAAO,IAAA,mBAAY,EAAC,IAAA,kBAAW,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AACvD,CAAC,CAAC;AAjJW,QAAA,oBAAoB,wBAiJ/B"}
1
+ {"version":3,"file":"create-vite-config.js","sourceRoot":"","sources":["../../../../../plugins/roma/src/executors/create-vite-config.ts"],"names":[],"mappings":";;;;AACA,wFAA0E;AAC1E,gFAAyC;AAEzC,+BAAqC;AACrC,+BAMc;AACd,sFAA0C;AAC1C,8FAA8C;AAC9C,2CAA0C;AAC1C,2EAA8E;AAE9E,mEAAoE;AACpE,qDAA0D;AAC1D,qDAAiD;AACjD,2CAAwC;AAMjC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AAE,IAAA,cAAO,EACf,OAAO,CAAC,IAAI,EACZ,cAAc,EACd,OAAO,EACP,OAAO,CAAC,WAAW,CACpB;QACD,aAAa,EAAE,CAAC,GAAG,aAAa,wBAAwB,CAAC;QACzD,IAAI,EAAE,IAAI;QACV,MAAM,EAAE;YACN,cAAc,EAAE,IAAI;YACpB,GAAG,EAAE;gBACH,IAAI,EAAE,OAAO;aACd;SACF;QACD,OAAO,EAAE,QAAQ;QACjB,MAAM,EAAE;YACN,0BAA0B,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YACnD,aAAa,EAAE,EAAE;SAClB;QACD,KAAK,EAAE;YACL,MAAM,EAAE,IAAA,cAAO,EAAC,aAAa,EAAE,UAAU,CAAC;YAC1C,KAAK,EAAE,KAAK;gBACV,CAAC,CAAC;oBACE,WAAW,EAAE,IAAI;iBAClB;gBACH,CAAC,CAAC,SAAS;SACd;QACD,OAAO,EAAE;YACP,IAAA,sBAAK,GAAE;YACP,IAAA,wCAAa,GAAE;YACf,IAAA,iCAAO,EAAC;gBACN,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa;aAC/C,CAAC;YACF,GAAG,OAAO;SACX;KACY,CAAC;IAChB,OAAO,IAAA,mBAAY,EAAC,IAAA,kBAAW,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AACvD,CAAC,CAAC;AAhJW,QAAA,oBAAoB,wBAgJ/B"}
@@ -1,2 +1,2 @@
1
- import { ExecutorContext } from '@nx/devkit';
1
+ import type { ExecutorContext } from '@nx/devkit';
2
2
  export declare const executorContext: ExecutorContext;
@@ -0,0 +1,3 @@
1
+ export declare const BIOME_VERSION = "2.6.9";
2
+ export declare const BASELINE_CONFIG_PATH: string;
3
+ export declare function resolveBiomeBin(): string;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BASELINE_CONFIG_PATH = exports.BIOME_VERSION = void 0;
4
+ exports.resolveBiomeBin = resolveBiomeBin;
5
+ const node_module_1 = require("node:module");
6
+ const node_path_1 = require("node:path");
7
+ exports.BIOME_VERSION = '2.6.9';
8
+ // src/executors/lint -> plugin root (same layout in source and in dist/plugins/roma)
9
+ exports.BASELINE_CONFIG_PATH = (0, node_path_1.join)(__dirname, '..', '..', '..', 'biome-baseline.json');
10
+ function resolveBiomeBin() {
11
+ try {
12
+ return (0, node_module_1.createRequire)(__filename).resolve('@biomejs/biome/bin/biome');
13
+ }
14
+ catch (_a) {
15
+ throw new Error(`Could not resolve @biomejs/biome@${exports.BIOME_VERSION}. Reinstall @equinor/roma-nx-plugin so its dependencies are installed.`);
16
+ }
17
+ }
18
+ //# sourceMappingURL=biome.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biome.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/lint/biome.ts"],"names":[],"mappings":";;;AAcA,0CAQC;AAtBD,6CAA4C;AAC5C,yCAAiC;AAEpB,QAAA,aAAa,GAAG,OAAO,CAAC;AAErC,qFAAqF;AACxE,QAAA,oBAAoB,GAAG,IAAA,gBAAI,EACtC,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,qBAAqB,CACtB,CAAC;AAEF,SAAgB,eAAe;IAC7B,IAAI,CAAC;QACH,OAAO,IAAA,2BAAa,EAAC,UAAU,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACvE,CAAC;IAAC,WAAM,CAAC;QACP,MAAM,IAAI,KAAK,CACb,oCAAoC,qBAAa,wEAAwE,CAC1H,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { ProjectGraph } from '@nx/devkit';
2
+ export type DepConstraint = {
3
+ sourceTag: string;
4
+ onlyDependOnLibsWithTags: Array<string>;
5
+ };
6
+ export type BoundaryViolation = {
7
+ source: string;
8
+ sourceTags: Array<string>;
9
+ target: string;
10
+ targetTags: Array<string>;
11
+ constraint: DepConstraint;
12
+ };
13
+ export declare function checkBoundaries(projectName: string, graph: ProjectGraph, constraints: Array<DepConstraint>): Array<BoundaryViolation>;
14
+ export declare function formatViolation(violation: BoundaryViolation): string;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkBoundaries = checkBoundaries;
4
+ exports.formatViolation = formatViolation;
5
+ function checkBoundaries(projectName, graph, constraints) {
6
+ var _a;
7
+ if (constraints.length === 0)
8
+ return [];
9
+ const tagsOf = (name) => { var _a, _b; return (_b = (_a = graph.nodes[name]) === null || _a === void 0 ? void 0 : _a.data.tags) !== null && _b !== void 0 ? _b : []; };
10
+ const sourceTags = tagsOf(projectName);
11
+ const applicable = constraints.filter((c) => c.sourceTag === '*' || sourceTags.includes(c.sourceTag));
12
+ if (applicable.length === 0)
13
+ return [];
14
+ // npm packages live in graph.externalNodes, so `in graph.nodes` keeps only workspace projects
15
+ const targets = new Set(((_a = graph.dependencies[projectName]) !== null && _a !== void 0 ? _a : [])
16
+ .map((d) => d.target)
17
+ .filter((t) => t !== projectName && t in graph.nodes));
18
+ const violations = [];
19
+ for (const target of targets) {
20
+ const targetTags = tagsOf(target);
21
+ for (const constraint of applicable) {
22
+ const allowed = constraint.onlyDependOnLibsWithTags.some((tag) => tag === '*' || targetTags.includes(tag));
23
+ if (!allowed) {
24
+ violations.push({
25
+ source: projectName,
26
+ sourceTags,
27
+ target,
28
+ targetTags,
29
+ constraint,
30
+ });
31
+ }
32
+ }
33
+ }
34
+ return violations;
35
+ }
36
+ function formatViolation(violation) {
37
+ const tags = (t) => (t.length ? t.join(', ') : 'no tags');
38
+ const { source, sourceTags, target, targetTags, constraint } = violation;
39
+ return `✖ ${source} (${tags(sourceTags)}) → ${target} (${tags(targetTags)}) violates constraint for "${constraint.sourceTag}" (allowed: ${constraint.onlyDependOnLibsWithTags.join(', ')})`;
40
+ }
41
+ //# sourceMappingURL=boundaries.js.map
@@ -0,0 +1 @@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OAAO,GAAG,UAAU,CAAC,wBAAwB,CAAC,IAAI,CACtD,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CACjD,CAAC;YACF,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,UAAU,CAAC,IAAI,CAAC;oBACd,MAAM,EAAE,WAAW;oBACnB,UAAU;oBACV,MAAM;oBACN,UAAU;oBACV,UAAU;iBACX,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,SAAgB,eAAe,CAAC,SAA4B;IAC1D,MAAM,IAAI,GAAG,CAAC,CAAgB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACzE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,SAAS,CAAC;IACzE,OAAO,KAAK,MAAM,KAAK,IAAI,CAAC,UAAU,CAAC,OAAO,MAAM,KAAK,IAAI,CAAC,UAAU,CAAC,8BAA8B,UAAU,CAAC,SAAS,eAAe,UAAU,CAAC,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AAC9L,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type PromiseExecutor } from '@nx/devkit';
2
+ import type { LintExecutorSchema } from './schema';
3
+ export declare function hasBiomeConfig(workspaceRoot: string, projectRoot: string): boolean;
4
+ declare const runExecutor: PromiseExecutor<LintExecutorSchema>;
5
+ export default runExecutor;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hasBiomeConfig = hasBiomeConfig;
4
+ const node_child_process_1 = require("node:child_process");
5
+ const node_fs_1 = require("node:fs");
6
+ const node_path_1 = require("node:path");
7
+ const devkit_1 = require("@nx/devkit");
8
+ const biome_1 = require("./biome");
9
+ const boundaries_1 = require("./boundaries");
10
+ const CONFIG_FILES = ['biome.json', 'biome.jsonc'];
11
+ function hasBiomeConfig(workspaceRoot, projectRoot) {
12
+ const top = (0, node_path_1.resolve)(workspaceRoot);
13
+ let dir = (0, node_path_1.resolve)(workspaceRoot, projectRoot);
14
+ for (;;) {
15
+ if (CONFIG_FILES.some((file) => (0, node_fs_1.existsSync)((0, node_path_1.join)(dir, file))))
16
+ return true;
17
+ const parent = (0, node_path_1.dirname)(dir);
18
+ if (dir === top || parent === dir)
19
+ return false;
20
+ dir = parent;
21
+ }
22
+ }
23
+ function buildBiomeArgs(options, projectRoot, useBaseline) {
24
+ const args = options.fix ? ['check', '--write'] : ['ci'];
25
+ if (options.fix && options.unsafe)
26
+ args.push('--unsafe');
27
+ if (!options.fix && process.env.GITHUB_ACTIONS === 'true') {
28
+ args.push('--reporter=github');
29
+ }
30
+ if (useBaseline)
31
+ args.push(`--config-path=${biome_1.BASELINE_CONFIG_PATH}`);
32
+ args.push('--no-errors-on-unmatched', projectRoot);
33
+ return args;
34
+ }
35
+ const runExecutor = async (options, context) => {
36
+ var _a;
37
+ const projectName = context.projectName;
38
+ if (!projectName) {
39
+ devkit_1.logger.error('The Roma lint executor must run against a project.');
40
+ return { success: false };
41
+ }
42
+ const projectRoot = context.projectsConfigurations.projects[projectName].root;
43
+ let biomeBin;
44
+ try {
45
+ biomeBin = (0, biome_1.resolveBiomeBin)();
46
+ }
47
+ catch (error) {
48
+ devkit_1.logger.error(error.message);
49
+ return { success: false };
50
+ }
51
+ const args = buildBiomeArgs(options, projectRoot, !hasBiomeConfig(context.root, projectRoot));
52
+ const result = (0, node_child_process_1.spawnSync)(process.execPath, [biomeBin, ...args], {
53
+ cwd: context.root,
54
+ stdio: 'inherit',
55
+ });
56
+ if (result.error)
57
+ devkit_1.logger.error(result.error.message);
58
+ const biomePassed = result.status === 0;
59
+ const violations = (0, boundaries_1.checkBoundaries)(projectName, context.projectGraph, (_a = options.depConstraints) !== null && _a !== void 0 ? _a : []);
60
+ for (const violation of violations)
61
+ devkit_1.logger.error((0, boundaries_1.formatViolation)(violation));
62
+ return { success: biomePassed && violations.length === 0 };
63
+ };
64
+ exports.default = runExecutor;
65
+ //# sourceMappingURL=executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/lint/executor.ts"],"names":[],"mappings":";;AAUA,wCAYC;AAtBD,2DAA+C;AAC/C,qCAAqC;AACrC,yCAAmD;AACnD,uCAA0D;AAC1D,mCAAgE;AAChE,6CAAgE;AAGhE,MAAM,YAAY,GAAG,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;AAEnD,SAAgB,cAAc,CAC5B,aAAqB,EACrB,WAAmB;IAEnB,MAAM,GAAG,GAAG,IAAA,mBAAO,EAAC,aAAa,CAAC,CAAC;IACnC,IAAI,GAAG,GAAG,IAAA,mBAAO,EAAC,aAAa,EAAE,WAAW,CAAC,CAAC;IAC9C,SAAS,CAAC;QACR,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,oBAAU,EAAC,IAAA,gBAAI,EAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;QAC1E,MAAM,MAAM,GAAG,IAAA,mBAAO,EAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,GAAG,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG;YAAE,OAAO,KAAK,CAAC;QAChD,GAAG,GAAG,MAAM,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CACrB,OAA2B,EAC3B,WAAmB,EACnB,WAAoB;IAEpB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,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AAQ,EAAE,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,EAAE;QAC9D,GAAG,EAAE,OAAO,CAAC,IAAI;QACjB,KAAK,EAAE,SAAS;KACjB,CAAC,CAAC;IACH,IAAI,MAAM,CAAC,KAAK;QAAE,eAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrD,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC;IAExC,MAAM,UAAU,GAAG,IAAA,4BAAe,EAChC,WAAW,EACX,OAAO,CAAC,YAAY,EACpB,MAAA,OAAO,CAAC,cAAc,mCAAI,EAAE,CAC7B,CAAC;IACF,KAAK,MAAM,SAAS,IAAI,UAAU;QAAE,eAAM,CAAC,KAAK,CAAC,IAAA,4BAAe,EAAC,SAAS,CAAC,CAAC,CAAC;IAE7E,OAAO,EAAE,OAAO,EAAE,WAAW,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;AAC7D,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { DepConstraint } from './boundaries';
2
+
3
+ export type LintExecutorSchema = {
4
+ fix?: boolean;
5
+ unsafe?: boolean;
6
+ depConstraints?: Array<DepConstraint>;
7
+ };
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "https://json-schema.org/schema",
3
+ "version": 2,
4
+ "title": "Lint executor",
5
+ "description": "Lints and format-checks a project with the Roma Biome baseline, then checks tag-based module boundaries.",
6
+ "type": "object",
7
+ "properties": {
8
+ "fix": {
9
+ "type": "boolean",
10
+ "description": "Apply formatting, safe lint fixes and import organizing (biome check --write) instead of only checking.",
11
+ "default": false
12
+ },
13
+ "unsafe": {
14
+ "type": "boolean",
15
+ "description": "Together with fix, also apply unsafe fixes.",
16
+ "default": false
17
+ },
18
+ "depConstraints": {
19
+ "type": "array",
20
+ "description": "Tag constraints checked against the project's direct dependencies in the Nx project graph. Same semantics as @nx/enforce-module-boundaries depConstraints.",
21
+ "default": [],
22
+ "items": {
23
+ "type": "object",
24
+ "properties": {
25
+ "sourceTag": { "type": "string" },
26
+ "onlyDependOnLibsWithTags": {
27
+ "type": "array",
28
+ "items": { "type": "string" }
29
+ }
30
+ },
31
+ "required": ["sourceTag", "onlyDependOnLibsWithTags"],
32
+ "additionalProperties": false
33
+ }
34
+ }
35
+ },
36
+ "required": []
37
+ }
@@ -1,6 +1,5 @@
1
1
  declare global {
2
2
  namespace NodeJS {
3
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
4
3
  interface ProcessEnv {
5
4
  API_URL?: string;
6
5
  }
@@ -1,5 +1,5 @@
1
- import { ExecutorContext } from '@nx/devkit';
2
- import { PublishExecutorSchema } from './schema';
1
+ import type { ExecutorContext } from '@nx/devkit';
2
+ import type { PublishExecutorSchema } from './schema';
3
3
  export default function runExecutor(options: PublishExecutorSchema, context: ExecutorContext): Promise<{
4
4
  success: boolean;
5
5
  }>;
@@ -1,4 +1,4 @@
1
- import { AppManifest } from '@equinor/fusion-framework-module-app';
1
+ import type { AppManifest } from '@equinor/fusion-framework-module-app';
2
2
  export type Manifest = AppManifest & {
3
3
  categoryId: string;
4
4
  version?: {