@gasboost/cli 0.3.4 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +129 -82
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,14 +1,37 @@
1
1
  # @gasboost/cli
2
2
 
3
- Gasboost エコシステム共通の開発CLIです。
3
+ Developer-facing command entry point for the gasboost ecosystem.
4
+
5
+ Install:
4
6
 
5
7
  ```bash
6
8
  pnpm add -D @gasboost/cli
7
9
  ```
8
10
 
9
- ## Project Console
11
+ The CLI coordinates developer tooling around a gasboost project.
12
+
13
+ Its responsibilities include:
14
+
15
+ - command routing
16
+ - loading project configuration
17
+ - opening the gasboost console
18
+ - loading application TypeScript modules
19
+ - generating RTDB Security Rules
20
+ - filesystem output
21
+ - diagnostics
22
+ - process exit status
23
+
24
+ ## Commands
25
+
26
+ ### Project Console
27
+
28
+ Open the local project console:
29
+
30
+ ```bash
31
+ gasboost console open
32
+ ```
10
33
 
11
- プロジェクトの `package.json` Console script を追加します。
34
+ Generated projects normally expose:
12
35
 
13
36
  ```json
14
37
  {
@@ -18,28 +41,42 @@ pnpm add -D @gasboost/cli
18
41
  }
19
42
  ```
20
43
 
21
- 次のコマンドでローカルConsoleを開きます。
44
+ so the console can be opened with:
22
45
 
23
46
  ```bash
24
47
  pnpm console
25
48
  ```
26
49
 
27
- 自動でBrowserを開かずに起動する場合は `gasboost console open --no-browser` を使用できます。
50
+ To avoid automatically opening the browser:
28
51
 
29
- ConsoleのBrowser UIから実行できるのは、登録済みoperationと各operationのschemaを満たすstructured inputだけです。
52
+ ```bash
53
+ gasboost console open --no-browser
54
+ ```
55
+
56
+ The browser UI itself is implemented by `@gasboost/console`.
30
57
 
31
- `appsScript` capabilityを設定したプロジェクトでは、Google認証、Apps Script project作成、editor表示、local filesのpushをConsoleから実行できます。
58
+ The CLI is responsible for starting it and connecting it to the current project.
32
59
 
33
- ## RTDB Security Rules
60
+ Console operations are registered operations with structured input. The browser is not given an arbitrary local shell endpoint.
34
61
 
35
- `@gasboost/realtime-firebase` で定義した Firebase Realtime Database の Security Rules を生成できます。
62
+ ### RTDB Security Rules
36
63
 
37
- ### Config
64
+ Generate Firebase Realtime Database Security Rules:
65
+
66
+ ```bash
67
+ gasboost rtdb rules
68
+ ```
38
69
 
39
- プロジェクトルートに `gasboost.config.ts` を作成します。
70
+ Configuration is read from:
71
+
72
+ ```text
73
+ gasboost.config.ts
74
+ ```
75
+
76
+ Canonical configuration:
40
77
 
41
78
  ```ts
42
- import { defineGasboostConfig } from "@gasboost/cli";
79
+ import { defineGasboostConfig } from "@gasboost/config";
43
80
 
44
81
  export default defineGasboostConfig({
45
82
  firebase: {
@@ -51,22 +88,64 @@ export default defineGasboostConfig({
51
88
  });
52
89
  ```
53
90
 
54
- 従来の `rtdb: { source, out }` 形式も互換性のため読み込めますが、
55
- 新しい設定では `firebase.realtimeDatabase` を使用してください。
91
+ The legacy:
92
+
93
+ ```ts
94
+ rtdb: {
95
+ source: "...",
96
+ out: "...",
97
+ }
98
+ ```
99
+
100
+ shape is normalized for compatibility, but new projects should use:
101
+
102
+ ```text
103
+ firebase.realtimeDatabase
104
+ ```
56
105
 
57
- ### RTDB definition
106
+ ## Project Configuration
58
107
 
59
- `source` で指定した module `rtdb` を named export します。
108
+ `gasboost.config.ts` is loaded through `@gasboost/config`.
109
+
110
+ It represents the gasboost Project Definition / Desired State rather than CLI-specific preferences.
111
+
112
+ ```text
113
+ gasboost.config.ts
114
+
115
+ @gasboost/config
116
+
117
+ @gasboost/cli
118
+ ```
119
+
120
+ The canonical config API is:
121
+
122
+ ```ts
123
+ import { defineGasboostConfig } from "@gasboost/config";
124
+ ```
125
+
126
+ `@gasboost/cli` also re-exports config types for compatibility, but project documentation should use `@gasboost/config` directly.
127
+
128
+ ## RTDB Definition
129
+
130
+ The module configured by:
131
+
132
+ ```text
133
+ firebase.realtimeDatabase.source
134
+ ```
135
+
136
+ must export `rtdb`.
137
+
138
+ For example:
60
139
 
61
140
  ```ts
62
141
  import { FirebaseRtdb } from "@gasboost/realtime-firebase";
63
- import { deals } from "@/database/deals";
64
- import { dealSecurity } from "@/security/dealSecurity";
142
+ import { itemsTable } from "../../shared/tables";
143
+ import { itemsRls } from "./rls";
65
144
 
66
145
  export const rtdb = FirebaseRtdb.generate({
67
- tables: [deals] as const,
146
+ tables: [itemsTable] as const,
68
147
 
69
- rowLevelSecurity: [dealSecurity],
148
+ rowLevelSecurity: [itemsRls],
70
149
 
71
150
  principal: {
72
151
  userId: "auth.uid",
@@ -74,40 +153,27 @@ export const rtdb = FirebaseRtdb.generate({
74
153
  });
75
154
  ```
76
155
 
77
- CLI はこの module を実行し、export された `rtdb` の `rules()` を呼び出します。
156
+ The CLI loads the module and invokes:
78
157
 
79
- ### Generate
80
-
81
- ```bash
82
- gasboost console open [--no-browser]
83
- gasboost rtdb rules
158
+ ```text
159
+ rtdb.rules()
84
160
  ```
85
161
 
86
- 成功すると、設定した `out` Security Rules が出力されます。
162
+ The resulting rules are written to the configured output.
163
+
164
+ For example:
87
165
 
88
166
  ```text
89
167
  database.rules.json
90
168
  ```
91
169
 
92
- 例:
93
-
94
- ```json
95
- {
96
- "rules": {
97
- "deals": {
98
- "...": "..."
99
- }
100
- }
101
- }
102
- ```
103
-
104
- ## TypeScript module loading
170
+ ## TypeScript Module Loading
105
171
 
106
- Gasboost CLI application source の読み込みに `jiti` を利用します。
172
+ The CLI uses `jiti` to load application TypeScript modules.
107
173
 
108
- そのため、通常の Node.js native TypeScript execution に限定されず、プロジェクトの `tsconfig.json` に設定された `paths` も利用できます。
174
+ This allows project modules to use the project's normal TypeScript configuration, including path aliases.
109
175
 
110
- 例えば次のような設定に対応します。
176
+ Example:
111
177
 
112
178
  ```json
113
179
  {
@@ -120,49 +186,24 @@ Gasboost CLI は application source の読み込みに `jiti` を利用します
120
186
  }
121
187
  ```
122
188
 
123
- application source 側では通常どおり利用できます。
189
+ Application code can continue to use:
124
190
 
125
191
  ```ts
126
- import { deals } from "@/database/deals";
192
+ import { something } from "@/something";
127
193
  ```
128
194
 
129
- Gasboost CLI を利用するためだけに import path を書き換える必要はありません。
195
+ The application does not need to rewrite imports just for gasboost CLI execution.
130
196
 
131
- ## Architecture
197
+ ## Responsibility Boundaries
132
198
 
133
- ```text
134
- gasboost.config.ts
135
-
136
-
137
- @gasboost/config
138
-
139
-
140
- loadGasboostConfig
141
- jiti
142
-
143
-
144
- rtdb.source
145
-
146
-
147
- export const rtdb
148
-
149
-
150
- rtdb.rules()
151
-
152
-
153
- RtdbRulesWriter
154
-
155
-
156
- database.rules.json
157
- ```
158
-
159
- `@gasboost/cli` は RLS や Firebase Security Rules のコンパイル処理を実装しません。
199
+ `@gasboost/cli` does not implement Firebase authorization compilation or the console UI itself.
160
200
 
161
- それらの責務は `@gasboost/realtime-firebase` にあります。
201
+ For RTDB rules:
162
202
 
163
203
  ```text
164
204
  @gasboost/realtime-firebase
165
- ├─ RLS -> authorization layout
205
+ ├─ RLS projection
206
+ ├─ authorization layout
166
207
  ├─ runtime path generation
167
208
  ├─ projectability validation
168
209
  └─ Security Rules generation
@@ -176,15 +217,21 @@ database.rules.json
176
217
  └─ exit code
177
218
  ```
178
219
 
179
- ## Commands
220
+ For the project console:
180
221
 
181
- ```bash
182
- gasboost rtdb rules
183
- ```
222
+ ```text
223
+ @gasboost/cli
224
+
225
+ start / route command
184
226
 
185
- 現時点ではRTDB Security Rules生成のみを提供します。
227
+ @gasboost/console
228
+
229
+ gasboost-specific lifecycle UI + operations
186
230
 
187
- 今後、Gasboostエコシステム共通のdeveloper toolingを追加していきます。
231
+ @gasboost/console-runtime
232
+
233
+ generic localhost operation runtime
234
+ ```
188
235
 
189
236
  ## Requirements
190
237
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gasboost/cli",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "Developer tooling for the Gasboost ecosystem",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,8 +20,8 @@
20
20
  "node": ">=24"
21
21
  },
22
22
  "dependencies": {
23
- "@gasboost/config": "0.1.1",
24
- "@gasboost/console": "0.4.2"
23
+ "@gasboost/config": "0.1.2",
24
+ "@gasboost/console": "0.4.3"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@gasboost/realtime-firebase": "^0.1.0",