kubun 0.2.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.
@@ -0,0 +1,502 @@
1
+ {
2
+ "commands": {
3
+ "serve": {
4
+ "aliases": [],
5
+ "args": {},
6
+ "description": "Start a local Kubun server",
7
+ "flags": {
8
+ "db": {
9
+ "description": "path to the local SQLite database",
10
+ "name": "db",
11
+ "hasDynamicHelp": false,
12
+ "multiple": false,
13
+ "type": "option"
14
+ },
15
+ "id": {
16
+ "description": "server ID",
17
+ "name": "id",
18
+ "hasDynamicHelp": false,
19
+ "multiple": false,
20
+ "type": "option"
21
+ },
22
+ "port": {
23
+ "char": "p",
24
+ "description": "port to listen on",
25
+ "name": "port",
26
+ "hasDynamicHelp": false,
27
+ "multiple": false,
28
+ "type": "option"
29
+ },
30
+ "privateKey": {
31
+ "char": "k",
32
+ "description": "base64-encoded private key",
33
+ "env": "KUBUN_PRIVATE_KEY",
34
+ "exclusive": [
35
+ "id"
36
+ ],
37
+ "name": "privateKey",
38
+ "hasDynamicHelp": false,
39
+ "multiple": false,
40
+ "type": "option"
41
+ }
42
+ },
43
+ "hasDynamicHelp": false,
44
+ "hiddenAliases": [],
45
+ "id": "serve",
46
+ "pluginAlias": "kubun",
47
+ "pluginName": "kubun",
48
+ "pluginType": "core",
49
+ "strict": true,
50
+ "enableJsonFlag": false,
51
+ "isESM": true,
52
+ "relativePath": [
53
+ "dist",
54
+ "commands",
55
+ "serve.js"
56
+ ]
57
+ },
58
+ "account:generate": {
59
+ "aliases": [],
60
+ "args": {},
61
+ "description": "Generate a random private key to use as account signer",
62
+ "flags": {},
63
+ "hasDynamicHelp": false,
64
+ "hiddenAliases": [],
65
+ "id": "account:generate",
66
+ "pluginAlias": "kubun",
67
+ "pluginName": "kubun",
68
+ "pluginType": "core",
69
+ "strict": true,
70
+ "enableJsonFlag": false,
71
+ "isESM": true,
72
+ "relativePath": [
73
+ "dist",
74
+ "commands",
75
+ "account",
76
+ "generate.js"
77
+ ]
78
+ },
79
+ "account:id": {
80
+ "aliases": [],
81
+ "args": {},
82
+ "description": "Display the DID of an account given its private key",
83
+ "flags": {
84
+ "privateKey": {
85
+ "char": "k",
86
+ "description": "base64-encoded private key",
87
+ "env": "KUBUN_PRIVATE_KEY",
88
+ "name": "privateKey",
89
+ "required": true,
90
+ "hasDynamicHelp": false,
91
+ "multiple": false,
92
+ "type": "option"
93
+ }
94
+ },
95
+ "hasDynamicHelp": false,
96
+ "hiddenAliases": [],
97
+ "id": "account:id",
98
+ "pluginAlias": "kubun",
99
+ "pluginName": "kubun",
100
+ "pluginType": "core",
101
+ "strict": true,
102
+ "enableJsonFlag": false,
103
+ "isESM": true,
104
+ "relativePath": [
105
+ "dist",
106
+ "commands",
107
+ "account",
108
+ "id.js"
109
+ ]
110
+ },
111
+ "graph:deploy": {
112
+ "aliases": [],
113
+ "args": {},
114
+ "description": "Deploy a documents model graph",
115
+ "flags": {
116
+ "cluster": {
117
+ "char": "c",
118
+ "description": "path of the JSON file of the cluster",
119
+ "name": "cluster",
120
+ "required": true,
121
+ "hasDynamicHelp": false,
122
+ "multiple": true,
123
+ "type": "option"
124
+ },
125
+ "id": {
126
+ "description": "graph ID",
127
+ "name": "id",
128
+ "hasDynamicHelp": false,
129
+ "multiple": false,
130
+ "type": "option"
131
+ },
132
+ "name": {
133
+ "char": "n",
134
+ "description": "graph name",
135
+ "name": "name",
136
+ "hasDynamicHelp": false,
137
+ "multiple": false,
138
+ "type": "option"
139
+ },
140
+ "privateKey": {
141
+ "char": "k",
142
+ "description": "base64-encoded private key",
143
+ "env": "KUBUN_PRIVATE_KEY",
144
+ "name": "privateKey",
145
+ "required": true,
146
+ "hasDynamicHelp": false,
147
+ "multiple": false,
148
+ "type": "option"
149
+ },
150
+ "url": {
151
+ "description": "Kubun server URL",
152
+ "name": "url",
153
+ "hasDynamicHelp": false,
154
+ "multiple": false,
155
+ "type": "option"
156
+ }
157
+ },
158
+ "hasDynamicHelp": false,
159
+ "hiddenAliases": [],
160
+ "id": "graph:deploy",
161
+ "pluginAlias": "kubun",
162
+ "pluginName": "kubun",
163
+ "pluginType": "core",
164
+ "strict": true,
165
+ "enableJsonFlag": false,
166
+ "isESM": true,
167
+ "relativePath": [
168
+ "dist",
169
+ "commands",
170
+ "graph",
171
+ "deploy.js"
172
+ ]
173
+ },
174
+ "graph:mutate": {
175
+ "aliases": [],
176
+ "args": {
177
+ "id": {
178
+ "description": "graph ID",
179
+ "name": "id",
180
+ "required": true
181
+ },
182
+ "text": {
183
+ "description": "mutation text",
184
+ "name": "text",
185
+ "required": true
186
+ }
187
+ },
188
+ "description": "Execute a GraphQL mutation on a graph",
189
+ "flags": {
190
+ "privateKey": {
191
+ "char": "k",
192
+ "description": "base64-encoded private key",
193
+ "env": "KUBUN_PRIVATE_KEY",
194
+ "name": "privateKey",
195
+ "required": true,
196
+ "hasDynamicHelp": false,
197
+ "multiple": false,
198
+ "type": "option"
199
+ },
200
+ "url": {
201
+ "description": "Kubun server URL",
202
+ "name": "url",
203
+ "hasDynamicHelp": false,
204
+ "multiple": false,
205
+ "type": "option"
206
+ },
207
+ "variables": {
208
+ "description": "query variables as JSON string",
209
+ "name": "variables",
210
+ "hasDynamicHelp": false,
211
+ "multiple": false,
212
+ "type": "option"
213
+ }
214
+ },
215
+ "hasDynamicHelp": false,
216
+ "hiddenAliases": [],
217
+ "id": "graph:mutate",
218
+ "pluginAlias": "kubun",
219
+ "pluginName": "kubun",
220
+ "pluginType": "core",
221
+ "strict": true,
222
+ "enableJsonFlag": false,
223
+ "isESM": true,
224
+ "relativePath": [
225
+ "dist",
226
+ "commands",
227
+ "graph",
228
+ "mutate.js"
229
+ ]
230
+ },
231
+ "graph:query": {
232
+ "aliases": [],
233
+ "args": {
234
+ "id": {
235
+ "description": "graph ID",
236
+ "name": "id",
237
+ "required": true
238
+ },
239
+ "text": {
240
+ "description": "query text",
241
+ "name": "text",
242
+ "required": true
243
+ }
244
+ },
245
+ "description": "Execute a GraphQL query on a graph",
246
+ "flags": {
247
+ "privateKey": {
248
+ "char": "k",
249
+ "description": "base64-encoded private key",
250
+ "env": "KUBUN_PRIVATE_KEY",
251
+ "name": "privateKey",
252
+ "required": true,
253
+ "hasDynamicHelp": false,
254
+ "multiple": false,
255
+ "type": "option"
256
+ },
257
+ "url": {
258
+ "description": "Kubun server URL",
259
+ "name": "url",
260
+ "hasDynamicHelp": false,
261
+ "multiple": false,
262
+ "type": "option"
263
+ },
264
+ "variables": {
265
+ "description": "query variables as JSON string",
266
+ "name": "variables",
267
+ "hasDynamicHelp": false,
268
+ "multiple": false,
269
+ "type": "option"
270
+ }
271
+ },
272
+ "hasDynamicHelp": false,
273
+ "hiddenAliases": [],
274
+ "id": "graph:query",
275
+ "pluginAlias": "kubun",
276
+ "pluginName": "kubun",
277
+ "pluginType": "core",
278
+ "strict": true,
279
+ "enableJsonFlag": false,
280
+ "isESM": true,
281
+ "relativePath": [
282
+ "dist",
283
+ "commands",
284
+ "graph",
285
+ "query.js"
286
+ ]
287
+ },
288
+ "graphql:schema": {
289
+ "aliases": [],
290
+ "args": {},
291
+ "description": "Create a GraphQL schema from clusters of document models",
292
+ "flags": {
293
+ "cluster": {
294
+ "char": "c",
295
+ "description": "path of the JSON file of the cluster",
296
+ "name": "cluster",
297
+ "required": true,
298
+ "hasDynamicHelp": false,
299
+ "multiple": true,
300
+ "type": "option"
301
+ },
302
+ "output": {
303
+ "char": "o",
304
+ "description": "output file for the GraphQL schema",
305
+ "name": "output",
306
+ "hasDynamicHelp": false,
307
+ "multiple": false,
308
+ "type": "option"
309
+ }
310
+ },
311
+ "hasDynamicHelp": false,
312
+ "hiddenAliases": [],
313
+ "id": "graphql:schema",
314
+ "pluginAlias": "kubun",
315
+ "pluginName": "kubun",
316
+ "pluginType": "core",
317
+ "strict": true,
318
+ "enableJsonFlag": false,
319
+ "isESM": true,
320
+ "relativePath": [
321
+ "dist",
322
+ "commands",
323
+ "graphql",
324
+ "schema.js"
325
+ ]
326
+ },
327
+ "hello": {
328
+ "aliases": [],
329
+ "args": {
330
+ "person": {
331
+ "description": "Person to say hello to",
332
+ "name": "person",
333
+ "required": true
334
+ }
335
+ },
336
+ "description": "Say hello",
337
+ "examples": [
338
+ "<%= config.bin %> <%= command.id %> friend --from oclif\nhello friend from oclif! (./src/commands/hello/index.ts)\n"
339
+ ],
340
+ "flags": {
341
+ "from": {
342
+ "char": "f",
343
+ "description": "Who is saying hello",
344
+ "name": "from",
345
+ "required": true,
346
+ "hasDynamicHelp": false,
347
+ "multiple": false,
348
+ "type": "option"
349
+ }
350
+ },
351
+ "hasDynamicHelp": false,
352
+ "hiddenAliases": [],
353
+ "id": "hello",
354
+ "pluginAlias": "kubun",
355
+ "pluginName": "kubun",
356
+ "pluginType": "core",
357
+ "strict": true,
358
+ "enableJsonFlag": false,
359
+ "isESM": true,
360
+ "relativePath": [
361
+ "dist",
362
+ "commands",
363
+ "hello",
364
+ "index.js"
365
+ ]
366
+ },
367
+ "hello:world": {
368
+ "aliases": [],
369
+ "args": {},
370
+ "description": "Say hello world",
371
+ "examples": [
372
+ "<%= config.bin %> <%= command.id %>\nhello world! (./src/commands/hello/world.ts)\n"
373
+ ],
374
+ "flags": {},
375
+ "hasDynamicHelp": false,
376
+ "hiddenAliases": [],
377
+ "id": "hello:world",
378
+ "pluginAlias": "kubun",
379
+ "pluginName": "kubun",
380
+ "pluginType": "core",
381
+ "strict": true,
382
+ "enableJsonFlag": false,
383
+ "isESM": true,
384
+ "relativePath": [
385
+ "dist",
386
+ "commands",
387
+ "hello",
388
+ "world.js"
389
+ ]
390
+ },
391
+ "model:cluster": {
392
+ "aliases": [],
393
+ "args": {},
394
+ "description": "Create a documents cluster model",
395
+ "flags": {
396
+ "model": {
397
+ "char": "m",
398
+ "description": "document model as JSON string",
399
+ "name": "model",
400
+ "required": true,
401
+ "hasDynamicHelp": false,
402
+ "multiple": true,
403
+ "type": "option"
404
+ },
405
+ "output": {
406
+ "char": "o",
407
+ "description": "output file for the cluster",
408
+ "name": "output",
409
+ "hasDynamicHelp": false,
410
+ "multiple": false,
411
+ "type": "option"
412
+ }
413
+ },
414
+ "hasDynamicHelp": false,
415
+ "hiddenAliases": [],
416
+ "id": "model:cluster",
417
+ "pluginAlias": "kubun",
418
+ "pluginName": "kubun",
419
+ "pluginType": "core",
420
+ "strict": true,
421
+ "enableJsonFlag": false,
422
+ "isESM": true,
423
+ "relativePath": [
424
+ "dist",
425
+ "commands",
426
+ "model",
427
+ "cluster.js"
428
+ ]
429
+ },
430
+ "model:create": {
431
+ "aliases": [],
432
+ "args": {
433
+ "name": {
434
+ "description": "document model name",
435
+ "name": "name",
436
+ "required": true
437
+ },
438
+ "schema": {
439
+ "description": "document schema as JSON string",
440
+ "name": "schema",
441
+ "required": true
442
+ }
443
+ },
444
+ "description": "Create a document model",
445
+ "flags": {
446
+ "behavior": {
447
+ "char": "b",
448
+ "description": "behavior of the document",
449
+ "name": "behavior",
450
+ "default": "default",
451
+ "hasDynamicHelp": false,
452
+ "multiple": false,
453
+ "options": [
454
+ "default",
455
+ "interface",
456
+ "unique"
457
+ ],
458
+ "type": "option"
459
+ },
460
+ "cluster": {
461
+ "char": "c",
462
+ "description": "create a cluster model instead of a document model",
463
+ "name": "cluster",
464
+ "allowNo": false,
465
+ "type": "boolean"
466
+ },
467
+ "output": {
468
+ "char": "o",
469
+ "description": "output file",
470
+ "name": "output",
471
+ "hasDynamicHelp": false,
472
+ "multiple": false,
473
+ "type": "option"
474
+ },
475
+ "uniqueField": {
476
+ "char": "u",
477
+ "description": "unique field of the document when behavior is set to \"unique\"",
478
+ "name": "uniqueField",
479
+ "hasDynamicHelp": false,
480
+ "multiple": true,
481
+ "type": "option"
482
+ }
483
+ },
484
+ "hasDynamicHelp": false,
485
+ "hiddenAliases": [],
486
+ "id": "model:create",
487
+ "pluginAlias": "kubun",
488
+ "pluginName": "kubun",
489
+ "pluginType": "core",
490
+ "strict": true,
491
+ "enableJsonFlag": false,
492
+ "isESM": true,
493
+ "relativePath": [
494
+ "dist",
495
+ "commands",
496
+ "model",
497
+ "create.js"
498
+ ]
499
+ }
500
+ },
501
+ "version": "0.2.0"
502
+ }
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "kubun",
3
+ "version": "0.2.0",
4
+ "license": "see LICENSE.md",
5
+ "description": "Kubun CLI",
6
+ "keywords": [],
7
+ "type": "module",
8
+ "engines": {
9
+ "node": ">=22.0.0"
10
+ },
11
+ "main": "dist/index.js",
12
+ "types": "dist/index.d.ts",
13
+ "files": [
14
+ "/bin",
15
+ "/dist",
16
+ "/oclif.manifest.json"
17
+ ],
18
+ "bin": {
19
+ "kubun": "./bin/run.js"
20
+ },
21
+ "oclif": {
22
+ "bin": "kubun",
23
+ "dirname": "kubun",
24
+ "commands": "./dist/commands",
25
+ "plugins": [
26
+ "@oclif/plugin-help",
27
+ "@oclif/plugin-plugins"
28
+ ],
29
+ "topicSeparator": " ",
30
+ "topics": {
31
+ "hello": {
32
+ "description": "Say hello to the world and others"
33
+ }
34
+ }
35
+ },
36
+ "dependencies": {
37
+ "@enkaku/async": "^0.11.0",
38
+ "@enkaku/codec": "^0.11.0",
39
+ "@enkaku/http-server-transport": "^0.11.0",
40
+ "@enkaku/server": "^0.11.0",
41
+ "@enkaku/token": "^0.11.0",
42
+ "@hono/node-server": "^1.13.7",
43
+ "@oclif/core": "^4.0.33",
44
+ "@oclif/plugin-help": "^6",
45
+ "@oclif/plugin-plugins": "^5.4.19",
46
+ "get-port": "^7.1.0",
47
+ "graphql": "^16.9.0",
48
+ "ora": "^8.1.1",
49
+ "@kubun/client": "^0.2.0",
50
+ "@kubun/db": "^0.2.0",
51
+ "@kubun/db-postgres": "^0.2.0",
52
+ "@kubun/db-sqlite": "^0.2.0",
53
+ "@kubun/http-client": "^0.2.0",
54
+ "@kubun/protocol": "^0.2.0",
55
+ "@kubun/server": "^0.2.0"
56
+ },
57
+ "devDependencies": {
58
+ "@oclif/test": "^4.1.12",
59
+ "oclif": "^4.17.34",
60
+ "shx": "^0.3.3",
61
+ "ts-node": "^10",
62
+ "typescript": "^5.8.2"
63
+ },
64
+ "scripts": {
65
+ "kubun": "./bin/dev.js",
66
+ "build": "shx rm -rf dist && tsc -b",
67
+ "posttest": "pnpm run lint",
68
+ "test:types": "tsc --noEmit --skipLibCheck",
69
+ "test:unit": "OCLIF_TEST_ROOT=. node --experimental-vm-modules ../../node_modules/jest/bin/jest.js",
70
+ "test": "pnpm run test:types && pnpm run test:unit",
71
+ "version": "oclif readme && git add README.md"
72
+ }
73
+ }