@base44-preview/cli 0.0.25-pr.151.082c391 → 0.0.25-pr.151.12d57cf
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/index.js
CHANGED
|
@@ -6140,17 +6140,6 @@ function handleReadonlyResult(payload) {
|
|
|
6140
6140
|
payload.value = Object.freeze(payload.value);
|
|
6141
6141
|
return payload;
|
|
6142
6142
|
}
|
|
6143
|
-
const $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
6144
|
-
$ZodType.init(inst, def);
|
|
6145
|
-
defineLazy(inst._zod, "innerType", () => def.getter());
|
|
6146
|
-
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
6147
|
-
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
6148
|
-
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
6149
|
-
defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0);
|
|
6150
|
-
inst._zod.parse = (payload, ctx) => {
|
|
6151
|
-
return inst._zod.innerType._zod.run(payload, ctx);
|
|
6152
|
-
};
|
|
6153
|
-
});
|
|
6154
6143
|
const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
|
|
6155
6144
|
$ZodCheck.init(inst, def);
|
|
6156
6145
|
$ZodType.init(inst, def);
|
|
@@ -7344,12 +7333,6 @@ const optionalProcessor = (schema, ctx, _json, params) => {
|
|
|
7344
7333
|
const seen = ctx.seen.get(schema);
|
|
7345
7334
|
seen.ref = def.innerType;
|
|
7346
7335
|
};
|
|
7347
|
-
const lazyProcessor = (schema, ctx, _json, params) => {
|
|
7348
|
-
const innerType = schema._zod.innerType;
|
|
7349
|
-
process$3(innerType, ctx, params);
|
|
7350
|
-
const seen = ctx.seen.get(schema);
|
|
7351
|
-
seen.ref = innerType;
|
|
7352
|
-
};
|
|
7353
7336
|
|
|
7354
7337
|
//#endregion
|
|
7355
7338
|
//#region node_modules/zod/v4/classic/iso.js
|
|
@@ -8046,18 +8029,6 @@ function readonly(innerType) {
|
|
|
8046
8029
|
innerType
|
|
8047
8030
|
});
|
|
8048
8031
|
}
|
|
8049
|
-
const ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => {
|
|
8050
|
-
$ZodLazy.init(inst, def);
|
|
8051
|
-
ZodType.init(inst, def);
|
|
8052
|
-
inst._zod.processJSONSchema = (ctx, json, params) => lazyProcessor(inst, ctx, json, params);
|
|
8053
|
-
inst.unwrap = () => inst._zod.def.getter();
|
|
8054
|
-
});
|
|
8055
|
-
function lazy(getter) {
|
|
8056
|
-
return new ZodLazy({
|
|
8057
|
-
type: "lazy",
|
|
8058
|
-
getter
|
|
8059
|
-
});
|
|
8060
|
-
}
|
|
8061
8032
|
const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
8062
8033
|
$ZodCustom.init(inst, def);
|
|
8063
8034
|
ZodType.init(inst, def);
|
|
@@ -16759,65 +16730,61 @@ const { convertPathToPattern } = import_out.default;
|
|
|
16759
16730
|
|
|
16760
16731
|
//#endregion
|
|
16761
16732
|
//#region src/core/resources/entity/schema.ts
|
|
16762
|
-
|
|
16763
|
-
* Operator-based field condition (e.g., { $in: "{{user.id}}" })
|
|
16764
|
-
*/
|
|
16765
|
-
const FieldConditionOperatorSchema = object({
|
|
16733
|
+
const FieldConditionSchema = union([string(), object({
|
|
16766
16734
|
$in: unknown().optional(),
|
|
16767
16735
|
$nin: unknown().optional(),
|
|
16768
16736
|
$ne: unknown().optional(),
|
|
16769
16737
|
$all: unknown().optional()
|
|
16770
|
-
});
|
|
16771
|
-
|
|
16772
|
-
|
|
16773
|
-
|
|
16774
|
-
|
|
16775
|
-
|
|
16776
|
-
|
|
16777
|
-
* Supports: role, email, id, and data.* pattern properties
|
|
16778
|
-
*/
|
|
16779
|
-
const UserConditionSchema = object({
|
|
16738
|
+
})]);
|
|
16739
|
+
const userConditionAllowedKeys = new Set([
|
|
16740
|
+
"role",
|
|
16741
|
+
"email",
|
|
16742
|
+
"id"
|
|
16743
|
+
]);
|
|
16744
|
+
const UserConditionSchema = looseObject({
|
|
16780
16745
|
role: string().optional(),
|
|
16781
16746
|
email: string().optional(),
|
|
16782
16747
|
id: string().optional()
|
|
16783
|
-
}).
|
|
16784
|
-
|
|
16785
|
-
|
|
16786
|
-
|
|
16787
|
-
|
|
16788
|
-
|
|
16789
|
-
|
|
16790
|
-
|
|
16791
|
-
|
|
16792
|
-
|
|
16793
|
-
const RLSConditionSchema = lazy(() => object({
|
|
16748
|
+
}).refine((val) => Object.keys(val).every((key) => userConditionAllowedKeys.has(key) || key.startsWith("data.")), "Keys must be role, email, id, or match data.* pattern");
|
|
16749
|
+
const rlsConditionAllowedKeys = new Set([
|
|
16750
|
+
"user_condition",
|
|
16751
|
+
"created_by",
|
|
16752
|
+
"created_by_id",
|
|
16753
|
+
"$or",
|
|
16754
|
+
"$and",
|
|
16755
|
+
"$nor"
|
|
16756
|
+
]);
|
|
16757
|
+
const RLSConditionSchema = looseObject({
|
|
16794
16758
|
user_condition: UserConditionSchema.optional(),
|
|
16795
|
-
$or: array(RLSConditionSchema).optional(),
|
|
16796
|
-
$and: array(RLSConditionSchema).optional(),
|
|
16797
|
-
$nor: array(RLSConditionSchema).optional(),
|
|
16798
16759
|
created_by: FieldConditionSchema.optional(),
|
|
16799
|
-
created_by_id: FieldConditionSchema.optional()
|
|
16800
|
-
|
|
16801
|
-
|
|
16802
|
-
|
|
16803
|
-
|
|
16804
|
-
|
|
16805
|
-
|
|
16806
|
-
|
|
16807
|
-
|
|
16808
|
-
|
|
16809
|
-
|
|
16810
|
-
|
|
16811
|
-
|
|
16812
|
-
|
|
16813
|
-
|
|
16814
|
-
|
|
16815
|
-
|
|
16816
|
-
const
|
|
16817
|
-
|
|
16818
|
-
|
|
16819
|
-
|
|
16820
|
-
|
|
16760
|
+
created_by_id: FieldConditionSchema.optional(),
|
|
16761
|
+
get $or() {
|
|
16762
|
+
return array(RefineRLSConditionSchema).optional();
|
|
16763
|
+
},
|
|
16764
|
+
get $and() {
|
|
16765
|
+
return array(RefineRLSConditionSchema).optional();
|
|
16766
|
+
},
|
|
16767
|
+
get $nor() {
|
|
16768
|
+
return array(RefineRLSConditionSchema).optional();
|
|
16769
|
+
}
|
|
16770
|
+
});
|
|
16771
|
+
const fieldConditionOperators = new Set([
|
|
16772
|
+
"$in",
|
|
16773
|
+
"$nin",
|
|
16774
|
+
"$ne",
|
|
16775
|
+
"$all"
|
|
16776
|
+
]);
|
|
16777
|
+
const isValidFieldCondition = (value) => {
|
|
16778
|
+
if (value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean") return true;
|
|
16779
|
+
if (typeof value === "object") return Object.keys(value).every((k$2) => fieldConditionOperators.has(k$2));
|
|
16780
|
+
return false;
|
|
16781
|
+
};
|
|
16782
|
+
const RefineRLSConditionSchema = RLSConditionSchema.refine((val) => Object.entries(val).every(([key, value]) => {
|
|
16783
|
+
if (rlsConditionAllowedKeys.has(key)) return true;
|
|
16784
|
+
if (!key.startsWith("data.")) return false;
|
|
16785
|
+
return isValidFieldCondition(value);
|
|
16786
|
+
}), "Keys must be known RLS keys or match data.* pattern with valid value");
|
|
16787
|
+
const RLSRuleSchema = union([boolean(), RefineRLSConditionSchema]);
|
|
16821
16788
|
const EntityRLSSchema = strictObject({
|
|
16822
16789
|
create: RLSRuleSchema.optional(),
|
|
16823
16790
|
read: RLSRuleSchema.optional(),
|
|
@@ -16825,10 +16792,6 @@ const EntityRLSSchema = strictObject({
|
|
|
16825
16792
|
delete: RLSRuleSchema.optional(),
|
|
16826
16793
|
write: RLSRuleSchema.optional()
|
|
16827
16794
|
});
|
|
16828
|
-
/**
|
|
16829
|
-
* Field-level RLS - controls which fields users can access within records
|
|
16830
|
-
* Only allows: read, write, create, update, delete
|
|
16831
|
-
*/
|
|
16832
16795
|
const FieldRLSSchema = strictObject({
|
|
16833
16796
|
read: RLSRuleSchema.optional(),
|
|
16834
16797
|
write: RLSRuleSchema.optional(),
|
|
@@ -16836,9 +16799,6 @@ const FieldRLSSchema = strictObject({
|
|
|
16836
16799
|
update: RLSRuleSchema.optional(),
|
|
16837
16800
|
delete: RLSRuleSchema.optional()
|
|
16838
16801
|
});
|
|
16839
|
-
/**
|
|
16840
|
-
* Property types supported by Base44 entities
|
|
16841
|
-
*/
|
|
16842
16802
|
const PropertyTypeSchema = _enum([
|
|
16843
16803
|
"string",
|
|
16844
16804
|
"number",
|
|
@@ -16848,9 +16808,6 @@ const PropertyTypeSchema = _enum([
|
|
|
16848
16808
|
"object",
|
|
16849
16809
|
"binary"
|
|
16850
16810
|
]);
|
|
16851
|
-
/**
|
|
16852
|
-
* String format validation options
|
|
16853
|
-
*/
|
|
16854
16811
|
const StringFormatSchema = _enum([
|
|
16855
16812
|
"date",
|
|
16856
16813
|
"date-time",
|
|
@@ -16864,11 +16821,7 @@ const StringFormatSchema = _enum([
|
|
|
16864
16821
|
"file",
|
|
16865
16822
|
"regex"
|
|
16866
16823
|
]);
|
|
16867
|
-
|
|
16868
|
-
* Entity reference pattern: /entities/{EntityName}/id
|
|
16869
|
-
*/
|
|
16870
|
-
const EntityRefSchema = string().regex(/^\/entities\/[a-zA-Z0-9]+\/id$/, "Reference must match pattern /entities/{EntityName}/id");
|
|
16871
|
-
const PropertyDefinitionSchema = lazy(() => object({
|
|
16824
|
+
const PropertyDefinitionSchema = object({
|
|
16872
16825
|
type: PropertyTypeSchema,
|
|
16873
16826
|
title: string().optional(),
|
|
16874
16827
|
description: string().optional(),
|
|
@@ -16881,23 +16834,19 @@ const PropertyDefinitionSchema = lazy(() => object({
|
|
|
16881
16834
|
enum: array(string()).optional(),
|
|
16882
16835
|
enumNames: array(string()).optional(),
|
|
16883
16836
|
default: unknown().optional(),
|
|
16884
|
-
$ref:
|
|
16885
|
-
|
|
16886
|
-
properties: record(string(), PropertyDefinitionSchema).optional(),
|
|
16837
|
+
$ref: string().optional(),
|
|
16838
|
+
rls: FieldRLSSchema.optional(),
|
|
16887
16839
|
required: array(string()).optional(),
|
|
16888
|
-
|
|
16889
|
-
|
|
16890
|
-
|
|
16891
|
-
|
|
16892
|
-
|
|
16893
|
-
|
|
16894
|
-
|
|
16895
|
-
* Full Entity Schema for Base44 entity configuration
|
|
16896
|
-
* Defines data structures with validation, security rules, and relationships
|
|
16897
|
-
*/
|
|
16840
|
+
get items() {
|
|
16841
|
+
return PropertyDefinitionSchema.optional();
|
|
16842
|
+
},
|
|
16843
|
+
get properties() {
|
|
16844
|
+
return record(string(), PropertyDefinitionSchema).optional();
|
|
16845
|
+
}
|
|
16846
|
+
});
|
|
16898
16847
|
const EntitySchema = object({
|
|
16899
16848
|
type: literal("object"),
|
|
16900
|
-
name:
|
|
16849
|
+
name: string().regex(/^[a-zA-Z0-9]+$/, "Entity name must be alphanumeric only"),
|
|
16901
16850
|
title: string().optional(),
|
|
16902
16851
|
description: string().optional(),
|
|
16903
16852
|
properties: record(string(), PropertyDefinitionSchema),
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "task_manager",
|
|
3
|
+
"description": "An AI agent that helps you manage and change your tasks",
|
|
4
|
+
"instructions": "You are a helpful task management assistant. You can help users create, update, mark as completed, and delete tasks using the entity tool. When a user asks to change a task, help them modify it by updating the appropriate fields. Always be conversational and helpful.",
|
|
5
|
+
"tool_configs": [
|
|
6
|
+
{
|
|
7
|
+
"entity_name": "Task",
|
|
8
|
+
"allowed_operations": ["read", "create", "update", "delete"]
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@base44-preview/cli",
|
|
3
|
-
"version": "0.0.25-pr.151.
|
|
3
|
+
"version": "0.0.25-pr.151.12d57cf",
|
|
4
4
|
"description": "Base44 CLI - Unified interface for managing Base44 applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -70,6 +70,5 @@
|
|
|
70
70
|
},
|
|
71
71
|
"optionalDependencies": {
|
|
72
72
|
"@rollup/rollup-linux-x64-gnu": "^4.56.0"
|
|
73
|
-
}
|
|
74
|
-
"packageManager": "yarn@4.12.0+sha256.1fe4e1193cbcd13a48d8f436bb17d3c672b049a5e32a758aab9866a073db1702"
|
|
73
|
+
}
|
|
75
74
|
}
|