refactor: rename GUI helper files to camelCase

src/gui/src/helpers was mostly snake_case, disagreeing with itself and
with the camelCase file convention in AGENTS.md. Rename the 45 offenders
with git mv and repoint every import specifier at the new paths.

Files only — exported symbols are unchanged. applyItemAddedToContainers.js
still exports apply_item_added_to_containers and no call site is edited
beyond its import line; those identifiers cross module boundaries and some
hang off window, so renaming them is a separate, riskier change.
This commit is contained in:
Juan Castro
2026-08-25 10:49:59 -04:00
parent 6f1548e26a
commit 4a5d689af7
72 changed files with 121 additions and 121 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ const INDEX_URL_UNIQUENESS_EXEMPTION_CANDIDATES = [
];
// Sentinel host for builtin apps. The GUI rewrites index_urls on this
// host to `<gui origin>/builtin/<name>` (see launch_app.js), so rows
// host to `<gui origin>/builtin/<name>` (see launchApp.js), so rows
// carrying it are reserved for migration-seeded builtins — a user app
// claiming it would load its code same-origin with the desktop.
const BUILTIN_APPS_HOST = 'builtins.namespaces.puter.com';
+2 -2
View File
@@ -18,9 +18,9 @@
*/
import download from './helpers/download.js';
import item_icon from './helpers/item_icon.js';
import item_icon from './helpers/itemIcon.js';
import socialLink from './helpers/socialLink.js';
import update_mouse_position from './helpers/update_mouse_position.js';
import update_mouse_position from './helpers/updateMousePosition.js';
import path from './lib/path.js';
import UIAlert from './UI/UIAlert.js';
import UIContextMenu from './UI/UIContextMenu.js';
+3 -3
View File
@@ -1,13 +1,13 @@
import UIContextMenu from '../UIContextMenu.js';
import UIAlert from '../UIAlert.js';
import launch_app from '../../helpers/launch_app.js';
import revokeAppSessions from '../../helpers/revoke_app_sessions.js';
import launch_app from '../../helpers/launchApp.js';
import revokeAppSessions from '../../helpers/revokeAppSessions.js';
import { begin_dashboard_tile_launch, settle_dashboard_tile_launch } from '../UIWindow.js';
import { isTouchPrimaryDevice } from './ContextMenu/ContextMenu.js';
import { reconcileAppOrder, serializeAppOrder, mergeSavedOrder, APPS_ORDER_KV_KEY } from './appOrder.js';
import { parseRemovedApps, serializeRemovedApps, REMOVED_APPS_KV_KEY } from './removedApps.js';
import { appTileLink } from './appLink.js';
import { is_window_on_screen, user_facing_windows } from '../../helpers/window_visibility.js';
import { is_window_on_screen, user_facing_windows } from '../../helpers/windowVisibility.js';
import {
APP_GROUPS_KV_KEY,
MAX_GROUP_APPS,
+13 -13
View File
@@ -20,17 +20,17 @@
/* eslint-disable no-invalid-this */
/* eslint-disable @stylistic/quotes */
import path from '../../lib/path.js';
import open_item from '../../helpers/open_item.js';
import open_item from '../../helpers/openItem.js';
import UIContextMenu from '../UIContextMenu.js';
import UIWindowProgress from '../UIWindowProgress.js';
import UIAlert from '../UIAlert.js';
import generate_file_context_menu from '../../helpers/generate_file_context_menu.js';
import truncate_filename from '../../helpers/truncate_filename.js';
import update_title_based_on_uploads from '../../helpers/update_title_based_on_uploads.js';
import item_icon from '../../helpers/item_icon.js';
import { user_facing_windows } from '../../helpers/window_visibility.js';
import new_context_menu_item from '../../helpers/new_context_menu_item.js';
import publish_as_website from '../../helpers/publish_as_website.js';
import generate_file_context_menu from '../../helpers/generateFileContextMenu.js';
import truncate_filename from '../../helpers/truncateFilename.js';
import update_title_based_on_uploads from '../../helpers/updateTitleBasedOnUploads.js';
import item_icon from '../../helpers/itemIcon.js';
import { user_facing_windows } from '../../helpers/windowVisibility.js';
import new_context_menu_item from '../../helpers/newContextMenuItem.js';
import publish_as_website from '../../helpers/publishAsWebsite.js';
import ContextMenuModal, { isTouchPrimaryDevice } from './ContextMenu/ContextMenu.js';
import UIItemPropertiesModal from './UIItemPropertiesModal.js';
import UIShareModal from './UIShareModal.js';
@@ -38,9 +38,9 @@ import { dedupedName } from './dedupedName.js';
import { isEntryVisible, isHiddenName, showHiddenFiles } from './hiddenFiles.js';
import { icons } from '../../helpers/actionIcons.js';
import list_all_shared from '../../helpers/list_all_shared.js';
import { can_share, remember_shared_roots } from '../../helpers/shared_access.js';
import { parent_path_for, shared_crumbs_for, shared_uids_from_paths } from '../../helpers/share_paths.js';
import list_all_shared from '../../helpers/listAllShared.js';
import { can_share, remember_shared_roots } from '../../helpers/sharedAccess.js';
import { parent_path_for, shared_crumbs_for, shared_uids_from_paths } from '../../helpers/sharePaths.js';
const { html_encode, SelectionArea } = window;
@@ -2457,7 +2457,7 @@ const TabFiles = {
// For trashed items, use original_name from metadata if available
const item_id = window.global_element_id++;
// metadata is a client-writable, untrusted string stored verbatim, so
// it may be '', undefined, or malformed. Guard the parse (as item_icon.js
// it may be '', undefined, or malformed. Guard the parse (as itemIcon.js
// does) — an unguarded throw here aborts the whole directory render.
let metadata = {};
try {
@@ -2560,7 +2560,7 @@ const TabFiles = {
* resolve to their target) against the data-file_uid that launch_app
* stamps on app windows. In dashboard mode the row doubles as that
* window's switcher (clicking it restores instead of relaunching see
* open_item.js), so the dot marks where a click will return, not launch.
* openItem.js), so the dot marks where a click will return, not launch.
*
* @returns {void}
*/
+2 -2
View File
@@ -25,8 +25,8 @@ import UIAlert from '../UIAlert.js';
import UIWindowSaveAccount from '../UIWindowSaveAccount.js';
import UIWindowLogin from '../UIWindowLogin.js';
import UIWindowFeedback from '../UIWindowFeedback.js';
import apply_item_added_to_containers from '../../helpers/apply_item_added_to_containers.js';
import { clear_shared_param } from '../../helpers/parse_shared_path.js';
import apply_item_added_to_containers from '../../helpers/applyItemAddedToContainers.js';
import { clear_shared_param } from '../../helpers/parseSharedPath.js';
/**
* Creates and displays the Dashboard window.
*
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import item_icon from '../../helpers/item_icon.js';
import item_icon from '../../helpers/itemIcon.js';
const { html_encode } = window;
+4 -4
View File
@@ -18,11 +18,11 @@
*/
import path from '../../lib/path.js';
import item_icon from '../../helpers/item_icon.js';
import { owner_of_path } from '../../helpers/path_owner.js';
import { invalidate_shared_roots } from '../../helpers/shared_access.js';
import item_icon from '../../helpers/itemIcon.js';
import { owner_of_path } from '../../helpers/pathOwner.js';
import { invalidate_shared_roots } from '../../helpers/sharedAccess.js';
import { icons } from '../../helpers/actionIcons.js';
import { mode_label, options_for } from '../../helpers/share_modes.js';
import { mode_label, options_for } from '../../helpers/shareModes.js';
import { isTouchPrimaryDevice } from './ContextMenu/ContextMenu.js';
import { avatarHue, avatarInitial } from './shareAvatar.js';
import { aggregateOwners, aggregateShares, missingPathsFor } from './shareAggregate.js';
+8 -8
View File
@@ -32,18 +32,18 @@ import UIWindowQR from './UIWindowQR.js';
import UIWindowProgress from './UIWindowProgress.js';
import UITaskbar from './UITaskbar.js';
import new_context_menu_item from '../helpers/new_context_menu_item.js';
import refresh_item_container from '../helpers/refresh_item_container.js';
import new_context_menu_item from '../helpers/newContextMenuItem.js';
import refresh_item_container from '../helpers/refreshItemContainer.js';
import changeLanguage from '../i18n/i18nChangeLanguage.js';
import UIWindowTaskManager from './UIWindowTaskManager.js';
import truncate_filename from '../helpers/truncate_filename.js';
import truncate_filename from '../helpers/truncateFilename.js';
import UINotification from './UINotification.js';
import UIWindowWelcome from './UIWindowWelcome.js';
import launch_app from '../helpers/launch_app.js';
import item_icon from '../helpers/item_icon.js';
import { SHARED_PATH_PARAM, clear_shared_param } from '../helpers/parse_shared_path.js';
import resolve_shared_item from '../helpers/resolve_shared_item.js';
import apply_item_added_to_containers from '../helpers/apply_item_added_to_containers.js';
import launch_app from '../helpers/launchApp.js';
import item_icon from '../helpers/itemIcon.js';
import { SHARED_PATH_PARAM, clear_shared_param } from '../helpers/parseSharedPath.js';
import resolve_shared_item from '../helpers/resolveSharedItem.js';
import apply_item_added_to_containers from '../helpers/applyItemAddedToContainers.js';
import UIWindowSearch from './UIWindowSearch.js';
async function UIDesktop (options) {
+6 -6
View File
@@ -26,14 +26,14 @@ import UIAlert from './UIAlert.js';
import UIWindowPublishWorker from './UIWindowPublishWorker.js';
import UIWindowShare from './UIWindowShare.js';
import path from '../lib/path.js';
import truncate_filename from '../helpers/truncate_filename.js';
import launch_app from '../helpers/launch_app.js';
import open_item from '../helpers/open_item.js';
import publish_as_website from '../helpers/publish_as_website.js';
import truncate_filename from '../helpers/truncateFilename.js';
import launch_app from '../helpers/launchApp.js';
import open_item from '../helpers/openItem.js';
import publish_as_website from '../helpers/publishAsWebsite.js';
import mime from '../lib/mime.js';
import { isWeblinkName, weblinkChangeIconMenuItem } from '../helpers/weblink.js';
import { is_owned_by_me } from '../helpers/path_owner.js';
import { can_rename, can_restructure, invalidate_shared_roots, shared_mode_for } from '../helpers/shared_access.js';
import { is_owned_by_me } from '../helpers/pathOwner.js';
import { can_rename, can_restructure, invalidate_shared_roots, shared_mode_for } from '../helpers/sharedAccess.js';
const AI_APP_NAME = 'ai';
+1 -1
View File
@@ -19,7 +19,7 @@
import UITaskbarItem from './UITaskbarItem.js';
import UIPopover from './UIPopover.js';
import launch_app from '../helpers/launch_app.js';
import launch_app from '../helpers/launchApp.js';
import UIContextMenu from './UIContextMenu.js';
async function UITaskbar (options) {
+2 -2
View File
@@ -19,8 +19,8 @@
import UIContextMenu from './UIContextMenu.js';
import path from '../lib/path.js';
import launch_app from '../helpers/launch_app.js';
import { user_facing_windows } from '../helpers/window_visibility.js';
import launch_app from '../helpers/launchApp.js';
import { user_facing_windows } from '../helpers/windowVisibility.js';
let tray_item_id = 1;
+8 -8
View File
@@ -23,16 +23,16 @@ import path from '../lib/path.js';
import UITaskbarItem from './UITaskbarItem.js';
import UIWindowLogin from './UIWindowLogin.js';
import UIWindowItemProperties from './UIWindowItemProperties.js';
import new_context_menu_item from '../helpers/new_context_menu_item.js';
import refresh_item_container from '../helpers/refresh_item_container.js';
import new_context_menu_item from '../helpers/newContextMenuItem.js';
import refresh_item_container from '../helpers/refreshItemContainer.js';
import UIWindowAppFeedback from './UIWindowAppFeedback.js';
import launch_app from '../helpers/launch_app.js';
import publish_as_website from '../helpers/publish_as_website.js';
import launch_app from '../helpers/launchApp.js';
import publish_as_website from '../helpers/publishAsWebsite.js';
import item_icon from '../helpers/item_icon.js';
import { parent_path_for, shared_crumbs_for } from '../helpers/share_paths.js';
import { has_shared_roots } from '../helpers/shared_access.js';
import { is_window_hidden, is_unseen_background_window, user_facing_windows } from '../helpers/window_visibility.js';
import item_icon from '../helpers/itemIcon.js';
import { parent_path_for, shared_crumbs_for } from '../helpers/sharePaths.js';
import { has_shared_roots } from '../helpers/sharedAccess.js';
import { is_window_hidden, is_unseen_background_window, user_facing_windows } from '../helpers/windowVisibility.js';
const el_body = document.getElementsByTagName('body')[0];
const SNAP_PLACEHOLDER_DELAY_MS = 600; // delay before showing placeholder in any snap zone
+1 -1
View File
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import check_password_strength from '../helpers/check_password_strength.js';
import check_password_strength from '../helpers/checkPasswordStrength.js';
import { openRevalidatePopup } from '../util/openid.js';
import UIWindow from './UIWindow.js';
+1 -1
View File
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import update_username_in_gui from '../helpers/update_username_in_gui.js';
import update_username_in_gui from '../helpers/updateUsernameInGui.js';
import { openRevalidatePopup } from '../util/openid.js';
import { fetchWithSessionCookieRetry, isSessionAuthError } from '../util/sessionAuth.js';
import UIWindow from './UIWindow.js';
+2 -2
View File
@@ -19,13 +19,13 @@
import UIWindow from './UIWindow.js';
import UIWindowManageSessions from './UIWindowManageSessions.js';
import create_access_token from '../helpers/create_access_token.js';
import create_access_token from '../helpers/createAccessToken.js';
// Creates a named, revocable full-API-access token and shows it once.
// Replaces the old "copy your raw GUI/session token" behaviour: the copied
// token used to be a session-equivalent credential that could escalate to
// full account control; the minted access token can use the whole API but is
// locked out of account management (see create_access_token.js).
// locked out of account management (see createAccessToken.js).
function UIWindowCopyToken (options = {}) {
return new Promise(async (resolve) => {
let h = '';
+1 -1
View File
@@ -23,7 +23,7 @@ import UIWindowRecoverPassword from './UIWindowRecoverPassword.js';
import UIWindowSignup from './UIWindowSignup.js';
import { KNOWN_OIDC_PROVIDERS, OIDC_GENERIC_PROVIDER_ICON, humanizeOidcProviderId } from '../util/openid.js';
import { offersFederatedSignInInPopup } from '../util/popupAuth.js';
import { get_auth_redirect_url, get_oidc_return_to } from '../helpers/auth_redirect.js';
import { get_auth_redirect_url, get_oidc_return_to } from '../helpers/authRedirect.js';
// ── 2FA Login CSS (injected once) ───────────────────────────────────────────
const LOGIN_2FA_CSS = `
+1 -1
View File
@@ -20,7 +20,7 @@
import UIWindow from './UIWindow.js';
import UIAlert from './UIAlert.js';
import UIWindowLogin from './UIWindowLogin.js';
import check_password_strength from '../helpers/check_password_strength.js';
import check_password_strength from '../helpers/checkPasswordStrength.js';
async function UIWindowNewPassword (options) {
return new Promise(async (resolve) => {
@@ -19,7 +19,7 @@
import UIWindow from './UIWindow.js';
import UIWindowCardVerificationRequired from './UIWindowCardVerificationRequired.js';
import { get_country_list } from '../helpers/country_codes.js';
import { get_country_list } from '../helpers/countryCodes.js';
import {
format_phone_as_you_type,
inspect_phone,
+2 -2
View File
@@ -20,8 +20,8 @@
import UIWindow from './UIWindow.js';
import path from '../lib/path.js';
import UIAlert from './UIAlert.js';
import launch_app from '../helpers/launch_app.js';
import item_icon from '../helpers/item_icon.js';
import launch_app from '../helpers/launchApp.js';
import item_icon from '../helpers/itemIcon.js';
import UIContextMenu from './UIContextMenu.js';
async function UIWindowSearch (options) {
+3 -3
View File
@@ -20,10 +20,10 @@
import UIWindow from './UIWindow.js';
import UIAlert from './UIAlert.js';
import path from '../lib/path.js';
import { owner_of_path } from '../helpers/path_owner.js';
import { invalidate_shared_roots } from '../helpers/shared_access.js';
import { owner_of_path } from '../helpers/pathOwner.js';
import { invalidate_shared_roots } from '../helpers/sharedAccess.js';
import { icons } from '../helpers/actionIcons.js';
import { mode_label, options_for } from '../helpers/share_modes.js';
import { mode_label, options_for } from '../helpers/shareModes.js';
/**
* Sharing dialog for one file or directory.
+2 -2
View File
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import check_password_strength from '../helpers/check_password_strength.js';
import check_password_strength from '../helpers/checkPasswordStrength.js';
import UIWindow from './UIWindow.js';
import UIWindowEmailConfirmationRequired from './UIWindowEmailConfirmationRequired.js';
import UIWindowPhoneVerificationRequired from './UIWindowPhoneVerificationRequired.js';
@@ -25,7 +25,7 @@ import UIWindowCardVerificationRequired from './UIWindowCardVerificationRequired
import UIWindowLogin from './UIWindowLogin.js';
import { KNOWN_OIDC_PROVIDERS, OIDC_GENERIC_PROVIDER_ICON, humanizeOidcProviderId } from '../util/openid.js';
import { offersFederatedSignInInPopup } from '../util/popupAuth.js';
import { get_auth_redirect_url, get_oidc_return_to } from '../helpers/auth_redirect.js';
import { get_auth_redirect_url, get_oidc_return_to } from '../helpers/authRedirect.js';
function UIWindowSignup(options) {
options = options ?? {};
+1 -1
View File
@@ -3578,7 +3578,7 @@ body.myapps-reordering .myapps-tile {
/* Open-file dot: marks rows whose file is open in an app window (visible or
minimized) the row doubles as that window's switcher (clicking it
restores the window; see open_item.js), sibling of the Apps-tab tiles'
restores the window; see openItem.js), sibling of the Apps-tab tiles'
running dot. Kept current by updateOpenFileDots in TabFiles.js. */
.dashboard-section-files .files-tab .files .row.file-is-open .item-name-wrapper::after {
content: '';
+8 -8
View File
@@ -17,15 +17,15 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import get_html_element_from_options from './helpers/get_html_element_from_options.js';
import get_html_element_from_options from './helpers/getHtmlElementFromOptions.js';
import globToRegExp from './helpers/globToRegExp.js';
import item_icon from './helpers/item_icon.js';
import { is_owned_by_me, trash_path_for } from './helpers/path_owner.js';
import { invalidate_shared_roots } from './helpers/shared_access.js';
import truncate_filename from './helpers/truncate_filename.js';
import update_title_based_on_uploads from './helpers/update_title_based_on_uploads.js';
import update_username_in_gui from './helpers/update_username_in_gui.js';
import { select_uploaded_items } from './helpers/upload_selection.js';
import item_icon from './helpers/itemIcon.js';
import { is_owned_by_me, trash_path_for } from './helpers/pathOwner.js';
import { invalidate_shared_roots } from './helpers/sharedAccess.js';
import truncate_filename from './helpers/truncateFilename.js';
import update_title_based_on_uploads from './helpers/updateTitleBasedOnUploads.js';
import update_username_in_gui from './helpers/updateUsernameInGui.js';
import { select_uploaded_items } from './helpers/uploadSelection.js';
import mime from './lib/mime.js';
import path from './lib/path.js';
import UIAlert from './UI/UIAlert.js';
@@ -18,8 +18,8 @@
*/
import UIItem from '../UI/UIItem.js';
import item_icon from './item_icon.js';
import { select_added_item_if_pending } from './upload_selection.js';
import item_icon from './itemIcon.js';
import { select_added_item_if_pending } from './uploadSelection.js';
/**
* Reflect an `item.added` socket event in every open UIWindow item container
@@ -18,7 +18,7 @@
*/
import { describe, it, expect, afterEach } from 'vitest';
import { get_oidc_return_to } from './auth_redirect.js';
import { get_oidc_return_to } from './authRedirect.js';
const at = (pathname) => {
globalThis.window = { location: { pathname } };
@@ -21,7 +21,7 @@
* Mint a GUI token for the **current session**.
*
* This is a full account credential the same grade the desktop itself runs
* on. Unlike an access token (see `create_access_token.js`) it carries a
* on. Unlike an access token (see `createAccessToken.js`) it carries a
* session, so it passes the account-management gates: whoever holds it can
* change the password, email, and 2FA settings.
*
@@ -24,13 +24,13 @@ import UIWindowSaveAccount from '../UI/UIWindowSaveAccount.js';
import UIWindowEmailConfirmationRequired from '../UI/UIWindowEmailConfirmationRequired.js';
import UIWindowPublishWorker from '../UI/UIWindowPublishWorker.js';
import UIWindowShare from '../UI/UIWindowShare.js';
import publish_as_website from './publish_as_website.js';
import open_item from './open_item.js';
import launch_app from './launch_app.js';
import publish_as_website from './publishAsWebsite.js';
import open_item from './openItem.js';
import launch_app from './launchApp.js';
import path from '../lib/path.js';
import { isWeblinkName, weblinkChangeIconMenuItem } from './weblink.js';
import { is_owned_by_me } from './path_owner.js';
import { can_rename, can_restructure, can_share, invalidate_shared_roots } from './shared_access.js';
import { is_owned_by_me } from './pathOwner.js';
import { can_rename, can_restructure, can_share, invalidate_shared_roots } from './sharedAccess.js';
/**
* Generates context menu items for file/folder operations
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import truncate_filename from './truncate_filename.js';
import truncate_filename from './truncateFilename.js';
const get_html_element_from_options = async function (options) {
const item_id = window.global_element_id++;
@@ -18,7 +18,7 @@
*/
import mime from '../lib/mime.js';
import content_type_to_icon from './content_type_to_icon.js';
import content_type_to_icon from './contentTypeToIcon.js';
import { getWeblinkIcon } from './weblink.js';
/**
@@ -20,7 +20,7 @@
import path from '../lib/path.js';
import { PROCESS_IPC_ATTACHED, PROCESS_RUNNING, PortalProcess, PseudoProcess } from '../definitions.js';
import UIWindow from '../UI/UIWindow.js';
import { starts_hidden } from './starts_hidden.js';
import { starts_hidden } from './startsHidden.js';
const normalizePrivateAccessDecision = (privateAccess) => {
if ( !privateAccess || typeof privateAccess !== 'object' ) {
@@ -20,10 +20,10 @@
import UIWindow from '../UI/UIWindow.js';
import UIAlert from '../UI/UIAlert.js';
import i18n from '../i18n/i18n.js';
import launch_app from './launch_app.js';
import launch_app from './launchApp.js';
import path from '../lib/path.js';
import item_icon from './item_icon.js';
import { is_window_on_screen, user_facing_windows } from './window_visibility.js';
import item_icon from './itemIcon.js';
import { is_window_on_screen, user_facing_windows } from './windowVisibility.js';
// Files whose app launch is still in flight, by file uid. Between the click
// and the window's creation there is nothing in the DOM to restore, so a
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest';
import parse_shared_path from './parse_shared_path.js';
import parse_shared_path from './parseSharedPath.js';
const UID = '11111111-2222-4333-8444-555555555555';
@@ -19,9 +19,9 @@
import path from '../lib/path.js';
import UIItem from '../UI/UIItem.js';
import item_icon from './item_icon.js';
import list_all_shared from './list_all_shared.js';
import { remember_shared_roots } from './shared_access.js';
import item_icon from './itemIcon.js';
import list_all_shared from './listAllShared.js';
import { remember_shared_roots } from './sharedAccess.js';
const refresh_item_container = function (el_item_container, options) {
// start a transaction
@@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import parse_shared_path from './parse_shared_path.js';
import parse_shared_path from './parseSharedPath.js';
/**
* Find the item a share link addresses. The path only resolves while the name
@@ -1,5 +1,5 @@
import { describe, expect, it, vi } from 'vitest';
import resolve_shared_item from './resolve_shared_item.js';
import resolve_shared_item from './resolveSharedItem.js';
const UID = '11111111-2222-4333-8444-555555555555';
const PATH = `/alice/${UID}/report.txt`;
@@ -18,7 +18,7 @@
*/
import { describe, it, expect } from 'vitest';
import { appSessionUuids, revokeAppSessions } from './revoke_app_sessions.js';
import { appSessionUuids, revokeAppSessions } from './revokeAppSessions.js';
const APP = 'app-1111';
@@ -11,7 +11,7 @@ let MODES, mode_label, options_for;
beforeAll(async () => {
await import('../i18n/i18n.js'); // installs window.i18n
globalThis.i18n = window.i18n;
({ MODES, mode_label, options_for } = await import('./share_modes.js'));
({ MODES, mode_label, options_for } = await import('./shareModes.js'));
});
// What the browser renders for a fragment of HTML-safe markup.
@@ -24,7 +24,7 @@ import {
parse_shared_path,
shared_crumbs_for,
shared_uids_from_paths,
} from './share_paths.js';
} from './sharePaths.js';
const UID = '11111111-2222-3333-4444-555555555555';
@@ -17,9 +17,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import list_all_shared from './list_all_shared.js';
import { is_owned_by_me } from './path_owner.js';
import { is_share_root } from './share_paths.js';
import list_all_shared from './listAllShared.js';
import { is_owned_by_me } from './pathOwner.js';
import { is_share_root } from './sharePaths.js';
// What we hold on each shared root, by path: `{ mode, name }`. A `readdir`
// inside a shared folder returns plain entries, so nothing else records it.
@@ -25,7 +25,7 @@ import {
invalidate_shared_roots,
remember_shared_roots,
shared_mode_for,
} from './shared_access.js';
} from './sharedAccess.js';
const CONTENTS = '11111111-1111-1111-1111-111111111111';
const PHOTOS = '22222222-2222-2222-2222-222222222222';
@@ -18,7 +18,7 @@
*/
import { describe, it, expect } from 'vitest';
import { starts_hidden } from './starts_hidden.js';
import { starts_hidden } from './startsHidden.js';
describe('starts_hidden', () => {
it('shows an ordinary app launched the ordinary way', () => {
@@ -21,7 +21,7 @@
import { describe, it, expect, beforeAll, beforeEach, afterEach, vi } from 'vitest';
import jQuery from '../lib/jquery-3.6.1/jquery-3.6.1.min.js';
import { select_uploaded_items, select_added_item_if_pending } from './upload_selection.js';
import { select_uploaded_items, select_added_item_if_pending } from './uploadSelection.js';
const make_item = ({ path, uid = `uid-${path}`, disabled = false }) => {
const el = document.createElement('div');
@@ -18,7 +18,7 @@
*/
import { describe, it, expect } from 'vitest';
import { parse_url_paths } from './url_paths.js';
import { parse_url_paths } from './urlPaths.js';
describe('parse_url_paths', () => {
it('splits a pathname into non-empty segments', () => {
@@ -25,7 +25,7 @@ import {
is_window_on_screen,
is_unseen_background_window,
user_facing_windows,
} from './window_visibility.js';
} from './windowVisibility.js';
// A `.window` element carrying the given data- attributes, in the shapes
// UIWindow actually writes them (is_visible as 0/1, is_minimized as either
+9 -9
View File
@@ -39,8 +39,8 @@ import UIWindowSessionList from './UI/UIWindowSessionList.js';
import UIWindowSignup from './UI/UIWindowSignup.js';
import UIWindowRecoverPassword from './UI/UIWindowRecoverPassword.js';
import { PROCESS_RUNNING } from './definitions.js';
import create_access_token from './helpers/create_access_token.js';
import create_gui_token from './helpers/create_gui_token.js';
import create_access_token from './helpers/createAccessToken.js';
import create_gui_token from './helpers/createGuiToken.js';
import {
authmeRequestUrl,
authmeReturnUrl,
@@ -50,13 +50,13 @@ import {
urlTokenParam,
wantsFullToken,
} from './util/authmeGrant.js';
import init_device_signals from './helpers/device_signals.js';
import item_icon from './helpers/item_icon.js';
import launch_app from './helpers/launch_app.js';
import { parse_url_paths } from './helpers/url_paths.js';
import update_last_touch_coordinates from './helpers/update_last_touch_coordinates.js';
import update_mouse_position from './helpers/update_mouse_position.js';
import update_title_based_on_uploads from './helpers/update_title_based_on_uploads.js';
import init_device_signals from './helpers/deviceSignals.js';
import item_icon from './helpers/itemIcon.js';
import launch_app from './helpers/launchApp.js';
import { parse_url_paths } from './helpers/urlPaths.js';
import update_last_touch_coordinates from './helpers/updateLastTouchCoordinates.js';
import update_mouse_position from './helpers/updateMousePosition.js';
import update_title_based_on_uploads from './helpers/updateTitleBasedOnUploads.js';
import path from './lib/path.js';
import { AntiCSRFService } from './services/AntiCSRFService.js';
import { BroadcastService } from './services/BroadcastService.js';
+3 -3
View File
@@ -19,9 +19,9 @@
import UIAlert from './UI/UIAlert.js';
import UIWindowSearch from './UI/UIWindowSearch.js';
import launch_app from './helpers/launch_app.js';
import open_item from './helpers/open_item.js';
import determine_active_container_parent from './helpers/determine_active_container_parent.js';
import launch_app from './helpers/launchApp.js';
import open_item from './helpers/openItem.js';
import determine_active_container_parent from './helpers/determineActiveContainerParent.js';
$(document).bind('keydown', async function (e) {
const focused_el = document.activeElement;
+2 -2
View File
@@ -18,7 +18,7 @@
*/
import { PROCESS_IPC_ATTACHED, Service } from '../definitions.js';
import launch_app from '../helpers/launch_app.js';
import launch_app from '../helpers/launchApp.js';
export class ExecService extends Service {
static description = `
@@ -125,7 +125,7 @@ export class ExecService extends Service {
// Check if caller is in godmode. The /apps endpoint serializes
// `godmode` as a boolean while older shapes used 0/1, so
// accept both (same guard as launch_app.js).
// accept both (same guard as launchApp.js).
if ( caller_app_info && (caller_app_info.godmode === true || caller_app_info.godmode === 1) ) {
// Get target app info to create file signatures
const target_app_info = await puter.apps.get(app_name);
+1 -1
View File
@@ -1942,7 +1942,7 @@ export class UIModule extends EventListener {
if ( this.env === 'app' ) {
// The host GUI advertises the IPC dialogs it can answer via
// `puter.gui_features` on the app iframe's URL (see
// launch_app.js). A GUI that predates this feature has no
// launchApp.js). A GUI that predates this feature has no
// handler for the message and would never reply, hanging this
// never-rejecting promise forever — and a reply timeout can't
// stand in for the check, because a legitimate reply only