lenix 1.4.0 → 1.4.2

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.
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Get typed entries from an object (Typed Object.entries)
3
+ * @param object - Object to get entries from
4
+ * @returns Array of the passed entries
5
+ */
6
+ export const entries = <T extends Record<string, unknown>>(object: T) => {
7
+ return Object.entries(object) as Array<{
8
+ [K in keyof T]: [K, T[K]]
9
+ }[keyof T]>
10
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @param domain - domain of the URL (e.g. api.github.com)
3
+ * @param endpoint - endpoint of the URL (e.g. users/lenixdev)
4
+ * @param request - request options (e.g. { method: 'GET' })
5
+ */
6
+ export const caughtFetch = async (domain: string, endpoint: string, request?: RequestInit) => {
7
+ try {
8
+ return await fetch(`https://${domain}/${endpoint}`, request)
9
+ } catch(error) {
10
+ throw new Error('An error occurred while making the request.', { cause: error })
11
+ } finally {
12
+ console.debug(`End of ${domain}/${endpoint} request`)
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "fx_version": "cerulean",
3
+ "game": "gta5",
4
+ "client_scripts": [
5
+ "dist/client.js"
6
+ ],
7
+ "server_scripts": [
8
+ "dist/server.js"
9
+ ],
10
+ "ui_page": "client/nui/dist/index.html",
11
+ "files": [
12
+ "client/nui/dist/**"
13
+ ]
14
+ }
@@ -0,0 +1,24 @@
1
+ import { writeFile } from 'fs/promises'
2
+ type FileContent = Parameters<typeof writeFile>[1]
3
+
4
+ const fxmanifest = Object.entries((await import('./fxmanifest.json')).default)
5
+
6
+ const generateContent = () => {
7
+ let defaultContent: FileContent = ''
8
+ for (const [key, value] of fxmanifest) {
9
+ if (Array.isArray(value)) {
10
+ defaultContent +=
11
+ `${key} {
12
+ "${value}",
13
+ }
14
+ `
15
+ } else if (typeof value === 'string') {
16
+ defaultContent +=
17
+ `${key} "${value}"
18
+ `
19
+ } else throw new Error('Invalid value type')
20
+ }
21
+ return defaultContent
22
+ }
23
+
24
+ export const createFxmanifest = async (content?: FileContent) => await writeFile('fxmanifest.lua', content || generateContent())
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "moduleResolution": "bundler",
5
+ "resolveJsonModule": true,
6
+ },
7
+ }
@@ -0,0 +1,4 @@
1
+ export { wait } from './wait'
2
+ export { caughtFetch } from './fetch'
3
+ export { entries } from './entries'
4
+ export { lint } from './lint'
@@ -0,0 +1,362 @@
1
+ {
2
+ "strict": {
3
+ "accessor-pairs": "error",
4
+ "array-callback-return": "warn",
5
+ "arrow-body-style": "error",
6
+ "block-scoped-var": "error",
7
+ "camelcase": "error",
8
+ "capitalized-comments": "warn",
9
+ "class-methods-use-this": "error",
10
+ "complexity": "warn",
11
+ "consistent-return": "warn",
12
+ "consistent-this": "warn",
13
+ "constructor-super": "warn",
14
+ "curly": [
15
+ "error",
16
+ "multi"
17
+ ],
18
+ "default-case": "error",
19
+ "default-case-last": "error",
20
+ "default-param-last": "error",
21
+ "dot-notation": "error",
22
+ "eqeqeq": "error",
23
+ "for-direction": "error",
24
+ "func-name-matching": "error",
25
+ "func-names": "warn",
26
+ "func-style": "error",
27
+ "getter-return": "error",
28
+ "grouped-accessor-pairs": "error",
29
+ "guard-for-in": "warn",
30
+ "id-denylist": "warn",
31
+ "id-length": [
32
+ "error",
33
+ {
34
+ "exceptions": [
35
+ "_"
36
+ ]
37
+ }
38
+ ],
39
+ "id-match": "error",
40
+ "init-declarations": "error",
41
+ "logical-assignment-operators": "error",
42
+ "max-classes-per-file": "error",
43
+ "max-depth": "error",
44
+ "max-lines": "error",
45
+ "max-lines-per-function": "warn",
46
+ "max-nested-callbacks": "error",
47
+ "max-params": "error",
48
+ "max-statements": "error",
49
+ "new-cap": "warn",
50
+ "no-alert": "error",
51
+ "no-array-constructor": "warn",
52
+ "no-async-promise-executor": "warn",
53
+ "no-await-in-loop": "warn",
54
+ "no-bitwise": "warn",
55
+ "no-caller": "warn",
56
+ "no-case-declarations": "warn",
57
+ "no-class-assign": "error",
58
+ "no-compare-neg-zero": "error",
59
+ "no-cond-assign": "warn",
60
+ "no-console": "warn",
61
+ "no-const-assign": "error",
62
+ "no-constant-binary-expression": "warn",
63
+ "no-constant-condition": "warn",
64
+ "no-constructor-return": "error",
65
+ "no-continue": "error",
66
+ "no-control-regex": "warn",
67
+ "no-debugger": "error",
68
+ "no-delete-var": "error",
69
+ "no-div-regex": "warn",
70
+ "no-dupe-args": "error",
71
+ "no-dupe-class-members": "error",
72
+ "no-dupe-else-if": "error",
73
+ "no-dupe-keys": "error",
74
+ "no-duplicate-case": "error",
75
+ "no-duplicate-imports": "error",
76
+ "no-else-return": "error",
77
+ "no-empty": "error",
78
+ "no-empty-character-class": "warn",
79
+ "no-empty-function": "error",
80
+ "no-empty-pattern": "error",
81
+ "no-empty-static-block": "error",
82
+ "no-eq-null": "error",
83
+ "no-eval": "error",
84
+ "no-ex-assign": "error",
85
+ "no-extend-native": "warn",
86
+ "no-extra-bind": "warn",
87
+ "no-extra-boolean-cast": "warn",
88
+ "no-extra-label": "warn",
89
+ "no-fallthrough": "warn",
90
+ "no-func-assign": "error",
91
+ "no-global-assign": "error",
92
+ "no-implicit-coercion": "warn",
93
+ "no-implicit-globals": "error",
94
+ "no-implied-eval": "error",
95
+ "no-import-assign": "error",
96
+ "no-inline-comments": "warn",
97
+ "no-inner-declarations": "error",
98
+ "no-invalid-regexp": "warn",
99
+ "no-invalid-this": "error",
100
+ "no-irregular-whitespace": "warn",
101
+ "no-iterator": "warn",
102
+ "no-label-var": "error",
103
+ "no-labels": "error",
104
+ "no-lone-blocks": "error",
105
+ "no-lonely-if": "error",
106
+ "no-loop-func": "warn",
107
+ "no-loss-of-precision": "error",
108
+ "no-magic-numbers": [
109
+ "error",
110
+ {
111
+ "detectObjects": true,
112
+ "enforceConst": true,
113
+ "ignore": [
114
+ 0,
115
+ 1
116
+ ],
117
+ "ignoreReadonlyClassProperties": true
118
+ }
119
+ ],
120
+ "no-misleading-character-class": "warn",
121
+ "no-multi-assign": "error",
122
+ "no-multi-str": "error",
123
+ "no-negated-condition": "warn",
124
+ "no-nested-ternary": "error",
125
+ "no-new": "error",
126
+ "no-new-func": "error",
127
+ "no-new-native-nonconstructor": "warn",
128
+ "no-new-wrappers": "warn",
129
+ "no-nonoctal-decimal-escape": "warn",
130
+ "no-obj-calls": "warn",
131
+ "no-object-constructor": "warn",
132
+ "no-octal": "error",
133
+ "no-octal-escape": "warn",
134
+ "no-param-reassign": "warn",
135
+ "no-plusplus": "warn",
136
+ "no-promise-executor-return": "error",
137
+ "no-proto": "warn",
138
+ "no-prototype-builtins": "warn",
139
+ "no-redeclare": "error",
140
+ "no-regex-spaces": "warn",
141
+ "no-restricted-exports": "error",
142
+ "no-restricted-globals": "warn",
143
+ "no-restricted-imports": "warn",
144
+ "no-restricted-properties": "warn",
145
+ "no-restricted-syntax": "warn",
146
+ "no-return-assign": "error",
147
+ "no-script-url": "warn",
148
+ "no-self-assign": "error",
149
+ "no-self-compare": "error",
150
+ "no-sequences": "warn",
151
+ "no-setter-return": "error",
152
+ "no-shadow": "warn",
153
+ "no-shadow-restricted-names": "error",
154
+ "no-sparse-arrays": "error",
155
+ "no-template-curly-in-string": "error",
156
+ "no-this-before-super": "error",
157
+ "no-throw-literal": "error",
158
+ "no-unassigned-vars": "error",
159
+ "no-undef": "error",
160
+ "no-undef-init": "error",
161
+ "no-undefined": "off",
162
+ "no-underscore-dangle": "warn",
163
+ "no-unexpected-multiline": "error",
164
+ "no-unmodified-loop-condition": "warn",
165
+ "no-unneeded-ternary": "error",
166
+ "no-unreachable": "error",
167
+ "no-unreachable-loop": "warn",
168
+ "no-unsafe-finally": "warn",
169
+ "no-unsafe-negation": "warn",
170
+ "no-unsafe-optional-chaining": "error",
171
+ "no-unused-expressions": "error",
172
+ "no-unused-labels": "error",
173
+ "no-unused-private-class-members": "error",
174
+ "no-unused-vars": "error",
175
+ "no-use-before-define": "error",
176
+ "no-useless-assignment": "error",
177
+ "no-useless-backreference": "warn",
178
+ "no-useless-call": "warn",
179
+ "no-useless-catch": "error",
180
+ "no-useless-computed-key": "warn",
181
+ "no-useless-concat": "error",
182
+ "no-useless-constructor": "warn",
183
+ "no-useless-escape": "warn",
184
+ "no-useless-rename": "error",
185
+ "no-useless-return": "error",
186
+ "no-var": "error",
187
+ "no-void": "error",
188
+ "no-warning-comments": "warn",
189
+ "no-with": "error",
190
+ "object-shorthand": "error",
191
+ "one-var": "off",
192
+ "operator-assignment": "warn",
193
+ "prefer-arrow-callback": "error",
194
+ "prefer-const": "error",
195
+ "prefer-destructuring": "error",
196
+ "prefer-exponentiation-operator": "error",
197
+ "prefer-named-capture-group": "warn",
198
+ "prefer-numeric-literals": "warn",
199
+ "prefer-object-has-own": "warn",
200
+ "prefer-object-spread": "error",
201
+ "prefer-promise-reject-errors": "warn",
202
+ "prefer-regex-literals": "warn",
203
+ "prefer-rest-params": "error",
204
+ "prefer-spread": "error",
205
+ "prefer-template": "error",
206
+ "preserve-caught-error": "error",
207
+ "radix": "warn",
208
+ "require-atomic-updates": "warn",
209
+ "require-await": "error",
210
+ "require-unicode-regexp": "warn",
211
+ "require-yield": "error",
212
+ "sort-imports": "off",
213
+ "sort-keys": "off",
214
+ "sort-vars": "error",
215
+ "strict": "error",
216
+ "symbol-description": "error",
217
+ "unicode-bom": "warn",
218
+ "use-isnan": "error",
219
+ "valid-typeof": "error",
220
+ "vars-on-top": "error",
221
+ "yoda": "error",
222
+ "@typescript-eslint/adjacent-overload-signatures": "error",
223
+ "@typescript-eslint/array-type": "error",
224
+ "@typescript-eslint/ban-ts-comment": "error",
225
+ "@typescript-eslint/ban-tslint-comment": "error",
226
+ "@typescript-eslint/class-literal-property-style": "warn",
227
+ "@typescript-eslint/class-methods-use-this": "warn",
228
+ "@typescript-eslint/consistent-generic-constructors": "error",
229
+ "@typescript-eslint/consistent-indexed-object-style": "error",
230
+ "@typescript-eslint/consistent-type-assertions": "error",
231
+ "@typescript-eslint/consistent-type-definitions": "error",
232
+ "@typescript-eslint/consistent-type-imports": "error",
233
+ "@typescript-eslint/default-param-last": "warn",
234
+ "@typescript-eslint/explicit-function-return-type": "off",
235
+ "@typescript-eslint/explicit-member-accessibility": "warn",
236
+ "@typescript-eslint/explicit-module-boundary-types": "off",
237
+ "@typescript-eslint/init-declarations": "error",
238
+ "@typescript-eslint/max-params": "error",
239
+ "@typescript-eslint/member-ordering": "error",
240
+ "@typescript-eslint/method-signature-style": "error",
241
+ "@typescript-eslint/no-array-constructor": "error",
242
+ "@typescript-eslint/no-confusing-non-null-assertion": "error",
243
+ "@typescript-eslint/no-duplicate-enum-values": "error",
244
+ "@typescript-eslint/no-dynamic-delete": "error",
245
+ "@typescript-eslint/no-empty-function": "error",
246
+ "@typescript-eslint/no-empty-object-type": "error",
247
+ "@typescript-eslint/no-explicit-any": "error",
248
+ "@typescript-eslint/no-extra-non-null-assertion": "error",
249
+ "@typescript-eslint/no-extraneous-class": "error",
250
+ "@typescript-eslint/no-import-type-side-effects": "error",
251
+ "@typescript-eslint/no-inferrable-types": "error",
252
+ "@typescript-eslint/no-invalid-void-type": "error",
253
+ "@typescript-eslint/no-loop-func": "error",
254
+ "@typescript-eslint/no-magic-numbers": "off",
255
+ "@typescript-eslint/no-misused-new": "error",
256
+ "@typescript-eslint/no-namespace": "error",
257
+ "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "warn",
258
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
259
+ "@typescript-eslint/no-non-null-assertion": "error",
260
+ "@typescript-eslint/no-redeclare": "warn",
261
+ "@typescript-eslint/no-require-imports": "error",
262
+ "@typescript-eslint/no-restricted-imports": "warn",
263
+ "@typescript-eslint/no-restricted-types": "warn",
264
+ "@typescript-eslint/no-shadow": "warn",
265
+ "@typescript-eslint/no-this-alias": "error",
266
+ "@typescript-eslint/no-unnecessary-parameter-property-assignment": "error",
267
+ "@typescript-eslint/no-unnecessary-type-constraint": "error",
268
+ "@typescript-eslint/no-unsafe-declaration-merging": "error",
269
+ "@typescript-eslint/no-unsafe-function-type": "error",
270
+ "@typescript-eslint/no-unused-expressions": "warn",
271
+ "@typescript-eslint/no-unused-private-class-members": "error",
272
+ "@typescript-eslint/no-unused-vars": "error",
273
+ "@typescript-eslint/no-use-before-define": "error",
274
+ "@typescript-eslint/no-useless-constructor": "error",
275
+ "@typescript-eslint/no-useless-empty-export": "error",
276
+ "@typescript-eslint/no-wrapper-object-types": "error",
277
+ "@typescript-eslint/prefer-as-const": "error",
278
+ "@typescript-eslint/prefer-enum-initializers": "error",
279
+ "@typescript-eslint/prefer-for-of": "error",
280
+ "@typescript-eslint/prefer-function-type": "error",
281
+ "@typescript-eslint/prefer-literal-enum-member": "error",
282
+ "@typescript-eslint/prefer-namespace-keyword": "error",
283
+ "@typescript-eslint/triple-slash-reference": "error",
284
+ "@typescript-eslint/unified-signatures": "error",
285
+ "@typescript-eslint/await-thenable": "warn",
286
+ "@typescript-eslint/consistent-return": "error",
287
+ "@typescript-eslint/consistent-type-exports": "error",
288
+ "@typescript-eslint/dot-notation": "error",
289
+ "@typescript-eslint/naming-convention": [
290
+ "warn",
291
+ {
292
+ "selector": "variable",
293
+ "format": [
294
+ "camelCase",
295
+ "UPPER_CASE",
296
+ "PascalCase"
297
+ ]
298
+ }
299
+ ],
300
+ "@typescript-eslint/no-array-delete": "error",
301
+ "@typescript-eslint/no-base-to-string": "warn",
302
+ "@typescript-eslint/no-confusing-void-expression": "error",
303
+ "@typescript-eslint/no-deprecated": "error",
304
+ "@typescript-eslint/no-duplicate-type-constituents": "error",
305
+ "@typescript-eslint/no-floating-promises": "warn",
306
+ "@typescript-eslint/no-for-in-array": "error",
307
+ "@typescript-eslint/no-implied-eval": "error",
308
+ "@typescript-eslint/no-meaningless-void-operator": "error",
309
+ "@typescript-eslint/no-misused-promises": "error",
310
+ "@typescript-eslint/no-misused-spread": "error",
311
+ "@typescript-eslint/no-mixed-enums": "error",
312
+ "@typescript-eslint/no-redundant-type-constituents": "error",
313
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
314
+ "@typescript-eslint/no-unnecessary-condition": "error",
315
+ "@typescript-eslint/no-unnecessary-qualifier": "warn",
316
+ "@typescript-eslint/no-unnecessary-template-expression": "error",
317
+ "@typescript-eslint/no-unnecessary-type-arguments": "error",
318
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
319
+ "@typescript-eslint/no-unnecessary-type-conversion": "error",
320
+ "@typescript-eslint/no-unnecessary-type-parameters": "error",
321
+ "@typescript-eslint/no-unsafe-argument": "error",
322
+ "@typescript-eslint/no-unsafe-assignment": "error",
323
+ "@typescript-eslint/no-unsafe-call": "error",
324
+ "@typescript-eslint/no-unsafe-enum-comparison": "error",
325
+ "@typescript-eslint/no-unsafe-member-access": "error",
326
+ "@typescript-eslint/no-unsafe-return": "error",
327
+ "@typescript-eslint/no-unsafe-type-assertion": "error",
328
+ "@typescript-eslint/no-unsafe-unary-minus": "warn",
329
+ "@typescript-eslint/no-useless-default-assignment": "error",
330
+ "@typescript-eslint/non-nullable-type-assertion-style": "warn",
331
+ "@typescript-eslint/only-throw-error": "error",
332
+ "@typescript-eslint/prefer-destructuring": "error",
333
+ "@typescript-eslint/prefer-find": "error",
334
+ "@typescript-eslint/prefer-includes": "error",
335
+ "@typescript-eslint/prefer-nullish-coalescing": "error",
336
+ "@typescript-eslint/prefer-optional-chain": "error",
337
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
338
+ "@typescript-eslint/prefer-readonly": "error",
339
+ "@typescript-eslint/prefer-readonly-parameter-types": [
340
+ "error",
341
+ {
342
+ "ignoreInferredTypes": true
343
+ }
344
+ ],
345
+ "@typescript-eslint/prefer-reduce-type-parameter": "error",
346
+ "@typescript-eslint/prefer-regexp-exec": "warn",
347
+ "@typescript-eslint/prefer-return-this-type": "error",
348
+ "@typescript-eslint/prefer-string-starts-ends-with": "error",
349
+ "@typescript-eslint/promise-function-async": "error",
350
+ "@typescript-eslint/related-getter-setter-pairs": "error",
351
+ "@typescript-eslint/require-array-sort-compare": "error",
352
+ "@typescript-eslint/require-await": "error",
353
+ "@typescript-eslint/restrict-plus-operands": "error",
354
+ "@typescript-eslint/restrict-template-expressions": "error",
355
+ "@typescript-eslint/return-await": "error",
356
+ "@typescript-eslint/strict-boolean-expressions": "error",
357
+ "@typescript-eslint/strict-void-return": "off",
358
+ "@typescript-eslint/switch-exhaustiveness-check": "error",
359
+ "@typescript-eslint/unbound-method": "warn",
360
+ "@typescript-eslint/use-unknown-in-catch-callback-variable": "error"
361
+ }
362
+ }
@@ -2,4 +2,4 @@
2
2
  * Delay execution for a given duration.
3
3
  * @param ms - Duration in milliseconds (1000ms = 1 second)
4
4
  */
5
- export declare const wait: (ms: number) => Promise<unknown>;
5
+ export const wait = (ms: number) => new Promise(resolve => setTimeout(resolve, ms))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lenix",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "The All-in-one Package",
5
5
  "author": "Lenix",
6
6
  "license": "GPL-3.0",
@@ -24,17 +24,21 @@
24
24
  "type": "git",
25
25
  "url": "git+https://github.com/lenixdev/lenix.git"
26
26
  },
27
- "main": "./modules/dist/index.js",
28
- "types": "./modules/dist/index.d.ts",
29
- "bin": {
30
- "mac-lua-modules": "oop/mac-lua-modules.sh",
31
- "lenix": "./lint/dist/lint.mjs"
27
+ "main": "./modules/src/index.ts",
28
+ "types": "./modules/src/index.ts",
29
+ "exports": {
30
+ ".": "./modules/src/index.ts",
31
+ "./lint": "./modules/src/lint/preset.json"
32
32
  },
33
33
  "files": [
34
- "modules/dist",
34
+ "modules/src",
35
35
  "oop",
36
36
  "lint/dist"
37
37
  ],
38
+ "bin": {
39
+ "mac-lua-modules": "oop/mac-lua-modules.sh",
40
+ "lenix": "./lint/dist/lint.mjs"
41
+ },
38
42
  "dependencies": {
39
43
  "@eslint/js": "^10.0.1",
40
44
  "eslint": "^10.0.3",
@@ -52,7 +56,7 @@
52
56
  "typescript": "^5.3.3"
53
57
  },
54
58
  "scripts": {
55
- "build": "tsc -p modules/src/fxmanifest/tsconfig.json && tsc-alias && tsc -p lint/src/tsconfig.json",
59
+ "build-lint": "tsc -p lint/src/tsconfig.json",
56
60
  "bump": "pnpm version patch"
57
61
  }
58
62
  }
@@ -1,6 +0,0 @@
1
- /**
2
- * Get typed entries from an object (Typed Object.entries)
3
- * @param object - Object to get entries from
4
- * @returns Array of the passed entries
5
- */
6
- export declare const entries: <T extends Record<string, unknown>>(object: T) => Array<{ [K in keyof T]: [K, T[K]]; }[keyof T]>;
@@ -1,8 +0,0 @@
1
- /**
2
- * Get typed entries from an object (Typed Object.entries)
3
- * @param object - Object to get entries from
4
- * @returns Array of the passed entries
5
- */
6
- export const entries = (object) => {
7
- return Object.entries(object);
8
- };
@@ -1,6 +0,0 @@
1
- /**
2
- * @param domain - domain of the URL (e.g. api.github.com)
3
- * @param endpoint - endpoint of the URL (e.g. users/lenixdev)
4
- * @param request - request options (e.g. { method: 'GET' })
5
- */
6
- export declare const caughtFetch: (domain: string, endpoint: string, request?: RequestInit) => Promise<Response>;
@@ -1,16 +0,0 @@
1
- /**
2
- * @param domain - domain of the URL (e.g. api.github.com)
3
- * @param endpoint - endpoint of the URL (e.g. users/lenixdev)
4
- * @param request - request options (e.g. { method: 'GET' })
5
- */
6
- export const caughtFetch = async (domain, endpoint, request) => {
7
- try {
8
- return await fetch(`https://${domain}/${endpoint}`, request);
9
- }
10
- catch (error) {
11
- throw new Error('An error occurred while making the request.', { cause: error });
12
- }
13
- finally {
14
- console.debug(`End of ${domain}/${endpoint} request`);
15
- }
16
- };
@@ -1,14 +0,0 @@
1
- {
2
- "fx_version": "cerulean",
3
- "game": "gta5",
4
- "client_scripts": [
5
- "dist/client.js"
6
- ],
7
- "server_scripts": [
8
- "dist/server.js"
9
- ],
10
- "ui_page": "client/nui/dist/index.html",
11
- "files": [
12
- "client/nui/dist/**"
13
- ]
14
- }
@@ -1,4 +0,0 @@
1
- import { writeFile } from 'fs/promises';
2
- type FileContent = Parameters<typeof writeFile>[1];
3
- export declare const createFxmanifest: (content?: FileContent) => Promise<void>;
4
- export {};
@@ -1,23 +0,0 @@
1
- import { writeFile } from 'fs/promises';
2
- const fxmanifest = Object.entries((await import('./fxmanifest.json')).default);
3
- const generateContent = () => {
4
- let defaultContent = '';
5
- for (const [key, value] of fxmanifest) {
6
- if (Array.isArray(value)) {
7
- defaultContent +=
8
- `${key} {
9
- "${value}",
10
- }
11
- `;
12
- }
13
- else if (typeof value === 'string') {
14
- defaultContent +=
15
- `${key} "${value}"
16
- `;
17
- }
18
- else
19
- throw new Error('Invalid value type');
20
- }
21
- return defaultContent;
22
- };
23
- export const createFxmanifest = async (content) => await writeFile('fxmanifest.lua', content || generateContent());
@@ -1,4 +0,0 @@
1
- export { wait } from './wait';
2
- export { caughtFetch } from './fetch';
3
- export { entries } from './entries';
4
- export { lint } from './lint';
@@ -1,4 +0,0 @@
1
- export { wait } from './wait';
2
- export { caughtFetch } from './fetch';
3
- export { entries } from './entries';
4
- export { lint } from './lint';