google-trends-for-agent 0.2.46 → 0.2.47
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/CHANGELOG.md +7 -0
- package/dist/dsh-client.js +4 -4
- package/dist/dsh-version.js +29 -8
- package/dist/version-check.d.ts +1 -1
- package/dist/version-check.js +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.47 — 2026-11-30
|
|
4
|
+
|
|
5
|
+
### Reliable one-click upgrade under pnpm minimumReleaseAge & Electron runtime
|
|
6
|
+
- Pass `--config.minimum-release-age=0` in both one-click upgrades (`POST /api/gtfa.plugin-upgrade`) and fallback upgrade commands so newly published releases are never silently downgraded by `dsh`'s `pnpm 11` supply-chain cooldown policy (`src/version-check.ts`, `src/dsh-version.ts`).
|
|
7
|
+
- Set `ELECTRON_RUN_AS_NODE=1` when invoking Electron's `process.execPath` to run DeepSeek Harness's bundled `pnpm.mjs`, preventing Electron Desktop from spawning a second app window, and use cross-platform `path.delimiter` for `PATH` augmentation (`src/dsh-version.ts`).
|
|
8
|
+
- Verify `installedVersion > pluginVersion` after running the upgrade command so npm indexing delays or policy rollbacks report an actionable error instead of falsely claiming success (`src/dsh-version.ts`).
|
|
9
|
+
|
|
3
10
|
## 0.2.46 — 2026-11-30
|
|
4
11
|
|
|
5
12
|
### One-click dsh plugin upgrade & cloud Actor 429 UX polish
|
package/dist/dsh-client.js
CHANGED
|
@@ -2165,14 +2165,14 @@ function parseActorRuntime(value) {
|
|
|
2165
2165
|
|
|
2166
2166
|
// src/version-check.ts
|
|
2167
2167
|
var GTFA_RELEASES_URL = `${GTFA_SOURCE_URL}/releases`;
|
|
2168
|
-
var GTFA_UPGRADE_COMMAND = "dsh plugin --profile web add google-trends-for-agent@latest";
|
|
2168
|
+
var GTFA_UPGRADE_COMMAND = "dsh plugin --profile web add --config.minimum-release-age=0 google-trends-for-agent@latest";
|
|
2169
2169
|
var SAFE_PROFILE_RE = /^[a-zA-Z0-9._-]{1,64}$/;
|
|
2170
2170
|
function formatUpgradeCommand(profileName) {
|
|
2171
2171
|
const clean = typeof profileName === "string" && SAFE_PROFILE_RE.test(profileName.trim()) ? profileName.trim() : "web";
|
|
2172
2172
|
if (clean === "desktop") {
|
|
2173
|
-
return "pnpm --dir ~/.dsh/profiles/desktop add google-trends-for-agent@latest";
|
|
2173
|
+
return "pnpm --dir ~/.dsh/profiles/desktop add --config.minimum-release-age=0 google-trends-for-agent@latest";
|
|
2174
2174
|
}
|
|
2175
|
-
return `dsh plugin --profile ${clean} add google-trends-for-agent@latest`;
|
|
2175
|
+
return `dsh plugin --profile ${clean} add --config.minimum-release-age=0 google-trends-for-agent@latest`;
|
|
2176
2176
|
}
|
|
2177
2177
|
var SEMVER_RE = /^v?(\d{1,5})\.(\d{1,5})\.(\d{1,5})(?:-([a-zA-Z0-9.-]{1,40}))?$/;
|
|
2178
2178
|
function parseSemver(raw) {
|
|
@@ -2260,7 +2260,7 @@ function parseVersionStatus(value) {
|
|
|
2260
2260
|
|
|
2261
2261
|
// src/client/update-banner.tsx
|
|
2262
2262
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
2263
|
-
var CLIENT_VERSION = "0.2.
|
|
2263
|
+
var CLIENT_VERSION = "0.2.47" ? "0.2.47" : null;
|
|
2264
2264
|
var VERSION_URL = "api/gtfa.version";
|
|
2265
2265
|
var PLUGIN_UPGRADE_URL = "api/gtfa.plugin-upgrade";
|
|
2266
2266
|
var DISMISS_STORAGE_KEY = "gtfa.update.dismissed.1";
|
package/dist/dsh-version.js
CHANGED
|
@@ -2,7 +2,7 @@ import { execFile } from 'node:child_process';
|
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
3
|
import { access, mkdir, readFile, rename, unlink, writeFile } from 'node:fs/promises';
|
|
4
4
|
import { homedir } from 'node:os';
|
|
5
|
-
import { dirname, join, resolve } from 'node:path';
|
|
5
|
+
import { delimiter, dirname, join, resolve } from 'node:path';
|
|
6
6
|
import { fileURLToPath } from 'node:url';
|
|
7
7
|
import { promisify } from 'node:util';
|
|
8
8
|
import { parseActorRuntime } from './actor-runtime.js';
|
|
@@ -60,12 +60,12 @@ async function resolveCliBinary(name, envKey, env) {
|
|
|
60
60
|
function buildAugmentedPath(env) {
|
|
61
61
|
const home = env.HOME?.trim() || homedir();
|
|
62
62
|
const extras = [join(home, '.local', 'bin'), '/opt/homebrew/bin', '/usr/local/bin'];
|
|
63
|
-
const current = (env.PATH ?? '').split(
|
|
63
|
+
const current = (env.PATH ?? '').split(delimiter).filter(Boolean);
|
|
64
64
|
for (const dir of extras) {
|
|
65
65
|
if (!current.includes(dir))
|
|
66
66
|
current.push(dir);
|
|
67
67
|
}
|
|
68
|
-
return current.join(
|
|
68
|
+
return current.join(delimiter);
|
|
69
69
|
}
|
|
70
70
|
async function readInstalledProfileVersion(profileName, env) {
|
|
71
71
|
const dshHome = env.DSH_HOME?.trim() || join(env.HOME?.trim() || homedir(), '.dsh');
|
|
@@ -399,11 +399,22 @@ export function createVersionStatusMonitor(options) {
|
|
|
399
399
|
const command = formatUpgradeCommand(profileName);
|
|
400
400
|
if (options.runUpgrade) {
|
|
401
401
|
const outcome = await options.runUpgrade(profileName, signal);
|
|
402
|
+
const installedVersion = outcome.installedVersion ?? null;
|
|
403
|
+
if (outcome.ok && installedVersion && (compareSemver(installedVersion, pluginVersion) ?? 0) <= 0) {
|
|
404
|
+
return {
|
|
405
|
+
ok: false,
|
|
406
|
+
profileName,
|
|
407
|
+
command,
|
|
408
|
+
installedVersion,
|
|
409
|
+
restartRequired: false,
|
|
410
|
+
message: `Profile "${profileName}" resolved to v${installedVersion} (not newer than v${pluginVersion}). If a new release was just published, wait 1–2 minutes for npm indexing and retry.`,
|
|
411
|
+
};
|
|
412
|
+
}
|
|
402
413
|
return {
|
|
403
414
|
ok: outcome.ok,
|
|
404
415
|
profileName,
|
|
405
416
|
command,
|
|
406
|
-
installedVersion
|
|
417
|
+
installedVersion,
|
|
407
418
|
restartRequired: outcome.ok,
|
|
408
419
|
...(outcome.message ? { message: outcome.message } : {}),
|
|
409
420
|
};
|
|
@@ -427,17 +438,17 @@ export function createVersionStatusMonitor(options) {
|
|
|
427
438
|
catch { /* Try next candidate. */ }
|
|
428
439
|
}
|
|
429
440
|
if (bundledPnpm) {
|
|
430
|
-
await execFileAsync(process.execPath, [bundledPnpm, 'add', 'google-trends-for-agent@latest'], {
|
|
441
|
+
await execFileAsync(process.execPath, [bundledPnpm, 'add', '--config.minimum-release-age=0', 'google-trends-for-agent@latest'], {
|
|
431
442
|
cwd: profileDir,
|
|
432
443
|
timeout: 120_000,
|
|
433
444
|
maxBuffer: 2 * 1024 * 1024,
|
|
434
445
|
signal,
|
|
435
|
-
env,
|
|
446
|
+
env: { ...env, ELECTRON_RUN_AS_NODE: '1' },
|
|
436
447
|
});
|
|
437
448
|
}
|
|
438
449
|
else {
|
|
439
450
|
const pnpmBin = await resolveCliBinary('pnpm', 'PNPM_BIN', env);
|
|
440
|
-
await execFileAsync(pnpmBin, ['add', 'google-trends-for-agent@latest'], {
|
|
451
|
+
await execFileAsync(pnpmBin, ['add', '--config.minimum-release-age=0', 'google-trends-for-agent@latest'], {
|
|
441
452
|
cwd: profileDir,
|
|
442
453
|
timeout: 120_000,
|
|
443
454
|
maxBuffer: 2 * 1024 * 1024,
|
|
@@ -448,7 +459,7 @@ export function createVersionStatusMonitor(options) {
|
|
|
448
459
|
}
|
|
449
460
|
else {
|
|
450
461
|
const dshBin = await resolveCliBinary('dsh', 'DSH_BIN', env);
|
|
451
|
-
await execFileAsync(dshBin, ['plugin', '--profile', profileName, 'add', 'google-trends-for-agent@latest'], {
|
|
462
|
+
await execFileAsync(dshBin, ['plugin', '--profile', profileName, 'add', '--config.minimum-release-age=0', 'google-trends-for-agent@latest'], {
|
|
452
463
|
timeout: 120_000,
|
|
453
464
|
maxBuffer: 2 * 1024 * 1024,
|
|
454
465
|
signal,
|
|
@@ -456,6 +467,16 @@ export function createVersionStatusMonitor(options) {
|
|
|
456
467
|
});
|
|
457
468
|
}
|
|
458
469
|
const installedVersion = await readInstalledProfileVersion(profileName, env);
|
|
470
|
+
if (installedVersion && (compareSemver(installedVersion, pluginVersion) ?? 0) <= 0) {
|
|
471
|
+
return {
|
|
472
|
+
ok: false,
|
|
473
|
+
profileName,
|
|
474
|
+
command,
|
|
475
|
+
installedVersion,
|
|
476
|
+
restartRequired: false,
|
|
477
|
+
message: `Profile "${profileName}" resolved to v${installedVersion} (not newer than v${pluginVersion}). If a new release was just published, wait 1–2 minutes for npm indexing and retry.`,
|
|
478
|
+
};
|
|
479
|
+
}
|
|
459
480
|
return {
|
|
460
481
|
ok: true,
|
|
461
482
|
profileName,
|
package/dist/version-check.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { ActorRuntime } from './actor-runtime.js';
|
|
|
2
2
|
import { type EgressMode } from './options.js';
|
|
3
3
|
export declare const GTFA_RELEASES_URL = "https://github.com/meka-im/google-trends-for-agent/releases";
|
|
4
4
|
export declare const GTFA_LATEST_RELEASE_API_URL = "https://api.github.com/repos/meka-im/google-trends-for-agent/releases/latest";
|
|
5
|
-
export declare const GTFA_UPGRADE_COMMAND = "dsh plugin --profile web add google-trends-for-agent@latest";
|
|
5
|
+
export declare const GTFA_UPGRADE_COMMAND = "dsh plugin --profile web add --config.minimum-release-age=0 google-trends-for-agent@latest";
|
|
6
6
|
export declare const VERSION_STATUS_PATH = "/api/gtfa.version";
|
|
7
7
|
export declare const PLUGIN_UPGRADE_PATH = "/api/gtfa.plugin-upgrade";
|
|
8
8
|
/** Build the profile-specific upgrade command (Desktop profile is Electron-managed, so dsh CLI blocks --profile desktop). */
|
package/dist/version-check.js
CHANGED
|
@@ -2,7 +2,7 @@ import { parseActorRuntime } from './actor-runtime.js';
|
|
|
2
2
|
import { GTFA_SOURCE_URL } from './options.js';
|
|
3
3
|
export const GTFA_RELEASES_URL = `${GTFA_SOURCE_URL}/releases`;
|
|
4
4
|
export const GTFA_LATEST_RELEASE_API_URL = 'https://api.github.com/repos/meka-im/google-trends-for-agent/releases/latest';
|
|
5
|
-
export const GTFA_UPGRADE_COMMAND = 'dsh plugin --profile web add google-trends-for-agent@latest';
|
|
5
|
+
export const GTFA_UPGRADE_COMMAND = 'dsh plugin --profile web add --config.minimum-release-age=0 google-trends-for-agent@latest';
|
|
6
6
|
export const VERSION_STATUS_PATH = '/api/gtfa.version';
|
|
7
7
|
export const PLUGIN_UPGRADE_PATH = '/api/gtfa.plugin-upgrade';
|
|
8
8
|
const SAFE_PROFILE_RE = /^[a-zA-Z0-9._-]{1,64}$/;
|
|
@@ -12,9 +12,9 @@ export function formatUpgradeCommand(profileName) {
|
|
|
12
12
|
? profileName.trim()
|
|
13
13
|
: 'web';
|
|
14
14
|
if (clean === 'desktop') {
|
|
15
|
-
return 'pnpm --dir ~/.dsh/profiles/desktop add google-trends-for-agent@latest';
|
|
15
|
+
return 'pnpm --dir ~/.dsh/profiles/desktop add --config.minimum-release-age=0 google-trends-for-agent@latest';
|
|
16
16
|
}
|
|
17
|
-
return `dsh plugin --profile ${clean} add google-trends-for-agent@latest`;
|
|
17
|
+
return `dsh plugin --profile ${clean} add --config.minimum-release-age=0 google-trends-for-agent@latest`;
|
|
18
18
|
}
|
|
19
19
|
const SEMVER_RE = /^v?(\d{1,5})\.(\d{1,5})\.(\d{1,5})(?:-([a-zA-Z0-9.-]{1,40}))?$/;
|
|
20
20
|
/** Parse a bounded X.Y.Z(-prerelease) version string. */
|