wrangler 4.11.0 → 4.12.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/package.json +10 -10
- package/wrangler-dist/cli.d.ts +6 -0
- package/wrangler-dist/cli.js +274 -22
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.12.0",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -55,14 +55,14 @@
|
|
55
55
|
"esbuild": "0.25.2",
|
56
56
|
"path-to-regexp": "6.3.0",
|
57
57
|
"unenv": "2.0.0-rc.15",
|
58
|
-
"workerd": "1.
|
58
|
+
"workerd": "1.20250416.0",
|
59
59
|
"@cloudflare/kv-asset-handler": "0.4.0",
|
60
|
-
"miniflare": "4.
|
60
|
+
"miniflare": "4.20250416.0"
|
61
61
|
},
|
62
62
|
"devDependencies": {
|
63
63
|
"@aws-sdk/client-s3": "^3.721.0",
|
64
64
|
"@cloudflare/types": "6.18.4",
|
65
|
-
"@cloudflare/workers-types": "^4.
|
65
|
+
"@cloudflare/workers-types": "^4.20250415.0",
|
66
66
|
"@cspotcode/source-map-support": "0.8.1",
|
67
67
|
"@iarna/toml": "^3.0.0",
|
68
68
|
"@microsoft/api-extractor": "^7.47.0",
|
@@ -84,7 +84,7 @@
|
|
84
84
|
"@types/supports-color": "^8.1.1",
|
85
85
|
"@types/ws": "^8.5.7",
|
86
86
|
"@types/yargs": "^17.0.22",
|
87
|
-
"@vitest/ui": "~3.
|
87
|
+
"@vitest/ui": "~3.1.1",
|
88
88
|
"@webcontainer/env": "^1.1.0",
|
89
89
|
"chalk": "^5.2.0",
|
90
90
|
"chokidar": "^4.0.1",
|
@@ -129,7 +129,7 @@
|
|
129
129
|
"typescript": "^5.7.2",
|
130
130
|
"undici": "^5.28.5",
|
131
131
|
"update-check": "^1.5.4",
|
132
|
-
"vitest": "~3.
|
132
|
+
"vitest": "~3.1.1",
|
133
133
|
"vitest-websocket-mock": "^0.4.0",
|
134
134
|
"ws": "8.18.0",
|
135
135
|
"xdg-app-paths": "^8.3.0",
|
@@ -137,12 +137,12 @@
|
|
137
137
|
"yargs": "^17.7.2",
|
138
138
|
"@cloudflare/cli": "1.1.1",
|
139
139
|
"@cloudflare/eslint-config-worker": "1.1.0",
|
140
|
-
"@cloudflare/pages-shared": "^0.13.
|
141
|
-
"@cloudflare/workers-
|
142
|
-
"@cloudflare/workers-
|
140
|
+
"@cloudflare/pages-shared": "^0.13.29",
|
141
|
+
"@cloudflare/workers-tsconfig": "0.0.0",
|
142
|
+
"@cloudflare/workers-shared": "0.17.2"
|
143
143
|
},
|
144
144
|
"peerDependencies": {
|
145
|
-
"@cloudflare/workers-types": "^4.
|
145
|
+
"@cloudflare/workers-types": "^4.20250415.0"
|
146
146
|
},
|
147
147
|
"peerDependenciesMeta": {
|
148
148
|
"@cloudflare/workers-types": {
|
package/wrangler-dist/cli.d.ts
CHANGED
@@ -76,6 +76,7 @@ declare type AssetConfig = z.infer<typeof AssetConfigSchema>;
|
|
76
76
|
declare const AssetConfigSchema: z.ZodObject<{
|
77
77
|
account_id: z.ZodOptional<z.ZodNumber>;
|
78
78
|
script_id: z.ZodOptional<z.ZodNumber>;
|
79
|
+
debug: z.ZodOptional<z.ZodBoolean>;
|
79
80
|
compatibility_date: z.ZodOptional<z.ZodString>;
|
80
81
|
compatibility_flags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
81
82
|
html_handling: z.ZodOptional<z.ZodEnum<["auto-trailing-slash", "force-trailing-slash", "drop-trailing-slash", "none"]>>;
|
@@ -156,6 +157,7 @@ declare const AssetConfigSchema: z.ZodObject<{
|
|
156
157
|
}, "strip", z.ZodTypeAny, {
|
157
158
|
account_id?: number;
|
158
159
|
script_id?: number;
|
160
|
+
debug?: boolean;
|
159
161
|
compatibility_date?: string;
|
160
162
|
compatibility_flags?: string[];
|
161
163
|
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
@@ -182,6 +184,7 @@ declare const AssetConfigSchema: z.ZodObject<{
|
|
182
184
|
}, {
|
183
185
|
account_id?: number;
|
184
186
|
script_id?: number;
|
187
|
+
debug?: boolean;
|
185
188
|
compatibility_date?: string;
|
186
189
|
compatibility_flags?: string[];
|
187
190
|
html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash";
|
@@ -26007,16 +26010,19 @@ declare type RouterConfig = z.infer<typeof RouterConfigSchema>;
|
|
26007
26010
|
declare const RouterConfigSchema: z.ZodObject<{
|
26008
26011
|
account_id: z.ZodOptional<z.ZodNumber>;
|
26009
26012
|
script_id: z.ZodOptional<z.ZodNumber>;
|
26013
|
+
debug: z.ZodOptional<z.ZodBoolean>;
|
26010
26014
|
invoke_user_worker_ahead_of_assets: z.ZodOptional<z.ZodBoolean>;
|
26011
26015
|
has_user_worker: z.ZodOptional<z.ZodBoolean>;
|
26012
26016
|
}, "strip", z.ZodTypeAny, {
|
26013
26017
|
account_id?: number;
|
26014
26018
|
script_id?: number;
|
26019
|
+
debug?: boolean;
|
26015
26020
|
invoke_user_worker_ahead_of_assets?: boolean;
|
26016
26021
|
has_user_worker?: boolean;
|
26017
26022
|
}, {
|
26018
26023
|
account_id?: number;
|
26019
26024
|
script_id?: number;
|
26025
|
+
debug?: boolean;
|
26020
26026
|
invoke_user_worker_ahead_of_assets?: boolean;
|
26021
26027
|
has_user_worker?: boolean;
|
26022
26028
|
}>;
|
package/wrangler-dist/cli.js
CHANGED
@@ -81185,7 +81185,7 @@ var import_undici3 = __toESM(require_undici());
|
|
81185
81185
|
|
81186
81186
|
// package.json
|
81187
81187
|
var name = "wrangler";
|
81188
|
-
var version = "4.
|
81188
|
+
var version = "4.12.0";
|
81189
81189
|
|
81190
81190
|
// src/environment-variables/misc-variables.ts
|
81191
81191
|
init_import_meta_url();
|
@@ -90797,7 +90797,12 @@ async function getOauthToken(options33) {
|
|
90797
90797
|
}
|
90798
90798
|
}
|
90799
90799
|
});
|
90800
|
-
|
90800
|
+
if (options33.callbackHost !== "localhost" || options33.callbackPort !== 8976) {
|
90801
|
+
logger.log(
|
90802
|
+
`Temporary login server listening on ${options33.callbackHost}:${options33.callbackPort}`
|
90803
|
+
);
|
90804
|
+
}
|
90805
|
+
server.listen(options33.callbackPort, options33.callbackHost);
|
90801
90806
|
});
|
90802
90807
|
if (options33.browser) {
|
90803
90808
|
logger.log(`Opening a link in your default browser: ${urlToOpen}`);
|
@@ -90808,7 +90813,11 @@ async function getOauthToken(options33) {
|
|
90808
90813
|
return Promise.race([timerPromise, loginPromise]);
|
90809
90814
|
}
|
90810
90815
|
__name(getOauthToken, "getOauthToken");
|
90811
|
-
async function login(props = {
|
90816
|
+
async function login(props = {
|
90817
|
+
browser: true,
|
90818
|
+
callbackHost: "localhost",
|
90819
|
+
callbackPort: 8976
|
90820
|
+
}) {
|
90812
90821
|
const authFromEnv = getAuthFromEnv();
|
90813
90822
|
if (authFromEnv) {
|
90814
90823
|
logger.error(
|
@@ -90827,7 +90836,9 @@ async function login(props = { browser: true }) {
|
|
90827
90836
|
},
|
90828
90837
|
granted: {
|
90829
90838
|
url: "https://welcome.developers.workers.dev/wrangler-oauth-consent-granted"
|
90830
|
-
}
|
90839
|
+
},
|
90840
|
+
callbackHost: props.callbackHost,
|
90841
|
+
callbackPort: props.callbackPort
|
90831
90842
|
});
|
90832
90843
|
writeAuthConfigFile({
|
90833
90844
|
oauth_token: oauth.token?.value ?? "",
|
@@ -98737,7 +98748,8 @@ var z2 = /* @__PURE__ */ Object.freeze({
|
|
98737
98748
|
// ../workers-shared/utils/types.ts
|
98738
98749
|
var InternalConfigSchema = z2.object({
|
98739
98750
|
account_id: z2.number().optional(),
|
98740
|
-
script_id: z2.number().optional()
|
98751
|
+
script_id: z2.number().optional(),
|
98752
|
+
debug: z2.boolean().optional()
|
98741
98753
|
});
|
98742
98754
|
var RouterConfigSchema = z2.object({
|
98743
98755
|
invoke_user_worker_ahead_of_assets: z2.boolean().optional(),
|
@@ -101113,7 +101125,7 @@ __name(getDeviceId, "getDeviceId");
|
|
101113
101125
|
// src/metrics/metrics-dispatcher.ts
|
101114
101126
|
var SPARROW_URL = "https://sparrow.cloudflare.com";
|
101115
101127
|
function getMetricsDispatcher(options33) {
|
101116
|
-
const SPARROW_SOURCE_KEY = "";
|
101128
|
+
const SPARROW_SOURCE_KEY = "50598e014ed44c739ec8074fdc16057c";
|
101117
101129
|
const requests = [];
|
101118
101130
|
const wranglerVersion = getWranglerVersion();
|
101119
101131
|
const amplitude_session_id = Date.now();
|
@@ -110656,7 +110668,7 @@ function handleFailure(cb2) {
|
|
110656
110668
|
await fillOpenAPIConfiguration(config, args.json);
|
110657
110669
|
await cb2(args, config);
|
110658
110670
|
} catch (err) {
|
110659
|
-
if (!args.json) {
|
110671
|
+
if (!args.json || !isNonInteractiveOrCI()) {
|
110660
110672
|
throw err;
|
110661
110673
|
}
|
110662
110674
|
if (err instanceof ApiError) {
|
@@ -114001,6 +114013,208 @@ var cloudchamber = /* @__PURE__ */ __name((yargs, subHelp) => {
|
|
114001
114013
|
|
114002
114014
|
// src/containers/index.ts
|
114003
114015
|
init_import_meta_url();
|
114016
|
+
|
114017
|
+
// src/containers/containers.ts
|
114018
|
+
init_import_meta_url();
|
114019
|
+
function deleteYargs(args) {
|
114020
|
+
return args.positional("ID", {
|
114021
|
+
describe: "id of the containers to delete",
|
114022
|
+
type: "string"
|
114023
|
+
});
|
114024
|
+
}
|
114025
|
+
__name(deleteYargs, "deleteYargs");
|
114026
|
+
async function deleteCommand2(deleteArgs, _config) {
|
114027
|
+
await loadAccountSpinner(deleteArgs);
|
114028
|
+
if (!deleteArgs.ID) {
|
114029
|
+
throw new Error(
|
114030
|
+
"You must provide an ID. Use 'wrangler containers list` to view your containers."
|
114031
|
+
);
|
114032
|
+
}
|
114033
|
+
if (deleteArgs.json || !isInteractive2()) {
|
114034
|
+
const container = await ApplicationsService.deleteApplication(
|
114035
|
+
deleteArgs.ID
|
114036
|
+
);
|
114037
|
+
console.log(JSON.stringify(container, null, 4));
|
114038
|
+
return;
|
114039
|
+
}
|
114040
|
+
startSection("Delete your container");
|
114041
|
+
const yes = await inputPrompt({
|
114042
|
+
question: "Are you sure that you want to delete these containers? The associated DO container will lose access to the containers.",
|
114043
|
+
type: "confirm",
|
114044
|
+
label: ""
|
114045
|
+
});
|
114046
|
+
if (!yes) {
|
114047
|
+
cancel("The operation has been cancelled");
|
114048
|
+
return;
|
114049
|
+
}
|
114050
|
+
const [, err] = await wrap2(
|
114051
|
+
ApplicationsService.deleteApplication(deleteArgs.ID)
|
114052
|
+
);
|
114053
|
+
if (err) {
|
114054
|
+
crash(
|
114055
|
+
`There has been an internal error deleting your containers.
|
114056
|
+
${err.message}`
|
114057
|
+
);
|
114058
|
+
return;
|
114059
|
+
}
|
114060
|
+
endSection("Your container has been deleted");
|
114061
|
+
}
|
114062
|
+
__name(deleteCommand2, "deleteCommand");
|
114063
|
+
function infoYargs(args) {
|
114064
|
+
return args.positional("ID", {
|
114065
|
+
describe: "id of the containers to view",
|
114066
|
+
type: "string"
|
114067
|
+
});
|
114068
|
+
}
|
114069
|
+
__name(infoYargs, "infoYargs");
|
114070
|
+
async function infoCommand(infoArgs, _config) {
|
114071
|
+
if (!infoArgs.ID) {
|
114072
|
+
throw new Error(
|
114073
|
+
"You must provide an ID. Use 'wrangler containers list` to view your containers."
|
114074
|
+
);
|
114075
|
+
}
|
114076
|
+
if (infoArgs.json || !isInteractive2()) {
|
114077
|
+
const application2 = ApplicationsService.getApplication(infoArgs.ID);
|
114078
|
+
console.log(JSON.stringify(application2, null, 4));
|
114079
|
+
return;
|
114080
|
+
}
|
114081
|
+
await loadAccountSpinner(infoArgs);
|
114082
|
+
const [application, err] = await wrap2(
|
114083
|
+
ApplicationsService.getApplication(infoArgs.ID)
|
114084
|
+
);
|
114085
|
+
if (err) {
|
114086
|
+
crash(
|
114087
|
+
`There has been an internal error requesting your containers.
|
114088
|
+
${err.message}`
|
114089
|
+
);
|
114090
|
+
return;
|
114091
|
+
}
|
114092
|
+
const details = flatDetails(application);
|
114093
|
+
const applicationDetails = {
|
114094
|
+
label: `${application.name} (${application.created_at})`,
|
114095
|
+
details,
|
114096
|
+
value: application.id
|
114097
|
+
};
|
114098
|
+
await inputPrompt({
|
114099
|
+
type: "list",
|
114100
|
+
question: "Container",
|
114101
|
+
options: [applicationDetails],
|
114102
|
+
label: "Exiting"
|
114103
|
+
});
|
114104
|
+
}
|
114105
|
+
__name(infoCommand, "infoCommand");
|
114106
|
+
function listYargs(args) {
|
114107
|
+
return args;
|
114108
|
+
}
|
114109
|
+
__name(listYargs, "listYargs");
|
114110
|
+
async function listCommand2(listArgs, config) {
|
114111
|
+
if (listArgs.json || !isInteractive2()) {
|
114112
|
+
const applications = await ApplicationsService.listApplications();
|
114113
|
+
console.log(JSON.stringify(applications, null, 4));
|
114114
|
+
return;
|
114115
|
+
}
|
114116
|
+
await listCommandHandle2(listArgs, config);
|
114117
|
+
}
|
114118
|
+
__name(listCommand2, "listCommand");
|
114119
|
+
function flatDetails(obj, indentLevel = 0) {
|
114120
|
+
const indent = " ".repeat(indentLevel);
|
114121
|
+
return Object.entries(obj).reduce((acc, [key, value]) => {
|
114122
|
+
if (value !== void 0 && value !== null && typeof value === "object" && !Array.isArray(value)) {
|
114123
|
+
acc.push(`${indent}${key}:`);
|
114124
|
+
acc.push(
|
114125
|
+
...flatDetails(value, indentLevel + 1)
|
114126
|
+
);
|
114127
|
+
} else if (value !== void 0) {
|
114128
|
+
acc.push(`${indent}${key}: ${value}`);
|
114129
|
+
}
|
114130
|
+
return acc;
|
114131
|
+
}, []);
|
114132
|
+
}
|
114133
|
+
__name(flatDetails, "flatDetails");
|
114134
|
+
async function listCommandHandle2(_args, _config) {
|
114135
|
+
const keepListIter = true;
|
114136
|
+
while (keepListIter) {
|
114137
|
+
logRaw(gray(shapes.bar));
|
114138
|
+
const { start, stop } = spinner();
|
114139
|
+
start("Loading Containers");
|
114140
|
+
const [applications, err] = await wrap2(
|
114141
|
+
ApplicationsService.listApplications()
|
114142
|
+
);
|
114143
|
+
stop();
|
114144
|
+
if (err) {
|
114145
|
+
crash(
|
114146
|
+
`There has been an internal error listing your containers.
|
114147
|
+
${err.message}`
|
114148
|
+
);
|
114149
|
+
return;
|
114150
|
+
}
|
114151
|
+
const applicationDetails = /* @__PURE__ */ __name((a5) => {
|
114152
|
+
const details = flatDetails(a5);
|
114153
|
+
return {
|
114154
|
+
label: `${a5.name} (${a5.created_at})`,
|
114155
|
+
details,
|
114156
|
+
value: a5.id
|
114157
|
+
};
|
114158
|
+
}, "applicationDetails");
|
114159
|
+
const application = await listContainersAndChoose(applications);
|
114160
|
+
let refresh = false;
|
114161
|
+
await inputPrompt({
|
114162
|
+
type: "list",
|
114163
|
+
question: "Containers",
|
114164
|
+
helpText: "Hit enter to return to your containers or 'r' to refresh",
|
114165
|
+
options: [applicationDetails(application)],
|
114166
|
+
label: "going back",
|
114167
|
+
onRefresh: /* @__PURE__ */ __name(async () => {
|
114168
|
+
start("Refreshing application");
|
114169
|
+
const app = await ApplicationsService.getApplication(application.id);
|
114170
|
+
if (refresh) {
|
114171
|
+
return [];
|
114172
|
+
}
|
114173
|
+
stop();
|
114174
|
+
if (app) {
|
114175
|
+
const details = applicationDetails(app);
|
114176
|
+
details.label += ", last refresh: " + (/* @__PURE__ */ new Date()).toLocaleString();
|
114177
|
+
return [details];
|
114178
|
+
}
|
114179
|
+
return app;
|
114180
|
+
}, "onRefresh")
|
114181
|
+
});
|
114182
|
+
refresh = true;
|
114183
|
+
stop();
|
114184
|
+
}
|
114185
|
+
}
|
114186
|
+
__name(listCommandHandle2, "listCommandHandle");
|
114187
|
+
async function listContainersAndChoose(applications) {
|
114188
|
+
const getLabels = /* @__PURE__ */ __name((a5) => {
|
114189
|
+
const labels = a5.configuration.labels ?? [];
|
114190
|
+
if (!labels || labels.length == 0) {
|
114191
|
+
return [];
|
114192
|
+
}
|
114193
|
+
const out = labels.map((l6) => ` ${dim(l6.name)}: ${dim(l6.value)}`);
|
114194
|
+
return `Labels:
|
114195
|
+
` + out.join(",\n");
|
114196
|
+
}, "getLabels");
|
114197
|
+
const application = await processArgument({}, "applicationId", {
|
114198
|
+
type: "list",
|
114199
|
+
question: "Your Containers",
|
114200
|
+
helpText: "Get more information by selecting a container with the enter/return key",
|
114201
|
+
options: applications.map((i5) => ({
|
114202
|
+
label: i5.name,
|
114203
|
+
value: i5.id,
|
114204
|
+
details: [
|
114205
|
+
`Id: ${dim(`${i5.id}`)}`,
|
114206
|
+
`Instances: ${dim(`${i5.instances}`)}`,
|
114207
|
+
`Image: ${dim(i5.configuration.image)}`,
|
114208
|
+
...getLabels(i5) ?? []
|
114209
|
+
]
|
114210
|
+
})),
|
114211
|
+
label: "container"
|
114212
|
+
});
|
114213
|
+
return applications.find((a5) => a5.id === application);
|
114214
|
+
}
|
114215
|
+
__name(listContainersAndChoose, "listContainersAndChoose");
|
114216
|
+
|
114217
|
+
// src/containers/index.ts
|
114004
114218
|
var containers = /* @__PURE__ */ __name((yargs, subHelp) => {
|
114005
114219
|
return yargs.command(
|
114006
114220
|
"build [PATH]",
|
@@ -114016,6 +114230,21 @@ var containers = /* @__PURE__ */ __name((yargs, subHelp) => {
|
|
114016
114230
|
"images",
|
114017
114231
|
"perform operations on images in your Cloudflare managed registry",
|
114018
114232
|
(args) => imagesCommand(args).command(subHelp)
|
114233
|
+
).command(
|
114234
|
+
"info [ID]",
|
114235
|
+
"get information about a specific container",
|
114236
|
+
(args) => infoYargs(args),
|
114237
|
+
(args) => handleFailure(infoCommand)(args)
|
114238
|
+
).command(
|
114239
|
+
"list",
|
114240
|
+
"list containers",
|
114241
|
+
(args) => listYargs(args),
|
114242
|
+
(args) => handleFailure(listCommand2)(args)
|
114243
|
+
).command(
|
114244
|
+
"delete [ID]",
|
114245
|
+
"delete a container",
|
114246
|
+
(args) => deleteYargs(args),
|
114247
|
+
(args) => handleFailure(deleteCommand2)(args)
|
114019
114248
|
);
|
114020
114249
|
}, "containers");
|
114021
114250
|
|
@@ -117501,9 +117730,9 @@ init_import_meta_url();
|
|
117501
117730
|
var import_node_assert20 = __toESM(require("node:assert"));
|
117502
117731
|
var import_undici11 = __toESM(require_undici());
|
117503
117732
|
async function runSearch(searchTerm) {
|
117504
|
-
const id =
|
117733
|
+
const id = "8MU1G3QO9P";
|
117505
117734
|
const index = "developers-cloudflare2";
|
117506
|
-
const key =
|
117735
|
+
const key = "045e8dbec8c137a52f0f56e196d7abe0";
|
117507
117736
|
const params = new URLSearchParams({
|
117508
117737
|
query: searchTerm,
|
117509
117738
|
hitsPerPage: "1",
|
@@ -143439,10 +143668,10 @@ var disabledDefaultIntegrations = [
|
|
143439
143668
|
// Request data to Wrangler's HTTP servers may contain PII
|
143440
143669
|
];
|
143441
143670
|
function setupSentry() {
|
143442
|
-
if (
|
143671
|
+
if (true) {
|
143443
143672
|
init({
|
143444
143673
|
release: `wrangler@${version}`,
|
143445
|
-
dsn:
|
143674
|
+
dsn: "https://9edbb8417b284aa2bbead9b4c318918b@sentry10.cfdata.org/583",
|
143446
143675
|
transport: makeSentry10Transport,
|
143447
143676
|
integrations(defaultIntegrations2) {
|
143448
143677
|
return defaultIntegrations2.filter(
|
@@ -143474,7 +143703,7 @@ function setupSentry() {
|
|
143474
143703
|
}
|
143475
143704
|
__name(setupSentry, "setupSentry");
|
143476
143705
|
function addBreadcrumb2(message, level = "log") {
|
143477
|
-
if (
|
143706
|
+
if (true) {
|
143478
143707
|
addBreadcrumb({
|
143479
143708
|
message,
|
143480
143709
|
level
|
@@ -143483,7 +143712,7 @@ function addBreadcrumb2(message, level = "log") {
|
|
143483
143712
|
}
|
143484
143713
|
__name(addBreadcrumb2, "addBreadcrumb");
|
143485
143714
|
async function captureGlobalException(e7) {
|
143486
|
-
if (
|
143715
|
+
if (true) {
|
143487
143716
|
sentryReportingAllowed = await confirm(
|
143488
143717
|
"Would you like to report this error to Cloudflare? Wrangler's output and the error details will be shared with the Wrangler team to help us diagnose and fix the issue.",
|
143489
143718
|
{ fallbackValue: false }
|
@@ -143498,7 +143727,7 @@ async function captureGlobalException(e7) {
|
|
143498
143727
|
}
|
143499
143728
|
__name(captureGlobalException, "captureGlobalException");
|
143500
143729
|
async function closeSentry() {
|
143501
|
-
if (
|
143730
|
+
if (true) {
|
143502
143731
|
await close();
|
143503
143732
|
}
|
143504
143733
|
}
|
@@ -144038,7 +144267,7 @@ var typesCommand = createCommand({
|
|
144038
144267
|
}
|
144039
144268
|
}
|
144040
144269
|
const entrypointFormat = entrypoint?.format ?? "modules";
|
144041
|
-
const header = [];
|
144270
|
+
const header = ["/* eslint-disable */"];
|
144042
144271
|
const content = [];
|
144043
144272
|
if (args.includeEnv) {
|
144044
144273
|
logger.log(`Generating project types...
|
@@ -144423,12 +144652,8 @@ var checkPath = /* @__PURE__ */ __name((path69) => {
|
|
144423
144652
|
}, "checkPath");
|
144424
144653
|
function generateTypeStrings(formatType, envInterface, envTypeStructure, modulesTypeStructure, stringKeys, compatibilityDate, compatibilityFlags) {
|
144425
144654
|
let baseContent = "";
|
144426
|
-
let eslintDisable = "";
|
144427
144655
|
let processEnv = "";
|
144428
144656
|
if (formatType === "modules") {
|
144429
|
-
if (envTypeStructure.length === 0) {
|
144430
|
-
eslintDisable = " // eslint-disable-next-line @typescript-eslint/no-empty-interface,@typescript-eslint/no-empty-object-type\n";
|
144431
|
-
}
|
144432
144657
|
if (isProcessEnvPopulated(compatibilityDate, compatibilityFlags) && stringKeys.length > 0) {
|
144433
144658
|
processEnv = `
|
144434
144659
|
type StringifyValues<EnvType extends Record<string, unknown>> = {
|
@@ -144439,7 +144664,7 @@ declare namespace NodeJS {
|
|
144439
144664
|
}`;
|
144440
144665
|
}
|
144441
144666
|
baseContent = `declare namespace Cloudflare {
|
144442
|
-
|
144667
|
+
interface Env {${envTypeStructure.map((value) => `
|
144443
144668
|
${value}`).join("")}
|
144444
144669
|
}
|
144445
144670
|
}
|
@@ -144688,6 +144913,18 @@ var loginCommand = createCommand({
|
|
144688
144913
|
array: true,
|
144689
144914
|
type: "string",
|
144690
144915
|
requiresArg: true
|
144916
|
+
},
|
144917
|
+
"callback-host": {
|
144918
|
+
describe: "Use the ip or host address for the temporary login callback server.",
|
144919
|
+
type: "string",
|
144920
|
+
requiresArg: false,
|
144921
|
+
default: "localhost"
|
144922
|
+
},
|
144923
|
+
"callback-port": {
|
144924
|
+
describe: "Use the port for the temporary login callback server.",
|
144925
|
+
type: "number",
|
144926
|
+
requiresArg: false,
|
144927
|
+
default: 8976
|
144691
144928
|
}
|
144692
144929
|
},
|
144693
144930
|
async handler(args, { config }) {
|
@@ -144705,10 +144942,19 @@ var loginCommand = createCommand({
|
|
144705
144942
|
`One of ${args.scopes} is not a valid authentication scope. Run "wrangler login --scopes-list" to see the valid scopes.`
|
144706
144943
|
);
|
144707
144944
|
}
|
144708
|
-
await login({
|
144945
|
+
await login({
|
144946
|
+
scopes: args.scopes,
|
144947
|
+
browser: args.browser,
|
144948
|
+
callbackHost: args.callbackHost,
|
144949
|
+
callbackPort: args.callbackPort
|
144950
|
+
});
|
144709
144951
|
return;
|
144710
144952
|
}
|
144711
|
-
await login({
|
144953
|
+
await login({
|
144954
|
+
browser: args.browser,
|
144955
|
+
callbackHost: args.callbackHost,
|
144956
|
+
callbackPort: args.callbackPort
|
144957
|
+
});
|
144712
144958
|
sendMetricsEvent("login user", {
|
144713
144959
|
sendMetrics: config.send_metrics
|
144714
144960
|
});
|
@@ -144756,6 +145002,12 @@ var whoamiCommand = createCommand({
|
|
144756
145002
|
// src/utils/logPossibleBugMessage.ts
|
144757
145003
|
init_import_meta_url();
|
144758
145004
|
async function logPossibleBugMessage() {
|
145005
|
+
if (process.versions.bun) {
|
145006
|
+
logger.warn(
|
145007
|
+
`Wrangler does not support the Bun runtime. Please try this command again using Node.js via \`npm\` or \`pnpm\`. Alternatively, make sure you're not passing the \`--bun\` flag when running \`bun run wrangler ...\``
|
145008
|
+
);
|
145009
|
+
return;
|
145010
|
+
}
|
144759
145011
|
logger.log(
|
144760
145012
|
`${fgGreenColor}%s${resetColor}`,
|
144761
145013
|
"If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose"
|