@contextual-io/cli 0.1.5 → 0.1.6

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 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.5 linux-x64 node-v25.2.1
23
+ @contextual-io/cli/0.1.6 linux-x64 node-v25.2.1
24
24
  $ ctxl --help [COMMAND]
25
25
  USAGE
26
26
  $ ctxl COMMAND
@@ -29,7 +29,6 @@ USAGE
29
29
  <!-- usagestop -->
30
30
  # Commands
31
31
  <!-- commands -->
32
- * [`ctxl base`](#ctxl-base)
33
32
  * [`ctxl config add CONFIG-ID`](#ctxl-config-add-config-id)
34
33
  * [`ctxl config current`](#ctxl-config-current)
35
34
  * [`ctxl config delete CONFIG-ID`](#ctxl-config-delete-config-id)
@@ -57,18 +56,6 @@ USAGE
57
56
  * [`ctxl records query [URI]`](#ctxl-records-query-uri)
58
57
  * [`ctxl records replace [URI]`](#ctxl-records-replace-uri)
59
58
 
60
- ## `ctxl base`
61
-
62
- ```
63
- USAGE
64
- $ ctxl base [-C <value>]
65
-
66
- GLOBAL FLAGS
67
- -C, --config-id=<value> Specify config id to use for call.
68
- ```
69
-
70
- _See code: [src/commands/base.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.5/src/commands/base.ts)_
71
-
72
59
  ## `ctxl config add CONFIG-ID`
73
60
 
74
61
  add a new config
@@ -92,7 +79,7 @@ EXAMPLES
92
79
  $ ctxl config add some-config-id --tenant-id my-tenant
93
80
  ```
94
81
 
95
- _See code: [src/commands/config/add.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.5/src/commands/config/add.ts)_
82
+ _See code: [src/commands/config/add.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.6/src/commands/config/add.ts)_
96
83
 
97
84
  ## `ctxl config current`
98
85
 
@@ -112,7 +99,7 @@ EXAMPLES
112
99
  $ ctxl config current
113
100
  ```
114
101
 
115
- _See code: [src/commands/config/current.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.5/src/commands/config/current.ts)_
102
+ _See code: [src/commands/config/current.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.6/src/commands/config/current.ts)_
116
103
 
117
104
  ## `ctxl config delete CONFIG-ID`
118
105
 
@@ -132,7 +119,7 @@ EXAMPLES
132
119
  $ ctxl config delete some-config-id
133
120
  ```
134
121
 
135
- _See code: [src/commands/config/delete.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.5/src/commands/config/delete.ts)_
122
+ _See code: [src/commands/config/delete.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.6/src/commands/config/delete.ts)_
136
123
 
137
124
  ## `ctxl config get [CONFIG-ID]`
138
125
 
@@ -157,7 +144,7 @@ EXAMPLES
157
144
  $ ctxl config get some-config-id
158
145
  ```
159
146
 
160
- _See code: [src/commands/config/get.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.5/src/commands/config/get.ts)_
147
+ _See code: [src/commands/config/get.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.6/src/commands/config/get.ts)_
161
148
 
162
149
  ## `ctxl config list`
163
150
 
@@ -177,7 +164,7 @@ EXAMPLES
177
164
  $ ctxl config list
178
165
  ```
179
166
 
180
- _See code: [src/commands/config/list.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.5/src/commands/config/list.ts)_
167
+ _See code: [src/commands/config/list.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.6/src/commands/config/list.ts)_
181
168
 
182
169
  ## `ctxl config login`
183
170
 
@@ -194,7 +181,7 @@ EXAMPLES
194
181
  $ ctxl config login
195
182
  ```
196
183
 
197
- _See code: [src/commands/config/login.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.5/src/commands/config/login.ts)_
184
+ _See code: [src/commands/config/login.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.6/src/commands/config/login.ts)_
198
185
 
199
186
  ## `ctxl config use CONFIG-ID`
200
187
 
@@ -214,7 +201,7 @@ EXAMPLES
214
201
  $ ctxl config use some-config-id
215
202
  ```
216
203
 
217
- _See code: [src/commands/config/use.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.5/src/commands/config/use.ts)_
204
+ _See code: [src/commands/config/use.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.6/src/commands/config/use.ts)_
218
205
 
219
206
  ## `ctxl create [URI]`
220
207
 
@@ -619,7 +606,7 @@ EXAMPLES
619
606
  $ ctxl records add --type my-type --input-file records.json
620
607
  ```
621
608
 
622
- _See code: [src/commands/records/add.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.5/src/commands/records/add.ts)_
609
+ _See code: [src/commands/records/add.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.6/src/commands/records/add.ts)_
623
610
 
624
611
  ## `ctxl records delete [URI]`
625
612
 
@@ -654,7 +641,7 @@ EXAMPLES
654
641
  $ ctxl records delete --type my-type --id instance-1 --id instance-2
655
642
  ```
656
643
 
657
- _See code: [src/commands/records/delete.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.5/src/commands/records/delete.ts)_
644
+ _See code: [src/commands/records/delete.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.6/src/commands/records/delete.ts)_
658
645
 
659
646
  ## `ctxl records get [URI]`
660
647
 
@@ -689,7 +676,7 @@ EXAMPLES
689
676
  $ ctxl records get --type my-type --id instance-1 --id instance-2
690
677
  ```
691
678
 
692
- _See code: [src/commands/records/get.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.5/src/commands/records/get.ts)_
679
+ _See code: [src/commands/records/get.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.6/src/commands/records/get.ts)_
693
680
 
694
681
  ## `ctxl records list [URI]`
695
682
 
@@ -732,7 +719,7 @@ EXAMPLES
732
719
  $ ctxl records list --type my-type -s field1=value1 -s field2=value2 --include-total
733
720
  ```
734
721
 
735
- _See code: [src/commands/records/list.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.5/src/commands/records/list.ts)_
722
+ _See code: [src/commands/records/list.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.6/src/commands/records/list.ts)_
736
723
 
737
724
  ## `ctxl records query [URI]`
738
725
 
@@ -772,7 +759,7 @@ EXAMPLES
772
759
  $ ctxl records query --type my-type --include-total --query-file query.json
773
760
  ```
774
761
 
775
- _See code: [src/commands/records/query.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.5/src/commands/records/query.ts)_
762
+ _See code: [src/commands/records/query.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.6/src/commands/records/query.ts)_
776
763
 
777
764
  ## `ctxl records replace [URI]`
778
765
 
@@ -804,5 +791,5 @@ EXAMPLES
804
791
  $ ctxl records replace --type my-type --id instance-1 --input-file record.json
805
792
  ```
806
793
 
807
- _See code: [src/commands/records/replace.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.5/src/commands/records/replace.ts)_
794
+ _See code: [src/commands/records/replace.ts](https://github.com/ContextualIO/contextual-cli/blob/v0.1.6/src/commands/records/replace.ts)_
808
795
  <!-- commandsstop -->
@@ -1,7 +1,7 @@
1
1
  import { Command, Interfaces } from "@oclif/core";
2
2
  import fetch from "cross-fetch";
3
- import { UrlSafeId } from "../models/url-safe-id.js";
4
- import { CleanConfig, Config, UserConfig } from "../models/user-config.js";
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 "../models/errors.js";
6
- import { UserConfig } from "../models/user-config.js";
7
- import { rehydrateToken } from "../utils/auth.js";
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 "../base.js";
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>>;
@@ -2,7 +2,7 @@ import { Args, Flags } from "@oclif/core";
2
2
  import { Silo } from "../../models/silo.js";
3
3
  import { UrlSafeId } from "../../models/url-safe-id.js";
4
4
  import { getCliConfiguration } from "../../utils/cli-configuration.js";
5
- import { BaseConfigCommand } from "../base.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
1
  import { CleanConfig } from "../../models/user-config.js";
2
- import { BaseConfigCommand } from "../base.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 "../base.js";
1
+ import { BaseConfigCommand } from "../../base.js";
2
2
  export default class ConfigCurrent extends BaseConfigCommand {
3
3
  static args = {};
4
4
  static description = "get the current config";
@@ -1,4 +1,4 @@
1
- import { BaseConfigCommand } from "../base.js";
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
2
  import { UrlSafeId } from "../../models/url-safe-id.js";
3
- import { BaseConfigCommand } from "../base.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
1
  import { CleanConfig } from "../../models/user-config.js";
2
- import { BaseConfigCommand } from "../base.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
3
  import { UrlSafeId } from "../../models/url-safe-id.js";
4
- import { BaseConfigCommand } from "../base.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" }),
@@ -1,5 +1,5 @@
1
1
  import { CleanConfig } from "../../models/user-config.js";
2
- import { BaseConfigCommand } from "../base.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 "../base.js";
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,4 +1,4 @@
1
- import { BaseConfigCommand } from "../base.js";
1
+ import { BaseConfigCommand } from "../../base.js";
2
2
  export default class ConfigLogin extends BaseConfigCommand<typeof ConfigLogin> {
3
3
  static args: {};
4
4
  static description: string;
@@ -1,5 +1,5 @@
1
1
  import { codeExchange, getUserProfile } from "../../utils/auth.js";
2
- import { BaseConfigCommand } from "../base.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 "../base.js";
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
2
  import { UrlSafeId } from "../../models/url-safe-id.js";
3
- import { BaseConfigCommand } from "../base.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 }),
@@ -1,4 +1,4 @@
1
- import { BaseCommand } from "../base.js";
1
+ import { BaseCommand } from "../../base.js";
2
2
  export default class RecordsAdd extends BaseCommand<typeof RecordsAdd> {
3
3
  static aliases: string[];
4
4
  static args: {
@@ -5,7 +5,7 @@ import jsonl from "stream-json/jsonl/Parser.js";
5
5
  import { parseUri } from "../../models/uri.js";
6
6
  import { getNativeObjectApiEndpoint } from "../../utils/endpoints.js";
7
7
  import { mapStream, readStreamToEnd } from "../../utils/stream.js";
8
- import { BaseCommand } from "../base.js";
8
+ import { BaseCommand } from "../../base.js";
9
9
  export default class RecordsAdd extends BaseCommand {
10
10
  static aliases = ["create", "import"];
11
11
  static args = {
@@ -1,4 +1,4 @@
1
- import { BaseCommand } from "../base.js";
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
2
  import { parseUri } from "../../models/uri.js";
3
3
  import { getNativeObjectApiEndpoint } from "../../utils/endpoints.js";
4
- import { BaseCommand } from "../base.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,4 +1,4 @@
1
- import { BaseCommand } from "../base.js";
1
+ import { BaseCommand } from "../../base.js";
2
2
  export default class RecordsGet extends BaseCommand<typeof RecordsGet> {
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
2
  import { parseUri } from "../../models/uri.js";
3
3
  import { getNativeObjectApiEndpoint } from "../../utils/endpoints.js";
4
- import { BaseCommand } from "../base.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" }),
@@ -1,4 +1,4 @@
1
- import { BaseCommand } from "../base.js";
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>>;
@@ -3,7 +3,7 @@ import { Args, Flags } from "@oclif/core";
3
3
  import { parseUri } from "../../models/uri.js";
4
4
  import { getNativeObjectApiEndpoint } from "../../utils/endpoints.js";
5
5
  import { endTime, startTime } from "../../utils/time.js";
6
- import { BaseCommand } from "../base.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 "../base.js";
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>>;
@@ -5,7 +5,7 @@ import { parseUri } from "../../models/uri.js";
5
5
  import { getNativeObjectApiEndpoint } from "../../utils/endpoints.js";
6
6
  import { readStreamToEnd } from "../../utils/stream.js";
7
7
  import { endTime, startTime } from "../../utils/time.js";
8
- import { BaseCommand } from "../base.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 "../base.js";
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>>;
@@ -4,7 +4,7 @@ import path from "node:path";
4
4
  import { parseUri } from "../../models/uri.js";
5
5
  import { getNativeObjectApiEndpoint } from "../../utils/endpoints.js";
6
6
  import { readStreamToEnd } from "../../utils/stream.js";
7
- import { BaseCommand } from "../base.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" }),
@@ -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": {
@@ -738,5 +709,5 @@
738
709
  ]
739
710
  }
740
711
  },
741
- "version": "0.1.5"
712
+ "version": "0.1.6"
742
713
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@contextual-io/cli",
3
3
  "description": "Contextual CLI",
4
- "version": "0.1.5",
4
+ "version": "0.1.6",
5
5
  "author": "Nasser Oloumi",
6
6
  "bin": {
7
7
  "ctxl": "./bin/run.js"