react-native-nami-sdk 2.0.1 → 2.0.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.
@@ -0,0 +1,68 @@
1
+ name: Build Bridge
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ ref:
7
+ description: "Git Tag, Branch or SHA to build"
8
+ required: true
9
+ default: "develop"
10
+ earlyaccess:
11
+ description: "Is this a early access build?"
12
+ default: true
13
+ type: boolean
14
+ secrets:
15
+ BUILD_USER_PAT:
16
+ required: true
17
+
18
+ jobs:
19
+ build:
20
+ name: Build Bridge release
21
+ timeout-minutes: 30
22
+ runs-on: ubuntu-latest
23
+ permissions:
24
+ actions: write
25
+ contents: write
26
+ id-token: write
27
+ steps:
28
+
29
+ # clone the repo at a specific version
30
+ - name: Checkout ${{ inputs.ref }}
31
+ uses: actions/checkout@v2
32
+ with:
33
+ ref: ${{ inputs.ref }}
34
+
35
+ # human error checks
36
+ - name: Set up Python
37
+ uses: actions/setup-python@v1
38
+ with:
39
+ python-version: "3.10"
40
+
41
+ - name: Release Preflight Checks
42
+ run: |
43
+ python3 build-utils/preflight.py
44
+ env:
45
+ NAMI_SDK_VERSION: ${{ inputs.version }}
46
+
47
+ - name: Setup .npmrc
48
+ run: |
49
+ cat .npmrc
50
+
51
+ - name: Run Yarn
52
+ run: |
53
+ yarn --frozen-lockfile
54
+ env:
55
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
56
+
57
+ - name: Publish
58
+ run: |
59
+ npm publish --access public
60
+ env:
61
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
62
+
63
+ - name: Create Github Release
64
+ run: |-
65
+ #sh gh-release-command.sh
66
+ echo "Release me"
67
+ env:
68
+ GITHUB_TOKEN: ${{ github.token }}
@@ -0,0 +1,45 @@
1
+ import os
2
+ import json
3
+ import sys
4
+ import re
5
+ import subprocess
6
+
7
+ # Regex to validate version numbers
8
+ PROD_VERSION_RE = re.compile(r"^\d+\.\d+\.\d+$")
9
+ PRERELEASE_VERSION_RE = re.compile(r"^\d+\.\d+\.\d+-(alpha|beta|rc)\.\d{2}$")
10
+
11
+ early_access = str(os.getenv("EARLY_ACCESS"))
12
+
13
+ # get the version out of source of truth
14
+ with open("package.json", "r") as f:
15
+ package = json.load(f)
16
+ nami_sdk_version = package["version"]
17
+
18
+ # Get git version
19
+ git_long_hash = (
20
+ subprocess.check_output(["git", "log", "-1", "--format=%H"]).decode("utf-8").strip()
21
+ )
22
+
23
+ # Check what kind of release this is and guard against non-conforming version numbers
24
+ if PROD_VERSION_RE.match(nami_sdk_version):
25
+ if early_access == "true":
26
+ print(f"Early access value ('{early_access}') is not compatible with production version format '{nami_sdk_version}'")
27
+ sys.exit(1)
28
+ type_mods = ""
29
+ elif PRERELEASE_VERSION_RE.match(nami_sdk_version):
30
+ if early_access == "false":
31
+ print(f"Early access value ('{early_access}') is not compatible with early access version format '{nami_sdk_version}'")
32
+ sys.exit(1)
33
+ type_mods = "--prerelease"
34
+ else:
35
+ print(f"SDK version '{nami_sdk_version}' does not conform to version spec")
36
+ sys.exit(1)
37
+
38
+ # generate a shell command to create a release later
39
+ with open("gh-release-command.sh", "w") as f:
40
+ f.write(
41
+ f"gh release create --generate-notes --title v{nami_sdk_version} {type_mods} --target {git_long_hash} v{nami_sdk_version}"
42
+ )
43
+
44
+ # report our status
45
+ print(f"Identified Version: {nami_sdk_version}")
package/ios/Nami.m CHANGED
@@ -83,7 +83,7 @@ RCT_EXPORT_METHOD(configure: (NSDictionary *)configDict) {
83
83
  }
84
84
 
85
85
  // Start commands with header iformation for Nami to let them know this is a React client.
86
- NSMutableArray *namiCommandStrings = [NSMutableArray arrayWithArray:@[@"extendedClientInfo:react-native:2.0.0"]];
86
+ NSMutableArray *namiCommandStrings = [NSMutableArray arrayWithArray:@[@"extendedClientInfo:react-native:2.0.2"]];
87
87
 
88
88
  // Add additional namiCommands app may have sent in.
89
89
  NSObject *appCommandStrings = configDict[@"namiCommands"];
package/ios/Podfile CHANGED
@@ -8,7 +8,7 @@ source 'https://cdn.cocoapods.org/'
8
8
 
9
9
  target 'RNNami' do
10
10
  config = use_native_modules!
11
- pod 'Nami', '2.9.4'
11
+ pod 'Nami', '2.9.5'
12
12
 
13
13
  use_react_native!(
14
14
  :path => config[:reactNativePath],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-nami-sdk",
3
- "version": "2.0.1",
4
- "description": "React Native Module for Nami - The Smartest Way to Sell Subscriptions.",
3
+ "version": "2.0.2",
4
+ "description": "React Native Module for Nami - Easy subscriptions & in-app purchases, with powerful built-in paywalls and A/B testing.",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -20,12 +20,15 @@
20
20
  "paywall",
21
21
  "react-native",
22
22
  "storekit",
23
- "subscriptions"
23
+ "subscriptions",
24
+ "iap",
25
+ "play-billing",
26
+ "payments"
24
27
  ],
25
28
  "author": {
26
- "username": "namiml",
27
- "name": "Nami ML, Inc.",
28
- "email": "francisco.pena@namiml.com"
29
+ "username": "hellonami",
30
+ "name": "Nami ML Inc.",
31
+ "email": "hello@namiml.com"
29
32
  },
30
33
  "contributors": [
31
34
  {
@@ -51,7 +54,7 @@
51
54
  "type": "git",
52
55
  "url": "git+https://github.com/namiml/react-native-nami-sdk.git"
53
56
  },
54
- "homepage": "https://www.nami.ml",
57
+ "homepage": "https://www.namiml.com",
55
58
  "bugs": {
56
59
  "url": "https://github.com/namiml/react-native-nami-sdk/issues"
57
60
  }
@@ -8,7 +8,7 @@ Pod::Spec.new do |s|
8
8
  s.version = package['version']
9
9
  s.summary = package['description']
10
10
 
11
- s.author = { "Nami ML, Inc." => "info@namiml.com" }
11
+ s.author = { "Nami ML Inc." => "info@namiml.com" }
12
12
 
13
13
  s.homepage = package['homepage']
14
14
  s.license = package['license']
@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
18
18
  s.source_files = "ios/**/*.{h,m}"
19
19
  s.requires_arc = true
20
20
 
21
- s.dependency 'Nami', '2.9.4'
21
+ s.dependency 'Nami', '2.9.5'
22
22
  s.dependency 'React'
23
23
 
24
24
  end