@evitcastudio/kit 3.2.1 ā 3.2.2
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/lib/bundle/cli/cli.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
3
|
|
|
4
4
|
/*!
|
|
5
|
-
* @evitcastudio/kit@3.2.
|
|
6
|
-
* Compiled Wed, 09 Sep 2026
|
|
5
|
+
* @evitcastudio/kit@3.2.2 git+https://github.com/EvitcaStudio/Kit.git
|
|
6
|
+
* Compiled Wed, 09 Sep 2026 14:01:08 UTC
|
|
7
7
|
* Copyright (c) 2026 Jared Bates, Evitca Studio, "doubleactii"
|
|
8
8
|
*
|
|
9
9
|
* @evitcastudio/kit is licensed under the MIT License.
|
|
@@ -8035,6 +8035,12 @@ async function copyStaticWebFiles(pSourceDir, pDestDir, pBaseDir) {
|
|
|
8035
8035
|
const targetPath = join(pDestDir, relativePath);
|
|
8036
8036
|
await fs.mkdir(dirname(targetPath), { recursive: true });
|
|
8037
8037
|
await fs.copyFile(fullPath, targetPath);
|
|
8038
|
+
if ([".css", ".ico"].includes(ext)) {
|
|
8039
|
+
const rootTargetPath = join(pDestDir, entry.name);
|
|
8040
|
+
if (targetPath !== rootTargetPath && !existsSync(rootTargetPath)) {
|
|
8041
|
+
await fs.copyFile(fullPath, rootTargetPath);
|
|
8042
|
+
}
|
|
8043
|
+
}
|
|
8038
8044
|
}
|
|
8039
8045
|
}
|
|
8040
8046
|
}
|
|
@@ -8270,6 +8276,10 @@ async function processDirectory(pDirectoryPath) {
|
|
|
8270
8276
|
function isValidExtension(pExtension) {
|
|
8271
8277
|
return VALID_EXTENSIONS.includes(pExtension);
|
|
8272
8278
|
}
|
|
8279
|
+
var ENGINE_EXTENSIONS = ["vyint", "vyi", "vym", "vymac"];
|
|
8280
|
+
function isEngineExtension(pExtension) {
|
|
8281
|
+
return ENGINE_EXTENSIONS.includes(pExtension);
|
|
8282
|
+
}
|
|
8273
8283
|
async function mirrorDirectory(pSourceDir, pDestDir) {
|
|
8274
8284
|
const entries = await fs2.readdir(pSourceDir, { withFileTypes: true });
|
|
8275
8285
|
await fs2.mkdir(pDestDir, { recursive: true });
|
|
@@ -8280,7 +8290,7 @@ async function mirrorDirectory(pSourceDir, pDestDir) {
|
|
|
8280
8290
|
await mirrorDirectory(srcPath, destPath);
|
|
8281
8291
|
} else {
|
|
8282
8292
|
const ext = extname2(entry.name).slice(1);
|
|
8283
|
-
if (!
|
|
8293
|
+
if (!isEngineExtension(ext)) {
|
|
8284
8294
|
await fs2.copyFile(srcPath, destPath);
|
|
8285
8295
|
}
|
|
8286
8296
|
}
|
|
@@ -8530,7 +8540,7 @@ async function runBuild() {
|
|
|
8530
8540
|
async function runWatch() {
|
|
8531
8541
|
await runBuild();
|
|
8532
8542
|
console.log(source_default.cyan(`
|
|
8533
|
-
|
|
8543
|
+
Watching for changes in: ${source_default.bold(resourceInDirectory)}`));
|
|
8534
8544
|
let debounceTimer = null;
|
|
8535
8545
|
const triggerRebuild = (pFilename) => {
|
|
8536
8546
|
if (debounceTimer)
|
|
@@ -9658,7 +9668,7 @@ import os2 from "os";
|
|
|
9658
9668
|
// package.json
|
|
9659
9669
|
var package_default = {
|
|
9660
9670
|
name: "@evitcastudio/kit",
|
|
9661
|
-
version: "3.2.
|
|
9671
|
+
version: "3.2.2",
|
|
9662
9672
|
author: "doubleactii 56242467+doubleactii@users.noreply.github.com (https://evitcastudio.com)",
|
|
9663
9673
|
main: "./lib/index.js",
|
|
9664
9674
|
types: "./lib/index.d.ts",
|
|
@@ -9701,7 +9711,7 @@ var package_default = {
|
|
|
9701
9711
|
"build-all": "bun run build-types && bun run build && bun run build-docs"
|
|
9702
9712
|
},
|
|
9703
9713
|
bin: {
|
|
9704
|
-
kit: "lib/
|
|
9714
|
+
kit: "lib/cli-runner.cjs"
|
|
9705
9715
|
},
|
|
9706
9716
|
devDependencies: {
|
|
9707
9717
|
"@eslint/create-config": "1.4.0",
|
|
@@ -10214,7 +10224,7 @@ async function processHost(pOptions = {}) {
|
|
|
10214
10224
|
return { success: false, message };
|
|
10215
10225
|
}
|
|
10216
10226
|
console.log(source_default.cyan(`
|
|
10217
|
-
|
|
10227
|
+
Starting Multiplayer Server from ${source_default.bold(distDir)}...
|
|
10218
10228
|
`));
|
|
10219
10229
|
let serverSettingsPort = port;
|
|
10220
10230
|
const settingsPath = join5(distDir, "settings.json");
|
|
@@ -10269,7 +10279,7 @@ async function processHost(pOptions = {}) {
|
|
|
10269
10279
|
}
|
|
10270
10280
|
});
|
|
10271
10281
|
console.log(source_default.cyan(`
|
|
10272
|
-
|
|
10282
|
+
Kit Game Host Server
|
|
10273
10283
|
`));
|
|
10274
10284
|
console.log(` ${source_default.bold("Local:")} ${source_default.green(`http://localhost:${server.port}`)}`);
|
|
10275
10285
|
if (lanIp !== "localhost") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-bundler.d.ts","sourceRoot":"","sources":["../../src/cli/app-bundler.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9D,MAAM,WAAW,gBAAgB;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;IACtD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC5B,YAAY,EAAE,mBAAmB,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,mBAAmB,CAYvE;
|
|
1
|
+
{"version":3,"file":"app-bundler.d.ts","sourceRoot":"","sources":["../../src/cli/app-bundler.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9D,MAAM,WAAW,gBAAgB;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;IACtD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC5B,YAAY,EAAE,mBAAmB,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,mBAAmB,CAYvE;AA+DD;;;;;;GAMG;AACH,wBAAsB,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,GAAE,gBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,CA6KhI"}
|
package/lib/cli/app-bundler.js
CHANGED
|
@@ -65,6 +65,14 @@ async function copyStaticWebFiles(pSourceDir, pDestDir, pBaseDir) {
|
|
|
65
65
|
const targetPath = join(pDestDir, relativePath);
|
|
66
66
|
await fs.mkdir(dirname(targetPath), { recursive: true });
|
|
67
67
|
await fs.copyFile(fullPath, targetPath);
|
|
68
|
+
// If the asset is located in a nested directory, also provide a copy at destination root
|
|
69
|
+
// to support projects where root HTML references sub-folder styles directly
|
|
70
|
+
if (['.css', '.ico'].includes(ext)) {
|
|
71
|
+
const rootTargetPath = join(pDestDir, entry.name);
|
|
72
|
+
if (targetPath !== rootTargetPath && !existsSync(rootTargetPath)) {
|
|
73
|
+
await fs.copyFile(fullPath, rootTargetPath);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
68
76
|
}
|
|
69
77
|
}
|
|
70
78
|
}
|
package/lib/cli/host.js
CHANGED
|
@@ -46,7 +46,7 @@ export async function processHost(pOptions = {}) {
|
|
|
46
46
|
console.error(chalk.red(`\n[Kit Host] ${message}\n`));
|
|
47
47
|
return { success: false, message };
|
|
48
48
|
}
|
|
49
|
-
console.log(chalk.cyan(`\
|
|
49
|
+
console.log(chalk.cyan(`\nStarting Multiplayer Server from ${chalk.bold(distDir)}...\n`));
|
|
50
50
|
let serverSettingsPort = port;
|
|
51
51
|
const settingsPath = join(distDir, 'settings.json');
|
|
52
52
|
if (existsSync(settingsPath)) {
|
|
@@ -100,7 +100,7 @@ export async function processHost(pOptions = {}) {
|
|
|
100
100
|
return new Response(file);
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
|
-
console.log(chalk.cyan('\
|
|
103
|
+
console.log(chalk.cyan('\nKit Game Host Server\n'));
|
|
104
104
|
console.log(` ${chalk.bold('Local:')} ${chalk.green(`http://localhost:${server.port}`)}`);
|
|
105
105
|
if (lanIp !== 'localhost') {
|
|
106
106
|
console.log(` ${chalk.bold('Network:')} ${chalk.green(`http://${lanIp}:${server.port}`)}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-builder.d.ts","sourceRoot":"","sources":["../../src/cli/resource-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"resource-builder.d.ts","sourceRoot":"","sources":["../../src/cli/resource-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA+gB9C;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCvL"}
|
|
@@ -100,9 +100,22 @@ async function processDirectory(pDirectoryPath) {
|
|
|
100
100
|
function isValidExtension(pExtension) {
|
|
101
101
|
return VALID_EXTENSIONS.includes(pExtension);
|
|
102
102
|
}
|
|
103
|
+
// Engine resource formats handled by Vylocity obfuscation
|
|
104
|
+
const ENGINE_EXTENSIONS = ['vyint', 'vyi', 'vym', 'vymac'];
|
|
105
|
+
/**
|
|
106
|
+
* Checks if a file extension is a Vylocity engine binary/definition format.
|
|
107
|
+
* @param pExtension - The file extension to test.
|
|
108
|
+
* @returns True if the extension is an engine format.
|
|
109
|
+
*/
|
|
110
|
+
function isEngineExtension(pExtension) {
|
|
111
|
+
return ENGINE_EXTENSIONS.includes(pExtension);
|
|
112
|
+
}
|
|
103
113
|
/**
|
|
104
114
|
* Recursively copies a directory to destination, preserving subdirectories and files.
|
|
105
|
-
* Ignores engine resource files that are
|
|
115
|
+
* Ignores engine resource files (vyint, vyi, vym, vymac) that are handled by Vylocity obfuscation,
|
|
116
|
+
* while ensuring media and custom assets (sounds, images, fonts, json) retain their structure.
|
|
117
|
+
* @param pSourceDir - The source directory to copy.
|
|
118
|
+
* @param pDestDir - The target destination directory.
|
|
106
119
|
*/
|
|
107
120
|
async function mirrorDirectory(pSourceDir, pDestDir) {
|
|
108
121
|
const entries = await fs.readdir(pSourceDir, { withFileTypes: true });
|
|
@@ -115,8 +128,8 @@ async function mirrorDirectory(pSourceDir, pDestDir) {
|
|
|
115
128
|
}
|
|
116
129
|
else {
|
|
117
130
|
const ext = extname(entry.name).slice(1);
|
|
118
|
-
//
|
|
119
|
-
if (!
|
|
131
|
+
// Copy all assets except internal Vylocity engine binary formats
|
|
132
|
+
if (!isEngineExtension(ext)) {
|
|
120
133
|
await fs.copyFile(srcPath, destPath);
|
|
121
134
|
}
|
|
122
135
|
}
|
|
@@ -417,7 +430,7 @@ async function runBuild() {
|
|
|
417
430
|
*/
|
|
418
431
|
async function runWatch() {
|
|
419
432
|
await runBuild();
|
|
420
|
-
console.log(chalk.cyan(`\
|
|
433
|
+
console.log(chalk.cyan(`\nWatching for changes in: ${chalk.bold(resourceInDirectory)}`));
|
|
421
434
|
let debounceTimer = null;
|
|
422
435
|
const triggerRebuild = (pFilename) => {
|
|
423
436
|
if (debounceTimer)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { spawnSync } = require('child_process');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
// Target the compiled Bun bundle
|
|
6
|
+
const cliScript = path.join(__dirname, 'bundle', 'cli', 'cli.js');
|
|
7
|
+
|
|
8
|
+
// If currently running under Bun, import and execute directly
|
|
9
|
+
if (typeof Bun !== 'undefined') {
|
|
10
|
+
import(cliScript);
|
|
11
|
+
} else {
|
|
12
|
+
// Running under Node.js -> delegate to Bun runtime
|
|
13
|
+
const result = spawnSync('bun', [cliScript, ...process.argv.slice(2)], {
|
|
14
|
+
stdio: 'inherit',
|
|
15
|
+
shell: process.platform === 'win32'
|
|
16
|
+
});
|
|
17
|
+
process.exit(result.status ?? 0);
|
|
18
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evitcastudio/kit",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"author": "doubleactii 56242467+doubleactii@users.noreply.github.com (https://evitcastudio.com)",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"build-all": "bun run build-types && bun run build && bun run build-docs"
|
|
44
44
|
},
|
|
45
45
|
"bin": {
|
|
46
|
-
"kit": "lib/
|
|
46
|
+
"kit": "lib/cli-runner.cjs"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@eslint/create-config": "1.4.0",
|