@warmhub/cli 0.77.1 → 0.77.3
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/dist/wh.js +225 -189
- package/package.json +1 -1
package/dist/wh.js
CHANGED
|
@@ -27857,108 +27857,6 @@ var SYSTEM_INFRA_SHAPE_NAMES = new Set(SYSTEM_COMPONENTS.filter((entry) => entry
|
|
|
27857
27857
|
function findSystemComponent(componentId) {
|
|
27858
27858
|
return SYSTEM_COMPONENTS.find((entry) => entry.componentId === componentId);
|
|
27859
27859
|
}
|
|
27860
|
-
// ../../packages/sdk-ts/package.json
|
|
27861
|
-
var package_default = {
|
|
27862
|
-
name: "@warmhub/sdk-ts",
|
|
27863
|
-
version: "0.75.1",
|
|
27864
|
-
private: false,
|
|
27865
|
-
type: "module",
|
|
27866
|
-
description: "The TypeScript SDK for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
|
|
27867
|
-
keywords: [
|
|
27868
|
-
"warmhub",
|
|
27869
|
-
"sdk",
|
|
27870
|
-
"typescript",
|
|
27871
|
-
"ai",
|
|
27872
|
-
"agents",
|
|
27873
|
-
"mcp",
|
|
27874
|
-
"knowledge",
|
|
27875
|
-
"knowledge-graph",
|
|
27876
|
-
"assertions",
|
|
27877
|
-
"trust",
|
|
27878
|
-
"trpc"
|
|
27879
|
-
],
|
|
27880
|
-
author: {
|
|
27881
|
-
name: "WarmHub",
|
|
27882
|
-
url: "https://warmhub.ai"
|
|
27883
|
-
},
|
|
27884
|
-
homepage: "https://docs.warmhub.ai/get-started/quickstart/#connect-via-sdk",
|
|
27885
|
-
bugs: {
|
|
27886
|
-
email: "support@warmhub.ai"
|
|
27887
|
-
},
|
|
27888
|
-
engines: {
|
|
27889
|
-
node: ">=22"
|
|
27890
|
-
},
|
|
27891
|
-
main: "./dist/index.js",
|
|
27892
|
-
types: "./dist/index.d.ts",
|
|
27893
|
-
sideEffects: false,
|
|
27894
|
-
files: [
|
|
27895
|
-
"dist",
|
|
27896
|
-
"README.md"
|
|
27897
|
-
],
|
|
27898
|
-
publishConfig: {
|
|
27899
|
-
registry: "https://registry.npmjs.org",
|
|
27900
|
-
access: "public"
|
|
27901
|
-
},
|
|
27902
|
-
exports: {
|
|
27903
|
-
".": {
|
|
27904
|
-
types: "./dist/index.d.ts",
|
|
27905
|
-
import: "./dist/index.js"
|
|
27906
|
-
},
|
|
27907
|
-
"./react": {
|
|
27908
|
-
types: "./dist/react.d.ts",
|
|
27909
|
-
import: "./dist/react.js"
|
|
27910
|
-
}
|
|
27911
|
-
},
|
|
27912
|
-
scripts: {
|
|
27913
|
-
build: "tsc --noEmit && tsup && bun run scripts/inject-doc-links.ts",
|
|
27914
|
-
"generate:api-contract": "bun run scripts/generate-api-contract.ts",
|
|
27915
|
-
"generate:backend-types": "bun run scripts/generate-backend-types.ts",
|
|
27916
|
-
"audit:api-contract": "bun run scripts/audit-api-contract.ts",
|
|
27917
|
-
"audit:backend-types": "bun run scripts/generate-backend-types.ts --check",
|
|
27918
|
-
"audit:sdk-result-types": "bun run scripts/audit-sdk-result-types.ts",
|
|
27919
|
-
"audit:bundle": "bun run scripts/audit-bundle.ts",
|
|
27920
|
-
"audit:pack": "bun run scripts/audit-pack.ts",
|
|
27921
|
-
"audit:cleanroom": "bun run scripts/audit-cleanroom.ts",
|
|
27922
|
-
"audit:content": "bun run scripts/audit-content.ts",
|
|
27923
|
-
"audit:doc-links": "bun run scripts/inject-doc-links.ts --strict",
|
|
27924
|
-
"audit:public-surface": "bun run scripts/audit-public-surface.ts",
|
|
27925
|
-
"verify:publish": "bun run audit:backend-types && bun run audit:sdk-result-types && bun run build && bun run audit:api-contract && bun run audit:public-surface && bun run audit:doc-links && bun run audit:bundle && bun run audit:pack && bun run audit:content && bun run audit:cleanroom",
|
|
27926
|
-
quality: "bun run scripts/quality-check.ts",
|
|
27927
|
-
"quality:verbose": "bun run scripts/quality-check.ts --verbose",
|
|
27928
|
-
"check:contract": "node ../../scripts/lint/external-identity-contracts.mjs sdk",
|
|
27929
|
-
test: "vitest run",
|
|
27930
|
-
"test:coverage": "vitest run --coverage",
|
|
27931
|
-
"test:watch": "vitest",
|
|
27932
|
-
typecheck: "bun run check:contract && bun run audit:backend-types && bun run audit:sdk-result-types && tsc --noEmit",
|
|
27933
|
-
"docs:api:json": "typedoc --options typedoc.json --json /tmp/warmhub-sdk-api.json",
|
|
27934
|
-
"docs:api:check": "typedoc --options typedoc.json --treatValidationWarningsAsErrors --json /tmp/warmhub-sdk-api-check.json"
|
|
27935
|
-
},
|
|
27936
|
-
peerDependencies: {
|
|
27937
|
-
react: "^18.0.0 || ^19.0.0"
|
|
27938
|
-
},
|
|
27939
|
-
peerDependenciesMeta: {
|
|
27940
|
-
react: {
|
|
27941
|
-
optional: true
|
|
27942
|
-
}
|
|
27943
|
-
},
|
|
27944
|
-
dependencies: {
|
|
27945
|
-
"@trpc/client": "11.17.0"
|
|
27946
|
-
},
|
|
27947
|
-
devDependencies: {
|
|
27948
|
-
"@trpc/server": "11.17.0",
|
|
27949
|
-
"@vitest/coverage-v8": "catalog:",
|
|
27950
|
-
"@warmhub/backend": "workspace:*",
|
|
27951
|
-
"@warmhub/rules": "workspace:*",
|
|
27952
|
-
"@types/react": "catalog:",
|
|
27953
|
-
react: "19.2.6",
|
|
27954
|
-
tsup: "8.5.1",
|
|
27955
|
-
typedoc: "0.28.19",
|
|
27956
|
-
"typedoc-plugin-markdown": "4.11.0",
|
|
27957
|
-
typescript: "catalog:",
|
|
27958
|
-
vitest: "catalog:"
|
|
27959
|
-
}
|
|
27960
|
-
};
|
|
27961
|
-
|
|
27962
27860
|
// ../../packages/sdk-ts/src/shape-preflight.ts
|
|
27963
27861
|
function shapeDefinitionPreflightError(name, data, verb) {
|
|
27964
27862
|
const result = validateShapeDefinition(data, verb === "revise" ? { allowUnsafeFieldNamePaths: collectUnsafeShapeFieldNamePaths(data) } : undefined);
|
|
@@ -28535,6 +28433,114 @@ function dedupeDeprecationsByShape(results) {
|
|
|
28535
28433
|
}
|
|
28536
28434
|
return deduped ?? results;
|
|
28537
28435
|
}
|
|
28436
|
+
// ../../packages/sdk-ts/package.json
|
|
28437
|
+
var package_default = {
|
|
28438
|
+
name: "@warmhub/sdk-ts",
|
|
28439
|
+
version: "0.75.3",
|
|
28440
|
+
private: false,
|
|
28441
|
+
type: "module",
|
|
28442
|
+
description: "The TypeScript SDK for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
|
|
28443
|
+
keywords: [
|
|
28444
|
+
"warmhub",
|
|
28445
|
+
"sdk",
|
|
28446
|
+
"typescript",
|
|
28447
|
+
"ai",
|
|
28448
|
+
"agents",
|
|
28449
|
+
"mcp",
|
|
28450
|
+
"knowledge",
|
|
28451
|
+
"knowledge-graph",
|
|
28452
|
+
"assertions",
|
|
28453
|
+
"trust",
|
|
28454
|
+
"trpc"
|
|
28455
|
+
],
|
|
28456
|
+
author: {
|
|
28457
|
+
name: "WarmHub",
|
|
28458
|
+
url: "https://warmhub.ai"
|
|
28459
|
+
},
|
|
28460
|
+
homepage: "https://docs.warmhub.ai/get-started/quickstart/#connect-via-sdk",
|
|
28461
|
+
bugs: {
|
|
28462
|
+
email: "support@warmhub.ai"
|
|
28463
|
+
},
|
|
28464
|
+
engines: {
|
|
28465
|
+
node: ">=22"
|
|
28466
|
+
},
|
|
28467
|
+
main: "./dist/index.js",
|
|
28468
|
+
types: "./dist/index.d.ts",
|
|
28469
|
+
sideEffects: false,
|
|
28470
|
+
files: [
|
|
28471
|
+
"dist",
|
|
28472
|
+
"README.md"
|
|
28473
|
+
],
|
|
28474
|
+
publishConfig: {
|
|
28475
|
+
registry: "https://registry.npmjs.org",
|
|
28476
|
+
access: "public"
|
|
28477
|
+
},
|
|
28478
|
+
exports: {
|
|
28479
|
+
".": {
|
|
28480
|
+
types: "./dist/index.d.ts",
|
|
28481
|
+
import: "./dist/index.js"
|
|
28482
|
+
},
|
|
28483
|
+
"./react": {
|
|
28484
|
+
types: "./dist/react.d.ts",
|
|
28485
|
+
import: "./dist/react.js"
|
|
28486
|
+
}
|
|
28487
|
+
},
|
|
28488
|
+
scripts: {
|
|
28489
|
+
build: "tsc --noEmit && tsup && bun run scripts/inject-doc-links.ts",
|
|
28490
|
+
"generate:api-contract": "bun run scripts/generate-api-contract.ts",
|
|
28491
|
+
"generate:backend-types": "bun run scripts/generate-backend-types.ts",
|
|
28492
|
+
"audit:api-contract": "bun run scripts/audit-api-contract.ts",
|
|
28493
|
+
"audit:backend-types": "bun run scripts/generate-backend-types.ts --check",
|
|
28494
|
+
"audit:sdk-result-types": "bun run scripts/audit-sdk-result-types.ts",
|
|
28495
|
+
"audit:bundle": "bun run scripts/audit-bundle.ts",
|
|
28496
|
+
"audit:pack": "bun run scripts/audit-pack.ts",
|
|
28497
|
+
"audit:cleanroom": "bun run scripts/audit-cleanroom.ts",
|
|
28498
|
+
"audit:content": "bun run scripts/audit-content.ts",
|
|
28499
|
+
"audit:doc-links": "bun run scripts/inject-doc-links.ts --strict",
|
|
28500
|
+
"audit:public-surface": "bun run scripts/audit-public-surface.ts",
|
|
28501
|
+
"verify:publish": "bun run audit:backend-types && bun run audit:sdk-result-types && bun run build && bun run audit:api-contract && bun run audit:public-surface && bun run audit:doc-links && bun run audit:bundle && bun run audit:pack && bun run audit:content && bun run audit:cleanroom",
|
|
28502
|
+
quality: "bun run scripts/quality-check.ts",
|
|
28503
|
+
"quality:verbose": "bun run scripts/quality-check.ts --verbose",
|
|
28504
|
+
"check:contract": "node ../../scripts/lint/external-identity-contracts.mjs sdk",
|
|
28505
|
+
test: "vitest run",
|
|
28506
|
+
"test:coverage": "vitest run --coverage",
|
|
28507
|
+
"test:watch": "vitest",
|
|
28508
|
+
typecheck: "bun run check:contract && bun run audit:backend-types && bun run audit:sdk-result-types && tsc --noEmit",
|
|
28509
|
+
"docs:api:json": "typedoc --options typedoc.json --json /tmp/warmhub-sdk-api.json",
|
|
28510
|
+
"docs:api:check": "typedoc --options typedoc.json --treatValidationWarningsAsErrors --json /tmp/warmhub-sdk-api-check.json"
|
|
28511
|
+
},
|
|
28512
|
+
peerDependencies: {
|
|
28513
|
+
react: "^18.0.0 || ^19.0.0"
|
|
28514
|
+
},
|
|
28515
|
+
peerDependenciesMeta: {
|
|
28516
|
+
react: {
|
|
28517
|
+
optional: true
|
|
28518
|
+
}
|
|
28519
|
+
},
|
|
28520
|
+
dependencies: {
|
|
28521
|
+
"@trpc/client": "11.17.0"
|
|
28522
|
+
},
|
|
28523
|
+
devDependencies: {
|
|
28524
|
+
"@trpc/server": "11.17.0",
|
|
28525
|
+
"@vitest/coverage-v8": "catalog:",
|
|
28526
|
+
"@warmhub/backend": "workspace:*",
|
|
28527
|
+
"@warmhub/rules": "workspace:*",
|
|
28528
|
+
"@types/react": "catalog:",
|
|
28529
|
+
react: "19.2.6",
|
|
28530
|
+
tsup: "8.5.1",
|
|
28531
|
+
typedoc: "0.28.19",
|
|
28532
|
+
"typedoc-plugin-markdown": "4.11.0",
|
|
28533
|
+
typescript: "catalog:",
|
|
28534
|
+
vitest: "catalog:"
|
|
28535
|
+
}
|
|
28536
|
+
};
|
|
28537
|
+
|
|
28538
|
+
// ../../packages/sdk-ts/src/version.ts
|
|
28539
|
+
var SDK_DEVELOPMENT_VERSION = "0.0.0-development";
|
|
28540
|
+
function sdkVersionIsDevelopment(version) {
|
|
28541
|
+
return version === SDK_DEVELOPMENT_VERSION;
|
|
28542
|
+
}
|
|
28543
|
+
var SDK_VERSION = typeof __SDK_VERSION__ !== "undefined" ? __SDK_VERSION__ : package_default.version;
|
|
28538
28544
|
// ../../packages/sdk-ts/src/index.ts
|
|
28539
28545
|
var WARMHUB_CLIENT_OPTION_NAMES = [
|
|
28540
28546
|
"apiUrl",
|
|
@@ -28558,7 +28564,6 @@ function validateWarmHubClientOptions(options) {
|
|
|
28558
28564
|
throw new TypeError(`Unknown WarmHubClient option "${key}"${hint}`);
|
|
28559
28565
|
}
|
|
28560
28566
|
}
|
|
28561
|
-
var SDK_VERSION = typeof __SDK_VERSION__ !== "undefined" ? __SDK_VERSION__ : package_default.version;
|
|
28562
28567
|
var DEFAULT_API_URL = "https://api.warmhub.ai";
|
|
28563
28568
|
var UNBATCHED_TRPC_PATHS = new Set([
|
|
28564
28569
|
"repo.shapeInstanceCounts",
|
|
@@ -28901,6 +28906,8 @@ function comparePrerelease(a, b) {
|
|
|
28901
28906
|
return 0;
|
|
28902
28907
|
}
|
|
28903
28908
|
function sdkVersionIsBelowMinimum(version, minimum) {
|
|
28909
|
+
if (sdkVersionIsDevelopment(version))
|
|
28910
|
+
return false;
|
|
28904
28911
|
const v = parseSemver(version);
|
|
28905
28912
|
const m = parseSemver(minimum);
|
|
28906
28913
|
if (!v || !m)
|
|
@@ -33217,83 +33224,6 @@ ${opts.colors.dim}[live • update #${updates} • Ctrl-C to stop]${opts.colors.
|
|
|
33217
33224
|
function toCliError2(e) {
|
|
33218
33225
|
return toCliError(e);
|
|
33219
33226
|
}
|
|
33220
|
-
// ../../packages/warmhub-cli/src/versioning.ts
|
|
33221
|
-
function parseVersion(value) {
|
|
33222
|
-
const match = value.trim().match(/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+.*)?$/);
|
|
33223
|
-
if (!match)
|
|
33224
|
-
return;
|
|
33225
|
-
return {
|
|
33226
|
-
major: Number(match[1]),
|
|
33227
|
-
minor: Number(match[2]),
|
|
33228
|
-
patch: Number(match[3]),
|
|
33229
|
-
prerelease: match[4] ? match[4].split(".") : []
|
|
33230
|
-
};
|
|
33231
|
-
}
|
|
33232
|
-
function comparePrereleaseIdentifiers2(a, b) {
|
|
33233
|
-
const aNum = /^\d+$/.test(a);
|
|
33234
|
-
const bNum = /^\d+$/.test(b);
|
|
33235
|
-
if (aNum && bNum)
|
|
33236
|
-
return Number(a) - Number(b);
|
|
33237
|
-
if (aNum && !bNum)
|
|
33238
|
-
return -1;
|
|
33239
|
-
if (!aNum && bNum)
|
|
33240
|
-
return 1;
|
|
33241
|
-
return a < b ? -1 : a > b ? 1 : 0;
|
|
33242
|
-
}
|
|
33243
|
-
function compareVersions(candidate, current) {
|
|
33244
|
-
if (candidate.major !== current.major)
|
|
33245
|
-
return candidate.major - current.major;
|
|
33246
|
-
if (candidate.minor !== current.minor)
|
|
33247
|
-
return candidate.minor - current.minor;
|
|
33248
|
-
if (candidate.patch !== current.patch)
|
|
33249
|
-
return candidate.patch - current.patch;
|
|
33250
|
-
const a = candidate.prerelease;
|
|
33251
|
-
const b = current.prerelease;
|
|
33252
|
-
if (a.length === 0 && b.length > 0)
|
|
33253
|
-
return 1;
|
|
33254
|
-
if (a.length > 0 && b.length === 0)
|
|
33255
|
-
return -1;
|
|
33256
|
-
if (a.length === 0 && b.length === 0)
|
|
33257
|
-
return 0;
|
|
33258
|
-
const maxLen = Math.max(a.length, b.length);
|
|
33259
|
-
for (let i = 0;i < maxLen; i += 1) {
|
|
33260
|
-
const aPart = a[i];
|
|
33261
|
-
const bPart = b[i];
|
|
33262
|
-
if (aPart === undefined && bPart === undefined)
|
|
33263
|
-
return 0;
|
|
33264
|
-
if (aPart === undefined)
|
|
33265
|
-
return -1;
|
|
33266
|
-
if (bPart === undefined)
|
|
33267
|
-
return 1;
|
|
33268
|
-
const cmp = comparePrereleaseIdentifiers2(aPart, bPart);
|
|
33269
|
-
if (cmp !== 0)
|
|
33270
|
-
return cmp;
|
|
33271
|
-
}
|
|
33272
|
-
return 0;
|
|
33273
|
-
}
|
|
33274
|
-
function isNewerVersion(candidateVersion, currentVersion) {
|
|
33275
|
-
const candidate = parseVersion(candidateVersion);
|
|
33276
|
-
const current = parseVersion(currentVersion);
|
|
33277
|
-
if (!candidate || !current)
|
|
33278
|
-
return false;
|
|
33279
|
-
return compareVersions(candidate, current) > 0;
|
|
33280
|
-
}
|
|
33281
|
-
var MINOR_GAP_THRESHOLD = 3;
|
|
33282
|
-
function classifyUpdateGap(currentVersion, latestVersion) {
|
|
33283
|
-
if (!isNewerVersion(latestVersion, currentVersion))
|
|
33284
|
-
return;
|
|
33285
|
-
const current = parseVersion(currentVersion);
|
|
33286
|
-
const latest = parseVersion(latestVersion);
|
|
33287
|
-
if (!current || !latest)
|
|
33288
|
-
return "routine";
|
|
33289
|
-
if (latest.major > current.major)
|
|
33290
|
-
return "major-gap";
|
|
33291
|
-
if (latest.major === current.major && latest.minor - current.minor >= MINOR_GAP_THRESHOLD) {
|
|
33292
|
-
return "minor-gap";
|
|
33293
|
-
}
|
|
33294
|
-
return "routine";
|
|
33295
|
-
}
|
|
33296
|
-
|
|
33297
33227
|
// ../../packages/warmhub-cli/src/compatibility.ts
|
|
33298
33228
|
function shouldGuardDomain(domainPath, _canonicalVerb, args) {
|
|
33299
33229
|
const domain = domainPath[0];
|
|
@@ -33316,7 +33246,7 @@ async function checkCompatibility(ctx, domainPath, canonicalVerb, args) {
|
|
|
33316
33246
|
return;
|
|
33317
33247
|
try {
|
|
33318
33248
|
const caps = await ctx.client.diagnostics.capabilities();
|
|
33319
|
-
if (
|
|
33249
|
+
if (sdkVersionIsBelowMinimum(SDK_VERSION, caps.minSupportedSdk)) {
|
|
33320
33250
|
throw new CliError(4 /* Backend */, "BACKEND", `Your CLI (SDK v${SDK_VERSION}) is older than the minimum supported version (${caps.minSupportedSdk}).`, undefined, "Update with: wh update --yes");
|
|
33321
33251
|
}
|
|
33322
33252
|
} catch (err) {
|
|
@@ -43162,7 +43092,14 @@ async function collectChecks(ctx) {
|
|
|
43162
43092
|
} else {
|
|
43163
43093
|
try {
|
|
43164
43094
|
const caps = await ctx.client.diagnostics.capabilities();
|
|
43165
|
-
if (
|
|
43095
|
+
if (SDK_VERSION === "0.0.0-development") {
|
|
43096
|
+
checks.push({
|
|
43097
|
+
key: "compatibility",
|
|
43098
|
+
name: "compatibility",
|
|
43099
|
+
status: "ok",
|
|
43100
|
+
message: "SDK development build; released-package minimum not applicable"
|
|
43101
|
+
});
|
|
43102
|
+
} else if (sdkVersionIsBelowMinimum(SDK_VERSION, caps.minSupportedSdk)) {
|
|
43166
43103
|
checks.push({
|
|
43167
43104
|
key: "compatibility",
|
|
43168
43105
|
name: "compatibility",
|
|
@@ -46936,6 +46873,85 @@ var isDevInstall = (scriptPath) => {
|
|
|
46936
46873
|
|
|
46937
46874
|
// ../../packages/warmhub-cli/src/domains/update-status.ts
|
|
46938
46875
|
import { homedir as homedir7 } from "node:os";
|
|
46876
|
+
|
|
46877
|
+
// ../../packages/warmhub-cli/src/versioning.ts
|
|
46878
|
+
function parseVersion(value) {
|
|
46879
|
+
const match = value.trim().match(/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+.*)?$/);
|
|
46880
|
+
if (!match)
|
|
46881
|
+
return;
|
|
46882
|
+
return {
|
|
46883
|
+
major: Number(match[1]),
|
|
46884
|
+
minor: Number(match[2]),
|
|
46885
|
+
patch: Number(match[3]),
|
|
46886
|
+
prerelease: match[4] ? match[4].split(".") : []
|
|
46887
|
+
};
|
|
46888
|
+
}
|
|
46889
|
+
function comparePrereleaseIdentifiers2(a, b) {
|
|
46890
|
+
const aNum = /^\d+$/.test(a);
|
|
46891
|
+
const bNum = /^\d+$/.test(b);
|
|
46892
|
+
if (aNum && bNum)
|
|
46893
|
+
return Number(a) - Number(b);
|
|
46894
|
+
if (aNum && !bNum)
|
|
46895
|
+
return -1;
|
|
46896
|
+
if (!aNum && bNum)
|
|
46897
|
+
return 1;
|
|
46898
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
46899
|
+
}
|
|
46900
|
+
function compareVersions(candidate, current) {
|
|
46901
|
+
if (candidate.major !== current.major)
|
|
46902
|
+
return candidate.major - current.major;
|
|
46903
|
+
if (candidate.minor !== current.minor)
|
|
46904
|
+
return candidate.minor - current.minor;
|
|
46905
|
+
if (candidate.patch !== current.patch)
|
|
46906
|
+
return candidate.patch - current.patch;
|
|
46907
|
+
const a = candidate.prerelease;
|
|
46908
|
+
const b = current.prerelease;
|
|
46909
|
+
if (a.length === 0 && b.length > 0)
|
|
46910
|
+
return 1;
|
|
46911
|
+
if (a.length > 0 && b.length === 0)
|
|
46912
|
+
return -1;
|
|
46913
|
+
if (a.length === 0 && b.length === 0)
|
|
46914
|
+
return 0;
|
|
46915
|
+
const maxLen = Math.max(a.length, b.length);
|
|
46916
|
+
for (let i = 0;i < maxLen; i += 1) {
|
|
46917
|
+
const aPart = a[i];
|
|
46918
|
+
const bPart = b[i];
|
|
46919
|
+
if (aPart === undefined && bPart === undefined)
|
|
46920
|
+
return 0;
|
|
46921
|
+
if (aPart === undefined)
|
|
46922
|
+
return -1;
|
|
46923
|
+
if (bPart === undefined)
|
|
46924
|
+
return 1;
|
|
46925
|
+
const cmp = comparePrereleaseIdentifiers2(aPart, bPart);
|
|
46926
|
+
if (cmp !== 0)
|
|
46927
|
+
return cmp;
|
|
46928
|
+
}
|
|
46929
|
+
return 0;
|
|
46930
|
+
}
|
|
46931
|
+
function isNewerVersion(candidateVersion, currentVersion) {
|
|
46932
|
+
const candidate = parseVersion(candidateVersion);
|
|
46933
|
+
const current = parseVersion(currentVersion);
|
|
46934
|
+
if (!candidate || !current)
|
|
46935
|
+
return false;
|
|
46936
|
+
return compareVersions(candidate, current) > 0;
|
|
46937
|
+
}
|
|
46938
|
+
var MINOR_GAP_THRESHOLD = 3;
|
|
46939
|
+
function classifyUpdateGap(currentVersion, latestVersion) {
|
|
46940
|
+
if (!isNewerVersion(latestVersion, currentVersion))
|
|
46941
|
+
return;
|
|
46942
|
+
const current = parseVersion(currentVersion);
|
|
46943
|
+
const latest = parseVersion(latestVersion);
|
|
46944
|
+
if (!current || !latest)
|
|
46945
|
+
return "routine";
|
|
46946
|
+
if (latest.major > current.major)
|
|
46947
|
+
return "major-gap";
|
|
46948
|
+
if (latest.major === current.major && latest.minor - current.minor >= MINOR_GAP_THRESHOLD) {
|
|
46949
|
+
return "minor-gap";
|
|
46950
|
+
}
|
|
46951
|
+
return "routine";
|
|
46952
|
+
}
|
|
46953
|
+
|
|
46954
|
+
// ../../packages/warmhub-cli/src/domains/update-status.ts
|
|
46939
46955
|
var resolveUpdateStatus = async (currentVersion, deps = {}) => {
|
|
46940
46956
|
const homePath = deps.homePath ?? homedir7();
|
|
46941
46957
|
const now = deps.now ?? Date.now();
|
|
@@ -48908,7 +48924,7 @@ function resolveLogLevel(flagLevel, env) {
|
|
|
48908
48924
|
// package.json
|
|
48909
48925
|
var package_default3 = {
|
|
48910
48926
|
name: "@warmhub/cli",
|
|
48911
|
-
version: "0.77.
|
|
48927
|
+
version: "0.77.3",
|
|
48912
48928
|
private: false,
|
|
48913
48929
|
type: "module",
|
|
48914
48930
|
description: "The wh CLI for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
|
|
@@ -49278,6 +49294,8 @@ import { homedir as homedir8 } from "node:os";
|
|
|
49278
49294
|
var PACKAGE_NAME = WH_CLI_PACKAGE_NAME;
|
|
49279
49295
|
var CHECK_INTERVAL_MS = UPDATE_CHECK_INTERVAL_MS;
|
|
49280
49296
|
var NOTIFY_INTERVAL_MS = 24 * 60 * 60 * 1000;
|
|
49297
|
+
var SOURCE_DEVELOPMENT_VERSION = "0.0.0-development";
|
|
49298
|
+
var isSourceDevelopmentVersion = (version) => version === SOURCE_DEVELOPMENT_VERSION;
|
|
49281
49299
|
var INTERNAL_UPDATE_CHECK_FLAG = "--warmhub-internal-update-check";
|
|
49282
49300
|
var UPDATE_CHECK_OPT_OUT_ENV = "WARMHUB_CLI_NO_UPDATE_CHECK";
|
|
49283
49301
|
var UPDATE_CHECK_CURRENT_VERSION_ENV = "WARMHUB_CLI_CURRENT_VERSION";
|
|
@@ -49286,8 +49304,11 @@ var shouldRunUpdateCheck = ({
|
|
|
49286
49304
|
env,
|
|
49287
49305
|
isTTY: isTTY2,
|
|
49288
49306
|
noUpdateCheck,
|
|
49307
|
+
currentVersion,
|
|
49289
49308
|
presentation
|
|
49290
49309
|
}) => {
|
|
49310
|
+
if (isSourceDevelopmentVersion(currentVersion))
|
|
49311
|
+
return false;
|
|
49291
49312
|
if (noUpdateCheck)
|
|
49292
49313
|
return false;
|
|
49293
49314
|
if (!presentation.parseOk)
|
|
@@ -49336,7 +49357,13 @@ var getUpdateNotice = ({
|
|
|
49336
49357
|
homePath = homedir8(),
|
|
49337
49358
|
now = Date.now()
|
|
49338
49359
|
}) => {
|
|
49339
|
-
if (!shouldRunUpdateCheck({
|
|
49360
|
+
if (!shouldRunUpdateCheck({
|
|
49361
|
+
env,
|
|
49362
|
+
isTTY: isTTY2,
|
|
49363
|
+
noUpdateCheck,
|
|
49364
|
+
currentVersion,
|
|
49365
|
+
presentation
|
|
49366
|
+
})) {
|
|
49340
49367
|
return;
|
|
49341
49368
|
}
|
|
49342
49369
|
const cache = readCache(homePath);
|
|
@@ -49397,6 +49424,8 @@ var startBackgroundUpdateCheck = ({
|
|
|
49397
49424
|
execPath,
|
|
49398
49425
|
scriptPath
|
|
49399
49426
|
}) => {
|
|
49427
|
+
if (isSourceDevelopmentVersion(currentVersion))
|
|
49428
|
+
return;
|
|
49400
49429
|
if (!scriptPath)
|
|
49401
49430
|
return;
|
|
49402
49431
|
if (parseBool(env[UPDATE_CHECK_OPT_OUT_ENV]))
|
|
@@ -49415,13 +49444,16 @@ var startBackgroundUpdateCheck = ({
|
|
|
49415
49444
|
};
|
|
49416
49445
|
var runUpdateCheckWorker = ({
|
|
49417
49446
|
env,
|
|
49447
|
+
currentVersion: explicitCurrentVersion,
|
|
49418
49448
|
homePath = homedir8(),
|
|
49419
49449
|
now = Date.now(),
|
|
49420
49450
|
fetchLatestVersion = fetchLatestCliVersion
|
|
49421
49451
|
}) => {
|
|
49422
49452
|
if (parseBool(env[UPDATE_CHECK_OPT_OUT_ENV]))
|
|
49423
49453
|
return;
|
|
49424
|
-
const currentVersion = env[UPDATE_CHECK_CURRENT_VERSION_ENV];
|
|
49454
|
+
const currentVersion = explicitCurrentVersion ?? env[UPDATE_CHECK_CURRENT_VERSION_ENV];
|
|
49455
|
+
if (isSourceDevelopmentVersion(currentVersion))
|
|
49456
|
+
return;
|
|
49425
49457
|
const existing = readCache(homePath) ?? { packageName: PACKAGE_NAME };
|
|
49426
49458
|
const registry2 = resolveUpdateRegistry(env);
|
|
49427
49459
|
const registryConfigFingerprint = getUpdateRegistryConfigFingerprint(env, undefined, homePath);
|
|
@@ -49467,7 +49499,10 @@ if (httpTimeoutWarning) {
|
|
|
49467
49499
|
}
|
|
49468
49500
|
if (launcher.updateWorker) {
|
|
49469
49501
|
try {
|
|
49470
|
-
runUpdateCheckWorker({
|
|
49502
|
+
runUpdateCheckWorker({
|
|
49503
|
+
env: process.env,
|
|
49504
|
+
currentVersion: package_default3.version
|
|
49505
|
+
});
|
|
49471
49506
|
} catch {}
|
|
49472
49507
|
process.exit(0);
|
|
49473
49508
|
}
|
|
@@ -49475,12 +49510,12 @@ var updateEligibility = {
|
|
|
49475
49510
|
env: process.env,
|
|
49476
49511
|
isTTY: !!process.stderr.isTTY,
|
|
49477
49512
|
noUpdateCheck: launcher.noUpdateCheck,
|
|
49513
|
+
currentVersion: package_default3.version,
|
|
49478
49514
|
presentation: prepared.presentation
|
|
49479
49515
|
};
|
|
49480
49516
|
if (shouldRunUpdateCheck(updateEligibility)) {
|
|
49481
49517
|
const notice = getUpdateNotice({
|
|
49482
|
-
...updateEligibility
|
|
49483
|
-
currentVersion: package_default3.version
|
|
49518
|
+
...updateEligibility
|
|
49484
49519
|
});
|
|
49485
49520
|
if (notice) {
|
|
49486
49521
|
const colorEnabled = !process.env.NO_COLOR && !!process.stderr.isTTY;
|
|
@@ -49506,4 +49541,5 @@ process.exitCode = interceptedExitCode === undefined ? await runPreparedCli(laun
|
|
|
49506
49541
|
version: package_default3.version
|
|
49507
49542
|
}) : interceptedExitCode;
|
|
49508
49543
|
|
|
49509
|
-
//# debugId=
|
|
49544
|
+
//# debugId=2BD385383B62C23C64756E2164756E21
|
|
49545
|
+
//# warmhub-cli-build-info {"cliVersion":"0.77.3","sdkVersion":"0.75.3"}
|
package/package.json
CHANGED