tempest.games 0.2.68 → 0.2.69

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/app/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>TEMPEST</title>
8
- <script type="module" crossorigin src="/assets/index-t5Kphr7m.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-CCuiNaIa.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-DZ_4vJcE.css">
10
10
  </head>
11
11
  <body>
@@ -37418,14 +37418,14 @@ function get(obj, path3) {
37418
37418
  return obj;
37419
37419
  }
37420
37420
  function numberToLetterSequence(num, baseChar = "a", base = 26) {
37421
- const digits = [];
37421
+ const digits2 = [];
37422
37422
  do {
37423
37423
  num -= 1;
37424
- digits.push(num % base);
37424
+ digits2.push(num % base);
37425
37425
  num = num / base >> 0;
37426
37426
  } while (num > 0);
37427
37427
  const baseCode = baseChar.charCodeAt(0);
37428
- return digits.reverse().map((n3) => String.fromCharCode(baseCode + n3)).join("");
37428
+ return digits2.reverse().map((n3) => String.fromCharCode(baseCode + n3)).join("");
37429
37429
  }
37430
37430
  function numberToRoman(num) {
37431
37431
  return [...num + ""].map((n3) => +n3).reverse().map((v4, i2) => v4 % 5 < 4 ? (v4 < 5 ? "" : V4[i2]) + I3[i2].repeat(v4 % 5) : I3[i2] + (v4 < 5 ? V4[i2] : I3[i2 + 1])).reverse().join("");
@@ -68040,36 +68040,38 @@ function customAlphabet(alphabet, size2 = 21) {
68040
68040
  return customRandom(alphabet, size2, random);
68041
68041
  }
68042
68042
 
68043
- // src/library/alpha-rand.ts
68043
+ // src/library/rand.ts
68044
68044
  var alphabet = `abcdefghijklmnopqrstuvwxyz`;
68045
68045
  var alphaRand = customAlphabet(alphabet, 6);
68046
+ var digits = `0123456789`;
68047
+ var digitRand = customAlphabet(digits, 6);
68046
68048
 
68047
68049
  // src/backend/account-actions.ts
68048
68050
  function genAccountActionCode() {
68049
- return alphaRand(4) + `_` + alphaRand(4);
68051
+ return digitRand(6);
68050
68052
  }
68051
68053
  function summarizeAccountAction({
68052
68054
  action,
68053
68055
  username,
68054
68056
  oneTimeCode
68055
68057
  }) {
68058
+ let subjectInternal;
68059
+ let summary;
68056
68060
  switch (action) {
68057
68061
  case `confirmEmail`:
68058
- return {
68059
- subject: `Welcome`,
68060
- summary: `${oneTimeCode} is your one-time code to set up your account.`
68061
- };
68062
+ subjectInternal = `Welcome to Tempest!`;
68063
+ summary = `Your one-time code to set up your account.`;
68064
+ break;
68062
68065
  case `resetPassword`:
68063
- return {
68064
- subject: `Approve password reset?`,
68065
- summary: `${oneTimeCode} is your one-time code to make a new password.`
68066
- };
68066
+ subjectInternal = `Approve password reset?`;
68067
+ summary = `Your one-time code to make a new password.`;
68068
+ break;
68067
68069
  case `signIn`:
68068
- return {
68069
- subject: `Welcome back, ${username}`,
68070
- summary: `${oneTimeCode} is your one-time code to get signed in.`
68071
- };
68070
+ subjectInternal = `Welcome back, ${username}!`;
68071
+ summary = `Your one-time code to get signed in.`;
68072
68072
  }
68073
+ const subjectExternal = `${oneTimeCode} \u2190 ${subjectInternal}`;
68074
+ return { subjectExternal, subjectInternal, summary };
68073
68075
  }
68074
68076
 
68075
68077
  // ../../node_modules/.pnpm/resend@6.4.1_@react-email+render@1.4.0_react-dom@19.2.0_react@19.2.0__react@19.2.0_/node_modules/resend/dist/index.mjs
@@ -82289,7 +82291,7 @@ function tempest(props) {
82289
82291
  import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
82290
82292
  var FRONTEND_ORIGIN = JSON.parse(process.env[`FRONTEND_ORIGINS`])[0] ?? ``;
82291
82293
  function ConfirmAccountAction({
82292
- subject,
82294
+ subjectInternal: subject,
82293
82295
  summary,
82294
82296
  oneTimeCode,
82295
82297
  baseUrl: baseUrl2 = FRONTEND_ORIGIN
@@ -82373,14 +82375,14 @@ function ConfirmAccountAction({
82373
82375
  }, undefined, false, undefined, this),
82374
82376
  /* @__PURE__ */ jsxDEV2(Text3, {
82375
82377
  style: text2,
82376
- children: "If you didn't request this email, there's nothing to worry about, you can safely ignore it."
82378
+ children: "If you didn't request this email, you can safely ignore it."
82377
82379
  }, undefined, false, undefined, this),
82378
82380
  /* @__PURE__ */ jsxDEV2(Section, {
82379
82381
  style: footerLogos,
82380
82382
  children: /* @__PURE__ */ jsxDEV2(Text3, {
82381
82383
  style: footerText,
82382
82384
  children: [
82383
- "@2022 Tempest Games, LLC",
82385
+ "@2025 Tempest Games, LLC",
82384
82386
  /* @__PURE__ */ jsxDEV2("br", {}, undefined, false, undefined, this),
82385
82387
  /* @__PURE__ */ jsxDEV2("br", {}, undefined, false, undefined, this),
82386
82388
  "ISC License"
@@ -82394,10 +82396,14 @@ function ConfirmAccountAction({
82394
82396
  ]
82395
82397
  }, undefined, true, undefined, this);
82396
82398
  }
82399
+ var PREVIEW_CODE_ONLY = genAccountActionCode();
82397
82400
  ConfirmAccountAction.PreviewProps = {
82398
- subject: `Welcome`,
82399
- summary: `Your one-time code is: 1234567890`,
82400
- oneTimeCode: genAccountActionCode(),
82401
+ ...summarizeAccountAction({
82402
+ username: `tiny_dog`,
82403
+ oneTimeCode: PREVIEW_CODE_ONLY,
82404
+ action: `confirmEmail`
82405
+ }),
82406
+ oneTimeCode: PREVIEW_CODE_ONLY,
82401
82407
  baseUrl: `https://tempest.games`
82402
82408
  };
82403
82409
  var ConfirmAccountAction_default = ConfirmAccountAction;
@@ -82473,7 +82479,7 @@ async function sendEmailToConfirmAccountAction({
82473
82479
  oneTimeCode,
82474
82480
  baseUrl: baseUrl2
82475
82481
  }) {
82476
- const { subject, summary } = summarizeAccountAction({
82482
+ const { subjectExternal, subjectInternal, summary } = summarizeAccountAction({
82477
82483
  username,
82478
82484
  action,
82479
82485
  oneTimeCode
@@ -82482,9 +82488,9 @@ async function sendEmailToConfirmAccountAction({
82482
82488
  await resend.emails.send({
82483
82489
  from: `Tempest Games <noreply@tempest.games>`,
82484
82490
  to: to4,
82485
- subject,
82491
+ subject: subjectExternal,
82486
82492
  react: /* @__PURE__ */ jsxDEV3(ConfirmAccountAction_default, {
82487
- subject,
82493
+ subjectInternal,
82488
82494
  summary,
82489
82495
  oneTimeCode,
82490
82496
  baseUrl: baseUrl2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tempest.games",
3
- "version": "0.2.68",
3
+ "version": "0.2.69",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -46,8 +46,8 @@
46
46
  "socket.io": "4.8.1",
47
47
  "socket.io-client": "4.8.1",
48
48
  "atom.io": "0.44.1",
49
- "treetrunks": "0.1.5",
50
- "safedeposit": "0.1.2"
49
+ "safedeposit": "0.1.2",
50
+ "treetrunks": "0.1.5"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@react-email/components": "0.5.7",