bun-push 0.1.9

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.
Files changed (68) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +320 -0
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +1459 -0
  6. package/dist/cli.js.map +22 -0
  7. package/dist/i18n/index.d.ts +21 -0
  8. package/dist/i18n/index.d.ts.map +1 -0
  9. package/dist/i18n/index.js +126 -0
  10. package/dist/i18n/locales/en.d.ts +119 -0
  11. package/dist/i18n/locales/en.d.ts.map +1 -0
  12. package/dist/i18n/locales/en.js +125 -0
  13. package/dist/i18n/locales/ja.d.ts +119 -0
  14. package/dist/i18n/locales/ja.d.ts.map +1 -0
  15. package/dist/i18n/locales/ja.js +125 -0
  16. package/dist/i18n/locales/ko.d.ts +119 -0
  17. package/dist/i18n/locales/ko.d.ts.map +1 -0
  18. package/dist/i18n/locales/ko.js +125 -0
  19. package/dist/i18n/locales/zh.d.ts +119 -0
  20. package/dist/i18n/locales/zh.d.ts.map +1 -0
  21. package/dist/i18n/locales/zh.js +125 -0
  22. package/dist/index.d.ts +33 -0
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/index.js +1114 -0
  25. package/dist/index.js.map +20 -0
  26. package/dist/index.test.d.ts +2 -0
  27. package/dist/index.test.d.ts.map +1 -0
  28. package/dist/index.test.js +90 -0
  29. package/dist/logo.d.ts +9 -0
  30. package/dist/logo.d.ts.map +1 -0
  31. package/dist/logo.js +58 -0
  32. package/dist/prompts.d.ts +42 -0
  33. package/dist/prompts.d.ts.map +1 -0
  34. package/dist/prompts.js +312 -0
  35. package/dist/publisher.d.ts +7 -0
  36. package/dist/publisher.d.ts.map +1 -0
  37. package/dist/publisher.js +110 -0
  38. package/dist/publisher.test.d.ts +2 -0
  39. package/dist/publisher.test.d.ts.map +1 -0
  40. package/dist/publisher.test.js +92 -0
  41. package/dist/types.d.ts +78 -0
  42. package/dist/types.d.ts.map +1 -0
  43. package/dist/types.js +4 -0
  44. package/dist/utils/changelog.d.ts +32 -0
  45. package/dist/utils/changelog.d.ts.map +1 -0
  46. package/dist/utils/changelog.js +210 -0
  47. package/dist/utils/changelog.test.d.ts +2 -0
  48. package/dist/utils/changelog.test.d.ts.map +1 -0
  49. package/dist/utils/changelog.test.js +126 -0
  50. package/dist/utils/scripts.d.ts +13 -0
  51. package/dist/utils/scripts.d.ts.map +1 -0
  52. package/dist/utils/scripts.js +30 -0
  53. package/dist/utils/scripts.test.d.ts +2 -0
  54. package/dist/utils/scripts.test.d.ts.map +1 -0
  55. package/dist/utils/scripts.test.js +58 -0
  56. package/dist/utils/version.d.ts +24 -0
  57. package/dist/utils/version.d.ts.map +1 -0
  58. package/dist/utils/version.js +71 -0
  59. package/dist/utils/version.test.d.ts +2 -0
  60. package/dist/utils/version.test.d.ts.map +1 -0
  61. package/dist/utils/version.test.js +78 -0
  62. package/dist/utils/workspace.d.ts +14 -0
  63. package/dist/utils/workspace.d.ts.map +1 -0
  64. package/dist/utils/workspace.js +174 -0
  65. package/dist/utils/workspace.test.d.ts +2 -0
  66. package/dist/utils/workspace.test.d.ts.map +1 -0
  67. package/dist/utils/workspace.test.js +124 -0
  68. package/package.json +56 -0
@@ -0,0 +1,119 @@
1
+ /**
2
+ * 中文语言包
3
+ */
4
+ declare const _default: {
5
+ common: {
6
+ yes: string;
7
+ no: string;
8
+ skip: string;
9
+ cancel: string;
10
+ confirm: string;
11
+ error: string;
12
+ success: string;
13
+ };
14
+ package: {
15
+ selectPackage: string;
16
+ selectedPackage: string;
17
+ };
18
+ changelog: {
19
+ input: string;
20
+ singleLineHint: string;
21
+ empty: string;
22
+ generate: string;
23
+ usingDefault: string;
24
+ defaultContent: string;
25
+ };
26
+ version: {
27
+ selectType: string;
28
+ currentVersion: string;
29
+ finalVersion: string;
30
+ customVersion: string;
31
+ customVersionDesc: string;
32
+ inputVersion: string;
33
+ example: string;
34
+ versionEmpty: string;
35
+ patch: string;
36
+ minor: string;
37
+ major: string;
38
+ invalid: string;
39
+ invalidWithVersion: string;
40
+ cannotGenerate: string;
41
+ unsupportedType: string;
42
+ unsupportedTypeWithType: string;
43
+ versionFormat: string;
44
+ };
45
+ script: {
46
+ select: string;
47
+ noScripts: string;
48
+ running: string;
49
+ success: string;
50
+ failed: string;
51
+ notFound: string;
52
+ notFoundWithName: string;
53
+ executionFailed: string;
54
+ };
55
+ git: {
56
+ pushTag: string;
57
+ createTagFailed: string;
58
+ pushTagFailed: string;
59
+ };
60
+ registry: {
61
+ input: string;
62
+ empty: string;
63
+ invalid: string;
64
+ };
65
+ publish: {
66
+ preview: string;
67
+ packageName: string;
68
+ currentVersion: string;
69
+ newVersion: string;
70
+ tag: string;
71
+ changelog: string;
72
+ registry: string;
73
+ pushTag: string;
74
+ generateChangelog: string;
75
+ script: string;
76
+ confirm: string;
77
+ publishing: string;
78
+ success: string;
79
+ failed: string;
80
+ cancelled: string;
81
+ error: string;
82
+ generalError: string;
83
+ npmPublishFailed: string;
84
+ npmNotLoggedIn: string;
85
+ npmAuthCheckFailed: string;
86
+ needOtp: string;
87
+ inputOtp: string;
88
+ otpEmpty: string;
89
+ otpInvalid: string;
90
+ otp: string;
91
+ rollingBack: string;
92
+ rollbackComplete: string;
93
+ rollbackFailed: string;
94
+ };
95
+ success: {
96
+ title: string;
97
+ packageName: string;
98
+ version: string;
99
+ registry: string;
100
+ thanks: string;
101
+ };
102
+ changelogTypes: {
103
+ added: string;
104
+ changed: string;
105
+ deprecated: string;
106
+ removed: string;
107
+ fixed: string;
108
+ security: string;
109
+ };
110
+ workspace: {
111
+ packageJsonNotFound: string;
112
+ workspacesConfigInvalid: string;
113
+ packageNotFound: string;
114
+ packageNotFoundByPath: string;
115
+ monorepoRequiresPath: string;
116
+ };
117
+ };
118
+ export default _default;
119
+ //# sourceMappingURL=zh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/zh.ts"],"names":[],"mappings":"AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBAsIE"}
@@ -0,0 +1,125 @@
1
+ /**
2
+ * 中文语言包
3
+ */
4
+ export default {
5
+ // 通用
6
+ common: {
7
+ yes: "是",
8
+ no: "否",
9
+ skip: "跳过",
10
+ cancel: "取消",
11
+ confirm: "确认",
12
+ error: "错误",
13
+ success: "成功",
14
+ },
15
+ // 包选择
16
+ package: {
17
+ selectPackage: "请选择要发布的包",
18
+ selectedPackage: "已选择包",
19
+ },
20
+ // Changelog
21
+ changelog: {
22
+ input: "请输入 changelog(单行输入,支持多次输入,输入空行结束)",
23
+ singleLineHint: "支持多次单行输入,输入空行结束。如果输入为空,将使用默认的版本升级记录",
24
+ empty: "changelog 不能为空",
25
+ generate: "是否生成 CHANGELOG.md 文件?",
26
+ usingDefault: "使用默认 changelog:版本升级记录",
27
+ defaultContent: "升级版本号: {currentVersion} → {newVersion}",
28
+ },
29
+ // 版本
30
+ version: {
31
+ selectType: "选择版本类型",
32
+ currentVersion: "当前版本",
33
+ finalVersion: "最终版本",
34
+ customVersion: "自定义版本号",
35
+ customVersionDesc: "手动输入版本号",
36
+ inputVersion: "请输入版本号",
37
+ example: "示例",
38
+ versionEmpty: "版本号不能为空",
39
+ patch: "补丁版本 - 修复 bug",
40
+ minor: "次版本 - 新功能,向后兼容",
41
+ major: "主版本 - 破坏性变更",
42
+ invalid: "无效的版本号",
43
+ invalidWithVersion: "无效的版本号: {version}",
44
+ cannotGenerate: "无法生成下一个版本号",
45
+ unsupportedType: "不支持的发布类型",
46
+ unsupportedTypeWithType: "不支持的发布类型: {type}",
47
+ versionFormat: "{current} -> {next}",
48
+ },
49
+ // 脚本
50
+ script: {
51
+ select: "请选择要执行的脚本(通常是 build)",
52
+ noScripts: "该包没有 scripts",
53
+ running: "执行脚本",
54
+ success: "脚本执行成功",
55
+ failed: "脚本执行失败",
56
+ notFound: "脚本不存在",
57
+ notFoundWithName: "脚本 \"{name}\" 不存在",
58
+ executionFailed: "脚本执行失败,退出码: {exitCode}",
59
+ },
60
+ // Git
61
+ git: {
62
+ pushTag: "是否推送 git tag?",
63
+ createTagFailed: "创建 git tag 失败,退出码: {exitCode}",
64
+ pushTagFailed: "推送 git tag 失败,退出码: {exitCode}",
65
+ },
66
+ // Registry
67
+ registry: {
68
+ input: "请输入 npm registry 地址",
69
+ empty: "registry 地址不能为空",
70
+ invalid: "请输入有效的 URL",
71
+ },
72
+ // 发布
73
+ publish: {
74
+ preview: "发布配置预览",
75
+ packageName: "包名",
76
+ currentVersion: "当前版本",
77
+ newVersion: "新版本",
78
+ tag: "Tag",
79
+ changelog: "Changelog",
80
+ registry: "Registry",
81
+ pushTag: "推送 Tag",
82
+ generateChangelog: "生成 Changelog",
83
+ script: "执行脚本",
84
+ confirm: "确认发布?",
85
+ publishing: "正在发布到 npm...",
86
+ success: "发布成功!",
87
+ failed: "发布失败",
88
+ cancelled: "已取消发布",
89
+ error: "发布过程中出现错误",
90
+ generalError: "错误",
91
+ npmPublishFailed: "npm 发布失败,退出码: {exitCode}",
92
+ npmNotLoggedIn: "未登录到 npm registry: {registry},请先运行 'npm login --registry {registry}' 登录",
93
+ npmAuthCheckFailed: "检查 npm 登录状态失败 (registry: {registry}): {error}",
94
+ needOtp: "是否需要输入 npm 发布的一次性代码(OTP)?",
95
+ inputOtp: "请输入一次性代码(OTP)",
96
+ otpEmpty: "一次性代码不能为空",
97
+ otpInvalid: "一次性代码必须是 6 位数字",
98
+ otp: "一次性代码(OTP)",
99
+ },
100
+ // 成功消息
101
+ success: {
102
+ title: "发布成功!",
103
+ packageName: "包名",
104
+ version: "版本",
105
+ registry: "Registry",
106
+ thanks: "感谢使用 npm-push!",
107
+ },
108
+ // Changelog 类型
109
+ changelogTypes: {
110
+ added: "新增",
111
+ changed: "变更",
112
+ deprecated: "废弃",
113
+ removed: "移除",
114
+ fixed: "修复",
115
+ security: "安全",
116
+ },
117
+ // Workspace
118
+ workspace: {
119
+ packageJsonNotFound: "未找到 package.json 文件",
120
+ workspacesConfigInvalid: "workspaces 配置无效",
121
+ packageNotFound: "未找到要发布的包",
122
+ packageNotFoundByPath: "未找到路径为 {path} 的包",
123
+ monorepoRequiresPath: "monorepo 模式下必须指定 packagePath 或使用 CLI 模式",
124
+ },
125
+ };
@@ -0,0 +1,33 @@
1
+ import type { PublishOptions, PackageInfo } from "./types";
2
+ /**
3
+ * bun-push 类
4
+ */
5
+ export declare class NpmPush {
6
+ private workspaceInfo;
7
+ constructor(workingDir?: string);
8
+ /**
9
+ * 获取 workspace 信息
10
+ */
11
+ getWorkspaceInfo(): import("./types").WorkspaceInfo;
12
+ /**
13
+ * 获取所有包
14
+ */
15
+ getPackages(): PackageInfo[];
16
+ /**
17
+ * 根据名称查找包
18
+ */
19
+ findPackage(packageName: string): PackageInfo | undefined;
20
+ /**
21
+ * 发布包
22
+ */
23
+ publish(options: PublishOptions): Promise<void>;
24
+ }
25
+ /**
26
+ * 导出函数式 API
27
+ */
28
+ export declare function publishPackage(options: PublishOptions): Promise<void>;
29
+ export type { PublishOptions, PublishConfig, PackageInfo, WorkspaceInfo } from "./types";
30
+ export { getWorkspaceInfo } from "./utils/workspace";
31
+ export { generateTag, getNextVersion, isValidVersion } from "./utils/version";
32
+ export { getPackageScripts, runScript } from "./utils/scripts";
33
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAiB,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG1E;;GAEG;AACH,qBAAa,OAAO;IAClB,OAAO,CAAC,aAAa,CAAsC;gBAE/C,UAAU,CAAC,EAAE,MAAM;IAI/B;;OAEG;IACH,gBAAgB;IAIhB;;OAEG;IACH,WAAW,IAAI,WAAW,EAAE;IAI5B;;OAEG;IACH,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAIzD;;OAEG;IACG,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CA6DtD;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAG3E;AAGD,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}