@nitida/asset-client 0.19.0 → 0.19.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/AGENTS.md +4 -2
- package/LICENSE +21 -0
- package/README.md +10 -0
- package/SECURITY.md +56 -0
- package/package.json +4 -2
package/AGENTS.md
CHANGED
|
@@ -117,5 +117,7 @@ was never renamed.
|
|
|
117
117
|
|
|
118
118
|
⚠️ `@aquienpz/asset-client` still exists on npm but is **frozen at 0.14.2 (2026-07-18)**. It
|
|
119
119
|
predates `oext`, the `variants` array, and a `hasPreset` that does not claim an `original` the
|
|
120
|
-
asset does not have. Install `@nitida/asset-client`.
|
|
121
|
-
`@
|
|
120
|
+
asset does not have. Install `@nitida/asset-client`. `@nitida/asset-uploader-web` and
|
|
121
|
+
`@nitida/asset-uploader-expo` ARE on npm since 2026-08-23 — reach for one only
|
|
122
|
+
when you need an upload to survive a reload or a backgrounded app.
|
|
123
|
+
`@aquienpz/tenant-config` is still internal.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Espacio Futuro LTD
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -128,3 +128,13 @@ shape. `presets` is populated everywhere, on every version — so read existence
|
|
|
128
128
|
|
|
129
129
|
Deeper guidance — including uploads, tenant onboarding and the CORS boundary — lives in
|
|
130
130
|
`@nitida/sdk`'s `skills/nitida-sdk/SKILL.md`, which ships inside that package.
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
MIT — see [LICENSE](./LICENSE).
|
|
135
|
+
|
|
136
|
+
⚠️ **The licence covers this client code, not the service.** MIT lets you use,
|
|
137
|
+
modify and redistribute the SDK; it does not grant access to nitida. The
|
|
138
|
+
service is governed by its own terms and plan tiers, and every call still needs
|
|
139
|
+
credentials issued to your project. Same shape as every other API client you
|
|
140
|
+
already depend on.
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Security
|
|
2
|
+
|
|
3
|
+
## Reporting a vulnerability
|
|
4
|
+
|
|
5
|
+
Email **security@espaciofuturo.io**. Please do not open a public issue — a
|
|
6
|
+
public report is a disclosure, and it reaches attackers at the same moment it
|
|
7
|
+
reaches us.
|
|
8
|
+
|
|
9
|
+
Include what you have: the affected package and version, what you did, and what
|
|
10
|
+
happened. A URL that reproduces it is worth more than a paragraph describing
|
|
11
|
+
one. We will confirm receipt and tell you what we found.
|
|
12
|
+
|
|
13
|
+
## What is in scope
|
|
14
|
+
|
|
15
|
+
The published client packages and the service they talk to:
|
|
16
|
+
|
|
17
|
+
- `@nitida/sdk`, `@nitida/asset-client`
|
|
18
|
+
- `@nitida/asset-compressor-web`, `@nitida/asset-compressor-native`
|
|
19
|
+
- `@nitida/asset-uploader-web`, `@nitida/asset-uploader-expo`
|
|
20
|
+
- the delivery edge (`8ok.uk`) and the API (`api.nitida.gofuture.space`)
|
|
21
|
+
|
|
22
|
+
## Two behaviours that look like bugs and are not
|
|
23
|
+
|
|
24
|
+
Reported often enough to state up front, so a real report is not lost among
|
|
25
|
+
them:
|
|
26
|
+
|
|
27
|
+
**A 404 on a private asset is the feature.** An asset with
|
|
28
|
+
`visibility: "private"` answers 404 on every public URL — the raw path, every
|
|
29
|
+
stored variant, every `/t/` transform and every HLS segment. It is not a
|
|
30
|
+
missing file. Signed access lives at `/a/{tenant}/…?exp&sig`, minted on your
|
|
31
|
+
backend. See the SDK's `getPrivateAssetUrl`.
|
|
32
|
+
|
|
33
|
+
**A presigned upload URL is a bearer credential, on purpose.** The browser
|
|
34
|
+
uploader persists presigned R2 PUT URLs in IndexedDB, because that is what
|
|
35
|
+
resuming after a reload means. They are write-only, scoped to the parts of one
|
|
36
|
+
upload the holder started, expire in 60 minutes, and are deleted on complete
|
|
37
|
+
and on abort.
|
|
38
|
+
|
|
39
|
+
## Credentials, and the one mistake that matters
|
|
40
|
+
|
|
41
|
+
An API key (`amk_rt_*`, `amk_ad_*`, `amk_ci_*`) is a **server-side** credential.
|
|
42
|
+
It must never reach a browser bundle, an `NEXT_PUBLIC_*` variable, or a mobile
|
|
43
|
+
app binary.
|
|
44
|
+
|
|
45
|
+
The same goes for a tenant's **URL signing key**: it mints signed URLs for
|
|
46
|
+
every private asset that tenant owns. Sign on your backend, or pre-sign at
|
|
47
|
+
build time.
|
|
48
|
+
|
|
49
|
+
The client packages are built so this is hard to get wrong — the web entrypoint
|
|
50
|
+
`@nitida/sdk/web` does not accept `apiKey` or `signingKey` at all; the types
|
|
51
|
+
reject them. If you find a path that leaks either one, that is exactly the
|
|
52
|
+
report we want.
|
|
53
|
+
|
|
54
|
+
If you believe a key has been exposed, email the address above and we will
|
|
55
|
+
rotate it. Rotating a signing key invalidates every URL already signed with it,
|
|
56
|
+
so tell us whether you have signed URLs in circulation.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nitida/asset-client",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"description": "nitida URL builders — construct image, video and HLS URLs for the nitida CDN. No network, no key, no config beyond a tenant id.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"provenance": false
|
|
9
9
|
},
|
|
10
10
|
"//repository": "REMOVED 2026-08-21, deliberately. It pointed at espaciofuturoio/aquienpz, which is PRIVATE, so npm rendered a `Repository` link that answers 404 to everyone who clicked it. No repository field renders no link, which is the honest outcome. Nothing depends on it: the publish workflow does NOT pass --provenance (npm rejects provenance from private repos with E422), so this field was rendering a broken link and nothing else. `homepage` and `bugs` below both point at the docs site, which is the real destination. Restore it if the repo is ever made public.",
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": "Espacio Futuro LTD (https://espaciofuturo.io)",
|
|
12
13
|
"type": "module",
|
|
13
14
|
"sideEffects": false,
|
|
14
15
|
"main": "./dist/index.cjs",
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
}
|
|
28
29
|
},
|
|
29
30
|
"files": [
|
|
31
|
+
"SECURITY.md",
|
|
30
32
|
"dist/**",
|
|
31
33
|
"src/**",
|
|
32
34
|
"AGENTS.md"
|