lopata 0.20.0 → 0.20.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/types/bindings/ai-search.d.ts +44 -0
- package/dist/types/bindings/artifacts-git-http.d.ts +19 -0
- package/dist/types/bindings/artifacts.d.ts +108 -0
- package/dist/types/bindings/flagship.d.ts +37 -0
- package/dist/types/bindings/vpc-network.d.ts +22 -0
- package/dist/types/bindings/worker-loader-entry.d.ts +71 -0
- package/dist/types/bindings/worker-loader.d.ts +81 -0
- package/dist/types/config.d.ts +23 -0
- package/dist/types/env.d.ts +3 -1
- package/dist/types/generation-manager.d.ts +6 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/vite-plugin/dev-server-plugin.d.ts +8 -0
- package/dist/types/worker-thread/executor.d.ts +2 -0
- package/dist/types/worker-thread/protocol.d.ts +2 -0
- package/dist/types/worker-thread/thread-env.d.ts +3 -1
- package/package.json +1 -1
- package/src/bindings/ai-search.ts +185 -0
- package/src/bindings/artifacts-git-http.ts +249 -0
- package/src/bindings/artifacts.ts +453 -0
- package/src/bindings/flagship.ts +117 -0
- package/src/bindings/vpc-network.ts +40 -0
- package/src/bindings/worker-loader-entry.ts +143 -0
- package/src/bindings/worker-loader.ts +325 -0
- package/src/cli/dev.ts +25 -3
- package/src/config.ts +20 -0
- package/src/db.ts +54 -0
- package/src/env.ts +71 -0
- package/src/generation-manager.ts +5 -1
- package/src/generation.ts +20 -3
- package/src/vite-plugin/dev-server-plugin.ts +18 -2
- package/src/worker-thread/entry.ts +1 -0
- package/src/worker-thread/executor.ts +3 -0
- package/src/worker-thread/protocol.ts +2 -0
- package/src/worker-thread/thread-env.ts +68 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Database } from 'bun:sqlite';
|
|
2
|
+
interface CreateInstanceOptions {
|
|
3
|
+
id: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
source?: unknown;
|
|
6
|
+
}
|
|
7
|
+
interface SearchOptions {
|
|
8
|
+
messages: {
|
|
9
|
+
role: string;
|
|
10
|
+
content: string;
|
|
11
|
+
}[];
|
|
12
|
+
ai_search_options?: {
|
|
13
|
+
instance_ids?: string[];
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
};
|
|
16
|
+
stream?: boolean;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
export declare class AiSearchInstance {
|
|
20
|
+
private readonly binding;
|
|
21
|
+
readonly id: string;
|
|
22
|
+
readonly metadata: Record<string, unknown>;
|
|
23
|
+
constructor(binding: AiSearchNamespaceBinding, id: string, metadata?: Record<string, unknown>);
|
|
24
|
+
search(options: SearchOptions): Promise<unknown>;
|
|
25
|
+
chatCompletions(options: SearchOptions): Promise<unknown>;
|
|
26
|
+
}
|
|
27
|
+
export declare class AiSearchNamespaceBinding {
|
|
28
|
+
private readonly db;
|
|
29
|
+
private readonly namespace;
|
|
30
|
+
private readonly accountId?;
|
|
31
|
+
private readonly apiToken?;
|
|
32
|
+
constructor(db: Database, namespace: string, accountId?: string, apiToken?: string);
|
|
33
|
+
private ensureCredentials;
|
|
34
|
+
create(opts: CreateInstanceOptions): Promise<AiSearchInstance>;
|
|
35
|
+
get(id: string): Promise<AiSearchInstance>;
|
|
36
|
+
list(opts?: Record<string, string>): Promise<unknown>;
|
|
37
|
+
delete(id: string): Promise<boolean>;
|
|
38
|
+
search(options: SearchOptions): Promise<unknown>;
|
|
39
|
+
chatCompletions(options: SearchOptions): Promise<unknown>;
|
|
40
|
+
/** @internal — called by AiSearchInstance */
|
|
41
|
+
_proxyInstance(method: 'search' | 'chatCompletions', instanceId: string, options: SearchOptions): Promise<unknown>;
|
|
42
|
+
private proxy;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git HTTP protocol handler for the Artifacts binding.
|
|
3
|
+
*
|
|
4
|
+
* Proxies `/__artifacts/git/<repo-id>.git/<path>` requests to the `git http-backend`
|
|
5
|
+
* CGI binary. Authentication is via HTTP Basic (username ignored, password = token
|
|
6
|
+
* from `artifacts_tokens`). Read operations (`git-upload-pack`) accept any non-revoked
|
|
7
|
+
* token; write operations (`git-receive-pack`) require a `write`-scoped token.
|
|
8
|
+
*
|
|
9
|
+
* Repos marked read-only (`read_only = 1`) reject write requests regardless of scope.
|
|
10
|
+
*/
|
|
11
|
+
import type { Database } from 'bun:sqlite';
|
|
12
|
+
export interface ArtifactsGitHandlerOptions {
|
|
13
|
+
db: Database;
|
|
14
|
+
artifactsDir: string;
|
|
15
|
+
gitBinary?: string;
|
|
16
|
+
/** When true (tests), skip token validation. */
|
|
17
|
+
skipAuth?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function handleArtifactsGitRequest(request: Request, opts: ArtifactsGitHandlerOptions): Promise<Response | null>;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { Database } from 'bun:sqlite';
|
|
2
|
+
export type ArtifactsTokenScope = 'read' | 'write';
|
|
3
|
+
export interface CreateRepoOpts {
|
|
4
|
+
readOnly?: boolean;
|
|
5
|
+
description?: string;
|
|
6
|
+
setDefaultBranch?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface CreateRepoResult {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string | null;
|
|
12
|
+
defaultBranch: string;
|
|
13
|
+
remote: string;
|
|
14
|
+
token: string;
|
|
15
|
+
}
|
|
16
|
+
export interface TokenResult {
|
|
17
|
+
id: string;
|
|
18
|
+
plaintext: string;
|
|
19
|
+
scope: ArtifactsTokenScope;
|
|
20
|
+
expiresAt: string | null;
|
|
21
|
+
}
|
|
22
|
+
export interface ListReposOpts {
|
|
23
|
+
limit?: number;
|
|
24
|
+
cursor?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface RepoListResult {
|
|
27
|
+
repos: {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
remote: string;
|
|
31
|
+
defaultBranch: string;
|
|
32
|
+
description: string | null;
|
|
33
|
+
}[];
|
|
34
|
+
cursor: string | null;
|
|
35
|
+
}
|
|
36
|
+
export interface TokenListResult {
|
|
37
|
+
total: number;
|
|
38
|
+
tokens: {
|
|
39
|
+
id: string;
|
|
40
|
+
scope: ArtifactsTokenScope;
|
|
41
|
+
expiresAt: string | null;
|
|
42
|
+
createdAt: string;
|
|
43
|
+
}[];
|
|
44
|
+
}
|
|
45
|
+
export interface ImportParams {
|
|
46
|
+
source: {
|
|
47
|
+
url: string;
|
|
48
|
+
branch?: string;
|
|
49
|
+
depth?: number;
|
|
50
|
+
};
|
|
51
|
+
target: {
|
|
52
|
+
name: string;
|
|
53
|
+
opts?: CreateRepoOpts;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export interface ForkOpts {
|
|
57
|
+
description?: string;
|
|
58
|
+
readOnly?: boolean;
|
|
59
|
+
defaultBranchOnly?: boolean;
|
|
60
|
+
}
|
|
61
|
+
interface RepoRow {
|
|
62
|
+
id: string;
|
|
63
|
+
namespace: string;
|
|
64
|
+
name: string;
|
|
65
|
+
description: string | null;
|
|
66
|
+
default_branch: string;
|
|
67
|
+
read_only: number;
|
|
68
|
+
forked_from: string | null;
|
|
69
|
+
created_at: number;
|
|
70
|
+
}
|
|
71
|
+
export declare class ArtifactsBinding {
|
|
72
|
+
private readonly db;
|
|
73
|
+
private readonly namespace;
|
|
74
|
+
private readonly artifactsDir;
|
|
75
|
+
private readonly remoteBase;
|
|
76
|
+
private readonly gitBinary;
|
|
77
|
+
constructor(db: Database, namespace: string, artifactsDir: string, remoteBase: string, gitBinary?: string);
|
|
78
|
+
private repoDir;
|
|
79
|
+
private buildRemote;
|
|
80
|
+
create(name: string, opts?: CreateRepoOpts): Promise<CreateRepoResult>;
|
|
81
|
+
get(name: string): Promise<ArtifactsRepo>;
|
|
82
|
+
list(opts?: ListReposOpts): Promise<RepoListResult>;
|
|
83
|
+
import(params: ImportParams): Promise<CreateRepoResult>;
|
|
84
|
+
delete(name: string): Promise<boolean>;
|
|
85
|
+
/** @internal — also called by `ArtifactsRepo.fork()` */
|
|
86
|
+
_forkRepo(source: RepoRow, newName: string, opts?: ForkOpts): Promise<CreateRepoResult>;
|
|
87
|
+
/** @internal — called by `ArtifactsRepo.createToken()`, `ArtifactsBinding.create()`. */
|
|
88
|
+
issueToken(repoId: string, scope: ArtifactsTokenScope, ttlSeconds?: number): TokenResult;
|
|
89
|
+
/** @internal */
|
|
90
|
+
listTokens(repoId: string): TokenListResult;
|
|
91
|
+
/** @internal */
|
|
92
|
+
revokeTokenById(repoId: string, tokenOrId: string): boolean;
|
|
93
|
+
}
|
|
94
|
+
export declare class ArtifactsRepo {
|
|
95
|
+
private readonly binding;
|
|
96
|
+
private readonly row;
|
|
97
|
+
readonly remote: string;
|
|
98
|
+
constructor(binding: ArtifactsBinding, row: RepoRow, remote: string);
|
|
99
|
+
get id(): string;
|
|
100
|
+
get name(): string;
|
|
101
|
+
get defaultBranch(): string;
|
|
102
|
+
get description(): string | null;
|
|
103
|
+
createToken(scope?: ArtifactsTokenScope, ttl?: number): Promise<TokenResult>;
|
|
104
|
+
listTokens(): Promise<TokenListResult>;
|
|
105
|
+
revokeToken(tokenOrId: string): Promise<boolean>;
|
|
106
|
+
fork(name: string, opts?: ForkOpts): Promise<CreateRepoResult>;
|
|
107
|
+
}
|
|
108
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Database } from 'bun:sqlite';
|
|
2
|
+
export type FlagType = 'boolean' | 'string' | 'number' | 'object';
|
|
3
|
+
export interface FlagDetails<T> {
|
|
4
|
+
value: T;
|
|
5
|
+
variant?: string;
|
|
6
|
+
reason: 'STATIC' | 'DEFAULT' | 'ERROR' | 'TARGETING_MATCH';
|
|
7
|
+
errorCode?: string;
|
|
8
|
+
}
|
|
9
|
+
type EvaluationContext = Record<string, unknown> | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Local implementation of the Cloudflare Flagship feature-flag binding.
|
|
12
|
+
* Flag values are stored in SQLite (`flagship_flags` table). When a flag is
|
|
13
|
+
* not found, the caller's `defaultValue` is returned with reason `DEFAULT`.
|
|
14
|
+
* Local dev does not implement targeting rules — the `context` argument is
|
|
15
|
+
* accepted for API compatibility but ignored during evaluation.
|
|
16
|
+
*/
|
|
17
|
+
export declare class FlagshipBinding {
|
|
18
|
+
private db;
|
|
19
|
+
private appId;
|
|
20
|
+
constructor(db: Database, appId: string);
|
|
21
|
+
getBooleanValue(key: string, defaultValue: boolean, context?: EvaluationContext): Promise<boolean>;
|
|
22
|
+
getStringValue(key: string, defaultValue: string, context?: EvaluationContext): Promise<string>;
|
|
23
|
+
getNumberValue(key: string, defaultValue: number, context?: EvaluationContext): Promise<number>;
|
|
24
|
+
getObjectValue<T>(key: string, defaultValue: T, context?: EvaluationContext): Promise<T>;
|
|
25
|
+
getBooleanValueDetails(key: string, defaultValue: boolean, _context?: EvaluationContext): Promise<FlagDetails<boolean>>;
|
|
26
|
+
getStringValueDetails(key: string, defaultValue: string, _context?: EvaluationContext): Promise<FlagDetails<string>>;
|
|
27
|
+
getNumberValueDetails(key: string, defaultValue: number, _context?: EvaluationContext): Promise<FlagDetails<number>>;
|
|
28
|
+
getObjectValueDetails<T>(key: string, defaultValue: T, _context?: EvaluationContext): Promise<FlagDetails<T>>;
|
|
29
|
+
private evaluate;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Programmatic helper to seed / override a flag value in the local store.
|
|
33
|
+
* Used by tests and (later) the dashboard.
|
|
34
|
+
*/
|
|
35
|
+
export declare function setFlagValue(db: Database, appId: string, key: string, type: FlagType, value: unknown, variant?: string): void;
|
|
36
|
+
export declare function deleteFlag(db: Database, appId: string, key: string): void;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local implementation of the Cloudflare VPC Networks binding (`vpc_networks`).
|
|
3
|
+
*
|
|
4
|
+
* On Cloudflare, this binding exposes a Fetcher-like `fetch()` method that
|
|
5
|
+
* routes the request through the bound tunnel or Cloudflare Mesh. The URL
|
|
6
|
+
* passed to `fetch()` determines the destination host/port.
|
|
7
|
+
*
|
|
8
|
+
* In local dev there is no tunnel overlay network, so we pass the request
|
|
9
|
+
* straight to the host system's stack — the caller is expected to arrange
|
|
10
|
+
* for the destination to be reachable locally (e.g. a dev service on a
|
|
11
|
+
* known port, or a VPN/WireGuard tunnel on the host).
|
|
12
|
+
*/
|
|
13
|
+
export interface VpcNetworkConfig {
|
|
14
|
+
networkId: string;
|
|
15
|
+
bindingName: string;
|
|
16
|
+
}
|
|
17
|
+
export declare class VpcNetworkBinding {
|
|
18
|
+
private config;
|
|
19
|
+
constructor(config: VpcNetworkConfig);
|
|
20
|
+
get networkId(): string;
|
|
21
|
+
fetch(input: string | URL | Request, init?: RequestInit): Promise<Response>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Worker-thread entry for the `worker_loaders` binding.
|
|
3
|
+
*
|
|
4
|
+
* The main thread spawns this file as a Worker, sends an init message with
|
|
5
|
+
* the path to the dynamically-written main module + a serializable `env`
|
|
6
|
+
* object, then dispatches RPC commands. Each command invokes either the
|
|
7
|
+
* default export's `fetch()` (HTTP), `scheduled()` (cron), or a named method
|
|
8
|
+
* on a named entrypoint class.
|
|
9
|
+
*
|
|
10
|
+
* This is "fuzzy" isolation — the worker thread has its own heap and module
|
|
11
|
+
* graph but shares the same process, so `fetch()` / `connect()` / filesystem
|
|
12
|
+
* access behave identically to the parent.
|
|
13
|
+
*/
|
|
14
|
+
export interface LoaderInitMessage {
|
|
15
|
+
type: 'init';
|
|
16
|
+
mainModulePath: string;
|
|
17
|
+
env: unknown;
|
|
18
|
+
globalOutbound: 'allow' | 'block';
|
|
19
|
+
}
|
|
20
|
+
export type LoaderCommand = {
|
|
21
|
+
type: 'fetch';
|
|
22
|
+
entrypoint?: string;
|
|
23
|
+
url: string;
|
|
24
|
+
method: string;
|
|
25
|
+
headers: [string, string][];
|
|
26
|
+
body: ArrayBuffer | null;
|
|
27
|
+
} | {
|
|
28
|
+
type: 'scheduled';
|
|
29
|
+
entrypoint?: string;
|
|
30
|
+
cron: string;
|
|
31
|
+
scheduledTime: number;
|
|
32
|
+
} | {
|
|
33
|
+
type: 'rpc-call';
|
|
34
|
+
entrypoint?: string;
|
|
35
|
+
method: string;
|
|
36
|
+
args: unknown[];
|
|
37
|
+
};
|
|
38
|
+
export type LoaderResult = {
|
|
39
|
+
type: 'fetch';
|
|
40
|
+
status: number;
|
|
41
|
+
statusText: string;
|
|
42
|
+
headers: [string, string][];
|
|
43
|
+
body: ArrayBuffer | null;
|
|
44
|
+
} | {
|
|
45
|
+
type: 'scheduled';
|
|
46
|
+
} | {
|
|
47
|
+
type: 'rpc-call';
|
|
48
|
+
value: unknown;
|
|
49
|
+
} | {
|
|
50
|
+
type: 'error';
|
|
51
|
+
message: string;
|
|
52
|
+
stack?: string;
|
|
53
|
+
name?: string;
|
|
54
|
+
};
|
|
55
|
+
export type MainToWorker = {
|
|
56
|
+
type: 'init';
|
|
57
|
+
data: LoaderInitMessage;
|
|
58
|
+
} | {
|
|
59
|
+
type: 'command';
|
|
60
|
+
id: number;
|
|
61
|
+
command: LoaderCommand;
|
|
62
|
+
};
|
|
63
|
+
export type WorkerToMain = {
|
|
64
|
+
type: 'need-init';
|
|
65
|
+
} | {
|
|
66
|
+
type: 'ready';
|
|
67
|
+
} | {
|
|
68
|
+
type: 'result';
|
|
69
|
+
id: number;
|
|
70
|
+
result: LoaderResult;
|
|
71
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local implementation of the Cloudflare `worker_loaders` binding.
|
|
3
|
+
*
|
|
4
|
+
* Exposes `env.LOADER.load(code)` / `env.LOADER.get(id, callback)`. Each load
|
|
5
|
+
* spawns a Bun Worker thread (see `worker-loader-entry.ts`) that runs the
|
|
6
|
+
* supplied code with its own module graph. Isolation is "fuzzy" — worker
|
|
7
|
+
* threads share the process with the parent but have separate heaps.
|
|
8
|
+
*
|
|
9
|
+
* Modules are written to `.lopata/worker-loader/<stub-id>/` before the Worker
|
|
10
|
+
* imports the entry point. This keeps the implementation simple at the cost
|
|
11
|
+
* of not supporting languages Bun can't execute directly (CF's `py`, Rust,
|
|
12
|
+
* etc. are rejected in v1).
|
|
13
|
+
*/
|
|
14
|
+
export type WorkerCodeModule = string | {
|
|
15
|
+
js: string;
|
|
16
|
+
} | {
|
|
17
|
+
cjs: string;
|
|
18
|
+
} | {
|
|
19
|
+
text: string;
|
|
20
|
+
} | {
|
|
21
|
+
data: ArrayBuffer;
|
|
22
|
+
} | {
|
|
23
|
+
json: unknown;
|
|
24
|
+
};
|
|
25
|
+
export interface WorkerCode {
|
|
26
|
+
compatibilityDate: string;
|
|
27
|
+
compatibilityFlags?: string[];
|
|
28
|
+
mainModule: string;
|
|
29
|
+
modules: Record<string, WorkerCodeModule>;
|
|
30
|
+
env?: Record<string, unknown>;
|
|
31
|
+
globalOutbound?: unknown | null;
|
|
32
|
+
allowExperimental?: boolean;
|
|
33
|
+
tails?: unknown[];
|
|
34
|
+
limits?: {
|
|
35
|
+
cpuMs?: number;
|
|
36
|
+
subRequests?: number;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
type CodeSource = WorkerCode | (() => WorkerCode | Promise<WorkerCode>);
|
|
40
|
+
export declare class WorkerStub {
|
|
41
|
+
private readonly id;
|
|
42
|
+
private readonly codeSource;
|
|
43
|
+
private _resolvedCode;
|
|
44
|
+
private readonly workDir;
|
|
45
|
+
private _worker;
|
|
46
|
+
private _ready;
|
|
47
|
+
private _pending;
|
|
48
|
+
private _nextCmdId;
|
|
49
|
+
private _disposed;
|
|
50
|
+
private _disposeTimer;
|
|
51
|
+
constructor(id: string, code: CodeSource, baseDir: string);
|
|
52
|
+
private _resolveCode;
|
|
53
|
+
private _ensureReady;
|
|
54
|
+
private _boot;
|
|
55
|
+
private _send;
|
|
56
|
+
getEntrypoint(name?: string): EntrypointProxy;
|
|
57
|
+
/** @internal */
|
|
58
|
+
_fetch(entrypoint: string | undefined, request: Request): Promise<Response>;
|
|
59
|
+
/** @internal */
|
|
60
|
+
_scheduled(entrypoint: string | undefined, cron: string, scheduledTime: number): Promise<void>;
|
|
61
|
+
/** @internal */
|
|
62
|
+
_rpcCall(entrypoint: string | undefined, method: string, args: unknown[]): Promise<unknown>;
|
|
63
|
+
dispose(): void;
|
|
64
|
+
}
|
|
65
|
+
export interface EntrypointProxy {
|
|
66
|
+
fetch(request: Request | string | URL, init?: RequestInit): Promise<Response>;
|
|
67
|
+
scheduled(event: {
|
|
68
|
+
cron: string;
|
|
69
|
+
scheduledTime?: number;
|
|
70
|
+
}): Promise<void>;
|
|
71
|
+
[method: string]: unknown;
|
|
72
|
+
}
|
|
73
|
+
export declare class WorkerLoaderBinding {
|
|
74
|
+
private readonly baseDir;
|
|
75
|
+
private readonly cache;
|
|
76
|
+
constructor(baseDir: string);
|
|
77
|
+
load(code: WorkerCode): WorkerStub;
|
|
78
|
+
get(id: string, getCodeCallback: () => Promise<WorkerCode> | WorkerCode): WorkerStub;
|
|
79
|
+
disposeAll(): void;
|
|
80
|
+
}
|
|
81
|
+
export {};
|
package/dist/types/config.d.ts
CHANGED
|
@@ -50,15 +50,34 @@ export interface WranglerConfig {
|
|
|
50
50
|
name: string;
|
|
51
51
|
destination_address?: string;
|
|
52
52
|
allowed_destination_addresses?: string[];
|
|
53
|
+
remote?: boolean;
|
|
53
54
|
}[];
|
|
54
55
|
ai?: {
|
|
55
56
|
binding: string;
|
|
56
57
|
};
|
|
58
|
+
ai_search_namespaces?: {
|
|
59
|
+
binding: string;
|
|
60
|
+
namespace: string;
|
|
61
|
+
remote?: boolean;
|
|
62
|
+
}[];
|
|
63
|
+
artifacts?: {
|
|
64
|
+
binding: string;
|
|
65
|
+
namespace: string;
|
|
66
|
+
}[];
|
|
67
|
+
worker_loaders?: {
|
|
68
|
+
binding: string;
|
|
69
|
+
}[];
|
|
57
70
|
hyperdrive?: {
|
|
58
71
|
binding: string;
|
|
59
72
|
id: string;
|
|
60
73
|
localConnectionString?: string;
|
|
61
74
|
}[];
|
|
75
|
+
vpc_networks?: {
|
|
76
|
+
binding: string;
|
|
77
|
+
network_id?: string;
|
|
78
|
+
tunnel_id?: string;
|
|
79
|
+
remote?: boolean;
|
|
80
|
+
}[];
|
|
62
81
|
services?: {
|
|
63
82
|
binding: string;
|
|
64
83
|
service: string;
|
|
@@ -104,6 +123,10 @@ export interface WranglerConfig {
|
|
|
104
123
|
version_metadata?: {
|
|
105
124
|
binding: string;
|
|
106
125
|
};
|
|
126
|
+
flagship?: {
|
|
127
|
+
binding: string;
|
|
128
|
+
app_id: string;
|
|
129
|
+
};
|
|
107
130
|
migrations?: {
|
|
108
131
|
tag: string;
|
|
109
132
|
new_classes?: string[];
|
package/dist/types/env.d.ts
CHANGED
|
@@ -52,7 +52,9 @@ export declare function buildEnv(config: WranglerConfig, devVarsDir?: string, ex
|
|
|
52
52
|
wsEndpoint?: string;
|
|
53
53
|
executablePath?: string;
|
|
54
54
|
headless?: boolean;
|
|
55
|
-
}, existingNamespaces?: Map<string, DurableObjectNamespaceImpl
|
|
55
|
+
}, existingNamespaces?: Map<string, DurableObjectNamespaceImpl>, baseUrls?: {
|
|
56
|
+
artifacts?: string;
|
|
57
|
+
}): {
|
|
56
58
|
env: Record<string, unknown>;
|
|
57
59
|
registry: ClassRegistry;
|
|
58
60
|
};
|
|
@@ -35,6 +35,9 @@ export declare class GenerationManager {
|
|
|
35
35
|
executablePath?: string;
|
|
36
36
|
headless?: boolean;
|
|
37
37
|
} | undefined;
|
|
38
|
+
readonly baseUrls: {
|
|
39
|
+
artifacts?: string;
|
|
40
|
+
} | undefined;
|
|
38
41
|
/** @internal Path to the wrangler config file (DO worker threads re-load it). */
|
|
39
42
|
_configPath: string;
|
|
40
43
|
constructor(config: WranglerConfig, baseDir: string, options?: {
|
|
@@ -49,6 +52,9 @@ export declare class GenerationManager {
|
|
|
49
52
|
executablePath?: string;
|
|
50
53
|
headless?: boolean;
|
|
51
54
|
};
|
|
55
|
+
baseUrls?: {
|
|
56
|
+
artifacts?: string;
|
|
57
|
+
};
|
|
52
58
|
});
|
|
53
59
|
/** The currently active generation (receives new requests) */
|
|
54
60
|
get active(): Generation | null;
|