@unvt/charites 2.0.0 → 2.0.3

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.
@@ -3,7 +3,9 @@ import fs from 'fs';
3
3
  import os from 'os';
4
4
  import http from 'http';
5
5
  import open from 'open';
6
- import { WebSocketServer } from 'ws';
6
+ // tweak to fix WebSocketServer is not a constructor
7
+ const ws = await import('ws');
8
+ const WebSocketServer = ws.default.WebSocketServer || ws.WebSocketServer;
7
9
  import watch from 'node-watch';
8
10
  import { parser } from '../lib/yaml-parser.js';
9
11
  import { validateStyle } from '../lib/validate-style.js';
@@ -9,7 +9,7 @@ Charites - Documentation
9
9
  :Date: 2024-08-23
10
10
  :Copyright: CC-BY-SA
11
11
  :Organization: The United Nations Vector Tile Toolkit
12
- :Version: 2.0.0
12
+ :Version: 2.0.3
13
13
  :Abstract: This document contains the complete documentation of Charites, an application to style vector tiles easily
14
14
 
15
15
  .. meta::
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unvt/charites",
3
- "version": "2.0.0",
3
+ "version": "2.0.3",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "charites": "dist/cli.js"
@@ -12,7 +12,7 @@
12
12
  "test": "npm run build && NODE_OPTIONS='--experimental-specifier-resolution=node' mocha --timeout 5000 'test/*.ts'",
13
13
  "test:watch": "npm test -- --watch --watch-files src/**/*.ts --watch-files test/**/*.ts",
14
14
  "test:e2e": "npx playwright test",
15
- "command": "./node_modules/.bin/ts-node ./src/cli.ts"
15
+ "command": "tsx ./src/cli.ts"
16
16
  },
17
17
  "author": "",
18
18
  "license": "MIT",
@@ -28,7 +28,7 @@
28
28
  "jsonminify": "^0.4.2",
29
29
  "node-watch": "^0.7.4",
30
30
  "open": "^10.1.0",
31
- "ws": "^8.18.0"
31
+ "ws": "^8.18.1"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@eslint/eslintrc": "^3.1.0",
@@ -41,7 +41,7 @@
41
41
  "@types/mapbox__point-geometry": "^0.1.4",
42
42
  "@types/mocha": "^10.0.7",
43
43
  "@types/node": "^22.5.0",
44
- "@types/ws": "^8.5.12",
44
+ "@types/ws": "^8.18.0",
45
45
  "@typescript-eslint/eslint-plugin": "^8.3.0",
46
46
  "@typescript-eslint/parser": "^8.3.0",
47
47
  "chai": "^5.1.1",
@@ -56,6 +56,7 @@
56
56
  "prettier": "^3.3.3",
57
57
  "ts-node": "^10.9.2",
58
58
  "tsconfig-paths": "^4.2.0",
59
+ "tsx": "^4.19.3",
59
60
  "typescript": "^5.5.4"
60
61
  },
61
62
  "type": "module"
@@ -2,12 +2,12 @@
2
2
  <html id="charites-default">
3
3
  <head>
4
4
  <link rel="stylesheet" href="/app.css" />
5
- <link href='https://unpkg.com/maplibre-gl/dist/maplibre-gl.css' rel='stylesheet' />
6
- <link href='https://unpkg.com/@watergis/maplibre-gl-legend@2.0.0/dist/maplibre-gl-legend.css' rel='stylesheet' />
5
+ <link href='https://cdn.jsdelivr.net/npm/maplibre-gl/dist/maplibre-gl.css' rel='stylesheet' />
6
+ <link href='https://cdn.jsdelivr.net/npm/@watergis/maplibre-gl-legend@2.0.5/dist/maplibre-gl-legend.css' rel='stylesheet' />
7
7
  <title>Charites Live Preview</title>
8
- <script src='https://unpkg.com/maplibre-gl/dist/maplibre-gl.js'></script>
9
- <script src="https://unpkg.com/@watergis/maplibre-gl-legend@2.0.0/dist/maplibre-gl-legend.umd.js"></script>
10
- <script src="https://unpkg.com/pmtiles@3.0.7/dist/pmtiles.js"></script>
8
+ <script src='https://cdn.jsdelivr.net/npm/maplibre-gl/dist/maplibre-gl.js'></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/@watergis/maplibre-gl-legend@2.0.5/dist/maplibre-gl-legend.umd.js"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/pmtiles@4.3.0/dist/pmtiles.js"></script>
11
11
  </head>
12
12
  <body>
13
13
  <div class="overlay">
@@ -3,7 +3,9 @@ import fs from 'fs'
3
3
  import os from 'os'
4
4
  import http from 'http'
5
5
  import open from 'open'
6
- import { WebSocketServer } from 'ws'
6
+ // tweak to fix WebSocketServer is not a constructor
7
+ const ws = await import('ws')
8
+ const WebSocketServer = ws.default.WebSocketServer || ws.WebSocketServer
7
9
  import watch from 'node-watch'
8
10
 
9
11
  import { parser } from '../lib/yaml-parser.js'