star-sdk-cli 0.1.15 → 0.1.17
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/dist/cli.mjs +1 -5
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1390,7 +1390,7 @@ leaderboard.submit(reactionTimeMs);
|
|
|
1390
1390
|
5. **Works for guests** - Guests get a generated name like "Guest1234". They can sign in later to claim scores.`;
|
|
1391
1391
|
|
|
1392
1392
|
// src/cli.ts
|
|
1393
|
-
var VERSION = "
|
|
1393
|
+
var VERSION = JSON.parse(fs.readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
|
|
1394
1394
|
var API_BASE = process.env.STAR_API_BASE || "https://buildwithstar.com";
|
|
1395
1395
|
var CONFIG_FILE = ".starrc";
|
|
1396
1396
|
var colors = {
|
|
@@ -1436,10 +1436,6 @@ function injectImportMapIfNeeded(html, deployDir) {
|
|
|
1436
1436
|
if (/<script\s[^>]*type\s*=\s*["']importmap["'][^>]*>/i.test(html)) {
|
|
1437
1437
|
return html;
|
|
1438
1438
|
}
|
|
1439
|
-
const bareImportPattern = /\bfrom\s+['"](?:star-sdk|star-canvas|star-audio|star-leaderboard|star-multiplayer)['"]/;
|
|
1440
|
-
if (!bareImportPattern.test(html)) {
|
|
1441
|
-
return html;
|
|
1442
|
-
}
|
|
1443
1439
|
const version = resolveStarSdkVersion(deployDir);
|
|
1444
1440
|
const suffix = version ? `@${version}` : "";
|
|
1445
1441
|
const imports = {};
|