@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
package/migrations.json
CHANGED
|
@@ -14,6 +14,11 @@
|
|
|
14
14
|
"version": "0.0.27-BETA.0",
|
|
15
15
|
"description": "Move fusion.manifest.json to package.json",
|
|
16
16
|
"implementation": "./src/migrations/move-fusion-manifest/move-fusion-manifest"
|
|
17
|
+
},
|
|
18
|
+
"migrate-fusion-manifest": {
|
|
19
|
+
"version": "2.0.0",
|
|
20
|
+
"description": "Move to new AppManifest v1",
|
|
21
|
+
"implementation": "./src/migrations/migrate-fusion-manifest/migrate-fusion-manifest"
|
|
17
22
|
}
|
|
18
23
|
},
|
|
19
24
|
"packageJsonUpdates": {
|
|
@@ -103,6 +108,81 @@
|
|
|
103
108
|
"alwaysAddToPackageJson": true
|
|
104
109
|
}
|
|
105
110
|
}
|
|
111
|
+
},
|
|
112
|
+
"upgrade-fusion": {
|
|
113
|
+
"version": "2.0.0-BETA.0",
|
|
114
|
+
"packages": [
|
|
115
|
+
{
|
|
116
|
+
"@equinor/fusion-framework": {
|
|
117
|
+
"version": "^7.2.11"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"@equinor/fusion-framework-app": {
|
|
122
|
+
"version": "^9.1.15"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"@equinor/fusion-framework-module": {
|
|
127
|
+
"version": "^4.3.5"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"@equinor/fusion-framework-module-app": {
|
|
132
|
+
"version": "^6.1.0"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"@equinor/fusion-framework-module-context": {
|
|
137
|
+
"version": "^5.0.14"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"@equinor/fusion-framework-module-http": {
|
|
142
|
+
"version": "^6.2.0"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"@equinor/fusion-framework-module-msal": {
|
|
147
|
+
"version": "^3.1.5"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"@equinor/fusion-framework-module-navigation": {
|
|
152
|
+
"version": "^4.0.7"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"@equinor/fusion-framework-module-service-discovery": {
|
|
157
|
+
"version": "^8.0.3"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"@equinor/fusion-framework-react": {
|
|
162
|
+
"version": "^7.3.3"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"@equinor/fusion-framework-react-app": {
|
|
167
|
+
"version": "^5.4.0"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"@equinor/fusion-framework-react-module": {
|
|
172
|
+
"version": "^3.1.6"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"@equinor/fusion-framework-react-module-context": {
|
|
177
|
+
"version": "^6.2.15"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"@equinor/fusion-framework-react-module-http": {
|
|
182
|
+
"version": "^8.0.0"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
]
|
|
106
186
|
}
|
|
107
187
|
}
|
|
108
188
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/roma-nx-plugin",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0-BETA.0",
|
|
5
5
|
"repository": "https://github.com/equinor/tops-roma",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@nx/devkit": "19.5.6",
|
|
7
|
+
"@nx/devkit": "^19.5.6",
|
|
8
8
|
"get-port-cjs": "6.1.3",
|
|
9
9
|
"open": "^8.4.2",
|
|
10
10
|
"chalk": "^4.0.0",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@azure/identity": "^4.4.1",
|
|
13
13
|
"@equinor/fusion-framework-module-service-discovery": "7.1.10",
|
|
14
14
|
"@equinor/fusion-framework-module-app": "^5.2.4",
|
|
15
|
-
"vite": "5.
|
|
15
|
+
"vite": "5.4.6",
|
|
16
16
|
"@vitejs/plugin-react": "4.2.1",
|
|
17
17
|
"vite-plugin-restart": "^0.4.0",
|
|
18
18
|
"vite-plugin-environment": "^1.1.3",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"rollup": "^4.20.0",
|
|
21
21
|
"express": "^4.18.3",
|
|
22
22
|
"http-proxy-middleware": "^2.0.6",
|
|
23
|
-
"esbuild": "0.
|
|
23
|
+
"esbuild": "0.21.5"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@nx/devkit": "^19.5.6",
|
|
@@ -35,5 +35,6 @@
|
|
|
35
35
|
"executors": "./executors.json",
|
|
36
36
|
"nx-migrations": {
|
|
37
37
|
"migrations": "./migrations.json"
|
|
38
|
-
}
|
|
39
|
-
|
|
38
|
+
},
|
|
39
|
+
"types": "./src/index.d.ts"
|
|
40
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
4
|
+
const create_vite_config_1 = require("../create-vite-config");
|
|
5
|
+
const vite_1 = require("vite");
|
|
6
|
+
const semver_1 = require("semver");
|
|
7
|
+
const node_fs_1 = require("node:fs");
|
|
8
|
+
const node_path_1 = require("node:path");
|
|
9
|
+
const devkit_1 = require("@nx/devkit");
|
|
10
|
+
const path_1 = require("path");
|
|
11
|
+
const logger_1 = require("../utils/logger");
|
|
12
|
+
const logger = new logger_1.Logger();
|
|
13
|
+
function getViteConfig(root) {
|
|
14
|
+
const files = (0, node_fs_1.readdirSync)(root);
|
|
15
|
+
const file = files.find((f) => f.startsWith('vite.config'));
|
|
16
|
+
if (!file)
|
|
17
|
+
throw new Error(`No vite config found!`);
|
|
18
|
+
return (0, path_1.resolve)(root, file);
|
|
19
|
+
}
|
|
20
|
+
const normalizeVersion = (version) => {
|
|
21
|
+
const semverVersion = (0, semver_1.parse)(version);
|
|
22
|
+
const { major, minor, patch } = semverVersion;
|
|
23
|
+
return { major, minor, patch };
|
|
24
|
+
};
|
|
25
|
+
async function default_1(context, watch = false) {
|
|
26
|
+
const projectName = context.projectName;
|
|
27
|
+
const project = context.workspace.projects[projectName];
|
|
28
|
+
const base = (0, path_1.resolve)(context.root, project.root);
|
|
29
|
+
// const viteConfigPath = resolve(base, 'vite.config.ts');
|
|
30
|
+
const viteConfigPath = getViteConfig(base);
|
|
31
|
+
const userConfig = await (0, vite_1.loadConfigFromFile)({
|
|
32
|
+
command: 'build',
|
|
33
|
+
mode: 'production',
|
|
34
|
+
}, viteConfigPath);
|
|
35
|
+
const viteConfig = userConfig.config;
|
|
36
|
+
const config = (0, create_vite_config_1.createRomaViteConfig)(viteConfig, context, watch);
|
|
37
|
+
try {
|
|
38
|
+
const result = await (0, vite_1.build)(config).then((r) => {
|
|
39
|
+
var _a, _b, _c;
|
|
40
|
+
const out = config.build.outDir;
|
|
41
|
+
let manifest;
|
|
42
|
+
try {
|
|
43
|
+
const packageJson = (0, devkit_1.readJsonFile)((0, node_path_1.join)(config.root, 'package.json'));
|
|
44
|
+
if (packageJson.roma) {
|
|
45
|
+
manifest = Object.assign(Object.assign({}, packageJson.roma), { version: normalizeVersion(packageJson.version), displayName: (_a = packageJson.roma.displayName) !== null && _a !== void 0 ? _a : packageJson.roma.name, appKey: (_b = packageJson.roma.appKey) !== null && _b !== void 0 ? _b : packageJson.roma.key, keywords: (_c = packageJson.roma.keywords) !== null && _c !== void 0 ? _c : packageJson.roma.tags, build: Object.assign(Object.assign({}, packageJson.roma.build), { version: packageJson.version }) });
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
manifest = (0, devkit_1.readJsonFile)((0, node_path_1.join)(config.root, 'fusion-manifest.json'));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch (_d) {
|
|
52
|
+
manifest = (0, devkit_1.readJsonFile)((0, node_path_1.join)(config.root, 'fusion-manifest.json'));
|
|
53
|
+
}
|
|
54
|
+
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(out, 'manifest.json'), JSON.stringify(manifest, null, 2), 'utf8');
|
|
55
|
+
return r;
|
|
56
|
+
});
|
|
57
|
+
return new Promise((resolve) => {
|
|
58
|
+
if (watch) {
|
|
59
|
+
result.on('change', (e) => logger.info(e));
|
|
60
|
+
result.on('close', () => {
|
|
61
|
+
logger.info('Stopping watch');
|
|
62
|
+
resolve({ success: true });
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
resolve({ success: true });
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
catch (ex) {
|
|
71
|
+
logger.error(`Failed to build ${projectName}:`);
|
|
72
|
+
logger.error(ex);
|
|
73
|
+
return { success: false };
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=build.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/build/build.ts"],"names":[],"mappings":";;AA4BA,4BAsEC;AAlGD,8DAA6D;AAC7D,+BAAiD;AACjD,mCAA8C;AAC9C,qCAAqD;AACrD,yCAAiC;AACjC,uCAA2D;AAC3D,+BAA+B;AAE/B,4CAAyC;AAIzC,MAAM,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;AAE5B,SAAS,aAAa,CAAC,IAAY;IACjC,MAAM,KAAK,GAAG,IAAA,qBAAW,EAAC,IAAI,CAAC,CAAC;IAChC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;IAC5D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AAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC3C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;oBACtB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;oBAC9B,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC7B,CAAC,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACZ,MAAM,CAAC,KAAK,CAAC,mBAAmB,WAAW,GAAG,CAAC,CAAC;QAChD,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACjB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = runExecutor;
|
|
4
|
+
const build_1 = require("./build");
|
|
5
|
+
async function runExecutor(options, context) {
|
|
6
|
+
return (0, build_1.default)(context, options.watch);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/build/executor.ts"],"names":[],"mappings":";;AAIA,8BAKC;AAPD,mCAA4B;AAEb,KAAK,UAAU,WAAW,CACvC,OAA4B,EAC5B,OAAwB;IAExB,OAAO,IAAA,eAAK,EAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.minifyEs = minifyEs;
|
|
4
|
+
const esbuild_1 = require("esbuild");
|
|
5
|
+
function minifyEs() {
|
|
6
|
+
return {
|
|
7
|
+
name: 'minifyEs',
|
|
8
|
+
renderChunk: {
|
|
9
|
+
order: 'post',
|
|
10
|
+
async handler(code, chunk, outputOptions) {
|
|
11
|
+
if (outputOptions.format === 'es') {
|
|
12
|
+
return await (0, esbuild_1.transform)(code, {
|
|
13
|
+
minifyWhitespace: true,
|
|
14
|
+
minifySyntax: true,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return code;
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=minify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"minify.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/build/minify.ts"],"names":[],"mappings":";;AAGA,4BAgBC;AAlBD,qCAAoC;AAEpC,SAAgB,QAAQ;IACtB,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE;YACX,KAAK,EAAE,MAAM;YACb,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,aAAa;gBACtC,IAAI,aAAa,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;oBAClC,OAAO,MAAM,IAAA,mBAAS,EAAC,IAAI,EAAE;wBAC3B,gBAAgB,EAAE,IAAI;wBACtB,YAAY,EAAE,IAAI;qBACnB,CAAC,CAAC;gBACL,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC;SACF;KACQ,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const cypress = require('cypress');
|
|
5
|
+
// import cypress from 'cypress';
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
const node_child_process_1 = require("node:child_process");
|
|
8
|
+
const node_util_1 = require("node:util");
|
|
9
|
+
const exec = (0, node_util_1.promisify)(node_child_process_1.exec);
|
|
10
|
+
const runExecutor = async (options, context) => {
|
|
11
|
+
const { projectName, projectsConfigurations, root } = context;
|
|
12
|
+
const workdir = (0, path_1.join)(root, projectsConfigurations.projects[projectName].root);
|
|
13
|
+
let success = true;
|
|
14
|
+
const config = {
|
|
15
|
+
project: workdir,
|
|
16
|
+
quiet: options.quiet,
|
|
17
|
+
testingType: 'component',
|
|
18
|
+
};
|
|
19
|
+
try {
|
|
20
|
+
const testRun = await (options.watch
|
|
21
|
+
? cypress.open(config)
|
|
22
|
+
: cypress.run(config));
|
|
23
|
+
if (testRun.totalFailed > 0)
|
|
24
|
+
success = false;
|
|
25
|
+
const report = testRun.runs.map((run) => {
|
|
26
|
+
const _a = run.reporterStats, { start, end } = _a, stats = tslib_1.__rest(_a, ["start", "end"]);
|
|
27
|
+
return Object.assign({ name: run.spec.name }, stats);
|
|
28
|
+
});
|
|
29
|
+
console.table(report);
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
console.error(err);
|
|
33
|
+
success = false;
|
|
34
|
+
}
|
|
35
|
+
if (success && options.coverage) {
|
|
36
|
+
process.chdir(workdir);
|
|
37
|
+
const r = await exec(`npx nyc report --reporter=text-summary`);
|
|
38
|
+
console.log(r.stdout);
|
|
39
|
+
}
|
|
40
|
+
console.log(success
|
|
41
|
+
? `Successfully ran component tests`
|
|
42
|
+
: `Failed to run component tests`);
|
|
43
|
+
return {
|
|
44
|
+
success,
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
exports.default = runExecutor;
|
|
48
|
+
//# sourceMappingURL=executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/component-test/executor.ts"],"names":[],"mappings":";;;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AAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,GAAG,KAAK,CAAC;IAClB,CAAC;IACD,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACvB,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,wCAAwC,CAAC,CAAC;QAC/D,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;IACD,OAAO,CAAC,GAAG,CACT,OAAO;QACL,CAAC,CAAC,kCAAkC;QACpC,CAAC,CAAC,+BAA+B,CACpC,CAAC;IACF,OAAO;QACL,OAAO;KACR,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createRomaViteConfig = void 0;
|
|
4
|
+
const vite_1 = require("vite");
|
|
5
|
+
const vite_plugin_restart_1 = require("vite-plugin-restart");
|
|
6
|
+
const vite_plugin_environment_1 = require("vite-plugin-environment");
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const plugin_react_1 = require("@vitejs/plugin-react");
|
|
9
|
+
const logger_1 = require("./utils/logger");
|
|
10
|
+
const nx_tsconfig_paths_plugin_1 = require("@nx/vite/plugins/nx-tsconfig-paths.plugin");
|
|
11
|
+
const minify_1 = require("./build/minify");
|
|
12
|
+
const createRomaViteConfig = (config, context, watch = false, hmrPort = 42000) => {
|
|
13
|
+
var _a;
|
|
14
|
+
const isServe = context.targetName === 'serve';
|
|
15
|
+
const projectName = context.projectName;
|
|
16
|
+
const project = context.workspace.projects[projectName];
|
|
17
|
+
const workspaceRoot = context.root;
|
|
18
|
+
const serveConfig = project.targets.serve;
|
|
19
|
+
const options = serveConfig.options;
|
|
20
|
+
let base;
|
|
21
|
+
let entry;
|
|
22
|
+
let viteConfigPath;
|
|
23
|
+
let projectRoot = project.root;
|
|
24
|
+
let appDir = '';
|
|
25
|
+
if (isServe) {
|
|
26
|
+
const [appDirectory, ...rest] = projectRoot.split('/');
|
|
27
|
+
projectRoot = rest.join('/');
|
|
28
|
+
appDir = appDirectory;
|
|
29
|
+
base = (0, path_1.resolve)(context.root, appDirectory);
|
|
30
|
+
entry = {
|
|
31
|
+
self: (0, path_1.join)(projectRoot, 'src/index.ts'),
|
|
32
|
+
};
|
|
33
|
+
viteConfigPath = (0, path_1.resolve)(base, projectRoot, 'vite.config.ts');
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
base = (0, path_1.resolve)(context.root, projectRoot);
|
|
37
|
+
entry = '/src/index.ts';
|
|
38
|
+
viteConfigPath = (0, path_1.resolve)(base, 'vite.config.ts');
|
|
39
|
+
}
|
|
40
|
+
if (isServe &&
|
|
41
|
+
options.additionalProjects &&
|
|
42
|
+
options.additionalProjects.length > 0) {
|
|
43
|
+
options.additionalProjects.forEach((project) => {
|
|
44
|
+
const projectConfig = context.workspace.projects[project];
|
|
45
|
+
const path = (0, path_1.join)(projectConfig.root.replace(appDir + '/', ''), 'src', 'index.ts');
|
|
46
|
+
console.log('Adding project', path, 'to server-list');
|
|
47
|
+
entry[`${project}`] = path;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
const buildConfig = project.targets.build;
|
|
51
|
+
const outputPath = (_a = buildConfig.outputPath) !== null && _a !== void 0 ? _a : `dist/apps/${projectName}`;
|
|
52
|
+
const devPortalPath = (0, path_1.resolve)(process.cwd(), 'node_modules/@equinor/roma-framework/dev-portal');
|
|
53
|
+
if (!config.build) {
|
|
54
|
+
config.build = {
|
|
55
|
+
lib: {
|
|
56
|
+
entry: 'src/index.ts',
|
|
57
|
+
fileName: 'app-bundle',
|
|
58
|
+
formats: ['es'],
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
config.build.lib.entry = entry;
|
|
63
|
+
const minifyPlugin = [];
|
|
64
|
+
if (config.build.minify) {
|
|
65
|
+
minifyPlugin.push((0, minify_1.minifyEs)());
|
|
66
|
+
}
|
|
67
|
+
const build = context.targetName === 'build';
|
|
68
|
+
const romaConfig = {
|
|
69
|
+
customLogger: new logger_1.Logger(),
|
|
70
|
+
cacheDir: (0, path_1.resolve)(context.root, 'node_modules', '.vite', context.projectName),
|
|
71
|
+
assetsInclude: [`${devPortalPath}/roma-framework.umd.js`],
|
|
72
|
+
root: base,
|
|
73
|
+
server: {
|
|
74
|
+
middlewareMode: true,
|
|
75
|
+
hmr: {
|
|
76
|
+
port: hmrPort,
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
appType: 'custom',
|
|
80
|
+
define: {
|
|
81
|
+
'process.env': {},
|
|
82
|
+
},
|
|
83
|
+
build: {
|
|
84
|
+
outDir: (0, path_1.resolve)(workspaceRoot, outputPath),
|
|
85
|
+
watch: watch
|
|
86
|
+
? {
|
|
87
|
+
clearScreen: true,
|
|
88
|
+
}
|
|
89
|
+
: undefined,
|
|
90
|
+
},
|
|
91
|
+
plugins: [
|
|
92
|
+
(0, plugin_react_1.default)(),
|
|
93
|
+
(0, nx_tsconfig_paths_plugin_1.nxViteTsPaths)(),
|
|
94
|
+
(0, vite_plugin_environment_1.default)({
|
|
95
|
+
NODE_ENV: build ? 'production' : 'development',
|
|
96
|
+
}),
|
|
97
|
+
(0, vite_plugin_restart_1.default)({
|
|
98
|
+
restart: ['package.json', viteConfigPath].filter((x) => !!x),
|
|
99
|
+
}),
|
|
100
|
+
...minifyPlugin,
|
|
101
|
+
],
|
|
102
|
+
};
|
|
103
|
+
return (0, vite_1.defineConfig)((0, vite_1.mergeConfig)(config, romaConfig));
|
|
104
|
+
};
|
|
105
|
+
exports.createRomaViteConfig = createRomaViteConfig;
|
|
106
|
+
//# sourceMappingURL=create-vite-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-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C,CAAC,CACxB;aACF,CAAC;YACF,GAAG,YAAY;SAChB;KACY,CAAC;IAChB,OAAO,IAAA,mBAAY,EAAC,IAAA,kBAAW,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AACvD,CAAC,CAAC;AApHW,QAAA,oBAAoB,wBAoH/B"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.executorContext = void 0;
|
|
4
|
+
const projects = {
|
|
5
|
+
administration: {
|
|
6
|
+
name: 'administration',
|
|
7
|
+
root: 'apps/applications/administration',
|
|
8
|
+
$schema: '../../../node_modules/nx/schemas/project-schema.json',
|
|
9
|
+
sourceRoot: 'apps/applications/administration/src',
|
|
10
|
+
projectType: 'application',
|
|
11
|
+
targets: {
|
|
12
|
+
build: {
|
|
13
|
+
dependsOn: ['^build'],
|
|
14
|
+
inputs: ['production', '^production'],
|
|
15
|
+
executor: '@equinor/roma-nx-plugin:build',
|
|
16
|
+
options: {},
|
|
17
|
+
configurations: {},
|
|
18
|
+
},
|
|
19
|
+
serve: {
|
|
20
|
+
executor: '@equinor/roma-nx-plugin:serve',
|
|
21
|
+
options: {
|
|
22
|
+
port: 3001,
|
|
23
|
+
portal: 'http://localhost:3000',
|
|
24
|
+
devPortal: 'dist/libs/roma-framework/dev-portal',
|
|
25
|
+
},
|
|
26
|
+
configurations: {},
|
|
27
|
+
},
|
|
28
|
+
portal: {
|
|
29
|
+
executor: '@equinor/roma-nx-plugin:portal',
|
|
30
|
+
options: {
|
|
31
|
+
additionalProxyTargets: {
|
|
32
|
+
'/tradeadministration': {
|
|
33
|
+
target: 'https://api-dev.gateway.equinor.com/tradeadministration/v1',
|
|
34
|
+
headers: {
|
|
35
|
+
'Ocp-Apim-Subscription-Key': 'RATSCORE_SUB_KEY',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
configurations: {},
|
|
41
|
+
},
|
|
42
|
+
test: {
|
|
43
|
+
inputs: [
|
|
44
|
+
'default',
|
|
45
|
+
'^production',
|
|
46
|
+
'{workspaceRoot}/jest.preset.js',
|
|
47
|
+
'{workspaceRoot}/jest.preset.js',
|
|
48
|
+
],
|
|
49
|
+
executor: '@nx/vite:test',
|
|
50
|
+
outputs: ['{options.reportsDirectory}'],
|
|
51
|
+
options: {
|
|
52
|
+
passWithNoTests: true,
|
|
53
|
+
reportsDirectory: '../../../coverage/apps/applications/administration',
|
|
54
|
+
},
|
|
55
|
+
configurations: {},
|
|
56
|
+
},
|
|
57
|
+
lint: {
|
|
58
|
+
inputs: [
|
|
59
|
+
'default',
|
|
60
|
+
'{workspaceRoot}/.eslintrc.json',
|
|
61
|
+
'{workspaceRoot}/.eslintignore',
|
|
62
|
+
'{workspaceRoot}/eslint.config.js',
|
|
63
|
+
],
|
|
64
|
+
executor: '@nx/eslint:eslint',
|
|
65
|
+
outputs: ['{options.outputFile}'],
|
|
66
|
+
options: {
|
|
67
|
+
lintFilePatterns: [
|
|
68
|
+
'apps/applications/administration/**/*.{ts,tsx,js,jsx}',
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
configurations: {},
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
tags: ['roma-application'],
|
|
75
|
+
implicitDependencies: [],
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
exports.executorContext = {
|
|
79
|
+
root: '/Users/RHENRI/dev/tops-roma/roma-workbench',
|
|
80
|
+
target: {
|
|
81
|
+
dependsOn: ['^build'],
|
|
82
|
+
inputs: ['production', '^production'],
|
|
83
|
+
executor: '@equinor/roma-nx-plugin:build',
|
|
84
|
+
options: {},
|
|
85
|
+
configurations: {},
|
|
86
|
+
},
|
|
87
|
+
projectsConfigurations: {
|
|
88
|
+
projects,
|
|
89
|
+
version: 2,
|
|
90
|
+
},
|
|
91
|
+
workspace: {
|
|
92
|
+
projects,
|
|
93
|
+
version: 2,
|
|
94
|
+
$schema: './node_modules/nx/schemas/nx-schema.json',
|
|
95
|
+
},
|
|
96
|
+
projectName: 'administration',
|
|
97
|
+
targetName: 'build',
|
|
98
|
+
cwd: '/Users/RHENRI/dev/tops-roma/roma-workbench',
|
|
99
|
+
isVerbose: false,
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=executor-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor-context.js","sourceRoot":"","sources":["../../../../../plugins/roma/src/executors/executor-context.ts"],"names":[],"mappings":";;;AAEA,MAAM,QAAQ,GAAG;IACf,cAAc,EAAE;QACd,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,kCAAkC;QACxC,OAAO,EAAE,sDAAsD;QAC/D,UAAU,EAAE,sCAAsC;QAClD,WAAW,EAAE,aAAa;QAC1B,OAAO,EAAE;YACP,KAAK,EAAE;gBACL,SAAS,EAAE,CAAC,QAAQ,CAAC;gBACrB,MAAM,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;gBACrC,QAAQ,EAAE,+BAA+B;gBACzC,OAAO,EAAE,EAAE;gBACX,cAAc,EAAE,EAAE;aACnB;YACD,KAAK,EAAE;gBACL,QAAQ,EAAE,+BAA+B;gBACzC,OAAO,EAAE;oBACP,IAAI,EAAE,IAAI;oBACV,MAAM,EAAE,uBAAuB;oBAC/B,SAAS,EAAE,qCAAqC;iBACjD;gBACD,cAAc,EAAE,EAAE;aACnB;YACD,MAAM,EAAE;gBACN,QAAQ,EAAE,gCAAgC;gBAC1C,OAAO,EAAE;oBACP,sBAAsB,EAAE;wBACtB,sBAAsB,EAAE;4BACtB,MAAM,EACJ,4DAA4D;4BAC9D,OAAO,EAAE;gCACP,2BAA2B,EAAE,kBAAkB;6BAChD;yBACF;qBACF;iBACF;gBACD,cAAc,EAAE,EAAE;aACnB;YACD,IAAI,EAAE;gBACJ,MAAM,EAAE;oBACN,SAAS;oBACT,aAAa;oBACb,gCAAgC;oBAChC,gCAAgC;iBACjC;gBACD,QAAQ,EAAE,eAAe;gBACzB,OAAO,EAAE,CAAC,4BAA4B,CAAC;gBACvC,OAAO,EAAE;oBACP,eAAe,EAAE,IAAI;oBACrB,gBAAgB,EACd,oDAAoD;iBACvD;gBACD,cAAc,EAAE,EAAE;aACnB;YACD,IAAI,EAAE;gBACJ,MAAM,EAAE;oBACN,SAAS;oBACT,gCAAgC;oBAChC,+BAA+B;oBAC/B,kCAAkC;iBACnC;gBACD,QAAQ,EAAE,mBAAmB;gBAC7B,OAAO,EAAE,CAAC,sBAAsB,CAAC;gBACjC,OAAO,EAAE;oBACP,gBAAgB,EAAE;wBAChB,uDAAuD;qBACxD;iBACF;gBACD,cAAc,EAAE,EAAE;aACnB;SACF;QACD,IAAI,EAAE,CAAC,kBAAkB,CAAC;QAC1B,oBAAoB,EAAE,EAAE;KACzB;CACF,CAAC;AAEW,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,4CAA4C;IAClD,MAAM,EAAE;QACN,SAAS,EAAE,CAAC,QAAQ,CAAC;QACrB,MAAM,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;QACrC,QAAQ,EAAE,+BAA+B;QACzC,OAAO,EAAE,EAAE;QACX,cAAc,EAAE,EAAE;KACnB;IACD,sBAAsB,EAAE;QACtB,QAAQ;QACR,OAAO,EAAE,CAAC;KACX;IACD,SAAS,EAAE;QACT,QAAQ;QACR,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,0CAA0C;KACpD;IACD,WAAW,EAAE,gBAAgB;IAC7B,UAAU,EAAE,OAAO;IACnB,GAAG,EAAE,4CAA4C;IACjD,SAAS,EAAE,KAAK;CACE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = runExecutor;
|
|
4
|
+
const publish_script_1 = require("./publish-script");
|
|
5
|
+
async function runExecutor(options, context) {
|
|
6
|
+
var _a;
|
|
7
|
+
const projectName = context.projectName;
|
|
8
|
+
const project = context.workspace.projects[projectName];
|
|
9
|
+
const buildConfig = project.targets.build;
|
|
10
|
+
const outputPath = (_a = buildConfig.outputPath) !== null && _a !== void 0 ? _a : `dist/apps/${projectName}`;
|
|
11
|
+
let success = true;
|
|
12
|
+
try {
|
|
13
|
+
await (0, publish_script_1.publishApplication)(outputPath, options);
|
|
14
|
+
}
|
|
15
|
+
catch (ex) {
|
|
16
|
+
console.error(`Error when publishing ${projectName}`);
|
|
17
|
+
console.error(ex);
|
|
18
|
+
success = false;
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
success,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/publish/executor.ts"],"names":[],"mappings":";;AASA,8BAmBC;AA1BD,qDAAsD;AAOvC,KAAK,UAAU,WAAW,CACvC,OAA8B,EAC9B,OAAwB;;IAExB,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IACxC,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAuB,CAAC;IAC9E,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,KAA2B,CAAC;IAChE,MAAM,UAAU,GAAG,MAAA,WAAW,CAAC,UAAU,mCAAI,aAAa,WAAW,EAAE,CAAC;IACxE,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,IAAI,CAAC;QACH,MAAM,IAAA,mCAAkB,EAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACZ,OAAO,CAAC,KAAK,CAAC,yBAAyB,WAAW,EAAE,CAAC,CAAC;QACtD,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClB,OAAO,GAAG,KAAK,CAAC;IAClB,CAAC;IACD,OAAO;QACL,OAAO;KACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AppManifest } from '@equinor/fusion-framework-module-app';
|
|
2
|
+
export type Manifest = AppManifest & {
|
|
3
|
+
categoryId: string;
|
|
4
|
+
version?: {
|
|
5
|
+
major: number;
|
|
6
|
+
minor: number;
|
|
7
|
+
patch: number;
|
|
8
|
+
};
|
|
9
|
+
entry: string;
|
|
10
|
+
description: string;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use `keywords` instead.
|
|
13
|
+
*/
|
|
14
|
+
tags?: Array<string>;
|
|
15
|
+
};
|
|
16
|
+
export type ManifestFile = Omit<Manifest, 'version'> & {
|
|
17
|
+
version: string;
|
|
18
|
+
};
|
|
19
|
+
export type Version = {
|
|
20
|
+
major: number;
|
|
21
|
+
minor: number;
|
|
22
|
+
patch: number;
|
|
23
|
+
};
|
|
24
|
+
export type Category = {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
color: string;
|
|
28
|
+
defaultIcon: string;
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-model.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/publish/manifest-model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PublishExecutorSchema } from './schema';
|
|
2
|
+
/**
|
|
3
|
+
* Publishes the application to the specified environment.
|
|
4
|
+
*
|
|
5
|
+
* @param pathToOutput - The path to the output directory.
|
|
6
|
+
* @param options - The options for the publish operation.
|
|
7
|
+
*/
|
|
8
|
+
export declare const publishApplication: (pathToOutput: string, options: PublishExecutorSchema) => Promise<void>;
|