Skip to content

Commit 914026e

Browse files
committed
hdk 0.6.0
1 parent a2f8cb6 commit 914026e

File tree

7 files changed

+46
-47
lines changed

7 files changed

+46
-47
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ ill_formed_attribute_input = "allow"
3131
[workspace.dependencies]
3232
serde = { version = "=1.0.219", default-features = false }
3333
holochain_serialized_bytes = "=0.0.56"
34-
hdi = { version = "=0.7.0-rc.0", default-features = false }
35-
hdk = { version = "=0.6.0-rc.0", default-features = false }
34+
hdi = { version = "=0.7.0", default-features = false }
35+
hdk = { version = "=0.6.0", default-features = false }
3636

3737
zome_utils = { git = "https://github.com/ddd-mtl/zdk", branch = "main-0.6" }
3838
zome_path = { git = "https://github.com/ddd-mtl/zdk", branch = "main-0.6" }
@@ -43,8 +43,8 @@ hc_zome_profiles_coordinator = {git = "https://github.com/ddd-mtl/zdk", branch =
4343

4444
delivery = {git = "https://github.com/ddd-mtl/delivery-zome", branch = "hdk-6.0" }
4545
zome_delivery_integrity = {git = "https://github.com/ddd-mtl/delivery-zome", branch = "hdk-6.0" }
46-
zome_delivery_types = {git = "https://github.com/ddd-mtl/delivery-zome", package = "zome_delivery_types", branch = "hdk-6.0" }
47-
zome_delivery_api = {git = "https://github.com/ddd-mtl/delivery-zome", package = "zome_delivery_api", branch = "hdk-6.0" }
46+
zome_delivery_types = {git = "https://github.com/ddd-mtl/delivery-zome", branch = "hdk-6.0" }
47+
zome_delivery_api = {git = "https://github.com/ddd-mtl/delivery-zome", branch = "hdk-6.0" }
4848

4949

5050
[profile.dev]

dna/zomes/files/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ mod respond_to_file_notice;
1212
mod send_file;
1313
mod utils;
1414
mod write_file_chunk;
15+
16+
extern crate zome_core;

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
},
9595
"devDependencies": {
9696
"@ddd-qc/hc-prebuilt": "0.506.2",
97-
"@theweave/cli": "=0.15.2",
97+
"@theweave/cli": "=0.15.3",
9898
"@types/jest": "^29.5.1",
9999
"@types/ws": "^8.5.3",
100100
"bestzip": "^2.2.0",
@@ -107,17 +107,17 @@
107107
"typescript": "~5.2.0"
108108
},
109109
"dependencies": {
110-
"@holochain/client": "^0.20.0-dev.2",
110+
"@holochain/client": "^0.20.0",
111111
"@holochain-open-dev/core-types": "0.600.0-dev.2",
112112
"@holochain-open-dev/profiles": "0.600.0-dev.2",
113113
"@holochain-open-dev/elements": "0.600.0-dev.0",
114114
"@theweave/api": "=0.6.0",
115-
"@ddd-qc/cell-proxy": "=0.33.2",
116-
"@ddd-qc/lit-happ": "=0.33.2",
117-
"@ddd-qc/profiles-dvm": "=0.33.2",
118-
"@ddd-qc/we-utils": "=0.33.2",
119-
"@ddd-qc/path-explorer": "=1.33.2",
120-
"@ddd-qc/delivery": "=0.20.1",
115+
"@ddd-qc/cell-proxy": "=0.33.4",
116+
"@ddd-qc/lit-happ": "=0.33.4",
117+
"@ddd-qc/profiles-dvm": "=0.33.4",
118+
"@ddd-qc/we-utils": "=0.33.4",
119+
"@ddd-qc/path-explorer": "=1.33.4",
120+
"@ddd-qc/delivery": "=0.20.2",
121121
"@shoelace-style/shoelace": "2.11.2",
122122
"@lit/context": "1.0.1",
123123
"@lit/localize": "0.12.1",

webapp/src/files-app.ts

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
import {html, css} from "lit";
2-
import {state, customElement} from "lit/decorators.js";
3-
import {ContextProvider} from "@lit/context";
1+
import {css, html} from "lit";
2+
import {customElement, state} from "lit/decorators.js";
3+
import {ContextProvider, createContext} from "@lit/context";
4+
import {AdminWebsocket, AppWebsocket, InstalledAppId, ZomeName} from "@holochain/client";
45
import {
5-
AdminWebsocket,
6-
AppWebsocket,
7-
InstalledAppId,
8-
ZomeName
9-
} from "@holochain/client";
10-
import {
11-
HvmDef, HappElement, HCL,
12-
BaseRoleName,
13-
CloneId,
14-
AppProxy, EntryId,
15-
DvmDef, DnaViewModel, pascal, delay,
6+
AppProxy,
7+
BaseRoleName,
8+
CloneId,
9+
delay,
10+
DnaViewModel,
11+
DvmDef,
12+
EntryId,
13+
HappElement,
14+
HCL,
15+
HvmDef,
16+
pascal,
1617
} from "@ddd-qc/lit-happ";
17-
import {
18-
FilesDvm,
19-
FILES_DEFAULT_ROLE_NAME, ProfileInfo,
20-
} from "@ddd-qc/files";
18+
import {FILES_DEFAULT_ROLE_NAME, FilesDvm, ProfileInfo,} from "@ddd-qc/files";
2119
import {HC_ADMIN_PORT, HC_APP_PORT} from "./globals";
2220
import {AppletId, AppletView, CreatableName, GroupProfile, WAL, WeaveServices} from "@theweave/api";
2321
import {ProfilesDvm} from "@ddd-qc/profiles-dvm";
@@ -26,11 +24,11 @@ import {DELIVERY_INTERGRITY_ZOME_NAME, DeliveryEntryType} from "@ddd-qc/delivery
2624
import {buildBlock} from "./files-blocks";
2725
import {DEFAULT_FILES_DEF} from "./happDef";
2826
import {setLocale} from "./localization";
29-
import { msg } from '@lit/localize';
27+
import {msg} from '@lit/localize';
3028

3129
import "./files-main-page"
3230
import "@ddd-qc/files";
33-
import {createContext} from "@lit/context";
31+
import {GetStrategy} from "@holochain-open-dev/core-types";
3432

3533
const weClientContext = createContext<WeaveServices>('weave_client');
3634

@@ -48,15 +46,15 @@ export class FilesApp extends HappElement {
4846
@state() private _hasHolochainFailed = true;
4947
@state() private _loaded = false;
5048
@state() private _hasWeProfile = false;
51-
@state() private _offlinePerspectiveloaded = false;
52-
@state() private _onlinePerspectiveloaded = false;
49+
@state() private _localPerspectiveloaded = false;
50+
@state() private _networkPerspectiveloaded = false;
5351
//@state() private _filesCell: Cell;
5452
/** ZomeName -> (AppEntryDefName, isPublic) */
5553
//private _allAppEntryTypes: Record<string, [string, boolean][]> = {};
5654
//private _dnaDef?: DnaDefinition;
5755

5856

59-
/** All arguments should be provided when constructed explicity */
57+
/** All arguments should be provided when constructed explicitly */
6058
constructor(appWs?: AppWebsocket, private _adminWs?: AdminWebsocket, private _canAuthorizeZfns?: boolean, readonly appId?: InstalledAppId, public appletView?: AppletView) {
6159
const adminUrl = _adminWs
6260
? undefined
@@ -196,28 +194,31 @@ export class FilesApp extends HappElement {
196194
/** */
197195
override async perspectiveInitializedFromLocal(): Promise<void> {
198196
console.log("<files-app>.perspectiveInitializedFromLocal()");
199-
const maybeProfile = await this.filesDvm.profilesZvm.findProfile(this.filesDvm.cell.address.agentId);
200-
console.log("perspectiveInitializedFromLocal() maybeProfile", maybeProfile, this.filesDvm.cell.address.agentId);
197+
//const maybeProfile = await this.filesDvm.profilesZvm.findProfile(this.filesDvm.cell.address.agentId);
198+
//console.log("perspectiveInitializedFromLocal() maybeProfile", maybeProfile, this.filesDvm.cell.address.agentId);
199+
if (this.appletView && this.appletView.type == "main") {
200+
this.hvm.probeAll(GetStrategy.Local);
201+
}
201202
/** Done */
202-
this._offlinePerspectiveloaded = true;
203+
this._localPerspectiveloaded = true;
203204
}
204205

205206

206207
/** */
207208
override async perspectiveInitializedFromNetwork(): Promise<void> {
208209
console.log("<files-app>.perspectiveInitializedFromNetwork()");
209210
if (this.appletView && this.appletView.type == "main") {
210-
this.hvm.probeAll();
211+
this.hvm.probeAll(GetStrategy.Network);
211212
}
212-
this._onlinePerspectiveloaded = true;
213+
this._networkPerspectiveloaded = true;
213214
}
214215

215216

216217
/** */
217218
override render() {
218219
console.log("<files-app> render()", this._loaded, this._hasHolochainFailed);
219220

220-
if (!this._loaded || !this._offlinePerspectiveloaded || !this._onlinePerspectiveloaded) {
221+
if (!this._loaded || !this._localPerspectiveloaded || !this._networkPerspectiveloaded) {
221222
return html`<sl-spinner></sl-spinner>`;
222223
}
223224
if(this._hasHolochainFailed) {

webapp/src/files-main-page.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ import {setLocale} from "./localization";
8080
import {msg} from "@lit/localize";
8181
import {wrapPathInSvg} from "@ddd-qc/we-utils";
8282
import {mdiAlertOctagonOutline, mdiAlertOutline, mdiCheckCircleOutline, mdiCog, mdiInformationOutline} from "@mdi/js";
83+
import {GetStrategy} from "@holochain-open-dev/core-types";
8384

8485

8586
export const REPORT_BUG_URL = `https://github.com/lightningrodlabs/files/issues/new`;
@@ -332,7 +333,7 @@ export class FilesMainPage extends DnaElement<FilesDvmPerspective, FilesDvm> {
332333

333334
/** */
334335
async refresh() {
335-
await this._dvm.probeAll();
336+
await this._dvm.probeAll(GetStrategy.Network);
336337
//await this._dvm.filesZvm.zomeProxy.getPrivateFiles();
337338
//await this._dvm.deliveryZvm.zomeProxy.queryAll();
338339
this.requestUpdate();

webcomponents/src/bindings/files.fn.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export const filesFunctionNames: FunctionName[] = [
1111
"attach_to_hrl",
1212
"get_files_from_hrl",
1313
"commit_private_file",
14-
"get_ah",
1514
"get_file_info_local",
1615
"get_file_info_network",
1716
"get_private_files_from",

webcomponents/src/bindings/files.proxy.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,6 @@ export class FilesProxy extends ZomeProxy {
112112
return this.call('commit_private_file', input);
113113
}
114114

115-
async getAh(eh: EntryArray): Promise<ActionArray | null> {
116-
return this.call('get_ah', eh);
117-
}
118-
119115
async getFileInfoLocal(eh: EntryArray): Promise<ParcelManifest> {
120116
return this.call('get_file_info_local', eh);
121117
}

0 commit comments

Comments
 (0)