@jpp-toolkit/plugin-build-fivem 0.0.33 → 0.0.35

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["timeoutId: NodeJS.Timeout","rconOptions: RconOptions | undefined"],"sources":["../src/fivem-rcon.ts","../src/fivem-build-command.ts","../src/index.ts"],"sourcesContent":["import dgram from 'node:dgram';\n\nimport { getErrMsg } from '@jpp-toolkit/utils';\n\nexport type RconOptions = {\n readonly host: string;\n readonly port: number;\n readonly password: string;\n readonly timeout?: number | undefined;\n};\n\nfunction buildCommand(command: string, password: string): Buffer {\n const buffer = Buffer.alloc(11 + password.length + command.length);\n buffer.writeUInt32LE(0xffffffff, 0);\n buffer.write('rcon ', 4);\n buffer.write(password, 9, password.length);\n buffer.write(' ', 9 + password.length, 1);\n buffer.write(command, 10 + password.length, command.length);\n buffer.write('\\n', 10 + password.length + command.length, 1);\n return buffer;\n}\n\nexport async function sendFivemRcon(command: string, options: RconOptions): Promise<string> {\n const socket = dgram.createSocket('udp4');\n\n return new Promise<string>((resolve, reject) => {\n let timeoutId: NodeJS.Timeout;\n\n const handleError = (err?: Error | string | null) => {\n if (!err) return;\n clearTimeout(timeoutId);\n const msg = getErrMsg(err);\n reject(new Error(`Failed to send command to ${options.host}:${options.port}: ${msg}`));\n };\n\n const handleMessage = (msg: Buffer) => {\n clearTimeout(timeoutId);\n const res = msg.toString('ascii').slice(4).trim();\n if (res.includes('Invalid password')) return void handleError('Invalid password');\n resolve(res);\n };\n\n timeoutId = setTimeout(\n () => handleError(`Timeout after ${options.timeout}ms`),\n options.timeout ?? 5000,\n );\n\n socket.once('error', handleError);\n socket.once('message', handleMessage);\n\n const cmd = buildCommand(command, options.password);\n socket.send(cmd, 0, cmd.length, options.port, options.host, handleError);\n }).finally(() => {\n socket.close();\n });\n}\n\nexport async function refreshAndEnsureFivemResource(\n resourceName: string,\n options: RconOptions,\n): Promise<void> {\n const res = await sendFivemRcon(`refresh; ensure ${resourceName}`, options);\n if (res.includes(\"Couldn't find resource\"))\n throw new Error(`Resource \"${resourceName}\" not found`);\n if (!res.includes('Started resource'))\n throw new Error(`Failed to start resource \"${resourceName}\"`);\n}\n","import path from 'node:path';\n\nimport { Command } from '@jpp-toolkit/core';\nimport {\n createFivemScriptRspackConfig,\n createFivemUiRspackConfig,\n} from '@jpp-toolkit/rspack-config';\nimport { debounce } from '@jpp-toolkit/utils';\nimport { Flags } from '@oclif/core';\nimport type { MultiStats, Stats } from '@rspack/core';\nimport { rspack } from '@rspack/core';\nimport { RspackDevServer } from '@rspack/dev-server';\n\nimport { refreshAndEnsureFivemResource } from './fivem-rcon';\nimport type { RconOptions } from './fivem-rcon';\n\ntype FivemBuildCommandOptions = {\n readonly resourceName: string;\n readonly rconOptions?: RconOptions | undefined;\n readonly watch: boolean;\n};\n\nexport class FivemBuildCommand extends Command {\n static override summary = 'Build the FiveM resource using predefined config.';\n\n static override flags = {\n watch: Flags.boolean({\n char: 'w',\n description: 'Watch files for changes and rebuild automatically.',\n default: false,\n }),\n autoReload: Flags.boolean({\n char: 'r',\n description: 'Automatically reload FiveM resource after build.',\n default: false,\n }),\n server: Flags.string({\n char: 's',\n description: 'Server \"ip:port\" to connect for reloading FiveM resource after build.',\n default: '127.0.0.1:30120',\n required: false,\n }),\n password: Flags.string({\n char: 'p',\n description: 'RCON password for the FiveM server to reload resource after build.',\n required: false,\n }),\n resourceName: Flags.string({\n char: 'n',\n description:\n 'Name of the FiveM resource to reload. If not provided, the name of the folder containing the resource will be used.',\n required: false,\n }),\n };\n\n static override examples = [\n {\n description: 'Build the FiveM resource.',\n command: '<%= config.bin %> <%= command.id %>',\n },\n {\n description: 'Build the FiveM resource in watch mode.',\n command: '<%= config.bin %> <%= command.id %> --watch',\n },\n {\n description:\n 'Build the FiveM resource and automatically reload it on the server after build.',\n command:\n '<%= config.bin %> <%= command.id %> --auto-reload --password your_rcon_password',\n },\n {\n description:\n 'Build the FiveM resource in watch mode and automatically reload it on the server after each build.',\n command:\n '<%= config.bin %> <%= command.id %> --watch --auto-reload --password your_rcon_password',\n },\n {\n description:\n 'Build the FiveM resource and connect to a specific server for auto-reload.',\n command:\n '<%= config.bin %> <%= command.id %> --auto-reload --server=127.0.0.1:30120 --password your_rcon_password',\n },\n ];\n\n public async run(): Promise<void> {\n const { resourceName, rconOptions, watch } = await this._parseOptions();\n\n const scriptConfig = createFivemScriptRspackConfig(undefined, {\n isProduction: !watch,\n })({\n RSPACK_BUILD: !watch,\n RSPACK_WATCH: watch,\n });\n const scriptCompiler = rspack(scriptConfig);\n\n const uiConfig = createFivemUiRspackConfig(\n { resourceName },\n { isProduction: !watch },\n )({\n RSPACK_BUILD: !watch,\n RSPACK_SERVE: watch,\n });\n const uiCompiler = rspack(uiConfig);\n\n const reloadFivemResource = debounce(async () => {\n if (!rconOptions) return;\n this.logger.log('');\n this.logger.info(`Reloading FiveM resource \"${resourceName}\"...`);\n try {\n await refreshAndEnsureFivemResource(resourceName, rconOptions);\n this.logger.success(`FiveM resource reloaded successfully.\\n`);\n } catch (error) {\n this.logger.error(`Failed to reload FiveM resource: ${error}\\n`);\n }\n }, 500);\n\n const compilerCallback = (err: Error | null, stats: Stats | MultiStats | undefined) => {\n if (err) {\n this.logger.error(err.toString());\n return;\n }\n if (!stats) return;\n this.logger.log(stats.toString({ preset: 'normal', colors: true }), '\\n');\n void reloadFivemResource();\n };\n\n if (watch) {\n const devServerOptions = uiConfig.devServer ?? {};\n devServerOptions.hot = true;\n const devServer = new RspackDevServer(devServerOptions, uiCompiler);\n await devServer.start();\n scriptCompiler.watch({}, compilerCallback);\n } else {\n uiCompiler.run((error: Error | null, stats: Stats | MultiStats | undefined) => {\n uiCompiler.close((closeErr) => {\n if (closeErr) this.logger.error(closeErr.toString());\n compilerCallback(error, stats);\n });\n });\n scriptCompiler.run((error: Error | null, stats: Stats | MultiStats | undefined) => {\n scriptCompiler.close((closeErr) => {\n if (closeErr) this.logger.error(closeErr.toString());\n compilerCallback(error, stats);\n });\n });\n }\n }\n\n private async _parseOptions(): Promise<FivemBuildCommandOptions> {\n const { flags } = await this.parse(FivemBuildCommand);\n\n const resourceName = flags.resourceName ?? path.basename(process.cwd());\n\n let rconOptions: RconOptions | undefined;\n\n if (flags.autoReload) {\n if (!flags.password) {\n throw new Error(\n 'RCON password is required for auto-reload. Please provide it using the --password flag.',\n );\n }\n\n const match = /^(?<host>[^:]+):(?<port>\\d+)$/u.exec(flags.server);\n const { host, port } = match?.groups ?? {};\n\n if (!host || !port) {\n throw new Error(\n `Invalid server address format: ${flags.server}. Expected format is \"ip:port\".`,\n );\n }\n\n rconOptions = {\n host,\n port: parseInt(port),\n password: flags.password,\n };\n }\n\n return { resourceName, rconOptions, watch: flags.watch };\n }\n}\n","import { FivemBuildCommand } from './fivem-build-command';\n\nexport const commands = {\n 'build:fivem': FivemBuildCommand,\n};\n"],"mappings":";;;;;;;;;;AAWA,SAAS,aAAa,SAAiB,UAA0B;CAC7D,MAAM,SAAS,OAAO,MAAM,KAAK,SAAS,SAAS,QAAQ,OAAO;AAClE,QAAO,cAAc,YAAY,EAAE;AACnC,QAAO,MAAM,SAAS,EAAE;AACxB,QAAO,MAAM,UAAU,GAAG,SAAS,OAAO;AAC1C,QAAO,MAAM,KAAK,IAAI,SAAS,QAAQ,EAAE;AACzC,QAAO,MAAM,SAAS,KAAK,SAAS,QAAQ,QAAQ,OAAO;AAC3D,QAAO,MAAM,MAAM,KAAK,SAAS,SAAS,QAAQ,QAAQ,EAAE;AAC5D,QAAO;;AAGX,eAAsB,cAAc,SAAiB,SAAuC;CACxF,MAAM,SAAS,MAAM,aAAa,OAAO;AAEzC,QAAO,IAAI,SAAiB,SAAS,WAAW;EAC5C,IAAIA;EAEJ,MAAM,eAAe,QAAgC;AACjD,OAAI,CAAC,IAAK;AACV,gBAAa,UAAU;GACvB,MAAM,MAAM,UAAU,IAAI;AAC1B,0BAAO,IAAI,MAAM,6BAA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SACvC;AACH,cAAW,KAAK,OAAqB,UAA0C;AAC3E,eAAW,OAAO,aAAa;AAC3B,SAAI,SAAU,MAAK,OAAO,MAAM,SAAS,UAAU,CAAC;AACpD,sBAAiB,OAAO,MAAM;MAChC;KACJ;AACF,kBAAe,KAAK,OAAqB,UAA0C;AAC/E,mBAAe,OAAO,aAAa;AAC/B,SAAI,SAAU,MAAK,OAAO,MAAM,SAAS,UAAU,CAAC;AACpD,sBAAiB,OAAO,MAAM;MAChC;KACJ;;;CAIV,MAAc,gBAAmD;EAC7D,MAAM,EAAE,UAAU,MAAM,KAAK,MAAM,kBAAkB;EAErD,MAAM,eAAe,MAAM,gBAAgB,KAAK,SAAS,QAAQ,KAAK,CAAC;EAEvE,IAAIC;AAEJ,MAAI,MAAM,YAAY;AAClB,OAAI,CAAC,MAAM,SACP,OAAM,IAAI,MACN,0FACH;GAIL,MAAM,EAAE,MAAM,SADA,iCAAiC,KAAK,MAAM,OAAO,EACnC,UAAU,EAAE;AAE1C,OAAI,CAAC,QAAQ,CAAC,KACV,OAAM,IAAI,MACN,kCAAkC,MAAM,OAAO,iCAClD;AAGL,iBAAc;IACV;IACA,MAAM,SAAS,KAAK;IACpB,UAAU,MAAM;IACnB;;AAGL,SAAO;GAAE;GAAc;GAAa,OAAO,MAAM;GAAO;;;;;;AChLhE,MAAa,WAAW,EACpB,eAAe,mBAClB"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/fivem-rcon.ts","../src/fivem-build-command.ts","../src/index.ts"],"sourcesContent":["import dgram from 'node:dgram';\n\nimport { getErrMsg } from '@jpp-toolkit/utils';\n\nexport type RconOptions = {\n readonly host: string;\n readonly port: number;\n readonly password: string;\n readonly timeout?: number | undefined;\n};\n\nfunction buildCommand(command: string, password: string): Buffer {\n const buffer = Buffer.alloc(11 + password.length + command.length);\n buffer.writeUInt32LE(0xffffffff, 0);\n buffer.write('rcon ', 4);\n buffer.write(password, 9, password.length);\n buffer.write(' ', 9 + password.length, 1);\n buffer.write(command, 10 + password.length, command.length);\n buffer.write('\\n', 10 + password.length + command.length, 1);\n return buffer;\n}\n\nexport async function sendFivemRcon(command: string, options: RconOptions): Promise<string> {\n const socket = dgram.createSocket('udp4');\n\n return new Promise<string>((resolve, reject) => {\n let timeoutId: NodeJS.Timeout;\n\n const handleError = (err?: Error | string | null) => {\n if (!err) return;\n clearTimeout(timeoutId);\n const msg = getErrMsg(err);\n reject(new Error(`Failed to send command to ${options.host}:${options.port}: ${msg}`));\n };\n\n const handleMessage = (msg: Buffer) => {\n clearTimeout(timeoutId);\n const res = msg.toString('ascii').slice(4).trim();\n if (res.includes('Invalid password')) return void handleError('Invalid password');\n resolve(res);\n };\n\n timeoutId = setTimeout(\n () => handleError(`Timeout after ${options.timeout}ms`),\n options.timeout ?? 5000,\n );\n\n socket.once('error', handleError);\n socket.once('message', handleMessage);\n\n const cmd = buildCommand(command, options.password);\n socket.send(cmd, 0, cmd.length, options.port, options.host, handleError);\n }).finally(() => {\n socket.close();\n });\n}\n\nexport async function refreshAndEnsureFivemResource(\n resourceName: string,\n options: RconOptions,\n): Promise<void> {\n const res = await sendFivemRcon(`refresh; ensure ${resourceName}`, options);\n if (res.includes(\"Couldn't find resource\"))\n throw new Error(`Resource \"${resourceName}\" not found`);\n if (!res.includes('Started resource'))\n throw new Error(`Failed to start resource \"${resourceName}\"`);\n}\n","import path from 'node:path';\n\nimport { Command } from '@jpp-toolkit/core';\nimport {\n createFivemScriptRspackConfig,\n createFivemUiRspackConfig,\n} from '@jpp-toolkit/rspack-config';\nimport { debounce } from '@jpp-toolkit/utils';\nimport { Flags } from '@oclif/core';\nimport type { MultiStats, Stats } from '@rspack/core';\nimport { rspack } from '@rspack/core';\nimport { RspackDevServer } from '@rspack/dev-server';\n\nimport { refreshAndEnsureFivemResource } from './fivem-rcon';\nimport type { RconOptions } from './fivem-rcon';\n\ntype FivemBuildCommandOptions = {\n readonly resourceName: string;\n readonly rconOptions?: RconOptions | undefined;\n readonly watch: boolean;\n};\n\nexport class FivemBuildCommand extends Command {\n static override summary = 'Build the FiveM resource using predefined config.';\n\n static override flags = {\n watch: Flags.boolean({\n char: 'w',\n description: 'Watch files for changes and rebuild automatically.',\n default: false,\n }),\n autoReload: Flags.boolean({\n char: 'r',\n description: 'Automatically reload FiveM resource after build.',\n default: false,\n }),\n server: Flags.string({\n char: 's',\n description: 'Server \"ip:port\" to connect for reloading FiveM resource after build.',\n default: '127.0.0.1:30120',\n required: false,\n }),\n password: Flags.string({\n char: 'p',\n description: 'RCON password for the FiveM server to reload resource after build.',\n required: false,\n }),\n resourceName: Flags.string({\n char: 'n',\n description:\n 'Name of the FiveM resource to reload. If not provided, the name of the folder containing the resource will be used.',\n required: false,\n }),\n };\n\n static override examples = [\n {\n description: 'Build the FiveM resource.',\n command: '<%= config.bin %> <%= command.id %>',\n },\n {\n description: 'Build the FiveM resource in watch mode.',\n command: '<%= config.bin %> <%= command.id %> --watch',\n },\n {\n description:\n 'Build the FiveM resource and automatically reload it on the server after build.',\n command:\n '<%= config.bin %> <%= command.id %> --auto-reload --password your_rcon_password',\n },\n {\n description:\n 'Build the FiveM resource in watch mode and automatically reload it on the server after each build.',\n command:\n '<%= config.bin %> <%= command.id %> --watch --auto-reload --password your_rcon_password',\n },\n {\n description:\n 'Build the FiveM resource and connect to a specific server for auto-reload.',\n command:\n '<%= config.bin %> <%= command.id %> --auto-reload --server=127.0.0.1:30120 --password your_rcon_password',\n },\n ];\n\n public async run(): Promise<void> {\n const { resourceName, rconOptions, watch } = await this._parseOptions();\n\n const scriptConfig = createFivemScriptRspackConfig(undefined, {\n isProduction: !watch,\n })({\n RSPACK_BUILD: !watch,\n RSPACK_WATCH: watch,\n });\n const scriptCompiler = rspack(scriptConfig);\n\n const uiConfig = createFivemUiRspackConfig(\n { resourceName },\n { isProduction: !watch },\n )({\n RSPACK_BUILD: !watch,\n RSPACK_SERVE: watch,\n });\n const uiCompiler = rspack(uiConfig);\n\n const reloadFivemResource = debounce(async () => {\n if (!rconOptions) return;\n this.logger.log('');\n this.logger.info(`Reloading FiveM resource \"${resourceName}\"...`);\n try {\n await refreshAndEnsureFivemResource(resourceName, rconOptions);\n this.logger.success(`FiveM resource reloaded successfully.\\n`);\n } catch (error) {\n this.logger.error(`Failed to reload FiveM resource: ${error}\\n`);\n }\n }, 500);\n\n const compilerCallback = (err: Error | null, stats: Stats | MultiStats | undefined) => {\n if (err) {\n this.logger.error(err.toString());\n return;\n }\n if (!stats) return;\n this.logger.log(stats.toString({ preset: 'normal', colors: true }), '\\n');\n void reloadFivemResource();\n };\n\n if (watch) {\n const devServerOptions = uiConfig.devServer ?? {};\n devServerOptions.hot = true;\n const devServer = new RspackDevServer(devServerOptions, uiCompiler);\n await devServer.start();\n scriptCompiler.watch({}, compilerCallback);\n } else {\n uiCompiler.run((error: Error | null, stats: Stats | MultiStats | undefined) => {\n uiCompiler.close((closeErr) => {\n if (closeErr) this.logger.error(closeErr.toString());\n compilerCallback(error, stats);\n });\n });\n scriptCompiler.run((error: Error | null, stats: Stats | MultiStats | undefined) => {\n scriptCompiler.close((closeErr) => {\n if (closeErr) this.logger.error(closeErr.toString());\n compilerCallback(error, stats);\n });\n });\n }\n }\n\n private async _parseOptions(): Promise<FivemBuildCommandOptions> {\n const { flags } = await this.parse(FivemBuildCommand);\n\n const resourceName = flags.resourceName ?? path.basename(process.cwd());\n\n let rconOptions: RconOptions | undefined;\n\n if (flags.autoReload) {\n if (!flags.password) {\n throw new Error(\n 'RCON password is required for auto-reload. Please provide it using the --password flag.',\n );\n }\n\n const match = /^(?<host>[^:]+):(?<port>\\d+)$/u.exec(flags.server);\n const { host, port } = match?.groups ?? {};\n\n if (!host || !port) {\n throw new Error(\n `Invalid server address format: ${flags.server}. Expected format is \"ip:port\".`,\n );\n }\n\n rconOptions = {\n host,\n port: parseInt(port),\n password: flags.password,\n };\n }\n\n return { resourceName, rconOptions, watch: flags.watch };\n }\n}\n","import { FivemBuildCommand } from './fivem-build-command';\n\nexport const commands = {\n 'build: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,MAAM,SADA,iCAAiC,KAAK,MAAM,OAAO,EACnC,UAAU,EAAE;AAE1C,OAAI,CAAC,QAAQ,CAAC,KACV,OAAM,IAAI,MACN,kCAAkC,MAAM,OAAO,iCAClD;AAGL,iBAAc;IACV;IACA,MAAM,SAAS,KAAK;IACpB,UAAU,MAAM;IACnB;;AAGL,SAAO;GAAE;GAAc;GAAa,OAAO,MAAM;GAAO;;;;;;AChLhE,MAAa,WAAW,EACpB,eAAe,mBAClB"}
@@ -79,5 +79,5 @@
79
79
  "summary": "Build the FiveM resource using predefined config."
80
80
  }
81
81
  },
82
- "version": "0.0.33"
82
+ "version": "0.0.35"
83
83
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jpp-toolkit/plugin-build-fivem",
3
- "version": "0.0.33",
3
+ "version": "0.0.35",
4
4
  "description": "Plugin that add the fivem build command to the jpp cli.",
5
5
  "keywords": [
6
6
  "jpp",
@@ -37,12 +37,12 @@
37
37
  "@oclif/core": "4.8.0",
38
38
  "@rspack/core": "1.7.1",
39
39
  "@rspack/dev-server": "1.1.5",
40
- "@jpp-toolkit/rspack-config": "0.0.15",
41
- "@jpp-toolkit/utils": "0.0.19",
42
- "@jpp-toolkit/core": "0.0.21"
40
+ "@jpp-toolkit/core": "0.0.22",
41
+ "@jpp-toolkit/rspack-config": "0.0.16",
42
+ "@jpp-toolkit/utils": "0.0.20"
43
43
  },
44
44
  "devDependencies": {
45
- "oclif": "4.22.63"
45
+ "oclif": "4.22.64"
46
46
  },
47
47
  "engines": {
48
48
  "node": "24",