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 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.');
@@ -14,7 +14,8 @@ export type PlayerCosmetics = {
14
14
  slot: string;
15
15
  item: PlayerCosmeticsEquippedItem;
16
16
  }[];
17
- hairStyle: number;
17
+ hairModelUri?: string;
18
+ hairTextureUri?: string;
18
19
  skinTextureUri: string;
19
20
  };
20
21
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hytopia",
3
- "version": "0.14.40",
3
+ "version": "0.14.42",
4
4
  "description": "The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.",
5
5
  "type": "module",
6
6
  "main": "./server.mjs",
package/server.api.json CHANGED
@@ -37946,7 +37946,7 @@
37946
37946
  },
37947
37947
  {
37948
37948
  "kind": "Content",
37949
- "text": ";\n }[];\n hairStyle: number;\n skinTextureUri: string;\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
@@ -4740,7 +4740,8 @@ export declare type PlayerCosmetics = {
4740
4740
  slot: string;
4741
4741
  item: PlayerCosmeticsEquippedItem;
4742
4742
  }[];
4743
- hairStyle: number;
4743
+ hairModelUri?: string;
4744
+ hairTextureUri?: string;
4744
4745
  skinTextureUri: string;
4745
4746
  };
4746
4747