@powerlines/plugin-crypto 0.10.2 → 0.10.4
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 +2 -2
- package/dist/index.js +2 -2
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkFBBMZ4NC_cjs=require('./chunk-FBBMZ4NC.cjs'),utils_js=require('@noble/ciphers/utils.js'),n=require('@powerlines/plugin-env'),types$1=require('@storm-software/config-tools/types'),crypto=require('./components/crypto'),components=require('./components'),types=require('./types');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var n__default=/*#__PURE__*/_interopDefault(n);/*****************************************
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkFBBMZ4NC_cjs=require('./chunk-FBBMZ4NC.cjs'),utils_js=require('@noble/ciphers/utils.js'),n=require('@powerlines/plugin-env'),types$1=require('@storm-software/config-tools/types'),p=require('defu'),crypto=require('./components/crypto'),components=require('./components'),types=require('./types');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var n__default=/*#__PURE__*/_interopDefault(n);var p__default=/*#__PURE__*/_interopDefault(p);/*****************************************
|
|
2
2
|
*
|
|
3
3
|
* ⚡ Built by Storm Software
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
function
|
|
7
|
+
function s(t={}){return {name:"crypto",dependsOn:[n__default.default(t.env)],config(){return {crypto:p__default.default(t,{salt:`${this.config.name||this.workspaceConfig?.name||this.packageJson?.name}-application`})}},configResolved(){this.dependencies["@noble/ciphers"]="^2.0.1",this.dependencies["@noble/hashes"]="^2.0.1",this.config.crypto.salt??=this.env.parsed.SALT,this.config.crypto.salt||(this.log(types$1.LogLevelLabel.WARN,"No salt provided to the Crypto plugin - a salt value will be generated automatically. Please note: It's highly recommended to provide a unique salt value via the `salt` plugin option or the `SALT` environment variable."),this.config.crypto.salt=utils_js.bytesToHex(utils_js.randomBytes(12))),this.config.crypto.encryptionKey??=this.env.parsed.ENCRYPTION_KEY,this.config.crypto.encryptionKey||(this.log(types$1.LogLevelLabel.WARN,"No encryption key provided to the Crypto plugin - a secure key will be generated automatically. Please note: it's highly recommended to provide a secure encryption key via the `encryptionKey` plugin option or the `ENCRYPTION_KEY` environment variable."),this.config.crypto.encryptionKey=utils_js.bytesToHex(utils_js.randomBytes(32)));},async prepare(){this.log(types$1.LogLevelLabel.TRACE,"Preparing the Crypto runtime artifacts for the Powerlines project."),await this.emitBuiltin(await Promise.resolve(crypto.cryptoModule(this)),"crypto","crypto.ts");}}}chunkFBBMZ4NC_cjs.a(s,"plugin");var P=s;exports.default=P;exports.plugin=s;Object.keys(components).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return components[k]}})});Object.keys(types).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return types[k]}})});
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {a}from'./chunk-UCUR73HG.js';import {bytesToHex,randomBytes}from'@noble/ciphers/utils.js';import n from'@powerlines/plugin-env';import {LogLevelLabel}from'@storm-software/config-tools/types';import {cryptoModule}from'./components/crypto';export*from'./components';export*from'./types';/*****************************************
|
|
1
|
+
import {a}from'./chunk-UCUR73HG.js';import {bytesToHex,randomBytes}from'@noble/ciphers/utils.js';import n from'@powerlines/plugin-env';import {LogLevelLabel}from'@storm-software/config-tools/types';import p from'defu';import {cryptoModule}from'./components/crypto';export*from'./components';export*from'./types';/*****************************************
|
|
2
2
|
*
|
|
3
3
|
* ⚡ Built by Storm Software
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
function
|
|
7
|
+
function s(t={}){return {name:"crypto",dependsOn:[n(t.env)],config(){return {crypto:p(t,{salt:`${this.config.name||this.workspaceConfig?.name||this.packageJson?.name}-application`})}},configResolved(){this.dependencies["@noble/ciphers"]="^2.0.1",this.dependencies["@noble/hashes"]="^2.0.1",this.config.crypto.salt??=this.env.parsed.SALT,this.config.crypto.salt||(this.log(LogLevelLabel.WARN,"No salt provided to the Crypto plugin - a salt value will be generated automatically. Please note: It's highly recommended to provide a unique salt value via the `salt` plugin option or the `SALT` environment variable."),this.config.crypto.salt=bytesToHex(randomBytes(12))),this.config.crypto.encryptionKey??=this.env.parsed.ENCRYPTION_KEY,this.config.crypto.encryptionKey||(this.log(LogLevelLabel.WARN,"No encryption key provided to the Crypto plugin - a secure key will be generated automatically. Please note: it's highly recommended to provide a secure encryption key via the `encryptionKey` plugin option or the `ENCRYPTION_KEY` environment variable."),this.config.crypto.encryptionKey=bytesToHex(randomBytes(32)));},async prepare(){this.log(LogLevelLabel.TRACE,"Preparing the Crypto runtime artifacts for the Powerlines project."),await this.emitBuiltin(await Promise.resolve(cryptoModule(this)),"crypto","crypto.ts");}}}a(s,"plugin");var b=s;export{b as default,s as plugin};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-crypto",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin that provides unique identifier generation capabilities at runtime by adding the `id` builtin module.",
|
|
6
6
|
"repository": {
|
|
@@ -116,18 +116,18 @@
|
|
|
116
116
|
"files": ["dist/**/*"],
|
|
117
117
|
"keywords": ["powerlines", "storm-software", "powerlines-plugin"],
|
|
118
118
|
"dependencies": {
|
|
119
|
-
"@powerlines/plugin-env": "^0.13.
|
|
119
|
+
"@powerlines/plugin-env": "^0.13.36",
|
|
120
120
|
"@storm-software/config-tools": "^1.188.48",
|
|
121
121
|
"@stryke/path": "^0.20.0",
|
|
122
122
|
"defu": "^6.1.4",
|
|
123
|
-
"powerlines": "^0.24.
|
|
123
|
+
"powerlines": "^0.24.2",
|
|
124
124
|
"@noble/ciphers": "^2.0.1"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
|
-
"@powerlines/nx": "^0.10.
|
|
127
|
+
"@powerlines/nx": "^0.10.30",
|
|
128
128
|
"@storm-software/tsup": "^0.2.46",
|
|
129
129
|
"@types/node": "^24.10.1"
|
|
130
130
|
},
|
|
131
131
|
"publishConfig": { "access": "public" },
|
|
132
|
-
"gitHead": "
|
|
132
|
+
"gitHead": "c48cb70531cf391e7bd950459d4f319f58e52f5b"
|
|
133
133
|
}
|