@codepress/codepress-engine 0.4.0-dev.tsc.20251014034858
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 +11 -0
- package/README.md +176 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +188 -0
- package/dist/cli.js.map +1 -0
- package/dist/hash-util.d.ts +15 -0
- package/dist/hash-util.js +55 -0
- package/dist/hash-util.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +175 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +29 -0
- package/dist/server.js +1076 -0
- package/dist/server.js.map +1 -0
- package/dist/swc/index.d.ts +17 -0
- package/dist/swc/index.js +126 -0
- package/dist/swc/index.js.map +1 -0
- package/package.json +119 -0
- package/swc/codepress_engine.v0_82_87.wasm +0 -0
- package/swc/codepress_engine.v26.wasm +0 -0
- package/swc/codepress_engine.v42.wasm +0 -0
- package/swc/index.js +14 -0
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type FastifyInstance } from "fastify";
|
|
2
|
+
interface StartServerOptions {
|
|
3
|
+
port?: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Create and configure the Fastify app
|
|
7
|
+
* @returns {Object} The configured Fastify instance
|
|
8
|
+
*/
|
|
9
|
+
declare function createApp(): FastifyInstance;
|
|
10
|
+
/**
|
|
11
|
+
* Starts the Codepress development server if not already running
|
|
12
|
+
* @param {Object} options Server configuration options
|
|
13
|
+
* @param {number} [options.port=4321] Port to run the server on
|
|
14
|
+
* @returns {Object|null} The Fastify instance or null if already running
|
|
15
|
+
*/
|
|
16
|
+
declare function startServer(options?: StartServerOptions): Promise<FastifyInstance | null>;
|
|
17
|
+
/**
|
|
18
|
+
* Get a list of files in the current project, respecting gitignore patterns
|
|
19
|
+
* @returns {string} List of file paths, one per line
|
|
20
|
+
*/
|
|
21
|
+
declare function getProjectStructure(): string;
|
|
22
|
+
interface ServerModule {
|
|
23
|
+
startServer: typeof startServer;
|
|
24
|
+
createApp: typeof createApp;
|
|
25
|
+
getProjectStructure: typeof getProjectStructure;
|
|
26
|
+
server?: FastifyInstance | null;
|
|
27
|
+
}
|
|
28
|
+
export { createApp, getProjectStructure, startServer };
|
|
29
|
+
export type { ServerModule };
|