lenix 1.6.3 → 1.6.4
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
CHANGED
|
@@ -43,9 +43,17 @@ import lint from 'lenix/lint' with { type: "json" }
|
|
|
43
43
|
},
|
|
44
44
|
rules: {
|
|
45
45
|
...,
|
|
46
|
-
...lint.strict,
|
|
46
|
+
...lint.strict as any,
|
|
47
47
|
...,
|
|
48
48
|
}
|
|
49
49
|
...
|
|
50
50
|
},
|
|
51
51
|
```
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
"compilerOptions": {
|
|
55
|
+
...,
|
|
56
|
+
"types": ["node"],
|
|
57
|
+
...
|
|
58
|
+
}
|
|
59
|
+
```
|
package/format/index.ts
CHANGED
|
@@ -51,6 +51,11 @@ log.warn(
|
|
|
51
51
|
log.info('like: "recommendations": ["esbenp.prettier-vscode"]')
|
|
52
52
|
await confirm({ message: 'Done?' })
|
|
53
53
|
|
|
54
|
+
log.warn(
|
|
55
|
+
'Manual (optional) - add the following script into your package.json\'s scripts object : "format": "pnpm exec prettier . --write",',
|
|
56
|
+
)
|
|
57
|
+
await confirm({ message: 'Done?' })
|
|
58
|
+
|
|
54
59
|
const format = await confirm({
|
|
55
60
|
message: 'Run prettier on existing files now to test it out?',
|
|
56
61
|
})
|
|
@@ -7,7 +7,8 @@ export const entries = <T extends Record<string, unknown>>(
|
|
|
7
7
|
object: T,
|
|
8
8
|
): {
|
|
9
9
|
[K in keyof T]: [K, T[K]]
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
}[keyof T][] =>
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
12
|
+
Object.entries(object) as {
|
|
13
|
+
[K in keyof T]: [K, T[K]]
|
|
14
|
+
}[keyof T][]
|
|
@@ -5,20 +5,19 @@ const fxmanifest = Object.entries((await import('./fxmanifest.json')).default)
|
|
|
5
5
|
|
|
6
6
|
const generateContent = () => {
|
|
7
7
|
let defaultContent: FileContent = ''
|
|
8
|
-
for (const [key, value] of fxmanifest)
|
|
9
|
-
if (Array.isArray(value))
|
|
8
|
+
for (const [key, value] of fxmanifest)
|
|
9
|
+
if (Array.isArray(value))
|
|
10
10
|
defaultContent += `${key} {
|
|
11
11
|
"${value}",
|
|
12
12
|
}
|
|
13
13
|
`
|
|
14
|
-
|
|
14
|
+
else if (typeof value === 'string')
|
|
15
15
|
defaultContent += `${key} "${value}"
|
|
16
16
|
`
|
|
17
|
-
|
|
18
|
-
}
|
|
17
|
+
else throw new Error('Invalid value type')
|
|
19
18
|
return defaultContent
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
export const createFxmanifest = async (content?: FileContent) => {
|
|
23
|
-
await writeFile('fxmanifest.lua', content
|
|
22
|
+
await writeFile('fxmanifest.lua', content ?? generateContent())
|
|
24
23
|
}
|
|
@@ -6,4 +6,6 @@
|
|
|
6
6
|
* @example
|
|
7
7
|
* foo().catch(raise)
|
|
8
8
|
*/
|
|
9
|
-
export const raise = (error: unknown, cause?: unknown): never => {
|
|
9
|
+
export const raise = (error: unknown, cause?: unknown): never => {
|
|
10
|
+
throw new Error(String(error), { cause })
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lenix",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"description": "The All-in-one Package",
|
|
5
5
|
"author": "Lenix",
|
|
6
6
|
"license": "GPL-3.0",
|
|
@@ -41,10 +41,7 @@
|
|
|
41
41
|
"lenix": "./index.ts"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@clack/prompts": "^1.1.0"
|
|
45
|
-
"eslint-plugin-import": "^2.32.0",
|
|
46
|
-
"eslint-plugin-react": "^7.37.5",
|
|
47
|
-
"eslint-plugin-react-hooks": "^7.0.1"
|
|
44
|
+
"@clack/prompts": "^1.1.0"
|
|
48
45
|
},
|
|
49
46
|
"devDependencies": {
|
|
50
47
|
"@eslint/js": "^10.0.1",
|