@hyperfrontend/features 0.1.0 → 0.2.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/CHANGELOG.md +17 -0
- package/_dependencies/@hyperfrontend/builder/bundle/dependencies/index.cjs.js +1 -0
- package/_dependencies/@hyperfrontend/builder/bundle/dependencies/index.esm.js +1 -0
- package/_dependencies/@hyperfrontend/builder/bundle/dependencies/worker/index.cjs.js +1 -0
- package/_dependencies/@hyperfrontend/builder/bundle/dependencies/worker/index.esm.js +1 -0
- package/_dependencies/@hyperfrontend/builder/bundle/index.cjs.js +12 -10
- package/_dependencies/@hyperfrontend/builder/bundle/index.esm.js +14 -12
- package/_dependencies/@hyperfrontend/builder/bundle/rollup/index.cjs.js +2 -0
- package/_dependencies/@hyperfrontend/builder/bundle/rollup/index.esm.js +2 -0
- package/_dependencies/@hyperfrontend/builder/bundle/rollup/worker/index.cjs.js +2 -0
- package/_dependencies/@hyperfrontend/builder/bundle/rollup/worker/index.esm.js +2 -0
- package/_dependencies/@hyperfrontend/builder/index.cjs.js +87 -53
- package/_dependencies/@hyperfrontend/builder/index.esm.js +89 -55
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/promise/index.cjs.js +4 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/promise/index.esm.js +3 -1
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/reflect/index.cjs.js +10 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/reflect/index.esm.js +6 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/timers/index.cjs.js +5 -0
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/timers/index.esm.js +5 -1
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/typed-arrays/index.cjs.js +2 -2
- package/_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/typed-arrays/index.esm.js +2 -2
- package/_dependencies/@hyperfrontend/network-protocol/browser/channel/index.cjs.js +5 -19
- package/_dependencies/@hyperfrontend/network-protocol/browser/channel/index.esm.js +1 -15
- package/_dependencies/@hyperfrontend/network-protocol/browser/data/index.cjs.js +15 -23
- package/_dependencies/@hyperfrontend/network-protocol/browser/data/index.esm.js +7 -15
- package/_dependencies/@hyperfrontend/network-protocol/browser/packet/index.cjs.js +6 -14
- package/_dependencies/@hyperfrontend/network-protocol/browser/packet/index.esm.js +7 -15
- package/_dependencies/@hyperfrontend/network-protocol/browser/receiver/index.cjs.js +4 -18
- package/_dependencies/@hyperfrontend/network-protocol/browser/receiver/index.esm.js +1 -15
- package/_dependencies/@hyperfrontend/network-protocol/browser/sender/index.cjs.js +5 -19
- package/_dependencies/@hyperfrontend/network-protocol/browser/sender/index.esm.js +2 -16
- package/_dependencies/@hyperfrontend/network-protocol/browser/v1/index.cjs.js +16 -24
- package/_dependencies/@hyperfrontend/network-protocol/browser/v1/index.esm.js +7 -15
- package/_dependencies/@hyperfrontend/network-protocol/browser/v2/index.cjs.js +16 -24
- package/_dependencies/@hyperfrontend/network-protocol/browser/v2/index.esm.js +7 -15
- package/_dependencies/@hyperfrontend/network-protocol/node/channel/index.cjs.js +3 -17
- package/_dependencies/@hyperfrontend/network-protocol/node/channel/index.esm.js +1 -15
- package/_dependencies/@hyperfrontend/network-protocol/node/data/index.cjs.js +6 -14
- package/_dependencies/@hyperfrontend/network-protocol/node/data/index.esm.js +7 -15
- package/_dependencies/@hyperfrontend/network-protocol/node/packet/index.cjs.js +6 -14
- package/_dependencies/@hyperfrontend/network-protocol/node/packet/index.esm.js +7 -15
- package/_dependencies/@hyperfrontend/network-protocol/node/receiver/index.cjs.js +3 -17
- package/_dependencies/@hyperfrontend/network-protocol/node/receiver/index.esm.js +1 -15
- package/_dependencies/@hyperfrontend/network-protocol/node/sender/index.cjs.js +2 -16
- package/_dependencies/@hyperfrontend/network-protocol/node/sender/index.esm.js +2 -16
- package/_dependencies/@hyperfrontend/network-protocol/node/v1/index.cjs.js +6 -14
- package/_dependencies/@hyperfrontend/network-protocol/node/v1/index.esm.js +7 -15
- package/_dependencies/@hyperfrontend/network-protocol/node/v2/index.cjs.js +6 -14
- package/_dependencies/@hyperfrontend/network-protocol/node/v2/index.esm.js +7 -15
- package/_dependencies/@hyperfrontend/nexus/index.cjs.js +49 -19
- package/_dependencies/@hyperfrontend/nexus/index.esm.js +49 -19
- package/_dependencies/@hyperfrontend/project-scope/core/fs/index.cjs.js +62 -0
- package/_dependencies/@hyperfrontend/project-scope/core/fs/index.esm.js +60 -2
- package/_shared/generators/feature/generate-feature-module/index.esm.js +11 -6
- package/_shared/generators/metadata/generate-metadata/index.esm.js +1 -0
- package/_shared/shared/control/index.cjs.js +12 -2
- package/_shared/shared/control/index.esm.js +12 -2
- package/_shared/shared/request/index.cjs.js +91 -0
- package/_shared/shared/request/index.esm.js +88 -0
- package/_shared/shared/shutdown/index.esm.js +12 -0
- package/bin/hf.js +643 -70
- package/bundle/host/index.iife.js +290 -4041
- package/bundle/host/index.iife.min.js +1 -1
- package/bundle/host/index.umd.js +290 -4041
- package/bundle/host/index.umd.min.js +1 -1
- package/bundle/hostee/index.iife.js +215 -2893
- package/bundle/hostee/index.iife.min.js +1 -1
- package/bundle/hostee/index.umd.js +215 -2893
- package/bundle/hostee/index.umd.min.js +1 -1
- package/cli/args.d.ts +2 -0
- package/cli/args.d.ts.map +1 -1
- package/cli/commands/build.d.ts +8 -5
- package/cli/commands/build.d.ts.map +1 -1
- package/cli/commands/dev.d.ts +7 -2
- package/cli/commands/dev.d.ts.map +1 -1
- package/cli/config/resolve.d.ts +3 -1
- package/cli/config/resolve.d.ts.map +1 -1
- package/cli/index.cjs.js +643 -70
- package/cli/index.d.ts +21 -10
- package/cli/index.esm.js +591 -60
- package/cli/usage.d.ts +1 -1
- package/cli/usage.d.ts.map +1 -1
- package/generators/feature/generate-feature-module.d.ts.map +1 -1
- package/generators/index.cjs.js +435 -42
- package/generators/index.d.ts +9 -8
- package/generators/index.esm.js +404 -30
- package/generators/metadata/generate-metadata.d.ts +4 -4
- package/generators/metadata/generate-metadata.d.ts.map +1 -1
- package/generators/shell/connector-types.d.ts +19 -0
- package/generators/shell/connector-types.d.ts.map +1 -0
- package/generators/shell/generate-shell.d.ts +5 -4
- package/generators/shell/generate-shell.d.ts.map +1 -1
- package/generators/shell/schema-type.d.ts +20 -0
- package/generators/shell/schema-type.d.ts.map +1 -0
- package/generators/shell/source-literal.d.ts +28 -0
- package/generators/shell/source-literal.d.ts.map +1 -1
- package/host/create-shell.d.ts +4 -1
- package/host/create-shell.d.ts.map +1 -1
- package/host/display-modes/dialog.d.ts +1 -1
- package/host/display-modes/dialog.d.ts.map +1 -1
- package/host/display-modes/embedded.d.ts +1 -1
- package/host/display-modes/embedded.d.ts.map +1 -1
- package/host/index.cjs.js +150 -30
- package/host/index.d.ts +53 -38
- package/host/index.d.ts.map +1 -1
- package/host/index.esm.js +129 -9
- package/host/lifecycle.d.ts.map +1 -1
- package/host/plugins.d.ts +1 -34
- package/host/plugins.d.ts.map +1 -1
- package/host/types.d.ts +49 -0
- package/host/types.d.ts.map +1 -1
- package/hostee/index.cjs.js +54 -9
- package/hostee/index.d.ts +41 -1
- package/hostee/index.d.ts.map +1 -1
- package/hostee/index.esm.js +51 -6
- package/hostee/lifecycle.d.ts.map +1 -1
- package/hostee/types.d.ts +40 -0
- package/hostee/types.d.ts.map +1 -1
- package/index.cjs.js +32 -1
- package/index.d.ts +89 -3
- package/index.d.ts.map +1 -1
- package/index.esm.js +32 -1
- package/nx/executors/build/index.cjs.js +14975 -137
- package/nx/executors/build/index.esm.js +14935 -115
- package/nx/executors/serve/executor.d.ts.map +1 -1
- package/nx/executors/serve/index.cjs.js +6594 -80
- package/nx/executors/serve/index.esm.js +6529 -44
- package/nx/generators/feature/index.cjs.js +8751 -108
- package/nx/generators/feature/index.esm.js +8711 -81
- package/package.json +15 -5
- package/server/debug-ui/index.d.ts +2 -0
- package/server/debug-ui/index.d.ts.map +1 -0
- package/server/debug-ui/index.html +15 -0
- package/server/debug-ui/index.iife.js +427 -0
- package/server/debug-ui/index.iife.min.js +1 -0
- package/server/dev-server.d.ts.map +1 -1
- package/server/index.cjs.js +78 -10
- package/server/index.esm.js +78 -11
- package/server/module-dir.d.ts +17 -0
- package/server/module-dir.d.ts.map +1 -0
- package/server/module-dir.stub.d.ts +15 -0
- package/server/module-dir.stub.d.ts.map +1 -0
- package/shared/contract.d.ts +1 -1
- package/shared/contract.d.ts.map +1 -1
- package/shared/control.d.ts +4 -0
- package/shared/control.d.ts.map +1 -1
- package/shared/invert-contract.d.ts +20 -0
- package/shared/invert-contract.d.ts.map +1 -0
- package/shared/request.d.ts +68 -0
- package/shared/request.d.ts.map +1 -0
- package/{nx/shared → shared}/shutdown.d.ts +3 -2
- package/shared/shutdown.d.ts.map +1 -0
- package/shared/types.d.ts +72 -1
- package/shared/types.d.ts.map +1 -1
- package/_shared/nx/shared/context/index.cjs.js +0 -18
- package/_shared/nx/shared/context/index.esm.js +0 -16
- package/nx/shared/shutdown.d.ts.map +0 -1
- package/server/debug-ui/bootstrap.d.ts +0 -2
- package/server/debug-ui/bootstrap.d.ts.map +0 -1
package/server/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import { isArray } from '../_dependencies/@hyperfrontend/immutable-api-utils/bui
|
|
|
3
3
|
import { createError } from '../_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/error/index.esm.js';
|
|
4
4
|
import { isInteger } from '../_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/number/index.esm.js';
|
|
5
5
|
import { exists, readJsonFile, readFileBuffer, isFile } from '../_dependencies/@hyperfrontend/project-scope/core/fs/index.esm.js';
|
|
6
|
-
import { pathToFileURL } from 'node:url';
|
|
6
|
+
import { pathToFileURL, fileURLToPath } from 'node:url';
|
|
7
7
|
import { createServer } from 'node:http';
|
|
8
8
|
import { stringify } from '../_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/json/index.esm.js';
|
|
9
9
|
import { promiseAll, createPromise } from '../_dependencies/@hyperfrontend/immutable-api-utils/built-in-copy/promise/index.esm.js';
|
|
@@ -185,6 +185,29 @@ async function resolveDevConfig(options) {
|
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
/**
|
|
189
|
+
* Directory of the currently-running module under either module system.
|
|
190
|
+
*
|
|
191
|
+
* The CommonJS build (and any CommonJS host) exposes `__dirname`; the
|
|
192
|
+
* ES-module build derives the directory from `import.meta.url`. Both formats
|
|
193
|
+
* ship beside the `debug-ui` assets, so the result anchors asset
|
|
194
|
+
* self-location wherever the package is installed or embedded.
|
|
195
|
+
*
|
|
196
|
+
* @returns Absolute directory path of the running module.
|
|
197
|
+
*
|
|
198
|
+
* @example Anchoring an asset lookup beside the running module
|
|
199
|
+
* ```typescript
|
|
200
|
+
* const assetDir = join(currentModuleDir(), 'debug-ui')
|
|
201
|
+
* ```
|
|
202
|
+
*/
|
|
203
|
+
function currentModuleDir() {
|
|
204
|
+
// why: `typeof` guards the CommonJS-only global so the ES-module build falls through to `import.meta.url` instead of crashing on an undefined identifier.
|
|
205
|
+
if (typeof __dirname !== 'undefined') {
|
|
206
|
+
return __dirname;
|
|
207
|
+
}
|
|
208
|
+
return dirname(fileURLToPath(import.meta.url));
|
|
209
|
+
}
|
|
210
|
+
|
|
188
211
|
// note: Minimal MIME table for the asset types a compiled feature/debug-UI bundle ships; anything else falls back to octet-stream.
|
|
189
212
|
const CONTENT_TYPES = freeze({
|
|
190
213
|
'.html': 'text/html; charset=utf-8',
|
|
@@ -293,23 +316,66 @@ function createStaticHandler(root, deps = {}) {
|
|
|
293
316
|
return (req, res) => serveFile(root, req.url ?? '/', res, deps);
|
|
294
317
|
}
|
|
295
318
|
|
|
296
|
-
// note: Path prefix the control server serves the compiled debug-UI assets under; the page loads `/__debug/
|
|
319
|
+
// note: Path prefix the control server serves the compiled debug-UI assets under; the page loads `/__debug/index.iife.min.js`.
|
|
297
320
|
const DEBUG_PREFIX = '/__debug';
|
|
298
321
|
// note: Placeholder the debug-UI HTML embeds; the control server swaps it for the live JSON manifest at request time.
|
|
299
322
|
const MANIFEST_TOKEN = 'HF_MANIFEST_PLACEHOLDER';
|
|
300
323
|
/**
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
324
|
+
* Probes a single directory for the shipped debug-UI assets, checking both a
|
|
325
|
+
* sibling `debug-ui` folder (running from the `server/` output) and a nested
|
|
326
|
+
* `server/debug-ui` folder (running from another package entry, such as the
|
|
327
|
+
* CLI bin at the package root).
|
|
328
|
+
*
|
|
329
|
+
* @param dir - Candidate directory expected to hold the assets.
|
|
330
|
+
* @param isFile - File probe used to confirm the assets exist.
|
|
331
|
+
* @returns The `debug-ui` asset directory, or `undefined` when it is not here.
|
|
332
|
+
*/
|
|
333
|
+
function probeAssetDir(dir, isFile) {
|
|
334
|
+
const sibling = join(dir, 'debug-ui');
|
|
335
|
+
if (isFile(join(sibling, 'index.html'))) {
|
|
336
|
+
return sibling;
|
|
337
|
+
}
|
|
338
|
+
const nested = join(dir, 'server', 'debug-ui');
|
|
339
|
+
return isFile(join(nested, 'index.html')) ? nested : undefined;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Locates the debug-UI assets by ascending from a start directory toward the
|
|
343
|
+
* filesystem root, returning the first ancestor holding a `debug-ui` folder.
|
|
344
|
+
*
|
|
345
|
+
* @param startDir - Directory the ascent begins from.
|
|
346
|
+
* @param isFile - File probe used to confirm the assets exist.
|
|
347
|
+
* @returns The `debug-ui` asset directory, or `undefined` when no ancestor holds one.
|
|
348
|
+
*/
|
|
349
|
+
function ascendForAssets(startDir, isFile) {
|
|
350
|
+
let dir = startDir;
|
|
351
|
+
let parent = dirname(dir);
|
|
352
|
+
// how: probe each level then step up; the final probe covers the filesystem root, where parent === dir
|
|
353
|
+
while (parent !== dir) {
|
|
354
|
+
const found = probeAssetDir(dir, isFile);
|
|
355
|
+
if (found !== undefined) {
|
|
356
|
+
return found;
|
|
357
|
+
}
|
|
358
|
+
dir = parent;
|
|
359
|
+
parent = dirname(dir);
|
|
360
|
+
}
|
|
361
|
+
return probeAssetDir(dir, isFile);
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Resolves the directory the compiled debug-UI assets ship in by ascending
|
|
365
|
+
* from the running module (located via `__dirname` in CommonJS or
|
|
366
|
+
* `import.meta.url` in ESM). The ascent finds the assets wherever the package
|
|
367
|
+
* lives — the built dist, an installed `node_modules` copy, or embedded
|
|
368
|
+
* inside a consumer's bundle output.
|
|
304
369
|
*
|
|
370
|
+
* @param isFile - File probe used to confirm the assets exist.
|
|
305
371
|
* @returns The absolute debug-UI asset directory.
|
|
306
372
|
*/
|
|
307
|
-
function defaultAssetRoot() {
|
|
308
|
-
|
|
309
|
-
if (
|
|
310
|
-
throw createError('@hyperfrontend/features dev server
|
|
373
|
+
function defaultAssetRoot(isFile) {
|
|
374
|
+
const located = ascendForAssets(currentModuleDir(), isFile);
|
|
375
|
+
if (located === undefined) {
|
|
376
|
+
throw createError('@hyperfrontend/features dev server could not locate the bundled debug-UI assets beside the running module; inject `assetRoot` to point at a directory containing the debug-UI `index.html`.');
|
|
311
377
|
}
|
|
312
|
-
return
|
|
378
|
+
return located;
|
|
313
379
|
}
|
|
314
380
|
/**
|
|
315
381
|
* Reads the listening port from a server, throwing if the address is unexpectedly absent.
|
|
@@ -420,7 +486,6 @@ function controlHandler(manifest, assetRoot, deps) {
|
|
|
420
486
|
*/
|
|
421
487
|
async function startDevServer(config, deps = {}) {
|
|
422
488
|
const createServer$1 = deps.createServer ?? createServer;
|
|
423
|
-
const assetRoot = deps.assetRoot ?? defaultAssetRoot();
|
|
424
489
|
const servers = [];
|
|
425
490
|
const apps = [];
|
|
426
491
|
for (const app of config.apps) {
|
|
@@ -432,6 +497,8 @@ async function startDevServer(config, deps = {}) {
|
|
|
432
497
|
const manifest = { apps: apps.map((app) => ({ name: app.name, url: app.url })), debug: config.debug };
|
|
433
498
|
let debugUrl;
|
|
434
499
|
if (config.debug.enabled) {
|
|
500
|
+
// why: resolved only when the debug UI is enabled so consumers with it disabled never pay for (or fail on) asset self-location.
|
|
501
|
+
const assetRoot = deps.assetRoot ?? defaultAssetRoot(deps.isFile ?? isFile);
|
|
435
502
|
const control = createServer$1(controlHandler(manifest, assetRoot, deps));
|
|
436
503
|
const port = await listen(control, config.debugPort);
|
|
437
504
|
servers.push(control);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Directory of the currently-running module under either module system.
|
|
3
|
+
*
|
|
4
|
+
* The CommonJS build (and any CommonJS host) exposes `__dirname`; the
|
|
5
|
+
* ES-module build derives the directory from `import.meta.url`. Both formats
|
|
6
|
+
* ship beside the `debug-ui` assets, so the result anchors asset
|
|
7
|
+
* self-location wherever the package is installed or embedded.
|
|
8
|
+
*
|
|
9
|
+
* @returns Absolute directory path of the running module.
|
|
10
|
+
*
|
|
11
|
+
* @example Anchoring an asset lookup beside the running module
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const assetDir = join(currentModuleDir(), 'debug-ui')
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare function currentModuleDir(): string;
|
|
17
|
+
//# sourceMappingURL=module-dir.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-dir.d.ts","sourceRoot":"","sources":["../../../../../../../libs/features/src/server/module-dir.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAMzC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CommonJS stand-in for the module locator: runtimes that execute this source
|
|
3
|
+
* tree as CommonJS cannot parse the `import.meta` token in `module-dir.ts`,
|
|
4
|
+
* and always define `__dirname`, which resolves to the same source directory
|
|
5
|
+
* here.
|
|
6
|
+
*
|
|
7
|
+
* @returns Absolute directory path of the running module.
|
|
8
|
+
*
|
|
9
|
+
* @example Anchoring an asset lookup beside the running module
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const assetDir = join(currentModuleDir(), 'debug-ui')
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare function currentModuleDir(): string;
|
|
15
|
+
//# sourceMappingURL=module-dir.stub.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-dir.stub.d.ts","sourceRoot":"","sources":["../../../../../../../libs/features/src/server/module-dir.stub.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC"}
|
package/shared/contract.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { ActionDescription, FeatureConfig, FeatureContract } from './types'
|
|
|
8
8
|
*
|
|
9
9
|
* @param contract - The candidate contract, typically parsed from disk.
|
|
10
10
|
* @returns The validated contract, typed.
|
|
11
|
-
* @throws {Error} When the value is not an object,
|
|
11
|
+
* @throws {Error} When the value is not an object, any action is malformed, or a `respondsWith` names no action in the other direction.
|
|
12
12
|
*
|
|
13
13
|
* @example Validating a parsed contract file
|
|
14
14
|
* ```typescript
|
package/shared/contract.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../../../../libs/features/src/shared/contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../../../../libs/features/src/shared/contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AA2FhF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,OAAO,GAAG,eAAe,CAoBnE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,GAAG,aAAa,CAWpE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,GAAG,gBAAgB,CAK7F"}
|
package/shared/control.d.ts
CHANGED
|
@@ -7,6 +7,10 @@ export declare const ControlType: Readonly<{
|
|
|
7
7
|
readonly Beat: "__hf:beat";
|
|
8
8
|
/** Hostee-to-host content-size announcement. */
|
|
9
9
|
readonly Size: "__hf:size";
|
|
10
|
+
/** Correlated request envelope carrying a consumer request in either direction. */
|
|
11
|
+
readonly Request: "__hf:request";
|
|
12
|
+
/** Correlated response envelope answering a request. */
|
|
13
|
+
readonly Response: "__hf:response";
|
|
10
14
|
}>;
|
|
11
15
|
/**
|
|
12
16
|
* Union of the reserved control message types.
|
package/shared/control.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control.d.ts","sourceRoot":"","sources":["../../../../../../../libs/features/src/shared/control.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAM9C;;GAEG;AACH,eAAO,MAAM,WAAW;IACtB,oCAAoC;;IAEpC,gDAAgD;;
|
|
1
|
+
{"version":3,"file":"control.d.ts","sourceRoot":"","sources":["../../../../../../../libs/features/src/shared/control.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAM9C;;GAEG;AACH,eAAO,MAAM,WAAW;IACtB,oCAAoC;;IAEpC,gDAAgD;;IAEhD,mFAAmF;;IAEnF,wDAAwD;;EAExD,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAA;AAExE;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,eAAe,GAAG,eAAe,CAY9E"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { FeatureContract } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Inverts a feature-authored contract into the host's perspective.
|
|
4
|
+
*
|
|
5
|
+
* A feature contract is written from the feature's point of view: `emitted` is
|
|
6
|
+
* what the feature sends, `accepted` is what the feature handles. The host
|
|
7
|
+
* channel needs the mirror image — it sends what the feature accepts and
|
|
8
|
+
* accepts what the feature emits — so the two lists are swapped.
|
|
9
|
+
*
|
|
10
|
+
* @param contract - The contract as authored by the feature.
|
|
11
|
+
* @returns A fresh contract oriented to the host side.
|
|
12
|
+
*
|
|
13
|
+
* @example Deriving the host-side contract
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const host = invertFeatureContract({ emitted: [{ type: 'tick' }], accepted: [{ type: 'setTimezone' }] })
|
|
16
|
+
* // => { emitted: [{ type: 'setTimezone' }], accepted: [{ type: 'tick' }] }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function invertFeatureContract(contract: FeatureContract): FeatureContract;
|
|
20
|
+
//# sourceMappingURL=invert-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invert-contract.d.ts","sourceRoot":"","sources":["../../../../../../../libs/features/src/shared/invert-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,eAAe,EAAE,MAAM,SAAS,CAAA;AAejE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,eAAe,GAAG,eAAe,CAEhF"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which side of the feature channel a peer speaks for.
|
|
3
|
+
*/
|
|
4
|
+
export type PeerOrigin = 'host' | 'feature';
|
|
5
|
+
/**
|
|
6
|
+
* Per-request settings accepted by `request`.
|
|
7
|
+
*/
|
|
8
|
+
export interface RequestOptions {
|
|
9
|
+
/** Milliseconds to wait for the response before rejecting; defaults to 30000. */
|
|
10
|
+
timeoutMs?: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Answers one request type; may return the response value directly or a promise of it.
|
|
14
|
+
*
|
|
15
|
+
* @param data - The request payload sent by the other side.
|
|
16
|
+
* @returns The response value, or a promise that resolves to it.
|
|
17
|
+
*/
|
|
18
|
+
export type RequestHandler = (data: unknown) => unknown;
|
|
19
|
+
/**
|
|
20
|
+
* One side of the correlated request/response protocol layered on the control plane.
|
|
21
|
+
*/
|
|
22
|
+
export interface RequestPeer {
|
|
23
|
+
/**
|
|
24
|
+
* Sends a request to the other side and resolves with its response.
|
|
25
|
+
*
|
|
26
|
+
* @param type - Request type the other side answers.
|
|
27
|
+
* @param data - Optional payload for the request.
|
|
28
|
+
* @param options - Per-request settings such as `timeoutMs`.
|
|
29
|
+
* @returns A promise settling with the other side's response.
|
|
30
|
+
*/
|
|
31
|
+
request(type: string, data?: unknown, options?: RequestOptions): Promise<unknown>;
|
|
32
|
+
/**
|
|
33
|
+
* Registers the single handler answering requests of a type; a second registration for the same type throws.
|
|
34
|
+
*
|
|
35
|
+
* @param type - Request type to answer.
|
|
36
|
+
* @param handler - Receives the request payload and returns the response.
|
|
37
|
+
* @returns A function that unregisters this handler.
|
|
38
|
+
*/
|
|
39
|
+
handle(type: string, handler: RequestHandler): () => void;
|
|
40
|
+
/**
|
|
41
|
+
* Routes an incoming control-plane message into the protocol; non-envelope data and self-originated echoes are ignored.
|
|
42
|
+
*
|
|
43
|
+
* @param type - The wire message type.
|
|
44
|
+
* @param data - The wire message payload.
|
|
45
|
+
*/
|
|
46
|
+
dispatch(type: string, data: unknown): void;
|
|
47
|
+
/**
|
|
48
|
+
* Rejects every pending request, e.g. when the channel closes.
|
|
49
|
+
*
|
|
50
|
+
* @param reason - Human-readable reason placed on each rejection error.
|
|
51
|
+
*/
|
|
52
|
+
rejectAll(reason: string): void;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Creates one side of the request/response protocol around a channel send function.
|
|
56
|
+
*
|
|
57
|
+
* @param origin - Which side of the channel this peer speaks for.
|
|
58
|
+
* @param send - Sends a control message through the underlying channel.
|
|
59
|
+
* @returns The frozen peer.
|
|
60
|
+
*
|
|
61
|
+
* @example Wiring a peer into a channel's control-message intercept
|
|
62
|
+
* ```typescript
|
|
63
|
+
* const peer = createRequestPeer('host', (type, data) => channel?.send(type, data))
|
|
64
|
+
* channel.onMessage((message) => isControlType(message.type) && peer.dispatch(message.type, message.data))
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export declare function createRequestPeer(origin: PeerOrigin, send: (type: string, data: unknown) => void): RequestPeer;
|
|
68
|
+
//# sourceMappingURL=request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../../../../libs/features/src/shared/request.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,CAAA;AAE3C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAA;AAEvD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;OAOG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IACjF;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,MAAM,IAAI,CAAA;IACzD;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IAC3C;;;;OAIG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAChC;AA4CD;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,GAAG,WAAW,CA4F9G"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Resolve once the process receives an interrupt or terminate signal.
|
|
3
3
|
*
|
|
4
|
-
* Used by long-running executors to stay alive after
|
|
5
|
-
* gracefully when
|
|
4
|
+
* Used by the dev command and long-running executors to stay alive after
|
|
5
|
+
* startup and tear down gracefully when the user (or the task runner) stops
|
|
6
|
+
* them.
|
|
6
7
|
*
|
|
7
8
|
* @returns A promise that settles when `SIGINT` or `SIGTERM` is received.
|
|
8
9
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shutdown.d.ts","sourceRoot":"","sources":["../../../../../../../libs/features/src/shared/shutdown.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAM/C"}
|
package/shared/types.d.ts
CHANGED
|
@@ -63,6 +63,8 @@ export interface ActionDescription {
|
|
|
63
63
|
description?: string;
|
|
64
64
|
/** Optional JSON-schema-like shape describing the action payload. */
|
|
65
65
|
schema?: object;
|
|
66
|
+
/** When this action is used as a request, the type of the action in the other direction that answers it. */
|
|
67
|
+
respondsWith?: string;
|
|
66
68
|
}
|
|
67
69
|
/**
|
|
68
70
|
* The set of actions a feature emits to, and accepts from, its counterpart.
|
|
@@ -76,6 +78,66 @@ export interface FeatureContract {
|
|
|
76
78
|
/** Actions this side handles from the other side. */
|
|
77
79
|
accepted: ActionDescription[];
|
|
78
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Context handed to an {@link ExperiencePlugin} around a feature's mount lifecycle.
|
|
83
|
+
*/
|
|
84
|
+
export interface ExperiencePluginContext {
|
|
85
|
+
/**
|
|
86
|
+
* The in-document root the display mode mounted: the iframe for `embedded`,
|
|
87
|
+
* the dialog container for `dialog`, and `null` for `popup` and
|
|
88
|
+
* `standalone`, which open a separate window with no in-document element.
|
|
89
|
+
*/
|
|
90
|
+
element: HTMLElement | null;
|
|
91
|
+
/** The display mode the feature was surfaced in. */
|
|
92
|
+
displayMode: DisplayMode;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Opt-in extension that decorates a feature's mount lifecycle (e.g. transitions, animations).
|
|
96
|
+
*
|
|
97
|
+
* Register plugins through {@link ShellOptions.plugins}. After each successful
|
|
98
|
+
* mount the shell calls `onMount` on every plugin in registration order; before
|
|
99
|
+
* each unmount it calls `onUnmount` one plugin at a time in reverse
|
|
100
|
+
* registration order, awaiting any returned promise, then runs the teardowns
|
|
101
|
+
* returned by `onMount` (also in reverse registration order) and finally
|
|
102
|
+
* removes the feature. The SDK ships no built-in plugins.
|
|
103
|
+
*
|
|
104
|
+
* @example Registering a fade-out plugin on a shell
|
|
105
|
+
* ```typescript
|
|
106
|
+
* const shell = createShell({
|
|
107
|
+
* container: '#shell',
|
|
108
|
+
* plugins: [
|
|
109
|
+
* {
|
|
110
|
+
* name: 'fade',
|
|
111
|
+
* onUnmount: ({ element }) => (element ? animateFadeOut(element) : undefined),
|
|
112
|
+
* },
|
|
113
|
+
* ],
|
|
114
|
+
* })
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
export interface ExperiencePlugin {
|
|
118
|
+
/** Unique plugin name, surfaced in debug logs. */
|
|
119
|
+
name: string;
|
|
120
|
+
/**
|
|
121
|
+
* Runs after the feature mounts; may animate it in and return a teardown.
|
|
122
|
+
*
|
|
123
|
+
* A thrown error surfaces as an `error` event on the shell and does not
|
|
124
|
+
* stop the remaining plugins from mounting.
|
|
125
|
+
*
|
|
126
|
+
* @param context - The mounted element and its display mode.
|
|
127
|
+
* @returns An optional teardown invoked on unmount, after every `onUnmount` has settled.
|
|
128
|
+
*/
|
|
129
|
+
onMount?(context: ExperiencePluginContext): void | (() => void);
|
|
130
|
+
/**
|
|
131
|
+
* Runs before the feature unmounts; may return a promise to defer teardown until an exit animation finishes.
|
|
132
|
+
*
|
|
133
|
+
* A rejected promise (or thrown error) surfaces as an `error` event on the
|
|
134
|
+
* shell and teardown continues with the remaining plugins.
|
|
135
|
+
*
|
|
136
|
+
* @param context - The mounted element and its display mode.
|
|
137
|
+
* @returns Optionally a promise the shell awaits before tearing down.
|
|
138
|
+
*/
|
|
139
|
+
onUnmount?(context: ExperiencePluginContext): void | Promise<void>;
|
|
140
|
+
}
|
|
79
141
|
/**
|
|
80
142
|
* Options accepted by the host-side {@link FeatureContract} consumer when
|
|
81
143
|
* creating or opening a shell.
|
|
@@ -85,7 +147,12 @@ export interface ShellOptions {
|
|
|
85
147
|
container: string | HTMLElement;
|
|
86
148
|
/** Stable identifier for the feature; seeds the broker name surfaced in debug logs. */
|
|
87
149
|
name?: string;
|
|
88
|
-
/**
|
|
150
|
+
/**
|
|
151
|
+
* The feature's contract exactly as the feature authored it (`emitted` = what
|
|
152
|
+
* the feature sends, `accepted` = what the feature handles). The shell
|
|
153
|
+
* derives the host-side orientation itself — hand it the feature's contract,
|
|
154
|
+
* never a pre-swapped copy. Replaces the generic default when provided.
|
|
155
|
+
*/
|
|
89
156
|
contract?: FeatureContract;
|
|
90
157
|
/** How the feature should be surfaced; defaults to {@link DisplayMode.Embedded}. */
|
|
91
158
|
displayMode?: DisplayMode;
|
|
@@ -107,6 +174,8 @@ export interface ShellOptions {
|
|
|
107
174
|
protocol?: SecurityProtocol;
|
|
108
175
|
/** Pre-shared key used by the `v2` protocol. */
|
|
109
176
|
sharedKey?: string;
|
|
177
|
+
/** Experience plugins wrapped around each mount/unmount; `onMount` runs in registration order, `onUnmount` in reverse. */
|
|
178
|
+
plugins?: readonly ExperiencePlugin[];
|
|
110
179
|
}
|
|
111
180
|
/**
|
|
112
181
|
* Options accepted by the hostee-side feature factory.
|
|
@@ -161,6 +230,8 @@ export interface ResolvedFeatureConfig extends FeatureConfig {
|
|
|
161
230
|
url: string;
|
|
162
231
|
/** Default display options baked into the connector as the feature's defaults. */
|
|
163
232
|
display?: DisplayDefaults;
|
|
233
|
+
/** Security envelope the build resolved; baked into the generated connector as its default. */
|
|
234
|
+
protocol?: SecurityProtocol;
|
|
164
235
|
}
|
|
165
236
|
/**
|
|
166
237
|
* A single feature app entry served by the dev server.
|
package/shared/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../libs/features/src/shared/types.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,WAAW;IACtB,uDAAuD;;IAEvD,uDAAuD;;IAEvD,yDAAyD;;IAEzD,mDAAmD;;EAEnD,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAA;AAExE;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;AAEnD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,SAAS,CAAA;AAE5C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,0DAA0D;IAC1D,WAAW,EAAE,MAAM,CAAA;IACnB,gFAAgF;IAChF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,2DAA2D;IAC3D,WAAW,EAAE,WAAW,CAAA;IACxB,qCAAqC;IACrC,KAAK,IAAI,IAAI,CAAA;IACb,qDAAqD;IACrD,OAAO,IAAI,IAAI,CAAA;CAChB;AAED;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC,CAAA;AAExF;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAA;IACZ,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../libs/features/src/shared/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const error = require('@hyperfrontend/immutable-api-utils/built-in-copy/error');
|
|
4
|
-
const node_path = require('node:path');
|
|
5
|
-
|
|
6
|
-
function resolveProjectCwd(context) {
|
|
7
|
-
const { projectName } = context;
|
|
8
|
-
if (projectName === undefined) {
|
|
9
|
-
throw error.createError('An executing project name is required.');
|
|
10
|
-
}
|
|
11
|
-
const projectConfig = context.projectsConfigurations?.projects[projectName];
|
|
12
|
-
if (projectConfig === undefined) {
|
|
13
|
-
throw error.createError(`Could not find project configuration for ${projectName}.`);
|
|
14
|
-
}
|
|
15
|
-
return node_path.join(context.root, projectConfig.root);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
exports.resolveProjectCwd = resolveProjectCwd;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { createError as createError$1 } from '@hyperfrontend/immutable-api-utils/built-in-copy/error';
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
|
|
4
|
-
function resolveProjectCwd(context) {
|
|
5
|
-
const { projectName } = context;
|
|
6
|
-
if (projectName === undefined) {
|
|
7
|
-
throw createError$1('An executing project name is required.');
|
|
8
|
-
}
|
|
9
|
-
const projectConfig = context.projectsConfigurations?.projects[projectName];
|
|
10
|
-
if (projectConfig === undefined) {
|
|
11
|
-
throw createError$1(`Could not find project configuration for ${projectName}.`);
|
|
12
|
-
}
|
|
13
|
-
return join(context.root, projectConfig.root);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { resolveProjectCwd };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shutdown.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/features/src/nx/shared/shutdown.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAM/C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/features/src/server/debug-ui/bootstrap.ts"],"names":[],"mappings":""}
|