arui-scripts 19.0.6 → 19.0.8

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/docs/modules.md CHANGED
@@ -49,7 +49,9 @@ export default aruiScriptsConfig;
49
49
 
50
50
  ```tsx
51
51
  // src/modules/some-module/index
52
+ import ReactDOM from 'react-dom';
52
53
  import type { ModuleMountFunction, ModuleUnmountFunction } from '@alfalab/scripts-modules';
54
+
53
55
  export const mount: ModuleMountFunction = (targetNode, runParams, serverState) => {
54
56
  console.log( // Вы можете передать эти переменные в ваши компоненты, подробнее ниже
55
57
  runParams, // undefined
@@ -71,11 +73,11 @@ export const unmount: ModuleUnmountFunction = (targetNode) => {
71
73
 
72
74
  ```tsx
73
75
  import type { ModuleMountFunction, ModuleUnmountFunction } from '@alfalab/scripts-modules';
74
- import ReactDOM from 'react-dom';
76
+ import ReactDOM from 'react-dom/client';
75
77
 
76
78
  let root: ReturnType<typeof ReactDOM.createRoot>
77
79
 
78
- export const mount: ModuleMountFunction = (targetNide, runParams, serverState) => {
80
+ export const mount: ModuleMountFunction = (targetNode, runParams, serverState) => {
79
81
  root = ReactDOM.createRoot(targetNode);
80
82
 
81
83
  root.render(<App preparedState={serverState} runParams={runParams} />);
@@ -719,6 +721,7 @@ type Modules = {
719
721
  [moduleId: string]: string; // moduleId - id модуля, value - путь до точки входа модуля
720
722
  };
721
723
  shared?: (string | SharedObject)[] | SharedObject; // конфигурация shared параметра для ModuleFederationPlugin
724
+ shareScope?: string // скоуп который будет присваиваться модулям в shared если иное имя не будет задано в sharedConfig. Значение по умолчанию - 'default'
722
725
  };
723
726
 
724
727
  type SharedObject = {
package/docs/settings.md CHANGED
@@ -29,7 +29,7 @@
29
29
  }
30
30
  ```
31
31
 
32
- ### Конфигурационный файл
32
+ ### Конфигурационный файл - arui-scripts.config (js | ts)
33
33
  Пример конфигурационного файла:
34
34
 
35
35
  ```ts
@@ -150,7 +150,7 @@ export default settings;
150
150
  Этот ключ принимает не только строки, но и любые возможные в [webpack варианты](https://webpack.js.org/concepts/entry-points/).
151
151
  Например, вы можете создать две отдельных входных точки для мобильной и десктопной версии приложения:
152
152
 
153
- ```js
153
+ ```ts
154
154
  const settings = {
155
155
  clientEntry: {
156
156
  mobile: './src/mobile',
@@ -178,16 +178,16 @@ const settings = {
178
178
 
179
179
  Некоторые настройки для базовой конфигурации `nginx` (`/etc/nginx/nginx.conf`).
180
180
 
181
- ```json
182
- "aruiScripts": {
183
- "nginx": {
184
- "workerProcesses": 2,
185
- "workerRlimitNoFile": 20000,
186
- "workerConnections": 19000,
187
- "eventsUse": "epoll",
188
- "daemon": "off"
189
- }
190
- }
181
+ ```ts
182
+ const settings = {
183
+ nginx: {
184
+ workerProcesses: 2,
185
+ workerRlimitNoFile: 20000,
186
+ workerConnections: 19000,
187
+ eventsUse: 'epoll',
188
+ daemon: 'off'
189
+ },
190
+ };
191
191
  ```
192
192
 
193
193
  #### runFromNonRootUser
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arui-scripts",
3
- "version": "19.0.6",
3
+ "version": "19.0.8",
4
4
  "main": "./build/index.js",
5
5
  "typings": "./build/index.d.ts",
6
6
  "license": "MPL-2.0",