@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @objectstack/core@1.0.5 build /home/runner/work/spec/spec/packages/core
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
  CLI Building entry: src/index.ts
@@ -10,49 +10,13 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- [warn] ▲ [WARNING] Using direct eval with a bundler is not recommended and may cause problems [direct-eval]
14
-
15
- src/logger.ts:60:38:
16
-  60 │ const { createRequire } = eval('require("module")');
17
- ~~~~
18
-
19
- You can read more about direct eval and bundling here: https://esbuild.github.io/link/direct-eval
20
-
21
-
22
- [warn] ▲ [WARNING] Using direct eval with a bundler is not recommended and may cause problems [direct-eval]
23
-
24
- src/security/plugin-signature-verifier.ts:10:19:
25
-  10 │ cryptoModule = eval('require("crypto")');
26
- ╵ ~~~~
27
-
28
- You can read more about direct eval and bundling here: https://esbuild.github.io/link/direct-eval
29
-
30
-
31
- [warn] ▲ [WARNING] Using direct eval with a bundler is not recommended and may cause problems [direct-eval]
32
-
33
- src/logger.ts:60:38:
34
-  60 │ const { createRequire } = eval('require("module")');
35
- ╵ ~~~~
36
-
37
- You can read more about direct eval and bundling here: https://esbuild.github.io/link/direct-eval
38
-
39
-
40
- [warn] ▲ [WARNING] Using direct eval with a bundler is not recommended and may cause problems [direct-eval]
41
-
42
- src/security/plugin-signature-verifier.ts:10:19:
43
-  10 │ cryptoModule = eval('require("crypto")');
44
- ╵ ~~~~
45
-
46
- You can read more about direct eval and bundling here: https://esbuild.github.io/link/direct-eval
47
-
48
-
49
- CJS dist/index.cjs 129.95 KB
50
- CJS dist/index.cjs.map 269.80 KB
51
- CJS ⚡️ Build success in 114ms
52
- ESM dist/index.js 127.91 KB
53
- ESM dist/index.js.map 268.56 KB
54
- ESM ⚡️ Build success in 114ms
13
+ CJS dist/index.cjs 130.54 KB
14
+ CJS dist/index.cjs.map 269.68 KB
15
+ CJS ⚡️ Build success in 84ms
16
+ ESM dist/index.js 127.92 KB
17
+ ESM dist/index.js.map 268.43 KB
18
+ ESM ⚡️ Build success in 86ms
55
19
  DTS Build start
56
- DTS ⚡️ Build success in 3954ms
20
+ DTS ⚡️ Build success in 3937ms
57
21
  DTS dist/index.d.ts 52.30 KB
58
22
  DTS dist/index.d.cts 52.30 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @objectstack/core
2
2
 
3
+ ## 1.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [a7f7b9d]
8
+ - @objectstack/spec@1.0.6
9
+
3
10
  ## 1.0.5
4
11
 
5
12
  ### Patch Changes
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 } = eval('require("module")');
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;