@tinycloud/operations 0.7.7-beta.2 → 0.7.7-beta.20
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 +13 -0
- package/dist/artifacts.cjs +10 -4
- package/dist/artifacts.cjs.map +1 -1
- package/dist/artifacts.js +11 -5
- package/dist/artifacts.js.map +1 -1
- package/dist/cli-runtime.cjs +30 -20
- package/dist/cli-runtime.cjs.map +1 -1
- package/dist/cli-runtime.js +21 -11
- package/dist/cli-runtime.js.map +1 -1
- package/dist/delegation-binding.cjs +11 -4
- package/dist/delegation-binding.cjs.map +1 -1
- package/dist/delegation-binding.js +12 -5
- package/dist/delegation-binding.js.map +1 -1
- package/dist/index.cjs +30 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -11
- package/dist/index.js.map +1 -1
- package/generated/operations.json +8 -2
- 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,17 @@
|
|
|
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 connect", "status": "legacy" },
|
|
137
|
+
{ "command": "feed publish", "status": "legacy" },
|
|
138
|
+
{ "command": "feed respond", "status": "legacy" },
|
|
139
|
+
{ "command": "feed message", "status": "legacy" },
|
|
140
|
+
{ "command": "feed handling", "status": "legacy" },
|
|
141
|
+
{ "command": "feed list", "status": "legacy" },
|
|
142
|
+
{ "command": "feed show <reference>", "status": "legacy" },
|
|
143
|
+
{ "command": "feed responses", "status": "legacy" },
|
|
144
|
+
{ "command": "feed payload", "status": "legacy" },
|
|
145
|
+
{ "command": "feed watch", "status": "legacy" },
|
|
133
146
|
{ "command": "duckdb", "status": "legacy" },
|
|
134
147
|
{ "command": "duckdb query <sql>", "status": "legacy" },
|
|
135
148
|
{ "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",
|
|
@@ -197,8 +198,12 @@ function expandActionShortNames(service, actions) {
|
|
|
197
198
|
return `${service}/${a}`;
|
|
198
199
|
});
|
|
199
200
|
}
|
|
201
|
+
var KEY_SEGMENT = "[a-z0-9][a-z0-9._-]{0,63}";
|
|
202
|
+
var KEY_APP_ID = new RegExp(`^${KEY_SEGMENT}$`);
|
|
203
|
+
var KEY_PATH = new RegExp(`^${KEY_SEGMENT}(?:/${KEY_SEGMENT}){2,7}$`);
|
|
200
204
|
|
|
201
205
|
// ../sdk-core/src/capabilities.ts
|
|
206
|
+
var import_resource2 = require("@tinycloud/sdk-services/encryption/resource");
|
|
202
207
|
function normalizeSpace(space) {
|
|
203
208
|
if (!space.startsWith("tinycloud:")) {
|
|
204
209
|
return space;
|
|
@@ -222,10 +227,9 @@ function isCapabilitySubset(requested, granted) {
|
|
|
222
227
|
const grantedActions = matchingScope.flatMap(
|
|
223
228
|
(entry) => expandActionShortNames(entry.service, entry.actions)
|
|
224
229
|
);
|
|
230
|
+
const namedKeyRequest = req.service === "tinycloud.encryption" && req.path.startsWith("urn:tinycloud:encryption:") && req.path.includes("/");
|
|
225
231
|
const covered = requestedActions.every(
|
|
226
|
-
(requestedAction) => grantedActions.some(
|
|
227
|
-
(grantedAction) => actionContains(grantedAction, requestedAction)
|
|
228
|
-
)
|
|
232
|
+
(requestedAction) => grantedActions.some((grantedAction) => namedKeyRequest ? grantedAction === requestedAction : actionContains(grantedAction, requestedAction))
|
|
229
233
|
);
|
|
230
234
|
if (!covered) {
|
|
231
235
|
missing.push(cloneEntry(req));
|
|
@@ -240,7 +244,9 @@ function canonicalizeEntryScopeMatches(requested, granted) {
|
|
|
240
244
|
if (normalizeSpace(requested.space ?? DEFAULT_MANIFEST_SPACE) !== normalizeSpace(granted.space ?? DEFAULT_MANIFEST_SPACE)) {
|
|
241
245
|
return false;
|
|
242
246
|
}
|
|
243
|
-
|
|
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) {
|
|
244
250
|
return false;
|
|
245
251
|
}
|
|
246
252
|
if (!recapCaveatsEqual(requested.caveats, granted.caveats)) {
|