fix: finish updating dependencies
This commit is contained in:
parent
9e21d6e0ac
commit
ab946e69b1
20
package.json
20
package.json
|
@ -108,7 +108,7 @@
|
||||||
"p-retry": "^4.2.0",
|
"p-retry": "^4.2.0",
|
||||||
"pify": "3.0.0",
|
"pify": "3.0.0",
|
||||||
"protobufjs": "^6.11.2",
|
"protobufjs": "^6.11.2",
|
||||||
"rc-slider": "^8.7.1",
|
"rc-slider": "^10.2.1",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-contexify": "5.0.0",
|
"react-contexify": "5.0.0",
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
|
@ -119,8 +119,8 @@
|
||||||
"react-qr-svg": "^2.2.1",
|
"react-qr-svg": "^2.2.1",
|
||||||
"react-redux": "8.0.4",
|
"react-redux": "8.0.4",
|
||||||
"react-toastify": "^6.0.9",
|
"react-toastify": "^6.0.9",
|
||||||
"react-use": "^17.2.1",
|
"react-use": "^17.4.0",
|
||||||
"react-virtualized": "9.22.3",
|
"react-virtualized": "^9.22.4",
|
||||||
"read-last-lines-ts": "^1.2.1",
|
"read-last-lines-ts": "^1.2.1",
|
||||||
"redux": "4.2.0",
|
"redux": "4.2.0",
|
||||||
"redux-logger": "3.0.6",
|
"redux-logger": "3.0.6",
|
||||||
|
@ -130,7 +130,8 @@
|
||||||
"sanitize.css": "^12.0.1",
|
"sanitize.css": "^12.0.1",
|
||||||
"semver": "5.4.1",
|
"semver": "5.4.1",
|
||||||
"styled-components": "5.1.1",
|
"styled-components": "5.1.1",
|
||||||
"uuid": "8.3.2"
|
"uuid": "8.3.2",
|
||||||
|
"webrtc-adapter": "^4.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@electron/notarize": "^2.1.0",
|
"@electron/notarize": "^2.1.0",
|
||||||
|
@ -155,7 +156,6 @@
|
||||||
"@types/mocha": "5.0.0",
|
"@types/mocha": "5.0.0",
|
||||||
"@types/node-fetch": "^2.5.7",
|
"@types/node-fetch": "^2.5.7",
|
||||||
"@types/pify": "3.0.2",
|
"@types/pify": "3.0.2",
|
||||||
"@types/rc-slider": "^8.6.5",
|
|
||||||
"@types/react": "^17.0.2",
|
"@types/react": "^17.0.2",
|
||||||
"@types/react-dom": "^17.0.2",
|
"@types/react-dom": "^17.0.2",
|
||||||
"@types/react-redux": "^7.1.24",
|
"@types/react-redux": "^7.1.24",
|
||||||
|
@ -168,7 +168,6 @@
|
||||||
"@types/uuid": "8.3.4",
|
"@types/uuid": "8.3.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
||||||
"@typescript-eslint/parser": "^6.1.0",
|
"@typescript-eslint/parser": "^6.1.0",
|
||||||
"asar": "3.1.0",
|
|
||||||
"chai": "^4.3.4",
|
"chai": "^4.3.4",
|
||||||
"chai-as-promised": "^7.1.1",
|
"chai-as-promised": "^7.1.1",
|
||||||
"chai-bytes": "^0.1.2",
|
"chai-bytes": "^0.1.2",
|
||||||
|
@ -339,9 +338,12 @@
|
||||||
"!build/*.js",
|
"!build/*.js",
|
||||||
"build/afterPackHook.js",
|
"build/afterPackHook.js",
|
||||||
"build/launcher-script.sh",
|
"build/launcher-script.sh",
|
||||||
"!node_modules/better-sqlite3/deps/*",
|
"!node_modules/@signalapp/better-sqlite3/deps/*",
|
||||||
"!node_modules/better-sqlite3/src/*",
|
"!node_modules/@signalapp/better-sqlite3/src/*",
|
||||||
"node_modules/better-sqlite3/build/Release/better_sqlite3.node",
|
"!node_modules/@signalapp/better-sqlite3/build/Release/obj/*",
|
||||||
|
"node_modules/@signalapp/better-sqlite3/build/Release/better_sqlite3.node",
|
||||||
|
"!node_modules/libsession_util_nodejs/libsession-util/*",
|
||||||
|
"!node_modules/libsession_util_nodejs/src/*",
|
||||||
"ts/webworker/workers/node/libsession/*.node",
|
"ts/webworker/workers/node/libsession/*.node",
|
||||||
"!dev-app-update.yml"
|
"!dev-app-update.yml"
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
diff --git a/node_modules/component-classes/index.js b/node_modules/component-classes/index.js
|
|
||||||
index eb9d292..752ebf2 100644
|
|
||||||
--- a/node_modules/component-classes/index.js
|
|
||||||
+++ b/node_modules/component-classes/index.js
|
|
||||||
@@ -3,7 +3,7 @@
|
|
||||||
*/
|
|
||||||
|
|
||||||
try {
|
|
||||||
- var index = require('indexof');
|
|
||||||
+ // var index = require('indexof');
|
|
||||||
} catch (err) {
|
|
||||||
var index = require('component-indexof');
|
|
||||||
}
|
|
2
ts/OS.ts
2
ts/OS.ts
|
@ -1,5 +1,5 @@
|
||||||
import _ from 'lodash';
|
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
|
import _ from 'lodash';
|
||||||
import semver from 'semver';
|
import semver from 'semver';
|
||||||
|
|
||||||
export const isMacOS = () => process.platform === 'darwin';
|
export const isMacOS = () => process.platform === 'darwin';
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import React from 'react';
|
|
||||||
|
|
||||||
import { shell } from 'electron';
|
import { shell } from 'electron';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
import useHover from 'react-use/lib/useHover';
|
import useHover from 'react-use/lib/useHover';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Dispatch } from '@reduxjs/toolkit';
|
|
||||||
import { shell } from 'electron';
|
import { shell } from 'electron';
|
||||||
|
import { Dispatch } from '@reduxjs/toolkit';
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { MessageInteraction } from '../../interactions';
|
import { MessageInteraction } from '../../interactions';
|
||||||
import { updateConfirmModal } from '../../state/ducks/modalDialog';
|
import { updateConfirmModal } from '../../state/ducks/modalDialog';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
|
||||||
import { shell } from 'electron';
|
import { shell } from 'electron';
|
||||||
|
import React from 'react';
|
||||||
import autoBind from 'auto-bind';
|
import autoBind from 'auto-bind';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
import Slider from 'rc-slider';
|
import Slider from 'rc-slider';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { isNumber } from 'lodash';
|
||||||
|
|
||||||
import useUpdate from 'react-use/lib/useUpdate';
|
import useUpdate from 'react-use/lib/useUpdate';
|
||||||
import { SessionSettingsItemWrapper } from './SessionSettingListItem';
|
import { SessionSettingsItemWrapper } from './SessionSettingListItem';
|
||||||
|
|
||||||
export const ZoomingSessionSlider = (props: { onSliderChange?: (value: number) => void }) => {
|
export const ZoomingSessionSlider = (props: { onSliderChange?: (value: number) => void }) => {
|
||||||
const forceUpdate = useUpdate();
|
const forceUpdate = useUpdate();
|
||||||
const handleSlider = async (valueToForward: number) => {
|
const handleSlider = async (val: number | Array<number>) => {
|
||||||
props?.onSliderChange?.(valueToForward);
|
const newSetting = isNumber(val) ? val : val?.[0] || 1;
|
||||||
await window.setSettingValue('zoom-factor-setting', valueToForward);
|
|
||||||
|
props?.onSliderChange?.(newSetting);
|
||||||
|
await window.setSettingValue('zoom-factor-setting', newSetting);
|
||||||
window.updateZoomFactor();
|
window.updateZoomFactor();
|
||||||
forceUpdate();
|
forceUpdate();
|
||||||
};
|
};
|
||||||
|
@ -23,8 +26,9 @@ export const ZoomingSessionSlider = (props: { onSliderChange?: (value: number) =
|
||||||
min={60}
|
min={60}
|
||||||
max={200}
|
max={200}
|
||||||
defaultValue={currentValueFromSettings}
|
defaultValue={currentValueFromSettings}
|
||||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
onChange={e => {
|
||||||
onAfterChange={handleSlider}
|
void handleSlider(e);
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="slider-info">
|
<div className="slider-info">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
import path from 'path';
|
||||||
import { ipcMain } from 'electron';
|
import { ipcMain } from 'electron';
|
||||||
import { isString, map } from 'lodash';
|
import { isString, map } from 'lodash';
|
||||||
import rimraf from 'rimraf';
|
import rimraf from 'rimraf';
|
||||||
import path from 'path';
|
|
||||||
import fse from 'fs-extra';
|
import fse from 'fs-extra';
|
||||||
import pify from 'pify';
|
import pify from 'pify';
|
||||||
// eslint-disable-next-line import/no-named-default
|
// eslint-disable-next-line import/no-named-default
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
import path from 'path';
|
||||||
import * as BetterSqlite3 from '@signalapp/better-sqlite3';
|
import * as BetterSqlite3 from '@signalapp/better-sqlite3';
|
||||||
import { isNumber } from 'lodash';
|
import { isNumber } from 'lodash';
|
||||||
import path from 'path';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ATTACHMENT_DOWNLOADS_TABLE,
|
ATTACHMENT_DOWNLOADS_TABLE,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import * as BetterSqlite3 from '@signalapp/better-sqlite3';
|
|
||||||
import { app, clipboard, dialog, Notification } from 'electron';
|
import { app, clipboard, dialog, Notification } from 'electron';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import * as BetterSqlite3 from '@signalapp/better-sqlite3';
|
||||||
import rimraf from 'rimraf';
|
import rimraf from 'rimraf';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
import tls from 'tls';
|
||||||
|
import https from 'https';
|
||||||
// eslint-disable-next-line import/no-named-default
|
// eslint-disable-next-line import/no-named-default
|
||||||
import { default as insecureNodeFetch } from 'node-fetch';
|
import { default as insecureNodeFetch } from 'node-fetch';
|
||||||
import https from 'https';
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import tls from 'tls';
|
|
||||||
import pRetry from 'p-retry';
|
import pRetry from 'p-retry';
|
||||||
|
|
||||||
import { sha256 } from '../../crypto';
|
import { sha256 } from '../../crypto';
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
|
import https from 'https';
|
||||||
// eslint-disable-next-line import/no-named-default
|
// eslint-disable-next-line import/no-named-default
|
||||||
import { default as insecureNodeFetch, RequestInit, Response } from 'node-fetch';
|
import { default as insecureNodeFetch, RequestInit, Response } from 'node-fetch';
|
||||||
import https from 'https';
|
|
||||||
import ByteBuffer from 'bytebuffer';
|
import ByteBuffer from 'bytebuffer';
|
||||||
import pRetry from 'p-retry';
|
import pRetry from 'p-retry';
|
||||||
import { cloneDeep, isEmpty, isString, omit } from 'lodash';
|
import { cloneDeep, isEmpty, isString, omit } from 'lodash';
|
||||||
import { AbortSignal } from 'abort-controller';
|
import { AbortSignal } from 'abort-controller';
|
||||||
import { to_string } from 'libsodium-wrappers-sumo';
|
import { to_string } from 'libsodium-wrappers-sumo';
|
||||||
|
// eslint-disable-next-line import/no-unresolved
|
||||||
|
import { AbortSignal as AbortSignalNode } from 'node-fetch/externals';
|
||||||
|
|
||||||
import { dropSnodeFromSnodePool, dropSnodeFromSwarmIfNeeded, updateSwarmFor } from './snodePool';
|
import { dropSnodeFromSnodePool, dropSnodeFromSwarmIfNeeded, updateSwarmFor } from './snodePool';
|
||||||
|
|
||||||
|
@ -1068,7 +1070,7 @@ const sendOnionRequestNoRetries = async ({
|
||||||
};
|
};
|
||||||
|
|
||||||
if (abortSignal) {
|
if (abortSignal) {
|
||||||
guardFetchOptions.signal = abortSignal;
|
guardFetchOptions.signal = abortSignal as AbortSignalNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
const guardUrl = `https://${guardNode.ip}:${guardNode.port}/onion_req/v2`;
|
const guardUrl = `https://${guardNode.ip}:${guardNode.port}/onion_req/v2`;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
import https from 'https';
|
||||||
// eslint-disable-next-line import/no-named-default
|
// eslint-disable-next-line import/no-named-default
|
||||||
import { default as insecureNodeFetch } from 'node-fetch';
|
import { default as insecureNodeFetch } from 'node-fetch';
|
||||||
import https from 'https';
|
|
||||||
import { clone } from 'lodash';
|
import { clone } from 'lodash';
|
||||||
import pRetry from 'p-retry';
|
import pRetry from 'p-retry';
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
import path from 'path';
|
||||||
import { reject } from 'lodash';
|
import { reject } from 'lodash';
|
||||||
|
|
||||||
import * as fse from 'fs-extra';
|
import * as fse from 'fs-extra';
|
||||||
import path from 'path';
|
|
||||||
|
|
||||||
import { DURATION } from '../constants';
|
import { DURATION } from '../constants';
|
||||||
import { makeObjectUrl, urlToBlob } from '../../types/attachments/VisualAttachment';
|
import { makeObjectUrl, urlToBlob } from '../../types/attachments/VisualAttachment';
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
// RelativePath ->
|
// RelativePath ->
|
||||||
// IO Unit
|
// IO Unit
|
||||||
|
|
||||||
import { isString } from 'lodash';
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import { isString } from 'lodash';
|
||||||
import fse from 'fs-extra';
|
import fse from 'fs-extra';
|
||||||
|
|
||||||
export const createDeleter = (root: string) => {
|
export const createDeleter = (root: string) => {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Page } from '@playwright/test';
|
|
||||||
import { readdirSync, rmdirSync } from 'fs-extra';
|
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
import { homedir } from 'os';
|
import { homedir } from 'os';
|
||||||
|
import { Page } from '@playwright/test';
|
||||||
|
import { readdirSync, rmdirSync } from 'fs-extra';
|
||||||
import { isLinux, isMacOS } from '../../../OS';
|
import { isLinux, isMacOS } from '../../../OS';
|
||||||
import { MULTI_PREFIX, NODE_ENV } from './open';
|
import { MULTI_PREFIX, NODE_ENV } from './open';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { _electron } from '@playwright/test';
|
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
|
import { _electron } from '@playwright/test';
|
||||||
import { getAppRootPath } from '../../../node/getRootPath';
|
import { getAppRootPath } from '../../../node/getRootPath';
|
||||||
|
|
||||||
export const NODE_ENV = 'production';
|
export const NODE_ENV = 'production';
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
/* eslint-disable no-useless-escape */
|
/* eslint-disable no-useless-escape */
|
||||||
/* eslint-disable import/no-extraneous-dependencies */
|
/* eslint-disable import/no-extraneous-dependencies */
|
||||||
/* eslint-disable no-await-in-loop */
|
/* eslint-disable no-await-in-loop */
|
||||||
import { Page } from 'playwright-core';
|
import { ElementHandle, Page } from '@playwright/test';
|
||||||
|
|
||||||
import { ElementHandle } from '@playwright/test';
|
|
||||||
import { sleepFor } from '../../../session/utils/Promise';
|
import { sleepFor } from '../../../session/utils/Promise';
|
||||||
import { loaderType, Strategy } from '../types/testing';
|
import { loaderType, Strategy } from '../types/testing';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import chai, { expect } from 'chai';
|
|
||||||
import * as crypto from 'crypto';
|
import * as crypto from 'crypto';
|
||||||
|
import chai, { expect } from 'chai';
|
||||||
import Sinon, * as sinon from 'sinon';
|
import Sinon, * as sinon from 'sinon';
|
||||||
import chaiBytes from 'chai-bytes';
|
import chaiBytes from 'chai-bytes';
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
import { TextEncoder } from 'util';
|
||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
|
|
||||||
import { TextEncoder } from 'util';
|
|
||||||
import { toNumber } from 'lodash';
|
import { toNumber } from 'lodash';
|
||||||
import { SignalService } from '../../../../protobuf';
|
import { SignalService } from '../../../../protobuf';
|
||||||
import { Constants } from '../../../../session';
|
import { Constants } from '../../../../session';
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
import path from 'path';
|
||||||
import chai, { expect } from 'chai';
|
import chai, { expect } from 'chai';
|
||||||
import { describe } from 'mocha';
|
import { describe } from 'mocha';
|
||||||
|
|
||||||
import path from 'path';
|
|
||||||
|
|
||||||
import chaiAsPromised from 'chai-as-promised';
|
import chaiAsPromised from 'chai-as-promised';
|
||||||
import { redactAll } from '../../../../util/privacy';
|
import { redactAll } from '../../../../util/privacy';
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,11 @@
|
||||||
/* eslint-disable no-await-in-loop */
|
/* eslint-disable no-await-in-loop */
|
||||||
/* eslint-disable no-unreachable-loop */
|
/* eslint-disable no-unreachable-loop */
|
||||||
/* eslint-disable no-restricted-syntax */
|
/* eslint-disable no-restricted-syntax */
|
||||||
|
import { randomBytes } from 'crypto';
|
||||||
|
|
||||||
import chai from 'chai';
|
import chai from 'chai';
|
||||||
import Sinon, * as sinon from 'sinon';
|
import Sinon, * as sinon from 'sinon';
|
||||||
import { describe } from 'mocha';
|
import { describe } from 'mocha';
|
||||||
import { randomBytes } from 'crypto';
|
|
||||||
import chaiAsPromised from 'chai-as-promised';
|
import chaiAsPromised from 'chai-as-promised';
|
||||||
|
|
||||||
import { GroupUtils, PromiseUtils, UserUtils } from '../../../../session/utils';
|
import { GroupUtils, PromiseUtils, UserUtils } from '../../../../session/utils';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { expect } from 'chai';
|
|
||||||
import * as crypto from 'crypto';
|
import * as crypto from 'crypto';
|
||||||
|
import { expect } from 'chai';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import Sinon, * as sinon from 'sinon';
|
import Sinon, * as sinon from 'sinon';
|
||||||
import { SignalService } from '../../../../protobuf';
|
import { SignalService } from '../../../../protobuf';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
import path from 'path';
|
||||||
import { readFileSync } from 'fs-extra';
|
import { readFileSync } from 'fs-extra';
|
||||||
import { isEmpty } from 'lodash';
|
import { isEmpty } from 'lodash';
|
||||||
import path from 'path';
|
|
||||||
|
|
||||||
describe('Updater', () => {
|
describe('Updater', () => {
|
||||||
it.skip('isUpdateAvailable', () => {});
|
it.skip('isUpdateAvailable', () => {});
|
||||||
|
|
|
@ -156,5 +156,6 @@ export function declareCSSVariables(variables: Record<string, string>) {
|
||||||
for (const [key, value] of Object.entries(variables)) {
|
for (const [key, value] of Object.entries(variables)) {
|
||||||
output += `${key}: ${value};\n`;
|
output += `${key}: ${value};\n`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/* eslint-disable @typescript-eslint/no-misused-promises */
|
/* eslint-disable @typescript-eslint/no-misused-promises */
|
||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
|
import * as path from 'path';
|
||||||
import { app, BrowserWindow } from 'electron';
|
import { app, BrowserWindow } from 'electron';
|
||||||
import { autoUpdater, UpdateInfo } from 'electron-updater';
|
import { autoUpdater, UpdateInfo } from 'electron-updater';
|
||||||
import * as fs from 'fs-extra';
|
import * as fs from 'fs-extra';
|
||||||
import * as path from 'path';
|
|
||||||
import { gt as isVersionGreaterThan, parse as parseVersion } from 'semver';
|
import { gt as isVersionGreaterThan, parse as parseVersion } from 'semver';
|
||||||
|
|
||||||
import { windowMarkShouldQuit } from '../node/window_state';
|
import { windowMarkShouldQuit } from '../node/window_state';
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import { RequestInit, Response } from 'node-fetch';
|
import { RequestInit, Response } from 'node-fetch';
|
||||||
import { AbortSignal } from 'abort-controller';
|
import { AbortSignal } from 'abort-controller';
|
||||||
|
// eslint-disable-next-line import/no-unresolved
|
||||||
|
import { AbortSignal as AbortSignalNode } from 'node-fetch/externals';
|
||||||
|
|
||||||
import { IMAGE_GIF, IMAGE_ICO, IMAGE_JPEG, IMAGE_PNG, IMAGE_WEBP, MIMEType } from '../types/MIME';
|
import { IMAGE_GIF, IMAGE_ICO, IMAGE_JPEG, IMAGE_PNG, IMAGE_WEBP, MIMEType } from '../types/MIME';
|
||||||
|
|
||||||
|
@ -371,7 +373,7 @@ export async function fetchLinkPreviewMetadata(
|
||||||
Accept: 'text/html,application/xhtml+xml',
|
Accept: 'text/html,application/xhtml+xml',
|
||||||
'User-Agent': 'WhatsApp',
|
'User-Agent': 'WhatsApp',
|
||||||
},
|
},
|
||||||
signal: abortSignal,
|
signal: abortSignal as AbortSignalNode,
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
window?.log?.warn('fetchLinkPreviewMetadata: failed to fetch link preview HTML; bailing');
|
window?.log?.warn('fetchLinkPreviewMetadata: failed to fetch link preview HTML; bailing');
|
||||||
|
@ -456,7 +458,7 @@ export async function fetchLinkPreviewImage(
|
||||||
'User-Agent': 'WhatsApp',
|
'User-Agent': 'WhatsApp',
|
||||||
},
|
},
|
||||||
size: MAX_IMAGE_CONTENT_LENGTH,
|
size: MAX_IMAGE_CONTENT_LENGTH,
|
||||||
signal: abortSignal,
|
signal: abortSignal as AbortSignalNode,
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
window?.log?.warn('fetchLinkPreviewImage: failed to fetch image; bailing');
|
window?.log?.warn('fetchLinkPreviewImage: failed to fetch image; bailing');
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/* global URL */
|
/* global URL */
|
||||||
|
|
||||||
import { compact, isEmpty, isNumber, range } from 'lodash';
|
|
||||||
import nodeUrl from 'url';
|
import nodeUrl from 'url';
|
||||||
|
import { compact, isEmpty, isNumber, range } from 'lodash';
|
||||||
import LinkifyIt from 'linkify-it';
|
import LinkifyIt from 'linkify-it';
|
||||||
|
|
||||||
const linkify = LinkifyIt();
|
const linkify = LinkifyIt();
|
||||||
|
|
Loading…
Reference in New Issue