@cursorpool-dev/cli 0.5.8 → 0.5.10

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 (49) hide show
  1. package/node_modules/@cursor-pool/extension/dist/extension.js +46 -116
  2. package/node_modules/@cursor-pool/extension/package.json +3 -3
  3. package/node_modules/@cursor-pool/extension/src/api.ts +2 -17
  4. package/node_modules/@cursor-pool/extension/src/panel.ts +3 -26
  5. package/node_modules/@cursor-pool/extension/test/panel.test.ts +1 -34
  6. package/node_modules/@cursor-pool/patcher/package.json +2 -2
  7. package/node_modules/@cursor-pool/patcher/src/marker.ts +72 -7
  8. package/node_modules/@cursor-pool/patcher/src/workbenchAuthGateMarker.ts +102 -19
  9. package/node_modules/@cursor-pool/patcher/test/patchCursorAgentExec.test.ts +88 -13
  10. package/node_modules/@cursor-pool/patcher/test/patchCursorWorkbench.test.ts +162 -149
  11. package/node_modules/@cursor-pool/service/package.json +2 -2
  12. package/node_modules/@cursor-pool/service/src/platformSession.ts +7 -30
  13. package/node_modules/@cursor-pool/service/src/server.ts +1 -1
  14. package/node_modules/@cursor-pool/service/test/platformSession.test.ts +4 -5
  15. package/node_modules/@cursor-pool/service/test/server.test.ts +1 -130
  16. package/node_modules/@cursor-pool/shared/package.json +1 -1
  17. package/node_modules/@cursor-pool/shared/src/manifest.ts +0 -35
  18. package/node_modules/@cursor-pool/shared/test/manifest.test.ts +9 -43
  19. package/package.json +5 -7
  20. package/src/compat.ts +201 -194
  21. package/src/cursor.ts +45 -4
  22. package/src/extensionBundle.ts +1 -1
  23. package/src/extensionLink.ts +8 -29
  24. package/src/install.ts +10 -62
  25. package/src/installRecord.ts +0 -2
  26. package/src/patchSet.ts +49 -13
  27. package/src/platform.ts +3 -3
  28. package/src/repair.ts +9 -13
  29. package/src/restore.ts +11 -12
  30. package/src/status.ts +5 -9
  31. package/src/target.ts +12 -0
  32. package/src/trial.ts +2 -3
  33. package/src/uninstall.ts +6 -2
  34. package/test/compat.test.ts +146 -192
  35. package/test/cursor.test.ts +54 -0
  36. package/test/e2e-install.test.ts +29 -46
  37. package/test/extensionLink.test.ts +26 -49
  38. package/test/install.test.ts +4 -64
  39. package/test/patchSet.test.ts +71 -0
  40. package/test/repair.test.ts +131 -1
  41. package/test/restore.test.ts +59 -3
  42. package/test/status.test.ts +0 -1
  43. package/test/target.test.ts +28 -0
  44. package/test/trial.test.ts +15 -1
  45. package/node_modules/@cursor-pool/takeover-plans/package.json +0 -12
  46. package/node_modules/@cursor-pool/takeover-plans/src/index.ts +0 -22
  47. package/node_modules/@cursor-pool/takeover-plans/src/plans.ts +0 -37
  48. package/node_modules/@cursor-pool/takeover-plans/src/types.ts +0 -9
  49. package/node_modules/@cursor-pool/takeover-plans/test/registry.test.ts +0 -23
@@ -1,7 +1,7 @@
1
1
  import assert from 'node:assert/strict';
2
2
  import { mkdir, mkdtemp, readFile, rm, symlink } from 'node:fs/promises';
3
3
  import { tmpdir } from 'node:os';
4
- import { join } from 'node:path';
4
+ import { join, relative, resolve } from 'node:path';
5
5
  import test from 'node:test';
6
6
  import {
7
7
  assertDisposableCursorAppPath,
@@ -55,6 +55,20 @@ test('assertDisposableCursorAppPath accepts a disposable app copy path', () => {
55
55
  );
56
56
  });
57
57
 
58
+ test('assertDisposableCursorAppPath normalizes relative disposable app paths to absolute paths', async () => {
59
+ const tempDir = await mkdtemp(join(process.cwd(), '.cursor-pool-relative-app-path-'));
60
+ const appPath = join(tempDir, 'Cursor-Trial.app');
61
+
62
+ try {
63
+ await mkdir(appPath, { recursive: true });
64
+ const relativeAppPath = relative(process.cwd(), appPath);
65
+
66
+ assert.equal(assertDisposableCursorAppPath(relativeAppPath), resolve(appPath));
67
+ } finally {
68
+ await rm(tempDir, { recursive: true, force: true });
69
+ }
70
+ });
71
+
58
72
  test('assertDisposableCursorAppPath rejects non app bundle paths', () => {
59
73
  assert.throws(
60
74
  () => assertDisposableCursorAppPath('/Users/example/Desktop/Cursor-Pool-Trial'),
@@ -1,12 +0,0 @@
1
- {
2
- "name": "@cursor-pool/takeover-plans",
3
- "version": "0.5.8",
4
- "type": "module",
5
- "main": "./src/index.ts",
6
- "exports": {
7
- ".": "./src/index.ts"
8
- },
9
- "scripts": {
10
- "test": "tsx --test test/*.test.ts"
11
- }
12
- }
@@ -1,22 +0,0 @@
1
- import { TAKEOVER_PLANS } from './plans';
2
-
3
- export { TAKEOVER_PLANS } from './plans';
4
- export type { TakeoverPlan } from './types';
5
-
6
- export const BUNDLED_TAKEOVER_PLAN_IDS = TAKEOVER_PLANS.map((plan) => plan.id);
7
-
8
- export function isBundledTakeoverPlanId(value: string) {
9
- return BUNDLED_TAKEOVER_PLAN_IDS.includes(value);
10
- }
11
-
12
- export function assertBundledTakeoverPlan(value: string) {
13
- if (!isBundledTakeoverPlanId(value)) {
14
- throw new Error(`takeover plan ${value} is not bundled in this client`);
15
- }
16
- return value;
17
- }
18
-
19
- export function getTakeoverPlan(value: string) {
20
- return TAKEOVER_PLANS.find((plan) => plan.id === value);
21
- }
22
-
@@ -1,37 +0,0 @@
1
- import type { TakeoverPlan } from './types';
2
-
3
- export const TAKEOVER_PLANS: TakeoverPlan[] = [
4
- {
5
- id: 'cursor-3.4-mac-agent-d-workbench-u0',
6
- adapterVersion: '0.4.8',
7
- cursorOfficialMajor: '3.4',
8
- platform: 'darwin',
9
- arch: 'arm64',
10
- structureFamily: 'mac-agent-D-workbench-U0',
11
- },
12
- {
13
- id: 'cursor-3.5-mac-agent-f-workbench-p-l0',
14
- adapterVersion: '0.5.8',
15
- cursorOfficialMajor: '3.5',
16
- platform: 'darwin',
17
- arch: 'arm64',
18
- structureFamily: 'mac-agent-F-workbench-p-L0',
19
- },
20
- {
21
- id: 'cursor-3.6-mac-agent-c-workbench-h-uv',
22
- adapterVersion: '0.5.8',
23
- cursorOfficialMajor: '3.6',
24
- platform: 'darwin',
25
- arch: 'arm64',
26
- structureFamily: 'mac-agent-c-workbench-h-uv',
27
- },
28
- {
29
- id: 'cursor-3.7-mac-agent-et-workbench-wv',
30
- adapterVersion: '0.6.0',
31
- cursorOfficialMajor: '3.7',
32
- platform: 'darwin',
33
- arch: 'arm64',
34
- structureFamily: 'mac-3.7-agent-Et-workbench-wv',
35
- },
36
- ];
37
-
@@ -1,9 +0,0 @@
1
- export type TakeoverPlan = {
2
- id: string;
3
- adapterVersion: string;
4
- cursorOfficialMajor: string;
5
- platform: NodeJS.Platform | string;
6
- arch: string;
7
- structureFamily: string;
8
- };
9
-
@@ -1,23 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import test from 'node:test';
3
- import { BUNDLED_TAKEOVER_PLAN_IDS, assertBundledTakeoverPlan } from '../src/index';
4
-
5
- test('bundles current macOS takeover plans by stable id', () => {
6
- assert.deepEqual(
7
- [...BUNDLED_TAKEOVER_PLAN_IDS].sort(),
8
- [
9
- 'cursor-3.4-mac-agent-d-workbench-u0',
10
- 'cursor-3.5-mac-agent-f-workbench-p-l0',
11
- 'cursor-3.6-mac-agent-c-workbench-h-uv',
12
- 'cursor-3.7-mac-agent-et-workbench-wv',
13
- ],
14
- );
15
- });
16
-
17
- test('rejects a compatibility rule whose takeover plan is not bundled', () => {
18
- assert.throws(
19
- () => assertBundledTakeoverPlan('cursor-9.9-not-bundled'),
20
- /not bundled in this client/,
21
- );
22
- });
23
-