Skip to content

Commit

Permalink
Release of React Native Themis (#908)
Browse files Browse the repository at this point in the history
* Adding React Native Themis (#902)

* added react-native support

* rename secureCell functions

* remove themis framework from source tree

* extremely new example for RNThemis

* added README.md for npm package

* Update src/wrappers/themis/react-native-themis/react-native-themis.podspec

Co-authored-by: vixentael <vixentael@users.noreply.github.com>

* Update src/wrappers/themis/react-native-themis/package.json

Co-authored-by: vixentael <vixentael@users.noreply.github.com>

* Update src/wrappers/themis/react-native-themis/android/src/main/java/com/reactnativethemis/ThemisModule.java

Co-authored-by: vixentael <vixentael@users.noreply.github.com>

Co-authored-by: vixentael <vixentael@users.noreply.github.com>

* update readme, mention themis rn (#903)

* update README and example to use 0.14.3 version from npm registry (#905)

* Improve handling of optional context for Secure Cell Token Protect and Seal (#906)

* update README and example to use 0.14.3 version from npm registry

* add typescript types

* optional context, declarations file

* update CHANGELOG

* Update CHANGELOG.md

Co-authored-by: Alexei Lozovsky <me@ilammy.net>

* Update CHANGELOG.md

Co-authored-by: vixentael <vixentael@users.noreply.github.com>

Co-authored-by: vixentael <vixentael@users.noreply.github.com>
Co-authored-by: Alexei Lozovsky <me@ilammy.net>
  • Loading branch information
3 people committed Apr 6, 2022
1 parent ed2d062 commit 2667a99
Show file tree
Hide file tree
Showing 92 changed files with 13,009 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ DerivedData/
.idea/
build
.gradle
src/wrappers/themis/react-native-themis/ios/themis.xcframework/*


# python rules
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@

Changes that are currently in development and have not been released yet.

## [0.14.4](https://github.com/cossacklabs/themis/releases/tag/0.14.4), March 15th 2022 / April 05th 2022

**React Native Support**

- Added React Native Themis with Typescript support ([#902], [#903], [#905], [#906]).

[`react-native-themis`](https://www.npmjs.com/package/react-native-themis) is now available on npm! 🎉

npm install react-native-themis

[Read more about React Native support](https://docs.cossacklabs.com/themis/languages/react-native/).

[#902]: https://github.com/cossacklabs/themis/pull/902
[#903]: https://github.com/cossacklabs/themis/pull/903
[#905]: https://github.com/cossacklabs/themis/pull/905
[#906]: https://github.com/cossacklabs/themis/pull/906

## [0.14.1](https://github.com/cossacklabs/themis/releases/tag/0.14.1), March 18th 2022

Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<a href="https://circleci.com/gh/cossacklabs/themis"><img src="https://circleci.com/gh/cossacklabs/themis/tree/master.svg?style=shield" alt="Circle CI"></a>
<a href="https://app.bitrise.io/app/69a1d5c9d42fa60f"><img src="https://app.bitrise.io/app/69a1d5c9d42fa60f/status.svg?token=Fp_06Ema5PgzBbZQyQy1bA&branch=master" alt="Bitrise"></a>
</p>
<h4 align="center">General purpose cryptographic library for storage and messaging for iOS (Swift, Obj-C), Android (Java, Kotlin), desktop Java, С/С++, Node.js, Python, Ruby, PHP, Go, Rust, WASM.</h4>
<h4 align="center">General purpose cryptographic library for storage and messaging for iOS (Swift, Obj-C), Android (Java, Kotlin), React Native (iOS, Android), desktop Java, С/С++, Node.js, Python, Ruby, PHP, Go, Rust, WASM.</h4>
<h4 align="center">Perfect fit for multi-platform apps. Hides cryptographic details. Made by cryptographers for developers 🧡</h4>


Expand Down Expand Up @@ -76,6 +76,7 @@ Themis is available for the following languages/platforms, refer to [language ho

| Platform | Documentation | Examples | Version |
| :----- | :----- | :------ | :--- |
| ⚛️ React Native (iOS, Android) | [React Native Howto](https://docs.cossacklabs.com/themis/languages/react-native/) | [docs/examples/react-native](https://github.com/cossacklabs/themis/tree/master/docs/examples/react-native) | [![npm](https://img.shields.io/npm/v/react-native-themis.svg)](https://www.npmjs.com/package/react-native-themis) |
| 🔶 Swift (iOS, macOS) | [Swift Howto](https://docs.cossacklabs.com/themis/languages/swift/) | [docs/examples/swift](https://github.com/cossacklabs/themis/tree/master/docs/examples/swift) | [![CocoaPods](https://img.shields.io/cocoapods/v/themis.svg)](https://cocoapods.org/pods/themis) |
| 📱 Objective-C (iOS, macOS) | [Objective-C Howto](https://docs.cossacklabs.com/themis/languages/objc/) | [docs/examples/objc](https://github.com/cossacklabs/themis/tree/master/docs/examples/objc)| [![CocoaPods](https://img.shields.io/cocoapods/v/themis.svg)](https://cocoapods.org/pods/themis) |
| ☕️ Java (Desktop) | [Java (Desktop) Howto](https://docs.cossacklabs.com/themis/languages/java/installation-desktop/) | [Java projects](https://github.com/cossacklabs/themis-java-examples) | |
Expand All @@ -98,9 +99,9 @@ Themis supports following CPU architectures: x86_64/i386, ARM, Apple Silicon (AR
We build and verify Themis on the latest stable OS versions:

- Debian (9, 10), CentOS (7, 8), Ubuntu (16.04, 18.04, 20.04)
- macOS (10.12–10.15, 11)
- Android (4–11)
- iOS (10–14)
- macOS (10.12–10.15, 11.*)
- Android (7–12)
- iOS (11–15)
- Windows (experimental MSYS2 support)

We plan to expand this list with a broader set of platforms.
Expand Down
6 changes: 6 additions & 0 deletions docs/examples/react-native/.buckconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

[android]
target = Google Inc.:Google APIs:23

[maven_repositories]
central = https://repo1.maven.org/maven2
4 changes: 4 additions & 0 deletions docs/examples/react-native/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: '@react-native-community',
};
65 changes: 65 additions & 0 deletions docs/examples/react-native/.flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[ignore]
; We fork some components by platform
.*/*[.]android.js

; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/

; Ignore polyfills
node_modules/react-native/Libraries/polyfills/.*

; Flow doesn't support platforms
.*/Libraries/Utilities/LoadingView.js

[untyped]
.*/node_modules/@react-native-community/cli/.*/.*

[include]

[libs]
node_modules/react-native/interface.js
node_modules/react-native/flow/

[options]
emoji=true

exact_by_default=true

format.bracket_spacing=false

module.file_ext=.js
module.file_ext=.json
module.file_ext=.ios.js

munge_underscores=true

module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState

[lints]
sketchy-null-number=warn
sketchy-null-mixed=warn
sketchy-number=warn
untyped-type-import=warn
nonstrict-import=warn
deprecated-type=warn
unsafe-getters-setters=warn
unnecessary-invariant=warn
signature-verification-failure=warn

[strict]
deprecated-type
nonstrict-import
sketchy-null
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import

[version]
^0.162.0
60 changes: 60 additions & 0 deletions docs/examples/react-native/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots

# Bundle artifact
*.jsbundle

# CocoaPods
/ios/Pods/
7 changes: 7 additions & 0 deletions docs/examples/react-native/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
bracketSpacing: false,
jsxBracketSameLine: true,
singleQuote: true,
trailingComma: 'all',
arrowParens: 'avoid',
};
1 change: 1 addition & 0 deletions docs/examples/react-native/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}

0 comments on commit 2667a99

Please sign in to comment.