@dragonmastery/tamer 0.35.1 → 0.35.2

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/tamer.mjs CHANGED
@@ -7808,7 +7808,8 @@ function defaultWorkerSecretsLoadFile(workerDir, env) {
7808
7808
  }
7809
7809
  /**
7810
7810
  * When loading for a worker, only `secrets.required` names are imported.
7811
- * Returns keys to upsert; throws if the file contains undeclared names.
7811
+ * Extra keys in the file that aren't declared are logged as a warning but
7812
+ * do not block loading.
7812
7813
  */
7813
7814
  function filterSecretsLoadEntriesForWorker(fileEntries, required$1) {
7814
7815
  const requiredSet = new Set(required$1);
@@ -7816,10 +7817,11 @@ function filterSecretsLoadEntriesForWorker(fileEntries, required$1) {
7816
7817
  const entries = {};
7817
7818
  for (const [name, value] of Object.entries(fileEntries)) if (requiredSet.has(name)) entries[name] = value;
7818
7819
  else extras.push(name);
7819
- if (extras.length > 0) throw new Error(`secrets load: file contains key(s) not in worker secrets.required: ${extras.sort().join(", ")}`);
7820
+ if (extras.length > 0) console.warn(`secrets load: ignoring key(s) not in worker secrets.required: ${extras.sort().join(", ")}`);
7820
7821
  return {
7821
7822
  entries,
7822
- missing: required$1.filter((name) => !(name in fileEntries)).sort()
7823
+ missing: required$1.filter((name) => !(name in fileEntries)).sort(),
7824
+ extras
7823
7825
  };
7824
7826
  }
7825
7827
  /**