wrangler 3.59.0 → 3.60.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/package.json +10 -6
- package/wrangler-dist/InspectorProxyWorker.js.map +1 -1
- package/wrangler-dist/ProxyWorker.js.map +1 -1
- package/wrangler-dist/cli.d.ts +255 -111
- package/wrangler-dist/cli.js +3866 -2898
- package/wrangler-dist/cli.js.map +7 -0
package/wrangler-dist/cli.d.ts
CHANGED
@@ -14,7 +14,7 @@ import type { MessagePort as MessagePort_2 } from 'worker_threads';
|
|
14
14
|
import type { Metafile } from 'esbuild';
|
15
15
|
import { Miniflare } from 'miniflare';
|
16
16
|
import type { MiniflareOptions } from 'miniflare';
|
17
|
-
import type { ModuleRule
|
17
|
+
import type { ModuleRule } from 'miniflare';
|
18
18
|
import { Mutex } from 'miniflare';
|
19
19
|
import { Readable } from 'stream';
|
20
20
|
import { ReadableStream } from 'stream/web';
|
@@ -290,10 +290,11 @@ declare type BundleCompleteEvent = {
|
|
290
290
|
};
|
291
291
|
|
292
292
|
declare class BundlerController extends Controller<BundlerControllerEventMap> {
|
293
|
-
|
293
|
+
#private;
|
294
|
+
onConfigUpdate(event: ConfigUpdateEvent): void;
|
294
295
|
teardown(): Promise<void>;
|
295
|
-
emitBundleStartEvent(
|
296
|
-
|
296
|
+
emitBundleStartEvent(config: StartDevWorkerOptions): void;
|
297
|
+
emitBundleCompleteEvent(config: StartDevWorkerOptions, bundle: EsbuildBundle): void;
|
297
298
|
}
|
298
299
|
|
299
300
|
declare type BundlerControllerEventMap = ControllerEventMap & {
|
@@ -398,11 +399,36 @@ declare interface CfAccount {
|
|
398
399
|
accountId: string;
|
399
400
|
}
|
400
401
|
|
402
|
+
/**
|
403
|
+
* A binding to the AI project
|
404
|
+
*/
|
405
|
+
declare interface CfAIBinding {
|
406
|
+
binding: string;
|
407
|
+
staging?: boolean;
|
408
|
+
}
|
409
|
+
|
401
410
|
declare interface CfAnalyticsEngineDataset {
|
402
411
|
binding: string;
|
403
412
|
dataset?: string;
|
404
413
|
}
|
405
414
|
|
415
|
+
/**
|
416
|
+
* A binding to a browser
|
417
|
+
*/
|
418
|
+
declare interface CfBrowserBinding {
|
419
|
+
binding: string;
|
420
|
+
}
|
421
|
+
|
422
|
+
declare type CfCapnp = {
|
423
|
+
base_path?: never;
|
424
|
+
source_schemas?: never;
|
425
|
+
compiled_schema: string;
|
426
|
+
} | {
|
427
|
+
base_path: string;
|
428
|
+
source_schemas: string[];
|
429
|
+
compiled_schema?: never;
|
430
|
+
};
|
431
|
+
|
406
432
|
declare interface CfConstellation {
|
407
433
|
binding: string;
|
408
434
|
project_id: string;
|
@@ -418,6 +444,13 @@ declare interface CfD1Database {
|
|
418
444
|
migrations_dir?: string;
|
419
445
|
}
|
420
446
|
|
447
|
+
/**
|
448
|
+
* A binding to a data blob (in service-worker format)
|
449
|
+
*/
|
450
|
+
declare interface CfDataBlobBindings {
|
451
|
+
[key: string]: string | Uint8Array;
|
452
|
+
}
|
453
|
+
|
421
454
|
declare interface CfDispatchNamespace {
|
422
455
|
binding: string;
|
423
456
|
namespace: string;
|
@@ -438,6 +471,19 @@ declare interface CfDurableObject {
|
|
438
471
|
environment?: string;
|
439
472
|
}
|
440
473
|
|
474
|
+
declare interface CfDurableObjectMigrations {
|
475
|
+
old_tag?: string;
|
476
|
+
new_tag: string;
|
477
|
+
steps: {
|
478
|
+
new_classes?: string[];
|
479
|
+
renamed_classes?: {
|
480
|
+
from: string;
|
481
|
+
to: string;
|
482
|
+
}[];
|
483
|
+
deleted_classes?: string[];
|
484
|
+
}[];
|
485
|
+
}
|
486
|
+
|
441
487
|
declare interface CfHyperdrive {
|
442
488
|
binding: string;
|
443
489
|
id: string;
|
@@ -452,6 +498,10 @@ declare interface CfKvNamespace {
|
|
452
498
|
id: string;
|
453
499
|
}
|
454
500
|
|
501
|
+
declare interface CfLogfwdr {
|
502
|
+
bindings: CfLogfwdrBinding[];
|
503
|
+
}
|
504
|
+
|
455
505
|
declare interface CfLogfwdrBinding {
|
456
506
|
name: string;
|
457
507
|
destination: string;
|
@@ -488,6 +538,12 @@ declare interface CfModule {
|
|
488
538
|
* }
|
489
539
|
*/
|
490
540
|
content: string | Buffer;
|
541
|
+
/**
|
542
|
+
* An optional sourcemap for this module if it's of a ESM or CJS type, this will only be present
|
543
|
+
* if we're deploying with sourcemaps enabled. Since we copy extra modules that aren't bundled
|
544
|
+
* we need to also copy the relevant sourcemaps into the final out directory.
|
545
|
+
*/
|
546
|
+
sourceMap?: CfWorkerSourceMap;
|
491
547
|
/**
|
492
548
|
* The module type.
|
493
549
|
*
|
@@ -506,6 +562,10 @@ declare interface CfMTlsCertificate {
|
|
506
562
|
certificate_id: string;
|
507
563
|
}
|
508
564
|
|
565
|
+
declare interface CfPlacement {
|
566
|
+
mode: "smart";
|
567
|
+
}
|
568
|
+
|
509
569
|
declare interface CfQueue {
|
510
570
|
binding: string;
|
511
571
|
queue_name: string;
|
@@ -539,11 +599,149 @@ declare interface CfService {
|
|
539
599
|
entrypoint?: string;
|
540
600
|
}
|
541
601
|
|
602
|
+
declare interface CfTailConsumer {
|
603
|
+
service: string;
|
604
|
+
environment?: string;
|
605
|
+
}
|
606
|
+
|
607
|
+
/**
|
608
|
+
* A binding to a text blob (in service-worker format)
|
609
|
+
*/
|
610
|
+
declare interface CfTextBlobBindings {
|
611
|
+
[key: string]: string;
|
612
|
+
}
|
613
|
+
|
614
|
+
declare interface CfUnsafe {
|
615
|
+
bindings: CfUnsafeBinding[] | undefined;
|
616
|
+
metadata: CfUnsafeMetadata | undefined;
|
617
|
+
capnp: CfCapnp | undefined;
|
618
|
+
}
|
619
|
+
|
620
|
+
declare interface CfUnsafeBinding {
|
621
|
+
name: string;
|
622
|
+
type: string;
|
623
|
+
}
|
624
|
+
|
625
|
+
declare type CfUnsafeMetadata = Record<string, unknown>;
|
626
|
+
|
627
|
+
declare interface CfUserLimits {
|
628
|
+
cpu_ms?: number;
|
629
|
+
}
|
630
|
+
|
631
|
+
/**
|
632
|
+
* A map of variable names to values.
|
633
|
+
*/
|
634
|
+
declare interface CfVars {
|
635
|
+
[key: string]: string | Json;
|
636
|
+
}
|
637
|
+
|
542
638
|
declare interface CfVectorize {
|
543
639
|
binding: string;
|
544
640
|
index_name: string;
|
545
641
|
}
|
546
642
|
|
643
|
+
/**
|
644
|
+
* A binding to the Worker Version's metadata
|
645
|
+
*/
|
646
|
+
declare interface CfVersionMetadataBinding {
|
647
|
+
binding: string;
|
648
|
+
}
|
649
|
+
|
650
|
+
/**
|
651
|
+
* A binding to a wasm module (in service-worker format)
|
652
|
+
*/
|
653
|
+
declare interface CfWasmModuleBindings {
|
654
|
+
[key: string]: string | Uint8Array;
|
655
|
+
}
|
656
|
+
|
657
|
+
/**
|
658
|
+
* Options for creating a `CfWorker`.
|
659
|
+
*/
|
660
|
+
declare interface CfWorkerInit {
|
661
|
+
/**
|
662
|
+
* The name of the worker.
|
663
|
+
*/
|
664
|
+
name: string | undefined;
|
665
|
+
/**
|
666
|
+
* The entrypoint module.
|
667
|
+
*/
|
668
|
+
main: CfModule;
|
669
|
+
/**
|
670
|
+
* The list of additional modules.
|
671
|
+
*/
|
672
|
+
modules: CfModule[] | undefined;
|
673
|
+
/**
|
674
|
+
* The list of source maps to include on upload.
|
675
|
+
*/
|
676
|
+
sourceMaps: CfWorkerSourceMap[] | undefined;
|
677
|
+
/**
|
678
|
+
* All the bindings
|
679
|
+
*/
|
680
|
+
bindings: {
|
681
|
+
vars: CfVars | undefined;
|
682
|
+
kv_namespaces: CfKvNamespace[] | undefined;
|
683
|
+
send_email: CfSendEmailBindings[] | undefined;
|
684
|
+
wasm_modules: CfWasmModuleBindings | undefined;
|
685
|
+
text_blobs: CfTextBlobBindings | undefined;
|
686
|
+
browser: CfBrowserBinding | undefined;
|
687
|
+
ai: CfAIBinding | undefined;
|
688
|
+
version_metadata: CfVersionMetadataBinding | undefined;
|
689
|
+
data_blobs: CfDataBlobBindings | undefined;
|
690
|
+
durable_objects: {
|
691
|
+
bindings: CfDurableObject[];
|
692
|
+
} | undefined;
|
693
|
+
queues: CfQueue[] | undefined;
|
694
|
+
r2_buckets: CfR2Bucket[] | undefined;
|
695
|
+
d1_databases: CfD1Database[] | undefined;
|
696
|
+
vectorize: CfVectorize[] | undefined;
|
697
|
+
constellation: CfConstellation[] | undefined;
|
698
|
+
hyperdrive: CfHyperdrive[] | undefined;
|
699
|
+
services: CfService[] | undefined;
|
700
|
+
analytics_engine_datasets: CfAnalyticsEngineDataset[] | undefined;
|
701
|
+
dispatch_namespaces: CfDispatchNamespace[] | undefined;
|
702
|
+
mtls_certificates: CfMTlsCertificate[] | undefined;
|
703
|
+
logfwdr: CfLogfwdr | undefined;
|
704
|
+
unsafe: CfUnsafe | undefined;
|
705
|
+
};
|
706
|
+
migrations: CfDurableObjectMigrations | undefined;
|
707
|
+
compatibility_date: string | undefined;
|
708
|
+
compatibility_flags: string[] | undefined;
|
709
|
+
usage_model: "bundled" | "unbound" | undefined;
|
710
|
+
keepVars: boolean | undefined;
|
711
|
+
keepSecrets: boolean | undefined;
|
712
|
+
logpush: boolean | undefined;
|
713
|
+
placement: CfPlacement | undefined;
|
714
|
+
tail_consumers: CfTailConsumer[] | undefined;
|
715
|
+
limits: CfUserLimits | undefined;
|
716
|
+
annotations?: Record<string, string | undefined>;
|
717
|
+
}
|
718
|
+
|
719
|
+
declare interface CfWorkerSourceMap {
|
720
|
+
/**
|
721
|
+
* The name of the source map.
|
722
|
+
*
|
723
|
+
* @example
|
724
|
+
* 'out.js.map'
|
725
|
+
*/
|
726
|
+
name: string;
|
727
|
+
/**
|
728
|
+
* The content of the source map, which is a JSON object described by the v3
|
729
|
+
* spec.
|
730
|
+
*
|
731
|
+
* @example
|
732
|
+
* {
|
733
|
+
* "version" : 3,
|
734
|
+
* "file": "out.js",
|
735
|
+
* "sourceRoot": "",
|
736
|
+
* "sources": ["foo.js", "bar.js"],
|
737
|
+
* "sourcesContent": [null, null],
|
738
|
+
* "names": ["src", "maps", "are", "fun"],
|
739
|
+
* "mappings": "A,AAAB;;ABCDE;"
|
740
|
+
* }
|
741
|
+
*/
|
742
|
+
content: string | Buffer;
|
743
|
+
}
|
744
|
+
|
547
745
|
/**
|
548
746
|
* A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
|
549
747
|
*/
|
@@ -892,7 +1090,7 @@ attributes?: { name?: string, domain?: string }
|
|
892
1090
|
* NOTE: You will need the `CLOUDFLARE_API_KEY` environment
|
893
1091
|
* variable set
|
894
1092
|
*/
|
895
|
-
declare function deploy({ directory, accountId, projectName, branch, skipCaching, commitMessage, commitHash, commitDirty, functionsDirectory: customFunctionsDirectory, bundle, args, }: PagesDeployOptions): Promise<{
|
1093
|
+
declare function deploy({ directory, accountId, projectName, branch, skipCaching, commitMessage, commitHash, commitDirty, functionsDirectory: customFunctionsDirectory, bundle, sourceMaps, args, }: PagesDeployOptions): Promise<{
|
896
1094
|
url: string;
|
897
1095
|
id: string;
|
898
1096
|
environment: "production" | "preview";
|
@@ -955,30 +1153,6 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
|
|
955
1153
|
} | undefined;
|
956
1154
|
}>;
|
957
1155
|
|
958
|
-
declare interface DeprecatedConfigFields {
|
959
|
-
/**
|
960
|
-
* The project "type". A holdover from Wrangler v1.x.
|
961
|
-
* Valid values were "webpack", "javascript", and "rust".
|
962
|
-
*
|
963
|
-
* @deprecated DO NOT USE THIS. Most common features now work out of the box with wrangler, including modules, jsx, typescript, etc. If you need anything more, use a custom build.
|
964
|
-
* @breaking
|
965
|
-
*/
|
966
|
-
type?: "webpack" | "javascript" | "rust";
|
967
|
-
/**
|
968
|
-
* Path to the webpack config to use when building your worker.
|
969
|
-
* A holdover from Wrangler v1.x, used with `type: "webpack"`.
|
970
|
-
*
|
971
|
-
* @deprecated DO NOT USE THIS. Most common features now work out of the box with wrangler, including modules, jsx, typescript, etc. If you need anything more, use a custom build.
|
972
|
-
* @breaking
|
973
|
-
*/
|
974
|
-
webpack_config?: string;
|
975
|
-
/**
|
976
|
-
* Configuration only used by a standalone use of the miniflare binary.
|
977
|
-
* @deprecated
|
978
|
-
*/
|
979
|
-
miniflare?: unknown;
|
980
|
-
}
|
981
|
-
|
982
1156
|
/**
|
983
1157
|
* Deprecated upload configuration.
|
984
1158
|
*/
|
@@ -1416,39 +1590,6 @@ declare type Entry = {
|
|
1416
1590
|
declare interface Environment extends EnvironmentInheritable, EnvironmentNonInheritable {
|
1417
1591
|
}
|
1418
1592
|
|
1419
|
-
/**
|
1420
|
-
* The environment configuration properties that have been deprecated.
|
1421
|
-
*/
|
1422
|
-
declare interface EnvironmentDeprecated {
|
1423
|
-
/**
|
1424
|
-
* The zone ID of the zone you want to deploy to. You can find this
|
1425
|
-
* in your domain page on the dashboard.
|
1426
|
-
*
|
1427
|
-
* @deprecated This is unnecessary since we can deduce this from routes directly.
|
1428
|
-
*/
|
1429
|
-
zone_id?: string;
|
1430
|
-
/**
|
1431
|
-
* Legacy way of defining KVNamespaces that is no longer supported.
|
1432
|
-
*
|
1433
|
-
* @deprecated DO NOT USE. This was a legacy bug from Wrangler v1, that we do not want to support.
|
1434
|
-
*/
|
1435
|
-
"kv-namespaces"?: string;
|
1436
|
-
/**
|
1437
|
-
* A list of services that your Worker should be bound to.
|
1438
|
-
*
|
1439
|
-
* @default `[]`
|
1440
|
-
* @deprecated DO NOT USE. We'd added this to test the new service binding system, but the proper way to test experimental features is to use `unsafe.bindings` configuration.
|
1441
|
-
*/
|
1442
|
-
experimental_services?: {
|
1443
|
-
/** The binding name used to refer to the Service */
|
1444
|
-
name: string;
|
1445
|
-
/** The name of the Service being bound */
|
1446
|
-
service: string;
|
1447
|
-
/** The Service's environment */
|
1448
|
-
environment: string;
|
1449
|
-
}[];
|
1450
|
-
}
|
1451
|
-
|
1452
1593
|
/**
|
1453
1594
|
* The `EnvironmentInheritable` interface declares all the configuration fields for an environment
|
1454
1595
|
* that can be inherited (and overridden) from the top-level environment.
|
@@ -1700,24 +1841,6 @@ declare interface EnvironmentInheritable {
|
|
1700
1841
|
} | undefined;
|
1701
1842
|
}
|
1702
1843
|
|
1703
|
-
declare interface EnvironmentMap {
|
1704
|
-
/**
|
1705
|
-
* The `env` section defines overrides for the configuration for different environments.
|
1706
|
-
*
|
1707
|
-
* All environment fields can be specified at the top level of the config indicating the default environment settings.
|
1708
|
-
*
|
1709
|
-
* - Some fields are inherited and overridable in each environment.
|
1710
|
-
* - But some are not inherited and must be explicitly specified in every environment, if they are specified at the top level.
|
1711
|
-
*
|
1712
|
-
* For more information, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration#environments
|
1713
|
-
*
|
1714
|
-
* @default {}
|
1715
|
-
*/
|
1716
|
-
env?: {
|
1717
|
-
[envName: string]: RawEnvironment;
|
1718
|
-
};
|
1719
|
-
}
|
1720
|
-
|
1721
1844
|
/**
|
1722
1845
|
* The `EnvironmentNonInheritable` interface declares all the configuration fields for an environment
|
1723
1846
|
* that cannot be inherited from the top-level environment, and must be defined specifically.
|
@@ -2093,6 +2216,9 @@ declare interface EnvironmentNonInheritable {
|
|
2093
2216
|
declare type ErrorEvent = BaseErrorEvent<"ConfigController" | "BundlerController" | "LocalRuntimeController" | "RemoteRuntimeController" | "ProxyWorker" | "InspectorProxyWorker"> | BaseErrorEvent<"ProxyController", {
|
2094
2217
|
config?: StartDevWorkerOptions;
|
2095
2218
|
bundle?: Bundle;
|
2219
|
+
}> | BaseErrorEvent<"BundlerController", {
|
2220
|
+
config?: StartDevWorkerOptions;
|
2221
|
+
filePath?: string;
|
2096
2222
|
}>;
|
2097
2223
|
|
2098
2224
|
declare namespace Errors {
|
@@ -2601,7 +2727,7 @@ declare interface Interceptable extends Dispatcher {
|
|
2601
2727
|
|
2602
2728
|
declare class Logger {
|
2603
2729
|
constructor();
|
2604
|
-
loggerLevel: "
|
2730
|
+
loggerLevel: "error" | "none" | "warn" | "info" | "log" | "debug";
|
2605
2731
|
columns: number;
|
2606
2732
|
debug: (...args: unknown[]) => void;
|
2607
2733
|
debugWithSanitization: (label: string, ...args: unknown[]) => void;
|
@@ -2818,16 +2944,19 @@ declare class MockScope<TData extends object = object> {
|
|
2818
2944
|
times(repeatTimes: number): MockScope<TData>;
|
2819
2945
|
}
|
2820
2946
|
|
2821
|
-
declare interface ModuleRule {
|
2822
|
-
type: "ESModule" | "CommonJS" | "NodeJsCompatModule" | "CompiledWasm" | "Text" | "Data";
|
2823
|
-
include?: string[];
|
2824
|
-
fallthrough?: boolean;
|
2825
|
-
}
|
2826
|
-
|
2827
2947
|
declare interface MultiCacheQueryOptions extends CacheQueryOptions {
|
2828
2948
|
cacheName?: string
|
2829
2949
|
}
|
2830
2950
|
|
2951
|
+
/**
|
2952
|
+
* Wrangler can provide Node.js compatibility in a number of different modes:
|
2953
|
+
* - "legacy" - this mode adds compile-time polyfills that are not well maintained and cannot work with workerd runtime builtins.
|
2954
|
+
* - "v1" - this mode tells the workerd runtime to enable some Node.js builtin libraries (accessible only via `node:...` imports) but no globals.
|
2955
|
+
* - "v2" - this mode tells the workerd runtime to enable more Node.js builtin libraries (accessible both with and without the `node:` prefix)
|
2956
|
+
* and also some Node.js globals such as `Buffer`; it also turns on additional compile-time polyfills for those that are not provided by the runtime.
|
2957
|
+
*/
|
2958
|
+
declare type NodeJSCompatMode = "legacy" | "v1" | "v2" | null;
|
2959
|
+
|
2831
2960
|
declare interface PagesConfigFields {
|
2832
2961
|
/**
|
2833
2962
|
* The directory of static assets to serve.
|
@@ -2896,6 +3025,10 @@ declare interface PagesDeployOptions {
|
|
2896
3025
|
* Default: true
|
2897
3026
|
*/
|
2898
3027
|
bundle?: boolean;
|
3028
|
+
/**
|
3029
|
+
* Whether to upload any server-side sourcemaps with this deployment
|
3030
|
+
*/
|
3031
|
+
sourceMaps: boolean;
|
2899
3032
|
/**
|
2900
3033
|
* Command line args passed to the `pages deploy` cmd
|
2901
3034
|
*/
|
@@ -23311,7 +23444,7 @@ declare type ProxyControllerEventMap = ControllerEventMap & {
|
|
23311
23444
|
declare type ProxyData = {
|
23312
23445
|
userWorkerUrl: UrlOriginParts;
|
23313
23446
|
userWorkerInspectorUrl: UrlOriginAndPathnameParts;
|
23314
|
-
userWorkerInnerUrlOverrides
|
23447
|
+
userWorkerInnerUrlOverrides?: Partial<UrlOriginParts>;
|
23315
23448
|
headers: Record<string, string>;
|
23316
23449
|
liveReload?: boolean;
|
23317
23450
|
proxyLogsToController?: boolean;
|
@@ -23339,20 +23472,8 @@ declare type ProxyWorkerOutgoingRequestBody = {
|
|
23339
23472
|
|
23340
23473
|
declare type QueueConsumer = NonNullable<Config["queues"]["consumers"]>[number];
|
23341
23474
|
|
23342
|
-
declare type RawConfig = Partial<ConfigFields<RawDevConfig>> & PagesConfigFields & RawEnvironment & DeprecatedConfigFields & EnvironmentMap & {
|
23343
|
-
$schema?: string;
|
23344
|
-
};
|
23345
|
-
|
23346
23475
|
declare type RawDevConfig = Partial<DevConfig>;
|
23347
23476
|
|
23348
|
-
/**
|
23349
|
-
* The raw environment configuration that we read from the config file.
|
23350
|
-
*
|
23351
|
-
* All the properties are optional, and will be replaced with defaults in the configuration that
|
23352
|
-
* is used in the rest of the codebase.
|
23353
|
-
*/
|
23354
|
-
declare type RawEnvironment = Partial<Environment> & EnvironmentDeprecated;
|
23355
|
-
|
23356
23477
|
declare type ReadyEvent = {
|
23357
23478
|
type: "ready";
|
23358
23479
|
proxyWorker: Miniflare;
|
@@ -23684,7 +23805,7 @@ declare function setGlobalOrigin(origin: string | URL | undefined): void;
|
|
23684
23805
|
declare type SimpleRoute = string;
|
23685
23806
|
|
23686
23807
|
export declare type SourcelessWorkerOptions = Omit<WorkerOptions, "script" | "scriptPath" | "modules" | "modulesRoot"> & {
|
23687
|
-
modulesRules?:
|
23808
|
+
modulesRules?: ModuleRule[];
|
23688
23809
|
};
|
23689
23810
|
|
23690
23811
|
/**
|
@@ -23718,9 +23839,7 @@ declare interface StartDevWorkerOptions {
|
|
23718
23839
|
*/
|
23719
23840
|
script: File_2<string>;
|
23720
23841
|
/** The configuration of the worker. */
|
23721
|
-
config?: File_2<
|
23722
|
-
env?: string;
|
23723
|
-
};
|
23842
|
+
config?: File_2<Config>;
|
23724
23843
|
/** The compatibility date for the workerd runtime. */
|
23725
23844
|
compatibilityDate?: string;
|
23726
23845
|
/** The compatibility flags for the workerd runtime. */
|
@@ -23735,25 +23854,49 @@ declare interface StartDevWorkerOptions {
|
|
23735
23854
|
include?: string[];
|
23736
23855
|
exclude?: string[];
|
23737
23856
|
};
|
23857
|
+
/** Service environments. Providing support for existing workers with this property. Don't use this for new workers. */
|
23858
|
+
env?: string;
|
23859
|
+
/** Wrangler environments, defaults to true. */
|
23860
|
+
legacyEnv?: boolean;
|
23861
|
+
/**
|
23862
|
+
* Whether Wrangler should send usage metrics to Cloudflare for this project.
|
23863
|
+
*
|
23864
|
+
* When defined this will override any user settings.
|
23865
|
+
* Otherwise, Wrangler will use the user's preference.
|
23866
|
+
*/
|
23867
|
+
sendMetrics?: boolean;
|
23868
|
+
usageModel?: "bundled" | "unbound";
|
23869
|
+
_bindings?: CfWorkerInit["bindings"];
|
23870
|
+
_entry?: Entry;
|
23871
|
+
_projectRoot?: string;
|
23872
|
+
_serveAssetsFromWorker?: boolean;
|
23873
|
+
_assets?: Config["assets"];
|
23874
|
+
_processEntrypoint?: boolean;
|
23875
|
+
_additionalModules?: CfModule[];
|
23738
23876
|
/** Options applying to the worker's build step. Applies to deploy and dev. */
|
23739
23877
|
build?: {
|
23740
23878
|
/** Whether the worker and its dependencies are bundled. Defaults to true. */
|
23741
23879
|
bundle?: boolean;
|
23880
|
+
findAdditionalModules?: boolean;
|
23742
23881
|
/** Specifies types of modules matched by globs. */
|
23743
|
-
moduleRules?:
|
23744
|
-
/** Replace global identifiers with constant expressions, e.g.
|
23745
|
-
define
|
23882
|
+
moduleRules?: Rule[];
|
23883
|
+
/** Replace global identifiers with constant expressions, e.g. { debug: 'true', version: '"1.0.0"' }. Only takes effect if bundle: true. */
|
23884
|
+
define?: Record<string, string>;
|
23746
23885
|
/** Whether the bundled worker is minified. Only takes effect if bundle: true. */
|
23747
|
-
minify
|
23886
|
+
minify?: boolean;
|
23748
23887
|
/** Options controlling a custom build step. */
|
23749
23888
|
custom: {
|
23750
23889
|
/** Custom shell command to run before bundling. Runs even if bundle. */
|
23751
|
-
command
|
23890
|
+
command?: string;
|
23752
23891
|
/** The cwd to run the command in. */
|
23753
23892
|
workingDirectory?: string;
|
23754
23893
|
/** Filepath(s) to watch for changes. Upon changes, the command will be rerun. */
|
23755
23894
|
watch?: string | string[];
|
23756
23895
|
};
|
23896
|
+
jsxFactory?: string;
|
23897
|
+
jsxFragment?: string;
|
23898
|
+
tsconfig?: string;
|
23899
|
+
nodejsCompatMode?: NodeJSCompatMode;
|
23757
23900
|
};
|
23758
23901
|
/** Options applying to the worker's development preview environment. */
|
23759
23902
|
dev?: {
|
@@ -23786,7 +23929,7 @@ declare interface StartDevWorkerOptions {
|
|
23786
23929
|
httpsCertPath?: string;
|
23787
23930
|
};
|
23788
23931
|
/** Controls what request.url looks like inside the worker. */
|
23789
|
-
|
23932
|
+
origin?: {
|
23790
23933
|
hostname?: string;
|
23791
23934
|
secure?: boolean;
|
23792
23935
|
};
|
@@ -23796,6 +23939,7 @@ declare interface StartDevWorkerOptions {
|
|
23796
23939
|
mockFetch?: undici.MockAgent;
|
23797
23940
|
/** Gets a fetcher to a specific worker, used for multi-worker development */
|
23798
23941
|
getRegisteredWorker?(name: string): WorkerDefinition | undefined;
|
23942
|
+
testScheduled?: boolean;
|
23799
23943
|
};
|
23800
23944
|
}
|
23801
23945
|
|
@@ -24072,7 +24216,6 @@ export declare interface UnstableDevOptions {
|
|
24072
24216
|
inspect?: boolean;
|
24073
24217
|
local?: boolean;
|
24074
24218
|
accountId?: string;
|
24075
|
-
updateCheck?: boolean;
|
24076
24219
|
experimental?: {
|
24077
24220
|
processEntrypoint?: boolean;
|
24078
24221
|
additionalModules?: CfModule[];
|
@@ -24086,6 +24229,7 @@ export declare interface UnstableDevOptions {
|
|
24086
24229
|
testMode?: boolean;
|
24087
24230
|
testScheduled?: boolean;
|
24088
24231
|
watch?: boolean;
|
24232
|
+
devEnv?: boolean;
|
24089
24233
|
};
|
24090
24234
|
}
|
24091
24235
|
|