mirror of
https://github.com/fluencelabs/examples
synced 2025-06-13 01:51:20 +00:00
Use sass instead of node-sass (#354)
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
module.exports = {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
testPathIgnorePatterns: ['dist'],
|
||||
};
|
||||
|
@ -27,7 +27,6 @@
|
||||
"@fluencelabs/fluence": "^0.23.0",
|
||||
"@fluencelabs/fluence-network-environment": "1.0.13",
|
||||
"@fluencelabs/ipfs-execution-aqua": "file:../aqua",
|
||||
"ipfs-http-client": "^50.1.2",
|
||||
"it-all": "^1.0.5",
|
||||
"multiaddr": "^10.0.0",
|
||||
"uint8arrays": "^2.1.5"
|
||||
|
@ -32,8 +32,12 @@ export async function main(environment: Node[]) {
|
||||
try {
|
||||
await providerClient.start({ connectTo: providerHost });
|
||||
console.log('📘 uploading .wasm to node %s', providerHost.multiaddr);
|
||||
let path = globSource('../service/artifacts/process_files.wasm');
|
||||
let { file, swarmAddr, rpcAddr } = await provideFile(path, providerClient);
|
||||
const firstThing = await globSource('../service/artifacts/', 'process_files.wasm').next();
|
||||
const fileCandidate = await firstThing.value
|
||||
if(fileCandidate === undefined) {
|
||||
throw new Error("Couldn't read process_files.wasm");
|
||||
}
|
||||
let { file, swarmAddr, rpcAddr } = await provideFile(fileCandidate, providerClient);
|
||||
console.log('📗 swarmAddr', swarmAddr);
|
||||
console.log('📗 rpcAddr', rpcAddr);
|
||||
|
||||
|
@ -1,12 +1,13 @@
|
||||
import { create, CID } from 'ipfs-http-client';
|
||||
import { AddResult } from 'ipfs-core-types/src/root';
|
||||
import type { AddResult } from 'ipfs-core-types/src/root';
|
||||
import type { ImportCandidate } from 'ipfs-core-types/src/utils';
|
||||
import { Multiaddr, protocols } from 'multiaddr';
|
||||
|
||||
import { FluencePeer } from '@fluencelabs/fluence';
|
||||
import { get_external_api_multiaddr, get_external_swarm_multiaddr } from '@fluencelabs/ipfs-execution-aqua';
|
||||
|
||||
export async function provideFile(
|
||||
source: any,
|
||||
source: ImportCandidate,
|
||||
provider: FluencePeer,
|
||||
): Promise<{ file: AddResult; swarmAddr: string; rpcAddr: string }> {
|
||||
const relayPeerId = provider.getStatus().relayPeerId!;
|
||||
|
Reference in New Issue
Block a user