nightingale-app-react-native 11.6.0 → 11.7.2
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/.eslintrc.json +1 -1
- package/CHANGELOG.md +31 -0
- package/README.md +5 -0
- package/dist/index-browser-dev.cjs.js +9 -5
- package/dist/index-browser-dev.cjs.js.map +1 -1
- package/dist/index-browser-dev.es.js +9 -6
- package/dist/index-browser-dev.es.js.map +1 -1
- package/dist/index-browser.cjs.js +9 -5
- package/dist/index-browser.cjs.js.map +1 -1
- package/dist/index-browser.es.js +9 -6
- package/dist/index-browser.es.js.map +1 -1
- package/dist/index-browsermodern-dev.es.js +8 -5
- package/dist/index-browsermodern-dev.es.js.map +1 -1
- package/dist/index-browsermodern.es.js +8 -5
- package/dist/index-browsermodern.es.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/package.json +25 -30
- package/rollup.config.mjs +3 -0
- package/src/index.ts +15 -7
package/.eslintrc.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,37 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [11.7.2](https://github.com/christophehurpeau/nightingale/compare/v11.7.1...v11.7.2) (2021-11-27)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package nightingale-app-react-native
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [11.7.1](https://github.com/christophehurpeau/nightingale/compare/v11.7.0...v11.7.1) (2021-06-29)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* update pob-babel to bring back webpack 4 support ([4887431](https://github.com/christophehurpeau/nightingale/commit/4887431b3b272496511f879af022638723b9056e))
|
|
20
|
+
* **nightingale-app-react-native:** add react-native-web as optional peer dependency ([0092538](https://github.com/christophehurpeau/nightingale/commit/0092538689a2e3ca8cea9c1422f8140f4c9e8c9c))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# [11.7.0](https://github.com/christophehurpeau/nightingale/compare/v11.6.0...v11.7.0) (2021-03-29)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* **nightingale-app-react-native:** support expo web ([5e4e080](https://github.com/christophehurpeau/nightingale/commit/5e4e080d1995055c5ff262bc52a43321fe09e4aa))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
6
37
|
# [11.6.0](https://github.com/christophehurpeau/nightingale/compare/v11.5.4...v11.6.0) (2021-03-21)
|
|
7
38
|
|
|
8
39
|
|
package/README.md
CHANGED
|
@@ -65,3 +65,8 @@ configure(
|
|
|
65
65
|
],
|
|
66
66
|
);
|
|
67
67
|
```
|
|
68
|
+
|
|
69
|
+
## Use source maps to display error stack trace
|
|
70
|
+
|
|
71
|
+
- for browser (expo web or react-native-web), see [nightingale-browser-console](https://npmjs.org/package/nightingale-browser-console)
|
|
72
|
+
- for android/ios, [expo-sentry](https://docs.expo.io/guides/using-sentry/#publish-your-app-with-sourcemaps) can send sourcemaps when publishing for production.
|
|
@@ -3,21 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var nightingale = require('nightingale');
|
|
6
|
+
var nightingaleBrowserConsole = require('nightingale-browser-console');
|
|
6
7
|
var nightingaleReactNativeConsole = require('nightingale-react-native-console');
|
|
8
|
+
var reactNative = require('react-native');
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
var appLogger = new nightingale.Logger('app');
|
|
11
|
+
var ReactNativeConsoleHandlerForPlatform = // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
12
|
+
reactNative.Platform.OS === 'web' ? nightingaleBrowserConsole.BrowserConsoleHandler : nightingaleReactNativeConsole.ReactNativeConsoleHandler;
|
|
13
|
+
nightingale.configure(process.env.NODE_ENV === 'production' ? [] : [{
|
|
11
14
|
pattern: /^app(:|$)/,
|
|
12
|
-
handlers: [new
|
|
15
|
+
handlers: [new ReactNativeConsoleHandlerForPlatform(nightingale.Level.DEBUG)],
|
|
13
16
|
stop: true
|
|
14
17
|
}, {
|
|
15
|
-
handlers: [new
|
|
18
|
+
handlers: [new ReactNativeConsoleHandlerForPlatform(nightingale.Level.INFO)]
|
|
16
19
|
}]);
|
|
17
20
|
|
|
18
21
|
exports.Level = nightingale.Level;
|
|
19
22
|
exports.addConfig = nightingale.addConfig;
|
|
20
23
|
exports.configure = nightingale.configure;
|
|
21
24
|
exports.ReactNativeConsoleHandler = nightingaleReactNativeConsole.ReactNativeConsoleHandler;
|
|
25
|
+
exports.ReactNativeConsoleHandlerForPlatform = ReactNativeConsoleHandlerForPlatform;
|
|
22
26
|
exports.appLogger = appLogger;
|
|
23
27
|
//# sourceMappingURL=index-browser-dev.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-browser-dev.cjs.js","sources":["../src/index.ts"],"sourcesContent":["import { Logger, configure, Level } from 'nightingale';\nimport { ReactNativeConsoleHandler } from 'nightingale-react-native-console';\n\nexport { configure, addConfig } from 'nightingale';\n\nexport { Level, ReactNativeConsoleHandler };\n\nexport const appLogger = new Logger('app');\n\
|
|
1
|
+
{"version":3,"file":"index-browser-dev.cjs.js","sources":["../src/index.ts"],"sourcesContent":["import { Logger, configure, Level } from 'nightingale';\nimport { BrowserConsoleHandler } from 'nightingale-browser-console';\nimport { ReactNativeConsoleHandler } from 'nightingale-react-native-console';\n// @ts-expect-error including @types/react-native causes conflicts\n// eslint-disable-next-line import/no-unresolved\nimport { Platform } from 'react-native';\n\nexport { configure, addConfig } from 'nightingale';\n\nexport { Level, ReactNativeConsoleHandler };\n\nexport const appLogger = new Logger('app');\n\nexport const ReactNativeConsoleHandlerForPlatform:\n | typeof ReactNativeConsoleHandler\n | typeof BrowserConsoleHandler =\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n Platform.OS === 'web' ? BrowserConsoleHandler : ReactNativeConsoleHandler;\n\nconfigure(\n process.env.NODE_ENV === 'production'\n ? []\n : [\n {\n pattern: /^app(:|$)/,\n handlers: [new ReactNativeConsoleHandlerForPlatform(Level.DEBUG)],\n stop: true,\n },\n {\n handlers: [new ReactNativeConsoleHandlerForPlatform(Level.INFO)],\n },\n ],\n);\n"],"names":["appLogger","Logger","ReactNativeConsoleHandlerForPlatform","Platform","OS","BrowserConsoleHandler","ReactNativeConsoleHandler","configure","process","env","NODE_ENV","pattern","handlers","Level","DEBUG","stop","INFO"],"mappings":";;;;;;;;;IAWaA,SAAS,GAAG,IAAIC,kBAAJ,CAAW,KAAX;IAEZC,oCAEmB;AAE9BC,oBAAQ,CAACC,EAAT,KAAgB,KAAhB,GAAwBC,+CAAxB,GAAgDC;AAElDC,qBAAS,CACPC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAAzB,GACI,EADJ,GAEI,CACE;AACEC,EAAAA,OAAO,EAAE,WADX;AAEEC,EAAAA,QAAQ,EAAE,CAAC,IAAIV,oCAAJ,CAAyCW,iBAAK,CAACC,KAA/C,CAAD,CAFZ;AAGEC,EAAAA,IAAI,EAAE;AAHR,CADF,EAME;AACEH,EAAAA,QAAQ,EAAE,CAAC,IAAIV,oCAAJ,CAAyCW,iBAAK,CAACG,IAA/C,CAAD;AADZ,CANF,CAHG,CAAT;;;;;;;;;"}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { Logger, configure, Level } from 'nightingale';
|
|
2
2
|
export { Level, addConfig, configure } from 'nightingale';
|
|
3
|
+
import { BrowserConsoleHandler } from 'nightingale-browser-console';
|
|
3
4
|
import { ReactNativeConsoleHandler } from 'nightingale-react-native-console';
|
|
4
5
|
export { ReactNativeConsoleHandler } from 'nightingale-react-native-console';
|
|
6
|
+
import { Platform } from 'react-native';
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
var appLogger = new Logger('app');
|
|
9
|
+
var ReactNativeConsoleHandlerForPlatform = // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
10
|
+
Platform.OS === 'web' ? BrowserConsoleHandler : ReactNativeConsoleHandler;
|
|
11
|
+
configure(process.env.NODE_ENV === 'production' ? [] : [{
|
|
9
12
|
pattern: /^app(:|$)/,
|
|
10
|
-
handlers: [new
|
|
13
|
+
handlers: [new ReactNativeConsoleHandlerForPlatform(Level.DEBUG)],
|
|
11
14
|
stop: true
|
|
12
15
|
}, {
|
|
13
|
-
handlers: [new
|
|
16
|
+
handlers: [new ReactNativeConsoleHandlerForPlatform(Level.INFO)]
|
|
14
17
|
}]);
|
|
15
18
|
|
|
16
|
-
export { appLogger };
|
|
19
|
+
export { ReactNativeConsoleHandlerForPlatform, appLogger };
|
|
17
20
|
//# sourceMappingURL=index-browser-dev.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-browser-dev.es.js","sources":["../src/index.ts"],"sourcesContent":["import { Logger, configure, Level } from 'nightingale';\nimport { ReactNativeConsoleHandler } from 'nightingale-react-native-console';\n\nexport { configure, addConfig } from 'nightingale';\n\nexport { Level, ReactNativeConsoleHandler };\n\nexport const appLogger = new Logger('app');\n\
|
|
1
|
+
{"version":3,"file":"index-browser-dev.es.js","sources":["../src/index.ts"],"sourcesContent":["import { Logger, configure, Level } from 'nightingale';\nimport { BrowserConsoleHandler } from 'nightingale-browser-console';\nimport { ReactNativeConsoleHandler } from 'nightingale-react-native-console';\n// @ts-expect-error including @types/react-native causes conflicts\n// eslint-disable-next-line import/no-unresolved\nimport { Platform } from 'react-native';\n\nexport { configure, addConfig } from 'nightingale';\n\nexport { Level, ReactNativeConsoleHandler };\n\nexport const appLogger = new Logger('app');\n\nexport const ReactNativeConsoleHandlerForPlatform:\n | typeof ReactNativeConsoleHandler\n | typeof BrowserConsoleHandler =\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n Platform.OS === 'web' ? BrowserConsoleHandler : ReactNativeConsoleHandler;\n\nconfigure(\n process.env.NODE_ENV === 'production'\n ? []\n : [\n {\n pattern: /^app(:|$)/,\n handlers: [new ReactNativeConsoleHandlerForPlatform(Level.DEBUG)],\n stop: true,\n },\n {\n handlers: [new ReactNativeConsoleHandlerForPlatform(Level.INFO)],\n },\n ],\n);\n"],"names":["appLogger","Logger","ReactNativeConsoleHandlerForPlatform","Platform","OS","BrowserConsoleHandler","ReactNativeConsoleHandler","configure","process","env","NODE_ENV","pattern","handlers","Level","DEBUG","stop","INFO"],"mappings":";;;;;;;IAWaA,SAAS,GAAG,IAAIC,MAAJ,CAAW,KAAX;IAEZC,oCAEmB;AAE9BC,QAAQ,CAACC,EAAT,KAAgB,KAAhB,GAAwBC,qBAAxB,GAAgDC;AAElDC,SAAS,CACPC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAAzB,GACI,EADJ,GAEI,CACE;AACEC,EAAAA,OAAO,EAAE,WADX;AAEEC,EAAAA,QAAQ,EAAE,CAAC,IAAIV,oCAAJ,CAAyCW,KAAK,CAACC,KAA/C,CAAD,CAFZ;AAGEC,EAAAA,IAAI,EAAE;AAHR,CADF,EAME;AACEH,EAAAA,QAAQ,EAAE,CAAC,IAAIV,oCAAJ,CAAyCW,KAAK,CAACG,IAA/C,CAAD;AADZ,CANF,CAHG,CAAT;;;;"}
|
|
@@ -3,21 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var nightingale = require('nightingale');
|
|
6
|
+
var nightingaleBrowserConsole = require('nightingale-browser-console');
|
|
6
7
|
var nightingaleReactNativeConsole = require('nightingale-react-native-console');
|
|
8
|
+
var reactNative = require('react-native');
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
var appLogger = new nightingale.Logger('app');
|
|
11
|
+
var ReactNativeConsoleHandlerForPlatform = // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
12
|
+
reactNative.Platform.OS === 'web' ? nightingaleBrowserConsole.BrowserConsoleHandler : nightingaleReactNativeConsole.ReactNativeConsoleHandler;
|
|
13
|
+
nightingale.configure(process.env.NODE_ENV === 'production' ? [] : [{
|
|
11
14
|
pattern: /^app(:|$)/,
|
|
12
|
-
handlers: [new
|
|
15
|
+
handlers: [new ReactNativeConsoleHandlerForPlatform(nightingale.Level.DEBUG)],
|
|
13
16
|
stop: true
|
|
14
17
|
}, {
|
|
15
|
-
handlers: [new
|
|
18
|
+
handlers: [new ReactNativeConsoleHandlerForPlatform(nightingale.Level.INFO)]
|
|
16
19
|
}]);
|
|
17
20
|
|
|
18
21
|
exports.Level = nightingale.Level;
|
|
19
22
|
exports.addConfig = nightingale.addConfig;
|
|
20
23
|
exports.configure = nightingale.configure;
|
|
21
24
|
exports.ReactNativeConsoleHandler = nightingaleReactNativeConsole.ReactNativeConsoleHandler;
|
|
25
|
+
exports.ReactNativeConsoleHandlerForPlatform = ReactNativeConsoleHandlerForPlatform;
|
|
22
26
|
exports.appLogger = appLogger;
|
|
23
27
|
//# sourceMappingURL=index-browser.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-browser.cjs.js","sources":["../src/index.ts"],"sourcesContent":["import { Logger, configure, Level } from 'nightingale';\nimport { ReactNativeConsoleHandler } from 'nightingale-react-native-console';\n\nexport { configure, addConfig } from 'nightingale';\n\nexport { Level, ReactNativeConsoleHandler };\n\nexport const appLogger = new Logger('app');\n\
|
|
1
|
+
{"version":3,"file":"index-browser.cjs.js","sources":["../src/index.ts"],"sourcesContent":["import { Logger, configure, Level } from 'nightingale';\nimport { BrowserConsoleHandler } from 'nightingale-browser-console';\nimport { ReactNativeConsoleHandler } from 'nightingale-react-native-console';\n// @ts-expect-error including @types/react-native causes conflicts\n// eslint-disable-next-line import/no-unresolved\nimport { Platform } from 'react-native';\n\nexport { configure, addConfig } from 'nightingale';\n\nexport { Level, ReactNativeConsoleHandler };\n\nexport const appLogger = new Logger('app');\n\nexport const ReactNativeConsoleHandlerForPlatform:\n | typeof ReactNativeConsoleHandler\n | typeof BrowserConsoleHandler =\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n Platform.OS === 'web' ? BrowserConsoleHandler : ReactNativeConsoleHandler;\n\nconfigure(\n process.env.NODE_ENV === 'production'\n ? []\n : [\n {\n pattern: /^app(:|$)/,\n handlers: [new ReactNativeConsoleHandlerForPlatform(Level.DEBUG)],\n stop: true,\n },\n {\n handlers: [new ReactNativeConsoleHandlerForPlatform(Level.INFO)],\n },\n ],\n);\n"],"names":["appLogger","Logger","ReactNativeConsoleHandlerForPlatform","Platform","OS","BrowserConsoleHandler","ReactNativeConsoleHandler","configure","process","env","NODE_ENV","pattern","handlers","Level","DEBUG","stop","INFO"],"mappings":";;;;;;;;;IAWaA,SAAS,GAAG,IAAIC,kBAAJ,CAAW,KAAX;IAEZC,oCAEmB;AAE9BC,oBAAQ,CAACC,EAAT,KAAgB,KAAhB,GAAwBC,+CAAxB,GAAgDC;AAElDC,qBAAS,CACPC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAAzB,GACI,EADJ,GAEI,CACE;AACEC,EAAAA,OAAO,EAAE,WADX;AAEEC,EAAAA,QAAQ,EAAE,CAAC,IAAIV,oCAAJ,CAAyCW,iBAAK,CAACC,KAA/C,CAAD,CAFZ;AAGEC,EAAAA,IAAI,EAAE;AAHR,CADF,EAME;AACEH,EAAAA,QAAQ,EAAE,CAAC,IAAIV,oCAAJ,CAAyCW,iBAAK,CAACG,IAA/C,CAAD;AADZ,CANF,CAHG,CAAT;;;;;;;;;"}
|
package/dist/index-browser.es.js
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { Logger, configure, Level } from 'nightingale';
|
|
2
2
|
export { Level, addConfig, configure } from 'nightingale';
|
|
3
|
+
import { BrowserConsoleHandler } from 'nightingale-browser-console';
|
|
3
4
|
import { ReactNativeConsoleHandler } from 'nightingale-react-native-console';
|
|
4
5
|
export { ReactNativeConsoleHandler } from 'nightingale-react-native-console';
|
|
6
|
+
import { Platform } from 'react-native';
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
var appLogger = new Logger('app');
|
|
9
|
+
var ReactNativeConsoleHandlerForPlatform = // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
10
|
+
Platform.OS === 'web' ? BrowserConsoleHandler : ReactNativeConsoleHandler;
|
|
11
|
+
configure(process.env.NODE_ENV === 'production' ? [] : [{
|
|
9
12
|
pattern: /^app(:|$)/,
|
|
10
|
-
handlers: [new
|
|
13
|
+
handlers: [new ReactNativeConsoleHandlerForPlatform(Level.DEBUG)],
|
|
11
14
|
stop: true
|
|
12
15
|
}, {
|
|
13
|
-
handlers: [new
|
|
16
|
+
handlers: [new ReactNativeConsoleHandlerForPlatform(Level.INFO)]
|
|
14
17
|
}]);
|
|
15
18
|
|
|
16
|
-
export { appLogger };
|
|
19
|
+
export { ReactNativeConsoleHandlerForPlatform, appLogger };
|
|
17
20
|
//# sourceMappingURL=index-browser.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-browser.es.js","sources":["../src/index.ts"],"sourcesContent":["import { Logger, configure, Level } from 'nightingale';\nimport { ReactNativeConsoleHandler } from 'nightingale-react-native-console';\n\nexport { configure, addConfig } from 'nightingale';\n\nexport { Level, ReactNativeConsoleHandler };\n\nexport const appLogger = new Logger('app');\n\
|
|
1
|
+
{"version":3,"file":"index-browser.es.js","sources":["../src/index.ts"],"sourcesContent":["import { Logger, configure, Level } from 'nightingale';\nimport { BrowserConsoleHandler } from 'nightingale-browser-console';\nimport { ReactNativeConsoleHandler } from 'nightingale-react-native-console';\n// @ts-expect-error including @types/react-native causes conflicts\n// eslint-disable-next-line import/no-unresolved\nimport { Platform } from 'react-native';\n\nexport { configure, addConfig } from 'nightingale';\n\nexport { Level, ReactNativeConsoleHandler };\n\nexport const appLogger = new Logger('app');\n\nexport const ReactNativeConsoleHandlerForPlatform:\n | typeof ReactNativeConsoleHandler\n | typeof BrowserConsoleHandler =\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n Platform.OS === 'web' ? BrowserConsoleHandler : ReactNativeConsoleHandler;\n\nconfigure(\n process.env.NODE_ENV === 'production'\n ? []\n : [\n {\n pattern: /^app(:|$)/,\n handlers: [new ReactNativeConsoleHandlerForPlatform(Level.DEBUG)],\n stop: true,\n },\n {\n handlers: [new ReactNativeConsoleHandlerForPlatform(Level.INFO)],\n },\n ],\n);\n"],"names":["appLogger","Logger","ReactNativeConsoleHandlerForPlatform","Platform","OS","BrowserConsoleHandler","ReactNativeConsoleHandler","configure","process","env","NODE_ENV","pattern","handlers","Level","DEBUG","stop","INFO"],"mappings":";;;;;;;IAWaA,SAAS,GAAG,IAAIC,MAAJ,CAAW,KAAX;IAEZC,oCAEmB;AAE9BC,QAAQ,CAACC,EAAT,KAAgB,KAAhB,GAAwBC,qBAAxB,GAAgDC;AAElDC,SAAS,CACPC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAAzB,GACI,EADJ,GAEI,CACE;AACEC,EAAAA,OAAO,EAAE,WADX;AAEEC,EAAAA,QAAQ,EAAE,CAAC,IAAIV,oCAAJ,CAAyCW,KAAK,CAACC,KAA/C,CAAD,CAFZ;AAGEC,EAAAA,IAAI,EAAE;AAHR,CADF,EAME;AACEH,EAAAA,QAAQ,EAAE,CAAC,IAAIV,oCAAJ,CAAyCW,KAAK,CAACG,IAA/C,CAAD;AADZ,CANF,CAHG,CAAT;;;;"}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { Logger, configure, Level } from 'nightingale';
|
|
2
2
|
export { Level, addConfig, configure } from 'nightingale';
|
|
3
|
+
import { BrowserConsoleHandler } from 'nightingale-browser-console';
|
|
3
4
|
import { ReactNativeConsoleHandler } from 'nightingale-react-native-console';
|
|
4
5
|
export { ReactNativeConsoleHandler } from 'nightingale-react-native-console';
|
|
6
|
+
import { Platform } from 'react-native';
|
|
5
7
|
|
|
6
8
|
const appLogger = new Logger('app');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
const ReactNativeConsoleHandlerForPlatform = // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
10
|
+
Platform.OS === 'web' ? BrowserConsoleHandler : ReactNativeConsoleHandler;
|
|
11
|
+
configure(process.env.NODE_ENV === 'production' ? [] : [{
|
|
9
12
|
pattern: /^app(:|$)/,
|
|
10
|
-
handlers: [new
|
|
13
|
+
handlers: [new ReactNativeConsoleHandlerForPlatform(Level.DEBUG)],
|
|
11
14
|
stop: true
|
|
12
15
|
}, {
|
|
13
|
-
handlers: [new
|
|
16
|
+
handlers: [new ReactNativeConsoleHandlerForPlatform(Level.INFO)]
|
|
14
17
|
}]);
|
|
15
18
|
|
|
16
|
-
export { appLogger };
|
|
19
|
+
export { ReactNativeConsoleHandlerForPlatform, appLogger };
|
|
17
20
|
//# sourceMappingURL=index-browsermodern-dev.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-browsermodern-dev.es.js","sources":["../src/index.ts"],"sourcesContent":["import { Logger, configure, Level } from 'nightingale';\nimport { ReactNativeConsoleHandler } from 'nightingale-react-native-console';\n\nexport { configure, addConfig } from 'nightingale';\n\nexport { Level, ReactNativeConsoleHandler };\n\nexport const appLogger = new Logger('app');\n\
|
|
1
|
+
{"version":3,"file":"index-browsermodern-dev.es.js","sources":["../src/index.ts"],"sourcesContent":["import { Logger, configure, Level } from 'nightingale';\nimport { BrowserConsoleHandler } from 'nightingale-browser-console';\nimport { ReactNativeConsoleHandler } from 'nightingale-react-native-console';\n// @ts-expect-error including @types/react-native causes conflicts\n// eslint-disable-next-line import/no-unresolved\nimport { Platform } from 'react-native';\n\nexport { configure, addConfig } from 'nightingale';\n\nexport { Level, ReactNativeConsoleHandler };\n\nexport const appLogger = new Logger('app');\n\nexport const ReactNativeConsoleHandlerForPlatform:\n | typeof ReactNativeConsoleHandler\n | typeof BrowserConsoleHandler =\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n Platform.OS === 'web' ? BrowserConsoleHandler : ReactNativeConsoleHandler;\n\nconfigure(\n process.env.NODE_ENV === 'production'\n ? []\n : [\n {\n pattern: /^app(:|$)/,\n handlers: [new ReactNativeConsoleHandlerForPlatform(Level.DEBUG)],\n stop: true,\n },\n {\n handlers: [new ReactNativeConsoleHandlerForPlatform(Level.INFO)],\n },\n ],\n);\n"],"names":["appLogger","Logger","ReactNativeConsoleHandlerForPlatform","Platform","OS","BrowserConsoleHandler","ReactNativeConsoleHandler","configure","process","env","NODE_ENV","pattern","handlers","Level","DEBUG","stop","INFO"],"mappings":";;;;;;;MAWaA,SAAS,GAAG,IAAIC,MAAJ,CAAW,KAAX;MAEZC,oCAEmB;AAE9BC,QAAQ,CAACC,EAAT,KAAgB,KAAhB,GAAwBC,qBAAxB,GAAgDC;AAElDC,SAAS,CACPC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAAzB,GACI,EADJ,GAEI,CACE;AACEC,EAAAA,OAAO,EAAE,WADX;AAEEC,EAAAA,QAAQ,EAAE,CAAC,IAAIV,oCAAJ,CAAyCW,KAAK,CAACC,KAA/C,CAAD,CAFZ;AAGEC,EAAAA,IAAI,EAAE;AAHR,CADF,EAME;AACEH,EAAAA,QAAQ,EAAE,CAAC,IAAIV,oCAAJ,CAAyCW,KAAK,CAACG,IAA/C,CAAD;AADZ,CANF,CAHG,CAAT;;;;"}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { Logger, configure, Level } from 'nightingale';
|
|
2
2
|
export { Level, addConfig, configure } from 'nightingale';
|
|
3
|
+
import { BrowserConsoleHandler } from 'nightingale-browser-console';
|
|
3
4
|
import { ReactNativeConsoleHandler } from 'nightingale-react-native-console';
|
|
4
5
|
export { ReactNativeConsoleHandler } from 'nightingale-react-native-console';
|
|
6
|
+
import { Platform } from 'react-native';
|
|
5
7
|
|
|
6
8
|
const appLogger = new Logger('app');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
const ReactNativeConsoleHandlerForPlatform = // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
10
|
+
Platform.OS === 'web' ? BrowserConsoleHandler : ReactNativeConsoleHandler;
|
|
11
|
+
configure(process.env.NODE_ENV === 'production' ? [] : [{
|
|
9
12
|
pattern: /^app(:|$)/,
|
|
10
|
-
handlers: [new
|
|
13
|
+
handlers: [new ReactNativeConsoleHandlerForPlatform(Level.DEBUG)],
|
|
11
14
|
stop: true
|
|
12
15
|
}, {
|
|
13
|
-
handlers: [new
|
|
16
|
+
handlers: [new ReactNativeConsoleHandlerForPlatform(Level.INFO)]
|
|
14
17
|
}]);
|
|
15
18
|
|
|
16
|
-
export { appLogger };
|
|
19
|
+
export { ReactNativeConsoleHandlerForPlatform, appLogger };
|
|
17
20
|
//# sourceMappingURL=index-browsermodern.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-browsermodern.es.js","sources":["../src/index.ts"],"sourcesContent":["import { Logger, configure, Level } from 'nightingale';\nimport { ReactNativeConsoleHandler } from 'nightingale-react-native-console';\n\nexport { configure, addConfig } from 'nightingale';\n\nexport { Level, ReactNativeConsoleHandler };\n\nexport const appLogger = new Logger('app');\n\
|
|
1
|
+
{"version":3,"file":"index-browsermodern.es.js","sources":["../src/index.ts"],"sourcesContent":["import { Logger, configure, Level } from 'nightingale';\nimport { BrowserConsoleHandler } from 'nightingale-browser-console';\nimport { ReactNativeConsoleHandler } from 'nightingale-react-native-console';\n// @ts-expect-error including @types/react-native causes conflicts\n// eslint-disable-next-line import/no-unresolved\nimport { Platform } from 'react-native';\n\nexport { configure, addConfig } from 'nightingale';\n\nexport { Level, ReactNativeConsoleHandler };\n\nexport const appLogger = new Logger('app');\n\nexport const ReactNativeConsoleHandlerForPlatform:\n | typeof ReactNativeConsoleHandler\n | typeof BrowserConsoleHandler =\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n Platform.OS === 'web' ? BrowserConsoleHandler : ReactNativeConsoleHandler;\n\nconfigure(\n process.env.NODE_ENV === 'production'\n ? []\n : [\n {\n pattern: /^app(:|$)/,\n handlers: [new ReactNativeConsoleHandlerForPlatform(Level.DEBUG)],\n stop: true,\n },\n {\n handlers: [new ReactNativeConsoleHandlerForPlatform(Level.INFO)],\n },\n ],\n);\n"],"names":["appLogger","Logger","ReactNativeConsoleHandlerForPlatform","Platform","OS","BrowserConsoleHandler","ReactNativeConsoleHandler","configure","process","env","NODE_ENV","pattern","handlers","Level","DEBUG","stop","INFO"],"mappings":";;;;;;;MAWaA,SAAS,GAAG,IAAIC,MAAJ,CAAW,KAAX;MAEZC,oCAEmB;AAE9BC,QAAQ,CAACC,EAAT,KAAgB,KAAhB,GAAwBC,qBAAxB,GAAgDC;AAElDC,SAAS,CACPC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAAzB,GACI,EADJ,GAEI,CACE;AACEC,EAAAA,OAAO,EAAE,WADX;AAEEC,EAAAA,QAAQ,EAAE,CAAC,IAAIV,oCAAJ,CAAyCW,KAAK,CAACC,KAA/C,CAAD,CAFZ;AAGEC,EAAAA,IAAI,EAAE;AAHR,CADF,EAME;AACEH,EAAAA,QAAQ,EAAE,CAAC,IAAIV,oCAAJ,CAAyCW,KAAK,CAACG,IAA/C,CAAD;AADZ,CANF,CAHG,CAAT;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Logger, Level } from 'nightingale';
|
|
2
|
+
import { BrowserConsoleHandler } from 'nightingale-browser-console';
|
|
2
3
|
import { ReactNativeConsoleHandler } from 'nightingale-react-native-console';
|
|
3
4
|
export { configure, addConfig } from 'nightingale';
|
|
4
5
|
export { Level, ReactNativeConsoleHandler };
|
|
5
6
|
export declare const appLogger: Logger;
|
|
7
|
+
export declare const ReactNativeConsoleHandlerForPlatform: typeof ReactNativeConsoleHandler | typeof BrowserConsoleHandler;
|
|
6
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAa,KAAK,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAa,KAAK,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAK7E,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,EAAE,KAAK,EAAE,yBAAyB,EAAE,CAAC;AAE5C,eAAO,MAAM,SAAS,QAAoB,CAAC;AAE3C,eAAO,MAAM,oCAAoC,EAC7C,OAAO,yBAAyB,GAChC,OAAO,qBAEgE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nightingale-app-react-native",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.7.2",
|
|
4
4
|
"description": "React Native and Expo logger for application",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nightingale",
|
|
@@ -16,23 +16,19 @@
|
|
|
16
16
|
"directory": "packages/nightingale-app-react-native"
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/christophehurpeau/nightingale",
|
|
19
|
+
"type": "commonjs",
|
|
19
20
|
"browserslist": [
|
|
21
|
+
"defaults",
|
|
20
22
|
"> 0.2%",
|
|
21
|
-
"Firefox ESR",
|
|
22
|
-
"last 2 Chrome versions",
|
|
23
|
-
"last 2 iOS versions",
|
|
24
|
-
"last 2 Edge versions",
|
|
25
|
-
"last 2 Safari versions",
|
|
26
23
|
"not ie < 12",
|
|
27
|
-
"not
|
|
28
|
-
"not
|
|
29
|
-
"not op_mini all"
|
|
24
|
+
"not safari < 10",
|
|
25
|
+
"not ios_saf < 10"
|
|
30
26
|
],
|
|
31
|
-
"main": "./dist/index-browser.es.js",
|
|
32
27
|
"types": "./dist/index.d.ts",
|
|
33
28
|
"module": "./dist/index-browser.es.js",
|
|
34
29
|
"browser": "./dist/index-browser.es.js",
|
|
35
30
|
"exports": {
|
|
31
|
+
"./package.json": "./package.json",
|
|
36
32
|
".": {
|
|
37
33
|
"browser": {
|
|
38
34
|
"browser:modern": {
|
|
@@ -60,7 +56,7 @@
|
|
|
60
56
|
"build:definitions": "tsc -p tsconfig.build.json",
|
|
61
57
|
"clean": "rm -Rf docs dist test/node6 coverage",
|
|
62
58
|
"lint": "yarn run lint:eslint",
|
|
63
|
-
"lint:eslint": "
|
|
59
|
+
"lint:eslint": "cd ../.. && yarn run eslint --report-unused-disable-directives --resolve-plugins-relative-to . --quiet packages/nightingale-app-react-native",
|
|
64
60
|
"watch": "pob-watch"
|
|
65
61
|
},
|
|
66
62
|
"prettier": {
|
|
@@ -89,28 +85,27 @@
|
|
|
89
85
|
"index"
|
|
90
86
|
]
|
|
91
87
|
},
|
|
88
|
+
"peerDependencies": {
|
|
89
|
+
"react-native": "*",
|
|
90
|
+
"react-native-web": "*"
|
|
91
|
+
},
|
|
92
|
+
"peerDependenciesMeta": {
|
|
93
|
+
"react-native-web": {
|
|
94
|
+
"optional": true
|
|
95
|
+
}
|
|
96
|
+
},
|
|
92
97
|
"dependencies": {
|
|
93
|
-
"
|
|
94
|
-
"nightingale": "^11.
|
|
95
|
-
"nightingale-react-native-console": "^11.
|
|
98
|
+
"nightingale": "^11.7.2",
|
|
99
|
+
"nightingale-browser-console": "^11.7.2",
|
|
100
|
+
"nightingale-react-native-console": "^11.7.2"
|
|
96
101
|
},
|
|
97
102
|
"devDependencies": {
|
|
98
|
-
"@babel/core": "7.
|
|
99
|
-
"@babel/preset-env": "7.
|
|
100
|
-
"@pob/eslint-config": "43.0.0",
|
|
101
|
-
"@pob/eslint-config-node": "43.1.0",
|
|
102
|
-
"@pob/eslint-config-typescript": "43.0.0",
|
|
103
|
-
"@typescript-eslint/eslint-plugin": "4.18.0",
|
|
104
|
-
"@typescript-eslint/parser": "4.18.0",
|
|
103
|
+
"@babel/core": "7.16.0",
|
|
104
|
+
"@babel/preset-env": "7.16.4",
|
|
105
105
|
"babel-preset-modern-browsers": "15.0.2",
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"eslint-plugin-node": "11.1.0",
|
|
110
|
-
"eslint-plugin-unicorn": "25.0.1",
|
|
111
|
-
"pob-babel": "26.8.0",
|
|
112
|
-
"rollup": "2.42.1",
|
|
113
|
-
"typescript": "4.2.3"
|
|
106
|
+
"pob-babel": "28.5.0",
|
|
107
|
+
"rollup": "2.60.1",
|
|
108
|
+
"typescript": "4.5.2"
|
|
114
109
|
},
|
|
115
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "00b1ec6c7468b320e268a12eaac70d59a177787b"
|
|
116
111
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,24 +1,32 @@
|
|
|
1
1
|
import { Logger, configure, Level } from 'nightingale';
|
|
2
|
+
import { BrowserConsoleHandler } from 'nightingale-browser-console';
|
|
2
3
|
import { ReactNativeConsoleHandler } from 'nightingale-react-native-console';
|
|
4
|
+
// @ts-expect-error including @types/react-native causes conflicts
|
|
5
|
+
// eslint-disable-next-line import/no-unresolved
|
|
6
|
+
import { Platform } from 'react-native';
|
|
3
7
|
|
|
4
|
-
export { configure, addConfig } from 'nightingale';
|
|
5
|
-
|
|
6
|
-
export { Level, ReactNativeConsoleHandler };
|
|
8
|
+
export { configure, addConfig, Level } from 'nightingale';
|
|
9
|
+
export { ReactNativeConsoleHandler } from 'nightingale-react-native-console';
|
|
7
10
|
|
|
8
11
|
export const appLogger = new Logger('app');
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
export const ReactNativeConsoleHandlerForPlatform:
|
|
14
|
+
| typeof ReactNativeConsoleHandler
|
|
15
|
+
| typeof BrowserConsoleHandler =
|
|
11
16
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
12
|
-
|
|
17
|
+
Platform.OS === 'web' ? BrowserConsoleHandler : ReactNativeConsoleHandler;
|
|
18
|
+
|
|
19
|
+
configure(
|
|
20
|
+
process.env.NODE_ENV === 'production'
|
|
13
21
|
? []
|
|
14
22
|
: [
|
|
15
23
|
{
|
|
16
24
|
pattern: /^app(:|$)/,
|
|
17
|
-
handlers: [new
|
|
25
|
+
handlers: [new ReactNativeConsoleHandlerForPlatform(Level.DEBUG)],
|
|
18
26
|
stop: true,
|
|
19
27
|
},
|
|
20
28
|
{
|
|
21
|
-
handlers: [new
|
|
29
|
+
handlers: [new ReactNativeConsoleHandlerForPlatform(Level.INFO)],
|
|
22
30
|
},
|
|
23
31
|
],
|
|
24
32
|
);
|