@solazah/solazah-cli 0.2.10

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 (53) hide show
  1. package/CHANGELOG.md +169 -0
  2. package/commands/account/login.d.ts +3 -0
  3. package/commands/account/login.d.ts.map +1 -0
  4. package/commands/account/logout.d.ts +3 -0
  5. package/commands/account/logout.d.ts.map +1 -0
  6. package/commands/account/shared.d.ts +9 -0
  7. package/commands/account/shared.d.ts.map +1 -0
  8. package/commands/account/userinfo.d.ts +3 -0
  9. package/commands/account/userinfo.d.ts.map +1 -0
  10. package/commands/plugin/create.d.ts +9 -0
  11. package/commands/plugin/create.d.ts.map +1 -0
  12. package/commands/plugin/package.d.ts +6 -0
  13. package/commands/plugin/package.d.ts.map +1 -0
  14. package/commands/plugin/publish.d.ts +7 -0
  15. package/commands/plugin/publish.d.ts.map +1 -0
  16. package/index.d.ts +3 -0
  17. package/index.d.ts.map +1 -0
  18. package/index.js +955 -0
  19. package/index.js.map +1 -0
  20. package/package.json +14 -0
  21. package/templates/react/.prettierrc +6 -0
  22. package/templates/react/.versionrc +17 -0
  23. package/templates/react/CHANGELOG.md +2 -0
  24. package/templates/react/README.md +224 -0
  25. package/templates/react/components.json +22 -0
  26. package/templates/react/eslint.config.js +21 -0
  27. package/templates/react/manifest.json +14 -0
  28. package/templates/react/package.config.js +86 -0
  29. package/templates/react/package.json +66 -0
  30. package/templates/react/src/preload/preload.mjs +0 -0
  31. package/templates/react/src/renderer/components/ui/card.tsx +76 -0
  32. package/templates/react/src/renderer/components/ui/sonner.tsx +35 -0
  33. package/templates/react/src/renderer/index.css +164 -0
  34. package/templates/react/src/renderer/index.html +12 -0
  35. package/templates/react/src/renderer/lib/utils.ts +6 -0
  36. package/templates/react/src/renderer/main.tsx +56 -0
  37. package/templates/react/src/renderer/pages/Home.tsx +154 -0
  38. package/templates/react/src/renderer/vite-env.d.ts +1 -0
  39. package/templates/react/template.json +15 -0
  40. package/templates/react/tsconfig.app.json +25 -0
  41. package/templates/react/tsconfig.json +19 -0
  42. package/templates/react/tsconfig.node.json +25 -0
  43. package/templates/react/vite.config.ts +25 -0
  44. package/utils/auth-storage.d.ts +27 -0
  45. package/utils/auth-storage.d.ts.map +1 -0
  46. package/utils/file.d.ts +41 -0
  47. package/utils/file.d.ts.map +1 -0
  48. package/utils/oauth-device.d.ts +98 -0
  49. package/utils/oauth-device.d.ts.map +1 -0
  50. package/utils/open-browser.d.ts +5 -0
  51. package/utils/open-browser.d.ts.map +1 -0
  52. package/utils/validate.d.ts +21 -0
  53. package/utils/validate.d.ts.map +1 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,169 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
+
5
+ ### [0.2.10](https://cnb.cool/seayona/solazah/solazah-cli/compare/v0.2.4...v0.2.10) (2026-04-21)
6
+
7
+
8
+ ### Features
9
+
10
+ * **cli:** 添加插件发布和账户管理功能 ([a696b70](https://cnb.cool/seayona/solazah/solazah-cli/commit/a696b70ef9627f75e63ddb3cc59ca553385055eb))
11
+ * **cli:** 添加插件发布和账户管理功能 ([a9388c4](https://cnb.cool/seayona/solazah/solazah-cli/commit/a9388c4b250621ee6c20dffde4c607484822e0be))
12
+ * **create-plugin:** 添加目标目录选择功能 ([6119cd3](https://cnb.cool/seayona/solazah/solazah-cli/commit/6119cd3741a0c8480d9e36f28189078cc71c9ce8))
13
+ * **plugin:** 添加插件简单名称提取功能 ([75ea562](https://cnb.cool/seayona/solazah/solazah-cli/commit/75ea562d4603292b473d9140f5c5e63ee146b6f1))
14
+ * **template:** 优化模版 ([fd45529](https://cnb.cool/seayona/solazah/solazah-cli/commit/fd455296259352930e476ae690f25435f9908ef8))
15
+
16
+ ### [0.2.9](https://cnb.cool/seayona/solazah/solazah-cli/compare/v0.2.8...v0.2.9) (2026-04-20)
17
+
18
+
19
+ ### Features
20
+
21
+ * **cli:** 添加插件发布和账户管理功能 ([a696b70](https://cnb.cool/seayona/solazah/solazah-cli/commit/a696b70ef9627f75e63ddb3cc59ca553385055eb))
22
+ * **cli:** 添加插件发布和账户管理功能 ([a9388c4](https://cnb.cool/seayona/solazah/solazah-cli/commit/a9388c4b250621ee6c20dffde4c607484822e0be))
23
+
24
+ ### [0.2.8](https://cnb.cool/seayona/solazah/solazah-cli/compare/v0.2.7...v0.2.8) (2026-04-20)
25
+
26
+ ### [0.2.7](https://cnb.cool/seayona/solazah/solazah-cli/compare/v0.2.6...v0.2.7) (2026-04-11)
27
+
28
+
29
+ ### Features
30
+
31
+ * **create-plugin:** 添加目标目录选择功能 ([6119cd3](https://cnb.cool/seayona/solazah/solazah-cli/commit/6119cd3741a0c8480d9e36f28189078cc71c9ce8))
32
+
33
+ ### [0.2.6](https://cnb.cool/seayona/solazah/solazah-cli/compare/v0.2.5...v0.2.6) (2026-03-22)
34
+
35
+
36
+ ### Features
37
+
38
+ * **plugin:** 添加插件简单名称提取功能 ([75ea562](https://cnb.cool/seayona/solazah/solazah-cli/commit/75ea562d4603292b473d9140f5c5e63ee146b6f1))
39
+ * **template:** 优化模版 ([fd45529](https://cnb.cool/seayona/solazah/solazah-cli/commit/fd455296259352930e476ae690f25435f9908ef8))
40
+
41
+ ### 0.2.5 (2026-02-20)
42
+
43
+
44
+ ### Features
45
+
46
+ * 初始化 solazah-cli 项目 ([b93cefd](https://cnb.cool/seayona/solazah/solazah-cli/commit/b93cefd1587982be15f6cf45c94077e594795744))
47
+ * **build:** 添加构建配置和优化CLI包结构 ([e66df09](https://cnb.cool/seayona/solazah/solazah-cli/commit/e66df09a86f640d6648288ddb43ce9b2a202e940))
48
+
49
+
50
+ ### Bug Fixes
51
+
52
+ * **cli:** 修复插件创建命令中的路径解析和版本显示问题 ([a3cee5e](https://cnb.cool/seayona/solazah/solazah-cli/commit/a3cee5e497d5acb4664df2cd1202442155a3d345))
53
+
54
+ ### [0.2.4](https://cnb.cool/seayona/solazah/solazah-cli/compare/v0.2.3...v0.2.4) (2026-02-14)
55
+
56
+
57
+ ### Bug Fixes
58
+
59
+ * **cli:** 修复插件创建命令中的路径解析和版本显示问题 ([a3cee5e](https://cnb.cool/seayona/solazah/solazah-cli/commit/a3cee5e497d5acb4664df2cd1202442155a3d345))
60
+
61
+ ### [0.2.3](https://cnb.cool/seayona/solazah/solazah-cli/compare/v0.2.2...v0.2.3) (2026-02-14)
62
+
63
+ ### [0.2.2](https://cnb.cool/seayona/solazah/solazah-cli/compare/v0.2.1...v0.2.2) (2026-02-14)
64
+
65
+
66
+ ### Features
67
+
68
+ * **build:** 添加构建配置和优化CLI包结构 ([e66df09](https://cnb.cool/seayona/solazah/solazah-cli/commit/e66df09a86f640d6648288ddb43ce9b2a202e940))
69
+
70
+ ### 0.2.1 (2026-02-14)
71
+
72
+
73
+ ### Features
74
+
75
+ * 初始化 solazah-cli 项目 ([b93cefd](https://cnb.cool/seayona/solazah/solazah-cli/commit/b93cefd1587982be15f6cf45c94077e594795744))
76
+
77
+ ## [0.2.0] - 2024-02-14
78
+
79
+ ### ✨ Features
80
+
81
+ #### Multi-Template Support
82
+ - Added support for multiple plugin templates
83
+ - Templates now organized in `templates/<template-name>/` structure
84
+ - Added `template.json` metadata for each template
85
+ - Interactive template selection when multiple templates are available
86
+ - New `--template` CLI option to specify template
87
+
88
+ #### Unified Placeholder System
89
+ - Introduced standardized `{{PLACEHOLDER}}` format
90
+ - 8 standard placeholders for plugin customization
91
+ - Batch replacement function for entire directories
92
+ - Safer replacement logic to avoid accidental text substitution
93
+
94
+ #### Enhanced Example Page
95
+ - Completely redesigned Home.tsx with modern UI
96
+ - Added shadcn/ui Card components
97
+ - Responsive layout with multiple sections:
98
+ - Quick Start guide
99
+ - Documentation links
100
+ - Tech Stack display
101
+ - Professional and user-friendly design
102
+
103
+ ### 🔧 Changes
104
+
105
+ #### Removed Naming Restrictions
106
+ - **BREAKING**: No longer requires `@solazah/` prefix
107
+ - Supports any valid npm package name
108
+ - Supports scoped packages (e.g., `@myorg/plugin-name`)
109
+ - Supports non-scoped packages (e.g., `my-plugin`)
110
+ - Updated validation logic to accept all valid npm names
111
+
112
+ ### 📝 Documentation
113
+
114
+ - Updated README with new naming conventions
115
+ - Updated QUICKSTART with multiple examples
116
+ - Added UPDATES.md with comprehensive change documentation
117
+ - Updated all examples to show flexible naming
118
+
119
+ ### 🎨 Template Improvements
120
+
121
+ - Added `card.tsx` UI component
122
+ - Updated placeholder usage in all template files
123
+ - Improved visual design and layout
124
+ - Better developer onboarding experience
125
+
126
+ ### 📊 Statistics
127
+
128
+ - New files: 2
129
+ - Modified files: 8
130
+ - New functions: 4
131
+ - Lines of code added: ~400
132
+ - New placeholders: 8
133
+
134
+ ---
135
+
136
+ ## [0.1.0] - 2024-02-14
137
+
138
+ ### Features
139
+
140
+ - ✨ Initial release of Solazah CLI
141
+ - ✨ `solazah plugin create` command
142
+ - ✨ Interactive plugin creation wizard
143
+ - ✨ Automatic template scaffolding
144
+ - ✨ Built-in validation for plugin names
145
+ - ✨ Support for custom target directory
146
+ - ✨ Optional dependency installation
147
+ - ✨ Complete plugin template with:
148
+ - React 19 + TypeScript
149
+ - Vite 5 build system
150
+ - Tailwind CSS 4
151
+ - shadcn/ui components
152
+ - Valtio state management
153
+ - React Router
154
+ - ESLint + Prettier
155
+ - Conventional commits
156
+
157
+ ### Documentation
158
+
159
+ - 📝 Comprehensive README
160
+ - 📝 Quick start guide
161
+ - 📝 Plugin template documentation
162
+
163
+ ### Template Features
164
+
165
+ - Complete plugin scaffolding
166
+ - IPC communication setup
167
+ - Build and release scripts
168
+ - Development guide
169
+ - Example components
@@ -0,0 +1,3 @@
1
+ import { CommonOptions } from './shared.js';
2
+ export declare function loginCommand(options: CommonOptions): Promise<void>;
3
+ //# sourceMappingURL=login.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/commands/account/login.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,aAAa,EAAwB,MAAM,aAAa,CAAC;AAElE,wBAAsB,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CA6GxE"}
@@ -0,0 +1,3 @@
1
+ import { CommonOptions } from './shared.js';
2
+ export declare function logoutCommand(options: CommonOptions): Promise<void>;
3
+ //# sourceMappingURL=logout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../src/commands/account/logout.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAiB,MAAM,aAAa,CAAC;AAE3D,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBzE"}
@@ -0,0 +1,9 @@
1
+ import { StoredTokens } from '../../utils/auth-storage.js';
2
+ import { OidcDiscovery } from '../../utils/oauth-device.js';
3
+ export interface CommonOptions {
4
+ issuer?: string;
5
+ }
6
+ export declare const delay: (ms: number) => Promise<void>;
7
+ export declare function loadDiscovery(issuer?: string): Promise<OidcDiscovery>;
8
+ export declare function ensureValidTokens(discovery: OidcDiscovery, tokens: StoredTokens): Promise<StoredTokens>;
9
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/commands/account/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EACb,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAGL,aAAa,EAEd,MAAM,6BAA6B,CAAC;AAErC,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,KAAK,GAAI,IAAI,MAAM,kBAA4D,CAAC;AAE7F,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAErE;AAED,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,aAAa,EACxB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,YAAY,CAAC,CAcvB"}
@@ -0,0 +1,3 @@
1
+ import { CommonOptions } from './shared.js';
2
+ export declare function userinfoCommand(options: CommonOptions): Promise<void>;
3
+ //# sourceMappingURL=userinfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userinfo.d.ts","sourceRoot":"","sources":["../../../src/commands/account/userinfo.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAoC,MAAM,aAAa,CAAC;AAE9E,wBAAsB,eAAe,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAmB3E"}
@@ -0,0 +1,9 @@
1
+ interface CreatePluginOptions {
2
+ name?: string;
3
+ dir?: string;
4
+ template?: string;
5
+ skipInstall?: boolean;
6
+ }
7
+ export declare function createPluginCommand(options: CreatePluginOptions): Promise<void>;
8
+ export {};
9
+ //# sourceMappingURL=create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/create.ts"],"names":[],"mappings":"AAuBA,UAAU,mBAAmB;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmOrF"}
@@ -0,0 +1,6 @@
1
+ interface PackagePluginOptions {
2
+ dir?: string;
3
+ }
4
+ export declare function packagePluginCommand(options: PackagePluginOptions): Promise<void>;
5
+ export {};
6
+ //# sourceMappingURL=package.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/package.ts"],"names":[],"mappings":"AASA,UAAU,oBAAoB;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAwHD,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgEvF"}
@@ -0,0 +1,7 @@
1
+ interface PublishOptions {
2
+ file?: string;
3
+ dir?: string;
4
+ }
5
+ export declare function publishPluginCommand(options: PublishOptions): Promise<void>;
6
+ export {};
7
+ //# sourceMappingURL=publish.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../src/commands/plugin/publish.ts"],"names":[],"mappings":"AAeA,UAAU,cAAc;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAsDD,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAqEjF"}
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}