@tramvai/core 2.72.3 → 2.72.5

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 +2 -29
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -60,7 +60,7 @@ After calling createApp, [СommandLineRunner](concepts/command-line-runner.md) i
60
60
  - `this` - action execution context that contains some helper functions and resolved deps
61
61
  - `params` - data passed to action
62
62
  - `deps` - List of providers that are needed for the action to work
63
- - `conditions` - List of restrictions for the execution of the action
63
+ - `conditions` - List of conditions for the execution of the action
64
64
  - `conditionsFailResult` - [see](#conditionsfailresult)
65
65
 
66
66
  #### Action Execution Context
@@ -105,33 +105,6 @@ declareAction({
105
105
  });
106
106
  ```
107
107
 
108
- abort execution:
109
- ```ts
110
- const innerAction = declareAction(/** ... */);
111
-
112
- const action = declareAction({
113
- name: 'root',
114
- async fn() {
115
- setTimeout(() => {
116
- this.abortController.abort()
117
- }, 4000);
118
-
119
- const { payload } = await this.deps.httpClient.request({
120
- url: 'https://www.domain.com/api/endpoint',
121
- // pass signal to the request
122
- signal: this.abortSignal,
123
- });
124
-
125
- // if innerAction1 will end after abortController.abort was called
126
- // then calling innerAction2 will throw an instance of ExecutionAbortError
127
- await this.executeAction(innerAction, payload);
128
- },
129
- deps: {
130
- httpClient: HTTP_CLIENT,
131
- },
132
- });
133
- ```
134
-
135
108
  ### createBundle
136
109
 
137
110
  `createBundle(options: BundleOptions)` - method to create a bundle.
@@ -144,7 +117,7 @@ const action = declareAction({
144
117
  - `components: {}` - An object with registered components for the bundle, which you can use in application routes
145
118
  - `presets?: []` - A list of additional properties for the current bundle. This list is merged with the current properties. Needed to extract common parts, e.g. a set with actions and components for authorization. Reference - babel and eslint presets
146
119
  - `actions?: []` - List of [actions](concepts/action.md) that will be registered globally for the bundle
147
- - `reducers?: []` - List of [reducers](references/tramvai/state/base.md), which must be registered with the loading of the bundle
120
+ - `reducers?: []` - List of [reducers](03-features/08-state-management.md#reducer), which must be registered with the loading of the bundle
148
121
 
149
122
  #### Usage
150
123
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/core",
3
- "version": "2.72.3",
3
+ "version": "2.72.5",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -19,9 +19,9 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@tinkoff/utils": "^2.1.2",
22
- "@tramvai/tokens-common": "2.72.3",
23
- "@tramvai/tokens-core": "2.72.3",
24
- "@tramvai/types-actions-state-context": "2.72.3",
22
+ "@tramvai/tokens-common": "2.72.5",
23
+ "@tramvai/tokens-core": "2.72.5",
24
+ "@tramvai/types-actions-state-context": "2.72.5",
25
25
  "@tinkoff/dippy": "0.8.13",
26
26
  "tslib": "^2.4.0"
27
27
  },