@owlmeans/resource 0.1.18-rc.37 → 0.1.18-rc.38

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
@@ -12,7 +12,7 @@ wants is the `resource-choice` decision.
12
12
  ## Installation
13
13
 
14
14
  ```bash
15
- bun add @owlmeans/resource@^0.1.18-rc.37
15
+ bun add @owlmeans/resource@^0.1.18-rc.38
16
16
  ```
17
17
 
18
18
  ## Concepts
@@ -403,7 +403,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
403
403
  your project's skill store (`.agents/skills/`):
404
404
 
405
405
  ```sh
406
- npx @owlmeans/agent-skills@^0.1.18-rc.42
406
+ npx @owlmeans/agent-skills@^0.1.18-rc.47
407
407
  ```
408
408
 
409
409
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/resource",
4
- "version": "0.1.18-rc.37",
5
- "generatedAt": "2026-09-29T08:01:58.119Z",
4
+ "version": "0.1.18-rc.38",
5
+ "generatedAt": "2026-10-03T20:05:07.588Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -8,7 +8,7 @@ user-invocable: false
8
8
  # @owlmeans/resource
9
9
 
10
10
  **Layer:** Core
11
- **Install:** `"@owlmeans/resource": "^0.1.18-rc.37"` in `dependencies`
11
+ **Install:** `"@owlmeans/resource": "^0.1.18-rc.38"` in `dependencies`
12
12
 
13
13
  ## Key Exports
14
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/resource",
3
- "version": "0.1.18-rc.37",
3
+ "version": "0.1.18-rc.38",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=errors.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.spec.d.ts","sourceRoot":"","sources":["errors.spec.ts"],"names":[],"mappings":""}
@@ -1,51 +0,0 @@
1
- import { describe, expect, test } from 'bun:test';
2
- import { ResilientError } from '@owlmeans/error';
3
- import * as errors from '../src/errors.js';
4
- /**
5
- * The status an HTTP boundary (`@owlmeans/server-api` `errorStatus`) reads off a class: a static
6
- * `httpStatus` inherited through the constructor chain. A refusal of the caller's request declares
7
- * a 4xx; a fault declares nothing and answers 500.
8
- */
9
- const statusOf = (error) => error.constructor.httpStatus;
10
- const DECLARED = {
11
- ResourceError: undefined,
12
- UnknownRecordError: 404,
13
- RecordExists: 409,
14
- MisshapedRecord: undefined,
15
- RecordUpdateFailed: undefined,
16
- UnsupportedArgumentError: undefined,
17
- UnsupportedMethodError: undefined,
18
- MigrationError: undefined,
19
- MigrationConflict: undefined,
20
- };
21
- const classes = Object.entries(errors).filter(([, value]) => typeof value === 'function' && value.prototype instanceof ResilientError);
22
- describe('resource errors — declared HTTP statuses', () => {
23
- test('every class of the family has decided its status', () => {
24
- expect(classes.map(([name]) => name).sort()).toEqual(Object.keys(DECLARED).sort());
25
- });
26
- test('an absent record is 404, a taken id or key 409; faults declare nothing', () => {
27
- for (const [name, Class] of classes) {
28
- expect([name, statusOf(new Class('x'))]).toEqual([name, DECLARED[name]]);
29
- }
30
- });
31
- test('an error rebuilt from its marshalled form keeps its class and its status', () => {
32
- for (const [name, Class] of classes) {
33
- const back = ResilientError.ensure(new Class('x').marshal());
34
- expect([name, back.constructor === Class, statusOf(back)]).toEqual([name, true, DECLARED[name]]);
35
- }
36
- });
37
- });
38
- describe('UnknownRecordError.id', () => {
39
- test('is everything after the first separator, however many the id carries', () => {
40
- expect(new errors.UnknownRecordError('abc').id).toBe('abc');
41
- expect(new errors.UnknownRecordError('shelf/3/hammer').id).toBe('shelf/3/hammer');
42
- expect(new errors.UnknownRecordError('{"url":"https://example.org/a"}').id)
43
- .toBe('{"url":"https://example.org/a"}');
44
- });
45
- test('survives a marshal round trip', () => {
46
- const back = ResilientError.ensure(new errors.UnknownRecordError('shelf/3').marshal());
47
- expect(back).toBeInstanceOf(errors.UnknownRecordError);
48
- expect(back.id).toBe('shelf/3');
49
- });
50
- });
51
- //# sourceMappingURL=errors.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.spec.js","sourceRoot":"","sources":["errors.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAA;AAE1C;;;;GAIG;AACH,MAAM,QAAQ,GAAG,CAAC,KAAY,EAAW,EAAE,CAAE,KAAK,CAAC,WAAwC,CAAC,UAAU,CAAA;AAEtG,MAAM,QAAQ,GAAuC;IACnD,aAAa,EAAE,SAAS;IACxB,kBAAkB,EAAE,GAAG;IACvB,YAAY,EAAE,GAAG;IACjB,eAAe,EAAE,SAAS;IAC1B,kBAAkB,EAAE,SAAS;IAC7B,wBAAwB,EAAE,SAAS;IACnC,sBAAsB,EAAE,SAAS;IACjC,cAAc,EAAE,SAAS;IACzB,iBAAiB,EAAE,SAAS;CAC7B,CAAA;AAED,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAC1D,OAAO,KAAK,KAAK,UAAU,IAAI,KAAK,CAAC,SAAS,YAAY,cAAc,CAClB,CAAA;AAExD,QAAQ,CAAC,0CAA0C,EAAE,GAAG,EAAE;IACxD,IAAI,CAAC,kDAAkD,EAAE,GAAG,EAAE;QAC5D,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CA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