wrangler 3.100.0 → 3.101.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.
@@ -1368,9 +1368,6 @@
1368
1368
  },
1369
1369
  "type": "array"
1370
1370
  },
1371
- "configPath": {
1372
- "type": "string"
1373
- },
1374
1371
  "containers": {
1375
1372
  "additionalProperties": false,
1376
1373
  "description": "Container related configuration",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "3.100.0",
3
+ "version": "3.101.0",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "wrangler",
@@ -50,6 +50,7 @@
50
50
  "config-schema.json"
51
51
  ],
52
52
  "dependencies": {
53
+ "@aws-sdk/client-s3": "^3.721.0",
53
54
  "@esbuild-plugins/node-globals-polyfill": "^0.2.3",
54
55
  "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
55
56
  "blake3-wasm": "^2.1.5",
@@ -66,7 +67,7 @@
66
67
  "workerd": "1.20241230.0",
67
68
  "xxhash-wasm": "^1.0.1",
68
69
  "@cloudflare/kv-asset-handler": "0.3.4",
69
- "miniflare": "3.20241230.0"
70
+ "miniflare": "3.20241230.1"
70
71
  },
71
72
  "devDependencies": {
72
73
  "@cloudflare/types": "6.18.4",
@@ -101,7 +102,7 @@
101
102
  "command-exists": "^1.2.9",
102
103
  "concurrently": "^8.2.2",
103
104
  "devtools-protocol": "^0.0.1182435",
104
- "dotenv": "^16.0.0",
105
+ "dotenv": "^16.3.1",
105
106
  "execa": "^6.1.0",
106
107
  "express": "^4.18.1",
107
108
  "find-up": "^6.3.0",
@@ -137,9 +138,9 @@
137
138
  "ws": "^8.18.0",
138
139
  "xdg-app-paths": "^8.3.0",
139
140
  "yargs": "^17.7.2",
140
- "@cloudflare/cli": "1.1.1",
141
141
  "@cloudflare/eslint-config-worker": "1.1.0",
142
- "@cloudflare/pages-shared": "^0.12.1",
142
+ "@cloudflare/cli": "1.1.1",
143
+ "@cloudflare/pages-shared": "^0.13.0",
143
144
  "@cloudflare/workers-shared": "0.11.2",
144
145
  "@cloudflare/workers-tsconfig": "0.0.0"
145
146
  },
@@ -174,10 +175,10 @@
174
175
  "emit-types": "tsc -p tsconfig.emit.json && node -r esbuild-register scripts/emit-types.ts",
175
176
  "generate-json-schema": "pnpm exec ts-json-schema-generator --no-type-check --path src/config/config.ts --type RawConfig --out config-schema.json",
176
177
  "start": "pnpm run bundle && cross-env NODE_OPTIONS=--enable-source-maps ./bin/wrangler.js",
177
- "test": "pnpm run assert-git-version && vitest",
178
+ "test": "dotenv -- pnpm run assert-git-version && dotenv -- vitest",
178
179
  "test:ci": "pnpm run test run",
179
180
  "test:debug": "pnpm run test --silent=false --verbose=true",
180
- "test:e2e": "vitest -c ./e2e/vitest.config.mts",
181
+ "test:e2e": "dotenv -- vitest -c ./e2e/vitest.config.mts",
181
182
  "test:watch": "pnpm run test --testTimeout=50000 --watch",
182
183
  "type:tests": "tsc -p ./src/__tests__/tsconfig.json && tsc -p ./e2e/tsconfig.json"
183
184
  }
@@ -772,6 +772,20 @@ declare type CloudchamberConfig = {
772
772
  ipv4?: boolean;
773
773
  };
774
774
 
775
+ declare interface ComputedFields {
776
+ /** The path to the Wrangler configuration file (if any, and possibly redirected from the user Wrangler configuration) used to create this configuration. */
777
+ configPath: string | undefined;
778
+ /** The path to the user's Wrangler configuration file (if any), which may have been redirected to another file that used to create this configuration. */
779
+ userConfigPath: string | undefined;
780
+ /**
781
+ * The original top level name for the Worker in the raw configuration.
782
+ *
783
+ * When a raw configuration has been flattened to a single environment the worker name may have been replaced or transformed.
784
+ * It can be useful to know what the top-level name was before the flattening.
785
+ */
786
+ topLevelName: string | undefined;
787
+ }
788
+
775
789
  declare class ConfigController extends Controller<ConfigControllerEventMap> {
776
790
  #private;
777
791
  latestInput?: StartDevWorkerInput;
@@ -787,7 +801,6 @@ declare type ConfigControllerEventMap = ControllerEventMap & {
787
801
  };
788
802
 
789
803
  declare interface ConfigFields<Dev extends RawDevConfig> {
790
- configPath: string | undefined;
791
804
  /**
792
805
  * A boolean to enable "legacy" style wrangler environments (from Wrangler v1).
793
806
  * These have been superseded by Services, but there may be projects that won't
@@ -2476,9 +2489,10 @@ declare class ExecutionContext {
2476
2489
 
2477
2490
  export declare const experimental_patchConfig: (configPath: string, patch: Unstable_RawConfig, isArrayInsertion?: boolean) => string;
2478
2491
 
2479
- export declare const experimental_readRawConfig: (args: ReadConfigCommandArgs) => {
2492
+ export declare const experimental_readRawConfig: (args: ReadConfigCommandArgs, options?: ReadConfigOptions) => {
2480
2493
  rawConfig: Unstable_RawConfig;
2481
2494
  configPath: string | undefined;
2495
+ userConfigPath: string | undefined;
2482
2496
  };
2483
2497
 
2484
2498
  declare function fetch_2 (
@@ -3055,6 +3069,7 @@ declare type NormalizeAndValidateConfigArgs = {
3055
3069
  remote?: boolean;
3056
3070
  localProtocol?: string;
3057
3071
  upstreamProtocol?: string;
3072
+ script?: string;
3058
3073
  };
3059
3074
 
3060
3075
  declare interface Observability {
@@ -25703,6 +25718,10 @@ declare type ReadConfigCommandArgs = NormalizeAndValidateConfigArgs & {
25703
25718
  script?: string;
25704
25719
  };
25705
25720
 
25721
+ declare type ReadConfigOptions = ResolveConfigPathOptions & {
25722
+ hideWarnings?: boolean;
25723
+ };
25724
+
25706
25725
  declare type ReadyEvent = {
25707
25726
  type: "ready";
25708
25727
  proxyWorker: Miniflare;
@@ -25831,6 +25850,10 @@ declare type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin'
25831
25850
 
25832
25851
  declare type RequestRedirect = 'error' | 'follow' | 'manual'
25833
25852
 
25853
+ declare type ResolveConfigPathOptions = {
25854
+ useRedirectIfAvailable?: boolean;
25855
+ };
25856
+
25834
25857
  declare class Response_2 implements BodyMixin {
25835
25858
  constructor (body?: BodyInit, init?: ResponseInit_2)
25836
25859
 
@@ -26407,7 +26430,7 @@ export declare interface Unstable_ASSETSBindingsOptions {
26407
26430
  * - `@breaking`: the deprecation/optionality is a breaking change from Wrangler v1.
26408
26431
  * - `@todo`: there's more work to be done (with details attached).
26409
26432
  */
26410
- export declare type Unstable_Config = ConfigFields<DevConfig> & PagesConfigFields & Environment;
26433
+ export declare type Unstable_Config = ComputedFields & ConfigFields<DevConfig> & PagesConfigFields & Environment;
26411
26434
 
26412
26435
  /**
26413
26436
  * unstable_dev starts a wrangler dev server, and returns a promise that resolves with utility functions to interact with it.
@@ -26544,9 +26567,7 @@ export declare type Unstable_RawEnvironment = Partial<Environment> & Environment
26544
26567
  /**
26545
26568
  * Get the Wrangler configuration; read it from the give `configPath` if available.
26546
26569
  */
26547
- export declare function unstable_readConfig(args: ReadConfigCommandArgs, options?: {
26548
- hideWarnings?: boolean;
26549
- }): Unstable_Config;
26570
+ export declare function unstable_readConfig(args: ReadConfigCommandArgs, options?: ReadConfigOptions): Unstable_Config;
26550
26571
 
26551
26572
  /**
26552
26573
  * Split an SQLQuery into an array of statements