@goodandready/dsh-usage-guard 0.1.18 → 0.1.19

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 (2) hide show
  1. package/lib/updater.js +14 -5
  2. package/package.json +1 -1
package/lib/updater.js CHANGED
@@ -174,14 +174,23 @@ export async function getUpdateStatus(options, target = runtime()) {
174
174
  };
175
175
  }
176
176
 
177
+ export function buildInstallArgs(cliEntry, profileName, packageSpec, options = {}) {
178
+ return [
179
+ cliEntry, 'plugin', '--profile', profileName, 'add',
180
+ packageSpec,
181
+ `--registry=${options.registry ?? 'https://registry.npmjs.org/'}`,
182
+ ];
183
+ }
184
+
177
185
  async function installExact(target, packageSpec, options) {
178
186
  if (target.cliEntry === undefined) throw new Error('Automatic update is unavailable in this runtime.');
179
187
  await new Promise((resolvePromise, reject) => {
180
- const child = spawn(process.execPath, [
181
- target.cliEntry, 'plugin', '--profile', target.profileName, 'add',
182
- '--config.minimumReleaseAge=0', packageSpec,
183
- `--registry=${options.registry ?? 'https://registry.npmjs.org/'}`,
184
- ], {
188
+ const child = spawn(process.execPath, buildInstallArgs(
189
+ target.cliEntry,
190
+ target.profileName,
191
+ packageSpec,
192
+ options,
193
+ ), {
185
194
  cwd: target.profileDir,
186
195
  windowsHide: true,
187
196
  stdio: ['ignore', 'pipe', 'pipe'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-usage-guard",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "Keeps a malformed token-usage sample from taking a whole session history down with it: a missing or non-numeric counter becomes zero before the harness adds it up, so the fold never yields NaN and already-broken sessions open again.",
5
5
  "keywords": [
6
6
  "deepseek-harness",