@akanjs/cli 2.3.13 → 2.4.0-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 +879 -321
- package/index.js +907 -356
- package/package.json +2 -2
- package/templates/facetIndex/index.ts +3 -9
- package/templates/workspaceRoot/biome.json.template +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0-rc.0",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@langchain/openai": "^1.4.6",
|
|
35
35
|
"@tailwindcss/node": "^4.3.0",
|
|
36
36
|
"@trapezedev/project": "^7.1.4",
|
|
37
|
-
"akanjs": "2.
|
|
37
|
+
"akanjs": "2.4.0-rc.0",
|
|
38
38
|
"chalk": "^5.6.2",
|
|
39
39
|
"commander": "^14.0.3",
|
|
40
40
|
"daisyui": "5.5.23",
|
|
@@ -14,21 +14,15 @@ const sourceFilePattern = /\.(ts|tsx)$/;
|
|
|
14
14
|
const excludedFilePattern = /(^index\.tsx?$|\.d\.ts$|\.(test|spec)\.(ts|tsx)$|\.css$|\.scss$|\.sass$)/;
|
|
15
15
|
// `ui` exports PascalCase names only; `common`/`srvkit`/`webkit` export camelCase names only. Names with
|
|
16
16
|
// dots, underscores, or hyphens (e.g. `foo.helper`, `Globe_Dynamic`, `kebab-case`) match neither and are skipped.
|
|
17
|
-
// `plugin` additionally exports `<camelCase>.plugin` files (the plugin-facet file convention, e.g.
|
|
18
|
-
// `pushNotification.plugin.ts`) alongside plain camelCase helpers.
|
|
19
17
|
const pascalCasePattern = /^[A-Z][A-Za-z0-9]*$/;
|
|
20
18
|
const camelCasePattern = /^[a-z][A-Za-z0-9]*$/;
|
|
21
|
-
const
|
|
22
|
-
const matchesFacetNameConvention = (facet: string, name: string) => {
|
|
23
|
-
if (facet === "ui") return pascalCasePattern.test(name);
|
|
24
|
-
if (facet === "plugin") return camelCasePattern.test(name) || pluginNamePattern.test(name);
|
|
25
|
-
return camelCasePattern.test(name);
|
|
26
|
-
};
|
|
19
|
+
const nameCasePatternForFacet = (facet: string) => (facet === "ui" ? pascalCasePattern : camelCasePattern);
|
|
27
20
|
|
|
28
21
|
export default async function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict = {}, options: Options = {}) {
|
|
29
22
|
const { exec, facet } = options;
|
|
30
23
|
if (!exec || !facet || !(await exec.exists(facet))) return null;
|
|
31
24
|
|
|
25
|
+
const nameCasePattern = nameCasePatternForFacet(facet);
|
|
32
26
|
const { files, dirs } = await exec.getFilesAndDirs(facet);
|
|
33
27
|
const exportNames = [
|
|
34
28
|
...files
|
|
@@ -36,7 +30,7 @@ export default async function getContent(scanInfo: AppInfo | LibInfo | null, dic
|
|
|
36
30
|
.map((filename) => filename.replace(sourceFilePattern, "")),
|
|
37
31
|
...dirs.filter((dirname) => !dirname.startsWith(".")),
|
|
38
32
|
]
|
|
39
|
-
.filter((name) =>
|
|
33
|
+
.filter((name) => nameCasePattern.test(name))
|
|
40
34
|
.sort();
|
|
41
35
|
|
|
42
36
|
if (exportNames.length === 0) return null;
|