@vltpkg/cli-sdk 0.0.0-10
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/LICENSE +15 -0
- package/README.md +23 -0
- package/dist/esm/commands/cache.d.ts +65 -0
- package/dist/esm/commands/cache.d.ts.map +1 -0
- package/dist/esm/commands/cache.js +256 -0
- package/dist/esm/commands/cache.js.map +1 -0
- package/dist/esm/commands/config.d.ts +5 -0
- package/dist/esm/commands/config.d.ts.map +1 -0
- package/dist/esm/commands/config.js +153 -0
- package/dist/esm/commands/config.js.map +1 -0
- package/dist/esm/commands/exec-cache.d.ts +49 -0
- package/dist/esm/commands/exec-cache.d.ts.map +1 -0
- package/dist/esm/commands/exec-cache.js +125 -0
- package/dist/esm/commands/exec-cache.js.map +1 -0
- package/dist/esm/commands/exec-local.d.ts +6 -0
- package/dist/esm/commands/exec-local.d.ts.map +1 -0
- package/dist/esm/commands/exec-local.js +24 -0
- package/dist/esm/commands/exec-local.js.map +1 -0
- package/dist/esm/commands/exec.d.ts +9 -0
- package/dist/esm/commands/exec.d.ts.map +1 -0
- package/dist/esm/commands/exec.js +78 -0
- package/dist/esm/commands/exec.js.map +1 -0
- package/dist/esm/commands/gui.d.ts +6 -0
- package/dist/esm/commands/gui.d.ts.map +1 -0
- package/dist/esm/commands/gui.js +13 -0
- package/dist/esm/commands/gui.js.map +1 -0
- package/dist/esm/commands/help.d.ts +4 -0
- package/dist/esm/commands/help.d.ts.map +1 -0
- package/dist/esm/commands/help.js +10 -0
- package/dist/esm/commands/help.js.map +1 -0
- package/dist/esm/commands/init.d.ts +8 -0
- package/dist/esm/commands/init.d.ts.map +1 -0
- package/dist/esm/commands/init.js +25 -0
- package/dist/esm/commands/init.js.map +1 -0
- package/dist/esm/commands/install/reporter.d.ts +10 -0
- package/dist/esm/commands/install/reporter.d.ts.map +1 -0
- package/dist/esm/commands/install/reporter.js +67 -0
- package/dist/esm/commands/install/reporter.js.map +1 -0
- package/dist/esm/commands/install.d.ts +10 -0
- package/dist/esm/commands/install.d.ts.map +1 -0
- package/dist/esm/commands/install.js +21 -0
- package/dist/esm/commands/install.js.map +1 -0
- package/dist/esm/commands/list.d.ts +15 -0
- package/dist/esm/commands/list.d.ts.map +1 -0
- package/dist/esm/commands/list.js +109 -0
- package/dist/esm/commands/list.js.map +1 -0
- package/dist/esm/commands/login.d.ts +4 -0
- package/dist/esm/commands/login.d.ts.map +1 -0
- package/dist/esm/commands/login.js +13 -0
- package/dist/esm/commands/login.js.map +1 -0
- package/dist/esm/commands/logout.d.ts +4 -0
- package/dist/esm/commands/logout.d.ts.map +1 -0
- package/dist/esm/commands/logout.js +13 -0
- package/dist/esm/commands/logout.js.map +1 -0
- package/dist/esm/commands/pkg.d.ts +7 -0
- package/dist/esm/commands/pkg.d.ts.map +1 -0
- package/dist/esm/commands/pkg.js +123 -0
- package/dist/esm/commands/pkg.js.map +1 -0
- package/dist/esm/commands/query.d.ts +16 -0
- package/dist/esm/commands/query.d.ts.map +1 -0
- package/dist/esm/commands/query.js +124 -0
- package/dist/esm/commands/query.js.map +1 -0
- package/dist/esm/commands/run-exec.d.ts +6 -0
- package/dist/esm/commands/run-exec.d.ts.map +1 -0
- package/dist/esm/commands/run-exec.js +14 -0
- package/dist/esm/commands/run-exec.js.map +1 -0
- package/dist/esm/commands/run.d.ts +6 -0
- package/dist/esm/commands/run.d.ts.map +1 -0
- package/dist/esm/commands/run.js +37 -0
- package/dist/esm/commands/run.js.map +1 -0
- package/dist/esm/commands/token.d.ts +4 -0
- package/dist/esm/commands/token.d.ts.map +1 -0
- package/dist/esm/commands/token.js +30 -0
- package/dist/esm/commands/token.js.map +1 -0
- package/dist/esm/commands/uninstall.d.ts +10 -0
- package/dist/esm/commands/uninstall.d.ts.map +1 -0
- package/dist/esm/commands/uninstall.js +21 -0
- package/dist/esm/commands/uninstall.js.map +1 -0
- package/dist/esm/commands/whoami.d.ts +13 -0
- package/dist/esm/commands/whoami.d.ts.map +1 -0
- package/dist/esm/commands/whoami.js +19 -0
- package/dist/esm/commands/whoami.js.map +1 -0
- package/dist/esm/config/definition.d.ts +306 -0
- package/dist/esm/config/definition.d.ts.map +1 -0
- package/dist/esm/config/definition.js +517 -0
- package/dist/esm/config/definition.js.map +1 -0
- package/dist/esm/config/index.d.ts +206 -0
- package/dist/esm/config/index.d.ts.map +1 -0
- package/dist/esm/config/index.js +489 -0
- package/dist/esm/config/index.js.map +1 -0
- package/dist/esm/config/merge.d.ts +2 -0
- package/dist/esm/config/merge.d.ts.map +1 -0
- package/dist/esm/config/merge.js +23 -0
- package/dist/esm/config/merge.js.map +1 -0
- package/dist/esm/config/usage.d.ts +19 -0
- package/dist/esm/config/usage.d.ts.map +1 -0
- package/dist/esm/config/usage.js +40 -0
- package/dist/esm/config/usage.js.map +1 -0
- package/dist/esm/exec-command.d.ts +51 -0
- package/dist/esm/exec-command.d.ts.map +1 -0
- package/dist/esm/exec-command.js +199 -0
- package/dist/esm/exec-command.js.map +1 -0
- package/dist/esm/index.d.ts +17 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +47 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/output.d.ts +21 -0
- package/dist/esm/output.d.ts.map +1 -0
- package/dist/esm/output.js +121 -0
- package/dist/esm/output.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/parse-add-remove-args.d.ts +22 -0
- package/dist/esm/parse-add-remove-args.d.ts.map +1 -0
- package/dist/esm/parse-add-remove-args.js +71 -0
- package/dist/esm/parse-add-remove-args.js.map +1 -0
- package/dist/esm/print-err.d.ts +7 -0
- package/dist/esm/print-err.d.ts.map +1 -0
- package/dist/esm/print-err.js +115 -0
- package/dist/esm/print-err.js.map +1 -0
- package/dist/esm/read-password.d.ts +8 -0
- package/dist/esm/read-password.d.ts.map +1 -0
- package/dist/esm/read-password.js +33 -0
- package/dist/esm/read-password.js.map +1 -0
- package/dist/esm/start-gui.d.ts +9 -0
- package/dist/esm/start-gui.d.ts.map +1 -0
- package/dist/esm/start-gui.js +40 -0
- package/dist/esm/start-gui.js.map +1 -0
- package/dist/esm/view.d.ts +30 -0
- package/dist/esm/view.d.ts.map +1 -0
- package/dist/esm/view.js +31 -0
- package/dist/esm/view.js.map +1 -0
- package/package.json +125 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { error } from '@vltpkg/error-cause';
|
|
2
|
+
import { deleteToken, setToken } from '@vltpkg/registry-client';
|
|
3
|
+
import { commandUsage } from "../config/usage.js";
|
|
4
|
+
import { readPassword } from "../read-password.js";
|
|
5
|
+
export const usage = () => commandUsage({
|
|
6
|
+
command: 'token',
|
|
7
|
+
usage: ['add', 'rm'],
|
|
8
|
+
description: `Explicitly add or remove tokens in the vlt keychain`,
|
|
9
|
+
});
|
|
10
|
+
export const command = async (conf) => {
|
|
11
|
+
const reg = new URL(conf.options.registry).origin;
|
|
12
|
+
switch (conf.positionals[0]) {
|
|
13
|
+
case 'add': {
|
|
14
|
+
await setToken(reg, `Bearer ${await readPassword('Paste bearer token: ')}`, conf.options.identity);
|
|
15
|
+
break;
|
|
16
|
+
}
|
|
17
|
+
case 'rm': {
|
|
18
|
+
await deleteToken(reg, conf.options.identity);
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
default: {
|
|
22
|
+
throw error('Invalid token subcommand', {
|
|
23
|
+
found: conf.positionals[0],
|
|
24
|
+
validOptions: ['add', 'rm'],
|
|
25
|
+
code: 'EUSAGE',
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=token.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token.js","sourceRoot":"","sources":["../../../src/commands/token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAGlD,MAAM,CAAC,MAAM,KAAK,GAAiB,GAAG,EAAE,CACtC,YAAY,CAAC;IACX,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC;IACpB,WAAW,EAAE,qDAAqD;CACnE,CAAC,CAAA;AAEJ,MAAM,CAAC,MAAM,OAAO,GAAoB,KAAK,EAAC,IAAI,EAAC,EAAE;IACnD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAA;IACjD,QAAQ,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5B,KAAK,KAAK,CAAC,CAAC,CAAC;YACX,MAAM,QAAQ,CACZ,GAAG,EACH,UAAU,MAAM,YAAY,CAAC,sBAAsB,CAAC,EAAE,EACtD,IAAI,CAAC,OAAO,CAAC,QAAQ,CACtB,CAAA;YACD,MAAK;QACP,CAAC;QAED,KAAK,IAAI,CAAC,CAAC,CAAC;YACV,MAAM,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;YAC7C,MAAK;QACP,CAAC;QAED,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,KAAK,CAAC,0BAA0B,EAAE;gBACtC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;gBAC1B,YAAY,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC;gBAC3B,IAAI,EAAE,QAAQ;aACf,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;AACH,CAAC,CAAA","sourcesContent":["import { error } from '@vltpkg/error-cause'\nimport { deleteToken, setToken } from '@vltpkg/registry-client'\nimport { commandUsage } from '../config/usage.ts'\nimport { readPassword } from '../read-password.ts'\nimport type { CommandFn, CommandUsage } from '../index.ts'\n\nexport const usage: CommandUsage = () =>\n commandUsage({\n command: 'token',\n usage: ['add', 'rm'],\n description: `Explicitly add or remove tokens in the vlt keychain`,\n })\n\nexport const command: CommandFn<void> = async conf => {\n const reg = new URL(conf.options.registry).origin\n switch (conf.positionals[0]) {\n case 'add': {\n await setToken(\n reg,\n `Bearer ${await readPassword('Paste bearer token: ')}`,\n conf.options.identity,\n )\n break\n }\n\n case 'rm': {\n await deleteToken(reg, conf.options.identity)\n break\n }\n\n default: {\n throw error('Invalid token subcommand', {\n found: conf.positionals[0],\n validOptions: ['add', 'rm'],\n code: 'EUSAGE',\n })\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Graph } from '@vltpkg/graph';
|
|
2
|
+
import type { CommandFn, CommandUsage } from '../index.ts';
|
|
3
|
+
import { InstallReporter } from './install/reporter.ts';
|
|
4
|
+
export declare const usage: CommandUsage;
|
|
5
|
+
export declare const views: {
|
|
6
|
+
readonly json: (g: Graph) => import("@vltpkg/graph").LockfileData;
|
|
7
|
+
readonly human: typeof InstallReporter;
|
|
8
|
+
};
|
|
9
|
+
export declare const command: CommandFn<Graph>;
|
|
10
|
+
//# sourceMappingURL=uninstall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/commands/uninstall.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAE1C,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAGvD,eAAO,MAAM,KAAK,EAAE,YAMhB,CAAA;AAEJ,eAAO,MAAM,KAAK;;;CAGe,CAAA;AAEjC,eAAO,MAAM,OAAO,EAAE,SAAS,CAAC,KAAK,CAKpC,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { uninstall } from '@vltpkg/graph';
|
|
2
|
+
import { commandUsage } from "../config/usage.js";
|
|
3
|
+
import { parseRemoveArgs } from "../parse-add-remove-args.js";
|
|
4
|
+
import { InstallReporter } from "./install/reporter.js";
|
|
5
|
+
export const usage = () => commandUsage({
|
|
6
|
+
command: 'uninstall',
|
|
7
|
+
usage: '[package ...]',
|
|
8
|
+
description: `The opposite of \`vlt install\`. Removes deps and updates
|
|
9
|
+
vlt-lock.json and package.json appropriately.`,
|
|
10
|
+
});
|
|
11
|
+
export const views = {
|
|
12
|
+
json: g => g.toJSON(),
|
|
13
|
+
human: InstallReporter,
|
|
14
|
+
};
|
|
15
|
+
export const command = async (conf) => {
|
|
16
|
+
const monorepo = conf.options.monorepo;
|
|
17
|
+
const { remove } = parseRemoveArgs(conf, monorepo);
|
|
18
|
+
const { graph } = await uninstall(conf.options, remove);
|
|
19
|
+
return graph;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=uninstall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../../src/commands/uninstall.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAGvD,MAAM,CAAC,MAAM,KAAK,GAAiB,GAAG,EAAE,CACtC,YAAY,CAAC;IACX,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE;gEAC+C;CAC7D,CAAC,CAAA;AAEJ,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE;IACrB,KAAK,EAAE,eAAe;CACS,CAAA;AAEjC,MAAM,CAAC,MAAM,OAAO,GAAqB,KAAK,EAAC,IAAI,EAAC,EAAE;IACpD,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAA;IACtC,MAAM,EAAE,MAAM,EAAE,GAAG,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;IAClD,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;IACvD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA","sourcesContent":["import { uninstall } from '@vltpkg/graph'\nimport type { Graph } from '@vltpkg/graph'\nimport { commandUsage } from '../config/usage.ts'\nimport type { CommandFn, CommandUsage } from '../index.ts'\nimport { parseRemoveArgs } from '../parse-add-remove-args.ts'\nimport { InstallReporter } from './install/reporter.ts'\nimport type { Views } from '../view.ts'\n\nexport const usage: CommandUsage = () =>\n commandUsage({\n command: 'uninstall',\n usage: '[package ...]',\n description: `The opposite of \\`vlt install\\`. Removes deps and updates\n vlt-lock.json and package.json appropriately.`,\n })\n\nexport const views = {\n json: g => g.toJSON(),\n human: InstallReporter,\n} as const satisfies Views<Graph>\n\nexport const command: CommandFn<Graph> = async conf => {\n const monorepo = conf.options.monorepo\n const { remove } = parseRemoveArgs(conf, monorepo)\n const { graph } = await uninstall(conf.options, remove)\n return graph\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { JSONField } from '@vltpkg/types';
|
|
2
|
+
import type { CommandFn, CommandUsage } from '../index.ts';
|
|
3
|
+
export declare const usage: CommandUsage;
|
|
4
|
+
type CommandResult = {
|
|
5
|
+
username?: JSONField;
|
|
6
|
+
};
|
|
7
|
+
export declare const views: {
|
|
8
|
+
readonly human: (r: CommandResult) => JSONField;
|
|
9
|
+
readonly json: (r: CommandResult) => CommandResult;
|
|
10
|
+
};
|
|
11
|
+
export declare const command: CommandFn<CommandResult>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=whoami.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whoami.d.ts","sourceRoot":"","sources":["../../../src/commands/whoami.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG1D,eAAO,MAAM,KAAK,EAAE,YAMhB,CAAA;AAEJ,KAAK,aAAa,GAAG;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,KAAK;;;CAGuB,CAAA;AAEzC,eAAO,MAAM,OAAO,EAAE,SAAS,CAAC,aAAa,CAQ5C,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RegistryClient } from '@vltpkg/registry-client';
|
|
2
|
+
import { commandUsage } from "../config/usage.js";
|
|
3
|
+
export const usage = () => commandUsage({
|
|
4
|
+
command: 'whoami',
|
|
5
|
+
usage: [''],
|
|
6
|
+
description: `Look up the username for the currently active token,
|
|
7
|
+
when logged into a registry.`,
|
|
8
|
+
});
|
|
9
|
+
export const views = {
|
|
10
|
+
human: r => r.username,
|
|
11
|
+
json: r => r,
|
|
12
|
+
};
|
|
13
|
+
export const command = async (conf) => {
|
|
14
|
+
const rc = new RegistryClient(conf.options);
|
|
15
|
+
const response = await rc.request(new URL('-/whoami', conf.options.registry), { useCache: false });
|
|
16
|
+
const { username } = response.json();
|
|
17
|
+
return { username };
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=whoami.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whoami.js","sourceRoot":"","sources":["../../../src/commands/whoami.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAIjD,MAAM,CAAC,MAAM,KAAK,GAAiB,GAAG,EAAE,CACtC,YAAY,CAAC;IACX,OAAO,EAAE,QAAQ;IACjB,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,WAAW,EAAE;+CAC8B;CAC5C,CAAC,CAAA;AAMJ,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;IACtB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;CAC2B,CAAA;AAEzC,MAAM,CAAC,MAAM,OAAO,GAA6B,KAAK,EAAC,IAAI,EAAC,EAAE;IAC5D,MAAM,EAAE,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC3C,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC,OAAO,CAC/B,IAAI,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAC1C,EAAE,QAAQ,EAAE,KAAK,EAAE,CACpB,CAAA;IACD,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAA;IACpC,OAAO,EAAE,QAAQ,EAAE,CAAA;AACrB,CAAC,CAAA","sourcesContent":["import { RegistryClient } from '@vltpkg/registry-client'\nimport type { JSONField } from '@vltpkg/types'\nimport { commandUsage } from '../config/usage.ts'\nimport type { CommandFn, CommandUsage } from '../index.ts'\nimport type { Views } from '../view.ts'\n\nexport const usage: CommandUsage = () =>\n commandUsage({\n command: 'whoami',\n usage: [''],\n description: `Look up the username for the currently active token,\n when logged into a registry.`,\n })\n\ntype CommandResult = {\n username?: JSONField\n}\n\nexport const views = {\n human: r => r.username,\n json: r => r,\n} as const satisfies Views<CommandResult>\n\nexport const command: CommandFn<CommandResult> = async conf => {\n const rc = new RegistryClient(conf.options)\n const response = await rc.request(\n new URL('-/whoami', conf.options.registry),\n { useCache: false },\n )\n const { username } = response.json()\n return { username }\n}\n"]}
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
export declare const defaultView: string;
|
|
2
|
+
/**
|
|
3
|
+
* Command aliases mapped to their canonical names
|
|
4
|
+
*/
|
|
5
|
+
export declare const commands: {
|
|
6
|
+
readonly i: "install";
|
|
7
|
+
readonly add: "install";
|
|
8
|
+
readonly rm: "uninstall";
|
|
9
|
+
readonly u: "uninstall";
|
|
10
|
+
readonly r: "run";
|
|
11
|
+
readonly 'run-script': "run";
|
|
12
|
+
readonly rx: "run-exec";
|
|
13
|
+
readonly x: "exec";
|
|
14
|
+
readonly xl: "exec-local";
|
|
15
|
+
readonly h: "help";
|
|
16
|
+
readonly '?': "help";
|
|
17
|
+
readonly conf: "config";
|
|
18
|
+
readonly ls: "list";
|
|
19
|
+
readonly xc: "exec-cache";
|
|
20
|
+
readonly cache: "cache";
|
|
21
|
+
readonly config: "config";
|
|
22
|
+
readonly exec: "exec";
|
|
23
|
+
readonly 'exec-local': "exec-local";
|
|
24
|
+
readonly gui: "gui";
|
|
25
|
+
readonly help: "help";
|
|
26
|
+
readonly init: "init";
|
|
27
|
+
readonly install: "install";
|
|
28
|
+
readonly login: "login";
|
|
29
|
+
readonly logout: "logout";
|
|
30
|
+
readonly list: "list";
|
|
31
|
+
readonly pkg: "pkg";
|
|
32
|
+
readonly query: "query";
|
|
33
|
+
readonly 'run-exec': "run-exec";
|
|
34
|
+
readonly run: "run";
|
|
35
|
+
readonly token: "token";
|
|
36
|
+
readonly uninstall: "uninstall";
|
|
37
|
+
readonly 'exec-cache': "exec-cache";
|
|
38
|
+
readonly whoami: "whoami";
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Canonical command names mapped to an array of its aliases
|
|
42
|
+
*/
|
|
43
|
+
export declare const commandAliases: Map<string, string[]>;
|
|
44
|
+
export type Commands = typeof commands;
|
|
45
|
+
export declare const getCommand: (s?: string) => Commands[keyof Commands] | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Fields that are parsed as a set of key=value pairs
|
|
48
|
+
*/
|
|
49
|
+
export declare const recordFields: readonly ["git-hosts", "registries", "git-host-archives", "scope-registries"];
|
|
50
|
+
export type RecordField = (typeof recordFields)[number];
|
|
51
|
+
export declare const isRecordField: (s: string) => s is RecordField;
|
|
52
|
+
export declare const definition: import("jackspeak").Jack<{
|
|
53
|
+
color: {
|
|
54
|
+
short: string;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
'no-color': {
|
|
58
|
+
short: string;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
} & {
|
|
62
|
+
color: import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
63
|
+
'no-color': import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
64
|
+
} & {
|
|
65
|
+
registry: {
|
|
66
|
+
hint: string;
|
|
67
|
+
default: string;
|
|
68
|
+
description: string;
|
|
69
|
+
};
|
|
70
|
+
} & {
|
|
71
|
+
registry: import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
72
|
+
} & {
|
|
73
|
+
registries: {
|
|
74
|
+
hint: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
'scope-registries': {
|
|
78
|
+
hint: string;
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
'git-hosts': {
|
|
82
|
+
hint: string;
|
|
83
|
+
short: string;
|
|
84
|
+
description: string;
|
|
85
|
+
};
|
|
86
|
+
'git-host-archives': {
|
|
87
|
+
hint: string;
|
|
88
|
+
short: string;
|
|
89
|
+
description: string;
|
|
90
|
+
};
|
|
91
|
+
} & {
|
|
92
|
+
registries: import("jackspeak").ConfigOption<"string", true, readonly string[] | undefined>;
|
|
93
|
+
'scope-registries': import("jackspeak").ConfigOption<"string", true, readonly string[] | undefined>;
|
|
94
|
+
'git-hosts': import("jackspeak").ConfigOption<"string", true, readonly string[] | undefined>;
|
|
95
|
+
'git-host-archives': import("jackspeak").ConfigOption<"string", true, readonly string[] | undefined>;
|
|
96
|
+
} & {
|
|
97
|
+
cache: {
|
|
98
|
+
hint: string;
|
|
99
|
+
description: string;
|
|
100
|
+
default: string;
|
|
101
|
+
};
|
|
102
|
+
tag: {
|
|
103
|
+
description: string;
|
|
104
|
+
default: string;
|
|
105
|
+
};
|
|
106
|
+
before: {
|
|
107
|
+
hint: string;
|
|
108
|
+
description: string;
|
|
109
|
+
};
|
|
110
|
+
os: {
|
|
111
|
+
description: string;
|
|
112
|
+
default: NodeJS.Platform;
|
|
113
|
+
};
|
|
114
|
+
arch: {
|
|
115
|
+
description: string;
|
|
116
|
+
default: NodeJS.Architecture;
|
|
117
|
+
};
|
|
118
|
+
'node-version': {
|
|
119
|
+
hint: string;
|
|
120
|
+
description: string;
|
|
121
|
+
default: string;
|
|
122
|
+
};
|
|
123
|
+
} & {
|
|
124
|
+
cache: import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
125
|
+
tag: import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
126
|
+
before: import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
127
|
+
os: import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
128
|
+
arch: import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
129
|
+
'node-version': import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
130
|
+
} & {
|
|
131
|
+
'git-shallow': {
|
|
132
|
+
description: string;
|
|
133
|
+
};
|
|
134
|
+
} & {
|
|
135
|
+
'git-shallow': import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
136
|
+
} & {
|
|
137
|
+
'fetch-retries': {
|
|
138
|
+
hint: string;
|
|
139
|
+
description: string;
|
|
140
|
+
default: number;
|
|
141
|
+
};
|
|
142
|
+
'fetch-retry-factor': {
|
|
143
|
+
hint: string;
|
|
144
|
+
description: string;
|
|
145
|
+
default: number;
|
|
146
|
+
};
|
|
147
|
+
'fetch-retry-mintimeout': {
|
|
148
|
+
hint: string;
|
|
149
|
+
description: string;
|
|
150
|
+
default: number;
|
|
151
|
+
};
|
|
152
|
+
'fetch-retry-maxtimeout': {
|
|
153
|
+
hint: string;
|
|
154
|
+
description: string;
|
|
155
|
+
default: number;
|
|
156
|
+
};
|
|
157
|
+
'stale-while-revalidate-factor': {
|
|
158
|
+
hint: string;
|
|
159
|
+
default: number;
|
|
160
|
+
description: string;
|
|
161
|
+
};
|
|
162
|
+
} & {
|
|
163
|
+
'fetch-retries': import("jackspeak").ConfigOption<"number", false, readonly number[] | undefined>;
|
|
164
|
+
'fetch-retry-factor': import("jackspeak").ConfigOption<"number", false, readonly number[] | undefined>;
|
|
165
|
+
'fetch-retry-mintimeout': import("jackspeak").ConfigOption<"number", false, readonly number[] | undefined>;
|
|
166
|
+
'fetch-retry-maxtimeout': import("jackspeak").ConfigOption<"number", false, readonly number[] | undefined>;
|
|
167
|
+
'stale-while-revalidate-factor': import("jackspeak").ConfigOption<"number", false, readonly number[] | undefined>;
|
|
168
|
+
} & {
|
|
169
|
+
identity: {
|
|
170
|
+
short: string;
|
|
171
|
+
validate: (v: unknown) => boolean;
|
|
172
|
+
hint: string;
|
|
173
|
+
default: string;
|
|
174
|
+
description: string;
|
|
175
|
+
};
|
|
176
|
+
} & {
|
|
177
|
+
identity: import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
178
|
+
} & {
|
|
179
|
+
workspace: {
|
|
180
|
+
hint: string;
|
|
181
|
+
short: string;
|
|
182
|
+
description: string;
|
|
183
|
+
};
|
|
184
|
+
'workspace-group': {
|
|
185
|
+
short: string;
|
|
186
|
+
description: string;
|
|
187
|
+
};
|
|
188
|
+
} & {
|
|
189
|
+
workspace: import("jackspeak").ConfigOption<"string", true, readonly string[] | undefined>;
|
|
190
|
+
'workspace-group': import("jackspeak").ConfigOption<"string", true, readonly string[] | undefined>;
|
|
191
|
+
} & {
|
|
192
|
+
recursive: {
|
|
193
|
+
short: string;
|
|
194
|
+
description: string;
|
|
195
|
+
};
|
|
196
|
+
bail: {
|
|
197
|
+
short: string;
|
|
198
|
+
description: string;
|
|
199
|
+
default: true;
|
|
200
|
+
};
|
|
201
|
+
'no-bail': {
|
|
202
|
+
short: string;
|
|
203
|
+
description: string;
|
|
204
|
+
};
|
|
205
|
+
} & {
|
|
206
|
+
recursive: import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
207
|
+
bail: import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
208
|
+
'no-bail': import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
209
|
+
} & {
|
|
210
|
+
config: {
|
|
211
|
+
hint: string;
|
|
212
|
+
description: string;
|
|
213
|
+
validOptions: readonly ["user", "project"];
|
|
214
|
+
default: string;
|
|
215
|
+
};
|
|
216
|
+
editor: {
|
|
217
|
+
hint: string;
|
|
218
|
+
description: string;
|
|
219
|
+
default: string;
|
|
220
|
+
};
|
|
221
|
+
'script-shell': {
|
|
222
|
+
hint: string;
|
|
223
|
+
description: string;
|
|
224
|
+
};
|
|
225
|
+
'fallback-command': {
|
|
226
|
+
hint: string;
|
|
227
|
+
description: string;
|
|
228
|
+
default: string;
|
|
229
|
+
validOptions: string[];
|
|
230
|
+
};
|
|
231
|
+
} & {
|
|
232
|
+
config: import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
233
|
+
editor: import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
234
|
+
'script-shell': import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
235
|
+
'fallback-command': import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
236
|
+
} & {
|
|
237
|
+
package: {
|
|
238
|
+
hint: string;
|
|
239
|
+
description: string;
|
|
240
|
+
};
|
|
241
|
+
} & {
|
|
242
|
+
package: import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
243
|
+
} & {
|
|
244
|
+
view: {
|
|
245
|
+
hint: string;
|
|
246
|
+
default: string;
|
|
247
|
+
description: string;
|
|
248
|
+
validOptions: readonly ["human", "json", "mermaid", "gui", "inspect"];
|
|
249
|
+
};
|
|
250
|
+
} & {
|
|
251
|
+
view: import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
252
|
+
} & {
|
|
253
|
+
'dashboard-root': {
|
|
254
|
+
hint: string;
|
|
255
|
+
description: string;
|
|
256
|
+
};
|
|
257
|
+
} & {
|
|
258
|
+
'dashboard-root': import("jackspeak").ConfigOption<"string", true, readonly string[] | undefined>;
|
|
259
|
+
} & {
|
|
260
|
+
'save-dev': {
|
|
261
|
+
short: string;
|
|
262
|
+
description: string;
|
|
263
|
+
};
|
|
264
|
+
'save-optional': {
|
|
265
|
+
short: string;
|
|
266
|
+
description: string;
|
|
267
|
+
};
|
|
268
|
+
'save-peer': {
|
|
269
|
+
description: string;
|
|
270
|
+
};
|
|
271
|
+
'save-prod': {
|
|
272
|
+
short: string;
|
|
273
|
+
description: string;
|
|
274
|
+
};
|
|
275
|
+
} & {
|
|
276
|
+
'save-dev': import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
277
|
+
'save-optional': import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
278
|
+
'save-peer': import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
279
|
+
'save-prod': import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
280
|
+
} & {
|
|
281
|
+
'expect-results': {
|
|
282
|
+
hint: string;
|
|
283
|
+
validate: (v: unknown) => boolean;
|
|
284
|
+
description: string;
|
|
285
|
+
};
|
|
286
|
+
} & {
|
|
287
|
+
'expect-results': import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
288
|
+
} & {
|
|
289
|
+
yes: {
|
|
290
|
+
short: string;
|
|
291
|
+
description: string;
|
|
292
|
+
};
|
|
293
|
+
version: {
|
|
294
|
+
short: string;
|
|
295
|
+
description: string;
|
|
296
|
+
};
|
|
297
|
+
help: {
|
|
298
|
+
short: string;
|
|
299
|
+
description: string;
|
|
300
|
+
};
|
|
301
|
+
} & {
|
|
302
|
+
yes: import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
303
|
+
version: import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
304
|
+
help: import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
305
|
+
}>;
|
|
306
|
+
//# sourceMappingURL=definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../src/config/definition.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,QAA0C,CAAA;AA0ClE;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGX,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,cAAc,uBAW1B,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAA;AAEtC,eAAO,MAAM,UAAU,OACjB,MAAM,KACT,QAAQ,CAAC,MAAM,QAAQ,CAAC,GAAG,SACkC,CAAA;AAKhE;;GAEG;AACH,eAAO,MAAM,YAAY,+EAKf,CAAA;AAEV,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;AAEvD,eAAO,MAAM,aAAa,MAAO,MAAM,KAAG,CAAC,IAAI,WACN,CAAA;AAwCzC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAwNH,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAoMP,OAAO;;;;;;;;;;;;;;;;;;;;;;EA0BvB,CAAA"}
|