@ambasada/village 0.8.20 → 0.8.21

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/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @ambasada/village: the Hack A Ton add-on. Accept and spend TON in the village, on top of the
3
- * Ambasada platform client (`@ambasada/sdk`).
3
+ * ambasada platform client (`@ambasada/sdk`).
4
4
  *
5
5
  * import { village } from "@ambasada/village"; // AMBASADA_API_KEY, AMBASADA_VILLAGE_API_URL from the env
6
6
  * const { url } = await village.checkout({ amount: 3, description: "Coffee", success_url });
package/dist/index.js CHANGED
@@ -1269,9 +1269,9 @@ function checkHtml(html) {
1269
1269
  const scheme = metas.find((m) => m.name?.toLowerCase() === "color-scheme")?.content?.toLowerCase().trim();
1270
1270
  const darkMeta = scheme !== void 0 && /\bdark\b/.test(scheme) && !/\blight\b/.test(scheme);
1271
1271
  const darkStyle = [...html.matchAll(/<style\b[^>]*>([\s\S]*?)<\/style>/gi)].concat([...html.matchAll(/\bstyle\s*=\s*"([^"]*)"/gi)]).some(([, css]) => [...css.matchAll(/color-scheme\s*:\s*([^;}"]+)/gi)].some(([, v]) => /\bdark\b/i.test(v) && !/\blight\b/i.test(v)));
1272
- if (darkMeta || darkStyle) f.problems.push({ code: "dark_only", message: "the entry page declares a dark-only color-scheme; the Ambasada app is light (use light, or light dark)" });
1272
+ if (darkMeta || darkStyle) f.problems.push({ code: "dark_only", message: "the entry page declares a dark-only color-scheme; the ambasada app is light (use light, or light dark)" });
1273
1273
  if (!SDK_MARKERS.some((m) => html.includes(m))) {
1274
- f.warnings.push({ code: "no_miniapp_sdk", message: "no @ambasada/miniapp, miniapp.js or ambasadaShell in the entry HTML or its scripts: the Ambasada app waits for ready() to drop the splash" });
1274
+ f.warnings.push({ code: "no_miniapp_sdk", message: "no @ambasada/miniapp, miniapp.js or ambasadaShell in the entry HTML or its scripts: the ambasada app waits for ready() to drop the splash" });
1275
1275
  }
1276
1276
  return f;
1277
1277
  }
@@ -1397,7 +1397,7 @@ async function checkRemote(url, fetchImpl = fetch, options = {}) {
1397
1397
  try {
1398
1398
  const res = await get(fetchImpl, callbackUrl);
1399
1399
  await res.body?.cancel();
1400
- if (res.status === 404 || res.status >= 500) report.problems.push({ code: "identity_callback", message: `the identity scope needs Sign in with Ambasada at /api/auth/callback; ${callbackUrl} answered ${res.status}` });
1400
+ if (res.status === 404 || res.status >= 500) report.problems.push({ code: "identity_callback", message: `the identity scope needs Sign in with ambasada at /api/auth/callback; ${callbackUrl} answered ${res.status}` });
1401
1401
  } catch (error) {
1402
1402
  report.problems.push({ code: "identity_callback", message: `could not fetch ${callbackUrl}: ${error.message}` });
1403
1403
  }
@@ -1407,7 +1407,7 @@ async function checkRemote(url, fetchImpl = fetch, options = {}) {
1407
1407
  try {
1408
1408
  const res = await get(fetchImpl, shellUrl);
1409
1409
  await res.body?.cancel();
1410
- if (res.status === 404) report.warnings.push({ code: "identity_shell", message: `the identity scope signs people in on open through ${AUTH_SHELL_PATH} (auth.shell(req) from @ambasada/sdk); ${shellUrl} answered 404, so inside the Ambasada app they get "Sign in with Ambasada" instead` });
1410
+ if (res.status === 404) report.warnings.push({ code: "identity_shell", message: `the identity scope signs people in on open through ${AUTH_SHELL_PATH} (auth.shell(req) from @ambasada/sdk); ${shellUrl} answered 404, so inside the ambasada app they get "Sign in with ambasada" instead` });
1411
1411
  } catch {
1412
1412
  }
1413
1413
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ambasada/village",
3
- "version": "0.8.20",
4
- "description": "The Hack A Ton add-on for Ambasada apps: TON checkout, receipts, offerings, LLM, the agent, the market; CLI commands and the local bank.",
3
+ "version": "0.8.21",
4
+ "description": "The Hack A Ton add-on for ambasada apps: TON checkout, receipts, offerings, LLM, the agent, the market; CLI commands and the local bank.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "sideEffects": false,
@@ -27,7 +27,7 @@
27
27
  "node": ">=22"
28
28
  },
29
29
  "dependencies": {
30
- "@ambasada/sdk": "^0.8.20"
30
+ "@ambasada/sdk": "^0.8.21"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "^22.20.5",
@@ -35,7 +35,7 @@
35
35
  "typescript": "~5.9.3",
36
36
  "vitest": "^4.1.12",
37
37
  "@ambasada/protocol": "0.1.0",
38
- "@ambasada/cli": "0.8.20"
38
+ "@ambasada/cli": "0.8.21"
39
39
  },
40
40
  "author": "CENTYSO (https://centyso.com)",
41
41
  "homepage": "https://ambasada.id",