@akanjs/cli 2.3.1 → 2.3.2-rc.0
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/incrementalBuilder.proc.js +13 -4
- package/index.js +13 -4
- package/package.json +2 -2
|
@@ -1767,23 +1767,32 @@ async function validateModuleFiles(exec, violations, kind, modulePath) {
|
|
|
1767
1767
|
dirs.forEach((dirname) => {
|
|
1768
1768
|
violations.push(`${getScanPath(exec, path5.join(modulePath, dirname))}: unsupported module folder`);
|
|
1769
1769
|
});
|
|
1770
|
+
const uiModuleName = moduleName[0].toUpperCase() + moduleName.slice(1);
|
|
1770
1771
|
files.forEach((filename) => {
|
|
1771
1772
|
const filePath = path5.join(modulePath, filename);
|
|
1772
1773
|
if (filename === "index.ts" || filename === "index.tsx" || isAllowedTestFile(filename))
|
|
1773
1774
|
return;
|
|
1774
1775
|
if (filename === `${moduleName}.abstract.md`)
|
|
1775
1776
|
return;
|
|
1776
|
-
const uiMatch = filename.match(
|
|
1777
|
+
const uiMatch = filename.match(/^([A-Z][A-Za-z0-9]+)\.([A-Z][A-Za-z0-9]*)\.tsx$/);
|
|
1777
1778
|
if (uiMatch) {
|
|
1778
|
-
const
|
|
1779
|
+
const fileModuleName = uiMatch[1];
|
|
1780
|
+
const fileType = uiMatch[2];
|
|
1781
|
+
if (fileModuleName !== uiModuleName) {
|
|
1782
|
+
violations.push(`${getScanPath(exec, filePath)}: module name mismatch: expected '${uiModuleName}', got '${fileModuleName}'`);
|
|
1783
|
+
}
|
|
1779
1784
|
if (!moduleUiFileTypes[kind].has(fileType)) {
|
|
1780
1785
|
violations.push(`${getScanPath(exec, filePath)}: unsupported ${kind} UI file`);
|
|
1781
1786
|
}
|
|
1782
1787
|
return;
|
|
1783
1788
|
}
|
|
1784
|
-
const nonUiMatch = filename.match(
|
|
1789
|
+
const nonUiMatch = filename.match(/^([a-z][a-zA-Z0-9]*)\.([a-z][a-z0-9]*)\.ts$/);
|
|
1785
1790
|
if (nonUiMatch) {
|
|
1786
|
-
const
|
|
1791
|
+
const fileModuleName = nonUiMatch[1];
|
|
1792
|
+
const fileType = nonUiMatch[2];
|
|
1793
|
+
if (fileModuleName !== moduleName) {
|
|
1794
|
+
violations.push(`${getScanPath(exec, filePath)}: module name mismatch: expected '${moduleName}', got '${fileModuleName}'`);
|
|
1795
|
+
}
|
|
1787
1796
|
if (!moduleNonUiFileTypes[kind].has(fileType)) {
|
|
1788
1797
|
violations.push(`${getScanPath(exec, filePath)}: unsupported ${kind} file`);
|
|
1789
1798
|
}
|
package/index.js
CHANGED
|
@@ -1765,23 +1765,32 @@ async function validateModuleFiles(exec, violations, kind, modulePath) {
|
|
|
1765
1765
|
dirs.forEach((dirname) => {
|
|
1766
1766
|
violations.push(`${getScanPath(exec, path5.join(modulePath, dirname))}: unsupported module folder`);
|
|
1767
1767
|
});
|
|
1768
|
+
const uiModuleName = moduleName[0].toUpperCase() + moduleName.slice(1);
|
|
1768
1769
|
files.forEach((filename) => {
|
|
1769
1770
|
const filePath = path5.join(modulePath, filename);
|
|
1770
1771
|
if (filename === "index.ts" || filename === "index.tsx" || isAllowedTestFile(filename))
|
|
1771
1772
|
return;
|
|
1772
1773
|
if (filename === `${moduleName}.abstract.md`)
|
|
1773
1774
|
return;
|
|
1774
|
-
const uiMatch = filename.match(
|
|
1775
|
+
const uiMatch = filename.match(/^([A-Z][A-Za-z0-9]+)\.([A-Z][A-Za-z0-9]*)\.tsx$/);
|
|
1775
1776
|
if (uiMatch) {
|
|
1776
|
-
const
|
|
1777
|
+
const fileModuleName = uiMatch[1];
|
|
1778
|
+
const fileType = uiMatch[2];
|
|
1779
|
+
if (fileModuleName !== uiModuleName) {
|
|
1780
|
+
violations.push(`${getScanPath(exec, filePath)}: module name mismatch: expected '${uiModuleName}', got '${fileModuleName}'`);
|
|
1781
|
+
}
|
|
1777
1782
|
if (!moduleUiFileTypes[kind].has(fileType)) {
|
|
1778
1783
|
violations.push(`${getScanPath(exec, filePath)}: unsupported ${kind} UI file`);
|
|
1779
1784
|
}
|
|
1780
1785
|
return;
|
|
1781
1786
|
}
|
|
1782
|
-
const nonUiMatch = filename.match(
|
|
1787
|
+
const nonUiMatch = filename.match(/^([a-z][a-zA-Z0-9]*)\.([a-z][a-z0-9]*)\.ts$/);
|
|
1783
1788
|
if (nonUiMatch) {
|
|
1784
|
-
const
|
|
1789
|
+
const fileModuleName = nonUiMatch[1];
|
|
1790
|
+
const fileType = nonUiMatch[2];
|
|
1791
|
+
if (fileModuleName !== moduleName) {
|
|
1792
|
+
violations.push(`${getScanPath(exec, filePath)}: module name mismatch: expected '${moduleName}', got '${fileModuleName}'`);
|
|
1793
|
+
}
|
|
1785
1794
|
if (!moduleNonUiFileTypes[kind].has(fileType)) {
|
|
1786
1795
|
violations.push(`${getScanPath(exec, filePath)}: unsupported ${kind} file`);
|
|
1787
1796
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/cli",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2-rc.0",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@langchain/openai": "^1.4.6",
|
|
36
36
|
"@tailwindcss/node": "^4.3.0",
|
|
37
37
|
"@trapezedev/project": "^7.1.4",
|
|
38
|
-
"akanjs": "2.3.
|
|
38
|
+
"akanjs": "2.3.2-rc.0",
|
|
39
39
|
"chalk": "^5.6.2",
|
|
40
40
|
"commander": "^14.0.3",
|
|
41
41
|
"daisyui": "^5.5.20",
|