@nathapp/nax 0.69.9 → 0.69.10

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/dist/nax.js +30 -7
  2. package/package.json +1 -1
package/dist/nax.js CHANGED
@@ -22826,8 +22826,12 @@ async function _detectLanguageImpl(workdir, pkg) {
22826
22826
  };
22827
22827
  if ("typescript" in allDeps)
22828
22828
  return "typescript";
22829
+ if (await deps.fileExists(join5(workdir, "tsconfig.json")))
22830
+ return "typescript";
22829
22831
  return "javascript";
22830
22832
  }
22833
+ if (await deps.fileExists(join5(workdir, "tsconfig.json")))
22834
+ return "typescript";
22831
22835
  return;
22832
22836
  }
22833
22837
  function detectType(pkg) {
@@ -35568,6 +35572,22 @@ ${BATCH_ROUTING_SCHEMA_INLINE}`;
35568
35572
 
35569
35573
  // src/acceptance/test-path.ts
35570
35574
  import path3 from "path";
35575
+ async function _readPackageTestPath(workdir, relativeDir) {
35576
+ if (!relativeDir)
35577
+ return;
35578
+ if (path3.isAbsolute(relativeDir) || relativeDir.split(path3.sep).includes(".."))
35579
+ return;
35580
+ const cfgPath = path3.join(workdir, ".nax", "mono", relativeDir, "config.json");
35581
+ const file3 = Bun.file(cfgPath);
35582
+ if (!await file3.exists())
35583
+ return;
35584
+ try {
35585
+ const cfg = JSON.parse(await file3.text());
35586
+ return cfg?.acceptance?.testPath;
35587
+ } catch {
35588
+ return;
35589
+ }
35590
+ }
35571
35591
  function acceptanceTestFilename(language) {
35572
35592
  switch (language?.toLowerCase()) {
35573
35593
  case "go":
@@ -35617,10 +35637,12 @@ async function groupStoriesByPackage(prd, workdir, featureName, testPathConfig,
35617
35637
  }
35618
35638
  return Promise.all(Array.from(groupMap.entries()).map(async ([wd, { stories, criteria }]) => {
35619
35639
  const packageDir = wd ? path3.join(workdir, wd) : workdir;
35640
+ const pkgTestPath = await _groupDeps.readPackageTestPath(workdir, wd);
35620
35641
  const detectedLang = await _groupDeps.detectLanguage(packageDir);
35621
35642
  const resolvedLang = detectedLang ?? language;
35622
- const testPath = resolveAcceptancePackageFeatureTestPath(packageDir, featureName, testPathConfig, resolvedLang);
35623
- return { testPath, packageDir, stories, criteria };
35643
+ const resolvedTestPathConfig = pkgTestPath ?? testPathConfig;
35644
+ const testPath = resolveAcceptancePackageFeatureTestPath(packageDir, featureName, resolvedTestPathConfig, resolvedLang);
35645
+ return { testPath, packageDir, stories, criteria, language: resolvedLang };
35624
35646
  }));
35625
35647
  }
35626
35648
  function suggestedTestFilename(language) {
@@ -35668,7 +35690,8 @@ var _groupDeps;
35668
35690
  var init_test_path = __esm(() => {
35669
35691
  init_detector();
35670
35692
  _groupDeps = {
35671
- detectLanguage
35693
+ detectLanguage,
35694
+ readPackageTestPath: _readPackageTestPath
35672
35695
  };
35673
35696
  });
35674
35697
 
@@ -53272,7 +53295,7 @@ ${stderr}` };
53272
53295
  text: c.refined,
53273
53296
  lineNumber: i + 1
53274
53297
  }));
53275
- const skeletonCode = generateSkeletonTests(featureName, skeletonCriteria, ctx.config.acceptance.testFramework, language);
53298
+ const skeletonCode = generateSkeletonTests(featureName, skeletonCriteria, ctx.config.acceptance.testFramework, group.language);
53276
53299
  await _acceptanceSetupDeps.writeFile(testPath, skeletonCode);
53277
53300
  getSafeLogger()?.warn("acceptance-setup", "agent did not produce test content; using skeleton", {
53278
53301
  storyId: groupStoryId,
@@ -59811,7 +59834,7 @@ var package_default;
59811
59834
  var init_package = __esm(() => {
59812
59835
  package_default = {
59813
59836
  name: "@nathapp/nax",
59814
- version: "0.69.9",
59837
+ version: "0.69.10",
59815
59838
  description: "AI Coding Agent Orchestrator \u2014 loops until done",
59816
59839
  type: "module",
59817
59840
  bin: {
@@ -59906,8 +59929,8 @@ var init_version = __esm(() => {
59906
59929
  NAX_VERSION = package_default.version;
59907
59930
  NAX_COMMIT = (() => {
59908
59931
  try {
59909
- if (/^[0-9a-f]{6,10}$/.test("03eecdb1"))
59910
- return "03eecdb1";
59932
+ if (/^[0-9a-f]{6,10}$/.test("5b5bf412"))
59933
+ return "5b5bf412";
59911
59934
  } catch {}
59912
59935
  try {
59913
59936
  const result = Bun.spawnSync(["git", "rev-parse", "--short", "HEAD"], {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nathapp/nax",
3
- "version": "0.69.9",
3
+ "version": "0.69.10",
4
4
  "description": "AI Coding Agent Orchestrator — loops until done",
5
5
  "type": "module",
6
6
  "bin": {