@alienplatform/bindings 3.3.39 → 3.3.40
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 +3 -6
- package/dist/loader.js +24 -44
- package/dist/native.js +1 -2
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { C as url, S as string, _ as unwrapNapiError, a as createRemoteKvFactory, b as literal, c as createRemoteStorageFactory, d as BindingNotFoundError, f as InvalidPostgresTlsConfigError, g as isSandboxOutcomeUnknown, h as defineError, i as createRemoteKeyFactory, l as AlienError, m as UnknownSandboxValueError, o as createRemoteQueueFactory, p as UnknownPostgresSslModeError, r as createFactories, s as createRemoteSandboxFactory, t as loadAddon, u as BindingNotConfiguredError, v as ZodISODateTime, w as _isoDateTime, x as object, y as discriminatedUnion } from "./loader.js";
|
|
2
|
-
|
|
2
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/iso.js
|
|
3
3
|
function datetime(params) {
|
|
4
4
|
return _isoDateTime(ZodISODateTime, params);
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
//#region src/remote.ts
|
|
6
|
+
// src/remote.ts
|
|
8
7
|
const aiBindingSchema = discriminatedUnion("service", [
|
|
9
8
|
object({
|
|
10
9
|
service: literal("bedrock"),
|
|
@@ -96,8 +95,7 @@ var Bindings = class Bindings {
|
|
|
96
95
|
return this.#sandbox(name);
|
|
97
96
|
}
|
|
98
97
|
};
|
|
99
|
-
|
|
100
|
-
//#region src/index.ts
|
|
98
|
+
// src/index.ts
|
|
101
99
|
/**
|
|
102
100
|
* `@alienplatform/bindings` — direct TypeScript bindings for Alien storage, kv,
|
|
103
101
|
* queue, vault, linked containers, and Postgres, backed by an in-process napi-rs addon
|
|
@@ -125,5 +123,4 @@ const container = factories.container;
|
|
|
125
123
|
const postgres = factories.postgres;
|
|
126
124
|
/** Create an isolated environment for running untrusted code. */
|
|
127
125
|
const sandbox = factories.sandbox;
|
|
128
|
-
//#endregion
|
|
129
126
|
export { AlienError, BindingNotConfiguredError, BindingNotFoundError, Bindings, InvalidPostgresTlsConfigError, UnknownPostgresSslModeError, UnknownSandboxValueError, container, defineError, isSandboxOutcomeUnknown, key, kv, postgres, queue, sandbox, storage, vault };
|
package/dist/loader.js
CHANGED
|
@@ -3,7 +3,7 @@ import { AlienError, BindingNotFoundError, defineError } from "@alienplatform/co
|
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
|
-
|
|
6
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/util.js
|
|
7
7
|
function getEnumValues(entries) {
|
|
8
8
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
9
9
|
return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
|
|
@@ -464,8 +464,7 @@ function constantCatch(value) {
|
|
|
464
464
|
fn[CONSTANT_CATCH] = true;
|
|
465
465
|
return fn;
|
|
466
466
|
}
|
|
467
|
-
|
|
468
|
-
//#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/core.js
|
|
467
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/core.js
|
|
469
468
|
var _a$1;
|
|
470
469
|
const _zodDesc$1 = {
|
|
471
470
|
value: void 0,
|
|
@@ -492,6 +491,7 @@ function newError(Definition) {
|
|
|
492
491
|
}
|
|
493
492
|
return new Definition();
|
|
494
493
|
}
|
|
494
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
495
495
|
function $constructor(name, initializer, proto, params) {
|
|
496
496
|
const zodProto = {};
|
|
497
497
|
function Internals(def) {
|
|
@@ -571,8 +571,7 @@ function config(newConfig) {
|
|
|
571
571
|
if (newConfig) Object.assign(globalConfig, newConfig);
|
|
572
572
|
return globalConfig;
|
|
573
573
|
}
|
|
574
|
-
|
|
575
|
-
//#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/errors.js
|
|
574
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/errors.js
|
|
576
575
|
function _getMessage() {
|
|
577
576
|
const internals = this._zod;
|
|
578
577
|
internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
|
|
@@ -630,8 +629,8 @@ const initializer$1 = (inst, def) => {
|
|
|
630
629
|
});
|
|
631
630
|
}
|
|
632
631
|
};
|
|
633
|
-
const $ZodError = $constructor("$ZodError", initializer$1);
|
|
634
|
-
const $ZodRealError = $constructor("$ZodError", initializer$1, void 0, { Parent: Error });
|
|
632
|
+
const $ZodError = /* @__PURE__ */ $constructor("$ZodError", initializer$1);
|
|
633
|
+
const $ZodRealError = /* @__PURE__ */ $constructor("$ZodError", initializer$1, void 0, { Parent: Error });
|
|
635
634
|
/** Get-or-create `obj[key]` as an own data property. A path segment naming an inherited member
|
|
636
635
|
* ("toString", "constructor") would otherwise read through to the prototype, and assigning
|
|
637
636
|
* "__proto__" would hit the setter instead of creating a key. */
|
|
@@ -694,8 +693,7 @@ function formatError(error, mapper = (issue) => issue.message) {
|
|
|
694
693
|
processError(error);
|
|
695
694
|
return fieldErrors;
|
|
696
695
|
}
|
|
697
|
-
|
|
698
|
-
//#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/parse.js
|
|
696
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/parse.js
|
|
699
697
|
function finalizeParams(callee, params) {
|
|
700
698
|
return {
|
|
701
699
|
callee: params?.callee ?? callee,
|
|
@@ -836,8 +834,7 @@ const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
836
834
|
const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
837
835
|
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
838
836
|
};
|
|
839
|
-
|
|
840
|
-
//#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/regexes.js
|
|
837
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/regexes.js
|
|
841
838
|
/**
|
|
842
839
|
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
843
840
|
* (timestamps embedded in the id). Use {@link cuid2} instead.
|
|
@@ -908,8 +905,7 @@ const string$1 = (params) => {
|
|
|
908
905
|
};
|
|
909
906
|
const lowercase = /^[^A-Z]*$/;
|
|
910
907
|
const uppercase = /^[^a-z]*$/;
|
|
911
|
-
|
|
912
|
-
//#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/checks.js
|
|
908
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/checks.js
|
|
913
909
|
const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
|
|
914
910
|
var _a;
|
|
915
911
|
inst._zod ?? (inst._zod = {});
|
|
@@ -1126,8 +1122,7 @@ const $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (ins
|
|
|
1126
1122
|
payload.value = def.tx(payload.value);
|
|
1127
1123
|
};
|
|
1128
1124
|
});
|
|
1129
|
-
|
|
1130
|
-
//#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/doc.js
|
|
1125
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/doc.js
|
|
1131
1126
|
var Doc = class {
|
|
1132
1127
|
constructor(args = [], closed = {}) {
|
|
1133
1128
|
this.content = [];
|
|
@@ -1157,15 +1152,13 @@ var Doc = class {
|
|
|
1157
1152
|
return new F(...Object.keys(this.closed), `return function (${this.args.join(", ")}) {\n${content.join("\n")}\n};`)(...Object.values(this.closed));
|
|
1158
1153
|
}
|
|
1159
1154
|
};
|
|
1160
|
-
|
|
1161
|
-
//#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/versions.js
|
|
1155
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/versions.js
|
|
1162
1156
|
const version = {
|
|
1163
1157
|
major: 4,
|
|
1164
1158
|
minor: 5,
|
|
1165
1159
|
patch: 2
|
|
1166
1160
|
};
|
|
1167
|
-
|
|
1168
|
-
//#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/schemas.js
|
|
1161
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/schemas.js
|
|
1169
1162
|
const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
|
|
1170
1163
|
var _a;
|
|
1171
1164
|
inst ?? (inst = {});
|
|
@@ -2371,8 +2364,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
2371
2364
|
payload.issues.push(issue(_iss));
|
|
2372
2365
|
}
|
|
2373
2366
|
}
|
|
2374
|
-
|
|
2375
|
-
//#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/memoizer.js
|
|
2367
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/memoizer.js
|
|
2376
2368
|
var $ZodCyclicError = class extends Error {
|
|
2377
2369
|
constructor() {
|
|
2378
2370
|
super(`Cannot parse a reference cycle that closes through a transform`);
|
|
@@ -2523,8 +2515,7 @@ function isBackEdge(ctx, value) {
|
|
|
2523
2515
|
const backEdges = ctx[STATE]?.backEdges;
|
|
2524
2516
|
return backEdges !== void 0 && value !== null && typeof value === "object" && backEdges.has(value);
|
|
2525
2517
|
}
|
|
2526
|
-
|
|
2527
|
-
//#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/locales/en.js
|
|
2518
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/locales/en.js
|
|
2528
2519
|
const error = () => {
|
|
2529
2520
|
const Sizable = {
|
|
2530
2521
|
string: {
|
|
@@ -2629,8 +2620,7 @@ const error = () => {
|
|
|
2629
2620
|
function en_default() {
|
|
2630
2621
|
return { localeError: error() };
|
|
2631
2622
|
}
|
|
2632
|
-
|
|
2633
|
-
//#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/registries.js
|
|
2623
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/registries.js
|
|
2634
2624
|
var _a;
|
|
2635
2625
|
var $ZodRegistry = class {
|
|
2636
2626
|
constructor() {
|
|
@@ -2676,8 +2666,7 @@ function registry() {
|
|
|
2676
2666
|
}
|
|
2677
2667
|
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
2678
2668
|
const globalRegistry = globalThis.__zod_globalRegistry;
|
|
2679
|
-
|
|
2680
|
-
//#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/api.js
|
|
2669
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/api.js
|
|
2681
2670
|
// @__NO_SIDE_EFFECTS__
|
|
2682
2671
|
function _string(Class, params) {
|
|
2683
2672
|
return new Class({
|
|
@@ -3112,8 +3101,7 @@ function _check(fn, params) {
|
|
|
3112
3101
|
ch._zod.check = fn;
|
|
3113
3102
|
return ch;
|
|
3114
3103
|
}
|
|
3115
|
-
|
|
3116
|
-
//#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/to-json-schema.js
|
|
3104
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/to-json-schema.js
|
|
3117
3105
|
function assignProps(target, ...sources) {
|
|
3118
3106
|
for (const source of sources) for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProp(target, key, source[key]);
|
|
3119
3107
|
return target;
|
|
@@ -3557,8 +3545,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
3557
3545
|
extractDefs(ctx, schema);
|
|
3558
3546
|
return finalize(ctx, schema);
|
|
3559
3547
|
};
|
|
3560
|
-
|
|
3561
|
-
//#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/json-schema-processors.js
|
|
3548
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/json-schema-processors.js
|
|
3562
3549
|
const formatMap = {
|
|
3563
3550
|
guid: "uuid",
|
|
3564
3551
|
url: "uri",
|
|
@@ -3800,8 +3787,7 @@ const optionalProcessor = (schema, ctx, _json, params) => {
|
|
|
3800
3787
|
const seen = ctx.seen.get(schema);
|
|
3801
3788
|
seen.ref = def.innerType;
|
|
3802
3789
|
};
|
|
3803
|
-
|
|
3804
|
-
//#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/errors.js
|
|
3790
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/errors.js
|
|
3805
3791
|
const _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
3806
3792
|
function _lazyMethod(proto, key, make) {
|
|
3807
3793
|
Object.defineProperty(proto, key, {
|
|
@@ -3850,8 +3836,7 @@ const initializer = (inst, issues) => {
|
|
|
3850
3836
|
});
|
|
3851
3837
|
};
|
|
3852
3838
|
const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, void 0, { Parent: Error });
|
|
3853
|
-
|
|
3854
|
-
//#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/parse.js
|
|
3839
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/parse.js
|
|
3855
3840
|
const parse = /* @__PURE__ */ _parse(ZodRealError);
|
|
3856
3841
|
const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
3857
3842
|
const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -3864,8 +3849,7 @@ const safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError);
|
|
|
3864
3849
|
const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
3865
3850
|
const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
3866
3851
|
const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
3867
|
-
|
|
3868
|
-
//#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/schemas.js
|
|
3852
|
+
// ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/schemas.js
|
|
3869
3853
|
function _ensureDefaultLocale() {
|
|
3870
3854
|
if (!globalConfig.localeError) config(en_default());
|
|
3871
3855
|
}
|
|
@@ -4652,8 +4636,7 @@ function refine(fn, _params = {}) {
|
|
|
4652
4636
|
function superRefine(fn, params) {
|
|
4653
4637
|
return /* @__PURE__ */ _superRefine(fn, params);
|
|
4654
4638
|
}
|
|
4655
|
-
|
|
4656
|
-
//#region src/errors.ts
|
|
4639
|
+
// src/errors.ts
|
|
4657
4640
|
/**
|
|
4658
4641
|
* Error definitions and napi error recovery for `@alienplatform/bindings`.
|
|
4659
4642
|
*
|
|
@@ -4815,8 +4798,7 @@ function unwrapNapiError(err) {
|
|
|
4815
4798
|
function isSandboxOutcomeUnknown(error) {
|
|
4816
4799
|
return error instanceof AlienError && error.hasErrorCode(SANDBOX_OUTCOME_UNKNOWN);
|
|
4817
4800
|
}
|
|
4818
|
-
|
|
4819
|
-
//#region src/factories.ts
|
|
4801
|
+
// src/factories.ts
|
|
4820
4802
|
/**
|
|
4821
4803
|
* The binding factories, parameterized over how the native addon is
|
|
4822
4804
|
* obtained. `index.ts` binds them to the lazy {@link loadAddon}; `native.ts`
|
|
@@ -5284,8 +5266,7 @@ function createRemoteSandboxFactory(bindings) {
|
|
|
5284
5266
|
return sandbox;
|
|
5285
5267
|
};
|
|
5286
5268
|
}
|
|
5287
|
-
|
|
5288
|
-
//#region src/loader.ts
|
|
5269
|
+
// src/loader.ts
|
|
5289
5270
|
/**
|
|
5290
5271
|
* Native addon loader.
|
|
5291
5272
|
*
|
|
@@ -5449,5 +5430,4 @@ function loadAddon() {
|
|
|
5449
5430
|
}
|
|
5450
5431
|
throw new Error(`Cannot load the @alienplatform/bindings native addon for '${triple}'. Install the '${pkg}' prebuild, or build it locally with \`napi build --platform\` in crates/alien-bindings-node, or set ALIEN_BINDINGS_ADDON_PATH to a built .node file.`);
|
|
5451
5432
|
}
|
|
5452
|
-
//#endregion
|
|
5453
5433
|
export { url as C, string as S, unwrapNapiError as _, createRemoteKvFactory as a, literal as b, createRemoteStorageFactory as c, BindingNotFoundError as d, InvalidPostgresTlsConfigError as f, isSandboxOutcomeUnknown as g, defineError as h, createRemoteKeyFactory as i, AlienError as l, UnknownSandboxValueError as m, registerEmbeddedAddon as n, createRemoteQueueFactory as o, UnknownPostgresSslModeError as p, createFactories as r, createRemoteSandboxFactory as s, loadAddon as t, BindingNotConfiguredError as u, ZodISODateTime as v, _isoDateTime as w, object as x, discriminatedUnion as y };
|
package/dist/native.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as InvalidPostgresTlsConfigError, h as defineError, l as AlienError, n as registerEmbeddedAddon, p as UnknownPostgresSslModeError, r as createFactories, u as BindingNotConfiguredError } from "./loader.js";
|
|
2
2
|
import addon from "./alien-bindings.node";
|
|
3
|
-
|
|
3
|
+
// src/native.ts
|
|
4
4
|
/**
|
|
5
5
|
* `@alienplatform/bindings/native` — static-embed entry for `bun build --compile`.
|
|
6
6
|
*
|
|
@@ -48,5 +48,4 @@ const vault = factories.vault;
|
|
|
48
48
|
const container = factories.container;
|
|
49
49
|
/** Resolve the Postgres binding named `name`. */
|
|
50
50
|
const postgres = factories.postgres;
|
|
51
|
-
//#endregion
|
|
52
51
|
export { AlienError, BindingNotConfiguredError, InvalidPostgresTlsConfigError, UnknownPostgresSslModeError, container, defineError, installEmbeddedAddon, key, kv, postgres, queue, storage, vault };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alienplatform/bindings",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.40",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
"@alienplatform/typescript-config": "^1.0.0"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@alienplatform/core": "^3.3.
|
|
57
|
+
"@alienplatform/core": "^3.3.40"
|
|
58
58
|
},
|
|
59
59
|
"optionalDependencies": {
|
|
60
|
-
"@alienplatform/bindings-darwin-arm64": "3.3.
|
|
61
|
-
"@alienplatform/bindings-darwin-x64": "3.3.
|
|
62
|
-
"@alienplatform/bindings-linux-x64-gnu": "3.3.
|
|
63
|
-
"@alienplatform/bindings-linux-arm64-gnu": "3.3.
|
|
60
|
+
"@alienplatform/bindings-darwin-arm64": "3.3.40",
|
|
61
|
+
"@alienplatform/bindings-darwin-x64": "3.3.40",
|
|
62
|
+
"@alienplatform/bindings-linux-x64-gnu": "3.3.40",
|
|
63
|
+
"@alienplatform/bindings-linux-arm64-gnu": "3.3.40"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"build": "tsdown && tsc -p tsconfig.build.json --emitDeclarationOnly",
|