@eventcatalog/sdk 2.20.0 → 2.21.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/dist/index.d.mts +540 -9
- package/dist/index.d.ts +540 -9
- package/dist/index.js +710 -171
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +706 -171
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import { join as
|
|
2
|
+
import { join as join19 } from "path";
|
|
3
3
|
|
|
4
4
|
// src/dsl/utils.ts
|
|
5
5
|
import { globSync } from "glob";
|
|
@@ -2486,13 +2486,480 @@ var entityHasVersion = (directory) => async (id, version) => {
|
|
|
2486
2486
|
return !!file;
|
|
2487
2487
|
};
|
|
2488
2488
|
|
|
2489
|
+
// src/flows.ts
|
|
2490
|
+
import fs14 from "fs/promises";
|
|
2491
|
+
import { join as join15 } from "path";
|
|
2492
|
+
|
|
2493
|
+
// src/flow-builder.ts
|
|
2494
|
+
var cloneStep = (step) => ({
|
|
2495
|
+
...step,
|
|
2496
|
+
...step.message ? { message: { ...step.message } } : {},
|
|
2497
|
+
...step.service ? { service: { ...step.service } } : {},
|
|
2498
|
+
...step.flow ? { flow: { ...step.flow } } : {},
|
|
2499
|
+
...step.container ? { container: { ...step.container } } : {},
|
|
2500
|
+
...step.dataProduct ? { dataProduct: { ...step.dataProduct } } : {},
|
|
2501
|
+
...step.actor ? { actor: { ...step.actor } } : {},
|
|
2502
|
+
...step.custom ? {
|
|
2503
|
+
custom: {
|
|
2504
|
+
...step.custom,
|
|
2505
|
+
...step.custom.properties ? { properties: { ...step.custom.properties } } : {},
|
|
2506
|
+
...step.custom.menu ? { menu: step.custom.menu.map((item) => ({ ...item })) } : {}
|
|
2507
|
+
}
|
|
2508
|
+
} : {},
|
|
2509
|
+
...step.externalSystem ? { externalSystem: { ...step.externalSystem } } : {},
|
|
2510
|
+
...step.next_step !== void 0 ? { next_step: typeof step.next_step === "object" ? { ...step.next_step } : step.next_step } : {},
|
|
2511
|
+
...step.next_steps ? { next_steps: step.next_steps.map((next) => typeof next === "object" ? { ...next } : next) } : {}
|
|
2512
|
+
});
|
|
2513
|
+
var FlowBuilder = class _FlowBuilder {
|
|
2514
|
+
constructor(flow) {
|
|
2515
|
+
this.steps = /* @__PURE__ */ new Map();
|
|
2516
|
+
this.order = [];
|
|
2517
|
+
this.flowResource = { ...flow };
|
|
2518
|
+
for (const step of flow.steps || []) {
|
|
2519
|
+
this.appendStep(cloneStep(step));
|
|
2520
|
+
}
|
|
2521
|
+
}
|
|
2522
|
+
/**
|
|
2523
|
+
* Create a flow builder.
|
|
2524
|
+
*
|
|
2525
|
+
* The created builder can add steps and then produce a normal `Flow` resource
|
|
2526
|
+
* with `build()`.
|
|
2527
|
+
*
|
|
2528
|
+
* @example
|
|
2529
|
+
* ```ts
|
|
2530
|
+
* const flow = FlowBuilder.create({
|
|
2531
|
+
* id: 'PaymentFlow',
|
|
2532
|
+
* name: 'Payment Flow',
|
|
2533
|
+
* version: '1.0.0',
|
|
2534
|
+
* markdown: '# Payment Flow',
|
|
2535
|
+
* }).build();
|
|
2536
|
+
* ```
|
|
2537
|
+
*/
|
|
2538
|
+
static create(flow) {
|
|
2539
|
+
return new _FlowBuilder(flow);
|
|
2540
|
+
}
|
|
2541
|
+
/**
|
|
2542
|
+
* Add a generic flow step.
|
|
2543
|
+
*
|
|
2544
|
+
* Generic steps are useful for business process stages that do not map to
|
|
2545
|
+
* another catalog resource.
|
|
2546
|
+
*
|
|
2547
|
+
* @param step - The step payload.
|
|
2548
|
+
*
|
|
2549
|
+
* @example
|
|
2550
|
+
* ```ts
|
|
2551
|
+
* FlowBuilder.create({
|
|
2552
|
+
* id: 'OrderFlow',
|
|
2553
|
+
* name: 'Order Flow',
|
|
2554
|
+
* version: '1.0.0',
|
|
2555
|
+
* markdown: '',
|
|
2556
|
+
* })
|
|
2557
|
+
* .addStep({
|
|
2558
|
+
* id: 'Calculate',
|
|
2559
|
+
* title: 'Calculate totals',
|
|
2560
|
+
* nextSteps: [{ id: 'OrderConfirmed' }],
|
|
2561
|
+
* });
|
|
2562
|
+
* ```
|
|
2563
|
+
*/
|
|
2564
|
+
addStep(step) {
|
|
2565
|
+
return this.addStepWithNext(
|
|
2566
|
+
{
|
|
2567
|
+
id: step.id,
|
|
2568
|
+
title: step.title || String(step.id),
|
|
2569
|
+
...step.summary ? { summary: step.summary } : {}
|
|
2570
|
+
},
|
|
2571
|
+
step.nextSteps
|
|
2572
|
+
);
|
|
2573
|
+
}
|
|
2574
|
+
/**
|
|
2575
|
+
* Add a message step.
|
|
2576
|
+
*
|
|
2577
|
+
* Message steps can reference an event, command, or query id.
|
|
2578
|
+
*
|
|
2579
|
+
* @param step - The message step payload.
|
|
2580
|
+
*
|
|
2581
|
+
* @example
|
|
2582
|
+
* ```ts
|
|
2583
|
+
* FlowBuilder.create({
|
|
2584
|
+
* id: 'OrderFlow',
|
|
2585
|
+
* name: 'Order Flow',
|
|
2586
|
+
* version: '1.0.0',
|
|
2587
|
+
* markdown: '',
|
|
2588
|
+
* })
|
|
2589
|
+
* .addMessageStep({
|
|
2590
|
+
* id: 'OrderConfirmed',
|
|
2591
|
+
* title: 'Order confirmed',
|
|
2592
|
+
* message: { id: 'OrderConfirmed', version: '1.0.0' },
|
|
2593
|
+
* });
|
|
2594
|
+
* ```
|
|
2595
|
+
*/
|
|
2596
|
+
addMessageStep(step) {
|
|
2597
|
+
const message = step.message || {
|
|
2598
|
+
id: String(step.id),
|
|
2599
|
+
...step.version ? { version: step.version } : {}
|
|
2600
|
+
};
|
|
2601
|
+
return this.addStepWithNext(
|
|
2602
|
+
{
|
|
2603
|
+
id: step.id,
|
|
2604
|
+
title: step.title || String(step.id),
|
|
2605
|
+
...step.summary ? { summary: step.summary } : {},
|
|
2606
|
+
message: { ...message, ...step.version && !message.version ? { version: step.version } : {} }
|
|
2607
|
+
},
|
|
2608
|
+
step.nextSteps
|
|
2609
|
+
);
|
|
2610
|
+
}
|
|
2611
|
+
/**
|
|
2612
|
+
* Add a service step.
|
|
2613
|
+
*
|
|
2614
|
+
* @param step - The service step payload.
|
|
2615
|
+
*
|
|
2616
|
+
* @example
|
|
2617
|
+
* ```ts
|
|
2618
|
+
* FlowBuilder.create({
|
|
2619
|
+
* id: 'OrderFlow',
|
|
2620
|
+
* name: 'Order Flow',
|
|
2621
|
+
* version: '1.0.0',
|
|
2622
|
+
* markdown: '',
|
|
2623
|
+
* })
|
|
2624
|
+
* .addServiceStep({
|
|
2625
|
+
* id: 'OrderService',
|
|
2626
|
+
* service: { id: 'OrderService', version: '1.0.0' },
|
|
2627
|
+
* });
|
|
2628
|
+
* ```
|
|
2629
|
+
*/
|
|
2630
|
+
addServiceStep(step) {
|
|
2631
|
+
const service = step.service || {
|
|
2632
|
+
id: String(step.id),
|
|
2633
|
+
...step.version ? { version: step.version } : {}
|
|
2634
|
+
};
|
|
2635
|
+
return this.addStepWithNext(
|
|
2636
|
+
{
|
|
2637
|
+
id: step.id,
|
|
2638
|
+
title: step.title || String(step.id),
|
|
2639
|
+
...step.summary ? { summary: step.summary } : {},
|
|
2640
|
+
service: { ...service, ...step.version && !service.version ? { version: step.version } : {} }
|
|
2641
|
+
},
|
|
2642
|
+
step.nextSteps
|
|
2643
|
+
);
|
|
2644
|
+
}
|
|
2645
|
+
/**
|
|
2646
|
+
* Add a data store step.
|
|
2647
|
+
*
|
|
2648
|
+
* Data store steps reference container resources in EventCatalog. If a
|
|
2649
|
+
* version is not provided, EventCatalog resolves the latest matching
|
|
2650
|
+
* container version when rendering the flow.
|
|
2651
|
+
*
|
|
2652
|
+
* @param step - The data store step payload.
|
|
2653
|
+
*
|
|
2654
|
+
* @example
|
|
2655
|
+
* ```ts
|
|
2656
|
+
* FlowBuilder.create({
|
|
2657
|
+
* id: 'OrderFlow',
|
|
2658
|
+
* name: 'Order Flow',
|
|
2659
|
+
* version: '1.0.0',
|
|
2660
|
+
* markdown: '',
|
|
2661
|
+
* })
|
|
2662
|
+
* .addDataStoreStep({
|
|
2663
|
+
* id: 'OrdersDB',
|
|
2664
|
+
* container: { id: 'OrdersDB', version: '1.0.0' },
|
|
2665
|
+
* });
|
|
2666
|
+
* ```
|
|
2667
|
+
*/
|
|
2668
|
+
addDataStoreStep(step) {
|
|
2669
|
+
const fallbackContainer = {
|
|
2670
|
+
id: String(step.id),
|
|
2671
|
+
...step.version ? { version: step.version } : {}
|
|
2672
|
+
};
|
|
2673
|
+
const container = step.container ?? fallbackContainer;
|
|
2674
|
+
return this.addStepWithNext(
|
|
2675
|
+
{
|
|
2676
|
+
id: step.id,
|
|
2677
|
+
title: step.title || String(step.id),
|
|
2678
|
+
...step.summary ? { summary: step.summary } : {},
|
|
2679
|
+
container: { ...container, ...step.version && !container.version ? { version: step.version } : {} }
|
|
2680
|
+
},
|
|
2681
|
+
step.nextSteps
|
|
2682
|
+
);
|
|
2683
|
+
}
|
|
2684
|
+
/**
|
|
2685
|
+
* Add a container step.
|
|
2686
|
+
*
|
|
2687
|
+
* Alias for `addDataStoreStep`.
|
|
2688
|
+
*/
|
|
2689
|
+
addContainerStep(step) {
|
|
2690
|
+
return this.addDataStoreStep(step);
|
|
2691
|
+
}
|
|
2692
|
+
/**
|
|
2693
|
+
* Add a data product step.
|
|
2694
|
+
*
|
|
2695
|
+
* If a version is not provided, EventCatalog resolves the latest matching
|
|
2696
|
+
* data product version when rendering the flow.
|
|
2697
|
+
*
|
|
2698
|
+
* @param step - The data product step payload.
|
|
2699
|
+
*
|
|
2700
|
+
* @example
|
|
2701
|
+
* ```ts
|
|
2702
|
+
* FlowBuilder.create({
|
|
2703
|
+
* id: 'OrderFlow',
|
|
2704
|
+
* name: 'Order Flow',
|
|
2705
|
+
* version: '1.0.0',
|
|
2706
|
+
* markdown: '',
|
|
2707
|
+
* })
|
|
2708
|
+
* .addDataProductStep({
|
|
2709
|
+
* id: 'OrderAnalytics',
|
|
2710
|
+
* dataProduct: { id: 'OrderAnalytics', version: '1.0.0' },
|
|
2711
|
+
* });
|
|
2712
|
+
* ```
|
|
2713
|
+
*/
|
|
2714
|
+
addDataProductStep(step) {
|
|
2715
|
+
const fallbackDataProduct = {
|
|
2716
|
+
id: String(step.id),
|
|
2717
|
+
...step.version ? { version: step.version } : {}
|
|
2718
|
+
};
|
|
2719
|
+
const dataProduct = step.dataProduct ?? fallbackDataProduct;
|
|
2720
|
+
return this.addStepWithNext(
|
|
2721
|
+
{
|
|
2722
|
+
id: step.id,
|
|
2723
|
+
title: step.title || String(step.id),
|
|
2724
|
+
...step.summary ? { summary: step.summary } : {},
|
|
2725
|
+
dataProduct: { ...dataProduct, ...step.version && !dataProduct.version ? { version: step.version } : {} }
|
|
2726
|
+
},
|
|
2727
|
+
step.nextSteps
|
|
2728
|
+
);
|
|
2729
|
+
}
|
|
2730
|
+
/**
|
|
2731
|
+
* Add an actor step.
|
|
2732
|
+
*
|
|
2733
|
+
* @param step - The actor step payload.
|
|
2734
|
+
*
|
|
2735
|
+
* @example
|
|
2736
|
+
* ```ts
|
|
2737
|
+
* FlowBuilder.create({
|
|
2738
|
+
* id: 'OrderFlow',
|
|
2739
|
+
* name: 'Order Flow',
|
|
2740
|
+
* version: '1.0.0',
|
|
2741
|
+
* markdown: '',
|
|
2742
|
+
* })
|
|
2743
|
+
* .addActorStep({
|
|
2744
|
+
* id: 'Customer',
|
|
2745
|
+
* actor: { name: 'Customer' },
|
|
2746
|
+
* });
|
|
2747
|
+
* ```
|
|
2748
|
+
*/
|
|
2749
|
+
addActorStep(step) {
|
|
2750
|
+
const actor = step.actor || {
|
|
2751
|
+
name: step.name || step.title || String(step.id),
|
|
2752
|
+
...step.summary ? { summary: step.summary } : {}
|
|
2753
|
+
};
|
|
2754
|
+
return this.addStepWithNext(
|
|
2755
|
+
{
|
|
2756
|
+
id: step.id,
|
|
2757
|
+
title: step.title || actor.name,
|
|
2758
|
+
...step.summary ? { summary: step.summary } : {},
|
|
2759
|
+
actor
|
|
2760
|
+
},
|
|
2761
|
+
step.nextSteps
|
|
2762
|
+
);
|
|
2763
|
+
}
|
|
2764
|
+
/**
|
|
2765
|
+
* Add an external system step.
|
|
2766
|
+
*
|
|
2767
|
+
* @param step - The external system step payload.
|
|
2768
|
+
*
|
|
2769
|
+
* @example
|
|
2770
|
+
* ```ts
|
|
2771
|
+
* FlowBuilder.create({
|
|
2772
|
+
* id: 'PaymentFlow',
|
|
2773
|
+
* name: 'Payment Flow',
|
|
2774
|
+
* version: '1.0.0',
|
|
2775
|
+
* markdown: '',
|
|
2776
|
+
* })
|
|
2777
|
+
* .addExternalSystemStep({
|
|
2778
|
+
* id: 'Stripe',
|
|
2779
|
+
* externalSystem: {
|
|
2780
|
+
* name: 'Stripe',
|
|
2781
|
+
* summary: 'Payment provider',
|
|
2782
|
+
* url: 'https://stripe.com',
|
|
2783
|
+
* },
|
|
2784
|
+
* });
|
|
2785
|
+
* ```
|
|
2786
|
+
*/
|
|
2787
|
+
addExternalSystemStep(step) {
|
|
2788
|
+
const externalSystem = step.externalSystem || {
|
|
2789
|
+
name: step.name || step.title || String(step.id),
|
|
2790
|
+
...step.summary ? { summary: step.summary } : {},
|
|
2791
|
+
...step.url ? { url: step.url } : {}
|
|
2792
|
+
};
|
|
2793
|
+
return this.addStepWithNext(
|
|
2794
|
+
{
|
|
2795
|
+
id: step.id,
|
|
2796
|
+
title: step.title || externalSystem.name,
|
|
2797
|
+
...step.summary ? { summary: step.summary } : {},
|
|
2798
|
+
externalSystem
|
|
2799
|
+
},
|
|
2800
|
+
step.nextSteps
|
|
2801
|
+
);
|
|
2802
|
+
}
|
|
2803
|
+
/**
|
|
2804
|
+
* Add a sub-flow step.
|
|
2805
|
+
*
|
|
2806
|
+
* @param step - The sub-flow step payload.
|
|
2807
|
+
*
|
|
2808
|
+
* @example
|
|
2809
|
+
* ```ts
|
|
2810
|
+
* FlowBuilder.create({
|
|
2811
|
+
* id: 'OrderFlow',
|
|
2812
|
+
* name: 'Order Flow',
|
|
2813
|
+
* version: '1.0.0',
|
|
2814
|
+
* markdown: '',
|
|
2815
|
+
* })
|
|
2816
|
+
* .addFlowStep({
|
|
2817
|
+
* id: 'PaymentFlow',
|
|
2818
|
+
* flow: { id: 'PaymentFlow', version: '1.0.0' },
|
|
2819
|
+
* });
|
|
2820
|
+
* ```
|
|
2821
|
+
*/
|
|
2822
|
+
addFlowStep(step) {
|
|
2823
|
+
const flow = step.flow || {
|
|
2824
|
+
id: String(step.id),
|
|
2825
|
+
...step.version ? { version: step.version } : {}
|
|
2826
|
+
};
|
|
2827
|
+
return this.addStepWithNext(
|
|
2828
|
+
{
|
|
2829
|
+
id: step.id,
|
|
2830
|
+
title: step.title || String(step.id),
|
|
2831
|
+
...step.summary ? { summary: step.summary } : {},
|
|
2832
|
+
flow: { ...flow, ...step.version && !flow.version ? { version: step.version } : {} }
|
|
2833
|
+
},
|
|
2834
|
+
step.nextSteps
|
|
2835
|
+
);
|
|
2836
|
+
}
|
|
2837
|
+
/**
|
|
2838
|
+
* Add a custom flow step.
|
|
2839
|
+
*
|
|
2840
|
+
* @param step - The custom step payload.
|
|
2841
|
+
*
|
|
2842
|
+
* @example
|
|
2843
|
+
* ```ts
|
|
2844
|
+
* FlowBuilder.create({
|
|
2845
|
+
* id: 'PaymentFlow',
|
|
2846
|
+
* name: 'Payment Flow',
|
|
2847
|
+
* version: '1.0.0',
|
|
2848
|
+
* markdown: '',
|
|
2849
|
+
* })
|
|
2850
|
+
* .addCustomStep({
|
|
2851
|
+
* id: 'ManualReview',
|
|
2852
|
+
* custom: {
|
|
2853
|
+
* title: 'Manual review',
|
|
2854
|
+
* type: 'manual',
|
|
2855
|
+
* },
|
|
2856
|
+
* });
|
|
2857
|
+
* ```
|
|
2858
|
+
*/
|
|
2859
|
+
addCustomStep(step) {
|
|
2860
|
+
const custom = step.custom || {
|
|
2861
|
+
title: step.title || String(step.id),
|
|
2862
|
+
...step.icon ? { icon: step.icon } : {},
|
|
2863
|
+
...step.type ? { type: step.type } : {},
|
|
2864
|
+
...step.summary ? { summary: step.summary } : {},
|
|
2865
|
+
...step.url ? { url: step.url } : {},
|
|
2866
|
+
...step.color ? { color: step.color } : {},
|
|
2867
|
+
...step.properties ? { properties: step.properties } : {},
|
|
2868
|
+
...step.height ? { height: step.height } : {},
|
|
2869
|
+
...step.menu ? { menu: step.menu } : {}
|
|
2870
|
+
};
|
|
2871
|
+
return this.addStepWithNext(
|
|
2872
|
+
{
|
|
2873
|
+
id: step.id,
|
|
2874
|
+
title: step.title || custom.title,
|
|
2875
|
+
...step.summary ? { summary: step.summary } : {},
|
|
2876
|
+
custom
|
|
2877
|
+
},
|
|
2878
|
+
step.nextSteps
|
|
2879
|
+
);
|
|
2880
|
+
}
|
|
2881
|
+
/**
|
|
2882
|
+
* Build the EventCatalog flow resource.
|
|
2883
|
+
*
|
|
2884
|
+
* @returns A `Flow` resource that can be written with `writeFlow`.
|
|
2885
|
+
*/
|
|
2886
|
+
build() {
|
|
2887
|
+
this.validateNextSteps();
|
|
2888
|
+
const { steps: _steps, ...flow } = this.flowResource;
|
|
2889
|
+
return {
|
|
2890
|
+
...flow,
|
|
2891
|
+
steps: this.order.map((id) => cloneStep(this.steps.get(id)))
|
|
2892
|
+
};
|
|
2893
|
+
}
|
|
2894
|
+
addStepWithNext(step, nextSteps) {
|
|
2895
|
+
const normalizedNextSteps = nextSteps?.map((next) => typeof next === "object" ? { ...next } : { id: next }) || [];
|
|
2896
|
+
if (normalizedNextSteps.length === 1) {
|
|
2897
|
+
step.next_step = normalizedNextSteps[0];
|
|
2898
|
+
} else if (normalizedNextSteps.length > 1) {
|
|
2899
|
+
step.next_steps = normalizedNextSteps;
|
|
2900
|
+
}
|
|
2901
|
+
this.appendStep(step);
|
|
2902
|
+
return this;
|
|
2903
|
+
}
|
|
2904
|
+
appendStep(step) {
|
|
2905
|
+
if (this.steps.has(step.id)) {
|
|
2906
|
+
throw new Error(`Flow step with id "${step.id}" already exists`);
|
|
2907
|
+
}
|
|
2908
|
+
this.steps.set(step.id, step);
|
|
2909
|
+
this.order.push(step.id);
|
|
2910
|
+
}
|
|
2911
|
+
validateNextSteps() {
|
|
2912
|
+
for (const step of this.steps.values()) {
|
|
2913
|
+
const nextSteps = step.next_step !== void 0 ? [step.next_step] : step.next_steps || [];
|
|
2914
|
+
for (const next of nextSteps) {
|
|
2915
|
+
const nextStepId = typeof next === "object" && next ? next.id : next;
|
|
2916
|
+
if (!this.steps.has(nextStepId)) {
|
|
2917
|
+
throw new Error(`Flow step "${step.id}" references missing next step "${nextStepId}"`);
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2920
|
+
}
|
|
2921
|
+
}
|
|
2922
|
+
};
|
|
2923
|
+
|
|
2489
2924
|
// src/flows.ts
|
|
2490
2925
|
var getFlow = (directory) => async (id, version) => getResource(directory, id, version, { type: "flow" });
|
|
2491
2926
|
var getFlows = (directory) => async (options) => getResources(directory, { type: "flows", latestOnly: options?.latestOnly });
|
|
2927
|
+
var writeFlow = (directory) => async (flow, options = {
|
|
2928
|
+
path: "",
|
|
2929
|
+
override: false,
|
|
2930
|
+
format: "mdx"
|
|
2931
|
+
}) => writeResource(directory, { ...flow }, { ...options, type: "flow" });
|
|
2932
|
+
var writeVersionedFlow = (directory) => async (flow) => {
|
|
2933
|
+
const path8 = getVersionedDirectory(flow.id, flow.version);
|
|
2934
|
+
return await writeFlow(directory)({ ...flow }, { path: path8 });
|
|
2935
|
+
};
|
|
2936
|
+
var writeFlowToDomain = (directory) => async (flow, domain, options = { path: "", format: "mdx", override: false }) => {
|
|
2937
|
+
let pathForFlow = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/flows` : `/${domain.id}/flows`;
|
|
2938
|
+
pathForFlow = join15(pathForFlow, flow.id);
|
|
2939
|
+
await writeResource(directory, { ...flow }, { ...options, path: pathForFlow, type: "flow" });
|
|
2940
|
+
};
|
|
2941
|
+
var writeFlowToService = (directory) => async (flow, service, options = { path: "", format: "mdx", override: false }) => {
|
|
2942
|
+
let pathForFlow = service.version && service.version !== "latest" ? `/${service.id}/versioned/${service.version}/flows` : `/${service.id}/flows`;
|
|
2943
|
+
pathForFlow = join15(pathForFlow, flow.id);
|
|
2944
|
+
await writeResource(directory, { ...flow }, { ...options, path: pathForFlow, type: "flow" });
|
|
2945
|
+
};
|
|
2946
|
+
var rmFlow = (directory) => async (path8) => {
|
|
2947
|
+
await fs14.rm(join15(directory, path8), { recursive: true });
|
|
2948
|
+
invalidateFileCache();
|
|
2949
|
+
};
|
|
2950
|
+
var rmFlowById = (directory) => async (id, version, persistFiles) => {
|
|
2951
|
+
await rmResourceById(directory, id, version, { type: "flow", persistFiles });
|
|
2952
|
+
};
|
|
2953
|
+
var versionFlow = (directory) => async (id) => versionResource(directory, id);
|
|
2954
|
+
var flowHasVersion = (directory) => async (id, version) => {
|
|
2955
|
+
const file = await findFileById(directory, id, version);
|
|
2956
|
+
return !!file;
|
|
2957
|
+
};
|
|
2958
|
+
var addFileToFlow = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version, { type: "flow" });
|
|
2492
2959
|
|
|
2493
2960
|
// src/containers.ts
|
|
2494
|
-
import
|
|
2495
|
-
import { join as
|
|
2961
|
+
import fs15 from "fs/promises";
|
|
2962
|
+
import { join as join16 } from "path";
|
|
2496
2963
|
var getContainer = (directory) => async (id, version) => getResource(directory, id, version, { type: "container" });
|
|
2497
2964
|
var getContainers = (directory) => async (options) => getResources(directory, { type: "containers", latestOnly: options?.latestOnly });
|
|
2498
2965
|
var writeContainer = (directory) => async (data, options = {
|
|
@@ -2502,7 +2969,7 @@ var writeContainer = (directory) => async (data, options = {
|
|
|
2502
2969
|
}) => writeResource(directory, { ...data }, { ...options, type: "container" });
|
|
2503
2970
|
var versionContainer = (directory) => async (id) => versionResource(directory, id);
|
|
2504
2971
|
var rmContainer = (directory) => async (path8) => {
|
|
2505
|
-
await
|
|
2972
|
+
await fs15.rm(join16(directory, path8), { recursive: true });
|
|
2506
2973
|
invalidateFileCache();
|
|
2507
2974
|
};
|
|
2508
2975
|
var rmContainerById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -2519,7 +2986,7 @@ var writeContainerToService = (directory) => async (container, service, options
|
|
|
2519
2986
|
throw new Error("Service not found");
|
|
2520
2987
|
}
|
|
2521
2988
|
let pathForContainer = service.version && service.version !== "latest" ? `${resourcePath.directory}/versioned/${service.version}/containers` : `${resourcePath.directory}/containers`;
|
|
2522
|
-
pathForContainer =
|
|
2989
|
+
pathForContainer = join16(pathForContainer, container.id);
|
|
2523
2990
|
await writeResource(directory, { ...container }, { ...options, path: pathForContainer, type: "container" });
|
|
2524
2991
|
};
|
|
2525
2992
|
|
|
@@ -2535,8 +3002,8 @@ var addFileToDataStore = addFileToContainer;
|
|
|
2535
3002
|
var writeDataStoreToService = writeContainerToService;
|
|
2536
3003
|
|
|
2537
3004
|
// src/data-products.ts
|
|
2538
|
-
import
|
|
2539
|
-
import { join as
|
|
3005
|
+
import fs16 from "fs/promises";
|
|
3006
|
+
import { join as join17 } from "path";
|
|
2540
3007
|
var getDataProduct = (directory) => async (id, version) => getResource(directory, id, version, { type: "data-product" });
|
|
2541
3008
|
var getDataProducts = (directory) => async (options) => getResources(directory, { type: "data-products", latestOnly: options?.latestOnly });
|
|
2542
3009
|
var writeDataProduct = (directory) => async (dataProduct, options = {
|
|
@@ -2546,11 +3013,11 @@ var writeDataProduct = (directory) => async (dataProduct, options = {
|
|
|
2546
3013
|
}) => writeResource(directory, { ...dataProduct }, { ...options, type: "data-product" });
|
|
2547
3014
|
var writeDataProductToDomain = (directory) => async (dataProduct, domain, options = { path: "", format: "mdx", override: false }) => {
|
|
2548
3015
|
let pathForDataProduct = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/data-products` : `/${domain.id}/data-products`;
|
|
2549
|
-
pathForDataProduct =
|
|
3016
|
+
pathForDataProduct = join17(pathForDataProduct, dataProduct.id);
|
|
2550
3017
|
await writeResource(directory, { ...dataProduct }, { ...options, path: pathForDataProduct, type: "data-product" });
|
|
2551
3018
|
};
|
|
2552
3019
|
var rmDataProduct = (directory) => async (path8) => {
|
|
2553
|
-
await
|
|
3020
|
+
await fs16.rm(join17(directory, path8), { recursive: true });
|
|
2554
3021
|
invalidateFileCache();
|
|
2555
3022
|
};
|
|
2556
3023
|
var rmDataProductById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -2564,8 +3031,8 @@ var dataProductHasVersion = (directory) => async (id, version) => {
|
|
|
2564
3031
|
var addFileToDataProduct = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
|
|
2565
3032
|
|
|
2566
3033
|
// src/diagrams.ts
|
|
2567
|
-
import
|
|
2568
|
-
import { join as
|
|
3034
|
+
import fs17 from "fs/promises";
|
|
3035
|
+
import { join as join18 } from "path";
|
|
2569
3036
|
var getDiagram = (directory) => async (id, version) => getResource(directory, id, version, { type: "diagram" });
|
|
2570
3037
|
var getDiagrams = (directory) => async (options) => getResources(directory, { type: "diagrams", latestOnly: options?.latestOnly });
|
|
2571
3038
|
var writeDiagram = (directory) => async (diagram, options = {
|
|
@@ -2574,7 +3041,7 @@ var writeDiagram = (directory) => async (diagram, options = {
|
|
|
2574
3041
|
format: "mdx"
|
|
2575
3042
|
}) => writeResource(directory, { ...diagram }, { ...options, type: "diagram" });
|
|
2576
3043
|
var rmDiagram = (directory) => async (path8) => {
|
|
2577
|
-
await
|
|
3044
|
+
await fs17.rm(join18(directory, path8), { recursive: true });
|
|
2578
3045
|
invalidateFileCache();
|
|
2579
3046
|
};
|
|
2580
3047
|
var rmDiagramById = (directory) => async (id, version, persistFiles) => {
|
|
@@ -2596,13 +3063,13 @@ var src_default = (path8) => {
|
|
|
2596
3063
|
* @param version - Optional id of the version to get (supports semver)
|
|
2597
3064
|
* @returns Event|Undefined
|
|
2598
3065
|
*/
|
|
2599
|
-
getEvent: getEvent(
|
|
3066
|
+
getEvent: getEvent(join19(path8)),
|
|
2600
3067
|
/**
|
|
2601
3068
|
* Returns all events from EventCatalog
|
|
2602
3069
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
2603
3070
|
* @returns Event[]|Undefined
|
|
2604
3071
|
*/
|
|
2605
|
-
getEvents: getEvents(
|
|
3072
|
+
getEvents: getEvents(join19(path8)),
|
|
2606
3073
|
/**
|
|
2607
3074
|
* Adds an event to EventCatalog
|
|
2608
3075
|
*
|
|
@@ -2610,7 +3077,7 @@ var src_default = (path8) => {
|
|
|
2610
3077
|
* @param options - Optional options to write the event
|
|
2611
3078
|
*
|
|
2612
3079
|
*/
|
|
2613
|
-
writeEvent: writeEvent(
|
|
3080
|
+
writeEvent: writeEvent(join19(path8, "events")),
|
|
2614
3081
|
/**
|
|
2615
3082
|
* Adds an event to a service in EventCatalog
|
|
2616
3083
|
*
|
|
@@ -2619,26 +3086,26 @@ var src_default = (path8) => {
|
|
|
2619
3086
|
* @param options - Optional options to write the event
|
|
2620
3087
|
*
|
|
2621
3088
|
*/
|
|
2622
|
-
writeEventToService: writeEventToService(
|
|
3089
|
+
writeEventToService: writeEventToService(join19(path8)),
|
|
2623
3090
|
/**
|
|
2624
3091
|
* Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
|
|
2625
3092
|
*
|
|
2626
3093
|
* @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
|
|
2627
3094
|
*
|
|
2628
3095
|
*/
|
|
2629
|
-
rmEvent: rmEvent(
|
|
3096
|
+
rmEvent: rmEvent(join19(path8, "events")),
|
|
2630
3097
|
/**
|
|
2631
3098
|
* Remove an event by an Event id
|
|
2632
3099
|
*
|
|
2633
3100
|
* @param id - The id of the event you want to remove
|
|
2634
3101
|
*
|
|
2635
3102
|
*/
|
|
2636
|
-
rmEventById: rmEventById(
|
|
3103
|
+
rmEventById: rmEventById(join19(path8)),
|
|
2637
3104
|
/**
|
|
2638
3105
|
* Moves a given event id to the version directory
|
|
2639
3106
|
* @param directory
|
|
2640
3107
|
*/
|
|
2641
|
-
versionEvent: versionEvent(
|
|
3108
|
+
versionEvent: versionEvent(join19(path8)),
|
|
2642
3109
|
/**
|
|
2643
3110
|
* Adds a file to the given event
|
|
2644
3111
|
* @param id - The id of the event to add the file to
|
|
@@ -2646,7 +3113,7 @@ var src_default = (path8) => {
|
|
|
2646
3113
|
* @param version - Optional version of the event to add the file to
|
|
2647
3114
|
* @returns
|
|
2648
3115
|
*/
|
|
2649
|
-
addFileToEvent: addFileToEvent(
|
|
3116
|
+
addFileToEvent: addFileToEvent(join19(path8)),
|
|
2650
3117
|
/**
|
|
2651
3118
|
* Adds a schema to the given event
|
|
2652
3119
|
* @param id - The id of the event to add the schema to
|
|
@@ -2654,17 +3121,17 @@ var src_default = (path8) => {
|
|
|
2654
3121
|
* @param version - Optional version of the event to add the schema to
|
|
2655
3122
|
* @returns
|
|
2656
3123
|
*/
|
|
2657
|
-
addSchemaToEvent: addSchemaToEvent(
|
|
3124
|
+
addSchemaToEvent: addSchemaToEvent(join19(path8)),
|
|
2658
3125
|
/**
|
|
2659
3126
|
* Check to see if an event version exists
|
|
2660
3127
|
* @param id - The id of the event
|
|
2661
3128
|
* @param version - The version of the event (supports semver)
|
|
2662
3129
|
* @returns
|
|
2663
3130
|
*/
|
|
2664
|
-
eventHasVersion: eventHasVersion(
|
|
2665
|
-
addExampleToEvent: addExampleToEvent(
|
|
2666
|
-
getExamplesFromEvent: getExamplesFromEvent(
|
|
2667
|
-
removeExampleFromEvent: removeExampleFromEvent(
|
|
3131
|
+
eventHasVersion: eventHasVersion(join19(path8)),
|
|
3132
|
+
addExampleToEvent: addExampleToEvent(join19(path8)),
|
|
3133
|
+
getExamplesFromEvent: getExamplesFromEvent(join19(path8)),
|
|
3134
|
+
removeExampleFromEvent: removeExampleFromEvent(join19(path8)),
|
|
2668
3135
|
/**
|
|
2669
3136
|
* ================================
|
|
2670
3137
|
* Commands
|
|
@@ -2676,13 +3143,13 @@ var src_default = (path8) => {
|
|
|
2676
3143
|
* @param version - Optional id of the version to get (supports semver)
|
|
2677
3144
|
* @returns Command|Undefined
|
|
2678
3145
|
*/
|
|
2679
|
-
getCommand: getCommand(
|
|
3146
|
+
getCommand: getCommand(join19(path8)),
|
|
2680
3147
|
/**
|
|
2681
3148
|
* Returns all commands from EventCatalog
|
|
2682
3149
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
2683
3150
|
* @returns Command[]|Undefined
|
|
2684
3151
|
*/
|
|
2685
|
-
getCommands: getCommands(
|
|
3152
|
+
getCommands: getCommands(join19(path8)),
|
|
2686
3153
|
/**
|
|
2687
3154
|
* Adds an command to EventCatalog
|
|
2688
3155
|
*
|
|
@@ -2690,7 +3157,7 @@ var src_default = (path8) => {
|
|
|
2690
3157
|
* @param options - Optional options to write the command
|
|
2691
3158
|
*
|
|
2692
3159
|
*/
|
|
2693
|
-
writeCommand: writeCommand(
|
|
3160
|
+
writeCommand: writeCommand(join19(path8, "commands")),
|
|
2694
3161
|
/**
|
|
2695
3162
|
* Adds a command to a service in EventCatalog
|
|
2696
3163
|
*
|
|
@@ -2699,26 +3166,26 @@ var src_default = (path8) => {
|
|
|
2699
3166
|
* @param options - Optional options to write the command
|
|
2700
3167
|
*
|
|
2701
3168
|
*/
|
|
2702
|
-
writeCommandToService: writeCommandToService(
|
|
3169
|
+
writeCommandToService: writeCommandToService(join19(path8)),
|
|
2703
3170
|
/**
|
|
2704
3171
|
* Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
|
|
2705
3172
|
*
|
|
2706
3173
|
* @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
|
|
2707
3174
|
*
|
|
2708
3175
|
*/
|
|
2709
|
-
rmCommand: rmCommand(
|
|
3176
|
+
rmCommand: rmCommand(join19(path8, "commands")),
|
|
2710
3177
|
/**
|
|
2711
3178
|
* Remove an command by an Event id
|
|
2712
3179
|
*
|
|
2713
3180
|
* @param id - The id of the command you want to remove
|
|
2714
3181
|
*
|
|
2715
3182
|
*/
|
|
2716
|
-
rmCommandById: rmCommandById(
|
|
3183
|
+
rmCommandById: rmCommandById(join19(path8)),
|
|
2717
3184
|
/**
|
|
2718
3185
|
* Moves a given command id to the version directory
|
|
2719
3186
|
* @param directory
|
|
2720
3187
|
*/
|
|
2721
|
-
versionCommand: versionCommand(
|
|
3188
|
+
versionCommand: versionCommand(join19(path8)),
|
|
2722
3189
|
/**
|
|
2723
3190
|
* Adds a file to the given command
|
|
2724
3191
|
* @param id - The id of the command to add the file to
|
|
@@ -2726,7 +3193,7 @@ var src_default = (path8) => {
|
|
|
2726
3193
|
* @param version - Optional version of the command to add the file to
|
|
2727
3194
|
* @returns
|
|
2728
3195
|
*/
|
|
2729
|
-
addFileToCommand: addFileToCommand(
|
|
3196
|
+
addFileToCommand: addFileToCommand(join19(path8)),
|
|
2730
3197
|
/**
|
|
2731
3198
|
* Adds a schema to the given command
|
|
2732
3199
|
* @param id - The id of the command to add the schema to
|
|
@@ -2734,17 +3201,17 @@ var src_default = (path8) => {
|
|
|
2734
3201
|
* @param version - Optional version of the command to add the schema to
|
|
2735
3202
|
* @returns
|
|
2736
3203
|
*/
|
|
2737
|
-
addSchemaToCommand: addSchemaToCommand(
|
|
3204
|
+
addSchemaToCommand: addSchemaToCommand(join19(path8)),
|
|
2738
3205
|
/**
|
|
2739
3206
|
* Check to see if a command version exists
|
|
2740
3207
|
* @param id - The id of the command
|
|
2741
3208
|
* @param version - The version of the command (supports semver)
|
|
2742
3209
|
* @returns
|
|
2743
3210
|
*/
|
|
2744
|
-
commandHasVersion: commandHasVersion(
|
|
2745
|
-
addExampleToCommand: addExampleToCommand(
|
|
2746
|
-
getExamplesFromCommand: getExamplesFromCommand(
|
|
2747
|
-
removeExampleFromCommand: removeExampleFromCommand(
|
|
3211
|
+
commandHasVersion: commandHasVersion(join19(path8)),
|
|
3212
|
+
addExampleToCommand: addExampleToCommand(join19(path8)),
|
|
3213
|
+
getExamplesFromCommand: getExamplesFromCommand(join19(path8)),
|
|
3214
|
+
removeExampleFromCommand: removeExampleFromCommand(join19(path8)),
|
|
2748
3215
|
/**
|
|
2749
3216
|
* ================================
|
|
2750
3217
|
* Queries
|
|
@@ -2756,13 +3223,13 @@ var src_default = (path8) => {
|
|
|
2756
3223
|
* @param version - Optional id of the version to get (supports semver)
|
|
2757
3224
|
* @returns Query|Undefined
|
|
2758
3225
|
*/
|
|
2759
|
-
getQuery: getQuery(
|
|
3226
|
+
getQuery: getQuery(join19(path8)),
|
|
2760
3227
|
/**
|
|
2761
3228
|
* Returns all queries from EventCatalog
|
|
2762
3229
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
2763
3230
|
* @returns Query[]|Undefined
|
|
2764
3231
|
*/
|
|
2765
|
-
getQueries: getQueries(
|
|
3232
|
+
getQueries: getQueries(join19(path8)),
|
|
2766
3233
|
/**
|
|
2767
3234
|
* Adds a query to EventCatalog
|
|
2768
3235
|
*
|
|
@@ -2770,7 +3237,7 @@ var src_default = (path8) => {
|
|
|
2770
3237
|
* @param options - Optional options to write the event
|
|
2771
3238
|
*
|
|
2772
3239
|
*/
|
|
2773
|
-
writeQuery: writeQuery(
|
|
3240
|
+
writeQuery: writeQuery(join19(path8, "queries")),
|
|
2774
3241
|
/**
|
|
2775
3242
|
* Adds a query to a service in EventCatalog
|
|
2776
3243
|
*
|
|
@@ -2779,26 +3246,26 @@ var src_default = (path8) => {
|
|
|
2779
3246
|
* @param options - Optional options to write the query
|
|
2780
3247
|
*
|
|
2781
3248
|
*/
|
|
2782
|
-
writeQueryToService: writeQueryToService(
|
|
3249
|
+
writeQueryToService: writeQueryToService(join19(path8)),
|
|
2783
3250
|
/**
|
|
2784
3251
|
* Remove an query to EventCatalog (modeled on the standard POSIX rm utility)
|
|
2785
3252
|
*
|
|
2786
3253
|
* @param path - The path to your query, e.g. `/Orders/GetOrder`
|
|
2787
3254
|
*
|
|
2788
3255
|
*/
|
|
2789
|
-
rmQuery: rmQuery(
|
|
3256
|
+
rmQuery: rmQuery(join19(path8, "queries")),
|
|
2790
3257
|
/**
|
|
2791
3258
|
* Remove a query by a Query id
|
|
2792
3259
|
*
|
|
2793
3260
|
* @param id - The id of the query you want to remove
|
|
2794
3261
|
*
|
|
2795
3262
|
*/
|
|
2796
|
-
rmQueryById: rmQueryById(
|
|
3263
|
+
rmQueryById: rmQueryById(join19(path8)),
|
|
2797
3264
|
/**
|
|
2798
3265
|
* Moves a given query id to the version directory
|
|
2799
3266
|
* @param directory
|
|
2800
3267
|
*/
|
|
2801
|
-
versionQuery: versionQuery(
|
|
3268
|
+
versionQuery: versionQuery(join19(path8)),
|
|
2802
3269
|
/**
|
|
2803
3270
|
* Adds a file to the given query
|
|
2804
3271
|
* @param id - The id of the query to add the file to
|
|
@@ -2806,7 +3273,7 @@ var src_default = (path8) => {
|
|
|
2806
3273
|
* @param version - Optional version of the query to add the file to
|
|
2807
3274
|
* @returns
|
|
2808
3275
|
*/
|
|
2809
|
-
addFileToQuery: addFileToQuery(
|
|
3276
|
+
addFileToQuery: addFileToQuery(join19(path8)),
|
|
2810
3277
|
/**
|
|
2811
3278
|
* Adds a schema to the given query
|
|
2812
3279
|
* @param id - The id of the query to add the schema to
|
|
@@ -2814,17 +3281,17 @@ var src_default = (path8) => {
|
|
|
2814
3281
|
* @param version - Optional version of the query to add the schema to
|
|
2815
3282
|
* @returns
|
|
2816
3283
|
*/
|
|
2817
|
-
addSchemaToQuery: addSchemaToQuery(
|
|
3284
|
+
addSchemaToQuery: addSchemaToQuery(join19(path8)),
|
|
2818
3285
|
/**
|
|
2819
3286
|
* Check to see if an query version exists
|
|
2820
3287
|
* @param id - The id of the query
|
|
2821
3288
|
* @param version - The version of the query (supports semver)
|
|
2822
3289
|
* @returns
|
|
2823
3290
|
*/
|
|
2824
|
-
queryHasVersion: queryHasVersion(
|
|
2825
|
-
addExampleToQuery: addExampleToQuery(
|
|
2826
|
-
getExamplesFromQuery: getExamplesFromQuery(
|
|
2827
|
-
removeExampleFromQuery: removeExampleFromQuery(
|
|
3291
|
+
queryHasVersion: queryHasVersion(join19(path8)),
|
|
3292
|
+
addExampleToQuery: addExampleToQuery(join19(path8)),
|
|
3293
|
+
getExamplesFromQuery: getExamplesFromQuery(join19(path8)),
|
|
3294
|
+
removeExampleFromQuery: removeExampleFromQuery(join19(path8)),
|
|
2828
3295
|
/**
|
|
2829
3296
|
* ================================
|
|
2830
3297
|
* Channels
|
|
@@ -2836,13 +3303,13 @@ var src_default = (path8) => {
|
|
|
2836
3303
|
* @param version - Optional id of the version to get (supports semver)
|
|
2837
3304
|
* @returns Channel|Undefined
|
|
2838
3305
|
*/
|
|
2839
|
-
getChannel: getChannel(
|
|
3306
|
+
getChannel: getChannel(join19(path8)),
|
|
2840
3307
|
/**
|
|
2841
3308
|
* Returns all channels from EventCatalog
|
|
2842
3309
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
2843
3310
|
* @returns Channel[]|Undefined
|
|
2844
3311
|
*/
|
|
2845
|
-
getChannels: getChannels(
|
|
3312
|
+
getChannels: getChannels(join19(path8)),
|
|
2846
3313
|
/**
|
|
2847
3314
|
* Adds an channel to EventCatalog
|
|
2848
3315
|
*
|
|
@@ -2850,33 +3317,33 @@ var src_default = (path8) => {
|
|
|
2850
3317
|
* @param options - Optional options to write the channel
|
|
2851
3318
|
*
|
|
2852
3319
|
*/
|
|
2853
|
-
writeChannel: writeChannel(
|
|
3320
|
+
writeChannel: writeChannel(join19(path8, "channels")),
|
|
2854
3321
|
/**
|
|
2855
3322
|
* Remove an channel to EventCatalog (modeled on the standard POSIX rm utility)
|
|
2856
3323
|
*
|
|
2857
3324
|
* @param path - The path to your channel, e.g. `/Inventory/InventoryAdjusted`
|
|
2858
3325
|
*
|
|
2859
3326
|
*/
|
|
2860
|
-
rmChannel: rmChannel(
|
|
3327
|
+
rmChannel: rmChannel(join19(path8, "channels")),
|
|
2861
3328
|
/**
|
|
2862
3329
|
* Remove an channel by an Event id
|
|
2863
3330
|
*
|
|
2864
3331
|
* @param id - The id of the channel you want to remove
|
|
2865
3332
|
*
|
|
2866
3333
|
*/
|
|
2867
|
-
rmChannelById: rmChannelById(
|
|
3334
|
+
rmChannelById: rmChannelById(join19(path8)),
|
|
2868
3335
|
/**
|
|
2869
3336
|
* Moves a given channel id to the version directory
|
|
2870
3337
|
* @param directory
|
|
2871
3338
|
*/
|
|
2872
|
-
versionChannel: versionChannel(
|
|
3339
|
+
versionChannel: versionChannel(join19(path8)),
|
|
2873
3340
|
/**
|
|
2874
3341
|
* Check to see if a channel version exists
|
|
2875
3342
|
* @param id - The id of the channel
|
|
2876
3343
|
* @param version - The version of the channel (supports semver)
|
|
2877
3344
|
* @returns
|
|
2878
3345
|
*/
|
|
2879
|
-
channelHasVersion: channelHasVersion(
|
|
3346
|
+
channelHasVersion: channelHasVersion(join19(path8)),
|
|
2880
3347
|
/**
|
|
2881
3348
|
* Add a channel to an event
|
|
2882
3349
|
*
|
|
@@ -2893,7 +3360,7 @@ var src_default = (path8) => {
|
|
|
2893
3360
|
*
|
|
2894
3361
|
* ```
|
|
2895
3362
|
*/
|
|
2896
|
-
addEventToChannel: addMessageToChannel(
|
|
3363
|
+
addEventToChannel: addMessageToChannel(join19(path8), "events"),
|
|
2897
3364
|
/**
|
|
2898
3365
|
* Add a channel to an command
|
|
2899
3366
|
*
|
|
@@ -2910,7 +3377,7 @@ var src_default = (path8) => {
|
|
|
2910
3377
|
*
|
|
2911
3378
|
* ```
|
|
2912
3379
|
*/
|
|
2913
|
-
addCommandToChannel: addMessageToChannel(
|
|
3380
|
+
addCommandToChannel: addMessageToChannel(join19(path8), "commands"),
|
|
2914
3381
|
/**
|
|
2915
3382
|
* Add a channel to an query
|
|
2916
3383
|
*
|
|
@@ -2927,7 +3394,7 @@ var src_default = (path8) => {
|
|
|
2927
3394
|
*
|
|
2928
3395
|
* ```
|
|
2929
3396
|
*/
|
|
2930
|
-
addQueryToChannel: addMessageToChannel(
|
|
3397
|
+
addQueryToChannel: addMessageToChannel(join19(path8), "queries"),
|
|
2931
3398
|
/**
|
|
2932
3399
|
* ================================
|
|
2933
3400
|
* SERVICES
|
|
@@ -2940,14 +3407,14 @@ var src_default = (path8) => {
|
|
|
2940
3407
|
* @param options - Optional options to write the event
|
|
2941
3408
|
*
|
|
2942
3409
|
*/
|
|
2943
|
-
writeService: writeService(
|
|
3410
|
+
writeService: writeService(join19(path8, "services")),
|
|
2944
3411
|
/**
|
|
2945
3412
|
* Adds a versioned service to EventCatalog
|
|
2946
3413
|
*
|
|
2947
3414
|
* @param service - The service to write
|
|
2948
3415
|
*
|
|
2949
3416
|
*/
|
|
2950
|
-
writeVersionedService: writeVersionedService(
|
|
3417
|
+
writeVersionedService: writeVersionedService(join19(path8, "services")),
|
|
2951
3418
|
/**
|
|
2952
3419
|
* Adds a service to a domain in EventCatalog
|
|
2953
3420
|
*
|
|
@@ -2956,45 +3423,45 @@ var src_default = (path8) => {
|
|
|
2956
3423
|
* @param options - Optional options to write the event
|
|
2957
3424
|
*
|
|
2958
3425
|
*/
|
|
2959
|
-
writeServiceToDomain: writeServiceToDomain(
|
|
3426
|
+
writeServiceToDomain: writeServiceToDomain(join19(path8, "domains")),
|
|
2960
3427
|
/**
|
|
2961
3428
|
* Returns a service from EventCatalog
|
|
2962
3429
|
* @param id - The id of the service to retrieve
|
|
2963
3430
|
* @param version - Optional id of the version to get (supports semver)
|
|
2964
3431
|
* @returns Service|Undefined
|
|
2965
3432
|
*/
|
|
2966
|
-
getService: getService(
|
|
3433
|
+
getService: getService(join19(path8)),
|
|
2967
3434
|
/**
|
|
2968
3435
|
* Returns a service from EventCatalog by it's path.
|
|
2969
3436
|
* @param path - The path to the service to retrieve
|
|
2970
3437
|
* @returns Service|Undefined
|
|
2971
3438
|
*/
|
|
2972
|
-
getServiceByPath: getServiceByPath(
|
|
3439
|
+
getServiceByPath: getServiceByPath(join19(path8)),
|
|
2973
3440
|
/**
|
|
2974
3441
|
* Returns all services from EventCatalog
|
|
2975
3442
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
2976
3443
|
* @returns Service[]|Undefined
|
|
2977
3444
|
*/
|
|
2978
|
-
getServices: getServices(
|
|
3445
|
+
getServices: getServices(join19(path8)),
|
|
2979
3446
|
/**
|
|
2980
3447
|
* Moves a given service id to the version directory
|
|
2981
3448
|
* @param directory
|
|
2982
3449
|
*/
|
|
2983
|
-
versionService: versionService(
|
|
3450
|
+
versionService: versionService(join19(path8)),
|
|
2984
3451
|
/**
|
|
2985
3452
|
* Remove a service from EventCatalog (modeled on the standard POSIX rm utility)
|
|
2986
3453
|
*
|
|
2987
3454
|
* @param path - The path to your service, e.g. `/InventoryService`
|
|
2988
3455
|
*
|
|
2989
3456
|
*/
|
|
2990
|
-
rmService: rmService(
|
|
3457
|
+
rmService: rmService(join19(path8, "services")),
|
|
2991
3458
|
/**
|
|
2992
3459
|
* Remove an service by an service id
|
|
2993
3460
|
*
|
|
2994
3461
|
* @param id - The id of the service you want to remove
|
|
2995
3462
|
*
|
|
2996
3463
|
*/
|
|
2997
|
-
rmServiceById: rmServiceById(
|
|
3464
|
+
rmServiceById: rmServiceById(join19(path8)),
|
|
2998
3465
|
/**
|
|
2999
3466
|
* Adds a file to the given service
|
|
3000
3467
|
* @param id - The id of the service to add the file to
|
|
@@ -3002,21 +3469,21 @@ var src_default = (path8) => {
|
|
|
3002
3469
|
* @param version - Optional version of the service to add the file to
|
|
3003
3470
|
* @returns
|
|
3004
3471
|
*/
|
|
3005
|
-
addFileToService: addFileToService(
|
|
3472
|
+
addFileToService: addFileToService(join19(path8)),
|
|
3006
3473
|
/**
|
|
3007
3474
|
* Returns the specifications for a given service
|
|
3008
3475
|
* @param id - The id of the service to retrieve the specifications for
|
|
3009
3476
|
* @param version - Optional version of the service
|
|
3010
3477
|
* @returns
|
|
3011
3478
|
*/
|
|
3012
|
-
getSpecificationFilesForService: getSpecificationFilesForService(
|
|
3479
|
+
getSpecificationFilesForService: getSpecificationFilesForService(join19(path8)),
|
|
3013
3480
|
/**
|
|
3014
3481
|
* Check to see if a service version exists
|
|
3015
3482
|
* @param id - The id of the service
|
|
3016
3483
|
* @param version - The version of the service (supports semver)
|
|
3017
3484
|
* @returns
|
|
3018
3485
|
*/
|
|
3019
|
-
serviceHasVersion: serviceHasVersion(
|
|
3486
|
+
serviceHasVersion: serviceHasVersion(join19(path8)),
|
|
3020
3487
|
/**
|
|
3021
3488
|
* Add an event to a service by it's id.
|
|
3022
3489
|
*
|
|
@@ -3036,7 +3503,7 @@ var src_default = (path8) => {
|
|
|
3036
3503
|
*
|
|
3037
3504
|
* ```
|
|
3038
3505
|
*/
|
|
3039
|
-
addEventToService: addMessageToService(
|
|
3506
|
+
addEventToService: addMessageToService(join19(path8)),
|
|
3040
3507
|
/**
|
|
3041
3508
|
* Add a data store to a service by it's id.
|
|
3042
3509
|
*
|
|
@@ -3053,7 +3520,7 @@ var src_default = (path8) => {
|
|
|
3053
3520
|
*
|
|
3054
3521
|
* ```
|
|
3055
3522
|
*/
|
|
3056
|
-
addDataStoreToService: addDataStoreToService(
|
|
3523
|
+
addDataStoreToService: addDataStoreToService(join19(path8)),
|
|
3057
3524
|
/**
|
|
3058
3525
|
* Add a command to a service by it's id.
|
|
3059
3526
|
*
|
|
@@ -3073,7 +3540,7 @@ var src_default = (path8) => {
|
|
|
3073
3540
|
*
|
|
3074
3541
|
* ```
|
|
3075
3542
|
*/
|
|
3076
|
-
addCommandToService: addMessageToService(
|
|
3543
|
+
addCommandToService: addMessageToService(join19(path8)),
|
|
3077
3544
|
/**
|
|
3078
3545
|
* Add a query to a service by it's id.
|
|
3079
3546
|
*
|
|
@@ -3093,7 +3560,7 @@ var src_default = (path8) => {
|
|
|
3093
3560
|
*
|
|
3094
3561
|
* ```
|
|
3095
3562
|
*/
|
|
3096
|
-
addQueryToService: addMessageToService(
|
|
3563
|
+
addQueryToService: addMessageToService(join19(path8)),
|
|
3097
3564
|
/**
|
|
3098
3565
|
* Add an entity to a service by its id.
|
|
3099
3566
|
*
|
|
@@ -3111,7 +3578,7 @@ var src_default = (path8) => {
|
|
|
3111
3578
|
*
|
|
3112
3579
|
* ```
|
|
3113
3580
|
*/
|
|
3114
|
-
addEntityToService: addEntityToService(
|
|
3581
|
+
addEntityToService: addEntityToService(join19(path8)),
|
|
3115
3582
|
/**
|
|
3116
3583
|
* Check to see if a service exists by it's path.
|
|
3117
3584
|
*
|
|
@@ -3128,13 +3595,13 @@ var src_default = (path8) => {
|
|
|
3128
3595
|
* @param path - The path to the service to check
|
|
3129
3596
|
* @returns boolean
|
|
3130
3597
|
*/
|
|
3131
|
-
isService: isService(
|
|
3598
|
+
isService: isService(join19(path8)),
|
|
3132
3599
|
/**
|
|
3133
3600
|
* Converts a file to a service.
|
|
3134
3601
|
* @param file - The file to convert to a service.
|
|
3135
3602
|
* @returns The service.
|
|
3136
3603
|
*/
|
|
3137
|
-
toService: toService(
|
|
3604
|
+
toService: toService(join19(path8)),
|
|
3138
3605
|
/**
|
|
3139
3606
|
* ================================
|
|
3140
3607
|
* Domains
|
|
@@ -3147,39 +3614,39 @@ var src_default = (path8) => {
|
|
|
3147
3614
|
* @param options - Optional options to write the event
|
|
3148
3615
|
*
|
|
3149
3616
|
*/
|
|
3150
|
-
writeDomain: writeDomain(
|
|
3617
|
+
writeDomain: writeDomain(join19(path8, "domains")),
|
|
3151
3618
|
/**
|
|
3152
3619
|
* Returns a domain from EventCatalog
|
|
3153
3620
|
* @param id - The id of the domain to retrieve
|
|
3154
3621
|
* @param version - Optional id of the version to get (supports semver)
|
|
3155
3622
|
* @returns Domain|Undefined
|
|
3156
3623
|
*/
|
|
3157
|
-
getDomain: getDomain(
|
|
3624
|
+
getDomain: getDomain(join19(path8, "domains")),
|
|
3158
3625
|
/**
|
|
3159
3626
|
* Returns all domains from EventCatalog
|
|
3160
3627
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3161
3628
|
* @returns Domain[]|Undefined
|
|
3162
3629
|
*/
|
|
3163
|
-
getDomains: getDomains(
|
|
3630
|
+
getDomains: getDomains(join19(path8)),
|
|
3164
3631
|
/**
|
|
3165
3632
|
* Moves a given domain id to the version directory
|
|
3166
3633
|
* @param directory
|
|
3167
3634
|
*/
|
|
3168
|
-
versionDomain: versionDomain(
|
|
3635
|
+
versionDomain: versionDomain(join19(path8, "domains")),
|
|
3169
3636
|
/**
|
|
3170
3637
|
* Remove a domain from EventCatalog (modeled on the standard POSIX rm utility)
|
|
3171
3638
|
*
|
|
3172
3639
|
* @param path - The path to your domain, e.g. `/Payment`
|
|
3173
3640
|
*
|
|
3174
3641
|
*/
|
|
3175
|
-
rmDomain: rmDomain(
|
|
3642
|
+
rmDomain: rmDomain(join19(path8, "domains")),
|
|
3176
3643
|
/**
|
|
3177
3644
|
* Remove an service by an domain id
|
|
3178
3645
|
*
|
|
3179
3646
|
* @param id - The id of the domain you want to remove
|
|
3180
3647
|
*
|
|
3181
3648
|
*/
|
|
3182
|
-
rmDomainById: rmDomainById(
|
|
3649
|
+
rmDomainById: rmDomainById(join19(path8, "domains")),
|
|
3183
3650
|
/**
|
|
3184
3651
|
* Adds a file to the given domain
|
|
3185
3652
|
* @param id - The id of the domain to add the file to
|
|
@@ -3187,28 +3654,28 @@ var src_default = (path8) => {
|
|
|
3187
3654
|
* @param version - Optional version of the domain to add the file to
|
|
3188
3655
|
* @returns
|
|
3189
3656
|
*/
|
|
3190
|
-
addFileToDomain: addFileToDomain(
|
|
3657
|
+
addFileToDomain: addFileToDomain(join19(path8, "domains")),
|
|
3191
3658
|
/**
|
|
3192
3659
|
* Adds an ubiquitous language dictionary to a domain
|
|
3193
3660
|
* @param id - The id of the domain to add the ubiquitous language to
|
|
3194
3661
|
* @param ubiquitousLanguageDictionary - The ubiquitous language dictionary to add
|
|
3195
3662
|
* @param version - Optional version of the domain to add the ubiquitous language to
|
|
3196
3663
|
*/
|
|
3197
|
-
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain(
|
|
3664
|
+
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain(join19(path8, "domains")),
|
|
3198
3665
|
/**
|
|
3199
3666
|
* Get the ubiquitous language dictionary from a domain
|
|
3200
3667
|
* @param id - The id of the domain to get the ubiquitous language from
|
|
3201
3668
|
* @param version - Optional version of the domain to get the ubiquitous language from
|
|
3202
3669
|
* @returns
|
|
3203
3670
|
*/
|
|
3204
|
-
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain(
|
|
3671
|
+
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain(join19(path8, "domains")),
|
|
3205
3672
|
/**
|
|
3206
3673
|
* Check to see if a domain version exists
|
|
3207
3674
|
* @param id - The id of the domain
|
|
3208
3675
|
* @param version - The version of the domain (supports semver)
|
|
3209
3676
|
* @returns
|
|
3210
3677
|
*/
|
|
3211
|
-
domainHasVersion: domainHasVersion(
|
|
3678
|
+
domainHasVersion: domainHasVersion(join19(path8)),
|
|
3212
3679
|
/**
|
|
3213
3680
|
* Adds a given service to a domain
|
|
3214
3681
|
* @param id - The id of the domain
|
|
@@ -3216,7 +3683,7 @@ var src_default = (path8) => {
|
|
|
3216
3683
|
* @param version - (Optional) The version of the domain to add the service to
|
|
3217
3684
|
* @returns
|
|
3218
3685
|
*/
|
|
3219
|
-
addServiceToDomain: addServiceToDomain(
|
|
3686
|
+
addServiceToDomain: addServiceToDomain(join19(path8, "domains")),
|
|
3220
3687
|
/**
|
|
3221
3688
|
* Adds a given subdomain to a domain
|
|
3222
3689
|
* @param id - The id of the domain
|
|
@@ -3224,7 +3691,7 @@ var src_default = (path8) => {
|
|
|
3224
3691
|
* @param version - (Optional) The version of the domain to add the subdomain to
|
|
3225
3692
|
* @returns
|
|
3226
3693
|
*/
|
|
3227
|
-
addSubDomainToDomain: addSubDomainToDomain(
|
|
3694
|
+
addSubDomainToDomain: addSubDomainToDomain(join19(path8, "domains")),
|
|
3228
3695
|
/**
|
|
3229
3696
|
* Adds an entity to a domain
|
|
3230
3697
|
* @param id - The id of the domain
|
|
@@ -3232,7 +3699,7 @@ var src_default = (path8) => {
|
|
|
3232
3699
|
* @param version - (Optional) The version of the domain to add the entity to
|
|
3233
3700
|
* @returns
|
|
3234
3701
|
*/
|
|
3235
|
-
addEntityToDomain: addEntityToDomain(
|
|
3702
|
+
addEntityToDomain: addEntityToDomain(join19(path8, "domains")),
|
|
3236
3703
|
/**
|
|
3237
3704
|
* Add an event to a domain by its id.
|
|
3238
3705
|
*
|
|
@@ -3250,7 +3717,7 @@ var src_default = (path8) => {
|
|
|
3250
3717
|
*
|
|
3251
3718
|
* ```
|
|
3252
3719
|
*/
|
|
3253
|
-
addEventToDomain: addMessageToDomain(
|
|
3720
|
+
addEventToDomain: addMessageToDomain(join19(path8, "domains")),
|
|
3254
3721
|
/**
|
|
3255
3722
|
* Add a command to a domain by its id.
|
|
3256
3723
|
*
|
|
@@ -3268,7 +3735,7 @@ var src_default = (path8) => {
|
|
|
3268
3735
|
*
|
|
3269
3736
|
* ```
|
|
3270
3737
|
*/
|
|
3271
|
-
addCommandToDomain: addMessageToDomain(
|
|
3738
|
+
addCommandToDomain: addMessageToDomain(join19(path8, "domains")),
|
|
3272
3739
|
/**
|
|
3273
3740
|
* Add a query to a domain by its id.
|
|
3274
3741
|
*
|
|
@@ -3286,7 +3753,7 @@ var src_default = (path8) => {
|
|
|
3286
3753
|
*
|
|
3287
3754
|
* ```
|
|
3288
3755
|
*/
|
|
3289
|
-
addQueryToDomain: addMessageToDomain(
|
|
3756
|
+
addQueryToDomain: addMessageToDomain(join19(path8, "domains")),
|
|
3290
3757
|
/**
|
|
3291
3758
|
* ================================
|
|
3292
3759
|
* Teams
|
|
@@ -3299,25 +3766,25 @@ var src_default = (path8) => {
|
|
|
3299
3766
|
* @param options - Optional options to write the team
|
|
3300
3767
|
*
|
|
3301
3768
|
*/
|
|
3302
|
-
writeTeam: writeTeam(
|
|
3769
|
+
writeTeam: writeTeam(join19(path8, "teams")),
|
|
3303
3770
|
/**
|
|
3304
3771
|
* Returns a team from EventCatalog
|
|
3305
3772
|
* @param id - The id of the team to retrieve
|
|
3306
3773
|
* @returns Team|Undefined
|
|
3307
3774
|
*/
|
|
3308
|
-
getTeam: getTeam(
|
|
3775
|
+
getTeam: getTeam(join19(path8, "teams")),
|
|
3309
3776
|
/**
|
|
3310
3777
|
* Returns all teams from EventCatalog
|
|
3311
3778
|
* @returns Team[]|Undefined
|
|
3312
3779
|
*/
|
|
3313
|
-
getTeams: getTeams(
|
|
3780
|
+
getTeams: getTeams(join19(path8, "teams")),
|
|
3314
3781
|
/**
|
|
3315
3782
|
* Remove a team by the team id
|
|
3316
3783
|
*
|
|
3317
3784
|
* @param id - The id of the team you want to remove
|
|
3318
3785
|
*
|
|
3319
3786
|
*/
|
|
3320
|
-
rmTeamById: rmTeamById(
|
|
3787
|
+
rmTeamById: rmTeamById(join19(path8, "teams")),
|
|
3321
3788
|
/**
|
|
3322
3789
|
* ================================
|
|
3323
3790
|
* Users
|
|
@@ -3330,25 +3797,25 @@ var src_default = (path8) => {
|
|
|
3330
3797
|
* @param options - Optional options to write the user
|
|
3331
3798
|
*
|
|
3332
3799
|
*/
|
|
3333
|
-
writeUser: writeUser(
|
|
3800
|
+
writeUser: writeUser(join19(path8, "users")),
|
|
3334
3801
|
/**
|
|
3335
3802
|
* Returns a user from EventCatalog
|
|
3336
3803
|
* @param id - The id of the user to retrieve
|
|
3337
3804
|
* @returns User|Undefined
|
|
3338
3805
|
*/
|
|
3339
|
-
getUser: getUser(
|
|
3806
|
+
getUser: getUser(join19(path8, "users")),
|
|
3340
3807
|
/**
|
|
3341
3808
|
* Returns all user from EventCatalog
|
|
3342
3809
|
* @returns User[]|Undefined
|
|
3343
3810
|
*/
|
|
3344
|
-
getUsers: getUsers(
|
|
3811
|
+
getUsers: getUsers(join19(path8)),
|
|
3345
3812
|
/**
|
|
3346
3813
|
* Remove a user by the user id
|
|
3347
3814
|
*
|
|
3348
3815
|
* @param id - The id of the user you want to remove
|
|
3349
3816
|
*
|
|
3350
3817
|
*/
|
|
3351
|
-
rmUserById: rmUserById(
|
|
3818
|
+
rmUserById: rmUserById(join19(path8, "users")),
|
|
3352
3819
|
/**
|
|
3353
3820
|
* ================================
|
|
3354
3821
|
* Custom Docs
|
|
@@ -3359,32 +3826,32 @@ var src_default = (path8) => {
|
|
|
3359
3826
|
* @param path - The path to the custom doc to retrieve
|
|
3360
3827
|
* @returns CustomDoc|Undefined
|
|
3361
3828
|
*/
|
|
3362
|
-
getCustomDoc: getCustomDoc(
|
|
3829
|
+
getCustomDoc: getCustomDoc(join19(path8, "docs")),
|
|
3363
3830
|
/**
|
|
3364
3831
|
* Returns all custom docs from EventCatalog
|
|
3365
3832
|
* @param options - Optional options to get custom docs from a specific path
|
|
3366
3833
|
* @returns CustomDoc[]|Undefined
|
|
3367
3834
|
*/
|
|
3368
|
-
getCustomDocs: getCustomDocs(
|
|
3835
|
+
getCustomDocs: getCustomDocs(join19(path8, "docs")),
|
|
3369
3836
|
/**
|
|
3370
3837
|
* Writes a custom doc to EventCatalog
|
|
3371
3838
|
* @param customDoc - The custom doc to write
|
|
3372
3839
|
* @param options - Optional options to write the custom doc
|
|
3373
3840
|
*
|
|
3374
3841
|
*/
|
|
3375
|
-
writeCustomDoc: writeCustomDoc(
|
|
3842
|
+
writeCustomDoc: writeCustomDoc(join19(path8, "docs")),
|
|
3376
3843
|
/**
|
|
3377
3844
|
* Removes a custom doc from EventCatalog
|
|
3378
3845
|
* @param path - The path to the custom doc to remove
|
|
3379
3846
|
*
|
|
3380
3847
|
*/
|
|
3381
|
-
rmCustomDoc: rmCustomDoc(
|
|
3848
|
+
rmCustomDoc: rmCustomDoc(join19(path8, "docs")),
|
|
3382
3849
|
/**
|
|
3383
3850
|
* Dumps the catalog to a JSON file.
|
|
3384
3851
|
* @param directory - The directory to dump the catalog to
|
|
3385
3852
|
* @returns A JSON file with the catalog
|
|
3386
3853
|
*/
|
|
3387
|
-
dumpCatalog: dumpCatalog(
|
|
3854
|
+
dumpCatalog: dumpCatalog(join19(path8)),
|
|
3388
3855
|
/**
|
|
3389
3856
|
* Returns the event catalog configuration file.
|
|
3390
3857
|
* The event catalog configuration file is the file that contains the configuration for the event catalog.
|
|
@@ -3392,7 +3859,7 @@ var src_default = (path8) => {
|
|
|
3392
3859
|
* @param directory - The directory of the catalog.
|
|
3393
3860
|
* @returns A JSON object with the configuration for the event catalog.
|
|
3394
3861
|
*/
|
|
3395
|
-
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile(
|
|
3862
|
+
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile(join19(path8)),
|
|
3396
3863
|
/**
|
|
3397
3864
|
* ================================
|
|
3398
3865
|
* Changelogs
|
|
@@ -3406,7 +3873,7 @@ var src_default = (path8) => {
|
|
|
3406
3873
|
* @param options - Optional options (version, format)
|
|
3407
3874
|
*
|
|
3408
3875
|
*/
|
|
3409
|
-
writeChangelog: writeChangelog(
|
|
3876
|
+
writeChangelog: writeChangelog(join19(path8)),
|
|
3410
3877
|
/**
|
|
3411
3878
|
* Appends a changelog entry to an existing changelog for a resource.
|
|
3412
3879
|
* If no changelog exists, one is created.
|
|
@@ -3416,7 +3883,7 @@ var src_default = (path8) => {
|
|
|
3416
3883
|
* @param options - Optional options (version, format)
|
|
3417
3884
|
*
|
|
3418
3885
|
*/
|
|
3419
|
-
appendChangelog: appendChangelog(
|
|
3886
|
+
appendChangelog: appendChangelog(join19(path8)),
|
|
3420
3887
|
/**
|
|
3421
3888
|
* Returns the changelog for a resource in EventCatalog
|
|
3422
3889
|
*
|
|
@@ -3424,7 +3891,7 @@ var src_default = (path8) => {
|
|
|
3424
3891
|
* @param options - Optional options (version)
|
|
3425
3892
|
* @returns Changelog|Undefined
|
|
3426
3893
|
*/
|
|
3427
|
-
getChangelog: getChangelog(
|
|
3894
|
+
getChangelog: getChangelog(join19(path8)),
|
|
3428
3895
|
/**
|
|
3429
3896
|
* Removes the changelog for a resource in EventCatalog
|
|
3430
3897
|
*
|
|
@@ -3432,7 +3899,7 @@ var src_default = (path8) => {
|
|
|
3432
3899
|
* @param options - Optional options (version)
|
|
3433
3900
|
*
|
|
3434
3901
|
*/
|
|
3435
|
-
rmChangelog: rmChangelog(
|
|
3902
|
+
rmChangelog: rmChangelog(join19(path8)),
|
|
3436
3903
|
/**
|
|
3437
3904
|
* ================================
|
|
3438
3905
|
* Resources Utils
|
|
@@ -3457,26 +3924,26 @@ var src_default = (path8) => {
|
|
|
3457
3924
|
* @param path - The path to the message to retrieve
|
|
3458
3925
|
* @returns Message|Undefined
|
|
3459
3926
|
*/
|
|
3460
|
-
getMessageBySchemaPath: getMessageBySchemaPath(
|
|
3927
|
+
getMessageBySchemaPath: getMessageBySchemaPath(join19(path8)),
|
|
3461
3928
|
/**
|
|
3462
3929
|
* Returns the producers and consumers (services) for a given message
|
|
3463
3930
|
* @param id - The id of the message to get the producers and consumers for
|
|
3464
3931
|
* @param version - Optional version of the message
|
|
3465
3932
|
* @returns { producers: Service[], consumers: Service[] }
|
|
3466
3933
|
*/
|
|
3467
|
-
getProducersAndConsumersForMessage: getProducersAndConsumersForMessage(
|
|
3934
|
+
getProducersAndConsumersForMessage: getProducersAndConsumersForMessage(join19(path8)),
|
|
3468
3935
|
/**
|
|
3469
3936
|
* Returns the consumers of a given schema path
|
|
3470
3937
|
* @param path - The path to the schema to get the consumers for
|
|
3471
3938
|
* @returns Service[]
|
|
3472
3939
|
*/
|
|
3473
|
-
getConsumersOfSchema: getConsumersOfSchema(
|
|
3940
|
+
getConsumersOfSchema: getConsumersOfSchema(join19(path8)),
|
|
3474
3941
|
/**
|
|
3475
3942
|
* Returns the producers of a given schema path
|
|
3476
3943
|
* @param path - The path to the schema to get the producers for
|
|
3477
3944
|
* @returns Service[]
|
|
3478
3945
|
*/
|
|
3479
|
-
getProducersOfSchema: getProducersOfSchema(
|
|
3946
|
+
getProducersOfSchema: getProducersOfSchema(join19(path8)),
|
|
3480
3947
|
/**
|
|
3481
3948
|
* Returns the schema for a given message (event, command or query) by its id and version.
|
|
3482
3949
|
* If no version is given, the latest version is used.
|
|
@@ -3484,14 +3951,14 @@ var src_default = (path8) => {
|
|
|
3484
3951
|
* @param version - Optional version of the message
|
|
3485
3952
|
* @returns { schema: string, fileName: string } | undefined
|
|
3486
3953
|
*/
|
|
3487
|
-
getSchemaForMessage: getSchemaForMessage(
|
|
3954
|
+
getSchemaForMessage: getSchemaForMessage(join19(path8)),
|
|
3488
3955
|
/**
|
|
3489
3956
|
* Returns the owners for a given resource (e.g domain, service, event, command, query, etc.)
|
|
3490
3957
|
* @param id - The id of the resource to get the owners for
|
|
3491
3958
|
* @param version - Optional version of the resource
|
|
3492
3959
|
* @returns { owners: User[] }
|
|
3493
3960
|
*/
|
|
3494
|
-
getOwnersForResource: getOwnersForResource(
|
|
3961
|
+
getOwnersForResource: getOwnersForResource(join19(path8)),
|
|
3495
3962
|
/**
|
|
3496
3963
|
* ================================
|
|
3497
3964
|
* Entities
|
|
@@ -3503,13 +3970,13 @@ var src_default = (path8) => {
|
|
|
3503
3970
|
* @param version - Optional id of the version to get (supports semver)
|
|
3504
3971
|
* @returns Entity|Undefined
|
|
3505
3972
|
*/
|
|
3506
|
-
getEntity: getEntity(
|
|
3973
|
+
getEntity: getEntity(join19(path8)),
|
|
3507
3974
|
/**
|
|
3508
3975
|
* Returns all entities from EventCatalog
|
|
3509
3976
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3510
3977
|
* @returns Entity[]|Undefined
|
|
3511
3978
|
*/
|
|
3512
|
-
getEntities: getEntities(
|
|
3979
|
+
getEntities: getEntities(join19(path8)),
|
|
3513
3980
|
/**
|
|
3514
3981
|
* Adds an entity to EventCatalog
|
|
3515
3982
|
*
|
|
@@ -3517,33 +3984,33 @@ var src_default = (path8) => {
|
|
|
3517
3984
|
* @param options - Optional options to write the entity
|
|
3518
3985
|
*
|
|
3519
3986
|
*/
|
|
3520
|
-
writeEntity: writeEntity(
|
|
3987
|
+
writeEntity: writeEntity(join19(path8, "entities")),
|
|
3521
3988
|
/**
|
|
3522
3989
|
* Remove an entity from EventCatalog (modeled on the standard POSIX rm utility)
|
|
3523
3990
|
*
|
|
3524
3991
|
* @param path - The path to your entity, e.g. `/User`
|
|
3525
3992
|
*
|
|
3526
3993
|
*/
|
|
3527
|
-
rmEntity: rmEntity(
|
|
3994
|
+
rmEntity: rmEntity(join19(path8, "entities")),
|
|
3528
3995
|
/**
|
|
3529
3996
|
* Remove an entity by an entity id
|
|
3530
3997
|
*
|
|
3531
3998
|
* @param id - The id of the entity you want to remove
|
|
3532
3999
|
*
|
|
3533
4000
|
*/
|
|
3534
|
-
rmEntityById: rmEntityById(
|
|
4001
|
+
rmEntityById: rmEntityById(join19(path8)),
|
|
3535
4002
|
/**
|
|
3536
4003
|
* Moves a given entity id to the version directory
|
|
3537
4004
|
* @param id - The id of the entity to version
|
|
3538
4005
|
*/
|
|
3539
|
-
versionEntity: versionEntity(
|
|
4006
|
+
versionEntity: versionEntity(join19(path8)),
|
|
3540
4007
|
/**
|
|
3541
4008
|
* Check to see if an entity version exists
|
|
3542
4009
|
* @param id - The id of the entity
|
|
3543
4010
|
* @param version - The version of the entity (supports semver)
|
|
3544
4011
|
* @returns
|
|
3545
4012
|
*/
|
|
3546
|
-
entityHasVersion: entityHasVersion(
|
|
4013
|
+
entityHasVersion: entityHasVersion(join19(path8)),
|
|
3547
4014
|
/**
|
|
3548
4015
|
* ================================
|
|
3549
4016
|
* Flows
|
|
@@ -3556,7 +4023,7 @@ var src_default = (path8) => {
|
|
|
3556
4023
|
* @param version - Optional version of the flow
|
|
3557
4024
|
* @returns Flow
|
|
3558
4025
|
*/
|
|
3559
|
-
getFlow: getFlow(
|
|
4026
|
+
getFlow: getFlow(join19(path8)),
|
|
3560
4027
|
/**
|
|
3561
4028
|
* Returns all flows from EventCatalog
|
|
3562
4029
|
*
|
|
@@ -3564,7 +4031,74 @@ var src_default = (path8) => {
|
|
|
3564
4031
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3565
4032
|
* @returns Flow[]|Undefined
|
|
3566
4033
|
*/
|
|
3567
|
-
getFlows: getFlows(
|
|
4034
|
+
getFlows: getFlows(join19(path8)),
|
|
4035
|
+
/**
|
|
4036
|
+
* Adds a flow to EventCatalog
|
|
4037
|
+
*
|
|
4038
|
+
* @param flow - The flow to write
|
|
4039
|
+
* @param options - Optional options to write the flow
|
|
4040
|
+
*
|
|
4041
|
+
*/
|
|
4042
|
+
writeFlow: writeFlow(join19(path8, "flows")),
|
|
4043
|
+
/**
|
|
4044
|
+
* Adds a versioned flow to EventCatalog
|
|
4045
|
+
*
|
|
4046
|
+
* @param flow - The flow to write
|
|
4047
|
+
*
|
|
4048
|
+
*/
|
|
4049
|
+
writeVersionedFlow: writeVersionedFlow(join19(path8, "flows")),
|
|
4050
|
+
/**
|
|
4051
|
+
* Adds a flow to a domain in EventCatalog
|
|
4052
|
+
*
|
|
4053
|
+
* @param flow - The flow to write to the domain
|
|
4054
|
+
* @param domain - The domain and its id to write the flow to
|
|
4055
|
+
* @param options - Optional options to write the flow
|
|
4056
|
+
*
|
|
4057
|
+
*/
|
|
4058
|
+
writeFlowToDomain: writeFlowToDomain(join19(path8, "domains")),
|
|
4059
|
+
/**
|
|
4060
|
+
* Adds a flow to a service in EventCatalog
|
|
4061
|
+
*
|
|
4062
|
+
* @param flow - The flow to write to the service
|
|
4063
|
+
* @param service - The service and its id to write the flow to
|
|
4064
|
+
* @param options - Optional options to write the flow
|
|
4065
|
+
*
|
|
4066
|
+
*/
|
|
4067
|
+
writeFlowToService: writeFlowToService(join19(path8, "services")),
|
|
4068
|
+
/**
|
|
4069
|
+
* Remove a flow from EventCatalog (modeled on the standard POSIX rm utility)
|
|
4070
|
+
*
|
|
4071
|
+
* @param path - The path to your flow, e.g. `/PaymentFlow`
|
|
4072
|
+
*
|
|
4073
|
+
*/
|
|
4074
|
+
rmFlow: rmFlow(join19(path8, "flows")),
|
|
4075
|
+
/**
|
|
4076
|
+
* Remove a flow by a flow id
|
|
4077
|
+
*
|
|
4078
|
+
* @param id - The id of the flow you want to remove
|
|
4079
|
+
*
|
|
4080
|
+
*/
|
|
4081
|
+
rmFlowById: rmFlowById(join19(path8)),
|
|
4082
|
+
/**
|
|
4083
|
+
* Moves a given flow id to the version directory
|
|
4084
|
+
* @param id - The id of the flow to version
|
|
4085
|
+
*/
|
|
4086
|
+
versionFlow: versionFlow(join19(path8)),
|
|
4087
|
+
/**
|
|
4088
|
+
* Check to see if a flow version exists
|
|
4089
|
+
* @param id - The id of the flow
|
|
4090
|
+
* @param version - The version of the flow (supports semver)
|
|
4091
|
+
* @returns
|
|
4092
|
+
*/
|
|
4093
|
+
flowHasVersion: flowHasVersion(join19(path8)),
|
|
4094
|
+
/**
|
|
4095
|
+
* Adds a file to the given flow
|
|
4096
|
+
* @param id - The id of the flow to add the file to
|
|
4097
|
+
* @param file - File contents to add including the content and the file name
|
|
4098
|
+
* @param version - Optional version of the flow to add the file to
|
|
4099
|
+
* @returns
|
|
4100
|
+
*/
|
|
4101
|
+
addFileToFlow: addFileToFlow(join19(path8)),
|
|
3568
4102
|
/**
|
|
3569
4103
|
* ================================
|
|
3570
4104
|
* Data Stores
|
|
@@ -3576,42 +4110,42 @@ var src_default = (path8) => {
|
|
|
3576
4110
|
* @param options - Optional options to write the data store
|
|
3577
4111
|
*
|
|
3578
4112
|
*/
|
|
3579
|
-
writeDataStore: writeDataStore(
|
|
4113
|
+
writeDataStore: writeDataStore(join19(path8, "containers")),
|
|
3580
4114
|
/**
|
|
3581
4115
|
* Returns a data store from EventCatalog
|
|
3582
4116
|
* @param id - The id of the data store to retrieve
|
|
3583
4117
|
* @param version - Optional id of the version to get (supports semver)
|
|
3584
4118
|
* @returns Container|Undefined
|
|
3585
4119
|
*/
|
|
3586
|
-
getDataStore: getDataStore(
|
|
4120
|
+
getDataStore: getDataStore(join19(path8)),
|
|
3587
4121
|
/**
|
|
3588
4122
|
* Returns all data stores from EventCatalog
|
|
3589
4123
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3590
4124
|
* @returns Container[]|Undefined
|
|
3591
4125
|
*/
|
|
3592
|
-
getDataStores: getDataStores(
|
|
4126
|
+
getDataStores: getDataStores(join19(path8)),
|
|
3593
4127
|
/**
|
|
3594
4128
|
* Version a data store by its id
|
|
3595
4129
|
* @param id - The id of the data store to version
|
|
3596
4130
|
*/
|
|
3597
|
-
versionDataStore: versionDataStore(
|
|
4131
|
+
versionDataStore: versionDataStore(join19(path8, "containers")),
|
|
3598
4132
|
/**
|
|
3599
4133
|
* Remove a data store by its path
|
|
3600
4134
|
* @param path - The path to the data store to remove
|
|
3601
4135
|
*/
|
|
3602
|
-
rmDataStore: rmDataStore(
|
|
4136
|
+
rmDataStore: rmDataStore(join19(path8, "containers")),
|
|
3603
4137
|
/**
|
|
3604
4138
|
* Remove a data store by its id
|
|
3605
4139
|
* @param id - The id of the data store to remove
|
|
3606
4140
|
*/
|
|
3607
|
-
rmDataStoreById: rmDataStoreById(
|
|
4141
|
+
rmDataStoreById: rmDataStoreById(join19(path8)),
|
|
3608
4142
|
/**
|
|
3609
4143
|
* Check to see if a data store version exists
|
|
3610
4144
|
* @param id - The id of the data store
|
|
3611
4145
|
* @param version - The version of the data store (supports semver)
|
|
3612
4146
|
* @returns
|
|
3613
4147
|
*/
|
|
3614
|
-
dataStoreHasVersion: dataStoreHasVersion(
|
|
4148
|
+
dataStoreHasVersion: dataStoreHasVersion(join19(path8)),
|
|
3615
4149
|
/**
|
|
3616
4150
|
* Adds a file to a data store by its id
|
|
3617
4151
|
* @param id - The id of the data store to add the file to
|
|
@@ -3619,14 +4153,14 @@ var src_default = (path8) => {
|
|
|
3619
4153
|
* @param version - Optional version of the data store to add the file to
|
|
3620
4154
|
* @returns
|
|
3621
4155
|
*/
|
|
3622
|
-
addFileToDataStore: addFileToDataStore(
|
|
4156
|
+
addFileToDataStore: addFileToDataStore(join19(path8)),
|
|
3623
4157
|
/**
|
|
3624
4158
|
* Writes a data store to a service by its id
|
|
3625
4159
|
* @param dataStore - The data store to write
|
|
3626
4160
|
* @param service - The service to write the data store to
|
|
3627
4161
|
* @returns
|
|
3628
4162
|
*/
|
|
3629
|
-
writeDataStoreToService: writeDataStoreToService(
|
|
4163
|
+
writeDataStoreToService: writeDataStoreToService(join19(path8)),
|
|
3630
4164
|
/**
|
|
3631
4165
|
* ================================
|
|
3632
4166
|
* Data Products
|
|
@@ -3638,7 +4172,7 @@ var src_default = (path8) => {
|
|
|
3638
4172
|
* @param options - Optional options to write the data product
|
|
3639
4173
|
*
|
|
3640
4174
|
*/
|
|
3641
|
-
writeDataProduct: writeDataProduct(
|
|
4175
|
+
writeDataProduct: writeDataProduct(join19(path8, "data-products")),
|
|
3642
4176
|
/**
|
|
3643
4177
|
* Writes a data product to a domain in EventCatalog
|
|
3644
4178
|
* @param dataProduct - The data product to write
|
|
@@ -3646,43 +4180,43 @@ var src_default = (path8) => {
|
|
|
3646
4180
|
* @param options - Optional options to write the data product
|
|
3647
4181
|
*
|
|
3648
4182
|
*/
|
|
3649
|
-
writeDataProductToDomain: writeDataProductToDomain(
|
|
4183
|
+
writeDataProductToDomain: writeDataProductToDomain(join19(path8, "domains")),
|
|
3650
4184
|
/**
|
|
3651
4185
|
* Returns a data product from EventCatalog
|
|
3652
4186
|
* @param id - The id of the data product to retrieve
|
|
3653
4187
|
* @param version - Optional id of the version to get (supports semver)
|
|
3654
4188
|
* @returns DataProduct|Undefined
|
|
3655
4189
|
*/
|
|
3656
|
-
getDataProduct: getDataProduct(
|
|
4190
|
+
getDataProduct: getDataProduct(join19(path8)),
|
|
3657
4191
|
/**
|
|
3658
4192
|
* Returns all data products from EventCatalog
|
|
3659
4193
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3660
4194
|
* @returns DataProduct[]|Undefined
|
|
3661
4195
|
*/
|
|
3662
|
-
getDataProducts: getDataProducts(
|
|
4196
|
+
getDataProducts: getDataProducts(join19(path8)),
|
|
3663
4197
|
/**
|
|
3664
4198
|
* Version a data product by its id
|
|
3665
4199
|
* @param id - The id of the data product to version
|
|
3666
4200
|
*/
|
|
3667
|
-
versionDataProduct: versionDataProduct(
|
|
4201
|
+
versionDataProduct: versionDataProduct(join19(path8)),
|
|
3668
4202
|
/**
|
|
3669
4203
|
* Remove a data product by its path
|
|
3670
4204
|
* @param path - The path to the data product to remove
|
|
3671
4205
|
*/
|
|
3672
|
-
rmDataProduct: rmDataProduct(
|
|
4206
|
+
rmDataProduct: rmDataProduct(join19(path8, "data-products")),
|
|
3673
4207
|
/**
|
|
3674
4208
|
* Remove a data product by its id
|
|
3675
4209
|
* @param id - The id of the data product to remove
|
|
3676
4210
|
* @param version - Optional version of the data product to remove
|
|
3677
4211
|
*/
|
|
3678
|
-
rmDataProductById: rmDataProductById(
|
|
4212
|
+
rmDataProductById: rmDataProductById(join19(path8)),
|
|
3679
4213
|
/**
|
|
3680
4214
|
* Check to see if a data product version exists
|
|
3681
4215
|
* @param id - The id of the data product
|
|
3682
4216
|
* @param version - The version of the data product (supports semver)
|
|
3683
4217
|
* @returns
|
|
3684
4218
|
*/
|
|
3685
|
-
dataProductHasVersion: dataProductHasVersion(
|
|
4219
|
+
dataProductHasVersion: dataProductHasVersion(join19(path8)),
|
|
3686
4220
|
/**
|
|
3687
4221
|
* Adds a file to a data product by its id
|
|
3688
4222
|
* @param id - The id of the data product to add the file to
|
|
@@ -3690,7 +4224,7 @@ var src_default = (path8) => {
|
|
|
3690
4224
|
* @param version - Optional version of the data product to add the file to
|
|
3691
4225
|
* @returns
|
|
3692
4226
|
*/
|
|
3693
|
-
addFileToDataProduct: addFileToDataProduct(
|
|
4227
|
+
addFileToDataProduct: addFileToDataProduct(join19(path8)),
|
|
3694
4228
|
/**
|
|
3695
4229
|
* Adds a data product to a domain
|
|
3696
4230
|
* @param id - The id of the domain
|
|
@@ -3698,7 +4232,7 @@ var src_default = (path8) => {
|
|
|
3698
4232
|
* @param version - (Optional) The version of the domain to add the data product to
|
|
3699
4233
|
* @returns
|
|
3700
4234
|
*/
|
|
3701
|
-
addDataProductToDomain: addDataProductToDomain(
|
|
4235
|
+
addDataProductToDomain: addDataProductToDomain(join19(path8, "domains")),
|
|
3702
4236
|
/**
|
|
3703
4237
|
* ================================
|
|
3704
4238
|
* Diagrams
|
|
@@ -3710,13 +4244,13 @@ var src_default = (path8) => {
|
|
|
3710
4244
|
* @param version - Optional id of the version to get (supports semver)
|
|
3711
4245
|
* @returns Diagram|Undefined
|
|
3712
4246
|
*/
|
|
3713
|
-
getDiagram: getDiagram(
|
|
4247
|
+
getDiagram: getDiagram(join19(path8)),
|
|
3714
4248
|
/**
|
|
3715
4249
|
* Returns all diagrams from EventCatalog
|
|
3716
4250
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
3717
4251
|
* @returns Diagram[]|Undefined
|
|
3718
4252
|
*/
|
|
3719
|
-
getDiagrams: getDiagrams(
|
|
4253
|
+
getDiagrams: getDiagrams(join19(path8)),
|
|
3720
4254
|
/**
|
|
3721
4255
|
* Adds a diagram to EventCatalog
|
|
3722
4256
|
*
|
|
@@ -3724,33 +4258,33 @@ var src_default = (path8) => {
|
|
|
3724
4258
|
* @param options - Optional options to write the diagram
|
|
3725
4259
|
*
|
|
3726
4260
|
*/
|
|
3727
|
-
writeDiagram: writeDiagram(
|
|
4261
|
+
writeDiagram: writeDiagram(join19(path8, "diagrams")),
|
|
3728
4262
|
/**
|
|
3729
4263
|
* Remove a diagram from EventCatalog (modeled on the standard POSIX rm utility)
|
|
3730
4264
|
*
|
|
3731
4265
|
* @param path - The path to your diagram, e.g. `/ArchitectureDiagram`
|
|
3732
4266
|
*
|
|
3733
4267
|
*/
|
|
3734
|
-
rmDiagram: rmDiagram(
|
|
4268
|
+
rmDiagram: rmDiagram(join19(path8, "diagrams")),
|
|
3735
4269
|
/**
|
|
3736
4270
|
* Remove a diagram by a diagram id
|
|
3737
4271
|
*
|
|
3738
4272
|
* @param id - The id of the diagram you want to remove
|
|
3739
4273
|
*
|
|
3740
4274
|
*/
|
|
3741
|
-
rmDiagramById: rmDiagramById(
|
|
4275
|
+
rmDiagramById: rmDiagramById(join19(path8)),
|
|
3742
4276
|
/**
|
|
3743
4277
|
* Moves a given diagram id to the version directory
|
|
3744
4278
|
* @param id - The id of the diagram to version
|
|
3745
4279
|
*/
|
|
3746
|
-
versionDiagram: versionDiagram(
|
|
4280
|
+
versionDiagram: versionDiagram(join19(path8)),
|
|
3747
4281
|
/**
|
|
3748
4282
|
* Check to see if a diagram version exists
|
|
3749
4283
|
* @param id - The id of the diagram
|
|
3750
4284
|
* @param version - The version of the diagram (supports semver)
|
|
3751
4285
|
* @returns
|
|
3752
4286
|
*/
|
|
3753
|
-
diagramHasVersion: diagramHasVersion(
|
|
4287
|
+
diagramHasVersion: diagramHasVersion(join19(path8)),
|
|
3754
4288
|
/**
|
|
3755
4289
|
* Adds a file to the given diagram
|
|
3756
4290
|
* @param id - The id of the diagram to add the file to
|
|
@@ -3758,7 +4292,7 @@ var src_default = (path8) => {
|
|
|
3758
4292
|
* @param version - Optional version of the diagram to add the file to
|
|
3759
4293
|
* @returns
|
|
3760
4294
|
*/
|
|
3761
|
-
addFileToDiagram: addFileToDiagram(
|
|
4295
|
+
addFileToDiagram: addFileToDiagram(join19(path8)),
|
|
3762
4296
|
/**
|
|
3763
4297
|
* ================================
|
|
3764
4298
|
* DSL
|
|
@@ -3777,25 +4311,26 @@ var src_default = (path8) => {
|
|
|
3777
4311
|
* const dsl = await sdk.toDSL(services, { type: 'service', hydrate: true });
|
|
3778
4312
|
* ```
|
|
3779
4313
|
*/
|
|
3780
|
-
createSnapshot: createSnapshot(
|
|
3781
|
-
diffSnapshots: diffSnapshots(
|
|
3782
|
-
listSnapshots: listSnapshots(
|
|
3783
|
-
toDSL: toDSL(
|
|
3784
|
-
getEvent: getEvent(
|
|
3785
|
-
getCommand: getCommand(
|
|
3786
|
-
getQuery: getQuery(
|
|
3787
|
-
getService: getService(
|
|
3788
|
-
getServices: getServices(
|
|
3789
|
-
getDomain: getDomain(
|
|
3790
|
-
getChannel: getChannel(
|
|
3791
|
-
getChannels: getChannels(
|
|
3792
|
-
getContainer: getDataStore(
|
|
3793
|
-
getTeam: getTeam(
|
|
3794
|
-
getUser: getUser(
|
|
4314
|
+
createSnapshot: createSnapshot(join19(path8)),
|
|
4315
|
+
diffSnapshots: diffSnapshots(join19(path8)),
|
|
4316
|
+
listSnapshots: listSnapshots(join19(path8)),
|
|
4317
|
+
toDSL: toDSL(join19(path8), {
|
|
4318
|
+
getEvent: getEvent(join19(path8)),
|
|
4319
|
+
getCommand: getCommand(join19(path8)),
|
|
4320
|
+
getQuery: getQuery(join19(path8)),
|
|
4321
|
+
getService: getService(join19(path8)),
|
|
4322
|
+
getServices: getServices(join19(path8)),
|
|
4323
|
+
getDomain: getDomain(join19(path8, "domains")),
|
|
4324
|
+
getChannel: getChannel(join19(path8)),
|
|
4325
|
+
getChannels: getChannels(join19(path8)),
|
|
4326
|
+
getContainer: getDataStore(join19(path8)),
|
|
4327
|
+
getTeam: getTeam(join19(path8, "teams")),
|
|
4328
|
+
getUser: getUser(join19(path8, "users"))
|
|
3795
4329
|
})
|
|
3796
4330
|
};
|
|
3797
4331
|
};
|
|
3798
4332
|
export {
|
|
4333
|
+
FlowBuilder,
|
|
3799
4334
|
src_default as default
|
|
3800
4335
|
};
|
|
3801
4336
|
//# sourceMappingURL=index.mjs.map
|