@foxford/den 3.2.0 → 3.2.2-beta-cb8f0c1-20260825

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 (38) hide show
  1. package/README.mdx +35 -0
  2. package/bin/den.cjs +4 -3
  3. package/bin/den.js +2 -1
  4. package/builder/index.cjs +3 -2
  5. package/builder/index.d.cts +8 -3
  6. package/builder/index.d.ts +8 -3
  7. package/builder/index.js +2 -1
  8. package/{chunk-RRR2DJMN.cjs → chunk-3X4WVHUU.cjs} +43 -15
  9. package/{chunk-MCN4GFEQ.js → chunk-E56BKBQZ.js} +2 -1
  10. package/{chunk-Z5BL4DJA.cjs → chunk-H5DKRHHQ.cjs} +2 -1
  11. package/chunk-KQAB6C6Q.cjs +15 -0
  12. package/chunk-RG7ZV5BD.js +15 -0
  13. package/{chunk-TPHJUDHG.js → chunk-SOH2TL2N.js} +35 -20
  14. package/{chunk-ZOU6W6ZQ.cjs → chunk-XDM6J4LJ.cjs} +35 -20
  15. package/{chunk-BMI5HNGE.js → chunk-XU5HUIPK.js} +43 -15
  16. package/{define-slot-DYNCLDJY.d.cts → define-slot-DouHW8RK.d.cts} +14 -1
  17. package/{define-slot-Cngzae6i.d.ts → define-slot-TkqbLySB.d.ts} +14 -1
  18. package/define.cjs +2 -2
  19. package/define.d.cts +1 -1
  20. package/define.d.ts +1 -1
  21. package/define.js +1 -1
  22. package/{descriptor-DQ6Gi7A_.d.ts → descriptor-tWPa9j-x.d.ts} +17 -7
  23. package/{descriptor-Dujg_1on.d.cts → descriptor-w8oxeIAe.d.cts} +17 -7
  24. package/index.cjs +2 -2
  25. package/index.d.cts +3 -3
  26. package/index.d.ts +3 -3
  27. package/index.js +1 -1
  28. package/island/index.cjs +2 -2
  29. package/island/index.d.cts +14 -7
  30. package/island/index.d.ts +14 -7
  31. package/island/index.js +1 -1
  32. package/package.json +25 -16
  33. package/serve/index.cjs +9 -5
  34. package/serve/index.d.cts +12 -3
  35. package/serve/index.d.ts +12 -3
  36. package/serve/index.js +5 -1
  37. package/{view-adapter-B4gEb-ms.d.ts → view-adapter-BV62bdhM.d.ts} +1 -1
  38. package/{view-adapter-DJ7yB6Ml.d.cts → view-adapter-DF1me25J.d.cts} +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxford/den",
3
- "version": "3.2.0",
3
+ "version": "3.2.2-beta-cb8f0c1-20260825",
4
4
  "description": "Den — декларативный метафреймворк Foxford (core runtime)",
5
5
  "keywords": [
6
6
  "foxford",
@@ -9,6 +9,13 @@
9
9
  "ioc",
10
10
  "lifecycle"
11
11
  ],
12
+ "homepage": "https://github.com/foxford/frontend-platform",
13
+ "bugs": "https://github.com/foxford/frontend-platform/issues",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/foxford/frontend-platform.git",
17
+ "directory": "packages/den"
18
+ },
12
19
  "license": "MIT",
13
20
  "author": "Foxford Co",
14
21
  "maintainers": [
@@ -24,8 +31,8 @@
24
31
  },
25
32
  "dependencies": {
26
33
  "fastify": "^5.11.2",
27
- "@foxford/logger": "^1.2.2",
28
- "@foxford/ioc": "^1.1.2"
34
+ "@foxford/ioc": "^1.1.2",
35
+ "@foxford/logger": "^1.2.2"
29
36
  },
30
37
  "peerDependencies": {
31
38
  "vite": ">=5.0.0"
@@ -83,32 +90,34 @@
83
90
  "bin",
84
91
  "builder",
85
92
  "chunk-3RX2OSUL.js",
93
+ "chunk-3X4WVHUU.cjs",
86
94
  "chunk-6FNC3XMI.js",
87
95
  "chunk-6QV4L6R2.cjs",
88
96
  "chunk-A6ZPAM6Z.cjs",
89
- "chunk-BMI5HNGE.js",
90
97
  "chunk-C7BM4DGX.cjs",
91
98
  "chunk-E23E2VUC.js",
92
- "chunk-MCN4GFEQ.js",
93
- "chunk-RRR2DJMN.cjs",
99
+ "chunk-E56BKBQZ.js",
100
+ "chunk-H5DKRHHQ.cjs",
101
+ "chunk-KQAB6C6Q.cjs",
102
+ "chunk-RG7ZV5BD.js",
103
+ "chunk-SOH2TL2N.js",
94
104
  "chunk-T5QVCXVB.cjs",
95
105
  "chunk-TPBI6TOU.js",
96
- "chunk-TPHJUDHG.js",
97
106
  "chunk-WBHHHICS.js",
107
+ "chunk-XDM6J4LJ.cjs",
98
108
  "chunk-XOJ2VWX4.cjs",
99
- "chunk-Z5BL4DJA.cjs",
100
- "chunk-ZOU6W6ZQ.cjs",
109
+ "chunk-XU5HUIPK.js",
101
110
  "define-repository-CwAXed2X.d.cts",
102
111
  "define-repository-q_T4hqeP.d.ts",
103
- "define-slot-Cngzae6i.d.ts",
104
- "define-slot-DYNCLDJY.d.cts",
112
+ "define-slot-DouHW8RK.d.cts",
113
+ "define-slot-TkqbLySB.d.ts",
105
114
  "define.cjs",
106
115
  "define.d.cts",
107
116
  "define.d.ts",
108
117
  "define.js",
109
118
  "den.js",
110
- "descriptor-DQ6Gi7A_.d.ts",
111
- "descriptor-Dujg_1on.d.cts",
119
+ "descriptor-tWPa9j-x.d.ts",
120
+ "descriptor-w8oxeIAe.d.cts",
112
121
  "index.cjs",
113
122
  "index.d.cts",
114
123
  "index.d.ts",
@@ -122,9 +131,9 @@
122
131
  "server-render-CocWXQKC.d.ts",
123
132
  "types-Dx5qGiwk.d.cts",
124
133
  "types-Dx5qGiwk.d.ts",
125
- "view-adapter-B4gEb-ms.d.ts",
126
- "view-adapter-DJ7yB6Ml.d.cts"
134
+ "view-adapter-BV62bdhM.d.ts",
135
+ "view-adapter-DF1me25J.d.cts"
127
136
  ],
128
- "sha": "c382a3d",
137
+ "sha": "cb8f0c1",
129
138
  "scripts": {}
130
139
  }
package/serve/index.cjs CHANGED
@@ -1,8 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
+ var _chunkKQAB6C6Qcjs = require('../chunk-KQAB6C6Q.cjs');
3
4
 
4
5
 
5
- var _chunkZOU6W6ZQcjs = require('../chunk-ZOU6W6ZQ.cjs');
6
+
7
+
8
+ var _chunkXDM6J4LJcjs = require('../chunk-XDM6J4LJ.cjs');
6
9
  require('../chunk-XOJ2VWX4.cjs');
7
10
  require('../chunk-6QV4L6R2.cjs');
8
11
 
@@ -66,14 +69,14 @@ function registerAssets(instance, source) {
66
69
 
67
70
  var DEFAULT_SLOW_RENDER_MS = 1e3;
68
71
  function claim(app) {
69
- return _chunkZOU6W6ZQcjs.normalizeRoutes.call(void 0, app.routes).map((route) => route.source);
72
+ return _chunkXDM6J4LJcjs.normalizeRoutes.call(void 0, app.routes).map((route) => route.source);
70
73
  }
71
74
  function matchClaim(app, pathname) {
72
75
  var _a, _b;
73
76
  if (claim(app).length === 0) {
74
77
  return {};
75
78
  }
76
- return (_b = (_a = _chunkZOU6W6ZQcjs.matchRoute.call(void 0, app.routes, pathname)) == null ? void 0 : _a.params) != null ? _b : null;
79
+ return (_b = (_a = _chunkXDM6J4LJcjs.matchRoute.call(void 0, app.routes, pathname)) == null ? void 0 : _a.params) != null ? _b : null;
77
80
  }
78
81
  function parseCookies(header) {
79
82
  const cookies = {};
@@ -129,7 +132,7 @@ var appPlugin = (instance, options) => {
129
132
  }
130
133
  const startedAt = Date.now();
131
134
  try {
132
- const result = yield _chunkZOU6W6ZQcjs.renderApp.call(void 0, app, { context: browserContext(req), params, pathname, search });
135
+ const result = yield _chunkXDM6J4LJcjs.renderApp.call(void 0, app, { context: browserContext(req), params, pathname, search });
133
136
  const elapsed = Date.now() - startedAt;
134
137
  if (elapsed >= slowRenderMs) {
135
138
  serveLog.warn(`\u043C\u0435\u0434\u043B\u0435\u043D\u043D\u044B\u0439 \u0440\u0435\u043D\u0434\u0435\u0440 \xAB${pathname}\xBB: ${String(elapsed)}\u043C\u0441`);
@@ -184,4 +187,5 @@ function serveApp(_0) {
184
187
 
185
188
 
186
189
 
187
- exports.appPlugin = appPlugin; exports.registerAssets = registerAssets; exports.serveApp = serveApp;
190
+
191
+ exports.appPlugin = appPlugin; exports.loadAppEnv = _chunkKQAB6C6Qcjs.loadAppEnv; exports.registerAssets = registerAssets; exports.serveApp = serveApp;
package/serve/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { FastifyInstance, FastifyPluginAsync } from 'fastify';
2
- import { I as IslandDescriptor } from '../descriptor-Dujg_1on.cjs';
2
+ import { I as IslandDescriptor } from '../descriptor-w8oxeIAe.cjs';
3
3
  import { A as AppRoute } from '../routes-B0hDrkiF.cjs';
4
- import '../define-slot-DYNCLDJY.cjs';
4
+ import '../define-slot-DouHW8RK.cjs';
5
5
  import '../types-Dx5qGiwk.cjs';
6
6
  import '@foxford/ioc';
7
7
 
@@ -41,6 +41,15 @@ interface AppPluginOptions {
41
41
  */
42
42
  declare const appPlugin: FastifyPluginAsync<AppPluginOptions>;
43
43
 
44
+ /**
45
+ * Кладёт умолчания из `<root>/.env` в окружение процесса.
46
+ *
47
+ * Отсутствие файла — норма, а не отказ: он локальный и в репозиторий не попадает.
48
+ *
49
+ * @param root - Корень приложения
50
+ */
51
+ declare function loadAppEnv(root: string): void;
52
+
44
53
  /** Настройки инстанса. */
45
54
  interface ServeAppOptions {
46
55
  /** Порт; `0` — свободный, фактический смотри в `server.addresses()`. */
@@ -79,4 +88,4 @@ interface ServeAppOptions {
79
88
  */
80
89
  declare function serveApp(app: ServableApp, options?: ServeAppOptions): Promise<FastifyInstance>;
81
90
 
82
- export { type AppAssetsSource, type AppPluginOptions, type ServableApp, type ServeAppOptions, appPlugin, registerAssets, serveApp };
91
+ export { type AppAssetsSource, type AppPluginOptions, type ServableApp, type ServeAppOptions, appPlugin, loadAppEnv, registerAssets, serveApp };
package/serve/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { FastifyInstance, FastifyPluginAsync } from 'fastify';
2
- import { I as IslandDescriptor } from '../descriptor-DQ6Gi7A_.js';
2
+ import { I as IslandDescriptor } from '../descriptor-tWPa9j-x.js';
3
3
  import { A as AppRoute } from '../routes-0uXJ0fux.js';
4
- import '../define-slot-Cngzae6i.js';
4
+ import '../define-slot-TkqbLySB.js';
5
5
  import '../types-Dx5qGiwk.js';
6
6
  import '@foxford/ioc';
7
7
 
@@ -41,6 +41,15 @@ interface AppPluginOptions {
41
41
  */
42
42
  declare const appPlugin: FastifyPluginAsync<AppPluginOptions>;
43
43
 
44
+ /**
45
+ * Кладёт умолчания из `<root>/.env` в окружение процесса.
46
+ *
47
+ * Отсутствие файла — норма, а не отказ: он локальный и в репозиторий не попадает.
48
+ *
49
+ * @param root - Корень приложения
50
+ */
51
+ declare function loadAppEnv(root: string): void;
52
+
44
53
  /** Настройки инстанса. */
45
54
  interface ServeAppOptions {
46
55
  /** Порт; `0` — свободный, фактический смотри в `server.addresses()`. */
@@ -79,4 +88,4 @@ interface ServeAppOptions {
79
88
  */
80
89
  declare function serveApp(app: ServableApp, options?: ServeAppOptions): Promise<FastifyInstance>;
81
90
 
82
- export { type AppAssetsSource, type AppPluginOptions, type ServableApp, type ServeAppOptions, appPlugin, registerAssets, serveApp };
91
+ export { type AppAssetsSource, type AppPluginOptions, type ServableApp, type ServeAppOptions, appPlugin, loadAppEnv, registerAssets, serveApp };
package/serve/index.js CHANGED
@@ -1,8 +1,11 @@
1
+ import {
2
+ loadAppEnv
3
+ } from "../chunk-RG7ZV5BD.js";
1
4
  import {
2
5
  matchRoute,
3
6
  normalizeRoutes,
4
7
  renderApp
5
- } from "../chunk-TPHJUDHG.js";
8
+ } from "../chunk-SOH2TL2N.js";
6
9
  import "../chunk-E23E2VUC.js";
7
10
  import "../chunk-3RX2OSUL.js";
8
11
  import {
@@ -182,6 +185,7 @@ function serveApp(_0) {
182
185
  }
183
186
  export {
184
187
  appPlugin,
188
+ loadAppEnv,
185
189
  registerAssets,
186
190
  serveApp
187
191
  };
@@ -1,4 +1,4 @@
1
- import { I as IslandDescriptor } from './descriptor-DQ6Gi7A_.js';
1
+ import { I as IslandDescriptor } from './descriptor-tWPa9j-x.js';
2
2
  import { S as ServerRenderResult } from './server-render-CocWXQKC.js';
3
3
  import { L as LayerDefinition, h as LayerConfig } from './types-Dx5qGiwk.js';
4
4
  import { Container, Token } from '@foxford/ioc';
@@ -1,4 +1,4 @@
1
- import { I as IslandDescriptor } from './descriptor-Dujg_1on.cjs';
1
+ import { I as IslandDescriptor } from './descriptor-w8oxeIAe.cjs';
2
2
  import { S as ServerRenderResult } from './server-render-CocWXQKC.cjs';
3
3
  import { L as LayerDefinition, h as LayerConfig } from './types-Dx5qGiwk.cjs';
4
4
  import { Container, Token } from '@foxford/ioc';