arri 0.12.5 → 0.12.6
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/dist/cli.cjs +14 -9
- package/dist/cli.mjs +14 -9
- package/package.json +5 -5
package/dist/cli.cjs
CHANGED
|
@@ -211,8 +211,8 @@ async function startBuild(config, skipCodeGen = false) {
|
|
|
211
211
|
".output",
|
|
212
212
|
CODEGEN_OUTPUT
|
|
213
213
|
);
|
|
214
|
-
if (
|
|
215
|
-
logger$2.log("Generating
|
|
214
|
+
if (!skipCodeGen) {
|
|
215
|
+
logger$2.log("Generating Arri app definition (__definition.json)");
|
|
216
216
|
node_child_process.execSync(`node ${codegenModule}`, { env: process.env });
|
|
217
217
|
const defJson = path__default.resolve(
|
|
218
218
|
config.rootDir,
|
|
@@ -220,18 +220,23 @@ async function startBuild(config, skipCodeGen = false) {
|
|
|
220
220
|
"__definition.json"
|
|
221
221
|
);
|
|
222
222
|
const def = JSON.parse(fs.readFileSync(defJson, { encoding: "utf-8" }));
|
|
223
|
-
if (arriCodegenUtils.isAppDefinition(def)) {
|
|
223
|
+
if (arriCodegenUtils.isAppDefinition(def) && clientCount > 0) {
|
|
224
|
+
logger$2.log(`Generating ${clientCount} clients`);
|
|
224
225
|
await Promise.all(
|
|
225
226
|
config.clientGenerators.map((plugin) => plugin.generator(def))
|
|
226
227
|
);
|
|
228
|
+
logger$2.log(`${clientCount} clients generated`);
|
|
229
|
+
} else {
|
|
230
|
+
logger$2.warn(
|
|
231
|
+
"No client generators specified. Skipping client codegen."
|
|
232
|
+
);
|
|
227
233
|
}
|
|
228
|
-
logger$2.log(`${clientCount} clients generated`);
|
|
229
234
|
} else {
|
|
230
|
-
logger$2.log("
|
|
235
|
+
logger$2.log("Skipping codegen");
|
|
231
236
|
}
|
|
232
237
|
logger$2.log("Cleaning up files");
|
|
233
238
|
await fs__default.rm(codegenModule);
|
|
234
|
-
logger$2.
|
|
239
|
+
logger$2.success(
|
|
235
240
|
`Build finished! You can start your server by running "node .output/${SERVER_ENTRY_OUTPUT}"`
|
|
236
241
|
);
|
|
237
242
|
}
|
|
@@ -255,7 +260,7 @@ async function bundleFiles(config, allowCodegen = true) {
|
|
|
255
260
|
minifyWhitespace: false,
|
|
256
261
|
banner: {
|
|
257
262
|
js: `import { createRequire as topLevelCreateRequire } from 'module';
|
|
258
|
-
|
|
263
|
+
const require = topLevelCreateRequire(import.meta.url);`
|
|
259
264
|
},
|
|
260
265
|
outfile: path__default.resolve(config.rootDir, ".output", CODEGEN_OUTPUT)
|
|
261
266
|
});
|
|
@@ -283,7 +288,7 @@ async function bundleFiles(config, allowCodegen = true) {
|
|
|
283
288
|
minifyWhitespace: true,
|
|
284
289
|
banner: {
|
|
285
290
|
js: `import { createRequire as topLevelCreateRequire } from 'module';
|
|
286
|
-
|
|
291
|
+
const require = topLevelCreateRequire(import.meta.url);`
|
|
287
292
|
},
|
|
288
293
|
allowOverwrite: true,
|
|
289
294
|
outfile: path__default.resolve(config.rootDir, ".output", SERVER_ENTRY_OUTPUT)
|
|
@@ -569,7 +574,7 @@ async function generateClients(config$1) {
|
|
|
569
574
|
(generator) => generator.generator(result)
|
|
570
575
|
)
|
|
571
576
|
);
|
|
572
|
-
logger$1.
|
|
577
|
+
logger$1.success(
|
|
573
578
|
`Generated ${clientCount} client${clientCount === 1 ? "" : "s"}`
|
|
574
579
|
);
|
|
575
580
|
} catch (err) {
|
package/dist/cli.mjs
CHANGED
|
@@ -187,8 +187,8 @@ async function startBuild(config, skipCodeGen = false) {
|
|
|
187
187
|
".output",
|
|
188
188
|
CODEGEN_OUTPUT
|
|
189
189
|
);
|
|
190
|
-
if (
|
|
191
|
-
logger$2.log("Generating
|
|
190
|
+
if (!skipCodeGen) {
|
|
191
|
+
logger$2.log("Generating Arri app definition (__definition.json)");
|
|
192
192
|
execSync(`node ${codegenModule}`, { env: process.env });
|
|
193
193
|
const defJson = path.resolve(
|
|
194
194
|
config.rootDir,
|
|
@@ -196,18 +196,23 @@ async function startBuild(config, skipCodeGen = false) {
|
|
|
196
196
|
"__definition.json"
|
|
197
197
|
);
|
|
198
198
|
const def = JSON.parse(readFileSync(defJson, { encoding: "utf-8" }));
|
|
199
|
-
if (isAppDefinition(def)) {
|
|
199
|
+
if (isAppDefinition(def) && clientCount > 0) {
|
|
200
|
+
logger$2.log(`Generating ${clientCount} clients`);
|
|
200
201
|
await Promise.all(
|
|
201
202
|
config.clientGenerators.map((plugin) => plugin.generator(def))
|
|
202
203
|
);
|
|
204
|
+
logger$2.log(`${clientCount} clients generated`);
|
|
205
|
+
} else {
|
|
206
|
+
logger$2.warn(
|
|
207
|
+
"No client generators specified. Skipping client codegen."
|
|
208
|
+
);
|
|
203
209
|
}
|
|
204
|
-
logger$2.log(`${clientCount} clients generated`);
|
|
205
210
|
} else {
|
|
206
|
-
logger$2.log("
|
|
211
|
+
logger$2.log("Skipping codegen");
|
|
207
212
|
}
|
|
208
213
|
logger$2.log("Cleaning up files");
|
|
209
214
|
await fs.rm(codegenModule);
|
|
210
|
-
logger$2.
|
|
215
|
+
logger$2.success(
|
|
211
216
|
`Build finished! You can start your server by running "node .output/${SERVER_ENTRY_OUTPUT}"`
|
|
212
217
|
);
|
|
213
218
|
}
|
|
@@ -231,7 +236,7 @@ async function bundleFiles(config, allowCodegen = true) {
|
|
|
231
236
|
minifyWhitespace: false,
|
|
232
237
|
banner: {
|
|
233
238
|
js: `import { createRequire as topLevelCreateRequire } from 'module';
|
|
234
|
-
|
|
239
|
+
const require = topLevelCreateRequire(import.meta.url);`
|
|
235
240
|
},
|
|
236
241
|
outfile: path.resolve(config.rootDir, ".output", CODEGEN_OUTPUT)
|
|
237
242
|
});
|
|
@@ -259,7 +264,7 @@ async function bundleFiles(config, allowCodegen = true) {
|
|
|
259
264
|
minifyWhitespace: true,
|
|
260
265
|
banner: {
|
|
261
266
|
js: `import { createRequire as topLevelCreateRequire } from 'module';
|
|
262
|
-
|
|
267
|
+
const require = topLevelCreateRequire(import.meta.url);`
|
|
263
268
|
},
|
|
264
269
|
allowOverwrite: true,
|
|
265
270
|
outfile: path.resolve(config.rootDir, ".output", SERVER_ENTRY_OUTPUT)
|
|
@@ -545,7 +550,7 @@ async function generateClients(config) {
|
|
|
545
550
|
(generator) => generator.generator(result)
|
|
546
551
|
)
|
|
547
552
|
);
|
|
548
|
-
logger$1.
|
|
553
|
+
logger$1.success(
|
|
549
554
|
`Generated ${clientCount} client${clientCount === 1 ? "" : "s"}`
|
|
550
555
|
);
|
|
551
556
|
} catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arri",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"pathe": "^1.1.1",
|
|
39
39
|
"prettier": "^3.0.3",
|
|
40
40
|
"scule": "^1.0.0",
|
|
41
|
-
"arri-codegen-dart": "0.12.
|
|
42
|
-
"arri-codegen-ts": "0.12.
|
|
43
|
-
"arri-validate": "0.12.
|
|
44
|
-
"arri-codegen-utils": "0.12.
|
|
41
|
+
"arri-codegen-dart": "0.12.6",
|
|
42
|
+
"arri-codegen-ts": "0.12.6",
|
|
43
|
+
"arri-validate": "0.12.6",
|
|
44
|
+
"arri-codegen-utils": "0.12.6"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"listhen": "1.x"
|