mirror of
https://github.com/fluencelabs/aqua-ipfs
synced 2025-03-15 13:10:49 +00:00
Separate TS into aqua/typescript/target (#20)
This commit is contained in:
parent
b2068dd561
commit
30eccfed0f
5
.github/workflows/changelog_config.json
vendored
5
.github/workflows/changelog_config.json
vendored
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"template": "${{CHANGELOG}}\n\n${{UNCATEGORIZED}}",
|
"template": "## Changes since ${{FROM_TAG}}\n\n${{CHANGELOG}}\n\n${{UNCATEGORIZED}}",
|
||||||
"pr_template": "- #${{NUMBER}} ${{TITLE}}",
|
"pr_template": "- #${{NUMBER}} ${{TITLE}}",
|
||||||
"empty_template": "- no changes"
|
"empty_template": "## No changes since ${{FROM_TAG}}",
|
||||||
|
"sort": "DESC"
|
||||||
}
|
}
|
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
@ -65,7 +65,7 @@ jobs:
|
|||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
name: ipfs-adapter ${{ env.RELEASE_VERSION }}
|
name: aqua-ipfs ${{ env.RELEASE_VERSION }}
|
||||||
tag_name: ${{ env.RELEASE_VERSION }}
|
tag_name: ${{ env.RELEASE_VERSION }}
|
||||||
files: |
|
files: |
|
||||||
./service/ipfs-adapter.tar.gz
|
./service/ipfs-adapter.tar.gz
|
||||||
@ -84,15 +84,26 @@ jobs:
|
|||||||
ref: 'main'
|
ref: 'main'
|
||||||
token: ${{ secrets.PERSONAL_TOKEN }}
|
token: ${{ secrets.PERSONAL_TOKEN }}
|
||||||
|
|
||||||
### Publish to NPM registry
|
### Setup NodeJS registry
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: "14"
|
node-version: "14"
|
||||||
registry-url: "https://registry.npmjs.org"
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
|
||||||
- run: |
|
### Publish Aqua API
|
||||||
|
- name: Publish Aqua API to NPM
|
||||||
|
run: |
|
||||||
npm version ${{ env.RELEASE_VERSION }}
|
npm version ${{ env.RELEASE_VERSION }}
|
||||||
npm publish --access public
|
npm publish --access public
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
working-directory: ./aqua
|
working-directory: ./aqua
|
||||||
|
|
||||||
|
### Publish TS API
|
||||||
|
- name: Publish TS API to NPM
|
||||||
|
run: |
|
||||||
|
npm version ${{ env.RELEASE_VERSION }}
|
||||||
|
npm publish --access public
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
working-directory: ./aqua/target/typescript
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,6 +1,6 @@
|
|||||||
# Generated by Cargo
|
# Generated by Cargo
|
||||||
# will have compiled files and executables
|
# will have compiled files and executables
|
||||||
**/target/
|
service/**/target/
|
||||||
|
|
||||||
# These are backup files generated by rustfmt
|
# These are backup files generated by rustfmt
|
||||||
**/*.rs.bk
|
**/*.rs.bk
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
# Aqua API of IPFS-adapter
|
# Aqua API of IPFS-adapter
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
See [Aqua Book](https://fluence.dev/aqua-book/libraries/aqua-ipfs).
|
||||||
|
|
||||||
|
## API
|
||||||
Public API is defined in [ipfs-api.aqua](/aqua/ipfs-api.aqua).
|
Public API is defined in [ipfs-api.aqua](/aqua/ipfs-api.aqua).
|
||||||
|
|
||||||
ipfs-adapter service API is defined in [ipfs.aqua](/aqua/ipfs.aqua).
|
ipfs-adapter service API is defined in [ipfs.aqua](/aqua/ipfs.aqua).
|
||||||
|
|
||||||
## How to use Aqua API in TypeScript
|
## How to use Aqua API in TypeScript
|
||||||
There's a simple example in [../example](/example/index.ts)
|
There's a simple example in [example](/example/index.ts)
|
||||||
|
|
||||||
## How to update ipfs.aqua from ipfs_pure.wasm
|
## How to update ipfs.aqua from ipfs_pure.wasm
|
||||||
While in `aqua` directory, run `npm run generate-aqua`
|
While in `aqua` directory, run `npm run generate-aqua`
|
||||||
|
@ -2,49 +2,36 @@
|
|||||||
"name": "@fluencelabs/aqua-ipfs",
|
"name": "@fluencelabs/aqua-ipfs",
|
||||||
"version": "0.1.12",
|
"version": "0.1.12",
|
||||||
"description": "Aqua IPFS library",
|
"description": "Aqua IPFS library",
|
||||||
"main": "./typescript/dist/index.js",
|
|
||||||
"typings": "./typescript/dist/index.d.ts",
|
|
||||||
"files": [
|
"files": [
|
||||||
"ipfs.aqua",
|
"*.aqua"
|
||||||
"ipfs-api.aqua",
|
|
||||||
"typescript/dist/index.d.ts",
|
|
||||||
"typescript/dist/index.js",
|
|
||||||
"typescript/dist/ipfs-api.d.ts",
|
|
||||||
"typescript/dist/ipfs-api.js"
|
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fluencelabs/aqua-lib": "^0.1.10",
|
"@fluencelabs/aqua-lib": "^0.1.10"
|
||||||
"@fluencelabs/fluence": "^0.9.53",
|
|
||||||
"@fluencelabs/fluence-network-environment": "^1.0.10"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"generate-aqua": "../service/build.sh",
|
"generate-aqua": "../service/build.sh",
|
||||||
"compile-aqua": "aqua-cli -i . -o ./typescript",
|
"compile-aqua": "aqua-cli -i . -o ./target/typescript",
|
||||||
"prebuild": "npm run compile-aqua",
|
"build": "npm run compile-aqua",
|
||||||
"build": "tsc",
|
"prepare": "npm run build"
|
||||||
"prestart:local": "npm run build",
|
|
||||||
"start:local": "node typescript/dist/demo.js local",
|
|
||||||
"prestart:remote": "npm run build",
|
|
||||||
"start:remote": "node typescript/dist/demo.js testnet",
|
|
||||||
"start": "npm run start:remote",
|
|
||||||
"prepublish": "npm run build"
|
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/fluencelabs/ipfs-adapter"
|
"url": "git+https://github.com/fluencelabs/aqua-ipfs",
|
||||||
|
"directory": "aqua"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"aqua",
|
"aqua",
|
||||||
"fluence"
|
"fluence",
|
||||||
|
"ipfs",
|
||||||
|
"p2p"
|
||||||
],
|
],
|
||||||
"author": "Fluence Labs",
|
"author": "Fluence Labs",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/fluencelabs/ipfs-adapter/issues"
|
"url": "https://github.com/fluencelabs/aqua-ipfs/issues"
|
||||||
},
|
},
|
||||||
"homepage": "hhttps://github.com/fluencelabs/ipfs-adapter#readme",
|
"homepage": "https://github.com/fluencelabs/aqua-ipfs#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@fluencelabs/aqua-cli": "0.1.9-164",
|
"@fluencelabs/aqua-cli": "0.1.10-188"
|
||||||
"typescript": "^3.9.5"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
5
aqua/target/typescript/README.md
Normal file
5
aqua/target/typescript/README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Aqua IPFS bindings compiled to TypeScript
|
||||||
|
This is a compiled version of `@fluencelabs/aqua-ipfs`.
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
See [Aqua Book](https://fluence.dev/aqua-book/libraries/aqua-ipfs).
|
38
aqua/target/typescript/package.json
Normal file
38
aqua/target/typescript/package.json
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"name": "@fluencelabs/aqua-ipfs-ts",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"description": "Aqua IPFS library compiled to TS",
|
||||||
|
"main": "./dist/index.js",
|
||||||
|
"typings": "./dist/index.d.ts",
|
||||||
|
"files": [
|
||||||
|
"dist/index.d.ts",
|
||||||
|
"dist/index.js",
|
||||||
|
"dist/ipfs-api.d.ts",
|
||||||
|
"dist/ipfs-api.js"
|
||||||
|
],
|
||||||
|
"dependencies": {},
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsc",
|
||||||
|
"prepare": "npm run build"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/fluencelabs/aqua-ipfs",
|
||||||
|
"directory": "aqua/target/typescript"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"aqua",
|
||||||
|
"fluence",
|
||||||
|
"ipfs",
|
||||||
|
"p2p"
|
||||||
|
],
|
||||||
|
"author": "Fluence Labs",
|
||||||
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/fluencelabs/aqua-ipfs/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/fluencelabs/aqua-ipfs#readme",
|
||||||
|
"devDependencies": {
|
||||||
|
"typescript": "^3.9.5"
|
||||||
|
}
|
||||||
|
}
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { put, get_from, set_timeout } from '@fluencelabs/aqua-ipfs';
|
import { put, get_from, set_timeout } from '@fluencelabs/aqua-ipfs-ts';
|
||||||
import {createClient} from "@fluencelabs/fluence";
|
import {createClient} from "@fluencelabs/fluence";
|
||||||
import { Node, testNet} from "@fluencelabs/fluence-network-environment";
|
import { Node, testNet} from "@fluencelabs/fluence-network-environment";
|
||||||
|
|
||||||
|
4595
example/package-lock.json
generated
4595
example/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@
|
|||||||
"author": "Fluence Labs",
|
"author": "Fluence Labs",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fluencelabs/aqua-ipfs": "file:../aqua",
|
"@fluencelabs/aqua-ipfs-ts": "file:../aqua/target/typescript",
|
||||||
"@fluencelabs/fluence": "0.9.53",
|
"@fluencelabs/fluence": "0.9.53",
|
||||||
"ipfs-http-client": "^50.1.2",
|
"ipfs-http-client": "^50.1.2",
|
||||||
"it-all": "^1.0.5",
|
"it-all": "^1.0.5",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user