vibedgames 0.9.0 → 0.10.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 +3 -2
- package/assets/align-framing.py +242 -0
- package/assets/render-model.py +406 -0
- package/assets/tilemap-editor.html +630 -0
- package/dist/THIRD_PARTY_NOTICES.txt +2 -2
- package/dist/{chunk-56OY4TEP.js → chunk-2SBBKY5C.js} +1361 -4493
- package/dist/{chunk-FC233UKH.js → chunk-2ZKS7V72.js} +16 -16
- package/dist/chunk-37LLKM73.js +124 -0
- package/dist/{chunk-BMTHAVMS.js → chunk-3HGBIUM5.js} +22 -19
- package/dist/chunk-3UGGMFJJ.js +22 -0
- package/dist/{chunk-3HUWAJQH.js → chunk-42K3BJJH.js} +93 -76
- package/dist/{chunk-ST5FC2W3.js → chunk-43P4U7CB.js} +20 -11
- package/dist/chunk-4RYTTD4D.js +53 -0
- package/dist/{chunk-WSRIF6K4.js → chunk-4UU622RK.js} +5 -4
- package/dist/chunk-52E6EKZV.js +72 -0
- package/dist/chunk-6IUFHPMV.js +62 -0
- package/dist/chunk-6KXXZXSO.js +475 -0
- package/dist/chunk-72KHWZMN.js +87 -0
- package/dist/{chunk-ZCYWDKYP.js → chunk-A556KALN.js} +14 -13
- package/dist/{chunk-UFR6G6BL.js → chunk-ABTUEIRC.js} +554 -254
- package/dist/chunk-ALPTHSUT.js +132 -0
- package/dist/{chunk-PEUP4MZR.js → chunk-AWJNAGPE.js} +6 -3
- package/dist/chunk-BJAN3RMY.js +48 -0
- package/dist/{chunk-HNRVSBRK.js → chunk-BN3Q7UEC.js} +20 -17
- package/dist/chunk-BZOMEG3X.js +412 -0
- package/dist/{chunk-ZYCSYJWX.js → chunk-COSLGSVO.js} +14 -24
- package/dist/{chunk-KZBZNTM4.js → chunk-CTY2WZQK.js} +9 -13
- package/dist/chunk-DH6WPL3X.js +47 -0
- package/dist/chunk-DPLFCKXP.js +80 -0
- package/dist/{chunk-K2U7L4RU.js → chunk-E3FJUPLT.js} +15 -21
- package/dist/chunk-E7NDOZ27.js +428 -0
- package/dist/{chunk-TBQ5BU3Q.js → chunk-F42QKWBB.js} +18 -18
- package/dist/chunk-F4J6XCHT.js +73 -0
- package/dist/chunk-FB3UDZAV.js +168 -0
- package/dist/chunk-FJXPMA63.js +48 -0
- package/dist/chunk-FNJL6Z5C.js +71 -0
- package/dist/chunk-G63MXDX2.js +45 -0
- package/dist/{chunk-VFFOT7KD.js → chunk-G66HRVDW.js} +1 -1
- package/dist/{chunk-AXTLPJ2F.js → chunk-H2C4QUTG.js} +8 -7
- package/dist/{chunk-H3IPLBXQ.js → chunk-HRKVAXNN.js} +17 -14
- package/dist/chunk-HSCTPDEU.js +126 -0
- package/dist/{chunk-UXCWSWWX.js → chunk-HSMG6U7J.js} +8 -7
- package/dist/chunk-I5LELJSK.js +22 -0
- package/dist/{chunk-7CXMMC5S.js → chunk-JN4WZCR7.js} +5 -4
- package/dist/{chunk-7QZSDU52.js → chunk-K36EOII3.js} +5 -4
- package/dist/chunk-KLFBAFXD.js +25 -0
- package/dist/{chunk-355VG7EO.js → chunk-LONQWRTR.js} +107 -77
- package/dist/{chunk-Z5TFZQ5U.js → chunk-LORGE2NB.js} +68 -62
- package/dist/{chunk-LY2GQ32S.js → chunk-MEAO33XW.js} +22 -20
- package/dist/{chunk-OD2MNYXD.js → chunk-MR5KIFI7.js} +23 -22
- package/dist/{chunk-2VUUMXAQ.js → chunk-N2UHAQXC.js} +18 -11
- package/dist/chunk-NG2X3SMF.js +91 -0
- package/dist/chunk-OFJIG4K3.js +6482 -0
- package/dist/chunk-P74GTK23.js +91 -0
- package/dist/chunk-PKM3JOKQ.js +62 -0
- package/dist/{chunk-NDHXM4PL.js → chunk-Q3XQPNF6.js} +12 -12
- package/dist/{chunk-RXHTGX7C.js → chunk-Q5NZNXJE.js} +6 -10
- package/dist/chunk-QEKVZ7BX.js +57 -0
- package/dist/chunk-QNWCBPVO.js +215 -0
- package/dist/{chunk-US6QZICZ.js → chunk-RPJR3S5S.js} +32 -18
- package/dist/chunk-RPSUFZAG.js +3307 -0
- package/dist/chunk-RRI23NK2.js +40 -0
- package/dist/{chunk-6EWHKL7Z.js → chunk-SXYQL4GK.js} +7 -6
- package/dist/{chunk-ZI6PKVXG.js → chunk-TMPBGXT4.js} +6 -5
- package/dist/{chunk-UZM6OSW5.js → chunk-UPHB5HWO.js} +15 -13
- package/dist/chunk-UTSSDFQL.js +64 -0
- package/dist/chunk-V5ADM3WC.js +741 -0
- package/dist/{chunk-25BAMW5X.js → chunk-VIEKOGKG.js} +18 -2
- package/dist/chunk-VUV5U4J5.js +117 -0
- package/dist/{chunk-LXS3NJYD.js → chunk-VZEJ2ZHE.js} +14 -15
- package/dist/chunk-W2QPNAZ3.js +58 -0
- package/dist/chunk-YLUB6252.js +45 -0
- package/dist/{chunk-Z4Z24FWO.js → chunk-YNCYMWER.js} +8 -5
- package/dist/chunk-YXOGRERG.js +91 -0
- package/dist/index.js +39 -36
- package/package.json +31 -16
- package/templates/none/src/main.ts +4 -0
- package/templates/none/vite.config.ts +0 -2
- package/templates/phaser/src/main.ts +0 -1
- package/templates/phaser/src/scenes/game-scene.ts +10 -8
- package/templates/phaser/vite.config.ts +0 -2
- package/templates/react-r3f/src/app.tsx +3 -1
- package/templates/react-r3f/src/main.tsx +1 -0
- package/templates/react-r3f/vite.config.ts +0 -2
- package/templates/threejs/src/main.ts +10 -1
- package/templates/threejs/vite.config.ts +0 -2
- package/LICENSE +0 -21
- package/dist/chunk-J6PKNPI2.js +0 -26
|
@@ -4,35 +4,36 @@ import { fileURLToPath as __fileURLToPath } from "node:url";
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
assertKnownFlags
|
|
9
|
+
} from "./chunk-RZ4DIJQW.js";
|
|
7
10
|
import {
|
|
8
11
|
authErrorCode,
|
|
9
12
|
createClient
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-Z4Z24FWO.js";
|
|
13
|
-
import "./chunk-PEUP4MZR.js";
|
|
13
|
+
} from "./chunk-CTY2WZQK.js";
|
|
14
|
+
import "./chunk-E3FJUPLT.js";
|
|
14
15
|
import {
|
|
15
16
|
getToken
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-Q5NZNXJE.js";
|
|
17
18
|
import {
|
|
18
19
|
outputArgs,
|
|
19
20
|
writeStructured
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-COSLGSVO.js";
|
|
21
22
|
import {
|
|
22
|
-
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
defineCommand
|
|
24
|
+
} from "./chunk-MBXCVCC4.js";
|
|
24
25
|
import {
|
|
25
26
|
consola
|
|
26
27
|
} from "./chunk-D2RF35HJ.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
import "./chunk-YNCYMWER.js";
|
|
29
|
+
import "./chunk-AWJNAGPE.js";
|
|
30
|
+
import "./chunk-RPSUFZAG.js";
|
|
31
|
+
import "./chunk-2SBBKY5C.js";
|
|
31
32
|
import "./chunk-GKDUYJ7R.js";
|
|
32
33
|
|
|
33
34
|
// src/commands/deployments.ts
|
|
34
35
|
var requireLogin = () => {
|
|
35
|
-
if (
|
|
36
|
+
if ((getToken() ?? "") === "") {
|
|
36
37
|
consola.warn("Not logged in. Run `vg login` to authenticate.");
|
|
37
38
|
process.exit(1);
|
|
38
39
|
}
|
|
@@ -123,7 +124,7 @@ var deleteCommand = defineCommand({
|
|
|
123
124
|
consola.error(`You have no game "${args.slug}". List yours with \`vg deployments\`.`);
|
|
124
125
|
process.exit(1);
|
|
125
126
|
}
|
|
126
|
-
if (
|
|
127
|
+
if (args.yes !== true) {
|
|
127
128
|
if (!process.stdin.isTTY) {
|
|
128
129
|
consola.error(`Deleting is permanent: pass --yes to delete ${args.slug}.`);
|
|
129
130
|
process.exit(2);
|
|
@@ -132,7 +133,7 @@ var deleteCommand = defineCommand({
|
|
|
132
133
|
`Permanently delete ${args.slug} and all of its files?`,
|
|
133
134
|
{ type: "confirm" }
|
|
134
135
|
);
|
|
135
|
-
if (confirmed
|
|
136
|
+
if (!confirmed) {
|
|
136
137
|
consola.info("Nothing deleted.");
|
|
137
138
|
return;
|
|
138
139
|
}
|
|
@@ -153,7 +154,6 @@ var deleteCommand = defineCommand({
|
|
|
153
154
|
}
|
|
154
155
|
});
|
|
155
156
|
var deploymentsCommand = defineCommand({
|
|
156
|
-
// Declared so citty skips `--field <value>` when looking for a subcommand.
|
|
157
157
|
args: outputArgs,
|
|
158
158
|
default: "list",
|
|
159
159
|
meta: {
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from "node:module";
|
|
2
|
+
import { dirname as __pathDirname } from "node:path";
|
|
3
|
+
import { fileURLToPath as __fileURLToPath } from "node:url";
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
var __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __pathDirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
fail,
|
|
9
|
+
failUsage,
|
|
10
|
+
getFlag,
|
|
11
|
+
getInt,
|
|
12
|
+
getNumber,
|
|
13
|
+
getString,
|
|
14
|
+
main,
|
|
15
|
+
parseArgs,
|
|
16
|
+
parseColor,
|
|
17
|
+
processSheet,
|
|
18
|
+
toPythonJson
|
|
19
|
+
} from "./chunk-OFJIG4K3.js";
|
|
20
|
+
import "./chunk-2SBBKY5C.js";
|
|
21
|
+
import "./chunk-GKDUYJ7R.js";
|
|
22
|
+
|
|
23
|
+
// src/commands/asset/process-sheet.ts
|
|
24
|
+
import { existsSync } from "node:fs";
|
|
25
|
+
var run = (argv) => {
|
|
26
|
+
main(() => {
|
|
27
|
+
const args = parseArgs([...argv], {
|
|
28
|
+
booleans: ["json", "no-pixel-snap", "no-qc", "recover"],
|
|
29
|
+
values: [
|
|
30
|
+
"action",
|
|
31
|
+
"char-fill",
|
|
32
|
+
"chroma",
|
|
33
|
+
"cols",
|
|
34
|
+
"frames",
|
|
35
|
+
"out-dir",
|
|
36
|
+
"rows",
|
|
37
|
+
"snap-k-colors"
|
|
38
|
+
]
|
|
39
|
+
});
|
|
40
|
+
const readOptions = () => {
|
|
41
|
+
const [board = ""] = args.positionals;
|
|
42
|
+
if (board === "") {
|
|
43
|
+
failUsage("a pose board PNG is required");
|
|
44
|
+
}
|
|
45
|
+
if (!existsSync(board)) {
|
|
46
|
+
fail(`board not found: ${board}`);
|
|
47
|
+
}
|
|
48
|
+
const action2 = getString(args, "action") ?? "";
|
|
49
|
+
if (action2 === "") {
|
|
50
|
+
failUsage("--action is required");
|
|
51
|
+
}
|
|
52
|
+
const outDir = getString(args, "out-dir") ?? "";
|
|
53
|
+
if (outDir === "") {
|
|
54
|
+
failUsage("--out-dir is required");
|
|
55
|
+
}
|
|
56
|
+
const rows = getInt(args, "rows", 0);
|
|
57
|
+
const cols = getInt(args, "cols", 0);
|
|
58
|
+
if (rows <= 0 || cols <= 0) {
|
|
59
|
+
fail("--rows and --cols must be positive integers");
|
|
60
|
+
}
|
|
61
|
+
const charFill = getNumber(args, "char-fill", 0.5);
|
|
62
|
+
if (!(charFill > 0 && charFill <= 1)) {
|
|
63
|
+
fail("--char-fill must be in (0, 1]");
|
|
64
|
+
}
|
|
65
|
+
const snapKColors = getInt(args, "snap-k-colors", 16);
|
|
66
|
+
if (snapKColors <= 0) {
|
|
67
|
+
fail("--snap-k-colors must be a positive integer");
|
|
68
|
+
}
|
|
69
|
+
const requested = getString(args, "frames");
|
|
70
|
+
if (requested !== void 0 && getInt(args, "frames", 0) <= 0) {
|
|
71
|
+
fail("--frames must be a positive integer");
|
|
72
|
+
}
|
|
73
|
+
const frames2 = requested === void 0 ? void 0 : getInt(args, "frames", 0);
|
|
74
|
+
return { action: action2, board, charFill, cols, frames: frames2, outDir, rows, snapKColors };
|
|
75
|
+
};
|
|
76
|
+
const [chromaR, chromaG, chromaB] = parseColor(getString(args, "chroma") ?? "#00FF00");
|
|
77
|
+
const result = processSheet({
|
|
78
|
+
...readOptions(),
|
|
79
|
+
chroma: [chromaR, chromaG, chromaB],
|
|
80
|
+
pixelSnap: !getFlag(args, "no-pixel-snap"),
|
|
81
|
+
qc: !getFlag(args, "no-qc"),
|
|
82
|
+
recover: getFlag(args, "recover"),
|
|
83
|
+
warn: (message) => {
|
|
84
|
+
process.stderr.write(`[process_sheet] warning: ${message}
|
|
85
|
+
`);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
const { action, fps, frames, gif, qc, spritesheet } = result;
|
|
89
|
+
if (getFlag(args, "json")) {
|
|
90
|
+
const summary = {
|
|
91
|
+
action,
|
|
92
|
+
fps,
|
|
93
|
+
frames,
|
|
94
|
+
gif,
|
|
95
|
+
path: "image",
|
|
96
|
+
pixelSnap: result.pixelSnap,
|
|
97
|
+
qc: qc ? qc.verdict : "skipped",
|
|
98
|
+
runtimeFrames: result.runtimeFrames,
|
|
99
|
+
slicing: result.slicing,
|
|
100
|
+
spritesheet
|
|
101
|
+
};
|
|
102
|
+
console.log(toPythonJson(qc ? { ...summary, qcChecks: qc.checks } : summary));
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const lines = [
|
|
106
|
+
`
|
|
107
|
+
=== ${action} (image): ${frames} frames @ ${fps}fps ===`,
|
|
108
|
+
` sheet: ${spritesheet}`,
|
|
109
|
+
` gif: ${gif}`
|
|
110
|
+
];
|
|
111
|
+
if (qc) {
|
|
112
|
+
lines.push(` qc: [${qc.verdict.toUpperCase()}]`);
|
|
113
|
+
for (const check of qc.checks) {
|
|
114
|
+
lines.push(
|
|
115
|
+
` ${check.severity === "warn" ? "!" : "?"} ${check.check}: frames [${check.frames.join(", ")}] \u2014 ${check.detail}`
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
console.log(lines.join("\n"));
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
export {
|
|
123
|
+
run
|
|
124
|
+
};
|
|
@@ -4,32 +4,33 @@ import { fileURLToPath as __fileURLToPath } from "node:url";
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import {
|
|
8
|
-
So
|
|
9
|
-
} from "./chunk-VFFOT7KD.js";
|
|
10
|
-
import {
|
|
11
|
-
PKG_NAME,
|
|
12
|
-
detectPackageManager,
|
|
13
|
-
globalInstallArgs,
|
|
14
|
-
globalInstallCommand
|
|
15
|
-
} from "./chunk-PEUP4MZR.js";
|
|
16
7
|
import {
|
|
17
8
|
isMissingCommand,
|
|
18
9
|
run
|
|
19
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-F42QKWBB.js";
|
|
11
|
+
import {
|
|
12
|
+
So
|
|
13
|
+
} from "./chunk-G66HRVDW.js";
|
|
20
14
|
import {
|
|
21
15
|
assertKnownFlags
|
|
22
16
|
} from "./chunk-RZ4DIJQW.js";
|
|
17
|
+
import {
|
|
18
|
+
defineCommand
|
|
19
|
+
} from "./chunk-MBXCVCC4.js";
|
|
23
20
|
import {
|
|
24
21
|
consola
|
|
25
22
|
} from "./chunk-D2RF35HJ.js";
|
|
26
23
|
import {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
PKG_NAME,
|
|
25
|
+
detectPackageManager,
|
|
26
|
+
globalInstallArgs,
|
|
27
|
+
globalInstallCommand
|
|
28
|
+
} from "./chunk-AWJNAGPE.js";
|
|
30
29
|
import {
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
isJsonObject,
|
|
31
|
+
isJsonString,
|
|
32
|
+
parseJson
|
|
33
|
+
} from "./chunk-RPSUFZAG.js";
|
|
33
34
|
|
|
34
35
|
// src/commands/init.ts
|
|
35
36
|
import path2 from "node:path";
|
|
@@ -132,16 +133,18 @@ var SKILL_NAME = /^[a-z0-9][a-z0-9-]*$/u;
|
|
|
132
133
|
var SKIPPED_ENTRIES = /* @__PURE__ */ new Set([".DS_Store", ".git", "__pycache__", "node_modules"]);
|
|
133
134
|
var fetchSkillsSource = async (env = process.env) => {
|
|
134
135
|
const override = env.VG_SKILLS_SOURCE?.trim();
|
|
135
|
-
if (override && !/^https?:\/\//iu.test(override)) {
|
|
136
|
+
if (override !== void 0 && override !== "" && !/^https?:\/\//iu.test(override)) {
|
|
136
137
|
const root = path.resolve(override);
|
|
137
138
|
if (!existsSync(path.join(root, "plugins"))) {
|
|
138
139
|
throw new Error(`VG_SKILLS_SOURCE=${override} has no plugins/ directory.`);
|
|
139
140
|
}
|
|
140
141
|
return { origin: root, root };
|
|
141
142
|
}
|
|
142
|
-
const url = override || SKILLS_TARBALL;
|
|
143
|
+
const url = override === void 0 || override === "" ? SKILLS_TARBALL : override;
|
|
143
144
|
const work = mkdtempSync(path.join(tmpdir(), "vg-skills-"));
|
|
144
|
-
const cleanup = () =>
|
|
145
|
+
const cleanup = () => {
|
|
146
|
+
rmSync(work, { force: true, recursive: true });
|
|
147
|
+
};
|
|
145
148
|
try {
|
|
146
149
|
let res;
|
|
147
150
|
try {
|
|
@@ -192,7 +195,7 @@ var readJson = (file) => {
|
|
|
192
195
|
return null;
|
|
193
196
|
}
|
|
194
197
|
try {
|
|
195
|
-
const value =
|
|
198
|
+
const value = parseJson(readFileSync(file, "utf-8"));
|
|
196
199
|
return value;
|
|
197
200
|
} catch {
|
|
198
201
|
return null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from "node:module";
|
|
2
|
+
import { dirname as __pathDirname } from "node:path";
|
|
3
|
+
import { fileURLToPath as __fileURLToPath } from "node:url";
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
var __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __pathDirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
pythonScript
|
|
9
|
+
} from "./chunk-RRI23NK2.js";
|
|
10
|
+
import "./chunk-5535KDYI.js";
|
|
11
|
+
import "./chunk-D2RF35HJ.js";
|
|
12
|
+
import "./chunk-YNCYMWER.js";
|
|
13
|
+
import "./chunk-AWJNAGPE.js";
|
|
14
|
+
import "./chunk-RPSUFZAG.js";
|
|
15
|
+
import "./chunk-2SBBKY5C.js";
|
|
16
|
+
import "./chunk-GKDUYJ7R.js";
|
|
17
|
+
|
|
18
|
+
// src/commands/asset/align-framing.ts
|
|
19
|
+
var run = pythonScript("align-framing.py");
|
|
20
|
+
export {
|
|
21
|
+
run
|
|
22
|
+
};
|