File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed
Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ export default defineConfig({
132132 plugins: [wasm (), topLevelAwait ()],
133133 optimizeDeps: {
134134 exclude: [' @earthmover/icechunk' , ' @earthmover/icechunk-wasm32-wasi' ],
135+ include: [' @earthmover/icechunk > @earthmover/icechunk-wasm32-wasi' ],
135136 },
136137 server: {
137138 headers: {
Original file line number Diff line number Diff line change 99 * const repo = await Repository.open(storage)
1010 */
1111
12- const { Storage } = require ( '@earthmover/icechunk' )
12+ import { Storage } from '@earthmover/icechunk'
1313
1414/**
1515 * @param {string } baseUrl - Base URL of the icechunk repository (no trailing slash)
1616 * @returns {Storage }
1717 */
18- function createFetchStorage ( baseUrl ) {
18+ export function createFetchStorage ( baseUrl ) {
1919 // Normalize: strip trailing slash
2020 const base = baseUrl . replace ( / \/ + $ / , '' )
2121
@@ -57,9 +57,7 @@ function createFetchStorage(baseUrl) {
5757 } ,
5858
5959 listObjects : async ( _err , prefix ) => {
60- // Try S3-style XML listing
61- // Derive bucket URL and key prefix from the base URL
62- // e.g. https://bucket.s3.region.amazonaws.com/prefix -> bucket URL + key prefix
60+ // S3-style XML listing
6361 const url = new URL ( base )
6462 const keyPrefix = url . pathname . replace ( / ^ \/ / , '' ) + '/' + prefix
6563 const listUrl = `${ url . origin } /?list-type=2&prefix=${ encodeURIComponent ( keyPrefix ) } `
@@ -126,5 +124,3 @@ function createFetchStorage(baseUrl) {
126124 } ,
127125 } )
128126}
129-
130- module . exports = { createFetchStorage }
Original file line number Diff line number Diff line change 2626 },
2727 "./fetch-storage" : {
2828 "types" : " ./fetch-storage.d.ts" ,
29- "default" : " ./fetch-storage.js "
29+ "default" : " ./fetch-storage.mjs "
3030 }
3131 },
3232 "files" : [
3333 " index.d.ts" ,
3434 " index.js" ,
3535 " browser.js" ,
36- " fetch-storage.js " ,
36+ " fetch-storage.mjs " ,
3737 " fetch-storage.d.ts"
3838 ],
3939 "napi" : {
You can’t perform that action at this time.
0 commit comments