@naylence/runtime 0.3.13 → 0.3.15
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/dist/browser/index.cjs +549 -539
- package/dist/browser/index.mjs +550 -540
- package/dist/cjs/browser.js +15 -0
- package/dist/cjs/naylence/fame/util/logging.js +2 -2
- package/dist/cjs/node.js +22 -0
- package/dist/cjs/version.js +2 -2
- package/dist/esm/browser.js +15 -0
- package/dist/esm/naylence/fame/util/logging.js +2 -2
- package/dist/esm/node.js +22 -0
- package/dist/esm/version.js +2 -2
- package/dist/node/index.cjs +4 -4
- package/dist/node/index.mjs +4 -4
- package/dist/node/node.cjs +567 -545
- package/dist/node/node.mjs +568 -546
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -3,7 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BROADCAST_CHANNEL_LISTENER_FACTORY_META = exports.BroadcastChannelListenerFactory = exports.BroadcastChannelListener = exports.INPAGE_LISTENER_FACTORY_META = exports.InPageListenerFactory = exports.InPageListener = exports.BROADCAST_CHANNEL_CONNECTOR_FACTORY_META = exports.BroadcastChannelConnectorFactory = exports.INPAGE_CONNECTOR_FACTORY_META = exports.InPageConnectorFactory = exports.BROADCAST_CHANNEL_CONNECTOR_TYPE = exports.BroadcastChannelConnector = exports.INPAGE_CONNECTOR_TYPE = exports.InPageConnector = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const _env_shim_js_1 = require("./_env-shim.js");
|
|
6
|
+
const plugin_js_1 = tslib_1.__importDefault(require("./plugin.js"));
|
|
6
7
|
(0, _env_shim_js_1.installProcessEnvShim)();
|
|
8
|
+
// Always register the plugin directly in the browser.
|
|
9
|
+
// This bypasses the need for dynamic imports of bare specifiers, which often fail in bundlers.
|
|
10
|
+
(async () => {
|
|
11
|
+
try {
|
|
12
|
+
await plugin_js_1.default.register();
|
|
13
|
+
}
|
|
14
|
+
catch (err) {
|
|
15
|
+
console.error('[naylence-runtime] Failed to auto-register plugin:', err);
|
|
16
|
+
}
|
|
17
|
+
})();
|
|
18
|
+
// Auto-register the runtime plugin in browser environment
|
|
19
|
+
// We use globalThis to access the shimmed process object safely
|
|
20
|
+
// We don't need to set FAME_PLUGINS in the browser anymore because we register directly above.
|
|
21
|
+
// However, we keep the shim installation as it might be used by other code.
|
|
7
22
|
// Browser entry point re-exporting shared runtime surface and browser-only modules.
|
|
8
23
|
tslib_1.__exportStar(require("./runtime-isomorphic.js"), exports);
|
|
9
24
|
var inpage_connector_js_1 = require("./naylence/fame/connector/inpage-connector.js");
|
|
@@ -245,7 +245,7 @@ function getPinoLevel(level) {
|
|
|
245
245
|
case logging_types_js_1.LogLevel.CRITICAL:
|
|
246
246
|
return 'fatal';
|
|
247
247
|
default:
|
|
248
|
-
return '
|
|
248
|
+
return 'warn';
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
// Initialize Pino if available (Node.js only)
|
|
@@ -324,7 +324,7 @@ function getInitialLogLevel() {
|
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
// Default to INFO - balanced verbosity for most use cases
|
|
327
|
-
return logging_types_js_1.LogLevel.
|
|
327
|
+
return logging_types_js_1.LogLevel.WARNING;
|
|
328
328
|
}
|
|
329
329
|
const defaultConfig = {
|
|
330
330
|
level: getInitialLogLevel(),
|
package/dist/cjs/node.js
CHANGED
|
@@ -3,11 +3,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.runOAuth2Server = exports.createOAuth2ServerApp = exports.createOpenIDConfigurationRouter = exports.createOAuth2TokenRouter = exports.createJwksRouter = exports.normalizeExtendedFameConfig = exports.FAME_FABRIC_FACTORY_BASE_TYPE = exports.InProcessFameFabricFactory = exports.InProcessFameFabric = exports.safeImport = exports.getInPageListenerInstance = exports.InPageListener = exports.getHttpListenerInstance = exports.HttpListener = exports.WebSocketListener = exports.TRANSPORT_LISTENER_FACTORY_BASE_TYPE = exports.TransportListenerFactory = exports.TransportListener = exports.getWebsocketListenerInstance = exports.DefaultHttpServer = exports.QueueFullError = exports.HttpStatelessConnector = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
require("./naylence/fame/connector/websocket-connector-node-ssl.js");
|
|
6
|
+
const plugin_js_1 = tslib_1.__importDefault(require("./plugin.js"));
|
|
6
7
|
// Ensure Node-specific registrations (storage, sqlite, etc.) happen before
|
|
7
8
|
// the isomorphic exports are evaluated. Some factories (SQLite) must be
|
|
8
9
|
// registered early so configuration parsing that happens during runtime
|
|
9
10
|
// initialization can resolve the requested storage profiles.
|
|
10
11
|
require("./naylence/fame/storage/node-index.js"); // Side-effect: registers SQLite profiles
|
|
12
|
+
// Always register the plugin directly. This ensures it is initialized even if
|
|
13
|
+
// the dynamic import mechanism (used by FAME_PLUGINS) fails or is not used.
|
|
14
|
+
(async () => {
|
|
15
|
+
try {
|
|
16
|
+
await plugin_js_1.default.register();
|
|
17
|
+
}
|
|
18
|
+
catch (err) {
|
|
19
|
+
console.error('[naylence-runtime] Failed to auto-register plugin:', err);
|
|
20
|
+
}
|
|
21
|
+
})();
|
|
22
|
+
// Auto-register the runtime plugin in FAME_PLUGINS for child processes
|
|
23
|
+
if (typeof process !== 'undefined' && process.env) {
|
|
24
|
+
const pluginName = '@naylence/runtime';
|
|
25
|
+
const current = process.env.FAME_PLUGINS || '';
|
|
26
|
+
const plugins = current.split(',').map((p) => p.trim());
|
|
27
|
+
if (!plugins.includes(pluginName)) {
|
|
28
|
+
process.env.FAME_PLUGINS = current
|
|
29
|
+
? `${current},${pluginName}`
|
|
30
|
+
: pluginName;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
11
33
|
tslib_1.__exportStar(require("./naylence/fame/storage/node-index.js"), exports);
|
|
12
34
|
tslib_1.__exportStar(require("./runtime-isomorphic.js"), exports);
|
|
13
35
|
tslib_1.__exportStar(require("./naylence/fame/node/index.js"), exports);
|
package/dist/cjs/version.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file is auto-generated during build - do not edit manually
|
|
3
|
-
// Generated from package.json version: 0.3.
|
|
3
|
+
// Generated from package.json version: 0.3.15
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.VERSION = void 0;
|
|
6
6
|
/**
|
|
7
7
|
* The package version, injected at build time.
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
|
-
exports.VERSION = '0.3.
|
|
10
|
+
exports.VERSION = '0.3.15';
|
package/dist/esm/browser.js
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import { installProcessEnvShim } from './_env-shim.js';
|
|
2
|
+
import plugin from './plugin.js';
|
|
2
3
|
installProcessEnvShim();
|
|
4
|
+
// Always register the plugin directly in the browser.
|
|
5
|
+
// This bypasses the need for dynamic imports of bare specifiers, which often fail in bundlers.
|
|
6
|
+
(async () => {
|
|
7
|
+
try {
|
|
8
|
+
await plugin.register();
|
|
9
|
+
}
|
|
10
|
+
catch (err) {
|
|
11
|
+
console.error('[naylence-runtime] Failed to auto-register plugin:', err);
|
|
12
|
+
}
|
|
13
|
+
})();
|
|
14
|
+
// Auto-register the runtime plugin in browser environment
|
|
15
|
+
// We use globalThis to access the shimmed process object safely
|
|
16
|
+
// We don't need to set FAME_PLUGINS in the browser anymore because we register directly above.
|
|
17
|
+
// However, we keep the shim installation as it might be used by other code.
|
|
3
18
|
// Browser entry point re-exporting shared runtime surface and browser-only modules.
|
|
4
19
|
export * from './runtime-isomorphic.js';
|
|
5
20
|
export { InPageConnector, INPAGE_CONNECTOR_TYPE, } from './naylence/fame/connector/inpage-connector.js';
|
|
@@ -231,7 +231,7 @@ function getPinoLevel(level) {
|
|
|
231
231
|
case LogLevel.CRITICAL:
|
|
232
232
|
return 'fatal';
|
|
233
233
|
default:
|
|
234
|
-
return '
|
|
234
|
+
return 'warn';
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
// Initialize Pino if available (Node.js only)
|
|
@@ -310,7 +310,7 @@ function getInitialLogLevel() {
|
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
312
|
// Default to INFO - balanced verbosity for most use cases
|
|
313
|
-
return LogLevel.
|
|
313
|
+
return LogLevel.WARNING;
|
|
314
314
|
}
|
|
315
315
|
const defaultConfig = {
|
|
316
316
|
level: getInitialLogLevel(),
|
package/dist/esm/node.js
CHANGED
|
@@ -1,9 +1,31 @@
|
|
|
1
1
|
import './naylence/fame/connector/websocket-connector-node-ssl.js';
|
|
2
|
+
import plugin from './plugin.js';
|
|
2
3
|
// Ensure Node-specific registrations (storage, sqlite, etc.) happen before
|
|
3
4
|
// the isomorphic exports are evaluated. Some factories (SQLite) must be
|
|
4
5
|
// registered early so configuration parsing that happens during runtime
|
|
5
6
|
// initialization can resolve the requested storage profiles.
|
|
6
7
|
import './naylence/fame/storage/node-index.js'; // Side-effect: registers SQLite profiles
|
|
8
|
+
// Always register the plugin directly. This ensures it is initialized even if
|
|
9
|
+
// the dynamic import mechanism (used by FAME_PLUGINS) fails or is not used.
|
|
10
|
+
(async () => {
|
|
11
|
+
try {
|
|
12
|
+
await plugin.register();
|
|
13
|
+
}
|
|
14
|
+
catch (err) {
|
|
15
|
+
console.error('[naylence-runtime] Failed to auto-register plugin:', err);
|
|
16
|
+
}
|
|
17
|
+
})();
|
|
18
|
+
// Auto-register the runtime plugin in FAME_PLUGINS for child processes
|
|
19
|
+
if (typeof process !== 'undefined' && process.env) {
|
|
20
|
+
const pluginName = '@naylence/runtime';
|
|
21
|
+
const current = process.env.FAME_PLUGINS || '';
|
|
22
|
+
const plugins = current.split(',').map((p) => p.trim());
|
|
23
|
+
if (!plugins.includes(pluginName)) {
|
|
24
|
+
process.env.FAME_PLUGINS = current
|
|
25
|
+
? `${current},${pluginName}`
|
|
26
|
+
: pluginName;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
7
29
|
export * from './naylence/fame/storage/node-index.js';
|
|
8
30
|
export * from './runtime-isomorphic.js';
|
|
9
31
|
export * from './naylence/fame/node/index.js';
|
package/dist/esm/version.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated during build - do not edit manually
|
|
2
|
-
// Generated from package.json version: 0.3.
|
|
2
|
+
// Generated from package.json version: 0.3.15
|
|
3
3
|
/**
|
|
4
4
|
* The package version, injected at build time.
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export const VERSION = '0.3.
|
|
7
|
+
export const VERSION = '0.3.15';
|
package/dist/node/index.cjs
CHANGED
|
@@ -14,12 +14,12 @@ var fastify = require('fastify');
|
|
|
14
14
|
var websocketPlugin = require('@fastify/websocket');
|
|
15
15
|
|
|
16
16
|
// This file is auto-generated during build - do not edit manually
|
|
17
|
-
// Generated from package.json version: 0.3.
|
|
17
|
+
// Generated from package.json version: 0.3.15
|
|
18
18
|
/**
|
|
19
19
|
* The package version, injected at build time.
|
|
20
20
|
* @internal
|
|
21
21
|
*/
|
|
22
|
-
const VERSION = '0.3.
|
|
22
|
+
const VERSION = '0.3.15';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -543,7 +543,7 @@ function getPinoLevel(level) {
|
|
|
543
543
|
case exports.LogLevel.CRITICAL:
|
|
544
544
|
return 'fatal';
|
|
545
545
|
default:
|
|
546
|
-
return '
|
|
546
|
+
return 'warn';
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
// Initialize Pino if available (Node.js only)
|
|
@@ -622,7 +622,7 @@ function getInitialLogLevel() {
|
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
624
|
// Default to INFO - balanced verbosity for most use cases
|
|
625
|
-
return exports.LogLevel.
|
|
625
|
+
return exports.LogLevel.WARNING;
|
|
626
626
|
}
|
|
627
627
|
const defaultConfig = {
|
|
628
628
|
level: getInitialLogLevel(),
|
package/dist/node/index.mjs
CHANGED
|
@@ -13,12 +13,12 @@ import fastify from 'fastify';
|
|
|
13
13
|
import websocketPlugin from '@fastify/websocket';
|
|
14
14
|
|
|
15
15
|
// This file is auto-generated during build - do not edit manually
|
|
16
|
-
// Generated from package.json version: 0.3.
|
|
16
|
+
// Generated from package.json version: 0.3.15
|
|
17
17
|
/**
|
|
18
18
|
* The package version, injected at build time.
|
|
19
19
|
* @internal
|
|
20
20
|
*/
|
|
21
|
-
const VERSION = '0.3.
|
|
21
|
+
const VERSION = '0.3.15';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -542,7 +542,7 @@ function getPinoLevel(level) {
|
|
|
542
542
|
case LogLevel.CRITICAL:
|
|
543
543
|
return 'fatal';
|
|
544
544
|
default:
|
|
545
|
-
return '
|
|
545
|
+
return 'warn';
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
548
|
// Initialize Pino if available (Node.js only)
|
|
@@ -621,7 +621,7 @@ function getInitialLogLevel() {
|
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
623
|
// Default to INFO - balanced verbosity for most use cases
|
|
624
|
-
return LogLevel.
|
|
624
|
+
return LogLevel.WARNING;
|
|
625
625
|
}
|
|
626
626
|
const defaultConfig = {
|
|
627
627
|
level: getInitialLogLevel(),
|