@alienplatform/bindings 3.3.0-dev.0d4f932037814a854d56a7e4e82a8a34cc2e35cb → 3.3.1

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/LICENSE.md ADDED
@@ -0,0 +1,105 @@
1
+ # Functional Source License, Version 1.1, Apache 2.0 Future License
2
+
3
+ ## Abbreviation
4
+
5
+ FSL-1.1-Apache-2.0
6
+
7
+ ## Notice
8
+
9
+ Copyright 2026 Alien Software, Inc.
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
package/README.md CHANGED
@@ -6,6 +6,50 @@ in-process [napi-rs](https://napi.rs) addon. The addon itself lives in the Rust
6
6
  crate `crates/alien-bindings-node`; this package is the published JavaScript
7
7
  wrapper that loads it.
8
8
 
9
+ ## Remote Storage
10
+
11
+ Use `Bindings.forRemoteDeployment` from a trusted backend to access a Storage
12
+ resource in an existing deployment. Never put the Alien API token in browser,
13
+ mobile, or other client-side code. The token must have write access to the
14
+ deployment; read-only tokens cannot resolve cloud credentials.
15
+
16
+ ```ts
17
+ import { Bindings } from "@alienplatform/bindings"
18
+
19
+ const bindings = await Bindings.forRemoteDeployment({
20
+ deploymentId: process.env.ALIEN_DEPLOYMENT_ID!,
21
+ token: process.env.ALIEN_API_TOKEN!,
22
+ })
23
+
24
+ const archive = bindings.storage("archive")
25
+ await archive.put("reports/latest.json", Buffer.from(JSON.stringify({ ready: true })))
26
+
27
+ const metadata = await archive.head("reports/latest.json")
28
+ const report = await archive.get("reports/latest.json")
29
+ const reports = await archive.list("reports/")
30
+
31
+ await archive.delete("reports/latest.json")
32
+ ```
33
+
34
+ Remote Storage exposes `get`, `put`, `head`, `list`, and `delete`. It does not
35
+ expose copy or signed URLs. The same `Bindings` and Storage handles remain valid
36
+ while the native client refreshes short-lived cloud credentials and periodically
37
+ rediscovers the deployment's assigned manager. Rotating the Alien API token
38
+ requires constructing a new `Bindings` value. Pass `apiBaseUrl` only when
39
+ targeting a non-default Alien API endpoint; plain HTTP is accepted only on a
40
+ loopback address for local development.
41
+
42
+ The named resource must be a Running, Frozen S3, GCS, or Azure Blob Storage
43
+ resource with remote access enabled. Enabling remote access adds concrete
44
+ object read/write/list/delete access for that bucket or container to the
45
+ deployment's dedicated Remote Bindings identity. Generate and apply updated customer setup when
46
+ enabling it on an existing deployment. The endpoint returns a short-lived lease
47
+ for that Remote Bindings identity only after it validates the named resource, so the
48
+ Alien token and all returned provider credentials must be treated as backend
49
+ secrets.
50
+
51
+ ## Linked containers
52
+
9
53
  The same factories are re-exported by `@alienplatform/sdk` for Worker apps.
10
54
  Long-running Container and Daemon apps can import this package directly. A
11
55
  linked container is read-only service discovery:
@@ -60,8 +104,11 @@ opt-out for a plaintext-only server; missing legacy configuration defaults to
60
104
 
61
105
  ## Native addon resolution
62
106
 
63
- The addon is loaded lazily on the first binding operation (never at import — the
64
- package is `sideEffects: false`). `src/loader.ts` resolves it in order:
107
+ Importing the package never loads the addon, so the package remains
108
+ `sideEffects: false`. Environment-backed factories load it on the first binding
109
+ operation. `Bindings.forRemoteDeployment` loads it immediately because manager
110
+ discovery is part of that async constructor. `src/loader.ts` resolves it in
111
+ order:
65
112
 
66
113
  1. `ALIEN_BINDINGS_ADDON_PATH` — an explicit path to a `.node` file. A dev/test
67
114
  escape hatch only; never set in a published install.
@@ -12,8 +12,8 @@
12
12
  * Handle methods are closures (not `this`-bound class methods), so they behave
13
13
  * correctly even when destructured off the handle (`const { get } = storage(x)`).
14
14
  */
15
- import type { NativeAddon } from "./loader.js";
16
- import type { Container, Kv, Postgres, Queue, Storage, Vault } from "./types.js";
15
+ import type { NativeAddon, RawRemoteBindingsHandle } from "./loader.js";
16
+ import type { Container, Kv, Postgres, Queue, RemoteStorage, Storage, Vault } from "./types.js";
17
17
  /** The public factory surface. */
18
18
  export interface Factories {
19
19
  storage(name: string): Storage;
@@ -25,4 +25,6 @@ export interface Factories {
25
25
  }
26
26
  /** Build the factories bound to a given addon provider. */
27
27
  export declare function createFactories(getAddon: () => NativeAddon): Factories;
28
+ /** Build the remote-only storage factory around one native bindings handle. */
29
+ export declare function createRemoteStorageFactory(bindings: RawRemoteBindingsHandle): (name: string) => RemoteStorage;
28
30
  //# sourceMappingURL=factories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"factories.d.ts","sourceRoot":"","sources":["../src/factories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAQH,OAAO,KAAK,EACV,WAAW,EASZ,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EACV,SAAS,EACT,EAAE,EAGF,QAAQ,EAIR,KAAK,EAGL,OAAO,EACP,KAAK,EACN,MAAM,YAAY,CAAA;AA8PnB,kCAAkC;AAClC,MAAM,WAAW,SAAS;IACxB,OA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E,MAAM,MAAM,KAAG,aAAa,CAQrC"}
package/dist/index.d.ts CHANGED
@@ -8,6 +8,8 @@
8
8
  * against a binding with no `ALIEN_<NAME>_BINDING` in the environment throws
9
9
  * {@link BindingNotConfiguredError}.
10
10
  */
11
+ export { Bindings } from "./remote.js";
12
+ export type { RemoteDeploymentBindingsOptions } from "./remote.js";
11
13
  /** Resolve the storage binding named `name`. */
12
14
  export declare const storage: (name: string) => import("./types.js").Storage;
13
15
  /** Resolve the key-value binding named `name`. */
@@ -21,5 +23,5 @@ export declare const container: (name: string) => import("./types.js").Container
21
23
  /** Resolve the Postgres binding named `name`. */
22
24
  export declare const postgres: (name: string) => import("./types.js").Postgres;
23
25
  export { AlienError, BindingNotConfiguredError, BindingNotFoundError, defineError, InvalidPostgresTlsConfigError, UnknownPostgresSslModeError, } from "./errors.js";
24
- export type { Container, Kv, KvScanItem, KvScanResult, KvSetOptions, ObjectMeta, Postgres, PostgresConnection, PostgresSslMode, PostgresTlsOptions, PresignedRequest, Queue, QueueMessage, SignedUrlMethod, SignedUrlOptions, Storage, Vault, } from "./types.js";
26
+ export type { Container, Kv, KvScanItem, KvScanResult, KvSetOptions, ObjectMeta, Postgres, PostgresConnection, PostgresSslMode, PostgresTlsOptions, PresignedRequest, Queue, QueueMessage, RemoteStorage, SignedUrlMethod, SignedUrlOptions, Storage, Vault, } from "./types.js";
25
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,gDAAgD;AAChD,eAAO,MAAM,OAAO,gDAAoB,CAAA;AACxC,kDAAkD;AAClD,eAAO,MAAM,EAAE,2CAAe,CAAA;AAC9B,8CAA8C;AAC9C,eAAO,MAAM,KAAK,8CAAkB,CAAA;AACpC,8CAA8C;AAC9C,eAAO,MAAM,KAAK,8CAAkB,CAAA;AACpC,yDAAyD;AACzD,eAAO,MAAM,SAAS,k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Aa,EACb,eAAe,EACf,gBAAgB,EAChB,OAAO,EACP,KAAK,GACN,MAAM,YAAY,CAAA"}
package/dist/index.js CHANGED
@@ -1,4 +1,26 @@
1
- import { a as BindingNotConfiguredError, c as UnknownPostgresSslModeError, i as AlienError, l as defineError, o as BindingNotFoundError, r as createFactories, s as InvalidPostgresTlsConfigError, t as loadAddon } from "./loader.js";
1
+ import { a as AlienError, c as InvalidPostgresTlsConfigError, d as unwrapNapiError, i as createRemoteStorageFactory, l as UnknownPostgresSslModeError, o as BindingNotConfiguredError, r as createFactories, s as BindingNotFoundError, t as loadAddon, u as defineError } from "./loader.js";
2
+ //#region src/remote.ts
3
+ /** Remote bindings for an existing deployment. */
4
+ var Bindings = class Bindings {
5
+ #storage;
6
+ constructor(storage) {
7
+ this.#storage = storage;
8
+ }
9
+ /** Discover the deployment's manager and prepare remote Storage bindings. */
10
+ static async forRemoteDeployment(options) {
11
+ try {
12
+ const bindings = await loadAddon().RemoteBindingsHandle.forDeployment(options.deploymentId, options.token, options.apiBaseUrl);
13
+ return new Bindings(createRemoteStorageFactory(bindings));
14
+ } catch (error) {
15
+ throw unwrapNapiError(error);
16
+ }
17
+ }
18
+ /** Resolve a remote Storage binding by resource name. */
19
+ storage(name) {
20
+ return this.#storage(name);
21
+ }
22
+ };
23
+ //#endregion
2
24
  //#region src/index.ts
3
25
  /**
4
26
  * `@alienplatform/bindings` — direct TypeScript bindings for Alien storage, kv,
@@ -24,4 +46,4 @@ const container = factories.container;
24
46
  /** Resolve the Postgres binding named `name`. */
25
47
  const postgres = factories.postgres;
26
48
  //#endregion
27
- export { AlienError, BindingNotConfiguredError, BindingNotFoundError, InvalidPostgresTlsConfigError, UnknownPostgresSslModeError, container, defineError, kv, postgres, queue, storage, vault };
49
+ export { AlienError, BindingNotConfiguredError, BindingNotFoundError, Bindings, InvalidPostgresTlsConfigError, UnknownPostgresSslModeError, container, defineError, kv, postgres, queue, storage, vault };
package/dist/loader.d.ts CHANGED
@@ -68,6 +68,14 @@ export interface RawStorageHandle {
68
68
  copy(from: string, to: string): Promise<void>;
69
69
  signedUrl(method: string, path: string, expiresInSecs: number): Promise<RawPresignedRequest>;
70
70
  }
71
+ /** Raw napi remote Storage v0 handle. */
72
+ export interface RawRemoteStorageHandle {
73
+ get(path: string): Promise<Buffer>;
74
+ put(path: string, data: Buffer): Promise<void>;
75
+ delete(path: string): Promise<void>;
76
+ list(prefix?: string | null): Promise<RawObjectMeta[]>;
77
+ head(path: string): Promise<RawObjectMeta>;
78
+ }
71
79
  /** Raw napi key-value handle. */
72
80
  export interface RawKvHandle {
73
81
  get(key: string): Promise<Buffer | null>;
@@ -76,7 +84,7 @@ export interface RawKvHandle {
76
84
  exists(key: string): Promise<boolean>;
77
85
  scan(prefix: string, limit?: number | null, cursor?: string | null): Promise<RawScanResult>;
78
86
  }
79
- /** Raw napi queue handle. Every method takes the queue name as its first arg. */
87
+ /** Raw napi queue handle, already scoped to its configured queue. */
80
88
  export interface RawQueueHandle {
81
89
  sendJson(jsonString: string): Promise<void>;
82
90
  sendText(text: string): Promise<void>;
@@ -127,9 +135,22 @@ export interface RawBindingsHandle {
127
135
  container(name: string): Promise<RawContainerHandle>;
128
136
  postgres(name: string): Promise<RawPostgresHandle>;
129
137
  }
138
+ /** Raw napi remote bindings entry point. Storage is the entire v0 surface. */
139
+ export interface RawRemoteBindingsHandle {
140
+ storage(name: string): Promise<RawRemoteStorageHandle>;
141
+ }
142
+ /** Native environment-backed bindings class. */
143
+ export interface RawBindingsHandleConstructor {
144
+ new (): RawBindingsHandle;
145
+ }
146
+ /** Native remote bindings class. */
147
+ export interface RawRemoteBindingsHandleConstructor {
148
+ forDeployment(deploymentId: string, token: string, apiBaseUrl?: string): Promise<RawRemoteBindingsHandle>;
149
+ }
130
150
  /** The complete napi addon module surface consumed by the wrapper. */
131
151
  export interface NativeAddon {
132
- BindingsHandle: new () => RawBindingsHandle;
152
+ BindingsHandle: RawBindingsHandleConstructor;
153
+ RemoteBindingsHandle: RawRemoteBindingsHandleConstructor;
133
154
  version(): string;
134
155
  }
135
156
  /** The Linux C library a prebuild is compiled against. */
@@ -1 +1 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AASH,0BAA0B;AAC1B,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;CACd;AAED,4BAA4B;AAC5B,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,gCAAgC;AAChC,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,kCAAkC;AAClC,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC;AAED,8BAA8B;AAC9B,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,+BAA+B;AAC/B,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IAClC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9C,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACnC,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,I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AAQ,GAAE,MAAM,CAAC,QAA2B,EAC5C,IAAI,GAAE,MAAM,CAAC,YAA2B,EACxC,IAAI,GAAE,SAA4D,GACjE,MAAM,CAaR;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,QAAQ,GAAE,MAAgD,GACzD,MAAM,GAAG,SAAS,CAWpB;AASD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAO7F;AAKD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAE9D;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,WAAW,CA0DvC"}
package/dist/loader.js CHANGED
@@ -3488,21 +3488,24 @@ function unwrapNapiError(err) {
3488
3488
  */
3489
3489
  /**
3490
3490
  * Build a lazy, cached resolver for one resource handle. The returned function
3491
- * loads the addon, constructs a `BindingsHandle`, and resolves the resource
3492
- * handle on first call; subsequent calls reuse the cached handle.
3491
+ * obtains a `BindingsHandle` and resolves the resource handle on first call;
3492
+ * subsequent calls reuse the cached handle.
3493
3493
  */
3494
- function lazyHandle(getAddon, name, resolve) {
3494
+ function lazyHandle(resolve) {
3495
3495
  let pending;
3496
3496
  return () => {
3497
- if (!pending) pending = (async () => {
3498
- return await resolve(new (getAddon()).BindingsHandle(), name);
3499
- })().catch((err) => {
3497
+ if (!pending) pending = resolve().catch((err) => {
3500
3498
  pending = void 0;
3501
3499
  throw err;
3502
3500
  });
3503
3501
  return pending;
3504
3502
  };
3505
3503
  }
3504
+ function bindingsFromAddon(getAddon) {
3505
+ return async () => {
3506
+ return new (getAddon()).BindingsHandle();
3507
+ };
3508
+ }
3506
3509
  function toBuffer(data) {
3507
3510
  return Buffer.isBuffer(data) ? data : Buffer.from(data);
3508
3511
  }
@@ -3525,6 +3528,15 @@ function makeStorage(handle) {
3525
3528
  signedUrl: (options) => guard(handle, (raw) => raw.signedUrl(options.method, options.path, options.expiresIn))
3526
3529
  };
3527
3530
  }
3531
+ function makeRemoteStorage(handle) {
3532
+ return {
3533
+ get: (path) => guard(handle, (raw) => raw.get(path)),
3534
+ put: (path, data) => guard(handle, (raw) => raw.put(path, toBuffer(data))),
3535
+ delete: (path) => guard(handle, (raw) => raw.delete(path)),
3536
+ list: (prefix) => guard(handle, (raw) => raw.list(prefix ?? null)),
3537
+ head: (path) => guard(handle, (raw) => raw.head(path))
3538
+ };
3539
+ }
3528
3540
  function makeKv(handle) {
3529
3541
  return {
3530
3542
  get: (key) => guard(handle, (raw) => raw.get(key)),
@@ -3661,13 +3673,26 @@ function makePostgres(handle) {
3661
3673
  }
3662
3674
  /** Build the factories bound to a given addon provider. */
3663
3675
  function createFactories(getAddon) {
3676
+ const getBindings = bindingsFromAddon(getAddon);
3664
3677
  return {
3665
- storage: (name) => makeStorage(lazyHandle(getAddon, name, (b, n) => b.storage(n))),
3666
- kv: (name) => makeKv(lazyHandle(getAddon, name, (b, n) => b.kv(n))),
3667
- queue: (name) => makeQueue(lazyHandle(getAddon, name, (b, n) => b.queue(n))),
3668
- vault: (name) => makeVault(lazyHandle(getAddon, name, (b, n) => b.vault(n))),
3669
- container: (name) => makeContainer(lazyHandle(getAddon, name, (b, n) => b.container(n))),
3670
- postgres: (name) => makePostgres(lazyHandle(getAddon, name, (b, n) => b.postgres(n)))
3678
+ storage: (name) => makeStorage(lazyHandle(async () => (await getBindings()).storage(name))),
3679
+ kv: (name) => makeKv(lazyHandle(async () => (await getBindings()).kv(name))),
3680
+ queue: (name) => makeQueue(lazyHandle(async () => (await getBindings()).queue(name))),
3681
+ vault: (name) => makeVault(lazyHandle(async () => (await getBindings()).vault(name))),
3682
+ container: (name) => makeContainer(lazyHandle(async () => (await getBindings()).container(name))),
3683
+ postgres: (name) => makePostgres(lazyHandle(async () => (await getBindings()).postgres(name)))
3684
+ };
3685
+ }
3686
+ /** Build the remote-only storage factory around one native bindings handle. */
3687
+ function createRemoteStorageFactory(bindings) {
3688
+ const storages = /* @__PURE__ */ new Map();
3689
+ return (name) => {
3690
+ let storage = storages.get(name);
3691
+ if (!storage) {
3692
+ storage = makeRemoteStorage(lazyHandle(() => bindings.storage(name)));
3693
+ storages.set(name, storage);
3694
+ }
3695
+ return storage;
3671
3696
  };
3672
3697
  }
3673
3698
  //#endregion
@@ -3836,4 +3861,4 @@ function loadAddon() {
3836
3861
  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.`);
3837
3862
  }
3838
3863
  //#endregion
3839
- export { BindingNotConfiguredError as a, UnknownPostgresSslModeError as c, AlienError as i, defineError as l, registerEmbeddedAddon as n, BindingNotFoundError as o, createFactories as r, InvalidPostgresTlsConfigError as s, loadAddon as t };
3864
+ export { AlienError as a, InvalidPostgresTlsConfigError as c, unwrapNapiError as d, createRemoteStorageFactory as i, UnknownPostgresSslModeError as l, registerEmbeddedAddon as n, BindingNotConfiguredError as o, createFactories as r, BindingNotFoundError as s, loadAddon as t, defineError as u };
package/dist/native.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as BindingNotConfiguredError, c as UnknownPostgresSslModeError, i as AlienError, l as defineError, n as registerEmbeddedAddon, r as createFactories, s as InvalidPostgresTlsConfigError } from "./loader.js";
1
+ import { a as AlienError, c as InvalidPostgresTlsConfigError, l as UnknownPostgresSslModeError, n as registerEmbeddedAddon, o as BindingNotConfiguredError, r as createFactories, u as defineError } from "./loader.js";
2
2
  import addon from "./alien-bindings.node";
3
3
  //#region src/native.ts
4
4
  /**
@@ -0,0 +1,20 @@
1
+ import type { RemoteStorage } from "./types.js";
2
+ /** Options for accessing Storage resources in an existing deployment. */
3
+ export interface RemoteDeploymentBindingsOptions {
4
+ /** Deployment to access. */
5
+ deploymentId: string;
6
+ /** Alien API token authorized for remote bindings. */
7
+ token: string;
8
+ /** Override the Alien API base URL. */
9
+ apiBaseUrl?: string;
10
+ }
11
+ /** Remote bindings for an existing deployment. */
12
+ export declare class Bindings {
13
+ #private;
14
+ private constructor();
15
+ /** Discover the deployment's manager and prepare remote Storage bindings. */
16
+ static forRemoteDeployment(options: RemoteDeploymentBindingsOptions): Promise<Bindings>;
17
+ /** Resolve a remote Storage binding by resource name. */
18
+ storage(name: string): RemoteStorage;
19
+ }
20
+ //# sourceMappingURL=remote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../src/remote.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,yEAAyE;AACzE,MAAM,WAAW,+BAA+B;IAC9C,4BAA4B;IAC5B,YAAY,EAAE,MAAM,CAAA;IACpB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAA;IACb,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,kDAAkD;AAClD,qBAAa,QAAQ;;IAGnB,OAAO;IAIP,6EAA6E;WAChE,mBAAmB,CAAC,OAAO,EAAE,+BAA+B,GAAG,OAAO,CAAC,QAAQ,CAAC;IAc7F,yDAAyD;IACzD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa;CAGrC"}
package/dist/types.d.ts CHANGED
@@ -50,6 +50,8 @@ export interface Storage {
50
50
  /** Create a presigned request for `path`. */
51
51
  signedUrl(options: SignedUrlOptions): Promise<PresignedRequest>;
52
52
  }
53
+ /** Storage operations available from an external deployment binding. */
54
+ export type RemoteStorage = Pick<Storage, "get" | "put" | "delete" | "list" | "head">;
53
55
  /** Options for {@link Kv.set}. */
54
56
  export interface KvSetOptions {
55
57
  /** Time-to-live, in seconds. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;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C,MAAM,WAAW,KAAK;IACpB,+CAA+C;IAC/C,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IAClC,mDAAmD;IACnD,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IAC9C,oEAAoE;IACpE,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/C,oEAAoE;IACpE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpD,sCAAsC;IACtC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACnC,mDAAmD;IACnD,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;CAC1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alienplatform/bindings",
3
- "version": "3.3.0-dev.0d4f932037814a854d56a7e4e82a8a34cc2e35cb",
3
+ "version": "3.3.1",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "types": "./dist/index.d.ts",
@@ -21,16 +21,6 @@
21
21
  "node": ">=18",
22
22
  "bun": ">=1.0.23"
23
23
  },
24
- "scripts": {
25
- "build": "tsdown && tsc -p tsconfig.build.json --emitDeclarationOnly",
26
- "build:addon": "napi build --platform --release --cwd ../../crates/alien-bindings-node",
27
- "test": "vitest run",
28
- "test:bun": "bun scripts/run-bun-tests.mjs",
29
- "test:ts": "tsc --noEmit",
30
- "smoke": "node scripts/smoke-envelope.mjs",
31
- "format-and-lint": "biome check .",
32
- "format-and-lint:fix": "biome check . --write"
33
- },
34
24
  "keywords": [
35
25
  "alien",
36
26
  "bindings",
@@ -54,22 +44,33 @@
54
44
  "access": "public"
55
45
  },
56
46
  "devDependencies": {
57
- "@alienplatform/typescript-config": "workspace:^",
58
47
  "@biomejs/biome": "^1.9.4",
59
48
  "@napi-rs/cli": "^3.0.0",
60
49
  "@types/node": "^24.0.15",
61
50
  "tsdown": "^0.13.0",
62
51
  "typescript": "^5.8.3",
63
52
  "vitest": "^3.1.4",
64
- "zod": "4.3.2"
53
+ "zod": "4.3.2",
54
+ "@alienplatform/typescript-config": "^1.0.0"
65
55
  },
66
56
  "dependencies": {
67
- "@alienplatform/core": "3.3.0-dev.0d4f932037814a854d56a7e4e82a8a34cc2e35cb"
57
+ "@alienplatform/core": "^3.3.1"
68
58
  },
69
59
  "optionalDependencies": {
70
- "@alienplatform/bindings-darwin-arm64": "3.3.0-dev.0d4f932037814a854d56a7e4e82a8a34cc2e35cb",
71
- "@alienplatform/bindings-darwin-x64": "3.3.0-dev.0d4f932037814a854d56a7e4e82a8a34cc2e35cb",
72
- "@alienplatform/bindings-linux-x64-gnu": "3.3.0-dev.0d4f932037814a854d56a7e4e82a8a34cc2e35cb",
73
- "@alienplatform/bindings-linux-arm64-gnu": "3.3.0-dev.0d4f932037814a854d56a7e4e82a8a34cc2e35cb"
60
+ "@alienplatform/bindings-darwin-arm64": "3.3.1",
61
+ "@alienplatform/bindings-darwin-x64": "3.3.1",
62
+ "@alienplatform/bindings-linux-x64-gnu": "3.3.1",
63
+ "@alienplatform/bindings-linux-arm64-gnu": "3.3.1"
64
+ },
65
+ "scripts": {
66
+ "build": "tsdown && tsc -p tsconfig.build.json --emitDeclarationOnly",
67
+ "build:addon": "napi build --platform --release --cwd ../../crates/alien-bindings-node",
68
+ "test": "vitest run",
69
+ "test:bun": "bun scripts/run-bun-tests.mjs",
70
+ "test:ts": "tsc --noEmit",
71
+ "smoke": "node scripts/smoke-envelope.mjs",
72
+ "smoke:remote-storage": "node scripts/remote-storage-smoke.mjs",
73
+ "format-and-lint": "biome check .",
74
+ "format-and-lint:fix": "biome check . --write"
74
75
  }
75
- }
76
+ }