@wirecat/cli-core 0.713.0 → 0.715.0

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 (39) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/dist/background/lock.d.ts +7 -0
  3. package/dist/background/lock.js +15 -0
  4. package/dist/cli/account-remove.d.ts +14 -0
  5. package/dist/cli/account-remove.js +2 -2
  6. package/dist/cli/account-rename.d.ts +15 -0
  7. package/dist/cli/account-rename.js +240 -0
  8. package/dist/cli/bot/api.js +2 -1
  9. package/dist/cli/documents/words.d.ts +1 -1
  10. package/dist/cli/index.d.ts +1 -0
  11. package/dist/cli/index.js +1 -0
  12. package/dist/cli/messenger/account-command.js +6 -0
  13. package/dist/cli/messenger/serve-command.js +16 -1
  14. package/dist/cli/messenger/server-command.js +4 -2
  15. package/dist/cli/profile-files.js +1 -0
  16. package/dist/cli/profile-token.js +6 -3
  17. package/dist/cli/service-api.js +31 -3
  18. package/dist/errors/reasons.js +8 -0
  19. package/dist/search/lucene/types.d.ts +2 -0
  20. package/dist/search/lucene/types.js +8 -0
  21. package/dist/services/files/mirror.d.ts +2 -2
  22. package/dist/services/files/mirror.js +2 -2
  23. package/dist/store/sqlite/account-groups.js +18 -2
  24. package/dist/store/sqlite/admin-statistics.js +3 -2
  25. package/dist/store/sqlite/lucene.js +2 -2
  26. package/dist/store/sqlite/migrations.generated.js +2 -2
  27. package/dist/tracker/cli/index.js +9 -3
  28. package/dist/tracker/index.d.ts +1 -1
  29. package/dist/tracker/index.js +1 -1
  30. package/dist/tracker/sync.d.ts +8 -0
  31. package/dist/tracker/sync.js +29 -0
  32. package/dist/tracker/tasks.d.ts +24 -4
  33. package/dist/tracker/tasks.js +164 -18
  34. package/dist/tracker/testing/manifest-fake.js +13 -1
  35. package/dist/tracker/testing/source-contract.js +14 -0
  36. package/dist/tracker/testing/source.d.ts +2 -0
  37. package/dist/tracker/testing/source.js +2 -0
  38. package/package.json +1 -1
  39. package/parity.json +11 -0
@@ -11,6 +11,8 @@ export interface FakeTrackerSourceOptions {
11
11
  /** Rows on one page. */
12
12
  pageSize?: number;
13
13
  provider?: string;
14
+ /** The signed-in user's id, which `self()` answers; absent, the tracker cannot say. */
15
+ self?: string;
14
16
  }
15
17
  export interface FakeTrackerSource extends TrackerSource {
16
18
  /** Changes one row on the tracker's side: it gets a new `updatedAt`. */
@@ -17,9 +17,11 @@ export const fakeTrackerSource = (options) => {
17
17
  throw new Error(`the fake tracker has no ${kind} ${externalId}`);
18
18
  return found;
19
19
  };
20
+ const self = options.self;
20
21
  const make = (skew) => ({
21
22
  provider: options.provider ?? "fake-tracker",
22
23
  traits: { kinds: Object.keys(rows).filter((kind) => listOf(kind).length > 0) },
24
+ ...(self === undefined ? {} : { self: async () => self }),
23
25
  async changes(kind, cursor, page, _context) {
24
26
  const since = cursor === null ? null : Date.parse(cursor);
25
27
  if (since !== null && Number.isNaN(since))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/cli-core",
3
- "version": "0.713.0",
3
+ "version": "0.715.0",
4
4
  "description": "The messenger-neutral half of a messaging CLI: domain model, message locators, rendering, name resolution, the SQLite seam, the command skeleton and shared read commands, the send guard, run records and the message store",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Viacheslav Ptsarev",
package/parity.json CHANGED
@@ -1324,6 +1324,17 @@
1324
1324
  "wa": "account remove: adopt Messenger.accountRemoval (WireCat Desktop removal)"
1325
1325
  }
1326
1326
  },
1327
+ "account rename": {
1328
+ "in": [],
1329
+ "options": {
1330
+ "--dry-run": "all"
1331
+ },
1332
+ "planned": {
1333
+ "max": "account rename: set accountRemoval.signIn (WireCat Desktop account edit)",
1334
+ "tg": "account rename: set accountRemoval.signIn (WireCat Desktop account edit)",
1335
+ "wa": "account rename: set accountRemoval.signIn (WireCat Desktop account edit)"
1336
+ }
1337
+ },
1327
1338
  "account sessions": {
1328
1339
  "in": "all"
1329
1340
  },