@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,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.publishApplication = void 0;
|
|
4
|
+
const promises_1 = require("node:fs/promises");
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
|
+
const identity_1 = require("@azure/identity");
|
|
7
|
+
const node_zlib_1 = require("node:zlib");
|
|
8
|
+
const node_util_1 = require("node:util");
|
|
9
|
+
const brotli = (0, node_util_1.promisify)(node_zlib_1.brotliCompress);
|
|
10
|
+
/**
|
|
11
|
+
* An enum representing the status of the publish operation.
|
|
12
|
+
* @enum {number}
|
|
13
|
+
*/
|
|
14
|
+
var Status;
|
|
15
|
+
(function (Status) {
|
|
16
|
+
Status[Status["SUCCESS"] = 0] = "SUCCESS";
|
|
17
|
+
Status[Status["ERROR"] = 1] = "ERROR";
|
|
18
|
+
})(Status || (Status = {}));
|
|
19
|
+
/**
|
|
20
|
+
* A map of environment names to their respective configurations.
|
|
21
|
+
*/
|
|
22
|
+
const configMap = {
|
|
23
|
+
dev: {
|
|
24
|
+
romaUri: 'https://romadev.equinor.com',
|
|
25
|
+
randomVersion: true,
|
|
26
|
+
apiScopes: ['api://RomaWorkbenchApiNonProd/.default'],
|
|
27
|
+
},
|
|
28
|
+
qa: {
|
|
29
|
+
romaUri: 'https://romaqa.equinor.com',
|
|
30
|
+
randomVersion: true,
|
|
31
|
+
apiScopes: ['api://RomaWorkbenchApiNonProd/.default'],
|
|
32
|
+
},
|
|
33
|
+
production: {
|
|
34
|
+
romaUri: 'https://roma.equinor.com',
|
|
35
|
+
randomVersion: false,
|
|
36
|
+
apiScopes: ['api://RomaWorkbenchApi/.default'],
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Auth token to publish the application
|
|
41
|
+
*/
|
|
42
|
+
let token;
|
|
43
|
+
/**
|
|
44
|
+
* Publishes the application to the specified environment.
|
|
45
|
+
*
|
|
46
|
+
* @param pathToOutput - The path to the output directory.
|
|
47
|
+
* @param options - The options for the publish operation.
|
|
48
|
+
*/
|
|
49
|
+
const publishApplication = async (pathToOutput, options) => {
|
|
50
|
+
var _a, _b;
|
|
51
|
+
let env = options.environment;
|
|
52
|
+
// @ts-expect-error Need to rewrite this as nx expects production, not prod.
|
|
53
|
+
if (env === 'prod')
|
|
54
|
+
env = 'production';
|
|
55
|
+
const config = configMap[env];
|
|
56
|
+
config.randomVersion = (_a = options.randomVersion) !== null && _a !== void 0 ? _a : config.randomVersion;
|
|
57
|
+
const bundle = await (0, promises_1.readFile)((0, node_path_1.join)(pathToOutput, 'app-bundle.js'));
|
|
58
|
+
const manifest = await (0, promises_1.readFile)((0, node_path_1.join)(pathToOutput, 'manifest.json'));
|
|
59
|
+
const manifestJsonString = manifest.toString('utf-8');
|
|
60
|
+
const parsedManifest = JSON.parse(manifestJsonString);
|
|
61
|
+
if (!parsedManifest.build) {
|
|
62
|
+
console.warn('Manifest does not contain build information, and should be migrated with nx migrate');
|
|
63
|
+
parsedManifest.build = {
|
|
64
|
+
version: parsedManifest.version
|
|
65
|
+
? `${parsedManifest.version.major}.${parsedManifest.version.minor}.${parsedManifest.version.patch}`
|
|
66
|
+
: null,
|
|
67
|
+
entryPoint: '',
|
|
68
|
+
};
|
|
69
|
+
parsedManifest.appKey = parsedManifest.key;
|
|
70
|
+
parsedManifest.displayName = parsedManifest.name;
|
|
71
|
+
}
|
|
72
|
+
const appName = (_b = parsedManifest.appKey) !== null && _b !== void 0 ? _b : parsedManifest.key;
|
|
73
|
+
const categories = await getCategories(config);
|
|
74
|
+
const categoryIds = categories.map((c) => c.id);
|
|
75
|
+
if (!categoryIds.includes(parsedManifest.categoryId)) {
|
|
76
|
+
console.log(`Manifest validation failed: categoryId ${parsedManifest.categoryId} is not in list of categories`);
|
|
77
|
+
console.log(`Valid categories:`);
|
|
78
|
+
console.table(categories, ['id', 'name']);
|
|
79
|
+
console.log(`Publish will now exit.`);
|
|
80
|
+
throw new Error(`ManifestValidationError`);
|
|
81
|
+
}
|
|
82
|
+
console.log(`Reading & uploading bundle for ${appName}`);
|
|
83
|
+
const bundleResult = await uploadBundle(appName, bundle, config);
|
|
84
|
+
if (bundleResult === Status.ERROR) {
|
|
85
|
+
throw new Error('Failed to upload application');
|
|
86
|
+
}
|
|
87
|
+
console.log(`Reading & uploading application manifest to ${config.romaUri}`);
|
|
88
|
+
const status = await publishManifest(parsedManifest, config);
|
|
89
|
+
if (status === Status.ERROR) {
|
|
90
|
+
throw new Error(`Failed to publish application ${appName}`);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
console.log(`Successfully published application ${appName}`);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
exports.publishApplication = publishApplication;
|
|
97
|
+
/**
|
|
98
|
+
* Authenticates the user and returns the authentication token.
|
|
99
|
+
*
|
|
100
|
+
* @returns The authentication token.
|
|
101
|
+
*/
|
|
102
|
+
async function authenticate(config) {
|
|
103
|
+
if (token)
|
|
104
|
+
return token;
|
|
105
|
+
const auth = new identity_1.DefaultAzureCredential();
|
|
106
|
+
const tokenHolder = await auth.getToken(config.apiScopes);
|
|
107
|
+
token = tokenHolder.token;
|
|
108
|
+
return token;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Gets a list of valid roma categories
|
|
112
|
+
*
|
|
113
|
+
* @param config - The configuration for the environment.
|
|
114
|
+
* @returns The categories for roma.
|
|
115
|
+
*/
|
|
116
|
+
async function getCategories(config) {
|
|
117
|
+
const token = await authenticate(config);
|
|
118
|
+
const req = await fetch(`${config.romaUri}/api/apps/categories`, {
|
|
119
|
+
headers: {
|
|
120
|
+
Authorization: `Bearer ${token}`,
|
|
121
|
+
'Content-Type': 'application/json',
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
if (req.status >= 400) {
|
|
125
|
+
console.error('Failure', req.status);
|
|
126
|
+
return [];
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
return await req.json();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Publishes the manifest for the application.
|
|
134
|
+
*
|
|
135
|
+
* @param manifest - The manifest for the application.
|
|
136
|
+
* @param config - The configuration for the application.
|
|
137
|
+
* @returns The status of the publish operation.
|
|
138
|
+
*/
|
|
139
|
+
async function publishManifest(manifest, config) {
|
|
140
|
+
manifest.description = manifest.description || manifest.displayName;
|
|
141
|
+
const version = config.randomVersion ? Date.now() : manifest.build.version;
|
|
142
|
+
manifest.build.entryPoint = `${config.romaUri}/cdn/applications/bundle/${manifest.appKey}/app-bundle.js?version=${version}`;
|
|
143
|
+
manifest.entry = manifest.build.entryPoint;
|
|
144
|
+
const token = await authenticate(config);
|
|
145
|
+
const req = await fetch(`${config.romaUri}/api/apps`, {
|
|
146
|
+
method: 'POST',
|
|
147
|
+
headers: {
|
|
148
|
+
Authorization: `Bearer ${token}`,
|
|
149
|
+
'Content-Type': 'application/json',
|
|
150
|
+
},
|
|
151
|
+
body: JSON.stringify(manifest),
|
|
152
|
+
});
|
|
153
|
+
if (req.status < 400) {
|
|
154
|
+
return Status.SUCCESS;
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
console.error(`Encountered a problem when publishing application: Received statuscode ${req.status}`);
|
|
158
|
+
const err = await req.json();
|
|
159
|
+
console.error(err);
|
|
160
|
+
return Status.ERROR;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Uploads the bundle for the application to Azure Blob Storage.
|
|
165
|
+
*
|
|
166
|
+
* @param appName - The name of the application.
|
|
167
|
+
* @param bundle - The bundle for the application.
|
|
168
|
+
* @param config - The active config
|
|
169
|
+
*/
|
|
170
|
+
async function uploadBundle(appName, bundle, config) {
|
|
171
|
+
const fd = new FormData();
|
|
172
|
+
const br = await brotli(bundle);
|
|
173
|
+
fd.set('bundleFile', new Blob([br.buffer]));
|
|
174
|
+
const token = await authenticate(config);
|
|
175
|
+
const req = await fetch(`${config.romaUri}/api/apps/key/${appName}/bundle`, {
|
|
176
|
+
method: 'PUT',
|
|
177
|
+
headers: {
|
|
178
|
+
Authorization: `Bearer ${token}`,
|
|
179
|
+
},
|
|
180
|
+
body: fd,
|
|
181
|
+
});
|
|
182
|
+
if (req.status < 400) {
|
|
183
|
+
console.log(`Successfully uploaded bundle to ${appName}/app-bundle.js`);
|
|
184
|
+
return Status.SUCCESS;
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
console.error(`Encountered a problem when publishing application: Received statuscode ${req.status}`);
|
|
188
|
+
const err = await req.json();
|
|
189
|
+
console.error(err);
|
|
190
|
+
return Status.ERROR;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=publish-script.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-script.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/publish/publish-script.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAC5C,yCAAiC;AACjC,8CAAyD;AAGzD,yCAA2C;AAC3C,yCAAsC;AAEtC,MAAM,MAAM,GAAG,IAAA,qBAAS,EAAC,0BAAc,CAAC,CAAC;AAEzC;;;GAGG;AACH,IAAK,MAGJ;AAHD,WAAK,MAAM;IACT,yCAAO,CAAA;IACP,qCAAK,CAAA;AACP,CAAC,EAHI,MAAM,KAAN,MAAM,QAGV;AAeD;;GAEG;AACH,MAAM,SAAS,GAA2B;IACxC,GAAG,EAAE;QACH,OAAO,EAAE,6BAA6B;QACtC,aAAa,EAAE,IAAI;QACnB,SAAS,EAAE,CAAC,wCAAwC,CAAC;KACtD;IACD,EAAE,EAAE;QACF,OAAO,EAAE,4BAA4B;QACrC,aAAa,EAAE,IAAI;QACnB,SAAS,EAAE,CAAC,wCAAwC,CAAC;KACtD;IACD,UAAU,EAAE;QACV,OAAO,EAAE,0BAA0B;QACnC,aAAa,EAAE,KAAK;QACpB,SAAS,EAAE,CAAC,iCAAiC,CAAC;KAC/C;CACF,CAAC;AAEF;;GAEG;A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K,CAAC,GAAG,MAAM,CAAC,OAAO,iBAAiB,OAAO,SAAS,EAAE;QAC1E,MAAM,EAAE,KAAK;QACb,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,KAAK,EAAE;SACjC;QACD,IAAI,EAAE,EAAE;KACT,CAAC,CAAC;IACH,IAAI,GAAG,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC;QACrB,OAAO,CAAC,GAAG,CAAC,mCAAmC,OAAO,gBAAgB,CAAC,CAAC;QACxE,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CACX,0EAA0E,GAAG,CAAC,MAAM,EAAE,CACvF,CAAC;QACF,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;QAC7B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = runExecutor;
|
|
4
|
+
const server_1 = require("./server");
|
|
5
|
+
async function runExecutor(options, context) {
|
|
6
|
+
const configs = [];
|
|
7
|
+
if (options.additionalProjects) {
|
|
8
|
+
options.additionalProjects.forEach((project) => {
|
|
9
|
+
const config = context.workspace.projects[project].targets.serve
|
|
10
|
+
.options;
|
|
11
|
+
config.name = project;
|
|
12
|
+
configs.push(config);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return (0, server_1.createServer)(options, context, configs);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/serve/executor.ts"],"names":[],"mappings":";;AAIA,8BAcC;AAhBD,qCAAwC;AAEzB,KAAK,UAAU,WAAW,CACvC,OAA4B,EAC5B,OAAwB;IAExB,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAC/B,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7C,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK;iBAC7D,OAA8B,CAAC;YAClC,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;YACtB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,IAAA,qBAAY,EAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getManifest = getManifest;
|
|
4
|
+
const path_1 = require("path");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
function getManifest(root) {
|
|
7
|
+
let manifest;
|
|
8
|
+
try {
|
|
9
|
+
const packageJson = (0, devkit_1.readJsonFile)((0, path_1.join)(root, 'package.json'));
|
|
10
|
+
const pkgManifest = packageJson.roma;
|
|
11
|
+
if (pkgManifest) {
|
|
12
|
+
manifest = Object.assign(Object.assign({}, pkgManifest), { version: packageJson.version });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
catch (_a) {
|
|
16
|
+
manifest = (0, devkit_1.readJsonFile)((0, path_1.join)(root, 'fusion-manifest.json'));
|
|
17
|
+
}
|
|
18
|
+
return manifest;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=get-manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-manifest.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/serve/get-manifest.ts"],"names":[],"mappings":";;AAIA,kCAiBC;AArBD,+BAA4B;AAE5B,uCAA0C;AAE1C,SAAgB,WAAW,CAAC,IAAY;IACtC,IAAI,QAAyC,CAAC;IAC9C,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,IAAA,qBAAY,EAAC,IAAA,WAAI,EAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC;QAC7D,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC;QACrC,IAAI,WAAW,EAAE,CAAC;YAChB,QAAQ,mCACH,WAAW,KACd,OAAO,EAAE,WAAW,CAAC,OAAO,GAC7B,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,WAAM,CAAC;QACP,QAAQ,GAAG,IAAA,qBAAY,EACrB,IAAA,WAAI,EAAC,IAAI,EAAE,sBAAsB,CAAC,CACA,CAAC;IACvC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ServeExecutorSchema } from './schema';
|
|
2
|
+
import type { ExecutorContext } from '@nx/devkit';
|
|
3
|
+
export declare function createServer({ port: requestedPort, devPortal, portal: portalTarget, open, }: ServeExecutorSchema, context: ExecutorContext, additionalProjects?: Array<ServeExecutorSchema>): Promise<unknown>;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createServer = createServer;
|
|
4
|
+
const openBrowser = require('open');
|
|
5
|
+
const express = require('express');
|
|
6
|
+
const chalk = require('chalk');
|
|
7
|
+
const getPort = require('get-port-cjs');
|
|
8
|
+
const vite_1 = require("vite");
|
|
9
|
+
const path_1 = require("path");
|
|
10
|
+
const node_fs_1 = require("node:fs");
|
|
11
|
+
const http_proxy_middleware_1 = require("http-proxy-middleware");
|
|
12
|
+
const create_vite_config_1 = require("../create-vite-config");
|
|
13
|
+
const get_vite_config_1 = require("../utils/get-vite-config");
|
|
14
|
+
const get_manifest_1 = require("./get-manifest");
|
|
15
|
+
async function loadServices(portalTarget) {
|
|
16
|
+
try {
|
|
17
|
+
const req = await fetch(`${portalTarget}/_discovery/environments/current`);
|
|
18
|
+
const res = (await req.json());
|
|
19
|
+
return res.services
|
|
20
|
+
.filter((s) => s.uri.startsWith(portalTarget))
|
|
21
|
+
.map((s) => new URL(s.uri).pathname)
|
|
22
|
+
.filter((path) => path.length >= 3 && !path.startsWith('/apim/'));
|
|
23
|
+
}
|
|
24
|
+
catch (ex) {
|
|
25
|
+
console.error(ex);
|
|
26
|
+
process.exit();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async function createServer({ port: requestedPort = 3000, devPortal = 'node_modules/@equinor/roma-framework/dev-portal', portal: portalTarget = 'https://romadev.equinor.com', open, }, context, additionalProjects) {
|
|
30
|
+
// Get path to dev-portal, this would be a flag from executor.
|
|
31
|
+
const devPortalPath = (0, path_1.resolve)(process.cwd(), devPortal);
|
|
32
|
+
// Get available port, prefers requestedPort but falls back to another free port
|
|
33
|
+
const ports = Array.from(new Set([requestedPort, ...getPort.portNumbers(3000, 30009)]));
|
|
34
|
+
const port = (await getPort({ port: ports }));
|
|
35
|
+
if (!ports.includes(port)) {
|
|
36
|
+
throw new Error(`All valid ports (3000-3009) are closed`);
|
|
37
|
+
}
|
|
38
|
+
console.clear();
|
|
39
|
+
if (port !== requestedPort) {
|
|
40
|
+
console.log(chalk.yellow(`Port ${requestedPort} is taken, using ${port}`));
|
|
41
|
+
}
|
|
42
|
+
const projectName = context.projectName;
|
|
43
|
+
const project = context.workspace.projects[projectName];
|
|
44
|
+
const base = (0, path_1.resolve)(context.root, project.root);
|
|
45
|
+
// Load user-defined viteConfig
|
|
46
|
+
const viteConfigPath = (0, get_vite_config_1.getViteConfig)(base);
|
|
47
|
+
const userConfig = await (0, vite_1.loadConfigFromFile)({
|
|
48
|
+
command: 'build',
|
|
49
|
+
mode: 'production',
|
|
50
|
+
}, viteConfigPath);
|
|
51
|
+
// Create express application
|
|
52
|
+
const app = express();
|
|
53
|
+
app.set('x-powered-by', false);
|
|
54
|
+
app.use(express.static(devPortalPath));
|
|
55
|
+
// Load Roma services
|
|
56
|
+
const services = await loadServices(portalTarget);
|
|
57
|
+
// Add proxy middleware for all roma-services
|
|
58
|
+
services.forEach((p) => app.use(p, (0, http_proxy_middleware_1.createProxyMiddleware)(p, { target: portalTarget, changeOrigin: true })));
|
|
59
|
+
// Range of port numbers for hmr, otherwise HMR won't work for multiple apps at the same time
|
|
60
|
+
const hmrPorts = getPort.portNumbers(40000, 45000);
|
|
61
|
+
const hmrPort = await getPort(hmrPorts);
|
|
62
|
+
const viteConfig = (0, create_vite_config_1.createRomaViteConfig)(userConfig.config, context, false, hmrPort);
|
|
63
|
+
// Create Vite server in middleware mode
|
|
64
|
+
const vite = await (0, vite_1.createServer)(viteConfig);
|
|
65
|
+
// Apply vite-middleware to the express app
|
|
66
|
+
app.use(vite.middlewares);
|
|
67
|
+
app.use('/apim*', (0, http_proxy_middleware_1.createProxyMiddleware)('/apim', { target: portalTarget, changeOrigin: true }));
|
|
68
|
+
app.use(
|
|
69
|
+
// Custom proxy-setup for service discovery endpoint
|
|
70
|
+
'/_discovery*', (0, http_proxy_middleware_1.createProxyMiddleware)('/_discovery', {
|
|
71
|
+
target: portalTarget,
|
|
72
|
+
changeOrigin: true, // Avoid API errors due to origin-conflicts
|
|
73
|
+
secure: false,
|
|
74
|
+
selfHandleResponse: true, // Tell the proxy we want to override the response
|
|
75
|
+
onProxyRes: (proxyRes, req, res) => {
|
|
76
|
+
const body = [];
|
|
77
|
+
proxyRes.on('data', function (chunk) {
|
|
78
|
+
body.push(chunk);
|
|
79
|
+
});
|
|
80
|
+
proxyRes.on('end', function () {
|
|
81
|
+
const bodyStr = Buffer.concat(body).toString();
|
|
82
|
+
const environment = JSON.parse(bodyStr);
|
|
83
|
+
// Override the services, and direct all api's from <target> to go via this proxy.
|
|
84
|
+
environment.services.forEach((s) => {
|
|
85
|
+
if (s.uri.includes(portalTarget)) {
|
|
86
|
+
s.uri = s.uri.replace(portalTarget, `http://localhost:${port}`);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
res.end(JSON.stringify(environment));
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
}));
|
|
93
|
+
// Extract entrypoint-url
|
|
94
|
+
const libConfig = vite.config.build.lib;
|
|
95
|
+
const entry = libConfig.entry;
|
|
96
|
+
// Custom proxy for app-list to add the current application
|
|
97
|
+
app.get('/api/apps', (0, http_proxy_middleware_1.createProxyMiddleware)('/api/apps', {
|
|
98
|
+
target: portalTarget,
|
|
99
|
+
changeOrigin: true,
|
|
100
|
+
selfHandleResponse: true,
|
|
101
|
+
onProxyRes: (proxyRes, req, res) => {
|
|
102
|
+
const body = [];
|
|
103
|
+
proxyRes.on('data', function (chunk) {
|
|
104
|
+
body.push(chunk);
|
|
105
|
+
});
|
|
106
|
+
proxyRes.on('end', function () {
|
|
107
|
+
var _a;
|
|
108
|
+
const bodyStr = Buffer.concat(body).toString();
|
|
109
|
+
const data = JSON.parse(bodyStr);
|
|
110
|
+
const atIndex = (_a = data === null || data === void 0 ? void 0 : data.findIndex((manifest) => { var _a; return ((_a = manifest.appKey) !== null && _a !== void 0 ? _a : manifest.key) === projectName; })) !== null && _a !== void 0 ? _a : -1;
|
|
111
|
+
// If existing app, we need to change the entry-point.
|
|
112
|
+
if (atIndex > -1) {
|
|
113
|
+
data[atIndex].entry = `/${entry.self}`;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
// New app, so adding it to the app-list
|
|
117
|
+
try {
|
|
118
|
+
// Read and parse fusion-manifest
|
|
119
|
+
const manifest = (0, get_manifest_1.getManifest)(vite.config.root);
|
|
120
|
+
manifest.entry = `/${entry.self}`;
|
|
121
|
+
data.push(manifest);
|
|
122
|
+
}
|
|
123
|
+
catch (ex) {
|
|
124
|
+
throw new Error(chalk.red(`Fatal error: Failed to read fusion-manifest.json in ${vite.config.root}
|
|
125
|
+
Application will now exit.`));
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (additionalProjects) {
|
|
129
|
+
additionalProjects.forEach((project) => {
|
|
130
|
+
var _a;
|
|
131
|
+
const atIndex = (_a = data === null || data === void 0 ? void 0 : data.findIndex((manifest) => { var _a; return ((_a = manifest.appKey) !== null && _a !== void 0 ? _a : manifest.key) === project.name; })) !== null && _a !== void 0 ? _a : -1;
|
|
132
|
+
if (atIndex >= 0) {
|
|
133
|
+
data[atIndex] = Object.assign(Object.assign({}, data[atIndex]), { entry: `/${entry[project.name]}` });
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
res.json(data);
|
|
138
|
+
});
|
|
139
|
+
},
|
|
140
|
+
}));
|
|
141
|
+
// Roma portal api
|
|
142
|
+
app.use('/api/*', (0, http_proxy_middleware_1.createProxyMiddleware)('/api', {
|
|
143
|
+
target: portalTarget,
|
|
144
|
+
changeOrigin: true,
|
|
145
|
+
}));
|
|
146
|
+
app.use('/cdn/*', (0, http_proxy_middleware_1.createProxyMiddleware)('/cdn', {
|
|
147
|
+
target: portalTarget,
|
|
148
|
+
changeOrigin: true,
|
|
149
|
+
}));
|
|
150
|
+
// Roma SSE api
|
|
151
|
+
app.use('/eventstream/*', (0, http_proxy_middleware_1.createProxyMiddleware)('/eventstream', {
|
|
152
|
+
target: portalTarget,
|
|
153
|
+
changeOrigin: true,
|
|
154
|
+
proxyTimeout: 1000 * 60 * 30,
|
|
155
|
+
}));
|
|
156
|
+
// SPA-style routing
|
|
157
|
+
app.use('*', async (req, res) => {
|
|
158
|
+
const htmlRaw = (0, node_fs_1.readFileSync)((0, path_1.join)(devPortalPath + '/index.html'), 'utf-8');
|
|
159
|
+
const html = await vite.transformIndexHtml(req.url, htmlRaw);
|
|
160
|
+
res.send(html);
|
|
161
|
+
});
|
|
162
|
+
return new Promise((resolve) => {
|
|
163
|
+
// listen to requested port
|
|
164
|
+
app.listen(port, () => {
|
|
165
|
+
console.log(chalk.green('Roma dev server listening on port ' + port));
|
|
166
|
+
if (open) {
|
|
167
|
+
console.log(chalk.green(`Opening the application at http://localhost:${port}/apps/${projectName}`));
|
|
168
|
+
openBrowser(`http://localhost:${port}/apps/${projectName}`);
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
console.log(chalk.green(`Open the application at http://localhost:${port}/apps/${projectName}`));
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
app.on('close', () => {
|
|
175
|
+
resolve({ success: true });
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/serve/server.ts"],"names":[],"mappings":";;AAoCA,oCAmOC;AApQD,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AACpC,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AACnC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/B,MAAM,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AACxC,+BAIc;AACd,+BAAqC;AACrC,qCAAuC;AACvC,iEAA8D;AAE9D,8DAA6D;AAE7D,8DAAyD;AACzD,iDAA6C;AAG7C,KAAK,UAAU,YAAY,CAAC,YAAoB;IAC9C,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,YAAY,kCAAkC,CAAC,CAAC;QAC3E,MAAM,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAmB,CAAC;QACjD,OAAO,GAAG,CAAC,QAAQ;aAChB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;aAC7C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAA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,CAAC;YAC9D,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,KAAK,CACT,4CAA4C,IAAI,SAAS,WAAW,EAAE,CACvE,CACF,CAAC;YACJ,CAAC;QACH,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YACnB,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getViteConfig(root: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getViteConfig = getViteConfig;
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
function getViteConfig(root) {
|
|
7
|
+
const files = (0, node_fs_1.readdirSync)(root);
|
|
8
|
+
const file = files.find((f) => f.startsWith('vite.config'));
|
|
9
|
+
if (!file)
|
|
10
|
+
throw new Error(`No vite config found!`);
|
|
11
|
+
return (0, path_1.resolve)(root, file);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=get-vite-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-vite-config.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/utils/get-vite-config.ts"],"names":[],"mappings":";;AAGA,sCAKC;AARD,qCAAsC;AACtC,+BAA+B;AAE/B,SAAgB,aAAa,CAAC,IAAY;IACxC,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,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IACpD,OAAO,IAAA,cAAO,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LogErrorOptions, LogOptions, LogType } from 'vite';
|
|
2
|
+
import { RollupError } from 'rollup';
|
|
3
|
+
type ILogger = {
|
|
4
|
+
info(msg: string, options?: LogOptions): void;
|
|
5
|
+
warn(msg: string, options?: LogOptions): void;
|
|
6
|
+
warnOnce(msg: string, options?: LogOptions): void;
|
|
7
|
+
error(msg: string, options?: LogErrorOptions): void;
|
|
8
|
+
clearScreen(type: LogType): void;
|
|
9
|
+
hasErrorLogged(error: Error | RollupError): boolean;
|
|
10
|
+
hasWarned: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare class Logger implements ILogger {
|
|
13
|
+
private warnings;
|
|
14
|
+
private errors;
|
|
15
|
+
hasWarned: boolean;
|
|
16
|
+
constructor();
|
|
17
|
+
info(msg: string, options?: LogOptions): void;
|
|
18
|
+
warn(msg: string, options?: LogOptions): void;
|
|
19
|
+
warnOnce(msg: string, options?: LogOptions): void;
|
|
20
|
+
error(msg: string, options?: LogErrorOptions): void;
|
|
21
|
+
clearScreen(type: LogType): void;
|
|
22
|
+
hasErrorLogged(error: Error | RollupError): boolean;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Logger = void 0;
|
|
4
|
+
const timestamp = () => {
|
|
5
|
+
const date = new Date();
|
|
6
|
+
const year = date.getFullYear();
|
|
7
|
+
const month = date.getUTCMonth() + 1;
|
|
8
|
+
const day = date.getDate();
|
|
9
|
+
const hour = date.getHours();
|
|
10
|
+
const minutes = date.getMinutes();
|
|
11
|
+
const seconds = date.getSeconds();
|
|
12
|
+
return `[${year}-${String(month).padStart(2, '0')}-${day} ${hour}:${minutes}:${seconds}]`;
|
|
13
|
+
};
|
|
14
|
+
const logModes = {
|
|
15
|
+
error: () => {
|
|
16
|
+
return `${timestamp()}: [roma]:`;
|
|
17
|
+
},
|
|
18
|
+
warning: () => {
|
|
19
|
+
return `${timestamp()}: [roma]:`;
|
|
20
|
+
},
|
|
21
|
+
info: () => {
|
|
22
|
+
return `${timestamp()}: [roma]:`;
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
// Custom logger, for now ignores error on roma-framework.umd.js, but can be improved on further.
|
|
26
|
+
class Logger {
|
|
27
|
+
constructor() {
|
|
28
|
+
this.warnings = new Set();
|
|
29
|
+
this.errors = new Set();
|
|
30
|
+
this.hasWarned = false;
|
|
31
|
+
}
|
|
32
|
+
info(msg, options) {
|
|
33
|
+
if (options === null || options === void 0 ? void 0 : options.clear)
|
|
34
|
+
this.clearScreen('info');
|
|
35
|
+
console.info(logModes.info(), msg);
|
|
36
|
+
// Additional logic can be added here to handle options
|
|
37
|
+
}
|
|
38
|
+
warn(msg, options) {
|
|
39
|
+
console.warn(logModes.warning(), msg);
|
|
40
|
+
if (options === null || options === void 0 ? void 0 : options.clear)
|
|
41
|
+
this.clearScreen('warn');
|
|
42
|
+
this.hasWarned = true;
|
|
43
|
+
// Additional logic can be added here to handle options
|
|
44
|
+
}
|
|
45
|
+
warnOnce(msg, options) {
|
|
46
|
+
if (!this.warnings.has(msg)) {
|
|
47
|
+
this.warnings.add(msg);
|
|
48
|
+
this.warn(msg, options);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
error(msg, options) {
|
|
52
|
+
if (typeof msg === 'string' &&
|
|
53
|
+
msg.includes('resolved id: /roma-framework.umd.js'))
|
|
54
|
+
return;
|
|
55
|
+
if (options === null || options === void 0 ? void 0 : options.clear)
|
|
56
|
+
this.clearScreen('error');
|
|
57
|
+
console.error(logModes.error(), msg);
|
|
58
|
+
}
|
|
59
|
+
clearScreen(type) {
|
|
60
|
+
console.clear();
|
|
61
|
+
if (type === 'error')
|
|
62
|
+
console.log(`Console cleared: ${type}`);
|
|
63
|
+
}
|
|
64
|
+
hasErrorLogged(error) {
|
|
65
|
+
return this.errors.has(error);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.Logger = Logger;
|
|
69
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../../../plugins/roma/src/executors/utils/logger.ts"],"names":[],"mappings":";;;AAaA,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IACxB,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAChC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IACrC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC7B,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;IAClC,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;IAClC,OAAO,IAAI,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CACvC,CAAC,EACD,GAAG,CACJ,IAAI,GAAG,IAAI,IAAI,IAAI,OAAO,IAAI,OAAO,GAAG,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAG;IACf,KAAK,EAAE,GAAG,EAAE;QACV,OAAO,GAAG,SAAS,EAAE,WAAW,CAAC;IACnC,CAAC;IACD,OAAO,EAAE,GAAG,EAAE;QACZ,OAAO,GAAG,SAAS,EAAE,WAAW,CAAC;IACnC,CAAC;IACD,IAAI,EAAE,GAAG,EAAE;QACT,OAAO,GAAG,SAAS,EAAE,WAAW,CAAC;IACnC,CAAC;CACF,CAAC;AAEF,iG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9C,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,GAAG,CAAC,CAAC;IACvC,CAAC;IAED,WAAW,CAAC,IAAa;QACvB,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,IAAI,IAAI,KAAK,OAAO;YAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IAED,cAAc,CAAC,KAA0B;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;CACF;AAjDD,wBAiDC"}
|
|
@@ -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,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'>): Promise<() => void>;
|
|
5
|
+
export default appGenerator;
|