@akal/supaforge 0.0.34 → 0.0.36
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/README.md +32 -13
- package/dist/base-command.d.ts +1 -1
- package/dist/base-command.js +4 -4
- package/dist/{branch-C4ndfoj5.d.ts → branch-BppjQBv_.d.ts} +1 -1
- package/dist/{chunk-ICSCHS72.js → chunk-5UHIWFQG.js} +76 -186
- package/dist/{chunk-S5L4A3UR.js → chunk-AL6INEFX.js} +3 -3
- package/dist/{chunk-OB5GP7UB.js → chunk-CAQ3QQFP.js} +437 -45
- package/dist/{chunk-TPX2MAO4.js → chunk-CCB7ARZU.js} +54 -5
- package/dist/{chunk-V2SBZERO.js → chunk-EWNZIRCD.js} +4 -4
- package/dist/{chunk-EFKQOQGG.js → chunk-FD2JKEJA.js} +7 -5
- package/dist/{chunk-3WKWPSFN.js → chunk-GGZ7YWBZ.js} +191 -32
- package/dist/{chunk-F46FFUKC.js → chunk-JX5L253P.js} +56 -18
- package/dist/{chunk-GQPGH6YR.js → chunk-KHXEES2M.js} +2 -2
- package/dist/{chunk-MG3SFV5J.js → chunk-KT7NMELZ.js} +77 -7
- package/dist/{chunk-PYAGSMFB.js → chunk-M2564IGT.js} +159 -19
- package/dist/{chunk-7DL63NWP.js → chunk-MRXIE55Y.js} +7 -3
- package/dist/{chunk-6ERVCWLY.js → chunk-MZPWRWBL.js} +7 -7
- package/dist/{chunk-5STH2A6K.js → chunk-OXS42LJH.js} +4 -4
- package/dist/{chunk-HNJ6BNNZ.js → chunk-Q43MN6NE.js} +2 -2
- package/dist/{chunk-ZI435CAU.js → chunk-RQCXGO37.js} +2 -2
- package/dist/{chunk-KNXHLVF7.js → chunk-SQ52YBKK.js} +3 -2
- package/dist/{chunk-N5VNNOA2.js → chunk-YUJ2MHLM.js} +1236 -22
- package/dist/chunk-Z2YUOA4W.js +242 -0
- package/dist/commands/clone.d.ts +2 -2
- package/dist/commands/clone.js +10 -9
- package/dist/commands/diff.d.ts +25 -22
- package/dist/commands/diff.js +14 -15
- package/dist/commands/hukam.d.ts +2 -3
- package/dist/commands/hukam.js +14 -15
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.js +2 -2
- package/dist/commands/mcp.js +9 -10
- package/dist/commands/migrate/baseline.d.ts +1 -1
- package/dist/commands/migrate/baseline.js +5 -5
- package/dist/commands/migrate/create.d.ts +1 -1
- package/dist/commands/migrate/create.js +27 -13
- package/dist/commands/migrate/list.d.ts +1 -1
- package/dist/commands/migrate/list.js +5 -5
- package/dist/commands/migrate/run.d.ts +4 -1
- package/dist/commands/migrate/run.js +9 -8
- package/dist/commands/report.d.ts +1 -1
- package/dist/commands/report.js +5 -5
- package/dist/commands/restore.d.ts +1 -1
- package/dist/commands/restore.js +14 -13
- package/dist/commands/snapshot.d.ts +1 -1
- package/dist/commands/snapshot.js +8 -8
- package/dist/commands/sync.d.ts +2 -3
- package/dist/commands/sync.js +14 -15
- package/dist/{config-CTbeRlJk.d.ts → config-l3ggjw9r.d.ts} +2 -0
- package/dist/index.d.ts +38 -4
- package/dist/index.js +13 -14
- package/package.json +2 -2
- package/dist/chunk-DQJSSTIJ.js +0 -940
- package/dist/chunk-DQQ5E563.js +0 -64
package/dist/chunk-DQQ5E563.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// src/utils/strings.ts
|
|
2
|
-
var MAX_SLUG_LENGTH = 60;
|
|
3
|
-
function slugify(name, separator = "_") {
|
|
4
|
-
const pattern = new RegExp(`[^a-z0-9]+`, "g");
|
|
5
|
-
const edgePattern = new RegExp(`^${escapeRegex(separator)}|${escapeRegex(separator)}$`, "g");
|
|
6
|
-
return name.toLowerCase().replace(pattern, separator).replace(edgePattern, "").slice(0, MAX_SLUG_LENGTH);
|
|
7
|
-
}
|
|
8
|
-
function escapeRegex(s) {
|
|
9
|
-
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
10
|
-
}
|
|
11
|
-
function parseFlagList(values) {
|
|
12
|
-
if (!Array.isArray(values)) return [];
|
|
13
|
-
return values.flatMap((v) => String(v).split(",")).map((v) => v.trim()).filter((v) => v.length > 0);
|
|
14
|
-
}
|
|
15
|
-
function globToRegExp(pattern) {
|
|
16
|
-
let out = "^";
|
|
17
|
-
for (const ch of pattern) {
|
|
18
|
-
if (ch === "*") out += ".*";
|
|
19
|
-
else if (ch === "?") out += ".";
|
|
20
|
-
else out += escapeRegex(ch);
|
|
21
|
-
}
|
|
22
|
-
return new RegExp(out + "$");
|
|
23
|
-
}
|
|
24
|
-
function matchesGlob(value, pattern) {
|
|
25
|
-
return globToRegExp(pattern.toLowerCase()).test(value.toLowerCase());
|
|
26
|
-
}
|
|
27
|
-
function normalizeRoles(roles) {
|
|
28
|
-
const arr = Array.isArray(roles) ? roles : [roles];
|
|
29
|
-
return [...new Set(
|
|
30
|
-
arr.flatMap((r) => /^\{.*\}$/s.test(r) ? arrayLiteralElements(r) : [r]).map((r) => r.trim()).filter(Boolean)
|
|
31
|
-
)].sort();
|
|
32
|
-
}
|
|
33
|
-
function arrayLiteralElements(literal) {
|
|
34
|
-
const inner = literal.slice(1, -1);
|
|
35
|
-
const out = [];
|
|
36
|
-
let i = 0;
|
|
37
|
-
while (i < inner.length) {
|
|
38
|
-
let value = "";
|
|
39
|
-
if (inner[i] === '"') {
|
|
40
|
-
for (i++; i < inner.length && inner[i] !== '"'; i++) {
|
|
41
|
-
if (inner[i] === "\\") i++;
|
|
42
|
-
value += inner[i];
|
|
43
|
-
}
|
|
44
|
-
i++;
|
|
45
|
-
} else {
|
|
46
|
-
const end = inner.indexOf(",", i);
|
|
47
|
-
value = inner.slice(i, end === -1 ? inner.length : end);
|
|
48
|
-
i = end === -1 ? inner.length : end;
|
|
49
|
-
}
|
|
50
|
-
out.push(value);
|
|
51
|
-
if (inner[i] === ",") i++;
|
|
52
|
-
}
|
|
53
|
-
return out;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export {
|
|
57
|
-
slugify,
|
|
58
|
-
escapeRegex,
|
|
59
|
-
parseFlagList,
|
|
60
|
-
globToRegExp,
|
|
61
|
-
matchesGlob,
|
|
62
|
-
normalizeRoles
|
|
63
|
-
};
|
|
64
|
-
//# sourceMappingURL=chunk-DQQ5E563.js.map
|