opencroc 1.4.1 → 1.4.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/cli/index.js +94 -43
- package/dist/cli/index.js.map +1 -1
- package/dist/web/index.html +143 -46
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -3666,6 +3666,89 @@ var init_croc_office = __esm({
|
|
|
3666
3666
|
const nodes = [];
|
|
3667
3667
|
const edges = [];
|
|
3668
3668
|
const moduleSet = /* @__PURE__ */ new Set();
|
|
3669
|
+
const KNOWN_PREFIXES = [
|
|
3670
|
+
"notification",
|
|
3671
|
+
"department",
|
|
3672
|
+
"application",
|
|
3673
|
+
"permission",
|
|
3674
|
+
"computed",
|
|
3675
|
+
"delegation",
|
|
3676
|
+
"dictionary",
|
|
3677
|
+
"validation",
|
|
3678
|
+
"simulation",
|
|
3679
|
+
"statistics",
|
|
3680
|
+
"inference",
|
|
3681
|
+
"panorama",
|
|
3682
|
+
"designer",
|
|
3683
|
+
"workflow",
|
|
3684
|
+
"template",
|
|
3685
|
+
"relation",
|
|
3686
|
+
"recycle",
|
|
3687
|
+
"monitor",
|
|
3688
|
+
"timeout",
|
|
3689
|
+
"column",
|
|
3690
|
+
"export",
|
|
3691
|
+
"import",
|
|
3692
|
+
"batch",
|
|
3693
|
+
"field",
|
|
3694
|
+
"chain",
|
|
3695
|
+
"tenant",
|
|
3696
|
+
"model",
|
|
3697
|
+
"data",
|
|
3698
|
+
"user",
|
|
3699
|
+
"role",
|
|
3700
|
+
"menu",
|
|
3701
|
+
"auth",
|
|
3702
|
+
"dept",
|
|
3703
|
+
"page",
|
|
3704
|
+
"app",
|
|
3705
|
+
"api",
|
|
3706
|
+
"org",
|
|
3707
|
+
"log",
|
|
3708
|
+
"er"
|
|
3709
|
+
];
|
|
3710
|
+
const DOMAIN_GROUPS = {
|
|
3711
|
+
app: "app",
|
|
3712
|
+
api: "api",
|
|
3713
|
+
data: "data",
|
|
3714
|
+
auth: "auth",
|
|
3715
|
+
user: "user",
|
|
3716
|
+
role: "user",
|
|
3717
|
+
menu: "app",
|
|
3718
|
+
dept: "org",
|
|
3719
|
+
department: "org",
|
|
3720
|
+
org: "org",
|
|
3721
|
+
chain: "workflow",
|
|
3722
|
+
workflow: "workflow",
|
|
3723
|
+
batch: "batch",
|
|
3724
|
+
column: "data",
|
|
3725
|
+
computed: "data",
|
|
3726
|
+
designer: "designer",
|
|
3727
|
+
monitor: "monitor",
|
|
3728
|
+
notification: "notification",
|
|
3729
|
+
permission: "permission",
|
|
3730
|
+
template: "template",
|
|
3731
|
+
validation: "validation",
|
|
3732
|
+
field: "data",
|
|
3733
|
+
delegation: "workflow",
|
|
3734
|
+
import: "data",
|
|
3735
|
+
export: "data",
|
|
3736
|
+
dictionary: "data",
|
|
3737
|
+
panorama: "panorama",
|
|
3738
|
+
inference: "inference",
|
|
3739
|
+
simulation: "simulation",
|
|
3740
|
+
er: "data",
|
|
3741
|
+
relation: "data",
|
|
3742
|
+
recycle: "data",
|
|
3743
|
+
statistics: "statistics",
|
|
3744
|
+
operation: "system",
|
|
3745
|
+
log: "system",
|
|
3746
|
+
timeout: "workflow",
|
|
3747
|
+
tenant: "system",
|
|
3748
|
+
model: "data",
|
|
3749
|
+
page: "app",
|
|
3750
|
+
application: "app"
|
|
3751
|
+
};
|
|
3669
3752
|
const inferModule = (filePath, type) => {
|
|
3670
3753
|
const parts = filePath.replace(/\\/g, "/").split("/");
|
|
3671
3754
|
const typeDir = type === "model" ? "models" : "controllers";
|
|
@@ -3673,49 +3756,17 @@ var init_croc_office = __esm({
|
|
|
3673
3756
|
if (typeDirIdx >= 0 && parts.length - typeDirIdx > 2) {
|
|
3674
3757
|
return parts[typeDirIdx + 1];
|
|
3675
3758
|
}
|
|
3676
|
-
const baseName = parts[parts.length - 1].replace(/\.(ts|js)$/, "").replace(/Controller
|
|
3677
|
-
const
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
menu: "menu",
|
|
3688
|
-
dept: "org",
|
|
3689
|
-
department: "org",
|
|
3690
|
-
org: "org",
|
|
3691
|
-
chain: "workflow",
|
|
3692
|
-
workflow: "workflow",
|
|
3693
|
-
batch: "batch",
|
|
3694
|
-
column: "data",
|
|
3695
|
-
computed: "data",
|
|
3696
|
-
designer: "designer",
|
|
3697
|
-
monitor: "monitor",
|
|
3698
|
-
notification: "notification",
|
|
3699
|
-
permission: "permission",
|
|
3700
|
-
template: "template",
|
|
3701
|
-
validation: "validation",
|
|
3702
|
-
field: "field",
|
|
3703
|
-
delegation: "workflow",
|
|
3704
|
-
import: "import-export",
|
|
3705
|
-
export: "import-export",
|
|
3706
|
-
dictionary: "data",
|
|
3707
|
-
panorama: "panorama",
|
|
3708
|
-
inference: "inference",
|
|
3709
|
-
simulation: "simulation",
|
|
3710
|
-
er: "data",
|
|
3711
|
-
relation: "data",
|
|
3712
|
-
recycle: "data",
|
|
3713
|
-
statistics: "statistics",
|
|
3714
|
-
operation: "log",
|
|
3715
|
-
log: "log",
|
|
3716
|
-
timeout: "workflow"
|
|
3717
|
-
};
|
|
3718
|
-
return groupMap[prefix] || prefix;
|
|
3759
|
+
const baseName = parts[parts.length - 1].replace(/\.(ts|js)$/, "").replace(/Controller$/i, "");
|
|
3760
|
+
const lc = baseName.toLowerCase();
|
|
3761
|
+
for (const prefix of KNOWN_PREFIXES) {
|
|
3762
|
+
if (lc.startsWith(prefix)) {
|
|
3763
|
+
return DOMAIN_GROUPS[prefix] || prefix;
|
|
3764
|
+
}
|
|
3765
|
+
}
|
|
3766
|
+
const camelMatch = baseName.match(/^([A-Z]?[a-z]+)/);
|
|
3767
|
+
if (camelMatch) {
|
|
3768
|
+
const w = camelMatch[1].toLowerCase();
|
|
3769
|
+
return DOMAIN_GROUPS[w] || w;
|
|
3719
3770
|
}
|
|
3720
3771
|
return "other";
|
|
3721
3772
|
};
|