Skip to content

Commit db26476

Browse files
committed
update to hdk 2.2
1 parent d501940 commit db26476

File tree

5 files changed

+25
-31
lines changed

5 files changed

+25
-31
lines changed

package.json

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "file-share-dev",
33
"version": "0.1.0",
44
"config": {
5-
"hc_version": "0.2.1",
5+
"hc_version": "0.2.2",
66
"zits_version": "1.9.0",
77
"bin": "bin"
88
},
@@ -33,36 +33,31 @@
3333
"dev:components" : "npm run build:watch -w webcomponents",
3434

3535

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

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

43-
"start:save" : "echo $HC_APP_PORT > .hc_app_$INDEX && echo $HC_ADMIN_PORT > .hc_admin_$INDEX",
44-
45-
"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\"",
46-
"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\"",
47-
"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\"",
48-
"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\"",
49-
"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\"",
50-
"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",
51-
"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",
52-
"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",
41+
"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\"",
42+
"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\"",
43+
"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\"",
44+
"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\"",
45+
"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",
46+
"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",
47+
"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",
5348

5449
"serve:run" : "hc run-local-services --bootstrap-port $BOOT_PORT --signal-port $SIGNAL_PORT",
5550
"serve:save" : "echo SIGNAL_PORT=$SIGNAL_PORT && echo $SIGNAL_PORT > .hc_signalenv && echo $BOOT_PORT > .hc_bootenv && echo BOOT_PORT=$BOOT_PORT",
5651
"serve" : "cross-env BOOT_PORT=$(cat .hc_bootenv) SIGNAL_PORT=$(cat .hc_signalenv) npm run serve:run",
57-
"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\"",
58-
"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\"",
52+
"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\"",
53+
"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\"",
5954
"network:we" : "npm run clean:hc & npm run network:local2 -w we-applet",
6055

61-
"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",
62-
"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\"",
63-
"local0" : "cross-env INDEX=0 npm run local",
64-
"local1" : "cross-env INDEX=1 npm run local",
65-
"local2" : "cross-env INDEX=2 npm run local",
56+
"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",
57+
"_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\"",
58+
"local0" : "cross-env INDEX=0 npm run _local",
59+
"local1" : "cross-env INDEX=1 npm run _local",
60+
"local2" : "cross-env INDEX=2 npm run _local",
6661

6762
"launch" : "echo pass | hc-launch --piped -n 1 artifacts/file_share.webhapp network mem",
6863
"launch:we" : "echo pass | hc-launch --piped -n 1 artifacts/file_share-we_applet.webhapp network mem",
@@ -92,10 +87,11 @@
9287
"typescript": "^4.9.5"
9388
},
9489
"dependencies": {
95-
"@ddd-qc/cell-proxy": "=0.19.8",
96-
"@ddd-qc/lit-happ": "=0.19.8",
97-
"@ddd-qc/path-explorer": "0.1.6",
98-
"@holochain/client": "=0.14.1",
90+
"@ddd-qc/cell-proxy": "=0.19.11",
91+
"@ddd-qc/lit-happ": "=0.19.11",
92+
"@ddd-qc/path-explorer": "=0.2.0",
93+
"@lightningrodlabs/we-applet": "0.8.0",
94+
"@holochain/client": "=0.16.1",
9995
"@holochain-open-dev/core-types": "0.6.3",
10096
"@lit-labs/context": "^0.2.0",
10197
"lit": "2.6.0"

we-applet/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"typescript": "^4.9.0"
3737
},
3838
"dependencies": {
39-
"@lightningrodlabs/we-applet": "0.6.1",
4039
"@file-share/app": "file:../webapp",
4140
"@mdi/js": "^7.2.0"
4241
}

webapp/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@
3737
},
3838
"dependencies": {
3939
"@holochain-open-dev/core-types": "0.6.3",
40-
"@holochain-open-dev/profiles": "^0.14.0",
41-
"@lightningrodlabs/we-applet": "0.6.1",
40+
"@holochain-open-dev/profiles": "^0.16.1",
4241
"@file-share/elements": "file:../webcomponents"
4342
}
4443
}

webapp/src/file-share-app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export class FileShareApp extends HappElement {
147147
console.log("hvmConstructed()", this._adminWs, this._canAuthorizeZfns)
148148
/** Authorize all zome calls */
149149
if (!this._adminWs && this._canAuthorizeZfns) {
150-
this._adminWs = await AdminWebsocket.connect(`ws://localhost:${HC_ADMIN_PORT}`);
150+
this._adminWs = await AdminWebsocket.connect(new URL(`ws://localhost:${HC_ADMIN_PORT}`));
151151
console.log("hvmConstructed() connect() called", this._adminWs);
152152
}
153153
if (this._adminWs && this._canAuthorizeZfns) {

webcomponents/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"watch-cli": "^0.2.3"
2121
},
2222
"dependencies": {
23-
"@lightningrodlabs/we-applet": "0.6.1",
23+
"@lightningrodlabs/we-applet": "0.8.0",
2424
"js-base64": "^3.7.3",
2525
"@msgpack/msgpack": "^2.7.2",
2626
"@shoelace-style/shoelace": "^2.4.0",

0 commit comments

Comments
 (0)