chayns-api 2.6.2 → 2.6.4

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.
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.TrustedDomainsPlugin = void 0;
7
+ exports.isTrustedDomainsError = isTrustedDomainsError;
7
8
  class TrustedDomainsError extends Error {
8
9
  name = 'TrustedDomainsError';
9
10
  constructor(entry) {
@@ -26,4 +27,7 @@ const TrustedDomainsPlugin = (trustedDomains = []) => {
26
27
  }
27
28
  };
28
29
  };
29
- exports.TrustedDomainsPlugin = TrustedDomainsPlugin;
30
+ exports.TrustedDomainsPlugin = TrustedDomainsPlugin;
31
+ function isTrustedDomainsError(error) {
32
+ return error instanceof Error && error.name === 'TrustedDomainsError';
33
+ }
@@ -15,5 +15,11 @@ Object.defineProperty(exports, "TrustedDomainsPlugin", {
15
15
  return _TrustedDomainsPlugins.TrustedDomainsPlugin;
16
16
  }
17
17
  });
18
+ Object.defineProperty(exports, "isTrustedDomainsError", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _TrustedDomainsPlugins.isTrustedDomainsError;
22
+ }
23
+ });
18
24
  var _SSRManifestPlugin = require("./SSRManifestPlugin");
19
25
  var _TrustedDomainsPlugins = require("./TrustedDomainsPlugins");
@@ -22,4 +22,7 @@ export const TrustedDomainsPlugin = (trustedDomains = []) => {
22
22
  return args;
23
23
  }
24
24
  };
25
- };
25
+ };
26
+ export function isTrustedDomainsError(error) {
27
+ return error instanceof Error && error.name === 'TrustedDomainsError';
28
+ }
@@ -1,2 +1,2 @@
1
1
  export { SSRManifestPlugin } from './SSRManifestPlugin';
2
- export { TrustedDomainsPlugin } from './TrustedDomainsPlugins';
2
+ export { TrustedDomainsPlugin, isTrustedDomainsError } from './TrustedDomainsPlugins';
@@ -1,2 +1,8 @@
1
1
  import { ModuleFederationRuntimePlugin } from '@module-federation/enhanced/runtime';
2
+ declare class TrustedDomainsError extends Error {
3
+ readonly name: "TrustedDomainsError";
4
+ constructor(entry: string);
5
+ }
2
6
  export declare const TrustedDomainsPlugin: (trustedDomains?: string[]) => ModuleFederationRuntimePlugin;
7
+ export declare function isTrustedDomainsError(error: unknown): error is TrustedDomainsError;
8
+ export {};
@@ -1,2 +1,2 @@
1
1
  export { SSRManifestPlugin } from './SSRManifestPlugin';
2
- export { TrustedDomainsPlugin } from './TrustedDomainsPlugins';
2
+ export { TrustedDomainsPlugin, isTrustedDomainsError } from './TrustedDomainsPlugins';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "2.6.2",
3
+ "version": "2.6.4",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",