@puzzmo/cli 1.0.51 → 1.0.52
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 +12 -2
- package/docs/games-changed.md +223 -0
- package/lib/commands/changed.d.ts +12 -0
- package/lib/commands/changed.js +178 -0
- package/lib/commands/changed.js.map +1 -0
- package/lib/commands/validate.d.ts +1 -1
- package/lib/commands/validate.js +1 -1
- package/lib/commands/validate.js.map +1 -1
- package/lib/index.js +52 -2
- package/lib/index.js.map +1 -1
- package/lib/queries/__generated__/cliGameRuntimesQuery.graphql.d.ts +37 -0
- package/lib/queries/__generated__/cliGameRuntimesQuery.graphql.js +256 -0
- package/lib/queries/__generated__/cliGameRuntimesQuery.graphql.js.map +1 -0
- package/lib/queries/gameRuntimes.d.ts +14 -0
- package/lib/queries/gameRuntimes.js +52 -0
- package/lib/queries/gameRuntimes.js.map +1 -0
- package/lib/util/belay.d.ts +34 -0
- package/lib/util/belay.js +22 -0
- package/lib/util/belay.js.map +1 -0
- package/lib/util/discoverGames.d.ts +10 -2
- package/lib/util/discoverGames.js +14 -11
- package/lib/util/discoverGames.js.map +1 -1
- package/package.json +1 -1
- package/schemas/puzzmo-file-schema.json +1 -1
- package/src/commands/changed.ts +239 -0
- package/src/commands/validate.ts +1 -1
- package/src/index.ts +58 -2
- package/src/queries/__generated__/cliGameRuntimesQuery.graphql.ts +301 -0
- package/src/queries/gameRuntimes.ts +64 -0
- package/src/util/belay.ts +56 -0
- package/src/util/discoverGames.ts +23 -11
- package/templates/minesweeper/README.md +1 -1
package/README.md
CHANGED
|
@@ -18,16 +18,26 @@ Save a CLI auth token. Generate one from studio.puzzmo.com.
|
|
|
18
18
|
puzzmo login pzt-your-token-here
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
### `puzzmo upload <dir>`
|
|
21
|
+
### `puzzmo games upload <dir>`
|
|
22
22
|
|
|
23
23
|
Upload a game build directory to Puzzmo. The game slug is read from `puzzmo.json` in the build directory.
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
puzzmo upload dist/
|
|
26
|
+
puzzmo games upload dist/
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
The command collects all files in the directory, validates the `puzzmo.json`, computes a SHA from git (or file contents), and uploads them in batches.
|
|
30
30
|
|
|
31
|
+
### `puzzmo games validate [dir]`
|
|
32
|
+
|
|
33
|
+
Validate every `puzzmo.json` under `dir` (defaults to the current directory) against the schema, without uploading anything.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
puzzmo games validate
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
> The older `puzzmo upload` and `puzzmo validate` (without `games`) still work as aliases, but the `puzzmo games …` forms are preferred.
|
|
40
|
+
|
|
31
41
|
### `puzzmo game create [token]`
|
|
32
42
|
|
|
33
43
|
Interactive wizard to create a new Puzzmo game project.
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# `puzzmo games changed`
|
|
2
|
+
|
|
3
|
+
Find out **which of your games have changed since their last deployed build** — so your CI can
|
|
4
|
+
build and upload only the games that actually changed, instead of rebuilding everything.
|
|
5
|
+
|
|
6
|
+
## How it works
|
|
7
|
+
|
|
8
|
+
From anywhere in your repository, the command:
|
|
9
|
+
|
|
10
|
+
1. Finds every `puzzmo.json` under the current directory (each one marks a game project).
|
|
11
|
+
2. Looks up each game's currently-deployed build and reads the commit it was built from.
|
|
12
|
+
3. Runs a `git diff` between that commit and your current checkout, scoped to each game's folder.
|
|
13
|
+
4. Reports which game folders changed.
|
|
14
|
+
|
|
15
|
+
The result is a list of folders you can feed straight into a build-and-deploy step.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
puzzmo games changed [dir] [options]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
| Argument | Description |
|
|
24
|
+
| -------- | ------------------------------------------------------- |
|
|
25
|
+
| `dir` | Directory to scan for games. Defaults to `.` (current). |
|
|
26
|
+
|
|
27
|
+
### Options
|
|
28
|
+
|
|
29
|
+
| Option | Description |
|
|
30
|
+
| ----------------------- | ------------------------------------------------------------------------------------------- |
|
|
31
|
+
| `--list` | Print only the changed game folders, one per line. Ideal for shell loops. |
|
|
32
|
+
| `--json` | Print a JSON report with full detail for every game (changed or not). |
|
|
33
|
+
| `--matrix` | Print a GitHub Actions matrix of the changed games, ready for `strategy.matrix`. |
|
|
34
|
+
| `--ref <ref>` | Compare against this git ref instead of your current checkout (`HEAD`). |
|
|
35
|
+
| `--against <which>` | Which deployed build to use as the baseline: `latest` (default), `next`, `previous`. |
|
|
36
|
+
| `--include-uncommitted` | Also count uncommitted working-tree changes. Useful when running locally before committing. |
|
|
37
|
+
|
|
38
|
+
`latest` is the build your team currently sees — the staged "next" build when you have one
|
|
39
|
+
waiting, otherwise the live one. That is almost always the right baseline for "what do I still
|
|
40
|
+
need to ship". Use `next` or `previous` to target a specific slot.
|
|
41
|
+
|
|
42
|
+
## Output formats
|
|
43
|
+
|
|
44
|
+
### Default (human-readable)
|
|
45
|
+
|
|
46
|
+
A table of every game with its slug, the build it was compared against, its status, and how many
|
|
47
|
+
files changed.
|
|
48
|
+
|
|
49
|
+
### `--list`
|
|
50
|
+
|
|
51
|
+
The folder of every changed game, one per line — nothing else. Empty output means there is
|
|
52
|
+
nothing to build:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
games/minesweeper
|
|
56
|
+
games/sudoku
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### `--json`
|
|
60
|
+
|
|
61
|
+
An array with one entry per discovered game:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
[
|
|
65
|
+
{
|
|
66
|
+
"slug": "minesweeper",
|
|
67
|
+
"displayName": "Minesweeper",
|
|
68
|
+
"teamID": "team-abc",
|
|
69
|
+
"dir": "games/minesweeper",
|
|
70
|
+
"baseSha": "a1b2c3d",
|
|
71
|
+
"ref": "e4f5a6b",
|
|
72
|
+
"status": "changed",
|
|
73
|
+
"changedFiles": 7
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"slug": "wordbind",
|
|
77
|
+
"displayName": "Wordbind",
|
|
78
|
+
"teamID": "team-abc",
|
|
79
|
+
"dir": "games/wordbind",
|
|
80
|
+
"baseSha": "9f8e7d6",
|
|
81
|
+
"ref": "e4f5a6b",
|
|
82
|
+
"status": "unchanged",
|
|
83
|
+
"changedFiles": 0
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
| Field | Description |
|
|
89
|
+
| -------------- | --------------------------------------------------------------------------------------- |
|
|
90
|
+
| `slug` | The game's slug, from its `puzzmo.json`. |
|
|
91
|
+
| `displayName` | The game's display name, from its `puzzmo.json`. |
|
|
92
|
+
| `teamID` | The owning team, from its `puzzmo.json`. |
|
|
93
|
+
| `dir` | The game's folder, relative to the repo root. Pass this to your build step. |
|
|
94
|
+
| `baseSha` | The commit the deployed build was made from. `null` if the game was never deployed. |
|
|
95
|
+
| `ref` | The commit you compared against (your checkout, or `--ref`). |
|
|
96
|
+
| `status` | `changed`, `unchanged`, or `new` (never deployed before — treat as something to build). |
|
|
97
|
+
| `changedFiles` | How many files differ inside the game's folder. |
|
|
98
|
+
|
|
99
|
+
### `--matrix`
|
|
100
|
+
|
|
101
|
+
A GitHub Actions matrix containing only the games that need building. When nothing changed it
|
|
102
|
+
prints `{"include":[]}`, which makes a job using it skip automatically:
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{ "include": [{ "dir": "games/minesweeper", "slug": "minesweeper" }] }
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Authentication
|
|
109
|
+
|
|
110
|
+
The command only works with your own games, so it needs a token:
|
|
111
|
+
|
|
112
|
+
- Run `puzzmo login <token>` once on your machine, **or**
|
|
113
|
+
- Set the `PUZZMO_TOKEN` environment variable (best for CI). Optionally set `PUZZMO_API_URL`
|
|
114
|
+
to target a different server (defaults to `https://api.puzzmo.com`).
|
|
115
|
+
|
|
116
|
+
```yaml
|
|
117
|
+
env:
|
|
118
|
+
PUZZMO_TOKEN: ${{ secrets.PUZZMO_TOKEN }}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Using it in CI
|
|
122
|
+
|
|
123
|
+
### Make sure git history is available
|
|
124
|
+
|
|
125
|
+
The command compares against the commit your build was deployed from, which is usually older than
|
|
126
|
+
the latest one. Most CI systems do a **shallow** checkout that only includes recent commits, so
|
|
127
|
+
that older commit won't be present and the comparison will fail.
|
|
128
|
+
|
|
129
|
+
Tell your checkout to fetch full history. With GitHub Actions:
|
|
130
|
+
|
|
131
|
+
```yaml
|
|
132
|
+
- uses: actions/checkout@v4
|
|
133
|
+
with:
|
|
134
|
+
fetch-depth: 0 # fetch full history so the deployed build's commit is available
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
If a deployed build's commit still can't be found, the command stops with an error rather than
|
|
138
|
+
guessing — so you'll know to deepen your checkout.
|
|
139
|
+
|
|
140
|
+
### Exit codes
|
|
141
|
+
|
|
142
|
+
| Code | Meaning |
|
|
143
|
+
| ---- | ----------------------------------------------------------------------------------------- |
|
|
144
|
+
| `0` | Ran fine. There may or may not be changes — look at the output to decide what to build. |
|
|
145
|
+
| `1` | Something went wrong: a `puzzmo.json` couldn't be read, or a deployed build wasn't found. |
|
|
146
|
+
|
|
147
|
+
Decide whether to deploy based on the **output** (e.g. an empty list or matrix), not the exit code.
|
|
148
|
+
|
|
149
|
+
### Examples
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# See a summary of every game under the repo
|
|
153
|
+
puzzmo games changed
|
|
154
|
+
|
|
155
|
+
# Build each changed game
|
|
156
|
+
for dir in $(puzzmo games changed --list); do
|
|
157
|
+
yarn --cwd "$dir" build
|
|
158
|
+
done
|
|
159
|
+
|
|
160
|
+
# Only look at games inside a subfolder
|
|
161
|
+
puzzmo games changed games/word-games --list
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Full GitHub Actions workflow
|
|
165
|
+
|
|
166
|
+
Detect changed games once, then build and upload each one in parallel:
|
|
167
|
+
|
|
168
|
+
```yaml
|
|
169
|
+
name: Deploy changed games
|
|
170
|
+
on:
|
|
171
|
+
push:
|
|
172
|
+
branches: [main]
|
|
173
|
+
|
|
174
|
+
jobs:
|
|
175
|
+
detect:
|
|
176
|
+
runs-on: ubuntu-latest
|
|
177
|
+
outputs:
|
|
178
|
+
matrix: ${{ steps.changed.outputs.matrix }}
|
|
179
|
+
steps:
|
|
180
|
+
- uses: actions/checkout@v4
|
|
181
|
+
with:
|
|
182
|
+
fetch-depth: 0 # full history so deployed builds' commits are available
|
|
183
|
+
- uses: actions/setup-node@v4
|
|
184
|
+
with: { node-version: 22 }
|
|
185
|
+
- run: yarn install --immutable
|
|
186
|
+
- id: changed
|
|
187
|
+
env:
|
|
188
|
+
PUZZMO_TOKEN: ${{ secrets.PUZZMO_TOKEN }}
|
|
189
|
+
run: echo "matrix=$(yarn puzzmo games changed --matrix)" >> "$GITHUB_OUTPUT"
|
|
190
|
+
|
|
191
|
+
deploy:
|
|
192
|
+
needs: detect
|
|
193
|
+
if: ${{ fromJSON(needs.detect.outputs.matrix).include[0] != null }} # skip when nothing changed
|
|
194
|
+
runs-on: ubuntu-latest
|
|
195
|
+
strategy:
|
|
196
|
+
fail-fast: false
|
|
197
|
+
matrix: ${{ fromJSON(needs.detect.outputs.matrix) }}
|
|
198
|
+
steps:
|
|
199
|
+
- uses: actions/checkout@v4
|
|
200
|
+
with: { fetch-depth: 0 }
|
|
201
|
+
- uses: actions/setup-node@v4
|
|
202
|
+
with: { node-version: 22 }
|
|
203
|
+
- run: yarn install --immutable
|
|
204
|
+
- name: Build ${{ matrix.slug }}
|
|
205
|
+
run: yarn --cwd "${{ matrix.dir }}" build
|
|
206
|
+
- name: Upload ${{ matrix.slug }}
|
|
207
|
+
env:
|
|
208
|
+
PUZZMO_TOKEN: ${{ secrets.PUZZMO_TOKEN }}
|
|
209
|
+
run: yarn puzzmo games upload "${{ matrix.dir }}"
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Uploading a game records the commit it was built from, so the next `games changed` run uses it as
|
|
213
|
+
the new baseline.
|
|
214
|
+
|
|
215
|
+
## Related commands
|
|
216
|
+
|
|
217
|
+
`puzzmo games` groups the commands that work across all the games in your repo:
|
|
218
|
+
|
|
219
|
+
| Command | What it does |
|
|
220
|
+
| ----------------------- | ---------------------------------------------------------- |
|
|
221
|
+
| `puzzmo games changed` | Report which game folders changed since their last deploy. |
|
|
222
|
+
| `puzzmo games validate` | Check every `puzzmo.json` against the schema. |
|
|
223
|
+
| `puzzmo games upload` | Build-output upload and `puzzmo.json` sync for each game. |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Which deployed build slot to diff against: the team's latest build, the staged next, or the previous one. */
|
|
2
|
+
export type ChangedAgainst = "latest" | "next" | "previous";
|
|
3
|
+
export type ChangedOptions = {
|
|
4
|
+
json?: boolean;
|
|
5
|
+
list?: boolean;
|
|
6
|
+
matrix?: boolean;
|
|
7
|
+
ref?: string;
|
|
8
|
+
against?: ChangedAgainst;
|
|
9
|
+
includeUncommitted?: boolean;
|
|
10
|
+
};
|
|
11
|
+
/** Reports which discovered games changed since their last deployed build, scoped per game folder. */
|
|
12
|
+
export declare const changed: (dir: string, options?: ChangedOptions) => Promise<void>;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { findTokensForTeam, getTokens, resolveServerForTeam, sourceToURL } from "../util/config.js";
|
|
5
|
+
import { discoverGames } from "../util/discoverGames.js";
|
|
6
|
+
import { fetchTeamGameVersions } from "../queries/gameRuntimes.js";
|
|
7
|
+
/** Reports which discovered games changed since their last deployed build, scoped per game folder. */
|
|
8
|
+
export const changed = async (dir, options = {}) => {
|
|
9
|
+
const { json = false, list = false, matrix = false, against = "latest", includeUncommitted = false } = options;
|
|
10
|
+
if (getTokens().length === 0) {
|
|
11
|
+
console.error("Not logged in. Run `puzzmo login <token>` or set PUZZMO_TOKEN.");
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
const rootDir = path.resolve(dir);
|
|
15
|
+
if (!fs.existsSync(rootDir)) {
|
|
16
|
+
console.error(`Directory not found: ${dir}`);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
const repoRoot = getRepoRoot(rootDir);
|
|
20
|
+
if (!repoRoot) {
|
|
21
|
+
console.error(`Not a git repository: ${rootDir}`);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
const ref = options.ref || "HEAD";
|
|
25
|
+
const refSha = revParseShort(ref, repoRoot);
|
|
26
|
+
if (!refSha) {
|
|
27
|
+
console.error(`Could not resolve git ref: ${ref}`);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
const { games, errors: discoveryErrors } = await discoverGames(rootDir, { requireDist: false });
|
|
31
|
+
if (!games.length && !discoveryErrors.length) {
|
|
32
|
+
console.error(`No puzzmo.json files found under ${rootDir}`);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
const hardErrors = discoveryErrors.map((err) => `${err.slug ?? path.relative(rootDir, err.puzzmoJsonPath)}: ${err.errors.join("; ")}`);
|
|
36
|
+
const teamVersions = new Map();
|
|
37
|
+
const results = await Promise.all(games.map((game) => evaluateGame(game, { repoRoot, ref, refSha, against, includeUncommitted, teamVersions })));
|
|
38
|
+
const report = [];
|
|
39
|
+
for (const result of results) {
|
|
40
|
+
if ("entry" in result)
|
|
41
|
+
report.push(result.entry);
|
|
42
|
+
else
|
|
43
|
+
hardErrors.push(result.error);
|
|
44
|
+
}
|
|
45
|
+
const buildable = report.filter((entry) => entry.status !== "unchanged");
|
|
46
|
+
if (json)
|
|
47
|
+
console.log(JSON.stringify(report, null, 2));
|
|
48
|
+
else if (matrix)
|
|
49
|
+
console.log(JSON.stringify({ include: buildable.map((entry) => ({ dir: entry.dir, slug: entry.slug })) }));
|
|
50
|
+
else if (list)
|
|
51
|
+
for (const entry of buildable)
|
|
52
|
+
console.log(entry.dir);
|
|
53
|
+
else if (report.length)
|
|
54
|
+
printTable(report);
|
|
55
|
+
else if (!hardErrors.length)
|
|
56
|
+
console.log(`No puzzmo.json files found under ${rootDir}`);
|
|
57
|
+
if (hardErrors.length) {
|
|
58
|
+
console.error(`\n${hardErrors.length} error${hardErrors.length === 1 ? "" : "s"}:`);
|
|
59
|
+
for (const message of hardErrors)
|
|
60
|
+
console.error(` ${message}`);
|
|
61
|
+
process.exit(1);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
/** Resolves one game's deployed SHA and diffs it against the ref. Returns either a report entry or a hard error. */
|
|
65
|
+
const evaluateGame = async (game, ctx) => {
|
|
66
|
+
const { slug, teamID } = game.puzzmoFile.game;
|
|
67
|
+
const dir = toPosix(path.relative(ctx.repoRoot, game.puzzmoJsonDir)) || ".";
|
|
68
|
+
const credential = await resolveServerForTeam(teamID);
|
|
69
|
+
if (!credential) {
|
|
70
|
+
const matches = findTokensForTeam(teamID);
|
|
71
|
+
const message = matches.length === 0
|
|
72
|
+
? `No saved token for team ${teamID}. Run \`puzzmo login <token>\`.`
|
|
73
|
+
: `Token for team ${teamID} is registered against ${matches.map((m) => m.source).join(", ")} but none of those servers are reachable.`;
|
|
74
|
+
return { error: `${slug}: ${message}` };
|
|
75
|
+
}
|
|
76
|
+
let versions;
|
|
77
|
+
try {
|
|
78
|
+
versions = (await getTeamVersions(teamID, credential, ctx)).get(slug);
|
|
79
|
+
}
|
|
80
|
+
catch (e) {
|
|
81
|
+
return { error: `${slug}: ${e instanceof Error ? e.message : String(e)}` };
|
|
82
|
+
}
|
|
83
|
+
const baseSha = pickBaseSha(versions ?? null, ctx.against);
|
|
84
|
+
// Never deployed (or the chosen slot is empty) — nothing to diff against, so it's new and buildable.
|
|
85
|
+
if (!baseSha)
|
|
86
|
+
return { entry: makeEntry(game, dir, null, ctx.refSha, "new", 0) };
|
|
87
|
+
// The deployed commit has to exist locally or we can't diff — fail loudly rather than guessing.
|
|
88
|
+
if (!commitExists(baseSha, ctx.repoRoot))
|
|
89
|
+
return {
|
|
90
|
+
error: `${slug}: deployed commit ${baseSha} not found locally. Fetch full git history (e.g. actions/checkout fetch-depth: 0).`,
|
|
91
|
+
};
|
|
92
|
+
const changedFiles = countChanges(baseSha, ctx.ref, game.puzzmoJsonDir, ctx.includeUncommitted);
|
|
93
|
+
return { entry: makeEntry(game, dir, baseSha, ctx.refSha, changedFiles > 0 ? "changed" : "unchanged", changedFiles) };
|
|
94
|
+
};
|
|
95
|
+
const makeEntry = (game, dir, baseSha, ref, status, changedFiles) => ({
|
|
96
|
+
slug: game.puzzmoFile.game.slug,
|
|
97
|
+
displayName: game.puzzmoFile.game.displayName,
|
|
98
|
+
teamID: game.puzzmoFile.game.teamID,
|
|
99
|
+
dir,
|
|
100
|
+
baseSha,
|
|
101
|
+
ref,
|
|
102
|
+
status,
|
|
103
|
+
changedFiles,
|
|
104
|
+
});
|
|
105
|
+
/** Fetches a team's per-game runtime SHAs once, memoizing the in-flight promise so concurrent games share the call. */
|
|
106
|
+
const getTeamVersions = (teamID, credential, ctx) => {
|
|
107
|
+
let pending = ctx.teamVersions.get(teamID);
|
|
108
|
+
if (!pending) {
|
|
109
|
+
pending = fetchTeamGameVersions(sourceToURL(credential.source), credential.token);
|
|
110
|
+
ctx.teamVersions.set(teamID, pending);
|
|
111
|
+
}
|
|
112
|
+
return pending;
|
|
113
|
+
};
|
|
114
|
+
/** Picks the baseline SHA for the chosen slot. `latest` is the most recent build the team has — the staged next, else the live current. */
|
|
115
|
+
const pickBaseSha = (versions, against) => {
|
|
116
|
+
if (!versions)
|
|
117
|
+
return null;
|
|
118
|
+
if (against === "next")
|
|
119
|
+
return versions.next;
|
|
120
|
+
if (against === "previous")
|
|
121
|
+
return versions.previous;
|
|
122
|
+
return versions.next ?? versions.current;
|
|
123
|
+
};
|
|
124
|
+
/** Counts files differing under `dir` between `base` and `ref`, optionally folding in uncommitted working-tree changes. */
|
|
125
|
+
const countChanges = (base, ref, dir, includeUncommitted) => {
|
|
126
|
+
const files = new Set(gitLines(["diff", "--name-only", `${base}..${ref}`, "--", "."], dir));
|
|
127
|
+
if (includeUncommitted) {
|
|
128
|
+
for (const file of gitLines(["diff", "--name-only", "--", "."], dir))
|
|
129
|
+
files.add(file); // unstaged
|
|
130
|
+
for (const file of gitLines(["diff", "--name-only", "--cached", "--", "."], dir))
|
|
131
|
+
files.add(file); // staged
|
|
132
|
+
for (const file of gitLines(["ls-files", "--others", "--exclude-standard", "--", "."], dir))
|
|
133
|
+
files.add(file); // untracked
|
|
134
|
+
}
|
|
135
|
+
return files.size;
|
|
136
|
+
};
|
|
137
|
+
/** Prints the human-readable summary table. */
|
|
138
|
+
const printTable = (report) => {
|
|
139
|
+
const headers = ["GAME", "STATUS", "BASE", "FILES"];
|
|
140
|
+
const rows = report.map((entry) => [entry.slug, entry.status, entry.baseSha ?? "—", String(entry.changedFiles)]);
|
|
141
|
+
const widths = headers.map((header, i) => Math.max(header.length, ...rows.map((row) => row[i].length)));
|
|
142
|
+
const format = (cols) => cols.map((col, i) => col.padEnd(widths[i])).join(" ");
|
|
143
|
+
console.log(format(headers));
|
|
144
|
+
for (const row of rows)
|
|
145
|
+
console.log(format(row));
|
|
146
|
+
const changedCount = report.filter((entry) => entry.status !== "unchanged").length;
|
|
147
|
+
console.log(`\n${changedCount} of ${report.length} game${report.length === 1 ? "" : "s"} changed.`);
|
|
148
|
+
};
|
|
149
|
+
const getRepoRoot = (cwd) => tryGit(["rev-parse", "--show-toplevel"], cwd);
|
|
150
|
+
const revParseShort = (ref, cwd) => tryGit(["rev-parse", "--short", ref], cwd);
|
|
151
|
+
/** True if `sha` resolves to a commit object in the repo at `cwd`. */
|
|
152
|
+
const commitExists = (sha, cwd) => {
|
|
153
|
+
try {
|
|
154
|
+
execFileSync("git", ["rev-parse", "--verify", "--quiet", `${sha}^{commit}`], { cwd, stdio: "ignore" });
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
/** Runs a git command and returns its trimmed stdout, or null if it failed (git's own stderr is suppressed). */
|
|
162
|
+
const tryGit = (args, cwd) => {
|
|
163
|
+
try {
|
|
164
|
+
return execFileSync("git", args, { encoding: "utf-8", cwd, stdio: ["ignore", "pipe", "ignore"] }).trim();
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
/** Runs a git command that emits one file path per line and returns the non-empty lines, or [] if it failed. */
|
|
171
|
+
const gitLines = (args, cwd) => {
|
|
172
|
+
const out = tryGit(args, cwd);
|
|
173
|
+
if (out === null)
|
|
174
|
+
return [];
|
|
175
|
+
return out.split("\n").filter(Boolean);
|
|
176
|
+
};
|
|
177
|
+
const toPosix = (p) => p.split(path.sep).join("/");
|
|
178
|
+
//# sourceMappingURL=changed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changed.js","sourceRoot":"","sources":["../../src/commands/changed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACnG,OAAO,EAAuB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC7E,OAAO,EAAE,qBAAqB,EAAqB,MAAM,4BAA4B,CAAA;AA6BrF,sGAAsG;AACtG,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,GAAW,EAAE,OAAO,GAAmB,EAAE,EAAE,EAAE,CAAC;IAC1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AC1D,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IAC7B,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,EAAE,CAAA;IAC3B,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;AAAA,CACvC,CAAA;AAED,MAAM,OAAO,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/** CLI command: puzzmo validate [dir] — discovers every puzzmo.json under dir and validates each */
|
|
1
|
+
/** CLI command: puzzmo games validate [dir] — discovers every puzzmo.json under dir and validates each */
|
|
2
2
|
export declare const validate: (dir: string) => Promise<void>;
|
package/lib/commands/validate.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { discoverGames } from "../util/discoverGames.js";
|
|
4
|
-
/** CLI command: puzzmo validate [dir] — discovers every puzzmo.json under dir and validates each */
|
|
4
|
+
/** CLI command: puzzmo games validate [dir] — discovers every puzzmo.json under dir and validates each */
|
|
5
5
|
export const validate = async (dir) => {
|
|
6
6
|
const rootDir = path.resolve(dir);
|
|
7
7
|
if (!fs.existsSync(rootDir)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAExD,
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,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AAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,GAAG,GAAG,CAAC,CAAA;QACpE,OAAO,CAAC,GAAG,CAAC,cAAc,OAAO,EAAE,CAAC,CAAA;QACpC,IAAI,YAAY,CAAC,MAAM;YAAE,OAAO,CAAC,GAAG,CAAC,sBAAsB,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACvF,CAAC;IAED,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,cAAc,CAAC,IAAI,GAAG,CAAC,cAAc,CAAA;QAC5E,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,IAAI,GAAG,CAAA;QAC7B,OAAO,CAAC,KAAK,CAAC,QAAQ,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,GAAG,GAAG,CAAC,CAAA;QAClD,KAAK,MAAM,CAAC,IAAI,GAAG,CAAC,MAAM;YAAE,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;IACxD,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,MAAM,WAAW,MAAM,CAAC,MAAM,UAAU,CAAC,CAAA;IAChE,IAAI,MAAM,CAAC,MAAM;QAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AAAA,CACnC,CAAA"}
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { defineCommand, runMain } from "citty";
|
|
3
3
|
import { agentTest } from "./commands/agent-test.js";
|
|
4
|
+
import { changed } from "./commands/changed.js";
|
|
4
5
|
import { gameCreate } from "./commands/game/create.js";
|
|
5
6
|
import { login } from "./commands/login.js";
|
|
6
7
|
import { migrate } from "./commands/migrate.js";
|
|
@@ -40,6 +41,35 @@ const validateCommand = defineCommand({
|
|
|
40
41
|
},
|
|
41
42
|
run: ({ args }) => validate(args.dir),
|
|
42
43
|
});
|
|
44
|
+
const changedCommand = defineCommand({
|
|
45
|
+
meta: { name: "changed", description: "Report which games changed since their last deployed build (for CI)." },
|
|
46
|
+
args: {
|
|
47
|
+
dir: { type: "positional", description: "Directory to scan", required: false, default: "." },
|
|
48
|
+
json: { type: "boolean", description: "Output a JSON report for every discovered game" },
|
|
49
|
+
list: { type: "boolean", description: "Output only the changed game folders, one per line" },
|
|
50
|
+
matrix: { type: "boolean", description: "Output a GitHub Actions matrix of the changed games" },
|
|
51
|
+
ref: { type: "string", description: "Git ref to compare against (default HEAD)" },
|
|
52
|
+
against: {
|
|
53
|
+
type: "enum",
|
|
54
|
+
options: ["latest", "next", "previous"],
|
|
55
|
+
description: "Which deployed build to use as the baseline (default latest)",
|
|
56
|
+
},
|
|
57
|
+
"include-uncommitted": { type: "boolean", description: "Also count uncommitted working-tree changes" },
|
|
58
|
+
},
|
|
59
|
+
run: ({ args }) => changed(args.dir, {
|
|
60
|
+
json: args.json,
|
|
61
|
+
list: args.list,
|
|
62
|
+
matrix: args.matrix,
|
|
63
|
+
ref: args.ref,
|
|
64
|
+
against: args.against,
|
|
65
|
+
includeUncommitted: args["include-uncommitted"],
|
|
66
|
+
}),
|
|
67
|
+
});
|
|
68
|
+
// Commands that operate across every puzzmo.json in a repo live under `puzzmo games`.
|
|
69
|
+
const gamesCommand = defineCommand({
|
|
70
|
+
meta: { name: "games", description: "Commands that run across all the games in your repo" },
|
|
71
|
+
subCommands: { changed: changedCommand, upload: uploadCommand, validate: validateCommand },
|
|
72
|
+
});
|
|
43
73
|
const migrateCommand = defineCommand({
|
|
44
74
|
meta: { name: "migrate", description: "List and select migration skills from dev.puzzmo.com" },
|
|
45
75
|
run: () => migrate(),
|
|
@@ -73,14 +103,34 @@ const gameCommand = defineCommand({
|
|
|
73
103
|
meta: { name: "game", description: "Game project commands" },
|
|
74
104
|
subCommands: { create: gameCreateCommand },
|
|
75
105
|
});
|
|
106
|
+
/** Warn that a top-level command moved under `puzzmo games`, then run it anyway. */
|
|
107
|
+
const movedToGames = (name) => console.warn(`"puzzmo ${name}" is now "puzzmo games ${name}". The old form still works for now.`);
|
|
108
|
+
// Deprecated top-level aliases, kept hidden so existing scripts (e.g. `puzzmo upload`) keep working.
|
|
109
|
+
const uploadAlias = defineCommand({
|
|
110
|
+
meta: { ...uploadCommand.meta, hidden: true },
|
|
111
|
+
args: uploadCommand.args,
|
|
112
|
+
run: ({ args }) => {
|
|
113
|
+
movedToGames("upload");
|
|
114
|
+
return upload(args.dir, { verbose: args.verbose });
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
const validateAlias = defineCommand({
|
|
118
|
+
meta: { ...validateCommand.meta, hidden: true },
|
|
119
|
+
args: validateCommand.args,
|
|
120
|
+
run: ({ args }) => {
|
|
121
|
+
movedToGames("validate");
|
|
122
|
+
return validate(args.dir);
|
|
123
|
+
},
|
|
124
|
+
});
|
|
76
125
|
const main = defineCommand({
|
|
77
126
|
meta: { name: "puzzmo", description: "Puzzmo CLI" },
|
|
78
127
|
subCommands: {
|
|
79
128
|
login: loginCommand,
|
|
80
|
-
|
|
81
|
-
validate: validateCommand,
|
|
129
|
+
games: gamesCommand,
|
|
82
130
|
migrate: migrateCommand,
|
|
83
131
|
game: gameCommand,
|
|
132
|
+
upload: uploadAlias,
|
|
133
|
+
validate: validateAlias,
|
|
84
134
|
"agent-test": defineCommand({
|
|
85
135
|
meta: { name: "agent-test", description: "Run the agent test harness", hidden: true },
|
|
86
136
|
run: () => agentTest(),
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAE,UAAU,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,EAAE,WAAW;QACjB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,aAAa;QACvB,YAAY,EAAE,aAAa,CAAC;YAC1B,IAAI,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,4BAA4B,EAAE,MAAM,EAAE,IAAI,EAAE;YACrF,GAAG,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE;SACvB,CAAC;KACH;CACF,CAAC,CAAA;AAEF,OAAO,CAAC,IAAI,CAAC,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @generated SignedSource<<5f5ceed697fe8720947305fca5196bee>>
|
|
3
|
+
* @lightSyntaxTransform
|
|
4
|
+
*/
|
|
5
|
+
import { ConcreteRequest } from 'relay-runtime';
|
|
6
|
+
export type cliGameRuntimesQuery$variables = {
|
|
7
|
+
token: string;
|
|
8
|
+
};
|
|
9
|
+
export type cliGameRuntimesQuery$data = {
|
|
10
|
+
readonly teamForToken: {
|
|
11
|
+
readonly games: {
|
|
12
|
+
readonly edges: ReadonlyArray<{
|
|
13
|
+
readonly node: {
|
|
14
|
+
readonly runtime: {
|
|
15
|
+
readonly currentVersion: {
|
|
16
|
+
readonly assetsSha: string;
|
|
17
|
+
} | null | undefined;
|
|
18
|
+
readonly nextVersion: {
|
|
19
|
+
readonly assetsSha: string;
|
|
20
|
+
} | null | undefined;
|
|
21
|
+
readonly previousVersion: {
|
|
22
|
+
readonly assetsSha: string;
|
|
23
|
+
} | null | undefined;
|
|
24
|
+
} | null | undefined;
|
|
25
|
+
readonly slug: string;
|
|
26
|
+
};
|
|
27
|
+
} | null | undefined> | null | undefined;
|
|
28
|
+
};
|
|
29
|
+
readonly slug: string;
|
|
30
|
+
} | null | undefined;
|
|
31
|
+
};
|
|
32
|
+
export type cliGameRuntimesQuery = {
|
|
33
|
+
response: cliGameRuntimesQuery$data;
|
|
34
|
+
variables: cliGameRuntimesQuery$variables;
|
|
35
|
+
};
|
|
36
|
+
declare const node: ConcreteRequest;
|
|
37
|
+
export default node;
|