@topogram/cli 0.3.69 → 0.3.71
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/package.json +1 -1
- package/src/agent-brief.js +20 -11
- package/src/cli/commands/import/adopt.js +2 -0
- package/src/cli/commands/import/check.js +4 -2
- package/src/cli/commands/import/diff.js +1 -0
- package/src/cli/commands/import/plan.js +2 -0
- package/src/cli/commands/import/refresh.js +2 -1
- package/src/cli/commands/import/status-history.js +5 -1
- package/src/cli/commands/import/workspace.js +2 -1
- package/src/cli/commands/template/check.js +1 -1
- package/src/new-project/create.js +1 -7
- package/src/new-project/project-files.js +3 -3
- package/src/new-project/template-resolution.js +3 -3
- package/src/workspace-paths.js +2 -6
package/package.json
CHANGED
package/src/agent-brief.js
CHANGED
|
@@ -28,7 +28,7 @@ import { DEFAULT_TOPO_FOLDER_NAME, resolveTopoRoot, resolveWorkspaceContext } fr
|
|
|
28
28
|
* @typedef {{ path: string, ownership: string, rule: string }} AgentBriefOutputBoundary
|
|
29
29
|
* @typedef {{ id: string, title: string, commands: string[], rule: string }} AgentBriefWorkflow
|
|
30
30
|
* @typedef {{ id: string, kind: string, projection: string|null, generator: string|null, uses_api: string|null, uses_database: string|null }} AgentBriefRuntime
|
|
31
|
-
* @typedef {{ path: string, source: string|null, tracks: string[], candidateCounts: Record<string, any>, ownership: string|null }} AgentBriefImport
|
|
31
|
+
* @typedef {{ path: string, workspaceRoot: string, source: string|null, tracks: string[], candidateCounts: Record<string, any>, ownership: string|null }} AgentBriefImport
|
|
32
32
|
* @typedef {{ ok: true, payload: Record<string, any> } | { ok: false, kind: "topogram", validation: any } | { ok: false, kind: "project", validation: any, configPath: string }} AgentBriefResult
|
|
33
33
|
*/
|
|
34
34
|
|
|
@@ -137,6 +137,7 @@ function readImportSummary(projectRoot) {
|
|
|
137
137
|
const record = JSON.parse(fs.readFileSync(importPath, "utf8"));
|
|
138
138
|
return {
|
|
139
139
|
path: TOPOGRAM_IMPORT_FILE,
|
|
140
|
+
workspaceRoot: resolveTopoRoot(projectRoot),
|
|
140
141
|
source: typeof record?.source?.path === "string" ? record.source.path : null,
|
|
141
142
|
tracks: Array.isArray(record?.import?.tracks) ? record.import.tracks.map(String) : [],
|
|
142
143
|
candidateCounts: record?.import?.candidateCounts && typeof record.import.candidateCounts === "object"
|
|
@@ -147,6 +148,7 @@ function readImportSummary(projectRoot) {
|
|
|
147
148
|
} catch (error) {
|
|
148
149
|
return {
|
|
149
150
|
path: TOPOGRAM_IMPORT_FILE,
|
|
151
|
+
workspaceRoot: resolveTopoRoot(projectRoot),
|
|
150
152
|
source: null,
|
|
151
153
|
tracks: [],
|
|
152
154
|
candidateCounts: {},
|
|
@@ -215,13 +217,13 @@ function buildWorkflows(config, hasImportRecord) {
|
|
|
215
217
|
id: "brownfield-import",
|
|
216
218
|
title: "Brownfield import adoption loop",
|
|
217
219
|
commands: [
|
|
218
|
-
"topogram import check .",
|
|
219
|
-
"topogram import plan .",
|
|
220
|
-
"topogram import adopt --list .",
|
|
221
|
-
"topogram import status .",
|
|
222
|
-
"topogram import history . --verify"
|
|
220
|
+
"topogram import check . --json",
|
|
221
|
+
"topogram import plan . --json",
|
|
222
|
+
"topogram import adopt --list . --json",
|
|
223
|
+
"topogram import status . --json",
|
|
224
|
+
"topogram import history . --verify --json"
|
|
223
225
|
],
|
|
224
|
-
rule: "Imported Topogram files are editable after adoption;
|
|
226
|
+
rule: "Imported Topogram files are editable after adoption; JSON automation should read workspaceRoot for the project-owned workspace path."
|
|
225
227
|
});
|
|
226
228
|
}
|
|
227
229
|
return workflows;
|
|
@@ -338,10 +340,11 @@ export function buildAgentBrief(inputPath, workspaceAst) {
|
|
|
338
340
|
commandItem("npm run generate", "Write generated-owned runtime/app outputs after validation.", "write"),
|
|
339
341
|
commandItem("npm run verify", "Run generated output verification.", "verify"),
|
|
340
342
|
...(importSummary ? [
|
|
341
|
-
commandItem("topogram import check .", "Validate imported workspace provenance.", "import"),
|
|
342
|
-
commandItem("topogram import plan .", "Review import adoption plan.", "import"),
|
|
343
|
-
commandItem("topogram import adopt --list .", "List reviewable adoption selectors.", "import"),
|
|
344
|
-
commandItem("topogram import
|
|
343
|
+
commandItem("topogram import check . --json", "Validate imported workspace provenance and read workspaceRoot.", "import"),
|
|
344
|
+
commandItem("topogram import plan . --json", "Review import adoption plan and workspaceRoot.", "import"),
|
|
345
|
+
commandItem("topogram import adopt --list . --json", "List reviewable adoption selectors.", "import"),
|
|
346
|
+
commandItem("topogram import status . --json", "Check import/adoption status.", "import"),
|
|
347
|
+
commandItem("topogram import history . --verify --json", "Verify import history evidence.", "import")
|
|
345
348
|
] : [])
|
|
346
349
|
];
|
|
347
350
|
|
|
@@ -461,6 +464,12 @@ export function formatAgentBrief(brief) {
|
|
|
461
464
|
for (const workflow of brief.workflows || []) {
|
|
462
465
|
lines.push(` - ${workflow.title}: ${workflow.rule}`);
|
|
463
466
|
}
|
|
467
|
+
if (brief.import?.workspaceRoot) {
|
|
468
|
+
lines.push("");
|
|
469
|
+
lines.push("Import:");
|
|
470
|
+
lines.push(` - Workspace root: ${brief.import.workspaceRoot}`);
|
|
471
|
+
lines.push(" - JSON import commands expose workspaceRoot; prefer it over compatibility fields.");
|
|
472
|
+
}
|
|
464
473
|
lines.push("");
|
|
465
474
|
lines.push("Verification gates:");
|
|
466
475
|
lines.push(" - npm run check");
|
|
@@ -50,6 +50,7 @@ export function buildImportAdoptionReceipt({ artifacts, selector, options, impor
|
|
|
50
50
|
version: readInstalledCliPackageVersion()
|
|
51
51
|
},
|
|
52
52
|
projectRoot: artifacts.projectRoot,
|
|
53
|
+
workspaceRoot: artifacts.topogramRoot,
|
|
53
54
|
topogramRoot: artifacts.topogramRoot,
|
|
54
55
|
selector,
|
|
55
56
|
mode: "write",
|
|
@@ -114,6 +115,7 @@ export function buildBrownfieldImportAdoptPayload(selector, inputPath, options =
|
|
|
114
115
|
return {
|
|
115
116
|
ok: true,
|
|
116
117
|
projectRoot: artifacts.projectRoot,
|
|
118
|
+
workspaceRoot: artifacts.topogramRoot,
|
|
117
119
|
topogramRoot: artifacts.topogramRoot,
|
|
118
120
|
selector,
|
|
119
121
|
dryRun: !options.write,
|
|
@@ -12,7 +12,8 @@ import { buildTopogramImportStatus } from "../../../import/provenance.js";
|
|
|
12
12
|
import {
|
|
13
13
|
checkSummaryPayload,
|
|
14
14
|
combineProjectValidationResults,
|
|
15
|
-
normalizeProjectRoot
|
|
15
|
+
normalizeProjectRoot,
|
|
16
|
+
normalizeTopogramPath
|
|
16
17
|
} from "./paths.js";
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -39,7 +40,7 @@ export function buildTopogramCheckPayloadForPath(inputPath) {
|
|
|
39
40
|
|
|
40
41
|
/**
|
|
41
42
|
* @param {string} projectRoot
|
|
42
|
-
* @returns {{ ok: boolean, projectRoot: string, import: ReturnType<typeof buildTopogramImportStatus>, topogram: ReturnType<typeof buildTopogramCheckPayloadForPath>, errors: any[] }}
|
|
43
|
+
* @returns {{ ok: boolean, projectRoot: string, workspaceRoot: string, import: ReturnType<typeof buildTopogramImportStatus>, topogram: ReturnType<typeof buildTopogramCheckPayloadForPath>, errors: any[] }}
|
|
43
44
|
*/
|
|
44
45
|
export function buildBrownfieldImportCheckPayload(projectRoot) {
|
|
45
46
|
const resolvedRoot = normalizeProjectRoot(projectRoot);
|
|
@@ -48,6 +49,7 @@ export function buildBrownfieldImportCheckPayload(projectRoot) {
|
|
|
48
49
|
return {
|
|
49
50
|
ok: importStatus.ok && topogramCheck.ok,
|
|
50
51
|
projectRoot: resolvedRoot,
|
|
52
|
+
workspaceRoot: normalizeTopogramPath(resolvedRoot),
|
|
51
53
|
import: importStatus,
|
|
52
54
|
topogram: topogramCheck,
|
|
53
55
|
errors: [
|
|
@@ -17,6 +17,7 @@ export function buildBrownfieldImportDiffPayload(inputPath, options = {}) {
|
|
|
17
17
|
return {
|
|
18
18
|
ok: true,
|
|
19
19
|
projectRoot: analysis.projectRoot,
|
|
20
|
+
workspaceRoot: analysis.topogramRoot,
|
|
20
21
|
topogramRoot: analysis.topogramRoot,
|
|
21
22
|
sourcePath: analysis.sourcePath,
|
|
22
23
|
provenancePath: analysis.provenancePath,
|
|
@@ -191,6 +191,7 @@ export function buildBrownfieldImportPlanPayload(inputPath) {
|
|
|
191
191
|
return {
|
|
192
192
|
ok: true,
|
|
193
193
|
projectRoot: artifacts.projectRoot,
|
|
194
|
+
workspaceRoot: artifacts.topogramRoot,
|
|
194
195
|
topogramRoot: artifacts.topogramRoot,
|
|
195
196
|
artifacts: {
|
|
196
197
|
adoptionPlan: artifacts.paths.adoptionPlanAgent,
|
|
@@ -254,6 +255,7 @@ export function buildBrownfieldImportAdoptListPayload(inputPath) {
|
|
|
254
255
|
return {
|
|
255
256
|
ok: true,
|
|
256
257
|
projectRoot: plan.projectRoot,
|
|
258
|
+
workspaceRoot: plan.topogramRoot,
|
|
257
259
|
topogramRoot: plan.topogramRoot,
|
|
258
260
|
selectorCount: selectors.length,
|
|
259
261
|
selectors,
|
|
@@ -354,7 +354,7 @@ export function buildBrownfieldImportRefreshAnalysis(inputPath, options = {}) {
|
|
|
354
354
|
/**
|
|
355
355
|
* @param {string} inputPath
|
|
356
356
|
* @param {{ sourcePath?: string|null, dryRun?: boolean }} [options]
|
|
357
|
-
* @returns {{ ok: boolean, dryRun: boolean, projectRoot: string, topogramRoot: string, sourcePath: string, provenancePath: string, previousImportStatus: string, currentImportStatus: string, tracks: string[], sourceFiles: number, sourceDiff: Record<string, any>, removedCandidateFiles: Record<string, number>, rawCandidateFiles: number, reconcileFiles: number, writtenFiles: string[], plannedFiles: string[], candidateCounts: Record<string, number>, candidateCountDeltas: Record<string, any>, adoptionPlanDeltas: Record<string, any>, receiptVerification: Record<string, any>, refreshMetadata: Record<string, any>|null, nextCommands: string[] }}
|
|
357
|
+
* @returns {{ ok: boolean, dryRun: boolean, projectRoot: string, workspaceRoot: string, topogramRoot: string, sourcePath: string, provenancePath: string, previousImportStatus: string, currentImportStatus: string, tracks: string[], sourceFiles: number, sourceDiff: Record<string, any>, removedCandidateFiles: Record<string, number>, rawCandidateFiles: number, reconcileFiles: number, writtenFiles: string[], plannedFiles: string[], candidateCounts: Record<string, number>, candidateCountDeltas: Record<string, any>, adoptionPlanDeltas: Record<string, any>, receiptVerification: Record<string, any>, refreshMetadata: Record<string, any>|null, nextCommands: string[] }}
|
|
358
358
|
*/
|
|
359
359
|
export function buildBrownfieldImportRefreshPayload(inputPath, options = {}) {
|
|
360
360
|
const analysis = buildBrownfieldImportRefreshAnalysis(inputPath, options);
|
|
@@ -405,6 +405,7 @@ export function buildBrownfieldImportRefreshPayload(inputPath, options = {}) {
|
|
|
405
405
|
ok: dryRun || currentImportStatus === "clean",
|
|
406
406
|
dryRun,
|
|
407
407
|
projectRoot: analysis.projectRoot,
|
|
408
|
+
workspaceRoot: analysis.topogramRoot,
|
|
408
409
|
topogramRoot: analysis.topogramRoot,
|
|
409
410
|
sourcePath: analysis.sourcePath,
|
|
410
411
|
provenancePath,
|
|
@@ -31,6 +31,7 @@ export function buildBrownfieldImportStatusPayload(inputPath) {
|
|
|
31
31
|
return {
|
|
32
32
|
ok: importCheck.ok,
|
|
33
33
|
projectRoot: artifacts.projectRoot,
|
|
34
|
+
workspaceRoot: artifacts.topogramRoot,
|
|
34
35
|
topogramRoot: artifacts.topogramRoot,
|
|
35
36
|
import: importCheck.import,
|
|
36
37
|
topogram: importCheck.topogram,
|
|
@@ -144,6 +145,7 @@ export function verifyImportAdoptionReceipts(projectRoot, receipts) {
|
|
|
144
145
|
*/
|
|
145
146
|
export function buildBrownfieldImportHistoryPayload(inputPath, options = {}) {
|
|
146
147
|
const projectRoot = normalizeProjectRoot(inputPath);
|
|
148
|
+
const workspaceRoot = normalizeTopogramPath(projectRoot);
|
|
147
149
|
const historyPath = importAdoptionsPath(projectRoot);
|
|
148
150
|
const receipts = readImportAdoptionReceipts(projectRoot);
|
|
149
151
|
const forcedWrites = receipts.filter((receipt) => receipt.forced);
|
|
@@ -151,6 +153,7 @@ export function buildBrownfieldImportHistoryPayload(inputPath, options = {}) {
|
|
|
151
153
|
return {
|
|
152
154
|
ok: true,
|
|
153
155
|
projectRoot,
|
|
156
|
+
workspaceRoot,
|
|
154
157
|
path: historyPath,
|
|
155
158
|
exists: fs.existsSync(historyPath),
|
|
156
159
|
verified: Boolean(options.verify),
|
|
@@ -162,7 +165,8 @@ export function buildBrownfieldImportHistoryPayload(inputPath, options = {}) {
|
|
|
162
165
|
lastSelector: receipts[receipts.length - 1]?.selector || null
|
|
163
166
|
},
|
|
164
167
|
verification,
|
|
165
|
-
receipts
|
|
168
|
+
receipts,
|
|
169
|
+
entries: receipts
|
|
166
170
|
};
|
|
167
171
|
}
|
|
168
172
|
|
|
@@ -145,7 +145,7 @@ export function countFilesRecursive(rootPath) {
|
|
|
145
145
|
* @param {string} sourcePath
|
|
146
146
|
* @param {string} targetPath
|
|
147
147
|
* @param {{ from?: string|null }} [options]
|
|
148
|
-
* @returns {{ ok: boolean, sourcePath: string, targetPath: string, topogramRoot: string, projectConfigPath: string, provenancePath: string, tracks: string[], sourceFiles: number, rawCandidateFiles: number, reconcileFiles: number, writtenFiles: string[], candidateCounts: Record<string, number>, nextCommands: string[] }}
|
|
148
|
+
* @returns {{ ok: boolean, sourcePath: string, targetPath: string, workspaceRoot: string, topogramRoot: string, projectConfigPath: string, provenancePath: string, tracks: string[], sourceFiles: number, rawCandidateFiles: number, reconcileFiles: number, writtenFiles: string[], candidateCounts: Record<string, number>, nextCommands: string[] }}
|
|
149
149
|
*/
|
|
150
150
|
export function buildBrownfieldImportWorkspacePayload(sourcePath, targetPath, options = {}) {
|
|
151
151
|
const sourceRoot = path.resolve(sourcePath);
|
|
@@ -190,6 +190,7 @@ export function buildBrownfieldImportWorkspacePayload(sourcePath, targetPath, op
|
|
|
190
190
|
ok: true,
|
|
191
191
|
sourcePath: sourceRoot,
|
|
192
192
|
targetPath: targetRoot,
|
|
193
|
+
workspaceRoot: topogramRoot,
|
|
193
194
|
topogramRoot,
|
|
194
195
|
projectConfigPath,
|
|
195
196
|
provenancePath: provenance.path,
|
|
@@ -92,7 +92,7 @@ function diagnosticForTemplateCreateFailure(message, templateSpec, step) {
|
|
|
92
92
|
step
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
if (message.includes("is missing topo/")
|
|
95
|
+
if (message.includes("is missing topo/")) {
|
|
96
96
|
return templateCheckDiagnostic({
|
|
97
97
|
code: "template_topogram_missing",
|
|
98
98
|
message,
|
|
@@ -53,7 +53,7 @@ export function createNewProject({
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
ensureCreatableProjectRoot(projectRoot);
|
|
56
|
-
|
|
56
|
+
copyTopogramWorkspace(template.root, projectRoot);
|
|
57
57
|
const projectConfig = writeProjectTemplateMetadata(projectRoot, template, templateProvenance);
|
|
58
58
|
writeProjectPackage(projectRoot, engineRoot, template);
|
|
59
59
|
writeExplainScript(projectRoot);
|
|
@@ -64,12 +64,6 @@ export function createNewProject({
|
|
|
64
64
|
writeGeneratorPolicy(projectRoot, defaultGeneratorPolicy());
|
|
65
65
|
|
|
66
66
|
const warnings = [];
|
|
67
|
-
if (workspaceCopy.legacyWorkspace) {
|
|
68
|
-
warnings.push(
|
|
69
|
-
`Template '${template.manifest.id}' still ships legacy topogram/ source. Copied it into this project as ${DEFAULT_TOPO_FOLDER_NAME}/. ` +
|
|
70
|
-
"This one-release package-ingress bridge will be removed after first-party packages migrate."
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
67
|
if (template.manifest.includesExecutableImplementation) {
|
|
74
68
|
writeTemplateTrustRecord(projectRoot, projectConfig);
|
|
75
69
|
warnings.push(
|
|
@@ -55,7 +55,7 @@ export function ensureCreatableProjectRoot(projectRoot) {
|
|
|
55
55
|
/**
|
|
56
56
|
* @param {string} templateRoot
|
|
57
57
|
* @param {string} projectRoot
|
|
58
|
-
* @returns {
|
|
58
|
+
* @returns {void}
|
|
59
59
|
*/
|
|
60
60
|
export function copyTopogramWorkspace(templateRoot, projectRoot) {
|
|
61
61
|
const templateWorkspace = resolvePackageWorkspace(templateRoot);
|
|
@@ -74,7 +74,6 @@ export function copyTopogramWorkspace(templateRoot, projectRoot) {
|
|
|
74
74
|
{ recursive: true }
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
|
-
return { legacyWorkspace: templateWorkspace.legacy };
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
/**
|
|
@@ -336,7 +335,8 @@ npm run query:show -- widget-behavior
|
|
|
336
335
|
${hasImplementation ? "- This project has executable `implementation/` code. `topogram new` did not execute it. Do not refresh trust until the implementation has been reviewed.\n" : "- This template does not declare executable implementation code.\n"}
|
|
337
336
|
## Import And Adoption
|
|
338
337
|
|
|
339
|
-
- If \`.topogram-import.json\` exists, run \`topogram import check
|
|
338
|
+
- If \`.topogram-import.json\` exists, agents should run \`topogram import check . --json\`, \`topogram import plan . --json\`, \`topogram import adopt --list . --json\`, \`topogram import status . --json\`, and \`topogram import history . --verify --json\`.
|
|
339
|
+
- Import JSON payloads expose \`workspaceRoot\`; prefer it as the canonical project-owned workspace path.
|
|
340
340
|
- Imported Topogram files are project-owned after adoption; source hashes record trusted import evidence at the time of import.
|
|
341
341
|
|
|
342
342
|
## Verification Gates
|
|
@@ -6,7 +6,7 @@ import os from "node:os";
|
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
|
|
8
8
|
import { assertSafeNpmSpec, localNpmrcEnv } from "../npm-safety.js";
|
|
9
|
-
import { DEFAULT_TOPO_FOLDER_NAME,
|
|
9
|
+
import { DEFAULT_TOPO_FOLDER_NAME, resolvePackageWorkspace } from "../workspace-paths.js";
|
|
10
10
|
import { GENERATOR_LABELS, SURFACE_ORDER, TEMPLATE_MANIFEST, unsupportedTemplateSymlinkMessage } from "./constants.js";
|
|
11
11
|
import { isLocalTemplateSpec, packageNameFromSpec } from "./package-spec.js";
|
|
12
12
|
|
|
@@ -111,7 +111,7 @@ export function validateTemplateRoot(templateRoot) {
|
|
|
111
111
|
const topogramRoot = workspace.root;
|
|
112
112
|
const projectConfigPath = path.join(templateRoot, "topogram.project.json");
|
|
113
113
|
if (fs.existsSync(topogramRoot) && fs.lstatSync(topogramRoot).isSymbolicLink()) {
|
|
114
|
-
throw new Error(unsupportedTemplateSymlinkMessage(manifest.id,
|
|
114
|
+
throw new Error(unsupportedTemplateSymlinkMessage(manifest.id, DEFAULT_TOPO_FOLDER_NAME));
|
|
115
115
|
}
|
|
116
116
|
if (fs.existsSync(projectConfigPath) && fs.lstatSync(projectConfigPath).isSymbolicLink()) {
|
|
117
117
|
throw new Error(unsupportedTemplateSymlinkMessage(manifest.id, "topogram.project.json"));
|
|
@@ -122,7 +122,7 @@ export function validateTemplateRoot(templateRoot) {
|
|
|
122
122
|
if (!fs.existsSync(projectConfigPath) || !fs.statSync(projectConfigPath).isFile()) {
|
|
123
123
|
throw new Error(`Template '${manifest.id}' is missing topogram.project.json.`);
|
|
124
124
|
}
|
|
125
|
-
assertTemplateTreeHasNoSymlinks(templateRoot, topogramRoot,
|
|
125
|
+
assertTemplateTreeHasNoSymlinks(templateRoot, topogramRoot, DEFAULT_TOPO_FOLDER_NAME, manifest.id);
|
|
126
126
|
if (manifest.includesExecutableImplementation) {
|
|
127
127
|
const implementationRoot = path.join(templateRoot, "implementation");
|
|
128
128
|
if (fs.existsSync(implementationRoot) && fs.lstatSync(implementationRoot).isSymbolicLink()) {
|
package/src/workspace-paths.js
CHANGED
|
@@ -313,16 +313,12 @@ export function resolveTopoRoot(inputPath = ".") {
|
|
|
313
313
|
|
|
314
314
|
/**
|
|
315
315
|
* @param {string} packageRoot
|
|
316
|
-
* @returns {{ root: string
|
|
316
|
+
* @returns {{ root: string }}
|
|
317
317
|
*/
|
|
318
318
|
export function resolvePackageWorkspace(packageRoot) {
|
|
319
319
|
const topoRoot = path.join(packageRoot, DEFAULT_TOPO_FOLDER_NAME);
|
|
320
320
|
if (isDirectory(topoRoot)) {
|
|
321
|
-
return { root: topoRoot
|
|
322
|
-
}
|
|
323
|
-
const legacyRoot = path.join(packageRoot, LEGACY_TOPOGRAM_FOLDER_NAME);
|
|
324
|
-
if (isDirectory(legacyRoot)) {
|
|
325
|
-
return { root: legacyRoot, legacy: true };
|
|
321
|
+
return { root: topoRoot };
|
|
326
322
|
}
|
|
327
323
|
throw new Error(`Package is missing ${DEFAULT_TOPO_FOLDER_NAME}/.`);
|
|
328
324
|
}
|