@talismn/connection-meta 0.2.32 → 0.2.34

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,6 @@
1
- import { DotNetworkId } from "@talismn/chaindata-provider";
2
- import { Dexie } from "dexie";
1
+ import { DotNetworkId } from '@talismn/chaindata-provider';
2
+ import { Dexie } from 'dexie';
3
+
3
4
  type ChainPriorityRpcs = {
4
5
  id: DotNetworkId;
5
6
  urls: string[];
@@ -8,10 +9,11 @@ type ChainBackoffInterval = {
8
9
  id: DotNetworkId;
9
10
  interval: number;
10
11
  };
11
- export declare class TalismanConnectionMetaDatabase extends Dexie {
12
+ declare class TalismanConnectionMetaDatabase extends Dexie {
12
13
  chainPriorityRpcs: Dexie.Table<ChainPriorityRpcs, DotNetworkId>;
13
14
  chainBackoffInterval: Dexie.Table<ChainBackoffInterval, DotNetworkId>;
14
15
  constructor();
15
16
  }
16
- export declare const db: TalismanConnectionMetaDatabase;
17
- export {};
17
+ declare const db: TalismanConnectionMetaDatabase;
18
+
19
+ export { TalismanConnectionMetaDatabase, db as connectionMetaDb };
@@ -0,0 +1,19 @@
1
+ import { DotNetworkId } from '@talismn/chaindata-provider';
2
+ import { Dexie } from 'dexie';
3
+
4
+ type ChainPriorityRpcs = {
5
+ id: DotNetworkId;
6
+ urls: string[];
7
+ };
8
+ type ChainBackoffInterval = {
9
+ id: DotNetworkId;
10
+ interval: number;
11
+ };
12
+ declare class TalismanConnectionMetaDatabase extends Dexie {
13
+ chainPriorityRpcs: Dexie.Table<ChainPriorityRpcs, DotNetworkId>;
14
+ chainBackoffInterval: Dexie.Table<ChainBackoffInterval, DotNetworkId>;
15
+ constructor();
16
+ }
17
+ declare const db: TalismanConnectionMetaDatabase;
18
+
19
+ export { TalismanConnectionMetaDatabase, db as connectionMetaDb };
package/dist/index.js ADDED
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ TalismanConnectionMetaDatabase: () => TalismanConnectionMetaDatabase,
24
+ connectionMetaDb: () => db
25
+ });
26
+ module.exports = __toCommonJS(index_exports);
27
+
28
+ // src/TalismanConnectionMetaDatabase.ts
29
+ var import_dexie = require("dexie");
30
+ var TalismanConnectionMetaDatabase = class extends import_dexie.Dexie {
31
+ chainPriorityRpcs;
32
+ chainBackoffInterval;
33
+ constructor() {
34
+ super("TalismanConnectionMeta");
35
+ this.version(2).stores({
36
+ // You only need to specify properties that you wish to index.
37
+ // The object store will allow any properties on your stored objects but you can only query them by indexed properties
38
+ // https://dexie.org/docs/API-Reference#declare-database
39
+ //
40
+ // Never index properties containing images, movies or large (huge) strings. Store them in IndexedDB, yes! but just don’t index them!
41
+ // https://dexie.org/docs/Version/Version.stores()#warning
42
+ chainPriorityRpc: null,
43
+ // delete legacy table
44
+ chainPriorityRpcs: "id",
45
+ chainBackoffInterval: "id"
46
+ });
47
+ }
48
+ };
49
+ var db = new TalismanConnectionMetaDatabase();
50
+ // Annotate the CommonJS export names for ESM import in node:
51
+ 0 && (module.exports = {
52
+ TalismanConnectionMetaDatabase,
53
+ connectionMetaDb
54
+ });
55
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/TalismanConnectionMetaDatabase.ts"],"sourcesContent":["export {\n db as connectionMetaDb,\n TalismanConnectionMetaDatabase,\n} from \"./TalismanConnectionMetaDatabase\"\n","import type { DotNetworkId } from \"@talismn/chaindata-provider\"\nimport { Dexie } from \"dexie\"\n\ntype ChainPriorityRpcs = {\n id: DotNetworkId\n urls: string[]\n}\ntype ChainBackoffInterval = {\n id: DotNetworkId\n interval: number\n}\n\nexport class TalismanConnectionMetaDatabase extends Dexie {\n chainPriorityRpcs!: Dexie.Table<ChainPriorityRpcs, DotNetworkId>\n chainBackoffInterval!: Dexie.Table<ChainBackoffInterval, DotNetworkId>\n\n constructor() {\n super(\"TalismanConnectionMeta\")\n\n // https://dexie.org/docs/Tutorial/Design#database-versioning\n this.version(2).stores({\n // You only need to specify properties that you wish to index.\n // The object store will allow any properties on your stored objects but you can only query them by indexed properties\n // https://dexie.org/docs/API-Reference#declare-database\n //\n // Never index properties containing images, movies or large (huge) strings. Store them in IndexedDB, yes! but just don’t index them!\n // https://dexie.org/docs/Version/Version.stores()#warning\n chainPriorityRpc: null, // delete legacy table\n chainPriorityRpcs: \"id\",\n chainBackoffInterval: \"id\",\n })\n }\n}\n\nexport const db = new TalismanConnectionMetaDatabase()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,mBAAsB;AAWf,IAAM,iCAAN,cAA6C,mBAAM;AAAA,EACxD;AAAA,EACA;AAAA,EAEA,cAAc;AACZ,UAAM,wBAAwB;AAG9B,SAAK,QAAQ,CAAC,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAOrB,kBAAkB;AAAA;AAAA,MAClB,mBAAmB;AAAA,MACnB,sBAAsB;AAAA,IACxB,CAAC;AAAA,EACH;AACF;AAEO,IAAM,KAAK,IAAI,+BAA+B;","names":[]}
@@ -1,10 +1,10 @@
1
- import { Dexie } from 'dexie';
2
-
3
- class TalismanConnectionMetaDatabase extends Dexie {
1
+ // src/TalismanConnectionMetaDatabase.ts
2
+ import { Dexie } from "dexie";
3
+ var TalismanConnectionMetaDatabase = class extends Dexie {
4
+ chainPriorityRpcs;
5
+ chainBackoffInterval;
4
6
  constructor() {
5
7
  super("TalismanConnectionMeta");
6
-
7
- // https://dexie.org/docs/Tutorial/Design#database-versioning
8
8
  this.version(2).stores({
9
9
  // You only need to specify properties that you wish to index.
10
10
  // The object store will allow any properties on your stored objects but you can only query them by indexed properties
@@ -18,7 +18,10 @@ class TalismanConnectionMetaDatabase extends Dexie {
18
18
  chainBackoffInterval: "id"
19
19
  });
20
20
  }
21
- }
22
- const db = new TalismanConnectionMetaDatabase();
23
-
24
- export { TalismanConnectionMetaDatabase, db as connectionMetaDb };
21
+ };
22
+ var db = new TalismanConnectionMetaDatabase();
23
+ export {
24
+ TalismanConnectionMetaDatabase,
25
+ db as connectionMetaDb
26
+ };
27
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/TalismanConnectionMetaDatabase.ts"],"sourcesContent":["import type { DotNetworkId } from \"@talismn/chaindata-provider\"\nimport { Dexie } from \"dexie\"\n\ntype ChainPriorityRpcs = {\n id: DotNetworkId\n urls: string[]\n}\ntype ChainBackoffInterval = {\n id: DotNetworkId\n interval: number\n}\n\nexport class TalismanConnectionMetaDatabase extends Dexie {\n chainPriorityRpcs!: Dexie.Table<ChainPriorityRpcs, DotNetworkId>\n chainBackoffInterval!: Dexie.Table<ChainBackoffInterval, DotNetworkId>\n\n constructor() {\n super(\"TalismanConnectionMeta\")\n\n // https://dexie.org/docs/Tutorial/Design#database-versioning\n this.version(2).stores({\n // You only need to specify properties that you wish to index.\n // The object store will allow any properties on your stored objects but you can only query them by indexed properties\n // https://dexie.org/docs/API-Reference#declare-database\n //\n // Never index properties containing images, movies or large (huge) strings. Store them in IndexedDB, yes! but just don’t index them!\n // https://dexie.org/docs/Version/Version.stores()#warning\n chainPriorityRpc: null, // delete legacy table\n chainPriorityRpcs: \"id\",\n chainBackoffInterval: \"id\",\n })\n }\n}\n\nexport const db = new TalismanConnectionMetaDatabase()\n"],"mappings":";AACA,SAAS,aAAa;AAWf,IAAM,iCAAN,cAA6C,MAAM;AAAA,EACxD;AAAA,EACA;AAAA,EAEA,cAAc;AACZ,UAAM,wBAAwB;AAG9B,SAAK,QAAQ,CAAC,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAOrB,kBAAkB;AAAA;AAAA,MAClB,mBAAmB;AAAA,MACnB,sBAAsB;AAAA,IACxB,CAAC;AAAA,EACH;AACF;AAEO,IAAM,KAAK,IAAI,+BAA+B;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talismn/connection-meta",
3
- "version": "0.2.32",
3
+ "version": "0.2.34",
4
4
  "author": "Talisman",
5
5
  "homepage": "https://talisman.xyz",
6
6
  "license": "GPL-3.0-or-later",
@@ -10,38 +10,42 @@
10
10
  "repository": {
11
11
  "directory": "packages/connection-meta",
12
12
  "type": "git",
13
- "url": "https://github.com/talismansociety/talisman.git"
13
+ "url": "https://github.com/TalismanSociety/talisman.git"
14
14
  },
15
- "main": "dist/talismn-connection-meta.cjs.js",
16
- "module": "dist/talismn-connection-meta.esm.js",
15
+ "main": "./dist/index.js",
16
+ "module": "./dist/index.mjs",
17
17
  "files": [
18
- "/dist"
18
+ "dist"
19
19
  ],
20
20
  "engines": {
21
21
  "node": ">=20"
22
22
  },
23
23
  "dependencies": {
24
24
  "dexie": "^4.0.9",
25
- "@talismn/chaindata-provider": "1.3.3"
25
+ "@talismn/chaindata-provider": "1.3.5"
26
26
  },
27
27
  "devDependencies": {
28
- "@types/jest": "^29.5.14",
29
- "eslint": "^8.57.1",
30
- "jest": "^29.7.0",
31
- "ts-jest": "^29.2.5",
32
28
  "typescript": "^5.6.3",
33
- "@talismn/eslint-config": "0.0.3",
34
- "@talismn/tsconfig": "0.0.3"
29
+ "@talismn/tsconfig": "0.0.4"
35
30
  },
36
- "eslintConfig": {
37
- "root": true,
38
- "extends": [
39
- "@talismn/eslint-config/base"
40
- ]
31
+ "types": "./dist/index.d.ts",
32
+ "exports": {
33
+ ".": {
34
+ "@talismn/source": "./src/index.ts",
35
+ "import": {
36
+ "types": "./dist/index.d.mts",
37
+ "default": "./dist/index.mjs"
38
+ },
39
+ "require": {
40
+ "types": "./dist/index.d.ts",
41
+ "default": "./dist/index.js"
42
+ }
43
+ }
41
44
  },
42
45
  "scripts": {
43
- "test": "jest",
44
- "lint": "eslint src --max-warnings 0",
45
- "clean": "rm -rf dist .turbo node_modules"
46
+ "test": "vitest run",
47
+ "clean": "rm -rf dist .turbo node_modules",
48
+ "build": "tsup --silent",
49
+ "typecheck": "tsc --noEmit"
46
50
  }
47
51
  }
@@ -1 +0,0 @@
1
- export { TalismanConnectionMetaDatabase, db as connectionMetaDb, } from "./TalismanConnectionMetaDatabase";
@@ -1 +0,0 @@
1
- export * from "./declarations/src/index";
@@ -1,27 +0,0 @@
1
- 'use strict';
2
-
3
- var dexie = require('dexie');
4
-
5
- class TalismanConnectionMetaDatabase extends dexie.Dexie {
6
- constructor() {
7
- super("TalismanConnectionMeta");
8
-
9
- // https://dexie.org/docs/Tutorial/Design#database-versioning
10
- this.version(2).stores({
11
- // You only need to specify properties that you wish to index.
12
- // The object store will allow any properties on your stored objects but you can only query them by indexed properties
13
- // https://dexie.org/docs/API-Reference#declare-database
14
- //
15
- // Never index properties containing images, movies or large (huge) strings. Store them in IndexedDB, yes! but just don’t index them!
16
- // https://dexie.org/docs/Version/Version.stores()#warning
17
- chainPriorityRpc: null,
18
- // delete legacy table
19
- chainPriorityRpcs: "id",
20
- chainBackoffInterval: "id"
21
- });
22
- }
23
- }
24
- const db = new TalismanConnectionMetaDatabase();
25
-
26
- exports.TalismanConnectionMetaDatabase = TalismanConnectionMetaDatabase;
27
- exports.connectionMetaDb = db;
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- if (process.env.NODE_ENV === "production") {
4
- module.exports = require("./talismn-connection-meta.cjs.prod.js");
5
- } else {
6
- module.exports = require("./talismn-connection-meta.cjs.dev.js");
7
- }
@@ -1,27 +0,0 @@
1
- 'use strict';
2
-
3
- var dexie = require('dexie');
4
-
5
- class TalismanConnectionMetaDatabase extends dexie.Dexie {
6
- constructor() {
7
- super("TalismanConnectionMeta");
8
-
9
- // https://dexie.org/docs/Tutorial/Design#database-versioning
10
- this.version(2).stores({
11
- // You only need to specify properties that you wish to index.
12
- // The object store will allow any properties on your stored objects but you can only query them by indexed properties
13
- // https://dexie.org/docs/API-Reference#declare-database
14
- //
15
- // Never index properties containing images, movies or large (huge) strings. Store them in IndexedDB, yes! but just don’t index them!
16
- // https://dexie.org/docs/Version/Version.stores()#warning
17
- chainPriorityRpc: null,
18
- // delete legacy table
19
- chainPriorityRpcs: "id",
20
- chainBackoffInterval: "id"
21
- });
22
- }
23
- }
24
- const db = new TalismanConnectionMetaDatabase();
25
-
26
- exports.TalismanConnectionMetaDatabase = TalismanConnectionMetaDatabase;
27
- exports.connectionMetaDb = db;