@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/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @objectstack/core@1.0.
|
|
2
|
+
> @objectstack/core@1.0.6 build /home/runner/work/spec/spec/packages/core
|
|
3
3
|
> tsup --config ../../tsup.config.ts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -10,49 +10,13 @@
|
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
|
-
[
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
[
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
You can read more about direct eval and bundling here: [4mhttps://esbuild.github.io/link/direct-eval[0m
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
[warn] [33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mUsing direct eval with a bundler is not recommended and may cause problems[0m [direct-eval]
|
|
23
|
-
|
|
24
|
-
src/security/plugin-signature-verifier.ts:10:19:
|
|
25
|
-
[37m 10 │ cryptoModule = [32meval[37m('require("crypto")');
|
|
26
|
-
╵ [32m~~~~[0m
|
|
27
|
-
|
|
28
|
-
You can read more about direct eval and bundling here: [4mhttps://esbuild.github.io/link/direct-eval[0m
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
[warn] [33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mUsing direct eval with a bundler is not recommended and may cause problems[0m [direct-eval]
|
|
32
|
-
|
|
33
|
-
src/logger.ts:60:38:
|
|
34
|
-
[37m 60 │ const { createRequire } = [32meval[37m('require("module")');
|
|
35
|
-
╵ [32m~~~~[0m
|
|
36
|
-
|
|
37
|
-
You can read more about direct eval and bundling here: [4mhttps://esbuild.github.io/link/direct-eval[0m
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
[warn] [33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mUsing direct eval with a bundler is not recommended and may cause problems[0m [direct-eval]
|
|
41
|
-
|
|
42
|
-
src/security/plugin-signature-verifier.ts:10:19:
|
|
43
|
-
[37m 10 │ cryptoModule = [32meval[37m('require("crypto")');
|
|
44
|
-
╵ [32m~~~~[0m
|
|
45
|
-
|
|
46
|
-
You can read more about direct eval and bundling here: [4mhttps://esbuild.github.io/link/direct-eval[0m
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
[32mCJS[39m [1mdist/index.cjs [22m[32m129.95 KB[39m
|
|
50
|
-
[32mCJS[39m [1mdist/index.cjs.map [22m[32m269.80 KB[39m
|
|
51
|
-
[32mCJS[39m ⚡️ Build success in 114ms
|
|
52
|
-
[32mESM[39m [1mdist/index.js [22m[32m127.91 KB[39m
|
|
53
|
-
[32mESM[39m [1mdist/index.js.map [22m[32m268.56 KB[39m
|
|
54
|
-
[32mESM[39m ⚡️ Build success in 114ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m130.54 KB[39m
|
|
14
|
+
[32mCJS[39m [1mdist/index.cjs.map [22m[32m269.68 KB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 84ms
|
|
16
|
+
[32mESM[39m [1mdist/index.js [22m[32m127.92 KB[39m
|
|
17
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m268.43 KB[39m
|
|
18
|
+
[32mESM[39m ⚡️ Build success in 86ms
|
|
55
19
|
[34mDTS[39m Build start
|
|
56
|
-
[32mDTS[39m ⚡️ Build success in
|
|
20
|
+
[32mDTS[39m ⚡️ Build success in 3937ms
|
|
57
21
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m52.30 KB[39m
|
|
58
22
|
[32mDTS[39m [1mdist/index.d.cts [22m[32m52.30 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// src/index.ts
|
|
@@ -297,10 +307,10 @@ var ObjectLogger = class _ObjectLogger {
|
|
|
297
307
|
/**
|
|
298
308
|
* Initialize Pino logger for Node.js
|
|
299
309
|
*/
|
|
300
|
-
initPinoLogger() {
|
|
310
|
+
async initPinoLogger() {
|
|
301
311
|
if (!this.isNode) return;
|
|
302
312
|
try {
|
|
303
|
-
const { createRequire } =
|
|
313
|
+
const { createRequire } = await import("module");
|
|
304
314
|
this.require = createRequire(import_meta.url);
|
|
305
315
|
const pino = this.require("pino");
|
|
306
316
|
const pinoOptions = {
|
|
@@ -2273,12 +2283,6 @@ var HttpTestAdapter = class {
|
|
|
2273
2283
|
|
|
2274
2284
|
// src/security/plugin-signature-verifier.ts
|
|
2275
2285
|
var cryptoModule = null;
|
|
2276
|
-
if (typeof globalThis.window === "undefined") {
|
|
2277
|
-
try {
|
|
2278
|
-
cryptoModule = eval('require("crypto")');
|
|
2279
|
-
} catch {
|
|
2280
|
-
}
|
|
2281
|
-
}
|
|
2282
2286
|
var PluginSignatureVerifier = class {
|
|
2283
2287
|
constructor(config, logger) {
|
|
2284
2288
|
this.config = config;
|
|
@@ -2434,7 +2438,13 @@ var PluginSignatureVerifier = class {
|
|
|
2434
2438
|
}
|
|
2435
2439
|
return this.verifyCryptoSignatureNode(data, signature, publicKey);
|
|
2436
2440
|
}
|
|
2437
|
-
verifyCryptoSignatureNode(data, signature, publicKey) {
|
|
2441
|
+
async verifyCryptoSignatureNode(data, signature, publicKey) {
|
|
2442
|
+
if (!cryptoModule) {
|
|
2443
|
+
try {
|
|
2444
|
+
cryptoModule = await import("crypto");
|
|
2445
|
+
} catch (e) {
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2438
2448
|
if (!cryptoModule) {
|
|
2439
2449
|
this.logger.error("Crypto module not available for signature verification");
|
|
2440
2450
|
return false;
|