@playcademy/vite-plugin 0.2.19 → 0.2.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.
@@ -6,6 +6,6 @@ import type { ResolvedConfig } from 'vite';
6
6
  * Creates hot reload callbacks for logging backend updates.
7
7
  */
8
8
  export declare function createHotReloadCallbacks(viteConfig: ResolvedConfig): {
9
- onSuccess: (changedPath?: string) => void;
9
+ onSuccess: (changedPath?: string | undefined) => void;
10
10
  onError: (error: unknown) => void;
11
11
  };
@@ -26,12 +26,12 @@ export declare function hasTimebackCredentials(): boolean;
26
26
  export declare function validateTimebackConfig(viteConfig: ResolvedConfig, timeback?: PlaycademyTimebackOptions): void;
27
27
  type OrgType = 'school' | 'district' | 'department' | 'local' | 'state' | 'national';
28
28
  /** SDK-compatible organization shape (includes isPrimary for array format) */
29
- type SdkOrganization = {
29
+ interface SdkOrganization {
30
30
  id: string;
31
31
  name: string | null;
32
32
  type: string;
33
33
  isPrimary: boolean;
34
- };
34
+ }
35
35
  /**
36
36
  * Resolve organization config to a normalized object.
37
37
  * Used by sandbox config which expects a single organization.
@@ -12,14 +12,4 @@
12
12
  * - signature: "sandbox" (not cryptographically verified)
13
13
  */
14
14
  import type { PlatformRoleOverride } from '../../types';
15
- /**
16
- * Create a sandbox game token
17
- *
18
- * This token allows the sandbox auth to identify both the user
19
- * and the game context, mimicking how the platform issues game JWTs.
20
- *
21
- * @param gameSlug - The game's slug (used to look up game in sandbox DB)
22
- * @param role - Platform role (defaults to 'player')
23
- * @returns JWT-like token string
24
- */
25
15
  export declare function createSandboxGameToken(gameSlug: string, role?: PlatformRoleOverride): string;
package/dist/pglite.data CHANGED
Binary file
package/dist/pglite.wasm CHANGED
Binary file
@@ -2,7 +2,7 @@
2
2
  * 'p' hotkey - cycle platform user role (player/developer/admin)
3
3
  */
4
4
  import type { HotkeyOptions } from '../../types';
5
- export declare const cyclePlatformRoleHotkey: (options: HotkeyOptions) => {
5
+ export declare function cyclePlatformRoleHotkey(options: HotkeyOptions): {
6
6
  key: string;
7
7
  description: string;
8
8
  action: () => void;
@@ -2,7 +2,7 @@
2
2
  * 't' hotkey - cycle TimeBack user role
3
3
  */
4
4
  import type { HotkeyOptions } from '../../types';
5
- export declare const cycleTimebackRoleHotkey: (options: HotkeyOptions) => {
5
+ export declare function cycleTimebackRoleHotkey(options: HotkeyOptions): {
6
6
  key: string;
7
7
  description: string;
8
8
  action: () => void;
@@ -2,7 +2,7 @@
2
2
  * 'd' hotkey - recreate sandbox database
3
3
  */
4
4
  import type { HotkeyOptions } from '../../types';
5
- export declare const recreateDatabaseHotkey: (options: HotkeyOptions) => {
5
+ export declare function recreateDatabaseHotkey(options: HotkeyOptions): {
6
6
  key: string;
7
7
  description: string;
8
8
  action: () => Promise<void>;
@@ -2,7 +2,7 @@
2
2
  * 'm' hotkey - toggle platform/standalone mode
3
3
  */
4
4
  import type { HotkeyOptions } from '../../types';
5
- export declare const toggleModeHotkey: (options: HotkeyOptions) => {
5
+ export declare function toggleModeHotkey(options: HotkeyOptions): {
6
6
  key: string;
7
7
  description: string;
8
8
  action: () => Promise<void>;
@@ -17,8 +17,8 @@ export declare const serverState: {
17
17
  backend: CliServerManager | null;
18
18
  viteServer: ViteDevServer | null;
19
19
  currentMode: PlaycademyMode;
20
- timebackRoleOverride: TimebackRoleOverride | null;
21
- platformRoleOverride: PlatformRoleOverride | null;
20
+ timebackRoleOverride: "administrator" | "parent" | "student" | "teacher" | null;
21
+ platformRoleOverride: "admin" | "developer" | "player" | null;
22
22
  };
23
23
  /**
24
24
  * Get sandbox server reference
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcademy/vite-plugin",
3
- "version": "0.2.19",
3
+ "version": "0.2.21",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -14,19 +14,22 @@
14
14
  "dist"
15
15
  ],
16
16
  "scripts": {
17
- "build": "rm -rf dist && bun build.ts",
18
- "check": "bunx @typescript/native-preview --noEmit",
17
+ "build": "bun build.ts",
19
18
  "docs": "typedoc --skipErrorChecking",
20
19
  "pub": "bun publish.ts"
21
20
  },
22
21
  "dependencies": {
23
22
  "archiver": "^7.0.1",
24
23
  "picocolors": "^1.1.1",
25
- "playcademy": "0.16.17"
24
+ "playcademy": "0.18.3"
26
25
  },
27
26
  "devDependencies": {
27
+ "@electric-sql/pglite": "^0.3.16",
28
28
  "@inquirer/prompts": "^7.8.6",
29
- "@playcademy/sandbox": "0.3.14",
29
+ "@playcademy/constants": "0.0.1",
30
+ "@playcademy/sandbox": "0.3.15",
31
+ "@playcademy/sdk": "0.3.2",
32
+ "@playcademy/types": "0.0.1",
30
33
  "@playcademy/utils": "0.0.1",
31
34
  "@types/archiver": "^6.0.3",
32
35
  "@types/bun": "latest"