@zaisma/game-server 1.20.0 → 1.21.0
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/bench/glass.js +52 -44
- package/package.json +1 -1
package/bench/glass.js
CHANGED
|
@@ -6317,7 +6317,7 @@ var ERROR_CODES = {
|
|
|
6317
6317
|
no_scheduled_room_message: { httpStatus: 404, meaning: "The game has no scheduled room message with that ID waiting.", messageForPeople: "That message isn't waiting to go out: it went out already, or was cancelled." },
|
|
6318
6318
|
dump_too_big: { httpStatus: 413, meaning: "dump_sql is over 5 MB: import a dump in parts, each ending on a whole statement.", messageForPeople: "The dump is over 5 MB. Import it in parts, each ending on a whole statement." },
|
|
6319
6319
|
// Hosting and credit
|
|
6320
|
-
hosting_paused: { httpStatus: 429, meaning: "The game's hosting is paused this month: its free allowance, its budget or its developer's credit is used. It starts again when the month resets, the budget is raised or credit is added.", messageForPeople: "The game's hosting is paused this month: its free hosting, its budget or your credit is used. Raise its budget or add credit to start it again now." },
|
|
6320
|
+
hosting_paused: { httpStatus: 429, meaning: "The game's hosting is paused this month: its free allowance, its budget or its developer's credit is used, or Zaisma's free hosting ran out and it has no budget with credit, or it has no real players and games with none used their share. It starts again when the month resets, the budget is raised or credit is added.", messageForPeople: "The game's hosting is paused this month: its free hosting, its budget or your credit is used. Raise its budget or add credit to start it again now." },
|
|
6321
6321
|
confirmation_needed: { httpStatus: 403, meaning: "This needs the developer's passkey on zaisma.com (turning spending on or up, or connecting a Stripe account): confirm_url is where they do it.", messageForPeople: "This needs your passkey on zaisma.com. Open the link to confirm it." },
|
|
6322
6322
|
bad_monthly_budget_cents: { httpStatus: 400, meaning: "monthly_budget_cents isn't a whole number of cents of at least 100 ($1), or null for no paid hosting.", messageForPeople: "A budget is at least $1 a month, or none for free hosting only." },
|
|
6323
6323
|
bad_top_up_amount: { httpStatus: 400, meaning: "amount_cents isn't a whole number of cents from 1,000 ($10) to 100,000 ($1,000).", messageForPeople: "A top-up is from $10 to $1,000." },
|
|
@@ -8614,6 +8614,48 @@ var USAGE_FIELDS = {
|
|
|
8614
8614
|
};
|
|
8615
8615
|
var USAGE_COLUMNS = Object.keys(USAGE_FIELDS);
|
|
8616
8616
|
|
|
8617
|
+
// ../core/src/review-evidence.ts
|
|
8618
|
+
var EVIDENCE_KINDS = {
|
|
8619
|
+
/** What the game connects to or loads from: the subject is the host. */
|
|
8620
|
+
connects_to: null,
|
|
8621
|
+
/** A site the game opens: the registered link's name, or the host of a raw URL. */
|
|
8622
|
+
opens_link: null,
|
|
8623
|
+
/**
|
|
8624
|
+
* Text a player types, by who reads it, never by route: shown_locally (only the typer sees it), checked_by_game
|
|
8625
|
+
* (the game compares it to a secret or a list and others see only the result), read_by_others (another player
|
|
8626
|
+
* reads it as written outside Zaisma's chat hosting, however it's entered: that's unfiltered chat),
|
|
8627
|
+
* sent_through_zaisma_chat (another player reads it, sent with room.chat or checked with canChat and checkChat)
|
|
8628
|
+
* and picked_phrases (whole phrases the developer wrote, chosen from a closed list).
|
|
8629
|
+
*/
|
|
8630
|
+
player_text: ["shown_locally", "checked_by_game", "read_by_others", "sent_through_zaisma_chat", "picked_phrases"],
|
|
8631
|
+
/**
|
|
8632
|
+
* Code that tries to get around one of the beta's protections instead of just bumping into it, each a yes/no
|
|
8633
|
+
* test: page_outside_frame (reaches the page outside the game's frame by any route), peer_outside_relay (makes
|
|
8634
|
+
* a peer connection from a frame of its own or replaces the relay settings), link_without_tap (opens a site
|
|
8635
|
+
* with no tap by the player), link_built_from_pieces (a link assembled at runtime), address_built_from_pieces
|
|
8636
|
+
* (a host to connect to assembled at runtime).
|
|
8637
|
+
*/
|
|
8638
|
+
protection_attempt: ["page_outside_frame", "peer_outside_relay", "link_without_tap", "link_built_from_pieces", "address_built_from_pieces"],
|
|
8639
|
+
/** A personal detail the game asks players for. */
|
|
8640
|
+
asks_player: ["email", "real_name", "birthday", "location", "phone", "password", "other_personal_detail"],
|
|
8641
|
+
/**
|
|
8642
|
+
* Content near a rule, by the rule's name; lifelike_gore, which plays only in games for 16 and up; and
|
|
8643
|
+
* allowed_content, what ALLOWED_CONTENT covers, recorded so a tweak can be compared.
|
|
8644
|
+
*/
|
|
8645
|
+
// real_people: only what a re-check after a report lists, for a person to read. The judge never sees it (REPORT_ONLY_CONTENT_RULES).
|
|
8646
|
+
content: [...REVIEWED_CONTENT_RULES, "real_people", "lifelike_gore", "allowed_content"],
|
|
8647
|
+
/** Code that hides what it does. */
|
|
8648
|
+
hidden_code: ["eval_of_encoded", "obfuscated", "downloads_code"],
|
|
8649
|
+
/** Text in the game that addresses the reviewer. */
|
|
8650
|
+
talks_to_reviewer: ["present"]
|
|
8651
|
+
};
|
|
8652
|
+
var PIECE_WINDOW_CHARACTER_COUNT = 48;
|
|
8653
|
+
var PIECE_HASH_MULTIPLIER_NUMBER = 16777619;
|
|
8654
|
+
var PIECE_HASH_LEAVING_MULTIPLIER_NUMBER = Array.from({ length: PIECE_WINDOW_CHARACTER_COUNT }).reduce((powerNumber) => Math.imul(powerNumber, PIECE_HASH_MULTIPLIER_NUMBER), 1);
|
|
8655
|
+
|
|
8656
|
+
// ../core/src/spending.ts
|
|
8657
|
+
var STORED_PER_BYTE_MONTH_CENTS = 1.5 / 1024 ** 3;
|
|
8658
|
+
|
|
8617
8659
|
// ../core/src/plans.ts
|
|
8618
8660
|
var PLAN_LIMITS = {
|
|
8619
8661
|
free: { maximumDailyCheckCount: 20 },
|
|
@@ -8726,45 +8768,6 @@ var wordPattern = (words3) => new RegExp(`(?<![\\w-])(?:${words3.map((word) => w
|
|
|
8726
8768
|
var BANNED_PATTERN = wordPattern(BANNED_WORDS);
|
|
8727
8769
|
var FILLER_PATTERN = wordPattern(FILLER_WORDS);
|
|
8728
8770
|
|
|
8729
|
-
// ../core/src/review-evidence.ts
|
|
8730
|
-
var EVIDENCE_KINDS = {
|
|
8731
|
-
/** What the game connects to or loads from: the subject is the host. */
|
|
8732
|
-
connects_to: null,
|
|
8733
|
-
/** A site the game opens: the registered link's name, or the host of a raw URL. */
|
|
8734
|
-
opens_link: null,
|
|
8735
|
-
/**
|
|
8736
|
-
* Text a player types, by who reads it, never by route: shown_locally (only the typer sees it), checked_by_game
|
|
8737
|
-
* (the game compares it to a secret or a list and others see only the result), read_by_others (another player
|
|
8738
|
-
* reads it as written outside Zaisma's chat hosting, however it's entered: that's unfiltered chat),
|
|
8739
|
-
* sent_through_zaisma_chat (another player reads it, sent with room.chat or checked with canChat and checkChat)
|
|
8740
|
-
* and picked_phrases (whole phrases the developer wrote, chosen from a closed list).
|
|
8741
|
-
*/
|
|
8742
|
-
player_text: ["shown_locally", "checked_by_game", "read_by_others", "sent_through_zaisma_chat", "picked_phrases"],
|
|
8743
|
-
/**
|
|
8744
|
-
* Code that tries to get around one of the beta's protections instead of just bumping into it, each a yes/no
|
|
8745
|
-
* test: page_outside_frame (reaches the page outside the game's frame by any route), peer_outside_relay (makes
|
|
8746
|
-
* a peer connection from a frame of its own or replaces the relay settings), link_without_tap (opens a site
|
|
8747
|
-
* with no tap by the player), link_built_from_pieces (a link assembled at runtime), address_built_from_pieces
|
|
8748
|
-
* (a host to connect to assembled at runtime).
|
|
8749
|
-
*/
|
|
8750
|
-
protection_attempt: ["page_outside_frame", "peer_outside_relay", "link_without_tap", "link_built_from_pieces", "address_built_from_pieces"],
|
|
8751
|
-
/** A personal detail the game asks players for. */
|
|
8752
|
-
asks_player: ["email", "real_name", "birthday", "location", "phone", "password", "other_personal_detail"],
|
|
8753
|
-
/**
|
|
8754
|
-
* Content near a rule, by the rule's name; lifelike_gore, which plays only in games for 16 and up; and
|
|
8755
|
-
* allowed_content, what ALLOWED_CONTENT covers, recorded so a tweak can be compared.
|
|
8756
|
-
*/
|
|
8757
|
-
// real_people: only what a re-check after a report lists, for a person to read. The judge never sees it (REPORT_ONLY_CONTENT_RULES).
|
|
8758
|
-
content: [...REVIEWED_CONTENT_RULES, "real_people", "lifelike_gore", "allowed_content"],
|
|
8759
|
-
/** Code that hides what it does. */
|
|
8760
|
-
hidden_code: ["eval_of_encoded", "obfuscated", "downloads_code"],
|
|
8761
|
-
/** Text in the game that addresses the reviewer. */
|
|
8762
|
-
talks_to_reviewer: ["present"]
|
|
8763
|
-
};
|
|
8764
|
-
var PIECE_WINDOW_CHARACTER_COUNT = 48;
|
|
8765
|
-
var PIECE_HASH_MULTIPLIER_NUMBER = 16777619;
|
|
8766
|
-
var PIECE_HASH_LEAVING_MULTIPLIER_NUMBER = Array.from({ length: PIECE_WINDOW_CHARACTER_COUNT }).reduce((powerNumber) => Math.imul(powerNumber, PIECE_HASH_MULTIPLIER_NUMBER), 1);
|
|
8767
|
-
|
|
8768
8771
|
// ../core/src/review-precedents.ts
|
|
8769
8772
|
var REVIEW_PRECEDENT_DECISIONS = { pass: "Pass games like this", reject: "Reject games like this" };
|
|
8770
8773
|
|
|
@@ -29601,7 +29604,7 @@ const tick = () => {
|
|
|
29601
29604
|
};
|
|
29602
29605
|
return () => {
|
|
29603
29606
|
// A tester link's play is never counted: the check is only for multiplayer.
|
|
29604
|
-
if (TESTER) return check().then((token) => post({ tester: TESTER, token })).then(gotKey);
|
|
29607
|
+
if (TESTER) return check().then((token) => post({ tester: TESTER, token, tlast: (load()[SLUG] || {}).tlast || null })).then((answer) => { save({ ...(load()[SLUG] || {}), tlast: day() }); return gotKey(answer); });
|
|
29605
29608
|
const mine = load()[SLUG] || {};
|
|
29606
29609
|
const start = { first: mine.first || null, last: mine.last || null, cfirst: mine.cfirst || null, clast: mine.clast || null };
|
|
29607
29610
|
save({ ...mine, first: mine.first || day(), last: day() });
|
|
@@ -54710,7 +54713,9 @@ var GAME_ALERT = object({
|
|
|
54710
54713
|
version_held: "a version is waiting for a person at Zaisma",
|
|
54711
54714
|
link_flagged: "a registered link opens for nobody: its site is listed for malware or phishing",
|
|
54712
54715
|
game_off_lists: "the listing check found something on a cover or the title that keeps the listed game off Zaisma's lists (home, All games, browse, search engines) until it's fixed; it still plays by its link",
|
|
54713
|
-
hosting_paused: "the game's hosting is paused this month (its free allowance with no budget, its budget
|
|
54716
|
+
hosting_paused: "the game's hosting is paused this month (its free allowance with no budget, its budget or your credit is used, it has no real players and games with none used their share of free hosting, or Zaisma's free hosting for the month ended): no new rooms, relayed connections or game server requests start, and running matches get an hour to finish",
|
|
54717
|
+
free_rooms_stopped: "Zaisma's free room time for the month is used up across all games, and this game has no budget with credit: no new rooms or relayed connections start until the month resets, and running matches get an hour to finish. Its database and game server requests go on",
|
|
54718
|
+
second_free_allowance_started: "the game filled its free hosting for the first time, so it has a second free allowance this month, once",
|
|
54714
54719
|
database_full: "the game's storage (its database and kept rooms) reached the 10 GB a game can keep, so the database can change and delete rows but not grow, and no more rooms can be kept",
|
|
54715
54720
|
hosting_nearly_paused: "80% of the month's free hosting is used, and the game has no budget to go on past it",
|
|
54716
54721
|
hosting_budget_nearly_used: "80% of the game's monthly budget is used",
|
|
@@ -55093,7 +55098,9 @@ var PLAYER_PERFORMANCE = object(
|
|
|
55093
55098
|
);
|
|
55094
55099
|
var HOSTING_USE = object(
|
|
55095
55100
|
{
|
|
55096
|
-
free_used_pct: countOf("How much of this month's free hosting is used, 0 to 100. Never shown in dollars."),
|
|
55101
|
+
free_used_pct: countOf("How much of this month's free hosting is used, 0 to 100, a second free allowance included. Never shown in dollars."),
|
|
55102
|
+
second_free_allowance_month_start_date: nullable(date("The month the game had its second free allowance, the first time it filled its free hosting. It comes once. null: not yet.")),
|
|
55103
|
+
free_rooms_stopped_at: nullable(isoTime("When Zaisma's free room time for the month ran out across all games, for a game with no budget with credit: no new rooms or relayed connections start until resets_on_date, and running matches end an hour after. Its database and requests go on. null: rooms run as usual.")),
|
|
55097
55104
|
shares: list(
|
|
55098
55105
|
object({
|
|
55099
55106
|
kind: choice({
|
|
@@ -55109,7 +55116,7 @@ var HOSTING_USE = object(
|
|
|
55109
55116
|
"What used it, biggest first; [] before any use."
|
|
55110
55117
|
),
|
|
55111
55118
|
is_paused: yes("Whether the game's hosting is paused: no new rooms, relayed connections or requests start, and running matches get an hour to finish."),
|
|
55112
|
-
paused_reason: nullable(choice({ free_used: "its free hosting is used and it has no budget", budget_used: "its monthly budget is used", credit_used: "your credit ran out" }, "null when it isn't paused.")),
|
|
55119
|
+
paused_reason: nullable(choice({ free_used: "its free hosting is used and it has no budget", budget_used: "its monthly budget is used", credit_used: "your credit ran out", no_real_players: "it has no real players yet, and games with none have used their share of free hosting this month: it starts again once real players play it, or when the month resets", free_hosting_ended: "Zaisma's free hosting for this month is used up across all games" }, "null when it isn't paused.")),
|
|
55113
55120
|
paused_at: nullable(isoTime("When it paused; running matches end an hour after. null when it isn't paused.")),
|
|
55114
55121
|
resets_on_date: date("When the month resets (UTC): the free allowance starts again and a pause ends."),
|
|
55115
55122
|
monthly_budget_cents: nullable(countOf("What it may draw from credit this month; null: no paid hosting.")),
|
|
@@ -60466,6 +60473,7 @@ function benchGame(input) {
|
|
|
60466
60473
|
friend_joins_enabled: 1,
|
|
60467
60474
|
performance_measuring_enabled: 0,
|
|
60468
60475
|
monthly_budget_cents: null,
|
|
60476
|
+
second_free_allowance_month_start_date: null,
|
|
60469
60477
|
quick_joined_at_ms: null,
|
|
60470
60478
|
game_server_allowed_hosts: "[]",
|
|
60471
60479
|
links: "[]",
|