tile38-ts

TypeScript client for Tile38 geo-database

MIT License

Downloads
719
Stars
43

Bot releases are visible (Hide)

tile38-ts - v2.4.0 Latest Release

Published by github-actions[bot] 4 months ago

2.4.0 (2024-07-06)

Features

  • ✨ add channels to followers (d86bc58)
// Start a channel that sends event, when object in 'fleet'
// enters the area of a 500m radius around
// latitude 33.5123 and longitude -112.2693 with the Leader
await tile38
    .setChan('warehouse')
    .nearby('fleet')
    .point(33.5123, -112.2693, 500)
    .exec();

Now add a receiving channel and add an event handler.

// also as of tile38 v1.33.1 followers can open a channel
const followerChannel = await tile38.follower().channel();
followerChannel.on('message', (message) => console.log(message));

Now that channel can:

// also as of tile38 v1.33.1 followers can open a channel
await followerChannel.subscribe('warehouse');
// or pattern subscribed to
await followerChannel.pSubscribe('ware*');

Every .set() on the leader results in the geofence event
being forwarded to the follower channel.

await tile38.set('fleet', 'bus').point(33.5123001, -112.2693001).exec();
// event =
> {
  "command": "set",
  "group": "5c5203ccf5ec4e4f349fd038",
  "detect": "inside",
  "hook": "warehouse",
  "key": "fleet",
  "time": "2021-03-22T13:06:36.769273-07:00",
  "id": "bus",
  "meta": {},
  "object": { "type": "Point", "coordinates": [-112.2693001, 33.5123001] }
}

// to unsubscribed
await followerChannel.unsubscribe();

// to delete with the leader
await tile38.delChan('warehouse');
// or pattern delete with the leader
await tile38.pDelChan('ware*');

Other

  • 🔧 ignore .DS_Store (5345df5)
  • deps-dev: bump @types/node from 20.14.8 to 20.14.9 (78fe797)
tile38-ts - v2.3.0

Published by github-actions[bot] 4 months ago

2.3.0 (2024-06-23)

Added the WHEREIN subcommand to allow to filter values in a search by whether they're contained in an
input array of values.

await tile38
    .set('fleet', 'truck1')
    .fields({ weight: 9001 })
    .point(33.5123, -112.2693)
    .exec();
await tile38
    .set('fleet', 'truck2')
    .fields({ weight: 9003 })
    .point(33.5123, -112.2693)
    .exec();

let response = await tile38.scan('fleet').wherein('weight',[9003]).asCount().exec();
console.log(response)

> {"ok":true,"count":1,"cursor":0,"elapsed":"2.078168ms"}

response = await tile38.scan('fleet').wherein('weight',[9001,9003]).asCount().exec();
console.log(response)

> {"ok":true,"count":2,"cursor":0,"elapsed":"2.078168ms"}

Features

  • ✨ add WHEREIN subcommand (f314df9)
  • ✨ add WHEREIN to intersects, within, nearby, scan and search (251ff88)

Other

Documentation

  • 📚️ add extensive jsdocs to interfaces (5386a7b)
  • 📚️ update readme (755f4b1)
tile38-ts - v2.2.1

Published by github-actions[bot] 4 months ago

2.2.1 (2024-06-11)

Other

Documentation

tile38-ts - v2.2.0

Published by github-actions[bot] 4 months ago

2.2.0 (2024-06-07)

Features

  • ✨ add EXISTS command as of Tile38 v1.33.0 (b52144c)
  • ✨ add FEXISTS command as of Tile38 v1.33.0 (9fa1719)
await tile38
    .set('fleet', 'truck1')
    .fields({ maxSpeed: 90, milage: 90000 })
    .point(33.5123, -112.2693)
    .exec();

let response = await tile38.fexists('fleet', 'truck1', 'weight');
console.log(response.exists);
// > true

response = await tile38.fexists('fleet', 'truck1', 'milage');
console.log(response.exists);
// > false

response = await tile38.exists('fleet', 'truck1');
console.log(response.exists);
// > true

response = await tile38.exists('fleet', 'truck2');
console.log(response.exists);
// > false

Other

  • 🔧 bump tile38 v1.33.0 (dcd9063)
  • deps-dev: 🔧 update (b5f304e)
  • deps-dev: 🔧 update (59b578e)
  • deps-dev: 🔧 update (76d257a)
  • deps-dev: bump rimraf from 5.0.5 to 5.0.7 (2d63de1)

Documentation

  • 📚️ update documentation with FEXISTS and EXISTS (7c6c01c)
tile38-ts - v2.1.4

Published by github-actions[bot] 6 months ago

2.1.4 (2024-05-04)

Other

  • 👷 dependabot add github-actions (10c1d3c)
  • 👷 update dependabot schedule (34d7b6c)
  • 🔧 fix release config (874fcb3)
  • deps-dev: 🔧 downgrade conventional-changelog-conventionalcommits (5e9ea7a)
  • deps-dev: 🔧 update (cd70528)
  • deps-dev: 🔧 update (391d100)
  • deps-dev: 🔧 update (e1888c7)
  • deps-dev: 🔧 update (63342d8)
  • deps: 📦️ update (2d4d5ac)
  • deps: 🔗 upgrade ioredis to v5.4.1 (99fab78)
tile38-ts - v2.1.3

Published by github-actions[bot] 7 months ago

2.1.3 (2024-03-11)

Bug Fixes

  • 🐛 Base response interface id cannot be number (7860883)

Other

  • 📦️ update typescript (40a969b)
  • 🔧 fix dev dependencies (8ba16b7)
  • deps-dev: 🔧 .editorconfig (05deef3)
  • deps-dev: 🔧 bump tile38 container (467e14b)
  • deps-dev: 🔧 update (62334e0)
  • deps-dev: 🔧 update (df110e3)
  • deps-dev: 🔧 update (c1a9895)
  • deps-dev: 🔧 update (0dba492)
  • deps-dev: 🔧 update (17d81a8)
  • deps-dev: 🔧 update commitlint & lockfile maintenance (95b56d4)
  • deps-dev: bump husky from 9.0.10 to 9.0.11 (53586f6)
tile38-ts - v2.1.2

Published by github-actions[bot] 8 months ago

2.1.2 (2024-02-10)

Other

  • 🔧 if chore(deps) release patch (7d71f71)
  • deps-dev: 🔧 update (dc1fce7)
  • deps-dev: 🔧 update (dded893)
  • deps-dev: 🔧 update (1ab00b9)
  • deps-dev: 🔧 update dev dependencies (7ff7e60)
  • deps-dev: bump prettier from 3.2.2 to 3.2.3 (c7a2da3)
  • deps-dev: bump prettier from 3.2.3 to 3.2.4 (5eb8e6a)

Documentation

tile38-ts - v2.1.1

Published by github-actions[bot] 9 months ago

2.1.1 (2024-01-16)

Documentation

tile38-ts - v2.1.0

Published by github-actions[bot] 9 months ago

2.1.0 (2024-01-16)

Features

  • ✨ drop nodejs v18 support (b10c25e)

Other

  • 👷 node20 runner (c64777a)
  • 🔧 bump tile38 to 1.32.1 (de2d6a5)
  • deps-dev: bump lint-staged from 15.1.0 to 15.2.0 (b03172d)
  • deps-dev: bump prettier from 3.1.0 to 3.2.2 (688688a)
tile38-ts - v2.0.1

Published by github-actions[bot] 9 months ago

2.0.1 (2024-01-10)

Bug Fixes

  • 🐛 transfer ownership (ad61b3d)

Other

  • 🎨 bump linter/prettier dependencies and run --fix (fac7f0d)
  • 🔧 dependabot group dependencies (feaa77b)
  • 🔧 dependabot rename group dependencies (a1d9552)
  • deps-dev: bump @commitlint/config-conventional (dafdcc2)
  • deps-dev: bump @semantic-release/changelog from 6.0.2 to 6.0.3 (877722b)
  • deps-dev: bump @semantic-release/github from 8.0.7 to 9.0.5 (bed8db1)
  • deps-dev: bump husky from 8.0.2 to 8.0.3 (bbfa422)
  • deps-dev: bump lint-staged from 13.2.0 to 14.0.1 (9b084c9)
  • deps-dev: bump lint-staged from 14.0.1 to 15.1.0 (69fa480)
  • deps-dev: bump prettier from 3.0.3 to 3.1.0 (697a4ed)
  • deps-dev: bump rimraf from 4.4.1 to 5.0.5 (ca0dc1e)
  • deps-dev: bump the eslint group with 3 updates (aafcba2)
  • deps-dev: bump the eslint group with 6 updates (01eaa56)
  • deps-dev: bump the semantic-release group with 1 update (e445b22)
  • deps-dev: bump the semantic-release group with 1 update (8819a0c)
  • deps-dev: bump the semantic-release group with 4 updates (4eb0fa5)
  • deps-dev: bump the semantic-release group with 4 updates (421bc86)
  • deps-dev: bump the semantic-release group with 4 updates (6f2171d)
  • deps-dev: bump typescript from 5.1.6 to 5.2.2 (9ff40b4)
  • deps: bump @vpriem/geojson from 1.1.0 to 1.2.0 (fae88ec)
  • deps: bump @vpriem/geojson from 1.2.0 to 1.3.0 (6b819b0)

Documentation

tile38-ts - v2.0.0

Published by github-actions[bot] about 1 year ago

2.0.0 (2023-08-21)

We now expose ioredis options on the constructor

new Tile38(
    'leader:9851',
    'follower:9851',
    // e.g. to set a retry strategy
    {
        retryStrategy: (times) => {
            return Math.min(times * 50, 2000);
        },
    }
);

⚠ BREAKING CHANGES

  • node-redis -> ioredis

Features

  • ♻️ change redis client to use ioredis instead of node-redis (93c0578)

Bug Fixes

tile38-ts - v2.0.0-beta.6

Published by github-actions[bot] about 1 year ago

2.0.0-beta.6 (2023-08-16)

Bug Fixes

  • 🐛 forward ioredis events (02608b6)
tile38-ts - v2.0.0-beta.5

Published by github-actions[bot] about 1 year ago

2.0.0-beta.5 (2023-08-16)

Bug Fixes

  • 🐛 fix client defaults (039fce9)
tile38-ts - v2.0.0-beta.4

Published by github-actions[bot] about 1 year ago

2.0.0-beta.4 (2023-08-16)

Documentation

  • 📚️ document constructor (9896edd)
tile38-ts - v2.0.0-beta.3

Published by github-actions[bot] about 1 year ago

2.0.0-beta.3 (2023-08-16)

Bug Fixes

  • 🐛 handle ioredis quit better (4809ffe)
tile38-ts - v2.0.0-beta.2

Published by github-actions[bot] about 1 year ago

2.0.0-beta.2 (2023-08-15)

Bug Fixes

  • 🐛 align constructor with ioredis (f62a4e6)
tile38-ts - v2.0.0-beta.1

Published by github-actions[bot] about 1 year ago

2.0.0-beta.1 (2023-08-15)

⚠ BREAKING CHANGES

  • node-redis -> ioredis

Features

  • ♻️ change redis client to use ioredis instead of node-redis (38904b4)
tile38-ts - v1.3.2

Published by github-actions[bot] about 1 year ago

1.3.2 (2023-08-11)

Bug Fixes

  • 🐛 bump redis from 4.5.1 to 4.6.7 (d7702fa)

Other

  • deps-dev: 🔧 bump typescript from 4.8.4 to 5.1.6 (53b849a)
tile38-ts - v1.3.1

Published by github-actions[bot] over 1 year ago

1.3.1 (2023-06-06)

Bug Fixes

  • 🐛 add optional RedisClientOptions (af2fb5f)

Other

  • deps-dev: bump @commitlint/cli from 17.4.4 to 17.5.1 (9f51b17)
  • deps-dev: bump @commitlint/cli from 17.5.1 to 17.6.3 (056274c)
  • deps-dev: bump @typescript-eslint/parser from 5.52.0 to 5.56.0 (4591a2b)
  • deps-dev: bump eslint-config-prettier from 8.6.0 to 8.8.0 (a54b2f5)
  • deps-dev: bump prettier from 2.8.4 to 2.8.7 (20312a5)
  • deps-dev: bump rimraf from 4.1.2 to 4.4.1 (ae17ddc)
  • deps-dev: bump semantic-release from 19.0.5 to 21.0.2 (87d6059)
  • deps: bump @types/node from 18.15.3 to 18.15.11 (0219764)
tile38-ts - v1.3.0

Published by github-actions[bot] over 1 year ago

1.3.0 (2023-03-24)

Features

Other

  • 👷 use node18 in github actions (804f951)
  • deps-dev: bump eslint from 8.32.0 to 8.36.0 (7986ef9)
  • deps-dev: bump lint-staged from 13.1.0 to 13.2.0 (6df6ee3)