From 7786deefb771fe6a75a50ba64d20ca7b77c29f69 Mon Sep 17 00:00:00 2001 From: KernelDeimos <7225168+KernelDeimos@users.noreply.github.com> Date: Mon, 22 Dec 2025 12:50:45 -0500 Subject: [PATCH] lint: sync Apps.js with linter rules This is comitted separately because it should not have any functional changes. Do not skip this in a `git bisect`, but do not revert this when testing commits for functional changes. --- src/puter-js/src/modules/Apps.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/puter-js/src/modules/Apps.js b/src/puter-js/src/modules/Apps.js index eeb4a74bc..6f3d1bf5d 100644 --- a/src/puter-js/src/modules/Apps.js +++ b/src/puter-js/src/modules/Apps.js @@ -16,31 +16,31 @@ class Apps { this.appID = puter.appID; } - #addUserIterationToApp(app) { + #addUserIterationToApp (app) { app.getUsers = async (params) => { params = params ?? {}; return (await puter.drivers.call('app-telemetry', 'app-telemetry', 'get_users', { app_uuid: app.uid, limit: params.limit, offset: params.offset })).result; - } + }; app.users = async function* (pageSize = 100) { let offset = 0; - while (true) { + while ( true ) { const users = await app.getUsers({ limit: pageSize, offset }); - if (!users || users.length === 0) return; + if ( !users || users.length === 0 ) return; - for (const user of users) { + for ( const user of users ) { yield user; } offset += users.length; - if (users.length < pageSize) return; + if ( users.length < pageSize ) return; } - } + }; return app; } - #addUserIterationToApps(apps) { + #addUserIterationToApps (apps) { apps.forEach(app => { this.#addUserIterationToApp(app); });