whoburnedmore 0.9.7 → 0.9.8

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.
Files changed (2) hide show
  1. package/dist/index.js +39 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6944,13 +6944,40 @@ var RESERVED_SLUGS = /* @__PURE__ */ new Set([
6944
6944
  "robots",
6945
6945
  "sitemap"
6946
6946
  ]);
6947
+ var ORG_TEXT_BLOCKLIST = /* @__PURE__ */ new Set([
6948
+ "nigger",
6949
+ "nigga",
6950
+ "faggot",
6951
+ "retard",
6952
+ "rape",
6953
+ "rapist",
6954
+ "kike",
6955
+ "spic",
6956
+ "chink",
6957
+ "cunt"
6958
+ ]);
6959
+ var ORG_TEXT_LEET = {
6960
+ "0": "o",
6961
+ "1": "i",
6962
+ "3": "e",
6963
+ "4": "a",
6964
+ "5": "s",
6965
+ "7": "t",
6966
+ "8": "b",
6967
+ "@": "a",
6968
+ "$": "s"
6969
+ };
6970
+ function isCleanOrgText(input) {
6971
+ const runs = String(input).toLowerCase().split(/[^a-z0-9@$]+/).map((run2) => run2.replace(/[0-9@$]/g, (c) => ORG_TEXT_LEET[c] ?? c).replace(/[^a-z]/g, ""));
6972
+ return !runs.some((run2) => run2.length > 0 && ORG_TEXT_BLOCKLIST.has(run2));
6973
+ }
6947
6974
  var SLUG_RE = /^[a-z0-9](?:[a-z0-9-]{0,30}[a-z0-9])?$/;
6948
6975
  function isValidSlug(slug) {
6949
6976
  return typeof slug === "string" && slug.length >= 2 && slug.length <= 32 && SLUG_RE.test(slug) && // Reject consecutive hyphens — the regex above permits "a--b", which makes
6950
6977
  // for confusing subdomains and is never a deliberate slug.
6951
6978
  !slug.includes("--") && !RESERVED_SLUGS.has(slug);
6952
6979
  }
6953
- var OrgSlug = external_exports.string().min(2).max(32).refine(isValidSlug, "invalid or reserved slug");
6980
+ var OrgSlug = external_exports.string().min(2).max(32).refine(isValidSlug, "invalid or reserved slug").refine(isCleanOrgText, "invalid or reserved slug");
6954
6981
  var OrgWindow = external_exports.object({
6955
6982
  startDate: DateString.nullable().optional(),
6956
6983
  endDate: DateString.nullable().optional()
@@ -6994,6 +7021,17 @@ var OrgProvisionInput = external_exports.object({
6994
7021
  */
6995
7022
  issueClaimLink: external_exports.boolean().optional()
6996
7023
  });
7024
+ var OrgSelfServeInput = external_exports.object({
7025
+ slug: OrgSlug,
7026
+ name: external_exports.string().min(1).max(120).refine(isCleanOrgText, "name not allowed"),
7027
+ type: OrgType,
7028
+ description: external_exports.string().max(2e3).optional(),
7029
+ accentColor: HexColor.optional(),
7030
+ /** Who can view the board — defaults to the type's default when omitted. */
7031
+ boardVisibility: OrgBoardVisibility.optional(),
7032
+ /** Optional event window (mainly for hackathons). */
7033
+ window: OrgWindow.optional()
7034
+ });
6997
7035
  var OrgSettingsInput = external_exports.object({
6998
7036
  name: external_exports.string().min(1).max(120).optional(),
6999
7037
  description: external_exports.string().max(2e3).nullable().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whoburnedmore",
3
- "version": "0.9.7",
3
+ "version": "0.9.8",
4
4
  "description": "Find out who burned more — submit your AI coding-agent token usage to the public leaderboard at whoburnedmore.com",
5
5
  "type": "module",
6
6
  "bin": {