@tryvital/vital-core-react-native 0.1.1 → 0.2.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.
- package/package.json +8 -24
- package/src/{index.tsx → index.ts} +0 -0
- package/vital-core-react-native.podspec +1 -1
- package/.editorconfig +0 -15
- package/.gitattributes +0 -3
- package/.gitignore +0 -70
- package/.watchmanconfig +0 -1
- package/.yarnrc +0 -3
- package/babel.config.js +0 -3
- package/lefthook.yml +0 -16
- package/lib/commonjs/index.js +0 -29
- package/lib/commonjs/index.js.map +0 -1
- package/lib/module/index.js +0 -22
- package/lib/module/index.js.map +0 -1
- package/lib/typescript/__tests__/index.test.d.ts +0 -1
- package/lib/typescript/__tests__/index.test.d.ts.map +0 -1
- package/lib/typescript/index.d.ts +0 -6
- package/lib/typescript/index.d.ts.map +0 -1
- package/scripts/bootstrap.js +0 -29
- package/src/__tests__/index.test.tsx +0 -1
- package/tsconfig.build.json +0 -5
- package/tsconfig.json +0 -28
- package/yarn.lock +0 -9658
package/package.json
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryvital/vital-core-react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "test",
|
|
5
|
-
"main": "lib/
|
|
6
|
-
"
|
|
7
|
-
"types": "lib/typescript/index.d.ts",
|
|
8
|
-
"react-native": "src/index",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
9
7
|
"source": "src/index",
|
|
10
8
|
"files": [
|
|
11
9
|
"src",
|
|
@@ -28,9 +26,9 @@
|
|
|
28
26
|
],
|
|
29
27
|
"scripts": {
|
|
30
28
|
"test": "jest",
|
|
31
|
-
"typescript": "tsc --
|
|
29
|
+
"typescript": "tsc --declaration",
|
|
30
|
+
"postinstall": "npm run typescript",
|
|
32
31
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
33
|
-
"prepare": "bob build",
|
|
34
32
|
"release": "release-it",
|
|
35
33
|
"example": "yarn --cwd example",
|
|
36
34
|
"bootstrap": "yarn example && yarn install && yarn example pods",
|
|
@@ -41,12 +39,12 @@
|
|
|
41
39
|
"ios",
|
|
42
40
|
"android"
|
|
43
41
|
],
|
|
44
|
-
"repository": "https://github.com/tryVital/vital-react-native",
|
|
42
|
+
"repository": "https://github.com/tryVital/vital-core-react-native",
|
|
45
43
|
"author": "Vital",
|
|
46
44
|
"bugs": {
|
|
47
|
-
"url": "https://github.com/tryVital/vital-react-native/issues"
|
|
45
|
+
"url": "https://github.com/tryVital/vital-core-react-native/issues"
|
|
48
46
|
},
|
|
49
|
-
"homepage": "https://github.com/tryVital/vital-react-native#readme",
|
|
47
|
+
"homepage": "https://github.com/tryVital/vital-core-react-native#readme",
|
|
50
48
|
"publishConfig": {
|
|
51
49
|
"registry": "https://registry.npmjs.org/"
|
|
52
50
|
},
|
|
@@ -141,19 +139,5 @@
|
|
|
141
139
|
"tabWidth": 2,
|
|
142
140
|
"trailingComma": "es5",
|
|
143
141
|
"useTabs": false
|
|
144
|
-
},
|
|
145
|
-
"react-native-builder-bob": {
|
|
146
|
-
"source": "src",
|
|
147
|
-
"output": "lib",
|
|
148
|
-
"targets": [
|
|
149
|
-
"commonjs",
|
|
150
|
-
"module",
|
|
151
|
-
[
|
|
152
|
-
"typescript",
|
|
153
|
-
{
|
|
154
|
-
"project": "tsconfig.build.json"
|
|
155
|
-
}
|
|
156
|
-
]
|
|
157
|
-
]
|
|
158
142
|
}
|
|
159
143
|
}
|
|
File without changes
|
|
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
18
|
|
|
19
19
|
s.dependency "React-Core"
|
|
20
|
-
s.dependency "VitalCore", "~> 0.7.
|
|
20
|
+
s.dependency "VitalCore", "~> 0.7.8"
|
|
21
21
|
|
|
22
22
|
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
23
23
|
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
package/.editorconfig
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# EditorConfig helps developers define and maintain consistent
|
|
2
|
-
# coding styles between different editors and IDEs
|
|
3
|
-
# editorconfig.org
|
|
4
|
-
|
|
5
|
-
root = true
|
|
6
|
-
|
|
7
|
-
[*]
|
|
8
|
-
|
|
9
|
-
indent_style = space
|
|
10
|
-
indent_size = 2
|
|
11
|
-
|
|
12
|
-
end_of_line = lf
|
|
13
|
-
charset = utf-8
|
|
14
|
-
trim_trailing_whitespace = true
|
|
15
|
-
insert_final_newline = true
|
package/.gitattributes
DELETED
package/.gitignore
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# OSX
|
|
2
|
-
#
|
|
3
|
-
.DS_Store
|
|
4
|
-
|
|
5
|
-
# XDE
|
|
6
|
-
.expo/
|
|
7
|
-
|
|
8
|
-
# VSCode
|
|
9
|
-
.vscode/
|
|
10
|
-
jsconfig.json
|
|
11
|
-
|
|
12
|
-
# Xcode
|
|
13
|
-
#
|
|
14
|
-
build/
|
|
15
|
-
*.pbxuser
|
|
16
|
-
!default.pbxuser
|
|
17
|
-
*.mode1v3
|
|
18
|
-
!default.mode1v3
|
|
19
|
-
*.mode2v3
|
|
20
|
-
!default.mode2v3
|
|
21
|
-
*.perspectivev3
|
|
22
|
-
!default.perspectivev3
|
|
23
|
-
xcuserdata
|
|
24
|
-
*.xccheckout
|
|
25
|
-
*.moved-aside
|
|
26
|
-
DerivedData
|
|
27
|
-
*.hmap
|
|
28
|
-
*.ipa
|
|
29
|
-
*.xcuserstate
|
|
30
|
-
project.xcworkspace
|
|
31
|
-
|
|
32
|
-
# Android/IJ
|
|
33
|
-
#
|
|
34
|
-
.classpath
|
|
35
|
-
.cxx
|
|
36
|
-
.gradle
|
|
37
|
-
.idea
|
|
38
|
-
.project
|
|
39
|
-
.settings
|
|
40
|
-
local.properties
|
|
41
|
-
android.iml
|
|
42
|
-
|
|
43
|
-
# Cocoapods
|
|
44
|
-
#
|
|
45
|
-
example/ios/Pods
|
|
46
|
-
|
|
47
|
-
# Ruby
|
|
48
|
-
example/vendor/
|
|
49
|
-
|
|
50
|
-
# node.js
|
|
51
|
-
#
|
|
52
|
-
node_modules/
|
|
53
|
-
npm-debug.log
|
|
54
|
-
yarn-debug.log
|
|
55
|
-
yarn-error.log
|
|
56
|
-
|
|
57
|
-
# BUCK
|
|
58
|
-
buck-out/
|
|
59
|
-
\.buckd/
|
|
60
|
-
android/app/libs
|
|
61
|
-
android/keystores/debug.keystore
|
|
62
|
-
|
|
63
|
-
# Expo
|
|
64
|
-
.expo/
|
|
65
|
-
|
|
66
|
-
# Turborepo
|
|
67
|
-
.turbo/
|
|
68
|
-
|
|
69
|
-
# generated by bob
|
|
70
|
-
lib/
|
package/.watchmanconfig
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
package/.yarnrc
DELETED
package/babel.config.js
DELETED
package/lefthook.yml
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
pre-commit:
|
|
2
|
-
parallel: true
|
|
3
|
-
commands:
|
|
4
|
-
lint:
|
|
5
|
-
files: git diff --name-only @{push}
|
|
6
|
-
glob: "*.{js,ts,jsx,tsx}"
|
|
7
|
-
run: npx eslint {files}
|
|
8
|
-
types:
|
|
9
|
-
files: git diff --name-only @{push}
|
|
10
|
-
glob: "*.{js,ts, jsx, tsx}"
|
|
11
|
-
run: npx tsc --noEmit
|
|
12
|
-
commit-msg:
|
|
13
|
-
parallel: true
|
|
14
|
-
commands:
|
|
15
|
-
commitlint:
|
|
16
|
-
run: npx commitlint --edit
|
package/lib/commonjs/index.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.VitalCore = void 0;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
const LINKING_ERROR = `The package 'vital-core-react-native' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
|
|
9
|
-
ios: "- You have run 'pod install'\n",
|
|
10
|
-
default: ''
|
|
11
|
-
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
12
|
-
const VitalCoreReactNative = _reactNative.NativeModules.VitalCoreReactNative ? _reactNative.NativeModules.VitalCoreReactNative : new Proxy({}, {
|
|
13
|
-
get() {
|
|
14
|
-
throw new Error(LINKING_ERROR);
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
class VitalCore {
|
|
18
|
-
static setUserId(userId) {
|
|
19
|
-
return VitalCoreReactNative.setUserId(userId);
|
|
20
|
-
}
|
|
21
|
-
static configure(apiKey, environment, region, enableLogs) {
|
|
22
|
-
return VitalCoreReactNative.configure(apiKey, environment, region, enableLogs);
|
|
23
|
-
}
|
|
24
|
-
static cleanUp() {
|
|
25
|
-
return VitalCoreReactNative.cleanUp();
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.VitalCore = VitalCore;
|
|
29
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["LINKING_ERROR","Platform","select","ios","default","VitalCoreReactNative","NativeModules","Proxy","get","Error","VitalCore","setUserId","userId","configure","apiKey","environment","region","enableLogs","cleanUp"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;AAAA;AAEA,MAAMA,aAAa,GAChB,kFAAiF,GAClFC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,oBAAoB,GAAGC,0BAAa,CAACD,oBAAoB,GAC3DC,0BAAa,CAACD,oBAAoB,GAClC,IAAIE,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAG,GAAG;IACJ,MAAM,IAAIC,KAAK,CAACT,aAAa,CAAC;EAChC;AACF,CAAC,CACF;AAGE,MAAMU,SAAS,CAAC;EACrB,OAAOC,SAAS,CAACC,MAAc,EAAiB;IAC9C,OAAOP,oBAAoB,CAACM,SAAS,CAACC,MAAM,CAAC;EAC/C;EAEA,OAAOC,SAAS,CAACC,MAAc,EAAEC,WAAmB,EAAEC,MAAc,EAAEC,UAAmB,EAAiB;IACxG,OAAOZ,oBAAoB,CAACQ,SAAS,CAACC,MAAM,EAAEC,WAAW,EAAEC,MAAM,EAAEC,UAAU,CAAC;EAChF;EAEA,OAAOC,OAAO,GAAkB;IAC9B,OAAOb,oBAAoB,CAACa,OAAO,EAAE;EACvC;AACF;AAAC"}
|
package/lib/module/index.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { NativeModules, Platform } from 'react-native';
|
|
2
|
-
const LINKING_ERROR = `The package 'vital-core-react-native' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
|
|
3
|
-
ios: "- You have run 'pod install'\n",
|
|
4
|
-
default: ''
|
|
5
|
-
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
6
|
-
const VitalCoreReactNative = NativeModules.VitalCoreReactNative ? NativeModules.VitalCoreReactNative : new Proxy({}, {
|
|
7
|
-
get() {
|
|
8
|
-
throw new Error(LINKING_ERROR);
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
export class VitalCore {
|
|
12
|
-
static setUserId(userId) {
|
|
13
|
-
return VitalCoreReactNative.setUserId(userId);
|
|
14
|
-
}
|
|
15
|
-
static configure(apiKey, environment, region, enableLogs) {
|
|
16
|
-
return VitalCoreReactNative.configure(apiKey, environment, region, enableLogs);
|
|
17
|
-
}
|
|
18
|
-
static cleanUp() {
|
|
19
|
-
return VitalCoreReactNative.cleanUp();
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","VitalCoreReactNative","Proxy","get","Error","VitalCore","setUserId","userId","configure","apiKey","environment","region","enableLogs","cleanUp"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAEtD,MAAMC,aAAa,GAChB,kFAAiF,GAClFD,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,oBAAoB,GAAGN,aAAa,CAACM,oBAAoB,GAC3DN,aAAa,CAACM,oBAAoB,GAClC,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAG,GAAG;IACJ,MAAM,IAAIC,KAAK,CAACP,aAAa,CAAC;EAChC;AACF,CAAC,CACF;AAGL,OAAO,MAAMQ,SAAS,CAAC;EACrB,OAAOC,SAAS,CAACC,MAAc,EAAiB;IAC9C,OAAON,oBAAoB,CAACK,SAAS,CAACC,MAAM,CAAC;EAC/C;EAEA,OAAOC,SAAS,CAACC,MAAc,EAAEC,WAAmB,EAAEC,MAAc,EAAEC,UAAmB,EAAiB;IACxG,OAAOX,oBAAoB,CAACO,SAAS,CAACC,MAAM,EAAEC,WAAW,EAAEC,MAAM,EAAEC,UAAU,CAAC;EAChF;EAEA,OAAOC,OAAO,GAAkB;IAC9B,OAAOZ,oBAAoB,CAACY,OAAO,EAAE;EACvC;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=index.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/index.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAoBA,qBAAa,SAAS;IACpB,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/C,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzG,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAGhC"}
|
package/scripts/bootstrap.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
const os = require('os');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const child_process = require('child_process');
|
|
4
|
-
|
|
5
|
-
const root = path.resolve(__dirname, '..');
|
|
6
|
-
const args = process.argv.slice(2);
|
|
7
|
-
const options = {
|
|
8
|
-
cwd: process.cwd(),
|
|
9
|
-
env: process.env,
|
|
10
|
-
stdio: 'inherit',
|
|
11
|
-
encoding: 'utf-8',
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
if (os.type() === 'Windows_NT') {
|
|
15
|
-
options.shell = true;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
let result;
|
|
19
|
-
|
|
20
|
-
if (process.cwd() !== root || args.length) {
|
|
21
|
-
// We're not in the root of the project, or additional arguments were passed
|
|
22
|
-
// In this case, forward the command to `yarn`
|
|
23
|
-
result = child_process.spawnSync('yarn', args, options);
|
|
24
|
-
} else {
|
|
25
|
-
// If `yarn` is run without arguments, perform bootstrap
|
|
26
|
-
result = child_process.spawnSync('yarn', ['bootstrap'], options);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
process.exitCode = result.status;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
it.todo('write a test');
|
package/tsconfig.build.json
DELETED
package/tsconfig.json
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"baseUrl": "./",
|
|
4
|
-
"paths": {
|
|
5
|
-
"vital-core-react-native": ["./src/index"]
|
|
6
|
-
},
|
|
7
|
-
"allowUnreachableCode": false,
|
|
8
|
-
"allowUnusedLabels": false,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"importsNotUsedAsValues": "error",
|
|
11
|
-
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"jsx": "react",
|
|
13
|
-
"lib": ["esnext"],
|
|
14
|
-
"module": "esnext",
|
|
15
|
-
"moduleResolution": "node",
|
|
16
|
-
"noFallthroughCasesInSwitch": true,
|
|
17
|
-
"noImplicitReturns": true,
|
|
18
|
-
"noImplicitUseStrict": false,
|
|
19
|
-
"noStrictGenericChecks": false,
|
|
20
|
-
"noUncheckedIndexedAccess": true,
|
|
21
|
-
"noUnusedLocals": true,
|
|
22
|
-
"noUnusedParameters": true,
|
|
23
|
-
"resolveJsonModule": true,
|
|
24
|
-
"skipLibCheck": true,
|
|
25
|
-
"strict": true,
|
|
26
|
-
"target": "esnext"
|
|
27
|
-
}
|
|
28
|
-
}
|