@powerlines/plugin-open-feature 0.1.9 → 0.1.11

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.
@@ -38,12 +38,15 @@ function FeaturesBuiltin(props) {
38
38
  },
39
39
  get children() {
40
40
  return [
41
- (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, { get children() {
42
- return [_alloy_js_core.code`A function to set the OpenFeature providers to be used in the application. This function should be called at the entry point of the application to ensure that the providers are registered before any feature flag evaluations occur.`, (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocParam, {
43
- name: "provider",
44
- children: `The provider wrapper containing the OpenFeature provider to set. The provider should be an instance of a class that implements the OpenFeature Provider interface, wrapped in a ProviderWrapper to include any necessary metadata about the provider's status.`
45
- })];
46
- } }),
41
+ (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDoc, {
42
+ heading: "A function to set the OpenFeature providers to be used in the application. This function should be called at the entry point of the application to ensure that the providers are registered before any feature flag evaluations occur.",
43
+ get children() {
44
+ return (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocParam, {
45
+ name: "provider",
46
+ children: `The provider wrapper containing the OpenFeature provider to set. The provider should be an instance of a class that implements the OpenFeature Provider interface, wrapped in a ProviderWrapper to include any necessary metadata about the provider's status.`
47
+ });
48
+ }
49
+ }),
47
50
  (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.FunctionDeclaration, {
48
51
  name: "setFeatureProvider",
49
52
  "export": true,
@@ -55,7 +58,7 @@ function FeaturesBuiltin(props) {
55
58
  children: _alloy_js_core.code`try {
56
59
  await OpenFeature.setProviderAndWait(provider);
57
60
  } catch (error) {
58
- console.error('Failed to initialize provider:', error);
61
+ console.error("Failed to initialize provider: ", error);
59
62
  } `
60
63
  }),
61
64
  (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
@@ -80,7 +83,7 @@ function FeaturesBuiltin(props) {
80
83
  children: _alloy_js_core.code`try {
81
84
  return client.getBooleanValue(featureId);
82
85
  } catch (error) {
83
- console.error('Failed to initialize provider:', error);
86
+ console.error("Failed to evaluate feature flag: ", error);
84
87
  } `
85
88
  }),
86
89
  (0, _alloy_js_core_jsx_runtime.createComponent)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
@@ -2,12 +2,11 @@ import * as _$_alloy_js_core0 from "@alloy-js/core";
2
2
  import { BuiltinFileProps } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
3
3
 
4
4
  //#region src/components/features-builtin.d.ts
5
- interface FeaturesBuiltinProps extends Omit<BuiltinFileProps, "id"> {}
5
+ type FeaturesBuiltinProps = Omit<BuiltinFileProps, "id">;
6
6
  /**
7
7
  * Generates the feature flags module for the Powerlines project.
8
8
  */
9
9
  declare function FeaturesBuiltin(props: FeaturesBuiltinProps): _$_alloy_js_core0.Children;
10
- declare type __ΩFeaturesBuiltinProps = any[];
11
10
  //#endregion
12
- export { FeaturesBuiltin, FeaturesBuiltinProps, __ΩFeaturesBuiltinProps };
11
+ export { FeaturesBuiltin, FeaturesBuiltinProps };
13
12
  //# sourceMappingURL=features-builtin.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"features-builtin.d.cts","names":[],"sources":["../../src/components/features-builtin.tsx"],"mappings":";;;;UA+BiB,oBAAA,SAA6B,IAAA,CAAK,gBAAA;;AAAnD;;iBAKgB,eAAA,CAAgB,KAAA,EAAO,oBAAA,GAAoB,iBAAA,CAAA,QAAA;AAAA"}
1
+ {"version":3,"file":"features-builtin.d.cts","names":[],"sources":["../../src/components/features-builtin.tsx"],"mappings":";;;;KA+BY,oBAAA,GAAuB,IAAA,CAAK,gBAAA;;;AAAxC;iBAKgB,eAAA,CAAgB,KAAA,EAAO,oBAAA,GAAoB,iBAAA,CAAA,QAAA"}
@@ -2,12 +2,11 @@ import * as _$_alloy_js_core0 from "@alloy-js/core";
2
2
  import { BuiltinFileProps } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
3
3
 
4
4
  //#region src/components/features-builtin.d.ts
5
- interface FeaturesBuiltinProps extends Omit<BuiltinFileProps, "id"> {}
5
+ type FeaturesBuiltinProps = Omit<BuiltinFileProps, "id">;
6
6
  /**
7
7
  * Generates the feature flags module for the Powerlines project.
8
8
  */
9
9
  declare function FeaturesBuiltin(props: FeaturesBuiltinProps): _$_alloy_js_core0.Children;
10
- declare type __ΩFeaturesBuiltinProps = any[];
11
10
  //#endregion
12
- export { FeaturesBuiltin, FeaturesBuiltinProps, __ΩFeaturesBuiltinProps };
11
+ export { FeaturesBuiltin, FeaturesBuiltinProps };
13
12
  //# sourceMappingURL=features-builtin.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"features-builtin.d.mts","names":[],"sources":["../../src/components/features-builtin.tsx"],"mappings":";;;;UA+BiB,oBAAA,SAA6B,IAAA,CAAK,gBAAA;;AAAnD;;iBAKgB,eAAA,CAAgB,KAAA,EAAO,oBAAA,GAAoB,iBAAA,CAAA,QAAA;AAAA"}
1
+ {"version":3,"file":"features-builtin.d.mts","names":[],"sources":["../../src/components/features-builtin.tsx"],"mappings":";;;;KA+BY,oBAAA,GAAuB,IAAA,CAAK,gBAAA;;;AAAxC;iBAKgB,eAAA,CAAgB,KAAA,EAAO,oBAAA,GAAoB,iBAAA,CAAA,QAAA"}
@@ -35,12 +35,15 @@ function FeaturesBuiltin(props) {
35
35
  },
36
36
  get children() {
37
37
  return [
38
- createComponent(TSDoc, { get children() {
39
- return [code`A function to set the OpenFeature providers to be used in the application. This function should be called at the entry point of the application to ensure that the providers are registered before any feature flag evaluations occur.`, createComponent(TSDocParam, {
40
- name: "provider",
41
- children: `The provider wrapper containing the OpenFeature provider to set. The provider should be an instance of a class that implements the OpenFeature Provider interface, wrapped in a ProviderWrapper to include any necessary metadata about the provider's status.`
42
- })];
43
- } }),
38
+ createComponent(TSDoc, {
39
+ heading: "A function to set the OpenFeature providers to be used in the application. This function should be called at the entry point of the application to ensure that the providers are registered before any feature flag evaluations occur.",
40
+ get children() {
41
+ return createComponent(TSDocParam, {
42
+ name: "provider",
43
+ children: `The provider wrapper containing the OpenFeature provider to set. The provider should be an instance of a class that implements the OpenFeature Provider interface, wrapped in a ProviderWrapper to include any necessary metadata about the provider's status.`
44
+ });
45
+ }
46
+ }),
44
47
  createComponent(FunctionDeclaration, {
45
48
  name: "setFeatureProvider",
46
49
  "export": true,
@@ -52,7 +55,7 @@ function FeaturesBuiltin(props) {
52
55
  children: code`try {
53
56
  await OpenFeature.setProviderAndWait(provider);
54
57
  } catch (error) {
55
- console.error('Failed to initialize provider:', error);
58
+ console.error("Failed to initialize provider: ", error);
56
59
  } `
57
60
  }),
58
61
  createComponent(Spacing, {}),
@@ -77,7 +80,7 @@ function FeaturesBuiltin(props) {
77
80
  children: code`try {
78
81
  return client.getBooleanValue(featureId);
79
82
  } catch (error) {
80
- console.error('Failed to initialize provider:', error);
83
+ console.error("Failed to evaluate feature flag: ", error);
81
84
  } `
82
85
  }),
83
86
  createComponent(Spacing, {}),
@@ -1 +1 @@
1
- {"version":3,"file":"features-builtin.mjs","names":[],"sources":["../../src/components/features-builtin.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, Show, splitProps } from \"@alloy-js/core\";\nimport { FunctionDeclaration, VarDeclaration } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport {\n BuiltinFile,\n BuiltinFileProps\n} from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport {\n TSDoc,\n TSDocParam\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport defu from \"defu\";\n\nexport interface FeaturesBuiltinProps extends Omit<BuiltinFileProps, \"id\"> {}\n\n/**\n * Generates the feature flags module for the Powerlines project.\n */\nexport function FeaturesBuiltin(props: FeaturesBuiltinProps) {\n const [{ children, imports }, rest] = splitProps(props, [\n \"children\",\n \"imports\"\n ]);\n\n // const context = usePowerlines<OpenFeaturePluginContext>();\n\n return (\n <BuiltinFile\n id=\"features\"\n description=\"The runtime feature flags module provides an interface to define environment configuration parameters.\"\n {...rest}\n imports={defu(\n {\n \"@openfeature/server-sdk\": [\n { name: \"OpenFeature\" },\n { name: \"Provider\", type: true },\n { name: \"ProviderWrapper\", type: true },\n { name: \"ServerProviderStatus\", type: true }\n ]\n },\n imports ?? {}\n )}>\n <TSDoc>\n {code`A function to set the OpenFeature providers to be used in the application. This function should be called at the entry point of the application to ensure that the providers are registered before any feature flag evaluations occur.`}\n\n <TSDocParam name=\"provider\">\n {`The provider wrapper containing the OpenFeature provider to set. The provider should be an instance of a class that implements the OpenFeature Provider interface, wrapped in a ProviderWrapper to include any necessary metadata about the provider's status.`}\n </TSDocParam>\n </TSDoc>\n <FunctionDeclaration\n name=\"setFeatureProvider\"\n export\n async\n parameters={[\n {\n name: \"provider\",\n type: \"ProviderWrapper<Provider, ServerProviderStatus>\"\n }\n ]}>\n {code`try {\n await OpenFeature.setProviderAndWait(provider);\n } catch (error) {\n console.error('Failed to initialize provider:', error);\n } `}\n </FunctionDeclaration>\n <Spacing />\n <VarDeclaration\n name=\"client\"\n export\n const\n doc=\"The Open Feature runtime client to provide feature flag evaluations.\"\n type=\"ReturnType<typeof OpenFeature.getClient>\">\n {code`OpenFeature.getClient(); `}\n </VarDeclaration>\n <Spacing />\n <FunctionDeclaration\n name=\"feature\"\n export\n async\n parameters={[\n {\n name: \"featureId\",\n type: \"string\"\n }\n ]}\n returnType=\"Promise<boolean>\">\n {code`try {\n return client.getBooleanValue(featureId);\n } catch (error) {\n console.error('Failed to initialize provider:', error);\n } `}\n </FunctionDeclaration>\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BuiltinFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;CA+BA,MAAO,CAAA,YAEL,WACC,QAAU,WAAW,OAAO,CAAA,YAAW,UAAI,CAAA;AAI5C,QAAG,gBAAS,aAAA,WAAA;EACV,IAAC;EACD,aAAA;;EAEA,IAAC,UAAa;iBAEV,2BAAC;IAAA,EACJ,MAAA,eACI;IAAC;KACJ,MAAA;KACI,MAAI;KACR;IAAA;KACE,MAAA;KACE,MAAE;KACH;IAAE;KACD,MAAI;KACJ,MAAI;KACL;IAAC,EACH,EAAE,WAAC,EAAA,CAAA;;EAEN,IAAI,WAAW;AACb,UAAE;IAAA,gBAAA,OAAA,EACD,IAAK,WAAA;AACH,YAAO,CAAA,IAAA,0OAAqO,gBAAA,YAAA;;MAE5O,UAAW;MACT,CAAC,CAAA;OAEL,CAAC;IAAA,gBAAK,qBAAA;KACN,MAAA;KACC,UAAM;KACN,OAAA;KACA,YAAA,CAAA;MACA,MAAA;MACE,MAAA;MACD,CAAC;KACF,UAAU,IAAC;;;;;KAKZ,CAAC;IAAE,gBAAc,SAAA,EAAA,CAAA;IAAA,gBAAA,gBAAA;KAChB,MAAE;KACF,UAAG;KACH,SAAA;KACD,KAAA;KACA,MAAA;KACC,UAAM,IAAM;KACb,CAAC;IAAA,gBAAA,SAAA,EAAA,CAAA;IAAA,gBAAA,qBAAA;KACA,MAAA;KACA,UAAS;KACT,OAAM;KACN,YAAM,CAAA;MACN,MAAA;MACD,MAAS;MACT,CAAA;KACC,YAAM;KACN,UAAA,IAAA;;;;;KAKD,CAAC;IAAE,gBAAe,SAAA,EAAA,CAAA;IAAA,gBAAA,MAAA;KACjB,IAAE,OAAA;AACD,aAAA,QAAA,SAAA;;KAES;KACX,CAAC;IAAC;;EAEN,CAAC,CAAC"}
1
+ {"version":3,"file":"features-builtin.mjs","names":[],"sources":["../../src/components/features-builtin.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, Show, splitProps } from \"@alloy-js/core\";\nimport { FunctionDeclaration, VarDeclaration } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport {\n BuiltinFile,\n BuiltinFileProps\n} from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport {\n TSDoc,\n TSDocParam\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport defu from \"defu\";\n\nexport type FeaturesBuiltinProps = Omit<BuiltinFileProps, \"id\">;\n\n/**\n * Generates the feature flags module for the Powerlines project.\n */\nexport function FeaturesBuiltin(props: FeaturesBuiltinProps) {\n const [{ children, imports }, rest] = splitProps(props, [\n \"children\",\n \"imports\"\n ]);\n\n // const context = usePowerlines<OpenFeaturePluginContext>();\n\n return (\n <BuiltinFile\n id=\"features\"\n description=\"The runtime feature flags module provides an interface to define environment configuration parameters.\"\n {...rest}\n imports={defu(\n {\n \"@openfeature/server-sdk\": [\n { name: \"OpenFeature\" },\n { name: \"Provider\", type: true },\n { name: \"ProviderWrapper\", type: true },\n { name: \"ServerProviderStatus\", type: true }\n ]\n },\n imports ?? {}\n )}>\n <TSDoc heading=\"A function to set the OpenFeature providers to be used in the application. This function should be called at the entry point of the application to ensure that the providers are registered before any feature flag evaluations occur.\">\n <TSDocParam name=\"provider\">\n {`The provider wrapper containing the OpenFeature provider to set. The provider should be an instance of a class that implements the OpenFeature Provider interface, wrapped in a ProviderWrapper to include any necessary metadata about the provider's status.`}\n </TSDocParam>\n </TSDoc>\n <FunctionDeclaration\n name=\"setFeatureProvider\"\n export\n async\n parameters={[\n {\n name: \"provider\",\n type: \"ProviderWrapper<Provider, ServerProviderStatus>\"\n }\n ]}>\n {code`try {\n await OpenFeature.setProviderAndWait(provider);\n } catch (error) {\n console.error(\"Failed to initialize provider: \", error);\n } `}\n </FunctionDeclaration>\n <Spacing />\n <VarDeclaration\n name=\"client\"\n export\n const\n doc=\"The Open Feature runtime client to provide feature flag evaluations.\"\n type=\"ReturnType<typeof OpenFeature.getClient>\">\n {code`OpenFeature.getClient(); `}\n </VarDeclaration>\n <Spacing />\n <FunctionDeclaration\n name=\"feature\"\n export\n async\n parameters={[\n {\n name: \"featureId\",\n type: \"string\"\n }\n ]}\n returnType=\"Promise<boolean>\">\n {code`try {\n return client.getBooleanValue(featureId);\n } catch (error) {\n console.error(\"Failed to evaluate feature flag: \", error);\n } `}\n </FunctionDeclaration>\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BuiltinFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;CA+BA,MAAO,CAAA,YAEL,WACC,QAAU,WAAW,OAAO,CAAA,YAAW,UAAI,CAAA;AAI5C,QAAG,gBAAS,aAAA,WAAA;EACV,IAAC;EACD,aAAA;;EAEA,IAAC,UAAa;iBAEV,2BAAC;IAAA,EACJ,MAAA,eACI;IAAC;KACJ,MAAA;KACI,MAAI;KACR;IAAA;KACE,MAAA;KACE,MAAE;KACH;IAAE;KACD,MAAI;KACJ,MAAI;KACL;IAAC,EACH,EAAE,WAAC,EAAA,CAAA;;EAEN,IAAI,WAAW;AACb,UAAE;IAAA,gBAAA,OAAA;KACD,SAAM;KACL,IAAC,WAAW;AACV,aAAM,gBAAiB,YAAc;OACrC,MAAA;OACF,UAAK;OACN,CAAA;;KAEA,CAAC;IAAA,gBAAA,qBAAA;KACA,MAAA;KACA,UAAU;KACV,OAAE;KACF,YAAW,CAAA;MACT,MAAM;MACN,MAAA;MACD,CAAC;KACF,UAAU,IAAA;;;;;KAKX,CAAC;IAAA,gBAAmB,SAAA,EAAA,CAAA;IAAA,gBAAA,gBAAA;KACpB,MAAO;KACP,UAAA;KACC,SAAM;KACN,KAAA;KACA,MAAA;KACA,UAAS,IAAK;KACf,CAAC;IAAA,gBAAiB,SAAO,EAAA,CAAA;IAAA,gBAAuB,qBAAA;KAC/C,MAAM;KACN,UAAA;KACD,OAAQ;KACR,YAAA,CAAA;MACC,MAAM;MACN,MAAA;MACA,CAAA;KACA,YAAY;KACZ,UAAE,IAAA;;;;;KAKH,CAAC;IAAA,gBAAoB,SAAS,EAAA,CAAA;IAAA,gBAAA,MAAA;KAC7B,IAAC,OAAS;AACR,aAAO,QAAO,SAAA;;KAEN;KACX,CAAC;IAAC;;EAEN,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- import { FeaturesBuiltin, FeaturesBuiltinProps, __ΩFeaturesBuiltinProps } from "./features-builtin.cjs";
2
- export { FeaturesBuiltin, FeaturesBuiltinProps, __ΩFeaturesBuiltinProps };
1
+ import { FeaturesBuiltin, FeaturesBuiltinProps } from "./features-builtin.cjs";
2
+ export { FeaturesBuiltin, FeaturesBuiltinProps };
@@ -1,2 +1,2 @@
1
- import { FeaturesBuiltin, FeaturesBuiltinProps, __ΩFeaturesBuiltinProps } from "./features-builtin.mjs";
2
- export { FeaturesBuiltin, FeaturesBuiltinProps, __ΩFeaturesBuiltinProps };
1
+ import { FeaturesBuiltin, FeaturesBuiltinProps } from "./features-builtin.mjs";
2
+ export { FeaturesBuiltin, FeaturesBuiltinProps };
@@ -1,33 +1,23 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
- let powerlines = require("powerlines");
4
3
  let _stryke_path_join_paths = require("@stryke/path/join-paths");
5
4
  let automd = require("automd");
6
5
 
7
6
  //#region src/helpers/automd-generator.ts
8
- function __assignType(fn, args) {
9
- fn.__type = args;
10
- return fn;
11
- }
12
7
  /**
13
8
  * AutoMD generator to generate feature flags documentation
14
9
  *
15
10
  * @param context - The generator context.
16
11
  * @returns The generated documentation content.
17
12
  */
18
- const features = __assignType((context) => (0, automd.defineGenerator)({
13
+ const features = (context) => (0, automd.defineGenerator)({
19
14
  name: "features",
20
- generate: __assignType(async function generate() {
15
+ async generate() {
21
16
  const featuresDocFile = (0, _stryke_path_join_paths.joinPaths)(context.config.root, "docs", "generated", "features.md");
22
17
  if (!context.fs.existsSync(featuresDocFile)) return { contents: "" };
23
18
  return { contents: await context.fs.read(featuresDocFile) || "" };
24
- }, ["generate", "P\"/!"])
25
- }), [
26
- () => powerlines.__ΩUnresolvedContext,
27
- "context",
28
- "",
29
- "Pn!2\"\"/#"
30
- ]);
19
+ }
20
+ });
31
21
 
32
22
  //#endregion
33
23
  exports.features = features;
@@ -1,5 +1,5 @@
1
- import { UnresolvedContext } from "powerlines";
2
1
  import * as _$automd from "automd";
2
+ import { UnresolvedContext } from "powerlines";
3
3
 
4
4
  //#region src/helpers/automd-generator.d.ts
5
5
  /**
@@ -1,31 +1,21 @@
1
- import { __ΩUnresolvedContext } from "powerlines";
2
1
  import { joinPaths } from "@stryke/path/join-paths";
3
2
  import { defineGenerator } from "automd";
4
3
 
5
4
  //#region src/helpers/automd-generator.ts
6
- function __assignType(fn, args) {
7
- fn.__type = args;
8
- return fn;
9
- }
10
5
  /**
11
6
  * AutoMD generator to generate feature flags documentation
12
7
  *
13
8
  * @param context - The generator context.
14
9
  * @returns The generated documentation content.
15
10
  */
16
- const features = __assignType((context) => defineGenerator({
11
+ const features = (context) => defineGenerator({
17
12
  name: "features",
18
- generate: __assignType(async function generate() {
13
+ async generate() {
19
14
  const featuresDocFile = joinPaths(context.config.root, "docs", "generated", "features.md");
20
15
  if (!context.fs.existsSync(featuresDocFile)) return { contents: "" };
21
16
  return { contents: await context.fs.read(featuresDocFile) || "" };
22
- }, ["generate", "P\"/!"])
23
- }), [
24
- () => __ΩUnresolvedContext,
25
- "context",
26
- "",
27
- "Pn!2\"\"/#"
28
- ]);
17
+ }
18
+ });
29
19
 
30
20
  //#endregion
31
21
  export { features };
@@ -1 +1 @@
1
- {"version":3,"file":"automd-generator.mjs","names":[],"sources":["../../src/helpers/automd-generator.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { defineGenerator } from \"automd\";\nimport { UnresolvedContext } from \"powerlines\";\n\n/**\n * AutoMD generator to generate feature flags documentation\n *\n * @param context - The generator context.\n * @returns The generated documentation content.\n */\nexport const features = (context: UnresolvedContext) =>\n defineGenerator({\n name: \"features\",\n async generate() {\n const featuresDocFile = joinPaths(\n context.config.root,\n \"docs\",\n \"generated\",\n \"features.md\"\n );\n\n if (!context.fs.existsSync(featuresDocFile)) {\n return {\n contents: \"\"\n };\n }\n\n const contents = await context.fs.read(featuresDocFile);\n\n return {\n contents: contents || \"\"\n };\n }\n });\n"],"mappings":";;;;;AAEA,SAAS,aAAY,IAAK,MAAC;;AAE1B,QAAU;;;;;;;;AA2BX,MAAU,WAAW,cAAA,YAAA,gBAAA;CACjB,MAAE;CACF,UAAI,aAAmB,eAAA,WAAA;EACnB,MAAM,kBAAA,UAAA,QAAA,OAAA,MAAA,QAAA,aAAA,cAAA;AACN,MAAC,CAAA,QAAU,GAAA,WAAA,gBAAA,CACV,QAAS,EACX,UAAA;AAIC,SAAE,EACD,UAFM,MAAA,QAAA,GAAA,KAAA,gBAAA,IAEN,IACH;;CAEL,CAAC,EAAE;OAAO;CAAkB;CAAe;CAAC;CAAA,CAAe"}
1
+ {"version":3,"file":"automd-generator.mjs","names":[],"sources":["../../src/helpers/automd-generator.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { defineGenerator } from \"automd\";\nimport { UnresolvedContext } from \"powerlines\";\n\n/**\n * AutoMD generator to generate feature flags documentation\n *\n * @param context - The generator context.\n * @returns The generated documentation content.\n */\nexport const features = (context: UnresolvedContext) =>\n defineGenerator({\n name: \"features\",\n async generate() {\n const featuresDocFile = joinPaths(\n context.config.root,\n \"docs\",\n \"generated\",\n \"features.md\"\n );\n\n if (!context.fs.existsSync(featuresDocFile)) {\n return {\n contents: \"\"\n };\n }\n\n const contents = await context.fs.read(featuresDocFile);\n\n return {\n contents: contents || \"\"\n };\n }\n });\n"],"mappings":";;;;;;;;;;AA4BA,MAAa,YAAY,YACvB,gBAAgB;CACd,MAAM;CACN,MAAM,WAAW;EACf,MAAM,kBAAkB,UACtB,QAAQ,OAAO,MACf,QACA,aACA,cACD;AAED,MAAI,CAAC,QAAQ,GAAG,WAAW,gBAAgB,CACzC,QAAO,EACL,UAAU,IACX;AAKH,SAAO,EACL,UAHe,MAAM,QAAQ,GAAG,KAAK,gBAAgB,IAG/B,IACvB;;CAEJ,CAAC"}
@@ -1,6 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
- const require_types_plugin = require('../types/plugin.cjs');
4
3
  let _stryke_path_join = require("@stryke/path/join");
5
4
 
6
5
  //#region src/helpers/docs-helper.ts
@@ -13,13 +12,6 @@ let _stryke_path_join = require("@stryke/path/join");
13
12
  function getDocsOutputPath(context) {
14
13
  return (0, _stryke_path_join.joinPaths)(context.config.root, "docs", "generated");
15
14
  }
16
- getDocsOutputPath.__type = [
17
- () => require_types_plugin.__ΩOpenFeaturePluginContext,
18
- "context",
19
- "getDocsOutputPath",
20
- "Gets the output path for the generated environment documentation.",
21
- "Pn!2\"&/#?$"
22
- ];
23
15
 
24
16
  //#endregion
25
17
  exports.getDocsOutputPath = getDocsOutputPath;
@@ -1,4 +1,3 @@
1
- import { __ΩOpenFeaturePluginContext } from "../types/plugin.mjs";
2
1
  import { joinPaths } from "@stryke/path/join";
3
2
 
4
3
  //#region src/helpers/docs-helper.ts
@@ -11,13 +10,6 @@ import { joinPaths } from "@stryke/path/join";
11
10
  function getDocsOutputPath(context) {
12
11
  return joinPaths(context.config.root, "docs", "generated");
13
12
  }
14
- getDocsOutputPath.__type = [
15
- () => __ΩOpenFeaturePluginContext,
16
- "context",
17
- "getDocsOutputPath",
18
- "Gets the output path for the generated environment documentation.",
19
- "Pn!2\"&/#?$"
20
- ];
21
13
 
22
14
  //#endregion
23
15
  export { getDocsOutputPath };
@@ -1 +1 @@
1
- {"version":3,"file":"docs-helper.mjs","names":[],"sources":["../../src/helpers/docs-helper.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"@stryke/path/join\";\nimport { OpenFeaturePluginContext } from \"../types/plugin\";\n\n/**\n * Gets the output path for the generated environment documentation.\n *\n * @param context - The environment plugin context.\n * @returns The output path for the generated environment documentation.\n */\nexport function getDocsOutputPath(context: OpenFeaturePluginContext): string {\n return joinPaths(context.config.root, \"docs\", \"generated\");\n}\n"],"mappings":";;;;;;;;;;AA0BA,SAAE,kBAAA,SAAA;AACF,QAAO,UAAS,QAAA,OAAkB,MAAQ,QAAC,YAAA;;AAE3C,kBAAA,SAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA"}
1
+ {"version":3,"file":"docs-helper.mjs","names":[],"sources":["../../src/helpers/docs-helper.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"@stryke/path/join\";\nimport { OpenFeaturePluginContext } from \"../types/plugin\";\n\n/**\n * Gets the output path for the generated environment documentation.\n *\n * @param context - The environment plugin context.\n * @returns The output path for the generated environment documentation.\n */\nexport function getDocsOutputPath(context: OpenFeaturePluginContext): string {\n return joinPaths(context.config.root, \"docs\", \"generated\");\n}\n"],"mappings":";;;;;;;;;AA2BA,SAAgB,kBAAkB,SAA2C;AAC3E,QAAO,UAAU,QAAQ,OAAO,MAAM,QAAQ,YAAY"}
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig, __ΩOpenFeaturePluginContext, __ΩOpenFeaturePluginOptions, __ΩOpenFeaturePluginResolvedConfig, __ΩOpenFeaturePluginUserConfig } from "./types/plugin.cjs";
1
+ import { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig } from "./types/plugin.cjs";
2
2
  import { Plugin } from "powerlines";
3
3
 
4
4
  //#region src/index.d.ts
@@ -12,5 +12,5 @@ declare module "powerlines" {
12
12
  */
13
13
  declare const plugin: <TContext extends OpenFeaturePluginContext = OpenFeaturePluginContext>(options?: OpenFeaturePluginOptions) => Plugin<TContext>[];
14
14
  //#endregion
15
- export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig, __ΩOpenFeaturePluginContext, __ΩOpenFeaturePluginOptions, __ΩOpenFeaturePluginResolvedConfig, __ΩOpenFeaturePluginUserConfig, plugin as default, plugin };
15
+ export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig, plugin as default, plugin };
16
16
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig, __ΩOpenFeaturePluginContext, __ΩOpenFeaturePluginOptions, __ΩOpenFeaturePluginResolvedConfig, __ΩOpenFeaturePluginUserConfig } from "./types/plugin.mjs";
1
+ import { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig } from "./types/plugin.mjs";
2
2
  import { Plugin } from "powerlines";
3
3
 
4
4
  //#region src/index.d.ts
@@ -12,5 +12,5 @@ declare module "powerlines" {
12
12
  */
13
13
  declare const plugin: <TContext extends OpenFeaturePluginContext = OpenFeaturePluginContext>(options?: OpenFeaturePluginOptions) => Plugin<TContext>[];
14
14
  //#endregion
15
- export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig, __ΩOpenFeaturePluginContext, __ΩOpenFeaturePluginOptions, __ΩOpenFeaturePluginResolvedConfig, __ΩOpenFeaturePluginUserConfig, plugin as default, plugin };
15
+ export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig, plugin as default, plugin };
16
16
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport alloy from \"@powerlines/plugin-alloy\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport automd from \"@powerlines/plugin-automd\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { FeaturesBuiltin } from \"./components/features-builtin\";\nimport { features } from \"./helpers/automd-generator\";\nimport {\n OpenFeaturePluginContext,\n OpenFeaturePluginOptions\n} from \"./types/plugin\";\n\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n openFeature?: OpenFeaturePluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to inject environment variables into the source code.\n */\nexport const plugin = <\n TContext extends OpenFeaturePluginContext = OpenFeaturePluginContext\n>(\n options: OpenFeaturePluginOptions = {}\n) => {\n return [\n alloy(options.alloy),\n {\n name: \"open-feature\",\n async prepare() {\n this.debug(\n `Preparing the Feature Flags runtime artifacts for the Powerlines project.`\n );\n\n return render(this, <FeaturesBuiltin />);\n }\n },\n {\n name: \"open-feature:automd-generator\",\n config() {\n return {\n automd: defu(options.automd ?? {}, {\n generators: {\n features: features(this)\n }\n })\n };\n }\n },\n automd(options.automd)\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;AAsCE,QAAA;EAAA,MAAA,QAAA,MAAA;EAAA;GACE,MAAC;GACH,MAAA,UAAA;AACI,SAAC,MAAM,4EAAS;AACpB,WAAS,OAAQ,MAAA,gBAAyB,iBAAE,EAAA,CAAA,CAAA;;GAE5C;EAAA;GACE,MAAC;GACH,SAAO;AACL,WAAM,EACN,QAAA,KAAA,QAAA,UAAA,EAAA,EAAA,EACM,YAAQ,EACN,UAAU,SAAA,KAAA,EACd,EACC,CAAC,EACH;;GAEJ;EAAE,OAAG,QAAO,OAAY;EAAC"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport alloy from \"@powerlines/plugin-alloy\";\nimport { render } from \"@powerlines/plugin-alloy/render\";\nimport automd from \"@powerlines/plugin-automd\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { FeaturesBuiltin } from \"./components/features-builtin\";\nimport { features } from \"./helpers/automd-generator\";\nimport type {\n OpenFeaturePluginContext,\n OpenFeaturePluginOptions\n} from \"./types/plugin\";\n\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n openFeature?: OpenFeaturePluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to inject environment variables into the source code.\n */\nexport const plugin = <\n TContext extends OpenFeaturePluginContext = OpenFeaturePluginContext\n>(\n options: OpenFeaturePluginOptions = {}\n) => {\n return [\n alloy(options.alloy),\n {\n name: \"open-feature\",\n async prepare() {\n this.debug(\n `Preparing the Feature Flags runtime artifacts for the Powerlines project.`\n );\n\n return render(this, <FeaturesBuiltin />);\n }\n },\n {\n name: \"open-feature:automd-generator\",\n config() {\n return {\n automd: defu(options.automd ?? {}, {\n generators: {\n features: features(this)\n }\n })\n };\n }\n },\n automd(options.automd)\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;AAsCE,QAAA;EAAA,MAAA,QAAA,MAAA;EAAA;GACE,MAAC;GACH,MAAA,UAAA;AACI,SAAC,MAAM,4EAAS;AACpB,WAAS,OAAQ,MAAA,gBAAyB,iBAAE,EAAA,CAAA,CAAA;;GAE5C;EAAA;GACE,MAAC;GACH,SAAO;AACL,WAAM,EACN,QAAA,KAAA,QAAA,UAAA,EAAA,EAAA,EACM,YAAQ,EACN,UAAU,SAAA,KAAA,EACd,EACC,CAAC,EACH;;GAEJ;EAAE,OAAG,QAAO,OAAY;EAAC"}
@@ -1,7 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_types_plugin = require('./plugin.cjs');
3
-
4
- exports.__ΩOpenFeaturePluginContext = require_types_plugin.__ΩOpenFeaturePluginContext;
5
- exports.__ΩOpenFeaturePluginOptions = require_types_plugin.__ΩOpenFeaturePluginOptions;
6
- exports.__ΩOpenFeaturePluginResolvedConfig = require_types_plugin.__ΩOpenFeaturePluginResolvedConfig;
7
- exports.__ΩOpenFeaturePluginUserConfig = require_types_plugin.__ΩOpenFeaturePluginUserConfig;
@@ -1,2 +1,2 @@
1
- import { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig, __ΩOpenFeaturePluginContext, __ΩOpenFeaturePluginOptions, __ΩOpenFeaturePluginResolvedConfig, __ΩOpenFeaturePluginUserConfig } from "./plugin.cjs";
2
- export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig, __ΩOpenFeaturePluginContext, __ΩOpenFeaturePluginOptions, __ΩOpenFeaturePluginResolvedConfig, __ΩOpenFeaturePluginUserConfig };
1
+ import { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig } from "./plugin.cjs";
2
+ export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig };
@@ -1,2 +1,2 @@
1
- import { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig, __ΩOpenFeaturePluginContext, __ΩOpenFeaturePluginOptions, __ΩOpenFeaturePluginResolvedConfig, __ΩOpenFeaturePluginUserConfig } from "./plugin.mjs";
2
- export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig, __ΩOpenFeaturePluginContext, __ΩOpenFeaturePluginOptions, __ΩOpenFeaturePluginResolvedConfig, __ΩOpenFeaturePluginUserConfig };
1
+ import { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig } from "./plugin.mjs";
2
+ export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig };
@@ -1,3 +1 @@
1
- import { __ΩOpenFeaturePluginContext, __ΩOpenFeaturePluginOptions, __ΩOpenFeaturePluginResolvedConfig, __ΩOpenFeaturePluginUserConfig } from "./plugin.mjs";
2
-
3
- export { __ΩOpenFeaturePluginContext, __ΩOpenFeaturePluginOptions, __ΩOpenFeaturePluginResolvedConfig, __ΩOpenFeaturePluginUserConfig };
1
+ export { };
@@ -1,53 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
- let _powerlines_plugin_automd_types_plugin = require("@powerlines/plugin-automd/types/plugin");
4
- let _powerlines_plugin_alloy_types = require("@powerlines/plugin-alloy/types");
5
- let _powerlines_plugin_babel_types = require("@powerlines/plugin-babel/types");
6
- let _openfeature_server_sdk = require("@openfeature/server-sdk");
7
-
8
- //#region src/types/plugin.ts
9
- const __ΩOpenFeaturePluginOptions = [
10
- "Provider",
11
- "ServerProviderStatus",
12
- () => _openfeature_server_sdk.ProviderWrapper,
13
- "providers",
14
- "A path to the type definition for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `\":\"` or `\"#\"` character. For example: `\"./src/types/env.ts#ConfigConfiguration\"`.",
15
- () => _powerlines_plugin_automd_types_plugin.__ΩAutoMDPluginOptions,
16
- "automd",
17
- "AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.",
18
- () => _powerlines_plugin_alloy_types.__ΩAlloyPluginOptions,
19
- "alloy",
20
- "Alloy configuration options to use when injecting environment variables into the source code.",
21
- "OpenFeaturePluginOptions",
22
- "P&P\"w!\"w\"7#E4$8?%n&4'8?(n)4*8?+Mw,y"
23
- ];
24
- const __ΩOpenFeaturePluginUserConfig = [
25
- () => _powerlines_plugin_babel_types.__ΩBabelPluginUserConfig,
26
- () => _powerlines_plugin_alloy_types.__ΩAlloyPluginUserConfig,
27
- () => __ΩOpenFeaturePluginOptions,
28
- "openFeature",
29
- "OpenFeaturePluginUserConfig",
30
- "Pn!n\"Pn#4$MKw%y"
31
- ];
32
- const __ΩOpenFeaturePluginResolvedConfig = [
33
- () => _powerlines_plugin_babel_types.__ΩBabelPluginResolvedConfig,
34
- () => _powerlines_plugin_alloy_types.__ΩAlloyPluginResolvedConfig,
35
- () => __ΩOpenFeaturePluginOptions,
36
- "openFeature",
37
- "OpenFeaturePluginResolvedConfig",
38
- "Pn!n\"Pn#4$MKw%y"
39
- ];
40
- const __ΩOpenFeaturePluginContext = [
41
- () => __ΩOpenFeaturePluginResolvedConfig,
42
- "TResolvedConfig",
43
- () => _powerlines_plugin_babel_types.__ΩBabelPluginContext,
44
- () => _powerlines_plugin_alloy_types.__ΩAlloyPluginContext,
45
- "OpenFeaturePluginContext",
46
- "n!c\"Pe\"!o#\"e\"!o$\"Mw%y"
47
- ];
48
-
49
- //#endregion
50
- exports.__ΩOpenFeaturePluginContext = __ΩOpenFeaturePluginContext;
51
- exports.__ΩOpenFeaturePluginOptions = __ΩOpenFeaturePluginOptions;
52
- exports.__ΩOpenFeaturePluginResolvedConfig = __ΩOpenFeaturePluginResolvedConfig;
53
- exports.__ΩOpenFeaturePluginUserConfig = __ΩOpenFeaturePluginUserConfig;
@@ -31,10 +31,6 @@ type OpenFeaturePluginResolvedConfig = BabelPluginResolvedConfig & AlloyPluginRe
31
31
  openFeature: OpenFeaturePluginOptions;
32
32
  };
33
33
  interface OpenFeaturePluginContext<TResolvedConfig extends OpenFeaturePluginResolvedConfig = OpenFeaturePluginResolvedConfig> extends BabelPluginContext<TResolvedConfig>, AlloyPluginContext<TResolvedConfig> {}
34
- declare type __ΩOpenFeaturePluginOptions = any[];
35
- declare type __ΩOpenFeaturePluginUserConfig = any[];
36
- declare type __ΩOpenFeaturePluginResolvedConfig = any[];
37
- declare type __ΩOpenFeaturePluginContext = any[];
38
34
  //#endregion
39
- export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig, __ΩOpenFeaturePluginContext, __ΩOpenFeaturePluginOptions, __ΩOpenFeaturePluginResolvedConfig, __ΩOpenFeaturePluginUserConfig };
35
+ export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig };
40
36
  //# sourceMappingURL=plugin.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;UAoCiB,wBAAA;;AAAjB;;EAIE,SAAA,GAAY,GAAA,SAAY,eAAA,CAAgB,QAAA,EAAU,oBAAA;EAAV;;;;;;EAQxC,MAAA,GAAS,mBAAA;EAQiB;;;;;;EAA1B,KAAA,GAAQ,kBAAA;AAAA;AAAA,KAGE,2BAAA,GAA8B,qBAAA,GACxC,qBAAA;EACE,WAAA,EAAa,wBAAA;AAAA;AAAA,KAGL,+BAAA,GAAkC,yBAAA,GAC5C,yBAAA;EACE,WAAA,EAAa,wBAAA;AAAA;AAAA,UAGA,wBAAA,yBACS,+BAAA,GACtB,+BAAA,UAGA,kBAAA,CAAmB,eAAA,GACnB,kBAAA,CAAmB,eAAA;AAAA"}
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;UAoCiB,wBAAA;;AAAjB;;EAIE,SAAA,GAAY,GAAA,SAAY,eAAA,CAAgB,QAAA,EAAU,oBAAA;EAAV;;;;;;EAQxC,MAAA,GAAS,mBAAA;EAQiB;;;;;;EAA1B,KAAA,GAAQ,kBAAA;AAAA;AAAA,KAGE,2BAAA,GAA8B,qBAAA,GACxC,qBAAA;EACE,WAAA,EAAa,wBAAA;AAAA;AAAA,KAGL,+BAAA,GAAkC,yBAAA,GAC5C,yBAAA;EACE,WAAA,EAAa,wBAAA;AAAA;AAAA,UAGA,wBAAA,yBACS,+BAAA,GACtB,+BAAA,UAGA,kBAAA,CAAmB,eAAA,GACnB,kBAAA,CAAmB,eAAA"}
@@ -1,7 +1,7 @@
1
- import { AutoMDPluginOptions } from "@powerlines/plugin-automd/types/plugin";
1
+ import { Provider, ProviderWrapper, ServerProviderStatus } from "@openfeature/server-sdk";
2
2
  import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig } from "@powerlines/plugin-alloy/types";
3
+ import { AutoMDPluginOptions } from "@powerlines/plugin-automd/types/plugin";
3
4
  import { BabelPluginContext, BabelPluginResolvedConfig, BabelPluginUserConfig } from "@powerlines/plugin-babel/types";
4
- import { Provider, ProviderWrapper, ServerProviderStatus } from "@openfeature/server-sdk";
5
5
 
6
6
  //#region src/types/plugin.d.ts
7
7
  interface OpenFeaturePluginOptions {
@@ -31,10 +31,6 @@ type OpenFeaturePluginResolvedConfig = BabelPluginResolvedConfig & AlloyPluginRe
31
31
  openFeature: OpenFeaturePluginOptions;
32
32
  };
33
33
  interface OpenFeaturePluginContext<TResolvedConfig extends OpenFeaturePluginResolvedConfig = OpenFeaturePluginResolvedConfig> extends BabelPluginContext<TResolvedConfig>, AlloyPluginContext<TResolvedConfig> {}
34
- declare type __ΩOpenFeaturePluginOptions = any[];
35
- declare type __ΩOpenFeaturePluginUserConfig = any[];
36
- declare type __ΩOpenFeaturePluginResolvedConfig = any[];
37
- declare type __ΩOpenFeaturePluginContext = any[];
38
34
  //#endregion
39
- export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig, __ΩOpenFeaturePluginContext, __ΩOpenFeaturePluginOptions, __ΩOpenFeaturePluginResolvedConfig, __ΩOpenFeaturePluginUserConfig };
35
+ export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig };
40
36
  //# sourceMappingURL=plugin.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;UAoCiB,wBAAA;;AAAjB;;EAIE,SAAA,GAAY,GAAA,SAAY,eAAA,CAAgB,QAAA,EAAU,oBAAA;EAAV;;;;;;EAQxC,MAAA,GAAS,mBAAA;EAQiB;;;;;;EAA1B,KAAA,GAAQ,kBAAA;AAAA;AAAA,KAGE,2BAAA,GAA8B,qBAAA,GACxC,qBAAA;EACE,WAAA,EAAa,wBAAA;AAAA;AAAA,KAGL,+BAAA,GAAkC,yBAAA,GAC5C,yBAAA;EACE,WAAA,EAAa,wBAAA;AAAA;AAAA,UAGA,wBAAA,yBACS,+BAAA,GACtB,+BAAA,UAGA,kBAAA,CAAmB,eAAA,GACnB,kBAAA,CAAmB,eAAA;AAAA"}
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;UAoCiB,wBAAA;;AAAjB;;EAIE,SAAA,GAAY,GAAA,SAAY,eAAA,CAAgB,QAAA,EAAU,oBAAA;EAAV;;;;;;EAQxC,MAAA,GAAS,mBAAA;EAQiB;;;;;;EAA1B,KAAA,GAAQ,kBAAA;AAAA;AAAA,KAGE,2BAAA,GAA8B,qBAAA,GACxC,qBAAA;EACE,WAAA,EAAa,wBAAA;AAAA;AAAA,KAGL,+BAAA,GAAkC,yBAAA,GAC5C,yBAAA;EACE,WAAA,EAAa,wBAAA;AAAA;AAAA,UAGA,wBAAA,yBACS,+BAAA,GACtB,+BAAA,UAGA,kBAAA,CAAmB,eAAA,GACnB,kBAAA,CAAmB,eAAA"}
@@ -1,49 +1 @@
1
- import { __ΩAutoMDPluginOptions } from "@powerlines/plugin-automd/types/plugin";
2
- import { __ΩAlloyPluginContext, __ΩAlloyPluginOptions, __ΩAlloyPluginResolvedConfig, __ΩAlloyPluginUserConfig } from "@powerlines/plugin-alloy/types";
3
- import { __ΩBabelPluginContext, __ΩBabelPluginResolvedConfig, __ΩBabelPluginUserConfig } from "@powerlines/plugin-babel/types";
4
- import { ProviderWrapper } from "@openfeature/server-sdk";
5
-
6
- //#region src/types/plugin.ts
7
- const __ΩOpenFeaturePluginOptions = [
8
- "Provider",
9
- "ServerProviderStatus",
10
- () => ProviderWrapper,
11
- "providers",
12
- "A path to the type definition for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `\":\"` or `\"#\"` character. For example: `\"./src/types/env.ts#ConfigConfiguration\"`.",
13
- () => __ΩAutoMDPluginOptions,
14
- "automd",
15
- "AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.",
16
- () => __ΩAlloyPluginOptions,
17
- "alloy",
18
- "Alloy configuration options to use when injecting environment variables into the source code.",
19
- "OpenFeaturePluginOptions",
20
- "P&P\"w!\"w\"7#E4$8?%n&4'8?(n)4*8?+Mw,y"
21
- ];
22
- const __ΩOpenFeaturePluginUserConfig = [
23
- () => __ΩBabelPluginUserConfig,
24
- () => __ΩAlloyPluginUserConfig,
25
- () => __ΩOpenFeaturePluginOptions,
26
- "openFeature",
27
- "OpenFeaturePluginUserConfig",
28
- "Pn!n\"Pn#4$MKw%y"
29
- ];
30
- const __ΩOpenFeaturePluginResolvedConfig = [
31
- () => __ΩBabelPluginResolvedConfig,
32
- () => __ΩAlloyPluginResolvedConfig,
33
- () => __ΩOpenFeaturePluginOptions,
34
- "openFeature",
35
- "OpenFeaturePluginResolvedConfig",
36
- "Pn!n\"Pn#4$MKw%y"
37
- ];
38
- const __ΩOpenFeaturePluginContext = [
39
- () => __ΩOpenFeaturePluginResolvedConfig,
40
- "TResolvedConfig",
41
- () => __ΩBabelPluginContext,
42
- () => __ΩAlloyPluginContext,
43
- "OpenFeaturePluginContext",
44
- "n!c\"Pe\"!o#\"e\"!o$\"Mw%y"
45
- ];
46
-
47
- //#endregion
48
- export { __ΩOpenFeaturePluginContext, __ΩOpenFeaturePluginOptions, __ΩOpenFeaturePluginResolvedConfig, __ΩOpenFeaturePluginUserConfig };
49
- //# sourceMappingURL=plugin.mjs.map
1
+ export { };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-open-feature",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "private": false,
5
5
  "description": "A package containing a Powerlines plugin for managing Open Feature feature flags at runtime.",
6
6
  "keywords": [
@@ -171,29 +171,29 @@
171
171
  "@alloy-js/typescript": "0.23.0-dev.4",
172
172
  "@openfeature/core": "^1.9.2",
173
173
  "@openfeature/server-sdk": "^1.20.2",
174
- "@powerlines/plugin-alloy": "^0.26.4",
175
- "@powerlines/plugin-automd": "^0.1.388",
176
- "@powerlines/plugin-plugin": "^0.12.339",
174
+ "@powerlines/plugin-alloy": "^0.26.6",
175
+ "@powerlines/plugin-automd": "^0.1.390",
176
+ "@powerlines/plugin-plugin": "^0.12.341",
177
177
  "@storm-software/config-tools": "^1.189.72",
178
- "@stryke/convert": "^0.6.57",
179
- "@stryke/env": "^0.20.81",
180
- "@stryke/fs": "^0.33.64",
181
- "@stryke/json": "^0.14.11",
182
- "@stryke/path": "^0.27.3",
183
- "@stryke/string-format": "^0.17.7",
184
- "@stryke/type-checks": "^0.6.0",
185
- "@stryke/types": "^0.11.2",
178
+ "@stryke/convert": "^0.6.58",
179
+ "@stryke/env": "^0.20.83",
180
+ "@stryke/fs": "^0.33.66",
181
+ "@stryke/json": "^0.14.12",
182
+ "@stryke/path": "^0.27.4",
183
+ "@stryke/string-format": "^0.17.9",
184
+ "@stryke/type-checks": "^0.6.1",
185
+ "@stryke/types": "^0.11.3",
186
186
  "automd": "^0.4.3",
187
187
  "defu": "^6.1.6",
188
- "powerlines": "^0.42.29",
188
+ "powerlines": "^0.42.31",
189
189
  "c12": "^3.3.4"
190
190
  },
191
191
  "devDependencies": {
192
192
  "@openfeature/flagd-provider": "^0.14.0",
193
193
  "@openfeature/server-sdk": "^1.20.2",
194
194
  "@types/node": "^25.5.2",
195
- "vite": "^8.0.3"
195
+ "vite": "^8.0.5"
196
196
  },
197
197
  "publishConfig": { "access": "public" },
198
- "gitHead": "a3bf899dc847341452a0c384eb598c096b186a11"
198
+ "gitHead": "10fd6444f28886b36493e190e8f09755d7401d6f"
199
199
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.mjs","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Provider,\n ProviderWrapper,\n ServerProviderStatus\n} from \"@openfeature/server-sdk\";\nimport {\n AlloyPluginContext,\n AlloyPluginOptions,\n AlloyPluginResolvedConfig,\n AlloyPluginUserConfig\n} from \"@powerlines/plugin-alloy/types\";\nimport { AutoMDPluginOptions } from \"@powerlines/plugin-automd/types/plugin\";\nimport {\n BabelPluginContext,\n BabelPluginResolvedConfig,\n BabelPluginUserConfig\n} from \"@powerlines/plugin-babel/types\";\n\nexport interface OpenFeaturePluginOptions {\n /**\n * A path to the type definition for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `\":\"` or `\"#\"` character. For example: `\"./src/types/env.ts#ConfigConfiguration\"`.\n */\n providers?: Map<string, ProviderWrapper<Provider, ServerProviderStatus>>;\n\n /**\n * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.\n *\n * @remarks\n * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.\n */\n automd?: AutoMDPluginOptions;\n\n /**\n * Alloy configuration options to use when injecting environment variables into the source code.\n *\n * @remarks\n * This option allows you to customize the Alloy transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Alloy settings.\n */\n alloy?: AlloyPluginOptions;\n}\n\nexport type OpenFeaturePluginUserConfig = BabelPluginUserConfig &\n AlloyPluginUserConfig & {\n openFeature: OpenFeaturePluginOptions;\n };\n\nexport type OpenFeaturePluginResolvedConfig = BabelPluginResolvedConfig &\n AlloyPluginResolvedConfig & {\n openFeature: OpenFeaturePluginOptions;\n };\n\nexport interface OpenFeaturePluginContext<\n TResolvedConfig extends OpenFeaturePluginResolvedConfig =\n OpenFeaturePluginResolvedConfig\n>\n extends\n BabelPluginContext<TResolvedConfig>,\n AlloyPluginContext<TResolvedConfig> {}\n"],"mappings":";;;;;;AAkCA,MAAM,8BAA2B;CAAA;CAAM;OAAA;CAAA;CAAA;OAAA;CAAA;CAAA;OAAA;CAAA;CAAA;CAAA;CAAA;CAAA;AAEvC,MAAM,iCAAW;OAAyB;OAAA;OAAA;CAAA;CAAA;CAAA;CAAA;AAE1C,MAAM,qCAAqC;OAAA;OAA2C;OAAkC;CAA4B;CAAiB;CAAoC;CAAY;AAErN,MAAE,8BAAwB;OAAgB;CAAgC;OAAA;OAAA;CAAA;CAAA;CAAA"}