@kekkle/shared 1.4.0-next.2 → 1.4.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.
Files changed (40) hide show
  1. package/dist/cjs/fixtures/character-state.fixtures.d.ts +1 -1
  2. package/dist/cjs/fixtures/wordle-row.fixtures.d.ts +1 -1
  3. package/dist/cjs/fixtures/wordle-row.fixtures.js +1 -1
  4. package/dist/cjs/helpers/permissions/is-valid-permission.js +1 -1
  5. package/dist/cjs/helpers/worlde/all-correct-in-row.d.ts +1 -1
  6. package/dist/cjs/types/group-member.d.ts +1 -1
  7. package/dist/cjs/types/group.d.ts +3 -3
  8. package/dist/cjs/types/push-document.d.ts +2 -2
  9. package/dist/cjs/types/user.d.ts +1 -1
  10. package/dist/cjs/types/wordle-game-state-document.d.ts +1 -1
  11. package/dist/cjs/types/wordle-leaderboard.d.ts +1 -1
  12. package/dist/cjs/types/wordle-monthly-score.d.ts +1 -1
  13. package/dist/cjs/types/wordle-score.d.ts +1 -1
  14. package/dist/esm/fixtures/character-state.fixtures.d.ts +1 -1
  15. package/dist/esm/fixtures/wordle-row.fixtures.d.ts +1 -1
  16. package/dist/esm/fixtures/wordle-row.fixtures.js +1 -1
  17. package/dist/esm/helpers/permissions/is-valid-permission.js +1 -1
  18. package/dist/esm/helpers/worlde/all-correct-in-row.d.ts +1 -1
  19. package/dist/esm/types/group-member.d.ts +1 -1
  20. package/dist/esm/types/group.d.ts +3 -3
  21. package/dist/esm/types/push-document.d.ts +2 -2
  22. package/dist/esm/types/user.d.ts +1 -1
  23. package/dist/esm/types/wordle-game-state-document.d.ts +1 -1
  24. package/dist/esm/types/wordle-leaderboard.d.ts +1 -1
  25. package/dist/esm/types/wordle-monthly-score.d.ts +1 -1
  26. package/dist/esm/types/wordle-score.d.ts +1 -1
  27. package/dist/node/fixtures/character-state.fixtures.d.ts +1 -1
  28. package/dist/node/fixtures/wordle-row.fixtures.d.ts +1 -1
  29. package/dist/node/fixtures/wordle-row.fixtures.js +1 -1
  30. package/dist/node/helpers/permissions/is-valid-permission.js +1 -1
  31. package/dist/node/helpers/worlde/all-correct-in-row.d.ts +1 -1
  32. package/dist/node/types/group-member.d.ts +1 -1
  33. package/dist/node/types/group.d.ts +3 -3
  34. package/dist/node/types/push-document.d.ts +2 -2
  35. package/dist/node/types/user.d.ts +1 -1
  36. package/dist/node/types/wordle-game-state-document.d.ts +1 -1
  37. package/dist/node/types/wordle-leaderboard.d.ts +1 -1
  38. package/dist/node/types/wordle-monthly-score.d.ts +1 -1
  39. package/dist/node/types/wordle-score.d.ts +1 -1
  40. package/package.json +5 -4
@@ -1,3 +1,3 @@
1
- import { CharacterState } from "@/types/wordle-game-state.js";
1
+ import { CharacterState } from "../types/wordle-game-state.js";
2
2
  export declare function createCharacterState(character: string, isCorrect: boolean, isLocked?: boolean): CharacterState;
3
3
  //# sourceMappingURL=character-state.fixtures.d.ts.map
@@ -1,4 +1,4 @@
1
- import { WordleRow } from "@/types/wordle-game-state.js";
1
+ import { WordleRow } from "../types/wordle-game-state.js";
2
2
  export declare function createWordleRow(inputWord: string, correctWord: string): WordleRow;
3
3
  export declare function createAllCorrectWordleRow(word: string): WordleRow;
4
4
  export declare function createAllIncorrectWordleRow(word: string): WordleRow;
@@ -4,7 +4,7 @@ exports.createWordleRow = createWordleRow;
4
4
  exports.createAllCorrectWordleRow = createAllCorrectWordleRow;
5
5
  exports.createAllIncorrectWordleRow = createAllIncorrectWordleRow;
6
6
  exports.createPartialWordleRow = createPartialWordleRow;
7
- const character_state_fixtures_js_1 = require("@/fixtures/character-state.fixtures.js");
7
+ const character_state_fixtures_js_1 = require("../fixtures/character-state.fixtures.js");
8
8
  function createWordleRow(inputWord, correctWord) {
9
9
  if (inputWord.length !== correctWord.length) {
10
10
  throw new Error("Input word and correct word must be the same length");
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isValidPermission = isValidPermission;
4
- const group_permission_js_1 = require("@/enums/group-permission.js");
4
+ const group_permission_js_1 = require("../../enums/group-permission.js");
5
5
  function isValidPermission(permission) {
6
6
  return Object.values(group_permission_js_1.GroupPermission).includes(permission);
7
7
  }
@@ -1,4 +1,4 @@
1
- import { WordleRow } from "@/types/wordle-game-state.js";
1
+ import { WordleRow } from "../../types/wordle-game-state.js";
2
2
  /**
3
3
  * Method to determine if all characters are correct for a given WordleRow
4
4
  */
@@ -1,4 +1,4 @@
1
- import { GroupPermission } from "@/enums/group-permission.js";
1
+ import { GroupPermission } from "../enums/group-permission.js";
2
2
  import type { Timestamp } from "firebase-admin/firestore";
3
3
  export type GroupMember = {
4
4
  birthday: Timestamp | null;
@@ -1,7 +1,7 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { GroupGeneralData } from "@/types/group-general-data.js";
3
- import type { GroupMember } from "@/types/group-member.js";
4
- import type { Uid } from "@/types/uid.js";
2
+ import type { GroupGeneralData } from "../types/group-general-data.js";
3
+ import type { GroupMember } from "../types/group-member.js";
4
+ import type { Uid } from "../types/uid.js";
5
5
  export type Group = {
6
6
  created_at: Timestamp;
7
7
  updated_at: Timestamp;
@@ -1,6 +1,6 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { PushSettingsOptions } from "@/enums/push-settings-options.js";
3
- import type { Uid } from "@/types/uid.js";
2
+ import type { PushSettingsOptions } from "../enums/push-settings-options.js";
3
+ import type { Uid } from "../types/uid.js";
4
4
  export type AllPushSettings = {
5
5
  [key in PushSettingsOptions]: boolean | null;
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { PushTokenObject, AllPushSettings } from "@/types/push-document.js";
2
+ import type { PushTokenObject, AllPushSettings } from "../types/push-document.js";
3
3
  export type User = {
4
4
  active_group: "";
5
5
  birthdate: Timestamp;
@@ -1,4 +1,4 @@
1
- import type { StringifiedWordleGameState } from "@/types/wordle-game-state.js";
1
+ import type { StringifiedWordleGameState } from "../types/wordle-game-state.js";
2
2
  import type { Timestamp } from "firebase-admin/firestore";
3
3
  export type WordleGameStateDocument = {
4
4
  calculated_score: number;
@@ -1,5 +1,5 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { MatchTries } from "@/types/match-tries.js";
2
+ import type { MatchTries } from "../types/match-tries.js";
3
3
  export type WordleLeaderboard = {
4
4
  created_at: Timestamp;
5
5
  has_lost: number;
@@ -1,5 +1,5 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { MatchTries } from "@/types/match-tries.js";
2
+ import type { MatchTries } from "../types/match-tries.js";
3
3
  export type WordleMonthlyScore = {
4
4
  created_at: Timestamp;
5
5
  has_lost: number;
@@ -1,5 +1,5 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { StringifiedWordleGameState } from "@/types/wordle-game-state.js";
2
+ import type { StringifiedWordleGameState } from "../types/wordle-game-state.js";
3
3
  export type WordleScore = {
4
4
  created_at: Timestamp;
5
5
  game_id: string;
@@ -1,3 +1,3 @@
1
- import { CharacterState } from "@/types/wordle-game-state.js";
1
+ import { CharacterState } from "../types/wordle-game-state.js";
2
2
  export declare function createCharacterState(character: string, isCorrect: boolean, isLocked?: boolean): CharacterState;
3
3
  //# sourceMappingURL=character-state.fixtures.d.ts.map
@@ -1,4 +1,4 @@
1
- import { WordleRow } from "@/types/wordle-game-state.js";
1
+ import { WordleRow } from "../types/wordle-game-state.js";
2
2
  export declare function createWordleRow(inputWord: string, correctWord: string): WordleRow;
3
3
  export declare function createAllCorrectWordleRow(word: string): WordleRow;
4
4
  export declare function createAllIncorrectWordleRow(word: string): WordleRow;
@@ -1,4 +1,4 @@
1
- import { createCharacterState } from "@/fixtures/character-state.fixtures.js";
1
+ import { createCharacterState } from "../fixtures/character-state.fixtures.js";
2
2
  export function createWordleRow(inputWord, correctWord) {
3
3
  if (inputWord.length !== correctWord.length) {
4
4
  throw new Error("Input word and correct word must be the same length");
@@ -1,4 +1,4 @@
1
- import { GroupPermission } from "@/enums/group-permission.js";
1
+ import { GroupPermission } from "../../enums/group-permission.js";
2
2
  export function isValidPermission(permission) {
3
3
  return Object.values(GroupPermission).includes(permission);
4
4
  }
@@ -1,4 +1,4 @@
1
- import { WordleRow } from "@/types/wordle-game-state.js";
1
+ import { WordleRow } from "../../types/wordle-game-state.js";
2
2
  /**
3
3
  * Method to determine if all characters are correct for a given WordleRow
4
4
  */
@@ -1,4 +1,4 @@
1
- import { GroupPermission } from "@/enums/group-permission.js";
1
+ import { GroupPermission } from "../enums/group-permission.js";
2
2
  import type { Timestamp } from "firebase-admin/firestore";
3
3
  export type GroupMember = {
4
4
  birthday: Timestamp | null;
@@ -1,7 +1,7 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { GroupGeneralData } from "@/types/group-general-data.js";
3
- import type { GroupMember } from "@/types/group-member.js";
4
- import type { Uid } from "@/types/uid.js";
2
+ import type { GroupGeneralData } from "../types/group-general-data.js";
3
+ import type { GroupMember } from "../types/group-member.js";
4
+ import type { Uid } from "../types/uid.js";
5
5
  export type Group = {
6
6
  created_at: Timestamp;
7
7
  updated_at: Timestamp;
@@ -1,6 +1,6 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { PushSettingsOptions } from "@/enums/push-settings-options.js";
3
- import type { Uid } from "@/types/uid.js";
2
+ import type { PushSettingsOptions } from "../enums/push-settings-options.js";
3
+ import type { Uid } from "../types/uid.js";
4
4
  export type AllPushSettings = {
5
5
  [key in PushSettingsOptions]: boolean | null;
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { PushTokenObject, AllPushSettings } from "@/types/push-document.js";
2
+ import type { PushTokenObject, AllPushSettings } from "../types/push-document.js";
3
3
  export type User = {
4
4
  active_group: "";
5
5
  birthdate: Timestamp;
@@ -1,4 +1,4 @@
1
- import type { StringifiedWordleGameState } from "@/types/wordle-game-state.js";
1
+ import type { StringifiedWordleGameState } from "../types/wordle-game-state.js";
2
2
  import type { Timestamp } from "firebase-admin/firestore";
3
3
  export type WordleGameStateDocument = {
4
4
  calculated_score: number;
@@ -1,5 +1,5 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { MatchTries } from "@/types/match-tries.js";
2
+ import type { MatchTries } from "../types/match-tries.js";
3
3
  export type WordleLeaderboard = {
4
4
  created_at: Timestamp;
5
5
  has_lost: number;
@@ -1,5 +1,5 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { MatchTries } from "@/types/match-tries.js";
2
+ import type { MatchTries } from "../types/match-tries.js";
3
3
  export type WordleMonthlyScore = {
4
4
  created_at: Timestamp;
5
5
  has_lost: number;
@@ -1,5 +1,5 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { StringifiedWordleGameState } from "@/types/wordle-game-state.js";
2
+ import type { StringifiedWordleGameState } from "../types/wordle-game-state.js";
3
3
  export type WordleScore = {
4
4
  created_at: Timestamp;
5
5
  game_id: string;
@@ -1,3 +1,3 @@
1
- import { CharacterState } from "@/types/wordle-game-state.js";
1
+ import { CharacterState } from "../types/wordle-game-state.js";
2
2
  export declare function createCharacterState(character: string, isCorrect: boolean, isLocked?: boolean): CharacterState;
3
3
  //# sourceMappingURL=character-state.fixtures.d.ts.map
@@ -1,4 +1,4 @@
1
- import { WordleRow } from "@/types/wordle-game-state.js";
1
+ import { WordleRow } from "../types/wordle-game-state.js";
2
2
  export declare function createWordleRow(inputWord: string, correctWord: string): WordleRow;
3
3
  export declare function createAllCorrectWordleRow(word: string): WordleRow;
4
4
  export declare function createAllIncorrectWordleRow(word: string): WordleRow;
@@ -1,4 +1,4 @@
1
- import { createCharacterState } from "@/fixtures/character-state.fixtures.js";
1
+ import { createCharacterState } from "../fixtures/character-state.fixtures.js";
2
2
  export function createWordleRow(inputWord, correctWord) {
3
3
  if (inputWord.length !== correctWord.length) {
4
4
  throw new Error("Input word and correct word must be the same length");
@@ -1,4 +1,4 @@
1
- import { GroupPermission } from "@/enums/group-permission.js";
1
+ import { GroupPermission } from "../../enums/group-permission.js";
2
2
  export function isValidPermission(permission) {
3
3
  return Object.values(GroupPermission).includes(permission);
4
4
  }
@@ -1,4 +1,4 @@
1
- import { WordleRow } from "@/types/wordle-game-state.js";
1
+ import { WordleRow } from "../../types/wordle-game-state.js";
2
2
  /**
3
3
  * Method to determine if all characters are correct for a given WordleRow
4
4
  */
@@ -1,4 +1,4 @@
1
- import { GroupPermission } from "@/enums/group-permission.js";
1
+ import { GroupPermission } from "../enums/group-permission.js";
2
2
  import type { Timestamp } from "firebase-admin/firestore";
3
3
  export type GroupMember = {
4
4
  birthday: Timestamp | null;
@@ -1,7 +1,7 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { GroupGeneralData } from "@/types/group-general-data.js";
3
- import type { GroupMember } from "@/types/group-member.js";
4
- import type { Uid } from "@/types/uid.js";
2
+ import type { GroupGeneralData } from "../types/group-general-data.js";
3
+ import type { GroupMember } from "../types/group-member.js";
4
+ import type { Uid } from "../types/uid.js";
5
5
  export type Group = {
6
6
  created_at: Timestamp;
7
7
  updated_at: Timestamp;
@@ -1,6 +1,6 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { PushSettingsOptions } from "@/enums/push-settings-options.js";
3
- import type { Uid } from "@/types/uid.js";
2
+ import type { PushSettingsOptions } from "../enums/push-settings-options.js";
3
+ import type { Uid } from "../types/uid.js";
4
4
  export type AllPushSettings = {
5
5
  [key in PushSettingsOptions]: boolean | null;
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { PushTokenObject, AllPushSettings } from "@/types/push-document.js";
2
+ import type { PushTokenObject, AllPushSettings } from "../types/push-document.js";
3
3
  export type User = {
4
4
  active_group: "";
5
5
  birthdate: Timestamp;
@@ -1,4 +1,4 @@
1
- import type { StringifiedWordleGameState } from "@/types/wordle-game-state.js";
1
+ import type { StringifiedWordleGameState } from "../types/wordle-game-state.js";
2
2
  import type { Timestamp } from "firebase-admin/firestore";
3
3
  export type WordleGameStateDocument = {
4
4
  calculated_score: number;
@@ -1,5 +1,5 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { MatchTries } from "@/types/match-tries.js";
2
+ import type { MatchTries } from "../types/match-tries.js";
3
3
  export type WordleLeaderboard = {
4
4
  created_at: Timestamp;
5
5
  has_lost: number;
@@ -1,5 +1,5 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { MatchTries } from "@/types/match-tries.js";
2
+ import type { MatchTries } from "../types/match-tries.js";
3
3
  export type WordleMonthlyScore = {
4
4
  created_at: Timestamp;
5
5
  has_lost: number;
@@ -1,5 +1,5 @@
1
1
  import type { Timestamp } from "firebase-admin/firestore";
2
- import type { StringifiedWordleGameState } from "@/types/wordle-game-state.js";
2
+ import type { StringifiedWordleGameState } from "../types/wordle-game-state.js";
3
3
  export type WordleScore = {
4
4
  created_at: Timestamp;
5
5
  game_id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kekkle/shared",
3
- "version": "1.4.0-next.2",
3
+ "version": "1.4.0",
4
4
  "description": "Shared logic and types for Kekkle frontend and functions",
5
5
  "type": "module",
6
6
  "exports": {
@@ -20,9 +20,9 @@
20
20
  "test:ui": "vitest --ui",
21
21
  "test:coverage": "vitest run --coverage",
22
22
  "build": "npm run build:node && npm run build:esm && npm run build:cjs",
23
- "build:node": "tsc -p tsconfig.node.json",
24
- "build:esm": "tsc -p tsconfig.esm.json",
25
- "build:cjs": "tsc -p tsconfig.cjs.json",
23
+ "build:node": "tsc -p tsconfig.node.json && tsc-alias -p tsconfig.node.json",
24
+ "build:esm": "tsc -p tsconfig.esm.json && tsc-alias -p tsconfig.esm.json",
25
+ "build:cjs": "tsc -p tsconfig.cjs.json && tsc-alias -p tsconfig.cjs.json",
26
26
  "prepublishOnly": "npm run build",
27
27
  "lint": "eslint .",
28
28
  "lint:fix": "eslint . --fix"
@@ -52,6 +52,7 @@
52
52
  "eslint-plugin-prettier": "^5.5.0",
53
53
  "prettier": "^3.6.0",
54
54
  "semantic-release": "^24.2.5",
55
+ "tsc-alias": "^1.8.16",
55
56
  "typescript": "^5.6.3",
56
57
  "typescript-eslint": "^8.8.1",
57
58
  "vitest": "^3.2.4"