@alienplatform/sdk 1.14.1 → 2.0.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/dist/dist.js +371 -275
- package/dist/index.d.ts +22 -28
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -14356
- package/dist/native.d.ts +26 -0
- package/dist/native.d.ts.map +1 -0
- package/dist/native.js +2 -0
- package/dist/worker-runtime/channel.d.ts +25 -0
- package/dist/worker-runtime/channel.d.ts.map +1 -0
- package/dist/worker-runtime/errors.d.ts +79 -0
- package/dist/worker-runtime/errors.d.ts.map +1 -0
- package/dist/worker-runtime/event-loop.d.ts +43 -0
- package/dist/worker-runtime/event-loop.d.ts.map +1 -0
- package/dist/{generated → worker-runtime/generated}/control.d.ts +15 -15
- package/dist/worker-runtime/generated/control.d.ts.map +1 -0
- package/dist/worker-runtime/generated/google/protobuf/duration.d.ts.map +1 -0
- package/dist/worker-runtime/generated/google/protobuf/timestamp.d.ts.map +1 -0
- package/dist/{generated → worker-runtime/generated}/wait_until.d.ts +29 -29
- package/dist/worker-runtime/generated/wait_until.d.ts.map +1 -0
- package/dist/worker-runtime/grpc-utils.d.ts +23 -0
- package/dist/worker-runtime/grpc-utils.d.ts.map +1 -0
- package/dist/worker-runtime/index.d.ts +33 -0
- package/dist/worker-runtime/index.d.ts.map +1 -0
- package/dist/{src.js → worker-runtime/index.js} +9370 -4035
- package/dist/worker-runtime/registry.d.ts +169 -0
- package/dist/worker-runtime/registry.d.ts.map +1 -0
- package/dist/worker-runtime/service-definitions.d.ts +12 -0
- package/dist/worker-runtime/service-definitions.d.ts.map +1 -0
- package/dist/worker-runtime/wait-until-manager.d.ts +34 -0
- package/dist/worker-runtime/wait-until-manager.d.ts.map +1 -0
- package/package.json +18 -38
- package/.turbo/turbo-build.log +0 -30
- package/AGENTS.md +0 -70
- package/dist/bearerTokenAuthenticationPolicy.js +0 -3028
- package/dist/bindings/artifact-registry.d.ts +0 -88
- package/dist/bindings/artifact-registry.d.ts.map +0 -1
- package/dist/bindings/build.d.ts +0 -67
- package/dist/bindings/build.d.ts.map +0 -1
- package/dist/bindings/index.d.ts +0 -13
- package/dist/bindings/index.d.ts.map +0 -1
- package/dist/bindings/kv.d.ts +0 -113
- package/dist/bindings/kv.d.ts.map +0 -1
- package/dist/bindings/postgres.d.ts +0 -90
- package/dist/bindings/postgres.d.ts.map +0 -1
- package/dist/bindings/postgres.test.d.ts +0 -2
- package/dist/bindings/postgres.test.d.ts.map +0 -1
- package/dist/bindings/queue.d.ts +0 -81
- package/dist/bindings/queue.d.ts.map +0 -1
- package/dist/bindings/service-account.d.ts +0 -46
- package/dist/bindings/service-account.d.ts.map +0 -1
- package/dist/bindings/storage.d.ts +0 -164
- package/dist/bindings/storage.d.ts.map +0 -1
- package/dist/bindings/vault.d.ts +0 -65
- package/dist/bindings/vault.d.ts.map +0 -1
- package/dist/bindings/worker.d.ts +0 -72
- package/dist/bindings/worker.d.ts.map +0 -1
- package/dist/channel.d.ts +0 -39
- package/dist/channel.d.ts.map +0 -1
- package/dist/checksum.js +0 -6176
- package/dist/commands/client.d.ts +0 -47
- package/dist/commands/client.d.ts.map +0 -1
- package/dist/commands/errors.d.ts +0 -198
- package/dist/commands/errors.d.ts.map +0 -1
- package/dist/commands/index.d.ts +0 -23
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/index.js +0 -387
- package/dist/commands/types.d.ts +0 -40
- package/dist/commands/types.d.ts.map +0 -1
- package/dist/commands.d.ts +0 -55
- package/dist/commands.d.ts.map +0 -1
- package/dist/context.d.ts +0 -182
- package/dist/context.d.ts.map +0 -1
- package/dist/dist-cjs.js +0 -15258
- package/dist/dist2.js +0 -1239
- package/dist/errors.d.ts +0 -359
- package/dist/errors.d.ts.map +0 -1
- package/dist/es5.js +0 -1720
- package/dist/esm.js +0 -18068
- package/dist/esm2.js +0 -3166
- package/dist/event-streams.js +0 -770
- package/dist/events.d.ts +0 -163
- package/dist/events.d.ts.map +0 -1
- package/dist/generated/artifact_registry.d.ts +0 -302
- package/dist/generated/artifact_registry.d.ts.map +0 -1
- package/dist/generated/build.d.ts +0 -184
- package/dist/generated/build.d.ts.map +0 -1
- package/dist/generated/container.d.ts +0 -101
- package/dist/generated/container.d.ts.map +0 -1
- package/dist/generated/control.d.ts.map +0 -1
- package/dist/generated/google/protobuf/duration.d.ts.map +0 -1
- package/dist/generated/google/protobuf/timestamp.d.ts.map +0 -1
- package/dist/generated/kv.d.ts +0 -182
- package/dist/generated/kv.d.ts.map +0 -1
- package/dist/generated/queue.d.ts +0 -127
- package/dist/generated/queue.d.ts.map +0 -1
- package/dist/generated/service_account.d.ts +0 -112
- package/dist/generated/service_account.d.ts.map +0 -1
- package/dist/generated/storage.d.ts +0 -784
- package/dist/generated/storage.d.ts.map +0 -1
- package/dist/generated/vault.d.ts +0 -107
- package/dist/generated/vault.d.ts.map +0 -1
- package/dist/generated/wait_until.d.ts.map +0 -1
- package/dist/generated/worker.d.ts +0 -107
- package/dist/generated/worker.d.ts.map +0 -1
- package/dist/global.d.ts +0 -208
- package/dist/global.d.ts.map +0 -1
- package/dist/grpc-utils.d.ts +0 -25
- package/dist/grpc-utils.d.ts.map +0 -1
- package/dist/jws.js +0 -611
- package/dist/open.js +0 -461
- package/dist/rolldown-runtime.js +0 -44
- package/dist/src2.js +0 -114032
- package/dist/types.d.ts +0 -337
- package/dist/types.d.ts.map +0 -1
- package/dist/wait-until.d.ts +0 -115
- package/dist/wait-until.d.ts.map +0 -1
- package/scripts/generate-proto.sh +0 -46
- package/src/bindings/AGENTS.md +0 -105
- package/src/bindings/artifact-registry.ts +0 -317
- package/src/bindings/build.ts +0 -195
- package/src/bindings/index.ts +0 -13
- package/src/bindings/kv.ts +0 -240
- package/src/bindings/postgres.test.ts +0 -17
- package/src/bindings/postgres.ts +0 -446
- package/src/bindings/queue.ts +0 -191
- package/src/bindings/service-account.ts +0 -113
- package/src/bindings/storage.ts +0 -536
- package/src/bindings/vault.ts +0 -133
- package/src/bindings/worker.ts +0 -164
- package/src/channel.ts +0 -102
- package/src/commands/client.ts +0 -446
- package/src/commands/errors.ts +0 -126
- package/src/commands/index.ts +0 -41
- package/src/commands/types.ts +0 -52
- package/src/commands.ts +0 -76
- package/src/context.ts +0 -368
- package/src/errors.ts +0 -280
- package/src/events.ts +0 -511
- package/src/generated/artifact_registry.ts +0 -2096
- package/src/generated/build.ts +0 -1311
- package/src/generated/container.ts +0 -503
- package/src/generated/control.ts +0 -2018
- package/src/generated/google/protobuf/duration.ts +0 -196
- package/src/generated/google/protobuf/timestamp.ts +0 -226
- package/src/generated/kv.ts +0 -1169
- package/src/generated/queue.ts +0 -753
- package/src/generated/service_account.ts +0 -814
- package/src/generated/storage.ts +0 -3820
- package/src/generated/vault.ts +0 -543
- package/src/generated/wait_until.ts +0 -829
- package/src/generated/worker.ts +0 -759
- package/src/global.ts +0 -287
- package/src/grpc-utils.ts +0 -159
- package/src/index.ts +0 -160
- package/src/types.ts +0 -397
- package/src/wait-until.ts +0 -273
- package/tsconfig.json +0 -8
- package/tsdown.config.ts +0 -17
- /package/dist/{generated → worker-runtime/generated}/google/protobuf/duration.d.ts +0 -0
- /package/dist/{generated → worker-runtime/generated}/google/protobuf/timestamp.d.ts +0 -0
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Storage binding implementation.
|
|
3
|
-
*
|
|
4
|
-
* Provides object storage operations with streaming support.
|
|
5
|
-
*/
|
|
6
|
-
import { type Channel } from "nice-grpc";
|
|
7
|
-
import type { SignedUrlOptions, SignedUrlResult, StorageGetOptions, StorageGetResult, StorageListResult, StorageObjectMeta, StoragePutOptions } from "../types.js";
|
|
8
|
-
/**
|
|
9
|
-
* Storage binding for object storage operations.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```typescript
|
|
13
|
-
* import { storage } from "@alienplatform/sdk"
|
|
14
|
-
*
|
|
15
|
-
* const bucket = storage("my-bucket")
|
|
16
|
-
*
|
|
17
|
-
* // Upload a file
|
|
18
|
-
* await bucket.put("images/photo.jpg", imageData, { contentType: "image/jpeg" })
|
|
19
|
-
*
|
|
20
|
-
* // Download a file
|
|
21
|
-
* const result = await bucket.get("images/photo.jpg")
|
|
22
|
-
* console.log("Size:", result.meta.size)
|
|
23
|
-
*
|
|
24
|
-
* // List files
|
|
25
|
-
* for await (const file of bucket.list("images/")) {
|
|
26
|
-
* console.log(file.location)
|
|
27
|
-
* }
|
|
28
|
-
*
|
|
29
|
-
* // Generate a signed URL
|
|
30
|
-
* const { url } = await bucket.signedUrl("images/photo.jpg", { operation: "get" })
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
export declare class Storage {
|
|
34
|
-
private readonly client;
|
|
35
|
-
private readonly bindingName;
|
|
36
|
-
constructor(channel: Channel, bindingName: string);
|
|
37
|
-
/**
|
|
38
|
-
* Get an object from storage.
|
|
39
|
-
*
|
|
40
|
-
* @param path - Path to the object
|
|
41
|
-
* @param options - Get options (range, conditionals)
|
|
42
|
-
* @returns Object data and metadata
|
|
43
|
-
*/
|
|
44
|
-
get(path: string, options?: StorageGetOptions): Promise<StorageGetResult>;
|
|
45
|
-
/**
|
|
46
|
-
* Get an object as a UTF-8 string.
|
|
47
|
-
*
|
|
48
|
-
* @param path - Path to the object
|
|
49
|
-
* @param options - Get options
|
|
50
|
-
* @returns Object content as string
|
|
51
|
-
*/
|
|
52
|
-
getText(path: string, options?: StorageGetOptions): Promise<string>;
|
|
53
|
-
/**
|
|
54
|
-
* Get an object and parse as JSON.
|
|
55
|
-
*
|
|
56
|
-
* @param path - Path to the object
|
|
57
|
-
* @param options - Get options
|
|
58
|
-
* @returns Parsed JSON content
|
|
59
|
-
*/
|
|
60
|
-
getJson<T = unknown>(path: string, options?: StorageGetOptions): Promise<T>;
|
|
61
|
-
/**
|
|
62
|
-
* Put an object to storage.
|
|
63
|
-
*
|
|
64
|
-
* @param path - Path to store the object
|
|
65
|
-
* @param data - Object data
|
|
66
|
-
* @param options - Put options (content type, metadata)
|
|
67
|
-
*/
|
|
68
|
-
put(path: string, data: Uint8Array | string | object, options?: StoragePutOptions): Promise<void>;
|
|
69
|
-
/**
|
|
70
|
-
* Put an object using streaming (for large files).
|
|
71
|
-
*
|
|
72
|
-
* @param path - Path to store the object
|
|
73
|
-
* @param chunks - Async iterable of data chunks
|
|
74
|
-
* @param options - Put options
|
|
75
|
-
*/
|
|
76
|
-
putMultipart(path: string, chunks: AsyncIterable<Uint8Array>, options?: StoragePutOptions): Promise<void>;
|
|
77
|
-
/**
|
|
78
|
-
* Delete an object from storage.
|
|
79
|
-
*
|
|
80
|
-
* @param path - Path to the object
|
|
81
|
-
*/
|
|
82
|
-
delete(path: string): Promise<void>;
|
|
83
|
-
/**
|
|
84
|
-
* List objects in storage.
|
|
85
|
-
*
|
|
86
|
-
* @param prefix - Optional prefix filter
|
|
87
|
-
* @param options - List options
|
|
88
|
-
* @returns Async iterable of object metadata
|
|
89
|
-
*/
|
|
90
|
-
list(prefix?: string, options?: {
|
|
91
|
-
offset?: string;
|
|
92
|
-
}): AsyncIterable<StorageObjectMeta>;
|
|
93
|
-
/**
|
|
94
|
-
* List objects with delimiter (for directory-like listing).
|
|
95
|
-
*
|
|
96
|
-
* @param prefix - Optional prefix filter
|
|
97
|
-
* @returns List result with objects and common prefixes
|
|
98
|
-
*/
|
|
99
|
-
listWithDelimiter(prefix?: string): Promise<StorageListResult>;
|
|
100
|
-
/**
|
|
101
|
-
* Get object metadata without downloading content.
|
|
102
|
-
*
|
|
103
|
-
* @param path - Path to the object
|
|
104
|
-
* @returns Object metadata
|
|
105
|
-
*/
|
|
106
|
-
head(path: string): Promise<StorageObjectMeta>;
|
|
107
|
-
/**
|
|
108
|
-
* Check if an object exists.
|
|
109
|
-
*
|
|
110
|
-
* @param path - Path to the object
|
|
111
|
-
* @returns True if the object exists
|
|
112
|
-
*/
|
|
113
|
-
exists(path: string): Promise<boolean>;
|
|
114
|
-
/**
|
|
115
|
-
* Get the base directory path for this storage binding.
|
|
116
|
-
*
|
|
117
|
-
* @returns Base directory path
|
|
118
|
-
*/
|
|
119
|
-
getBaseDir(): Promise<string>;
|
|
120
|
-
/**
|
|
121
|
-
* Get the underlying URL for this storage binding.
|
|
122
|
-
*
|
|
123
|
-
* @returns Storage URL
|
|
124
|
-
*/
|
|
125
|
-
getUrl(): Promise<string>;
|
|
126
|
-
/**
|
|
127
|
-
* Copy an object within the same storage binding.
|
|
128
|
-
*
|
|
129
|
-
* @param from - Source path
|
|
130
|
-
* @param to - Destination path
|
|
131
|
-
*/
|
|
132
|
-
copy(from: string, to: string): Promise<void>;
|
|
133
|
-
/**
|
|
134
|
-
* Rename (move) an object within the same storage binding.
|
|
135
|
-
*
|
|
136
|
-
* @param from - Source path
|
|
137
|
-
* @param to - Destination path
|
|
138
|
-
*/
|
|
139
|
-
rename(from: string, to: string): Promise<void>;
|
|
140
|
-
/**
|
|
141
|
-
* Copy an object only if the destination doesn't exist.
|
|
142
|
-
*
|
|
143
|
-
* @param from - Source path
|
|
144
|
-
* @param to - Destination path
|
|
145
|
-
*/
|
|
146
|
-
copyIfNotExists(from: string, to: string): Promise<void>;
|
|
147
|
-
/**
|
|
148
|
-
* Rename (move) an object only if the destination doesn't exist.
|
|
149
|
-
*
|
|
150
|
-
* @param from - Source path
|
|
151
|
-
* @param to - Destination path
|
|
152
|
-
*/
|
|
153
|
-
renameIfNotExists(from: string, to: string): Promise<void>;
|
|
154
|
-
/**
|
|
155
|
-
* Generate a signed URL for an object.
|
|
156
|
-
*
|
|
157
|
-
* @param path - Path to the object
|
|
158
|
-
* @param options - Signed URL options
|
|
159
|
-
* @returns Signed URL result
|
|
160
|
-
*/
|
|
161
|
-
signedUrl(path: string, options: SignedUrlOptions): Promise<SignedUrlResult>;
|
|
162
|
-
private fromProtoMeta;
|
|
163
|
-
}
|
|
164
|
-
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage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
|
|
4
|
-
* Provides secure secret management operations.
|
|
5
|
-
*/
|
|
6
|
-
import { type Channel } from "nice-grpc";
|
|
7
|
-
/**
|
|
8
|
-
* Vault binding for secret management operations.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```typescript
|
|
12
|
-
* import { vault } from "@alienplatform/sdk"
|
|
13
|
-
*
|
|
14
|
-
* const secrets = vault("app-secrets")
|
|
15
|
-
*
|
|
16
|
-
* // Get a secret
|
|
17
|
-
* const apiKey = await secrets.get("API_KEY")
|
|
18
|
-
*
|
|
19
|
-
* // Set a secret
|
|
20
|
-
* await secrets.set("DATABASE_URL", "postgres://...")
|
|
21
|
-
*
|
|
22
|
-
* // Delete a secret
|
|
23
|
-
* await secrets.delete("OLD_KEY")
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export declare class Vault {
|
|
27
|
-
private readonly client;
|
|
28
|
-
private readonly bindingName;
|
|
29
|
-
constructor(channel: Channel, bindingName: string);
|
|
30
|
-
/**
|
|
31
|
-
* Get a secret value.
|
|
32
|
-
*
|
|
33
|
-
* @param secretName - Name of the secret
|
|
34
|
-
* @returns Secret value
|
|
35
|
-
*/
|
|
36
|
-
get(secretName: string): Promise<string>;
|
|
37
|
-
/**
|
|
38
|
-
* Get a secret as JSON.
|
|
39
|
-
*
|
|
40
|
-
* @param secretName - Name of the secret
|
|
41
|
-
* @returns Parsed JSON value
|
|
42
|
-
*/
|
|
43
|
-
getJson<T = unknown>(secretName: string): Promise<T>;
|
|
44
|
-
/**
|
|
45
|
-
* Set a secret value.
|
|
46
|
-
*
|
|
47
|
-
* @param secretName - Name of the secret
|
|
48
|
-
* @param value - Secret value (string or object for JSON)
|
|
49
|
-
*/
|
|
50
|
-
set(secretName: string, value: string | object): Promise<void>;
|
|
51
|
-
/**
|
|
52
|
-
* Delete a secret.
|
|
53
|
-
*
|
|
54
|
-
* @param secretName - Name of the secret to delete
|
|
55
|
-
*/
|
|
56
|
-
delete(secretName: string): Promise<void>;
|
|
57
|
-
/**
|
|
58
|
-
* Check if a secret exists.
|
|
59
|
-
*
|
|
60
|
-
* @param secretName - Name of the secret
|
|
61
|
-
* @returns True if the secret exists
|
|
62
|
-
*/
|
|
63
|
-
exists(secretName: string): Promise<boolean>;
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=vault.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../../src/bindings/vault.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,OAAO,EAAgB,MAAM,WAAW,CAAA;AAOtD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,KAAK;IAChB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6B;IACpD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAQ;gBAExB,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM;IAKjD;;;;;OAKG;IACG,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAe9C;;;;;OAKG;IACG,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAK1D;;;;;OAKG;IACG,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBpE;;;;OAIG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAc/C;;;;;OAKG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAWnD"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Worker binding implementation.
|
|
3
|
-
*
|
|
4
|
-
* Provides direct worker-to-worker invocation.
|
|
5
|
-
*/
|
|
6
|
-
import { type Channel } from "nice-grpc";
|
|
7
|
-
import type { WorkerInvokeRequest, WorkerInvokeResponse } from "../types.js";
|
|
8
|
-
/**
|
|
9
|
-
* Worker binding for direct worker invocation.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```typescript
|
|
13
|
-
* import { worker } from "@alienplatform/sdk"
|
|
14
|
-
*
|
|
15
|
-
* const processor = worker("image-processor")
|
|
16
|
-
*
|
|
17
|
-
* // Invoke with JSON body
|
|
18
|
-
* const response = await processor.invokeJson("resize-image", {
|
|
19
|
-
* imageUrl: "https://...",
|
|
20
|
-
* width: 800,
|
|
21
|
-
* height: 600,
|
|
22
|
-
* })
|
|
23
|
-
*
|
|
24
|
-
* // Get worker URL
|
|
25
|
-
* const url = await processor.getUrl()
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
export declare class WorkerBinding {
|
|
29
|
-
private readonly client;
|
|
30
|
-
private readonly bindingName;
|
|
31
|
-
constructor(channel: Channel, bindingName: string);
|
|
32
|
-
/**
|
|
33
|
-
* Invoke a worker with raw request data.
|
|
34
|
-
*
|
|
35
|
-
* @param request - Invocation request
|
|
36
|
-
* @returns Worker response
|
|
37
|
-
*/
|
|
38
|
-
invoke(request: WorkerInvokeRequest): Promise<WorkerInvokeResponse>;
|
|
39
|
-
/**
|
|
40
|
-
* Invoke a worker with a JSON body.
|
|
41
|
-
*
|
|
42
|
-
* @param targetWorker - Target worker identifier
|
|
43
|
-
* @param body - JSON body
|
|
44
|
-
* @param options - Optional request options
|
|
45
|
-
* @returns Parsed JSON response
|
|
46
|
-
*/
|
|
47
|
-
invokeJson<TRequest, TResponse = unknown>(targetWorker: string, body: TRequest, options?: {
|
|
48
|
-
method?: string;
|
|
49
|
-
path?: string;
|
|
50
|
-
headers?: Record<string, string>;
|
|
51
|
-
timeoutMs?: number;
|
|
52
|
-
}): Promise<TResponse>;
|
|
53
|
-
/**
|
|
54
|
-
* Invoke a worker with GET request.
|
|
55
|
-
*
|
|
56
|
-
* @param targetWorker - Target worker identifier
|
|
57
|
-
* @param path - Request path
|
|
58
|
-
* @param options - Optional request options
|
|
59
|
-
* @returns Parsed JSON response
|
|
60
|
-
*/
|
|
61
|
-
get<TResponse = unknown>(targetWorker: string, path?: string, options?: {
|
|
62
|
-
headers?: Record<string, string>;
|
|
63
|
-
timeoutMs?: number;
|
|
64
|
-
}): Promise<TResponse>;
|
|
65
|
-
/**
|
|
66
|
-
* Get the public URL of the worker.
|
|
67
|
-
*
|
|
68
|
-
* @returns Worker URL if available
|
|
69
|
-
*/
|
|
70
|
-
getUrl(): Promise<string | undefined>;
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=worker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/bindings/worker.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,OAAO,EAAgB,MAAM,WAAW,CAAA;AAMtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAE5E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAQ;gBAExB,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM;IAKjD;;;;;OAKG;IACG,MAAM,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAwBzE;;;;;;;OAOG;IACG,UAAU,CAAC,QAAQ,EAAE,SAAS,GAAG,OAAO,EAC5C,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,QAAQ,EACd,OAAO,CAAC,EAAE;QACR,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAChC,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,GACA,OAAO,CAAC,SAAS,CAAC;IAsBrB;;;;;;;OAOG;IACG,GAAG,CAAC,SAAS,GAAG,OAAO,EAC3B,YAAY,EAAE,MAAM,EACpB,IAAI,SAAM,EACV,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAChC,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,GACA,OAAO,CAAC,SAAS,CAAC;IAkBrB;;;;OAIG;IACG,MAAM,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAa5C"}
|
package/dist/channel.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* gRPC channel management for the Alien bindings SDK.
|
|
3
|
-
*/
|
|
4
|
-
import { type Channel } from "nice-grpc";
|
|
5
|
-
/** Re-export the Channel type */
|
|
6
|
-
export type GrpcChannel = Channel;
|
|
7
|
-
/**
|
|
8
|
-
* Get the gRPC endpoint from environment variables.
|
|
9
|
-
*/
|
|
10
|
-
export declare function getGrpcEndpoint(): string;
|
|
11
|
-
/**
|
|
12
|
-
* Create a gRPC channel to the specified address.
|
|
13
|
-
*
|
|
14
|
-
* @param address - The gRPC server address
|
|
15
|
-
* @returns The created channel
|
|
16
|
-
*/
|
|
17
|
-
export declare function createGrpcChannel(address: string): Promise<Channel>;
|
|
18
|
-
/**
|
|
19
|
-
* Get or create a cached gRPC channel to the specified address.
|
|
20
|
-
*
|
|
21
|
-
* @param address - The gRPC server address
|
|
22
|
-
* @returns The cached or newly created channel
|
|
23
|
-
*/
|
|
24
|
-
export declare function getOrCreateChannel(address: string): Promise<Channel>;
|
|
25
|
-
/**
|
|
26
|
-
* Get a gRPC channel to the alien-runtime using the default env var.
|
|
27
|
-
* The channel is cached for reuse across all bindings.
|
|
28
|
-
*/
|
|
29
|
-
export declare function getChannel(): Promise<Channel>;
|
|
30
|
-
/**
|
|
31
|
-
* Close all cached gRPC channels.
|
|
32
|
-
* This should be called when shutting down the application.
|
|
33
|
-
*/
|
|
34
|
-
export declare function closeChannel(): void;
|
|
35
|
-
/**
|
|
36
|
-
* Reset the cached channels (useful for testing).
|
|
37
|
-
*/
|
|
38
|
-
export declare function resetChannel(): void;
|
|
39
|
-
//# sourceMappingURL=channel.d.ts.map
|
package/dist/channel.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,KAAK,OAAO,EAAiB,MAAM,WAAW,CAAA;AAgBvD,iCAAiC;AACjC,MAAM,MAAM,WAAW,GAAG,OAAO,CAAA;AAEjC;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAYxC;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAWzE;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO1E;AAED;;;GAGG;AACH,wBAAsB,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC,CAGnD;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAKnC;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAEnC"}
|