@app-config/encryption
Advanced tools
Comparing version 2.5.2 to 2.6.0
@@ -71,3 +71,3 @@ import { join, resolve } from 'path'; | ||
logger.info('Initializing your encryption keys'); | ||
const { privateKeyArmored, publicKeyArmored, revocationCertificate } = keys ?? (await initializeKeys()); | ||
const { privateKeyArmored, publicKeyArmored, revocationCertificate } = keys !== null && keys !== void 0 ? keys : (await initializeKeys()); | ||
const prevUmask = process.umask(0o077); | ||
@@ -316,7 +316,10 @@ try { | ||
...meta, | ||
teamMembers: newTeamMembers.map((key) => ({ | ||
userId: key.getUserIds()[0], | ||
keyName: key.keyName ?? null, | ||
publicKey: key.armor(), | ||
})), | ||
teamMembers: newTeamMembers.map((key) => { | ||
var _a; | ||
return ({ | ||
userId: key.getUserIds()[0], | ||
keyName: (_a = key.keyName) !== null && _a !== void 0 ? _a : null, | ||
publicKey: key.armor(), | ||
}); | ||
}), | ||
encryptionKeys: newEncryptionKeys, | ||
@@ -369,7 +372,10 @@ })); | ||
...meta, | ||
teamMembers: newTeamMembers.map((key) => ({ | ||
userId: key.getUserIds()[0], | ||
keyName: key.keyName ?? null, | ||
publicKey: key.armor(), | ||
})), | ||
teamMembers: newTeamMembers.map((key) => { | ||
var _a; | ||
return ({ | ||
userId: key.getUserIds()[0], | ||
keyName: (_a = key.keyName) !== null && _a !== void 0 ? _a : null, | ||
publicKey: key.armor(), | ||
}); | ||
}), | ||
encryptionKeys: newEncryptionKeys, | ||
@@ -423,4 +429,4 @@ })); | ||
const writeMeta = mutate(oldMeta); | ||
const writeFilePath = filePath ?? '.app-config.meta.yml'; | ||
const writeFileType = fileType ?? FileType.YAML; | ||
const writeFilePath = filePath !== null && filePath !== void 0 ? filePath : '.app-config.meta.yml'; | ||
const writeFileType = fileType !== null && fileType !== void 0 ? fileType : FileType.YAML; | ||
logger.info(`Writing ${writeFilePath} file with new encryption properties`); | ||
@@ -427,0 +433,0 @@ await fs.writeFile(writeFilePath, stringify(writeMeta, writeFileType)); |
@@ -141,2 +141,3 @@ import https from 'https'; | ||
export async function getAgentPortOrSocket(socketOrPortOverride) { | ||
var _a, _b; | ||
if (socketOrPortOverride !== undefined) { | ||
@@ -146,6 +147,6 @@ return socketOrPortOverride; | ||
const settings = await loadSettingsLazy(); | ||
if (settings.secretAgent?.socket) { | ||
if ((_a = settings.secretAgent) === null || _a === void 0 ? void 0 : _a.socket) { | ||
return settings.secretAgent.socket; | ||
} | ||
if (settings.secretAgent?.port) { | ||
if ((_b = settings.secretAgent) === null || _b === void 0 ? void 0 : _b.port) { | ||
return settings.secretAgent.port; | ||
@@ -152,0 +153,0 @@ } |
{ | ||
"name": "@app-config/encryption", | ||
"description": "Secret value encryption for @app-config", | ||
"version": "2.5.2", | ||
"version": "2.6.0", | ||
"license": "MPL-2.0", | ||
@@ -33,9 +33,9 @@ "author": { | ||
"dependencies": { | ||
"@app-config/core": "^2.5.2", | ||
"@app-config/extension-utils": "^2.5.2", | ||
"@app-config/logging": "^2.5.2", | ||
"@app-config/meta": "^2.5.2", | ||
"@app-config/node": "^2.5.2", | ||
"@app-config/settings": "^2.5.2", | ||
"@app-config/utils": "^2.5.2", | ||
"@app-config/core": "^2.6.0", | ||
"@app-config/extension-utils": "^2.6.0", | ||
"@app-config/logging": "^2.6.0", | ||
"@app-config/meta": "^2.6.0", | ||
"@app-config/node": "^2.6.0", | ||
"@app-config/settings": "^2.6.0", | ||
"@app-config/utils": "^2.6.0", | ||
"@lcdev/ws-rpc": "0.4", | ||
@@ -51,3 +51,3 @@ "@types/openpgp": "4", | ||
"devDependencies": { | ||
"@app-config/test-utils": "^2.5.2", | ||
"@app-config/test-utils": "^2.6.0", | ||
"get-port": "5" | ||
@@ -54,0 +54,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
127839
1734
Updated@app-config/core@^2.6.0
Updated@app-config/logging@^2.6.0
Updated@app-config/meta@^2.6.0
Updated@app-config/node@^2.6.0
Updated@app-config/settings@^2.6.0
Updated@app-config/utils@^2.6.0