@equinor/roma-nx-plugin 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -4
- package/src/executors/build/executor.js.map +1 -1
- package/src/executors/build/schema.d.ts +1 -1
- package/src/executors/portal/executor.d.ts +1 -2
- package/src/executors/portal/executor.js +2 -2
- package/src/executors/portal/executor.js.map +1 -1
- package/src/executors/portal/proxy.js +2 -2
- package/src/executors/portal/proxy.js.map +1 -1
- package/src/executors/portal/schema.d.ts +2 -2
- package/src/executors/publish/environment.d.ts +1 -0
- package/src/executors/publish/manifest-model.d.ts +2 -2
- package/src/executors/publish/publish-script.js +1 -1
- package/src/executors/publish/publish-script.js.map +1 -1
- package/src/executors/publish/schema.d.ts +1 -1
- package/src/executors/serve/schema.d.ts +1 -1
- package/src/generators/app/files/.eslintrc.json +130 -0
- package/src/generators/app/files/fusion-manifest.json.template +1 -1
- package/src/generators/app/files/src/App.tsx.template +10 -13
- package/src/generators/app/files/src/config.ts.template +8 -11
- package/src/generators/app/files/src/index.ts.template +19 -15
- package/src/generators/app/files/vite.config.js +2 -1
- package/src/generators/app/generator.js +46 -56
- package/src/generators/app/generator.js.map +1 -1
- package/src/generators/app/schema.d.ts +2 -2
- package/src/generators/preset/schema.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/roma-nx-plugin",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.21",
|
|
5
5
|
"repository": "https://github.com/equinor/tops-roma",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@nx/devkit": "17.3.0",
|
|
8
8
|
"@nx/react": "17.3.0",
|
|
9
|
-
"@equinor/fusion-framework-cli": "~9.2.0",
|
|
10
9
|
"nx": "17.3.0",
|
|
11
10
|
"tslib": "^2.3.0",
|
|
12
11
|
"@azure/identity": "^3.3.0",
|
|
13
12
|
"http-proxy": "^1.18.1",
|
|
14
|
-
"@
|
|
13
|
+
"@equinor/fusion-framework-app": "7.1.15",
|
|
14
|
+
"@equinor/fusion-framework-module-service-discovery": "7.0.20",
|
|
15
|
+
"vite": "5.0.12",
|
|
16
|
+
"@vitejs/plugin-react": "4.2.1",
|
|
17
|
+
"@nx/vite": "17.3.0"
|
|
15
18
|
},
|
|
16
19
|
"peerDependencies": {
|
|
17
|
-
"@equinor/roma-framework": "
|
|
20
|
+
"@equinor/roma-framework": ">=0.0.10"
|
|
18
21
|
},
|
|
19
22
|
"type": "commonjs",
|
|
20
23
|
"main": "./src/index.js",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/build/executor.ts"],"names":[],"mappings":";;;AAEA,uCAA0C;AAE1C,gHAA0E;AAC1E,mDAA6B;AAG7B;;;;;;GAMG;AACH,SAAS,iBAAiB,CAAI,KAAQ,EAAE,KAAa;IACnD,MAAM,SAAS,GAAG,OAAO,KAAK,KAAK,SAAS,IAAI,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,CAAC,CAAC;IAChE,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/build/executor.ts"],"names":[],"mappings":";;;AAEA,uCAA0C;AAE1C,gHAA0E;AAC1E,mDAA6B;AAG7B;;;;;;GAMG;AACH,SAAS,iBAAiB,CAAI,KAAQ,EAAE,KAAa;IACnD,MAAM,SAAS,GAAG,OAAO,KAAK,KAAK,SAAS,IAAI,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,CAAC,CAAC;IAChE,MAAM,UAAU,GAAI,KAAgB,KAAK,EAAE,CAAC;IAC5C,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,sBAAsB,KAAK,eAAe,CAAC,CAA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AAE;gBACR,qCAAqC,OAAO,CAAC,IAAI,IAAI,UAAU,EAAE;gBACjE,wCAAwC,WAAW,4BAA4B,OAAO,CAAC,IAAI,IAAI,UAAU,gBAAgB;aAC1H;YACD,GAAG,EAAE,WAAW;YAChB,YAAY,EAAE,EAAE;SACjB,EACD,OAAO,CACR,CAAC;IACJ,CAAC,CAAC;IACF,IAAI,OAAO,IAAI,OAAO,IAAI,OAAO,CAAC,KAAK,KAAK,KAAK,EAAE,CAAC;QAClD,MAAM,WAAW,GAAG,qCAAqC,OAAO,CAAC,IAAI,cAAc,WAAW,EAAE,CAAC;QACjG,MAAM,KAAK,GAAG,uBAAuB,OAAO,CAAC,WAAW,OAAO,WAAW,EAAE,CAAC;QAC7E,OAAO,KAAK,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CACvB,IAAA,2BAAW,EACT;YACE,OAAO,EAAE,KAAK;YACd,GAAG,EAAE,WAAW;YAChB,YAAY,EAAE,EAAE;SACjB,EACD,OAAO,CACR,CACF,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO,KAAK,EAAE,CAAC;IACjB,CAAC;AACH,CAAC;AA7CD,8BA6CC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PortalExecutorSchema } from './schema';
|
|
2
|
-
|
|
3
|
-
export default function runExecutor(options: PortalExecutorSchema, context: ExecutorContext): Promise<{
|
|
2
|
+
export default function runExecutor(options: PortalExecutorSchema): Promise<{
|
|
4
3
|
success: boolean;
|
|
5
4
|
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const proxy_1 = require("./proxy");
|
|
4
|
-
async function runExecutor(options
|
|
5
|
-
return new Promise((resolve
|
|
4
|
+
async function runExecutor(options) {
|
|
5
|
+
return new Promise((resolve) => {
|
|
6
6
|
const { server, proxy } = (0, proxy_1.proxyServer)(options.port, options.portal, options.additionalProxyTargets);
|
|
7
7
|
proxy.on('close', () => {
|
|
8
8
|
console.log('Proxy connection closed');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/portal/executor.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/portal/executor.ts"],"names":[],"mappings":";;AACA,mCAAsC;AAEvB,KAAK,UAAU,WAAW,CAAC,OAA6B;IACrE,OAAO,IAAI,OAAO,CAAuB,CAAC,OAAO,EAAE,EAAE;QACnD,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,mBAAW,EACnC,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,MAAM,EACd,OAAO,CAAC,sBAAsB,CAC/B,CAAC;QACF,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YACrB,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;YACvC,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,OAAO,CAAC,GAAG,CAAC,mCAAmC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC;AAdD,8BAcC"}
|
|
@@ -58,7 +58,7 @@ const proxyServer = (port, target, additionalTarget) => {
|
|
|
58
58
|
*/
|
|
59
59
|
proxy.on('proxyReq', function (proxyReq, req, res) {
|
|
60
60
|
console.log(
|
|
61
|
-
// @ts-
|
|
61
|
+
// @ts-expect-error Params that exist but are missing in type definition
|
|
62
62
|
`[REQ]: Proxy ${req.method} ${req.url} to ${proxyReq._currentUrl}`);
|
|
63
63
|
proxyReq.removeHeader('origin');
|
|
64
64
|
res.removeHeader('origin');
|
|
@@ -135,7 +135,7 @@ const proxyServer = (port, target, additionalTarget) => {
|
|
|
135
135
|
* If there are no additional configuration options, it forwards the request to the proxy server with the default target option.
|
|
136
136
|
*/
|
|
137
137
|
if (['GET', 'POST', 'PUT', 'DELETE'].indexOf(req.method) > -1) {
|
|
138
|
-
|
|
138
|
+
const targetKeys = Object.keys(additionalTarget !== null && additionalTarget !== void 0 ? additionalTarget : {});
|
|
139
139
|
const manualConfig = targetKeys.find((v) => req.url.startsWith(v));
|
|
140
140
|
if (manualConfig) {
|
|
141
141
|
const config = additionalTarget[manualConfig];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/portal/proxy.ts"],"names":[],"mappings":";;;AAAA,2CAA8D;AAE9D,+BAAqE;AAErE;;;;GAIG;AACH,MAAM,UAAU,GAAG,CACjB,GAAoB,EACpB,GAAoC,EACpC,EAAE;;IACF,GAAG,CAAC,SAAS,CACX,6BAA6B,EAC7B,MAAA,GAAG,CAAC,OAAO,CAAC,MAAM,mCAAI,uBAAuB,CAC9C,CAAC;IAEF,IAAI,GAAG,CAAC,OAAO,CAAC,+BAA+B,CAAC,EAAE,CAAC;QACjD,GAAG,CAAC,SAAS,CACX,8BAA8B,EAC9B,GAAG,CAAC,OAAO,CAAC,+BAA+B,CAAC,CAC7C,CAAC;IACJ,CAAC;IAED,IAAI,GAAG,CAAC,OAAO,CAAC,gCAAgC,CAAC,EAAE,CAAC;QAClD,GAAG,CAAC,SAAS,CACX,8BAA8B,EAC9B,GAAG,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAC9C,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,SAAS,CAAC,8BAA8B,EAAE,eAAe,CAAC,CAAC;IACjE,CAAC;IACD,GAAG,CAAC,SAAS,CAAC,+BAA+B,EAAE,qBAAqB,CAAC,CAAC;IAEtE,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QACvB,GAAG,CAAC,SAAS,CAAC,kCAAkC,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;AACH,CAAC,CAAC;AAEF;;;;;;;;;GASG;AACI,MAAM,WAAW,GAAG,CACzB,IAAY,EACZ,MAAc,EACd,gBAGC,EACD,EAAE;IACF,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAE9B;;OAEG;IACH,MAAM,KAAK,GAAG,IAAA,8BAAiB,EAAC;QAC9B,MAAM;QACN,MAAM,EAAE,KAAK;QACb,YAAY,EAAE,IAAI;QAClB,WAAW,EAAE,KAAK,CAAC,MAAM;QACzB,YAAY,EAAE,MAAO,EAAE,aAAa;QACpC,eAAe,EAAE,IAAI;QACrB,OAAO,EAAE;YACP,gBAAgB,EAAE,aAAa;YAC/B,8BAA8B;SAC/B;KACF,CAAC,CAAC;IAEH;;;OAGG;IACH,KAAK,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,QAAQ,EAAE,GAAG,EAAE,GAAG;QAC/C,OAAO,CAAC,GAAG;QACT,
|
|
1
|
+
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/portal/proxy.ts"],"names":[],"mappings":";;;AAAA,2CAA8D;AAE9D,+BAAqE;AAErE;;;;GAIG;AACH,MAAM,UAAU,GAAG,CACjB,GAAoB,EACpB,GAAoC,EACpC,EAAE;;IACF,GAAG,CAAC,SAAS,CACX,6BAA6B,EAC7B,MAAA,GAAG,CAAC,OAAO,CAAC,MAAM,mCAAI,uBAAuB,CAC9C,CAAC;IAEF,IAAI,GAAG,CAAC,OAAO,CAAC,+BAA+B,CAAC,EAAE,CAAC;QACjD,GAAG,CAAC,SAAS,CACX,8BAA8B,EAC9B,GAAG,CAAC,OAAO,CAAC,+BAA+B,CAAC,CAC7C,CAAC;IACJ,CAAC;IAED,IAAI,GAAG,CAAC,OAAO,CAAC,gCAAgC,CAAC,EAAE,CAAC;QAClD,GAAG,CAAC,SAAS,CACX,8BAA8B,EAC9B,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,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;IAEH;;;;OAIG;IACH,OAAO;QACL,MAAM;QACN,KAAK;KACN,CAAC;AACJ,CAAC,CAAC;AA9JW,QAAA,WAAW,eA8JtB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ServerOptions } from 'http-proxy';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export type PortalExecutorSchema = {
|
|
4
4
|
portal: string;
|
|
5
5
|
port: number;
|
|
6
6
|
additionalProxyTargets?: Record<
|
|
7
7
|
string,
|
|
8
8
|
ServerOptions & { ignoreTargetPath?: boolean }
|
|
9
9
|
>;
|
|
10
|
-
}
|
|
10
|
+
};
|
|
@@ -4,12 +4,12 @@ export type Manifest = {
|
|
|
4
4
|
shortName: string;
|
|
5
5
|
name: string;
|
|
6
6
|
description: string;
|
|
7
|
-
tags: string
|
|
7
|
+
tags: Array<string>;
|
|
8
8
|
hide: boolean;
|
|
9
9
|
order: number;
|
|
10
10
|
type: string;
|
|
11
11
|
accentColor: string;
|
|
12
|
-
icon:
|
|
12
|
+
icon: string;
|
|
13
13
|
categoryId: string;
|
|
14
14
|
category: Category;
|
|
15
15
|
entry?: string;
|
|
@@ -50,7 +50,7 @@ let token;
|
|
|
50
50
|
const publishApplication = async (appName, pathToOutput, options) => {
|
|
51
51
|
var _a;
|
|
52
52
|
let env = options.environment;
|
|
53
|
-
// @ts-expect-error
|
|
53
|
+
// @ts-expect-error Need to rewrite this as nx expects production, not prod.
|
|
54
54
|
if (env === 'prod')
|
|
55
55
|
env = 'production';
|
|
56
56
|
const config = configMap[env];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-script.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/publish/publish-script.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAC5C,yCAAiC;AACjC,8CAAyD;AAGzD,yCAA2C;AAC3C,yCAAsC;AAEtC,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,EAAE,EAAE;QACF,OAAO,EAAE,4BAA4B;QACrC,aAAa,EAAE,IAAI;QACnB,SAAS,EAAE,CAAC,wCAAwC,CAAC;KACtD;IACD,UAAU,EAAE;QACV,OAAO,EAAE,0BAA0B;QACnC,aAAa,EAAE,KAAK;QACpB,SAAS,EAAE,CAAC,iCAAiC,CAAC;KAC/C;CACF,CAAC;AAEF;;GAEG;AACH,IAAI,KAAa,CAAC;AAElB;;;;;;GAMG;AACI,MAAM,kBAAkB,GAAG,KAAK,EACrC,OAAe,EACf,YAAoB,EACpB,OAA8B,EAC9B,EAAE;;IACF,IAAI,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC;IAC9B,
|
|
1
|
+
{"version":3,"file":"publish-script.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/publish/publish-script.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAC5C,yCAAiC;AACjC,8CAAyD;AAGzD,yCAA2C;AAC3C,yCAAsC;AAEtC,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,wCAA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AAmC,OAAO,gBAAgB,CAAC,CAAC;QACxE,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CACX,0EAA0E,GAAG,CAAC,MAAM,EAAE,CACvF,CAAC;QACF,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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Defines the schema for the configuration object passed to the `publish` executor.
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type PublishExecutorSchema = {
|
|
5
5
|
/**
|
|
6
6
|
* The environment to publish the application to.
|
|
7
7
|
* Can be one of 'dev', 'production', or 'qa'.
|
|
@@ -0,0 +1,130 @@
|
|
|
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
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
<% if (!minimal) { %>
|
|
1
|
+
<% if (!minimal && !routing) { %>
|
|
2
2
|
import { Card, Typography, Button, Icon } from '@equinor/eds-core-react';
|
|
3
3
|
import { more_vertical } from '@equinor/eds-icons';
|
|
4
4
|
<% } else { %>
|
|
5
5
|
import { Typography } from '@equinor/eds-core-react';
|
|
6
6
|
<% } %>
|
|
7
7
|
<% if (routing) { %>
|
|
8
|
-
import {
|
|
8
|
+
import { RouterProvider, Link, RouteObject } from 'react-router-dom';
|
|
9
|
+
import { NavigationModule } from '@equinor/fusion-framework-module-navigation';
|
|
10
|
+
import { useAppModule } from '@equinor/fusion-framework-react-app';
|
|
9
11
|
|
|
10
12
|
const Root = () => <>
|
|
11
13
|
<Typography variant="body_short_link" as={Link} to="/sub">
|
|
@@ -23,21 +25,16 @@
|
|
|
23
25
|
);
|
|
24
26
|
|
|
25
27
|
|
|
26
|
-
const router = createBrowserRouter([
|
|
27
|
-
{ path: '/', element:
|
|
28
|
-
<Root/> },
|
|
29
|
-
{ path: '/sub', element:
|
|
30
|
-
<SubRoot/> },
|
|
31
|
-
], {
|
|
32
|
-
basename: '/apps/<%= name %>',
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
|
|
36
28
|
<% } %>
|
|
37
29
|
|
|
38
30
|
|
|
39
|
-
export const App = (
|
|
31
|
+
export const App = (props: Record<string, unknown>) => {
|
|
40
32
|
<% if (!minimal && routing) { %>
|
|
33
|
+
const module = useAppModule<NavigationModule>('navigation');
|
|
34
|
+
const router = module.createRouter([
|
|
35
|
+
{ path: '/', element: <Root /> },
|
|
36
|
+
{ path: '/sub', element: <SubRoot /> },
|
|
37
|
+
] as Array<RouteObject>);
|
|
41
38
|
return (<>
|
|
42
39
|
<Typography variant="h1">Hello <%= name %>!</Typography>
|
|
43
40
|
<RouterProvider router={router}/>
|
|
@@ -2,24 +2,21 @@ import type { AppModuleInitiator } from '@equinor/fusion-framework-react-app';
|
|
|
2
2
|
<% if (fusionModules.includes("fusion-framework-module-context,fusion-framework-react-module-context")) { %>
|
|
3
3
|
import {enableContext} from '@equinor/fusion-framework-module-context';
|
|
4
4
|
<% } %>
|
|
5
|
+
<% if (routing) { %>
|
|
6
|
+
import { enableNavigation } from '@equinor/fusion-framework-module-navigation';
|
|
7
|
+
<% } %>
|
|
5
8
|
|
|
6
9
|
export const configure: AppModuleInitiator = (configurator, env) => {
|
|
7
10
|
|
|
8
11
|
<% if (fusionModules.includes("fusion-framework-module-context,fusion-framework-react-module-context")) { %>
|
|
9
12
|
enableContext(configurator);
|
|
10
13
|
<% } %>
|
|
11
|
-
<% if (fusionModules.includes("fusion-framework-module-auth")) { %>
|
|
12
|
-
configurator.configureMsal(
|
|
13
|
-
{
|
|
14
|
-
tenantId: '3aa4a235-b6e2-48d5-9195-7fcf05b459b0',
|
|
15
|
-
clientId: 'ROMA_CLIENT_ID_HERE',
|
|
16
|
-
redirectUri: '/authentication/login-callback',
|
|
17
|
-
},
|
|
18
|
-
{ requiresAuth: true },
|
|
19
|
-
);
|
|
20
|
-
<% } %>
|
|
21
|
-
/** print render environment arguments */
|
|
22
14
|
|
|
15
|
+
/** enable portal service */
|
|
16
|
+
configurator.useFrameworkServiceClient('portal');
|
|
17
|
+
<% if (routing) { %>
|
|
18
|
+
enableNavigation(configurator, '/apps/<%= name %>');
|
|
19
|
+
<% } %>
|
|
23
20
|
/** callback when configurations is created */
|
|
24
21
|
configurator.onConfigured((config) => {
|
|
25
22
|
console.log('application config created', config);
|
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
import { createElement } from 'react';
|
|
2
2
|
import { createRoot } from 'react-dom/client';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
RomaComponentRenderArgs as ComponentRenderArgs,
|
|
6
|
+
makeComponent,
|
|
7
|
+
} from '@equinor/roma-framework';
|
|
5
8
|
|
|
6
9
|
import configure from './config';
|
|
7
10
|
import App from './App';
|
|
8
11
|
|
|
9
|
-
/** create a render component */
|
|
10
|
-
const appComponent = createElement(App);
|
|
11
|
-
|
|
12
|
-
/** create React render root component */
|
|
13
|
-
const createApp = (args: ComponentRenderArgs) => makeComponent(appComponent, args, configure);
|
|
14
|
-
|
|
15
12
|
/** Render function */
|
|
16
13
|
export const renderApp = (el: HTMLElement, args: ComponentRenderArgs) => {
|
|
17
|
-
/** make render element */
|
|
18
|
-
const app = createApp(args);
|
|
19
14
|
|
|
20
|
-
/** create render
|
|
21
|
-
const
|
|
15
|
+
/** create a render component */
|
|
16
|
+
const appComponent = createElement(App, args.env);
|
|
17
|
+
|
|
18
|
+
/** create React render root component */
|
|
19
|
+
const createApp = (args: ComponentRenderArgs) => makeComponent(appComponent, args, configure);
|
|
20
|
+
|
|
21
|
+
/** make render element */
|
|
22
|
+
const app = createApp(args);
|
|
23
|
+
|
|
24
|
+
/** create render root from provided element */
|
|
25
|
+
const root = createRoot(el);
|
|
22
26
|
|
|
23
|
-
/** render Application */
|
|
24
|
-
root.render(createElement(app));
|
|
27
|
+
/** render Application */
|
|
28
|
+
root.render(createElement(app));
|
|
25
29
|
|
|
26
|
-
/** Teardown */
|
|
27
|
-
return () => root.unmount();
|
|
30
|
+
/** Teardown */
|
|
31
|
+
return () => root.unmount();
|
|
28
32
|
};
|
|
29
33
|
|
|
30
34
|
export default renderApp;
|
|
@@ -4,7 +4,8 @@ import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
|
4
4
|
|
|
5
5
|
export default ({ mode, command }) => {
|
|
6
6
|
return defineConfig({
|
|
7
|
-
plugins:
|
|
7
|
+
plugins:
|
|
8
|
+
command === 'serve' ? [nxViteTsPaths()] : [react(), nxViteTsPaths()],
|
|
8
9
|
resolve: {
|
|
9
10
|
alias: {},
|
|
10
11
|
},
|
|
@@ -7,16 +7,18 @@ const path = tslib_1.__importStar(require("path"));
|
|
|
7
7
|
const react_1 = require("@nx/react");
|
|
8
8
|
const modules_1 = require("./data/modules");
|
|
9
9
|
async function addDependencies(tree, options) {
|
|
10
|
-
|
|
11
|
-
'@equinor/roma-framework': '^0.0.
|
|
12
|
-
'@equinor/fusion-framework': '
|
|
13
|
-
'@equinor/fusion-framework-module-app': '
|
|
14
|
-
'@equinor/eds-core-react': '^0.
|
|
10
|
+
const dependencies = {
|
|
11
|
+
'@equinor/roma-framework': '^0.0.10',
|
|
12
|
+
'@equinor/fusion-framework': '7.0.30',
|
|
13
|
+
'@equinor/fusion-framework-module-app': '5.2.13',
|
|
14
|
+
'@equinor/eds-core-react': '^0.36.0',
|
|
15
|
+
'@equinor/eds-data-grid-react': '^0.3.0',
|
|
15
16
|
'@equinor/eds-icons': '^0.20.0',
|
|
16
17
|
'@equinor/eds-tokens': '^0.9.2',
|
|
17
|
-
'@equinor/fusion-framework-react': '
|
|
18
|
-
'@equinor/fusion-framework-react-app': '
|
|
19
|
-
'@equinor/fusion-framework-react-module': '
|
|
18
|
+
'@equinor/fusion-framework-react': '6.0.2',
|
|
19
|
+
'@equinor/fusion-framework-react-app': '4.3.3',
|
|
20
|
+
'@equinor/fusion-framework-react-module': '3.0.8',
|
|
21
|
+
'@equinor/fusion-framework-module-navigation': '3.1.4',
|
|
20
22
|
'styled-components': '^6.0.8',
|
|
21
23
|
};
|
|
22
24
|
options.fusionModules
|
|
@@ -24,69 +26,63 @@ async function addDependencies(tree, options) {
|
|
|
24
26
|
.forEach((module) => {
|
|
25
27
|
dependencies[`@equinor/${module}`] = modules_1.modules[module];
|
|
26
28
|
});
|
|
27
|
-
if (options.routing) {
|
|
28
|
-
dependencies = Object.assign(Object.assign({}, dependencies), { '@equinor/fusion-framework-module-navigation': '^3.0.3' });
|
|
29
|
-
}
|
|
30
29
|
const devDependencies = {
|
|
31
|
-
'@equinor/fusion-framework-cli': '
|
|
32
|
-
'vite-tsconfig-paths': '
|
|
30
|
+
'@equinor/fusion-framework-cli': '9.2.1',
|
|
31
|
+
'vite-tsconfig-paths': '4.2.1',
|
|
33
32
|
};
|
|
34
33
|
return (0, devkit_1.runTasksInSerial)(...[
|
|
35
34
|
(0, devkit_1.removeDependenciesFromPackageJson)(tree, Object.keys(dependencies), Object.keys(devDependencies)),
|
|
36
35
|
(0, devkit_1.addDependenciesToPackageJson)(tree, dependencies, devDependencies),
|
|
37
36
|
]);
|
|
38
37
|
}
|
|
39
|
-
function updateTargets(tree,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
json.targets.serve = {
|
|
47
|
-
executor: '@equinor/roma-nx-plugin:serve',
|
|
48
|
-
options: {
|
|
49
|
-
port: (_a = options.devServerPort) !== null && _a !== void 0 ? _a : 3000,
|
|
38
|
+
function updateTargets(tree, options) {
|
|
39
|
+
var _a;
|
|
40
|
+
const existing = (0, devkit_1.readProjectConfiguration)(tree, options.name);
|
|
41
|
+
(0, devkit_1.updateProjectConfiguration)(tree, options.name, Object.assign(Object.assign({}, existing), { targets: {
|
|
42
|
+
build: {
|
|
43
|
+
executor: '@equinor/roma-nx-plugin:build',
|
|
44
|
+
options: {},
|
|
50
45
|
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
};
|
|
56
|
-
json.targets.publish = {
|
|
57
|
-
executor: '@equinor/roma-nx-plugin:publish',
|
|
58
|
-
configurations: {
|
|
59
|
-
production: {
|
|
60
|
-
environment: 'production',
|
|
61
|
-
},
|
|
62
|
-
qa: {
|
|
63
|
-
environment: 'qa',
|
|
46
|
+
serve: {
|
|
47
|
+
executor: '@equinor/roma-nx-plugin:serve',
|
|
48
|
+
options: {
|
|
49
|
+
port: (_a = options.devServerPort) !== null && _a !== void 0 ? _a : 3000,
|
|
64
50
|
},
|
|
65
|
-
|
|
66
|
-
|
|
51
|
+
},
|
|
52
|
+
portal: {
|
|
53
|
+
executor: '@equinor/roma-nx-plugin:portal',
|
|
54
|
+
options: {},
|
|
55
|
+
},
|
|
56
|
+
publish: {
|
|
57
|
+
executor: '@equinor/roma-nx-plugin:publish',
|
|
58
|
+
configurations: {
|
|
59
|
+
production: {
|
|
60
|
+
environment: 'production',
|
|
61
|
+
},
|
|
62
|
+
qa: {
|
|
63
|
+
environment: 'qa',
|
|
64
|
+
},
|
|
65
|
+
dev: {
|
|
66
|
+
environment: 'dev',
|
|
67
|
+
},
|
|
67
68
|
},
|
|
69
|
+
defaultConfiguration: 'dev',
|
|
68
70
|
},
|
|
69
|
-
|
|
70
|
-
};
|
|
71
|
-
delete json.targets.preview;
|
|
72
|
-
return json;
|
|
73
|
-
});
|
|
71
|
+
} }));
|
|
74
72
|
}
|
|
75
73
|
async function appGenerator(tree, options) {
|
|
76
74
|
var _a;
|
|
77
75
|
const config = (0, devkit_1.getWorkspaceLayout)(tree);
|
|
78
|
-
let appPath = '
|
|
79
|
-
if (config.appsDir) {
|
|
76
|
+
let appPath = './';
|
|
77
|
+
if (config.appsDir && options.projectNameAndRootFormat !== 'as-provided') {
|
|
80
78
|
appPath = config.appsDir;
|
|
81
79
|
}
|
|
82
80
|
if (options.directory) {
|
|
83
81
|
appPath = path.join(appPath, options.directory);
|
|
84
82
|
}
|
|
85
83
|
const projectRoot = path.join(appPath, options.name);
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
await (0, react_1.applicationGenerator)(tree, Object.assign(Object.assign({}, options), { directory, tags: [(_a = options.tags) !== null && _a !== void 0 ? _a : '', 'roma-application'].join(','), rootProject: false, bundler: 'vite' }));
|
|
89
|
-
updateTargets(tree, projectRoot, options);
|
|
84
|
+
await (0, react_1.applicationGenerator)(tree, Object.assign(Object.assign({}, options), { tags: [(_a = options.tags) !== null && _a !== void 0 ? _a : '', 'roma-application'].join(','), rootProject: false, bundler: 'vite' }));
|
|
85
|
+
updateTargets(tree, options);
|
|
90
86
|
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files'), projectRoot, options);
|
|
91
87
|
await addDependencies(tree, options);
|
|
92
88
|
await (0, devkit_1.formatFiles)(tree);
|
|
@@ -97,12 +93,6 @@ async function appGenerator(tree, options) {
|
|
|
97
93
|
tree.delete(`${projectRoot}/index.html`);
|
|
98
94
|
tree.delete(`${projectRoot}/public`);
|
|
99
95
|
tree.delete(`${projectRoot}/vite.config.ts`);
|
|
100
|
-
// if (options.linter && isEslintConfigSupported(tree)) {
|
|
101
|
-
// Create eslint config project and extend as below:
|
|
102
|
-
// Package must be published as @equinor/eslint-config-roma
|
|
103
|
-
// See: https://eslint.org/docs/latest/extend/shareable-configs
|
|
104
|
-
// addExtendsToLintConfig(tree, options.appProjectRoot, '@equinor/roma');
|
|
105
|
-
// }
|
|
106
96
|
if (options.skipPackageJson) {
|
|
107
97
|
return () => true;
|
|
108
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/generators/app/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAWoB;AACpB,mDAA6B;AAE7B,qCAAiD;AAEjD,4CAAyC;AAEzC,KAAK,UAAU,eAAe,CAC5B,IAAU,EACV,OAA2E;IAE3E,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/generators/app/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAWoB;AACpB,mDAA6B;AAE7B,qCAAiD;AAEjD,4CAAyC;AAEzC,KAAK,UAAU,eAAe,CAC5B,IAAU,EACV,OAA2E;IAE3E,MAAM,YAAY,GAA2B;QAC3C,yBAAyB,EAAE,SAAS;QACpC,2BAA2B,EAAE,QAAQ;QACrC,sCAAsC,EAAE,QAAQ;QAChD,yBAAyB,EAAE,SAAS;QACpC,8BAA8B,EAAE,QAAQ;QACxC,oBAAoB,EAAE,SAAS;QAC/B,qBAAqB,EAAE,QAAQ;QAC/B,iCAAiC,EAAE,OAAO;QAC1C,qCAAqC,EAAE,OAAO;QAC9C,wCAAwC,EAAE,OAAO;QACjD,6CAA6C,EAAE,OAAO;QACtD,mBAAmB,EAAE,QAAQ;KAC9B,CAAC;IACF,OAAO,CAAC,aAAa;SAClB,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACtC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QAClB,YAAY,CAAC,YAAY,MAAM,EAAE,CAAC,GAAG,iBAAO,CAAC,MAAM,CAAC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AAC;IACzC,IAAI,CAAC,MAAM,CAAC,GAAG,WAAW,SAAS,CAAC,CAAC;IACrC,IAAI,CAAC,MAAM,CAAC,GAAG,WAAW,iBAAiB,CAAC,CAAC;IAE7C,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;AAvCD,oCAuCC;AAED,kBAAe,YAAY,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NormalizedSchema } from '@nx/react/src/generators/application/schema';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export type AppGeneratorSchema = {
|
|
4
4
|
name: string;
|
|
5
5
|
fusionModules: Array<string>;
|
|
6
|
-
}
|
|
6
|
+
} & Omit<NormalizedSchema, 'bundler'>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AppGeneratorSchema } from '../app/schema';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export type PresetGeneratorSchema = {
|
|
4
4
|
name: string;
|
|
5
5
|
appName?: string;
|
|
6
6
|
tags?: string;
|
|
7
7
|
directory?: string;
|
|
8
|
-
}
|
|
8
|
+
} & AppGeneratorSchema;
|