@graffiti-garden/wrapper-synchronize 1.0.4 → 1.0.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graffiti-garden/wrapper-synchronize",
3
- "version": "1.0.4",
3
+ "version": "1.0.7",
4
4
  "description": "Internal synchronization for the Graffiti API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "module": "./dist/esm/index.js",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "homepage": "https://sync.graffiti.garden/classes/GraffitiSynchronize.html",
47
47
  "devDependencies": {
48
- "@graffiti-garden/implementation-local": "^1.0.4",
48
+ "@graffiti-garden/implementation-local": "^1.0.7",
49
49
  "@types/node": "^25.0.6",
50
50
  "@vitest/coverage-v8": "^4.0.17",
51
51
  "esbuild-plugin-polyfill-node": "^0.3.0",
@@ -55,7 +55,7 @@
55
55
  "vitest": "^4.0.17"
56
56
  },
57
57
  "dependencies": {
58
- "@graffiti-garden/api": "^1.0.4",
58
+ "@graffiti-garden/api": "^1.0.7",
59
59
  "@repeaterjs/repeater": "^3.0.6",
60
60
  "ajv": "^8.17.1"
61
61
  }
package/src/index.spec.ts CHANGED
@@ -4,7 +4,11 @@ import {
4
4
  type GraffitiSession,
5
5
  } from "@graffiti-garden/api";
6
6
  import { GraffitiLocal } from "@graffiti-garden/implementation-local";
7
- import { randomPostObject, randomString } from "@graffiti-garden/api/tests";
7
+ import {
8
+ randomPostObject,
9
+ randomString,
10
+ randomUrl,
11
+ } from "@graffiti-garden/api/tests";
8
12
  import { GraffitiSynchronize } from "./index";
9
13
  import {
10
14
  graffitiCRUDTests,
@@ -12,17 +16,18 @@ import {
12
16
  graffitiMediaTests,
13
17
  } from "@graffiti-garden/api/tests";
14
18
 
19
+ // @ts-ignore
15
20
  const useGraffiti = () => new GraffitiSynchronize(new GraffitiLocal());
16
21
  const graffiti = useGraffiti();
17
22
 
18
23
  const useSession1 = async () => {
19
24
  return {
20
- actor: randomString(),
25
+ actor: randomUrl(),
21
26
  };
22
27
  };
23
28
  const useSession2 = async () => {
24
29
  return {
25
- actor: randomString(),
30
+ actor: randomUrl(),
26
31
  };
27
32
  };
28
33
 
@@ -171,7 +176,7 @@ describe.concurrent("synchronizeDiscover", () => {
171
176
  });
172
177
 
173
178
  it("not allowed", async () => {
174
- const allChannels = [randomString(), randomString(), randomString()];
179
+ const allChannels = [randomUrl(), randomUrl(), randomUrl()];
175
180
  const channels = allChannels.slice(1);
176
181
 
177
182
  const creatorNext = graffiti
@@ -185,7 +190,7 @@ describe.concurrent("synchronizeDiscover", () => {
185
190
  const value = {
186
191
  hello: "world",
187
192
  };
188
- const allowed = [randomString(), session2.actor];
193
+ const allowed = [randomUrl(), session2.actor];
189
194
  await graffiti.post<{}>(
190
195
  { value, channels: allChannels, allowed },
191
196
  session1,
@@ -336,7 +341,7 @@ describe("synchronizeAll", () => {
336
341
  });
337
342
 
338
343
  const object1 = randomPostObject();
339
- object1.allowed = [randomString()];
344
+ object1.allowed = [randomUrl()];
340
345
 
341
346
  const iterator = graffiti.synchronizeAll({});
342
347
  const next = iterator.next();