primitive-admin 1.2.0-alpha.15 → 1.2.0-alpha.16
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/README.md +84 -0
- package/dist/src/commands/admins.js +1 -0
- package/dist/src/commands/admins.js.map +1 -1
- package/dist/src/commands/analytics.js +2 -4
- package/dist/src/commands/analytics.js.map +1 -1
- package/dist/src/commands/apps-transitions.d.ts +39 -0
- package/dist/src/commands/apps-transitions.js +198 -0
- package/dist/src/commands/apps-transitions.js.map +1 -0
- package/dist/src/commands/apps.d.ts +11 -0
- package/dist/src/commands/apps.js +50 -5
- package/dist/src/commands/apps.js.map +1 -1
- package/dist/src/commands/auth-sessions.js +2 -0
- package/dist/src/commands/auth-sessions.js.map +1 -1
- package/dist/src/commands/auth.js +5 -0
- package/dist/src/commands/auth.js.map +1 -1
- package/dist/src/commands/blob-buckets.js +2 -0
- package/dist/src/commands/blob-buckets.js.map +1 -1
- package/dist/src/commands/collections.js +2 -13
- package/dist/src/commands/collections.js.map +1 -1
- package/dist/src/commands/comparisons.js +2 -0
- package/dist/src/commands/comparisons.js.map +1 -1
- package/dist/src/commands/config.js +2 -0
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/connections.js +2 -2
- package/dist/src/commands/connections.js.map +1 -1
- package/dist/src/commands/db3.js +79 -21
- package/dist/src/commands/db3.js.map +1 -1
- package/dist/src/commands/email-templates.js +2 -0
- package/dist/src/commands/email-templates.js.map +1 -1
- package/dist/src/commands/env.js +2 -0
- package/dist/src/commands/env.js.map +1 -1
- package/dist/src/commands/functions.js +45 -3
- package/dist/src/commands/functions.js.map +1 -1
- package/dist/src/commands/groups.js +2 -0
- package/dist/src/commands/groups.js.map +1 -1
- package/dist/src/commands/guides.js +2 -0
- package/dist/src/commands/guides.js.map +1 -1
- package/dist/src/commands/hosting.d.ts +8 -0
- package/dist/src/commands/hosting.js +346 -0
- package/dist/src/commands/hosting.js.map +1 -0
- package/dist/src/commands/init.js +2 -0
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/integrations.js +2 -0
- package/dist/src/commands/integrations.js.map +1 -1
- package/dist/src/commands/locks.js +2 -0
- package/dist/src/commands/locks.js.map +1 -1
- package/dist/src/commands/metadata-category-configs.js +1 -1
- package/dist/src/commands/metadata-category-configs.js.map +1 -1
- package/dist/src/commands/metadata.js +2 -2
- package/dist/src/commands/metadata.js.map +1 -1
- package/dist/src/commands/prompts.js +2 -0
- package/dist/src/commands/prompts.js.map +1 -1
- package/dist/src/commands/rate-counters.d.ts +19 -0
- package/dist/src/commands/rate-counters.js +104 -0
- package/dist/src/commands/rate-counters.js.map +1 -0
- package/dist/src/commands/rule-sets.js +2 -2
- package/dist/src/commands/rule-sets.js.map +1 -1
- package/dist/src/commands/schemas.js +4 -4
- package/dist/src/commands/schemas.js.map +1 -1
- package/dist/src/commands/secrets.js +2 -0
- package/dist/src/commands/secrets.js.map +1 -1
- package/dist/src/commands/skill.js +2 -0
- package/dist/src/commands/skill.js.map +1 -1
- package/dist/src/commands/sync.d.ts +101 -2
- package/dist/src/commands/sync.js +391 -62
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/commands/tokens.js +2 -0
- package/dist/src/commands/tokens.js.map +1 -1
- package/dist/src/commands/transitions.d.ts +54 -0
- package/dist/src/commands/transitions.js +418 -0
- package/dist/src/commands/transitions.js.map +1 -0
- package/dist/src/commands/usage.d.ts +18 -0
- package/dist/src/commands/usage.js +343 -0
- package/dist/src/commands/usage.js.map +1 -0
- package/dist/src/commands/user-properties.js +2 -2
- package/dist/src/commands/user-properties.js.map +1 -1
- package/dist/src/commands/users.js +28 -29
- package/dist/src/commands/users.js.map +1 -1
- package/dist/src/commands/vars.js +2 -0
- package/dist/src/commands/vars.js.map +1 -1
- package/dist/src/commands/waitlist.js +2 -2
- package/dist/src/commands/waitlist.js.map +1 -1
- package/dist/src/lib/api-client.d.ts +606 -2
- package/dist/src/lib/api-client.js +157 -6
- package/dist/src/lib/api-client.js.map +1 -1
- package/dist/src/lib/app-settings-descriptor.d.ts +1 -1
- package/dist/src/lib/app-settings-descriptor.js +6 -0
- package/dist/src/lib/app-settings-descriptor.js.map +1 -1
- package/dist/src/lib/auth-flow.d.ts +33 -0
- package/dist/src/lib/auth-flow.js +404 -13
- package/dist/src/lib/auth-flow.js.map +1 -1
- package/dist/src/lib/cli-manifest.d.ts +5 -4
- package/dist/src/lib/cli-manifest.js.map +1 -1
- package/dist/src/lib/command-groups.d.ts +30 -0
- package/dist/src/lib/command-groups.js +109 -0
- package/dist/src/lib/command-groups.js.map +1 -0
- package/dist/src/lib/command-status.d.ts +56 -19
- package/dist/src/lib/command-status.js +101 -19
- package/dist/src/lib/command-status.js.map +1 -1
- package/dist/src/lib/config-object-descriptor.js +0 -1
- package/dist/src/lib/config-object-descriptor.js.map +1 -1
- package/dist/src/lib/db-codegen/dbTypeIR.d.ts +7 -0
- package/dist/src/lib/db-codegen/dbTypeIR.js +3 -0
- package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -1
- package/dist/src/lib/db-type-records.d.ts +12 -1
- package/dist/src/lib/db-type-records.js +8 -3
- package/dist/src/lib/db-type-records.js.map +1 -1
- package/dist/src/lib/db3-export.js +2 -2
- package/dist/src/lib/db3-export.js.map +1 -1
- package/dist/src/lib/db3-index-output.d.ts +26 -3
- package/dist/src/lib/db3-index-output.js +48 -12
- package/dist/src/lib/db3-index-output.js.map +1 -1
- package/dist/src/lib/db3-type-models.d.ts +11 -1
- package/dist/src/lib/db3-type-models.js +22 -2
- package/dist/src/lib/db3-type-models.js.map +1 -1
- package/dist/src/lib/function-authorize-view.d.ts +12 -0
- package/dist/src/lib/function-authorize-view.js +34 -0
- package/dist/src/lib/function-authorize-view.js.map +1 -1
- package/dist/src/lib/function-collect.d.ts +13 -0
- package/dist/src/lib/function-collect.js +37 -7
- package/dist/src/lib/function-collect.js.map +1 -1
- package/dist/src/lib/function-db-types.d.ts +14 -8
- package/dist/src/lib/function-db-types.js +56 -21
- package/dist/src/lib/function-db-types.js.map +1 -1
- package/dist/src/lib/function-lint.d.ts +24 -1
- package/dist/src/lib/function-lint.js +123 -1
- package/dist/src/lib/function-lint.js.map +1 -1
- package/dist/src/lib/function-schema-codegen.d.ts +31 -7
- package/dist/src/lib/function-schema-codegen.js +131 -36
- package/dist/src/lib/function-schema-codegen.js.map +1 -1
- package/dist/src/lib/function-sync.js +9 -1
- package/dist/src/lib/function-sync.js.map +1 -1
- package/dist/src/lib/generated-command-status.d.ts +6 -0
- package/dist/src/lib/generated-command-status.js +469 -0
- package/dist/src/lib/generated-command-status.js.map +1 -0
- package/dist/src/lib/generated-config-surfaces.d.ts +28 -3
- package/dist/src/lib/generated-config-surfaces.js +91 -16
- package/dist/src/lib/generated-config-surfaces.js.map +1 -1
- package/dist/src/lib/generated-sdk-types.d.ts +1 -1
- package/dist/src/lib/generated-sdk-types.js +1 -1
- package/dist/src/lib/generated-sdk-types.js.map +1 -1
- package/dist/src/lib/hosting-build.d.ts +97 -0
- package/dist/src/lib/hosting-build.js +204 -0
- package/dist/src/lib/hosting-build.js.map +1 -0
- package/dist/src/lib/hosting-client.d.ts +167 -0
- package/dist/src/lib/hosting-client.js +340 -0
- package/dist/src/lib/hosting-client.js.map +1 -0
- package/dist/src/lib/hosting-environments.d.ts +32 -0
- package/dist/src/lib/hosting-environments.js +74 -0
- package/dist/src/lib/hosting-environments.js.map +1 -0
- package/dist/src/lib/hosting-errors.d.ts +30 -0
- package/dist/src/lib/hosting-errors.js +43 -0
- package/dist/src/lib/hosting-errors.js.map +1 -0
- package/dist/src/lib/hosting-token.d.ts +46 -0
- package/dist/src/lib/hosting-token.js +60 -0
- package/dist/src/lib/hosting-token.js.map +1 -0
- package/dist/src/lib/hosting-wait.d.ts +42 -0
- package/dist/src/lib/hosting-wait.js +84 -0
- package/dist/src/lib/hosting-wait.js.map +1 -0
- package/dist/src/lib/hosting-wfp-upload.d.ts +86 -0
- package/dist/src/lib/hosting-wfp-upload.js +149 -0
- package/dist/src/lib/hosting-wfp-upload.js.map +1 -0
- package/dist/src/lib/invoker-shared-enums.d.ts +35 -0
- package/dist/src/lib/invoker-shared-enums.js +98 -0
- package/dist/src/lib/invoker-shared-enums.js.map +1 -0
- package/dist/src/lib/log-inspection.d.ts +4 -1
- package/dist/src/lib/log-inspection.js.map +1 -1
- package/dist/src/lib/primitive-declaration.d.ts +32 -1
- package/dist/src/lib/primitive-declaration.js +153 -19
- package/dist/src/lib/primitive-declaration.js.map +1 -1
- package/dist/src/lib/prompt-schema-codegen.d.ts +1 -1
- package/dist/src/lib/prompt-schema-codegen.js +31 -19
- package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
- package/dist/src/lib/prompt-schema-refs.d.ts +9 -0
- package/dist/src/lib/prompt-schema-refs.js +28 -2
- package/dist/src/lib/prompt-schema-refs.js.map +1 -1
- package/dist/src/lib/register-commands.d.ts +14 -6
- package/dist/src/lib/register-commands.js +19 -83
- package/dist/src/lib/register-commands.js.map +1 -1
- package/dist/src/lib/schema-codegen/generated-db3-bridge.js +10 -4
- package/dist/src/lib/schema-codegen/generated-db3-bridge.js.map +1 -1
- package/dist/src/lib/schema-codegen/generated-field-grammar.d.ts +11 -2
- package/dist/src/lib/schema-codegen/generated-field-grammar.js +22 -4
- package/dist/src/lib/schema-codegen/generated-field-grammar.js.map +1 -1
- package/dist/src/lib/schema-codegen/generated-schema-shape.d.ts +27 -0
- package/dist/src/lib/schema-codegen/generated-schema-shape.js +126 -0
- package/dist/src/lib/schema-codegen/generated-schema-shape.js.map +1 -0
- package/dist/src/lib/schema-codegen/valuesLists.d.ts +15 -2
- package/dist/src/lib/schema-codegen/valuesLists.js +19 -3
- package/dist/src/lib/schema-codegen/valuesLists.js.map +1 -1
- package/dist/src/lib/swift-codegen/functionGenerator.js +4 -3
- package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/sharedGenerator.js +50 -5
- package/dist/src/lib/swift-codegen/sharedGenerator.js.map +1 -1
- package/dist/src/lib/sync-resource-types.js +0 -3
- package/dist/src/lib/sync-resource-types.js.map +1 -1
- package/dist/src/lib/toml-database-config.js +3 -1
- package/dist/src/lib/toml-database-config.js.map +1 -1
- package/dist/src/lib/transition-warnings.d.ts +21 -0
- package/dist/src/lib/transition-warnings.js +49 -0
- package/dist/src/lib/transition-warnings.js.map +1 -0
- package/package.json +2 -2
|
@@ -611,7 +611,7 @@ export declare function buildPromptConfigPayload(tomlConfig: any, { mode, schema
|
|
|
611
611
|
* are checked one by one and the unknown keys reported together, so a typo in
|
|
612
612
|
* the third `[[configs]]` block is as loud as one in the first.
|
|
613
613
|
*/
|
|
614
|
-
export declare function configUnknownKeyError(filePath: string, tomlData: any, table: ConfigTable): string | null;
|
|
614
|
+
export declare function configUnknownKeyError(filePath: string, tomlData: any, table: ConfigTable, surfaceLabel?: string): string | null;
|
|
615
615
|
/**
|
|
616
616
|
* The warnings `config push` prints for one file that still carries a
|
|
617
617
|
* DEPRECATED key (#4872): the registry's dated sentence per key, prefixed with
|
|
@@ -1130,6 +1130,11 @@ export declare function buildMetadataCategoryPayload(configData: any): Record<st
|
|
|
1130
1130
|
*/
|
|
1131
1131
|
export declare function dbTypeOwnedScalars(table?: ConfigTable): string[];
|
|
1132
1132
|
export declare const DB_TYPE_OWNED_SCALARS: readonly string[];
|
|
1133
|
+
/**
|
|
1134
|
+
* #5993 — the fields a `db3-types/` file owns: the db3 type table's, which
|
|
1135
|
+
* declares no rule set, so a db3 push body carries no `ruleSetId` at all.
|
|
1136
|
+
*/
|
|
1137
|
+
export declare const DB3_TYPE_OWNED_SCALARS: readonly string[];
|
|
1133
1138
|
/** The user-facing TOML key for a wire field (for push output). */
|
|
1134
1139
|
export declare function dbTypeFieldLabel(key: string): string;
|
|
1135
1140
|
/**
|
|
@@ -1147,7 +1152,7 @@ export declare function hasMeaningfulValue(v: any): boolean;
|
|
|
1147
1152
|
* converges the server to the local TOML: a field removed from the file lands
|
|
1148
1153
|
* as `null` and is cleared.
|
|
1149
1154
|
*/
|
|
1150
|
-
export declare function buildOwnedScalarUpdate(typeConfig: any): Record<string, any>;
|
|
1155
|
+
export declare function buildOwnedScalarUpdate(typeConfig: any, ownedFields?: readonly string[]): Record<string, any>;
|
|
1151
1156
|
/**
|
|
1152
1157
|
* Issue #1567 — the owned scalars this push genuinely clears: the outgoing
|
|
1153
1158
|
* value is empty but the server currently holds a real value (a non-null →
|
|
@@ -1358,6 +1363,100 @@ export interface ConfigDiffSpec {
|
|
|
1358
1363
|
* its own suite covers the round trip.
|
|
1359
1364
|
*/
|
|
1360
1365
|
export declare const DB3_TYPE_DIFF_SPEC: ConfigDiffSpec;
|
|
1366
|
+
/**
|
|
1367
|
+
* `config push`'s gate for one `db3-types/` file: `decidePushForConfig` over
|
|
1368
|
+
* `DB3_TYPE_DIFF_SPEC`.
|
|
1369
|
+
*
|
|
1370
|
+
* #5993 — a baseline an earlier CLI stamped was hashed with the rule set, so
|
|
1371
|
+
* for a row with a stored binding it equals no projection this CLI makes, and
|
|
1372
|
+
* an ordinary edit would read as both sides having moved. A baseline that
|
|
1373
|
+
* equals the live row under that earlier projection says the server has not
|
|
1374
|
+
* moved since: it is read as the live row's current hash.
|
|
1375
|
+
*/
|
|
1376
|
+
export declare function decideDb3TypePush(input: Omit<Parameters<typeof decidePushForConfig>[0], "spec">): PushGateOutcome;
|
|
1377
|
+
/**
|
|
1378
|
+
* The body `PUT db3-types/:name` is sent for one parsed `db3-types/` file,
|
|
1379
|
+
* before its concurrency guard. The file owns every field: an absent one is
|
|
1380
|
+
* sent as null and cleared (#1567). #5993 — no `ruleSetId`: a db3 type takes
|
|
1381
|
+
* none.
|
|
1382
|
+
*/
|
|
1383
|
+
export declare function buildDb3TypePushBody(typeConfig: any, options: {
|
|
1384
|
+
serverHasSchema: boolean;
|
|
1385
|
+
}): Record<string, any>;
|
|
1386
|
+
/** One type a push's preflight found the append-only rule refuses (#6019). */
|
|
1387
|
+
export interface AppendOnlyRefusal {
|
|
1388
|
+
/** The type's name. */
|
|
1389
|
+
type: string;
|
|
1390
|
+
/** Each change refused, as the server listed it. */
|
|
1391
|
+
reasons: Array<{
|
|
1392
|
+
path: string;
|
|
1393
|
+
change?: string;
|
|
1394
|
+
reason: string;
|
|
1395
|
+
}>;
|
|
1396
|
+
}
|
|
1397
|
+
/** `<type>: <path>: <reason>`, one line per change the append-only rule refused or let through (#6019). */
|
|
1398
|
+
export declare function appendOnlyReasonLines(type: string, reasons: Array<{
|
|
1399
|
+
path: string;
|
|
1400
|
+
reason: string;
|
|
1401
|
+
}>): string[];
|
|
1402
|
+
/** The reasons of a `409 DB3_TYPE_NOT_APPEND_ONLY`, or `null` for any other error. */
|
|
1403
|
+
export declare function appendOnlyReasonsOf(err: unknown): AppendOnlyRefusal["reasons"] | null;
|
|
1404
|
+
/**
|
|
1405
|
+
* #6019 — whether a failed preflight request says nothing about the write it
|
|
1406
|
+
* asked about: no HTTP answer at all, a 5xx, a timeout (408) or a throttle
|
|
1407
|
+
* (429). Any other 4xx is the server's final answer for that body.
|
|
1408
|
+
*/
|
|
1409
|
+
export declare function preflightFailureIsInconclusive(err: unknown): boolean;
|
|
1410
|
+
/**
|
|
1411
|
+
* One preflight request, retried while its failure is inconclusive
|
|
1412
|
+
* ({@link preflightFailureIsInconclusive}), up to `attempts` tries. Answers the
|
|
1413
|
+
* value, or the last error.
|
|
1414
|
+
*/
|
|
1415
|
+
export declare function preflightCall<T>(send: () => Promise<T>, retryDelayMs?: number, attempts?: number): Promise<{
|
|
1416
|
+
ok: boolean;
|
|
1417
|
+
value?: T;
|
|
1418
|
+
error?: unknown;
|
|
1419
|
+
}>;
|
|
1420
|
+
/**
|
|
1421
|
+
* #6019 — the append-only preflight of `config push`: before any type row is
|
|
1422
|
+
* written, dry-run every schema update the run is about to make to an
|
|
1423
|
+
* existing type, from `db3-types/` and `database-type-configs/` alike, and
|
|
1424
|
+
* answer every type the server refuses `DB3_TYPE_NOT_APPEND_ONLY`. A file the
|
|
1425
|
+
* run would not write (unchanged, drifted, in conflict, or a create) is not
|
|
1426
|
+
* asked; a legacy file skipped as its selected db3 twin's duplicate is not
|
|
1427
|
+
* asked twice. A `DB3_TYPE_FIELD_REMOVAL_NOT_ENABLED` answer is thrown. Any
|
|
1428
|
+
* other server refusal (a 4xx) is final for that write, so it is left to the
|
|
1429
|
+
* apply loops, which meet it again as before. A failure that says nothing
|
|
1430
|
+
* about the write (no answer, a 5xx, 408, 429), on the dry run or the type
|
|
1431
|
+
* listing, is retried; if it persists the preflight throws, so no type row is
|
|
1432
|
+
* written by a run whose types were not all validated.
|
|
1433
|
+
*/
|
|
1434
|
+
export declare function preflightDb3TypeAppendOnly(input: {
|
|
1435
|
+
client: Pick<ApiClient, "listDatabaseTypeConfigs" | "pushDb3Type" | "updateDatabaseTypeConfig">;
|
|
1436
|
+
appId: string;
|
|
1437
|
+
configDir: string;
|
|
1438
|
+
selectFiles: (label: string, dir: string, files: string[]) => string[];
|
|
1439
|
+
maps: ConfigDiffMaps;
|
|
1440
|
+
syncState: SyncState | null;
|
|
1441
|
+
force: boolean;
|
|
1442
|
+
allowFieldRemoval: boolean;
|
|
1443
|
+
/** Wait before each retry of an inconclusive request (tests pass 0). */
|
|
1444
|
+
retryDelayMs?: number;
|
|
1445
|
+
}): Promise<AppendOnlyRefusal[]>;
|
|
1446
|
+
/**
|
|
1447
|
+
* #5993 — whether a `database-type-configs/` file whose db3 twin agrees with
|
|
1448
|
+
* it must still go through the database type push: its rule set, which the
|
|
1449
|
+
* twin comparison leaves out, differs from the live row's. Empty and null
|
|
1450
|
+
* read alike. Without live rows there is nothing to compare against, and the
|
|
1451
|
+
* twin is skipped as before.
|
|
1452
|
+
*/
|
|
1453
|
+
export declare function legacyTwinPushesItsRuleSet(input: {
|
|
1454
|
+
/** The legacy file's rule set id, resolved from its `ruleSetName`. */
|
|
1455
|
+
localRuleSetId: unknown;
|
|
1456
|
+
liveAvailable: boolean;
|
|
1457
|
+
/** The live row of the type, when the server has one. */
|
|
1458
|
+
live?: any;
|
|
1459
|
+
}): boolean;
|
|
1361
1460
|
/**
|
|
1362
1461
|
* #5025 — what a `config push` conflict on `db3-types/<name>.toml` says when
|
|
1363
1462
|
* the server holds a type of that name this tree never pulled: a database
|