@walkeros/core 0.4.1 → 0.4.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.
- package/dist/dev.d.mts +122 -33
- package/dist/dev.d.ts +122 -33
- package/dist/dev.js +1 -1
- package/dist/dev.js.map +1 -1
- package/dist/dev.mjs +1 -1
- package/dist/dev.mjs.map +1 -1
- package/dist/index.d.mts +495 -203
- package/dist/index.d.ts +495 -203
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/dev.d.mts
CHANGED
|
@@ -3371,7 +3371,7 @@ declare namespace source {
|
|
|
3371
3371
|
* Mirrors: types/flow.ts
|
|
3372
3372
|
* Purpose: Runtime validation and JSON Schema generation for Flow configurations
|
|
3373
3373
|
*
|
|
3374
|
-
* The Flow system provides unified configuration across all walkerOS
|
|
3374
|
+
* The Flow system provides unified configuration across all walkerOS flows.
|
|
3375
3375
|
* These schemas enable:
|
|
3376
3376
|
* - Runtime validation of config files
|
|
3377
3377
|
* - Clear error messages for configuration issues
|
|
@@ -3389,6 +3389,33 @@ declare namespace source {
|
|
|
3389
3389
|
* Used in Setup.variables and Config.env.
|
|
3390
3390
|
*/
|
|
3391
3391
|
declare const PrimitiveSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
3392
|
+
/**
|
|
3393
|
+
* Variables schema for interpolation.
|
|
3394
|
+
*/
|
|
3395
|
+
declare const VariablesSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
3396
|
+
/**
|
|
3397
|
+
* Definitions schema for reusable configurations.
|
|
3398
|
+
*/
|
|
3399
|
+
declare const DefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3400
|
+
/**
|
|
3401
|
+
* Packages schema for build configuration.
|
|
3402
|
+
*/
|
|
3403
|
+
declare const PackagesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3404
|
+
version: z.ZodOptional<z.ZodString>;
|
|
3405
|
+
imports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3406
|
+
path: z.ZodOptional<z.ZodString>;
|
|
3407
|
+
}, z.core.$strip>>;
|
|
3408
|
+
/**
|
|
3409
|
+
* Web platform configuration schema.
|
|
3410
|
+
*/
|
|
3411
|
+
declare const WebSchema: z.ZodObject<{
|
|
3412
|
+
windowCollector: z.ZodOptional<z.ZodString>;
|
|
3413
|
+
windowElb: z.ZodOptional<z.ZodString>;
|
|
3414
|
+
}, z.core.$strip>;
|
|
3415
|
+
/**
|
|
3416
|
+
* Server platform configuration schema.
|
|
3417
|
+
*/
|
|
3418
|
+
declare const ServerSchema: z.ZodObject<{}, z.core.$loose>;
|
|
3392
3419
|
/**
|
|
3393
3420
|
* Source reference schema.
|
|
3394
3421
|
*
|
|
@@ -3401,6 +3428,8 @@ declare const SourceReferenceSchema: z.ZodObject<{
|
|
|
3401
3428
|
config: z.ZodOptional<z.ZodUnknown>;
|
|
3402
3429
|
env: z.ZodOptional<z.ZodUnknown>;
|
|
3403
3430
|
primary: z.ZodOptional<z.ZodBoolean>;
|
|
3431
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3432
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3404
3433
|
}, z.core.$strip>;
|
|
3405
3434
|
/**
|
|
3406
3435
|
* Destination reference schema.
|
|
@@ -3413,64 +3442,89 @@ declare const DestinationReferenceSchema: z.ZodObject<{
|
|
|
3413
3442
|
package: z.ZodString;
|
|
3414
3443
|
config: z.ZodOptional<z.ZodUnknown>;
|
|
3415
3444
|
env: z.ZodOptional<z.ZodUnknown>;
|
|
3445
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3446
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3416
3447
|
}, z.core.$strip>;
|
|
3417
3448
|
/**
|
|
3418
|
-
*
|
|
3449
|
+
* Single flow configuration schema.
|
|
3419
3450
|
*
|
|
3420
3451
|
* @remarks
|
|
3421
|
-
* Represents a single deployment
|
|
3422
|
-
*
|
|
3452
|
+
* Represents a single deployment target (e.g., web_prod, server_stage).
|
|
3453
|
+
* Platform is determined by presence of `web` or `server` key.
|
|
3454
|
+
* Exactly one must be present.
|
|
3423
3455
|
*/
|
|
3424
3456
|
declare const ConfigSchema: z.ZodObject<{
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
}
|
|
3457
|
+
web: z.ZodOptional<z.ZodObject<{
|
|
3458
|
+
windowCollector: z.ZodOptional<z.ZodString>;
|
|
3459
|
+
windowElb: z.ZodOptional<z.ZodString>;
|
|
3460
|
+
}, z.core.$strip>>;
|
|
3461
|
+
server: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
3429
3462
|
sources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3430
3463
|
package: z.ZodString;
|
|
3431
3464
|
config: z.ZodOptional<z.ZodUnknown>;
|
|
3432
3465
|
env: z.ZodOptional<z.ZodUnknown>;
|
|
3433
3466
|
primary: z.ZodOptional<z.ZodBoolean>;
|
|
3467
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3468
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3434
3469
|
}, z.core.$strip>>>;
|
|
3435
3470
|
destinations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3436
3471
|
package: z.ZodString;
|
|
3437
3472
|
config: z.ZodOptional<z.ZodUnknown>;
|
|
3438
3473
|
env: z.ZodOptional<z.ZodUnknown>;
|
|
3474
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3475
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3439
3476
|
}, z.core.$strip>>>;
|
|
3440
3477
|
collector: z.ZodOptional<z.ZodUnknown>;
|
|
3441
|
-
|
|
3442
|
-
|
|
3478
|
+
packages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3479
|
+
version: z.ZodOptional<z.ZodString>;
|
|
3480
|
+
imports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3481
|
+
path: z.ZodOptional<z.ZodString>;
|
|
3482
|
+
}, z.core.$strip>>>;
|
|
3483
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3484
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3485
|
+
}, z.core.$strip>;
|
|
3443
3486
|
/**
|
|
3444
3487
|
* Flow setup schema - root configuration.
|
|
3445
3488
|
*
|
|
3446
3489
|
* @remarks
|
|
3447
3490
|
* This is the complete schema for walkeros.config.json files.
|
|
3448
|
-
* Contains multiple named
|
|
3491
|
+
* Contains multiple named flows with shared variables and definitions.
|
|
3449
3492
|
*/
|
|
3450
3493
|
declare const SetupSchema: z.ZodObject<{
|
|
3451
3494
|
version: z.ZodLiteral<1>;
|
|
3452
3495
|
$schema: z.ZodOptional<z.ZodString>;
|
|
3453
3496
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3454
3497
|
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
}
|
|
3498
|
+
flows: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3499
|
+
web: z.ZodOptional<z.ZodObject<{
|
|
3500
|
+
windowCollector: z.ZodOptional<z.ZodString>;
|
|
3501
|
+
windowElb: z.ZodOptional<z.ZodString>;
|
|
3502
|
+
}, z.core.$strip>>;
|
|
3503
|
+
server: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
3460
3504
|
sources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3461
3505
|
package: z.ZodString;
|
|
3462
3506
|
config: z.ZodOptional<z.ZodUnknown>;
|
|
3463
3507
|
env: z.ZodOptional<z.ZodUnknown>;
|
|
3464
3508
|
primary: z.ZodOptional<z.ZodBoolean>;
|
|
3509
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3510
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3465
3511
|
}, z.core.$strip>>>;
|
|
3466
3512
|
destinations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3467
3513
|
package: z.ZodString;
|
|
3468
3514
|
config: z.ZodOptional<z.ZodUnknown>;
|
|
3469
3515
|
env: z.ZodOptional<z.ZodUnknown>;
|
|
3516
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3517
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3470
3518
|
}, z.core.$strip>>>;
|
|
3471
3519
|
collector: z.ZodOptional<z.ZodUnknown>;
|
|
3472
|
-
|
|
3473
|
-
|
|
3520
|
+
packages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3521
|
+
version: z.ZodOptional<z.ZodString>;
|
|
3522
|
+
imports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3523
|
+
path: z.ZodOptional<z.ZodString>;
|
|
3524
|
+
}, z.core.$strip>>>;
|
|
3525
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3526
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3527
|
+
}, z.core.$strip>>;
|
|
3474
3528
|
}, z.core.$strip>;
|
|
3475
3529
|
/**
|
|
3476
3530
|
* Parse and validate Flow.Setup configuration.
|
|
@@ -3486,7 +3540,7 @@ declare const SetupSchema: z.ZodObject<{
|
|
|
3486
3540
|
*
|
|
3487
3541
|
* const raw = JSON.parse(readFileSync('walkeros.config.json', 'utf8'));
|
|
3488
3542
|
* const config = parseSetup(raw);
|
|
3489
|
-
* console.log(`Found ${Object.keys(config.
|
|
3543
|
+
* console.log(`Found ${Object.keys(config.flows).length} flows`);
|
|
3490
3544
|
* ```
|
|
3491
3545
|
*/
|
|
3492
3546
|
declare function parseSetup(data: unknown): z.infer<typeof SetupSchema>;
|
|
@@ -3510,31 +3564,46 @@ declare function parseSetup(data: unknown): z.infer<typeof SetupSchema>;
|
|
|
3510
3564
|
*/
|
|
3511
3565
|
declare function safeParseSetup(data: unknown): z.ZodSafeParseResult<{
|
|
3512
3566
|
version: 1;
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3567
|
+
flows: Record<string, {
|
|
3568
|
+
web?: {
|
|
3569
|
+
windowCollector?: string | undefined;
|
|
3570
|
+
windowElb?: string | undefined;
|
|
3571
|
+
} | undefined;
|
|
3572
|
+
server?: {
|
|
3573
|
+
[x: string]: unknown;
|
|
3574
|
+
} | undefined;
|
|
3516
3575
|
sources?: Record<string, {
|
|
3517
3576
|
package: string;
|
|
3518
3577
|
config?: unknown;
|
|
3519
3578
|
env?: unknown;
|
|
3520
3579
|
primary?: boolean | undefined;
|
|
3580
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
3581
|
+
definitions?: Record<string, unknown> | undefined;
|
|
3521
3582
|
}> | undefined;
|
|
3522
3583
|
destinations?: Record<string, {
|
|
3523
3584
|
package: string;
|
|
3524
3585
|
config?: unknown;
|
|
3525
3586
|
env?: unknown;
|
|
3587
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
3588
|
+
definitions?: Record<string, unknown> | undefined;
|
|
3526
3589
|
}> | undefined;
|
|
3527
3590
|
collector?: unknown;
|
|
3528
|
-
|
|
3591
|
+
packages?: Record<string, {
|
|
3592
|
+
version?: string | undefined;
|
|
3593
|
+
imports?: string[] | undefined;
|
|
3594
|
+
path?: string | undefined;
|
|
3595
|
+
}> | undefined;
|
|
3596
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
3597
|
+
definitions?: Record<string, unknown> | undefined;
|
|
3529
3598
|
}>;
|
|
3530
3599
|
$schema?: string | undefined;
|
|
3531
3600
|
variables?: Record<string, string | number | boolean> | undefined;
|
|
3532
3601
|
definitions?: Record<string, unknown> | undefined;
|
|
3533
3602
|
}>;
|
|
3534
3603
|
/**
|
|
3535
|
-
* Parse and validate Flow.Config (single
|
|
3604
|
+
* Parse and validate Flow.Config (single flow).
|
|
3536
3605
|
*
|
|
3537
|
-
* @param data - Raw JSON data for single
|
|
3606
|
+
* @param data - Raw JSON data for single flow
|
|
3538
3607
|
* @returns Validated Flow.Config object
|
|
3539
3608
|
* @throws ZodError if validation fails
|
|
3540
3609
|
*
|
|
@@ -3542,33 +3611,48 @@ declare function safeParseSetup(data: unknown): z.ZodSafeParseResult<{
|
|
|
3542
3611
|
* ```typescript
|
|
3543
3612
|
* import { parseConfig } from '@walkeros/core/dev';
|
|
3544
3613
|
*
|
|
3545
|
-
* const
|
|
3546
|
-
* console.log(`Platform: ${
|
|
3614
|
+
* const flowConfig = parseConfig(rawFlowData);
|
|
3615
|
+
* console.log(`Platform: ${flowConfig.web ? 'web' : 'server'}`);
|
|
3547
3616
|
* ```
|
|
3548
3617
|
*/
|
|
3549
3618
|
declare function parseConfig(data: unknown): z.infer<typeof ConfigSchema>;
|
|
3550
3619
|
/**
|
|
3551
3620
|
* Safely parse Flow.Config without throwing.
|
|
3552
3621
|
*
|
|
3553
|
-
* @param data - Raw JSON data for single
|
|
3622
|
+
* @param data - Raw JSON data for single flow
|
|
3554
3623
|
* @returns Success result with data or error result with issues
|
|
3555
3624
|
*/
|
|
3556
3625
|
declare function safeParseConfig(data: unknown): z.ZodSafeParseResult<{
|
|
3557
|
-
|
|
3558
|
-
|
|
3626
|
+
web?: {
|
|
3627
|
+
windowCollector?: string | undefined;
|
|
3628
|
+
windowElb?: string | undefined;
|
|
3629
|
+
} | undefined;
|
|
3630
|
+
server?: {
|
|
3631
|
+
[x: string]: unknown;
|
|
3632
|
+
} | undefined;
|
|
3559
3633
|
sources?: Record<string, {
|
|
3560
3634
|
package: string;
|
|
3561
3635
|
config?: unknown;
|
|
3562
3636
|
env?: unknown;
|
|
3563
3637
|
primary?: boolean | undefined;
|
|
3638
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
3639
|
+
definitions?: Record<string, unknown> | undefined;
|
|
3564
3640
|
}> | undefined;
|
|
3565
3641
|
destinations?: Record<string, {
|
|
3566
3642
|
package: string;
|
|
3567
3643
|
config?: unknown;
|
|
3568
3644
|
env?: unknown;
|
|
3645
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
3646
|
+
definitions?: Record<string, unknown> | undefined;
|
|
3569
3647
|
}> | undefined;
|
|
3570
3648
|
collector?: unknown;
|
|
3571
|
-
|
|
3649
|
+
packages?: Record<string, {
|
|
3650
|
+
version?: string | undefined;
|
|
3651
|
+
imports?: string[] | undefined;
|
|
3652
|
+
path?: string | undefined;
|
|
3653
|
+
}> | undefined;
|
|
3654
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
3655
|
+
definitions?: Record<string, unknown> | undefined;
|
|
3572
3656
|
}>;
|
|
3573
3657
|
/**
|
|
3574
3658
|
* Generate JSON Schema for Flow.Setup.
|
|
@@ -3595,7 +3679,7 @@ declare const setupJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
|
3595
3679
|
* Generate JSON Schema for Flow.Config.
|
|
3596
3680
|
*
|
|
3597
3681
|
* @remarks
|
|
3598
|
-
* Used for validating individual
|
|
3682
|
+
* Used for validating individual flow configurations.
|
|
3599
3683
|
*
|
|
3600
3684
|
* @returns JSON Schema (Draft 7) representation of ConfigSchema
|
|
3601
3685
|
*/
|
|
@@ -3620,10 +3704,15 @@ declare const sourceReferenceJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
|
3620
3704
|
declare const destinationReferenceJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
3621
3705
|
|
|
3622
3706
|
declare const flow_ConfigSchema: typeof ConfigSchema;
|
|
3707
|
+
declare const flow_DefinitionsSchema: typeof DefinitionsSchema;
|
|
3623
3708
|
declare const flow_DestinationReferenceSchema: typeof DestinationReferenceSchema;
|
|
3709
|
+
declare const flow_PackagesSchema: typeof PackagesSchema;
|
|
3624
3710
|
declare const flow_PrimitiveSchema: typeof PrimitiveSchema;
|
|
3711
|
+
declare const flow_ServerSchema: typeof ServerSchema;
|
|
3625
3712
|
declare const flow_SetupSchema: typeof SetupSchema;
|
|
3626
3713
|
declare const flow_SourceReferenceSchema: typeof SourceReferenceSchema;
|
|
3714
|
+
declare const flow_VariablesSchema: typeof VariablesSchema;
|
|
3715
|
+
declare const flow_WebSchema: typeof WebSchema;
|
|
3627
3716
|
declare const flow_configJsonSchema: typeof configJsonSchema;
|
|
3628
3717
|
declare const flow_destinationReferenceJsonSchema: typeof destinationReferenceJsonSchema;
|
|
3629
3718
|
declare const flow_parseConfig: typeof parseConfig;
|
|
@@ -3633,7 +3722,7 @@ declare const flow_safeParseSetup: typeof safeParseSetup;
|
|
|
3633
3722
|
declare const flow_setupJsonSchema: typeof setupJsonSchema;
|
|
3634
3723
|
declare const flow_sourceReferenceJsonSchema: typeof sourceReferenceJsonSchema;
|
|
3635
3724
|
declare namespace flow {
|
|
3636
|
-
export { flow_ConfigSchema as ConfigSchema, flow_DestinationReferenceSchema as DestinationReferenceSchema, flow_PrimitiveSchema as PrimitiveSchema, flow_SetupSchema as SetupSchema, flow_SourceReferenceSchema as SourceReferenceSchema, flow_configJsonSchema as configJsonSchema, flow_destinationReferenceJsonSchema as destinationReferenceJsonSchema, flow_parseConfig as parseConfig, flow_parseSetup as parseSetup, flow_safeParseConfig as safeParseConfig, flow_safeParseSetup as safeParseSetup, flow_setupJsonSchema as setupJsonSchema, flow_sourceReferenceJsonSchema as sourceReferenceJsonSchema };
|
|
3725
|
+
export { flow_ConfigSchema as ConfigSchema, flow_DefinitionsSchema as DefinitionsSchema, flow_DestinationReferenceSchema as DestinationReferenceSchema, flow_PackagesSchema as PackagesSchema, flow_PrimitiveSchema as PrimitiveSchema, flow_ServerSchema as ServerSchema, flow_SetupSchema as SetupSchema, flow_SourceReferenceSchema as SourceReferenceSchema, flow_VariablesSchema as VariablesSchema, flow_WebSchema as WebSchema, flow_configJsonSchema as configJsonSchema, flow_destinationReferenceJsonSchema as destinationReferenceJsonSchema, flow_parseConfig as parseConfig, flow_parseSetup as parseSetup, flow_safeParseConfig as safeParseConfig, flow_safeParseSetup as safeParseSetup, flow_setupJsonSchema as setupJsonSchema, flow_sourceReferenceJsonSchema as sourceReferenceJsonSchema };
|
|
3637
3726
|
}
|
|
3638
3727
|
|
|
3639
3728
|
/**
|
package/dist/dev.d.ts
CHANGED
|
@@ -3371,7 +3371,7 @@ declare namespace source {
|
|
|
3371
3371
|
* Mirrors: types/flow.ts
|
|
3372
3372
|
* Purpose: Runtime validation and JSON Schema generation for Flow configurations
|
|
3373
3373
|
*
|
|
3374
|
-
* The Flow system provides unified configuration across all walkerOS
|
|
3374
|
+
* The Flow system provides unified configuration across all walkerOS flows.
|
|
3375
3375
|
* These schemas enable:
|
|
3376
3376
|
* - Runtime validation of config files
|
|
3377
3377
|
* - Clear error messages for configuration issues
|
|
@@ -3389,6 +3389,33 @@ declare namespace source {
|
|
|
3389
3389
|
* Used in Setup.variables and Config.env.
|
|
3390
3390
|
*/
|
|
3391
3391
|
declare const PrimitiveSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
3392
|
+
/**
|
|
3393
|
+
* Variables schema for interpolation.
|
|
3394
|
+
*/
|
|
3395
|
+
declare const VariablesSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
3396
|
+
/**
|
|
3397
|
+
* Definitions schema for reusable configurations.
|
|
3398
|
+
*/
|
|
3399
|
+
declare const DefinitionsSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3400
|
+
/**
|
|
3401
|
+
* Packages schema for build configuration.
|
|
3402
|
+
*/
|
|
3403
|
+
declare const PackagesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3404
|
+
version: z.ZodOptional<z.ZodString>;
|
|
3405
|
+
imports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3406
|
+
path: z.ZodOptional<z.ZodString>;
|
|
3407
|
+
}, z.core.$strip>>;
|
|
3408
|
+
/**
|
|
3409
|
+
* Web platform configuration schema.
|
|
3410
|
+
*/
|
|
3411
|
+
declare const WebSchema: z.ZodObject<{
|
|
3412
|
+
windowCollector: z.ZodOptional<z.ZodString>;
|
|
3413
|
+
windowElb: z.ZodOptional<z.ZodString>;
|
|
3414
|
+
}, z.core.$strip>;
|
|
3415
|
+
/**
|
|
3416
|
+
* Server platform configuration schema.
|
|
3417
|
+
*/
|
|
3418
|
+
declare const ServerSchema: z.ZodObject<{}, z.core.$loose>;
|
|
3392
3419
|
/**
|
|
3393
3420
|
* Source reference schema.
|
|
3394
3421
|
*
|
|
@@ -3401,6 +3428,8 @@ declare const SourceReferenceSchema: z.ZodObject<{
|
|
|
3401
3428
|
config: z.ZodOptional<z.ZodUnknown>;
|
|
3402
3429
|
env: z.ZodOptional<z.ZodUnknown>;
|
|
3403
3430
|
primary: z.ZodOptional<z.ZodBoolean>;
|
|
3431
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3432
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3404
3433
|
}, z.core.$strip>;
|
|
3405
3434
|
/**
|
|
3406
3435
|
* Destination reference schema.
|
|
@@ -3413,64 +3442,89 @@ declare const DestinationReferenceSchema: z.ZodObject<{
|
|
|
3413
3442
|
package: z.ZodString;
|
|
3414
3443
|
config: z.ZodOptional<z.ZodUnknown>;
|
|
3415
3444
|
env: z.ZodOptional<z.ZodUnknown>;
|
|
3445
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3446
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3416
3447
|
}, z.core.$strip>;
|
|
3417
3448
|
/**
|
|
3418
|
-
*
|
|
3449
|
+
* Single flow configuration schema.
|
|
3419
3450
|
*
|
|
3420
3451
|
* @remarks
|
|
3421
|
-
* Represents a single deployment
|
|
3422
|
-
*
|
|
3452
|
+
* Represents a single deployment target (e.g., web_prod, server_stage).
|
|
3453
|
+
* Platform is determined by presence of `web` or `server` key.
|
|
3454
|
+
* Exactly one must be present.
|
|
3423
3455
|
*/
|
|
3424
3456
|
declare const ConfigSchema: z.ZodObject<{
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
}
|
|
3457
|
+
web: z.ZodOptional<z.ZodObject<{
|
|
3458
|
+
windowCollector: z.ZodOptional<z.ZodString>;
|
|
3459
|
+
windowElb: z.ZodOptional<z.ZodString>;
|
|
3460
|
+
}, z.core.$strip>>;
|
|
3461
|
+
server: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
3429
3462
|
sources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3430
3463
|
package: z.ZodString;
|
|
3431
3464
|
config: z.ZodOptional<z.ZodUnknown>;
|
|
3432
3465
|
env: z.ZodOptional<z.ZodUnknown>;
|
|
3433
3466
|
primary: z.ZodOptional<z.ZodBoolean>;
|
|
3467
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3468
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3434
3469
|
}, z.core.$strip>>>;
|
|
3435
3470
|
destinations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3436
3471
|
package: z.ZodString;
|
|
3437
3472
|
config: z.ZodOptional<z.ZodUnknown>;
|
|
3438
3473
|
env: z.ZodOptional<z.ZodUnknown>;
|
|
3474
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3475
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3439
3476
|
}, z.core.$strip>>>;
|
|
3440
3477
|
collector: z.ZodOptional<z.ZodUnknown>;
|
|
3441
|
-
|
|
3442
|
-
|
|
3478
|
+
packages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3479
|
+
version: z.ZodOptional<z.ZodString>;
|
|
3480
|
+
imports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3481
|
+
path: z.ZodOptional<z.ZodString>;
|
|
3482
|
+
}, z.core.$strip>>>;
|
|
3483
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3484
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3485
|
+
}, z.core.$strip>;
|
|
3443
3486
|
/**
|
|
3444
3487
|
* Flow setup schema - root configuration.
|
|
3445
3488
|
*
|
|
3446
3489
|
* @remarks
|
|
3447
3490
|
* This is the complete schema for walkeros.config.json files.
|
|
3448
|
-
* Contains multiple named
|
|
3491
|
+
* Contains multiple named flows with shared variables and definitions.
|
|
3449
3492
|
*/
|
|
3450
3493
|
declare const SetupSchema: z.ZodObject<{
|
|
3451
3494
|
version: z.ZodLiteral<1>;
|
|
3452
3495
|
$schema: z.ZodOptional<z.ZodString>;
|
|
3453
3496
|
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3454
3497
|
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
}
|
|
3498
|
+
flows: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3499
|
+
web: z.ZodOptional<z.ZodObject<{
|
|
3500
|
+
windowCollector: z.ZodOptional<z.ZodString>;
|
|
3501
|
+
windowElb: z.ZodOptional<z.ZodString>;
|
|
3502
|
+
}, z.core.$strip>>;
|
|
3503
|
+
server: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
3460
3504
|
sources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3461
3505
|
package: z.ZodString;
|
|
3462
3506
|
config: z.ZodOptional<z.ZodUnknown>;
|
|
3463
3507
|
env: z.ZodOptional<z.ZodUnknown>;
|
|
3464
3508
|
primary: z.ZodOptional<z.ZodBoolean>;
|
|
3509
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3510
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3465
3511
|
}, z.core.$strip>>>;
|
|
3466
3512
|
destinations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3467
3513
|
package: z.ZodString;
|
|
3468
3514
|
config: z.ZodOptional<z.ZodUnknown>;
|
|
3469
3515
|
env: z.ZodOptional<z.ZodUnknown>;
|
|
3516
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3517
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3470
3518
|
}, z.core.$strip>>>;
|
|
3471
3519
|
collector: z.ZodOptional<z.ZodUnknown>;
|
|
3472
|
-
|
|
3473
|
-
|
|
3520
|
+
packages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3521
|
+
version: z.ZodOptional<z.ZodString>;
|
|
3522
|
+
imports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3523
|
+
path: z.ZodOptional<z.ZodString>;
|
|
3524
|
+
}, z.core.$strip>>>;
|
|
3525
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
3526
|
+
definitions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3527
|
+
}, z.core.$strip>>;
|
|
3474
3528
|
}, z.core.$strip>;
|
|
3475
3529
|
/**
|
|
3476
3530
|
* Parse and validate Flow.Setup configuration.
|
|
@@ -3486,7 +3540,7 @@ declare const SetupSchema: z.ZodObject<{
|
|
|
3486
3540
|
*
|
|
3487
3541
|
* const raw = JSON.parse(readFileSync('walkeros.config.json', 'utf8'));
|
|
3488
3542
|
* const config = parseSetup(raw);
|
|
3489
|
-
* console.log(`Found ${Object.keys(config.
|
|
3543
|
+
* console.log(`Found ${Object.keys(config.flows).length} flows`);
|
|
3490
3544
|
* ```
|
|
3491
3545
|
*/
|
|
3492
3546
|
declare function parseSetup(data: unknown): z.infer<typeof SetupSchema>;
|
|
@@ -3510,31 +3564,46 @@ declare function parseSetup(data: unknown): z.infer<typeof SetupSchema>;
|
|
|
3510
3564
|
*/
|
|
3511
3565
|
declare function safeParseSetup(data: unknown): z.ZodSafeParseResult<{
|
|
3512
3566
|
version: 1;
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3567
|
+
flows: Record<string, {
|
|
3568
|
+
web?: {
|
|
3569
|
+
windowCollector?: string | undefined;
|
|
3570
|
+
windowElb?: string | undefined;
|
|
3571
|
+
} | undefined;
|
|
3572
|
+
server?: {
|
|
3573
|
+
[x: string]: unknown;
|
|
3574
|
+
} | undefined;
|
|
3516
3575
|
sources?: Record<string, {
|
|
3517
3576
|
package: string;
|
|
3518
3577
|
config?: unknown;
|
|
3519
3578
|
env?: unknown;
|
|
3520
3579
|
primary?: boolean | undefined;
|
|
3580
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
3581
|
+
definitions?: Record<string, unknown> | undefined;
|
|
3521
3582
|
}> | undefined;
|
|
3522
3583
|
destinations?: Record<string, {
|
|
3523
3584
|
package: string;
|
|
3524
3585
|
config?: unknown;
|
|
3525
3586
|
env?: unknown;
|
|
3587
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
3588
|
+
definitions?: Record<string, unknown> | undefined;
|
|
3526
3589
|
}> | undefined;
|
|
3527
3590
|
collector?: unknown;
|
|
3528
|
-
|
|
3591
|
+
packages?: Record<string, {
|
|
3592
|
+
version?: string | undefined;
|
|
3593
|
+
imports?: string[] | undefined;
|
|
3594
|
+
path?: string | undefined;
|
|
3595
|
+
}> | undefined;
|
|
3596
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
3597
|
+
definitions?: Record<string, unknown> | undefined;
|
|
3529
3598
|
}>;
|
|
3530
3599
|
$schema?: string | undefined;
|
|
3531
3600
|
variables?: Record<string, string | number | boolean> | undefined;
|
|
3532
3601
|
definitions?: Record<string, unknown> | undefined;
|
|
3533
3602
|
}>;
|
|
3534
3603
|
/**
|
|
3535
|
-
* Parse and validate Flow.Config (single
|
|
3604
|
+
* Parse and validate Flow.Config (single flow).
|
|
3536
3605
|
*
|
|
3537
|
-
* @param data - Raw JSON data for single
|
|
3606
|
+
* @param data - Raw JSON data for single flow
|
|
3538
3607
|
* @returns Validated Flow.Config object
|
|
3539
3608
|
* @throws ZodError if validation fails
|
|
3540
3609
|
*
|
|
@@ -3542,33 +3611,48 @@ declare function safeParseSetup(data: unknown): z.ZodSafeParseResult<{
|
|
|
3542
3611
|
* ```typescript
|
|
3543
3612
|
* import { parseConfig } from '@walkeros/core/dev';
|
|
3544
3613
|
*
|
|
3545
|
-
* const
|
|
3546
|
-
* console.log(`Platform: ${
|
|
3614
|
+
* const flowConfig = parseConfig(rawFlowData);
|
|
3615
|
+
* console.log(`Platform: ${flowConfig.web ? 'web' : 'server'}`);
|
|
3547
3616
|
* ```
|
|
3548
3617
|
*/
|
|
3549
3618
|
declare function parseConfig(data: unknown): z.infer<typeof ConfigSchema>;
|
|
3550
3619
|
/**
|
|
3551
3620
|
* Safely parse Flow.Config without throwing.
|
|
3552
3621
|
*
|
|
3553
|
-
* @param data - Raw JSON data for single
|
|
3622
|
+
* @param data - Raw JSON data for single flow
|
|
3554
3623
|
* @returns Success result with data or error result with issues
|
|
3555
3624
|
*/
|
|
3556
3625
|
declare function safeParseConfig(data: unknown): z.ZodSafeParseResult<{
|
|
3557
|
-
|
|
3558
|
-
|
|
3626
|
+
web?: {
|
|
3627
|
+
windowCollector?: string | undefined;
|
|
3628
|
+
windowElb?: string | undefined;
|
|
3629
|
+
} | undefined;
|
|
3630
|
+
server?: {
|
|
3631
|
+
[x: string]: unknown;
|
|
3632
|
+
} | undefined;
|
|
3559
3633
|
sources?: Record<string, {
|
|
3560
3634
|
package: string;
|
|
3561
3635
|
config?: unknown;
|
|
3562
3636
|
env?: unknown;
|
|
3563
3637
|
primary?: boolean | undefined;
|
|
3638
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
3639
|
+
definitions?: Record<string, unknown> | undefined;
|
|
3564
3640
|
}> | undefined;
|
|
3565
3641
|
destinations?: Record<string, {
|
|
3566
3642
|
package: string;
|
|
3567
3643
|
config?: unknown;
|
|
3568
3644
|
env?: unknown;
|
|
3645
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
3646
|
+
definitions?: Record<string, unknown> | undefined;
|
|
3569
3647
|
}> | undefined;
|
|
3570
3648
|
collector?: unknown;
|
|
3571
|
-
|
|
3649
|
+
packages?: Record<string, {
|
|
3650
|
+
version?: string | undefined;
|
|
3651
|
+
imports?: string[] | undefined;
|
|
3652
|
+
path?: string | undefined;
|
|
3653
|
+
}> | undefined;
|
|
3654
|
+
variables?: Record<string, string | number | boolean> | undefined;
|
|
3655
|
+
definitions?: Record<string, unknown> | undefined;
|
|
3572
3656
|
}>;
|
|
3573
3657
|
/**
|
|
3574
3658
|
* Generate JSON Schema for Flow.Setup.
|
|
@@ -3595,7 +3679,7 @@ declare const setupJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
|
3595
3679
|
* Generate JSON Schema for Flow.Config.
|
|
3596
3680
|
*
|
|
3597
3681
|
* @remarks
|
|
3598
|
-
* Used for validating individual
|
|
3682
|
+
* Used for validating individual flow configurations.
|
|
3599
3683
|
*
|
|
3600
3684
|
* @returns JSON Schema (Draft 7) representation of ConfigSchema
|
|
3601
3685
|
*/
|
|
@@ -3620,10 +3704,15 @@ declare const sourceReferenceJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
|
3620
3704
|
declare const destinationReferenceJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
3621
3705
|
|
|
3622
3706
|
declare const flow_ConfigSchema: typeof ConfigSchema;
|
|
3707
|
+
declare const flow_DefinitionsSchema: typeof DefinitionsSchema;
|
|
3623
3708
|
declare const flow_DestinationReferenceSchema: typeof DestinationReferenceSchema;
|
|
3709
|
+
declare const flow_PackagesSchema: typeof PackagesSchema;
|
|
3624
3710
|
declare const flow_PrimitiveSchema: typeof PrimitiveSchema;
|
|
3711
|
+
declare const flow_ServerSchema: typeof ServerSchema;
|
|
3625
3712
|
declare const flow_SetupSchema: typeof SetupSchema;
|
|
3626
3713
|
declare const flow_SourceReferenceSchema: typeof SourceReferenceSchema;
|
|
3714
|
+
declare const flow_VariablesSchema: typeof VariablesSchema;
|
|
3715
|
+
declare const flow_WebSchema: typeof WebSchema;
|
|
3627
3716
|
declare const flow_configJsonSchema: typeof configJsonSchema;
|
|
3628
3717
|
declare const flow_destinationReferenceJsonSchema: typeof destinationReferenceJsonSchema;
|
|
3629
3718
|
declare const flow_parseConfig: typeof parseConfig;
|
|
@@ -3633,7 +3722,7 @@ declare const flow_safeParseSetup: typeof safeParseSetup;
|
|
|
3633
3722
|
declare const flow_setupJsonSchema: typeof setupJsonSchema;
|
|
3634
3723
|
declare const flow_sourceReferenceJsonSchema: typeof sourceReferenceJsonSchema;
|
|
3635
3724
|
declare namespace flow {
|
|
3636
|
-
export { flow_ConfigSchema as ConfigSchema, flow_DestinationReferenceSchema as DestinationReferenceSchema, flow_PrimitiveSchema as PrimitiveSchema, flow_SetupSchema as SetupSchema, flow_SourceReferenceSchema as SourceReferenceSchema, flow_configJsonSchema as configJsonSchema, flow_destinationReferenceJsonSchema as destinationReferenceJsonSchema, flow_parseConfig as parseConfig, flow_parseSetup as parseSetup, flow_safeParseConfig as safeParseConfig, flow_safeParseSetup as safeParseSetup, flow_setupJsonSchema as setupJsonSchema, flow_sourceReferenceJsonSchema as sourceReferenceJsonSchema };
|
|
3725
|
+
export { flow_ConfigSchema as ConfigSchema, flow_DefinitionsSchema as DefinitionsSchema, flow_DestinationReferenceSchema as DestinationReferenceSchema, flow_PackagesSchema as PackagesSchema, flow_PrimitiveSchema as PrimitiveSchema, flow_ServerSchema as ServerSchema, flow_SetupSchema as SetupSchema, flow_SourceReferenceSchema as SourceReferenceSchema, flow_VariablesSchema as VariablesSchema, flow_WebSchema as WebSchema, flow_configJsonSchema as configJsonSchema, flow_destinationReferenceJsonSchema as destinationReferenceJsonSchema, flow_parseConfig as parseConfig, flow_parseSetup as parseSetup, flow_safeParseConfig as safeParseConfig, flow_safeParseSetup as safeParseSetup, flow_setupJsonSchema as setupJsonSchema, flow_sourceReferenceJsonSchema as sourceReferenceJsonSchema };
|
|
3637
3726
|
}
|
|
3638
3727
|
|
|
3639
3728
|
/**
|