@metagptx/web-sdk 0.0.66 → 0.0.67-beta.1

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.
Files changed (2) hide show
  1. package/dist/plugins.js +0 -38
  2. package/package.json +2 -2
package/dist/plugins.js CHANGED
@@ -395,45 +395,7 @@ function createOverlay(err, shouldRequestChatInfo = true) {
395
395
  overlayElement = overlay;
396
396
  }
397
397
 
398
- function normalizeRuntimeError(payload) {
399
- if (!payload) {
400
- return { message: 'Unknown runtime error' };
401
- }
402
-
403
- if (payload instanceof Error) {
404
- return {
405
- message: payload.message || 'Unknown runtime error',
406
- frame: payload.stack || '',
407
- plugin: 'runtime',
408
- };
409
- }
410
-
411
- if (typeof payload === 'string') {
412
- return {
413
- message: payload,
414
- plugin: 'runtime',
415
- };
416
- }
417
-
418
- return {
419
- message: payload.message || 'Unknown runtime error',
420
- frame: payload.stack || '',
421
- plugin: payload.plugin || 'runtime',
422
- id: payload.id,
423
- loc: payload.loc,
424
- };
425
- }
426
-
427
- window.addEventListener('error', function(event) {
428
- const error = event.error || new Error(event.message || 'Unknown runtime error');
429
- createOverlay(normalizeRuntimeError(error));
430
- }, true);
431
-
432
- window.addEventListener('unhandledrejection', function(event) {
433
- createOverlay(normalizeRuntimeError(event.reason));
434
- });
435
398
  window.addEventListener('message', function(event) {
436
- console.log('event',event)
437
399
  const payload = event.data;
438
400
  if (!payload || payload.type !== 'chat_info' || !payload.data) {
439
401
  return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@metagptx/web-sdk",
3
3
  "type": "module",
4
- "version": "0.0.66",
4
+ "version": "0.0.67-beta.1",
5
5
  "description": "TypeScript SDK for interacting with FuncSea API",
6
6
  "author": "MetaGPTX",
7
7
  "license": "MIT",
@@ -36,7 +36,7 @@
36
36
  "test": "vitest run",
37
37
  "test:coverage": "vitest --coverage run",
38
38
  "typecheck": "tsc --noEmit",
39
- "release": "bumpp && npm publish",
39
+ "release": "bumpp && npm publish --tag beta",
40
40
  "lint": "eslint",
41
41
  "lint:fix": "eslint --fix",
42
42
  "precommit": "npm run typecheck && lint-staged && npm run test:coverage",