@alpic80/rivet-cli 1.24.0-aidon.6 → 1.24.0-aidon.7

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.
@@ -12,6 +12,11 @@ import { setupPlugins, logAvailablePluginsInfo } from './pluginConfiguration.js'
12
12
  import { combinedLogger } from '../lib/logger.js';
13
13
  export function makeCommand(y) {
14
14
  return y
15
+ .option('hostname', {
16
+ describe: 'The hostname to serve on',
17
+ type: 'string',
18
+ demandOption: false,
19
+ })
15
20
  .option('port', {
16
21
  describe: 'The port to serve on',
17
22
  type: 'number',
@@ -108,6 +113,7 @@ export async function serve(cliArgs = {}) {
108
113
  debugger;
109
114
  const pluginSettings = await setupPlugins(Rivet);
110
115
  const args = {
116
+ hostname: cliArgs.hostname ?? process.env.HOSTNAME ?? '127.0.0.1',
111
117
  port: Number(cliArgs.port ?? process.env.PORT ?? 3000),
112
118
  projectFile: cliArgs.projectFile ?? process.env.PROJECT_FILE,
113
119
  dev: cliArgs.dev ?? process.env.NODE_ENV === 'development',
@@ -203,6 +209,7 @@ export async function serve(cliArgs = {}) {
203
209
  }
204
210
  const server = serveHono({
205
211
  port: args.port,
212
+ hostname: args.hostname,
206
213
  fetch: app.fetch,
207
214
  });
208
215
  if (args.projectsRootDir) {
@@ -1,5 +1,7 @@
1
1
  import type * as yargs from 'yargs';
2
2
  export declare function makeCommand<T>(y: yargs.Argv<T>): yargs.Argv<T & {
3
+ hostname: string | undefined;
4
+ } & {
3
5
  port: number;
4
6
  } & {
5
7
  dev: boolean;
@@ -33,6 +35,7 @@ export declare function makeCommand<T>(y: yargs.Argv<T>): yargs.Argv<T & {
33
35
  projectFile: string | undefined;
34
36
  }>;
35
37
  type ServerContext = {
38
+ hostname: string | undefined;
36
39
  port: number;
37
40
  projectFile: string | undefined;
38
41
  dev: boolean;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@alpic80/rivet-cli",
3
3
  "license": "MIT",
4
4
  "repository": "https://github.com/castortech/rivet",
5
- "version": "1.24.0-aidon.6",
5
+ "version": "1.24.0-aidon.7",
6
6
  "src": "bin/cli.ts",
7
7
  "bin": {
8
8
  "rivet": "bin/cli.js"