wrangler 3.78.4 → 3.78.6
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 +5 -5
- package/wrangler-dist/cli.d.ts +9 -9
- package/wrangler-dist/cli.js +117 -67
- package/wrangler-dist/cli.js.map +3 -3
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "3.78.
|
3
|
+
"version": "3.78.6",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -62,12 +62,12 @@
|
|
62
62
|
"resolve.exports": "^2.0.2",
|
63
63
|
"selfsigned": "^2.0.1",
|
64
64
|
"source-map": "^0.6.1",
|
65
|
-
"unenv": "npm:unenv-nightly@2.0.0-
|
65
|
+
"unenv": "npm:unenv-nightly@2.0.0-1726478054.1e87097",
|
66
66
|
"workerd": "1.20240909.0",
|
67
67
|
"xxhash-wasm": "^1.0.1",
|
68
68
|
"@cloudflare/kv-asset-handler": "0.3.4",
|
69
|
-
"
|
70
|
-
"
|
69
|
+
"@cloudflare/workers-shared": "0.5.3",
|
70
|
+
"miniflare": "3.20240909.4"
|
71
71
|
},
|
72
72
|
"devDependencies": {
|
73
73
|
"@cloudflare/types": "^6.18.4",
|
@@ -154,7 +154,7 @@
|
|
154
154
|
"yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz",
|
155
155
|
"@cloudflare/cli": "1.1.1",
|
156
156
|
"@cloudflare/eslint-config-worker": "1.1.0",
|
157
|
-
"@cloudflare/pages-shared": "^0.11.
|
157
|
+
"@cloudflare/pages-shared": "^0.11.60",
|
158
158
|
"@cloudflare/workers-tsconfig": "0.0.0"
|
159
159
|
},
|
160
160
|
"peerDependencies": {
|
package/wrangler-dist/cli.d.ts
CHANGED
@@ -192,7 +192,7 @@ declare type BodyInit =
|
|
192
192
|
| ArrayBuffer
|
193
193
|
| AsyncIterable<Uint8Array>
|
194
194
|
| Blob_2
|
195
|
-
|
|
195
|
+
| FormData_2
|
196
196
|
| Iterable<Uint8Array>
|
197
197
|
| NodeJS.ArrayBufferView
|
198
198
|
| URLSearchParams_2
|
@@ -205,7 +205,7 @@ declare interface BodyMixin {
|
|
205
205
|
|
206
206
|
readonly arrayBuffer: () => Promise<ArrayBuffer>
|
207
207
|
readonly blob: () => Promise<Blob_2>
|
208
|
-
readonly formData: () => Promise<
|
208
|
+
readonly formData: () => Promise<FormData_2>
|
209
209
|
readonly json: () => Promise<unknown>
|
210
210
|
readonly text: () => Promise<string>
|
211
211
|
}
|
@@ -1245,7 +1245,7 @@ declare namespace Dispatcher {
|
|
1245
1245
|
path: string;
|
1246
1246
|
method: HttpMethod;
|
1247
1247
|
/** Default: `null` */
|
1248
|
-
body?: string | Buffer | Uint8Array | Readable | null |
|
1248
|
+
body?: string | Buffer | Uint8Array | Readable | null | FormData_2;
|
1249
1249
|
/** Default: `null` */
|
1250
1250
|
headers?: IncomingHttpHeaders | string[] | null;
|
1251
1251
|
/** Query string params to be embedded in the request URL. Default: `null` */
|
@@ -2413,7 +2413,7 @@ declare class FileReader {
|
|
2413
2413
|
/**
|
2414
2414
|
* Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using fetch().
|
2415
2415
|
*/
|
2416
|
-
declare class
|
2416
|
+
declare class FormData_2 {
|
2417
2417
|
/**
|
2418
2418
|
* Appends a new value onto an existing key inside a FormData object,
|
2419
2419
|
* or adds the key if it does not already exist.
|
@@ -2478,7 +2478,7 @@ declare class FormData {
|
|
2478
2478
|
* Executes given callback function for each field of the FormData instance
|
2479
2479
|
*/
|
2480
2480
|
forEach: (
|
2481
|
-
callbackfn: (value: FormDataEntryValue, key: string, iterable:
|
2481
|
+
callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData_2) => void,
|
2482
2482
|
thisArg?: unknown
|
2483
2483
|
) => void
|
2484
2484
|
|
@@ -25594,7 +25594,7 @@ declare class Request implements BodyMixin {
|
|
25594
25594
|
|
25595
25595
|
readonly arrayBuffer: () => Promise<ArrayBuffer>
|
25596
25596
|
readonly blob: () => Promise<Blob_2>
|
25597
|
-
readonly formData: () => Promise<
|
25597
|
+
readonly formData: () => Promise<FormData_2>
|
25598
25598
|
readonly json: () => Promise<unknown>
|
25599
25599
|
readonly text: () => Promise<string>
|
25600
25600
|
|
@@ -25678,7 +25678,7 @@ declare class Response implements BodyMixin {
|
|
25678
25678
|
|
25679
25679
|
readonly arrayBuffer: () => Promise<ArrayBuffer>
|
25680
25680
|
readonly blob: () => Promise<Blob_2>
|
25681
|
-
readonly formData: () => Promise<
|
25681
|
+
readonly formData: () => Promise<FormData_2>
|
25682
25682
|
readonly json: () => Promise<unknown>
|
25683
25683
|
readonly text: () => Promise<string>
|
25684
25684
|
|
@@ -26113,7 +26113,7 @@ declare namespace Undici {
|
|
26113
26113
|
var Headers: Headers;
|
26114
26114
|
var Response: Response;
|
26115
26115
|
var Request: Request;
|
26116
|
-
var FormData:
|
26116
|
+
var FormData: FormData_2;
|
26117
26117
|
var File: File;
|
26118
26118
|
var FileReader: FileReader;
|
26119
26119
|
var caches: caches;
|
@@ -26181,7 +26181,7 @@ declare namespace undici {
|
|
26181
26181
|
ProgressEventInit,
|
26182
26182
|
ProgressEvent,
|
26183
26183
|
FormDataEntryValue,
|
26184
|
-
FormData,
|
26184
|
+
FormData_2 as FormData,
|
26185
26185
|
DiagnosticsChannel,
|
26186
26186
|
BinaryType,
|
26187
26187
|
WebSocketEventMap,
|
package/wrangler-dist/cli.js
CHANGED
@@ -152543,9 +152543,9 @@ function getEnvironmentVariableFactory({
|
|
152543
152543
|
}) {
|
152544
152544
|
let hasWarned = false;
|
152545
152545
|
return () => {
|
152546
|
-
if (process.env
|
152546
|
+
if (variableName in process.env) {
|
152547
152547
|
return process.env[variableName];
|
152548
|
-
} else if (deprecatedName && process.env
|
152548
|
+
} else if (deprecatedName && deprecatedName in process.env) {
|
152549
152549
|
if (!hasWarned) {
|
152550
152550
|
hasWarned = true;
|
152551
152551
|
console.warn(
|
@@ -152595,6 +152595,12 @@ var getOutputFilePathFromEnv = getEnvironmentVariableFactory({
|
|
152595
152595
|
var getCIMatchTag = getEnvironmentVariableFactory({
|
152596
152596
|
variableName: "WRANGLER_CI_MATCH_TAG"
|
152597
152597
|
});
|
152598
|
+
var getBuildConditionsFromEnv = getEnvironmentVariableFactory({
|
152599
|
+
variableName: "WRANGLER_BUILD_CONDITIONS"
|
152600
|
+
});
|
152601
|
+
var getBuildPlatformFromEnv = getEnvironmentVariableFactory({
|
152602
|
+
variableName: "WRANGLER_BUILD_PLATFORM"
|
152603
|
+
});
|
152598
152604
|
|
152599
152605
|
// src/utils/log-file.ts
|
152600
152606
|
init_import_meta_url();
|
@@ -152876,7 +152882,7 @@ init_import_meta_url();
|
|
152876
152882
|
init_import_meta_url();
|
152877
152883
|
|
152878
152884
|
// package.json
|
152879
|
-
var version = "3.78.
|
152885
|
+
var version = "3.78.6";
|
152880
152886
|
var package_default = {
|
152881
152887
|
name: "wrangler",
|
152882
152888
|
version,
|
@@ -152963,7 +152969,7 @@ var package_default = {
|
|
152963
152969
|
"resolve.exports": "^2.0.2",
|
152964
152970
|
selfsigned: "^2.0.1",
|
152965
152971
|
"source-map": "^0.6.1",
|
152966
|
-
unenv: "npm:unenv-nightly@2.0.0-
|
152972
|
+
unenv: "npm:unenv-nightly@2.0.0-1726478054.1e87097",
|
152967
152973
|
workerd: "1.20240909.0",
|
152968
152974
|
"xxhash-wasm": "^1.0.1"
|
152969
152975
|
},
|
@@ -160608,7 +160614,7 @@ function createModuleCollector(props) {
|
|
160608
160614
|
packageJson,
|
160609
160615
|
args.path.replace(`${packageName}/`, ""),
|
160610
160616
|
{
|
160611
|
-
conditions:
|
160617
|
+
conditions: getBuildConditions()
|
160612
160618
|
}
|
160613
160619
|
);
|
160614
160620
|
if (testResolved) {
|
@@ -160993,7 +160999,25 @@ var COMMON_ESBUILD_OPTIONS = {
|
|
160993
160999
|
target: "es2022",
|
160994
161000
|
loader: { ".js": "jsx", ".mjs": "jsx", ".cjs": "jsx" }
|
160995
161001
|
};
|
160996
|
-
|
161002
|
+
function getBuildConditions() {
|
161003
|
+
const envVar = getBuildConditionsFromEnv();
|
161004
|
+
if (envVar !== void 0) {
|
161005
|
+
return envVar.split(",");
|
161006
|
+
} else {
|
161007
|
+
return ["workerd", "worker", "browser"];
|
161008
|
+
}
|
161009
|
+
}
|
161010
|
+
__name(getBuildConditions, "getBuildConditions");
|
161011
|
+
function getBuildPlatform() {
|
161012
|
+
const platform2 = getBuildPlatformFromEnv();
|
161013
|
+
if (platform2 !== void 0 && !["browser", "node", "neutral"].includes(platform2)) {
|
161014
|
+
throw new UserError(
|
161015
|
+
"Invalid esbuild platform configuration defined in the WRANGLER_BUILD_PLATFORM environment variable.\nValid platform values are: 'browser', 'node' and 'neutral'."
|
161016
|
+
);
|
161017
|
+
}
|
161018
|
+
return platform2;
|
161019
|
+
}
|
161020
|
+
__name(getBuildPlatform, "getBuildPlatform");
|
160997
161021
|
async function bundleWorker(entry, destination, {
|
160998
161022
|
bundle,
|
160999
161023
|
moduleCollector = noopModuleCollector,
|
@@ -161162,7 +161186,8 @@ async function bundleWorker(entry, destination, {
|
|
161162
161186
|
sourceRoot: destination,
|
161163
161187
|
minify,
|
161164
161188
|
metafile: true,
|
161165
|
-
conditions:
|
161189
|
+
conditions: getBuildConditions(),
|
161190
|
+
platform: getBuildPlatform(),
|
161166
161191
|
...{
|
161167
161192
|
define: {
|
161168
161193
|
...defineNavigatorUserAgent ? { "navigator.userAgent": `"Cloudflare-Workers"` } : {},
|
@@ -166736,7 +166761,7 @@ var MAX_UPLOAD_GATEWAY_ERRORS2 = 5;
|
|
166736
166761
|
var syncExperimentalAssets = /* @__PURE__ */ __name(async (accountId, scriptName, assetDirectory) => {
|
166737
166762
|
(0, import_node_assert9.default)(accountId, "Missing accountId");
|
166738
166763
|
logger.info("\u{1F300} Building list of assets...");
|
166739
|
-
const manifest = await
|
166764
|
+
const manifest = await buildAssetManifest(assetDirectory);
|
166740
166765
|
logger.info("\u{1F300} Starting asset upload...");
|
166741
166766
|
const initializeAssetsResponse = await fetchResult(
|
166742
166767
|
`/accounts/${accountId}/workers/scripts/${scriptName}/assets-upload-session`,
|
@@ -166784,10 +166809,10 @@ var syncExperimentalAssets = /* @__PURE__ */ __name(async (accountId, scriptName
|
|
166784
166809
|
let attempts = 0;
|
166785
166810
|
const start = Date.now();
|
166786
166811
|
let completionJwt = "";
|
166812
|
+
let assetUploadCount = 0;
|
166787
166813
|
for (const [bucketIndex, bucket] of assetBuckets.entries()) {
|
166788
166814
|
attempts = 0;
|
166789
166815
|
let gatewayErrors = 0;
|
166790
|
-
let assetUploadCount = 0;
|
166791
166816
|
const doUpload = /* @__PURE__ */ __name(async () => {
|
166792
166817
|
const payload = new import_undici5.FormData();
|
166793
166818
|
for (const manifestEntry of bucket) {
|
@@ -166878,7 +166903,7 @@ Assets already uploaded have been saved, so the next attempt will automatically
|
|
166878
166903
|
);
|
166879
166904
|
return completionJwt;
|
166880
166905
|
}, "syncExperimentalAssets");
|
166881
|
-
var
|
166906
|
+
var buildAssetManifest = /* @__PURE__ */ __name(async (dir) => {
|
166882
166907
|
const files = await (0, import_promises8.readdir)(dir, { recursive: true });
|
166883
166908
|
const manifest = {};
|
166884
166909
|
let counter = 0;
|
@@ -166928,7 +166953,7 @@ Ensure all assets in your assets directory "${dir}" conform with the Workers max
|
|
166928
166953
|
})
|
166929
166954
|
);
|
166930
166955
|
return manifest;
|
166931
|
-
}, "
|
166956
|
+
}, "buildAssetManifest");
|
166932
166957
|
var MAX_DIFF_LINES = 100;
|
166933
166958
|
function logAssetUpload(line, diffCount) {
|
166934
166959
|
const level = logger.loggerLevel;
|
@@ -166983,6 +167008,24 @@ ${resolvedExperimentalAssetsPath}`
|
|
166983
167008
|
return experimentalAssetsOptions;
|
166984
167009
|
}
|
166985
167010
|
__name(processExperimentalAssetsArg, "processExperimentalAssetsArg");
|
167011
|
+
function verifyMutuallyExclusiveAssetsArgsOrConfig(args, config) {
|
167012
|
+
if ((args.experimentalAssets || config.experimental_assets) && (args.legacyAssets || config.legacy_assets)) {
|
167013
|
+
throw new UserError(
|
167014
|
+
"Cannot use Experimental Assets and Legacy Assets in the same Worker."
|
167015
|
+
);
|
167016
|
+
}
|
167017
|
+
if ((args.experimentalAssets || config.experimental_assets) && (args.site || config.site)) {
|
167018
|
+
throw new UserError(
|
167019
|
+
"Cannot use Experimental Assets and Workers Sites in the same Worker."
|
167020
|
+
);
|
167021
|
+
}
|
167022
|
+
if ((args.experimentalAssets || config.experimental_assets) && config.tail_consumers?.length) {
|
167023
|
+
throw new UserError(
|
167024
|
+
"Cannot use Experimental Assets and tail consumers in the same Worker. Tail Workers are not yet supported for Workers with assets."
|
167025
|
+
);
|
167026
|
+
}
|
167027
|
+
}
|
167028
|
+
__name(verifyMutuallyExclusiveAssetsArgsOrConfig, "verifyMutuallyExclusiveAssetsArgsOrConfig");
|
166986
167029
|
async function createAssetIgnoreFunction(dir) {
|
166987
167030
|
const CF_ASSETS_IGNORE_FILENAME = ".assetsignore";
|
166988
167031
|
const cfAssetIgnorePath = path16.resolve(dir, CF_ASSETS_IGNORE_FILENAME);
|
@@ -172569,7 +172612,10 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
|
|
172569
172612
|
await patchNonVersionedScriptSettings(accountId, scriptName, {
|
172570
172613
|
tail_consumers: worker.tail_consumers,
|
172571
172614
|
logpush: worker.logpush,
|
172572
|
-
observability
|
172615
|
+
// If the user hasn't specified observability assume that they want it disabled if they have it on.
|
172616
|
+
// This is a no-op in the event that they don't have observability enabled, but will remove observability
|
172617
|
+
// if it has been removed from their wrangler.toml
|
172618
|
+
observability: worker.observability ?? { enabled: false }
|
172573
172619
|
});
|
172574
172620
|
const { available_on_subdomain } = await fetchResult(`/accounts/${accountId}/workers/scripts/${scriptName}/subdomain`);
|
172575
172621
|
result = {
|
@@ -189518,16 +189564,12 @@ Please shift to the --legacy-assets command to preserve the current functionalit
|
|
189518
189564
|
"The --experimental-public field has been deprecated, try --legacy-assets instead."
|
189519
189565
|
);
|
189520
189566
|
}
|
189521
|
-
if ((args.legacyAssets || config.legacy_assets
|
189567
|
+
if ((args.legacyAssets || config.legacy_assets) && (args.site || config.site)) {
|
189522
189568
|
throw new UserError(
|
189523
|
-
"Cannot use Assets and Workers Sites in the same Worker."
|
189524
|
-
);
|
189525
|
-
}
|
189526
|
-
if (args.assets) {
|
189527
|
-
logger.warn(
|
189528
|
-
"The --assets argument is experimental and may change or break at any time"
|
189569
|
+
"Cannot use Legacy Assets and Workers Sites in the same Worker."
|
189529
189570
|
);
|
189530
189571
|
}
|
189572
|
+
verifyMutuallyExclusiveAssetsArgsOrConfig(args, config);
|
189531
189573
|
const experimentalAssetsOptions = processExperimentalAssetsArg(args, config);
|
189532
189574
|
if (args.latest) {
|
189533
189575
|
logger.warn(
|
@@ -199238,8 +199280,8 @@ async function tableFromNotificationGetResponse(config, response) {
|
|
199238
199280
|
rule_id: ruleId,
|
199239
199281
|
created_at: createdAt,
|
199240
199282
|
queue_name: entry.queueName,
|
199241
|
-
prefix,
|
199242
|
-
suffix,
|
199283
|
+
prefix: prefix || "(all prefixes)",
|
199284
|
+
suffix: suffix || "(all suffixes)",
|
199243
199285
|
event_type: actions.join(",")
|
199244
199286
|
});
|
199245
199287
|
}
|
@@ -199253,9 +199295,9 @@ async function tableFromNotificationGetResponse(config, response) {
|
|
199253
199295
|
return tableOutput;
|
199254
199296
|
}
|
199255
199297
|
__name(tableFromNotificationGetResponse, "tableFromNotificationGetResponse");
|
199256
|
-
async function
|
199298
|
+
async function listEventNotificationConfig(apiCredentials, accountId, bucketName) {
|
199257
199299
|
const headers = eventNotificationHeaders(apiCredentials);
|
199258
|
-
logger.log(`Fetching notification
|
199300
|
+
logger.log(`Fetching notification rules for bucket ${bucketName}...`);
|
199259
199301
|
const res = await fetchResult(
|
199260
199302
|
`/accounts/${accountId}/event_notifications/r2/${bucketName}/configuration`,
|
199261
199303
|
{ method: "GET", headers }
|
@@ -199288,7 +199330,7 @@ async function getEventNotificationConfig(apiCredentials, accountId, bucketName)
|
|
199288
199330
|
};
|
199289
199331
|
return newResult;
|
199290
199332
|
}
|
199291
|
-
__name(
|
199333
|
+
__name(listEventNotificationConfig, "listEventNotificationConfig");
|
199292
199334
|
async function putEventNotificationConfig(config, apiCredentials, accountId, bucketName, queueName, eventTypes, prefix, suffix) {
|
199293
199335
|
const queue = await getQueue(config, queueName);
|
199294
199336
|
const headers = eventNotificationHeaders(apiCredentials);
|
@@ -199316,10 +199358,8 @@ __name(putEventNotificationConfig, "putEventNotificationConfig");
|
|
199316
199358
|
async function deleteEventNotificationConfig(config, apiCredentials, accountId, bucketName, queueName, ruleId) {
|
199317
199359
|
const queue = await getQueue(config, queueName);
|
199318
199360
|
const headers = eventNotificationHeaders(apiCredentials);
|
199319
|
-
logger.log(
|
199320
|
-
`Disabling event notifications for "${bucketName}" to queue ${queueName}...`
|
199321
|
-
);
|
199322
199361
|
if (ruleId !== void 0) {
|
199362
|
+
logger.log(`Deleting event notifications rule "${ruleId}"...`);
|
199323
199363
|
const body = ruleId !== void 0 ? {
|
199324
199364
|
ruleIds: [ruleId]
|
199325
199365
|
} : {};
|
@@ -199328,6 +199368,9 @@ async function deleteEventNotificationConfig(config, apiCredentials, accountId,
|
|
199328
199368
|
{ method: "DELETE", body: JSON.stringify(body), headers }
|
199329
199369
|
);
|
199330
199370
|
} else {
|
199371
|
+
logger.log(
|
199372
|
+
`Deleting event notification rules associated with queue ${queueName}...`
|
199373
|
+
);
|
199331
199374
|
return await fetchResult(
|
199332
199375
|
`/accounts/${accountId}/event_notifications/r2/${bucketName}/configuration/queues/${queue.queue_id}`,
|
199333
199376
|
{ method: "DELETE", headers }
|
@@ -199342,20 +199385,25 @@ __name(isValidR2BucketName, "isValidR2BucketName");
|
|
199342
199385
|
|
199343
199386
|
// src/r2/notification.ts
|
199344
199387
|
init_import_meta_url();
|
199345
|
-
function
|
199388
|
+
function ListOptions5(yargs) {
|
199346
199389
|
return yargs.positional("bucket", {
|
199347
|
-
describe: "The name of the bucket
|
199390
|
+
describe: "The name of the R2 bucket to get event notification rules for",
|
199348
199391
|
type: "string",
|
199349
199392
|
demandOption: true
|
199350
199393
|
});
|
199351
199394
|
}
|
199352
|
-
__name(
|
199353
|
-
async function
|
199395
|
+
__name(ListOptions5, "ListOptions");
|
199396
|
+
async function ListHandler5(args) {
|
199354
199397
|
await printWranglerBanner();
|
199398
|
+
if (args._[3] === "get") {
|
199399
|
+
logger.warn(
|
199400
|
+
"`wrangler r2 bucket notification get` is deprecated and will be removed in an upcoming release.\nPlease use `wrangler r2 bucket notification list` instead."
|
199401
|
+
);
|
199402
|
+
}
|
199355
199403
|
const config = readConfig(args.config, args);
|
199356
199404
|
const accountId = await requireAuth(config);
|
199357
199405
|
const apiCreds = requireApiToken();
|
199358
|
-
const resp = await
|
199406
|
+
const resp = await listEventNotificationConfig(
|
199359
199407
|
apiCreds,
|
199360
199408
|
accountId,
|
199361
199409
|
`${args.bucket}`
|
@@ -199363,10 +199411,10 @@ async function GetHandler(args) {
|
|
199363
199411
|
const tableOutput = await tableFromNotificationGetResponse(config, resp);
|
199364
199412
|
logger.log(tableOutput.map((x2) => formatLabelledValues(x2)).join("\n\n"));
|
199365
199413
|
}
|
199366
|
-
__name(
|
199414
|
+
__name(ListHandler5, "ListHandler");
|
199367
199415
|
function CreateOptions4(yargs) {
|
199368
199416
|
return yargs.positional("bucket", {
|
199369
|
-
describe: "The name of the bucket
|
199417
|
+
describe: "The name of the R2 bucket to create an event notification rule for",
|
199370
199418
|
type: "string",
|
199371
199419
|
demandOption: true
|
199372
199420
|
}).option("event-types", {
|
@@ -199407,21 +199455,21 @@ async function CreateHandler4(args) {
|
|
199407
199455
|
prefix,
|
199408
199456
|
suffix
|
199409
199457
|
);
|
199410
|
-
logger.log("
|
199458
|
+
logger.log("Event notification rule created successfully!");
|
199411
199459
|
}
|
199412
199460
|
__name(CreateHandler4, "CreateHandler");
|
199413
199461
|
function DeleteOptions2(yargs) {
|
199414
199462
|
return yargs.positional("bucket", {
|
199415
|
-
describe: "The name of the bucket
|
199463
|
+
describe: "The name of the R2 bucket to delete an event notification rule for",
|
199416
199464
|
type: "string",
|
199417
199465
|
demandOption: true
|
199418
199466
|
}).option("queue", {
|
199419
|
-
describe: "The name of the queue that
|
199467
|
+
describe: "The name of the queue that corresponds to the event notification rule. If no rule is provided, all event notification rules associated with the bucket and queue will be deleted",
|
199420
199468
|
demandOption: true,
|
199421
199469
|
requiresArg: true,
|
199422
199470
|
type: "string"
|
199423
199471
|
}).option("rule", {
|
199424
|
-
describe: "The
|
199472
|
+
describe: "The ID of the event notification rule to delete",
|
199425
199473
|
requiresArg: false,
|
199426
199474
|
type: "string"
|
199427
199475
|
});
|
@@ -199441,7 +199489,7 @@ async function DeleteHandler2(args) {
|
|
199441
199489
|
queue,
|
199442
199490
|
rule
|
199443
199491
|
);
|
199444
|
-
logger.log("
|
199492
|
+
logger.log("Event notification rule deleted successfully!");
|
199445
199493
|
}
|
199446
199494
|
__name(DeleteHandler2, "DeleteHandler");
|
199447
199495
|
|
@@ -199639,7 +199687,7 @@ async function EnableHandler(args) {
|
|
199639
199687
|
logger.log(`\u2728 Successfully enabled Sippy on the '${args.name}' bucket.`);
|
199640
199688
|
}
|
199641
199689
|
__name(EnableHandler, "EnableHandler");
|
199642
|
-
function
|
199690
|
+
function GetOptions(yargs) {
|
199643
199691
|
return yargs.positional("name", {
|
199644
199692
|
describe: "The name of the bucket",
|
199645
199693
|
type: "string",
|
@@ -199651,8 +199699,8 @@ function GetOptions2(yargs) {
|
|
199651
199699
|
type: "string"
|
199652
199700
|
});
|
199653
199701
|
}
|
199654
|
-
__name(
|
199655
|
-
async function
|
199702
|
+
__name(GetOptions, "GetOptions");
|
199703
|
+
async function GetHandler(args) {
|
199656
199704
|
const config = readConfig(args.config, args);
|
199657
199705
|
const accountId = await requireAuth(config);
|
199658
199706
|
try {
|
@@ -199670,7 +199718,7 @@ async function GetHandler2(args) {
|
|
199670
199718
|
}
|
199671
199719
|
}
|
199672
199720
|
}
|
199673
|
-
__name(
|
199721
|
+
__name(GetHandler, "GetHandler");
|
199674
199722
|
function DisableOptions(yargs) {
|
199675
199723
|
return yargs.positional("name", {
|
199676
199724
|
describe: "The name of the bucket",
|
@@ -200210,28 +200258,28 @@ ${key} is ${prettyBytes(objectSize, {
|
|
200210
200258
|
).command(
|
200211
200259
|
"get <name>",
|
200212
200260
|
"Check the status of Sippy on an R2 bucket",
|
200213
|
-
|
200214
|
-
|
200261
|
+
GetOptions,
|
200262
|
+
GetHandler
|
200215
200263
|
);
|
200216
200264
|
}
|
200217
200265
|
);
|
200218
200266
|
r2BucketYargs.command(
|
200219
200267
|
"notification",
|
200220
|
-
`Manage event
|
200268
|
+
`Manage event notification rules for an R2 bucket ${source_default.hex(betaCmdColor)("[open beta]")}`,
|
200221
200269
|
(r2EvNotifyYargs) => {
|
200222
200270
|
return r2EvNotifyYargs.command(
|
200223
|
-
"get <bucket>",
|
200224
|
-
`
|
200225
|
-
|
200226
|
-
|
200271
|
+
["list <bucket>", "get <bucket>"],
|
200272
|
+
`List event notification rules for a bucket ${source_default.hex(betaCmdColor)("[open beta]")}`,
|
200273
|
+
ListOptions5,
|
200274
|
+
ListHandler5
|
200227
200275
|
).command(
|
200228
200276
|
"create <bucket>",
|
200229
|
-
`Create
|
200277
|
+
`Create an event notification rule for an R2 bucket ${source_default.hex(betaCmdColor)("[open beta]")}`,
|
200230
200278
|
CreateOptions4,
|
200231
200279
|
CreateHandler4
|
200232
200280
|
).command(
|
200233
200281
|
"delete <bucket>",
|
200234
|
-
`Delete event notification
|
200282
|
+
`Delete an event notification rule from an R2 bucket ${source_default.hex(betaCmdColor)("[open beta]")}`,
|
200235
200283
|
DeleteOptions2,
|
200236
200284
|
DeleteHandler2
|
200237
200285
|
);
|
@@ -212841,6 +212889,17 @@ async function versionsUploadHandler(args) {
|
|
212841
212889
|
"Legacy Assets does not support uploading versions through `wrangler versions upload`. You must use `wrangler deploy` instead."
|
212842
212890
|
);
|
212843
212891
|
}
|
212892
|
+
verifyMutuallyExclusiveAssetsArgsOrConfig(
|
212893
|
+
{
|
212894
|
+
// given that legacyAssets and sites are not supported by
|
212895
|
+
// `wrangler versions upload` pass them as undefined to
|
212896
|
+
// skip the corresponding mutual exclusivity validation
|
212897
|
+
legacyAssets: void 0,
|
212898
|
+
site: void 0,
|
212899
|
+
experimentalAssets: args.experimentalAssets
|
212900
|
+
},
|
212901
|
+
config
|
212902
|
+
);
|
212844
212903
|
const experimentalAssetsOptions = processExperimentalAssetsArg(args, config);
|
212845
212904
|
if (args.latest) {
|
212846
212905
|
logger.warn(
|
@@ -214445,15 +214504,16 @@ Move any existing data to .wrangler/state and use --persist, or
|
|
214445
214504
|
use --persist-to=./wrangler-local-state to keep using the old path.`
|
214446
214505
|
);
|
214447
214506
|
}
|
214507
|
+
if ((args.legacyAssets || config.legacy_assets) && (args.site || config.site)) {
|
214508
|
+
throw new UserError(
|
214509
|
+
"Cannot use Legacy Assets and Workers Sites in the same Worker."
|
214510
|
+
);
|
214511
|
+
}
|
214512
|
+
verifyMutuallyExclusiveAssetsArgsOrConfig(args, config);
|
214448
214513
|
let experimentalAssetsOptions = processExperimentalAssetsArg(args, config);
|
214449
214514
|
if (experimentalAssetsOptions) {
|
214450
214515
|
args.forceLocal = true;
|
214451
214516
|
}
|
214452
|
-
if ((args.legacyAssets || config.legacy_assets) && experimentalAssetsOptions) {
|
214453
|
-
throw new UserError(
|
214454
|
-
"Cannot use Legacy Assets and Experimental Assets in the same Worker."
|
214455
|
-
);
|
214456
|
-
}
|
214457
214517
|
const projectRoot = configPath && import_node_path63.default.dirname(configPath);
|
214458
214518
|
const devEnv = new DevEnv();
|
214459
214519
|
if (args.experimentalDevEnv) {
|
@@ -215002,16 +215062,6 @@ You can explicitly set the \`dev.host\` configuration in your wrangler.toml file
|
|
215002
215062
|
}
|
215003
215063
|
__name(getInferredHost, "getInferredHost");
|
215004
215064
|
async function validateDevServerSettings(args, config) {
|
215005
|
-
if ((args.legacyAssets || config.legacy_assets) && (args.site || config.site)) {
|
215006
|
-
throw new UserError(
|
215007
|
-
"Cannot use Legacy Assets and Workers Sites in the same Worker."
|
215008
|
-
);
|
215009
|
-
}
|
215010
|
-
if ((args.experimentalAssets || config.experimental_assets) && (args.site || config.site)) {
|
215011
|
-
throw new UserError(
|
215012
|
-
"Cannot use Experimental Assets and Workers Sites in the same Worker."
|
215013
|
-
);
|
215014
|
-
}
|
215015
215065
|
const entry = await getEntry(
|
215016
215066
|
{
|
215017
215067
|
legacyAssets: args.legacyAssets,
|