@equinor/roma-nx-plugin 5.0.0 → 6.0.0-beta.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.
- package/CHANGELOG.md +13 -0
- package/package.json +11 -8
- package/src/executors/build/build.js +7 -38
- package/src/executors/build/build.js.map +1 -1
- package/src/executors/build/executor.js +2 -1
- package/src/executors/build/executor.js.map +1 -1
- 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.js +4 -3
- package/src/executors/create-vite-config.js.map +1 -1
- package/src/executors/executor-context.js +4 -2
- package/src/executors/executor-context.js.map +1 -1
- package/src/executors/serve/get-manifest.js +3 -0
- package/src/executors/serve/get-manifest.js.map +1 -1
- package/src/executors/serve/server.d.ts +1 -1
- package/src/executors/serve/server.js +15 -32
- package/src/executors/serve/server.js.map +1 -1
- package/src/executors/utils/load-services.d.ts +6 -0
- package/src/executors/utils/load-services.js +19 -0
- package/src/executors/utils/load-services.js.map +1 -0
- package/src/executors/utils/read-manifest.d.ts +6 -0
- package/src/executors/utils/read-manifest.js +28 -0
- package/src/executors/utils/read-manifest.js.map +1 -0
- package/src/generators/app/files/eslint.config.js.template +105 -0
- package/src/generators/app/generator.js +2 -1
- package/src/generators/app/generator.js.map +1 -1
- package/src/generators/component-test/generator.js +2 -1
- package/src/generators/component-test/generator.js.map +1 -1
- package/src/generators/preset/generator.js +34 -1
- package/src/generators/preset/generator.js.map +1 -1
- package/src/migrations/add-publish-target/add-publish-target.js +0 -1
- package/src/migrations/add-publish-target/add-publish-target.js.map +1 -1
- package/src/migrations/migrate-fusion-manifest/migrate-fusion-manifest.js +0 -1
- package/src/migrations/migrate-fusion-manifest/migrate-fusion-manifest.js.map +1 -1
- package/src/generators/app/files/.eslintrc.json +0 -130
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
# [6.0.0-beta.1](https://github.com/equinor/tops-roma/compare/roma-6.0.0-beta.0...roma-6.0.0-beta.1) (2026-04-08)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# [6.0.0-beta.0](https://github.com/equinor/tops-roma/compare/roma-5.0.0...roma-6.0.0-beta.0) (2026-04-08)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* **ROMA-294:** enable alarm support [WIP] ([#488](https://github.com/equinor/tops-roma/issues/488)) ([2becf98](https://github.com/equinor/tops-roma/commit/2becf986862c4d07796c13e8007ba2ad572b9b0c))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
5
18
|
# [5.0.0](https://github.com/equinor/tops-roma/compare/roma-5.0.0-beta.1...roma-5.0.0) (2026-02-24)
|
|
6
19
|
|
|
7
20
|
|
package/package.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/roma-nx-plugin",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "6.0.0-beta.1",
|
|
5
5
|
"repository": "https://github.com/equinor/tops-roma",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@nx/devkit": "^22.0.3",
|
|
8
8
|
"@nx/react": "^22.0.3",
|
|
9
|
-
"
|
|
10
|
-
"open": "^8.4.2",
|
|
9
|
+
"open": "^10.2.0",
|
|
11
10
|
"chalk": "^4.0.0",
|
|
12
11
|
"vite-plugin-checker": "^0.12.0",
|
|
13
12
|
"tslib": "^2.3.0",
|
|
14
13
|
"@azure/identity": "^4.4.1",
|
|
15
|
-
"@equinor/fusion-framework-module-service-discovery": "^9.0.4",
|
|
16
|
-
"@equinor/fusion-framework-module-app": "^7.1.0",
|
|
17
14
|
"vite": "^7.3.1",
|
|
18
15
|
"@vitejs/plugin-react": "^5.1.2",
|
|
19
|
-
"vite-plugin-restart": "^0.4.2",
|
|
20
16
|
"vite-plugin-environment": "^1.1.3",
|
|
21
|
-
"semver": "
|
|
17
|
+
"semver": "6.3.1",
|
|
22
18
|
"rollup": "^4.20.0",
|
|
23
19
|
"express": "^4.18.3",
|
|
24
20
|
"http-proxy-middleware": "^3.0.5",
|
|
25
|
-
"esbuild": "0.
|
|
21
|
+
"esbuild": "0.27.3",
|
|
22
|
+
"cypress": "^15.13.0",
|
|
23
|
+
"@equinor/fusion-framework-module-app": "8.0.0",
|
|
24
|
+
"@equinor/roma-framework": "workspace:*",
|
|
25
|
+
"get-port": "^7.2.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@nx/devkit": "^22.0.3",
|
|
@@ -30,6 +30,9 @@
|
|
|
30
30
|
"@nx/react": "^22.0.3",
|
|
31
31
|
"nx": "^22.0.3"
|
|
32
32
|
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/express": "^4.17.25"
|
|
35
|
+
},
|
|
33
36
|
"overrides": {
|
|
34
37
|
"@nx/react": {
|
|
35
38
|
"form-data": "^4.0.4"
|
|
@@ -3,55 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.default = default_1;
|
|
4
4
|
const create_vite_config_1 = require("../create-vite-config");
|
|
5
5
|
const vite_1 = require("vite");
|
|
6
|
-
const semver_1 = require("semver");
|
|
7
6
|
const node_fs_1 = require("node:fs");
|
|
8
7
|
const node_path_1 = require("node:path");
|
|
9
|
-
const devkit_1 = require("@nx/devkit");
|
|
10
8
|
const path_1 = require("path");
|
|
11
9
|
const logger_1 = require("../utils/logger");
|
|
10
|
+
const get_vite_config_1 = require("../utils/get-vite-config");
|
|
11
|
+
const read_manifest_1 = require("../utils/read-manifest");
|
|
12
12
|
const logger = new logger_1.Logger();
|
|
13
|
-
function getViteConfig(root) {
|
|
14
|
-
const files = (0, node_fs_1.readdirSync)(root);
|
|
15
|
-
const file = files.find((f) => f.startsWith('vite.config'));
|
|
16
|
-
if (!file)
|
|
17
|
-
throw new Error(`No vite config found!`);
|
|
18
|
-
return (0, path_1.resolve)(root, file);
|
|
19
|
-
}
|
|
20
|
-
const normalizeVersion = (version) => {
|
|
21
|
-
const semverVersion = (0, semver_1.parse)(version);
|
|
22
|
-
const { major, minor, patch } = semverVersion;
|
|
23
|
-
return { major, minor, patch };
|
|
24
|
-
};
|
|
25
13
|
async function default_1(context, watch = false) {
|
|
26
14
|
const projectName = context.projectName;
|
|
27
15
|
const project = context.projectsConfigurations.projects[projectName];
|
|
28
16
|
const base = (0, path_1.resolve)(context.root, project.root);
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
command: 'build',
|
|
33
|
-
mode: 'production',
|
|
34
|
-
}, viteConfigPath);
|
|
35
|
-
const viteConfig = userConfig.config;
|
|
36
|
-
const config = (0, create_vite_config_1.createRomaViteConfig)(viteConfig, context, watch);
|
|
17
|
+
const viteConfigPath = (0, get_vite_config_1.getViteConfig)(base);
|
|
18
|
+
const userConfig = await (0, vite_1.loadConfigFromFile)({ command: 'build', mode: 'production' }, viteConfigPath);
|
|
19
|
+
const config = (0, create_vite_config_1.createRomaViteConfig)(userConfig.config, context, watch);
|
|
37
20
|
try {
|
|
38
21
|
const result = await (0, vite_1.build)(config).then((r) => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
let manifest;
|
|
42
|
-
try {
|
|
43
|
-
const packageJson = (0, devkit_1.readJsonFile)((0, node_path_1.join)(config.root, 'package.json'));
|
|
44
|
-
if (packageJson.roma) {
|
|
45
|
-
manifest = Object.assign(Object.assign({}, packageJson.roma), { version: normalizeVersion(packageJson.version), displayName: (_a = packageJson.roma.displayName) !== null && _a !== void 0 ? _a : packageJson.roma.name, appKey: (_b = packageJson.roma.appKey) !== null && _b !== void 0 ? _b : packageJson.roma.key, keywords: (_c = packageJson.roma.keywords) !== null && _c !== void 0 ? _c : packageJson.roma.tags, build: Object.assign(Object.assign({}, packageJson.roma.build), { version: packageJson.version }) });
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
manifest = (0, devkit_1.readJsonFile)((0, node_path_1.join)(config.root, 'fusion-manifest.json'));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
catch (_d) {
|
|
52
|
-
manifest = (0, devkit_1.readJsonFile)((0, node_path_1.join)(config.root, 'fusion-manifest.json'));
|
|
53
|
-
}
|
|
54
|
-
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(out, 'manifest.json'), JSON.stringify(manifest, null, 2), 'utf8');
|
|
22
|
+
const manifest = (0, read_manifest_1.readManifest)(config.root);
|
|
23
|
+
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(config.build.outDir, 'manifest.json'), JSON.stringify(manifest, null, 2), 'utf8');
|
|
55
24
|
return r;
|
|
56
25
|
});
|
|
57
26
|
return new Promise((resolve) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/build/build.ts"],"names":[],"mappings":";;
|
|
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,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,cAAc,GAA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AAC,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,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = runExecutor;
|
|
4
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const build_1 = tslib_1.__importDefault(require("./build"));
|
|
5
6
|
async function runExecutor(options, context) {
|
|
6
7
|
return (0, build_1.default)(context, options.watch);
|
|
7
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/build/executor.ts"],"names":[],"mappings":";;AAIA,8BAKC
|
|
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"}
|
|
@@ -6,7 +6,7 @@ const node_child_process_1 = require("node:child_process");
|
|
|
6
6
|
const node_util_1 = require("node:util");
|
|
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(() => require('cypress'));
|
|
9
|
+
const cypress = await Promise.resolve().then(() => tslib_1.__importStar(require('cypress')));
|
|
10
10
|
const { projectName, projectsConfigurations, root } = context;
|
|
11
11
|
const workdir = (0, path_1.join)(root, projectsConfigurations.projects[projectName].root);
|
|
12
12
|
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,
|
|
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,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createRomaViteConfig = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const vite_1 = require("vite");
|
|
5
|
-
const vite_plugin_environment_1 = require("vite-plugin-environment");
|
|
6
|
+
const vite_plugin_environment_1 = tslib_1.__importDefault(require("vite-plugin-environment"));
|
|
6
7
|
const path_1 = require("path");
|
|
7
8
|
// @ts-expect-error not quite sure what the issue here is..
|
|
8
|
-
const plugin_react_1 = require("@vitejs/plugin-react");
|
|
9
|
+
const plugin_react_1 = tslib_1.__importDefault(require("@vitejs/plugin-react"));
|
|
9
10
|
const logger_1 = require("./utils/logger");
|
|
10
11
|
const nx_tsconfig_paths_plugin_1 = require("@nx/vite/plugins/nx-tsconfig-paths.plugin");
|
|
11
12
|
const minify_1 = require("./build/minify");
|
|
12
|
-
const vite_plugin_checker_1 = require("vite-plugin-checker");
|
|
13
|
+
const vite_plugin_checker_1 = tslib_1.__importDefault(require("vite-plugin-checker"));
|
|
13
14
|
const createRomaViteConfig = (config, context, watch = false, hmrPort = 42000) => {
|
|
14
15
|
var _a;
|
|
15
16
|
const isServe = context.targetName === 'serve';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-vite-config.js","sourceRoot":"","sources":["../../../../../plugins/roma/src/executors/create-vite-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-vite-config.js","sourceRoot":"","sources":["../../../../../plugins/roma/src/executors/create-vite-config.ts"],"names":[],"mappings":";;;;AAAA,+BAMc;AACd,8FAA8C;AAC9C,+BAAqC;AACrC,2DAA2D;AAC3D,gFAAyC;AACzC,2CAAwC;AAGxC,wFAA0E;AAC1E,2CAA0C;AAE1C,sFAA0C;AAMnC,MAAM,oBAAoB,GAAG,CAClC,MAAkB,EAClB,OAAwB,EACxB,KAAK,GAAG,KAAK,EACb,OAAO,GAAG,KAAK,EACf,EAAE;;IACF,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,KAAK,OAAO,CAAC;IAC/C,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IACxC,MAAM,OAAO,GAAG,OAAO,CAAC,sBAAsB,CAAC,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,CAAC,CAAC,CAAC;AACvD,CAAC,CAAC;AAjIW,QAAA,oBAAoB,wBAiI/B"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.executorContext = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
5
|
+
const workspaceRoot = (0, path_1.resolve)(__dirname, '../../../..');
|
|
4
6
|
const projects = {
|
|
5
7
|
administration: {
|
|
6
8
|
name: 'administration',
|
|
@@ -76,7 +78,7 @@ const projects = {
|
|
|
76
78
|
},
|
|
77
79
|
};
|
|
78
80
|
exports.executorContext = {
|
|
79
|
-
root:
|
|
81
|
+
root: workspaceRoot,
|
|
80
82
|
target: {
|
|
81
83
|
dependsOn: ['^build'],
|
|
82
84
|
inputs: ['production', '^production'],
|
|
@@ -90,7 +92,7 @@ exports.executorContext = {
|
|
|
90
92
|
},
|
|
91
93
|
projectName: 'administration',
|
|
92
94
|
targetName: 'build',
|
|
93
|
-
cwd:
|
|
95
|
+
cwd: workspaceRoot,
|
|
94
96
|
isVerbose: false,
|
|
95
97
|
nxJsonConfiguration: [],
|
|
96
98
|
projectGraph: { nodes: {}, dependencies: {} },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor-context.js","sourceRoot":"","sources":["../../../../../plugins/roma/src/executors/executor-context.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"executor-context.js","sourceRoot":"","sources":["../../../../../plugins/roma/src/executors/executor-context.ts"],"names":[],"mappings":";;;AACA,+BAA+B;AAE/B,MAAM,aAAa,GAAG,IAAA,cAAO,EAAC,SAAS,EAAE,aAAa,CAAC,CAAC;AAExD,MAAM,QAAQ,GAAG;IACf,cAAc,EAAE;QACd,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,kCAAkC;QACxC,OAAO,EAAE,sDAAsD;QAC/D,UAAU,EAAE,sCAAsC;QAClD,WAAW,EAAE,aAAa;Q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AAE;KACzB;CACF,CAAC;AAEW,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE;QACN,SAAS,EAAE,CAAC,QAAQ,CAAC;QACrB,MAAM,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;QACrC,QAAQ,EAAE,+BAA+B;QACzC,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,EAAE;KACnB;IACD,sBAAsB,EAAE;QACtB,QAAQ;QACR,OAAO,EAAE,CAAC;KACX;IACD,WAAW,EAAE,gBAAgB;IAC7B,UAAU,EAAE,OAAO;IACnB,GAAG,EAAE,aAAa;IAClB,SAAS,EAAE,KAAK;IAChB,mBAAmB,EAAE,EAAE;IACvB,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE;CAC3B,CAAC"}
|
|
@@ -11,6 +11,9 @@ function getManifest(root) {
|
|
|
11
11
|
if (pkgManifest) {
|
|
12
12
|
manifest = Object.assign(Object.assign({}, pkgManifest), { version: packageJson.version });
|
|
13
13
|
}
|
|
14
|
+
else {
|
|
15
|
+
manifest = (0, devkit_1.readJsonFile)((0, path_1.join)(root, 'fusion-manifest.json'));
|
|
16
|
+
}
|
|
14
17
|
}
|
|
15
18
|
catch (_a) {
|
|
16
19
|
manifest = (0, devkit_1.readJsonFile)((0, path_1.join)(root, 'fusion-manifest.json'));
|
|
@@ -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,kCAqBC;AAzBD,+BAA4B;AAE5B,uCAA0C;AAE1C,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,EAAC,IAAA,WAAI,EAAC,IAAI,EAAE,sBAAsB,CAAC,CAEzD,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"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ServeExecutorSchema } from './schema';
|
|
2
2
|
import type { ExecutorContext } from '@nx/devkit';
|
|
3
|
-
export declare function createServer({ port: requestedPort, devPortal, portal: portalTarget, open, }: ServeExecutorSchema, context: ExecutorContext, additionalProjects?: Array<ServeExecutorSchema>): Promise<unknown>;
|
|
3
|
+
export declare function createServer({ port: requestedPort, devPortal, portal: portalTarget, open: shouldOpen, }: ServeExecutorSchema, context: ExecutorContext, additionalProjects?: Array<ServeExecutorSchema>): Promise<unknown>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createServer = createServer;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const open_1 = tslib_1.__importDefault(require("open"));
|
|
6
|
+
const express = tslib_1.__importStar(require("express"));
|
|
7
|
+
const chalk = tslib_1.__importStar(require("chalk"));
|
|
8
|
+
const get_port_1 = tslib_1.__importStar(require("get-port"));
|
|
8
9
|
const vite_1 = require("vite");
|
|
9
10
|
const path_1 = require("path");
|
|
10
11
|
const node_fs_1 = require("node:fs");
|
|
@@ -12,37 +13,18 @@ const http_proxy_middleware_1 = require("http-proxy-middleware");
|
|
|
12
13
|
const create_vite_config_1 = require("../create-vite-config");
|
|
13
14
|
const get_vite_config_1 = require("../utils/get-vite-config");
|
|
14
15
|
const get_manifest_1 = require("./get-manifest");
|
|
15
|
-
|
|
16
|
-
* Logger for proxied paths to simplify tracking of active environment / services.
|
|
17
|
-
* @param options
|
|
18
|
-
*/
|
|
16
|
+
const load_services_1 = require("../utils/load-services");
|
|
19
17
|
const createProxyMiddleware = (options) => {
|
|
20
18
|
var _a;
|
|
21
19
|
console.log(`[ROMA] Proxying ${(_a = options.name) !== null && _a !== void 0 ? _a : options.pathFilter} to ${options.target}`);
|
|
22
20
|
return (0, http_proxy_middleware_1.createProxyMiddleware)(options);
|
|
23
21
|
};
|
|
24
|
-
async function
|
|
25
|
-
try {
|
|
26
|
-
const req = await fetch(`${portalTarget}/_discovery/environments/current`);
|
|
27
|
-
const res = (await req.json());
|
|
28
|
-
return res.services
|
|
29
|
-
.filter((s) => s.uri.startsWith(portalTarget))
|
|
30
|
-
.map((s) => new URL(s.uri).pathname)
|
|
31
|
-
.filter((path) => path.length >= 3 &&
|
|
32
|
-
!path.startsWith('/apim/') &&
|
|
33
|
-
!path.startsWith('/eventstream'));
|
|
34
|
-
}
|
|
35
|
-
catch (ex) {
|
|
36
|
-
console.error(ex);
|
|
37
|
-
process.exit();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
async function createServer({ port: requestedPort = 3000, devPortal = 'node_modules/@equinor/roma-framework/dev-portal', portal: portalTarget = 'https://romadev.equinor.com', open, }, context, additionalProjects) {
|
|
22
|
+
async function createServer({ port: requestedPort = 3000, devPortal = 'node_modules/@equinor/roma-framework/dev-portal', portal: portalTarget = 'https://romadev.equinor.com', open: shouldOpen, }, context, additionalProjects) {
|
|
41
23
|
// Get path to dev-portal, this would be a flag from executor.
|
|
42
24
|
const devPortalPath = (0, path_1.resolve)(process.cwd(), devPortal);
|
|
43
25
|
// Get available port, prefers requestedPort but falls back to another free port
|
|
44
|
-
const ports = Array.from(new Set([requestedPort, ...
|
|
45
|
-
const port = (await
|
|
26
|
+
const ports = Array.from(new Set([requestedPort, ...(0, get_port_1.portNumbers)(3000, 30009)]));
|
|
27
|
+
const port = (await (0, get_port_1.default)({ port: ports }));
|
|
46
28
|
if (!ports.includes(port)) {
|
|
47
29
|
throw new Error(`All valid ports (3000-3009) are closed`);
|
|
48
30
|
}
|
|
@@ -60,16 +42,17 @@ async function createServer({ port: requestedPort = 3000, devPortal = 'node_modu
|
|
|
60
42
|
mode: 'production',
|
|
61
43
|
}, viteConfigPath);
|
|
62
44
|
// Create express application
|
|
45
|
+
// @ts-expect-error Types are wrong.
|
|
63
46
|
const app = express();
|
|
64
47
|
app.set('x-powered-by', false);
|
|
65
48
|
app.use(express.static(devPortalPath));
|
|
66
49
|
// Load Roma services
|
|
67
|
-
const services = await loadServices(portalTarget);
|
|
50
|
+
const services = await (0, load_services_1.loadServices)(portalTarget);
|
|
68
51
|
// Add proxy middleware for all roma-services
|
|
69
52
|
services.forEach((p) => app.use(p, createProxyMiddleware({ target: portalTarget, changeOrigin: true })));
|
|
70
53
|
// Range of port numbers for hmr, otherwise HMR won't work for multiple apps at the same time
|
|
71
|
-
const hmrPorts =
|
|
72
|
-
const hmrPort = await
|
|
54
|
+
const hmrPorts = (0, get_port_1.portNumbers)(40000, 45000);
|
|
55
|
+
const hmrPort = await (0, get_port_1.default)({ port: hmrPorts });
|
|
73
56
|
const viteConfig = (0, create_vite_config_1.createRomaViteConfig)(userConfig.config, context, false, hmrPort);
|
|
74
57
|
// Create Vite server in middleware mode
|
|
75
58
|
const vite = await (0, vite_1.createServer)(viteConfig);
|
|
@@ -176,9 +159,9 @@ Application will now exit.`));
|
|
|
176
159
|
// listen to requested port
|
|
177
160
|
app.listen(port, () => {
|
|
178
161
|
console.log(chalk.green('Roma dev server listening on port ' + port));
|
|
179
|
-
if (
|
|
162
|
+
if (shouldOpen) {
|
|
180
163
|
console.log(chalk.green(`Opening the application at http://localhost:${port}/apps/${projectName}`));
|
|
181
|
-
|
|
164
|
+
(0, open_1.default)(`http://localhost:${port}/apps/${projectName}`);
|
|
182
165
|
}
|
|
183
166
|
else {
|
|
184
167
|
console.log(chalk.green(`Open the application at http://localhost:${port}/apps/${projectName}`));
|
|
@@ -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":";;AAqCA,oCAuOC;;AA1QD,wDAAwB;AACxB,yDAAmC;AACnC,qDAA+B;AAC/B,6DAAgD;AAChD,+BAIc;AACd,+BAAqC;AACrC,qCAAuC;AACvC,iEAI+B;AAC/B,8DAA6D;AAE7D,8DAAyD;AACzD,iDAA6C;AAC7C,0DAAsD;AAGtD,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;AACzC,CAAC,CAAC;AAEK,KAAK,UAAU,YAAY,CAChC,EACE,IAAI,EAAE,aAAa,GAAG,IAAI,EAC1B,SAAS,GAAG,iDAAiD,EAC7D,MAAM,EAAE,YAAY,GAAG,6BAA6B,EACpD,IAAI,EAAE,UAAU,GACI,EACtB,OAAwB,EACxB,kBAA+C;IAE/C,8DAA8D;IAC9D,MAAM,aAAa,GAAG,IAAA,cAAO,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE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AC,IAAI,EAAE,GAAG,EAAE;YACpB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,oCAAoC,GAAG,IAAI,CAAC,CAAC,CAAC;YACtE,IAAI,UAAU,EAAE,CAAC;gBACf,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,KAAK,CACT,+CAA+C,IAAI,SAAS,WAAW,EAAE,CAC1E,CACF,CAAC;gBACF,IAAA,cAAI,EAAC,oBAAoB,IAAI,SAAS,WAAW,EAAE,CAAC,CAAC;YACvD,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,KAAK,CACT,4CAA4C,IAAI,SAAS,WAAW,EAAE,CACvE,CACF,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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fetches the current environment from the portal and returns the paths of all
|
|
3
|
+
* services that are hosted on that same portal origin (i.e. reverse-proxied
|
|
4
|
+
* paths that should be forwarded locally).
|
|
5
|
+
*/
|
|
6
|
+
export declare function loadServices(portalTarget: string): Promise<Array<string>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadServices = loadServices;
|
|
4
|
+
/**
|
|
5
|
+
* Fetches the current environment from the portal and returns the paths of all
|
|
6
|
+
* services that are hosted on that same portal origin (i.e. reverse-proxied
|
|
7
|
+
* paths that should be forwarded locally).
|
|
8
|
+
*/
|
|
9
|
+
async function loadServices(portalTarget) {
|
|
10
|
+
const req = await fetch(`${portalTarget}/_discovery/environments/current`);
|
|
11
|
+
const res = (await req.json());
|
|
12
|
+
return res.services
|
|
13
|
+
.filter((s) => s.uri.startsWith(portalTarget))
|
|
14
|
+
.map((s) => new URL(s.uri).pathname)
|
|
15
|
+
.filter((path) => path.length >= 3 &&
|
|
16
|
+
!path.startsWith('/apim/') &&
|
|
17
|
+
!path.startsWith('/eventstream'));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=load-services.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-services.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/utils/load-services.ts"],"names":[],"mappings":";;AAOA,oCAYC;AAjBD;;;;GAIG;AACI,KAAK,UAAU,YAAY,CAAC,YAAoB;IACrD,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"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readManifest = readManifest;
|
|
4
|
+
const node_path_1 = require("node:path");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const semver_1 = require("semver");
|
|
7
|
+
const normalizeVersion = (version) => {
|
|
8
|
+
const { major, minor, patch } = (0, semver_1.parse)(version);
|
|
9
|
+
return { major, minor, patch };
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Reads the app manifest from either the `roma` field in package.json
|
|
13
|
+
* (preferred) or from a legacy `fusion-manifest.json` file.
|
|
14
|
+
*/
|
|
15
|
+
function readManifest(projectRoot) {
|
|
16
|
+
var _a, _b, _c;
|
|
17
|
+
try {
|
|
18
|
+
const packageJson = (0, devkit_1.readJsonFile)((0, node_path_1.join)(projectRoot, 'package.json'));
|
|
19
|
+
if (packageJson.roma) {
|
|
20
|
+
return Object.assign(Object.assign({}, packageJson.roma), { version: normalizeVersion(packageJson.version), displayName: (_a = packageJson.roma.displayName) !== null && _a !== void 0 ? _a : packageJson.roma.name, appKey: (_b = packageJson.roma.appKey) !== null && _b !== void 0 ? _b : packageJson.roma.key, keywords: (_c = packageJson.roma.keywords) !== null && _c !== void 0 ? _c : packageJson.roma.tags, build: Object.assign(Object.assign({}, packageJson.roma.build), { version: packageJson.version }) });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
catch (_d) {
|
|
24
|
+
// fall through to fusion-manifest.json
|
|
25
|
+
}
|
|
26
|
+
return (0, devkit_1.readJsonFile)((0, node_path_1.join)(projectRoot, 'fusion-manifest.json'));
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=read-manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-manifest.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/utils/read-manifest.ts"],"names":[],"mappings":";;AAeA,oCAwBC;AAvCD,yCAAiC;AACjC,uCAA0C;AAC1C,mCAA8C;AAI9C,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,uCACK,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,OAE9B;QACJ,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"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import nx from '@nx/eslint-plugin';
|
|
3
|
+
import jsoncParser from 'jsonc-eslint-parser';
|
|
4
|
+
import prettierPlugin from 'eslint-plugin-prettier';
|
|
5
|
+
import prettierConfig from 'eslint-config-prettier';
|
|
6
|
+
|
|
7
|
+
const reactAppExcludedFiles = [
|
|
8
|
+
'**/*.spec.ts',
|
|
9
|
+
'**/*.spec.tsx',
|
|
10
|
+
'**/*.e2e-spec.ts',
|
|
11
|
+
'**/*.e2e-spec.tsx',
|
|
12
|
+
'**/*.cy.ts',
|
|
13
|
+
'**/*.cy.tsx',
|
|
14
|
+
'**/vite.config.*',
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
export default [
|
|
18
|
+
{
|
|
19
|
+
ignores: [
|
|
20
|
+
'vite.config.*',
|
|
21
|
+
'app.config.*',
|
|
22
|
+
'**/*.spec.tsx',
|
|
23
|
+
'**/vite.config.*.timestamp*',
|
|
24
|
+
'**/vitest.config.*.timestamp*',
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
...nx.configs['flat/base'],
|
|
29
|
+
...nx.configs['flat/typescript'],
|
|
30
|
+
...nx.configs['flat/javascript'],
|
|
31
|
+
...nx.configs['flat/react'],
|
|
32
|
+
|
|
33
|
+
// eslint-plugin-react v7 uses the deprecated context.getFilename() API
|
|
34
|
+
// (removed in ESLint v10) when version is set to 'detect'. Pinning to a
|
|
35
|
+
// specific version skips the auto-detection code path.
|
|
36
|
+
{ settings: { react: { version: '18' } } },
|
|
37
|
+
|
|
38
|
+
{
|
|
39
|
+
files: ['**/*.json'],
|
|
40
|
+
languageOptions: { parser: jsoncParser },
|
|
41
|
+
rules: {},
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
{
|
|
45
|
+
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
46
|
+
rules: {
|
|
47
|
+
'@typescript-eslint/consistent-type-definitions': ['warn', 'type'],
|
|
48
|
+
'@typescript-eslint/array-type': ['warn', { default: 'generic' }],
|
|
49
|
+
'@nx/enforce-module-boundaries': [
|
|
50
|
+
'error',
|
|
51
|
+
{
|
|
52
|
+
enforceBuildableLibDependency: true,
|
|
53
|
+
allow: [],
|
|
54
|
+
depConstraints: [
|
|
55
|
+
{ sourceTag: '*', onlyDependOnLibsWithTags: ['*'] },
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
{
|
|
63
|
+
files: ['**/*.ts', '**/*.tsx'],
|
|
64
|
+
ignores: reactAppExcludedFiles,
|
|
65
|
+
plugins: { prettier: prettierPlugin },
|
|
66
|
+
rules: {
|
|
67
|
+
'prettier/prettier': ['error'],
|
|
68
|
+
'no-underscore-dangle': ['off'],
|
|
69
|
+
'no-undef': 'warn',
|
|
70
|
+
'no-use-before-define': ['off'],
|
|
71
|
+
'react/prop-types': ['off'],
|
|
72
|
+
'no-unused-vars': ['off'],
|
|
73
|
+
'import/default': ['off'],
|
|
74
|
+
'import/newline-after-import': ['error'],
|
|
75
|
+
'import/prefer-default-export': ['off'],
|
|
76
|
+
'import/namespace': ['error', { allowComputed: true }],
|
|
77
|
+
'react/require-default-props': ['off'],
|
|
78
|
+
'react/react-in-jsx-scope': 'off',
|
|
79
|
+
'react/jsx-pascal-case': ['error'],
|
|
80
|
+
'react/prefer-stateless-function': ['error'],
|
|
81
|
+
'react/no-unused-prop-types': ['error'],
|
|
82
|
+
'react/no-array-index-key': ['error'],
|
|
83
|
+
'react/no-typos': ['error'],
|
|
84
|
+
'react/destructuring-assignment': ['error', 'always'],
|
|
85
|
+
'jsx-a11y/label-has-associated-control': [
|
|
86
|
+
'warn',
|
|
87
|
+
{
|
|
88
|
+
labelComponents: [],
|
|
89
|
+
labelAttributes: [],
|
|
90
|
+
controlComponents: [],
|
|
91
|
+
assert: 'either',
|
|
92
|
+
depth: 25,
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
96
|
+
// no-empty-interface deprecated in @typescript-eslint v8; use no-empty-object-type
|
|
97
|
+
'@typescript-eslint/no-empty-interface': 'off',
|
|
98
|
+
'@typescript-eslint/no-empty-object-type': [
|
|
99
|
+
'error',
|
|
100
|
+
{ allowInterfaces: 'with-single-extends' },
|
|
101
|
+
],
|
|
102
|
+
...prettierConfig.rules,
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.appGenerator = appGenerator;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const path = require("path");
|
|
6
|
+
const path = tslib_1.__importStar(require("path"));
|
|
6
7
|
const react_1 = require("@nx/react");
|
|
7
8
|
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
8
9
|
async function addDependencies(tree, options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/generators/app/generator.ts"],"names":[],"mappings":";;AA8FA,oCA0CC
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/generators/app/generator.ts"],"names":[],"mappings":";;AA8FA,oCA0CC;;AAxID,uCAUoB;AACpB,mDAA6B;AAE7B,qCAAiD;AAEjD,mHAA6F;AAE7F,KAAK,UAAU,eAAe,CAC5B,IAAU,EACV,OAA2E;IAE3E,MAAM,YAAY,GAA2B;QAC3C,yBAAyB,EAAE,QAAQ;QACnC,2BAA2B,EAAE,QAAQ;QACrC,+BAA+B,EAAE,SAAS;QAC1C,yBAAyB,EAAE,SAAS;QACpC,8BAA8B,EAAE,QAAQ;QACxC,oBAAoB,EAAE,SAAS;QAC/B,qBAAqB,EAAE,SAAS;QAChC,iCAAiC,EAAE,SAAS;QAC5C,qCAAqC,EAAE,QAAQ;QAC/C,wCAAwC,EAAE,SAAS;QACnD,6CAA6C,EAAE,QAAQ;QACvD,mBAAmB,EAAE,QAAQ;QAC7B,GAAG,EAAE,SAAS;QACd,qBAAqB,EAAE,QAAQ;QAC/B,uCAAuC,EAAE,QAAQ;KAClD,CAAC;IACF,MAAM,eAAe,GAAG,EAAE,CAAC;IAC3B,OAAO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G,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"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.componentTestGenerator = componentTestGenerator;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const path = require("path");
|
|
6
|
+
const path = tslib_1.__importStar(require("path"));
|
|
6
7
|
async function componentTestGenerator(tree, options) {
|
|
7
8
|
const name = options.project;
|
|
8
9
|
const currentConfiguration = (0, devkit_1.readProjectConfiguration)(tree, name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/generators/component-test/generator.ts"],"names":[],"mappings":";;AAYA,wDAoDC
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/generators/component-test/generator.ts"],"names":[],"mappings":";;AAYA,wDAoDC;;AAhED,uCAQoB;AACpB,mDAA6B;AAGtB,KAAK,UAAU,sBAAsB,CAC1C,IAAU,EACV,OAAqC;IAErC,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC;IAC7B,MAAM,oBAAoB,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAClE,IAAI,oBAAoB,CAAC,WAAW,KAAK,aAAa,EAAE,CAAC;QACvD,MAAM,IAAI,KAAK,CACb,yEAAyE,CAC1E,CAAC;IACJ,CAAC;IACD,IACE,oBAAoB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,QAAQ;QAC9C,+BAA+B,EAC/B,CAAC;QACD,MAAM,IAAI,KAAK,CACb,oFAAoF,CACrF,CAAC;IACJ,CAAC;IACD,IAAI,oBAAoB,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACnD,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;IACD,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,kCAChC,oBAAoB,KACvB,OAAO,kCACF,oBAAoB,CAAC,OAAO,KAC/B,gBAAgB,EAAE;gBAChB,QAAQ,EAAE,wCAAwC;gBAClD,OAAO,EAAE;oBACP,KAAK,EAAE,IAAI;oBACX,KAAK,EAAE,KAAK;iBACb;aACF,OAEH,CAAC;IACH,IAAA,qCAA4B,EAC1B,IAAI,EACJ,EAAE,EACF;QACE,wBAAwB,EAAE,SAAS;QACnC,OAAO,EAAE,UAAU;QACnB,sBAAsB,EAAE,QAAQ;KACjC,CACF,CAAC;IACF,IAAA,sBAAa,EACX,IAAI,EACJ,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAC7B,oBAAoB,CAAC,IAAI,EACzB,OAAO,CACR,CAAC;IACF,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IACxB,OAAO,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAED,kBAAe,sBAAsB,CAAC"}
|
|
@@ -1,4 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.presetGenerator = presetGenerator;
|
|
4
37
|
const devkit_1 = require("@nx/devkit");
|
|
@@ -13,7 +46,7 @@ async function presetGenerator(tree, options) {
|
|
|
13
46
|
(0, devkit_1.runTasksInSerial)((0, devkit_1.addDependenciesToPackageJson)(tree, {
|
|
14
47
|
react: '^18.3.1',
|
|
15
48
|
}, {}));
|
|
16
|
-
return await Promise.resolve().then(() => require('../app/generator')).then(({ appGenerator }) => appGenerator(tree, Object.assign({}, options)));
|
|
49
|
+
return await Promise.resolve().then(() => __importStar(require('../app/generator'))).then(({ appGenerator }) => appGenerator(tree, Object.assign({}, options)));
|
|
17
50
|
}
|
|
18
51
|
exports.default = presetGenerator;
|
|
19
52
|
//# sourceMappingURL=generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/generators/preset/generator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/generators/preset/generator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,0CAuBC;AA9BD,uCAIoB;AAGb,KAAK,UAAU,eAAe,CACnC,IAAU,EACV,OAA8B;IAE9B,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAC9B,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAC/C,OAAO,CAAC,SAAS,GAAG,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;IAC3C,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IACtD,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,YAAY,IAAI,mBAAmB,CAAC;IAC7E,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC;IACpC,OAAe,CAAC,wBAAwB,GAAG,aAAa,CAAC;IAC1D,IAAA,yBAAgB,EACd,IAAA,qCAA4B,EAC1B,IAAI,EACJ;QACE,KAAK,EAAE,SAAS;KACjB,EACD,EAAE,CACH,CACF,CAAC;IACF,OAAO,MAAM,kDAAO,kBAAkB,IAAE,IAAI,CAAC,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAChE,YAAY,CAAC,IAAI,oBAAO,OAAO,EAAG,CACnC,CAAC;AACJ,CAAC;AAED,kBAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-publish-target.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/migrations/add-publish-target/add-publish-target.ts"],"names":[],"mappings":";;AAGA,yBAwBC;
|
|
1
|
+
{"version":3,"file":"add-publish-target.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/migrations/add-publish-target/add-publish-target.ts"],"names":[],"mappings":";;AAGA,yBAwBC;AA1BD,uCAA2E;AAE3E,SAAwB,MAAM,CAAC,IAAU;;IACvC,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAEnC,KAAK,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,QAAQ,EAAE,CAAC;QACvC,IAAI,OAAO,CAAC,WAAW,KAAK,aAAa;YAAE,SAAS;QACpD,IAAI,CAAC,CAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,MAAM,CAAA,EAAE,CAAC;YAC7B,OAAO,CAAC,OAAO,CAAC,OAAO,GAAG;gBACxB,QAAQ,EAAE,iCAAiC;gBAC3C,cAAc,EAAE;oBACd,UAAU,EAAE;wBACV,WAAW,EAAE,YAAY;qBAC1B;oBACD,EAAE,EAAE;wBACF,WAAW,EAAE,IAAI;qBAClB;oBACD,GAAG,EAAE;wBACH,WAAW,EAAE,KAAK;qBACnB;iBACF;gBACD,oBAAoB,EAAE,KAAK;aAC5B,CAAC;YACF,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = update;
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5
4
|
const devkit_1 = require("@nx/devkit");
|
|
6
5
|
const update_manifest_1 = require("./update-manifest");
|
|
7
6
|
function update(tree) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-fusion-manifest.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/migrations/migrate-fusion-manifest/migrate-fusion-manifest.ts"],"names":[],"mappings":";;AAIA,yBAWC;
|
|
1
|
+
{"version":3,"file":"migrate-fusion-manifest.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/migrations/migrate-fusion-manifest/migrate-fusion-manifest.ts"],"names":[],"mappings":";;AAIA,yBAWC;AAdD,uCAAyD;AACzD,uDAAmD;AAEnD,SAAwB,MAAM,CAAC,IAAU;IACvC,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAEnC,KAAK,MAAM,CAAC,EAAE,OAAO,CAAC,IAAI,QAAQ,EAAE,CAAC;QACnC,MAAM,WAAW,GAAG,IAAA,iBAAQ,EAAC,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,eAAe,CAAC,CAAC;QACnE,MAAM,OAAO,GAAG,IAAA,gCAAc,EAAC,WAAW,CAAC,CAAC;QAC5C,IAAI,CAAC,KAAK,CACR,GAAG,OAAO,CAAC,IAAI,eAAe,EAC9B,IAAI,CAAC,SAAS,iCAAM,WAAW,KAAE,IAAI,EAAE,OAAO,KAAI,IAAI,EAAE,CAAC,CAAC,CAC3D,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": ["plugin:@nx/react", "../../.eslintrc.json"],
|
|
3
|
-
"ignorePatterns": ["!**/*", "vite.config.js", "app.config.js", "**/*.spec.tsx"],
|
|
4
|
-
"overrides": [
|
|
5
|
-
{
|
|
6
|
-
"files": [
|
|
7
|
-
"*.ts",
|
|
8
|
-
"*.tsx"
|
|
9
|
-
],
|
|
10
|
-
"excludedFiles": [
|
|
11
|
-
"*.spec.ts",
|
|
12
|
-
"*.spec.tsx",
|
|
13
|
-
"*.e2e-spec.ts",
|
|
14
|
-
"*.e2e-spec.tsx",
|
|
15
|
-
"*.cy.ts",
|
|
16
|
-
"*.cy.tsx",
|
|
17
|
-
"*vite.config.*"
|
|
18
|
-
],
|
|
19
|
-
"extends": [
|
|
20
|
-
"plugin:@nrwl/nx/typescript",
|
|
21
|
-
"eslint:recommended",
|
|
22
|
-
"plugin:prettier/recommended",
|
|
23
|
-
"prettier"
|
|
24
|
-
],
|
|
25
|
-
"rules": {
|
|
26
|
-
"@typescript-eslint/no-explicit-any": "warn",
|
|
27
|
-
"@typescript-eslint/consistent-type-definitions": [
|
|
28
|
-
"warn",
|
|
29
|
-
"type"
|
|
30
|
-
],
|
|
31
|
-
"@typescript-eslint/array-type": [
|
|
32
|
-
"warn",
|
|
33
|
-
{
|
|
34
|
-
"default": "generic"
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
"prettier/prettier": [
|
|
38
|
-
"error"
|
|
39
|
-
],
|
|
40
|
-
"no-underscore-dangle": [
|
|
41
|
-
"off"
|
|
42
|
-
],
|
|
43
|
-
"no-undef": "warn",
|
|
44
|
-
"no-use-before-define": [
|
|
45
|
-
"off"
|
|
46
|
-
],
|
|
47
|
-
// Disabled because of Typescript
|
|
48
|
-
"react/prop-types": [
|
|
49
|
-
"off"
|
|
50
|
-
],
|
|
51
|
-
"no-unused-vars": [
|
|
52
|
-
"off"
|
|
53
|
-
],
|
|
54
|
-
// '@typescript-eslint/no-unused-vars': ['warn'],
|
|
55
|
-
// Disabled because of react not having default export
|
|
56
|
-
"import/default": [
|
|
57
|
-
"off"
|
|
58
|
-
],
|
|
59
|
-
"import/newline-after-import": [
|
|
60
|
-
"error"
|
|
61
|
-
],
|
|
62
|
-
"import/prefer-default-export": [
|
|
63
|
-
"off"
|
|
64
|
-
],
|
|
65
|
-
"import/namespace": [
|
|
66
|
-
"error",
|
|
67
|
-
{
|
|
68
|
-
"allowComputed": true
|
|
69
|
-
}
|
|
70
|
-
],
|
|
71
|
-
"react/require-default-props": [
|
|
72
|
-
"off",
|
|
73
|
-
{
|
|
74
|
-
"forbidDefaultForRequired": true,
|
|
75
|
-
"functions": "defaultArguments"
|
|
76
|
-
}
|
|
77
|
-
],
|
|
78
|
-
"react/react-in-jsx-scope": "off",
|
|
79
|
-
// 'react/jsx-boolean-value': ['warn'],
|
|
80
|
-
"react/jsx-pascal-case": [
|
|
81
|
-
"error"
|
|
82
|
-
],
|
|
83
|
-
// 'react/no-danger': ['warn'],
|
|
84
|
-
"react/prefer-stateless-function": [
|
|
85
|
-
"error"
|
|
86
|
-
],
|
|
87
|
-
"react/no-unused-prop-types": [
|
|
88
|
-
"error"
|
|
89
|
-
],
|
|
90
|
-
"react/no-array-index-key": [
|
|
91
|
-
"error"
|
|
92
|
-
],
|
|
93
|
-
"react/no-typos": [
|
|
94
|
-
"error"
|
|
95
|
-
],
|
|
96
|
-
"react/destructuring-assignment": [
|
|
97
|
-
"error",
|
|
98
|
-
"always"
|
|
99
|
-
],
|
|
100
|
-
// 'jsx-a11y/accessible-emoji': ['warn'],
|
|
101
|
-
// 'jsx-a11y/control-has-associated-label': ['warn'],
|
|
102
|
-
"jsx-a11y/label-has-associated-control": [
|
|
103
|
-
"warn",
|
|
104
|
-
{
|
|
105
|
-
"labelComponents": [],
|
|
106
|
-
"labelAttributes": [],
|
|
107
|
-
"controlComponents": [],
|
|
108
|
-
"assert": "either",
|
|
109
|
-
"depth": 25
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
// '@typescript-eslint/restrict-plus-operands': ['warn'],
|
|
113
|
-
// '@typescript-eslint/ban-ts-comment': ['warn'],
|
|
114
|
-
"@typescript-eslint/no-empty-interface": [
|
|
115
|
-
"error",
|
|
116
|
-
{
|
|
117
|
-
"allowSingleExtends": true
|
|
118
|
-
}
|
|
119
|
-
]
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"files": [
|
|
124
|
-
"*.js",
|
|
125
|
-
"*.jsx"
|
|
126
|
-
],
|
|
127
|
-
"rules": {}
|
|
128
|
-
}
|
|
129
|
-
]
|
|
130
|
-
}
|