@omnimedia/omnitool 1.1.0-97 → 1.1.0-99
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 +46 -13
- package/package.json +1 -1
- package/s/demo/routines/timeline-setup.ts +8 -4
- package/s/driver/fns/schematic.ts +2 -1
- package/s/driver/parts/compositor.ts +1 -1
- package/s/features/bg-remover/worker.bundle.ts +4 -3
- package/s/features/parts/expose-errors.ts +41 -0
- package/s/features/speech/transcribe/worker.bundle.ts +4 -3
- package/s/features/transition/parts/types.ts +3 -70
- package/s/timeline/index.ts +1 -0
- package/s/timeline/parts/item.ts +2 -5
- package/s/timeline/parts/transitions.ts +102 -0
- package/s/timeline/renderers/parts/samplers/visual/parts/transition.ts +1 -1
- package/s/timeline/sugar/helpers.ts +9 -4
- package/s/timeline/sugar/o.ts +16 -7
- package/s/timeline/sugar/omni.test.ts +7 -7
- package/x/demo/demo.bundle.min.js +25 -25
- package/x/demo/demo.bundle.min.js.map +4 -4
- package/x/demo/routines/timeline-setup.js +3 -2
- package/x/demo/routines/timeline-setup.js.map +1 -1
- package/x/driver/fns/schematic.d.ts +2 -1
- package/x/driver/parts/compositor.js +1 -1
- package/x/driver/parts/compositor.js.map +1 -1
- package/x/features/bg-remover/worker.bundle.js +4 -3
- package/x/features/bg-remover/worker.bundle.js.map +1 -1
- package/x/features/bg-remover/worker.bundle.min.js +167 -167
- package/x/features/bg-remover/worker.bundle.min.js.map +4 -4
- package/x/features/parts/expose-errors.d.ts +3 -0
- package/x/features/parts/expose-errors.js +32 -0
- package/x/features/parts/expose-errors.js.map +1 -0
- package/x/features/speech/transcribe/worker.bundle.js +4 -3
- package/x/features/speech/transcribe/worker.bundle.js.map +1 -1
- package/x/features/speech/transcribe/worker.bundle.min.js +167 -167
- package/x/features/speech/transcribe/worker.bundle.min.js.map +4 -4
- package/x/features/transition/parts/types.d.ts +3 -3
- package/x/index.html +2 -2
- package/x/tests.bundle.min.js +58 -58
- package/x/tests.bundle.min.js.map +4 -4
- package/x/tests.html +1 -1
- package/x/timeline/index.d.ts +1 -0
- package/x/timeline/index.js +1 -0
- package/x/timeline/index.js.map +1 -1
- package/x/timeline/parts/item.d.ts +2 -4
- package/x/timeline/parts/item.js +0 -4
- package/x/timeline/parts/item.js.map +1 -1
- package/x/timeline/parts/transitions.d.ts +15 -0
- package/x/timeline/parts/transitions.js +81 -0
- package/x/timeline/parts/transitions.js.map +1 -0
- package/x/timeline/renderers/parts/samplers/visual/parts/transition.js +1 -1
- package/x/timeline/renderers/parts/samplers/visual/parts/transition.js.map +1 -1
- package/x/timeline/sugar/helpers.d.ts +5 -3
- package/x/timeline/sugar/helpers.js +7 -5
- package/x/timeline/sugar/helpers.js.map +1 -1
- package/x/timeline/sugar/o.d.ts +2 -3
- package/x/timeline/sugar/o.js +12 -5
- package/x/timeline/sugar/o.js.map +1 -1
- package/x/timeline/sugar/omni.test.js +5 -5
- package/x/timeline/sugar/omni.test.js.map +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ExposedError } from "@e280/renraku";
|
|
2
|
+
export function exposeError(error) {
|
|
3
|
+
if (error instanceof ExposedError)
|
|
4
|
+
return error;
|
|
5
|
+
const exposed = new ExposedError(errorToString(error));
|
|
6
|
+
if (error instanceof Error)
|
|
7
|
+
exposed.stack = error.stack;
|
|
8
|
+
return exposed;
|
|
9
|
+
}
|
|
10
|
+
export function exposeErrors(fn) {
|
|
11
|
+
return async (...args) => {
|
|
12
|
+
try {
|
|
13
|
+
return await fn(...args);
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
throw exposeError(error);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function errorToString(error) {
|
|
21
|
+
if (error instanceof Error)
|
|
22
|
+
return error.message;
|
|
23
|
+
if (typeof error === "string")
|
|
24
|
+
return error;
|
|
25
|
+
try {
|
|
26
|
+
return JSON.stringify(error) ?? String(error);
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return String(error);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=expose-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expose-errors.js","sourceRoot":"","sources":["../../../s/features/parts/expose-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,eAAe,CAAA;AAE1C,MAAM,UAAU,WAAW,CAAC,KAAc;IACzC,IAAI,KAAK,YAAY,YAAY;QAChC,OAAO,KAAK,CAAA;IAEb,MAAM,OAAO,GAAG,IAAI,YAAY,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAA;IAEtD,IAAI,KAAK,YAAY,KAAK;QACzB,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAA;IAE5B,OAAO,OAAO,CAAA;AACf,CAAC;AAED,MAAM,UAAU,YAAY,CAC3B,EAA+C;IAE/C,OAAO,KAAK,EAAC,GAAG,IAAU,EAAE,EAAE;QAC7B,IAAI,CAAC;YACJ,OAAO,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;QACzB,CAAC;QACD,OAAO,KAAK,EAAE,CAAC;YACd,MAAM,WAAW,CAAC,KAAK,CAAC,CAAA;QACzB,CAAC;IACF,CAAC,CAAA;AACF,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACpC,IAAI,KAAK,YAAY,KAAK;QACzB,OAAO,KAAK,CAAC,OAAO,CAAA;IAErB,IAAI,OAAO,KAAK,KAAK,QAAQ;QAC5B,OAAO,KAAK,CAAA;IAEb,IAAI,CAAC;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAA;IAC9C,CAAC;IACD,MAAM,CAAC;QACN,OAAO,MAAM,CAAC,KAAK,CAAC,CAAA;IACrB,CAAC;AACF,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { defer, once } from "@e280/stz";
|
|
|
2
2
|
import { Comrade } from "@e280/comrade";
|
|
3
3
|
import { loadPipe } from "../../parts/load-pipe.js";
|
|
4
4
|
import { transcribe } from "./parts/transcribe.js";
|
|
5
|
+
import { exposeErrors } from "../../parts/expose-errors.js";
|
|
5
6
|
const deferred = defer();
|
|
6
7
|
const makePrepare = (host) => once(async (spec) => {
|
|
7
8
|
deferred.resolve({
|
|
@@ -16,8 +17,8 @@ const makePrepare = (host) => once(async (spec) => {
|
|
|
16
17
|
await Comrade.worker(shell => {
|
|
17
18
|
const prepare = makePrepare(shell.host);
|
|
18
19
|
return {
|
|
19
|
-
prepare,
|
|
20
|
-
async
|
|
20
|
+
prepare: exposeErrors(prepare),
|
|
21
|
+
transcribe: exposeErrors(async (request) => {
|
|
21
22
|
const { pipe, spec } = await deferred.promise;
|
|
22
23
|
return transcribe({
|
|
23
24
|
pipe,
|
|
@@ -28,7 +29,7 @@ await Comrade.worker(shell => {
|
|
|
28
29
|
onTranscription: transcription => shell.host.deliverTranscription(transcription),
|
|
29
30
|
},
|
|
30
31
|
});
|
|
31
|
-
}
|
|
32
|
+
})
|
|
32
33
|
};
|
|
33
34
|
});
|
|
34
35
|
//# sourceMappingURL=worker.bundle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.bundle.js","sourceRoot":"","sources":["../../../../s/features/speech/transcribe/worker.bundle.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,EAAE,IAAI,EAAC,MAAM,WAAW,CAAA;AACrC,OAAO,EAAC,OAAO,EAAO,MAAM,eAAe,CAAA;AAG3C,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAA;AACjD,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"worker.bundle.js","sourceRoot":"","sources":["../../../../s/features/speech/transcribe/worker.bundle.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,EAAE,IAAI,EAAC,MAA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