hopple 0.1.0-rc.13 → 0.1.0-rc.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -102,6 +102,7 @@ hopple unpublish [project] [--server <url>]
102
102
  hopple rollback [project] [--server <url>]
103
103
  hopple listing [project] [listed | unlisted] [--server <url>]
104
104
  hopple list [--server <url>]
105
+ hopple share <link | id> [--data] [--json] [--server <url>]
105
106
  hopple collaborators [add <handle> | remove <handle>] [project] [--server <url>]
106
107
  hopple login [--server <url>]
107
108
  hopple logout [--server <url>]
@@ -450,7 +451,9 @@ The version is not published: nobody browsing the site finds it, and only
450
451
  people given the link can play it. Until an admin approves it, it plays
451
452
  without scores, saves or achievements. Files and a manifest the game already
452
453
  has are that version again, not a new one: uploading files already uploaded
453
- prints the build they are.
454
+ prints the build they are. So are files the game already has with only the
455
+ manifest's `version` raised: it prints that build, under the `version` it was
456
+ uploaded with, and says no new version was made.
454
457
 
455
458
  `publish` uploads the same way, then asks for **`latest`** to point at the
456
459
  version: `latest` is what the game's address opens, and what the feed shows
@@ -460,7 +463,8 @@ its own boards and achievements. A beta no newer than `latest` is refused, and
460
463
  publishing `latest` at the beta or past it ends the beta. With
461
464
  `@<build>` it builds and uploads nothing, and asks for that build, already
462
465
  uploaded. A `publish` after an `upload` of the same files asks for the
463
- uploaded version, since the upload is that version again.
466
+ uploaded version, since the upload is that version again; as does a `publish`
467
+ of the same files with only `version` raised.
464
468
 
465
469
  A published version names one build: a version whose manifest `version` is
466
470
  already a published build's is refused, and its `upload` warns about it. Raise
@@ -570,6 +574,26 @@ To publish a game you collaborate on, set the manifest's `owner` to the
570
574
  owner's handle. Without it, `publish` makes a game of your own instead. Your
571
575
  requests move its tags or wait for review by your own trust, not the owner's.
572
576
 
577
+ ### `hopple share`
578
+
579
+ ```bash
580
+ npx hopple share 'https://hopple.app/ada/pocket?share=…' # the record behind a link
581
+ npx hopple share <link> --data > state.txt # the game's data alone, byte for byte
582
+ npx hopple share <link> --json
583
+ ```
584
+
585
+ The record behind a link a player shared: the game's `data` and `meta`, when
586
+ it was made and on which build of the game, where it was made and how it
587
+ left the page, and how many people opened it. It takes the link as the player
588
+ sent it, or its id. To get debug data from a player, have the game put it in a
589
+ link (`hopple.share.offer({ data, meta })`) and ask them to send you the link.
590
+ Data a game handed over as bytes (a `Uint8Array`) is written by `--data` as
591
+ those bytes, and shown in base64 otherwise.
592
+
593
+ For the game's owner, collaborators and admins. Reading a record does not
594
+ count as opening the link. Links made in the dev shell are kept in its browser,
595
+ not on a server, and are read in its log.
596
+
573
597
  ## The dev shell
574
598
 
575
599
  The dev shell runs the game the way real hosts do (same sandbox, same bridge),
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$comment": "Generated from sdk/cli/src/types.ts by hopple 0.1.0-rc.13's build. Do not edit.",
3
+ "$comment": "Generated from sdk/cli/src/types.ts by hopple 0.1.0-rc.15's build. Do not edit.",
4
4
  "title": "Hopple project config",
5
5
  "$ref": "#/definitions/HoppleConfig",
6
6
  "definitions": {
@@ -664,7 +664,7 @@
664
664
  "type": "string",
665
665
  "description": "A name for something that can *press* an action.\n\n`key.<code>` names a physical key by `KeyboardEvent.code` — **the code and never the character**. `KeyA` is the key where A sits on a US keyboard and stays that key on AZERTY, where it types Q, so a game that binds movement to codes has WASD under the same four fingers everywhere. `Escape` is the host's: it leaves fullscreen and pointer lock, which are invisible from inside the frame, and a game that bound it would lose that fight quietly on every press.\n\n`pad.south` is the south of either cluster: the face button on one pad and the d-pad's down on another, which is what makes one binding cover both. Compass words for both clusters, with no `pad.dpad.down` alias beside `pad.left.south` — a vocabulary that can never shrink should not start out doubled. A thumbstick is not one of these; see `InputStick`.",
666
666
  "markdownDescription": "A name for something that can *press* an action.\n\n`key.<code>` names a physical key by `KeyboardEvent.code` — **the code and\nnever the character**. `KeyA` is the key where A sits on a US keyboard and\nstays that key on AZERTY, where it types Q, so a game that binds movement to\ncodes has WASD under the same four fingers everywhere. `Escape` is the host's:\nit leaves fullscreen and pointer lock, which are invisible from inside the\nframe, and a game that bound it would lose that fight quietly on every press.\n\n`pad.south` is the south of either cluster: the face button on one pad and the\nd-pad's down on another, which is what makes one binding cover both. Compass\nwords for both clusters, with no `pad.dpad.down` alias beside\n`pad.left.south` — a vocabulary that can never shrink should not start out\ndoubled. A thumbstick is not one of these; see `InputStick`.",
667
- "pattern": "^(?:key\\.(?!Escape$)(?=.{1,48}$)[A-Za-z][A-Za-z0-9]*|pointer\\.(?:primary|secondary)|mouse\\.(?:left|middle|right)|touch\\.tap|controls\\.(?=.{1,48}$)[a-z0-9]+(?:[_-][a-z0-9]+)*|pad\\.(?:north|south|east|west|start|select)|pad\\.(?:left|right)\\.(?:north|south|east|west|bumper|trigger))$",
667
+ "pattern": "^(?:key\\.(?!Escape$)(?=.{1,48}$)[A-Za-z][A-Za-z0-9]*|pointer\\.(?:primary|secondary)|mouse\\.(?:left|middle|right|wheelup|wheeldown)|touch\\.tap|controls\\.(?=.{1,48}$)[a-z0-9]+(?:[_-][a-z0-9]+)*|pad\\.(?:north|south|east|west|start|select)|pad\\.(?:left|right)\\.(?:north|south|east|west|bumper|trigger))$",
668
668
  "errorMessage": "is not a binding this SDK knows (a thumbstick is read rather than bound, and Escape is the host's key)"
669
669
  },
670
670
  "ControlLayout": {
@@ -940,7 +940,7 @@
940
940
  "type": "string",
941
941
  "description": "What presses a player's action on their part of the keyboard: a key, or a mouse button.",
942
942
  "markdownDescription": "What presses a player's action on their part of the keyboard: a key, or a\nmouse button.",
943
- "pattern": "^(?:key\\.(?!Escape$)(?=.{1,48}$)[A-Za-z][A-Za-z0-9]*|mouse\\.(?:left|middle|right))$",
943
+ "pattern": "^(?:key\\.(?!Escape$)(?=.{1,48}$)[A-Za-z][A-Za-z0-9]*|mouse\\.(?:left|middle|right|wheelup|wheeldown))$",
944
944
  "errorMessage": "must be a key or a mouse button (and Escape is the host's key)"
945
945
  },
946
946
  "PlayersDeclaration": {