@tramvai/module-common 1.95.0 → 1.96.0

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.
@@ -1,3 +1,9 @@
1
+ import { alwaysCondition } from './conditions/always';
2
+ import { onlyServer } from './conditions/onlyServer';
3
+ import { onlyBrowser } from './conditions/onlyBrowser';
4
+ import { pageServer } from './conditions/pageServer';
5
+ import { pageBrowser } from './conditions/pageBrowser';
6
+ export { alwaysCondition, onlyServer, onlyBrowser, pageServer, pageBrowser };
1
7
  declare class ActionModule {
2
8
  }
3
9
  export { ActionModule };
@@ -429,8 +429,8 @@ class CommandLineRunner {
429
429
  }
430
430
  instanceExecute(instance, line, di) {
431
431
  if (!(instance instanceof Function)) {
432
- const error = new TypeError(`Ожидалась функция в обработке линии "commandLineListTokens.${line.toString()}", получено "${instance}".
433
- Проверьте, что все подписчики на commandLineListTokens возвращают функции`);
432
+ const error = new TypeError(`Expected function in line processing "commandLineListTokens.${line.toString()}", received "${instance}".
433
+ Check that all commandLineListTokens subscribers return functions`);
434
434
  if (process.env.NODE_ENV !== 'production') {
435
435
  const instances = di.get(line);
436
436
  const record = di.getRecord(line.toString());
@@ -1136,4 +1136,4 @@ CommonChildAppModule = __decorate([
1136
1136
  })
1137
1137
  ], CommonChildAppModule);
1138
1138
 
1139
- export { ActionExecution, CommandModule, CommonChildAppModule, CommonModule, createConsumerContext };
1139
+ export { ActionExecution, CommandModule, CommonChildAppModule, CommonModule, alwaysCondition, createConsumerContext, onlyBrowser, onlyServer, pageBrowser, pageServer };
package/lib/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { CommonModule } from './CommonModule';
2
2
  export { CommandModule } from './command/CommandModule';
3
3
  export { ActionExecution } from './actions/actionExecution';
4
+ export { alwaysCondition, onlyServer, onlyBrowser, pageServer, pageBrowser, } from './actions/ActionModule';
4
5
  export { createConsumerContext } from './createConsumerContext/createConsumerContext';
5
6
  export { CommonChildAppModule } from './child-app/ChildAppModule';
6
7
  export * from '@tramvai/tokens-common';
package/lib/index.es.js CHANGED
@@ -426,8 +426,8 @@ class CommandLineRunner {
426
426
  }
427
427
  instanceExecute(instance, line, di) {
428
428
  if (!(instance instanceof Function)) {
429
- const error = new TypeError(`Ожидалась функция в обработке линии "commandLineListTokens.${line.toString()}", получено "${instance}".
430
- Проверьте, что все подписчики на commandLineListTokens возвращают функции`);
429
+ const error = new TypeError(`Expected function in line processing "commandLineListTokens.${line.toString()}", received "${instance}".
430
+ Check that all commandLineListTokens subscribers return functions`);
431
431
  if (process.env.NODE_ENV !== 'production') {
432
432
  const instances = di.get(line);
433
433
  const record = di.getRecord(line.toString());
@@ -1158,4 +1158,4 @@ CommonChildAppModule = __decorate([
1158
1158
  })
1159
1159
  ], CommonChildAppModule);
1160
1160
 
1161
- export { ActionExecution, CommandModule, CommonChildAppModule, CommonModule, createConsumerContext };
1161
+ export { ActionExecution, CommandModule, CommonChildAppModule, CommonModule, alwaysCondition, createConsumerContext, onlyBrowser, onlyServer, pageBrowser, pageServer };
package/lib/index.js CHANGED
@@ -444,8 +444,8 @@ class CommandLineRunner {
444
444
  }
445
445
  instanceExecute(instance, line, di) {
446
446
  if (!(instance instanceof Function)) {
447
- const error = new TypeError(`Ожидалась функция в обработке линии "commandLineListTokens.${line.toString()}", получено "${instance}".
448
- Проверьте, что все подписчики на commandLineListTokens возвращают функции`);
447
+ const error = new TypeError(`Expected function in line processing "commandLineListTokens.${line.toString()}", received "${instance}".
448
+ Check that all commandLineListTokens subscribers return functions`);
449
449
  if (process.env.NODE_ENV !== 'production') {
450
450
  const instances = di.get(line);
451
451
  const record = di.getRecord(line.toString());
@@ -1181,7 +1181,12 @@ Object.defineProperty(exports, 'COOKIE_MANAGER_TOKEN', {
1181
1181
  get: function () { return moduleCookie.COOKIE_MANAGER_TOKEN; }
1182
1182
  });
1183
1183
  exports.ActionExecution = ActionExecution;
1184
+ exports.alwaysCondition = alwaysCondition;
1184
1185
  exports.createConsumerContext = createConsumerContext;
1186
+ exports.onlyBrowser = onlyBrowser;
1187
+ exports.onlyServer = onlyServer;
1188
+ exports.pageBrowser = pageBrowser;
1189
+ exports.pageServer = pageServer;
1185
1190
  Object.keys(tokensCommon).forEach(function (k) {
1186
1191
  if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
1187
1192
  enumerable: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-common",
3
- "version": "1.95.0",
3
+ "version": "1.96.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -31,25 +31,25 @@
31
31
  "@tinkoff/errors": "0.2.20",
32
32
  "@tinkoff/pubsub": "0.4.23",
33
33
  "@tinkoff/url": "0.7.37",
34
- "@tramvai/module-cookie": "1.95.0",
35
- "@tramvai/module-environment": "1.95.0",
36
- "@tramvai/module-log": "1.95.0",
37
- "@tramvai/tokens-child-app": "1.95.0",
38
- "@tramvai/tokens-common": "1.95.0",
39
- "@tramvai/tokens-render": "1.95.0",
40
- "@tramvai/experiments": "1.95.0",
34
+ "@tramvai/module-cookie": "1.96.0",
35
+ "@tramvai/module-environment": "1.96.0",
36
+ "@tramvai/module-log": "1.96.0",
37
+ "@tramvai/tokens-child-app": "1.96.0",
38
+ "@tramvai/tokens-common": "1.96.0",
39
+ "@tramvai/tokens-render": "1.96.0",
40
+ "@tramvai/experiments": "1.96.0",
41
41
  "@tinkoff/hook-runner": "0.3.21",
42
42
  "hoist-non-react-statics": "^3.3.1",
43
43
  "lru-cache": "^6.0.0"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@tinkoff/utils": "^2.1.2",
47
- "@tramvai/cli": "1.95.0",
48
- "@tramvai/core": "1.95.0",
49
- "@tramvai/papi": "1.95.0",
50
- "@tramvai/state": "1.95.0",
51
- "@tramvai/tokens-metrics": "1.95.0",
52
- "@tramvai/tokens-server": "1.95.0",
47
+ "@tramvai/cli": "1.96.0",
48
+ "@tramvai/core": "1.96.0",
49
+ "@tramvai/papi": "1.96.0",
50
+ "@tramvai/state": "1.96.0",
51
+ "@tramvai/tokens-metrics": "1.96.0",
52
+ "@tramvai/tokens-server": "1.96.0",
53
53
  "@tinkoff/dippy": "0.7.39",
54
54
  "react": ">=16.8.0",
55
55
  "tslib": "^2.0.3"