@earthmover/icechunk 2.0.0-alpha.2 → 2.0.0-alpha.4
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 +70 -3
- package/index.d.ts +200 -4
- package/index.js +52 -50
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
# Icechunk JS
|
|
2
2
|
|
|
3
|
-
JavaScript/TypeScript library for Icechunk Zarr Stores
|
|
4
|
-
|
|
5
|
-
**Status: Early development.** In-memory storage works. Cloud storage backends coming soon.
|
|
3
|
+
JavaScript/TypeScript library for Icechunk Zarr Stores. Works as a native Node.js addon and in the browser via WASM.
|
|
6
4
|
|
|
7
5
|
## Getting Started
|
|
8
6
|
|
|
7
|
+
Install with `npm`
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
npm install @earthmover/icechunk@alpha
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
> [!NOTE]
|
|
14
|
+
> When using in the browser, you must specify to install the wasm package with `--cpu=wasm32`
|
|
15
|
+
|
|
9
16
|
```typescript
|
|
10
17
|
import { Repository, Storage } from '@earthmover/icechunk'
|
|
11
18
|
import * as zarr from 'zarrita'
|
|
@@ -25,6 +32,66 @@ const arr = await zarr.create(root.resolve('/foo'), {
|
|
|
25
32
|
const snapshotId = await session.commit('Create foo array')
|
|
26
33
|
```
|
|
27
34
|
|
|
35
|
+
## Features
|
|
36
|
+
|
|
37
|
+
### Storage Backends
|
|
38
|
+
|
|
39
|
+
In-memory storage works on all platforms. The following backends are available on native (non-WASM) builds:
|
|
40
|
+
|
|
41
|
+
- **S3** — `Storage.newS3(bucket, prefix?, credentials?, options?)`
|
|
42
|
+
- **R2** — `Storage.newR2(bucket?, prefix?, accountId?, credentials?, options?)`
|
|
43
|
+
- **GCS** — `Storage.newGcs(bucket, prefix?, credentials?, config?)`
|
|
44
|
+
- **Azure Blob** — `Storage.newAzureBlob(account, container, prefix?, credentials?, config?)`
|
|
45
|
+
- **Tigris** — `Storage.newTigris(bucket, prefix?, credentials?, options?)`
|
|
46
|
+
- **HTTP** — `Storage.newHttp(baseUrl, config?)`
|
|
47
|
+
- **Local Filesystem** — `Storage.newLocalFilesystem(path)`
|
|
48
|
+
|
|
49
|
+
### Virtual Chunks
|
|
50
|
+
|
|
51
|
+
Virtual chunks are supported in node but not in WASM builds.
|
|
52
|
+
|
|
53
|
+
## Using in the Browser (WASM)
|
|
54
|
+
|
|
55
|
+
Install the package with the `--cpu=wasm32` flag to get the WASM binary:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm install @earthmover/icechunk --cpu=wasm32
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The WASM build uses `SharedArrayBuffer` for threading, which requires your server to send these headers:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Cross-Origin-Opener-Policy: same-origin
|
|
65
|
+
Cross-Origin-Embedder-Policy: require-corp
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
With Vite, you'll also need the `vite-plugin-wasm` and `vite-plugin-top-level-await` plugins, and must exclude the icechunk packages from dependency optimization:
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
// vite.config.ts
|
|
72
|
+
import wasm from 'vite-plugin-wasm'
|
|
73
|
+
import topLevelAwait from 'vite-plugin-top-level-await'
|
|
74
|
+
|
|
75
|
+
export default defineConfig({
|
|
76
|
+
plugins: [wasm(), topLevelAwait()],
|
|
77
|
+
optimizeDeps: {
|
|
78
|
+
exclude: ['@earthmover/icechunk', '@earthmover/icechunk-wasm32-wasi'],
|
|
79
|
+
},
|
|
80
|
+
server: {
|
|
81
|
+
headers: {
|
|
82
|
+
'Cross-Origin-Opener-Policy': 'same-origin',
|
|
83
|
+
'Cross-Origin-Embedder-Policy': 'require-corp',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
})
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
See the [NAPI-RS WebAssembly docs](https://napi.rs/docs/concepts/webassembly) for more details.
|
|
90
|
+
|
|
91
|
+
## Examples
|
|
92
|
+
|
|
93
|
+
See [`examples/react-wasm`](examples/react-wasm) for an interactive React app demonstrating repository management, branching, tagging, and Zarr store operations in the browser.
|
|
94
|
+
|
|
28
95
|
## For Development
|
|
29
96
|
|
|
30
97
|
```bash
|
package/index.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
/* auto-generated by NAPI-RS */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export declare class Repository {
|
|
4
|
-
static create(storage:
|
|
5
|
-
static open(storage:
|
|
6
|
-
static openOrCreate(storage:
|
|
7
|
-
static exists(storage:
|
|
4
|
+
static create(storage: JsStorage, config?: RepositoryConfig | undefined | null, specVersion?: number | undefined | null, authorizeVirtualChunkAccess?: Record<string, JsCredentials | undefined | null> | undefined | null): Promise<Repository>
|
|
5
|
+
static open(storage: JsStorage, config?: RepositoryConfig | undefined | null, authorizeVirtualChunkAccess?: Record<string, JsCredentials | undefined | null> | undefined | null): Promise<Repository>
|
|
6
|
+
static openOrCreate(storage: JsStorage, config?: RepositoryConfig | undefined | null, specVersion?: number | undefined | null, authorizeVirtualChunkAccess?: Record<string, JsCredentials | undefined | null> | undefined | null): Promise<Repository>
|
|
7
|
+
static exists(storage: JsStorage): Promise<boolean>
|
|
8
8
|
readonlySession(options?: ReadonlySessionOptions | undefined | null): Promise<JsSession>
|
|
9
9
|
writableSession(branch: string): Promise<JsSession>
|
|
10
10
|
listBranches(): Promise<Array<string>>
|
|
11
11
|
createBranch(name: string, snapshotId: string): Promise<void>
|
|
12
12
|
listTags(): Promise<Array<string>>
|
|
13
13
|
createTag(name: string, snapshotId: string): Promise<void>
|
|
14
|
+
lookupManifestFiles(snapshotId: string): Promise<Array<JsManifestFileInfo>>
|
|
14
15
|
}
|
|
15
16
|
export type JsRepository = Repository
|
|
16
17
|
|
|
@@ -22,11 +23,21 @@ export declare class Session {
|
|
|
22
23
|
get store(): JsStore
|
|
23
24
|
commit(message: string): Promise<string>
|
|
24
25
|
discardChanges(): Promise<void>
|
|
26
|
+
/** Get all virtual chunk locations referenced by this session */
|
|
27
|
+
allVirtualChunkLocations(): Promise<Array<string>>
|
|
25
28
|
}
|
|
26
29
|
export type JsSession = Session
|
|
27
30
|
|
|
28
31
|
export declare class Storage {
|
|
29
32
|
static newInMemory(): Promise<Storage>
|
|
33
|
+
static newLocalFilesystem(path: string): Promise<Storage>
|
|
34
|
+
static newS3(bucket: string, prefix?: string | undefined | null, credentials?: S3Credentials | undefined | null, options?: S3Options | undefined | null): Storage
|
|
35
|
+
static newR2(bucket?: string | undefined | null, prefix?: string | undefined | null, accountId?: string | undefined | null, credentials?: S3Credentials | undefined | null, options?: S3Options | undefined | null): Storage
|
|
36
|
+
static newTigris(bucket: string, prefix?: string | undefined | null, credentials?: S3Credentials | undefined | null, options?: S3Options | undefined | null, useWeakConsistency?: boolean | undefined | null): Storage
|
|
37
|
+
static newS3ObjectStore(bucket: string, prefix?: string | undefined | null, credentials?: S3Credentials | undefined | null, options?: S3Options | undefined | null): Promise<Storage>
|
|
38
|
+
static newGcs(bucket: string, prefix?: string | undefined | null, credentials?: GcsCredentials | undefined | null, config?: Record<string, string> | undefined | null): Storage
|
|
39
|
+
static newAzureBlob(account: string, container: string, prefix?: string | undefined | null, credentials?: AzureCredentials | undefined | null, config?: Record<string, string> | undefined | null): Promise<Storage>
|
|
40
|
+
static newHttp(baseUrl: string, config?: Record<string, string> | undefined | null): Storage
|
|
30
41
|
}
|
|
31
42
|
export type JsStorage = Storage
|
|
32
43
|
|
|
@@ -42,11 +53,196 @@ export declare class Store {
|
|
|
42
53
|
get supportsWrites(): boolean
|
|
43
54
|
get supportsDeletes(): boolean
|
|
44
55
|
get supportsListing(): boolean
|
|
56
|
+
/**
|
|
57
|
+
* Set a single virtual reference to a chunk
|
|
58
|
+
*
|
|
59
|
+
* For checksum validation, provide either etag_checksum (string) or last_modified (JS Date object).
|
|
60
|
+
* If both are provided, etag_checksum takes precedence.
|
|
61
|
+
*/
|
|
62
|
+
setVirtualRef(key: string, location: string, offset: number, length: number, etagChecksum: string | undefined | null, lastModified: Date | undefined | null, validateContainer: boolean): Promise<void>
|
|
63
|
+
/**
|
|
64
|
+
* Set multiple virtual references for the same array
|
|
65
|
+
* Returns the indices of failed chunk references if any
|
|
66
|
+
*/
|
|
67
|
+
setVirtualRefs(arrayPath: string, chunks: Array<VirtualChunkSpec>, validateContainers: boolean): Promise<Array<Array<number>> | null>
|
|
45
68
|
}
|
|
46
69
|
export type JsStore = Store
|
|
47
70
|
|
|
71
|
+
/** Azure credentials */
|
|
72
|
+
export type AzureCredentials =
|
|
73
|
+
| { type: 'FromEnv' }
|
|
74
|
+
| { type: 'Static', field0: AzureStaticCredentials }
|
|
75
|
+
|
|
76
|
+
/** Azure static credentials */
|
|
77
|
+
export type AzureStaticCredentials =
|
|
78
|
+
| { type: 'AccessKey', field0: string }
|
|
79
|
+
| { type: 'SasToken', field0: string }
|
|
80
|
+
| { type: 'BearerToken', field0: string }
|
|
81
|
+
|
|
82
|
+
/** Caching configuration */
|
|
83
|
+
export interface CachingConfig {
|
|
84
|
+
numSnapshotNodes?: number
|
|
85
|
+
numChunkRefs?: number
|
|
86
|
+
numTransactionChanges?: number
|
|
87
|
+
numBytesAttributes?: number
|
|
88
|
+
numBytesChunks?: number
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Compression algorithm */
|
|
92
|
+
export declare const enum CompressionAlgorithm {
|
|
93
|
+
Zstd = 0
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** Compression configuration */
|
|
97
|
+
export interface CompressionConfig {
|
|
98
|
+
algorithm?: CompressionAlgorithm
|
|
99
|
+
level?: number
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** Credentials for virtual chunk access */
|
|
103
|
+
export type Credentials =
|
|
104
|
+
| { type: 'S3', field0: S3Credentials }
|
|
105
|
+
| { type: 'Gcs', field0: GcsCredentials }
|
|
106
|
+
| { type: 'Azure', field0: AzureCredentials }
|
|
107
|
+
|
|
108
|
+
/** GCS credentials */
|
|
109
|
+
export type GcsCredentials =
|
|
110
|
+
| { type: 'Anonymous' }
|
|
111
|
+
| { type: 'FromEnv' }
|
|
112
|
+
| { type: 'Static', field0: GcsStaticCredentials }
|
|
113
|
+
|
|
114
|
+
/** GCS static credentials */
|
|
115
|
+
export type GcsStaticCredentials =
|
|
116
|
+
| { type: 'ServiceAccount', field0: string }
|
|
117
|
+
| { type: 'ServiceAccountKey', field0: string }
|
|
118
|
+
| { type: 'ApplicationCredentials', field0: string }
|
|
119
|
+
| { type: 'BearerToken', field0: string }
|
|
120
|
+
|
|
121
|
+
export interface ManifestFileInfo {
|
|
122
|
+
id: string
|
|
123
|
+
sizeBytes: number
|
|
124
|
+
numChunkRefs: number
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** Object store configuration for virtual chunk containers */
|
|
128
|
+
export type ObjectStoreConfig =
|
|
129
|
+
| { type: 'InMemory' }
|
|
130
|
+
| { type: 'LocalFileSystem', field0: string }
|
|
131
|
+
| { type: 'Http', field0: Record<string, string> }
|
|
132
|
+
| { type: 'S3Compatible', field0: S3Options }
|
|
133
|
+
| { type: 'S3', field0: S3Options }
|
|
134
|
+
| { type: 'Gcs', field0: Record<string, string> }
|
|
135
|
+
| { type: 'Azure', field0: Record<string, string> }
|
|
136
|
+
| { type: 'Tigris', field0: S3Options }
|
|
137
|
+
|
|
48
138
|
export interface ReadonlySessionOptions {
|
|
49
139
|
branch?: string
|
|
50
140
|
tag?: string
|
|
51
141
|
snapshotId?: string
|
|
52
142
|
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Repository configuration
|
|
146
|
+
*
|
|
147
|
+
* The `manifest` field accepts a JSON object matching the serde serialization
|
|
148
|
+
* of `ManifestConfig`. Example:
|
|
149
|
+
* ```js
|
|
150
|
+
* {
|
|
151
|
+
* manifest: {
|
|
152
|
+
* preload: {
|
|
153
|
+
* max_total_refs: 1000,
|
|
154
|
+
* preload_if: { true: null },
|
|
155
|
+
* max_arrays_to_scan: 10
|
|
156
|
+
* },
|
|
157
|
+
* splitting: {
|
|
158
|
+
* split_sizes: [
|
|
159
|
+
* [{ path_matches: { regex: ".*" } }, [{ condition: "any", num_chunks: 100 }]]
|
|
160
|
+
* ]
|
|
161
|
+
* }
|
|
162
|
+
* }
|
|
163
|
+
* }
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
export interface RepositoryConfig {
|
|
167
|
+
inlineChunkThresholdBytes?: number
|
|
168
|
+
getPartialValuesConcurrency?: number
|
|
169
|
+
compression?: CompressionConfig
|
|
170
|
+
maxConcurrentRequests?: number
|
|
171
|
+
caching?: CachingConfig
|
|
172
|
+
storage?: StorageSettings
|
|
173
|
+
/**
|
|
174
|
+
* Manifest configuration, passed as a JSON-compatible object.
|
|
175
|
+
* The object is deserialized using serde, matching the Rust ManifestConfig structure.
|
|
176
|
+
*/
|
|
177
|
+
manifest?: any
|
|
178
|
+
/** Virtual chunk containers configuration (non-WASM only) */
|
|
179
|
+
virtualChunkContainers?: Record<string, VirtualChunkContainer>
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** S3 credentials */
|
|
183
|
+
export type S3Credentials =
|
|
184
|
+
| { type: 'FromEnv' }
|
|
185
|
+
| { type: 'Anonymous' }
|
|
186
|
+
| { type: 'Static', field0: S3StaticCredentials }
|
|
187
|
+
|
|
188
|
+
/** S3 options */
|
|
189
|
+
export interface S3Options {
|
|
190
|
+
region?: string
|
|
191
|
+
endpointUrl?: string
|
|
192
|
+
allowHttp?: boolean
|
|
193
|
+
anonymous?: boolean
|
|
194
|
+
forcePathStyle?: boolean
|
|
195
|
+
networkStreamTimeoutSeconds?: number
|
|
196
|
+
requesterPays?: boolean
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/** S3 static credentials */
|
|
200
|
+
export interface S3StaticCredentials {
|
|
201
|
+
accessKeyId: string
|
|
202
|
+
secretAccessKey: string
|
|
203
|
+
sessionToken?: string
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/** Storage concurrency settings */
|
|
207
|
+
export interface StorageConcurrencySettings {
|
|
208
|
+
maxConcurrentRequestsForObject?: number
|
|
209
|
+
idealConcurrentRequestSize?: number
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/** Storage retries settings */
|
|
213
|
+
export interface StorageRetriesSettings {
|
|
214
|
+
maxTries?: number
|
|
215
|
+
initialBackoffMs?: number
|
|
216
|
+
maxBackoffMs?: number
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/** Storage settings */
|
|
220
|
+
export interface StorageSettings {
|
|
221
|
+
concurrency?: StorageConcurrencySettings
|
|
222
|
+
retries?: StorageRetriesSettings
|
|
223
|
+
unsafeUseConditionalUpdate?: boolean
|
|
224
|
+
unsafeUseConditionalCreate?: boolean
|
|
225
|
+
unsafeUseMetadata?: boolean
|
|
226
|
+
storageClass?: string
|
|
227
|
+
metadataStorageClass?: string
|
|
228
|
+
chunksStorageClass?: string
|
|
229
|
+
minimumSizeForMultipartUpload?: number
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** Virtual chunk container configuration */
|
|
233
|
+
export interface VirtualChunkContainer {
|
|
234
|
+
name?: string
|
|
235
|
+
urlPrefix: string
|
|
236
|
+
store: JsObjectStoreConfig
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/** Specification for a virtual chunk reference */
|
|
240
|
+
export interface VirtualChunkSpec {
|
|
241
|
+
index: Array<number>
|
|
242
|
+
location: string
|
|
243
|
+
offset: number
|
|
244
|
+
length: number
|
|
245
|
+
etagChecksum?: string
|
|
246
|
+
/** Last modified datetime (accepts JS Date object) */
|
|
247
|
+
lastModified?: Date
|
|
248
|
+
}
|
package/index.js
CHANGED
|
@@ -80,8 +80,8 @@ function requireNative() {
|
|
|
80
80
|
try {
|
|
81
81
|
const binding = require('@earthmover/icechunk-android-arm64')
|
|
82
82
|
const bindingPackageVersion = require('@earthmover/icechunk-android-arm64/package.json').version
|
|
83
|
-
if (bindingPackageVersion !== '
|
|
84
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
83
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
84
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
85
85
|
}
|
|
86
86
|
return binding
|
|
87
87
|
} catch (e) {
|
|
@@ -96,8 +96,8 @@ function requireNative() {
|
|
|
96
96
|
try {
|
|
97
97
|
const binding = require('@earthmover/icechunk-android-arm-eabi')
|
|
98
98
|
const bindingPackageVersion = require('@earthmover/icechunk-android-arm-eabi/package.json').version
|
|
99
|
-
if (bindingPackageVersion !== '
|
|
100
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
99
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
100
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
101
101
|
}
|
|
102
102
|
return binding
|
|
103
103
|
} catch (e) {
|
|
@@ -116,8 +116,8 @@ function requireNative() {
|
|
|
116
116
|
try {
|
|
117
117
|
const binding = require('@earthmover/icechunk-win32-x64-msvc')
|
|
118
118
|
const bindingPackageVersion = require('@earthmover/icechunk-win32-x64-msvc/package.json').version
|
|
119
|
-
if (bindingPackageVersion !== '
|
|
120
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
119
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
120
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
121
121
|
}
|
|
122
122
|
return binding
|
|
123
123
|
} catch (e) {
|
|
@@ -132,8 +132,8 @@ function requireNative() {
|
|
|
132
132
|
try {
|
|
133
133
|
const binding = require('@earthmover/icechunk-win32-ia32-msvc')
|
|
134
134
|
const bindingPackageVersion = require('@earthmover/icechunk-win32-ia32-msvc/package.json').version
|
|
135
|
-
if (bindingPackageVersion !== '
|
|
136
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
135
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
136
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
137
137
|
}
|
|
138
138
|
return binding
|
|
139
139
|
} catch (e) {
|
|
@@ -148,8 +148,8 @@ function requireNative() {
|
|
|
148
148
|
try {
|
|
149
149
|
const binding = require('@earthmover/icechunk-win32-arm64-msvc')
|
|
150
150
|
const bindingPackageVersion = require('@earthmover/icechunk-win32-arm64-msvc/package.json').version
|
|
151
|
-
if (bindingPackageVersion !== '
|
|
152
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
151
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
152
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
153
153
|
}
|
|
154
154
|
return binding
|
|
155
155
|
} catch (e) {
|
|
@@ -167,8 +167,8 @@ function requireNative() {
|
|
|
167
167
|
try {
|
|
168
168
|
const binding = require('@earthmover/icechunk-darwin-universal')
|
|
169
169
|
const bindingPackageVersion = require('@earthmover/icechunk-darwin-universal/package.json').version
|
|
170
|
-
if (bindingPackageVersion !== '
|
|
171
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
170
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
171
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
172
172
|
}
|
|
173
173
|
return binding
|
|
174
174
|
} catch (e) {
|
|
@@ -183,8 +183,8 @@ function requireNative() {
|
|
|
183
183
|
try {
|
|
184
184
|
const binding = require('@earthmover/icechunk-darwin-x64')
|
|
185
185
|
const bindingPackageVersion = require('@earthmover/icechunk-darwin-x64/package.json').version
|
|
186
|
-
if (bindingPackageVersion !== '
|
|
187
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
186
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
187
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
188
188
|
}
|
|
189
189
|
return binding
|
|
190
190
|
} catch (e) {
|
|
@@ -199,8 +199,8 @@ function requireNative() {
|
|
|
199
199
|
try {
|
|
200
200
|
const binding = require('@earthmover/icechunk-darwin-arm64')
|
|
201
201
|
const bindingPackageVersion = require('@earthmover/icechunk-darwin-arm64/package.json').version
|
|
202
|
-
if (bindingPackageVersion !== '
|
|
203
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
202
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
203
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
204
204
|
}
|
|
205
205
|
return binding
|
|
206
206
|
} catch (e) {
|
|
@@ -219,8 +219,8 @@ function requireNative() {
|
|
|
219
219
|
try {
|
|
220
220
|
const binding = require('@earthmover/icechunk-freebsd-x64')
|
|
221
221
|
const bindingPackageVersion = require('@earthmover/icechunk-freebsd-x64/package.json').version
|
|
222
|
-
if (bindingPackageVersion !== '
|
|
223
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
222
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
223
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
224
224
|
}
|
|
225
225
|
return binding
|
|
226
226
|
} catch (e) {
|
|
@@ -235,8 +235,8 @@ function requireNative() {
|
|
|
235
235
|
try {
|
|
236
236
|
const binding = require('@earthmover/icechunk-freebsd-arm64')
|
|
237
237
|
const bindingPackageVersion = require('@earthmover/icechunk-freebsd-arm64/package.json').version
|
|
238
|
-
if (bindingPackageVersion !== '
|
|
239
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
238
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
239
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
240
240
|
}
|
|
241
241
|
return binding
|
|
242
242
|
} catch (e) {
|
|
@@ -256,8 +256,8 @@ function requireNative() {
|
|
|
256
256
|
try {
|
|
257
257
|
const binding = require('@earthmover/icechunk-linux-x64-musl')
|
|
258
258
|
const bindingPackageVersion = require('@earthmover/icechunk-linux-x64-musl/package.json').version
|
|
259
|
-
if (bindingPackageVersion !== '
|
|
260
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
259
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
260
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
261
261
|
}
|
|
262
262
|
return binding
|
|
263
263
|
} catch (e) {
|
|
@@ -272,8 +272,8 @@ function requireNative() {
|
|
|
272
272
|
try {
|
|
273
273
|
const binding = require('@earthmover/icechunk-linux-x64-gnu')
|
|
274
274
|
const bindingPackageVersion = require('@earthmover/icechunk-linux-x64-gnu/package.json').version
|
|
275
|
-
if (bindingPackageVersion !== '
|
|
276
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
275
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
276
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
277
277
|
}
|
|
278
278
|
return binding
|
|
279
279
|
} catch (e) {
|
|
@@ -290,8 +290,8 @@ function requireNative() {
|
|
|
290
290
|
try {
|
|
291
291
|
const binding = require('@earthmover/icechunk-linux-arm64-musl')
|
|
292
292
|
const bindingPackageVersion = require('@earthmover/icechunk-linux-arm64-musl/package.json').version
|
|
293
|
-
if (bindingPackageVersion !== '
|
|
294
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
293
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
294
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
295
295
|
}
|
|
296
296
|
return binding
|
|
297
297
|
} catch (e) {
|
|
@@ -306,8 +306,8 @@ function requireNative() {
|
|
|
306
306
|
try {
|
|
307
307
|
const binding = require('@earthmover/icechunk-linux-arm64-gnu')
|
|
308
308
|
const bindingPackageVersion = require('@earthmover/icechunk-linux-arm64-gnu/package.json').version
|
|
309
|
-
if (bindingPackageVersion !== '
|
|
310
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
309
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
310
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
311
311
|
}
|
|
312
312
|
return binding
|
|
313
313
|
} catch (e) {
|
|
@@ -324,8 +324,8 @@ function requireNative() {
|
|
|
324
324
|
try {
|
|
325
325
|
const binding = require('@earthmover/icechunk-linux-arm-musleabihf')
|
|
326
326
|
const bindingPackageVersion = require('@earthmover/icechunk-linux-arm-musleabihf/package.json').version
|
|
327
|
-
if (bindingPackageVersion !== '
|
|
328
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
327
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
328
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
329
329
|
}
|
|
330
330
|
return binding
|
|
331
331
|
} catch (e) {
|
|
@@ -340,8 +340,8 @@ function requireNative() {
|
|
|
340
340
|
try {
|
|
341
341
|
const binding = require('@earthmover/icechunk-linux-arm-gnueabihf')
|
|
342
342
|
const bindingPackageVersion = require('@earthmover/icechunk-linux-arm-gnueabihf/package.json').version
|
|
343
|
-
if (bindingPackageVersion !== '
|
|
344
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
343
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
344
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
345
345
|
}
|
|
346
346
|
return binding
|
|
347
347
|
} catch (e) {
|
|
@@ -358,8 +358,8 @@ function requireNative() {
|
|
|
358
358
|
try {
|
|
359
359
|
const binding = require('@earthmover/icechunk-linux-loong64-musl')
|
|
360
360
|
const bindingPackageVersion = require('@earthmover/icechunk-linux-loong64-musl/package.json').version
|
|
361
|
-
if (bindingPackageVersion !== '
|
|
362
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
361
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
362
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
363
363
|
}
|
|
364
364
|
return binding
|
|
365
365
|
} catch (e) {
|
|
@@ -374,8 +374,8 @@ function requireNative() {
|
|
|
374
374
|
try {
|
|
375
375
|
const binding = require('@earthmover/icechunk-linux-loong64-gnu')
|
|
376
376
|
const bindingPackageVersion = require('@earthmover/icechunk-linux-loong64-gnu/package.json').version
|
|
377
|
-
if (bindingPackageVersion !== '
|
|
378
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
377
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
378
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
379
379
|
}
|
|
380
380
|
return binding
|
|
381
381
|
} catch (e) {
|
|
@@ -392,8 +392,8 @@ function requireNative() {
|
|
|
392
392
|
try {
|
|
393
393
|
const binding = require('@earthmover/icechunk-linux-riscv64-musl')
|
|
394
394
|
const bindingPackageVersion = require('@earthmover/icechunk-linux-riscv64-musl/package.json').version
|
|
395
|
-
if (bindingPackageVersion !== '
|
|
396
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
395
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
396
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
397
397
|
}
|
|
398
398
|
return binding
|
|
399
399
|
} catch (e) {
|
|
@@ -408,8 +408,8 @@ function requireNative() {
|
|
|
408
408
|
try {
|
|
409
409
|
const binding = require('@earthmover/icechunk-linux-riscv64-gnu')
|
|
410
410
|
const bindingPackageVersion = require('@earthmover/icechunk-linux-riscv64-gnu/package.json').version
|
|
411
|
-
if (bindingPackageVersion !== '
|
|
412
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
411
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
412
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
413
413
|
}
|
|
414
414
|
return binding
|
|
415
415
|
} catch (e) {
|
|
@@ -425,8 +425,8 @@ function requireNative() {
|
|
|
425
425
|
try {
|
|
426
426
|
const binding = require('@earthmover/icechunk-linux-ppc64-gnu')
|
|
427
427
|
const bindingPackageVersion = require('@earthmover/icechunk-linux-ppc64-gnu/package.json').version
|
|
428
|
-
if (bindingPackageVersion !== '
|
|
429
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
428
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
429
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
430
430
|
}
|
|
431
431
|
return binding
|
|
432
432
|
} catch (e) {
|
|
@@ -441,8 +441,8 @@ function requireNative() {
|
|
|
441
441
|
try {
|
|
442
442
|
const binding = require('@earthmover/icechunk-linux-s390x-gnu')
|
|
443
443
|
const bindingPackageVersion = require('@earthmover/icechunk-linux-s390x-gnu/package.json').version
|
|
444
|
-
if (bindingPackageVersion !== '
|
|
445
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
444
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
445
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
446
446
|
}
|
|
447
447
|
return binding
|
|
448
448
|
} catch (e) {
|
|
@@ -461,8 +461,8 @@ function requireNative() {
|
|
|
461
461
|
try {
|
|
462
462
|
const binding = require('@earthmover/icechunk-openharmony-arm64')
|
|
463
463
|
const bindingPackageVersion = require('@earthmover/icechunk-openharmony-arm64/package.json').version
|
|
464
|
-
if (bindingPackageVersion !== '
|
|
465
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
464
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
465
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
466
466
|
}
|
|
467
467
|
return binding
|
|
468
468
|
} catch (e) {
|
|
@@ -477,8 +477,8 @@ function requireNative() {
|
|
|
477
477
|
try {
|
|
478
478
|
const binding = require('@earthmover/icechunk-openharmony-x64')
|
|
479
479
|
const bindingPackageVersion = require('@earthmover/icechunk-openharmony-x64/package.json').version
|
|
480
|
-
if (bindingPackageVersion !== '
|
|
481
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
480
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
481
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
482
482
|
}
|
|
483
483
|
return binding
|
|
484
484
|
} catch (e) {
|
|
@@ -493,8 +493,8 @@ function requireNative() {
|
|
|
493
493
|
try {
|
|
494
494
|
const binding = require('@earthmover/icechunk-openharmony-arm')
|
|
495
495
|
const bindingPackageVersion = require('@earthmover/icechunk-openharmony-arm/package.json').version
|
|
496
|
-
if (bindingPackageVersion !== '
|
|
497
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
496
|
+
if (bindingPackageVersion !== '2.0.0-alpha.4' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
497
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
498
498
|
}
|
|
499
499
|
return binding
|
|
500
500
|
} catch (e) {
|
|
@@ -565,3 +565,5 @@ module.exports.Storage = nativeBinding.Storage
|
|
|
565
565
|
module.exports.JsStorage = nativeBinding.JsStorage
|
|
566
566
|
module.exports.Store = nativeBinding.Store
|
|
567
567
|
module.exports.JsStore = nativeBinding.JsStore
|
|
568
|
+
module.exports.CompressionAlgorithm = nativeBinding.CompressionAlgorithm
|
|
569
|
+
module.exports.JsCompressionAlgorithm = nativeBinding.JsCompressionAlgorithm
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@earthmover/icechunk",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
4
|
-
"description": "JavaScript/TypeScript
|
|
3
|
+
"version": "2.0.0-alpha.4",
|
|
4
|
+
"description": "JavaScript/TypeScript bindings for Icechunk",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -108,9 +108,9 @@
|
|
|
108
108
|
},
|
|
109
109
|
"packageManager": "yarn@4.12.0",
|
|
110
110
|
"optionalDependencies": {
|
|
111
|
-
"@earthmover/icechunk-win32-x64-msvc": "2.0.0-alpha.
|
|
112
|
-
"@earthmover/icechunk-linux-x64-gnu": "2.0.0-alpha.
|
|
113
|
-
"@earthmover/icechunk-darwin-arm64": "2.0.0-alpha.
|
|
114
|
-
"@earthmover/icechunk-wasm32-wasi": "2.0.0-alpha.
|
|
111
|
+
"@earthmover/icechunk-win32-x64-msvc": "2.0.0-alpha.4",
|
|
112
|
+
"@earthmover/icechunk-linux-x64-gnu": "2.0.0-alpha.4",
|
|
113
|
+
"@earthmover/icechunk-darwin-arm64": "2.0.0-alpha.4",
|
|
114
|
+
"@earthmover/icechunk-wasm32-wasi": "2.0.0-alpha.4"
|
|
115
115
|
}
|
|
116
116
|
}
|