Skip to content

Releases: simbroadcasts/node-insim

v6.2.0

05 Jan 18:07

Choose a tag to compare

Minor Changes

  • 74b9dd5 Thanks @mkapal! - Emit an 'error' event on InSim error

    Usage:

    inSim.on('error', (error) => {
      console.error('InSim error:', error);
    });

v6.1.0

31 Dec 11:22

Choose a tag to compare

Minor Changes

v6.0.1

22 Dec 15:08

Choose a tag to compare

6.0.1 (2025-12-22)

Bug Fixes

  • is_tiny: add TinyType.TINY_LCL in IS_TINY (3b789c16)

v6.0.0

12 Dec 23:57

Choose a tag to compare

6.0.0 (2025-12-13)

Features

  • insim: raise InSim version to 10
  • insim: add PIF_INERTIA_STEER value for PlayerFlags enum
  • insim: add CCI_OOB value for CompCarFlags enum
  • insim: rename TinyType.TINY_GTH to TinyType.TINY_GTM - get time in milliseconds
  • insim: increase PLH_MAX_PLAYERS in IS_PLH to 48
  • insim: increase REO_MAX_PLAYERS in IS_REO to 48
  • insim: increase IS_OBH packet to allow time in milliseconds
  • insim: increase IS_HLV packet to allow time in milliseconds
  • insim: increase IS_CON packet to allow time in milliseconds
  • insim: update values in ObjectIndex enum
  • insim: restrict the type of the Index property in IS_OCO to only valid start lights

Added keys:

  • AXO_PAINT_LETTERS
  • AXO_PAINT_ARROWS
  • AXO_CONE_TALL1
  • AXO_CONE_TALL2
  • AXO_LETTER_BOARD_WY
  • AXO_LETTER_BOARD_RB
  • AXO_VEH_SUV
  • AXO_VEH_VAN
  • AXO_VEH_TRUCK
  • AXO_VEH_AMBULANCE
  • AXO_SPEED_HUMP_2M
  • AXO_SPEED_HUMP_1M
  • AXO_KERB
  • AXO_MARQUEE
  • AXO_BIN1
  • AXO_BIN2
  • AXO_RAILING1
  • AXO_START_LIGHTS2
  • AXO_START_LIGHTS3
  • AXO_CHEVRON_LEFT
  • AXO_CHEVRON_RIGHT

Changed keys:

  • AXO_CONE_RED -> AXO_CONE1
  • AXO_CONE_RED2 -> AXO_CONE2
  • AXO_CONE_PTR_RED -> AXO_CONE_POINTER
  • AXO_MARKER_CURVE_L -> AXO_MARKER_CORNER
  • AXO_DIST25 -> AXO_MARKER_DISTANCE
  • AXO_BANNER1 -> AXO_BANNER
  • AXO_POST_GREEN -> AXO_POST
  • AXO_RAILING -> AXO_RAILING2
  • AXO_START_LIGHTS -> AXO_START_LIGHTS1
  • AXO_SIGN_KEEP_LEFT -> AXO_SIGN_METAL
  • AXO_SIGN_SPEED_80 -> AXO_SIGN_SPEED
  • OCO_INDEX_MAIN -> MARSH_MARSHAL
  • MARSH_MARSHAL -> MARSH_RESTRICTED_AREA

Note: OCO_INDEX_MAIN is now exported as a constant from IS_OCO.ts

Removed keys (now unused):

  • AXO_CONE_RED3
  • AXO_CONE_BLUE
  • AXO_CONE_BLUE2
  • AXO_CONE_GREEN
  • AXO_CONE_GREEN2
  • AXO_CONE_ORANGE
  • AXO_CONE_WHITE
  • AXO_CONE_YELLOW
  • AXO_CONE_YELLOW2
  • AXO_CONE_PTR_BLUE
  • AXO_CONE_PTR_GREEN
  • AXO_CONE_PTR_YELLOW
  • AXO_MARKER_CURVE_R
  • AXO_MARKER_L
  • AXO_MARKER_R
  • AXO_MARKER_HARD_L
  • AXO_MARKER_HARD_R
  • AXO_MARKER_L_R
  • AXO_MARKER_R_L
  • AXO_MARKER_S_L
  • AXO_MARKER_S_R
  • AXO_MARKER_S2_L
  • AXO_MARKER_S2_R
  • AXO_MARKER_U_L
  • AXO_MARKER_U_R
  • AXO_DIST50
  • AXO_DIST75
  • AXO_DIST100
  • AXO_DIST125
  • AXO_DIST150
  • AXO_DIST200
  • AXO_DIST250
  • AXO_BANNER2
  • AXO_POST_ORANGE
  • AXO_POST_RED
  • AXO_POST_WHITE
  • AXO_SIGN_KEEP_RIGHT
  • AXO_SIGN_SPEED_50

Fixes

  • insim: keep only packet properties in packet event listener callback parameter
    The parameter is now typed as InSimPacketInstance<T> where T is one of PacketType enum values. This helper type is now exported from node-insim/packets.

Before:

import { InSim } from 'node-insim';
import type { IS_VER } from 'node-insim/packets';
import { InSimPacketInstance, PacketType } from 'node-insim/packets';

const inSim = new InSim();
inSim.on(PacketType.ISP_VER, onVersion);

function onVersion(packet: IS_VER) {
  console.log(`Connected to LFS ${packet.Product} ${packet.Version}`);
}

After:

import { InSim } from 'node-insim';
import type { InSimPacketInstance } from 'node-insim/packets';
import { PacketType } from 'node-insim/packets';

const inSim = new InSim();
inSim.on(PacketType.ISP_VER, onVersion);

function onVersion(packet: InSimPacketInstance<PacketType.ISP_VER>) {
  console.log(`Connected to LFS ${packet.Product} ${packet.Version}`);
}

BREAKING CHANGES

  • insim: InSim.INSIM_VERSION raised to 10
  • insim: TinyType.TINY_GTH renamed to TinyType.TINY_GTM
  • insim: Time property in IS_OBH is in milliseconds
  • insim: Time property in IS_HLV is in milliseconds
  • insim: Time property in IS_CON is in milliseconds
  • insim: Changed AXO_CONE_RED to AXO_CONE1
  • insim: Changed AXO_CONE_RED2 to AXO_CONE2
  • insim: Removed AXO_CONE_RED3 - now AXO_CONE1 with colour 0 and mapping 0
  • insim: Removed AXO_CONE_BLUE - now AXO_CONE1 with colour 1 and mapping 0
  • insim: Removed AXO_CONE_BLUE2 - now AXO_CONE2 with colour 2 and mapping 0
  • insim: Removed AXO_CONE_GREEN - now AXO_CONE1 with colour 3 and mapping 0
  • insim: Removed AXO_CONE_GREEN2 - now AXO_CONE2 with colour 3 and mapping 0
  • insim: Removed AXO_CONE_ORANGE - now AXO_CONE2 with colour 4 and mapping 0
  • insim: Removed AXO_CONE_WHITE - now AXO_CONE1 with colour 5 and mapping 0
  • insim: Removed AXO_CONE_YELLOW - now AXO_CONE1 with colour 6 and mapping 0
  • insim: Removed AXO_CONE_YELLOW2 - now AXO_CONE2 with colour 6 and mapping 0
  • insim: Removed AXO_CONE_PTR_BLUE - now AXO_CONE_POINTER with colour 2 and mapping 0
  • insim: Removed AXO_CONE_PTR_GREEN - now AXO_CONE_POINTER with colour 3 and mapping 0
  • insim: Removed AXO_CONE_PTR_YELLOW - now AXO_CONE_POINTER with colour 6 and mapping 0
  • insim: Removed AXO_MARKER_CURVE_R - now AXO_MARKER_CORNER with colour 0 and mapping 1
  • insim: Removed AXO_MARKER_L - now AXO_MARKER_CORNER with colour 0 and mapping 2
  • insim: Removed AXO_MARKER_R - now AXO_MARKER_CORNER with colour 0 and mapping 3
  • insim: Removed AXO_MARKER_HARD_L - now AXO_MARKER_CORNER with colour 0 and mapping 4
  • insim: Removed AXO_MARKER_HARD_R - now AXO_MARKER_CORNER with colour 0 and mapping 5
  • insim: Removed AXO_MARKER_L_R - now AXO_MARKER_CORNER with colour 0 and mapping 6
  • insim: Removed AXO_MARKER_R_L - now AXO_MARKER_CORNER with colour 0 and mapping 7
  • insim: Removed AXO_MARKER_S_L - now AXO_MARKER_CORNER with colour 0 and mapping 8
  • insim: Removed AXO_MARKER_S_R - now AXO_MARKER_CORNER with colour 0 and mapping 9
  • insim: Removed AXO_MARKER_S2_L - now AXO_MARKER_CORNER with colour 0 and mapping 10
  • insim: Removed AXO_MARKER_S2_R - now AXO_MARKER_CORNER with colour 0 and mapping 11
  • insim: Removed AXO_MARKER_U_L - now AXO_MARKER_CORNER with colour 0 and mapping 12
  • insim: Removed AXO_MARKER_U_R - now AXO_MARKER_CORNER with colour 0 and mapping 13
  • insim: Removed AXO_DIST50 - now AXO_MARKER_DISTANCE with colour 0 and mapping 1
  • insim: Removed AXO_DIST75 - now AXO_MARKER_DISTANCE with colour 0 and mapping 2
  • insim: Removed AXO_DIST100 - now AXO_MARKER_DISTANCE with colour 0 and mapping 3
  • insim: Removed AXO_DIST125 - now AXO_MARKER_DISTANCE with colour 0 and mapping 4
  • insim: Removed AXO_DIST150 - now AXO_MARKER_DISTANCE with colour 0 and mapping 5
  • insim: Removed AXO_DIST200 - now AXO_MARKER_DISTANCE with colour 0 and mapping 6
  • insim: Removed AXO_DIST250 - now AXO_MARKER_DISTANCE with colour 0 and mapping 7
  • insim: Removed AXO_BANNER2 - now AXO_BANNER with colour 0 and mapping 1
  • insim: Removed AXO_POST_ORANGE - now AXO_POST with colour 1 and mapping 0
  • insim: Removed AXO_POST_RED - now AXO_POST with colour 2 and mapping 0
  • insim: Removed AXO_POST_WHITE - now AXO_POST with colour 3 and mapping 0
  • insim: Removed AXO_SIGN_KEEP_RIGHT - now AXO_SIGN_METAL with colour 0 and mapping 1
  • insim: Removed AXO_SIGN_SPEED_50 - now AXO_SIGN_SPEED with colour 0 and mapping 1
  • insim: The type of the Index property in IS_OCO is now restricted to AXO_START_LIGHTS1, AXO_START_LIGHTS2, AXO_START_LIGHTS3, or OCO_INDEX_MAIN
  • insim: The type of the packet parameter in the InSim event handler callback is now restricted to the packet properties. The following properties have been removed from the output type: getFormat, getFormatSize, getValidPropertyNames, pack, unpack, as well as all read-only packet properties Zero, Spare, Spare1, Spare2, Spare3, Sp0, Sp1, Sp2, Sp3, SpF0, SpF1, SPU1, SPU2, SPU3.

v5.0.2

13 Dec 00:12

Choose a tag to compare

5.0.2 (2025-11-15)

Bug Fixes

  • is_aic: IS_AIC_Data accepts an optional ReqI property (fa1417f)
  • is_aic: update static packet size to 4 bytes (without dynamic inputs) (c51511e)

v5.0.1

06 Sep 15:56

Choose a tag to compare

5.0.1 (2025-09-06)

Bug Fixes

  • insim: export PlayerHCapFlags enum from "node-insim/packets" (1b1a341)

v5.0.0

17 Aug 16:36

Choose a tag to compare

5.0.0 (2025-08-17)

Features

  • insim: remove InSim Relay support (#67) (973e27d), closes #66
  • outgauge: OutGauge constructor accepts an object with timeout property (9bfef4b), closes #36
  • outsim: OutSim constructor accepts an object with timeout property (f53a27f), closes #36

BREAKING CHANGES

  • outsim: OutSim class constructor now accepts an optional object with a timeout optional property with a default value of 0
  • outgauge: OutGauge class constructor now accepts an optional object with a timeout optional property with a default value of 0
  • insim: Removed exports from "node-insim/packets": IR_ARP, IR_ARQ, IR_ARQ_Data, InSimRelayError, IR_ERR, IR_HLR_Data, IR_HLR, IR_HOS, IR_SEL_Data, IR_SEL, IR_SEL_ReqI
  • insim: Removed connectRelay method from the InSim class
  • insim: Removed IRP_* values from PacketType enum

v5.0.0-next.2

17 Aug 16:26

Choose a tag to compare

v5.0.0-next.2 Pre-release
Pre-release

5.0.0-next.2 (2025-08-17)

Features

  • outgauge: OutGauge constructor accepts an object with timeout property (163e541), closes #36
  • outsim: OutSim constructor accepts an object with timeout property (12a6d2a), closes #36

BREAKING CHANGES

  • outsim: OutSim class constructor now accepts an optional object with a timeout optional property with a default value of 0
  • outgauge: OutGauge class constructor now accepts an optional object with a timeout optional property with a default value of 0

v5.0.0-next.1

17 Aug 10:17
0507bb3

Choose a tag to compare

v5.0.0-next.1 Pre-release
Pre-release

5.0.0-next.1 (2025-08-17)

Features

BREAKING CHANGES

  • insim: Removed exports from "node-insim/packets": IR_ARP, IR_ARQ, IR_ARQ_Data, InSimRelayError, IR_ERR, IR_HLR_Data, IR_HLR, IR_HOS, IR_SEL_Data, IR_SEL, IR_SEL_ReqI
  • insim: Removed connectRelay method from the InSim class
  • insim: Removed IRP_* values from PacketType enum

v4.7.0

14 Jul 20:13
c5f2166

Choose a tag to compare

4.7.0 (2025-07-14)

Features