@kemu-io/hs 0.10.4 → 0.10.6
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/cjs/service.d.ts +26 -5
- package/mjs/service.d.ts +26 -5
- package/package.json +1 -1
package/cjs/service.d.ts
CHANGED
|
@@ -629,11 +629,30 @@ export type KemuService<T extends Record<string, any> = Record<string, any>> = {
|
|
|
629
629
|
/**
|
|
630
630
|
* Registers the path to a file or folder the recipe depends on. When the recipe is exported,
|
|
631
631
|
* the dependency will be included in the generated package.
|
|
632
|
-
*
|
|
633
|
-
*
|
|
632
|
+
*
|
|
633
|
+
* Prefix a path with `!` to exclude it from the recipe export. Both literal paths and
|
|
634
|
+
* glob patterns are supported.
|
|
635
|
+
*
|
|
636
|
+
* ```ts
|
|
637
|
+
* service.onInitialize(async (context) => {
|
|
638
|
+
* const widgetId = context.widgetId;
|
|
639
|
+
*
|
|
640
|
+
* // Include everything in moduleA
|
|
641
|
+
* await service.addDependencyPath('my-dep', 'dependencies/moduleA', widgetId);
|
|
642
|
+
*
|
|
643
|
+
* // Exclude the logs folder
|
|
644
|
+
* await service.addDependencyPath('my-dep', '!dependencies/moduleA/logs', widgetId);
|
|
645
|
+
*
|
|
646
|
+
* // Include only .txt files in moduleB
|
|
647
|
+
* await service.addDependencyPath('my-dep', 'dependencies/moduleB/*.txt', widgetId);
|
|
648
|
+
* });
|
|
649
|
+
* ```
|
|
650
|
+
*
|
|
651
|
+
* @param key the key used to reference the dependency.
|
|
652
|
+
* @param path the path to include (or exclude with a `!` prefix). Supports glob patterns. Pass `null` to remove the dependency.
|
|
634
653
|
* @param widgetId the id of the widget to associate the dependency with.
|
|
635
654
|
*/
|
|
636
|
-
addDependencyPath: (key: string, path: string, widgetId: string) => Promise<void>;
|
|
655
|
+
addDependencyPath: (key: string, path: string | null, widgetId: string) => Promise<void>;
|
|
637
656
|
/**
|
|
638
657
|
* Returns the full path of a dependency registered via `addDependencyPath`. If the dependency
|
|
639
658
|
* is not found, the method returns `null`. During compose time, the method is likely to
|
|
@@ -736,8 +755,10 @@ export type AddSecretConfig = {
|
|
|
736
755
|
};
|
|
737
756
|
/** the name of the secret to store the value under */
|
|
738
757
|
envVarName: string;
|
|
739
|
-
/**
|
|
740
|
-
|
|
758
|
+
/**
|
|
759
|
+
* the value of the secret to store. If set to null, the hub will treat this as a delete request for the mapped secret.
|
|
760
|
+
*/
|
|
761
|
+
envValue: string | null;
|
|
741
762
|
context?: string;
|
|
742
763
|
/** the uuid of the recipe that is attempting to store the secret */
|
|
743
764
|
recipeUuid: string;
|
package/mjs/service.d.ts
CHANGED
|
@@ -629,11 +629,30 @@ export type KemuService<T extends Record<string, any> = Record<string, any>> = {
|
|
|
629
629
|
/**
|
|
630
630
|
* Registers the path to a file or folder the recipe depends on. When the recipe is exported,
|
|
631
631
|
* the dependency will be included in the generated package.
|
|
632
|
-
*
|
|
633
|
-
*
|
|
632
|
+
*
|
|
633
|
+
* Prefix a path with `!` to exclude it from the recipe export. Both literal paths and
|
|
634
|
+
* glob patterns are supported.
|
|
635
|
+
*
|
|
636
|
+
* ```ts
|
|
637
|
+
* service.onInitialize(async (context) => {
|
|
638
|
+
* const widgetId = context.widgetId;
|
|
639
|
+
*
|
|
640
|
+
* // Include everything in moduleA
|
|
641
|
+
* await service.addDependencyPath('my-dep', 'dependencies/moduleA', widgetId);
|
|
642
|
+
*
|
|
643
|
+
* // Exclude the logs folder
|
|
644
|
+
* await service.addDependencyPath('my-dep', '!dependencies/moduleA/logs', widgetId);
|
|
645
|
+
*
|
|
646
|
+
* // Include only .txt files in moduleB
|
|
647
|
+
* await service.addDependencyPath('my-dep', 'dependencies/moduleB/*.txt', widgetId);
|
|
648
|
+
* });
|
|
649
|
+
* ```
|
|
650
|
+
*
|
|
651
|
+
* @param key the key used to reference the dependency.
|
|
652
|
+
* @param path the path to include (or exclude with a `!` prefix). Supports glob patterns. Pass `null` to remove the dependency.
|
|
634
653
|
* @param widgetId the id of the widget to associate the dependency with.
|
|
635
654
|
*/
|
|
636
|
-
addDependencyPath: (key: string, path: string, widgetId: string) => Promise<void>;
|
|
655
|
+
addDependencyPath: (key: string, path: string | null, widgetId: string) => Promise<void>;
|
|
637
656
|
/**
|
|
638
657
|
* Returns the full path of a dependency registered via `addDependencyPath`. If the dependency
|
|
639
658
|
* is not found, the method returns `null`. During compose time, the method is likely to
|
|
@@ -736,8 +755,10 @@ export type AddSecretConfig = {
|
|
|
736
755
|
};
|
|
737
756
|
/** the name of the secret to store the value under */
|
|
738
757
|
envVarName: string;
|
|
739
|
-
/**
|
|
740
|
-
|
|
758
|
+
/**
|
|
759
|
+
* the value of the secret to store. If set to null, the hub will treat this as a delete request for the mapped secret.
|
|
760
|
+
*/
|
|
761
|
+
envValue: string | null;
|
|
741
762
|
context?: string;
|
|
742
763
|
/** the uuid of the recipe that is attempting to store the secret */
|
|
743
764
|
recipeUuid: string;
|