@things-factory/attachment-base 10.1.112 → 10.1.113

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/attachment-base",
3
- "version": "10.1.112",
3
+ "version": "10.1.113",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -29,12 +29,12 @@
29
29
  "@aws-sdk/s3-presigned-post": "^3.46.0",
30
30
  "@azure/storage-blob": "^12.18.0",
31
31
  "@koa/multer": "^3.0.0",
32
- "@things-factory/auth-base": "^10.1.111",
32
+ "@things-factory/auth-base": "^10.1.113",
33
33
  "@things-factory/env": "^10.1.20",
34
34
  "@things-factory/shell": "^10.1.106",
35
35
  "mime": "^3.0.0",
36
36
  "multer": "^1.4.5-lts.1",
37
37
  "sharp": "^0.33.0"
38
38
  },
39
- "gitHead": "e300d1b60b98ccb80380afe8df6d2807b1bcff91"
39
+ "gitHead": "9da1e467ddce23e600e64f08454289cb3b806212"
40
40
  }
@@ -91,3 +91,14 @@ describe('the share link (decision 3)', () => {
91
91
  expect(rule.shareExpiry(NOW, 168, 9999).toISOString()).toBe('2026-10-09T09:00:00.000Z')
92
92
  })
93
93
  })
94
+
95
+ describe('a refType its module guards (figure-thumbnail, Figure 711dd85af0)', () => {
96
+ afterEach(() => access.registerAttachmentReader('figure-thumbnail', null))
97
+
98
+ it('★ closed until the module registers its reader - then the reader decides', async () => {
99
+ expect(access.ORDINARY_REF_TYPES.has('figure-thumbnail')).toBe(false)
100
+ expect(await access.mayRead(row({ refType: 'figure-thumbnail' }), context())).toBe(false)
101
+ access.registerAttachmentReader('figure-thumbnail', () => true)
102
+ expect(await access.mayRead(row({ refType: 'figure-thumbnail' }), context())).toBe(true)
103
+ })
104
+ })