@kinotic-ai/kinotic-cli 1.0.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.
Files changed (82) hide show
  1. package/README.md +594 -0
  2. package/bin/dev.cmd +3 -0
  3. package/bin/dev.js +6 -0
  4. package/bin/run.cmd +3 -0
  5. package/bin/run.js +6 -0
  6. package/dist/commands/generate.d.ts +11 -0
  7. package/dist/commands/generate.js +36 -0
  8. package/dist/commands/initialize.d.ts +12 -0
  9. package/dist/commands/initialize.js +102 -0
  10. package/dist/commands/synchronize.d.ts +17 -0
  11. package/dist/commands/synchronize.js +154 -0
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.js +1 -0
  14. package/dist/internal/CodeGenerationService.d.ts +24 -0
  15. package/dist/internal/CodeGenerationService.js +256 -0
  16. package/dist/internal/Logger.d.ts +27 -0
  17. package/dist/internal/Logger.js +35 -0
  18. package/dist/internal/ProjectMigrationService.d.ts +28 -0
  19. package/dist/internal/ProjectMigrationService.js +99 -0
  20. package/dist/internal/Utils.d.ts +66 -0
  21. package/dist/internal/Utils.js +349 -0
  22. package/dist/internal/converter/ConverterConstants.d.ts +3 -0
  23. package/dist/internal/converter/ConverterConstants.js +4 -0
  24. package/dist/internal/converter/DefaultConversionContext.d.ts +29 -0
  25. package/dist/internal/converter/DefaultConversionContext.js +112 -0
  26. package/dist/internal/converter/IConversionContext.d.ts +64 -0
  27. package/dist/internal/converter/IConversionContext.js +11 -0
  28. package/dist/internal/converter/IConverterStrategy.d.ts +35 -0
  29. package/dist/internal/converter/IConverterStrategy.js +1 -0
  30. package/dist/internal/converter/ITypeConverter.d.ts +28 -0
  31. package/dist/internal/converter/ITypeConverter.js +1 -0
  32. package/dist/internal/converter/SpecificTypesConverter.d.ts +12 -0
  33. package/dist/internal/converter/SpecificTypesConverter.js +24 -0
  34. package/dist/internal/converter/codegen/ArrayC3TypeToStatementMapper.d.ts +9 -0
  35. package/dist/internal/converter/codegen/ArrayC3TypeToStatementMapper.js +46 -0
  36. package/dist/internal/converter/codegen/ObjectC3TypeToStatementMapper.d.ts +13 -0
  37. package/dist/internal/converter/codegen/ObjectC3TypeToStatementMapper.js +67 -0
  38. package/dist/internal/converter/codegen/PrimitiveC3TypeToStatementMapper.d.ts +9 -0
  39. package/dist/internal/converter/codegen/PrimitiveC3TypeToStatementMapper.js +24 -0
  40. package/dist/internal/converter/codegen/StatementMapper.d.ts +40 -0
  41. package/dist/internal/converter/codegen/StatementMapper.js +132 -0
  42. package/dist/internal/converter/codegen/StatementMapperConversionState.d.ts +9 -0
  43. package/dist/internal/converter/codegen/StatementMapperConversionState.js +17 -0
  44. package/dist/internal/converter/codegen/StatementMapperConverterStrategy.d.ts +16 -0
  45. package/dist/internal/converter/codegen/StatementMapperConverterStrategy.js +30 -0
  46. package/dist/internal/converter/codegen/UnionC3TypeToStatementMapper.d.ts +9 -0
  47. package/dist/internal/converter/codegen/UnionC3TypeToStatementMapper.js +46 -0
  48. package/dist/internal/converter/common/BaseConversionState.d.ts +9 -0
  49. package/dist/internal/converter/common/BaseConversionState.js +13 -0
  50. package/dist/internal/converter/typescript/ArrayToC3Type.d.ts +9 -0
  51. package/dist/internal/converter/typescript/ArrayToC3Type.js +17 -0
  52. package/dist/internal/converter/typescript/ConverterUtils.d.ts +4 -0
  53. package/dist/internal/converter/typescript/ConverterUtils.js +261 -0
  54. package/dist/internal/converter/typescript/EnumToC3Type.d.ts +12 -0
  55. package/dist/internal/converter/typescript/EnumToC3Type.js +26 -0
  56. package/dist/internal/converter/typescript/ObjectLikeToC3Type.d.ts +15 -0
  57. package/dist/internal/converter/typescript/ObjectLikeToC3Type.js +111 -0
  58. package/dist/internal/converter/typescript/PrimitiveToC3Type.d.ts +10 -0
  59. package/dist/internal/converter/typescript/PrimitiveToC3Type.js +33 -0
  60. package/dist/internal/converter/typescript/QueryOptionsToC3Type.d.ts +9 -0
  61. package/dist/internal/converter/typescript/QueryOptionsToC3Type.js +9 -0
  62. package/dist/internal/converter/typescript/TenantSelectionToC3Type.d.ts +9 -0
  63. package/dist/internal/converter/typescript/TenantSelectionToC3Type.js +9 -0
  64. package/dist/internal/converter/typescript/TypescriptConversionState.d.ts +24 -0
  65. package/dist/internal/converter/typescript/TypescriptConversionState.js +26 -0
  66. package/dist/internal/converter/typescript/TypescriptConverterStrategy.d.ts +16 -0
  67. package/dist/internal/converter/typescript/TypescriptConverterStrategy.js +44 -0
  68. package/dist/internal/converter/typescript/UnionToC3Type.d.ts +15 -0
  69. package/dist/internal/converter/typescript/UnionToC3Type.js +184 -0
  70. package/dist/internal/state/Environment.d.ts +13 -0
  71. package/dist/internal/state/Environment.js +65 -0
  72. package/dist/internal/state/IStateManager.d.ts +19 -0
  73. package/dist/internal/state/IStateManager.js +41 -0
  74. package/dist/internal/state/KinoticProjectConfigUtil.d.ts +9 -0
  75. package/dist/internal/state/KinoticProjectConfigUtil.js +153 -0
  76. package/dist/templates/AdminEntityService.liquid +14 -0
  77. package/dist/templates/BaseAdminEntityService.liquid +19 -0
  78. package/dist/templates/BaseEntityService.liquid +48 -0
  79. package/dist/templates/EntityService.liquid +14 -0
  80. package/dist/templates/KinoticProjectConfig.ts.liquid +10 -0
  81. package/oclif.manifest.json +161 -0
  82. package/package.json +97 -0
package/README.md ADDED
@@ -0,0 +1,594 @@
1
+ Structures CLI
2
+ =================
3
+
4
+ <!-- toc -->
5
+ * [Usage](#usage)
6
+ * [Commands](#commands)
7
+ <!-- tocstop -->
8
+ # Usage
9
+ <!-- usage -->
10
+ ```sh-session
11
+ $ npm install -g @kinotic-ai/kinotic-cli
12
+ $ kinotic COMMAND
13
+ running command...
14
+ $ kinotic (--version)
15
+ @kinotic-ai/kinotic-cli/1.0.0 darwin-arm64 node-v22.13.1
16
+ $ kinotic --help [COMMAND]
17
+ USAGE
18
+ $ kinotic COMMAND
19
+ ...
20
+ ```
21
+ <!-- usagestop -->
22
+ # Commands
23
+ <!-- commands -->
24
+ * [`kinotic autocomplete [SHELL]`](#kinotic-autocomplete-shell)
25
+ * [`kinotic gen`](#kinotic-gen)
26
+ * [`kinotic generate`](#kinotic-generate)
27
+ * [`kinotic help [COMMAND]`](#kinotic-help-command)
28
+ * [`kinotic init`](#kinotic-init)
29
+ * [`kinotic initialize`](#kinotic-initialize)
30
+ * [`kinotic plugins`](#kinotic-plugins)
31
+ * [`kinotic plugins add PLUGIN`](#kinotic-plugins-add-plugin)
32
+ * [`kinotic plugins:inspect PLUGIN...`](#kinotic-pluginsinspect-plugin)
33
+ * [`kinotic plugins install PLUGIN`](#kinotic-plugins-install-plugin)
34
+ * [`kinotic plugins link PATH`](#kinotic-plugins-link-path)
35
+ * [`kinotic plugins remove [PLUGIN]`](#kinotic-plugins-remove-plugin)
36
+ * [`kinotic plugins reset`](#kinotic-plugins-reset)
37
+ * [`kinotic plugins uninstall [PLUGIN]`](#kinotic-plugins-uninstall-plugin)
38
+ * [`kinotic plugins unlink [PLUGIN]`](#kinotic-plugins-unlink-plugin)
39
+ * [`kinotic plugins update`](#kinotic-plugins-update)
40
+ * [`kinotic sync`](#kinotic-sync)
41
+ * [`kinotic synchronize`](#kinotic-synchronize)
42
+ * [`kinotic update [CHANNEL]`](#kinotic-update-channel)
43
+
44
+ ## `kinotic autocomplete [SHELL]`
45
+
46
+ Display autocomplete installation instructions.
47
+
48
+ ```
49
+ USAGE
50
+ $ kinotic autocomplete [SHELL] [-r]
51
+
52
+ ARGUMENTS
53
+ [SHELL] (zsh|bash|powershell) Shell type
54
+
55
+ FLAGS
56
+ -r, --refresh-cache Refresh cache (ignores displaying instructions)
57
+
58
+ DESCRIPTION
59
+ Display autocomplete installation instructions.
60
+
61
+ EXAMPLES
62
+ $ kinotic autocomplete
63
+
64
+ $ kinotic autocomplete bash
65
+
66
+ $ kinotic autocomplete zsh
67
+
68
+ $ kinotic autocomplete powershell
69
+
70
+ $ kinotic autocomplete --refresh-cache
71
+ ```
72
+
73
+ _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.41/src/commands/autocomplete/index.ts)_
74
+
75
+ ## `kinotic gen`
76
+
77
+ This will generate all Entity Service classes.
78
+
79
+ ```
80
+ USAGE
81
+ $ kinotic gen [-v]
82
+
83
+ FLAGS
84
+ -v, --verbose Enable verbose logging
85
+
86
+ DESCRIPTION
87
+ This will generate all Entity Service classes.
88
+
89
+ ALIASES
90
+ $ kinotic gen
91
+
92
+ EXAMPLES
93
+ $ kinotic generate
94
+
95
+ $ kinotic gen
96
+
97
+ $ kinotic gen -v
98
+ ```
99
+
100
+ ## `kinotic generate`
101
+
102
+ This will generate all Entity Service classes.
103
+
104
+ ```
105
+ USAGE
106
+ $ kinotic generate [-v]
107
+
108
+ FLAGS
109
+ -v, --verbose Enable verbose logging
110
+
111
+ DESCRIPTION
112
+ This will generate all Entity Service classes.
113
+
114
+ ALIASES
115
+ $ kinotic gen
116
+
117
+ EXAMPLES
118
+ $ kinotic generate
119
+
120
+ $ kinotic gen
121
+
122
+ $ kinotic gen -v
123
+ ```
124
+
125
+ _See code: [src/commands/generate.ts](https://github.com/kinotic-ai/kinotic/blob/v1.0.0/src/commands/generate.ts)_
126
+
127
+ ## `kinotic help [COMMAND]`
128
+
129
+ Display help for kinotic.
130
+
131
+ ```
132
+ USAGE
133
+ $ kinotic help [COMMAND...] [-n]
134
+
135
+ ARGUMENTS
136
+ [COMMAND...] Command to show help for.
137
+
138
+ FLAGS
139
+ -n, --nested-commands Include all nested commands in the output.
140
+
141
+ DESCRIPTION
142
+ Display help for kinotic.
143
+ ```
144
+
145
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.2.38/src/commands/help.ts)_
146
+
147
+ ## `kinotic init`
148
+
149
+ This will initialize a new Kinotic Project for use with the Kinotic CLI.
150
+
151
+ ```
152
+ USAGE
153
+ $ kinotic init [-a <value>] [-e <value>] [-g <value>]
154
+
155
+ FLAGS
156
+ -a, --application=<value> The name of the application you want to use
157
+ -e, --entities=<value> Path to the directory containing the Entity definitions
158
+ -g, --generated=<value> Path to the directory to write generated Services
159
+
160
+ DESCRIPTION
161
+ This will initialize a new Kinotic Project for use with the Kinotic CLI.
162
+
163
+ ALIASES
164
+ $ kinotic init
165
+
166
+ EXAMPLES
167
+ $ kinotic initialize --application my.app --entities path/to/entities --generated path/to/services
168
+
169
+ $ kinotic init --application my.app --entities path/to/entities --generated path/to/services
170
+
171
+ $ kinotic init -a my.app -e path/to/entities -g path/to/services
172
+ ```
173
+
174
+ ## `kinotic initialize`
175
+
176
+ This will initialize a new Kinotic Project for use with the Kinotic CLI.
177
+
178
+ ```
179
+ USAGE
180
+ $ kinotic initialize [-a <value>] [-e <value>] [-g <value>]
181
+
182
+ FLAGS
183
+ -a, --application=<value> The name of the application you want to use
184
+ -e, --entities=<value> Path to the directory containing the Entity definitions
185
+ -g, --generated=<value> Path to the directory to write generated Services
186
+
187
+ DESCRIPTION
188
+ This will initialize a new Kinotic Project for use with the Kinotic CLI.
189
+
190
+ ALIASES
191
+ $ kinotic init
192
+
193
+ EXAMPLES
194
+ $ kinotic initialize --application my.app --entities path/to/entities --generated path/to/services
195
+
196
+ $ kinotic init --application my.app --entities path/to/entities --generated path/to/services
197
+
198
+ $ kinotic init -a my.app -e path/to/entities -g path/to/services
199
+ ```
200
+
201
+ _See code: [src/commands/initialize.ts](https://github.com/kinotic-ai/kinotic/blob/v1.0.0/src/commands/initialize.ts)_
202
+
203
+ ## `kinotic plugins`
204
+
205
+ List installed plugins.
206
+
207
+ ```
208
+ USAGE
209
+ $ kinotic plugins [--json] [--core]
210
+
211
+ FLAGS
212
+ --core Show core plugins.
213
+
214
+ GLOBAL FLAGS
215
+ --json Format output as json.
216
+
217
+ DESCRIPTION
218
+ List installed plugins.
219
+
220
+ EXAMPLES
221
+ $ kinotic plugins
222
+ ```
223
+
224
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.58/src/commands/plugins/index.ts)_
225
+
226
+ ## `kinotic plugins add PLUGIN`
227
+
228
+ Installs a plugin into kinotic.
229
+
230
+ ```
231
+ USAGE
232
+ $ kinotic plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]
233
+
234
+ ARGUMENTS
235
+ PLUGIN... Plugin to install.
236
+
237
+ FLAGS
238
+ -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
239
+ -h, --help Show CLI help.
240
+ -s, --silent Silences npm output.
241
+ -v, --verbose Show verbose npm output.
242
+
243
+ GLOBAL FLAGS
244
+ --json Format output as json.
245
+
246
+ DESCRIPTION
247
+ Installs a plugin into kinotic.
248
+
249
+ Uses npm to install plugins.
250
+
251
+ Installation of a user-installed plugin will override a core plugin.
252
+
253
+ Use the KINOTIC_NPM_LOG_LEVEL environment variable to set the npm loglevel.
254
+ Use the KINOTIC_NPM_REGISTRY environment variable to set the npm registry.
255
+
256
+ ALIASES
257
+ $ kinotic plugins add
258
+
259
+ EXAMPLES
260
+ Install a plugin from npm registry.
261
+
262
+ $ kinotic plugins add myplugin
263
+
264
+ Install a plugin from a github url.
265
+
266
+ $ kinotic plugins add https://github.com/someuser/someplugin
267
+
268
+ Install a plugin from a github slug.
269
+
270
+ $ kinotic plugins add someuser/someplugin
271
+ ```
272
+
273
+ ## `kinotic plugins:inspect PLUGIN...`
274
+
275
+ Displays installation properties of a plugin.
276
+
277
+ ```
278
+ USAGE
279
+ $ kinotic plugins inspect PLUGIN...
280
+
281
+ ARGUMENTS
282
+ PLUGIN... [default: .] Plugin to inspect.
283
+
284
+ FLAGS
285
+ -h, --help Show CLI help.
286
+ -v, --verbose
287
+
288
+ GLOBAL FLAGS
289
+ --json Format output as json.
290
+
291
+ DESCRIPTION
292
+ Displays installation properties of a plugin.
293
+
294
+ EXAMPLES
295
+ $ kinotic plugins inspect myplugin
296
+ ```
297
+
298
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.58/src/commands/plugins/inspect.ts)_
299
+
300
+ ## `kinotic plugins install PLUGIN`
301
+
302
+ Installs a plugin into kinotic.
303
+
304
+ ```
305
+ USAGE
306
+ $ kinotic plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]
307
+
308
+ ARGUMENTS
309
+ PLUGIN... Plugin to install.
310
+
311
+ FLAGS
312
+ -f, --force Force npm to fetch remote resources even if a local copy exists on disk.
313
+ -h, --help Show CLI help.
314
+ -s, --silent Silences npm output.
315
+ -v, --verbose Show verbose npm output.
316
+
317
+ GLOBAL FLAGS
318
+ --json Format output as json.
319
+
320
+ DESCRIPTION
321
+ Installs a plugin into kinotic.
322
+
323
+ Uses npm to install plugins.
324
+
325
+ Installation of a user-installed plugin will override a core plugin.
326
+
327
+ Use the KINOTIC_NPM_LOG_LEVEL environment variable to set the npm loglevel.
328
+ Use the KINOTIC_NPM_REGISTRY environment variable to set the npm registry.
329
+
330
+ ALIASES
331
+ $ kinotic plugins add
332
+
333
+ EXAMPLES
334
+ Install a plugin from npm registry.
335
+
336
+ $ kinotic plugins install myplugin
337
+
338
+ Install a plugin from a github url.
339
+
340
+ $ kinotic plugins install https://github.com/someuser/someplugin
341
+
342
+ Install a plugin from a github slug.
343
+
344
+ $ kinotic plugins install someuser/someplugin
345
+ ```
346
+
347
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.58/src/commands/plugins/install.ts)_
348
+
349
+ ## `kinotic plugins link PATH`
350
+
351
+ Links a plugin into the CLI for development.
352
+
353
+ ```
354
+ USAGE
355
+ $ kinotic plugins link PATH [-h] [--install] [-v]
356
+
357
+ ARGUMENTS
358
+ PATH [default: .] path to plugin
359
+
360
+ FLAGS
361
+ -h, --help Show CLI help.
362
+ -v, --verbose
363
+ --[no-]install Install dependencies after linking the plugin.
364
+
365
+ DESCRIPTION
366
+ Links a plugin into the CLI for development.
367
+
368
+ Installation of a linked plugin will override a user-installed or core plugin.
369
+
370
+ e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
371
+ command will override the user-installed or core plugin implementation. This is useful for development work.
372
+
373
+
374
+ EXAMPLES
375
+ $ kinotic plugins link myplugin
376
+ ```
377
+
378
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.58/src/commands/plugins/link.ts)_
379
+
380
+ ## `kinotic plugins remove [PLUGIN]`
381
+
382
+ Removes a plugin from the CLI.
383
+
384
+ ```
385
+ USAGE
386
+ $ kinotic plugins remove [PLUGIN...] [-h] [-v]
387
+
388
+ ARGUMENTS
389
+ [PLUGIN...] plugin to uninstall
390
+
391
+ FLAGS
392
+ -h, --help Show CLI help.
393
+ -v, --verbose
394
+
395
+ DESCRIPTION
396
+ Removes a plugin from the CLI.
397
+
398
+ ALIASES
399
+ $ kinotic plugins unlink
400
+ $ kinotic plugins remove
401
+
402
+ EXAMPLES
403
+ $ kinotic plugins remove myplugin
404
+ ```
405
+
406
+ ## `kinotic plugins reset`
407
+
408
+ Remove all user-installed and linked plugins.
409
+
410
+ ```
411
+ USAGE
412
+ $ kinotic plugins reset [--hard] [--reinstall]
413
+
414
+ FLAGS
415
+ --hard Delete node_modules and package manager related files in addition to uninstalling plugins.
416
+ --reinstall Reinstall all plugins after uninstalling.
417
+ ```
418
+
419
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.58/src/commands/plugins/reset.ts)_
420
+
421
+ ## `kinotic plugins uninstall [PLUGIN]`
422
+
423
+ Removes a plugin from the CLI.
424
+
425
+ ```
426
+ USAGE
427
+ $ kinotic plugins uninstall [PLUGIN...] [-h] [-v]
428
+
429
+ ARGUMENTS
430
+ [PLUGIN...] plugin to uninstall
431
+
432
+ FLAGS
433
+ -h, --help Show CLI help.
434
+ -v, --verbose
435
+
436
+ DESCRIPTION
437
+ Removes a plugin from the CLI.
438
+
439
+ ALIASES
440
+ $ kinotic plugins unlink
441
+ $ kinotic plugins remove
442
+
443
+ EXAMPLES
444
+ $ kinotic plugins uninstall myplugin
445
+ ```
446
+
447
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.58/src/commands/plugins/uninstall.ts)_
448
+
449
+ ## `kinotic plugins unlink [PLUGIN]`
450
+
451
+ Removes a plugin from the CLI.
452
+
453
+ ```
454
+ USAGE
455
+ $ kinotic plugins unlink [PLUGIN...] [-h] [-v]
456
+
457
+ ARGUMENTS
458
+ [PLUGIN...] plugin to uninstall
459
+
460
+ FLAGS
461
+ -h, --help Show CLI help.
462
+ -v, --verbose
463
+
464
+ DESCRIPTION
465
+ Removes a plugin from the CLI.
466
+
467
+ ALIASES
468
+ $ kinotic plugins unlink
469
+ $ kinotic plugins remove
470
+
471
+ EXAMPLES
472
+ $ kinotic plugins unlink myplugin
473
+ ```
474
+
475
+ ## `kinotic plugins update`
476
+
477
+ Update installed plugins.
478
+
479
+ ```
480
+ USAGE
481
+ $ kinotic plugins update [-h] [-v]
482
+
483
+ FLAGS
484
+ -h, --help Show CLI help.
485
+ -v, --verbose
486
+
487
+ DESCRIPTION
488
+ Update installed plugins.
489
+ ```
490
+
491
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.58/src/commands/plugins/update.ts)_
492
+
493
+ ## `kinotic sync`
494
+
495
+ Synchronize the local Entity definitions with the Kinotic Server
496
+
497
+ ```
498
+ USAGE
499
+ $ kinotic sync [-s <value>] [-p] [-v] [-f <value>] [--dryRun]
500
+
501
+ FLAGS
502
+ -f, --authHeaderFile=<value> JSON File containing authentication headers
503
+ -p, --publish Publish each Entity after save/update
504
+ -s, --server=<value> The Kinotic server to connect to
505
+ -v, --verbose Enable verbose logging
506
+ --dryRun Dry run enables verbose logging and does not save any changes to the server
507
+
508
+ DESCRIPTION
509
+ Synchronize the local Entity definitions with the Kinotic Server
510
+
511
+ ALIASES
512
+ $ kinotic sync
513
+
514
+ EXAMPLES
515
+ $ kinotic synchronize
516
+
517
+ $ kinotic sync
518
+
519
+ $ kinotic synchronize --server http://localhost:9090 --publish --verbose
520
+
521
+ $ kinotic sync -p -v -s http://localhost:9090
522
+ ```
523
+
524
+ ## `kinotic synchronize`
525
+
526
+ Synchronize the local Entity definitions with the Kinotic Server
527
+
528
+ ```
529
+ USAGE
530
+ $ kinotic synchronize [-s <value>] [-p] [-v] [-f <value>] [--dryRun]
531
+
532
+ FLAGS
533
+ -f, --authHeaderFile=<value> JSON File containing authentication headers
534
+ -p, --publish Publish each Entity after save/update
535
+ -s, --server=<value> The Kinotic server to connect to
536
+ -v, --verbose Enable verbose logging
537
+ --dryRun Dry run enables verbose logging and does not save any changes to the server
538
+
539
+ DESCRIPTION
540
+ Synchronize the local Entity definitions with the Kinotic Server
541
+
542
+ ALIASES
543
+ $ kinotic sync
544
+
545
+ EXAMPLES
546
+ $ kinotic synchronize
547
+
548
+ $ kinotic sync
549
+
550
+ $ kinotic synchronize --server http://localhost:9090 --publish --verbose
551
+
552
+ $ kinotic sync -p -v -s http://localhost:9090
553
+ ```
554
+
555
+ _See code: [src/commands/synchronize.ts](https://github.com/kinotic-ai/kinotic/blob/v1.0.0/src/commands/synchronize.ts)_
556
+
557
+ ## `kinotic update [CHANNEL]`
558
+
559
+ update the kinotic CLI
560
+
561
+ ```
562
+ USAGE
563
+ $ kinotic update [CHANNEL] [--force | | [-a | -v <value> | -i]] [-b ]
564
+
565
+ FLAGS
566
+ -a, --available See available versions.
567
+ -b, --verbose Show more details about the available versions.
568
+ -i, --interactive Interactively select version to install. This is ignored if a channel is provided.
569
+ -v, --version=<value> Install a specific version.
570
+ --force Force a re-download of the requested version.
571
+
572
+ DESCRIPTION
573
+ update the kinotic CLI
574
+
575
+ EXAMPLES
576
+ Update to the stable channel:
577
+
578
+ $ kinotic update stable
579
+
580
+ Update to a specific version:
581
+
582
+ $ kinotic update --version 1.0.0
583
+
584
+ Interactively select version:
585
+
586
+ $ kinotic update --interactive
587
+
588
+ See available versions:
589
+
590
+ $ kinotic update --available
591
+ ```
592
+
593
+ _See code: [@oclif/plugin-update](https://github.com/oclif/plugin-update/blob/4.7.23/src/commands/update.ts)_
594
+ <!-- commandsstop -->
package/bin/dev.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node "%~dp0\dev" %*
package/bin/dev.js ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env tsx
2
+ // eslint-disable-next-line node/shebang
3
+ (async () => {
4
+ const oclif = await import('@oclif/core')
5
+ await oclif.execute({type: 'esm', development: true, dir: import.meta.url})
6
+ })()
package/bin/run.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node "%~dp0\run" %*
package/bin/run.js ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ // eslint-disable-next-line node/shebang
3
+ (async () => {
4
+ const oclif = await import('@oclif/core')
5
+ await oclif.execute({type: 'esm', dir: import.meta.url})
6
+ })()
@@ -0,0 +1,11 @@
1
+ import { Command } from '@oclif/core';
2
+ export declare class Generate extends Command {
3
+ static aliases: string[];
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ verbose: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
8
+ };
9
+ run(): Promise<void>;
10
+ logVerbose(message: string | (() => string), verbose: boolean): void;
11
+ }
@@ -0,0 +1,36 @@
1
+ import { CodeGenerationService } from '../internal/CodeGenerationService.js';
2
+ import { Command, Flags } from '@oclif/core';
3
+ import { isKinoticProject, loadKinoticProjectConfig } from '../internal/state/KinoticProjectConfigUtil.js';
4
+ export class Generate extends Command {
5
+ static aliases = ['gen'];
6
+ static description = 'This will generate all Entity Service classes.';
7
+ static examples = [
8
+ '$ kinotic generate',
9
+ '$ kinotic gen',
10
+ '$ kinotic gen -v',
11
+ ];
12
+ static flags = {
13
+ verbose: Flags.boolean({ char: 'v', description: 'Enable verbose logging', default: false }),
14
+ };
15
+ async run() {
16
+ const { flags } = await this.parse(Generate);
17
+ if (!(await isKinoticProject())) {
18
+ this.error('The working directory is not a Kinotic Project');
19
+ }
20
+ const kinoticProjectConfig = await loadKinoticProjectConfig();
21
+ const codeGenerationService = new CodeGenerationService(kinoticProjectConfig.application, kinoticProjectConfig.fileExtensionForImports, this);
22
+ await codeGenerationService.generateAllEntities(kinoticProjectConfig, flags.verbose);
23
+ this.log(`Code Generation Complete For application: ${kinoticProjectConfig.application}`);
24
+ }
25
+ // This is needed for the CodeGenerationService to log verbose messages
26
+ logVerbose(message, verbose) {
27
+ if (verbose) {
28
+ if (typeof message === 'function') {
29
+ this.log(message());
30
+ }
31
+ else {
32
+ this.log(message);
33
+ }
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,12 @@
1
+ import { Command } from '@oclif/core';
2
+ export declare class Initialize extends Command {
3
+ static aliases: string[];
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ application: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
8
+ entities: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
9
+ generated: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
10
+ };
11
+ run(): Promise<void>;
12
+ }