create-flowdular 0.2.3 → 0.2.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-flowdular",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "type": "module",
5
5
  "description": "Scaffold a Flowdular application: the platform, one example module and the secrets a fresh install needs.",
6
6
  "license": "MIT",
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "octane": "0.1.51",
18
18
  "segment-state": "0.2.0",
19
- "@flowdular/sdk": "0.2.2"
19
+ "@flowdular/sdk": "0.2.3"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@tsrx/typescript-plugin": "0.3.120",
@@ -21,6 +21,6 @@
21
21
  "devDependencies": {
22
22
  "@tsrx/prettier-plugin": "0.3.120",
23
23
  "prettier": "3.6.2",
24
- "flowdular": "0.2.2"
24
+ "flowdular": "0.2.3"
25
25
  }
26
26
  }
@@ -14,7 +14,7 @@
14
14
  "@octanejs/vite-plugin": "0.1.51",
15
15
  "octane": "0.1.51",
16
16
  "pg": "8.23.0",
17
- "@flowdular/sdk": "0.2.2"
17
+ "@flowdular/sdk": "0.2.3"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@octanejs/app-core": "0.0.47",
@@ -1,18 +1,51 @@
1
1
  import { resolve } from 'node:path';
2
2
  import { fileURLToPath } from 'node:url';
3
3
  import { createServer } from 'vite';
4
+ import {
5
+ createOctaneLogger,
6
+ installOctaneConsoleBridge,
7
+ shouldUseColor,
8
+ createTheme,
9
+ printReady,
10
+ } from '@flowdular/sdk/dev-console';
4
11
 
5
12
  const appRoot = resolve(fileURLToPath(new URL('..', import.meta.url)));
13
+ const verbose =
14
+ process.argv.includes('--verbose') ||
15
+ process.argv.includes('-v') ||
16
+ process.env.FD_DEV_VERBOSE === 'true';
17
+ const color = shouldUseColor();
18
+ const restoreConsole = installOctaneConsoleBridge(verbose, color);
6
19
 
7
- const server = await createServer({
8
- root: appRoot,
9
- configFile: resolve(appRoot, 'vite.config.ts'),
20
+ let server;
21
+ try {
22
+ server = await createServer({
23
+ root: appRoot,
24
+ configFile: resolve(appRoot, 'vite.config.ts'),
25
+ customLogger: createOctaneLogger(verbose, color),
26
+ clearScreen: false,
27
+ });
28
+ await server.listen();
29
+ } catch (error) {
30
+ restoreConsole();
31
+ throw error;
32
+ }
33
+ printReady({
34
+ title: 'FLOWDULAR',
35
+ subtitle: 'development workspace',
36
+ theme: createTheme(color),
37
+ lines: [
38
+ [
39
+ 'local',
40
+ server.resolvedUrls?.local?.[0] ?? 'http://localhost:4310/',
41
+ 'info',
42
+ ],
43
+ ['diagnostics', verbose ? 'verbose' : 'quiet · use --verbose', 'muted'],
44
+ ],
10
45
  });
11
- await server.listen();
12
- server.printUrls();
13
46
 
14
47
  /* Closing without exiting lets octane.config.ts release the database on the
15
48
  same signal; the process ends once both have drained. */
16
- const stop = () => void server.close();
49
+ const stop = () => void server.close().finally(restoreConsole);
17
50
  process.once('SIGINT', stop);
18
51
  process.once('SIGTERM', stop);