@sleeperhq/mini-core 1.9.4 → 1.9.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.
package/index.ts CHANGED
@@ -2,18 +2,6 @@ import * as Sleeper from './src/components';
2
2
  import DevServer from './src/dev_server';
3
3
  import * as Types from './src/types';
4
4
  import { Fonts, Theme } from './src/styles';
5
- import Rx from 'rx';
6
-
7
- class MiniLogger {
8
- public static messages = new Rx.Subject;
9
-
10
- static log(...args: any[]) {
11
- this.messages.onNext({
12
- type: 'mini_dev_server',
13
- action: 'onConsoleLog',
14
- message: Array.from(args).join(' '),
15
- });
16
- }
17
- }
5
+ import MiniLogger from './src/components/MiniLogger';
18
6
 
19
7
  export { Sleeper, DevServer, Types, Fonts, Theme, MiniLogger };
@@ -17,7 +17,7 @@
17
17
  "@react-navigation/native": "6.1.3",
18
18
  "@react-navigation/stack": "6.3.12",
19
19
  "@shopify/flash-list": "1.4.1",
20
- "@sleeperhq/mini-core": "1.9.4",
20
+ "@sleeperhq/mini-core": "1.9.5",
21
21
  "amazon-cognito-identity-js": "6.3.2",
22
22
  "crypto-js": "3.3.0",
23
23
  "decimal.js-light": "2.5.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleeperhq/mini-core",
3
- "version": "1.9.4",
3
+ "version": "1.9.5",
4
4
  "description": "Core library frameworks for developing Sleeper Mini Apps.",
5
5
  "main": "index.ts",
6
6
  "types": "index.d.ts",
@@ -0,0 +1,18 @@
1
+ import Rx from 'rx';
2
+
3
+ class MiniLogger {
4
+ public static messages = new Rx.Subject;
5
+
6
+ static log(...args: any[]) {
7
+ this.messages.onNext({
8
+ type: 'mini_dev_server',
9
+ action: 'onConsoleLog',
10
+ message: Array.from(args).join(' '),
11
+ });
12
+ }
13
+ }
14
+
15
+ // Add global function for mini logging
16
+ global.log_mini = (...args: any[]) => { MiniLogger.log(...args); }
17
+
18
+ export default MiniLogger;
package/webpack.config.js CHANGED
@@ -227,7 +227,7 @@ module.exports = env => {
227
227
  loader: 'string-replace-loader',
228
228
  options: {
229
229
  search: 'console.log',
230
- replace: 'MiniLogger.log',
230
+ replace: 'log_mini',
231
231
  }
232
232
  },
233
233
  /**