@supabase/storage-js 2.87.4-canary.2 → 2.87.4-canary.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 +2 -106
- package/dist/index.cjs +3019 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2601 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +2601 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2998 -0
- package/dist/index.mjs.map +1 -0
- package/dist/umd/supabase.js +1 -1
- package/package.json +21 -12
- package/src/lib/version.ts +1 -1
- package/dist/main/StorageClient.d.ts +0 -64
- package/dist/main/StorageClient.d.ts.map +0 -1
- package/dist/main/StorageClient.js +0 -74
- package/dist/main/StorageClient.js.map +0 -1
- package/dist/main/index.d.ts +0 -7
- package/dist/main/index.d.ts.map +0 -1
- package/dist/main/index.js +0 -12
- package/dist/main/index.js.map +0 -1
- package/dist/main/lib/constants.d.ts +0 -4
- package/dist/main/lib/constants.d.ts.map +0 -1
- package/dist/main/lib/constants.js +0 -8
- package/dist/main/lib/constants.js.map +0 -1
- package/dist/main/lib/errors.d.ts +0 -21
- package/dist/main/lib/errors.d.ts.map +0 -1
- package/dist/main/lib/errors.js +0 -41
- package/dist/main/lib/errors.js.map +0 -1
- package/dist/main/lib/fetch.d.ts +0 -16
- package/dist/main/lib/fetch.d.ts.map +0 -1
- package/dist/main/lib/fetch.js +0 -95
- package/dist/main/lib/fetch.js.map +0 -1
- package/dist/main/lib/helpers.d.ts +0 -28
- package/dist/main/lib/helpers.d.ts.map +0 -1
- package/dist/main/lib/helpers.js +0 -87
- package/dist/main/lib/helpers.js.map +0 -1
- package/dist/main/lib/index.d.ts +0 -6
- package/dist/main/lib/index.d.ts.map +0 -1
- package/dist/main/lib/index.js +0 -9
- package/dist/main/lib/index.js.map +0 -1
- package/dist/main/lib/types.d.ts +0 -226
- package/dist/main/lib/types.d.ts.map +0 -1
- package/dist/main/lib/types.js +0 -3
- package/dist/main/lib/types.js.map +0 -1
- package/dist/main/lib/vectors/StorageVectorsClient.d.ts +0 -505
- package/dist/main/lib/vectors/StorageVectorsClient.d.ts.map +0 -1
- package/dist/main/lib/vectors/StorageVectorsClient.js +0 -582
- package/dist/main/lib/vectors/StorageVectorsClient.js.map +0 -1
- package/dist/main/lib/vectors/VectorBucketApi.d.ts +0 -32
- package/dist/main/lib/vectors/VectorBucketApi.d.ts.map +0 -1
- package/dist/main/lib/vectors/VectorBucketApi.js +0 -102
- package/dist/main/lib/vectors/VectorBucketApi.js.map +0 -1
- package/dist/main/lib/vectors/VectorDataApi.d.ts +0 -32
- package/dist/main/lib/vectors/VectorDataApi.d.ts.map +0 -1
- package/dist/main/lib/vectors/VectorDataApi.js +0 -147
- package/dist/main/lib/vectors/VectorDataApi.js.map +0 -1
- package/dist/main/lib/vectors/VectorIndexApi.d.ts +0 -47
- package/dist/main/lib/vectors/VectorIndexApi.d.ts.map +0 -1
- package/dist/main/lib/vectors/VectorIndexApi.js +0 -104
- package/dist/main/lib/vectors/VectorIndexApi.js.map +0 -1
- package/dist/main/lib/vectors/constants.d.ts +0 -5
- package/dist/main/lib/vectors/constants.d.ts.map +0 -1
- package/dist/main/lib/vectors/constants.js +0 -9
- package/dist/main/lib/vectors/constants.js.map +0 -1
- package/dist/main/lib/vectors/errors.d.ts +0 -55
- package/dist/main/lib/vectors/errors.d.ts.map +0 -1
- package/dist/main/lib/vectors/errors.js +0 -76
- package/dist/main/lib/vectors/errors.js.map +0 -1
- package/dist/main/lib/vectors/fetch.d.ts +0 -57
- package/dist/main/lib/vectors/fetch.d.ts.map +0 -1
- package/dist/main/lib/vectors/fetch.js +0 -167
- package/dist/main/lib/vectors/fetch.js.map +0 -1
- package/dist/main/lib/vectors/helpers.d.ts +0 -46
- package/dist/main/lib/vectors/helpers.d.ts.map +0 -1
- package/dist/main/lib/vectors/helpers.js +0 -74
- package/dist/main/lib/vectors/helpers.js.map +0 -1
- package/dist/main/lib/vectors/index.d.ts +0 -11
- package/dist/main/lib/vectors/index.d.ts.map +0 -1
- package/dist/main/lib/vectors/index.js +0 -31
- package/dist/main/lib/vectors/index.js.map +0 -1
- package/dist/main/lib/vectors/types.d.ts +0 -279
- package/dist/main/lib/vectors/types.d.ts.map +0 -1
- package/dist/main/lib/vectors/types.js +0 -3
- package/dist/main/lib/vectors/types.js.map +0 -1
- package/dist/main/lib/version.d.ts +0 -2
- package/dist/main/lib/version.d.ts.map +0 -1
- package/dist/main/lib/version.js +0 -11
- package/dist/main/lib/version.js.map +0 -1
- package/dist/main/packages/BlobDownloadBuilder.d.ts +0 -16
- package/dist/main/packages/BlobDownloadBuilder.d.ts.map +0 -1
- package/dist/main/packages/BlobDownloadBuilder.js +0 -55
- package/dist/main/packages/BlobDownloadBuilder.js.map +0 -1
- package/dist/main/packages/StorageAnalyticsClient.d.ts +0 -324
- package/dist/main/packages/StorageAnalyticsClient.d.ts.map +0 -1
- package/dist/main/packages/StorageAnalyticsClient.js +0 -395
- package/dist/main/packages/StorageAnalyticsClient.js.map +0 -1
- package/dist/main/packages/StorageBucketApi.d.ts +0 -266
- package/dist/main/packages/StorageBucketApi.d.ts.map +0 -1
- package/dist/main/packages/StorageBucketApi.js +0 -362
- package/dist/main/packages/StorageBucketApi.js.map +0 -1
- package/dist/main/packages/StorageFileApi.d.ts +0 -680
- package/dist/main/packages/StorageFileApi.d.ts.map +0 -1
- package/dist/main/packages/StorageFileApi.js +0 -1002
- package/dist/main/packages/StorageFileApi.js.map +0 -1
- package/dist/main/packages/StreamDownloadBuilder.d.ts +0 -9
- package/dist/main/packages/StreamDownloadBuilder.d.ts.map +0 -1
- package/dist/main/packages/StreamDownloadBuilder.js +0 -35
- package/dist/main/packages/StreamDownloadBuilder.js.map +0 -1
- package/dist/module/StorageClient.d.ts +0 -64
- package/dist/module/StorageClient.d.ts.map +0 -1
- package/dist/module/StorageClient.js +0 -69
- package/dist/module/StorageClient.js.map +0 -1
- package/dist/module/index.d.ts +0 -7
- package/dist/module/index.d.ts.map +0 -1
- package/dist/module/index.js +0 -6
- package/dist/module/index.js.map +0 -1
- package/dist/module/lib/constants.d.ts +0 -4
- package/dist/module/lib/constants.d.ts.map +0 -1
- package/dist/module/lib/constants.js +0 -5
- package/dist/module/lib/constants.js.map +0 -1
- package/dist/module/lib/errors.d.ts +0 -21
- package/dist/module/lib/errors.d.ts.map +0 -1
- package/dist/module/lib/errors.js +0 -34
- package/dist/module/lib/errors.js.map +0 -1
- package/dist/module/lib/fetch.d.ts +0 -16
- package/dist/module/lib/fetch.d.ts.map +0 -1
- package/dist/module/lib/fetch.js +0 -88
- package/dist/module/lib/fetch.js.map +0 -1
- package/dist/module/lib/helpers.d.ts +0 -28
- package/dist/module/lib/helpers.d.ts.map +0 -1
- package/dist/module/lib/helpers.js +0 -79
- package/dist/module/lib/helpers.js.map +0 -1
- package/dist/module/lib/index.d.ts +0 -6
- package/dist/module/lib/index.d.ts.map +0 -1
- package/dist/module/lib/index.js +0 -6
- package/dist/module/lib/index.js.map +0 -1
- package/dist/module/lib/types.d.ts +0 -226
- package/dist/module/lib/types.d.ts.map +0 -1
- package/dist/module/lib/types.js +0 -2
- package/dist/module/lib/types.js.map +0 -1
- package/dist/module/lib/vectors/StorageVectorsClient.d.ts +0 -505
- package/dist/module/lib/vectors/StorageVectorsClient.d.ts.map +0 -1
- package/dist/module/lib/vectors/StorageVectorsClient.js +0 -576
- package/dist/module/lib/vectors/StorageVectorsClient.js.map +0 -1
- package/dist/module/lib/vectors/VectorBucketApi.d.ts +0 -32
- package/dist/module/lib/vectors/VectorBucketApi.d.ts.map +0 -1
- package/dist/module/lib/vectors/VectorBucketApi.js +0 -99
- package/dist/module/lib/vectors/VectorBucketApi.js.map +0 -1
- package/dist/module/lib/vectors/VectorDataApi.d.ts +0 -32
- package/dist/module/lib/vectors/VectorDataApi.d.ts.map +0 -1
- package/dist/module/lib/vectors/VectorDataApi.js +0 -144
- package/dist/module/lib/vectors/VectorDataApi.js.map +0 -1
- package/dist/module/lib/vectors/VectorIndexApi.d.ts +0 -47
- package/dist/module/lib/vectors/VectorIndexApi.d.ts.map +0 -1
- package/dist/module/lib/vectors/VectorIndexApi.js +0 -101
- package/dist/module/lib/vectors/VectorIndexApi.js.map +0 -1
- package/dist/module/lib/vectors/constants.d.ts +0 -5
- package/dist/module/lib/vectors/constants.d.ts.map +0 -1
- package/dist/module/lib/vectors/constants.js +0 -6
- package/dist/module/lib/vectors/constants.js.map +0 -1
- package/dist/module/lib/vectors/errors.d.ts +0 -55
- package/dist/module/lib/vectors/errors.d.ts.map +0 -1
- package/dist/module/lib/vectors/errors.js +0 -69
- package/dist/module/lib/vectors/errors.js.map +0 -1
- package/dist/module/lib/vectors/fetch.d.ts +0 -57
- package/dist/module/lib/vectors/fetch.d.ts.map +0 -1
- package/dist/module/lib/vectors/fetch.js +0 -161
- package/dist/module/lib/vectors/fetch.js.map +0 -1
- package/dist/module/lib/vectors/helpers.d.ts +0 -46
- package/dist/module/lib/vectors/helpers.d.ts.map +0 -1
- package/dist/module/lib/vectors/helpers.js +0 -66
- package/dist/module/lib/vectors/helpers.js.map +0 -1
- package/dist/module/lib/vectors/index.d.ts +0 -11
- package/dist/module/lib/vectors/index.d.ts.map +0 -1
- package/dist/module/lib/vectors/index.js +0 -11
- package/dist/module/lib/vectors/index.js.map +0 -1
- package/dist/module/lib/vectors/types.d.ts +0 -279
- package/dist/module/lib/vectors/types.d.ts.map +0 -1
- package/dist/module/lib/vectors/types.js +0 -2
- package/dist/module/lib/vectors/types.js.map +0 -1
- package/dist/module/lib/version.d.ts +0 -2
- package/dist/module/lib/version.d.ts.map +0 -1
- package/dist/module/lib/version.js +0 -8
- package/dist/module/lib/version.js.map +0 -1
- package/dist/module/packages/BlobDownloadBuilder.d.ts +0 -16
- package/dist/module/packages/BlobDownloadBuilder.d.ts.map +0 -1
- package/dist/module/packages/BlobDownloadBuilder.js +0 -53
- package/dist/module/packages/BlobDownloadBuilder.js.map +0 -1
- package/dist/module/packages/StorageAnalyticsClient.d.ts +0 -324
- package/dist/module/packages/StorageAnalyticsClient.d.ts.map +0 -1
- package/dist/module/packages/StorageAnalyticsClient.js +0 -392
- package/dist/module/packages/StorageAnalyticsClient.js.map +0 -1
- package/dist/module/packages/StorageBucketApi.d.ts +0 -266
- package/dist/module/packages/StorageBucketApi.d.ts.map +0 -1
- package/dist/module/packages/StorageBucketApi.js +0 -359
- package/dist/module/packages/StorageBucketApi.js.map +0 -1
- package/dist/module/packages/StorageFileApi.d.ts +0 -680
- package/dist/module/packages/StorageFileApi.d.ts.map +0 -1
- package/dist/module/packages/StorageFileApi.js +0 -999
- package/dist/module/packages/StorageFileApi.js.map +0 -1
- package/dist/module/packages/StreamDownloadBuilder.d.ts +0 -9
- package/dist/module/packages/StreamDownloadBuilder.d.ts.map +0 -1
- package/dist/module/packages/StreamDownloadBuilder.js +0 -32
- package/dist/module/packages/StreamDownloadBuilder.js.map +0 -1
- package/dist/tsconfig.module.tsbuildinfo +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
package/README.md
CHANGED
|
@@ -1157,121 +1157,17 @@ This package is part of the [Supabase JavaScript monorepo](https://github.com/su
|
|
|
1157
1157
|
|
|
1158
1158
|
#### Build Scripts Overview
|
|
1159
1159
|
|
|
1160
|
-
The storage-js package uses multiple build scripts to generate different module formats for various JavaScript environments:
|
|
1161
|
-
|
|
1162
|
-
| Script | Description | Output |
|
|
1163
|
-
| -------------- | --------------------------- | --------------------------------------------------------------- |
|
|
1164
|
-
| `build` | **Complete build pipeline** | Runs all build steps in sequence |
|
|
1165
|
-
| `build:main` | **CommonJS build** | `dist/main/` - Node.js compatible CommonJS modules |
|
|
1166
|
-
| `build:module` | **ES Modules build** | `dist/module/` - Modern ES6 modules with TypeScript definitions |
|
|
1167
|
-
| `build:umd` | **UMD build** | `dist/umd/` - Universal Module Definition for browsers/CDN |
|
|
1168
|
-
| `clean` | **Clean build artifacts** | Removes `dist/` and `docs/v2/` directories |
|
|
1169
|
-
|
|
1170
|
-
#### Running Builds
|
|
1171
|
-
|
|
1172
|
-
##### Complete Build (Recommended)
|
|
1173
|
-
|
|
1174
1160
|
```bash
|
|
1175
|
-
#
|
|
1161
|
+
# Build the package
|
|
1176
1162
|
npx nx build storage-js
|
|
1177
|
-
```
|
|
1178
1163
|
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
1. **Cleans** - Removes any existing build artifacts
|
|
1182
|
-
2. **Formats** - Ensures consistent code formatting
|
|
1183
|
-
3. **Builds CommonJS** - For Node.js environments (`dist/main/`)
|
|
1184
|
-
4. **Builds ES Modules** - For modern bundlers (`dist/module/`)
|
|
1185
|
-
5. **Builds UMD** - For browser script tags (`dist/umd/`)
|
|
1186
|
-
|
|
1187
|
-
##### Development Build with Watch Mode
|
|
1188
|
-
|
|
1189
|
-
```bash
|
|
1190
|
-
# Continuously rebuild on file changes (from monorepo root)
|
|
1164
|
+
# Watch mode for development
|
|
1191
1165
|
npx nx build storage-js --watch
|
|
1192
|
-
```
|
|
1193
|
-
|
|
1194
|
-
##### Individual Build Targets
|
|
1195
|
-
|
|
1196
|
-
For specific build outputs during development:
|
|
1197
|
-
|
|
1198
|
-
```bash
|
|
1199
|
-
# Build CommonJS only (Node.js)
|
|
1200
|
-
npx nx build:main storage-js
|
|
1201
|
-
|
|
1202
|
-
# Build ES Modules only (Modern bundlers)
|
|
1203
|
-
npx nx build:module storage-js
|
|
1204
|
-
|
|
1205
|
-
# Build UMD only (Browser/CDN)
|
|
1206
|
-
npx nx build:umd storage-js
|
|
1207
|
-
```
|
|
1208
|
-
|
|
1209
|
-
##### Other Useful Commands
|
|
1210
|
-
|
|
1211
|
-
```bash
|
|
1212
|
-
# Clean build artifacts
|
|
1213
|
-
npx nx clean storage-js
|
|
1214
|
-
|
|
1215
|
-
# Format code
|
|
1216
|
-
npx nx format storage-js
|
|
1217
|
-
|
|
1218
|
-
# Type checking
|
|
1219
|
-
npx nx typecheck storage-js
|
|
1220
1166
|
|
|
1221
1167
|
# Generate documentation
|
|
1222
1168
|
npx nx docs storage-js
|
|
1223
1169
|
```
|
|
1224
1170
|
|
|
1225
|
-
#### Build Outputs Explained
|
|
1226
|
-
|
|
1227
|
-
##### CommonJS (`dist/main/`)
|
|
1228
|
-
|
|
1229
|
-
- **Used by:** Node.js applications, older build tools
|
|
1230
|
-
- **Entry point:** `dist/main/index.js`
|
|
1231
|
-
- **Module format:** `require()` and `module.exports`
|
|
1232
|
-
- **TypeScript definitions:** Included
|
|
1233
|
-
|
|
1234
|
-
##### ES Modules (`dist/module/`)
|
|
1235
|
-
|
|
1236
|
-
- **Used by:** Modern bundlers (Webpack, Rollup, Vite)
|
|
1237
|
-
- **Entry point:** `dist/module/index.js`
|
|
1238
|
-
- **Module format:** `import` and `export`
|
|
1239
|
-
- **TypeScript definitions:** `dist/module/index.d.ts`
|
|
1240
|
-
- **Benefits:** Tree-shaking, better static analysis
|
|
1241
|
-
|
|
1242
|
-
##### UMD (`dist/umd/`)
|
|
1243
|
-
|
|
1244
|
-
- **Used by:** Browser `<script>` tags, CDNs
|
|
1245
|
-
- **Entry point:** `dist/umd/supabase.js`
|
|
1246
|
-
- **Global variable:** `window.supabase`
|
|
1247
|
-
- **Size:** Larger (includes all dependencies)
|
|
1248
|
-
- **Usage example:**
|
|
1249
|
-
```html
|
|
1250
|
-
<script src="https://unpkg.com/@supabase/storage-js/dist/umd/supabase.js"></script>
|
|
1251
|
-
<script>
|
|
1252
|
-
const { StorageClient } = window.supabase
|
|
1253
|
-
</script>
|
|
1254
|
-
```
|
|
1255
|
-
|
|
1256
|
-
#### Package Exports
|
|
1257
|
-
|
|
1258
|
-
The package.json exports are configured to provide the right format for each environment:
|
|
1259
|
-
|
|
1260
|
-
```json
|
|
1261
|
-
{
|
|
1262
|
-
"main": "dist/main/index.js",
|
|
1263
|
-
"module": "dist/module/index.js",
|
|
1264
|
-
"types": "dist/module/index.d.ts",
|
|
1265
|
-
"jsdelivr": "dist/umd/supabase.js",
|
|
1266
|
-
"unpkg": "dist/umd/supabase.js"
|
|
1267
|
-
}
|
|
1268
|
-
```
|
|
1269
|
-
|
|
1270
|
-
- **main** → Node.js environments (CommonJS format)
|
|
1271
|
-
- **module** → Modern bundlers like Webpack, Vite, Rollup (ES Modules)
|
|
1272
|
-
- **types** → TypeScript type definitions
|
|
1273
|
-
- **jsdelivr/unpkg** → CDN usage via `<script>` tags (UMD format)
|
|
1274
|
-
|
|
1275
1171
|
### Testing
|
|
1276
1172
|
|
|
1277
1173
|
**Important:** The storage-js tests require a local test infrastructure running in Docker. This is **NOT** the same as a regular Supabase instance - it's a specialized test setup with its own storage API, database, and Kong gateway.
|