@stencil/dev-server 0.0.19-1 → 5.0.0-next.0
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/{LICENSE → LICENSE.md} +12 -6
- package/dist/client/index.d.ts +126 -0
- package/dist/client/index.js +1050 -0
- package/dist/connector.html +27 -0
- package/dist/index.d.mts +54 -0
- package/dist/index.mjs +1277 -0
- package/dist/static/favicon.ico +0 -0
- package/dist/templates/directory-index.html +176 -0
- package/dist/templates/initial-load.html +147 -0
- package/dist/worker-thread.js +61 -0
- package/package.json +45 -50
- package/static/favicon.ico +0 -0
- package/templates/directory-index.html +176 -0
- package/templates/initial-load.html +147 -0
- package/README.md +0 -60
- package/assets/404.html +0 -14
- package/assets/__stencil-dev-server__/favicon.ico +0 -0
- package/assets/index.html +0 -39
- package/bin/stencil-dev-server +0 -16
- package/dist/definitions.js +0 -2
- package/dist/index.js +0 -275
- package/dist/middlewares.js +0 -106
- package/dist/promisify.js +0 -18
- package/dist/utils.js +0 -139
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>Stencil Dev Server Connector 5.0.0</title>
|
|
6
|
+
<style>body{background:black;color:white;font:18px monospace;text-align:center}</style>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
Stencil Dev Server Connector 5.0.0
|
|
10
|
+
|
|
11
|
+
<script type="module">
|
|
12
|
+
import { initDevClient } from '/~dev-server/client/index.js';
|
|
13
|
+
|
|
14
|
+
const appWindow = window.parent;
|
|
15
|
+
const config = window.__DEV_CLIENT_CONFIG__;
|
|
16
|
+
|
|
17
|
+
const defaultConfig = {
|
|
18
|
+
basePath: appWindow.location.pathname,
|
|
19
|
+
editors: [],
|
|
20
|
+
reloadStrategy: 'hmr',
|
|
21
|
+
socketUrl: `${location.protocol === 'https:' ? 'wss:' : 'ws:'}//${location.hostname}${location.port !== '' ? ':' + location.port : ''}/`,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
initDevClient(appWindow, { ...defaultConfig, ...appWindow.devServerConfig, ...config });
|
|
25
|
+
</script>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import "node:http";
|
|
2
|
+
import "node:https";
|
|
3
|
+
import { CompilerBuildResults, CompilerRequestResponse, CompilerWatcher, DevServer, DevServerConfig, DevServerConfig as DevServerConfig$1, Logger, StencilDevServerConfig } from "@stencil/core/compiler";
|
|
4
|
+
|
|
5
|
+
//#region src/server/types.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Internal dev server message protocol for communication between
|
|
8
|
+
* main process and browser clients.
|
|
9
|
+
*/
|
|
10
|
+
interface DevServerMessage {
|
|
11
|
+
startServer?: DevServerConfig$1;
|
|
12
|
+
closeServer?: boolean;
|
|
13
|
+
serverStarted?: DevServerConfig$1;
|
|
14
|
+
serverClosed?: boolean;
|
|
15
|
+
buildStart?: boolean;
|
|
16
|
+
buildLog?: BuildLog;
|
|
17
|
+
buildResults?: CompilerBuildResults;
|
|
18
|
+
requestBuildResults?: boolean;
|
|
19
|
+
error?: {
|
|
20
|
+
message?: string;
|
|
21
|
+
type?: string;
|
|
22
|
+
stack?: string | null;
|
|
23
|
+
};
|
|
24
|
+
isActivelyBuilding?: boolean;
|
|
25
|
+
compilerRequestPath?: string;
|
|
26
|
+
compilerRequestResults?: CompilerRequestResponse;
|
|
27
|
+
requestLog?: {
|
|
28
|
+
method: string;
|
|
29
|
+
url: string;
|
|
30
|
+
status: number;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
interface BuildLog {
|
|
34
|
+
buildId?: number;
|
|
35
|
+
messages?: string[];
|
|
36
|
+
progress?: number;
|
|
37
|
+
}
|
|
38
|
+
type DevServerSendMessage = (msg: DevServerMessage) => void;
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/server/server.d.ts
|
|
41
|
+
declare function initServerProcess(sendMsg: DevServerSendMessage): (msg: DevServerMessage) => void;
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/server/index.d.ts
|
|
44
|
+
/**
|
|
45
|
+
* Start the Stencil development server.
|
|
46
|
+
*
|
|
47
|
+
* @param stencilDevServerConfig - Configuration for the dev server
|
|
48
|
+
* @param logger - Logger instance for output
|
|
49
|
+
* @param watcher - Optional compiler watcher for build events
|
|
50
|
+
* @returns Promise resolving to the DevServer instance
|
|
51
|
+
*/
|
|
52
|
+
declare function start(stencilDevServerConfig: StencilDevServerConfig, logger: Logger, watcher?: CompilerWatcher): Promise<DevServer>;
|
|
53
|
+
//#endregion
|
|
54
|
+
export { type CompilerWatcher, type DevServer, type DevServerConfig, type Logger, type StencilDevServerConfig, initServerProcess, start };
|