Skip to content

Commit

Permalink
Fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
somebody1234 committed Dec 19, 2024
1 parent d98c7b7 commit 2d1ee47
Show file tree
Hide file tree
Showing 28 changed files with 28 additions and 67 deletions.
3 changes: 3 additions & 0 deletions app/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
},
"dependencies": {
"lib0": "^0.2.85"
},
"devDependencies": {
"@types/node": "^22.9.0"
}
}
4 changes: 0 additions & 4 deletions app/common/src/accessToken.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
/** @file Types for IPC events sent between Electron's main process and its renderer process. */

// ===================
// === AccessToken ===
// ===================

/** Credentials to be saved to a credentials file. */
export interface AccessToken {
/** The user's JWT token. */
Expand Down
8 changes: 0 additions & 8 deletions app/common/src/appConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import * as path from 'node:path'
import * as process from 'node:process'
import * as url from 'node:url'

// ===============================
// === readEnvironmentFromFile ===
// ===============================

/** Read environment variables from a file based on the `ENSO_CLOUD_ENV_FILE_NAME`
* environment variable. Reads from `.env` if the variable is `production`, blank or absent.
* DOES NOT override existing environment variables if the variable is absent. */
Expand Down Expand Up @@ -74,10 +70,6 @@ function discardUndefinedEnv(name) {
}
}

// ===============
// === globals ===
// ===============

/** The value as JSON if it is not nullish, else `'undefined'`.
* @param {unknown} value - the value to `JSON.stringify()`. */
function stringify(value) {
Expand Down
12 changes: 0 additions & 12 deletions app/common/src/buildUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,9 @@ import * as fs from 'node:fs'
import * as path from 'node:path'
import process from 'node:process'

// =================
// === Constants ===
// =================

/** Indent size for outputting JSON. */
export const INDENT_SIZE = 4

// ===================
// === Environment ===
// ===================

/** Get the environment variable value.
* @param {string} name - The name of the environment variable.
* @returns {string} The value of the environment variable.
Expand Down Expand Up @@ -50,10 +42,6 @@ export function requireEnvPathExist(name) {
}
}

// ======================
// === String Helpers ===
// ======================

/** Get the common prefix of the two strings.
* @param {string} a - the first string.
* @param {string} b - the second string.
Expand Down
4 changes: 0 additions & 4 deletions app/common/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
* circular dependency in our packages.
*/

// ========================
// === Product metadata ===
// ========================

/**
* URL protocol scheme for deep links to authentication flow pages, without the `:` suffix.
*
Expand Down
4 changes: 0 additions & 4 deletions app/common/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
* here when it is not possible for a sibling package to own that code without introducing a
* circular dependency in our packages. */

// ========================
// === Product metadata ===
// ========================

/** URL protocol scheme for deep links to authentication flow pages, without the `:` suffix.
*
* For example: the deep link URL
Expand Down
2 changes: 1 addition & 1 deletion app/common/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"checkJs": true,
"skipLibCheck": false
},
"include": ["./src/", "../types/"]
"include": ["./src/"]
}
2 changes: 1 addition & 1 deletion app/gui/integration-test/dashboard/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'node:path'

import { expect, test, type Page } from '@playwright/test'

import { TEXTS } from '@common/text'
import { TEXTS } from 'enso-common/src/text'

import {
INITIAL_CALLS_OBJECT,
Expand Down
2 changes: 1 addition & 1 deletion app/gui/src/dashboard/components/MenuEntry.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @file An entry in a menu. */
import * as React from 'react'

import type * as text from '@common/text'
import * as detect from '@common/utilities/detect'
import type * as text from '../../../../common/src/text'

import BlankIcon from '#/assets/blank.svg'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as React from 'react'

import * as tw from 'tailwind-merge'

import type * as text from '../../../../../../common/src/text'
import type * as text from '@common/text'

import Check from '#/assets/check_mark.svg'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @file A visual representation of a keyboard shortcut. */
import * as React from 'react'

import type * as text from '@common/text'
import * as detect from '@common/utilities/detect'
import type * as text from '../../../../../common/src/text'

import CommandKeyIcon from '#/assets/command_key.svg'
import CtrlKeyIcon from '#/assets/ctrl_key.svg'
Expand Down
2 changes: 1 addition & 1 deletion app/gui/src/dashboard/components/dashboard/Permission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
type Backend,
type UserPermissionIdentifier,
} from '@common/services/Backend'
import type { TextId } from '@common/text'
import { merge } from '@common/utilities/data/object'
import type { TextId } from '../../../../../common/src/text'

import { Text } from '#/components/AriaComponents'
import PermissionSelector from '#/components/dashboard/PermissionSelector'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @file Types and constants related to `Column`s. */
import { BackendType, Plan, type User } from '@common/services/Backend'
import type { TextId } from '../../../../../../common/src/text'
import type { TextId } from '@common/text'

import AccessedByProjectsIcon from '#/assets/accessed_by_projects.svg'
import AccessedDataIcon from '#/assets/accessed_data.svg'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @file Paywall configuration for different plans. */
import { Plan } from '@common/services/Backend'
import type { TextId } from '../../../../../common/src/text'
import type { TextId } from '@common/text'

/** Registered paywall features. */
export const PAYWALL_FEATURES = {
Expand Down
2 changes: 1 addition & 1 deletion app/gui/src/dashboard/hooks/toastAndLogHooks.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @file */
import { toast, type Id } from 'react-toastify'

import type { Replacements, TextId } from '../../../../common/src/text'
import type { Replacements, TextId } from '@common/text'

import { useLogger } from '#/providers/LoggerProvider'
import { useText } from '#/providers/TextProvider'
Expand Down
2 changes: 1 addition & 1 deletion app/gui/src/dashboard/layouts/Settings/data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import {
type OrganizationInfo,
type User,
} from '@common/services/Backend'
import type { TextId } from '@common/text'
import { normalizePath } from '@common/utilities/data/fileInfo'
import { pick, unsafeEntries } from '@common/utilities/data/object'
import type { TextId } from '../../../../../common/src/text'

import ComputerIcon from '#/assets/computer.svg'
import CreditCardIcon from '#/assets/credit_card.svg'
Expand Down
2 changes: 1 addition & 1 deletion app/gui/src/dashboard/layouts/TabBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useQuery } from '@tanstack/react-query'
import { motion } from 'framer-motion'

import { ProjectState } from '@common/services/Backend'
import type { TextId } from '../../../../common/src/text'
import type { TextId } from '@common/text'

import { AnimatedBackground } from '#/components/AnimatedBackground'
import { Tab as AriaTab, TabList, type TabListProps } from '#/components/aria'
Expand Down
2 changes: 1 addition & 1 deletion app/gui/src/dashboard/modals/AboutModal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @file Modal for confirming delete of any type of asset. */
import * as React from 'react'

import type * as text from '../../../../common/src/text'
import type * as text from '@common/text'

import LogoIcon from '#/assets/enso_logo.svg'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import * as React from 'react'

import type * as text from '../../../../../../../../common/src/text'
import type * as text from '@common/text'

import Check from '#/assets/check_mark.svg'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { ReactNode } from 'react'
import invariant from 'tiny-invariant'

import { Plan } from '@common/services/Backend'
import type { TextId } from '../../../../../../../common/src/text'
import type { TextId } from '@common/text'

import OpenInNewTabIcon from '#/assets/open.svg'
import { Button } from '#/components/AriaComponents'
Expand Down
2 changes: 1 addition & 1 deletion app/gui/src/dashboard/modules/payments/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @file Constants for the subscribe page. */
import { Plan } from '@common/services/Backend'
import type { TextId } from '../../../../../common/src/text'
import type { TextId } from '@common/text'

/* eslint-disable @typescript-eslint/no-magic-numbers, @typescript-eslint/naming-convention */

Expand Down
2 changes: 1 addition & 1 deletion app/gui/src/dashboard/pages/authentication/Setup/Setup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Navigate, useNavigate, useSearchParams } from 'react-router-dom'
import invariant from 'tiny-invariant'

import { Plan } from '@common/services/Backend'
import type { TextId } from '../../../../../../common/src/text'
import type { TextId } from '@common/text'

import { DASHBOARD_PATH, LOGIN_PATH } from '#/appUtils'
import ArrowRight from '#/assets/arrow_right.svg'
Expand Down
2 changes: 1 addition & 1 deletion app/gui/src/dashboard/pages/dashboard/DashboardTabBar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @file The tab bar for the dashboard page. */
import type { ProjectId } from '@common/services/Backend'
import type { TextId } from '../../../../../common/src/text'
import type { TextId } from '@common/text'

import DriveIcon from '#/assets/drive.svg'
import NetworkIcon from '#/assets/network.svg'
Expand Down
8 changes: 1 addition & 7 deletions app/gui/src/dashboard/providers/TextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,8 @@ import {
type PropsWithChildren,
} from 'react'

import { Language, LANGUAGE_TO_LOCALE, TEXTS, type Replacements, type TextId } from '@common/text'
import { unsafeMutable } from '@common/utilities/data/object'
import {
Language,
LANGUAGE_TO_LOCALE,
TEXTS,
type Replacements,
type TextId,
} from '../../../../common/src/text'

/** State contained in a `TextContext`. */
export interface TextContextType {
Expand Down
2 changes: 1 addition & 1 deletion app/gui/src/dashboard/services/RemoteBackend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ import {
type UserGroupInfo,
type UserId,
} from '@common/services/Backend'
import type { Replacements, TextId } from '@common/text'
import { merge, omit, type Mutable } from '@common/utilities/data/object'
import { IS_DEV_MODE } from '@common/utilities/detect'
import { download } from '@common/utilities/download'
import type { Replacements, TextId } from '../../../../common/src/text'

import type { Logger } from '#/providers/LoggerProvider'
import type { GetText } from '#/providers/TextProvider'
Expand Down
4 changes: 1 addition & 3 deletions app/gui/src/dashboard/test/setup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/**
* @file Global setup for dashboard tests.
*/
/** @file Global setup for dashboard tests. */

import * as matchers from '@testing-library/jest-dom/matchers'
import { cleanup } from '@testing-library/react'
Expand Down
8 changes: 1 addition & 7 deletions app/ide-desktop/client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,5 @@
"esModuleInterop": true,
"paths": { "@/*": ["./src/*"] }
},
"include": [
".",
"../content",
"../types",
"../../build.json",
"src/config.json"
]
"include": [".", "../../build.json", "src/config.json"]
}
4 changes: 4 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2d1ee47

Please sign in to comment.