@principal-ai/principal-view-cli 0.1.16 → 0.1.17
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/init.d.ts.map +1 -1
- package/dist/commands/init.js +16 -18
- package/dist/index.cjs +16 -18
- package/dist/index.cjs.map +2 -2
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkIpC,wBAAgB,iBAAiB,IAAI,OAAO,CAoK3C"}
|
package/dist/commands/init.js
CHANGED
|
@@ -49,31 +49,29 @@ rules:
|
|
|
49
49
|
|
|
50
50
|
# Structure rules - ensure completeness
|
|
51
51
|
minimum-node-sources:
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
severity: error
|
|
53
|
+
options:
|
|
54
|
+
minimum: 1
|
|
54
55
|
excludeNodeTypes: []
|
|
55
56
|
orphaned-node-types: error
|
|
56
57
|
orphaned-edge-types: error
|
|
57
58
|
unreachable-states: error
|
|
58
|
-
dead-end-states:
|
|
59
|
-
- error
|
|
60
|
-
- allowTerminalStates: true
|
|
59
|
+
dead-end-states: error
|
|
61
60
|
|
|
62
61
|
# Pattern rules - validate regex patterns
|
|
63
62
|
valid-action-patterns:
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
severity: error
|
|
64
|
+
options:
|
|
65
|
+
strictMode: false
|
|
66
66
|
|
|
67
67
|
# Library rules - check against component library
|
|
68
68
|
library-node-type-match:
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
severity: error
|
|
70
|
+
options:
|
|
71
|
+
allowExtra: true
|
|
71
72
|
`;
|
|
72
|
-
const HUSKY_PRE_COMMIT =
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
# Run principal view linting on staged .principal-views files
|
|
76
|
-
privu lint --quiet
|
|
73
|
+
const HUSKY_PRE_COMMIT = `# Run principal view linting on staged .principal-views files
|
|
74
|
+
npx @principal-ai/principal-view-cli lint --quiet
|
|
77
75
|
`;
|
|
78
76
|
/**
|
|
79
77
|
* Check if a command exists in PATH
|
|
@@ -200,14 +198,14 @@ edgeComponents: {}
|
|
|
200
198
|
if (existsSync(preCommitFile)) {
|
|
201
199
|
// Check if our hook is already in the file
|
|
202
200
|
const existingContent = readFileSync(preCommitFile, 'utf8');
|
|
203
|
-
if (existingContent.includes('privu lint')) {
|
|
204
|
-
console.log(chalk.yellow(`Husky pre-commit hook already includes
|
|
201
|
+
if (existingContent.includes('principal-view-cli lint') || existingContent.includes('privu lint')) {
|
|
202
|
+
console.log(chalk.yellow(`Husky pre-commit hook already includes principal view linting`));
|
|
205
203
|
}
|
|
206
204
|
else {
|
|
207
205
|
// Append our lint command to existing pre-commit
|
|
208
|
-
const updatedContent = existingContent.trimEnd() + '\n\n# Run principal view linting\
|
|
206
|
+
const updatedContent = existingContent.trimEnd() + '\n\n# Run principal view linting\nnpx @principal-ai/principal-view-cli lint --quiet\n';
|
|
209
207
|
writeFileSync(preCommitFile, updatedContent);
|
|
210
|
-
console.log(chalk.green(`Updated Husky pre-commit hook with
|
|
208
|
+
console.log(chalk.green(`Updated Husky pre-commit hook with principal view linting`));
|
|
211
209
|
huskySetup = true;
|
|
212
210
|
}
|
|
213
211
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -14047,31 +14047,29 @@ rules:
|
|
|
14047
14047
|
|
|
14048
14048
|
# Structure rules - ensure completeness
|
|
14049
14049
|
minimum-node-sources:
|
|
14050
|
-
|
|
14051
|
-
|
|
14050
|
+
severity: error
|
|
14051
|
+
options:
|
|
14052
|
+
minimum: 1
|
|
14052
14053
|
excludeNodeTypes: []
|
|
14053
14054
|
orphaned-node-types: error
|
|
14054
14055
|
orphaned-edge-types: error
|
|
14055
14056
|
unreachable-states: error
|
|
14056
|
-
dead-end-states:
|
|
14057
|
-
- error
|
|
14058
|
-
- allowTerminalStates: true
|
|
14057
|
+
dead-end-states: error
|
|
14059
14058
|
|
|
14060
14059
|
# Pattern rules - validate regex patterns
|
|
14061
14060
|
valid-action-patterns:
|
|
14062
|
-
|
|
14063
|
-
|
|
14061
|
+
severity: error
|
|
14062
|
+
options:
|
|
14063
|
+
strictMode: false
|
|
14064
14064
|
|
|
14065
14065
|
# Library rules - check against component library
|
|
14066
14066
|
library-node-type-match:
|
|
14067
|
-
|
|
14068
|
-
|
|
14067
|
+
severity: error
|
|
14068
|
+
options:
|
|
14069
|
+
allowExtra: true
|
|
14069
14070
|
`;
|
|
14070
|
-
var HUSKY_PRE_COMMIT =
|
|
14071
|
-
|
|
14072
|
-
|
|
14073
|
-
# Run principal view linting on staged .principal-views files
|
|
14074
|
-
privu lint --quiet
|
|
14071
|
+
var HUSKY_PRE_COMMIT = `# Run principal view linting on staged .principal-views files
|
|
14072
|
+
npx @principal-ai/principal-view-cli lint --quiet
|
|
14075
14073
|
`;
|
|
14076
14074
|
function isGitRepo() {
|
|
14077
14075
|
try {
|
|
@@ -14151,12 +14149,12 @@ edgeComponents: {}
|
|
|
14151
14149
|
if (isHuskyInstalled(gitRoot)) {
|
|
14152
14150
|
if ((0, import_node_fs5.existsSync)(preCommitFile)) {
|
|
14153
14151
|
const existingContent = (0, import_node_fs5.readFileSync)(preCommitFile, "utf8");
|
|
14154
|
-
if (existingContent.includes("privu lint")) {
|
|
14155
|
-
console.log(source_default.yellow(`Husky pre-commit hook already includes
|
|
14152
|
+
if (existingContent.includes("principal-view-cli lint") || existingContent.includes("privu lint")) {
|
|
14153
|
+
console.log(source_default.yellow(`Husky pre-commit hook already includes principal view linting`));
|
|
14156
14154
|
} else {
|
|
14157
|
-
const updatedContent = existingContent.trimEnd() + "\n\n# Run principal view linting\
|
|
14155
|
+
const updatedContent = existingContent.trimEnd() + "\n\n# Run principal view linting\nnpx @principal-ai/principal-view-cli lint --quiet\n";
|
|
14158
14156
|
(0, import_node_fs5.writeFileSync)(preCommitFile, updatedContent);
|
|
14159
|
-
console.log(source_default.green(`Updated Husky pre-commit hook with
|
|
14157
|
+
console.log(source_default.green(`Updated Husky pre-commit hook with principal view linting`));
|
|
14160
14158
|
huskySetup = true;
|
|
14161
14159
|
}
|
|
14162
14160
|
} else {
|