Skip to content

Commit 232b2d6

Browse files
Merge pull request #9 from bloock/correct_tests
Skip library checking on typescript execution
2 parents e47c680 + d7989e0 commit 232b2d6

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

examples/availability/publish_hosted/PublishHosted.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import com.bloock.sdk.client.AvailabilityClient;
33
import com.bloock.sdk.client.RecordClient;
44
import com.bloock.sdk.entity.availability.HostedPublisher;
5+
import com.bloock.sdk.entity.availability.PublishResponse;
56
import com.bloock.sdk.entity.record.Record;
67

78
public class PublishHosted {
@@ -14,7 +15,9 @@ public static void main(String[] args) throws Exception {
1415

1516
Record record = recordClient.fromString("Hello world").build();
1617

17-
String id = availabilityClient.publish(record, new HostedPublisher()); // it returns the hash
18+
PublishResponse response = availabilityClient.publish(record, new HostedPublisher());
19+
String id = response.getID();
20+
1821
} catch (Exception e) {
1922
System.out.println(e);
2023
}

examples/availability/publish_ipfs/PublishIpfs.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import com.bloock.sdk.client.AvailabilityClient;
33
import com.bloock.sdk.client.RecordClient;
44
import com.bloock.sdk.entity.availability.IpfsPublisher;
5+
import com.bloock.sdk.entity.availability.PublishResponse;
56
import com.bloock.sdk.entity.record.Record;
67

78
public class PublishIpfs {
@@ -14,8 +15,9 @@ public static void main(String[] args) throws Exception {
1415
Record record = recordClient
1516
.fromString("Hello world")
1617
.build();
17-
18-
String id = availabilityClient.publish(record, new IpfsPublisher());
18+
19+
PublishResponse response = availabilityClient.publish(record, new IpfsPublisher());
20+
String id = response.getID();
1921

2022
System.out.println("Record was published successfully");
2123
}

examples/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ runners:
1616
cmd: yarn eslint -c /var/runners/typescript/eslint.config.js {{ snippet.dir }}/**/*.{ts,tsx}
1717
run:
1818
before: timeout 600 ash -c 'until stat /tmp/runner_is_ready; do sleep 1; done'
19-
cmd: yarn tsc {{ snippet.dir }}/{{ snippet.source }} --noEmit --module es2022 --target es2022 --moduleResolution Node --esModuleInterop
19+
cmd: yarn tsc {{ snippet.dir }}/{{ snippet.source }} --noEmit --module es2022 --target es2022 --moduleResolution Node --esModuleInterop --skipLibCheck
2020

2121
golang:
2222
service: doc-runner-golang

examples/key/load_local_certificate/load_local_certificate.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ const keyClient = new KeyClient();
88
const dirPath = path.join(__dirname, '/certificate.p12');
99
const buffer = fs.readFileSync(dirPath);
1010

11-
const _certificate = await keyClient.loadLocalCertificate(buffer, 'password');
11+
const uint8 = new Uint8Array(buffer);
12+
13+
const _certificate = await keyClient.loadLocalCertificate(uint8, 'password');

examples/record/prepare_record/prepare_record.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ try {
1414

1515
// we can read a file as an array of bytes
1616
const file = fs.readFileSync('sample.pdf');
17-
const _record3 = await recordClient.fromFile(file).build();
17+
const uint8 = new Uint8Array(file);
18+
19+
const _record3 = await recordClient.fromFile(uint8).build();
1820
} catch (e) {
1921
console.log(e);
2022
}

0 commit comments

Comments
 (0)