@log-drop/react-native 1.0.0 → 1.0.1-beta1
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/LICENSE +20 -0
- package/LogdropReactNative.podspec +26 -0
- package/README.md +175 -0
- package/android/build.gradle +12 -1
- package/android/src/main/java/com/logdropreactnative/Extensions.kt +13 -13
- package/android/src/main/java/com/logdropreactnative/LogDropReactNative.kt +12 -10
- package/android/src/main/java/com/logdropreactnative/LogDropReactNativeConfig.kt +45 -31
- package/android/src/main/java/com/logdropreactnative/LogDropReactNativeModule.kt +50 -53
- package/android/src/main/java/com/logdropreactnative/LogDropReactNativeUtils.kt +8 -8
- package/ios/LogDropReactNative.mm +3 -0
- package/ios/LogDropReactNative.swift +12 -0
- package/lib/module/LogDrop.js +53 -0
- package/lib/module/LogDrop.js.map +1 -0
- package/lib/module/LogDropConfig.js +45 -0
- package/lib/module/LogDropConfig.js.map +1 -0
- package/lib/module/LogDropReactNative.js +14 -0
- package/lib/module/LogDropReactNative.js.map +1 -0
- package/lib/module/LogFlow.js +10 -0
- package/lib/module/LogFlow.js.map +1 -0
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/utils/LogDropErrorTracking.js +123 -0
- package/lib/module/utils/LogDropErrorTracking.js.map +1 -0
- package/lib/module/utils/errorUtils.js +79 -0
- package/lib/module/utils/errorUtils.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/LogDrop.d.ts +17 -0
- package/lib/typescript/src/LogDrop.d.ts.map +1 -0
- package/lib/typescript/src/LogDropConfig.d.ts +24 -0
- package/lib/typescript/src/LogDropConfig.d.ts.map +1 -0
- package/lib/typescript/src/LogDropReactNative.d.ts +3 -0
- package/lib/typescript/src/LogDropReactNative.d.ts.map +1 -0
- package/lib/typescript/src/LogFlow.d.ts +7 -0
- package/lib/typescript/src/LogFlow.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +6 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/utils/LogDropErrorTracking.d.ts +10 -0
- package/lib/typescript/src/utils/LogDropErrorTracking.d.ts.map +1 -0
- package/lib/typescript/src/utils/errorUtils.d.ts +11 -0
- package/lib/typescript/src/utils/errorUtils.d.ts.map +1 -0
- package/package.json +111 -16
- package/src/LogDrop.ts +45 -43
- package/src/LogDropConfig.ts +53 -45
- package/src/LogDropReactNative.ts +21 -0
- package/src/LogFlow.ts +12 -12
- package/src/index.tsx +6 -0
- package/src/utils/LogDropErrorTracking.ts +146 -0
- package/src/utils/errorUtils.ts +84 -0
- package/.eslintignore +0 -6
- package/.gitattributes +0 -1
- package/.github/workflows/publish.yml +0 -45
- package/.idea/LogDrop-React-Native-SDK.iml +0 -12
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -6
- package/.idea/vcs.xml +0 -6
- package/.prettierignore +0 -8
- package/LogDropReactNative.podspec +0 -23
- package/index.ts +0 -6
- package/scripts/yarn_rebuild.sh +0 -31
- package/tsconfig.json +0 -3
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export class LogDropConfigBuilder {
|
|
4
|
+
apiKey = "";
|
|
5
|
+
baseUrl = "";
|
|
6
|
+
isLoggingEnabled = false;
|
|
7
|
+
defaultSDKDisabled = false;
|
|
8
|
+
sensitiveInfoFilter = [];
|
|
9
|
+
crashTrackingEnabled = true;
|
|
10
|
+
setApiKey(apiKey) {
|
|
11
|
+
this.apiKey = apiKey;
|
|
12
|
+
return this;
|
|
13
|
+
}
|
|
14
|
+
setBaseUrl(baseUrl) {
|
|
15
|
+
this.baseUrl = baseUrl;
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
setLoggingEnabled(isLoggingEnabled) {
|
|
19
|
+
this.isLoggingEnabled = isLoggingEnabled;
|
|
20
|
+
return this;
|
|
21
|
+
}
|
|
22
|
+
setDefaultSDKDisabledValue(defaultSDKDisabled) {
|
|
23
|
+
this.defaultSDKDisabled = defaultSDKDisabled;
|
|
24
|
+
return this;
|
|
25
|
+
}
|
|
26
|
+
setSensitiveInfoFilter(sensitiveInfoFilter) {
|
|
27
|
+
this.sensitiveInfoFilter = sensitiveInfoFilter;
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
setCrashTrackingEnabled(crashTrackingEnabled) {
|
|
31
|
+
this.crashTrackingEnabled = crashTrackingEnabled;
|
|
32
|
+
return this;
|
|
33
|
+
}
|
|
34
|
+
build() {
|
|
35
|
+
return {
|
|
36
|
+
apiKey: this.apiKey,
|
|
37
|
+
baseUrl: this.baseUrl,
|
|
38
|
+
isLoggingEnabled: this.isLoggingEnabled,
|
|
39
|
+
defaultSDKDisabled: this.defaultSDKDisabled,
|
|
40
|
+
sensitiveInfoFilter: this.sensitiveInfoFilter,
|
|
41
|
+
crashTrackingEnabled: this.crashTrackingEnabled
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=LogDropConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["LogDropConfigBuilder","apiKey","baseUrl","isLoggingEnabled","defaultSDKDisabled","sensitiveInfoFilter","crashTrackingEnabled","setApiKey","setBaseUrl","setLoggingEnabled","setDefaultSDKDisabledValue","setSensitiveInfoFilter","setCrashTrackingEnabled","build"],"sourceRoot":"../../src","sources":["LogDropConfig.ts"],"mappings":";;AASA,OAAO,MAAMA,oBAAoB,CAAC;EACxBC,MAAM,GAAW,EAAE;EACnBC,OAAO,GAAW,EAAE;EACpBC,gBAAgB,GAAY,KAAK;EACjCC,kBAAkB,GAAY,KAAK;EACnCC,mBAAmB,GAAa,EAAE;EAClCC,oBAAoB,GAAY,IAAI;EAE5CC,SAASA,CAACN,MAAc,EAAQ;IAC9B,IAAI,CAACA,MAAM,GAAGA,MAAM;IACpB,OAAO,IAAI;EACb;EAEAO,UAAUA,CAACN,OAAe,EAAQ;IAChC,IAAI,CAACA,OAAO,GAAGA,OAAO;IACtB,OAAO,IAAI;EACb;EAEAO,iBAAiBA,CAACN,gBAAyB,EAAQ;IACjD,IAAI,CAACA,gBAAgB,GAAGA,gBAAgB;IACxC,OAAO,IAAI;EACb;EAEAO,0BAA0BA,CAACN,kBAA2B,EAAQ;IAC5D,IAAI,CAACA,kBAAkB,GAAGA,kBAAkB;IAC5C,OAAO,IAAI;EACb;EAEAO,sBAAsBA,CAACN,mBAA6B,EAAQ;IAC1D,IAAI,CAACA,mBAAmB,GAAGA,mBAAmB;IAC9C,OAAO,IAAI;EACb;EAEAO,uBAAuBA,CAACN,oBAA6B,EAAQ;IAC3D,IAAI,CAACA,oBAAoB,GAAGA,oBAAoB;IAChD,OAAO,IAAI;EACb;EAEAO,KAAKA,CAAA,EAAkB;IACrB,OAAO;MACLZ,MAAM,EAAE,IAAI,CAACA,MAAM;MACnBC,OAAO,EAAE,IAAI,CAACA,OAAO;MACrBC,gBAAgB,EAAE,IAAI,CAACA,gBAAgB;MACvCC,kBAAkB,EAAE,IAAI,CAACA,kBAAkB;MAC3CC,mBAAmB,EAAE,IAAI,CAACA,mBAAmB;MAC7CC,oBAAoB,EAAE,IAAI,CAACA;IAC7B,CAAC;EACH;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { NativeModules, Platform } from 'react-native';
|
|
4
|
+
const LINKING_ERROR = `The package 'logdrop-react-native' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
|
|
5
|
+
ios: "- You have run 'pod install'\n",
|
|
6
|
+
default: ''
|
|
7
|
+
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
8
|
+
const LogDropReactNative = NativeModules.LogDropReactNative ? NativeModules.LogDropReactNative : new Proxy({}, {
|
|
9
|
+
get() {
|
|
10
|
+
throw new Error(LINKING_ERROR);
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export { LogDropReactNative };
|
|
14
|
+
//# sourceMappingURL=LogDropReactNative.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","LogDropReactNative","Proxy","get","Error"],"sourceRoot":"../../src","sources":["LogDropReactNative.ts"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAEtD,MAAMC,aAAa,GACjB,+EAA+E,GAC/ED,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAGjC,MAAMC,kBAAkB,GAAGN,aAAa,CAACM,kBAAkB,GACvDN,aAAa,CAACM,kBAAkB,GAChC,IAAIC,KAAK,CACT,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACP,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEH,SAAQI,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["LogFlow","constructor","name","id","customAttributes"],"sourceRoot":"../../src","sources":["LogFlow.ts"],"mappings":";;AAAA,eAAe,MAAMA,OAAO,CAAC;EAK3BC,WAAWA,CACTC,IAAY,EACZC,EAAU,EACVC,gBAAsC,EACtC;IACA,IAAI,CAACF,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,EAAE,GAAGA,EAAE;IACZ,IAAI,CAACC,gBAAgB,GAAGA,gBAAgB;EAC1C;AACF","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["LogDrop","LogFlow","LogDropConfigBuilder"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,OAAOA,OAAO,MAAM,cAAW;AAC/B,OAAOC,OAAO,MAAM,cAAW;AAC/B,SAA6BC,oBAAoB,QAAQ,oBAAiB;AAE1E,SAASF,OAAO,EAAEE,oBAAoB,EAAED,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { NativeModules, Platform } from 'react-native';
|
|
4
|
+
import { EMPTY_STACK_TRACE, DEFAULT_ERROR_NAME, getErrorMessage, getErrorStackTrace, pickStackAndNameFromParams } from "./errorUtils.js";
|
|
5
|
+
const {
|
|
6
|
+
LogDropReactNative
|
|
7
|
+
} = NativeModules;
|
|
8
|
+
const g = global;
|
|
9
|
+
export class LogDropErrorTracking {
|
|
10
|
+
static tracking = false;
|
|
11
|
+
static inDefaultHandler = false;
|
|
12
|
+
static defaultHandler = () => {};
|
|
13
|
+
static defaultConsoleError = (..._a) => {};
|
|
14
|
+
static lastSig = '';
|
|
15
|
+
static start() {
|
|
16
|
+
if (this.tracking) {
|
|
17
|
+
console.log('[LogDrop] ErrorTracking.start: already started');
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (!g?.ErrorUtils) {
|
|
21
|
+
console.log('[LogDrop] ErrorTracking.start: ErrorUtils not available, skipping setup');
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const flushDelayMs = 50;
|
|
25
|
+
console.log('[LogDrop] ErrorTracking.start: installing global handlers');
|
|
26
|
+
this.defaultHandler = g.ErrorUtils.getGlobalHandler?.();
|
|
27
|
+
this.defaultConsoleError = console.error.bind(console);
|
|
28
|
+
console.log('[LogDrop] ErrorTracking.start: captured original handlers');
|
|
29
|
+
g.ErrorUtils.setGlobalHandler(async (error, isFatal) => {
|
|
30
|
+
const message = getErrorMessage(error);
|
|
31
|
+
const stack = getErrorStackTrace(error);
|
|
32
|
+
const top = (stack || '').split('\n')[0] || '';
|
|
33
|
+
console.log('[LogDrop] GlobalError captured', {
|
|
34
|
+
isFatal: !!isFatal,
|
|
35
|
+
message,
|
|
36
|
+
hasStack: !!stack,
|
|
37
|
+
topFrame: top
|
|
38
|
+
});
|
|
39
|
+
await this.report(message, stack, isFatal === true);
|
|
40
|
+
this.inDefaultHandler = true;
|
|
41
|
+
try {
|
|
42
|
+
console.log('[LogDrop] GlobalError delegating to RN default handler');
|
|
43
|
+
await new Promise(r => setTimeout(r, flushDelayMs));
|
|
44
|
+
this.defaultHandler?.(error, isFatal);
|
|
45
|
+
} finally {
|
|
46
|
+
this.inDefaultHandler = false;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
console.error = (...params) => {
|
|
50
|
+
if (this.inDefaultHandler) return;
|
|
51
|
+
const {
|
|
52
|
+
stack,
|
|
53
|
+
name
|
|
54
|
+
} = pickStackAndNameFromParams(params);
|
|
55
|
+
const msg = params.map(p => typeof p === 'string' ? p : getErrorMessage(p)).join(' ');
|
|
56
|
+
const sig = `${msg}::${name}::${(stack || '').split('\n')[0] || ''}`;
|
|
57
|
+
const duplicate = sig === this.lastSig;
|
|
58
|
+
console.log('[LogDrop] ConsoleError captured', {
|
|
59
|
+
duplicate,
|
|
60
|
+
hasStack: stack !== EMPTY_STACK_TRACE,
|
|
61
|
+
name: name || DEFAULT_ERROR_NAME
|
|
62
|
+
});
|
|
63
|
+
if (!duplicate) {
|
|
64
|
+
this.lastSig = sig;
|
|
65
|
+
this.report(msg, stack || EMPTY_STACK_TRACE, false).finally(() => {
|
|
66
|
+
this.defaultConsoleError(...params);
|
|
67
|
+
});
|
|
68
|
+
} else {
|
|
69
|
+
this.defaultConsoleError(...params);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const hermes = g?.HermesInternal;
|
|
73
|
+
const hasTracker = !!hermes?.enablePromiseRejectionTracker && !!hermes?.hasPromise?.();
|
|
74
|
+
console.log('[LogDrop] Hermes promise rejection tracker', {
|
|
75
|
+
enabled: hasTracker
|
|
76
|
+
});
|
|
77
|
+
if (hasTracker) {
|
|
78
|
+
hermes.enablePromiseRejectionTracker({
|
|
79
|
+
allRejections: true,
|
|
80
|
+
onUnhandled: (_id, error) => {
|
|
81
|
+
const message = getErrorMessage(error);
|
|
82
|
+
const stack = getErrorStackTrace(error);
|
|
83
|
+
const top = (stack || '').split('\n')[0] || '';
|
|
84
|
+
console.log('[LogDrop] UnhandledPromiseRejection captured', {
|
|
85
|
+
message,
|
|
86
|
+
hasStack: !!stack,
|
|
87
|
+
topFrame: top
|
|
88
|
+
});
|
|
89
|
+
this.report(message, stack, false);
|
|
90
|
+
},
|
|
91
|
+
onHandled: _id => {}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
this.tracking = true;
|
|
95
|
+
console.log('[LogDrop] ErrorTracking.start: setup complete');
|
|
96
|
+
}
|
|
97
|
+
static async report(_message, stack, isFatal) {
|
|
98
|
+
try {
|
|
99
|
+
const thread = 'JS Thread';
|
|
100
|
+
const crashType = isFatal ? 'JSFatal' : 'JSNonFatal';
|
|
101
|
+
const body = `${stack || ''}`;
|
|
102
|
+
const hasBridge = typeof LogDropReactNative?.saveCustomCrashReport === 'function';
|
|
103
|
+
console.log('[LogDrop] Report to native', {
|
|
104
|
+
platform: Platform.OS,
|
|
105
|
+
crashType,
|
|
106
|
+
hasBridge
|
|
107
|
+
});
|
|
108
|
+
if (Platform.OS === 'ios' || Platform.OS === 'android') {
|
|
109
|
+
if (hasBridge) {
|
|
110
|
+
LogDropReactNative.saveCustomCrashReport(thread, body, crashType);
|
|
111
|
+
console.log('[LogDrop] Report sent to native');
|
|
112
|
+
} else {
|
|
113
|
+
console.log('[LogDrop] Report skipped: native bridge method missing');
|
|
114
|
+
}
|
|
115
|
+
} else {
|
|
116
|
+
console.log('[LogDrop] Report skipped: unsupported platform');
|
|
117
|
+
}
|
|
118
|
+
} catch (_e) {
|
|
119
|
+
console.log('[LogDrop] Report failed');
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=LogDropErrorTracking.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeModules","Platform","EMPTY_STACK_TRACE","DEFAULT_ERROR_NAME","getErrorMessage","getErrorStackTrace","pickStackAndNameFromParams","LogDropReactNative","g","global","LogDropErrorTracking","tracking","inDefaultHandler","defaultHandler","defaultConsoleError","_a","lastSig","start","console","log","ErrorUtils","flushDelayMs","getGlobalHandler","error","bind","setGlobalHandler","isFatal","message","stack","top","split","hasStack","topFrame","report","Promise","r","setTimeout","params","name","msg","map","p","join","sig","duplicate","finally","hermes","HermesInternal","hasTracker","enablePromiseRejectionTracker","hasPromise","enabled","allRejections","onUnhandled","_id","onHandled","_message","thread","crashType","body","hasBridge","saveCustomCrashReport","platform","OS","_e"],"sourceRoot":"../../../src","sources":["utils/LogDropErrorTracking.ts"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AACtD,SACEC,iBAAiB,EACjBC,kBAAkB,EAClBC,eAAe,EACfC,kBAAkB,EAClBC,0BAA0B,QACrB,iBAAc;AAKrB,MAAM;EAAEC;AAAmB,CAAC,GAAGP,aAAoB;AACnD,MAAMQ,CAAC,GAAGC,MAAa;AAEvB,OAAO,MAAMC,oBAAoB,CAAC;EAChC,OAAeC,QAAQ,GAAG,KAAK;EAC/B,OAAeC,gBAAgB,GAAG,KAAK;EACvC,OAAeC,cAAc,GAC1BA,CAAA,KAAM,CAAC,CAAC;EACX,OAAeC,mBAAmB,GAAkBA,CAClD,GAAGC,EAAS,KACT,CAAC,CAAC;EACP,OAAeC,OAAO,GAAG,EAAE;EAE3B,OAAOC,KAAKA,CAAA,EAAG;IACb,IAAI,IAAI,CAACN,QAAQ,EAAE;MACjBO,OAAO,CAACC,GAAG,CAAC,gDAAgD,CAAC;MAC7D;IACF;IACA,IAAI,CAACX,CAAC,EAAEY,UAAU,EAAE;MAClBF,OAAO,CAACC,GAAG,CACT,yEACF,CAAC;MACD;IACF;IACA,MAAME,YAAY,GAAG,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AS,EAAE;QACtD,IAAIH,SAAS,EAAE;UACbrD,kBAAkB,CAACsD,qBAAqB,CAACJ,MAAM,EAAEE,IAAI,EAAED,SAAS,CAAC;UACjExC,OAAO,CAACC,GAAG,CAAC,iCAAiC,CAAC;QAChD,CAAC,MAAM;UACLD,OAAO,CAACC,GAAG,CAAC,wDAAwD,CAAC;QACvE;MACF,CAAC,MAAM;QACLD,OAAO,CAACC,GAAG,CAAC,gDAAgD,CAAC;MAC/D;IACF,CAAC,CAAC,OAAO6C,EAAE,EAAE;MACX9C,OAAO,CAACC,GAAG,CAAC,yBAAyB,CAAC;IACxC;EACF;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export const EMPTY_MESSAGE = "Unknown Error";
|
|
4
|
+
export const EMPTY_STACK_TRACE = "";
|
|
5
|
+
export const DEFAULT_ERROR_NAME = "Error";
|
|
6
|
+
export const getErrorMessage = error => {
|
|
7
|
+
if (error === undefined || error === null) return EMPTY_MESSAGE;
|
|
8
|
+
if (typeof error === "object" && "message" in error) return String(error.message);
|
|
9
|
+
return String(error);
|
|
10
|
+
};
|
|
11
|
+
export const getErrorName = error => {
|
|
12
|
+
if (typeof error !== "object" || error === null) return DEFAULT_ERROR_NAME;
|
|
13
|
+
const n = error.name;
|
|
14
|
+
return typeof n === "string" ? n : DEFAULT_ERROR_NAME;
|
|
15
|
+
};
|
|
16
|
+
export const getErrorStackTrace = error => {
|
|
17
|
+
try {
|
|
18
|
+
if (error === undefined || error === null) {
|
|
19
|
+
console.log("[LogDrop] getErrorStackTrace: no error provided");
|
|
20
|
+
return EMPTY_STACK_TRACE;
|
|
21
|
+
}
|
|
22
|
+
if (typeof error === "string") {
|
|
23
|
+
console.log("[LogDrop] getErrorStackTrace: string error has no stack");
|
|
24
|
+
return EMPTY_STACK_TRACE;
|
|
25
|
+
}
|
|
26
|
+
if (typeof error === "object") {
|
|
27
|
+
if ("stacktrace" in error) {
|
|
28
|
+
console.log('[LogDrop] getErrorStackTrace: using "stacktrace" field');
|
|
29
|
+
return String(error.stacktrace);
|
|
30
|
+
}
|
|
31
|
+
if ("stack" in error) {
|
|
32
|
+
console.log('[LogDrop] getErrorStackTrace: using "stack" field');
|
|
33
|
+
return String(error.stack);
|
|
34
|
+
}
|
|
35
|
+
if ("componentStack" in error) {
|
|
36
|
+
console.log('[LogDrop] getErrorStackTrace: using "componentStack" field');
|
|
37
|
+
return String(error.componentStack);
|
|
38
|
+
}
|
|
39
|
+
if ("sourceURL" in error && "line" in error && "column" in error) {
|
|
40
|
+
const s = `at ${error.sourceURL}:${error.line}:${error.column}`;
|
|
41
|
+
console.log("[LogDrop] getErrorStackTrace: synthesized from sourceURL/line/column");
|
|
42
|
+
return s;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
} catch (_e) {}
|
|
46
|
+
console.log("[LogDrop] getErrorStackTrace: no stack extracted");
|
|
47
|
+
return EMPTY_STACK_TRACE;
|
|
48
|
+
};
|
|
49
|
+
export const pickStackAndNameFromParams = params => {
|
|
50
|
+
let stack = EMPTY_STACK_TRACE;
|
|
51
|
+
let name = DEFAULT_ERROR_NAME;
|
|
52
|
+
let foundStackAt = -1;
|
|
53
|
+
let foundNameAt = -1;
|
|
54
|
+
for (let i = 0; i < params.length; i++) {
|
|
55
|
+
const p = params[i];
|
|
56
|
+
const s = getErrorStackTrace(p);
|
|
57
|
+
if (s !== EMPTY_STACK_TRACE && foundStackAt === -1) {
|
|
58
|
+
stack = s;
|
|
59
|
+
foundStackAt = i;
|
|
60
|
+
}
|
|
61
|
+
const n = getErrorName(p);
|
|
62
|
+
if (n !== DEFAULT_ERROR_NAME && foundNameAt === -1) {
|
|
63
|
+
name = n;
|
|
64
|
+
foundNameAt = i;
|
|
65
|
+
}
|
|
66
|
+
if (stack !== EMPTY_STACK_TRACE && name !== DEFAULT_ERROR_NAME) break;
|
|
67
|
+
}
|
|
68
|
+
console.log("[LogDrop] pickStackAndNameFromParams:", {
|
|
69
|
+
name,
|
|
70
|
+
hasStack: stack !== EMPTY_STACK_TRACE,
|
|
71
|
+
stackFromParamIndex: foundStackAt,
|
|
72
|
+
nameFromParamIndex: foundNameAt
|
|
73
|
+
});
|
|
74
|
+
return {
|
|
75
|
+
stack,
|
|
76
|
+
name
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=errorUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["EMPTY_MESSAGE","EMPTY_STACK_TRACE","DEFAULT_ERROR_NAME","getErrorMessage","error","undefined","String","message","getErrorName","n","name","getErrorStackTrace","console","log","stacktrace","stack","componentStack","s","sourceURL","line","column","_e","pickStackAndNameFromParams","params","foundStackAt","foundNameAt","i","length","p","hasStack","stackFromParamIndex","nameFromParamIndex"],"sourceRoot":"../../../src","sources":["utils/errorUtils.ts"],"mappings":";;AAAA,OAAO,MAAMA,aAAa,GAAG,eAAe;AAC5C,OAAO,MAAMC,iBAAiB,GAAG,EAAE;AACnC,OAAO,MAAMC,kBAAkB,GAAG,OAAO;AAEzC,OAAO,MAAMC,eAAe,GAAIC,KAAsB,IAAa;EACjE,IAAIA,KAAK,KAAKC,SAAS,IAAID,KAAK,KAAK,IAAI,EAAE,OAAOJ,aAAa;EAC/D,IAAI,OAAOI,KAAK,KAAK,QAAQ,IAAI,SAAS,IAAIA,KAAK,EACjD,OAAOE,MAAM,CAACF,KAAK,CAACG,OAAO,CAAC;EAC9B,OAAOD,MAAM,CAACF,KAAK,CAAC;AACtB,CAAC;AAED,OAAO,MAAMI,YAAY,GAAIJ,KAAc,IAAa;EACtD,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,EAAE,OAAOF,kBAAkB;EAC1E,MAAMO,CAAC,GAAIL,KAAK,CAASM,IAAI;EAC7B,OAAO,OAAOD,CAAC,KAAK,QAAQ,GAAGA,CAAC,GAAGP,kBAAkB;AACvD,CAAC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,IAAIR,KAAK,GAAGd,iBAAiB;EAC7B,IAAIS,IAAI,GAAGR,kBAAkB;EAC7B,IAAIsB,YAAY,GAAG,CAAC,CAAC;EACrB,IAAIC,WAAW,GAAG,CAAC,CAAC;EACpB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,MAAM,CAACI,MAAM,EAAED,CAAC,EAAE,EAAE;IACtC,MAAME,CAAC,GAAGL,MAAM,CAACG,CAAC,CAAC;IACnB,MAAMT,CAAC,GAAGN,kBAAkB,CAACiB,CAAQ,CAAC;IACtC,IAAIX,CAAC,KAAKhB,iBAAiB,IAAIuB,YAAY,KAAK,CAAC,CAAC,EAAE;MAClDT,KAAK,GAAGE,CAAC;MACTO,YAAY,GAAGE,CAAC;IAClB;IACA,MAAMjB,CAAC,GAAGD,YAAY,CAACoB,CAAC,CAAC;IACzB,IAAInB,CAAC,KAAKP,kBAAkB,IAAIuB,WAAW,KAAK,CAAC,CAAC,EAAE;MAClDf,IAAI,GAAGD,CAAC;MACRgB,WAAW,GAAGC,CAAC;IACjB;IACA,IAAIX,KAAK,KAAKd,iBAAiB,IAAIS,IAAI,KAAKR,kBAAkB,EAAE;EAClE;EACAU,OAAO,CAACC,GAAG,CAAC,uCAAuC,EAAE;IACnDH,IAAI;IACJmB,QAAQ,EAAEd,KAAK,KAAKd,iBAAiB;IACrC6B,mBAAmB,EAAEN,YAAY;IACjCO,kBAAkB,EAAEN;EACtB,CAAC,CAAC;EACF,OAAO;IAAEV,KAAK;IAAEL;EAAK,CAAC;AACxB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type LogDropConfig } from './LogDropConfig';
|
|
2
|
+
import LogFlow from './LogFlow';
|
|
3
|
+
export default class LogDrop {
|
|
4
|
+
static init: (config: LogDropConfig) => void;
|
|
5
|
+
static onRemoteMessageReceived: (message: {
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
}) => void;
|
|
8
|
+
static onNewFcmPushToken: (token: string) => void;
|
|
9
|
+
static onNewHmsPushToken: (token: string) => void;
|
|
10
|
+
static sendLogs: () => void;
|
|
11
|
+
static userUpdate: (userId: string) => void;
|
|
12
|
+
static e: (tag: string, message: string, logFlow?: LogFlow) => void;
|
|
13
|
+
static d: (tag: string, message: string, logFlow?: LogFlow) => void;
|
|
14
|
+
static i: (tag: string, message: string, logFlow?: LogFlow) => void;
|
|
15
|
+
static w: (tag: string, message: string, logFlow?: LogFlow) => void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=LogDrop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogDrop.d.ts","sourceRoot":"","sources":["../../../src/LogDrop.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,OAAO,MAAM,WAAW,CAAC;AAGhC,MAAM,CAAC,OAAO,OAAO,OAAO;IAC1B,MAAM,CAAC,IAAI,GAAI,QAAQ,aAAa,KAAG,IAAI,CAOzC;IAEF,MAAM,CAAC,uBAAuB,GAAI,SAAS;QACzC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,KAAG,IAAI,CAIN;IAEF,MAAM,CAAC,iBAAiB,GAAI,OAAO,MAAM,KAAG,IAAI,CAI9C;IAEF,MAAM,CAAC,iBAAiB,GAAI,OAAO,MAAM,KAAG,IAAI,CAI9C;IAEF,MAAM,CAAC,QAAQ,QAAO,IAAI,CAExB;IAEF,MAAM,CAAC,UAAU,GAAI,QAAQ,MAAM,KAAG,IAAI,CAExC;IAEF,MAAM,CAAC,CAAC,GAAI,KAAK,MAAM,EAAE,SAAS,MAAM,EAAE,UAAU,OAAO,KAAG,IAAI,CAEhE;IAEF,MAAM,CAAC,CAAC,GAAI,KAAK,MAAM,EAAE,SAAS,MAAM,EAAE,UAAU,OAAO,KAAG,IAAI,CAEhE;IAEF,MAAM,CAAC,CAAC,GAAI,KAAK,MAAM,EAAE,SAAS,MAAM,EAAE,UAAU,OAAO,KAAG,IAAI,CAEhE;IAEF,MAAM,CAAC,CAAC,GAAI,KAAK,MAAM,EAAE,SAAS,MAAM,EAAE,UAAU,OAAO,KAAG,IAAI,CAEhE;CACH"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface LogDropConfig {
|
|
2
|
+
apiKey: string;
|
|
3
|
+
baseUrl: string;
|
|
4
|
+
isLoggingEnabled: boolean;
|
|
5
|
+
defaultSDKDisabled: boolean;
|
|
6
|
+
sensitiveInfoFilter: string[];
|
|
7
|
+
crashTrackingEnabled: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare class LogDropConfigBuilder {
|
|
10
|
+
private apiKey;
|
|
11
|
+
private baseUrl;
|
|
12
|
+
private isLoggingEnabled;
|
|
13
|
+
private defaultSDKDisabled;
|
|
14
|
+
private sensitiveInfoFilter;
|
|
15
|
+
private crashTrackingEnabled;
|
|
16
|
+
setApiKey(apiKey: string): this;
|
|
17
|
+
setBaseUrl(baseUrl: string): this;
|
|
18
|
+
setLoggingEnabled(isLoggingEnabled: boolean): this;
|
|
19
|
+
setDefaultSDKDisabledValue(defaultSDKDisabled: boolean): this;
|
|
20
|
+
setSensitiveInfoFilter(sensitiveInfoFilter: string[]): this;
|
|
21
|
+
setCrashTrackingEnabled(crashTrackingEnabled: boolean): this;
|
|
22
|
+
build(): LogDropConfig;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=LogDropConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogDropConfig.d.ts","sourceRoot":"","sources":["../../../src/LogDropConfig.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAED,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,gBAAgB,CAAkB;IAC1C,OAAO,CAAC,kBAAkB,CAAkB;IAC5C,OAAO,CAAC,mBAAmB,CAAgB;IAC3C,OAAO,CAAC,oBAAoB,CAAiB;IAE7C,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK/B,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAKjC,iBAAiB,CAAC,gBAAgB,EAAE,OAAO,GAAG,IAAI;IAKlD,0BAA0B,CAAC,kBAAkB,EAAE,OAAO,GAAG,IAAI;IAK7D,sBAAsB,CAAC,mBAAmB,EAAE,MAAM,EAAE,GAAG,IAAI;IAK3D,uBAAuB,CAAC,oBAAoB,EAAE,OAAO,GAAG,IAAI;IAK5D,KAAK,IAAI,aAAa;CAUvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogDropReactNative.d.ts","sourceRoot":"","sources":["../../../src/LogDropReactNative.ts"],"names":[],"mappings":"AASA,QAAA,MAAM,kBAAkB,KASrB,CAAC;AAEJ,OAAO,EAAC,kBAAkB,EAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogFlow.d.ts","sourceRoot":"","sources":["../../../src/LogFlow.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,OAAO;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAGrC,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;CAMzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,KAAK,aAAa,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE3E,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAC;AAClD,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class LogDropErrorTracking {
|
|
2
|
+
private static tracking;
|
|
3
|
+
private static inDefaultHandler;
|
|
4
|
+
private static defaultHandler;
|
|
5
|
+
private static defaultConsoleError;
|
|
6
|
+
private static lastSig;
|
|
7
|
+
static start(): void;
|
|
8
|
+
private static report;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=LogDropErrorTracking.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogDropErrorTracking.d.ts","sourceRoot":"","sources":["../../../../src/utils/LogDropErrorTracking.ts"],"names":[],"mappings":"AAeA,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAS;IAChC,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAS;IACxC,OAAO,CAAC,MAAM,CAAC,cAAc,CACW;IACxC,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAET;IACzB,OAAO,CAAC,MAAM,CAAC,OAAO,CAAM;IAE5B,MAAM,CAAC,KAAK;mBA0FS,MAAM;CA8B5B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const EMPTY_MESSAGE = "Unknown Error";
|
|
2
|
+
export declare const EMPTY_STACK_TRACE = "";
|
|
3
|
+
export declare const DEFAULT_ERROR_NAME = "Error";
|
|
4
|
+
export declare const getErrorMessage: (error: any | undefined) => string;
|
|
5
|
+
export declare const getErrorName: (error: unknown) => string;
|
|
6
|
+
export declare const getErrorStackTrace: (error: any | undefined) => string;
|
|
7
|
+
export declare const pickStackAndNameFromParams: (params: unknown[]) => {
|
|
8
|
+
stack: string;
|
|
9
|
+
name: string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=errorUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorUtils.d.ts","sourceRoot":"","sources":["../../../../src/utils/errorUtils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAE1C,eAAO,MAAM,eAAe,GAAI,OAAO,GAAG,GAAG,SAAS,KAAG,MAKxD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,OAAO,KAAG,MAI7C,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,OAAO,GAAG,GAAG,SAAS,KAAG,MAsC3D,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,QAAQ,OAAO,EAAE;;;CA0B3D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,32 +1,127 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@log-drop/react-native",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1-beta1",
|
|
4
4
|
"description": "LogDrop React Native SDK",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"source": "./src/index.tsx",
|
|
6
|
+
"main": "./lib/module/index.js",
|
|
7
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
+
"default": "./lib/module/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"src",
|
|
17
|
+
"lib",
|
|
18
|
+
"android",
|
|
19
|
+
"ios",
|
|
20
|
+
"cpp",
|
|
21
|
+
"*.podspec",
|
|
22
|
+
"react-native.config.js",
|
|
23
|
+
"!ios/build",
|
|
24
|
+
"!android/build",
|
|
25
|
+
"!android/gradle",
|
|
26
|
+
"!android/gradlew",
|
|
27
|
+
"!android/gradlew.bat",
|
|
28
|
+
"!android/local.properties",
|
|
29
|
+
"!**/__tests__",
|
|
30
|
+
"!**/__fixtures__",
|
|
31
|
+
"!**/__mocks__",
|
|
32
|
+
"!**/.*"
|
|
33
|
+
],
|
|
7
34
|
"scripts": {
|
|
8
|
-
"
|
|
9
|
-
"
|
|
35
|
+
"example": "yarn workspace logdrop-react-native-example",
|
|
36
|
+
"test": "jest",
|
|
37
|
+
"typecheck": "tsc",
|
|
38
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
39
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
40
|
+
"prepare": "bob build",
|
|
41
|
+
"release": "release-it"
|
|
10
42
|
},
|
|
11
43
|
"keywords": [
|
|
12
44
|
"react-native",
|
|
13
45
|
"ios",
|
|
14
|
-
"android"
|
|
15
|
-
"logdrop"
|
|
46
|
+
"android"
|
|
16
47
|
],
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "git+https://github.com/initialcodess/LogDrop-React-Native-SDK.git"
|
|
51
|
+
},
|
|
52
|
+
"author": "Initial Code <engineering@initialcode.io> (https://github.com/initialcodess)",
|
|
53
|
+
"license": "MIT",
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/initialcodess/LogDrop-React-Native-SDK/issues"
|
|
56
|
+
},
|
|
57
|
+
"homepage": "https://github.com/initialcodess/LogDrop-React-Native-SDK#readme",
|
|
17
58
|
"publishConfig": {
|
|
18
59
|
"access": "public",
|
|
19
60
|
"registry": "https://registry.npmjs.org/"
|
|
20
61
|
},
|
|
21
|
-
"license": "",
|
|
22
62
|
"devDependencies": {
|
|
23
|
-
"@
|
|
24
|
-
"@
|
|
25
|
-
"@
|
|
26
|
-
"@
|
|
27
|
-
"@types/
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
63
|
+
"@eslint/compat": "^1.2.7",
|
|
64
|
+
"@eslint/eslintrc": "^3.3.0",
|
|
65
|
+
"@eslint/js": "^9.22.0",
|
|
66
|
+
"@react-native/eslint-config": "^0.78.0",
|
|
67
|
+
"@types/jest": "^29.5.5",
|
|
68
|
+
"@types/react": "^19.0.0",
|
|
69
|
+
"del-cli": "^5.1.0",
|
|
70
|
+
"eslint": "^9.22.0",
|
|
71
|
+
"eslint-config-prettier": "^10.1.8",
|
|
72
|
+
"eslint-plugin-prettier": "^5.2.6",
|
|
73
|
+
"jest": "^29.7.0",
|
|
74
|
+
"prettier": "^3.0.3",
|
|
75
|
+
"react": "19.0.0",
|
|
76
|
+
"react-native": "0.78.2",
|
|
77
|
+
"react-native-builder-bob": "^0.40.13",
|
|
78
|
+
"release-it": "^17.10.0",
|
|
79
|
+
"turbo": "^1.10.7",
|
|
80
|
+
"typescript": "^5.2.2"
|
|
81
|
+
},
|
|
82
|
+
"peerDependencies": {
|
|
83
|
+
"react": "*",
|
|
84
|
+
"react-native": "*"
|
|
85
|
+
},
|
|
86
|
+
"workspaces": [
|
|
87
|
+
"example"
|
|
88
|
+
],
|
|
89
|
+
"packageManager": "yarn@3.6.1",
|
|
90
|
+
"jest": {
|
|
91
|
+
"preset": "react-native",
|
|
92
|
+
"modulePathIgnorePatterns": [
|
|
93
|
+
"<rootDir>/example/node_modules",
|
|
94
|
+
"<rootDir>/lib/"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"prettier": {
|
|
98
|
+
"quoteProps": "consistent",
|
|
99
|
+
"singleQuote": true,
|
|
100
|
+
"tabWidth": 2,
|
|
101
|
+
"trailingComma": "es5",
|
|
102
|
+
"useTabs": false
|
|
103
|
+
},
|
|
104
|
+
"react-native-builder-bob": {
|
|
105
|
+
"source": "src",
|
|
106
|
+
"output": "lib",
|
|
107
|
+
"targets": [
|
|
108
|
+
[
|
|
109
|
+
"module",
|
|
110
|
+
{
|
|
111
|
+
"esm": true
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
[
|
|
115
|
+
"typescript",
|
|
116
|
+
{
|
|
117
|
+
"project": "tsconfig.build.json"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"create-react-native-library": {
|
|
123
|
+
"type": "legacy-module",
|
|
124
|
+
"languages": "kotlin-swift",
|
|
125
|
+
"version": "0.49.8"
|
|
31
126
|
}
|
|
32
127
|
}
|