@contextual-io/cli 0.1.6 → 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 +110 -80
- package/dist/commands/config/add.js +1 -1
- package/dist/commands/config/current.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/login.js +1 -1
- package/dist/commands/config/use.js +1 -1
- package/dist/commands/records/add.js +2 -2
- package/dist/commands/records/delete.js +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.js +1 -1
- package/dist/commands/records/query.js +1 -1
- package/dist/commands/records/replace.js +1 -1
- package/oclif.manifest.json +47 -3
- 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,6 +29,7 @@ USAGE
|
|
|
29
29
|
<!-- usagestop -->
|
|
30
30
|
# Commands
|
|
31
31
|
<!-- commands -->
|
|
32
|
+
* [`ctxl config`](#ctxl-config)
|
|
32
33
|
* [`ctxl config add CONFIG-ID`](#ctxl-config-add-config-id)
|
|
33
34
|
* [`ctxl config current`](#ctxl-config-current)
|
|
34
35
|
* [`ctxl config delete CONFIG-ID`](#ctxl-config-delete-config-id)
|
|
@@ -36,9 +37,7 @@ USAGE
|
|
|
36
37
|
* [`ctxl config list`](#ctxl-config-list)
|
|
37
38
|
* [`ctxl config login`](#ctxl-config-login)
|
|
38
39
|
* [`ctxl config use CONFIG-ID`](#ctxl-config-use-config-id)
|
|
39
|
-
* [`ctxl create [URI]`](#ctxl-create-uri)
|
|
40
40
|
* [`ctxl help [COMMAND]`](#ctxl-help-command)
|
|
41
|
-
* [`ctxl import [URI]`](#ctxl-import-uri)
|
|
42
41
|
* [`ctxl plugins`](#ctxl-plugins)
|
|
43
42
|
* [`ctxl plugins add PLUGIN`](#ctxl-plugins-add-plugin)
|
|
44
43
|
* [`ctxl plugins:inspect PLUGIN...`](#ctxl-pluginsinspect-plugin)
|
|
@@ -49,13 +48,30 @@ USAGE
|
|
|
49
48
|
* [`ctxl plugins uninstall [PLUGIN]`](#ctxl-plugins-uninstall-plugin)
|
|
50
49
|
* [`ctxl plugins unlink [PLUGIN]`](#ctxl-plugins-unlink-plugin)
|
|
51
50
|
* [`ctxl plugins update`](#ctxl-plugins-update)
|
|
51
|
+
* [`ctxl records`](#ctxl-records)
|
|
52
52
|
* [`ctxl records add [URI]`](#ctxl-records-add-uri)
|
|
53
|
+
* [`ctxl records create [URI]`](#ctxl-records-create-uri)
|
|
53
54
|
* [`ctxl records delete [URI]`](#ctxl-records-delete-uri)
|
|
54
55
|
* [`ctxl records get [URI]`](#ctxl-records-get-uri)
|
|
56
|
+
* [`ctxl records import [URI]`](#ctxl-records-import-uri)
|
|
55
57
|
* [`ctxl records list [URI]`](#ctxl-records-list-uri)
|
|
56
58
|
* [`ctxl records query [URI]`](#ctxl-records-query-uri)
|
|
57
59
|
* [`ctxl records replace [URI]`](#ctxl-records-replace-uri)
|
|
58
60
|
|
|
61
|
+
## `ctxl config`
|
|
62
|
+
|
|
63
|
+
manage configs
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
USAGE
|
|
67
|
+
$ ctxl config
|
|
68
|
+
|
|
69
|
+
DESCRIPTION
|
|
70
|
+
manage configs
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
_See code: [src/commands/config/index.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.7/src/commands/config/index.ts)_
|
|
74
|
+
|
|
59
75
|
## `ctxl config add CONFIG-ID`
|
|
60
76
|
|
|
61
77
|
add a new config
|
|
@@ -79,7 +95,7 @@ EXAMPLES
|
|
|
79
95
|
$ ctxl config add some-config-id --tenant-id my-tenant
|
|
80
96
|
```
|
|
81
97
|
|
|
82
|
-
_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)_
|
|
83
99
|
|
|
84
100
|
## `ctxl config current`
|
|
85
101
|
|
|
@@ -99,7 +115,7 @@ EXAMPLES
|
|
|
99
115
|
$ ctxl config current
|
|
100
116
|
```
|
|
101
117
|
|
|
102
|
-
_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)_
|
|
103
119
|
|
|
104
120
|
## `ctxl config delete CONFIG-ID`
|
|
105
121
|
|
|
@@ -119,7 +135,7 @@ EXAMPLES
|
|
|
119
135
|
$ ctxl config delete some-config-id
|
|
120
136
|
```
|
|
121
137
|
|
|
122
|
-
_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)_
|
|
123
139
|
|
|
124
140
|
## `ctxl config get [CONFIG-ID]`
|
|
125
141
|
|
|
@@ -144,7 +160,7 @@ EXAMPLES
|
|
|
144
160
|
$ ctxl config get some-config-id
|
|
145
161
|
```
|
|
146
162
|
|
|
147
|
-
_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)_
|
|
148
164
|
|
|
149
165
|
## `ctxl config list`
|
|
150
166
|
|
|
@@ -164,7 +180,7 @@ EXAMPLES
|
|
|
164
180
|
$ ctxl config list
|
|
165
181
|
```
|
|
166
182
|
|
|
167
|
-
_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)_
|
|
168
184
|
|
|
169
185
|
## `ctxl config login`
|
|
170
186
|
|
|
@@ -181,7 +197,7 @@ EXAMPLES
|
|
|
181
197
|
$ ctxl config login
|
|
182
198
|
```
|
|
183
199
|
|
|
184
|
-
_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)_
|
|
185
201
|
|
|
186
202
|
## `ctxl config use CONFIG-ID`
|
|
187
203
|
|
|
@@ -201,38 +217,7 @@ EXAMPLES
|
|
|
201
217
|
$ ctxl config use some-config-id
|
|
202
218
|
```
|
|
203
219
|
|
|
204
|
-
_See code: [src/commands/config/use.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.
|
|
205
|
-
|
|
206
|
-
## `ctxl create [URI]`
|
|
207
|
-
|
|
208
|
-
create record(s)
|
|
209
|
-
|
|
210
|
-
```
|
|
211
|
-
USAGE
|
|
212
|
-
$ ctxl create [URI] [-C <value>] [-i <value>] [-T <value>]
|
|
213
|
-
|
|
214
|
-
ARGUMENTS
|
|
215
|
-
[URI] uri of type
|
|
216
|
-
|
|
217
|
-
FLAGS
|
|
218
|
-
-T, --type=<value> type
|
|
219
|
-
-i, --input-file=<value> [default: -] file to read. can read stdin if value is '-'
|
|
220
|
-
|
|
221
|
-
GLOBAL FLAGS
|
|
222
|
-
-C, --config-id=<value> Specify config id to use for call.
|
|
223
|
-
|
|
224
|
-
DESCRIPTION
|
|
225
|
-
create record(s)
|
|
226
|
-
|
|
227
|
-
ALIASES
|
|
228
|
-
$ ctxl create
|
|
229
|
-
$ ctxl import
|
|
230
|
-
|
|
231
|
-
EXAMPLES
|
|
232
|
-
$ ctxl create native-object:my-type
|
|
233
|
-
|
|
234
|
-
$ ctxl create --type my-type --input-file records.json
|
|
235
|
-
```
|
|
220
|
+
_See code: [src/commands/config/use.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.7/src/commands/config/use.ts)_
|
|
236
221
|
|
|
237
222
|
## `ctxl help [COMMAND]`
|
|
238
223
|
|
|
@@ -254,37 +239,6 @@ DESCRIPTION
|
|
|
254
239
|
|
|
255
240
|
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.36/src/commands/help.ts)_
|
|
256
241
|
|
|
257
|
-
## `ctxl import [URI]`
|
|
258
|
-
|
|
259
|
-
create record(s)
|
|
260
|
-
|
|
261
|
-
```
|
|
262
|
-
USAGE
|
|
263
|
-
$ ctxl import [URI] [-C <value>] [-i <value>] [-T <value>]
|
|
264
|
-
|
|
265
|
-
ARGUMENTS
|
|
266
|
-
[URI] uri of type
|
|
267
|
-
|
|
268
|
-
FLAGS
|
|
269
|
-
-T, --type=<value> type
|
|
270
|
-
-i, --input-file=<value> [default: -] file to read. can read stdin if value is '-'
|
|
271
|
-
|
|
272
|
-
GLOBAL FLAGS
|
|
273
|
-
-C, --config-id=<value> Specify config id to use for call.
|
|
274
|
-
|
|
275
|
-
DESCRIPTION
|
|
276
|
-
create record(s)
|
|
277
|
-
|
|
278
|
-
ALIASES
|
|
279
|
-
$ ctxl create
|
|
280
|
-
$ ctxl import
|
|
281
|
-
|
|
282
|
-
EXAMPLES
|
|
283
|
-
$ ctxl import native-object:my-type
|
|
284
|
-
|
|
285
|
-
$ ctxl import --type my-type --input-file records.json
|
|
286
|
-
```
|
|
287
|
-
|
|
288
242
|
## `ctxl plugins`
|
|
289
243
|
|
|
290
244
|
List installed plugins.
|
|
@@ -575,6 +529,20 @@ DESCRIPTION
|
|
|
575
529
|
|
|
576
530
|
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.54/src/commands/plugins/update.ts)_
|
|
577
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
|
+
|
|
578
546
|
## `ctxl records add [URI]`
|
|
579
547
|
|
|
580
548
|
create record(s)
|
|
@@ -597,8 +565,8 @@ DESCRIPTION
|
|
|
597
565
|
create record(s)
|
|
598
566
|
|
|
599
567
|
ALIASES
|
|
600
|
-
$ ctxl create
|
|
601
|
-
$ ctxl import
|
|
568
|
+
$ ctxl records create
|
|
569
|
+
$ ctxl records import
|
|
602
570
|
|
|
603
571
|
EXAMPLES
|
|
604
572
|
$ ctxl records add native-object:my-type
|
|
@@ -606,7 +574,38 @@ EXAMPLES
|
|
|
606
574
|
$ ctxl records add --type my-type --input-file records.json
|
|
607
575
|
```
|
|
608
576
|
|
|
609
|
-
_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
|
+
```
|
|
610
609
|
|
|
611
610
|
## `ctxl records delete [URI]`
|
|
612
611
|
|
|
@@ -641,7 +640,7 @@ EXAMPLES
|
|
|
641
640
|
$ ctxl records delete --type my-type --id instance-1 --id instance-2
|
|
642
641
|
```
|
|
643
642
|
|
|
644
|
-
_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)_
|
|
645
644
|
|
|
646
645
|
## `ctxl records get [URI]`
|
|
647
646
|
|
|
@@ -676,7 +675,38 @@ EXAMPLES
|
|
|
676
675
|
$ ctxl records get --type my-type --id instance-1 --id instance-2
|
|
677
676
|
```
|
|
678
677
|
|
|
679
|
-
_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
|
+
```
|
|
680
710
|
|
|
681
711
|
## `ctxl records list [URI]`
|
|
682
712
|
|
|
@@ -719,7 +749,7 @@ EXAMPLES
|
|
|
719
749
|
$ ctxl records list --type my-type -s field1=value1 -s field2=value2 --include-total
|
|
720
750
|
```
|
|
721
751
|
|
|
722
|
-
_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)_
|
|
723
753
|
|
|
724
754
|
## `ctxl records query [URI]`
|
|
725
755
|
|
|
@@ -759,7 +789,7 @@ EXAMPLES
|
|
|
759
789
|
$ ctxl records query --type my-type --include-total --query-file query.json
|
|
760
790
|
```
|
|
761
791
|
|
|
762
|
-
_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)_
|
|
763
793
|
|
|
764
794
|
## `ctxl records replace [URI]`
|
|
765
795
|
|
|
@@ -791,5 +821,5 @@ EXAMPLES
|
|
|
791
821
|
$ ctxl records replace --type my-type --id instance-1 --input-file record.json
|
|
792
822
|
```
|
|
793
823
|
|
|
794
|
-
_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)_
|
|
795
825
|
<!-- commandsstop -->
|
|
@@ -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 { CleanConfig } from "../../models/user-config.js";
|
|
2
1
|
import { BaseConfigCommand } from "../../base.js";
|
|
2
|
+
import { CleanConfig } from "../../models/user-config.js";
|
|
3
3
|
export default class ConfigCurrent extends BaseConfigCommand<typeof ConfigCurrent> {
|
|
4
4
|
static args: {};
|
|
5
5
|
static description: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Args } from "@oclif/core";
|
|
2
|
-
import { UrlSafeId } from "../../models/url-safe-id.js";
|
|
3
2
|
import { BaseConfigCommand } from "../../base.js";
|
|
3
|
+
import { UrlSafeId } from "../../models/url-safe-id.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 { CleanConfig } from "../../models/user-config.js";
|
|
2
1
|
import { BaseConfigCommand } from "../../base.js";
|
|
2
|
+
import { CleanConfig } from "../../models/user-config.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 { UrlSafeId } from "../../models/url-safe-id.js";
|
|
4
3
|
import { BaseConfigCommand } from "../../base.js";
|
|
4
|
+
import { UrlSafeId } from "../../models/url-safe-id.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 { CleanConfig } from "../../models/user-config.js";
|
|
2
1
|
import { BaseConfigCommand } from "../../base.js";
|
|
2
|
+
import { CleanConfig } from "../../models/user-config.js";
|
|
3
3
|
export default class ConfigList extends BaseConfigCommand<typeof ConfigList> {
|
|
4
4
|
static args: {};
|
|
5
5
|
static description: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { codeExchange, getUserProfile } from "../../utils/auth.js";
|
|
2
1
|
import { BaseConfigCommand } from "../../base.js";
|
|
2
|
+
import { codeExchange, getUserProfile } from "../../utils/auth.js";
|
|
3
3
|
export default class ConfigLogin extends BaseConfigCommand {
|
|
4
4
|
static args = {};
|
|
5
5
|
static description = "login using the current config";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Args } from "@oclif/core";
|
|
2
|
-
import { UrlSafeId } from "../../models/url-safe-id.js";
|
|
3
2
|
import { BaseConfigCommand } from "../../base.js";
|
|
3
|
+
import { UrlSafeId } from "../../models/url-safe-id.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,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,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,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,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
|
@@ -153,6 +153,28 @@
|
|
|
153
153
|
"get.js"
|
|
154
154
|
]
|
|
155
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
|
+
},
|
|
156
178
|
"config:list": {
|
|
157
179
|
"aliases": [],
|
|
158
180
|
"args": {},
|
|
@@ -241,8 +263,8 @@
|
|
|
241
263
|
},
|
|
242
264
|
"records:add": {
|
|
243
265
|
"aliases": [
|
|
244
|
-
"create",
|
|
245
|
-
"import"
|
|
266
|
+
"records:create",
|
|
267
|
+
"records:import"
|
|
246
268
|
],
|
|
247
269
|
"args": {
|
|
248
270
|
"uri": {
|
|
@@ -417,6 +439,28 @@
|
|
|
417
439
|
"get.js"
|
|
418
440
|
]
|
|
419
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
|
+
},
|
|
420
464
|
"records:list": {
|
|
421
465
|
"aliases": [],
|
|
422
466
|
"args": {
|
|
@@ -709,5 +753,5 @@
|
|
|
709
753
|
]
|
|
710
754
|
}
|
|
711
755
|
},
|
|
712
|
-
"version": "0.1.
|
|
756
|
+
"version": "0.1.7"
|
|
713
757
|
}
|