@forklaunch/common 0.1.12 → 0.1.14
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/lib/guards/isNever.d.ts.map +1 -0
- package/lib/guards/isRecord.d.ts.map +1 -0
- package/lib/index.d.ts +7 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -1
- package/lib/types/flatten.types.d.ts.map +1 -0
- package/lib/types/makePropertyOptionalIfChildrenOptional.types.d.ts.map +1 -0
- package/lib/types/prettify.types.d.ts.map +1 -0
- package/lib/types/removeTrailingSlash.types.d.ts.map +1 -0
- package/lib/utils/extractArgumentNames.d.ts.map +1 -0
- package/lib/utils/extractArgumentNames.js +30 -0
- package/package.json +14 -9
- package/lib/eslint.config.d.mts +0 -1134
- package/lib/eslint.config.d.mts.map +0 -1
- package/lib/eslint.config.mjs +0 -10
- package/lib/jest.config.d.ts +0 -4
- package/lib/jest.config.d.ts.map +0 -1
- package/lib/jest.config.js +0 -19
- package/lib/src/guards/isNever.d.ts.map +0 -1
- package/lib/src/guards/isRecord.d.ts.map +0 -1
- package/lib/src/index.d.ts +0 -8
- package/lib/src/index.d.ts.map +0 -1
- package/lib/src/index.js +0 -7
- package/lib/src/types/flatten.types.d.ts.map +0 -1
- package/lib/src/types/makePropertyOptionalIfChildrenOptional.types.d.ts.map +0 -1
- package/lib/src/types/prettify.types.d.ts.map +0 -1
- package/lib/src/types/removeTrailingSlash.types.d.ts.map +0 -1
- package/lib/src/utils/extractArgumentNames.d.ts.map +0 -1
- package/lib/src/utils/extractArgumentNames.js +0 -7
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/vitest.config.d.ts +0 -3
- package/lib/vitest.config.d.ts.map +0 -1
- package/lib/vitest.config.js +0 -7
- /package/lib/{src/guards → guards}/isNever.d.ts +0 -0
- /package/lib/{src/guards → guards}/isNever.js +0 -0
- /package/lib/{src/guards → guards}/isRecord.d.ts +0 -0
- /package/lib/{src/guards → guards}/isRecord.js +0 -0
- /package/lib/{src/types → types}/flatten.types.d.ts +0 -0
- /package/lib/{src/types → types}/flatten.types.js +0 -0
- /package/lib/{src/types → types}/makePropertyOptionalIfChildrenOptional.types.d.ts +0 -0
- /package/lib/{src/types → types}/makePropertyOptionalIfChildrenOptional.types.js +0 -0
- /package/lib/{src/types → types}/prettify.types.d.ts +0 -0
- /package/lib/{src/types → types}/prettify.types.js +0 -0
- /package/lib/{src/types → types}/removeTrailingSlash.types.d.ts +0 -0
- /package/lib/{src/types → types}/removeTrailingSlash.types.js +0 -0
- /package/lib/{src/utils → utils}/extractArgumentNames.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isNever.d.ts","sourceRoot":"","sources":["../../src/guards/isNever.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,KAAK,CAEpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isRecord.d.ts","sourceRoot":"","sources":["../../src/guards/isRecord.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAErE"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './guards/isNever';
|
|
2
|
+
export * from './guards/isRecord';
|
|
3
|
+
export * from './types/flatten.types';
|
|
4
|
+
export * from './types/makePropertyOptionalIfChildrenOptional.types';
|
|
5
|
+
export * from './types/prettify.types';
|
|
6
|
+
export * from './types/removeTrailingSlash.types';
|
|
7
|
+
export * from './utils/extractArgumentNames';
|
|
2
8
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sDAAsD,CAAC;AACrE,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './guards/isNever';
|
|
2
|
+
export * from './guards/isRecord';
|
|
3
|
+
export * from './types/flatten.types';
|
|
4
|
+
export * from './types/makePropertyOptionalIfChildrenOptional.types';
|
|
5
|
+
export * from './types/prettify.types';
|
|
6
|
+
export * from './types/removeTrailingSlash.types';
|
|
7
|
+
export * from './utils/extractArgumentNames';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flatten.types.d.ts","sourceRoot":"","sources":["../../src/types/flatten.types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAE1C;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GACrC;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACjC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"makePropertyOptionalIfChildrenOptional.types.d.ts","sourceRoot":"","sources":["../../src/types/makePropertyOptionalIfChildrenOptional.types.ts"],"names":[],"mappings":"AAAA,KAAK,qBAAqB,CAAC,CAAC,IAC1B,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC;AAEvE,MAAM,MAAM,sCAAsC,CAAC,CAAC,IAAI;KACrD,CAAC,IAAI,MAAM,CAAC,IAAI,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CAC9E,GAAG;KACD,CAAC,IAAI,MAAM,CAAC,IAAI,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAC7E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prettify.types.d.ts","sourceRoot":"","sources":["../../src/types/prettify.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;KACvB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrB,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeTrailingSlash.types.d.ts","sourceRoot":"","sources":["../../src/types/removeTrailingSlash.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,GAAG,MAAM,KAAK,GAAG,GAC3E,KAAK,GACL,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractArgumentNames.d.ts","sourceRoot":"","sources":["../../src/utils/extractArgumentNames.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IAAE,QAAQ,IAAI,MAAM,CAAA;CAAE,GAAG,MAAM,EAAE,CA+B3E"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export function extractArgumentNames(func) {
|
|
2
|
+
const fnStr = func.toString();
|
|
3
|
+
const args = fnStr.match(/\(([^)]*)\)/);
|
|
4
|
+
if (!args)
|
|
5
|
+
return [];
|
|
6
|
+
const argsStr = args[1];
|
|
7
|
+
const result = [];
|
|
8
|
+
let currentArg = '';
|
|
9
|
+
let braceCount = 0;
|
|
10
|
+
for (let i = 0; i < argsStr.length; i++) {
|
|
11
|
+
const char = argsStr[i];
|
|
12
|
+
if (char === '{')
|
|
13
|
+
braceCount++;
|
|
14
|
+
if (char === '}')
|
|
15
|
+
braceCount--;
|
|
16
|
+
if (char === ',' && braceCount === 0) {
|
|
17
|
+
result.push(currentArg.trim());
|
|
18
|
+
currentArg = '';
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
if (char === ' ' || char === '\n' || char === '\t' || char === '\r')
|
|
22
|
+
continue;
|
|
23
|
+
currentArg += char;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (currentArg) {
|
|
27
|
+
result.push(currentArg.trim());
|
|
28
|
+
}
|
|
29
|
+
return result;
|
|
30
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forklaunch/common",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "Common package for base types, interfaces, implementations.",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib/**"
|
|
@@ -17,13 +17,14 @@
|
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/forklaunch/forklaunch-js#readme",
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@eslint/js": "^9.
|
|
20
|
+
"@eslint/js": "^9.16.0",
|
|
21
|
+
"@types/jest": "^29.5.14",
|
|
21
22
|
"argparse": "^2.0.1",
|
|
22
23
|
"balanced-match": "^3.0.1",
|
|
23
24
|
"brace-expansion": "^4.0.0",
|
|
24
25
|
"entities": "^5.0.0",
|
|
25
|
-
"eslint": "^9.
|
|
26
|
-
"globals": "^15.
|
|
26
|
+
"eslint": "^9.16.0",
|
|
27
|
+
"globals": "^15.13.0",
|
|
27
28
|
"jest": "^29.7.0",
|
|
28
29
|
"linkify-it": "^5.0.0",
|
|
29
30
|
"lunr": "^2.3.9",
|
|
@@ -31,14 +32,18 @@
|
|
|
31
32
|
"mdurl": "^2.0.0",
|
|
32
33
|
"minimatch": "^10.0.1",
|
|
33
34
|
"punycode.js": "^2.3.1",
|
|
34
|
-
"shiki": "^1.
|
|
35
|
+
"shiki": "^1.24.0",
|
|
35
36
|
"ts-jest": "^29.2.5",
|
|
36
37
|
"ts-node": "^10.9.2",
|
|
37
|
-
"typedoc": "^0.
|
|
38
|
-
"typescript": "^5.
|
|
39
|
-
"typescript-eslint": "^8.
|
|
38
|
+
"typedoc": "^0.27.2",
|
|
39
|
+
"typescript": "^5.7.2",
|
|
40
|
+
"typescript-eslint": "^8.17.0",
|
|
40
41
|
"uc.micro": "^2.1.0",
|
|
41
|
-
"
|
|
42
|
+
"vitest": "^2.1.8",
|
|
43
|
+
"yaml": "^2.6.1"
|
|
44
|
+
},
|
|
45
|
+
"directories": {
|
|
46
|
+
"test": "tests"
|
|
42
47
|
},
|
|
43
48
|
"exports": {
|
|
44
49
|
".": {
|