@adea-ai/app-framework 0.48.0 → 0.48.2
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/dist/framework-source.json +1 -1
- package/dist/voice/voice-build.js +20 -21
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.48.
|
|
1
|
+
{"version":"0.48.2","commit":"3971f2573902616b751c0f1af9b19a066101394a"}
|
|
@@ -181,32 +181,31 @@ function verifyAppVoiceHelpers(options) {
|
|
|
181
181
|
*/
|
|
182
182
|
function verifyArchivedVoiceHelpers(options) {
|
|
183
183
|
const prefix = `${options.appName}.app/Contents/Resources/app/voice-helpers/`;
|
|
184
|
-
const tar = (args) => {
|
|
185
|
-
const result = spawnSync("tar", ["--zstd", ...args], {
|
|
186
|
-
encoding: "utf8",
|
|
187
|
-
maxBuffer: 536870912,
|
|
188
|
-
timeout: 12e4,
|
|
189
|
-
...options.env ? { env: options.env } : {}
|
|
190
|
-
});
|
|
191
|
-
if (result.error || result.status !== 0) throw new HelperLockError(`cannot read ${options.archive}: ${result.error?.message ?? result.stderr}`);
|
|
192
|
-
return result.stdout;
|
|
193
|
-
};
|
|
194
|
-
const members = tar(["-tf", options.archive]).split(/\r?\n/).filter(Boolean).filter((entry) => entry.replace(/^\.\//, "").startsWith(prefix));
|
|
195
|
-
if (members.length === 0) throw new HelperLockError(`${options.archive} has no voice helpers (${prefix})`);
|
|
196
|
-
const links = tar([
|
|
197
|
-
"-tvf",
|
|
198
|
-
options.archive,
|
|
199
|
-
...members
|
|
200
|
-
]).split(/\r?\n/).filter((line) => line.startsWith("l"));
|
|
201
|
-
if (links.length > 0) throw new HelperLockError(`${options.archive} packages symlinks among the voice helpers: ${links.join("; ")}`);
|
|
202
184
|
const scratch = mkdtempSync(join(tmpdir(), "adea-voice-archive-"));
|
|
203
185
|
try {
|
|
186
|
+
const unpacked = join(scratch, "app.tar");
|
|
187
|
+
writeFileSync(unpacked, Bun.zstdDecompressSync(readFileSync(options.archive)));
|
|
188
|
+
const tar = (args) => {
|
|
189
|
+
const result = spawnSync("tar", args, {
|
|
190
|
+
encoding: "utf8",
|
|
191
|
+
maxBuffer: 536870912,
|
|
192
|
+
timeout: 12e4,
|
|
193
|
+
...options.env ? { env: options.env } : {}
|
|
194
|
+
});
|
|
195
|
+
if (result.error || result.status !== 0) throw new HelperLockError(`cannot read ${options.archive}: ${result.error?.message ?? result.stderr}`);
|
|
196
|
+
return result.stdout;
|
|
197
|
+
};
|
|
198
|
+
const members = tar(["-tf", unpacked]).split(/\r?\n/).filter(Boolean).filter((entry) => entry.replace(/^\.\//, "").startsWith(prefix));
|
|
199
|
+
if (members.length === 0) throw new HelperLockError(`${options.archive} has no voice helpers (${prefix})`);
|
|
200
|
+
const links = tar(["-tvf", unpacked]).split(/\r?\n/).filter((line) => line.startsWith("l") && line.includes(prefix));
|
|
201
|
+
if (links.length > 0) throw new HelperLockError(`${options.archive} packages symlinks among the voice helpers: ${links.join("; ")}`);
|
|
202
|
+
const first = members[0];
|
|
204
203
|
tar([
|
|
205
204
|
"-xf",
|
|
206
|
-
|
|
205
|
+
unpacked,
|
|
207
206
|
"-C",
|
|
208
207
|
scratch,
|
|
209
|
-
|
|
208
|
+
first.slice(0, first.length - first.replace(/^\.\//, "").length + prefix.length).slice(0, -1)
|
|
210
209
|
]);
|
|
211
210
|
verifyAppVoiceHelpers({
|
|
212
211
|
appRoot: options.appRoot,
|
|
@@ -214,13 +213,13 @@ function verifyArchivedVoiceHelpers(options) {
|
|
|
214
213
|
...options.target ? { target: options.target } : {},
|
|
215
214
|
...options.handshake !== void 0 ? { handshake: options.handshake } : {}
|
|
216
215
|
});
|
|
216
|
+
return members.length;
|
|
217
217
|
} finally {
|
|
218
218
|
rmSync(scratch, {
|
|
219
219
|
recursive: true,
|
|
220
220
|
force: true
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
|
-
return members.length;
|
|
224
223
|
}
|
|
225
224
|
/** Where the running shell finds its helpers, and why voice is off when they are absent. */
|
|
226
225
|
function resolveVoiceHelperPaths(dir) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adea-ai/app-framework",
|
|
3
|
-
"version": "0.48.
|
|
3
|
+
"version": "0.48.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -445,7 +445,7 @@
|
|
|
445
445
|
"tar": "^7.5.22"
|
|
446
446
|
},
|
|
447
447
|
"devDependencies": {
|
|
448
|
-
"@adea-ai/ui": "0.160.
|
|
448
|
+
"@adea-ai/ui": "0.160.3",
|
|
449
449
|
"@babel/core": "8.1.0",
|
|
450
450
|
"@babel/preset-typescript": "^8.0.7",
|
|
451
451
|
"@happy-dom/global-registrator": "^21.0.4",
|
|
@@ -470,7 +470,7 @@
|
|
|
470
470
|
"vite-plus": "1.5.1"
|
|
471
471
|
},
|
|
472
472
|
"peerDependencies": {
|
|
473
|
-
"@adea-ai/ui": "^0.160.
|
|
473
|
+
"@adea-ai/ui": "^0.160.3",
|
|
474
474
|
"@lucide/solid": "^1.77.0",
|
|
475
475
|
"@solidjs/web": "^2.0.3",
|
|
476
476
|
"solid-js": "^2.0.3"
|