@playcademy/vite-plugin 0.1.32 → 0.1.33
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/dist/index.js +1777 -481
- package/dist/server/mode-switcher.d.ts +1 -6
- package/dist/server/platform-mode.d.ts +1 -14
- package/dist/server/recreate-sandbox-database.d.ts +14 -0
- package/dist/server/standalone-mode.d.ts +2 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/internal.d.ts +34 -0
- package/dist/types/options.d.ts +16 -0
- package/package.json +2 -2
|
@@ -2,12 +2,7 @@
|
|
|
2
2
|
* Mode switching functionality
|
|
3
3
|
* Handles toggling between platform and standalone modes
|
|
4
4
|
*/
|
|
5
|
-
import type {
|
|
6
|
-
import type { PlatformModeOptions } from './platform-mode';
|
|
7
|
-
export interface ModeSwitcherOptions {
|
|
8
|
-
viteConfig: ResolvedConfig;
|
|
9
|
-
platformModeOptions: PlatformModeOptions;
|
|
10
|
-
}
|
|
5
|
+
import type { ModeSwitcherOptions } from '../types';
|
|
11
6
|
/**
|
|
12
7
|
* Toggle between platform and standalone modes
|
|
13
8
|
*/
|
|
@@ -3,20 +3,7 @@
|
|
|
3
3
|
* Full Playcademy platform: sandbox + backend + shell wrapper
|
|
4
4
|
*/
|
|
5
5
|
import type { ResolvedConfig, ViteDevServer } from 'vite';
|
|
6
|
-
|
|
7
|
-
startSandbox: boolean;
|
|
8
|
-
verbose: boolean;
|
|
9
|
-
logLevel: 'debug' | 'info' | 'warn' | 'error';
|
|
10
|
-
sandboxUrl: string;
|
|
11
|
-
recreateDb: boolean;
|
|
12
|
-
seed: boolean;
|
|
13
|
-
memoryOnly: boolean;
|
|
14
|
-
databasePath?: string;
|
|
15
|
-
realtimeEnabled: boolean;
|
|
16
|
-
realtimePort?: number;
|
|
17
|
-
showBadge: boolean;
|
|
18
|
-
preferredBackendPort: number;
|
|
19
|
-
}
|
|
6
|
+
import type { PlatformModeOptions } from '../types';
|
|
20
7
|
/**
|
|
21
8
|
* Configure server in platform mode (sandbox + backend + shell)
|
|
22
9
|
*/
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sandbox database recreation functionality
|
|
3
|
+
* Handles recreating the sandbox database on-demand
|
|
4
|
+
*/
|
|
5
|
+
import type { ResolvedConfig } from 'vite';
|
|
6
|
+
import type { PlatformModeOptions } from '../types';
|
|
7
|
+
export interface RecreateSandboxDatabaseOptions {
|
|
8
|
+
viteConfig: ResolvedConfig;
|
|
9
|
+
platformModeOptions: PlatformModeOptions;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Recreate the sandbox database
|
|
13
|
+
*/
|
|
14
|
+
export declare function recreateSandboxDatabase(options: RecreateSandboxDatabaseOptions): Promise<void>;
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* Backend only, no sandbox or shell wrapper
|
|
4
4
|
*/
|
|
5
5
|
import type { ResolvedConfig, ViteDevServer } from 'vite';
|
|
6
|
+
import type { StandaloneModeOptions } from '../types';
|
|
6
7
|
/**
|
|
7
8
|
* Configure server in standalone mode (backend only, no sandbox or shell)
|
|
8
9
|
*/
|
|
9
|
-
export declare function configureStandaloneMode(server: ViteDevServer, viteConfig: ResolvedConfig,
|
|
10
|
+
export declare function configureStandaloneMode(server: ViteDevServer, viteConfig: ResolvedConfig, options: StandaloneModeOptions): Promise<void>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Type exports for the Playcademy Vite Plugin
|
|
3
3
|
*/
|
|
4
4
|
export type { PlaycademyExportOptions, PlaycademySandboxOptions, PlaycademyShellOptions, PlaycademyPluginOptions, PlaycademyMode, } from './options';
|
|
5
|
-
export type { ResolvedPluginOptions, PluginContext, PlaycademyOutputData, ProjectInfo, SandboxManager, CliServerManager, CliDevServerOptions, } from './internal';
|
|
5
|
+
export type { ResolvedPluginOptions, PluginContext, PlaycademyOutputData, ProjectInfo, SandboxManager, CliServerManager, CliDevServerOptions, PlatformModeOptions, StandaloneModeOptions, ModeSwitcherOptions, } from './internal';
|
package/dist/types/internal.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type { PlaycademyMode } from './options';
|
|
|
7
7
|
* Internal resolved plugin options
|
|
8
8
|
*/
|
|
9
9
|
export interface ResolvedPluginOptions {
|
|
10
|
+
configPath?: string;
|
|
10
11
|
mode: PlaycademyMode;
|
|
11
12
|
autoZip: boolean;
|
|
12
13
|
sandboxUrl: string;
|
|
@@ -77,4 +78,37 @@ export interface CliDevServerOptions {
|
|
|
77
78
|
preferredPort: number;
|
|
78
79
|
viteConfig: ResolvedConfig;
|
|
79
80
|
platformUrl?: string;
|
|
81
|
+
configPath?: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Options for platform mode (sandbox + backend + shell)
|
|
85
|
+
*/
|
|
86
|
+
export interface PlatformModeOptions {
|
|
87
|
+
startSandbox: boolean;
|
|
88
|
+
verbose: boolean;
|
|
89
|
+
logLevel: 'debug' | 'info' | 'warn' | 'error';
|
|
90
|
+
sandboxUrl: string;
|
|
91
|
+
recreateDb: boolean;
|
|
92
|
+
seed: boolean;
|
|
93
|
+
memoryOnly: boolean;
|
|
94
|
+
databasePath?: string;
|
|
95
|
+
realtimeEnabled: boolean;
|
|
96
|
+
realtimePort?: number;
|
|
97
|
+
showBadge: boolean;
|
|
98
|
+
preferredBackendPort: number;
|
|
99
|
+
configPath?: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Options for standalone mode (backend only)
|
|
103
|
+
*/
|
|
104
|
+
export interface StandaloneModeOptions {
|
|
105
|
+
preferredPort: number;
|
|
106
|
+
configPath?: string;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Options for mode switching
|
|
110
|
+
*/
|
|
111
|
+
export interface ModeSwitcherOptions {
|
|
112
|
+
viteConfig: ResolvedConfig;
|
|
113
|
+
platformModeOptions: PlatformModeOptions;
|
|
80
114
|
}
|
package/dist/types/options.d.ts
CHANGED
|
@@ -255,6 +255,22 @@ export interface PlaycademyShellOptions {
|
|
|
255
255
|
* ```
|
|
256
256
|
*/
|
|
257
257
|
export interface PlaycademyPluginOptions {
|
|
258
|
+
/**
|
|
259
|
+
* Path to the playcademy.config.js file.
|
|
260
|
+
*
|
|
261
|
+
* By default, the plugin searches for the config file in the current directory
|
|
262
|
+
* and up to 3 parent directories. Use this option to explicitly specify the
|
|
263
|
+
* config file path when using non-standard project structures.
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* ```ts
|
|
267
|
+
* // When running from a client/ subdirectory with config in root
|
|
268
|
+
* {
|
|
269
|
+
* configPath: '../playcademy.config.js'
|
|
270
|
+
* }
|
|
271
|
+
* ```
|
|
272
|
+
*/
|
|
273
|
+
configPath?: string;
|
|
258
274
|
/**
|
|
259
275
|
* Plugin operation mode.
|
|
260
276
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playcademy/vite-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"archiver": "^7.0.1",
|
|
23
23
|
"picocolors": "^1.1.1",
|
|
24
|
-
"playcademy": "0.14.
|
|
24
|
+
"playcademy": "0.14.20"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@inquirer/prompts": "^7.8.6",
|