@ldo/connected-nextgraph 1.0.0-alpha.2 → 1.0.0-alpha.21

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 (89) hide show
  1. package/README.md +65 -3
  2. package/dist/{NextGraphConnectedPlugin.js → cjs/NextGraphConnectedPlugin.js} +9 -10
  3. package/dist/cjs/NextGraphConnectedPlugin.js.map +1 -0
  4. package/dist/{createNextGraphLdoDataset.js → cjs/createNextGraphLdoDataset.js} +2 -2
  5. package/dist/cjs/createNextGraphLdoDataset.js.map +1 -0
  6. package/dist/{index.js → cjs/index.js} +6 -5
  7. package/dist/cjs/index.js.map +1 -0
  8. package/dist/cjs/notifications/NextGraphNotificationMessage.js.map +1 -0
  9. package/dist/cjs/notifications/NextGraphNotificationSubscription.js +15 -0
  10. package/dist/cjs/notifications/NextGraphNotificationSubscription.js.map +1 -0
  11. package/dist/{resources → cjs/resources}/NextGraphResource.js +19 -27
  12. package/dist/cjs/resources/NextGraphResource.js.map +1 -0
  13. package/dist/cjs/results/NextGraphReadSuccess.js.map +1 -0
  14. package/dist/cjs/types.js.map +1 -0
  15. package/dist/cjs/util/NextGraphNotificationMessage.js.map +1 -0
  16. package/dist/{util → cjs/util}/isNextGraphUri.js +5 -0
  17. package/dist/cjs/util/isNextGraphUri.js.map +1 -0
  18. package/dist/esm/NextGraphConnectedPlugin.js +34 -0
  19. package/dist/esm/NextGraphConnectedPlugin.js.map +1 -0
  20. package/dist/esm/createNextGraphLdoDataset.js +9 -0
  21. package/dist/esm/createNextGraphLdoDataset.js.map +1 -0
  22. package/dist/esm/index.js +7 -0
  23. package/dist/esm/index.js.map +1 -0
  24. package/dist/esm/notifications/NextGraphNotificationMessage.js +2 -0
  25. package/dist/esm/notifications/NextGraphNotificationMessage.js.map +1 -0
  26. package/dist/esm/notifications/NextGraphNotificationSubscription.js +11 -0
  27. package/dist/esm/notifications/NextGraphNotificationSubscription.js.map +1 -0
  28. package/dist/esm/resources/NextGraphResource.js +156 -0
  29. package/dist/esm/resources/NextGraphResource.js.map +1 -0
  30. package/dist/esm/results/NextGraphReadSuccess.js +8 -0
  31. package/dist/esm/results/NextGraphReadSuccess.js.map +1 -0
  32. package/dist/esm/types.js +2 -0
  33. package/dist/esm/types.js.map +1 -0
  34. package/dist/esm/util/NextGraphNotificationMessage.js +2 -0
  35. package/dist/esm/util/NextGraphNotificationMessage.js.map +1 -0
  36. package/dist/esm/util/isNextGraphUri.js +9 -0
  37. package/dist/esm/util/isNextGraphUri.js.map +1 -0
  38. package/dist/{NextGraphConnectedPlugin.d.ts → types/NextGraphConnectedPlugin.d.ts} +5 -2
  39. package/dist/types/NextGraphConnectedPlugin.d.ts.map +1 -0
  40. package/dist/types/createNextGraphLdoDataset.d.ts +3 -0
  41. package/dist/types/createNextGraphLdoDataset.d.ts.map +1 -0
  42. package/dist/types/index.d.ts +7 -0
  43. package/dist/types/index.d.ts.map +1 -0
  44. package/dist/{notifications → types/notifications}/NextGraphNotificationMessage.d.ts +1 -0
  45. package/dist/types/notifications/NextGraphNotificationMessage.d.ts.map +1 -0
  46. package/dist/{notifications → types/notifications}/NextGraphNotificationSubscription.d.ts +3 -2
  47. package/dist/types/notifications/NextGraphNotificationSubscription.d.ts.map +1 -0
  48. package/dist/{resources → types/resources}/NextGraphResource.d.ts +14 -6
  49. package/dist/types/resources/NextGraphResource.d.ts.map +1 -0
  50. package/dist/{results → types/results}/NextGraphReadSuccess.d.ts +2 -1
  51. package/dist/types/results/NextGraphReadSuccess.d.ts.map +1 -0
  52. package/dist/{types.d.ts → types/types.d.ts} +4 -0
  53. package/dist/types/types.d.ts.map +1 -0
  54. package/dist/{util → types/util}/NextGraphNotificationMessage.d.ts +1 -0
  55. package/dist/types/util/NextGraphNotificationMessage.d.ts.map +1 -0
  56. package/dist/types/util/isNextGraphUri.d.ts +8 -0
  57. package/dist/types/util/isNextGraphUri.d.ts.map +1 -0
  58. package/package.json +28 -16
  59. package/src/NextGraphConnectedPlugin.ts +10 -6
  60. package/src/createNextGraphLdoDataset.ts +1 -1
  61. package/src/index.ts +7 -5
  62. package/src/notifications/NextGraphNotificationSubscription.ts +3 -5
  63. package/src/resources/NextGraphResource.ts +24 -29
  64. package/src/results/NextGraphReadSuccess.ts +1 -1
  65. package/src/util/isNextGraphUri.ts +1 -1
  66. package/dist/NextGraphConnectedPlugin.js.map +0 -1
  67. package/dist/createNextGraphLdoDataset.d.ts +0 -2
  68. package/dist/createNextGraphLdoDataset.js.map +0 -1
  69. package/dist/createSolidLdoDataset.d.ts +0 -2
  70. package/dist/createSolidLdoDataset.js +0 -13
  71. package/dist/createSolidLdoDataset.js.map +0 -1
  72. package/dist/index.d.ts +0 -5
  73. package/dist/index.js.map +0 -1
  74. package/dist/notifications/NextGraphNotificationMessage.js.map +0 -1
  75. package/dist/notifications/NextGraphNotificationSubscription.js +0 -20
  76. package/dist/notifications/NextGraphNotificationSubscription.js.map +0 -1
  77. package/dist/resources/NextGraphResource.js.map +0 -1
  78. package/dist/results/NextGraphReadSuccess.js.map +0 -1
  79. package/dist/results/NoNextGraphStoreError.d.ts +0 -5
  80. package/dist/results/NoNextGraphStoreError.js +0 -12
  81. package/dist/results/NoNextGraphStoreError.js.map +0 -1
  82. package/dist/types.js.map +0 -1
  83. package/dist/util/NextGraphNotificationMessage.js.map +0 -1
  84. package/dist/util/isNextGraphUri.d.ts +0 -2
  85. package/dist/util/isNextGraphUri.js.map +0 -1
  86. /package/dist/{notifications → cjs/notifications}/NextGraphNotificationMessage.js +0 -0
  87. /package/dist/{results → cjs/results}/NextGraphReadSuccess.js +0 -0
  88. /package/dist/{types.js → cjs/types.js} +0 -0
  89. /package/dist/{util → cjs/util}/NextGraphNotificationMessage.js +0 -0
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=NextGraphNotificationMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NextGraphNotificationMessage.js","sourceRoot":"","sources":["../../../src/util/NextGraphNotificationMessage.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Checks if a provided string is a leaf URI
3
+ * @param uri - the string to check
4
+ * @returns true if the string is a leaf URI
5
+ */
6
+ export function isNextGraphUri(uri) {
7
+ return uri.startsWith("did:ng");
8
+ }
9
+ //# sourceMappingURL=isNextGraphUri.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isNextGraphUri.js","sourceRoot":"","sources":["../../../src/util/isNextGraphUri.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,OAAO,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AAClC,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import type { ConnectedContext, ConnectedPlugin } from "@ldo/connected";
2
- import type { NextGraphUri } from "./types";
3
- import { NextGraphResource } from "./resources/NextGraphResource";
2
+ import type { NextGraphUri } from "./types.js";
3
+ import { NextGraphResource } from "./resources/NextGraphResource.js";
4
4
  export interface NextGraphConnectedContext {
5
+ ng?: any;
5
6
  sessionId?: string;
6
7
  protectedStoreId?: string;
7
8
  privateStoreId?: string;
@@ -10,6 +11,7 @@ export interface NextGraphConnectedContext {
10
11
  export interface NextGraphCreateResourceOptions {
11
12
  storeType?: "public" | "protected" | "private" | "group" | "dialog";
12
13
  storeRepo?: string;
14
+ primaryClass?: string;
13
15
  }
14
16
  export interface NextGraphConnectedPlugin extends ConnectedPlugin<"nextgraph", NextGraphUri, NextGraphResource, NextGraphConnectedContext, NextGraphCreateResourceOptions> {
15
17
  name: "nextgraph";
@@ -17,3 +19,4 @@ export interface NextGraphConnectedPlugin extends ConnectedPlugin<"nextgraph", N
17
19
  createResource(context: ConnectedContext<this[]>): Promise<NextGraphResource>;
18
20
  }
19
21
  export declare const nextGraphConnectedPlugin: NextGraphConnectedPlugin;
22
+ //# sourceMappingURL=NextGraphConnectedPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NextGraphConnectedPlugin.d.ts","sourceRoot":"","sources":["../../src/NextGraphConnectedPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAGrE,MAAM,WAAW,yBAAyB;IAGxC,EAAE,CAAC,EAAE,GAAG,CAAC;IACT,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,8BAA8B;IAC7C,SAAS,CAAC,EAAE,QAAQ,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,wBACf,SAAQ,eAAe,CACrB,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,yBAAyB,EACzB,8BAA8B,CAC/B;IACD,IAAI,EAAE,WAAW,CAAC;IAClB,WAAW,EAAE,CACX,GAAG,EAAE,YAAY,EACjB,OAAO,EAAE,gBAAgB,CAAC,IAAI,EAAE,CAAC,KAC9B,iBAAiB,CAAC;IACvB,cAAc,CAAC,OAAO,EAAE,gBAAgB,CAAC,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC/E;AAED,eAAO,MAAM,wBAAwB,EAAE,wBAiDtC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ConnectedLdoDataset } from "@ldo/connected";
2
+ export declare function createNextGraphLdoDataset(): ConnectedLdoDataset<import("./NextGraphConnectedPlugin.js").NextGraphConnectedPlugin[]>;
3
+ //# sourceMappingURL=createNextGraphLdoDataset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createNextGraphLdoDataset.d.ts","sourceRoot":"","sources":["../../src/createNextGraphLdoDataset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAKrD,wBAAgB,yBAAyB,4FAOxC"}
@@ -0,0 +1,7 @@
1
+ export * from "./types.js";
2
+ export * from "./NextGraphConnectedPlugin.js";
3
+ export * from "./resources/NextGraphResource.js";
4
+ export * from "./util/isNextGraphUri.js";
5
+ export * from "./results/NextGraphReadSuccess.js";
6
+ export * from "./createNextGraphLdoDataset.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,+BAA+B,CAAC;AAE9C,cAAc,kCAAkC,CAAC;AAEjD,cAAc,0BAA0B,CAAC;AAEzC,cAAc,mCAAmC,CAAC;AAElD,cAAc,gCAAgC,CAAC"}
@@ -13,3 +13,4 @@ export interface NextGraphNotificationMessage {
13
13
  };
14
14
  };
15
15
  }
16
+ //# sourceMappingURL=NextGraphNotificationMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NextGraphNotificationMessage.d.ts","sourceRoot":"","sources":["../../../src/notifications/NextGraphNotificationMessage.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE;QACF,KAAK,CAAC,EAAE;YACN,KAAK,EAAE;gBACL,OAAO,EAAE,uBAAuB,CAAC;aAClC,CAAC;SACH,CAAC;QACF,KAAK,CAAC,EAAE;YACN,KAAK,EAAE;gBACL,OAAO,EAAE,uBAAuB,CAAC;gBACjC,OAAO,EAAE,uBAAuB,CAAC;aAClC,CAAC;SACH,CAAC;KACH,CAAC;CACH"}
@@ -1,8 +1,9 @@
1
1
  import { NotificationSubscription } from "@ldo/connected";
2
- import type { NextGraphConnectedPlugin } from "../NextGraphConnectedPlugin";
3
- import type { NextGraphNotificationMessage } from "./NextGraphNotificationMessage";
2
+ import type { NextGraphConnectedPlugin } from "../NextGraphConnectedPlugin.js";
3
+ import type { NextGraphNotificationMessage } from "./NextGraphNotificationMessage.js";
4
4
  export declare class NextGraphNotificationSubscription extends NotificationSubscription<NextGraphConnectedPlugin, NextGraphNotificationMessage> {
5
5
  private unsub;
6
6
  protected open(): Promise<void>;
7
7
  protected close(): Promise<void>;
8
8
  }
9
+ //# sourceMappingURL=NextGraphNotificationSubscription.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NextGraphNotificationSubscription.d.ts","sourceRoot":"","sources":["../../../src/notifications/NextGraphNotificationSubscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEtF,qBAAa,iCAAkC,SAAQ,wBAAwB,CAC7E,wBAAwB,EACxB,4BAA4B,CAC7B;IACC,OAAO,CAAC,KAAK,CAA2B;cAExB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;cAQrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAIvC"}
@@ -1,13 +1,16 @@
1
1
  import type { ConnectedContext, NotificationSubscription, SubscriptionCallbacks } from "@ldo/connected";
2
2
  import { UnexpectedResourceError, UpdateSuccess } from "@ldo/connected";
3
- import { type ConnectedResult, type Resource, type ResourceEventEmitter } from "@ldo/connected";
4
- import type { NextGraphUri } from "../types";
5
- import type { NextGraphConnectedPlugin } from "../NextGraphConnectedPlugin";
3
+ import { type ConnectedResult, type Resource } from "@ldo/connected";
4
+ import type { NextGraphUri } from "../types.js";
5
+ import type { NextGraphConnectedPlugin } from "../NextGraphConnectedPlugin.js";
6
6
  import { type DatasetChanges } from "@ldo/rdf-utils";
7
- import type { NextGraphNotificationMessage } from "../notifications/NextGraphNotificationMessage";
7
+ import type { NextGraphNotificationMessage } from "../notifications/NextGraphNotificationMessage.js";
8
8
  import type { Quad } from "@rdfjs/types";
9
- import { NextGraphReadSuccess } from "../results/NextGraphReadSuccess";
10
- declare const NextGraphResource_base: new () => ResourceEventEmitter;
9
+ import { NextGraphReadSuccess } from "../results/NextGraphReadSuccess.js";
10
+ declare const NextGraphResource_base: new () => import("typed-emitter").default<{
11
+ update: () => void;
12
+ notification: () => void;
13
+ }>;
11
14
  export declare class NextGraphResource extends NextGraphResource_base implements Resource<NextGraphUri> {
12
15
  readonly uri: NextGraphUri;
13
16
  readonly type: "NextGraphResource";
@@ -17,6 +20,10 @@ export declare class NextGraphResource extends NextGraphResource_base implements
17
20
  private fetched;
18
21
  private loading;
19
22
  private present;
23
+ /**
24
+ * @internal
25
+ * Handles notification subscriptions
26
+ */
20
27
  protected notificationSubscription: NotificationSubscription<NextGraphConnectedPlugin, NextGraphNotificationMessage>;
21
28
  constructor(uri: NextGraphUri, context: ConnectedContext<NextGraphConnectedPlugin[]>);
22
29
  isLoading(): boolean;
@@ -38,3 +45,4 @@ export declare class NextGraphResource extends NextGraphResource_base implements
38
45
  unsubscribeFromAllNotifications(): Promise<void>;
39
46
  }
40
47
  export {};
48
+ //# sourceMappingURL=NextGraphResource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NextGraphResource.d.ts","sourceRoot":"","sources":["../../../src/resources/NextGraphResource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,aAA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cAAc;IAgBhB,IAAI,IAAI,OAAO,CACnB,oBAAoB,GAAG,uBAAuB,CAAC,iBAAiB,CAAC,CAClE;IAqCK,eAAe,IAAI,OAAO,CAC9B,oBAAoB,GAAG,uBAAuB,CAAC,iBAAiB,CAAC,CAClE;IAOK,MAAM,CACV,cAAc,EAAE,cAAc,CAAC,IAAI,CAAC,GACnC,OAAO,CACN,aAAa,CAAC,iBAAiB,CAAC,GAChC,uBAAuB,CAAC,iBAAiB,CAAC,CAC7C;YAyBa,mBAAmB;cA0BjB,cAAc,CAAC,QAAQ,EAAE,4BAA4B;IAgC/D,wBAAwB,CAC5B,SAAS,CAAC,EAAE,qBAAqB,CAAC,4BAA4B,CAAC,GAC9D,OAAO,CAAC,MAAM,CAAC;IAMlB,4BAA4B,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMnE,+BAA+B,IAAI,OAAO,CAAC,IAAI,CAAC;CAGjD"}
@@ -1,5 +1,6 @@
1
1
  import { ReadSuccess } from "@ldo/connected";
2
- import type { NextGraphResource } from "../resources/NextGraphResource";
2
+ import type { NextGraphResource } from "../resources/NextGraphResource.js";
3
3
  export declare class NextGraphReadSuccess extends ReadSuccess<NextGraphResource> {
4
4
  type: "nextGraphReadSuccess";
5
5
  }
6
+ //# sourceMappingURL=NextGraphReadSuccess.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NextGraphReadSuccess.d.ts","sourceRoot":"","sources":["../../../src/results/NextGraphReadSuccess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,qBAAa,oBAAqB,SAAQ,WAAW,CAAC,iBAAiB,CAAC;IACtE,IAAI,yBAAmC;CACxC"}
@@ -1,2 +1,6 @@
1
1
  export type NextGraphUriPrefix = `did:ng`;
2
+ /**
3
+ * A NextGraph is a URI that is valid in the NextGraph ecosystem
4
+ */
2
5
  export type NextGraphUri = `${NextGraphUriPrefix}${string}` & {};
6
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AAE1C;;GAEG;AAGH,MAAM,MAAM,YAAY,GAAG,GAAG,kBAAkB,GAAG,MAAM,EAAE,GAAG,EAAE,CAAC"}
@@ -13,3 +13,4 @@ export interface NextGraphNotificationMessage {
13
13
  };
14
14
  };
15
15
  }
16
+ //# sourceMappingURL=NextGraphNotificationMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NextGraphNotificationMessage.d.ts","sourceRoot":"","sources":["../../../src/util/NextGraphNotificationMessage.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE;QACF,KAAK,EAAE;YACL,KAAK,EAAE;gBACL,OAAO,EAAE,uBAAuB,CAAC;aAClC,CAAC;SACH,CAAC;QACF,KAAK,EAAE;YACL,KAAK,EAAE;gBACL,OAAO,EAAE,uBAAuB,CAAC;gBACjC,OAAO,EAAE,uBAAuB,CAAC;aAClC,CAAC;SACH,CAAC;KACH,CAAC;CACH"}
@@ -0,0 +1,8 @@
1
+ import type { NextGraphUri } from "../types.js";
2
+ /**
3
+ * Checks if a provided string is a leaf URI
4
+ * @param uri - the string to check
5
+ * @returns true if the string is a leaf URI
6
+ */
7
+ export declare function isNextGraphUri(uri: string): uri is NextGraphUri;
8
+ //# sourceMappingURL=isNextGraphUri.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isNextGraphUri.d.ts","sourceRoot":"","sources":["../../../src/util/isNextGraphUri.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,YAAY,CAE/D"}
package/package.json CHANGED
@@ -1,39 +1,51 @@
1
1
  {
2
2
  "name": "@ldo/connected-nextgraph",
3
- "version": "1.0.0-alpha.2",
3
+ "version": "1.0.0-alpha.21",
4
4
  "description": "A plugin for @ldo/connected to work with the Solid ecosystem.",
5
- "main": "dist/index.js",
5
+ "type": "module",
6
+ "main": "./dist/cjs/index.js",
7
+ "module": "./dist/esm/index.js",
8
+ "types": "./dist/types/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/types/index.d.ts",
12
+ "import": "./dist/esm/index.js",
13
+ "require": "./dist/cjs/index.js"
14
+ },
15
+ "./package.json": "./package.json"
16
+ },
6
17
  "scripts": {
7
- "build": "tsc --project tsconfig.build.json",
8
- "watch": "tsc --watch",
18
+ "build": "rimraf dist && npm run build:cjs && npm run build:esm",
19
+ "build:cjs": "tsc --project tsconfig.cjs.json",
20
+ "build:esm": "tsc --project tsconfig.esm.json",
9
21
  "test": "npm run test:integration",
10
- "prepublishOnly": "npm run test && npm run build",
22
+ "prepublishOnly": " npm run build",
11
23
  "lint": "eslint src/** --fix --no-error-on-unmatched-pattern",
12
24
  "docs": "typedoc --plugin typedoc-plugin-markdown",
13
25
  "start-test-server": "./test/ngd -vv --save-key -l 14400 --base ./test/nextgraph-data",
14
- "start-integration-test": "jest --coverage",
26
+ "start-integration-test": "vitest run --coverage",
15
27
  "test:integration": "start-server-and-test start-test-server http-get://localhost:14400 start-integration-test"
16
28
  },
17
29
  "repository": {
18
30
  "type": "git",
19
- "url": "git+https://github.com/o-development/ldobjects.git"
31
+ "url": "git+https://github.com/o-development/ldo.git"
20
32
  },
21
33
  "author": "Jackson Morgan",
22
34
  "license": "MIT",
23
35
  "bugs": {
24
- "url": "https://github.com/o-development/ldobjects/issues"
36
+ "url": "https://github.com/o-development/ldo/issues"
25
37
  },
26
- "homepage": "https://github.com/o-development/ldobjects/tree/main/packages/solid#readme",
38
+ "homepage": "https://github.com/o-development/ldo/tree/main/packages/solid#readme",
27
39
  "devDependencies": {
28
40
  "@inrupt/solid-client-authn-core": "^2.2.6",
29
- "@ldo/cli": "^1.0.0-alpha.2",
30
- "@rdfjs/data-model": "^1.2.0",
41
+ "@ldo/cli": "^1.0.0-alpha.21",
31
42
  "@rdfjs/types": "^1.0.1",
32
43
  "@solid-notifications/types": "^0.1.2",
33
44
  "@solid/community-server": "^7.1.3",
34
45
  "cross-env": "^7.0.3",
35
46
  "dotenv": "^16.3.1",
36
47
  "jest-rdf": "^1.8.0",
48
+ "nextgraph": "^0.1.1-alpha.7",
37
49
  "start-server-and-test": "^2.0.11",
38
50
  "ts-node": "^10.9.1",
39
51
  "typed-emitter": "^2.1.0",
@@ -41,13 +53,13 @@
41
53
  "typedoc-plugin-markdown": "^3.17.1"
42
54
  },
43
55
  "dependencies": {
44
- "@ldo/dataset": "^1.0.0-alpha.2",
45
- "@ldo/ldo": "^1.0.0-alpha.2",
46
- "@ldo/rdf-utils": "^1.0.0-alpha.2",
56
+ "@ldo/connected": "^1.0.0-alpha.21",
57
+ "@ldo/dataset": "^1.0.0-alpha.21",
58
+ "@ldo/ldo": "^1.0.0-alpha.21",
59
+ "@ldo/rdf-utils": "^1.0.0-alpha.21",
47
60
  "@solid-notifications/subscription": "^0.1.2",
48
61
  "cross-fetch": "^3.1.6",
49
62
  "http-link-header": "^1.1.1",
50
- "nextgraph": "^0.1.1-alpha.7",
51
63
  "ws": "^8.18.0"
52
64
  },
53
65
  "files": [
@@ -57,5 +69,5 @@
57
69
  "publishConfig": {
58
70
  "access": "public"
59
71
  },
60
- "gitHead": "ba5cbcfa79af530258cad3b7ae1478a6673befea"
72
+ "gitHead": "1a85b65e4e84bb1f1322a6de4fdc6d5bf649ddfd"
61
73
  }
@@ -1,10 +1,12 @@
1
1
  import type { ConnectedContext, ConnectedPlugin } from "@ldo/connected";
2
- import type { NextGraphUri } from "./types";
3
- import { NextGraphResource } from "./resources/NextGraphResource";
4
- import ng from "nextgraph";
5
- import { isNextGraphUri } from "./util/isNextGraphUri";
2
+ import type { NextGraphUri } from "./types.js";
3
+ import { NextGraphResource } from "./resources/NextGraphResource.js";
4
+ import { isNextGraphUri } from "./util/isNextGraphUri.js";
6
5
 
7
6
  export interface NextGraphConnectedContext {
7
+ // NG does not have a type definition
8
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
+ ng?: any;
8
10
  sessionId?: string;
9
11
  protectedStoreId?: string;
10
12
  privateStoreId?: string;
@@ -14,6 +16,7 @@ export interface NextGraphConnectedContext {
14
16
  export interface NextGraphCreateResourceOptions {
15
17
  storeType?: "public" | "protected" | "private" | "group" | "dialog";
16
18
  storeRepo?: string;
19
+ primaryClass?: string;
17
20
  }
18
21
 
19
22
  export interface NextGraphConnectedPlugin
@@ -56,11 +59,12 @@ export const nextGraphConnectedPlugin: NextGraphConnectedPlugin = {
56
59
  : storeType === "private"
57
60
  ? context.nextgraph.privateStoreId
58
61
  : undefined);
62
+ const primaryClass = options?.primaryClass ?? "data:graph";
59
63
 
60
- const nuri: NextGraphUri = await ng.doc_create(
64
+ const nuri: NextGraphUri = await context.nextgraph.ng.doc_create(
61
65
  context.nextgraph.sessionId,
62
66
  "Graph",
63
- "data:graph",
67
+ primaryClass,
64
68
  "store",
65
69
  storeType,
66
70
  storeRepo,
@@ -1,5 +1,5 @@
1
1
  import { ConnectedLdoDataset } from "@ldo/connected";
2
- import { nextGraphConnectedPlugin } from "./NextGraphConnectedPlugin";
2
+ import { nextGraphConnectedPlugin } from "./NextGraphConnectedPlugin.js";
3
3
  import { createDatasetFactory } from "@ldo/dataset";
4
4
  import { createTransactionDatasetFactory } from "@ldo/subscribable-dataset";
5
5
 
package/src/index.ts CHANGED
@@ -1,8 +1,10 @@
1
- export * from "./types";
2
- export * from "./NextGraphConnectedPlugin";
1
+ export * from "./types.js";
2
+ export * from "./NextGraphConnectedPlugin.js";
3
3
 
4
- export * from "./resources/NextGraphResource";
4
+ export * from "./resources/NextGraphResource.js";
5
5
 
6
- export * from "./util/isNextGraphUri";
6
+ export * from "./util/isNextGraphUri.js";
7
7
 
8
- export * from "./results/NextGraphReadSuccess";
8
+ export * from "./results/NextGraphReadSuccess.js";
9
+
10
+ export * from "./createNextGraphLdoDataset.js";
@@ -1,7 +1,6 @@
1
1
  import { NotificationSubscription } from "@ldo/connected";
2
- import type { NextGraphConnectedPlugin } from "../NextGraphConnectedPlugin";
3
- import type { NextGraphNotificationMessage } from "./NextGraphNotificationMessage";
4
- import ng from "nextgraph";
2
+ import type { NextGraphConnectedPlugin } from "../NextGraphConnectedPlugin.js";
3
+ import type { NextGraphNotificationMessage } from "./NextGraphNotificationMessage.js";
5
4
 
6
5
  export class NextGraphNotificationSubscription extends NotificationSubscription<
7
6
  NextGraphConnectedPlugin,
@@ -10,8 +9,7 @@ export class NextGraphNotificationSubscription extends NotificationSubscription<
10
9
  private unsub: (() => void) | undefined;
11
10
 
12
11
  protected async open(): Promise<void> {
13
- console.log("THIS WAS OPENED AND IT SHOULDNT BE");
14
- this.unsub = await ng.doc_subscribe(
12
+ this.unsub = await this.context.nextgraph.ng.doc_subscribe(
15
13
  this.resource.uri,
16
14
  this.context.nextgraph.sessionId,
17
15
  this.onNotification.bind(this),
@@ -10,20 +10,18 @@ import {
10
10
  type Resource,
11
11
  type ResourceEventEmitter,
12
12
  } from "@ldo/connected";
13
- import type { NextGraphUri } from "../types";
13
+ import type { NextGraphUri } from "../types.js";
14
14
  import EventEmitter from "events";
15
- import type { NextGraphConnectedPlugin } from "../NextGraphConnectedPlugin";
16
- import ng from "nextgraph";
15
+ import type { NextGraphConnectedPlugin } from "../NextGraphConnectedPlugin.js";
17
16
  import { changesToSparqlUpdate, type DatasetChanges } from "@ldo/rdf-utils";
18
- import type { NextGraphNotificationMessage } from "../notifications/NextGraphNotificationMessage";
17
+ import type { NextGraphNotificationMessage } from "../notifications/NextGraphNotificationMessage.js";
19
18
  import type { Dataset, Quad } from "@rdfjs/types";
20
- import { namedNode, quad as createQuad } from "@rdfjs/data-model";
21
- import { NextGraphReadSuccess } from "../results/NextGraphReadSuccess";
22
- import { NextGraphNotificationSubscription } from "../notifications/NextGraphNotificationSubscription";
19
+ import { namedNode, quad as createQuad } from "@ldo/rdf-utils";
20
+ import { NextGraphReadSuccess } from "../results/NextGraphReadSuccess.js";
21
+ import { NextGraphNotificationSubscription } from "../notifications/NextGraphNotificationSubscription.js";
23
22
  import { parseRdf } from "@ldo/ldo";
24
23
  import type { LdoDataset } from "@ldo/ldo";
25
24
  import { createDataset } from "@ldo/dataset";
26
-
27
25
  export class NextGraphResource
28
26
  extends (EventEmitter as new () => ResourceEventEmitter)
29
27
  implements Resource<NextGraphUri>
@@ -123,25 +121,15 @@ export class NextGraphResource
123
121
  this.loading = true;
124
122
  this.emit("update");
125
123
 
126
- // Fetch the data once using subscribe
127
- await new Promise<void>(async (resolve, reject) => {
128
- let unsub: () => void;
129
- try {
130
- unsub = await ng.doc_subscribe(
131
- this.uri,
132
- this.context.nextgraph.sessionId,
133
- async (response: NextGraphNotificationMessage) => {
134
- if (response.V0.State) {
135
- unsub();
136
- await this.onNotification(response);
137
- resolve();
138
- }
139
- },
140
- );
141
- } catch (err) {
142
- reject(err);
143
- }
144
- });
124
+ // Fetch the data once using construct
125
+ const sparqlResult = await this.context.nextgraph.ng.sparql_query(
126
+ this.context.nextgraph.sessionId,
127
+ `CONSTRUCT { ?s ?p ?o } WHERE { GRAPH <${this.uri}> { ?s ?p ?o } }`,
128
+ undefined,
129
+ this.uri,
130
+ );
131
+ // Update the dataset
132
+ this.overwriteQuads(sparqlResult);
145
133
 
146
134
  // Update statuses
147
135
  const result = new NextGraphReadSuccess(this, false);
@@ -188,7 +176,7 @@ export class NextGraphResource
188
176
 
189
177
  try {
190
178
  // Perform Update with remote
191
- await ng.sparql_update(
179
+ await this.context.nextgraph.ng.sparql_update(
192
180
  this.context.nextgraph.sessionId,
193
181
  await changesToSparqlUpdate(datasetChanges),
194
182
  this.uri,
@@ -216,7 +204,14 @@ export class NextGraphResource
216
204
  )
217
205
  ).reduce((agg, ldoDataset) => {
218
206
  ldoDataset.forEach((quad) => {
219
- agg.add(quad);
207
+ agg.add(
208
+ createQuad(
209
+ quad.subject,
210
+ quad.predicate,
211
+ quad.object,
212
+ namedNode(this.uri),
213
+ ),
214
+ );
220
215
  });
221
216
  return agg;
222
217
  }, createDataset());
@@ -1,5 +1,5 @@
1
1
  import { ReadSuccess } from "@ldo/connected";
2
- import type { NextGraphResource } from "../resources/NextGraphResource";
2
+ import type { NextGraphResource } from "../resources/NextGraphResource.js";
3
3
 
4
4
  export class NextGraphReadSuccess extends ReadSuccess<NextGraphResource> {
5
5
  type = "nextGraphReadSuccess" as const;
@@ -1,4 +1,4 @@
1
- import type { NextGraphUri } from "../types";
1
+ import type { NextGraphUri } from "../types.js";
2
2
 
3
3
  /**
4
4
  * Checks if a provided string is a leaf URI
@@ -1 +0,0 @@
1
- {"version":3,"file":"NextGraphConnectedPlugin.js","sourceRoot":"","sources":["../src/NextGraphConnectedPlugin.ts"],"names":[],"mappings":";;;;;;AAEA,qEAAkE;AAClE,0DAA2B;AAC3B,0DAAuD;AA8B1C,QAAA,wBAAwB,GAA6B;IAChE,IAAI,EAAE,WAAW;IAEjB,WAAW,EAAE,UACX,GAAiB,EACjB,OAAqD;QAErD,OAAO,IAAI,qCAAiB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;IAED,cAAc,EAAE,KAAK,WACnB,OAAqD,EACrD,OAAwC;QAExC,MAAM,SAAS,GAAG,OAAO,EAAE,SAAS,CAAC;QACrC,MAAM,SAAS,GACb,OAAO,EAAE,SAAS;YAClB,CAAC,SAAS,KAAK,WAAW;gBACxB,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,gBAAgB;gBACpC,CAAC,CAAC,SAAS,KAAK,QAAQ;oBACxB,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,aAAa;oBACjC,CAAC,CAAC,SAAS,KAAK,SAAS;wBACzB,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,cAAc;wBAClC,CAAC,CAAC,SAAS,CAAC,CAAC;QAEjB,MAAM,IAAI,GAAiB,MAAM,mBAAE,CAAC,UAAU,CAC5C,OAAO,CAAC,SAAS,CAAC,SAAS,EAC3B,OAAO,EACP,YAAY,EACZ,OAAO,EACP,SAAS,EACT,SAAS,CACV,CAAC;QACF,MAAM,WAAW,GAAG,IAAI,qCAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACzD,MAAM,WAAW,CAAC,IAAI,EAAE,CAAC;QACzB,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,UAAU,EAAE,UAAU,GAAW;QAC/B,OAAO,IAAA,+BAAc,EAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAED,cAAc,EAAE;QACd,SAAS,EAAE,SAAS;KACrB;IAGD,KAAK,EAAE,EAAE;CACV,CAAC"}
@@ -1,2 +0,0 @@
1
- import { ConnectedLdoDataset } from "@ldo/connected";
2
- export declare function createNextGraphLdoDataset(): ConnectedLdoDataset<import("./NextGraphConnectedPlugin").NextGraphConnectedPlugin[]>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"createNextGraphLdoDataset.js","sourceRoot":"","sources":["../src/createNextGraphLdoDataset.ts"],"names":[],"mappings":";;;AAAA,8CAAqD;AACrD,yEAAsE;AACtE,0CAAoD;AACpD,oEAA4E;AAE5E,SAAgB,yBAAyB;IACvC,MAAM,mBAAmB,GAAG,IAAI,+BAAmB,CACjD,CAAC,mDAAwB,CAAC,EAC1B,IAAA,8BAAoB,GAAE,EACtB,IAAA,sDAA+B,GAAE,CAClC,CAAC;IACF,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAPD,8DAOC"}
@@ -1,2 +0,0 @@
1
- import { ConnectedLdoDataset } from "@ldo/connected";
2
- export declare function createNextGraphLdoDataset(): ConnectedLdoDataset<import("./NextGraphConnectedPlugin").NextGraphConnectedPlugin[]>;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createNextGraphLdoDataset = void 0;
4
- const connected_1 = require("@ldo/connected");
5
- const NextGraphConnectedPlugin_1 = require("./NextGraphConnectedPlugin");
6
- const dataset_1 = require("@ldo/dataset");
7
- const subscribable_dataset_1 = require("@ldo/subscribable-dataset");
8
- function createNextGraphLdoDataset() {
9
- const nextGraphLdoDataset = new connected_1.ConnectedLdoDataset([NextGraphConnectedPlugin_1.nextGraphConnectedPlugin], (0, dataset_1.createDatasetFactory)(), (0, subscribable_dataset_1.createTransactionDatasetFactory)());
10
- return nextGraphLdoDataset;
11
- }
12
- exports.createNextGraphLdoDataset = createNextGraphLdoDataset;
13
- //# sourceMappingURL=createSolidLdoDataset.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createSolidLdoDataset.js","sourceRoot":"","sources":["../src/createSolidLdoDataset.ts"],"names":[],"mappings":";;;AAAA,8CAAqD;AACrD,yEAAsE;AACtE,0CAAoD;AACpD,oEAA4E;AAE5E,SAAgB,yBAAyB;IACvC,MAAM,mBAAmB,GAAG,IAAI,+BAAmB,CACjD,CAAC,mDAAwB,CAAC,EAC1B,IAAA,8BAAoB,GAAE,EACtB,IAAA,sDAA+B,GAAE,CAClC,CAAC;IACF,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAPD,8DAOC"}
package/dist/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export * from "./types";
2
- export * from "./NextGraphConnectedPlugin";
3
- export * from "./resources/NextGraphResource";
4
- export * from "./util/isNextGraphUri";
5
- export * from "./results/NextGraphReadSuccess";
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6DAA2C;AAE3C,gEAA8C;AAE9C,wDAAsC;AAEtC,iEAA+C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NextGraphNotificationMessage.js","sourceRoot":"","sources":["../../src/notifications/NextGraphNotificationMessage.ts"],"names":[],"mappings":""}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.NextGraphNotificationSubscription = void 0;
7
- const connected_1 = require("@ldo/connected");
8
- const nextgraph_1 = __importDefault(require("nextgraph"));
9
- class NextGraphNotificationSubscription extends connected_1.NotificationSubscription {
10
- async open() {
11
- console.log("THIS WAS OPENED AND IT SHOULDNT BE");
12
- this.unsub = await nextgraph_1.default.doc_subscribe(this.resource.uri, this.context.nextgraph.sessionId, this.onNotification.bind(this));
13
- }
14
- async close() {
15
- this.unsub?.();
16
- this.unsub = undefined;
17
- }
18
- }
19
- exports.NextGraphNotificationSubscription = NextGraphNotificationSubscription;
20
- //# sourceMappingURL=NextGraphNotificationSubscription.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NextGraphNotificationSubscription.js","sourceRoot":"","sources":["../../src/notifications/NextGraphNotificationSubscription.ts"],"names":[],"mappings":";;;;;;AAAA,8CAA0D;AAG1D,0DAA2B;AAE3B,MAAa,iCAAkC,SAAQ,oCAGtD;IAGW,KAAK,CAAC,IAAI;QAClB,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;QAClD,IAAI,CAAC,KAAK,GAAG,MAAM,mBAAE,CAAC,aAAa,CACjC,IAAI,CAAC,QAAQ,CAAC,GAAG,EACjB,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,EAChC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAC/B,CAAC;IACJ,CAAC;IAES,KAAK,CAAC,KAAK;QACnB,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;IACzB,CAAC;CACF;AAnBD,8EAmBC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NextGraphResource.js","sourceRoot":"","sources":["../../src/resources/NextGraphResource.ts"],"names":[],"mappings":";;;;;;AAKA,8CAAwE;AACxE,8CAKwB;AAExB,oDAAkC;AAElC,0DAA2B;AAC3B,8CAA4E;AAG5E,kDAAkE;AAClE,0EAAuE;AACvE,0GAAuG;AACvG,kCAAoC;AAEpC,0CAA6C;AAE7C,MAAa,iBACX,SAAS,gBAA+C;IAsBxD,YACE,GAAiB,EACjB,OAAqD;QAErD,KAAK,EAAE,CAAC;QAtBM,SAAI,GAAG,mBAA4B,CAAC;QACpC,YAAO,GAAG,KAAc,CAAC;QAIjC,YAAO,GAAY,KAAK,CAAC;QACzB,YAAO,GAAY,KAAK,CAAC;QACzB,YAAO,GAAwB,SAAS,CAAC;QAgB/C,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,IAAI,qBAAS,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,wBAAwB,GAAG,IAAI,qEAAiC,CACnE,IAAI,EACJ,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAC9B,IAAI,CAAC,OAAO,CACb,CAAC;IACJ,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,WAAW;QACT,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;IACvB,CAAC;IAED,mBAAmB;QACjB,OAAO,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;IACvC,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,QAAQ;QACN,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;IACvB,CAAC;IAED,2BAA2B;QACzB,OAAO,IAAI,CAAC,wB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AAC;YAEF,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;gBACxB,KAAK;gBACL,OAAO;aACR,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,KAAK,CAAC,wBAAwB,CAC5B,SAA+D;QAE/D,OAAO,MAAM,IAAI,CAAC,wBAAwB,CAAC,wBAAwB,CACjE,SAAS,CACV,CAAC;IACJ,CAAC;IAED,4BAA4B,CAAC,cAAsB;QACjD,OAAO,IAAI,CAAC,wBAAwB,CAAC,2BAA2B,CAC9D,cAAc,CACf,CAAC;IACJ,CAAC;IAED,+BAA+B;QAC7B,OAAO,IAAI,CAAC,wBAAwB,CAAC,+BAA+B,EAAE,CAAC;IACzE,CAAC;CACF;AAxPD,8CAwPC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NextGraphReadSuccess.js","sourceRoot":"","sources":["../../src/results/NextGraphReadSuccess.ts"],"names":[],"mappings":";;;AAAA,8CAA6C;AAG7C,MAAa,oBAAqB,SAAQ,uBAA8B;IAAxE;;QACE,SAAI,GAAG,sBAA+B,CAAC;IACzC,CAAC;CAAA;AAFD,oDAEC"}
@@ -1,5 +0,0 @@
1
- import { ErrorResult } from "@ldo/connected";
2
- export declare class NoNextGraphStoreError extends ErrorResult {
3
- type: "noNextGraphStore";
4
- constructor(message?: string);
5
- }
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NoNextGraphStoreError = void 0;
4
- const connected_1 = require("@ldo/connected");
5
- class NoNextGraphStoreError extends connected_1.ErrorResult {
6
- constructor(message) {
7
- super(message ?? "No NextGraph store was provided.");
8
- this.type = "noNextGraphStore";
9
- }
10
- }
11
- exports.NoNextGraphStoreError = NoNextGraphStoreError;
12
- //# sourceMappingURL=NoNextGraphStoreError.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NoNextGraphStoreError.js","sourceRoot":"","sources":["../../src/results/NoNextGraphStoreError.ts"],"names":[],"mappings":";;;AAAA,8CAA6C;AAE7C,MAAa,qBAAsB,SAAQ,uBAAW;IAEpD,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,IAAI,kCAAkC,CAAC,CAAC;QAFvD,SAAI,GAAG,kBAA2B,CAAC;IAGnC,CAAC;CACF;AALD,sDAKC"}
package/dist/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NextGraphNotificationMessage.js","sourceRoot":"","sources":["../../src/util/NextGraphNotificationMessage.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import type { NextGraphUri } from "../types";
2
- export declare function isNextGraphUri(uri: string): uri is NextGraphUri;