Compare commits
3 Commits
68283d14e5
...
dd43e29b29
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | dd43e29b29 | |
Derrick Hammer | 051f4b2da7 | |
Derrick Hammer | 50a7c80358 |
|
@ -1,70 +0,0 @@
|
|||
version: 2.1
|
||||
|
||||
orbs:
|
||||
node: circleci/node@5.1.0
|
||||
ssh: credijusto/ssh@0.5.2
|
||||
workflows:
|
||||
release:
|
||||
jobs:
|
||||
- node/run:
|
||||
name: build
|
||||
npm-run: build
|
||||
pre-steps:
|
||||
- run:
|
||||
name: Setup Golang
|
||||
command: >
|
||||
sudo apt-get update;
|
||||
sudo apt-get install bison;
|
||||
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer);
|
||||
source ~/.gvm/scripts/gvm;
|
||||
gvm install go1.4 -B;
|
||||
gvm use go1.4 --default;
|
||||
gvm install go1.19 -B;
|
||||
VERSION=0.28.1;
|
||||
TINYGO="tinygo_${VERSION}_amd64.deb";
|
||||
wget https://github.com/tinygo-org/tinygo/releases/download/v$VERSION/$TINYGO;
|
||||
sudo dpkg -i $TINYGO && rm $TINYGO;
|
||||
setup:
|
||||
- run:
|
||||
name: Fetch Wasm Deps
|
||||
command: >
|
||||
source ~/.gvm/scripts/gvm;
|
||||
gvm use go1.19 --default;
|
||||
cd src/golang;
|
||||
go get;
|
||||
|
||||
|
||||
post-steps:
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
- lib/
|
||||
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- /^develop-.*$/
|
||||
- node/run:
|
||||
name: release
|
||||
npm-run: semantic-release
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- /^develop-.*$/
|
||||
|
||||
context:
|
||||
- publish
|
||||
setup:
|
||||
- attach_workspace:
|
||||
at: ./
|
||||
- add_ssh_keys:
|
||||
fingerprints:
|
||||
- "47:cf:a1:17:d9:81:8e:c5:51:e5:53:c8:33:e4:33:b9"
|
||||
- ssh/ssh-add-host:
|
||||
host_url: GITEA_HOST
|
|
@ -1,22 +1,6 @@
|
|||
{
|
||||
"preset": [
|
||||
"presetter-preset-essentials",
|
||||
"presetter-preset-hybrid"
|
||||
],
|
||||
"config": {
|
||||
"tsconfig": {
|
||||
"compilerOptions": {
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"dom"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": {
|
||||
"singleQuote": false
|
||||
}
|
||||
},
|
||||
"variable": {
|
||||
"source": "src"
|
||||
}
|
||||
"presetter-preset-hybrid",
|
||||
"@lumeweb/node-library-preset"
|
||||
]
|
||||
}
|
||||
|
|
32
.releaserc
32
.releaserc
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
"plugins": [
|
||||
"@semantic-release/commit-analyzer",
|
||||
"@semantic-release/release-notes-generator",
|
||||
[
|
||||
"@semantic-release/changelog",
|
||||
{
|
||||
"changelogFile": "docs/CHANGELOG.md"
|
||||
}
|
||||
],
|
||||
"@semantic-release/npm",
|
||||
"@semantic-release/git",
|
||||
{
|
||||
"assets": [
|
||||
"package.json",
|
||||
"docs/CHANGELOG.md",
|
||||
"npm-shrinkwrap.json"
|
||||
]
|
||||
}
|
||||
],
|
||||
"branches": [
|
||||
"master",
|
||||
{
|
||||
name: "develop",
|
||||
prerelease: true
|
||||
},
|
||||
{
|
||||
name: "develop-*",
|
||||
prerelease: true
|
||||
},
|
||||
]
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -16,14 +16,15 @@
|
|||
"./package.json": "./package.json"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lumeweb/node-library-preset": "https://git.lumeweb.com/LumeWeb/node-library-preset/archive/v0.1.1-develop.13.tar.gz",
|
||||
"@semantic-release/changelog": "^6.0.3",
|
||||
"@semantic-release/commit-analyzer": "^10.0.1",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"@semantic-release/npm": "^10.0.4",
|
||||
"@semantic-release/release-notes-generator": "^11.0.3",
|
||||
"presetter": "^3.5.5",
|
||||
"presetter-preset-essentials": "^3.5.5",
|
||||
"presetter-preset-hybrid": "^3.5.5",
|
||||
"presetter": "^4.0.1",
|
||||
"presetter-preset-hybrid": "4.0.1",
|
||||
"presetter-preset-strict": "^4.0.1",
|
||||
"semantic-release": "^21.0.5"
|
||||
},
|
||||
"readme": "ERROR: No README data found!",
|
||||
|
|
|
@ -13,14 +13,14 @@ var activeReader *reader
|
|||
var pipe chan []byte
|
||||
var callbackId int
|
||||
var nextBytes chan int
|
||||
var exitChan chan bool
|
||||
var killChan chan bool
|
||||
|
||||
func main() {
|
||||
pipe = make(chan []byte)
|
||||
nextBytes = make(chan int)
|
||||
exitChan = make(chan bool)
|
||||
killChan = make(chan bool)
|
||||
callbackId = rand.Int()
|
||||
<-exitChan
|
||||
<-killChan
|
||||
}
|
||||
|
||||
type reader struct {
|
||||
|
@ -89,9 +89,9 @@ func start() int {
|
|||
return callbackId
|
||||
}
|
||||
|
||||
//export exit
|
||||
func exit() {
|
||||
exitChan <- true
|
||||
//export kill
|
||||
func kill() {
|
||||
killChan <- true
|
||||
}
|
||||
|
||||
func createWritePromiseHandler() js.Value {
|
||||
|
|
|
@ -31,7 +31,7 @@ export async function getVerifiableStream(
|
|||
|
||||
// @ts-ignore
|
||||
const exit = () => {
|
||||
callExports("exit");
|
||||
callExports("kill");
|
||||
cleanup();
|
||||
};
|
||||
|
||||
|
@ -83,16 +83,24 @@ export async function getVerifiableStream(
|
|||
if (chunk.done || wasmDone) {
|
||||
if (wasmDone) {
|
||||
if (result) {
|
||||
controller.enqueue(chunk.value);
|
||||
done(controller);
|
||||
} else {
|
||||
controller.error(getWasmProperty(wasmId, "error"));
|
||||
exit();
|
||||
}
|
||||
} else {
|
||||
if (!wasmDone) {
|
||||
controller.error("stream is ended but verification not complete");
|
||||
exit();
|
||||
return;
|
||||
}
|
||||
controller.enqueue(chunk.value);
|
||||
done(controller);
|
||||
}
|
||||
} else {
|
||||
controller.enqueue(chunk.value);
|
||||
}
|
||||
|
||||
controller.enqueue(chunk.value);
|
||||
},
|
||||
async cancel(reason: any) {
|
||||
await reader.cancel(reason);
|
||||
|
|
Loading…
Reference in New Issue