@forinda/kickjs-cli 1.6.0 → 1.7.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/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { _ as E, a as ee, b as P, c as te, d as oe, f as re, g as S, h as L, i as ne, l as ie, m as se, n as w, o as ae, p as _, r as R, s as ce, u as de, v as M, y as $ } from "./config-
|
|
2
|
+
import { _ as E, a as ee, b as P, c as te, d as oe, f as re, g as S, h as L, i as ne, l as ie, m as se, n as w, o as ae, p as _, r as R, s as ce, u as de, v as M, y as $ } from "./config-BpzSENAH.js";
|
|
3
3
|
import { basename as pe, dirname as le, join as g, resolve as m } from "node:path";
|
|
4
4
|
import { createInterface as N } from "node:readline";
|
|
5
5
|
import { readFile as B, rm as me, writeFile as W } from "node:fs/promises";
|
|
@@ -1791,8 +1791,7 @@ export const modules: AppModuleClass[] = [${e}Module]
|
|
|
1791
1791
|
}
|
|
1792
1792
|
async function nt(r) {
|
|
1793
1793
|
const { name: e, outDir: t } = r, o = y(e), s = h(e), i = [], n = p(t, `${o}.adapter.ts`);
|
|
1794
|
-
return await l(n, `import type {
|
|
1795
|
-
import type { AppAdapter, AdapterMiddleware, Container } from '@forinda/kickjs-core'
|
|
1794
|
+
return await l(n, `import type { AppAdapter, AdapterContext, AdapterMiddleware } from '@forinda/kickjs-core'
|
|
1796
1795
|
|
|
1797
1796
|
export interface ${s}AdapterOptions {
|
|
1798
1797
|
// Add your adapter configuration here
|
|
@@ -1843,7 +1842,7 @@ export class ${s}Adapter implements AppAdapter {
|
|
|
1843
1842
|
* Use this to mount routes that bypass the middleware stack
|
|
1844
1843
|
* (health checks, docs UI, static assets).
|
|
1845
1844
|
*/
|
|
1846
|
-
beforeMount(app
|
|
1845
|
+
beforeMount({ app }: AdapterContext): void {
|
|
1847
1846
|
// Example: mount a status route
|
|
1848
1847
|
// app.get('/${o}/status', (_req, res) => {
|
|
1849
1848
|
// res.json({ status: 'ok' })
|
|
@@ -1854,7 +1853,7 @@ export class ${s}Adapter implements AppAdapter {
|
|
|
1854
1853
|
* Called after modules and routes are registered, before the server starts.
|
|
1855
1854
|
* Use this for late-stage DI registrations or config validation.
|
|
1856
1855
|
*/
|
|
1857
|
-
beforeStart(
|
|
1856
|
+
beforeStart({ container }: AdapterContext): void {
|
|
1858
1857
|
// Example: register a service in the DI container
|
|
1859
1858
|
// container.registerInstance(MY_TOKEN, new MyService(this.options))
|
|
1860
1859
|
}
|
|
@@ -1863,7 +1862,7 @@ export class ${s}Adapter implements AppAdapter {
|
|
|
1863
1862
|
* Called after the HTTP server is listening.
|
|
1864
1863
|
* Use this to attach to the raw http.Server (Socket.IO, gRPC, etc).
|
|
1865
1864
|
*/
|
|
1866
|
-
afterStart(server
|
|
1865
|
+
afterStart({ server, container }: AdapterContext): void {
|
|
1867
1866
|
// Example: attach Socket.IO
|
|
1868
1867
|
// const io = new Server(server)
|
|
1869
1868
|
// container.registerInstance(SOCKET_IO, io)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/generators/adapter.ts"],"names":[],"mappings":"AAIA,UAAU,sBAAsB;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/generators/adapter.ts"],"names":[],"mappings":"AAIA,UAAU,sBAAsB;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAmGxF"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as a, a as s, c as r, d as t, g as o, h as n, i, l as g, n as l, o as d, p as C, s as c, t as p, u as f } from "./config-
|
|
1
|
+
import { _ as a, a as s, c as r, d as t, g as o, h as n, i, l as g, n as l, o as d, p as C, s as c, t as p, u as f } from "./config-BpzSENAH.js";
|
|
2
2
|
export {
|
|
3
3
|
p as defineConfig,
|
|
4
4
|
f as generateAdapter,
|