@eide/foir-cli 0.25.1 → 0.26.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/dist/cli.js +20 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -1282,6 +1282,8 @@ import {
|
|
|
1282
1282
|
SharingConfigSchema as ProtoSharingConfigSchema,
|
|
1283
1283
|
ModelConfigSchema as ProtoModelConfigSchema,
|
|
1284
1284
|
LookupDefinitionSchema as ProtoLookupDefinitionSchema,
|
|
1285
|
+
CacheControlConfigSchema as ProtoCacheControlConfigSchema,
|
|
1286
|
+
CacheControlScope as ProtoCacheControlScope,
|
|
1285
1287
|
CreateModelRequestSchema,
|
|
1286
1288
|
GetModelRequestSchema,
|
|
1287
1289
|
GetModelByKeyRequestSchema,
|
|
@@ -1335,9 +1337,26 @@ function jsConfigToProto(c) {
|
|
|
1335
1337
|
keyBy: l.keyBy ?? [],
|
|
1336
1338
|
name: l.name
|
|
1337
1339
|
})
|
|
1338
|
-
) : []
|
|
1340
|
+
) : [],
|
|
1341
|
+
cacheControl: c.cacheControl ? create3(ProtoCacheControlConfigSchema, {
|
|
1342
|
+
maxAge: c.cacheControl.maxAge ?? 0,
|
|
1343
|
+
scope: cacheControlScopeFromJs(c.cacheControl.scope)
|
|
1344
|
+
}) : void 0
|
|
1339
1345
|
});
|
|
1340
1346
|
}
|
|
1347
|
+
function cacheControlScopeFromJs(scope) {
|
|
1348
|
+
if (typeof scope === "number") return scope;
|
|
1349
|
+
switch (scope) {
|
|
1350
|
+
case "PUBLIC":
|
|
1351
|
+
return ProtoCacheControlScope.PUBLIC;
|
|
1352
|
+
case "PRIVATE":
|
|
1353
|
+
return ProtoCacheControlScope.PRIVATE;
|
|
1354
|
+
case "NO_CACHE":
|
|
1355
|
+
return ProtoCacheControlScope.NO_CACHE;
|
|
1356
|
+
default:
|
|
1357
|
+
return ProtoCacheControlScope.UNSPECIFIED;
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1341
1360
|
function createModelsMethods(client) {
|
|
1342
1361
|
return {
|
|
1343
1362
|
// ── Queries ──────────────────────────────────────────────
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eide/foir-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "Universal platform CLI for Foir platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@bufbuild/protovalidate": "^1.1.1",
|
|
51
51
|
"@connectrpc/connect": "^2.0.0",
|
|
52
52
|
"@connectrpc/connect-node": "^2.0.0",
|
|
53
|
-
"@eide/foir-proto-ts": "^0.
|
|
53
|
+
"@eide/foir-proto-ts": "^0.70.0",
|
|
54
54
|
"chalk": "^5.3.0",
|
|
55
55
|
"commander": "^12.1.0",
|
|
56
56
|
"dotenv": "^16.4.5",
|