@objectstack/service-settings 7.1.0 → 7.2.1
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/index.cjs +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/dist/index.cjs
CHANGED
|
@@ -631,14 +631,16 @@ function coerceEnvValue(raw, hint) {
|
|
|
631
631
|
}
|
|
632
632
|
|
|
633
633
|
// src/in-memory-crypto-provider.ts
|
|
634
|
+
var import_types = require("@objectstack/types");
|
|
634
635
|
var import_node_crypto = require("crypto");
|
|
635
636
|
var import_node_fs = require("fs");
|
|
636
637
|
var import_node_os = require("os");
|
|
637
638
|
var import_node_path = require("path");
|
|
638
|
-
var DEV_KEY_ENV = "
|
|
639
|
+
var DEV_KEY_ENV = "OS_DEV_CRYPTO_KEY";
|
|
640
|
+
var DEV_KEY_LEGACY_ENV = "OBJECTSTACK_DEV_CRYPTO_KEY";
|
|
639
641
|
var devKeyFallbackPath = () => {
|
|
640
642
|
const proc = globalThis?.process;
|
|
641
|
-
const home =
|
|
643
|
+
const home = (0, import_types.readEnvWithDeprecation)("OS_HOME", "OBJECTSTACK_HOME") || (proc?.env?.HOME ? (0, import_node_path.join)(proc.env.HOME, ".objectstack") : void 0) || (0, import_node_path.join)((0, import_node_os.homedir)(), ".objectstack");
|
|
642
644
|
return (0, import_node_path.join)(home, "dev-crypto-key");
|
|
643
645
|
};
|
|
644
646
|
var loadOrCreateDevKey = () => {
|
|
@@ -700,7 +702,7 @@ var InMemoryCryptoProvider = class {
|
|
|
700
702
|
this.key = opts.key;
|
|
701
703
|
} else {
|
|
702
704
|
const fromEnv = parseDevKey(
|
|
703
|
-
|
|
705
|
+
(0, import_types.readEnvWithDeprecation)(DEV_KEY_ENV, DEV_KEY_LEGACY_ENV)
|
|
704
706
|
);
|
|
705
707
|
if (fromEnv) {
|
|
706
708
|
this.key = fromEnv;
|
|
@@ -894,7 +896,7 @@ var settingsPluginManifestHeader = {
|
|
|
894
896
|
namespace: "sys",
|
|
895
897
|
version: SETTINGS_PLUGIN_VERSION,
|
|
896
898
|
type: "plugin",
|
|
897
|
-
scope: "
|
|
899
|
+
scope: "system",
|
|
898
900
|
name: "Settings Service",
|
|
899
901
|
description: "Generic settings registry + K/V resolver with Env > Tenant > User > Default precedence. ADR-0007."
|
|
900
902
|
};
|