@tivio/sdk-react 2.0.1 → 2.1.1-alpha1

Sign up to get free protection for your applications and to get access to all the features.
package/dist/types.d.ts CHANGED
@@ -5,11 +5,11 @@
5
5
  /**
6
6
  * Export public client side API
7
7
  */
8
- import { InternalConf } from './conf';
9
- import { PlayerWrapper } from './customPlayer.types';
8
+ import type { Monetization, Screen, SubscribeToItemsInRow, SubscribeToRowsInScreen, SubscribeToScreen, Video } from '@tivio/common';
10
9
  import { USER_TYPE } from '@tivio/common';
11
- import type { Monetization, Video, RowItemsSubscription, ScreenSubscription } from '@tivio/common';
12
10
  import type React from 'react';
11
+ import { InternalConf } from './conf';
12
+ import { PlayerWrapper } from './customPlayer.types';
13
13
  declare type RemoteProviderProps = {
14
14
  disableUnmounting?: boolean;
15
15
  language?: string;
@@ -181,8 +181,9 @@ declare type TivioSubscriptions = {
181
181
  channels: Channel[];
182
182
  hasNextPage: boolean;
183
183
  }, fetchMore: null | ((count?: number) => void), isLoading: boolean) => void, limit?: number) => void;
184
- subscribeToScreen: ScreenSubscription;
185
- subscribeToItemsInRow: RowItemsSubscription;
184
+ subscribeToScreen: SubscribeToScreen;
185
+ subscribeToItemsInRow: SubscribeToItemsInRow;
186
+ subscribeToRowsInScreen: SubscribeToRowsInScreen;
186
187
  };
187
188
  declare type TivioGetters = {
188
189
  isTivioLoaded: (cb: (isLoaded: boolean) => void) => boolean;
@@ -201,6 +202,7 @@ declare type TivioGetters = {
201
202
  getPlayerWrapper: (opt: {
202
203
  playerWrapperId?: string;
203
204
  }) => PlayerWrapper;
205
+ getOrganizationScreens: () => Promise<Screen[]>;
204
206
  getOrganizationSubscriptions: () => Promise<Monetization[] | undefined>;
205
207
  /**
206
208
  * Get exported config
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tivio/sdk-react",
3
- "version": "2.0.1",
3
+ "version": "2.1.1-alpha1",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "source": "src/index.ts",
@@ -14,7 +14,8 @@
14
14
  "start": "yarn run clean && webpack -w --config=webpack.config.dev.js",
15
15
  "test": "jest --config=./jest.config.js --coverage",
16
16
  "clean": "rm -rf dist",
17
- "prepublishOnly": "yarn && rm -rf ./dist && yarn run build"
17
+ "prepublishOnly": "yarn && yarn ts-node ./scripts/prepublish.ts && yarn clean && yarn run build",
18
+ "publish:alpha": "npm publish --tag alpha"
18
19
  },
19
20
  "peerDependencies": {
20
21
  "firebase": "^8.2.3",
@@ -24,6 +25,7 @@
24
25
  "styled-components": "^5.2.1"
25
26
  },
26
27
  "dependencies": {
28
+ "@tivio/common": "1.1.17",
27
29
  "@sentry/browser": "^6.1.0",
28
30
  "mobx-react": "^7.1.0"
29
31
  },
@@ -55,7 +57,6 @@
55
57
  "typescript": "^4.1.3",
56
58
  "webpack": "^5.15.0",
57
59
  "webpack-cli": "^4.4.0",
58
- "webpack-merge": "^5.7.3",
59
- "@tivio/common": "*"
60
+ "webpack-merge": "^5.7.3"
60
61
  }
61
62
  }
@@ -0,0 +1,16 @@
1
+ import {
2
+ execCommand,
3
+ } from '@tivio/build-utils'
4
+
5
+ console.info('Publishing latest @tivio/common...')
6
+
7
+ execCommand('yarn --cwd ../common pub;')
8
+
9
+ console.info('Updating version of @tivio/common dependency in package.json...')
10
+
11
+ const tivioCommonPackageJson = require('../../common/package.json')
12
+
13
+ // Using sed instead of fs.write because it does not change the order
14
+ // of the other line
15
+ // eslint-disable-next-line no-useless-escape
16
+ execCommand(`sed -i 's#"@tivio/common":.*#"@tivio/common": "${tivioCommonPackageJson.version}",#g' package.json`)