@objectstack/core 1.0.5 → 1.0.6
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/.turbo/turbo-build.log +8 -44
- package/CHANGELOG.md +7 -0
- package/dist/index.cjs +19 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/logger.ts +2 -2
- package/src/security/plugin-signature-verifier.ts +12 -11
package/dist/index.js
CHANGED
|
@@ -250,10 +250,10 @@ var ObjectLogger = class _ObjectLogger {
|
|
|
250
250
|
/**
|
|
251
251
|
* Initialize Pino logger for Node.js
|
|
252
252
|
*/
|
|
253
|
-
initPinoLogger() {
|
|
253
|
+
async initPinoLogger() {
|
|
254
254
|
if (!this.isNode) return;
|
|
255
255
|
try {
|
|
256
|
-
const { createRequire } =
|
|
256
|
+
const { createRequire } = await import("module");
|
|
257
257
|
this.require = createRequire(import.meta.url);
|
|
258
258
|
const pino = this.require("pino");
|
|
259
259
|
const pinoOptions = {
|
|
@@ -2226,12 +2226,6 @@ var HttpTestAdapter = class {
|
|
|
2226
2226
|
|
|
2227
2227
|
// src/security/plugin-signature-verifier.ts
|
|
2228
2228
|
var cryptoModule = null;
|
|
2229
|
-
if (typeof globalThis.window === "undefined") {
|
|
2230
|
-
try {
|
|
2231
|
-
cryptoModule = eval('require("crypto")');
|
|
2232
|
-
} catch {
|
|
2233
|
-
}
|
|
2234
|
-
}
|
|
2235
2229
|
var PluginSignatureVerifier = class {
|
|
2236
2230
|
constructor(config, logger) {
|
|
2237
2231
|
this.config = config;
|
|
@@ -2387,7 +2381,13 @@ var PluginSignatureVerifier = class {
|
|
|
2387
2381
|
}
|
|
2388
2382
|
return this.verifyCryptoSignatureNode(data, signature, publicKey);
|
|
2389
2383
|
}
|
|
2390
|
-
verifyCryptoSignatureNode(data, signature, publicKey) {
|
|
2384
|
+
async verifyCryptoSignatureNode(data, signature, publicKey) {
|
|
2385
|
+
if (!cryptoModule) {
|
|
2386
|
+
try {
|
|
2387
|
+
cryptoModule = await import("crypto");
|
|
2388
|
+
} catch (e) {
|
|
2389
|
+
}
|
|
2390
|
+
}
|
|
2391
2391
|
if (!cryptoModule) {
|
|
2392
2392
|
this.logger.error("Crypto module not available for signature verification");
|
|
2393
2393
|
return false;
|