index int64 0 0 | repo_id stringlengths 16 181 | file_path stringlengths 28 270 | content stringlengths 1 11.6M | __index_level_0__ int64 0 10k |
|---|---|---|---|---|
0 | petrpan-code/ProtonMail/WebClients/packages/pass/docs | petrpan-code/ProtonMail/WebClients/packages/pass/docs/extension/coms.md | # Communication Layer
| 7,700 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/docs | petrpan-code/ProtonMail/WebClients/packages/pass/docs/extension/quickstart.md | # Quickstart
### Environment variables
| Name | Values | Default | Dev only |
| ----------------------------------- | --------------------------------- | ----------------------- | -------- |
| **ENV** | `"development... | 7,701 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/fathom/fathom.js | /**
* A :func:`rule` depends on another rule which itself depends on the first
* rule again, either directly or indirectly.
*/
class CycleError extends Error {}
/**
* An examined element was not contained in a browser ``window`` object, but
* something needed it to be.
*/
class NoWindowError extends Error {}
va... | 7,702 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/fathom/index.d.ts | import { Fnode, rule, ruleset } from './fathom.js';
import * as fathomWeb from './fathom.js';
export { fathomWeb as fathom };
declare const FORM_CLUSTER_ATTR = 'data-protonpass-form';
declare const kFieldSelector = 'input, select, textarea';
declare const kEmailSelector = 'input[name="email"], input[id="email"]';
dec... | 7,703 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/fathom/index.js | import { clusters as clusters$1, dom, out, rule, ruleset, score, type, utils } from './fathom.js';
import * as fathomWeb from './fathom.js';
export { fathomWeb as fathom };
const MAX_FORM_FIELD_WALK_UP = 3;
const MAX_FORM_HEADING_WALK_UP = 3;
const MAX_HEADING_HORIZONTAL_DIST = 75;
const MAX_HEADING_VERTICAL_DIST ... | 7,704 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useActionRequest.spec.tsx | import { Provider as ReduxProvider } from 'react-redux';
import { type AnyAction, configureStore, createAction } from '@reduxjs/toolkit';
import { act, renderHook } from '@testing-library/react-hooks';
import { requestMiddleware } from '@proton/pass/store/middlewares/request-middleware';
import request from '@proton/... | 7,705 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useActionRequest.ts | import { useMemo, useRef, useState } from 'react';
import { useDispatch } from 'react-redux';
import type { AnyAction } from 'redux';
import type { RequestOptions } from '@proton/pass/store/actions/with-request';
import { type WithRequest, withRevalidate } from '@proton/pass/store/actions/with-request';
import type {... | 7,706 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useActionRequestEffect.ts | import { useEffect, useMemo, useRef, useState } from 'react';
import { useSelector } from 'react-redux';
import type { RequestEntry } from '@proton/pass/store/reducers';
import { selectRequest } from '@proton/pass/store/selectors';
type Options = {
onStart?: <R extends RequestEntry<'start', any>>(request: R) => v... | 7,707 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useActivityProbe.ts | import { useRef } from 'react';
import type { MessageWithSenderFactory } from '@proton/pass/lib/extension/message';
import { sendMessage } from '@proton/pass/lib/extension/message';
import { WorkerMessageType } from '@proton/pass/types';
import noop from '@proton/utils/noop';
export type ActivityProbe = ReturnType<ty... | 7,708 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useAliasDetails.ts | import { useEffect, useMemo } from 'react';
import { useSelector } from 'react-redux';
import { c } from 'ttag';
import useNotifications from '@proton/components/hooks/useNotifications';
import { getAliasDetailsIntent } from '@proton/pass/store/actions';
import { aliasDetailsRequest } from '@proton/pass/store/actions... | 7,709 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useAliasForLoginModal.ts | import { useEffect, useState } from 'react';
import { useSelector } from 'react-redux';
import type { FormikContextType } from 'formik';
import { selectAliasByAliasEmail } from '@proton/pass/store/selectors';
import type { LoginItemFormValues } from '@proton/pass/types';
import { merge } from '@proton/pass/utils/obje... | 7,710 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useAliasOptions.ts | import { useEffect, useMemo } from 'react';
import { useSelector } from 'react-redux';
import { getAliasOptionsIntent } from '@proton/pass/store/actions';
import { aliasOptionsRequest } from '@proton/pass/store/actions/requests';
import { selectAliasOptions } from '@proton/pass/store/selectors';
import type { MaybeNul... | 7,711 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useAsyncModalHandles.ts | /**
* FIXME: split the responsibilities into 2 separate
* building blocks that consumers can compose :
* 1. a component for handling the modal
* 2. a hook for handling the async resolver
*/
import { useCallback, useMemo, useRef, useState } from 'react';
import type { ModalProps } from '@proton/components/componen... | 7,712 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useConfirm.ts | import { useCallback, useState } from 'react';
import type { MaybeNull } from '@proton/pass/types';
/**
* The `useConfirm` hook lets you manage and confirm the execution of a callback.
* It allows you to initiate an action, confirm it when ready, and cancel it if
* necessary. This hook is particularly useful when ... | 7,713 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useCopyToClipboard.ts | import { c } from 'ttag';
import { useNotifications } from '@proton/components';
import { logger } from '@proton/pass/utils/logger';
export const useCopyToClipboard = () => {
const { createNotification } = useNotifications();
return async (value: string) => {
try {
await navigator.clipboa... | 7,714 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useCurrentTabURL.ts | import { useTabsQuery } from './useTabsQuery';
export const useCurrentTabURL = (onURLResult: (url?: URL) => void) => {
useTabsQuery({ active: true, currentWindow: true }, (tabs) => {
const currentURL = tabs?.[0]?.url;
onURLResult(currentURL !== undefined ? new URL(currentURL) : undefined);
});
... | 7,715 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useDebouncedValue.ts | import { useCallback, useEffect, useState } from 'react';
import _debounce from '@proton/utils/debounce';
export const useDebouncedValue = <T extends string | number>(valueIn: T, time: number): T => {
const [valueOut, setValueOut] = useState(valueIn);
const debounce = useCallback(
_debounce((value) =>... | 7,716 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useDeobfuscatedItem.ts | import { useMemo } from 'react';
import { deobfuscateItem } from '@proton/pass/lib/items/item.obfuscation';
import type { Item, ItemType, UnsafeItem } from '@proton/pass/types';
export const useDeobfuscatedItem = <T extends ItemType>(item: Item<T>) =>
useMemo(() => deobfuscateItem(item as Item) as UnsafeItem<T>, ... | 7,717 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useDeobfuscatedValue.ts | import { useMemo } from 'react';
import { type XorObfuscation, deobfuscate } from '@proton/pass/utils/obfuscate/xor';
export const useDeobfuscatedValue = (value: XorObfuscation) => useMemo(() => deobfuscate(value), [value.m, value.v]);
| 7,718 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useEnsureMounted.ts | import { useCallback } from 'react';
import useIsMounted from '@proton/hooks/useIsMounted';
import type { Callback, Maybe } from '@proton/pass/types';
export const useEnsureMounted = () => {
const isMounted = useIsMounted();
return useCallback(
<T extends Callback>(fn: T) =>
((...args: Par... | 7,719 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useFeatureFlag.ts | import { useSelector } from 'react-redux';
import { selectFeatureFlag } from '@proton/pass/store/selectors';
import type { PassFeature } from '@proton/pass/types/api/features';
export const useFeatureFlag = (feature: PassFeature): boolean => useSelector(selectFeatureFlag(feature));
| 7,720 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useFieldControl.ts | import type { FieldProps } from 'formik';
export const useFieldControl = (props: FieldProps) => {
const { field, form } = props;
const { name } = field;
const { touched, errors } = form;
const error = touched[name] && errors[name];
return { error };
};
| 7,721 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useFieldMask.ts | import { useEffect, useRef, useState } from 'react';
import type { FieldProps } from 'formik';
import type { InputMask, InputMaskElement } from 'imask';
import IMask from 'imask/esm/imask';
import type { FactoryOpts } from 'imask/masked/factory';
import type { MaybeNull } from '@proton/pass/types';
import noop from '... | 7,722 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useFilteredItems.ts | import { useSelector } from 'react-redux';
import { selectItemsSearchResult } from '@proton/pass/store/selectors';
import type { ItemFilters } from '@proton/pass/types';
export const useFilteredItems = (filters: ItemFilters & { trashed?: boolean }) =>
useSelector(
selectItemsSearchResult(
filt... | 7,723 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useFilters.ts | import { useEffect, useMemo, useState } from 'react';
import { useHistory, useLocation } from 'react-router-dom';
import type { ItemFilters } from '@proton/pass/types';
import { partialMerge } from '@proton/pass/utils/object/merge';
const INITIAL_FILTERS: ItemFilters = { search: '', sort: 'recent', type: '*', selecte... | 7,724 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useImportForm.ts | import type { ComponentProps } from 'react';
import { useRef, useState } from 'react';
import { useSelector } from 'react-redux';
import type { FormikContextType, FormikErrors } from 'formik';
import { useFormik } from 'formik';
import { c } from 'ttag';
import type { Dropzone, FileInput } from '@proton/components/co... | 7,725 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useItemDraft.ts | import { useCallback, useEffect, useState } from 'react';
import { useDispatch } from 'react-redux';
import { useLocation } from 'react-router-dom';
import type { FormikTouched } from 'formik';
import { type FormikContextType } from 'formik';
import { itemDraftDiscard, itemDraftSave } from '@proton/pass/store/actions... | 7,726 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useMaxLengthLimiter.ts | import type { KeyboardEventHandler } from 'react';
import { c } from 'ttag';
import { useNotifications } from '@proton/components/hooks';
export const useMaxLengthLimiter = () => {
const { createNotification } = useNotifications();
return (
maxLength: number,
originalOnKeyDown?: Keyb... | 7,727 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useMenuItems.ts | import { useDispatch } from 'react-redux';
import { c } from 'ttag';
import type { IconName } from '@proton/components';
import { usePasswordContext } from '@proton/pass//components/PasswordGenerator/PasswordContext';
import { syncIntent } from '@proton/pass//store/actions';
import { usePassCore } from '@proton/pass/... | 7,728 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useNavigateToUpgrade.ts | import { usePassCore } from '@proton/pass/components/Core/PassCoreProvider';
export const useNavigateToUpgrade = () => {
const { onLink, config } = usePassCore();
return () => onLink(`${config.SSO_URL}/pass/upgrade`);
};
| 7,729 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useNotificationEnhancer.tsx | import { type FC, useCallback } from 'react';
import { c } from 'ttag';
import { CircleLoader } from '@proton/atoms/CircleLoader';
import { Icon, InlineLinkButton } from '@proton/components/components';
import type { Notification } from '@proton/pass/store/actions/with-notification';
import { NotificationKey } from '... | 7,730 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/usePassConfig.ts | import { useContext } from 'react';
import ConfigContext from '@proton/components/containers/config/configContext';
import type { ProtonConfig } from '@proton/shared/lib/interfaces';
export type PassConfig = ProtonConfig & { SSO_URL: string };
export const usePassConfig = () => useContext(ConfigContext) as PassConfi... | 7,731 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/usePasswordGenerator.tsx | import { useCallback, useEffect, useState } from 'react';
import { useDispatch } from 'react-redux';
import { DEFAULT_PASSWORD_LENGTH, alphabeticChars, digitChars } from '@proton/pass/lib/password/constants';
import type { GeneratePasswordOptions } from '@proton/pass/lib/password/generator';
import { generatePassword ... | 7,732 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/usePasteLengthLimiter.ts | import type { ClipboardEventHandler } from 'react';
import { c } from 'ttag';
import { useNotifications } from '@proton/components/hooks';
export const usePasteLengthLimiter = () => {
const { createNotification } = useNotifications();
return (
maxLength: number,
originalOnPaste?: Cli... | 7,733 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/usePeriodicOtpCode.ts | import { useCallback, useEffect, useRef, useState } from 'react';
import { c } from 'ttag';
import { useNotifications } from '@proton/components';
import type { MaybeNull, MaybePromise, OtpCode, OtpRequest } from '@proton/pass/types';
import { useEnsureMounted } from './useEnsureMounted';
export type UsePeriodOtpCo... | 7,734 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useSessionLockPinSubmitEffect.ts | import { useEffect, useRef } from 'react';
import { SESSION_LOCK_PIN_LENGTH } from '../components/Lock/constants';
import { useDebouncedValue } from './useDebouncedValue';
type UseSessionLockPinOptions = {
onSubmit: (pin: string) => void;
};
/* Calls onSubmit when the PIN has reached the necessary length */
expo... | 7,735 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useShareAccessOptionsPolling.ts | import { useEffect, useRef, useState } from 'react';
import usePrevious from '@proton/hooks/usePrevious';
import { ACTIVE_POLLING_TIMEOUT } from '@proton/pass/lib/events/constants';
import { getShareAccessOptionsIntent } from '@proton/pass/store/actions';
import { type Maybe } from '@proton/pass/types';
import { useA... | 7,736 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useTabsQuery.ts | import { useEffect } from 'react';
import type { Tabs } from 'webextension-polyfill';
import browser from '@proton/pass/lib/globals/browser';
import noop from '@proton/utils/noop';
export const useTabsQuery = (query: Tabs.QueryQueryInfoType, onTabsResult: (url: Tabs.Tab[]) => void) => {
useEffect(() => {
... | 7,737 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass | petrpan-code/ProtonMail/WebClients/packages/pass/hooks/useVisibleEffect.ts | import { useEffect, useRef } from 'react';
import type { Maybe } from '@proton/pass/types/utils';
const FOCUS_CHECK_DELAY = 10;
export const isDocumentVisible = () => document.visibilityState === 'visible';
export const isDocumentFocused = () => document.hasFocus();
export const useVisibleEffect = (effect: (visible... | 7,738 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/api/api.ts | import type { Api } from '@proton/pass/types';
export let api: Api;
export const exposeApi = (value: Api) => (api = value);
| 7,739 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/api/errors.ts | export const LockedSessionError = () => {
const error = new Error('Session locked');
error.name = 'LockedSession';
return error;
};
| 7,740 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/api/factory.ts | import { defaultApiStatus } from '@proton/components/containers/api/apiStatusContext';
import { updateServerTime } from '@proton/crypto/lib/serverTime';
import type {
Api,
ApiAuth,
ApiCallFn,
ApiOptions,
ApiResult,
ApiState,
ApiSubscribtionEvent,
Maybe,
} from '@proton/pass/types';
impor... | 7,741 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/api/handlers.ts | import type { ApiAuth, ApiCallFn, ApiOptions, ApiState, Maybe } from '@proton/pass/types';
import { getApiError } from '@proton/shared/lib/api/helpers/apiErrorHelper';
import { retryHandler } from '@proton/shared/lib/api/helpers/retryHandler';
import { AppVersionBadError, InactiveSessionError } from '@proton/shared/lib... | 7,742 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/api/proxy.ts | import { type Maybe } from '@proton/pass/types';
import { truthy } from '@proton/pass/utils/fp/predicates';
import { logger } from '@proton/pass/utils/logger';
import { getApiError } from '@proton/shared/lib/api/helpers/apiErrorHelper';
import { getAuthHeaders } from '@proton/shared/lib/fetch/headers';
import noop from... | 7,743 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/api/refresh.ts | import type { ApiAuth, ApiCallFn, Maybe } from '@proton/pass/types';
import { logger } from '@proton/pass/utils/logger';
import { setRefreshCookies as refreshTokens } from '@proton/shared/lib/api/auth';
import { retryHandler } from '@proton/shared/lib/api/helpers/retryHandler';
import { InactiveSessionError } from '@pr... | 7,744 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/api/utils.ts | export const getSilenced = ({ silence }: any = {}, code: string | number): boolean =>
Array.isArray(silence) ? silence.includes(code) : !!silence;
export const isPassSessionRoute = (url?: string): boolean => Boolean(url?.startsWith('pass/v1/user/session/lock'));
| 7,745 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/auth/address.ts | import { api } from '@proton/pass/lib/api/api';
import type { GetAllPublicKeysResponse, Maybe } from '@proton/pass/types';
import { getApiError } from '@proton/shared/lib/api/helpers/apiErrorHelper';
import { getAllPublicKeys } from '@proton/shared/lib/api/keys';
import { API_CUSTOM_ERROR_CODES } from '@proton/shared/l... | 7,746 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/auth/fork.ts | import { c } from 'ttag';
import type { Api, MaybeNull } from '@proton/pass/types';
import { pullForkSession, setRefreshCookies as refreshTokens } from '@proton/shared/lib/api/auth';
import { getUser } from '@proton/shared/lib/api/user';
import { getAppHref } from '@proton/shared/lib/apps/helper';
import type { FORK_T... | 7,747 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/auth/service.ts | import { c } from 'ttag';
import type { Maybe, MaybeNull, MaybePromise } from '@proton/pass/types';
import { type Api, SessionLockStatus } from '@proton/pass/types';
import { asyncLock } from '@proton/pass/utils/fp/promises';
import { logger } from '@proton/pass/utils/logger';
import { getEpoch } from '@proton/pass/ut... | 7,748 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/auth/session-lock.ts | import { api } from '@proton/pass/lib/api/api';
import { SessionLockStatus } from '@proton/pass/types';
export type SessionLockCheckResult = {
status: SessionLockStatus;
ttl?: number;
};
export const checkSessionLock = async (): Promise<SessionLockCheckResult> => {
try {
const { LockInfo } = await... | 7,749 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/auth/session.ts | /* Inspired from packages/shared/lib/authentication/persistedSessionHelper.ts */
import type { Api } from '@proton/pass/types';
import { isObject } from '@proton/pass/utils/object/is-object';
import { getLocalKey, setLocalKey } from '@proton/shared/lib/api/auth';
import { InactiveSessionError } from '@proton/shared/lib... | 7,750 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/auth/store.ts | import type { Maybe, SessionLockStatus } from '@proton/pass/types';
import type { Store } from '@proton/pass/utils/store';
import { encodedGetter, encodedSetter } from '@proton/pass/utils/store';
import type { AuthSession } from './session';
export type AuthStore = ReturnType<typeof createAuthStore>;
const PASS_ACCE... | 7,751 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/client/index.ts | /**
* Be very careful when editing these predicates :
* They are used accross the worker code-base in order
* to safe-guard certain actions or block them. Some
* of them are also used in the UI code to trigger
* certain effects.
*/
import { AppStatus } from '@proton/pass/types';
import { oneOf, or } from '@proton... | 7,752 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/pass-crypto.spec.ts | import { CryptoProxy } from '@proton/crypto';
import type { ItemRevisionContentsResponse, ShareGetResponse, ShareKeyResponse } from '@proton/pass/types';
import { CONTENT_FORMAT_VERSION, ItemState, PassEncryptionTag, ShareType } from '@proton/pass/types';
import { ADDRESS_RECEIVE, ADDRESS_SEND, ADDRESS_STATUS } from '@... | 7,753 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/pass-crypto.ts | import { CryptoProxy } from '@proton/crypto';
import { Api as CryptoApi } from '@proton/crypto/lib/worker/api';
import { authentication } from '@proton/pass/lib/auth/store';
import type {
PassCryptoManagerContext,
PassCryptoWorker,
SerializedCryptoContext,
ShareContext,
ShareGetResponse,
ShareKe... | 7,754 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/share-manager.spec.ts | import type { VaultKey } from '@proton/pass/types';
import { ShareType } from '@proton/pass/types';
import { createShareManager } from './share-manager';
import { generateKey, getSymmetricKey } from './utils/crypto-helpers';
import { PassCryptoShareError, PassCryptoVaultError } from './utils/errors';
import { TEST_USE... | 7,755 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/share-manager.ts | import type {
OpenedShare,
Rotation,
SerializedCryptoContext,
ShareContext,
ShareManager,
TypedOpenedShare,
VaultKey,
} from '@proton/pass/types';
import { ShareType } from '@proton/pass/types';
import { base64StringToUint8Array, uint8ArrayToBase64String } from '@proton/shared/lib/helpers/en... | 7,756 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/index.ts | export * from './invite/create-invite-keys';
export * from './invite/create-new-user-signature';
export * from './invite/open-invite-key';
export * from './invite/read-vault-invite';
export * from './invite/reencrypt-invite-keys';
export * from './item/create-item';
export * from './item/move-item';
export * from './it... | 7,757 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/invite/create-invite-keys.spec.ts | import { CryptoProxy, VERIFICATION_STATUS } from '@proton/crypto';
import { PassSignatureContext } from '@proton/pass/types';
import { base64StringToUint8Array } from '@proton/shared/lib/helpers/encoding';
import {
createRandomKey,
createRandomVaultKey,
releaseCryptoProxy,
setupCryptoProxyForTesting,
}... | 7,758 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/invite/create-invite-keys.ts | import type { PrivateKeyReference, PublicKeyReference } from '@proton/crypto';
import { CryptoProxy } from '@proton/crypto';
import { type ItemKey, type KeyRotationKeyPair, PassSignatureContext, type VaultKey } from '@proton/pass/types';
import { uint8ArrayToBase64String } from '@proton/shared/lib/helpers/encoding';
t... | 7,759 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/invite/create-new-user-signature.spec.ts | import { CryptoProxy, VERIFICATION_STATUS } from '@proton/crypto/lib';
import { PassSignatureContext } from '@proton/pass/types';
import { base64StringToUint8Array } from '@proton/shared/lib/helpers/encoding';
import {
createRandomKey,
createRandomVaultKey,
releaseCryptoProxy,
setupCryptoProxyForTestin... | 7,760 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/invite/create-new-user-signature.ts | import { CryptoProxy, type PrivateKeyReference } from '@proton/crypto/lib';
import { PassSignatureContext, type VaultKey } from '@proton/pass/types';
import { stringToUint8Array, uint8ArrayToBase64String } from '@proton/shared/lib/helpers/encoding';
type CreateNewUserSignatureProcessParams = {
invitedEmail: string... | 7,761 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/invite/open-invite-key.spec.ts | import {
createRandomKey,
createRandomVaultKey,
releaseCryptoProxy,
setupCryptoProxyForTesting,
} from '../../utils/testing';
import { createInviteKeys } from './create-invite-keys';
import { openInviteKey } from './open-invite-key';
describe('open invite keys', () => {
beforeAll(async () => setupC... | 7,762 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/invite/open-invite-key.ts | import type { PrivateKeyReference, PublicKeyReference } from '@proton/crypto';
import { CryptoProxy } from '@proton/crypto';
import type { KeyRotationKeyPair } from '@proton/pass/types';
import { PassSignatureContext } from '@proton/pass/types';
import { base64StringToUint8Array } from '@proton/shared/lib/helpers/encod... | 7,763 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/invite/read-vault-invite.spec.ts | import { encryptData } from '@proton/pass/lib/crypto/utils/crypto-helpers';
import {
createRandomKey,
createRandomVaultKey,
randomContents,
releaseCryptoProxy,
setupCryptoProxyForTesting,
} from '@proton/pass/lib/crypto/utils/testing';
import { PassEncryptionTag } from '@proton/pass/types';
import {... | 7,764 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/invite/read-vault-invite.ts | import type { PrivateKeyReference, PublicKeyReference } from '@proton/crypto';
import { type KeyRotationKeyPair, PassEncryptionTag } from '@proton/pass/types';
import { base64StringToUint8Array } from '@proton/shared/lib/helpers/encoding';
import { decryptData, getSymmetricKey } from '../../utils/crypto-helpers';
impo... | 7,765 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/invite/reencrypt-invite-keys.spec.ts | import { CryptoProxy, VERIFICATION_STATUS } from '@proton/crypto';
import { base64StringToUint8Array } from '@proton/shared/lib/helpers/encoding';
import {
createRandomKey,
createRandomVaultKey,
releaseCryptoProxy,
setupCryptoProxyForTesting,
} from '../../utils/testing';
import { createInviteKeys } fr... | 7,766 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/invite/reencrypt-invite-keys.ts | import type { PrivateKeyReference, PublicKeyReference } from '@proton/crypto';
import { CryptoProxy } from '@proton/crypto';
import type { KeyRotationKeyPair } from '@proton/pass/types';
import { uint8ArrayToBase64String } from '@proton/shared/lib/helpers/encoding';
import type { DecryptedKey } from '@proton/shared/lib... | 7,767 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/item/create-item.spec.ts | import type { VaultKey } from '@proton/pass/types';
import { CONTENT_FORMAT_VERSION, PassEncryptionTag } from '@proton/pass/types';
import { base64StringToUint8Array } from '@proton/shared/lib/helpers/encoding';
import { decryptData, generateKey, getSymmetricKey } from '../../utils/crypto-helpers';
import { PassCrypto... | 7,768 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/item/create-item.ts | import type { ItemCreateRequest, VaultKey } from '@proton/pass/types';
import { CONTENT_FORMAT_VERSION, PassEncryptionTag } from '@proton/pass/types';
import { pipe } from '@proton/pass/utils/fp/pipe';
import { uint8ArrayToBase64String } from '@proton/shared/lib/helpers/encoding';
import { encryptData, generateKey, ge... | 7,769 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/item/move-item.spec.ts | import type { VaultKey } from '@proton/pass/types';
import { CONTENT_FORMAT_VERSION, PassEncryptionTag } from '@proton/pass/types';
import { base64StringToUint8Array } from '@proton/shared/lib/helpers/encoding';
import { decryptData, generateKey, getSymmetricKey } from '../../utils/crypto-helpers';
import { PassCrypto... | 7,770 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/item/move-item.ts | import type { ItemMoveSingleToShareRequest, VaultKey } from '@proton/pass/types';
import { PassCryptoItemError } from '../../utils/errors';
import { createItem } from './create-item';
type MoveItemProcessParams = {
destinationShareId: string;
destinationVaultKey: VaultKey;
content: Uint8Array;
};
export ... | 7,771 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/item/open-item-key.spec.ts | import type { ItemKeyResponse, VaultKey } from '@proton/pass/types';
import { PassEncryptionTag } from '@proton/pass/types';
import { uint8ArrayToBase64String } from '@proton/shared/lib/helpers/encoding';
import { encryptData, generateKey, getSymmetricKey } from '../../utils/crypto-helpers';
import { TEST_USER_KEY_ID ... | 7,772 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/item/open-item-key.ts | import type { ItemKey, ItemKeyResponse, VaultKey } from '@proton/pass/types';
import { PassEncryptionTag } from '@proton/pass/types';
import { base64StringToUint8Array } from '@proton/shared/lib/helpers/encoding';
import { decryptData, getSymmetricKey } from '../../utils/crypto-helpers';
type OpenVaultKeyProcessParam... | 7,773 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/item/open-item.spec.ts | import type { ItemRevisionContentsResponse, VaultKey } from '@proton/pass/types';
import { ItemState } from '@proton/pass/types';
import { generateKey, getSymmetricKey } from '../../utils/crypto-helpers';
import { PassCryptoItemError } from '../../utils/errors';
import { TEST_USER_KEY_ID, randomContents } from '../../... | 7,774 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/item/open-item.ts | import type { ItemRevisionContentsResponse, OpenedItem, VaultKey } from '@proton/pass/types';
import { PassEncryptionTag } from '@proton/pass/types';
import { base64StringToUint8Array } from '@proton/shared/lib/helpers/encoding';
import { decryptData } from '../../utils/crypto-helpers';
import { PassCryptoItemError } ... | 7,775 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/item/update-item.spec.ts | import type { ItemKey } from '@proton/pass/types';
import { CONTENT_FORMAT_VERSION, PassEncryptionTag } from '@proton/pass/types';
import { base64StringToUint8Array } from '@proton/shared/lib/helpers/encoding';
import { decryptData, generateKey, getSymmetricKey } from '../../utils/crypto-helpers';
import { PassCryptoI... | 7,776 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/item/update-item.ts | import type { ItemKey, ItemUpdateRequest } from '@proton/pass/types';
import { CONTENT_FORMAT_VERSION, PassEncryptionTag } from '@proton/pass/types';
import { pipe } from '@proton/pass/utils/fp/pipe';
import { uint8ArrayToBase64String } from '@proton/shared/lib/helpers/encoding';
import { encryptData } from '../../uti... | 7,777 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/share/open-share.spec.ts | import { CONTENT_FORMAT_VERSION, type ShareGetResponse, ShareType } from '@proton/pass/types';
import { createRandomKey, randomContents, releaseCryptoProxy, setupCryptoProxyForTesting } from '../../utils/testing';
import { createVault } from '../vault/create-vault';
import { openVaultKey } from '../vault/open-vault-ke... | 7,778 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/share/open-share.ts | import { decryptData } from '@proton/pass/lib/crypto/utils/crypto-helpers';
import type { OpenedShare, ShareGetResponse, ShareRole, VaultKey } from '@proton/pass/types';
import { PassEncryptionTag, ShareType } from '@proton/pass/types';
import { base64StringToUint8Array } from '@proton/shared/lib/helpers/encoding';
ty... | 7,779 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/vault/create-vault.spec.ts | import { CryptoProxy, VERIFICATION_STATUS } from '@proton/crypto';
import { CONTENT_FORMAT_VERSION, PassEncryptionTag } from '@proton/pass/types';
import { base64StringToUint8Array } from '@proton/shared/lib/helpers/encoding';
import { decryptData, getSymmetricKey } from '../../utils/crypto-helpers';
import { PassCryp... | 7,780 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/vault/create-vault.ts | import { CryptoProxy } from '@proton/crypto';
import type { VaultCreateRequest } from '@proton/pass/types';
import { CONTENT_FORMAT_VERSION, PassEncryptionTag } from '@proton/pass/types';
import { uint8ArrayToBase64String } from '@proton/shared/lib/helpers/encoding';
import type { DecryptedKey } from '@proton/shared/li... | 7,781 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/vault/open-vault-key.spec.ts | import { PassEncryptionTag } from '@proton/pass/types';
import { base64StringToUint8Array } from '@proton/shared/lib/helpers/encoding';
import lastItem from '@proton/utils/lastItem';
import { decryptData } from '../../utils/crypto-helpers';
import {
createRandomKey,
randomAddress,
randomContents,
relea... | 7,782 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/vault/open-vault-key.ts | import { CryptoProxy, VERIFICATION_STATUS } from '@proton/crypto';
import type { ShareKeyResponse, VaultKey } from '@proton/pass/types';
import { base64StringToUint8Array } from '@proton/shared/lib/helpers/encoding';
import type { DecryptedKey } from '@proton/shared/lib/interfaces';
import { getSymmetricKey } from '..... | 7,783 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/vault/update-vault.spec.ts | import type { VaultKey } from '@proton/pass/types';
import { CONTENT_FORMAT_VERSION, PassEncryptionTag } from '@proton/pass/types';
import { base64StringToUint8Array } from '@proton/shared/lib/helpers/encoding';
import { decryptData, generateKey, getSymmetricKey } from '../../utils/crypto-helpers';
import { PassCrypto... | 7,784 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/processes/vault/update-vault.ts | import type { VaultKey, VaultUpdateRequest } from '@proton/pass/types';
import { CONTENT_FORMAT_VERSION, PassEncryptionTag } from '@proton/pass/types';
import { uint8ArrayToBase64String } from '@proton/shared/lib/helpers/encoding';
import { encryptData } from '../../utils/crypto-helpers';
import { PassCryptoVaultError... | 7,785 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/utils/addresses.ts | import { and, or } from '@proton/pass/utils/fp/predicates';
import { getIsAddressActive, getIsAddressEnabled, getIsAddressExternal } from '@proton/shared/lib/helpers/address';
import type { Address } from '@proton/shared/lib/interfaces';
type AddressPredicate = (address: Address) => boolean;
/**
* When user is exter... | 7,786 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/utils/cache.decrypt.ts | import { deobfuscateItem, obfuscateItem } from '@proton/pass/lib/items/item.obfuscation';
import type { ItemsByShareId } from '@proton/pass/store/reducers';
import type { State } from '@proton/pass/store/types';
import type { Maybe, PassCryptoSnapshot, SerializedCryptoContext } from '@proton/pass/types';
import { PassE... | 7,787 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/utils/cache.encrypt.ts | import { authentication } from '@proton/pass/lib/auth/store';
import type { Maybe } from '@proton/pass/types';
import { ENCRYPTION_ALGORITHM } from '@proton/shared/lib/authentication/cryptoHelper';
import { stringToUint8Array } from '@proton/shared/lib/helpers/encoding';
const KEY_ALGORITHM = { name: 'AES-GCM', length... | 7,788 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/utils/crypto-helpers.ts | import { stringToUtf8Array } from '@proton/crypto/lib/utils';
import type { PassEncryptionTag } from '@proton/pass/types';
import mergeUint8Arrays from '@proton/utils/mergeUint8Arrays';
export const KEY_LENGTH = 32;
const IV_LENGTH = 12;
const ALGORITHM = 'AES-GCM';
export const getSymmetricKey = async (key: Uint8Arr... | 7,789 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/utils/errors.ts | export class PassCryptoError extends Error {}
export class PassCryptoNotHydratedError extends PassCryptoError {}
export class PassCryptoHydrationError extends PassCryptoError {}
export class PassCryptoShareError extends PassCryptoError {}
export class PassCryptoVaultError extends PassCryptoError {}
export class PassCry... | 7,790 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/utils/testing.ts | import type { PrivateKeyReference } from '@proton/crypto';
import { CryptoProxy } from '@proton/crypto';
import type { ShareGetResponse, ShareKeyResponse, TypedOpenedShare, VaultKey } from '@proton/pass/types';
import { CONTENT_FORMAT_VERSION, ShareType } from '@proton/pass/types';
import { ADDRESS_TYPE } from '@proton... | 7,791 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto | petrpan-code/ProtonMail/WebClients/packages/pass/lib/crypto/utils/validators.ts | import { c } from 'ttag';
import { PassCryptoItemError } from './errors';
/* this is roughly equivalent to a 7kb binary blob */
export const MAX_ITEM_CONTENT_B64_LENGTH = 53248;
export const validateItemContentSize = (base64Content: string): string => {
if (base64Content.length > MAX_ITEM_CONTENT_B64_LENGTH) {
... | 7,792 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/events/constants.ts | export const ACTIVE_POLLING_TIMEOUT = 30_000; /* 30 seconds */
export const INACTIVE_POLLING_TIMEOUT = 1_800_000; /* 30 minutes */
| 7,793 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/events/manager.spec.ts | import type { Api } from '@proton/pass/types';
import { FIBONACCI_LIST } from '@proton/shared/lib/constants';
import { eventManager } from './manager';
const TEST_INTERVAL = 5_000;
const getTestEventID = (n: number = 1) => `TEST_EVENT_ID_${n}`;
const createMockedEventManager = () => {
const mockApi = jest.fn().m... | 7,794 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/events/manager.ts | import type { Maybe } from '@proton/pass/types';
import type { Api } from '@proton/pass/types/api';
import { logger } from '@proton/pass/utils/logger';
import { FIBONACCI_LIST } from '@proton/shared/lib/constants';
import createListeners from '@proton/shared/lib/helpers/listeners';
import { onceWithQueue } from '@proto... | 7,795 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/export/export.spec.ts | import JSZip from 'jszip';
import { CryptoProxy } from '@proton/crypto';
import { releaseCryptoProxy, setupCryptoProxyForTesting } from '@proton/pass/lib/crypto/utils/testing';
import { CONTENT_FORMAT_VERSION, ItemState } from '@proton/pass/types';
import { getEpoch } from '@proton/pass/utils/time/get-epoch';
import {... | 7,796 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/export/export.ts | import JSZip from 'jszip';
import { CryptoProxy } from '@proton/crypto';
import { PASS_APP_NAME } from '@proton/shared/lib/constants';
import { uint8ArrayToBase64String } from '@proton/shared/lib/helpers/encoding';
import type { ExportPayload } from './types';
/**
* Exporting data from the extension uses the .zip f... | 7,797 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib | petrpan-code/ProtonMail/WebClients/packages/pass/lib/export/types.ts | import type { ItemType, UnsafeItemRevision, VaultShareContent } from '@proton/pass/types';
export type ExportedItem<T extends ItemType = ItemType> = Omit<
UnsafeItemRevision<T>,
'revision' | 'revisionTime' | 'lastUseTime'
>;
export type ExportPayload = {
version: string;
encrypted: boolean;
userId... | 7,798 |
0 | petrpan-code/ProtonMail/WebClients/packages/pass/lib/extension | petrpan-code/ProtonMail/WebClients/packages/pass/lib/extension/message/index.ts | export * from './send-message';
export * from './message-broker';
| 7,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.