wrangler 4.102.0 → 4.104.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 +13 -12
- package/wrangler-dist/cli.d.ts +11 -199
- package/wrangler-dist/cli.js +53649 -45897
- 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.104.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.20260623.1",
|
|
70
70
|
"@cloudflare/kv-asset-handler": "0.5.0",
|
|
71
|
-
"
|
|
72
|
-
"
|
|
71
|
+
"@cloudflare/unenv-preset": "2.16.1",
|
|
72
|
+
"miniflare": "4.20260623.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.20260623.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",
|
|
@@ -156,20 +156,21 @@
|
|
|
156
156
|
"yaml": "^2.8.1",
|
|
157
157
|
"yargs": "^17.7.2",
|
|
158
158
|
"zod": "^4.4.3",
|
|
159
|
-
"@cloudflare/
|
|
159
|
+
"@cloudflare/autoconfig": "0.1.1",
|
|
160
160
|
"@cloudflare/codemod": "1.1.0",
|
|
161
|
-
"@cloudflare/containers-shared": "0.15.1",
|
|
162
161
|
"@cloudflare/config": "0.0.0",
|
|
163
|
-
"@cloudflare/
|
|
164
|
-
"@cloudflare/
|
|
165
|
-
"@cloudflare/
|
|
162
|
+
"@cloudflare/cli-shared-helpers": "0.1.10",
|
|
163
|
+
"@cloudflare/containers-shared": "0.15.1",
|
|
164
|
+
"@cloudflare/pages-shared": "^0.13.149",
|
|
165
|
+
"@cloudflare/deploy-helpers": "0.2.3",
|
|
166
|
+
"@cloudflare/workers-auth": "0.3.2",
|
|
166
167
|
"@cloudflare/workers-shared": "0.19.7",
|
|
167
168
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
168
|
-
"@cloudflare/workers-utils": "0.
|
|
169
|
+
"@cloudflare/workers-utils": "0.24.0",
|
|
169
170
|
"@cloudflare/workflows-shared": "0.11.2"
|
|
170
171
|
},
|
|
171
172
|
"peerDependencies": {
|
|
172
|
-
"@cloudflare/workers-types": "^4.
|
|
173
|
+
"@cloudflare/workers-types": "^4.20260623.1"
|
|
173
174
|
},
|
|
174
175
|
"peerDependenciesMeta": {
|
|
175
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, NodeJSCompatMode, CfScriptFormat, Config as Config$1, AsyncHook, CfAccount as CfAccount$1, AssetsOptions as AssetsOptions$1, Binding, ConfigBindingFieldName, RawConfig as RawConfig$1, NormalizeAndValidateConfigArgs, ResolveConfigPathOptions,
|
|
1
|
+
import { Rule as Rule$1, CfModule, Environment as Environment$1, Entry, CfModuleType, StartDevWorkerInput, NodeJSCompatMode, CfScriptFormat, Config as Config$1, 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';
|
|
@@ -738,7 +738,7 @@ type TestHarnessOptions = {
|
|
|
738
738
|
*/
|
|
739
739
|
workers: WorkerInput[];
|
|
740
740
|
};
|
|
741
|
-
type WorkerHandle = {
|
|
741
|
+
type WorkerHandle<Env = Record<string, any>> = {
|
|
742
742
|
/**
|
|
743
743
|
* Dispatches a fetch event directly to this worker.
|
|
744
744
|
* Relative URL inputs are resolved against the URL returned by `listen()`.
|
|
@@ -765,46 +765,18 @@ type WorkerHandle = {
|
|
|
765
765
|
*/
|
|
766
766
|
scheduled(options: FetcherScheduledOptions): Promise<FetcherScheduledResult>;
|
|
767
767
|
/**
|
|
768
|
-
* Returns
|
|
768
|
+
* Returns the full environment object configured on this Worker, including
|
|
769
|
+
* vars, secrets, and bindings.
|
|
769
770
|
*
|
|
770
771
|
* @example
|
|
771
772
|
* ```ts
|
|
772
|
-
*
|
|
773
|
-
* const
|
|
773
|
+
* type Env = { GREETING: string; STORE: KVNamespace };
|
|
774
|
+
* const worker = server.getWorker<Env>();
|
|
775
|
+
* const env = await worker.getEnv();
|
|
776
|
+
* await env.STORE.put("key", env.GREETING);
|
|
774
777
|
* ```
|
|
775
778
|
*/
|
|
776
|
-
|
|
777
|
-
/**
|
|
778
|
-
* Returns an R2 bucket binding configured on this Worker.
|
|
779
|
-
*
|
|
780
|
-
* @example
|
|
781
|
-
* ```ts
|
|
782
|
-
* const bucket = await worker.getR2Bucket("BUCKET");
|
|
783
|
-
* const object = await bucket.get("key");
|
|
784
|
-
* ```
|
|
785
|
-
*/
|
|
786
|
-
getR2Bucket(bindingName: string): ReturnType<Miniflare["getR2Bucket"]>;
|
|
787
|
-
/**
|
|
788
|
-
* Returns a D1 database binding configured on this Worker.
|
|
789
|
-
*
|
|
790
|
-
* @example
|
|
791
|
-
* ```ts
|
|
792
|
-
* const db = await worker.getD1Database("DB");
|
|
793
|
-
* const value = await db.prepare("SELECT value FROM entries").first("value");
|
|
794
|
-
* ```
|
|
795
|
-
*/
|
|
796
|
-
getD1Database(bindingName: string): ReturnType<Miniflare["getD1Database"]>;
|
|
797
|
-
/**
|
|
798
|
-
* Returns a Durable Object namespace binding configured on this Worker.
|
|
799
|
-
*
|
|
800
|
-
* @example
|
|
801
|
-
* ```ts
|
|
802
|
-
* const namespace = await worker.getDurableObjectNamespace("OBJECT");
|
|
803
|
-
* const stub = namespace.getByName("counter");
|
|
804
|
-
* const response = await stub.fetch("http://example.com/");
|
|
805
|
-
* ```
|
|
806
|
-
*/
|
|
807
|
-
getDurableObjectNamespace(bindingName: string): ReturnType<Miniflare["getDurableObjectNamespace"]>;
|
|
779
|
+
getEnv(): Promise<Env>;
|
|
808
780
|
};
|
|
809
781
|
type TestHarness = {
|
|
810
782
|
/**
|
|
@@ -853,7 +825,7 @@ type TestHarness = {
|
|
|
853
825
|
* When no name is provided, this returns the primary Worker, which is the first
|
|
854
826
|
* Worker in the server's `workers` options.
|
|
855
827
|
*/
|
|
856
|
-
getWorker(name?: string): WorkerHandle
|
|
828
|
+
getWorker<Env = Record<string, any>>(name?: string): WorkerHandle<Env>;
|
|
857
829
|
/**
|
|
858
830
|
* Returns captured Workers runtime logs since the current server session
|
|
859
831
|
* started or `clearLogs()` was last called.
|
|
@@ -2848,164 +2820,6 @@ type VarBinding = Extract<Binding, {
|
|
|
2848
2820
|
*/
|
|
2849
2821
|
declare function getVarsForDev(configPath: string | undefined, envFiles: string[] | undefined, vars: Config$1["vars"], env: string | undefined, silent?: boolean, secrets?: Config$1["secrets"]): Record<string, VarBinding>;
|
|
2850
2822
|
|
|
2851
|
-
interface PackageManager {
|
|
2852
|
-
type: "npm" | "yarn" | "pnpm" | "bun";
|
|
2853
|
-
npx: string;
|
|
2854
|
-
dlx: string[];
|
|
2855
|
-
lockFiles: string[];
|
|
2856
|
-
}
|
|
2857
|
-
|
|
2858
|
-
/** Makes a subset of properties in a type optional
|
|
2859
|
-
*
|
|
2860
|
-
* @example
|
|
2861
|
-
* - type A = { s: string, b: boolean, n: number }
|
|
2862
|
-
* - Optional<A, 'b'|'n'> = { s: string, b?: boolean, n?: number }
|
|
2863
|
-
*/
|
|
2864
|
-
type Optional<T, K extends keyof T> = Omit<T, K> & Pick<Partial<T>, K>;
|
|
2865
|
-
|
|
2866
|
-
type FrameworkInfo = {
|
|
2867
|
-
id: string;
|
|
2868
|
-
name: string;
|
|
2869
|
-
} & ({
|
|
2870
|
-
supported: false;
|
|
2871
|
-
} | {
|
|
2872
|
-
supported: true;
|
|
2873
|
-
class: typeof Framework;
|
|
2874
|
-
frameworkPackageInfo: AutoConfigFrameworkPackageInfo;
|
|
2875
|
-
});
|
|
2876
|
-
/**
|
|
2877
|
-
* AutoConfig information for a package that defines a framework.
|
|
2878
|
-
*/
|
|
2879
|
-
type AutoConfigFrameworkPackageInfo = {
|
|
2880
|
-
/** The package name (e.g. "astro" for the Astro framework and "@solidjs/start" for the SolidStart framework) */
|
|
2881
|
-
name: string;
|
|
2882
|
-
/** The minimum version (if any) of the package/framework that autoconfig supports */
|
|
2883
|
-
minimumVersion: string;
|
|
2884
|
-
/** The latest major version of the package/framework that autoconfig supports */
|
|
2885
|
-
maximumKnownMajorVersion: string;
|
|
2886
|
-
};
|
|
2887
|
-
|
|
2888
|
-
declare abstract class Framework {
|
|
2889
|
-
#private;
|
|
2890
|
-
readonly id: FrameworkInfo["id"];
|
|
2891
|
-
readonly name: FrameworkInfo["name"];
|
|
2892
|
-
get frameworkVersion(): string;
|
|
2893
|
-
constructor(frameworkInfo: Pick<FrameworkInfo, "id" | "name">);
|
|
2894
|
-
isConfigured(_projectPath: string): boolean;
|
|
2895
|
-
abstract configure(options: ConfigurationOptions): Promise<ConfigurationResults> | ConfigurationResults;
|
|
2896
|
-
configurationDescription?: string;
|
|
2897
|
-
/**
|
|
2898
|
-
* Validates the installed framework version against the supported range and
|
|
2899
|
-
* stores it for later access via the `frameworkVersion` getter.
|
|
2900
|
-
* Warns via `logger` if the version exceeds `maximumKnownMajorVersion`.
|
|
2901
|
-
*
|
|
2902
|
-
* @param projectPath - Path to the project root used to resolve the installed version.
|
|
2903
|
-
* @param frameworkPackageInfo - Package metadata including name and version bounds.
|
|
2904
|
-
* @throws {AssertionError} If the installed version cannot be determined.
|
|
2905
|
-
* @throws {AutoConfigFrameworkConfigurationError} If the version is below `minimumVersion`.
|
|
2906
|
-
*/
|
|
2907
|
-
validateFrameworkVersion(projectPath: string, frameworkPackageInfo: AutoConfigFrameworkPackageInfo): void;
|
|
2908
|
-
}
|
|
2909
|
-
type ConfigurationOptions = {
|
|
2910
|
-
outputDir: string;
|
|
2911
|
-
projectPath: string;
|
|
2912
|
-
workerName: string;
|
|
2913
|
-
dryRun: boolean;
|
|
2914
|
-
packageManager: PackageManager;
|
|
2915
|
-
isWorkspaceRoot: boolean;
|
|
2916
|
-
};
|
|
2917
|
-
type PackageJsonScriptsOverrides = {
|
|
2918
|
-
preview?: string;
|
|
2919
|
-
deploy?: string;
|
|
2920
|
-
typegen?: string;
|
|
2921
|
-
};
|
|
2922
|
-
type ConfigurationResults = {
|
|
2923
|
-
/** The wrangler configuration that the framework's `configure()` hook should generate. `null` if autoconfig should not create the wrangler file (in case an external tool already does that) */
|
|
2924
|
-
wranglerConfig: RawConfig$1 | null;
|
|
2925
|
-
packageJsonScriptsOverrides?: PackageJsonScriptsOverrides;
|
|
2926
|
-
buildCommandOverride?: string;
|
|
2927
|
-
deployCommandOverride?: string;
|
|
2928
|
-
versionCommandOverride?: string;
|
|
2929
|
-
};
|
|
2930
|
-
|
|
2931
|
-
type AutoConfigDetailsBase = {
|
|
2932
|
-
/** The name of the worker */
|
|
2933
|
-
workerName: string;
|
|
2934
|
-
/** The path to the project (defaults to cwd) */
|
|
2935
|
-
projectPath: string;
|
|
2936
|
-
/** The content of the project's package.json file (if any) */
|
|
2937
|
-
packageJson?: PackageJSON;
|
|
2938
|
-
/** Whether the project is already configured (no autoconfig required) */
|
|
2939
|
-
configured: boolean;
|
|
2940
|
-
/** Details about the detected framework. It can be a JS framework or 'Static' if no actual JS framework is used. */
|
|
2941
|
-
framework: Framework;
|
|
2942
|
-
/** The build command used to build the project (if any) */
|
|
2943
|
-
buildCommand?: string;
|
|
2944
|
-
/** The output directory (if no framework is used, points to the raw asset files) */
|
|
2945
|
-
outputDir: string;
|
|
2946
|
-
/** The detected package manager for the project */
|
|
2947
|
-
packageManager: PackageManager;
|
|
2948
|
-
/** Whether the current path is at the root of a workspace */
|
|
2949
|
-
isWorkspaceRoot?: boolean;
|
|
2950
|
-
};
|
|
2951
|
-
type AutoConfigDetailsForConfiguredProject = Optional<AutoConfigDetailsBase, "framework" | "outputDir"> & {
|
|
2952
|
-
configured: true;
|
|
2953
|
-
};
|
|
2954
|
-
type AutoConfigDetailsForNonConfiguredProject = AutoConfigDetailsBase & {
|
|
2955
|
-
configured: false;
|
|
2956
|
-
};
|
|
2957
|
-
type AutoConfigDetails = AutoConfigDetailsForConfiguredProject | AutoConfigDetailsForNonConfiguredProject;
|
|
2958
|
-
type AutoConfigOptions = {
|
|
2959
|
-
/** Whether to run autoconfig without actually applying any filesystem modification (default: false) */
|
|
2960
|
-
dryRun?: boolean;
|
|
2961
|
-
/**
|
|
2962
|
-
* Whether the build command should be run (default: true)
|
|
2963
|
-
*
|
|
2964
|
-
* Note: When `dryRun` is `true` the build command is never run.
|
|
2965
|
-
*/
|
|
2966
|
-
runBuild?: boolean;
|
|
2967
|
-
/**
|
|
2968
|
-
* Whether the confirmation prompts should be skipped (default: false)
|
|
2969
|
-
*
|
|
2970
|
-
* Note: When `dryRun` is `true` the the confirmation prompts are always skipped.
|
|
2971
|
-
*/
|
|
2972
|
-
skipConfirmations?: boolean;
|
|
2973
|
-
/**
|
|
2974
|
-
* Whether to install Wrangler during autoconfig
|
|
2975
|
-
*/
|
|
2976
|
-
enableWranglerInstallation?: boolean;
|
|
2977
|
-
};
|
|
2978
|
-
type AutoConfigSummary = {
|
|
2979
|
-
scripts: Record<string, string>;
|
|
2980
|
-
wranglerInstall: boolean;
|
|
2981
|
-
wranglerConfig?: RawConfig$1;
|
|
2982
|
-
frameworkConfiguration?: string;
|
|
2983
|
-
outputDir: string;
|
|
2984
|
-
frameworkId?: string;
|
|
2985
|
-
buildCommand?: string;
|
|
2986
|
-
deployCommand?: string;
|
|
2987
|
-
versionCommand?: string;
|
|
2988
|
-
};
|
|
2989
|
-
|
|
2990
|
-
/**
|
|
2991
|
-
* Derives a valid worker name from a project directory.
|
|
2992
|
-
*
|
|
2993
|
-
* The name is determined by (in order of precedence):
|
|
2994
|
-
* 1. The WRANGLER_CI_OVERRIDE_NAME environment variable (for CI environments)
|
|
2995
|
-
* 2. The `name` field from package.json in the project directory
|
|
2996
|
-
* 3. The directory basename
|
|
2997
|
-
*
|
|
2998
|
-
* The resulting name is sanitized to be a valid worker name.
|
|
2999
|
-
*
|
|
3000
|
-
* @param projectPath The path to the project directory
|
|
3001
|
-
* @returns A valid worker name
|
|
3002
|
-
*/
|
|
3003
|
-
declare function getWorkerNameFromProject(projectPath: string): string;
|
|
3004
|
-
declare function getDetailsForAutoConfig({ projectPath, wranglerConfig, }?: {
|
|
3005
|
-
projectPath?: string;
|
|
3006
|
-
wranglerConfig?: Config$1;
|
|
3007
|
-
}): Promise<AutoConfigDetails>;
|
|
3008
|
-
|
|
3009
2823
|
/**
|
|
3010
2824
|
* @deprecated Use today's date as the compatibility date instead.
|
|
3011
2825
|
*/
|
|
@@ -3266,8 +3080,6 @@ declare function runCfWranglerDev(options: StartDevOptions): Promise<number>;
|
|
|
3266
3080
|
*/
|
|
3267
3081
|
declare function splitSqlQuery(sql: string): string[];
|
|
3268
3082
|
|
|
3269
|
-
declare function runAutoConfig(autoConfigDetails: AutoConfigDetails, autoConfigOptions?: AutoConfigOptions): Promise<AutoConfigSummary>;
|
|
3270
|
-
|
|
3271
3083
|
/**
|
|
3272
3084
|
* The implementation for fetching a kv value from the cloudflare API.
|
|
3273
3085
|
* We special-case this one call, because it's the only API call that
|
|
@@ -3725,4 +3537,4 @@ interface Unstable_ASSETSBindingsOptions {
|
|
|
3725
3537
|
}
|
|
3726
3538
|
declare const unstable_generateASSETSBinding: (opts: Unstable_ASSETSBindingsOptions) => (request: Request) => Promise<Response$1>;
|
|
3727
3539
|
|
|
3728
|
-
export { ArgParseError, type Experimental_GenerateTypesOptions, type Experimental_GenerateTypesResult, type GetPlatformProxyOptions, type PlatformProxy, type RemoteProxySession, type SourcelessWorkerOptions, type StartRemoteProxySessionOptions, type TestHarness, type TestHarnessOptions, type Unstable_ASSETSBindingsOptions, type Config as Unstable_Config, type Unstable_DevOptions, type Unstable_DevWorker, type Unstable_MiniflareWorkerOptions, type RawConfig as Unstable_RawConfig, type RawEnvironment as Unstable_RawEnvironment, type WorkerHandle, createTestHarness,
|
|
3540
|
+
export { ArgParseError, type Experimental_GenerateTypesOptions, type Experimental_GenerateTypesResult, type GetPlatformProxyOptions, type PlatformProxy, type RemoteProxySession, type SourcelessWorkerOptions, type StartRemoteProxySessionOptions, type TestHarness, type TestHarnessOptions, type Unstable_ASSETSBindingsOptions, type Config as Unstable_Config, type Unstable_DevOptions, type Unstable_DevWorker, type Unstable_MiniflareWorkerOptions, type RawConfig as Unstable_RawConfig, type RawEnvironment as Unstable_RawEnvironment, type WorkerHandle, createTestHarness, generateTypes as experimental_generateTypes, experimental_getWranglerCommands, getPlatformProxy, maybeStartOrUpdateRemoteProxySession, parseArgs as parseCfWranglerArgs, parseBuildArgs as parseCfWranglerBuildArgs, runCfWranglerBuild, runCfWranglerDev, startRemoteProxySession, DevEnv as unstable_DevEnv, convertConfigBindingsToStartWorkerBindings as unstable_convertConfigBindingsToStartWorkerBindings, unstable_dev, unstable_generateASSETSBinding, unstable_getDevCompatibilityDate, getDurableObjectClassNameToUseSQLiteMap as unstable_getDurableObjectClassNameToUseSQLiteMap, unstable_getMiniflareWorkerOptions, getVarsForDev as unstable_getVarsForDev, unstable_pages, readConfig as unstable_readConfig, resolveNamedTunnel as unstable_resolveNamedTunnel, splitSqlQuery as unstable_splitSqlQuery, startWorker as unstable_startWorker };
|