@equinor/roma-nx-plugin 1.1.0 → 2.0.0-BETA.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/migrations.json +80 -0
- package/package.json +7 -6
- package/src/executors/build/build.d.ts +4 -0
- package/src/executors/build/build.js +76 -0
- package/src/executors/build/build.js.map +1 -0
- package/src/executors/build/executor.d.ts +5 -0
- package/src/executors/build/executor.js +8 -0
- package/src/executors/build/executor.js.map +1 -0
- package/src/executors/build/minify.d.ts +2 -0
- package/src/executors/build/minify.js +22 -0
- package/src/executors/build/minify.js.map +1 -0
- package/src/executors/component-test/executor.d.ts +4 -0
- package/src/executors/component-test/executor.js +48 -0
- package/src/executors/component-test/executor.js.map +1 -0
- package/src/executors/create-vite-config.d.ts +3 -0
- package/src/executors/create-vite-config.js +106 -0
- package/src/executors/create-vite-config.js.map +1 -0
- package/src/executors/executor-context.d.ts +2 -0
- package/src/executors/executor-context.js +101 -0
- package/src/executors/executor-context.js.map +1 -0
- package/src/executors/publish/executor.d.ts +5 -0
- package/src/executors/publish/executor.js +24 -0
- package/src/executors/publish/executor.js.map +1 -0
- package/src/executors/publish/manifest-model.d.ts +29 -0
- package/src/executors/publish/manifest-model.js +3 -0
- package/src/executors/publish/manifest-model.js.map +1 -0
- package/src/executors/publish/publish-script.d.ts +8 -0
- package/src/executors/publish/publish-script.js +193 -0
- package/src/executors/publish/publish-script.js.map +1 -0
- package/src/executors/serve/executor.d.ts +3 -0
- package/src/executors/serve/executor.js +17 -0
- package/src/executors/serve/executor.js.map +1 -0
- package/src/executors/serve/get-manifest.d.ts +4 -0
- package/src/executors/serve/get-manifest.js +20 -0
- package/src/executors/serve/get-manifest.js.map +1 -0
- package/src/executors/serve/server.d.ts +3 -0
- package/src/executors/serve/server.js +179 -0
- package/src/executors/serve/server.js.map +1 -0
- package/src/executors/utils/get-vite-config.d.ts +1 -0
- package/src/executors/utils/get-vite-config.js +13 -0
- package/src/executors/utils/get-vite-config.js.map +1 -0
- package/src/executors/utils/logger.d.ts +24 -0
- package/src/executors/utils/logger.js +69 -0
- package/src/executors/utils/logger.js.map +1 -0
- package/src/generators/app/data/modules.d.ts +19 -0
- package/src/generators/app/data/modules.js +23 -0
- package/src/generators/app/data/modules.js.map +1 -0
- package/src/generators/app/generator.d.ts +5 -0
- package/src/generators/app/generator.js +101 -0
- package/src/generators/app/generator.js.map +1 -0
- package/src/generators/component-test/files/cypress/support/commands.d.ts +0 -0
- package/src/generators/component-test/files/cypress/support/{commands.ts → commands.js} +2 -1
- package/src/generators/component-test/files/cypress/support/commands.js.map +1 -0
- package/src/generators/component-test/files/cypress/support/component.d.ts +9 -0
- package/src/generators/component-test/files/cypress/support/{component.ts → component.js} +7 -21
- package/src/generators/component-test/files/cypress/support/component.js.map +1 -0
- package/src/generators/component-test/generator.d.ts +4 -0
- package/src/generators/component-test/generator.js +36 -0
- package/src/generators/component-test/generator.js.map +1 -0
- package/src/generators/preset/generator.d.ts +4 -0
- package/src/generators/preset/generator.js +13 -0
- package/src/generators/preset/generator.js.map +1 -0
- package/src/index.js +5 -0
- package/src/index.js.map +1 -0
- package/src/migrations/add-publish-target/add-publish-target.d.ts +2 -0
- package/src/migrations/add-publish-target/add-publish-target.js +32 -0
- package/src/migrations/add-publish-target/add-publish-target.js.map +1 -0
- package/src/migrations/migrate-fusion-manifest/migrate-fusion-manifest.d.ts +2 -0
- package/src/migrations/migrate-fusion-manifest/migrate-fusion-manifest.js +15 -0
- package/src/migrations/migrate-fusion-manifest/migrate-fusion-manifest.js.map +1 -0
- package/src/migrations/migrate-fusion-manifest/old-format.json +21 -0
- package/src/migrations/migrate-fusion-manifest/update-manifest.d.ts +6 -0
- package/src/migrations/migrate-fusion-manifest/update-manifest.js +26 -0
- package/src/migrations/migrate-fusion-manifest/update-manifest.js.map +1 -0
- package/src/migrations/move-fusion-manifest/move-fusion-manifest.d.ts +2 -0
- package/src/migrations/move-fusion-manifest/move-fusion-manifest.js +30 -0
- package/src/migrations/move-fusion-manifest/move-fusion-manifest.js.map +1 -0
- package/src/migrations/remove-fusion-cli/remove-fusion-cli.d.ts +2 -0
- package/src/migrations/remove-fusion-cli/remove-fusion-cli.js +48 -0
- package/src/migrations/remove-fusion-cli/remove-fusion-cli.js.map +1 -0
- package/.eslintrc.json +0 -37
- package/jest.config.ts +0 -13
- package/manifest-schema.json +0 -80
- package/project.json +0 -65
- package/src/executors/build/build.ts +0 -100
- package/src/executors/build/executor.spec.ts +0 -13
- package/src/executors/build/executor.ts +0 -10
- package/src/executors/build/minify.ts +0 -20
- package/src/executors/component-test/executor.spec.ts +0 -18
- package/src/executors/component-test/executor.ts +0 -57
- package/src/executors/create-vite-config.ts +0 -133
- package/src/executors/executor-context.ts +0 -102
- package/src/executors/publish/executor.ts +0 -29
- package/src/executors/publish/manifest-model.ts +0 -33
- package/src/executors/publish/publish-script.spec.ts +0 -118
- package/src/executors/publish/publish-script.ts +0 -210
- package/src/executors/serve/executor.ts +0 -19
- package/src/executors/serve/get-manifest.ts +0 -20
- package/src/executors/serve/server.ts +0 -250
- package/src/executors/utils/get-vite-config.ts +0 -9
- package/src/executors/utils/logger.ts +0 -90
- package/src/generators/app/data/modules.ts +0 -19
- package/src/generators/app/generator.spec.ts +0 -86
- package/src/generators/app/generator.ts +0 -141
- package/src/generators/component-test/generator.spec.ts +0 -79
- package/src/generators/component-test/generator.ts +0 -67
- package/src/generators/preset/generator.spec.ts +0 -38
- package/src/generators/preset/generator.ts +0 -18
- package/src/migrations/add-publish-target/add-publish-target.spec.ts +0 -60
- package/src/migrations/add-publish-target/add-publish-target.ts +0 -28
- package/src/migrations/move-fusion-manifest/move-fusion-manifest.ts +0 -35
- package/src/migrations/remove-fusion-cli/remove-fusion-cli.ts +0 -70
- package/tsconfig.json +0 -17
- package/tsconfig.lib.json +0 -20
- package/tsconfig.spec.json +0 -26
- package/vite.config.ts +0 -31
- /package/src/{index.ts → index.d.ts} +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.appGenerator = appGenerator;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
const react_1 = require("@nx/react");
|
|
7
|
+
const modules_1 = require("./data/modules");
|
|
8
|
+
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
9
|
+
async function addDependencies(tree, options) {
|
|
10
|
+
const dependencies = {
|
|
11
|
+
'@equinor/roma-framework': '^0.0.12',
|
|
12
|
+
'@equinor/fusion-framework': '7.0.30',
|
|
13
|
+
'@equinor/fusion-framework-module-app': '5.2.13',
|
|
14
|
+
'@equinor/eds-core-react': '^0.39.0',
|
|
15
|
+
'@equinor/eds-data-grid-react': '^0.6.1',
|
|
16
|
+
'@equinor/eds-icons': '^0.21.0',
|
|
17
|
+
'@equinor/eds-tokens': '^0.9.2',
|
|
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',
|
|
22
|
+
'styled-components': '^6.0.8',
|
|
23
|
+
};
|
|
24
|
+
options.fusionModules
|
|
25
|
+
.flatMap((module) => module.split(','))
|
|
26
|
+
.forEach((module) => {
|
|
27
|
+
dependencies[`@equinor/${module}`] = modules_1.modules[module];
|
|
28
|
+
});
|
|
29
|
+
const devDependencies = {};
|
|
30
|
+
return (0, devkit_1.runTasksInSerial)(...[
|
|
31
|
+
(0, devkit_1.addDependenciesToPackageJson)(tree, dependencies, devDependencies, undefined, true),
|
|
32
|
+
]);
|
|
33
|
+
}
|
|
34
|
+
function updateTargets(tree, options) {
|
|
35
|
+
var _a;
|
|
36
|
+
const existing = (0, devkit_1.readProjectConfiguration)(tree, options.name);
|
|
37
|
+
(0, devkit_1.updateProjectConfiguration)(tree, options.name, Object.assign(Object.assign({}, existing), { targets: {
|
|
38
|
+
build: {
|
|
39
|
+
executor: '@equinor/roma-nx-plugin:build',
|
|
40
|
+
options: {},
|
|
41
|
+
},
|
|
42
|
+
serve: {
|
|
43
|
+
executor: '@equinor/roma-nx-plugin:serve',
|
|
44
|
+
options: {
|
|
45
|
+
port: (_a = options.devServerPort) !== null && _a !== void 0 ? _a : 3000,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
portal: {
|
|
49
|
+
executor: '@equinor/roma-nx-plugin:portal',
|
|
50
|
+
options: {},
|
|
51
|
+
},
|
|
52
|
+
publish: {
|
|
53
|
+
executor: '@equinor/roma-nx-plugin:publish',
|
|
54
|
+
dependsOn: ['build'],
|
|
55
|
+
configurations: {
|
|
56
|
+
production: {
|
|
57
|
+
environment: 'production',
|
|
58
|
+
},
|
|
59
|
+
qa: {
|
|
60
|
+
environment: 'qa',
|
|
61
|
+
},
|
|
62
|
+
dev: {
|
|
63
|
+
environment: 'dev',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
defaultConfiguration: 'dev',
|
|
67
|
+
},
|
|
68
|
+
} }));
|
|
69
|
+
}
|
|
70
|
+
async function appGenerator(tree, options) {
|
|
71
|
+
var _a, _b;
|
|
72
|
+
const derived = options.projectNameAndRootFormat !== 'as-provided';
|
|
73
|
+
if (derived && options.directory) {
|
|
74
|
+
throw new Error('You cannot provide a directory when using projectNameAndRootFormat = derived ');
|
|
75
|
+
}
|
|
76
|
+
const config = (0, devkit_1.getWorkspaceLayout)(tree);
|
|
77
|
+
const outputDir = derived
|
|
78
|
+
? `${config.appsDir}/${options.name}`
|
|
79
|
+
: path.join((0, artifact_name_and_directory_utils_1.getRelativeCwd)(), (_a = options.directory) !== null && _a !== void 0 ? _a : options.name);
|
|
80
|
+
await (0, react_1.applicationGenerator)(tree, Object.assign(Object.assign({}, options), { tags: [(_b = options.tags) !== null && _b !== void 0 ? _b : '', 'roma-application'].join(','), rootProject: false, bundler: 'vite' }));
|
|
81
|
+
tree.delete(`${outputDir}/vite.config.ts`);
|
|
82
|
+
tree.delete(`${outputDir}/index.html`);
|
|
83
|
+
updateTargets(tree, options);
|
|
84
|
+
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files'), outputDir, options);
|
|
85
|
+
await addDependencies(tree, options);
|
|
86
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
87
|
+
tree.delete(`${outputDir}/src/app`);
|
|
88
|
+
tree.delete(`${outputDir}/src/assets`);
|
|
89
|
+
tree.delete(`${outputDir}/src/main.tsx`);
|
|
90
|
+
tree.delete(`${outputDir}/src/styles.css`);
|
|
91
|
+
tree.delete(`${outputDir}/index.html`);
|
|
92
|
+
tree.delete(`${outputDir}/public`);
|
|
93
|
+
if (options.skipPackageJson) {
|
|
94
|
+
return () => true;
|
|
95
|
+
}
|
|
96
|
+
return () => {
|
|
97
|
+
(0, devkit_1.installPackagesTask)(tree);
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
exports.default = appGenerator;
|
|
101
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/generators/app/generator.ts"],"names":[],"mappings":";;AAiGA,oCAyCC;AA1ID,uCAUoB;AACpB,6BAA6B;AAE7B,qCAAiD;AAEjD,4CAAyC;AACzC,mHAA6F;AAE7F,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,wC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AAW,EAAC,IAAI,CAAC,CAAC;IACxB,IAAI,CAAC,MAAM,CAAC,GAAG,SAAS,UAAU,CAAC,CAAC;IACpC,IAAI,CAAC,MAAM,CAAC,GAAG,SAAS,aAAa,CAAC,CAAC;IACvC,IAAI,CAAC,MAAM,CAAC,GAAG,SAAS,eAAe,CAAC,CAAC;IACzC,IAAI,CAAC,MAAM,CAAC,GAAG,SAAS,iBAAiB,CAAC,CAAC;IAC3C,IAAI,CAAC,MAAM,CAAC,GAAG,SAAS,aAAa,CAAC,CAAC;IACvC,IAAI,CAAC,MAAM,CAAC,GAAG,SAAS,SAAS,CAAC,CAAC;IAEnC,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;QAC5B,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC;IACpB,CAAC;IAED,OAAO,GAAG,EAAE;QACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC;AACJ,CAAC;AAED,kBAAe,YAAY,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.js","sourceRoot":"","sources":["../../../../../../../../../plugins/roma/src/generators/component-test/files/cypress/support/commands.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,kDAAkD;AAClD,4CAA4C;AAC5C,+CAA+C;AAC/C,qBAAqB;AACrB,EAAE;AACF,4CAA4C;AAC5C,kCAAkC;AAClC,wCAAwC;AACxC,kDAAkD;AAClD,EAAE;AACF,EAAE;AACF,iCAAiC;AACjC,8DAA8D;AAC9D,EAAE;AACF,EAAE;AACF,gCAAgC;AAChC,yFAAyF;AACzF,EAAE;AACF,EAAE;AACF,+BAA+B;AAC/B,6FAA6F;AAC7F,EAAE;AACF,EAAE;AACF,gDAAgD;AAChD,6EAA6E;AAC7E,EAAE;AACF,mBAAmB;AACnB,wBAAwB;AACxB,4BAA4B;AAC5B,gEAAgE;AAChE,kFAAkF;AAClF,qFAAqF;AACrF,8GAA8G;AAC9G,QAAQ;AACR,MAAM;AACN,IAAI"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
// ***********************************************************
|
|
2
3
|
// This example support/component.ts is processed and
|
|
3
4
|
// loaded automatically before your test files.
|
|
@@ -12,28 +13,13 @@
|
|
|
12
13
|
// You can read more here:
|
|
13
14
|
// https://on.cypress.io/configuration
|
|
14
15
|
// ***********************************************************
|
|
15
|
-
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
17
|
// Import commands.js using ES2015 syntax:
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
require("./commands");
|
|
19
19
|
// Alternatively you can use CommonJS syntax:
|
|
20
20
|
// require('./commands')
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// Augment the Cypress namespace to include type definitions for
|
|
25
|
-
// your custom command.
|
|
26
|
-
// Alternatively, can be defined in cypress/support/component.d.ts
|
|
27
|
-
// with a <reference path="./component" /> at the top of your spec.
|
|
28
|
-
declare global {
|
|
29
|
-
namespace Cypress {
|
|
30
|
-
interface Chainable {
|
|
31
|
-
mount: typeof mount
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
Cypress.Commands.add('mount', mount)
|
|
37
|
-
|
|
21
|
+
const react18_1 = require("cypress/react18");
|
|
22
|
+
Cypress.Commands.add('mount', react18_1.mount);
|
|
38
23
|
// Example use:
|
|
39
|
-
// cy.mount(<MyComponent />)
|
|
24
|
+
// cy.mount(<MyComponent />)
|
|
25
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../../../../../../plugins/roma/src/generators/component-test/files/cypress/support/component.ts"],"names":[],"mappings":";AAAA,8DAA8D;AAC9D,qDAAqD;AACrD,+CAA+C;AAC/C,EAAE;AACF,wDAAwD;AACxD,kCAAkC;AAClC,EAAE;AACF,uDAAuD;AACvD,+CAA+C;AAC/C,sCAAsC;AACtC,EAAE;AACF,0BAA0B;AAC1B,sCAAsC;AACtC,8DAA8D;;AAE9D,0CAA0C;AAC1C,sBAAmB;AAEnB,6CAA6C;AAC7C,wBAAwB;AAExB,6CAAuC;AAcvC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,EAAE,eAAK,CAAC,CAAA;AAEpC,eAAe;AACf,4BAA4B"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.componentTestGenerator = componentTestGenerator;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
async function componentTestGenerator(tree, options) {
|
|
7
|
+
const name = options.project;
|
|
8
|
+
const currentConfiguration = (0, devkit_1.readProjectConfiguration)(tree, name);
|
|
9
|
+
if (currentConfiguration.projectType !== 'application') {
|
|
10
|
+
throw new Error(`Generator can only be run on applications - not supported for libraries`);
|
|
11
|
+
}
|
|
12
|
+
if (currentConfiguration.targets['build'].executor !==
|
|
13
|
+
'@equinor/roma-nx-plugin:build') {
|
|
14
|
+
throw new Error(`Generator can only be run on applications build with @equinor/roma-nx-plugin:build`);
|
|
15
|
+
}
|
|
16
|
+
if (currentConfiguration.targets['component-test']) {
|
|
17
|
+
throw new Error(`Component test target already exists`);
|
|
18
|
+
}
|
|
19
|
+
(0, devkit_1.updateProjectConfiguration)(tree, name, Object.assign(Object.assign({}, currentConfiguration), { targets: Object.assign(Object.assign({}, currentConfiguration.targets), { 'component-test': {
|
|
20
|
+
executor: '@equinor/roma-nx-plugin:component-test',
|
|
21
|
+
options: {
|
|
22
|
+
quiet: true,
|
|
23
|
+
watch: false,
|
|
24
|
+
},
|
|
25
|
+
} }) }));
|
|
26
|
+
(0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
|
|
27
|
+
'@cypress/code-coverage': '^3.13.1',
|
|
28
|
+
cypress: '^13.14.2',
|
|
29
|
+
'vite-plugin-istanbul': '^6.0.2',
|
|
30
|
+
});
|
|
31
|
+
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files'), currentConfiguration.root, options);
|
|
32
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
33
|
+
return (0, devkit_1.installPackagesTask)(tree);
|
|
34
|
+
}
|
|
35
|
+
exports.default = componentTestGenerator;
|
|
36
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/generators/component-test/generator.ts"],"names":[],"mappings":";;AAYA,wDAoDC;AAhED,uCAQoB;AACpB,6BAA6B;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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.presetGenerator = presetGenerator;
|
|
4
|
+
async function presetGenerator(tree, options) {
|
|
5
|
+
options.directory = 'apps';
|
|
6
|
+
options.name = options.appName || options.name;
|
|
7
|
+
options.projectName = options.appName || options.name;
|
|
8
|
+
options.style = options.style || options.styledModule || 'styled-components';
|
|
9
|
+
options.styledModule = options.style;
|
|
10
|
+
return await Promise.resolve().then(() => require('../app/generator')).then(({ appGenerator }) => appGenerator(tree, Object.assign({}, options)));
|
|
11
|
+
}
|
|
12
|
+
exports.default = presetGenerator;
|
|
13
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/generators/preset/generator.ts"],"names":[],"mappings":";;AAGA,0CAYC;AAZM,KAAK,UAAU,eAAe,CACnC,IAAU,EACV,OAA8B;IAE9B,OAAO,CAAC,SAAS,GAAG,MAAM,CAAC;IAC3B,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAC/C,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;IACrC,OAAO,MAAM,qCAAO,kBAAkB,GAAE,IAAI,CAAC,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAChE,YAAY,CAAC,IAAI,oBAAO,OAAO,EAAG,CACnC,CAAC;AACJ,CAAC;AAED,kBAAe,eAAe,CAAC"}
|
package/src/index.js
ADDED
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../plugins/roma/src/index.ts"],"names":[],"mappings":";;;AAAA,yEAA+C"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = update;
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
function update(tree) {
|
|
7
|
+
var _a;
|
|
8
|
+
const projects = (0, devkit_1.getProjects)(tree);
|
|
9
|
+
for (const [name, project] of projects) {
|
|
10
|
+
if (project.projectType !== 'application')
|
|
11
|
+
continue;
|
|
12
|
+
if (!((_a = project.targets) === null || _a === void 0 ? void 0 : _a.portal)) {
|
|
13
|
+
project.targets.publish = {
|
|
14
|
+
executor: '@equinor/roma-nx-plugin:publish',
|
|
15
|
+
configurations: {
|
|
16
|
+
production: {
|
|
17
|
+
environment: 'production',
|
|
18
|
+
},
|
|
19
|
+
qa: {
|
|
20
|
+
environment: 'qa',
|
|
21
|
+
},
|
|
22
|
+
dev: {
|
|
23
|
+
environment: 'dev',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
defaultConfiguration: 'dev',
|
|
27
|
+
};
|
|
28
|
+
(0, devkit_1.updateProjectConfiguration)(tree, name, project);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=add-publish-target.js.map
|
|
@@ -0,0 +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;AA3BD,sDAAsD;AACtD,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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = update;
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const update_manifest_1 = require("./update-manifest");
|
|
7
|
+
function update(tree) {
|
|
8
|
+
const projects = (0, devkit_1.getProjects)(tree);
|
|
9
|
+
for (const [, project] of projects) {
|
|
10
|
+
const packageJson = (0, devkit_1.readJson)(tree, `${project.root}/package.json`);
|
|
11
|
+
const updated = (0, update_manifest_1.updateManifest)(packageJson);
|
|
12
|
+
tree.write(`${project.root}/package.json`, JSON.stringify(Object.assign(Object.assign({}, packageJson), { roma: updated }), null, 2));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=migrate-fusion-manifest.js.map
|
|
@@ -0,0 +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;AAfD,sDAAsD;AACtD,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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"main": "src/index.ts",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"name": "homepage",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"roma": {
|
|
7
|
+
"key": "homepage",
|
|
8
|
+
"shortName": "homepage",
|
|
9
|
+
"name": "homepage",
|
|
10
|
+
"description": "",
|
|
11
|
+
"tags": [
|
|
12
|
+
"widget"
|
|
13
|
+
],
|
|
14
|
+
"hide": true,
|
|
15
|
+
"order": 1,
|
|
16
|
+
"type": "widget",
|
|
17
|
+
"accentColor": "#007079",
|
|
18
|
+
"icon": null,
|
|
19
|
+
"categoryId": "3a42d44e-03b8-4e81-aa2a-d4dedc5b94f6"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AppDto } from '@equinor/roma-framework';
|
|
2
|
+
import { AppManifest } from '@equinor/fusion-framework-module-app';
|
|
3
|
+
import { PackageJson } from 'nx/src/utils/package-json';
|
|
4
|
+
export declare const updateManifest: ({ roma: manifest, version, }: PackageJson & {
|
|
5
|
+
roma: Omit<AppDto, "version">;
|
|
6
|
+
}) => AppManifest;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateManifest = void 0;
|
|
4
|
+
const schemas_js_1 = require("@equinor/fusion-framework-module-app/schemas.js");
|
|
5
|
+
const updateManifest = ({ roma: manifest, version, }) => {
|
|
6
|
+
const updatedManifest = Object.assign({}, manifest);
|
|
7
|
+
updatedManifest.build = {
|
|
8
|
+
entryPoint: '',
|
|
9
|
+
assetPath: '/',
|
|
10
|
+
version,
|
|
11
|
+
};
|
|
12
|
+
delete updatedManifest.entry;
|
|
13
|
+
delete updatedManifest.version;
|
|
14
|
+
updatedManifest.keywords = manifest.tags;
|
|
15
|
+
updatedManifest.appKey = manifest.key;
|
|
16
|
+
updatedManifest.displayName = manifest.name;
|
|
17
|
+
updatedManifest.visualization = {
|
|
18
|
+
icon: manifest.icon,
|
|
19
|
+
sortOrder: manifest.order,
|
|
20
|
+
};
|
|
21
|
+
delete updatedManifest.order;
|
|
22
|
+
delete updatedManifest.icon;
|
|
23
|
+
return schemas_js_1.ApiApplicationSchema.parse(updatedManifest);
|
|
24
|
+
};
|
|
25
|
+
exports.updateManifest = updateManifest;
|
|
26
|
+
//# sourceMappingURL=update-manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-manifest.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/migrations/migrate-fusion-manifest/update-manifest.ts"],"names":[],"mappings":";;;AAEA,gFAAuF;AAGhF,MAAM,cAAc,GAAG,CAAC,EAC7B,IAAI,EAAE,QAAQ,EACd,OAAO,GACyC,EAAe,EAAE;IACjE,MAAM,eAAe,GAAG,kBACnB,QAAQ,CACgC,CAAC;IAC9C,eAAe,CAAC,KAAK,GAAG;QACtB,UAAU,EAAE,EAAE;QACd,SAAS,EAAE,GAAG;QACd,OAAO;KACR,CAAC;IACF,OAAO,eAAe,CAAC,KAAK,CAAC;IAC7B,OAAO,eAAe,CAAC,OAAO,CAAC;IAC/B,eAAe,CAAC,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC;IACzC,eAAe,CAAC,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC;IACtC,eAAe,CAAC,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC;IAC5C,eAAe,CAAC,aAAa,GAAG;QAC9B,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,SAAS,EAAE,QAAQ,CAAC,KAAK;KAC1B,CAAC;IACF,OAAO,eAAe,CAAC,KAAK,CAAC;IAC7B,OAAO,eAAe,CAAC,IAAI,CAAC;IAC5B,OAAoB,iCAAoB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;AAClE,CAAC,CAAC;AAxBW,QAAA,cAAc,kBAwBzB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = update;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
6
|
+
const devkit_1 = require("@nx/devkit");
|
|
7
|
+
const fs_1 = require("fs");
|
|
8
|
+
function update(tree) {
|
|
9
|
+
const projects = (0, devkit_1.getProjects)(tree);
|
|
10
|
+
for (const [, project] of projects) {
|
|
11
|
+
const contents = (0, fs_1.readdirSync)(project.root);
|
|
12
|
+
if (contents && contents.includes('fusion-manifest.json')) {
|
|
13
|
+
const manifest = (0, devkit_1.readJson)(tree, `${project.root}/fusion-manifest.json`);
|
|
14
|
+
const packageJson = (0, devkit_1.readJson)(tree, `${project.root}/package.json`);
|
|
15
|
+
const { version } = manifest, rest = tslib_1.__rest(manifest, ["version"]);
|
|
16
|
+
packageJson.version = version;
|
|
17
|
+
packageJson.roma = rest;
|
|
18
|
+
tree.exists(`${project.root}/fusion-manifest.json`) &&
|
|
19
|
+
tree.delete(`${project.root}/fusion-manifest.json`);
|
|
20
|
+
tree.exists(`${project.root}/src/version.ts`) &&
|
|
21
|
+
tree.delete(`${project.root}/src/version.ts`);
|
|
22
|
+
tree.exists(`${project.root}/app.config.js`) &&
|
|
23
|
+
tree.delete(`${project.root}/app.config.js`);
|
|
24
|
+
tree.exists(`${project.root}/.env.serve`) &&
|
|
25
|
+
tree.delete(`${project.root}/.env.serve`);
|
|
26
|
+
tree.write(`${project.root}/package.json`, JSON.stringify(packageJson, null, 2));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=move-fusion-manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"move-fusion-manifest.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/migrations/move-fusion-manifest/move-fusion-manifest.ts"],"names":[],"mappings":";;AASA,yBAyBC;;AAlCD,sDAAsD;AACtD,uCAKoB;AACpB,2BAAiC;AAEjC,SAAwB,MAAM,CAAC,IAAU;IACvC,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAA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C,IAAI,eAAe,EAC9B,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CACrC,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = update;
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
async function update(tree) {
|
|
7
|
+
var _a;
|
|
8
|
+
const projects = (0, devkit_1.getProjects)(tree);
|
|
9
|
+
const remove = (0, devkit_1.removeDependenciesFromPackageJson)(tree, [], ['@equinor/fusion-framework-cli']);
|
|
10
|
+
for (const [name, project] of projects) {
|
|
11
|
+
if (project.projectType !== 'application')
|
|
12
|
+
continue;
|
|
13
|
+
if ('portal' in project.targets) {
|
|
14
|
+
delete project.targets.portal;
|
|
15
|
+
}
|
|
16
|
+
if ('serve' in project.targets) {
|
|
17
|
+
const target = project.targets.serve;
|
|
18
|
+
if ((_a = target.options.portal) === null || _a === void 0 ? void 0 : _a.includes('localhost')) {
|
|
19
|
+
delete target.options.portal;
|
|
20
|
+
project.targets.serve = target;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (tree.exists(`${project.root}/vite.config.js`)) {
|
|
24
|
+
tree.delete(`${project.root}/vite.config.js`);
|
|
25
|
+
}
|
|
26
|
+
if (tree.exists(`${project.root}/.eslintrc.json`)) {
|
|
27
|
+
(0, devkit_1.updateJson)(tree, `${project.root}/.eslintrc.json`, (value) => (Object.assign(Object.assign({}, value), { parserOptions: {
|
|
28
|
+
sourceType: 'module',
|
|
29
|
+
} })));
|
|
30
|
+
}
|
|
31
|
+
tree.write(`${project.root}/vite.config.ts`, `import { defineConfig } from 'vite';
|
|
32
|
+
|
|
33
|
+
export default defineConfig({
|
|
34
|
+
build: {
|
|
35
|
+
minify: true,
|
|
36
|
+
lib: {
|
|
37
|
+
entry: 'src/index.ts',
|
|
38
|
+
fileName: 'app-bundle',
|
|
39
|
+
formats: ['es'],
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
`);
|
|
44
|
+
(0, devkit_1.updateProjectConfiguration)(tree, name, project);
|
|
45
|
+
}
|
|
46
|
+
return remove();
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=remove-fusion-cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-fusion-cli.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/migrations/remove-fusion-cli/remove-fusion-cli.ts"],"names":[],"mappings":";;AAkBA,yBAmDC;AArED,sDAAsD;AACtD,uCAMoB;AAWL,KAAK,UAAU,MAAM,CAAC,IAAU;;IAC7C,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,IAAA,0CAAiC,EAC9C,IAAI,EACJ,EAAE,EACF,CAAC,+BAA+B,CAAC,CAClC,CAAC;IAEF,KAAK,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,QAAQ,EAAE,CAAC;QACvC,IAAI,OAAO,CAAC,WAAW,KAAK,aAAa;YAAE,SAAS;QACpD,IAAI,QAAQ,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YAChC,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;QAChC,CAAC;QACD,IAAI,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,KAAoB,CAAC;YACpD,IAAI,MAAA,MAAM,CAAC,OAAO,CAAC,MAAM,0CAAE,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;gBACjD,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;gBAC7B,OAAO,CAAC,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC;YACjC,CAAC;QACH,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,iBAAiB,CAAC,EAAE,CAAC;YAClD,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,iBAAiB,CAAC,CAAC;QAChD,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,iBAAiB,CAAC,EAAE,CAAC;YAClD,IAAA,mBAAU,EAAC,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,iCACzD,KAAK,KACR,aAAa,EAAE;oBACb,UAAU,EAAE,QAAQ;iBACrB,IACD,CAAC,CAAC;QACN,CAAC;QACD,IAAI,CAAC,KAAK,CACR,GAAG,OAAO,CAAC,IAAI,iBAAiB,EAChC;;;;;;;;;;;;CAYL,CACI,CAAC;QACF,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAED,OAAO,MAAM,EAAE,CAAC;AAClB,CAAC"}
|
package/.eslintrc.json
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": ["../../.eslintrc.json"],
|
|
3
|
-
"ignorePatterns": ["!**/*", "generators/**/files"],
|
|
4
|
-
"overrides": [
|
|
5
|
-
{
|
|
6
|
-
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
7
|
-
"rules": {}
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"files": ["*.ts", "*.tsx"],
|
|
11
|
-
"rules": {}
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"files": ["*.js", "*.jsx"],
|
|
15
|
-
"rules": {}
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"files": ["*.json"],
|
|
19
|
-
"parser": "jsonc-eslint-parser",
|
|
20
|
-
"rules": {
|
|
21
|
-
"@nx/dependency-checks": "warn"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"files": [
|
|
26
|
-
"./package.json",
|
|
27
|
-
"./generators.json",
|
|
28
|
-
"./executors.json",
|
|
29
|
-
"./migrations.json"
|
|
30
|
-
],
|
|
31
|
-
"parser": "jsonc-eslint-parser",
|
|
32
|
-
"rules": {
|
|
33
|
-
"@nx/nx-plugin-checks": "error"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
}
|
package/jest.config.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
export default {
|
|
3
|
-
displayName: 'roma',
|
|
4
|
-
preset: '../../jest.preset.js',
|
|
5
|
-
transform: {
|
|
6
|
-
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
|
7
|
-
},
|
|
8
|
-
moduleFileExtensions: ['ts', 'js', 'html'],
|
|
9
|
-
coverageDirectory: '../../coverage/plugins/roma',
|
|
10
|
-
globals: {
|
|
11
|
-
Uint8Array: Uint8Array,
|
|
12
|
-
},
|
|
13
|
-
};
|
package/manifest-schema.json
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://roma.equinor.com/schema.json",
|
|
4
|
-
"title": "Fusion manifest",
|
|
5
|
-
"description": "Schema defining fusion's manifest layout",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"key": {
|
|
9
|
-
"description": "Unique key for your application",
|
|
10
|
-
"type": "string",
|
|
11
|
-
"example": "my-app-key"
|
|
12
|
-
},
|
|
13
|
-
"version": {
|
|
14
|
-
"type": "string",
|
|
15
|
-
"example": "0.0.1",
|
|
16
|
-
"description": "Required. Version of your application in semver (major.minor.patch)"
|
|
17
|
-
},
|
|
18
|
-
"shortName": {
|
|
19
|
-
"type": "string",
|
|
20
|
-
"example": "shortName",
|
|
21
|
-
"description": "Required. shortName for your application"
|
|
22
|
-
},
|
|
23
|
-
"name": {
|
|
24
|
-
"type": "string",
|
|
25
|
-
"example": "Application name",
|
|
26
|
-
"description": "Required. Name shown to users for your app"
|
|
27
|
-
},
|
|
28
|
-
"description": {
|
|
29
|
-
"type": "string",
|
|
30
|
-
"example": "Application description",
|
|
31
|
-
"description": "Required. A description of your application, shown in tooltips etc"
|
|
32
|
-
},
|
|
33
|
-
"tags": {
|
|
34
|
-
"type": "array",
|
|
35
|
-
"example": [],
|
|
36
|
-
"description": "A list of tags to group your applications. Will typically be used to show related apps"
|
|
37
|
-
},
|
|
38
|
-
"hide": {
|
|
39
|
-
"type": "boolean",
|
|
40
|
-
"example": false,
|
|
41
|
-
"description": "if the application should be navigated to via the sidebar, or if it can only be opened via other applications"
|
|
42
|
-
},
|
|
43
|
-
"order": {
|
|
44
|
-
"type": "integer",
|
|
45
|
-
"example": 1,
|
|
46
|
-
"description": "Desired order within the category."
|
|
47
|
-
},
|
|
48
|
-
"type": {
|
|
49
|
-
"type": "string",
|
|
50
|
-
"example": "standalone",
|
|
51
|
-
"description": "standalone | widget. standalone is apps, widgets are meant to be embedded via the frontpage."
|
|
52
|
-
},
|
|
53
|
-
"accentColor": {
|
|
54
|
-
"type": "string",
|
|
55
|
-
"example": "#007079",
|
|
56
|
-
"description": "Not in use by us at the moment."
|
|
57
|
-
},
|
|
58
|
-
"icon": {
|
|
59
|
-
"type": "string",
|
|
60
|
-
"example": "M16...",
|
|
61
|
-
"description": "SVG path string from your app icon (not the entire svg, just the path). Falls back to category icon"
|
|
62
|
-
},
|
|
63
|
-
"categoryId": {
|
|
64
|
-
"type": "string",
|
|
65
|
-
"example": "guid",
|
|
66
|
-
"description": "Required. ID to categorize your application. TODO: Waiting for lookup list "
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
"required": [
|
|
70
|
-
"key",
|
|
71
|
-
"version",
|
|
72
|
-
"shortName",
|
|
73
|
-
"name",
|
|
74
|
-
"description",
|
|
75
|
-
"hide",
|
|
76
|
-
"order",
|
|
77
|
-
"type",
|
|
78
|
-
"categoryId"
|
|
79
|
-
]
|
|
80
|
-
}
|