@powerlines/plugin-env 0.15.117 → 0.15.119
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/components/env.cjs +11 -9
- package/dist/components/env.mjs +11 -9
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +9 -9
package/dist/components/env.cjs
CHANGED
|
@@ -219,14 +219,14 @@ function EnvBuiltin(props) {
|
|
|
219
219
|
}, rest, {
|
|
220
220
|
get imports() {
|
|
221
221
|
return require_defu.defu({ "@powerlines/deepkit/vendor/type": [
|
|
222
|
-
"Type",
|
|
223
222
|
"stringify",
|
|
224
223
|
"serializer",
|
|
225
224
|
"serializeFunction",
|
|
226
225
|
"deserializeFunction",
|
|
227
226
|
"ReflectionKind",
|
|
228
|
-
"TemplateState",
|
|
229
227
|
"Serializer",
|
|
228
|
+
"TemplateState",
|
|
229
|
+
"Type",
|
|
230
230
|
"TypeProperty",
|
|
231
231
|
"TypePropertySignature"
|
|
232
232
|
] }, rest.imports ?? {});
|
|
@@ -258,7 +258,8 @@ function EnvBuiltin(props) {
|
|
|
258
258
|
defaultValue,
|
|
259
259
|
reflection: envInstance,
|
|
260
260
|
"export": true,
|
|
261
|
-
"const": true
|
|
261
|
+
"const": true,
|
|
262
|
+
doc: "The initial environment configuration object values for the runtime."
|
|
262
263
|
}),
|
|
263
264
|
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
264
265
|
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
@@ -281,6 +282,7 @@ function EnvBuiltin(props) {
|
|
|
281
282
|
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ClassMethod, {
|
|
282
283
|
name: "constructor",
|
|
283
284
|
"public": true,
|
|
285
|
+
doc: "Initializes a new instance of the `EnvSerializer` class.",
|
|
284
286
|
children: __alloy_js_core.code`
|
|
285
287
|
super("env");
|
|
286
288
|
|
|
@@ -325,7 +327,7 @@ function EnvBuiltin(props) {
|
|
|
325
327
|
heading: "Serialize a environment configuration object to JSON data objects (not a JSON string).",
|
|
326
328
|
get children() {
|
|
327
329
|
return [
|
|
328
|
-
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `The resulting JSON object can be stringified using JSON.stringify()
|
|
330
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocRemarks, { children: `The resulting JSON object can be stringified using \`JSON.stringify()\`.` }),
|
|
329
331
|
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocExample, { children: `const json = serializeEnv(env);` }),
|
|
330
332
|
(0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_typescript_components_tsdoc.TSDocThrows, { children: `ValidationError when serialization or validation fails.` })
|
|
331
333
|
];
|
|
@@ -458,7 +460,7 @@ function EnvBuiltin(props) {
|
|
|
458
460
|
"export": true,
|
|
459
461
|
"const": true,
|
|
460
462
|
name: "isCI",
|
|
461
|
-
doc: "Detect if the application is running in a CI environment.",
|
|
463
|
+
doc: "Detect if the application is running in a continuous integration (CI) environment.",
|
|
462
464
|
initializer: __alloy_js_core.code`Boolean(
|
|
463
465
|
env.CI ||
|
|
464
466
|
env.RUN_ID ||
|
|
@@ -538,7 +540,7 @@ function EnvBuiltin(props) {
|
|
|
538
540
|
"export": true,
|
|
539
541
|
"const": true,
|
|
540
542
|
name: "isProduction",
|
|
541
|
-
doc: "Detect if the application is running in
|
|
543
|
+
doc: "Detect if the application is running in `\"production\"` mode",
|
|
542
544
|
initializer: __alloy_js_core.code`["prd", "prod", "production"].includes(mode.toLowerCase()); `
|
|
543
545
|
}),
|
|
544
546
|
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
@@ -547,7 +549,7 @@ function EnvBuiltin(props) {
|
|
|
547
549
|
"export": true,
|
|
548
550
|
"const": true,
|
|
549
551
|
name: "isTest",
|
|
550
|
-
doc: "Detect if the application is running in
|
|
552
|
+
doc: "Detect if the application is running in `\"test\"` mode",
|
|
551
553
|
initializer: __alloy_js_core.code`["tst", "test", "testing", "stg", "stage", "staging"].includes(mode.toLowerCase()) || env.TEST; `
|
|
552
554
|
}),
|
|
553
555
|
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
@@ -556,7 +558,7 @@ function EnvBuiltin(props) {
|
|
|
556
558
|
"export": true,
|
|
557
559
|
"const": true,
|
|
558
560
|
name: "isDevelopment",
|
|
559
|
-
doc: "Detect if the application is running in
|
|
561
|
+
doc: "Detect if the application is running in `\"development\"` mode",
|
|
560
562
|
initializer: __alloy_js_core.code`["dev", "development"].includes(mode.toLowerCase()); `
|
|
561
563
|
}),
|
|
562
564
|
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
@@ -565,7 +567,7 @@ function EnvBuiltin(props) {
|
|
|
565
567
|
"export": true,
|
|
566
568
|
"const": true,
|
|
567
569
|
name: "isDebug",
|
|
568
|
-
doc: "Detect if the application is
|
|
570
|
+
doc: "Detect if the application is currently being debugged",
|
|
569
571
|
initializer: __alloy_js_core.code`Boolean(isDevelopment && env.DEBUG); `
|
|
570
572
|
}),
|
|
571
573
|
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
package/dist/components/env.mjs
CHANGED
|
@@ -218,14 +218,14 @@ function EnvBuiltin(props) {
|
|
|
218
218
|
}, rest, {
|
|
219
219
|
get imports() {
|
|
220
220
|
return defu({ "@powerlines/deepkit/vendor/type": [
|
|
221
|
-
"Type",
|
|
222
221
|
"stringify",
|
|
223
222
|
"serializer",
|
|
224
223
|
"serializeFunction",
|
|
225
224
|
"deserializeFunction",
|
|
226
225
|
"ReflectionKind",
|
|
227
|
-
"TemplateState",
|
|
228
226
|
"Serializer",
|
|
227
|
+
"TemplateState",
|
|
228
|
+
"Type",
|
|
229
229
|
"TypeProperty",
|
|
230
230
|
"TypePropertySignature"
|
|
231
231
|
] }, rest.imports ?? {});
|
|
@@ -257,7 +257,8 @@ function EnvBuiltin(props) {
|
|
|
257
257
|
defaultValue,
|
|
258
258
|
reflection: envInstance,
|
|
259
259
|
"export": true,
|
|
260
|
-
"const": true
|
|
260
|
+
"const": true,
|
|
261
|
+
doc: "The initial environment configuration object values for the runtime."
|
|
261
262
|
}),
|
|
262
263
|
createIntrinsic("hbr", {}),
|
|
263
264
|
createIntrinsic("hbr", {}),
|
|
@@ -280,6 +281,7 @@ function EnvBuiltin(props) {
|
|
|
280
281
|
return createComponent(ClassMethod, {
|
|
281
282
|
name: "constructor",
|
|
282
283
|
"public": true,
|
|
284
|
+
doc: "Initializes a new instance of the `EnvSerializer` class.",
|
|
283
285
|
children: code`
|
|
284
286
|
super("env");
|
|
285
287
|
|
|
@@ -324,7 +326,7 @@ function EnvBuiltin(props) {
|
|
|
324
326
|
heading: "Serialize a environment configuration object to JSON data objects (not a JSON string).",
|
|
325
327
|
get children() {
|
|
326
328
|
return [
|
|
327
|
-
createComponent(TSDocRemarks, { children: `The resulting JSON object can be stringified using JSON.stringify()
|
|
329
|
+
createComponent(TSDocRemarks, { children: `The resulting JSON object can be stringified using \`JSON.stringify()\`.` }),
|
|
328
330
|
createComponent(TSDocExample, { children: `const json = serializeEnv(env);` }),
|
|
329
331
|
createComponent(TSDocThrows, { children: `ValidationError when serialization or validation fails.` })
|
|
330
332
|
];
|
|
@@ -457,7 +459,7 @@ function EnvBuiltin(props) {
|
|
|
457
459
|
"export": true,
|
|
458
460
|
"const": true,
|
|
459
461
|
name: "isCI",
|
|
460
|
-
doc: "Detect if the application is running in a CI environment.",
|
|
462
|
+
doc: "Detect if the application is running in a continuous integration (CI) environment.",
|
|
461
463
|
initializer: code`Boolean(
|
|
462
464
|
env.CI ||
|
|
463
465
|
env.RUN_ID ||
|
|
@@ -537,7 +539,7 @@ function EnvBuiltin(props) {
|
|
|
537
539
|
"export": true,
|
|
538
540
|
"const": true,
|
|
539
541
|
name: "isProduction",
|
|
540
|
-
doc: "Detect if the application is running in
|
|
542
|
+
doc: "Detect if the application is running in `\"production\"` mode",
|
|
541
543
|
initializer: code`["prd", "prod", "production"].includes(mode.toLowerCase()); `
|
|
542
544
|
}),
|
|
543
545
|
createIntrinsic("hbr", {}),
|
|
@@ -546,7 +548,7 @@ function EnvBuiltin(props) {
|
|
|
546
548
|
"export": true,
|
|
547
549
|
"const": true,
|
|
548
550
|
name: "isTest",
|
|
549
|
-
doc: "Detect if the application is running in
|
|
551
|
+
doc: "Detect if the application is running in `\"test\"` mode",
|
|
550
552
|
initializer: code`["tst", "test", "testing", "stg", "stage", "staging"].includes(mode.toLowerCase()) || env.TEST; `
|
|
551
553
|
}),
|
|
552
554
|
createIntrinsic("hbr", {}),
|
|
@@ -555,7 +557,7 @@ function EnvBuiltin(props) {
|
|
|
555
557
|
"export": true,
|
|
556
558
|
"const": true,
|
|
557
559
|
name: "isDevelopment",
|
|
558
|
-
doc: "Detect if the application is running in
|
|
560
|
+
doc: "Detect if the application is running in `\"development\"` mode",
|
|
559
561
|
initializer: code`["dev", "development"].includes(mode.toLowerCase()); `
|
|
560
562
|
}),
|
|
561
563
|
createIntrinsic("hbr", {}),
|
|
@@ -564,7 +566,7 @@ function EnvBuiltin(props) {
|
|
|
564
566
|
"export": true,
|
|
565
567
|
"const": true,
|
|
566
568
|
name: "isDebug",
|
|
567
|
-
doc: "Detect if the application is
|
|
569
|
+
doc: "Detect if the application is currently being debugged",
|
|
568
570
|
initializer: code`Boolean(isDevelopment && env.DEBUG); `
|
|
569
571
|
}),
|
|
570
572
|
createIntrinsic("hbr", {}),
|
package/dist/index.cjs
CHANGED
|
@@ -144,11 +144,11 @@ const plugin = (options = {}) => {
|
|
|
144
144
|
order: "post",
|
|
145
145
|
async handler() {
|
|
146
146
|
if (this.env.used.env.getProperties().length > 0) {
|
|
147
|
-
this.
|
|
147
|
+
this.trace(`Persisting used environment configuration reflections to ${require_helpers_persistence.getEnvReflectionsPath(this, "env")}.`);
|
|
148
148
|
await require_helpers_persistence.writeEnvReflection(this, this.env.used.env, "env");
|
|
149
149
|
}
|
|
150
150
|
if (this.env.used.secrets.getProperties().length > 0) {
|
|
151
|
-
this.
|
|
151
|
+
this.trace(`Persisting used secret configuration reflections to ${require_helpers_persistence.getEnvReflectionsPath(this, "secrets")}.`);
|
|
152
152
|
await require_helpers_persistence.writeEnvReflection(this, this.env.used.secrets, "secrets");
|
|
153
153
|
}
|
|
154
154
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -139,11 +139,11 @@ const plugin = (options = {}) => {
|
|
|
139
139
|
order: "post",
|
|
140
140
|
async handler() {
|
|
141
141
|
if (this.env.used.env.getProperties().length > 0) {
|
|
142
|
-
this.
|
|
142
|
+
this.trace(`Persisting used environment configuration reflections to ${getEnvReflectionsPath(this, "env")}.`);
|
|
143
143
|
await writeEnvReflection(this, this.env.used.env, "env");
|
|
144
144
|
}
|
|
145
145
|
if (this.env.used.secrets.getProperties().length > 0) {
|
|
146
|
-
this.
|
|
146
|
+
this.trace(`Persisting used secret configuration reflections to ${getEnvReflectionsPath(this, "secrets")}.`);
|
|
147
147
|
await writeEnvReflection(this, this.env.used.secrets, "secrets");
|
|
148
148
|
}
|
|
149
149
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-env",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.119",
|
|
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": {
|
|
@@ -201,10 +201,10 @@
|
|
|
201
201
|
"@alloy-js/typescript": "^0.22.0",
|
|
202
202
|
"@babel/core": "^7.28.6",
|
|
203
203
|
"@babel/types": "^7.28.6",
|
|
204
|
-
"@powerlines/plugin-alloy": "^0.18.
|
|
205
|
-
"@powerlines/plugin-automd": "^0.1.
|
|
206
|
-
"@powerlines/plugin-babel": "^0.12.
|
|
207
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
204
|
+
"@powerlines/plugin-alloy": "^0.18.111",
|
|
205
|
+
"@powerlines/plugin-automd": "^0.1.221",
|
|
206
|
+
"@powerlines/plugin-babel": "^0.12.230",
|
|
207
|
+
"@powerlines/plugin-plugin": "^0.12.172",
|
|
208
208
|
"@storm-software/config-tools": "^1.189.0",
|
|
209
209
|
"@stryke/capnp": "^0.12.61",
|
|
210
210
|
"@stryke/env": "^0.20.53",
|
|
@@ -214,14 +214,14 @@
|
|
|
214
214
|
"@stryke/type-checks": "^0.5.20",
|
|
215
215
|
"@stryke/types": "^0.10.34",
|
|
216
216
|
"automd": "^0.4.2",
|
|
217
|
-
"powerlines": "^0.37.
|
|
217
|
+
"powerlines": "^0.37.94"
|
|
218
218
|
},
|
|
219
219
|
"devDependencies": {
|
|
220
|
-
"@powerlines/deepkit": "^0.6.
|
|
221
|
-
"@powerlines/plugin-deepkit": "^0.11.
|
|
220
|
+
"@powerlines/deepkit": "^0.6.4",
|
|
221
|
+
"@powerlines/plugin-deepkit": "^0.11.100",
|
|
222
222
|
"@types/node": "^24.10.9",
|
|
223
223
|
"vite": "8.0.0-beta.2"
|
|
224
224
|
},
|
|
225
225
|
"publishConfig": { "access": "public" },
|
|
226
|
-
"gitHead": "
|
|
226
|
+
"gitHead": "e15a429ae1117158920d049de10328041eaf8895"
|
|
227
227
|
}
|