@retailcrm/embed-ui-v1-endpoint 0.9.11-alpha.6 → 0.9.11

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 (2) hide show
  1. package/README.md +41 -1
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -1,3 +1,43 @@
1
1
  # `@retailcrm/embed-ui-v1-endpoint`
2
2
 
3
- Endpoint package scaffold for RetailCRM integrations.
3
+ [![npm version](https://img.shields.io/npm/v/@retailcrm/embed-ui-v1-endpoint.svg)](https://www.npmjs.com/package/@retailcrm/embed-ui-v1-endpoint)
4
+
5
+ `@retailcrm/embed-ui-v1-endpoint` помогает поднять endpoint для удалённых
6
+ виджетов и страниц в RetailCRM: принять вызовы host-части, смонтировать Vue
7
+ приложение в удалённый root и корректно освобождать ресурсы.
8
+
9
+ Пакет покрывает два сценария:
10
+
11
+ - **Pages** — запуск по `code`.
12
+ - **Widgets** — запуск по `id + target`.
13
+
14
+ ## Быстрый старт
15
+
16
+ ```ts
17
+ // endpoint.worker.ts
18
+ import { defineRunner, runEndpoint } from '@retailcrm/embed-ui-v1-endpoint/remote'
19
+
20
+ import OrdersPage from './pages/OrdersPage.vue'
21
+ import OrderCommonWidget from './widgets/OrderCommonWidget.vue'
22
+
23
+ const runner = defineRunner({
24
+ pages: [OrdersPage],
25
+ widgets: [OrderCommonWidget],
26
+ })
27
+
28
+ runEndpoint(runner)
29
+ ```
30
+
31
+ Для продакшен-использования обычно достаточно `runEndpoint(...)` в worker entry.
32
+ Если нужен более низкоуровневый контроль транспорта — используйте `createEndpoint(...)`.
33
+
34
+ ## Продвинутые гайды
35
+
36
+ Подробная документация по методам находится в каталоге [`docs/`](./docs/README.md):
37
+
38
+ - [`defineRunner`](./docs/define-runner.md)
39
+ - [`definePageRunner`](./docs/define-page-runner.md)
40
+ - [`defineWidgetRunner`](./docs/define-widget-runner.md)
41
+ - [`createEndpoint`](./docs/create-endpoint.md)
42
+ - [`runEndpoint`](./docs/run-endpoint.md)
43
+ - [`targets` и `defineTarget`](./docs/targets.md)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@retailcrm/embed-ui-v1-endpoint",
3
3
  "type": "module",
4
- "version": "0.9.11-alpha.6",
4
+ "version": "0.9.11",
5
5
  "description": "Endpoint API for integrations in RetailCRM",
6
6
  "license": "MIT",
7
7
  "author": "RetailDriverLLC <integration@retailcrm.ru>",
@@ -78,16 +78,16 @@
78
78
  },
79
79
  "peerDependencies": {
80
80
  "@remote-ui/rpc": "^1.4",
81
- "@retailcrm/embed-ui-v1-contexts": "^0.9.11-alpha.6",
82
- "@retailcrm/embed-ui-v1-types": "^0.9.11-alpha.6",
81
+ "@retailcrm/embed-ui-v1-contexts": "^0.9.11",
82
+ "@retailcrm/embed-ui-v1-types": "^0.9.11",
83
83
  "pinia": "^2.2",
84
84
  "vue": "^3.5"
85
85
  },
86
86
  "dependencies": {
87
87
  "@remote-ui/rpc": "^1.4.7",
88
- "@retailcrm/embed-ui-v1-components": "^0.9.11-alpha.6",
89
- "@retailcrm/embed-ui-v1-contexts": "^0.9.11-alpha.6",
90
- "@retailcrm/embed-ui-v1-types": "^0.9.11-alpha.6"
88
+ "@retailcrm/embed-ui-v1-components": "^0.9.11",
89
+ "@retailcrm/embed-ui-v1-contexts": "^0.9.11",
90
+ "@retailcrm/embed-ui-v1-types": "^0.9.11"
91
91
  },
92
92
  "devDependencies": {
93
93
  "@retailcrm/image-preview": "^1.0.2",