pma-locals 1.0.0 → 1.0.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/README.md +56 -0
- package/dist/index.js +6 -0
- package/dist/shared/config.d.ts +10 -0
- package/dist/types/index.d.ts +10 -0
- package/package.json +27 -9
- package/client/main.ts +0 -33
- package/client/ped-handler.ts +0 -151
- package/client/tsconfig.json +0 -29
- package/definitions/Citizen.d.ts +0 -205
- package/definitions/index.d.ts +0 -4
- package/definitions/json.d.ts +0 -4
- package/definitions/redm.d.ts +0 -23571
- package/scripts/dev.js +0 -60
- package/server/main.ts +0 -0
- package/server/tsconfig.json +0 -25
- package/shared/config.ts +0 -11
- package/shared/tsconfig.json +0 -34
- package/tsconfig.json +0 -38
- package/types/index.ts +0 -11
package/scripts/dev.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import esbuild from 'esbuild';
|
|
2
|
-
import { spawn } from 'child_process';
|
|
3
|
-
|
|
4
|
-
/** @type {import('esbuild').BuildOptions} */
|
|
5
|
-
const server = {
|
|
6
|
-
platform: 'node',
|
|
7
|
-
target: ['node16'],
|
|
8
|
-
format: 'cjs',
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
/** @type {import('esbuild').BuildOptions} */
|
|
12
|
-
const client = {
|
|
13
|
-
platform: 'browser',
|
|
14
|
-
target: ['es2021'],
|
|
15
|
-
format: 'iife',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
function exec(command) {
|
|
19
|
-
return new Promise((resolve, reject) => {
|
|
20
|
-
const child = spawn(command, { stdio: 'inherit', shell: true });
|
|
21
|
-
|
|
22
|
-
child.on('exit', (code, signal) => {
|
|
23
|
-
if (code === 0) {
|
|
24
|
-
resolve({ code, signal });
|
|
25
|
-
} else {
|
|
26
|
-
reject(new Error(`Command '${command}' exited with code ${code} and signal ${signal}`));
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const environments = ['client', 'server'];
|
|
33
|
-
|
|
34
|
-
for (const context of environments) {
|
|
35
|
-
await esbuild.context({
|
|
36
|
-
bundle: true,
|
|
37
|
-
entryPoints: [`./${context}/main.ts`],
|
|
38
|
-
outfile: `dist/${context}.js`,
|
|
39
|
-
keepNames: true,
|
|
40
|
-
legalComments: 'inline',
|
|
41
|
-
plugins: [
|
|
42
|
-
{
|
|
43
|
-
name: 'rebuild',
|
|
44
|
-
setup(build) {
|
|
45
|
-
const cb = (result) => {
|
|
46
|
-
if (!result || result.errors.length === 0) console.log(`Successfully built ${context}`);
|
|
47
|
-
};
|
|
48
|
-
build.onEnd(cb);
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
],
|
|
52
|
-
...(context === 'client' ? client : server),
|
|
53
|
-
})
|
|
54
|
-
.then((build) => {
|
|
55
|
-
build.watch();
|
|
56
|
-
})
|
|
57
|
-
.catch(() => process.exit(1));
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// await exec(`cd ./web && vite ${'build --watch'}`);
|
package/server/main.ts
DELETED
|
File without changes
|
package/server/tsconfig.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"composite": true,
|
|
5
|
-
"types": [
|
|
6
|
-
"@types/node",
|
|
7
|
-
"@citizenfx/server",
|
|
8
|
-
"@nativewrappers/server",
|
|
9
|
-
"../definitions/index.ts"
|
|
10
|
-
],
|
|
11
|
-
"paths": {
|
|
12
|
-
"$types/*": [
|
|
13
|
-
"./../types/*",
|
|
14
|
-
],
|
|
15
|
-
"$shared/*": [
|
|
16
|
-
"./../shared/*"
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"include": [
|
|
21
|
-
"./",
|
|
22
|
-
"../types/*",
|
|
23
|
-
"../shared/*"
|
|
24
|
-
]
|
|
25
|
-
}
|
package/shared/config.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export const STATIONS = {
|
|
2
|
-
Valentine: [-276.17, 805.29, 119.38],
|
|
3
|
-
Strawberry: [-1807.85, -349.88, 164.66],
|
|
4
|
-
Blackwater: [-761.82, -1268.17, 44.04],
|
|
5
|
-
Tumbleweed: [-5528.0, -2952.85, -0.74],
|
|
6
|
-
Armadillo: [-3624.32, -2603.67, -13.34],
|
|
7
|
-
Rhodes: [1361.42, -1303.63, 77.77],
|
|
8
|
-
Annesburg: [2908.28, 1312.8, 45.0],
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const JAIL_COORDS = [];
|
package/shared/tsconfig.json
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"strictNullChecks": true,
|
|
4
|
-
"noImplicitAny": true,
|
|
5
|
-
"module": "es2022",
|
|
6
|
-
"target": "es6",
|
|
7
|
-
"allowJs": false,
|
|
8
|
-
"lib": [
|
|
9
|
-
"DOM"
|
|
10
|
-
],
|
|
11
|
-
"types": [
|
|
12
|
-
"@citizenfx/client",
|
|
13
|
-
"@citizenfx/server",
|
|
14
|
-
"@types/node",
|
|
15
|
-
],
|
|
16
|
-
"moduleResolution": "node",
|
|
17
|
-
"resolveJsonModule": true,
|
|
18
|
-
"esModuleInterop": true,
|
|
19
|
-
"sourceMap": true
|
|
20
|
-
},
|
|
21
|
-
"include": [
|
|
22
|
-
"./**/*",
|
|
23
|
-
"../typings/*",
|
|
24
|
-
"../../shared/*"
|
|
25
|
-
],
|
|
26
|
-
"exclude": [
|
|
27
|
-
"node_modules",
|
|
28
|
-
"**/__tests__/*"
|
|
29
|
-
],
|
|
30
|
-
"semi": [
|
|
31
|
-
true,
|
|
32
|
-
"always"
|
|
33
|
-
]
|
|
34
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"baseUrl": ".",
|
|
4
|
-
"rootDir": ".",
|
|
5
|
-
"outDir": "./dist/",
|
|
6
|
-
"noImplicitAny": true,
|
|
7
|
-
"strictNullChecks": true,
|
|
8
|
-
"module": "es2022",
|
|
9
|
-
"target": "es2021",
|
|
10
|
-
"lib": [
|
|
11
|
-
"es2022",
|
|
12
|
-
"dom",
|
|
13
|
-
"esnext.disposable"
|
|
14
|
-
],
|
|
15
|
-
"types": [
|
|
16
|
-
"@citizenfx/client",
|
|
17
|
-
"@citizenfx/server",
|
|
18
|
-
"@nativewrappers/redm",
|
|
19
|
-
"@nativewrappers/server"
|
|
20
|
-
],
|
|
21
|
-
"resolveJsonModule": true,
|
|
22
|
-
"esModuleInterop": true,
|
|
23
|
-
"allowUnreachableCode": false,
|
|
24
|
-
"strictFunctionTypes": true,
|
|
25
|
-
"moduleResolution": "bundler",
|
|
26
|
-
"noImplicitThis": true,
|
|
27
|
-
"noUnusedLocals": true,
|
|
28
|
-
"skipLibCheck": true,
|
|
29
|
-
"declaration": true,
|
|
30
|
-
"noEmit": false,
|
|
31
|
-
"emitDeclarationOnly": true,
|
|
32
|
-
"removeComments": true,
|
|
33
|
-
},
|
|
34
|
-
"include": [
|
|
35
|
-
"./shared/",
|
|
36
|
-
"./types/"
|
|
37
|
-
]
|
|
38
|
-
}
|