@base44-preview/cli 0.1.29-pr.656.58d97d4 → 0.1.31-pr.657.7711db6
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 +32 -30
- package/dist/cli/index.js.map +10 -10
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -239374,7 +239374,7 @@ import { join as join13 } from "node:path";
|
|
|
239374
239374
|
// package.json
|
|
239375
239375
|
var package_default = {
|
|
239376
239376
|
name: "base44",
|
|
239377
|
-
version: "0.1.
|
|
239377
|
+
version: "0.1.31",
|
|
239378
239378
|
description: "Base44 CLI - Unified interface for managing Base44 applications",
|
|
239379
239379
|
type: "module",
|
|
239380
239380
|
bin: {
|
|
@@ -261311,7 +261311,7 @@ function shardOf(group, response, verdict, options) {
|
|
|
261311
261311
|
gzipBytes: verdict.gzipBytes,
|
|
261312
261312
|
...response.activation ? { activation: response.activation } : {},
|
|
261313
261313
|
wrapper: {
|
|
261314
|
-
secrets: response.activation ? `
|
|
261314
|
+
secrets: response.activation ? `blob_${response.activation}` : "binding",
|
|
261315
261315
|
postResponseTelemetry: options.postResponseTelemetry ?? false,
|
|
261316
261316
|
staticEgress: STATIC_EGRESS_ARTIFACT_MARKER
|
|
261317
261317
|
}
|
|
@@ -261394,8 +261394,9 @@ async function compilerInput(root, fn) {
|
|
|
261394
261394
|
for (const filePath of fn.filePaths) {
|
|
261395
261395
|
backendFiles[projectPath(root, filePath)] = await readTextFile(filePath);
|
|
261396
261396
|
}
|
|
261397
|
-
const
|
|
261398
|
-
|
|
261397
|
+
const source = await readTextFile(fn.entryPath);
|
|
261398
|
+
const { entry, files } = await cfwBundleInput(projectPath(root, fn.entryPath), source, backendFiles);
|
|
261399
|
+
return { input: { name: fn.name, entry, files }, source };
|
|
261399
261400
|
}
|
|
261400
261401
|
function describeFailure(failure) {
|
|
261401
261402
|
const where = failure.function ? `${failure.function}: ` : "";
|
|
@@ -261413,11 +261414,14 @@ async function compileBackendBundles(root, functionsDir) {
|
|
|
261413
261414
|
}
|
|
261414
261415
|
await requireCompilerRuntime();
|
|
261415
261416
|
const sorted = [...functions].sort((a, b) => a.name < b.name ? -1 : 1);
|
|
261416
|
-
const
|
|
261417
|
+
const compiled = await pMap(sorted, (fn) => compilerInput(root, fn), {
|
|
261417
261418
|
concurrency: 8
|
|
261418
261419
|
});
|
|
261419
|
-
const
|
|
261420
|
-
|
|
261420
|
+
const declared = new Map(compiled.map(({ input, source }) => [
|
|
261421
|
+
input.name,
|
|
261422
|
+
{ name: input.name, entry: input.entry, source }
|
|
261423
|
+
]));
|
|
261424
|
+
const built = await compileFunctionShards(compiled.map(({ input }) => input), SHARD_POLICY, COMPILE_MODES);
|
|
261421
261425
|
if (!built.ok) {
|
|
261422
261426
|
throw new InvalidInputError(`Backend functions failed to compile (${built.failures.length} error${built.failures.length === 1 ? "" : "s"}).`, { details: built.failures.map(describeFailure) });
|
|
261423
261427
|
}
|
|
@@ -261427,10 +261431,7 @@ async function compileBackendBundles(root, functionsDir) {
|
|
|
261427
261431
|
module,
|
|
261428
261432
|
size: module.byteLength,
|
|
261429
261433
|
digest: sha256(module),
|
|
261430
|
-
functions: shard.functions.map((name) => (
|
|
261431
|
-
name,
|
|
261432
|
-
entry: entries.get(name)
|
|
261433
|
-
})),
|
|
261434
|
+
functions: shard.functions.map((name) => declared.get(name)),
|
|
261434
261435
|
wrapper: shard.wrapper
|
|
261435
261436
|
};
|
|
261436
261437
|
});
|
|
@@ -264197,9 +264198,27 @@ In order to complete registration use this verification code: ${otpCode}
|
|
|
264197
264198
|
// src/cli/dev/dev-server/routes/entities/entities-router.ts
|
|
264198
264199
|
var import_express4 = __toESM(require_express(), 1);
|
|
264199
264200
|
|
|
264200
|
-
// src/cli/dev/dev-server/db/
|
|
264201
|
+
// src/cli/dev/dev-server/db/rls.ts
|
|
264201
264202
|
import { isDeepStrictEqual as isDeepStrictEqual5 } from "node:util";
|
|
264202
264203
|
|
|
264204
|
+
// src/cli/dev/dev-server/db/field-paths.ts
|
|
264205
|
+
var isPlainObject4 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
264206
|
+
var flattenToDataPaths = (record, prefix = "data") => Object.entries(record).flatMap(([key, value]) => isPlainObject4(value) ? flattenToDataPaths(value, `${prefix}.${key}`) : [[`${prefix}.${key}`, value]]);
|
|
264207
|
+
var collectFieldRules = (properties, prefix = "data") => Object.entries(properties).flatMap(([key, property]) => {
|
|
264208
|
+
const path = `${prefix}.${key}`;
|
|
264209
|
+
const own = property.rls ? [[path, property.rls]] : [];
|
|
264210
|
+
return [...own, ...collectFieldRules(property.properties ?? {}, path)];
|
|
264211
|
+
});
|
|
264212
|
+
var findClosestRule = (rules, path) => {
|
|
264213
|
+
const segments = path.split(".");
|
|
264214
|
+
for (let length = segments.length;length > 1; length--) {
|
|
264215
|
+
const rule = rules.get(segments.slice(0, length).join("."));
|
|
264216
|
+
if (rule)
|
|
264217
|
+
return rule;
|
|
264218
|
+
}
|
|
264219
|
+
return;
|
|
264220
|
+
};
|
|
264221
|
+
|
|
264203
264222
|
// src/cli/dev/dev-server/db/rls.ts
|
|
264204
264223
|
function getRLSFieldValue(key, source) {
|
|
264205
264224
|
const DATA_FIELD_PREFIX = "data.";
|
|
@@ -264318,29 +264337,12 @@ function applyFLS(record, schema, user, operation) {
|
|
|
264318
264337
|
return result;
|
|
264319
264338
|
}
|
|
264320
264339
|
|
|
264321
|
-
// src/cli/dev/dev-server/db/fls-write.ts
|
|
264322
264340
|
class FLSWriteError extends Error {
|
|
264323
264341
|
constructor(operation, deniedFields) {
|
|
264324
264342
|
const verb = operation === "create" ? "set" : "modify";
|
|
264325
264343
|
super(`You're not allowed to ${verb} the following fields: ${deniedFields.join(", ")}`);
|
|
264326
264344
|
}
|
|
264327
264345
|
}
|
|
264328
|
-
var isPlainObject4 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
264329
|
-
var flattenToDataPaths = (record, prefix = "data") => Object.entries(record).flatMap(([key, value]) => isPlainObject4(value) ? flattenToDataPaths(value, `${prefix}.${key}`) : [[`${prefix}.${key}`, value]]);
|
|
264330
|
-
var collectFieldRules = (properties, prefix = "data") => Object.entries(properties).flatMap(([key, property]) => {
|
|
264331
|
-
const path = `${prefix}.${key}`;
|
|
264332
|
-
const own = property.rls ? [[path, property.rls]] : [];
|
|
264333
|
-
return [...own, ...collectFieldRules(property.properties ?? {}, path)];
|
|
264334
|
-
});
|
|
264335
|
-
var findClosestRule = (rules, path) => {
|
|
264336
|
-
const segments = path.split(".");
|
|
264337
|
-
for (let length = segments.length;length > 1; length--) {
|
|
264338
|
-
const rule = rules.get(segments.slice(0, length).join("."));
|
|
264339
|
-
if (rule)
|
|
264340
|
-
return rule;
|
|
264341
|
-
}
|
|
264342
|
-
return;
|
|
264343
|
-
};
|
|
264344
264346
|
var isUnchanged = (before, after) => isDeepStrictEqual5(before ?? null, after ?? null);
|
|
264345
264347
|
function assertFLSWrite(changes, context, schema, user, operation) {
|
|
264346
264348
|
const rules = new Map(collectFieldRules(schema.properties));
|
|
@@ -271282,4 +271284,4 @@ export {
|
|
|
271282
271284
|
runCLI
|
|
271283
271285
|
};
|
|
271284
271286
|
|
|
271285
|
-
//# debugId=
|
|
271287
|
+
//# debugId=7FB565796F6FC1AA64756E2164756E21
|