@cloudflare/workers-utils 0.27.0 → 0.29.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.d.mts +1 -1
- package/dist/browser.mjs +2 -2
- package/dist/{chunk-OTBYAUQ6.mjs → chunk-34VZWBGB.mjs} +2 -2
- package/dist/{chunk-XPMIK7N6.mjs → chunk-3K53PSCY.mjs} +12 -2
- package/dist/{chunk-OC543JY3.mjs → chunk-53IMCORZ.mjs} +1 -1
- package/dist/{chunk-ELQRF72O.mjs → chunk-J6JRMPLM.mjs} +1 -1
- package/dist/{chunk-DDRU76YD.mjs → chunk-Q72B4Q5Z.mjs} +5 -1
- package/dist/{chunk-TJ6ANXA2.mjs → chunk-Z62CVNHJ.mjs} +1 -1
- package/dist/{config-CkPlrcrD.d.mts → config-BEcnaWpD.d.mts} +78 -9
- package/dist/fs-helpers.mjs +2 -2
- package/dist/global-wrangler-config-path.mjs +3 -3
- package/dist/index.d.mts +22 -5
- package/dist/index.mjs +15458 -4231
- package/dist/metafile-esm.json +1 -1
- package/dist/{open-BCHIM4MY.mjs → open-PBXRGS4R.mjs} +1 -1
- package/dist/prometheus-metrics.mjs +2 -2
- package/dist/test-helpers/index.d.mts +1 -1
- package/dist/test-helpers/index.mjs +3 -3
- package/package.json +3 -3
package/dist/browser.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TailConsumer,
|
|
1
|
+
import { T as TailConsumer, aL as WorkerMetadata, R as RawConfig } from './config-BEcnaWpD.mjs';
|
|
2
2
|
import { AssetConfig } from '@cloudflare/workers-shared';
|
|
3
3
|
import { Cloudflare } from 'cloudflare';
|
|
4
4
|
import 'node:url';
|
package/dist/browser.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { constructWranglerConfig } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { constructWranglerConfig } from './chunk-J6JRMPLM.mjs';
|
|
2
|
+
import './chunk-Q72B4Q5Z.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __name } from './chunk-
|
|
1
|
+
import { __name } from './chunk-Q72B4Q5Z.mjs';
|
|
2
2
|
import { readFileSync as readFileSync$1, statSync, existsSync } from 'node:fs';
|
|
3
3
|
import path, { resolve, isAbsolute, dirname, join } from 'node:path';
|
|
4
4
|
|
|
@@ -2382,10 +2382,20 @@ var APIError = class extends ParseError {
|
|
|
2382
2382
|
* endpoint-specific structured error payloads.
|
|
2383
2383
|
*/
|
|
2384
2384
|
meta;
|
|
2385
|
-
|
|
2385
|
+
/**
|
|
2386
|
+
* Optional number of milliseconds the API asked us to wait before retrying,
|
|
2387
|
+
* derived from the response's `Retry-After` header (if present).
|
|
2388
|
+
*/
|
|
2389
|
+
retryAfterMs;
|
|
2390
|
+
constructor({
|
|
2391
|
+
status,
|
|
2392
|
+
retryAfterMs,
|
|
2393
|
+
...rest
|
|
2394
|
+
}) {
|
|
2386
2395
|
super(rest);
|
|
2387
2396
|
this.name = this.constructor.name;
|
|
2388
2397
|
this.#status = status;
|
|
2398
|
+
this.retryAfterMs = retryAfterMs;
|
|
2389
2399
|
}
|
|
2390
2400
|
get status() {
|
|
2391
2401
|
return this.#status;
|
|
@@ -14,6 +14,10 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
14
14
|
var __commonJS = (cb, mod) => function __require2() {
|
|
15
15
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
16
16
|
};
|
|
17
|
+
var __export = (target, all) => {
|
|
18
|
+
for (var name in all)
|
|
19
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
20
|
+
};
|
|
17
21
|
var __copyProps = (to, from, except, desc) => {
|
|
18
22
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
23
|
for (let key of __getOwnPropNames(from))
|
|
@@ -31,4 +35,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
31
35
|
mod
|
|
32
36
|
));
|
|
33
37
|
|
|
34
|
-
export { __commonJS, __name, __require, __toESM };
|
|
38
|
+
export { __commonJS, __export, __name, __require, __toESM };
|
|
@@ -204,6 +204,21 @@ declare const getOpenNextDeployFromEnv: () => string | undefined;
|
|
|
204
204
|
* `X_LOCAL_EXPLORER` enables the local explorer UI at /cdn-cgi/explorer.
|
|
205
205
|
*/
|
|
206
206
|
declare const getLocalExplorerEnabledFromEnv: () => boolean;
|
|
207
|
+
/**
|
|
208
|
+
* `X_LOCAL_OBSERVABILITY` turns on local-dev observability capture. Both
|
|
209
|
+
* `wrangler dev` and the Vite plugin read it and pass it through as the one
|
|
210
|
+
* `unsafeObservability` Miniflare option, which makes core attach the trace
|
|
211
|
+
* collector to each user worker.
|
|
212
|
+
*
|
|
213
|
+
* Temporarily defaults to `false` for release: defaulting it on attaches extra
|
|
214
|
+
* per-worker services (collector + streaming tail) that destabilise the
|
|
215
|
+
* multi-process dev-registry scenario on Windows (workerd socket "fetch
|
|
216
|
+
* failed"). Capture is now opt-in — set `X_LOCAL_OBSERVABILITY=true`, or turn it
|
|
217
|
+
* on from the Local Explorer's Observability tab (Vite dev), which reloads the
|
|
218
|
+
* runtime with capture enabled. The explorer UI itself (`X_LOCAL_EXPLORER`)
|
|
219
|
+
* stays on by default so the tab is always available.
|
|
220
|
+
*/
|
|
221
|
+
declare const getLocalObservabilityEnabledFromEnv: () => boolean;
|
|
207
222
|
/**
|
|
208
223
|
* `X_BROWSER_HEADFUL` opens the browser in headful (visible) mode when using the
|
|
209
224
|
* Browser Run API in local development.
|
|
@@ -286,6 +301,7 @@ type Logger = {
|
|
|
286
301
|
warn: typeof console.warn;
|
|
287
302
|
error: typeof console.error;
|
|
288
303
|
};
|
|
304
|
+
console?<M extends Exclude<keyof Console, "Console">>(method: M, ...args: Parameters<Console[M]>): void;
|
|
289
305
|
};
|
|
290
306
|
|
|
291
307
|
type ApiCredentials = {
|
|
@@ -316,11 +332,22 @@ declare function performApiFetchBase(complianceConfig: ComplianceConfig, resourc
|
|
|
316
332
|
declare function fetchInternalBase<ResponseType>(complianceConfig: ComplianceConfig, resource: string, init: RequestInit | undefined, userAgent: string, logger: Logger, queryParams?: URLSearchParams, abortSignal?: AbortSignal, credentials?: ApiCredentials): Promise<{
|
|
317
333
|
response: ResponseType;
|
|
318
334
|
status: number;
|
|
335
|
+
retryAfterMs?: number;
|
|
319
336
|
}>;
|
|
320
337
|
declare function fetchResultBase<ResponseType>(complianceConfig: ComplianceConfig, resource: string, init: RequestInit | undefined, userAgent: string, logger: Logger, queryParams?: URLSearchParams, abortSignal?: AbortSignal, credentials?: ApiCredentials): Promise<ResponseType>;
|
|
321
338
|
declare function fetchListResultBase<ResponseType>(complianceConfig: ComplianceConfig, resource: string, init: RequestInit | undefined, userAgent: string, logger: Logger, queryParams?: URLSearchParams, credentials?: ApiCredentials): Promise<ResponseType[]>;
|
|
322
339
|
declare function truncate(text: string, maxLength: number): string;
|
|
323
340
|
declare function isWAFBlockResponse(headers: Headers): boolean;
|
|
341
|
+
/**
|
|
342
|
+
* Parses a `Retry-After` header value (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After)
|
|
343
|
+
* into milliseconds to wait before retrying, or `undefined` if absent/unparsable.
|
|
344
|
+
*
|
|
345
|
+
* Per the HTTP spec, `Retry-After` may either be a number of delay-seconds,
|
|
346
|
+
* or an HTTP-date after which the request may be retried.
|
|
347
|
+
*/
|
|
348
|
+
declare function parseRetryAfterValue(retryAfter: string | null | undefined): number | undefined;
|
|
349
|
+
/** Same as {@link parseRetryAfterValue}, reading the value from a `Headers` object. */
|
|
350
|
+
declare function parseRetryAfterMs(headers: Headers): number | undefined;
|
|
324
351
|
declare function extractWAFBlockRayId(headers: Headers): string | undefined;
|
|
325
352
|
declare function extractAccountTag(resource: string): string | undefined;
|
|
326
353
|
interface PageResultInfo {
|
|
@@ -336,7 +363,7 @@ declare function renderError(err: FetchError | {
|
|
|
336
363
|
documentation_url?: string;
|
|
337
364
|
}, level?: number): string;
|
|
338
365
|
declare function addAuthorizationHeader(headers: Headers, auth: ApiCredentials, overrideExisting?: boolean): void;
|
|
339
|
-
declare function throwFetchError(resource: string, response: FetchResult<unknown>, status: number): never;
|
|
366
|
+
declare function throwFetchError(resource: string, response: FetchResult<unknown>, status: number, retryAfterMs?: number): never;
|
|
340
367
|
/**
|
|
341
368
|
* Fetch a raw KV value from the Cloudflare API.
|
|
342
369
|
*
|
|
@@ -530,7 +557,7 @@ interface CfWorkflow {
|
|
|
530
557
|
}
|
|
531
558
|
interface CfQueue {
|
|
532
559
|
binding: string;
|
|
533
|
-
queue_name
|
|
560
|
+
queue_name?: string | typeof INHERIT_SYMBOL;
|
|
534
561
|
delivery_delay?: number;
|
|
535
562
|
remote?: boolean;
|
|
536
563
|
raw?: boolean;
|
|
@@ -541,6 +568,11 @@ interface CfR2Bucket {
|
|
|
541
568
|
jurisdiction?: string;
|
|
542
569
|
remote?: boolean;
|
|
543
570
|
raw?: boolean;
|
|
571
|
+
/** Settings that only apply to local development */
|
|
572
|
+
local_dev?: {
|
|
573
|
+
/** EXPERIMENTAL: credentials for the local S3-compatible endpoint */
|
|
574
|
+
experimental_s3_credentials?: LocalS3Credentials;
|
|
575
|
+
};
|
|
544
576
|
}
|
|
545
577
|
interface CfD1Database {
|
|
546
578
|
binding: string;
|
|
@@ -595,7 +627,7 @@ interface CfHelloWorld {
|
|
|
595
627
|
}
|
|
596
628
|
interface CfFlagship {
|
|
597
629
|
binding: string;
|
|
598
|
-
app_id
|
|
630
|
+
app_id?: string | typeof INHERIT_SYMBOL;
|
|
599
631
|
remote?: boolean;
|
|
600
632
|
}
|
|
601
633
|
interface CfWorkerLoader {
|
|
@@ -659,7 +691,7 @@ interface CfAnalyticsEngineDataset {
|
|
|
659
691
|
}
|
|
660
692
|
interface CfDispatchNamespace {
|
|
661
693
|
binding: string;
|
|
662
|
-
namespace
|
|
694
|
+
namespace?: string | typeof INHERIT_SYMBOL;
|
|
663
695
|
outbound?: {
|
|
664
696
|
service: string;
|
|
665
697
|
environment?: string;
|
|
@@ -1550,7 +1582,7 @@ type Entry = {
|
|
|
1550
1582
|
/**
|
|
1551
1583
|
* Wrangler configuration types. The JSDoc on these fields is also the source
|
|
1552
1584
|
* of truth for the equivalent fields in `@cloudflare/config`
|
|
1553
|
-
* (`packages/config/src/types.ts` — `
|
|
1585
|
+
* (`packages/config/src/types.ts` — `WorkerConfig` — and the binding option
|
|
1554
1586
|
* interfaces in `packages/config/src/config.ts`). When editing prose here,
|
|
1555
1587
|
* mirror the changes there.
|
|
1556
1588
|
*/
|
|
@@ -1564,6 +1596,11 @@ type Entry = {
|
|
|
1564
1596
|
interface Environment extends EnvironmentInheritable, EnvironmentNonInheritable {
|
|
1565
1597
|
}
|
|
1566
1598
|
type SimpleRoute = string;
|
|
1599
|
+
/** AWS SigV4 credentials for miniflare's local S3-compatible endpoint */
|
|
1600
|
+
interface LocalS3Credentials {
|
|
1601
|
+
accessKeyId: string;
|
|
1602
|
+
secretAccessKey: string;
|
|
1603
|
+
}
|
|
1567
1604
|
type ZoneIdRoute = {
|
|
1568
1605
|
pattern: string;
|
|
1569
1606
|
zone_id: string;
|
|
@@ -2436,7 +2473,7 @@ interface EnvironmentNonInheritable {
|
|
|
2436
2473
|
/** The binding name used to refer to the Queue in the Worker. */
|
|
2437
2474
|
binding: string;
|
|
2438
2475
|
/** The name of this Queue. */
|
|
2439
|
-
queue
|
|
2476
|
+
queue?: string;
|
|
2440
2477
|
/** The number of seconds to wait before delivering a message */
|
|
2441
2478
|
delivery_delay?: number;
|
|
2442
2479
|
/** Whether the Queue producer should be remote or not in local development */
|
|
@@ -2486,6 +2523,16 @@ interface EnvironmentNonInheritable {
|
|
|
2486
2523
|
jurisdiction?: string;
|
|
2487
2524
|
/** Whether the R2 bucket should be remote or not in local development */
|
|
2488
2525
|
remote?: boolean;
|
|
2526
|
+
/** Settings that only apply to local development */
|
|
2527
|
+
local_dev?: {
|
|
2528
|
+
/**
|
|
2529
|
+
* EXPERIMENTAL: AWS SigV4 credentials for the local S3-compatible
|
|
2530
|
+
* endpoint. When set, the bucket is served at
|
|
2531
|
+
* `/cdn-cgi/local/r2/s3/<bucket-name>` during local development.
|
|
2532
|
+
* Ignored when the bucket runs remotely.
|
|
2533
|
+
*/
|
|
2534
|
+
experimental_s3_credentials?: LocalS3Credentials;
|
|
2535
|
+
};
|
|
2489
2536
|
}[];
|
|
2490
2537
|
/**
|
|
2491
2538
|
* Specifies D1 databases that are bound to this Worker environment.
|
|
@@ -2863,7 +2910,7 @@ interface EnvironmentNonInheritable {
|
|
|
2863
2910
|
/** The binding name used to refer to the bound service. */
|
|
2864
2911
|
binding: string;
|
|
2865
2912
|
/** The namespace to bind to. */
|
|
2866
|
-
namespace
|
|
2913
|
+
namespace?: string;
|
|
2867
2914
|
/** Details about the outbound Worker which will handle outbound requests from your namespace */
|
|
2868
2915
|
outbound?: DispatchNamespaceOutbound;
|
|
2869
2916
|
/** Whether the Dispatch Namespace should be remote or not in local development */
|
|
@@ -2954,7 +3001,7 @@ interface EnvironmentNonInheritable {
|
|
|
2954
3001
|
/** The binding name used to refer to the bound Flagship service. */
|
|
2955
3002
|
binding: string;
|
|
2956
3003
|
/** The Flagship app ID to bind to. */
|
|
2957
|
-
app_id
|
|
3004
|
+
app_id?: string;
|
|
2958
3005
|
/** Set to `true` to suppress the remote binding warning in local dev. Flagship bindings are always remote. */
|
|
2959
3006
|
remote?: boolean;
|
|
2960
3007
|
}[];
|
|
@@ -3235,6 +3282,15 @@ interface ConfigFields<Dev extends RawDevConfig> {
|
|
|
3235
3282
|
dependencies_instrumentation: {
|
|
3236
3283
|
/** Whether dependency instrumentation is enabled. Defaults to `true`. */
|
|
3237
3284
|
enabled: boolean;
|
|
3285
|
+
/**
|
|
3286
|
+
* An optional list of package name patterns to exclude from the
|
|
3287
|
+
* collected dependency metadata.
|
|
3288
|
+
*
|
|
3289
|
+
* Each entry can be an exact package name (e.g. `"lodash"`) or a glob
|
|
3290
|
+
* pattern using `*` as a wildcard (e.g. `"@internal/*"` to exclude all
|
|
3291
|
+
* packages under the `@internal` scope).
|
|
3292
|
+
*/
|
|
3293
|
+
exclude_packages?: string[];
|
|
3238
3294
|
} | undefined;
|
|
3239
3295
|
/**
|
|
3240
3296
|
* Options to configure the development server that your worker will use.
|
|
@@ -3330,6 +3386,19 @@ interface ConfigFields<Dev extends RawDevConfig> {
|
|
|
3330
3386
|
* @nonInheritable
|
|
3331
3387
|
*/
|
|
3332
3388
|
keep_vars?: boolean;
|
|
3389
|
+
/**
|
|
3390
|
+
* The inbound email addresses handled by the Worker being deployed.
|
|
3391
|
+
*
|
|
3392
|
+
* Each entry is a literal recipient address (e.g. `"support@example.com"`)
|
|
3393
|
+
* or a `*@domain` catch-all (e.g. `"*@example.com"`). Every entry creates an
|
|
3394
|
+
* Email Routing rule whose action routes mail to this Worker.
|
|
3395
|
+
*
|
|
3396
|
+
* This field is top-level only and applies to every environment of the
|
|
3397
|
+
* Worker; it cannot be set under `env.*`.
|
|
3398
|
+
*
|
|
3399
|
+
* @nonInheritable
|
|
3400
|
+
*/
|
|
3401
|
+
addresses?: string[];
|
|
3333
3402
|
}
|
|
3334
3403
|
interface PagesConfigFields {
|
|
3335
3404
|
/**
|
|
@@ -3424,4 +3493,4 @@ interface EnvironmentMap {
|
|
|
3424
3493
|
}
|
|
3425
3494
|
declare const defaultWranglerConfig: Config;
|
|
3426
3495
|
|
|
3427
|
-
export { type
|
|
3496
|
+
export { type CfMediaBinding as $, type Assets as A, type Binding as B, type ComputedFields as C, type DurableObjectExport as D, type Exports as E, type DockerConfiguration as F, type ContainerEngine as G, type CfScriptFormat as H, type CfModuleType as I, type CfModule as J, type CfVars as K, type Logger as L, type CfKvNamespace as M, type CfSendEmailBindings as N, type Observability as O, type PreviewsConfig as P, type CfWasmModuleBindings as Q, type RawConfig as R, type StreamingTailConsumer as S, type TailConsumer as T, type UserLimits as U, type CfTextBlobBindings as V, type WorkerEntrypointExport as W, type CfBrowserBinding as X, type CfAIBinding as Y, type ZoneIdRoute as Z, type CfImagesBinding as _, type RedirectedRawConfig as a, type Hook as a$, type CfStreamBinding as a0, type CfVersionMetadataBinding as a1, type CfDataBlobBindings as a2, type CfDurableObject as a3, type CfWorkflow as a4, type CfQueue as a5, type CfR2Bucket as a6, type CfD1Database as a7, type CfVectorize as a8, type CfAISearchNamespace as a9, type CfPlacement as aA, type CfTailConsumer as aB, type CfUserLimits as aC, type CfWorkerInit as aD, type CfWorkerContext as aE, type CfWorkerSourceMap as aF, type Json as aG, type AssetConfigMetadata as aH, type AssetsOptions as aI, type ValidatedAssetsOptions as aJ, type LegacyAssetPaths as aK, type WorkerMetadata as aL, type ExportsReconciliationEntryBase as aM, type ExportsReconciliationInfo as aN, type ExportsReconciliationWarning as aO, type ExportsReconciliationErrorDetail as aP, type ExportsReconciliationRename as aQ, type ExportsReconciliationTransfer as aR, type ExportsReconciliationTransferPending as aS, type ExportsReconciliationResult as aT, type ServiceMetadataRes as aU, type ServiceFetch as aV, type File as aW, type BinaryFile as aX, type Trigger as aY, type CfAccount as aZ, type HookValues as a_, type CfAISearch as aa, type CfWebSearch as ab, type CfAgentMemory as ac, type CfSecretsStoreSecrets as ad, type CfArtifacts as ae, type CfHelloWorld as af, type CfFlagship as ag, type CfWorkerLoader as ah, type CfRateLimit as ai, type CfHyperdrive as aj, type CfDevPluginCfg as ak, type CfService as al, type CfVpcService as am, type CfVpcNetwork as an, type CfAnalyticsEngineDataset as ao, type CfDispatchNamespace as ap, type CfMTlsCertificate as aq, type CfLogfwdr as ar, type CfLogfwdrBinding as as, type CfAssetsBinding as at, type CfPipeline as au, type CfUnsafeBinding as av, type CfCapnp as aw, type CfUnsafe as ax, type CfDurableObjectMigrations as ay, type CfExports as az, type Config as b, hasMorePages as b$, type AsyncHook as b0, type LogLevel as b1, type NodeJSCompatMode as b2, type StartDevWorkerInput as b3, type Entry as b4, INHERIT_SYMBOL as b5, SERVICE_TAG_PREFIX as b6, ENVIRONMENT_TAG_PREFIX as b7, PATH_TO_DEPLOY_CONFIG as b8, JSON_CONFIG_FORMATS as b9, getTraceHeader as bA, getDisableConfigWatching as bB, getWranglerHideBanner as bC, getCloudflareEnv as bD, getOpenNextDeployFromEnv as bE, getLocalExplorerEnabledFromEnv as bF, getLocalObservabilityEnabledFromEnv as bG, getBrowserRenderingHeadfulFromEnv as bH, getCfFetchEnabledFromEnv as bI, getCfFetchPathFromEnv as bJ, getWranglerCacheDirFromEnv as bK, getCloudflaredPathFromEnv as bL, type ApiCredentials as bM, type FetchResult as bN, type FetchResultFetcher as bO, type FetchListResultFetcher as bP, type FetchPagedListResultFetcher as bQ, performApiFetchBase as bR, fetchInternalBase as bS, fetchResultBase as bT, fetchListResultBase as bU, truncate as bV, isWAFBlockResponse as bW, parseRetryAfterValue as bX, parseRetryAfterMs as bY, extractWAFBlockRayId as bZ, extractAccountTag as b_, getC3CommandFromEnv as ba, getWranglerSendMetricsFromEnv as bb, getWranglerSendErrorReportsFromEnv as bc, getCloudflareApiEnvironmentFromEnv as bd, type ComplianceConfig as be, COMPLIANCE_REGION_CONFIG_PUBLIC as bf, COMPLIANCE_REGION_CONFIG_UNKNOWN as bg, getCloudflareComplianceRegion as bh, getCloudflareApiBaseUrl as bi, getComplianceRegionSubdomain as bj, getSanitizeLogs as bk, getOutputFileDirectoryFromEnv as bl, getOutputFilePathFromEnv as bm, getCIMatchTag as bn, getCIOverrideName as bo, getCIOverrideNetworkModeHost as bp, getCIGeneratePreviewAlias as bq, getWorkersCIBranchName as br, getBuildConditionsFromEnv as bs, getBuildPlatformFromEnv as bt, getRegistryPath as bu, getD1ExtraLocationChoices as bv, getDockerPath as bw, getSubdomainMixedStateCheckDisabled as bx, getCloudflareLoadDevVarsFromDotEnv as by, getCloudflareIncludeProcessEnvFromEnv as bz, type WorkerMetadataBinding as c, renderError as c0, addAuthorizationHeader as c1, throwFetchError as c2, fetchKVGetValueBase as c3, type FetchKVGetValueFetcher as c4, hasCursor as c5, maybeAddTraceHeader as c6, type Route as d, type RawDevConfig as e, type ConfigFields as f, type RawEnvironment as g, defaultWranglerConfig as h, LOGGER_LEVELS as i, type LoggerLevel as j, type Environment as k, type LocalS3Credentials as l, type ZoneNameRoute as m, type CustomDomainRoute as n, type CloudchamberConfig as o, type ContainerApp as p, type DurableObjectMigration as q, type DurableObjectExportStorage as r, type ConfiguredExport as s, type DurableObjectBindings as t, type WorkflowBinding as u, type EnvironmentNonInheritable as v, type Rule as w, type ConfigModuleRuleType as x, type DispatchNamespaceOutbound as y, type CacheOptions as z };
|
package/dist/fs-helpers.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { isDirectory, removeDir, removeDirSync } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { isDirectory, removeDir, removeDirSync } from './chunk-53IMCORZ.mjs';
|
|
2
|
+
import './chunk-Q72B4Q5Z.mjs';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { getGlobalConfigPath, getGlobalWranglerCachePath } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { getGlobalConfigPath, getGlobalWranglerCachePath } from './chunk-34VZWBGB.mjs';
|
|
2
|
+
import './chunk-53IMCORZ.mjs';
|
|
3
|
+
import './chunk-Q72B4Q5Z.mjs';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ComputedFields, B as Binding, R as RawConfig, b as Config, E as Exports, D as DurableObjectExport, W as WorkerEntrypointExport, c as WorkerMetadataBinding, L as Logger, d as Route } from './config-
|
|
2
|
-
export {
|
|
1
|
+
import { C as ComputedFields, B as Binding, R as RawConfig, b as Config, E as Exports, D as DurableObjectExport, W as WorkerEntrypointExport, c as WorkerMetadataBinding, L as Logger, d as Route } from './config-BEcnaWpD.mjs';
|
|
2
|
+
export { bM as ApiCredentials, aH as AssetConfigMetadata, A as Assets, aI as AssetsOptions, b0 as AsyncHook, aX as BinaryFile, bf as COMPLIANCE_REGION_CONFIG_PUBLIC, bg as COMPLIANCE_REGION_CONFIG_UNKNOWN, z as CacheOptions, Y as CfAIBinding, aa as CfAISearch, a9 as CfAISearchNamespace, aZ as CfAccount, ac as CfAgentMemory, ao as CfAnalyticsEngineDataset, ae as CfArtifacts, at as CfAssetsBinding, X as CfBrowserBinding, aw as CfCapnp, a7 as CfD1Database, a2 as CfDataBlobBindings, ak as CfDevPluginCfg, ap as CfDispatchNamespace, a3 as CfDurableObject, ay as CfDurableObjectMigrations, az as CfExports, ag as CfFlagship, af as CfHelloWorld, aj as CfHyperdrive, _ as CfImagesBinding, M as CfKvNamespace, ar as CfLogfwdr, as as CfLogfwdrBinding, aq as CfMTlsCertificate, $ as CfMediaBinding, J as CfModule, I as CfModuleType, au as CfPipeline, aA as CfPlacement, a5 as CfQueue, a6 as CfR2Bucket, ai as CfRateLimit, H as CfScriptFormat, ad as CfSecretsStoreSecrets, N as CfSendEmailBindings, al as CfService, a0 as CfStreamBinding, aB as CfTailConsumer, V as CfTextBlobBindings, ax as CfUnsafe, av as CfUnsafeBinding, aC as CfUserLimits, K as CfVars, a8 as CfVectorize, a1 as CfVersionMetadataBinding, an as CfVpcNetwork, am as CfVpcService, Q as CfWasmModuleBindings, ab as CfWebSearch, aE as CfWorkerContext, aD as CfWorkerInit, ah as CfWorkerLoader, aF as CfWorkerSourceMap, a4 as CfWorkflow, o as CloudchamberConfig, be as ComplianceConfig, f as ConfigFields, x as ConfigModuleRuleType, s as ConfiguredExport, p as ContainerApp, G as ContainerEngine, n as CustomDomainRoute, y as DispatchNamespaceOutbound, F as DockerConfiguration, t as DurableObjectBindings, r as DurableObjectExportStorage, q as DurableObjectMigration, b7 as ENVIRONMENT_TAG_PREFIX, b4 as Entry, k as Environment, v as EnvironmentNonInheritable, aM as ExportsReconciliationEntryBase, aP as ExportsReconciliationErrorDetail, aN as ExportsReconciliationInfo, aQ as ExportsReconciliationRename, aT as ExportsReconciliationResult, aR as ExportsReconciliationTransfer, aS as ExportsReconciliationTransferPending, aO as ExportsReconciliationWarning, c4 as FetchKVGetValueFetcher, bP as FetchListResultFetcher, bQ as FetchPagedListResultFetcher, bN as FetchResult, bO as FetchResultFetcher, aW as File, a$ as Hook, a_ as HookValues, b5 as INHERIT_SYMBOL, b9 as JSON_CONFIG_FORMATS, aG as Json, i as LOGGER_LEVELS, aK as LegacyAssetPaths, l as LocalS3Credentials, b1 as LogLevel, j as LoggerLevel, b2 as NodeJSCompatMode, O as Observability, b8 as PATH_TO_DEPLOY_CONFIG, P as PreviewsConfig, e as RawDevConfig, g as RawEnvironment, a as RedirectedRawConfig, w as Rule, b6 as SERVICE_TAG_PREFIX, aV as ServiceFetch, aU as ServiceMetadataRes, b3 as StartDevWorkerInput, S as StreamingTailConsumer, T as TailConsumer, aY as Trigger, U as UserLimits, aJ as ValidatedAssetsOptions, aL as WorkerMetadata, u as WorkflowBinding, Z as ZoneIdRoute, m as ZoneNameRoute, c1 as addAuthorizationHeader, h as defaultWranglerConfig, b_ as extractAccountTag, bZ as extractWAFBlockRayId, bS as fetchInternalBase, c3 as fetchKVGetValueBase, bU as fetchListResultBase, bT as fetchResultBase, bH as getBrowserRenderingHeadfulFromEnv, bs as getBuildConditionsFromEnv, bt as getBuildPlatformFromEnv, ba as getC3CommandFromEnv, bq as getCIGeneratePreviewAlias, bn as getCIMatchTag, bo as getCIOverrideName, bp as getCIOverrideNetworkModeHost, bI as getCfFetchEnabledFromEnv, bJ as getCfFetchPathFromEnv, bi as getCloudflareApiBaseUrl, bd as getCloudflareApiEnvironmentFromEnv, bh as getCloudflareComplianceRegion, bD as getCloudflareEnv, bz as getCloudflareIncludeProcessEnvFromEnv, by as getCloudflareLoadDevVarsFromDotEnv, bL as getCloudflaredPathFromEnv, bj as getComplianceRegionSubdomain, bv as getD1ExtraLocationChoices, bB as getDisableConfigWatching, bw as getDockerPath, bF as getLocalExplorerEnabledFromEnv, bG as getLocalObservabilityEnabledFromEnv, bE as getOpenNextDeployFromEnv, bl as getOutputFileDirectoryFromEnv, bm as getOutputFilePathFromEnv, bu as getRegistryPath, bk as getSanitizeLogs, bx as getSubdomainMixedStateCheckDisabled, bA as getTraceHeader, br as getWorkersCIBranchName, bK as getWranglerCacheDirFromEnv, bC as getWranglerHideBanner, bc as getWranglerSendErrorReportsFromEnv, bb as getWranglerSendMetricsFromEnv, c5 as hasCursor, b$ as hasMorePages, bW as isWAFBlockResponse, c6 as maybeAddTraceHeader, bY as parseRetryAfterMs, bX as parseRetryAfterValue, bR as performApiFetchBase, c0 as renderError, c2 as throwFetchError, bV as truncate } from './config-BEcnaWpD.mjs';
|
|
3
3
|
import * as jsoncParser from 'jsonc-parser';
|
|
4
4
|
export { constructWranglerConfig } from './browser.mjs';
|
|
5
5
|
export { GetGlobalConfigPathOptions, getGlobalConfigPath, getGlobalWranglerCachePath } from './global-wrangler-config-path.mjs';
|
|
@@ -283,8 +283,14 @@ declare class APIError extends ParseError {
|
|
|
283
283
|
meta?: {
|
|
284
284
|
details?: unknown;
|
|
285
285
|
} & Record<string, unknown>;
|
|
286
|
-
|
|
286
|
+
/**
|
|
287
|
+
* Optional number of milliseconds the API asked us to wait before retrying,
|
|
288
|
+
* derived from the response's `Retry-After` header (if present).
|
|
289
|
+
*/
|
|
290
|
+
retryAfterMs?: number;
|
|
291
|
+
constructor({ status, retryAfterMs, ...rest }: MessageInit & {
|
|
287
292
|
status?: number;
|
|
293
|
+
retryAfterMs?: number;
|
|
288
294
|
});
|
|
289
295
|
get status(): number | undefined;
|
|
290
296
|
isGatewayError(): boolean;
|
|
@@ -560,6 +566,8 @@ type VariableNames =
|
|
|
560
566
|
| "CLOUDFLARE_AUTH_USE_KEYRING"
|
|
561
567
|
/** Enable the local explorer UI at /cdn-cgi/explorer (experimental, default: false). */
|
|
562
568
|
| "X_LOCAL_EXPLORER"
|
|
569
|
+
/** Enable local-dev observability capture (experimental, default: false). */
|
|
570
|
+
| "X_LOCAL_OBSERVABILITY"
|
|
563
571
|
/** Open the browser in headful (visible) mode when using the Browser Run API in local dev (default: false). */
|
|
564
572
|
| "X_BROWSER_HEADFUL"
|
|
565
573
|
/** Override command used by `wrangler init` (default: "create cloudflare"). */
|
|
@@ -899,7 +907,7 @@ declare function getHostFromUrl(urlLike: string): string | undefined;
|
|
|
899
907
|
*/
|
|
900
908
|
interface PackageManager {
|
|
901
909
|
/** The package manager identifier. */
|
|
902
|
-
type: "npm" | "yarn" | "pnpm" | "bun";
|
|
910
|
+
type: "npm" | "yarn" | "pnpm" | "bun" | "nub";
|
|
903
911
|
/** The command used to execute packages (e.g. `npx`, `pnpm`, `bunx`). */
|
|
904
912
|
npx: string;
|
|
905
913
|
/** The command segments used to download and execute packages (e.g. `["npx"]`, `["pnpm", "dlx"]`). */
|
|
@@ -943,6 +951,15 @@ declare const BunPackageManager: {
|
|
|
943
951
|
readonly dlx: ["bunx"];
|
|
944
952
|
readonly lockFiles: ["bun.lockb", "bun.lock"];
|
|
945
953
|
};
|
|
954
|
+
/**
|
|
955
|
+
* Manage packages using nub.
|
|
956
|
+
*/
|
|
957
|
+
declare const NubPackageManager: {
|
|
958
|
+
readonly type: "nub";
|
|
959
|
+
readonly npx: "nubx";
|
|
960
|
+
readonly dlx: ["nubx"];
|
|
961
|
+
readonly lockFiles: ["nub.lock"];
|
|
962
|
+
};
|
|
946
963
|
|
|
947
964
|
/**
|
|
948
965
|
* Checks whether the provided worker name is valid, this means that:
|
|
@@ -1012,4 +1029,4 @@ declare function getWorkerNameFromProject(projectPath: string): string;
|
|
|
1012
1029
|
*/
|
|
1013
1030
|
declare const friendlyBindingNames: Record<ConfigBindingFieldName, string>;
|
|
1014
1031
|
|
|
1015
|
-
export { APIError, Binding, type BindingLocalSupport, BunPackageManager, CommandLineArgsError, type CompatDate, Config, type ConfigBindingFieldName, type ConfigBindingOptions, type ConfigCache, type ConfigCacheOptions, DeprecationError, Diagnostics, DurableObjectExport, type EphemeralDirectory, type ExportType, Exports, FatalError, JsonFriendlyFatalError, type Location, Logger, type Message, MissingConfigError, type NormalizeAndValidateConfigArgs, NpmPackageManager, type NpmVersionCheckResult, type PackageJSON, type PackageManager, ParseError, type ParseFile, type PartitionedExports, PatchConfigError, PnpmPackageManager, RawConfig, type ResolveConfigPathOptions, Route, type TelemetryMessage, type Tunnel, type TunnelOptions, UserError, WorkerEntrypointExport, WorkerMetadataBinding, YarnPackageManager, assertNever, bucketFormatMessage, checkWorkerNameValidity, configFileName, configFormat, createConfigCache, createFatalError, experimental_patchConfig, experimental_readRawConfig, fetchLatestNpmVersion, findWranglerConfig, formatConfigSnippet, formatTime, friendlyBindingNames, getBindingLocalSupport, getBindingTypeFriendlyName, getBooleanEnvironmentVariableFactory, getDurableObjectExports, getEnvironmentVariableFactory, getHostFromRoute, getHostFromUrl, getInstalledPackageVersion, getPackagePath, getTodaysCompatDate, getWorkerName, getWorkerNameFromProject, getWranglerHiddenDirPath, getWranglerTmpDir, getZoneFromRoute, hasDurableObjectExports, hasProperty, indexLocation, isCI, isCompatDate, isDockerfile, isInteractive, isNonInteractiveOrCI, isOptionalProperty, isPackageInstalled, isPagesConfig, isRedirectedConfig, isRequiredProperty, isValidR2BucketName, mapWorkerMetadataBindings, normalizeAndValidateConfig, openInBrowser, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, readFileSync, readFileSyncToBuffer, resolveWranglerConfigPath, retryOnAPIFailure, searchLocation, spawnCloudflared, startTunnel, sweepStaleWranglerTmpDirs, toValidWorkerName, validatePagesConfig };
|
|
1032
|
+
export { APIError, Binding, type BindingLocalSupport, BunPackageManager, CommandLineArgsError, type CompatDate, Config, type ConfigBindingFieldName, type ConfigBindingOptions, type ConfigCache, type ConfigCacheOptions, DeprecationError, Diagnostics, DurableObjectExport, type EphemeralDirectory, type ExportType, Exports, FatalError, JsonFriendlyFatalError, type Location, Logger, type Message, MissingConfigError, type NormalizeAndValidateConfigArgs, NpmPackageManager, type NpmVersionCheckResult, NubPackageManager, type PackageJSON, type PackageManager, ParseError, type ParseFile, type PartitionedExports, PatchConfigError, PnpmPackageManager, RawConfig, type ResolveConfigPathOptions, Route, type TelemetryMessage, type Tunnel, type TunnelOptions, UserError, WorkerEntrypointExport, WorkerMetadataBinding, YarnPackageManager, assertNever, bucketFormatMessage, checkWorkerNameValidity, configFileName, configFormat, createConfigCache, createFatalError, experimental_patchConfig, experimental_readRawConfig, fetchLatestNpmVersion, findWranglerConfig, formatConfigSnippet, formatTime, friendlyBindingNames, getBindingLocalSupport, getBindingTypeFriendlyName, getBooleanEnvironmentVariableFactory, getDurableObjectExports, getEnvironmentVariableFactory, getHostFromRoute, getHostFromUrl, getInstalledPackageVersion, getPackagePath, getTodaysCompatDate, getWorkerName, getWorkerNameFromProject, getWranglerHiddenDirPath, getWranglerTmpDir, getZoneFromRoute, hasDurableObjectExports, hasProperty, indexLocation, isCI, isCompatDate, isDockerfile, isInteractive, isNonInteractiveOrCI, isOptionalProperty, isPackageInstalled, isPagesConfig, isRedirectedConfig, isRequiredProperty, isValidR2BucketName, mapWorkerMetadataBindings, normalizeAndValidateConfig, openInBrowser, parseByteSize, parseHumanDuration, parseJSON, parseJSONC, parseNonHyphenedUuid, parsePackageJSON, parseTOML, partitionExports, readFileSync, readFileSyncToBuffer, resolveWranglerConfigPath, retryOnAPIFailure, searchLocation, spawnCloudflared, startTunnel, sweepStaleWranglerTmpDirs, toValidWorkerName, validatePagesConfig };
|