@powerlines/plugin-env 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/babel/index.d.cts +2 -2
- package/dist/babel/index.d.ts +2 -2
- package/dist/babel/plugin.d.cts +2 -2
- package/dist/babel/plugin.d.ts +2 -2
- package/dist/components/env.cjs +9 -9
- package/dist/components/env.js +9 -9
- package/dist/helpers/index.d.cts +2 -2
- package/dist/helpers/index.d.ts +2 -2
- package/dist/helpers/load.d.cts +2 -2
- package/dist/helpers/load.d.ts +2 -2
- package/dist/helpers/persistence.d.cts +2 -2
- package/dist/helpers/persistence.d.ts +2 -2
- package/dist/helpers/reflect.d.cts +2 -2
- package/dist/helpers/reflect.d.ts +2 -2
- package/dist/helpers/template-helpers.d.cts +2 -2
- package/dist/helpers/template-helpers.d.ts +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +2 -2
- package/dist/{runtime-Bp1mD-tm.d.cts → runtime-2DL8LKdD.d.cts} +22 -33
- package/dist/{runtime-XRx54qng.d.ts → runtime-Cij6nHdf.d.ts} +22 -33
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/plugin.d.cts +2 -2
- package/dist/types/plugin.d.ts +2 -2
- package/dist/types/runtime.d.cts +2 -2
- package/dist/types/runtime.d.ts +2 -2
- package/package.json +8 -8
package/dist/babel/index.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export { envBabelPlugin } from './plugin.cjs';
|
|
2
|
-
import '../runtime-
|
|
2
|
+
import '../runtime-2DL8LKdD.cjs';
|
|
3
3
|
import '@stryke/env/get-env-paths';
|
|
4
4
|
import '@stryke/types/package-json';
|
|
5
5
|
import 'jiti';
|
|
6
6
|
import '@deepkit/type';
|
|
7
|
+
import 'semver';
|
|
7
8
|
import 'unplugin';
|
|
8
9
|
import '@stryke/capnp';
|
|
9
10
|
import '@storm-software/config-tools/types';
|
|
@@ -15,7 +16,6 @@ import '@babel/core';
|
|
|
15
16
|
import '@storm-software/build-tools/types';
|
|
16
17
|
import '@storm-software/config/types';
|
|
17
18
|
import '@babel/helper-plugin-utils';
|
|
18
|
-
import 'semver';
|
|
19
19
|
import '@stryke/types/array';
|
|
20
20
|
import '@stryke/types/tsconfig';
|
|
21
21
|
import 'typescript';
|
package/dist/babel/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export { envBabelPlugin } from './plugin.js';
|
|
2
|
-
import '../runtime-
|
|
2
|
+
import '../runtime-Cij6nHdf.js';
|
|
3
3
|
import '@stryke/env/get-env-paths';
|
|
4
4
|
import '@stryke/types/package-json';
|
|
5
5
|
import 'jiti';
|
|
6
6
|
import '@deepkit/type';
|
|
7
|
+
import 'semver';
|
|
7
8
|
import 'unplugin';
|
|
8
9
|
import '@stryke/capnp';
|
|
9
10
|
import '@storm-software/config-tools/types';
|
|
@@ -15,7 +16,6 @@ import '@babel/core';
|
|
|
15
16
|
import '@storm-software/build-tools/types';
|
|
16
17
|
import '@storm-software/config/types';
|
|
17
18
|
import '@babel/helper-plugin-utils';
|
|
18
|
-
import 'semver';
|
|
19
19
|
import '@stryke/types/array';
|
|
20
20
|
import '@stryke/types/tsconfig';
|
|
21
21
|
import 'typescript';
|
package/dist/babel/plugin.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { D as DeclareBabelTransformPluginReturn } from '../runtime-
|
|
1
|
+
import { D as DeclareBabelTransformPluginReturn } from '../runtime-2DL8LKdD.cjs';
|
|
2
2
|
import { EnvPluginContext, EnvPluginResolvedConfig } from '../types/plugin.cjs';
|
|
3
3
|
import '@stryke/env/get-env-paths';
|
|
4
4
|
import '@stryke/types/package-json';
|
|
5
5
|
import 'jiti';
|
|
6
6
|
import '@deepkit/type';
|
|
7
|
+
import 'semver';
|
|
7
8
|
import 'unplugin';
|
|
8
9
|
import '@stryke/capnp';
|
|
9
10
|
import '@storm-software/config-tools/types';
|
|
@@ -15,7 +16,6 @@ import '@babel/core';
|
|
|
15
16
|
import '@storm-software/build-tools/types';
|
|
16
17
|
import '@storm-software/config/types';
|
|
17
18
|
import '@babel/helper-plugin-utils';
|
|
18
|
-
import 'semver';
|
|
19
19
|
import '@stryke/types/array';
|
|
20
20
|
import '@stryke/types/tsconfig';
|
|
21
21
|
import 'typescript';
|
package/dist/babel/plugin.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { D as DeclareBabelTransformPluginReturn } from '../runtime-
|
|
1
|
+
import { D as DeclareBabelTransformPluginReturn } from '../runtime-Cij6nHdf.js';
|
|
2
2
|
import { EnvPluginContext, EnvPluginResolvedConfig } from '../types/plugin.js';
|
|
3
3
|
import '@stryke/env/get-env-paths';
|
|
4
4
|
import '@stryke/types/package-json';
|
|
5
5
|
import 'jiti';
|
|
6
6
|
import '@deepkit/type';
|
|
7
|
+
import 'semver';
|
|
7
8
|
import 'unplugin';
|
|
8
9
|
import '@stryke/capnp';
|
|
9
10
|
import '@storm-software/config-tools/types';
|
|
@@ -15,7 +16,6 @@ import '@babel/core';
|
|
|
15
16
|
import '@storm-software/build-tools/types';
|
|
16
17
|
import '@storm-software/config/types';
|
|
17
18
|
import '@babel/helper-plugin-utils';
|
|
18
|
-
import 'semver';
|
|
19
19
|
import '@stryke/types/array';
|
|
20
20
|
import '@stryke/types/tsconfig';
|
|
21
21
|
import 'typescript';
|
package/dist/components/env.cjs
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
function Q(s){const[{defaultValue:
|
|
8
|
-
[Key in keyof EnvBase as Key ${
|
|
7
|
+
function Q(s){const[{defaultValue:r,reflection:t}]=core.splitProps(s,["defaultValue","reflection"]),i=context.usePowerlines();return React.createElement(React.Fragment,null,React.createElement(typescriptInterface.TypeScriptInterface,{name:" EnvBase",extends:["EnvInterface"],defaultValue:r,reflection:t,export:true}),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(typescript.TypeDeclaration,{name:"Env",export:true},core.code` {
|
|
8
|
+
[Key in keyof EnvBase as Key ${i?.value?.config.env.prefix.map(o=>`| \`${o.replace(/_$/g,"")}_\${Key}\``).join(" ")}]: EnvBase[Key];
|
|
9
9
|
}
|
|
10
|
-
`))}chunkFBBMZ4NC_cjs.a(Q,"EnvTypeDefinition");function l(s){const[{context:
|
|
10
|
+
`))}chunkFBBMZ4NC_cjs.a(Q,"EnvTypeDefinition");function l(s){const[{context:r,name:t}]=core.splitProps(s,["context","name"]);return r?core.code`propertyName === "${t}" || propertyName.replace(/^(${r.config.env.prefix.sort((i,o)=>i.startsWith(o)?-1:o.startsWith(i)?1:i.localeCompare(o)).map(i=>`${i.replace(/_$/,"")}_`).join("|")})/g, "").toLowerCase().replace(/[\\s\\-_]+/g, "") === "${t.toLowerCase().replace(/[\s\-_]+/g,"")}"`:null}chunkFBBMZ4NC_cjs.a(l,"ConfigPropertyConditional");function U(s){const[{context:r,property:t,index:i}]=core.splitProps(s,["context","property","index"]);return r?React.createElement(React.Fragment,null,i===0?React.createElement(typescript.IfStatement,{condition:React.createElement(React.Fragment,null,React.createElement(l,{name:t.getNameAsString(),context:r}),React.createElement(core.Show,{when:t.getAlias()&&t.getAlias().length>0},core.code` || `,React.createElement(core.For,{each:t.getAlias(),joiner:core.code` || `},o=>React.createElement(l,{name:o,context:r}))))},core.code`return target["${t.getNameAsString()}"];`):React.createElement(typescript.ElseIfClause,{condition:React.createElement(React.Fragment,null,React.createElement(l,{name:t.getNameAsString(),context:r}),React.createElement(core.Show,{when:t.getAlias()&&t.getAlias().length>0},core.code` || `,React.createElement(core.For,{each:t.getAlias(),joiner:core.code` || `},o=>React.createElement(l,{name:o,context:r}))))},core.code`return target["${t.getNameAsString()}"];`)):null}chunkFBBMZ4NC_cjs.a(U,"ConfigPropertyGet");function X(s){const[{context:r,property:t,index:i}]=core.splitProps(s,["context","property","index"]);return r?React.createElement(React.Fragment,null,i===0?React.createElement(typescript.IfStatement,{condition:React.createElement(React.Fragment,null,React.createElement(l,{name:t.getNameAsString(),context:r}),React.createElement(core.Show,{when:t.getAlias()&&t.getAlias().length>0},core.code` || `,React.createElement(core.For,{each:t.getAlias(),joiner:core.code` || `},o=>React.createElement(l,{name:o,context:r}))))},core.code`
|
|
11
11
|
target["${t.getNameAsString()}"] = newValue;
|
|
12
12
|
return true;
|
|
13
|
-
`):React.createElement(typescript.ElseIfClause,{condition:React.createElement(React.Fragment,null,React.createElement(l,{name:t.getNameAsString(),context:
|
|
13
|
+
`):React.createElement(typescript.ElseIfClause,{condition:React.createElement(React.Fragment,null,React.createElement(l,{name:t.getNameAsString(),context:r}),React.createElement(core.Show,{when:t.getAlias()&&t.getAlias().length>0},core.code` || `,React.createElement(core.For,{each:t.getAlias(),joiner:core.code` || `},o=>React.createElement(l,{name:o,context:r}))))},core.code`
|
|
14
14
|
target["${t.getNameAsString()}"] = newValue;
|
|
15
15
|
return true;
|
|
16
|
-
`)):null}chunkFBBMZ4NC_cjs.a(X,"ConfigPropertySet");const Y=refkey.refkey("createEnv"),Z=refkey.refkey("env"),ee=refkey.refkey("EnvSerializer");function be(s){const[{defaultConfig:
|
|
16
|
+
`)):null}chunkFBBMZ4NC_cjs.a(X,"ConfigPropertySet");const Y=refkey.refkey("createEnv"),Z=refkey.refkey("env"),ee=refkey.refkey("EnvSerializer");function be(s){const[{defaultConfig:r},t]=core.splitProps(s,["defaultConfig"]),i=context.usePowerlines(),o=core.computed(()=>i&&load.loadEnvFromContext(i.value,process.env)),f=core.createResource(async()=>{if(!i?.value)return new type.ReflectionClass({kind:type.ReflectionKind.objectLiteral,description:"The initial environment configuration state for the Powerlines project.",types:[]});const a=await persistence.readEnvTypeReflection(i?.value,"env");return a.getProperties().forEach(e=>{e.getAlias().filter(Boolean).forEach(h=>{a.addProperty({name:h,optional:e.isOptional()?true:void 0,readonly:e.isReadonly()?true:void 0,description:e.getDescription(),visibility:e.getVisibility(),type:e.getType(),default:e.getDefaultValue(),tags:{hidden:e.isHidden(),ignore:e.isIgnored(),internal:e.isInternal(),alias:e.getAlias().filter(j=>j!==h).concat(e.name),title:e.getTitle()||titleCase.titleCase(e.name),readonly:e.isReadonly(),permission:e.getPermission(),domain:e.getDomain()}});});}),a.getProperties().forEach(e=>{e.setDefaultValue(o.value?.[e.getNameAsString()]??e.getAlias().reduce((T,h)=>T??o.value?.[h],void 0)??e.getDefaultValue());}),a}),k=core.computed(()=>new type.ReflectionClass({kind:type.ReflectionKind.objectLiteral,description:`The initial environment configuration state for the ${titleCase.titleCase(i?.value?.config?.name)} project.`,types:[]},f.data??void 0)),R=core.computed(()=>f.data?.getProperties().filter(a=>!a.isIgnored()).sort((a,e)=>a.getNameAsString().localeCompare(e.getNameAsString()))??[]),N=core.computed(()=>f.data?.getProperties().filter(a=>!a.isIgnored()&&!a.isReadonly()).sort((a,e)=>a.getNameAsString().localeCompare(e.getNameAsString()))??[]);return React.createElement(builtinFile.BuiltinFile,{...t,id:"env",description:"The Powerlines environment configuration module provides an interface to define environment configuration parameters.",imports:W__default.default({"powerlines/deepkit/type":["Type","stringify","serializer","serializeFunction","deserializeFunction","ReflectionKind","TemplateState","Serializer","TypeProperty","TypePropertySignature"],"@powerlines/plugin-env/types/runtime":[{name:"EnvInterface"}]},t.imports??{})},React.createElement(core.Show,{when:!isNull.isNull(f.data)},React.createElement(Q,{defaultValue:o.value,reflection:f.data}),React.createElement("hbr",null),React.createElement("hbr",null)),React.createElement(typescriptObject.TypescriptObject,{name:"initialEnv",type:"Partial<EnvBase>",defaultValue:o,reflection:k,export:true,const:true}),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(tsdoc.TSDoc,{heading:"The environment configuration serializer for the Powerlines application."},React.createElement(tsdoc.TSDocLink,null,"https://deepkit.io/docs/serialization/serializers"),React.createElement(tsdoc.TSDocLink,null,"https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918"),React.createElement(tsdoc.TSDocRemarks,null,"This serializer is used to serialize and deserialize the Powerlines environment configuration.")),React.createElement(typescript.ClassDeclaration,{refkey:ee,name:"EnvSerializer",extends:"Serializer",export:true},React.createElement(typescript.ClassMethod,{name:"constructor",public:true},core.code`
|
|
17
17
|
super("env");
|
|
18
18
|
|
|
19
19
|
this.deserializeRegistry.register(
|
|
@@ -24,17 +24,17 @@ function Q(s){const[{defaultValue:i,reflection:t}]=core.splitProps(s,["defaultVa
|
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
|
-
`)),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(tsdoc.TSDoc,{heading:"A {@link EnvSerializer | environment configuration serializer} instance for the Powerlines application."},React.createElement(tsdoc.TSDocLink,null,"https://deepkit.io/docs/serialization/serializers"),React.createElement(tsdoc.TSDocLink,null,"https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918"),React.createElement(tsdoc.TSDocRemarks,null,"This serializer is used to serialize and deserialize the Powerlines environment configuration.")),React.createElement(typescript.VarDeclaration,{name:"envSerializer",export:false,const:true,initializer:React.createElement(typescript.NewExpression,{args:[],target:"EnvSerializer"})}),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(tsdoc.TSDoc,{heading:"Serialize a environment configuration object to JSON data objects (not a JSON string)."},React.createElement(tsdoc.TSDocRemarks,null,"The resulting JSON object can be stringified using JSON.stringify()."),React.createElement(tsdoc.TSDocExample,null,"const json = serializeEnv(env);"),React.createElement(tsdoc.TSDocThrows,null,"ValidationError when serialization or validation fails.")),React.createElement(typescript.VarDeclaration,{name:"serializeEnv",export:true,const:true,initializer:"serializeFunction<EnvBase>(envSerializer)"}),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(tsdoc.TSDoc,{heading:"Deserialize a environment configuration object from JSON data objects to JavaScript objects, without running any validators."},React.createElement(tsdoc.TSDocRemarks,null,"Types that are already correct will be used as-is."),React.createElement(tsdoc.TSDocExample,null,"const env = deserializeEnv(json);"),React.createElement(tsdoc.TSDocThrows,null,"ValidationError when deserialization fails.")),React.createElement(typescript.VarDeclaration,{name:"deserializeEnv",export:true,const:true,initializer:"deserializeFunction<EnvBase>(envSerializer)"}),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(tsdoc.TSDoc,{heading:"Initializes the Powerlines environment configuration module."},React.createElement(tsdoc.TSDocRemarks,null,"This function initializes the Powerlines environment configuration object."),React.createElement(tsdoc.TSDocParam,{name:"environmentConfig"},"The dynamic/runtime configuration - this could include the current environment variables or any other environment-specific settings provided by the runtime."),React.createElement(tsdoc.TSDocReturns,null,"The initialized Powerlines configuration object.")),React.createElement(core.Show,{when:!!
|
|
27
|
+
`)),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(tsdoc.TSDoc,{heading:"A {@link EnvSerializer | environment configuration serializer} instance for the Powerlines application."},React.createElement(tsdoc.TSDocLink,null,"https://deepkit.io/docs/serialization/serializers"),React.createElement(tsdoc.TSDocLink,null,"https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918"),React.createElement(tsdoc.TSDocRemarks,null,"This serializer is used to serialize and deserialize the Powerlines environment configuration.")),React.createElement(typescript.VarDeclaration,{name:"envSerializer",export:false,const:true,initializer:React.createElement(typescript.NewExpression,{args:[],target:"EnvSerializer"})}),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(tsdoc.TSDoc,{heading:"Serialize a environment configuration object to JSON data objects (not a JSON string)."},React.createElement(tsdoc.TSDocRemarks,null,"The resulting JSON object can be stringified using JSON.stringify()."),React.createElement(tsdoc.TSDocExample,null,"const json = serializeEnv(env);"),React.createElement(tsdoc.TSDocThrows,null,"ValidationError when serialization or validation fails.")),React.createElement(typescript.VarDeclaration,{name:"serializeEnv",export:true,const:true,initializer:"serializeFunction<EnvBase>(envSerializer)"}),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(tsdoc.TSDoc,{heading:"Deserialize a environment configuration object from JSON data objects to JavaScript objects, without running any validators."},React.createElement(tsdoc.TSDocRemarks,null,"Types that are already correct will be used as-is."),React.createElement(tsdoc.TSDocExample,null,"const env = deserializeEnv(json);"),React.createElement(tsdoc.TSDocThrows,null,"ValidationError when deserialization fails.")),React.createElement(typescript.VarDeclaration,{name:"deserializeEnv",export:true,const:true,initializer:"deserializeFunction<EnvBase>(envSerializer)"}),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(tsdoc.TSDoc,{heading:"Initializes the Powerlines environment configuration module."},React.createElement(tsdoc.TSDocRemarks,null,"This function initializes the Powerlines environment configuration object."),React.createElement(tsdoc.TSDocParam,{name:"environmentConfig"},"The dynamic/runtime configuration - this could include the current environment variables or any other environment-specific settings provided by the runtime."),React.createElement(tsdoc.TSDocReturns,null,"The initialized Powerlines configuration object.")),React.createElement(core.Show,{when:!!i?.value?.entryPath},React.createElement(typescript.FunctionDeclaration,{refkey:Y,async:false,export:true,name:"createEnv",parameters:[{name:"environmentConfig",type:"Partial<Env>",optional:false,default:"{}"}],returnType:"Env"},core.code`
|
|
28
28
|
return new Proxy<Env>(
|
|
29
29
|
deserializeEnv({
|
|
30
30
|
...initialEnv,
|
|
31
31
|
...environmentConfig
|
|
32
32
|
}) as Env,
|
|
33
33
|
{
|
|
34
|
-
get: (target: EnvBase, propertyName: string) => { `,React.createElement("hbr",null),React.createElement(core.For,{each:R},(a,e)=>React.createElement(U,{index:e,context:
|
|
34
|
+
get: (target: EnvBase, propertyName: string) => { `,React.createElement("hbr",null),React.createElement(core.For,{each:R},(a,e)=>React.createElement(U,{index:e,context:i?.value,property:a})),core.code`
|
|
35
35
|
return undefined;
|
|
36
|
-
}, `,React.createElement("hbr",null),React.createElement("hbr",null),core.code` set: (target: EnvBase, propertyName: string, newValue: any) => { `,React.createElement("hbr",null),React.createElement(core.For,{each:N,ender:core.code` else `},(a,e)=>React.createElement(X,{index:e,context:
|
|
36
|
+
}, `,React.createElement("hbr",null),React.createElement("hbr",null),core.code` set: (target: EnvBase, propertyName: string, newValue: any) => { `,React.createElement("hbr",null),React.createElement(core.For,{each:N,ender:core.code` else `},(a,e)=>React.createElement(X,{index:e,context:i?.value,property:a})),React.createElement("hbr",null),core.code`return false;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
|
-
`)),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(typescript.VarDeclaration,{refkey:Z,name:"env",type:"Env",export:true,const:true,initializer:React.createElement(React.Fragment,null,core.code`createEnv(`,
|
|
40
|
+
`)),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(typescript.VarDeclaration,{refkey:Z,name:"env",type:"Env",export:true,const:true,initializer:React.createElement(React.Fragment,null,core.code`createEnv(`,r||"{}",core.code` as Partial<Env>)`)}))}chunkFBBMZ4NC_cjs.a(be,"EnvBuiltin");exports.EnvBuiltin=be;exports.EnvTypeDefinition=Q;
|
package/dist/components/env.js
CHANGED
|
@@ -4,16 +4,16 @@ import {a}from'../chunk-UCUR73HG.js';import {splitProps,code,Show,For,computed,c
|
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
function Q(s){const[{defaultValue:
|
|
8
|
-
[Key in keyof EnvBase as Key ${
|
|
7
|
+
function Q(s){const[{defaultValue:r,reflection:t}]=splitProps(s,["defaultValue","reflection"]),i=usePowerlines();return React.createElement(React.Fragment,null,React.createElement(TypeScriptInterface,{name:" EnvBase",extends:["EnvInterface"],defaultValue:r,reflection:t,export:true}),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(TypeDeclaration,{name:"Env",export:true},code` {
|
|
8
|
+
[Key in keyof EnvBase as Key ${i?.value?.config.env.prefix.map(o=>`| \`${o.replace(/_$/g,"")}_\${Key}\``).join(" ")}]: EnvBase[Key];
|
|
9
9
|
}
|
|
10
|
-
`))}a(Q,"EnvTypeDefinition");function l(s){const[{context:
|
|
10
|
+
`))}a(Q,"EnvTypeDefinition");function l(s){const[{context:r,name:t}]=splitProps(s,["context","name"]);return r?code`propertyName === "${t}" || propertyName.replace(/^(${r.config.env.prefix.sort((i,o)=>i.startsWith(o)?-1:o.startsWith(i)?1:i.localeCompare(o)).map(i=>`${i.replace(/_$/,"")}_`).join("|")})/g, "").toLowerCase().replace(/[\\s\\-_]+/g, "") === "${t.toLowerCase().replace(/[\s\-_]+/g,"")}"`:null}a(l,"ConfigPropertyConditional");function U(s){const[{context:r,property:t,index:i}]=splitProps(s,["context","property","index"]);return r?React.createElement(React.Fragment,null,i===0?React.createElement(IfStatement,{condition:React.createElement(React.Fragment,null,React.createElement(l,{name:t.getNameAsString(),context:r}),React.createElement(Show,{when:t.getAlias()&&t.getAlias().length>0},code` || `,React.createElement(For,{each:t.getAlias(),joiner:code` || `},o=>React.createElement(l,{name:o,context:r}))))},code`return target["${t.getNameAsString()}"];`):React.createElement(ElseIfClause,{condition:React.createElement(React.Fragment,null,React.createElement(l,{name:t.getNameAsString(),context:r}),React.createElement(Show,{when:t.getAlias()&&t.getAlias().length>0},code` || `,React.createElement(For,{each:t.getAlias(),joiner:code` || `},o=>React.createElement(l,{name:o,context:r}))))},code`return target["${t.getNameAsString()}"];`)):null}a(U,"ConfigPropertyGet");function X(s){const[{context:r,property:t,index:i}]=splitProps(s,["context","property","index"]);return r?React.createElement(React.Fragment,null,i===0?React.createElement(IfStatement,{condition:React.createElement(React.Fragment,null,React.createElement(l,{name:t.getNameAsString(),context:r}),React.createElement(Show,{when:t.getAlias()&&t.getAlias().length>0},code` || `,React.createElement(For,{each:t.getAlias(),joiner:code` || `},o=>React.createElement(l,{name:o,context:r}))))},code`
|
|
11
11
|
target["${t.getNameAsString()}"] = newValue;
|
|
12
12
|
return true;
|
|
13
|
-
`):React.createElement(ElseIfClause,{condition:React.createElement(React.Fragment,null,React.createElement(l,{name:t.getNameAsString(),context:
|
|
13
|
+
`):React.createElement(ElseIfClause,{condition:React.createElement(React.Fragment,null,React.createElement(l,{name:t.getNameAsString(),context:r}),React.createElement(Show,{when:t.getAlias()&&t.getAlias().length>0},code` || `,React.createElement(For,{each:t.getAlias(),joiner:code` || `},o=>React.createElement(l,{name:o,context:r}))))},code`
|
|
14
14
|
target["${t.getNameAsString()}"] = newValue;
|
|
15
15
|
return true;
|
|
16
|
-
`)):null}a(X,"ConfigPropertySet");const Y=refkey("createEnv"),Z=refkey("env"),ee=refkey("EnvSerializer");function we(s){const[{defaultConfig:
|
|
16
|
+
`)):null}a(X,"ConfigPropertySet");const Y=refkey("createEnv"),Z=refkey("env"),ee=refkey("EnvSerializer");function we(s){const[{defaultConfig:r},t]=splitProps(s,["defaultConfig"]),i=usePowerlines(),o=computed(()=>i&&loadEnvFromContext(i.value,process.env)),f=createResource(async()=>{if(!i?.value)return new ReflectionClass({kind:ReflectionKind.objectLiteral,description:"The initial environment configuration state for the Powerlines project.",types:[]});const a=await readEnvTypeReflection(i?.value,"env");return a.getProperties().forEach(e=>{e.getAlias().filter(Boolean).forEach(h=>{a.addProperty({name:h,optional:e.isOptional()?true:void 0,readonly:e.isReadonly()?true:void 0,description:e.getDescription(),visibility:e.getVisibility(),type:e.getType(),default:e.getDefaultValue(),tags:{hidden:e.isHidden(),ignore:e.isIgnored(),internal:e.isInternal(),alias:e.getAlias().filter(j=>j!==h).concat(e.name),title:e.getTitle()||titleCase(e.name),readonly:e.isReadonly(),permission:e.getPermission(),domain:e.getDomain()}});});}),a.getProperties().forEach(e=>{e.setDefaultValue(o.value?.[e.getNameAsString()]??e.getAlias().reduce((T,h)=>T??o.value?.[h],void 0)??e.getDefaultValue());}),a}),k=computed(()=>new ReflectionClass({kind:ReflectionKind.objectLiteral,description:`The initial environment configuration state for the ${titleCase(i?.value?.config?.name)} project.`,types:[]},f.data??void 0)),R=computed(()=>f.data?.getProperties().filter(a=>!a.isIgnored()).sort((a,e)=>a.getNameAsString().localeCompare(e.getNameAsString()))??[]),N=computed(()=>f.data?.getProperties().filter(a=>!a.isIgnored()&&!a.isReadonly()).sort((a,e)=>a.getNameAsString().localeCompare(e.getNameAsString()))??[]);return React.createElement(BuiltinFile,{...t,id:"env",description:"The Powerlines environment configuration module provides an interface to define environment configuration parameters.",imports:W({"powerlines/deepkit/type":["Type","stringify","serializer","serializeFunction","deserializeFunction","ReflectionKind","TemplateState","Serializer","TypeProperty","TypePropertySignature"],"@powerlines/plugin-env/types/runtime":[{name:"EnvInterface"}]},t.imports??{})},React.createElement(Show,{when:!isNull(f.data)},React.createElement(Q,{defaultValue:o.value,reflection:f.data}),React.createElement("hbr",null),React.createElement("hbr",null)),React.createElement(TypescriptObject,{name:"initialEnv",type:"Partial<EnvBase>",defaultValue:o,reflection:k,export:true,const:true}),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(TSDoc,{heading:"The environment configuration serializer for the Powerlines application."},React.createElement(TSDocLink,null,"https://deepkit.io/docs/serialization/serializers"),React.createElement(TSDocLink,null,"https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918"),React.createElement(TSDocRemarks,null,"This serializer is used to serialize and deserialize the Powerlines environment configuration.")),React.createElement(ClassDeclaration,{refkey:ee,name:"EnvSerializer",extends:"Serializer",export:true},React.createElement(ClassMethod,{name:"constructor",public:true},code`
|
|
17
17
|
super("env");
|
|
18
18
|
|
|
19
19
|
this.deserializeRegistry.register(
|
|
@@ -24,17 +24,17 @@ function Q(s){const[{defaultValue:i,reflection:t}]=splitProps(s,["defaultValue",
|
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
|
-
`)),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(TSDoc,{heading:"A {@link EnvSerializer | environment configuration serializer} instance for the Powerlines application."},React.createElement(TSDocLink,null,"https://deepkit.io/docs/serialization/serializers"),React.createElement(TSDocLink,null,"https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918"),React.createElement(TSDocRemarks,null,"This serializer is used to serialize and deserialize the Powerlines environment configuration.")),React.createElement(VarDeclaration,{name:"envSerializer",export:false,const:true,initializer:React.createElement(NewExpression,{args:[],target:"EnvSerializer"})}),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(TSDoc,{heading:"Serialize a environment configuration object to JSON data objects (not a JSON string)."},React.createElement(TSDocRemarks,null,"The resulting JSON object can be stringified using JSON.stringify()."),React.createElement(TSDocExample,null,"const json = serializeEnv(env);"),React.createElement(TSDocThrows,null,"ValidationError when serialization or validation fails.")),React.createElement(VarDeclaration,{name:"serializeEnv",export:true,const:true,initializer:"serializeFunction<EnvBase>(envSerializer)"}),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(TSDoc,{heading:"Deserialize a environment configuration object from JSON data objects to JavaScript objects, without running any validators."},React.createElement(TSDocRemarks,null,"Types that are already correct will be used as-is."),React.createElement(TSDocExample,null,"const env = deserializeEnv(json);"),React.createElement(TSDocThrows,null,"ValidationError when deserialization fails.")),React.createElement(VarDeclaration,{name:"deserializeEnv",export:true,const:true,initializer:"deserializeFunction<EnvBase>(envSerializer)"}),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(TSDoc,{heading:"Initializes the Powerlines environment configuration module."},React.createElement(TSDocRemarks,null,"This function initializes the Powerlines environment configuration object."),React.createElement(TSDocParam,{name:"environmentConfig"},"The dynamic/runtime configuration - this could include the current environment variables or any other environment-specific settings provided by the runtime."),React.createElement(TSDocReturns,null,"The initialized Powerlines configuration object.")),React.createElement(Show,{when:!!
|
|
27
|
+
`)),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(TSDoc,{heading:"A {@link EnvSerializer | environment configuration serializer} instance for the Powerlines application."},React.createElement(TSDocLink,null,"https://deepkit.io/docs/serialization/serializers"),React.createElement(TSDocLink,null,"https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918"),React.createElement(TSDocRemarks,null,"This serializer is used to serialize and deserialize the Powerlines environment configuration.")),React.createElement(VarDeclaration,{name:"envSerializer",export:false,const:true,initializer:React.createElement(NewExpression,{args:[],target:"EnvSerializer"})}),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(TSDoc,{heading:"Serialize a environment configuration object to JSON data objects (not a JSON string)."},React.createElement(TSDocRemarks,null,"The resulting JSON object can be stringified using JSON.stringify()."),React.createElement(TSDocExample,null,"const json = serializeEnv(env);"),React.createElement(TSDocThrows,null,"ValidationError when serialization or validation fails.")),React.createElement(VarDeclaration,{name:"serializeEnv",export:true,const:true,initializer:"serializeFunction<EnvBase>(envSerializer)"}),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(TSDoc,{heading:"Deserialize a environment configuration object from JSON data objects to JavaScript objects, without running any validators."},React.createElement(TSDocRemarks,null,"Types that are already correct will be used as-is."),React.createElement(TSDocExample,null,"const env = deserializeEnv(json);"),React.createElement(TSDocThrows,null,"ValidationError when deserialization fails.")),React.createElement(VarDeclaration,{name:"deserializeEnv",export:true,const:true,initializer:"deserializeFunction<EnvBase>(envSerializer)"}),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(TSDoc,{heading:"Initializes the Powerlines environment configuration module."},React.createElement(TSDocRemarks,null,"This function initializes the Powerlines environment configuration object."),React.createElement(TSDocParam,{name:"environmentConfig"},"The dynamic/runtime configuration - this could include the current environment variables or any other environment-specific settings provided by the runtime."),React.createElement(TSDocReturns,null,"The initialized Powerlines configuration object.")),React.createElement(Show,{when:!!i?.value?.entryPath},React.createElement(FunctionDeclaration,{refkey:Y,async:false,export:true,name:"createEnv",parameters:[{name:"environmentConfig",type:"Partial<Env>",optional:false,default:"{}"}],returnType:"Env"},code`
|
|
28
28
|
return new Proxy<Env>(
|
|
29
29
|
deserializeEnv({
|
|
30
30
|
...initialEnv,
|
|
31
31
|
...environmentConfig
|
|
32
32
|
}) as Env,
|
|
33
33
|
{
|
|
34
|
-
get: (target: EnvBase, propertyName: string) => { `,React.createElement("hbr",null),React.createElement(For,{each:R},(a,e)=>React.createElement(U,{index:e,context:
|
|
34
|
+
get: (target: EnvBase, propertyName: string) => { `,React.createElement("hbr",null),React.createElement(For,{each:R},(a,e)=>React.createElement(U,{index:e,context:i?.value,property:a})),code`
|
|
35
35
|
return undefined;
|
|
36
|
-
}, `,React.createElement("hbr",null),React.createElement("hbr",null),code` set: (target: EnvBase, propertyName: string, newValue: any) => { `,React.createElement("hbr",null),React.createElement(For,{each:N,ender:code` else `},(a,e)=>React.createElement(X,{index:e,context:
|
|
36
|
+
}, `,React.createElement("hbr",null),React.createElement("hbr",null),code` set: (target: EnvBase, propertyName: string, newValue: any) => { `,React.createElement("hbr",null),React.createElement(For,{each:N,ender:code` else `},(a,e)=>React.createElement(X,{index:e,context:i?.value,property:a})),React.createElement("hbr",null),code`return false;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
|
-
`)),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(VarDeclaration,{refkey:Z,name:"env",type:"Env",export:true,const:true,initializer:React.createElement(React.Fragment,null,code`createEnv(`,
|
|
40
|
+
`)),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement("hbr",null),React.createElement(VarDeclaration,{refkey:Z,name:"env",type:"Env",export:true,const:true,initializer:React.createElement(React.Fragment,null,code`createEnv(`,r||"{}",code` as Partial<Env>)`)}))}a(we,"EnvBuiltin");export{we as EnvBuiltin,Q as EnvTypeDefinition};
|
package/dist/helpers/index.d.cts
CHANGED
|
@@ -3,11 +3,12 @@ export { getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectio
|
|
|
3
3
|
export { CreateEnvReflectionOptions, StormBaseEnv, StormBaseSecrets, __ΩCreateEnvReflectionOptions, createEnvReflection, createSecretsReflection, mergeEnvReflections, mergeSecretsReflections, reflectEnv, reflectSecrets } from './reflect.cjs';
|
|
4
4
|
export { formatEnvField, removeEnvPrefix } from './source-file-env.cjs';
|
|
5
5
|
export { createTemplateReflection } from './template-helpers.cjs';
|
|
6
|
-
import '../runtime-
|
|
6
|
+
import '../runtime-2DL8LKdD.cjs';
|
|
7
7
|
import '@stryke/env/get-env-paths';
|
|
8
8
|
import '@stryke/types/package-json';
|
|
9
9
|
import 'jiti';
|
|
10
10
|
import '@deepkit/type';
|
|
11
|
+
import 'semver';
|
|
11
12
|
import 'unplugin';
|
|
12
13
|
import '@stryke/capnp';
|
|
13
14
|
import '@storm-software/config-tools/types';
|
|
@@ -19,7 +20,6 @@ import '@babel/core';
|
|
|
19
20
|
import '@storm-software/build-tools/types';
|
|
20
21
|
import '@storm-software/config/types';
|
|
21
22
|
import '@babel/helper-plugin-utils';
|
|
22
|
-
import 'semver';
|
|
23
23
|
import '@stryke/types/array';
|
|
24
24
|
import '@stryke/types/tsconfig';
|
|
25
25
|
import 'typescript';
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -3,11 +3,12 @@ export { getEnvDefaultTypeDefinition, getEnvReflectionsPath, getEnvTypeReflectio
|
|
|
3
3
|
export { CreateEnvReflectionOptions, StormBaseEnv, StormBaseSecrets, __ΩCreateEnvReflectionOptions, createEnvReflection, createSecretsReflection, mergeEnvReflections, mergeSecretsReflections, reflectEnv, reflectSecrets } from './reflect.js';
|
|
4
4
|
export { formatEnvField, removeEnvPrefix } from './source-file-env.js';
|
|
5
5
|
export { createTemplateReflection } from './template-helpers.js';
|
|
6
|
-
import '../runtime-
|
|
6
|
+
import '../runtime-Cij6nHdf.js';
|
|
7
7
|
import '@stryke/env/get-env-paths';
|
|
8
8
|
import '@stryke/types/package-json';
|
|
9
9
|
import 'jiti';
|
|
10
10
|
import '@deepkit/type';
|
|
11
|
+
import 'semver';
|
|
11
12
|
import 'unplugin';
|
|
12
13
|
import '@stryke/capnp';
|
|
13
14
|
import '@storm-software/config-tools/types';
|
|
@@ -19,7 +20,6 @@ import '@babel/core';
|
|
|
19
20
|
import '@storm-software/build-tools/types';
|
|
20
21
|
import '@storm-software/config/types';
|
|
21
22
|
import '@babel/helper-plugin-utils';
|
|
22
|
-
import 'semver';
|
|
23
23
|
import '@stryke/types/array';
|
|
24
24
|
import '@stryke/types/tsconfig';
|
|
25
25
|
import 'typescript';
|
package/dist/helpers/load.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as EnvironmentResolvedConfig } from '../runtime-
|
|
1
|
+
import { a as EnvironmentResolvedConfig } from '../runtime-2DL8LKdD.cjs';
|
|
2
2
|
import * as _storm_software_config_tools_types from '@storm-software/config-tools/types';
|
|
3
3
|
import { DotenvParseOutput } from '@stryke/env/types';
|
|
4
4
|
import { EnvPluginContext, EnvPluginOptions } from '../types/plugin.cjs';
|
|
@@ -6,6 +6,7 @@ import '@stryke/env/get-env-paths';
|
|
|
6
6
|
import '@stryke/types/package-json';
|
|
7
7
|
import 'jiti';
|
|
8
8
|
import '@deepkit/type';
|
|
9
|
+
import 'semver';
|
|
9
10
|
import 'unplugin';
|
|
10
11
|
import '@stryke/capnp';
|
|
11
12
|
import '@stryke/types/base';
|
|
@@ -16,7 +17,6 @@ import '@babel/core';
|
|
|
16
17
|
import '@storm-software/build-tools/types';
|
|
17
18
|
import '@storm-software/config/types';
|
|
18
19
|
import '@babel/helper-plugin-utils';
|
|
19
|
-
import 'semver';
|
|
20
20
|
import '@stryke/types/array';
|
|
21
21
|
import '@stryke/types/tsconfig';
|
|
22
22
|
import 'typescript';
|
package/dist/helpers/load.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as EnvironmentResolvedConfig } from '../runtime-
|
|
1
|
+
import { a as EnvironmentResolvedConfig } from '../runtime-Cij6nHdf.js';
|
|
2
2
|
import * as _storm_software_config_tools_types from '@storm-software/config-tools/types';
|
|
3
3
|
import { DotenvParseOutput } from '@stryke/env/types';
|
|
4
4
|
import { EnvPluginContext, EnvPluginOptions } from '../types/plugin.js';
|
|
@@ -6,6 +6,7 @@ import '@stryke/env/get-env-paths';
|
|
|
6
6
|
import '@stryke/types/package-json';
|
|
7
7
|
import 'jiti';
|
|
8
8
|
import '@deepkit/type';
|
|
9
|
+
import 'semver';
|
|
9
10
|
import 'unplugin';
|
|
10
11
|
import '@stryke/capnp';
|
|
11
12
|
import '@stryke/types/base';
|
|
@@ -16,7 +17,6 @@ import '@babel/core';
|
|
|
16
17
|
import '@storm-software/build-tools/types';
|
|
17
18
|
import '@storm-software/config/types';
|
|
18
19
|
import '@babel/helper-plugin-utils';
|
|
19
|
-
import 'semver';
|
|
20
20
|
import '@stryke/types/array';
|
|
21
21
|
import '@stryke/types/tsconfig';
|
|
22
22
|
import 'typescript';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { TypeDefinition } from '@stryke/types/configuration';
|
|
2
2
|
import { ReflectionClass } from '@deepkit/type';
|
|
3
|
-
import { C as Context } from '../runtime-
|
|
3
|
+
import { C as Context } from '../runtime-2DL8LKdD.cjs';
|
|
4
4
|
import { EnvPluginResolvedConfig, EnvType, EnvPluginContext } from '../types/plugin.cjs';
|
|
5
5
|
import '@stryke/env/get-env-paths';
|
|
6
6
|
import '@stryke/types/package-json';
|
|
7
7
|
import 'jiti';
|
|
8
|
+
import 'semver';
|
|
8
9
|
import 'unplugin';
|
|
9
10
|
import '@stryke/capnp';
|
|
10
11
|
import '@storm-software/config-tools/types';
|
|
@@ -15,7 +16,6 @@ import '@babel/core';
|
|
|
15
16
|
import '@storm-software/build-tools/types';
|
|
16
17
|
import '@storm-software/config/types';
|
|
17
18
|
import '@babel/helper-plugin-utils';
|
|
18
|
-
import 'semver';
|
|
19
19
|
import '@stryke/types/array';
|
|
20
20
|
import '@stryke/types/tsconfig';
|
|
21
21
|
import 'typescript';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { TypeDefinition } from '@stryke/types/configuration';
|
|
2
2
|
import { ReflectionClass } from '@deepkit/type';
|
|
3
|
-
import { C as Context } from '../runtime-
|
|
3
|
+
import { C as Context } from '../runtime-Cij6nHdf.js';
|
|
4
4
|
import { EnvPluginResolvedConfig, EnvType, EnvPluginContext } from '../types/plugin.js';
|
|
5
5
|
import '@stryke/env/get-env-paths';
|
|
6
6
|
import '@stryke/types/package-json';
|
|
7
7
|
import 'jiti';
|
|
8
|
+
import 'semver';
|
|
8
9
|
import 'unplugin';
|
|
9
10
|
import '@stryke/capnp';
|
|
10
11
|
import '@storm-software/config-tools/types';
|
|
@@ -15,7 +16,6 @@ import '@babel/core';
|
|
|
15
16
|
import '@storm-software/build-tools/types';
|
|
16
17
|
import '@storm-software/config/types';
|
|
17
18
|
import '@babel/helper-plugin-utils';
|
|
18
|
-
import 'semver';
|
|
19
19
|
import '@stryke/types/array';
|
|
20
20
|
import '@stryke/types/tsconfig';
|
|
21
21
|
import 'typescript';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { ReflectionClass, TypeObjectLiteral, TypeClass } from '@deepkit/type';
|
|
2
2
|
import { EnvPluginContext } from '../types/plugin.cjs';
|
|
3
|
-
import { E as EnvInterface, S as SecretsInterface } from '../runtime-
|
|
3
|
+
import { E as EnvInterface, S as SecretsInterface } from '../runtime-2DL8LKdD.cjs';
|
|
4
4
|
import '@alloy-js/core/jsx-runtime';
|
|
5
5
|
import '@stryke/env/types';
|
|
6
6
|
import '@stryke/types/configuration';
|
|
7
7
|
import '@stryke/env/get-env-paths';
|
|
8
8
|
import '@stryke/types/package-json';
|
|
9
9
|
import 'jiti';
|
|
10
|
+
import 'semver';
|
|
10
11
|
import 'unplugin';
|
|
11
12
|
import '@stryke/capnp';
|
|
12
13
|
import '@storm-software/config-tools/types';
|
|
@@ -17,7 +18,6 @@ import '@babel/core';
|
|
|
17
18
|
import '@storm-software/build-tools/types';
|
|
18
19
|
import '@storm-software/config/types';
|
|
19
20
|
import '@babel/helper-plugin-utils';
|
|
20
|
-
import 'semver';
|
|
21
21
|
import '@stryke/types/array';
|
|
22
22
|
import '@stryke/types/tsconfig';
|
|
23
23
|
import 'typescript';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { ReflectionClass, TypeObjectLiteral, TypeClass } from '@deepkit/type';
|
|
2
2
|
import { EnvPluginContext } from '../types/plugin.js';
|
|
3
|
-
import { E as EnvInterface, S as SecretsInterface } from '../runtime-
|
|
3
|
+
import { E as EnvInterface, S as SecretsInterface } from '../runtime-Cij6nHdf.js';
|
|
4
4
|
import '@alloy-js/core/jsx-runtime';
|
|
5
5
|
import '@stryke/env/types';
|
|
6
6
|
import '@stryke/types/configuration';
|
|
7
7
|
import '@stryke/env/get-env-paths';
|
|
8
8
|
import '@stryke/types/package-json';
|
|
9
9
|
import 'jiti';
|
|
10
|
+
import 'semver';
|
|
10
11
|
import 'unplugin';
|
|
11
12
|
import '@stryke/capnp';
|
|
12
13
|
import '@storm-software/config-tools/types';
|
|
@@ -17,7 +18,6 @@ import '@babel/core';
|
|
|
17
18
|
import '@storm-software/build-tools/types';
|
|
18
19
|
import '@storm-software/config/types';
|
|
19
20
|
import '@babel/helper-plugin-utils';
|
|
20
|
-
import 'semver';
|
|
21
21
|
import '@stryke/types/array';
|
|
22
22
|
import '@stryke/types/tsconfig';
|
|
23
23
|
import 'typescript';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ReflectionClass } from '@deepkit/type';
|
|
2
2
|
import { EnvPluginContext, EnvType } from '../types/plugin.cjs';
|
|
3
3
|
import '@alloy-js/core/jsx-runtime';
|
|
4
|
-
import '../runtime-
|
|
4
|
+
import '../runtime-2DL8LKdD.cjs';
|
|
5
5
|
import '@stryke/env/get-env-paths';
|
|
6
6
|
import '@stryke/types/package-json';
|
|
7
7
|
import 'jiti';
|
|
8
|
+
import 'semver';
|
|
8
9
|
import 'unplugin';
|
|
9
10
|
import '@stryke/capnp';
|
|
10
11
|
import '@storm-software/config-tools/types';
|
|
@@ -16,7 +17,6 @@ import '@babel/core';
|
|
|
16
17
|
import '@storm-software/build-tools/types';
|
|
17
18
|
import '@storm-software/config/types';
|
|
18
19
|
import '@babel/helper-plugin-utils';
|
|
19
|
-
import 'semver';
|
|
20
20
|
import '@stryke/types/array';
|
|
21
21
|
import '@stryke/types/tsconfig';
|
|
22
22
|
import 'typescript';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ReflectionClass } from '@deepkit/type';
|
|
2
2
|
import { EnvPluginContext, EnvType } from '../types/plugin.js';
|
|
3
3
|
import '@alloy-js/core/jsx-runtime';
|
|
4
|
-
import '../runtime-
|
|
4
|
+
import '../runtime-Cij6nHdf.js';
|
|
5
5
|
import '@stryke/env/get-env-paths';
|
|
6
6
|
import '@stryke/types/package-json';
|
|
7
7
|
import 'jiti';
|
|
8
|
+
import 'semver';
|
|
8
9
|
import 'unplugin';
|
|
9
10
|
import '@stryke/capnp';
|
|
10
11
|
import '@storm-software/config-tools/types';
|
|
@@ -16,7 +17,6 @@ import '@babel/core';
|
|
|
16
17
|
import '@storm-software/build-tools/types';
|
|
17
18
|
import '@storm-software/config/types';
|
|
18
19
|
import '@babel/helper-plugin-utils';
|
|
19
|
-
import 'semver';
|
|
20
20
|
import '@stryke/types/array';
|
|
21
21
|
import '@stryke/types/tsconfig';
|
|
22
22
|
import 'typescript';
|
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const W=createPlugin.createAlloyPlugin(b=>({name:"env",dependsOn:[$__default.default()],async config(){this.log(types$1.LogLevelLabel.TRACE,"Providing default configuration for the Powerlines `env` build plugin.");const e={env:u__default.default(b,{types:{},prefix:[]}),transform:{babel:{plugins:[plugin.envBabelPlugin]}}};return e.env.types?e.env.types=parseTypeDefinition.parseTypeDefinition(e.env.types):(this.log(types$1.LogLevelLabel.WARN,"The `env.types` configuration parameter was not provided. Please ensure this is expected."),e.env.types=parseTypeDefinition.parseTypeDefinition(`${persistence.getEnvDefaultTypeDefinition(this).file}#${persistence.getEnvDefaultTypeDefinition(this).name}`)),e.env.secrets?e.env.secrets=parseTypeDefinition.parseTypeDefinition(e.env.secrets):e.env.secrets=parseTypeDefinition.parseTypeDefinition(`${persistence.getSecretsDefaultTypeDefinition(this).file}#${persistence.getSecretsDefaultTypeDefinition(this).name}`),e.env.prefix=toArray.toArray(e.env.prefix??[]).reduce((i,n)=>{const t=constantCase.constantCase(n);return i.includes(t)||i.push(t),i},[...types$2.ENV_PREFIXES,"POWERLINES_"]),e.env.prefix=e.env.prefix.reduce((i,n)=>(i.includes(n.replace(/_$/g,""))||i.push(n.replace(/_$/g,"")),i),[]),e},async configResolved(){if(this.log(types$1.LogLevelLabel.TRACE,"Environment plugin configuration has been resolved for the Powerlines project."),this.config.env.inject??=this.config.projectType==="application",this.env=u__default.default({parsed:await load.loadEnv(this,this.config.env)},this.env??{},{types:{env:{}},used:{env:{},secrets:{}},parsed:{},injected:{}}),this.config.command!=="prepare"&&this.persistedMeta?.checksum===this.meta.checksum&&exists.existsSync(persistence.getEnvTypeReflectionsPath(this,"env")))this.log(types$1.LogLevelLabel.TRACE,"Skipping reflection initialization as the meta checksum has not changed."),this.env.types.env=await persistence.readEnvTypeReflection(this,"env"),exists.existsSync(persistence.getEnvReflectionsPath(this,"env"))&&(this.env.used.env=await persistence.readEnvReflection(this)),exists.existsSync(persistence.getEnvTypeReflectionsPath(this,"secrets"))&&(this.env.types.secrets=await persistence.readEnvTypeReflection(this,"secrets")),exists.existsSync(persistence.getEnvReflectionsPath(this,"secrets"))&&(this.env.used.secrets=await persistence.readSecretsReflection(this));else {if(this.env.types.env=await reflect.reflectEnv(this,this.config.env.types?.file?isParentPath.isParentPath(this.config.env.types?.file,this.workspaceConfig.workspaceRoot)?this.config.env.types?.file:join.joinPaths(this.config.projectRoot,this.config.env.types?.file):void 0,this.config.env.types?.name),!this.env.types.env)throw new Error("Failed to find the environment configuration type reflection in the context.");if(await persistence.writeEnvTypeReflection(this,this.env.types.env,"env"),this.env.types.secrets=await reflect.reflectSecrets(this,this.config.env.secrets?.file?isParentPath.isParentPath(this.config.env.secrets?.file,this.workspaceConfig.workspaceRoot)?this.config.env.secrets?.file:join.joinPaths(this.config.projectRoot,this.config.env.secrets?.file):void 0,this.config.env.secrets?.name),!this.env.types.secrets)throw new Error("Failed to find the secrets configuration type reflection in the context.");await persistence.writeEnvTypeReflection(this,this.env.types.secrets,"secrets"),this.log(types$1.LogLevelLabel.TRACE,`Resolved ${this.env.types.env.getProperties().length??0} environment configuration parameters and ${this.env.types.secrets?.getProperties().length??0} secret configuration parameters`);const e=this.env.types.env.getProperties().filter(i=>i.getAlias().length>0);Object.entries(await load.loadEnv(this,this.config.env)).forEach(([i,n])=>{const t=this.config.env.prefix.reduce((p,g)=>i.replace(/_$/g,"").startsWith(g)?i.replace(/_$/g,"").slice(g.length):p,i),c=e.find(p=>p?.getAlias().reverse().includes(t));(this.env.types.env?.hasProperty(t)||c)&&this.env.types.env.getProperty(t).setDefaultValue(n);}),this.env.used.env=new type.ReflectionClass({kind:type.ReflectionKind.objectLiteral,typeName:"StormEnv",description:`An object containing the environment configuration parameters used by the ${this.config.name?`${this.config.name} application`:"application"}.`,types:[]},this.env.types.env),await persistence.writeEnvReflection(this,this.env.used.env,"env"),this.env.types.secrets&&(await persistence.writeEnvTypeReflection(this,this.env.types.secrets,"secrets"),this.env.used.secrets=new type.ReflectionClass({kind:type.ReflectionKind.objectLiteral,typeName:"StormSecrets",description:`An object containing the secret configuration parameters used by the ${this.config.name?`${this.config.name} application`:"application"}.`,types:[]},this.env.types.secrets),await persistence.writeEnvReflection(this,this.env.used.secrets,"secrets"));}},render(){return this.log(types$1.LogLevelLabel.TRACE,"Preparing the Environment runtime artifacts for the Powerlines project."),React.createElement(env.EnvBuiltin,{defaultConfig:this.config.env.defaultConfig})},async docs(){this.log(types$1.LogLevelLabel.TRACE,"Writing Environment documentation for the Powerlines project artifacts.");const e=join.joinPaths(this.config.projectRoot,"docs","generated");exists.existsSync(e)||await helpers$1.createDirectory(e);const i=await persistence.readEnvTypeReflection(this,"env"),n=join.joinPaths(e,"env.md");this.log(types$1.LogLevelLabel.TRACE,`Documenting environment variables configuration in "${n}"`),await writeFile.writeFile(this.log,n,`<!-- Generated by Powerlines -->
|
|
8
8
|
|
|
9
9
|
# Environment variables configuration
|
|
10
10
|
|
|
@@ -19,4 +19,4 @@ const O=createPlugin.createAlloyPlugin(T=>({name:"env",dependsOn:[$__default.def
|
|
|
19
19
|
${i.getProperties().filter(t=>t.getNameAsString()!=="__STORM_INJECTED__").sort((t,c)=>t.getNameAsString().localeCompare(c.getNameAsString())).map(t=>`| ${t.getNameAsString().trim()} | ${(t.getDescription()?.replaceAll("\r","")?.replaceAll(`
|
|
20
20
|
`,"")??"").trim()} | ${type.stringifyType(t.getType()).trim().replaceAll(" | ",", or ")} | ${t.hasDefault()?String(t.getDefaultValue())?.includes('"')?t.getDefaultValue():`\`${t.getDefaultValue()}\``:""} | ${t.isValueRequired()?"":"\u2714"} |`).join(`
|
|
21
21
|
`)}
|
|
22
|
-
`);},async buildEnd(){const e=persistence.getEnvReflectionsPath(this,"env");this.log(types$1.LogLevelLabel.TRACE,`Writing env reflection types to ${e}.`),await persistence.writeEnvReflection(this,this.env.used.env,"env");}}));var le=
|
|
22
|
+
`);},async buildEnd(){const e=persistence.getEnvReflectionsPath(this,"env");this.log(types$1.LogLevelLabel.TRACE,`Writing env reflection types to ${e}.`),await persistence.writeEnvReflection(this,this.env.used.env,"env");}}));var le=W;exports.default=le;exports.plugin=W;Object.keys(babel).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return babel[k]}})});Object.keys(components).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return components[k]}})});Object.keys(helpers).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return helpers[k]}})});Object.keys(types).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return types[k]}})});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { EnvPluginContext, EnvPluginResolvedConfig } from './types/plugin.cjs';
|
|
2
2
|
export { EnvPluginOptions, EnvPluginUserConfig, EnvType, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType } from './types/plugin.cjs';
|
|
3
|
-
import { B as BabelTransformPluginOptions, P as Plugin } from './runtime-
|
|
4
|
-
export { E as EnvInterface, S as SecretsInterface, _ as __ΩEnvInterface, b as __ΩSecretsInterface } from './runtime-
|
|
3
|
+
import { B as BabelTransformPluginOptions, P as Plugin } from './runtime-2DL8LKdD.cjs';
|
|
4
|
+
export { E as EnvInterface, S as SecretsInterface, _ as __ΩEnvInterface, b as __ΩSecretsInterface } from './runtime-2DL8LKdD.cjs';
|
|
5
5
|
import * as _alloy_js_core from '@alloy-js/core';
|
|
6
6
|
import { PrintTreeOptions } from '@alloy-js/core';
|
|
7
7
|
import * as _stryke_types_configuration from '@stryke/types/configuration';
|
|
8
|
+
import { TypeDefinitionParameter } from '@stryke/types/configuration';
|
|
8
9
|
import * as _babel_core from '@babel/core';
|
|
9
10
|
export { envBabelPlugin } from './babel/plugin.cjs';
|
|
10
11
|
export { EnvBuiltin, EnvBuiltinProps, EnvTypeDefinition, __ΩEnvBuiltinProps } from './components/env.cjs';
|
|
@@ -19,6 +20,7 @@ import '@stryke/env/get-env-paths';
|
|
|
19
20
|
import '@stryke/types/package-json';
|
|
20
21
|
import 'jiti';
|
|
21
22
|
import '@deepkit/type';
|
|
23
|
+
import 'semver';
|
|
22
24
|
import 'unplugin';
|
|
23
25
|
import '@stryke/capnp';
|
|
24
26
|
import '@storm-software/config-tools/types';
|
|
@@ -28,7 +30,6 @@ import 'vite';
|
|
|
28
30
|
import '@storm-software/build-tools/types';
|
|
29
31
|
import '@storm-software/config/types';
|
|
30
32
|
import '@babel/helper-plugin-utils';
|
|
31
|
-
import 'semver';
|
|
32
33
|
import '@stryke/types/array';
|
|
33
34
|
import '@stryke/types/tsconfig';
|
|
34
35
|
import 'typescript';
|
|
@@ -61,8 +62,8 @@ interface AlloyPluginOptions {
|
|
|
61
62
|
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
62
63
|
*/
|
|
63
64
|
declare const plugin: (options: Omit<_stryke_types_configuration.DotenvConfiguration, "types"> & {
|
|
64
|
-
types?:
|
|
65
|
-
secrets?:
|
|
65
|
+
types?: TypeDefinitionParameter;
|
|
66
|
+
secrets?: TypeDefinitionParameter;
|
|
66
67
|
prefix?: string | string[];
|
|
67
68
|
inject?: boolean;
|
|
68
69
|
defaultConfig?: _alloy_js_core.Children;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { EnvPluginContext, EnvPluginResolvedConfig } from './types/plugin.js';
|
|
2
2
|
export { EnvPluginOptions, EnvPluginUserConfig, EnvType, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType } from './types/plugin.js';
|
|
3
|
-
import { B as BabelTransformPluginOptions, P as Plugin } from './runtime-
|
|
4
|
-
export { E as EnvInterface, S as SecretsInterface, _ as __ΩEnvInterface, b as __ΩSecretsInterface } from './runtime-
|
|
3
|
+
import { B as BabelTransformPluginOptions, P as Plugin } from './runtime-Cij6nHdf.js';
|
|
4
|
+
export { E as EnvInterface, S as SecretsInterface, _ as __ΩEnvInterface, b as __ΩSecretsInterface } from './runtime-Cij6nHdf.js';
|
|
5
5
|
import * as _alloy_js_core from '@alloy-js/core';
|
|
6
6
|
import { PrintTreeOptions } from '@alloy-js/core';
|
|
7
7
|
import * as _stryke_types_configuration from '@stryke/types/configuration';
|
|
8
|
+
import { TypeDefinitionParameter } from '@stryke/types/configuration';
|
|
8
9
|
import * as _babel_core from '@babel/core';
|
|
9
10
|
export { envBabelPlugin } from './babel/plugin.js';
|
|
10
11
|
export { EnvBuiltin, EnvBuiltinProps, EnvTypeDefinition, __ΩEnvBuiltinProps } from './components/env.js';
|
|
@@ -19,6 +20,7 @@ import '@stryke/env/get-env-paths';
|
|
|
19
20
|
import '@stryke/types/package-json';
|
|
20
21
|
import 'jiti';
|
|
21
22
|
import '@deepkit/type';
|
|
23
|
+
import 'semver';
|
|
22
24
|
import 'unplugin';
|
|
23
25
|
import '@stryke/capnp';
|
|
24
26
|
import '@storm-software/config-tools/types';
|
|
@@ -28,7 +30,6 @@ import 'vite';
|
|
|
28
30
|
import '@storm-software/build-tools/types';
|
|
29
31
|
import '@storm-software/config/types';
|
|
30
32
|
import '@babel/helper-plugin-utils';
|
|
31
|
-
import 'semver';
|
|
32
33
|
import '@stryke/types/array';
|
|
33
34
|
import '@stryke/types/tsconfig';
|
|
34
35
|
import 'typescript';
|
|
@@ -61,8 +62,8 @@ interface AlloyPluginOptions {
|
|
|
61
62
|
* A Powerlines plugin to assist in developing other Powerlines plugins.
|
|
62
63
|
*/
|
|
63
64
|
declare const plugin: (options: Omit<_stryke_types_configuration.DotenvConfiguration, "types"> & {
|
|
64
|
-
types?:
|
|
65
|
-
secrets?:
|
|
65
|
+
types?: TypeDefinitionParameter;
|
|
66
|
+
secrets?: TypeDefinitionParameter;
|
|
66
67
|
prefix?: string | string[];
|
|
67
68
|
inject?: boolean;
|
|
68
69
|
defaultConfig?: _alloy_js_core.Children;
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import'./chunk-UCUR73HG.js';import {createAlloyPlugin}from'@powerlines/alloy/cre
|
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const W=createAlloyPlugin(b=>({name:"env",dependsOn:[$()],async config(){this.log(LogLevelLabel.TRACE,"Providing default configuration for the Powerlines `env` build plugin.");const e={env:u(b,{types:{},prefix:[]}),transform:{babel:{plugins:[envBabelPlugin]}}};return e.env.types?e.env.types=parseTypeDefinition(e.env.types):(this.log(LogLevelLabel.WARN,"The `env.types` configuration parameter was not provided. Please ensure this is expected."),e.env.types=parseTypeDefinition(`${getEnvDefaultTypeDefinition(this).file}#${getEnvDefaultTypeDefinition(this).name}`)),e.env.secrets?e.env.secrets=parseTypeDefinition(e.env.secrets):e.env.secrets=parseTypeDefinition(`${getSecretsDefaultTypeDefinition(this).file}#${getSecretsDefaultTypeDefinition(this).name}`),e.env.prefix=toArray(e.env.prefix??[]).reduce((i,n)=>{const t=constantCase(n);return i.includes(t)||i.push(t),i},[...ENV_PREFIXES,"POWERLINES_"]),e.env.prefix=e.env.prefix.reduce((i,n)=>(i.includes(n.replace(/_$/g,""))||i.push(n.replace(/_$/g,"")),i),[]),e},async configResolved(){if(this.log(LogLevelLabel.TRACE,"Environment plugin configuration has been resolved for the Powerlines project."),this.config.env.inject??=this.config.projectType==="application",this.env=u({parsed:await loadEnv(this,this.config.env)},this.env??{},{types:{env:{}},used:{env:{},secrets:{}},parsed:{},injected:{}}),this.config.command!=="prepare"&&this.persistedMeta?.checksum===this.meta.checksum&&existsSync(getEnvTypeReflectionsPath(this,"env")))this.log(LogLevelLabel.TRACE,"Skipping reflection initialization as the meta checksum has not changed."),this.env.types.env=await readEnvTypeReflection(this,"env"),existsSync(getEnvReflectionsPath(this,"env"))&&(this.env.used.env=await readEnvReflection(this)),existsSync(getEnvTypeReflectionsPath(this,"secrets"))&&(this.env.types.secrets=await readEnvTypeReflection(this,"secrets")),existsSync(getEnvReflectionsPath(this,"secrets"))&&(this.env.used.secrets=await readSecretsReflection(this));else {if(this.env.types.env=await reflectEnv(this,this.config.env.types?.file?isParentPath(this.config.env.types?.file,this.workspaceConfig.workspaceRoot)?this.config.env.types?.file:joinPaths(this.config.projectRoot,this.config.env.types?.file):void 0,this.config.env.types?.name),!this.env.types.env)throw new Error("Failed to find the environment configuration type reflection in the context.");if(await writeEnvTypeReflection(this,this.env.types.env,"env"),this.env.types.secrets=await reflectSecrets(this,this.config.env.secrets?.file?isParentPath(this.config.env.secrets?.file,this.workspaceConfig.workspaceRoot)?this.config.env.secrets?.file:joinPaths(this.config.projectRoot,this.config.env.secrets?.file):void 0,this.config.env.secrets?.name),!this.env.types.secrets)throw new Error("Failed to find the secrets configuration type reflection in the context.");await writeEnvTypeReflection(this,this.env.types.secrets,"secrets"),this.log(LogLevelLabel.TRACE,`Resolved ${this.env.types.env.getProperties().length??0} environment configuration parameters and ${this.env.types.secrets?.getProperties().length??0} secret configuration parameters`);const e=this.env.types.env.getProperties().filter(i=>i.getAlias().length>0);Object.entries(await loadEnv(this,this.config.env)).forEach(([i,n])=>{const t=this.config.env.prefix.reduce((p,g)=>i.replace(/_$/g,"").startsWith(g)?i.replace(/_$/g,"").slice(g.length):p,i),c=e.find(p=>p?.getAlias().reverse().includes(t));(this.env.types.env?.hasProperty(t)||c)&&this.env.types.env.getProperty(t).setDefaultValue(n);}),this.env.used.env=new ReflectionClass({kind:ReflectionKind.objectLiteral,typeName:"StormEnv",description:`An object containing the environment configuration parameters used by the ${this.config.name?`${this.config.name} application`:"application"}.`,types:[]},this.env.types.env),await writeEnvReflection(this,this.env.used.env,"env"),this.env.types.secrets&&(await writeEnvTypeReflection(this,this.env.types.secrets,"secrets"),this.env.used.secrets=new ReflectionClass({kind:ReflectionKind.objectLiteral,typeName:"StormSecrets",description:`An object containing the secret configuration parameters used by the ${this.config.name?`${this.config.name} application`:"application"}.`,types:[]},this.env.types.secrets),await writeEnvReflection(this,this.env.used.secrets,"secrets"));}},render(){return this.log(LogLevelLabel.TRACE,"Preparing the Environment runtime artifacts for the Powerlines project."),React.createElement(EnvBuiltin,{defaultConfig:this.config.env.defaultConfig})},async docs(){this.log(LogLevelLabel.TRACE,"Writing Environment documentation for the Powerlines project artifacts.");const e=joinPaths(this.config.projectRoot,"docs","generated");existsSync(e)||await createDirectory(e);const i=await readEnvTypeReflection(this,"env"),n=joinPaths(e,"env.md");this.log(LogLevelLabel.TRACE,`Documenting environment variables configuration in "${n}"`),await writeFile(this.log,n,`<!-- Generated by Powerlines -->
|
|
8
8
|
|
|
9
9
|
# Environment variables configuration
|
|
10
10
|
|
|
@@ -19,4 +19,4 @@ const O=createAlloyPlugin(T=>({name:"env",dependsOn:[$()],async config(){this.lo
|
|
|
19
19
|
${i.getProperties().filter(t=>t.getNameAsString()!=="__STORM_INJECTED__").sort((t,c)=>t.getNameAsString().localeCompare(c.getNameAsString())).map(t=>`| ${t.getNameAsString().trim()} | ${(t.getDescription()?.replaceAll("\r","")?.replaceAll(`
|
|
20
20
|
`,"")??"").trim()} | ${stringifyType(t.getType()).trim().replaceAll(" | ",", or ")} | ${t.hasDefault()?String(t.getDefaultValue())?.includes('"')?t.getDefaultValue():`\`${t.getDefaultValue()}\``:""} | ${t.isValueRequired()?"":"\u2714"} |`).join(`
|
|
21
21
|
`)}
|
|
22
|
-
`);},async buildEnd(){const e=getEnvReflectionsPath(this,"env");this.log(LogLevelLabel.TRACE,`Writing env reflection types to ${e}.`),await writeEnvReflection(this,this.env.used.env,"env");}}));var he=
|
|
22
|
+
`);},async buildEnd(){const e=getEnvReflectionsPath(this,"env");this.log(LogLevelLabel.TRACE,`Writing env reflection types to ${e}.`),await writeEnvReflection(this,this.env.used.env,"env");}}));var he=W;export{he as default,W as plugin};
|
|
@@ -2,6 +2,7 @@ import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
|
2
2
|
import { PackageJson } from '@stryke/types/package-json';
|
|
3
3
|
import { Jiti } from 'jiti';
|
|
4
4
|
import { ReflectionClass } from '@deepkit/type';
|
|
5
|
+
import { Range } from 'semver';
|
|
5
6
|
import { TransformResult, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginContext, UnpluginBuildContext } from 'unplugin';
|
|
6
7
|
import * as $ from '@stryke/capnp';
|
|
7
8
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
@@ -13,7 +14,6 @@ import { PluginItem, PluginObj, PluginPass, transformAsync } from '@babel/core';
|
|
|
13
14
|
import { Format } from '@storm-software/build-tools/types';
|
|
14
15
|
import { StormWorkspaceConfig } from '@storm-software/config/types';
|
|
15
16
|
import { BabelAPI } from '@babel/helper-plugin-utils';
|
|
16
|
-
import { Range } from 'semver';
|
|
17
17
|
import { ArrayValues } from '@stryke/types/array';
|
|
18
18
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
19
19
|
import ts from 'typescript';
|
|
@@ -1646,11 +1646,6 @@ type DeclareBabelTransformPluginReturn<TContext extends Context = Context, TOpti
|
|
|
1646
1646
|
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "release", "finalize"];
|
|
1647
1647
|
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
|
1648
1648
|
|
|
1649
|
-
type PackageDependencyMeta = "dependency" | "devDependency" | {
|
|
1650
|
-
version?: string | Range;
|
|
1651
|
-
type?: "dependency" | "devDependency";
|
|
1652
|
-
};
|
|
1653
|
-
type PackageDependencies = Record<string, PackageDependencyMeta>;
|
|
1654
1649
|
interface PluginHookObject<THookFunction extends FunctionLike, TFilter extends keyof HookFilter | undefined = undefined> {
|
|
1655
1650
|
/**
|
|
1656
1651
|
* The order in which the plugin should be applied.
|
|
@@ -2002,14 +1997,14 @@ interface OutputConfig {
|
|
|
2002
1997
|
*/
|
|
2003
1998
|
builtinPrefix?: string;
|
|
2004
1999
|
/**
|
|
2005
|
-
* The folder where the generated runtime
|
|
2000
|
+
* The folder where the generated runtime artifacts will be located
|
|
2006
2001
|
*
|
|
2007
2002
|
* @remarks
|
|
2008
|
-
* This folder will contain all runtime
|
|
2003
|
+
* This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
|
|
2009
2004
|
*
|
|
2010
2005
|
* @defaultValue "\{projectRoot\}/.powerlines"
|
|
2011
2006
|
*/
|
|
2012
|
-
|
|
2007
|
+
artifactsFolder?: string;
|
|
2013
2008
|
/**
|
|
2014
2009
|
* The module format of the output files
|
|
2015
2010
|
*
|
|
@@ -2027,19 +2022,6 @@ interface OutputConfig {
|
|
|
2027
2022
|
*/
|
|
2028
2023
|
assets?: Array<string | AssetGlob>;
|
|
2029
2024
|
}
|
|
2030
|
-
interface TransformConfig {
|
|
2031
|
-
/**
|
|
2032
|
-
* The Babel configuration options to use for the build process
|
|
2033
|
-
*/
|
|
2034
|
-
babel?: BabelUserConfig;
|
|
2035
|
-
/**
|
|
2036
|
-
* Reflection configuration options for the Deepkit TSC custom transformers
|
|
2037
|
-
*
|
|
2038
|
-
* @remarks
|
|
2039
|
-
* These options will be merged with the `tsconfig.json` file and the `tsconfigRaw` options.
|
|
2040
|
-
*/
|
|
2041
|
-
deepkit?: DeepkitOptions;
|
|
2042
|
-
}
|
|
2043
2025
|
interface BaseConfig {
|
|
2044
2026
|
/**
|
|
2045
2027
|
* The name of the project
|
|
@@ -2090,7 +2072,7 @@ interface BaseConfig {
|
|
|
2090
2072
|
/**
|
|
2091
2073
|
* Configuration for the transformation of the source code
|
|
2092
2074
|
*/
|
|
2093
|
-
transform?:
|
|
2075
|
+
transform?: Record<string, any>;
|
|
2094
2076
|
/**
|
|
2095
2077
|
* Options to to provide to the build process
|
|
2096
2078
|
*/
|
|
@@ -2215,6 +2197,12 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
2215
2197
|
* Environment-specific configurations
|
|
2216
2198
|
*/
|
|
2217
2199
|
environments?: Record<string, EnvironmentConfig>;
|
|
2200
|
+
/**
|
|
2201
|
+
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
2202
|
+
*
|
|
2203
|
+
* @defaultValue "powerlines"
|
|
2204
|
+
*/
|
|
2205
|
+
framework?: string;
|
|
2218
2206
|
}
|
|
2219
2207
|
type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = CommonUserConfig & {
|
|
2220
2208
|
build?: TBuildConfig & {
|
|
@@ -2265,7 +2253,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
|
|
|
2265
2253
|
/**
|
|
2266
2254
|
* The resolved options for the Powerlines project configuration.
|
|
2267
2255
|
*/
|
|
2268
|
-
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "build" | "transform" | "override" | "root" | "variant" | "type" | "output" | "logLevel"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "build" | "transform" | "override">> & {
|
|
2256
|
+
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "build" | "transform" | "override" | "root" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "build" | "transform" | "override" | "framework">> & {
|
|
2269
2257
|
/**
|
|
2270
2258
|
* The configuration options that were provided inline to the Powerlines CLI.
|
|
2271
2259
|
*/
|
|
@@ -2411,13 +2399,6 @@ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
|
2411
2399
|
* The relative path to the Powerlines workspace root directory
|
|
2412
2400
|
*/
|
|
2413
2401
|
relativeToWorkspaceRoot: string;
|
|
2414
|
-
/**
|
|
2415
|
-
* The path to the \powerlines package
|
|
2416
|
-
*
|
|
2417
|
-
* @remarks
|
|
2418
|
-
* This is used to determine the path to the Powerlines core package, which contains the runtime files.
|
|
2419
|
-
*/
|
|
2420
|
-
corePackagePath: string;
|
|
2421
2402
|
/**
|
|
2422
2403
|
* The Powerlines artifacts directory
|
|
2423
2404
|
*/
|
|
@@ -2447,9 +2428,17 @@ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
|
2447
2428
|
*/
|
|
2448
2429
|
envPaths: EnvPaths;
|
|
2449
2430
|
/**
|
|
2450
|
-
* The
|
|
2431
|
+
* The file system path to the Powerlines package installation
|
|
2432
|
+
*/
|
|
2433
|
+
powerlinesPath: string;
|
|
2434
|
+
/**
|
|
2435
|
+
* The dependency installations required by the project
|
|
2436
|
+
*/
|
|
2437
|
+
dependencies: Record<string, string | Range>;
|
|
2438
|
+
/**
|
|
2439
|
+
* The development dependency installations required by the project
|
|
2451
2440
|
*/
|
|
2452
|
-
|
|
2441
|
+
devDependencies: Record<string, string | Range>;
|
|
2453
2442
|
/**
|
|
2454
2443
|
* The project's `package.json` file content
|
|
2455
2444
|
*/
|
|
@@ -2,6 +2,7 @@ import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
|
2
2
|
import { PackageJson } from '@stryke/types/package-json';
|
|
3
3
|
import { Jiti } from 'jiti';
|
|
4
4
|
import { ReflectionClass } from '@deepkit/type';
|
|
5
|
+
import { Range } from 'semver';
|
|
5
6
|
import { TransformResult, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginContext, UnpluginBuildContext } from 'unplugin';
|
|
6
7
|
import * as $ from '@stryke/capnp';
|
|
7
8
|
import { LogLevelLabel } from '@storm-software/config-tools/types';
|
|
@@ -13,7 +14,6 @@ import { PluginItem, PluginObj, PluginPass, transformAsync } from '@babel/core';
|
|
|
13
14
|
import { Format } from '@storm-software/build-tools/types';
|
|
14
15
|
import { StormWorkspaceConfig } from '@storm-software/config/types';
|
|
15
16
|
import { BabelAPI } from '@babel/helper-plugin-utils';
|
|
16
|
-
import { Range } from 'semver';
|
|
17
17
|
import { ArrayValues } from '@stryke/types/array';
|
|
18
18
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
19
19
|
import ts from 'typescript';
|
|
@@ -1646,11 +1646,6 @@ type DeclareBabelTransformPluginReturn<TContext extends Context = Context, TOpti
|
|
|
1646
1646
|
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "release", "finalize"];
|
|
1647
1647
|
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
|
1648
1648
|
|
|
1649
|
-
type PackageDependencyMeta = "dependency" | "devDependency" | {
|
|
1650
|
-
version?: string | Range;
|
|
1651
|
-
type?: "dependency" | "devDependency";
|
|
1652
|
-
};
|
|
1653
|
-
type PackageDependencies = Record<string, PackageDependencyMeta>;
|
|
1654
1649
|
interface PluginHookObject<THookFunction extends FunctionLike, TFilter extends keyof HookFilter | undefined = undefined> {
|
|
1655
1650
|
/**
|
|
1656
1651
|
* The order in which the plugin should be applied.
|
|
@@ -2002,14 +1997,14 @@ interface OutputConfig {
|
|
|
2002
1997
|
*/
|
|
2003
1998
|
builtinPrefix?: string;
|
|
2004
1999
|
/**
|
|
2005
|
-
* The folder where the generated runtime
|
|
2000
|
+
* The folder where the generated runtime artifacts will be located
|
|
2006
2001
|
*
|
|
2007
2002
|
* @remarks
|
|
2008
|
-
* This folder will contain all runtime
|
|
2003
|
+
* This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
|
|
2009
2004
|
*
|
|
2010
2005
|
* @defaultValue "\{projectRoot\}/.powerlines"
|
|
2011
2006
|
*/
|
|
2012
|
-
|
|
2007
|
+
artifactsFolder?: string;
|
|
2013
2008
|
/**
|
|
2014
2009
|
* The module format of the output files
|
|
2015
2010
|
*
|
|
@@ -2027,19 +2022,6 @@ interface OutputConfig {
|
|
|
2027
2022
|
*/
|
|
2028
2023
|
assets?: Array<string | AssetGlob>;
|
|
2029
2024
|
}
|
|
2030
|
-
interface TransformConfig {
|
|
2031
|
-
/**
|
|
2032
|
-
* The Babel configuration options to use for the build process
|
|
2033
|
-
*/
|
|
2034
|
-
babel?: BabelUserConfig;
|
|
2035
|
-
/**
|
|
2036
|
-
* Reflection configuration options for the Deepkit TSC custom transformers
|
|
2037
|
-
*
|
|
2038
|
-
* @remarks
|
|
2039
|
-
* These options will be merged with the `tsconfig.json` file and the `tsconfigRaw` options.
|
|
2040
|
-
*/
|
|
2041
|
-
deepkit?: DeepkitOptions;
|
|
2042
|
-
}
|
|
2043
2025
|
interface BaseConfig {
|
|
2044
2026
|
/**
|
|
2045
2027
|
* The name of the project
|
|
@@ -2090,7 +2072,7 @@ interface BaseConfig {
|
|
|
2090
2072
|
/**
|
|
2091
2073
|
* Configuration for the transformation of the source code
|
|
2092
2074
|
*/
|
|
2093
|
-
transform?:
|
|
2075
|
+
transform?: Record<string, any>;
|
|
2094
2076
|
/**
|
|
2095
2077
|
* Options to to provide to the build process
|
|
2096
2078
|
*/
|
|
@@ -2215,6 +2197,12 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
2215
2197
|
* Environment-specific configurations
|
|
2216
2198
|
*/
|
|
2217
2199
|
environments?: Record<string, EnvironmentConfig>;
|
|
2200
|
+
/**
|
|
2201
|
+
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
2202
|
+
*
|
|
2203
|
+
* @defaultValue "powerlines"
|
|
2204
|
+
*/
|
|
2205
|
+
framework?: string;
|
|
2218
2206
|
}
|
|
2219
2207
|
type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = CommonUserConfig & {
|
|
2220
2208
|
build?: TBuildConfig & {
|
|
@@ -2265,7 +2253,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
|
|
|
2265
2253
|
/**
|
|
2266
2254
|
* The resolved options for the Powerlines project configuration.
|
|
2267
2255
|
*/
|
|
2268
|
-
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "build" | "transform" | "override" | "root" | "variant" | "type" | "output" | "logLevel"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "build" | "transform" | "override">> & {
|
|
2256
|
+
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "build" | "transform" | "override" | "root" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "build" | "transform" | "override" | "framework">> & {
|
|
2269
2257
|
/**
|
|
2270
2258
|
* The configuration options that were provided inline to the Powerlines CLI.
|
|
2271
2259
|
*/
|
|
@@ -2411,13 +2399,6 @@ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
|
2411
2399
|
* The relative path to the Powerlines workspace root directory
|
|
2412
2400
|
*/
|
|
2413
2401
|
relativeToWorkspaceRoot: string;
|
|
2414
|
-
/**
|
|
2415
|
-
* The path to the \powerlines package
|
|
2416
|
-
*
|
|
2417
|
-
* @remarks
|
|
2418
|
-
* This is used to determine the path to the Powerlines core package, which contains the runtime files.
|
|
2419
|
-
*/
|
|
2420
|
-
corePackagePath: string;
|
|
2421
2402
|
/**
|
|
2422
2403
|
* The Powerlines artifacts directory
|
|
2423
2404
|
*/
|
|
@@ -2447,9 +2428,17 @@ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
|
2447
2428
|
*/
|
|
2448
2429
|
envPaths: EnvPaths;
|
|
2449
2430
|
/**
|
|
2450
|
-
* The
|
|
2431
|
+
* The file system path to the Powerlines package installation
|
|
2432
|
+
*/
|
|
2433
|
+
powerlinesPath: string;
|
|
2434
|
+
/**
|
|
2435
|
+
* The dependency installations required by the project
|
|
2436
|
+
*/
|
|
2437
|
+
dependencies: Record<string, string | Range>;
|
|
2438
|
+
/**
|
|
2439
|
+
* The development dependency installations required by the project
|
|
2451
2440
|
*/
|
|
2452
|
-
|
|
2441
|
+
devDependencies: Record<string, string | Range>;
|
|
2453
2442
|
/**
|
|
2454
2443
|
* The project's `package.json` file content
|
|
2455
2444
|
*/
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType } from './plugin.cjs';
|
|
2
|
-
export { E as EnvInterface, S as SecretsInterface, _ as __ΩEnvInterface, b as __ΩSecretsInterface } from '../runtime-
|
|
2
|
+
export { E as EnvInterface, S as SecretsInterface, _ as __ΩEnvInterface, b as __ΩSecretsInterface } from '../runtime-2DL8LKdD.cjs';
|
|
3
3
|
import '@alloy-js/core/jsx-runtime';
|
|
4
4
|
import '@stryke/env/types';
|
|
5
5
|
import '@stryke/types/configuration';
|
|
@@ -7,6 +7,7 @@ import '@stryke/env/get-env-paths';
|
|
|
7
7
|
import '@stryke/types/package-json';
|
|
8
8
|
import 'jiti';
|
|
9
9
|
import '@deepkit/type';
|
|
10
|
+
import 'semver';
|
|
10
11
|
import 'unplugin';
|
|
11
12
|
import '@stryke/capnp';
|
|
12
13
|
import '@storm-software/config-tools/types';
|
|
@@ -17,7 +18,6 @@ import '@babel/core';
|
|
|
17
18
|
import '@storm-software/build-tools/types';
|
|
18
19
|
import '@storm-software/config/types';
|
|
19
20
|
import '@babel/helper-plugin-utils';
|
|
20
|
-
import 'semver';
|
|
21
21
|
import '@stryke/types/array';
|
|
22
22
|
import '@stryke/types/tsconfig';
|
|
23
23
|
import 'typescript';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, __ΩEnvPluginContext, __ΩEnvPluginOptions, __ΩEnvPluginResolvedConfig, __ΩEnvPluginUserConfig, __ΩEnvType } from './plugin.js';
|
|
2
|
-
export { E as EnvInterface, S as SecretsInterface, _ as __ΩEnvInterface, b as __ΩSecretsInterface } from '../runtime-
|
|
2
|
+
export { E as EnvInterface, S as SecretsInterface, _ as __ΩEnvInterface, b as __ΩSecretsInterface } from '../runtime-Cij6nHdf.js';
|
|
3
3
|
import '@alloy-js/core/jsx-runtime';
|
|
4
4
|
import '@stryke/env/types';
|
|
5
5
|
import '@stryke/types/configuration';
|
|
@@ -7,6 +7,7 @@ import '@stryke/env/get-env-paths';
|
|
|
7
7
|
import '@stryke/types/package-json';
|
|
8
8
|
import 'jiti';
|
|
9
9
|
import '@deepkit/type';
|
|
10
|
+
import 'semver';
|
|
10
11
|
import 'unplugin';
|
|
11
12
|
import '@stryke/capnp';
|
|
12
13
|
import '@storm-software/config-tools/types';
|
|
@@ -17,7 +18,6 @@ import '@babel/core';
|
|
|
17
18
|
import '@storm-software/build-tools/types';
|
|
18
19
|
import '@storm-software/config/types';
|
|
19
20
|
import '@babel/helper-plugin-utils';
|
|
20
|
-
import 'semver';
|
|
21
21
|
import '@stryke/types/array';
|
|
22
22
|
import '@stryke/types/tsconfig';
|
|
23
23
|
import 'typescript';
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Children } from '@alloy-js/core/jsx-runtime';
|
|
2
|
-
import { c as BabelUserConfig, U as UserConfig, R as ResolvedConfig, d as BabelResolvedConfig, e as PluginContext, f as Reflection, E as EnvInterface, S as SecretsInterface } from '../runtime-
|
|
2
|
+
import { c as BabelUserConfig, U as UserConfig, R as ResolvedConfig, d as BabelResolvedConfig, e as PluginContext, f as Reflection, E as EnvInterface, S as SecretsInterface } from '../runtime-2DL8LKdD.cjs';
|
|
3
3
|
import { DotenvParseOutput } from '@stryke/env/types';
|
|
4
4
|
import { DotenvConfiguration, TypeDefinitionParameter, TypeDefinition } from '@stryke/types/configuration';
|
|
5
5
|
import '@stryke/env/get-env-paths';
|
|
6
6
|
import '@stryke/types/package-json';
|
|
7
7
|
import 'jiti';
|
|
8
8
|
import '@deepkit/type';
|
|
9
|
+
import 'semver';
|
|
9
10
|
import 'unplugin';
|
|
10
11
|
import '@stryke/capnp';
|
|
11
12
|
import '@storm-software/config-tools/types';
|
|
@@ -16,7 +17,6 @@ import '@babel/core';
|
|
|
16
17
|
import '@storm-software/build-tools/types';
|
|
17
18
|
import '@storm-software/config/types';
|
|
18
19
|
import '@babel/helper-plugin-utils';
|
|
19
|
-
import 'semver';
|
|
20
20
|
import '@stryke/types/array';
|
|
21
21
|
import '@stryke/types/tsconfig';
|
|
22
22
|
import 'typescript';
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Children } from '@alloy-js/core/jsx-runtime';
|
|
2
|
-
import { c as BabelUserConfig, U as UserConfig, R as ResolvedConfig, d as BabelResolvedConfig, e as PluginContext, f as Reflection, E as EnvInterface, S as SecretsInterface } from '../runtime-
|
|
2
|
+
import { c as BabelUserConfig, U as UserConfig, R as ResolvedConfig, d as BabelResolvedConfig, e as PluginContext, f as Reflection, E as EnvInterface, S as SecretsInterface } from '../runtime-Cij6nHdf.js';
|
|
3
3
|
import { DotenvParseOutput } from '@stryke/env/types';
|
|
4
4
|
import { DotenvConfiguration, TypeDefinitionParameter, TypeDefinition } from '@stryke/types/configuration';
|
|
5
5
|
import '@stryke/env/get-env-paths';
|
|
6
6
|
import '@stryke/types/package-json';
|
|
7
7
|
import 'jiti';
|
|
8
8
|
import '@deepkit/type';
|
|
9
|
+
import 'semver';
|
|
9
10
|
import 'unplugin';
|
|
10
11
|
import '@stryke/capnp';
|
|
11
12
|
import '@storm-software/config-tools/types';
|
|
@@ -16,7 +17,6 @@ import '@babel/core';
|
|
|
16
17
|
import '@storm-software/build-tools/types';
|
|
17
18
|
import '@storm-software/config/types';
|
|
18
19
|
import '@babel/helper-plugin-utils';
|
|
19
|
-
import 'semver';
|
|
20
20
|
import '@stryke/types/array';
|
|
21
21
|
import '@stryke/types/tsconfig';
|
|
22
22
|
import 'typescript';
|
package/dist/types/runtime.d.cts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export { E as EnvInterface, S as SecretsInterface, _ as __ΩEnvInterface, b as __ΩSecretsInterface } from '../runtime-
|
|
1
|
+
export { E as EnvInterface, S as SecretsInterface, _ as __ΩEnvInterface, b as __ΩSecretsInterface } from '../runtime-2DL8LKdD.cjs';
|
|
2
2
|
import '@stryke/env/get-env-paths';
|
|
3
3
|
import '@stryke/types/package-json';
|
|
4
4
|
import 'jiti';
|
|
5
5
|
import '@deepkit/type';
|
|
6
|
+
import 'semver';
|
|
6
7
|
import 'unplugin';
|
|
7
8
|
import '@stryke/capnp';
|
|
8
9
|
import '@storm-software/config-tools/types';
|
|
@@ -14,7 +15,6 @@ import '@babel/core';
|
|
|
14
15
|
import '@storm-software/build-tools/types';
|
|
15
16
|
import '@storm-software/config/types';
|
|
16
17
|
import '@babel/helper-plugin-utils';
|
|
17
|
-
import 'semver';
|
|
18
18
|
import '@stryke/types/array';
|
|
19
19
|
import '@stryke/types/tsconfig';
|
|
20
20
|
import 'typescript';
|
package/dist/types/runtime.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export { E as EnvInterface, S as SecretsInterface, _ as __ΩEnvInterface, b as __ΩSecretsInterface } from '../runtime-
|
|
1
|
+
export { E as EnvInterface, S as SecretsInterface, _ as __ΩEnvInterface, b as __ΩSecretsInterface } from '../runtime-Cij6nHdf.js';
|
|
2
2
|
import '@stryke/env/get-env-paths';
|
|
3
3
|
import '@stryke/types/package-json';
|
|
4
4
|
import 'jiti';
|
|
5
5
|
import '@deepkit/type';
|
|
6
|
+
import 'semver';
|
|
6
7
|
import 'unplugin';
|
|
7
8
|
import '@stryke/capnp';
|
|
8
9
|
import '@storm-software/config-tools/types';
|
|
@@ -14,7 +15,6 @@ import '@babel/core';
|
|
|
14
15
|
import '@storm-software/build-tools/types';
|
|
15
16
|
import '@storm-software/config/types';
|
|
16
17
|
import '@babel/helper-plugin-utils';
|
|
17
|
-
import 'semver';
|
|
18
18
|
import '@stryke/types/array';
|
|
19
19
|
import '@stryke/types/tsconfig';
|
|
20
20
|
import 'typescript';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-env",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for injecting static .env configuration values to the code so that they're accessible at runtime.",
|
|
6
6
|
"repository": {
|
|
@@ -185,9 +185,9 @@
|
|
|
185
185
|
"@alloy-js/typescript": "^0.20.0",
|
|
186
186
|
"@babel/core": "^7.28.4",
|
|
187
187
|
"@babel/types": "^7.28.4",
|
|
188
|
-
"@powerlines/alloy": "^0.
|
|
189
|
-
"@powerlines/plugin-babel": "^0.
|
|
190
|
-
"@powerlines/plugin-plugin": "^0.
|
|
188
|
+
"@powerlines/alloy": "^0.3.0",
|
|
189
|
+
"@powerlines/plugin-babel": "^0.4.0",
|
|
190
|
+
"@powerlines/plugin-plugin": "^0.4.0",
|
|
191
191
|
"@storm-software/config-tools": "^1.188.6",
|
|
192
192
|
"@stryke/capnp": "^0.11.24",
|
|
193
193
|
"@stryke/env": "^0.19.12",
|
|
@@ -196,18 +196,18 @@
|
|
|
196
196
|
"@stryke/string-format": "^0.12.0",
|
|
197
197
|
"@stryke/type-checks": "^0.3.10",
|
|
198
198
|
"@stryke/types": "^0.10.0",
|
|
199
|
-
"powerlines": "^0.
|
|
199
|
+
"powerlines": "^0.4.0"
|
|
200
200
|
},
|
|
201
201
|
"devDependencies": {
|
|
202
202
|
"@alloy-js/babel-preset": "^0.2.1",
|
|
203
203
|
"@babel/preset-typescript": "^7.27.1",
|
|
204
|
-
"@powerlines/nx": "^0.
|
|
204
|
+
"@powerlines/nx": "^0.4.0",
|
|
205
205
|
"@storm-software/tsup": "^0.2.4",
|
|
206
206
|
"@types/node": "^22.18.11",
|
|
207
207
|
"tsup": "8.4.0",
|
|
208
|
-
"typescript": "5.9.3",
|
|
208
|
+
"typescript": "^5.9.3",
|
|
209
209
|
"vite": "^7.1.11"
|
|
210
210
|
},
|
|
211
211
|
"publishConfig": { "access": "public" },
|
|
212
|
-
"gitHead": "
|
|
212
|
+
"gitHead": "f4d0c8a8f0036ac8de46ac96afd9336a390a7268"
|
|
213
213
|
}
|