@allyhub/sdk 0.2.0 → 0.4.0
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/free.d.ts +2 -2
- package/dist/index.d.ts +2 -9
- package/dist/index.js +1 -1
- package/dist/module.d.ts +2 -3
- package/dist/module.js +1 -1
- package/dist/parts.d.ts +2 -2
- package/dist/piece.d.ts +7 -32
- package/dist/piece.js +1 -1
- package/dist/props.d.ts +53 -10
- package/dist/slides.d.ts +8 -0
- package/dist/slides.js +2 -0
- package/docs/README.md +1 -1
- package/docs/batches.md +2 -2
- package/docs/defaults.md +106 -3
- package/docs/docs.md +1 -1
- package/docs/layers.md +1 -1
- package/docs/modeling.md +6 -6
- package/docs/project.md +7 -6
- package/docs/scenery.md +1 -1
- package/docs/sheets.md +1 -1
- package/docs/slides.md +182 -80
- package/node_modules/@allyhub-next/audio/package.json +1 -1
- package/node_modules/@allyhub-next/formats/dist/data/script.d.ts +22 -0
- package/node_modules/@allyhub-next/formats/dist/data/script.js +1 -1
- package/node_modules/@allyhub-next/formats/dist/data/slides.d.ts +1494 -0
- package/node_modules/@allyhub-next/formats/dist/data/slides.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/index.d.ts +2 -0
- package/node_modules/@allyhub-next/formats/dist/index.js +1 -1
- package/node_modules/@allyhub-next/formats/dist/items.d.ts +26 -0
- package/node_modules/@allyhub-next/formats/dist/items.js +1 -1
- package/node_modules/@allyhub-next/formats/dist/layout.d.ts +2 -0
- package/node_modules/@allyhub-next/formats/dist/layout.js +1 -1
- package/node_modules/@allyhub-next/formats/dist/note-shape.d.ts +39 -0
- package/node_modules/@allyhub-next/formats/dist/note-shape.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/schemas.d.ts +418 -0
- package/node_modules/@allyhub-next/formats/dist/schemas.js +1 -1
- package/node_modules/@allyhub-next/formats/package.json +1 -1
- package/node_modules/@allyhub-next/protocol/dist/app.d.ts +1 -62
- package/node_modules/@allyhub-next/protocol/dist/app.js +1 -1
- package/node_modules/@allyhub-next/protocol/dist/auth.d.ts +17 -17
- package/node_modules/@allyhub-next/protocol/dist/auth.js +1 -1
- package/node_modules/@allyhub-next/protocol/dist/cli.d.ts +1 -5
- package/node_modules/@allyhub-next/protocol/dist/cli.js +1 -1
- package/node_modules/@allyhub-next/protocol/dist/editor.d.ts +13 -26
- package/node_modules/@allyhub-next/protocol/dist/editor.js +1 -1
- package/node_modules/@allyhub-next/protocol/dist/index.d.ts +1 -0
- package/node_modules/@allyhub-next/protocol/dist/index.js +1 -1
- package/node_modules/@allyhub-next/protocol/dist/notes.d.ts +163 -0
- package/node_modules/@allyhub-next/protocol/dist/notes.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/registry.d.ts +4 -2
- package/node_modules/@allyhub-next/protocol/dist/registry.js +1 -1
- package/node_modules/@allyhub-next/protocol/dist/routes.js +1 -1
- package/node_modules/@allyhub-next/protocol/dist/runtimes.d.ts +3 -0
- package/node_modules/@allyhub-next/protocol/dist/runtimes.js +1 -1
- package/node_modules/@allyhub-next/protocol/dist/tools.d.ts +38 -0
- package/node_modules/@allyhub-next/protocol/dist/tools.js +1 -1
- package/node_modules/@allyhub-next/protocol/package.json +1 -1
- package/node_modules/@allyhub-next/runtimes/dist/errors.d.ts +5 -1
- package/node_modules/@allyhub-next/runtimes/dist/index.d.ts +1 -0
- package/node_modules/@allyhub-next/runtimes/dist/index.js +1 -1
- package/node_modules/@allyhub-next/runtimes/dist/node-program.d.ts +3 -0
- package/node_modules/@allyhub-next/runtimes/dist/node-program.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/packages.d.ts +65 -0
- package/node_modules/@allyhub-next/runtimes/dist/packages.js +4 -0
- package/node_modules/@allyhub-next/runtimes/dist/runtimes.js +2 -2
- package/node_modules/@allyhub-next/runtimes/dist/unpack.d.ts +7 -0
- package/node_modules/@allyhub-next/runtimes/dist/unpack.js +1 -1
- package/node_modules/@allyhub-next/runtimes/package.json +5 -1
- package/node_modules/@allyhub-next/runtimes/pins/docx/package-lock.json +67 -0
- package/node_modules/@allyhub-next/runtimes/pins/docx/package.json +9 -0
- package/node_modules/@allyhub-next/runtimes/pins/exceljs/package-lock.json +2533 -0
- package/node_modules/@allyhub-next/runtimes/pins/exceljs/package.json +8 -0
- package/node_modules/@allyhub-next/runtimes/pins/gltf-tools/package-lock.json +753 -0
- package/node_modules/@allyhub-next/runtimes/pins/gltf-tools/package.json +14 -0
- package/node_modules/@allyhub-next/runtimes/pins/manifold-3d/package-lock.json +950 -0
- package/node_modules/@allyhub-next/runtimes/pins/manifold-3d/package.json +8 -0
- package/node_modules/@allyhub-next/runtimes/pins/onnxruntime-node/package-lock.json +227 -0
- package/node_modules/@allyhub-next/runtimes/pins/onnxruntime-node/package.json +8 -0
- package/node_modules/@allyhub-next/runtimes/pins/sherpa-onnx-node/package-lock.json +105 -0
- package/node_modules/@allyhub-next/runtimes/pins/sherpa-onnx-node/package.json +8 -0
- package/node_modules/@allyhub-next/runtimes/pins/tesseract.js/package-lock.json +128 -0
- package/node_modules/@allyhub-next/runtimes/pins/tesseract.js/package.json +9 -0
- package/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +5 -24
- package/node_modules/@allyhub-next/scenery/package.json +1 -1
- package/node_modules/@allyhub-next/slides-core/LICENSE +241 -0
- package/node_modules/@allyhub-next/slides-core/dist/animation.d.ts +129 -0
- package/node_modules/@allyhub-next/slides-core/dist/animation.js +2 -0
- package/node_modules/@allyhub-next/slides-core/dist/api.d.ts +649 -0
- package/node_modules/@allyhub-next/slides-core/dist/api.js +4 -0
- package/node_modules/@allyhub-next/slides-core/dist/capabilities.d.ts +18 -0
- package/node_modules/@allyhub-next/slides-core/dist/capabilities.js +2 -0
- package/node_modules/@allyhub-next/slides-core/dist/chart-api.d.ts +165 -0
- package/node_modules/@allyhub-next/slides-core/dist/chart-api.js +2 -0
- package/node_modules/@allyhub-next/slides-core/dist/chart-file.d.ts +11 -0
- package/node_modules/@allyhub-next/slides-core/dist/chart-file.js +2 -0
- package/node_modules/@allyhub-next/slides-core/dist/chart.d.ts +184 -0
- package/node_modules/@allyhub-next/slides-core/dist/chart.js +2 -0
- package/node_modules/@allyhub-next/slides-core/dist/check.d.ts +7 -0
- package/node_modules/@allyhub-next/slides-core/dist/check.js +2 -0
- package/node_modules/@allyhub-next/slides-core/dist/enums.d.ts +146 -0
- package/node_modules/@allyhub-next/slides-core/dist/enums.js +2 -0
- package/node_modules/@allyhub-next/slides-core/dist/file.d.ts +109 -0
- package/node_modules/@allyhub-next/slides-core/dist/file.js +4 -0
- package/node_modules/@allyhub-next/slides-core/dist/index.d.ts +21 -0
- package/node_modules/@allyhub-next/slides-core/dist/index.js +2 -0
- package/node_modules/@allyhub-next/slides-core/dist/measure.d.ts +34 -0
- package/node_modules/@allyhub-next/slides-core/dist/measure.js +2 -0
- package/node_modules/@allyhub-next/slides-core/dist/model.d.ts +278 -0
- package/node_modules/@allyhub-next/slides-core/dist/model.js +2 -0
- package/node_modules/@allyhub-next/slides-core/dist/office.d.ts +58 -0
- package/node_modules/@allyhub-next/slides-core/dist/office.js +2 -0
- package/node_modules/@allyhub-next/slides-core/dist/path.d.ts +6 -0
- package/node_modules/@allyhub-next/slides-core/dist/path.js +2 -0
- package/node_modules/@allyhub-next/slides-core/dist/placeholders.d.ts +7 -0
- package/node_modules/@allyhub-next/slides-core/dist/placeholders.js +2 -0
- package/node_modules/@allyhub-next/slides-core/dist/resolve.d.ts +181 -0
- package/node_modules/@allyhub-next/slides-core/dist/resolve.js +2 -0
- package/node_modules/@allyhub-next/slides-core/dist/script.d.ts +43 -0
- package/node_modules/@allyhub-next/slides-core/dist/script.js +3 -0
- package/node_modules/@allyhub-next/slides-core/dist/stage.d.ts +63 -0
- package/node_modules/@allyhub-next/slides-core/dist/stage.js +2 -0
- package/node_modules/@allyhub-next/slides-core/dist/strict.d.ts +23 -0
- package/node_modules/@allyhub-next/slides-core/dist/strict.js +2 -0
- package/node_modules/@allyhub-next/slides-core/dist/theme.d.ts +72 -0
- package/node_modules/@allyhub-next/slides-core/dist/theme.js +2 -0
- package/node_modules/@allyhub-next/slides-core/dist/units.d.ts +35 -0
- package/node_modules/@allyhub-next/slides-core/dist/units.js +2 -0
- package/node_modules/@allyhub-next/slides-core/package.json +14 -0
- package/node_modules/@allyhub-next/video-core/dist/export.d.ts +6 -5
- package/node_modules/@allyhub-next/video-core/dist/export.js +1 -1
- package/node_modules/@allyhub-next/video-core/dist/fact.d.ts +173 -4
- package/node_modules/@allyhub-next/video-core/dist/fact.js +1 -1
- package/node_modules/@allyhub-next/video-core/dist/formats.d.ts +6 -13
- package/node_modules/@allyhub-next/video-core/dist/formats.js +1 -1
- package/node_modules/@allyhub-next/video-core/dist/index.d.ts +0 -1
- package/node_modules/@allyhub-next/video-core/dist/index.js +1 -1
- package/node_modules/@allyhub-next/video-core/dist/measure.d.ts +83 -0
- package/node_modules/@allyhub-next/video-core/dist/piece.d.ts +8 -9
- package/node_modules/@allyhub-next/video-core/dist/piece.js +1 -1
- package/node_modules/@allyhub-next/video-core/dist/problem.d.ts +9 -1
- package/node_modules/@allyhub-next/video-core/dist/problem.js +1 -1
- package/node_modules/@allyhub-next/video-core/dist/schema.d.ts +0 -2
- package/node_modules/@allyhub-next/video-core/dist/script-edit.d.ts +4 -0
- package/node_modules/@allyhub-next/video-core/dist/script.d.ts +8 -0
- package/node_modules/@allyhub-next/video-core/dist/script.js +1 -1
- package/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +34 -1
- package/node_modules/@allyhub-next/video-core/package.json +1 -1
- package/package.json +15 -8
- package/node_modules/@allyhub-next/video-core/dist/slides.d.ts +0 -37
- package/node_modules/@allyhub-next/video-core/dist/slides.js +0 -2
|
@@ -67,11 +67,15 @@ export declare const CheckStateSchema: z.ZodObject<{
|
|
|
67
67
|
export type CheckState = z.infer<typeof CheckStateSchema>;
|
|
68
68
|
export declare const EXPORT_STATES: readonly ["queued", "running", "done", "failed", "cancelled"];
|
|
69
69
|
/** An export the person asked for, one at a time. */
|
|
70
|
+
/** The choices an export is made with (`EXPORT_OFFER`). */
|
|
71
|
+
export declare const ExportOptionsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
72
|
+
export type ExportOptions = z.infer<typeof ExportOptionsSchema>;
|
|
70
73
|
export declare const ExportJobSchema: z.ZodObject<{
|
|
71
74
|
id: z.ZodString;
|
|
72
75
|
item: z.ZodString;
|
|
73
76
|
versions: z.ZodArray<z.ZodString>;
|
|
74
77
|
types: z.ZodArray<z.ZodString>;
|
|
78
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
75
79
|
state: z.ZodEnum<{
|
|
76
80
|
running: "running";
|
|
77
81
|
done: "done";
|
|
@@ -105,6 +109,7 @@ export declare const PROJECT_TOOLS: {
|
|
|
105
109
|
doc: "doc";
|
|
106
110
|
sheet: "sheet";
|
|
107
111
|
scenery: "scenery";
|
|
112
|
+
model: "model";
|
|
108
113
|
website: "website";
|
|
109
114
|
}>;
|
|
110
115
|
dir: z.ZodString;
|
|
@@ -131,6 +136,17 @@ export declare const PROJECT_TOOLS: {
|
|
|
131
136
|
lang: z.ZodOptional<z.ZodString>;
|
|
132
137
|
}, z.core.$strict>>;
|
|
133
138
|
}, z.core.$strict>>;
|
|
139
|
+
readonly "slides/deck": MethodSpec<z.ZodObject<{
|
|
140
|
+
item: z.ZodString;
|
|
141
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
142
|
+
piece: z.ZodString;
|
|
143
|
+
file: z.ZodString;
|
|
144
|
+
prefix: z.ZodString;
|
|
145
|
+
layouts: z.ZodArray<z.ZodString>;
|
|
146
|
+
components: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
147
|
+
generators: z.ZodArray<z.ZodString>;
|
|
148
|
+
scripts: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
149
|
+
}, z.core.$strict>>;
|
|
134
150
|
readonly "video/stage": MethodSpec<z.ZodObject<{
|
|
135
151
|
start: z.ZodOptional<z.ZodObject<{
|
|
136
152
|
t: z.ZodOptional<z.ZodNumber>;
|
|
@@ -140,6 +156,7 @@ export declare const PROJECT_TOOLS: {
|
|
|
140
156
|
}, z.core.$strict>>;
|
|
141
157
|
play: z.ZodOptional<z.ZodBoolean>;
|
|
142
158
|
chrome: z.ZodOptional<z.ZodBoolean>;
|
|
159
|
+
edit: z.ZodOptional<z.ZodBoolean>;
|
|
143
160
|
item: z.ZodString;
|
|
144
161
|
version: z.ZodOptional<z.ZodString>;
|
|
145
162
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -173,6 +190,19 @@ export declare const PROJECT_TOOLS: {
|
|
|
173
190
|
height: z.ZodInt;
|
|
174
191
|
duration: z.ZodNumber;
|
|
175
192
|
}, z.core.$strict>>;
|
|
193
|
+
readonly "video/stills": MethodSpec<z.ZodObject<{
|
|
194
|
+
moments: z.ZodArray<z.ZodNumber>;
|
|
195
|
+
item: z.ZodString;
|
|
196
|
+
version: z.ZodOptional<z.ZodString>;
|
|
197
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
198
|
+
stills: z.ZodArray<z.ZodObject<{
|
|
199
|
+
t: z.ZodNumber;
|
|
200
|
+
image: z.ZodObject<{
|
|
201
|
+
mime: z.ZodString;
|
|
202
|
+
data: z.ZodBase64;
|
|
203
|
+
}, z.core.$strict>;
|
|
204
|
+
}, z.core.$strict>>;
|
|
205
|
+
}, z.core.$strict>>;
|
|
176
206
|
readonly "check/results": MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
177
207
|
status: z.ZodEnum<{
|
|
178
208
|
off: "off";
|
|
@@ -209,12 +239,14 @@ export declare const PROJECT_TOOLS: {
|
|
|
209
239
|
item: z.ZodString;
|
|
210
240
|
versions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
211
241
|
types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
242
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
212
243
|
}, z.core.$strict>, z.ZodObject<{
|
|
213
244
|
job: z.ZodObject<{
|
|
214
245
|
id: z.ZodString;
|
|
215
246
|
item: z.ZodString;
|
|
216
247
|
versions: z.ZodArray<z.ZodString>;
|
|
217
248
|
types: z.ZodArray<z.ZodString>;
|
|
249
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
218
250
|
state: z.ZodEnum<{
|
|
219
251
|
running: "running";
|
|
220
252
|
done: "done";
|
|
@@ -236,6 +268,7 @@ export declare const PROJECT_TOOLS: {
|
|
|
236
268
|
item: z.ZodString;
|
|
237
269
|
versions: z.ZodArray<z.ZodString>;
|
|
238
270
|
types: z.ZodArray<z.ZodString>;
|
|
271
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
239
272
|
state: z.ZodEnum<{
|
|
240
273
|
running: "running";
|
|
241
274
|
done: "done";
|
|
@@ -247,7 +280,11 @@ export declare const PROJECT_TOOLS: {
|
|
|
247
280
|
files: z.ZodArray<z.ZodString>;
|
|
248
281
|
error: z.ZodOptional<z.ZodString>;
|
|
249
282
|
}, z.core.$strict>>;
|
|
283
|
+
reveal: z.ZodBoolean;
|
|
250
284
|
}, z.core.$strict>>;
|
|
285
|
+
readonly "export/reveal": MethodSpec<z.ZodObject<{
|
|
286
|
+
path: z.ZodString;
|
|
287
|
+
}, z.core.$strict>, z.ZodObject<{}, z.core.$strict>>;
|
|
251
288
|
readonly "scenery/viewer": MethodSpec<z.ZodObject<{
|
|
252
289
|
item: z.ZodString;
|
|
253
290
|
camera: z.ZodOptional<z.ZodObject<{
|
|
@@ -317,6 +354,7 @@ export declare const TOOL_NOTIFICATIONS: {
|
|
|
317
354
|
item: z.ZodString;
|
|
318
355
|
versions: z.ZodArray<z.ZodString>;
|
|
319
356
|
types: z.ZodArray<z.ZodString>;
|
|
357
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
320
358
|
state: z.ZodEnum<{
|
|
321
359
|
running: "running";
|
|
322
360
|
done: "done";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as e}from"zod";import{KINDS as c}from"@allyhub-next/formats";import{PathSchema as
|
|
2
|
+
import{z as e}from"zod";import{KINDS as c}from"@allyhub-next/formats";import{PathSchema as r}from"./files.js";import{method as t,notification as i}from"./jsonrpc.js";const n={item:r,version:e.string().optional()};export const ImageSchema=e.strictObject({mime:e.string().regex(/^image\//u),data:e.base64()}),ProblemSchema=e.looseObject({code:e.string(),level:e.enum(["error","warn"]),message:e.string(),piece:e.string().optional(),part:e.string().optional(),t:e.number().optional()}),FactSchema=e.looseObject({kind:e.string(),data:e.unknown()}),TimelineSchema=e.looseObject({fps:e.number(),width:e.number(),height:e.number(),duration:e.number(),parts:e.array(e.unknown())}),CHECK_STATES=["off","waiting","running","done","failed"],CheckStateSchema=e.strictObject({status:e.enum(CHECK_STATES),revision:e.int().nonnegative(),problems:e.array(ProblemSchema),facts:e.array(FactSchema),versions:e.strictObject({total:e.int(),loaded:e.int(),reused:e.int()}).optional(),error:e.string().optional()}),EXPORT_STATES=["queued","running","done","failed","cancelled"],ExportOptionsSchema=e.record(e.string(),e.union([e.string(),e.boolean()])),ExportJobSchema=e.strictObject({id:e.string(),item:r,versions:e.array(e.string()),types:e.array(e.string()),options:ExportOptionsSchema.optional(),state:e.enum(EXPORT_STATES),progress:e.number().min(0).max(1),files:e.array(r),error:e.string().optional()}),IndexJobSchema=e.strictObject({file:r,status:e.enum(["running","done","failed"]),message:e.string(),share:e.number().min(0).max(1).optional()});const o=e.tuple([e.number(),e.number(),e.number()]),a=e.strictObject({url:e.string(),probe:e.string()});export const PROJECT_TOOLS={"project/items":t(e.strictObject({}),e.strictObject({items:e.array(e.strictObject({kind:e.enum(c),dir:r,entry:r,title:e.string().optional()})),folder:e.string(),name:e.string(),revision:e.int().nonnegative()}),"The project's items, as the build finds them."),"video/versions":t(e.strictObject({item:r}),e.strictObject({piece:e.string(),kind:e.enum(["video","slides"]),title:e.string().optional(),width:e.number(),height:e.number(),versions:e.array(e.strictObject({key:e.string(),lang:e.string().optional()}))}),"A video's or a deck's versions, one per language: what its stage, its timeline and its exports are asked for."),"slides/deck":t(e.strictObject({item:r}),e.strictObject({piece:e.string(),file:r,prefix:e.string(),layouts:e.array(e.string()),components:e.record(e.string(),e.unknown()),generators:e.array(e.string()),scripts:e.record(e.string(),r)}),"A deck's layouts, components and generators, and its files: slides.yaml (its slides) and its script in each language (their words and notes), which the deck's editor edits."),"video/stage":t(e.strictObject({...n,start:e.strictObject({t:e.number().nonnegative().optional(),part:e.string().optional(),offset:e.number().nonnegative().optional(),dur:e.number().positive().optional()}).optional(),play:e.boolean().optional(),chrome:e.boolean().optional(),edit:e.boolean().optional()}),a,"The address of a version's stage page, for a sandboxed frame: it plays the piece and talks to its parent by postMessage."),"video/timeline":t(e.strictObject(n),e.strictObject({timeline:TimelineSchema,text:e.array(e.unknown())}),"A version's timeline, drawn nowhere."),"video/still":t(e.strictObject({...n,t:e.number().nonnegative().optional()}),e.strictObject({t:e.number(),image:ImageSchema,width:e.int().positive(),height:e.int().positive(),duration:e.number().nonnegative()}),"A moment of a version as the render draws it, as a picture."),"video/stills":t(e.strictObject({...n,moments:e.array(e.number().nonnegative()).min(1).max(32)}),e.strictObject({stills:e.array(e.strictObject({t:e.number(),image:ImageSchema}))}),"Several moments of a version as the render draws them: what `video/still` gives, on one page."),"check/results":t(e.strictObject({}),CheckStateSchema,"The check run after edits, as it stands."),"check/run":t(e.strictObject({}),e.strictObject({}),"Runs the check again now."),"export/start":t(e.strictObject({item:r,versions:e.array(e.string()).optional(),types:e.array(e.string().min(1)).max(10).optional(),options:ExportOptionsSchema.optional()}),e.strictObject({job:ExportJobSchema}),"Exports an item (its versions, as file types) into .allyhub/out/; `export/changed` says how it goes."),"export/cancel":t(e.strictObject({job:e.string()}),e.strictObject({}),"Stops an export."),"export/list":t(e.strictObject({}),e.strictObject({jobs:e.array(ExportJobSchema),reveal:e.boolean()}),"The exports asked for since the server started."),"export/reveal":t(e.strictObject({path:r}),e.strictObject({}),"Shows an exported file in the person's file manager, where the server runs on their computer (`export/list`'s `reveal`)."),"scenery/viewer":t(e.strictObject({item:r,camera:e.strictObject({position:o,target:o}).optional()}),a,"The address of a scenery's viewer page, for a sandboxed frame: it tells what the person does by postMessage.")},AGENT_DOES={"project/items":{files:"the project's folder"},"video/versions":{command:"inspect combos"},"slides/deck":{files:"slides.ts, slides.yaml and the item's script.<locale>.yaml"},"video/stage":{command:"frames"},"video/timeline":{command:"inspect timeline"},"video/still":{command:"frames"},"video/stills":{command:"frames"},"check/results":{command:"inspect"},"check/run":{command:"check"},"export/start":{command:"render"},"export/cancel":{command:"render"},"export/list":{files:".allyhub/out/"},"export/reveal":{files:".allyhub/out/"},"scenery/viewer":{command:"scenery view"}};export function toolSpec(s){return Object.hasOwn(PROJECT_TOOLS,s)?PROJECT_TOOLS[s]:void 0}export const TOOL_NOTIFICATIONS={"project/changed":i(e.strictObject({revision:e.int().nonnegative()}),"The build saw a change: a stage or a timeline asked for now is the new one's."),"check/changed":i(CheckStateSchema,"The check started, ended or failed."),"export/changed":i(e.strictObject({job:ExportJobSchema}),"An export moved on."),"index/changed":i(e.strictObject({jobs:e.array(IndexJobSchema)}),"Making what the media index lacks moved on.")};
|
|
@@ -8,7 +8,11 @@ export type RuntimeErrorCode =
|
|
|
8
8
|
/** A file came in another size or with another sha256 than its pin. */
|
|
9
9
|
| "checksum"
|
|
10
10
|
/** An archive could not be unpacked, or held a path outside its folder. */
|
|
11
|
-
| "unpack"
|
|
11
|
+
| "unpack"
|
|
12
|
+
/** The pins have no package by that name. */
|
|
13
|
+
| "unknown-package"
|
|
14
|
+
/** A package could not be installed from its lock. */
|
|
15
|
+
| "install" | "cancelled";
|
|
12
16
|
export declare class RuntimeError extends Error {
|
|
13
17
|
readonly code: RuntimeErrorCode;
|
|
14
18
|
constructor(code: RuntimeErrorCode, message: string, options?: ErrorOptions);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { binVariable, createRuntimes, type EnsureOptions, type Located, type Progress, type Runtimes, type RuntimesOptions, type Status, } from "./runtimes.js";
|
|
2
|
+
export { createPackages, npmCi, type EnsurePackageOptions, type LoadOptions, type Install, type LocatedPackage, type Packages, type PackagesOptions, } from "./packages.js";
|
|
2
3
|
export { bundledEnv, type BundledOptions } from "./bundled.js";
|
|
3
4
|
export { RuntimeError, type RuntimeErrorCode } from "./errors.js";
|
|
4
5
|
export { cacheHome } from "./home.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
export{binVariable,createRuntimes}from"./runtimes.js";export{bundledEnv}from"./bundled.js";export{RuntimeError}from"./errors.js";export{cacheHome}from"./home.js";export{shippedManifest}from"./manifest.js";export{download,sha256Of}from"./download.js";export{withLock}from"./lock.js";export{unzip,untgz}from"./unpack.js";
|
|
2
|
+
export{binVariable,createRuntimes}from"./runtimes.js";export{createPackages,npmCi}from"./packages.js";export{bundledEnv}from"./bundled.js";export{RuntimeError}from"./errors.js";export{cacheHome}from"./home.js";export{shippedManifest}from"./manifest.js";export{download,sha256Of}from"./download.js";export{withLock}from"./lock.js";export{unzip,untgz}from"./unpack.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
export function nodeCommand(n=process.env,o=process.versions){const e=n.ALLYHUB_NODE;if(e)return e;if(o.electron!==void 0)throw new Error("This Electron app names no Node.js (ALLYHUB_NODE): its own executable is not Node.");return process.execPath}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export interface PackagesOptions {
|
|
2
|
+
/** The cache folder (default: the system's, `cacheHome`). */
|
|
3
|
+
home?: string;
|
|
4
|
+
/** The folder of pins (default: the ones AllyHub ships). */
|
|
5
|
+
pins?: string;
|
|
6
|
+
env?: Readonly<Record<string, string | undefined>>;
|
|
7
|
+
/** What fills a folder from its package-lock.json (default: `npm ci`). */
|
|
8
|
+
install?: Install;
|
|
9
|
+
}
|
|
10
|
+
export type Install = (dir: string, options: {
|
|
11
|
+
home: string;
|
|
12
|
+
signal?: AbortSignal | undefined;
|
|
13
|
+
}) => Promise<void>;
|
|
14
|
+
export interface LocatedPackage {
|
|
15
|
+
name: string;
|
|
16
|
+
version: string;
|
|
17
|
+
/** Its folder, the one holding its `node_modules`. */
|
|
18
|
+
dir: string;
|
|
19
|
+
}
|
|
20
|
+
export interface EnsurePackageOptions {
|
|
21
|
+
signal?: AbortSignal | undefined;
|
|
22
|
+
/** Called once if the package has to be fetched, before it is. */
|
|
23
|
+
onFetch?: (name: string) => void;
|
|
24
|
+
}
|
|
25
|
+
export interface LoadOptions extends EnsurePackageOptions {
|
|
26
|
+
/** The module to load, for a pin holding several (default: the pin's name). */
|
|
27
|
+
module?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface Packages {
|
|
30
|
+
readonly home: string;
|
|
31
|
+
/** A package if it is there; never fetches, and reads only its record. */
|
|
32
|
+
locate(name: string): LocatedPackage | undefined;
|
|
33
|
+
/** What a package takes on this computer, as near as its pin says (bytes). */
|
|
34
|
+
size(name: string): number;
|
|
35
|
+
/** The file `import(name)` would load, when the package is there. */
|
|
36
|
+
entry(name: string): string | undefined;
|
|
37
|
+
/** The file a module of an ensured package resolves to, which never fetches. */
|
|
38
|
+
resolve(name: string, module: string): string | undefined;
|
|
39
|
+
/** A package, fetched and checked first if it is not there. */
|
|
40
|
+
ensure(name: string, options?: EnsurePackageOptions): Promise<LocatedPackage>;
|
|
41
|
+
/** A package's module, as `import(name)` would give it, ensured first. */
|
|
42
|
+
load<T>(name: string, options?: LoadOptions): Promise<T>;
|
|
43
|
+
/** Takes a package off this computer; it comes back when next ensured. */
|
|
44
|
+
remove(name: string): Promise<void>;
|
|
45
|
+
}
|
|
46
|
+
/** A setting `npx` puts in the environment about its own install. */
|
|
47
|
+
export declare const NPX_SETTING: RegExp;
|
|
48
|
+
/** What went wrong, from what npm wrote: its reason, not its advice. */
|
|
49
|
+
export declare function npmProblem(stderr: string, code: number | null): string;
|
|
50
|
+
export interface NpmCommand {
|
|
51
|
+
command: string;
|
|
52
|
+
/** What comes before npm's own arguments: its script, when Node runs it. */
|
|
53
|
+
script: string[];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The npm to install with. An app that brings its own names it (bundled.ts),
|
|
57
|
+
* and `npx` names the one that runs it; else the computer's; and where it has
|
|
58
|
+
* none, as a person who only has Studio may not, the runtime manager's Node
|
|
59
|
+
* and its npm, fetched like any runtime.
|
|
60
|
+
*/
|
|
61
|
+
export declare function findNpm(env: Readonly<Record<string, string | undefined>>, ensureNode: () => Promise<Record<string, string>>): Promise<NpmCommand>;
|
|
62
|
+
/** Runs `npm ci` from the lock, keeping npm's cache in AllyHub's home. */
|
|
63
|
+
export declare const npmCi: Install;
|
|
64
|
+
export declare function createPackages(options?: PackagesOptions): Packages;
|
|
65
|
+
//# sourceMappingURL=packages.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{spawn as _}from"node:child_process";import{createHash as T,randomBytes as H}from"node:crypto";import{existsSync as A,readFileSync as b}from"node:fs";import{copyFile as R,mkdir as E,readdir as y,readFile as C,rename as F,rm as g,writeFile as L}from"node:fs/promises";import{createRequire as I}from"node:module";import{delimiter as z,join as o}from"node:path";import{fileURLToPath as J,pathToFileURL as U}from"node:url";import{RuntimeError as k}from"./errors.js";import{cacheHome as W}from"./home.js";import{withLock as B}from"./lock.js";import{nodeCommand as D}from"./node-program.js";import{createRuntimes as M}from"./runtimes.js";const N=".allyhub-package.json",q=J(new URL("../pins/",import.meta.url));async function G(s){const c=o(s,"node_modules","onnxruntime-node","bin","napi-v6");for(const n of await y(c)){if(n!==process.platform){await g(o(c,n),{recursive:!0,force:!0});continue}for(const p of await y(o(c,n)))p!==process.arch&&await g(o(c,n,p),{recursive:!0,force:!0})}if(process.platform!=="darwin")return;const i=o(c,"darwin",process.arch);for(const n of await y(i))/^libonnxruntime\.\d+\.\d+\.\d+\.dylib$/u.test(n)&&await g(o(i,n),{force:!0})}const V={"onnxruntime-node":G};export const NPX_SETTING=/^npm_config_(global|prefix|location|cache|.*_prefix)/iu;export function npmProblem(s,c){return s.split(`
|
|
3
|
+
`).map(n=>n.replace(/^npm (error|ERR!)\s*/u,"").trim()).find(n=>n!==""&&!/^(code|errno|syscall|path|type|A complete log|Exit handler|This is an error with npm|<https)/u.test(n))??`npm ended with code ${String(c)}`}const X=(s,c)=>(c.PATH??"").split(z).some(i=>i!==""&&A(o(i,s)));export async function findNpm(s,c){const i=s.ALLYHUB_NPM??s.npm_execpath;if(i?.endsWith(".js"))return{command:D(s),script:[i]};if(X("npm",s))return{command:"npm",script:[]};const n=await c(),{node:p,npm:l}=n;if(!p||!l)throw new Error("AllyHub's Node has no npm");return{command:p,script:[l]}}export const npmCi=async(s,{home:c,signal:i})=>{const n=await findNpm(process.env,async()=>(await M({home:c}).ensure("node",{signal:i})).bins),p=Object.fromEntries(Object.entries(process.env).filter(([f])=>!NPX_SETTING.test(f))),l=["ci","--ignore-scripts","--omit=dev","--no-audit","--no-fund","--omit=peer","--loglevel=error","--fetch-retries=1"];await new Promise((f,m)=>{const w=_(n.command,[...n.script,...l],{cwd:s,env:{...p,npm_config_cache:o(c,"packages",".npm")},stdio:["ignore","ignore","pipe"],...i?{signal:i}:{}});let h="";w.stderr.on("data",v=>{h=`${h}${v.toString()}`.slice(-1e3)}),w.on("error",m),w.on("close",v=>{v===0?f():m(new Error(npmProblem(h,v)))})})};export function createPackages(s={}){const c=s.env??process.env,i=s.home??W(c),n=s.pins??q,p=s.install??npmCi,l=o(i,"packages"),f=e=>{const r=o(n,e);let t,a;try{t=JSON.parse(b(o(r,"package.json"),"utf8")),a=b(o(r,"package-lock.json"),"utf8")}catch{throw new k("unknown-package",`AllyHub has no package "${e}".`)}const u=t.dependencies??{},d=u[e]??t.version;if(!d)throw new k("unknown-package",`The pin of "${e}" does not name it.`);return{version:d,holds:u,lock:T("sha256").update(a).digest("hex"),dir:r,size:t.allyhubSize??0}},m=(e,r)=>o(l,`${e}@${r.version}`),w=(e,r)=>{try{const t=JSON.parse(b(o(m(e,r),N),"utf8"));return t.version===r.version&&t.lock===r.lock}catch{return!1}},h=(e,r)=>({name:e,version:r.version,dir:m(e,r)}),v=async(e,r,t)=>{const a=m(e,r),u=`${a}.partial-${String(process.pid)}-${H(4).toString("hex")}`;await E(u,{recursive:!0});try{await R(o(r.dir,"package.json"),o(u,"package.json")),await R(o(r.dir,"package-lock.json"),o(u,"package-lock.json")),await p(u,{home:i,signal:t});for(const[d,j]of Object.entries(r.holds)){const O=JSON.parse(await C(o(u,"node_modules",d,"package.json"),"utf8"));if(O.version!==j)throw new Error(`it holds ${d} ${String(O.version)}, not ${j}`)}await V[e]?.(u),await L(o(u,N),`${JSON.stringify({version:r.version,lock:r.lock,at:new Date().toISOString()})}
|
|
4
|
+
`),await g(a,{recursive:!0,force:!0}),await F(u,a),await P(e,r)}catch(d){throw await g(u,{recursive:!0,force:!0}),t?.aborted?new k("cancelled",`Stopped getting ${e}.`,{cause:d}):new k("install",`Could not get ${e} ${r.version} (${d instanceof Error?d.message:String(d)}). Check the connection and run it again.`,{cause:d})}},P=async(e,r)=>{const t=`${e}@${r.version}`;for(const a of await y(l))a.startsWith(`${e}@`)&&a!==t&&!a.startsWith(`${t}.`)&&await g(o(l,a),{recursive:!0,force:!0})},$=e=>{const r=f(e);return w(e,r)?h(e,r):void 0},S=(e,r)=>I(o(e,"package.json")).resolve(r),x=async(e,r={})=>{const t=f(e);return w(e,t)||(await E(l,{recursive:!0}).catch(a=>{throw new k("install",`Could not get ${e} ${t.version}: AllyHub cannot write to ${l}.`,{cause:a})}),await B(`${m(e,t)}.lock`,async()=>{w(e,t)||(r.onFetch?.(e),await v(e,t,r.signal))},{signal:r.signal})),h(e,t)};return{home:i,locate:$,ensure:x,size:e=>f(e).size,entry(e){const r=$(e);return r?S(r.dir,e):void 0},resolve(e,r){const t=$(e);return t?S(t.dir,r):void 0},async load(e,r){const{dir:t}=await x(e,r),a=S(t,r?.module??e);return await import(U(a).href)},async remove(e){await g(m(e,f(e)),{recursive:!0,force:!0})}}}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{randomBytes as P}from"node:crypto";import{chmod as B,mkdir as S,readFile as D,rename as x,rm as
|
|
3
|
-
`),await
|
|
2
|
+
import{randomBytes as P}from"node:crypto";import{chmod as B,mkdir as S,readFile as D,rename as x,rm as v,writeFile as M}from"node:fs/promises";import{dirname as J,join as u}from"node:path";import{binsOf as L,filesFor as U,platformOf as _}from"@allyhub-next/protocol";import{download as T,sha256Of as V}from"./download.js";import{RuntimeError as p}from"./errors.js";import{cacheHome as Y}from"./home.js";import{withLock as q}from"./lock.js";import{shippedManifest as G}from"./manifest.js";import{inside as A,native as K,undmg as Q,untgz as W,unzip as X}from"./unpack.js";const C=".allyhub-runtime.json";export const binVariable=f=>`ALLYHUB_${f.toUpperCase().replaceAll("-","_")}`;export function createRuntimes(f={}){const j=f.env??process.env,z=f.home??Y(j),b=f.manifest??G(),l="platform"in f?f.platform:_(process.platform,process.arch),F=f.fetch??globalThis.fetch,$=u(z,"runtimes"),O=t=>{const e=Object.hasOwn(b.runtimes,t)?b.runtimes[t]:void 0;if(!e)throw new p("unknown-runtime",`AllyHub has no runtime "${t}".`);return e},d=(t,e)=>u($,`${t}@${e.version}`),h=(t,e)=>{const r=l?U(e,l):void 0;if(!r)throw new p("unsupported",`${t} ${e.version} has no build for ${l??`${process.platform}-${process.arch}`}.`);return r},H=(t,e,r)=>Object.fromEntries(Object.entries(L(h(t,e))).map(([n,s])=>[n,u(r,K(s))])),R=(t,e)=>{const r=[...new Set(Object.values(e.platforms).flatMap(a=>Object.keys(L(a))))];if(r.length===0)return;const n=r.map(a=>[a,j[binVariable(a)]]);if(n.some(([,a])=>!a))return;const s=Object.fromEntries(n),o=n[0]?.[1]??"";return{name:t,version:void 0,dir:J(o),bins:s,from:"env"}},y=async(t,e)=>{try{const r=JSON.parse(await D(u(d(t,e),C),"utf8")),n=h(t,e).map(s=>s.sha256);return r.version===e.version&&JSON.stringify(r.files)===JSON.stringify(n)}catch{return!1}},k=async t=>{const e=O(t),r=R(t,e);if(r)return r;if(!await y(t,e))return;const n=d(t,e);return{name:t,version:e.version,dir:n,bins:H(t,e,n),from:"cache"}},I=async(t,e,r)=>{const n=h(t,e),s=d(t,e),o=`${s}.partial-${String(process.pid)}-${P(4).toString("hex")}`,a=u(o,".downloads");await S(a,{recursive:!0});try{for(const[w,i]of n.entries()){const m=u(a,String(w));if(await T(i.url,m,{size:i.size,sha256:i.sha256,fetch:F,signal:r.signal,onProgress:(c,g)=>{r.onProgress?.({runtime:t,url:i.url,received:c,total:g})}}),i.unpack==="zip")await X(m,o);else if(i.unpack==="tgz")await W(m,o);else if(i.unpack==="dmg")await Q(m,o);else{const c=A(o,i.name??Z(i.url));if(!c)throw new p("unpack",`${i.url} would be kept outside its folder.`);await S(J(c),{recursive:!0}),await x(m,c),i.executable&&await B(c,493)}for(const c of i.check){const g=A(o,c.path),N=g?await V(g).catch(()=>"missing"):"missing";if(N!==c.sha256)throw new p("checksum",`${c.path} from ${i.url} has sha256 ${N}; its pin is ${c.sha256}.`)}}await v(a,{recursive:!0,force:!0}),await M(u(o,C),`${JSON.stringify({version:e.version,files:n.map(w=>w.sha256),at:new Date().toISOString()})}
|
|
3
|
+
`),await v(s,{recursive:!0,force:!0}),await x(o,s)}catch(w){throw await v(o,{recursive:!0,force:!0}),w}},E=async(t,e={})=>{const r=O(t),n=await k(t);if(n)return n;h(t,r),await S($,{recursive:!0}),await q(`${d(t,r)}.lock`,async()=>{await y(t,r)||await I(t,r,e)},{signal:e.signal});const s=await k(t);if(!s)throw new p("download",`${t} was installed but cannot be found in ${$}.`);return s};return{home:z,platform:l,locate:k,ensure:E,async bin(t,e,r){const s=(await E(t,r)).bins[e];if(!s)throw new p("unknown-runtime",`${t} holds no program "${e}".`);return s},async remove(t){const e=O(t);await v(d(t,e),{recursive:!0,force:!0})},async status(){return Promise.all(Object.entries(b.runtimes).map(async([t,e])=>{const r=l?U(e,l):void 0,n=d(t,e),s=R(t,e)!==void 0?"env":r!==void 0&&await y(t,e)?"cache":void 0;return{name:t,about:e.about,version:e.version,license:e.license,available:r!==void 0,installed:s!==void 0,...s?{from:s}:{},size:(r??[]).reduce((o,a)=>o+a.size,0),dir:n}}))}}}const Z=f=>decodeURIComponent(new URL(f).pathname.split("/").pop()??"file");
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
export declare function inside(dir: string, entry: string): string | undefined;
|
|
3
3
|
export declare function unzip(file: string, dir: string): Promise<void>;
|
|
4
4
|
export declare function untgz(file: string, dir: string): Promise<void>;
|
|
5
|
+
/**
|
|
6
|
+
* A macOS disk image's items (an app) copied into `dir`: the image is
|
|
7
|
+
* attached read-only where nothing opens it, each item that is not a link
|
|
8
|
+
* (the Applications shortcut is one) copied with ditto, which keeps an
|
|
9
|
+
* app's own links and signatures, and the image detached.
|
|
10
|
+
*/
|
|
11
|
+
export declare function undmg(file: string, dir: string): Promise<void>;
|
|
5
12
|
/** A path in its system's spelling, from a manifest's forward slashes. */
|
|
6
13
|
export declare const native: (path: string) => string;
|
|
7
14
|
//# sourceMappingURL=unpack.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{createWriteStream as
|
|
2
|
+
import{createWriteStream as h}from"node:fs";import{execFile as k}from"node:child_process";import{chmod as $,mkdir as f,mkdtemp as y,readdir as g,rm as x}from"node:fs/promises";import{tmpdir as z}from"node:os";import{dirname as S,isAbsolute as l,join as m,normalize as b,relative as E,sep as v}from"node:path";import{pipeline as W}from"node:stream/promises";import{extract as j}from"tar";import A from"yauzl";import{RuntimeError as u}from"./errors.js";export function inside(e,r){if(r.includes("\0")||l(r)||/^[A-Za-z]:/u.test(r))return;const t=b(m(e,r)),i=E(e,t);if(!(i===""||i.startsWith("..")||l(i)))return t}export async function unzip(e,r){const t=await new Promise((i,a)=>{A.open(e,{lazyEntries:!0,autoClose:!0},(n,o)=>{n?a(new u("unpack",`${e} is not a zip: ${n.message}`,{cause:n})):i(o)})});await new Promise((i,a)=>{const n=o=>{t.close(),a(o instanceof u?o:new u("unpack",`Unpacking ${e} failed: ${String(o)}`,{cause:o}))};t.on("error",n),t.on("end",()=>{i()}),t.on("entry",o=>{const c=o.fileName.split("\\").join("/"),s=inside(r,c);if(!s){n(new u("unpack",`${e} holds ${c}, outside its folder.`));return}const p=o.externalFileAttributes>>>16&65535;if((p&61440)===40960){n(new u("unpack",`${e} holds a link, ${c}.`));return}if(c.endsWith("/")){f(s,{recursive:!0}).then(()=>{t.readEntry()},n);return}t.openReadStream(o,(d,w)=>{if(d){n(d);return}f(S(s),{recursive:!0}).then(()=>W(w,h(s))).then(()=>p&73?$(s,493):void 0).then(()=>{t.readEntry()},n)})}),t.readEntry()})}export async function untgz(e,r){try{await j({file:e,cwd:r,strict:!0,filter:(t,i)=>{const a="type"in i?i.type:void 0;return inside(r,t)!==void 0&&a!=="SymbolicLink"&&a!=="Link"}})}catch(t){throw new u("unpack",`Unpacking ${e} failed: ${t instanceof Error?t.message:String(t)}`,{cause:t})}}export async function undmg(e,r){if(process.platform!=="darwin")throw new u("unpack",`${e} is a macOS disk image.`);const t=await y(m(z(),"allyhub-dmg-")),i=(a,n)=>new Promise((o,c)=>{k(a,n,s=>{s?c(new u("unpack",`${a} ${n[0]??""} ${e} failed: ${s.message}`,{cause:s})):o()})});await i("hdiutil",["attach","-nobrowse","-readonly","-noautoopen","-mountpoint",t,e]);try{for(const a of await g(t,{withFileTypes:!0})){if(a.isSymbolicLink()||a.name.startsWith("."))continue;const n=inside(r,a.name);n&&await i("ditto",[m(t,a.name),n])}}finally{await i("hdiutil",["detach",t,"-force"]).catch(()=>{}),await x(t,{recursive:!0,force:!0})}}export const native=e=>e.split("/").join(v);
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allyhub-next/runtimes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"default": "./dist/index.js"
|
|
9
9
|
},
|
|
10
|
+
"./node": {
|
|
11
|
+
"types": "./dist/node-program.d.ts",
|
|
12
|
+
"default": "./dist/node-program.js"
|
|
13
|
+
},
|
|
10
14
|
"./manifest.json": "./manifest.json"
|
|
11
15
|
},
|
|
12
16
|
"private": true,
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "allyhub-pin-docx",
|
|
3
|
+
"lockfileVersion": 3,
|
|
4
|
+
"requires": true,
|
|
5
|
+
"packages": {
|
|
6
|
+
"": {
|
|
7
|
+
"name": "allyhub-pin-docx",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"docx": "9.15.1",
|
|
10
|
+
"fflate": "0.8.3"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"node_modules/@types/node": {
|
|
14
|
+
"version": "26.6.6",
|
|
15
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.6.tgz",
|
|
16
|
+
"integrity": "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"undici-types": "~8.9.0"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"node_modules/docx": {
|
|
23
|
+
"version": "9.15.1",
|
|
24
|
+
"resolved": "https://registry.npmjs.org/docx/-/docx-9.15.1.tgz",
|
|
25
|
+
"integrity": "sha512-wp8K+wsDov+gjtIE4fA7g4SkCcuefIjwdYUc2OYa8YViCqxKvbASwSODpUXsTIH5BCmoWw7cMVOB1xl3A7Uqig==",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@types/node": "^26.6.2",
|
|
29
|
+
"fflate": "^0.8.3",
|
|
30
|
+
"nanoid": "^6.0.1"
|
|
31
|
+
},
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=16"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"node_modules/fflate": {
|
|
37
|
+
"version": "0.8.3",
|
|
38
|
+
"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.3.tgz",
|
|
39
|
+
"integrity": "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==",
|
|
40
|
+
"license": "MIT"
|
|
41
|
+
},
|
|
42
|
+
"node_modules/nanoid": {
|
|
43
|
+
"version": "6.0.2",
|
|
44
|
+
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-6.0.2.tgz",
|
|
45
|
+
"integrity": "sha512-hIvVOb9Qr1p/9CNNLOe0OlWvgx/ziTsVwKN/GDSsuArN2K0wDiafP3s0SWmsm7o2BdnyS8Z9Z64NFBUbn6ziBg==",
|
|
46
|
+
"funding": [
|
|
47
|
+
{
|
|
48
|
+
"type": "github",
|
|
49
|
+
"url": "https://github.com/sponsors/ai"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"bin": {
|
|
54
|
+
"nanoid": "bin/nanoid.js"
|
|
55
|
+
},
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": "^22 || ^24 || >=26"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"node_modules/undici-types": {
|
|
61
|
+
"version": "8.9.0",
|
|
62
|
+
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz",
|
|
63
|
+
"integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==",
|
|
64
|
+
"license": "MIT"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|