You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Un-revert #3107 and change --delegate-c3 default to true in v3 (#3211)
* [wrangler] Deprecate the init command (#3107)
* set --delegate-c3 default to true
* test deprecation (warning + c3 delegation)
keep existing tests to ensure deprecated behaviour is retained with --no-delegate-c3
`The \`init --from-dash\` command is no longer supported. Please use ${replacementC3Command} instead.\nThe \`init\` command will be removed in a future version.`
207
+
);
208
+
209
+
// C3 will run wrangler with the --do-not-delegate flag to communicate with the API
210
+
if(args.delegateC3){
211
+
logger.log(`Running ${replacementC3Command}...`);
212
+
213
+
awaitexeca(packageManager.type,[
214
+
"create",
215
+
"cloudflare",
216
+
fromDashScriptName,
217
+
"--type",
218
+
"pre-existing",
219
+
]);
220
+
221
+
return;
222
+
}
191
223
}
192
224
193
225
if(fs.existsSync(wranglerTomlDestination)){
@@ -204,6 +236,25 @@ export async function initHandler(args: InitArgs) {
204
236
return;
205
237
}
206
238
}else{
239
+
// Deprecate the `init` command
240
+
// if a wrangler.toml file does not exist (C3 expects to scaffold *new* projects)
241
+
// and if --from-dash is not set (C3 will run wrangler to communicate with the API)
0 commit comments