npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

textiot

v2.0.0

Published

A framework for building web and native (IoT) Dapps on the IPFS network

Downloads

106

Readme

textiot

A framework for building web and native (IoT) Dapps on the IPFS network.

An monorepo textiot.git was combined with https://github.com/textileio/go-textile and related git repos for easier development.

Usage

react-native

npm install textiot --save

For RN < 0.60, run react-native link textiot.

For RN < 0.60 or >= 0.60, then:

Android

Add below into android/settings.gradle

androidx not android:

include ':textile-pb'
project(':textile-pb').projectDir = new File(rootProject.projectDir, '../node_modules/textiot/android-textile/pb-androidx')
include ':textile-mobile'
project(':textile-mobile').projectDir = new File(rootProject.projectDir, '../node_modules/textiot/android-textile/mobile')
include ':android-textile'
project(':android-textile').projectDir = new File(rootProject.projectDir, '../node_modules/textiot/react-native-sdk/textile-androidx')

and cd node_modules/textiot; ./android2androidx.sh

android not androidx:

include ':textile-pb'
project(':textile-pb').projectDir = new File(rootProject.projectDir, '../node_modules/textiot/android-textile/pb-android')
include ':textile-mobile'
project(':textile-mobile').projectDir = new File(rootProject.projectDir, '../node_modules/textiot/android-textile/mobile')
include ':android-textile'
project(':android-textile').projectDir = new File(rootProject.projectDir, '../node_modules/textiot/react-native-sdk/textile-android')

and cd node_modules/textiot; ./androidx2android.sh

require('textiot/react-native-sdk').default;

Because can not npm publish full 300MB package, so you have to install tools described below and

cd node_modules/textiot/
./build-post-npm.sh

results:

go-textile/textile
go-textile/textile.exe
go-textile/textile-arm
android-textile/mobile
react-native-sdk/textile-androidx
react-native-sdk/textile-android

iOS

Because can not npm publish full 300MB package, so you have to install tools described below and

cd node_modules/textiot/
./build-mac.sh

results:

go-textile/textile-mac
go-textile/mobile/dist/ios/Mobile.framework/
go-textile/mobile/dist/ios/protos/

Add below (after pod 'Folly') into ios/Podfile

  pod 'Textile', :path => '../node_modules/textiot/ios-textile'
  pod 'TextileCore', :path => '../node_modules/textiot/go-textile/mobile/dist/ios'
cd ios
pod install

require('textiot/react-native-sdk').default;

web

npm install textiot --save

require('textiot/js-http-client').default;

Docs

textile

tour of Textile

Develop

Install tools

golang >= 1.14.15

go get golang.org/x/mobile/cmd/gomobile
export PATH=~/go/bin:$PATH
gomobile init

if unrecognized import path "golang.org/x/mobile/cmd/gomobile , then

mkdir -p ~/go
cd ~/go
mkdir -p src/github.com/golang
mkdir -p src/golang.org
cd src/golang.org
ln -s ../github.com/golang x
cd ~/go/src/github.com/golang
git clone https://github.com/golang/mobile
git clone https://github.com/golang/tools
git clone https://github.com/golang/mod
git clone https://github.com/golang/sys
git clone https://github.com/golang/xerrors
go get golang.org/x/mobile/cmd/gomobile
gomobile init

and also

export GO111MODULE=on
export GOPROXY=https://goproxy.io

android sdk

android ndk r20

nodejs <=10.15.3

With go-textile/release/@textile/js-types/dist/index.d.ts generated by ./node_modules/protobufjs/bin/pbts running in nodejs 12.13.0 , will cause error in npm run build of react-native-sdk .

protoc --version to match change com.google.protobuf:protobuf-java:3.6.1

on Linux

sudo apt install protobuf-compiler

on macOS

brew install protobuf

to install protoc, and

protoc --version

to get its version e.g. 3.12.4.

Then need change com.google.protobuf:protobuf-java:3.6.1 to com.google.protobuf:protobuf-java:3.12.4 in go-textile/release/PBProject/pb/build.gradle, otherwise will cause error: cannot find symbol UnusedPrivateParameter when ./gradlew pb:build in go-textile/release/PBProject/, just as sed in ./build-post-npm.sh.

Then need change com.google.protobuf:protobuf-java:3.6.1 to com.google.protobuf:protobuf-java:3.12.4 in android-textile/textile/build.gradle and android/build.gradle, just as sed in ./build-post-npm.sh, otherwise the APP will crash E AndroidRuntime: java.lang.NoSuchMethodError: No static method internalBuildGeneratedFileFrom([Ljava/lang/String;[Lcom/google/protobuf/Descriptors$FileDescriptor;)Lcom/google/protobuf/Descriptors$FileDescriptor; in class Lcom/google/protobuf/Descriptors$FileDescriptor; or its super classes when run into list.toByteArray() of final Model.ThreadList list in textiot/react-native-sdk/android/src/main/java/io/textile/rnmobile/ThreadsBridge.java.

All will be built by build.sh on Linux except mobile/dist/ios/protos and mobile/dist/ios/Mobile.framework/ by build-mac.sh on macOS. Similarly, if protoc --version return 3.13.0 on macOS, then need change s.dependency 'Protobuf', '~> 3.7' to s.dependency 'Protobuf', '3.13.0' in ios-textile/Textile.podspec and go-textile/mobile/dist/ios/TextileCore.podspec, just as sed in ./build-mac.sh.

protoc-gen-go 7e65e51

If you modify go-textile/pb/protos/*.proto, then you also need regenerate go-textile/pb/*.pb.go by an exact version of protoc-gen-go which match protoc 3.x (or protoc-gen-go@7e65e51 described below)

go get -d -u github.com/golang/protobuf/protoc-gen-go
cd ~/go/src/github.com/golang/protobuf/protoc-gen-go
git checkout 7e65e51
go build
mv protoc-gen-go ~/go/bin/

or just

go install github.com/golang/protobuf/protoc-gen-go@7e65e51

regenerate:

cd go-textile
make protos

google.golang.org/protobuf v1.26.1-0.20210525005349-febffdd88e85

There is exact 1.26-dev version

google.golang.org/protobuf v1.26.1-0.20210525005349-febffdd88e85

in go.mod, if miss it or even a bigger version e.g.

google.golang.org/protobuf v1.27.0

will cause panic: proto: file "message.proto" is already registered when run ./textile, ref to proto: file is already registered with different packages and reflect/protoregistry: restore conflicting file names check.

Maybe can use protoc-gen-go with the same version with go.mod, because the key to resolve the panic is should only about go.mod not about the protoc-gen-go, and I validate the result of protoc is same between protoc-gen-go@7e65e51 above and protoc-gen-go@febffdd below.

go install google.golang.org/protobuf/cmd/protoc-gen-go@febffdd

If can't install above for network reason, install below is also ok

cd ~/go/pkg/mod/google.golang.org/[email protected]/cmd/protoc-gen-go/
go build -o ~/go/bin

regenerate:

cd go-textile
make protos

suod apt install mingw-w64 gcc-arm-linux-gnueabihf

Xcode on macOS

Build on Linux

./build.sh

results:

go-textile/textile
go-textile/textile.exe
go-textile/textile-arm
android-textile/pb-androidx
android-textile/pb-android
android-textile/mobile
react-native-sdk/textile-androidx
react-native-sdk/textile-android
react-native-sdk/dist/index.js

Build on macOS

./build-mac.sh

results:

go-textile/textile-mac
go-textile/mobile/dist/ios/Mobile.framework/
go-textile/mobile/dist/ios/protos/

Build on macOS

./build-web.sh

results:

js-http-client/dist/index.js

Changelog

[email protected]

go-ipfs v0.8.0

And no ipfs repo migration from 0.4.22 to 0.8.0 support here, so you need migrate with ipfs official migration tool by yourself if you want.

[email protected]

go-ipfs v0.4.22-0.20191002225611-b15edf287df6