@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.
package/dist/index.d.cts CHANGED
@@ -340,6 +340,11 @@ interface Plugin {
340
340
  * Plugin version
341
341
  */
342
342
  version?: string;
343
+ /**
344
+ * Plugin type (standard, ui, driver, server, app, theme, agent)
345
+ * @default 'standard'
346
+ */
347
+ type?: string;
343
348
  /**
344
349
  * List of other plugin names that this plugin depends on.
345
350
  * The kernel ensures these plugins are initialized before this one.
package/dist/index.d.ts CHANGED
@@ -340,6 +340,11 @@ interface Plugin {
340
340
  * Plugin version
341
341
  */
342
342
  version?: string;
343
+ /**
344
+ * Plugin type (standard, ui, driver, server, app, theme, agent)
345
+ * @default 'standard'
346
+ */
347
+ type?: string;
343
348
  /**
344
349
  * List of other plugin names that this plugin depends on.
345
350
  * The kernel ensures these plugins are initialized before this one.
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 } = eval('require("module")');
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 = {
@@ -1964,6 +1964,7 @@ function createApiRegistryPlugin(config = {}) {
1964
1964
  } = config;
1965
1965
  return {
1966
1966
  name: "com.objectstack.core.api-registry",
1967
+ type: "standard",
1967
1968
  version: "1.0.0",
1968
1969
  init: async (ctx) => {
1969
1970
  const registry = new ApiRegistry(
@@ -2226,12 +2227,6 @@ var HttpTestAdapter = class {
2226
2227
 
2227
2228
  // src/security/plugin-signature-verifier.ts
2228
2229
  var cryptoModule = null;
2229
- if (typeof globalThis.window === "undefined") {
2230
- try {
2231
- cryptoModule = eval('require("crypto")');
2232
- } catch {
2233
- }
2234
- }
2235
2230
  var PluginSignatureVerifier = class {
2236
2231
  constructor(config, logger) {
2237
2232
  this.config = config;
@@ -2387,7 +2382,13 @@ var PluginSignatureVerifier = class {
2387
2382
  }
2388
2383
  return this.verifyCryptoSignatureNode(data, signature, publicKey);
2389
2384
  }
2390
- verifyCryptoSignatureNode(data, signature, publicKey) {
2385
+ async verifyCryptoSignatureNode(data, signature, publicKey) {
2386
+ if (!cryptoModule) {
2387
+ try {
2388
+ cryptoModule = await import("crypto");
2389
+ } catch (e) {
2390
+ }
2391
+ }
2391
2392
  if (!cryptoModule) {
2392
2393
  this.logger.error("Crypto module not available for signature verification");
2393
2394
  return false;