From e17d9d007938390918e89d2e9e73404a6b2568a4 Mon Sep 17 00:00:00 2001 From: Joe Hanley Date: Tue, 14 Nov 2023 12:05:06 -0800 Subject: [PATCH] Removing deprecated ext:dev:publish, as promised --- src/commands/ext-dev-publish.ts | 43 --------------------------------- src/commands/index.ts | 1 - 2 files changed, 44 deletions(-) delete mode 100644 src/commands/ext-dev-publish.ts diff --git a/src/commands/ext-dev-publish.ts b/src/commands/ext-dev-publish.ts deleted file mode 100644 index 888bafd6217..00000000000 --- a/src/commands/ext-dev-publish.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { marked } from "marked"; -import * as TerminalRenderer from "marked-terminal"; - -import { Command } from "../command"; -import { requireAuth } from "../requireAuth"; -import { uploadExtensionAction, UploadExtensionOptions } from "./ext-dev-upload"; -import { logLabeledWarning } from "../utils"; -import { ensureExtensionsPublisherApiEnabled } from "../extensions/extensionsHelper"; - -marked.setOptions({ - renderer: new TerminalRenderer(), -}); - -/** - * Command for publishing an extension version. - */ -export const command = new Command("ext:dev:publish ") - .description(`Deprecated. Use ext:dev:upload instead`) - .option(`-s, --stage `, `release stage (supports "alpha", "beta", "rc", and "stable")`) - .option(`--repo `, `Public GitHub repo URI that contains the extension source`) - .option(`--ref `, `commit hash, branch, or tag to build from the repo (defaults to HEAD)`) - .option( - `--root `, - `root directory that contains this extension (defaults to last uploaded root or "/" if none set)` - ) - .withForce() - .help( - "if you have not previously uploaded a version of this extension, this will " + - "create the extension. If you have previously uploaded a version of this extension, this version must " + - "be greater than previous versions." - ) - .before(requireAuth) - .before(ensureExtensionsPublisherApiEnabled) - .action(async (extensionRef: string, options: UploadExtensionOptions) => { - logLabeledWarning( - "Extensions", - "ext:dev:publish has been deprecated and will be removed in the future. Please use ext:dev:upload instead." - ); - if (!options.repo && !options.ref && !options.root) { - options.local = true; - } - return uploadExtensionAction(extensionRef, options); - }); diff --git a/src/commands/index.ts b/src/commands/index.ts index cdb65331cb0..90b5b4a73fd 100644 --- a/src/commands/index.ts +++ b/src/commands/index.ts @@ -96,7 +96,6 @@ export function load(client: any): any { client.ext.dev.deprecate = loadCommand("ext-dev-deprecate"); client.ext.dev.undeprecate = loadCommand("ext-dev-undeprecate"); client.ext.dev.upload = loadCommand("ext-dev-upload"); - client.ext.dev.publish = loadCommand("ext-dev-publish"); client.ext.dev.usage = loadCommand("ext-dev-usage"); client.firestore = {}; client.firestore.delete = loadCommand("firestore-delete");