@open-mercato/starter 0.10.1-develop.8152.1.948c1eb458 → 0.10.1-develop.8159.1.71854b31a8
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/starter",
|
|
3
|
-
"version": "0.10.1-develop.
|
|
3
|
+
"version": "0.10.1-develop.8159.1.71854b31a8",
|
|
4
4
|
"description": "One-command, cross-platform bootstrap for Open Mercato dev environments: prerequisite doctor, corporate TLS trust, idempotent setup steps, and a supervised hybrid or fully containerized stack.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -278,15 +278,17 @@ test('supplied root, ambient and company key/KMS settings survive missing app en
|
|
|
278
278
|
test('supplied encryption strings round-trip through root/app dotenv without changing quotes, slashes or hash characters', async () => {
|
|
279
279
|
const { ensureEnvFiles } = await import('../env-setup.mjs')
|
|
280
280
|
const { parseEnv } = await import('node:util')
|
|
281
|
-
for (const
|
|
282
|
-
const
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
281
|
+
for (const key of ['TENANT_DATA_ENCRYPTION_KEY', 'TENANT_DATA_ENCRYPTION_FALLBACK_KEY']) {
|
|
282
|
+
for (const secret of ['fixture"key', String.raw`fixture\key`, 'fixture#key', 'fixture$key', 'fixture$&key']) {
|
|
283
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'om-key-roundtrip-'))
|
|
284
|
+
try {
|
|
285
|
+
const app = path.join(dir, 'apps', 'mercato'); fs.mkdirSync(app, { recursive: true })
|
|
286
|
+
fs.writeFileSync(path.join(app, '.env.example'), 'TENANT_DATA_ENCRYPTION_FALLBACK_KEY=public-fixture-key\nTENANT_DATA_ENCRYPTION_KEY=\n')
|
|
287
|
+
ensureEnvFiles(dir, { env: {}, extraDefaults: { [key]: secret }, log() {}, warn() {} })
|
|
288
|
+
assert.equal(parseEnv(fs.readFileSync(path.join(dir, '.env'), 'utf8'))[key], secret)
|
|
289
|
+
assert.equal(parseEnv(fs.readFileSync(path.join(app, '.env'), 'utf8'))[key], secret)
|
|
290
|
+
} finally { fs.rmSync(dir, { recursive: true, force: true }) }
|
|
291
|
+
}
|
|
290
292
|
}
|
|
291
293
|
})
|
|
292
294
|
|