@puzzmo/sdk 1.0.80 → 1.0.82
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/analytics.d.ts.map +1 -1
- package/dist/bootstrapPayload.d.ts.map +1 -1
- package/dist/bootstrapPayload.spec.d.ts.map +1 -1
- package/dist/bundles.cjs +1 -1
- package/dist/bundles.cjs.map +1 -1
- package/dist/bundles.d.ts +10 -2
- package/dist/bundles.d.ts.map +1 -1
- package/dist/bundles.js +2 -2
- package/dist/bundles.js.map +1 -1
- package/dist/contracts.d.ts.map +1 -1
- package/dist/createSimulator-CIE72Xs2.cjs +2233 -0
- package/dist/createSimulator-CIE72Xs2.cjs.map +1 -0
- package/dist/{createSimulator-CpeTqWil.js → createSimulator-Dz1KYZ25.js} +1588 -601
- package/dist/createSimulator-Dz1KYZ25.js.map +1 -0
- package/dist/easing.d.ts +6 -0
- package/dist/easing.d.ts.map +1 -0
- package/dist/editor.d.ts +25 -3
- package/dist/editor.d.ts.map +1 -1
- package/dist/fontFiles.gen.d.ts.map +1 -1
- package/dist/fonts-CP_kAAac.js +83 -0
- package/dist/fonts-CP_kAAac.js.map +1 -0
- package/dist/fonts-CS5qdLf3.cjs +3 -0
- package/dist/fonts-CS5qdLf3.cjs.map +1 -0
- package/dist/fonts.cjs +1 -3
- package/dist/fonts.d.ts +2 -0
- package/dist/fonts.d.ts.map +1 -1
- package/dist/fonts.js +2 -83
- package/dist/gameTracker.d.ts.map +1 -1
- package/dist/global.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.global.js +1 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +157 -123
- package/dist/index.js.map +1 -1
- package/dist/inputs/decoder.d.ts.map +1 -1
- package/dist/inputs/encoder.d.ts.map +1 -1
- package/dist/inputs/encodings.d.ts.map +1 -1
- package/dist/inputs/index.d.ts.map +1 -1
- package/dist/inputs/inputStringEncoder.spec.d.ts.map +1 -1
- package/dist/inputs/migration.d.ts.map +1 -1
- package/dist/inputs/types.d.ts.map +1 -1
- package/dist/keyboard.d.ts.map +1 -1
- package/dist/keyboard.spec.d.ts.map +1 -1
- package/dist/{lua-DKb2Tu2V.js → lua-B8exrfmB.js} +1 -1
- package/dist/{lua-DKb2Tu2V.js.map → lua-B8exrfmB.js.map} +1 -1
- package/dist/{lua-CclI-QKD.cjs → lua-C5r7UXeR.cjs} +1 -1
- package/dist/{lua-CclI-QKD.cjs.map → lua-C5r7UXeR.cjs.map} +1 -1
- package/dist/pico8/channel.d.ts.map +1 -1
- package/dist/pico8/index.cjs +1 -1
- package/dist/pico8/index.d.ts.map +1 -1
- package/dist/pico8/index.js +1 -1
- package/dist/pico8/lua.d.ts.map +1 -1
- package/dist/pico8/palette.d.ts.map +1 -1
- package/dist/pico8/pico8.spec.d.ts.map +1 -1
- package/dist/pico8/protocol.d.ts.map +1 -1
- package/dist/pico8/vitePlugin.d.ts.map +1 -1
- package/dist/plugins.d.ts.map +1 -1
- package/dist/plugins.spec.d.ts.map +1 -1
- package/dist/sdk.d.ts +9 -0
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.gameCompleted.spec.d.ts.map +1 -1
- package/dist/sdk.gameReady.spec.d.ts.map +1 -1
- package/dist/sdk.pause.spec.d.ts.map +1 -1
- package/dist/sdk.session.spec.d.ts.map +1 -1
- package/dist/settings.spec.d.ts.map +1 -1
- package/dist/simulator/checklistProgress.d.ts.map +1 -1
- package/dist/simulator/checklistProgress.spec.d.ts.map +1 -1
- package/dist/simulator/createSimulator.d.ts.map +1 -1
- package/dist/simulator/dockedKeyboard.d.ts.map +1 -1
- package/dist/simulator/fixtures.d.ts.map +1 -1
- package/dist/simulator/index.cjs +1 -1
- package/dist/simulator/index.d.ts.map +1 -1
- package/dist/simulator/index.js +2 -1
- package/dist/simulator/marker.d.ts.map +1 -1
- package/dist/simulator/messaging.d.ts.map +1 -1
- package/dist/simulator/normalizeThumbnail.d.ts.map +1 -1
- package/dist/simulator/pmmgOverlay.d.ts +36 -0
- package/dist/simulator/pmmgOverlay.d.ts.map +1 -0
- package/dist/simulator/pmmgOverlay.spec.d.ts +2 -0
- package/dist/simulator/pmmgOverlay.spec.d.ts.map +1 -0
- package/dist/simulator/pmmgRenderer.d.ts +86 -0
- package/dist/simulator/pmmgRenderer.d.ts.map +1 -0
- package/dist/simulator/pmmgRenderer.spec.d.ts +2 -0
- package/dist/simulator/pmmgRenderer.spec.d.ts.map +1 -0
- package/dist/simulator/standalone.cjs +1 -1
- package/dist/simulator/standalone.cjs.map +1 -1
- package/dist/simulator/standalone.d.ts.map +1 -1
- package/dist/simulator/standalone.js +2 -1
- package/dist/simulator/standalone.js.map +1 -1
- package/dist/simulator/state.d.ts +19 -0
- package/dist/simulator/state.d.ts.map +1 -1
- package/dist/simulator/state.spec.d.ts.map +1 -1
- package/dist/simulator/styles.d.ts +1 -1
- package/dist/simulator/styles.d.ts.map +1 -1
- package/dist/simulator/types.d.ts +5 -0
- package/dist/simulator/types.d.ts.map +1 -1
- package/dist/simulator/views/AuthView.d.ts.map +1 -1
- package/dist/simulator/views/ChecklistView.d.ts.map +1 -1
- package/dist/simulator/views/CheckpointsView.d.ts.map +1 -1
- package/dist/simulator/views/CtrlView.d.ts.map +1 -1
- package/dist/simulator/views/DataView.d.ts.map +1 -1
- package/dist/simulator/views/DoneView.d.ts.map +1 -1
- package/dist/simulator/views/FeaturesView.d.ts.map +1 -1
- package/dist/simulator/views/HostView.d.ts.map +1 -1
- package/dist/simulator/views/KeyboardView.d.ts.map +1 -1
- package/dist/simulator/views/MsgsView.d.ts.map +1 -1
- package/dist/simulator/views/PmmgView.d.ts +7 -0
- package/dist/simulator/views/PmmgView.d.ts.map +1 -0
- package/dist/simulator/views/SettingsView.d.ts.map +1 -1
- package/dist/simulator/views/SoundView.d.ts.map +1 -1
- package/dist/simulator/views/ThemeView.d.ts.map +1 -1
- package/dist/simulator/views/ThumbView.d.ts.map +1 -1
- package/dist/simulator/views/index.d.ts +1 -0
- package/dist/simulator/views/index.d.ts.map +1 -1
- package/dist/svgJSX.d.ts.map +1 -1
- package/dist/tableBoard-B0I9wVQq.js +635 -0
- package/dist/tableBoard-B0I9wVQq.js.map +1 -0
- package/dist/tableBoard-CLDBwRYs.cjs +2 -0
- package/dist/tableBoard-CLDBwRYs.cjs.map +1 -0
- package/dist/tableBoard.cjs +1 -0
- package/dist/tableBoard.d.ts +138 -0
- package/dist/tableBoard.d.ts.map +1 -0
- package/dist/tableBoard.js +2 -0
- package/dist/tableBoardScene.d.ts +21 -0
- package/dist/tableBoardScene.d.ts.map +1 -0
- package/dist/themes.d.ts +16 -16
- package/dist/themes.d.ts.map +1 -1
- package/dist/types.d.ts +170 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/vite.cjs +3 -3
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.ts +20 -0
- package/dist/vite.d.ts.map +1 -1
- package/dist/vite.js +72 -16
- package/dist/vite.js.map +1 -1
- package/package.json +5 -5
- package/dist/createSimulator-B8n7Hlb_.cjs +0 -1930
- package/dist/createSimulator-B8n7Hlb_.cjs.map +0 -1
- package/dist/createSimulator-CpeTqWil.js.map +0 -1
- package/dist/fonts.cjs.map +0 -1
- package/dist/fonts.js.map +0 -1
- package/dist/thumbnailMotion.cjs +0 -5
- package/dist/thumbnailMotion.cjs.map +0 -1
- package/dist/thumbnailMotion.d.ts +0 -119
- package/dist/thumbnailMotion.d.ts.map +0 -1
- package/dist/thumbnailMotion.js +0 -480
- package/dist/thumbnailMotion.js.map +0 -1
- package/dist/thumbnailMotion.spec.d.ts +0 -2
- package/dist/thumbnailMotion.spec.d.ts.map +0 -1
package/dist/themes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.d.ts","
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sources":["../src/themes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC,eAAO,MAAM,UAAU,EAAE,KA8ExB,CAAA;AAmID,eAAO,MAAM,MAAM,EAAE,KAAK,EA8MzB,CAAA;AAED,eAAO,MAAM,iBAAiB,OAAa,CAAA;AAC3C,eAAO,MAAM,gBAAgB,OAAY,CAAA;AACzC,eAAO,MAAM,mBAAmB,OAAmB,CAAA;AAEnD,eAAO,MAAM,sBAAsB,SAAU,OAAO,GAAG,MAAM,SAAS,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,eAAe,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuBtH,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -478,6 +478,167 @@ export type RoundReplayResult = {
|
|
|
478
478
|
valid: false;
|
|
479
479
|
reason: string;
|
|
480
480
|
};
|
|
481
|
+
/**
|
|
482
|
+
* Code Puzzmo's own pages run for a game's passively massively multiplayer side (pmmg), such as its boards at the
|
|
483
|
+
* table, built by `pmmgBundlePlugin` into dist/pmmg-bundle.js. It's
|
|
484
|
+
* public like the app bundle, but runs in a stricter sandbox: a worker in an opaque-origin frame, with no network and
|
|
485
|
+
* no page to reach. Each member is a capability, Puzzmo calls the ones it knows, and a missing one is a feature the
|
|
486
|
+
* game doesn't offer. Write it with `createPmmgBundle`.
|
|
487
|
+
*/
|
|
488
|
+
export type PmmgBundle = {
|
|
489
|
+
/** Neighbours' boards at the table: a player's latest input as a scene Puzzmo draws and animates */
|
|
490
|
+
table?: TableBoardCapability;
|
|
491
|
+
};
|
|
492
|
+
/**
|
|
493
|
+
* Draws a neighbour's board at the table. Puzzmo calls `render` when the neighbour's input changes and the board is
|
|
494
|
+
* due to show it; it never calls it per frame. The scene says what's on the board and how the change from `previous`
|
|
495
|
+
* animates, and Puzzmo does the animating, for every board at the table at once.
|
|
496
|
+
*/
|
|
497
|
+
export type TableBoardCapability = {
|
|
498
|
+
/** The version of this contract the bundle implements */
|
|
499
|
+
contract: 1;
|
|
500
|
+
/** Puzzmo fonts the sprites draw text with, by name from `@puzzmo/sdk/fonts`; they're loaded before the first render */
|
|
501
|
+
fonts?: string[];
|
|
502
|
+
/** The board after one update. Make any sprites it uses with `sprites` before returning. */
|
|
503
|
+
render(update: TableBoardUpdate, sprites: TableBoardSprites): TableBoardScene;
|
|
504
|
+
};
|
|
505
|
+
export type TableBoardUpdate = {
|
|
506
|
+
/** Steady for as long as this board is on the table, for the renderer's own caches. Opaque. */
|
|
507
|
+
board: string;
|
|
508
|
+
puzzle: string;
|
|
509
|
+
input: string;
|
|
510
|
+
/** What the board is showing now, which the change animates from; absent the first time it's drawn */
|
|
511
|
+
previous?: {
|
|
512
|
+
puzzle: string;
|
|
513
|
+
input: string;
|
|
514
|
+
};
|
|
515
|
+
/** Updates Puzzmo passed over between `previous` and this one, because the board was behind or out of sight */
|
|
516
|
+
skipped: number;
|
|
517
|
+
theme: Theme;
|
|
518
|
+
/**
|
|
519
|
+
* How much detail the board is shown with: "high" for a neighbour beside the player, "low" for a board seen in passing,
|
|
520
|
+
* like an ambient table or the lobby's. A low board might drop illustrations for line art, say.
|
|
521
|
+
*/
|
|
522
|
+
fidelity: TableBoardFidelity;
|
|
523
|
+
/** Whether what's behind the board is dark or light. That's the theme's unless the game paints a felt of its own. */
|
|
524
|
+
backgroundStyle: TableBoardBackgroundStyle;
|
|
525
|
+
/** Device pixels per board unit: the resolution sprites are made at */
|
|
526
|
+
pixelsPerUnit: number;
|
|
527
|
+
};
|
|
528
|
+
export type TableBoardFidelity = "high" | "low";
|
|
529
|
+
export type TableBoardBackgroundStyle = "dark" | "light";
|
|
530
|
+
export type TableBoardScene = {
|
|
531
|
+
/** The board's size in board units; it can change between updates */
|
|
532
|
+
width: number;
|
|
533
|
+
height: number;
|
|
534
|
+
/**
|
|
535
|
+
* A size in board units that should land on whole device pixels, like a tile's in a grid of tiles. Puzzmo draws the
|
|
536
|
+
* board a little smaller where it must so that it does, which keeps tiles that meet in line with no seam between them
|
|
537
|
+
*/
|
|
538
|
+
grid?: number;
|
|
539
|
+
/** Everything on the board, drawn in this order */
|
|
540
|
+
nodes: TableBoardNode[];
|
|
541
|
+
/** How a change to a node animates when it doesn't say. Without one, changes are instant. */
|
|
542
|
+
transition?: TableBoardTiming;
|
|
543
|
+
/** One-off animations this change sets off, like a pulse when a tile locks */
|
|
544
|
+
effects?: TableBoardEffect[];
|
|
545
|
+
};
|
|
546
|
+
/**
|
|
547
|
+
* One thing on the board. A node keeps its key from update to update, and that's what animates: when its position,
|
|
548
|
+
* rotation, scale, opacity, tint or brightness changes, it moves from the old value to the new one.
|
|
549
|
+
*/
|
|
550
|
+
export type TableBoardNode = {
|
|
551
|
+
key: string;
|
|
552
|
+
/** What it shows; none for a node that only carries its children. A new sprite shows at once: use a keyframe's to time it. */
|
|
553
|
+
sprite?: string;
|
|
554
|
+
/** A node this one moves, turns and scales with. Its x and y are then from the parent's position. */
|
|
555
|
+
parent?: string;
|
|
556
|
+
/** Where the sprite's anchor sits, in board units */
|
|
557
|
+
x: number;
|
|
558
|
+
y: number;
|
|
559
|
+
/** Degrees clockwise about the anchor. Never wrapped: from 270 to 360 turns a quarter, where 270 to 0 turns three. */
|
|
560
|
+
rotation?: number;
|
|
561
|
+
/** About the anchor; [1, 1] by default */
|
|
562
|
+
scale?: [number, number];
|
|
563
|
+
opacity?: number;
|
|
564
|
+
/** Multiplies the sprite's colour, so a white sprite takes any colour: CSS colour */
|
|
565
|
+
tint?: string;
|
|
566
|
+
/** 1 draws the sprite as it is; 2 is twice as bright */
|
|
567
|
+
brightness?: number;
|
|
568
|
+
/** How the sprite mixes with what's under it, as CSS's mix-blend-mode; normal by default */
|
|
569
|
+
blend?: TableBoardBlend;
|
|
570
|
+
/**
|
|
571
|
+
* Its children blend only with each other, not with what's under the node, as CSS's `isolation: isolate`. They're
|
|
572
|
+
* drawn together first, then put down as one. They must come straight after it in the scene's nodes.
|
|
573
|
+
*/
|
|
574
|
+
isolate?: boolean;
|
|
575
|
+
/** How this node's changes animate, over the scene's; false for an instant change */
|
|
576
|
+
transition?: TableBoardTiming | false;
|
|
577
|
+
/** Plays when the node first appears, from the keyframes to its own values */
|
|
578
|
+
enter?: TableBoardAnimation;
|
|
579
|
+
/** Plays when the node is gone from the next scene, from its last values; it's removed when this ends */
|
|
580
|
+
exit?: TableBoardAnimation;
|
|
581
|
+
};
|
|
582
|
+
/** CSS's blend modes, which a canvas draws the same way */
|
|
583
|
+
export type TableBoardBlend = "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity";
|
|
584
|
+
/** An animation on one node, played over whatever it's doing: see `TableBoardKeyframe` */
|
|
585
|
+
export type TableBoardAnimation = TableBoardTiming & {
|
|
586
|
+
keyframes: TableBoardKeyframe[];
|
|
587
|
+
};
|
|
588
|
+
export type TableBoardEffect = TableBoardAnimation & {
|
|
589
|
+
/** The node it plays on */
|
|
590
|
+
key: string;
|
|
591
|
+
/** Plays this many times; Infinity loops while the node is there (Puzzmo may pause it) */
|
|
592
|
+
iterations?: number;
|
|
593
|
+
};
|
|
594
|
+
/**
|
|
595
|
+
* A moment in an animation, at `offset` from 0 to 1. Values are relative to the node's own, so an animation plays
|
|
596
|
+
* over a move: x, y and rotation add to it, scale, opacity and brightness multiply it, and tint and sprite replace it.
|
|
597
|
+
* A value missing from a keyframe is the node's own there.
|
|
598
|
+
*/
|
|
599
|
+
export type TableBoardKeyframe = {
|
|
600
|
+
offset: number;
|
|
601
|
+
/** How the animation eases from this keyframe to the next */
|
|
602
|
+
easing?: string;
|
|
603
|
+
x?: number;
|
|
604
|
+
y?: number;
|
|
605
|
+
rotation?: number;
|
|
606
|
+
scale?: [number, number];
|
|
607
|
+
opacity?: number;
|
|
608
|
+
brightness?: number;
|
|
609
|
+
tint?: string;
|
|
610
|
+
/** Swaps the sprite from this keyframe on, like a card's face showing halfway through a flip */
|
|
611
|
+
sprite?: string;
|
|
612
|
+
};
|
|
613
|
+
export type TableBoardTiming = {
|
|
614
|
+
duration: number;
|
|
615
|
+
delay?: number;
|
|
616
|
+
/** A CSS easing: a keyword, cubic-bezier() or linear() */
|
|
617
|
+
easing?: string;
|
|
618
|
+
};
|
|
619
|
+
/**
|
|
620
|
+
* Makes the sprites a scene draws, in the sandbox, as pictures Puzzmo keeps. A sprite is made once per resolution and
|
|
621
|
+
* kept for as long as the game is on the table, so an ID must always mean the same picture: put anything that changes
|
|
622
|
+
* the picture, like theme colours, fidelity or background style, into it.
|
|
623
|
+
*/
|
|
624
|
+
export type TableBoardSprites = {
|
|
625
|
+
/** Whether a sprite has been made at this resolution already, so its picture needn't be worked out again */
|
|
626
|
+
has(id: string): boolean;
|
|
627
|
+
/** Paints a sprite on a canvas, in board units */
|
|
628
|
+
draw(id: string, box: TableBoardSpriteBox, paint: (ctx: OffscreenCanvasRenderingContext2D) => void): void;
|
|
629
|
+
/**
|
|
630
|
+
* A sprite from SVG markup in board units, drawn from (0, 0). The fonts named in `fonts` work in it. `defs` is markup
|
|
631
|
+
* the sprite refers to (clip paths, filters, a `<style>` with the game's own `@font-face`), sent and decoded once for
|
|
632
|
+
* every sprite passing the same string, so it can be large.
|
|
633
|
+
*/
|
|
634
|
+
svg(id: string, box: TableBoardSpriteBox, svg: string, defs?: string): void;
|
|
635
|
+
};
|
|
636
|
+
export type TableBoardSpriteBox = {
|
|
637
|
+
width: number;
|
|
638
|
+
height: number;
|
|
639
|
+
/** The point placed at a node's x and y, and turned and scaled about, from the sprite's top left; its centre by default */
|
|
640
|
+
anchor?: [number, number];
|
|
641
|
+
};
|
|
481
642
|
/** Configuration passed to thumbnail renderers */
|
|
482
643
|
export type ThumbnailConfig = {
|
|
483
644
|
theme: Theme;
|
|
@@ -768,6 +929,15 @@ export type GameSettingsUIComponents =
|
|
|
768
929
|
content: GameSettingsUIComponents[];
|
|
769
930
|
hidden?: boolean;
|
|
770
931
|
};
|
|
932
|
+
/**
|
|
933
|
+
* A patch an embed makes to one of a game's settings components, matched by `id`. Embeds list them
|
|
934
|
+
* in their host context at `[gameSlug].settingsUIOverrides`, and `sdk.settings.initialize` applies them.
|
|
935
|
+
*/
|
|
936
|
+
export type SettingsUIOverride = {
|
|
937
|
+
id: string;
|
|
938
|
+
/** Hides the setting from the player and locks it to its `defaultValue` */
|
|
939
|
+
omit?: true;
|
|
940
|
+
} & Partial<GameSettingsUIComponents>;
|
|
771
941
|
/**
|
|
772
942
|
* The haptics a game can ask the host for. Named after the iOS generators they map onto, since
|
|
773
943
|
* that is the only platform which can render them faithfully; other hosts approximate.
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,iCAAiC;IACjC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAA;IACtB,sBAAsB;IACtB,GAAG,EAAE,MAAM,CAAA;IACX,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAA;IACjB,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAA;IAChB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb,kFAAkF;IAClF,QAAQ,EAAE,MAAM,CAAA;IAChB,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAA;IAElB,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAA;IACd,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAA;IACnB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAA;IAEhB,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAA;IACZ,sFAAsF;IACtF,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CAAA;IACD,yHAAyH;IACzH,UAAU,EAAE,iBAAiB,CAAA;IAC7B,0GAA0G;IAC1G,UAAU,EAAE;QAAE,IAAI,EAAE,GAAG,CAAA;KAAE,CAAA;IACzB,iGAAiG;IACjG,YAAY,EAAE,MAAM,CAAA;IACpB,iFAAiF;IACjF,UAAU,EAAE,SAAS,CAAA;IACrB,yHAAyH;IACzH,UAAU,EAAE,MAAM,CAAA;IAClB,mFAAmF;IACnF,WAAW,EAAE,MAAM,CAAA;IACnB,wGAAwG;IACxG,eAAe,EAAE,GAAG,CAAA;IACpB,oGAAoG;IACpG,kBAAkB,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;IACnC,sIAAsI;IACtI,sBAAsB,EAAE;QAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAA;IACtD,oHAAoH;IACpH,mBAAmB,EAAE,MAAM,CAAA;IAC3B;;;OAGG;IACH,aAAa,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAA;CACpC,CAAA"}
|
package/dist/vite.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./chunk-350yNsax.cjs`),t=require(`./objectWithoutProperties-CL_8JSCP.cjs`),n=require(`./objectSpread2-BU9HzoRm.cjs`),r=require(`./asyncToGenerator-Tjg_Hpik.cjs`),i=require(`./lua-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./chunk-350yNsax.cjs`),t=require(`./objectWithoutProperties-CL_8JSCP.cjs`),n=require(`./objectSpread2-BU9HzoRm.cjs`),r=require(`./asyncToGenerator-Tjg_Hpik.cjs`),i=require(`./lua-C5r7UXeR.cjs`);let a=require(`vite`),o=require(`path`);o=e.n(o);let s=require(`fs`);s=e.n(s);let c=require(`child_process`);function l(e,t={}){var n;let r;if(t.cart)r=o.default.resolve(e,t.cart);else{let t=o.default.join(e,`cart`),n=s.default.existsSync(t)?s.default.readdirSync(t).filter(e=>e.endsWith(`.p8`)):[];if(n.length>1)throw Error(`[puzzmo-pico8] found ${n.length} carts in ${t}, pick one with the \`cart\` option`);n.length===1&&(r=o.default.join(t,n[0]))}if(!r||!s.default.existsSync(r))return null;let i=o.default.basename(r,`.p8`),a=o.default.resolve(e,(n=t.exportDir)==null?`export`:n);return{dir:e,cart:r,name:i,exportHTML:o.default.join(a,`${i}.html`),exportJS:o.default.join(a,`${i}.js`)}}function u(e,t,n){let r=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),i=RegExp(`((?:\\.src\\s*=\\s*|\\ssrc=)["'])[^"']*${r}\\.js(["'])`);if(!i.test(e))throw Error(`[puzzmo-pico8] couldn't find where PICO-8's page loads ${t}.js`);e=e.replace(i,`$1./${t}.js$2`),e=e.replace(/var\s+p8_autoplay\s*=\s*false/,`var p8_autoplay = true`),/var\s+pico8_gpio\s*=/.test(e)||(e=e.replace(/<head>/i,`<head>
|
|
2
2
|
<script>var pico8_gpio = new Array(128)<\/script>`)),e=e.replace(/(<style[^>]*>)([\s\S]*?)(<\/style>)/gi,(e,t,n,r)=>t+n.replace(/<!--|-->/g,``).replace(/^[ \t]*-repeat[^;\n]*;[ \t]*$/gm,``)+r),e=e.replace(/ (?!;)/g,` `);let a=e.lastIndexOf(`</body>`);if(a===-1)throw Error(`[puzzmo-pico8] that doesn't look like a PICO-8 export, it has no </body>`);return e.slice(0,a)+n.join(`
|
|
3
3
|
`)+`
|
|
4
4
|
`+e.slice(a)}var d=[`/Applications/PICO-8.app/Contents/MacOS/pico8`,`C:\\Program Files (x86)\\PICO-8\\pico8.exe`,`C:\\Program Files\\PICO-8\\pico8.exe`],f=e=>{var t,n;if(e.includes(`/`)||e.includes(`\\`))return s.default.existsSync(e)?e:null;for(let n of((t=process.env.PATH)==null?``:t).split(o.default.delimiter))for(let t of process.platform===`win32`?[`.exe`,`.cmd`,``]:[``]){let r=o.default.join(n,e+t);if(s.default.existsSync(r))return r}return e===`pico8`?(n=d.find(e=>s.default.existsSync(e)))==null?null:n:null},p=e=>s.default.existsSync(e)?s.default.statSync(e).mtimeMs:0;function m(e={}){var t,n;let r,a=new Map,d=e.pico8===!1?null:(t=(n=e.pico8)==null?process.env.PICO8:n)==null?`pico8`:t,m=e=>r.logger.info(`\x1b[33m\x1b[1m PICO-8 \x1b[22m\x1b[39m${e}`),h=t=>{if(e.writeLua===!1)return;let n=o.default.join(o.default.dirname(t.cart),`puzzmo.lua`);s.default.existsSync(n)&&s.default.readFileSync(n,`utf8`)===i.t||(s.default.writeFileSync(n,i.t),m(`wrote ${o.default.relative(r.root,n)}`))},g=e=>{let t=o.default.dirname(e.cart),n=Math.max(...s.default.readdirSync(t).filter(e=>/\.(p8|lua)$/.test(e)).map(e=>p(o.default.join(t,e))));if(s.default.existsSync(e.exportJS)&&p(e.exportJS)>=n)return;let i=d?f(d):null;if(!i){if(s.default.existsSync(e.exportHTML)){r.logger.warn(`[puzzmo-pico8] ${o.default.relative(r.root,e.cart)} is newer than its export, and PICO-8 isn't around to re-export it. Using the old export.`);return}throw Error(`[puzzmo-pico8] there's no export of ${o.default.relative(r.root,e.cart)} yet, and PICO-8 isn't on your PATH to make one.\nExport it inside PICO-8 with EXPORT ${e.name}.html into ${o.default.relative(r.root,o.default.dirname(e.exportHTML))}/, or set PICO8=/path/to/pico8.`)}s.default.mkdirSync(o.default.dirname(e.exportHTML),{recursive:!0});let a=p(e.exportJS),l=``;try{l=(0,c.execFileSync)(i,[e.cart,`-export`,e.exportHTML],{encoding:`utf8`,timeout:6e4,stdio:[`ignore`,`pipe`,`pipe`]})}catch(e){var u;l=String((u=e.stdout)==null?e:u)}if(p(e.exportJS)===a){let t=/label/i.test(l)?`
|
|
5
|
-
HTML exports need a label: run the cart in PICO-8, press CTRL-7, and save.`:``;throw Error(`[puzzmo-pico8] PICO-8 didn't export ${o.default.relative(r.root,e.cart)}:\n${l.trim()}${t}`)}m(`exported ${o.default.relative(r.root,e.cart)}`)},_=t=>{let n=o.default.dirname(t);if(!a.has(n)){let t=l(n,e);if(!t)return null;a.set(n,t)}return a.get(n)};return{name:`puzzmo-pico8`,config(){var t;let n=(t=e.exportDir)==null?`export`:t;return{server:{watch:{ignored:[e=>/\.(html|js)$/.test(e)&&o.default.basename(o.default.dirname(e))===o.default.basename(n)&&s.default.existsSync(o.default.join(o.default.dirname(o.default.dirname(e)),`cart`))]}}}},configResolved(e){r=e},transformIndexHtml:{order:`pre`,handler(e,t){var n;let r=_(t.filename);if(!r)return;h(r),g(r);let i=(n=e.match(/<script\b[^>]*type=["']module["'][^>]*>[\s\S]*?<\/script>/gi))==null?[]:n;return u(s.default.readFileSync(r.exportHTML,`utf8`),r.name,i)}},configureServer(e){e.middlewares.use((e,t,n)=>{var i;let c=decodeURIComponent(((i=e.url)==null?``:i).split(`?`)[0]);if(!c.endsWith(`.js`))return n();let l=[...a.values()].find(e=>c===`/`+o.default.relative(r.root,o.default.join(e.dir,`${e.name}.js`)).split(o.default.sep).join(`/`));if(!l||!s.default.existsSync(l.exportJS))return n();t.setHeader(`Content-Type`,`text/javascript`),t.end(s.default.readFileSync(l.exportJS))}),e.watcher.on(`change`,t=>{let n=[...a.values()].find(e=>o.default.dirname(t)===o.default.dirname(e.cart)&&/\.(p8|lua)$/.test(t));if(!(!n||o.default.basename(t)===`puzzmo.lua`))try{g(n),e.ws.send({type:`full-reload`})}catch(t){let n=t instanceof Error?t.message:String(t);r.logger.error(n),e.ws.send({type:`error`,err:{message:n,stack:``}})}})},generateBundle(){for(let e of a.values()){let t=o.default.relative(r.root,o.default.join(e.dir,`${e.name}.js`)).split(o.default.sep).join(`/`);this.emitFile({type:`asset`,fileName:t,source:s.default.readFileSync(e.exportJS)})}}}}var h=[`fixturesGlob`,`viewFactories`],g=`/@puzzmo-simulator-init.js`,_=`virtual:puzzmo-simulator`;function v(e){let t=new Map,n=
|
|
5
|
+
HTML exports need a label: run the cart in PICO-8, press CTRL-7, and save.`:``;throw Error(`[puzzmo-pico8] PICO-8 didn't export ${o.default.relative(r.root,e.cart)}:\n${l.trim()}${t}`)}m(`exported ${o.default.relative(r.root,e.cart)}`)},_=t=>{let n=o.default.dirname(t);if(!a.has(n)){let t=l(n,e);if(!t)return null;a.set(n,t)}return a.get(n)};return{name:`puzzmo-pico8`,config(){var t;let n=(t=e.exportDir)==null?`export`:t;return{server:{watch:{ignored:[e=>/\.(html|js)$/.test(e)&&o.default.basename(o.default.dirname(e))===o.default.basename(n)&&s.default.existsSync(o.default.join(o.default.dirname(o.default.dirname(e)),`cart`))]}}}},configResolved(e){r=e},transformIndexHtml:{order:`pre`,handler(e,t){var n;let r=_(t.filename);if(!r)return;h(r),g(r);let i=(n=e.match(/<script\b[^>]*type=["']module["'][^>]*>[\s\S]*?<\/script>/gi))==null?[]:n;return u(s.default.readFileSync(r.exportHTML,`utf8`),r.name,i)}},configureServer(e){e.middlewares.use((e,t,n)=>{var i;let c=decodeURIComponent(((i=e.url)==null?``:i).split(`?`)[0]);if(!c.endsWith(`.js`))return n();let l=[...a.values()].find(e=>c===`/`+o.default.relative(r.root,o.default.join(e.dir,`${e.name}.js`)).split(o.default.sep).join(`/`));if(!l||!s.default.existsSync(l.exportJS))return n();t.setHeader(`Content-Type`,`text/javascript`),t.end(s.default.readFileSync(l.exportJS))}),e.watcher.on(`change`,t=>{let n=[...a.values()].find(e=>o.default.dirname(t)===o.default.dirname(e.cart)&&/\.(p8|lua)$/.test(t));if(!(!n||o.default.basename(t)===`puzzmo.lua`))try{g(n),e.ws.send({type:`full-reload`})}catch(t){let n=t instanceof Error?t.message:String(t);r.logger.error(n),e.ws.send({type:`error`,err:{message:n,stack:``}})}})},generateBundle(){for(let e of a.values()){let t=o.default.relative(r.root,o.default.join(e.dir,`${e.name}.js`)).split(o.default.sep).join(`/`);this.emitFile({type:`asset`,fileName:t,source:s.default.readFileSync(e.exportJS)})}}}}var h=[`fixturesGlob`,`viewFactories`],g=`/@puzzmo-simulator-init.js`,_=`virtual:puzzmo-simulator`;function v(e){let t=new Map,n=M(e,3);s.default.existsSync(o.default.join(e,`puzzmo.json`))&&n.unshift(e);for(let i of n)try{var r;let n=JSON.parse(s.default.readFileSync(o.default.join(i,`puzzmo.json`),`utf-8`));if(!(!(n==null||(r=n.game)==null)&&r.slug))continue;let a=n.integrations&&typeof n.integrations==`object`?n.integrations:void 0;t.set(n.game.slug,{dir:i,slug:n.game.slug,displayName:n.game.displayName,appBundlePath:w(e,T(i,`src/appBundle`)),pmmgBundlePath:w(e,T(i,`src/pmmgBundle`)),integrations:a})}catch(e){}return t}function y(e,t,n){if(e)try{let r=new URL(e).pathname;for(let e of t.values()){let t=`/`+o.default.relative(n,e.dir).split(o.default.sep).join(`/`);if(r.startsWith(t+`/`)||r===t)return e}}catch(e){}if(t.size===1)return t.values().next().value}function b(e,r){let{fixturesGlob:i,viewFactories:a}=e,o=t.t(e,h),s=i===!1?null:i==null?`/fixtures/puzzles/**/*.{json,toml}`:i,c=[`import { createSimulator } from "@puzzmo/sdk/simulator"`];for(let e of a==null?[]:a)c.push(`import { ${e.export} } from ${JSON.stringify(e.module)}`);s&&c.push(`const fixtures = import.meta.glob(${JSON.stringify(s)}, { query: "?raw", import: "default", eager: true })`),r!=null&&r.appBundlePath&&(c.push(`import(${JSON.stringify(r.appBundlePath)}).then(m => {`),c.push(` if (m.renderThumbnail) globalThis.renderThumbnail = m.renderThumbnail`),c.push(` if (m.getShareString) globalThis.getShareString = m.getShareString`),c.push(`}).catch(() => {})`));let l=n.t(n.t(n.t({},o),r!=null&&r.slug?{slug:r.slug}:{}),r!=null&&r.integrations?{integrations:r.integrations}:{}),u=Object.entries(l).filter(([,e])=>e!==void 0).map(([e,t])=>`${e}: ${JSON.stringify(t)}`);return s&&u.push(`fixtures`),r!=null&&r.pmmgBundlePath&&u.push(`pmmgBundle: () => import(${JSON.stringify(r.pmmgBundlePath)})`),a!=null&&a.length&&u.push(`views: [${a.map(e=>`${e.export}()`).join(`, `)}]`),c.push(`createSimulator({ ${u.join(`, `)} })`),c.join(`
|
|
6
6
|
`)}function x(e={}){let t=new Map,n;return{name:`puzzmo-simulator`,apply:`serve`,configResolved(e){if(n=e.root,t=v(n),t.size===0)e.logger.info(`\x1B[33m\x1B[1m PUZZMO \x1B[22m\x1B[39m\x1B[2m no puzzmo.json files found\x1B[22m`);else{let n=[...t.values()].map(e=>`\x1b[36m${e.slug}\x1b[39m`),r=t.size===1?`game`:`games`;e.logger.info(`\x1b[33m\x1b[1m PUZZMO \x1b[22m\x1b[39m found ${t.size} ${r}: ${n.join(`\x1B[2m, \x1B[22m`)}`)}},resolveId(e){if(e===_||e.startsWith(_+`?`))return`\0`+e},load(n){if(!n.startsWith(`\0`+_))return;let r=new URLSearchParams(n.split(`?`)[1]||``).get(`game`);return b(e,r?t.get(r):t.size===1?t.values().next().value:void 0)},configureServer(e){for(let n of t.values())e.watcher.add(o.default.join(n.dir,`puzzmo.json`));e.watcher.on(`change`,r=>{if(o.default.basename(r)===`puzzmo.json`){t=v(n);for(let t of e.moduleGraph.idToModuleMap.values()){var i;(i=t.id)!=null&&i.startsWith(`\0`+_)&&e.moduleGraph.invalidateModule(t)}e.ws.send({type:`full-reload`})}}),e.middlewares.use(`/oauth/callback`,(e,t)=>{t.setHeader(`Content-Type`,`text/html`),t.end(`<!DOCTYPE html>
|
|
7
7
|
<html><head><title>Puzzmo OAuth</title></head>
|
|
8
8
|
<body><script>
|
|
@@ -11,5 +11,5 @@ var returnUrl = sessionStorage.getItem("oauth_return_url") || "/";
|
|
|
11
11
|
var url = new URL(returnUrl);
|
|
12
12
|
params.forEach(function(v, k) { url.searchParams.set(k, v); });
|
|
13
13
|
window.location.href = url.toString();
|
|
14
|
-
<\/script></body></html>`)}),e.middlewares.use(function(){var i=r.t(function*(r,i,a){var o;if(((o=r.url)==null?void 0:o.split(`?`)[0])!==g)return a();let s=y(r.headers.referer,t,n),c=_+(s?`?game=${s.slug}`:``),l=yield e.transformRequest(c);if(!l)return a();i.setHeader(`Content-Type`,`application/javascript`),i.end(l.code)});return function(e,t,n){return i.apply(this,arguments)}}())},transformIndexHtml(){return[{tag:`script`,attrs:{type:`module`,src:g},injectTo:`head`}]}}}function S(e,t){return(i={})=>{let{entry:s,outputFile:c,outDir:l}=n.t(n.t({},t),i);return{name:e,apply:`build`,closeBundle(){return r.t(function*(){var t;let n=i.entry?o.default.isAbsolute(s)?s:o.default.resolve(process.cwd(),s):(t=
|
|
14
|
+
<\/script></body></html>`)}),e.middlewares.use(function(){var i=r.t(function*(r,i,a){var o;if(((o=r.url)==null?void 0:o.split(`?`)[0])!==g)return a();let s=y(r.headers.referer,t,n),c=_+(s?`?game=${s.slug}`:``),l=yield e.transformRequest(c);if(!l)return a();i.setHeader(`Content-Type`,`application/javascript`),i.end(l.code)});return function(e,t,n){return i.apply(this,arguments)}}())},transformIndexHtml(){return[{tag:`script`,attrs:{type:`module`,src:g},injectTo:`head`}]}}}function S(e,t){return(i={})=>{let{entry:s,outputFile:c,outDir:l}=n.t(n.t({},t),i);return{name:e,apply:`build`,closeBundle(){return r.t(function*(){var t;let n=i.entry?o.default.isAbsolute(s)?s:o.default.resolve(process.cwd(),s):(t=T(process.cwd(),C(s)))==null?o.default.resolve(process.cwd(),s):t;try{yield(0,a.build)({configFile:!1,logLevel:`warn`,build:{lib:{entry:n,formats:[`es`],fileName:()=>c},outDir:l,emptyOutDir:!1}})}catch(t){throw console.error(`[${e}] build failed:`,t),t}})()}}}}var C=e=>e.replace(/\.[jt]sx?$/i,``),w=(e,t)=>t?`/`+o.default.relative(e,t).split(o.default.sep).join(`/`):null,T=(e,t)=>{for(let n of[`.js`,`.ts`,`.tsx`,`.jsx`]){let r=o.default.join(e,t+n);if(s.default.existsSync(r))return r}return null};const E=S(`app-bundle`,{entry:`src/appBundle.js`,outputFile:`app-bundle.js`,outDir:`dist`}),D=S(`server-bundle`,{entry:`src/serverBundle.js`,outputFile:`server-bundle.js`,outDir:`dist-server`});var O=S(`pmmg-bundle`,{entry:`src/pmmgBundle.js`,outputFile:`pmmg-bundle.js`,outDir:`dist`});const k=(e={})=>[O(e),{name:`pmmg-bundle-dev`,apply:`serve`,configureServer(t){let n;t.middlewares.use((r,i,a)=>{var s;if(!/^\/pmmg-bundle\.js(?:\?.*)?$/.test(r.url||``))return a();let c=(s=e.entry)==null?T(t.config.root,`src/pmmgBundle`):s;if(!c)return a();n!=null||(n=A(o.default.resolve(t.config.root,c)).finally(()=>n=void 0)),n.then(e=>{i.setHeader(`Content-Type`,`text/javascript`),i.setHeader(`Access-Control-Allow-Origin`,`*`),i.setHeader(`Cache-Control`,`no-store`),i.end(e)},e=>{var n;t.config.logger.error(`[pmmg-bundle] build failed: ${(n=e==null?void 0:e.message)==null?e:n}`),i.statusCode=500,i.end()})})}}],A=function(){var e=r.t(function*(e){let t=yield(0,a.build)({configFile:!1,logLevel:`warn`,build:{write:!1,copyPublicDir:!1,minify:!1,sourcemap:`inline`,lib:{entry:e,formats:[`es`],fileName:()=>`pmmg-bundle.js`},rolldownOptions:{output:{codeSplitting:!1}}}}),n=(Array.isArray(t)?t:`output`in t?[t]:[]).flatMap(e=>e.output).find(e=>e.type===`chunk`&&e.isEntry);if(!n||n.type!==`chunk`)throw Error(`Building ${e} made no bundle`);return n.code});return function(t){return e.apply(this,arguments)}}(),j=S(`editor-bundle`,{entry:`src/editorBundle.js`,outputFile:`editor-bundle.js`,outDir:`dist`}),M=(e,t,n=0)=>{if(n>=t)return[];let r=[],i;try{i=s.default.readdirSync(e,{withFileTypes:!0})}catch(e){return r}for(let a of i){if(!a.isDirectory()||a.name.startsWith(`.`)||a.name===`node_modules`)continue;let i=o.default.join(e,a.name);s.default.existsSync(o.default.join(i,`puzzmo.json`))&&r.push(i),r.push(...M(i,t,n+1))}return r};exports.appBundlePlugin=E,exports.buildPmmgBundleSource=A,exports.discoverGames=v,exports.editorBundlePlugin=j,exports.findPuzzmoJsonDirs=M,exports.generateSimulatorCode=b,exports.pmmgBundlePlugin=k,exports.puzzmoPico8=m,exports.puzzmoSimulator=x,exports.resolveGameFromReferer=y,exports.serverBundlePlugin=D;
|
|
15
15
|
//# sourceMappingURL=vite.cjs.map
|
package/dist/vite.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite.cjs","names":[],"sources":["../src/pico8/vitePlugin.ts","../src/vite.ts"],"sourcesContent":["import type { Plugin, ResolvedConfig } from \"vite\"\nimport { execFileSync } from \"child_process\"\nimport path from \"path\"\nimport fs from \"fs\"\nimport { puzzmoLua } from \"./lua\"\n\nexport type PuzzmoPico8PluginOptions = {\n /** The cart, relative to the page. Defaults to the only `.p8` file in `cart/`. */\n cart?: string\n /** Where PICO-8's HTML export lives, relative to the page. Defaults to `export`. Commit it, so builds don't need PICO-8. */\n exportDir?: string\n /**\n * The PICO-8 binary used to re-export the cart when it changes. Defaults to `$PICO8`, then `pico8` on your PATH,\n * then where PICO-8's installers put it. When it can't be found the committed export is used as-is. Pass false to\n * never export.\n */\n pico8?: string | false\n /** Keep `puzzmo.lua` next to the cart up to date. Defaults to true. */\n writeLua?: boolean\n}\n\n/** @internal */\nexport type Pico8Game = {\n /** The directory holding the page */\n dir: string\n cart: string\n /** The cart's name, which PICO-8 also uses for its export */\n name: string\n exportHTML: string\n exportJS: string\n}\n\n/** @internal Finds the PICO-8 game served by the page in `dir`, if there is one. */\nexport function findPico8Game(dir: string, options: PuzzmoPico8PluginOptions = {}): Pico8Game | null {\n let cart: string | undefined\n if (options.cart) cart = path.resolve(dir, options.cart)\n else {\n const cartDir = path.join(dir, \"cart\")\n const carts = fs.existsSync(cartDir) ? fs.readdirSync(cartDir).filter((f) => f.endsWith(\".p8\")) : []\n if (carts.length > 1) throw new Error(`[puzzmo-pico8] found ${carts.length} carts in ${cartDir}, pick one with the \\`cart\\` option`)\n if (carts.length === 1) cart = path.join(cartDir, carts[0])\n }\n if (!cart || !fs.existsSync(cart)) return null\n const name = path.basename(cart, \".p8\")\n const exportDir = path.resolve(dir, options.exportDir ?? \"export\")\n return { dir, cart, name, exportHTML: path.join(exportDir, `${name}.html`), exportJS: path.join(exportDir, `${name}.js`) }\n}\n\n/**\n * @internal\n * Turns PICO-8's exported page into a Puzzmo game's page. PICO-8's shell is a thousand lines of globals and handlers\n * its runtime expects to find, and it changes between versions, so rather than keep a copy we adjust theirs.\n */\nexport function patchPico8Export(html: string, name: string, scripts: string[]): string {\n const escaped = name.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")\n\n // PICO-8 loads its runtime from a script element it builds itself. Point it at the copy we serve next to the page,\n // relative because Puzzmo serves games from a subfolder.\n const runtime = new RegExp(`((?:\\\\.src\\\\s*=\\\\s*|\\\\ssrc=)[\"'])[^\"']*${escaped}\\\\.js([\"'])`)\n if (!runtime.test(html)) throw new Error(`[puzzmo-pico8] couldn't find where PICO-8's page loads ${name}.js`)\n html = html.replace(runtime, `$1./${name}.js$2`)\n\n // Boot straight away. Otherwise the cart waits for a click on PICO-8's play button and the host never hears that\n // the game loaded. (Browsers which need a tap before audio can start, like iOS Safari, still show the button.)\n html = html.replace(/var\\s+p8_autoplay\\s*=\\s*false/, \"var p8_autoplay = true\")\n\n // The GPIO array, for shells old enough not to declare it themselves.\n if (!/var\\s+pico8_gpio\\s*=/.test(html)) html = html.replace(/<head>/i, \"<head>\\n<script>var pico8_gpio = new Array(128)</script>\")\n\n // Things a browser shrugs off and Vite doesn't: an HTML comment wrapped around the stylesheet, a stray\n // `-repeat center;` in it, and an ` ` without its semicolon.\n html = html.replace(\n /(<style[^>]*>)([\\s\\S]*?)(<\\/style>)/gi,\n (_, open: string, css: string, close: string) =>\n open + css.replace(/<!--|-->/g, \"\").replace(/^[ \\t]*-repeat[^;\\n]*;[ \\t]*$/gm, \"\") + close,\n )\n html = html.replace(/ (?!;)/g, \" \")\n\n const bodyEnd = html.lastIndexOf(\"</body>\")\n if (bodyEnd === -1) throw new Error(\"[puzzmo-pico8] that doesn't look like a PICO-8 export, it has no </body>\")\n return html.slice(0, bodyEnd) + scripts.join(\"\\n\") + \"\\n\" + html.slice(bodyEnd)\n}\n\n/** Where PICO-8's own installers put it, for people who never added it to their PATH. */\nconst usualPico8Locations = [\n \"/Applications/PICO-8.app/Contents/MacOS/pico8\",\n \"C:\\\\Program Files (x86)\\\\PICO-8\\\\pico8.exe\",\n \"C:\\\\Program Files\\\\PICO-8\\\\pico8.exe\",\n]\n\n/** Finds an executable on the PATH without running it: `pico8` with no export arguments opens the whole app. */\nconst findExecutable = (bin: string): string | null => {\n if (bin.includes(\"/\") || bin.includes(\"\\\\\")) return fs.existsSync(bin) ? bin : null\n for (const dir of (process.env.PATH ?? \"\").split(path.delimiter)) {\n for (const ext of process.platform === \"win32\" ? [\".exe\", \".cmd\", \"\"] : [\"\"]) {\n const candidate = path.join(dir, bin + ext)\n if (fs.existsSync(candidate)) return candidate\n }\n }\n if (bin === \"pico8\") return usualPico8Locations.find((p) => fs.existsSync(p)) ?? null\n return null\n}\n\nconst mtime = (file: string) => (fs.existsSync(file) ? fs.statSync(file).mtimeMs : 0)\n\n/**\n * Vite plugin for games written as PICO-8 carts. Your `index.html` only needs your own script tag, the plugin swaps\n * in PICO-8's exported page around it, serves the PICO-8 runtime next to it, and copies it into the build.\n *\n * When PICO-8 is installed it also re-exports the cart whenever it (or a `.lua` file next to it) changes, and reloads\n * the page, so saving in PICO-8 is enough to see the change in the simulator.\n */\nexport function puzzmoPico8(options: PuzzmoPico8PluginOptions = {}): Plugin {\n let config: ResolvedConfig\n const games = new Map<string, Pico8Game>()\n const binary = options.pico8 === false ? null : (options.pico8 ?? process.env.PICO8 ?? \"pico8\")\n\n const log = (message: string) => config.logger.info(`\\x1b[33m\\x1b[1m PICO-8 \\x1b[22m\\x1b[39m${message}`)\n\n const writeLua = (game: Pico8Game) => {\n if (options.writeLua === false) return\n const file = path.join(path.dirname(game.cart), \"puzzmo.lua\")\n if (fs.existsSync(file) && fs.readFileSync(file, \"utf8\") === puzzmoLua) return\n fs.writeFileSync(file, puzzmoLua)\n log(`wrote ${path.relative(config.root, file)}`)\n }\n\n /** Re-exports the cart when it's newer than the export and PICO-8 is around to do it. */\n const exportIfStale = (game: Pico8Game) => {\n const cartDir = path.dirname(game.cart)\n const newest = Math.max(\n ...fs\n .readdirSync(cartDir)\n .filter((f) => /\\.(p8|lua)$/.test(f))\n .map((f) => mtime(path.join(cartDir, f))),\n )\n if (fs.existsSync(game.exportJS) && mtime(game.exportJS) >= newest) return\n\n const pico8 = binary ? findExecutable(binary) : null\n if (!pico8) {\n if (fs.existsSync(game.exportHTML)) {\n config.logger.warn(\n `[puzzmo-pico8] ${path.relative(config.root, game.cart)} is newer than its export, and PICO-8 isn't around to re-export it. Using the old export.`,\n )\n return\n }\n throw new Error(\n `[puzzmo-pico8] there's no export of ${path.relative(config.root, game.cart)} yet, and PICO-8 isn't on your PATH to make one.\\n` +\n `Export it inside PICO-8 with EXPORT ${game.name}.html into ${path.relative(config.root, path.dirname(game.exportHTML))}/, or set PICO8=/path/to/pico8.`,\n )\n }\n\n fs.mkdirSync(path.dirname(game.exportHTML), { recursive: true })\n const before = mtime(game.exportJS)\n let output = \"\"\n try {\n output = execFileSync(pico8, [game.cart, \"-export\", game.exportHTML], {\n encoding: \"utf8\",\n timeout: 60_000,\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n })\n } catch (error) {\n output = String((error as { stdout?: string }).stdout ?? error)\n }\n if (mtime(game.exportJS) === before) {\n const hint = /label/i.test(output) ? \"\\nHTML exports need a label: run the cart in PICO-8, press CTRL-7, and save.\" : \"\"\n throw new Error(`[puzzmo-pico8] PICO-8 didn't export ${path.relative(config.root, game.cart)}:\\n${output.trim()}${hint}`)\n }\n log(`exported ${path.relative(config.root, game.cart)}`)\n }\n\n const gameForPage = (htmlFile: string) => {\n const dir = path.dirname(htmlFile)\n if (!games.has(dir)) {\n const game = findPico8Game(dir, options)\n if (!game) return null\n games.set(dir, game)\n }\n return games.get(dir)!\n }\n\n return {\n name: \"puzzmo-pico8\",\n\n config() {\n // The export is rewritten on every save, and Vite reloads the page for any .html it sees change. The plugin\n // reloads once the export is done, so Vite reloading too would boot the cart twice.\n const exportDir = options.exportDir ?? \"export\"\n const isExport = (file: string) =>\n /\\.(html|js)$/.test(file) &&\n path.basename(path.dirname(file)) === path.basename(exportDir) &&\n fs.existsSync(path.join(path.dirname(path.dirname(file)), \"cart\"))\n return { server: { watch: { ignored: [isExport] } } }\n },\n\n configResolved(resolved) {\n config = resolved\n },\n\n transformIndexHtml: {\n order: \"pre\",\n handler(html, ctx) {\n const game = gameForPage(ctx.filename)\n if (!game) return\n writeLua(game)\n exportIfStale(game)\n // Keep the page's own module scripts: that's the game code.\n const scripts = html.match(/<script\\b[^>]*type=[\"']module[\"'][^>]*>[\\s\\S]*?<\\/script>/gi) ?? []\n return patchPico8Export(fs.readFileSync(game.exportHTML, \"utf8\"), game.name, scripts)\n },\n },\n\n configureServer(devServer) {\n // Serve the runtime next to the page, untouched by Vite's transforms: it is a megabyte of emscripten output\n // which only works exactly as PICO-8 wrote it.\n devServer.middlewares.use((req, res, next) => {\n const url = decodeURIComponent((req.url ?? \"\").split(\"?\")[0])\n if (!url.endsWith(\".js\")) return next()\n const game = [...games.values()].find(\n (g) =>\n url ===\n \"/\" +\n path\n .relative(config.root, path.join(g.dir, `${g.name}.js`))\n .split(path.sep)\n .join(\"/\"),\n )\n if (!game || !fs.existsSync(game.exportJS)) return next()\n res.setHeader(\"Content-Type\", \"text/javascript\")\n res.end(fs.readFileSync(game.exportJS))\n })\n\n // Saving the cart in PICO-8 re-exports it and reloads the page.\n devServer.watcher.on(\"change\", (file) => {\n const game = [...games.values()].find((g) => path.dirname(file) === path.dirname(g.cart) && /\\.(p8|lua)$/.test(file))\n if (!game || path.basename(file) === \"puzzmo.lua\") return\n try {\n exportIfStale(game)\n devServer.ws.send({ type: \"full-reload\" })\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n config.logger.error(message)\n devServer.ws.send({ type: \"error\", err: { message, stack: \"\" } })\n }\n })\n },\n\n generateBundle() {\n for (const game of games.values()) {\n const fileName = path\n .relative(config.root, path.join(game.dir, `${game.name}.js`))\n .split(path.sep)\n .join(\"/\")\n this.emitFile({ type: \"asset\", fileName, source: fs.readFileSync(game.exportJS) })\n }\n },\n }\n}\n","import type { Plugin, ResolvedConfig } from \"vite\"\nimport { build } from \"vite\"\nimport path from \"path\"\nimport fs from \"fs\"\nimport type { HostContext } from \"./types\"\nimport type { HostContextPreset, SimulatorIntegrations } from \"./simulator/types\"\n\nexport { puzzmoPico8, type PuzzmoPico8PluginOptions } from \"./pico8/vitePlugin\"\n\nexport type PuzzmoSimulatorPluginOptions = {\n /** Whether to auto-start the game after READY (default: true) */\n autoStart?: boolean\n /** Initial collapsed state (default: true) */\n collapsed?: boolean\n /**\n * Glob pattern for fixture files, passed to import.meta.glob which is relative to the closest puzzmo.json. Defaults\n * to `\"/fixtures/puzzles/**\\/*.{json,toml}\"`. Fixtures are loaded as raw strings (any text format works — JSON,\n * TOML, or a custom format) and delivered to the game verbatim, so the game parses them itself. Pass false to disable.\n */\n fixturesGlob?: string | false\n /**\n * Whether READY_DATA carries a play session (default: true). Set to false to run the game the way\n * a host will for a mode with no puzzle. Ignored for games built on an SDK from before runtime contract \"1.1\".\n */\n session?: boolean\n /**\n * The `hostContext` array the simulator sends in READY_DATA, so host-context-dependent features\n * (embed settings, sandbox mode, mobile layout, …) can be exercised locally. Must be\n * JSON-serializable. Defaults to a single desktop \"app\" context; the simulator's Host tab can\n * override it at runtime (persisted per-browser, applied on restart).\n *\n * @internal\n */\n hostContext?: HostContext[]\n /**\n * Extra named `hostContext` presets for the simulator's Host tab, alongside the generic\n * built-ins — how a game ships its own scenarios (e.g. crossword's partner-embed toolbar\n * settings). Must be JSON-serializable.\n *\n * @internal\n */\n hostContextPresets?: HostContextPreset[]\n /**\n * Plugin-provided simulator tabs, named rather than passed directly because this config is\n * serialized into a virtual module. Each entry is imported and called with no arguments, so the\n * export must be a `() => SimulatorView` factory — e.g.\n * `{ module: \"@puzzmo-com/shared/sdkPlugins\", export: \"createCollabSimulatorView\" }`.\n */\n viewFactories?: { module: string; export: string }[]\n}\n\nconst simulatorURL = \"/@puzzmo-simulator-init.js\"\nconst virtualID = \"virtual:puzzmo-simulator\"\n\n/** @internal */\nexport type GameInfo = {\n /** Directory containing the puzzmo.json */\n dir: string\n slug: string\n displayName: string\n /** Vite-root-relative path to app bundle entry, if it exists */\n appBundlePath: string | null\n /** `integrations` from the puzzmo.json, passed to simulator tabs that preview them */\n integrations?: SimulatorIntegrations\n}\n\n/**\n * Discover all games from puzzmo.json files under a root directory.\n *\n * @internal\n */\nexport function discoverGames(viteRoot: string): Map<string, GameInfo> {\n const games = new Map<string, GameInfo>()\n const candidates = findPuzzmoJsonDirs(viteRoot, 3)\n if (fs.existsSync(path.join(viteRoot, \"puzzmo.json\"))) {\n candidates.unshift(viteRoot)\n }\n for (const dir of candidates) {\n try {\n const data = JSON.parse(fs.readFileSync(path.join(dir, \"puzzmo.json\"), \"utf-8\"))\n if (!data?.game?.slug) continue\n const bundleEntry = resolveBundleEntry(dir, \"src/appBundle\")\n let appBundle: string | null = null\n if (bundleEntry) {\n const relative = path.relative(viteRoot, bundleEntry)\n appBundle = \"/\" + relative.split(path.sep).join(\"/\")\n }\n const integrations = data.integrations && typeof data.integrations === \"object\" ? data.integrations : undefined\n games.set(data.game.slug, { dir, slug: data.game.slug, displayName: data.game.displayName, appBundlePath: appBundle, integrations })\n } catch {\n // skip invalid files\n }\n }\n return games\n}\n\n/**\n * Resolve which game a request belongs to using the referer URL.\n *\n * @internal\n */\nexport function resolveGameFromReferer(referer: string | undefined, games: Map<string, GameInfo>, viteRoot: string): GameInfo | undefined {\n if (referer) {\n try {\n const refPath = new URL(referer).pathname\n for (const g of games.values()) {\n const relDir = \"/\" + path.relative(viteRoot, g.dir).split(path.sep).join(\"/\")\n if (refPath.startsWith(relDir + \"/\") || refPath === relDir) return g\n }\n } catch {\n // ignore malformed referer\n }\n }\n if (games.size === 1) return games.values().next().value\n return undefined\n}\n\n/**\n * Generate the virtual module code for the simulator.\n *\n * @internal\n */\nexport function generateSimulatorCode(options: PuzzmoSimulatorPluginOptions, game: GameInfo | undefined): string {\n const { fixturesGlob: fixturesOpt, viewFactories, ...config } = options\n const fixturesGlob = fixturesOpt === false ? null : (fixturesOpt ?? \"/fixtures/puzzles/**/*.{json,toml}\")\n\n const lines = [`import { createSimulator } from \"@puzzmo/sdk/simulator\"`]\n for (const view of viewFactories ?? []) {\n lines.push(`import { ${view.export} } from ${JSON.stringify(view.module)}`)\n }\n\n // Load fixtures as raw strings so any text format reaches the game verbatim; the game does its own parsing.\n if (fixturesGlob) {\n lines.push(`const fixtures = import.meta.glob(${JSON.stringify(fixturesGlob)}, { query: \"?raw\", import: \"default\", eager: true })`)\n }\n\n if (game?.appBundlePath) {\n lines.push(`import(${JSON.stringify(game.appBundlePath)}).then(m => {`)\n lines.push(` if (m.renderThumbnail) globalThis.renderThumbnail = m.renderThumbnail`)\n lines.push(` if (m.getShareString) globalThis.getShareString = m.getShareString`)\n lines.push(`}).catch(() => {})`)\n }\n\n const simConfig = {\n ...config,\n ...(game?.slug ? { slug: game.slug } : {}),\n ...(game?.integrations ? { integrations: game.integrations } : {}),\n }\n const configEntries = Object.entries(simConfig).filter(([, v]) => v !== undefined)\n const configParts = configEntries.map(([k, v]) => `${k}: ${JSON.stringify(v)}`)\n if (fixturesGlob) configParts.push(\"fixtures\")\n if (viewFactories?.length) configParts.push(`views: [${viewFactories.map((v) => `${v.export}()`).join(\", \")}]`)\n\n lines.push(`createSimulator({ ${configParts.join(\", \")} })`)\n\n return lines.join(\"\\n\")\n}\n\n/** Vite plugin that injects the Puzzmo simulator in dev mode and handles OAuth callbacks. */\nexport function puzzmoSimulator(options: PuzzmoSimulatorPluginOptions = {}): Plugin {\n let games = new Map<string, GameInfo>()\n let viteRoot: string\n\n return {\n name: \"puzzmo-simulator\",\n apply: \"serve\",\n\n configResolved(config: ResolvedConfig) {\n viteRoot = config.root\n games = discoverGames(viteRoot)\n\n if (games.size === 0) {\n config.logger.info(`\\x1b[33m\\x1b[1m PUZZMO \\x1b[22m\\x1b[39m\\x1b[2m no puzzmo.json files found\\x1b[22m`)\n } else {\n const names = [...games.values()].map((g) => `\\x1b[36m${g.slug}\\x1b[39m`)\n const label = games.size === 1 ? \"game\" : \"games\"\n config.logger.info(`\\x1b[33m\\x1b[1m PUZZMO \\x1b[22m\\x1b[39m found ${games.size} ${label}: ${names.join(\"\\x1b[2m, \\x1b[22m\")}`)\n }\n },\n\n resolveId(id) {\n if (id === virtualID || id.startsWith(virtualID + \"?\")) return \"\\0\" + id\n },\n\n load(id) {\n if (!id.startsWith(\"\\0\" + virtualID)) return\n const params = new URLSearchParams(id.split(\"?\")[1] || \"\")\n const gameSlug = params.get(\"game\")\n const game = gameSlug ? games.get(gameSlug) : games.size === 1 ? games.values().next().value : undefined\n return generateSimulatorCode(options, game)\n },\n\n configureServer(server) {\n // Re-read puzzmo.json on edit and reload the page so the simulator picks up its changes\n for (const g of games.values()) server.watcher.add(path.join(g.dir, \"puzzmo.json\"))\n server.watcher.on(\"change\", (file) => {\n if (path.basename(file) !== \"puzzmo.json\") return\n games = discoverGames(viteRoot)\n for (const mod of server.moduleGraph.idToModuleMap.values()) {\n if (mod.id?.startsWith(\"\\0\" + virtualID)) server.moduleGraph.invalidateModule(mod)\n }\n server.ws.send({ type: \"full-reload\" })\n })\n\n server.middlewares.use(\"/oauth/callback\", (_req, res) => {\n res.setHeader(\"Content-Type\", \"text/html\")\n res.end(`<!DOCTYPE html>\n<html><head><title>Puzzmo OAuth</title></head>\n<body><script>\nvar params = new URLSearchParams(window.location.search);\nvar returnUrl = sessionStorage.getItem(\"oauth_return_url\") || \"/\";\nvar url = new URL(returnUrl);\nparams.forEach(function(v, k) { url.searchParams.set(k, v); });\nwindow.location.href = url.toString();\n</script></body></html>`)\n })\n\n // Serve the simulator init module, resolving the game from the referer\n server.middlewares.use(async (req, res, next) => {\n if (req.url?.split(\"?\")[0] !== simulatorURL) return next()\n\n const game = resolveGameFromReferer(req.headers.referer, games, viteRoot)\n const moduleID = virtualID + (game ? `?game=${game.slug}` : \"\")\n const result = await server.transformRequest(moduleID)\n if (!result) return next()\n res.setHeader(\"Content-Type\", \"application/javascript\")\n res.end(result.code)\n })\n },\n\n transformIndexHtml() {\n return [\n {\n tag: \"script\",\n attrs: { type: \"module\", src: simulatorURL },\n injectTo: \"head\",\n },\n ]\n },\n }\n}\n\ntype BundlePluginOptions = {\n /** Entry file for the bundle */\n entry: string\n /** Output file name */\n outputFile: string\n /** Folder the bundle is written to */\n outDir: string\n}\n\nfunction createBundlePlugin(pluginName: string, defaults: BundlePluginOptions) {\n return (options: Partial<BundlePluginOptions> = {}): Plugin => {\n const { entry, outputFile, outDir } = { ...defaults, ...options }\n return {\n name: pluginName,\n apply: \"build\",\n async closeBundle() {\n // If the caller overrode `entry`, honor it as-is. Otherwise try `.js` first, then `.ts`.\n const resolvedEntry = options.entry\n ? path.isAbsolute(entry)\n ? entry\n : path.resolve(process.cwd(), entry)\n : (resolveBundleEntry(process.cwd(), stripBundleExt(entry)) ?? path.resolve(process.cwd(), entry))\n try {\n await build({\n configFile: false,\n logLevel: \"warn\",\n build: {\n lib: {\n entry: resolvedEntry,\n formats: [\"es\"],\n fileName: () => outputFile,\n },\n outDir,\n emptyOutDir: false,\n },\n })\n } catch (error) {\n console.error(`[${pluginName}] build failed:`, error)\n throw error\n }\n },\n }\n }\n}\n\n/** Strip the trailing extension from a default entry path so we can probe siblings. */\nconst stripBundleExt = (p: string) => p.replace(/\\.[jt]sx?$/i, \"\")\n\n/** Returns the absolute path to the first matching extension under `dir`, or null. */\nconst resolveBundleEntry = (dir: string, baseRelative: string): string | null => {\n // JSX last: a bundle written as JSX still needs the plain entry to win if both somehow exist.\n for (const ext of [\".js\", \".ts\", \".tsx\", \".jsx\"]) {\n const candidate = path.join(dir, baseRelative + ext)\n if (fs.existsSync(candidate)) return candidate\n }\n return null\n}\n\nexport type AppBundlePluginOptions = {\n /** Entry file for the app bundle (default: `src/appBundle.js`) */\n entry?: string\n /** Output file name (default: `app-bundle.js`) */\n outputFile?: string\n}\n\n/**\n * Vite plugin that produces dist/app-bundle.js after the main build for app-level integrations.\n *\n * The bundle exports `renderThumbnail(puzzleString, inputString?, config?)` — a pure renderer\n * returning the SVG and its dimensions (`{ svg, width, height }`), used by the Puzzmo\n * platform for puzzle previews.\n */\nexport const appBundlePlugin = createBundlePlugin(\"app-bundle\", { entry: \"src/appBundle.js\", outputFile: \"app-bundle.js\", outDir: \"dist\" })\n\nexport type ServerBundlePluginOptions = {\n /** Entry file for the server bundle (default: `src/serverBundle.js`, or `.ts`) */\n entry?: string\n /** Output file name (default: `server-bundle.js`) */\n outputFile?: string\n}\n\n/**\n * Vite plugin that produces dist-server/server-bundle.js after the main build: the game's private\n * server bundle (see `ServerBundle`). It goes in its own folder, never `dist`, so it can't be served to\n * players by mistake; `puzzmo games upload` finds it there and sends it to Puzzmo privately. A repo that\n * builds several games gives each its own `outputFile` and names it in that game's puzzmo.json as\n * `output.serverBundle`, since uploads refuse to send one file for more than one game.\n */\nexport const serverBundlePlugin = createBundlePlugin(\"server-bundle\", {\n entry: \"src/serverBundle.js\",\n outputFile: \"server-bundle.js\",\n outDir: \"dist-server\",\n})\n\nexport type EditorBundlePluginOptions = {\n /** Entry file for the editor bundle (default: `src/editorBundle.js`) */\n entry?: string\n /** Output file name (default: `editor-bundle.js`) */\n outputFile?: string\n}\n\n/** Vite plugin that produces dist/editor-bundle.js after the main build for editor-level integrations. */\nexport const editorBundlePlugin = createBundlePlugin(\"editor-bundle\", {\n entry: \"src/editorBundle.js\",\n outputFile: \"editor-bundle.js\",\n outDir: \"dist\",\n})\n\n/**\n * Recursively find directories containing puzzmo.json, up to `maxDepth` levels deep.\n *\n * @internal\n */\nexport const findPuzzmoJsonDirs = (root: string, maxDepth: number, depth = 0): string[] => {\n if (depth >= maxDepth) return []\n const results: string[] = []\n let entries: fs.Dirent[]\n try {\n entries = fs.readdirSync(root, { withFileTypes: true })\n } catch {\n return results\n }\n for (const entry of entries) {\n if (!entry.isDirectory() || entry.name.startsWith(\".\") || entry.name === \"node_modules\") continue\n const dir = path.join(root, entry.name)\n if (fs.existsSync(path.join(dir, \"puzzmo.json\"))) {\n results.push(dir)\n }\n results.push(...findPuzzmoJsonDirs(dir, maxDepth, depth + 1))\n }\n return results\n}\n"],"mappings":"mYAiCA,SAAgB,EAAc,EAAa,EAAoC,EAAE,CAAoB,OACnG,IAAI,EACJ,GAAI,EAAQ,KAAM,EAAO,EAAA,QAAK,QAAQ,EAAK,EAAQ,KAAK,KACnD,CACH,IAAM,EAAU,EAAA,QAAK,KAAK,EAAK,OAAO,CAChC,EAAQ,EAAA,QAAG,WAAW,EAAQ,CAAG,EAAA,QAAG,YAAY,EAAQ,CAAC,OAAQ,GAAM,EAAE,SAAS,MAAM,CAAC,CAAG,EAAE,CACpG,GAAI,EAAM,OAAS,EAAG,MAAU,MAAM,wBAAwB,EAAM,OAAO,YAAY,EAAQ,qCAAqC,CAChI,EAAM,SAAW,IAAG,EAAO,EAAA,QAAK,KAAK,EAAS,EAAM,GAAG,EAE7D,GAAI,CAAC,GAAQ,CAAC,EAAA,QAAG,WAAW,EAAK,CAAE,OAAO,KAC1C,IAAM,EAAO,EAAA,QAAK,SAAS,EAAM,MAAM,CACjC,EAAY,EAAA,QAAK,QAAQ,GAAA,EAAK,EAAQ,YAAA,KAAa,SAAb,EAAsB,CAClE,MAAO,CAAE,MAAK,OAAM,OAAM,WAAY,EAAA,QAAK,KAAK,EAAW,GAAG,EAAK,OAAO,CAAE,SAAU,EAAA,QAAK,KAAK,EAAW,GAAG,EAAK,KAAK,CAAE,CAQ5H,SAAgB,EAAiB,EAAc,EAAc,EAA2B,CACtF,IAAM,EAAU,EAAK,QAAQ,sBAAuB,OAAO,CAIrD,EAAc,OAAO,0CAA0C,EAAQ,aAAa,CAC1F,GAAI,CAAC,EAAQ,KA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,CACN,OAAO,EAET,IAAK,IAAM,KAAS,EAAS,CAC3B,GAAI,CAAC,EAAM,aAAa,EAAI,EAAM,KAAK,WAAW,IAAI,EAAI,EAAM,OAAS,eAAgB,SACzF,IAAM,EAAM,EAAA,QAAK,KAAK,EAAM,EAAM,KAAK,CACnC,EAAA,QAAG,WAAW,EAAA,QAAK,KAAK,EAAK,cAAc,CAAC,EAC9C,EAAQ,KAAK,EAAI,CAEnB,EAAQ,KAAK,GAAG,EAAmB,EAAK,EAAU,EAAQ,EAAE,CAAC,CAE/D,OAAO"}
|
|
1
|
+
{"version":3,"file":"vite.cjs","names":[],"sources":["../src/pico8/vitePlugin.ts","../src/vite.ts"],"sourcesContent":["import type { Plugin, ResolvedConfig } from \"vite\"\nimport { execFileSync } from \"child_process\"\nimport path from \"path\"\nimport fs from \"fs\"\nimport { puzzmoLua } from \"./lua\"\n\nexport type PuzzmoPico8PluginOptions = {\n /** The cart, relative to the page. Defaults to the only `.p8` file in `cart/`. */\n cart?: string\n /** Where PICO-8's HTML export lives, relative to the page. Defaults to `export`. Commit it, so builds don't need PICO-8. */\n exportDir?: string\n /**\n * The PICO-8 binary used to re-export the cart when it changes. Defaults to `$PICO8`, then `pico8` on your PATH,\n * then where PICO-8's installers put it. When it can't be found the committed export is used as-is. Pass false to\n * never export.\n */\n pico8?: string | false\n /** Keep `puzzmo.lua` next to the cart up to date. Defaults to true. */\n writeLua?: boolean\n}\n\n/** @internal */\nexport type Pico8Game = {\n /** The directory holding the page */\n dir: string\n cart: string\n /** The cart's name, which PICO-8 also uses for its export */\n name: string\n exportHTML: string\n exportJS: string\n}\n\n/** @internal Finds the PICO-8 game served by the page in `dir`, if there is one. */\nexport function findPico8Game(dir: string, options: PuzzmoPico8PluginOptions = {}): Pico8Game | null {\n let cart: string | undefined\n if (options.cart) cart = path.resolve(dir, options.cart)\n else {\n const cartDir = path.join(dir, \"cart\")\n const carts = fs.existsSync(cartDir) ? fs.readdirSync(cartDir).filter((f) => f.endsWith(\".p8\")) : []\n if (carts.length > 1) throw new Error(`[puzzmo-pico8] found ${carts.length} carts in ${cartDir}, pick one with the \\`cart\\` option`)\n if (carts.length === 1) cart = path.join(cartDir, carts[0])\n }\n if (!cart || !fs.existsSync(cart)) return null\n const name = path.basename(cart, \".p8\")\n const exportDir = path.resolve(dir, options.exportDir ?? \"export\")\n return { dir, cart, name, exportHTML: path.join(exportDir, `${name}.html`), exportJS: path.join(exportDir, `${name}.js`) }\n}\n\n/**\n * @internal\n * Turns PICO-8's exported page into a Puzzmo game's page. PICO-8's shell is a thousand lines of globals and handlers\n * its runtime expects to find, and it changes between versions, so rather than keep a copy we adjust theirs.\n */\nexport function patchPico8Export(html: string, name: string, scripts: string[]): string {\n const escaped = name.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")\n\n // PICO-8 loads its runtime from a script element it builds itself. Point it at the copy we serve next to the page,\n // relative because Puzzmo serves games from a subfolder.\n const runtime = new RegExp(`((?:\\\\.src\\\\s*=\\\\s*|\\\\ssrc=)[\"'])[^\"']*${escaped}\\\\.js([\"'])`)\n if (!runtime.test(html)) throw new Error(`[puzzmo-pico8] couldn't find where PICO-8's page loads ${name}.js`)\n html = html.replace(runtime, `$1./${name}.js$2`)\n\n // Boot straight away. Otherwise the cart waits for a click on PICO-8's play button and the host never hears that\n // the game loaded. (Browsers which need a tap before audio can start, like iOS Safari, still show the button.)\n html = html.replace(/var\\s+p8_autoplay\\s*=\\s*false/, \"var p8_autoplay = true\")\n\n // The GPIO array, for shells old enough not to declare it themselves.\n if (!/var\\s+pico8_gpio\\s*=/.test(html)) html = html.replace(/<head>/i, \"<head>\\n<script>var pico8_gpio = new Array(128)</script>\")\n\n // Things a browser shrugs off and Vite doesn't: an HTML comment wrapped around the stylesheet, a stray\n // `-repeat center;` in it, and an ` ` without its semicolon.\n html = html.replace(\n /(<style[^>]*>)([\\s\\S]*?)(<\\/style>)/gi,\n (_, open: string, css: string, close: string) =>\n open + css.replace(/<!--|-->/g, \"\").replace(/^[ \\t]*-repeat[^;\\n]*;[ \\t]*$/gm, \"\") + close,\n )\n html = html.replace(/ (?!;)/g, \" \")\n\n const bodyEnd = html.lastIndexOf(\"</body>\")\n if (bodyEnd === -1) throw new Error(\"[puzzmo-pico8] that doesn't look like a PICO-8 export, it has no </body>\")\n return html.slice(0, bodyEnd) + scripts.join(\"\\n\") + \"\\n\" + html.slice(bodyEnd)\n}\n\n/** Where PICO-8's own installers put it, for people who never added it to their PATH. */\nconst usualPico8Locations = [\n \"/Applications/PICO-8.app/Contents/MacOS/pico8\",\n \"C:\\\\Program Files (x86)\\\\PICO-8\\\\pico8.exe\",\n \"C:\\\\Program Files\\\\PICO-8\\\\pico8.exe\",\n]\n\n/** Finds an executable on the PATH without running it: `pico8` with no export arguments opens the whole app. */\nconst findExecutable = (bin: string): string | null => {\n if (bin.includes(\"/\") || bin.includes(\"\\\\\")) return fs.existsSync(bin) ? bin : null\n for (const dir of (process.env.PATH ?? \"\").split(path.delimiter)) {\n for (const ext of process.platform === \"win32\" ? [\".exe\", \".cmd\", \"\"] : [\"\"]) {\n const candidate = path.join(dir, bin + ext)\n if (fs.existsSync(candidate)) return candidate\n }\n }\n if (bin === \"pico8\") return usualPico8Locations.find((p) => fs.existsSync(p)) ?? null\n return null\n}\n\nconst mtime = (file: string) => (fs.existsSync(file) ? fs.statSync(file).mtimeMs : 0)\n\n/**\n * Vite plugin for games written as PICO-8 carts. Your `index.html` only needs your own script tag, the plugin swaps\n * in PICO-8's exported page around it, serves the PICO-8 runtime next to it, and copies it into the build.\n *\n * When PICO-8 is installed it also re-exports the cart whenever it (or a `.lua` file next to it) changes, and reloads\n * the page, so saving in PICO-8 is enough to see the change in the simulator.\n */\nexport function puzzmoPico8(options: PuzzmoPico8PluginOptions = {}): Plugin {\n let config: ResolvedConfig\n const games = new Map<string, Pico8Game>()\n const binary = options.pico8 === false ? null : (options.pico8 ?? process.env.PICO8 ?? \"pico8\")\n\n const log = (message: string) => config.logger.info(`\\x1b[33m\\x1b[1m PICO-8 \\x1b[22m\\x1b[39m${message}`)\n\n const writeLua = (game: Pico8Game) => {\n if (options.writeLua === false) return\n const file = path.join(path.dirname(game.cart), \"puzzmo.lua\")\n if (fs.existsSync(file) && fs.readFileSync(file, \"utf8\") === puzzmoLua) return\n fs.writeFileSync(file, puzzmoLua)\n log(`wrote ${path.relative(config.root, file)}`)\n }\n\n /** Re-exports the cart when it's newer than the export and PICO-8 is around to do it. */\n const exportIfStale = (game: Pico8Game) => {\n const cartDir = path.dirname(game.cart)\n const newest = Math.max(\n ...fs\n .readdirSync(cartDir)\n .filter((f) => /\\.(p8|lua)$/.test(f))\n .map((f) => mtime(path.join(cartDir, f))),\n )\n if (fs.existsSync(game.exportJS) && mtime(game.exportJS) >= newest) return\n\n const pico8 = binary ? findExecutable(binary) : null\n if (!pico8) {\n if (fs.existsSync(game.exportHTML)) {\n config.logger.warn(\n `[puzzmo-pico8] ${path.relative(config.root, game.cart)} is newer than its export, and PICO-8 isn't around to re-export it. Using the old export.`,\n )\n return\n }\n throw new Error(\n `[puzzmo-pico8] there's no export of ${path.relative(config.root, game.cart)} yet, and PICO-8 isn't on your PATH to make one.\\n` +\n `Export it inside PICO-8 with EXPORT ${game.name}.html into ${path.relative(config.root, path.dirname(game.exportHTML))}/, or set PICO8=/path/to/pico8.`,\n )\n }\n\n fs.mkdirSync(path.dirname(game.exportHTML), { recursive: true })\n const before = mtime(game.exportJS)\n let output = \"\"\n try {\n output = execFileSync(pico8, [game.cart, \"-export\", game.exportHTML], {\n encoding: \"utf8\",\n timeout: 60_000,\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n })\n } catch (error) {\n output = String((error as { stdout?: string }).stdout ?? error)\n }\n if (mtime(game.exportJS) === before) {\n const hint = /label/i.test(output) ? \"\\nHTML exports need a label: run the cart in PICO-8, press CTRL-7, and save.\" : \"\"\n throw new Error(`[puzzmo-pico8] PICO-8 didn't export ${path.relative(config.root, game.cart)}:\\n${output.trim()}${hint}`)\n }\n log(`exported ${path.relative(config.root, game.cart)}`)\n }\n\n const gameForPage = (htmlFile: string) => {\n const dir = path.dirname(htmlFile)\n if (!games.has(dir)) {\n const game = findPico8Game(dir, options)\n if (!game) return null\n games.set(dir, game)\n }\n return games.get(dir)!\n }\n\n return {\n name: \"puzzmo-pico8\",\n\n config() {\n // The export is rewritten on every save, and Vite reloads the page for any .html it sees change. The plugin\n // reloads once the export is done, so Vite reloading too would boot the cart twice.\n const exportDir = options.exportDir ?? \"export\"\n const isExport = (file: string) =>\n /\\.(html|js)$/.test(file) &&\n path.basename(path.dirname(file)) === path.basename(exportDir) &&\n fs.existsSync(path.join(path.dirname(path.dirname(file)), \"cart\"))\n return { server: { watch: { ignored: [isExport] } } }\n },\n\n configResolved(resolved) {\n config = resolved\n },\n\n transformIndexHtml: {\n order: \"pre\",\n handler(html, ctx) {\n const game = gameForPage(ctx.filename)\n if (!game) return\n writeLua(game)\n exportIfStale(game)\n // Keep the page's own module scripts: that's the game code.\n const scripts = html.match(/<script\\b[^>]*type=[\"']module[\"'][^>]*>[\\s\\S]*?<\\/script>/gi) ?? []\n return patchPico8Export(fs.readFileSync(game.exportHTML, \"utf8\"), game.name, scripts)\n },\n },\n\n configureServer(devServer) {\n // Serve the runtime next to the page, untouched by Vite's transforms: it is a megabyte of emscripten output\n // which only works exactly as PICO-8 wrote it.\n devServer.middlewares.use((req, res, next) => {\n const url = decodeURIComponent((req.url ?? \"\").split(\"?\")[0])\n if (!url.endsWith(\".js\")) return next()\n const game = [...games.values()].find(\n (g) =>\n url ===\n \"/\" +\n path\n .relative(config.root, path.join(g.dir, `${g.name}.js`))\n .split(path.sep)\n .join(\"/\"),\n )\n if (!game || !fs.existsSync(game.exportJS)) return next()\n res.setHeader(\"Content-Type\", \"text/javascript\")\n res.end(fs.readFileSync(game.exportJS))\n })\n\n // Saving the cart in PICO-8 re-exports it and reloads the page.\n devServer.watcher.on(\"change\", (file) => {\n const game = [...games.values()].find((g) => path.dirname(file) === path.dirname(g.cart) && /\\.(p8|lua)$/.test(file))\n if (!game || path.basename(file) === \"puzzmo.lua\") return\n try {\n exportIfStale(game)\n devServer.ws.send({ type: \"full-reload\" })\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n config.logger.error(message)\n devServer.ws.send({ type: \"error\", err: { message, stack: \"\" } })\n }\n })\n },\n\n generateBundle() {\n for (const game of games.values()) {\n const fileName = path\n .relative(config.root, path.join(game.dir, `${game.name}.js`))\n .split(path.sep)\n .join(\"/\")\n this.emitFile({ type: \"asset\", fileName, source: fs.readFileSync(game.exportJS) })\n }\n },\n }\n}\n","import type { Plugin, ResolvedConfig } from \"vite\"\nimport { build } from \"vite\"\nimport path from \"path\"\nimport fs from \"fs\"\nimport type { HostContext } from \"./types\"\nimport type { HostContextPreset, SimulatorIntegrations } from \"./simulator/types\"\n\nexport { puzzmoPico8, type PuzzmoPico8PluginOptions } from \"./pico8/vitePlugin\"\n\nexport type PuzzmoSimulatorPluginOptions = {\n /** Whether to auto-start the game after READY (default: true) */\n autoStart?: boolean\n /** Initial collapsed state (default: true) */\n collapsed?: boolean\n /**\n * Glob pattern for fixture files, passed to import.meta.glob which is relative to the closest puzzmo.json. Defaults\n * to `\"/fixtures/puzzles/**\\/*.{json,toml}\"`. Fixtures are loaded as raw strings (any text format works — JSON,\n * TOML, or a custom format) and delivered to the game verbatim, so the game parses them itself. Pass false to disable.\n */\n fixturesGlob?: string | false\n /**\n * Whether READY_DATA carries a play session (default: true). Set to false to run the game the way\n * a host will for a mode with no puzzle. Ignored for games built on an SDK from before runtime contract \"1.1\".\n */\n session?: boolean\n /**\n * The `hostContext` array the simulator sends in READY_DATA, so host-context-dependent features\n * (embed settings, sandbox mode, mobile layout, …) can be exercised locally. Must be\n * JSON-serializable. Defaults to a single desktop \"app\" context; the simulator's Host tab can\n * override it at runtime (persisted per-browser, applied on restart).\n *\n * @internal\n */\n hostContext?: HostContext[]\n /**\n * Extra named `hostContext` presets for the simulator's Host tab, alongside the generic\n * built-ins — how a game ships its own scenarios (e.g. crossword's partner-embed toolbar\n * settings). Must be JSON-serializable.\n *\n * @internal\n */\n hostContextPresets?: HostContextPreset[]\n /**\n * Plugin-provided simulator tabs, named rather than passed directly because this config is\n * serialized into a virtual module. Each entry is imported and called with no arguments, so the\n * export must be a `() => SimulatorView` factory — e.g.\n * `{ module: \"@puzzmo-com/shared/sdkPlugins\", export: \"createCollabSimulatorView\" }`.\n */\n viewFactories?: { module: string; export: string }[]\n}\n\nconst simulatorURL = \"/@puzzmo-simulator-init.js\"\nconst virtualID = \"virtual:puzzmo-simulator\"\n\n/** @internal */\nexport type GameInfo = {\n /** Directory containing the puzzmo.json */\n dir: string\n slug: string\n displayName: string\n /** Vite-root-relative path to app bundle entry, if it exists */\n appBundlePath: string | null\n /** Vite-root-relative path to the pmmg bundle entry, if it exists, for the simulator's Pmmg tab */\n pmmgBundlePath?: string | null\n /** `integrations` from the puzzmo.json, passed to simulator tabs that preview them */\n integrations?: SimulatorIntegrations\n}\n\n/**\n * Discover all games from puzzmo.json files under a root directory.\n *\n * @internal\n */\nexport function discoverGames(viteRoot: string): Map<string, GameInfo> {\n const games = new Map<string, GameInfo>()\n const candidates = findPuzzmoJsonDirs(viteRoot, 3)\n if (fs.existsSync(path.join(viteRoot, \"puzzmo.json\"))) {\n candidates.unshift(viteRoot)\n }\n for (const dir of candidates) {\n try {\n const data = JSON.parse(fs.readFileSync(path.join(dir, \"puzzmo.json\"), \"utf-8\"))\n if (!data?.game?.slug) continue\n const integrations = data.integrations && typeof data.integrations === \"object\" ? data.integrations : undefined\n games.set(data.game.slug, {\n dir,\n slug: data.game.slug,\n displayName: data.game.displayName,\n appBundlePath: viteRootPath(viteRoot, resolveBundleEntry(dir, \"src/appBundle\")),\n pmmgBundlePath: viteRootPath(viteRoot, resolveBundleEntry(dir, \"src/pmmgBundle\")),\n integrations,\n })\n } catch {\n // skip invalid files\n }\n }\n return games\n}\n\n/**\n * Resolve which game a request belongs to using the referer URL.\n *\n * @internal\n */\nexport function resolveGameFromReferer(referer: string | undefined, games: Map<string, GameInfo>, viteRoot: string): GameInfo | undefined {\n if (referer) {\n try {\n const refPath = new URL(referer).pathname\n for (const g of games.values()) {\n const relDir = \"/\" + path.relative(viteRoot, g.dir).split(path.sep).join(\"/\")\n if (refPath.startsWith(relDir + \"/\") || refPath === relDir) return g\n }\n } catch {\n // ignore malformed referer\n }\n }\n if (games.size === 1) return games.values().next().value\n return undefined\n}\n\n/**\n * Generate the virtual module code for the simulator.\n *\n * @internal\n */\nexport function generateSimulatorCode(options: PuzzmoSimulatorPluginOptions, game: GameInfo | undefined): string {\n const { fixturesGlob: fixturesOpt, viewFactories, ...config } = options\n const fixturesGlob = fixturesOpt === false ? null : (fixturesOpt ?? \"/fixtures/puzzles/**/*.{json,toml}\")\n\n const lines = [`import { createSimulator } from \"@puzzmo/sdk/simulator\"`]\n for (const view of viewFactories ?? []) {\n lines.push(`import { ${view.export} } from ${JSON.stringify(view.module)}`)\n }\n\n // Load fixtures as raw strings so any text format reaches the game verbatim; the game does its own parsing.\n if (fixturesGlob) {\n lines.push(`const fixtures = import.meta.glob(${JSON.stringify(fixturesGlob)}, { query: \"?raw\", import: \"default\", eager: true })`)\n }\n\n if (game?.appBundlePath) {\n lines.push(`import(${JSON.stringify(game.appBundlePath)}).then(m => {`)\n lines.push(` if (m.renderThumbnail) globalThis.renderThumbnail = m.renderThumbnail`)\n lines.push(` if (m.getShareString) globalThis.getShareString = m.getShareString`)\n lines.push(`}).catch(() => {})`)\n }\n\n const simConfig = {\n ...config,\n ...(game?.slug ? { slug: game.slug } : {}),\n ...(game?.integrations ? { integrations: game.integrations } : {}),\n }\n const configEntries = Object.entries(simConfig).filter(([, v]) => v !== undefined)\n const configParts = configEntries.map(([k, v]) => `${k}: ${JSON.stringify(v)}`)\n if (fixturesGlob) configParts.push(\"fixtures\")\n // Loaded when the Pmmg tab opens, so a game page that never looks at it never imports it\n if (game?.pmmgBundlePath) configParts.push(`pmmgBundle: () => import(${JSON.stringify(game.pmmgBundlePath)})`)\n if (viewFactories?.length) configParts.push(`views: [${viewFactories.map((v) => `${v.export}()`).join(\", \")}]`)\n\n lines.push(`createSimulator({ ${configParts.join(\", \")} })`)\n\n return lines.join(\"\\n\")\n}\n\n/** Vite plugin that injects the Puzzmo simulator in dev mode and handles OAuth callbacks. */\nexport function puzzmoSimulator(options: PuzzmoSimulatorPluginOptions = {}): Plugin {\n let games = new Map<string, GameInfo>()\n let viteRoot: string\n\n return {\n name: \"puzzmo-simulator\",\n apply: \"serve\",\n\n configResolved(config: ResolvedConfig) {\n viteRoot = config.root\n games = discoverGames(viteRoot)\n\n if (games.size === 0) {\n config.logger.info(`\\x1b[33m\\x1b[1m PUZZMO \\x1b[22m\\x1b[39m\\x1b[2m no puzzmo.json files found\\x1b[22m`)\n } else {\n const names = [...games.values()].map((g) => `\\x1b[36m${g.slug}\\x1b[39m`)\n const label = games.size === 1 ? \"game\" : \"games\"\n config.logger.info(`\\x1b[33m\\x1b[1m PUZZMO \\x1b[22m\\x1b[39m found ${games.size} ${label}: ${names.join(\"\\x1b[2m, \\x1b[22m\")}`)\n }\n },\n\n resolveId(id) {\n if (id === virtualID || id.startsWith(virtualID + \"?\")) return \"\\0\" + id\n },\n\n load(id) {\n if (!id.startsWith(\"\\0\" + virtualID)) return\n const params = new URLSearchParams(id.split(\"?\")[1] || \"\")\n const gameSlug = params.get(\"game\")\n const game = gameSlug ? games.get(gameSlug) : games.size === 1 ? games.values().next().value : undefined\n return generateSimulatorCode(options, game)\n },\n\n configureServer(server) {\n // Re-read puzzmo.json on edit and reload the page so the simulator picks up its changes\n for (const g of games.values()) server.watcher.add(path.join(g.dir, \"puzzmo.json\"))\n server.watcher.on(\"change\", (file) => {\n if (path.basename(file) !== \"puzzmo.json\") return\n games = discoverGames(viteRoot)\n for (const mod of server.moduleGraph.idToModuleMap.values()) {\n if (mod.id?.startsWith(\"\\0\" + virtualID)) server.moduleGraph.invalidateModule(mod)\n }\n server.ws.send({ type: \"full-reload\" })\n })\n\n server.middlewares.use(\"/oauth/callback\", (_req, res) => {\n res.setHeader(\"Content-Type\", \"text/html\")\n res.end(`<!DOCTYPE html>\n<html><head><title>Puzzmo OAuth</title></head>\n<body><script>\nvar params = new URLSearchParams(window.location.search);\nvar returnUrl = sessionStorage.getItem(\"oauth_return_url\") || \"/\";\nvar url = new URL(returnUrl);\nparams.forEach(function(v, k) { url.searchParams.set(k, v); });\nwindow.location.href = url.toString();\n</script></body></html>`)\n })\n\n // Serve the simulator init module, resolving the game from the referer\n server.middlewares.use(async (req, res, next) => {\n if (req.url?.split(\"?\")[0] !== simulatorURL) return next()\n\n const game = resolveGameFromReferer(req.headers.referer, games, viteRoot)\n const moduleID = virtualID + (game ? `?game=${game.slug}` : \"\")\n const result = await server.transformRequest(moduleID)\n if (!result) return next()\n res.setHeader(\"Content-Type\", \"application/javascript\")\n res.end(result.code)\n })\n },\n\n transformIndexHtml() {\n return [\n {\n tag: \"script\",\n attrs: { type: \"module\", src: simulatorURL },\n injectTo: \"head\",\n },\n ]\n },\n }\n}\n\ntype BundlePluginOptions = {\n /** Entry file for the bundle */\n entry: string\n /** Output file name */\n outputFile: string\n /** Folder the bundle is written to */\n outDir: string\n}\n\nfunction createBundlePlugin(pluginName: string, defaults: BundlePluginOptions) {\n return (options: Partial<BundlePluginOptions> = {}): Plugin => {\n const { entry, outputFile, outDir } = { ...defaults, ...options }\n return {\n name: pluginName,\n apply: \"build\",\n async closeBundle() {\n // If the caller overrode `entry`, honor it as-is. Otherwise try `.js` first, then `.ts`.\n const resolvedEntry = options.entry\n ? path.isAbsolute(entry)\n ? entry\n : path.resolve(process.cwd(), entry)\n : (resolveBundleEntry(process.cwd(), stripBundleExt(entry)) ?? path.resolve(process.cwd(), entry))\n try {\n await build({\n configFile: false,\n logLevel: \"warn\",\n build: {\n lib: {\n entry: resolvedEntry,\n formats: [\"es\"],\n fileName: () => outputFile,\n },\n outDir,\n emptyOutDir: false,\n },\n })\n } catch (error) {\n console.error(`[${pluginName}] build failed:`, error)\n throw error\n }\n },\n }\n }\n}\n\n/** Strip the trailing extension from a default entry path so we can probe siblings. */\nconst stripBundleExt = (p: string) => p.replace(/\\.[jt]sx?$/i, \"\")\n\n/** An absolute file as the path the dev server serves it at, or null for no file */\nconst viteRootPath = (viteRoot: string, file: string | null) =>\n file ? \"/\" + path.relative(viteRoot, file).split(path.sep).join(\"/\") : null\n\n/** Returns the absolute path to the first matching extension under `dir`, or null. */\nconst resolveBundleEntry = (dir: string, baseRelative: string): string | null => {\n // JSX last: a bundle written as JSX still needs the plain entry to win if both somehow exist.\n for (const ext of [\".js\", \".ts\", \".tsx\", \".jsx\"]) {\n const candidate = path.join(dir, baseRelative + ext)\n if (fs.existsSync(candidate)) return candidate\n }\n return null\n}\n\nexport type AppBundlePluginOptions = {\n /** Entry file for the app bundle (default: `src/appBundle.js`) */\n entry?: string\n /** Output file name (default: `app-bundle.js`) */\n outputFile?: string\n}\n\n/**\n * Vite plugin that produces dist/app-bundle.js after the main build for app-level integrations.\n *\n * The bundle exports `renderThumbnail(puzzleString, inputString?, config?)` — a pure renderer\n * returning the SVG and its dimensions (`{ svg, width, height }`), used by the Puzzmo\n * platform for puzzle previews.\n */\nexport const appBundlePlugin = createBundlePlugin(\"app-bundle\", { entry: \"src/appBundle.js\", outputFile: \"app-bundle.js\", outDir: \"dist\" })\n\nexport type ServerBundlePluginOptions = {\n /** Entry file for the server bundle (default: `src/serverBundle.js`, or `.ts`) */\n entry?: string\n /** Output file name (default: `server-bundle.js`) */\n outputFile?: string\n}\n\n/**\n * Vite plugin that produces dist-server/server-bundle.js after the main build: the game's private\n * server bundle (see `ServerBundle`). It goes in its own folder, never `dist`, so it can't be served to\n * players by mistake; `puzzmo games upload` finds it there and sends it to Puzzmo privately. A repo that\n * builds several games gives each its own `outputFile` and names it in that game's puzzmo.json as\n * `output.serverBundle`, since uploads refuse to send one file for more than one game.\n */\nexport const serverBundlePlugin = createBundlePlugin(\"server-bundle\", {\n entry: \"src/serverBundle.js\",\n outputFile: \"server-bundle.js\",\n outDir: \"dist-server\",\n})\n\nexport type PmmgBundlePluginOptions = {\n /** Entry file for the pmmg bundle (default: `src/pmmgBundle.js`, or `.ts`) */\n entry?: string\n /** Output file name (default: `pmmg-bundle.js`) */\n outputFile?: string\n}\n\nconst buildPmmgBundle = createBundlePlugin(\"pmmg-bundle\", { entry: \"src/pmmgBundle.js\", outputFile: \"pmmg-bundle.js\", outDir: \"dist\" })\n\n/**\n * Vite plugins for the game's pmmg bundle (see `PmmgBundle`), such as its boards at the table. After the main build\n * they produce dist/pmmg-bundle.js, which is public and served with the rest of `dist`. In dev, `/pmmg-bundle.js` on\n * the game's dev server is built from source on each request, so a Puzzmo page running with `?dev` draws boards from\n * the code being worked on.\n *\n * Puzzmo imports it from an opaque-origin sandbox, so that one response answers any origin. It's a whole build rather\n * than the dev server's modules, since letting `Origin: null` read those would let any page read the game's source.\n */\nexport const pmmgBundlePlugin = (options: PmmgBundlePluginOptions = {}): Plugin[] => [\n buildPmmgBundle(options),\n {\n name: \"pmmg-bundle-dev\",\n apply: \"serve\",\n configureServer(server) {\n // Requests that arrive while a build runs share it\n let building: Promise<string> | undefined\n server.middlewares.use((req, res, next) => {\n if (!/^\\/pmmg-bundle\\.js(?:\\?.*)?$/.test(req.url || \"\")) return next()\n const entry = options.entry ?? resolveBundleEntry(server.config.root, \"src/pmmgBundle\")\n if (!entry) return next()\n building ??= buildPmmgBundleSource(path.resolve(server.config.root, entry)).finally(() => (building = undefined))\n building.then(\n (code) => {\n res.setHeader(\"Content-Type\", \"text/javascript\")\n res.setHeader(\"Access-Control-Allow-Origin\", \"*\")\n res.setHeader(\"Cache-Control\", \"no-store\")\n res.end(code)\n },\n (error) => {\n server.config.logger.error(`[pmmg-bundle] build failed: ${error?.message ?? error}`)\n res.statusCode = 500\n res.end()\n },\n )\n })\n },\n },\n]\n\n/** The pmmg bundle built as production builds it, as one file's source for the dev route */\nexport const buildPmmgBundleSource = async (entry: string): Promise<string> => {\n const result = await build({\n configFile: false,\n logLevel: \"warn\",\n build: {\n write: false,\n copyPublicDir: false,\n minify: false,\n sourcemap: \"inline\",\n lib: { entry, formats: [\"es\"], fileName: () => \"pmmg-bundle.js\" },\n // One file, as the route serves only the one\n rolldownOptions: { output: { codeSplitting: false } },\n },\n })\n const outputs = Array.isArray(result) ? result : \"output\" in result ? [result] : []\n const chunk = outputs.flatMap((output) => output.output).find((file) => file.type === \"chunk\" && file.isEntry)\n if (!chunk || chunk.type !== \"chunk\") throw new Error(`Building ${entry} made no bundle`)\n return chunk.code\n}\n\nexport type EditorBundlePluginOptions = {\n /** Entry file for the editor bundle (default: `src/editorBundle.js`) */\n entry?: string\n /** Output file name (default: `editor-bundle.js`) */\n outputFile?: string\n}\n\n/** Vite plugin that produces dist/editor-bundle.js after the main build for editor-level integrations. */\nexport const editorBundlePlugin = createBundlePlugin(\"editor-bundle\", {\n entry: \"src/editorBundle.js\",\n outputFile: \"editor-bundle.js\",\n outDir: \"dist\",\n})\n\n/**\n * Recursively find directories containing puzzmo.json, up to `maxDepth` levels deep.\n *\n * @internal\n */\nexport const findPuzzmoJsonDirs = (root: string, maxDepth: number, depth = 0): string[] => {\n if (depth >= maxDepth) return []\n const results: string[] = []\n let entries: fs.Dirent[]\n try {\n entries = fs.readdirSync(root, { withFileTypes: true })\n } catch {\n return results\n }\n for (const entry of entries) {\n if (!entry.isDirectory() || entry.name.startsWith(\".\") || entry.name === \"node_modules\") continue\n const dir = path.join(root, entry.name)\n if (fs.existsSync(path.join(dir, \"puzzmo.json\"))) {\n results.push(dir)\n }\n results.push(...findPuzzmoJsonDirs(dir, maxDepth, depth + 1))\n }\n return results\n}\n"],"mappings":"mYAiCA,SAAgB,EAAc,EAAa,EAAoC,EAAE,CAAoB,OACnG,IAAI,EACJ,GAAI,EAAQ,KAAM,EAAO,EAAA,QAAK,QAAQ,EAAK,EAAQ,KAAK,KACnD,CACH,IAAM,EAAU,EAAA,QAAK,KAAK,EAAK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AM,OAAS,eAAgB,SACzF,IAAM,EAAM,EAAA,QAAK,KAAK,EAAM,EAAM,KAAK,CACnC,EAAA,QAAG,WAAW,EAAA,QAAK,KAAK,EAAK,cAAc,CAAC,EAC9C,EAAQ,KAAK,EAAI,CAEnB,EAAQ,KAAK,GAAG,EAAmB,EAAK,EAAU,EAAQ,EAAE,CAAC,CAE/D,OAAO"}
|
package/dist/vite.d.ts
CHANGED
|
@@ -54,6 +54,8 @@ export type GameInfo = {
|
|
|
54
54
|
displayName: string;
|
|
55
55
|
/** Vite-root-relative path to app bundle entry, if it exists */
|
|
56
56
|
appBundlePath: string | null;
|
|
57
|
+
/** Vite-root-relative path to the pmmg bundle entry, if it exists, for the simulator's Pmmg tab */
|
|
58
|
+
pmmgBundlePath?: string | null;
|
|
57
59
|
/** `integrations` from the puzzmo.json, passed to simulator tabs that preview them */
|
|
58
60
|
integrations?: SimulatorIntegrations;
|
|
59
61
|
};
|
|
@@ -113,6 +115,24 @@ export type ServerBundlePluginOptions = {
|
|
|
113
115
|
* `output.serverBundle`, since uploads refuse to send one file for more than one game.
|
|
114
116
|
*/
|
|
115
117
|
export declare const serverBundlePlugin: (options?: Partial<BundlePluginOptions>) => Plugin;
|
|
118
|
+
export type PmmgBundlePluginOptions = {
|
|
119
|
+
/** Entry file for the pmmg bundle (default: `src/pmmgBundle.js`, or `.ts`) */
|
|
120
|
+
entry?: string;
|
|
121
|
+
/** Output file name (default: `pmmg-bundle.js`) */
|
|
122
|
+
outputFile?: string;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Vite plugins for the game's pmmg bundle (see `PmmgBundle`), such as its boards at the table. After the main build
|
|
126
|
+
* they produce dist/pmmg-bundle.js, which is public and served with the rest of `dist`. In dev, `/pmmg-bundle.js` on
|
|
127
|
+
* the game's dev server is built from source on each request, so a Puzzmo page running with `?dev` draws boards from
|
|
128
|
+
* the code being worked on.
|
|
129
|
+
*
|
|
130
|
+
* Puzzmo imports it from an opaque-origin sandbox, so that one response answers any origin. It's a whole build rather
|
|
131
|
+
* than the dev server's modules, since letting `Origin: null` read those would let any page read the game's source.
|
|
132
|
+
*/
|
|
133
|
+
export declare const pmmgBundlePlugin: (options?: PmmgBundlePluginOptions) => Plugin[];
|
|
134
|
+
/** The pmmg bundle built as production builds it, as one file's source for the dev route */
|
|
135
|
+
export declare const buildPmmgBundleSource: (entry: string) => Promise<string>;
|
|
116
136
|
export type EditorBundlePluginOptions = {
|
|
117
137
|
/** Entry file for the editor bundle (default: `src/editorBundle.js`) */
|
|
118
138
|
entry?: string;
|
package/dist/vite.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite.d.ts","
|
|
1
|
+
{"version":3,"file":"vite.d.ts","sources":["../src/vite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAkB,MAAM,MAAM,CAAA;AAIlD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAEjF,OAAO,EAAE,WAAW,EAAE,KAAK,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAE/E,MAAM,MAAM,4BAA4B,GAAG;IACzC,iEAAiE;IACjE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,WAAW,EAAE,CAAA;IAC3B;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAA;IACxC;;;;;OAKG;IACH,aAAa,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAA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