@contextual-io/cli 0.1.5 → 0.1.7
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/README.md +103 -86
- package/dist/{commands/base.d.ts → base.d.ts} +2 -2
- package/dist/{commands/base.js → base.js} +3 -3
- package/dist/commands/config/add.d.ts +1 -1
- package/dist/commands/config/add.js +1 -1
- package/dist/commands/config/current.d.ts +1 -1
- package/dist/commands/config/current.js +1 -1
- package/dist/commands/config/delete.d.ts +1 -1
- package/dist/commands/config/delete.js +1 -1
- package/dist/commands/config/get.d.ts +1 -1
- package/dist/commands/config/get.js +1 -1
- package/dist/commands/config/index.d.ts +8 -0
- package/dist/commands/config/index.js +11 -0
- package/dist/commands/config/list.d.ts +1 -1
- package/dist/commands/config/list.js +1 -1
- package/dist/commands/config/login.d.ts +1 -1
- package/dist/commands/config/login.js +1 -1
- package/dist/commands/config/use.d.ts +1 -1
- package/dist/commands/config/use.js +1 -1
- package/dist/commands/records/add.d.ts +1 -1
- package/dist/commands/records/add.js +2 -2
- package/dist/commands/records/delete.d.ts +1 -1
- package/dist/commands/records/delete.js +1 -1
- package/dist/commands/records/get.d.ts +1 -1
- package/dist/commands/records/get.js +1 -1
- package/dist/commands/records/index.d.ts +8 -0
- package/dist/commands/records/index.js +11 -0
- package/dist/commands/records/list.d.ts +1 -1
- package/dist/commands/records/list.js +1 -1
- package/dist/commands/records/query.d.ts +1 -1
- package/dist/commands/records/query.js +1 -1
- package/dist/commands/records/replace.d.ts +1 -1
- package/dist/commands/records/replace.js +1 -1
- package/oclif.manifest.json +47 -32
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ $ npm install -g @contextual-io/cli
|
|
|
20
20
|
$ ctxl COMMAND
|
|
21
21
|
running command...
|
|
22
22
|
$ ctxl (--version)
|
|
23
|
-
@contextual-io/cli/0.1.
|
|
23
|
+
@contextual-io/cli/0.1.7 linux-x64 node-v25.2.1
|
|
24
24
|
$ ctxl --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ ctxl COMMAND
|
|
@@ -29,7 +29,7 @@ USAGE
|
|
|
29
29
|
<!-- usagestop -->
|
|
30
30
|
# Commands
|
|
31
31
|
<!-- commands -->
|
|
32
|
-
* [`ctxl
|
|
32
|
+
* [`ctxl config`](#ctxl-config)
|
|
33
33
|
* [`ctxl config add CONFIG-ID`](#ctxl-config-add-config-id)
|
|
34
34
|
* [`ctxl config current`](#ctxl-config-current)
|
|
35
35
|
* [`ctxl config delete CONFIG-ID`](#ctxl-config-delete-config-id)
|
|
@@ -37,9 +37,7 @@ USAGE
|
|
|
37
37
|
* [`ctxl config list`](#ctxl-config-list)
|
|
38
38
|
* [`ctxl config login`](#ctxl-config-login)
|
|
39
39
|
* [`ctxl config use CONFIG-ID`](#ctxl-config-use-config-id)
|
|
40
|
-
* [`ctxl create [URI]`](#ctxl-create-uri)
|
|
41
40
|
* [`ctxl help [COMMAND]`](#ctxl-help-command)
|
|
42
|
-
* [`ctxl import [URI]`](#ctxl-import-uri)
|
|
43
41
|
* [`ctxl plugins`](#ctxl-plugins)
|
|
44
42
|
* [`ctxl plugins add PLUGIN`](#ctxl-plugins-add-plugin)
|
|
45
43
|
* [`ctxl plugins:inspect PLUGIN...`](#ctxl-pluginsinspect-plugin)
|
|
@@ -50,24 +48,29 @@ USAGE
|
|
|
50
48
|
* [`ctxl plugins uninstall [PLUGIN]`](#ctxl-plugins-uninstall-plugin)
|
|
51
49
|
* [`ctxl plugins unlink [PLUGIN]`](#ctxl-plugins-unlink-plugin)
|
|
52
50
|
* [`ctxl plugins update`](#ctxl-plugins-update)
|
|
51
|
+
* [`ctxl records`](#ctxl-records)
|
|
53
52
|
* [`ctxl records add [URI]`](#ctxl-records-add-uri)
|
|
53
|
+
* [`ctxl records create [URI]`](#ctxl-records-create-uri)
|
|
54
54
|
* [`ctxl records delete [URI]`](#ctxl-records-delete-uri)
|
|
55
55
|
* [`ctxl records get [URI]`](#ctxl-records-get-uri)
|
|
56
|
+
* [`ctxl records import [URI]`](#ctxl-records-import-uri)
|
|
56
57
|
* [`ctxl records list [URI]`](#ctxl-records-list-uri)
|
|
57
58
|
* [`ctxl records query [URI]`](#ctxl-records-query-uri)
|
|
58
59
|
* [`ctxl records replace [URI]`](#ctxl-records-replace-uri)
|
|
59
60
|
|
|
60
|
-
## `ctxl
|
|
61
|
+
## `ctxl config`
|
|
62
|
+
|
|
63
|
+
manage configs
|
|
61
64
|
|
|
62
65
|
```
|
|
63
66
|
USAGE
|
|
64
|
-
$ ctxl
|
|
67
|
+
$ ctxl config
|
|
65
68
|
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
DESCRIPTION
|
|
70
|
+
manage configs
|
|
68
71
|
```
|
|
69
72
|
|
|
70
|
-
_See code: [src/commands/
|
|
73
|
+
_See code: [src/commands/config/index.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.7/src/commands/config/index.ts)_
|
|
71
74
|
|
|
72
75
|
## `ctxl config add CONFIG-ID`
|
|
73
76
|
|
|
@@ -92,7 +95,7 @@ EXAMPLES
|
|
|
92
95
|
$ ctxl config add some-config-id --tenant-id my-tenant
|
|
93
96
|
```
|
|
94
97
|
|
|
95
|
-
_See code: [src/commands/config/add.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.
|
|
98
|
+
_See code: [src/commands/config/add.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.7/src/commands/config/add.ts)_
|
|
96
99
|
|
|
97
100
|
## `ctxl config current`
|
|
98
101
|
|
|
@@ -112,7 +115,7 @@ EXAMPLES
|
|
|
112
115
|
$ ctxl config current
|
|
113
116
|
```
|
|
114
117
|
|
|
115
|
-
_See code: [src/commands/config/current.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.
|
|
118
|
+
_See code: [src/commands/config/current.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.7/src/commands/config/current.ts)_
|
|
116
119
|
|
|
117
120
|
## `ctxl config delete CONFIG-ID`
|
|
118
121
|
|
|
@@ -132,7 +135,7 @@ EXAMPLES
|
|
|
132
135
|
$ ctxl config delete some-config-id
|
|
133
136
|
```
|
|
134
137
|
|
|
135
|
-
_See code: [src/commands/config/delete.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.
|
|
138
|
+
_See code: [src/commands/config/delete.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.7/src/commands/config/delete.ts)_
|
|
136
139
|
|
|
137
140
|
## `ctxl config get [CONFIG-ID]`
|
|
138
141
|
|
|
@@ -157,7 +160,7 @@ EXAMPLES
|
|
|
157
160
|
$ ctxl config get some-config-id
|
|
158
161
|
```
|
|
159
162
|
|
|
160
|
-
_See code: [src/commands/config/get.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.
|
|
163
|
+
_See code: [src/commands/config/get.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.7/src/commands/config/get.ts)_
|
|
161
164
|
|
|
162
165
|
## `ctxl config list`
|
|
163
166
|
|
|
@@ -177,7 +180,7 @@ EXAMPLES
|
|
|
177
180
|
$ ctxl config list
|
|
178
181
|
```
|
|
179
182
|
|
|
180
|
-
_See code: [src/commands/config/list.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.
|
|
183
|
+
_See code: [src/commands/config/list.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.7/src/commands/config/list.ts)_
|
|
181
184
|
|
|
182
185
|
## `ctxl config login`
|
|
183
186
|
|
|
@@ -194,7 +197,7 @@ EXAMPLES
|
|
|
194
197
|
$ ctxl config login
|
|
195
198
|
```
|
|
196
199
|
|
|
197
|
-
_See code: [src/commands/config/login.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.
|
|
200
|
+
_See code: [src/commands/config/login.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.7/src/commands/config/login.ts)_
|
|
198
201
|
|
|
199
202
|
## `ctxl config use CONFIG-ID`
|
|
200
203
|
|
|
@@ -214,38 +217,7 @@ EXAMPLES
|
|
|
214
217
|
$ ctxl config use some-config-id
|
|
215
218
|
```
|
|
216
219
|
|
|
217
|
-
_See code: [src/commands/config/use.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.
|
|
218
|
-
|
|
219
|
-
## `ctxl create [URI]`
|
|
220
|
-
|
|
221
|
-
create record(s)
|
|
222
|
-
|
|
223
|
-
```
|
|
224
|
-
USAGE
|
|
225
|
-
$ ctxl create [URI] [-C <value>] [-i <value>] [-T <value>]
|
|
226
|
-
|
|
227
|
-
ARGUMENTS
|
|
228
|
-
[URI] uri of type
|
|
229
|
-
|
|
230
|
-
FLAGS
|
|
231
|
-
-T, --type=<value> type
|
|
232
|
-
-i, --input-file=<value> [default: -] file to read. can read stdin if value is '-'
|
|
233
|
-
|
|
234
|
-
GLOBAL FLAGS
|
|
235
|
-
-C, --config-id=<value> Specify config id to use for call.
|
|
236
|
-
|
|
237
|
-
DESCRIPTION
|
|
238
|
-
create record(s)
|
|
239
|
-
|
|
240
|
-
ALIASES
|
|
241
|
-
$ ctxl create
|
|
242
|
-
$ ctxl import
|
|
243
|
-
|
|
244
|
-
EXAMPLES
|
|
245
|
-
$ ctxl create native-object:my-type
|
|
246
|
-
|
|
247
|
-
$ ctxl create --type my-type --input-file records.json
|
|
248
|
-
```
|
|
220
|
+
_See code: [src/commands/config/use.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.7/src/commands/config/use.ts)_
|
|
249
221
|
|
|
250
222
|
## `ctxl help [COMMAND]`
|
|
251
223
|
|
|
@@ -267,37 +239,6 @@ DESCRIPTION
|
|
|
267
239
|
|
|
268
240
|
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.36/src/commands/help.ts)_
|
|
269
241
|
|
|
270
|
-
## `ctxl import [URI]`
|
|
271
|
-
|
|
272
|
-
create record(s)
|
|
273
|
-
|
|
274
|
-
```
|
|
275
|
-
USAGE
|
|
276
|
-
$ ctxl import [URI] [-C <value>] [-i <value>] [-T <value>]
|
|
277
|
-
|
|
278
|
-
ARGUMENTS
|
|
279
|
-
[URI] uri of type
|
|
280
|
-
|
|
281
|
-
FLAGS
|
|
282
|
-
-T, --type=<value> type
|
|
283
|
-
-i, --input-file=<value> [default: -] file to read. can read stdin if value is '-'
|
|
284
|
-
|
|
285
|
-
GLOBAL FLAGS
|
|
286
|
-
-C, --config-id=<value> Specify config id to use for call.
|
|
287
|
-
|
|
288
|
-
DESCRIPTION
|
|
289
|
-
create record(s)
|
|
290
|
-
|
|
291
|
-
ALIASES
|
|
292
|
-
$ ctxl create
|
|
293
|
-
$ ctxl import
|
|
294
|
-
|
|
295
|
-
EXAMPLES
|
|
296
|
-
$ ctxl import native-object:my-type
|
|
297
|
-
|
|
298
|
-
$ ctxl import --type my-type --input-file records.json
|
|
299
|
-
```
|
|
300
|
-
|
|
301
242
|
## `ctxl plugins`
|
|
302
243
|
|
|
303
244
|
List installed plugins.
|
|
@@ -588,6 +529,20 @@ DESCRIPTION
|
|
|
588
529
|
|
|
589
530
|
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/update.ts)_
|
|
590
531
|
|
|
532
|
+
## `ctxl records`
|
|
533
|
+
|
|
534
|
+
manage records
|
|
535
|
+
|
|
536
|
+
```
|
|
537
|
+
USAGE
|
|
538
|
+
$ ctxl records
|
|
539
|
+
|
|
540
|
+
DESCRIPTION
|
|
541
|
+
manage records
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
_See code: [src/commands/records/index.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.7/src/commands/records/index.ts)_
|
|
545
|
+
|
|
591
546
|
## `ctxl records add [URI]`
|
|
592
547
|
|
|
593
548
|
create record(s)
|
|
@@ -610,8 +565,8 @@ DESCRIPTION
|
|
|
610
565
|
create record(s)
|
|
611
566
|
|
|
612
567
|
ALIASES
|
|
613
|
-
$ ctxl create
|
|
614
|
-
$ ctxl import
|
|
568
|
+
$ ctxl records create
|
|
569
|
+
$ ctxl records import
|
|
615
570
|
|
|
616
571
|
EXAMPLES
|
|
617
572
|
$ ctxl records add native-object:my-type
|
|
@@ -619,7 +574,38 @@ EXAMPLES
|
|
|
619
574
|
$ ctxl records add --type my-type --input-file records.json
|
|
620
575
|
```
|
|
621
576
|
|
|
622
|
-
_See code: [src/commands/records/add.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.
|
|
577
|
+
_See code: [src/commands/records/add.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.7/src/commands/records/add.ts)_
|
|
578
|
+
|
|
579
|
+
## `ctxl records create [URI]`
|
|
580
|
+
|
|
581
|
+
create record(s)
|
|
582
|
+
|
|
583
|
+
```
|
|
584
|
+
USAGE
|
|
585
|
+
$ ctxl records create [URI] [-C <value>] [-i <value>] [-T <value>]
|
|
586
|
+
|
|
587
|
+
ARGUMENTS
|
|
588
|
+
[URI] uri of type
|
|
589
|
+
|
|
590
|
+
FLAGS
|
|
591
|
+
-T, --type=<value> type
|
|
592
|
+
-i, --input-file=<value> [default: -] file to read. can read stdin if value is '-'
|
|
593
|
+
|
|
594
|
+
GLOBAL FLAGS
|
|
595
|
+
-C, --config-id=<value> Specify config id to use for call.
|
|
596
|
+
|
|
597
|
+
DESCRIPTION
|
|
598
|
+
create record(s)
|
|
599
|
+
|
|
600
|
+
ALIASES
|
|
601
|
+
$ ctxl records create
|
|
602
|
+
$ ctxl records import
|
|
603
|
+
|
|
604
|
+
EXAMPLES
|
|
605
|
+
$ ctxl records create native-object:my-type
|
|
606
|
+
|
|
607
|
+
$ ctxl records create --type my-type --input-file records.json
|
|
608
|
+
```
|
|
623
609
|
|
|
624
610
|
## `ctxl records delete [URI]`
|
|
625
611
|
|
|
@@ -654,7 +640,7 @@ EXAMPLES
|
|
|
654
640
|
$ ctxl records delete --type my-type --id instance-1 --id instance-2
|
|
655
641
|
```
|
|
656
642
|
|
|
657
|
-
_See code: [src/commands/records/delete.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.
|
|
643
|
+
_See code: [src/commands/records/delete.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.7/src/commands/records/delete.ts)_
|
|
658
644
|
|
|
659
645
|
## `ctxl records get [URI]`
|
|
660
646
|
|
|
@@ -689,7 +675,38 @@ EXAMPLES
|
|
|
689
675
|
$ ctxl records get --type my-type --id instance-1 --id instance-2
|
|
690
676
|
```
|
|
691
677
|
|
|
692
|
-
_See code: [src/commands/records/get.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.
|
|
678
|
+
_See code: [src/commands/records/get.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.7/src/commands/records/get.ts)_
|
|
679
|
+
|
|
680
|
+
## `ctxl records import [URI]`
|
|
681
|
+
|
|
682
|
+
create record(s)
|
|
683
|
+
|
|
684
|
+
```
|
|
685
|
+
USAGE
|
|
686
|
+
$ ctxl records import [URI] [-C <value>] [-i <value>] [-T <value>]
|
|
687
|
+
|
|
688
|
+
ARGUMENTS
|
|
689
|
+
[URI] uri of type
|
|
690
|
+
|
|
691
|
+
FLAGS
|
|
692
|
+
-T, --type=<value> type
|
|
693
|
+
-i, --input-file=<value> [default: -] file to read. can read stdin if value is '-'
|
|
694
|
+
|
|
695
|
+
GLOBAL FLAGS
|
|
696
|
+
-C, --config-id=<value> Specify config id to use for call.
|
|
697
|
+
|
|
698
|
+
DESCRIPTION
|
|
699
|
+
create record(s)
|
|
700
|
+
|
|
701
|
+
ALIASES
|
|
702
|
+
$ ctxl records create
|
|
703
|
+
$ ctxl records import
|
|
704
|
+
|
|
705
|
+
EXAMPLES
|
|
706
|
+
$ ctxl records import native-object:my-type
|
|
707
|
+
|
|
708
|
+
$ ctxl records import --type my-type --input-file records.json
|
|
709
|
+
```
|
|
693
710
|
|
|
694
711
|
## `ctxl records list [URI]`
|
|
695
712
|
|
|
@@ -732,7 +749,7 @@ EXAMPLES
|
|
|
732
749
|
$ ctxl records list --type my-type -s field1=value1 -s field2=value2 --include-total
|
|
733
750
|
```
|
|
734
751
|
|
|
735
|
-
_See code: [src/commands/records/list.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.
|
|
752
|
+
_See code: [src/commands/records/list.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.7/src/commands/records/list.ts)_
|
|
736
753
|
|
|
737
754
|
## `ctxl records query [URI]`
|
|
738
755
|
|
|
@@ -772,7 +789,7 @@ EXAMPLES
|
|
|
772
789
|
$ ctxl records query --type my-type --include-total --query-file query.json
|
|
773
790
|
```
|
|
774
791
|
|
|
775
|
-
_See code: [src/commands/records/query.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.
|
|
792
|
+
_See code: [src/commands/records/query.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.7/src/commands/records/query.ts)_
|
|
776
793
|
|
|
777
794
|
## `ctxl records replace [URI]`
|
|
778
795
|
|
|
@@ -804,5 +821,5 @@ EXAMPLES
|
|
|
804
821
|
$ ctxl records replace --type my-type --id instance-1 --input-file record.json
|
|
805
822
|
```
|
|
806
823
|
|
|
807
|
-
_See code: [src/commands/records/replace.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.
|
|
824
|
+
_See code: [src/commands/records/replace.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.7/src/commands/records/replace.ts)_
|
|
808
825
|
<!-- commandsstop -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command, Interfaces } from "@oclif/core";
|
|
2
2
|
import fetch from "cross-fetch";
|
|
3
|
-
import { UrlSafeId } from "
|
|
4
|
-
import { CleanConfig, Config, UserConfig } from "
|
|
3
|
+
import { UrlSafeId } from "./models/url-safe-id.js";
|
|
4
|
+
import { CleanConfig, Config, UserConfig } from "./models/user-config.js";
|
|
5
5
|
export type Flags<T extends typeof Command> = Interfaces.InferredFlags<T["flags"] & typeof BaseConfigCommand["baseFlags"]>;
|
|
6
6
|
export type Args<T extends typeof Command> = Interfaces.InferredArgs<T["args"]>;
|
|
7
7
|
declare class CommandConfig {
|
|
@@ -2,9 +2,9 @@ import { Command, Flags } from "@oclif/core";
|
|
|
2
2
|
import fetch from "cross-fetch";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
|
-
import { HttpError } from "
|
|
6
|
-
import { UserConfig } from "
|
|
7
|
-
import { rehydrateToken } from "
|
|
5
|
+
import { HttpError } from "./models/errors.js";
|
|
6
|
+
import { UserConfig } from "./models/user-config.js";
|
|
7
|
+
import { rehydrateToken } from "./utils/auth.js";
|
|
8
8
|
class CommandConfig {
|
|
9
9
|
configDir;
|
|
10
10
|
constructor(configDir) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseConfigCommand } from "
|
|
1
|
+
import { BaseConfigCommand } from "../../base.js";
|
|
2
2
|
export default class ConfigAdd extends BaseConfigCommand<typeof ConfigAdd> {
|
|
3
3
|
static args: {
|
|
4
4
|
"config-id": import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Args, Flags } from "@oclif/core";
|
|
2
|
+
import { BaseConfigCommand } from "../../base.js";
|
|
2
3
|
import { Silo } from "../../models/silo.js";
|
|
3
4
|
import { UrlSafeId } from "../../models/url-safe-id.js";
|
|
4
5
|
import { getCliConfiguration } from "../../utils/cli-configuration.js";
|
|
5
|
-
import { BaseConfigCommand } from "../base.js";
|
|
6
6
|
export default class ConfigAdd extends BaseConfigCommand {
|
|
7
7
|
static args = {
|
|
8
8
|
"config-id": Args.string({ description: "id of config", required: true }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { BaseConfigCommand } from "../../base.js";
|
|
1
2
|
import { CleanConfig } from "../../models/user-config.js";
|
|
2
|
-
import { BaseConfigCommand } from "../base.js";
|
|
3
3
|
export default class ConfigCurrent extends BaseConfigCommand<typeof ConfigCurrent> {
|
|
4
4
|
static args: {};
|
|
5
5
|
static description: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseConfigCommand } from "
|
|
1
|
+
import { BaseConfigCommand } from "../../base.js";
|
|
2
2
|
export default class ConfigDelete extends BaseConfigCommand<typeof ConfigDelete> {
|
|
3
3
|
static args: {
|
|
4
4
|
"config-id": import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Args } from "@oclif/core";
|
|
2
|
+
import { BaseConfigCommand } from "../../base.js";
|
|
2
3
|
import { UrlSafeId } from "../../models/url-safe-id.js";
|
|
3
|
-
import { BaseConfigCommand } from "../base.js";
|
|
4
4
|
export default class ConfigDelete extends BaseConfigCommand {
|
|
5
5
|
static args = {
|
|
6
6
|
"config-id": Args.string({ description: "id of config", required: true }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { BaseConfigCommand } from "../../base.js";
|
|
1
2
|
import { CleanConfig } from "../../models/user-config.js";
|
|
2
|
-
import { BaseConfigCommand } from "../base.js";
|
|
3
3
|
export default class ConfigGet extends BaseConfigCommand<typeof ConfigGet> {
|
|
4
4
|
static args: {
|
|
5
5
|
"config-id": import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Args } from "@oclif/core";
|
|
2
2
|
import { makeTable } from "@oclif/table";
|
|
3
|
+
import { BaseConfigCommand } from "../../base.js";
|
|
3
4
|
import { UrlSafeId } from "../../models/url-safe-id.js";
|
|
4
|
-
import { BaseConfigCommand } from "../base.js";
|
|
5
5
|
export default class ConfigGet extends BaseConfigCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
"config-id": Args.string({ description: "id of config" }),
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { loadHelpClass } from "@oclif/core";
|
|
2
|
+
import { BaseConfigCommand } from "../../base.js";
|
|
3
|
+
export default class Config extends BaseConfigCommand {
|
|
4
|
+
static args = {};
|
|
5
|
+
static description = "manage configs";
|
|
6
|
+
static examples = [];
|
|
7
|
+
static flags = {};
|
|
8
|
+
async run() {
|
|
9
|
+
await new (await loadHelpClass(this.config))(this.config).showHelp([Config.id]);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { BaseConfigCommand } from "../../base.js";
|
|
1
2
|
import { CleanConfig } from "../../models/user-config.js";
|
|
2
|
-
import { BaseConfigCommand } from "../base.js";
|
|
3
3
|
export default class ConfigList extends BaseConfigCommand<typeof ConfigList> {
|
|
4
4
|
static args: {};
|
|
5
5
|
static description: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { makeTable } from "@oclif/table";
|
|
2
2
|
import chalk from "chalk";
|
|
3
|
-
import { BaseConfigCommand } from "
|
|
3
|
+
import { BaseConfigCommand } from "../../base.js";
|
|
4
4
|
export default class ConfigList extends BaseConfigCommand {
|
|
5
5
|
static args = {};
|
|
6
6
|
static description = "list all available configs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { BaseConfigCommand } from "../../base.js";
|
|
1
2
|
import { codeExchange, getUserProfile } from "../../utils/auth.js";
|
|
2
|
-
import { BaseConfigCommand } from "../base.js";
|
|
3
3
|
export default class ConfigLogin extends BaseConfigCommand {
|
|
4
4
|
static args = {};
|
|
5
5
|
static description = "login using the current config";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseConfigCommand } from "
|
|
1
|
+
import { BaseConfigCommand } from "../../base.js";
|
|
2
2
|
export default class ConfigUse extends BaseConfigCommand<typeof ConfigUse> {
|
|
3
3
|
static args: {
|
|
4
4
|
"config-id": import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Args } from "@oclif/core";
|
|
2
|
+
import { BaseConfigCommand } from "../../base.js";
|
|
2
3
|
import { UrlSafeId } from "../../models/url-safe-id.js";
|
|
3
|
-
import { BaseConfigCommand } from "../base.js";
|
|
4
4
|
export default class ConfigUse extends BaseConfigCommand {
|
|
5
5
|
static args = {
|
|
6
6
|
"config-id": Args.string({ description: "id of config", required: true }),
|
|
@@ -2,12 +2,12 @@ import { Args, Flags } from "@oclif/core";
|
|
|
2
2
|
import fs, { createReadStream } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import jsonl from "stream-json/jsonl/Parser.js";
|
|
5
|
+
import { BaseCommand } from "../../base.js";
|
|
5
6
|
import { parseUri } from "../../models/uri.js";
|
|
6
7
|
import { getNativeObjectApiEndpoint } from "../../utils/endpoints.js";
|
|
7
8
|
import { mapStream, readStreamToEnd } from "../../utils/stream.js";
|
|
8
|
-
import { BaseCommand } from "../base.js";
|
|
9
9
|
export default class RecordsAdd extends BaseCommand {
|
|
10
|
-
static aliases = ["create", "import"];
|
|
10
|
+
static aliases = ["records create", "records import"];
|
|
11
11
|
static args = {
|
|
12
12
|
"uri": Args.string({ description: "uri of type" }),
|
|
13
13
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseCommand } from "
|
|
1
|
+
import { BaseCommand } from "../../base.js";
|
|
2
2
|
export default class RecordsDelete extends BaseCommand<typeof RecordsDelete> {
|
|
3
3
|
static args: {
|
|
4
4
|
uri: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Args, Flags } from "@oclif/core";
|
|
2
|
+
import { BaseCommand } from "../../base.js";
|
|
2
3
|
import { parseUri } from "../../models/uri.js";
|
|
3
4
|
import { getNativeObjectApiEndpoint } from "../../utils/endpoints.js";
|
|
4
|
-
import { BaseCommand } from "../base.js";
|
|
5
5
|
export default class RecordsDelete extends BaseCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
"uri": Args.string({ description: "uri of record" }),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Args, Flags } from "@oclif/core";
|
|
2
|
+
import { BaseCommand } from "../../base.js";
|
|
2
3
|
import { parseUri } from "../../models/uri.js";
|
|
3
4
|
import { getNativeObjectApiEndpoint } from "../../utils/endpoints.js";
|
|
4
|
-
import { BaseCommand } from "../base.js";
|
|
5
5
|
export default class RecordsGet extends BaseCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
"uri": Args.string({ description: "uri of record" }),
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { loadHelpClass } from "@oclif/core";
|
|
2
|
+
import { BaseConfigCommand } from "../../base.js";
|
|
3
|
+
export default class Records extends BaseConfigCommand {
|
|
4
|
+
static args = {};
|
|
5
|
+
static description = "manage records";
|
|
6
|
+
static examples = [];
|
|
7
|
+
static flags = {};
|
|
8
|
+
async run() {
|
|
9
|
+
await new (await loadHelpClass(this.config))(this.config).showHelp([Records.id]);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseCommand } from "
|
|
1
|
+
import { BaseCommand } from "../../base.js";
|
|
2
2
|
export default class RecordsList extends BaseCommand<typeof RecordsList> {
|
|
3
3
|
static args: {
|
|
4
4
|
uri: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable unicorn/no-array-reduce */
|
|
2
2
|
import { Args, Flags } from "@oclif/core";
|
|
3
|
+
import { BaseCommand } from "../../base.js";
|
|
3
4
|
import { parseUri } from "../../models/uri.js";
|
|
4
5
|
import { getNativeObjectApiEndpoint } from "../../utils/endpoints.js";
|
|
5
6
|
import { endTime, startTime } from "../../utils/time.js";
|
|
6
|
-
import { BaseCommand } from "../base.js";
|
|
7
7
|
const flagArrayToParam = (cmd, values) => values
|
|
8
8
|
.map(_ => _.split("="))
|
|
9
9
|
.map(([k, v]) => ({ [`${cmd}.${k}`]: v }))
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseCommand } from "
|
|
1
|
+
import { BaseCommand } from "../../base.js";
|
|
2
2
|
export default class RecordsQuery extends BaseCommand<typeof RecordsQuery> {
|
|
3
3
|
static args: {
|
|
4
4
|
uri: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Args, Flags } from "@oclif/core";
|
|
2
2
|
import fs, { createReadStream } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
|
+
import { BaseCommand } from "../../base.js";
|
|
4
5
|
import { parseUri } from "../../models/uri.js";
|
|
5
6
|
import { getNativeObjectApiEndpoint } from "../../utils/endpoints.js";
|
|
6
7
|
import { readStreamToEnd } from "../../utils/stream.js";
|
|
7
8
|
import { endTime, startTime } from "../../utils/time.js";
|
|
8
|
-
import { BaseCommand } from "../base.js";
|
|
9
9
|
export default class RecordsQuery extends BaseCommand {
|
|
10
10
|
static args = {
|
|
11
11
|
"uri": Args.string({ description: "uri of type" }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseCommand } from "
|
|
1
|
+
import { BaseCommand } from "../../base.js";
|
|
2
2
|
export default class RecordsReplace extends BaseCommand<typeof RecordsReplace> {
|
|
3
3
|
static args: {
|
|
4
4
|
uri: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Args, Flags } from "@oclif/core";
|
|
2
2
|
import fs, { createReadStream } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
|
+
import { BaseCommand } from "../../base.js";
|
|
4
5
|
import { parseUri } from "../../models/uri.js";
|
|
5
6
|
import { getNativeObjectApiEndpoint } from "../../utils/endpoints.js";
|
|
6
7
|
import { readStreamToEnd } from "../../utils/stream.js";
|
|
7
|
-
import { BaseCommand } from "../base.js";
|
|
8
8
|
export default class RecordsReplace extends BaseCommand {
|
|
9
9
|
static args = {
|
|
10
10
|
"uri": Args.string({ description: "uri of record" }),
|
package/oclif.manifest.json
CHANGED
|
@@ -1,34 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
-
"base": {
|
|
4
|
-
"aliases": [],
|
|
5
|
-
"args": {},
|
|
6
|
-
"flags": {
|
|
7
|
-
"config-id": {
|
|
8
|
-
"char": "C",
|
|
9
|
-
"helpGroup": "GLOBAL",
|
|
10
|
-
"name": "config-id",
|
|
11
|
-
"summary": "Specify config id to use for call.",
|
|
12
|
-
"hasDynamicHelp": false,
|
|
13
|
-
"multiple": false,
|
|
14
|
-
"type": "option"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"hasDynamicHelp": false,
|
|
18
|
-
"hiddenAliases": [],
|
|
19
|
-
"id": "base",
|
|
20
|
-
"pluginAlias": "@contextual-io/cli",
|
|
21
|
-
"pluginName": "@contextual-io/cli",
|
|
22
|
-
"pluginType": "core",
|
|
23
|
-
"strict": true,
|
|
24
|
-
"enableJsonFlag": false,
|
|
25
|
-
"isESM": true,
|
|
26
|
-
"relativePath": [
|
|
27
|
-
"dist",
|
|
28
|
-
"commands",
|
|
29
|
-
"base.js"
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
3
|
"config:add": {
|
|
33
4
|
"aliases": [],
|
|
34
5
|
"args": {
|
|
@@ -182,6 +153,28 @@
|
|
|
182
153
|
"get.js"
|
|
183
154
|
]
|
|
184
155
|
},
|
|
156
|
+
"config": {
|
|
157
|
+
"aliases": [],
|
|
158
|
+
"args": {},
|
|
159
|
+
"description": "manage configs",
|
|
160
|
+
"examples": [],
|
|
161
|
+
"flags": {},
|
|
162
|
+
"hasDynamicHelp": false,
|
|
163
|
+
"hiddenAliases": [],
|
|
164
|
+
"id": "config",
|
|
165
|
+
"pluginAlias": "@contextual-io/cli",
|
|
166
|
+
"pluginName": "@contextual-io/cli",
|
|
167
|
+
"pluginType": "core",
|
|
168
|
+
"strict": true,
|
|
169
|
+
"enableJsonFlag": false,
|
|
170
|
+
"isESM": true,
|
|
171
|
+
"relativePath": [
|
|
172
|
+
"dist",
|
|
173
|
+
"commands",
|
|
174
|
+
"config",
|
|
175
|
+
"index.js"
|
|
176
|
+
]
|
|
177
|
+
},
|
|
185
178
|
"config:list": {
|
|
186
179
|
"aliases": [],
|
|
187
180
|
"args": {},
|
|
@@ -270,8 +263,8 @@
|
|
|
270
263
|
},
|
|
271
264
|
"records:add": {
|
|
272
265
|
"aliases": [
|
|
273
|
-
"create",
|
|
274
|
-
"import"
|
|
266
|
+
"records:create",
|
|
267
|
+
"records:import"
|
|
275
268
|
],
|
|
276
269
|
"args": {
|
|
277
270
|
"uri": {
|
|
@@ -446,6 +439,28 @@
|
|
|
446
439
|
"get.js"
|
|
447
440
|
]
|
|
448
441
|
},
|
|
442
|
+
"records": {
|
|
443
|
+
"aliases": [],
|
|
444
|
+
"args": {},
|
|
445
|
+
"description": "manage records",
|
|
446
|
+
"examples": [],
|
|
447
|
+
"flags": {},
|
|
448
|
+
"hasDynamicHelp": false,
|
|
449
|
+
"hiddenAliases": [],
|
|
450
|
+
"id": "records",
|
|
451
|
+
"pluginAlias": "@contextual-io/cli",
|
|
452
|
+
"pluginName": "@contextual-io/cli",
|
|
453
|
+
"pluginType": "core",
|
|
454
|
+
"strict": true,
|
|
455
|
+
"enableJsonFlag": false,
|
|
456
|
+
"isESM": true,
|
|
457
|
+
"relativePath": [
|
|
458
|
+
"dist",
|
|
459
|
+
"commands",
|
|
460
|
+
"records",
|
|
461
|
+
"index.js"
|
|
462
|
+
]
|
|
463
|
+
},
|
|
449
464
|
"records:list": {
|
|
450
465
|
"aliases": [],
|
|
451
466
|
"args": {
|
|
@@ -738,5 +753,5 @@
|
|
|
738
753
|
]
|
|
739
754
|
}
|
|
740
755
|
},
|
|
741
|
-
"version": "0.1.
|
|
756
|
+
"version": "0.1.7"
|
|
742
757
|
}
|