@vltpkg/cli-sdk 0.0.0-3 → 0.0.0-30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/esm/commands/cache.d.ts +65 -0
- package/dist/esm/commands/cache.d.ts.map +1 -0
- package/dist/esm/commands/cache.js +257 -0
- package/dist/esm/commands/cache.js.map +1 -0
- package/dist/esm/commands/ci.d.ts +10 -0
- package/dist/esm/commands/ci.d.ts.map +1 -0
- package/dist/esm/commands/ci.js +29 -0
- package/dist/esm/commands/ci.js.map +1 -0
- package/dist/esm/commands/config.d.ts.map +1 -1
- package/dist/esm/commands/config.js +2 -52
- package/dist/esm/commands/config.js.map +1 -1
- package/dist/esm/commands/exec-cache.d.ts +49 -0
- package/dist/esm/commands/exec-cache.d.ts.map +1 -0
- package/dist/esm/commands/exec-cache.js +134 -0
- package/dist/esm/commands/exec-cache.js.map +1 -0
- package/dist/esm/commands/exec-local.d.ts +6 -0
- package/dist/esm/commands/exec-local.d.ts.map +1 -0
- package/dist/esm/commands/exec-local.js +24 -0
- package/dist/esm/commands/exec-local.js.map +1 -0
- package/dist/esm/commands/exec.d.ts +4 -0
- package/dist/esm/commands/exec.d.ts.map +1 -1
- package/dist/esm/commands/exec.js +69 -10
- package/dist/esm/commands/exec.js.map +1 -1
- package/dist/esm/commands/help.d.ts +1 -1
- package/dist/esm/commands/help.d.ts.map +1 -1
- package/dist/esm/commands/help.js +25 -3
- package/dist/esm/commands/help.js.map +1 -1
- package/dist/esm/commands/init.d.ts +4 -5
- package/dist/esm/commands/init.d.ts.map +1 -1
- package/dist/esm/commands/init.js +95 -9
- package/dist/esm/commands/init.js.map +1 -1
- package/dist/esm/commands/install/reporter.d.ts +1 -1
- package/dist/esm/commands/install/reporter.d.ts.map +1 -1
- package/dist/esm/commands/install/reporter.js +10 -11
- package/dist/esm/commands/install/reporter.js.map +1 -1
- package/dist/esm/commands/install.d.ts +5 -2
- package/dist/esm/commands/install.d.ts.map +1 -1
- package/dist/esm/commands/install.js +7 -1
- package/dist/esm/commands/install.js.map +1 -1
- package/dist/esm/commands/list.d.ts +1 -1
- package/dist/esm/commands/list.d.ts.map +1 -1
- package/dist/esm/commands/list.js +150 -42
- package/dist/esm/commands/list.js.map +1 -1
- package/dist/esm/commands/pack.d.ts +32 -0
- package/dist/esm/commands/pack.d.ts.map +1 -0
- package/dist/esm/commands/pack.js +147 -0
- package/dist/esm/commands/pack.js.map +1 -0
- package/dist/esm/commands/pkg.d.ts +2 -3
- package/dist/esm/commands/pkg.d.ts.map +1 -1
- package/dist/esm/commands/pkg.js +123 -38
- package/dist/esm/commands/pkg.js.map +1 -1
- package/dist/esm/commands/publish.d.ts +22 -0
- package/dist/esm/commands/publish.d.ts.map +1 -0
- package/dist/esm/commands/publish.js +239 -0
- package/dist/esm/commands/publish.js.map +1 -0
- package/dist/esm/commands/query.d.ts +1 -1
- package/dist/esm/commands/query.d.ts.map +1 -1
- package/dist/esm/commands/query.js +171 -32
- package/dist/esm/commands/query.js.map +1 -1
- package/dist/esm/commands/run-exec.d.ts +1 -0
- package/dist/esm/commands/run-exec.d.ts.map +1 -1
- package/dist/esm/commands/run-exec.js +1 -0
- package/dist/esm/commands/run-exec.js.map +1 -1
- package/dist/esm/commands/run.d.ts +1 -0
- package/dist/esm/commands/run.d.ts.map +1 -1
- package/dist/esm/commands/run.js +13 -16
- package/dist/esm/commands/run.js.map +1 -1
- package/dist/esm/commands/serve.d.ts +14 -0
- package/dist/esm/commands/serve.d.ts.map +1 -0
- package/dist/esm/commands/serve.js +97 -0
- package/dist/esm/commands/serve.js.map +1 -0
- package/dist/esm/commands/uninstall.d.ts +7 -1
- package/dist/esm/commands/uninstall.d.ts.map +1 -1
- package/dist/esm/commands/uninstall.js +7 -1
- package/dist/esm/commands/uninstall.js.map +1 -1
- package/dist/esm/commands/update.d.ts +10 -0
- package/dist/esm/commands/update.d.ts.map +1 -0
- package/dist/esm/commands/update.js +25 -0
- package/dist/esm/commands/update.js.map +1 -0
- package/dist/esm/commands/version.d.ts +26 -0
- package/dist/esm/commands/version.d.ts.map +1 -0
- package/dist/esm/commands/version.js +226 -0
- package/dist/esm/commands/version.js.map +1 -0
- package/dist/esm/commands/whoami.d.ts +4 -2
- package/dist/esm/commands/whoami.d.ts.map +1 -1
- package/dist/esm/commands/whoami.js +1 -1
- package/dist/esm/commands/whoami.js.map +1 -1
- package/dist/esm/config/definition.d.ts +102 -8
- package/dist/esm/config/definition.d.ts.map +1 -1
- package/dist/esm/config/definition.js +174 -25
- package/dist/esm/config/definition.js.map +1 -1
- package/dist/esm/config/index.d.ts +46 -40
- package/dist/esm/config/index.d.ts.map +1 -1
- package/dist/esm/config/index.js +126 -176
- package/dist/esm/config/index.js.map +1 -1
- package/dist/esm/config/merge.d.ts +3 -1
- package/dist/esm/config/merge.d.ts.map +1 -1
- package/dist/esm/config/merge.js +11 -6
- package/dist/esm/config/merge.js.map +1 -1
- package/dist/esm/config/usage.d.ts +3 -2
- package/dist/esm/config/usage.d.ts.map +1 -1
- package/dist/esm/config/usage.js.map +1 -1
- package/dist/esm/exec-command.d.ts +33 -14
- package/dist/esm/exec-command.d.ts.map +1 -1
- package/dist/esm/exec-command.js +214 -65
- package/dist/esm/exec-command.js.map +1 -1
- package/dist/esm/index.d.ts +1 -14
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +46 -20
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/load-command.d.ts +16 -0
- package/dist/esm/load-command.d.ts.map +1 -0
- package/dist/esm/load-command.js +21 -0
- package/dist/esm/load-command.js.map +1 -0
- package/dist/esm/output.d.ts +6 -10
- package/dist/esm/output.d.ts.map +1 -1
- package/dist/esm/output.js +63 -33
- package/dist/esm/output.js.map +1 -1
- package/dist/esm/pack-tarball.d.ts +22 -0
- package/dist/esm/pack-tarball.d.ts.map +1 -0
- package/dist/esm/pack-tarball.js +247 -0
- package/dist/esm/pack-tarball.js.map +1 -0
- package/dist/esm/parse-add-remove-args.d.ts +1 -1
- package/dist/esm/parse-add-remove-args.d.ts.map +1 -1
- package/dist/esm/parse-add-remove-args.js +1 -1
- package/dist/esm/parse-add-remove-args.js.map +1 -1
- package/dist/esm/print-err.d.ts +12 -1
- package/dist/esm/print-err.d.ts.map +1 -1
- package/dist/esm/print-err.js +157 -26
- package/dist/esm/print-err.js.map +1 -1
- package/dist/esm/query-host-contexts.d.ts +16 -0
- package/dist/esm/query-host-contexts.d.ts.map +1 -0
- package/dist/esm/query-host-contexts.js +135 -0
- package/dist/esm/query-host-contexts.js.map +1 -0
- package/dist/esm/start-gui.d.ts +7 -33
- package/dist/esm/start-gui.d.ts.map +1 -1
- package/dist/esm/start-gui.js +40 -347
- package/dist/esm/start-gui.js.map +1 -1
- package/dist/esm/view.d.ts +2 -3
- package/dist/esm/view.d.ts.map +1 -1
- package/dist/esm/view.js +1 -1
- package/dist/esm/view.js.map +1 -1
- package/package.json +73 -45
- package/dist/esm/commands/gui.d.ts +0 -6
- package/dist/esm/commands/gui.d.ts.map +0 -1
- package/dist/esm/commands/gui.js +0 -14
- package/dist/esm/commands/gui.js.map +0 -1
- package/dist/esm/commands/install-exec.d.ts +0 -4
- package/dist/esm/commands/install-exec.d.ts.map +0 -1
- package/dist/esm/commands/install-exec.js +0 -13
- package/dist/esm/commands/install-exec.js.map +0 -1
- package/dist/esm/ignored-homedir-folder-names.d.ts +0 -7
- package/dist/esm/ignored-homedir-folder-names.d.ts.map +0 -1
- package/dist/esm/ignored-homedir-folder-names.js +0 -35
- package/dist/esm/ignored-homedir-folder-names.js.map +0 -1
- package/dist/esm/project-info.d.ts +0 -32
- package/dist/esm/project-info.d.ts.map +0 -1
- package/dist/esm/project-info.js +0 -90
- package/dist/esm/project-info.js.map +0 -1
- package/dist/esm/read-project-folders.d.ts +0 -27
- package/dist/esm/read-project-folders.d.ts.map +0 -1
- package/dist/esm/read-project-folders.js +0 -66
- package/dist/esm/read-project-folders.js.map +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { update } from '@vltpkg/graph';
|
|
2
|
+
import { error } from '@vltpkg/error-cause';
|
|
3
|
+
import { commandUsage } from "../config/usage.js";
|
|
4
|
+
import { InstallReporter } from "./install/reporter.js";
|
|
5
|
+
export const usage = () => commandUsage({
|
|
6
|
+
command: 'update',
|
|
7
|
+
usage: '',
|
|
8
|
+
description: `Update dependencies to their latest in-range versions.
|
|
9
|
+
Discards the lockfile and resolves dependencies from scratch.`,
|
|
10
|
+
});
|
|
11
|
+
export const views = {
|
|
12
|
+
json: g => g.toJSON(),
|
|
13
|
+
human: InstallReporter,
|
|
14
|
+
};
|
|
15
|
+
export const command = async (conf) => {
|
|
16
|
+
// Throw error if any arguments are provided
|
|
17
|
+
if (conf.positionals.length > 0) {
|
|
18
|
+
throw error('Arguments are not yet supported for vlt update', {
|
|
19
|
+
code: 'EUSAGE',
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
const { graph } = await update(conf.options);
|
|
23
|
+
return graph;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAGvD,MAAM,CAAC,MAAM,KAAK,GAAiB,GAAG,EAAE,CACtC,YAAY,CAAC;IACX,OAAO,EAAE,QAAQ;IACjB,KAAK,EAAE,EAAE;IACT,WAAW,EAAE;gFAC+D;CAC7E,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,4CAA4C;IAC5C,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChC,MAAM,KAAK,CAAC,gDAAgD,EAAE;YAC5D,IAAI,EAAE,QAAQ;SACf,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC5C,OAAO,KAAK,CAAA;AACd,CAAC,CAAA","sourcesContent":["import { update } from '@vltpkg/graph'\nimport { error } from '@vltpkg/error-cause'\nimport type { Graph } from '@vltpkg/graph'\nimport { commandUsage } from '../config/usage.ts'\nimport type { CommandFn, CommandUsage } from '../index.ts'\nimport { InstallReporter } from './install/reporter.ts'\nimport type { Views } from '../view.ts'\n\nexport const usage: CommandUsage = () =>\n commandUsage({\n command: 'update',\n usage: '',\n description: `Update dependencies to their latest in-range versions.\n Discards the lockfile and resolves dependencies from scratch.`,\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 // Throw error if any arguments are provided\n if (conf.positionals.length > 0) {\n throw error('Arguments are not yet supported for vlt update', {\n code: 'EUSAGE',\n })\n }\n\n const { graph } = await update(conf.options)\n return graph\n}\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CommandFn, CommandUsage } from '../index.ts';
|
|
2
|
+
export type VersionOptions = {
|
|
3
|
+
prereleaseId?: string;
|
|
4
|
+
commit?: boolean;
|
|
5
|
+
tag?: boolean;
|
|
6
|
+
message?: string;
|
|
7
|
+
tagMessage?: string;
|
|
8
|
+
includeNameInCommit?: boolean;
|
|
9
|
+
includeNameInTag?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type CommandResultSingle = {
|
|
12
|
+
name: string;
|
|
13
|
+
oldVersion: string;
|
|
14
|
+
newVersion: string;
|
|
15
|
+
dir: string;
|
|
16
|
+
committed?: string[];
|
|
17
|
+
tag?: string;
|
|
18
|
+
};
|
|
19
|
+
export type CommandResult = CommandResultSingle | CommandResultSingle[];
|
|
20
|
+
export declare const usage: CommandUsage;
|
|
21
|
+
export declare const views: {
|
|
22
|
+
readonly json: (result: CommandResult) => CommandResult;
|
|
23
|
+
readonly human: (results: CommandResult) => string;
|
|
24
|
+
};
|
|
25
|
+
export declare const command: CommandFn<CommandResult>;
|
|
26
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/commands/version.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAS1D,MAAM,MAAM,cAAc,GAAG;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,aAAa,GACrB,mBAAmB,GACnB,mBAAmB,EAAE,CAAA;AA2LzB,eAAO,MAAM,KAAK,EAAE,YAanB,CAAA;AAED,eAAO,MAAM,KAAK;;;CAiBuB,CAAA;AAEzC,eAAO,MAAM,OAAO,EAAE,SAAS,CAAC,aAAa,CAkE5C,CAAA"}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { inc, parse as parseVersion, versionIncrements, } from '@vltpkg/semver';
|
|
2
|
+
import { is as isGit, spawn as spawn_, isClean } from '@vltpkg/git';
|
|
3
|
+
import { error } from '@vltpkg/error-cause';
|
|
4
|
+
import { asError } from '@vltpkg/types';
|
|
5
|
+
import { commandUsage } from "../config/usage.js";
|
|
6
|
+
import { dirname, resolve } from 'node:path';
|
|
7
|
+
import assert from 'node:assert';
|
|
8
|
+
import { actual } from '@vltpkg/graph';
|
|
9
|
+
import { Query } from '@vltpkg/query';
|
|
10
|
+
import { createHostContextsMap } from "../query-host-contexts.js";
|
|
11
|
+
const isValidVersionIncrement = (value) => versionIncrements.includes(value);
|
|
12
|
+
const version = async (conf, increment, cwd, {
|
|
13
|
+
// Hardcode happy path options for now.
|
|
14
|
+
// TODO: make these config definitions
|
|
15
|
+
prereleaseId = 'pre', commit = true, tag = true, message = 'v%s', tagMessage = 'v%s', includeNameInCommit = false, includeNameInTag = false, } = {}) => {
|
|
16
|
+
assert(increment, error('Version increment argument is required', {
|
|
17
|
+
code: 'EUSAGE',
|
|
18
|
+
validOptions: versionIncrements,
|
|
19
|
+
}));
|
|
20
|
+
const manifestPath = conf.options.packageJson.find(cwd);
|
|
21
|
+
assert(manifestPath, error('No package.json found', {
|
|
22
|
+
code: 'ENOENT',
|
|
23
|
+
path: cwd,
|
|
24
|
+
}));
|
|
25
|
+
const spawn = (args, opts) => spawn_(args, { cwd: manifestDir, ...opts });
|
|
26
|
+
const manifestDir = dirname(manifestPath);
|
|
27
|
+
const manifest = conf.options.packageJson.read(manifestDir);
|
|
28
|
+
assert(manifest.name, error('No name field found in package.json', {
|
|
29
|
+
path: manifestPath,
|
|
30
|
+
}));
|
|
31
|
+
assert(manifest.version, error('No version field found in package.json', {
|
|
32
|
+
path: manifestPath,
|
|
33
|
+
}));
|
|
34
|
+
const oldVersion = manifest.version;
|
|
35
|
+
let newVersion;
|
|
36
|
+
// Check if increment is a valid semver version string
|
|
37
|
+
const parsedIncrement = parseVersion(increment);
|
|
38
|
+
if (parsedIncrement) {
|
|
39
|
+
newVersion = parsedIncrement.toString();
|
|
40
|
+
}
|
|
41
|
+
else if (isValidVersionIncrement(increment)) {
|
|
42
|
+
// Use semver increment
|
|
43
|
+
const incrementType = increment;
|
|
44
|
+
try {
|
|
45
|
+
const result = inc(oldVersion, incrementType, prereleaseId);
|
|
46
|
+
newVersion = result.toString();
|
|
47
|
+
}
|
|
48
|
+
catch (err) {
|
|
49
|
+
throw error(`Failed to increment version from ${oldVersion} with ${increment}`, { version: oldVersion, wanted: increment, cause: err });
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
throw error(`Invalid version increment: ${increment}. Must be a valid semver version or one of: major, minor, patch, premajor, preminor, prepatch, prerelease`, {
|
|
54
|
+
found: increment,
|
|
55
|
+
validOptions: versionIncrements,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
// Update the manifest
|
|
59
|
+
manifest.version = newVersion;
|
|
60
|
+
conf.options.packageJson.write(manifestDir, manifest);
|
|
61
|
+
const result = {
|
|
62
|
+
name: manifest.name,
|
|
63
|
+
oldVersion,
|
|
64
|
+
newVersion,
|
|
65
|
+
dir: manifestDir,
|
|
66
|
+
};
|
|
67
|
+
// Handle git operations if we're in a git repository
|
|
68
|
+
if (
|
|
69
|
+
/* c8 ignore next -- commit and tag are always true for now */
|
|
70
|
+
(commit || tag) &&
|
|
71
|
+
(await isGit({ cwd: conf.options.projectRoot }))) {
|
|
72
|
+
// Check for uncommitted changes (excluding package.json since we just modified it)
|
|
73
|
+
if (!(await isClean({ cwd: conf.options.projectRoot }))) {
|
|
74
|
+
try {
|
|
75
|
+
// Check if there are changes other than package.json
|
|
76
|
+
const gitResult = await spawn([
|
|
77
|
+
'diff',
|
|
78
|
+
'--name-only',
|
|
79
|
+
'HEAD',
|
|
80
|
+
'--',
|
|
81
|
+
'.',
|
|
82
|
+
]);
|
|
83
|
+
const changedFiles = gitResult.stdout
|
|
84
|
+
.trim()
|
|
85
|
+
.split('\n')
|
|
86
|
+
.filter(Boolean)
|
|
87
|
+
.map(f => resolve(conf.options.projectRoot, f));
|
|
88
|
+
const nonPackageJsonChanges = changedFiles.filter(file => file !== resolve(manifestDir, 'package.json'));
|
|
89
|
+
assert(nonPackageJsonChanges.length === 0, error('Git working directory not clean. Please commit or stash your changes first.', { found: nonPackageJsonChanges }));
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
throw error('Git working directory not clean. Please commit or stash your changes first.', asError(err));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (commit) {
|
|
96
|
+
try {
|
|
97
|
+
// Stage package.json
|
|
98
|
+
const files = ['package.json'];
|
|
99
|
+
await spawn(['add', ...files]);
|
|
100
|
+
await spawn([
|
|
101
|
+
'commit',
|
|
102
|
+
'-m',
|
|
103
|
+
`${includeNameInCommit ? `${manifest.name}: ` : ''}${message.replace('%s', newVersion)}`,
|
|
104
|
+
]);
|
|
105
|
+
result.committed = files.map(f => resolve(manifestDir, f));
|
|
106
|
+
}
|
|
107
|
+
catch (err) {
|
|
108
|
+
throw error('Failed to commit version changes', {
|
|
109
|
+
version: newVersion,
|
|
110
|
+
cause: err,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (tag) {
|
|
115
|
+
try {
|
|
116
|
+
const tagName = (includeNameInTag ?
|
|
117
|
+
`${manifest.name.replace('/', '-').replace('@', '')}-`
|
|
118
|
+
: '') + `v${newVersion}`;
|
|
119
|
+
await spawn([
|
|
120
|
+
'tag',
|
|
121
|
+
tagName,
|
|
122
|
+
'-m',
|
|
123
|
+
(includeNameInTag ? `${manifest.name}: ` : '') +
|
|
124
|
+
tagMessage.replace('%s', newVersion),
|
|
125
|
+
]);
|
|
126
|
+
result.tag = tagName;
|
|
127
|
+
}
|
|
128
|
+
catch (err) {
|
|
129
|
+
throw error('Failed to create git tag', {
|
|
130
|
+
version: newVersion,
|
|
131
|
+
cause: err,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return result;
|
|
137
|
+
};
|
|
138
|
+
export const usage = () => {
|
|
139
|
+
return commandUsage({
|
|
140
|
+
command: 'version',
|
|
141
|
+
usage: '[<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease]',
|
|
142
|
+
description: `Bump a package's version.
|
|
143
|
+
|
|
144
|
+
Run in a package directory to bump the version and write the new data back to package.json.
|
|
145
|
+
|
|
146
|
+
The \`<newversion>\` argument should be a valid semver string or a valid increment type (one of patch, minor, major, prepatch, preminor, premajor, prerelease).
|
|
147
|
+
|
|
148
|
+
If run in a git repository, it will also create a version commit and tag.`,
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
export const views = {
|
|
152
|
+
json: result => result,
|
|
153
|
+
human: results => {
|
|
154
|
+
const item = (result) => {
|
|
155
|
+
let output = `${result.name}: v${result.newVersion}`;
|
|
156
|
+
if (result.committed) {
|
|
157
|
+
output += ` +commit`;
|
|
158
|
+
}
|
|
159
|
+
if (result.tag) {
|
|
160
|
+
output += ` +tag`;
|
|
161
|
+
}
|
|
162
|
+
return output;
|
|
163
|
+
};
|
|
164
|
+
return Array.isArray(results) ?
|
|
165
|
+
results.map(item).join('\n')
|
|
166
|
+
: item(results);
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
export const command = async (conf) => {
|
|
170
|
+
const { positionals, options, projectRoot } = conf;
|
|
171
|
+
const queryString = conf.get('scope');
|
|
172
|
+
const paths = conf.get('workspace');
|
|
173
|
+
const groups = conf.get('workspace-group');
|
|
174
|
+
const recursive = conf.get('recursive');
|
|
175
|
+
const locations = [];
|
|
176
|
+
if (queryString) {
|
|
177
|
+
const mainManifest = options.packageJson.maybeRead(projectRoot);
|
|
178
|
+
let graph;
|
|
179
|
+
if (mainManifest) {
|
|
180
|
+
graph = actual.load({
|
|
181
|
+
...options,
|
|
182
|
+
mainManifest,
|
|
183
|
+
monorepo: options.monorepo,
|
|
184
|
+
loadManifests: false,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
const hostContexts = await createHostContextsMap(conf);
|
|
188
|
+
const query = new Query({
|
|
189
|
+
/* c8 ignore next */
|
|
190
|
+
nodes: graph ? new Set(graph.nodes.values()) : new Set(),
|
|
191
|
+
edges: graph?.edges ?? new Set(),
|
|
192
|
+
importers: graph?.importers ?? new Set(),
|
|
193
|
+
securityArchive: undefined,
|
|
194
|
+
hostContexts,
|
|
195
|
+
});
|
|
196
|
+
const { nodes } = await query.search(queryString, {
|
|
197
|
+
signal: new AbortController().signal,
|
|
198
|
+
});
|
|
199
|
+
for (const node of nodes) {
|
|
200
|
+
const location = node.location;
|
|
201
|
+
assert(location, error(`node ${node.id} has no location`, {
|
|
202
|
+
found: node,
|
|
203
|
+
}));
|
|
204
|
+
locations.push(resolve(node.projectRoot, location));
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
else if (paths?.length || groups?.length || recursive) {
|
|
208
|
+
for (const workspace of options.monorepo ?? []) {
|
|
209
|
+
locations.push(workspace.fullpath);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
const cwd = options.packageJson.find(process.cwd()) ?? projectRoot;
|
|
214
|
+
return version(conf, positionals[0], cwd);
|
|
215
|
+
}
|
|
216
|
+
assert(locations.length > 0, error('No workspaces or query results found'));
|
|
217
|
+
const results = [];
|
|
218
|
+
for (const location of locations) {
|
|
219
|
+
results.push(await version(conf, positionals[0], location, {
|
|
220
|
+
includeNameInCommit: true,
|
|
221
|
+
includeNameInTag: true,
|
|
222
|
+
}));
|
|
223
|
+
}
|
|
224
|
+
return results;
|
|
225
|
+
};
|
|
226
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0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,CAAC,EAAE,GAAG,CAAC,CAAA;IAC3C,CAAC;IAED,MAAM,CACJ,SAAS,CAAC,MAAM,GAAG,CAAC,EACpB,KAAK,CAAC,sCAAsC,CAAC,CAC9C,CAAA;IAED,MAAM,OAAO,GAA0B,EAAE,CAAA;IACzC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,OAAO,CAAC,IAAI,CACV,MAAM,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE;YAC5C,mBAAmB,EAAE,IAAI;YACzB,gBAAgB,EAAE,IAAI;SACvB,CAAC,CACH,CAAA;IACH,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA","sourcesContent":["import {\n inc,\n parse as parseVersion,\n versionIncrements,\n} from '@vltpkg/semver'\nimport type { IncrementType } from '@vltpkg/semver'\nimport { is as isGit, spawn as spawn_, isClean } from '@vltpkg/git'\nimport type { GitOptions } from '@vltpkg/git'\nimport { error } from '@vltpkg/error-cause'\nimport { asError } from '@vltpkg/types'\nimport { commandUsage } from '../config/usage.ts'\nimport type { CommandFn, CommandUsage } from '../index.ts'\nimport type { Views } from '../view.ts'\nimport type { ParsedConfig } from '../config/index.ts'\nimport { dirname, resolve } from 'node:path'\nimport assert from 'node:assert'\nimport { actual } from '@vltpkg/graph'\nimport { Query } from '@vltpkg/query'\nimport { createHostContextsMap } from '../query-host-contexts.ts'\n\nexport type VersionOptions = {\n prereleaseId?: string\n commit?: boolean\n tag?: boolean\n message?: string\n tagMessage?: string\n includeNameInCommit?: boolean\n includeNameInTag?: boolean\n}\n\nexport type CommandResultSingle = {\n name: string\n oldVersion: string\n newVersion: string\n dir: string\n committed?: string[]\n tag?: string\n}\n\nexport type CommandResult =\n | CommandResultSingle\n | CommandResultSingle[]\n\nconst isValidVersionIncrement = (\n value: string,\n): value is IncrementType =>\n versionIncrements.includes(value as IncrementType)\n\nconst version = async (\n conf: ParsedConfig,\n increment: string | undefined,\n cwd: string,\n {\n // Hardcode happy path options for now.\n // TODO: make these config definitions\n prereleaseId = 'pre',\n commit = true,\n tag = true,\n message = 'v%s',\n tagMessage = 'v%s',\n includeNameInCommit = false,\n includeNameInTag = false,\n }: VersionOptions = {},\n): Promise<CommandResultSingle> => {\n assert(\n increment,\n error('Version increment argument is required', {\n code: 'EUSAGE',\n validOptions: versionIncrements,\n }),\n )\n\n const manifestPath = conf.options.packageJson.find(cwd)\n assert(\n manifestPath,\n error('No package.json found', {\n code: 'ENOENT',\n path: cwd,\n }),\n )\n\n const spawn = (args: string[], opts?: GitOptions) =>\n spawn_(args, { cwd: manifestDir, ...opts })\n\n const manifestDir = dirname(manifestPath)\n const manifest = conf.options.packageJson.read(manifestDir)\n\n assert(\n manifest.name,\n error('No name field found in package.json', {\n path: manifestPath,\n }),\n )\n assert(\n manifest.version,\n error('No version field found in package.json', {\n path: manifestPath,\n }),\n )\n\n const oldVersion = manifest.version\n let newVersion: string\n\n // Check if increment is a valid semver version string\n const parsedIncrement = parseVersion(increment)\n if (parsedIncrement) {\n newVersion = parsedIncrement.toString()\n } else if (isValidVersionIncrement(increment)) {\n // Use semver increment\n const incrementType = increment\n try {\n const result = inc(oldVersion, incrementType, prereleaseId)\n newVersion = result.toString()\n } catch (err) {\n throw error(\n `Failed to increment version from ${oldVersion} with ${increment}`,\n { version: oldVersion, wanted: increment, cause: err },\n )\n }\n } else {\n throw error(\n `Invalid version increment: ${increment}. Must be a valid semver version or one of: major, minor, patch, premajor, preminor, prepatch, prerelease`,\n {\n found: increment,\n validOptions: versionIncrements,\n },\n )\n }\n\n // Update the manifest\n manifest.version = newVersion\n conf.options.packageJson.write(manifestDir, manifest)\n\n const result: CommandResultSingle = {\n name: manifest.name,\n oldVersion,\n newVersion,\n dir: manifestDir,\n }\n\n // Handle git operations if we're in a git repository\n if (\n /* c8 ignore next -- commit and tag are always true for now */\n (commit || tag) &&\n (await isGit({ cwd: conf.options.projectRoot }))\n ) {\n // Check for uncommitted changes (excluding package.json since we just modified it)\n if (!(await isClean({ cwd: conf.options.projectRoot }))) {\n try {\n // Check if there are changes other than package.json\n const gitResult = await spawn([\n 'diff',\n '--name-only',\n 'HEAD',\n '--',\n '.',\n ])\n const changedFiles = gitResult.stdout\n .trim()\n .split('\\n')\n .filter(Boolean)\n .map(f => resolve(conf.options.projectRoot, f))\n const nonPackageJsonChanges = changedFiles.filter(\n file => file !== resolve(manifestDir, 'package.json'),\n )\n assert(\n nonPackageJsonChanges.length === 0,\n error(\n 'Git working directory not clean. Please commit or stash your changes first.',\n { found: nonPackageJsonChanges },\n ),\n )\n } catch (err) {\n throw error(\n 'Git working directory not clean. Please commit or stash your changes first.',\n asError(err),\n )\n }\n }\n\n if (commit) {\n try {\n // Stage package.json\n const files = ['package.json']\n await spawn(['add', ...files])\n await spawn([\n 'commit',\n '-m',\n `${includeNameInCommit ? `${manifest.name}: ` : ''}${message.replace(\n '%s',\n newVersion,\n )}`,\n ])\n result.committed = files.map(f => resolve(manifestDir, f))\n } catch (err) {\n throw error('Failed to commit version changes', {\n version: newVersion,\n cause: err,\n })\n }\n }\n\n if (tag) {\n try {\n const tagName =\n (includeNameInTag ?\n `${manifest.name.replace('/', '-').replace('@', '')}-`\n : '') + `v${newVersion}`\n await spawn([\n 'tag',\n tagName,\n '-m',\n (includeNameInTag ? `${manifest.name}: ` : '') +\n tagMessage.replace('%s', newVersion),\n ])\n result.tag = tagName\n } catch (err) {\n throw error('Failed to create git tag', {\n version: newVersion,\n cause: err,\n })\n }\n }\n }\n\n return result\n}\n\nexport const usage: CommandUsage = () => {\n return commandUsage({\n command: 'version',\n usage:\n '[<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease]',\n description: `Bump a package's version.\n\n Run in a package directory to bump the version and write the new data back to package.json.\n\n The \\`<newversion>\\` argument should be a valid semver string or a valid increment type (one of patch, minor, major, prepatch, preminor, premajor, prerelease).\n\n If run in a git repository, it will also create a version commit and tag.`,\n })\n}\n\nexport const views = {\n json: result => result,\n human: results => {\n const item = (result: CommandResultSingle) => {\n let output = `${result.name}: v${result.newVersion}`\n if (result.committed) {\n output += ` +commit`\n }\n if (result.tag) {\n output += ` +tag`\n }\n return output\n }\n return Array.isArray(results) ?\n results.map(item).join('\\n')\n : item(results)\n },\n} as const satisfies Views<CommandResult>\n\nexport const command: CommandFn<CommandResult> = async conf => {\n const { positionals, options, projectRoot } = conf\n const queryString = conf.get('scope')\n const paths = conf.get('workspace')\n const groups = conf.get('workspace-group')\n const recursive = conf.get('recursive')\n\n const locations: string[] = []\n\n if (queryString) {\n const mainManifest = options.packageJson.maybeRead(projectRoot)\n let graph\n if (mainManifest) {\n graph = actual.load({\n ...options,\n mainManifest,\n monorepo: options.monorepo,\n loadManifests: false,\n })\n }\n const hostContexts = await createHostContextsMap(conf)\n const query = new Query({\n /* c8 ignore next */\n nodes: graph ? new Set(graph.nodes.values()) : new Set(),\n edges: graph?.edges ?? new Set(),\n importers: graph?.importers ?? new Set(),\n securityArchive: undefined,\n hostContexts,\n })\n const { nodes } = await query.search(queryString, {\n signal: new AbortController().signal,\n })\n for (const node of nodes) {\n const location = node.location\n assert(\n location,\n error(`node ${node.id} has no location`, {\n found: node,\n }),\n )\n locations.push(resolve(node.projectRoot, location))\n }\n } else if (paths?.length || groups?.length || recursive) {\n for (const workspace of options.monorepo ?? []) {\n locations.push(workspace.fullpath)\n }\n } else {\n const cwd = options.packageJson.find(process.cwd()) ?? projectRoot\n return version(conf, positionals[0], cwd)\n }\n\n assert(\n locations.length > 0,\n error('No workspaces or query results found'),\n )\n\n const results: CommandResultSingle[] = []\n for (const location of locations) {\n results.push(\n await version(conf, positionals[0], location, {\n includeNameInCommit: true,\n includeNameInTag: true,\n }),\n )\n }\n return results\n}\n"]}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { JSONField } from '@vltpkg/types';
|
|
2
2
|
import type { CommandFn, CommandUsage } from '../index.ts';
|
|
3
|
-
import type { Views } from '../view.ts';
|
|
4
3
|
export declare const usage: CommandUsage;
|
|
5
4
|
type CommandResult = {
|
|
6
5
|
username?: JSONField;
|
|
7
6
|
};
|
|
8
|
-
export declare const views:
|
|
7
|
+
export declare const views: {
|
|
8
|
+
readonly human: (r: CommandResult) => JSONField;
|
|
9
|
+
readonly json: (r: CommandResult) => CommandResult;
|
|
10
|
+
};
|
|
9
11
|
export declare const command: CommandFn<CommandResult>;
|
|
10
12
|
export {};
|
|
11
13
|
//# sourceMappingURL=whoami.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"whoami.d.ts","sourceRoot":"","sources":["../../../src/commands/whoami.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"whoami.d.ts","sourceRoot":"","sources":["../../../src/commands/whoami.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG1D,eAAO,MAAM,KAAK,EAAE,YAMhB,CAAA;AAEJ,KAAK,aAAa,GAAG;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,KAAK;;;CAGuB,CAAA;AAEzC,eAAO,MAAM,OAAO,EAAE,SAAS,CAAC,aAAa,CAQ5C,CAAA"}
|
|
@@ -12,7 +12,7 @@ export const views = {
|
|
|
12
12
|
};
|
|
13
13
|
export const command = async (conf) => {
|
|
14
14
|
const rc = new RegistryClient(conf.options);
|
|
15
|
-
const response = await rc.request(new URL('-/whoami', conf.options.registry), {
|
|
15
|
+
const response = await rc.request(new URL('-/whoami', conf.options.registry), { useCache: false });
|
|
16
16
|
const { username } = response.json();
|
|
17
17
|
return { username };
|
|
18
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"whoami.js","sourceRoot":"","sources":["../../../src/commands/whoami.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAIjD,MAAM,CAAC,MAAM,KAAK,GAAiB,GAAG,EAAE,CACtC,YAAY,CAAC;IACX,OAAO,EAAE,QAAQ;IACjB,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,WAAW,EAAE;+CAC8B;CAC5C,CAAC,CAAA;AAMJ,MAAM,CAAC,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"whoami.js","sourceRoot":"","sources":["../../../src/commands/whoami.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAIjD,MAAM,CAAC,MAAM,KAAK,GAAiB,GAAG,EAAE,CACtC,YAAY,CAAC;IACX,OAAO,EAAE,QAAQ;IACjB,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,WAAW,EAAE;+CAC8B;CAC5C,CAAC,CAAA;AAMJ,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;IACtB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;CAC2B,CAAA;AAEzC,MAAM,CAAC,MAAM,OAAO,GAA6B,KAAK,EAAC,IAAI,EAAC,EAAE;IAC5D,MAAM,EAAE,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC3C,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC,OAAO,CAC/B,IAAI,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAC1C,EAAE,QAAQ,EAAE,KAAK,EAAE,CACpB,CAAA;IACD,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAA;IACpC,OAAO,EAAE,QAAQ,EAAE,CAAA;AACrB,CAAC,CAAA","sourcesContent":["import { RegistryClient } from '@vltpkg/registry-client'\nimport type { JSONField } from '@vltpkg/types'\nimport { commandUsage } from '../config/usage.ts'\nimport type { CommandFn, CommandUsage } from '../index.ts'\nimport type { Views } from '../view.ts'\n\nexport const usage: CommandUsage = () =>\n commandUsage({\n command: 'whoami',\n usage: [''],\n description: `Look up the username for the currently active token,\n when logged into a registry.`,\n })\n\ntype CommandResult = {\n username?: JSONField\n}\n\nexport const views = {\n human: r => r.username,\n json: r => r,\n} as const satisfies Views<CommandResult>\n\nexport const command: CommandFn<CommandResult> = async conf => {\n const rc = new RegistryClient(conf.options)\n const response = await rc.request(\n new URL('-/whoami', conf.options.registry),\n { useCache: false },\n )\n const { username } = response.json()\n return { username }\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const defaultView: string;
|
|
2
|
+
export declare const defaultEditor: () => string;
|
|
2
3
|
/**
|
|
3
4
|
* Command aliases mapped to their canonical names
|
|
4
5
|
*/
|
|
@@ -11,27 +12,35 @@ export declare const commands: {
|
|
|
11
12
|
readonly 'run-script': "run";
|
|
12
13
|
readonly rx: "run-exec";
|
|
13
14
|
readonly x: "exec";
|
|
15
|
+
readonly xl: "exec-local";
|
|
14
16
|
readonly h: "help";
|
|
15
17
|
readonly '?': "help";
|
|
16
18
|
readonly conf: "config";
|
|
17
|
-
readonly ix: "install-exec";
|
|
18
19
|
readonly ls: "list";
|
|
20
|
+
readonly xc: "exec-cache";
|
|
21
|
+
readonly cache: "cache";
|
|
22
|
+
readonly ci: "ci";
|
|
19
23
|
readonly config: "config";
|
|
20
24
|
readonly exec: "exec";
|
|
21
|
-
readonly
|
|
25
|
+
readonly 'exec-local': "exec-local";
|
|
22
26
|
readonly help: "help";
|
|
23
27
|
readonly init: "init";
|
|
24
|
-
readonly 'install-exec': "install-exec";
|
|
25
28
|
readonly install: "install";
|
|
26
29
|
readonly login: "login";
|
|
27
30
|
readonly logout: "logout";
|
|
28
31
|
readonly list: "list";
|
|
32
|
+
readonly pack: "pack";
|
|
29
33
|
readonly pkg: "pkg";
|
|
34
|
+
readonly publish: "publish";
|
|
30
35
|
readonly query: "query";
|
|
31
36
|
readonly 'run-exec': "run-exec";
|
|
32
37
|
readonly run: "run";
|
|
38
|
+
readonly serve: "serve";
|
|
33
39
|
readonly token: "token";
|
|
34
40
|
readonly uninstall: "uninstall";
|
|
41
|
+
readonly update: "update";
|
|
42
|
+
readonly 'exec-cache': "exec-cache";
|
|
43
|
+
readonly version: "version";
|
|
35
44
|
readonly whoami: "whoami";
|
|
36
45
|
};
|
|
37
46
|
/**
|
|
@@ -43,7 +52,7 @@ export declare const getCommand: (s?: string) => Commands[keyof Commands] | unde
|
|
|
43
52
|
/**
|
|
44
53
|
* Fields that are parsed as a set of key=value pairs
|
|
45
54
|
*/
|
|
46
|
-
export declare const recordFields: readonly ["git-hosts", "registries", "git-host-archives", "scope-registries"];
|
|
55
|
+
export declare const recordFields: readonly ["git-hosts", "registries", "git-host-archives", "scope-registries", "jsr-registries"];
|
|
47
56
|
export type RecordField = (typeof recordFields)[number];
|
|
48
57
|
export declare const isRecordField: (s: string) => s is RecordField;
|
|
49
58
|
export declare const definition: import("jackspeak").Jack<{
|
|
@@ -75,6 +84,10 @@ export declare const definition: import("jackspeak").Jack<{
|
|
|
75
84
|
hint: string;
|
|
76
85
|
description: string;
|
|
77
86
|
};
|
|
87
|
+
'jsr-registries': {
|
|
88
|
+
hint: string;
|
|
89
|
+
description: string;
|
|
90
|
+
};
|
|
78
91
|
'git-hosts': {
|
|
79
92
|
hint: string;
|
|
80
93
|
short: string;
|
|
@@ -88,6 +101,7 @@ export declare const definition: import("jackspeak").Jack<{
|
|
|
88
101
|
} & {
|
|
89
102
|
registries: import("jackspeak").ConfigOption<"string", true, readonly string[] | undefined>;
|
|
90
103
|
'scope-registries': import("jackspeak").ConfigOption<"string", true, readonly string[] | undefined>;
|
|
104
|
+
'jsr-registries': import("jackspeak").ConfigOption<"string", true, readonly string[] | undefined>;
|
|
91
105
|
'git-hosts': import("jackspeak").ConfigOption<"string", true, readonly string[] | undefined>;
|
|
92
106
|
'git-host-archives': import("jackspeak").ConfigOption<"string", true, readonly string[] | undefined>;
|
|
93
107
|
} & {
|
|
@@ -151,11 +165,17 @@ export declare const definition: import("jackspeak").Jack<{
|
|
|
151
165
|
description: string;
|
|
152
166
|
default: number;
|
|
153
167
|
};
|
|
168
|
+
'stale-while-revalidate-factor': {
|
|
169
|
+
hint: string;
|
|
170
|
+
default: number;
|
|
171
|
+
description: string;
|
|
172
|
+
};
|
|
154
173
|
} & {
|
|
155
174
|
'fetch-retries': import("jackspeak").ConfigOption<"number", false, readonly number[] | undefined>;
|
|
156
175
|
'fetch-retry-factor': import("jackspeak").ConfigOption<"number", false, readonly number[] | undefined>;
|
|
157
176
|
'fetch-retry-mintimeout': import("jackspeak").ConfigOption<"number", false, readonly number[] | undefined>;
|
|
158
177
|
'fetch-retry-maxtimeout': import("jackspeak").ConfigOption<"number", false, readonly number[] | undefined>;
|
|
178
|
+
'stale-while-revalidate-factor': import("jackspeak").ConfigOption<"number", false, readonly number[] | undefined>;
|
|
159
179
|
} & {
|
|
160
180
|
identity: {
|
|
161
181
|
short: string;
|
|
@@ -179,6 +199,24 @@ export declare const definition: import("jackspeak").Jack<{
|
|
|
179
199
|
} & {
|
|
180
200
|
workspace: import("jackspeak").ConfigOption<"string", true, readonly string[] | undefined>;
|
|
181
201
|
'workspace-group': import("jackspeak").ConfigOption<"string", true, readonly string[] | undefined>;
|
|
202
|
+
} & {
|
|
203
|
+
scope: {
|
|
204
|
+
short: string;
|
|
205
|
+
description: string;
|
|
206
|
+
};
|
|
207
|
+
target: {
|
|
208
|
+
short: string;
|
|
209
|
+
description: string;
|
|
210
|
+
};
|
|
211
|
+
} & {
|
|
212
|
+
scope: import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
213
|
+
target: import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
214
|
+
} & {
|
|
215
|
+
'if-present': {
|
|
216
|
+
description: string;
|
|
217
|
+
};
|
|
218
|
+
} & {
|
|
219
|
+
'if-present': import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
182
220
|
} & {
|
|
183
221
|
recursive: {
|
|
184
222
|
short: string;
|
|
@@ -236,7 +274,7 @@ export declare const definition: import("jackspeak").Jack<{
|
|
|
236
274
|
hint: string;
|
|
237
275
|
default: string;
|
|
238
276
|
description: string;
|
|
239
|
-
validOptions: readonly ["human", "json", "mermaid", "gui", "inspect"];
|
|
277
|
+
validOptions: readonly ["human", "json", "mermaid", "gui", "inspect", "silent"];
|
|
240
278
|
};
|
|
241
279
|
} & {
|
|
242
280
|
view: import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
@@ -269,18 +307,74 @@ export declare const definition: import("jackspeak").Jack<{
|
|
|
269
307
|
'save-peer': import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
270
308
|
'save-prod': import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
271
309
|
} & {
|
|
272
|
-
|
|
273
|
-
|
|
310
|
+
'expect-results': {
|
|
311
|
+
hint: string;
|
|
312
|
+
validate: (v: unknown) => boolean;
|
|
274
313
|
description: string;
|
|
275
314
|
};
|
|
276
315
|
} & {
|
|
277
|
-
|
|
316
|
+
'expect-results': import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
317
|
+
} & {
|
|
318
|
+
'dry-run': {
|
|
319
|
+
description: string;
|
|
320
|
+
};
|
|
321
|
+
'expect-lockfile': {
|
|
322
|
+
description: string;
|
|
323
|
+
};
|
|
324
|
+
'frozen-lockfile': {
|
|
325
|
+
description: string;
|
|
326
|
+
};
|
|
327
|
+
} & {
|
|
328
|
+
'dry-run': import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
329
|
+
'expect-lockfile': import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
330
|
+
'frozen-lockfile': import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
331
|
+
} & {
|
|
332
|
+
access: {
|
|
333
|
+
description: string;
|
|
334
|
+
validOptions: readonly ["public", "restricted"];
|
|
335
|
+
default: string;
|
|
336
|
+
};
|
|
337
|
+
} & {
|
|
338
|
+
access: import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
278
339
|
} & {
|
|
340
|
+
otp: {
|
|
341
|
+
description: string;
|
|
342
|
+
};
|
|
343
|
+
'publish-directory': {
|
|
344
|
+
hint: string;
|
|
345
|
+
description: string;
|
|
346
|
+
};
|
|
347
|
+
port: {
|
|
348
|
+
hint: string;
|
|
349
|
+
description: string;
|
|
350
|
+
};
|
|
351
|
+
'registry-port': {
|
|
352
|
+
hint: string;
|
|
353
|
+
description: string;
|
|
354
|
+
};
|
|
355
|
+
} & {
|
|
356
|
+
otp: import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
357
|
+
'publish-directory': import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
358
|
+
port: import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
359
|
+
'registry-port': import("jackspeak").ConfigOption<"string", false, readonly string[] | undefined>;
|
|
360
|
+
} & {
|
|
361
|
+
yes: {
|
|
362
|
+
short: string;
|
|
363
|
+
description: string;
|
|
364
|
+
};
|
|
365
|
+
version: {
|
|
366
|
+
short: string;
|
|
367
|
+
description: string;
|
|
368
|
+
};
|
|
279
369
|
help: {
|
|
280
370
|
short: string;
|
|
281
371
|
description: string;
|
|
282
372
|
};
|
|
283
373
|
} & {
|
|
374
|
+
yes: import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
375
|
+
version: import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
284
376
|
help: import("jackspeak").ConfigOption<"boolean", false, undefined>;
|
|
285
377
|
}>;
|
|
378
|
+
export declare const getSortedCliOptions: () => string[];
|
|
379
|
+
export declare const getSortedKeys: () => string[];
|
|
286
380
|
//# sourceMappingURL=definition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../src/config/definition.ts"],"names":[],"mappings":"
|
|
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;AA+CT;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA4NP,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEvB,CAAA;AAEJ,eAAO,MAAM,mBAAmB,gBAS/B,CAAA;AAED,eAAO,MAAM,aAAa,gBAC2C,CAAA"}
|