@powerlines/plugin-env 0.16.354 → 0.16.356
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/helpers/schema.cjs
CHANGED
|
@@ -2,6 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_types_plugin = require('../types/plugin.cjs');
|
|
3
3
|
const require_helpers_load = require('./load.cjs');
|
|
4
4
|
let _power_plant_schema = require("@power-plant/schema");
|
|
5
|
+
let _powerlines_plugin_power_plant_helpers = require("@powerlines/plugin-power-plant/helpers");
|
|
5
6
|
let _stryke_path_join = require("@stryke/path/join");
|
|
6
7
|
let _stryke_type_checks_is_set_array = require("@stryke/type-checks/is-set-array");
|
|
7
8
|
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
@@ -136,12 +137,12 @@ async function extractEnv(context) {
|
|
|
136
137
|
context.env ??= {};
|
|
137
138
|
context.env.parsed ??= {};
|
|
138
139
|
context.env.injected ??= [];
|
|
139
|
-
context.env.config = await (0,
|
|
140
|
+
context.env.config = await (0, _powerlines_plugin_power_plant_helpers.extract)(context, context.config.env.config);
|
|
140
141
|
context.env.config.active = await readActive(context, "config");
|
|
141
|
-
if ((0, _stryke_type_checks_is_set_string.isSetString)(context.config.env.config) && new RegExp(`${defaultConfig.file}[:#;@]?${defaultConfig.export}`).test(context.config.env.config) === false || (0, _stryke_type_checks_is_set_object.isSetObject)(context.config.env.config) && (context.config.env.config.file !== defaultConfig.file || context.config.env.config.export !== defaultConfig.export)) context.env.config.schema = (0, _power_plant_schema.merge)(await (0,
|
|
142
|
-
context.env.secrets = await (0,
|
|
142
|
+
if ((0, _stryke_type_checks_is_set_string.isSetString)(context.config.env.config) && new RegExp(`${defaultConfig.file}[:#;@]?${defaultConfig.export}`).test(context.config.env.config) === false || (0, _stryke_type_checks_is_set_object.isSetObject)(context.config.env.config) && (context.config.env.config.file !== defaultConfig.file || context.config.env.config.export !== defaultConfig.export)) context.env.config.schema = (0, _power_plant_schema.merge)(await (0, _powerlines_plugin_power_plant_helpers.extract)(context, defaultConfig), context.env.config);
|
|
143
|
+
context.env.secrets = await (0, _powerlines_plugin_power_plant_helpers.extract)(context, context.config.env.secrets);
|
|
143
144
|
context.env.secrets.active = await readActive(context, "secrets");
|
|
144
|
-
if ((0, _stryke_type_checks_is_set_string.isSetString)(context.config.env.secrets) && new RegExp(`${defaultSecrets.file}[:#;@]?${defaultSecrets.export}`).test(context.config.env.secrets) === false || (0, _stryke_type_checks_is_set_object.isSetObject)(context.config.env.secrets) && (context.config.env.secrets.file !== defaultSecrets.file || context.config.env.secrets.export !== defaultSecrets.export)) context.env.secrets.schema = (0, _power_plant_schema.merge)(await (0,
|
|
145
|
+
if ((0, _stryke_type_checks_is_set_string.isSetString)(context.config.env.secrets) && new RegExp(`${defaultSecrets.file}[:#;@]?${defaultSecrets.export}`).test(context.config.env.secrets) === false || (0, _stryke_type_checks_is_set_object.isSetObject)(context.config.env.secrets) && (context.config.env.secrets.file !== defaultSecrets.file || context.config.env.secrets.export !== defaultSecrets.export)) context.env.secrets.schema = (0, _power_plant_schema.merge)(await (0, _powerlines_plugin_power_plant_helpers.extract)(context, defaultSecrets), context.env.secrets);
|
|
145
146
|
const properties = (0, _power_plant_schema.getProperties)(context.env.config);
|
|
146
147
|
const describeVariant = __assignType((variant) => {
|
|
147
148
|
switch (variant) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.cts","names":[],"sources":["../../src/helpers/schema.ts"],"mappings":";;;;;;;;;;iBA0CsB,uBACpB,iBAAiB,mBACjB,SAAS,WAAW;;;;;;;iBAiBA,iBAAiB,iBAAiB,mBACtD,SAAS,WACR,QAAQ;;;;;;iBAYW,kBAAkB,iBAAiB,mBACvD,SAAS,WACR,QAAQ;;;;;;;iBAaK,kBAAkB,iBAAiB,kBACjD,SAAS;iBAKK,iBAAiB,iBAAiB,kBAChD,SAAS,UACT;;;;;;;;;;iBA+CoB,WAAW,iBAAiB,kBAChD,SAAS,WACR;;;;;;;
|
|
1
|
+
{"version":3,"file":"schema.d.cts","names":[],"sources":["../../src/helpers/schema.ts"],"mappings":";;;;;;;;;;iBA0CsB,uBACpB,iBAAiB,mBACjB,SAAS,WAAW;;;;;;;iBAiBA,iBAAiB,iBAAiB,mBACtD,SAAS,WACR,QAAQ;;;;;;iBAYW,kBAAkB,iBAAiB,mBACvD,SAAS,WACR,QAAQ;;;;;;;iBAaK,kBAAkB,iBAAiB,kBACjD,SAAS;iBAKK,iBAAiB,iBAAiB,kBAChD,SAAS,UACT;;;;;;;;;;iBA+CoB,WAAW,iBAAiB,kBAChD,SAAS,WACR;;;;;;;iBAmNmB,SAAS,iBAAiB,kBAC9C,SAAS,WACR"}
|
package/dist/helpers/schema.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __ΩEnvSchema } from "../types/plugin.mjs";
|
|
2
2
|
import { loadEnv } from "./load.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { getProperties, getPropertiesList, isSchema, isSchemaObject, merge } from "@power-plant/schema";
|
|
4
|
+
import { extract } from "@powerlines/plugin-power-plant/helpers";
|
|
4
5
|
import { joinPaths } from "@stryke/path/join";
|
|
5
6
|
import { isSetArray } from "@stryke/type-checks/is-set-array";
|
|
6
7
|
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
@@ -135,12 +136,12 @@ async function extractEnv(context) {
|
|
|
135
136
|
context.env ??= {};
|
|
136
137
|
context.env.parsed ??= {};
|
|
137
138
|
context.env.injected ??= [];
|
|
138
|
-
context.env.config = await extract(context.config.env.config);
|
|
139
|
+
context.env.config = await extract(context, context.config.env.config);
|
|
139
140
|
context.env.config.active = await readActive(context, "config");
|
|
140
|
-
if (isSetString(context.config.env.config) && new RegExp(`${defaultConfig.file}[:#;@]?${defaultConfig.export}`).test(context.config.env.config) === false || isSetObject(context.config.env.config) && (context.config.env.config.file !== defaultConfig.file || context.config.env.config.export !== defaultConfig.export)) context.env.config.schema = merge(await extract(defaultConfig), context.env.config);
|
|
141
|
-
context.env.secrets = await extract(context.config.env.secrets);
|
|
141
|
+
if (isSetString(context.config.env.config) && new RegExp(`${defaultConfig.file}[:#;@]?${defaultConfig.export}`).test(context.config.env.config) === false || isSetObject(context.config.env.config) && (context.config.env.config.file !== defaultConfig.file || context.config.env.config.export !== defaultConfig.export)) context.env.config.schema = merge(await extract(context, defaultConfig), context.env.config);
|
|
142
|
+
context.env.secrets = await extract(context, context.config.env.secrets);
|
|
142
143
|
context.env.secrets.active = await readActive(context, "secrets");
|
|
143
|
-
if (isSetString(context.config.env.secrets) && new RegExp(`${defaultSecrets.file}[:#;@]?${defaultSecrets.export}`).test(context.config.env.secrets) === false || isSetObject(context.config.env.secrets) && (context.config.env.secrets.file !== defaultSecrets.file || context.config.env.secrets.export !== defaultSecrets.export)) context.env.secrets.schema = merge(await extract(defaultSecrets), context.env.secrets);
|
|
144
|
+
if (isSetString(context.config.env.secrets) && new RegExp(`${defaultSecrets.file}[:#;@]?${defaultSecrets.export}`).test(context.config.env.secrets) === false || isSetObject(context.config.env.secrets) && (context.config.env.secrets.file !== defaultSecrets.file || context.config.env.secrets.export !== defaultSecrets.export)) context.env.secrets.schema = merge(await extract(context, defaultSecrets), context.env.secrets);
|
|
144
145
|
const properties = getProperties(context.env.config);
|
|
145
146
|
const describeVariant = __assignType((variant) => {
|
|
146
147
|
switch (variant) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-env",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.356",
|
|
4
4
|
"private": false,
|
|
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
|
"keywords": ["dotenv", "powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -250,13 +250,14 @@
|
|
|
250
250
|
"@alloy-js/typescript": "^0.24.0",
|
|
251
251
|
"@babel/core": "^8.0.1",
|
|
252
252
|
"@babel/types": "^8.0.4",
|
|
253
|
-
"@power-plant/alloy-js": "^0.0.
|
|
254
|
-
"@power-plant/schema": "^0.0.
|
|
255
|
-
"@powerlines/core": "^0.48.
|
|
256
|
-
"@powerlines/plugin-alloy": "^0.26.
|
|
257
|
-
"@powerlines/plugin-automd": "^0.1.
|
|
258
|
-
"@powerlines/plugin-babel": "^0.13.
|
|
259
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
253
|
+
"@power-plant/alloy-js": "^0.0.26",
|
|
254
|
+
"@power-plant/schema": "^0.0.28",
|
|
255
|
+
"@powerlines/core": "^0.48.73",
|
|
256
|
+
"@powerlines/plugin-alloy": "^0.26.245",
|
|
257
|
+
"@powerlines/plugin-automd": "^0.1.613",
|
|
258
|
+
"@powerlines/plugin-babel": "^0.13.148",
|
|
259
|
+
"@powerlines/plugin-plugin": "^0.12.564",
|
|
260
|
+
"@powerlines/plugin-power-plant": "^0.1.8",
|
|
260
261
|
"@storm-software/config-tools": "^1.190.109",
|
|
261
262
|
"@stryke/capnp": "^0.12.123",
|
|
262
263
|
"@stryke/convert": "^0.7.27",
|
|
@@ -271,9 +272,9 @@
|
|
|
271
272
|
"automd": "^0.4.3",
|
|
272
273
|
"c12": "^3.3.4",
|
|
273
274
|
"defu": "^6.1.7",
|
|
274
|
-
"powerlines": "^0.47.
|
|
275
|
+
"powerlines": "^0.47.152"
|
|
275
276
|
},
|
|
276
277
|
"devDependencies": { "@types/node": "^25.9.5", "vite": "^8.1.5" },
|
|
277
278
|
"publishConfig": { "access": "public" },
|
|
278
|
-
"gitHead": "
|
|
279
|
+
"gitHead": "3e4e7c47c3c0e6ec6f3b7bd38dcbbde96404b3f4"
|
|
279
280
|
}
|