@cloudflare/workers-utils 0.2.0 → 0.3.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/dist/browser.mjs +2 -1
- package/dist/{chunk-DBPNILFW.mjs → chunk-73TUG5Z7.mjs} +2 -3
- package/dist/chunk-DCOBXSFB.mjs +39 -0
- package/dist/index.d.mts +312 -1
- package/dist/index.mjs +786 -62
- package/dist/metafile-esm.json +1 -1
- package/dist/test-helpers/index.d.mts +26 -0
- package/dist/test-helpers/index.mjs +188 -0
- package/package.json +14 -8
package/dist/browser.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { constructWranglerConfig } from './chunk-
|
|
1
|
+
export { constructWranglerConfig } from './chunk-73TUG5Z7.mjs';
|
|
2
|
+
import './chunk-DCOBXSFB.mjs';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
1
|
+
import { __name } from './chunk-DCOBXSFB.mjs';
|
|
3
2
|
|
|
4
3
|
// src/constants.ts
|
|
5
4
|
var INHERIT_SYMBOL = Symbol.for("inherit_binding");
|
|
@@ -437,4 +436,4 @@ function constructWranglerConfig(workerOrWorkers) {
|
|
|
437
436
|
}
|
|
438
437
|
__name(constructWranglerConfig, "constructWranglerConfig");
|
|
439
438
|
|
|
440
|
-
export { ENVIRONMENT_TAG_PREFIX, INHERIT_SYMBOL, PATH_TO_DEPLOY_CONFIG, SERVICE_TAG_PREFIX,
|
|
439
|
+
export { ENVIRONMENT_TAG_PREFIX, INHERIT_SYMBOL, PATH_TO_DEPLOY_CONFIG, SERVICE_TAG_PREFIX, assertNever, constructWranglerConfig, formatCompatibilityDate, mapWorkerMetadataBindings };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
9
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
+
}) : x)(function(x) {
|
|
11
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
+
});
|
|
14
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
15
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
16
|
+
};
|
|
17
|
+
var __export = (target, all) => {
|
|
18
|
+
for (var name in all)
|
|
19
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
20
|
+
};
|
|
21
|
+
var __copyProps = (to, from, except, desc) => {
|
|
22
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
23
|
+
for (let key of __getOwnPropNames(from))
|
|
24
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
25
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
26
|
+
}
|
|
27
|
+
return to;
|
|
28
|
+
};
|
|
29
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
30
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
31
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
32
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
33
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
34
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
35
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
36
|
+
mod
|
|
37
|
+
));
|
|
38
|
+
|
|
39
|
+
export { __commonJS, __export, __name, __reExport, __require, __toESM };
|
package/dist/index.d.mts
CHANGED
|
@@ -349,4 +349,315 @@ declare function formatCompatibilityDate(date: Date): string;
|
|
|
349
349
|
*/
|
|
350
350
|
declare function mapWorkerMetadataBindings(bindings: WorkerMetadataBinding[]): RawConfig;
|
|
351
351
|
|
|
352
|
-
|
|
352
|
+
/**
|
|
353
|
+
* Environment variables supported by Wrangler for configuration and authentication.
|
|
354
|
+
* Each variable is documented with its individual JSDoc comment below.
|
|
355
|
+
*/
|
|
356
|
+
type VariableNames =
|
|
357
|
+
/** Overrides the account ID for API requests. Can also be set in Wrangler config via `account_id` field. */
|
|
358
|
+
"CLOUDFLARE_ACCOUNT_ID"
|
|
359
|
+
/** API token for authentication. Preferred over API key + email. */
|
|
360
|
+
| "CLOUDFLARE_API_TOKEN"
|
|
361
|
+
/** Legacy API key for authentication. Requires CLOUDFLARE_EMAIL. It is preferred to use `CLOUDFLARE_API_TOKEN`. */
|
|
362
|
+
| "CLOUDFLARE_API_KEY"
|
|
363
|
+
/** Email address for API key authentication. Used with `CLOUDFLARE_API_KEY`. It is preferred to use `CLOUDFLARE_API_TOKEN`. */
|
|
364
|
+
| "CLOUDFLARE_EMAIL"
|
|
365
|
+
/** Custom API base URL. Defaults to https://api.cloudflare.com/client/v4 */
|
|
366
|
+
| "CLOUDFLARE_API_BASE_URL"
|
|
367
|
+
/** Set to "fedramp_high" for FedRAMP High compliance region. This will update the API/AUTH URLs used to make requests to Cloudflare. */
|
|
368
|
+
| "CLOUDFLARE_COMPLIANCE_REGION"
|
|
369
|
+
/** API token for R2 SQL service. */
|
|
370
|
+
| "WRANGLER_R2_SQL_AUTH_TOKEN"
|
|
371
|
+
/** Local database connection strings for Hyperdrive development. The * should be replaced with the Hyperdrive binding name in the Worker. */
|
|
372
|
+
| `CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_${string}`
|
|
373
|
+
/** Suppress Hyperdrive-related warnings during development. */
|
|
374
|
+
| "NO_HYPERDRIVE_WARNING"
|
|
375
|
+
/** Path to HTTPS private key file for running the local development server in HTTPS mode. Without this Wrangler will generate keys automatically. */
|
|
376
|
+
| "WRANGLER_HTTPS_KEY_PATH"
|
|
377
|
+
/** Path to HTTPS certificate file for running the local development server in HTTPS mode. Without this Wrangler will generate keys automatically. */
|
|
378
|
+
| "WRANGLER_HTTPS_CERT_PATH"
|
|
379
|
+
/** Load development variables from .env files (default: true). */
|
|
380
|
+
| "CLOUDFLARE_LOAD_DEV_VARS_FROM_DOT_ENV"
|
|
381
|
+
/** Include process.env in development variables (default: false). */
|
|
382
|
+
| "CLOUDFLARE_INCLUDE_PROCESS_ENV"
|
|
383
|
+
/** Include a trace header in all API requests that Wrangler makes (for internal use only) */
|
|
384
|
+
| "WRANGLER_TRACE_ID"
|
|
385
|
+
/** Disable the check for mixed state of subdomain flags (`workers_dev`, `preview_urls`, etc.) (default: false). */
|
|
386
|
+
| "WRANGLER_DISABLE_SUBDOMAIN_MIXED_STATE_CHECK"
|
|
387
|
+
/** Set log level: "debug", "info", "log", "warn", "error". */
|
|
388
|
+
| "WRANGLER_LOG"
|
|
389
|
+
/** Directory for debug log files. */
|
|
390
|
+
| "WRANGLER_LOG_PATH"
|
|
391
|
+
/** Sanitize sensitive data in debug logs (default: true). */
|
|
392
|
+
| "WRANGLER_LOG_SANITIZE"
|
|
393
|
+
/** Directory for ND-JSON output files. */
|
|
394
|
+
| "WRANGLER_OUTPUT_FILE_DIRECTORY"
|
|
395
|
+
/** Hide the Wrangler version banner */
|
|
396
|
+
| "WRANGLER_HIDE_BANNER"
|
|
397
|
+
/** Specific path for ND-JSON output file. */
|
|
398
|
+
| "WRANGLER_OUTPUT_FILE_PATH"
|
|
399
|
+
/** Comma-separated list of build conditions for esbuild. */
|
|
400
|
+
| "WRANGLER_BUILD_CONDITIONS"
|
|
401
|
+
/** Build platform for esbuild (e.g., "node", "browser"). */
|
|
402
|
+
| "WRANGLER_BUILD_PLATFORM"
|
|
403
|
+
/** Path to file-based dev registry folder. */
|
|
404
|
+
| "WRANGLER_REGISTRY_PATH"
|
|
405
|
+
/** Additional D1 location choices (internal use). */
|
|
406
|
+
| "WRANGLER_D1_EXTRA_LOCATION_CHOICES"
|
|
407
|
+
/** The Workers environment to target (equivalent to the `--env` CLI param) */
|
|
408
|
+
| "CLOUDFLARE_ENV"
|
|
409
|
+
/** Set to "staging" to use staging APIs instead of production. */
|
|
410
|
+
| "WRANGLER_API_ENVIRONMENT"
|
|
411
|
+
/** Custom auth domain (usually auto-configured). */
|
|
412
|
+
| "WRANGLER_AUTH_DOMAIN"
|
|
413
|
+
/** Custom auth URL (usually auto-configured). */
|
|
414
|
+
| "WRANGLER_AUTH_URL"
|
|
415
|
+
/** Custom OAuth client ID (usually auto-configured). */
|
|
416
|
+
| "WRANGLER_CLIENT_ID"
|
|
417
|
+
/** Custom token URL (usually auto-configured). */
|
|
418
|
+
| "WRANGLER_TOKEN_URL"
|
|
419
|
+
/** Custom token revocation URL (usually auto-configured). */
|
|
420
|
+
| "WRANGLER_REVOKE_URL"
|
|
421
|
+
/** Direct authorization token for API requests. */
|
|
422
|
+
| "WRANGLER_CF_AUTHORIZATION_TOKEN"
|
|
423
|
+
/** Override command used by `wrangler init` (default: "create cloudflare@^2.5.0"). */
|
|
424
|
+
| "WRANGLER_C3_COMMAND"
|
|
425
|
+
/** Enable/disable telemetry data collection. */
|
|
426
|
+
| "WRANGLER_SEND_METRICS"
|
|
427
|
+
/** Enable/disable error reporting to Sentry. */
|
|
428
|
+
| "WRANGLER_SEND_ERROR_REPORTS"
|
|
429
|
+
/** CI branch name (internal use). */
|
|
430
|
+
| "WORKERS_CI_BRANCH"
|
|
431
|
+
/** CI tag matching configuration (internal use). */
|
|
432
|
+
| "WRANGLER_CI_MATCH_TAG"
|
|
433
|
+
/** CI override name configuration (internal use). */
|
|
434
|
+
| "WRANGLER_CI_OVERRIDE_NAME"
|
|
435
|
+
/** CI network mode host override (internal use). */
|
|
436
|
+
| "WRANGLER_CI_OVERRIDE_NETWORK_MODE_HOST"
|
|
437
|
+
/** CI preview alias generation (internal use). */
|
|
438
|
+
| "WRANGLER_CI_GENERATE_PREVIEW_ALIAS"
|
|
439
|
+
/** Disable config watching in ConfigController. */
|
|
440
|
+
| "WRANGLER_CI_DISABLE_CONFIG_WATCHING"
|
|
441
|
+
/** Path to docker binary (default: "docker"). */
|
|
442
|
+
| "WRANGLER_DOCKER_BIN"
|
|
443
|
+
/** Docker host configuration (handled separately from environment variable factory). */
|
|
444
|
+
| "WRANGLER_DOCKER_HOST"
|
|
445
|
+
/** Docker host configuration (handled separately from environment variable factory). */
|
|
446
|
+
| "DOCKER_HOST";
|
|
447
|
+
type DeprecatedNames = "CF_ACCOUNT_ID" | "CF_API_TOKEN" | "CF_API_KEY" | "CF_EMAIL" | "CF_API_BASE_URL";
|
|
448
|
+
type ElementType<A> = A extends readonly (infer T)[] ? T : never;
|
|
449
|
+
/**
|
|
450
|
+
* Create a function used to access a boolean environment variable. It may return undefined if the variable is not set.
|
|
451
|
+
*
|
|
452
|
+
* This is not memoized to allow us to change the value at runtime, such as in testing.
|
|
453
|
+
*
|
|
454
|
+
* The environment variable must be either "true" or "false" (after lowercasing), otherwise it will throw an error.
|
|
455
|
+
*/
|
|
456
|
+
declare function getBooleanEnvironmentVariableFactory(options: {
|
|
457
|
+
variableName: VariableNames;
|
|
458
|
+
}): () => boolean | undefined;
|
|
459
|
+
declare function getBooleanEnvironmentVariableFactory(options: {
|
|
460
|
+
variableName: VariableNames;
|
|
461
|
+
defaultValue: boolean | (() => boolean);
|
|
462
|
+
}): () => boolean;
|
|
463
|
+
/**
|
|
464
|
+
* Create a function used to access an environment variable. It may return undefined if the variable is not set.
|
|
465
|
+
*
|
|
466
|
+
* This is not memoized to allow us to change the value at runtime, such as in testing.
|
|
467
|
+
* A warning is shown if the client is using a deprecated version - but only once.
|
|
468
|
+
* If a list of choices is provided, then the environment variable must be one of those given.
|
|
469
|
+
*/
|
|
470
|
+
declare function getEnvironmentVariableFactory<Choices extends readonly string[]>(options: {
|
|
471
|
+
variableName: VariableNames;
|
|
472
|
+
deprecatedName?: DeprecatedNames;
|
|
473
|
+
choices?: Choices;
|
|
474
|
+
}): () => ElementType<Choices> | undefined;
|
|
475
|
+
/**
|
|
476
|
+
* Create a function used to access an environment variable, with a default value if the variable is not set.
|
|
477
|
+
*
|
|
478
|
+
* This is not memoized to allow us to change the value at runtime, such as in testing.
|
|
479
|
+
* A warning is shown if the client is using a deprecated version - but only once.
|
|
480
|
+
* If a list of choices is provided, then the environment variable must be one of those given.
|
|
481
|
+
*/
|
|
482
|
+
declare function getEnvironmentVariableFactory<Choices extends readonly string[]>(options: {
|
|
483
|
+
variableName: VariableNames;
|
|
484
|
+
deprecatedName?: DeprecatedNames;
|
|
485
|
+
defaultValue: () => ElementType<Choices>;
|
|
486
|
+
readonly choices?: Choices;
|
|
487
|
+
}): () => ElementType<Choices>;
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* `WRANGLER_C3_COMMAND` can override the command used by `wrangler init` when delegating to C3.
|
|
491
|
+
*
|
|
492
|
+
* By default this will use `create cloudflare@2`.
|
|
493
|
+
*
|
|
494
|
+
* To run against the beta release of C3 use:
|
|
495
|
+
*
|
|
496
|
+
* ```sh
|
|
497
|
+
* # Tell Wrangler to use the beta version of create-cloudflare
|
|
498
|
+
* WRANGLER_C3_COMMAND="create cloudflare@beta" npx wrangler init
|
|
499
|
+
* ```
|
|
500
|
+
*
|
|
501
|
+
* To test the integration between wrangler and C3 locally, use:
|
|
502
|
+
*
|
|
503
|
+
* ```sh
|
|
504
|
+
* # Ensure both Wrangler and C3 are built
|
|
505
|
+
* npm run build
|
|
506
|
+
* # Tell Wrangler to use the local version of create-cloudflare
|
|
507
|
+
* WRANGLER_C3_COMMAND="exec ./packages/create-cloudflare" npx wrangler init temp
|
|
508
|
+
* ```
|
|
509
|
+
*
|
|
510
|
+
* Note that you cannot use `WRANGLER_C3_COMMAND="create cloudflare@2"` if you are
|
|
511
|
+
* running Wrangler from inside the monorepo as the bin paths get messed up.
|
|
512
|
+
*/
|
|
513
|
+
declare const getC3CommandFromEnv: () => string;
|
|
514
|
+
/**
|
|
515
|
+
* `WRANGLER_SEND_METRICS` can override whether we attempt to send metrics information to Sparrow.
|
|
516
|
+
*/
|
|
517
|
+
declare const getWranglerSendMetricsFromEnv: () => boolean | undefined;
|
|
518
|
+
/**
|
|
519
|
+
* `WRANGLER_SEND_ERROR_REPORTS` can override whether we attempt to send error reports to Sentry.
|
|
520
|
+
*/
|
|
521
|
+
declare const getWranglerSendErrorReportsFromEnv: () => boolean | undefined;
|
|
522
|
+
/**
|
|
523
|
+
* Set `WRANGLER_API_ENVIRONMENT` environment variable to "staging" to tell Wrangler to hit the staging APIs rather than production.
|
|
524
|
+
*/
|
|
525
|
+
declare const getCloudflareApiEnvironmentFromEnv: () => "staging" | "production";
|
|
526
|
+
/**
|
|
527
|
+
* The compliance region to use for the API requests.
|
|
528
|
+
*/
|
|
529
|
+
type ComplianceConfig = Partial<Pick<Config, "compliance_region">>;
|
|
530
|
+
/** Used for commands that explicitly do not support compliance regions other than "public" */
|
|
531
|
+
declare const COMPLIANCE_REGION_CONFIG_PUBLIC: ComplianceConfig;
|
|
532
|
+
/**
|
|
533
|
+
* Used for commands where there is no configuration available and
|
|
534
|
+
* we rely upon the CLOUDFLARE_COMPLIANCE_REGION environment variable
|
|
535
|
+
* to determine the compliance region.
|
|
536
|
+
*/
|
|
537
|
+
declare const COMPLIANCE_REGION_CONFIG_UNKNOWN: ComplianceConfig;
|
|
538
|
+
/**
|
|
539
|
+
* Set `CLOUDFLARE_COMPLIANCE_REGION` environment variable to "fedramp_high"
|
|
540
|
+
* or set the `compliance_region` property in the Wrangler configuration
|
|
541
|
+
* to tell Wrangler to run in FedRAMP High compliance region mode, rather than "public" mode.
|
|
542
|
+
*/
|
|
543
|
+
declare const getCloudflareComplianceRegion: (complianceConfig: ComplianceConfig) => "public" | "fedramp_high";
|
|
544
|
+
/**
|
|
545
|
+
* `CLOUDFLARE_API_BASE_URL` specifies the URL to the Cloudflare API.
|
|
546
|
+
*
|
|
547
|
+
* If this environment variable is not set, it will default to a URL computed from the
|
|
548
|
+
* Cloudflare compliance region and the API environment.
|
|
549
|
+
*/
|
|
550
|
+
declare const getCloudflareApiBaseUrl: (complianceConfig: ComplianceConfig) => string;
|
|
551
|
+
/**
|
|
552
|
+
* Compute the subdomain for the compliance region.
|
|
553
|
+
*/
|
|
554
|
+
declare function getComplianceRegionSubdomain(complianceConfig: ComplianceConfig): string;
|
|
555
|
+
/**
|
|
556
|
+
* `WRANGLER_LOG_SANITIZE` specifies whether we sanitize debug logs.
|
|
557
|
+
*
|
|
558
|
+
* By default we do, since debug logs could be added to GitHub issues and shouldn't include sensitive information.
|
|
559
|
+
*/
|
|
560
|
+
declare const getSanitizeLogs: () => boolean;
|
|
561
|
+
/**
|
|
562
|
+
* `WRANGLER_OUTPUT_FILE_DIRECTORY` specifies a directory where we should write a file containing output data in ND-JSON format.
|
|
563
|
+
*
|
|
564
|
+
* If this is set a random file will be created in this directory, and certain Wrangler commands will write entries to this file.
|
|
565
|
+
* This is overridden by the `WRANGLER_OUTPUT_FILE_PATH` environment variable.
|
|
566
|
+
*/
|
|
567
|
+
declare const getOutputFileDirectoryFromEnv: () => string | undefined;
|
|
568
|
+
/**
|
|
569
|
+
* `WRANGLER_OUTPUT_FILE_PATH` specifies a path to a file where we should write output data in ND-JSON format.
|
|
570
|
+
*
|
|
571
|
+
* If this is set certain Wrangler commands will write entries to this file.
|
|
572
|
+
* This overrides the `WRANGLER_OUTPUT_FILE_DIRECTORY` environment variable.
|
|
573
|
+
*/
|
|
574
|
+
declare const getOutputFilePathFromEnv: () => string | undefined;
|
|
575
|
+
/**
|
|
576
|
+
* `WRANGLER_CI_MATCH_TAG` specifies a Worker tag
|
|
577
|
+
*
|
|
578
|
+
* If this is set, Wrangler will ensure the Worker being targeted has this tag
|
|
579
|
+
*/
|
|
580
|
+
declare const getCIMatchTag: () => string | undefined;
|
|
581
|
+
/**
|
|
582
|
+
* `WRANGLER_CI_OVERRIDE_NAME` specifies a Worker name
|
|
583
|
+
*
|
|
584
|
+
* If this is set, Wrangler will override the Worker name with this one
|
|
585
|
+
*/
|
|
586
|
+
declare const getCIOverrideName: () => string | undefined;
|
|
587
|
+
/**
|
|
588
|
+
* `WRANGLER_CI_OVERRIDE_NETWORK_MODE_HOST` specifies whether --network=host should be set
|
|
589
|
+
*
|
|
590
|
+
* If this is set to true, Wrangler will use the --network=host flag when calling out to docker to build container images
|
|
591
|
+
*/
|
|
592
|
+
declare const getCIOverrideNetworkModeHost: () => string | undefined;
|
|
593
|
+
/**
|
|
594
|
+
* `WRANGLER_CI_GENERATE_PREVIEW_ALIAS` specifies whether to generate a preview alias during version upload
|
|
595
|
+
*
|
|
596
|
+
* If this is set to true, Wrangler will attempt to autogenerate the preview alias by using the branch
|
|
597
|
+
* name. If the branch name is too long and an alias cannot be created, a warning will be printed to the console.
|
|
598
|
+
*/
|
|
599
|
+
declare const getCIGeneratePreviewAlias: () => "true" | "false";
|
|
600
|
+
/**
|
|
601
|
+
* `WORKERS_CI_BRANCH` is the branch name exposed by Workers CI
|
|
602
|
+
*
|
|
603
|
+
*/
|
|
604
|
+
declare const getWorkersCIBranchName: () => string | undefined;
|
|
605
|
+
/**
|
|
606
|
+
* `WRANGLER_BUILD_CONDITIONS` specifies the "build conditions" to use when importing packages at build time.
|
|
607
|
+
*
|
|
608
|
+
* See https://nodejs.org/api/packages.html#conditional-exports
|
|
609
|
+
* and https://esbuild.github.io/api/#how-conditions-work.
|
|
610
|
+
*
|
|
611
|
+
* If this is set, Wrangler will configure esbuild to use this list of conditions.
|
|
612
|
+
* The format is a string of comma separated conditions.
|
|
613
|
+
*/
|
|
614
|
+
declare const getBuildConditionsFromEnv: () => string | undefined;
|
|
615
|
+
/**
|
|
616
|
+
* `WRANGLER_BUILD_PLATFORM` specifies the "build platform" to use when importing packages at build time.
|
|
617
|
+
*
|
|
618
|
+
* See https://esbuild.github.io/api/#platform
|
|
619
|
+
* and https://esbuild.github.io/api/#how-conditions-work.
|
|
620
|
+
*
|
|
621
|
+
* If this is set, Wrangler will configure esbuild to use this platform.
|
|
622
|
+
*/
|
|
623
|
+
declare const getBuildPlatformFromEnv: () => string | undefined;
|
|
624
|
+
/**
|
|
625
|
+
* `WRANGLER_REGISTRY_PATH` specifies the file based dev registry folder
|
|
626
|
+
*/
|
|
627
|
+
declare const getRegistryPath: () => string;
|
|
628
|
+
/**
|
|
629
|
+
* `WRANGLER_D1_EXTRA_LOCATION_CHOICES` is an internal variable to let D1 team target their testing environments.
|
|
630
|
+
*
|
|
631
|
+
* External accounts cannot access testing environments, so should not set this variable.
|
|
632
|
+
*/
|
|
633
|
+
declare const getD1ExtraLocationChoices: () => string | undefined;
|
|
634
|
+
/**
|
|
635
|
+
* `WRANGLER_DOCKER_BIN` specifies the path to a docker binary.
|
|
636
|
+
*
|
|
637
|
+
* By default it's `docker`.
|
|
638
|
+
*/
|
|
639
|
+
declare const getDockerPath: () => string;
|
|
640
|
+
declare const getSubdomainMixedStateCheckDisabled: () => boolean;
|
|
641
|
+
/**
|
|
642
|
+
/**
|
|
643
|
+
* `CLOUDFLARE_LOAD_DEV_VARS_FROM_DOT_ENV` specifies whether to load vars for local dev from `.env` files.
|
|
644
|
+
*/
|
|
645
|
+
declare const getCloudflareLoadDevVarsFromDotEnv: () => boolean;
|
|
646
|
+
/**
|
|
647
|
+
* `CLOUDFLARE_INCLUDE_PROCESS_ENV` specifies whether to include the `process.env` in vars loaded from `.env` for local development.
|
|
648
|
+
*/
|
|
649
|
+
declare const getCloudflareIncludeProcessEnvFromEnv: () => boolean;
|
|
650
|
+
declare const getTraceHeader: () => string | undefined;
|
|
651
|
+
declare const getDisableConfigWatching: () => boolean;
|
|
652
|
+
/**
|
|
653
|
+
* Hide the Wrangler version banner and command status (deprecated/experimental) warnings
|
|
654
|
+
*/
|
|
655
|
+
declare const getWranglerHideBanner: () => boolean;
|
|
656
|
+
/**
|
|
657
|
+
* `CLOUDFLARE_ENV` specifies the currently selected Wrangler/Cloudflare environment.
|
|
658
|
+
*/
|
|
659
|
+
declare const getCloudflareEnv: () => string | undefined;
|
|
660
|
+
|
|
661
|
+
declare function getGlobalWranglerConfigPath(): string;
|
|
662
|
+
|
|
663
|
+
export { APIError, COMPLIANCE_REGION_CONFIG_PUBLIC, COMPLIANCE_REGION_CONFIG_UNKNOWN, CfWorkerInit, CommandLineArgsError, type ComplianceConfig, Config, type ConfigBindingOptions, DeprecationError, FatalError, type File, JsonFriendlyFatalError, type Location, type Message, MissingConfigError, type NormalizeAndValidateConfigArgs, type PackageJSON, ParseError, PatchConfigError, RawConfig, type ResolveConfigPathOptions, type TelemetryMessage, UserError, WorkerMetadataBinding, assertNever, bucketFormatMessage, configFileName, configFormat, createFatalError, experimental_patchConfig, experimental_readRawConfig, findWranglerConfig, formatCompatibilityDate, formatConfigSnippet, friendlyBindingNames, getBooleanEnvironmentVariableFactory, getBuildConditionsFromEnv, getBuildPlatformFromEnv, getC3CommandFromEnv, getCIGeneratePreviewAlias, getCIMatchTag, getCIOverrideName, getCIOverrideNetworkModeHost, getCloudflareApiBaseUrl, getCloudflareApiEnvironmentFromEnv, getCloudflareComplianceRegion, getCloudflareEnv, getCloudflareIncludeProcessEnvFromEnv, getCloudflareLoadDevVarsFromDotEnv, getComplianceRegionSubdomain, getD1ExtraLocationChoices, getDisableConfigWatching, getDockerPath, getEnvironmentVariableFactory, getGlobalWranglerConfigPath, getOutputFileDirectoryFromEnv, getOutputFilePathFromEnv, getRegistryPath, getSanitizeLogs, getSubdomainMixedStateCheckDisabled, getTraceHeader, getWorkersCIBranchName, getWranglerHideBanner, getWranglerSendErrorReportsFromEnv, getWranglerSendMetricsFromEnv, hasProperty, indexLocation, isOptionalProperty, isPagesConfig, isRequiredProperty, isValidR2BucketName, mapWorkerMetadataBindings, normalizeAndValidateConfig, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, readFileSync, readFileSyncToBuffer, resolveWranglerConfigPath, searchLocation, validatePagesConfig };
|