@base44-preview/cli 0.0.32-pr.249.15900d9 → 0.0.32-pr.249.168e6dd
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/index.js +13 -13
- package/dist/cli/index.js.map +6 -6
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -186681,7 +186681,9 @@ var theme = {
|
|
|
186681
186681
|
styles: {
|
|
186682
186682
|
header: source_default.dim,
|
|
186683
186683
|
bold: source_default.bold,
|
|
186684
|
-
dim: source_default.dim
|
|
186684
|
+
dim: source_default.dim,
|
|
186685
|
+
error: source_default.red,
|
|
186686
|
+
warn: source_default.yellow
|
|
186685
186687
|
},
|
|
186686
186688
|
format: {
|
|
186687
186689
|
errorContext(ctx) {
|
|
@@ -195354,8 +195356,8 @@ var dateTimeFormat = new Intl.DateTimeFormat([], {
|
|
|
195354
195356
|
hour12: false
|
|
195355
195357
|
});
|
|
195356
195358
|
var colorByType = {
|
|
195357
|
-
error:
|
|
195358
|
-
warn:
|
|
195359
|
+
error: theme.styles.error,
|
|
195360
|
+
warn: theme.styles.warn,
|
|
195359
195361
|
log: (text) => text
|
|
195360
195362
|
};
|
|
195361
195363
|
function createDevLogger(isPrefixed = true) {
|
|
@@ -195375,7 +195377,7 @@ function createDevLogger(isPrefixed = true) {
|
|
|
195375
195377
|
const prefixedLog = (type, msg) => {
|
|
195376
195378
|
const timestamp = dateTimeFormat.format(new Date);
|
|
195377
195379
|
const colorize = colorByType[type];
|
|
195378
|
-
console.log(`${
|
|
195380
|
+
console.log(`${theme.styles.dim(timestamp)} ${colorize(msg)}`);
|
|
195379
195381
|
};
|
|
195380
195382
|
return isPrefixed ? {
|
|
195381
195383
|
log: (msg) => prefixedLog("log", msg),
|
|
@@ -195399,7 +195401,7 @@ function createDevLogger(isPrefixed = true) {
|
|
|
195399
195401
|
}
|
|
195400
195402
|
|
|
195401
195403
|
// src/cli/dev/dev-server/function-manager.ts
|
|
195402
|
-
import { spawn as spawn2 } from "node:child_process";
|
|
195404
|
+
import { spawn as spawn2, spawnSync as spawnSync2 } from "node:child_process";
|
|
195403
195405
|
import { dirname as dirname11, join as join15 } from "node:path";
|
|
195404
195406
|
import { fileURLToPath as fileURLToPath7 } from "node:url";
|
|
195405
195407
|
var __dirname5 = dirname11(fileURLToPath7(import.meta.url));
|
|
@@ -195422,9 +195424,8 @@ class FunctionManager {
|
|
|
195422
195424
|
}
|
|
195423
195425
|
verifyDenoIsInstalled() {
|
|
195424
195426
|
if (this.functions.size > 0) {
|
|
195425
|
-
|
|
195426
|
-
|
|
195427
|
-
} catch {
|
|
195427
|
+
const result = spawnSync2("deno", ["--version"]);
|
|
195428
|
+
if (result.error) {
|
|
195428
195429
|
throw new DependencyNotFoundError("Deno is required to run functions", {
|
|
195429
195430
|
hints: [{ message: "Install Deno from https://deno.com/download" }]
|
|
195430
195431
|
});
|
|
@@ -195643,9 +195644,7 @@ async function createDevServer(options8) {
|
|
|
195643
195644
|
}
|
|
195644
195645
|
next();
|
|
195645
195646
|
});
|
|
195646
|
-
const
|
|
195647
|
-
functionResource.readAll(join16(configDir, project2.functionsDir))
|
|
195648
|
-
]);
|
|
195647
|
+
const functions = await functionResource.readAll(join16(configDir, project2.functionsDir));
|
|
195649
195648
|
const devLogger = createDevLogger(false);
|
|
195650
195649
|
const functionManager = new FunctionManager(functions, devLogger);
|
|
195651
195650
|
functionManager.verifyDenoIsInstalled();
|
|
@@ -195665,12 +195664,13 @@ async function createDevServer(options8) {
|
|
|
195665
195664
|
} else {
|
|
195666
195665
|
reject(err);
|
|
195667
195666
|
}
|
|
195667
|
+
} else {
|
|
195668
195668
|
const shutdown = () => {
|
|
195669
195669
|
functionManager.stopAll();
|
|
195670
|
+
server.close();
|
|
195670
195671
|
};
|
|
195671
195672
|
process.on("SIGINT", shutdown);
|
|
195672
195673
|
process.on("SIGTERM", shutdown);
|
|
195673
|
-
} else {
|
|
195674
195674
|
resolve5({
|
|
195675
195675
|
port,
|
|
195676
195676
|
server
|
|
@@ -200075,4 +200075,4 @@ export {
|
|
|
200075
200075
|
CLIExitError
|
|
200076
200076
|
};
|
|
200077
200077
|
|
|
200078
|
-
//# debugId=
|
|
200078
|
+
//# debugId=C673BE16F37436A364756E2164756E21
|