@powerlines/plugin-open-feature 0.1.55 → 0.1.56

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.
Files changed (41) hide show
  1. package/package.json +6 -6
  2. package/dist/_virtual/_rolldown/runtime.cjs +0 -1
  3. package/dist/components/features-builtin.cjs +0 -9
  4. package/dist/components/features-builtin.d.cts +0 -12
  5. package/dist/components/features-builtin.d.cts.map +0 -1
  6. package/dist/components/features-builtin.d.mts +0 -12
  7. package/dist/components/features-builtin.d.mts.map +0 -1
  8. package/dist/components/features-builtin.mjs +0 -10
  9. package/dist/components/features-builtin.mjs.map +0 -1
  10. package/dist/components/index.cjs +0 -1
  11. package/dist/components/index.d.cts +0 -2
  12. package/dist/components/index.d.mts +0 -2
  13. package/dist/components/index.mjs +0 -1
  14. package/dist/helpers/automd-generator.cjs +0 -1
  15. package/dist/helpers/automd-generator.d.cts +0 -14
  16. package/dist/helpers/automd-generator.d.cts.map +0 -1
  17. package/dist/helpers/automd-generator.d.mts +0 -14
  18. package/dist/helpers/automd-generator.d.mts.map +0 -1
  19. package/dist/helpers/automd-generator.mjs +0 -2
  20. package/dist/helpers/automd-generator.mjs.map +0 -1
  21. package/dist/helpers/index.cjs +0 -1
  22. package/dist/helpers/index.d.cts +0 -2
  23. package/dist/helpers/index.d.mts +0 -2
  24. package/dist/helpers/index.mjs +0 -1
  25. package/dist/index.cjs +0 -1
  26. package/dist/index.d.cts +0 -16
  27. package/dist/index.d.cts.map +0 -1
  28. package/dist/index.d.mts +0 -16
  29. package/dist/index.d.mts.map +0 -1
  30. package/dist/index.mjs +0 -2
  31. package/dist/index.mjs.map +0 -1
  32. package/dist/types/index.cjs +0 -0
  33. package/dist/types/index.d.cts +0 -2
  34. package/dist/types/index.d.mts +0 -2
  35. package/dist/types/index.mjs +0 -1
  36. package/dist/types/plugin.cjs +0 -0
  37. package/dist/types/plugin.d.cts +0 -36
  38. package/dist/types/plugin.d.cts.map +0 -1
  39. package/dist/types/plugin.d.mts +0 -36
  40. package/dist/types/plugin.d.mts.map +0 -1
  41. package/dist/types/plugin.mjs +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-open-feature",
3
- "version": "0.1.55",
3
+ "version": "0.1.56",
4
4
  "private": false,
5
5
  "description": "A package containing a Powerlines plugin for managing Open Feature feature flags at runtime.",
6
6
  "keywords": [
@@ -157,9 +157,9 @@
157
157
  "@alloy-js/typescript": "0.23.0-dev.4",
158
158
  "@openfeature/core": "^1.10.0",
159
159
  "@openfeature/server-sdk": "^1.21.0",
160
- "@powerlines/plugin-alloy": "^0.26.49",
161
- "@powerlines/plugin-automd": "^0.1.431",
162
- "@powerlines/plugin-plugin": "^0.12.382",
160
+ "@powerlines/plugin-alloy": "^0.26.51",
161
+ "@powerlines/plugin-automd": "^0.1.432",
162
+ "@powerlines/plugin-plugin": "^0.12.383",
163
163
  "@storm-software/config-tools": "^1.189.78",
164
164
  "@stryke/convert": "^0.7.0",
165
165
  "@stryke/env": "^0.20.84",
@@ -171,7 +171,7 @@
171
171
  "@stryke/types": "^0.11.4",
172
172
  "automd": "^0.4.3",
173
173
  "defu": "^6.1.7",
174
- "powerlines": "^0.43.27",
174
+ "powerlines": "^0.43.28",
175
175
  "c12": "^3.3.4"
176
176
  },
177
177
  "devDependencies": {
@@ -181,5 +181,5 @@
181
181
  "vite": "^8.0.10"
182
182
  },
183
183
  "publishConfig": { "access": "public" },
184
- "gitHead": "ad851a239011b884c15b0444db518d74927fd13f"
184
+ "gitHead": "efeaec793549f37c700f2e876bf6097c37375c46"
185
185
  }
@@ -1 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));exports.__toESM=s;
@@ -1,9 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/_rolldown/runtime.cjs`);let t=require(`@alloy-js/core/jsx-runtime`),n=require(`@alloy-js/core`),r=require(`@alloy-js/typescript`),i=require(`@powerlines/plugin-alloy/core/components/spacing`),a=require(`@powerlines/plugin-alloy/typescript/components/builtin-file`),o=require(`@powerlines/plugin-alloy/typescript/components/tsdoc`),s=require(`defu`);s=e.__toESM(s);function c(e){let[{children:c,imports:l},u]=(0,n.splitProps)(e,[`children`,`imports`]);return(0,t.createComponent)(a.BuiltinFile,(0,t.mergeProps)({id:`features`,description:`The runtime feature flags module provides an interface to define environment configuration parameters.`},u,{get imports(){return(0,s.default)({"@openfeature/server-sdk":[{name:`OpenFeature`},{name:`Provider`,type:!0},{name:`ProviderWrapper`,type:!0},{name:`ServerProviderStatus`,type:!0}]},l??{})},get children(){return[(0,t.createComponent)(o.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.`,get children(){return(0,t.createComponent)(o.TSDocParam,{name:`provider`,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.`})}}),(0,t.createComponent)(r.FunctionDeclaration,{name:`setFeatureProvider`,export:!0,async:!0,parameters:[{name:`provider`,type:`ProviderWrapper<Provider, ServerProviderStatus>`}],children:n.code`try {
2
- await OpenFeature.setProviderAndWait(provider);
3
- } catch (error) {
4
- console.error("Failed to initialize provider: ", error);
5
- } `}),(0,t.createComponent)(i.Spacing,{}),(0,t.createComponent)(r.VarDeclaration,{name:`client`,export:!0,const:!0,doc:`The Open Feature runtime client to provide feature flag evaluations.`,type:`ReturnType<typeof OpenFeature.getClient>`,children:n.code`OpenFeature.getClient(); `}),(0,t.createComponent)(i.Spacing,{}),(0,t.createComponent)(r.FunctionDeclaration,{name:`feature`,export:!0,async:!0,parameters:[{name:`featureId`,type:`string`}],returnType:`Promise<boolean>`,children:n.code`try {
6
- return client.getBooleanValue(featureId);
7
- } catch (error) {
8
- console.error("Failed to evaluate feature flag: ", error);
9
- } `}),(0,t.createComponent)(i.Spacing,{}),(0,t.createComponent)(n.Show,{get when(){return!!c},children:c})]}}))}exports.FeaturesBuiltin=c;
@@ -1,12 +0,0 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
- import { BuiltinFileProps } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
3
-
4
- //#region src/components/features-builtin.d.ts
5
- type FeaturesBuiltinProps = Omit<BuiltinFileProps, "id">;
6
- /**
7
- * Generates the feature flags module for the Powerlines project.
8
- */
9
- declare function FeaturesBuiltin(props: FeaturesBuiltinProps): _$_alloy_js_core0.Children;
10
- //#endregion
11
- export { FeaturesBuiltin, FeaturesBuiltinProps };
12
- //# sourceMappingURL=features-builtin.d.cts.map
@@ -1 +0,0 @@
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"}
@@ -1,12 +0,0 @@
1
- import * as _$_alloy_js_core0 from "@alloy-js/core";
2
- import { BuiltinFileProps } from "@powerlines/plugin-alloy/typescript/components/builtin-file";
3
-
4
- //#region src/components/features-builtin.d.ts
5
- type FeaturesBuiltinProps = Omit<BuiltinFileProps, "id">;
6
- /**
7
- * Generates the feature flags module for the Powerlines project.
8
- */
9
- declare function FeaturesBuiltin(props: FeaturesBuiltinProps): _$_alloy_js_core0.Children;
10
- //#endregion
11
- export { FeaturesBuiltin, FeaturesBuiltinProps };
12
- //# sourceMappingURL=features-builtin.d.mts.map
@@ -1 +0,0 @@
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"}
@@ -1,10 +0,0 @@
1
- import{createComponent as e,mergeProps as t}from"@alloy-js/core/jsx-runtime";import{Show as n,code as r,splitProps as i}from"@alloy-js/core";import{FunctionDeclaration as a,VarDeclaration as o}from"@alloy-js/typescript";import{Spacing as s}from"@powerlines/plugin-alloy/core/components/spacing";import{BuiltinFile as c}from"@powerlines/plugin-alloy/typescript/components/builtin-file";import{TSDoc as l,TSDocParam as u}from"@powerlines/plugin-alloy/typescript/components/tsdoc";import d from"defu";function f(f){let[{children:p,imports:m},h]=i(f,[`children`,`imports`]);return e(c,t({id:`features`,description:`The runtime feature flags module provides an interface to define environment configuration parameters.`},h,{get imports(){return d({"@openfeature/server-sdk":[{name:`OpenFeature`},{name:`Provider`,type:!0},{name:`ProviderWrapper`,type:!0},{name:`ServerProviderStatus`,type:!0}]},m??{})},get children(){return[e(l,{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.`,get children(){return e(u,{name:`provider`,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.`})}}),e(a,{name:`setFeatureProvider`,export:!0,async:!0,parameters:[{name:`provider`,type:`ProviderWrapper<Provider, ServerProviderStatus>`}],children:r`try {
2
- await OpenFeature.setProviderAndWait(provider);
3
- } catch (error) {
4
- console.error("Failed to initialize provider: ", error);
5
- } `}),e(s,{}),e(o,{name:`client`,export:!0,const:!0,doc:`The Open Feature runtime client to provide feature flag evaluations.`,type:`ReturnType<typeof OpenFeature.getClient>`,children:r`OpenFeature.getClient(); `}),e(s,{}),e(a,{name:`feature`,export:!0,async:!0,parameters:[{name:`featureId`,type:`string`}],returnType:`Promise<boolean>`,children:r`try {
6
- return client.getBooleanValue(featureId);
7
- } catch (error) {
8
- console.error("Failed to evaluate feature flag: ", error);
9
- } `}),e(s,{}),e(n,{get when(){return!!p},children:p})]}}))}export{f as FeaturesBuiltin};
10
- //# sourceMappingURL=features-builtin.mjs.map
@@ -1 +0,0 @@
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":"kfA4BA,SAAS,EAAuB,EAAC,CACjC,GAAO,CAAA,CAAA,WAEP,WAAA,GAAA,EAAA,EAAA,CAAA,WAAA,UAAA,CAAA,CAKA,OAAO,EAAS,EAAuB,EAAA,CACrC,GAAM,WACJ,YAAU,yGACX,CAAE,EAAA,CACD,IAAA,SAAA,WAEC,0BAA8B,CAAA,CAAA,KAAA,cAE1B,CAAA,CACJ,KAAA,WACK,KAAA,GACJ,CAAA,CACI,KAAI,kBACR,KAAS,GACP,CAAA,CACE,KAAE,uBACF,KAAI,GACL,CAAC,CACH,CAAE,GAAW,EAAC,CAAA,EAEjB,IAAI,UAAE,CACJ,MAAG,CAAA,EAAA,EAAA,CACD,QAAS,yOACT,IAAA,UAAA,CACD,OAAM,EAAsB,EAAS,CACnC,KAAA,WACG,SAAI,iQACN,CAAA,EAEH,CAAA,CAAA,EAAA,EAAA,CACC,KAAM,qBACN,OAAA,GACA,MAAA,GACA,WAAY,CAAA,CACV,KAAA,WACA,KAAM,kDACP,CAAC,CACF,SAAE,CAAA;;;;YAKH,CAAC,CAAE,EAAe,EAAU,EAAA,CAAA,CAAA,EAAwB,EAAM,CACzD,KAAG,SACH,OAAA,GACD,MAAS,GACT,IAAA,uEACC,KAAM,2CACN,SAAA,CAAA,4BACD,CAAC,CAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA,EAAA,CACA,KAAK,UACL,OAAM,GACN,MAAM,GACN,WAAA,CAAA,CACD,KAAS,YACT,KAAA,SACC,CAAA,CACA,WAAA,mBACA,SAAA,CAAA;;;;YAKD,CAAC,CAAE,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA,EAAA,CACF,IAAC,MAAA,CACD,MAAA,EAAY,GAEH,WACV,CAAC,CAAC,EAEN,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./features-builtin.cjs`);exports.FeaturesBuiltin=e.FeaturesBuiltin;
@@ -1,2 +0,0 @@
1
- import { FeaturesBuiltin, FeaturesBuiltinProps } from "./features-builtin.cjs";
2
- export { FeaturesBuiltin, FeaturesBuiltinProps };
@@ -1,2 +0,0 @@
1
- import { FeaturesBuiltin, FeaturesBuiltinProps } from "./features-builtin.mjs";
2
- export { FeaturesBuiltin, FeaturesBuiltinProps };
@@ -1 +0,0 @@
1
- import{FeaturesBuiltin as e}from"./features-builtin.mjs";export{e as FeaturesBuiltin};
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);let e=require(`@stryke/path/join-paths`),t=require(`automd`),n=require(`powerlines/plugin-utils`);const r=r=>(0,t.defineGenerator)({name:`features`,async generate(){let t=(0,e.joinPaths)((0,n.getDocsOutputPath)(r.config.root),`features.md`);return r.fs.existsSync(t)?{contents:await r.fs.read(t)||``}:{contents:``}}});exports.features=r;
@@ -1,14 +0,0 @@
1
- import * as _$automd from "automd";
2
- import { UnresolvedContext } from "powerlines";
3
-
4
- //#region src/helpers/automd-generator.d.ts
5
- /**
6
- * AutoMD generator to generate feature flags documentation
7
- *
8
- * @param context - The generator context.
9
- * @returns The generated documentation content.
10
- */
11
- declare const features: (context: UnresolvedContext) => _$automd.Generator;
12
- //#endregion
13
- export { features };
14
- //# sourceMappingURL=automd-generator.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"automd-generator.d.cts","names":[],"sources":["../../src/helpers/automd-generator.ts"],"mappings":";;;;;;;AA6BA;;;cAAa,QAAA,GAAY,OAAA,EAAS,iBAAA,KAAiB,QAAA,CAAA,SAAA"}
@@ -1,14 +0,0 @@
1
- import * as _$automd from "automd";
2
- import { UnresolvedContext } from "powerlines";
3
-
4
- //#region src/helpers/automd-generator.d.ts
5
- /**
6
- * AutoMD generator to generate feature flags documentation
7
- *
8
- * @param context - The generator context.
9
- * @returns The generated documentation content.
10
- */
11
- declare const features: (context: UnresolvedContext) => _$automd.Generator;
12
- //#endregion
13
- export { features };
14
- //# sourceMappingURL=automd-generator.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"automd-generator.d.mts","names":[],"sources":["../../src/helpers/automd-generator.ts"],"mappings":";;;;;;;AA6BA;;;cAAa,QAAA,GAAY,OAAA,EAAS,iBAAA,KAAiB,QAAA,CAAA,SAAA"}
@@ -1,2 +0,0 @@
1
- import{joinPaths as e}from"@stryke/path/join-paths";import{defineGenerator as t}from"automd";import{getDocsOutputPath as n}from"powerlines/plugin-utils";const r=r=>t({name:`features`,async generate(){let t=e(n(r.config.root),`features.md`);return r.fs.existsSync(t)?{contents:await r.fs.read(t)||``}:{contents:``}}});export{r as features};
2
- //# sourceMappingURL=automd-generator.mjs.map
@@ -1 +0,0 @@
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\";\nimport { getDocsOutputPath } from \"powerlines/plugin-utils\";\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 getDocsOutputPath(context.config.root),\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":"yJA6BA,MAAa,EAAW,GAAU,EAAiB,CACjD,KAAA,WACA,MAAM,UAAW,CACf,IAAM,EAAW,EAAA,EAAA,EAAA,OAAA,KAAA,CAAA,cAAA,CAOjB,OANE,EAAM,GAAA,WAAkB,EAAS,CAM/B,CACF,SAAI,MAFY,EAAW,GAAA,KAAA,EAAkB,EAE9B,GAChB,CAPG,CACA,SAAU,GACX"}
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./automd-generator.cjs`);exports.features=e.features;
@@ -1,2 +0,0 @@
1
- import { features } from "./automd-generator.cjs";
2
- export { features };
@@ -1,2 +0,0 @@
1
- import { features } from "./automd-generator.mjs";
2
- export { features };
@@ -1 +0,0 @@
1
- import{features as e}from"./automd-generator.mjs";export{e as features};
package/dist/index.cjs DELETED
@@ -1 +0,0 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`./_virtual/_rolldown/runtime.cjs`),t=require(`./helpers/automd-generator.cjs`),n=require(`./components/features-builtin.cjs`);let r=require(`@alloy-js/core/jsx-runtime`),i=require(`defu`);i=e.__toESM(i);let a=require(`@powerlines/plugin-alloy/render`),o=require(`@powerlines/plugin-automd`);o=e.__toESM(o);const s=(e={})=>[{name:`open-feature`,async prepare(){return this.debug(`Preparing the Feature Flags runtime artifacts for the Powerlines project.`),(0,a.render)(this,(0,r.createComponent)(n.FeaturesBuiltin,{}))}},{name:`open-feature:automd-generator`,config(){return{automd:(0,i.default)(e.automd??{},{generators:{features:t.features(this)}})}}},(0,o.default)(e.automd)];exports.default=s,exports.plugin=s;
package/dist/index.d.cts DELETED
@@ -1,16 +0,0 @@
1
- import { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig } from "./types/plugin.cjs";
2
- import { Plugin } from "powerlines";
3
-
4
- //#region src/index.d.ts
5
- declare module "powerlines" {
6
- interface Config {
7
- openFeature?: OpenFeaturePluginOptions;
8
- }
9
- }
10
- /**
11
- * A Powerlines plugin to inject environment variables into the source code.
12
- */
13
- declare const plugin: <TContext extends OpenFeaturePluginContext = OpenFeaturePluginContext>(options?: OpenFeaturePluginOptions) => Plugin<TContext>[];
14
- //#endregion
15
- export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig, plugin as default, plugin };
16
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;YAgCY,MAAA;IACR,WAAA,GAAc,wBAAA;EAAA;AAAA;;;;cAOL,MAAA,oBACM,wBAAA,GAA2B,wBAAA,EAE5C,OAAA,GAAS,wBAAA,KA0BJ,MAAA,CAAO,QAAA"}
package/dist/index.d.mts DELETED
@@ -1,16 +0,0 @@
1
- import { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig } from "./types/plugin.mjs";
2
- import { Plugin } from "powerlines";
3
-
4
- //#region src/index.d.ts
5
- declare module "powerlines" {
6
- interface Config {
7
- openFeature?: OpenFeaturePluginOptions;
8
- }
9
- }
10
- /**
11
- * A Powerlines plugin to inject environment variables into the source code.
12
- */
13
- declare const plugin: <TContext extends OpenFeaturePluginContext = OpenFeaturePluginContext>(options?: OpenFeaturePluginOptions) => Plugin<TContext>[];
14
- //#endregion
15
- export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig, plugin as default, plugin };
16
- //# sourceMappingURL=index.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.tsx"],"mappings":";;;;;YAgCY,MAAA;IACR,WAAA,GAAc,wBAAA;EAAA;AAAA;;;;cAOL,MAAA,oBACM,wBAAA,GAA2B,wBAAA,EAE5C,OAAA,GAAS,wBAAA,KA0BJ,MAAA,CAAO,QAAA"}
package/dist/index.mjs DELETED
@@ -1,2 +0,0 @@
1
- import{features as e}from"./helpers/automd-generator.mjs";import{FeaturesBuiltin as t}from"./components/features-builtin.mjs";import{createComponent as n}from"@alloy-js/core/jsx-runtime";import r from"defu";import{render as i}from"@powerlines/plugin-alloy/render";import a from"@powerlines/plugin-automd";const o=(o={})=>[{name:`open-feature`,async prepare(){return this.debug(`Preparing the Feature Flags runtime artifacts for the Powerlines project.`),i(this,n(t,{}))}},{name:`open-feature:automd-generator`,config(){return{automd:r(o.automd??{},{generators:{features:e(this)}})}}},a(o.automd)];export{o as default,o as plugin};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
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 { 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 {\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":"iUA6BO,CAAA,qBAEP,MAAQ,SAAQ,CAEZ,OADF,KAAS,MAAC,4EAAO,CACf,EAAc,KAAA,EAAwB,EAAA,EAAA,CAAA,CAAA,EAE1C,CAAA,sCAEE,QAAA,CACG,MAAA,CACH,OAAA,EAAA,EAAA,QAAA,EAAA,CAAA,CACK,WAAe,CACX,SAAQ,EAAA,KAAA,CAClB,CACQ,CAAC,CACL,EAEF,CAAC,EAAA,EAAA,OAAA,CAAA"}
File without changes
@@ -1,2 +0,0 @@
1
- import { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig } from "./plugin.cjs";
2
- export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig };
@@ -1,2 +0,0 @@
1
- import { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig } from "./plugin.mjs";
2
- export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig };
@@ -1 +0,0 @@
1
- export{};
File without changes
@@ -1,36 +0,0 @@
1
- import { Provider, ProviderWrapper, ServerProviderStatus } from "@openfeature/server-sdk";
2
- import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig } from "@powerlines/plugin-alloy/types";
3
- import { AutoMDPluginOptions } from "@powerlines/plugin-automd/types/plugin";
4
- import { BabelPluginContext, BabelPluginResolvedConfig, BabelPluginUserConfig } from "@powerlines/plugin-babel/types";
5
-
6
- //#region src/types/plugin.d.ts
7
- interface OpenFeaturePluginOptions {
8
- /**
9
- * 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"`.
10
- */
11
- providers?: Map<string, ProviderWrapper<Provider, ServerProviderStatus>>;
12
- /**
13
- * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.
14
- *
15
- * @remarks
16
- * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.
17
- */
18
- automd?: AutoMDPluginOptions;
19
- /**
20
- * Alloy configuration options to use when injecting environment variables into the source code.
21
- *
22
- * @remarks
23
- * 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.
24
- */
25
- alloy?: AlloyPluginOptions;
26
- }
27
- type OpenFeaturePluginUserConfig = BabelPluginUserConfig & AlloyPluginUserConfig & {
28
- openFeature: OpenFeaturePluginOptions;
29
- };
30
- type OpenFeaturePluginResolvedConfig = BabelPluginResolvedConfig & AlloyPluginResolvedConfig & {
31
- openFeature: OpenFeaturePluginOptions;
32
- };
33
- interface OpenFeaturePluginContext<TResolvedConfig extends OpenFeaturePluginResolvedConfig = OpenFeaturePluginResolvedConfig> extends BabelPluginContext<TResolvedConfig>, AlloyPluginContext<TResolvedConfig> {}
34
- //#endregion
35
- export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig };
36
- //# sourceMappingURL=plugin.d.cts.map
@@ -1 +0,0 @@
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,36 +0,0 @@
1
- import { Provider, ProviderWrapper, ServerProviderStatus } from "@openfeature/server-sdk";
2
- import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig } from "@powerlines/plugin-alloy/types";
3
- import { AutoMDPluginOptions } from "@powerlines/plugin-automd/types/plugin";
4
- import { BabelPluginContext, BabelPluginResolvedConfig, BabelPluginUserConfig } from "@powerlines/plugin-babel/types";
5
-
6
- //#region src/types/plugin.d.ts
7
- interface OpenFeaturePluginOptions {
8
- /**
9
- * 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"`.
10
- */
11
- providers?: Map<string, ProviderWrapper<Provider, ServerProviderStatus>>;
12
- /**
13
- * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.
14
- *
15
- * @remarks
16
- * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.
17
- */
18
- automd?: AutoMDPluginOptions;
19
- /**
20
- * Alloy configuration options to use when injecting environment variables into the source code.
21
- *
22
- * @remarks
23
- * 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.
24
- */
25
- alloy?: AlloyPluginOptions;
26
- }
27
- type OpenFeaturePluginUserConfig = BabelPluginUserConfig & AlloyPluginUserConfig & {
28
- openFeature: OpenFeaturePluginOptions;
29
- };
30
- type OpenFeaturePluginResolvedConfig = BabelPluginResolvedConfig & AlloyPluginResolvedConfig & {
31
- openFeature: OpenFeaturePluginOptions;
32
- };
33
- interface OpenFeaturePluginContext<TResolvedConfig extends OpenFeaturePluginResolvedConfig = OpenFeaturePluginResolvedConfig> extends BabelPluginContext<TResolvedConfig>, AlloyPluginContext<TResolvedConfig> {}
34
- //#endregion
35
- export { OpenFeaturePluginContext, OpenFeaturePluginOptions, OpenFeaturePluginResolvedConfig, OpenFeaturePluginUserConfig };
36
- //# sourceMappingURL=plugin.d.mts.map
@@ -1 +0,0 @@
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 +0,0 @@
1
- export{};