Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions packages/wrangler/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,14 @@ import {
r2BucketSippyGetCommand,
r2BucketSippyNamespace,
} from "./r2/sippy";
import { secret, secretBulkHandler, secretBulkOptions } from "./secret";
import {
secretBulkAlias,
secretBulkCommand,
secretDeleteCommand,
secretListCommand,
secretNamespace,
secretPutCommand,
} from "./secret";
import {
addBreadcrumb,
captureGlobalException,
Expand Down Expand Up @@ -481,13 +488,15 @@ export function createCLIParser(argv: string[]) {
registry.registerNamespace("tail");

// secret
wrangler.command(
"secret",
"🤫 Generate a secret that can be referenced in a Worker",
(secretYargs) => {
return secret(secretYargs.command(subHelp));
}
);
registry.define([
{ command: "wrangler secret", definition: secretNamespace },
{ command: "wrangler secret put", definition: secretPutCommand },
{ command: "wrangler secret delete", definition: secretDeleteCommand },
{ command: "wrangler secret list", definition: secretListCommand },
{ command: "wrangler secret bulk", definition: secretBulkCommand },
{ command: "wrangler secret:bulk", definition: secretBulkAlias },
]);
registry.registerNamespace("secret");

// types
registry.define([{ command: "wrangler types", definition: typesCommand }]);
Expand Down Expand Up @@ -917,14 +926,6 @@ export function createCLIParser(argv: string[]) {
subdomainHandler
);

// [DEPRECATED] secret:bulk
wrangler.command(
"secret:bulk [json]",
false,
secretBulkOptions,
secretBulkHandler
);

// [DEPRECATED] generate
wrangler.command(
"generate [name] [template]",
Expand Down
Loading
Loading