@vltpkg/cli-sdk 0.0.0-30 → 0.0.0-32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/esm/commands/build.d.ts +25 -0
  2. package/dist/esm/commands/build.d.ts.map +1 -0
  3. package/dist/esm/commands/build.js +102 -0
  4. package/dist/esm/commands/build.js.map +1 -0
  5. package/dist/esm/commands/ci.d.ts +5 -4
  6. package/dist/esm/commands/ci.d.ts.map +1 -1
  7. package/dist/esm/commands/ci.js +6 -3
  8. package/dist/esm/commands/ci.js.map +1 -1
  9. package/dist/esm/commands/config.d.ts +3 -2
  10. package/dist/esm/commands/config.d.ts.map +1 -1
  11. package/dist/esm/commands/config.js +379 -58
  12. package/dist/esm/commands/config.js.map +1 -1
  13. package/dist/esm/commands/docs.d.ts +18 -0
  14. package/dist/esm/commands/docs.d.ts.map +1 -0
  15. package/dist/esm/commands/docs.js +154 -0
  16. package/dist/esm/commands/docs.js.map +1 -0
  17. package/dist/esm/commands/exec-cache.js +12 -0
  18. package/dist/esm/commands/exec-cache.js.map +1 -1
  19. package/dist/esm/commands/exec.d.ts.map +1 -1
  20. package/dist/esm/commands/exec.js +6 -0
  21. package/dist/esm/commands/exec.js.map +1 -1
  22. package/dist/esm/commands/install/reporter.d.ts +2 -1
  23. package/dist/esm/commands/install/reporter.d.ts.map +1 -1
  24. package/dist/esm/commands/install/reporter.js +35 -6
  25. package/dist/esm/commands/install/reporter.js.map +1 -1
  26. package/dist/esm/commands/install.d.ts +21 -3
  27. package/dist/esm/commands/install.d.ts.map +1 -1
  28. package/dist/esm/commands/install.js +21 -3
  29. package/dist/esm/commands/install.js.map +1 -1
  30. package/dist/esm/commands/serve.d.ts.map +1 -1
  31. package/dist/esm/commands/serve.js +6 -0
  32. package/dist/esm/commands/serve.js.map +1 -1
  33. package/dist/esm/commands/uninstall.d.ts +8 -2
  34. package/dist/esm/commands/uninstall.d.ts.map +1 -1
  35. package/dist/esm/commands/uninstall.js +8 -3
  36. package/dist/esm/commands/uninstall.js.map +1 -1
  37. package/dist/esm/commands/update.d.ts +7 -3
  38. package/dist/esm/commands/update.d.ts.map +1 -1
  39. package/dist/esm/commands/update.js +19 -3
  40. package/dist/esm/commands/update.js.map +1 -1
  41. package/dist/esm/config/definition.d.ts +16 -2
  42. package/dist/esm/config/definition.d.ts.map +1 -1
  43. package/dist/esm/config/definition.js +30 -6
  44. package/dist/esm/config/definition.js.map +1 -1
  45. package/dist/esm/start-gui.d.ts.map +1 -1
  46. package/dist/esm/start-gui.js +11 -2
  47. package/dist/esm/start-gui.js.map +1 -1
  48. package/package.json +26 -25
@@ -0,0 +1,25 @@
1
+ import type { BuildResult } from '@vltpkg/graph';
2
+ import type { CommandFn, CommandUsage } from '../index.ts';
3
+ export declare const views: {
4
+ readonly human: (result: BuildResult) => string;
5
+ readonly json: (result: BuildResult) => {
6
+ success: {
7
+ id: import("@vltpkg/dep-id").DepID;
8
+ name: string;
9
+ version: string | undefined;
10
+ }[];
11
+ failure: {
12
+ id: import("@vltpkg/dep-id").DepID;
13
+ name: string;
14
+ version: string | undefined;
15
+ }[];
16
+ message: string;
17
+ };
18
+ };
19
+ export declare const usage: CommandUsage;
20
+ /**
21
+ * Build command implementation. Runs any required "postinstall"
22
+ * lifecycle scripts and binary linking.
23
+ */
24
+ export declare const command: CommandFn<BuildResult>;
25
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/commands/build.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAQ,MAAM,eAAe,CAAA;AAGtD,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAI1D,eAAO,MAAM,KAAK;6BACA,WAAW,KAAG,MAAM;4BAqBrB,WAAW;;;;;;;;;;;;;CAqBW,CAAA;AAEvC,eAAO,MAAM,KAAK,EAAE,YAsBhB,CAAA;AAWJ;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,SAAS,CAAC,WAAW,CAqC1C,CAAA"}
@@ -0,0 +1,102 @@
1
+ import { build } from '@vltpkg/graph';
2
+ import { error } from '@vltpkg/error-cause';
3
+ import { commandUsage } from "../config/usage.js";
4
+ import { isErrorWithCause } from '@vltpkg/types';
5
+ export const views = {
6
+ human: (result) => {
7
+ const successCount = result.success.length;
8
+ const failureCount = result.failure.length;
9
+ const messages = [];
10
+ if (successCount > 0) {
11
+ messages.push(`🔨 Built ${successCount} package${successCount === 1 ? '' : 's'} successfully.`);
12
+ }
13
+ else {
14
+ messages.push('📦 All packages are already built.');
15
+ }
16
+ if (failureCount > 0) {
17
+ messages.push(`🔎 ${failureCount} optional package${ /* c8 ignore next */failureCount === 1 ? '' : 's'} failed to build.`);
18
+ }
19
+ return messages.join('\n');
20
+ },
21
+ json: (result) => {
22
+ const successList = result.success.map(node => ({
23
+ id: node.id,
24
+ name: node.name,
25
+ version: node.version,
26
+ }));
27
+ const failureList = result.failure.map(node => ({
28
+ id: node.id,
29
+ name: node.name,
30
+ version: node.version,
31
+ }));
32
+ return {
33
+ success: successList,
34
+ failure: failureList,
35
+ message: successList.length > 0 ?
36
+ `Built ${successList.length} package${successList.length === 1 ? '' : 's'}.`
37
+ : 'No packages needed building.',
38
+ };
39
+ },
40
+ };
41
+ export const usage = () => commandUsage({
42
+ command: 'build',
43
+ usage: ['[query]', '[--target=<query>]'],
44
+ description: `Build the project based on the current dependency graph.
45
+
46
+ This command processes the installed packages in node_modules and runs
47
+ any necessary build steps, such as lifecycle scripts and binary linking.
48
+
49
+ The build process is idempotent and will only perform work that is
50
+ actually needed based on the current state of the dependency graph.
51
+
52
+ Use --target option or provide a query as a positional argument to filter
53
+ packages using DSS query language syntax, otherwise it will target
54
+ all packages with scripts (:scripts) by default.`,
55
+ options: {
56
+ target: {
57
+ value: '<query>',
58
+ description: 'Query selector to filter packages using DSS syntax.',
59
+ },
60
+ },
61
+ });
62
+ const isGraphRunError = (error) => typeof error === 'object' &&
63
+ error !== null &&
64
+ 'code' in error &&
65
+ error.code === 'GRAPHRUN_TRAVERSAL' &&
66
+ 'node' in error;
67
+ /**
68
+ * Build command implementation. Runs any required "postinstall"
69
+ * lifecycle scripts and binary linking.
70
+ */
71
+ export const command = async (conf) => {
72
+ const { options, projectRoot } = conf;
73
+ try {
74
+ // Get target from option or first positional, default to all scripts
75
+ const targetOption = conf.get('target');
76
+ const targetPositional = conf.positionals[0];
77
+ const target = targetOption ||
78
+ targetPositional ||
79
+ ':scripts:not(:built):not(:malware)';
80
+ // Run the build process using the graph build function
81
+ const result = await build({
82
+ ...options,
83
+ projectRoot,
84
+ packageJson: options.packageJson,
85
+ monorepo: options.monorepo,
86
+ scurry: options.scurry,
87
+ target,
88
+ });
89
+ return result;
90
+ }
91
+ catch (cause) {
92
+ const graphRunError = isErrorWithCause(cause) && isGraphRunError(cause.cause) ?
93
+ cause.cause
94
+ : undefined;
95
+ if (graphRunError?.code === 'GRAPHRUN_TRAVERSAL') {
96
+ throw error('Build failed:\n Failed to build package: ' +
97
+ `${graphRunError.node.name}@${graphRunError.node.version}`, { cause });
98
+ }
99
+ throw error('Build failed', { cause });
100
+ }
101
+ };
102
+ //# sourceMappingURL=build.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.js","sourceRoot":"","sources":["../../../src/commands/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAErC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAGjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAEhD,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,KAAK,EAAE,CAAC,MAAmB,EAAU,EAAE;QACrC,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAA;QAC1C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AAC,MAAM;YACtB,MAAM;SACP,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,aAAa,GACjB,gBAAgB,CAAC,KAAK,CAAC,IAAI,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;YACvD,KAAK,CAAC,KAAK;YACb,CAAC,CAAC,SAAS,CAAA;QACb,IAAI,aAAa,EAAE,IAAI,KAAK,oBAAoB,EAAE,CAAC;YACjD,MAAM,KAAK,CACT,4CAA4C;gBAC1C,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,IAAI,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,EAC5D,EAAE,KAAK,EAAE,CACV,CAAA;QACH,CAAC;QACD,MAAM,KAAK,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;IACxC,CAAC;AACH,CAAC,CAAA","sourcesContent":["import { build } from '@vltpkg/graph'\nimport type { BuildResult, Node } from '@vltpkg/graph'\nimport { error } from '@vltpkg/error-cause'\nimport { commandUsage } from '../config/usage.ts'\nimport type { CommandFn, CommandUsage } from '../index.ts'\nimport type { Views } from '../view.ts'\nimport { isErrorWithCause } from '@vltpkg/types'\n\nexport const views = {\n human: (result: BuildResult): string => {\n const successCount = result.success.length\n const failureCount = result.failure.length\n const messages: string[] = []\n\n if (successCount > 0) {\n messages.push(\n `🔨 Built ${successCount} package${successCount === 1 ? '' : 's'} successfully.`,\n )\n } else {\n messages.push('📦 All packages are already built.')\n }\n\n if (failureCount > 0) {\n messages.push(\n `🔎 ${failureCount} optional package${/* c8 ignore next */ failureCount === 1 ? '' : 's'} failed to build.`,\n )\n }\n\n return messages.join('\\n')\n },\n json: (result: BuildResult) => {\n const successList = result.success.map(node => ({\n id: node.id,\n name: node.name,\n version: node.version,\n }))\n const failureList = result.failure.map(node => ({\n id: node.id,\n name: node.name,\n version: node.version,\n }))\n\n return {\n success: successList,\n failure: failureList,\n message:\n successList.length > 0 ?\n `Built ${successList.length} package${successList.length === 1 ? '' : 's'}.`\n : 'No packages needed building.',\n }\n },\n} as const satisfies Views<BuildResult>\n\nexport const usage: CommandUsage = () =>\n commandUsage({\n command: 'build',\n usage: ['[query]', '[--target=<query>]'],\n description: `Build the project based on the current dependency graph.\n\n This command processes the installed packages in node_modules and runs\n any necessary build steps, such as lifecycle scripts and binary linking.\n \n The build process is idempotent and will only perform work that is\n actually needed based on the current state of the dependency graph.\n \n Use --target option or provide a query as a positional argument to filter\n packages using DSS query language syntax, otherwise it will target\n all packages with scripts (:scripts) by default.`,\n options: {\n target: {\n value: '<query>',\n description:\n 'Query selector to filter packages using DSS syntax.',\n },\n },\n })\n\nconst isGraphRunError = (\n error: unknown,\n): error is Error & { code: string; node: Node } =>\n typeof error === 'object' &&\n error !== null &&\n 'code' in error &&\n error.code === 'GRAPHRUN_TRAVERSAL' &&\n 'node' in error\n\n/**\n * Build command implementation. Runs any required \"postinstall\"\n * lifecycle scripts and binary linking.\n */\nexport const command: CommandFn<BuildResult> = async conf => {\n const { options, projectRoot } = conf\n\n try {\n // Get target from option or first positional, default to all scripts\n const targetOption = conf.get('target')\n const targetPositional = conf.positionals[0]\n const target =\n targetOption ||\n targetPositional ||\n ':scripts:not(:built):not(:malware)'\n\n // Run the build process using the graph build function\n const result = await build({\n ...options,\n projectRoot,\n packageJson: options.packageJson,\n monorepo: options.monorepo,\n scurry: options.scurry,\n target,\n })\n\n return result\n } catch (cause) {\n const graphRunError =\n isErrorWithCause(cause) && isGraphRunError(cause.cause) ?\n cause.cause\n : undefined\n if (graphRunError?.code === 'GRAPHRUN_TRAVERSAL') {\n throw error(\n 'Build failed:\\n Failed to build package: ' +\n `${graphRunError.node.name}@${graphRunError.node.version}`,\n { cause },\n )\n }\n throw error('Build failed', { cause })\n }\n}\n"]}
@@ -1,10 +1,11 @@
1
- import type { Graph } from '@vltpkg/graph';
2
- import type { CommandFn, CommandUsage } from '../index.ts';
3
1
  import { InstallReporter } from './install/reporter.ts';
2
+ import type { CommandFn, CommandUsage } from '../index.ts';
3
+ import type { InstallResult } from './install.ts';
4
+ export type CIResult = Omit<InstallResult, 'buildQueue'>;
4
5
  export declare const usage: CommandUsage;
5
6
  export declare const views: {
6
- readonly json: (g: Graph) => import("@vltpkg/graph").LockfileData;
7
+ readonly json: (i: CIResult) => import("@vltpkg/graph").LockfileData;
7
8
  readonly human: typeof InstallReporter;
8
9
  };
9
- export declare const command: CommandFn<Graph>;
10
+ export declare const command: CommandFn<CIResult>;
10
11
  //# sourceMappingURL=ci.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ci.d.ts","sourceRoot":"","sources":["../../../src/commands/ci.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAE1C,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG1D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD,eAAO,MAAM,KAAK,EAAE,YAWhB,CAAA;AAEJ,eAAO,MAAM,KAAK;;;CAGe,CAAA;AAEjC,eAAO,MAAM,OAAO,EAAE,SAAS,CAAC,KAAK,CAUpC,CAAA"}
1
+ {"version":3,"file":"ci.d.ts","sourceRoot":"","sources":["../../../src/commands/ci.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAEjD,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAAA;AAExD,eAAO,MAAM,KAAK,EAAE,YAWhB,CAAA;AAEJ,eAAO,MAAM,KAAK;;;CAGkB,CAAA;AAEpC,eAAO,MAAM,OAAO,EAAE,SAAS,CAAC,QAAQ,CAavC,CAAA"}
@@ -1,5 +1,5 @@
1
- import { commandUsage } from "../config/usage.js";
2
1
  import { install } from '@vltpkg/graph';
2
+ import { commandUsage } from "../config/usage.js";
3
3
  import { InstallReporter } from "./install/reporter.js";
4
4
  export const usage = () => commandUsage({
5
5
  command: 'ci',
@@ -13,17 +13,20 @@ export const usage = () => commandUsage({
13
13
  },
14
14
  });
15
15
  export const views = {
16
- json: g => g.toJSON(),
16
+ json: i => i.graph.toJSON(),
17
17
  human: InstallReporter,
18
18
  };
19
19
  export const command = async (conf) => {
20
20
  const ciOptions = {
21
21
  ...conf.options,
22
+ // allow all scripts by default on ci (unless user specifies a filter)
23
+ allowScripts: conf.get('allow-scripts') ?? '*',
22
24
  expectLockfile: true,
23
25
  frozenLockfile: true,
24
26
  cleanInstall: true,
27
+ lockfileOnly: conf.options['lockfile-only'],
25
28
  };
26
29
  const { graph } = await install(ciOptions);
27
- return graph;
30
+ return { graph };
28
31
  };
29
32
  //# sourceMappingURL=ci.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ci.js","sourceRoot":"","sources":["../../../src/commands/ci.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD,MAAM,CAAC,MAAM,KAAK,GAAiB,GAAG,EAAE,CACtC,YAAY,CAAC;IACX,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,EAAE;IACT,WAAW,EAAE;;;kEAGiD;IAC9D,QAAQ,EAAE;QACR,EAAE,EAAE,EAAE,WAAW,EAAE,6BAA6B,EAAE;KACnD;CACF,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,SAAS,GAAG;QAChB,GAAG,IAAI,CAAC,OAAO;QACf,cAAc,EAAE,IAAI;QACpB,cAAc,EAAE,IAAI;QACpB,YAAY,EAAE,IAAI;KACnB,CAAA;IAED,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,CAAA;IAC1C,OAAO,KAAK,CAAA;AACd,CAAC,CAAA","sourcesContent":["import type { Graph } from '@vltpkg/graph'\nimport { commandUsage } from '../config/usage.ts'\nimport type { CommandFn, CommandUsage } from '../index.ts'\nimport { install } from '@vltpkg/graph'\nimport type { Views } from '../view.ts'\nimport { InstallReporter } from './install/reporter.ts'\n\nexport const usage: CommandUsage = () =>\n commandUsage({\n command: 'ci',\n usage: '',\n description: `Clean install from lockfile. Deletes node_modules and installs \n dependencies exactly as specified in vlt-lock.json. This is \n similar to running 'vlt install --expect-lockfile' but performs \n a clean install by removing node_modules first.`,\n examples: {\n '': { description: 'Clean install from lockfile' },\n },\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 ciOptions = {\n ...conf.options,\n expectLockfile: true,\n frozenLockfile: true,\n cleanInstall: true,\n }\n\n const { graph } = await install(ciOptions)\n return graph\n}\n"]}
1
+ {"version":3,"file":"ci.js","sourceRoot":"","sources":["../../../src/commands/ci.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAOvD,MAAM,CAAC,MAAM,KAAK,GAAiB,GAAG,EAAE,CACtC,YAAY,CAAC;IACX,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,EAAE;IACT,WAAW,EAAE;;;kEAGiD;IAC9D,QAAQ,EAAE;QACR,EAAE,EAAE,EAAE,WAAW,EAAE,6BAA6B,EAAE;KACnD;CACF,CAAC,CAAA;AAEJ,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE;IAC3B,KAAK,EAAE,eAAe;CACY,CAAA;AAEpC,MAAM,CAAC,MAAM,OAAO,GAAwB,KAAK,EAAC,IAAI,EAAC,EAAE;IACvD,MAAM,SAAS,GAAG;QAChB,GAAG,IAAI,CAAC,OAAO;QACf,sEAAsE;QACtE,YAAY,EAAE,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,GAAG;QAC9C,cAAc,EAAE,IAAI;QACpB,cAAc,EAAE,IAAI;QACpB,YAAY,EAAE,IAAI;QAClB,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC;KAC5C,CAAA;IAED,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,CAAA;IAC1C,OAAO,EAAE,KAAK,EAAE,CAAA;AAClB,CAAC,CAAA","sourcesContent":["import { install } from '@vltpkg/graph'\nimport { commandUsage } from '../config/usage.ts'\nimport { InstallReporter } from './install/reporter.ts'\nimport type { CommandFn, CommandUsage } from '../index.ts'\nimport type { Views } from '../view.ts'\nimport type { InstallResult } from './install.ts'\n\nexport type CIResult = Omit<InstallResult, 'buildQueue'>\n\nexport const usage: CommandUsage = () =>\n commandUsage({\n command: 'ci',\n usage: '',\n description: `Clean install from lockfile. Deletes node_modules and installs \n dependencies exactly as specified in vlt-lock.json. This is \n similar to running 'vlt install --expect-lockfile' but performs \n a clean install by removing node_modules first.`,\n examples: {\n '': { description: 'Clean install from lockfile' },\n },\n })\n\nexport const views = {\n json: i => i.graph.toJSON(),\n human: InstallReporter,\n} as const satisfies Views<CIResult>\n\nexport const command: CommandFn<CIResult> = async conf => {\n const ciOptions = {\n ...conf.options,\n // allow all scripts by default on ci (unless user specifies a filter)\n allowScripts: conf.get('allow-scripts') ?? '*',\n expectLockfile: true,\n frozenLockfile: true,\n cleanInstall: true,\n lockfileOnly: conf.options['lockfile-only'],\n }\n\n const { graph } = await install(ciOptions)\n return { graph }\n}\n"]}
@@ -1,5 +1,6 @@
1
- import type { RecordPairs } from '../config/index.ts';
2
1
  import type { CommandFn, CommandUsage } from '../index.ts';
2
+ import type { Views } from '../view.ts';
3
+ export declare const views: Views;
3
4
  export declare const usage: CommandUsage;
4
- export declare const command: CommandFn<string | number | boolean | void | string[] | RecordPairs>;
5
+ export declare const command: CommandFn;
5
6
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/commands/config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAgB,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1D,eAAO,MAAM,KAAK,EAAE,YA8ChB,CAAA;AAEJ,eAAO,MAAM,OAAO,EAAE,SAAS,CAC7B,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,EAAE,GAAG,WAAW,CA+B1D,CAAA"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/commands/config.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAKvC,eAAO,MAAM,KAAK,EAAE,KAUM,CAAA;AAE1B,eAAO,MAAM,KAAK,EAAE,YAwDhB,CAAA;AAEJ,eAAO,MAAM,OAAO,EAAE,SA8DrB,CAAA"}