create-eigen-game 0.13.0 → 0.13.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/README.md +1 -1
- package/dist/cli.d.ts +1 -2
- package/dist/cli.js +466 -378
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +119 -108
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -27
- package/dist/src-q9BxESYC.js +833 -0
- package/dist/src-q9BxESYC.js.map +1 -0
- package/package.json +8 -8
- package/src/cli.ts +437 -0
- package/{dist/engine-range.d.ts → src/engine-range.ts} +23 -2
- package/src/index.ts +971 -0
- package/src/link-firebase.ts +70 -0
- package/src/prompt.ts +182 -0
- package/src/summary.ts +86 -0
- package/templates/app-overlay/lib/game/README.md +1 -1
- package/templates/app-overlay/lib/main.dart.template +8 -5
- package/templates/project/README.md +2 -2
- package/templates/project/package.json +3 -3
- package/templates/worker/.dev.vars.example +1 -0
- package/templates/worker/README.md +5 -2
- package/templates/worker/src/module/v1.ts +1 -0
- package/dist/chunk-L7EVXO3Y.js +0 -439
- package/dist/chunk-L7EVXO3Y.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/link-firebase.d.ts +0 -28
- package/dist/prompt.d.ts +0 -79
- package/dist/summary.d.ts +0 -26
package/dist/prompt.d.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Every question this CLI asks, in one module so the wording lives together
|
|
3
|
-
* and can be asserted. `cli.ts` is the bin entry and runs `main` on import,
|
|
4
|
-
* which makes anything defined there untestable.
|
|
5
|
-
*
|
|
6
|
-
* The organization prompt is the reason this drops to `@clack/core` rather
|
|
7
|
-
* than using `@clack/prompts`' `text`. The suffix: `flutter create --org X
|
|
8
|
-
* --project-name Y` derives `X.Y`, so the organization is a *prefix*, and the
|
|
9
|
-
* reliable way to say so is to render the rest of the identifier, dimmed,
|
|
10
|
-
* while it is being typed. `text` has no hook for that; a custom `TextPrompt`
|
|
11
|
-
* render returns a string, so it does.
|
|
12
|
-
*
|
|
13
|
-
* Everything else comes from `@clack/prompts` rather than being drawn here.
|
|
14
|
-
* Its symbols are exported for exactly this, and they are not constants: each
|
|
15
|
-
* falls back to ASCII on a terminal that cannot show the box-drawing
|
|
16
|
-
* characters, which a hand-typed `│` cannot do.
|
|
17
|
-
*/
|
|
18
|
-
import type { Readable, Writable } from "node:stream";
|
|
19
|
-
import type { PackageManager } from "./index.js";
|
|
20
|
-
/**
|
|
21
|
-
* Where a question reads its answer from. Parameters for the same reason every
|
|
22
|
-
* clack prompt takes them: a prompt is otherwise the one part of a CLI that
|
|
23
|
-
* cannot be driven by a test.
|
|
24
|
-
*/
|
|
25
|
-
export interface Io {
|
|
26
|
-
input?: Readable;
|
|
27
|
-
output?: Writable;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Two or more dot-separated Java identifiers. `flutter create --org` accepts
|
|
31
|
-
* anything and defers the complaint to Gradle, which reports it as a manifest
|
|
32
|
-
* error in a generated file, so `com.example-games` costs a full scaffold and
|
|
33
|
-
* a first build before anyone learns that a hyphen is not legal in a package
|
|
34
|
-
* segment.
|
|
35
|
-
*/
|
|
36
|
-
export declare const ORG: RegExp;
|
|
37
|
-
/** The default, which an empty answer accepts. */
|
|
38
|
-
export declare const DEFAULT_ORG = "com.example";
|
|
39
|
-
/** A `com.acme.chess` answer to a game called `chess`, which yields `com.acme.chess.chess`. */
|
|
40
|
-
export declare function repeatsGameName(org: string, game: string): boolean;
|
|
41
|
-
/** The organization implied by an answer that already ends in the game name. */
|
|
42
|
-
export declare function withoutGameName(org: string): string | undefined;
|
|
43
|
-
/**
|
|
44
|
-
* Asks, with the game name rendered dimmed after the cursor so the shape of
|
|
45
|
-
* the answer is visible while it is being given.
|
|
46
|
-
*
|
|
47
|
-
* Returns the organization, `undefined` for the default, or `null` when
|
|
48
|
-
* cancelled.
|
|
49
|
-
*
|
|
50
|
-
* `input` and `output` default to this process's, and are parameters for the
|
|
51
|
-
* same reason every clack prompt takes them: a prompt is otherwise the one
|
|
52
|
-
* part of a CLI that cannot be driven by a test.
|
|
53
|
-
*/
|
|
54
|
-
export declare function askForOrg(game: string, registering: boolean, io?: Io): Promise<string | undefined | null>;
|
|
55
|
-
/**
|
|
56
|
-
* Asked only when {@link firebaseReadiness} found something missing, and
|
|
57
|
-
* defaulted to "no" because the honest answer usually is: the tools are two
|
|
58
|
-
* commands away, and the alternative is an app that throws at launch until
|
|
59
|
-
* they are installed anyway.
|
|
60
|
-
*/
|
|
61
|
-
export declare function askToScaffoldWithoutFirebase(io?: Io): Promise<boolean | null>;
|
|
62
|
-
/** Defaulted to yes: the scaffold is a few hundred generated files, and a commit is what makes the first `git diff` the first game change rather than all of them. */
|
|
63
|
-
export declare function askForGit(io?: Io): Promise<boolean | null>;
|
|
64
|
-
/**
|
|
65
|
-
* Defaulted to no, and the hint says why rather than leaving it as an
|
|
66
|
-
* arbitrary-looking choice: `release.yml` needs an upload keystore and a Play
|
|
67
|
-
* service account, so a project that takes the workflows before it has either
|
|
68
|
-
* gets a red `main` from its first push.
|
|
69
|
-
*/
|
|
70
|
-
export declare function askForWorkflows(io?: Io): Promise<boolean | null>;
|
|
71
|
-
/**
|
|
72
|
-
* The package manager, asked only when nothing else could say.
|
|
73
|
-
*
|
|
74
|
-
* `npm create` and `pnpm create` both set `npm_config_user_agent`, so this is
|
|
75
|
-
* reached by the paths that do not: a global install, or running the binary
|
|
76
|
-
* directly. Rare, but it decides what every generated script says, and the old
|
|
77
|
-
* silent fallback to pnpm was a guess printed into a project's package.json.
|
|
78
|
-
*/
|
|
79
|
-
export declare function askForPackageManager(io?: Io): Promise<PackageManager | null>;
|
package/dist/summary.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The closing summary, and the only output of a scaffold anyone reads.
|
|
3
|
-
*
|
|
4
|
-
* A run drives several tools with plenty to say, so where the project went,
|
|
5
|
-
* what to edit, and what to run are worth restating at the bottom. Returned in
|
|
6
|
-
* pieces rather than as one block, because the CLI renders each in a different
|
|
7
|
-
* shape: the outcomes as status lines, the commands as a boxed note, the
|
|
8
|
-
* destination as the closing line.
|
|
9
|
-
*
|
|
10
|
-
* Its own module so it can be asserted: `cli.ts` is the bin entry and runs
|
|
11
|
-
* `main` on import, which makes anything defined there untestable. The package
|
|
12
|
-
* `exports` map does not expose this, so it is internal despite being
|
|
13
|
-
* importable by the tests.
|
|
14
|
-
*/
|
|
15
|
-
import type { PackageManager, ScaffoldResult } from "./index.js";
|
|
16
|
-
export interface Summary {
|
|
17
|
-
/** What became of the repository and of Firebase, when there is something to say. */
|
|
18
|
-
status: string[];
|
|
19
|
-
/** The commands worth having, as one block. */
|
|
20
|
-
next: string;
|
|
21
|
-
/** One-line asides, after the block. */
|
|
22
|
-
footnotes: string[];
|
|
23
|
-
/** The closing line. */
|
|
24
|
-
headline: string;
|
|
25
|
-
}
|
|
26
|
-
export declare function summarise(result: ScaffoldResult, manager: PackageManager, workflows: boolean): Summary;
|