@equinor/roma-nx-plugin 6.3.0 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +111 -256
- package/README.md +5 -0
- package/biome-baseline.json +95 -0
- package/executors.json +5 -0
- package/generators.json +5 -0
- package/migrations.json +5 -0
- package/package.json +2 -1
- package/src/executors/build/build.d.ts +1 -1
- package/src/executors/build/build.js +3 -3
- package/src/executors/build/build.js.map +1 -1
- package/src/executors/build/executor.d.ts +1 -1
- package/src/executors/build/executor.js.map +1 -1
- package/src/executors/build/minify.d.ts +1 -1
- package/src/executors/build/minify.js.map +1 -1
- package/src/executors/build/normalizeRootForFusion.d.ts +1 -1
- package/src/executors/build/normalizeRootForFusion.js.map +1 -1
- package/src/executors/build/schema.d.ts +1 -1
- package/src/executors/build/schema.json +1 -2
- package/src/executors/component-test/executor.d.ts +2 -2
- package/src/executors/component-test/executor.js +1 -1
- package/src/executors/component-test/executor.js.map +1 -1
- package/src/executors/create-vite-config.d.ts +1 -1
- package/src/executors/create-vite-config.js +8 -11
- package/src/executors/create-vite-config.js.map +1 -1
- package/src/executors/executor-context.d.ts +1 -1
- package/src/executors/lint/biome.d.ts +3 -0
- package/src/executors/lint/biome.js +18 -0
- package/src/executors/lint/biome.js.map +1 -0
- package/src/executors/lint/boundaries.d.ts +14 -0
- package/src/executors/lint/boundaries.js +41 -0
- package/src/executors/lint/boundaries.js.map +1 -0
- package/src/executors/lint/executor.d.ts +5 -0
- package/src/executors/lint/executor.js +65 -0
- package/src/executors/lint/executor.js.map +1 -0
- package/src/executors/lint/schema.d.ts +7 -0
- package/src/executors/lint/schema.json +37 -0
- package/src/executors/publish/environment.d.ts +0 -1
- package/src/executors/publish/executor.d.ts +2 -2
- package/src/executors/publish/manifest-model.d.ts +1 -1
- package/src/executors/publish/publish-script.js +2 -2
- package/src/executors/publish/publish-script.js.map +1 -1
- package/src/executors/publish/readme.md +5 -5
- package/src/executors/publish/schema.d.ts +1 -1
- package/src/executors/serve/executor.d.ts +2 -2
- package/src/executors/serve/get-manifest.d.ts +1 -1
- package/src/executors/serve/get-manifest.js +1 -1
- package/src/executors/serve/get-manifest.js.map +1 -1
- package/src/executors/serve/readme.md +1 -1
- package/src/executors/serve/schema.json +1 -1
- package/src/executors/serve/server.d.ts +1 -1
- package/src/executors/serve/server.js +12 -12
- package/src/executors/serve/server.js.map +1 -1
- package/src/executors/utils/csp/csp-check-plugin.js.map +1 -1
- package/src/executors/utils/csp/extract-urls.js +4 -6
- package/src/executors/utils/csp/extract-urls.js.map +1 -1
- package/src/executors/utils/load-services.js.map +1 -1
- package/src/executors/utils/logger.d.ts +2 -2
- package/src/executors/utils/logger.js +6 -2
- package/src/executors/utils/logger.js.map +1 -1
- package/src/executors/utils/read-manifest.d.ts +1 -1
- package/src/executors/utils/read-manifest.js.map +1 -1
- package/src/executors/utils/verify-manifest.d.ts +1 -1
- package/src/generators/app/files/src/App.tsx.template +1 -1
- package/src/generators/app/files/src/config.ts.template +1 -2
- package/src/generators/app/files/src/index.ts.template +3 -5
- package/src/generators/app/files/vite.config.mts.template +1 -1
- package/src/generators/app/files/vite.config.ts.template +1 -1
- package/src/generators/app/files-routing/src/routes.ts.template +1 -1
- package/src/generators/app/generator.d.ts +3 -3
- package/src/generators/app/generator.js +5 -3
- package/src/generators/app/generator.js.map +1 -1
- package/src/generators/app/readme.md +1 -1
- package/src/generators/app/schema.json +5 -35
- package/src/generators/component-test/generator.d.ts +2 -2
- package/src/generators/lint-setup/generator.d.ts +6 -0
- package/src/generators/lint-setup/generator.js +115 -0
- package/src/generators/lint-setup/generator.js.map +1 -0
- package/src/generators/lint-setup/schema.d.ts +5 -0
- package/src/generators/lint-setup/schema.json +27 -0
- package/src/generators/preset/generator.d.ts +2 -2
- package/src/generators/preset/schema.json +4 -32
- package/src/generators/skill/files/roma-app-development/generators.md +17 -8
- package/src/generators/skill/generator.d.ts +2 -2
- package/src/generators/skill/generator.js.map +1 -1
- package/src/migrations/add-publish-target/add-publish-target.d.ts +1 -1
- package/src/migrations/add-publish-target/add-publish-target.js.map +1 -1
- package/src/migrations/migrate-fusion-manifest/migrate-fusion-manifest.d.ts +1 -1
- package/src/migrations/migrate-fusion-manifest/migrate-fusion-manifest.js.map +1 -1
- package/src/migrations/migrate-fusion-manifest/old-format.json +1 -3
- package/src/migrations/migrate-fusion-manifest/update-manifest.d.ts +3 -3
- package/src/migrations/migrate-fusion-manifest/update-manifest.js.map +1 -1
- package/src/migrations/migrate-fusion-router/detect.d.ts +1 -1
- package/src/migrations/migrate-fusion-router/detect.js.map +1 -1
- package/src/migrations/migrate-fusion-router/ensure-default-exports.d.ts +1 -1
- package/src/migrations/migrate-fusion-router/ensure-default-exports.js.map +1 -1
- package/src/migrations/migrate-fusion-router/generate-routes-file.d.ts +1 -1
- package/src/migrations/migrate-fusion-router/generate-routes-file.js +12 -4
- package/src/migrations/migrate-fusion-router/generate-routes-file.js.map +1 -1
- package/src/migrations/migrate-fusion-router/migrate-fusion-router.d.ts +1 -1
- package/src/migrations/migrate-fusion-router/migrate-fusion-router.js +9 -4
- package/src/migrations/migrate-fusion-router/migrate-fusion-router.js.map +1 -1
- package/src/migrations/migrate-fusion-router/transform-app.js +27 -13
- package/src/migrations/migrate-fusion-router/transform-app.js.map +1 -1
- package/src/migrations/migrate-fusion-router/update-vite-config.js.map +1 -1
- package/src/migrations/migrate-global-navigation/migrate-global-navigation.d.ts +1 -1
- package/src/migrations/migrate-global-navigation/migrate-global-navigation.js.map +1 -1
- package/src/migrations/migrate-to-biome/migrate-to-biome.d.ts +2 -0
- package/src/migrations/migrate-to-biome/migrate-to-biome.js +19 -0
- package/src/migrations/migrate-to-biome/migrate-to-biome.js.map +1 -0
- package/src/migrations/move-fusion-manifest/move-fusion-manifest.d.ts +1 -1
- package/src/migrations/move-fusion-manifest/move-fusion-manifest.js +0 -1
- package/src/migrations/move-fusion-manifest/move-fusion-manifest.js.map +1 -1
- package/src/migrations/remove-fusion-cli/remove-fusion-cli.d.ts +1 -1
- package/src/migrations/remove-fusion-cli/remove-fusion-cli.js +0 -1
- package/src/migrations/remove-fusion-cli/remove-fusion-cli.js.map +1 -1
- package/src/migrations/swap-eds-to-roma-ui/swap-eds-to-roma-ui.d.ts +1 -1
- package/src/migrations/update-acquire-access-token/README.md +2 -1
- package/src/migrations/update-acquire-access-token/update-acquire-access-token.d.ts +1 -1
- package/src/generators/app/files/eslint.config.js.template +0 -105
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-script.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/publish/publish-script.ts"],"names":[],"mappings":";;;AAyKA,oCAoBC;AA7LD,+CAAqD;AACrD,yCAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"publish-script.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/publish/publish-script.ts"],"names":[],"mappings":";;;AAyKA,oCAoBC;AA7LD,+CAAqD;AACrD,yCAAqD;AACrD,yCAAsC;AACtC,yCAA2C;AAC3C,8CAAyD;AAIzD,MAAM,MAAM,GAAG,IAAA,qBAAS,EAAC,0BAAc,CAAC,CAAC;AAEzC;;;GAGG;AACH,IAAK,MAGJ;AAHD,WAAK,MAAM;IACT,yCAAO,CAAA;IACP,qCAAK,CAAA;AACP,CAAC,EAHI,MAAM,KAAN,MAAM,QAGV;AAeD;;GAEG;AACH,MAAM,SAAS,GAA2B;IACxC,GAAG,EAAE;QACH,OAAO,EAAE,6BAA6B;QACtC,aAAa,EAAE,IAAI;QACnB,SAAS,EAAE,CAAC,wCAAwC,CAAC;KACtD;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,8BAA8B;QACvC,aAAa,EAAE,IAAI;QACnB,SAAS,EAAE,CAAC,wCAAwC,CAAC;KACtD;IACD,EAAE,EAAE;QACF,OAAO,EAAE,4BAA4B;QACrC,aAAa,EAAE,IAAI;QACnB,SAAS,EAAE,CAAC,wCAAwC,CAAC;KACtD;IACD,UAAU,E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MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC,CAAC;IACzC,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,MAAM,CAAC,OAAO,iBAAiB,OAAO,SAAS,EAAE;QAC1E,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,KAAK,EAAE;SACjC;QACD,IAAI,EAAE,EAAE;KACT,CAAC,CAAC;IAEH,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;QACvB,OAAO,CAAC,IAAI,CACV,sGAAsG,CACvG,CAAC;QACF,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,GAAG,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC;QACrB,OAAO,CAAC,GAAG,CAAC,oCAAoC,OAAO,EAAE,CAAC,CAAC;QAC3D,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,gDAAgD,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;QAC5E,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;QAC7B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB,CAAC;AACH,CAAC"}
|
|
@@ -41,6 +41,7 @@ In addition to the application bundle (`app-bundle.js`) and manifest, the publis
|
|
|
41
41
|
Place static files in your app's `public/` directory. Vite automatically copies these to the build output during `nx build`. See [Vite's Static Asset Handling](https://vite.dev/guide/assets.html#the-public-directory) for details.
|
|
42
42
|
|
|
43
43
|
Example:
|
|
44
|
+
|
|
44
45
|
```
|
|
45
46
|
apps/applications/my-app/
|
|
46
47
|
├── public/
|
|
@@ -52,6 +53,7 @@ apps/applications/my-app/
|
|
|
52
53
|
```
|
|
53
54
|
|
|
54
55
|
After build, the output folder will contain:
|
|
56
|
+
|
|
55
57
|
```
|
|
56
58
|
dist/apps/my-app/
|
|
57
59
|
├── app-bundle.js (uploaded as bundle)
|
|
@@ -70,10 +72,7 @@ When assets are present, the publish executor adds a `metadata.assets` field to
|
|
|
70
72
|
```json
|
|
71
73
|
{
|
|
72
74
|
"metadata": {
|
|
73
|
-
"assets": [
|
|
74
|
-
"https://roma.equinor.com/cdn/applications/bundle/my-app/assets/logo.png?version=1716300000000",
|
|
75
|
-
"https://roma.equinor.com/cdn/applications/bundle/my-app/assets/app-bundle.css?version=1716300000000"
|
|
76
|
-
]
|
|
75
|
+
"assets": ["https://roma.equinor.com/cdn/applications/bundle/my-app/assets/logo.png?version=1716300000000", "https://roma.equinor.com/cdn/applications/bundle/my-app/assets/app-bundle.css?version=1716300000000"]
|
|
77
76
|
}
|
|
78
77
|
}
|
|
79
78
|
```
|
|
@@ -89,6 +88,7 @@ This script exports a default asynchronous function `runExecutor` which is what
|
|
|
89
88
|
The function reads the configuration of the project and builds the project to the specified output directory. It then reads the built application bundle and manifest and publishes the application to the specified environment using the Roma API.
|
|
90
89
|
|
|
91
90
|
The `publishApplication` function is responsible for publishing the application to the specified environment. It takes the following parameters:
|
|
91
|
+
|
|
92
92
|
- `pathToOutput`: The path to the output directory.
|
|
93
93
|
- `options`: The options for the publish operation.
|
|
94
94
|
|
|
@@ -102,4 +102,4 @@ The `uploadBundle` function uploads the brotli-compressed bundle to Azure Blob S
|
|
|
102
102
|
|
|
103
103
|
The `uploadAssets` function scans the output directory for additional files and uploads them (uncompressed) to the assets endpoint.
|
|
104
104
|
|
|
105
|
-
The `publishManifest` function publishes the application manifest to the Roma API.
|
|
105
|
+
The `publishManifest` function publishes the application manifest to the Roma API.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
import type { ServeExecutorSchema } from './schema';
|
|
3
3
|
export default function runExecutor(options: ServeExecutorSchema, context: ExecutorContext): Promise<unknown>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getManifest = getManifest;
|
|
4
|
-
const path_1 = require("path");
|
|
5
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const path_1 = require("path");
|
|
6
6
|
function getManifest(root) {
|
|
7
7
|
let manifest;
|
|
8
8
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-manifest.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/serve/get-manifest.ts"],"names":[],"mappings":";;AAIA,
|
|
1
|
+
{"version":3,"file":"get-manifest.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/serve/get-manifest.ts"],"names":[],"mappings":";;AAIA,kCAuBC;AA1BD,uCAA0C;AAC1C,+BAA4B;AAE5B,SAAgB,WAAW,CAAC,IAAY;IACtC,IAAI,QAAyC,CAAC;IAC9C,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,IAAA,qBAAY,EAAC,IAAA,WAAI,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC;QAC7D,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC;QACrC,IAAI,WAAW,EAAE,CAAC;YAChB,QAAQ,mCACH,WAAW,KACd,OAAO,EAAE,WAAW,CAAC,OAAO,GAC7B,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,QAAQ,GAAG,IAAA,qBAAY,EACrB,IAAA,WAAI,EAAC,IAAI,EAAE,sBAAsB,CAAC,CAGnC,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,WAAM,CAAC;QACP,QAAQ,GAAG,IAAA,qBAAY,EACrB,IAAA,WAAI,EAAC,IAAI,EAAE,sBAAsB,CAAC,CACA,CAAC;IACvC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -9,4 +9,4 @@ If a custom dev-portal is specified, it is used instead of the default one.
|
|
|
9
9
|
If the `--proxy` flag is set, the `portal` target is run.
|
|
10
10
|
Finally, the function sets up the path to the manifest file and removes unnecessary properties from the `context` object.
|
|
11
11
|
|
|
12
|
-
The function then runs the command using the `runCommands` function and returns a `Promise<void>`
|
|
12
|
+
The function then runs the command using the `runCommands` function and returns a `Promise<void>`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ServeExecutorSchema } from './schema';
|
|
2
1
|
import type { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
import type { ServeExecutorSchema } from './schema';
|
|
3
3
|
export declare function createServer({ port: requestedPort, devPortal, portal: portalTarget, open: shouldOpen, }: ServeExecutorSchema, context: ExecutorContext, additionalProjects?: Array<ServeExecutorSchema>): Promise<unknown>;
|
|
@@ -2,18 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createServer = createServer;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
const read_manifest_1 = require("../utils/read-manifest");
|
|
8
|
-
const open_1 = tslib_1.__importDefault(require("open"));
|
|
9
|
-
const get_port_1 = tslib_1.__importStar(require("get-port"));
|
|
10
|
-
const vite_1 = require("vite");
|
|
11
|
-
const path_1 = require("path");
|
|
12
5
|
const node_fs_1 = require("node:fs");
|
|
6
|
+
const get_port_1 = tslib_1.__importStar(require("get-port"));
|
|
13
7
|
const http_proxy_middleware_1 = require("http-proxy-middleware");
|
|
8
|
+
const open_1 = tslib_1.__importDefault(require("open"));
|
|
9
|
+
const path_1 = require("path");
|
|
10
|
+
const vite_1 = require("vite");
|
|
14
11
|
const create_vite_config_1 = require("../create-vite-config");
|
|
15
12
|
const get_vite_config_1 = require("../utils/get-vite-config");
|
|
16
13
|
const load_services_1 = require("../utils/load-services");
|
|
14
|
+
const read_manifest_1 = require("../utils/read-manifest");
|
|
17
15
|
const express = require('express');
|
|
18
16
|
const createProxyMiddleware = (options) => {
|
|
19
17
|
var _a;
|
|
@@ -49,11 +47,13 @@ async function createServer({ port: requestedPort = 3000, devPortal = 'node_modu
|
|
|
49
47
|
// Load Roma services
|
|
50
48
|
const services = await (0, load_services_1.loadServices)(portalTarget);
|
|
51
49
|
// Add proxy middleware for all roma-services
|
|
52
|
-
services.forEach((p) =>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
services.forEach((p) => {
|
|
51
|
+
app.use(p, createProxyMiddleware({
|
|
52
|
+
pathFilter: p,
|
|
53
|
+
target: portalTarget,
|
|
54
|
+
changeOrigin: true,
|
|
55
|
+
}));
|
|
56
|
+
});
|
|
57
57
|
// Range of port numbers for hmr, otherwise HMR won't work for multiple apps at the same time
|
|
58
58
|
const hmrPorts = (0, get_port_1.portNumbers)(40000, 45000);
|
|
59
59
|
const hmrPort = await (0, get_port_1.default)({ port: hmrPorts });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/serve/server.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/serve/server.ts"],"names":[],"mappings":";;AAoCA,oCA8QC;;AAlTD,qCAAuC;AAEvC,6DAAgD;AAEhD,iEAI+B;AAC/B,wDAAwB;AACxB,+BAAqC;AACrC,+BAIc;AACd,8DAA6D;AAC7D,8DAAyD;AACzD,0DAAsD;AACtD,0DAAsD;AAGtD,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAEnC,MAAM,qBAAqB,GAAG,CAI5B,OAAgD,EAChD,EAAE;;IACF,OAAO,CAAC,GAAG,CACT,mBAAmB,MAAA,OAAO,CAAC,IAAI,mCAAI,OAAO,CAAC,UAAU,OAAO,OAAO,CAAC,MAAM,EAAE,CAC7E,CAAC;IACF,OAAO,IAAA,6CAAsB,EAAC,OAAO,CAAC,CAAC;A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,GAAG,EAAE,GAAG,EAAE;KAC7B,CAAC,CACH,CAAC;IAEF,oBAAoB;IACpB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,GAAY,EAAE,GAAG,EAAE,EAAE;QACvC,MAAM,OAAO,GAAG,IAAA,sBAAY,EAAC,IAAA,WAAI,EAAC,aAAa,GAAG,aAAa,CAAC,EAAE,OAAO,CAAC,CAAC;QAC3E,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAC7D,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,2BAA2B;QAC3B,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE;YACpB,OAAO,CAAC,GAAG,CAAC,6CAA6C,IAAI,SAAS,CAAC,CAAC;YACxE,IAAI,UAAU,EAAE,CAAC;gBACf,OAAO,CAAC,GAAG,CACT,uDAAuD,IAAI,SAAS,WAAW,SAAS,CACzF,CAAC;gBACF,IAAA,cAAI,EAAC,oBAAoB,IAAI,SAAS,WAAW,EAAE,CAAC,CAAC;YACvD,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CACT,oDAAoD,IAAI,SAAS,WAAW,SAAS,CACtF,CAAC;YACJ,CAAC;QACH,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YACnB,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csp-check-plugin.js","sourceRoot":"","sources":["../../../../../../../plugins/roma/src/executors/utils/csp/csp-check-plugin.ts"],"names":[],"mappings":";;AAuEA,oDAiEC;
|
|
1
|
+
{"version":3,"file":"csp-check-plugin.js","sourceRoot":"","sources":["../../../../../../../plugins/roma/src/executors/utils/csp/csp-check-plugin.ts"],"names":[],"mappings":";;AAuEA,oDAiEC;AAvID,iDAAqD;AACrD,iDAIwB;AAwBxB,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;AAE5E,SAAS,UAAU,CAAC,MAAc;IAChC,IAAI,CAAC;QACH,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;IAChD,CAAC;IAAC,WAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,MAAc,EAAE,WAAwB;IAC3D,IAAI,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IACzC,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,IAAI,IAAI,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/C,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,gBAAgB,CAAC,EAAU;IAClC,IAAI,CAAC,EAAE;QAAE,OAAO,IAAI,CAAC;IACrB,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,CAAC,kBAAkB;IACxD,IAAI,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7C,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,eAAe,CAAC,CAAY;IACnC,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7C,OAAO,CACL,SAAS,CAAC,CAAC,MAAM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CAAC"}
|
|
@@ -26,13 +26,12 @@ function extractFromCss(code, sourceFile) {
|
|
|
26
26
|
const seen = new Set();
|
|
27
27
|
const importedUrls = new Set();
|
|
28
28
|
const importRe = /@import\s+(?:url\(\s*)?['"]?((?:https?):\/\/[^'")\s]+)/gi;
|
|
29
|
-
|
|
30
|
-
while ((m = importRe.exec(code)) !== null) {
|
|
29
|
+
for (const m of code.matchAll(importRe)) {
|
|
31
30
|
importedUrls.add(m[1]);
|
|
32
31
|
pushUsage(out, seen, m[1], 'style', sourceFile);
|
|
33
32
|
}
|
|
34
33
|
const urlRe = /url\(\s*['"]?((?:https?):\/\/[^'")\s]+)/gi;
|
|
35
|
-
|
|
34
|
+
for (const m of code.matchAll(urlRe)) {
|
|
36
35
|
const url = m[1];
|
|
37
36
|
if (importedUrls.has(url))
|
|
38
37
|
continue;
|
|
@@ -44,19 +43,18 @@ function extractFromCss(code, sourceFile) {
|
|
|
44
43
|
function extractFromScript(code, sourceFile) {
|
|
45
44
|
const out = [];
|
|
46
45
|
const seen = new Set();
|
|
47
|
-
let m;
|
|
48
46
|
const scriptPatterns = [
|
|
49
47
|
/\b(?:import|export)\b[^'";]*?\bfrom\s*['"](https?:\/\/[^'"]+)['"]/g,
|
|
50
48
|
/\bimport\s*\(\s*['"](https?:\/\/[^'"]+)['"]\s*\)/g,
|
|
51
49
|
/\bimport\s*['"](https?:\/\/[^'"]+)['"]/g,
|
|
52
50
|
];
|
|
53
51
|
for (const re of scriptPatterns) {
|
|
54
|
-
|
|
52
|
+
for (const m of code.matchAll(re)) {
|
|
55
53
|
pushUsage(out, seen, m[1], 'script', sourceFile);
|
|
56
54
|
}
|
|
57
55
|
}
|
|
58
56
|
const connectRe = /\b(?:fetch|EventSource|WebSocket)\s*\(\s*['"`]((?:https?|wss?):\/\/[^'"`]+)/g;
|
|
59
|
-
|
|
57
|
+
for (const m of code.matchAll(connectRe)) {
|
|
60
58
|
pushUsage(out, seen, m[1], 'connect', sourceFile);
|
|
61
59
|
}
|
|
62
60
|
return out;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-urls.js","sourceRoot":"","sources":["../../../../../../../plugins/roma/src/executors/utils/csp/extract-urls.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"extract-urls.js","sourceRoot":"","sources":["../../../../../../../plugins/roma/src/executors/utils/csp/extract-urls.ts"],"names":[],"mappings":";;AA4FA,kDAQC;AA3FD,MAAM,QAAQ,GAAG,oCAAoC,CAAC;AACtD,MAAM,SAAS,GAAG,oCAAoC,CAAC;AAEvD,SAAS,QAAQ,CAAC,GAAW;IAC3B,IAAI,CAAC;QACH,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,CAAC;IAAC,WAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAChB,GAA4B,EAC5B,IAAiB,EACjB,GAAW,EACX,QAAuB,EACvB,UAAkB;IAElB,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC7B,IAAI,CAAC,MAAM,IAAI,MAAM,KAAK,MAAM;QAAE,OAAO;IACzC,MAAM,GAAG,GAAG,GAAG,QAAQ,IAAI,GAAG,EAAE,CAAC;IACjC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;QAAE,OAAO;IAC1B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACd,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,cAAc,CACrB,IAAY,EACZ,UAAkB;IAElB,MAAM,GAAG,GAA4B,EAAE,CAAC;IACxC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,YAAY,GAAG,IAAI,GAAG,EAAU,CAAC;IAEvC,MAAM,QAAQ,GAAG,0DAA0D,CAAC;I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8E,CAAC;IACjF,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QACzC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IACpD,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;GAIG;AACH,SAAgB,mBAAmB,CACjC,IAAY,EACZ,UAAkB;IAElB,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,OAAO,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC;QAC9B,CAAC,CAAC,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC;QAClC,CAAC,CAAC,iBAAiB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-services.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/utils/load-services.ts"],"names":[],"mappings":";;AAOA,
|
|
1
|
+
{"version":3,"file":"load-services.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/utils/load-services.ts"],"names":[],"mappings":";;AAOA,oCAcC;AAnBD;;;;GAIG;AACI,KAAK,UAAU,YAAY,CAChC,YAAoB;IAEpB,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,YAAY,kCAAkC,CAAC,CAAC;IAC3E,MAAM,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAmB,CAAC;IACjD,OAAO,GAAG,CAAC,QAAQ;SAChB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;SAC7C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;SACnC,MAAM,CACL,CAAC,IAAI,EAAE,EAAE,CACP,IAAI,CAAC,MAAM,IAAI,CAAC;QAChB,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QAC1B,CAAC,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,CACnC,CAAC;AACN,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { RollupError } from 'rollup';
|
|
2
|
+
import type { LogErrorOptions, LogOptions, LogType } from 'vite';
|
|
3
3
|
type ILogger = {
|
|
4
4
|
info(msg: string, options?: LogOptions): void;
|
|
5
5
|
warn(msg: string, options?: LogOptions): void;
|
|
@@ -60,8 +60,12 @@ class Logger {
|
|
|
60
60
|
console.clear();
|
|
61
61
|
if (type === 'error')
|
|
62
62
|
console.log(`Console cleared: ${type}`);
|
|
63
|
-
this.warnings.forEach((warn) =>
|
|
64
|
-
|
|
63
|
+
this.warnings.forEach((warn) => {
|
|
64
|
+
this.warn(warn);
|
|
65
|
+
});
|
|
66
|
+
this.errors.forEach((err) => {
|
|
67
|
+
this.error(typeof err === 'string' ? err : err.message);
|
|
68
|
+
});
|
|
65
69
|
}
|
|
66
70
|
hasErrorLogged(error) {
|
|
67
71
|
return this.errors.has(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/utils/logger.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/utils/logger.ts"],"names":[],"mappings":";;;AAaA,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IACxB,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAChC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IACrC,MAAM,GAAG,GAAG,IAAI,CAAC,O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AC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;IACL,CAAC;IAED,cAAc,CAAC,KAA0B;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;CACF;AArDD,wBAqDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-manifest.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/utils/read-manifest.ts"],"names":[],"mappings":";;AAgBA,oCA0BC;AA1CD,yCAAiC;AACjC,uCAA0C;
|
|
1
|
+
{"version":3,"file":"read-manifest.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/utils/read-manifest.ts"],"names":[],"mappings":";;AAgBA,oCA0BC;AA1CD,yCAAiC;AACjC,uCAA0C;AAE1C,mCAA8C;AAE9C,uDAAmD;AAEnD,MAAM,gBAAgB,GAAG,CAAC,OAAe,EAAE,EAAE;IAC3C,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAA,cAAW,EAAC,OAAO,CAAC,CAAC;IACrD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AACjC,CAAC,CAAC;AAEF;;;GAGG;AACH,SAAgB,YAAY,CAAC,WAAmB;;IAC9C,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,IAAA,qBAAY,EAC9B,IAAA,gBAAI,EAAC,WAAW,EAAE,cAAc,CAAC,CACG,CAAC;QAEvC,IAAI,WAAW,CAAC,IAAI,EAAE,CAAC;YACrB,MAAM,QAAQ,mCACT,WAAW,CAAC,IAAI,KACnB,OAAO,EAAE,gBAAgB,CAAC,WAAW,CAAC,OAAO,CAAC,EAC9C,WAAW,EAAE,MAAA,WAAW,CAAC,IAAI,CAAC,WAAW,mCAAI,WAAW,CAAC,IAAI,CAAC,IAAI,EAClE,MAAM,EAAE,MAAA,WAAW,CAAC,IAAI,CAAC,MAAM,mCAAI,WAAW,CAAC,IAAI,CAAC,GAAG,EACvD,QAAQ,EAAE,MAAA,WAAW,CAAC,IAAI,CAAC,QAAQ,mCAAI,WAAW,CAAC,IAAI,CAAC,IAAI,EAC5D,KAAK,kCACA,WAAW,CAAC,IAAI,CAAC,KAAK,KACzB,OAAO,EAAE,WAAW,CAAC,OAAO,MAE/B,CAAC;YACF,IAAA,gCAAc,EAAC,QAAQ,CAAC,CAAC;YACzB,OAAO,QAAQ,CAAC;QAClB,CAAC;IACH,CAAC;IAAC,WAAM,CAAC;QACP,uCAAuC;IACzC,CAAC;IAED,OAAO,IAAA,qBAAY,EAAC,IAAA,gBAAI,EAAC,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Manifest } from '../publish/manifest-model';
|
|
1
|
+
import type { Manifest } from '../publish/manifest-model';
|
|
2
2
|
export declare const verifyManifest: (manifest: Manifest) => void;
|
|
@@ -8,7 +8,7 @@ export const App = ({ appKey }: { appKey?: string }) => {
|
|
|
8
8
|
|
|
9
9
|
export default App;
|
|
10
10
|
<% } else if (!minimal) { %>
|
|
11
|
-
import {
|
|
11
|
+
import { Button, Card, Icon, Typography } from '@equinor/eds-core-react';
|
|
12
12
|
import { more_vertical } from '@equinor/eds-icons';
|
|
13
13
|
|
|
14
14
|
export const App = (props: Record<string, unknown>) => {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { AppModuleInitiator } from '@equinor/fusion-framework-react-app';
|
|
2
1
|
<% if (routing) { %>
|
|
3
2
|
import { enableNavigation } from '@equinor/fusion-framework-module-navigation';
|
|
4
3
|
<% } %>
|
|
5
|
-
|
|
4
|
+
import type { AppModuleInitiator } from '@equinor/fusion-framework-react-app';
|
|
6
5
|
export const configure: AppModuleInitiator = (configurator, env) => {
|
|
7
6
|
|
|
8
7
|
/** enable portal service */
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { createElement } from 'react';
|
|
2
|
-
import { createRoot } from 'react-dom/client';
|
|
3
|
-
|
|
4
1
|
import {
|
|
5
2
|
RomaComponentRenderArgs as ComponentRenderArgs,
|
|
6
3
|
makeComponent,
|
|
7
4
|
} from '@equinor/roma-framework';
|
|
8
|
-
|
|
9
|
-
import
|
|
5
|
+
import { createElement } from 'react';
|
|
6
|
+
import { createRoot } from 'react-dom/client';
|
|
10
7
|
import App from './App';
|
|
8
|
+
import configure from './config';
|
|
11
9
|
|
|
12
10
|
/** Render function */
|
|
13
11
|
export const renderApp = (el: HTMLElement, args: ComponentRenderArgs) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tree } from '@nx/devkit';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { type Tree } from '@nx/devkit';
|
|
2
|
+
import type { NormalizedSchema } from '@nx/react/src/generators/application/schema';
|
|
3
|
+
import type { AppGeneratorSchema } from './schema';
|
|
4
4
|
export declare function appGenerator(tree: Tree, options: AppGeneratorSchema & Omit<NormalizedSchema, 'bundler'>): Promise<() => void>;
|
|
5
5
|
export default appGenerator;
|
|
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.appGenerator = appGenerator;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
7
|
+
const react_1 = require("@nx/react");
|
|
6
8
|
const fs_1 = require("fs");
|
|
7
9
|
const path = tslib_1.__importStar(require("path"));
|
|
8
|
-
const
|
|
9
|
-
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
10
|
+
const generator_1 = require("../lint-setup/generator");
|
|
10
11
|
function loadGeneratedDependencies() {
|
|
11
12
|
const filePath = path.join(__dirname, 'data', 'generated-dependencies.json');
|
|
12
13
|
const content = JSON.parse((0, fs_1.readFileSync)(filePath, 'utf-8'));
|
|
@@ -64,12 +65,13 @@ async function appGenerator(tree, options) {
|
|
|
64
65
|
const outputDir = derived
|
|
65
66
|
? `${config.appsDir}/${options.name}`
|
|
66
67
|
: path.join((0, artifact_name_and_directory_utils_1.getRelativeCwd)(), (_b = options.directory) !== null && _b !== void 0 ? _b : options.name);
|
|
67
|
-
await (0, react_1.applicationGenerator)(tree, Object.assign(Object.assign({}, options), { tags: [(_c = options.tags) !== null && _c !== void 0 ? _c : '', 'roma-application'].join(','), rootProject: false, bundler: 'vite', style: 'none' }));
|
|
68
|
+
await (0, react_1.applicationGenerator)(tree, Object.assign(Object.assign({}, options), { tags: [(_c = options.tags) !== null && _c !== void 0 ? _c : '', 'roma-application'].join(','), rootProject: false, bundler: 'vite', style: 'none', linter: 'none' }));
|
|
68
69
|
tree.delete(`${outputDir}/vite.config.ts`);
|
|
69
70
|
tree.delete(`${outputDir}/vite.config.mts`);
|
|
70
71
|
tree.delete(`${outputDir}/index.html`);
|
|
71
72
|
console.log('name', options.name);
|
|
72
73
|
updateTargets(tree, options);
|
|
74
|
+
(0, generator_1.setupLint)(tree, { project: options.name, quiet: true });
|
|
73
75
|
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files'), outputDir, options);
|
|
74
76
|
if (options.routing) {
|
|
75
77
|
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files-routing'), outputDir, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/generators/app/generator.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/generators/app/generator.ts"],"names":[],"mappings":";;AAsFA,oCAoDC;;AA1ID,uCAUoB;AACpB,mHAA6F;AAC7F,qCAAiD;AAEjD,2BAAkC;AAClC,mDAA6B;AAC7B,uDAAoD;AAGpD,SAAS,yBAAyB;IA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AAI,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACxD,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACvE,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QACpB,IAAA,sBAAa,EACX,IAAI,EACJ,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,EACrC,SAAS,EACT,OAAO,CACR,CAAC;IACJ,CAAC;IACD,MAAM,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACrC,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IACxB,IAAI,CAAC,MAAM,CAAC,GAAG,SAAS,UAAU,CAAC,CAAC;IACpC,IAAI,CAAC,MAAM,CAAC,GAAG,SAAS,aAAa,CAAC,CAAC;IACvC,IAAI,CAAC,MAAM,CAAC,GAAG,SAAS,eAAe,CAAC,CAAC;IACzC,IAAI,CAAC,MAAM,CAAC,GAAG,SAAS,iBAAiB,CAAC,CAAC;IAC3C,IAAI,CAAC,MAAM,CAAC,GAAG,SAAS,aAAa,CAAC,CAAC;IACvC,IAAI,CAAC,MAAM,CAAC,GAAG,SAAS,SAAS,CAAC,CAAC;IAEnC,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;QAC5B,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC;IACpB,CAAC;IAED,OAAO,GAAG,EAAE;QACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC;AACJ,CAAC;AAED,kBAAe,YAAY,CAAC"}
|
|
@@ -10,4 +10,4 @@ The function first calls the `applicationGenerator` function from the `@nx/react
|
|
|
10
10
|
|
|
11
11
|
The function then generates several files based on the options passed to the generator, including a `fusion-manifest.json` file, a `tsconfig.json` file, and a `vite.config.ts` file. It also deletes several files and directories that are not needed for a Roma application, but that are generated by `@nx/react`'s generator.
|
|
12
12
|
|
|
13
|
-
Finally, the function returns a function that installs the necessary packages using the `installPackagesTask` function from the `@nx/devkit` package. If the `skipPackageJson` option is set to `true`, the function returns a function that does nothing instead.
|
|
13
|
+
Finally, the function returns a function that installs the necessary packages using the `installPackagesTask` function from the `@nx/devkit` package. If the `skipPackageJson` option is set to `true`, the function returns a function that does nothing instead.
|
|
@@ -23,19 +23,7 @@
|
|
|
23
23
|
"projectNameAndRootFormat": {
|
|
24
24
|
"description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
|
|
25
25
|
"type": "string",
|
|
26
|
-
"enum": [
|
|
27
|
-
"as-provided",
|
|
28
|
-
"derived"
|
|
29
|
-
]
|
|
30
|
-
},
|
|
31
|
-
"linter": {
|
|
32
|
-
"description": "The tool to use for running lint checks.",
|
|
33
|
-
"type": "string",
|
|
34
|
-
"enum": [
|
|
35
|
-
"eslint",
|
|
36
|
-
"none"
|
|
37
|
-
],
|
|
38
|
-
"default": "eslint"
|
|
26
|
+
"enum": ["as-provided", "derived"]
|
|
39
27
|
},
|
|
40
28
|
"routing": {
|
|
41
29
|
"type": "boolean",
|
|
@@ -57,11 +45,7 @@
|
|
|
57
45
|
},
|
|
58
46
|
"unitTestRunner": {
|
|
59
47
|
"type": "string",
|
|
60
|
-
"enum": [
|
|
61
|
-
"jest",
|
|
62
|
-
"vitest",
|
|
63
|
-
"none"
|
|
64
|
-
],
|
|
48
|
+
"enum": ["jest", "vitest", "none"],
|
|
65
49
|
"description": "Test runner to use for unit tests.",
|
|
66
50
|
"default": "vitest"
|
|
67
51
|
},
|
|
@@ -72,11 +56,7 @@
|
|
|
72
56
|
},
|
|
73
57
|
"e2eTestRunner": {
|
|
74
58
|
"type": "string",
|
|
75
|
-
"enum": [
|
|
76
|
-
"cypress",
|
|
77
|
-
"playwright",
|
|
78
|
-
"none"
|
|
79
|
-
],
|
|
59
|
+
"enum": ["cypress", "playwright", "none"],
|
|
80
60
|
"description": "Test runner to use for end to end (E2E) tests.",
|
|
81
61
|
"x-prompt": "Which E2E test runner would you like to use?",
|
|
82
62
|
"default": "none"
|
|
@@ -113,18 +93,10 @@
|
|
|
113
93
|
"description": "Creates an application with strict mode and strict type checking.",
|
|
114
94
|
"default": true
|
|
115
95
|
},
|
|
116
|
-
"setParserOptionsProject": {
|
|
117
|
-
"type": "boolean",
|
|
118
|
-
"description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
|
|
119
|
-
"default": false
|
|
120
|
-
},
|
|
121
96
|
"compiler": {
|
|
122
97
|
"type": "string",
|
|
123
98
|
"description": "The compiler to use.",
|
|
124
|
-
"enum": [
|
|
125
|
-
"babel",
|
|
126
|
-
"swc"
|
|
127
|
-
],
|
|
99
|
+
"enum": ["babel", "swc"],
|
|
128
100
|
"default": "babel"
|
|
129
101
|
},
|
|
130
102
|
"skipPackageJson": {
|
|
@@ -146,7 +118,5 @@
|
|
|
146
118
|
"hidden": true
|
|
147
119
|
}
|
|
148
120
|
},
|
|
149
|
-
"required": [
|
|
150
|
-
"name"
|
|
151
|
-
]
|
|
121
|
+
"required": ["name"]
|
|
152
122
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tree } from '@nx/devkit';
|
|
2
|
-
import { ComponentTestGeneratorSchema } from './schema';
|
|
1
|
+
import { type Tree } from '@nx/devkit';
|
|
2
|
+
import type { ComponentTestGeneratorSchema } from './schema';
|
|
3
3
|
export declare function componentTestGenerator(tree: Tree, options: ComponentTestGeneratorSchema): Promise<void>;
|
|
4
4
|
export default componentTestGenerator;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Tree } from '@nx/devkit';
|
|
2
|
+
import type { LintSetupGeneratorSchema } from './schema';
|
|
3
|
+
export declare const ROMA_LINT_EXECUTOR = "@equinor/roma-nx-plugin:lint";
|
|
4
|
+
export declare function setupLint(tree: Tree, options: LintSetupGeneratorSchema): Array<string>;
|
|
5
|
+
export declare function lintSetupGenerator(tree: Tree, options: LintSetupGeneratorSchema): Promise<void>;
|
|
6
|
+
export default lintSetupGenerator;
|