mikser-io-drive 0.13.0 → 0.14.0
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/index.js +20 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from 'node:path'
|
|
2
2
|
|
|
3
|
-
import { registerRoute, resolveAuth, reachabilityOf, registerJunk } from 'mikser-io'
|
|
3
|
+
import { registerRoute, resolveAuth, reachabilityOf, registerJunk, registerCapability } from 'mikser-io'
|
|
4
4
|
import { MikserAuthenticator } from './lib/authenticator.js'
|
|
5
5
|
import { registerFileTools } from './lib/files.js'
|
|
6
6
|
import { withStagedWrites, stageWrites } from './lib/staged-writes.js'
|
|
@@ -127,6 +127,25 @@ export function drive(options = {}) {
|
|
|
127
127
|
const root = resolve(ep.folder)
|
|
128
128
|
const mountPath = `${base}/${name}`
|
|
129
129
|
|
|
130
|
+
// Say what these capabilities protect, so a session can be
|
|
131
|
+
// told what it may reach in terms of the SITE rather than in
|
|
132
|
+
// terms of verbs. This is the only place that knows the folder
|
|
133
|
+
// behind an endpoint, and `summary` is the operator's own
|
|
134
|
+
// description of what lives there — both are what an agent
|
|
135
|
+
// needs to reason about where it is working.
|
|
136
|
+
registerCapability(readCapability(name), {
|
|
137
|
+
plugin: 'drive',
|
|
138
|
+
grants: 'read',
|
|
139
|
+
resource: { kind: 'collection', name, folder: ep.folder, summary: ep.summary },
|
|
140
|
+
})
|
|
141
|
+
if (!(ep.readOnly === true)) {
|
|
142
|
+
registerCapability(writeCapability(name), {
|
|
143
|
+
plugin: 'drive',
|
|
144
|
+
grants: 'write',
|
|
145
|
+
resource: { kind: 'collection', name, folder: ep.folder, summary: ep.summary },
|
|
146
|
+
})
|
|
147
|
+
}
|
|
148
|
+
|
|
130
149
|
// Same seam and the same one difference as api/mcp/forms: a
|
|
131
150
|
// plain token keeps the trusted-local-host model, a real
|
|
132
151
|
// verifier does not.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mikser-io-drive",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "WebDAV for mikser-io. Exposes working-folder directories as WebDAV endpoints via Nephele, authenticated through mikser-io-auth's htpasswd identity — so content can be edited from Finder, Explorer or any DAV client and the build picks the change up.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/almero-digital-marketing/mikser-io-drive#readme",
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"mikser-io": "^9.
|
|
28
|
+
"mikser-io": "^9.52.0",
|
|
29
29
|
"zod": "^4.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|