@crowdedkingdoms/crowdyjs 17.2.0 → 17.4.0-dev.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.
- package/MIGRATION.md +97 -0
- package/README.md +2 -2
- package/dist/crowdy-studio/controller.d.ts +15 -0
- package/dist/crowdy-studio/controller.d.ts.map +1 -1
- package/dist/crowdy-studio/controller.js +41 -0
- package/dist/crowdy-studio/dom-shell.d.ts +1 -0
- package/dist/crowdy-studio/dom-shell.d.ts.map +1 -1
- package/dist/crowdy-studio/dom-shell.js +20 -1
- package/dist/crowdy-studio/github/index.d.ts +1 -0
- package/dist/crowdy-studio/github/index.d.ts.map +1 -1
- package/dist/crowdy-studio/github/index.js +1 -0
- package/dist/crowdy-studio/github/new-repo.d.ts +27 -0
- package/dist/crowdy-studio/github/new-repo.d.ts.map +1 -0
- package/dist/crowdy-studio/github/new-repo.js +44 -0
- package/dist/crowdy-studio/github/transport.d.ts +7 -0
- package/dist/crowdy-studio/github/transport.d.ts.map +1 -1
- package/dist/crowdy-studio/github/transport.js +1 -1
- package/dist/default-origin.d.ts +6 -6
- package/dist/default-origin.d.ts.map +1 -1
- package/dist/default-origin.js +6 -6
- package/dist/domains/gameModel.d.ts +172 -14
- package/dist/domains/gameModel.d.ts.map +1 -1
- package/dist/domains/gameModel.js +204 -14
- package/dist/generated/graphql.d.ts +524 -6
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +16 -6
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/kit/index.d.ts +1 -1
- package/dist/kit/index.d.ts.map +1 -1
- package/dist/kit/matches.d.ts +79 -2
- package/dist/kit/matches.d.ts.map +1 -1
- package/dist/kit/matches.js +85 -1
- package/dist/kit/npcs.d.ts.map +1 -1
- package/dist/kit/social.d.ts.map +1 -1
- package/package.json +1 -1
package/MIGRATION.md
CHANGED
|
@@ -1,3 +1,100 @@
|
|
|
1
|
+
# CrowdyJS v17.4 — the session system
|
|
2
|
+
|
|
3
|
+
**Additive.** `17.4.0` (2026-09-14), on top of ck-api `v2.3.0`. Tracks cks-game-api
|
|
4
|
+
PR #319 (the game-model session system). Every existing session method keeps its signature and every
|
|
5
|
+
field it returned; the SDK adds what the server now knows about a session.
|
|
6
|
+
|
|
7
|
+
- **Roster, admission, capacity, host.** `GmSession` gains `admission`
|
|
8
|
+
(`open | locked | closed`), `maxParticipants`, `participantCount`,
|
|
9
|
+
`hostUserId`, `hostTerm`, `revision`, `endedAt`, `endReason`, `createdAt`.
|
|
10
|
+
`createSession` accepts `maxParticipants`, `admission`, `emptyTimeoutSec`,
|
|
11
|
+
`presence` and `idempotencyKey`; `sessions` filters by `admission` and
|
|
12
|
+
`hostUserId` and takes a `limit`.
|
|
13
|
+
- **New methods on `client.gameModel`:** `leaveSession`, `setSessionAdmission`,
|
|
14
|
+
`transferSessionHost`, `endSession` (host or app admin; all accept
|
|
15
|
+
`expectedHostTerm` and `idempotencyKey`), `sessionSnapshot`, `sessionEvents`,
|
|
16
|
+
`sessionInspect` (`manage_apps`), and the `sessionChanged` subscription
|
|
17
|
+
(`{ appId, sessionId, afterRevision? }`; same handler shape as
|
|
18
|
+
`containerChanged`). The contract is the player-count feed's: pull the
|
|
19
|
+
snapshot, apply events above its revision, re-pull on a gap.
|
|
20
|
+
- **Reconnection is a rejoin.** `joinSession` on a session you are in returns
|
|
21
|
+
your row with `incarnation + 1`; the join result is now the full roster row
|
|
22
|
+
(`state`, `incarnation`, `actorUuid`, `joinedAt`, `leftAt`, `leftReason`).
|
|
23
|
+
**`leaveSession` requires that `incarnation`** — there is no "leave
|
|
24
|
+
regardless", so a stale client can never remove the one that took over
|
|
25
|
+
(`SESSION_INCARNATION_STALE`).
|
|
26
|
+
- **Presence is your actor — a behaviour change every consumer inherits from
|
|
27
|
+
the server, with no SDK call involved.** A joined participant with no fresh
|
|
28
|
+
Buddy actor in the app after the join grace window (60 s by default) is
|
|
29
|
+
marked `left` / `presence_expired`, and a session nobody has been joined to
|
|
30
|
+
for longer than its `emptyTimeoutSec` (5 min by default; `0` disables) is
|
|
31
|
+
ended as `abandoned`. A client that only speaks GraphQL therefore drops out
|
|
32
|
+
of a session it never replicates in. Pass `actorUuid` on join to bind
|
|
33
|
+
presence to one specific actor (your own; 32-hex, the uuid you send on
|
|
34
|
+
`udp.sendActorUpdate` / `session.self.uuid`). Do **not** pass the match kit's
|
|
35
|
+
channel-ping uuid — it never spawns in Buddy.
|
|
36
|
+
- **Opting out: `presence: 'none'`.** A session created with
|
|
37
|
+
`createSession({ ..., presence: 'none' })` is never judged by actor presence
|
|
38
|
+
(`GmSession.presence` reports the mode; `sessionInspect` shows its rows as
|
|
39
|
+
`presence: 'none'`). Its roster's only exits are `leaveSession`, `endSession`
|
|
40
|
+
and the empty timeout once everyone has left. Use it for turn-based play that
|
|
41
|
+
talks GraphQL and channel pings and never replicates an actor. The mode is
|
|
42
|
+
fixed at creation. A GraphQL-only session that does **not** opt out empties
|
|
43
|
+
after the grace window and is abandoned after the timeout.
|
|
44
|
+
- **The `sessionChanged` push is per datacenter; the events table is the
|
|
45
|
+
record.** A revision committed in one region wakes subscribers on that
|
|
46
|
+
region's API replicas; `sessionEvents(afterRevision)` (and the replay the
|
|
47
|
+
subscription performs on connect) reads the durable rows, so a subscriber
|
|
48
|
+
reconnecting anywhere catches up from the revision it last saw.
|
|
49
|
+
- **Error codes added:** `SESSION_FULL`, `SESSION_LOCKED`, `SESSION_CLOSED`,
|
|
50
|
+
`SESSION_ENDED`, `SESSION_NOT_PARTICIPANT` (the caller is not joined),
|
|
51
|
+
`SESSION_TARGET_NOT_PARTICIPANT` (the user named to `transferSessionHost` is
|
|
52
|
+
not joined), `SESSION_INCARNATION_STALE`, `SESSION_HOST_TERM_STALE` — all on
|
|
53
|
+
`CrowdyGraphQLError.code`.
|
|
54
|
+
- **`kit.matches` creates its session with `presence: 'none'`, and now leaves
|
|
55
|
+
and ends it.** A kit match is GraphQL plus channel pings; its `actorUuid` is
|
|
56
|
+
only the channel-message sender id and never spawns in Buddy, so under the
|
|
57
|
+
default mode every player would be expired after the grace window. Because
|
|
58
|
+
nothing expires anybody, the kit owns the roster's exits: new
|
|
59
|
+
**`kit.matches.leave(match, incarnation?)`** calls `leaveSession` with the
|
|
60
|
+
incarnation the kit remembered from `create` / `join` on this instance (or
|
|
61
|
+
the one you pass) and leaves the match channel; **`finish()` now ends the
|
|
62
|
+
backing session** (`endSession`, reason `completed`) after a successful
|
|
63
|
+
`end_match`, so the roster is cleared and the session's events become
|
|
64
|
+
eligible for retention; the result's `sessionEnd` says what happened to the
|
|
65
|
+
session (`'ended'`, `'already_ended'` for a replayed finish, `'forbidden'`
|
|
66
|
+
when `end_match` admitted the caller but the session did not -- the creator
|
|
67
|
+
who already left, or the app's elected host who is not the session host -- in
|
|
68
|
+
which case the match is finished, the session is not, and nothing is thrown;
|
|
69
|
+
an app admin can `gameModel.endSession` it). An emptied
|
|
70
|
+
session that was never finished is abandoned by the empty timeout. Otherwise the kit is unchanged: capacity
|
|
71
|
+
still lives in `MatchMeta` and join does not bind an actor. Moving it onto
|
|
72
|
+
session capacity / admission / host is a later, separate change.
|
|
73
|
+
|
|
74
|
+
No removals.
|
|
75
|
+
|
|
76
|
+
# CrowdyJS v17.3 — "Create repository on GitHub" (additive)
|
|
77
|
+
|
|
78
|
+
`17.3.0` (2026-09-14), tracks ck-api `v2.3.0`. Nothing removed. (Written as 17.1 while two other trains — binary-relay bundles 17.1.0 and Crowdy Games hosting 17.2.0 — shipped ahead of it.)
|
|
79
|
+
|
|
80
|
+
- `CrowdyStudioGitHubStatus.repositorySelection` (`'all' | 'selected' | null`):
|
|
81
|
+
which repositories the installation covers. A repository created on GitHub
|
|
82
|
+
afterwards must be added to a `selected` installation (at `installUrl`)
|
|
83
|
+
before it can be bound.
|
|
84
|
+
- `githubNewRepositoryUrl({ owner, name, description, visibility })` and
|
|
85
|
+
`githubRepositorySlug(name)` (from `@crowdedkingdoms/crowdyjs/crowdy-studio`):
|
|
86
|
+
GitHub's `/new` page prefilled for a mod. The App holds installation tokens
|
|
87
|
+
only and cannot create a repository; this makes the modder's own click a
|
|
88
|
+
short one.
|
|
89
|
+
- `CrowdyStudioController.createGitHubRepository()` opens that page for the
|
|
90
|
+
open project (connected login as owner, project name slugged, private) and
|
|
91
|
+
sets `state.githubPendingRepo` to `owner/name`; the card's bind input is
|
|
92
|
+
prefilled with it and defaults to PUSH_PROJECT. On a game's app token the
|
|
93
|
+
bind itself still happens in hosted Studio; the message says so.
|
|
94
|
+
- ck-api `v2.3.0`: a PUSH_PROJECT bind seeds a `README.md` (project name,
|
|
95
|
+
description, layout) when the branch has none, and treats an empty-tree
|
|
96
|
+
branch as empty rather than missing.
|
|
97
|
+
|
|
1
98
|
# CrowdyJS v17.2 — publish to Crowdy Games; sign-in under the shell
|
|
2
99
|
|
|
3
100
|
**Additive.** `17.2.0` (2026-09-14). Tracks ck-api `v2.1.0` (third-party game
|
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ console.log(me.email);
|
|
|
68
68
|
Your game's origin must be registered under the app's **redirect URIs**
|
|
69
69
|
(Studio > Apps > client settings); that one entry admits it to CORS and to the
|
|
70
70
|
hosted sign-in return. Direct sign-in (`client.auth.login` / `register` / magic
|
|
71
|
-
link / social) is served only to first-party pages (Studio
|
|
71
|
+
link / social) is served only to first-party pages (Studio; the games host left this list on 2026-09-14 when the Overworld lobby stopped signing players in) and to
|
|
72
72
|
non-browser callers (Node, CLI, tests); from any other browser origin the API
|
|
73
73
|
answers `HOSTED_SIGN_IN_REQUIRED` (`isHostedSignInRequiredError`). See
|
|
74
74
|
[Authentication](#authentication-session-token-vs-app-scoped-tokens).
|
|
@@ -89,7 +89,7 @@ game stack never receives the player's full session.
|
|
|
89
89
|
| your code runs... | sign in with | then |
|
|
90
90
|
|-----------------------------------------------------|-------------------------------------------|---------------------------------------|
|
|
91
91
|
| in a browser, on your own domain (every customer game) | `portal.signIn` -> Studio -> `portal.handleSignInCallback` | the client already holds the app token |
|
|
92
|
-
| in a browser, on
|
|
92
|
+
| in a browser, on the first-party host (Studio) | `auth.login` / magic link / social | `portal.mintAppToken(appId)` |
|
|
93
93
|
| outside a browser (Node, CLI, CrowdyCPP, tests) | `auth.login` / `auth.register` | `portal.mintAppToken(appId)` |
|
|
94
94
|
|
|
95
95
|
The first row is the only one a game on its own domain can take: the direct
|
|
@@ -82,6 +82,8 @@ export interface CrowdyStudioState {
|
|
|
82
82
|
github: CrowdyStudioGitHubStatus | null;
|
|
83
83
|
githubMessage?: string;
|
|
84
84
|
githubBusy: boolean;
|
|
85
|
+
/** `owner/name` the modder was sent to create on GitHub; the bind input is prefilled with it. */
|
|
86
|
+
githubPendingRepo?: string;
|
|
85
87
|
runtime: CrowdyStudioRuntimeStatus;
|
|
86
88
|
runtimeSync: CrowdyStudioRuntimeSync;
|
|
87
89
|
agentActivity: 'IDLE' | 'PREPARING' | 'WORKING' | 'PAUSED';
|
|
@@ -236,6 +238,19 @@ export declare class CrowdyStudioController {
|
|
|
236
238
|
private githubScope;
|
|
237
239
|
/** Opens the install page in a new tab; identity comes back through the signed state, never the browser. */
|
|
238
240
|
connectGitHub(): Promise<string>;
|
|
241
|
+
/**
|
|
242
|
+
* Open GitHub's "new repository" page prefilled for the open project
|
|
243
|
+
* (connected login as owner, project name as the repository name, private).
|
|
244
|
+
* The App cannot create the repository itself — it holds installation
|
|
245
|
+
* tokens only — so this is the modder's click; what comes back is a
|
|
246
|
+
* repository the bind form already names. Returns the URL it opened.
|
|
247
|
+
*
|
|
248
|
+
* The card's bind input is prefilled with `owner/name` so that, on a host
|
|
249
|
+
* whose GitHub transport carries the identity session (hosted Studio), Bind
|
|
250
|
+
* is the next click. A game's app token cannot bind; there the message says
|
|
251
|
+
* to finish in Crowdy Studio.
|
|
252
|
+
*/
|
|
253
|
+
createGitHubRepository(): string;
|
|
239
254
|
/**
|
|
240
255
|
* Bind the open project to `owner/repo` or `owner/repo@branch`, choosing
|
|
241
256
|
* which side is the truth for the first commit. Refuses over unsaved edits
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/crowdy-studio/controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAC1B,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAKlE,OAAO,EAAyB,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EACV,6BAA6B,EAC7B,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/crowdy-studio/controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAC1B,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAKlE,OAAO,EAAyB,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,KAAK,EACV,6BAA6B,EAC7B,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAOL,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,EAClC,KAAK,mBAAmB,EAExB,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,mCAAmC,EACxC,KAAK,kBAAkB,EACvB,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AC,aAAa;IASrB,OAAO,CAAC,mBAAmB;IAkB3B,OAAO,CAAC,4BAA4B;IAQpC,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,oBAAoB;IAgB5B,OAAO,CAAC,oBAAoB;IA8C5B,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,KAAK;IAOb,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,WAAW;IAyBnB,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,MAAM;IAKd,OAAO,CAAC,WAAW;CAGpB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PlayerCodeBroker, } from '../player-runtime/player-code-broker.js';
|
|
2
2
|
import { digestCanonicalJson, sha256Digest, } from '../player-host/json-schema.js';
|
|
3
3
|
import { parseRustcDiagnostics } from './diagnostics.js';
|
|
4
|
+
import { githubNewRepositoryUrl, githubRepositorySlug } from './github/new-repo.js';
|
|
4
5
|
import { cloneCrowdyStudioProject, crowdyStudioFileKey, normalizeCrowdyStudioPath, projectTargets, CrowdyStudioOfflineError, CrowdyStudioRevisionConflictError, } from './models.js';
|
|
5
6
|
import { createCrowdyStudioStarterProject, } from './starter-projects.js';
|
|
6
7
|
class OperationCancelledError extends Error {
|
|
@@ -279,6 +280,7 @@ export class CrowdyStudioController {
|
|
|
279
280
|
github: null,
|
|
280
281
|
githubMessage: undefined,
|
|
281
282
|
githubBusy: false,
|
|
283
|
+
githubPendingRepo: undefined,
|
|
282
284
|
});
|
|
283
285
|
this.restartVisibleSurfacePolling();
|
|
284
286
|
// Status only; a pull is always the modder's explicit action.
|
|
@@ -477,6 +479,44 @@ export class CrowdyStudioController {
|
|
|
477
479
|
this.update({ githubMessage: 'Finish installing on GitHub in the new tab, then Refresh.' });
|
|
478
480
|
return connectUrl;
|
|
479
481
|
}
|
|
482
|
+
/**
|
|
483
|
+
* Open GitHub's "new repository" page prefilled for the open project
|
|
484
|
+
* (connected login as owner, project name as the repository name, private).
|
|
485
|
+
* The App cannot create the repository itself — it holds installation
|
|
486
|
+
* tokens only — so this is the modder's click; what comes back is a
|
|
487
|
+
* repository the bind form already names. Returns the URL it opened.
|
|
488
|
+
*
|
|
489
|
+
* The card's bind input is prefilled with `owner/name` so that, on a host
|
|
490
|
+
* whose GitHub transport carries the identity session (hosted Studio), Bind
|
|
491
|
+
* is the next click. A game's app token cannot bind; there the message says
|
|
492
|
+
* to finish in Crowdy Studio.
|
|
493
|
+
*/
|
|
494
|
+
createGitHubRepository() {
|
|
495
|
+
if (!this.options.github)
|
|
496
|
+
throw new Error('GitHub is not available in this Studio.');
|
|
497
|
+
const project = this.requireProject();
|
|
498
|
+
const github = this.state.github;
|
|
499
|
+
if (!github?.connected) {
|
|
500
|
+
throw new Error('Connect GitHub first; the repository is created under your GitHub account.');
|
|
501
|
+
}
|
|
502
|
+
const owner = github.accountLogin ?? undefined;
|
|
503
|
+
const name = githubRepositorySlug(project.metadata.name);
|
|
504
|
+
const url = githubNewRepositoryUrl({
|
|
505
|
+
owner,
|
|
506
|
+
name,
|
|
507
|
+
description: project.metadata.description ?? `Crowdy Studio mod: ${project.metadata.name}`,
|
|
508
|
+
});
|
|
509
|
+
if (typeof window !== 'undefined')
|
|
510
|
+
window.open(url, '_blank', 'noopener,noreferrer');
|
|
511
|
+
const slug = owner ? `${owner}/${name}` : name;
|
|
512
|
+
this.update({
|
|
513
|
+
githubPendingRepo: slug,
|
|
514
|
+
githubMessage: github.repositorySelection === 'selected'
|
|
515
|
+
? `Create ${slug} on GitHub, add it to your Crowdy Studio installation, then bind it (Push this project).`
|
|
516
|
+
: `Create ${slug} on GitHub, then bind it (Push this project).`,
|
|
517
|
+
});
|
|
518
|
+
return url;
|
|
519
|
+
}
|
|
480
520
|
/**
|
|
481
521
|
* Bind the open project to `owner/repo` or `owner/repo@branch`, choosing
|
|
482
522
|
* which side is the truth for the first commit. Refuses over unsaved edits
|
|
@@ -513,6 +553,7 @@ export class CrowdyStudioController {
|
|
|
513
553
|
await this.reloadProject();
|
|
514
554
|
this.update({
|
|
515
555
|
github,
|
|
556
|
+
githubPendingRepo: undefined,
|
|
516
557
|
githubMessage: initial === 'PUSH_PROJECT'
|
|
517
558
|
? `Pushed the project to ${github.owner}/${github.repo}@${github.branch}. It is the working tree now; edits commit as you save.`
|
|
518
559
|
: `Took ${github.owner}/${github.repo}@${github.branch} as the project. Edits commit as you save.`,
|
|
@@ -58,6 +58,7 @@ export declare class CrowdyStudioDomShell {
|
|
|
58
58
|
private readonly github;
|
|
59
59
|
private readonly githubStatus;
|
|
60
60
|
private readonly githubConnect;
|
|
61
|
+
private readonly githubCreateRepo;
|
|
61
62
|
private readonly githubBindInput;
|
|
62
63
|
private readonly githubBind;
|
|
63
64
|
private readonly githubUnbind;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom-shell.d.ts","sourceRoot":"","sources":["../../src/crowdy-studio/dom-shell.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,sBAAsB,EAIvB,MAAM,aAAa,CAAC;AAuCrB;;;;;;;GAOG;AACH;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,kDAAkD;IAClD,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC/B,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,2BAA2B;IAC1C,0EAA0E;IAC1E,IAAI,CAAC,EAAE,CAAC,SAAS,EAAE,WAAW,KAA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2BAAgC;IA0VjE,MAAM,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;IAgCtC,OAAO,IAAI,IAAI;IAiBf,OAAO,CAAC,UAAU;IAmBlB;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB;IAgBhC,OAAO,CAAC,YAAY;IAkBpB,OAAO,CAAC,WAAW;IAsCnB,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,UAAU;IA2DlB,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,aAAa;IAWrB,wEAAwE;IACxE,OAAO,CAAC,gBAAgB;IAYxB,OAAO,CAAC,cAAc;IA+BtB,OAAO,CAAC,eAAe;IAyBvB,OAAO,CAAC,cAAc;IA2BtB,OAAO,CAAC,cAAc;IA6CtB,OAAO,CAAC,cAAc;IAuDtB,OAAO,CAAC,kBAAkB;IAyD1B,OAAO,CAAC,gBAAgB;IA4DxB,OAAO,CAAC,UAAU;IA4ClB,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,UAAU;IAwBlB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,YAAY;IAmCpB,OAAO,CAAC,cAAc;IAgCtB,OAAO,CAAC,cAAc;IAqDtB,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,iBAAiB;YAgBX,GAAG;CAQlB"}
|
|
@@ -137,6 +137,23 @@ export class CrowdyStudioDomShell {
|
|
|
137
137
|
this.githubConnect.addEventListener('click', () => {
|
|
138
138
|
void this.controller.connectGitHub().catch((error) => this.githubNote(error));
|
|
139
139
|
});
|
|
140
|
+
// No repository yet? The App cannot create one (installation tokens only),
|
|
141
|
+
// but GitHub's own form can arrive prefilled; the bind input then carries
|
|
142
|
+
// the same owner/name.
|
|
143
|
+
this.githubCreateRepo = button('Create repository on GitHub');
|
|
144
|
+
this.githubCreateRepo.addEventListener('click', () => {
|
|
145
|
+
try {
|
|
146
|
+
this.controller.createGitHubRepository();
|
|
147
|
+
const pending = this.controller.getState().githubPendingRepo;
|
|
148
|
+
if (pending) {
|
|
149
|
+
this.githubBindInput.value = pending;
|
|
150
|
+
this.githubInitial.value = 'PUSH_PROJECT';
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
catch (error) {
|
|
154
|
+
this.githubNote(error);
|
|
155
|
+
}
|
|
156
|
+
});
|
|
140
157
|
this.githubBindInput = input('owner/repo or owner/repo@branch');
|
|
141
158
|
this.githubInitial = document.createElement('select');
|
|
142
159
|
this.githubInitial.className = 'ck-crowdy-studio-github-initial';
|
|
@@ -172,7 +189,7 @@ export class CrowdyStudioDomShell {
|
|
|
172
189
|
});
|
|
173
190
|
this.githubMessage = element('p', 'ck-crowdy-studio-github-message');
|
|
174
191
|
const bindRow = element('div', 'ck-crowdy-studio-github-row');
|
|
175
|
-
bindRow.append(this.githubBindInput, this.githubInitial, this.githubBind, this.githubUnbind);
|
|
192
|
+
bindRow.append(this.githubCreateRepo, this.githubBindInput, this.githubInitial, this.githubBind, this.githubUnbind);
|
|
176
193
|
const syncRow = element('div', 'ck-crowdy-studio-github-row');
|
|
177
194
|
syncRow.append(this.githubPull, this.githubRefresh);
|
|
178
195
|
this.github.append(githubTitle, this.githubStatus, this.githubConnect, bindRow, syncRow, this.githubMessage);
|
|
@@ -848,6 +865,8 @@ export class CrowdyStudioDomShell {
|
|
|
848
865
|
this.githubConnect.hidden = github.connected;
|
|
849
866
|
this.githubConnect.disabled = state.githubBusy;
|
|
850
867
|
const canBind = github.connected && Boolean(state.project) && !bound && !state.githubBusy && state.saveState === 'SAVED';
|
|
868
|
+
this.githubCreateRepo.hidden = bound || !github.connected;
|
|
869
|
+
this.githubCreateRepo.disabled = !state.project || state.githubBusy;
|
|
851
870
|
this.githubBindInput.hidden = bound;
|
|
852
871
|
this.githubInitial.hidden = bound;
|
|
853
872
|
this.githubBind.hidden = bound;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { CrowdyStudioGitHubTransport, type CrowdyStudioGitHubBindInitial, type CrowdyStudioGitHubFile, type CrowdyStudioGitHubLayout, type CrowdyStudioGitHubProjectScope, type CrowdyStudioGitHubRepo, type CrowdyStudioGitHubStatus, type CrowdyStudioGitHubTree, type CrowdyStudioGitHubTreeEntry, } from './transport.js';
|
|
2
2
|
export { isRustAuthoringPath, joinRepo, repoPathToStudioFile, studioFileToRepoPath, trimSlash, underRoot, } from './layout.js';
|
|
3
|
+
export { githubNewRepositoryUrl, githubRepositorySlug, type GitHubNewRepositoryOptions, } from './new-repo.js';
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/crowdy-studio/github/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,GACjC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,QAAQ,EACR,oBAAoB,EACpB,oBAAoB,EACpB,SAAS,EACT,SAAS,GACV,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/crowdy-studio/github/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,GACjC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,QAAQ,EACR,oBAAoB,EACpB,oBAAoB,EACpB,SAAS,EACT,SAAS,GACV,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,0BAA0B,GAChC,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The GitHub "new repository" page, prefilled for a Crowdy Studio mod.
|
|
3
|
+
*
|
|
4
|
+
* The Crowdy Studio GitHub App holds installation tokens only, which can act
|
|
5
|
+
* on repositories already granted to the installation and can never create
|
|
6
|
+
* one — that needs a user token this platform does not mint. So "create a
|
|
7
|
+
* repository" is the modder's own click on GitHub; this makes it a short one:
|
|
8
|
+
* owner, name and description arrive prefilled, visibility defaults to
|
|
9
|
+
* private. After GitHub returns, the bind form is prefilled with the same
|
|
10
|
+
* `owner/name` and PUSH_PROJECT seeds `crowdy.json`, a README and the files.
|
|
11
|
+
*
|
|
12
|
+
* GitHub's `/new` page reads `owner`, `name`, `description` and `visibility`
|
|
13
|
+
* from the query string; unknown or refused values fall back to its defaults,
|
|
14
|
+
* so a stale parameter never breaks the page.
|
|
15
|
+
*/
|
|
16
|
+
export interface GitHubNewRepositoryOptions {
|
|
17
|
+
/** Account the repository should be created under (the connected login). */
|
|
18
|
+
owner?: string | null;
|
|
19
|
+
/** Repository name; slugged to GitHub's grammar (`[A-Za-z0-9._-]`). */
|
|
20
|
+
name: string;
|
|
21
|
+
description?: string | null;
|
|
22
|
+
visibility?: 'private' | 'public';
|
|
23
|
+
}
|
|
24
|
+
/** GitHub repository-name grammar: letters, digits, `.`, `-`, `_`; at most 100 chars. */
|
|
25
|
+
export declare function githubRepositorySlug(value: string): string;
|
|
26
|
+
export declare function githubNewRepositoryUrl(options: GitHubNewRepositoryOptions): string;
|
|
27
|
+
//# sourceMappingURL=new-repo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-repo.d.ts","sourceRoot":"","sources":["../../../src/crowdy-studio/github/new-repo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,0BAA0B;IACzC,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CACnC;AAED,yFAAyF;AACzF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAiB1D;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,0BAA0B,GAAG,MAAM,CAOlF"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The GitHub "new repository" page, prefilled for a Crowdy Studio mod.
|
|
3
|
+
*
|
|
4
|
+
* The Crowdy Studio GitHub App holds installation tokens only, which can act
|
|
5
|
+
* on repositories already granted to the installation and can never create
|
|
6
|
+
* one — that needs a user token this platform does not mint. So "create a
|
|
7
|
+
* repository" is the modder's own click on GitHub; this makes it a short one:
|
|
8
|
+
* owner, name and description arrive prefilled, visibility defaults to
|
|
9
|
+
* private. After GitHub returns, the bind form is prefilled with the same
|
|
10
|
+
* `owner/name` and PUSH_PROJECT seeds `crowdy.json`, a README and the files.
|
|
11
|
+
*
|
|
12
|
+
* GitHub's `/new` page reads `owner`, `name`, `description` and `visibility`
|
|
13
|
+
* from the query string; unknown or refused values fall back to its defaults,
|
|
14
|
+
* so a stale parameter never breaks the page.
|
|
15
|
+
*/
|
|
16
|
+
/** GitHub repository-name grammar: letters, digits, `.`, `-`, `_`; at most 100 chars. */
|
|
17
|
+
export function githubRepositorySlug(value) {
|
|
18
|
+
let out = '';
|
|
19
|
+
let dash = false;
|
|
20
|
+
for (const ch of value.trim().toLowerCase()) {
|
|
21
|
+
const code = ch.charCodeAt(0);
|
|
22
|
+
const ok = (code >= 97 && code <= 122) || (code >= 48 && code <= 57) || ch === '.' || ch === '_' || ch === '-';
|
|
23
|
+
if (ok) {
|
|
24
|
+
out += ch;
|
|
25
|
+
dash = ch === '-';
|
|
26
|
+
}
|
|
27
|
+
else if (!dash && out.length > 0) {
|
|
28
|
+
out += '-';
|
|
29
|
+
dash = true;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
out = out.replace(/^[-._]+|[-._]+$/g, '');
|
|
33
|
+
return out.slice(0, 100) || 'crowdy-mod';
|
|
34
|
+
}
|
|
35
|
+
export function githubNewRepositoryUrl(options) {
|
|
36
|
+
const params = new URLSearchParams();
|
|
37
|
+
if (options.owner)
|
|
38
|
+
params.set('owner', options.owner);
|
|
39
|
+
params.set('name', githubRepositorySlug(options.name));
|
|
40
|
+
if (options.description?.trim())
|
|
41
|
+
params.set('description', options.description.trim().slice(0, 350));
|
|
42
|
+
params.set('visibility', options.visibility ?? 'private');
|
|
43
|
+
return `https://github.com/new?${params.toString()}`;
|
|
44
|
+
}
|
|
@@ -30,6 +30,13 @@ export interface CrowdyStudioGitHubStatus {
|
|
|
30
30
|
branch: string | null;
|
|
31
31
|
/** Commit the project mirror is at; null when the project is not bound. */
|
|
32
32
|
githubSha: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* `all` or `selected`: which repositories the installation covers. A
|
|
35
|
+
* repository created on GitHub afterwards must be added to a `selected`
|
|
36
|
+
* installation (at `installUrl`) before it can be bound. Null when not
|
|
37
|
+
* connected.
|
|
38
|
+
*/
|
|
39
|
+
repositorySelection: 'all' | 'selected' | null;
|
|
33
40
|
installUrl: string | null;
|
|
34
41
|
}
|
|
35
42
|
export interface CrowdyStudioGitHubRepo {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../../src/crowdy-studio/github/transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,E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OlC,sFAAsF;IAChF,UAAU,CACd,KAAK,EAAE,8BAA8B,GAAG;QACtC,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,GACA,OAAO,CAAC,wBAAwB,CAAC;CAOrC"}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* plays), never on one pointed at the shared origin.
|
|
21
21
|
*/
|
|
22
22
|
const STATUS_FIELDS = `
|
|
23
|
-
configured connected accountLogin accountType owner repo branch githubSha installUrl
|
|
23
|
+
configured connected accountLogin accountType owner repo branch githubSha repositorySelection installUrl
|
|
24
24
|
`;
|
|
25
25
|
const STATUS = `
|
|
26
26
|
query CrowdyStudioGitHubStatus($appId: BigInt, $projectId: String) {
|
package/dist/default-origin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED — do not edit. The operator tooling's
|
|
3
|
-
* `sync-client-origins.mjs --write --tier
|
|
3
|
+
* `sync-client-origins.mjs --write --tier dev` writes this file, and
|
|
4
4
|
* `check-sdk-default-origin.mjs` refuses it when it names the wrong tier or a
|
|
5
5
|
* host that declaration does not carry. Regenerate; never hand-edit.
|
|
6
6
|
*
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
* than no default at all. Every fallback this SDK ever removed named a host that
|
|
11
11
|
* was already dead. A generated file plus a gate is what makes this one different.
|
|
12
12
|
*
|
|
13
|
-
* Source: the operator's per-tier public CK API origin declaration, tier '
|
|
13
|
+
* Source: the operator's per-tier public CK API origin declaration, tier 'dev'
|
|
14
14
|
*/
|
|
15
15
|
/** The tier this build of the SDK is published for. */
|
|
16
|
-
export declare const CROWDY_DEFAULT_TIER = "
|
|
16
|
+
export declare const CROWDY_DEFAULT_TIER = "dev";
|
|
17
17
|
/** The public CK API origin for that tier. */
|
|
18
|
-
export declare const CROWDY_DEFAULT_HTTP_ORIGIN = "https://ck.
|
|
18
|
+
export declare const CROWDY_DEFAULT_HTTP_ORIGIN = "https://ck.dev.crowdedkingdoms.com";
|
|
19
19
|
/** The same host over WebSocket. A scheme is composed; a hostname is looked up. */
|
|
20
|
-
export declare const CROWDY_DEFAULT_WS_ORIGIN = "wss://ck.
|
|
20
|
+
export declare const CROWDY_DEFAULT_WS_ORIGIN = "wss://ck.dev.crowdedkingdoms.com";
|
|
21
21
|
/** The bare hostname, for callers that need to compare rather than dial. */
|
|
22
|
-
export declare const CROWDY_DEFAULT_HOST = "ck.
|
|
22
|
+
export declare const CROWDY_DEFAULT_HOST = "ck.dev.crowdedkingdoms.com";
|
|
23
23
|
//# sourceMappingURL=default-origin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-origin.d.ts","sourceRoot":"","sources":["../src/default-origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"default-origin.d.ts","sourceRoot":"","sources":["../src/default-origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,QAAQ,CAAC;AAEzC,8CAA8C;AAC9C,eAAO,MAAM,0BAA0B,uCAAuC,CAAC;AAE/E,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,qCAAqC,CAAC;AAE3E,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,+BAA+B,CAAC"}
|
package/dist/default-origin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED — do not edit. The operator tooling's
|
|
3
|
-
* `sync-client-origins.mjs --write --tier
|
|
3
|
+
* `sync-client-origins.mjs --write --tier dev` writes this file, and
|
|
4
4
|
* `check-sdk-default-origin.mjs` refuses it when it names the wrong tier or a
|
|
5
5
|
* host that declaration does not carry. Regenerate; never hand-edit.
|
|
6
6
|
*
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
* than no default at all. Every fallback this SDK ever removed named a host that
|
|
11
11
|
* was already dead. A generated file plus a gate is what makes this one different.
|
|
12
12
|
*
|
|
13
|
-
* Source: the operator's per-tier public CK API origin declaration, tier '
|
|
13
|
+
* Source: the operator's per-tier public CK API origin declaration, tier 'dev'
|
|
14
14
|
*/
|
|
15
15
|
/** The tier this build of the SDK is published for. */
|
|
16
|
-
export const CROWDY_DEFAULT_TIER = '
|
|
16
|
+
export const CROWDY_DEFAULT_TIER = 'dev';
|
|
17
17
|
/** The public CK API origin for that tier. */
|
|
18
|
-
export const CROWDY_DEFAULT_HTTP_ORIGIN = 'https://ck.
|
|
18
|
+
export const CROWDY_DEFAULT_HTTP_ORIGIN = 'https://ck.dev.crowdedkingdoms.com';
|
|
19
19
|
/** The same host over WebSocket. A scheme is composed; a hostname is looked up. */
|
|
20
|
-
export const CROWDY_DEFAULT_WS_ORIGIN = 'wss://ck.
|
|
20
|
+
export const CROWDY_DEFAULT_WS_ORIGIN = 'wss://ck.dev.crowdedkingdoms.com';
|
|
21
21
|
/** The bare hostname, for callers that need to compare rather than dial. */
|
|
22
|
-
export const CROWDY_DEFAULT_HOST = 'ck.
|
|
22
|
+
export const CROWDY_DEFAULT_HOST = 'ck.dev.crowdedkingdoms.com';
|