lenix 1.6.4 → 1.7.1
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/LICENSE +21 -674
- package/client/_init.ts +11 -0
- package/client/blip.ts +50 -0
- package/client/cam.ts +141 -0
- package/client/client.ts +98 -0
- package/client/index.ts +15 -0
- package/client/nearest.ts +115 -0
- package/client/nui.ts +28 -0
- package/client/pool.ts +30 -0
- package/client/timer.ts +28 -0
- package/nui/focus.ts +10 -0
- package/nui/index.ts +10 -0
- package/nui/on.ts +29 -0
- package/nui/trigger.ts +24 -0
- package/package.json +19 -37
- package/server/index.ts +7 -0
- package/server/server.ts +11 -0
- package/shared/assert.ts +11 -0
- package/shared/index.ts +8 -0
- package/shared/types.ts +34 -0
- package/Readme.md +0 -59
- package/format/index.ts +0 -69
- package/format/preset.json +0 -10
- package/index.ts +0 -17
- package/modules/src/edge/index.ts +0 -22
- package/modules/src/entries/index.ts +0 -14
- package/modules/src/fetch/index.ts +0 -21
- package/modules/src/fxmanifest/fxmanifest.json +0 -8
- package/modules/src/fxmanifest/index.ts +0 -23
- package/modules/src/fxmanifest/tsconfig.json +0 -7
- package/modules/src/guard/index.ts +0 -11
- package/modules/src/index.ts +0 -6
- package/modules/src/lint/preset.json +0 -349
- package/modules/src/raise/index.ts +0 -11
- package/modules/src/wait/index.ts +0 -9
- package/oop/LICENSE +0 -21
- package/oop/README.md +0 -30
- package/oop/mac-lua-modules.sh +0 -65
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"strict": {
|
|
3
|
-
"accessor-pairs": "error",
|
|
4
|
-
"array-callback-return": "warn",
|
|
5
|
-
"arrow-body-style": "warn",
|
|
6
|
-
"block-scoped-var": "error",
|
|
7
|
-
"camelcase": "warn",
|
|
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": ["error", "multi"],
|
|
15
|
-
"default-case": "error",
|
|
16
|
-
"default-case-last": "error",
|
|
17
|
-
"default-param-last": "error",
|
|
18
|
-
"dot-notation": "error",
|
|
19
|
-
"eqeqeq": "error",
|
|
20
|
-
"for-direction": "error",
|
|
21
|
-
"func-name-matching": "error",
|
|
22
|
-
"func-names": "warn",
|
|
23
|
-
"func-style": "error",
|
|
24
|
-
"getter-return": "error",
|
|
25
|
-
"grouped-accessor-pairs": "error",
|
|
26
|
-
"guard-for-in": "warn",
|
|
27
|
-
"id-denylist": "warn",
|
|
28
|
-
"id-length": [
|
|
29
|
-
"warn",
|
|
30
|
-
{
|
|
31
|
-
"exceptions": ["_"]
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"id-match": "error",
|
|
35
|
-
"init-declarations": "error",
|
|
36
|
-
"logical-assignment-operators": "error",
|
|
37
|
-
"max-classes-per-file": "error",
|
|
38
|
-
"max-depth": "error",
|
|
39
|
-
"max-lines": "error",
|
|
40
|
-
"max-lines-per-function": "warn",
|
|
41
|
-
"max-nested-callbacks": "error",
|
|
42
|
-
"max-params": "error",
|
|
43
|
-
"max-statements": "error",
|
|
44
|
-
"new-cap": "warn",
|
|
45
|
-
"no-alert": "error",
|
|
46
|
-
"no-array-constructor": "warn",
|
|
47
|
-
"no-async-promise-executor": "warn",
|
|
48
|
-
"no-await-in-loop": "warn",
|
|
49
|
-
"no-bitwise": "warn",
|
|
50
|
-
"no-caller": "warn",
|
|
51
|
-
"no-case-declarations": "warn",
|
|
52
|
-
"no-class-assign": "error",
|
|
53
|
-
"no-compare-neg-zero": "error",
|
|
54
|
-
"no-cond-assign": "warn",
|
|
55
|
-
"no-console": "warn",
|
|
56
|
-
"no-const-assign": "error",
|
|
57
|
-
"no-constant-binary-expression": "warn",
|
|
58
|
-
"no-constant-condition": "warn",
|
|
59
|
-
"no-constructor-return": "error",
|
|
60
|
-
"no-continue": "error",
|
|
61
|
-
"no-control-regex": "warn",
|
|
62
|
-
"no-debugger": "error",
|
|
63
|
-
"no-delete-var": "error",
|
|
64
|
-
"no-div-regex": "warn",
|
|
65
|
-
"no-dupe-args": "error",
|
|
66
|
-
"no-dupe-class-members": "error",
|
|
67
|
-
"no-dupe-else-if": "error",
|
|
68
|
-
"no-dupe-keys": "error",
|
|
69
|
-
"no-duplicate-case": "error",
|
|
70
|
-
"no-duplicate-imports": "error",
|
|
71
|
-
"no-else-return": "error",
|
|
72
|
-
"no-empty": "error",
|
|
73
|
-
"no-empty-character-class": "warn",
|
|
74
|
-
"no-empty-function": "error",
|
|
75
|
-
"no-empty-pattern": "error",
|
|
76
|
-
"no-empty-static-block": "error",
|
|
77
|
-
"no-eq-null": "error",
|
|
78
|
-
"no-eval": "error",
|
|
79
|
-
"no-ex-assign": "error",
|
|
80
|
-
"no-extend-native": "warn",
|
|
81
|
-
"no-extra-bind": "warn",
|
|
82
|
-
"no-extra-boolean-cast": "warn",
|
|
83
|
-
"no-extra-label": "warn",
|
|
84
|
-
"no-fallthrough": "warn",
|
|
85
|
-
"no-func-assign": "error",
|
|
86
|
-
"no-global-assign": "error",
|
|
87
|
-
"no-implicit-coercion": "warn",
|
|
88
|
-
"no-implicit-globals": "error",
|
|
89
|
-
"no-implied-eval": "error",
|
|
90
|
-
"no-import-assign": "error",
|
|
91
|
-
"no-inline-comments": "warn",
|
|
92
|
-
"no-inner-declarations": "error",
|
|
93
|
-
"no-invalid-regexp": "warn",
|
|
94
|
-
"no-invalid-this": "error",
|
|
95
|
-
"no-irregular-whitespace": "warn",
|
|
96
|
-
"no-iterator": "warn",
|
|
97
|
-
"no-label-var": "error",
|
|
98
|
-
"no-labels": "error",
|
|
99
|
-
"no-lone-blocks": "error",
|
|
100
|
-
"no-lonely-if": "error",
|
|
101
|
-
"no-loop-func": "warn",
|
|
102
|
-
"no-loss-of-precision": "error",
|
|
103
|
-
"no-magic-numbers": [
|
|
104
|
-
"warn",
|
|
105
|
-
{
|
|
106
|
-
"detectObjects": true,
|
|
107
|
-
"enforceConst": true,
|
|
108
|
-
"ignoreReadonlyClassProperties": true
|
|
109
|
-
}
|
|
110
|
-
],
|
|
111
|
-
"no-misleading-character-class": "warn",
|
|
112
|
-
"no-multi-assign": "error",
|
|
113
|
-
"no-multi-str": "error",
|
|
114
|
-
"no-negated-condition": "warn",
|
|
115
|
-
"no-nested-ternary": "error",
|
|
116
|
-
"no-new": "error",
|
|
117
|
-
"no-new-func": "error",
|
|
118
|
-
"no-new-native-nonconstructor": "warn",
|
|
119
|
-
"no-new-wrappers": "warn",
|
|
120
|
-
"no-nonoctal-decimal-escape": "warn",
|
|
121
|
-
"no-obj-calls": "warn",
|
|
122
|
-
"no-object-constructor": "warn",
|
|
123
|
-
"no-octal": "error",
|
|
124
|
-
"no-octal-escape": "warn",
|
|
125
|
-
"no-param-reassign": "warn",
|
|
126
|
-
"no-plusplus": "warn",
|
|
127
|
-
"no-promise-executor-return": "error",
|
|
128
|
-
"no-proto": "warn",
|
|
129
|
-
"no-prototype-builtins": "warn",
|
|
130
|
-
"no-redeclare": "error",
|
|
131
|
-
"no-regex-spaces": "warn",
|
|
132
|
-
"no-restricted-exports": "error",
|
|
133
|
-
"no-restricted-globals": "warn",
|
|
134
|
-
"no-restricted-imports": "warn",
|
|
135
|
-
"no-restricted-properties": "warn",
|
|
136
|
-
"no-restricted-syntax": "warn",
|
|
137
|
-
"no-return-assign": "error",
|
|
138
|
-
"no-script-url": "warn",
|
|
139
|
-
"no-self-assign": "error",
|
|
140
|
-
"no-self-compare": "error",
|
|
141
|
-
"no-sequences": "warn",
|
|
142
|
-
"no-setter-return": "error",
|
|
143
|
-
"no-shadow": "warn",
|
|
144
|
-
"no-shadow-restricted-names": "error",
|
|
145
|
-
"no-sparse-arrays": "error",
|
|
146
|
-
"no-template-curly-in-string": "error",
|
|
147
|
-
"no-this-before-super": "error",
|
|
148
|
-
"no-throw-literal": "error",
|
|
149
|
-
"no-unassigned-vars": "error",
|
|
150
|
-
"no-undef": "error",
|
|
151
|
-
"no-undef-init": "error",
|
|
152
|
-
"no-undefined": "off",
|
|
153
|
-
"no-underscore-dangle": "warn",
|
|
154
|
-
"no-unexpected-multiline": "error",
|
|
155
|
-
"no-unmodified-loop-condition": "warn",
|
|
156
|
-
"no-unneeded-ternary": "error",
|
|
157
|
-
"no-unreachable": "error",
|
|
158
|
-
"no-unreachable-loop": "warn",
|
|
159
|
-
"no-unsafe-finally": "warn",
|
|
160
|
-
"no-unsafe-negation": "warn",
|
|
161
|
-
"no-unsafe-optional-chaining": "error",
|
|
162
|
-
"no-unused-expressions": "error",
|
|
163
|
-
"no-unused-labels": "error",
|
|
164
|
-
"no-unused-private-class-members": "error",
|
|
165
|
-
"no-unused-vars": "error",
|
|
166
|
-
"no-use-before-define": "error",
|
|
167
|
-
"no-useless-assignment": "error",
|
|
168
|
-
"no-useless-backreference": "warn",
|
|
169
|
-
"no-useless-call": "warn",
|
|
170
|
-
"no-useless-catch": "error",
|
|
171
|
-
"no-useless-computed-key": "warn",
|
|
172
|
-
"no-useless-concat": "error",
|
|
173
|
-
"no-useless-constructor": "warn",
|
|
174
|
-
"no-useless-escape": "warn",
|
|
175
|
-
"no-useless-rename": "error",
|
|
176
|
-
"no-useless-return": "error",
|
|
177
|
-
"no-var": "error",
|
|
178
|
-
"no-void": "error",
|
|
179
|
-
"no-warning-comments": "warn",
|
|
180
|
-
"no-with": "error",
|
|
181
|
-
"object-shorthand": "error",
|
|
182
|
-
"one-var": "off",
|
|
183
|
-
"operator-assignment": "warn",
|
|
184
|
-
"prefer-arrow-callback": "error",
|
|
185
|
-
"prefer-const": "error",
|
|
186
|
-
"prefer-destructuring": "error",
|
|
187
|
-
"prefer-exponentiation-operator": "error",
|
|
188
|
-
"prefer-named-capture-group": "warn",
|
|
189
|
-
"prefer-numeric-literals": "warn",
|
|
190
|
-
"prefer-object-has-own": "warn",
|
|
191
|
-
"prefer-object-spread": "error",
|
|
192
|
-
"prefer-promise-reject-errors": "warn",
|
|
193
|
-
"prefer-regex-literals": "warn",
|
|
194
|
-
"prefer-rest-params": "error",
|
|
195
|
-
"prefer-spread": "error",
|
|
196
|
-
"prefer-template": "error",
|
|
197
|
-
"preserve-caught-error": "error",
|
|
198
|
-
"radix": "warn",
|
|
199
|
-
"require-atomic-updates": "warn",
|
|
200
|
-
"require-await": "error",
|
|
201
|
-
"require-unicode-regexp": "warn",
|
|
202
|
-
"require-yield": "error",
|
|
203
|
-
"sort-imports": "off",
|
|
204
|
-
"sort-keys": "off",
|
|
205
|
-
"sort-vars": "error",
|
|
206
|
-
"strict": "error",
|
|
207
|
-
"symbol-description": "error",
|
|
208
|
-
"unicode-bom": "warn",
|
|
209
|
-
"use-isnan": "error",
|
|
210
|
-
"valid-typeof": "error",
|
|
211
|
-
"vars-on-top": "error",
|
|
212
|
-
"yoda": "error",
|
|
213
|
-
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
214
|
-
"@typescript-eslint/array-type": "error",
|
|
215
|
-
"@typescript-eslint/ban-ts-comment": "error",
|
|
216
|
-
"@typescript-eslint/ban-tslint-comment": "error",
|
|
217
|
-
"@typescript-eslint/class-literal-property-style": "warn",
|
|
218
|
-
"@typescript-eslint/class-methods-use-this": "warn",
|
|
219
|
-
"@typescript-eslint/consistent-generic-constructors": "error",
|
|
220
|
-
"@typescript-eslint/consistent-indexed-object-style": "error",
|
|
221
|
-
"@typescript-eslint/consistent-type-assertions": "error",
|
|
222
|
-
"@typescript-eslint/consistent-type-definitions": "error",
|
|
223
|
-
"@typescript-eslint/consistent-type-imports": "error",
|
|
224
|
-
"@typescript-eslint/default-param-last": "warn",
|
|
225
|
-
"@typescript-eslint/explicit-function-return-type": "off",
|
|
226
|
-
"@typescript-eslint/explicit-member-accessibility": "warn",
|
|
227
|
-
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
228
|
-
"@typescript-eslint/init-declarations": "error",
|
|
229
|
-
"@typescript-eslint/max-params": "error",
|
|
230
|
-
"@typescript-eslint/member-ordering": "error",
|
|
231
|
-
"@typescript-eslint/method-signature-style": "error",
|
|
232
|
-
"@typescript-eslint/no-array-constructor": "error",
|
|
233
|
-
"@typescript-eslint/no-confusing-non-null-assertion": "error",
|
|
234
|
-
"@typescript-eslint/no-duplicate-enum-values": "error",
|
|
235
|
-
"@typescript-eslint/no-dynamic-delete": "error",
|
|
236
|
-
"@typescript-eslint/no-empty-function": "error",
|
|
237
|
-
"@typescript-eslint/no-empty-object-type": "error",
|
|
238
|
-
"@typescript-eslint/no-explicit-any": "error",
|
|
239
|
-
"@typescript-eslint/no-extra-non-null-assertion": "error",
|
|
240
|
-
"@typescript-eslint/no-extraneous-class": "error",
|
|
241
|
-
"@typescript-eslint/no-import-type-side-effects": "error",
|
|
242
|
-
"@typescript-eslint/no-inferrable-types": "error",
|
|
243
|
-
"@typescript-eslint/no-invalid-void-type": "error",
|
|
244
|
-
"@typescript-eslint/no-loop-func": "error",
|
|
245
|
-
"@typescript-eslint/no-magic-numbers": "off",
|
|
246
|
-
"@typescript-eslint/no-misused-new": "error",
|
|
247
|
-
"@typescript-eslint/no-namespace": "error",
|
|
248
|
-
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "warn",
|
|
249
|
-
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
|
|
250
|
-
"@typescript-eslint/no-non-null-assertion": "error",
|
|
251
|
-
"@typescript-eslint/no-redeclare": "warn",
|
|
252
|
-
"@typescript-eslint/no-require-imports": "error",
|
|
253
|
-
"@typescript-eslint/no-restricted-imports": "warn",
|
|
254
|
-
"@typescript-eslint/no-restricted-types": "warn",
|
|
255
|
-
"@typescript-eslint/no-shadow": "warn",
|
|
256
|
-
"@typescript-eslint/no-this-alias": "error",
|
|
257
|
-
"@typescript-eslint/no-unnecessary-parameter-property-assignment": "error",
|
|
258
|
-
"@typescript-eslint/no-unnecessary-type-constraint": "error",
|
|
259
|
-
"@typescript-eslint/no-unsafe-declaration-merging": "error",
|
|
260
|
-
"@typescript-eslint/no-unsafe-function-type": "error",
|
|
261
|
-
"@typescript-eslint/no-unused-expressions": "warn",
|
|
262
|
-
"@typescript-eslint/no-unused-private-class-members": "error",
|
|
263
|
-
"@typescript-eslint/no-unused-vars": "off",
|
|
264
|
-
"@typescript-eslint/no-use-before-define": "error",
|
|
265
|
-
"@typescript-eslint/no-useless-constructor": "error",
|
|
266
|
-
"@typescript-eslint/no-useless-empty-export": "error",
|
|
267
|
-
"@typescript-eslint/no-wrapper-object-types": "error",
|
|
268
|
-
"@typescript-eslint/prefer-as-const": "error",
|
|
269
|
-
"@typescript-eslint/prefer-enum-initializers": "error",
|
|
270
|
-
"@typescript-eslint/prefer-for-of": "error",
|
|
271
|
-
"@typescript-eslint/prefer-function-type": "error",
|
|
272
|
-
"@typescript-eslint/prefer-literal-enum-member": "error",
|
|
273
|
-
"@typescript-eslint/prefer-namespace-keyword": "error",
|
|
274
|
-
"@typescript-eslint/triple-slash-reference": "error",
|
|
275
|
-
"@typescript-eslint/unified-signatures": "error",
|
|
276
|
-
"@typescript-eslint/await-thenable": "warn",
|
|
277
|
-
"@typescript-eslint/consistent-return": "off",
|
|
278
|
-
"@typescript-eslint/consistent-type-exports": "error",
|
|
279
|
-
"@typescript-eslint/dot-notation": "error",
|
|
280
|
-
"@typescript-eslint/naming-convention": [
|
|
281
|
-
"warn",
|
|
282
|
-
{
|
|
283
|
-
"selector": "variable",
|
|
284
|
-
"format": ["camelCase", "UPPER_CASE", "PascalCase"]
|
|
285
|
-
}
|
|
286
|
-
],
|
|
287
|
-
"@typescript-eslint/no-array-delete": "error",
|
|
288
|
-
"@typescript-eslint/no-base-to-string": "warn",
|
|
289
|
-
"@typescript-eslint/no-confusing-void-expression": "error",
|
|
290
|
-
"@typescript-eslint/no-deprecated": "error",
|
|
291
|
-
"@typescript-eslint/no-duplicate-type-constituents": "error",
|
|
292
|
-
"@typescript-eslint/no-floating-promises": "warn",
|
|
293
|
-
"@typescript-eslint/no-for-in-array": "error",
|
|
294
|
-
"@typescript-eslint/no-implied-eval": "error",
|
|
295
|
-
"@typescript-eslint/no-meaningless-void-operator": "error",
|
|
296
|
-
"@typescript-eslint/no-misused-promises": "error",
|
|
297
|
-
"@typescript-eslint/no-misused-spread": "error",
|
|
298
|
-
"@typescript-eslint/no-mixed-enums": "error",
|
|
299
|
-
"@typescript-eslint/no-redundant-type-constituents": "error",
|
|
300
|
-
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
|
|
301
|
-
"@typescript-eslint/no-unnecessary-condition": "error",
|
|
302
|
-
"@typescript-eslint/no-unnecessary-qualifier": "warn",
|
|
303
|
-
"@typescript-eslint/no-unnecessary-template-expression": "error",
|
|
304
|
-
"@typescript-eslint/no-unnecessary-type-arguments": "error",
|
|
305
|
-
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
306
|
-
"@typescript-eslint/no-unnecessary-type-conversion": "error",
|
|
307
|
-
"@typescript-eslint/no-unnecessary-type-parameters": "error",
|
|
308
|
-
"@typescript-eslint/no-unsafe-argument": "warn",
|
|
309
|
-
"@typescript-eslint/no-unsafe-assignment": "warn",
|
|
310
|
-
"@typescript-eslint/no-unsafe-call": "warn",
|
|
311
|
-
"@typescript-eslint/no-unsafe-enum-comparison": "error",
|
|
312
|
-
"@typescript-eslint/no-unsafe-member-access": "warn",
|
|
313
|
-
"@typescript-eslint/no-unsafe-return": "error",
|
|
314
|
-
"@typescript-eslint/no-unsafe-type-assertion": "error",
|
|
315
|
-
"@typescript-eslint/no-unsafe-unary-minus": "warn",
|
|
316
|
-
"@typescript-eslint/no-useless-default-assignment": "error",
|
|
317
|
-
"@typescript-eslint/non-nullable-type-assertion-style": "warn",
|
|
318
|
-
"@typescript-eslint/only-throw-error": "error",
|
|
319
|
-
"@typescript-eslint/prefer-destructuring": "error",
|
|
320
|
-
"@typescript-eslint/prefer-find": "error",
|
|
321
|
-
"@typescript-eslint/prefer-includes": "error",
|
|
322
|
-
"@typescript-eslint/prefer-nullish-coalescing": "error",
|
|
323
|
-
"@typescript-eslint/prefer-optional-chain": "error",
|
|
324
|
-
"@typescript-eslint/prefer-promise-reject-errors": "error",
|
|
325
|
-
"@typescript-eslint/prefer-readonly": "error",
|
|
326
|
-
"@typescript-eslint/prefer-readonly-parameter-types": [
|
|
327
|
-
"off",
|
|
328
|
-
{
|
|
329
|
-
"ignoreInferredTypes": true
|
|
330
|
-
}
|
|
331
|
-
],
|
|
332
|
-
"@typescript-eslint/prefer-reduce-type-parameter": "error",
|
|
333
|
-
"@typescript-eslint/prefer-regexp-exec": "warn",
|
|
334
|
-
"@typescript-eslint/prefer-return-this-type": "error",
|
|
335
|
-
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
|
336
|
-
"@typescript-eslint/promise-function-async": "error",
|
|
337
|
-
"@typescript-eslint/related-getter-setter-pairs": "error",
|
|
338
|
-
"@typescript-eslint/require-array-sort-compare": "error",
|
|
339
|
-
"@typescript-eslint/require-await": "error",
|
|
340
|
-
"@typescript-eslint/restrict-plus-operands": "error",
|
|
341
|
-
"@typescript-eslint/restrict-template-expressions": "error",
|
|
342
|
-
"@typescript-eslint/return-await": "error",
|
|
343
|
-
"@typescript-eslint/strict-boolean-expressions": "error",
|
|
344
|
-
"@typescript-eslint/strict-void-return": "off",
|
|
345
|
-
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
346
|
-
"@typescript-eslint/unbound-method": "warn",
|
|
347
|
-
"@typescript-eslint/use-unknown-in-catch-callback-variable": "error"
|
|
348
|
-
}
|
|
349
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Throws an error.
|
|
3
|
-
* @param error - The error to throw, can be a source of the error.
|
|
4
|
-
* @param cause - The cause of the error.
|
|
5
|
-
* @returns never, will crash the runtime.
|
|
6
|
-
* @example
|
|
7
|
-
* foo().catch(raise)
|
|
8
|
-
*/
|
|
9
|
-
export const raise = (error: unknown, cause?: unknown): never => {
|
|
10
|
-
throw new Error(String(error), { cause })
|
|
11
|
-
}
|
package/oop/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Lenix
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/oop/README.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Lua Object Oriented Programming Class Module
|
|
2
|
-
|
|
3
|
-
Lua object oriented programming class module allow you to use oop similar to the TypeScript/JavaScript/Java/C++ Classes
|
|
4
|
-
|
|
5
|
-
## Lua Modules Setup
|
|
6
|
-
|
|
7
|
-
Auto-configure Lua to use `./lua_modules` (like `node_modules`) instead of unorganized directories.
|
|
8
|
-
|
|
9
|
-
### Install
|
|
10
|
-
|
|
11
|
-
- MAC
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npx mac-lua-modules
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
### Usage
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
# Install Lua packages
|
|
21
|
-
luarocks install --tree ./lua_modules inspect
|
|
22
|
-
|
|
23
|
-
# Use in code (no setup needed)
|
|
24
|
-
local inspect = require('inspect')
|
|
25
|
-
print(inspect({name = "Lenix"}))
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### What it does
|
|
29
|
-
|
|
30
|
-
Adds environment variables to your shell config (for mac users: `~/.zshrc` or `~/.bashrc`) to automatically change your Lua modules configurations to `./lua_modules` instead of hidden nested directories.
|
package/oop/mac-lua-modules.sh
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
if [ -n "$ZSH_VERSION" ]; then
|
|
4
|
-
SHELL_CONFIG="${HOME}/.zshrc"
|
|
5
|
-
elif [ -n "$BASH_VERSION" ]; then
|
|
6
|
-
SHELL_CONFIG="${HOME}/.bashrc"
|
|
7
|
-
PROFILE_CONFIG="${HOME}/.bash_profile"
|
|
8
|
-
else
|
|
9
|
-
SHELL_CONFIG="${HOME}/.profile"
|
|
10
|
-
fi
|
|
11
|
-
|
|
12
|
-
touch "$SHELL_CONFIG"
|
|
13
|
-
|
|
14
|
-
echo "===================================="
|
|
15
|
-
echo "Lua Modules Setup"
|
|
16
|
-
echo "===================================="
|
|
17
|
-
echo ""
|
|
18
|
-
echo "This script will add the following lines to: $SHELL_CONFIG"
|
|
19
|
-
echo ""
|
|
20
|
-
echo "eval \$(luarocks path --bin)"
|
|
21
|
-
echo "export LUA_PATH=\"./lua_modules/share/lua/5.4/?.lua;./lua_modules/share/lua/5.4/?/init.lua;;\""
|
|
22
|
-
echo "export LUA_CPATH=\"./lua_modules/lib/lua/5.4/?.so;;\""
|
|
23
|
-
echo ""
|
|
24
|
-
read -p "Continue? (y/n) " -n 1 -r
|
|
25
|
-
echo ""
|
|
26
|
-
|
|
27
|
-
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
28
|
-
echo "Installation cancelled."
|
|
29
|
-
exit 1
|
|
30
|
-
fi
|
|
31
|
-
|
|
32
|
-
if grep -q "# Lua local modules setup" "$SHELL_CONFIG"; then
|
|
33
|
-
echo " Already installed in $SHELL_CONFIG"
|
|
34
|
-
echo "Installation aborted."
|
|
35
|
-
exit 0
|
|
36
|
-
fi
|
|
37
|
-
|
|
38
|
-
echo '' >> "$SHELL_CONFIG"
|
|
39
|
-
echo '# Lua local modules setup' >> "$SHELL_CONFIG"
|
|
40
|
-
echo 'eval $(luarocks path --bin)' >> "$SHELL_CONFIG"
|
|
41
|
-
echo 'export LUA_PATH="./lua_modules/share/lua/5.4/?.lua;./lua_modules/share/lua/5.4/?/init.lua;;"' >> "$SHELL_CONFIG"
|
|
42
|
-
echo 'export LUA_CPATH="./lua_modules/lib/lua/5.4/?.so;;"' >> "$SHELL_CONFIG"
|
|
43
|
-
echo '# Lua local modules end.' >> "$SHELL_CONFIG"
|
|
44
|
-
|
|
45
|
-
if [ -n "$BASH_VERSION" ] && [ -n "$PROFILE_CONFIG" ]; then
|
|
46
|
-
touch "$PROFILE_CONFIG"
|
|
47
|
-
if ! grep -q "source.*bashrc" "$PROFILE_CONFIG"; then
|
|
48
|
-
echo '' >> "$PROFILE_CONFIG"
|
|
49
|
-
echo '# Source .bashrc' >> "$PROFILE_CONFIG"
|
|
50
|
-
echo 'if [ -f ~/.bashrc ]; then source ~/.bashrc; fi' >> "$PROFILE_CONFIG"
|
|
51
|
-
fi
|
|
52
|
-
fi
|
|
53
|
-
|
|
54
|
-
source "$SHELL_CONFIG" 2>/dev/null || true
|
|
55
|
-
|
|
56
|
-
echo ""
|
|
57
|
-
echo "Setup complete!"
|
|
58
|
-
echo "Added to: $SHELL_CONFIG"
|
|
59
|
-
echo ""
|
|
60
|
-
echo "Usage:"
|
|
61
|
-
echo " luarocks install --tree ./lua_modules <package>"
|
|
62
|
-
echo ""
|
|
63
|
-
echo " IMPORTANT: Restart your terminal for changes to take effect"
|
|
64
|
-
echo ""
|
|
65
|
-
echo "To undo, remove lines containing '# Lua local modules setup' from $SHELL_CONFIG"
|