@bakery-framework/cli 2.4.1 → 2.5.0-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakery-framework/cli",
3
- "version": "2.4.1",
3
+ "version": "2.5.0-alpha.0",
4
4
  "description": "Bakery entry point and process supervision: mode dispatch, dev watcher, cluster.",
5
5
  "keywords": [
6
6
  "bakery",
@@ -39,10 +39,10 @@
39
39
  "bun": ">=1.4.0"
40
40
  },
41
41
  "dependencies": {
42
- "@bakery-framework/core": "^2.4.1"
42
+ "@bakery-framework/core": "^2.5.0-alpha.0"
43
43
  },
44
44
  "peerDependencies": {
45
- "@bakery-framework/orm": "^2.4.1"
45
+ "@bakery-framework/orm": "^2.5.0-alpha.0"
46
46
  },
47
47
  "peerDependenciesMeta": {
48
48
  "@bakery-framework/orm": {
package/src/dev.ts CHANGED
@@ -12,13 +12,11 @@ let config: unknown
12
12
 
13
13
  try {
14
14
  const { initConfig } = await import('@bakery-framework/core/core/config')
15
- const { initImportMap, initHostImportMaps } = await import(
16
- '@bakery-framework/core/utils/http'
17
- )
15
+ const { initImportMap, initHostImportMaps } =
16
+ await import('@bakery-framework/core/utils/http')
18
17
  const { setupPlugins } = await import('@bakery-framework/core/startup')
19
- const { syncTSConfigPaths, syncTSConfigProjects } = await import(
20
- '@bakery-framework/core/compiler/tsconfig-sync'
21
- )
18
+ const { syncTSConfigPaths, syncTSConfigProjects } =
19
+ await import('@bakery-framework/core/compiler/tsconfig-sync')
22
20
 
23
21
  config = await initConfig()
24
22
  // Still before initImportMap(): a plugin's setup() may contribute entries.
@@ -43,9 +41,8 @@ try {
43
41
  if (hasORM()) {
44
42
  try {
45
43
  const { Bakery } = await import('@bakery-framework/core')
46
- const { classifySchemaSync } = await import(
47
- '@bakery-framework/core/compiler'
48
- )
44
+ const { classifySchemaSync } =
45
+ await import('@bakery-framework/core/compiler')
49
46
  const { schemaFromConfig } = await import('@bakery-framework/orm/sync/load')
50
47
  const { Try } = await import('@bakery-framework/core/utils')
51
48
  // Dynamic, like every other import in this block: `schema-hash.ts` is only
@@ -88,9 +85,8 @@ if (hasORM()) {
88
85
  // 2.7ms median against apps/example (4 tables): it is one introspection
89
86
  // pass, so it grows with table count, which is why it is not on the path
90
87
  // that is about to introspect anyway.
91
- const { initDB, connection } = await import(
92
- '@bakery-framework/orm/connection'
93
- )
88
+ const { initDB, connection } =
89
+ await import('@bakery-framework/orm/connection')
94
90
  const { detectDrift } = await import('@bakery-framework/orm/sync/ledger')
95
91
  await initDB()
96
92
  const drift = await detectDrift(connection)
package/src/prod.ts CHANGED
@@ -11,9 +11,8 @@ serveLog.STARTING({ mode: 'production' })
11
11
  try {
12
12
  const { initConfig } = await import('@bakery-framework/core/core/config')
13
13
  const { setupPlugins } = await import('@bakery-framework/core/startup')
14
- const { initImportMap, initHostImportMaps } = await import(
15
- '@bakery-framework/core/utils/http'
16
- )
14
+ const { initImportMap, initHostImportMaps } =
15
+ await import('@bakery-framework/core/utils/http')
17
16
 
18
17
  await initConfig()
19
18
  // Before initImportMap() so plugin-contributed entries land in it; memoized,
package/src/threads.ts CHANGED
@@ -49,9 +49,6 @@ export function requestWorkerFlush(
49
49
  Try(() => target.removeEventListener('message', listener))
50
50
  }
51
51
  listeners.clear()
52
- // `resolve` is the enclosing Promise executor's, not a call that returns
53
- // one; the rule cannot tell the two apart.
54
- // biome-ignore lint/nursery/noFloatingPromises: executor resolve, not a promise
55
52
  resolve(flushed)
56
53
  }
57
54
 
@@ -80,7 +77,7 @@ export function requestWorkerFlush(
80
77
  export const RESPAWN_BASE_DELAY_MS = 100
81
78
  export const RESPAWN_MAX_DELAY_MS = 30_000
82
79
  /** A worker that survives this long is healthy; its failure streak resets. */
83
- export const RESPAWN_RESET_AFTER_MS = 60_000
80
+ const RESPAWN_RESET_AFTER_MS = 60_000
84
81
 
85
82
  /**
86
83
  * How long the master waits before respawning a crashed worker: exponential
@@ -28,9 +28,8 @@ import { errorMsg, serveLog } from '@bakery-framework/core/logger'
28
28
  export async function writeTypes(): Promise<number> {
29
29
  try {
30
30
  const { initConfig } = await import('@bakery-framework/core/core/config')
31
- const { syncTSConfigPaths, syncTSConfigProjects } = await import(
32
- '@bakery-framework/core/compiler/tsconfig-sync'
33
- )
31
+ const { syncTSConfigPaths, syncTSConfigProjects } =
32
+ await import('@bakery-framework/core/compiler/tsconfig-sync')
34
33
 
35
34
  await initConfig()
36
35
  await syncTSConfigPaths()