@nathapp/nax 0.72.0 → 0.72.2
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/nax.js +351 -342
- package/package.json +1 -1
package/dist/nax.js
CHANGED
|
@@ -60813,6 +60813,7 @@ var init_template = __esm(() => {
|
|
|
60813
60813
|
});
|
|
60814
60814
|
|
|
60815
60815
|
// src/plugins/builtin/auto-pr/index.ts
|
|
60816
|
+
import * as path16 from "path";
|
|
60816
60817
|
async function defaultRun(cmd, opts) {
|
|
60817
60818
|
const proc = Bun.spawn(cmd, { cwd: opts.cwd, stdout: "pipe", stderr: "pipe" });
|
|
60818
60819
|
const [exitCode, stdout, stderr] = await Promise.all([
|
|
@@ -60822,8 +60823,8 @@ async function defaultRun(cmd, opts) {
|
|
|
60822
60823
|
]);
|
|
60823
60824
|
return { exitCode, stdout, stderr };
|
|
60824
60825
|
}
|
|
60825
|
-
async function defaultReadText(
|
|
60826
|
-
const file3 = Bun.file(
|
|
60826
|
+
async function defaultReadText(path17) {
|
|
60827
|
+
const file3 = Bun.file(path17);
|
|
60827
60828
|
if (!await file3.exists())
|
|
60828
60829
|
return null;
|
|
60829
60830
|
return file3.text();
|
|
@@ -60850,13 +60851,19 @@ function getAutoPrConfig(context) {
|
|
|
60850
60851
|
function getStorySummary(context) {
|
|
60851
60852
|
return context.storySummary;
|
|
60852
60853
|
}
|
|
60854
|
+
function relativePrdPath(workdir, prdPath) {
|
|
60855
|
+
if (!prdPath)
|
|
60856
|
+
return prdPath;
|
|
60857
|
+
const rel = path16.relative(workdir, prdPath);
|
|
60858
|
+
return rel && !rel.startsWith("..") && !path16.isAbsolute(rel) ? rel : prdPath;
|
|
60859
|
+
}
|
|
60853
60860
|
function toPrBodyContext(context) {
|
|
60854
60861
|
const summary = getStorySummary(context);
|
|
60855
60862
|
return {
|
|
60856
60863
|
feature: context.feature,
|
|
60857
60864
|
totalCost: context.totalCost,
|
|
60858
60865
|
totalDurationMs: context.totalDurationMs,
|
|
60859
|
-
prdPath: context.prdPath,
|
|
60866
|
+
prdPath: relativePrdPath(context.workdir, context.prdPath),
|
|
60860
60867
|
storySummary: {
|
|
60861
60868
|
completed: summary.completed,
|
|
60862
60869
|
failed: summary.failed,
|
|
@@ -60923,6 +60930,13 @@ var init_auto_pr = __esm(() => {
|
|
|
60923
60930
|
if (!forge) {
|
|
60924
60931
|
return { success: false, message: "Remote host is not GitHub or GitLab" };
|
|
60925
60932
|
}
|
|
60933
|
+
const pushResult = await _autoPrDeps.run(["git", "push", "-u", "origin", context.branch], {
|
|
60934
|
+
cwd: context.workdir
|
|
60935
|
+
});
|
|
60936
|
+
if (pushResult.exitCode !== 0) {
|
|
60937
|
+
const message = pushResult.stderr.trim() || `git push exited with code ${pushResult.exitCode}`;
|
|
60938
|
+
return { success: false, message: `Failed to push branch "${context.branch}" to origin: ${message}` };
|
|
60939
|
+
}
|
|
60926
60940
|
const template = await _autoPrDeps.findPrTemplate(context.workdir, forge, {
|
|
60927
60941
|
run: _autoPrDeps.run,
|
|
60928
60942
|
readText: _autoPrDeps.readText
|
|
@@ -61072,7 +61086,7 @@ var init_auto_route = __esm(() => {
|
|
|
61072
61086
|
});
|
|
61073
61087
|
|
|
61074
61088
|
// src/plugins/builtin/curator/collect.ts
|
|
61075
|
-
import * as
|
|
61089
|
+
import * as path17 from "path";
|
|
61076
61090
|
function now() {
|
|
61077
61091
|
return new Date().toISOString();
|
|
61078
61092
|
}
|
|
@@ -61122,7 +61136,7 @@ function tokenCount(story) {
|
|
|
61122
61136
|
}
|
|
61123
61137
|
async function collectFromMetrics(context) {
|
|
61124
61138
|
const observations = [];
|
|
61125
|
-
const metricsPath =
|
|
61139
|
+
const metricsPath = path17.join(context.outputDir, "metrics.json");
|
|
61126
61140
|
try {
|
|
61127
61141
|
const data = await readJsonFile(metricsPath);
|
|
61128
61142
|
const runs = Array.isArray(data) ? data : [data];
|
|
@@ -61172,11 +61186,11 @@ function findingMessage(finding) {
|
|
|
61172
61186
|
}
|
|
61173
61187
|
async function collectFromReviewAudit(context) {
|
|
61174
61188
|
const observations = [];
|
|
61175
|
-
const auditDir =
|
|
61189
|
+
const auditDir = path17.join(context.outputDir, "review-audit");
|
|
61176
61190
|
try {
|
|
61177
61191
|
const glob = new Bun.Glob("**/*.json");
|
|
61178
61192
|
for await (const file3 of glob.scan({ cwd: auditDir, absolute: false })) {
|
|
61179
|
-
const fullPath =
|
|
61193
|
+
const fullPath = path17.join(auditDir, file3);
|
|
61180
61194
|
try {
|
|
61181
61195
|
const audit = asRecord3(await readJsonFile(fullPath));
|
|
61182
61196
|
if (!audit)
|
|
@@ -61216,11 +61230,11 @@ async function collectFromReviewAudit(context) {
|
|
|
61216
61230
|
}
|
|
61217
61231
|
async function collectFromContextManifests(context) {
|
|
61218
61232
|
const observations = [];
|
|
61219
|
-
const featuresDir =
|
|
61233
|
+
const featuresDir = path17.join(context.workdir, ".nax", "features");
|
|
61220
61234
|
try {
|
|
61221
61235
|
const glob = new Bun.Glob("*/stories/*/context-manifest-*.json");
|
|
61222
61236
|
for await (const file3 of glob.scan({ cwd: featuresDir, absolute: false })) {
|
|
61223
|
-
const fullPath =
|
|
61237
|
+
const fullPath = path17.join(featuresDir, file3);
|
|
61224
61238
|
try {
|
|
61225
61239
|
const parts = file3.split("/");
|
|
61226
61240
|
const featureId = parts[0] ?? context.feature;
|
|
@@ -61773,10 +61787,10 @@ function renderProposals(proposals, runId, observationCount) {
|
|
|
61773
61787
|
|
|
61774
61788
|
// src/plugins/builtin/curator/rollup.ts
|
|
61775
61789
|
import { appendFile as appendFile3, mkdir as mkdir9, writeFile } from "fs/promises";
|
|
61776
|
-
import * as
|
|
61790
|
+
import * as path18 from "path";
|
|
61777
61791
|
async function appendToRollup(observations, rollupPath) {
|
|
61778
61792
|
try {
|
|
61779
|
-
const dir =
|
|
61793
|
+
const dir = path18.dirname(rollupPath);
|
|
61780
61794
|
await mkdir9(dir, { recursive: true });
|
|
61781
61795
|
if (observations.length === 0) {
|
|
61782
61796
|
const f = Bun.file(rollupPath);
|
|
@@ -61795,7 +61809,7 @@ var init_rollup = () => {};
|
|
|
61795
61809
|
|
|
61796
61810
|
// src/plugins/builtin/curator/index.ts
|
|
61797
61811
|
import { mkdir as mkdir10 } from "fs/promises";
|
|
61798
|
-
import * as
|
|
61812
|
+
import * as path19 from "path";
|
|
61799
61813
|
function getCuratorEnabled(context) {
|
|
61800
61814
|
const cfg = context.config;
|
|
61801
61815
|
if (!cfg)
|
|
@@ -61868,7 +61882,7 @@ var init_curator = __esm(() => {
|
|
|
61868
61882
|
const observations = await collectObservations(curatorContext);
|
|
61869
61883
|
if (context.outputDir) {
|
|
61870
61884
|
const { observationsPath, rollupPath } = resolveCuratorOutputs(curatorContext);
|
|
61871
|
-
const runDir =
|
|
61885
|
+
const runDir = path19.dirname(observationsPath);
|
|
61872
61886
|
await mkdir10(runDir, { recursive: true });
|
|
61873
61887
|
await Bun.write(observationsPath, observations.map((o) => JSON.stringify(o)).join(`
|
|
61874
61888
|
`) + (observations.length > 0 ? `
|
|
@@ -61876,7 +61890,7 @@ var init_curator = __esm(() => {
|
|
|
61876
61890
|
const thresholds = getCuratorThresholds(context);
|
|
61877
61891
|
const proposals = runHeuristics(observations, thresholds);
|
|
61878
61892
|
const markdown = renderProposals(proposals, context.runId, observations.length);
|
|
61879
|
-
const proposalsMdPath =
|
|
61893
|
+
const proposalsMdPath = path19.join(runDir, "curator-proposals.md");
|
|
61880
61894
|
await Bun.write(proposalsMdPath, markdown);
|
|
61881
61895
|
await appendToRollup(observations, rollupPath);
|
|
61882
61896
|
}
|
|
@@ -62249,14 +62263,14 @@ var init_validator = __esm(() => {
|
|
|
62249
62263
|
|
|
62250
62264
|
// src/plugins/loader.ts
|
|
62251
62265
|
import * as fs from "fs/promises";
|
|
62252
|
-
import * as
|
|
62266
|
+
import * as path20 from "path";
|
|
62253
62267
|
function getSafeLogger6() {
|
|
62254
62268
|
return getSafeLogger();
|
|
62255
62269
|
}
|
|
62256
62270
|
function extractPluginName(pluginPath) {
|
|
62257
|
-
const basename12 =
|
|
62271
|
+
const basename12 = path20.basename(pluginPath);
|
|
62258
62272
|
if (basename12 === "index.ts" || basename12 === "index.js" || basename12 === "index.mjs") {
|
|
62259
|
-
return
|
|
62273
|
+
return path20.basename(path20.dirname(pluginPath));
|
|
62260
62274
|
}
|
|
62261
62275
|
return basename12.replace(/\.(ts|js|mjs)$/, "");
|
|
62262
62276
|
}
|
|
@@ -62285,11 +62299,6 @@ async function loadPlugins(globalDir, projectDir, configPlugins, projectRoot, di
|
|
|
62285
62299
|
const pluginLogger = createPluginLogger(autoPrPlugin.name);
|
|
62286
62300
|
await autoPrPlugin.setup({}, pluginLogger);
|
|
62287
62301
|
}
|
|
62288
|
-
loadedPlugins.push({
|
|
62289
|
-
plugin: autoPrPlugin,
|
|
62290
|
-
source: { type: "builtin", path: autoPrPlugin.name }
|
|
62291
|
-
});
|
|
62292
|
-
pluginNames.add(autoPrPlugin.name);
|
|
62293
62302
|
const autoPrAction2 = autoPrPlugin.extensions.postRunAction;
|
|
62294
62303
|
if (autoPrAction2) {
|
|
62295
62304
|
builtinPostRunActions.push(autoPrAction2);
|
|
@@ -62372,7 +62381,7 @@ async function discoverPlugins(dir, isTestFileFn) {
|
|
|
62372
62381
|
try {
|
|
62373
62382
|
const entries = await fs.readdir(dir, { withFileTypes: true });
|
|
62374
62383
|
for (const entry of entries) {
|
|
62375
|
-
const fullPath =
|
|
62384
|
+
const fullPath = path20.join(dir, entry.name);
|
|
62376
62385
|
if (entry.isFile()) {
|
|
62377
62386
|
if (isPluginFile(entry.name, isTestFileFn)) {
|
|
62378
62387
|
discovered.push({ path: fullPath });
|
|
@@ -62380,7 +62389,7 @@ async function discoverPlugins(dir, isTestFileFn) {
|
|
|
62380
62389
|
} else if (entry.isDirectory()) {
|
|
62381
62390
|
const indexPaths = ["index.ts", "index.js", "index.mjs"];
|
|
62382
62391
|
for (const indexFile of indexPaths) {
|
|
62383
|
-
const indexPath =
|
|
62392
|
+
const indexPath = path20.join(fullPath, indexFile);
|
|
62384
62393
|
try {
|
|
62385
62394
|
await fs.access(indexPath);
|
|
62386
62395
|
discovered.push({ path: indexPath });
|
|
@@ -62405,13 +62414,13 @@ function isPluginFile(filename, isTestFileFn) {
|
|
|
62405
62414
|
return !FALLBACK_TEST_FILE_RE.test(filename);
|
|
62406
62415
|
}
|
|
62407
62416
|
function resolveModulePath(modulePath, projectRoot) {
|
|
62408
|
-
if (
|
|
62417
|
+
if (path20.isAbsolute(modulePath) || !modulePath.startsWith("./") && !modulePath.startsWith("../")) {
|
|
62409
62418
|
return modulePath;
|
|
62410
62419
|
}
|
|
62411
62420
|
if (projectRoot) {
|
|
62412
|
-
return
|
|
62421
|
+
return path20.resolve(projectRoot, modulePath);
|
|
62413
62422
|
}
|
|
62414
|
-
return
|
|
62423
|
+
return path20.resolve(modulePath);
|
|
62415
62424
|
}
|
|
62416
62425
|
async function loadAndValidatePlugin(initialModulePath, config2, allowedRoots = [], originalPath) {
|
|
62417
62426
|
let attemptedPath = initialModulePath;
|
|
@@ -62676,7 +62685,7 @@ var package_default;
|
|
|
62676
62685
|
var init_package = __esm(() => {
|
|
62677
62686
|
package_default = {
|
|
62678
62687
|
name: "@nathapp/nax",
|
|
62679
|
-
version: "0.72.
|
|
62688
|
+
version: "0.72.2",
|
|
62680
62689
|
description: "AI Coding Agent Orchestrator \u2014 loops until done",
|
|
62681
62690
|
type: "module",
|
|
62682
62691
|
bin: {
|
|
@@ -62777,8 +62786,8 @@ var init_version = __esm(() => {
|
|
|
62777
62786
|
NAX_VERSION = package_default.version;
|
|
62778
62787
|
NAX_COMMIT = (() => {
|
|
62779
62788
|
try {
|
|
62780
|
-
if (/^[0-9a-f]{6,10}$/.test("
|
|
62781
|
-
return "
|
|
62789
|
+
if (/^[0-9a-f]{6,10}$/.test("8e33dec3"))
|
|
62790
|
+
return "8e33dec3";
|
|
62782
62791
|
} catch {}
|
|
62783
62792
|
try {
|
|
62784
62793
|
const result = Bun.spawnSync(["git", "rev-parse", "--short", "HEAD"], {
|
|
@@ -63165,7 +63174,7 @@ async function readSourceFileContent(filePath, workdir) {
|
|
|
63165
63174
|
var MAX_SOURCE_FILES = 5, MAX_FILE_LINES2 = 500;
|
|
63166
63175
|
|
|
63167
63176
|
// src/execution/lifecycle/acceptance-helpers.ts
|
|
63168
|
-
import
|
|
63177
|
+
import path22 from "path";
|
|
63169
63178
|
function isStubTestFile(content) {
|
|
63170
63179
|
return isStubTestContent(content);
|
|
63171
63180
|
}
|
|
@@ -63184,7 +63193,7 @@ function isTestLevelFailure(failedACs, totalACs, semanticVerdicts) {
|
|
|
63184
63193
|
async function loadSpecContent(featureDir) {
|
|
63185
63194
|
if (!featureDir)
|
|
63186
63195
|
return "";
|
|
63187
|
-
const specPath =
|
|
63196
|
+
const specPath = path22.join(featureDir, "spec.md");
|
|
63188
63197
|
const specFile = Bun.file(specPath);
|
|
63189
63198
|
return await specFile.exists() ? await specFile.text() : "";
|
|
63190
63199
|
}
|
|
@@ -63204,7 +63213,7 @@ async function loadAcceptanceTestContent2(featureDir, testPaths, configuredTestP
|
|
|
63204
63213
|
}
|
|
63205
63214
|
if (!configuredTestPath)
|
|
63206
63215
|
return [];
|
|
63207
|
-
const resolvedPath =
|
|
63216
|
+
const resolvedPath = path22.join(featureDir, configuredTestPath);
|
|
63208
63217
|
const testFile = Bun.file(resolvedPath);
|
|
63209
63218
|
const content = await testFile.exists() ? await testFile.text() : "";
|
|
63210
63219
|
return [{ content, path: resolvedPath }];
|
|
@@ -63221,7 +63230,7 @@ async function regenerateAcceptanceTest(testPath, acceptanceContext) {
|
|
|
63221
63230
|
const { unlink: unlink3 } = await import("fs/promises");
|
|
63222
63231
|
await unlink3(testPath);
|
|
63223
63232
|
if (acceptanceContext.featureDir) {
|
|
63224
|
-
const metaPath =
|
|
63233
|
+
const metaPath = path22.join(acceptanceContext.featureDir, "acceptance-meta.json");
|
|
63225
63234
|
try {
|
|
63226
63235
|
await unlink3(metaPath);
|
|
63227
63236
|
} catch {}
|
|
@@ -63235,7 +63244,7 @@ async function regenerateAcceptanceTest(testPath, acceptanceContext) {
|
|
|
63235
63244
|
const changedFilesRaw = diffOutput.split(`
|
|
63236
63245
|
`).map((f) => f.trim()).filter((f) => f.length > 0);
|
|
63237
63246
|
const repoRoot = acceptanceContext.projectDir ?? workdir;
|
|
63238
|
-
const packageDir = acceptanceContext.story.workdir && acceptanceContext.projectDir ?
|
|
63247
|
+
const packageDir = acceptanceContext.story.workdir && acceptanceContext.projectDir ? path22.join(acceptanceContext.projectDir, acceptanceContext.story.workdir) : undefined;
|
|
63239
63248
|
const ignoreMatchers = acceptanceContext.naxIgnoreIndex?.getMatchers(packageDir) ?? await resolveNaxIgnorePatterns(repoRoot, packageDir);
|
|
63240
63249
|
const changedFiles = filterNaxInternalPaths(changedFilesRaw, ignoreMatchers);
|
|
63241
63250
|
const MAX_BYTES = 51200;
|
|
@@ -63244,7 +63253,7 @@ async function regenerateAcceptanceTest(testPath, acceptanceContext) {
|
|
|
63244
63253
|
for (const file3 of changedFiles) {
|
|
63245
63254
|
if (totalBytes >= MAX_BYTES)
|
|
63246
63255
|
break;
|
|
63247
|
-
const filePath =
|
|
63256
|
+
const filePath = path22.join(workdir, file3);
|
|
63248
63257
|
try {
|
|
63249
63258
|
const fileContent = await _regenerateDeps.readFile(filePath);
|
|
63250
63259
|
const remaining = MAX_BYTES - totalBytes;
|
|
@@ -63724,9 +63733,9 @@ var init_scratch_purge = __esm(() => {
|
|
|
63724
63733
|
return [];
|
|
63725
63734
|
}
|
|
63726
63735
|
},
|
|
63727
|
-
fileExists: (
|
|
63728
|
-
readFile: (
|
|
63729
|
-
remove: (
|
|
63736
|
+
fileExists: (path23) => Bun.file(path23).exists(),
|
|
63737
|
+
readFile: (path23) => Bun.file(path23).text(),
|
|
63738
|
+
remove: (path23) => rm(path23, { recursive: true, force: true }),
|
|
63730
63739
|
move: async (src, dest) => {
|
|
63731
63740
|
await mkdir12(dirname13(dest), { recursive: true });
|
|
63732
63741
|
await rename(src, dest);
|
|
@@ -65726,9 +65735,9 @@ var _quoteIntegrityDeps, CONTEXT_LINES = 3;
|
|
|
65726
65735
|
var init_quote_integrity = __esm(() => {
|
|
65727
65736
|
init_logger2();
|
|
65728
65737
|
_quoteIntegrityDeps = {
|
|
65729
|
-
readFile: async (
|
|
65738
|
+
readFile: async (path25) => {
|
|
65730
65739
|
try {
|
|
65731
|
-
return await Bun.file(
|
|
65740
|
+
return await Bun.file(path25).text();
|
|
65732
65741
|
} catch {
|
|
65733
65742
|
return null;
|
|
65734
65743
|
}
|
|
@@ -66017,7 +66026,7 @@ var exports_merge_conflict_rectify = {};
|
|
|
66017
66026
|
__export(exports_merge_conflict_rectify, {
|
|
66018
66027
|
rectifyConflictedStory: () => rectifyConflictedStory
|
|
66019
66028
|
});
|
|
66020
|
-
import
|
|
66029
|
+
import path25 from "path";
|
|
66021
66030
|
async function closeStaleAcpSession(worktreePath, sessionName) {
|
|
66022
66031
|
const logger = getSafeLogger();
|
|
66023
66032
|
try {
|
|
@@ -66044,7 +66053,7 @@ async function rectifyConflictedStory(options) {
|
|
|
66044
66053
|
await worktreeManager.remove(workdir, storyId);
|
|
66045
66054
|
} catch {}
|
|
66046
66055
|
await worktreeManager.create(workdir, storyId);
|
|
66047
|
-
const worktreePath =
|
|
66056
|
+
const worktreePath = path25.join(workdir, ".nax-wt", storyId);
|
|
66048
66057
|
const { formatSessionName: formatSessionName2 } = await Promise.resolve().then(() => (init_naming(), exports_naming));
|
|
66049
66058
|
const staleSessionName = formatSessionName2({
|
|
66050
66059
|
workdir: worktreePath,
|
|
@@ -66728,7 +66737,7 @@ __export(exports_parallel_batch, {
|
|
|
66728
66737
|
runParallelBatch: () => runParallelBatch,
|
|
66729
66738
|
_parallelBatchDeps: () => _parallelBatchDeps
|
|
66730
66739
|
});
|
|
66731
|
-
import
|
|
66740
|
+
import path26 from "path";
|
|
66732
66741
|
async function runParallelBatch(options) {
|
|
66733
66742
|
const { stories, ctx, prd } = options;
|
|
66734
66743
|
const { workdir, config: config2, maxConcurrency, pipelineContext, eventEmitter, agentGetFn, hooks, pluginRegistry } = ctx;
|
|
@@ -66747,9 +66756,9 @@ async function runParallelBatch(options) {
|
|
|
66747
66756
|
});
|
|
66748
66757
|
throw error48;
|
|
66749
66758
|
}
|
|
66750
|
-
worktreePaths.set(story.id,
|
|
66759
|
+
worktreePaths.set(story.id, path26.join(workdir, ".nax-wt", story.id));
|
|
66751
66760
|
}
|
|
66752
|
-
const rootConfigPath =
|
|
66761
|
+
const rootConfigPath = path26.join(workdir, ".nax", "config.json");
|
|
66753
66762
|
const profileOverride = profileOverrideFromConfig(config2);
|
|
66754
66763
|
const storyEffectiveConfigs = new Map;
|
|
66755
66764
|
const configResults = await Promise.allSettled(stories.filter((story) => story.workdir).map(async (story) => {
|
|
@@ -67679,7 +67688,7 @@ __export(exports_migrate, {
|
|
|
67679
67688
|
});
|
|
67680
67689
|
import { existsSync as existsSync36 } from "fs";
|
|
67681
67690
|
import { mkdir as mkdir16, readdir as readdir6, rename as rename3 } from "fs/promises";
|
|
67682
|
-
import
|
|
67691
|
+
import path27 from "path";
|
|
67683
67692
|
async function detectGeneratedContent(naxDir) {
|
|
67684
67693
|
if (!existsSync36(naxDir))
|
|
67685
67694
|
return [];
|
|
@@ -67692,17 +67701,17 @@ async function detectGeneratedContent(naxDir) {
|
|
|
67692
67701
|
}
|
|
67693
67702
|
for (const entry of entries) {
|
|
67694
67703
|
if (GENERATED_NAMES.has(entry)) {
|
|
67695
|
-
candidates.push({ name: entry, srcPath:
|
|
67704
|
+
candidates.push({ name: entry, srcPath: path27.join(naxDir, entry) });
|
|
67696
67705
|
}
|
|
67697
67706
|
}
|
|
67698
|
-
const featuresDir =
|
|
67707
|
+
const featuresDir = path27.join(naxDir, "features");
|
|
67699
67708
|
if (existsSync36(featuresDir)) {
|
|
67700
67709
|
let featureDirs = [];
|
|
67701
67710
|
try {
|
|
67702
67711
|
featureDirs = await readdir6(featuresDir);
|
|
67703
67712
|
} catch {}
|
|
67704
67713
|
for (const fid of featureDirs) {
|
|
67705
|
-
const featureDir =
|
|
67714
|
+
const featureDir = path27.join(featuresDir, fid);
|
|
67706
67715
|
let subEntries = [];
|
|
67707
67716
|
try {
|
|
67708
67717
|
subEntries = await readdir6(featureDir);
|
|
@@ -67712,12 +67721,12 @@ async function detectGeneratedContent(naxDir) {
|
|
|
67712
67721
|
for (const sub of subEntries) {
|
|
67713
67722
|
if (GENERATED_FEATURE_SUBNAMES.has(sub)) {
|
|
67714
67723
|
candidates.push({
|
|
67715
|
-
name:
|
|
67716
|
-
srcPath:
|
|
67724
|
+
name: path27.join("features", fid, sub),
|
|
67725
|
+
srcPath: path27.join(featureDir, sub)
|
|
67717
67726
|
});
|
|
67718
67727
|
}
|
|
67719
67728
|
if (sub === "stories") {
|
|
67720
|
-
const storiesDir =
|
|
67729
|
+
const storiesDir = path27.join(featureDir, "stories");
|
|
67721
67730
|
let storyDirs = [];
|
|
67722
67731
|
try {
|
|
67723
67732
|
storyDirs = await readdir6(storiesDir);
|
|
@@ -67725,7 +67734,7 @@ async function detectGeneratedContent(naxDir) {
|
|
|
67725
67734
|
continue;
|
|
67726
67735
|
}
|
|
67727
67736
|
for (const sid of storyDirs) {
|
|
67728
|
-
const storyDir =
|
|
67737
|
+
const storyDir = path27.join(storiesDir, sid);
|
|
67729
67738
|
let storyEntries = [];
|
|
67730
67739
|
try {
|
|
67731
67740
|
storyEntries = await readdir6(storyDir);
|
|
@@ -67735,8 +67744,8 @@ async function detectGeneratedContent(naxDir) {
|
|
|
67735
67744
|
for (const se of storyEntries) {
|
|
67736
67745
|
if (se.startsWith("context-manifest-") && se.endsWith(".json")) {
|
|
67737
67746
|
candidates.push({
|
|
67738
|
-
name:
|
|
67739
|
-
srcPath:
|
|
67747
|
+
name: path27.join("features", fid, "stories", sid, se),
|
|
67748
|
+
srcPath: path27.join(storyDir, se)
|
|
67740
67749
|
});
|
|
67741
67750
|
}
|
|
67742
67751
|
}
|
|
@@ -67757,15 +67766,15 @@ async function migrateCommand(options) {
|
|
|
67757
67766
|
name: options.reclaim
|
|
67758
67767
|
});
|
|
67759
67768
|
}
|
|
67760
|
-
const src =
|
|
67769
|
+
const src = path27.join(globalConfigDir(), options.reclaim);
|
|
67761
67770
|
if (!existsSync36(src)) {
|
|
67762
67771
|
throw new NaxError(`Nothing to reclaim: ~/.nax/${options.reclaim} does not exist`, "MIGRATE_RECLAIM_NOT_FOUND", {
|
|
67763
67772
|
stage: "migrate",
|
|
67764
67773
|
name: options.reclaim
|
|
67765
67774
|
});
|
|
67766
67775
|
}
|
|
67767
|
-
const archiveBase =
|
|
67768
|
-
const archiveDest =
|
|
67776
|
+
const archiveBase = path27.join(globalConfigDir(), "_archive");
|
|
67777
|
+
const archiveDest = path27.join(archiveBase, `${options.reclaim}-${Date.now()}`);
|
|
67769
67778
|
await mkdir16(archiveBase, { recursive: true });
|
|
67770
67779
|
await rename3(src, archiveDest);
|
|
67771
67780
|
logger.info("migrate", `Reclaimed: archived to ${archiveDest}`, { storyId: "_migrate" });
|
|
@@ -67802,8 +67811,8 @@ async function migrateCommand(options) {
|
|
|
67802
67811
|
logger.info("migrate", `Merged: identity for "${options.merge}" updated`, { storyId: "_migrate" });
|
|
67803
67812
|
return;
|
|
67804
67813
|
}
|
|
67805
|
-
const naxDir =
|
|
67806
|
-
const configPath =
|
|
67814
|
+
const naxDir = path27.join(options.workdir, ".nax");
|
|
67815
|
+
const configPath = path27.join(naxDir, "config.json");
|
|
67807
67816
|
if (!existsSync36(configPath)) {
|
|
67808
67817
|
throw new NaxError("No .nax/config.json found \u2014 run nax init first", "MIGRATE_NO_CONFIG", {
|
|
67809
67818
|
stage: "migrate",
|
|
@@ -67819,7 +67828,7 @@ async function migrateCommand(options) {
|
|
|
67819
67828
|
cause: e
|
|
67820
67829
|
});
|
|
67821
67830
|
}
|
|
67822
|
-
const projectKey = config2.name?.trim() ||
|
|
67831
|
+
const projectKey = config2.name?.trim() || path27.basename(options.workdir);
|
|
67823
67832
|
const destBase = projectOutputDir(projectKey, config2.outputDir);
|
|
67824
67833
|
const candidates = await detectGeneratedContent(naxDir);
|
|
67825
67834
|
if (candidates.length === 0) {
|
|
@@ -67828,7 +67837,7 @@ async function migrateCommand(options) {
|
|
|
67828
67837
|
}
|
|
67829
67838
|
if (options.dryRun) {
|
|
67830
67839
|
for (const c of candidates) {
|
|
67831
|
-
logger.info("migrate", `[dry-run] Would move: ${c.srcPath} -> ${
|
|
67840
|
+
logger.info("migrate", `[dry-run] Would move: ${c.srcPath} -> ${path27.join(destBase, c.name)}`, {
|
|
67832
67841
|
storyId: "_migrate"
|
|
67833
67842
|
});
|
|
67834
67843
|
}
|
|
@@ -67837,8 +67846,8 @@ async function migrateCommand(options) {
|
|
|
67837
67846
|
await mkdir16(destBase, { recursive: true });
|
|
67838
67847
|
let moved = 0;
|
|
67839
67848
|
for (const candidate of candidates) {
|
|
67840
|
-
const dest =
|
|
67841
|
-
await mkdir16(
|
|
67849
|
+
const dest = path27.join(destBase, candidate.name);
|
|
67850
|
+
await mkdir16(path27.dirname(dest), { recursive: true });
|
|
67842
67851
|
if (existsSync36(dest)) {
|
|
67843
67852
|
throw new NaxError(`Migration conflict: destination already exists.
|
|
67844
67853
|
Source: ${candidate.srcPath}
|
|
@@ -67868,7 +67877,7 @@ async function migrateCommand(options) {
|
|
|
67868
67877
|
moved++;
|
|
67869
67878
|
logger.info("migrate", `Moved: ${candidate.name}`, { storyId: "_migrate" });
|
|
67870
67879
|
}
|
|
67871
|
-
await Bun.write(
|
|
67880
|
+
await Bun.write(path27.join(destBase, ".migrated-from"), JSON.stringify({ from: options.workdir, migratedAt: new Date().toISOString() }, null, 2));
|
|
67872
67881
|
logger.info("migrate", `Migration complete: ${moved} entries moved`, {
|
|
67873
67882
|
storyId: "_migrate",
|
|
67874
67883
|
destBase
|
|
@@ -67985,7 +67994,7 @@ __export(exports_precheck_runner, {
|
|
|
67985
67994
|
runPrecheckValidation: () => runPrecheckValidation
|
|
67986
67995
|
});
|
|
67987
67996
|
import { mkdirSync as mkdirSync7 } from "fs";
|
|
67988
|
-
import
|
|
67997
|
+
import path28 from "path";
|
|
67989
67998
|
async function runPrecheckValidation(ctx) {
|
|
67990
67999
|
const logger = getSafeLogger();
|
|
67991
68000
|
if (process.env.NAX_PRECHECK !== "1") {
|
|
@@ -68000,7 +68009,7 @@ async function runPrecheckValidation(ctx) {
|
|
|
68000
68009
|
silent: true
|
|
68001
68010
|
});
|
|
68002
68011
|
if (ctx.logFilePath) {
|
|
68003
|
-
mkdirSync7(
|
|
68012
|
+
mkdirSync7(path28.dirname(ctx.logFilePath), { recursive: true });
|
|
68004
68013
|
const precheckLog = {
|
|
68005
68014
|
type: "precheck",
|
|
68006
68015
|
timestamp: new Date().toISOString(),
|
|
@@ -68313,7 +68322,7 @@ __export(exports_run_setup, {
|
|
|
68313
68322
|
setupRun: () => setupRun,
|
|
68314
68323
|
_runSetupDeps: () => _runSetupDeps
|
|
68315
68324
|
});
|
|
68316
|
-
import
|
|
68325
|
+
import path29 from "path";
|
|
68317
68326
|
function warnProfileMismatch(prd, config2, logger) {
|
|
68318
68327
|
const profiles = config2.routing?.agents?.profiles ?? [];
|
|
68319
68328
|
const profileIds = new Set(profiles.map((p) => p.id));
|
|
@@ -68434,7 +68443,7 @@ async function setupRun(options) {
|
|
|
68434
68443
|
statusWriter.setPrd(prd);
|
|
68435
68444
|
{
|
|
68436
68445
|
const { detectGeneratedContent: detectGeneratedContent2, migrateCommand: migrateCommand2 } = await Promise.resolve().then(() => (init_migrate(), exports_migrate));
|
|
68437
|
-
const naxDir =
|
|
68446
|
+
const naxDir = path29.join(workdir, ".nax");
|
|
68438
68447
|
const candidates = await detectGeneratedContent2(naxDir).catch(() => []);
|
|
68439
68448
|
if (candidates.length > 0) {
|
|
68440
68449
|
logger?.info("setup", "Found generated content under .nax/ \u2014 migrating to output dir", {
|
|
@@ -68461,7 +68470,7 @@ async function setupRun(options) {
|
|
|
68461
68470
|
remoteUrl = new TextDecoder().decode(gitResult.stdout).trim() || null;
|
|
68462
68471
|
}
|
|
68463
68472
|
} catch {}
|
|
68464
|
-
const projectKey = config2.name?.trim() ||
|
|
68473
|
+
const projectKey = config2.name?.trim() || path29.basename(workdir);
|
|
68465
68474
|
await claimProjectIdentity2(projectKey, workdir, remoteUrl).catch((err) => {
|
|
68466
68475
|
if (err instanceof NaxError && err.code === "RUN_NAME_COLLISION") {
|
|
68467
68476
|
throw err;
|
|
@@ -68516,8 +68525,8 @@ async function setupRun(options) {
|
|
|
68516
68525
|
explicit: Object.fromEntries(explicitFields.map((f) => [f, existingProjectConfig[f]])),
|
|
68517
68526
|
detected: Object.fromEntries(autodetectedFields.map((f) => [f, detectedProfile[f]]))
|
|
68518
68527
|
});
|
|
68519
|
-
const globalPluginsDir =
|
|
68520
|
-
const projectPluginsDir =
|
|
68528
|
+
const globalPluginsDir = path29.join(globalConfigDir(), "plugins");
|
|
68529
|
+
const projectPluginsDir = path29.join(workdir, ".nax", "plugins");
|
|
68521
68530
|
const configPlugins = config2.plugins || [];
|
|
68522
68531
|
const resolvedPatterns = await resolveTestFilePatterns(config2, workdir);
|
|
68523
68532
|
const isTestFileFn = (filename) => resolvedPatterns.regex.some((re) => re.test(filename));
|
|
@@ -70011,11 +70020,11 @@ var require_react_reconciler_development = __commonJS((exports, module) => {
|
|
|
70011
70020
|
fiber = fiber.next, id--;
|
|
70012
70021
|
return fiber;
|
|
70013
70022
|
}
|
|
70014
|
-
function copyWithSetImpl(obj,
|
|
70015
|
-
if (index >=
|
|
70023
|
+
function copyWithSetImpl(obj, path30, index, value) {
|
|
70024
|
+
if (index >= path30.length)
|
|
70016
70025
|
return value;
|
|
70017
|
-
var key =
|
|
70018
|
-
updated[key] = copyWithSetImpl(obj[key],
|
|
70026
|
+
var key = path30[index], updated = isArrayImpl(obj) ? obj.slice() : assign2({}, obj);
|
|
70027
|
+
updated[key] = copyWithSetImpl(obj[key], path30, index + 1, value);
|
|
70019
70028
|
return updated;
|
|
70020
70029
|
}
|
|
70021
70030
|
function copyWithRename(obj, oldPath, newPath) {
|
|
@@ -70035,11 +70044,11 @@ var require_react_reconciler_development = __commonJS((exports, module) => {
|
|
|
70035
70044
|
index + 1 === oldPath.length ? (updated[newPath[index]] = updated[oldKey], isArrayImpl(updated) ? updated.splice(oldKey, 1) : delete updated[oldKey]) : updated[oldKey] = copyWithRenameImpl(obj[oldKey], oldPath, newPath, index + 1);
|
|
70036
70045
|
return updated;
|
|
70037
70046
|
}
|
|
70038
|
-
function copyWithDeleteImpl(obj,
|
|
70039
|
-
var key =
|
|
70040
|
-
if (index + 1 ===
|
|
70047
|
+
function copyWithDeleteImpl(obj, path30, index) {
|
|
70048
|
+
var key = path30[index], updated = isArrayImpl(obj) ? obj.slice() : assign2({}, obj);
|
|
70049
|
+
if (index + 1 === path30.length)
|
|
70041
70050
|
return isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key], updated;
|
|
70042
|
-
updated[key] = copyWithDeleteImpl(obj[key],
|
|
70051
|
+
updated[key] = copyWithDeleteImpl(obj[key], path30, index + 1);
|
|
70043
70052
|
return updated;
|
|
70044
70053
|
}
|
|
70045
70054
|
function shouldSuspendImpl() {
|
|
@@ -80062,29 +80071,29 @@ Check the top-level render call using <` + componentName2 + ">.");
|
|
|
80062
80071
|
var didWarnAboutNestedUpdates = false;
|
|
80063
80072
|
var didWarnAboutFindNodeInStrictMode = {};
|
|
80064
80073
|
var overrideHookState = null, overrideHookStateDeletePath = null, overrideHookStateRenamePath = null, overrideProps = null, overridePropsDeletePath = null, overridePropsRenamePath = null, scheduleUpdate = null, scheduleRetry = null, setErrorHandler = null, setSuspenseHandler = null;
|
|
80065
|
-
overrideHookState = function(fiber, id,
|
|
80074
|
+
overrideHookState = function(fiber, id, path30, value) {
|
|
80066
80075
|
id = findHook(fiber, id);
|
|
80067
|
-
id !== null && (
|
|
80076
|
+
id !== null && (path30 = copyWithSetImpl(id.memoizedState, path30, 0, value), id.memoizedState = path30, id.baseState = path30, fiber.memoizedProps = assign2({}, fiber.memoizedProps), path30 = enqueueConcurrentRenderForLane(fiber, 2), path30 !== null && scheduleUpdateOnFiber(path30, fiber, 2));
|
|
80068
80077
|
};
|
|
80069
|
-
overrideHookStateDeletePath = function(fiber, id,
|
|
80078
|
+
overrideHookStateDeletePath = function(fiber, id, path30) {
|
|
80070
80079
|
id = findHook(fiber, id);
|
|
80071
|
-
id !== null && (
|
|
80080
|
+
id !== null && (path30 = copyWithDeleteImpl(id.memoizedState, path30, 0), id.memoizedState = path30, id.baseState = path30, fiber.memoizedProps = assign2({}, fiber.memoizedProps), path30 = enqueueConcurrentRenderForLane(fiber, 2), path30 !== null && scheduleUpdateOnFiber(path30, fiber, 2));
|
|
80072
80081
|
};
|
|
80073
80082
|
overrideHookStateRenamePath = function(fiber, id, oldPath, newPath) {
|
|
80074
80083
|
id = findHook(fiber, id);
|
|
80075
80084
|
id !== null && (oldPath = copyWithRename(id.memoizedState, oldPath, newPath), id.memoizedState = oldPath, id.baseState = oldPath, fiber.memoizedProps = assign2({}, fiber.memoizedProps), oldPath = enqueueConcurrentRenderForLane(fiber, 2), oldPath !== null && scheduleUpdateOnFiber(oldPath, fiber, 2));
|
|
80076
80085
|
};
|
|
80077
|
-
overrideProps = function(fiber,
|
|
80078
|
-
fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps,
|
|
80086
|
+
overrideProps = function(fiber, path30, value) {
|
|
80087
|
+
fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path30, 0, value);
|
|
80079
80088
|
fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
|
|
80080
|
-
|
|
80081
|
-
|
|
80089
|
+
path30 = enqueueConcurrentRenderForLane(fiber, 2);
|
|
80090
|
+
path30 !== null && scheduleUpdateOnFiber(path30, fiber, 2);
|
|
80082
80091
|
};
|
|
80083
|
-
overridePropsDeletePath = function(fiber,
|
|
80084
|
-
fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps,
|
|
80092
|
+
overridePropsDeletePath = function(fiber, path30) {
|
|
80093
|
+
fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path30, 0);
|
|
80085
80094
|
fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
|
|
80086
|
-
|
|
80087
|
-
|
|
80095
|
+
path30 = enqueueConcurrentRenderForLane(fiber, 2);
|
|
80096
|
+
path30 !== null && scheduleUpdateOnFiber(path30, fiber, 2);
|
|
80088
80097
|
};
|
|
80089
80098
|
overridePropsRenamePath = function(fiber, oldPath, newPath) {
|
|
80090
80099
|
fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);
|
|
@@ -84139,8 +84148,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84139
84148
|
}
|
|
84140
84149
|
return false;
|
|
84141
84150
|
}
|
|
84142
|
-
function utils_getInObject(object2,
|
|
84143
|
-
return
|
|
84151
|
+
function utils_getInObject(object2, path30) {
|
|
84152
|
+
return path30.reduce(function(reduced, attr) {
|
|
84144
84153
|
if (reduced) {
|
|
84145
84154
|
if (utils_hasOwnProperty.call(reduced, attr)) {
|
|
84146
84155
|
return reduced[attr];
|
|
@@ -84152,11 +84161,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84152
84161
|
return null;
|
|
84153
84162
|
}, object2);
|
|
84154
84163
|
}
|
|
84155
|
-
function deletePathInObject(object2,
|
|
84156
|
-
var length =
|
|
84157
|
-
var last2 =
|
|
84164
|
+
function deletePathInObject(object2, path30) {
|
|
84165
|
+
var length = path30.length;
|
|
84166
|
+
var last2 = path30[length - 1];
|
|
84158
84167
|
if (object2 != null) {
|
|
84159
|
-
var parent = utils_getInObject(object2,
|
|
84168
|
+
var parent = utils_getInObject(object2, path30.slice(0, length - 1));
|
|
84160
84169
|
if (parent) {
|
|
84161
84170
|
if (src_isArray(parent)) {
|
|
84162
84171
|
parent.splice(last2, 1);
|
|
@@ -84182,11 +84191,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84182
84191
|
}
|
|
84183
84192
|
}
|
|
84184
84193
|
}
|
|
84185
|
-
function utils_setInObject(object2,
|
|
84186
|
-
var length =
|
|
84187
|
-
var last2 =
|
|
84194
|
+
function utils_setInObject(object2, path30, value) {
|
|
84195
|
+
var length = path30.length;
|
|
84196
|
+
var last2 = path30[length - 1];
|
|
84188
84197
|
if (object2 != null) {
|
|
84189
|
-
var parent = utils_getInObject(object2,
|
|
84198
|
+
var parent = utils_getInObject(object2, path30.slice(0, length - 1));
|
|
84190
84199
|
if (parent) {
|
|
84191
84200
|
parent[last2] = value;
|
|
84192
84201
|
}
|
|
@@ -84717,8 +84726,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84717
84726
|
unserializable: Symbol("unserializable")
|
|
84718
84727
|
};
|
|
84719
84728
|
var LEVEL_THRESHOLD = 2;
|
|
84720
|
-
function createDehydrated(type, inspectable, data, cleaned,
|
|
84721
|
-
cleaned.push(
|
|
84729
|
+
function createDehydrated(type, inspectable, data, cleaned, path30) {
|
|
84730
|
+
cleaned.push(path30);
|
|
84722
84731
|
var dehydrated = {
|
|
84723
84732
|
inspectable,
|
|
84724
84733
|
type,
|
|
@@ -84736,13 +84745,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84736
84745
|
}
|
|
84737
84746
|
return dehydrated;
|
|
84738
84747
|
}
|
|
84739
|
-
function dehydrate(data, cleaned, unserializable,
|
|
84748
|
+
function dehydrate(data, cleaned, unserializable, path30, isPathAllowed) {
|
|
84740
84749
|
var level = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
|
|
84741
84750
|
var type = getDataType(data);
|
|
84742
84751
|
var isPathAllowedCheck;
|
|
84743
84752
|
switch (type) {
|
|
84744
84753
|
case "html_element":
|
|
84745
|
-
cleaned.push(
|
|
84754
|
+
cleaned.push(path30);
|
|
84746
84755
|
return {
|
|
84747
84756
|
inspectable: false,
|
|
84748
84757
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -84751,7 +84760,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84751
84760
|
type
|
|
84752
84761
|
};
|
|
84753
84762
|
case "function":
|
|
84754
|
-
cleaned.push(
|
|
84763
|
+
cleaned.push(path30);
|
|
84755
84764
|
return {
|
|
84756
84765
|
inspectable: false,
|
|
84757
84766
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -84760,14 +84769,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84760
84769
|
type
|
|
84761
84770
|
};
|
|
84762
84771
|
case "string":
|
|
84763
|
-
isPathAllowedCheck = isPathAllowed(
|
|
84772
|
+
isPathAllowedCheck = isPathAllowed(path30);
|
|
84764
84773
|
if (isPathAllowedCheck) {
|
|
84765
84774
|
return data;
|
|
84766
84775
|
} else {
|
|
84767
84776
|
return data.length <= 500 ? data : data.slice(0, 500) + "...";
|
|
84768
84777
|
}
|
|
84769
84778
|
case "bigint":
|
|
84770
|
-
cleaned.push(
|
|
84779
|
+
cleaned.push(path30);
|
|
84771
84780
|
return {
|
|
84772
84781
|
inspectable: false,
|
|
84773
84782
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -84776,7 +84785,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84776
84785
|
type
|
|
84777
84786
|
};
|
|
84778
84787
|
case "symbol":
|
|
84779
|
-
cleaned.push(
|
|
84788
|
+
cleaned.push(path30);
|
|
84780
84789
|
return {
|
|
84781
84790
|
inspectable: false,
|
|
84782
84791
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -84785,9 +84794,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84785
84794
|
type
|
|
84786
84795
|
};
|
|
84787
84796
|
case "react_element": {
|
|
84788
|
-
isPathAllowedCheck = isPathAllowed(
|
|
84797
|
+
isPathAllowedCheck = isPathAllowed(path30);
|
|
84789
84798
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
84790
|
-
cleaned.push(
|
|
84799
|
+
cleaned.push(path30);
|
|
84791
84800
|
return {
|
|
84792
84801
|
inspectable: true,
|
|
84793
84802
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -84804,19 +84813,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84804
84813
|
preview_long: formatDataForPreview(data, true),
|
|
84805
84814
|
name: getDisplayNameForReactElement(data) || "Unknown"
|
|
84806
84815
|
};
|
|
84807
|
-
unserializableValue.key = dehydrate(data.key, cleaned, unserializable,
|
|
84816
|
+
unserializableValue.key = dehydrate(data.key, cleaned, unserializable, path30.concat(["key"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
84808
84817
|
if (data.$$typeof === REACT_LEGACY_ELEMENT_TYPE) {
|
|
84809
|
-
unserializableValue.ref = dehydrate(data.ref, cleaned, unserializable,
|
|
84818
|
+
unserializableValue.ref = dehydrate(data.ref, cleaned, unserializable, path30.concat(["ref"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
84810
84819
|
}
|
|
84811
|
-
unserializableValue.props = dehydrate(data.props, cleaned, unserializable,
|
|
84812
|
-
unserializable.push(
|
|
84820
|
+
unserializableValue.props = dehydrate(data.props, cleaned, unserializable, path30.concat(["props"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
84821
|
+
unserializable.push(path30);
|
|
84813
84822
|
return unserializableValue;
|
|
84814
84823
|
}
|
|
84815
84824
|
case "react_lazy": {
|
|
84816
|
-
isPathAllowedCheck = isPathAllowed(
|
|
84825
|
+
isPathAllowedCheck = isPathAllowed(path30);
|
|
84817
84826
|
var payload = data._payload;
|
|
84818
84827
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
84819
|
-
cleaned.push(
|
|
84828
|
+
cleaned.push(path30);
|
|
84820
84829
|
var inspectable = payload !== null && hydration_typeof(payload) === "object" && (payload._status === 1 || payload._status === 2 || payload.status === "fulfilled" || payload.status === "rejected");
|
|
84821
84830
|
return {
|
|
84822
84831
|
inspectable,
|
|
@@ -84833,13 +84842,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84833
84842
|
preview_long: formatDataForPreview(data, true),
|
|
84834
84843
|
name: "lazy()"
|
|
84835
84844
|
};
|
|
84836
|
-
_unserializableValue._payload = dehydrate(payload, cleaned, unserializable,
|
|
84837
|
-
unserializable.push(
|
|
84845
|
+
_unserializableValue._payload = dehydrate(payload, cleaned, unserializable, path30.concat(["_payload"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
84846
|
+
unserializable.push(path30);
|
|
84838
84847
|
return _unserializableValue;
|
|
84839
84848
|
}
|
|
84840
84849
|
case "array_buffer":
|
|
84841
84850
|
case "data_view":
|
|
84842
|
-
cleaned.push(
|
|
84851
|
+
cleaned.push(path30);
|
|
84843
84852
|
return {
|
|
84844
84853
|
inspectable: false,
|
|
84845
84854
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -84849,21 +84858,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84849
84858
|
type
|
|
84850
84859
|
};
|
|
84851
84860
|
case "array":
|
|
84852
|
-
isPathAllowedCheck = isPathAllowed(
|
|
84861
|
+
isPathAllowedCheck = isPathAllowed(path30);
|
|
84853
84862
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
84854
|
-
return createDehydrated(type, true, data, cleaned,
|
|
84863
|
+
return createDehydrated(type, true, data, cleaned, path30);
|
|
84855
84864
|
}
|
|
84856
84865
|
var arr = [];
|
|
84857
84866
|
for (var i = 0;i < data.length; i++) {
|
|
84858
|
-
arr[i] = dehydrateKey(data, i, cleaned, unserializable,
|
|
84867
|
+
arr[i] = dehydrateKey(data, i, cleaned, unserializable, path30.concat([i]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
84859
84868
|
}
|
|
84860
84869
|
return arr;
|
|
84861
84870
|
case "html_all_collection":
|
|
84862
84871
|
case "typed_array":
|
|
84863
84872
|
case "iterator":
|
|
84864
|
-
isPathAllowedCheck = isPathAllowed(
|
|
84873
|
+
isPathAllowedCheck = isPathAllowed(path30);
|
|
84865
84874
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
84866
|
-
return createDehydrated(type, true, data, cleaned,
|
|
84875
|
+
return createDehydrated(type, true, data, cleaned, path30);
|
|
84867
84876
|
} else {
|
|
84868
84877
|
var _unserializableValue2 = {
|
|
84869
84878
|
unserializable: true,
|
|
@@ -84875,13 +84884,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84875
84884
|
name: typeof data.constructor !== "function" || typeof data.constructor.name !== "string" || data.constructor.name === "Object" ? "" : data.constructor.name
|
|
84876
84885
|
};
|
|
84877
84886
|
Array.from(data).forEach(function(item, i2) {
|
|
84878
|
-
return _unserializableValue2[i2] = dehydrate(item, cleaned, unserializable,
|
|
84887
|
+
return _unserializableValue2[i2] = dehydrate(item, cleaned, unserializable, path30.concat([i2]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
84879
84888
|
});
|
|
84880
|
-
unserializable.push(
|
|
84889
|
+
unserializable.push(path30);
|
|
84881
84890
|
return _unserializableValue2;
|
|
84882
84891
|
}
|
|
84883
84892
|
case "opaque_iterator":
|
|
84884
|
-
cleaned.push(
|
|
84893
|
+
cleaned.push(path30);
|
|
84885
84894
|
return {
|
|
84886
84895
|
inspectable: false,
|
|
84887
84896
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -84890,7 +84899,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84890
84899
|
type
|
|
84891
84900
|
};
|
|
84892
84901
|
case "date":
|
|
84893
|
-
cleaned.push(
|
|
84902
|
+
cleaned.push(path30);
|
|
84894
84903
|
return {
|
|
84895
84904
|
inspectable: false,
|
|
84896
84905
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -84899,7 +84908,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84899
84908
|
type
|
|
84900
84909
|
};
|
|
84901
84910
|
case "regexp":
|
|
84902
|
-
cleaned.push(
|
|
84911
|
+
cleaned.push(path30);
|
|
84903
84912
|
return {
|
|
84904
84913
|
inspectable: false,
|
|
84905
84914
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -84908,9 +84917,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84908
84917
|
type
|
|
84909
84918
|
};
|
|
84910
84919
|
case "thenable":
|
|
84911
|
-
isPathAllowedCheck = isPathAllowed(
|
|
84920
|
+
isPathAllowedCheck = isPathAllowed(path30);
|
|
84912
84921
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
84913
|
-
cleaned.push(
|
|
84922
|
+
cleaned.push(path30);
|
|
84914
84923
|
return {
|
|
84915
84924
|
inspectable: data.status === "fulfilled" || data.status === "rejected",
|
|
84916
84925
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -84931,8 +84940,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84931
84940
|
preview_long: formatDataForPreview(data, true),
|
|
84932
84941
|
name: "fulfilled Thenable"
|
|
84933
84942
|
};
|
|
84934
|
-
_unserializableValue3.value = dehydrate(data.value, cleaned, unserializable,
|
|
84935
|
-
unserializable.push(
|
|
84943
|
+
_unserializableValue3.value = dehydrate(data.value, cleaned, unserializable, path30.concat(["value"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
84944
|
+
unserializable.push(path30);
|
|
84936
84945
|
return _unserializableValue3;
|
|
84937
84946
|
}
|
|
84938
84947
|
case "rejected": {
|
|
@@ -84943,12 +84952,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84943
84952
|
preview_long: formatDataForPreview(data, true),
|
|
84944
84953
|
name: "rejected Thenable"
|
|
84945
84954
|
};
|
|
84946
|
-
_unserializableValue4.reason = dehydrate(data.reason, cleaned, unserializable,
|
|
84947
|
-
unserializable.push(
|
|
84955
|
+
_unserializableValue4.reason = dehydrate(data.reason, cleaned, unserializable, path30.concat(["reason"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
84956
|
+
unserializable.push(path30);
|
|
84948
84957
|
return _unserializableValue4;
|
|
84949
84958
|
}
|
|
84950
84959
|
default:
|
|
84951
|
-
cleaned.push(
|
|
84960
|
+
cleaned.push(path30);
|
|
84952
84961
|
return {
|
|
84953
84962
|
inspectable: false,
|
|
84954
84963
|
preview_short: formatDataForPreview(data, false),
|
|
@@ -84958,21 +84967,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84958
84967
|
};
|
|
84959
84968
|
}
|
|
84960
84969
|
case "object":
|
|
84961
|
-
isPathAllowedCheck = isPathAllowed(
|
|
84970
|
+
isPathAllowedCheck = isPathAllowed(path30);
|
|
84962
84971
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
84963
|
-
return createDehydrated(type, true, data, cleaned,
|
|
84972
|
+
return createDehydrated(type, true, data, cleaned, path30);
|
|
84964
84973
|
} else {
|
|
84965
84974
|
var object2 = {};
|
|
84966
84975
|
getAllEnumerableKeys(data).forEach(function(key) {
|
|
84967
84976
|
var name = key.toString();
|
|
84968
|
-
object2[name] = dehydrateKey(data, key, cleaned, unserializable,
|
|
84977
|
+
object2[name] = dehydrateKey(data, key, cleaned, unserializable, path30.concat([name]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
84969
84978
|
});
|
|
84970
84979
|
return object2;
|
|
84971
84980
|
}
|
|
84972
84981
|
case "class_instance": {
|
|
84973
|
-
isPathAllowedCheck = isPathAllowed(
|
|
84982
|
+
isPathAllowedCheck = isPathAllowed(path30);
|
|
84974
84983
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
84975
|
-
return createDehydrated(type, true, data, cleaned,
|
|
84984
|
+
return createDehydrated(type, true, data, cleaned, path30);
|
|
84976
84985
|
}
|
|
84977
84986
|
var value = {
|
|
84978
84987
|
unserializable: true,
|
|
@@ -84984,15 +84993,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
84984
84993
|
};
|
|
84985
84994
|
getAllEnumerableKeys(data).forEach(function(key) {
|
|
84986
84995
|
var keyAsString = key.toString();
|
|
84987
|
-
value[keyAsString] = dehydrate(data[key], cleaned, unserializable,
|
|
84996
|
+
value[keyAsString] = dehydrate(data[key], cleaned, unserializable, path30.concat([keyAsString]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
84988
84997
|
});
|
|
84989
|
-
unserializable.push(
|
|
84998
|
+
unserializable.push(path30);
|
|
84990
84999
|
return value;
|
|
84991
85000
|
}
|
|
84992
85001
|
case "error": {
|
|
84993
|
-
isPathAllowedCheck = isPathAllowed(
|
|
85002
|
+
isPathAllowedCheck = isPathAllowed(path30);
|
|
84994
85003
|
if (level >= LEVEL_THRESHOLD && !isPathAllowedCheck) {
|
|
84995
|
-
return createDehydrated(type, true, data, cleaned,
|
|
85004
|
+
return createDehydrated(type, true, data, cleaned, path30);
|
|
84996
85005
|
}
|
|
84997
85006
|
var _value = {
|
|
84998
85007
|
unserializable: true,
|
|
@@ -85002,22 +85011,22 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
85002
85011
|
preview_long: formatDataForPreview(data, true),
|
|
85003
85012
|
name: data.name
|
|
85004
85013
|
};
|
|
85005
|
-
_value.message = dehydrate(data.message, cleaned, unserializable,
|
|
85006
|
-
_value.stack = dehydrate(data.stack, cleaned, unserializable,
|
|
85014
|
+
_value.message = dehydrate(data.message, cleaned, unserializable, path30.concat(["message"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
85015
|
+
_value.stack = dehydrate(data.stack, cleaned, unserializable, path30.concat(["stack"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
85007
85016
|
if ("cause" in data) {
|
|
85008
|
-
_value.cause = dehydrate(data.cause, cleaned, unserializable,
|
|
85017
|
+
_value.cause = dehydrate(data.cause, cleaned, unserializable, path30.concat(["cause"]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
85009
85018
|
}
|
|
85010
85019
|
getAllEnumerableKeys(data).forEach(function(key) {
|
|
85011
85020
|
var keyAsString = key.toString();
|
|
85012
|
-
_value[keyAsString] = dehydrate(data[key], cleaned, unserializable,
|
|
85021
|
+
_value[keyAsString] = dehydrate(data[key], cleaned, unserializable, path30.concat([keyAsString]), isPathAllowed, isPathAllowedCheck ? 1 : level + 1);
|
|
85013
85022
|
});
|
|
85014
|
-
unserializable.push(
|
|
85023
|
+
unserializable.push(path30);
|
|
85015
85024
|
return _value;
|
|
85016
85025
|
}
|
|
85017
85026
|
case "infinity":
|
|
85018
85027
|
case "nan":
|
|
85019
85028
|
case "undefined":
|
|
85020
|
-
cleaned.push(
|
|
85029
|
+
cleaned.push(path30);
|
|
85021
85030
|
return {
|
|
85022
85031
|
type
|
|
85023
85032
|
};
|
|
@@ -85025,10 +85034,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
85025
85034
|
return data;
|
|
85026
85035
|
}
|
|
85027
85036
|
}
|
|
85028
|
-
function dehydrateKey(parent, key, cleaned, unserializable,
|
|
85037
|
+
function dehydrateKey(parent, key, cleaned, unserializable, path30, isPathAllowed) {
|
|
85029
85038
|
var level = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0;
|
|
85030
85039
|
try {
|
|
85031
|
-
return dehydrate(parent[key], cleaned, unserializable,
|
|
85040
|
+
return dehydrate(parent[key], cleaned, unserializable, path30, isPathAllowed, level);
|
|
85032
85041
|
} catch (error48) {
|
|
85033
85042
|
var preview = "";
|
|
85034
85043
|
if (hydration_typeof(error48) === "object" && error48 !== null && typeof error48.stack === "string") {
|
|
@@ -85036,7 +85045,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
85036
85045
|
} else if (typeof error48 === "string") {
|
|
85037
85046
|
preview = error48;
|
|
85038
85047
|
}
|
|
85039
|
-
cleaned.push(
|
|
85048
|
+
cleaned.push(path30);
|
|
85040
85049
|
return {
|
|
85041
85050
|
inspectable: false,
|
|
85042
85051
|
preview_short: "[Exception]",
|
|
@@ -85046,8 +85055,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
85046
85055
|
};
|
|
85047
85056
|
}
|
|
85048
85057
|
}
|
|
85049
|
-
function fillInPath(object2, data,
|
|
85050
|
-
var target = getInObject(object2,
|
|
85058
|
+
function fillInPath(object2, data, path30, value) {
|
|
85059
|
+
var target = getInObject(object2, path30);
|
|
85051
85060
|
if (target != null) {
|
|
85052
85061
|
if (!target[meta3.unserializable]) {
|
|
85053
85062
|
delete target[meta3.inspectable];
|
|
@@ -85062,9 +85071,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
85062
85071
|
}
|
|
85063
85072
|
if (value !== null && data.unserializable.length > 0) {
|
|
85064
85073
|
var unserializablePath = data.unserializable[0];
|
|
85065
|
-
var isMatch2 = unserializablePath.length ===
|
|
85066
|
-
for (var i = 0;i <
|
|
85067
|
-
if (
|
|
85074
|
+
var isMatch2 = unserializablePath.length === path30.length;
|
|
85075
|
+
for (var i = 0;i < path30.length; i++) {
|
|
85076
|
+
if (path30[i] !== unserializablePath[i]) {
|
|
85068
85077
|
isMatch2 = false;
|
|
85069
85078
|
break;
|
|
85070
85079
|
}
|
|
@@ -85073,13 +85082,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
85073
85082
|
upgradeUnserializable(value, value);
|
|
85074
85083
|
}
|
|
85075
85084
|
}
|
|
85076
|
-
setInObject(object2,
|
|
85085
|
+
setInObject(object2, path30, value);
|
|
85077
85086
|
}
|
|
85078
85087
|
function hydrate(object2, cleaned, unserializable) {
|
|
85079
|
-
cleaned.forEach(function(
|
|
85080
|
-
var length =
|
|
85081
|
-
var last2 =
|
|
85082
|
-
var parent = getInObject(object2,
|
|
85088
|
+
cleaned.forEach(function(path30) {
|
|
85089
|
+
var length = path30.length;
|
|
85090
|
+
var last2 = path30[length - 1];
|
|
85091
|
+
var parent = getInObject(object2, path30.slice(0, length - 1));
|
|
85083
85092
|
if (!parent || !parent.hasOwnProperty(last2)) {
|
|
85084
85093
|
return;
|
|
85085
85094
|
}
|
|
@@ -85105,10 +85114,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
85105
85114
|
parent[last2] = replaced;
|
|
85106
85115
|
}
|
|
85107
85116
|
});
|
|
85108
|
-
unserializable.forEach(function(
|
|
85109
|
-
var length =
|
|
85110
|
-
var last2 =
|
|
85111
|
-
var parent = getInObject(object2,
|
|
85117
|
+
unserializable.forEach(function(path30) {
|
|
85118
|
+
var length = path30.length;
|
|
85119
|
+
var last2 = path30[length - 1];
|
|
85120
|
+
var parent = getInObject(object2, path30.slice(0, length - 1));
|
|
85112
85121
|
if (!parent || !parent.hasOwnProperty(last2)) {
|
|
85113
85122
|
return;
|
|
85114
85123
|
}
|
|
@@ -85229,11 +85238,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
85229
85238
|
return gte2(version2, FIRST_DEVTOOLS_BACKEND_LOCKSTEP_VER);
|
|
85230
85239
|
}
|
|
85231
85240
|
function cleanForBridge(data, isPathAllowed) {
|
|
85232
|
-
var
|
|
85241
|
+
var path30 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
85233
85242
|
if (data !== null) {
|
|
85234
85243
|
var cleanedPaths = [];
|
|
85235
85244
|
var unserializablePaths = [];
|
|
85236
|
-
var cleanedData = dehydrate(data, cleanedPaths, unserializablePaths,
|
|
85245
|
+
var cleanedData = dehydrate(data, cleanedPaths, unserializablePaths, path30, isPathAllowed);
|
|
85237
85246
|
return {
|
|
85238
85247
|
data: cleanedData,
|
|
85239
85248
|
cleaned: cleanedPaths,
|
|
@@ -85243,18 +85252,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
85243
85252
|
return null;
|
|
85244
85253
|
}
|
|
85245
85254
|
}
|
|
85246
|
-
function copyWithDelete(obj,
|
|
85255
|
+
function copyWithDelete(obj, path30) {
|
|
85247
85256
|
var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
85248
|
-
var key =
|
|
85257
|
+
var key = path30[index];
|
|
85249
85258
|
var updated = shared_isArray(obj) ? obj.slice() : utils_objectSpread({}, obj);
|
|
85250
|
-
if (index + 1 ===
|
|
85259
|
+
if (index + 1 === path30.length) {
|
|
85251
85260
|
if (shared_isArray(updated)) {
|
|
85252
85261
|
updated.splice(key, 1);
|
|
85253
85262
|
} else {
|
|
85254
85263
|
delete updated[key];
|
|
85255
85264
|
}
|
|
85256
85265
|
} else {
|
|
85257
|
-
updated[key] = copyWithDelete(obj[key],
|
|
85266
|
+
updated[key] = copyWithDelete(obj[key], path30, index + 1);
|
|
85258
85267
|
}
|
|
85259
85268
|
return updated;
|
|
85260
85269
|
}
|
|
@@ -85275,14 +85284,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
85275
85284
|
}
|
|
85276
85285
|
return updated;
|
|
85277
85286
|
}
|
|
85278
|
-
function copyWithSet(obj,
|
|
85287
|
+
function copyWithSet(obj, path30, value) {
|
|
85279
85288
|
var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
85280
|
-
if (index >=
|
|
85289
|
+
if (index >= path30.length) {
|
|
85281
85290
|
return value;
|
|
85282
85291
|
}
|
|
85283
|
-
var key =
|
|
85292
|
+
var key = path30[index];
|
|
85284
85293
|
var updated = shared_isArray(obj) ? obj.slice() : utils_objectSpread({}, obj);
|
|
85285
|
-
updated[key] = copyWithSet(obj[key],
|
|
85294
|
+
updated[key] = copyWithSet(obj[key], path30, value, index + 1);
|
|
85286
85295
|
return updated;
|
|
85287
85296
|
}
|
|
85288
85297
|
function getEffectDurations(root) {
|
|
@@ -86610,12 +86619,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
86610
86619
|
}
|
|
86611
86620
|
});
|
|
86612
86621
|
bridge_defineProperty(_this, "overrideValueAtPath", function(_ref) {
|
|
86613
|
-
var { id, path:
|
|
86622
|
+
var { id, path: path30, rendererID, type, value } = _ref;
|
|
86614
86623
|
switch (type) {
|
|
86615
86624
|
case "context":
|
|
86616
86625
|
_this.send("overrideContext", {
|
|
86617
86626
|
id,
|
|
86618
|
-
path:
|
|
86627
|
+
path: path30,
|
|
86619
86628
|
rendererID,
|
|
86620
86629
|
wasForwarded: true,
|
|
86621
86630
|
value
|
|
@@ -86624,7 +86633,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
86624
86633
|
case "hooks":
|
|
86625
86634
|
_this.send("overrideHookState", {
|
|
86626
86635
|
id,
|
|
86627
|
-
path:
|
|
86636
|
+
path: path30,
|
|
86628
86637
|
rendererID,
|
|
86629
86638
|
wasForwarded: true,
|
|
86630
86639
|
value
|
|
@@ -86633,7 +86642,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
86633
86642
|
case "props":
|
|
86634
86643
|
_this.send("overrideProps", {
|
|
86635
86644
|
id,
|
|
86636
|
-
path:
|
|
86645
|
+
path: path30,
|
|
86637
86646
|
rendererID,
|
|
86638
86647
|
wasForwarded: true,
|
|
86639
86648
|
value
|
|
@@ -86642,7 +86651,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
86642
86651
|
case "state":
|
|
86643
86652
|
_this.send("overrideState", {
|
|
86644
86653
|
id,
|
|
86645
|
-
path:
|
|
86654
|
+
path: path30,
|
|
86646
86655
|
rendererID,
|
|
86647
86656
|
wasForwarded: true,
|
|
86648
86657
|
value
|
|
@@ -86976,12 +86985,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
86976
86985
|
}
|
|
86977
86986
|
});
|
|
86978
86987
|
agent_defineProperty(_this, "copyElementPath", function(_ref5) {
|
|
86979
|
-
var { id, path:
|
|
86988
|
+
var { id, path: path30, rendererID } = _ref5;
|
|
86980
86989
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
86981
86990
|
if (renderer == null) {
|
|
86982
86991
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
86983
86992
|
} else {
|
|
86984
|
-
var value = renderer.getSerializedElementValueByPath(id,
|
|
86993
|
+
var value = renderer.getSerializedElementValueByPath(id, path30);
|
|
86985
86994
|
if (value != null) {
|
|
86986
86995
|
_this._bridge.send("saveToClipboard", value);
|
|
86987
86996
|
} else {
|
|
@@ -86990,12 +86999,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
86990
86999
|
}
|
|
86991
87000
|
});
|
|
86992
87001
|
agent_defineProperty(_this, "deletePath", function(_ref6) {
|
|
86993
|
-
var { hookID, id, path:
|
|
87002
|
+
var { hookID, id, path: path30, rendererID, type } = _ref6;
|
|
86994
87003
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
86995
87004
|
if (renderer == null) {
|
|
86996
87005
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
86997
87006
|
} else {
|
|
86998
|
-
renderer.deletePath(type, id, hookID,
|
|
87007
|
+
renderer.deletePath(type, id, hookID, path30);
|
|
86999
87008
|
}
|
|
87000
87009
|
});
|
|
87001
87010
|
agent_defineProperty(_this, "getBackendVersion", function() {
|
|
@@ -87032,12 +87041,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
87032
87041
|
}
|
|
87033
87042
|
});
|
|
87034
87043
|
agent_defineProperty(_this, "inspectElement", function(_ref9) {
|
|
87035
|
-
var { forceFullData, id, path:
|
|
87044
|
+
var { forceFullData, id, path: path30, rendererID, requestID } = _ref9;
|
|
87036
87045
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
87037
87046
|
if (renderer == null) {
|
|
87038
87047
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
87039
87048
|
} else {
|
|
87040
|
-
_this._bridge.send("inspectedElement", renderer.inspectElement(requestID, id,
|
|
87049
|
+
_this._bridge.send("inspectedElement", renderer.inspectElement(requestID, id, path30, forceFullData));
|
|
87041
87050
|
if (_this._persistedSelectionMatch === null || _this._persistedSelectionMatch.id !== id) {
|
|
87042
87051
|
_this._persistedSelection = null;
|
|
87043
87052
|
_this._persistedSelectionMatch = null;
|
|
@@ -87071,15 +87080,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
87071
87080
|
}
|
|
87072
87081
|
for (var rendererID in _this._rendererInterfaces) {
|
|
87073
87082
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
87074
|
-
var
|
|
87083
|
+
var path30 = null;
|
|
87075
87084
|
if (suspendedByPathIndex !== null && rendererPath !== null) {
|
|
87076
87085
|
var suspendedByPathRendererIndex = suspendedByPathIndex - suspendedByOffset;
|
|
87077
87086
|
var rendererHasRequestedSuspendedByPath = renderer.getElementAttributeByPath(id, ["suspendedBy", suspendedByPathRendererIndex]) !== undefined;
|
|
87078
87087
|
if (rendererHasRequestedSuspendedByPath) {
|
|
87079
|
-
|
|
87088
|
+
path30 = ["suspendedBy", suspendedByPathRendererIndex].concat(rendererPath);
|
|
87080
87089
|
}
|
|
87081
87090
|
}
|
|
87082
|
-
var inspectedRootsPayload = renderer.inspectElement(requestID, id,
|
|
87091
|
+
var inspectedRootsPayload = renderer.inspectElement(requestID, id, path30, forceFullData);
|
|
87083
87092
|
switch (inspectedRootsPayload.type) {
|
|
87084
87093
|
case "hydrated-path":
|
|
87085
87094
|
inspectedRootsPayload.path[1] += suspendedByOffset;
|
|
@@ -87173,20 +87182,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
87173
87182
|
}
|
|
87174
87183
|
});
|
|
87175
87184
|
agent_defineProperty(_this, "overrideValueAtPath", function(_ref15) {
|
|
87176
|
-
var { hookID, id, path:
|
|
87185
|
+
var { hookID, id, path: path30, rendererID, type, value } = _ref15;
|
|
87177
87186
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
87178
87187
|
if (renderer == null) {
|
|
87179
87188
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
87180
87189
|
} else {
|
|
87181
|
-
renderer.overrideValueAtPath(type, id, hookID,
|
|
87190
|
+
renderer.overrideValueAtPath(type, id, hookID, path30, value);
|
|
87182
87191
|
}
|
|
87183
87192
|
});
|
|
87184
87193
|
agent_defineProperty(_this, "overrideContext", function(_ref16) {
|
|
87185
|
-
var { id, path:
|
|
87194
|
+
var { id, path: path30, rendererID, wasForwarded, value } = _ref16;
|
|
87186
87195
|
if (!wasForwarded) {
|
|
87187
87196
|
_this.overrideValueAtPath({
|
|
87188
87197
|
id,
|
|
87189
|
-
path:
|
|
87198
|
+
path: path30,
|
|
87190
87199
|
rendererID,
|
|
87191
87200
|
type: "context",
|
|
87192
87201
|
value
|
|
@@ -87194,11 +87203,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
87194
87203
|
}
|
|
87195
87204
|
});
|
|
87196
87205
|
agent_defineProperty(_this, "overrideHookState", function(_ref17) {
|
|
87197
|
-
var { id, hookID, path:
|
|
87206
|
+
var { id, hookID, path: path30, rendererID, wasForwarded, value } = _ref17;
|
|
87198
87207
|
if (!wasForwarded) {
|
|
87199
87208
|
_this.overrideValueAtPath({
|
|
87200
87209
|
id,
|
|
87201
|
-
path:
|
|
87210
|
+
path: path30,
|
|
87202
87211
|
rendererID,
|
|
87203
87212
|
type: "hooks",
|
|
87204
87213
|
value
|
|
@@ -87206,11 +87215,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
87206
87215
|
}
|
|
87207
87216
|
});
|
|
87208
87217
|
agent_defineProperty(_this, "overrideProps", function(_ref18) {
|
|
87209
|
-
var { id, path:
|
|
87218
|
+
var { id, path: path30, rendererID, wasForwarded, value } = _ref18;
|
|
87210
87219
|
if (!wasForwarded) {
|
|
87211
87220
|
_this.overrideValueAtPath({
|
|
87212
87221
|
id,
|
|
87213
|
-
path:
|
|
87222
|
+
path: path30,
|
|
87214
87223
|
rendererID,
|
|
87215
87224
|
type: "props",
|
|
87216
87225
|
value
|
|
@@ -87218,11 +87227,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
87218
87227
|
}
|
|
87219
87228
|
});
|
|
87220
87229
|
agent_defineProperty(_this, "overrideState", function(_ref19) {
|
|
87221
|
-
var { id, path:
|
|
87230
|
+
var { id, path: path30, rendererID, wasForwarded, value } = _ref19;
|
|
87222
87231
|
if (!wasForwarded) {
|
|
87223
87232
|
_this.overrideValueAtPath({
|
|
87224
87233
|
id,
|
|
87225
|
-
path:
|
|
87234
|
+
path: path30,
|
|
87226
87235
|
rendererID,
|
|
87227
87236
|
type: "state",
|
|
87228
87237
|
value
|
|
@@ -87289,12 +87298,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
87289
87298
|
_this._bridge.send("stopInspectingHost", selected);
|
|
87290
87299
|
});
|
|
87291
87300
|
agent_defineProperty(_this, "storeAsGlobal", function(_ref23) {
|
|
87292
|
-
var { count, id, path:
|
|
87301
|
+
var { count, id, path: path30, rendererID } = _ref23;
|
|
87293
87302
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
87294
87303
|
if (renderer == null) {
|
|
87295
87304
|
console.warn('Invalid renderer id "'.concat(rendererID, '" for element "').concat(id, '"'));
|
|
87296
87305
|
} else {
|
|
87297
|
-
renderer.storeAsGlobal(id,
|
|
87306
|
+
renderer.storeAsGlobal(id, path30, count);
|
|
87298
87307
|
}
|
|
87299
87308
|
});
|
|
87300
87309
|
agent_defineProperty(_this, "updateHookSettings", function(settings) {
|
|
@@ -87311,12 +87320,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
87311
87320
|
var rendererID = +rendererIDString;
|
|
87312
87321
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
87313
87322
|
if (_this._lastSelectedRendererID === rendererID) {
|
|
87314
|
-
var
|
|
87315
|
-
if (
|
|
87316
|
-
renderer.setTrackedPath(
|
|
87323
|
+
var path30 = renderer.getPathForElement(_this._lastSelectedElementID);
|
|
87324
|
+
if (path30 !== null) {
|
|
87325
|
+
renderer.setTrackedPath(path30);
|
|
87317
87326
|
_this._persistedSelection = {
|
|
87318
87327
|
rendererID,
|
|
87319
|
-
path:
|
|
87328
|
+
path: path30
|
|
87320
87329
|
};
|
|
87321
87330
|
}
|
|
87322
87331
|
}
|
|
@@ -87391,11 +87400,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
87391
87400
|
var rendererID = _this._lastSelectedRendererID;
|
|
87392
87401
|
var id = _this._lastSelectedElementID;
|
|
87393
87402
|
var renderer = _this._rendererInterfaces[rendererID];
|
|
87394
|
-
var
|
|
87395
|
-
if (
|
|
87403
|
+
var path30 = renderer != null ? renderer.getPathForElement(id) : null;
|
|
87404
|
+
if (path30 !== null) {
|
|
87396
87405
|
storage_sessionStorageSetItem(SESSION_STORAGE_LAST_SELECTION_KEY, JSON.stringify({
|
|
87397
87406
|
rendererID,
|
|
87398
|
-
path:
|
|
87407
|
+
path: path30
|
|
87399
87408
|
}));
|
|
87400
87409
|
} else {
|
|
87401
87410
|
storage_sessionStorageRemoveItem(SESSION_STORAGE_LAST_SELECTION_KEY);
|
|
@@ -88118,7 +88127,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
88118
88127
|
hasElementWithId: function hasElementWithId() {
|
|
88119
88128
|
return false;
|
|
88120
88129
|
},
|
|
88121
|
-
inspectElement: function inspectElement(requestID, id,
|
|
88130
|
+
inspectElement: function inspectElement(requestID, id, path30) {
|
|
88122
88131
|
return {
|
|
88123
88132
|
id,
|
|
88124
88133
|
responseID: requestID,
|
|
@@ -93388,9 +93397,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
93388
93397
|
}
|
|
93389
93398
|
return null;
|
|
93390
93399
|
}
|
|
93391
|
-
function getElementAttributeByPath(id,
|
|
93400
|
+
function getElementAttributeByPath(id, path30) {
|
|
93392
93401
|
if (isMostRecentlyInspectedElement(id)) {
|
|
93393
|
-
return utils_getInObject(mostRecentlyInspectedElement,
|
|
93402
|
+
return utils_getInObject(mostRecentlyInspectedElement, path30);
|
|
93394
93403
|
}
|
|
93395
93404
|
return;
|
|
93396
93405
|
}
|
|
@@ -94093,9 +94102,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
94093
94102
|
function isMostRecentlyInspectedElementCurrent(id) {
|
|
94094
94103
|
return isMostRecentlyInspectedElement(id) && !hasElementUpdatedSinceLastInspected;
|
|
94095
94104
|
}
|
|
94096
|
-
function mergeInspectedPaths(
|
|
94105
|
+
function mergeInspectedPaths(path30) {
|
|
94097
94106
|
var current = currentlyInspectedPaths;
|
|
94098
|
-
|
|
94107
|
+
path30.forEach(function(key) {
|
|
94099
94108
|
if (!current[key]) {
|
|
94100
94109
|
current[key] = {};
|
|
94101
94110
|
}
|
|
@@ -94103,21 +94112,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
94103
94112
|
});
|
|
94104
94113
|
}
|
|
94105
94114
|
function createIsPathAllowed(key, secondaryCategory) {
|
|
94106
|
-
return function isPathAllowed(
|
|
94115
|
+
return function isPathAllowed(path30) {
|
|
94107
94116
|
switch (secondaryCategory) {
|
|
94108
94117
|
case "hooks":
|
|
94109
|
-
if (
|
|
94118
|
+
if (path30.length === 1) {
|
|
94110
94119
|
return true;
|
|
94111
94120
|
}
|
|
94112
|
-
if (
|
|
94121
|
+
if (path30[path30.length - 2] === "hookSource" && path30[path30.length - 1] === "fileName") {
|
|
94113
94122
|
return true;
|
|
94114
94123
|
}
|
|
94115
|
-
if (
|
|
94124
|
+
if (path30[path30.length - 1] === "subHooks" || path30[path30.length - 2] === "subHooks") {
|
|
94116
94125
|
return true;
|
|
94117
94126
|
}
|
|
94118
94127
|
break;
|
|
94119
94128
|
case "suspendedBy":
|
|
94120
|
-
if (
|
|
94129
|
+
if (path30.length < 5) {
|
|
94121
94130
|
return true;
|
|
94122
94131
|
}
|
|
94123
94132
|
break;
|
|
@@ -94128,8 +94137,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
94128
94137
|
if (!current) {
|
|
94129
94138
|
return false;
|
|
94130
94139
|
}
|
|
94131
|
-
for (var i = 0;i <
|
|
94132
|
-
current = current[
|
|
94140
|
+
for (var i = 0;i < path30.length; i++) {
|
|
94141
|
+
current = current[path30[i]];
|
|
94133
94142
|
if (!current) {
|
|
94134
94143
|
return false;
|
|
94135
94144
|
}
|
|
@@ -94183,38 +94192,38 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
94183
94192
|
break;
|
|
94184
94193
|
}
|
|
94185
94194
|
}
|
|
94186
|
-
function storeAsGlobal(id,
|
|
94195
|
+
function storeAsGlobal(id, path30, count) {
|
|
94187
94196
|
if (isMostRecentlyInspectedElement(id)) {
|
|
94188
|
-
var value = utils_getInObject(mostRecentlyInspectedElement,
|
|
94197
|
+
var value = utils_getInObject(mostRecentlyInspectedElement, path30);
|
|
94189
94198
|
var key = "$reactTemp".concat(count);
|
|
94190
94199
|
window[key] = value;
|
|
94191
94200
|
console.log(key);
|
|
94192
94201
|
console.log(value);
|
|
94193
94202
|
}
|
|
94194
94203
|
}
|
|
94195
|
-
function getSerializedElementValueByPath(id,
|
|
94204
|
+
function getSerializedElementValueByPath(id, path30) {
|
|
94196
94205
|
if (isMostRecentlyInspectedElement(id)) {
|
|
94197
|
-
var valueToCopy = utils_getInObject(mostRecentlyInspectedElement,
|
|
94206
|
+
var valueToCopy = utils_getInObject(mostRecentlyInspectedElement, path30);
|
|
94198
94207
|
return serializeToString(valueToCopy);
|
|
94199
94208
|
}
|
|
94200
94209
|
}
|
|
94201
|
-
function inspectElement(requestID, id,
|
|
94202
|
-
if (
|
|
94203
|
-
mergeInspectedPaths(
|
|
94210
|
+
function inspectElement(requestID, id, path30, forceFullData) {
|
|
94211
|
+
if (path30 !== null) {
|
|
94212
|
+
mergeInspectedPaths(path30);
|
|
94204
94213
|
}
|
|
94205
94214
|
if (isMostRecentlyInspectedElement(id) && !forceFullData) {
|
|
94206
94215
|
if (!hasElementUpdatedSinceLastInspected) {
|
|
94207
|
-
if (
|
|
94216
|
+
if (path30 !== null) {
|
|
94208
94217
|
var secondaryCategory = null;
|
|
94209
|
-
if (
|
|
94210
|
-
secondaryCategory =
|
|
94218
|
+
if (path30[0] === "hooks" || path30[0] === "suspendedBy") {
|
|
94219
|
+
secondaryCategory = path30[0];
|
|
94211
94220
|
}
|
|
94212
94221
|
return {
|
|
94213
94222
|
id,
|
|
94214
94223
|
responseID: requestID,
|
|
94215
94224
|
type: "hydrated-path",
|
|
94216
|
-
path:
|
|
94217
|
-
value: cleanForBridge(utils_getInObject(mostRecentlyInspectedElement,
|
|
94225
|
+
path: path30,
|
|
94226
|
+
value: cleanForBridge(utils_getInObject(mostRecentlyInspectedElement, path30), createIsPathAllowed(null, secondaryCategory), path30)
|
|
94218
94227
|
};
|
|
94219
94228
|
} else {
|
|
94220
94229
|
return {
|
|
@@ -94410,7 +94419,7 @@ The error thrown in the component is:
|
|
|
94410
94419
|
console.groupEnd();
|
|
94411
94420
|
}
|
|
94412
94421
|
}
|
|
94413
|
-
function deletePath(type, id, hookID,
|
|
94422
|
+
function deletePath(type, id, hookID, path30) {
|
|
94414
94423
|
var devtoolsInstance = idToDevToolsInstanceMap.get(id);
|
|
94415
94424
|
if (devtoolsInstance === undefined) {
|
|
94416
94425
|
console.warn('Could not find DevToolsInstance with id "'.concat(id, '"'));
|
|
@@ -94424,11 +94433,11 @@ The error thrown in the component is:
|
|
|
94424
94433
|
var instance2 = fiber.stateNode;
|
|
94425
94434
|
switch (type) {
|
|
94426
94435
|
case "context":
|
|
94427
|
-
|
|
94436
|
+
path30 = path30.slice(1);
|
|
94428
94437
|
switch (fiber.tag) {
|
|
94429
94438
|
case ClassComponent:
|
|
94430
|
-
if (
|
|
94431
|
-
deletePathInObject(instance2.context,
|
|
94439
|
+
if (path30.length === 0) {} else {
|
|
94440
|
+
deletePathInObject(instance2.context, path30);
|
|
94432
94441
|
}
|
|
94433
94442
|
instance2.forceUpdate();
|
|
94434
94443
|
break;
|
|
@@ -94438,21 +94447,21 @@ The error thrown in the component is:
|
|
|
94438
94447
|
break;
|
|
94439
94448
|
case "hooks":
|
|
94440
94449
|
if (typeof overrideHookStateDeletePath === "function") {
|
|
94441
|
-
overrideHookStateDeletePath(fiber, hookID,
|
|
94450
|
+
overrideHookStateDeletePath(fiber, hookID, path30);
|
|
94442
94451
|
}
|
|
94443
94452
|
break;
|
|
94444
94453
|
case "props":
|
|
94445
94454
|
if (instance2 === null) {
|
|
94446
94455
|
if (typeof overridePropsDeletePath === "function") {
|
|
94447
|
-
overridePropsDeletePath(fiber,
|
|
94456
|
+
overridePropsDeletePath(fiber, path30);
|
|
94448
94457
|
}
|
|
94449
94458
|
} else {
|
|
94450
|
-
fiber.pendingProps = copyWithDelete(instance2.props,
|
|
94459
|
+
fiber.pendingProps = copyWithDelete(instance2.props, path30);
|
|
94451
94460
|
instance2.forceUpdate();
|
|
94452
94461
|
}
|
|
94453
94462
|
break;
|
|
94454
94463
|
case "state":
|
|
94455
|
-
deletePathInObject(instance2.state,
|
|
94464
|
+
deletePathInObject(instance2.state, path30);
|
|
94456
94465
|
instance2.forceUpdate();
|
|
94457
94466
|
break;
|
|
94458
94467
|
}
|
|
@@ -94507,7 +94516,7 @@ The error thrown in the component is:
|
|
|
94507
94516
|
}
|
|
94508
94517
|
}
|
|
94509
94518
|
}
|
|
94510
|
-
function overrideValueAtPath(type, id, hookID,
|
|
94519
|
+
function overrideValueAtPath(type, id, hookID, path30, value) {
|
|
94511
94520
|
var devtoolsInstance = idToDevToolsInstanceMap.get(id);
|
|
94512
94521
|
if (devtoolsInstance === undefined) {
|
|
94513
94522
|
console.warn('Could not find DevToolsInstance with id "'.concat(id, '"'));
|
|
@@ -94521,13 +94530,13 @@ The error thrown in the component is:
|
|
|
94521
94530
|
var instance2 = fiber.stateNode;
|
|
94522
94531
|
switch (type) {
|
|
94523
94532
|
case "context":
|
|
94524
|
-
|
|
94533
|
+
path30 = path30.slice(1);
|
|
94525
94534
|
switch (fiber.tag) {
|
|
94526
94535
|
case ClassComponent:
|
|
94527
|
-
if (
|
|
94536
|
+
if (path30.length === 0) {
|
|
94528
94537
|
instance2.context = value;
|
|
94529
94538
|
} else {
|
|
94530
|
-
utils_setInObject(instance2.context,
|
|
94539
|
+
utils_setInObject(instance2.context, path30, value);
|
|
94531
94540
|
}
|
|
94532
94541
|
instance2.forceUpdate();
|
|
94533
94542
|
break;
|
|
@@ -94537,18 +94546,18 @@ The error thrown in the component is:
|
|
|
94537
94546
|
break;
|
|
94538
94547
|
case "hooks":
|
|
94539
94548
|
if (typeof overrideHookState === "function") {
|
|
94540
|
-
overrideHookState(fiber, hookID,
|
|
94549
|
+
overrideHookState(fiber, hookID, path30, value);
|
|
94541
94550
|
}
|
|
94542
94551
|
break;
|
|
94543
94552
|
case "props":
|
|
94544
94553
|
switch (fiber.tag) {
|
|
94545
94554
|
case ClassComponent:
|
|
94546
|
-
fiber.pendingProps = copyWithSet(instance2.props,
|
|
94555
|
+
fiber.pendingProps = copyWithSet(instance2.props, path30, value);
|
|
94547
94556
|
instance2.forceUpdate();
|
|
94548
94557
|
break;
|
|
94549
94558
|
default:
|
|
94550
94559
|
if (typeof overrideProps === "function") {
|
|
94551
|
-
overrideProps(fiber,
|
|
94560
|
+
overrideProps(fiber, path30, value);
|
|
94552
94561
|
}
|
|
94553
94562
|
break;
|
|
94554
94563
|
}
|
|
@@ -94556,7 +94565,7 @@ The error thrown in the component is:
|
|
|
94556
94565
|
case "state":
|
|
94557
94566
|
switch (fiber.tag) {
|
|
94558
94567
|
case ClassComponent:
|
|
94559
|
-
utils_setInObject(instance2.state,
|
|
94568
|
+
utils_setInObject(instance2.state, path30, value);
|
|
94560
94569
|
instance2.forceUpdate();
|
|
94561
94570
|
break;
|
|
94562
94571
|
}
|
|
@@ -94842,14 +94851,14 @@ The error thrown in the component is:
|
|
|
94842
94851
|
var trackedPathMatchInstance = null;
|
|
94843
94852
|
var trackedPathMatchDepth = -1;
|
|
94844
94853
|
var mightBeOnTrackedPath = false;
|
|
94845
|
-
function setTrackedPath(
|
|
94846
|
-
if (
|
|
94854
|
+
function setTrackedPath(path30) {
|
|
94855
|
+
if (path30 === null) {
|
|
94847
94856
|
trackedPathMatchFiber = null;
|
|
94848
94857
|
trackedPathMatchInstance = null;
|
|
94849
94858
|
trackedPathMatchDepth = -1;
|
|
94850
94859
|
mightBeOnTrackedPath = false;
|
|
94851
94860
|
}
|
|
94852
|
-
trackedPath =
|
|
94861
|
+
trackedPath = path30;
|
|
94853
94862
|
}
|
|
94854
94863
|
function updateTrackedPathStateBeforeMount(fiber, fiberInstance) {
|
|
94855
94864
|
if (trackedPath === null || !mightBeOnTrackedPath) {
|
|
@@ -95613,9 +95622,9 @@ The error thrown in the component is:
|
|
|
95613
95622
|
}
|
|
95614
95623
|
var currentlyInspectedElementID = null;
|
|
95615
95624
|
var currentlyInspectedPaths = {};
|
|
95616
|
-
function mergeInspectedPaths(
|
|
95625
|
+
function mergeInspectedPaths(path30) {
|
|
95617
95626
|
var current = currentlyInspectedPaths;
|
|
95618
|
-
|
|
95627
|
+
path30.forEach(function(key) {
|
|
95619
95628
|
if (!current[key]) {
|
|
95620
95629
|
current[key] = {};
|
|
95621
95630
|
}
|
|
@@ -95623,13 +95632,13 @@ The error thrown in the component is:
|
|
|
95623
95632
|
});
|
|
95624
95633
|
}
|
|
95625
95634
|
function createIsPathAllowed(key) {
|
|
95626
|
-
return function isPathAllowed(
|
|
95635
|
+
return function isPathAllowed(path30) {
|
|
95627
95636
|
var current = currentlyInspectedPaths[key];
|
|
95628
95637
|
if (!current) {
|
|
95629
95638
|
return false;
|
|
95630
95639
|
}
|
|
95631
|
-
for (var i = 0;i <
|
|
95632
|
-
current = current[
|
|
95640
|
+
for (var i = 0;i < path30.length; i++) {
|
|
95641
|
+
current = current[path30[i]];
|
|
95633
95642
|
if (!current) {
|
|
95634
95643
|
return false;
|
|
95635
95644
|
}
|
|
@@ -95679,24 +95688,24 @@ The error thrown in the component is:
|
|
|
95679
95688
|
break;
|
|
95680
95689
|
}
|
|
95681
95690
|
}
|
|
95682
|
-
function storeAsGlobal(id,
|
|
95691
|
+
function storeAsGlobal(id, path30, count) {
|
|
95683
95692
|
var inspectedElement = inspectElementRaw(id);
|
|
95684
95693
|
if (inspectedElement !== null) {
|
|
95685
|
-
var value = utils_getInObject(inspectedElement,
|
|
95694
|
+
var value = utils_getInObject(inspectedElement, path30);
|
|
95686
95695
|
var key = "$reactTemp".concat(count);
|
|
95687
95696
|
window[key] = value;
|
|
95688
95697
|
console.log(key);
|
|
95689
95698
|
console.log(value);
|
|
95690
95699
|
}
|
|
95691
95700
|
}
|
|
95692
|
-
function getSerializedElementValueByPath(id,
|
|
95701
|
+
function getSerializedElementValueByPath(id, path30) {
|
|
95693
95702
|
var inspectedElement = inspectElementRaw(id);
|
|
95694
95703
|
if (inspectedElement !== null) {
|
|
95695
|
-
var valueToCopy = utils_getInObject(inspectedElement,
|
|
95704
|
+
var valueToCopy = utils_getInObject(inspectedElement, path30);
|
|
95696
95705
|
return serializeToString(valueToCopy);
|
|
95697
95706
|
}
|
|
95698
95707
|
}
|
|
95699
|
-
function inspectElement(requestID, id,
|
|
95708
|
+
function inspectElement(requestID, id, path30, forceFullData) {
|
|
95700
95709
|
if (forceFullData || currentlyInspectedElementID !== id) {
|
|
95701
95710
|
currentlyInspectedElementID = id;
|
|
95702
95711
|
currentlyInspectedPaths = {};
|
|
@@ -95709,8 +95718,8 @@ The error thrown in the component is:
|
|
|
95709
95718
|
type: "not-found"
|
|
95710
95719
|
};
|
|
95711
95720
|
}
|
|
95712
|
-
if (
|
|
95713
|
-
mergeInspectedPaths(
|
|
95721
|
+
if (path30 !== null) {
|
|
95722
|
+
mergeInspectedPaths(path30);
|
|
95714
95723
|
}
|
|
95715
95724
|
updateSelectedElement(id);
|
|
95716
95725
|
inspectedElement.context = cleanForBridge(inspectedElement.context, createIsPathAllowed("context"));
|
|
@@ -95913,10 +95922,10 @@ The error thrown in the component is:
|
|
|
95913
95922
|
console.groupEnd();
|
|
95914
95923
|
}
|
|
95915
95924
|
}
|
|
95916
|
-
function getElementAttributeByPath(id,
|
|
95925
|
+
function getElementAttributeByPath(id, path30) {
|
|
95917
95926
|
var inspectedElement = inspectElementRaw(id);
|
|
95918
95927
|
if (inspectedElement !== null) {
|
|
95919
|
-
return utils_getInObject(inspectedElement,
|
|
95928
|
+
return utils_getInObject(inspectedElement, path30);
|
|
95920
95929
|
}
|
|
95921
95930
|
return;
|
|
95922
95931
|
}
|
|
@@ -95933,14 +95942,14 @@ The error thrown in the component is:
|
|
|
95933
95942
|
}
|
|
95934
95943
|
return element.type;
|
|
95935
95944
|
}
|
|
95936
|
-
function deletePath(type, id, hookID,
|
|
95945
|
+
function deletePath(type, id, hookID, path30) {
|
|
95937
95946
|
var internalInstance = idToInternalInstanceMap.get(id);
|
|
95938
95947
|
if (internalInstance != null) {
|
|
95939
95948
|
var publicInstance = internalInstance._instance;
|
|
95940
95949
|
if (publicInstance != null) {
|
|
95941
95950
|
switch (type) {
|
|
95942
95951
|
case "context":
|
|
95943
|
-
deletePathInObject(publicInstance.context,
|
|
95952
|
+
deletePathInObject(publicInstance.context, path30);
|
|
95944
95953
|
forceUpdate(publicInstance);
|
|
95945
95954
|
break;
|
|
95946
95955
|
case "hooks":
|
|
@@ -95948,12 +95957,12 @@ The error thrown in the component is:
|
|
|
95948
95957
|
case "props":
|
|
95949
95958
|
var element = internalInstance._currentElement;
|
|
95950
95959
|
internalInstance._currentElement = legacy_renderer_objectSpread(legacy_renderer_objectSpread({}, element), {}, {
|
|
95951
|
-
props: copyWithDelete(element.props,
|
|
95960
|
+
props: copyWithDelete(element.props, path30)
|
|
95952
95961
|
});
|
|
95953
95962
|
forceUpdate(publicInstance);
|
|
95954
95963
|
break;
|
|
95955
95964
|
case "state":
|
|
95956
|
-
deletePathInObject(publicInstance.state,
|
|
95965
|
+
deletePathInObject(publicInstance.state, path30);
|
|
95957
95966
|
forceUpdate(publicInstance);
|
|
95958
95967
|
break;
|
|
95959
95968
|
}
|
|
@@ -95987,14 +95996,14 @@ The error thrown in the component is:
|
|
|
95987
95996
|
}
|
|
95988
95997
|
}
|
|
95989
95998
|
}
|
|
95990
|
-
function overrideValueAtPath(type, id, hookID,
|
|
95999
|
+
function overrideValueAtPath(type, id, hookID, path30, value) {
|
|
95991
96000
|
var internalInstance = idToInternalInstanceMap.get(id);
|
|
95992
96001
|
if (internalInstance != null) {
|
|
95993
96002
|
var publicInstance = internalInstance._instance;
|
|
95994
96003
|
if (publicInstance != null) {
|
|
95995
96004
|
switch (type) {
|
|
95996
96005
|
case "context":
|
|
95997
|
-
utils_setInObject(publicInstance.context,
|
|
96006
|
+
utils_setInObject(publicInstance.context, path30, value);
|
|
95998
96007
|
forceUpdate(publicInstance);
|
|
95999
96008
|
break;
|
|
96000
96009
|
case "hooks":
|
|
@@ -96002,12 +96011,12 @@ The error thrown in the component is:
|
|
|
96002
96011
|
case "props":
|
|
96003
96012
|
var element = internalInstance._currentElement;
|
|
96004
96013
|
internalInstance._currentElement = legacy_renderer_objectSpread(legacy_renderer_objectSpread({}, element), {}, {
|
|
96005
|
-
props: copyWithSet(element.props,
|
|
96014
|
+
props: copyWithSet(element.props, path30, value)
|
|
96006
96015
|
});
|
|
96007
96016
|
forceUpdate(publicInstance);
|
|
96008
96017
|
break;
|
|
96009
96018
|
case "state":
|
|
96010
|
-
utils_setInObject(publicInstance.state,
|
|
96019
|
+
utils_setInObject(publicInstance.state, path30, value);
|
|
96011
96020
|
forceUpdate(publicInstance);
|
|
96012
96021
|
break;
|
|
96013
96022
|
}
|
|
@@ -96048,7 +96057,7 @@ The error thrown in the component is:
|
|
|
96048
96057
|
return [];
|
|
96049
96058
|
}
|
|
96050
96059
|
function setTraceUpdatesEnabled(enabled) {}
|
|
96051
|
-
function setTrackedPath(
|
|
96060
|
+
function setTrackedPath(path30) {}
|
|
96052
96061
|
function getOwnersList(id) {
|
|
96053
96062
|
return null;
|
|
96054
96063
|
}
|
|
@@ -99733,10 +99742,10 @@ init_setup_write();
|
|
|
99733
99742
|
// src/cli/plugins.ts
|
|
99734
99743
|
init_paths();
|
|
99735
99744
|
init_loader4();
|
|
99736
|
-
import * as
|
|
99745
|
+
import * as path21 from "path";
|
|
99737
99746
|
async function pluginsListCommand(config2, workdir, overrideGlobalPluginsDir) {
|
|
99738
|
-
const globalPluginsDir = overrideGlobalPluginsDir ??
|
|
99739
|
-
const projectPluginsDir =
|
|
99747
|
+
const globalPluginsDir = overrideGlobalPluginsDir ?? path21.join(globalConfigDir(), "plugins");
|
|
99748
|
+
const projectPluginsDir = path21.join(workdir, ".nax", "plugins");
|
|
99740
99749
|
const configPlugins = config2.plugins || [];
|
|
99741
99750
|
const registry3 = await loadPlugins(globalPluginsDir, projectPluginsDir, configPlugins, workdir, config2.disabledPlugins);
|
|
99742
99751
|
const plugins = registry3.plugins;
|
|
@@ -99786,10 +99795,10 @@ function formatSource(type, sourcePath) {
|
|
|
99786
99795
|
return `built-in (${sourcePath})`;
|
|
99787
99796
|
}
|
|
99788
99797
|
if (type === "global") {
|
|
99789
|
-
return `global (${
|
|
99798
|
+
return `global (${path21.basename(sourcePath)})`;
|
|
99790
99799
|
}
|
|
99791
99800
|
if (type === "project") {
|
|
99792
|
-
return `project (${
|
|
99801
|
+
return `project (${path21.basename(sourcePath)})`;
|
|
99793
99802
|
}
|
|
99794
99803
|
return `config (${sourcePath})`;
|
|
99795
99804
|
}
|
|
@@ -100182,10 +100191,10 @@ function deepDiffConfigs(global2, project, currentPath = []) {
|
|
|
100182
100191
|
for (const key of Object.keys(project)) {
|
|
100183
100192
|
const projectValue = project[key];
|
|
100184
100193
|
const globalValue = global2[key];
|
|
100185
|
-
const
|
|
100186
|
-
const pathStr =
|
|
100194
|
+
const path22 = [...currentPath, key];
|
|
100195
|
+
const pathStr = path22.join(".");
|
|
100187
100196
|
if (projectValue !== null && typeof projectValue === "object" && !Array.isArray(projectValue) && globalValue !== null && typeof globalValue === "object" && !Array.isArray(globalValue)) {
|
|
100188
|
-
const nestedDiffs = deepDiffConfigs(globalValue, projectValue,
|
|
100197
|
+
const nestedDiffs = deepDiffConfigs(globalValue, projectValue, path22);
|
|
100189
100198
|
diffs.push(...nestedDiffs);
|
|
100190
100199
|
} else {
|
|
100191
100200
|
if (!deepEqual(projectValue, globalValue)) {
|
|
@@ -100228,11 +100237,11 @@ init_defaults();
|
|
|
100228
100237
|
init_loader();
|
|
100229
100238
|
import { existsSync as existsSync25 } from "fs";
|
|
100230
100239
|
import { join as join68 } from "path";
|
|
100231
|
-
async function loadConfigFile(
|
|
100232
|
-
if (!existsSync25(
|
|
100240
|
+
async function loadConfigFile(path22) {
|
|
100241
|
+
if (!existsSync25(path22))
|
|
100233
100242
|
return null;
|
|
100234
100243
|
try {
|
|
100235
|
-
return await Bun.file(
|
|
100244
|
+
return await Bun.file(path22).json();
|
|
100236
100245
|
} catch {
|
|
100237
100246
|
return null;
|
|
100238
100247
|
}
|
|
@@ -100279,10 +100288,10 @@ async function configCommand(config2, options = {}) {
|
|
|
100279
100288
|
console.log(`${"Field".padEnd(40)}${"Project Value".padEnd(20)}Global Value`);
|
|
100280
100289
|
console.log("\u2500".repeat(80));
|
|
100281
100290
|
for (const diff2 of diffs) {
|
|
100282
|
-
const
|
|
100291
|
+
const path22 = diff2.path.padEnd(40);
|
|
100283
100292
|
const projectVal = formatValueForTable(diff2.projectValue);
|
|
100284
100293
|
const globalVal = formatValueForTable(diff2.globalValue);
|
|
100285
|
-
console.log(`${
|
|
100294
|
+
console.log(`${path22}${projectVal.padEnd(20)}${globalVal}`);
|
|
100286
100295
|
const description = FIELD_DESCRIPTIONS[diff2.path];
|
|
100287
100296
|
if (description) {
|
|
100288
100297
|
console.log(`${"".padEnd(40)}\u21B3 ${description}`);
|
|
@@ -100315,26 +100324,26 @@ function determineConfigSources() {
|
|
|
100315
100324
|
project: projectPath && fileExists(projectPath) ? projectPath : null
|
|
100316
100325
|
};
|
|
100317
100326
|
}
|
|
100318
|
-
function fileExists(
|
|
100319
|
-
return existsSync26(
|
|
100327
|
+
function fileExists(path22) {
|
|
100328
|
+
return existsSync26(path22);
|
|
100320
100329
|
}
|
|
100321
|
-
function displayConfigWithDescriptions(obj,
|
|
100330
|
+
function displayConfigWithDescriptions(obj, path22, sources, indent = 0) {
|
|
100322
100331
|
const indentStr = " ".repeat(indent);
|
|
100323
|
-
const pathStr =
|
|
100332
|
+
const pathStr = path22.join(".");
|
|
100324
100333
|
if (obj === null || obj === undefined || typeof obj !== "object" || Array.isArray(obj)) {
|
|
100325
100334
|
const description = FIELD_DESCRIPTIONS[pathStr];
|
|
100326
100335
|
const value = formatValue(obj);
|
|
100327
100336
|
if (description) {
|
|
100328
100337
|
console.log(`${indentStr}# ${description}`);
|
|
100329
100338
|
}
|
|
100330
|
-
const key =
|
|
100339
|
+
const key = path22[path22.length - 1] || "";
|
|
100331
100340
|
console.log(`${indentStr}${key}: ${value}`);
|
|
100332
100341
|
console.log();
|
|
100333
100342
|
return;
|
|
100334
100343
|
}
|
|
100335
100344
|
const entries = Object.entries(obj);
|
|
100336
100345
|
const objAsRecord = obj;
|
|
100337
|
-
const isPromptsSection =
|
|
100346
|
+
const isPromptsSection = path22.join(".") === "prompts";
|
|
100338
100347
|
if (isPromptsSection && !objAsRecord.overrides) {
|
|
100339
100348
|
const description = FIELD_DESCRIPTIONS["prompts.overrides"];
|
|
100340
100349
|
if (description) {
|
|
@@ -100357,7 +100366,7 @@ function displayConfigWithDescriptions(obj, path21, sources, indent = 0) {
|
|
|
100357
100366
|
}
|
|
100358
100367
|
for (let i = 0;i < entries.length; i++) {
|
|
100359
100368
|
const [key, value] = entries[i];
|
|
100360
|
-
const currentPath = [...
|
|
100369
|
+
const currentPath = [...path22, key];
|
|
100361
100370
|
const currentPathStr = currentPath.join(".");
|
|
100362
100371
|
const description = FIELD_DESCRIPTIONS[currentPathStr];
|
|
100363
100372
|
if (description) {
|
|
@@ -100669,11 +100678,11 @@ init_errors();
|
|
|
100669
100678
|
import { mkdir as mkdir11 } from "fs/promises";
|
|
100670
100679
|
import { basename as basename13, join as join71 } from "path";
|
|
100671
100680
|
var _rulesCLIDeps = {
|
|
100672
|
-
readFile: async (
|
|
100673
|
-
writeFile: async (
|
|
100674
|
-
await Bun.write(
|
|
100681
|
+
readFile: async (path22) => Bun.file(path22).text(),
|
|
100682
|
+
writeFile: async (path22, content) => {
|
|
100683
|
+
await Bun.write(path22, content);
|
|
100675
100684
|
},
|
|
100676
|
-
fileExists: async (
|
|
100685
|
+
fileExists: async (path22) => Bun.file(path22).exists(),
|
|
100677
100686
|
globInDir: (dir) => {
|
|
100678
100687
|
try {
|
|
100679
100688
|
return [...new Bun.Glob("*.md").scanSync({ cwd: dir })].sort().map((f) => join71(dir, f));
|
|
@@ -100681,8 +100690,8 @@ var _rulesCLIDeps = {
|
|
|
100681
100690
|
return [];
|
|
100682
100691
|
}
|
|
100683
100692
|
},
|
|
100684
|
-
mkdir: async (
|
|
100685
|
-
await mkdir11(
|
|
100693
|
+
mkdir: async (path22) => {
|
|
100694
|
+
await mkdir11(path22, { recursive: true });
|
|
100686
100695
|
},
|
|
100687
100696
|
globCanonicalRuleFiles: (workdir) => {
|
|
100688
100697
|
try {
|
|
@@ -100855,8 +100864,8 @@ async function resolveRunProfileOverride(opts) {
|
|
|
100855
100864
|
return cliChain;
|
|
100856
100865
|
if (opts.envProfile)
|
|
100857
100866
|
return;
|
|
100858
|
-
const readJson = opts._readJson ?? (async (
|
|
100859
|
-
const file3 = Bun.file(
|
|
100867
|
+
const readJson = opts._readJson ?? (async (path22) => {
|
|
100868
|
+
const file3 = Bun.file(path22);
|
|
100860
100869
|
if (!await file3.exists())
|
|
100861
100870
|
return;
|
|
100862
100871
|
return file3.json();
|
|
@@ -100879,7 +100888,7 @@ async function resolveRunProfileOverride(opts) {
|
|
|
100879
100888
|
// src/cli/features-resolve.ts
|
|
100880
100889
|
init_config();
|
|
100881
100890
|
import { existsSync as existsSync28, readdirSync as readdirSync6 } from "fs";
|
|
100882
|
-
import { join as join73, relative as
|
|
100891
|
+
import { join as join73, relative as relative16 } from "path";
|
|
100883
100892
|
|
|
100884
100893
|
// src/cli/features-acceptance.ts
|
|
100885
100894
|
init_acceptance2();
|
|
@@ -100887,7 +100896,7 @@ init_config();
|
|
|
100887
100896
|
init_logger2();
|
|
100888
100897
|
init_prd();
|
|
100889
100898
|
import { existsSync as existsSync27 } from "fs";
|
|
100890
|
-
import { join as join72, relative as
|
|
100899
|
+
import { join as join72, relative as relative15 } from "path";
|
|
100891
100900
|
async function resolveFeatureAcceptance(featureName, workdir) {
|
|
100892
100901
|
let enabled = true;
|
|
100893
100902
|
try {
|
|
@@ -100908,11 +100917,11 @@ async function resolveFeatureAcceptance(featureName, workdir) {
|
|
|
100908
100917
|
const prd = await loadPRD(prdPath);
|
|
100909
100918
|
const testGroups = await groupStoriesByPackage(prd, repoRoot, featureName, config2.acceptance?.testPath, config2.project?.language);
|
|
100910
100919
|
const groups = await Promise.all(testGroups.map(async (g) => {
|
|
100911
|
-
const packageDir =
|
|
100920
|
+
const packageDir = relative15(repoRoot, g.packageDir);
|
|
100912
100921
|
const command = await resolveGroupCommand(repoRoot, packageDir, config2.acceptance?.command);
|
|
100913
100922
|
return {
|
|
100914
100923
|
packageDir,
|
|
100915
|
-
testPath:
|
|
100924
|
+
testPath: relative15(repoRoot, g.testPath),
|
|
100916
100925
|
exists: await Bun.file(g.testPath).exists(),
|
|
100917
100926
|
command,
|
|
100918
100927
|
language: g.language
|
|
@@ -100948,17 +100957,17 @@ async function searchSpecSource(naxDir, repoRoot, name) {
|
|
|
100948
100957
|
];
|
|
100949
100958
|
const docsSpecExact = join73(repoRoot, "docs", "specs", `SPEC-${name}.md`);
|
|
100950
100959
|
candidates.push({ abs: docsSpecExact, kind: "markdown" });
|
|
100951
|
-
const checked = candidates.map((c) =>
|
|
100960
|
+
const checked = candidates.map((c) => relative16(repoRoot, c.abs));
|
|
100952
100961
|
for (const { abs, kind } of candidates.slice(0, 2)) {
|
|
100953
100962
|
if (kind === "markdown") {
|
|
100954
100963
|
const nonEmpty = await isNonEmptyFile(abs);
|
|
100955
100964
|
if (nonEmpty) {
|
|
100956
|
-
return { source: { kind, path:
|
|
100965
|
+
return { source: { kind, path: relative16(repoRoot, abs) }, checked };
|
|
100957
100966
|
}
|
|
100958
100967
|
}
|
|
100959
100968
|
}
|
|
100960
100969
|
if (await isNonEmptyFile(docsSpecExact)) {
|
|
100961
|
-
return { source: { kind: "markdown", path:
|
|
100970
|
+
return { source: { kind: "markdown", path: relative16(repoRoot, docsSpecExact) }, checked };
|
|
100962
100971
|
}
|
|
100963
100972
|
const docsSpecsDir = join73(repoRoot, "docs", "specs");
|
|
100964
100973
|
if (existsSync28(docsSpecsDir)) {
|
|
@@ -100966,7 +100975,7 @@ async function searchSpecSource(naxDir, repoRoot, name) {
|
|
|
100966
100975
|
for (const match of glob.scanSync({ cwd: docsSpecsDir, absolute: false })) {
|
|
100967
100976
|
const abs = join73(docsSpecsDir, match);
|
|
100968
100977
|
if (await isNonEmptyFile(abs)) {
|
|
100969
|
-
const relPath =
|
|
100978
|
+
const relPath = relative16(repoRoot, abs);
|
|
100970
100979
|
if (!checked.includes(relPath))
|
|
100971
100980
|
checked.push(relPath);
|
|
100972
100981
|
return { source: { kind: "markdown", path: relPath }, checked };
|
|
@@ -100974,7 +100983,7 @@ async function searchSpecSource(naxDir, repoRoot, name) {
|
|
|
100974
100983
|
}
|
|
100975
100984
|
}
|
|
100976
100985
|
const prdAbs = join73(naxDir, "features", name, "prd.json");
|
|
100977
|
-
const prdRel =
|
|
100986
|
+
const prdRel = relative16(repoRoot, prdAbs);
|
|
100978
100987
|
if (!checked.includes(prdRel))
|
|
100979
100988
|
checked.push(prdRel);
|
|
100980
100989
|
if (existsSync28(prdAbs)) {
|
|
@@ -101026,8 +101035,8 @@ async function resolveFeatureSpec(name, workdir) {
|
|
|
101026
101035
|
return {
|
|
101027
101036
|
status: "ok",
|
|
101028
101037
|
featureName: null,
|
|
101029
|
-
specSource: { kind: "markdown", path:
|
|
101030
|
-
message: `resolved spec: ${
|
|
101038
|
+
specSource: { kind: "markdown", path: relative16(repoRoot, abs) },
|
|
101039
|
+
message: `resolved spec: ${relative16(repoRoot, abs)}`
|
|
101031
101040
|
};
|
|
101032
101041
|
}
|
|
101033
101042
|
if (name !== undefined && name.trim() !== "") {
|
|
@@ -101246,14 +101255,14 @@ function resolveEffective(detected, configPatterns) {
|
|
|
101246
101255
|
return "detected";
|
|
101247
101256
|
return "none";
|
|
101248
101257
|
}
|
|
101249
|
-
async function loadRawConfig(
|
|
101250
|
-
const f = Bun.file(
|
|
101258
|
+
async function loadRawConfig(path22) {
|
|
101259
|
+
const f = Bun.file(path22);
|
|
101251
101260
|
if (!await f.exists())
|
|
101252
101261
|
return {};
|
|
101253
101262
|
return JSON.parse(await f.text());
|
|
101254
101263
|
}
|
|
101255
|
-
async function writeRawConfig(
|
|
101256
|
-
await Bun.write(
|
|
101264
|
+
async function writeRawConfig(path22, data) {
|
|
101265
|
+
await Bun.write(path22, `${JSON.stringify(data, null, 2)}
|
|
101257
101266
|
`);
|
|
101258
101267
|
}
|
|
101259
101268
|
function deepSet(obj, keyPath, value) {
|
|
@@ -102041,10 +102050,10 @@ function renderReport(timeline, options = {}) {
|
|
|
102041
102050
|
}
|
|
102042
102051
|
|
|
102043
102052
|
// src/commands/replay.ts
|
|
102044
|
-
async function readJsonlLenient(
|
|
102045
|
-
if (!existsSync32(
|
|
102053
|
+
async function readJsonlLenient(path22) {
|
|
102054
|
+
if (!existsSync32(path22))
|
|
102046
102055
|
return [];
|
|
102047
|
-
const content = await Bun.file(
|
|
102056
|
+
const content = await Bun.file(path22).text();
|
|
102048
102057
|
const lines = content.split(`
|
|
102049
102058
|
`);
|
|
102050
102059
|
const entries = [];
|
|
@@ -102058,11 +102067,11 @@ async function readJsonlLenient(path21) {
|
|
|
102058
102067
|
}
|
|
102059
102068
|
return entries;
|
|
102060
102069
|
}
|
|
102061
|
-
async function readJsonOrUndefined(
|
|
102062
|
-
if (!existsSync32(
|
|
102070
|
+
async function readJsonOrUndefined(path22) {
|
|
102071
|
+
if (!existsSync32(path22))
|
|
102063
102072
|
return;
|
|
102064
102073
|
try {
|
|
102065
|
-
return await Bun.file(
|
|
102074
|
+
return await Bun.file(path22).json();
|
|
102066
102075
|
} catch {
|
|
102067
102076
|
return;
|
|
102068
102077
|
}
|
|
@@ -102352,7 +102361,7 @@ init_prd();
|
|
|
102352
102361
|
init_git();
|
|
102353
102362
|
init_crash_recovery();
|
|
102354
102363
|
init_story_context();
|
|
102355
|
-
import
|
|
102364
|
+
import path23 from "path";
|
|
102356
102365
|
var _runnerCompletionDeps = {
|
|
102357
102366
|
async runAcceptanceLoop(ctx) {
|
|
102358
102367
|
const { runAcceptanceLoop: runAcceptanceLoop2 } = await Promise.resolve().then(() => (init_acceptance_loop(), exports_acceptance_loop));
|
|
@@ -102383,11 +102392,11 @@ async function runCompletionPhase(options) {
|
|
|
102383
102392
|
options.statusWriter.setPostRunPhase("acceptance", { status: "running" });
|
|
102384
102393
|
pipelineEventBus.emit({ type: "postrun:phase:started", phase: "acceptance" });
|
|
102385
102394
|
const acceptanceTestPaths = options.featureDir ? await Promise.all((await groupStoriesByPackage(options.prd, options.workdir, options.feature, options.config.acceptance.testPath, options.config.project?.language)).map(async (g) => {
|
|
102386
|
-
const relativeWorkdir =
|
|
102395
|
+
const relativeWorkdir = path23.relative(options.workdir, g.packageDir);
|
|
102387
102396
|
let groupConfig = options.config;
|
|
102388
102397
|
if (relativeWorkdir && relativeWorkdir !== ".") {
|
|
102389
102398
|
try {
|
|
102390
|
-
groupConfig = await _runnerCompletionDeps.loadConfigForWorkdir(
|
|
102399
|
+
groupConfig = await _runnerCompletionDeps.loadConfigForWorkdir(path23.join(options.workdir, ".nax", "config.json"), relativeWorkdir);
|
|
102391
102400
|
} catch (error48) {
|
|
102392
102401
|
logger?.warn("execution", "Falling back to root config for package acceptance settings", {
|
|
102393
102402
|
packageDir: g.packageDir,
|
|
@@ -102526,7 +102535,7 @@ init_session();
|
|
|
102526
102535
|
|
|
102527
102536
|
// src/execution/ensure-package-dirs.ts
|
|
102528
102537
|
init_logger2();
|
|
102529
|
-
import
|
|
102538
|
+
import path24 from "path";
|
|
102530
102539
|
var _ensurePackageDirsDeps = {
|
|
102531
102540
|
exists: async (p) => {
|
|
102532
102541
|
const { stat } = await import("fs/promises");
|
|
@@ -102553,8 +102562,8 @@ async function ensureStoryPackageDirs(prd, workdir, deps = _ensurePackageDirsDep
|
|
|
102553
102562
|
}
|
|
102554
102563
|
const created = [];
|
|
102555
102564
|
for (const [rel, storyId] of relToStoryId) {
|
|
102556
|
-
const abs =
|
|
102557
|
-
const rootWithSep = workdir.endsWith(
|
|
102565
|
+
const abs = path24.resolve(workdir, rel);
|
|
102566
|
+
const rootWithSep = workdir.endsWith(path24.sep) ? workdir : workdir + path24.sep;
|
|
102558
102567
|
if (abs !== workdir && !abs.startsWith(rootWithSep)) {
|
|
102559
102568
|
logger?.warn("execution", "Skipping story workdir outside repo root", {
|
|
102560
102569
|
storyId,
|
|
@@ -103008,9 +103017,9 @@ function parseSchedule(input, now2) {
|
|
|
103008
103017
|
const trimmed = input.trim();
|
|
103009
103018
|
if (trimmed === "")
|
|
103010
103019
|
return { ok: false, error: `Empty schedule value. ${ACCEPTED}` };
|
|
103011
|
-
const
|
|
103012
|
-
if (
|
|
103013
|
-
return
|
|
103020
|
+
const relative17 = parseRelative(trimmed, now2);
|
|
103021
|
+
if (relative17)
|
|
103022
|
+
return relative17;
|
|
103014
103023
|
const timeOfDay = parseTimeOfDay(trimmed, now2);
|
|
103015
103024
|
if (timeOfDay)
|
|
103016
103025
|
return timeOfDay;
|
|
@@ -107841,8 +107850,8 @@ function Text({ color, backgroundColor, dimColor = false, bold = false, italic =
|
|
|
107841
107850
|
}
|
|
107842
107851
|
|
|
107843
107852
|
// node_modules/ink/build/components/ErrorOverview.js
|
|
107844
|
-
var cleanupPath = (
|
|
107845
|
-
return
|
|
107853
|
+
var cleanupPath = (path30) => {
|
|
107854
|
+
return path30?.replace(`file://${cwd()}/`, "");
|
|
107846
107855
|
};
|
|
107847
107856
|
var stackUtils = new import_stack_utils.default({
|
|
107848
107857
|
cwd: cwd(),
|
|
@@ -111628,8 +111637,8 @@ configProfileCmd.command("current").description("Show the currently active profi
|
|
|
111628
111637
|
});
|
|
111629
111638
|
configProfileCmd.command("create <name>").description("Create a new empty profile").option("-d, --dir <path>", "Project directory", process.cwd()).action(async (name, options) => {
|
|
111630
111639
|
try {
|
|
111631
|
-
const
|
|
111632
|
-
console.log(`Created profile at: ${
|
|
111640
|
+
const path30 = await profileCreateCommand(name, options.dir);
|
|
111641
|
+
console.log(`Created profile at: ${path30}`);
|
|
111633
111642
|
} catch (err) {
|
|
111634
111643
|
console.error(source_default.red(`Error: ${err.message}`));
|
|
111635
111644
|
process.exit(1);
|