-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'beta' into feature/JST-526
# Conflicts: # examples/blender/blender.ts # examples/docs-examples/tutorials/running-parallel-tasks/index.mjs # examples/fibonacci/fibonacci.js # examples/package-lock.json # examples/simple-usage/forEach.ts # examples/simple-usage/map.ts # examples/ssh/ssh.ts # examples/yacat/yacat.ts # tests/e2e/yacat.spec.ts
- Loading branch information
Showing
45 changed files
with
797 additions
and
627 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,4 @@ logs/ | |
|
||
#Nuxt | ||
/examples/adv-web-example/.nuxt | ||
tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
/node_modules | ||
/src | ||
/tests | ||
/tmp | ||
.github | ||
.gitignore | ||
package-lock.json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
dist/ | ||
*.gvmi | ||
*.gvmi | ||
tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
some action log | ||
some action log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
examples/docs-examples/tutorials/accessing-internet/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"version": "0.1.0", | ||
"createdAt": "2023-10-19T11:23:08.156+02:00", | ||
"expiresAt": "2024-01-17T11:23:08.156+01:00", | ||
"metadata": { | ||
"name": "outbound-docs", | ||
"description": "", | ||
"version": "1.0.0" | ||
}, | ||
"payload": [ | ||
{ | ||
"platform": { | ||
"os": "linux", | ||
"arch": "x86_64" | ||
}, | ||
"hash": "sha3:dad8f776b0eb9f37ea0d63de42757034dd085fe30cc4537c2e119d80", | ||
"urls": [ | ||
"http://registry.golem.network/download/f37c8ba2b534ca631060fb8db4ac218d3199faf656aa2c92f402c2b700797c21" | ||
] | ||
} | ||
], | ||
"compManifest": { | ||
"version": "0.1.0", | ||
"net": { | ||
"inet": { | ||
"out": { | ||
"urls": ["https://ipfs.io"], | ||
"protocols": ["https"] | ||
} | ||
} | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
examples/docs-examples/tutorials/accessing-internet/outbound-ipfs.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { TaskExecutor } from "@golem-sdk/golem-js"; | ||
import { readFile } from "fs/promises"; | ||
|
||
const url = "https://ipfs.io/ipfs/bafybeihkoviema7g3gxyt6la7vd5ho32ictqbilu3wnlo3rs7ewhnp7lly"; | ||
|
||
(async function main() { | ||
// Load the manifest. | ||
const manifest = await readFile(`./manifest.json`); | ||
|
||
// Create and configure a TaskExecutor instance. | ||
const executor = await TaskExecutor.create({ | ||
capabilities: ["inet", "manifest-support"], | ||
yagnaOptions: { apiKey: "try_golem" }, | ||
manifest: manifest.toString("base64"), | ||
}); | ||
|
||
try { | ||
await executor.run(async (ctx) => { | ||
const result = await ctx.run(`curl ${url} -o /golem/work/example.jpg`); | ||
|
||
console.log((await ctx.run("ls -l")).stdout); | ||
if (result.result === "Ok") { | ||
console.log("File downloaded!"); | ||
} else { | ||
console.error("Failed to download the file!", result.stderr); | ||
} | ||
}); | ||
} catch (err) { | ||
console.error("The task failed due to", err); | ||
} finally { | ||
await executor.end(); | ||
} | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.