New mobile/ directory with Capacitor project: - Configurable server URL launcher (default: app.pedshub.com) - Android: foreground service + wake lock for background recording (AudioRecordingService preserved from existing TWA) - iOS: background audio mode + microphone permission - App ID: com.pedshub.scribe - Both platforms initialized and synced Existing android/ TWA project untouched — this is a separate project. Build: cd mobile && npx cap open android (or ios)
22 lines
922 B
JavaScript
22 lines
922 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.unzip = void 0;
|
|
const util_1 = require("util");
|
|
async function unzip(srcPath, onEntry) {
|
|
const yauzl = await Promise.resolve().then(() => require('yauzl'));
|
|
return new Promise((resolve, reject) => {
|
|
yauzl.open(srcPath, { lazyEntries: true }, (err, zipfile) => {
|
|
if (!zipfile || err) {
|
|
return reject(err);
|
|
}
|
|
const openReadStream = (0, util_1.promisify)(zipfile.openReadStream.bind(zipfile));
|
|
zipfile.once('error', reject);
|
|
// resolve when either one happens
|
|
zipfile.once('close', resolve); // fd of zip closed
|
|
zipfile.once('end', resolve); // last entry read
|
|
zipfile.on('entry', (entry) => onEntry(entry, zipfile, openReadStream));
|
|
zipfile.readEntry();
|
|
});
|
|
});
|
|
}
|
|
exports.unzip = unzip;
|