Skip to content

Commit 60b767d

Browse files
authored
feat: mf-6641 integrate google drive (#12176)
* feat: mf-6641 integrate google drive * feat: google drive * refactor: organize routes * refactor: add google drive client to manage file * feat: backup to google drive and download backup file * merge into browser * upload and merge * clean up * refactor: update google drive
1 parent 04179e4 commit 60b767d

File tree

72 files changed

+2934
-528
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2934
-528
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,4 @@ common/autoinstallers/*/.npmrc
122122
/package-lock.json
123123
/yarn.lock
124124
quick-lint-js.config
125+
.aider*

packages/backup-format/src/version-3/index.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ export async function encryptBackup(password: BufferSource, binaryBackup: Buffer
1414
export async function decryptBackup(password: BufferSource, data: ArrayBuffer | ArrayLike<number>) {
1515
const container = await parseEncryptedJSONContainer(SupportedVersions.Version0, data)
1616

17-
const _ = decode(container)
18-
if (!Array.isArray(_) || _.length !== 3) throw new TypeError(BackupErrors.UnknownFormat)
19-
if (!_.every((x): x is Uint8Array => x instanceof Uint8Array)) throw new TypeError(BackupErrors.UnknownFormat)
20-
const [pbkdf2IV, encryptIV, encrypted] = _
17+
const payloadTuple = decode(container)
18+
if (!Array.isArray(payloadTuple) || payloadTuple.length !== 3) throw new TypeError(BackupErrors.UnknownFormat)
19+
if (!payloadTuple.every((x): x is Uint8Array => x instanceof Uint8Array))
20+
throw new TypeError(BackupErrors.UnknownFormat)
21+
const [pbkdf2IV, encryptIV, encrypted] = payloadTuple
2122

2223
const aes = await getAESFromPassword(password, pbkdf2IV)
2324

Lines changed: 14 additions & 0 deletions
Loading

packages/icons/icon-generated-as-jsx.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/icons/icon-generated-as-url.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/icons/plugins/GoPlus.svg

Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 9 additions & 11 deletions
Loading
Lines changed: 9 additions & 11 deletions
Loading

packages/icons/utils/internal.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface GeneratedIconProps<Variants extends MaskIconPalette = never>
2020
export type GeneratedIcon = ComponentType<GeneratedIconProps> | ComponentType<GeneratedIconProps<'dark' | 'light'>>
2121

2222
export interface GeneratedIconNonSquareProps<Variants extends MaskIconPalette = never>
23-
extends React.HTMLProps<HTMLElement> {
23+
extends Omit<React.HTMLProps<HTMLElement>, 'children'> {
2424
variant?: Variants[] | Variants
2525
height?: number | string
2626
width?: number | string

packages/mask/.webpack/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ export async function createConfiguration(
238238
NEXT_PUBLIC_FIREFLY_API_URL: process.env.NEXT_PUBLIC_FIREFLY_API_URL || '',
239239
SOLANA_DEFAULT_RPC_URL: process.env.SOLANA_DEFAULT_RPC_URL || '',
240240
MASK_ENABLE_EXCHANGE: process.env.MASK_ENABLE_EXCHANGE || '',
241+
GOOGLE_CLIENT_ID: JSON.stringify(process.env.GOOGLE_CLIENT_ID) || '',
241242
}),
242243
new (rspack?.DefinePlugin || webpack.default.DefinePlugin)({
243244
'process.browser': 'true',
@@ -312,7 +313,6 @@ export async function createConfiguration(
312313
// Focus on performance optimization. Not for download size/cache stability optimization.
313314
optimization: {
314315
// we don't need deterministic, and we also don't have chunk request at init we don't need "size"
315-
// @ts-expect-error
316316
chunkIds:
317317
productionLike ?
318318
rspack ? 'deterministic'

0 commit comments

Comments
 (0)