@rehpic/vcli 0.1.0-beta.10.1 → 0.1.0-beta.101.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.
- package/README.md +25 -5
- package/dist/index.js +4634 -53
- package/dist/index.js.map +1 -1
- package/native/VectorMenuBar.app/Contents/Info.plist +26 -0
- package/native/VectorMenuBar.app/Contents/MacOS/VectorMenuBar +0 -0
- package/native/VectorMenuBar.app/Contents/Resources/vector-menubar.png +0 -0
- package/native/VectorMenuBar.app/Contents/Resources/vector-menubar@2x.png +0 -0
- package/native/VectorMenuBar.app/Contents/_CodeSignature/CodeResources +139 -0
- package/package.json +16 -3
- package/scripts/build-menubar-app.js +141 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
|
6
|
+
<string>en</string>
|
|
7
|
+
<key>CFBundleExecutable</key>
|
|
8
|
+
<string>VectorMenuBar</string>
|
|
9
|
+
<key>CFBundleIdentifier</key>
|
|
10
|
+
<string>com.vector.menubar</string>
|
|
11
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
|
12
|
+
<string>6.0</string>
|
|
13
|
+
<key>CFBundleName</key>
|
|
14
|
+
<string>VectorMenuBar</string>
|
|
15
|
+
<key>CFBundlePackageType</key>
|
|
16
|
+
<string>APPL</string>
|
|
17
|
+
<key>CFBundleShortVersionString</key>
|
|
18
|
+
<string>0.1.0</string>
|
|
19
|
+
<key>CFBundleVersion</key>
|
|
20
|
+
<string>0.1.0</string>
|
|
21
|
+
<key>LSUIElement</key>
|
|
22
|
+
<true/>
|
|
23
|
+
<key>NSHighResolutionCapable</key>
|
|
24
|
+
<true/>
|
|
25
|
+
</dict>
|
|
26
|
+
</plist>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>files</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>Resources/vector-menubar.png</key>
|
|
8
|
+
<data>
|
|
9
|
+
uKJjrrnqhJYev3NHV1pX+Cz4qQI=
|
|
10
|
+
</data>
|
|
11
|
+
<key>Resources/vector-menubar@2x.png</key>
|
|
12
|
+
<data>
|
|
13
|
+
t/R+3W8xUK6Ar293lUcHuhblZk8=
|
|
14
|
+
</data>
|
|
15
|
+
</dict>
|
|
16
|
+
<key>files2</key>
|
|
17
|
+
<dict>
|
|
18
|
+
<key>Resources/vector-menubar.png</key>
|
|
19
|
+
<dict>
|
|
20
|
+
<key>hash2</key>
|
|
21
|
+
<data>
|
|
22
|
+
hObrLaG3433jt7G9JjgdwZeFL1XBZC31ZVMrM6cgJYk=
|
|
23
|
+
</data>
|
|
24
|
+
</dict>
|
|
25
|
+
<key>Resources/vector-menubar@2x.png</key>
|
|
26
|
+
<dict>
|
|
27
|
+
<key>hash2</key>
|
|
28
|
+
<data>
|
|
29
|
+
h8/ToYyYOj6MU/TxMcBLHbbtFXUdhUBV0hiN1GgH/Vo=
|
|
30
|
+
</data>
|
|
31
|
+
</dict>
|
|
32
|
+
</dict>
|
|
33
|
+
<key>rules</key>
|
|
34
|
+
<dict>
|
|
35
|
+
<key>^Resources/</key>
|
|
36
|
+
<true/>
|
|
37
|
+
<key>^Resources/.*\.lproj/</key>
|
|
38
|
+
<dict>
|
|
39
|
+
<key>optional</key>
|
|
40
|
+
<true/>
|
|
41
|
+
<key>weight</key>
|
|
42
|
+
<real>1000</real>
|
|
43
|
+
</dict>
|
|
44
|
+
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
|
45
|
+
<dict>
|
|
46
|
+
<key>omit</key>
|
|
47
|
+
<true/>
|
|
48
|
+
<key>weight</key>
|
|
49
|
+
<real>1100</real>
|
|
50
|
+
</dict>
|
|
51
|
+
<key>^Resources/Base\.lproj/</key>
|
|
52
|
+
<dict>
|
|
53
|
+
<key>weight</key>
|
|
54
|
+
<real>1010</real>
|
|
55
|
+
</dict>
|
|
56
|
+
<key>^version.plist$</key>
|
|
57
|
+
<true/>
|
|
58
|
+
</dict>
|
|
59
|
+
<key>rules2</key>
|
|
60
|
+
<dict>
|
|
61
|
+
<key>.*\.dSYM($|/)</key>
|
|
62
|
+
<dict>
|
|
63
|
+
<key>weight</key>
|
|
64
|
+
<real>11</real>
|
|
65
|
+
</dict>
|
|
66
|
+
<key>^(.*/)?\.DS_Store$</key>
|
|
67
|
+
<dict>
|
|
68
|
+
<key>omit</key>
|
|
69
|
+
<true/>
|
|
70
|
+
<key>weight</key>
|
|
71
|
+
<real>2000</real>
|
|
72
|
+
</dict>
|
|
73
|
+
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
|
|
74
|
+
<dict>
|
|
75
|
+
<key>nested</key>
|
|
76
|
+
<true/>
|
|
77
|
+
<key>weight</key>
|
|
78
|
+
<real>10</real>
|
|
79
|
+
</dict>
|
|
80
|
+
<key>^.*</key>
|
|
81
|
+
<true/>
|
|
82
|
+
<key>^Info\.plist$</key>
|
|
83
|
+
<dict>
|
|
84
|
+
<key>omit</key>
|
|
85
|
+
<true/>
|
|
86
|
+
<key>weight</key>
|
|
87
|
+
<real>20</real>
|
|
88
|
+
</dict>
|
|
89
|
+
<key>^PkgInfo$</key>
|
|
90
|
+
<dict>
|
|
91
|
+
<key>omit</key>
|
|
92
|
+
<true/>
|
|
93
|
+
<key>weight</key>
|
|
94
|
+
<real>20</real>
|
|
95
|
+
</dict>
|
|
96
|
+
<key>^Resources/</key>
|
|
97
|
+
<dict>
|
|
98
|
+
<key>weight</key>
|
|
99
|
+
<real>20</real>
|
|
100
|
+
</dict>
|
|
101
|
+
<key>^Resources/.*\.lproj/</key>
|
|
102
|
+
<dict>
|
|
103
|
+
<key>optional</key>
|
|
104
|
+
<true/>
|
|
105
|
+
<key>weight</key>
|
|
106
|
+
<real>1000</real>
|
|
107
|
+
</dict>
|
|
108
|
+
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
|
109
|
+
<dict>
|
|
110
|
+
<key>omit</key>
|
|
111
|
+
<true/>
|
|
112
|
+
<key>weight</key>
|
|
113
|
+
<real>1100</real>
|
|
114
|
+
</dict>
|
|
115
|
+
<key>^Resources/Base\.lproj/</key>
|
|
116
|
+
<dict>
|
|
117
|
+
<key>weight</key>
|
|
118
|
+
<real>1010</real>
|
|
119
|
+
</dict>
|
|
120
|
+
<key>^[^/]+$</key>
|
|
121
|
+
<dict>
|
|
122
|
+
<key>nested</key>
|
|
123
|
+
<true/>
|
|
124
|
+
<key>weight</key>
|
|
125
|
+
<real>10</real>
|
|
126
|
+
</dict>
|
|
127
|
+
<key>^embedded\.provisionprofile$</key>
|
|
128
|
+
<dict>
|
|
129
|
+
<key>weight</key>
|
|
130
|
+
<real>20</real>
|
|
131
|
+
</dict>
|
|
132
|
+
<key>^version\.plist$</key>
|
|
133
|
+
<dict>
|
|
134
|
+
<key>weight</key>
|
|
135
|
+
<real>20</real>
|
|
136
|
+
</dict>
|
|
137
|
+
</dict>
|
|
138
|
+
</dict>
|
|
139
|
+
</plist>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rehpic/vcli",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.101.1",
|
|
4
4
|
"description": "Command line interface for Vector workspaces.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -28,19 +28,32 @@
|
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"dist",
|
|
31
|
+
"native",
|
|
32
|
+
"scripts",
|
|
31
33
|
"README.md"
|
|
32
34
|
],
|
|
33
35
|
"scripts": {
|
|
34
|
-
"build": "tsup --config tsup.config.ts"
|
|
36
|
+
"build": "node scripts/build-menubar-app.js && tsup --config tsup.config.ts"
|
|
35
37
|
},
|
|
36
38
|
"dependencies": {
|
|
39
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.79",
|
|
37
40
|
"@clack/prompts": "^1.1.0",
|
|
38
41
|
"commander": "^14.0.3",
|
|
39
42
|
"convex": "^1.33.1",
|
|
40
|
-
"dotenv": "^16.4.5"
|
|
43
|
+
"dotenv": "^16.4.5",
|
|
44
|
+
"localtunnel": "^2.0.2",
|
|
45
|
+
"node-datachannel": "^0.32.1",
|
|
46
|
+
"node-pty": "1.2.0-beta.12",
|
|
47
|
+
"tunnelmole": "^2.4.0",
|
|
48
|
+
"werift": "^0.22.9",
|
|
49
|
+
"ws": "^8.19.0"
|
|
41
50
|
},
|
|
42
51
|
"publishConfig": {
|
|
43
52
|
"access": "public",
|
|
44
53
|
"provenance": true
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@types/localtunnel": "^2.0.4",
|
|
57
|
+
"@types/ws": "^8.18.1"
|
|
45
58
|
}
|
|
46
59
|
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { execFileSync } from 'child_process';
|
|
4
|
+
import {
|
|
5
|
+
copyFileSync,
|
|
6
|
+
existsSync,
|
|
7
|
+
mkdirSync,
|
|
8
|
+
readFileSync,
|
|
9
|
+
rmSync,
|
|
10
|
+
writeFileSync,
|
|
11
|
+
} from 'fs';
|
|
12
|
+
import { dirname, join, resolve } from 'path';
|
|
13
|
+
import { fileURLToPath } from 'url';
|
|
14
|
+
|
|
15
|
+
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
|
16
|
+
const packageDir = resolve(scriptDir, '..');
|
|
17
|
+
const sourceFile = join(packageDir, 'macos', 'VectorMenuBar.swift');
|
|
18
|
+
const repoRoot = resolve(packageDir, '..', '..');
|
|
19
|
+
const menuBarIcon1x = join(
|
|
20
|
+
repoRoot,
|
|
21
|
+
'cli',
|
|
22
|
+
'macos',
|
|
23
|
+
'assets',
|
|
24
|
+
'vector-menubar.png',
|
|
25
|
+
);
|
|
26
|
+
const menuBarIcon2x = join(
|
|
27
|
+
repoRoot,
|
|
28
|
+
'cli',
|
|
29
|
+
'macos',
|
|
30
|
+
'assets',
|
|
31
|
+
'vector-menubar@2x.png',
|
|
32
|
+
);
|
|
33
|
+
const nativeDir = join(packageDir, 'native');
|
|
34
|
+
const appDir = join(nativeDir, 'VectorMenuBar.app');
|
|
35
|
+
const contentsDir = join(appDir, 'Contents');
|
|
36
|
+
const macOSDir = join(contentsDir, 'MacOS');
|
|
37
|
+
const resourcesDir = join(contentsDir, 'Resources');
|
|
38
|
+
const executablePath = join(macOSDir, 'VectorMenuBar');
|
|
39
|
+
const packageJsonPath = join(packageDir, 'package.json');
|
|
40
|
+
|
|
41
|
+
if (process.platform !== 'darwin') {
|
|
42
|
+
process.exit(0);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (!existsSync(sourceFile)) {
|
|
46
|
+
throw new Error(`Missing Swift source: ${sourceFile}`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (!existsSync(menuBarIcon1x) || !existsSync(menuBarIcon2x)) {
|
|
50
|
+
throw new Error('Missing Vector menu bar icon assets.');
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
rmSync(appDir, { recursive: true, force: true });
|
|
54
|
+
mkdirSync(macOSDir, { recursive: true });
|
|
55
|
+
mkdirSync(resourcesDir, { recursive: true });
|
|
56
|
+
|
|
57
|
+
const pkg = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
|
|
58
|
+
const buildDir = join(nativeDir, '.build');
|
|
59
|
+
rmSync(buildDir, { recursive: true, force: true });
|
|
60
|
+
mkdirSync(buildDir, { recursive: true });
|
|
61
|
+
|
|
62
|
+
const arm64Binary = join(buildDir, 'VectorMenuBar-arm64');
|
|
63
|
+
const x64Binary = join(buildDir, 'VectorMenuBar-x64');
|
|
64
|
+
|
|
65
|
+
buildTarget('arm64-apple-macos14.0', arm64Binary);
|
|
66
|
+
buildTarget('x86_64-apple-macos14.0', x64Binary);
|
|
67
|
+
|
|
68
|
+
execFileSync(
|
|
69
|
+
'lipo',
|
|
70
|
+
['-create', '-output', executablePath, arm64Binary, x64Binary],
|
|
71
|
+
{
|
|
72
|
+
stdio: 'inherit',
|
|
73
|
+
},
|
|
74
|
+
);
|
|
75
|
+
execFileSync('chmod', ['+x', executablePath], { stdio: 'inherit' });
|
|
76
|
+
rmSync(buildDir, { recursive: true, force: true });
|
|
77
|
+
copyFileSync(menuBarIcon1x, join(resourcesDir, 'vector-menubar.png'));
|
|
78
|
+
copyFileSync(menuBarIcon2x, join(resourcesDir, 'vector-menubar@2x.png'));
|
|
79
|
+
|
|
80
|
+
writeFileSync(
|
|
81
|
+
join(contentsDir, 'Info.plist'),
|
|
82
|
+
`<?xml version="1.0" encoding="UTF-8"?>
|
|
83
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
84
|
+
<plist version="1.0">
|
|
85
|
+
<dict>
|
|
86
|
+
<key>CFBundleDevelopmentRegion</key>
|
|
87
|
+
<string>en</string>
|
|
88
|
+
<key>CFBundleExecutable</key>
|
|
89
|
+
<string>VectorMenuBar</string>
|
|
90
|
+
<key>CFBundleIdentifier</key>
|
|
91
|
+
<string>com.vector.menubar</string>
|
|
92
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
|
93
|
+
<string>6.0</string>
|
|
94
|
+
<key>CFBundleName</key>
|
|
95
|
+
<string>VectorMenuBar</string>
|
|
96
|
+
<key>CFBundlePackageType</key>
|
|
97
|
+
<string>APPL</string>
|
|
98
|
+
<key>CFBundleShortVersionString</key>
|
|
99
|
+
<string>${pkg.version}</string>
|
|
100
|
+
<key>CFBundleVersion</key>
|
|
101
|
+
<string>${pkg.version}</string>
|
|
102
|
+
<key>LSUIElement</key>
|
|
103
|
+
<true/>
|
|
104
|
+
<key>NSHighResolutionCapable</key>
|
|
105
|
+
<true/>
|
|
106
|
+
</dict>
|
|
107
|
+
</plist>
|
|
108
|
+
`,
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
signAppBundle();
|
|
112
|
+
|
|
113
|
+
function buildTarget(target, outputPath) {
|
|
114
|
+
execFileSync(
|
|
115
|
+
'swiftc',
|
|
116
|
+
['-O', '-target', target, sourceFile, '-o', outputPath],
|
|
117
|
+
{ stdio: 'inherit' },
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function signAppBundle() {
|
|
122
|
+
const identity = process.env.VECTOR_MENUBAR_CODESIGN_IDENTITY?.trim();
|
|
123
|
+
if (!identity) {
|
|
124
|
+
execFileSync('codesign', ['--force', '--deep', '--sign', '-', appDir], {
|
|
125
|
+
stdio: 'inherit',
|
|
126
|
+
});
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const args = [
|
|
131
|
+
'--force',
|
|
132
|
+
'--deep',
|
|
133
|
+
'--options',
|
|
134
|
+
'runtime',
|
|
135
|
+
'--timestamp',
|
|
136
|
+
'--sign',
|
|
137
|
+
identity,
|
|
138
|
+
appDir,
|
|
139
|
+
];
|
|
140
|
+
execFileSync('codesign', args, { stdio: 'inherit' });
|
|
141
|
+
}
|