@seed-app-studio/cli 0.1.1-canary.0
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/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +10 -0
- package/dist/commands-TM-KX_MV.mjs +972 -0
- package/dist/index.d.mts +139 -0
- package/dist/index.mjs +2 -0
- package/examples/react-spa-stories/README.md +44 -0
- package/examples/react-spa-stories/index.html +12 -0
- package/examples/react-spa-stories/package.json +29 -0
- package/examples/react-spa-stories/seed-app.json +74 -0
- package/examples/react-spa-stories/src/App.tsx +440 -0
- package/examples/react-spa-stories/src/main.tsx +10 -0
- package/examples/react-spa-stories/src/replayFixture.ts +60 -0
- package/examples/react-spa-stories/src/storyData.ts +661 -0
- package/examples/react-spa-stories/src/styles.css +342 -0
- package/examples/react-spa-stories/tsconfig.json +22 -0
- package/examples/react-spa-stories/vite.config.ts +24 -0
- package/package.json +49 -0
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
color: #202328;
|
|
3
|
+
background: #f4f6f8;
|
|
4
|
+
font-family:
|
|
5
|
+
Inter,
|
|
6
|
+
ui-sans-serif,
|
|
7
|
+
system-ui,
|
|
8
|
+
-apple-system,
|
|
9
|
+
BlinkMacSystemFont,
|
|
10
|
+
"Segoe UI",
|
|
11
|
+
sans-serif;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
* {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
body {
|
|
19
|
+
margin: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
main {
|
|
23
|
+
min-height: 100vh;
|
|
24
|
+
padding: 28px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.hero {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: flex-end;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
gap: 24px;
|
|
32
|
+
border-bottom: 1px solid #d9dee6;
|
|
33
|
+
padding-bottom: 22px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.eyebrow,
|
|
37
|
+
.capability,
|
|
38
|
+
.identity span {
|
|
39
|
+
margin: 0;
|
|
40
|
+
color: #667085;
|
|
41
|
+
font-size: 12px;
|
|
42
|
+
font-weight: 700;
|
|
43
|
+
letter-spacing: 0;
|
|
44
|
+
text-transform: uppercase;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
h1,
|
|
48
|
+
h2,
|
|
49
|
+
p {
|
|
50
|
+
margin: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
h1 {
|
|
54
|
+
margin-top: 8px;
|
|
55
|
+
font-size: 32px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
h2 {
|
|
59
|
+
margin-top: 4px;
|
|
60
|
+
font-size: 18px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.intro {
|
|
64
|
+
max-width: 760px;
|
|
65
|
+
margin-top: 10px;
|
|
66
|
+
color: #48505c;
|
|
67
|
+
line-height: 1.6;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.zh {
|
|
71
|
+
color: #344054;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.intro.zh {
|
|
75
|
+
margin-top: 6px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.identity {
|
|
79
|
+
min-width: 240px;
|
|
80
|
+
border: 1px solid #d9dee6;
|
|
81
|
+
border-radius: 8px;
|
|
82
|
+
background: white;
|
|
83
|
+
padding: 14px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.identity strong {
|
|
87
|
+
display: block;
|
|
88
|
+
margin-top: 6px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.layout {
|
|
92
|
+
display: grid;
|
|
93
|
+
grid-template-columns: minmax(0, 1fr) 360px;
|
|
94
|
+
gap: 18px;
|
|
95
|
+
margin-top: 22px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.stories,
|
|
99
|
+
aside {
|
|
100
|
+
display: flex;
|
|
101
|
+
min-width: 0;
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
gap: 14px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.story,
|
|
107
|
+
.panel {
|
|
108
|
+
border: 1px solid #d9dee6;
|
|
109
|
+
border-radius: 8px;
|
|
110
|
+
background: white;
|
|
111
|
+
padding: 16px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.story {
|
|
115
|
+
border-left-width: 5px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.story.running {
|
|
119
|
+
border-left-color: #4f6bed;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.story.success {
|
|
123
|
+
border-left-color: #248a3d;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.story.blocked {
|
|
127
|
+
border-left-color: #d9822b;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.story.failed {
|
|
131
|
+
border-left-color: #c4314b;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.storyHeader,
|
|
135
|
+
.meta {
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: flex-start;
|
|
138
|
+
justify-content: space-between;
|
|
139
|
+
gap: 12px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.storyActions {
|
|
143
|
+
display: flex;
|
|
144
|
+
flex: 0 0 auto;
|
|
145
|
+
gap: 8px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.story p {
|
|
149
|
+
margin-top: 10px;
|
|
150
|
+
color: #48505c;
|
|
151
|
+
line-height: 1.5;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.story p.zh,
|
|
155
|
+
.muted.zh {
|
|
156
|
+
margin-top: 6px;
|
|
157
|
+
color: #344054;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.meta {
|
|
161
|
+
margin-top: 12px;
|
|
162
|
+
color: #667085;
|
|
163
|
+
font-size: 13px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.runtimeLine {
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
gap: 10px;
|
|
170
|
+
margin-top: 10px;
|
|
171
|
+
color: #667085;
|
|
172
|
+
font-size: 13px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.runtimeLine small {
|
|
176
|
+
min-width: 0;
|
|
177
|
+
overflow-wrap: anywhere;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.runtimeBadge {
|
|
181
|
+
flex: 0 0 auto;
|
|
182
|
+
border-radius: 6px;
|
|
183
|
+
background: #eef2f7;
|
|
184
|
+
color: #344054;
|
|
185
|
+
font-size: 12px;
|
|
186
|
+
font-weight: 800;
|
|
187
|
+
padding: 4px 7px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.runtimeBadge.live {
|
|
191
|
+
background: #e9f7ee;
|
|
192
|
+
color: #248a3d;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.runtimeBadge.mock {
|
|
196
|
+
background: #fff3db;
|
|
197
|
+
color: #b65f00;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.runtimeBadge.policy-block,
|
|
201
|
+
.runtimeBadge.runtime-error {
|
|
202
|
+
background: #fde8ee;
|
|
203
|
+
color: #a61b34;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
button {
|
|
207
|
+
min-width: 76px;
|
|
208
|
+
border: 0;
|
|
209
|
+
border-radius: 6px;
|
|
210
|
+
background: #202328;
|
|
211
|
+
color: white;
|
|
212
|
+
cursor: pointer;
|
|
213
|
+
font: inherit;
|
|
214
|
+
padding: 8px 12px;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
button:disabled {
|
|
218
|
+
cursor: not-allowed;
|
|
219
|
+
opacity: 0.6;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.secondaryButton {
|
|
223
|
+
border: 1px solid #d9dee6;
|
|
224
|
+
background: white;
|
|
225
|
+
color: #202328;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.fixtureActions {
|
|
229
|
+
display: grid;
|
|
230
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
231
|
+
gap: 10px;
|
|
232
|
+
align-items: center;
|
|
233
|
+
margin-top: 12px;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.fixtureActions span {
|
|
237
|
+
color: #667085;
|
|
238
|
+
font-size: 13px;
|
|
239
|
+
line-height: 1.4;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.fixtureActions span.zh {
|
|
243
|
+
color: #344054;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
pre {
|
|
247
|
+
overflow: auto;
|
|
248
|
+
max-height: 260px;
|
|
249
|
+
margin: 12px 0 0;
|
|
250
|
+
border-radius: 6px;
|
|
251
|
+
background: #111318;
|
|
252
|
+
color: #e5e7eb;
|
|
253
|
+
font-size: 12px;
|
|
254
|
+
padding: 12px;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.codeExample {
|
|
258
|
+
max-height: 360px;
|
|
259
|
+
border: 1px solid #d9dee6;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.error {
|
|
263
|
+
color: #a61b34;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.muted {
|
|
267
|
+
color: #667085;
|
|
268
|
+
line-height: 1.5;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.grantList {
|
|
272
|
+
display: flex;
|
|
273
|
+
flex-direction: column;
|
|
274
|
+
gap: 8px;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.grant {
|
|
278
|
+
display: grid;
|
|
279
|
+
grid-template-columns: minmax(0, 1fr) auto auto;
|
|
280
|
+
gap: 8px;
|
|
281
|
+
align-items: center;
|
|
282
|
+
border-radius: 6px;
|
|
283
|
+
background: #f4f6f8;
|
|
284
|
+
padding: 10px;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.grant span {
|
|
288
|
+
overflow-wrap: anywhere;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.grant.enabled strong {
|
|
292
|
+
color: #248a3d;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.grant.ask strong {
|
|
296
|
+
color: #b65f00;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.grant.disabled strong {
|
|
300
|
+
color: #a61b34;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.agentTimeline {
|
|
304
|
+
display: flex;
|
|
305
|
+
flex-direction: column;
|
|
306
|
+
gap: 8px;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.agentEvent {
|
|
310
|
+
display: grid;
|
|
311
|
+
grid-template-columns: minmax(0, 1fr);
|
|
312
|
+
gap: 4px;
|
|
313
|
+
border-left: 3px solid #4f6bed;
|
|
314
|
+
border-radius: 6px;
|
|
315
|
+
background: #f4f6f8;
|
|
316
|
+
padding: 10px;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.agentEvent strong,
|
|
320
|
+
.agentEvent span {
|
|
321
|
+
overflow-wrap: anywhere;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.agentEvent span {
|
|
325
|
+
color: #667085;
|
|
326
|
+
font-size: 12px;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
@media (max-width: 980px) {
|
|
330
|
+
.hero,
|
|
331
|
+
.layout {
|
|
332
|
+
grid-template-columns: 1fr;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.hero {
|
|
336
|
+
display: grid;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.identity {
|
|
340
|
+
min-width: 0;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["DOM", "DOM.Iterable", "ES2022"],
|
|
6
|
+
"allowJs": false,
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"allowSyntheticDefaultImports": true,
|
|
10
|
+
"strict": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"module": "ESNext",
|
|
13
|
+
"moduleResolution": "Bundler",
|
|
14
|
+
"baseUrl": ".",
|
|
15
|
+
"customConditions": ["seed-source"],
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"isolatedModules": true,
|
|
18
|
+
"noEmit": true,
|
|
19
|
+
"jsx": "react-jsx"
|
|
20
|
+
},
|
|
21
|
+
"include": ["src"]
|
|
22
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import react from "@vitejs/plugin-react";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
|
|
5
|
+
const cacheDir = fileURLToPath(new URL("./node_modules/.vite/react-spa-stories", import.meta.url));
|
|
6
|
+
|
|
7
|
+
const seedSourceBrowserConditions = [
|
|
8
|
+
"seed-source",
|
|
9
|
+
"module",
|
|
10
|
+
"browser",
|
|
11
|
+
"development|production",
|
|
12
|
+
] as const;
|
|
13
|
+
|
|
14
|
+
export default defineConfig({
|
|
15
|
+
cacheDir,
|
|
16
|
+
plugins: [react()],
|
|
17
|
+
resolve: {
|
|
18
|
+
conditions: [...seedSourceBrowserConditions],
|
|
19
|
+
},
|
|
20
|
+
server: {
|
|
21
|
+
host: "127.0.0.1",
|
|
22
|
+
port: 5173,
|
|
23
|
+
},
|
|
24
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@seed-app-studio/cli",
|
|
3
|
+
"version": "0.1.1-canary.0",
|
|
4
|
+
"description": "Developer CLI for validating and packaging SEED App Studio bundles.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"bin": {
|
|
7
|
+
"seed-app": "dist/cli.mjs"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"examples",
|
|
12
|
+
"package.json"
|
|
13
|
+
],
|
|
14
|
+
"type": "module",
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"main": "./dist/index.mjs",
|
|
17
|
+
"types": "./dist/index.d.mts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.mts",
|
|
21
|
+
"import": "./dist/index.mjs",
|
|
22
|
+
"default": "./dist/index.mjs"
|
|
23
|
+
},
|
|
24
|
+
"./package.json": "./package.json"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public",
|
|
28
|
+
"registry": "https://registry.npmjs.org/"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
32
|
+
"build": "bun run clean && tsdown src/index.ts src/cli.ts --format esm --dts --out-dir dist --platform node --tsconfig tsconfig.build.json",
|
|
33
|
+
"prepack": "bun run build",
|
|
34
|
+
"test": "vitest run --config vitest.config.ts",
|
|
35
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
36
|
+
"topo": "node -e \"\"",
|
|
37
|
+
"check-types": "tsc --noEmit -p tsconfig.json",
|
|
38
|
+
"test:coverage": "vitest run --coverage --config vitest.config.ts"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@seed-app-studio/protocol": "0.1.1-canary.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "^24.3.1",
|
|
45
|
+
"tsdown": "^0.22.3",
|
|
46
|
+
"typescript": "^5.8.3",
|
|
47
|
+
"vitest": "^4.1.0"
|
|
48
|
+
}
|
|
49
|
+
}
|