@playcademy/vite-plugin 0.0.1-beta.11 → 0.0.1-beta.12

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.
@@ -2,19 +2,7 @@
2
2
  * Manifest generation and build output functionality
3
3
  */
4
4
  import type { ResolvedConfig } from 'vite';
5
- import type { ManifestV1 } from '@playcademy/types';
6
- export interface PlaycademyOutputData {
7
- manifestPath?: string;
8
- manifestSizeKb?: string;
9
- zipPath?: string;
10
- zipSizeKb?: string;
11
- }
12
- export interface ManifestOptions {
13
- bootMode: ManifestV1['bootMode'];
14
- entryPoint: string;
15
- styles: string[];
16
- platform: ManifestV1['platform'];
17
- }
5
+ import type { ManifestOptions, PlaycademyOutputData } from '../types';
18
6
  export declare function generatePlaycademyManifest(config: ResolvedConfig, options: ManifestOptions, outDir: string, buildOutputs: PlaycademyOutputData): Promise<void>;
19
7
  export declare function createOutputZipArchive(config: ResolvedConfig, outDir: string, buildOutputs: PlaycademyOutputData): Promise<void>;
20
8
  export declare function performPlaycademyLogging(config: ResolvedConfig, buildOutputs: PlaycademyOutputData): void;
@@ -1,9 +1,3 @@
1
- import { type ProjectInfo } from '../utils';
2
1
  import type { ResolvedConfig } from 'vite';
3
- interface SandboxManager {
4
- url: string;
5
- project: ProjectInfo | null;
6
- cleanup: () => void;
7
- }
2
+ import type { SandboxManager } from '../types';
8
3
  export declare function startSandbox(viteConfig: ResolvedConfig, autoStart?: boolean, verbose?: boolean, customUrl?: string): Promise<SandboxManager>;
9
- export {};
@@ -1,3 +1,3 @@
1
1
  import type { ViteDevServer } from 'vite';
2
- import type { ProjectInfo } from '../utils';
2
+ import type { ProjectInfo } from '../types';
3
3
  export declare function devServerMiddleware(server: ViteDevServer, sandboxUrl: string, project: ProjectInfo): void;
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Type definitions for the Playcademy Vite Plugin
3
+ */
4
+ import type { ManifestV1 } from '@playcademy/data/types';
5
+ /**
6
+ * Project information extracted from package.json and directory structure
7
+ */
8
+ export interface ProjectInfo {
9
+ slug: string;
10
+ displayName: string;
11
+ version: string;
12
+ description?: string;
13
+ }
14
+ /**
15
+ * Configuration options for exporting Playcademy games
16
+ */
17
+ export interface PlaycademyExportOptions {
18
+ bootMode?: ManifestV1['bootMode'];
19
+ entryPoint?: string;
20
+ styles?: string[];
21
+ platform?: ManifestV1['platform'];
22
+ autoZip?: boolean;
23
+ }
24
+ /**
25
+ * Configuration options for the Playcademy sandbox server
26
+ */
27
+ export interface PlaycademySandboxOptions {
28
+ autoStart?: boolean;
29
+ url?: string;
30
+ verbose?: boolean;
31
+ }
32
+ /**
33
+ * Main plugin configuration options
34
+ */
35
+ export interface PlaycademyPluginOptions {
36
+ export?: PlaycademyExportOptions;
37
+ sandbox?: PlaycademySandboxOptions;
38
+ }
39
+ /**
40
+ * Build output data for logging and tracking
41
+ */
42
+ export interface PlaycademyOutputData {
43
+ manifestPath?: string;
44
+ manifestSizeKb?: string;
45
+ zipPath?: string;
46
+ zipSizeKb?: string;
47
+ }
48
+ /**
49
+ * Options for manifest generation
50
+ */
51
+ export interface ManifestOptions {
52
+ bootMode: ManifestV1['bootMode'];
53
+ entryPoint: string;
54
+ styles: string[];
55
+ platform: ManifestV1['platform'];
56
+ }
57
+ /**
58
+ * Sandbox manager interface for controlling sandbox lifecycle
59
+ */
60
+ export interface SandboxManager {
61
+ url: string;
62
+ project: ProjectInfo | null;
63
+ cleanup: () => void;
64
+ }
package/dist/types.js ADDED
File without changes
package/dist/utils.d.ts CHANGED
@@ -2,12 +2,7 @@
2
2
  * Utility functions for the Playcademy Vite plugin
3
3
  */
4
4
  import type { ResolvedConfig } from 'vite';
5
- export interface ProjectInfo {
6
- slug: string;
7
- displayName: string;
8
- version: string;
9
- description?: string;
10
- }
5
+ import type { ProjectInfo } from './types';
11
6
  export declare function extractProjectInfo(viteConfig: ResolvedConfig): ProjectInfo;
12
7
  export declare function formatNumberWithCommas(numStr: string): string;
13
8
  export declare function findAvailablePort(startPort?: number): Promise<number>;
package/package.json CHANGED
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "@playcademy/vite-plugin",
3
- "version": "0.0.1-beta.11",
3
+ "version": "0.0.1-beta.12",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
7
7
  "import": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts"
9
+ },
10
+ "./types": {
11
+ "import": "./dist/types.js",
12
+ "types": "./dist/types.d.ts"
9
13
  }
10
14
  },
11
15
  "main": "dist/index.js",
@@ -24,7 +28,6 @@
24
28
  },
25
29
  "devDependencies": {
26
30
  "@playcademy/sandbox": "0.1.0-beta.8",
27
- "@playcademy/types": "latest",
28
31
  "@types/archiver": "^6.0.3",
29
32
  "@types/bun": "latest",
30
33
  "yocto-spinner": "^0.2.2"