@base44-preview/cli 0.0.32-pr.249.10b4d54 → 0.0.32-pr.249.15900d9
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 +152 -111
- package/dist/cli/index.js.map +12 -12
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -178102,6 +178102,18 @@ class InvalidInputError extends UserError {
|
|
|
178102
178102
|
code = "INVALID_INPUT";
|
|
178103
178103
|
}
|
|
178104
178104
|
|
|
178105
|
+
class DependencyNotFoundError extends UserError {
|
|
178106
|
+
code = "DEPENDENCY_NOT_FOUND";
|
|
178107
|
+
constructor(message, options) {
|
|
178108
|
+
super(message, {
|
|
178109
|
+
hints: options?.hints ?? [
|
|
178110
|
+
{ message: "Install the required dependency and try again" }
|
|
178111
|
+
],
|
|
178112
|
+
cause: options?.cause
|
|
178113
|
+
});
|
|
178114
|
+
}
|
|
178115
|
+
}
|
|
178116
|
+
|
|
178105
178117
|
class ApiError extends SystemError {
|
|
178106
178118
|
code = "API_ERROR";
|
|
178107
178119
|
statusCode;
|
|
@@ -178217,6 +178229,21 @@ class FileReadError extends SystemError {
|
|
|
178217
178229
|
});
|
|
178218
178230
|
}
|
|
178219
178231
|
}
|
|
178232
|
+
|
|
178233
|
+
class InternalError extends SystemError {
|
|
178234
|
+
code = "INTERNAL_ERROR";
|
|
178235
|
+
constructor(message, options) {
|
|
178236
|
+
super(message, {
|
|
178237
|
+
hints: options?.hints ?? [
|
|
178238
|
+
{
|
|
178239
|
+
message: "This is an unexpected error. Please report it if it persists."
|
|
178240
|
+
}
|
|
178241
|
+
],
|
|
178242
|
+
cause: options?.cause
|
|
178243
|
+
});
|
|
178244
|
+
}
|
|
178245
|
+
}
|
|
178246
|
+
|
|
178220
178247
|
class TypeGenerationError extends SystemError {
|
|
178221
178248
|
code = "TYPE_GENERATION_ERROR";
|
|
178222
178249
|
entityName;
|
|
@@ -185051,6 +185078,10 @@ var TikTokConnectorSchema = exports_external.object({
|
|
|
185051
185078
|
type: exports_external.literal("tiktok"),
|
|
185052
185079
|
scopes: exports_external.array(exports_external.string()).default([])
|
|
185053
185080
|
});
|
|
185081
|
+
var GoogleBigQueryConnectorSchema = exports_external.object({
|
|
185082
|
+
type: exports_external.literal("googlebigquery"),
|
|
185083
|
+
scopes: exports_external.array(exports_external.string()).default([])
|
|
185084
|
+
});
|
|
185054
185085
|
var CustomTypeSchema = exports_external.string().min(1).regex(/^[a-z0-9_-]+$/i);
|
|
185055
185086
|
var GenericConnectorSchema = exports_external.object({
|
|
185056
185087
|
type: CustomTypeSchema,
|
|
@@ -185063,6 +185094,7 @@ var ConnectorResourceSchema = exports_external.union([
|
|
|
185063
185094
|
GoogleSheetsConnectorSchema,
|
|
185064
185095
|
GoogleDocsConnectorSchema,
|
|
185065
185096
|
GoogleSlidesConnectorSchema,
|
|
185097
|
+
GoogleBigQueryConnectorSchema,
|
|
185066
185098
|
SlackConnectorSchema,
|
|
185067
185099
|
NotionConnectorSchema,
|
|
185068
185100
|
SalesforceConnectorSchema,
|
|
@@ -185078,6 +185110,7 @@ var KnownIntegrationTypes = [
|
|
|
185078
185110
|
"googlesheets",
|
|
185079
185111
|
"googledocs",
|
|
185080
185112
|
"googleslides",
|
|
185113
|
+
"googlebigquery",
|
|
185081
185114
|
"slack",
|
|
185082
185115
|
"notion",
|
|
185083
185116
|
"salesforce",
|
|
@@ -185340,7 +185373,10 @@ var connectorResource = {
|
|
|
185340
185373
|
// src/core/resources/entity/schema.ts
|
|
185341
185374
|
var FieldConditionSchema = exports_external.union([
|
|
185342
185375
|
exports_external.string(),
|
|
185343
|
-
exports_external.
|
|
185376
|
+
exports_external.number(),
|
|
185377
|
+
exports_external.boolean(),
|
|
185378
|
+
exports_external.null(),
|
|
185379
|
+
exports_external.looseObject({
|
|
185344
185380
|
$in: exports_external.unknown().optional(),
|
|
185345
185381
|
$nin: exports_external.unknown().optional(),
|
|
185346
185382
|
$ne: exports_external.unknown().optional(),
|
|
@@ -185357,6 +185393,15 @@ var rlsConditionAllowedKeys = new Set([
|
|
|
185357
185393
|
"user_condition",
|
|
185358
185394
|
"created_by",
|
|
185359
185395
|
"created_by_id",
|
|
185396
|
+
"id",
|
|
185397
|
+
"_id",
|
|
185398
|
+
"created_date",
|
|
185399
|
+
"updated_date",
|
|
185400
|
+
"app_id",
|
|
185401
|
+
"entity_name",
|
|
185402
|
+
"is_deleted",
|
|
185403
|
+
"deleted_date",
|
|
185404
|
+
"environment",
|
|
185360
185405
|
"$or",
|
|
185361
185406
|
"$and",
|
|
185362
185407
|
"$nor"
|
|
@@ -185385,60 +185430,33 @@ var isValidFieldCondition = (value) => {
|
|
|
185385
185430
|
}
|
|
185386
185431
|
return false;
|
|
185387
185432
|
};
|
|
185388
|
-
var RefineRLSConditionSchema = RLSConditionSchema.refine((val) => Object.entries(val).every(([key, value]) =>
|
|
185389
|
-
if (rlsConditionAllowedKeys.has(key)) {
|
|
185390
|
-
return true;
|
|
185391
|
-
}
|
|
185392
|
-
if (!key.startsWith("data.")) {
|
|
185393
|
-
return false;
|
|
185394
|
-
}
|
|
185395
|
-
return isValidFieldCondition(value);
|
|
185396
|
-
}), "Keys must be known RLS keys or match data.* pattern with valid value");
|
|
185433
|
+
var RefineRLSConditionSchema = RLSConditionSchema.refine((val) => Object.entries(val).every(([key, value]) => rlsConditionAllowedKeys.has(key) || isValidFieldCondition(value)), "Field condition values must be a primitive or an operator object ($in, $nin, $ne, $all)");
|
|
185397
185434
|
var RLSRuleSchema = exports_external.union([exports_external.boolean(), RefineRLSConditionSchema]);
|
|
185398
|
-
var EntityRLSSchema = exports_external.
|
|
185435
|
+
var EntityRLSSchema = exports_external.looseObject({
|
|
185399
185436
|
create: RLSRuleSchema.optional(),
|
|
185400
185437
|
read: RLSRuleSchema.optional(),
|
|
185401
185438
|
update: RLSRuleSchema.optional(),
|
|
185402
185439
|
delete: RLSRuleSchema.optional(),
|
|
185403
185440
|
write: RLSRuleSchema.optional()
|
|
185404
185441
|
});
|
|
185405
|
-
var FieldRLSSchema = exports_external.
|
|
185442
|
+
var FieldRLSSchema = exports_external.looseObject({
|
|
185406
185443
|
read: RLSRuleSchema.optional(),
|
|
185407
185444
|
write: RLSRuleSchema.optional(),
|
|
185408
185445
|
create: RLSRuleSchema.optional(),
|
|
185409
185446
|
update: RLSRuleSchema.optional(),
|
|
185410
185447
|
delete: RLSRuleSchema.optional()
|
|
185411
185448
|
});
|
|
185412
|
-
var
|
|
185413
|
-
|
|
185414
|
-
"number",
|
|
185415
|
-
"integer",
|
|
185416
|
-
"boolean",
|
|
185417
|
-
"array",
|
|
185418
|
-
"object"
|
|
185419
|
-
]);
|
|
185420
|
-
var StringFormatSchema = exports_external.enum([
|
|
185421
|
-
"date",
|
|
185422
|
-
"date-time",
|
|
185423
|
-
"time",
|
|
185424
|
-
"email",
|
|
185425
|
-
"uri",
|
|
185426
|
-
"hostname",
|
|
185427
|
-
"ipv4",
|
|
185428
|
-
"ipv6",
|
|
185429
|
-
"uuid"
|
|
185430
|
-
]);
|
|
185431
|
-
var PropertyDefinitionSchema = exports_external.object({
|
|
185432
|
-
type: PropertyTypeSchema,
|
|
185449
|
+
var PropertyDefinitionSchema = exports_external.looseObject({
|
|
185450
|
+
type: exports_external.string().optional(),
|
|
185433
185451
|
title: exports_external.string().optional(),
|
|
185434
185452
|
description: exports_external.string().optional(),
|
|
185435
185453
|
minLength: exports_external.number().int().min(0).optional(),
|
|
185436
185454
|
maxLength: exports_external.number().int().min(0).optional(),
|
|
185437
185455
|
pattern: exports_external.string().optional(),
|
|
185438
|
-
format:
|
|
185456
|
+
format: exports_external.string().optional(),
|
|
185439
185457
|
minimum: exports_external.number().optional(),
|
|
185440
185458
|
maximum: exports_external.number().optional(),
|
|
185441
|
-
enum: exports_external.array(exports_external.
|
|
185459
|
+
enum: exports_external.array(exports_external.unknown()).optional(),
|
|
185442
185460
|
enumNames: exports_external.array(exports_external.string()).optional(),
|
|
185443
185461
|
default: exports_external.unknown().optional(),
|
|
185444
185462
|
$ref: exports_external.string().optional(),
|
|
@@ -185451,12 +185469,12 @@ var PropertyDefinitionSchema = exports_external.object({
|
|
|
185451
185469
|
return exports_external.record(exports_external.string(), PropertyDefinitionSchema).optional();
|
|
185452
185470
|
}
|
|
185453
185471
|
});
|
|
185454
|
-
var EntitySchema = exports_external.
|
|
185455
|
-
type: exports_external.literal("object"),
|
|
185456
|
-
name: exports_external.string().regex(/^[a-zA-Z0-9]+$/, "Entity name must be alphanumeric only"),
|
|
185472
|
+
var EntitySchema = exports_external.looseObject({
|
|
185473
|
+
type: exports_external.literal("object").default("object"),
|
|
185474
|
+
name: exports_external.string().min(1).regex(/^[a-zA-Z0-9]+$/, "Entity name must be alphanumeric only"),
|
|
185457
185475
|
title: exports_external.string().optional(),
|
|
185458
185476
|
description: exports_external.string().optional(),
|
|
185459
|
-
properties: exports_external.record(exports_external.string(), PropertyDefinitionSchema),
|
|
185477
|
+
properties: exports_external.record(exports_external.string(), PropertyDefinitionSchema).default({}),
|
|
185460
185478
|
required: exports_external.array(exports_external.string()).optional(),
|
|
185461
185479
|
rls: EntityRLSSchema.optional()
|
|
185462
185480
|
});
|
|
@@ -186024,7 +186042,7 @@ async function handleUnauthorized(request, _options, response) {
|
|
|
186024
186042
|
return;
|
|
186025
186043
|
}
|
|
186026
186044
|
retriedRequests.add(request);
|
|
186027
|
-
return distribution_default(request, {
|
|
186045
|
+
return distribution_default(request.clone(), {
|
|
186028
186046
|
headers: { Authorization: `Bearer ${newAccessToken}` }
|
|
186029
186047
|
});
|
|
186030
186048
|
}
|
|
@@ -195206,62 +195224,10 @@ function getTypesCommand(context) {
|
|
|
195206
195224
|
return new Command("types").description("Manage TypeScript type generation").addCommand(getTypesGenerateCommand(context));
|
|
195207
195225
|
}
|
|
195208
195226
|
|
|
195209
|
-
// src/cli/dev/createDevLogger.ts
|
|
195210
|
-
var dateTimeFormat = new Intl.DateTimeFormat([], {
|
|
195211
|
-
hour: "2-digit",
|
|
195212
|
-
minute: "2-digit",
|
|
195213
|
-
second: "2-digit",
|
|
195214
|
-
hour12: false
|
|
195215
|
-
});
|
|
195216
|
-
var colorByType = {
|
|
195217
|
-
error: source_default.red,
|
|
195218
|
-
warn: source_default.yellow,
|
|
195219
|
-
log: (text) => text
|
|
195220
|
-
};
|
|
195221
|
-
function createDevLogger(isPrefixed = true) {
|
|
195222
|
-
const print = (type, msg) => {
|
|
195223
|
-
const colorize = colorByType[type];
|
|
195224
|
-
switch (type) {
|
|
195225
|
-
case "error":
|
|
195226
|
-
console.error(colorize(msg));
|
|
195227
|
-
break;
|
|
195228
|
-
case "warn":
|
|
195229
|
-
console.warn(colorize(msg));
|
|
195230
|
-
break;
|
|
195231
|
-
default:
|
|
195232
|
-
console.log(msg);
|
|
195233
|
-
}
|
|
195234
|
-
};
|
|
195235
|
-
const prefixedLog = (type, msg) => {
|
|
195236
|
-
const timestamp = dateTimeFormat.format(new Date);
|
|
195237
|
-
const colorize = colorByType[type];
|
|
195238
|
-
console.log(`${source_default.gray(timestamp)} ${colorize(msg)}`);
|
|
195239
|
-
};
|
|
195240
|
-
return isPrefixed ? {
|
|
195241
|
-
log: (msg) => prefixedLog("log", msg),
|
|
195242
|
-
error: (msg, err) => {
|
|
195243
|
-
prefixedLog("error", msg);
|
|
195244
|
-
if (err) {
|
|
195245
|
-
prefixedLog("error", String(err));
|
|
195246
|
-
}
|
|
195247
|
-
},
|
|
195248
|
-
warn: (msg) => prefixedLog("warn", msg)
|
|
195249
|
-
} : {
|
|
195250
|
-
log: (msg) => print("log", msg),
|
|
195251
|
-
error: (msg, err) => {
|
|
195252
|
-
print("error", msg);
|
|
195253
|
-
if (err) {
|
|
195254
|
-
print("error", String(err));
|
|
195255
|
-
}
|
|
195256
|
-
},
|
|
195257
|
-
warn: (msg) => print("warn", msg)
|
|
195258
|
-
};
|
|
195259
|
-
}
|
|
195260
|
-
|
|
195261
195227
|
// src/cli/dev/dev-server/main.ts
|
|
195228
|
+
import { dirname as dirname12, join as join16 } from "node:path";
|
|
195262
195229
|
var import_cors = __toESM(require_lib4(), 1);
|
|
195263
195230
|
var import_express2 = __toESM(require_express(), 1);
|
|
195264
|
-
import { dirname as dirname12, join as join16 } from "node:path";
|
|
195265
195231
|
|
|
195266
195232
|
// node_modules/get-port/index.js
|
|
195267
195233
|
import net from "node:net";
|
|
@@ -195380,6 +195346,58 @@ async function getPorts(options8) {
|
|
|
195380
195346
|
// src/cli/dev/dev-server/main.ts
|
|
195381
195347
|
var import_http_proxy_middleware = __toESM(require_dist2(), 1);
|
|
195382
195348
|
|
|
195349
|
+
// src/cli/dev/createDevLogger.ts
|
|
195350
|
+
var dateTimeFormat = new Intl.DateTimeFormat([], {
|
|
195351
|
+
hour: "2-digit",
|
|
195352
|
+
minute: "2-digit",
|
|
195353
|
+
second: "2-digit",
|
|
195354
|
+
hour12: false
|
|
195355
|
+
});
|
|
195356
|
+
var colorByType = {
|
|
195357
|
+
error: source_default.red,
|
|
195358
|
+
warn: source_default.yellow,
|
|
195359
|
+
log: (text) => text
|
|
195360
|
+
};
|
|
195361
|
+
function createDevLogger(isPrefixed = true) {
|
|
195362
|
+
const print = (type, msg) => {
|
|
195363
|
+
const colorize = colorByType[type];
|
|
195364
|
+
switch (type) {
|
|
195365
|
+
case "error":
|
|
195366
|
+
console.error(colorize(msg));
|
|
195367
|
+
break;
|
|
195368
|
+
case "warn":
|
|
195369
|
+
console.warn(colorize(msg));
|
|
195370
|
+
break;
|
|
195371
|
+
default:
|
|
195372
|
+
console.log(msg);
|
|
195373
|
+
}
|
|
195374
|
+
};
|
|
195375
|
+
const prefixedLog = (type, msg) => {
|
|
195376
|
+
const timestamp = dateTimeFormat.format(new Date);
|
|
195377
|
+
const colorize = colorByType[type];
|
|
195378
|
+
console.log(`${source_default.gray(timestamp)} ${colorize(msg)}`);
|
|
195379
|
+
};
|
|
195380
|
+
return isPrefixed ? {
|
|
195381
|
+
log: (msg) => prefixedLog("log", msg),
|
|
195382
|
+
error: (msg, err) => {
|
|
195383
|
+
prefixedLog("error", msg);
|
|
195384
|
+
if (err) {
|
|
195385
|
+
prefixedLog("error", String(err));
|
|
195386
|
+
}
|
|
195387
|
+
},
|
|
195388
|
+
warn: (msg) => prefixedLog("warn", msg)
|
|
195389
|
+
} : {
|
|
195390
|
+
log: (msg) => print("log", msg),
|
|
195391
|
+
error: (msg, err) => {
|
|
195392
|
+
print("error", msg);
|
|
195393
|
+
if (err) {
|
|
195394
|
+
print("error", String(err));
|
|
195395
|
+
}
|
|
195396
|
+
},
|
|
195397
|
+
warn: (msg) => print("warn", msg)
|
|
195398
|
+
};
|
|
195399
|
+
}
|
|
195400
|
+
|
|
195383
195401
|
// src/cli/dev/dev-server/function-manager.ts
|
|
195384
195402
|
import { spawn as spawn2 } from "node:child_process";
|
|
195385
195403
|
import { dirname as dirname11, join as join15 } from "node:path";
|
|
@@ -195396,9 +195414,23 @@ class FunctionManager {
|
|
|
195396
195414
|
this.functions = new Map(functions.map((f7) => [f7.name, f7]));
|
|
195397
195415
|
this.logger = logger;
|
|
195398
195416
|
}
|
|
195417
|
+
functionNames() {
|
|
195418
|
+
return Array.from(this.functions.keys());
|
|
195419
|
+
}
|
|
195399
195420
|
getFunction(name2) {
|
|
195400
195421
|
return this.functions.get(name2);
|
|
195401
195422
|
}
|
|
195423
|
+
verifyDenoIsInstalled() {
|
|
195424
|
+
if (this.functions.size > 0) {
|
|
195425
|
+
try {
|
|
195426
|
+
spawn2("deno", ["--version"]);
|
|
195427
|
+
} catch {
|
|
195428
|
+
throw new DependencyNotFoundError("Deno is required to run functions", {
|
|
195429
|
+
hints: [{ message: "Install Deno from https://deno.com/download" }]
|
|
195430
|
+
});
|
|
195431
|
+
}
|
|
195432
|
+
}
|
|
195433
|
+
}
|
|
195402
195434
|
async ensureRunning(name2) {
|
|
195403
195435
|
const existing = this.running.get(name2);
|
|
195404
195436
|
if (existing?.ready) {
|
|
@@ -195406,7 +195438,9 @@ class FunctionManager {
|
|
|
195406
195438
|
}
|
|
195407
195439
|
const backendFunction = this.functions.get(name2);
|
|
195408
195440
|
if (!backendFunction) {
|
|
195409
|
-
throw new
|
|
195441
|
+
throw new InvalidInputError(`Function "${name2}" not found`, {
|
|
195442
|
+
hints: [{ message: "Check available functions in your project" }]
|
|
195443
|
+
});
|
|
195410
195444
|
}
|
|
195411
195445
|
if (existing && !existing.ready) {
|
|
195412
195446
|
return this.waitForReady(name2, existing);
|
|
@@ -195485,7 +195519,11 @@ class FunctionManager {
|
|
|
195485
195519
|
waitForReady(name2, runningFunc) {
|
|
195486
195520
|
return new Promise((resolve5, reject) => {
|
|
195487
195521
|
const timeout3 = setTimeout(() => {
|
|
195488
|
-
reject(new
|
|
195522
|
+
reject(new InternalError(`Function "${name2}" failed to start within ${READY_TIMEOUT / 1000}s timeout`, {
|
|
195523
|
+
hints: [
|
|
195524
|
+
{ message: "Check the function code for startup errors" }
|
|
195525
|
+
]
|
|
195526
|
+
}));
|
|
195489
195527
|
}, READY_TIMEOUT);
|
|
195490
195528
|
const onData = (data) => {
|
|
195491
195529
|
const output = data.toString();
|
|
@@ -195500,7 +195538,9 @@ class FunctionManager {
|
|
|
195500
195538
|
runningFunc.process.on("exit", (code2) => {
|
|
195501
195539
|
if (!runningFunc.ready) {
|
|
195502
195540
|
clearTimeout(timeout3);
|
|
195503
|
-
reject(new
|
|
195541
|
+
reject(new InternalError(`Function "${name2}" exited with code ${code2}`, {
|
|
195542
|
+
hints: [{ message: "Check the function code for errors" }]
|
|
195543
|
+
}));
|
|
195504
195544
|
}
|
|
195505
195545
|
});
|
|
195506
195546
|
});
|
|
@@ -195574,13 +195614,7 @@ function proxyRequest(req, res, port, logger) {
|
|
|
195574
195614
|
}
|
|
195575
195615
|
resolve5();
|
|
195576
195616
|
});
|
|
195577
|
-
|
|
195578
|
-
const bodyString = JSON.stringify(req.body);
|
|
195579
|
-
proxyReq.setHeader("Content-Type", "application/json");
|
|
195580
|
-
proxyReq.setHeader("Content-Length", Buffer.byteLength(bodyString));
|
|
195581
|
-
proxyReq.write(bodyString);
|
|
195582
|
-
}
|
|
195583
|
-
proxyReq.end();
|
|
195617
|
+
req.pipe(proxyReq);
|
|
195584
195618
|
});
|
|
195585
195619
|
}
|
|
195586
195620
|
|
|
@@ -195588,7 +195622,7 @@ function proxyRequest(req, res, port, logger) {
|
|
|
195588
195622
|
var DEFAULT_PORT = 4400;
|
|
195589
195623
|
var BASE44_APP_URL = "https://base44.app";
|
|
195590
195624
|
async function createDevServer(options8) {
|
|
195591
|
-
const {
|
|
195625
|
+
const { port: userPort } = options8;
|
|
195592
195626
|
const port = userPort ?? await getPorts({ port: DEFAULT_PORT });
|
|
195593
195627
|
const { project: project2 } = await readProjectConfig();
|
|
195594
195628
|
const configDir = dirname12(project2.configPath);
|
|
@@ -195612,14 +195646,17 @@ async function createDevServer(options8) {
|
|
|
195612
195646
|
const [functions] = await Promise.all([
|
|
195613
195647
|
functionResource.readAll(join16(configDir, project2.functionsDir))
|
|
195614
195648
|
]);
|
|
195615
|
-
const
|
|
195616
|
-
|
|
195617
|
-
|
|
195649
|
+
const devLogger = createDevLogger(false);
|
|
195650
|
+
const functionManager = new FunctionManager(functions, devLogger);
|
|
195651
|
+
functionManager.verifyDenoIsInstalled();
|
|
195652
|
+
if (functionManager.functionNames().length > 0) {
|
|
195653
|
+
M2.info(`Loaded functions: ${functionManager.functionNames().join(", ")}`);
|
|
195654
|
+
}
|
|
195655
|
+
const functionRoutes = createFunctionRoutes(functionManager, devLogger);
|
|
195618
195656
|
app.use("/api/apps/:appId/functions", functionRoutes);
|
|
195619
195657
|
app.use((req, res, next) => {
|
|
195620
195658
|
return remoteProxy(req, res, next);
|
|
195621
195659
|
});
|
|
195622
|
-
app.use(import_express2.default.json());
|
|
195623
195660
|
return new Promise((resolve5, reject) => {
|
|
195624
195661
|
const server = app.listen(port, "127.0.0.1", (err) => {
|
|
195625
195662
|
if (err) {
|
|
@@ -195628,6 +195665,11 @@ async function createDevServer(options8) {
|
|
|
195628
195665
|
} else {
|
|
195629
195666
|
reject(err);
|
|
195630
195667
|
}
|
|
195668
|
+
const shutdown = () => {
|
|
195669
|
+
functionManager.stopAll();
|
|
195670
|
+
};
|
|
195671
|
+
process.on("SIGINT", shutdown);
|
|
195672
|
+
process.on("SIGTERM", shutdown);
|
|
195631
195673
|
} else {
|
|
195632
195674
|
resolve5({
|
|
195633
195675
|
port,
|
|
@@ -195642,8 +195684,7 @@ async function createDevServer(options8) {
|
|
|
195642
195684
|
async function devAction(options8) {
|
|
195643
195685
|
const port = options8.port ? Number(options8.port) : undefined;
|
|
195644
195686
|
const { port: resolvedPort } = await createDevServer({
|
|
195645
|
-
port
|
|
195646
|
-
logger: createDevLogger()
|
|
195687
|
+
port
|
|
195647
195688
|
});
|
|
195648
195689
|
return {
|
|
195649
195690
|
outroMessage: `Dev server is available at ${theme.colors.links(`http://localhost:${resolvedPort}`)}`
|
|
@@ -200034,4 +200075,4 @@ export {
|
|
|
200034
200075
|
CLIExitError
|
|
200035
200076
|
};
|
|
200036
200077
|
|
|
200037
|
-
//# debugId=
|
|
200078
|
+
//# debugId=235A3A90E106536A64756E2164756E21
|