@atlastodo/sdk 0.1.13 → 0.1.14-rc.1

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 (2) hide show
  1. package/dist/testing.js +4 -4
  2. package/package.json +3 -3
package/dist/testing.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  SyncClient,
6
6
  Keyring,
7
7
  SYNC_APPS_HEADER,
8
- appOfKind,
8
+ appOfWire,
9
9
  deriveApiTokenKeys,
10
10
  formatApiToken,
11
11
  generateApiToken,
@@ -98,7 +98,7 @@ class FakeServer {
98
98
  return expired();
99
99
  const scopeHeader = headers[SYNC_APPS_HEADER] ?? null;
100
100
  const scope = scopeHeader ? scopeHeader.split(",").map((a) => a.trim()) : ["todo"];
101
- const inScope = (op) => scope.includes(appOfKind(op.entity)?.app ?? "");
101
+ const inScope = (op) => scope.includes(appOfWire(op.entity)?.app ?? "");
102
102
  if (u.pathname.startsWith("/sync/")) {
103
103
  this.syncApps.push(scopeHeader);
104
104
  const outside = scope.find((a) => !this.apps.includes(a));
@@ -124,14 +124,14 @@ class FakeServer {
124
124
  }
125
125
  const outside = body.operations.find((op) => !inScope(op));
126
126
  if (outside) {
127
- const app = appOfKind(outside.entity)?.app ?? "unknown";
127
+ const app = appOfWire(outside.entity)?.app ?? "unknown";
128
128
  return json(403, { code: "app_not_enabled", app, scope: "session", error: "no" });
129
129
  }
130
130
  const from = this.seq;
131
131
  for (const op of body.operations) {
132
132
  if (this.ops.some((o) => o.id === op.id))
133
133
  continue;
134
- this.ops.push({ ...op, seq: ++this.seq });
134
+ this.ops.push({ ...op, pushed_by: USER_ID, seq: ++this.seq });
135
135
  }
136
136
  return json(200, { applied: body.operations.length, from, cursor: this.seq });
137
137
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlastodo/sdk",
3
- "version": "0.1.13",
3
+ "version": "0.1.14-rc.1",
4
4
  "description": "Headless Atlas client for integrations: signs in with a personal API token and syncs an account's tasks into memory",
5
5
  "license": "AGPL-3.0-only",
6
6
  "homepage": "https://github.com/atlastodo/atlas/tree/main/packages/sdk",
@@ -47,8 +47,8 @@
47
47
  "test": "vitest run"
48
48
  },
49
49
  "dependencies": {
50
- "@atlastodo/client-core": "0.1.13",
51
- "@atlastodo/shared": "0.1.13"
50
+ "@atlastodo/client-core": "0.1.14-rc.1",
51
+ "@atlastodo/shared": "0.1.14-rc.1"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/node": "^26.6.5",