@mochabug/adaptkit 1.0.0-beta.8 → 1.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/build-client.js +5 -1
- package/bin/index.js +6076 -12
- package/bin/index.js.map +4 -4
- package/package.json +16 -11
package/assets/build-client.js
CHANGED
|
@@ -15,6 +15,9 @@ if (!manifest.organization || !manifest.name || !manifest.version) {
|
|
|
15
15
|
}
|
|
16
16
|
const CDN_PATH = `${process.env.PLUGINS_CDN}/${manifest.organization}/${manifest.name}/${manifest.version}`;
|
|
17
17
|
|
|
18
|
+
// Load all of the vertex.json so that we can check for correct vertex names
|
|
19
|
+
const vertexDefinitions = glob('./src/vertices/**/vertex.json').map((file) => JSON.parse(fs.readFileSync(file, 'utf8')));
|
|
20
|
+
|
|
18
21
|
fs.rmSync('./cdn', { recursive: true });
|
|
19
22
|
|
|
20
23
|
// Build the client and place all the assets onto the corresponding CDN for the plugin
|
|
@@ -54,7 +57,7 @@ for (const [outputPath, outputMeta] of Object.entries(result.metafile.outputs))
|
|
|
54
57
|
continue;
|
|
55
58
|
}
|
|
56
59
|
let vertex = path.dirname(path.dirname(path.relative('./src/vertices', outputMeta.entryPoint)));
|
|
57
|
-
if (entrypoints.vertices.findIndex((v) => v === vertex) === -1 &&
|
|
60
|
+
if (entrypoints.vertices.findIndex((v) => v === vertex) === -1 && vertexDefinitions.find((v) => v.name === vertex)) {
|
|
58
61
|
entrypoints.vertices.push(vertex);
|
|
59
62
|
}
|
|
60
63
|
if (outputMeta.entryPoint.endsWith('executor.main.tsx')) {
|
|
@@ -76,6 +79,7 @@ await build({
|
|
|
76
79
|
outdir: 'dist',
|
|
77
80
|
tsconfig: 'tsconfig.json',
|
|
78
81
|
bundle: true,
|
|
82
|
+
minify: true,
|
|
79
83
|
platform: 'node',
|
|
80
84
|
format: 'cjs',
|
|
81
85
|
target: 'esnext',
|