thinkwell 0.5.0 → 0.5.1
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/think-builder.d.ts.map +1 -1
- package/dist/think-builder.js +4 -2
- package/dist/think-builder.js.map +1 -1
- package/dist-pkg/cli-build.cjs +340 -30
- package/dist-pkg/cli-check.cjs +345 -28
- package/dist-pkg/thinkwell.cjs +2 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"think-builder.d.ts","sourceRoot":"","sources":["../src/think-builder.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,cAAc,EAGnB,KAAK,SAAS,EAEf,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,YAAY,CAAC;AAMlE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAyBpD;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;CACrB;AA8ED;;;;;;;;GAQG;AACH,qBAAa,YAAY,CAAC,MAAM;IAC9B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;IACxC,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,MAAM,CAA0C;IACxD,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,eAAe,CAAqC;IAC5D,OAAO,CAAC,IAAI,CAAqB;IACjC,OAAO,CAAC,kBAAkB,CAAqB;gBAG7C,IAAI,EAAE,eAAe,EACrB,MAAM,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,EAC/B,iBAAiB,CAAC,EAAE,MAAM;IAO5B;;OAEG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAK3B;;OAEG;IACH,MAAM,CAAC,OA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AO,CAAC,OAAO,CAAC,GAC5C,IAAI;IAyCP;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,CAAC,EAAE,CAAC,EACb,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC,EAC9B,YAAY,EAAE,cAAc,CAAC,CAAC,CAAC,EAC/B,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GAChC,IAAI;IAEP;;OAEG;IACH,UAAU,CAAC,CAAC,EACV,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC,EAC9B,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,GACtC,IAAI;IAEP;;OAEG;IACH,UAAU,CACR,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,GAC5C,IAAI;IAyCP;;;;;;;;;;OAUG;IACH,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,sBAAsB,GAAG,IAAI;IAoBvD;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAKvB;;;;;;;;OAQG;YACW,cAAc;IAsB5B;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB;IAqB1B;;;;;;;;;;OAUG;IACG,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;IAI5B;;;;;;OAMG;IACH,MAAM,IAAI,aAAa,CAAC,MAAM,CAAC;YAMjB,cAAc;CAkK7B"}
|
package/dist/think-builder.js
CHANGED
|
@@ -382,8 +382,8 @@ export class ThinkBuilder {
|
|
|
382
382
|
// Wait for MCP tools discovery
|
|
383
383
|
await this._conn.mcpHandler.waitForToolsDiscovery(sessionId, 2000);
|
|
384
384
|
try {
|
|
385
|
-
//
|
|
386
|
-
|
|
385
|
+
// Start the prompt without awaiting - we need to read updates concurrently
|
|
386
|
+
const promptPromise = session.sendPrompt(prompt);
|
|
387
387
|
// Read updates, forwarding events to the stream and watching for result
|
|
388
388
|
while (!resultReceived) {
|
|
389
389
|
const update = await session.readUpdate();
|
|
@@ -396,6 +396,8 @@ export class ThinkBuilder {
|
|
|
396
396
|
// Forward the event to stream consumers
|
|
397
397
|
stream.pushEvent(update);
|
|
398
398
|
}
|
|
399
|
+
// Wait for the prompt to complete (it should already be done since we got a stop)
|
|
400
|
+
await promptPromise;
|
|
399
401
|
if (resultReceived && result !== undefined) {
|
|
400
402
|
stream.resolveResult(result);
|
|
401
403
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"think-builder.js","sourceRoot":"","sources":["../src/think-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,wBAAwB,GAMzB,MAAM,gBAAgB,CAAC;AAOxB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAkDpD;;GAEG;AACH,MAAM,YAAY;IACP,SAAS,CAAS;IACV,KAAK,CAAkB;IAChC,eAAe,GAAqB,EAAE,CAAC;IACvC,gBAAgB,GAA4C,EAAE,CAAC;IAC/D,OAAO,GAAY,KAAK,CAAC;IAEjC,YAAY,SAAiB,EAAE,IAAqB;QAClD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,OAAe;QAC9B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC;YAClD,SAAS,EAAE,IAAI,CAAC,SAAS;YACz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AAC,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,EAAE,CAAC;gBAChB,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC;gBAAS,CAAC;YACT,2BAA2B;YAC3B,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACzC,IAAI,WAAW,EAAE,CAAC;gBAChB,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;YAChD,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
package/dist-pkg/cli-build.cjs
CHANGED
|
@@ -223419,7 +223419,7 @@ var require_safe_stable_stringify = __commonJS({
|
|
|
223419
223419
|
return circularValue;
|
|
223420
223420
|
}
|
|
223421
223421
|
let res = "";
|
|
223422
|
-
let
|
|
223422
|
+
let join6 = ",";
|
|
223423
223423
|
const originalIndentation = indentation;
|
|
223424
223424
|
if (Array.isArray(value)) {
|
|
223425
223425
|
if (value.length === 0) {
|
|
@@ -223433,7 +223433,7 @@ var require_safe_stable_stringify = __commonJS({
|
|
|
223433
223433
|
indentation += spacer;
|
|
223434
223434
|
res += `
|
|
223435
223435
|
${indentation}`;
|
|
223436
|
-
|
|
223436
|
+
join6 = `,
|
|
223437
223437
|
${indentation}`;
|
|
223438
223438
|
}
|
|
223439
223439
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
@@ -223441,13 +223441,13 @@ ${indentation}`;
|
|
|
223441
223441
|
for (; i < maximumValuesToStringify - 1; i++) {
|
|
223442
223442
|
const tmp2 = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
|
|
223443
223443
|
res += tmp2 !== void 0 ? tmp2 : "null";
|
|
223444
|
-
res +=
|
|
223444
|
+
res += join6;
|
|
223445
223445
|
}
|
|
223446
223446
|
const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
|
|
223447
223447
|
res += tmp !== void 0 ? tmp : "null";
|
|
223448
223448
|
if (value.length - 1 > maximumBreadth) {
|
|
223449
223449
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
223450
|
-
res += `${
|
|
223450
|
+
res += `${join6}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
223451
223451
|
}
|
|
223452
223452
|
if (spacer !== "") {
|
|
223453
223453
|
res += `
|
|
@@ -223468,7 +223468,7 @@ ${originalIndentation}`;
|
|
|
223468
223468
|
let separator = "";
|
|
223469
223469
|
if (spacer !== "") {
|
|
223470
223470
|
indentation += spacer;
|
|
223471
|
-
|
|
223471
|
+
join6 = `,
|
|
223472
223472
|
${indentation}`;
|
|
223473
223473
|
whitespace = " ";
|
|
223474
223474
|
}
|
|
@@ -223482,13 +223482,13 @@ ${indentation}`;
|
|
|
223482
223482
|
const tmp = stringifyFnReplacer(key3, value, stack, replacer, spacer, indentation);
|
|
223483
223483
|
if (tmp !== void 0) {
|
|
223484
223484
|
res += `${separator}${strEscape(key3)}:${whitespace}${tmp}`;
|
|
223485
|
-
separator =
|
|
223485
|
+
separator = join6;
|
|
223486
223486
|
}
|
|
223487
223487
|
}
|
|
223488
223488
|
if (keyLength > maximumBreadth) {
|
|
223489
223489
|
const removedKeys = keyLength - maximumBreadth;
|
|
223490
223490
|
res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`;
|
|
223491
|
-
separator =
|
|
223491
|
+
separator = join6;
|
|
223492
223492
|
}
|
|
223493
223493
|
if (spacer !== "" && separator.length > 1) {
|
|
223494
223494
|
res = `
|
|
@@ -223530,7 +223530,7 @@ ${originalIndentation}`;
|
|
|
223530
223530
|
}
|
|
223531
223531
|
const originalIndentation = indentation;
|
|
223532
223532
|
let res = "";
|
|
223533
|
-
let
|
|
223533
|
+
let join6 = ",";
|
|
223534
223534
|
if (Array.isArray(value)) {
|
|
223535
223535
|
if (value.length === 0) {
|
|
223536
223536
|
return "[]";
|
|
@@ -223543,7 +223543,7 @@ ${originalIndentation}`;
|
|
|
223543
223543
|
indentation += spacer;
|
|
223544
223544
|
res += `
|
|
223545
223545
|
${indentation}`;
|
|
223546
|
-
|
|
223546
|
+
join6 = `,
|
|
223547
223547
|
${indentation}`;
|
|
223548
223548
|
}
|
|
223549
223549
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
@@ -223551,13 +223551,13 @@ ${indentation}`;
|
|
|
223551
223551
|
for (; i < maximumValuesToStringify - 1; i++) {
|
|
223552
223552
|
const tmp2 = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
|
|
223553
223553
|
res += tmp2 !== void 0 ? tmp2 : "null";
|
|
223554
|
-
res +=
|
|
223554
|
+
res += join6;
|
|
223555
223555
|
}
|
|
223556
223556
|
const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
|
|
223557
223557
|
res += tmp !== void 0 ? tmp : "null";
|
|
223558
223558
|
if (value.length - 1 > maximumBreadth) {
|
|
223559
223559
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
223560
|
-
res += `${
|
|
223560
|
+
res += `${join6}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
223561
223561
|
}
|
|
223562
223562
|
if (spacer !== "") {
|
|
223563
223563
|
res += `
|
|
@@ -223570,7 +223570,7 @@ ${originalIndentation}`;
|
|
|
223570
223570
|
let whitespace = "";
|
|
223571
223571
|
if (spacer !== "") {
|
|
223572
223572
|
indentation += spacer;
|
|
223573
|
-
|
|
223573
|
+
join6 = `,
|
|
223574
223574
|
${indentation}`;
|
|
223575
223575
|
whitespace = " ";
|
|
223576
223576
|
}
|
|
@@ -223579,7 +223579,7 @@ ${indentation}`;
|
|
|
223579
223579
|
const tmp = stringifyArrayReplacer(key3, value[key3], stack, replacer, spacer, indentation);
|
|
223580
223580
|
if (tmp !== void 0) {
|
|
223581
223581
|
res += `${separator}${strEscape(key3)}:${whitespace}${tmp}`;
|
|
223582
|
-
separator =
|
|
223582
|
+
separator = join6;
|
|
223583
223583
|
}
|
|
223584
223584
|
}
|
|
223585
223585
|
if (spacer !== "" && separator.length > 1) {
|
|
@@ -223638,20 +223638,20 @@ ${originalIndentation}`;
|
|
|
223638
223638
|
indentation += spacer;
|
|
223639
223639
|
let res2 = `
|
|
223640
223640
|
${indentation}`;
|
|
223641
|
-
const
|
|
223641
|
+
const join7 = `,
|
|
223642
223642
|
${indentation}`;
|
|
223643
223643
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
223644
223644
|
let i = 0;
|
|
223645
223645
|
for (; i < maximumValuesToStringify - 1; i++) {
|
|
223646
223646
|
const tmp2 = stringifyIndent(String(i), value[i], stack, spacer, indentation);
|
|
223647
223647
|
res2 += tmp2 !== void 0 ? tmp2 : "null";
|
|
223648
|
-
res2 +=
|
|
223648
|
+
res2 += join7;
|
|
223649
223649
|
}
|
|
223650
223650
|
const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation);
|
|
223651
223651
|
res2 += tmp !== void 0 ? tmp : "null";
|
|
223652
223652
|
if (value.length - 1 > maximumBreadth) {
|
|
223653
223653
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
223654
|
-
res2 += `${
|
|
223654
|
+
res2 += `${join7}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
223655
223655
|
}
|
|
223656
223656
|
res2 += `
|
|
223657
223657
|
${originalIndentation}`;
|
|
@@ -223667,16 +223667,16 @@ ${originalIndentation}`;
|
|
|
223667
223667
|
return '"[Object]"';
|
|
223668
223668
|
}
|
|
223669
223669
|
indentation += spacer;
|
|
223670
|
-
const
|
|
223670
|
+
const join6 = `,
|
|
223671
223671
|
${indentation}`;
|
|
223672
223672
|
let res = "";
|
|
223673
223673
|
let separator = "";
|
|
223674
223674
|
let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
|
|
223675
223675
|
if (isTypedArrayWithEntries(value)) {
|
|
223676
|
-
res += stringifyTypedArray(value,
|
|
223676
|
+
res += stringifyTypedArray(value, join6, maximumBreadth);
|
|
223677
223677
|
keys = keys.slice(value.length);
|
|
223678
223678
|
maximumPropertiesToStringify -= value.length;
|
|
223679
|
-
separator =
|
|
223679
|
+
separator = join6;
|
|
223680
223680
|
}
|
|
223681
223681
|
if (deterministic) {
|
|
223682
223682
|
keys = sort(keys, comparator);
|
|
@@ -223687,13 +223687,13 @@ ${indentation}`;
|
|
|
223687
223687
|
const tmp = stringifyIndent(key3, value[key3], stack, spacer, indentation);
|
|
223688
223688
|
if (tmp !== void 0) {
|
|
223689
223689
|
res += `${separator}${strEscape(key3)}: ${tmp}`;
|
|
223690
|
-
separator =
|
|
223690
|
+
separator = join6;
|
|
223691
223691
|
}
|
|
223692
223692
|
}
|
|
223693
223693
|
if (keyLength > maximumBreadth) {
|
|
223694
223694
|
const removedKeys = keyLength - maximumBreadth;
|
|
223695
223695
|
res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`;
|
|
223696
|
-
separator =
|
|
223696
|
+
separator = join6;
|
|
223697
223697
|
}
|
|
223698
223698
|
if (separator !== "") {
|
|
223699
223699
|
res = `
|
|
@@ -238603,8 +238603,8 @@ __export(build_exports, {
|
|
|
238603
238603
|
});
|
|
238604
238604
|
module.exports = __toCommonJS(build_exports);
|
|
238605
238605
|
var import_typescript3 = __toESM(require_typescript(), 1);
|
|
238606
|
-
var
|
|
238607
|
-
var
|
|
238606
|
+
var import_node_fs5 = require("node:fs");
|
|
238607
|
+
var import_node_path5 = require("node:path");
|
|
238608
238608
|
var import_node_util3 = require("node:util");
|
|
238609
238609
|
|
|
238610
238610
|
// dist/cli/compiler-host.js
|
|
@@ -238969,14 +238969,317 @@ function fmtError(message) {
|
|
|
238969
238969
|
}
|
|
238970
238970
|
__name(fmtError, "fmtError");
|
|
238971
238971
|
|
|
238972
|
+
// dist/cli/dependency-check.js
|
|
238973
|
+
var import_node_fs4 = require("node:fs");
|
|
238974
|
+
var import_node_path4 = require("node:path");
|
|
238975
|
+
var import_node_child_process = require("node:child_process");
|
|
238976
|
+
|
|
238977
|
+
// dist/cli/package-manager.js
|
|
238978
|
+
var import_node_fs3 = require("node:fs");
|
|
238979
|
+
var import_node_path3 = require("node:path");
|
|
238980
|
+
var LOCKFILES = [
|
|
238981
|
+
{ file: "pnpm-lock.yaml", pm: "pnpm" },
|
|
238982
|
+
{ file: "yarn.lock", pm: "yarn" },
|
|
238983
|
+
{ file: "package-lock.json", pm: "npm" }
|
|
238984
|
+
];
|
|
238985
|
+
function detectByLockfile(projectDir) {
|
|
238986
|
+
for (const { file, pm } of LOCKFILES) {
|
|
238987
|
+
const lockfilePath = (0, import_node_path3.join)(projectDir, file);
|
|
238988
|
+
if ((0, import_node_fs3.existsSync)(lockfilePath)) {
|
|
238989
|
+
return { pm, lockfile: file };
|
|
238990
|
+
}
|
|
238991
|
+
}
|
|
238992
|
+
return null;
|
|
238993
|
+
}
|
|
238994
|
+
__name(detectByLockfile, "detectByLockfile");
|
|
238995
|
+
function parsePackageManagerField(value) {
|
|
238996
|
+
if (typeof value !== "string") {
|
|
238997
|
+
return null;
|
|
238998
|
+
}
|
|
238999
|
+
const atIndex = value.indexOf("@");
|
|
239000
|
+
const name = atIndex > 0 ? value.slice(0, atIndex) : value;
|
|
239001
|
+
if (name === "pnpm" || name === "npm" || name === "yarn") {
|
|
239002
|
+
return name;
|
|
239003
|
+
}
|
|
239004
|
+
return null;
|
|
239005
|
+
}
|
|
239006
|
+
__name(parsePackageManagerField, "parsePackageManagerField");
|
|
239007
|
+
function detectByPackageJson(projectDir) {
|
|
239008
|
+
const pkgPath = (0, import_node_path3.join)(projectDir, "package.json");
|
|
239009
|
+
if (!(0, import_node_fs3.existsSync)(pkgPath)) {
|
|
239010
|
+
return null;
|
|
239011
|
+
}
|
|
239012
|
+
try {
|
|
239013
|
+
const content = (0, import_node_fs3.readFileSync)(pkgPath, "utf-8");
|
|
239014
|
+
const pkg = JSON.parse(content);
|
|
239015
|
+
return parsePackageManagerField(pkg.packageManager);
|
|
239016
|
+
} catch {
|
|
239017
|
+
return null;
|
|
239018
|
+
}
|
|
239019
|
+
}
|
|
239020
|
+
__name(detectByPackageJson, "detectByPackageJson");
|
|
239021
|
+
function createPackageManagerInfo(name, lockfile) {
|
|
239022
|
+
return {
|
|
239023
|
+
name,
|
|
239024
|
+
lockfile,
|
|
239025
|
+
addCommand: /* @__PURE__ */ __name((pkg, dev) => {
|
|
239026
|
+
switch (name) {
|
|
239027
|
+
case "pnpm":
|
|
239028
|
+
return dev ? `pnpm add -D ${pkg}` : `pnpm add ${pkg}`;
|
|
239029
|
+
case "yarn":
|
|
239030
|
+
return dev ? `yarn add -D ${pkg}` : `yarn add ${pkg}`;
|
|
239031
|
+
case "npm":
|
|
239032
|
+
return dev ? `npm install -D ${pkg}` : `npm install ${pkg}`;
|
|
239033
|
+
}
|
|
239034
|
+
}, "addCommand"),
|
|
239035
|
+
whyCommand: /* @__PURE__ */ __name((pkg) => {
|
|
239036
|
+
switch (name) {
|
|
239037
|
+
case "pnpm":
|
|
239038
|
+
return ["pnpm", "why", pkg, "--json"];
|
|
239039
|
+
case "yarn":
|
|
239040
|
+
return ["yarn", "why", pkg, "--json"];
|
|
239041
|
+
case "npm":
|
|
239042
|
+
return ["npm", "why", pkg, "--json"];
|
|
239043
|
+
}
|
|
239044
|
+
}, "whyCommand")
|
|
239045
|
+
};
|
|
239046
|
+
}
|
|
239047
|
+
__name(createPackageManagerInfo, "createPackageManagerInfo");
|
|
239048
|
+
function detectPackageManager(projectDir) {
|
|
239049
|
+
const lockfileResult = detectByLockfile(projectDir);
|
|
239050
|
+
if (lockfileResult) {
|
|
239051
|
+
return createPackageManagerInfo(lockfileResult.pm, lockfileResult.lockfile);
|
|
239052
|
+
}
|
|
239053
|
+
const fromField = detectByPackageJson(projectDir);
|
|
239054
|
+
if (fromField) {
|
|
239055
|
+
return createPackageManagerInfo(fromField, null);
|
|
239056
|
+
}
|
|
239057
|
+
return createPackageManagerInfo("npm", null);
|
|
239058
|
+
}
|
|
239059
|
+
__name(detectPackageManager, "detectPackageManager");
|
|
239060
|
+
|
|
239061
|
+
// dist/cli/dependency-check.js
|
|
239062
|
+
function readPackageJson(dir) {
|
|
239063
|
+
const pkgPath = (0, import_node_path4.join)(dir, "package.json");
|
|
239064
|
+
if (!(0, import_node_fs4.existsSync)(pkgPath)) {
|
|
239065
|
+
return null;
|
|
239066
|
+
}
|
|
239067
|
+
try {
|
|
239068
|
+
const content = (0, import_node_fs4.readFileSync)(pkgPath, "utf-8");
|
|
239069
|
+
return JSON.parse(content);
|
|
239070
|
+
} catch {
|
|
239071
|
+
return null;
|
|
239072
|
+
}
|
|
239073
|
+
}
|
|
239074
|
+
__name(readPackageJson, "readPackageJson");
|
|
239075
|
+
function checkPackageJsonDirect(pkg, packageName) {
|
|
239076
|
+
const depTypes = [
|
|
239077
|
+
pkg.dependencies,
|
|
239078
|
+
pkg.devDependencies,
|
|
239079
|
+
pkg.peerDependencies,
|
|
239080
|
+
pkg.optionalDependencies
|
|
239081
|
+
];
|
|
239082
|
+
for (const deps of depTypes) {
|
|
239083
|
+
if (deps && packageName in deps) {
|
|
239084
|
+
return {
|
|
239085
|
+
found: true,
|
|
239086
|
+
version: deps[packageName],
|
|
239087
|
+
source: "package.json"
|
|
239088
|
+
};
|
|
239089
|
+
}
|
|
239090
|
+
}
|
|
239091
|
+
return null;
|
|
239092
|
+
}
|
|
239093
|
+
__name(checkPackageJsonDirect, "checkPackageJsonDirect");
|
|
239094
|
+
function execCommand(cmd, cwd) {
|
|
239095
|
+
return new Promise((resolve3, reject) => {
|
|
239096
|
+
const [command, ...args] = cmd;
|
|
239097
|
+
const proc = (0, import_node_child_process.spawn)(command, args, {
|
|
239098
|
+
cwd,
|
|
239099
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
239100
|
+
});
|
|
239101
|
+
let stdout = "";
|
|
239102
|
+
let stderr = "";
|
|
239103
|
+
proc.stdout.on("data", (data) => {
|
|
239104
|
+
stdout += data.toString();
|
|
239105
|
+
});
|
|
239106
|
+
proc.stderr.on("data", (data) => {
|
|
239107
|
+
stderr += data.toString();
|
|
239108
|
+
});
|
|
239109
|
+
proc.on("error", (err) => {
|
|
239110
|
+
reject(err);
|
|
239111
|
+
});
|
|
239112
|
+
proc.on("close", (code) => {
|
|
239113
|
+
if (code === 0) {
|
|
239114
|
+
resolve3({ stdout, stderr });
|
|
239115
|
+
} else {
|
|
239116
|
+
reject(new Error(`Command failed with exit code ${code}: ${stderr}`));
|
|
239117
|
+
}
|
|
239118
|
+
});
|
|
239119
|
+
});
|
|
239120
|
+
}
|
|
239121
|
+
__name(execCommand, "execCommand");
|
|
239122
|
+
function parsePnpmWhyOutput(stdout, packageName) {
|
|
239123
|
+
try {
|
|
239124
|
+
const result = JSON.parse(stdout);
|
|
239125
|
+
if (result && typeof result === "object" && packageName in result) {
|
|
239126
|
+
const info = result[packageName];
|
|
239127
|
+
return {
|
|
239128
|
+
found: true,
|
|
239129
|
+
version: info?.version,
|
|
239130
|
+
source: "workspace"
|
|
239131
|
+
};
|
|
239132
|
+
}
|
|
239133
|
+
return null;
|
|
239134
|
+
} catch {
|
|
239135
|
+
return null;
|
|
239136
|
+
}
|
|
239137
|
+
}
|
|
239138
|
+
__name(parsePnpmWhyOutput, "parsePnpmWhyOutput");
|
|
239139
|
+
function parseNpmWhyOutput(stdout, _packageName) {
|
|
239140
|
+
try {
|
|
239141
|
+
const result = JSON.parse(stdout);
|
|
239142
|
+
if (Array.isArray(result) && result.length > 0) {
|
|
239143
|
+
const first = result[0];
|
|
239144
|
+
return {
|
|
239145
|
+
found: true,
|
|
239146
|
+
version: first?.version,
|
|
239147
|
+
source: "workspace"
|
|
239148
|
+
};
|
|
239149
|
+
}
|
|
239150
|
+
return null;
|
|
239151
|
+
} catch {
|
|
239152
|
+
return null;
|
|
239153
|
+
}
|
|
239154
|
+
}
|
|
239155
|
+
__name(parseNpmWhyOutput, "parseNpmWhyOutput");
|
|
239156
|
+
function parseYarnWhyOutput(stdout, _packageName) {
|
|
239157
|
+
if (stdout.trim().length > 0) {
|
|
239158
|
+
let version;
|
|
239159
|
+
try {
|
|
239160
|
+
const lines = stdout.trim().split("\n");
|
|
239161
|
+
for (const line of lines) {
|
|
239162
|
+
const obj = JSON.parse(line);
|
|
239163
|
+
if (obj.type === "info" && obj.data) {
|
|
239164
|
+
const match = obj.data.match(/"[^@]+@([^"]+)"/);
|
|
239165
|
+
if (match) {
|
|
239166
|
+
version = match[1];
|
|
239167
|
+
break;
|
|
239168
|
+
}
|
|
239169
|
+
}
|
|
239170
|
+
}
|
|
239171
|
+
} catch {
|
|
239172
|
+
}
|
|
239173
|
+
return {
|
|
239174
|
+
found: true,
|
|
239175
|
+
version,
|
|
239176
|
+
source: "workspace"
|
|
239177
|
+
};
|
|
239178
|
+
}
|
|
239179
|
+
return null;
|
|
239180
|
+
}
|
|
239181
|
+
__name(parseYarnWhyOutput, "parseYarnWhyOutput");
|
|
239182
|
+
async function checkViaPackageManager(pm, packageName, cwd) {
|
|
239183
|
+
const cmd = pm.whyCommand(packageName);
|
|
239184
|
+
try {
|
|
239185
|
+
const { stdout } = await execCommand(cmd, cwd);
|
|
239186
|
+
switch (pm.name) {
|
|
239187
|
+
case "pnpm":
|
|
239188
|
+
return parsePnpmWhyOutput(stdout, packageName);
|
|
239189
|
+
case "npm":
|
|
239190
|
+
return parseNpmWhyOutput(stdout, packageName);
|
|
239191
|
+
case "yarn":
|
|
239192
|
+
return parseYarnWhyOutput(stdout, packageName);
|
|
239193
|
+
}
|
|
239194
|
+
} catch {
|
|
239195
|
+
return null;
|
|
239196
|
+
}
|
|
239197
|
+
}
|
|
239198
|
+
__name(checkViaPackageManager, "checkViaPackageManager");
|
|
239199
|
+
async function checkDependencies(projectDir) {
|
|
239200
|
+
const pm = detectPackageManager(projectDir);
|
|
239201
|
+
const pkg = readPackageJson(projectDir);
|
|
239202
|
+
let thinkwellStatus = { found: false };
|
|
239203
|
+
let typescriptStatus = { found: false };
|
|
239204
|
+
if (pkg) {
|
|
239205
|
+
const thinkwellDirect = checkPackageJsonDirect(pkg, "thinkwell");
|
|
239206
|
+
if (thinkwellDirect) {
|
|
239207
|
+
thinkwellStatus = thinkwellDirect;
|
|
239208
|
+
}
|
|
239209
|
+
const typescriptDirect = checkPackageJsonDirect(pkg, "typescript");
|
|
239210
|
+
if (typescriptDirect) {
|
|
239211
|
+
typescriptStatus = typescriptDirect;
|
|
239212
|
+
}
|
|
239213
|
+
}
|
|
239214
|
+
if (!thinkwellStatus.found) {
|
|
239215
|
+
const result = await checkViaPackageManager(pm, "thinkwell", projectDir);
|
|
239216
|
+
if (result) {
|
|
239217
|
+
thinkwellStatus = result;
|
|
239218
|
+
}
|
|
239219
|
+
}
|
|
239220
|
+
if (!typescriptStatus.found) {
|
|
239221
|
+
const result = await checkViaPackageManager(pm, "typescript", projectDir);
|
|
239222
|
+
if (result) {
|
|
239223
|
+
typescriptStatus = result;
|
|
239224
|
+
}
|
|
239225
|
+
}
|
|
239226
|
+
return {
|
|
239227
|
+
thinkwell: thinkwellStatus,
|
|
239228
|
+
typescript: typescriptStatus,
|
|
239229
|
+
packageManager: pm
|
|
239230
|
+
};
|
|
239231
|
+
}
|
|
239232
|
+
__name(checkDependencies, "checkDependencies");
|
|
239233
|
+
function hasPackageJson(projectDir) {
|
|
239234
|
+
return (0, import_node_fs4.existsSync)((0, import_node_path4.join)(projectDir, "package.json"));
|
|
239235
|
+
}
|
|
239236
|
+
__name(hasPackageJson, "hasPackageJson");
|
|
239237
|
+
|
|
239238
|
+
// dist/cli/dependency-errors.js
|
|
239239
|
+
function formatMissingDependencyError(result) {
|
|
239240
|
+
const { thinkwell, typescript, packageManager } = result;
|
|
239241
|
+
const pm = packageManager;
|
|
239242
|
+
const missing = [];
|
|
239243
|
+
if (!thinkwell.found)
|
|
239244
|
+
missing.push("thinkwell");
|
|
239245
|
+
if (!typescript.found)
|
|
239246
|
+
missing.push("typescript");
|
|
239247
|
+
if (missing.length === 0) {
|
|
239248
|
+
return "";
|
|
239249
|
+
}
|
|
239250
|
+
const lines = [];
|
|
239251
|
+
if (missing.length === 1) {
|
|
239252
|
+
lines.push(`Error: This project has a package.json but no dependency on '${missing[0]}'.`);
|
|
239253
|
+
} else {
|
|
239254
|
+
lines.push(`Error: This project has a package.json but is missing required dependencies.`);
|
|
239255
|
+
}
|
|
239256
|
+
lines.push("");
|
|
239257
|
+
lines.push("When a project has explicit configuration, thinkwell expects explicit dependencies.");
|
|
239258
|
+
lines.push("This ensures you get the versions you expect, not versions bundled with the CLI.");
|
|
239259
|
+
lines.push("");
|
|
239260
|
+
lines.push("Run 'thinkwell init' to add the required dependencies, or add them manually:");
|
|
239261
|
+
if (!thinkwell.found) {
|
|
239262
|
+
lines.push(` ${pm.addCommand("thinkwell")}`);
|
|
239263
|
+
}
|
|
239264
|
+
if (!typescript.found) {
|
|
239265
|
+
lines.push(` ${pm.addCommand("typescript", true)}`);
|
|
239266
|
+
}
|
|
239267
|
+
return lines.join("\n");
|
|
239268
|
+
}
|
|
239269
|
+
__name(formatMissingDependencyError, "formatMissingDependencyError");
|
|
239270
|
+
function hasMissingDependencies(result) {
|
|
239271
|
+
return !result.thinkwell.found || !result.typescript.found;
|
|
239272
|
+
}
|
|
239273
|
+
__name(hasMissingDependencies, "hasMissingDependencies");
|
|
239274
|
+
|
|
238972
239275
|
// dist/cli/build.js
|
|
238973
239276
|
function readPackageJsonConfig(dir) {
|
|
238974
|
-
const pkgPath = (0,
|
|
238975
|
-
if (!(0,
|
|
239277
|
+
const pkgPath = (0, import_node_path5.join)(dir, "package.json");
|
|
239278
|
+
if (!(0, import_node_fs5.existsSync)(pkgPath)) {
|
|
238976
239279
|
return void 0;
|
|
238977
239280
|
}
|
|
238978
239281
|
try {
|
|
238979
|
-
const content = (0,
|
|
239282
|
+
const content = (0, import_node_fs5.readFileSync)(pkgPath, "utf-8");
|
|
238980
239283
|
const pkg = JSON.parse(content);
|
|
238981
239284
|
const config = pkg?.thinkwell?.build;
|
|
238982
239285
|
if (!config || typeof config !== "object") {
|
|
@@ -239006,13 +239309,13 @@ function createFileFilter(config) {
|
|
|
239006
239309
|
return (fileName) => {
|
|
239007
239310
|
if (hasExclude) {
|
|
239008
239311
|
for (const pattern of exclude) {
|
|
239009
|
-
if ((0,
|
|
239312
|
+
if ((0, import_node_path5.matchesGlob)(fileName, pattern))
|
|
239010
239313
|
return false;
|
|
239011
239314
|
}
|
|
239012
239315
|
}
|
|
239013
239316
|
if (hasInclude) {
|
|
239014
239317
|
for (const pattern of include) {
|
|
239015
|
-
if ((0,
|
|
239318
|
+
if ((0, import_node_path5.matchesGlob)(fileName, pattern))
|
|
239016
239319
|
return true;
|
|
239017
239320
|
}
|
|
239018
239321
|
return false;
|
|
@@ -239034,8 +239337,15 @@ function formatDiagnostics(diagnostics) {
|
|
|
239034
239337
|
__name(formatDiagnostics, "formatDiagnostics");
|
|
239035
239338
|
async function runBuild(options) {
|
|
239036
239339
|
const cwd = process.cwd();
|
|
239037
|
-
|
|
239038
|
-
|
|
239340
|
+
if (hasPackageJson(cwd)) {
|
|
239341
|
+
const depCheck = await checkDependencies(cwd);
|
|
239342
|
+
if (hasMissingDependencies(depCheck)) {
|
|
239343
|
+
console.error(formatMissingDependencyError(depCheck));
|
|
239344
|
+
process.exit(2);
|
|
239345
|
+
}
|
|
239346
|
+
}
|
|
239347
|
+
const configPath = options.project ? (0, import_node_path5.resolve)(cwd, options.project) : (0, import_node_path5.resolve)(cwd, "tsconfig.json");
|
|
239348
|
+
if (!(0, import_node_fs5.existsSync)(configPath)) {
|
|
239039
239349
|
console.error(fmtError(`Cannot find ${options.project ?? "tsconfig.json"}`));
|
|
239040
239350
|
console.error("");
|
|
239041
239351
|
console.error(" Run this command from a directory with a tsconfig.json,");
|
package/dist-pkg/cli-check.cjs
CHANGED
|
@@ -223419,7 +223419,7 @@ var require_safe_stable_stringify = __commonJS({
|
|
|
223419
223419
|
return circularValue;
|
|
223420
223420
|
}
|
|
223421
223421
|
let res = "";
|
|
223422
|
-
let
|
|
223422
|
+
let join7 = ",";
|
|
223423
223423
|
const originalIndentation = indentation;
|
|
223424
223424
|
if (Array.isArray(value)) {
|
|
223425
223425
|
if (value.length === 0) {
|
|
@@ -223433,7 +223433,7 @@ var require_safe_stable_stringify = __commonJS({
|
|
|
223433
223433
|
indentation += spacer;
|
|
223434
223434
|
res += `
|
|
223435
223435
|
${indentation}`;
|
|
223436
|
-
|
|
223436
|
+
join7 = `,
|
|
223437
223437
|
${indentation}`;
|
|
223438
223438
|
}
|
|
223439
223439
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
@@ -223441,13 +223441,13 @@ ${indentation}`;
|
|
|
223441
223441
|
for (; i < maximumValuesToStringify - 1; i++) {
|
|
223442
223442
|
const tmp2 = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
|
|
223443
223443
|
res += tmp2 !== void 0 ? tmp2 : "null";
|
|
223444
|
-
res +=
|
|
223444
|
+
res += join7;
|
|
223445
223445
|
}
|
|
223446
223446
|
const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
|
|
223447
223447
|
res += tmp !== void 0 ? tmp : "null";
|
|
223448
223448
|
if (value.length - 1 > maximumBreadth) {
|
|
223449
223449
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
223450
|
-
res += `${
|
|
223450
|
+
res += `${join7}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
223451
223451
|
}
|
|
223452
223452
|
if (spacer !== "") {
|
|
223453
223453
|
res += `
|
|
@@ -223468,7 +223468,7 @@ ${originalIndentation}`;
|
|
|
223468
223468
|
let separator = "";
|
|
223469
223469
|
if (spacer !== "") {
|
|
223470
223470
|
indentation += spacer;
|
|
223471
|
-
|
|
223471
|
+
join7 = `,
|
|
223472
223472
|
${indentation}`;
|
|
223473
223473
|
whitespace = " ";
|
|
223474
223474
|
}
|
|
@@ -223482,13 +223482,13 @@ ${indentation}`;
|
|
|
223482
223482
|
const tmp = stringifyFnReplacer(key3, value, stack, replacer, spacer, indentation);
|
|
223483
223483
|
if (tmp !== void 0) {
|
|
223484
223484
|
res += `${separator}${strEscape(key3)}:${whitespace}${tmp}`;
|
|
223485
|
-
separator =
|
|
223485
|
+
separator = join7;
|
|
223486
223486
|
}
|
|
223487
223487
|
}
|
|
223488
223488
|
if (keyLength > maximumBreadth) {
|
|
223489
223489
|
const removedKeys = keyLength - maximumBreadth;
|
|
223490
223490
|
res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`;
|
|
223491
|
-
separator =
|
|
223491
|
+
separator = join7;
|
|
223492
223492
|
}
|
|
223493
223493
|
if (spacer !== "" && separator.length > 1) {
|
|
223494
223494
|
res = `
|
|
@@ -223530,7 +223530,7 @@ ${originalIndentation}`;
|
|
|
223530
223530
|
}
|
|
223531
223531
|
const originalIndentation = indentation;
|
|
223532
223532
|
let res = "";
|
|
223533
|
-
let
|
|
223533
|
+
let join7 = ",";
|
|
223534
223534
|
if (Array.isArray(value)) {
|
|
223535
223535
|
if (value.length === 0) {
|
|
223536
223536
|
return "[]";
|
|
@@ -223543,7 +223543,7 @@ ${originalIndentation}`;
|
|
|
223543
223543
|
indentation += spacer;
|
|
223544
223544
|
res += `
|
|
223545
223545
|
${indentation}`;
|
|
223546
|
-
|
|
223546
|
+
join7 = `,
|
|
223547
223547
|
${indentation}`;
|
|
223548
223548
|
}
|
|
223549
223549
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
@@ -223551,13 +223551,13 @@ ${indentation}`;
|
|
|
223551
223551
|
for (; i < maximumValuesToStringify - 1; i++) {
|
|
223552
223552
|
const tmp2 = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
|
|
223553
223553
|
res += tmp2 !== void 0 ? tmp2 : "null";
|
|
223554
|
-
res +=
|
|
223554
|
+
res += join7;
|
|
223555
223555
|
}
|
|
223556
223556
|
const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
|
|
223557
223557
|
res += tmp !== void 0 ? tmp : "null";
|
|
223558
223558
|
if (value.length - 1 > maximumBreadth) {
|
|
223559
223559
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
223560
|
-
res += `${
|
|
223560
|
+
res += `${join7}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
223561
223561
|
}
|
|
223562
223562
|
if (spacer !== "") {
|
|
223563
223563
|
res += `
|
|
@@ -223570,7 +223570,7 @@ ${originalIndentation}`;
|
|
|
223570
223570
|
let whitespace = "";
|
|
223571
223571
|
if (spacer !== "") {
|
|
223572
223572
|
indentation += spacer;
|
|
223573
|
-
|
|
223573
|
+
join7 = `,
|
|
223574
223574
|
${indentation}`;
|
|
223575
223575
|
whitespace = " ";
|
|
223576
223576
|
}
|
|
@@ -223579,7 +223579,7 @@ ${indentation}`;
|
|
|
223579
223579
|
const tmp = stringifyArrayReplacer(key3, value[key3], stack, replacer, spacer, indentation);
|
|
223580
223580
|
if (tmp !== void 0) {
|
|
223581
223581
|
res += `${separator}${strEscape(key3)}:${whitespace}${tmp}`;
|
|
223582
|
-
separator =
|
|
223582
|
+
separator = join7;
|
|
223583
223583
|
}
|
|
223584
223584
|
}
|
|
223585
223585
|
if (spacer !== "" && separator.length > 1) {
|
|
@@ -223638,20 +223638,20 @@ ${originalIndentation}`;
|
|
|
223638
223638
|
indentation += spacer;
|
|
223639
223639
|
let res2 = `
|
|
223640
223640
|
${indentation}`;
|
|
223641
|
-
const
|
|
223641
|
+
const join8 = `,
|
|
223642
223642
|
${indentation}`;
|
|
223643
223643
|
const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
|
|
223644
223644
|
let i = 0;
|
|
223645
223645
|
for (; i < maximumValuesToStringify - 1; i++) {
|
|
223646
223646
|
const tmp2 = stringifyIndent(String(i), value[i], stack, spacer, indentation);
|
|
223647
223647
|
res2 += tmp2 !== void 0 ? tmp2 : "null";
|
|
223648
|
-
res2 +=
|
|
223648
|
+
res2 += join8;
|
|
223649
223649
|
}
|
|
223650
223650
|
const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation);
|
|
223651
223651
|
res2 += tmp !== void 0 ? tmp : "null";
|
|
223652
223652
|
if (value.length - 1 > maximumBreadth) {
|
|
223653
223653
|
const removedKeys = value.length - maximumBreadth - 1;
|
|
223654
|
-
res2 += `${
|
|
223654
|
+
res2 += `${join8}"... ${getItemCount(removedKeys)} not stringified"`;
|
|
223655
223655
|
}
|
|
223656
223656
|
res2 += `
|
|
223657
223657
|
${originalIndentation}`;
|
|
@@ -223667,16 +223667,16 @@ ${originalIndentation}`;
|
|
|
223667
223667
|
return '"[Object]"';
|
|
223668
223668
|
}
|
|
223669
223669
|
indentation += spacer;
|
|
223670
|
-
const
|
|
223670
|
+
const join7 = `,
|
|
223671
223671
|
${indentation}`;
|
|
223672
223672
|
let res = "";
|
|
223673
223673
|
let separator = "";
|
|
223674
223674
|
let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
|
|
223675
223675
|
if (isTypedArrayWithEntries(value)) {
|
|
223676
|
-
res += stringifyTypedArray(value,
|
|
223676
|
+
res += stringifyTypedArray(value, join7, maximumBreadth);
|
|
223677
223677
|
keys = keys.slice(value.length);
|
|
223678
223678
|
maximumPropertiesToStringify -= value.length;
|
|
223679
|
-
separator =
|
|
223679
|
+
separator = join7;
|
|
223680
223680
|
}
|
|
223681
223681
|
if (deterministic) {
|
|
223682
223682
|
keys = sort(keys, comparator);
|
|
@@ -223687,13 +223687,13 @@ ${indentation}`;
|
|
|
223687
223687
|
const tmp = stringifyIndent(key3, value[key3], stack, spacer, indentation);
|
|
223688
223688
|
if (tmp !== void 0) {
|
|
223689
223689
|
res += `${separator}${strEscape(key3)}: ${tmp}`;
|
|
223690
|
-
separator =
|
|
223690
|
+
separator = join7;
|
|
223691
223691
|
}
|
|
223692
223692
|
}
|
|
223693
223693
|
if (keyLength > maximumBreadth) {
|
|
223694
223694
|
const removedKeys = keyLength - maximumBreadth;
|
|
223695
223695
|
res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`;
|
|
223696
|
-
separator =
|
|
223696
|
+
separator = join7;
|
|
223697
223697
|
}
|
|
223698
223698
|
if (separator !== "") {
|
|
223699
223699
|
res = `
|
|
@@ -238603,8 +238603,8 @@ __export(check_exports, {
|
|
|
238603
238603
|
});
|
|
238604
238604
|
module.exports = __toCommonJS(check_exports);
|
|
238605
238605
|
var import_typescript3 = __toESM(require_typescript(), 1);
|
|
238606
|
-
var
|
|
238607
|
-
var
|
|
238606
|
+
var import_node_fs6 = require("node:fs");
|
|
238607
|
+
var import_node_path6 = require("node:path");
|
|
238608
238608
|
|
|
238609
238609
|
// dist/cli/compiler-host.js
|
|
238610
238610
|
var import_typescript2 = __toESM(require_typescript(), 1);
|
|
@@ -239084,6 +239084,309 @@ function resolvePackageName(name, members) {
|
|
|
239084
239084
|
}
|
|
239085
239085
|
__name(resolvePackageName, "resolvePackageName");
|
|
239086
239086
|
|
|
239087
|
+
// dist/cli/dependency-check.js
|
|
239088
|
+
var import_node_fs5 = require("node:fs");
|
|
239089
|
+
var import_node_path5 = require("node:path");
|
|
239090
|
+
var import_node_child_process = require("node:child_process");
|
|
239091
|
+
|
|
239092
|
+
// dist/cli/package-manager.js
|
|
239093
|
+
var import_node_fs4 = require("node:fs");
|
|
239094
|
+
var import_node_path4 = require("node:path");
|
|
239095
|
+
var LOCKFILES = [
|
|
239096
|
+
{ file: "pnpm-lock.yaml", pm: "pnpm" },
|
|
239097
|
+
{ file: "yarn.lock", pm: "yarn" },
|
|
239098
|
+
{ file: "package-lock.json", pm: "npm" }
|
|
239099
|
+
];
|
|
239100
|
+
function detectByLockfile(projectDir) {
|
|
239101
|
+
for (const { file, pm } of LOCKFILES) {
|
|
239102
|
+
const lockfilePath = (0, import_node_path4.join)(projectDir, file);
|
|
239103
|
+
if ((0, import_node_fs4.existsSync)(lockfilePath)) {
|
|
239104
|
+
return { pm, lockfile: file };
|
|
239105
|
+
}
|
|
239106
|
+
}
|
|
239107
|
+
return null;
|
|
239108
|
+
}
|
|
239109
|
+
__name(detectByLockfile, "detectByLockfile");
|
|
239110
|
+
function parsePackageManagerField(value) {
|
|
239111
|
+
if (typeof value !== "string") {
|
|
239112
|
+
return null;
|
|
239113
|
+
}
|
|
239114
|
+
const atIndex = value.indexOf("@");
|
|
239115
|
+
const name = atIndex > 0 ? value.slice(0, atIndex) : value;
|
|
239116
|
+
if (name === "pnpm" || name === "npm" || name === "yarn") {
|
|
239117
|
+
return name;
|
|
239118
|
+
}
|
|
239119
|
+
return null;
|
|
239120
|
+
}
|
|
239121
|
+
__name(parsePackageManagerField, "parsePackageManagerField");
|
|
239122
|
+
function detectByPackageJson(projectDir) {
|
|
239123
|
+
const pkgPath = (0, import_node_path4.join)(projectDir, "package.json");
|
|
239124
|
+
if (!(0, import_node_fs4.existsSync)(pkgPath)) {
|
|
239125
|
+
return null;
|
|
239126
|
+
}
|
|
239127
|
+
try {
|
|
239128
|
+
const content = (0, import_node_fs4.readFileSync)(pkgPath, "utf-8");
|
|
239129
|
+
const pkg = JSON.parse(content);
|
|
239130
|
+
return parsePackageManagerField(pkg.packageManager);
|
|
239131
|
+
} catch {
|
|
239132
|
+
return null;
|
|
239133
|
+
}
|
|
239134
|
+
}
|
|
239135
|
+
__name(detectByPackageJson, "detectByPackageJson");
|
|
239136
|
+
function createPackageManagerInfo(name, lockfile) {
|
|
239137
|
+
return {
|
|
239138
|
+
name,
|
|
239139
|
+
lockfile,
|
|
239140
|
+
addCommand: /* @__PURE__ */ __name((pkg, dev) => {
|
|
239141
|
+
switch (name) {
|
|
239142
|
+
case "pnpm":
|
|
239143
|
+
return dev ? `pnpm add -D ${pkg}` : `pnpm add ${pkg}`;
|
|
239144
|
+
case "yarn":
|
|
239145
|
+
return dev ? `yarn add -D ${pkg}` : `yarn add ${pkg}`;
|
|
239146
|
+
case "npm":
|
|
239147
|
+
return dev ? `npm install -D ${pkg}` : `npm install ${pkg}`;
|
|
239148
|
+
}
|
|
239149
|
+
}, "addCommand"),
|
|
239150
|
+
whyCommand: /* @__PURE__ */ __name((pkg) => {
|
|
239151
|
+
switch (name) {
|
|
239152
|
+
case "pnpm":
|
|
239153
|
+
return ["pnpm", "why", pkg, "--json"];
|
|
239154
|
+
case "yarn":
|
|
239155
|
+
return ["yarn", "why", pkg, "--json"];
|
|
239156
|
+
case "npm":
|
|
239157
|
+
return ["npm", "why", pkg, "--json"];
|
|
239158
|
+
}
|
|
239159
|
+
}, "whyCommand")
|
|
239160
|
+
};
|
|
239161
|
+
}
|
|
239162
|
+
__name(createPackageManagerInfo, "createPackageManagerInfo");
|
|
239163
|
+
function detectPackageManager(projectDir) {
|
|
239164
|
+
const lockfileResult = detectByLockfile(projectDir);
|
|
239165
|
+
if (lockfileResult) {
|
|
239166
|
+
return createPackageManagerInfo(lockfileResult.pm, lockfileResult.lockfile);
|
|
239167
|
+
}
|
|
239168
|
+
const fromField = detectByPackageJson(projectDir);
|
|
239169
|
+
if (fromField) {
|
|
239170
|
+
return createPackageManagerInfo(fromField, null);
|
|
239171
|
+
}
|
|
239172
|
+
return createPackageManagerInfo("npm", null);
|
|
239173
|
+
}
|
|
239174
|
+
__name(detectPackageManager, "detectPackageManager");
|
|
239175
|
+
|
|
239176
|
+
// dist/cli/dependency-check.js
|
|
239177
|
+
function readPackageJson(dir) {
|
|
239178
|
+
const pkgPath = (0, import_node_path5.join)(dir, "package.json");
|
|
239179
|
+
if (!(0, import_node_fs5.existsSync)(pkgPath)) {
|
|
239180
|
+
return null;
|
|
239181
|
+
}
|
|
239182
|
+
try {
|
|
239183
|
+
const content = (0, import_node_fs5.readFileSync)(pkgPath, "utf-8");
|
|
239184
|
+
return JSON.parse(content);
|
|
239185
|
+
} catch {
|
|
239186
|
+
return null;
|
|
239187
|
+
}
|
|
239188
|
+
}
|
|
239189
|
+
__name(readPackageJson, "readPackageJson");
|
|
239190
|
+
function checkPackageJsonDirect(pkg, packageName) {
|
|
239191
|
+
const depTypes = [
|
|
239192
|
+
pkg.dependencies,
|
|
239193
|
+
pkg.devDependencies,
|
|
239194
|
+
pkg.peerDependencies,
|
|
239195
|
+
pkg.optionalDependencies
|
|
239196
|
+
];
|
|
239197
|
+
for (const deps of depTypes) {
|
|
239198
|
+
if (deps && packageName in deps) {
|
|
239199
|
+
return {
|
|
239200
|
+
found: true,
|
|
239201
|
+
version: deps[packageName],
|
|
239202
|
+
source: "package.json"
|
|
239203
|
+
};
|
|
239204
|
+
}
|
|
239205
|
+
}
|
|
239206
|
+
return null;
|
|
239207
|
+
}
|
|
239208
|
+
__name(checkPackageJsonDirect, "checkPackageJsonDirect");
|
|
239209
|
+
function execCommand(cmd, cwd) {
|
|
239210
|
+
return new Promise((resolve4, reject) => {
|
|
239211
|
+
const [command, ...args] = cmd;
|
|
239212
|
+
const proc = (0, import_node_child_process.spawn)(command, args, {
|
|
239213
|
+
cwd,
|
|
239214
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
239215
|
+
});
|
|
239216
|
+
let stdout = "";
|
|
239217
|
+
let stderr = "";
|
|
239218
|
+
proc.stdout.on("data", (data) => {
|
|
239219
|
+
stdout += data.toString();
|
|
239220
|
+
});
|
|
239221
|
+
proc.stderr.on("data", (data) => {
|
|
239222
|
+
stderr += data.toString();
|
|
239223
|
+
});
|
|
239224
|
+
proc.on("error", (err) => {
|
|
239225
|
+
reject(err);
|
|
239226
|
+
});
|
|
239227
|
+
proc.on("close", (code) => {
|
|
239228
|
+
if (code === 0) {
|
|
239229
|
+
resolve4({ stdout, stderr });
|
|
239230
|
+
} else {
|
|
239231
|
+
reject(new Error(`Command failed with exit code ${code}: ${stderr}`));
|
|
239232
|
+
}
|
|
239233
|
+
});
|
|
239234
|
+
});
|
|
239235
|
+
}
|
|
239236
|
+
__name(execCommand, "execCommand");
|
|
239237
|
+
function parsePnpmWhyOutput(stdout, packageName) {
|
|
239238
|
+
try {
|
|
239239
|
+
const result = JSON.parse(stdout);
|
|
239240
|
+
if (result && typeof result === "object" && packageName in result) {
|
|
239241
|
+
const info = result[packageName];
|
|
239242
|
+
return {
|
|
239243
|
+
found: true,
|
|
239244
|
+
version: info?.version,
|
|
239245
|
+
source: "workspace"
|
|
239246
|
+
};
|
|
239247
|
+
}
|
|
239248
|
+
return null;
|
|
239249
|
+
} catch {
|
|
239250
|
+
return null;
|
|
239251
|
+
}
|
|
239252
|
+
}
|
|
239253
|
+
__name(parsePnpmWhyOutput, "parsePnpmWhyOutput");
|
|
239254
|
+
function parseNpmWhyOutput(stdout, _packageName) {
|
|
239255
|
+
try {
|
|
239256
|
+
const result = JSON.parse(stdout);
|
|
239257
|
+
if (Array.isArray(result) && result.length > 0) {
|
|
239258
|
+
const first = result[0];
|
|
239259
|
+
return {
|
|
239260
|
+
found: true,
|
|
239261
|
+
version: first?.version,
|
|
239262
|
+
source: "workspace"
|
|
239263
|
+
};
|
|
239264
|
+
}
|
|
239265
|
+
return null;
|
|
239266
|
+
} catch {
|
|
239267
|
+
return null;
|
|
239268
|
+
}
|
|
239269
|
+
}
|
|
239270
|
+
__name(parseNpmWhyOutput, "parseNpmWhyOutput");
|
|
239271
|
+
function parseYarnWhyOutput(stdout, _packageName) {
|
|
239272
|
+
if (stdout.trim().length > 0) {
|
|
239273
|
+
let version;
|
|
239274
|
+
try {
|
|
239275
|
+
const lines = stdout.trim().split("\n");
|
|
239276
|
+
for (const line of lines) {
|
|
239277
|
+
const obj = JSON.parse(line);
|
|
239278
|
+
if (obj.type === "info" && obj.data) {
|
|
239279
|
+
const match = obj.data.match(/"[^@]+@([^"]+)"/);
|
|
239280
|
+
if (match) {
|
|
239281
|
+
version = match[1];
|
|
239282
|
+
break;
|
|
239283
|
+
}
|
|
239284
|
+
}
|
|
239285
|
+
}
|
|
239286
|
+
} catch {
|
|
239287
|
+
}
|
|
239288
|
+
return {
|
|
239289
|
+
found: true,
|
|
239290
|
+
version,
|
|
239291
|
+
source: "workspace"
|
|
239292
|
+
};
|
|
239293
|
+
}
|
|
239294
|
+
return null;
|
|
239295
|
+
}
|
|
239296
|
+
__name(parseYarnWhyOutput, "parseYarnWhyOutput");
|
|
239297
|
+
async function checkViaPackageManager(pm, packageName, cwd) {
|
|
239298
|
+
const cmd = pm.whyCommand(packageName);
|
|
239299
|
+
try {
|
|
239300
|
+
const { stdout } = await execCommand(cmd, cwd);
|
|
239301
|
+
switch (pm.name) {
|
|
239302
|
+
case "pnpm":
|
|
239303
|
+
return parsePnpmWhyOutput(stdout, packageName);
|
|
239304
|
+
case "npm":
|
|
239305
|
+
return parseNpmWhyOutput(stdout, packageName);
|
|
239306
|
+
case "yarn":
|
|
239307
|
+
return parseYarnWhyOutput(stdout, packageName);
|
|
239308
|
+
}
|
|
239309
|
+
} catch {
|
|
239310
|
+
return null;
|
|
239311
|
+
}
|
|
239312
|
+
}
|
|
239313
|
+
__name(checkViaPackageManager, "checkViaPackageManager");
|
|
239314
|
+
async function checkDependencies(projectDir) {
|
|
239315
|
+
const pm = detectPackageManager(projectDir);
|
|
239316
|
+
const pkg = readPackageJson(projectDir);
|
|
239317
|
+
let thinkwellStatus = { found: false };
|
|
239318
|
+
let typescriptStatus = { found: false };
|
|
239319
|
+
if (pkg) {
|
|
239320
|
+
const thinkwellDirect = checkPackageJsonDirect(pkg, "thinkwell");
|
|
239321
|
+
if (thinkwellDirect) {
|
|
239322
|
+
thinkwellStatus = thinkwellDirect;
|
|
239323
|
+
}
|
|
239324
|
+
const typescriptDirect = checkPackageJsonDirect(pkg, "typescript");
|
|
239325
|
+
if (typescriptDirect) {
|
|
239326
|
+
typescriptStatus = typescriptDirect;
|
|
239327
|
+
}
|
|
239328
|
+
}
|
|
239329
|
+
if (!thinkwellStatus.found) {
|
|
239330
|
+
const result = await checkViaPackageManager(pm, "thinkwell", projectDir);
|
|
239331
|
+
if (result) {
|
|
239332
|
+
thinkwellStatus = result;
|
|
239333
|
+
}
|
|
239334
|
+
}
|
|
239335
|
+
if (!typescriptStatus.found) {
|
|
239336
|
+
const result = await checkViaPackageManager(pm, "typescript", projectDir);
|
|
239337
|
+
if (result) {
|
|
239338
|
+
typescriptStatus = result;
|
|
239339
|
+
}
|
|
239340
|
+
}
|
|
239341
|
+
return {
|
|
239342
|
+
thinkwell: thinkwellStatus,
|
|
239343
|
+
typescript: typescriptStatus,
|
|
239344
|
+
packageManager: pm
|
|
239345
|
+
};
|
|
239346
|
+
}
|
|
239347
|
+
__name(checkDependencies, "checkDependencies");
|
|
239348
|
+
function hasPackageJson(projectDir) {
|
|
239349
|
+
return (0, import_node_fs5.existsSync)((0, import_node_path5.join)(projectDir, "package.json"));
|
|
239350
|
+
}
|
|
239351
|
+
__name(hasPackageJson, "hasPackageJson");
|
|
239352
|
+
|
|
239353
|
+
// dist/cli/dependency-errors.js
|
|
239354
|
+
function formatMissingDependencyError(result) {
|
|
239355
|
+
const { thinkwell, typescript, packageManager } = result;
|
|
239356
|
+
const pm = packageManager;
|
|
239357
|
+
const missing = [];
|
|
239358
|
+
if (!thinkwell.found)
|
|
239359
|
+
missing.push("thinkwell");
|
|
239360
|
+
if (!typescript.found)
|
|
239361
|
+
missing.push("typescript");
|
|
239362
|
+
if (missing.length === 0) {
|
|
239363
|
+
return "";
|
|
239364
|
+
}
|
|
239365
|
+
const lines = [];
|
|
239366
|
+
if (missing.length === 1) {
|
|
239367
|
+
lines.push(`Error: This project has a package.json but no dependency on '${missing[0]}'.`);
|
|
239368
|
+
} else {
|
|
239369
|
+
lines.push(`Error: This project has a package.json but is missing required dependencies.`);
|
|
239370
|
+
}
|
|
239371
|
+
lines.push("");
|
|
239372
|
+
lines.push("When a project has explicit configuration, thinkwell expects explicit dependencies.");
|
|
239373
|
+
lines.push("This ensures you get the versions you expect, not versions bundled with the CLI.");
|
|
239374
|
+
lines.push("");
|
|
239375
|
+
lines.push("Run 'thinkwell init' to add the required dependencies, or add them manually:");
|
|
239376
|
+
if (!thinkwell.found) {
|
|
239377
|
+
lines.push(` ${pm.addCommand("thinkwell")}`);
|
|
239378
|
+
}
|
|
239379
|
+
if (!typescript.found) {
|
|
239380
|
+
lines.push(` ${pm.addCommand("typescript", true)}`);
|
|
239381
|
+
}
|
|
239382
|
+
return lines.join("\n");
|
|
239383
|
+
}
|
|
239384
|
+
__name(formatMissingDependencyError, "formatMissingDependencyError");
|
|
239385
|
+
function hasMissingDependencies(result) {
|
|
239386
|
+
return !result.thinkwell.found || !result.typescript.found;
|
|
239387
|
+
}
|
|
239388
|
+
__name(hasMissingDependencies, "hasMissingDependencies");
|
|
239389
|
+
|
|
239087
239390
|
// dist/cli/check.js
|
|
239088
239391
|
function createDiagnosticsHost(pretty) {
|
|
239089
239392
|
return {
|
|
@@ -239101,7 +239404,7 @@ function formatDiagnostics(diagnostics, pretty) {
|
|
|
239101
239404
|
}
|
|
239102
239405
|
__name(formatDiagnostics, "formatDiagnostics");
|
|
239103
239406
|
function checkPackage(dir, pretty) {
|
|
239104
|
-
const configPath = (0,
|
|
239407
|
+
const configPath = (0, import_node_path6.resolve)(dir, "tsconfig.json");
|
|
239105
239408
|
const { program, configErrors } = createThinkwellProgram(configPath);
|
|
239106
239409
|
if (configErrors.length > 0) {
|
|
239107
239410
|
process.stderr.write(formatDiagnostics(configErrors, pretty));
|
|
@@ -239128,8 +239431,15 @@ async function runCheck(options) {
|
|
|
239128
239431
|
process.exit(2);
|
|
239129
239432
|
}
|
|
239130
239433
|
if (!workspace) {
|
|
239131
|
-
|
|
239132
|
-
|
|
239434
|
+
if (hasPackageJson(cwd)) {
|
|
239435
|
+
const depCheck = await checkDependencies(cwd);
|
|
239436
|
+
if (hasMissingDependencies(depCheck)) {
|
|
239437
|
+
process.stderr.write(formatMissingDependencyError(depCheck) + "\n");
|
|
239438
|
+
process.exit(2);
|
|
239439
|
+
}
|
|
239440
|
+
}
|
|
239441
|
+
const configPath = (0, import_node_path6.resolve)(cwd, "tsconfig.json");
|
|
239442
|
+
if (!(0, import_node_fs6.existsSync)(configPath)) {
|
|
239133
239443
|
process.stderr.write("Error: Cannot find tsconfig.json\n");
|
|
239134
239444
|
process.stderr.write("\n");
|
|
239135
239445
|
process.stderr.write(" Run this command from a directory with a tsconfig.json.\n");
|
|
@@ -239137,8 +239447,8 @@ async function runCheck(options) {
|
|
|
239137
239447
|
}
|
|
239138
239448
|
let pkgName = cwd.split("/").pop() ?? "project";
|
|
239139
239449
|
try {
|
|
239140
|
-
const pkgPath = (0,
|
|
239141
|
-
if ((0,
|
|
239450
|
+
const pkgPath = (0, import_node_path6.join)(cwd, "package.json");
|
|
239451
|
+
if ((0, import_node_fs6.existsSync)(pkgPath)) {
|
|
239142
239452
|
const pkg = JSON.parse((await import("node:fs")).readFileSync(pkgPath, "utf-8"));
|
|
239143
239453
|
if (pkg.name)
|
|
239144
239454
|
pkgName = pkg.name;
|
|
@@ -239154,6 +239464,13 @@ async function runCheck(options) {
|
|
|
239154
239464
|
process.stderr.write(" No type errors found.\n");
|
|
239155
239465
|
return;
|
|
239156
239466
|
}
|
|
239467
|
+
if (hasPackageJson(workspace.rootDir)) {
|
|
239468
|
+
const depCheck = await checkDependencies(workspace.rootDir);
|
|
239469
|
+
if (hasMissingDependencies(depCheck)) {
|
|
239470
|
+
process.stderr.write(formatMissingDependencyError(depCheck) + "\n");
|
|
239471
|
+
process.exit(2);
|
|
239472
|
+
}
|
|
239473
|
+
}
|
|
239157
239474
|
let packagesToCheck;
|
|
239158
239475
|
if (options.packages && options.packages.length > 0) {
|
|
239159
239476
|
packagesToCheck = [];
|
package/dist-pkg/thinkwell.cjs
CHANGED
|
@@ -20368,7 +20368,7 @@ ${content}
|
|
|
20368
20368
|
this._conn.sessionHandlers.set(sessionId, session);
|
|
20369
20369
|
await this._conn.mcpHandler.waitForToolsDiscovery(sessionId, 2e3);
|
|
20370
20370
|
try {
|
|
20371
|
-
|
|
20371
|
+
const promptPromise = session.sendPrompt(prompt);
|
|
20372
20372
|
while (!resultReceived) {
|
|
20373
20373
|
const update = await session.readUpdate();
|
|
20374
20374
|
if (update.type === "stop") {
|
|
@@ -20379,6 +20379,7 @@ ${content}
|
|
|
20379
20379
|
}
|
|
20380
20380
|
stream.pushEvent(update);
|
|
20381
20381
|
}
|
|
20382
|
+
await promptPromise;
|
|
20382
20383
|
if (resultReceived && result !== void 0) {
|
|
20383
20384
|
stream.resolveResult(result);
|
|
20384
20385
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thinkwell",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "TypeScript library for blending deterministic code with LLM-powered reasoning",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"@agentclientprotocol/sdk": "^0.12.0",
|
|
36
36
|
"ts-json-schema-generator": "^2.4.0",
|
|
37
37
|
"typescript": "^5.7.2",
|
|
38
|
-
"@thinkwell/acp": "0.5.
|
|
39
|
-
"@thinkwell/conductor": "0.5.
|
|
40
|
-
"@thinkwell/protocol": "0.5.
|
|
38
|
+
"@thinkwell/acp": "0.5.1",
|
|
39
|
+
"@thinkwell/conductor": "0.5.1",
|
|
40
|
+
"@thinkwell/protocol": "0.5.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^24.10.4",
|