@seedprotocol/sdk 0.2.6 → 0.2.8

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 (100) hide show
  1. package/dist/EasClient-DdahV-My.js +13 -0
  2. package/dist/EasClient-DdahV-My.js.map +1 -0
  3. package/dist/EasClient-virlpmud.js +13 -0
  4. package/dist/EasClient-virlpmud.js.map +1 -0
  5. package/dist/FileManager-5GT-dMg0.js +16 -0
  6. package/dist/FileManager-5GT-dMg0.js.map +1 -0
  7. package/dist/FileManager-hdyZkwYe.js +18 -0
  8. package/dist/FileManager-hdyZkwYe.js.map +1 -0
  9. package/dist/{Item-5bbmH1H4.js → Item-Da3oF6rX.js} +3 -3
  10. package/dist/{Item-5bbmH1H4.js.map → Item-Da3oF6rX.js.map} +1 -1
  11. package/dist/QueryClient-DI1wuuAt.js +23 -0
  12. package/dist/QueryClient-DI1wuuAt.js.map +1 -0
  13. package/dist/QueryClient-J0ohccHX.js +21 -0
  14. package/dist/QueryClient-J0ohccHX.js.map +1 -0
  15. package/dist/bin.js +4 -26
  16. package/dist/bin.js.map +1 -1
  17. package/dist/{constants-CtWTDW5q.js → constants-C0HNnrob.js} +11 -2
  18. package/dist/constants-C0HNnrob.js.map +1 -0
  19. package/dist/{index-CoqbOXfg.js → index-BAqEY103.js} +3 -3
  20. package/dist/index-BAqEY103.js.map +1 -0
  21. package/dist/{index-s_H8DdLb.js → index-vIPO_QrC.js} +67 -46
  22. package/dist/index-vIPO_QrC.js.map +1 -0
  23. package/dist/main.js +2 -2
  24. package/dist/{seed.schema.config-CTpDY6LU.js → seed.schema.config-DrHfhLwp.js} +3 -3
  25. package/dist/{seed.schema.config-CTpDY6LU.js.map → seed.schema.config-DrHfhLwp.js.map} +1 -1
  26. package/dist/src/BaseArweaveClient.ts +1 -1
  27. package/dist/src/{EasClientNode.ts → EasClient.ts} +4 -4
  28. package/dist/src/FileManager.ts +13 -0
  29. package/dist/src/{QueryClientNode.ts → QueryClient.ts} +4 -6
  30. package/dist/src/actors.ts +7 -292
  31. package/dist/src/client.ts +6 -0
  32. package/dist/src/download.ts +5 -3
  33. package/dist/src/fetchDataFromEas.ts +3 -3
  34. package/dist/src/fetchRelatedItems.ts +5 -4
  35. package/dist/src/fetchSeeds.ts +5 -4
  36. package/dist/src/fetchVersions.ts +2 -2
  37. package/dist/src/getModelSchemas.ts +2 -2
  38. package/dist/src/getSchemaUidForModel.ts +2 -2
  39. package/dist/src/index.ts +21 -4
  40. package/dist/src/queries.ts +25 -37
  41. package/dist/src/saveImageSrc.ts +1 -1
  42. package/dist/src/syncDbWithEas.ts +2 -2
  43. package/dist/src/waitForDb.ts +17 -18
  44. package/dist/types/scripts/bin.d.ts +3 -3
  45. package/dist/types/scripts/bin.d.ts.map +1 -1
  46. package/dist/types/src/Item/service/actors/fetchDataFromEas.d.ts.map +1 -1
  47. package/dist/types/src/browser/helpers/EasClient.d.ts +7 -0
  48. package/dist/types/src/browser/helpers/EasClient.d.ts.map +1 -0
  49. package/dist/types/src/browser/helpers/FileManager.d.ts +6 -0
  50. package/dist/types/src/browser/helpers/FileManager.d.ts.map +1 -0
  51. package/dist/types/src/browser/helpers/QueryClient.d.ts +7 -0
  52. package/dist/types/src/browser/helpers/QueryClient.d.ts.map +1 -0
  53. package/dist/types/src/client.d.ts.map +1 -1
  54. package/dist/types/src/events/files/download.d.ts.map +1 -1
  55. package/dist/types/src/helpers/EasClient/BaseEasClient.d.ts.map +1 -0
  56. package/dist/types/src/helpers/EasClient/index.d.ts +5 -0
  57. package/dist/types/src/helpers/EasClient/index.d.ts.map +1 -0
  58. package/dist/types/src/helpers/FileManager/BaseFileManager.d.ts.map +1 -0
  59. package/dist/types/src/helpers/FileManager/index.d.ts +5 -0
  60. package/dist/types/src/helpers/FileManager/index.d.ts.map +1 -0
  61. package/dist/types/src/helpers/QueryClient/BaseQueryClient.d.ts.map +1 -0
  62. package/dist/types/src/helpers/QueryClient/index.d.ts +5 -0
  63. package/dist/types/src/helpers/QueryClient/index.d.ts.map +1 -0
  64. package/dist/types/src/helpers/index.d.ts +3 -3
  65. package/dist/types/src/helpers/index.d.ts.map +1 -1
  66. package/dist/types/src/node/helpers/EasClient.d.ts +7 -0
  67. package/dist/types/src/node/helpers/EasClient.d.ts.map +1 -0
  68. package/dist/types/src/node/helpers/FileManager.d.ts +6 -0
  69. package/dist/types/src/node/helpers/FileManager.d.ts.map +1 -0
  70. package/dist/types/src/node/helpers/QueryClient.d.ts +9 -0
  71. package/dist/types/src/node/helpers/QueryClient.d.ts.map +1 -0
  72. package/dist/types/src/services/allItems/actors/fetchRelatedItems.d.ts.map +1 -1
  73. package/dist/types/src/services/allItems/actors/fetchSeeds.d.ts.map +1 -1
  74. package/dist/types/src/services/allItems/actors/initialize.d.ts.map +1 -1
  75. package/package.json +3 -4
  76. package/dist/constants-CtWTDW5q.js.map +0 -1
  77. package/dist/index-CoqbOXfg.js.map +0 -1
  78. package/dist/index-s_H8DdLb.js.map +0 -1
  79. package/dist/src/EasClientWeb.ts +0 -13
  80. package/dist/src/FileManagerNode.ts +0 -31
  81. package/dist/src/FileManagerWeb.ts +0 -18
  82. package/dist/src/QueryClientWeb.ts +0 -20
  83. package/dist/types/src/browser/helpers/EasClientWeb.d.ts +0 -7
  84. package/dist/types/src/browser/helpers/EasClientWeb.d.ts.map +0 -1
  85. package/dist/types/src/browser/helpers/FileManagerWeb.d.ts +0 -5
  86. package/dist/types/src/browser/helpers/FileManagerWeb.d.ts.map +0 -1
  87. package/dist/types/src/browser/helpers/QueryClientWeb.d.ts +0 -7
  88. package/dist/types/src/browser/helpers/QueryClientWeb.d.ts.map +0 -1
  89. package/dist/types/src/helpers/BaseEasClient.d.ts.map +0 -1
  90. package/dist/types/src/helpers/BaseFileManager.d.ts.map +0 -1
  91. package/dist/types/src/helpers/BaseQueryClient.d.ts.map +0 -1
  92. package/dist/types/src/node/helpers/EasClientNode.d.ts +0 -7
  93. package/dist/types/src/node/helpers/EasClientNode.d.ts.map +0 -1
  94. package/dist/types/src/node/helpers/FileManagerNode.d.ts +0 -9
  95. package/dist/types/src/node/helpers/FileManagerNode.d.ts.map +0 -1
  96. package/dist/types/src/node/helpers/QueryClientNode.d.ts +0 -9
  97. package/dist/types/src/node/helpers/QueryClientNode.d.ts.map +0 -1
  98. /package/dist/types/src/helpers/{BaseEasClient.d.ts → EasClient/BaseEasClient.d.ts} +0 -0
  99. /package/dist/types/src/helpers/{BaseFileManager.d.ts → FileManager/BaseFileManager.d.ts} +0 -0
  100. /package/dist/types/src/helpers/{BaseQueryClient.d.ts → QueryClient/BaseQueryClient.d.ts} +0 -0
@@ -1,13 +0,0 @@
1
- import { BaseEasClient } from '../../helpers/BaseEasClient'
2
- import { GraphQLClient } from 'graphql-request'
3
- import { EAS_ENDPOINT } from '@/services/internal/constants'
4
-
5
- class EasClientWeb extends BaseEasClient {
6
- static getEasClient(): GraphQLClient {
7
- return new GraphQLClient(EAS_ENDPOINT)
8
- }
9
- }
10
-
11
- BaseEasClient.setPlatformClass(EasClientWeb)
12
-
13
- export { EasClientWeb }
@@ -1,31 +0,0 @@
1
- import { promises as fs } from 'fs';
2
- import path from 'path';
3
-
4
- class FileManagerNode {
5
- static async readFileAsBuffer(filePath: string): Promise<Buffer> {
6
- return await fs.readFile(filePath);
7
- }
8
-
9
- static async writeFile(filePath: string, data: Buffer | string): Promise<void> {
10
- await fs.writeFile(filePath, data);
11
- }
12
-
13
- static async deleteFile(filePath: string): Promise<void> {
14
- await fs.unlink(filePath);
15
- }
16
-
17
- static async fileExists(filePath: string): Promise<boolean> {
18
- try {
19
- await fs.access(filePath);
20
- return true;
21
- } catch {
22
- return false;
23
- }
24
- }
25
-
26
- static async getFileName(filePath: string): Promise<string> {
27
- return path.basename(filePath);
28
- }
29
- }
30
-
31
- export { FileManagerNode };
@@ -1,18 +0,0 @@
1
- import { BaseFileManager } from "@/helpers/BaseFileManager";
2
- import fs from "@zenfs/core";
3
- import { basename } from "path-browserify";
4
-
5
- export class FileManagerWeb extends BaseFileManager {
6
-
7
- static async getContentUrlFromPath(path: string): Promise<string | undefined> {
8
- const imageFileExists = await fs.promises.exists(path)
9
- if (!imageFileExists) {
10
- return
11
- }
12
- const fileContents = await fs.promises.readFile(path)
13
- const fileHandler = new File([fileContents], basename(path))
14
- return URL.createObjectURL(fileHandler)
15
- }
16
- }
17
-
18
- BaseFileManager.setPlatformClass(FileManagerWeb)
@@ -1,20 +0,0 @@
1
- import { BaseQueryClient } from '@/helpers/BaseQueryClient'
2
- import { IQueryClient } from '@/interfaces/IQueryClient'
3
- import { QueryClient } from '@tanstack/react-query'
4
-
5
- class QueryClientWeb extends BaseQueryClient {
6
- static getQueryClient(): IQueryClient {
7
- return new QueryClient({
8
- defaultOptions: {
9
- queries: {
10
- networkMode: 'offlineFirst',
11
- gcTime: 1000 * 60 * 60 * 24, // 24 hours
12
- },
13
- },
14
- })
15
- }
16
- }
17
-
18
- BaseQueryClient.setPlatformClass(QueryClientWeb)
19
-
20
- export { QueryClientWeb }
@@ -1,7 +0,0 @@
1
- import { BaseEasClient } from '../../helpers/BaseEasClient';
2
- import { GraphQLClient } from 'graphql-request';
3
- declare class EasClientWeb extends BaseEasClient {
4
- static getEasClient(): GraphQLClient;
5
- }
6
- export { EasClientWeb };
7
- //# sourceMappingURL=EasClientWeb.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EasClientWeb.d.ts","sourceRoot":"","sources":["../../../../../src/browser/helpers/EasClientWeb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAG/C,cAAM,YAAa,SAAQ,aAAa;IACtC,MAAM,CAAC,YAAY,IAAI,aAAa;CAGrC;AAID,OAAO,EAAE,YAAY,EAAE,CAAA"}
@@ -1,5 +0,0 @@
1
- import { BaseFileManager } from "@/helpers/BaseFileManager";
2
- export declare class FileManagerWeb extends BaseFileManager {
3
- static getContentUrlFromPath(path: string): Promise<string | undefined>;
4
- }
5
- //# sourceMappingURL=FileManagerWeb.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileManagerWeb.d.ts","sourceRoot":"","sources":["../../../../../src/browser/helpers/FileManagerWeb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAI5D,qBAAa,cAAe,SAAQ,eAAe;WAEpC,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAS9E"}
@@ -1,7 +0,0 @@
1
- import { BaseQueryClient } from '@/helpers/BaseQueryClient';
2
- import { IQueryClient } from '@/interfaces/IQueryClient';
3
- declare class QueryClientWeb extends BaseQueryClient {
4
- static getQueryClient(): IQueryClient;
5
- }
6
- export { QueryClientWeb };
7
- //# sourceMappingURL=QueryClientWeb.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QueryClientWeb.d.ts","sourceRoot":"","sources":["../../../../../src/browser/helpers/QueryClientWeb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAGxD,cAAM,cAAe,SAAQ,eAAe;IAC1C,MAAM,CAAC,cAAc,IAAI,YAAY;CAUtC;AAID,OAAO,EAAE,cAAc,EAAE,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseEasClient.d.ts","sourceRoot":"","sources":["../../../../src/helpers/BaseEasClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,8BAAsB,aAAa;IACjC,MAAM,CAAC,aAAa,EAAE,OAAO,aAAa,CAAA;IAE1C,MAAM,CAAC,gBAAgB,CAAC,aAAa,EAAE,OAAO,aAAa;IAI3D,MAAM,CAAC,YAAY,IAAI,aAAa;CAGrC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseFileManager.d.ts","sourceRoot":"","sources":["../../../../src/helpers/BaseFileManager.ts"],"names":[],"mappings":"AAAA,8BAAsB,eAAe;IACnC,MAAM,CAAC,aAAa,EAAE,OAAO,eAAe,CAAA;IAE5C,MAAM,CAAC,gBAAgB,CAAC,aAAa,EAAE,OAAO,eAAe;IAI7D,MAAM,CAAC,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAGxE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseQueryClient.d.ts","sourceRoot":"","sources":["../../../../src/helpers/BaseQueryClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAExD,8BAAsB,eAAe;IACnC,MAAM,CAAC,aAAa,EAAE,OAAO,eAAe,CAAA;IAE5C,MAAM,CAAC,gBAAgB,CAAC,aAAa,EAAE,OAAO,eAAe;IAI7D,MAAM,CAAC,cAAc,IAAI,YAAY;CAGtC"}
@@ -1,7 +0,0 @@
1
- import { BaseEasClient } from "@/helpers/BaseEasClient";
2
- import { GraphQLClient } from "graphql-request";
3
- declare class EasClientNode extends BaseEasClient {
4
- static getEasClient(): GraphQLClient;
5
- }
6
- export { EasClientNode };
7
- //# sourceMappingURL=EasClientNode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EasClientNode.d.ts","sourceRoot":"","sources":["../../../../../src/node/helpers/EasClientNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,cAAM,aAAc,SAAQ,aAAa;IACvC,MAAM,CAAC,YAAY;CAGpB;AAID,OAAO,EAAE,aAAa,EAAE,CAAA"}
@@ -1,9 +0,0 @@
1
- declare class FileManagerNode {
2
- static readFileAsBuffer(filePath: string): Promise<Buffer>;
3
- static writeFile(filePath: string, data: Buffer | string): Promise<void>;
4
- static deleteFile(filePath: string): Promise<void>;
5
- static fileExists(filePath: string): Promise<boolean>;
6
- static getFileName(filePath: string): Promise<string>;
7
- }
8
- export { FileManagerNode };
9
- //# sourceMappingURL=FileManagerNode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileManagerNode.d.ts","sourceRoot":"","sources":["../../../../../src/node/helpers/FileManagerNode.ts"],"names":[],"mappings":"AAGA,cAAM,eAAe;WACN,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;WAInD,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;WAIjE,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;WAI3C,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;WAS9C,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAG5D;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -1,9 +0,0 @@
1
- import { BaseQueryClient } from "@/helpers/BaseQueryClient";
2
- declare class QueryClientNode extends BaseQueryClient {
3
- static getQueryClient(): {
4
- fetchQuery: () => Promise<unknown>;
5
- getQueryData: () => Promise<unknown>;
6
- };
7
- }
8
- export { QueryClientNode };
9
- //# sourceMappingURL=QueryClientNode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QueryClientNode.d.ts","sourceRoot":"","sources":["../../../../../src/node/helpers/QueryClientNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAI3D,cAAM,eAAgB,SAAQ,eAAe;IAC3C,MAAM,CAAC,cAAc;;;;CActB;AAID,OAAO,EAAE,eAAe,EAAE,CAAA"}