@eide/foir-cli 0.41.0 → 0.43.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 +16 -11
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -980,7 +980,8 @@ function createIdentityMethods(client) {
|
|
|
980
980
|
rateLimitPerHour: params.rateLimitPerHour,
|
|
981
981
|
allowedModels: params.allowedModels,
|
|
982
982
|
allowedFileTypes: params.allowedFileTypes,
|
|
983
|
-
scopes: params.scopes
|
|
983
|
+
scopes: params.scopes,
|
|
984
|
+
configId: params.configId
|
|
984
985
|
})
|
|
985
986
|
);
|
|
986
987
|
return { apiKey: resp.apiKey ?? null };
|
|
@@ -1068,7 +1069,8 @@ function createIdentityMethods(client) {
|
|
|
1068
1069
|
config: params.config,
|
|
1069
1070
|
enabled: params.enabled,
|
|
1070
1071
|
isDefault: params.isDefault,
|
|
1071
|
-
priority: params.priority
|
|
1072
|
+
priority: params.priority,
|
|
1073
|
+
configId: params.configId
|
|
1072
1074
|
})
|
|
1073
1075
|
);
|
|
1074
1076
|
return resp.provider ?? null;
|
|
@@ -4049,7 +4051,7 @@ function registerMediaCommands(program2, globalOpts) {
|
|
|
4049
4051
|
}
|
|
4050
4052
|
)
|
|
4051
4053
|
);
|
|
4052
|
-
media.command("list").description("List files").option("--folder <folder>", "Filter by folder").option("--mime-type <type>", "Filter by MIME type").option("--search <query>", "Search files").option("--include-deleted", "Include soft-deleted files").option("--first <n>", "Max results", "50").option("--after <cursor>", "
|
|
4054
|
+
media.command("list").description("List files").option("--folder <folder>", "Filter by folder").option("--mime-type <type>", "Filter by MIME type").option("--search <query>", "Search files").option("--include-deleted", "Include soft-deleted files").option("--first <n>", "Max results", "50").option("--after <cursor>", "Opaque cursor from previous page").action(
|
|
4053
4055
|
withErrorHandler(
|
|
4054
4056
|
globalOpts,
|
|
4055
4057
|
async (flags) => {
|
|
@@ -5185,12 +5187,13 @@ async function reconcileConfig(client, configId, manifest, options = {}) {
|
|
|
5185
5187
|
await reconcileHooks(client, configId, manifest.hooks ?? [], summary);
|
|
5186
5188
|
await reconcileSegments(client, configId, manifest.segments ?? [], summary);
|
|
5187
5189
|
await reconcileCronSchedules(client, configId, manifest.schedules ?? [], summary);
|
|
5188
|
-
await reconcileAuthProviders(client, manifest.authProviders ?? [], summary);
|
|
5190
|
+
await reconcileAuthProviders(client, configId, manifest.authProviders ?? [], summary);
|
|
5189
5191
|
await reconcilePlacements(client, configId, manifest.placements ?? [], summary);
|
|
5190
5192
|
await reconcileProfileSchema(client, manifest, summary);
|
|
5191
5193
|
await reconcileDesignTokens(client, manifest, summary, options.publishDesignTokens ?? false);
|
|
5192
5194
|
await reconcileApiKeys(
|
|
5193
5195
|
client,
|
|
5196
|
+
configId,
|
|
5194
5197
|
manifest.key,
|
|
5195
5198
|
manifest.apiKeys ?? [],
|
|
5196
5199
|
summary,
|
|
@@ -5564,7 +5567,7 @@ async function reconcileCronSchedules(client, configId, schedules, summary) {
|
|
|
5564
5567
|
}
|
|
5565
5568
|
}
|
|
5566
5569
|
}
|
|
5567
|
-
async function reconcileAuthProviders(client, providers, summary) {
|
|
5570
|
+
async function reconcileAuthProviders(client, configId, providers, summary) {
|
|
5568
5571
|
const existing = await client.identity.listAuthProviders({ first: 200 });
|
|
5569
5572
|
const existingByKey = new Map(
|
|
5570
5573
|
existing.items.map((p) => [p.key, p])
|
|
@@ -5591,7 +5594,8 @@ async function reconcileAuthProviders(client, providers, summary) {
|
|
|
5591
5594
|
config: prov.config,
|
|
5592
5595
|
enabled: prov.enabled ?? true,
|
|
5593
5596
|
isDefault: prov.isDefault ?? false,
|
|
5594
|
-
priority: prov.priority ?? 0
|
|
5597
|
+
priority: prov.priority ?? 0,
|
|
5598
|
+
configId
|
|
5595
5599
|
});
|
|
5596
5600
|
summary.authProviders.created++;
|
|
5597
5601
|
}
|
|
@@ -5643,7 +5647,7 @@ async function reconcileDesignTokens(client, manifest, summary, publishAfterAppl
|
|
|
5643
5647
|
summary.designTokensPublished = true;
|
|
5644
5648
|
}
|
|
5645
5649
|
}
|
|
5646
|
-
async function reconcileApiKeys(client, configKey, apiKeys, summary, rotateKeys) {
|
|
5650
|
+
async function reconcileApiKeys(client, configId, configKey, apiKeys, summary, rotateKeys) {
|
|
5647
5651
|
if (apiKeys.length === 0) return;
|
|
5648
5652
|
const existing = await client.identity.listApiKeys({ first: 200 });
|
|
5649
5653
|
const existingByName = new Map(
|
|
@@ -5675,7 +5679,8 @@ async function reconcileApiKeys(client, configKey, apiKeys, summary, rotateKeys)
|
|
|
5675
5679
|
keyType: key.keyType === "secret" ? 2 : 1,
|
|
5676
5680
|
allowedModels: key.allowedModels,
|
|
5677
5681
|
allowedFileTypes: key.allowedFileTypes,
|
|
5678
|
-
scopes: key.scopes
|
|
5682
|
+
scopes: key.scopes,
|
|
5683
|
+
configId
|
|
5679
5684
|
});
|
|
5680
5685
|
rawKey = result?.apiKey?.rawKey;
|
|
5681
5686
|
}
|
|
@@ -6688,7 +6693,7 @@ import {
|
|
|
6688
6693
|
} from "@eide/foir-proto-ts/models/v1/models_pb";
|
|
6689
6694
|
function registerModelsCommands(program2, globalOpts) {
|
|
6690
6695
|
const models = program2.command("models").description("Manage models");
|
|
6691
|
-
models.command("list").description("List all models").option("--category <cat>", "Filter by category").option("--search <term>", "Search by name").option("--first <n>", "Max results", "50").option("--after <cursor>", "Opaque cursor from previous page"
|
|
6696
|
+
models.command("list").description("List all models").option("--category <cat>", "Filter by category").option("--search <term>", "Search by name").option("--first <n>", "Max results", "50").option("--after <cursor>", "Opaque cursor from previous page").action(
|
|
6692
6697
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
6693
6698
|
const opts = globalOpts();
|
|
6694
6699
|
const client = await createPlatformClient(opts);
|
|
@@ -7089,7 +7094,7 @@ function registerCustomersCommands(program2, globalOpts) {
|
|
|
7089
7094
|
customers.command("list").description("List customers").option(
|
|
7090
7095
|
"--status <status>",
|
|
7091
7096
|
"Filter by status (ACTIVE, PENDING, SUSPENDED)"
|
|
7092
|
-
).option("--search <term>", "Search by email").option("--first <n>", "Max results", "20").option("--after <cursor>", "Opaque cursor from previous page"
|
|
7097
|
+
).option("--search <term>", "Search by email").option("--first <n>", "Max results", "20").option("--after <cursor>", "Opaque cursor from previous page").action(
|
|
7093
7098
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
7094
7099
|
const opts = globalOpts();
|
|
7095
7100
|
const client = await createPlatformClient(opts);
|
|
@@ -9111,7 +9116,7 @@ import {
|
|
|
9111
9116
|
} from "@eide/foir-proto-ts/storage/v1/storage_pb";
|
|
9112
9117
|
function registerFilesCommands(program2, globalOpts) {
|
|
9113
9118
|
const files = program2.command("files").description("Manage files (for upload, use `foir media upload`)");
|
|
9114
|
-
files.command("list").description("List files").option("--folder <folder>", "Filter by folder").option("--mime-type <type>", "Filter by MIME type").option("--search <term>", "Search by filename").option("--first <n>", "Max results", "50").option("--after <cursor>", "Opaque cursor from previous page"
|
|
9119
|
+
files.command("list").description("List files").option("--folder <folder>", "Filter by folder").option("--mime-type <type>", "Filter by MIME type").option("--search <term>", "Search by filename").option("--first <n>", "Max results", "50").option("--after <cursor>", "Opaque cursor from previous page").action(
|
|
9115
9120
|
withErrorHandler(globalOpts, async (cmdOpts) => {
|
|
9116
9121
|
const opts = globalOpts();
|
|
9117
9122
|
const client = await createPlatformClient(opts);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eide/foir-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.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.99.0",
|
|
54
54
|
"chalk": "^5.3.0",
|
|
55
55
|
"commander": "^12.1.0",
|
|
56
56
|
"dotenv": "^16.4.5",
|