@columnus/api-cli 0.2.0 → 0.2.2
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.js +53 -15
- package/package.json +4 -4
- package/LICENSE +0 -21
package/dist/cli.js
CHANGED
|
@@ -1754,7 +1754,7 @@ var require_react_production = __commonJS({
|
|
|
1754
1754
|
exports.useTransition = function() {
|
|
1755
1755
|
return ReactSharedInternals.H.useTransition();
|
|
1756
1756
|
};
|
|
1757
|
-
exports.version = "19.3.
|
|
1757
|
+
exports.version = "19.3.1";
|
|
1758
1758
|
}
|
|
1759
1759
|
});
|
|
1760
1760
|
|
|
@@ -2749,7 +2749,7 @@ var require_react_development = __commonJS({
|
|
|
2749
2749
|
exports.useTransition = function() {
|
|
2750
2750
|
return resolveDispatcher().useTransition();
|
|
2751
2751
|
};
|
|
2752
|
-
exports.version = "19.3.
|
|
2752
|
+
exports.version = "19.3.1";
|
|
2753
2753
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
2754
2754
|
})();
|
|
2755
2755
|
}
|
|
@@ -3684,6 +3684,7 @@ __export(util_exports, {
|
|
|
3684
3684
|
required: () => required,
|
|
3685
3685
|
safeExtend: () => safeExtend,
|
|
3686
3686
|
shallowClone: () => shallowClone,
|
|
3687
|
+
sizeCaps: () => sizeCaps,
|
|
3687
3688
|
slugify: () => slugify,
|
|
3688
3689
|
stringifyPrimitive: () => stringifyPrimitive,
|
|
3689
3690
|
toZod: () => toZod,
|
|
@@ -4203,6 +4204,18 @@ function prefixIssues(path5, issues) {
|
|
|
4203
4204
|
function unwrapMessage(message) {
|
|
4204
4205
|
return typeof message === "string" ? message : message?.message;
|
|
4205
4206
|
}
|
|
4207
|
+
function sizeCaps(defChecks) {
|
|
4208
|
+
const caps = [];
|
|
4209
|
+
for (const ch of defChecks ?? []) {
|
|
4210
|
+
const d = ch._zod.def;
|
|
4211
|
+
if (!/_(length|size)$|_equals$/.test(d.check))
|
|
4212
|
+
break;
|
|
4213
|
+
const max = d.maximum ?? d.length ?? d.size;
|
|
4214
|
+
if (max >= 0)
|
|
4215
|
+
caps.push([max, ch]);
|
|
4216
|
+
}
|
|
4217
|
+
return caps;
|
|
4218
|
+
}
|
|
4206
4219
|
function attachSchema(issues, start, inst) {
|
|
4207
4220
|
var _a3;
|
|
4208
4221
|
for (let i = start; i < issues.length; i++) {
|
|
@@ -5623,7 +5636,7 @@ ${content.join("\n")}
|
|
|
5623
5636
|
var version = {
|
|
5624
5637
|
major: 4,
|
|
5625
5638
|
minor: 6,
|
|
5626
|
-
patch:
|
|
5639
|
+
patch: 7
|
|
5627
5640
|
};
|
|
5628
5641
|
|
|
5629
5642
|
// ../../../node_modules/zod/v4/core/schemas.js
|
|
@@ -6379,6 +6392,31 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
|
|
|
6379
6392
|
return payload;
|
|
6380
6393
|
};
|
|
6381
6394
|
});
|
|
6395
|
+
function capSize(inst, size) {
|
|
6396
|
+
const caps = sizeCaps(inst._zod.def.checks);
|
|
6397
|
+
if (!caps.length)
|
|
6398
|
+
return;
|
|
6399
|
+
const cap = Math.min(...caps.map((c) => c[0]));
|
|
6400
|
+
const parse3 = inst._zod.parse;
|
|
6401
|
+
inst._zod.parse = (payload, ctx) => {
|
|
6402
|
+
const n = size(payload.value);
|
|
6403
|
+
if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
6404
|
+
for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
|
|
6405
|
+
if (n > max && ch._zod.def.when(payload)) {
|
|
6406
|
+
const start = payload.issues.length;
|
|
6407
|
+
ch._zod.check(payload);
|
|
6408
|
+
payload.issues[start].continue = false;
|
|
6409
|
+
attachSchema(payload.issues, start, inst);
|
|
6410
|
+
return payload;
|
|
6411
|
+
}
|
|
6412
|
+
}
|
|
6413
|
+
}
|
|
6414
|
+
return parse3(payload, ctx);
|
|
6415
|
+
};
|
|
6416
|
+
}
|
|
6417
|
+
var arraySize = (input2) => Array.isArray(input2) ? input2.length : -1;
|
|
6418
|
+
var mapSize = (input2) => input2 instanceof Map ? input2.size : -1;
|
|
6419
|
+
var setSize = (input2) => input2 instanceof Set ? input2.size : -1;
|
|
6382
6420
|
function handleArrayResult(result, final, index) {
|
|
6383
6421
|
if (result.issues.length) {
|
|
6384
6422
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
@@ -6422,6 +6460,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
6422
6460
|
}
|
|
6423
6461
|
return payload;
|
|
6424
6462
|
};
|
|
6463
|
+
capSize(inst, arraySize);
|
|
6425
6464
|
});
|
|
6426
6465
|
function handlePropertyResult(result, final, key, input2, optin, optout) {
|
|
6427
6466
|
const isPresent = key in input2;
|
|
@@ -7378,6 +7417,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
|
|
|
7378
7417
|
return Promise.all(proms).then(() => payload);
|
|
7379
7418
|
return payload;
|
|
7380
7419
|
};
|
|
7420
|
+
capSize(inst, mapSize);
|
|
7381
7421
|
});
|
|
7382
7422
|
function handleMapResult(keyResult, valueResult, final, key, input2, inst, ctx) {
|
|
7383
7423
|
if (keyResult.issues.length) {
|
|
@@ -7444,6 +7484,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
|
|
|
7444
7484
|
return Promise.all(proms).then(() => payload);
|
|
7445
7485
|
return payload;
|
|
7446
7486
|
};
|
|
7487
|
+
capSize(inst, setSize);
|
|
7447
7488
|
});
|
|
7448
7489
|
function handleSetResult(result, final) {
|
|
7449
7490
|
if (result.issues.length) {
|
|
@@ -16974,9 +17015,15 @@ function generateNullableCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
|
16974
17015
|
doc.write(`}`);
|
|
16975
17016
|
return outputVar;
|
|
16976
17017
|
}
|
|
17018
|
+
function generateSizeGate(doc, schema, size) {
|
|
17019
|
+
for (const [max, check2] of sizeCaps(schema._zod.def.checks)) {
|
|
17020
|
+
doc.write(`if (${size} > ${numericOperand(max, check2._zod.def.check)}) return INVALID;`);
|
|
17021
|
+
}
|
|
17022
|
+
}
|
|
16977
17023
|
function generateArrayCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
16978
17024
|
const def = schema._zod.def;
|
|
16979
17025
|
doc.write(`if (!Array.isArray(${accessor})) return INVALID;`);
|
|
17026
|
+
generateSizeGate(doc, schema, `${accessor}.length`);
|
|
16980
17027
|
const outputVar = buildsValue ? newVar(ctx) : null;
|
|
16981
17028
|
const iVar = newVar(ctx);
|
|
16982
17029
|
const elemVar = newVar(ctx);
|
|
@@ -17376,6 +17423,7 @@ function literalPropertyKey(ctx, key) {
|
|
|
17376
17423
|
function generateMapCheck(doc, ctx, schema, accessor) {
|
|
17377
17424
|
const def = schema._zod.def;
|
|
17378
17425
|
doc.write(`if (!(${accessor} instanceof Map)) return INVALID;`);
|
|
17426
|
+
generateSizeGate(doc, schema, `${accessor}.size`);
|
|
17379
17427
|
const outputVar = newVar(ctx);
|
|
17380
17428
|
const kVar = newVar(ctx);
|
|
17381
17429
|
const valVar = newVar(ctx);
|
|
@@ -17392,6 +17440,7 @@ function generateMapCheck(doc, ctx, schema, accessor) {
|
|
|
17392
17440
|
function generateSetCheck(doc, ctx, schema, accessor) {
|
|
17393
17441
|
const def = schema._zod.def;
|
|
17394
17442
|
doc.write(`if (!(${accessor} instanceof Set)) return INVALID;`);
|
|
17443
|
+
generateSizeGate(doc, schema, `${accessor}.size`);
|
|
17395
17444
|
const outputVar = newVar(ctx);
|
|
17396
17445
|
const valVar = newVar(ctx);
|
|
17397
17446
|
doc.write(`const ${outputVar} = new Set();`);
|
|
@@ -23246,20 +23295,9 @@ var deployInternalTransferCreateResponseSchema = external_exports.object({
|
|
|
23246
23295
|
expiresAt: external_exports.number().int().positive(),
|
|
23247
23296
|
bytes: external_exports.number().int().nonnegative().optional()
|
|
23248
23297
|
});
|
|
23249
|
-
var deployInternalSchemaDeployResponseSchema = external_exports.object({
|
|
23250
|
-
ok: external_exports.boolean(),
|
|
23251
|
-
durationMs: external_exports.number(),
|
|
23252
|
-
prepareMs: external_exports.number().optional(),
|
|
23253
|
-
cliMs: external_exports.number().optional(),
|
|
23254
|
-
kernelCommit: external_exports.string().optional(),
|
|
23255
|
-
error: external_exports.string().optional(),
|
|
23256
|
-
logTail: external_exports.string().optional()
|
|
23257
|
-
});
|
|
23258
23298
|
var deployHealthResponseSchema = external_exports.object({
|
|
23259
23299
|
ok: external_exports.boolean(),
|
|
23260
|
-
commit: external_exports.string().optional()
|
|
23261
|
-
/** ISO-8601 deployment/image bake time (BRU-76 preview supersede). */
|
|
23262
|
-
deployedAt: external_exports.string().optional()
|
|
23300
|
+
commit: external_exports.string().optional()
|
|
23263
23301
|
});
|
|
23264
23302
|
var BFF_JSON_BODY_LIMIT_BYTES = 2 * 1024 * 1024;
|
|
23265
23303
|
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@columnus/api-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "columnus-api pull and dev — live-sync read API codegen for Columnus consumer apps",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/
|
|
10
|
+
"url": "git+https://github.com/columnus-dev/columnus.git",
|
|
11
11
|
"directory": "packages/@columnus/api-cli"
|
|
12
12
|
},
|
|
13
|
-
"homepage": "https://github.com/
|
|
13
|
+
"homepage": "https://github.com/columnus-dev/columnus/tree/main/packages/@columnus/api-cli",
|
|
14
14
|
"bugs": {
|
|
15
|
-
"url": "https://github.com/
|
|
15
|
+
"url": "https://github.com/columnus-dev/columnus/issues"
|
|
16
16
|
},
|
|
17
17
|
"bin": {
|
|
18
18
|
"columnus-api": "./dist/cli.js"
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Movement Overdrive / Columnus
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|