@crab-dev/wake 0.1.20 → 0.1.21

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.21
4
+
5
+ - Added aggregate Wake Docs workspaces with isolated production bundles, deterministic manifests,
6
+ transactional output commits, one-port lazy/eager development mounts, scoped HMR events, and
7
+ embedded or standalone workbench presentation.
8
+ - Fixed MDX JSX structure generation by lifting block JSX and splitting mixed paragraphs at AST
9
+ boundaries, preventing invalid paragraph/block nesting without changing inline JSX or component
10
+ Markdown children.
11
+ - Fixed constrained, defaulted, and comma-disambiguated generic arrow functions in TSX so Wake
12
+ parses them as TypeScript instead of emitting cascading JSX diagnostics.
13
+ - Added a TypeScript 7 compatibility gate covering strict type checking, TS/TSX erasure, module
14
+ extensions, value transforms, and production/development JSX runtime execution.
15
+ - Fixed top-level TypeScript overload signatures so only their implementation is emitted, and
16
+ removed false runtime dependencies from imports and exports containing only inline `type`
17
+ specifiers.
18
+
3
19
  ## 0.1.20
4
20
 
5
21
  - Added a modern interactive terminal console with editable commands, history, Unicode-aware selection, clipboard copy and paste, and safe development-server opening across Rust and npm CLIs.
package/bin/terminal.mjs CHANGED
@@ -267,6 +267,7 @@ export function createDashboardState({
267
267
  rebuilds: 0,
268
268
  startedAt: Date.now(),
269
269
  activity: [],
270
+ workspaceState: undefined,
270
271
  scrollFromBottom: 0,
271
272
  }
272
273
  pushActivity(state, 'info', 'Starting Wake…')
@@ -307,6 +308,17 @@ export function applyDashboardEvent(state, event) {
307
308
  } else if (event.type === 'diagnostic') {
308
309
  state.status = 'error'
309
310
  pushActivity(state, 'error', formatDiagnostic(createUi(false), event.diagnostic).join('\n'))
311
+ } else if (event.type === 'workspaceState') {
312
+ state.workspaceState = {
313
+ total: event.total,
314
+ loaded: event.loaded,
315
+ failed: event.failed,
316
+ current: event.current,
317
+ failedNames: event.failedNames || [],
318
+ }
319
+ if (event.current) {
320
+ pushActivity(state, 'info', `Loading workspace ${event.current}…`)
321
+ }
310
322
  } else if (event.type === 'closed') {
311
323
  state.status = 'stopped'
312
324
  pushActivity(state, 'info', 'Wake stopped')
@@ -412,6 +424,14 @@ function activityRows(state, available) {
412
424
  return rows.slice(start, end)
413
425
  }
414
426
 
427
+ function workspaceText(state) {
428
+ const workspaces = state.workspaceState
429
+ if (!workspaces) return undefined
430
+ const current = workspaces.current ? ` · loading ${workspaces.current}` : ''
431
+ const failed = workspaces.failed ? ` · ${workspaces.failed} failed` : ''
432
+ return `WORKSPACES ${workspaces.loaded}/${workspaces.total} loaded${failed}${current}`
433
+ }
434
+
415
435
  function activityRowCount(state) {
416
436
  return state.activity.reduce((count, item) => count + String(item.message).split('\n').length, 0)
417
437
  }
@@ -442,6 +462,7 @@ function plainFrame(state, width, height, editor = new InputEditor(), notice) {
442
462
  boxLine(metricsText(state), width),
443
463
  separator(width, 'ACTIVITY'),
444
464
  ]
465
+ if (workspaceText(state)) fixed.splice(-1, 0, boxLine(workspaceText(state), width))
445
466
  activityHeight = Math.max(1, height - fixed.length - 2)
446
467
  } else {
447
468
  fixed = [
@@ -455,6 +476,7 @@ function plainFrame(state, width, height, editor = new InputEditor(), notice) {
455
476
  boxLine(metricsText(state), width),
456
477
  separator(width, 'ACTIVITY'),
457
478
  ]
479
+ if (workspaceText(state)) fixed.splice(-1, 0, boxLine(workspaceText(state), width))
458
480
  activityHeight = Math.max(1, height - fixed.length - 2)
459
481
  }
460
482
 
package/bin/wake.mjs CHANGED
@@ -187,6 +187,10 @@ async function runServer(factory, options, command, root, ui, uiMode) {
187
187
  applyDashboardEvent(state, { type: 'diagnostic', diagnostic })
188
188
  dashboard?.draw()
189
189
  }
190
+ const onWorkspaceState = (event) => {
191
+ applyDashboardEvent(state, event)
192
+ dashboard?.draw()
193
+ }
190
194
  const onClosed = () => {
191
195
  applyDashboardEvent(state, { type: 'closed' })
192
196
  dashboard?.draw()
@@ -194,6 +198,7 @@ async function runServer(factory, options, command, root, ui, uiMode) {
194
198
  server.on('rebuildStart', onRebuildStart)
195
199
  server.on('rebuilt', onRebuilt)
196
200
  server.on('diagnostic', onDiagnostic)
201
+ server.on('workspaceState', onWorkspaceState)
197
202
  server.on('closed', onClosed)
198
203
 
199
204
  if (!useTui) stopObserving = observeServer(server, ui)
@@ -235,6 +240,7 @@ async function runServer(factory, options, command, root, ui, uiMode) {
235
240
  server.off('rebuildStart', onRebuildStart)
236
241
  server.off('rebuilt', onRebuilt)
237
242
  server.off('diagnostic', onDiagnostic)
243
+ server.off('workspaceState', onWorkspaceState)
238
244
  server.off('closed', onClosed)
239
245
  }
240
246
  } catch (error) {
package/index.cjs CHANGED
@@ -123,6 +123,8 @@ class DevServer extends EventEmitter {
123
123
  this.emit('rebuildStart', event)
124
124
  } else if (event.type === 'rebuilt') {
125
125
  this.emit('rebuilt', event)
126
+ } else if (event.type === 'workspaceState') {
127
+ this.emit('workspaceState', event)
126
128
  } else if (event.type === 'diagnostic') {
127
129
  this.emit('diagnostic', event.diagnostic)
128
130
  } else if (event.type === 'closed' && !this.#closed) {
package/index.d.ts CHANGED
@@ -183,6 +183,15 @@ export interface DocsDemo {
183
183
  warnings: string[]
184
184
  }
185
185
 
186
+ export interface DocsWorkspaceBuildInfo {
187
+ name: string
188
+ root: string
189
+ basePath: string
190
+ mode: 'components'
191
+ presentation: 'embedded' | 'standalone'
192
+ demos: number
193
+ }
194
+
186
195
  export interface DocsBuildOptions extends ProjectOptions {
187
196
  outdir?: string
188
197
  basePath?: string
@@ -193,6 +202,7 @@ export interface DocsBuildResult extends BuildResult {
193
202
  routes: DocsRoute[]
194
203
  mode: DocsMode
195
204
  demos: DocsDemo[]
205
+ workspaces: DocsWorkspaceBuildInfo[]
196
206
  }
197
207
 
198
208
  export interface DevServerOptions extends ProjectOptions {
@@ -208,6 +218,8 @@ export interface DocsDevServerOptions extends DevServerOptions {
208
218
  export interface DevServerRebuildStartEvent {
209
219
  type: 'rebuildStart'
210
220
  changedPaths: string[]
221
+ workspace?: string
222
+ basePath?: string
211
223
  }
212
224
 
213
225
  export interface DevServerRebuiltEvent {
@@ -219,6 +231,17 @@ export interface DevServerRebuiltEvent {
219
231
  chunks: number
220
232
  assets: number
221
233
  durationMs: number
234
+ workspace?: string
235
+ basePath?: string
236
+ }
237
+
238
+ export interface DevServerWorkspaceStateEvent {
239
+ type: 'workspaceState'
240
+ total: number
241
+ loaded: number
242
+ failed: number
243
+ current?: string
244
+ failedNames: string[]
222
245
  }
223
246
 
224
247
  export class BuildContext {
@@ -237,6 +260,7 @@ export class DevServer extends EventEmitter {
237
260
  [Symbol.asyncDispose](): Promise<void>
238
261
  on(event: 'rebuildStart', listener: (event: DevServerRebuildStartEvent) => void): this
239
262
  on(event: 'rebuilt', listener: (event: DevServerRebuiltEvent) => void): this
263
+ on(event: 'workspaceState', listener: (event: DevServerWorkspaceStateEvent) => void): this
240
264
  on(event: 'diagnostic', listener: (diagnostic: Diagnostic) => void): this
241
265
  on(event: 'closed', listener: () => void): this
242
266
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crab-dev/wake",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "Wake native web build tools for Node.js",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "repository": {
@@ -50,7 +50,7 @@
50
50
  "node": ">=22.14 <27"
51
51
  },
52
52
  "dependencies": {
53
- "@crab-dev/css": "0.1.20",
53
+ "@crab-dev/css": "0.1.21",
54
54
  "@crab-dev/rc-alert": "^0.0.2",
55
55
  "@crab-dev/rc-button": "^0.0.2",
56
56
  "@crab-dev/rc-dialog": "^0.0.2",
@@ -75,11 +75,11 @@
75
75
  "react-dom": "^19.2.8"
76
76
  },
77
77
  "optionalDependencies": {
78
- "@crab-dev/wake-darwin-arm64": "0.1.20",
79
- "@crab-dev/wake-darwin-x64": "0.1.20",
80
- "@crab-dev/wake-linux-arm64-gnu": "0.1.20",
81
- "@crab-dev/wake-linux-x64-gnu": "0.1.20",
82
- "@crab-dev/wake-win32-x64-msvc": "0.1.20"
78
+ "@crab-dev/wake-darwin-arm64": "0.1.21",
79
+ "@crab-dev/wake-darwin-x64": "0.1.21",
80
+ "@crab-dev/wake-linux-arm64-gnu": "0.1.21",
81
+ "@crab-dev/wake-linux-x64-gnu": "0.1.21",
82
+ "@crab-dev/wake-win32-x64-msvc": "0.1.21"
83
83
  },
84
84
  "publishConfig": {
85
85
  "access": "public",