@tailor-platform/sdk 1.32.1 → 1.33.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/CHANGELOG.md +95 -0
- package/dist/{application-p2GujXmg.mjs → application-CYPU-WIc.mjs} +58 -43
- package/dist/application-CYPU-WIc.mjs.map +1 -0
- package/dist/application-dnB8CQiT.mjs +4 -0
- package/dist/cli/index.d.mts +2 -2
- package/dist/cli/index.mjs +28 -35
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +104 -12
- package/dist/cli/lib.mjs +7 -13
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/skills.mjs +0 -1
- package/dist/cli/skills.mjs.map +1 -1
- package/dist/{client-D5P1myz0.mjs → client-CYGsf3Zl.mjs} +91 -27
- package/dist/client-CYGsf3Zl.mjs.map +1 -0
- package/dist/{client-gpRgZl1b.mjs → client-ea1w8SmG.mjs} +1 -4
- package/dist/configure/index.d.mts +5 -5
- package/dist/configure/index.mjs +81 -12
- package/dist/configure/index.mjs.map +1 -1
- package/dist/crash-report-CbueUPaP.mjs +4 -0
- package/dist/{crash-report-DnwITWeV.mjs → crash-report-OXafT1iS.mjs} +3 -3
- package/dist/{crash-report-DnwITWeV.mjs.map → crash-report-OXafT1iS.mjs.map} +1 -1
- package/dist/{enum-constants-CkKARYb7.mjs → enum-constants-DI85-fPE.mjs} +2 -1
- package/dist/{enum-constants-CkKARYb7.mjs.map → enum-constants-DI85-fPE.mjs.map} +1 -1
- package/dist/{env-BZLTIlIo.d.mts → env-BvIWsJxg.d.mts} +2 -2
- package/dist/{file-utils-D2TxR_kj.mjs → file-utils-C4rXlOVt.mjs} +2 -1
- package/dist/{file-utils-D2TxR_kj.mjs.map → file-utils-C4rXlOVt.mjs.map} +1 -1
- package/dist/{index-CgMytw2A.d.mts → index-0H-YH8Ya.d.mts} +3 -2
- package/dist/{index-vVGamLOw.d.mts → index-BM2SqNfO.d.mts} +3 -2
- package/dist/{index-CoReoodF.d.mts → index-BU6fmwJC.d.mts} +3 -2
- package/dist/{index-BYk_9R3S.d.mts → index-DlivLpTN.d.mts} +145 -32
- package/dist/{index-BQKAzTPA.d.mts → index-mAV9kYJA.d.mts} +3 -2
- package/dist/{interceptor-1LL1gBsF.mjs → interceptor-f7slMkCC.mjs} +1 -2
- package/dist/{interceptor-1LL1gBsF.mjs.map → interceptor-f7slMkCC.mjs.map} +1 -1
- package/dist/kysely/index.d.mts +5 -1
- package/dist/kysely/index.mjs +0 -1
- package/dist/kysely/index.mjs.map +1 -1
- package/dist/{kysely-type-BK0b4Rqt.mjs → kysely-type-BwMqaL3z.mjs} +18 -7
- package/dist/kysely-type-BwMqaL3z.mjs.map +1 -0
- package/dist/{package-json-VqyFvGiP.mjs → package-json-CfUqjJaQ.mjs} +1 -1
- package/dist/{package-json-VqyFvGiP.mjs.map → package-json-CfUqjJaQ.mjs.map} +1 -1
- package/dist/package-json-D5Km1jjt.mjs +4 -0
- package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
- package/dist/plugin/builtin/enum-constants/index.mjs +1 -2
- package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
- package/dist/plugin/builtin/file-utils/index.mjs +1 -2
- package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -2
- package/dist/plugin/builtin/seed/index.d.mts +1 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -2
- package/dist/plugin/index.d.mts +2 -2
- package/dist/plugin/index.mjs +0 -1
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/{plugin-IIDZW9GG.d.mts → plugin-DQqzlulP.d.mts} +46 -33
- package/dist/{runtime-7DOyTTxR.mjs → runtime-CDvdBV66.mjs} +1032 -306
- package/dist/runtime-CDvdBV66.mjs.map +1 -0
- package/dist/{schema-BITbkmq3.mjs → schema-D27cW0Ca.mjs} +2 -1
- package/dist/schema-D27cW0Ca.mjs.map +1 -0
- package/dist/seed/index.mjs +0 -1
- package/dist/seed/index.mjs.map +1 -1
- package/dist/{seed-BXrSEJbv.mjs → seed-BZIFDG27.mjs} +11 -3
- package/dist/seed-BZIFDG27.mjs.map +1 -0
- package/dist/telemetry-C508zIi1.mjs +4 -0
- package/dist/{telemetry-B4sp-dD2.mjs → telemetry-CREcGK8y.mjs} +2 -2
- package/dist/{telemetry-B4sp-dD2.mjs.map → telemetry-CREcGK8y.mjs.map} +1 -1
- package/dist/utils/test/index.d.mts +2 -2
- package/dist/utils/test/index.mjs +0 -2
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/{workflow.generated-C2A5Ye0m.d.mts → workflow.generated-u9MgzqbM.d.mts} +14 -3
- package/docs/cli/application.md +17 -0
- package/docs/cli/auth.md +1 -1
- package/docs/cli/crash-report.md +1 -1
- package/docs/cli/executor.md +2 -2
- package/docs/cli/secret.md +3 -3
- package/docs/cli/staticwebsite.md +1 -1
- package/docs/cli/tailordb.md +4 -2
- package/docs/cli/user.md +2 -2
- package/docs/cli-reference.md +116 -100
- package/docs/generator/builtin.md +1 -1
- package/docs/services/executor.md +54 -0
- package/docs/services/idp.md +22 -0
- package/package.json +20 -20
- package/dist/application-Cwt_ifTT.mjs +0 -12
- package/dist/application-p2GujXmg.mjs.map +0 -1
- package/dist/chunk-COzJYswC.mjs +0 -9
- package/dist/client-D5P1myz0.mjs.map +0 -1
- package/dist/crash-report-Cm9vFmTN.mjs +0 -7
- package/dist/kysely-type-BK0b4Rqt.mjs.map +0 -1
- package/dist/package-json-88x7bPKC.mjs +0 -5
- package/dist/runtime-7DOyTTxR.mjs.map +0 -1
- package/dist/schema-BITbkmq3.mjs.map +0 -1
- package/dist/seed-BXrSEJbv.mjs.map +0 -1
- package/dist/telemetry-DXIGGa6A.mjs +0 -5
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { $ as FieldOutput, A as DefinedAuth, Ct as IncomingWebhookTrigger$1, Dt as WebhookOperation$1, Et as
|
|
3
|
-
import { n as TailorEnv, r as TailorActor } from "./env-
|
|
4
|
-
import { g as IdpDefinitionBrand, n as AppConfig, t as RetryPolicy
|
|
5
|
-
import * as zod from "zod";
|
|
2
|
+
import { $ as FieldOutput, A as DefinedAuth, Ct as IncomingWebhookTrigger$1, Dt as WebhookOperation$1, Et as TailorDBTrigger$1, F as UserAttributeMap, H as TailorDBType, O as AuthServiceInput, Ot as WorkflowOperation$1, P as UserAttributeListKey, Q as FieldOptions, St as IdpUserTrigger$1, Tt as ScheduleTriggerInput, V as TailorDBInstance, X as DefinedFieldMetadata, Y as ArrayFieldOutput, Z as FieldMetadata, _t as AuthAccessTokenTrigger$1, at as output$1, bt as FunctionOperation$1, et as TailorFieldType, ft as AllowedValues, gt as GeneratorConfig, ht as ResolverInput, it as JsonCompatible, kt as AuthInvoker$1, mt as Resolver, n as Plugin, nt as TailorField, pt as AllowedValuesOutput, rt as InferFieldsOutput, tt as TailorAnyField, ut as TailorUser, wt as ResolverExecutedTrigger$1, xt as GqlOperation$1, yt as ExecutorInput } from "./plugin-DQqzlulP.mjs";
|
|
3
|
+
import { n as TailorEnv, r as TailorActor } from "./env-BvIWsJxg.mjs";
|
|
4
|
+
import { b as IdPInput, g as IdpDefinitionBrand, n as AppConfig, t as RetryPolicy } from "./workflow.generated-u9MgzqbM.mjs";
|
|
5
|
+
import * as _$zod from "zod";
|
|
6
6
|
import { JsonPrimitive, Jsonifiable, Jsonify } from "type-fest";
|
|
7
7
|
import { Client } from "@urql/core";
|
|
8
8
|
import { StandardCRON } from "ts-cron-validator";
|
|
9
|
-
import * as zod_v4_core0 from "zod/v4/core";
|
|
9
|
+
import * as _$zod_v4_core0 from "zod/v4/core";
|
|
10
10
|
|
|
11
11
|
//#region src/configure/services/auth/index.d.ts
|
|
12
12
|
type MachineUserAttributeFields = Record<string, TailorField<DefinedFieldMetadata, unknown, FieldMetadata, TailorFieldType>>;
|
|
@@ -348,13 +348,19 @@ interface RecordArgs extends EventArgs {
|
|
|
348
348
|
typeName: string;
|
|
349
349
|
}
|
|
350
350
|
interface RecordCreatedArgs<T extends TailorDBType> extends RecordArgs {
|
|
351
|
+
event: "created";
|
|
352
|
+
rawEvent: "tailordb.type_record.created";
|
|
351
353
|
newRecord: output$1<T>;
|
|
352
354
|
}
|
|
353
355
|
interface RecordUpdatedArgs<T extends TailorDBType> extends RecordArgs {
|
|
356
|
+
event: "updated";
|
|
357
|
+
rawEvent: "tailordb.type_record.updated";
|
|
354
358
|
newRecord: output$1<T>;
|
|
355
359
|
oldRecord: output$1<T>;
|
|
356
360
|
}
|
|
357
361
|
interface RecordDeletedArgs<T extends TailorDBType> extends RecordArgs {
|
|
362
|
+
event: "deleted";
|
|
363
|
+
rawEvent: "tailordb.type_record.deleted";
|
|
358
364
|
oldRecord: output$1<T>;
|
|
359
365
|
}
|
|
360
366
|
/**
|
|
@@ -384,7 +390,58 @@ type ResolverExecutedArgs<R extends ResolverConfig> = EventArgs & {
|
|
|
384
390
|
result?: never;
|
|
385
391
|
error: string;
|
|
386
392
|
});
|
|
387
|
-
|
|
393
|
+
interface IdpUserCreatedArgs extends EventArgs {
|
|
394
|
+
event: "created";
|
|
395
|
+
rawEvent: "idp.user.created";
|
|
396
|
+
namespaceName: string;
|
|
397
|
+
userId: string;
|
|
398
|
+
}
|
|
399
|
+
interface IdpUserUpdatedArgs extends EventArgs {
|
|
400
|
+
event: "updated";
|
|
401
|
+
rawEvent: "idp.user.updated";
|
|
402
|
+
namespaceName: string;
|
|
403
|
+
userId: string;
|
|
404
|
+
}
|
|
405
|
+
interface IdpUserDeletedArgs extends EventArgs {
|
|
406
|
+
event: "deleted";
|
|
407
|
+
rawEvent: "idp.user.deleted";
|
|
408
|
+
namespaceName: string;
|
|
409
|
+
userId: string;
|
|
410
|
+
}
|
|
411
|
+
type IdpUserArgs = IdpUserCreatedArgs | IdpUserUpdatedArgs | IdpUserDeletedArgs;
|
|
412
|
+
interface AuthAccessTokenIssuedArgs extends EventArgs {
|
|
413
|
+
event: "issued";
|
|
414
|
+
rawEvent: "auth.access_token.issued";
|
|
415
|
+
namespaceName: string;
|
|
416
|
+
userId: string;
|
|
417
|
+
}
|
|
418
|
+
interface AuthAccessTokenRefreshedArgs extends EventArgs {
|
|
419
|
+
event: "refreshed";
|
|
420
|
+
rawEvent: "auth.access_token.refreshed";
|
|
421
|
+
namespaceName: string;
|
|
422
|
+
userId: string;
|
|
423
|
+
}
|
|
424
|
+
interface AuthAccessTokenRevokedArgs extends EventArgs {
|
|
425
|
+
event: "revoked";
|
|
426
|
+
rawEvent: "auth.access_token.revoked";
|
|
427
|
+
namespaceName: string;
|
|
428
|
+
userId: string;
|
|
429
|
+
}
|
|
430
|
+
type AuthAccessTokenArgs = AuthAccessTokenIssuedArgs | AuthAccessTokenRefreshedArgs | AuthAccessTokenRevokedArgs;
|
|
431
|
+
declare const recordEventMap: {
|
|
432
|
+
readonly created: "tailordb.type_record.created";
|
|
433
|
+
readonly updated: "tailordb.type_record.updated";
|
|
434
|
+
readonly deleted: "tailordb.type_record.deleted";
|
|
435
|
+
};
|
|
436
|
+
type RecordEventMap = typeof recordEventMap;
|
|
437
|
+
type RecordEventKind = keyof RecordEventMap;
|
|
438
|
+
type RecordArgsMap<T extends TailorDBType> = {
|
|
439
|
+
created: RecordCreatedArgs<T>;
|
|
440
|
+
updated: RecordUpdatedArgs<T>;
|
|
441
|
+
deleted: RecordDeletedArgs<T>;
|
|
442
|
+
};
|
|
443
|
+
type RecordMultiArgs<T extends TailorDBType, K extends RecordEventKind[]> = RecordArgsMap<T>[K[number]];
|
|
444
|
+
type TailorDBTrigger<Args> = TailorDBTrigger$1 & {
|
|
388
445
|
__args: Args;
|
|
389
446
|
};
|
|
390
447
|
type RecordTriggerOptions<T extends TailorDBType, Args> = {
|
|
@@ -397,21 +454,34 @@ type RecordTriggerOptions<T extends TailorDBType, Args> = {
|
|
|
397
454
|
* @param options - Trigger options
|
|
398
455
|
* @returns Record created trigger
|
|
399
456
|
*/
|
|
400
|
-
declare function recordCreatedTrigger<T extends TailorDBType>(options: RecordTriggerOptions<T, RecordCreatedArgs<T>>):
|
|
457
|
+
declare function recordCreatedTrigger<T extends TailorDBType>(options: RecordTriggerOptions<T, RecordCreatedArgs<T>>): TailorDBTrigger<RecordCreatedArgs<T>>;
|
|
401
458
|
/**
|
|
402
459
|
* Create a trigger that fires when a TailorDB record is updated.
|
|
403
460
|
* @template T
|
|
404
461
|
* @param options - Trigger options
|
|
405
462
|
* @returns Record updated trigger
|
|
406
463
|
*/
|
|
407
|
-
declare function recordUpdatedTrigger<T extends TailorDBType>(options: RecordTriggerOptions<T, RecordUpdatedArgs<T>>):
|
|
464
|
+
declare function recordUpdatedTrigger<T extends TailorDBType>(options: RecordTriggerOptions<T, RecordUpdatedArgs<T>>): TailorDBTrigger<RecordUpdatedArgs<T>>;
|
|
408
465
|
/**
|
|
409
466
|
* Create a trigger that fires when a TailorDB record is deleted.
|
|
410
467
|
* @template T
|
|
411
468
|
* @param options - Trigger options
|
|
412
469
|
* @returns Record deleted trigger
|
|
413
470
|
*/
|
|
414
|
-
declare function recordDeletedTrigger<T extends TailorDBType>(options: RecordTriggerOptions<T, RecordDeletedArgs<T>>):
|
|
471
|
+
declare function recordDeletedTrigger<T extends TailorDBType>(options: RecordTriggerOptions<T, RecordDeletedArgs<T>>): TailorDBTrigger<RecordDeletedArgs<T>>;
|
|
472
|
+
type RecordTriggerMultiOptions<T extends TailorDBType, K extends RecordEventKind[]> = {
|
|
473
|
+
type: T;
|
|
474
|
+
events: K;
|
|
475
|
+
condition?: (args: RecordMultiArgs<T, K>) => boolean;
|
|
476
|
+
};
|
|
477
|
+
/**
|
|
478
|
+
* Create a trigger that fires on multiple TailorDB record event types.
|
|
479
|
+
* @template T
|
|
480
|
+
* @template K
|
|
481
|
+
* @param options - Trigger options with events array
|
|
482
|
+
* @returns TailorDB record trigger
|
|
483
|
+
*/
|
|
484
|
+
declare function recordTrigger<T extends TailorDBType, const K extends [RecordEventKind, ...RecordEventKind[]]>(options: RecordTriggerMultiOptions<T, K>): TailorDBTrigger<RecordMultiArgs<T, K>>;
|
|
415
485
|
type ResolverExecutedTrigger<Args> = ResolverExecutedTrigger$1 & {
|
|
416
486
|
__args: Args;
|
|
417
487
|
};
|
|
@@ -426,10 +496,19 @@ type ResolverExecutedTriggerOptions<R extends ResolverConfig> = {
|
|
|
426
496
|
* @returns Resolver executed trigger
|
|
427
497
|
*/
|
|
428
498
|
declare function resolverExecutedTrigger<R extends ResolverConfig>(options: ResolverExecutedTriggerOptions<R>): ResolverExecutedTrigger<ResolverExecutedArgs<R>>;
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
499
|
+
declare const idpUserEventMap: {
|
|
500
|
+
readonly created: "idp.user.created";
|
|
501
|
+
readonly updated: "idp.user.updated";
|
|
502
|
+
readonly deleted: "idp.user.deleted";
|
|
503
|
+
};
|
|
504
|
+
type IdpUserEventMap = typeof idpUserEventMap;
|
|
505
|
+
type IdpUserEventKind = keyof IdpUserEventMap;
|
|
506
|
+
type IdpUserArgsMap = {
|
|
507
|
+
created: IdpUserCreatedArgs;
|
|
508
|
+
updated: IdpUserUpdatedArgs;
|
|
509
|
+
deleted: IdpUserDeletedArgs;
|
|
510
|
+
};
|
|
511
|
+
type IdpUserMultiArgs<K extends IdpUserEventKind[]> = IdpUserArgsMap[K[number]];
|
|
433
512
|
type IdpUserTrigger<Args> = IdpUserTrigger$1 & {
|
|
434
513
|
__args: Args;
|
|
435
514
|
};
|
|
@@ -437,21 +516,40 @@ type IdpUserTrigger<Args> = IdpUserTrigger$1 & {
|
|
|
437
516
|
* Create a trigger that fires when an IdP user is created.
|
|
438
517
|
* @returns IdP user created trigger
|
|
439
518
|
*/
|
|
440
|
-
declare function idpUserCreatedTrigger(): IdpUserTrigger<
|
|
519
|
+
declare function idpUserCreatedTrigger(): IdpUserTrigger<IdpUserCreatedArgs>;
|
|
441
520
|
/**
|
|
442
521
|
* Create a trigger that fires when an IdP user is updated.
|
|
443
522
|
* @returns IdP user updated trigger
|
|
444
523
|
*/
|
|
445
|
-
declare function idpUserUpdatedTrigger(): IdpUserTrigger<
|
|
524
|
+
declare function idpUserUpdatedTrigger(): IdpUserTrigger<IdpUserUpdatedArgs>;
|
|
446
525
|
/**
|
|
447
526
|
* Create a trigger that fires when an IdP user is deleted.
|
|
448
527
|
* @returns IdP user deleted trigger
|
|
449
528
|
*/
|
|
450
|
-
declare function idpUserDeletedTrigger(): IdpUserTrigger<
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
529
|
+
declare function idpUserDeletedTrigger(): IdpUserTrigger<IdpUserDeletedArgs>;
|
|
530
|
+
type IdpUserTriggerOptions<K extends IdpUserEventKind[]> = {
|
|
531
|
+
events: K;
|
|
532
|
+
};
|
|
533
|
+
/**
|
|
534
|
+
* Create a trigger that fires on multiple IdP user event types.
|
|
535
|
+
* @template K
|
|
536
|
+
* @param options - Trigger options with events array
|
|
537
|
+
* @returns IdP user trigger
|
|
538
|
+
*/
|
|
539
|
+
declare function idpUserTrigger<const K extends [IdpUserEventKind, ...IdpUserEventKind[]]>(options: IdpUserTriggerOptions<K>): IdpUserTrigger<IdpUserMultiArgs<K>>;
|
|
540
|
+
declare const authAccessTokenEventMap: {
|
|
541
|
+
readonly issued: "auth.access_token.issued";
|
|
542
|
+
readonly refreshed: "auth.access_token.refreshed";
|
|
543
|
+
readonly revoked: "auth.access_token.revoked";
|
|
544
|
+
};
|
|
545
|
+
type AuthAccessTokenEventMap = typeof authAccessTokenEventMap;
|
|
546
|
+
type AuthAccessTokenEventKind = keyof AuthAccessTokenEventMap;
|
|
547
|
+
type AuthAccessTokenArgsMap = {
|
|
548
|
+
issued: AuthAccessTokenIssuedArgs;
|
|
549
|
+
refreshed: AuthAccessTokenRefreshedArgs;
|
|
550
|
+
revoked: AuthAccessTokenRevokedArgs;
|
|
551
|
+
};
|
|
552
|
+
type AuthAccessTokenMultiArgs<K extends AuthAccessTokenEventKind[]> = AuthAccessTokenArgsMap[K[number]];
|
|
455
553
|
type AuthAccessTokenTrigger<Args> = AuthAccessTokenTrigger$1 & {
|
|
456
554
|
__args: Args;
|
|
457
555
|
};
|
|
@@ -459,17 +557,27 @@ type AuthAccessTokenTrigger<Args> = AuthAccessTokenTrigger$1 & {
|
|
|
459
557
|
* Create a trigger that fires when an access token is issued.
|
|
460
558
|
* @returns Auth access token issued trigger
|
|
461
559
|
*/
|
|
462
|
-
declare function authAccessTokenIssuedTrigger(): AuthAccessTokenTrigger<
|
|
560
|
+
declare function authAccessTokenIssuedTrigger(): AuthAccessTokenTrigger<AuthAccessTokenIssuedArgs>;
|
|
463
561
|
/**
|
|
464
562
|
* Create a trigger that fires when an access token is refreshed.
|
|
465
563
|
* @returns Auth access token refreshed trigger
|
|
466
564
|
*/
|
|
467
|
-
declare function authAccessTokenRefreshedTrigger(): AuthAccessTokenTrigger<
|
|
565
|
+
declare function authAccessTokenRefreshedTrigger(): AuthAccessTokenTrigger<AuthAccessTokenRefreshedArgs>;
|
|
468
566
|
/**
|
|
469
567
|
* Create a trigger that fires when an access token is revoked.
|
|
470
568
|
* @returns Auth access token revoked trigger
|
|
471
569
|
*/
|
|
472
|
-
declare function authAccessTokenRevokedTrigger(): AuthAccessTokenTrigger<
|
|
570
|
+
declare function authAccessTokenRevokedTrigger(): AuthAccessTokenTrigger<AuthAccessTokenRevokedArgs>;
|
|
571
|
+
type AuthAccessTokenTriggerOptions<K extends AuthAccessTokenEventKind[]> = {
|
|
572
|
+
events: K;
|
|
573
|
+
};
|
|
574
|
+
/**
|
|
575
|
+
* Create a trigger that fires on multiple auth access token event types.
|
|
576
|
+
* @template K
|
|
577
|
+
* @param options - Trigger options with events array
|
|
578
|
+
* @returns Auth access token trigger
|
|
579
|
+
*/
|
|
580
|
+
declare function authAccessTokenTrigger<const K extends [AuthAccessTokenEventKind, ...AuthAccessTokenEventKind[]]>(options: AuthAccessTokenTriggerOptions<K>): AuthAccessTokenTrigger<AuthAccessTokenMultiArgs<K>>;
|
|
473
581
|
//#endregion
|
|
474
582
|
//#region src/configure/services/executor/trigger/schedule.d.ts
|
|
475
583
|
type Timezone = "UTC" | "Pacific/Midway" | "Pacific/Niue" | "Pacific/Pago_Pago" | "America/Adak" | "Pacific/Honolulu" | "Pacific/Rarotonga" | "Pacific/Tahiti" | "Pacific/Marquesas" | "America/Anchorage" | "America/Juneau" | "America/Metlakatla" | "America/Nome" | "America/Sitka" | "America/Yakutat" | "Pacific/Gambier" | "America/Los_Angeles" | "America/Tijuana" | "America/Vancouver" | "Pacific/Pitcairn" | "America/Boise" | "America/Cambridge_Bay" | "America/Chihuahua" | "America/Creston" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Edmonton" | "America/Fort_Nelson" | "America/Hermosillo" | "America/Inuvik" | "America/Mazatlan" | "America/Ojinaga" | "America/Phoenix" | "America/Whitehorse" | "America/Yellowknife" | "America/Bahia_Banderas" | "America/Belize" | "America/Chicago" | "America/Costa_Rica" | "America/El_Salvador" | "America/Guatemala" | "America/Indiana/Knox" | "America/Indiana/Tell_City" | "America/Managua" | "America/Matamoros" | "America/Menominee" | "America/Merida" | "America/Mexico_City" | "America/Monterrey" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Regina" | "America/Resolute" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Winnipeg" | "Pacific/Easter" | "Pacific/Galapagos" | "America/Atikokan" | "America/Bogota" | "America/Cancun" | "America/Cayman" | "America/Detroit" | "America/Eirunepe" | "America/Grand_Turk" | "America/Guayaquil" | "America/Havana" | "America/Indiana/Indianapolis" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Iqaluit" | "America/Jamaica" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Lima" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Panama" | "America/Pangnirtung" | "America/Port-au-Prince" | "America/Rio_Branco" | "America/Thunder_Bay" | "America/Toronto" | "America/Anguilla" | "America/Antigua" | "America/Aruba" | "America/Asuncion" | "America/Barbados" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Campo_Grande" | "America/Caracas" | "America/Cuiaba" | "America/Curacao" | "America/Dominica" | "America/Glace_Bay" | "America/Goose_Bay" | "America/Grenada" | "America/Guadeloupe" | "America/Guyana" | "America/Halifax" | "America/Kralendijk" | "America/La_Paz" | "America/Lower_Princes" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Moncton" | "America/Montserrat" | "America/Porto_Velho" | "America/Port_of_Spain" | "America/Puerto_Rico" | "America/Santiago" | "America/Santo_Domingo" | "America/St_Barthelemy" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Thule" | "America/Tortola" | "Atlantic/Bermuda" | "America/St_Johns" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Bahia" | "America/Belem" | "America/Cayenne" | "America/Fortaleza" | "America/Godthab" | "America/Maceio" | "America/Miquelon" | "America/Montevideo" | "America/Paramaribo" | "America/Punta_Arenas" | "America/Recife" | "America/Santarem" | "America/Sao_Paulo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Atlantic/Stanley" | "America/Noronha" | "Atlantic/South_Georgia" | "America/Scoresbysund" | "Atlantic/Azores" | "Atlantic/Cape_Verde" | "Africa/Abidjan" | "Africa/Accra" | "Africa/Bamako" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Casablanca" | "Africa/Conakry" | "Africa/Dakar" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Lome" | "Africa/Monrovia" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Sao_Tome" | "America/Danmarkshavn" | "Antarctica/Troll" | "Atlantic/Canary" | "Atlantic/Faroe" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/St_Helena" | "Europe/Dublin" | "Europe/Guernsey" | "Europe/Isle_of_Man" | "Europe/Jersey" | "Europe/Lisbon" | "Europe/London" | "Africa/Algiers" | "Africa/Bangui" | "Africa/Brazzaville" | "Africa/Ceuta" | "Africa/Douala" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Luanda" | "Africa/Malabo" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Porto-Novo" | "Africa/Tunis" | "Africa/Windhoek" | "Arctic/Longyearbyen" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Gibraltar" | "Europe/Ljubljana" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Monaco" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Rome" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Skopje" | "Europe/Stockholm" | "Europe/Tirane" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "Africa/Blantyre" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Tripoli" | "Asia/Amman" | "Asia/Beirut" | "Asia/Damascus" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Hebron" | "Asia/Jerusalem" | "Asia/Nicosia" | "Europe/Athens" | "Europe/Bucharest" | "Europe/Chisinau" | "Europe/Helsinki" | "Europe/Kaliningrad" | "Europe/Kyiv" | "Europe/Mariehamn" | "Europe/Riga" | "Europe/Sofia" | "Europe/Tallinn" | "Europe/Uzhgorod" | "Europe/Vilnius" | "Europe/Zaporizhzhia" | "Africa/Addis_Ababa" | "Africa/Asmara" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Kampala" | "Africa/Mogadishu" | "Africa/Nairobi" | "Antarctica/Syowa" | "Asia/Aden" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Kuwait" | "Asia/Qatar" | "Asia/Riyadh" | "Europe/Istanbul" | "Europe/Kirov" | "Europe/Minsk" | "Europe/Moscow" | "Europe/Simferopol" | "Europe/Volgograd" | "Indian/Antananarivo" | "Indian/Comoro" | "Indian/Mayotte" | "Asia/Tehran" | "Asia/Baku" | "Asia/Dubai" | "Asia/Muscat" | "Asia/Tbilisi" | "Asia/Yerevan" | "Europe/Astrakhan" | "Europe/Samara" | "Europe/Saratov" | "Europe/Ulyanovsk" | "Indian/Mahe" | "Indian/Mauritius" | "Indian/Reunion" | "Asia/Kabul" | "Antarctica/Mawson" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Atyrau" | "Asia/Dushanbe" | "Asia/Karachi" | "Asia/Oral" | "Asia/Qyzylorda" | "Asia/Samarkand" | "Asia/Tashkent" | "Asia/Yekaterinburg" | "Indian/Kerguelen" | "Indian/Maldives" | "Asia/Colombo" | "Asia/Kolkata" | "Asia/Kathmandu" | "Antarctica/Vostok" | "Asia/Almaty" | "Asia/Bishkek" | "Asia/Dhaka" | "Asia/Omsk" | "Asia/Qostanay" | "Asia/Thimphu" | "Asia/Urumqi" | "Indian/Chagos" | "Asia/Yangon" | "Indian/Cocos" | "Antarctica/Davis" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Hovd" | "Asia/Ho_Chi_Minh" | "Asia/Jakarta" | "Asia/Krasnoyarsk" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Tomsk" | "Asia/Vientiane" | "Indian/Christmas" | "Asia/Brunei" | "Asia/Choibalsan" | "Asia/Hong_Kong" | "Asia/Irkutsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Macau" | "Asia/Makassar" | "Asia/Manila" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Taipei" | "Asia/Ulaanbaatar" | "Australia/Perth" | "Australia/Eucla" | "Asia/Chita" | "Asia/Dili" | "Asia/Jayapura" | "Asia/Khandyga" | "Asia/Pyongyang" | "Asia/Seoul" | "Asia/Tokyo" | "Asia/Yakutsk" | "Pacific/Palau" | "Australia/Adelaide" | "Australia/Broken_Hill" | "Australia/Darwin" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Asia/Ust-Nera" | "Asia/Vladivostok" | "Australia/Brisbane" | "Australia/Currie" | "Australia/Hobart" | "Australia/Lindeman" | "Australia/Melbourne" | "Australia/Sydney" | "Pacific/Chuuk" | "Pacific/Guam" | "Pacific/Port_Moresby" | "Pacific/Saipan" | "Australia/Lord_Howe" | "Antarctica/Casey" | "Asia/Magadan" | "Asia/Sakhalin" | "Asia/Srednekolymsk" | "Pacific/Bougainville" | "Pacific/Efate" | "Pacific/Guadalcanal" | "Pacific/Kosrae" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pohnpei" | "Antarctica/McMurdo" | "Asia/Anadyr" | "Asia/Kamchatka" | "Pacific/Auckland" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Nauru" | "Pacific/Tarawa" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Chatham" | "Pacific/Apia" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Tongatapu" | "Pacific/Kiritimati";
|
|
@@ -514,7 +622,7 @@ type IncomingWebhookTrigger<Args> = IncomingWebhookTrigger$1 & {
|
|
|
514
622
|
declare function incomingWebhookTrigger<T extends IncomingWebhookRequest>(): IncomingWebhookTrigger<IncomingWebhookArgs<T>>;
|
|
515
623
|
//#endregion
|
|
516
624
|
//#region src/configure/services/executor/trigger/index.d.ts
|
|
517
|
-
type Trigger<Args> =
|
|
625
|
+
type Trigger<Args> = TailorDBTrigger<Args> | ResolverExecutedTrigger<Args> | ScheduleTrigger<Args> | IncomingWebhookTrigger<Args> | IdpUserTrigger<Args> | AuthAccessTokenTrigger<Args>;
|
|
518
626
|
//#endregion
|
|
519
627
|
//#region src/configure/services/executor/executor.d.ts
|
|
520
628
|
/**
|
|
@@ -634,6 +742,10 @@ declare function defineIdp<const TClients extends string[]>(name: string, config
|
|
|
634
742
|
read?: boolean | undefined;
|
|
635
743
|
sendPasswordResetEmail?: boolean | undefined;
|
|
636
744
|
} | undefined;
|
|
745
|
+
readonly emailConfig?: {
|
|
746
|
+
fromName?: string | undefined;
|
|
747
|
+
passwordResetSubject?: string | undefined;
|
|
748
|
+
} | undefined;
|
|
637
749
|
readonly clients: TClients;
|
|
638
750
|
} & IdpDefinitionBrand;
|
|
639
751
|
//#endregion
|
|
@@ -664,12 +776,12 @@ declare function defineGenerators(...configs: GeneratorConfig[]): (["@tailor-pla
|
|
|
664
776
|
id: string;
|
|
665
777
|
description: string;
|
|
666
778
|
dependencies: ("executor" | "tailordb" | "resolver")[];
|
|
667
|
-
aggregate: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod.ZodAny>;
|
|
668
|
-
processType?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
|
|
669
|
-
processResolver?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
|
|
670
|
-
processExecutor?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
|
|
671
|
-
processTailorDBNamespace?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
|
|
672
|
-
processResolverNamespace?: zod_v4_core0.$InferInnerFunctionType<zod_v4_core0.$ZodFunctionArgs, zod_v4_core0.$ZodFunctionOut> | undefined;
|
|
779
|
+
aggregate: _$zod_v4_core0.$InferInnerFunctionType<_$zod_v4_core0.$ZodFunctionArgs, _$zod.ZodAny>;
|
|
780
|
+
processType?: _$zod_v4_core0.$InferInnerFunctionType<_$zod_v4_core0.$ZodFunctionArgs, _$zod_v4_core0.$ZodFunctionOut> | undefined;
|
|
781
|
+
processResolver?: _$zod_v4_core0.$InferInnerFunctionType<_$zod_v4_core0.$ZodFunctionArgs, _$zod_v4_core0.$ZodFunctionOut> | undefined;
|
|
782
|
+
processExecutor?: _$zod_v4_core0.$InferInnerFunctionType<_$zod_v4_core0.$ZodFunctionArgs, _$zod_v4_core0.$ZodFunctionOut> | undefined;
|
|
783
|
+
processTailorDBNamespace?: _$zod_v4_core0.$InferInnerFunctionType<_$zod_v4_core0.$ZodFunctionArgs, _$zod_v4_core0.$ZodFunctionOut> | undefined;
|
|
784
|
+
processResolverNamespace?: _$zod_v4_core0.$InferInnerFunctionType<_$zod_v4_core0.$ZodFunctionArgs, _$zod_v4_core0.$ZodFunctionOut> | undefined;
|
|
673
785
|
})[];
|
|
674
786
|
/**
|
|
675
787
|
* Define plugins to be used with the Tailor SDK.
|
|
@@ -684,6 +796,7 @@ declare function definePlugins(...configs: Plugin<any, any>[]): Plugin<any, any>
|
|
|
684
796
|
type TailorOutput<T> = output$1<T>;
|
|
685
797
|
type infer<T> = TailorOutput<T>;
|
|
686
798
|
type output<T> = TailorOutput<T>;
|
|
799
|
+
/** TailorDB field type builders. */
|
|
687
800
|
declare const t: {
|
|
688
801
|
uuid: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
|
|
689
802
|
type: "uuid";
|
|
@@ -757,5 +870,5 @@ declare namespace t {
|
|
|
757
870
|
type infer<T> = TailorOutput<T>;
|
|
758
871
|
}
|
|
759
872
|
//#endregion
|
|
760
|
-
export {
|
|
761
|
-
//# sourceMappingURL=index-
|
|
873
|
+
export { createWorkflow as $, ResolverExecutedArgs as A, idpUserUpdatedTrigger as B, IdpUserCreatedArgs as C, RecordCreatedArgs as D, IdpUserUpdatedArgs as E, authAccessTokenRevokedTrigger as F, resolverExecutedTrigger as G, recordDeletedTrigger as H, authAccessTokenTrigger as I, Operation as J, FunctionOperation as K, idpUserCreatedTrigger as L, TailorDBTrigger as M, authAccessTokenIssuedTrigger as N, RecordDeletedArgs as O, authAccessTokenRefreshedTrigger as P, WorkflowConfig as Q, idpUserDeletedTrigger as R, IdpUserArgs as S, IdpUserTrigger as T, recordTrigger as U, recordCreatedTrigger as V, recordUpdatedTrigger as W, WorkflowOperation as X, WebhookOperation as Y, Workflow as Z, AuthAccessTokenArgs as _, defineGenerators as a, createWorkflowJob as at, AuthAccessTokenRevokedArgs as b, createExecutor as c, AuthInvoker as ct, IncomingWebhookRequest as d, WORKFLOW_TEST_ENV_KEY as et, IncomingWebhookTrigger as f, scheduleTrigger as g, ScheduleTrigger as h, defineConfig as i, WorkflowJobOutput as it, ResolverExecutedTrigger as j, RecordUpdatedArgs as k, Trigger as l, defineAuth as lt, ScheduleArgs as m, output as n, WorkflowJobContext as nt, definePlugins as o, QueryType as ot, incomingWebhookTrigger as p, GqlOperation as q, t as r, WorkflowJobInput as rt, defineIdp as s, createResolver as st, infer as t, WorkflowJob as tt, IncomingWebhookArgs as u, AuthAccessTokenIssuedArgs as v, IdpUserDeletedArgs as w, AuthAccessTokenTrigger as x, AuthAccessTokenRefreshedArgs as y, idpUserTrigger as z };
|
|
874
|
+
//# sourceMappingURL=index-DlivLpTN.d.mts.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as Plugin } from "./plugin-
|
|
2
|
+
import { n as Plugin } from "./plugin-DQqzlulP.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/builtin/file-utils/index.d.ts
|
|
5
|
+
/** Unique identifier for the file utilities generator plugin. */
|
|
5
6
|
declare const FileUtilsGeneratorID = "@tailor-platform/file-utils";
|
|
6
7
|
type FileUtilsPluginOptions = {
|
|
7
8
|
distPath: string;
|
|
@@ -15,4 +16,4 @@ type FileUtilsPluginOptions = {
|
|
|
15
16
|
declare function fileUtilsPlugin(options: FileUtilsPluginOptions): Plugin<unknown, FileUtilsPluginOptions>;
|
|
16
17
|
//#endregion
|
|
17
18
|
export { fileUtilsPlugin as n, FileUtilsGeneratorID as t };
|
|
18
|
-
//# sourceMappingURL=index-
|
|
19
|
+
//# sourceMappingURL=index-mAV9kYJA.d.mts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
import "./chunk-COzJYswC.mjs";
|
|
3
2
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
4
3
|
|
|
5
4
|
//#region src/cli/telemetry/interceptor.ts
|
|
@@ -32,4 +31,4 @@ function createTracingInterceptor() {
|
|
|
32
31
|
|
|
33
32
|
//#endregion
|
|
34
33
|
export { createTracingInterceptor };
|
|
35
|
-
//# sourceMappingURL=interceptor-
|
|
34
|
+
//# sourceMappingURL=interceptor-f7slMkCC.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interceptor-
|
|
1
|
+
{"version":3,"file":"interceptor-f7slMkCC.mjs","names":[],"sources":["../src/cli/telemetry/interceptor.ts"],"sourcesContent":["import { trace, SpanStatusCode } from \"@opentelemetry/api\";\nimport type { Interceptor } from \"@connectrpc/connect\";\n\n/**\n * Create a Connect-RPC interceptor that records OTLP spans for each RPC call.\n * When no TracerProvider is registered, the OTel API automatically provides\n * noop spans with zero overhead.\n * @returns Tracing interceptor\n */\nexport function createTracingInterceptor(): Interceptor {\n return (next) => async (req) => {\n const tracer = trace.getTracer(\"tailor-sdk\");\n\n return tracer.startActiveSpan(`rpc.${req.method.name}`, async (span) => {\n span.setAttribute(\"rpc.method\", req.method.name);\n span.setAttribute(\"rpc.service\", \"OperatorService\");\n span.setAttribute(\"rpc.system\", \"connect-rpc\");\n\n try {\n const response = await next(req);\n span.setStatus({ code: SpanStatusCode.OK });\n return response;\n } catch (error) {\n span.setStatus({ code: SpanStatusCode.ERROR });\n if (error instanceof Error) {\n span.recordException(error);\n }\n throw error;\n } finally {\n span.end();\n }\n });\n };\n}\n"],"mappings":";;;;;;;;;;AASA,SAAgB,2BAAwC;AACtD,SAAQ,SAAS,OAAO,QAAQ;AAG9B,SAFe,MAAM,UAAU,aAAa,CAE9B,gBAAgB,OAAO,IAAI,OAAO,QAAQ,OAAO,SAAS;AACtE,QAAK,aAAa,cAAc,IAAI,OAAO,KAAK;AAChD,QAAK,aAAa,eAAe,kBAAkB;AACnD,QAAK,aAAa,cAAc,cAAc;AAE9C,OAAI;IACF,MAAM,WAAW,MAAM,KAAK,IAAI;AAChC,SAAK,UAAU,EAAE,MAAM,eAAe,IAAI,CAAC;AAC3C,WAAO;YACA,OAAO;AACd,SAAK,UAAU,EAAE,MAAM,eAAe,OAAO,CAAC;AAC9C,QAAI,iBAAiB,MACnB,MAAK,gBAAgB,MAAM;AAE7B,UAAM;aACE;AACR,SAAK,KAAK;;IAEZ"}
|
package/dist/kysely/index.d.mts
CHANGED
|
@@ -4,6 +4,10 @@ import { ColumnType, ColumnType as ColumnType$1, Insertable, Insertable as Inser
|
|
|
4
4
|
|
|
5
5
|
//#region src/kysely/index.d.ts
|
|
6
6
|
type Timestamp = ColumnType$1<Date, Date | string, Date | string>;
|
|
7
|
+
type ResolveSelect<T> = T extends ColumnType$1<infer S, unknown, unknown> ? S : T;
|
|
8
|
+
type ResolveInsert<T> = T extends ColumnType$1<unknown, infer I, unknown> ? I : T;
|
|
9
|
+
type ResolveUpdate<T> = T extends ColumnType$1<unknown, unknown, infer U> ? U : T;
|
|
10
|
+
type ObjectColumnType<T> = ColumnType$1<{ [K in keyof T]-?: Exclude<ResolveSelect<T[K]>, undefined> }, { [K in keyof T]: ResolveInsert<T[K]> }, { [K in keyof T]: ResolveUpdate<T[K]> }>;
|
|
7
11
|
type Generated<T> = T extends ColumnType$1<infer S, infer I, infer U> ? ColumnType$1<S, I | undefined, U> : ColumnType$1<T, T | undefined, T>;
|
|
8
12
|
type Serial<T = string | number> = ColumnType$1<T, never, never>;
|
|
9
13
|
type TailordbKysely<DB> = Kysely$1<DB>;
|
|
@@ -20,5 +24,5 @@ type NamespaceInsertable<NS, T extends NamespaceTableName<NS>> = Insertable$1<Na
|
|
|
20
24
|
type NamespaceSelectable<NS, T extends NamespaceTableName<NS>> = Selectable$1<NamespaceTable<NS, T>>;
|
|
21
25
|
type NamespaceUpdateable<NS, T extends NamespaceTableName<NS>> = Updateable$1<NamespaceTable<NS, T>>;
|
|
22
26
|
//#endregion
|
|
23
|
-
export { type ColumnType, Generated, type Insertable, Kysely, type KyselyConfig, NamespaceDB, NamespaceInsertable, NamespaceSelectable, NamespaceTable, NamespaceTableName, NamespaceTransaction, NamespaceUpdateable, type Selectable, Serial, TailordbDialect, TailordbKysely, Timestamp, type Transaction, type Updateable, createGetDB, sql };
|
|
27
|
+
export { type ColumnType, Generated, type Insertable, Kysely, type KyselyConfig, NamespaceDB, NamespaceInsertable, NamespaceSelectable, NamespaceTable, NamespaceTableName, NamespaceTransaction, NamespaceUpdateable, ObjectColumnType, type Selectable, Serial, TailordbDialect, TailordbKysely, Timestamp, type Transaction, type Updateable, createGetDB, sql };
|
|
24
28
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/kysely/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["Kysely","TailordbDialect"],"sources":["../../src/kysely/index.ts"],"sourcesContent":["/**\n * Kysely integration module for generated TailorDB code.\n *\n * Re-exports kysely and function-kysely-tailordb types through a single import path\n * to avoid phantom dependency issues with pnpm, and provides namespace-aware\n * utility types and factory functions used by the code generator.\n */\n\nimport { TailordbDialect } from \"@tailor-platform/function-kysely-tailordb\";\nimport {\n type ColumnType,\n Kysely,\n type Insertable,\n type KyselyConfig,\n type Selectable,\n sql,\n type Transaction as KyselyTransaction,\n type Updateable,\n} from \"kysely\";\n\nexport {\n type ColumnType,\n Kysely,\n type KyselyConfig,\n type Transaction,\n type Insertable,\n type Selectable,\n sql,\n type Updateable,\n} from \"kysely\";\n\nexport { TailordbDialect } from \"@tailor-platform/function-kysely-tailordb\";\n\nexport type Timestamp = ColumnType<Date, Date | string, Date | string>;\nexport type Generated<T> =\n T extends ColumnType<infer S, infer I, infer U>\n ? ColumnType<S, I | undefined, U>\n : ColumnType<T, T | undefined, T>;\nexport type Serial<T = string | number> = ColumnType<T, never, never>;\n\nexport type TailordbKysely<DB> = Kysely<DB>;\nexport type NamespaceDB<NS, N extends keyof NS = keyof NS> = TailordbKysely<NS[N]>;\n\n/**\n * Create a namespace-aware getDB function for generated code.\n * @returns A getDB function that creates Kysely instances for specific namespaces\n */\nexport function createGetDB<NS>() {\n return function getDB<const N extends keyof NS & string>(\n namespace: N,\n config?: Omit<KyselyConfig, \"dialect\">,\n ): TailordbKysely<NS[N]> {\n const client = new tailordb.Client({ namespace });\n return new Kysely<NS[N]>({\n dialect: new TailordbDialect(client),\n ...config,\n });\n };\n}\n\nexport type NamespaceTransaction<NS, K extends keyof NS | TailordbKysely<NS[keyof NS]> = keyof NS> =\n K extends TailordbKysely<infer DB>\n ? KyselyTransaction<DB>\n : K extends keyof NS\n ? KyselyTransaction<NS[K]>\n : never;\n\nexport type NamespaceTableName<NS> = {\n [N in keyof NS]: keyof NS[N];\n}[keyof NS];\n\nexport type NamespaceTable<NS, T extends NamespaceTableName<NS>> = {\n [N in keyof NS]: T extends keyof NS[N] ? NS[N][T] : never;\n}[keyof NS];\n\nexport type NamespaceInsertable<NS, T extends NamespaceTableName<NS>> = Insertable<\n NamespaceTable<NS, T>\n>;\nexport type NamespaceSelectable<NS, T extends NamespaceTableName<NS>> = Selectable<\n NamespaceTable<NS, T>\n>;\nexport type NamespaceUpdateable<NS, T extends NamespaceTableName<NS>> = Updateable<\n NamespaceTable<NS, T>\n>;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["Kysely","TailordbDialect"],"sources":["../../src/kysely/index.ts"],"sourcesContent":["/**\n * Kysely integration module for generated TailorDB code.\n *\n * Re-exports kysely and function-kysely-tailordb types through a single import path\n * to avoid phantom dependency issues with pnpm, and provides namespace-aware\n * utility types and factory functions used by the code generator.\n */\n\nimport { TailordbDialect } from \"@tailor-platform/function-kysely-tailordb\";\nimport {\n type ColumnType,\n Kysely,\n type Insertable,\n type KyselyConfig,\n type Selectable,\n sql,\n type Transaction as KyselyTransaction,\n type Updateable,\n} from \"kysely\";\n\nexport {\n type ColumnType,\n Kysely,\n type KyselyConfig,\n type Transaction,\n type Insertable,\n type Selectable,\n sql,\n type Updateable,\n} from \"kysely\";\n\nexport { TailordbDialect } from \"@tailor-platform/function-kysely-tailordb\";\n\nexport type Timestamp = ColumnType<Date, Date | string, Date | string>;\ntype ResolveSelect<T> = T extends ColumnType<infer S, unknown, unknown> ? S : T;\ntype ResolveInsert<T> = T extends ColumnType<unknown, infer I, unknown> ? I : T;\ntype ResolveUpdate<T> = T extends ColumnType<unknown, unknown, infer U> ? U : T;\nexport type ObjectColumnType<T> = ColumnType<\n { [K in keyof T]-?: Exclude<ResolveSelect<T[K]>, undefined> },\n { [K in keyof T]: ResolveInsert<T[K]> },\n { [K in keyof T]: ResolveUpdate<T[K]> }\n>;\nexport type Generated<T> =\n T extends ColumnType<infer S, infer I, infer U>\n ? ColumnType<S, I | undefined, U>\n : ColumnType<T, T | undefined, T>;\nexport type Serial<T = string | number> = ColumnType<T, never, never>;\n\nexport type TailordbKysely<DB> = Kysely<DB>;\nexport type NamespaceDB<NS, N extends keyof NS = keyof NS> = TailordbKysely<NS[N]>;\n\n/**\n * Create a namespace-aware getDB function for generated code.\n * @returns A getDB function that creates Kysely instances for specific namespaces\n */\nexport function createGetDB<NS>() {\n return function getDB<const N extends keyof NS & string>(\n namespace: N,\n config?: Omit<KyselyConfig, \"dialect\">,\n ): TailordbKysely<NS[N]> {\n const client = new tailordb.Client({ namespace });\n return new Kysely<NS[N]>({\n dialect: new TailordbDialect(client),\n ...config,\n });\n };\n}\n\nexport type NamespaceTransaction<NS, K extends keyof NS | TailordbKysely<NS[keyof NS]> = keyof NS> =\n K extends TailordbKysely<infer DB>\n ? KyselyTransaction<DB>\n : K extends keyof NS\n ? KyselyTransaction<NS[K]>\n : never;\n\nexport type NamespaceTableName<NS> = {\n [N in keyof NS]: keyof NS[N];\n}[keyof NS];\n\nexport type NamespaceTable<NS, T extends NamespaceTableName<NS>> = {\n [N in keyof NS]: T extends keyof NS[N] ? NS[N][T] : never;\n}[keyof NS];\n\nexport type NamespaceInsertable<NS, T extends NamespaceTableName<NS>> = Insertable<\n NamespaceTable<NS, T>\n>;\nexport type NamespaceSelectable<NS, T extends NamespaceTableName<NS>> = Selectable<\n NamespaceTable<NS, T>\n>;\nexport type NamespaceUpdateable<NS, T extends NamespaceTableName<NS>> = Updateable<\n NamespaceTable<NS, T>\n>;\n"],"mappings":";;;;;;;;;;;;;;;;AAuDA,SAAgB,cAAkB;AAChC,QAAO,SAAS,MACd,WACA,QACuB;AAEvB,SAAO,IAAIA,SAAc;GACvB,SAAS,IAAIC,kBAFA,IAAI,SAAS,OAAO,EAAE,WAAW,CAAC,CAEX;GACpC,GAAG;GACJ,CAAC"}
|
|
@@ -28,11 +28,13 @@ function getNestedType(fieldConfig) {
|
|
|
28
28
|
Serial: false
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
const fieldResults = Object.entries(fields).map(([fieldName,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
const fieldResults = Object.entries(fields).map(([fieldName, config]) => {
|
|
32
|
+
const result = generateFieldType(config);
|
|
33
|
+
return {
|
|
34
|
+
fieldType: `${fieldName}${config.required !== true ? "?" : ""}: ${result.type}`,
|
|
35
|
+
usedUtilityTypes: result.usedUtilityTypes
|
|
36
|
+
};
|
|
37
|
+
});
|
|
36
38
|
const aggregatedUtilityTypes = fieldResults.reduce((acc, result) => ({
|
|
37
39
|
Timestamp: acc.Timestamp || result.usedUtilityTypes.Timestamp,
|
|
38
40
|
Serial: acc.Serial || result.usedUtilityTypes.Serial
|
|
@@ -40,8 +42,15 @@ function getNestedType(fieldConfig) {
|
|
|
40
42
|
Timestamp: false,
|
|
41
43
|
Serial: false
|
|
42
44
|
});
|
|
45
|
+
const fieldTypes = fieldResults.map((r) => r.fieldType);
|
|
46
|
+
const obj = `{\n ${fieldTypes.join(";\n ")}${fieldTypes.length > 0 ? ";" : ""}\n}`;
|
|
47
|
+
const hasOptionalFields = Object.values(fields).some((config) => config.required !== true);
|
|
48
|
+
if (aggregatedUtilityTypes.Timestamp || hasOptionalFields) return {
|
|
49
|
+
type: `ObjectColumnType<${obj}>`,
|
|
50
|
+
usedUtilityTypes: aggregatedUtilityTypes
|
|
51
|
+
};
|
|
43
52
|
return {
|
|
44
|
-
type:
|
|
53
|
+
type: obj,
|
|
45
54
|
usedUtilityTypes: aggregatedUtilityTypes
|
|
46
55
|
};
|
|
47
56
|
}
|
|
@@ -168,6 +177,7 @@ function generateUnifiedKyselyTypes(namespaceData) {
|
|
|
168
177
|
});
|
|
169
178
|
const utilityTypeImports = ["type Generated"];
|
|
170
179
|
if (globalUsedUtilityTypes.Timestamp) utilityTypeImports.push("type Timestamp");
|
|
180
|
+
if (namespaceData.some((ns) => ns.types.some((t) => t.typeDef.includes("ObjectColumnType<")))) utilityTypeImports.push("type ObjectColumnType");
|
|
171
181
|
if (globalUsedUtilityTypes.Serial) utilityTypeImports.push("type Serial");
|
|
172
182
|
return [
|
|
173
183
|
ml`
|
|
@@ -209,6 +219,7 @@ function generateUnifiedKyselyTypes(namespaceData) {
|
|
|
209
219
|
|
|
210
220
|
//#endregion
|
|
211
221
|
//#region src/plugin/builtin/kysely-type/index.ts
|
|
222
|
+
/** Unique identifier for the Kysely type generator plugin. */
|
|
212
223
|
const KyselyGeneratorID = "@tailor-platform/kysely-type";
|
|
213
224
|
/**
|
|
214
225
|
* Plugin that generates Kysely type definitions for TailorDB types.
|
|
@@ -258,4 +269,4 @@ function kyselyTypePlugin(options) {
|
|
|
258
269
|
|
|
259
270
|
//#endregion
|
|
260
271
|
export { kyselyTypePlugin as n, KyselyGeneratorID as t };
|
|
261
|
-
//# sourceMappingURL=kysely-type-
|
|
272
|
+
//# sourceMappingURL=kysely-type-BwMqaL3z.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kysely-type-BwMqaL3z.mjs","names":[],"sources":["../src/plugin/builtin/kysely-type/type-processor.ts","../src/plugin/builtin/kysely-type/index.ts"],"sourcesContent":["import multiline from \"multiline-ts\";\nimport { type KyselyNamespaceMetadata, type KyselyTypeMetadata } from \"./types\";\nimport type { OperatorFieldConfig, TailorDBType } from \"@/types/tailordb\";\n\ntype UsedUtilityTypes = { Timestamp: boolean; Serial: boolean };\n\ntype FieldTypeResult = {\n type: string;\n usedUtilityTypes: UsedUtilityTypes;\n};\n\n/**\n * Get the enum type definition.\n * @param fieldConfig - The field configuration\n * @returns The enum type as a string union\n */\nfunction getEnumType(fieldConfig: OperatorFieldConfig): string {\n const allowedValues = fieldConfig.allowedValues;\n\n if (allowedValues && Array.isArray(allowedValues)) {\n return allowedValues\n .map((v: string | { value: string }) => {\n const value = typeof v === \"string\" ? v : v.value;\n return `\"${value}\"`;\n })\n .join(\" | \");\n }\n return \"string\";\n}\n\n/**\n * Get the nested object type definition.\n * @param fieldConfig - The field configuration\n * @returns The nested type with used utility types\n */\nfunction getNestedType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const fields = fieldConfig.fields;\n if (!fields || typeof fields !== \"object\") {\n return {\n type: \"string\",\n usedUtilityTypes: { Timestamp: false, Serial: false },\n };\n }\n\n const fieldResults = Object.entries(fields).map(([fieldName, config]) => {\n const result = generateFieldType(config);\n const optional = config.required !== true ? \"?\" : \"\";\n return {\n fieldType: `${fieldName}${optional}: ${result.type}`,\n usedUtilityTypes: result.usedUtilityTypes,\n };\n });\n\n const aggregatedUtilityTypes = fieldResults.reduce(\n (acc, result) => ({\n Timestamp: acc.Timestamp || result.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || result.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const fieldTypes = fieldResults.map((r) => r.fieldType);\n const obj = `{\\n ${fieldTypes.join(\";\\n \")}${fieldTypes.length > 0 ? \";\" : \"\"}\\n}`;\n\n const hasOptionalFields = Object.values(fields).some((config) => config.required !== true);\n if (aggregatedUtilityTypes.Timestamp || hasOptionalFields) {\n return { type: `ObjectColumnType<${obj}>`, usedUtilityTypes: aggregatedUtilityTypes };\n }\n return { type: obj, usedUtilityTypes: aggregatedUtilityTypes };\n}\n\n/**\n * Get the base Kysely type for a field (without array/null modifiers).\n * @param fieldConfig - The field configuration\n * @returns The base type with used utility types\n */\nfunction getBaseType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const fieldType = fieldConfig.type;\n const usedUtilityTypes = { Timestamp: false, Serial: false };\n\n let type: string;\n switch (fieldType) {\n case \"uuid\":\n case \"string\":\n case \"decimal\":\n type = \"string\";\n break;\n case \"integer\":\n case \"float\":\n type = \"number\";\n break;\n case \"date\":\n case \"datetime\":\n usedUtilityTypes.Timestamp = true;\n type = \"Timestamp\";\n break;\n case \"bool\":\n case \"boolean\":\n type = \"boolean\";\n break;\n case \"enum\":\n type = getEnumType(fieldConfig);\n break;\n case \"nested\": {\n const nestedResult = getNestedType(fieldConfig);\n return nestedResult;\n }\n default:\n type = \"string\";\n break;\n }\n\n return { type, usedUtilityTypes };\n}\n\n/**\n * Generate the complete field type including array and null modifiers.\n * @param fieldConfig - The field configuration\n * @returns The complete field type with used utility types\n */\nfunction generateFieldType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const baseTypeResult = getBaseType(fieldConfig);\n const usedUtilityTypes = { ...baseTypeResult.usedUtilityTypes };\n\n const isArray = fieldConfig.array === true;\n const isNullable = fieldConfig.required !== true;\n\n let finalType = baseTypeResult.type;\n if (isArray) {\n // Wrap enum types in parentheses before adding array suffix\n const needsParens = fieldConfig.type === \"enum\";\n finalType = needsParens ? `(${baseTypeResult.type})[]` : `${baseTypeResult.type}[]`;\n }\n if (isNullable) {\n finalType = `${finalType} | null`;\n }\n\n if (fieldConfig.serial) {\n usedUtilityTypes.Serial = true;\n finalType = `Serial<${finalType}>`;\n }\n if (fieldConfig.hooks?.create) {\n finalType = `Generated<${finalType}>`;\n }\n\n return { type: finalType, usedUtilityTypes };\n}\n\n/**\n * Generate the table interface.\n * @param type - The parsed TailorDB type\n * @returns The type definition and used utility types\n */\nfunction generateTableInterface(type: TailorDBType): {\n typeDef: string;\n usedUtilityTypes: UsedUtilityTypes;\n} {\n const fieldEntries = Object.entries(type.fields).filter(([fieldName]) => fieldName !== \"id\");\n\n const fieldResults = fieldEntries.map(([fieldName, parsedField]) => ({\n fieldName,\n ...generateFieldType(parsedField.config),\n }));\n\n const fields = [\n \"id: Generated<string>;\",\n ...fieldResults.map((result) => `${result.fieldName}: ${result.type};`),\n ];\n\n const aggregatedUtilityTypes = fieldResults.reduce(\n (acc, result) => ({\n Timestamp: acc.Timestamp || result.usedUtilityTypes.Timestamp,\n\n Serial: acc.Serial || result.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const typeDef = multiline /* ts */ `\n ${type.name}: {\n ${fields.join(\"\\n\")}\n }\n `;\n\n return { typeDef, usedUtilityTypes: aggregatedUtilityTypes };\n}\n\n/**\n * Convert a TailorDBType into KyselyTypeMetadata.\n * @param type - Parsed TailorDB type\n * @returns Generated Kysely type metadata\n */\nexport async function processKyselyType(type: TailorDBType): Promise<KyselyTypeMetadata> {\n const result = generateTableInterface(type);\n\n return {\n name: type.name,\n typeDef: result.typeDef,\n usedUtilityTypes: result.usedUtilityTypes,\n };\n}\n\n/**\n * Generate unified types file from multiple namespaces.\n * @param namespaceData - Namespace metadata\n * @returns Generated types file contents\n */\nexport function generateUnifiedKyselyTypes(namespaceData: KyselyNamespaceMetadata[]): string {\n if (namespaceData.length === 0) {\n return \"\";\n }\n\n // Aggregate used utility types from all namespaces\n const globalUsedUtilityTypes = namespaceData.reduce(\n (acc, ns) => ({\n Timestamp: acc.Timestamp || ns.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || ns.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const utilityTypeImports: string[] = [\"type Generated\"];\n if (globalUsedUtilityTypes.Timestamp) {\n utilityTypeImports.push(\"type Timestamp\");\n }\n const hasObjectColumnType = namespaceData.some((ns) =>\n ns.types.some((t) => t.typeDef.includes(\"ObjectColumnType<\")),\n );\n if (hasObjectColumnType) {\n utilityTypeImports.push(\"type ObjectColumnType\");\n }\n if (globalUsedUtilityTypes.Serial) {\n utilityTypeImports.push(\"type Serial\");\n }\n\n const importsSection = multiline /* ts */ `\n import {\n createGetDB,\n ${utilityTypeImports.join(\",\\n\")},\n type NamespaceDB,\n type NamespaceInsertable,\n type NamespaceSelectable,\n type NamespaceTable,\n type NamespaceTableName,\n type NamespaceTransaction,\n type NamespaceUpdateable,\n } from \"@tailor-platform/sdk/kysely\";\n `;\n\n // Generate Namespace interface with multiple namespaces\n const namespaceInterfaces = namespaceData\n .map(({ namespace, types }) => {\n const typeDefsWithIndent = types\n .map((type) => {\n return type.typeDef\n .split(\"\\n\")\n .map((line) => (line.trim() ? ` ${line}` : \"\"))\n .join(\"\\n\");\n })\n .join(\"\\n\\n\");\n\n return ` \"${namespace}\": {\\n${typeDefsWithIndent}\\n }`;\n })\n .join(\",\\n\");\n\n const namespaceInterface = `export interface Namespace {\\n${namespaceInterfaces}\\n}`;\n\n const getDBFunction = multiline /* ts */ `\n export const getDB = createGetDB<Namespace>();\n\n export type DB<N extends keyof Namespace = keyof Namespace> = NamespaceDB<Namespace, N>;\n `;\n\n const utilityTypeExports = multiline /* ts */ `\n export type Transaction<K extends keyof Namespace | DB = keyof Namespace> =\n NamespaceTransaction<Namespace, K>;\n\n type TableName = NamespaceTableName<Namespace>;\n export type Table<T extends TableName> = NamespaceTable<Namespace, T>;\n\n export type Insertable<T extends TableName> = NamespaceInsertable<Namespace, T>;\n export type Selectable<T extends TableName> = NamespaceSelectable<Namespace, T>;\n export type Updateable<T extends TableName> = NamespaceUpdateable<Namespace, T>;\n `;\n\n return (\n [importsSection, namespaceInterface, getDBFunction, utilityTypeExports].join(\"\\n\\n\") + \"\\n\"\n );\n}\n","import { processKyselyType, generateUnifiedKyselyTypes } from \"./type-processor\";\nimport type { KyselyTypeMetadata, KyselyNamespaceMetadata } from \"./types\";\nimport type { Plugin } from \"@/types/plugin\";\nimport type { GeneratorResult, TailorDBReadyContext } from \"@/types/plugin-generation\";\n\n/** Unique identifier for the Kysely type generator plugin. */\nexport const KyselyGeneratorID = \"@tailor-platform/kysely-type\";\n\ntype KyselyTypePluginOptions = {\n distPath: string;\n};\n\n/**\n * Plugin that generates Kysely type definitions for TailorDB types.\n * @param options - Plugin options\n * @param options.distPath - Output file path for generated types\n * @returns Plugin instance with onTailorDBReady hook\n */\nexport function kyselyTypePlugin(\n options: KyselyTypePluginOptions,\n): Plugin<unknown, KyselyTypePluginOptions> {\n return {\n id: KyselyGeneratorID,\n description: \"Generates Kysely type definitions for TailorDB types\",\n pluginConfig: options,\n\n async onTailorDBReady(\n ctx: TailorDBReadyContext<KyselyTypePluginOptions>,\n ): Promise<GeneratorResult> {\n const allNamespaceData: KyselyNamespaceMetadata[] = [];\n\n for (const ns of ctx.tailordb) {\n const typeMetadataList: KyselyTypeMetadata[] = [];\n\n for (const type of Object.values(ns.types)) {\n const metadata = await processKyselyType(type);\n typeMetadataList.push(metadata);\n }\n\n if (typeMetadataList.length === 0) continue;\n\n const usedUtilityTypes = typeMetadataList.reduce(\n (acc, type) => ({\n Timestamp: acc.Timestamp || type.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || type.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n allNamespaceData.push({\n namespace: ns.namespace,\n types: typeMetadataList,\n usedUtilityTypes,\n });\n }\n\n const files: GeneratorResult[\"files\"] = [];\n if (allNamespaceData.length > 0) {\n const content = generateUnifiedKyselyTypes(allNamespaceData);\n files.push({\n path: ctx.pluginConfig.distPath,\n content,\n });\n }\n\n return { files };\n },\n };\n}\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-json-
|
|
1
|
+
{"version":3,"file":"package-json-CfUqjJaQ.mjs","names":[],"sources":["../src/cli/shared/package-json.ts"],"sourcesContent":["import { readPackageJSON, type PackageJson } from \"pkg-types\";\n\nlet packageJson: PackageJson | null = null;\n\n/**\n * Read and cache the package.json of the SDK package.\n * @returns Parsed package.json contents\n */\nexport async function readPackageJson() {\n if (packageJson) {\n return packageJson;\n }\n packageJson = await readPackageJSON(import.meta.url);\n return packageJson;\n}\n"],"mappings":";;;;AAEA,IAAI,cAAkC;;;;;AAMtC,eAAsB,kBAAkB;AACtC,KAAI,YACF,QAAO;AAET,eAAc,MAAM,gBAAgB,OAAO,KAAK,IAAI;AACpD,QAAO"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../index-
|
|
2
|
+
import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../index-BM2SqNfO.mjs";
|
|
3
3
|
export { EnumConstantsGeneratorID, enumConstantsPlugin };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
import "../../../
|
|
3
|
-
import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../enum-constants-CkKARYb7.mjs";
|
|
2
|
+
import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../enum-constants-DI85-fPE.mjs";
|
|
4
3
|
|
|
5
4
|
export { EnumConstantsGeneratorID, enumConstantsPlugin };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../index-
|
|
2
|
+
import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../index-mAV9kYJA.mjs";
|
|
3
3
|
export { FileUtilsGeneratorID, fileUtilsPlugin };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
import "../../../
|
|
3
|
-
import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../file-utils-D2TxR_kj.mjs";
|
|
2
|
+
import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../file-utils-C4rXlOVt.mjs";
|
|
4
3
|
|
|
5
4
|
export { FileUtilsGeneratorID, fileUtilsPlugin };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../index-
|
|
2
|
+
import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../index-0H-YH8Ya.mjs";
|
|
3
3
|
export { KyselyGeneratorID, kyselyTypePlugin };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
import "../../../
|
|
3
|
-
import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../kysely-type-BK0b4Rqt.mjs";
|
|
2
|
+
import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../kysely-type-BwMqaL3z.mjs";
|
|
4
3
|
|
|
5
4
|
export { KyselyGeneratorID, kyselyTypePlugin };
|
package/dist/plugin/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { z as TailorAnyDBType } from "../plugin-
|
|
3
|
-
import { n as TailorEnv, r as TailorActor } from "../env-
|
|
2
|
+
import { z as TailorAnyDBType } from "../plugin-DQqzlulP.mjs";
|
|
3
|
+
import { n as TailorEnv, r as TailorActor } from "../env-BvIWsJxg.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/plugin/with-context.d.ts
|
|
6
6
|
/**
|