Skip to content

Commit

Permalink
update to hdk 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ddd-mtl committed Sep 22, 2023
1 parent d501940 commit db26476
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 31 deletions.
48 changes: 22 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "file-share-dev",
"version": "0.1.0",
"config": {
"hc_version": "0.2.1",
"hc_version": "0.2.2",
"zits_version": "1.9.0",
"bin": "bin"
},
Expand Down Expand Up @@ -33,36 +33,31 @@
"dev:components" : "npm run build:watch -w webcomponents",


"devtest" : "npm run build:devtest && concurrently \"npm run build:watch -w webcomponents\" \"npm run build:watch -w webapp\" \"npm run start\"",
"devtest" : "npm run build:devtest && concurrently \"npm run build:watch -w webcomponents\" \"npm run build:watch -w webapp\" \"npm run start:mem\"",
"devtest:we" : "npm run build:devtest:we && npm run devtest -w we-applet",

"network" : "npm run build:happ && concurrently-repeat \"npm run start:proxied\"",
"network-playground" : "npm run build:happ && concurrently-repeat \"npm run start:playground\"",
"network-mem" : "npm run build:happ && concurrently-repeat \"npm run start\"",
"_save-ports" : "echo $HC_APP_PORT > .hc_app_$INDEX && echo $HC_ADMIN_PORT > .hc_admin_$INDEX",

"start:save" : "echo $HC_APP_PORT > .hc_app_$INDEX && echo $HC_ADMIN_PORT > .hc_admin_$INDEX",

"prodtest" : "npm run dist -w webapp && cross-env HC_APP_PORT=$(port) HC_ADMIN_PORT=$(port) concurrently \"npm run dev:components\" \"npm run start:happ\" \"sleep 7 && npm run start:ui -w webapp\"",
"start" : "cross-env HC_APP_PORT=$(port) HC_ADMIN_PORT=$(port) BUILD_MODE='dev' ADD_PROFILES=1 concurrently \"npm run dev:components\" \"npm run start:happ\" \"sleep 7 && npm run start:ui -w webapp\"",
"start:local" : "echo START:LOCAL $INDEX & cross-env HC_APP_PORT=$(port) HC_ADMIN_PORT=$(port) BUILD_MODE='dev' ADD_PROFILES=1 concurrently \"npm run start:save\" \"npm run dev:components\" \"npm run start:happ:local\" \"sleep 7 && npm run start:ui -w webapp\"",
"start:proxied" : "cross-env HC_APP_PORT=$(port) HC_ADMIN_PORT=$(port) BUILD_MODE='dev' concurrently \"npm run dev:components\" \"npm run start:happ:proxied\" \"sleep 7 && npm run start:ui -w webapp\"",
"start:playground" : "cross-env HC_APP_PORT=$(port) HC_ADMIN_PORT=$(port) BUILD_MODE='dev' concurrently \"npm run playground\" \"npm run dev:components\" \"npm run start:happ\" \"sleep 7 && npm run start:ui -w webapp\"",
"start:happ" : "RUST_LOG=warn WASM_LOG=warn echo \"pass\" | $npm_package_config_bin/hc s --piped -f=$HC_ADMIN_PORT generate artifacts/file_share_dev.happ -a FileShareDev --run=$HC_APP_PORT network mem",
"start:happ:proxied" : "RUST_LOG=warn WASM_LOG=warn echo \"pass\" | $npm_package_config_bin/hc s --piped -f=$HC_ADMIN_PORT generate artifacts/file_share_dev.happ --run=$HC_APP_PORT -a FileShareDev network --bootstrap https://bootstrap.holo.host/ webrtc wss://signal.holo.host",
"start:happ:local" : "RUST_LOG=warn WASM_LOG=warn echo \"pass\" | $npm_package_config_bin/hc s --piped -f=$HC_ADMIN_PORT generate artifacts/file_share_dev.happ --run=$HC_APP_PORT -a FileShareDev network --bootstrap http://127.0.0.1:$BOOT_PORT webrtc ws://127.0.0.1:$SIGNAL_PORT",
"prodtest" : "npm run dist -w webapp && cross-env HC_APP_PORT=$(port) HC_ADMIN_PORT=$(port) concurrently \"npm run dev:components\" \"npm run new-sandbox:mem\" \"sleep 7 && npm run start:ui -w webapp\"",
"start:mem" : "cross-env HC_APP_PORT=$(port) HC_ADMIN_PORT=$(port) BUILD_MODE='dev' ADD_PROFILES=1 concurrently \"npm run dev:components\" \"npm run new-sandbox:mem\" \"sleep 7 && npm run start:ui -w webapp\"",
"start:local" : "echo START:LOCAL $INDEX & cross-env HC_APP_PORT=$(port) HC_ADMIN_PORT=$(port) BUILD_MODE='dev' ADD_PROFILES=1 concurrently \"npm run _save-ports\" \"npm run dev:components\" \"npm run new-sandbox:local\" \"sleep 7 && npm run start:ui -w webapp\"",
"start:public" : "cross-env HC_APP_PORT=$(port) HC_ADMIN_PORT=$(port) BUILD_MODE='dev' concurrently \"npm run dev:components\" \"npm run new-sandbox:public\" \"sleep 7 && npm run start:ui -w webapp\"",
"new-sandbox:mem" : "RUST_LOG=warn WASM_LOG=warn echo \"pass\" | $npm_package_config_bin/hc s --piped -f=$HC_ADMIN_PORT generate artifacts/file_share_dev.happ -a FileShareDev --run=$HC_APP_PORT network mem",
"new-sandbox:public" : "RUST_LOG=warn WASM_LOG=warn echo \"pass\" | $npm_package_config_bin/hc s --piped -f=$HC_ADMIN_PORT generate artifacts/file_share_dev.happ --run=$HC_APP_PORT -a FileShareDev network --bootstrap https://bootstrap.holo.host/ webrtc wss://signal.holo.host",
"new-sandbox:local" : "RUST_LOG=warn WASM_LOG=warn echo \"pass\" | $npm_package_config_bin/hc s --piped -f=$HC_ADMIN_PORT generate artifacts/file_share_dev.happ --run=$HC_APP_PORT -a FileShareDev network --bootstrap http://127.0.0.1:$BOOT_PORT webrtc ws://127.0.0.1:$SIGNAL_PORT",

"serve:run" : "hc run-local-services --bootstrap-port $BOOT_PORT --signal-port $SIGNAL_PORT",
"serve:save" : "echo SIGNAL_PORT=$SIGNAL_PORT && echo $SIGNAL_PORT > .hc_signalenv && echo $BOOT_PORT > .hc_bootenv && echo BOOT_PORT=$BOOT_PORT",
"serve" : "cross-env BOOT_PORT=$(cat .hc_bootenv) SIGNAL_PORT=$(cat .hc_signalenv) npm run serve:run",
"network:local2" : "npm run clean:hc & npm run build:devtest && cross-env BOOT_PORT=$(port) SIGNAL_PORT=$(port) concurrently \"npm run serve:save\" \"npm run serve:run\" \"cross-env INDEX=0 npm run start:local\" \"sleep 1 && cross-env INDEX=1 npm run start:local\"",
"network:local3" : "npm run clean:hc & npm run build:devtest && cross-env BOOT_PORT=$(port) SIGNAL_PORT=$(port) concurrently \"npm run serve:save\" \"npm run serve:run\" \"cross-env INDEX=0 npm run start:local\" \"sleep 1 && cross-env INDEX=1 npm run start:local\" \"sleep 2 && cross-env INDEX=2 npm run start:local\"",
"network2" : "npm run clean:hc & npm run build:devtest && cross-env BOOT_PORT=$(port) SIGNAL_PORT=$(port) concurrently \"npm run serve:save\" \"npm run serve:run\" \"cross-env INDEX=0 npm run new-sandbox:local\" \"sleep 1 && cross-env INDEX=1 npm run new-sandbox:local\"",
"network3" : "npm run clean:hc & npm run build:devtest && cross-env BOOT_PORT=$(port) SIGNAL_PORT=$(port) concurrently \"npm run serve:save\" \"npm run serve:run\" \"cross-env INDEX=0 npm run new-sandbox:local\" \"sleep 1 && cross-env INDEX=1 npm run new-sandbox:local\" \"sleep 2 && cross-env INDEX=2 npm run new-sandbox:local\"",
"network:we" : "npm run clean:hc & npm run network:local2 -w we-applet",

"happ:local" : "echo INDEX: $INDEX & echo PORTS: $BOOT_PORT $SIGNAL_PORT $HC_APP_PORT $HC_ADMIN_PORT & RUST_LOG=warn WASM_LOG=warn echo \"pass\" | $npm_package_config_bin/hc s --piped -f=$HC_ADMIN_PORT run $INDEX",
"local" : "cross-env BOOT_PORT=$(cat .hc_bootenv) SIGNAL_PORT=$(cat .hc_signalenv) HC_APP_PORT=$(cat .hc_app_$INDEX) HC_ADMIN_PORT=$(cat .hc_admin_$INDEX) BUILD_MODE='dev' ADD_PROFILES=1 concurrently \"npm run happ:local\" \"sleep 7 && npm run start:ui-only -w webapp\"",
"local0" : "cross-env INDEX=0 npm run local",
"local1" : "cross-env INDEX=1 npm run local",
"local2" : "cross-env INDEX=2 npm run local",
"local:sandbox" : "echo INDEX: $INDEX & echo PORTS: $BOOT_PORT $SIGNAL_PORT $HC_APP_PORT $HC_ADMIN_PORT & RUST_LOG=warn WASM_LOG=warn echo \"pass\" | $npm_package_config_bin/hc s --piped -f=$HC_ADMIN_PORT run $INDEX",
"_local" : "cross-env BOOT_PORT=$(cat .hc_bootenv) SIGNAL_PORT=$(cat .hc_signalenv) HC_APP_PORT=$(cat .hc_app_$INDEX) HC_ADMIN_PORT=$(cat .hc_admin_$INDEX) BUILD_MODE='dev' ADD_PROFILES=1 concurrently \"npm run local:sandbox\" \"sleep 7 && npm run start:ui-only -w webapp\"",
"local0" : "cross-env INDEX=0 npm run _local",
"local1" : "cross-env INDEX=1 npm run _local",
"local2" : "cross-env INDEX=2 npm run _local",

"launch" : "echo pass | hc-launch --piped -n 1 artifacts/file_share.webhapp network mem",
"launch:we" : "echo pass | hc-launch --piped -n 1 artifacts/file_share-we_applet.webhapp network mem",
Expand Down Expand Up @@ -92,10 +87,11 @@
"typescript": "^4.9.5"
},
"dependencies": {
"@ddd-qc/cell-proxy": "=0.19.8",
"@ddd-qc/lit-happ": "=0.19.8",
"@ddd-qc/path-explorer": "0.1.6",
"@holochain/client": "=0.14.1",
"@ddd-qc/cell-proxy": "=0.19.11",
"@ddd-qc/lit-happ": "=0.19.11",
"@ddd-qc/path-explorer": "=0.2.0",
"@lightningrodlabs/we-applet": "0.8.0",
"@holochain/client": "=0.16.1",
"@holochain-open-dev/core-types": "0.6.3",
"@lit-labs/context": "^0.2.0",
"lit": "2.6.0"
Expand Down
1 change: 0 additions & 1 deletion we-applet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"typescript": "^4.9.0"
},
"dependencies": {
"@lightningrodlabs/we-applet": "0.6.1",
"@file-share/app": "file:../webapp",
"@mdi/js": "^7.2.0"
}
Expand Down
3 changes: 1 addition & 2 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
},
"dependencies": {
"@holochain-open-dev/core-types": "0.6.3",
"@holochain-open-dev/profiles": "^0.14.0",
"@lightningrodlabs/we-applet": "0.6.1",
"@holochain-open-dev/profiles": "^0.16.1",
"@file-share/elements": "file:../webcomponents"
}
}
2 changes: 1 addition & 1 deletion webapp/src/file-share-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class FileShareApp extends HappElement {
console.log("hvmConstructed()", this._adminWs, this._canAuthorizeZfns)
/** Authorize all zome calls */
if (!this._adminWs && this._canAuthorizeZfns) {
this._adminWs = await AdminWebsocket.connect(`ws://localhost:${HC_ADMIN_PORT}`);
this._adminWs = await AdminWebsocket.connect(new URL(`ws://localhost:${HC_ADMIN_PORT}`));
console.log("hvmConstructed() connect() called", this._adminWs);
}
if (this._adminWs && this._canAuthorizeZfns) {
Expand Down
2 changes: 1 addition & 1 deletion webcomponents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"watch-cli": "^0.2.3"
},
"dependencies": {
"@lightningrodlabs/we-applet": "0.6.1",
"@lightningrodlabs/we-applet": "0.8.0",
"js-base64": "^3.7.3",
"@msgpack/msgpack": "^2.7.2",
"@shoelace-style/shoelace": "^2.4.0",
Expand Down

0 comments on commit db26476

Please sign in to comment.