hytopia 0.14.40 → 0.14.42
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/bin/scripts.js +27 -1
- package/docs/server.playercosmetics.md +2 -1
- package/package.json +1 -1
- package/server.api.json +1 -1
- package/server.d.ts +2 -1
- package/server.mjs +48 -26
package/bin/scripts.js
CHANGED
|
@@ -40,6 +40,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
40
40
|
'init': init,
|
|
41
41
|
'init-mcp': initMcp,
|
|
42
42
|
'package': packageProject,
|
|
43
|
+
'run': run,
|
|
43
44
|
'start': start,
|
|
44
45
|
'upgrade-assets-library': () => upgradeAssetsLibrary(process.argv[3] || 'latest'),
|
|
45
46
|
'upgrade-cli': () => upgradeCli(process.argv[3] || 'latest'),
|
|
@@ -94,6 +95,30 @@ async function start() {
|
|
|
94
95
|
});
|
|
95
96
|
}
|
|
96
97
|
|
|
98
|
+
/**
|
|
99
|
+
* Run command
|
|
100
|
+
*
|
|
101
|
+
* Builds and runs the project once without file watching.
|
|
102
|
+
* Useful for debugging, testing, or production-like runs.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* `hytopia run`
|
|
106
|
+
* `hytopia run playground.ts`
|
|
107
|
+
*/
|
|
108
|
+
async function run() {
|
|
109
|
+
const projectRoot = process.cwd();
|
|
110
|
+
const inputFile = process.argv[3] || 'index.ts';
|
|
111
|
+
const outputFile = inputFile.replace(/\.ts$/, '.mjs');
|
|
112
|
+
const entryFile = path.join(projectRoot, outputFile);
|
|
113
|
+
|
|
114
|
+
await build(true, inputFile);
|
|
115
|
+
|
|
116
|
+
execSync(`"${process.execPath}" --enable-source-maps "${entryFile}"`, {
|
|
117
|
+
stdio: 'inherit',
|
|
118
|
+
cwd: projectRoot,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
97
122
|
/**
|
|
98
123
|
* Version command
|
|
99
124
|
*
|
|
@@ -617,7 +642,8 @@ function displayHelp() {
|
|
|
617
642
|
console.log(' version, -v, --version Show CLI version');
|
|
618
643
|
console.log(' build [FILE] Build the project (Generates ESM .mjs from FILE, default: index.ts)');
|
|
619
644
|
console.log(' build-dev [FILE] Build in dev mode (Generates ESM .mjs from FILE, default: index.ts)');
|
|
620
|
-
console.log(' start [FILE] Start a HYTOPIA project server (Node.js & watch, default: index.ts)');
|
|
645
|
+
console.log(' start [FILE] Start a HYTOPIA project server (Node.js & nodemon watch, default: index.ts)');
|
|
646
|
+
console.log(' run [FILE] Run the project once without watching (default: index.ts)');
|
|
621
647
|
console.log(' init [--template NAME] Initialize a new project');
|
|
622
648
|
console.log(' init-mcp Setup MCP integrations');
|
|
623
649
|
console.log(' package Create a zip of the project for uploading to the HYTOPIA create portal.');
|
package/package.json
CHANGED
package/server.api.json
CHANGED
|
@@ -37946,7 +37946,7 @@
|
|
|
37946
37946
|
},
|
|
37947
37947
|
{
|
|
37948
37948
|
"kind": "Content",
|
|
37949
|
-
"text": ";\n }[];\n
|
|
37949
|
+
"text": ";\n }[];\n hairModelUri?: string;\n hairTextureUri?: string;\n skinTextureUri: string;\n}"
|
|
37950
37950
|
},
|
|
37951
37951
|
{
|
|
37952
37952
|
"kind": "Content",
|
package/server.d.ts
CHANGED