@dxos/errors 0.1.18 → 0.1.19

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.
@@ -27,3 +27,4 @@ export {
27
27
  RemoteServiceConnectionTimeout,
28
28
  SystemError
29
29
  };
30
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/errors.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2021 DXOS.org\n//\n\n/**\n * NOTE: Messages should be sentences (Start with a capital letter and end with a period).\n * Errors can optionally include a JSON context object.\n */\nclass BaseError extends Error {\n constructor(readonly code: string, message?: string, readonly context?: any) {\n super(message ? `${code}: ${message}` : code.toString());\n // NOTE: Restores prototype chain (https://stackoverflow.com/a/48342359).\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\n/**\n * User facing API Errors.\n * E.g., something was misconfigured.\n */\nexport class ApiError extends BaseError {}\n\n/**\n * Internal system errors.\n * E.g., unexpected/unrecoverable runtime error.\n */\nexport class SystemError extends BaseError {}\n\nexport class InvalidConfigError extends ApiError {\n constructor(message: string, context?: any) {\n super('INVALID_CONFIG', message, context);\n }\n}\n\nexport class RemoteServiceConnectionTimeout extends ApiError {\n constructor(message?: string, context?: any) {\n super('REMOTE_SERVICE_CONNECTION_TIMEOUT', message, context);\n }\n}\n"],
5
+ "mappings": ";AAQA,IAAMA,YAAN,cAAwBC,MAAAA;EACtBC,YAAqBC,MAAcC,SAA2BC,SAAe;AAC3E,UAAMD,UAAU,GAAGD,SAASC,YAAYD,KAAKG,SAAQ,CAAE;gBADpCH;mBAAyCE;AAG5DE,WAAOC,eAAe,MAAM,WAAWC,SAAS;EAClD;AACF;AAMO,IAAMC,WAAN,cAAuBV,UAAAA;AAAW;AAMlC,IAAMW,cAAN,cAA0BX,UAAAA;AAAW;AAErC,IAAMY,qBAAN,cAAiCF,SAAAA;EACtCR,YAAYE,SAAiBC,SAAe;AAC1C,UAAM,kBAAkBD,SAASC,OAAAA;EACnC;AACF;AAEO,IAAMQ,iCAAN,cAA6CH,SAAAA;EAClDR,YAAYE,SAAkBC,SAAe;AAC3C,UAAM,qCAAqCD,SAASC,OAAAA;EACtD;AACF;",
6
+ "names": ["BaseError", "Error", "constructor", "code", "message", "context", "toString", "Object", "setPrototypeOf", "prototype", "ApiError", "SystemError", "InvalidConfigError", "RemoteServiceConnectionTimeout"]
7
+ }
@@ -1 +1 @@
1
- {"inputs":{"packages/sdk/errors/src/errors.ts":{"bytes":3850,"imports":[]},"packages/sdk/errors/src/index.ts":{"bytes":442,"imports":[{"path":"packages/sdk/errors/src/errors.ts","kind":"import-statement"}]}},"outputs":{"packages/sdk/errors/dist/lib/browser/index.mjs":{"imports":[],"exports":["ApiError","InvalidConfigError","RemoteServiceConnectionTimeout","SystemError"],"entryPoint":"packages/sdk/errors/src/index.ts","inputs":{"packages/sdk/errors/src/errors.ts":{"bytesInOutput":650},"packages/sdk/errors/src/index.ts":{"bytesInOutput":0}},"bytes":781}}}
1
+ {"inputs":{"packages/sdk/errors/src/errors.ts":{"bytes":3778,"imports":[]},"packages/sdk/errors/src/index.ts":{"bytes":370,"imports":[{"path":"packages/sdk/errors/src/errors.ts","kind":"import-statement"}]}},"outputs":{"packages/sdk/errors/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1886},"packages/sdk/errors/dist/lib/browser/index.mjs":{"imports":[],"exports":["ApiError","InvalidConfigError","RemoteServiceConnectionTimeout","SystemError"],"entryPoint":"packages/sdk/errors/src/index.ts","inputs":{"packages/sdk/errors/src/errors.ts":{"bytesInOutput":650},"packages/sdk/errors/src/index.ts":{"bytesInOutput":0}},"bytes":816}}}
@@ -57,3 +57,4 @@ var RemoteServiceConnectionTimeout = class extends ApiError {
57
57
  RemoteServiceConnectionTimeout,
58
58
  SystemError
59
59
  });
60
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/index.ts", "../../../src/errors.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2022 DXOS.org\n//\n\nexport * from './errors';\n", "//\n// Copyright 2021 DXOS.org\n//\n\n/**\n * NOTE: Messages should be sentences (Start with a capital letter and end with a period).\n * Errors can optionally include a JSON context object.\n */\nclass BaseError extends Error {\n constructor(readonly code: string, message?: string, readonly context?: any) {\n super(message ? `${code}: ${message}` : code.toString());\n // NOTE: Restores prototype chain (https://stackoverflow.com/a/48342359).\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\n/**\n * User facing API Errors.\n * E.g., something was misconfigured.\n */\nexport class ApiError extends BaseError {}\n\n/**\n * Internal system errors.\n * E.g., unexpected/unrecoverable runtime error.\n */\nexport class SystemError extends BaseError {}\n\nexport class InvalidConfigError extends ApiError {\n constructor(message: string, context?: any) {\n super('INVALID_CONFIG', message, context);\n }\n}\n\nexport class RemoteServiceConnectionTimeout extends ApiError {\n constructor(message?: string, context?: any) {\n super('REMOTE_SERVICE_CONNECTION_TIMEOUT', message, context);\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACQA,IAAMA,YAAN,cAAwBC,MAAAA;EACtBC,YAAqBC,MAAcC,SAA2BC,SAAe;AAC3E,UAAMD,UAAU,GAAGD,SAASC,YAAYD,KAAKG,SAAQ,CAAE;gBADpCH;mBAAyCE;AAG5DE,WAAOC,eAAe,MAAM,WAAWC,SAAS;EAClD;AACF;AAMO,IAAMC,WAAN,cAAuBV,UAAAA;AAAW;AAMlC,IAAMW,cAAN,cAA0BX,UAAAA;AAAW;AAErC,IAAMY,qBAAN,cAAiCF,SAAAA;EACtCR,YAAYE,SAAiBC,SAAe;AAC1C,UAAM,kBAAkBD,SAASC,OAAAA;EACnC;AACF;AAEO,IAAMQ,iCAAN,cAA6CH,SAAAA;EAClDR,YAAYE,SAAkBC,SAAe;AAC3C,UAAM,qCAAqCD,SAASC,OAAAA;EACtD;AACF;",
6
+ "names": ["BaseError", "Error", "constructor", "code", "message", "context", "toString", "Object", "setPrototypeOf", "prototype", "ApiError", "SystemError", "InvalidConfigError", "RemoteServiceConnectionTimeout"]
7
+ }
@@ -1 +1 @@
1
- {"inputs":{"packages/sdk/errors/src/errors.ts":{"bytes":3850,"imports":[]},"packages/sdk/errors/src/index.ts":{"bytes":442,"imports":[{"path":"packages/sdk/errors/src/errors.ts","kind":"import-statement"}]}},"outputs":{"packages/sdk/errors/dist/lib/node/index.cjs":{"imports":[],"exports":[],"entryPoint":"packages/sdk/errors/src/index.ts","inputs":{"packages/sdk/errors/src/index.ts":{"bytesInOutput":275},"packages/sdk/errors/src/errors.ts":{"bytesInOutput":650}},"bytes":1972}}}
1
+ {"inputs":{"packages/sdk/errors/src/errors.ts":{"bytes":3778,"imports":[]},"packages/sdk/errors/src/index.ts":{"bytes":370,"imports":[{"path":"packages/sdk/errors/src/errors.ts","kind":"import-statement"}]}},"outputs":{"packages/sdk/errors/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2013},"packages/sdk/errors/dist/lib/node/index.cjs":{"imports":[],"exports":[],"entryPoint":"packages/sdk/errors/src/index.ts","inputs":{"packages/sdk/errors/src/index.ts":{"bytesInOutput":275},"packages/sdk/errors/src/errors.ts":{"bytesInOutput":650}},"bytes":2007}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/errors",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "Error definitions and utilities.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",