@eide/foir-cli 0.10.0 → 0.10.1
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 +206 -634
- package/dist/lib/config-helpers.d.ts +1 -63
- package/dist/lib/config-helpers.js +0 -10
- package/package.json +2 -2
|
@@ -211,58 +211,6 @@ interface ApplyConfigApiKeyInput {
|
|
|
211
211
|
/** Restrict file uploads to specific MIME types (e.g. ["image/*", "video/*"]). */
|
|
212
212
|
allowedFileTypes?: string[];
|
|
213
213
|
}
|
|
214
|
-
type CredentialStrategy = 'oauth' | 'api_key' | 'shared_secret' | 'ssh_key' | 'none' | 'managed';
|
|
215
|
-
interface IntegrationMiddlewareInput {
|
|
216
|
-
/** Full https URL of the middleware handling this integration. */
|
|
217
|
-
url: string;
|
|
218
|
-
}
|
|
219
|
-
interface IntegrationCredentialsInput {
|
|
220
|
-
strategy: CredentialStrategy;
|
|
221
|
-
}
|
|
222
|
-
interface ModelSeedFieldInput {
|
|
223
|
-
type: string;
|
|
224
|
-
required?: boolean;
|
|
225
|
-
naturalKey?: boolean;
|
|
226
|
-
label?: string;
|
|
227
|
-
helpText?: string;
|
|
228
|
-
config?: Record<string, unknown>;
|
|
229
|
-
}
|
|
230
|
-
interface ModelSeedInput {
|
|
231
|
-
fields: Record<string, ModelSeedFieldInput>;
|
|
232
|
-
}
|
|
233
|
-
interface IntegrationSyncMappingInput {
|
|
234
|
-
/** foir model key this source type writes into. */
|
|
235
|
-
model: string;
|
|
236
|
-
/** foir field holding the upstream natural key. UPSERTs are keyed on this. */
|
|
237
|
-
naturalKey: string;
|
|
238
|
-
/** Explicit source field -> foir field mapping. */
|
|
239
|
-
fields: Record<string, string>;
|
|
240
|
-
/** Optional one-time bootstrap schema if the target model is missing. */
|
|
241
|
-
modelSeed?: ModelSeedInput;
|
|
242
|
-
}
|
|
243
|
-
interface IntegrationInput {
|
|
244
|
-
enabled?: boolean;
|
|
245
|
-
middleware: IntegrationMiddlewareInput;
|
|
246
|
-
credentials: IntegrationCredentialsInput;
|
|
247
|
-
/** Source type -> sync mapping. Optional when field mapping is managed via the admin UI. */
|
|
248
|
-
sync?: Record<string, IntegrationSyncMappingInput>;
|
|
249
|
-
/** Opaque middleware-specific settings — not validated by the CLI. */
|
|
250
|
-
settings?: Record<string, unknown>;
|
|
251
|
-
metadata?: Record<string, unknown>;
|
|
252
|
-
}
|
|
253
|
-
type ExtensionTarget = 'record' | 'model-list';
|
|
254
|
-
interface ExtensionPlacementInput {
|
|
255
|
-
target: ExtensionTarget;
|
|
256
|
-
model: string;
|
|
257
|
-
tab: string;
|
|
258
|
-
title: string;
|
|
259
|
-
hints?: Record<string, unknown>;
|
|
260
|
-
}
|
|
261
|
-
interface ExtensionInput {
|
|
262
|
-
url: string;
|
|
263
|
-
placements: ExtensionPlacementInput[];
|
|
264
|
-
metadata?: Record<string, unknown>;
|
|
265
|
-
}
|
|
266
214
|
/**
|
|
267
215
|
* Source-type mapping entry for an app install. Maps a manifest-declared
|
|
268
216
|
* source type onto a project model. See docs/platform/apps.md §Mapping step.
|
|
@@ -319,18 +267,12 @@ interface ApplyConfigInput {
|
|
|
319
267
|
authProviders?: ApplyConfigAuthProviderInput[];
|
|
320
268
|
placements?: ApplyConfigPlacementInput[];
|
|
321
269
|
apiKeys?: ApplyConfigApiKeyInput[];
|
|
322
|
-
/** Per-project integration declarations, keyed by integration name. */
|
|
323
|
-
integrations?: Record<string, IntegrationInput>;
|
|
324
|
-
/** Per-project extension declarations, keyed by extension name. */
|
|
325
|
-
extensions?: Record<string, ExtensionInput>;
|
|
326
270
|
/** Per-project app declarations, keyed by app name. */
|
|
327
271
|
apps?: Record<string, AppInput>;
|
|
328
272
|
[key: string]: unknown;
|
|
329
273
|
}
|
|
330
274
|
/** Define a complete config manifest. */
|
|
331
275
|
declare function defineConfig(config: ApplyConfigInput): ApplyConfigInput;
|
|
332
|
-
/** @deprecated Use `defineConfig` instead. */
|
|
333
|
-
declare const defineExtension: typeof defineConfig;
|
|
334
276
|
/** Define a model with type-safe field definitions. */
|
|
335
277
|
declare function defineModel(model: ApplyConfigModelInput): ApplyConfigModelInput;
|
|
336
278
|
/** Define a field with type safety. */
|
|
@@ -349,9 +291,5 @@ declare function defineAuthProvider(provider: ApplyConfigAuthProviderInput): App
|
|
|
349
291
|
declare function defineHook(hook: ApplyConfigHookInput): ApplyConfigHookInput;
|
|
350
292
|
/** Define an editor placement (sidebar or main-editor tab). */
|
|
351
293
|
declare function definePlacement(placement: ApplyConfigPlacementInput): ApplyConfigPlacementInput;
|
|
352
|
-
/** Define an integration declaration. */
|
|
353
|
-
declare function defineIntegration(integration: IntegrationInput): IntegrationInput;
|
|
354
|
-
/** Define an extension declaration. */
|
|
355
|
-
declare function defineExtensionDeclaration(extension: ExtensionInput): ExtensionInput;
|
|
356
294
|
|
|
357
|
-
export { type AppInput, type AppPlacementFieldChoiceInput, type AppSinkMappingInput, type AppSourceMappingInput, type ApplyConfigApiKeyInput, type ApplyConfigAuthProviderInput, type ApplyConfigHookInput, type ApplyConfigInput, type ApplyConfigModelInput, type ApplyConfigOperationInput, type ApplyConfigPlacementInput, type ApplyConfigScheduleInput, type ApplyConfigSegmentInput, type
|
|
295
|
+
export { type AppInput, type AppPlacementFieldChoiceInput, type AppSinkMappingInput, type AppSourceMappingInput, type ApplyConfigApiKeyInput, type ApplyConfigAuthProviderInput, type ApplyConfigHookInput, type ApplyConfigInput, type ApplyConfigModelInput, type ApplyConfigOperationInput, type ApplyConfigPlacementInput, type ApplyConfigScheduleInput, type ApplyConfigSegmentInput, type ExpressionPrecondition, type FieldDefinitionInput, type Precondition, type QuotaRule, type SegmentPrecondition, type SelectFieldConfig, type SelectFieldDefinitionInput, defineAuthProvider, defineConfig, defineField, defineHook, defineModel, defineOperation, definePlacement, defineSchedule, defineSegment, defineSelectField };
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
function defineConfig(config) {
|
|
3
3
|
return config;
|
|
4
4
|
}
|
|
5
|
-
var defineExtension = defineConfig;
|
|
6
5
|
function defineModel(model) {
|
|
7
6
|
return model;
|
|
8
7
|
}
|
|
@@ -30,20 +29,11 @@ function defineHook(hook) {
|
|
|
30
29
|
function definePlacement(placement) {
|
|
31
30
|
return placement;
|
|
32
31
|
}
|
|
33
|
-
function defineIntegration(integration) {
|
|
34
|
-
return integration;
|
|
35
|
-
}
|
|
36
|
-
function defineExtensionDeclaration(extension) {
|
|
37
|
-
return extension;
|
|
38
|
-
}
|
|
39
32
|
export {
|
|
40
33
|
defineAuthProvider,
|
|
41
34
|
defineConfig,
|
|
42
|
-
defineExtension,
|
|
43
|
-
defineExtensionDeclaration,
|
|
44
35
|
defineField,
|
|
45
36
|
defineHook,
|
|
46
|
-
defineIntegration,
|
|
47
37
|
defineModel,
|
|
48
38
|
defineOperation,
|
|
49
39
|
definePlacement,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eide/foir-cli",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
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.23.0",
|
|
54
54
|
"chalk": "^5.3.0",
|
|
55
55
|
"commander": "^12.1.0",
|
|
56
56
|
"dotenv": "^16.4.5",
|