@dsh-workbench/shared 1.1.11 → 1.1.12
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.
|
@@ -57,6 +57,7 @@ export interface SupplyProbeReleaseOptions {
|
|
|
57
57
|
readonly package: string;
|
|
58
58
|
readonly registry?: string | undefined;
|
|
59
59
|
readonly force?: boolean;
|
|
60
|
+
readonly check?: boolean;
|
|
60
61
|
}
|
|
61
62
|
export interface EnvSupplyPort {
|
|
62
63
|
resolvePluginSource(source: SupplySource | undefined, env: Readonly<Record<string, string | undefined>>, options?: PluginSourceOptions): ResolvedPluginSource;
|
|
@@ -68,7 +68,7 @@ async function missingPartsOf(latestCache, existsCache, options) {
|
|
|
68
68
|
return checked.filter((entry) => !entry.present).map((entry) => entry.part);
|
|
69
69
|
}
|
|
70
70
|
async function probeOf(latestCache, options) {
|
|
71
|
-
const { shell, package: pkg, registry, force = false, cacheDir, prefix } = options;
|
|
71
|
+
const { shell, package: pkg, registry, force = false, check = true, cacheDir, prefix } = options;
|
|
72
72
|
if (pkg === "")
|
|
73
73
|
return undefined;
|
|
74
74
|
const ledger = await runShell(shell, `npm ls --prefix ${quoteShellArg(prefix ?? '')} ${quoteShellArg(pkg)} --json --depth=0${cacheFlag(cacheDir)}`, { timeoutMs: VERSION_CHECK_TIMEOUT_MS }).catch(() => undefined);
|
|
@@ -78,7 +78,7 @@ async function probeOf(latestCache, options) {
|
|
|
78
78
|
const source = registry === undefined || registry.trim() === ""
|
|
79
79
|
? undefined
|
|
80
80
|
: registry.trim();
|
|
81
|
-
const latest = source === undefined
|
|
81
|
+
const latest = source === undefined || !check
|
|
82
82
|
? undefined
|
|
83
83
|
: await latestVersionOf(latestCache, { shell, name: pkg, registry: source, force, cacheDir });
|
|
84
84
|
return {
|
package/package.json
CHANGED
package/src/host/port-types.ts
CHANGED
|
@@ -82,6 +82,7 @@ interface ProbeReleaseOptions {
|
|
|
82
82
|
readonly package: string;
|
|
83
83
|
readonly registry?: string | undefined;
|
|
84
84
|
readonly force?: boolean;
|
|
85
|
+
readonly check?: boolean;
|
|
85
86
|
readonly cacheDir?: string | undefined;
|
|
86
87
|
readonly prefix?: string | undefined;
|
|
87
88
|
}
|
|
@@ -169,10 +170,11 @@ async function probeOf(
|
|
|
169
170
|
package: string;
|
|
170
171
|
registry?: string | undefined;
|
|
171
172
|
force?: boolean;
|
|
173
|
+
check?: boolean;
|
|
172
174
|
cacheDir?: string | undefined;
|
|
173
175
|
prefix?: string | undefined;
|
|
174
176
|
}): Promise<PluginRelease | undefined> {
|
|
175
|
-
const { shell, package: pkg, registry, force = false, cacheDir, prefix } = options;
|
|
177
|
+
const { shell, package: pkg, registry, force = false, check = true, cacheDir, prefix } = options;
|
|
176
178
|
if (pkg === "") return undefined;
|
|
177
179
|
|
|
178
180
|
const ledger = await runShell(
|
|
@@ -189,7 +191,7 @@ async function probeOf(
|
|
|
189
191
|
? undefined
|
|
190
192
|
: registry.trim();
|
|
191
193
|
const latest =
|
|
192
|
-
source === undefined
|
|
194
|
+
source === undefined || !check
|
|
193
195
|
? undefined
|
|
194
196
|
: await latestVersionOf(latestCache, { shell, name: pkg, registry: source, force, cacheDir });
|
|
195
197
|
|