@onceworlds/cli 0.9.0 → 0.9.1

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.
Files changed (3) hide show
  1. package/README.md +11 -6
  2. package/dist/cli.js +688 -409
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -7,7 +7,7 @@ players) with no server code.
7
7
  ## Deploy from GitHub Actions
8
8
 
9
9
  Deploys run from GitHub Actions: GitHub vouches for the repo, so there are no API
10
- keys. The easiest setup is to import the repo at https://onceworlds.com/dashboard/new,
10
+ keys. The easiest setup is to import the repo at https://onceworlds.com/create?new=github,
11
11
  which adds `onceworlds.json` and `.github/workflows/onceworlds.yml` for you (that
12
12
  workflow also builds with npm, pnpm, yarn or bun when there's a build script). To write
13
13
  the same files into a folder before it is on GitHub, run `npx @onceworlds/cli init` there.
@@ -101,10 +101,12 @@ from the running game and commit them under `store/`. `onceworlds doctor` says w
101
101
  - `onceworlds init [dir]` sets a game folder up, with the files the dashboard's import commits. It writes
102
102
  `onceworlds.json` (the link and name come from `package.json`'s name or the folder's; `dir` is your build's
103
103
  output folder when `package.json` has a build script, else `.` or the folder with your `index.html`),
104
- `.github/workflows/onceworlds.yml`, and the guide for AI coding tools as `AGENTS.md` with a `CLAUDE.md` that
104
+ `.github/workflows/onceworlds.yml`, a `.gitignore` (`node_modules/` and the pictures `shot` saves; to one you have it adds only
105
+ those lines, once), and the guide for AI coding tools as `AGENTS.md` with a `CLAUDE.md` that
105
106
  imports it (next to a `AGENTS.md` of your own it writes `ONCEWORLDS.md` and adds a pointer to yours). It never
106
- overwrites a file you have: `--force` replaces only what init writes, never your own `AGENTS.md` or `CLAUDE.md`.
107
- Then commit, push, and import the repo at https://onceworlds.com/dashboard/new.
107
+ overwrites a file you have: `--force` replaces only what init writes, never your own `AGENTS.md`, `CLAUDE.md` or `.gitignore`.
108
+ `onceworlds new` writes the same workflow and `.gitignore` into every game it makes.
109
+ Then commit, push, and import the repo at https://onceworlds.com/create?new=github.
108
110
  - `onceworlds deploy [dir]` uploads only the files that changed and publishes the game
109
111
  (the workflow runs it). It lists every file it skipped because Onceworlds can't serve it. A game's tests never go up: `*.test.js`, `vitest.config.*` and the `test/` folder at the top of the game.
110
112
  - `onceworlds dev [dir]` deploys to a local Onceworlds platform (for platform development)
@@ -116,7 +118,9 @@ from the running game and commit them under `store/`. `onceworlds doctor` says w
116
118
  shared time and no use of the platform's lobby. For an engine game it also reads the action map
117
119
  and offers the `controls` it implies: `--fix` writes them into `onceworlds.json` when it has none. For an installed engine
118
120
  game the list is the engine's own (`controlsFromActions` on the `actions` that `game.config.js` exports); otherwise it is read
119
- from the source text (`Input.axis2d`, `Input.button`) and may differ. It only suggests: nothing in it stops a deploy (`--strict` exits with an error on likely bugs, for CI).
121
+ from the source text (`Input.axis2d`, `Input.button`) and may differ. It checks `onceworlds.json` by every rule a deploy applies
122
+ (lengths, genres, badges, How to play, the pictures it names), in the deploy's words and with the fix, and fails as the deploy
123
+ would; the rest only suggests (`--strict` exits with an error on likely bugs, for CI). `check` does the same.
120
124
 
121
125
  - `onceworlds api <name or words>` looks the engine up in a few lines instead of the whole reference: a signature, what it
122
126
  does, a component's fields or an options object's keys, and an example (`api Shape2D`, `api feel.shake`, `api "camera follow"`;
@@ -125,7 +129,8 @@ from the running game and commit them under `store/`. `onceworlds doctor` says w
125
129
  `onceworlds guide [topic]` the engine guide's topics or any heading of the guide or the reference. They read the index of the
126
130
  engine installed in the game's `node_modules` (its own version), else the platform's.
127
131
  - `onceworlds shot [dir]` saves a picture of the game to look at: the first player's screen a few seconds into a simulated match
128
- with bots (`--at 20`), or a poster (`--poster cover`), at `--size 1280x720` by default. A 2D game is drawn with no browser, from
132
+ with bots (`--at 20`), the title screen (`--phase title`) or the lobby (`--phase lobby`), or a poster (`--poster cover`), at
133
+ `--size 1280x720` by default. A 2D game is drawn with no browser, from
129
134
  the frame the engine draws, in the engine's font; a 3D game (or `--browser`) is drawn by Chrome, Chromium or Edge from a local
130
135
  copy of the game. `--out` picks the file (default `store/shot.png`).
131
136