wrangler 4.104.0 → 4.106.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/package.json +11 -11
- package/wrangler-dist/cli.d.ts +108 -4
- package/wrangler-dist/cli.js +4971 -2736
- package/wrangler-dist/metafile-cjs.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wrangler",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.106.0",
|
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"assembly",
|
|
@@ -66,16 +66,16 @@
|
|
|
66
66
|
"esbuild": "0.28.1",
|
|
67
67
|
"path-to-regexp": "6.3.0",
|
|
68
68
|
"unenv": "2.0.0-rc.24",
|
|
69
|
-
"workerd": "1.
|
|
69
|
+
"workerd": "1.20260630.1",
|
|
70
70
|
"@cloudflare/kv-asset-handler": "0.5.0",
|
|
71
71
|
"@cloudflare/unenv-preset": "2.16.1",
|
|
72
|
-
"miniflare": "4.
|
|
72
|
+
"miniflare": "4.20260630.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@aws-sdk/client-s3": "^3.721.0",
|
|
76
76
|
"@bomb.sh/tab": "^0.0.12",
|
|
77
77
|
"@cloudflare/types": "6.18.4",
|
|
78
|
-
"@cloudflare/workers-types": "^4.
|
|
78
|
+
"@cloudflare/workers-types": "^4.20260630.1",
|
|
79
79
|
"@cspotcode/source-map-support": "0.8.1",
|
|
80
80
|
"@netlify/build-info": "^10.5.1",
|
|
81
81
|
"@sentry/node": "^7.86.0",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"@types/yargs": "^17.0.22",
|
|
99
99
|
"@vitest/ui": "4.1.0",
|
|
100
100
|
"@webcontainer/env": "^1.1.0",
|
|
101
|
-
"am-i-vibing": "^0.
|
|
101
|
+
"am-i-vibing": "^0.5.0",
|
|
102
102
|
"capnweb": "0.5.0",
|
|
103
103
|
"chalk": "5.3.0",
|
|
104
104
|
"chokidar": "^4.0.1",
|
|
@@ -157,20 +157,20 @@
|
|
|
157
157
|
"yargs": "^17.7.2",
|
|
158
158
|
"zod": "^4.4.3",
|
|
159
159
|
"@cloudflare/autoconfig": "0.1.1",
|
|
160
|
+
"@cloudflare/cli-shared-helpers": "0.1.10",
|
|
160
161
|
"@cloudflare/codemod": "1.1.0",
|
|
161
162
|
"@cloudflare/config": "0.0.0",
|
|
162
|
-
"@cloudflare/
|
|
163
|
-
"@cloudflare/
|
|
164
|
-
"@cloudflare/pages-shared": "^0.13.
|
|
165
|
-
"@cloudflare/deploy-helpers": "0.2.3",
|
|
163
|
+
"@cloudflare/containers-shared": "0.16.0",
|
|
164
|
+
"@cloudflare/deploy-helpers": "0.2.5",
|
|
165
|
+
"@cloudflare/pages-shared": "^0.13.151",
|
|
166
166
|
"@cloudflare/workers-auth": "0.3.2",
|
|
167
167
|
"@cloudflare/workers-shared": "0.19.7",
|
|
168
|
-
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
169
168
|
"@cloudflare/workers-utils": "0.24.0",
|
|
169
|
+
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
170
170
|
"@cloudflare/workflows-shared": "0.11.2"
|
|
171
171
|
},
|
|
172
172
|
"peerDependencies": {
|
|
173
|
-
"@cloudflare/workers-types": "^4.
|
|
173
|
+
"@cloudflare/workers-types": "^4.20260630.1"
|
|
174
174
|
},
|
|
175
175
|
"peerDependenciesMeta": {
|
|
176
176
|
"@cloudflare/workers-types": {
|
package/wrangler-dist/cli.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Rule as Rule$1, CfModule, Environment as Environment$1, Entry, CfModuleType, StartDevWorkerInput,
|
|
1
|
+
import { Rule as Rule$1, CfModule, Environment as Environment$1, Entry, CfModuleType, StartDevWorkerInput, Config as Config$1, NodeJSCompatMode, CfScriptFormat, AsyncHook, CfAccount as CfAccount$1, AssetsOptions as AssetsOptions$1, Binding, ConfigBindingFieldName, RawConfig as RawConfig$1, NormalizeAndValidateConfigArgs, ResolveConfigPathOptions, ApiCredentials, ParseError, LoggerLevel, ComplianceConfig, UserError, FatalError } from '@cloudflare/workers-utils';
|
|
2
2
|
export { Binding, experimental_patchConfig, experimental_readRawConfig, defaultWranglerConfig as unstable_defaultWranglerConfig } from '@cloudflare/workers-utils';
|
|
3
3
|
import { Json as Json$1, WorkerdStructuredLog, DispatchFetch, Miniflare, WorkerRegistry, MiniflareOptions, Mutex, Response as Response$1, RemoteProxyConnectionString, WorkerOptions, ModuleRule, Request } from 'miniflare';
|
|
4
4
|
import * as undici from 'undici';
|
|
@@ -8,6 +8,7 @@ import Protocol from 'devtools-protocol/types/protocol-mapping';
|
|
|
8
8
|
import { EventEmitter } from 'node:events';
|
|
9
9
|
import { ContainerNormalizedConfig } from '@cloudflare/containers-shared';
|
|
10
10
|
import { FetcherScheduledOptions, FetcherScheduledResult, IncomingRequestCfProperties } from '@cloudflare/workers-types/experimental';
|
|
11
|
+
import { Rpc, ExportedHandler, D1Database, Workflow, Service } from '@cloudflare/workers-types/latest';
|
|
11
12
|
import { RouterConfig, AssetConfig } from '@cloudflare/workers-shared';
|
|
12
13
|
export { printBindings as unstable_printBindings } from '@cloudflare/deploy-helpers';
|
|
13
14
|
import { URLSearchParams } from 'node:url';
|
|
@@ -335,6 +336,7 @@ type EsbuildBundle = {
|
|
|
335
336
|
declare class ConfigController extends Controller {
|
|
336
337
|
#private;
|
|
337
338
|
latestInput?: StartDevWorkerInput;
|
|
339
|
+
latestWranglerConfig?: Config$1;
|
|
338
340
|
latestConfig?: StartDevWorkerOptions;
|
|
339
341
|
set(input: StartDevWorkerInput, throwErrors?: boolean): Promise<StartDevWorkerOptions | undefined>;
|
|
340
342
|
patch(input: Partial<StartDevWorkerInput>): Promise<StartDevWorkerOptions | undefined>;
|
|
@@ -613,6 +615,7 @@ declare const dev: {
|
|
|
613
615
|
experimentalProvision: boolean | undefined;
|
|
614
616
|
experimentalAutoCreate: boolean;
|
|
615
617
|
installSkills: boolean;
|
|
618
|
+
profile: string | undefined;
|
|
616
619
|
script: string | undefined;
|
|
617
620
|
name: string | undefined;
|
|
618
621
|
compatibilityDate: string | undefined;
|
|
@@ -711,7 +714,7 @@ type AdditionalDevProps = {
|
|
|
711
714
|
rules?: Rule$1[];
|
|
712
715
|
showInteractiveDevSession?: boolean;
|
|
713
716
|
};
|
|
714
|
-
type DevArguments = Omit<(typeof dev)["args"], "installSkills">;
|
|
717
|
+
type DevArguments = Omit<(typeof dev)["args"], "installSkills" | "profile">;
|
|
715
718
|
type StartDevOptions = DevArguments & AdditionalDevProps & {
|
|
716
719
|
forceLocal?: boolean;
|
|
717
720
|
accountId?: string;
|
|
@@ -727,6 +730,42 @@ type StartDevOptions = DevArguments & AdditionalDevProps & {
|
|
|
727
730
|
|
|
728
731
|
declare function convertConfigBindingsToStartWorkerBindings(configBindings: Partial<Pick<Config$1, ConfigBindingFieldName>>): StartDevWorkerOptions["bindings"];
|
|
729
732
|
|
|
733
|
+
type WorkflowStepSelector = {
|
|
734
|
+
name: string;
|
|
735
|
+
index?: number;
|
|
736
|
+
};
|
|
737
|
+
type WorkflowInstanceModifier = {
|
|
738
|
+
disableSleeps(steps?: WorkflowStepSelector[]): Promise<void>;
|
|
739
|
+
disableRetryDelays(steps?: WorkflowStepSelector[]): Promise<void>;
|
|
740
|
+
mockStepResult(step: WorkflowStepSelector, stepResult: unknown): Promise<void>;
|
|
741
|
+
mockStepError(step: WorkflowStepSelector, error: Error, times?: number): Promise<void>;
|
|
742
|
+
forceStepTimeout(step: WorkflowStepSelector, times?: number): Promise<void>;
|
|
743
|
+
mockEvent(event: {
|
|
744
|
+
type: string;
|
|
745
|
+
payload: unknown;
|
|
746
|
+
}): Promise<void>;
|
|
747
|
+
forceEventTimeout(step: WorkflowStepSelector): Promise<void>;
|
|
748
|
+
};
|
|
749
|
+
type ModifierCallback = (modifier: WorkflowInstanceModifier) => Promise<void>;
|
|
750
|
+
interface WorkflowInstanceIntrospector {
|
|
751
|
+
modify(fn: ModifierCallback): Promise<WorkflowInstanceIntrospector>;
|
|
752
|
+
waitForStepResult(step: WorkflowStepSelector): Promise<unknown>;
|
|
753
|
+
waitForStatus(status: string): Promise<void>;
|
|
754
|
+
getOutput(): Promise<unknown>;
|
|
755
|
+
getError(): Promise<{
|
|
756
|
+
name: string;
|
|
757
|
+
message: string;
|
|
758
|
+
}>;
|
|
759
|
+
dispose(): Promise<void>;
|
|
760
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
761
|
+
}
|
|
762
|
+
interface WorkflowIntrospector {
|
|
763
|
+
modifyAll(fn: ModifierCallback): Promise<void>;
|
|
764
|
+
get(): Promise<WorkflowInstanceIntrospector[]>;
|
|
765
|
+
dispose(): Promise<void>;
|
|
766
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
767
|
+
}
|
|
768
|
+
|
|
730
769
|
type TestHarnessOptions = {
|
|
731
770
|
/**
|
|
732
771
|
* Base directory used to resolve relative worker config paths.
|
|
@@ -738,7 +777,19 @@ type TestHarnessOptions = {
|
|
|
738
777
|
*/
|
|
739
778
|
workers: WorkerInput[];
|
|
740
779
|
};
|
|
741
|
-
type
|
|
780
|
+
type BindingName<Env, Type> = string extends keyof Env ? string : Extract<{
|
|
781
|
+
[K in keyof Env]-?: NonNullable<Env[K]> extends Type ? K : never;
|
|
782
|
+
}[keyof Env], string>;
|
|
783
|
+
type WorkerModule = {
|
|
784
|
+
default: WorkerExport;
|
|
785
|
+
[key: string]: WorkerExport | undefined;
|
|
786
|
+
};
|
|
787
|
+
type AnyExportedHandler = ExportedHandler<any, any, any, any>;
|
|
788
|
+
type AnyEnv = Record<string, any>;
|
|
789
|
+
type WorkerExport = (new (...args: any[]) => Rpc.WorkerEntrypointBranded) | Rpc.WorkerEntrypointBranded | AnyExportedHandler;
|
|
790
|
+
type WorkerHandle<Env = AnyEnv, Module extends WorkerModule = {
|
|
791
|
+
default: AnyExportedHandler;
|
|
792
|
+
}> = {
|
|
742
793
|
/**
|
|
743
794
|
* Dispatches a fetch event directly to this worker.
|
|
744
795
|
* Relative URL inputs are resolved against the URL returned by `listen()`.
|
|
@@ -777,6 +828,38 @@ type WorkerHandle<Env = Record<string, any>> = {
|
|
|
777
828
|
* ```
|
|
778
829
|
*/
|
|
779
830
|
getEnv(): Promise<Env>;
|
|
831
|
+
/**
|
|
832
|
+
* Applies D1 migration files that have not already run to a D1 binding on this Worker.
|
|
833
|
+
*
|
|
834
|
+
* @example
|
|
835
|
+
* ```ts
|
|
836
|
+
* beforeEach(async () => {
|
|
837
|
+
* await worker.applyD1Migrations("DATABASE");
|
|
838
|
+
* });
|
|
839
|
+
* ```
|
|
840
|
+
*/
|
|
841
|
+
applyD1Migrations(bindingName: BindingName<Env, D1Database>): Promise<void>;
|
|
842
|
+
/**
|
|
843
|
+
* Creates an introspector for a specific Workflow instance.
|
|
844
|
+
*/
|
|
845
|
+
introspectWorkflowInstance(bindingName: BindingName<Env, Workflow>, instanceId: string): Promise<WorkflowInstanceIntrospector>;
|
|
846
|
+
/**
|
|
847
|
+
* Creates an introspector for Workflow instances created after this method is called.
|
|
848
|
+
*/
|
|
849
|
+
introspectWorkflow(bindingName: BindingName<Env, Workflow>): Promise<WorkflowIntrospector>;
|
|
850
|
+
/**
|
|
851
|
+
* Returns the default Worker export, including JSRPC methods.
|
|
852
|
+
*
|
|
853
|
+
* @example
|
|
854
|
+
* ```ts
|
|
855
|
+
* type ApiWorkerModule = typeof import("../src/api-worker");
|
|
856
|
+
*
|
|
857
|
+
* const worker = server.getWorker<Cloudflare.Env, ApiWorkerModule>("api-worker");
|
|
858
|
+
* const api = await worker.getExport();
|
|
859
|
+
* api.getMessage();
|
|
860
|
+
* ```
|
|
861
|
+
*/
|
|
862
|
+
getExport(): Promise<Service<Module["default"]>>;
|
|
780
863
|
};
|
|
781
864
|
type TestHarness = {
|
|
782
865
|
/**
|
|
@@ -825,7 +908,9 @@ type TestHarness = {
|
|
|
825
908
|
* When no name is provided, this returns the primary Worker, which is the first
|
|
826
909
|
* Worker in the server's `workers` options.
|
|
827
910
|
*/
|
|
828
|
-
getWorker<Env =
|
|
911
|
+
getWorker<Env = AnyEnv, Module extends WorkerModule = {
|
|
912
|
+
default: AnyExportedHandler;
|
|
913
|
+
}>(name?: string): WorkerHandle<Env, Module>;
|
|
829
914
|
/**
|
|
830
915
|
* Returns captured Workers runtime logs since the current server session
|
|
831
916
|
* started or `clearLogs()` was last called.
|
|
@@ -879,6 +964,11 @@ type WorkerInput = {
|
|
|
879
964
|
* Test-only secrets that override values loaded from `.dev.vars` and `.env` files.
|
|
880
965
|
*/
|
|
881
966
|
secrets?: Record<string, string>;
|
|
967
|
+
/**
|
|
968
|
+
* Test-only service binding overrides. Keys are binding names in this
|
|
969
|
+
* Worker's environment, and values are Worker names in this test harness.
|
|
970
|
+
*/
|
|
971
|
+
bindingOverrides?: Record<string, string>;
|
|
882
972
|
} | {
|
|
883
973
|
/**
|
|
884
974
|
* Inline Wrangler config for this Worker.
|
|
@@ -3141,6 +3231,7 @@ interface CommonYargsOptions {
|
|
|
3141
3231
|
"experimental-provision": boolean | undefined;
|
|
3142
3232
|
"experimental-auto-create": boolean;
|
|
3143
3233
|
"install-skills": boolean;
|
|
3234
|
+
profile: string | undefined;
|
|
3144
3235
|
}
|
|
3145
3236
|
type CommonYargsArgv = Argv<CommonYargsOptions>;
|
|
3146
3237
|
type RemoveIndex<T> = {
|
|
@@ -3340,6 +3431,14 @@ type CommandDefinition<NamedArgDefs extends NamedArgDefinitions = NamedArgDefini
|
|
|
3340
3431
|
* @default false
|
|
3341
3432
|
*/
|
|
3342
3433
|
supportTemporary?: boolean;
|
|
3434
|
+
/**
|
|
3435
|
+
* By default, the banner will print "Active profile: <name>" when a non-default
|
|
3436
|
+
* profile is resolved. Set to `false` to suppress this line while still printing
|
|
3437
|
+
* the rest of the banner.
|
|
3438
|
+
*
|
|
3439
|
+
* @default true
|
|
3440
|
+
*/
|
|
3441
|
+
printActiveProfile?: boolean;
|
|
3343
3442
|
};
|
|
3344
3443
|
/**
|
|
3345
3444
|
* A plain key-value object describing the CLI args for this command.
|
|
@@ -3509,6 +3608,11 @@ declare function createCLIParser(argv: string[]): {
|
|
|
3509
3608
|
readonly type: "boolean";
|
|
3510
3609
|
readonly default: false;
|
|
3511
3610
|
};
|
|
3611
|
+
readonly profile: {
|
|
3612
|
+
readonly describe: "Use a specific auth profile";
|
|
3613
|
+
readonly type: "string";
|
|
3614
|
+
readonly requiresArg: true;
|
|
3615
|
+
};
|
|
3512
3616
|
};
|
|
3513
3617
|
showHelpWithCategories: () => Promise<void>;
|
|
3514
3618
|
};
|