diff --git a/src/puter-js/src/index.js b/src/puter-js/src/index.js index b3d05f5e5..06ccf0870 100644 --- a/src/puter-js/src/index.js +++ b/src/puter-js/src/index.js @@ -1,6 +1,6 @@ import kvjs from '@heyputer/kv.js'; import APICallLogger from './lib/APICallLogger.js'; -import { fetchUrl } from './lib/PuterClient.js'; +import { fetchUrl } from './lib/networkUtils.js'; import { isStoredTokenUsableForOrigin } from './lib/authTokenOrigin.js'; import path from './lib/path.js'; import localStorageMemory from './lib/polyfills/localStorage.js'; diff --git a/src/puter-js/src/lib/PuterClient.js b/src/puter-js/src/lib/networkUtils.js similarity index 100% rename from src/puter-js/src/lib/PuterClient.js rename to src/puter-js/src/lib/networkUtils.js diff --git a/src/puter-js/src/lib/PuterClient.test.js b/src/puter-js/src/lib/networkUtils.test.js similarity index 99% rename from src/puter-js/src/lib/PuterClient.test.js rename to src/puter-js/src/lib/networkUtils.test.js index a69dab055..2f7c2e849 100644 --- a/src/puter-js/src/lib/PuterClient.test.js +++ b/src/puter-js/src/lib/networkUtils.test.js @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; -import { fetchUrl } from './PuterClient.js'; +import { fetchUrl } from './networkUtils.js'; // -- Controllable fake XMLHttpRequest -- // Drives fetchUrl's event handlers deterministically. Each instance plays the diff --git a/src/puter-js/src/lib/utils.js b/src/puter-js/src/lib/utils.js index 6f7b7d721..0f8e7df79 100644 --- a/src/puter-js/src/lib/utils.js +++ b/src/puter-js/src/lib/utils.js @@ -1,5 +1,5 @@ import { FileReaderPoly } from './polyfills/fileReaderPoly.js'; -import { resolveReauth } from './PuterClient.js'; +import { resolveReauth } from './networkUtils.js'; import { showUsageLimitDialog } from '../modules/UsageLimitDialog.js'; import { showEmailConfirmationDialog } from '../modules/EmailConfirmationDialog.js'; diff --git a/src/puter-js/src/modules/AI.js b/src/puter-js/src/modules/AI.js index 23ad8fe93..1efc191fb 100644 --- a/src/puter-js/src/modules/AI.js +++ b/src/puter-js/src/modules/AI.js @@ -1,5 +1,5 @@ import * as utils from '../lib/utils.js'; -import { fetchUrl } from '../lib/PuterClient.js'; +import { fetchUrl } from '../lib/networkUtils.js'; import getAbsolutePathForApp from './FileSystem/utils/getAbsolutePathForApp.js'; const normalizeTTSProvider = (value) => { diff --git a/src/puter-js/src/modules/Apps.js b/src/puter-js/src/modules/Apps.js index 798581966..c6aa98880 100644 --- a/src/puter-js/src/modules/Apps.js +++ b/src/puter-js/src/modules/Apps.js @@ -1,5 +1,5 @@ import * as utils from '../lib/utils.js'; -import { fetchUrl } from '../lib/PuterClient.js'; +import { fetchUrl } from '../lib/networkUtils.js'; class Apps { /** diff --git a/src/puter-js/src/modules/Auth.js b/src/puter-js/src/modules/Auth.js index f73d928ee..992d4064f 100644 --- a/src/puter-js/src/modules/Auth.js +++ b/src/puter-js/src/modules/Auth.js @@ -1,5 +1,5 @@ import * as utils from '../lib/utils.js'; -import { fetchUrl } from '../lib/PuterClient.js'; +import { fetchUrl } from '../lib/networkUtils.js'; import PuterDialog from './PuterDialog.js'; import { hasUserActivation, openAuthPopup } from '../lib/auth-popup.js'; diff --git a/src/puter-js/src/modules/Drivers.js b/src/puter-js/src/modules/Drivers.js index 024bfb817..a959f6cd7 100644 --- a/src/puter-js/src/modules/Drivers.js +++ b/src/puter-js/src/modules/Drivers.js @@ -1,4 +1,4 @@ -import { fetchUrl } from '../lib/PuterClient.js'; +import { fetchUrl } from '../lib/networkUtils.js'; class FetchDriverCallBackend { constructor ({ getAPIOrigin, getAuthToken }) { diff --git a/src/puter-js/src/modules/FileSystem/Batch.js b/src/puter-js/src/modules/FileSystem/Batch.js index 575e2c0e0..70e055893 100644 --- a/src/puter-js/src/modules/FileSystem/Batch.js +++ b/src/puter-js/src/modules/FileSystem/Batch.js @@ -1,4 +1,4 @@ -import { fetchUrl } from '../../lib/PuterClient.js'; +import { fetchUrl } from '../../lib/networkUtils.js'; export default puter => class Batch { constructor () { diff --git a/src/puter-js/src/modules/FileSystem/operations/upload.js b/src/puter-js/src/modules/FileSystem/operations/upload.js index c91ecda7e..3eb4fef59 100644 --- a/src/puter-js/src/modules/FileSystem/operations/upload.js +++ b/src/puter-js/src/modules/FileSystem/operations/upload.js @@ -1,5 +1,5 @@ import path from '../../../lib/path.js'; -import { fetchUrl } from '../../../lib/PuterClient.js'; +import { fetchUrl } from '../../../lib/networkUtils.js'; import * as utils from '../../../lib/utils.js'; import { showUsageLimitDialog } from '../../../modules/UsageLimitDialog.js'; import getAbsolutePathForApp from '../utils/getAbsolutePathForApp.js'; diff --git a/src/puter-js/src/modules/KV.js b/src/puter-js/src/modules/KV.js index df63eb495..b76a84a38 100644 --- a/src/puter-js/src/modules/KV.js +++ b/src/puter-js/src/modules/KV.js @@ -1,5 +1,5 @@ import * as utils from '../lib/utils.js'; -import { fetchUrl } from '../lib/PuterClient.js'; +import { fetchUrl } from '../lib/networkUtils.js'; const createDeferred = () => { let resolve; diff --git a/src/puter-js/src/modules/Peer.js b/src/puter-js/src/modules/Peer.js index 2e84fae98..d63af5fa7 100644 --- a/src/puter-js/src/modules/Peer.js +++ b/src/puter-js/src/modules/Peer.js @@ -1,4 +1,4 @@ -import { fetchUrl } from '../lib/PuterClient.js'; +import { fetchUrl } from '../lib/networkUtils.js'; class PuterPeerServerConnectionEvent extends Event { conn; diff --git a/src/puter-js/src/modules/Perms.js b/src/puter-js/src/modules/Perms.js index 2ba65baf4..3d042d9bd 100644 --- a/src/puter-js/src/modules/Perms.js +++ b/src/puter-js/src/modules/Perms.js @@ -1,4 +1,4 @@ -import { fetchUrl } from '../lib/PuterClient.js'; +import { fetchUrl } from '../lib/networkUtils.js'; export default class Perms { constructor (puter) { diff --git a/src/puter-js/src/modules/networking/PSocket.js b/src/puter-js/src/modules/networking/PSocket.js index 752b3436a..391d70986 100644 --- a/src/puter-js/src/modules/networking/PSocket.js +++ b/src/puter-js/src/modules/networking/PSocket.js @@ -1,5 +1,5 @@ import EventListener from '../../lib/EventListener.js'; -import { fetchUrl } from '../../lib/PuterClient.js'; +import { fetchUrl } from '../../lib/networkUtils.js'; import { errors } from './parsers.js'; import { PWispHandler } from './PWispHandler.js'; const texten = new TextEncoder();