mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-06-20 11:26:30 +00:00
fix: nodenext
moduleResolution for js peer (#271)
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
import type { PeerIdB58 } from '@fluencelabs/interfaces';
|
||||
import type { JSONArray, JSONObject, LogLevel } from '@fluencelabs/marine-js/dist/types';
|
||||
import type { RunParameters, CallResultsArray, InterpreterResult } from '@fluencelabs/avm';
|
||||
// @ts-ignore
|
||||
import type { WorkerImplementation } from 'threads/dist/types/master';
|
||||
|
||||
export type ParticleHandler = (particle: string) => void;
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { CallParams } from '@fluencelabs/interfaces';
|
||||
import { toUint8Array } from 'js-base64';
|
||||
import { CallServiceData } from '../../../interfaces/commonTypes.js';
|
||||
import { builtInServices } from '../../builtins/common.js';
|
||||
import { KeyPair } from '../../../keypair/index.js';
|
||||
import { Sig, defaultSigGuard } from '../../builtins/Sig.js';
|
||||
import { allowServiceFn } from '../../builtins/securityGuard.js';
|
||||
import { builtInServices } from '../../builtins/common.js';
|
||||
|
||||
const a10b20 = `{
|
||||
"a": 10,
|
||||
|
@ -3,9 +3,9 @@ import { FluenceConnection, ParticleHandler } from '../interfaces/index.js';
|
||||
import { fromBase64Sk } from '../keypair/index.js';
|
||||
import { FluencePeer } from './FluencePeer.js';
|
||||
import { MarineBackgroundRunner } from '../marine/worker/index.js';
|
||||
import { avmModuleLoader, controlModuleLoader } from './utilsForNode';
|
||||
import { marineLogFunction } from './utils';
|
||||
import { MarineBasedAvmRunner } from './avm';
|
||||
import { avmModuleLoader, controlModuleLoader } from './utilsForNode.js';
|
||||
import { marineLogFunction } from './utils.js';
|
||||
import { MarineBasedAvmRunner } from './avm.js';
|
||||
|
||||
import log from 'loglevel';
|
||||
import { WorkerLoaderFromFs } from '../marine/deps-loader/node.js';
|
||||
|
@ -1,5 +1,7 @@
|
||||
// @ts-ignore
|
||||
import { BlobWorker } from 'threads';
|
||||
import { fromBase64, toUint8Array } from 'js-base64';
|
||||
// @ts-ignore
|
||||
import type { WorkerImplementation } from 'threads/dist/types/master';
|
||||
import { LazyLoader } from '../../interfaces/index.js';
|
||||
import { Buffer } from 'buffer';
|
||||
|
@ -1,7 +1,9 @@
|
||||
import { createRequire } from 'module';
|
||||
import { LazyLoader } from '../../interfaces/index.js';
|
||||
|
||||
// @ts-ignore
|
||||
import type { WorkerImplementation } from 'threads/dist/types/master';
|
||||
// @ts-ignore
|
||||
import { Worker } from 'threads';
|
||||
import { Buffer } from 'buffer';
|
||||
import * as fs from 'fs';
|
||||
|
@ -17,7 +17,9 @@
|
||||
import { MarineService } from '@fluencelabs/marine-js/dist/MarineService';
|
||||
import type { Env, MarineServiceConfig } from '@fluencelabs/marine-js/dist/config';
|
||||
import type { JSONArray, JSONObject, LogMessage } from '@fluencelabs/marine-js/dist/types';
|
||||
// @ts-ignore
|
||||
import { Observable, Subject } from 'threads/observable';
|
||||
// @ts-ignore
|
||||
import { expose } from 'threads/worker';
|
||||
|
||||
let marineServices = new Map<string, MarineService>();
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { LazyLoader } from '../../interfaces/index.js';
|
||||
|
||||
// @ts-ignore
|
||||
import type { WorkerImplementation } from 'threads/dist/types/master';
|
||||
// @ts-ignore
|
||||
import { Worker } from 'threads';
|
||||
|
||||
export class WorkerLoader extends LazyLoader<WorkerImplementation> {
|
||||
|
@ -18,7 +18,9 @@ import type { JSONArray, JSONObject, LogLevel } from '@fluencelabs/marine-js/dis
|
||||
import { LogFunction, logLevelToEnv } from '@fluencelabs/marine-js/dist/types';
|
||||
import type { IMarine, IWorkerLoader, IWasmLoader } from '../../interfaces/index.js';
|
||||
import type { MarineBackgroundInterface } from '../worker-script/index.js';
|
||||
// @ts-ignore
|
||||
import { spawn, Thread } from 'threads';
|
||||
// @ts-ignore
|
||||
import type { ModuleThread } from 'threads';
|
||||
|
||||
export class MarineBackgroundRunner implements IMarine {
|
||||
|
Reference in New Issue
Block a user