@nitida/asset-compressor-native 0.2.0 → 0.2.2

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/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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Fast, native (iOS + Android) image compression for React Native apps that
4
4
  upload to the [aquienpz](https://aquienpz.com) asset platform. Pairs with
5
- `@aquienpz/asset-uploader-expo` and mirrors the API of
5
+ `@nitida/asset-uploader-expo` and mirrors the API of
6
6
  `@nitida/asset-compressor-web` so call sites are identical across
7
7
  platforms.
8
8
 
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,7 +1,7 @@
1
1
  {
2
2
  "name": "@nitida/asset-compressor-native",
3
- "version": "0.2.0",
4
- "description": "Native (iOS/Android) image compression for the @aquienpz upload pipeline. JS API mirrors @nitida/asset-compressor-web so call sites are identical across web and React Native.",
3
+ "version": "0.2.2",
4
+ "description": "nitida image compression for React Native and Expo. Same JS API as @nitida/asset-compressor-web, so call sites are identical across web and native.",
5
5
  "private": false,
6
6
  "publishConfig": {
7
7
  "access": "public",
@@ -9,11 +9,12 @@
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/espaciofuturoio/aquienpz.git",
12
+ "url": "git+https://github.com/espaciofuturoio/aquienpz.git",
13
13
  "directory": "packages/asset-compressor-native"
14
14
  },
15
- "homepage": "https://github.com/espaciofuturoio/aquienpz/tree/main/packages/asset-compressor-native",
16
- "license": "UNLICENSED",
15
+ "homepage": "https://nitida.gofuture.space",
16
+ "license": "MIT",
17
+ "author": "Espacio Futuro LTD (https://espaciofuturo.io)",
17
18
  "type": "module",
18
19
  "sideEffects": false,
19
20
  "main": "./dist/index.js",
@@ -27,6 +28,7 @@
27
28
  }
28
29
  },
29
30
  "files": [
31
+ "SECURITY.md",
30
32
  "dist/**",
31
33
  "src/**"
32
34
  ],
@@ -45,5 +47,15 @@
45
47
  "react-native-compressor": "^1.18.2",
46
48
  "tsup": "^8.5.1",
47
49
  "typescript": "^6.0.3"
48
- }
50
+ },
51
+ "keywords": [
52
+ "image",
53
+ "compression",
54
+ "react-native",
55
+ "expo",
56
+ "ios",
57
+ "android",
58
+ "resize",
59
+ "nitida"
60
+ ]
49
61
  }
package/src/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @nitida/asset-compressor-native — React Native image compression for
3
- * the @aquienpz upload pipeline. Pairs with @aquienpz/asset-uploader-expo.
3
+ * the @aquienpz upload pipeline. Pairs with @nitida/asset-uploader-expo.
4
4
  *
5
5
  * Public API mirrors @nitida/asset-compressor-web so consumers can
6
6
  * write platform-agnostic code: