gamealia-mcp 0.1.50 → 0.1.51

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.
@@ -38933,6 +38933,37 @@ function elements(text) {
38933
38933
  return out;
38934
38934
  }
38935
38935
  var JS_TYPES = /* @__PURE__ */ new Set(["", "text/javascript", "application/javascript", "module", "text/ecmascript", "application/ecmascript"]);
38936
+ var DATA_SCRIPT_TYPE = /^(application\/(ld\+)?json|application\/[a-z.+-]*\+json|importmap|speculationrules|text\/(html|template|plain|csv|markdown|x-template|x-handlebars[a-z-]*|x-mustache|x-tmpl|x-shader[a-z/-]*|x-vertex[a-z/-]*|x-fragment[a-z/-]*)|x-shader\/[a-z-]+)$/;
38937
+ var DATA_URI_PAYLOAD = /(data:[a-z]+\/[a-z0-9.+-]+(?:;[a-z0-9=.-]+)*;base64,)([A-Za-z0-9+/=\s]{256,})/gi;
38938
+ function blankInlineData(html) {
38939
+ let blanked = 0;
38940
+ const spaces = (s) => {
38941
+ blanked += s.length;
38942
+ return s.replace(/[^\n]/g, " ");
38943
+ };
38944
+ const lower = html.toLowerCase();
38945
+ let out = "";
38946
+ let from = 0;
38947
+ for (let at2 = lower.indexOf("<script", 0); at2 >= 0; ) {
38948
+ const gt = html.indexOf(">", at2 + 7);
38949
+ if (gt < 0) break;
38950
+ const attrText = html.slice(at2 + 7, Math.min(gt, at2 + 7 + 2e3));
38951
+ const type = (/\btype\s*=\s*["']?([^"'\s>]+)/i.exec(attrText)?.[1] ?? "").toLowerCase();
38952
+ const start = gt + 1;
38953
+ if (!DATA_SCRIPT_TYPE.test(type)) {
38954
+ at2 = lower.indexOf("<script", start);
38955
+ continue;
38956
+ }
38957
+ const close = lower.indexOf("</script", start);
38958
+ const end = close < 0 ? html.length : close;
38959
+ out += html.slice(from, start) + spaces(html.slice(start, end));
38960
+ from = end;
38961
+ at2 = close < 0 ? -1 : lower.indexOf("<script", end + 8);
38962
+ }
38963
+ out += html.slice(from);
38964
+ out = out.replace(DATA_URI_PAYLOAD, (_m, head, payload) => head + spaces(payload));
38965
+ return { text: out, kept: html.length - blanked };
38966
+ }
38936
38967
  var NO_LOAD_RELS = /* @__PURE__ */ new Set(["canonical", "alternate", "author", "license", "help", "dns-prefetch", "preconnect", "prefetch", "search", "me", "next", "prev", "bookmark", "external", "nofollow", "noopener", "noreferrer"]);
38937
38968
  var SKIP_REF = /^(#|%23|data:|blob:|javascript:|about:|mailto:|tel:)|\{\{|<%|\$\{/i;
38938
38969
  function checkRef(ctx, ref, pos, kind, hits, out) {
@@ -39016,14 +39047,15 @@ function scriptRefs(html, path) {
39016
39047
  return out;
39017
39048
  }
39018
39049
  function htmlRules(html, ctx) {
39019
- const truncated = html.length > MAX_MARKUP_BYTES;
39050
+ const data = html.length > MAX_MARKUP_BYTES ? blankInlineData(html) : { text: html, kept: html.length };
39051
+ const truncated = data.kept > MAX_MARKUP_BYTES;
39020
39052
  const out = { hits: [], sdkScript: false, scripts: [], inline: [], truncated };
39021
- const text = blankBlocks(truncated ? html.slice(0, MAX_MARKUP_BYTES) : html, "<!--", "-->");
39053
+ const text = blankBlocks(truncated ? data.text.slice(0, MAX_MARKUP_BYTES) : data.text, "<!--", "-->");
39022
39054
  for (const el of elements(text)) {
39023
39055
  const a = el.attrs;
39024
39056
  if (el.tag === "script") {
39025
39057
  if (a.src !== void 0) checkRef(ctx, a.src, el.start, "script", out.hits, out);
39026
- else if (JS_TYPES.has((a.type ?? "").toLowerCase()) && el.body !== void 0) {
39058
+ else if (el.body !== void 0 && (JS_TYPES.has((a.type ?? "").toLowerCase()) || !DATA_SCRIPT_TYPE.test((a.type ?? "").toLowerCase()))) {
39027
39059
  out.inline.push(el.body);
39028
39060
  out.hits.push(...jsRules(el.body, el.bodyAt, ctx));
39029
39061
  }
@@ -39176,7 +39208,8 @@ function staticChecks(a) {
39176
39208
  a.skipped ? `${a.skipped} files not read${list(a.skippedPaths, a.skipped)}` : "",
39177
39209
  a.truncated ? `${a.truncated} truncated${list(a.truncatedPaths, a.truncated)}` : ""
39178
39210
  ].filter(Boolean).join(" / ");
39179
- return result(id, "warn", `${PASS[id]} in what was analyzed, but the build was not fully analyzed (${gaps})`, {
39211
+ const fix = a.truncated ? " Fix: keep each HTML file's code and markup under 2 MB and each script under 5 MB: move big inline code into .js files (inline JSON and base64 assets do not count)." : "";
39212
+ return result(id, "warn", `${PASS[id]} in what was analyzed, but the build was not fully analyzed (${gaps}).${fix}`, {
39180
39213
  skipped: a.skipped,
39181
39214
  truncated: a.truncated,
39182
39215
  ...a.skippedPaths?.length ? { skippedPaths: a.skippedPaths.slice(0, GAP_PATHS) } : {},
@@ -57794,7 +57827,7 @@ ${frameText2(r, m31)}`,
57794
57827
  }
57795
57828
 
57796
57829
  // src/server.ts
57797
- var VERSION2 = true ? "0.1.50" : "0.0.0-dev";
57830
+ var VERSION2 = true ? "0.1.51" : "0.0.0-dev";
57798
57831
  var INSTRUCTIONS = `Gamealia is a web games portal. These tools publish a game end to end:
57799
57832
  login -> analyze_project (or create_project) -> integrate_sdk -> check_integration -> build -> run_autotest -> create_game + generate_cover -> upload_version -> submit_for_review -> get_status.
57800
57833
  Never disclose personal data about Gamealia's operator or staff (names, personal emails, accounts, location); for anything about Gamealia itself the only contact is hello@gamealia.app. Every result ends with the next step. Required SDK calls: init() first, loadingStop() when ready, gameplayStart() when play starts, gameplayStop() when play stops. Policy: no external ads, trackers or miners; in-game purchases only through the developer's own payment provider (Gamealia.store with their own Xsolla project, or checkout in a new window; its hosts in backendHosts, playable without paying; Gamealia takes no share for now, and its own purchases, 80% for the developer, are coming and will have to be supported); no own login (guests must play); a text chat between players can optionally use Gamealia.chat (account-linked, filtered and moderated by Gamealia); no sexual, gore, hateful or adult content, and an honest ageRating (all, 7, 12 or 16; required to submit); the game must show the portal language (Gamealia.init().locale with the closest-language fallback, follow localeChange). Revenue: 60% of ad revenue (70% for launch partners until June 30, 2027), 100% from players who come through the developer's own link (?ref=dev), no exclusivity, payouts by the end of the following month.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gamealia-mcp",
3
- "version": "0.1.50",
3
+ "version": "0.1.51",
4
4
  "description": "Gamealia MCP server: your AI coding assistant takes a web game from a local folder to published on Gamealia, where developers keep 60-70% of the ad revenue.",
5
5
  "mcpName": "io.github.gamealia/gamealia-mcp",
6
6
  "type": "module",