@equinor/roma-nx-plugin 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +11 -0
  2. package/executors.json +14 -0
  3. package/generators.json +9 -0
  4. package/package.json +19 -0
  5. package/src/executors/build/executor.d.ts +5 -0
  6. package/src/executors/build/executor.js +70 -0
  7. package/src/executors/build/executor.js.map +1 -0
  8. package/src/executors/build/schema.d.ts +3 -0
  9. package/src/executors/build/schema.json +10 -0
  10. package/src/executors/serve/executor.d.ts +5 -0
  11. package/src/executors/serve/executor.js +41 -0
  12. package/src/executors/serve/executor.js.map +1 -0
  13. package/src/executors/serve/schema.d.ts +5 -0
  14. package/src/executors/serve/schema.json +23 -0
  15. package/src/generators/app/data/modules.d.ts +19 -0
  16. package/src/generators/app/data/modules.js +23 -0
  17. package/src/generators/app/data/modules.js.map +1 -0
  18. package/src/generators/app/files/app.config.js.template +14 -0
  19. package/src/generators/app/files/fusion-manifest.json.template +22 -0
  20. package/src/generators/app/files/package.json.template +6 -0
  21. package/src/generators/app/files/src/App.spec.tsx.template +34 -0
  22. package/src/generators/app/files/src/App.tsx.template +82 -0
  23. package/src/generators/app/files/src/config.ts.template +34 -0
  24. package/src/generators/app/files/src/index.ts.template +30 -0
  25. package/src/generators/app/files/src/version.ts.template +1 -0
  26. package/src/generators/app/files/vite.config.js +16 -0
  27. package/src/generators/app/generator.d.ts +5 -0
  28. package/src/generators/app/generator.js +94 -0
  29. package/src/generators/app/generator.js.map +1 -0
  30. package/src/generators/app/schema.d.ts +4 -0
  31. package/src/generators/app/schema.json +256 -0
  32. package/src/index.d.ts +0 -0
  33. package/src/index.js +1 -0
  34. package/src/index.js.map +1 -0
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # roma
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build roma` to build the library.
8
+
9
+ ## Running unit tests
10
+
11
+ Run `nx test roma` to execute the unit tests via [Jest](https://jestjs.io).
package/executors.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "executors": {
3
+ "serve": {
4
+ "implementation": "./src/executors/serve/executor",
5
+ "schema": "./src/executors/serve/schema.json",
6
+ "description": "serve executor"
7
+ },
8
+ "build": {
9
+ "implementation": "./src/executors/build/executor",
10
+ "schema": "./src/executors/build/schema.json",
11
+ "description": "build executor"
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "generators": {
3
+ "app": {
4
+ "factory": "./src/generators/app/generator",
5
+ "schema": "./src/generators/app/schema.json",
6
+ "description": "Generate a roma workbench compatible application"
7
+ }
8
+ }
9
+ }
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@equinor/roma-nx-plugin",
3
+ "private": false,
4
+ "version": "0.0.1",
5
+ "repository": "https://github.com/equinor/tops-roma",
6
+ "dependencies": {
7
+ "@nx/devkit": "16.8.1",
8
+ "@nx/react": "16.8.1",
9
+ "@nx/linter": "16.8.1",
10
+ "@equinor/fusion-framework-cli": "~9.2.0",
11
+ "nx": "16.8.1",
12
+ "tslib": "^2.3.0"
13
+ },
14
+ "type": "commonjs",
15
+ "main": "./src/index.js",
16
+ "typings": "./src/index.d.ts",
17
+ "generators": "./generators.json",
18
+ "executors": "./executors.json"
19
+ }
@@ -0,0 +1,5 @@
1
+ import { BuildExecutorSchema } from './schema';
2
+ import type { ExecutorContext } from '@nx/devkit';
3
+ export default function runExecutor(options: BuildExecutorSchema, context: ExecutorContext): Promise<{
4
+ success: boolean;
5
+ }>;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const devkit_1 = require("@nx/devkit");
5
+ const run_commands_impl_1 = require("nx/src/executors/run-commands/run-commands.impl");
6
+ const path = require("path");
7
+ /**
8
+ * Function that will validate that a value is set (not empty string, and not null-ish)
9
+ *
10
+ * @param value
11
+ * @param field
12
+ * @throws Error If validation fails, an error is thrown.
13
+ */
14
+ function assertValueExists(value, field) {
15
+ const isNullish = typeof value !== 'boolean' && (value !== null && value !== void 0 ? value : true);
16
+ const isNotempty = value !== '';
17
+ if (isNullish === true) {
18
+ throw new Error(`Validation failed: ${field} is null-like`);
19
+ }
20
+ if (!isNotempty) {
21
+ throw new Error(`Validation failed: ${field} is empty`);
22
+ }
23
+ }
24
+ /**
25
+ * Function that will read the fusion-manifest on the given path, and validate it to ensure we're not missing information
26
+ * @param manifestPath
27
+ */
28
+ function validateManifest(manifestPath) {
29
+ // TODO: Improve this, for now this is only meant as a POC that we can validate the manifest files
30
+ const manifest = (0, devkit_1.readJsonFile)(manifestPath);
31
+ assertValueExists(manifest.key, 'key');
32
+ assertValueExists(manifest.name, 'name');
33
+ assertValueExists(manifest.category, 'category');
34
+ if (manifest.type === 'standalone') {
35
+ assertValueExists(manifest.description, 'description');
36
+ assertValueExists(manifest.shortName, 'shortName');
37
+ }
38
+ }
39
+ function runExecutor(options, context) {
40
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
41
+ const projectName = context.projectName;
42
+ const project = context.workspace.projects[projectName];
43
+ const projectPath = path.resolve(context.root, project.root);
44
+ const build = () => {
45
+ validateManifest(`${projectPath}/fusion-manifest.json`);
46
+ return (0, run_commands_impl_1.default)({
47
+ commands: [
48
+ `fusion-framework-cli app build -o ${context.root}/dist/apps/${projectName}`,
49
+ `fusion-framework-cli app manifest -c ${projectPath}/fusion-manifest.json -o ${context.root}/dist/apps/${projectName}/manifest.json`,
50
+ ],
51
+ cwd: projectPath,
52
+ __unparsed__: [],
53
+ }, context);
54
+ };
55
+ if ('watch' in options && options.watch !== false) {
56
+ const fusionBuild = `fusion-framework-cli app build -o ${context.root}/dist/apps/${projectName}`;
57
+ const watch = `nx watch --projects=${context.projectName} -- ${fusionBuild}`;
58
+ return build().then(() => (0, run_commands_impl_1.default)({
59
+ command: watch,
60
+ cwd: projectPath,
61
+ __unparsed__: [],
62
+ }, context));
63
+ }
64
+ else {
65
+ return build();
66
+ }
67
+ });
68
+ }
69
+ exports.default = runExecutor;
70
+ //# sourceMappingURL=executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/build/executor.ts"],"names":[],"mappings":";;;AAEA,uCAAyC;AAEzC,uFAA0E;AAC1E,6BAA6B;AAE7B;;;;;;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,GAAa,KAAM,KAAK,EAAE,CAAC;IAC3C,IAAK,SAAS,KAAK,IAAI,EAAG;QACxB,MAAM,IAAI,KAAK,CAAC,sBAAuB,KAAM,eAAe,CAAC,CAAA;KAC9D;IACD,IAAK,CAAC,UAAU,EAAG;QACjB,MAAM,IAAI,KAAK,CAAC,sBAAuB,KAAM,WAAW,CAAC,CAAA;KAC1D;AACH,CAAC;AAED;;;GAGG;AACH,SAAS,gBAAgB,CAAC,YAAoB;IAC5C,kGAAkG;IAClG,MAAM,QAAQ,GAAG,IAAA,qBAAY,EAAc,YAAY,CAAC,CAAC;IACzD,iBAAiB,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACvC,iBAAiB,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACzC,iBAAiB,CAAC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IACjD,IAAK,QAAQ,CAAC,IAAI,KAAK,YAAY,EAAG;QACpC,iBAAiB,CAAC,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;QACvD,iBAAiB,CAAC,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;KACpD;AACH,CAAC;AAED,SAA8B,WAA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+ "version": 2,
4
+ "title": "Build executor",
5
+ "description": "",
6
+ "type": "object",
7
+ "properties": {
8
+ },
9
+ "required": []
10
+ }
@@ -0,0 +1,5 @@
1
+ import { ServeExecutorSchema } from './schema';
2
+ import type { ExecutorContext } from '@nx/devkit';
3
+ export default function runExecutor(options: ServeExecutorSchema, context: ExecutorContext): Promise<{
4
+ success: boolean;
5
+ }>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const run_commands_impl_1 = require("nx/src/executors/run-commands/run-commands.impl");
5
+ const path = require("path");
6
+ // This method will be used to resolve the path of our custom dev-portal
7
+ // const depPath = require.resolve('@equinor-roma/framework');
8
+ function runExecutor(options, context) {
9
+ var _a;
10
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
11
+ const projectName = context.projectName;
12
+ const project = context.workspace.projects[projectName];
13
+ const cwd = path.resolve(context.root, project.root);
14
+ const extraFusionArgs = [];
15
+ if (options.portal) {
16
+ extraFusionArgs.push(`--portal=${options.portal}`);
17
+ }
18
+ if (options.devPortal) {
19
+ const portalPath = path.join(context.root, options.devPortal);
20
+ const relativePath = path.relative(cwd, portalPath);
21
+ extraFusionArgs.push(`--dev-portal ${relativePath}`);
22
+ }
23
+ else {
24
+ // This is a relative path to the dev-portal (see comment on l#5)
25
+ // const relative = path.relative(projectPath, depPath);
26
+ // Change this to the dependency dev portal location.
27
+ const relative = path.relative(cwd, path.resolve(context.root, 'node_modules/@equinor/roma-framework/dev-portal'));
28
+ extraFusionArgs.push(`--dev-portal ${relative}`);
29
+ }
30
+ const manifestPath = path.relative(cwd, path.resolve(project.root, 'fusion-manifest.json'));
31
+ extraFusionArgs.push(`--manifest ${manifestPath}`);
32
+ const { projectsConfigurations, nxJsonConfiguration, workspace } = context, rest = tslib_1.__rest(context, ["projectsConfigurations", "nxJsonConfiguration", "workspace"]);
33
+ return (0, run_commands_impl_1.default)({
34
+ command: `fusion-framework-cli app dev ${extraFusionArgs.join(' ')} -p ${(_a = options.port) !== null && _a !== void 0 ? _a : 3000}`,
35
+ cwd: cwd,
36
+ __unparsed__: [],
37
+ }, context);
38
+ });
39
+ }
40
+ exports.default = runExecutor;
41
+ //# sourceMappingURL=executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/serve/executor.ts"],"names":[],"mappings":";;;AAEA,uFAA0E;AAC1E,6BAA6B;AAC7B,wEAAwE;AACxE,8DAA8D;AAG9D,SAA8B,WAAW,CACvC,OAA4B,EAC5B,OAAwB;;;QAExB,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACxC,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QACxD,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QAErD,MAAM,eAAe,GAAkB,EAAE,CAAC;QAC1C,IAAI,OAAO,CAAC,MAAM,EAAE;YAClB,eAAe,CAAC,IAAI,CAAC,YAAY,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;SACpD;QACD,IAAK,OAAO,CAAC,SAAS,EAAG;YACvB,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;YAC9D,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;YACpD,eAAe,CAAC,IAAI,CAAC,gBAAiB,YAAa,EAAE,CAAC,CAAC;SACtD;aAAM;YACL,iEAAiE;YACjE,wDAAwD;YAC1D,qDAAqD;YACrD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,iDAAiD,CAAC,CAAC,CAAC;YACnH,eAAe,CAAC,IAAI,CAAC,gBAAiB,QAAS,EAAE,CAAC,CAAC;SACpD;QACD,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,sBAAsB,CAAC,CAAC,CAAA;QAC3F,eAAe,CAAC,IAAI,CAAC,cAAe,YAAa,EAAE,CAAC,CAAA;QACpD,MAAM,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,SAAS,KAC5D,OAAO,EAD0D,IAAI,kBACrE,OAAO,EADH,8DAAmE,CAChE,CAAC;QACV,OAAO,IAAA,2BAAW,EAChB;YACE,OAAO,EAAE,gCAAgC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,OAChE,MAAA,OAAO,CAAC,IAAI,mCAAI,IAClB,EAAE;YACF,GAAG,EAAE,GAAG;YACR,YAAY,EAAE,EAAE;SACjB,EACD,OAAO,CACR,CAAC;;CACH;AArCD,8BAqCC"}
@@ -0,0 +1,5 @@
1
+ export interface ServeExecutorSchema {
2
+ port?: number;
3
+ portal?: string;
4
+ devPortal?: string;
5
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "version": 2,
4
+ "title": "Serve executor",
5
+ "description": "",
6
+ "type": "object",
7
+ "properties": {
8
+ "port": {
9
+ "type": "integer",
10
+ "description": "Port to listen on",
11
+ "default": 3000
12
+ },
13
+ "portal": {
14
+ "type": "string",
15
+ "description": "Portal host"
16
+ },
17
+ "devPortal": {
18
+ "type": "string",
19
+ "description": "Path to custom dev-portal (from workspace root) (default: use ROMA dev-portal)"
20
+ }
21
+ },
22
+ "required": []
23
+ }
@@ -0,0 +1,19 @@
1
+ export declare const modules: {
2
+ "fusion-framework-module-msal": string;
3
+ "fusion-framework-module-navigation": string;
4
+ "fusion-framework-module-context": string;
5
+ "fusion-framework-module-ag-grid": string;
6
+ "fusion-framework-module-bookmark": string;
7
+ "fusion-framework-module-event": string;
8
+ "fusion-framework-module-http": string;
9
+ "fusion-framework-module-service-discovery": string;
10
+ "fusion-framework-module-services": string;
11
+ "fusion-framework-module-signalr": string;
12
+ "fusion-framework-module-telemetry": string;
13
+ "fusion-framework-module-widget": string;
14
+ "fusion-framework-react-module-bookmark": string;
15
+ "fusion-framework-react-module-http": string;
16
+ "fusion-framework-react-module-context": string;
17
+ "fusion-framework-react-module-signalr": string;
18
+ "fusion-framework-react-module-event": string;
19
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.modules = void 0;
4
+ exports.modules = {
5
+ "fusion-framework-module-msal": "^4.0.5",
6
+ "fusion-framework-module-navigation": "^3.0.5",
7
+ "fusion-framework-module-context": "^4.0.13",
8
+ "fusion-framework-module-ag-grid": "^30.1.0",
9
+ "fusion-framework-module-bookmark": "1.0.10",
10
+ "fusion-framework-module-event": "^4.0.5",
11
+ "fusion-framework-module-http": "^5.0.6",
12
+ "fusion-framework-module-service-discovery": "^5.0.6",
13
+ "fusion-framework-module-services": "^3.1.5",
14
+ "fusion-framework-module-signalr": "^2.0.7",
15
+ "fusion-framework-module-telemetry": "^4.0.2",
16
+ "fusion-framework-module-widget": "^1.0.9",
17
+ "fusion-framework-react-module-bookmark": "^2.0.17",
18
+ "fusion-framework-react-module-http": "^3.0.5",
19
+ "fusion-framework-react-module-context": " ^6.0.12",
20
+ "fusion-framework-react-module-signalr": "^2.0.7",
21
+ "fusion-framework-react-module-event": "^3.1.2"
22
+ };
23
+ //# sourceMappingURL=modules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modules.js","sourceRoot":"","sources":["../../../../../../../plugins/roma/src/generators/app/data/modules.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG;IACrB,8BAA8B,EAAE,QAAQ;IACxC,oCAAoC,EAAE,QAAQ;IAC9C,iCAAiC,EAAE,SAAS;IAC5C,iCAAiC,EAAE,SAAS;IAC5C,kCAAkC,EAAE,QAAQ;IAC5C,+BAA+B,EAAE,QAAQ;IACzC,8BAA8B,EAAE,QAAQ;IACxC,2CAA2C,EAAE,QAAQ;IACrD,kCAAkC,EAAE,QAAQ;IAC5C,iCAAiC,EAAE,QAAQ;IAC3C,mCAAmC,EAAE,QAAQ;IAC7C,gCAAgC,EAAE,QAAQ;IAC1C,wCAAwC,EAAE,SAAS;IACnD,oCAAoC,EAAE,QAAQ;IAC9C,uCAAuC,EAAE,UAAU;IACnD,uCAAuC,EAAE,QAAQ;IACjD,qCAAqC,EAAE,QAAQ;CAChD,CAAA"}
@@ -0,0 +1,14 @@
1
+ export default () => ({
2
+ // "appKey": "",
3
+ "manifest": {
4
+ "key": "<%= name %>"
5
+ },
6
+ "environment": {
7
+ "scope": "foobar"
8
+ },
9
+ "endpoints": {
10
+ "api": "https://foo.barz"
11
+ },
12
+ // override portal lookup
13
+ "portalHost": undefined
14
+ });
@@ -0,0 +1,22 @@
1
+ {
2
+ "key": "<%= name.replace(/\s/g, "-") %>",
3
+ "version": "0.0.1",
4
+ "shortName": "<%= name %>",
5
+ "name": "<%= name %>",
6
+ "description": "",
7
+ "tags": [
8
+ "roma"
9
+ ],
10
+ "hide": false,
11
+ "order": 1,
12
+ "type": "standalone",
13
+ "accentColor": null,
14
+ "icon": null,
15
+ "categoryId": "f07e5ff3-05d6-4d8b-a056-68c3c1968279",
16
+ "category": {
17
+ "id": "f07e5ff3-05d6-4d8b-a056-68c3c1968279",
18
+ "name": "",
19
+ "color": "none",
20
+ "defaultIcon": "none"
21
+ }
22
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "main": "src/index.ts",
3
+ "type": "module",
4
+ "name": "<%= name %>",
5
+ "version": "0.0.1"
6
+ }
@@ -0,0 +1,34 @@
1
+ import { afterAll, afterEach, beforeAll, describe, expect, test } from 'vitest';
2
+ import { cleanup } from '@testing-library/react';
3
+ import { App } from './App';
4
+ import { setupServer } from 'msw/node';
5
+ import { rest } from 'msw';
6
+ import { frameworkRender } from '@equinor/roma-testing-utils';
7
+
8
+ const server = setupServer(
9
+ // Add your mock endpoints here, see msw docs for more info
10
+ // By default all requests will be sent to http://localhost/:endpoint, where endpoint is the path set in useHttpClient().method(:endpoint)
11
+ );
12
+
13
+ describe('Renders', () => {
14
+
15
+ beforeAll(() => {
16
+ server.listen();
17
+ });
18
+ afterEach(() => {
19
+ server.resetHandlers();
20
+ cleanup();
21
+ });
22
+ afterAll(() => server.close());
23
+
24
+ test('should render', () => {
25
+ const { getByText } = frameworkRender(
26
+ <App />
27
+ );
28
+ <% if (!minimal) { %>
29
+ expect(getByText('Welcome to <%= name; %>')).toBeTruthy();
30
+ <% } else { %>
31
+ expect(getByText('Hello <%= name; %>')).toBeTruthy();
32
+ <% } %>
33
+ });
34
+ });
@@ -0,0 +1,82 @@
1
+ <% if (!minimal) { %>
2
+ import { Card, Typography, Button, Icon } from '@equinor/eds-core-react';
3
+ import { more_vertical } from '@equinor/eds-icons';
4
+ <% } else { %>
5
+ import { Typography } from '@equinor/eds-core-react';
6
+ <% } %>
7
+ <% if (routing) { %>
8
+ import { Outlet, createBrowserRouter, RouterProvider, Link } from 'react-router-dom';
9
+
10
+ const Root = () => <>
11
+ <Typography variant="body_short_link" as={Link} to="/sub">
12
+ Go to Sub-Root
13
+ </Typography>
14
+ <Typography variant="h1">Welcome to Root route</Typography>
15
+ </>
16
+ const SubRoot = () => (
17
+ <>
18
+ <Typography variant="body_short_link" as={Link} to="/">
19
+ Go back to Root
20
+ </Typography>
21
+ <Typography variant="h1">Welcome to route /sub</Typography>
22
+ </>
23
+ );
24
+
25
+
26
+ const router = createBrowserRouter([
27
+ { path: '/', element:
28
+ <Root/> },
29
+ { path: '/sub', element:
30
+ <SubRoot/> },
31
+ ], {
32
+ basename: '/apps/<%= name %>',
33
+ });
34
+
35
+
36
+ <% } %>
37
+
38
+
39
+ export const App = ({ appKey }: { appKey?: string }) => {
40
+ <% if (!minimal && routing) { %>
41
+ return (<>
42
+ <Typography variant="h1">Hello <%= name %>!</Typography>
43
+ <RouterProvider router={router}/>
44
+ </>
45
+ )
46
+ <% } else if (!minimal) { %>
47
+ return (
48
+ <Card>
49
+ <Card.Header>
50
+ <Card.HeaderTitle>
51
+ <Typography variant="h5">
52
+ Welcome to <%= name %>
53
+ </Typography>
54
+ </Card.HeaderTitle>
55
+ <Button variant="ghost_icon">
56
+ <Icon
57
+ data={more_vertical}
58
+ size={24}
59
+ title="more action"
60
+ />
61
+ </Button>
62
+ </Card.Header>
63
+ <Card.Content>
64
+ <Typography variant="body_short">
65
+ This application is built with
66
+ <Typography variant="body_short_link" as="a" href="https://nx.dev/">NX</Typography>
67
+ to work within
68
+ <Typography variant="body_short_link" as="a" href="https://roma.equinor.com">Roma Workbench</Typography>
69
+ using
70
+ <Typography variant="body_short_link" as="a" href="https://equinor.github.io/fusion-framework/">Fusion
71
+ </Typography>
72
+ </Typography>
73
+ </Card.Content>
74
+ </Card>
75
+ )
76
+ <% } else { %>
77
+ return
78
+ <Typography variant="h1">Hello <%= name %>!</Typography>;
79
+ <% } %>
80
+ }
81
+
82
+ export default App;
@@ -0,0 +1,34 @@
1
+ import type { AppModuleInitiator } from '@equinor/fusion-framework-react-app';
2
+ <% if (fusionModules.includes("fusion-framework-module-context,fusion-framework-react-module-context")) { %>
3
+ import {enableContext} from '@equinor/fusion-framework-module-context';
4
+ <% } %>
5
+
6
+ export const configure: AppModuleInitiator = (configurator, env) => {
7
+
8
+ <% if (fusionModules.includes("fusion-framework-module-context,fusion-framework-react-module-context")) { %>
9
+ enableContext(configurator);
10
+ <% } %>
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
+
23
+ /** callback when configurations is created */
24
+ configurator.onConfigured((config) => {
25
+ console.log('application config created', config);
26
+ });
27
+
28
+ /** callback when the application modules has initialized */
29
+ configurator.onInitialized((instance) => {
30
+ console.log('application config initialized', instance);
31
+ });
32
+ };
33
+
34
+ export default configure;
@@ -0,0 +1,30 @@
1
+ import { createElement } from 'react';
2
+ import { createRoot } from 'react-dom/client';
3
+
4
+ import { ComponentRenderArgs, makeComponent } from '@equinor/fusion-framework-react-app';
5
+
6
+ import configure from './config';
7
+ import App from './App';
8
+
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
+ /** Render function */
16
+ export const renderApp = (el: HTMLElement, args: ComponentRenderArgs) => {
17
+ /** make render element */
18
+ const app = createApp(args);
19
+
20
+ /** create render root from provided element */
21
+ const root = createRoot(el);
22
+
23
+ /** render Application */
24
+ root.render(createElement(app));
25
+
26
+ /** Teardown */
27
+ return () => root.unmount();
28
+ };
29
+
30
+ export default renderApp;
@@ -0,0 +1 @@
1
+ export const version = '1.0,0';
@@ -0,0 +1,16 @@
1
+ import { defineConfig } from 'vite';
2
+ import react from '@vitejs/plugin-react';
3
+ import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
4
+
5
+ export default ({ mode, command }) => {
6
+ return defineConfig({
7
+ plugins: mode === 'test' ? [react(), nxViteTsPaths()] : [],
8
+ resolve: {
9
+ alias: {},
10
+ },
11
+ test: {
12
+ environment: 'jsdom',
13
+ setupFiles: ['@equinor/roma-testing-utils/lib/override-imports.tsx'],
14
+ },
15
+ });
16
+ };
@@ -0,0 +1,5 @@
1
+ import { Tree } from '@nx/devkit';
2
+ import { AppGeneratorSchema } from './schema';
3
+ import { NormalizedSchema } from '@nx/react/src/generators/application/schema';
4
+ export declare function appGenerator(tree: Tree, options: AppGeneratorSchema & Omit<NormalizedSchema, 'bundler' | 'minimal'>): Promise<() => void>;
5
+ export default appGenerator;
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.appGenerator = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const path = require("path");
7
+ const react_1 = require("@nx/react");
8
+ const modules_1 = require("./data/modules");
9
+ const eslint_file_1 = require("@nx/linter/src/generators/utils/eslint-file");
10
+ function addDependencies(tree, options) {
11
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
12
+ let dependencies = {
13
+ "@equinor/fusion-framework": "^7.0.19",
14
+ "@equinor/fusion-framework-module-app": "^5.2.4",
15
+ '@equinor/eds-core-react': '^0.32.4',
16
+ '@equinor/eds-icons': '^0.19.3',
17
+ '@equinor/eds-tokens': '^0.9.2',
18
+ '@equinor/fusion-framework-react': '^5.2.3',
19
+ '@equinor/fusion-framework-react-app': '^4.1.2',
20
+ '@equinor/fusion-framework-react-module': '^3.0.5',
21
+ 'styled-components': '^5.3.0',
22
+ };
23
+ options.fusionModules
24
+ .flatMap((module) => module.split(','))
25
+ .forEach((module) => {
26
+ dependencies[`@equinor/${module}`] = modules_1.modules[module];
27
+ });
28
+ if (options.routing) {
29
+ dependencies = Object.assign(Object.assign({}, dependencies), { '@equinor/fusion-framework-module-navigation': '^3.0.3' });
30
+ }
31
+ const devDependencies = {
32
+ '@equinor/fusion-framework-cli': '^9.1.1',
33
+ 'vite-tsconfig-paths': '^4.2.0',
34
+ };
35
+ return (0, devkit_1.runTasksInSerial)(...[
36
+ (0, devkit_1.removeDependenciesFromPackageJson)(tree, Object.keys(dependencies), Object.keys(devDependencies)),
37
+ (0, devkit_1.addDependenciesToPackageJson)(tree, dependencies, devDependencies),
38
+ ]);
39
+ });
40
+ }
41
+ function updateTargets(tree, projectRoot, options) {
42
+ (0, devkit_1.updateJson)(tree, `${projectRoot}/project.json`, (json) => {
43
+ var _a;
44
+ json.targets.build = {
45
+ executor: '@equinor/roma:build',
46
+ options: {},
47
+ };
48
+ json.targets.serve = {
49
+ executor: '@equinor/roma:serve',
50
+ options: {
51
+ port: (_a = options.devServerPort) !== null && _a !== void 0 ? _a : 3000,
52
+ },
53
+ };
54
+ delete json.targets.preview;
55
+ return json;
56
+ });
57
+ }
58
+ function appGenerator(tree, options) {
59
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
60
+ const config = (0, devkit_1.getWorkspaceLayout)(tree);
61
+ let appPath = '/';
62
+ if (config.appsDir) {
63
+ appPath = config.appsDir;
64
+ }
65
+ if (options.directory) {
66
+ appPath = path.join(appPath, options.directory);
67
+ }
68
+ const projectRoot = path.join(appPath, options.name);
69
+ yield (0, react_1.applicationGenerator)(tree, Object.assign(Object.assign({}, options), { directory: appPath, rootProject: false, bundler: 'vite' }));
70
+ updateTargets(tree, projectRoot, options);
71
+ (0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files'), projectRoot, options);
72
+ yield addDependencies(tree, options);
73
+ yield (0, devkit_1.formatFiles)(tree);
74
+ tree.delete(`${projectRoot}/src/app`);
75
+ tree.delete(`${projectRoot}/src/assets`);
76
+ tree.delete(`${projectRoot}/src/main.tsx`);
77
+ tree.delete(`${projectRoot}/src/styles.css`);
78
+ tree.delete(`${projectRoot}/index.html`);
79
+ tree.delete(`${projectRoot}/public`);
80
+ tree.delete(`${projectRoot}/vite.config.ts`);
81
+ if (options.linter && (0, eslint_file_1.isEslintConfigSupported)(tree)) {
82
+ // Create eslint config project and extend as below:
83
+ // Package must be published as @equinor/eslint-config-roma
84
+ // See: https://eslint.org/docs/latest/extend/shareable-configs
85
+ // addExtendsToLintConfig(tree, options.appProjectRoot, '@equinor/roma');
86
+ }
87
+ return () => {
88
+ (0, devkit_1.installPackagesTask)(tree);
89
+ };
90
+ });
91
+ }
92
+ exports.appGenerator = appGenerator;
93
+ exports.default = appGenerator;
94
+ //# sourceMappingURL=generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["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AAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACrC,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QACxB,IAAI,CAAC,MAAM,CAAC,GAAG,WAAW,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,MAAM,CAAC,GAAG,WAAW,aAAa,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,GAAG,WAAW,eAAe,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,GAAG,WAAW,iBAAiB,CAAC,CAAC;QAC7C,IAAI,CAAC,MAAM,CAAC,GAAG,WAAW,aAAa,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,GAAG,WAAW,SAAS,CAAC,CAAC;QACrC,IAAI,CAAC,MAAM,CAAC,GAAG,WAAW,iBAAiB,CAAC,CAAC;QAE7C,IAAI,OAAO,CAAC,MAAM,IAAI,IAAA,qCAAuB,EAAC,IAAI,CAAC,EAAE;YACnD,oDAAoD;YACpD,2DAA2D;YAC3D,+DAA+D;YAC/D,yEAAyE;SAC1E;QAED,OAAO,GAAG,EAAE;YACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC;IACJ,CAAC;CAAA;AA3CD,oCA2CC;AAED,kBAAe,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ export interface AppGeneratorSchema {
2
+ name: string;
3
+ fusionModules: Array<string>;
4
+ }
@@ -0,0 +1,256 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "App",
4
+ "title": "",
5
+ "type": "object",
6
+ "properties": {
7
+ "name": {
8
+ "description": "The name of the application.",
9
+ "type": "string",
10
+ "$default": {
11
+ "$source": "argv",
12
+ "index": 0
13
+ },
14
+ "x-prompt": "What name would you like to use for the application?",
15
+ "pattern": "^[a-zA-Z][^:]*$"
16
+ },
17
+ "directory": {
18
+ "description": "The directory of the new application.",
19
+ "type": "string",
20
+ "alias": "dir",
21
+ "x-priority": "important"
22
+ },
23
+ "projectNameAndRootFormat": {
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
+ "type": "string",
26
+ "enum": [
27
+ "as-provided",
28
+ "derived"
29
+ ]
30
+ },
31
+ "style": {
32
+ "description": "The file extension to be used for style files.",
33
+ "type": "string",
34
+ "default": "css",
35
+ "alias": "s",
36
+ "x-prompt": {
37
+ "message": "Which stylesheet format would you like to use?",
38
+ "type": "list",
39
+ "items": [
40
+ {
41
+ "value": "css",
42
+ "label": "CSS"
43
+ },
44
+ {
45
+ "value": "scss",
46
+ "label": "SASS(.scss) [ http://sass-lang.com ]"
47
+ },
48
+ {
49
+ "value": "less",
50
+ "label": "LESS [ http://lesscss.org ]"
51
+ },
52
+ {
53
+ "value": "styled-components",
54
+ "label": "styled-components [ https://styled-components.com ]"
55
+ },
56
+ {
57
+ "value": "@emotion/styled",
58
+ "label": "emotion [ https://emotion.sh ]"
59
+ },
60
+ {
61
+ "value": "styled-jsx",
62
+ "label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]"
63
+ },
64
+ {
65
+ "value": "none",
66
+ "label": "None"
67
+ },
68
+ {
69
+ "value": "styl",
70
+ "label": "Stylus(.styl) [ http://stylus-lang.com ] (DEPRECATED)"
71
+ }
72
+ ]
73
+ }
74
+ },
75
+ "linter": {
76
+ "description": "The tool to use for running lint checks.",
77
+ "type": "string",
78
+ "enum": [
79
+ "eslint",
80
+ "none"
81
+ ],
82
+ "default": "eslint"
83
+ },
84
+ "routing": {
85
+ "type": "boolean",
86
+ "description": "Generate application with routes.",
87
+ "x-prompt": "Would you like to add React Router to this application?",
88
+ "default": false
89
+ },
90
+ "skipFormat": {
91
+ "description": "Skip formatting files.",
92
+ "type": "boolean",
93
+ "default": false,
94
+ "x-priority": "internal"
95
+ },
96
+ "skipNxJson": {
97
+ "description": "Skip updating `nx.json` with default options based on values provided to this app.",
98
+ "type": "boolean",
99
+ "default": false,
100
+ "x-priority": "internal"
101
+ },
102
+ "unitTestRunner": {
103
+ "type": "string",
104
+ "enum": [
105
+ "jest",
106
+ "vitest",
107
+ "none"
108
+ ],
109
+ "description": "Test runner to use for unit tests.",
110
+ "default": "vitest"
111
+ },
112
+ "inSourceTests": {
113
+ "type": "boolean",
114
+ "default": false,
115
+ "description": "When using Vitest, separate spec files will not be generated and instead will be included within the source files. Read more on the Vitest docs site: https://vitest.dev/guide/in-source.html"
116
+ },
117
+ "e2eTestRunner": {
118
+ "type": "string",
119
+ "enum": [
120
+ "cypress",
121
+ "playwright",
122
+ "none"
123
+ ],
124
+ "description": "Test runner to use for end to end (E2E) tests.",
125
+ "x-prompt": "Which E2E test runner would you like to use?",
126
+ "default": "none"
127
+ },
128
+ "tags": {
129
+ "type": "string",
130
+ "description": "Add tags to the application (used for linting).",
131
+ "alias": "t"
132
+ },
133
+ "pascalCaseFiles": {
134
+ "type": "boolean",
135
+ "description": "Use pascal case component file name (e.g. `App.tsx`).",
136
+ "alias": "P",
137
+ "default": false
138
+ },
139
+ "classComponent": {
140
+ "type": "boolean",
141
+ "description": "Use class components instead of functional component.",
142
+ "alias": "C",
143
+ "default": false
144
+ },
145
+ "js": {
146
+ "type": "boolean",
147
+ "description": "Generate JavaScript files rather than TypeScript files.",
148
+ "default": false
149
+ },
150
+ "globalCss": {
151
+ "type": "boolean",
152
+ "description": "Default is `false`. When `true`, the component is generated with `*.css`/`*.scss` instead of `*.module.css`/`*.module.scss`.",
153
+ "default": false
154
+ },
155
+ "strict": {
156
+ "type": "boolean",
157
+ "description": "Creates an application with strict mode and strict type checking.",
158
+ "default": true
159
+ },
160
+ "setParserOptionsProject": {
161
+ "type": "boolean",
162
+ "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
163
+ "default": false
164
+ },
165
+ "compiler": {
166
+ "type": "string",
167
+ "description": "The compiler to use.",
168
+ "enum": [
169
+ "babel",
170
+ "swc"
171
+ ],
172
+ "default": "babel"
173
+ },
174
+ "skipPackageJson": {
175
+ "description": "Do not add dependencies to `package.json`.",
176
+ "type": "boolean",
177
+ "default": false,
178
+ "x-priority": "internal"
179
+ },
180
+ "rootProject": {
181
+ "description": "Create a application at the root of the workspace",
182
+ "type": "boolean",
183
+ "default": false,
184
+ "hidden": true
185
+ },
186
+ "minimal": {
187
+ "description": "Generate a minimal application",
188
+ "type": "boolean",
189
+ "default": false,
190
+ "hidden": true
191
+ },
192
+ "fusionModules": {
193
+ "description": "Add Fusion modules to the application.",
194
+ "x-prompt": {
195
+ "message": "Which fusion modules would you like to add to this application?",
196
+ "type": "list",
197
+ "multiselect": true,
198
+ "items": [
199
+ {
200
+ "value": "fusion-framework-module-auth",
201
+ "label": "Authentication"
202
+ },
203
+ {
204
+ "value": "fusion-framework-module-navigation",
205
+ "label": "Navigation"
206
+ },
207
+ {
208
+ "value": "fusion-framework-module-context,fusion-framework-react-module-context",
209
+ "label": "Context"
210
+ },
211
+ {
212
+ "value": "fusion-framework-module-ag-grid",
213
+ "label": "AG-Grid (enterprise table framework)"
214
+ },
215
+ {
216
+ "value": "fusion-framework-module-bookmark,fusion-framework-react-module-bookmark",
217
+ "label": "Bookmark module"
218
+ },
219
+ {
220
+ "value": "fusion-framework-module-event,fusion-framework-react-module-event",
221
+ "label": "Event handler"
222
+ },
223
+ {
224
+ "value": "fusion-framework-module-http,fusion-framework-react-module-http",
225
+ "label": "Http client"
226
+ },
227
+ {
228
+ "value": "fusion-framework-module-service-discovery",
229
+ "label": "Service discovery"
230
+ },
231
+ {
232
+ "value": "fusion-framework-module-services",
233
+ "label": "Services"
234
+ },
235
+ {
236
+ "value": "fusion-framework-module-signalr,fusion-framework-react-module-signalr",
237
+ "label": "Signalr (for realtime .NET apis)"
238
+ },
239
+ {
240
+ "value": "fusion-framework-module-telemetry",
241
+ "label": "Telemetry"
242
+ },
243
+ {
244
+ "value": "fusion-framework-module-widget",
245
+ "label": "Widget support"
246
+ }
247
+ ]
248
+ },
249
+ "type": "array",
250
+ "default": []
251
+ }
252
+ },
253
+ "required": [
254
+ "name"
255
+ ]
256
+ }
package/src/index.d.ts ADDED
File without changes
package/src/index.js ADDED
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../plugins/roma/src/index.ts"],"names":[],"mappings":""}