@doki-land/nifty 0.0.4 → 0.0.5
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/cli/nifty.mjs +11 -11
- package/locales/en-US/cli.json +68 -68
- package/locales/locales.json +4 -4
- package/package.json +16 -20
- package/src/cli/authArgs.ts +52 -52
- package/src/cli/bump-cmd.ts +55 -55
- package/src/cli/bump.ts +237 -237
- package/src/cli/change-logs-cmd.ts +97 -97
- package/src/cli/cli.ts +47 -47
- package/src/cli/context.ts +36 -36
- package/src/cli/format-cmd.ts +23 -23
- package/src/cli/format.ts +28 -28
- package/src/cli/index.ts +9 -9
- package/src/cli/install-native-cmd.ts +22 -22
- package/src/cli/install-native.ts +80 -80
- package/src/cli/lint-cmd.ts +35 -35
- package/src/cli/lint.ts +102 -102
- package/src/cli/main.ts +1 -1
- package/src/cli/options.ts +40 -40
- package/src/cli/publish-cmd.ts +38 -38
- package/src/cli/publish.ts +95 -95
- package/src/cli/resolveNpm.ts +16 -16
- package/src/cli/retime-cmd.ts +62 -62
- package/src/cli/reword-cmd.ts +87 -87
- package/src/cli/trust-cmd.ts +38 -38
- package/src/cli/trust.ts +83 -83
- package/src/cli/update-cmd.ts +20 -20
- package/src/cli/update.ts +32 -32
- package/src/cli/upload-cmd.ts +44 -44
- package/src/cli/upload.ts +313 -313
- package/src/cli/workspace.ts +124 -124
- package/src/config/defineConfig.ts +12 -12
- package/src/config/detectProject.ts +189 -189
- package/src/config/index.ts +25 -25
- package/src/config/loadConfig.ts +129 -129
- package/src/config/types.ts +57 -57
- package/src/git.ts +61 -61
- package/src/github.ts +184 -184
- package/src/gitmoji.ts +77 -77
- package/src/index.ts +36 -36
- package/src/native.ts +665 -665
- package/src/nifty.ts +95 -95
- package/src/types.ts +40 -40
- package/README.md +0 -29
package/src/cli/upload-cmd.ts
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import type { Cli, ParsedOptions } from "@vmz/commander";
|
|
2
|
-
|
|
3
|
-
import { bootstrapFromOptions } from "./context.js";
|
|
4
|
-
import { uploadFromOptions } from "./upload.js";
|
|
5
|
-
import { cwdFrom, flag, str } from "./options.js";
|
|
6
|
-
|
|
7
|
-
export function registerUploadCommand(cli: Cli): void {
|
|
8
|
-
cli.command("upload", "cli.cmd.upload")
|
|
9
|
-
.option("--release", "cli.opt.release")
|
|
10
|
-
.option("--pages", "cli.opt.pages")
|
|
11
|
-
.option("--both", "cli.opt.both")
|
|
12
|
-
.option("-d, --dir <path>", "cli.opt.dir")
|
|
13
|
-
.option("-t, --tag <tag>", "cli.opt.tag")
|
|
14
|
-
.option("--repo <repo>", "cli.opt.repo")
|
|
15
|
-
.option("--token <token>", "cli.opt.token")
|
|
16
|
-
.option("--name <title>", "cli.opt.name")
|
|
17
|
-
.option("--notes <body>", "cli.opt.notes")
|
|
18
|
-
.option("--notes-file <path>", "cli.opt.notes-file")
|
|
19
|
-
.option("--draft", "cli.opt.draft")
|
|
20
|
-
.option("--no-generate-notes", "cli.opt.no-generate-notes")
|
|
21
|
-
.option("--github-action", "cli.opt.github-action")
|
|
22
|
-
.action(async (options) => cmdUpload(options));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export async function cmdUpload(options: ParsedOptions): Promise<number> {
|
|
26
|
-
await bootstrapFromOptions(options);
|
|
27
|
-
await uploadFromOptions({
|
|
28
|
-
release: flag(options, "release"),
|
|
29
|
-
pages: flag(options, "pages"),
|
|
30
|
-
both: flag(options, "both"),
|
|
31
|
-
dir: str(options, "dir") ?? "dist",
|
|
32
|
-
tag: str(options, "tag"),
|
|
33
|
-
repo: str(options, "repo"),
|
|
34
|
-
token: str(options, "token"),
|
|
35
|
-
name: str(options, "name"),
|
|
36
|
-
notes: str(options, "notes"),
|
|
37
|
-
notesFile: str(options, "notes-file"),
|
|
38
|
-
draft: flag(options, "draft"),
|
|
39
|
-
generateNotes: !flag(options, "no-generate-notes"),
|
|
40
|
-
githubAction: flag(options, "github-action"),
|
|
41
|
-
cwd: cwdFrom(options),
|
|
42
|
-
});
|
|
43
|
-
return 0;
|
|
44
|
-
}
|
|
1
|
+
import type { Cli, ParsedOptions } from "@vmz/commander";
|
|
2
|
+
|
|
3
|
+
import { bootstrapFromOptions } from "./context.js";
|
|
4
|
+
import { uploadFromOptions } from "./upload.js";
|
|
5
|
+
import { cwdFrom, flag, str } from "./options.js";
|
|
6
|
+
|
|
7
|
+
export function registerUploadCommand(cli: Cli): void {
|
|
8
|
+
cli.command("upload", "cli.cmd.upload")
|
|
9
|
+
.option("--release", "cli.opt.release")
|
|
10
|
+
.option("--pages", "cli.opt.pages")
|
|
11
|
+
.option("--both", "cli.opt.both")
|
|
12
|
+
.option("-d, --dir <path>", "cli.opt.dir")
|
|
13
|
+
.option("-t, --tag <tag>", "cli.opt.tag")
|
|
14
|
+
.option("--repo <repo>", "cli.opt.repo")
|
|
15
|
+
.option("--token <token>", "cli.opt.token")
|
|
16
|
+
.option("--name <title>", "cli.opt.name")
|
|
17
|
+
.option("--notes <body>", "cli.opt.notes")
|
|
18
|
+
.option("--notes-file <path>", "cli.opt.notes-file")
|
|
19
|
+
.option("--draft", "cli.opt.draft")
|
|
20
|
+
.option("--no-generate-notes", "cli.opt.no-generate-notes")
|
|
21
|
+
.option("--github-action", "cli.opt.github-action")
|
|
22
|
+
.action(async (options) => cmdUpload(options));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export async function cmdUpload(options: ParsedOptions): Promise<number> {
|
|
26
|
+
await bootstrapFromOptions(options);
|
|
27
|
+
await uploadFromOptions({
|
|
28
|
+
release: flag(options, "release"),
|
|
29
|
+
pages: flag(options, "pages"),
|
|
30
|
+
both: flag(options, "both"),
|
|
31
|
+
dir: str(options, "dir") ?? "dist",
|
|
32
|
+
tag: str(options, "tag"),
|
|
33
|
+
repo: str(options, "repo"),
|
|
34
|
+
token: str(options, "token"),
|
|
35
|
+
name: str(options, "name"),
|
|
36
|
+
notes: str(options, "notes"),
|
|
37
|
+
notesFile: str(options, "notes-file"),
|
|
38
|
+
draft: flag(options, "draft"),
|
|
39
|
+
generateNotes: !flag(options, "no-generate-notes"),
|
|
40
|
+
githubAction: flag(options, "github-action"),
|
|
41
|
+
cwd: cwdFrom(options),
|
|
42
|
+
});
|
|
43
|
+
return 0;
|
|
44
|
+
}
|