wrangler 4.101.0 → 4.103.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/bin/cf-wrangler.js +100 -83
- package/package.json +17 -16
- package/wrangler-dist/InspectorProxyWorker.js +1 -0
- package/wrangler-dist/ProxyWorker.js +2 -0
- package/wrangler-dist/cli.d.ts +19 -173
- package/wrangler-dist/cli.js +68383 -54593
- package/wrangler-dist/metafile-cjs.json +1 -1
package/bin/cf-wrangler.js
CHANGED
|
@@ -1,30 +1,44 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// `cf-wrangler` delegate binary. Runs wrangler
|
|
3
|
-
//
|
|
2
|
+
// `cf-wrangler` delegate binary. Runs wrangler delegate verbs in-process;
|
|
3
|
+
// the parent tool owns the Node runtime (version, flags).
|
|
4
4
|
//
|
|
5
|
-
// Dispatches on the leading verb.
|
|
6
|
-
//
|
|
7
|
-
// support.
|
|
5
|
+
// Dispatches on the leading verb. An unknown or missing verb exits 2, which
|
|
6
|
+
// the parent uses to feature-detect support.
|
|
8
7
|
const {
|
|
9
8
|
ArgParseError,
|
|
9
|
+
parseCfWranglerBuildArgs,
|
|
10
10
|
parseCfWranglerArgs,
|
|
11
|
+
runCfWranglerBuild,
|
|
11
12
|
runCfWranglerDev,
|
|
12
13
|
} = require("../wrangler-dist/cli.js");
|
|
13
14
|
|
|
14
15
|
const argv = process.argv.slice(2);
|
|
15
16
|
const verb = argv[0];
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
const verbHandlers = {
|
|
19
|
+
dev: {
|
|
20
|
+
parse: parseCfWranglerArgs,
|
|
21
|
+
run: runCfWranglerDevFromArgs,
|
|
22
|
+
},
|
|
23
|
+
build: {
|
|
24
|
+
parse: parseCfWranglerBuildArgs,
|
|
25
|
+
run: runCfWranglerBuild,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const verbHandler = verbHandlers[verb];
|
|
30
|
+
|
|
31
|
+
if (!verbHandler) {
|
|
18
32
|
process.stderr.write(
|
|
19
33
|
`Error: unknown subcommand "${verb ?? ""}".\n` +
|
|
20
|
-
`Usage: cf-wrangler
|
|
34
|
+
`Usage: cf-wrangler <${Object.keys(verbHandlers).join("|")}> [args]\n`
|
|
21
35
|
);
|
|
22
36
|
process.exit(2);
|
|
23
37
|
}
|
|
24
38
|
|
|
25
39
|
let parsed;
|
|
26
40
|
try {
|
|
27
|
-
parsed =
|
|
41
|
+
parsed = verbHandler.parse(argv.slice(1));
|
|
28
42
|
} catch (err) {
|
|
29
43
|
if (err instanceof ArgParseError) {
|
|
30
44
|
process.stderr.write(`Error: ${err.message}\n`);
|
|
@@ -33,83 +47,86 @@ try {
|
|
|
33
47
|
throw err;
|
|
34
48
|
}
|
|
35
49
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
// defaults and leave everything else `undefined`, which makes wrangler's
|
|
39
|
-
// ConfigController resolve those exactly as `wrangler dev` would (config
|
|
40
|
-
// discovery, containers, inspector port, interactive hotkeys, ...).
|
|
41
|
-
// `--local` forces local execution; left unset it preserves per-resource
|
|
42
|
-
// `remote = true` bindings. There is no whole-worker remote dev (no
|
|
43
|
-
// `--remote`).
|
|
44
|
-
const options = {
|
|
45
|
-
_: [],
|
|
46
|
-
$0: "",
|
|
47
|
-
env: parsed.mode,
|
|
48
|
-
port: parsed.port,
|
|
49
|
-
host: parsed.host,
|
|
50
|
-
local: parsed.local,
|
|
51
|
-
remote: false,
|
|
52
|
-
latest: true,
|
|
53
|
-
noBundle: false,
|
|
54
|
-
testScheduled: false,
|
|
55
|
-
processEntrypoint: false,
|
|
56
|
-
experimentalAutoCreate: false,
|
|
57
|
-
types: false,
|
|
58
|
-
disableDevRegistry: false,
|
|
59
|
-
config: undefined,
|
|
60
|
-
script: undefined,
|
|
61
|
-
name: undefined,
|
|
62
|
-
accountId: undefined,
|
|
63
|
-
forceLocal: undefined,
|
|
64
|
-
compatibilityDate: undefined,
|
|
65
|
-
compatibilityFlags: undefined,
|
|
66
|
-
ip: undefined,
|
|
67
|
-
inspectorPort: undefined,
|
|
68
|
-
inspectorIp: undefined,
|
|
69
|
-
v: undefined,
|
|
70
|
-
cwd: undefined,
|
|
71
|
-
localProtocol: undefined,
|
|
72
|
-
httpsKeyPath: undefined,
|
|
73
|
-
httpsCertPath: undefined,
|
|
74
|
-
assets: undefined,
|
|
75
|
-
site: undefined,
|
|
76
|
-
siteInclude: undefined,
|
|
77
|
-
siteExclude: undefined,
|
|
78
|
-
persist: undefined,
|
|
79
|
-
persistTo: undefined,
|
|
80
|
-
routes: undefined,
|
|
81
|
-
localUpstream: undefined,
|
|
82
|
-
upstreamProtocol: undefined,
|
|
83
|
-
var: undefined,
|
|
84
|
-
define: undefined,
|
|
85
|
-
alias: undefined,
|
|
86
|
-
jsxFactory: undefined,
|
|
87
|
-
jsxFragment: undefined,
|
|
88
|
-
tsconfig: undefined,
|
|
89
|
-
minify: undefined,
|
|
90
|
-
legacyEnv: undefined,
|
|
91
|
-
logLevel: undefined,
|
|
92
|
-
showInteractiveDevSession: undefined,
|
|
93
|
-
liveReload: undefined,
|
|
94
|
-
bundle: undefined,
|
|
95
|
-
additionalModules: undefined,
|
|
96
|
-
enablePagesAssetsServiceBinding: undefined,
|
|
97
|
-
d1Databases: undefined,
|
|
98
|
-
experimentalProvision: undefined,
|
|
99
|
-
enableIpc: undefined,
|
|
100
|
-
nodeCompat: undefined,
|
|
101
|
-
enableContainers: undefined,
|
|
102
|
-
dockerPath: undefined,
|
|
103
|
-
containerEngine: undefined,
|
|
104
|
-
tunnel: undefined,
|
|
105
|
-
tunnelName: undefined,
|
|
106
|
-
envFile: undefined,
|
|
107
|
-
onReady: undefined,
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
runCfWranglerDev(options)
|
|
50
|
+
verbHandler
|
|
51
|
+
.run(parsed)
|
|
111
52
|
.then((code) => process.exit(code))
|
|
112
53
|
.catch((err) => {
|
|
113
54
|
process.stderr.write(`${(err && err.stack) || err}\n`);
|
|
114
55
|
process.exit(1);
|
|
115
56
|
});
|
|
57
|
+
|
|
58
|
+
function runCfWranglerDevFromArgs(parsedArgs) {
|
|
59
|
+
return runCfWranglerDev(createDevOptions(parsedArgs));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function createDevOptions(parsedArgs) {
|
|
63
|
+
// Build wrangler dev's full (yargs-derived) options object. Every field
|
|
64
|
+
// must be present; we set the four accepted flags plus `wrangler dev`'s
|
|
65
|
+
// defaults and leave everything else `undefined`, which makes wrangler's
|
|
66
|
+
// ConfigController resolve those exactly as `wrangler dev` would.
|
|
67
|
+
return {
|
|
68
|
+
_: [],
|
|
69
|
+
$0: "",
|
|
70
|
+
env: parsedArgs.mode,
|
|
71
|
+
port: parsedArgs.port,
|
|
72
|
+
host: parsedArgs.host,
|
|
73
|
+
local: parsedArgs.local,
|
|
74
|
+
remote: false,
|
|
75
|
+
latest: true,
|
|
76
|
+
noBundle: false,
|
|
77
|
+
testScheduled: false,
|
|
78
|
+
processEntrypoint: false,
|
|
79
|
+
experimentalAutoCreate: false,
|
|
80
|
+
types: false,
|
|
81
|
+
disableDevRegistry: false,
|
|
82
|
+
config: undefined,
|
|
83
|
+
script: undefined,
|
|
84
|
+
name: undefined,
|
|
85
|
+
accountId: undefined,
|
|
86
|
+
forceLocal: undefined,
|
|
87
|
+
compatibilityDate: undefined,
|
|
88
|
+
compatibilityFlags: undefined,
|
|
89
|
+
ip: undefined,
|
|
90
|
+
inspectorPort: undefined,
|
|
91
|
+
inspectorIp: undefined,
|
|
92
|
+
v: undefined,
|
|
93
|
+
cwd: undefined,
|
|
94
|
+
localProtocol: undefined,
|
|
95
|
+
httpsKeyPath: undefined,
|
|
96
|
+
httpsCertPath: undefined,
|
|
97
|
+
assets: undefined,
|
|
98
|
+
site: undefined,
|
|
99
|
+
siteInclude: undefined,
|
|
100
|
+
siteExclude: undefined,
|
|
101
|
+
persist: undefined,
|
|
102
|
+
persistTo: undefined,
|
|
103
|
+
routes: undefined,
|
|
104
|
+
localUpstream: undefined,
|
|
105
|
+
upstreamProtocol: undefined,
|
|
106
|
+
var: undefined,
|
|
107
|
+
define: undefined,
|
|
108
|
+
alias: undefined,
|
|
109
|
+
jsxFactory: undefined,
|
|
110
|
+
jsxFragment: undefined,
|
|
111
|
+
tsconfig: undefined,
|
|
112
|
+
minify: undefined,
|
|
113
|
+
legacyEnv: undefined,
|
|
114
|
+
logLevel: undefined,
|
|
115
|
+
showInteractiveDevSession: undefined,
|
|
116
|
+
liveReload: undefined,
|
|
117
|
+
bundle: undefined,
|
|
118
|
+
additionalModules: undefined,
|
|
119
|
+
enablePagesAssetsServiceBinding: undefined,
|
|
120
|
+
d1Databases: undefined,
|
|
121
|
+
experimentalProvision: undefined,
|
|
122
|
+
enableIpc: undefined,
|
|
123
|
+
nodeCompat: undefined,
|
|
124
|
+
enableContainers: undefined,
|
|
125
|
+
dockerPath: undefined,
|
|
126
|
+
containerEngine: undefined,
|
|
127
|
+
tunnel: undefined,
|
|
128
|
+
tunnelName: undefined,
|
|
129
|
+
envFile: undefined,
|
|
130
|
+
onReady: undefined,
|
|
131
|
+
};
|
|
132
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wrangler",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.103.0",
|
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"assembly",
|
|
@@ -63,19 +63,19 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"blake3-wasm": "2.1.5",
|
|
66
|
-
"esbuild": "0.
|
|
66
|
+
"esbuild": "0.28.1",
|
|
67
67
|
"path-to-regexp": "6.3.0",
|
|
68
68
|
"unenv": "2.0.0-rc.24",
|
|
69
|
-
"workerd": "1.
|
|
70
|
-
"@cloudflare/unenv-preset": "2.16.1",
|
|
69
|
+
"workerd": "1.20260617.1",
|
|
71
70
|
"@cloudflare/kv-asset-handler": "0.5.0",
|
|
72
|
-
"
|
|
71
|
+
"@cloudflare/unenv-preset": "2.16.1",
|
|
72
|
+
"miniflare": "4.20260617.1"
|
|
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.20260617.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",
|
|
@@ -148,28 +148,29 @@
|
|
|
148
148
|
"tsdown": "0.16.3",
|
|
149
149
|
"tsup": "8.3.0",
|
|
150
150
|
"typescript": "5.8.3",
|
|
151
|
-
"undici": "7.
|
|
151
|
+
"undici": "7.28.0",
|
|
152
152
|
"vitest": "4.1.0",
|
|
153
153
|
"vitest-websocket-mock": "^0.4.0",
|
|
154
|
-
"ws": "8.
|
|
154
|
+
"ws": "8.21.0",
|
|
155
155
|
"xxhash-wasm": "^1.0.1",
|
|
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.0",
|
|
160
|
+
"@cloudflare/cli-shared-helpers": "0.1.10",
|
|
160
161
|
"@cloudflare/codemod": "1.1.0",
|
|
161
162
|
"@cloudflare/config": "0.0.0",
|
|
162
|
-
"@cloudflare/deploy-helpers": "0.2.0",
|
|
163
163
|
"@cloudflare/containers-shared": "0.15.1",
|
|
164
|
-
"@cloudflare/
|
|
164
|
+
"@cloudflare/deploy-helpers": "0.2.2",
|
|
165
|
+
"@cloudflare/workers-auth": "0.3.2",
|
|
166
|
+
"@cloudflare/pages-shared": "^0.13.148",
|
|
167
|
+
"@cloudflare/workers-shared": "0.19.7",
|
|
165
168
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
166
|
-
"@cloudflare/workers-
|
|
167
|
-
"@cloudflare/
|
|
168
|
-
"@cloudflare/workers-utils": "0.23.1",
|
|
169
|
-
"@cloudflare/workflows-shared": "0.11.1"
|
|
169
|
+
"@cloudflare/workers-utils": "0.24.0",
|
|
170
|
+
"@cloudflare/workflows-shared": "0.11.2"
|
|
170
171
|
},
|
|
171
172
|
"peerDependencies": {
|
|
172
|
-
"@cloudflare/workers-types": "^4.
|
|
173
|
+
"@cloudflare/workers-types": "^4.20260617.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';
|
|
@@ -2848,164 +2848,6 @@ type VarBinding = Extract<Binding, {
|
|
|
2848
2848
|
*/
|
|
2849
2849
|
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
2850
|
|
|
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
2851
|
/**
|
|
3010
2852
|
* @deprecated Use today's date as the compatibility date instead.
|
|
3011
2853
|
*/
|
|
@@ -3233,35 +3075,39 @@ declare function resolveNamedTunnel(name: string, origin: URL, options: {
|
|
|
3233
3075
|
token: string;
|
|
3234
3076
|
}>;
|
|
3235
3077
|
|
|
3236
|
-
/**
|
|
3237
|
-
* Run the dev server until it tears down (a hotkey quit in a TTY, or a
|
|
3238
|
-
* signal from a non-interactive parent). Mirrors `wrangler dev`'s command
|
|
3239
|
-
* handler and installs no signal handlers of its own, so signal handling
|
|
3240
|
-
* and exit codes match `wrangler dev` exactly.
|
|
3241
|
-
*
|
|
3242
|
-
* @param options Fully-built `StartDevOptions` (built in `bin/cf-wrangler.js`).
|
|
3243
|
-
* @returns `0` on a clean teardown.
|
|
3244
|
-
*/
|
|
3245
|
-
declare function runCfWranglerDev(options: StartDevOptions): Promise<number>;
|
|
3246
|
-
|
|
3247
3078
|
interface DevArgs {
|
|
3248
3079
|
mode?: string;
|
|
3249
3080
|
port?: number;
|
|
3250
3081
|
host?: string;
|
|
3251
3082
|
local?: boolean;
|
|
3252
3083
|
}
|
|
3084
|
+
interface BuildArgs {
|
|
3085
|
+
mode?: string;
|
|
3086
|
+
}
|
|
3253
3087
|
declare class ArgParseError extends Error {
|
|
3254
3088
|
constructor(message: string);
|
|
3255
3089
|
}
|
|
3256
3090
|
declare function parseArgs(argv: string[]): DevArgs;
|
|
3091
|
+
declare function parseBuildArgs(argv: string[]): BuildArgs;
|
|
3092
|
+
|
|
3093
|
+
declare function runCfWranglerBuild(args: BuildArgs): Promise<number>;
|
|
3094
|
+
|
|
3095
|
+
/**
|
|
3096
|
+
* Run the dev server until it tears down (a hotkey quit in a TTY, or a
|
|
3097
|
+
* signal from a non-interactive parent). Mirrors `wrangler dev`'s command
|
|
3098
|
+
* handler and installs no signal handlers of its own, so signal handling
|
|
3099
|
+
* and exit codes match `wrangler dev` exactly.
|
|
3100
|
+
*
|
|
3101
|
+
* @param options Fully-built `StartDevOptions` (built in `bin/cf-wrangler.js`).
|
|
3102
|
+
* @returns `0` on a clean teardown.
|
|
3103
|
+
*/
|
|
3104
|
+
declare function runCfWranglerDev(options: StartDevOptions): Promise<number>;
|
|
3257
3105
|
|
|
3258
3106
|
/**
|
|
3259
3107
|
* Split an SQLQuery into an array of statements
|
|
3260
3108
|
*/
|
|
3261
3109
|
declare function splitSqlQuery(sql: string): string[];
|
|
3262
3110
|
|
|
3263
|
-
declare function runAutoConfig(autoConfigDetails: AutoConfigDetails, autoConfigOptions?: AutoConfigOptions): Promise<AutoConfigSummary>;
|
|
3264
|
-
|
|
3265
3111
|
/**
|
|
3266
3112
|
* The implementation for fetching a kv value from the cloudflare API.
|
|
3267
3113
|
* We special-case this one call, because it's the only API call that
|
|
@@ -3719,4 +3565,4 @@ interface Unstable_ASSETSBindingsOptions {
|
|
|
3719
3565
|
}
|
|
3720
3566
|
declare const unstable_generateASSETSBinding: (opts: Unstable_ASSETSBindingsOptions) => (request: Request) => Promise<Response$1>;
|
|
3721
3567
|
|
|
3722
|
-
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,
|
|
3568
|
+
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 };
|