@versatiles/container 1.2.0 → 1.2.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/README.md CHANGED
@@ -28,11 +28,11 @@ fs.writeFileSync('tile.' + header.tile_format, tile);
28
28
  ### Class: `Container`<a id="class_container"></a>
29
29
 
30
30
  The `VersaTiles` class is a wrapper around a `.versatiles` container file. It provides methods\
31
- to access tile data, metadata, and other properties within the container. <sup><a href="https://github.com/versatiles-org/node-versatiles-container/blob/67a9864/src/index.ts#L38">\[src]</a></sup>
31
+ to access tile data, metadata, and other properties within the container. <sup><a href="https://github.com/versatiles-org/node-versatiles-container/blob/84e4c84/src/index.ts#L38">\[src]</a></sup>
32
32
 
33
33
  #### Constructor: `new Container(source, options)`
34
34
 
35
- Constructs a new instance of the VersaTiles class. <sup><a href="https://github.com/versatiles-org/node-versatiles-container/blob/67a9864/src/index.ts#L59">\[src]</a></sup>
35
+ Constructs a new instance of the VersaTiles class. <sup><a href="https://github.com/versatiles-org/node-versatiles-container/blob/84e4c84/src/index.ts#L59">\[src]</a></sup>
36
36
 
37
37
  **Parameters:**
38
38
 
@@ -44,7 +44,7 @@ Constructs a new instance of the VersaTiles class. <sup><a href="https://github.
44
44
 
45
45
  #### Method: `getHeader()`
46
46
 
47
- Asynchronously retrieves the header information from the `.versatiles` container. <sup><a href="https://github.com/versatiles-org/node-versatiles-container/blob/67a9864/src/index.ts#L81">\[src]</a></sup>
47
+ Asynchronously retrieves the header information from the `.versatiles` container. <sup><a href="https://github.com/versatiles-org/node-versatiles-container/blob/84e4c84/src/index.ts#L81">\[src]</a></sup>
48
48
 
49
49
  **Returns:** <code>Promise<[Header](#interface_header)></code>
50
50
 
@@ -52,7 +52,7 @@ Asynchronously retrieves the header information from the `.versatiles` container
52
52
 
53
53
  Asynchronously retrieves the metadata associated with the `.versatiles` container.\
54
54
  Metadata typically includes information about `vector_layers` for vector tiles.
55
- If the container does not include metadata, this method returns `null`. <sup><a href="https://github.com/versatiles-org/node-versatiles-container/blob/67a9864/src/index.ts#L128">\[src]</a></sup>
55
+ If the container does not include metadata, this method returns `null`. <sup><a href="https://github.com/versatiles-org/node-versatiles-container/blob/84e4c84/src/index.ts#L128">\[src]</a></sup>
56
56
 
57
57
  **Returns:** <code>Promise\<undefined | string></code>
58
58
 
@@ -61,7 +61,7 @@ If the container does not include metadata, this method returns `null`. <sup><a
61
61
  Asynchronously retrieves a specific tile's data as a Buffer. If the tile data is compressed as\
62
62
  defined in the container header, the returned Buffer will contain the compressed data.
63
63
  To obtain uncompressed data, use the `getTileUncompressed` method.
64
- If the specified tile does not exist, the method returns `null`. <sup><a href="https://github.com/versatiles-org/node-versatiles-container/blob/67a9864/src/index.ts#L155">\[src]</a></sup>
64
+ If the specified tile does not exist, the method returns `null`. <sup><a href="https://github.com/versatiles-org/node-versatiles-container/blob/84e4c84/src/index.ts#L155">\[src]</a></sup>
65
65
 
66
66
  **Parameters:**
67
67
 
@@ -79,7 +79,7 @@ If the specified tile does not exist, the method returns `null`. <sup><a href="h
79
79
  Asynchronously retrieves a specific tile's uncompressed data as a Buffer. This method first\
80
80
  retrieves the compressed tile data using `getTile` and then decompresses it based on the
81
81
  compression setting in the container header.
82
- If the specified tile does not exist, the method returns `null`. <sup><a href="https://github.com/versatiles-org/node-versatiles-container/blob/67a9864/src/index.ts#L203">\[src]</a></sup>
82
+ If the specified tile does not exist, the method returns `null`. <sup><a href="https://github.com/versatiles-org/node-versatiles-container/blob/84e4c84/src/index.ts#L203">\[src]</a></sup>
83
83
 
84
84
  **Parameters:**
85
85
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- /// <reference types="node" />
2
- import type { Block, Header, OpenOptions, Reader, TileIndex } from './lib/interfaces';
3
- export type { Compression, Format, Header, OpenOptions, Reader } from './lib/interfaces';
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ import type { Block, Header, OpenOptions, Reader, TileIndex } from './lib/interfaces.js';
3
+ export type { Compression, Format, Header, OpenOptions, Reader } from './lib/interfaces.js';
4
4
  /**
5
5
  * The `VersaTiles` class is a wrapper around a `.versatiles` container file. It provides methods
6
6
  * to access tile data, metadata, and other properties within the container.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import HttpReader from './lib/reader_http';
2
- import FileReader from './lib/reader_file';
3
- import { decompress } from './lib/decompress';
1
+ import HttpReader from './lib/reader_http.js';
2
+ import FileReader from './lib/reader_file.js';
3
+ import { decompress } from './lib/decompress.js';
4
4
  const FORMATS = {
5
5
  'c01': ['png', 'jpg', 'webp', null, null, null, null, null, null, null, null, null, null, null, null, null, 'pbf'],
6
6
  'v01': ['png', 'jpg', 'webp', 'pbf'],
@@ -1,5 +1,5 @@
1
- /// <reference types="node" />
2
- import type { Compression } from './interfaces';
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ import type { Compression } from './interfaces.js';
3
3
  /**
4
4
  * Decompresses a buffer using the specified compression algorithm. Currently supports 'br' for Brotli and 'gzip' for GZIP.
5
5
  * If the specified algorithm is not supported, the function resolves the promise with the original buffer.
@@ -1,4 +1,4 @@
1
- /// <reference types="node" />
1
+ /// <reference types="node" resolution-mode="require"/>
2
2
  /**
3
3
  * Supported compression.
4
4
  * `null` signifies that the data is uncompressed.
@@ -1,4 +1,4 @@
1
- import type { Reader } from './interfaces';
1
+ import type { Reader } from './interfaces.js';
2
2
  /**
3
3
  * Creates a file reader function for reading chunks of data from a file. This reader abstracts
4
4
  * the file reading process and provides a simple async interface to read data from the specified file.
@@ -1,4 +1,4 @@
1
- import type { Reader } from './interfaces';
1
+ import type { Reader } from './interfaces.js';
2
2
  /**
3
3
  * Creates a function capable of reading data from a specified URL, which can be used
4
4
  * to read data chunks in an HTTP GET request. This is particularly useful for
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versatiles/container",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "A client library for reading VersaTiles containers",
5
5
  "scripts": {
6
6
  "build": "rm -rf dist && tsc -p tsconfig.build.json",
@@ -19,9 +19,9 @@
19
19
  ],
20
20
  "repository": {
21
21
  "type": "git",
22
- "url": "git+https://github.com/versatiles-org/node-versatiles.git"
22
+ "url": "git+https://github.com/versatiles-org/node-versatiles-container.git"
23
23
  },
24
- "homepage": "https://github.com/versatiles-org/node-versatiles/blob/main/versatiles-container/README.md",
24
+ "homepage": "https://github.com/versatiles-org/node-versatiles-container/blob/main/versatiles-container/README.md",
25
25
  "main": "dist/index.js",
26
26
  "types": "dist/index.d.ts",
27
27
  "type": "module",