@playcademy/vite-plugin 0.0.1-beta.3 → 0.0.1-beta.5
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 +47 -13
- package/dist/index.d.ts +19 -2
- package/dist/index.js +91673 -9054
- package/dist/lib/manifest.d.ts +20 -0
- package/dist/lib/sandbox.d.ts +9 -0
- package/dist/lib/server.d.ts +3 -0
- package/dist/pglite.data +0 -0
- package/dist/pglite.wasm +0 -0
- package/dist/utils.d.ts +13 -0
- package/package.json +5 -3
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manifest generation and build output functionality
|
|
3
|
+
*/
|
|
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
|
+
}
|
|
18
|
+
export declare function generatePlaycademyManifest(config: ResolvedConfig, options: ManifestOptions, outDir: string, buildOutputs: PlaycademyOutputData): Promise<void>;
|
|
19
|
+
export declare function createOutputZipArchive(config: ResolvedConfig, outDir: string, buildOutputs: PlaycademyOutputData): Promise<void>;
|
|
20
|
+
export declare function performPlaycademyLogging(config: ResolvedConfig, buildOutputs: PlaycademyOutputData): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ProjectInfo } from '../utils';
|
|
2
|
+
import type { ResolvedConfig } from 'vite';
|
|
3
|
+
interface SandboxManager {
|
|
4
|
+
url: string;
|
|
5
|
+
project: ProjectInfo | null;
|
|
6
|
+
cleanup: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function startSandbox(viteConfig: ResolvedConfig, autoStart?: boolean, verbose?: boolean): Promise<SandboxManager>;
|
|
9
|
+
export {};
|
package/dist/pglite.data
ADDED
|
Binary file
|
package/dist/pglite.wasm
ADDED
|
Binary file
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for the Playcademy Vite plugin
|
|
3
|
+
*/
|
|
4
|
+
import type { ResolvedConfig } from 'vite';
|
|
5
|
+
export interface ProjectInfo {
|
|
6
|
+
slug: string;
|
|
7
|
+
displayName: string;
|
|
8
|
+
version: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function extractProjectInfo(viteConfig: ResolvedConfig): ProjectInfo;
|
|
12
|
+
export declare function formatNumberWithCommas(numStr: string): string;
|
|
13
|
+
export declare function findAvailablePort(startPort?: number): Promise<number>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playcademy/vite-plugin",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.1-beta.
|
|
4
|
+
"version": "0.0.1-beta.5",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -14,10 +14,12 @@
|
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
|
-
"build": "bun build.ts",
|
|
18
|
-
"
|
|
17
|
+
"build": "rm -rf dist && bun build.ts",
|
|
18
|
+
"bump": "bunx bumpp --no-tag --no-push -c \"chore(@playcademy/vite-plugin): release v%s\"",
|
|
19
|
+
"pub": "bun run build && bun run bump && bun publish --access public"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
22
|
+
"@playcademy/sandbox": "0.1.0-beta.2",
|
|
21
23
|
"@playcademy/types": "latest",
|
|
22
24
|
"@types/archiver": "^6.0.3",
|
|
23
25
|
"@types/bun": "latest"
|