@owlmeans/storage-resource 0.1.18-rc.40 → 0.1.18-rc.41
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
|
@@ -14,7 +14,7 @@ S3-compatible object storage resource for OwlMeans server applications.
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
bun add @owlmeans/storage-resource@^0.1.18-rc.
|
|
17
|
+
bun add @owlmeans/storage-resource@^0.1.18-rc.41
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
## Usage
|
|
@@ -102,7 +102,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
102
102
|
your project's skill store (`.agents/skills/`):
|
|
103
103
|
|
|
104
104
|
```sh
|
|
105
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
105
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.47
|
|
106
106
|
```
|
|
107
107
|
|
|
108
108
|
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/storage-resource",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-10-
|
|
4
|
+
"version": "0.1.18-rc.41",
|
|
5
|
+
"generatedAt": "2026-10-03T20:05:07.585Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
package/build/resource.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../src/resource.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAgB,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../src/resource.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAgB,MAAM,YAAY,CAAA;AAUhF,eAAO,MAAM,qBAAqB,WAAW,MAAM,cAA8B,MAAM,oBAwEtF,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,OACrE,CAAC,UAAS,MAAM,cAA8B,MAAM,KACxD,CAMF,CAAA"}
|
package/build/resource.js
CHANGED
|
@@ -4,6 +4,8 @@ import { FilePropertyError, FileStreamError, FileTypeError, StorageApiError } fr
|
|
|
4
4
|
import { S3Client, PutObjectCommand } from '@aws-sdk/client-s3';
|
|
5
5
|
import { ResilientError } from '@owlmeans/error';
|
|
6
6
|
import { fileTypeFromBuffer } from 'file-type';
|
|
7
|
+
import { logger } from '@owlmeans/log';
|
|
8
|
+
const log = logger('storage-resource');
|
|
7
9
|
export const createStorageResource = (alias = DEFAULT_ALIAS, configKey) => {
|
|
8
10
|
configKey ??= alias;
|
|
9
11
|
const resource = appendContextual(alias, {
|
|
@@ -57,7 +59,7 @@ export const createStorageResource = (alias = DEFAULT_ALIAS, configKey) => {
|
|
|
57
59
|
if (e instanceof ResilientError) {
|
|
58
60
|
throw e;
|
|
59
61
|
}
|
|
60
|
-
|
|
62
|
+
log.error('Storage upload failed', e);
|
|
61
63
|
throw new StorageApiError();
|
|
62
64
|
}
|
|
63
65
|
return record;
|
package/build/resource.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.js","sourceRoot":"","sources":["../src/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAG3C,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;A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@@
|
|
|
27
27
|
"@aws-sdk/client-s3": "^3.701.0",
|
|
28
28
|
"@owlmeans/context": "^0.1.18-rc.32",
|
|
29
29
|
"@owlmeans/error": "^0.1.18-rc.36",
|
|
30
|
-
"@owlmeans/
|
|
31
|
-
"@owlmeans/
|
|
30
|
+
"@owlmeans/log": "^0.1.18-rc.0",
|
|
31
|
+
"@owlmeans/resource": "^0.1.18-rc.38",
|
|
32
|
+
"@owlmeans/server-context": "^0.1.18-rc.41",
|
|
32
33
|
"@owlmeans/storage-common": "^0.1.18-rc.36",
|
|
33
34
|
"file-type": "^22.0.1"
|
|
34
35
|
},
|
package/src/resource.ts
CHANGED
|
@@ -6,6 +6,9 @@ import { FilePropertyError, FileStreamError, FileTypeError, StorageApiError } fr
|
|
|
6
6
|
import { S3Client, PutObjectCommand } from '@aws-sdk/client-s3'
|
|
7
7
|
import { ResilientError } from '@owlmeans/error'
|
|
8
8
|
import { fileTypeFromBuffer } from 'file-type'
|
|
9
|
+
import { logger } from '@owlmeans/log'
|
|
10
|
+
|
|
11
|
+
const log = logger('storage-resource')
|
|
9
12
|
|
|
10
13
|
export const createStorageResource = (alias: string = DEFAULT_ALIAS, configKey?: string) => {
|
|
11
14
|
configKey ??= alias
|
|
@@ -70,7 +73,7 @@ export const createStorageResource = (alias: string = DEFAULT_ALIAS, configKey?:
|
|
|
70
73
|
if (e instanceof ResilientError) {
|
|
71
74
|
throw e
|
|
72
75
|
}
|
|
73
|
-
|
|
76
|
+
log.error('Storage upload failed', e)
|
|
74
77
|
throw new StorageApiError()
|
|
75
78
|
}
|
|
76
79
|
|