From 756a79f6a9a7adee903f2628d397fe3ff975976c Mon Sep 17 00:00:00 2001 From: Arnau Orriols Date: Tue, 28 Nov 2023 01:19:06 +0100 Subject: [PATCH 1/2] fix: always store project-id in deno.json --- src/subcommands/deploy.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/subcommands/deploy.ts b/src/subcommands/deploy.ts index d65bc7da..0ccb7df4 100644 --- a/src/subcommands/deploy.ts +++ b/src/subcommands/deploy.ts @@ -160,9 +160,6 @@ async function deploy(opts: DeployOpts): Promise { } catch (e) { error(e.message); } - // opts.project is persisted in deno.json. We want to store the project id even if user provided - // project name to facilitate project renaming. - opts.project = project.id; projectCreationSpinner.succeed(`Created new project '${opts.project}'.`); wait({ text: "", indent: 3 }).start().info( `You can configure the name, env vars, custom domains and more in https://dash.deno.com/projects/${project.name}/settings`, @@ -298,6 +295,10 @@ async function deploy(opts: DeployOpts): Promise { case "success": { const deploymentKind = opts.prod ? "Production" : "Preview"; deploySpinner!.succeed(`${deploymentKind} deployment complete.`); + + // We want to store the project id even if user provided project name + // to facilitate project renaming. + opts.project = project.id; await configFile.maybeWrite(opts.config, opts, opts.saveConfig); console.log("\nView at:"); for (const { domain } of event.domainMappings) { From dffc62d45a0dbe311e07c4739c2fc7a35757b9e5 Mon Sep 17 00:00:00 2001 From: Arnau Orriols Date: Tue, 28 Nov 2023 01:23:45 +0100 Subject: [PATCH 2/2] fmt --- src/subcommands/deploy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subcommands/deploy.ts b/src/subcommands/deploy.ts index 0ccb7df4..ccea0816 100644 --- a/src/subcommands/deploy.ts +++ b/src/subcommands/deploy.ts @@ -296,7 +296,7 @@ async function deploy(opts: DeployOpts): Promise { const deploymentKind = opts.prod ? "Production" : "Preview"; deploySpinner!.succeed(`${deploymentKind} deployment complete.`); - // We want to store the project id even if user provided project name + // We want to store the project id even if user provided project name // to facilitate project renaming. opts.project = project.id; await configFile.maybeWrite(opts.config, opts, opts.saveConfig);