@vltpkg/cli-sdk 1.0.0-rc.5 → 1.0.0-rc.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.
@@ -0,0 +1,18 @@
1
+ import type { CommandFn, CommandUsage } from '../index.ts';
2
+ export declare const usage: CommandUsage;
3
+ type CommandResultSingle = {
4
+ url: string;
5
+ name: string;
6
+ };
7
+ type CommandResultMultiple = {
8
+ url: string;
9
+ name: string;
10
+ }[];
11
+ export type CommandResult = CommandResultSingle | CommandResultMultiple;
12
+ export declare const views: {
13
+ readonly human: (r: CommandResult) => string;
14
+ readonly json: (r: CommandResult) => CommandResult;
15
+ };
16
+ export declare const command: CommandFn<CommandResult>;
17
+ export {};
18
+ //# sourceMappingURL=bugs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bugs.d.ts","sourceRoot":"","sources":["../../../src/commands/bugs.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAQ1D,eAAO,MAAM,KAAK,EAAE,YA2BhB,CAAA;AAEJ,KAAK,mBAAmB,GAAG;IACzB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb,EAAE,CAAA;AAEH,MAAM,MAAM,aAAa,GACrB,mBAAmB,GACnB,qBAAqB,CAAA;AAEzB,eAAO,MAAM,KAAK;;;CAUuB,CAAA;AAkDzC,eAAO,MAAM,OAAO,EAAE,SAAS,CAAC,aAAa,CA4F5C,CAAA"}
@@ -0,0 +1,164 @@
1
+ import { error } from '@vltpkg/error-cause';
2
+ import { PackageInfoClient } from '@vltpkg/package-info';
3
+ import { Spec } from '@vltpkg/spec';
4
+ import { urlOpen } from '@vltpkg/url-open';
5
+ import { actual } from '@vltpkg/graph';
6
+ import { Query } from '@vltpkg/query';
7
+ import { SecurityArchive } from '@vltpkg/security-archive';
8
+ import { createHostContextsMap } from "../query-host-contexts.js";
9
+ import { commandUsage } from "../config/usage.js";
10
+ import hostedGitInfo from 'hosted-git-info';
11
+ const { fromUrl: hostedGitInfoFromUrl } = hostedGitInfo;
12
+ export const usage = () => commandUsage({
13
+ command: 'bugs',
14
+ usage: ['[<spec>]', '[--target=<query>]'],
15
+ description: `Open bug tracker for a package in a web browser.
16
+ Reads bug tracker information from package.json or fetches
17
+ manifest data for the specified package.`,
18
+ options: {
19
+ target: {
20
+ value: '<query>',
21
+ description: 'Query selector to filter packages using DSS syntax.',
22
+ },
23
+ },
24
+ examples: {
25
+ '': {
26
+ description: 'Open bugs for the current package (reads local package.json)',
27
+ },
28
+ 'abbrev@2.0.0': {
29
+ description: 'Open bugs for a specific package version',
30
+ },
31
+ '--target=":root > *"': {
32
+ description: 'List bug tracker URLs for all direct dependencies',
33
+ },
34
+ },
35
+ });
36
+ export const views = {
37
+ human: r => {
38
+ if (Array.isArray(r)) {
39
+ let msg = 'Multiple package bug trackers found:\n';
40
+ msg += r.map(item => `• ${item.name}: ${item.url}`).join('\n');
41
+ return msg;
42
+ }
43
+ return '';
44
+ },
45
+ json: r => r,
46
+ };
47
+ const getUrlFromManifest = (manifest) => {
48
+ const { name, bugs, repository } = manifest;
49
+ if (!name) {
50
+ throw error('No package name found');
51
+ }
52
+ let url;
53
+ // Check bugs field first
54
+ if (bugs) {
55
+ if (typeof bugs === 'string') {
56
+ url = bugs;
57
+ }
58
+ else if (typeof bugs === 'object') {
59
+ if ('url' in bugs && bugs.url) {
60
+ url = bugs.url;
61
+ }
62
+ else if ('email' in bugs && bugs.email) {
63
+ url = `mailto:${bugs.email}`;
64
+ }
65
+ }
66
+ }
67
+ // Try repository if no bugs field
68
+ if (!url && repository) {
69
+ const repoUrl = typeof repository === 'string' ? repository
70
+ : typeof repository === 'object' && 'url' in repository ?
71
+ repository.url
72
+ : /* c8 ignore next */ undefined;
73
+ if (repoUrl) {
74
+ const info = hostedGitInfoFromUrl(repoUrl.replace(/^git\+/, ''));
75
+ if (info?.bugs && typeof info.bugs === 'function') {
76
+ url = info.bugs();
77
+ }
78
+ }
79
+ }
80
+ // Fallback to vlt.io package page
81
+ if (!url) {
82
+ url = `https://vlt.io/explore/npm/${name}/overview`;
83
+ }
84
+ return url;
85
+ };
86
+ export const command = async (conf) => {
87
+ const { projectRoot, packageJson } = conf.options;
88
+ const targetOption = conf.get('target');
89
+ // Handle --target query
90
+ if (targetOption) {
91
+ const mainManifest = packageJson.maybeRead(projectRoot);
92
+ if (!mainManifest) {
93
+ throw error('No package.json found in project root', {
94
+ path: projectRoot,
95
+ });
96
+ }
97
+ const graph = actual.load({
98
+ ...conf.options,
99
+ mainManifest,
100
+ monorepo: conf.options.monorepo,
101
+ loadManifests: true,
102
+ });
103
+ const securityArchive = Query.hasSecuritySelectors(targetOption) ?
104
+ await SecurityArchive.start({
105
+ nodes: [...graph.nodes.values()],
106
+ })
107
+ : undefined;
108
+ const hostContexts = await createHostContextsMap(conf);
109
+ const query = new Query({
110
+ nodes: new Set(graph.nodes.values()),
111
+ edges: graph.edges,
112
+ importers: graph.importers,
113
+ securityArchive,
114
+ hostContexts,
115
+ });
116
+ const { nodes } = await query.search(targetOption, {
117
+ signal: new AbortController().signal,
118
+ });
119
+ const results = [];
120
+ for (const node of nodes) {
121
+ if (!node.manifest)
122
+ continue;
123
+ const url = getUrlFromManifest(node.manifest);
124
+ results.push({
125
+ url,
126
+ name: node.name /* c8 ignore next */ ?? '(unknown)',
127
+ });
128
+ }
129
+ if (results.length === 0) {
130
+ throw error('No packages found matching target query', {
131
+ found: targetOption,
132
+ });
133
+ }
134
+ // If single result, open it
135
+ if (results.length === 1) {
136
+ const result = results[0];
137
+ /* c8 ignore next 3 */
138
+ if (!result) {
139
+ throw error('Unexpected empty result');
140
+ }
141
+ await urlOpen(result.url);
142
+ return result;
143
+ }
144
+ // Multiple results, return the list
145
+ return results;
146
+ }
147
+ // read the package spec from a positional argument or local package.json
148
+ const specArg = conf.positionals[0];
149
+ const manifest = conf.positionals.length === 0 ? packageJson.read(projectRoot)
150
+ : specArg ?
151
+ await new PackageInfoClient(conf.options).manifest(Spec.parseArgs(specArg, conf.options))
152
+ : /* c8 ignore next */ packageJson.read(projectRoot);
153
+ const url = getUrlFromManifest(manifest);
154
+ const { name } = manifest;
155
+ /* c8 ignore start - getUrlFromManifest already validates name */
156
+ if (!name) {
157
+ throw error('No package name found');
158
+ }
159
+ /* c8 ignore stop */
160
+ // Open the URL
161
+ await urlOpen(url);
162
+ return { url, name };
163
+ };
164
+ //# sourceMappingURL=bugs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bugs.js","sourceRoot":"","sources":["../../../src/commands/bugs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAIjD,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAC3C,MAAM,EAAE,OAAO,EAAE,oBAAoB,EAAE,GAAG,aAEzC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAiB,GAAG,EAAE,CACtC,YAAY,CAAC;IACX,OAAO,EAAE,MAAM;IACf,KAAK,EAAE,CAAC,UAAU,EAAE,oBAAoB,CAAC;IACzC,WAAW,EAAE;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E,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,KAAK,CAAC,uBAAuB,CAAC,CAAA;IACtC,CAAC;IACD,oBAAoB;IACpB,eAAe;IACf,MAAM,OAAO,CAAC,GAAG,CAAC,CAAA;IAElB,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAA;AACtB,CAAC,CAAA","sourcesContent":["import { error } from '@vltpkg/error-cause'\nimport { PackageInfoClient } from '@vltpkg/package-info'\nimport { Spec } from '@vltpkg/spec'\nimport { urlOpen } from '@vltpkg/url-open'\nimport { actual } from '@vltpkg/graph'\nimport { Query } from '@vltpkg/query'\nimport { SecurityArchive } from '@vltpkg/security-archive'\nimport { createHostContextsMap } from '../query-host-contexts.ts'\nimport { commandUsage } from '../config/usage.ts'\nimport type { CommandFn, CommandUsage } from '../index.ts'\nimport type { Views } from '../view.ts'\nimport type { Manifest, NormalizedManifest } from '@vltpkg/types'\nimport hostedGitInfo from 'hosted-git-info'\nconst { fromUrl: hostedGitInfoFromUrl } = hostedGitInfo as {\n fromUrl: (url: string) => { bugs?: () => string } | null\n}\n\nexport const usage: CommandUsage = () =>\n commandUsage({\n command: 'bugs',\n usage: ['[<spec>]', '[--target=<query>]'],\n description: `Open bug tracker for a package in a web browser.\n Reads bug tracker information from package.json or fetches\n manifest data for the specified package.`,\n options: {\n target: {\n value: '<query>',\n description:\n 'Query selector to filter packages using DSS syntax.',\n },\n },\n examples: {\n '': {\n description:\n 'Open bugs for the current package (reads local package.json)',\n },\n 'abbrev@2.0.0': {\n description: 'Open bugs for a specific package version',\n },\n '--target=\":root > *\"': {\n description:\n 'List bug tracker URLs for all direct dependencies',\n },\n },\n })\n\ntype CommandResultSingle = {\n url: string\n name: string\n}\n\ntype CommandResultMultiple = {\n url: string\n name: string\n}[]\n\nexport type CommandResult =\n | CommandResultSingle\n | CommandResultMultiple\n\nexport const views = {\n human: r => {\n if (Array.isArray(r)) {\n let msg = 'Multiple package bug trackers found:\\n'\n msg += r.map(item => `• ${item.name}: ${item.url}`).join('\\n')\n return msg\n }\n return ''\n },\n json: r => r,\n} as const satisfies Views<CommandResult>\n\nconst getUrlFromManifest = (\n manifest: Manifest | NormalizedManifest,\n): string => {\n const { name, bugs, repository } = manifest\n\n if (!name) {\n throw error('No package name found')\n }\n\n let url: string | undefined\n\n // Check bugs field first\n if (bugs) {\n if (typeof bugs === 'string') {\n url = bugs\n } else if (typeof bugs === 'object') {\n if ('url' in bugs && bugs.url) {\n url = bugs.url\n } else if ('email' in bugs && bugs.email) {\n url = `mailto:${bugs.email}`\n }\n }\n }\n\n // Try repository if no bugs field\n if (!url && repository) {\n const repoUrl =\n typeof repository === 'string' ? repository\n : typeof repository === 'object' && 'url' in repository ?\n repository.url\n : /* c8 ignore next */ undefined\n\n if (repoUrl) {\n const info = hostedGitInfoFromUrl(repoUrl.replace(/^git\\+/, ''))\n if (info?.bugs && typeof info.bugs === 'function') {\n url = info.bugs()\n }\n }\n }\n\n // Fallback to vlt.io package page\n if (!url) {\n url = `https://vlt.io/explore/npm/${name}/overview`\n }\n\n return url\n}\n\nexport const command: CommandFn<CommandResult> = async conf => {\n const { projectRoot, packageJson } = conf.options\n const targetOption = conf.get('target')\n\n // Handle --target query\n if (targetOption) {\n const mainManifest = packageJson.maybeRead(projectRoot)\n if (!mainManifest) {\n throw error('No package.json found in project root', {\n path: projectRoot,\n })\n }\n\n const graph = actual.load({\n ...conf.options,\n mainManifest,\n monorepo: conf.options.monorepo,\n loadManifests: true,\n })\n\n const securityArchive =\n Query.hasSecuritySelectors(targetOption) ?\n await SecurityArchive.start({\n nodes: [...graph.nodes.values()],\n })\n : undefined\n\n const hostContexts = await createHostContextsMap(conf)\n const query = new Query({\n nodes: new Set(graph.nodes.values()),\n edges: graph.edges,\n importers: graph.importers,\n securityArchive,\n hostContexts,\n })\n\n const { nodes } = await query.search(targetOption, {\n signal: new AbortController().signal,\n })\n\n const results: CommandResultMultiple = []\n for (const node of nodes) {\n if (!node.manifest) continue\n const url = getUrlFromManifest(node.manifest)\n results.push({\n url,\n name: node.name /* c8 ignore next */ ?? '(unknown)',\n })\n }\n\n if (results.length === 0) {\n throw error('No packages found matching target query', {\n found: targetOption,\n })\n }\n\n // If single result, open it\n if (results.length === 1) {\n const result = results[0]\n /* c8 ignore next 3 */\n if (!result) {\n throw error('Unexpected empty result')\n }\n await urlOpen(result.url)\n return result\n }\n\n // Multiple results, return the list\n return results\n }\n\n // read the package spec from a positional argument or local package.json\n const specArg = conf.positionals[0]\n const manifest =\n conf.positionals.length === 0 ? packageJson.read(projectRoot)\n : specArg ?\n await new PackageInfoClient(conf.options).manifest(\n Spec.parseArgs(specArg, conf.options),\n )\n : /* c8 ignore next */ packageJson.read(projectRoot)\n\n const url = getUrlFromManifest(manifest)\n const { name } = manifest\n /* c8 ignore start - getUrlFromManifest already validates name */\n if (!name) {\n throw error('No package name found')\n }\n /* c8 ignore stop */\n // Open the URL\n await urlOpen(url)\n\n return { url, name }\n}\n"]}
@@ -67,9 +67,9 @@ const getUrlFromManifest = (manifest) => {
67
67
  }
68
68
  }
69
69
  }
70
- // Fallback to npmjs.com package page
70
+ // Fallback to vlt.io package page
71
71
  if (!url) {
72
- url = `https://www.npmjs.com/package/${name}`;
72
+ url = `https://vlt.io/explore/npm/${name}/overview`;
73
73
  }
74
74
  return url;
75
75
  };
@@ -1 +1 @@
1
- {"version":3,"file":"docs.js","sourceRoot":"","sources":["../../../src/commands/docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,EAAE,eAAe,EAAE,MA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AI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,KAAK,CAAC,uBAAuB,CAAC,CAAA;IACtC,CAAC;IACD,oBAAoB;IACpB,eAAe;IACf,MAAM,OAAO,CAAC,GAAG,CAAC,CAAA;IAElB,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAA;AACtB,CAAC,CAAA","sourcesContent":["import { error } from '@vltpkg/error-cause'\nimport { PackageInfoClient } from '@vltpkg/package-info'\nimport { Spec } from '@vltpkg/spec'\nimport { urlOpen } from '@vltpkg/url-open'\nimport { actual } from '@vltpkg/graph'\nimport { Query } from '@vltpkg/query'\nimport { SecurityArchive } from '@vltpkg/security-archive'\nimport { createHostContextsMap } from '../query-host-contexts.ts'\nimport { commandUsage } from '../config/usage.ts'\nimport type { CommandFn, CommandUsage } from '../index.ts'\nimport type { Views } from '../view.ts'\nimport type { Manifest, NormalizedManifest } from '@vltpkg/types'\nimport hostedGitInfo from 'hosted-git-info'\nconst { fromUrl: hostedGitInfoFromUrl } = hostedGitInfo as {\n fromUrl: (url: string) => { docs?: () => string } | null\n}\n\nexport const usage: CommandUsage = () =>\n commandUsage({\n command: 'docs',\n usage: ['[<spec>]', '[--target=<query>]'],\n description: `Open documentation for a package in a web browser.\n Reads repository information from package.json or fetches\n manifest data for the specified package.`,\n options: {\n target: {\n value: '<query>',\n description:\n 'Query selector to filter packages using DSS syntax.',\n },\n },\n examples: {\n '': {\n description:\n 'Open docs for the current package (reads local package.json)',\n },\n 'abbrev@2.0.0': {\n description: 'Open docs for a specific package version',\n },\n '--target=\":root > *\"': {\n description:\n 'List documentation URLs for all direct dependencies',\n },\n },\n })\n\ntype CommandResultSingle = {\n url: string\n name: string\n}\n\ntype CommandResultMultiple = {\n url: string\n name: string\n}[]\n\nexport type CommandResult =\n | CommandResultSingle\n | CommandResultMultiple\n\nexport const views = {\n human: r => {\n if (Array.isArray(r)) {\n let msg = 'Multiple package docs found:\\n'\n msg += r.map(item => `• ${item.name}: ${item.url}`).join('\\n')\n return msg\n }\n return ''\n },\n json: r => r,\n} as const satisfies Views<CommandResult>\n\nconst getUrlFromManifest = (\n manifest: Manifest | NormalizedManifest,\n): string => {\n const { name, homepage, repository } = manifest\n\n if (!name) {\n throw error('No package name found')\n }\n\n // Extract repository URL\n let url: string | undefined\n\n if (homepage) {\n url = homepage\n } else if (repository) {\n const repoUrl =\n typeof repository === 'string' ? repository\n : typeof repository === 'object' && 'url' in repository ?\n repository.url\n : /* c8 ignore next */ undefined\n\n if (repoUrl) {\n // Try to get hosted git info\n\n const info = hostedGitInfoFromUrl(repoUrl.replace(/^git\\+/, ''))\n\n if (info?.docs && typeof info.docs === 'function') {\n url = info.docs()\n }\n }\n }\n\n // Fallback to npmjs.com package page\n if (!url) {\n url = `https://www.npmjs.com/package/${name}`\n }\n\n return url\n}\n\nexport const command: CommandFn<CommandResult> = async conf => {\n const { projectRoot, packageJson } = conf.options\n const targetOption = conf.get('target')\n\n // Handle --target query\n if (targetOption) {\n const mainManifest = packageJson.maybeRead(projectRoot)\n if (!mainManifest) {\n throw error('No package.json found in project root', {\n path: projectRoot,\n })\n }\n\n const graph = actual.load({\n ...conf.options,\n mainManifest,\n monorepo: conf.options.monorepo,\n loadManifests: true,\n })\n\n const securityArchive =\n Query.hasSecuritySelectors(targetOption) ?\n await SecurityArchive.start({\n nodes: [...graph.nodes.values()],\n })\n : undefined\n\n const hostContexts = await createHostContextsMap(conf)\n const query = new Query({\n nodes: new Set(graph.nodes.values()),\n edges: graph.edges,\n importers: graph.importers,\n securityArchive,\n hostContexts,\n })\n\n const { nodes } = await query.search(targetOption, {\n signal: new AbortController().signal,\n })\n\n const results: CommandResultMultiple = []\n for (const node of nodes) {\n if (!node.manifest) continue\n const url = getUrlFromManifest(node.manifest)\n results.push({\n url,\n name: node.name /* c8 ignore next */ ?? '(unknown)',\n })\n }\n\n if (results.length === 0) {\n throw error('No packages found matching target query', {\n found: targetOption,\n })\n }\n\n // If single result, open it\n if (results.length === 1) {\n const result = results[0]\n /* c8 ignore next 3 */\n if (!result) {\n throw error('Unexpected empty result')\n }\n await urlOpen(result.url)\n return result\n }\n\n // Multiple results, return the list\n return results\n }\n\n // read the package spec from a positional argument or local package.json\n const specArg = conf.positionals[0]\n const manifest =\n conf.positionals.length === 0 ? packageJson.read(projectRoot)\n : specArg ?\n await new PackageInfoClient(conf.options).manifest(\n Spec.parseArgs(specArg, conf.options),\n )\n : /* c8 ignore next */ packageJson.read(projectRoot)\n\n const url = getUrlFromManifest(manifest)\n const { name } = manifest\n /* c8 ignore start - getUrlFromManifest already validates name */\n if (!name) {\n throw error('No package name found')\n }\n /* c8 ignore stop */\n // Open the URL\n await urlOpen(url)\n\n return { url, name }\n}\n"]}
1
+ {"version":3,"file":"docs.js","sourceRoot":"","sources":["../../../src/commands/docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAIjD,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAC3C,MAAM,EAAE,OAAO,EAAE,oBAAoB,EAAE,GAAG,aAEzC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAiB,GAAG,EAAE,CACtC,YAAY,CAAC;IACX,OAAO,EAAE,MAAM;IACf,KAAK,EAAE,CAAC,UAAU,EAAE,oBAAoB,CAAC;IACzC,WAAW,EAAE;;2DAE0C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AC,CAAA;YACzB,sBAAsB;YACtB,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,KAAK,CAAC,yBAAyB,CAAC,CAAA;YACxC,CAAC;YACD,MAAM,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;YACzB,OAAO,MAAM,CAAA;QACf,CAAC;QAED,oCAAoC;QACpC,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,yEAAyE;IACzE,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;IACnC,MAAM,QAAQ,GACZ,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;QAC7D,CAAC,CAAC,OAAO,CAAC,CAAC;YACT,MAAM,IAAI,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAChD,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CACtC;YACH,CAAC,CAAC,oBAAoB,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IAEtD,MAAM,GAAG,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAA;IACxC,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAA;IACzB,iEAAiE;IACjE,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,KAAK,CAAC,uBAAuB,CAAC,CAAA;IACtC,CAAC;IACD,oBAAoB;IACpB,eAAe;IACf,MAAM,OAAO,CAAC,GAAG,CAAC,CAAA;IAElB,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAA;AACtB,CAAC,CAAA","sourcesContent":["import { error } from '@vltpkg/error-cause'\nimport { PackageInfoClient } from '@vltpkg/package-info'\nimport { Spec } from '@vltpkg/spec'\nimport { urlOpen } from '@vltpkg/url-open'\nimport { actual } from '@vltpkg/graph'\nimport { Query } from '@vltpkg/query'\nimport { SecurityArchive } from '@vltpkg/security-archive'\nimport { createHostContextsMap } from '../query-host-contexts.ts'\nimport { commandUsage } from '../config/usage.ts'\nimport type { CommandFn, CommandUsage } from '../index.ts'\nimport type { Views } from '../view.ts'\nimport type { Manifest, NormalizedManifest } from '@vltpkg/types'\nimport hostedGitInfo from 'hosted-git-info'\nconst { fromUrl: hostedGitInfoFromUrl } = hostedGitInfo as {\n fromUrl: (url: string) => { docs?: () => string } | null\n}\n\nexport const usage: CommandUsage = () =>\n commandUsage({\n command: 'docs',\n usage: ['[<spec>]', '[--target=<query>]'],\n description: `Open documentation for a package in a web browser.\n Reads repository information from package.json or fetches\n manifest data for the specified package.`,\n options: {\n target: {\n value: '<query>',\n description:\n 'Query selector to filter packages using DSS syntax.',\n },\n },\n examples: {\n '': {\n description:\n 'Open docs for the current package (reads local package.json)',\n },\n 'abbrev@2.0.0': {\n description: 'Open docs for a specific package version',\n },\n '--target=\":root > *\"': {\n description:\n 'List documentation URLs for all direct dependencies',\n },\n },\n })\n\ntype CommandResultSingle = {\n url: string\n name: string\n}\n\ntype CommandResultMultiple = {\n url: string\n name: string\n}[]\n\nexport type CommandResult =\n | CommandResultSingle\n | CommandResultMultiple\n\nexport const views = {\n human: r => {\n if (Array.isArray(r)) {\n let msg = 'Multiple package docs found:\\n'\n msg += r.map(item => `• ${item.name}: ${item.url}`).join('\\n')\n return msg\n }\n return ''\n },\n json: r => r,\n} as const satisfies Views<CommandResult>\n\nconst getUrlFromManifest = (\n manifest: Manifest | NormalizedManifest,\n): string => {\n const { name, homepage, repository } = manifest\n\n if (!name) {\n throw error('No package name found')\n }\n\n // Extract repository URL\n let url: string | undefined\n\n if (homepage) {\n url = homepage\n } else if (repository) {\n const repoUrl =\n typeof repository === 'string' ? repository\n : typeof repository === 'object' && 'url' in repository ?\n repository.url\n : /* c8 ignore next */ undefined\n\n if (repoUrl) {\n // Try to get hosted git info\n\n const info = hostedGitInfoFromUrl(repoUrl.replace(/^git\\+/, ''))\n\n if (info?.docs && typeof info.docs === 'function') {\n url = info.docs()\n }\n }\n }\n\n // Fallback to vlt.io package page\n if (!url) {\n url = `https://vlt.io/explore/npm/${name}/overview`\n }\n\n return url\n}\n\nexport const command: CommandFn<CommandResult> = async conf => {\n const { projectRoot, packageJson } = conf.options\n const targetOption = conf.get('target')\n\n // Handle --target query\n if (targetOption) {\n const mainManifest = packageJson.maybeRead(projectRoot)\n if (!mainManifest) {\n throw error('No package.json found in project root', {\n path: projectRoot,\n })\n }\n\n const graph = actual.load({\n ...conf.options,\n mainManifest,\n monorepo: conf.options.monorepo,\n loadManifests: true,\n })\n\n const securityArchive =\n Query.hasSecuritySelectors(targetOption) ?\n await SecurityArchive.start({\n nodes: [...graph.nodes.values()],\n })\n : undefined\n\n const hostContexts = await createHostContextsMap(conf)\n const query = new Query({\n nodes: new Set(graph.nodes.values()),\n edges: graph.edges,\n importers: graph.importers,\n securityArchive,\n hostContexts,\n })\n\n const { nodes } = await query.search(targetOption, {\n signal: new AbortController().signal,\n })\n\n const results: CommandResultMultiple = []\n for (const node of nodes) {\n if (!node.manifest) continue\n const url = getUrlFromManifest(node.manifest)\n results.push({\n url,\n name: node.name /* c8 ignore next */ ?? '(unknown)',\n })\n }\n\n if (results.length === 0) {\n throw error('No packages found matching target query', {\n found: targetOption,\n })\n }\n\n // If single result, open it\n if (results.length === 1) {\n const result = results[0]\n /* c8 ignore next 3 */\n if (!result) {\n throw error('Unexpected empty result')\n }\n await urlOpen(result.url)\n return result\n }\n\n // Multiple results, return the list\n return results\n }\n\n // read the package spec from a positional argument or local package.json\n const specArg = conf.positionals[0]\n const manifest =\n conf.positionals.length === 0 ? packageJson.read(projectRoot)\n : specArg ?\n await new PackageInfoClient(conf.options).manifest(\n Spec.parseArgs(specArg, conf.options),\n )\n : /* c8 ignore next */ packageJson.read(projectRoot)\n\n const url = getUrlFromManifest(manifest)\n const { name } = manifest\n /* c8 ignore start - getUrlFromManifest already validates name */\n if (!name) {\n throw error('No package name found')\n }\n /* c8 ignore stop */\n // Open the URL\n await urlOpen(url)\n\n return { url, name }\n}\n"]}
@@ -22,6 +22,7 @@ export declare const commands: {
22
22
  readonly '?': "help";
23
23
  readonly ls: "list";
24
24
  readonly xc: "exec-cache";
25
+ readonly bugs: "bugs";
25
26
  readonly build: "build";
26
27
  readonly cache: "cache";
27
28
  readonly ci: "ci";
@@ -1 +1 @@
1
- {"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../src/config/definition.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,QAOd,CAAA;AAEV,eAAO,MAAM,aAAa,cAKjB,CAAA;AAqDT;;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,iGAMf,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA2OH,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAmOP,OAAO;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsFvB,CAAA;AAEJ,eAAO,MAAM,mBAAmB,gBAS/B,CAAA;AAED,eAAO,MAAM,aAAa,gBAC2C,CAAA"}
@@ -15,6 +15,7 @@ export const defaultEditor = () => process.env.EDITOR ||
15
15
  `${process.env.SYSTEMROOT}\\notepad.exe`
16
16
  : 'vi');
17
17
  const canonicalCommands = {
18
+ bugs: 'bugs',
18
19
  build: 'build',
19
20
  cache: 'cache',
20
21
  ci: 'ci',
@@ -1 +1 @@
1
- {"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../src/config/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,MAAM,CAAC,MAAM,WAAW;AACtB,uCAAuC;AACvC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO;IAC5B,6DAA6D;IAC7D,sDAAsD;IACxD,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO;QACxB,6BAA6B;QAC/B,CAAC,CAAC,MAAM,CAAA;AAEV,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE,CAChC,OAAO,CAAC,GAAG,CAAC,MAAM;IAClB,OAAO,CAAC,GAAG,CAAC,MAAM;IAClB,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC;QAC7B,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,eAAe;QAC1C,CAAC,CAAC,IAAI,CAAC,CAAA;AAET,MAAM,iBAAiB,GAAG;IACxB,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,EAAE,EAAE,IAAI;IACR,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,IAAI,EAA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D,GAAG,EAAE;QACH,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,oCAAoC;KAClD;CACF,CAAC,CAAA;AAEJ,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,EAAE,CAAA;IAChC,OAAO,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC,CAAoB,EAAE,EAAE;QAClD,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;QACnB,oBAAoB;QACpB,IAAI,CAAC,GAAG;YAAE,MAAM,KAAK,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAA;QACxD,IAAI,GAAG,CAAC,IAAI,KAAK,SAAS;YAAE,OAAO,KAAK,CAAC,EAAE,CAAA;QAC3C,OAAO,KAAK,CAAC,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAA;IACpC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE,CAChC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA","sourcesContent":["import { error } from '@vltpkg/error-cause'\nimport { XDG } from '@vltpkg/xdg'\nimport { jack } from 'jackspeak'\n\nexport const defaultView =\n // If stdout is a TTY, use human output\n process.stdout.isTTY ? 'human'\n // If its not a TTY but is a CI environment, use human output\n // TODO: make a better view option for CI environments\n : process.env.CI ? 'human'\n // Otherwise, use json output\n : 'json'\n\nexport const defaultEditor = () =>\n process.env.EDITOR ||\n process.env.VISUAL ||\n (process.platform === 'win32' ?\n `${process.env.SYSTEMROOT}\\\\notepad.exe`\n : 'vi')\n\nconst canonicalCommands = {\n build: 'build',\n cache: 'cache',\n ci: 'ci',\n config: 'config',\n docs: 'docs',\n exec: 'exec',\n 'exec-local': 'exec-local',\n help: 'help',\n init: 'init',\n install: 'install',\n login: 'login',\n logout: 'logout',\n list: 'list',\n ls: 'ls',\n pack: 'pack',\n pkg: 'pkg',\n publish: 'publish',\n query: 'query',\n 'run-exec': 'run-exec',\n run: 'run',\n serve: 'serve',\n token: 'token',\n uninstall: 'uninstall',\n update: 'update',\n 'exec-cache': 'exec-cache',\n version: 'version',\n whoami: 'whoami',\n} as const\n\nconst aliases = {\n i: 'install',\n add: 'install',\n rm: 'uninstall',\n u: 'update',\n p: 'pkg',\n pub: 'publish',\n q: 'query',\n b: 'build',\n r: 'run',\n 'run-script': 'run',\n rx: 'run-exec',\n s: 'serve',\n x: 'exec',\n xl: 'exec-local',\n h: 'help',\n '?': 'help',\n ls: 'list',\n xc: 'exec-cache',\n} as const\n\n/**\n * Command aliases mapped to their canonical names\n */\nexport const commands = {\n ...canonicalCommands,\n ...aliases,\n} as const\n\n/**\n * Canonical command names mapped to an array of its aliases\n */\nexport const commandAliases = Object.entries(aliases).reduce(\n (acc, [alias, canonical]) => {\n const commandAliases = acc.get(canonical)\n if (commandAliases) {\n commandAliases.push(alias)\n } else {\n acc.set(canonical, [alias])\n }\n return acc\n },\n new Map<string, string[]>(),\n)\n\nexport type Commands = typeof commands\n\nexport const getCommand = (\n s?: string,\n): Commands[keyof Commands] | undefined =>\n s && s in commands ? commands[s as keyof Commands] : undefined\n\nconst xdg = new XDG('vlt')\nconst cacheDir = xdg.cache()\n\n/**\n * Fields that are parsed as a set of key=value pairs\n */\nexport const recordFields = [\n 'git-hosts',\n 'registries',\n 'git-host-archives',\n 'scope-registries',\n 'jsr-registries',\n] as const\n\nexport type RecordField = (typeof recordFields)[number]\n\nexport const isRecordField = (s: string): s is RecordField =>\n recordFields.includes(s as RecordField)\n\nconst stopParsingCommands: Commands[keyof Commands][] = [\n 'run',\n 'run-exec',\n 'exec-local',\n 'exec',\n]\n\nlet stopParsing: boolean | undefined = undefined\n\nconst j = jack({\n envPrefix: 'VLT',\n allowPositionals: true,\n usage: `vlt [<options>] [<cmd> [<args> ...]]`,\n stopAtPositionalTest: arg => {\n if (stopParsing) return true\n const a = arg as keyof Commands\n // we stop parsing AFTER the thing, so you can do\n // vlt run --vlt --configs scriptName --args --for --script\n // or\n // vlt exec --vlt --configs command --args --for --command\n if (stopParsingCommands.includes(commands[a])) {\n stopParsing = true\n }\n return false\n },\n})\n .heading('vlt')\n .description(\n `More documentation available at <https://docs.vlt.sh>`,\n )\n .heading('Subcommands')\n\nj.description(Object.keys(canonicalCommands).join(', '), {\n pre: true,\n}).description(\n 'Run `vlt <cmd> --help` for more information about a specific command',\n)\n\nexport const definition = j\n /**\n * Definition of all configuration values used by vlt.\n */\n .heading('Configuration')\n .description(\n `If a \\`vlt.json\\` file is present in the root of the current project,\n then that will be used as a source of configuration information.\n\n Next, the \\`vlt.json\\` file in the XDG specified config directory\n will be checked, and loaded for any fields not set in the local project.\n\n Object type values will be merged together. Set a field to \\`null\\` in\n the JSON configuration to explicitly remove it.\n\n Command-specific fields may be set in a nested \\`command\\` object that\n overrides any options defined at the top level.\n `,\n )\n\n .flag({\n color: {\n short: 'c',\n description: 'Use colors (Default for TTY)',\n },\n 'no-color': {\n short: 'C',\n description: 'Do not use colors (Default for non-TTY)',\n },\n })\n\n .opt({\n registry: {\n hint: 'url',\n default: 'https://registry.npmjs.org/',\n description: `Sets the registry for fetching packages, when no registry\n is explicitly set on a specifier.\n\n For example, \\`express@latest\\` will be resolved by looking\n up the metadata from this registry.\n\n Note that alias specifiers starting with \\`npm:\\` will\n still map to \\`https://registry.npmjs.org/\\` if this is\n changed, unless the a new mapping is created via the\n \\`--registries\\` option.\n `,\n },\n })\n\n .optList({\n registries: {\n hint: 'name=url',\n description: `Specify named registry hosts by their prefix. To set the\n default registry used for non-namespaced specifiers,\n use the \\`--registry\\` option.\n\n Prefixes can be used as a package alias. For example:\n\n \\`\\`\\`\n vlt --registries loc=http://reg.local install foo@loc:foo@1.x\n \\`\\`\\`\n\n By default, the public npm registry is registered to the\n \\`npm:\\` prefix. It is not recommended to change this\n mapping in most cases.\n `,\n },\n\n 'scope-registries': {\n hint: '@scope=url',\n description: `Map package name scopes to registry URLs.\n\n For example,\n \\`--scope-registries @acme=https://registry.acme/\\`\n would tell vlt to fetch any packages named\n \\`@acme/...\\` from the \\`https://registry.acme/\\`\n registry.\n\n Note: this way of specifying registries is more ambiguous,\n compared with using the \\`--registries\\` field and explicit\n prefixes, because instead of failing when the configuration\n is absent, it will instead attempt to fetch from the\n default registry.\n\n By comparison, using\n \\`--registries acme=https://registry.acme/\\` and then\n specifying dependencies such as \\`\"foo\": \"acme:foo@1.x\"\\`\n means that regardless of the name, the package will be\n fetched from the explicitly named registry, or fail if\n no registry is defined with that name.\n\n However, custom registry aliases are not supported by other\n package managers.`,\n },\n\n 'jsr-registries': {\n hint: 'name=url',\n description: `Map alias names to JSR.io registry urls.\n\n For example,\n \\`--jsr-registries acme=https://jsr.acme.io/\\` would\n tell vlt to fetch any packages with the \\`acme:\\` registry\n prefix from the \\`https://jsr.acme.io/\\` registry, using\n the \"npm Compatibility\" translation. So for example,\n the package \\`acme:@foo/bar\\` would fetch the\n \\`@jsr/foo__bar\\` package from the \\`jsr.acme.io\\`\n registry.\n\n By default the \\`jsr\\` alias is always mapped to\n \\`https://npm.jsr.io/\\`, so existing \\`jsr:\\` packages will\n be fetched from the public \\`jsr\\` registry appropriately.\n `,\n },\n\n 'git-hosts': {\n hint: `name=template`,\n short: 'G',\n description: `Map a shorthand name to a git remote URL template.\n\n The \\`template\\` may contain placeholders, which will be\n swapped with the relevant values.\n\n \\`$1\\`, \\`$2\\`, etc. are replaced with the appropriate\n n-th path portion. For example, \\`github:user/project\\`\n would replace the \\`$1\\` in the template with \\`user\\`,\n and \\`$2\\` with \\`project\\`.`,\n },\n\n 'git-host-archives': {\n hint: `name=template`,\n short: 'A',\n description: `Similar to the \\`--git-host <name>=<template>\\` option,\n this option can define a template string that will be\n expanded to provide the URL to download a pre-built\n tarball of the git repository.\n\n In addition to the n-th path portion expansions performed\n by \\`--git-host\\`, this field will also expand the\n string \\`$committish\\` in the template, replacing it with\n the resolved git committish value to be fetched.`,\n },\n })\n\n .opt({\n cache: {\n hint: 'path',\n description: `\n Location of the vlt on-disk cache. Defaults to the platform-specific\n directory recommended by the XDG specification.\n `,\n default: cacheDir,\n },\n tag: {\n description: `Default \\`dist-tag\\` to install or publish`,\n default: 'latest',\n },\n before: {\n hint: 'date',\n description: `Do not install any packages published after this date`,\n },\n os: {\n description: `The operating system to use as the selector when choosing\n packages based on their \\`os\\` value.`,\n default: process.platform,\n },\n arch: {\n description: `CPU architecture to use as the selector when choosing\n packages based on their \\`cpu\\` value.`,\n default: process.arch,\n },\n 'node-version': {\n hint: 'version',\n description: `Node version to use when choosing packages based on\n their \\`engines.node\\` value.`,\n default: process.version,\n },\n })\n\n .flag({\n 'git-shallow': {\n description: `Set to force \\`--depth=1\\` on all git clone actions.\n When set explicitly to false with --no-git-shallow,\n then \\`--depth=1\\` will not be used.\n\n When not set explicitly, \\`--depth=1\\` will be used for\n git hosts known to support this behavior.`,\n },\n })\n .num({\n 'fetch-retries': {\n hint: 'n',\n description: `Number of retries to perform when encountering network\n errors or likely-transient errors from git hosts.`,\n default: 3,\n },\n 'fetch-retry-factor': {\n hint: 'n',\n description: `The exponential backoff factor to use when retrying\n requests due to network issues.`,\n default: 2,\n },\n 'fetch-retry-mintimeout': {\n hint: 'n',\n description: `Number of milliseconds before starting first retry`,\n default: 0,\n },\n 'fetch-retry-maxtimeout': {\n hint: 'n',\n description: `Maximum number of milliseconds between two retries`,\n default: 30_000,\n },\n 'stale-while-revalidate-factor': {\n hint: 'n',\n default: 60,\n description: `If the server does not serve a \\`stale-while-revalidate\\`\n value in the \\`cache-control\\` header, then this multiplier\n is applied to the \\`max-age\\` or \\`s-maxage\\` values.\n\n By default, this is \\`60\\`, so for example a response that\n is cacheable for 5 minutes will allow a stale response\n while revalidating for up to 5 hours.\n\n If the server *does* provide a \\`stale-while-revalidate\\`\n value, then that is always used.\n\n Set to 0 to prevent any \\`stale-while-revalidate\\` behavior\n unless explicitly allowed by the server's \\`cache-control\\`\n header.\n `,\n },\n })\n\n .opt({\n identity: {\n short: 'i',\n validate: (v: unknown) =>\n typeof v === 'string' && /^[a-z0-9]*$/.test(v),\n hint: 'name',\n default: '',\n description: `Provide a string to define an identity for storing auth\n information when logging into registries.\n\n Authentication tokens will be stored in the XDG data\n directory, in \\`vlt/auth/$\\{identity}/keychain.json\\`.\n\n If no identity is provided, then the default \\`''\\` will\n be used, storing the file at \\`vlt/auth/keychain.json\\`.\n\n May only contain lowercase alphanumeric characters.\n `,\n },\n })\n\n .optList({\n workspace: {\n hint: 'ws',\n short: 'w',\n description: `Set to limit the spaces being worked on when working on\n workspaces.\n\n Can be paths or glob patterns matching paths.\n\n Specifying workspaces by package.json name is not\n supported.`,\n },\n 'workspace-group': {\n short: 'g',\n description: `Specify named workspace group names to load and operate on\n when doing recursive operations on workspaces.`,\n },\n })\n\n .opt({\n scope: {\n short: 's',\n hint: 'query',\n description:\n 'Set to filter the scope of an operation using a DSS Query.',\n },\n target: {\n short: 't',\n hint: 'query',\n description:\n 'Set to select packages using a DSS Query selector.',\n },\n })\n\n .flag({\n 'if-present': {\n description: `When running scripts across multiple packages,\n only include packages that have the script.\n\n If this is not set, then the run will fail if any\n packages do not have the script.\n\n This will default to true if --scope, --workspace,\n --workspace-group, or --recursive is set. Otherwise,\n it will default to false.`,\n },\n })\n\n .flag({\n recursive: {\n short: 'r',\n description: `Run an operation across multiple workspaces.\n\n No effect when used in non-monorepo projects.\n\n Implied by setting --workspace or --workspace-group. If\n not set, then the action is run on the project root.`,\n },\n\n bail: {\n short: 'b',\n description: `When running scripts across multiple workspaces, stop\n on the first failure.`,\n default: true,\n },\n\n 'no-bail': {\n short: 'B',\n description: `When running scripts across multiple workspaces, continue\n on failure, running the script for all workspaces.`,\n },\n })\n\n .opt({\n config: {\n hint: 'all | user | project',\n description: `Specify which configuration to show or operate on when running\n \\`vlt config\\` commands. For read operations (get, pick, list):\n \\`all\\` shows merged configuration from both user and project\n files (default). For write operations (set, delete, edit):\n defaults to \\`project\\`. \\`user\\` shows/modifies only user-level\n configuration, \\`project\\` shows/modifies only project-level\n configuration.`,\n validOptions: ['all', 'user', 'project'] as const,\n default: 'all',\n },\n\n editor: {\n hint: 'program',\n description: `The blocking editor to use for \\`vlt config edit\\` and\n any other cases where a file should be opened for\n editing.\n\n Defaults to the \\`EDITOR\\` or \\`VISUAL\\` env if set, or\n \\`notepad.exe\\` on Windows, or \\`vi\\` elsewhere.`,\n default: defaultEditor(),\n },\n\n 'script-shell': {\n hint: 'program',\n description: `The shell to use when executing \\`package.json#scripts\\`.\n\n For \\`vlt exec\\` and \\`vlt exec-local\\`, this is never set,\n meaning that command arguments are run exactly as provided.\n\n For \\`vlt run\\` (and other things that run lifecycle\n scripts in \\`package.json#scripts\\`), the entire command\n with all arguments is provided as a single string, meaning\n that some value must be provided for shell interpretation,\n and so for these contexts, the \\`script-shell\\` value will\n default to \\`/bin/sh\\` on POSIX systems or \\`cmd.exe\\` on\n Windows.\n `,\n },\n\n 'fallback-command': {\n hint: 'command',\n description: `The command to run when the first argument doesn't\n match any known commands.\n\n For pnpm-style behavior, set this to 'run-exec'. e.g:\n \\`\\`\\`\n vlt config set fallback-command=run-exec\n \\`\\`\\``,\n default: 'help',\n validOptions: Object.keys(canonicalCommands),\n },\n })\n\n .opt({\n package: {\n hint: 'p',\n description: `When running \\`vlt exec\\`, this allows you to explicitly\n set the package to search for bins. If not provided, then\n vlt will interpret the first argument as the package, and\n attempt to run the default executable.`,\n },\n })\n\n .opt({\n view: {\n hint: 'output',\n default: defaultView,\n description: `Configures the output format for commands.\n\n Defaults to \\`human\\` if stdout is a TTY, or \\`json\\`\n if it is not.\n\n - human: Maximally ergonomic output reporting for human\n consumption.\n - json: Parseable JSON output for machines.\n - inspect: Output results with \\`util.inspect\\`.\n - gui: Start a local web server and opens a browser to\n explore the results. (Only relevant for certain\n commands.)\n - mermaid: Output mermaid diagramming syntax. (Only\n relevant for certain commands.)\n - silent: Suppress all output to stdout.\n\n If the requested view format is not supported for the\n current command, or if no option is provided, then it\n will fall back to the default.\n `,\n validOptions: [\n 'human',\n 'json',\n 'mermaid',\n 'gui',\n 'inspect',\n 'silent',\n ] as const,\n },\n })\n\n .optList({\n 'dashboard-root': {\n hint: 'path',\n description: `The root directory to use for the dashboard browser-based UI.\n If not set, the user home directory is used.`,\n },\n })\n\n .flag({\n 'save-dev': {\n short: 'D',\n description: `Save installed packages to a package.json file as\n devDependencies`,\n },\n 'save-optional': {\n short: 'O',\n description: `Save installed packages to a package.json file as\n optionalDependencies`,\n },\n 'save-peer': {\n description: `Save installed packages to a package.json file as\n peerDependencies`,\n },\n 'save-prod': {\n short: 'P',\n description: `Save installed packages into dependencies specifically.\n This is useful if a package already exists in\n devDependencies or optionalDependencies, but you want to\n move it to be a non-optional production dependency.`,\n },\n })\n\n .opt({\n 'expect-results': {\n hint: 'value',\n validate: (v: unknown) =>\n typeof v === 'string' && /^([<>]=?)?[0-9]+$/.test(v),\n description: `When running \\`vlt query\\`, this option allows you to\n set a expected number of resulting items.\n\n Accepted values are numbers and strings.\n\n Strings starting with \\`>\\`, \\`<\\`, \\`>=\\` or \\`<=\\`\n followed by a number can be used to check if the result\n is greater than or less than a specific number.`,\n },\n })\n\n .flag({\n 'dry-run': {\n description: 'Run command without making any changes',\n },\n 'expect-lockfile': {\n description:\n 'Fail if lockfile is missing or out of date. Used by ci command to enforce lockfile integrity.',\n },\n 'frozen-lockfile': {\n description:\n 'Fail if lockfile is missing or out of sync with package.json. Prevents any lockfile modifications.',\n },\n 'lockfile-only': {\n description:\n 'Only update the lockfile (vlt-lock.json) and package.json files, skip all node_modules operations including package extraction and filesystem changes.',\n },\n })\n .opt({\n 'allow-scripts': {\n hint: 'query',\n description: `Filter which packages are allowed to run lifecycle scripts using DSS query syntax.\n When provided, only packages matching the query will execute their\n install, preinstall, postinstall, prepare, preprepare, and postprepare scripts.\n Defaults to ':not(*)' which means no scripts will be run.\n \n Example: --allow-scripts=\":root > *, #my-package\"\n Runs scripts only for direct dependencies of the current project and any occurrences\n of a specific dependency with the name \"my-package\" anywhere in the dependency graph.`,\n },\n })\n .opt({\n access: {\n description: 'Set the access level of the package',\n validOptions: ['public', 'restricted'] as const,\n default: 'public',\n },\n })\n .opt({\n otp: {\n description: `Provide an OTP to use when publishing a package.`,\n },\n 'publish-directory': {\n hint: 'path',\n description: `Directory to use for pack and publish operations instead of the current directory.\n The directory must exist and nothing will be copied to it.`,\n },\n port: {\n hint: 'number',\n description: `Port for the browser-based UI server when using vlt serve command (default: 8000).`,\n },\n 'registry-port': {\n hint: 'number',\n description: `Port for the VSR registry when using vlt serve command (default: 1337).`,\n },\n })\n\n .flag({\n yes: {\n short: 'y',\n description: `Automatically accept any confirmation prompts`,\n },\n version: {\n short: 'v',\n description: 'Print the version',\n },\n help: {\n short: 'h',\n description: 'Print helpful information',\n },\n all: {\n short: 'a',\n description: 'Show all commands, bins, and flags',\n },\n })\n\nexport const getSortedCliOptions = () => {\n const defs = definition.toJSON()\n return getSortedKeys().map((k: keyof typeof defs) => {\n const def = defs[k]\n /* c8 ignore next */\n if (!def) throw error('invalid key found', { found: k })\n if (def.type === 'boolean') return `--${k}`\n return `--${k}=<${def.hint ?? k}>`\n })\n}\n\nexport const getSortedKeys = () =>\n Object.keys(definition.toJSON()).sort((a, b) => a.localeCompare(b))\n"]}
1
+ {"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../src/config/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,MAAM,CAAC,MAAM,WAAW;AACtB,uCAAuC;AACvC,OAAO,CAAC,MAAM,CAAC,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AACJ,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE,CAChC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA","sourcesContent":["import { error } from '@vltpkg/error-cause'\nimport { XDG } from '@vltpkg/xdg'\nimport { jack } from 'jackspeak'\n\nexport const defaultView =\n // If stdout is a TTY, use human output\n process.stdout.isTTY ? 'human'\n // If its not a TTY but is a CI environment, use human output\n // TODO: make a better view option for CI environments\n : process.env.CI ? 'human'\n // Otherwise, use json output\n : 'json'\n\nexport const defaultEditor = () =>\n process.env.EDITOR ||\n process.env.VISUAL ||\n (process.platform === 'win32' ?\n `${process.env.SYSTEMROOT}\\\\notepad.exe`\n : 'vi')\n\nconst canonicalCommands = {\n bugs: 'bugs',\n build: 'build',\n cache: 'cache',\n ci: 'ci',\n config: 'config',\n docs: 'docs',\n exec: 'exec',\n 'exec-local': 'exec-local',\n help: 'help',\n init: 'init',\n install: 'install',\n login: 'login',\n logout: 'logout',\n list: 'list',\n ls: 'ls',\n pack: 'pack',\n pkg: 'pkg',\n publish: 'publish',\n query: 'query',\n 'run-exec': 'run-exec',\n run: 'run',\n serve: 'serve',\n token: 'token',\n uninstall: 'uninstall',\n update: 'update',\n 'exec-cache': 'exec-cache',\n version: 'version',\n whoami: 'whoami',\n} as const\n\nconst aliases = {\n i: 'install',\n add: 'install',\n rm: 'uninstall',\n u: 'update',\n p: 'pkg',\n pub: 'publish',\n q: 'query',\n b: 'build',\n r: 'run',\n 'run-script': 'run',\n rx: 'run-exec',\n s: 'serve',\n x: 'exec',\n xl: 'exec-local',\n h: 'help',\n '?': 'help',\n ls: 'list',\n xc: 'exec-cache',\n} as const\n\n/**\n * Command aliases mapped to their canonical names\n */\nexport const commands = {\n ...canonicalCommands,\n ...aliases,\n} as const\n\n/**\n * Canonical command names mapped to an array of its aliases\n */\nexport const commandAliases = Object.entries(aliases).reduce(\n (acc, [alias, canonical]) => {\n const commandAliases = acc.get(canonical)\n if (commandAliases) {\n commandAliases.push(alias)\n } else {\n acc.set(canonical, [alias])\n }\n return acc\n },\n new Map<string, string[]>(),\n)\n\nexport type Commands = typeof commands\n\nexport const getCommand = (\n s?: string,\n): Commands[keyof Commands] | undefined =>\n s && s in commands ? commands[s as keyof Commands] : undefined\n\nconst xdg = new XDG('vlt')\nconst cacheDir = xdg.cache()\n\n/**\n * Fields that are parsed as a set of key=value pairs\n */\nexport const recordFields = [\n 'git-hosts',\n 'registries',\n 'git-host-archives',\n 'scope-registries',\n 'jsr-registries',\n] as const\n\nexport type RecordField = (typeof recordFields)[number]\n\nexport const isRecordField = (s: string): s is RecordField =>\n recordFields.includes(s as RecordField)\n\nconst stopParsingCommands: Commands[keyof Commands][] = [\n 'run',\n 'run-exec',\n 'exec-local',\n 'exec',\n]\n\nlet stopParsing: boolean | undefined = undefined\n\nconst j = jack({\n envPrefix: 'VLT',\n allowPositionals: true,\n usage: `vlt [<options>] [<cmd> [<args> ...]]`,\n stopAtPositionalTest: arg => {\n if (stopParsing) return true\n const a = arg as keyof Commands\n // we stop parsing AFTER the thing, so you can do\n // vlt run --vlt --configs scriptName --args --for --script\n // or\n // vlt exec --vlt --configs command --args --for --command\n if (stopParsingCommands.includes(commands[a])) {\n stopParsing = true\n }\n return false\n },\n})\n .heading('vlt')\n .description(\n `More documentation available at <https://docs.vlt.sh>`,\n )\n .heading('Subcommands')\n\nj.description(Object.keys(canonicalCommands).join(', '), {\n pre: true,\n}).description(\n 'Run `vlt <cmd> --help` for more information about a specific command',\n)\n\nexport const definition = j\n /**\n * Definition of all configuration values used by vlt.\n */\n .heading('Configuration')\n .description(\n `If a \\`vlt.json\\` file is present in the root of the current project,\n then that will be used as a source of configuration information.\n\n Next, the \\`vlt.json\\` file in the XDG specified config directory\n will be checked, and loaded for any fields not set in the local project.\n\n Object type values will be merged together. Set a field to \\`null\\` in\n the JSON configuration to explicitly remove it.\n\n Command-specific fields may be set in a nested \\`command\\` object that\n overrides any options defined at the top level.\n `,\n )\n\n .flag({\n color: {\n short: 'c',\n description: 'Use colors (Default for TTY)',\n },\n 'no-color': {\n short: 'C',\n description: 'Do not use colors (Default for non-TTY)',\n },\n })\n\n .opt({\n registry: {\n hint: 'url',\n default: 'https://registry.npmjs.org/',\n description: `Sets the registry for fetching packages, when no registry\n is explicitly set on a specifier.\n\n For example, \\`express@latest\\` will be resolved by looking\n up the metadata from this registry.\n\n Note that alias specifiers starting with \\`npm:\\` will\n still map to \\`https://registry.npmjs.org/\\` if this is\n changed, unless the a new mapping is created via the\n \\`--registries\\` option.\n `,\n },\n })\n\n .optList({\n registries: {\n hint: 'name=url',\n description: `Specify named registry hosts by their prefix. To set the\n default registry used for non-namespaced specifiers,\n use the \\`--registry\\` option.\n\n Prefixes can be used as a package alias. For example:\n\n \\`\\`\\`\n vlt --registries loc=http://reg.local install foo@loc:foo@1.x\n \\`\\`\\`\n\n By default, the public npm registry is registered to the\n \\`npm:\\` prefix. It is not recommended to change this\n mapping in most cases.\n `,\n },\n\n 'scope-registries': {\n hint: '@scope=url',\n description: `Map package name scopes to registry URLs.\n\n For example,\n \\`--scope-registries @acme=https://registry.acme/\\`\n would tell vlt to fetch any packages named\n \\`@acme/...\\` from the \\`https://registry.acme/\\`\n registry.\n\n Note: this way of specifying registries is more ambiguous,\n compared with using the \\`--registries\\` field and explicit\n prefixes, because instead of failing when the configuration\n is absent, it will instead attempt to fetch from the\n default registry.\n\n By comparison, using\n \\`--registries acme=https://registry.acme/\\` and then\n specifying dependencies such as \\`\"foo\": \"acme:foo@1.x\"\\`\n means that regardless of the name, the package will be\n fetched from the explicitly named registry, or fail if\n no registry is defined with that name.\n\n However, custom registry aliases are not supported by other\n package managers.`,\n },\n\n 'jsr-registries': {\n hint: 'name=url',\n description: `Map alias names to JSR.io registry urls.\n\n For example,\n \\`--jsr-registries acme=https://jsr.acme.io/\\` would\n tell vlt to fetch any packages with the \\`acme:\\` registry\n prefix from the \\`https://jsr.acme.io/\\` registry, using\n the \"npm Compatibility\" translation. So for example,\n the package \\`acme:@foo/bar\\` would fetch the\n \\`@jsr/foo__bar\\` package from the \\`jsr.acme.io\\`\n registry.\n\n By default the \\`jsr\\` alias is always mapped to\n \\`https://npm.jsr.io/\\`, so existing \\`jsr:\\` packages will\n be fetched from the public \\`jsr\\` registry appropriately.\n `,\n },\n\n 'git-hosts': {\n hint: `name=template`,\n short: 'G',\n description: `Map a shorthand name to a git remote URL template.\n\n The \\`template\\` may contain placeholders, which will be\n swapped with the relevant values.\n\n \\`$1\\`, \\`$2\\`, etc. are replaced with the appropriate\n n-th path portion. For example, \\`github:user/project\\`\n would replace the \\`$1\\` in the template with \\`user\\`,\n and \\`$2\\` with \\`project\\`.`,\n },\n\n 'git-host-archives': {\n hint: `name=template`,\n short: 'A',\n description: `Similar to the \\`--git-host <name>=<template>\\` option,\n this option can define a template string that will be\n expanded to provide the URL to download a pre-built\n tarball of the git repository.\n\n In addition to the n-th path portion expansions performed\n by \\`--git-host\\`, this field will also expand the\n string \\`$committish\\` in the template, replacing it with\n the resolved git committish value to be fetched.`,\n },\n })\n\n .opt({\n cache: {\n hint: 'path',\n description: `\n Location of the vlt on-disk cache. Defaults to the platform-specific\n directory recommended by the XDG specification.\n `,\n default: cacheDir,\n },\n tag: {\n description: `Default \\`dist-tag\\` to install or publish`,\n default: 'latest',\n },\n before: {\n hint: 'date',\n description: `Do not install any packages published after this date`,\n },\n os: {\n description: `The operating system to use as the selector when choosing\n packages based on their \\`os\\` value.`,\n default: process.platform,\n },\n arch: {\n description: `CPU architecture to use as the selector when choosing\n packages based on their \\`cpu\\` value.`,\n default: process.arch,\n },\n 'node-version': {\n hint: 'version',\n description: `Node version to use when choosing packages based on\n their \\`engines.node\\` value.`,\n default: process.version,\n },\n })\n\n .flag({\n 'git-shallow': {\n description: `Set to force \\`--depth=1\\` on all git clone actions.\n When set explicitly to false with --no-git-shallow,\n then \\`--depth=1\\` will not be used.\n\n When not set explicitly, \\`--depth=1\\` will be used for\n git hosts known to support this behavior.`,\n },\n })\n .num({\n 'fetch-retries': {\n hint: 'n',\n description: `Number of retries to perform when encountering network\n errors or likely-transient errors from git hosts.`,\n default: 3,\n },\n 'fetch-retry-factor': {\n hint: 'n',\n description: `The exponential backoff factor to use when retrying\n requests due to network issues.`,\n default: 2,\n },\n 'fetch-retry-mintimeout': {\n hint: 'n',\n description: `Number of milliseconds before starting first retry`,\n default: 0,\n },\n 'fetch-retry-maxtimeout': {\n hint: 'n',\n description: `Maximum number of milliseconds between two retries`,\n default: 30_000,\n },\n 'stale-while-revalidate-factor': {\n hint: 'n',\n default: 60,\n description: `If the server does not serve a \\`stale-while-revalidate\\`\n value in the \\`cache-control\\` header, then this multiplier\n is applied to the \\`max-age\\` or \\`s-maxage\\` values.\n\n By default, this is \\`60\\`, so for example a response that\n is cacheable for 5 minutes will allow a stale response\n while revalidating for up to 5 hours.\n\n If the server *does* provide a \\`stale-while-revalidate\\`\n value, then that is always used.\n\n Set to 0 to prevent any \\`stale-while-revalidate\\` behavior\n unless explicitly allowed by the server's \\`cache-control\\`\n header.\n `,\n },\n })\n\n .opt({\n identity: {\n short: 'i',\n validate: (v: unknown) =>\n typeof v === 'string' && /^[a-z0-9]*$/.test(v),\n hint: 'name',\n default: '',\n description: `Provide a string to define an identity for storing auth\n information when logging into registries.\n\n Authentication tokens will be stored in the XDG data\n directory, in \\`vlt/auth/$\\{identity}/keychain.json\\`.\n\n If no identity is provided, then the default \\`''\\` will\n be used, storing the file at \\`vlt/auth/keychain.json\\`.\n\n May only contain lowercase alphanumeric characters.\n `,\n },\n })\n\n .optList({\n workspace: {\n hint: 'ws',\n short: 'w',\n description: `Set to limit the spaces being worked on when working on\n workspaces.\n\n Can be paths or glob patterns matching paths.\n\n Specifying workspaces by package.json name is not\n supported.`,\n },\n 'workspace-group': {\n short: 'g',\n description: `Specify named workspace group names to load and operate on\n when doing recursive operations on workspaces.`,\n },\n })\n\n .opt({\n scope: {\n short: 's',\n hint: 'query',\n description:\n 'Set to filter the scope of an operation using a DSS Query.',\n },\n target: {\n short: 't',\n hint: 'query',\n description:\n 'Set to select packages using a DSS Query selector.',\n },\n })\n\n .flag({\n 'if-present': {\n description: `When running scripts across multiple packages,\n only include packages that have the script.\n\n If this is not set, then the run will fail if any\n packages do not have the script.\n\n This will default to true if --scope, --workspace,\n --workspace-group, or --recursive is set. Otherwise,\n it will default to false.`,\n },\n })\n\n .flag({\n recursive: {\n short: 'r',\n description: `Run an operation across multiple workspaces.\n\n No effect when used in non-monorepo projects.\n\n Implied by setting --workspace or --workspace-group. If\n not set, then the action is run on the project root.`,\n },\n\n bail: {\n short: 'b',\n description: `When running scripts across multiple workspaces, stop\n on the first failure.`,\n default: true,\n },\n\n 'no-bail': {\n short: 'B',\n description: `When running scripts across multiple workspaces, continue\n on failure, running the script for all workspaces.`,\n },\n })\n\n .opt({\n config: {\n hint: 'all | user | project',\n description: `Specify which configuration to show or operate on when running\n \\`vlt config\\` commands. For read operations (get, pick, list):\n \\`all\\` shows merged configuration from both user and project\n files (default). For write operations (set, delete, edit):\n defaults to \\`project\\`. \\`user\\` shows/modifies only user-level\n configuration, \\`project\\` shows/modifies only project-level\n configuration.`,\n validOptions: ['all', 'user', 'project'] as const,\n default: 'all',\n },\n\n editor: {\n hint: 'program',\n description: `The blocking editor to use for \\`vlt config edit\\` and\n any other cases where a file should be opened for\n editing.\n\n Defaults to the \\`EDITOR\\` or \\`VISUAL\\` env if set, or\n \\`notepad.exe\\` on Windows, or \\`vi\\` elsewhere.`,\n default: defaultEditor(),\n },\n\n 'script-shell': {\n hint: 'program',\n description: `The shell to use when executing \\`package.json#scripts\\`.\n\n For \\`vlt exec\\` and \\`vlt exec-local\\`, this is never set,\n meaning that command arguments are run exactly as provided.\n\n For \\`vlt run\\` (and other things that run lifecycle\n scripts in \\`package.json#scripts\\`), the entire command\n with all arguments is provided as a single string, meaning\n that some value must be provided for shell interpretation,\n and so for these contexts, the \\`script-shell\\` value will\n default to \\`/bin/sh\\` on POSIX systems or \\`cmd.exe\\` on\n Windows.\n `,\n },\n\n 'fallback-command': {\n hint: 'command',\n description: `The command to run when the first argument doesn't\n match any known commands.\n\n For pnpm-style behavior, set this to 'run-exec'. e.g:\n \\`\\`\\`\n vlt config set fallback-command=run-exec\n \\`\\`\\``,\n default: 'help',\n validOptions: Object.keys(canonicalCommands),\n },\n })\n\n .opt({\n package: {\n hint: 'p',\n description: `When running \\`vlt exec\\`, this allows you to explicitly\n set the package to search for bins. If not provided, then\n vlt will interpret the first argument as the package, and\n attempt to run the default executable.`,\n },\n })\n\n .opt({\n view: {\n hint: 'output',\n default: defaultView,\n description: `Configures the output format for commands.\n\n Defaults to \\`human\\` if stdout is a TTY, or \\`json\\`\n if it is not.\n\n - human: Maximally ergonomic output reporting for human\n consumption.\n - json: Parseable JSON output for machines.\n - inspect: Output results with \\`util.inspect\\`.\n - gui: Start a local web server and opens a browser to\n explore the results. (Only relevant for certain\n commands.)\n - mermaid: Output mermaid diagramming syntax. (Only\n relevant for certain commands.)\n - silent: Suppress all output to stdout.\n\n If the requested view format is not supported for the\n current command, or if no option is provided, then it\n will fall back to the default.\n `,\n validOptions: [\n 'human',\n 'json',\n 'mermaid',\n 'gui',\n 'inspect',\n 'silent',\n ] as const,\n },\n })\n\n .optList({\n 'dashboard-root': {\n hint: 'path',\n description: `The root directory to use for the dashboard browser-based UI.\n If not set, the user home directory is used.`,\n },\n })\n\n .flag({\n 'save-dev': {\n short: 'D',\n description: `Save installed packages to a package.json file as\n devDependencies`,\n },\n 'save-optional': {\n short: 'O',\n description: `Save installed packages to a package.json file as\n optionalDependencies`,\n },\n 'save-peer': {\n description: `Save installed packages to a package.json file as\n peerDependencies`,\n },\n 'save-prod': {\n short: 'P',\n description: `Save installed packages into dependencies specifically.\n This is useful if a package already exists in\n devDependencies or optionalDependencies, but you want to\n move it to be a non-optional production dependency.`,\n },\n })\n\n .opt({\n 'expect-results': {\n hint: 'value',\n validate: (v: unknown) =>\n typeof v === 'string' && /^([<>]=?)?[0-9]+$/.test(v),\n description: `When running \\`vlt query\\`, this option allows you to\n set a expected number of resulting items.\n\n Accepted values are numbers and strings.\n\n Strings starting with \\`>\\`, \\`<\\`, \\`>=\\` or \\`<=\\`\n followed by a number can be used to check if the result\n is greater than or less than a specific number.`,\n },\n })\n\n .flag({\n 'dry-run': {\n description: 'Run command without making any changes',\n },\n 'expect-lockfile': {\n description:\n 'Fail if lockfile is missing or out of date. Used by ci command to enforce lockfile integrity.',\n },\n 'frozen-lockfile': {\n description:\n 'Fail if lockfile is missing or out of sync with package.json. Prevents any lockfile modifications.',\n },\n 'lockfile-only': {\n description:\n 'Only update the lockfile (vlt-lock.json) and package.json files, skip all node_modules operations including package extraction and filesystem changes.',\n },\n })\n .opt({\n 'allow-scripts': {\n hint: 'query',\n description: `Filter which packages are allowed to run lifecycle scripts using DSS query syntax.\n When provided, only packages matching the query will execute their\n install, preinstall, postinstall, prepare, preprepare, and postprepare scripts.\n Defaults to ':not(*)' which means no scripts will be run.\n \n Example: --allow-scripts=\":root > *, #my-package\"\n Runs scripts only for direct dependencies of the current project and any occurrences\n of a specific dependency with the name \"my-package\" anywhere in the dependency graph.`,\n },\n })\n .opt({\n access: {\n description: 'Set the access level of the package',\n validOptions: ['public', 'restricted'] as const,\n default: 'public',\n },\n })\n .opt({\n otp: {\n description: `Provide an OTP to use when publishing a package.`,\n },\n 'publish-directory': {\n hint: 'path',\n description: `Directory to use for pack and publish operations instead of the current directory.\n The directory must exist and nothing will be copied to it.`,\n },\n port: {\n hint: 'number',\n description: `Port for the browser-based UI server when using vlt serve command (default: 8000).`,\n },\n 'registry-port': {\n hint: 'number',\n description: `Port for the VSR registry when using vlt serve command (default: 1337).`,\n },\n })\n\n .flag({\n yes: {\n short: 'y',\n description: `Automatically accept any confirmation prompts`,\n },\n version: {\n short: 'v',\n description: 'Print the version',\n },\n help: {\n short: 'h',\n description: 'Print helpful information',\n },\n all: {\n short: 'a',\n description: 'Show all commands, bins, and flags',\n },\n })\n\nexport const getSortedCliOptions = () => {\n const defs = definition.toJSON()\n return getSortedKeys().map((k: keyof typeof defs) => {\n const def = defs[k]\n /* c8 ignore next */\n if (!def) throw error('invalid key found', { found: k })\n if (def.type === 'boolean') return `--${k}`\n return `--${k}=<${def.hint ?? k}>`\n })\n}\n\nexport const getSortedKeys = () =>\n Object.keys(definition.toJSON()).sort((a, b) => a.localeCompare(b))\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vltpkg/cli-sdk",
3
3
  "description": "The source for the vlt CLI",
4
- "version": "1.0.0-rc.5",
4
+ "version": "1.0.0-rc.7",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/vltpkg/vltpkg.git",
@@ -43,30 +43,30 @@
43
43
  "ssri": "^12.0.0",
44
44
  "supports-color": "^10.2.0",
45
45
  "tar": "^7.4.3",
46
- "@vltpkg/dep-id": "1.0.0-rc.5",
47
- "@vltpkg/error-cause": "1.0.0-rc.5",
48
- "@vltpkg/git": "1.0.0-rc.5",
49
- "@vltpkg/dot-prop": "1.0.0-rc.5",
50
- "@vltpkg/config": "1.0.0-rc.5",
51
- "@vltpkg/graph": "1.0.0-rc.5",
52
- "@vltpkg/init": "1.0.0-rc.5",
53
- "@vltpkg/package-info": "1.0.0-rc.5",
54
- "@vltpkg/package-json": "1.0.0-rc.5",
55
- "@vltpkg/output": "1.0.0-rc.5",
56
- "@vltpkg/promise-spawn": "1.0.0-rc.5",
57
- "@vltpkg/query": "1.0.0-rc.5",
58
- "@vltpkg/registry-client": "1.0.0-rc.5",
59
- "@vltpkg/rollback-remove": "1.0.0-rc.5",
60
- "@vltpkg/run": "1.0.0-rc.5",
61
- "@vltpkg/security-archive": "1.0.0-rc.5",
62
- "@vltpkg/server": "1.0.0-rc.5",
63
- "@vltpkg/spec": "1.0.0-rc.5",
64
- "@vltpkg/url-open": "1.0.0-rc.5",
65
- "@vltpkg/types": "1.0.0-rc.5",
66
- "@vltpkg/vlt-json": "1.0.0-rc.5",
67
- "@vltpkg/vlx": "1.0.0-rc.5",
68
- "@vltpkg/xdg": "1.0.0-rc.5",
69
- "@vltpkg/workspaces": "1.0.0-rc.5"
46
+ "@vltpkg/config": "1.0.0-rc.7",
47
+ "@vltpkg/dep-id": "1.0.0-rc.7",
48
+ "@vltpkg/error-cause": "1.0.0-rc.7",
49
+ "@vltpkg/dot-prop": "1.0.0-rc.7",
50
+ "@vltpkg/git": "1.0.0-rc.7",
51
+ "@vltpkg/graph": "1.0.0-rc.7",
52
+ "@vltpkg/output": "1.0.0-rc.7",
53
+ "@vltpkg/init": "1.0.0-rc.7",
54
+ "@vltpkg/package-info": "1.0.0-rc.7",
55
+ "@vltpkg/package-json": "1.0.0-rc.7",
56
+ "@vltpkg/promise-spawn": "1.0.0-rc.7",
57
+ "@vltpkg/query": "1.0.0-rc.7",
58
+ "@vltpkg/run": "1.0.0-rc.7",
59
+ "@vltpkg/registry-client": "1.0.0-rc.7",
60
+ "@vltpkg/security-archive": "1.0.0-rc.7",
61
+ "@vltpkg/server": "1.0.0-rc.7",
62
+ "@vltpkg/rollback-remove": "1.0.0-rc.7",
63
+ "@vltpkg/spec": "1.0.0-rc.7",
64
+ "@vltpkg/types": "1.0.0-rc.7",
65
+ "@vltpkg/vlt-json": "1.0.0-rc.7",
66
+ "@vltpkg/vlx": "1.0.0-rc.7",
67
+ "@vltpkg/url-open": "1.0.0-rc.7",
68
+ "@vltpkg/xdg": "1.0.0-rc.7",
69
+ "@vltpkg/workspaces": "1.0.0-rc.7"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@eslint/js": "^9.34.0",