@principal-ai/principal-view-cli 0.8.1 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +12 -15
- package/dist/index.cjs +19 -26
- package/dist/index.cjs.map +2 -2
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoLpC,wBAAgB,mBAAmB,IAAI,OAAO,
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoLpC,wBAAgB,mBAAmB,IAAI,OAAO,CA6L7C"}
|
package/dist/commands/doctor.js
CHANGED
|
@@ -160,20 +160,13 @@ export function createDoctorCommand() {
|
|
|
160
160
|
absolute: true,
|
|
161
161
|
ignore: ['README.md'],
|
|
162
162
|
});
|
|
163
|
-
|
|
164
|
-
if (options.json) {
|
|
165
|
-
console.log(JSON.stringify({ error: 'No config files found in .principal-views', results: [] }));
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
console.log(chalk.yellow('No configuration files found in .principal-views/'));
|
|
169
|
-
}
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
// Check each config
|
|
163
|
+
// Check each config (if any)
|
|
173
164
|
const results = [];
|
|
174
|
-
|
|
175
|
-
const
|
|
176
|
-
|
|
165
|
+
if (configFiles.length > 0) {
|
|
166
|
+
for (const configFile of configFiles) {
|
|
167
|
+
const result = await checkConfig(configFile, projectRoot);
|
|
168
|
+
results.push(result);
|
|
169
|
+
}
|
|
177
170
|
}
|
|
178
171
|
// Aggregate stats
|
|
179
172
|
const totalStats = results.reduce((acc, r) => ({
|
|
@@ -212,9 +205,13 @@ export function createDoctorCommand() {
|
|
|
212
205
|
}, null, 2));
|
|
213
206
|
}
|
|
214
207
|
else {
|
|
215
|
-
if (!options.quiet && !options.errorsOnly) {
|
|
208
|
+
if (!options.quiet && !options.errorsOnly && results.length > 0) {
|
|
216
209
|
console.log(chalk.bold(`\nChecking ${results.length} configuration file(s)...\n`));
|
|
217
210
|
}
|
|
211
|
+
if (results.length === 0 && !options.quiet && !options.errorsOnly) {
|
|
212
|
+
console.log(chalk.yellow('No YAML configuration files found in .principal-views/'));
|
|
213
|
+
console.log(chalk.dim('Checking file structure...\n'));
|
|
214
|
+
}
|
|
218
215
|
for (const result of results) {
|
|
219
216
|
const issues = filterIssues(result.issues);
|
|
220
217
|
if (issues.length === 0 && !options.quiet && !options.errorsOnly) {
|
|
@@ -264,7 +261,7 @@ export function createDoctorCommand() {
|
|
|
264
261
|
}
|
|
265
262
|
}
|
|
266
263
|
// Summary
|
|
267
|
-
if (!options.errorsOnly) {
|
|
264
|
+
if (!options.errorsOnly && results.length > 0) {
|
|
268
265
|
console.log(chalk.dim('\n' + '─'.repeat(50)));
|
|
269
266
|
console.log(chalk.dim(`Checked ${totalStats.nodeTypesChecked} node types, ` +
|
|
270
267
|
`${totalStats.patternsChecked} patterns, ` +
|
package/dist/index.cjs
CHANGED
|
@@ -241987,7 +241987,7 @@ var CanvasDiscovery = class _CanvasDiscovery {
|
|
|
241987
241987
|
const canvases = await this.discoverCanvasFiles(fileTree, packageMap, options, errors);
|
|
241988
241988
|
const executions = await this.discoverExecutionFiles(fileTree, packageMap, options, errors);
|
|
241989
241989
|
const storyboards = await this.discoverStoryboards(fileTree, packageMap, canvases, executions, options, errors);
|
|
241990
|
-
this.detectLegacyStructures(canvases, executions, storyboards,
|
|
241990
|
+
this.detectLegacyStructures(canvases, executions, storyboards, errors);
|
|
241991
241991
|
canvases.sort(this.compareByPackageThenName);
|
|
241992
241992
|
executions.sort(this.compareByPackageThenName);
|
|
241993
241993
|
storyboards.sort(this.compareByPackageThenName);
|
|
@@ -242038,9 +242038,8 @@ var CanvasDiscovery = class _CanvasDiscovery {
|
|
|
242038
242038
|
}
|
|
242039
242039
|
storyboardDirs.get(storyboardPath).add(storyboardName);
|
|
242040
242040
|
}
|
|
242041
|
-
for (const [
|
|
242041
|
+
for (const [storyboardPath, storyboardNames] of storyboardDirs) {
|
|
242042
242042
|
for (const storyboardName of storyboardNames) {
|
|
242043
|
-
const storyboardPath = `${storyboardParentPath}/${storyboardName}`;
|
|
242044
242043
|
if (storyboardName === _CanvasDiscovery.EXECUTIONS_DIR)
|
|
242045
242044
|
continue;
|
|
242046
242045
|
const storyboardCanvas = canvases.find((c) => {
|
|
@@ -242328,9 +242327,9 @@ var CanvasDiscovery = class _CanvasDiscovery {
|
|
|
242328
242327
|
return a.name.localeCompare(b.name);
|
|
242329
242328
|
}
|
|
242330
242329
|
/**
|
|
242331
|
-
* Detect legacy flat structures and add deprecation
|
|
242330
|
+
* Detect legacy flat structures and add deprecation errors
|
|
242332
242331
|
*/
|
|
242333
|
-
detectLegacyStructures(canvases, executions, storyboards,
|
|
242332
|
+
detectLegacyStructures(canvases, executions, storyboards, errors) {
|
|
242334
242333
|
const storyboardCanvasIds = new Set(storyboards.map((s) => s.canvas.id));
|
|
242335
242334
|
const storyboardExecutionIds = /* @__PURE__ */ new Set();
|
|
242336
242335
|
for (const storyboard of storyboards) {
|
|
@@ -242346,10 +242345,9 @@ var CanvasDiscovery = class _CanvasDiscovery {
|
|
|
242346
242345
|
const parts = canvasDir.split("/");
|
|
242347
242346
|
const pvIndex = parts.indexOf(_CanvasDiscovery.CANVAS_DIR);
|
|
242348
242347
|
if (pvIndex !== -1 && parts.length === pvIndex + 1) {
|
|
242349
|
-
|
|
242348
|
+
errors.push({
|
|
242350
242349
|
path: canvas.path,
|
|
242351
|
-
|
|
242352
|
-
type: "deprecation"
|
|
242350
|
+
error: "DEPRECATED: Legacy flat canvas structure is no longer supported. Migrate to the storyboard structure immediately. See migration guide at docs/MIGRATION_GUIDE.md for details."
|
|
242353
242351
|
});
|
|
242354
242352
|
}
|
|
242355
242353
|
}
|
|
@@ -242357,10 +242355,9 @@ var CanvasDiscovery = class _CanvasDiscovery {
|
|
|
242357
242355
|
for (const execution of executions) {
|
|
242358
242356
|
if (!storyboardExecutionIds.has(execution.id)) {
|
|
242359
242357
|
if (execution.path.includes(`/${_CanvasDiscovery.EXECUTIONS_DIR}/`)) {
|
|
242360
|
-
|
|
242358
|
+
errors.push({
|
|
242361
242359
|
path: execution.path,
|
|
242362
|
-
|
|
242363
|
-
type: "deprecation"
|
|
242360
|
+
error: "DEPRECATED: Legacy __executions__/ directory is no longer supported. Migrate executions to workflow folders within storyboards immediately. See migration guide at docs/MIGRATION_GUIDE.md for details."
|
|
242364
242361
|
});
|
|
242365
242362
|
}
|
|
242366
242363
|
}
|
|
@@ -248720,20 +248717,12 @@ function createDoctorCommand() {
|
|
|
248720
248717
|
absolute: true,
|
|
248721
248718
|
ignore: ["README.md"]
|
|
248722
248719
|
});
|
|
248723
|
-
if (configFiles.length === 0) {
|
|
248724
|
-
if (options.json) {
|
|
248725
|
-
console.log(
|
|
248726
|
-
JSON.stringify({ error: "No config files found in .principal-views", results: [] })
|
|
248727
|
-
);
|
|
248728
|
-
} else {
|
|
248729
|
-
console.log(source_default.yellow("No configuration files found in .principal-views/"));
|
|
248730
|
-
}
|
|
248731
|
-
return;
|
|
248732
|
-
}
|
|
248733
248720
|
const results = [];
|
|
248734
|
-
|
|
248735
|
-
const
|
|
248736
|
-
|
|
248721
|
+
if (configFiles.length > 0) {
|
|
248722
|
+
for (const configFile of configFiles) {
|
|
248723
|
+
const result = await checkConfig(configFile, projectRoot);
|
|
248724
|
+
results.push(result);
|
|
248725
|
+
}
|
|
248737
248726
|
}
|
|
248738
248727
|
const totalStats = results.reduce(
|
|
248739
248728
|
(acc, r) => ({
|
|
@@ -248776,11 +248765,15 @@ function createDoctorCommand() {
|
|
|
248776
248765
|
)
|
|
248777
248766
|
);
|
|
248778
248767
|
} else {
|
|
248779
|
-
if (!options.quiet && !options.errorsOnly) {
|
|
248768
|
+
if (!options.quiet && !options.errorsOnly && results.length > 0) {
|
|
248780
248769
|
console.log(source_default.bold(`
|
|
248781
248770
|
Checking ${results.length} configuration file(s)...
|
|
248782
248771
|
`));
|
|
248783
248772
|
}
|
|
248773
|
+
if (results.length === 0 && !options.quiet && !options.errorsOnly) {
|
|
248774
|
+
console.log(source_default.yellow("No YAML configuration files found in .principal-views/"));
|
|
248775
|
+
console.log(source_default.dim("Checking file structure...\n"));
|
|
248776
|
+
}
|
|
248784
248777
|
for (const result of results) {
|
|
248785
248778
|
const issues = filterIssues(result.issues);
|
|
248786
248779
|
if (issues.length === 0 && !options.quiet && !options.errorsOnly) {
|
|
@@ -248826,7 +248819,7 @@ Checking ${results.length} configuration file(s)...
|
|
|
248826
248819
|
} catch (error) {
|
|
248827
248820
|
}
|
|
248828
248821
|
}
|
|
248829
|
-
if (!options.errorsOnly) {
|
|
248822
|
+
if (!options.errorsOnly && results.length > 0) {
|
|
248830
248823
|
console.log(source_default.dim("\n" + "\u2500".repeat(50)));
|
|
248831
248824
|
console.log(
|
|
248832
248825
|
source_default.dim(
|