@powerlines/plugin-open-feature 0.1.24 → 0.1.26
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.
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
-
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
4
3
|
let _alloy_js_core = require("@alloy-js/core");
|
|
5
4
|
let _alloy_js_typescript = require("@alloy-js/typescript");
|
|
6
5
|
let _powerlines_plugin_alloy_core_components_spacing = require("@powerlines/plugin-alloy/core/components/spacing");
|
|
@@ -8,6 +7,7 @@ let _powerlines_plugin_alloy_typescript_components_builtin_file = require("@powe
|
|
|
8
7
|
let _powerlines_plugin_alloy_typescript_components_tsdoc = require("@powerlines/plugin-alloy/typescript/components/tsdoc");
|
|
9
8
|
let defu = require("defu");
|
|
10
9
|
defu = require_runtime.__toESM(defu);
|
|
10
|
+
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
11
11
|
|
|
12
12
|
//#region src/components/features-builtin.tsx
|
|
13
13
|
/**
|
|
@@ -15,87 +15,79 @@ defu = require_runtime.__toESM(defu);
|
|
|
15
15
|
*/
|
|
16
16
|
function FeaturesBuiltin(props) {
|
|
17
17
|
const [{ children, imports }, rest] = (0, _alloy_js_core.splitProps)(props, ["children", "imports"]);
|
|
18
|
-
return (0, _alloy_js_core_jsx_runtime.
|
|
18
|
+
return /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsxs)(_powerlines_plugin_alloy_typescript_components_builtin_file.BuiltinFile, {
|
|
19
19
|
id: "features",
|
|
20
|
-
description: "The runtime feature flags module provides an interface to define environment configuration parameters."
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
parameters: [{
|
|
55
|
-
name: "provider",
|
|
56
|
-
type: "ProviderWrapper<Provider, ServerProviderStatus>"
|
|
57
|
-
}],
|
|
58
|
-
children: _alloy_js_core.code`try {
|
|
20
|
+
description: "The runtime feature flags module provides an interface to define environment configuration parameters.",
|
|
21
|
+
...rest,
|
|
22
|
+
imports: (0, defu.default)({ "@openfeature/server-sdk": [
|
|
23
|
+
{ name: "OpenFeature" },
|
|
24
|
+
{
|
|
25
|
+
name: "Provider",
|
|
26
|
+
type: true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "ProviderWrapper",
|
|
30
|
+
type: true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "ServerProviderStatus",
|
|
34
|
+
type: true
|
|
35
|
+
}
|
|
36
|
+
] }, imports ?? {}),
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_powerlines_plugin_alloy_typescript_components_tsdoc.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
|
+
children: /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_powerlines_plugin_alloy_typescript_components_tsdoc.TSDocParam, {
|
|
41
|
+
name: "provider",
|
|
42
|
+
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.`
|
|
43
|
+
})
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_typescript.FunctionDeclaration, {
|
|
46
|
+
name: "setFeatureProvider",
|
|
47
|
+
export: true,
|
|
48
|
+
async: true,
|
|
49
|
+
parameters: [{
|
|
50
|
+
name: "provider",
|
|
51
|
+
type: "ProviderWrapper<Provider, ServerProviderStatus>"
|
|
52
|
+
}],
|
|
53
|
+
children: _alloy_js_core.code`try {
|
|
59
54
|
await OpenFeature.setProviderAndWait(provider);
|
|
60
55
|
} catch (error) {
|
|
61
56
|
console.error("Failed to initialize provider: ", error);
|
|
62
57
|
} `
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
60
|
+
/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_typescript.VarDeclaration, {
|
|
61
|
+
name: "client",
|
|
62
|
+
export: true,
|
|
63
|
+
const: true,
|
|
64
|
+
doc: "The Open Feature runtime client to provide feature flag evaluations.",
|
|
65
|
+
type: "ReturnType<typeof OpenFeature.getClient>",
|
|
66
|
+
children: _alloy_js_core.code`OpenFeature.getClient(); `
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
69
|
+
/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_typescript.FunctionDeclaration, {
|
|
70
|
+
name: "feature",
|
|
71
|
+
export: true,
|
|
72
|
+
async: true,
|
|
73
|
+
parameters: [{
|
|
74
|
+
name: "featureId",
|
|
75
|
+
type: "string"
|
|
76
|
+
}],
|
|
77
|
+
returnType: "Promise<boolean>",
|
|
78
|
+
children: _alloy_js_core.code`try {
|
|
84
79
|
return client.getBooleanValue(featureId);
|
|
85
80
|
} catch (error) {
|
|
86
81
|
console.error("Failed to evaluate feature flag: ", error);
|
|
87
82
|
} `
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
];
|
|
97
|
-
}
|
|
98
|
-
}));
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
|
|
85
|
+
/* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(_alloy_js_core.Show, {
|
|
86
|
+
when: Boolean(children),
|
|
87
|
+
children
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
});
|
|
99
91
|
}
|
|
100
92
|
|
|
101
93
|
//#endregion
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createComponent, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
2
1
|
import { Show, code, splitProps } from "@alloy-js/core";
|
|
3
2
|
import { FunctionDeclaration, VarDeclaration } from "@alloy-js/typescript";
|
|
4
3
|
import { Spacing } from "@powerlines/plugin-alloy/core/components/spacing";
|
|
5
4
|
import { BuiltinFile } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
|
|
6
5
|
import { TSDoc, TSDocParam } from "@powerlines/plugin-alloy/typescript/components/tsdoc";
|
|
7
6
|
import defu from "defu";
|
|
7
|
+
import { jsx, jsxs } from "@alloy-js/core/jsx-runtime";
|
|
8
8
|
|
|
9
9
|
//#region src/components/features-builtin.tsx
|
|
10
10
|
/**
|
|
@@ -12,87 +12,79 @@ import defu from "defu";
|
|
|
12
12
|
*/
|
|
13
13
|
function FeaturesBuiltin(props) {
|
|
14
14
|
const [{ children, imports }, rest] = splitProps(props, ["children", "imports"]);
|
|
15
|
-
return
|
|
15
|
+
return /* @__PURE__ */ jsxs(BuiltinFile, {
|
|
16
16
|
id: "features",
|
|
17
|
-
description: "The runtime feature flags module provides an interface to define environment configuration parameters."
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
parameters: [{
|
|
52
|
-
name: "provider",
|
|
53
|
-
type: "ProviderWrapper<Provider, ServerProviderStatus>"
|
|
54
|
-
}],
|
|
55
|
-
children: code`try {
|
|
17
|
+
description: "The runtime feature flags module provides an interface to define environment configuration parameters.",
|
|
18
|
+
...rest,
|
|
19
|
+
imports: defu({ "@openfeature/server-sdk": [
|
|
20
|
+
{ name: "OpenFeature" },
|
|
21
|
+
{
|
|
22
|
+
name: "Provider",
|
|
23
|
+
type: true
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "ProviderWrapper",
|
|
27
|
+
type: true
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "ServerProviderStatus",
|
|
31
|
+
type: true
|
|
32
|
+
}
|
|
33
|
+
] }, imports ?? {}),
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsx(TSDoc, {
|
|
36
|
+
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.",
|
|
37
|
+
children: /* @__PURE__ */ jsx(TSDocParam, {
|
|
38
|
+
name: "provider",
|
|
39
|
+
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.`
|
|
40
|
+
})
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ jsx(FunctionDeclaration, {
|
|
43
|
+
name: "setFeatureProvider",
|
|
44
|
+
export: true,
|
|
45
|
+
async: true,
|
|
46
|
+
parameters: [{
|
|
47
|
+
name: "provider",
|
|
48
|
+
type: "ProviderWrapper<Provider, ServerProviderStatus>"
|
|
49
|
+
}],
|
|
50
|
+
children: code`try {
|
|
56
51
|
await OpenFeature.setProviderAndWait(provider);
|
|
57
52
|
} catch (error) {
|
|
58
53
|
console.error("Failed to initialize provider: ", error);
|
|
59
54
|
} `
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ jsx(Spacing, {}),
|
|
57
|
+
/* @__PURE__ */ jsx(VarDeclaration, {
|
|
58
|
+
name: "client",
|
|
59
|
+
export: true,
|
|
60
|
+
const: true,
|
|
61
|
+
doc: "The Open Feature runtime client to provide feature flag evaluations.",
|
|
62
|
+
type: "ReturnType<typeof OpenFeature.getClient>",
|
|
63
|
+
children: code`OpenFeature.getClient(); `
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ jsx(Spacing, {}),
|
|
66
|
+
/* @__PURE__ */ jsx(FunctionDeclaration, {
|
|
67
|
+
name: "feature",
|
|
68
|
+
export: true,
|
|
69
|
+
async: true,
|
|
70
|
+
parameters: [{
|
|
71
|
+
name: "featureId",
|
|
72
|
+
type: "string"
|
|
73
|
+
}],
|
|
74
|
+
returnType: "Promise<boolean>",
|
|
75
|
+
children: code`try {
|
|
81
76
|
return client.getBooleanValue(featureId);
|
|
82
77
|
} catch (error) {
|
|
83
78
|
console.error("Failed to evaluate feature flag: ", error);
|
|
84
79
|
} `
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
];
|
|
94
|
-
}
|
|
95
|
-
}));
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ jsx(Spacing, {}),
|
|
82
|
+
/* @__PURE__ */ jsx(Show, {
|
|
83
|
+
when: Boolean(children),
|
|
84
|
+
children
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
});
|
|
96
88
|
}
|
|
97
89
|
|
|
98
90
|
//#endregion
|
|
@@ -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 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":"
|
|
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":";;;;;;;;;;;;AAoCA,SAAgB,gBAAgB,OAA6B;CAC3D,MAAM,CAAC,EAAE,UAAU,WAAW,QAAQ,WAAW,OAAO,CACtD,YACA,UACD,CAAC;AAIF,QACE,qBAAC,aAAD;EACE,IAAG;EACH,aAAY;EACZ,GAAI;EACJ,SAAS,KACP,EACE,2BAA2B;GACzB,EAAE,MAAM,eAAe;GACvB;IAAE,MAAM;IAAY,MAAM;IAAM;GAChC;IAAE,MAAM;IAAmB,MAAM;IAAM;GACvC;IAAE,MAAM;IAAwB,MAAM;IAAM;GAC7C,EACF,EACD,WAAW,EAAE,CACd;YAdH;GAeE,oBAAC,OAAD;IAAO,SAAQ;cACb,oBAAC,YAAD;KAAY,MAAK;eACd;KACU;IACP;GACR,oBAAC,qBAAD;IACE,MAAK;IACL;IACA;IACA,YAAY,CACV;KACE,MAAM;KACN,MAAM;KACP,CACF;cACA,IAAI;;;;;IAKe;GACtB,oBAAC,SAAD,EAAW;GACX,oBAAC,gBAAD;IACE,MAAK;IACL;IACA;IACA,KAAI;IACJ,MAAK;cACJ,IAAI;IACU;GACjB,oBAAC,SAAD,EAAW;GACX,oBAAC,qBAAD;IACE,MAAK;IACL;IACA;IACA,YAAY,CACV;KACE,MAAM;KACN,MAAM;KACP,CACF;IACD,YAAW;cACV,IAAI;;;;;IAKe;GACtB,oBAAC,SAAD,EAAW;GACX,oBAAC,MAAD;IAAM,MAAM,QAAQ,SAAS;IAAG;IAAgB;GACpC"}
|
package/dist/index.cjs
CHANGED
|
@@ -2,9 +2,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
2
2
|
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
const require_helpers_automd_generator = require('./helpers/automd-generator.cjs');
|
|
4
4
|
const require_components_features_builtin = require('./components/features-builtin.cjs');
|
|
5
|
-
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
5
|
let defu = require("defu");
|
|
7
6
|
defu = require_runtime.__toESM(defu);
|
|
7
|
+
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
8
8
|
let _powerlines_plugin_alloy = require("@powerlines/plugin-alloy");
|
|
9
9
|
_powerlines_plugin_alloy = require_runtime.__toESM(_powerlines_plugin_alloy);
|
|
10
10
|
let _powerlines_plugin_alloy_render = require("@powerlines/plugin-alloy/render");
|
|
@@ -22,7 +22,7 @@ const plugin = (options = {}) => {
|
|
|
22
22
|
name: "open-feature",
|
|
23
23
|
async prepare() {
|
|
24
24
|
this.debug(`Preparing the Feature Flags runtime artifacts for the Powerlines project.`);
|
|
25
|
-
return (0, _powerlines_plugin_alloy_render.render)(this, (0, _alloy_js_core_jsx_runtime.
|
|
25
|
+
return (0, _powerlines_plugin_alloy_render.render)(this, /* @__PURE__ */ (0, _alloy_js_core_jsx_runtime.jsx)(require_components_features_builtin.FeaturesBuiltin, {}));
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { features } from "./helpers/automd-generator.mjs";
|
|
2
2
|
import { FeaturesBuiltin } from "./components/features-builtin.mjs";
|
|
3
|
-
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
4
3
|
import defu from "defu";
|
|
4
|
+
import { jsx } from "@alloy-js/core/jsx-runtime";
|
|
5
5
|
import alloy from "@powerlines/plugin-alloy";
|
|
6
6
|
import { render } from "@powerlines/plugin-alloy/render";
|
|
7
7
|
import automd from "@powerlines/plugin-automd";
|
|
@@ -17,7 +17,7 @@ const plugin = (options = {}) => {
|
|
|
17
17
|
name: "open-feature",
|
|
18
18
|
async prepare() {
|
|
19
19
|
this.debug(`Preparing the Feature Flags runtime artifacts for the Powerlines project.`);
|
|
20
|
-
return render(this,
|
|
20
|
+
return render(this, /* @__PURE__ */ jsx(FeaturesBuiltin, {}));
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
{
|
package/dist/index.mjs.map
CHANGED
|
@@ -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 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":"
|
|
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":";;;;;;;;;;;;AAyCA,MAAa,UAGX,UAAoC,EAAE,KACnC;AACH,QAAO;EACL,MAAM,QAAQ,MAAM;EACpB;GACE,MAAM;GACN,MAAM,UAAU;AACd,SAAK,MACH,4EACD;AAED,WAAO,OAAO,MAAM,oBAAC,iBAAD,EAAmB,EAAC;;GAE3C;EACD;GACE,MAAM;GACN,SAAS;AACP,WAAO,EACL,QAAQ,KAAK,QAAQ,UAAU,EAAE,EAAE,EACjC,YAAY,EACV,UAAU,SAAS,KAAK,EACzB,EACF,CAAC,EACH;;GAEJ;EACD,OAAO,QAAQ,OAAO;EACvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-open-feature",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.26",
|
|
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,9 +171,9 @@
|
|
|
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.
|
|
175
|
-
"@powerlines/plugin-automd": "^0.1.
|
|
176
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
174
|
+
"@powerlines/plugin-alloy": "^0.26.20",
|
|
175
|
+
"@powerlines/plugin-automd": "^0.1.402",
|
|
176
|
+
"@powerlines/plugin-plugin": "^0.12.353",
|
|
177
177
|
"@storm-software/config-tools": "^1.189.77",
|
|
178
178
|
"@stryke/convert": "^0.6.58",
|
|
179
179
|
"@stryke/env": "^0.20.83",
|
|
@@ -185,15 +185,15 @@
|
|
|
185
185
|
"@stryke/types": "^0.11.3",
|
|
186
186
|
"automd": "^0.4.3",
|
|
187
187
|
"defu": "^6.1.7",
|
|
188
|
-
"powerlines": "^0.
|
|
188
|
+
"powerlines": "^0.43.1",
|
|
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.6.0",
|
|
195
|
-
"vite": "^8.0.
|
|
195
|
+
"vite": "^8.0.9"
|
|
196
196
|
},
|
|
197
197
|
"publishConfig": { "access": "public" },
|
|
198
|
-
"gitHead": "
|
|
198
|
+
"gitHead": "0b0428286336ad582b5c70e69dfd97ba6b586b59"
|
|
199
199
|
}
|