@objectstack/core 1.0.5 → 1.0.7

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.7 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
+ ESM dist/index.js 127.94 KB
14
+ ESM dist/index.js.map 268.47 KB
15
+ ESM ⚡️ Build success in 90ms
16
+ CJS dist/index.cjs 130.56 KB
17
+ CJS dist/index.cjs.map 269.71 KB
18
+ CJS ⚡️ Build success in 90ms
55
19
  DTS Build start
56
- DTS ⚡️ Build success in 3954ms
57
- DTS dist/index.d.ts 52.30 KB
58
- DTS dist/index.d.cts 52.30 KB
20
+ DTS ⚡️ Build success in 3611ms
21
+ DTS dist/index.d.ts 52.43 KB
22
+ DTS dist/index.d.cts 52.43 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @objectstack/core
2
2
 
3
+ ## 1.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - @objectstack/spec@1.0.7
8
+
9
+ ## 1.0.6
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [a7f7b9d]
14
+ - @objectstack/spec@1.0.6
15
+
3
16
  ## 1.0.5
4
17
 
5
18
  ### 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 = {
@@ -2011,6 +2021,7 @@ function createApiRegistryPlugin(config = {}) {
2011
2021
  } = config;
2012
2022
  return {
2013
2023
  name: "com.objectstack.core.api-registry",
2024
+ type: "standard",
2014
2025
  version: "1.0.0",
2015
2026
  init: async (ctx) => {
2016
2027
  const registry = new ApiRegistry(
@@ -2273,12 +2284,6 @@ var HttpTestAdapter = class {
2273
2284
 
2274
2285
  // src/security/plugin-signature-verifier.ts
2275
2286
  var cryptoModule = null;
2276
- if (typeof globalThis.window === "undefined") {
2277
- try {
2278
- cryptoModule = eval('require("crypto")');
2279
- } catch {
2280
- }
2281
- }
2282
2287
  var PluginSignatureVerifier = class {
2283
2288
  constructor(config, logger) {
2284
2289
  this.config = config;
@@ -2434,7 +2439,13 @@ var PluginSignatureVerifier = class {
2434
2439
  }
2435
2440
  return this.verifyCryptoSignatureNode(data, signature, publicKey);
2436
2441
  }
2437
- verifyCryptoSignatureNode(data, signature, publicKey) {
2442
+ async verifyCryptoSignatureNode(data, signature, publicKey) {
2443
+ if (!cryptoModule) {
2444
+ try {
2445
+ cryptoModule = await import("crypto");
2446
+ } catch (e) {
2447
+ }
2448
+ }
2438
2449
  if (!cryptoModule) {
2439
2450
  this.logger.error("Crypto module not available for signature verification");
2440
2451
  return false;