@tailor-platform/sdk 1.15.2 → 1.17.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/CHANGELOG.md +46 -0
- package/dist/application-D5ZEr4zk.mjs +4 -0
- package/dist/{application-DLUgR1gv.mjs → application-DYfVZVPT.mjs} +4812 -69
- package/dist/application-DYfVZVPT.mjs.map +1 -0
- package/dist/cli/index.mjs +3 -3
- package/dist/cli/lib.d.mts +164 -30
- package/dist/cli/lib.mjs +3 -3
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/configure/index.d.mts +3 -3
- package/dist/configure/index.mjs +46 -2
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{index-Bg_UJxhL.d.mts → index-qQXpN674.d.mts} +136 -11
- package/dist/job-CULA2Pvf.mjs +51 -0
- package/dist/job-CULA2Pvf.mjs.map +1 -0
- package/dist/plugin/index.d.mts +1 -1
- package/dist/{schema-DRYB-nzA.mjs → schema-R5TxC5Pn.mjs} +143 -1
- package/dist/schema-R5TxC5Pn.mjs.map +1 -0
- package/dist/{index-pQbghcVa.d.mts → types-BeNtD-fA.d.mts} +88 -115
- package/dist/{types-BZRw-Iys.d.mts → types-DzvazVmg.d.mts} +220 -18
- package/dist/types-b-ig8nW_.mjs.map +1 -1
- package/dist/update-DQKCUNmr.mjs +10701 -0
- package/dist/update-DQKCUNmr.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +3 -3
- package/dist/utils/test/index.mjs +1 -1
- package/package.json +1 -1
- package/postinstall.mjs +2 -2
- package/dist/application-DLUgR1gv.mjs.map +0 -1
- package/dist/application-DhvHS3pX.mjs +0 -4
- package/dist/job-XiwGyFJt.mjs +0 -21
- package/dist/job-XiwGyFJt.mjs.map +0 -1
- package/dist/schema-DRYB-nzA.mjs.map +0 -1
- package/dist/update-70uX2TDG.mjs +0 -15424
- package/dist/update-70uX2TDG.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference path="./user-defined.d.ts" />
|
|
2
|
-
import { Et as TailorDBServiceInput, c as BuiltinIdP, pt as ResolverServiceInput, r as AuthConfig } from "./types-
|
|
2
|
+
import { Et as TailorDBServiceInput, c as BuiltinIdP, pt as ResolverServiceInput, r as AuthConfig } from "./types-DzvazVmg.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/parser/service/executor/schema.d.ts
|
|
@@ -170,6 +170,68 @@ type ExecutorServiceConfig = {
|
|
|
170
170
|
};
|
|
171
171
|
type ExecutorServiceInput = ExecutorServiceConfig;
|
|
172
172
|
//#endregion
|
|
173
|
+
//#region src/parser/service/workflow/types.d.ts
|
|
174
|
+
type WorkflowServiceConfig = {
|
|
175
|
+
files: string[];
|
|
176
|
+
job_files?: string[];
|
|
177
|
+
ignores?: string[];
|
|
178
|
+
job_ignores?: string[];
|
|
179
|
+
};
|
|
180
|
+
type WorkflowServiceInput = WorkflowServiceConfig;
|
|
181
|
+
//#endregion
|
|
182
|
+
//#region src/parser/generator-config/types.d.ts
|
|
183
|
+
type GeneratorConfig = z.input<typeof BaseGeneratorConfigSchema>;
|
|
184
|
+
type CodeGeneratorBase = Omit<z.output<typeof CodeGeneratorSchema>, "dependencies"> & {
|
|
185
|
+
dependencies: readonly DependencyKind[];
|
|
186
|
+
};
|
|
187
|
+
//#endregion
|
|
188
|
+
//#region src/parser/generator-config/index.d.ts
|
|
189
|
+
declare const DependencyKindSchema: z.ZodEnum<{
|
|
190
|
+
executor: "executor";
|
|
191
|
+
tailordb: "tailordb";
|
|
192
|
+
resolver: "resolver";
|
|
193
|
+
}>;
|
|
194
|
+
type DependencyKind = z.infer<typeof DependencyKindSchema>;
|
|
195
|
+
declare const CodeGeneratorSchema: z.ZodObject<{
|
|
196
|
+
id: z.ZodString;
|
|
197
|
+
description: z.ZodString;
|
|
198
|
+
dependencies: z.ZodArray<z.ZodEnum<{
|
|
199
|
+
executor: "executor";
|
|
200
|
+
tailordb: "tailordb";
|
|
201
|
+
resolver: "resolver";
|
|
202
|
+
}>>;
|
|
203
|
+
processType: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
204
|
+
processResolver: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
205
|
+
processExecutor: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
206
|
+
processTailorDBNamespace: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
207
|
+
processResolverNamespace: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
208
|
+
aggregate: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodAny>;
|
|
209
|
+
}, z.core.$strip>;
|
|
210
|
+
declare const BaseGeneratorConfigSchema: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"@tailor-platform/kysely-type">, z.ZodObject<{
|
|
211
|
+
distPath: z.ZodString;
|
|
212
|
+
}, z.core.$strip>], null>, z.ZodTuple<[z.ZodLiteral<"@tailor-platform/seed">, z.ZodObject<{
|
|
213
|
+
distPath: z.ZodString;
|
|
214
|
+
machineUserName: z.ZodOptional<z.ZodString>;
|
|
215
|
+
}, z.core.$strip>], null>, z.ZodTuple<[z.ZodLiteral<"@tailor-platform/enum-constants">, z.ZodObject<{
|
|
216
|
+
distPath: z.ZodString;
|
|
217
|
+
}, z.core.$strip>], null>, z.ZodTuple<[z.ZodLiteral<"@tailor-platform/file-utils">, z.ZodObject<{
|
|
218
|
+
distPath: z.ZodString;
|
|
219
|
+
}, z.core.$strip>], null>, z.ZodObject<{
|
|
220
|
+
id: z.ZodString;
|
|
221
|
+
description: z.ZodString;
|
|
222
|
+
dependencies: z.ZodArray<z.ZodEnum<{
|
|
223
|
+
executor: "executor";
|
|
224
|
+
tailordb: "tailordb";
|
|
225
|
+
resolver: "resolver";
|
|
226
|
+
}>>;
|
|
227
|
+
processType: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
228
|
+
processResolver: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
229
|
+
processExecutor: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
230
|
+
processTailorDBNamespace: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
231
|
+
processResolverNamespace: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
232
|
+
aggregate: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodAny>;
|
|
233
|
+
}, z.core.$strip>]>;
|
|
234
|
+
//#endregion
|
|
173
235
|
//#region src/parser/service/staticwebsite/schema.d.ts
|
|
174
236
|
declare const StaticWebsiteSchema: z.core.$ZodBranded<z.ZodObject<{
|
|
175
237
|
name: z.ZodString;
|
|
@@ -199,15 +261,6 @@ declare function defineStaticWebSite(name: string, config: Omit<StaticWebsiteInp
|
|
|
199
261
|
} & StaticWebsiteDefinitionBrand;
|
|
200
262
|
type StaticWebsiteConfig = Omit<ReturnType<typeof defineStaticWebSite>, "url">;
|
|
201
263
|
//#endregion
|
|
202
|
-
//#region src/parser/service/workflow/types.d.ts
|
|
203
|
-
type WorkflowServiceConfig = {
|
|
204
|
-
files: string[];
|
|
205
|
-
job_files?: string[];
|
|
206
|
-
ignores?: string[];
|
|
207
|
-
job_ignores?: string[];
|
|
208
|
-
};
|
|
209
|
-
type WorkflowServiceInput = WorkflowServiceConfig;
|
|
210
|
-
//#endregion
|
|
211
264
|
//#region src/parser/service/idp/schema.d.ts
|
|
212
265
|
declare const IdPSchema: z.core.$ZodBranded<z.ZodObject<{
|
|
213
266
|
name: z.ZodString;
|
|
@@ -274,123 +327,43 @@ type IdPOwnConfig = Omit<DefinedIdp<string, IdPInput, string>, "provider">;
|
|
|
274
327
|
type IdPConfig = IdPOwnConfig | IdPExternalConfig;
|
|
275
328
|
//#endregion
|
|
276
329
|
//#region src/parser/app-config/types.d.ts
|
|
330
|
+
/**
|
|
331
|
+
* Application configuration for `defineConfig()`.
|
|
332
|
+
*
|
|
333
|
+
* Key fields:
|
|
334
|
+
* - `name` (required): Application name
|
|
335
|
+
* - `cors`: Array of allowed origins, e.g. `["https://example.com"]`
|
|
336
|
+
* - `auth`: Single auth config object (not an array)
|
|
337
|
+
* - `idp`: Array of IdP configs, e.g. `[myIdp]`
|
|
338
|
+
* - `staticWebsites`: Array of static website configs, e.g. `[website]`
|
|
339
|
+
* - `db`, `resolver`, `executor`, `workflow`: Service configs with file globs
|
|
340
|
+
*/
|
|
277
341
|
interface AppConfig<Auth extends AuthConfig = AuthConfig, Idp extends IdPConfig[] = IdPConfig[], StaticWebsites extends StaticWebsiteConfig[] = StaticWebsiteConfig[], Env extends Record<string, string | number | boolean> = Record<string, string | number | boolean>> {
|
|
342
|
+
/** Application name (required). */
|
|
278
343
|
name: string;
|
|
344
|
+
/** Environment variables accessible via `context.env` in resolvers and via the second argument `{ env }` in workflow job bodies. */
|
|
279
345
|
env?: Env;
|
|
346
|
+
/** Allowed CORS origins. Must be an array of strings, e.g. `["https://example.com"]`. */
|
|
280
347
|
cors?: string[];
|
|
348
|
+
/** IP addresses allowed to access the application. */
|
|
281
349
|
allowedIpAddresses?: string[];
|
|
350
|
+
/** Disable GraphQL introspection in production. */
|
|
282
351
|
disableIntrospection?: boolean;
|
|
352
|
+
/** TailorDB service configuration with type definition files. */
|
|
283
353
|
db?: TailorDBServiceInput;
|
|
354
|
+
/** Resolver service configuration with resolver files. */
|
|
284
355
|
resolver?: ResolverServiceInput;
|
|
356
|
+
/** Identity Provider configurations. Must be an array, e.g. `[myIdp]`. */
|
|
285
357
|
idp?: Idp;
|
|
358
|
+
/** Auth configuration (single object, not an array). */
|
|
286
359
|
auth?: Auth;
|
|
360
|
+
/** Executor service configuration with executor files. */
|
|
287
361
|
executor?: ExecutorServiceInput;
|
|
362
|
+
/** Workflow service configuration with workflow files. */
|
|
288
363
|
workflow?: WorkflowServiceInput;
|
|
364
|
+
/** Static website configurations. Must be an array, e.g. `[website]`. */
|
|
289
365
|
staticWebsites?: StaticWebsites;
|
|
290
366
|
}
|
|
291
367
|
//#endregion
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
type CodeGeneratorBase = Omit<z.output<typeof CodeGeneratorSchema>, "dependencies"> & {
|
|
295
|
-
dependencies: readonly DependencyKind[];
|
|
296
|
-
};
|
|
297
|
-
//#endregion
|
|
298
|
-
//#region src/parser/generator-config/index.d.ts
|
|
299
|
-
declare const DependencyKindSchema: z.ZodEnum<{
|
|
300
|
-
executor: "executor";
|
|
301
|
-
tailordb: "tailordb";
|
|
302
|
-
resolver: "resolver";
|
|
303
|
-
}>;
|
|
304
|
-
type DependencyKind = z.infer<typeof DependencyKindSchema>;
|
|
305
|
-
declare const CodeGeneratorSchema: z.ZodObject<{
|
|
306
|
-
id: z.ZodString;
|
|
307
|
-
description: z.ZodString;
|
|
308
|
-
dependencies: z.ZodArray<z.ZodEnum<{
|
|
309
|
-
executor: "executor";
|
|
310
|
-
tailordb: "tailordb";
|
|
311
|
-
resolver: "resolver";
|
|
312
|
-
}>>;
|
|
313
|
-
processType: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
314
|
-
processResolver: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
315
|
-
processExecutor: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
316
|
-
processTailorDBNamespace: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
317
|
-
processResolverNamespace: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
318
|
-
aggregate: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodAny>;
|
|
319
|
-
}, z.core.$strip>;
|
|
320
|
-
declare const BaseGeneratorConfigSchema: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"@tailor-platform/kysely-type">, z.ZodObject<{
|
|
321
|
-
distPath: z.ZodString;
|
|
322
|
-
}, z.core.$strip>], null>, z.ZodTuple<[z.ZodLiteral<"@tailor-platform/seed">, z.ZodObject<{
|
|
323
|
-
distPath: z.ZodString;
|
|
324
|
-
machineUserName: z.ZodOptional<z.ZodString>;
|
|
325
|
-
}, z.core.$strip>], null>, z.ZodTuple<[z.ZodLiteral<"@tailor-platform/enum-constants">, z.ZodObject<{
|
|
326
|
-
distPath: z.ZodString;
|
|
327
|
-
}, z.core.$strip>], null>, z.ZodTuple<[z.ZodLiteral<"@tailor-platform/file-utils">, z.ZodObject<{
|
|
328
|
-
distPath: z.ZodString;
|
|
329
|
-
}, z.core.$strip>], null>, z.ZodObject<{
|
|
330
|
-
id: z.ZodString;
|
|
331
|
-
description: z.ZodString;
|
|
332
|
-
dependencies: z.ZodArray<z.ZodEnum<{
|
|
333
|
-
executor: "executor";
|
|
334
|
-
tailordb: "tailordb";
|
|
335
|
-
resolver: "resolver";
|
|
336
|
-
}>>;
|
|
337
|
-
processType: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
338
|
-
processResolver: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
339
|
-
processExecutor: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
340
|
-
processTailorDBNamespace: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
341
|
-
processResolverNamespace: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
342
|
-
aggregate: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodAny>;
|
|
343
|
-
}, z.core.$strip>]>;
|
|
344
|
-
/**
|
|
345
|
-
* Creates a GeneratorConfigSchema with built-in generator support
|
|
346
|
-
* @param builtinGenerators - Map of generator IDs to their constructor functions
|
|
347
|
-
* @returns Generator config schema
|
|
348
|
-
*/
|
|
349
|
-
declare function createGeneratorConfigSchema(builtinGenerators: Map<string, (options: any) => CodeGeneratorBase>): z.core.$ZodBranded<z.ZodPipe<z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"@tailor-platform/kysely-type">, z.ZodObject<{
|
|
350
|
-
distPath: z.ZodString;
|
|
351
|
-
}, z.core.$strip>], null>, z.ZodTuple<[z.ZodLiteral<"@tailor-platform/seed">, z.ZodObject<{
|
|
352
|
-
distPath: z.ZodString;
|
|
353
|
-
machineUserName: z.ZodOptional<z.ZodString>;
|
|
354
|
-
}, z.core.$strip>], null>, z.ZodTuple<[z.ZodLiteral<"@tailor-platform/enum-constants">, z.ZodObject<{
|
|
355
|
-
distPath: z.ZodString;
|
|
356
|
-
}, z.core.$strip>], null>, z.ZodTuple<[z.ZodLiteral<"@tailor-platform/file-utils">, z.ZodObject<{
|
|
357
|
-
distPath: z.ZodString;
|
|
358
|
-
}, z.core.$strip>], null>, z.ZodObject<{
|
|
359
|
-
id: z.ZodString;
|
|
360
|
-
description: z.ZodString;
|
|
361
|
-
dependencies: z.ZodArray<z.ZodEnum<{
|
|
362
|
-
executor: "executor";
|
|
363
|
-
tailordb: "tailordb";
|
|
364
|
-
resolver: "resolver";
|
|
365
|
-
}>>;
|
|
366
|
-
processType: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
367
|
-
processResolver: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
368
|
-
processExecutor: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
369
|
-
processTailorDBNamespace: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
370
|
-
processResolverNamespace: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
|
|
371
|
-
aggregate: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodAny>;
|
|
372
|
-
}, z.core.$strip>]>, z.ZodTransform<CodeGeneratorBase, ["@tailor-platform/kysely-type", {
|
|
373
|
-
distPath: string;
|
|
374
|
-
}] | ["@tailor-platform/seed", {
|
|
375
|
-
distPath: string;
|
|
376
|
-
machineUserName?: string | undefined;
|
|
377
|
-
}] | ["@tailor-platform/enum-constants", {
|
|
378
|
-
distPath: string;
|
|
379
|
-
}] | ["@tailor-platform/file-utils", {
|
|
380
|
-
distPath: string;
|
|
381
|
-
}] | {
|
|
382
|
-
id: string;
|
|
383
|
-
description: string;
|
|
384
|
-
dependencies: ("executor" | "tailordb" | "resolver")[];
|
|
385
|
-
aggregate: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.ZodAny>;
|
|
386
|
-
processType?: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut> | undefined;
|
|
387
|
-
processResolver?: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut> | undefined;
|
|
388
|
-
processExecutor?: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut> | undefined;
|
|
389
|
-
processTailorDBNamespace?: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut> | undefined;
|
|
390
|
-
processResolverNamespace?: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut> | undefined;
|
|
391
|
-
}>>, "CodeGenerator", "out">;
|
|
392
|
-
type GeneratorConfigSchemaType = ReturnType<typeof createGeneratorConfigSchema>;
|
|
393
|
-
type Generator = z.output<GeneratorConfigSchemaType>;
|
|
394
|
-
//#endregion
|
|
395
|
-
export { ScheduleTriggerInput as C, ResolverExecutedTrigger as S, WorkflowOperation as T, FunctionOperation as _, IdPExternalConfig as a, IncomingWebhookTrigger as b, WorkflowServiceConfig as c, defineStaticWebSite as d, AuthAccessTokenTrigger as f, ExecutorServiceInput as g, ExecutorServiceConfig as h, IdPConfig as i, WorkflowServiceInput as l, ExecutorInput as m, GeneratorConfig as n, IdPInput as o, Executor as p, AppConfig as r, IdpDefinitionBrand as s, Generator as t, StaticWebsiteConfig as u, GqlOperation as v, WebhookOperation as w, RecordTrigger as x, IdpUserTrigger as y };
|
|
396
|
-
//# sourceMappingURL=index-pQbghcVa.d.mts.map
|
|
368
|
+
export { ScheduleTriggerInput as C, ResolverExecutedTrigger as S, WorkflowOperation as T, FunctionOperation as _, IdpDefinitionBrand as a, IncomingWebhookTrigger as b, CodeGeneratorBase as c, WorkflowServiceInput as d, AuthAccessTokenTrigger as f, ExecutorServiceInput as g, ExecutorServiceConfig as h, IdPInput as i, GeneratorConfig as l, ExecutorInput as m, IdPConfig as n, StaticWebsiteConfig as o, Executor as p, IdPExternalConfig as r, defineStaticWebSite as s, AppConfig as t, WorkflowServiceConfig as u, GqlOperation as v, WebhookOperation as w, RecordTrigger as x, IdpUserTrigger as y };
|
|
369
|
+
//# sourceMappingURL=types-BeNtD-fA.d.mts.map
|