@kitman-sh/software-engineering 0.13.18 → 0.14.0
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/bundle.js +70 -1
- package/dist/declarations.json +1 -1
- package/package.json +3 -3
package/dist/bundle.js
CHANGED
|
@@ -1497,6 +1497,7 @@ var Number2 = /* @__PURE__ */ make2((self, that) => {
|
|
|
1497
1497
|
return self < that ? -1 : 1;
|
|
1498
1498
|
});
|
|
1499
1499
|
var mapInput = /* @__PURE__ */ dual(2, (self, f) => make2((b1, b2) => self(f(b1), f(b2))));
|
|
1500
|
+
var isLessThan = (O) => dual(2, (self, that) => O(self, that) === -1);
|
|
1500
1501
|
var isGreaterThan = (O) => dual(2, (self, that) => O(self, that) === 1);
|
|
1501
1502
|
var isLessThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== 1);
|
|
1502
1503
|
var isGreaterThanOrEqualTo = (O) => dual(2, (self, that) => O(self, that) !== -1);
|
|
@@ -11278,6 +11279,33 @@ function makeIsLessThanOrEqualTo(options) {
|
|
|
11278
11279
|
});
|
|
11279
11280
|
};
|
|
11280
11281
|
}
|
|
11282
|
+
function makeIsBetween(deriveOptions) {
|
|
11283
|
+
const greaterThanOrEqualTo = isGreaterThanOrEqualTo(deriveOptions.order);
|
|
11284
|
+
const greaterThan = isGreaterThan(deriveOptions.order);
|
|
11285
|
+
const lessThanOrEqualTo = isLessThanOrEqualTo(deriveOptions.order);
|
|
11286
|
+
const lessThan = isLessThan(deriveOptions.order);
|
|
11287
|
+
const formatter = deriveOptions.formatter ?? format;
|
|
11288
|
+
return (options, annotations) => {
|
|
11289
|
+
const gte = options.exclusiveMinimum ? greaterThan : greaterThanOrEqualTo;
|
|
11290
|
+
const lte = options.exclusiveMaximum ? lessThan : lessThanOrEqualTo;
|
|
11291
|
+
return makeFilter2((input) => gte(input, options.minimum) && lte(input, options.maximum), {
|
|
11292
|
+
expected: `a value between ${formatter(options.minimum)}${options.exclusiveMinimum ? " (excluded)" : ""} and ${formatter(options.maximum)}${options.exclusiveMaximum ? " (excluded)" : ""}`,
|
|
11293
|
+
arbitraryConstraint: {
|
|
11294
|
+
order: deriveOptions.order,
|
|
11295
|
+
minimum: options.minimum,
|
|
11296
|
+
maximum: options.maximum,
|
|
11297
|
+
...options.exclusiveMinimum && {
|
|
11298
|
+
exclusiveMinimum: true
|
|
11299
|
+
},
|
|
11300
|
+
...options.exclusiveMaximum && {
|
|
11301
|
+
exclusiveMaximum: true
|
|
11302
|
+
}
|
|
11303
|
+
},
|
|
11304
|
+
...deriveOptions.annotate?.(options),
|
|
11305
|
+
...annotations
|
|
11306
|
+
});
|
|
11307
|
+
};
|
|
11308
|
+
}
|
|
11281
11309
|
function encodeNumberPayload(number) {
|
|
11282
11310
|
if (!globalThis.Number.isFinite(number)) {
|
|
11283
11311
|
throw new globalThis.RangeError(`Expected a finite number, got ${format(number)}`);
|
|
@@ -11318,6 +11346,36 @@ var isLessThanOrEqualTo3 = /* @__PURE__ */ makeIsLessThanOrEqualTo({
|
|
|
11318
11346
|
})
|
|
11319
11347
|
})
|
|
11320
11348
|
});
|
|
11349
|
+
var isBetween2 = /* @__PURE__ */ makeIsBetween({
|
|
11350
|
+
order: Number2,
|
|
11351
|
+
annotate: (options) => {
|
|
11352
|
+
const exclusiveMinimum = options.exclusiveMinimum ? true : undefined;
|
|
11353
|
+
const exclusiveMaximum = options.exclusiveMaximum ? true : undefined;
|
|
11354
|
+
const payload = {
|
|
11355
|
+
minimum: encodeNumberPayload(options.minimum),
|
|
11356
|
+
maximum: encodeNumberPayload(options.maximum),
|
|
11357
|
+
...exclusiveMinimum && {
|
|
11358
|
+
exclusiveMinimum
|
|
11359
|
+
},
|
|
11360
|
+
...exclusiveMaximum && {
|
|
11361
|
+
exclusiveMaximum
|
|
11362
|
+
}
|
|
11363
|
+
};
|
|
11364
|
+
return {
|
|
11365
|
+
representation: {
|
|
11366
|
+
id: "effect/schema/isBetween",
|
|
11367
|
+
payload
|
|
11368
|
+
},
|
|
11369
|
+
toJsonSchema: () => ({
|
|
11370
|
+
[exclusiveMinimum ? "exclusiveMinimum" : "minimum"]: options.minimum,
|
|
11371
|
+
[exclusiveMaximum ? "exclusiveMaximum" : "maximum"]: options.maximum
|
|
11372
|
+
}),
|
|
11373
|
+
toCode: () => ({
|
|
11374
|
+
runtime: `Schema.isBetween({ minimum: ${format(options.minimum)}, maximum: ${format(options.maximum)}, exclusiveMinimum: ${format(exclusiveMinimum)}, exclusiveMaximum: ${format(exclusiveMaximum)} })`
|
|
11375
|
+
})
|
|
11376
|
+
};
|
|
11377
|
+
}
|
|
11378
|
+
});
|
|
11321
11379
|
function isInt(annotations) {
|
|
11322
11380
|
return makeFilter2((n) => globalThis.Number.isSafeInteger(n), {
|
|
11323
11381
|
expected: "an integer",
|
|
@@ -27773,6 +27831,17 @@ var RunFileUrlsRequest = Struct({
|
|
|
27773
27831
|
ids: ArraySchema(Id).check(isMinLength(1), isMaxLength(200)),
|
|
27774
27832
|
use: Literals(["view", "download"])
|
|
27775
27833
|
});
|
|
27834
|
+
var maxRunFileTextBytes = 256 * 1024;
|
|
27835
|
+
var RunFileTextRequest = Struct({
|
|
27836
|
+
offset: optionalKey2(Int.check(isGreaterThanOrEqualTo2(0))),
|
|
27837
|
+
length: optionalKey2(Int.check(isBetween2({ minimum: 1, maximum: maxRunFileTextBytes })))
|
|
27838
|
+
});
|
|
27839
|
+
var RunFileText = Struct({
|
|
27840
|
+
file: RunFileView,
|
|
27841
|
+
offset: Int,
|
|
27842
|
+
end: Int,
|
|
27843
|
+
text: String5
|
|
27844
|
+
});
|
|
27776
27845
|
var RunFileRemoveRequest = Struct({
|
|
27777
27846
|
note: optionalKey2(String5.check(isMaxLength(500)))
|
|
27778
27847
|
});
|
|
@@ -32347,4 +32416,4 @@ var runKit = (config, identity, packages) => {
|
|
|
32347
32416
|
runMain2(program.pipe(flatMap3((code) => sync2(() => process.exit(code)))));
|
|
32348
32417
|
};
|
|
32349
32418
|
// .kitman-build-entry.ts
|
|
32350
|
-
runKit(kitman_config_default, { name: "@kitman-sh/software-engineering", version: "0.
|
|
32419
|
+
runKit(kitman_config_default, { name: "@kitman-sh/software-engineering", version: "0.14.0" }, []);
|
package/dist/declarations.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitman-sh/software-engineering",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Everything for building software: Loops, their Agents, the skills they use and the Ponytail plugin.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"tsconfig.json"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@kitman-sh/sdk": "0.
|
|
20
|
+
"@kitman-sh/sdk": "0.14.0",
|
|
21
21
|
"effect": "^4.1.2"
|
|
22
22
|
},
|
|
23
23
|
"kitman": {
|
|
24
24
|
"bundle": "dist/bundle.js",
|
|
25
|
-
"digest": "
|
|
25
|
+
"digest": "d9f6c9255d6a79a8496514c4770475ad91b6ed06000b3c5d9c96a0fedc1edc6c",
|
|
26
26
|
"protocolVersion": 5,
|
|
27
27
|
"declarations": "dist/declarations.json",
|
|
28
28
|
"setup": {
|