@playcademy/vite-plugin 0.2.0 → 0.2.1
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/README.md +1 -31
- package/dist/index.js +10934 -24185
- package/dist/lib/logging/utils.d.ts +1 -1
- package/dist/lib/sandbox/server.d.ts +0 -2
- package/dist/types/internal.d.ts +1 -8
- package/dist/types/options.d.ts +3 -35
- package/package.json +3 -3
|
@@ -16,7 +16,7 @@ export declare function createBackendBannerOptions(backendPort: number | undefin
|
|
|
16
16
|
/**
|
|
17
17
|
* Create timeback banner options from sandbox state
|
|
18
18
|
*/
|
|
19
|
-
export declare function createTimebackBannerOptions(timebackMode: 'mock' | 'remote' | 'local' | null | undefined, courseCount: number | undefined): BannerOptions['timeback'];
|
|
19
|
+
export declare function createTimebackBannerOptions(timebackMode: 'mock' | 'remote' | 'local' | null | undefined, courseCount: number | undefined, enrolledCount?: number): BannerOptions['timeback'];
|
|
20
20
|
/**
|
|
21
21
|
* Prints a startup banner showing all running servers in Vite's style.
|
|
22
22
|
*
|
|
@@ -8,8 +8,6 @@ export declare function startSandbox(viteConfig: ResolvedConfig, autoStart?: boo
|
|
|
8
8
|
seed?: boolean;
|
|
9
9
|
memoryOnly?: boolean;
|
|
10
10
|
databasePath?: string;
|
|
11
|
-
realtimeEnabled?: boolean;
|
|
12
|
-
realtimePort?: number;
|
|
13
11
|
logLevel?: 'debug' | 'info' | 'warn' | 'error';
|
|
14
12
|
timebackOptions?: PlaycademyTimebackOptions | false;
|
|
15
13
|
}): Promise<SandboxManager>;
|
package/dist/types/internal.d.ts
CHANGED
|
@@ -28,8 +28,6 @@ export interface ResolvedPluginOptions {
|
|
|
28
28
|
seed: boolean;
|
|
29
29
|
memoryOnly: boolean;
|
|
30
30
|
databasePath?: string;
|
|
31
|
-
realtimeEnabled: boolean;
|
|
32
|
-
realtimePort?: number;
|
|
33
31
|
hideBadge: boolean;
|
|
34
32
|
timeback?: PlaycademyTimebackOptions | false;
|
|
35
33
|
}
|
|
@@ -90,9 +88,7 @@ export interface ProjectInfo {
|
|
|
90
88
|
*/
|
|
91
89
|
export interface SandboxManager {
|
|
92
90
|
baseUrl: string;
|
|
93
|
-
realtimeUrl: string;
|
|
94
91
|
port: number;
|
|
95
|
-
realtimePort?: number;
|
|
96
92
|
project: ProjectInfo | null;
|
|
97
93
|
timebackMode?: 'mock' | 'remote' | 'local' | null;
|
|
98
94
|
setRole?: (role: TimebackRoleOverride) => void;
|
|
@@ -131,8 +127,6 @@ export interface PlatformModeOptions {
|
|
|
131
127
|
seed: boolean;
|
|
132
128
|
memoryOnly: boolean;
|
|
133
129
|
databasePath?: string;
|
|
134
|
-
realtimeEnabled: boolean;
|
|
135
|
-
realtimePort?: number;
|
|
136
130
|
hideBadge: boolean;
|
|
137
131
|
backendPort: number;
|
|
138
132
|
configPath?: string;
|
|
@@ -173,11 +167,10 @@ export interface BannerOptions {
|
|
|
173
167
|
/** Vite port for proxied URL display */
|
|
174
168
|
vitePort?: number;
|
|
175
169
|
};
|
|
176
|
-
/** Realtime server port (platform mode only) */
|
|
177
|
-
realtimePort?: number;
|
|
178
170
|
/** Timeback info (platform mode only) */
|
|
179
171
|
timeback?: {
|
|
180
172
|
courseCount: number;
|
|
173
|
+
enrolledCount: number;
|
|
181
174
|
mode: 'mock' | 'remote' | 'local';
|
|
182
175
|
};
|
|
183
176
|
}
|
package/dist/types/options.d.ts
CHANGED
|
@@ -174,38 +174,6 @@ export interface PlaycademySandboxOptions {
|
|
|
174
174
|
* ```
|
|
175
175
|
*/
|
|
176
176
|
databasePath?: string;
|
|
177
|
-
/**
|
|
178
|
-
* Real-time/WebSocket server configuration.
|
|
179
|
-
*
|
|
180
|
-
* The real-time server provides WebSocket support for live updates,
|
|
181
|
-
* multiplayer features, and other real-time functionality.
|
|
182
|
-
*
|
|
183
|
-
* @default { enabled: false }
|
|
184
|
-
* @example
|
|
185
|
-
* ```ts
|
|
186
|
-
* sandbox: {
|
|
187
|
-
* realtime: {
|
|
188
|
-
* enabled: true,
|
|
189
|
-
* port: 4322 // Custom WebSocket port
|
|
190
|
-
* }
|
|
191
|
-
* }
|
|
192
|
-
* ```
|
|
193
|
-
*/
|
|
194
|
-
realtime?: {
|
|
195
|
-
/**
|
|
196
|
-
* Enable the real-time/WebSocket server.
|
|
197
|
-
*
|
|
198
|
-
* @default false
|
|
199
|
-
*/
|
|
200
|
-
enabled?: boolean;
|
|
201
|
-
/**
|
|
202
|
-
* Port for the WebSocket server.
|
|
203
|
-
*
|
|
204
|
-
* By default, uses the HTTP port + 1 (e.g., if HTTP is 4321,
|
|
205
|
-
* WebSocket will be 4322).
|
|
206
|
-
*/
|
|
207
|
-
port?: number;
|
|
208
|
-
};
|
|
209
177
|
}
|
|
210
178
|
/**
|
|
211
179
|
* Timeback integration configuration for local development.
|
|
@@ -233,7 +201,7 @@ export interface PlaycademySandboxOptions {
|
|
|
233
201
|
* // Exclude a course from enrollment (test partial enrollment)
|
|
234
202
|
* timeback: {
|
|
235
203
|
* courses: {
|
|
236
|
-
* 'FastMath:4':
|
|
204
|
+
* 'FastMath:4': false, // Not enrolled in grade 4
|
|
237
205
|
* },
|
|
238
206
|
* }
|
|
239
207
|
*
|
|
@@ -278,9 +246,9 @@ export interface PlaycademyTimebackOptions {
|
|
|
278
246
|
* - Omit entirely: Use all courses from config with mock IDs
|
|
279
247
|
* - `'mock'` or omit key: Use mock ID for that course
|
|
280
248
|
* - Real string: Use that course ID
|
|
281
|
-
* - `null`: Exclude from enrollment
|
|
249
|
+
* - `null` or `false`: Exclude from enrollment
|
|
282
250
|
*/
|
|
283
|
-
courses?: Record<string, 'mock' | string | null>;
|
|
251
|
+
courses?: Record<string, 'mock' | string | null | false>;
|
|
284
252
|
}
|
|
285
253
|
/**
|
|
286
254
|
* Configuration options for the development shell wrapper
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playcademy/vite-plugin",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"@playcademy/utils": "0.0.1",
|
|
23
23
|
"archiver": "^7.0.1",
|
|
24
24
|
"picocolors": "^1.1.1",
|
|
25
|
-
"playcademy": "0.14.
|
|
25
|
+
"playcademy": "0.14.27"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@inquirer/prompts": "^7.8.6",
|
|
29
|
-
"@playcademy/sandbox": "0.3.
|
|
29
|
+
"@playcademy/sandbox": "0.3.6",
|
|
30
30
|
"@types/archiver": "^6.0.3",
|
|
31
31
|
"@types/bun": "latest"
|
|
32
32
|
},
|