pediatric-ai-scribe-v3/mobile/node_modules/@capacitor/cli/dist/util/promise.js
Daniel d3ee6001c1 Add Capacitor native mobile app (PedScribe) for iOS + Android
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)
2026-04-11 02:18:06 +02:00

35 lines
1 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.lazy = exports.LazyPromise = exports.allSerial = void 0;
function allSerial(funcs) {
return funcs.reduce((promise, func) => promise.then(result => func().then(x => result.concat(x))), Promise.resolve([]));
}
exports.allSerial = allSerial;
class LazyPromise extends Promise {
constructor(executor) {
super(() => {
/* ignore */
});
this._executor = executor;
}
then(onfulfilled, onrejected) {
this._promise = this._promise || new Promise(this._executor);
return this._promise.then(onfulfilled, onrejected);
}
catch(onrejected) {
this._promise = this._promise || new Promise(this._executor);
return this._promise.catch(onrejected);
}
}
exports.LazyPromise = LazyPromise;
function lazy(fn) {
return new LazyPromise(async (resolve, reject) => {
try {
resolve(await fn());
}
catch (e) {
reject(e);
}
});
}
exports.lazy = lazy;