relayx-js 1.0.15 → 1.0.16

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/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ V1.0.16
2
+ - URL Fix
3
+
1
4
  V1.0.15
2
5
  - Wildcard topic pub / sub
3
6
  - Message replay on reconnect
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "relayx-js",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "main": "realtime/realtime.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -121,9 +121,9 @@ export class Realtime {
121
121
  "nats://0.0.0.0:4223",
122
122
  ] :
123
123
  [
124
- `tls://api2.relay-x.io:4221`,
125
- `tls://api2.relay-x.io:4222`,
126
- `tls://api2.relay-x.io:4223`
124
+ `tls://api.relay-x.io:4221`,
125
+ `tls://api.relay-x.io:4222`,
126
+ `tls://api.relay-x.io:4223`
127
127
  ];
128
128
  }else{
129
129
  this.#baseUrl = [
package/tests/test.js CHANGED
@@ -475,14 +475,76 @@ test("Test isTopicValidMethod()", () => {
475
475
  assert.strictEqual(valid, false);
476
476
  });
477
477
 
478
- unreservedInvalidTopics = ["$hey.hey", "orders created", ""];
478
+ unreservedInvalidTopics = [
479
+ '$internal', // starts with $
480
+ 'hello world', // space
481
+ 'topic/', // slash
482
+ 'name?', // ?
483
+ 'foo#bar', // #
484
+ 'bar.baz!', // !
485
+ ' space', // leading space
486
+ 'tab\tchar', // tab
487
+ 'line\nbreak', // newline
488
+ 'comma ,', // space + comma
489
+ '', // empty string
490
+ 'bad|pipe', // |
491
+ 'semi;colon', // ;
492
+ 'colon:here', // :
493
+ "quote's", // '
494
+ '"doublequote"', // "
495
+ 'brackets[]', // []
496
+ 'brace{}', // {}
497
+ 'paren()', // ()
498
+ 'plus+sign', // +
499
+ 'eq=val', // =
500
+ 'gt>lt<', // < mixed with >
501
+ 'percent%', // %
502
+ 'caret^', // ^
503
+ 'ampersand&', // &
504
+ 'back\\slash', // backslash
505
+ '中文字符', // non‑ASCII
506
+ '👍emoji', // emoji
507
+ 'foo\rbar', // carriage return
508
+ 'end ' // trailing space
509
+ ];
479
510
 
480
511
  unreservedInvalidTopics.forEach(topic => {
481
512
  var valid = realTimeEnabled.isTopicValid(topic);
482
513
  assert.strictEqual(valid, false);
483
514
  });
484
515
 
485
- var unreservedValidTopics = ["hello", "test-room", "heyyyyy", "room-connect", "hey$"];
516
+ var unreservedValidTopics = [
517
+ 'Orders',
518
+ 'customer_123',
519
+ 'foo-bar',
520
+ 'a,b,c',
521
+ '*',
522
+ 'foo>*',
523
+ 'hello$world',
524
+ 'topic.123',
525
+ 'ABC_def-ghi',
526
+ 'data_stream_2025',
527
+ 'NODE*',
528
+ 'pubsub>events',
529
+ 'log,metric,error',
530
+ 'X123_Y456',
531
+ 'multi.step.topic',
532
+ 'batch-process',
533
+ 'sensor1_data',
534
+ 'finance$Q2',
535
+ 'alpha,beta,gamma',
536
+ 'Z9_Y8-X7',
537
+ 'config>*',
538
+ 'route-map',
539
+ 'STATS_2025-07',
540
+ 'msg_queue*',
541
+ 'update>patch',
542
+ 'pipeline_v2',
543
+ 'FOO$BAR$BAZ',
544
+ 'user.profile',
545
+ 'id_001-xyz',
546
+ 'event_queue>'
547
+ ];
486
548
 
487
549
  unreservedValidTopics.forEach(topic => {
488
550
  var valid = realTimeEnabled.isTopicValid(topic);
@@ -1,51 +0,0 @@
1
- # Sample workflow for building and deploying a Jekyll site to GitHub Pages
2
- name: Deploy Jekyll with GitHub Pages dependencies preinstalled
3
-
4
- on:
5
- # Runs on pushes targeting the default branch
6
- push:
7
- branches: ["main"]
8
-
9
- # Allows you to run this workflow manually from the Actions tab
10
- workflow_dispatch:
11
-
12
- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13
- permissions:
14
- contents: read
15
- pages: write
16
- id-token: write
17
-
18
- # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19
- # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20
- concurrency:
21
- group: "pages"
22
- cancel-in-progress: false
23
-
24
- jobs:
25
- # Build job
26
- build:
27
- runs-on: ubuntu-latest
28
- steps:
29
- - name: Checkout
30
- uses: actions/checkout@v4
31
- - name: Setup Pages
32
- uses: actions/configure-pages@v5
33
- - name: Build with Jekyll
34
- uses: actions/jekyll-build-pages@v1
35
- with:
36
- source: ./
37
- destination: ./_site
38
- - name: Upload artifact
39
- uses: actions/upload-pages-artifact@v3
40
-
41
- # Deployment job
42
- deploy:
43
- environment:
44
- name: github-pages
45
- url: ${{ steps.deployment.outputs.page_url }}
46
- runs-on: ubuntu-latest
47
- needs: build
48
- steps:
49
- - name: Deploy to GitHub Pages
50
- id: deployment
51
- uses: actions/deploy-pages@v4