pma-locals 1.0.0

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/dist/server.js ADDED
File without changes
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "pma-locals",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "type": "module",
7
+ "scripts": {
8
+ "watch": "node ./scripts/dev.js",
9
+ "build": "node ./scripts/prod.js"
10
+ },
11
+ "keywords": [],
12
+ "author": "",
13
+ "license": "ISC",
14
+ "packageManager": "pnpm@10.15.0",
15
+ "dependencies": {
16
+ "@nativewrappers/redm": "^0.0.141",
17
+ "@nativewrappers/server": "^0.0.141",
18
+ "esbuild": "^0.27.2"
19
+ },
20
+ "devDependencies": {
21
+ "@citizenfx/client": "2.0.23683-1",
22
+ "@citizenfx/server": "2.0.23683-1",
23
+ "@types/node": "^25.0.3"
24
+ }
25
+ }
package/scripts/dev.js ADDED
@@ -0,0 +1,60 @@
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 ADDED
File without changes
@@ -0,0 +1,25 @@
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
+ }
@@ -0,0 +1,11 @@
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 = [];
@@ -0,0 +1,34 @@
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 ADDED
@@ -0,0 +1,38 @@
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
+ }
package/types/index.ts ADDED
@@ -0,0 +1,11 @@
1
+ export interface Animation {
2
+ dict: string;
3
+ anim: string;
4
+ }
5
+
6
+ export interface Props {
7
+ model: string;
8
+ boneId: number;
9
+ offset: number[];
10
+ rotation: number[];
11
+ }