@raystack/chronicle 0.5.0 → 0.5.2
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/index.js
CHANGED
|
@@ -365,7 +365,7 @@ var buildCommand = new Command("build").description("Build for production").opti
|
|
|
365
365
|
// src/cli/commands/dev.ts
|
|
366
366
|
import chalk3 from "chalk";
|
|
367
367
|
import { Command as Command2 } from "commander";
|
|
368
|
-
var devCommand = new Command2("dev").description("Start development server").option("-p, --port <port>", "Port number", "3000").option("--content <path>", "Content directory").option("--config <path>", "Path to chronicle.yaml").action(async (options) => {
|
|
368
|
+
var devCommand = new Command2("dev").description("Start development server").option("-p, --port <port>", "Port number", "3000").option("--content <path>", "Content directory").option("--config <path>", "Path to chronicle.yaml").option("--host <host>", "Host address", "localhost").action(async (options) => {
|
|
369
369
|
const { contentDir, configPath } = await loadCLIConfig(options.config, { content: options.content });
|
|
370
370
|
const port = parseInt(options.port, 10);
|
|
371
371
|
await linkContent(contentDir);
|
|
@@ -375,7 +375,7 @@ var devCommand = new Command2("dev").description("Start development server").opt
|
|
|
375
375
|
const config2 = await createViteConfig2({ packageRoot: PACKAGE_ROOT, projectRoot: process.cwd(), contentDir, configPath });
|
|
376
376
|
const server = await createServer({
|
|
377
377
|
...config2,
|
|
378
|
-
server: { ...config2.server, port }
|
|
378
|
+
server: { ...config2.server, port, host: options.host }
|
|
379
379
|
});
|
|
380
380
|
await server.listen();
|
|
381
381
|
server.printUrls();
|
|
@@ -450,7 +450,7 @@ Run`, chalk4.cyan("chronicle dev"), "to start development server");
|
|
|
450
450
|
// src/cli/commands/serve.ts
|
|
451
451
|
import chalk5 from "chalk";
|
|
452
452
|
import { Command as Command4 } from "commander";
|
|
453
|
-
var serveCommand = new Command4("serve").description("Build and start production server").option("-p, --port <port>", "Port number", "3000").option("--content <path>", "Content directory").option("--config <path>", "Path to chronicle.yaml").option("--preset <preset>", "Deploy preset (vercel, cloudflare, node-server)").action(async (options) => {
|
|
453
|
+
var serveCommand = new Command4("serve").description("Build and start production server").option("-p, --port <port>", "Port number", "3000").option("--content <path>", "Content directory").option("--config <path>", "Path to chronicle.yaml").option("--host <host>", "Host address", "localhost").option("--preset <preset>", "Deploy preset (vercel, cloudflare, node-server)").action(async (options) => {
|
|
454
454
|
const { contentDir, configPath, preset } = await loadCLIConfig(options.config, {
|
|
455
455
|
content: options.content,
|
|
456
456
|
preset: options.preset
|
|
@@ -471,7 +471,7 @@ var serveCommand = new Command4("serve").description("Build and start production
|
|
|
471
471
|
console.log(chalk5.cyan("Starting production server..."));
|
|
472
472
|
const server = await preview({
|
|
473
473
|
...config2,
|
|
474
|
-
preview: { port }
|
|
474
|
+
preview: { port, host: options.host }
|
|
475
475
|
});
|
|
476
476
|
server.printUrls();
|
|
477
477
|
});
|
|
@@ -479,7 +479,7 @@ var serveCommand = new Command4("serve").description("Build and start production
|
|
|
479
479
|
// src/cli/commands/start.ts
|
|
480
480
|
import chalk6 from "chalk";
|
|
481
481
|
import { Command as Command5 } from "commander";
|
|
482
|
-
var startCommand = new Command5("start").description("Start production server").option("-p, --port <port>", "Port number", "3000").option("--content <path>", "Content directory").action(async (options) => {
|
|
482
|
+
var startCommand = new Command5("start").description("Start production server").option("-p, --port <port>", "Port number", "3000").option("--content <path>", "Content directory").option("--host <host>", "Host address", "localhost").action(async (options) => {
|
|
483
483
|
const { contentDir, configPath } = await loadCLIConfig(undefined, { content: options.content });
|
|
484
484
|
const port = parseInt(options.port, 10);
|
|
485
485
|
await linkContent(contentDir);
|
|
@@ -489,7 +489,7 @@ var startCommand = new Command5("start").description("Start production server").
|
|
|
489
489
|
const config2 = await createViteConfig2({ packageRoot: PACKAGE_ROOT, projectRoot: process.cwd(), contentDir, configPath });
|
|
490
490
|
const server = await preview({
|
|
491
491
|
...config2,
|
|
492
|
-
preview: { port }
|
|
492
|
+
preview: { port, host: options.host }
|
|
493
493
|
});
|
|
494
494
|
server.printUrls();
|
|
495
495
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raystack/chronicle",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Config-driven documentation framework",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"slugify": "^1.6.6",
|
|
66
66
|
"unified": "^11.0.5",
|
|
67
67
|
"unist-util-visit": "^5.1.0",
|
|
68
|
-
"vite": "
|
|
68
|
+
"vite": "8.0.3",
|
|
69
69
|
"yaml": "^2.8.2",
|
|
70
70
|
"zod": "^4.3.6"
|
|
71
71
|
}
|
package/src/cli/commands/dev.ts
CHANGED
|
@@ -9,6 +9,7 @@ export const devCommand = new Command('dev')
|
|
|
9
9
|
.option('-p, --port <port>', 'Port number', '3000')
|
|
10
10
|
.option('--content <path>', 'Content directory')
|
|
11
11
|
.option('--config <path>', 'Path to chronicle.yaml')
|
|
12
|
+
.option('--host <host>', 'Host address', 'localhost')
|
|
12
13
|
.action(async options => {
|
|
13
14
|
const { contentDir, configPath } = await loadCLIConfig(options.config, { content: options.content });
|
|
14
15
|
const port = parseInt(options.port, 10);
|
|
@@ -23,7 +24,7 @@ export const devCommand = new Command('dev')
|
|
|
23
24
|
const config = await createViteConfig({ packageRoot: PACKAGE_ROOT, projectRoot: process.cwd(), contentDir, configPath });
|
|
24
25
|
const server = await createServer({
|
|
25
26
|
...config,
|
|
26
|
-
server: { ...config.server, port }
|
|
27
|
+
server: { ...config.server, port, host: options.host }
|
|
27
28
|
});
|
|
28
29
|
|
|
29
30
|
await server.listen();
|
|
@@ -9,6 +9,7 @@ export const serveCommand = new Command('serve')
|
|
|
9
9
|
.option('-p, --port <port>', 'Port number', '3000')
|
|
10
10
|
.option('--content <path>', 'Content directory')
|
|
11
11
|
.option('--config <path>', 'Path to chronicle.yaml')
|
|
12
|
+
.option('--host <host>', 'Host address', 'localhost')
|
|
12
13
|
.option(
|
|
13
14
|
'--preset <preset>',
|
|
14
15
|
'Deploy preset (vercel, cloudflare, node-server)'
|
|
@@ -38,7 +39,7 @@ export const serveCommand = new Command('serve')
|
|
|
38
39
|
console.log(chalk.cyan('Starting production server...'));
|
|
39
40
|
const server = await preview({
|
|
40
41
|
...config,
|
|
41
|
-
preview: { port }
|
|
42
|
+
preview: { port, host: options.host }
|
|
42
43
|
});
|
|
43
44
|
|
|
44
45
|
server.printUrls();
|
|
@@ -8,6 +8,7 @@ export const startCommand = new Command('start')
|
|
|
8
8
|
.description('Start production server')
|
|
9
9
|
.option('-p, --port <port>', 'Port number', '3000')
|
|
10
10
|
.option('--content <path>', 'Content directory')
|
|
11
|
+
.option('--host <host>', 'Host address', 'localhost')
|
|
11
12
|
.action(async options => {
|
|
12
13
|
const { contentDir, configPath } = await loadCLIConfig(undefined, { content: options.content });
|
|
13
14
|
const port = parseInt(options.port, 10);
|
|
@@ -21,7 +22,7 @@ export const startCommand = new Command('start')
|
|
|
21
22
|
const config = await createViteConfig({ packageRoot: PACKAGE_ROOT, projectRoot: process.cwd(), contentDir, configPath });
|
|
22
23
|
const server = await preview({
|
|
23
24
|
...config,
|
|
24
|
-
preview: { port }
|
|
25
|
+
preview: { port, host: options.host }
|
|
25
26
|
});
|
|
26
27
|
|
|
27
28
|
server.printUrls();
|