@zodmire/config 0.1.1 → 0.1.2

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.
Files changed (3) hide show
  1. package/mod.d.mts +31 -1
  2. package/mod.mjs +11 -1
  3. package/package.json +1 -1
package/mod.d.mts CHANGED
@@ -208,6 +208,7 @@ declare const ContextConfigSchema: z.ZodObject<{
208
208
  port: z.ZodString;
209
209
  kind: z.ZodEnum<{
210
210
  "drizzle-repository": "drizzle-repository";
211
+ "mikroorm-repository": "mikroorm-repository";
211
212
  "external-service": "external-service";
212
213
  }>;
213
214
  }, z.core.$strict>>;
@@ -293,6 +294,20 @@ declare const CrossContextEventSchema: z.ZodObject<{
293
294
  action: z.ZodString;
294
295
  }, z.core.$strip>>;
295
296
  }, z.core.$strip>;
297
+ declare const CompositionInfrastructureSchema: z.ZodObject<{
298
+ architecture: z.ZodEnum<{
299
+ "logical-cqrs": "logical-cqrs";
300
+ "physical-cqrs": "physical-cqrs";
301
+ }>;
302
+ persistence: z.ZodEnum<{
303
+ postgres: "postgres";
304
+ mysql: "mysql";
305
+ }>;
306
+ orm: z.ZodEnum<{
307
+ drizzle: "drizzle";
308
+ mikroorm: "mikroorm";
309
+ }>;
310
+ }, z.core.$strip>;
296
311
  declare const CompositionConfigSchema: z.ZodObject<{
297
312
  name: z.ZodString;
298
313
  contexts: z.ZodArray<z.ZodString>;
@@ -305,6 +320,20 @@ declare const CompositionConfigSchema: z.ZodObject<{
305
320
  action: z.ZodString;
306
321
  }, z.core.$strip>>;
307
322
  }, z.core.$strip>>>;
323
+ infrastructure: z.ZodObject<{
324
+ architecture: z.ZodEnum<{
325
+ "logical-cqrs": "logical-cqrs";
326
+ "physical-cqrs": "physical-cqrs";
327
+ }>;
328
+ persistence: z.ZodEnum<{
329
+ postgres: "postgres";
330
+ mysql: "mysql";
331
+ }>;
332
+ orm: z.ZodEnum<{
333
+ drizzle: "drizzle";
334
+ mikroorm: "mikroorm";
335
+ }>;
336
+ }, z.core.$strip>;
308
337
  materialization: z.ZodObject<{
309
338
  targetRoot: z.ZodString;
310
339
  }, z.core.$strip>;
@@ -312,6 +341,7 @@ declare const CompositionConfigSchema: z.ZodObject<{
312
341
  type CompositionConfig = z.infer<typeof CompositionConfigSchema>;
313
342
  type CrossContextEvent = z.infer<typeof CrossContextEventSchema>;
314
343
  type Subscription = z.infer<typeof SubscriptionSchema>;
344
+ type CompositionInfrastructure = z.infer<typeof CompositionInfrastructureSchema>;
315
345
  declare function defineComposition(config: z.input<typeof CompositionConfigSchema>): CompositionConfig;
316
346
  //#endregion
317
- export { AggregateMeta, ApplicationErrorMeta, CodegenMeta, CommandEffect, CommandInputMeta, CompositionConfig, CompositionConfigSchema, ComputedFieldSpec, ContextConfig, ContextConfigSchema, CrossContextEvent, DomainErrorMeta, DomainEventMeta, EntityMeta, FieldMeta, FilterOperator, FindByIdQueryInputMeta, InvariantRule, ListQueryInputMeta, ProjectionMeta, ProjectionMutationMeta, ProjectionRebuildMeta, ProjectionSourceMeta, ProjectionSubscriptionMeta, ProjectionValueSourceMeta, QueryInputMeta, QueryOutputMeta, ReadModelIndexMeta, ReadModelMeta, ReadModelUniqueConstraintMeta, Subscription, ValueObjectMeta, createCodegenMeta, createCodegenRegistry, defineComposition, defineContext };
347
+ export { AggregateMeta, ApplicationErrorMeta, CodegenMeta, CommandEffect, CommandInputMeta, CompositionConfig, CompositionConfigSchema, CompositionInfrastructure, ComputedFieldSpec, ContextConfig, ContextConfigSchema, CrossContextEvent, DomainErrorMeta, DomainEventMeta, EntityMeta, FieldMeta, FilterOperator, FindByIdQueryInputMeta, InvariantRule, ListQueryInputMeta, ProjectionMeta, ProjectionMutationMeta, ProjectionRebuildMeta, ProjectionSourceMeta, ProjectionSubscriptionMeta, ProjectionValueSourceMeta, QueryInputMeta, QueryOutputMeta, ReadModelIndexMeta, ReadModelMeta, ReadModelUniqueConstraintMeta, Subscription, ValueObjectMeta, createCodegenMeta, createCodegenRegistry, defineComposition, defineContext };
package/mod.mjs CHANGED
@@ -68,7 +68,11 @@ const PortSchema = z.strictObject({
68
68
  const AdapterSchema = z.strictObject({
69
69
  name: z.string().min(1),
70
70
  port: z.string().min(1),
71
- kind: z.enum(["drizzle-repository", "external-service"])
71
+ kind: z.enum([
72
+ "drizzle-repository",
73
+ "mikroorm-repository",
74
+ "external-service"
75
+ ])
72
76
  });
73
77
  const ProcedureSchema = z.strictObject({
74
78
  name: z.string().min(1),
@@ -112,10 +116,16 @@ const CrossContextEventSchema = z.object({
112
116
  subscriptions: z.array(SubscriptionSchema).min(1)
113
117
  });
114
118
  const CompositionMaterializationSchema = z.object({ targetRoot: z.string().min(1) });
119
+ const CompositionInfrastructureSchema = z.object({
120
+ architecture: z.enum(["logical-cqrs", "physical-cqrs"]),
121
+ persistence: z.enum(["postgres", "mysql"]),
122
+ orm: z.enum(["drizzle", "mikroorm"])
123
+ });
115
124
  const CompositionConfigSchema = z.object({
116
125
  name: z.string().min(1),
117
126
  contexts: z.array(z.string().min(1)).min(1),
118
127
  crossContextEvents: z.array(CrossContextEventSchema).default([]),
128
+ infrastructure: CompositionInfrastructureSchema,
119
129
  materialization: CompositionMaterializationSchema
120
130
  });
121
131
  function defineComposition(config) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodmire/config",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./mod.mjs",