@trailstash/ultra 6.0.0 → 6.0.1

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/.gitlab-ci.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  test:
2
2
  image: node:20
3
3
  script:
4
- - npm ci
4
+ - npm i
5
5
  - npm test
6
6
  pages:
7
7
  image: node:20
package/cli/build.js CHANGED
@@ -26,7 +26,7 @@ export const buildConfigFromQuery = async (config, query) => {
26
26
  };
27
27
  const newConfig = `export const defaultMode = "map";
28
28
  export const modes = {map: {settings: ${JSON.stringify(settings, null, 2)}}};`;
29
- return `data:text/javascript;base64,${btoa(newConfig)}`;
29
+ return `data:text/javascript;base64,${Buffer.from(newConfig).toString("base64")}`;
30
30
  };
31
31
 
32
32
  export const ultraRoot = path.dirname(
@@ -350,12 +350,12 @@ export class UltraMap extends HTMLElement {
350
350
  this.#cachedQuery = query;
351
351
  this.#cachedTransform = this.transform;
352
352
  this.#cachedType = this.type;
353
- let source = await queryProvider
354
- .source(query, controller, {
353
+ let source = await Promise.resolve(
354
+ queryProvider.source(query, controller, {
355
355
  server: this.server,
356
356
  bounds: this.refs.mapLibre.bounds,
357
- })
358
- .catch(alertOnError);
357
+ }),
358
+ ).catch(alertOnError);
359
359
  if (this.transform) {
360
360
  if (sandbox) {
361
361
  source.data = await Promise.race([
package/index.js CHANGED
@@ -56,10 +56,10 @@ customElements.define("fs-button", FSButton);
56
56
  customElements.define("fa-icon", FontAwesomeIcon);
57
57
  customElements.define("button-modal", ButtonModal);
58
58
  customElements.define("map-popup", MapPopup);
59
+ customElements.define("html-control", HTMLControl);
59
60
  customElements.define("ultra-map", UltraMap);
60
61
  customElements.define("ultra-ide", UltraIDE);
61
62
  customElements.define("ultra-loader", UltraLoader);
62
- customElements.define("html-control", HTMLControl);
63
63
 
64
64
  // reload on hash changes
65
65
  addEventListener("hashchange", () => window.location.reload());
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "6.0.0",
6
+ "version": "6.0.1",
7
7
  "description": "A web based tool for making MapLibre GL maps with data from sources such as Overpass, GeoJSON, GPX, KML, TCX, etc",
8
8
  "main": "index.js",
9
9
  "scripts": {
@@ -62,6 +62,7 @@
62
62
  "@tmcw/togeojson": "^5.8.1",
63
63
  "@trailstash/maplibre-component": "^1.0.1",
64
64
  "@turf/bbox": "^7.1.0",
65
+ "buffer": "^6.0.3",
65
66
  "deep-equal": "^2.2.3",
66
67
  "dompurify": "^3.1.7",
67
68
  "esbuild": "^0.24.0",