@tinycloud/operations 0.7.7-beta.8 → 0.7.7
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/coverage.json +15 -0
- package/dist/artifacts.cjs +7 -4
- package/dist/artifacts.cjs.map +1 -1
- package/dist/artifacts.js +7 -4
- package/dist/artifacts.js.map +1 -1
- package/dist/cli-runtime.cjs +19 -15
- package/dist/cli-runtime.cjs.map +1 -1
- package/dist/cli-runtime.js +8 -4
- package/dist/cli-runtime.js.map +1 -1
- package/dist/delegation-binding.cjs +8 -4
- package/dist/delegation-binding.cjs.map +1 -1
- package/dist/delegation-binding.js +8 -4
- package/dist/delegation-binding.js.map +1 -1
- package/dist/index.cjs +19 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/coverage.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"source": "packages/cli/src/command-registry.ts",
|
|
4
4
|
"commands": [
|
|
5
5
|
{ "command": "init", "status": "legacy" },
|
|
6
|
+
{ "command": "onboard", "status": "excluded", "reason": "Local composition of the existing OpenKey scoped login and grant flows (key-only profile, then one approval per space); adds no storage operation." },
|
|
6
7
|
{ "command": "context", "status": "excluded", "reason": "Read-only local CLI context diagnostics; performs no storage operation." },
|
|
7
8
|
{ "command": "enable", "status": "legacy" },
|
|
8
9
|
{ "command": "enable share", "status": "legacy" },
|
|
@@ -107,6 +108,7 @@
|
|
|
107
108
|
"operationId": "tinycloud.secrets.get",
|
|
108
109
|
"operationVersion": 1
|
|
109
110
|
},
|
|
111
|
+
{ "command": "secrets run [names]", "status": "legacy" },
|
|
110
112
|
{ "command": "secrets put <name> [value]", "status": "legacy" },
|
|
111
113
|
{ "command": "secrets delete <name>", "status": "legacy" },
|
|
112
114
|
{ "command": "secrets network grant <recipientDid> [name]", "status": "legacy" },
|
|
@@ -130,6 +132,19 @@
|
|
|
130
132
|
{ "command": "sql execute <sql>", "status": "legacy" },
|
|
131
133
|
{ "command": "sql export", "status": "legacy" },
|
|
132
134
|
{ "command": "sql copy", "status": "legacy" },
|
|
135
|
+
{ "command": "feed", "status": "legacy" },
|
|
136
|
+
{ "command": "feed export", "status": "legacy" },
|
|
137
|
+
{ "command": "feed import", "status": "legacy" },
|
|
138
|
+
{ "command": "feed connect", "status": "legacy" },
|
|
139
|
+
{ "command": "feed publish", "status": "legacy" },
|
|
140
|
+
{ "command": "feed respond", "status": "legacy" },
|
|
141
|
+
{ "command": "feed message", "status": "legacy" },
|
|
142
|
+
{ "command": "feed handling", "status": "legacy" },
|
|
143
|
+
{ "command": "feed list", "status": "legacy" },
|
|
144
|
+
{ "command": "feed show <reference>", "status": "legacy" },
|
|
145
|
+
{ "command": "feed responses", "status": "legacy" },
|
|
146
|
+
{ "command": "feed payload", "status": "legacy" },
|
|
147
|
+
{ "command": "feed watch", "status": "legacy" },
|
|
133
148
|
{ "command": "duckdb", "status": "legacy" },
|
|
134
149
|
{ "command": "duckdb query <sql>", "status": "legacy" },
|
|
135
150
|
{ "command": "duckdb execute <sql>", "status": "legacy" },
|
package/dist/artifacts.cjs
CHANGED
|
@@ -173,6 +173,7 @@ var import_zod = require("zod");
|
|
|
173
173
|
// ../sdk-core/src/manifest.ts
|
|
174
174
|
var import_ms = __toESM(require_ms(), 1);
|
|
175
175
|
var import_sdk_services = require("@tinycloud/sdk-services");
|
|
176
|
+
var import_resource = require("@tinycloud/sdk-services/encryption/resource");
|
|
176
177
|
var DEFAULT_MANIFEST_SPACE = "applications";
|
|
177
178
|
var SERVICE_SHORT_TO_LONG = Object.freeze({
|
|
178
179
|
kv: "tinycloud.kv",
|
|
@@ -202,6 +203,7 @@ var KEY_APP_ID = new RegExp(`^${KEY_SEGMENT}$`);
|
|
|
202
203
|
var KEY_PATH = new RegExp(`^${KEY_SEGMENT}(?:/${KEY_SEGMENT}){2,7}$`);
|
|
203
204
|
|
|
204
205
|
// ../sdk-core/src/capabilities.ts
|
|
206
|
+
var import_resource2 = require("@tinycloud/sdk-services/encryption/resource");
|
|
205
207
|
function normalizeSpace(space) {
|
|
206
208
|
if (!space.startsWith("tinycloud:")) {
|
|
207
209
|
return space;
|
|
@@ -225,10 +227,9 @@ function isCapabilitySubset(requested, granted) {
|
|
|
225
227
|
const grantedActions = matchingScope.flatMap(
|
|
226
228
|
(entry) => expandActionShortNames(entry.service, entry.actions)
|
|
227
229
|
);
|
|
230
|
+
const namedKeyRequest = req.service === "tinycloud.encryption" && req.path.startsWith("urn:tinycloud:encryption:") && req.path.includes("/");
|
|
228
231
|
const covered = requestedActions.every(
|
|
229
|
-
(requestedAction) => grantedActions.some(
|
|
230
|
-
(grantedAction) => actionContains(grantedAction, requestedAction)
|
|
231
|
-
)
|
|
232
|
+
(requestedAction) => grantedActions.some((grantedAction) => namedKeyRequest ? grantedAction === requestedAction : actionContains(grantedAction, requestedAction))
|
|
232
233
|
);
|
|
233
234
|
if (!covered) {
|
|
234
235
|
missing.push(cloneEntry(req));
|
|
@@ -243,7 +244,9 @@ function canonicalizeEntryScopeMatches(requested, granted) {
|
|
|
243
244
|
if (normalizeSpace(requested.space ?? DEFAULT_MANIFEST_SPACE) !== normalizeSpace(granted.space ?? DEFAULT_MANIFEST_SPACE)) {
|
|
244
245
|
return false;
|
|
245
246
|
}
|
|
246
|
-
|
|
247
|
+
const namedKeyRequest = requested.service === "tinycloud.encryption" && requested.path.startsWith("urn:tinycloud:encryption:") && requested.path.includes("/");
|
|
248
|
+
const coveredPath = namedKeyRequest ? (0, import_resource2.encryptionResourceContains)(granted.path, requested.path) : pathContains(granted.path, requested.path);
|
|
249
|
+
if (!coveredPath) {
|
|
247
250
|
return false;
|
|
248
251
|
}
|
|
249
252
|
if (!recapCaveatsEqual(requested.caveats, granted.caveats)) {
|