@fougere/cli 0.9.0-alpha.0 → 0.9.2-alpha.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.
@@ -38,8 +38,11 @@ export interface BuildReport {
38
38
  export default class BuildHandler {
39
39
  constructor(private projectScan: ProjectScan) {}
40
40
 
41
- /** Write down what a scan found, so a deployment reads no disk. */
42
- /** `json` is the presentation's, so it is not part of what this operation receives. */
41
+ /**
42
+ * Write down what a scan found, so a deployment reads no disk.
43
+ *
44
+ * `json` is the presentation's, so it is not part of what this operation receives.
45
+ */
43
46
  async execute(input: Omit<Build, 'json'>): Promise<BuildReport> {
44
47
  const scan = await this.projectScan.at(input.root ?? undefined);
45
48
  const out = resolve(scan.root, input.out || DEFAULT_OUT);
@@ -39,8 +39,9 @@ export default class FreezeHandler {
39
39
  * One op and not two: it is idempotent while it refuses, so a caller settles the
40
40
  * ambiguities and calls again with `renamed`. Splitting it would let a caller write
41
41
  * a version it never inspected.
42
+ *
43
+ * `json` is the presentation's, so it is not part of what this operation receives.
42
44
  */
43
- /** `json` is the presentation's, so it is not part of what this operation receives. */
44
45
  async execute(input: Omit<Freeze, 'json'> & { renamed?: Record<string, Record<string, string>> }): Promise<FreezeInspection> {
45
46
  const fronds = await this.read(input);
46
47
  const version = input.version;
@@ -30,8 +30,11 @@ export interface MigrationPlan {
30
30
  export default class MigrateHandler {
31
31
  constructor(private projectScan: ProjectScan) {}
32
32
 
33
- /** Realise the frozen steps this database has not caught up with. */
34
- /** `json` is the presentation's, so it is not part of what this operation receives. */
33
+ /**
34
+ * Realise the frozen steps this database has not caught up with.
35
+ *
36
+ * `json` is the presentation's, so it is not part of what this operation receives.
37
+ */
35
38
  async execute(input: Omit<Migrate, 'json'>): Promise<MigrationPlan> {
36
39
  const scan = await this.projectScan.at(input.root ?? undefined);
37
40
  const perFrond = await Promise.all(scan.fronds.map((frond) => stepsOf(frond.source.path)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fougere/cli",
3
- "version": "0.9.0-alpha.0",
3
+ "version": "0.9.2-alpha.0",
4
4
  "description": "The Fougere CLI — compose a workspace, serve a frond, call an operation.",
5
5
  "keywords": [
6
6
  "fougere",
@@ -42,13 +42,13 @@
42
42
  "jiti": "^2.4.2",
43
43
  "picocolors": "^1.1.1",
44
44
  "safe-regex": "^2.1.1",
45
- "@fougere/adapter-sql": "0.9.0-alpha.0",
46
- "@fougere/container": "0.9.0-alpha.0",
47
- "@fougere/core": "0.9.0-alpha.0",
48
- "@fougere/transport-http": "0.9.0-alpha.0",
49
- "@fougere/compiler": "0.9.0-alpha.0",
50
- "@fougere/schema": "0.9.0-alpha.0",
51
- "@fougere/defaults": "0.9.0-alpha.0"
45
+ "@fougere/container": "0.9.2-alpha.0",
46
+ "@fougere/core": "0.9.2-alpha.0",
47
+ "@fougere/schema": "0.9.2-alpha.0",
48
+ "@fougere/compiler": "0.9.2-alpha.0",
49
+ "@fougere/transport-http": "0.9.2-alpha.0",
50
+ "@fougere/adapter-sql": "0.9.2-alpha.0",
51
+ "@fougere/defaults": "0.9.2-alpha.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "vitest": "^4.1.0"
@@ -2,8 +2,11 @@
2
2
  "name": "fougere-frond",
3
3
  "private": true,
4
4
  "type": "module",
5
+ "engines": {
6
+ "node": ">=24"
7
+ },
5
8
  "scripts": {
6
- "serve": "node serve.mjs"
9
+ "serve": "node serve.ts"
7
10
  },
8
11
  "dependencies": {
9
12
  "@fougere/core": "latest",
@@ -11,7 +11,7 @@ import { createJiti } from 'jiti';
11
11
  import { createLocalRunner, Logger } from '@fougere/core';
12
12
  import { frondAliases } from '@fougere/compiler';
13
13
  import { setModuleLoader } from '@fougere/core/node';
14
- import { bootAppFromConfig } from '@fougere/defaults';
14
+ import { bootApp } from '@fougere/defaults';
15
15
  import { serve } from '@fougere/transport-http';
16
16
 
17
17
  // `frondAliases` is what makes `@fronds/<neighbour>/entities/X.js` resolve — the
@@ -22,13 +22,13 @@ const jiti = createJiti(import.meta.url, {
22
22
  interopDefault: true,
23
23
  alias: await frondAliases(process.cwd()),
24
24
  });
25
- setModuleLoader((filePath) => jiti.import(filePath));
25
+ setModuleLoader((filePath: string) => jiti.import(filePath) as Promise<Record<string, unknown>>);
26
26
 
27
27
  const log = new Logger('frond-host');
28
28
 
29
29
  // `topology: false` — this process *is* the frond, it doesn't route back out.
30
30
  // Storage comes from fougere.config.ts; this host names no engine.
31
- const app = await bootAppFromConfig(process.cwd(), { topology: false });
31
+ const app = await bootApp(process.cwd(), { topology: false });
32
32
 
33
33
  const { port } = await serve(createLocalRunner(app), { port: Number(process.env.PORT ?? 4000) });
34
34
  log.info(`frond served — POST http://127.0.0.1:${port}/_fougere/call`);