@owlmeans/image-resource 0.1.18-rc.3 → 0.1.18-rc.30
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
CHANGED
|
@@ -11,7 +11,7 @@ Image-specific type extensions for OwlMeans object storage — AJV schemas for i
|
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
bun add @owlmeans/image-resource
|
|
14
|
+
bun add @owlmeans/image-resource@^0.1.18-rc.30
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
@@ -51,7 +51,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
51
51
|
your project's skill store (`.agents/skills/`):
|
|
52
52
|
|
|
53
53
|
```sh
|
|
54
|
-
npx @owlmeans/agent-skills
|
|
54
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.32
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/image-resource",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-
|
|
4
|
+
"version": "0.1.18-rc.30",
|
|
5
|
+
"generatedAt": "2026-09-22T12:36:21.833Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: image-resource
|
|
3
|
-
description: How to use @owlmeans/image-resource — image-
|
|
3
|
+
description: How to use @owlmeans/image-resource — the image-shaped names and AJV schemas over the shared stored-file types from @owlmeans/storage-common. Auto-invoked when typing image records or validating an image upload.
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
6
6
|
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
@@ -8,24 +8,46 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/image-resource
|
|
9
9
|
|
|
10
10
|
**Layer:** Infra
|
|
11
|
-
**Install:** `"@owlmeans/image-resource": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/image-resource": "^0.1.18-rc.30"` in `dependencies` (peer `ajv`)
|
|
12
|
+
|
|
13
|
+
Types and schemas only — no resource is registered here. An image *is* a stored file
|
|
14
|
+
([[storage-common]]); this package gives that file image-shaped names so a signature says what it
|
|
15
|
+
carries, and re-emits the schemas so an image endpoint validates against its own.
|
|
12
16
|
|
|
13
17
|
## Key Exports
|
|
14
18
|
|
|
15
19
|
| Export | Description |
|
|
16
20
|
|--------|-------------|
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
21
|
+
| `ImageMeta`, `StoredImage`, `ImageData` | The image spellings of `StoredFileMeta`, `StoredFile` and `StoredFileWithData` |
|
|
22
|
+
| `ImageMetaSchema`, `StoredImageSchema`, `ImageDataSchema` | The matching AJV schemas |
|
|
19
23
|
|
|
20
24
|
## Usage
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
Type the record that *describes* the image, and keep it in a database resource — that is what
|
|
27
|
+
answers criteria, sorting and paging. The bytes go to a bucket through
|
|
28
|
+
[[storage-resource]]'s upload-only `create`.
|
|
23
29
|
|
|
24
30
|
```typescript
|
|
25
|
-
import type {
|
|
26
|
-
|
|
31
|
+
import type { StoredImage } from '@owlmeans/image-resource'
|
|
32
|
+
|
|
33
|
+
const images = ctx.resource<Resource<StoredImage>>('images')
|
|
34
|
+
await images.list({ entityId, mimeType: { $startsWith: 'image/' } }, { sort: ['name'], size: 20 })
|
|
27
35
|
```
|
|
28
36
|
|
|
37
|
+
`instances` carries the renditions — original, thumbnail, converted format — each with its own
|
|
38
|
+
`url` and `size`. Pick the one a screen needs from that map; never rebuild a url by string surgery.
|
|
39
|
+
|
|
29
40
|
## Depends On
|
|
30
41
|
|
|
31
|
-
- `@owlmeans/storage-resource
|
|
42
|
+
- `@owlmeans/storage-resource` — the only declared dependency
|
|
43
|
+
- peer `ajv`
|
|
44
|
+
|
|
45
|
+
The schemas here are built from `StoredFileMetaSchema`, `StoredFileSchema` and
|
|
46
|
+
`StoredFileWithDataSchema`, which are **runtime values** from `@owlmeans/storage-common`, and the
|
|
47
|
+
package does not declare it. Install `@owlmeans/storage-common` explicitly rather than relying on it
|
|
48
|
+
arriving under `@owlmeans/storage-resource`.
|
|
49
|
+
|
|
50
|
+
## Related
|
|
51
|
+
|
|
52
|
+
- [[storage-common]] — the stored-file types and schemas these specialize
|
|
53
|
+
- [[storage-resource]] — the bucket upload · [[resource]] — the record store behind it
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/image-resource",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
4
|
+
"version": "0.1.18-rc.30",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "tsc -b",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"ajv": "*"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@owlmeans/storage-resource": "^0.1.18-rc.
|
|
27
|
+
"@owlmeans/storage-resource": "^0.1.18-rc.31"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@owlmeans/dep-config": "workspace:*",
|