gulp-mu-gulp-api 0.3.12 → 0.3.13

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.
Files changed (3) hide show
  1. package/README.md +16 -8
  2. package/package.json +1 -1
  3. package/src/index.mjs +13 -7
package/README.md CHANGED
@@ -37,6 +37,10 @@ The module is deliberately **dependency-free** and knows nothing about µGulp™
37
37
  npm install gulp-mu-gulp-api
38
38
  ```
39
39
 
40
+ ### 0.3.13
41
+
42
+ - **Updated** `PlaySignal` / `PlaySound` docs and CLI fallbacks for the µGulp sound schema (`taskSuccess`, `taskFailed`, `requestAlert`, …). Legacy presets `success` / `error` / `attention` remain valid.
43
+
40
44
  ### 0.3.12
41
45
 
42
46
  - **Added** `RegisterDashboardFont({ id, file, family?, usage? })` — registers a workspace font for µGulp dashboard **task icons** and/or **run-log** typography. `usage`: `'task-icons'` (default), `'log'`, or `'all'`. Call at gulpfile load time; the scan worker forwards the registry to the engine.
@@ -123,8 +127,8 @@ export async function BUILD_THEME() {
123
127
  progress.Done();
124
128
 
125
129
  // sound + speech (rendered by the dashboard, configured in its settings)
126
- PlaySignal('success'); // preset: success | error | attention
127
- PlaySound('success'); // named atlas sample
130
+ PlaySignal('success'); // preset taskSuccess (also error→taskFailed, attention→requestAlert)
131
+ PlaySound('taskSuccess'); // named atlas sample (see MicroGulpSoundSchema.md)
128
132
  PlaySound('engine', { loop: true }); // loop until StopSound('engine')
129
133
  StopSound('engine');
130
134
  Speak('Theme build finished.');
@@ -165,8 +169,8 @@ let values = await RequestForm({
165
169
  | `GetLid()` / `SetLid(lid?)` | Active language id; `SetLid` clears to automatic when omitted |
166
170
  | `ReportProgress(value, label?)` | Report progress `0..1` to the task progress bar |
167
171
  | `CreateProgress(label?)` | Reporter object with `Update(value, stepLabel?)` and `Done()` |
168
- | `PlaySignal(signal?)` | Preset acoustic signal: `'success'` \| `'error'` \| `'attention'` (default) |
169
- | `PlaySound(sample, options?)` | Named sample from the dashboard sound atlas; `options.loop` repeats until `StopSound` |
172
+ | `PlaySignal(signal?)` | Preset or schema name; presets: `'success'`→`taskSuccess`, `'error'`→`taskFailed`, `'attention'`→`requestAlert` |
173
+ | `PlaySound(sample, options?)` | Named sample from the dashboard sound atlas (e.g. `taskStart`, `requestInfo`); `options.loop` repeats until `StopSound` |
170
174
  | `StopSound(sample)` | Stops a looping sample started with `PlaySound(sample, { loop: true })` |
171
175
  | `RegisterDashboardFont(spec)` | Registers a workspace font for dashboard task icons / run-log (`id`, `file`, optional `family` / `usage`: `task-icons`\|`log`\|`all`) |
172
176
  | `GetRegisteredDashboardFonts()` | Snapshot of fonts registered in this process (scan worker / tests) |
@@ -310,6 +314,10 @@ Das Modul ist bewusst **abhängigkeitsfrei** und kennt keine µGulp™-Interna:
310
314
  npm install gulp-mu-gulp-api
311
315
  ```
312
316
 
317
+ ### 0.3.13
318
+
319
+ - **Aktualisiert** `PlaySignal` / `PlaySound` für das µGulp-Sound-Schema (`taskSuccess`, `taskFailed`, `requestAlert`, …). Legacy-Presets `success` / `error` / `attention` bleiben gültig.
320
+
313
321
  ### 0.3.12
314
322
 
315
323
  - **Neu** `RegisterDashboardFont({ id, file, family?, usage? })` — registriert einen Workspace-Font für **Task-Icons** und/oder die **Run-Log**-Typografie im µGulp-Dashboard. `usage`: `'task-icons'` (Default), `'log'` oder `'all'`. Aufruf beim Laden des Gulpfiles; der Scan-Worker reicht die Registry an die Engine weiter.
@@ -396,8 +404,8 @@ export async function BUILD_THEME() {
396
404
  progress.Done();
397
405
 
398
406
  // sound + speech (rendered by the dashboard, configured in its settings)
399
- PlaySignal('success'); // preset: success | error | attention
400
- PlaySound('success'); // named atlas sample
407
+ PlaySignal('success'); // preset taskSuccess (also error→taskFailed, attention→requestAlert)
408
+ PlaySound('taskSuccess'); // named atlas sample (see MicroGulpSoundSchema.md)
401
409
  PlaySound('engine', { loop: true }); // loop until StopSound('engine')
402
410
  StopSound('engine');
403
411
  Speak('Theme build finished.');
@@ -438,8 +446,8 @@ let values = await RequestForm({
438
446
  | `GetLid()` / `SetLid(lid?)` | Aktive Sprach-ID; `SetLid` ohne Argument = automatische Auflösung |
439
447
  | `ReportProgress(value, label?)` | Fortschritt `0..1` an die Task-Progressbar melden |
440
448
  | `CreateProgress(label?)` | Reporter-Objekt mit `Update(value, stepLabel?)` und `Done()` |
441
- | `PlaySignal(signal?)` | Vorgabe-Signal: `'success'` \| `'error'` \| `'attention'` (Default) |
442
- | `PlaySound(sample, options?)` | Benanntes Sample aus dem Sound-Atlas; `options.loop` wiederholt bis `StopSound` |
449
+ | `PlaySignal(signal?)` | Vorgabe oder Schema-Name; Presets: `'success'`→`taskSuccess`, `'error'`→`taskFailed`, `'attention'`→`requestAlert` |
450
+ | `PlaySound(sample, options?)` | Benanntes Sample aus dem Sound-Atlas (z. B. `taskStart`, `requestInfo`); `options.loop` wiederholt bis `StopSound` |
443
451
  | `StopSound(sample)` | Stoppt eine Schleife von `PlaySound(sample, { loop: true })` |
444
452
  | `RegisterDashboardFont(spec)` | Registriert einen Workspace-Font für Dashboard-Task-Icons / Run-Log (`id`, `file`, optional `family` / `usage`: `task-icons`\|`log`\|`all`) |
445
453
  | `GetRegisteredDashboardFonts()` | Snapshot der in diesem Prozess registrierten Fonts (Scan-Worker / Tests) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gulp-mu-gulp-api",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
4
4
  "description": "Public task API for the µGulp orchestrator: progress reporting, sound signals, speech output, localized console output (i18x) and interactive UI inputs (text, password, number, textarea, color, font, select, radio, multi-select checkbox, range slider, date/time, file) from within gulp tasks — with graceful CLI fallbacks when running without µGulp.",
5
5
  "type": "module",
6
6
  "main": "src/index.mjs",
package/src/index.mjs CHANGED
@@ -287,29 +287,35 @@ export function LogChart(_spec) {
287
287
  /**
288
288
  * Plays an acoustic signal in the µGulp dashboard (WebAudio, respects the
289
289
  * dashboard audio settings: mute/volume). CLI fallback: terminal bell for
290
- * 'attention' and 'error' on a TTY, silent otherwise.
290
+ * 'attention' / 'error' (and their schema aliases) on a TTY, silent otherwise.
291
291
  *
292
- * @param {'success'|'error'|'attention'} [_signal]
292
+ * Presets map to atlas samples: `success`→`taskSuccess`, `error`→`taskFailed`,
293
+ * `attention`→`requestAlert`. New schema names (`taskStart`, `requestInfo`, …)
294
+ * are also accepted.
295
+ *
296
+ * @param {string} [_signal]
293
297
  */
294
298
  export function PlaySignal(_signal = 'attention') {
295
299
  if (IsMicroGulp()) {
296
300
  process.send({ type: 'sound', signal: _signal });
297
301
  return;
298
302
  }
299
- if (process.stdout.isTTY && (_signal === 'attention' || _signal === 'error')) {
303
+ let key = String(_signal ?? '').trim();
304
+ if (process.stdout.isTTY && (key === 'attention' || key === 'error' || key === 'requestAlert' || key === 'taskFailed')) {
300
305
  process.stdout.write('\u0007');
301
306
  }
302
307
  }
303
308
 
304
309
  /**
305
310
  * Plays a named sample from the dashboard sound atlas (µAU). Sample names match
306
- * the files bundled with µGulp (`success`, `error`, `attention`, or custom
307
- * atlas entries in the consumer skin). When `loop` is true the sample repeats
308
- * until `StopSound(sample)` is called.
311
+ * the files bundled with µGulp (see `dev/docs/MicroGulpSoundSchema.md`), e.g.
312
+ * `taskSuccess`, `taskFailed`, `requestAlert`, or custom atlas entries in a
313
+ * consumer theme pack. When `loop` is true the sample repeats until
314
+ * `StopSound(sample)` is called.
309
315
  *
310
316
  * CLI fallback: logs `[sound] <name>` on a TTY, silent otherwise.
311
317
  *
312
- * @param {string} _sample atlas sample name (e.g. `'success'`)
318
+ * @param {string} _sample atlas sample name (e.g. `'taskSuccess'`)
313
319
  * @param {object} [_options]
314
320
  * @param {boolean} [_options.loop] repeat until stopped (default `false`)
315
321
  */