wrangler 3.80.1 → 3.80.2
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 +3 -3
- package/wrangler-dist/cli.js +34 -16
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "3.80.
|
3
|
+
"version": "3.80.2",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -153,8 +153,8 @@
|
|
153
153
|
"yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz",
|
154
154
|
"@cloudflare/cli": "1.1.1",
|
155
155
|
"@cloudflare/eslint-config-worker": "1.1.0",
|
156
|
-
"@cloudflare/
|
157
|
-
"@cloudflare/
|
156
|
+
"@cloudflare/pages-shared": "^0.11.63",
|
157
|
+
"@cloudflare/workers-tsconfig": "0.0.0"
|
158
158
|
},
|
159
159
|
"peerDependencies": {
|
160
160
|
"@cloudflare/workers-types": "^4.20240925.0"
|
package/wrangler-dist/cli.js
CHANGED
@@ -157962,7 +157962,7 @@ var import_undici3 = __toESM(require_undici());
|
|
157962
157962
|
|
157963
157963
|
// package.json
|
157964
157964
|
var name = "wrangler";
|
157965
|
-
var version = "3.80.
|
157965
|
+
var version = "3.80.2";
|
157966
157966
|
|
157967
157967
|
// src/user/index.ts
|
157968
157968
|
init_import_meta_url();
|
@@ -210277,36 +210277,54 @@ function writeDTSFile({
|
|
210277
210277
|
throw error2;
|
210278
210278
|
}
|
210279
210279
|
}
|
210280
|
-
let combinedTypeStrings = "";
|
210281
|
-
if (formatType === "modules") {
|
210282
|
-
combinedTypeStrings += `interface ${envInterface} {${envTypeStructure.map((value) => `
|
210283
|
-
${value}`).join("")}
|
210284
|
-
}
|
210285
|
-
${modulesTypeStructure.join("\n")}`;
|
210286
|
-
} else {
|
210287
|
-
combinedTypeStrings += `export {};
|
210288
|
-
declare global {
|
210289
|
-
${envTypeStructure.map((value) => ` const ${value}`).join("\n")}
|
210290
|
-
}
|
210291
|
-
${modulesTypeStructure.join("\n")}`;
|
210292
|
-
}
|
210293
210280
|
const wranglerCommandUsed = ["wrangler", ...process.argv.slice(2)].join(" ");
|
210294
210281
|
const typesHaveBeenFound = envTypeStructure.length || modulesTypeStructure.length;
|
210295
210282
|
if (formatType === "modules" || typesHaveBeenFound) {
|
210283
|
+
const { fileContent, consoleOutput } = generateTypeStrings(
|
210284
|
+
formatType,
|
210285
|
+
envInterface,
|
210286
|
+
envTypeStructure,
|
210287
|
+
modulesTypeStructure
|
210288
|
+
);
|
210296
210289
|
fs25.writeFileSync(
|
210297
210290
|
path74,
|
210298
210291
|
[
|
210299
210292
|
`// Generated by Wrangler by running \`${wranglerCommandUsed}\``,
|
210300
210293
|
"",
|
210301
|
-
|
210294
|
+
fileContent
|
210302
210295
|
].join("\n")
|
210303
210296
|
);
|
210304
210297
|
logger.log(`Generating project types...
|
210305
210298
|
`);
|
210306
|
-
logger.log(
|
210299
|
+
logger.log(consoleOutput);
|
210307
210300
|
}
|
210308
210301
|
}
|
210309
210302
|
__name(writeDTSFile, "writeDTSFile");
|
210303
|
+
function generateTypeStrings(formatType, envInterface, envTypeStructure, modulesTypeStructure) {
|
210304
|
+
let baseContent = "";
|
210305
|
+
let eslintDisable = "";
|
210306
|
+
if (formatType === "modules") {
|
210307
|
+
if (envTypeStructure.length === 0) {
|
210308
|
+
eslintDisable = "// eslint-disable-next-line @typescript-eslint/no-empty-interface,@typescript-eslint/no-empty-object-type\n";
|
210309
|
+
}
|
210310
|
+
baseContent = `interface ${envInterface} {${envTypeStructure.map((value) => `
|
210311
|
+
${value}`).join("")}
|
210312
|
+
}`;
|
210313
|
+
} else {
|
210314
|
+
baseContent = `export {};
|
210315
|
+
declare global {
|
210316
|
+
${envTypeStructure.map((value) => ` const ${value}`).join("\n")}
|
210317
|
+
}`;
|
210318
|
+
}
|
210319
|
+
const modulesContent = modulesTypeStructure.join("\n");
|
210320
|
+
return {
|
210321
|
+
fileContent: `${eslintDisable}${baseContent}
|
210322
|
+
${modulesContent}`,
|
210323
|
+
consoleOutput: `${baseContent}
|
210324
|
+
${modulesContent}`
|
210325
|
+
};
|
210326
|
+
}
|
210327
|
+
__name(generateTypeStrings, "generateTypeStrings");
|
210310
210328
|
function readTsconfigTypes(tsconfigPath) {
|
210311
210329
|
if (!fs25.existsSync(tsconfigPath)) {
|
210312
210330
|
return [];
|