@gaia-ai/addon-dropsh 0.13.1 → 0.14.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 (2) hide show
  1. package/dist/src/index.js +23 -4
  2. package/package.json +2 -2
package/dist/src/index.js CHANGED
@@ -7,6 +7,7 @@ export function dropshConfigHint(resolvedPath) {
7
7
  function invocation(argv) {
8
8
  const forwarded = [];
9
9
  let explicit;
10
+ let connection;
10
11
  let format;
11
12
  let yes = false;
12
13
  let profile;
@@ -17,12 +18,15 @@ function invocation(argv) {
17
18
  continue;
18
19
  }
19
20
  if (token === '--config' ||
21
+ token === '--connection' ||
20
22
  token === '--format' ||
21
23
  token === '--auth-profile') {
22
24
  const value = argv[i + 1];
23
25
  if (value !== undefined) {
24
26
  if (token === '--config')
25
27
  explicit = value;
28
+ else if (token === '--connection')
29
+ connection = value;
26
30
  else if (token === '--format')
27
31
  format = value;
28
32
  else
@@ -34,15 +38,29 @@ function invocation(argv) {
34
38
  }
35
39
  if (token.startsWith('--config='))
36
40
  explicit = token.slice(9);
41
+ if (token.startsWith('--connection='))
42
+ connection = token.slice(13);
37
43
  if (token.startsWith('--format='))
38
44
  format = token.slice(9);
39
45
  forwarded.push(token);
40
46
  }
41
47
  // Global options can appear late, after the command's positional arguments.
42
- const positional = forwarded.filter((token, i) => !['--config', '--format', '--auth-profile', '--view-mode'].includes(token) &&
43
- !/^--(?:config|format|auth-profile|view-mode)=/.test(token) &&
44
- !['--config', '--format', '--auth-profile', '--view-mode'].includes(forwarded[i - 1] ?? ''));
45
- return { forwarded, explicit, format, yes, profile, positional };
48
+ const positional = forwarded.filter((token, i) => ![
49
+ '--config',
50
+ '--connection',
51
+ '--format',
52
+ '--auth-profile',
53
+ '--view-mode',
54
+ ].includes(token) &&
55
+ !/^--(?:config|connection|format|auth-profile|view-mode)=/.test(token) &&
56
+ ![
57
+ '--config',
58
+ '--connection',
59
+ '--format',
60
+ '--auth-profile',
61
+ '--view-mode',
62
+ ].includes(forwarded[i - 1] ?? ''));
63
+ return { forwarded, explicit, connection, format, yes, profile, positional };
46
64
  }
47
65
  /** Build the actual plugin registrations after the final connection is ready. */
48
66
  export async function dispatchGaiaDropsh(host, argv, options = {}) {
@@ -50,6 +68,7 @@ export async function dispatchGaiaDropsh(host, argv, options = {}) {
50
68
  const opts = {
51
69
  ...options,
52
70
  ...(args.explicit ? { explicit: args.explicit } : {}),
71
+ ...(args.connection ? { connection: args.connection } : {}),
53
72
  ...(args.format ? { format: args.format } : {}),
54
73
  yes: options.yes || args.yes,
55
74
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gaia-ai/addon-dropsh",
3
- "version": "0.13.1",
3
+ "version": "0.14.0",
4
4
  "description": "GAIA dropsh command plugin: the `gaia dropsh` JSON:API shell bound to the split connection config.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -26,6 +26,6 @@
26
26
  "dropsh": "^0.6.1"
27
27
  },
28
28
  "peerDependencies": {
29
- "@gaia-ai/core": "^0.13.1"
29
+ "@gaia-ai/core": "^0.14.0"
30
30
  }
31
31
  }