@artblocks/abx-storage 0.1.0-alpha.32 → 0.1.0-alpha.34
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/CHANGELOG.md +9 -74
- package/dist/arweave.d.ts +2 -2
- package/dist/arweave.js +3 -3
- package/dist/content-index.js +1 -1
- package/dist/content-index.js.map +1 -1
- package/dist/fs.js +1 -1
- package/dist/fs.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,83 +1,18 @@
|
|
|
1
1
|
# @artblocks/abx-storage
|
|
2
2
|
|
|
3
|
-
## 0.1.0-alpha.
|
|
3
|
+
## 0.1.0-alpha.34
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
- Updated dependencies [
|
|
8
|
-
|
|
7
|
+
- Updated dependencies [3ddba71]
|
|
8
|
+
- Updated dependencies [9065128]
|
|
9
|
+
- @artblocks/abx-sdk@0.1.0-alpha.34
|
|
9
10
|
|
|
10
|
-
## 0.1.0-alpha.
|
|
11
|
-
|
|
12
|
-
### Minor Changes
|
|
13
|
-
|
|
14
|
-
- c068a0f: `--backend ipfs` in `kubo` mode now supports directory upload (recursive add through a local Kubo
|
|
15
|
-
node's `/api/v0/add`), matching the `putDirectory` contract Pinata and Arweave already implement —
|
|
16
|
-
so a code drop or multi-file collection no longer needs a Pinata JWT to publish through a
|
|
17
|
-
self-hosted node. A truncated stream or a mid-stream Kubo error now fails the upload outright
|
|
18
|
-
instead of ever returning a CID for a partial directory.
|
|
19
|
-
- c068a0f: The ArDrive Turbo (Arweave) upload implementation moves out of `@artblocks/abx-storage` into a new,
|
|
20
|
-
separately-installed package, `@artblocks/abx-storage-arweave`. `@ardrive/turbo-sdk` depends on
|
|
21
|
-
`x402-fetch` -> `x402` -> `wagmi`, which drags in the entire browser wallet-connector ecosystem
|
|
22
|
-
(`@reown/appkit`, `@walletconnect/*`, `@metamask/sdk`, `@coinbase/wallet-sdk`, `@base-org/account`,
|
|
23
|
-
`porto`) — hundreds of megabytes a Node CLI never executes. `@artblocks/abx-storage` previously
|
|
24
|
-
listed it under `optionalDependencies`, which does not help: npm installs an optional dependency by
|
|
25
|
-
default whenever it installs successfully (it only tolerates install _failure_, e.g. `fsevents`).
|
|
26
|
-
|
|
27
|
-
A default install of `@artblocks/abx-cli` / `@artblocks/abx-storage` now installs none of it.
|
|
28
|
-
`--backend arweave` (provider `turbo`, the default) needs the new package installed explicitly:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npm install @artblocks/abx-storage-arweave
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Without it, `--backend arweave` names this exact install command (or the dependency-free
|
|
35
|
-
`--provider http-bundler --upload-url <bundler>` alternative) instead of failing unhelpfully.
|
|
36
|
-
`@artblocks/abx-storage` declares the new package only as an _optional peer dependency_
|
|
37
|
-
(`peerDependenciesMeta.optional`), which — unlike `optionalDependencies` — is never auto-installed;
|
|
38
|
-
`ArweaveBackend` reaches it only through a lazy `await import()` at actual upload/balance/top-up
|
|
39
|
-
time, never for retrieval.
|
|
40
|
-
|
|
41
|
-
Breaking change for direct API consumers: `arweaveFunding()` and `ArweaveBackend#funding()` are now
|
|
42
|
-
async (they resolve the optional package on the `turbo` path). `TurboUploader` and `turboUploadId`
|
|
43
|
-
move to `@artblocks/abx-storage-arweave` and are no longer exported from `@artblocks/abx-storage`.
|
|
44
|
-
|
|
45
|
-
### Patch Changes
|
|
46
|
-
|
|
47
|
-
- c068a0f: Local data-directory resolution (`.abx-self-host` / `ABX_DATA_DIR`) is now centralized in one SDK
|
|
48
|
-
resolver (`resolveDataDir` from `@artblocks/abx-sdk/node`) instead of five independent copies of the
|
|
49
|
-
same fallback across the CLI, indexer, and storage packages — the setup that could silently split a
|
|
50
|
-
project's SQLite projection from its managed Arweave key into two different directories.
|
|
51
|
-
|
|
52
|
-
A handful of READ commands (`status`, `state`, `verify`, `doctor`, `capabilities`, `tokens`,
|
|
53
|
-
`tokenuri`, `contracturi`, `inspect`, `minter show`) now search upward from the current directory,
|
|
54
|
-
git-style, for an already-existing `.abx-self-host` before falling back to creating one at cwd —
|
|
55
|
-
bounded at the home directory, a `.git` repository root, or the filesystem root, and never crossing
|
|
56
|
-
into an unrelated directory tree. Running one of these from a project subdirectory (e.g. a
|
|
57
|
-
`contracts/` folder) now finds the same node a run from the project root would, instead of quietly
|
|
58
|
-
reporting an empty one. `abx status`'s existing `data: <path>` line — and a new one-line notice —
|
|
59
|
-
name the directory whenever it was found this way. Every WRITE command is unaffected: it always
|
|
60
|
-
resolves strictly to the current directory, exactly as before, so nothing is ever created somewhere
|
|
61
|
-
you didn't `cd` into. `ABX_DATA_DIR`, when set, still always wins outright and disables the search
|
|
62
|
-
entirely.
|
|
63
|
-
|
|
64
|
-
- Updated dependencies [c068a0f]
|
|
65
|
-
- Updated dependencies [c068a0f]
|
|
66
|
-
- Updated dependencies [c068a0f]
|
|
67
|
-
- Updated dependencies [c068a0f]
|
|
68
|
-
- Updated dependencies [c068a0f]
|
|
69
|
-
- Updated dependencies [c068a0f]
|
|
70
|
-
- Updated dependencies [c068a0f]
|
|
71
|
-
- @artblocks/abx-sdk@0.1.0-alpha.31
|
|
72
|
-
|
|
73
|
-
## 0.1.0-alpha.30
|
|
11
|
+
## 0.1.0-alpha.33
|
|
74
12
|
|
|
75
13
|
### Patch Changes
|
|
76
14
|
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
## Unreleased
|
|
82
|
-
|
|
83
|
-
Public release history begins here.
|
|
15
|
+
- 9242a05: Prepare package metadata, release notes, and public-facing source comments for the initial public
|
|
16
|
+
source release.
|
|
17
|
+
- Updated dependencies [9242a05]
|
|
18
|
+
- @artblocks/abx-sdk@0.1.0-alpha.33
|
package/dist/arweave.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { type ArweaveJwk } from './arweave-identity.js';
|
|
|
13
13
|
* - **`turbo`** (default, recommended) — backed by ArDrive Turbo. Uploads under 100 KiB are
|
|
14
14
|
* **free with no setup**; larger uploads draw on prepaid credits you top up with a card (or
|
|
15
15
|
* crypto). The actual Turbo/arbundles implementation lives in the SEPARATE, OPTIONAL
|
|
16
|
-
* `@artblocks/abx-storage-arweave` package
|
|
16
|
+
* `@artblocks/abx-storage-arweave` package — `@ardrive/turbo-sdk` depends on
|
|
17
17
|
* `x402-fetch` -> `x402` -> `wagmi`, which drags in the entire browser wallet-connector
|
|
18
18
|
* ecosystem, so a default CLI/SDK install must never pull it in. `buildUploader` below
|
|
19
19
|
* `await import()`s it only when an upload/balance/top-up actually runs — never for retrieval
|
|
@@ -237,7 +237,7 @@ export declare function arweaveConfigFromEnv(): ArweaveConfig;
|
|
|
237
237
|
*
|
|
238
238
|
* `dataDir`, when given, is the CALLER'S already-resolved data directory (the CLI passes its own
|
|
239
239
|
* `dataDir()` — see `config.ts`) — pass it whenever one is available so this can't disagree with
|
|
240
|
-
* wherever the caller's SQLite projection / content index live (
|
|
240
|
+
* wherever the caller's SQLite projection / content index live (the data-directory coherence
|
|
241
241
|
* criterion). Omit it only for a caller with no data-dir context of its own (e.g. an SDK
|
|
242
242
|
* integrator reading `arweaveConfigFromEnv()` directly), which falls back to the same centralized
|
|
243
243
|
* `resolveDataDir()` every other unparameterized call site uses.
|
package/dist/arweave.js
CHANGED
|
@@ -136,7 +136,7 @@ export function turboIdentityAddress(id) {
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
const trim = (u) => u.replace(/\/+$/, '');
|
|
139
|
-
/** The optional package carrying the Turbo/arbundles implementation
|
|
139
|
+
/** The optional package carrying the Turbo/arbundles implementation — loaded lazily
|
|
140
140
|
* via an INDIRECT specifier (a variable, not a string literal) so TypeScript resolves the
|
|
141
141
|
* `import()` below as `any` instead of trying to resolve real types for a package this file
|
|
142
142
|
* deliberately has no build-time dependency on (see the module doc and {@link buildUploader}). */
|
|
@@ -178,7 +178,7 @@ export function arweaveProvider(cfg) {
|
|
|
178
178
|
* Loads the optional `@artblocks/abx-storage-arweave` package and constructs its `TurboUploader`
|
|
179
179
|
* for `id` — the ONLY place this file reaches for that package, and only on this call path (never
|
|
180
180
|
* for retrieval/health). A clean install of `@artblocks/abx-cli` / `@artblocks/abx-storage` never
|
|
181
|
-
* installs it
|
|
181
|
+
* installs it; this throws the actionable "install it, or switch provider" error the
|
|
182
182
|
* unavailable-adapter case needs.
|
|
183
183
|
*
|
|
184
184
|
* `TURBO_ARWEAVE_PACKAGE` is a variable, not a string literal, specifically so TypeScript types the
|
|
@@ -344,7 +344,7 @@ export function arweaveConfigFromEnv() {
|
|
|
344
344
|
*
|
|
345
345
|
* `dataDir`, when given, is the CALLER'S already-resolved data directory (the CLI passes its own
|
|
346
346
|
* `dataDir()` — see `config.ts`) — pass it whenever one is available so this can't disagree with
|
|
347
|
-
* wherever the caller's SQLite projection / content index live (
|
|
347
|
+
* wherever the caller's SQLite projection / content index live (the data-directory coherence
|
|
348
348
|
* criterion). Omit it only for a caller with no data-dir context of its own (e.g. an SDK
|
|
349
349
|
* integrator reading `arweaveConfigFromEnv()` directly), which falls back to the same centralized
|
|
350
350
|
* `resolveDataDir()` every other unparameterized call site uses.
|
package/dist/content-index.js
CHANGED
|
@@ -5,7 +5,7 @@ export class ContentIndex {
|
|
|
5
5
|
path;
|
|
6
6
|
data;
|
|
7
7
|
constructor(dataDir) {
|
|
8
|
-
// Centralized in the SDK
|
|
8
|
+
// Centralized in the SDK — see resolveDataDir's doc comment.
|
|
9
9
|
const base = dataDir ?? resolveDataDir().dir;
|
|
10
10
|
mkdirSync(base, { recursive: true });
|
|
11
11
|
this.path = resolve(base, 'content-index.json');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-index.js","sourceRoot":"","sources":["../src/content-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AAC3E,OAAO,EAA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,IAAI,CAAC,IAAI,CAAC;IACrC,CAAC;IAED,GAAG,CAAC,IAAS,EAAE,KAAiB;QAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC;QAClC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/D,CAAC;CACF"}
|
package/dist/fs.js
CHANGED
|
@@ -12,7 +12,7 @@ export class LocalFsBackend {
|
|
|
12
12
|
id = 'fs';
|
|
13
13
|
dir;
|
|
14
14
|
constructor(dataDir) {
|
|
15
|
-
// Centralized in the SDK
|
|
15
|
+
// Centralized in the SDK — see resolveDataDir's doc comment.
|
|
16
16
|
const base = dataDir ?? resolveDataDir().dir;
|
|
17
17
|
this.dir = resolve(base, 'content');
|
|
18
18
|
mkdirSync(this.dir, { recursive: true });
|
package/dist/fs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AACnF,OAAO,EAAC,IAAI,EAAE,OAAO,EAAC,MAAM,WAAW,CAAC;AAExC,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAGvD;;;;;;GAMG;AACH,MAAM,OAAO,cAAc;IAChB,EAAE,GAAG,IAAI,CAAC;IACV,GAAG,CAAS;IAErB,YAAY,OAAgB;QAC1B,
|
|
1
|
+
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AACnF,OAAO,EAAC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CAAC,CAAC,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC;QACvG,OAAO,EAAC,KAAK,EAAE,WAAW,EAAC,CAAC;IAC9B,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,IAAS;QACjB,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACrC,CAAC;IAED,KAAK,CAAC,MAAM;QACV,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;YACvC,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC3B,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,CAAC,KAAK,CAAC,CAAC;YACd,OAAO,EAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,IAAI,CAAC,GAAG,EAAE,EAAC,CAAC;QACrD,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,EAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAG,CAAW,CAAC,OAAO,EAAC,CAAC;QACnD,CAAC;IACH,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artblocks/abx-storage",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.34",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Storage adapters for ABX content using filesystem, S3-compatible, IPFS, or Arweave backends.",
|
|
6
6
|
"type": "module",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"viem": "^2.56.
|
|
43
|
-
"@artblocks/abx-sdk": "0.1.0-alpha.
|
|
42
|
+
"viem": "^2.56.3",
|
|
43
|
+
"@artblocks/abx-sdk": "0.1.0-alpha.34"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@artblocks/abx-storage-arweave": ">=0.1.0-alpha.0"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@artblocks/abx-storage-arweave": "0.1.0-alpha.
|
|
54
|
+
"@artblocks/abx-storage-arweave": "0.1.0-alpha.4"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "tsc -b tsconfig.build.json"
|