Add license headers across the project
This commit is contained in:
parent
8c3da11996
commit
8bfaf598af
738 changed files with 2695 additions and 378 deletions
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"env": {
|
||||
"browser": false,
|
||||
"commonjs": true,
|
||||
"node": false
|
||||
},
|
||||
"globals": {
|
||||
"console": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"sourceType": "module"
|
||||
}
|
||||
}
|
16
js/modules/.eslintrc.js
Normal file
16
js/modules/.eslintrc.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
module.exports = {
|
||||
env: {
|
||||
browser: false,
|
||||
commonjs: true,
|
||||
node: false,
|
||||
},
|
||||
globals: {
|
||||
console: true,
|
||||
},
|
||||
parserOptions: {
|
||||
sourceType: 'module',
|
||||
},
|
||||
};
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2019-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* global
|
||||
Whisper,
|
||||
Signal,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
const loadImage = require('blueimp-load-image');
|
||||
|
||||
const DEFAULT_JPEG_QUALITY = 0.85;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* global Signal: false */
|
||||
/* global Whisper: false */
|
||||
/* global _: false */
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* eslint-env node */
|
||||
/* global log, Signal, Whisper */
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* eslint-env node */
|
||||
/* global window */
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2019-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
const { take } = require('lodash');
|
||||
const { getRecentEmojis } = require('../../ts/sql/Client').default;
|
||||
|
||||
|
|
3
js/modules/i18n.d.ts
vendored
3
js/modules/i18n.d.ts
vendored
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { LocalizerType } from '../../ts/types/Util';
|
||||
|
||||
export const setup: (
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* eslint-env node, browser */
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* eslint-env browser */
|
||||
|
||||
const EventEmitter = require('events');
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* global window, Whisper, setTimeout */
|
||||
|
||||
const MESSAGE_MINIMUM_VERSION = 7;
|
||||
|
|
3
js/modules/link_previews.d.ts
vendored
3
js/modules/link_previews.d.ts
vendored
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2019-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
export function isLinkSafeToPreview(link: string): boolean;
|
||||
|
||||
export function findLinks(text: string, caretLocation?: number): Array<string>;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2019-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* global URL */
|
||||
|
||||
const { isNumber, compact, isEmpty, range } = require('lodash');
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
const { ipcRenderer } = require('electron');
|
||||
|
||||
/* eslint-env node */
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
// Ensures that messages in database are at the right schema.
|
||||
|
||||
/* global window */
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
module.exports = {
|
||||
CURRENT_VERSION: 3,
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* global libsignal, textsecure */
|
||||
|
||||
/* eslint-disable no-bitwise */
|
||||
|
|
3
js/modules/privacy.d.ts
vendored
3
js/modules/privacy.d.ts
vendored
|
@ -1 +1,4 @@
|
|||
// Copyright 2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
export function redactAll(log: string): string;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* eslint-env node */
|
||||
|
||||
const is = require('@sindresorhus/is');
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* global window, setTimeout, clearTimeout, textsecure, WebAPI, ConversationController */
|
||||
|
||||
module.exports = {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
const { isObject, isString } = require('lodash');
|
||||
|
||||
const ITEMS_STORE_NAME = 'items';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
// The idea with this file is to make it webpackable for the style guide
|
||||
|
||||
const { bindActionCreators } = require('redux');
|
||||
|
|
3
js/modules/stickers.d.ts
vendored
3
js/modules/stickers.d.ts
vendored
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2019-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
export function maybeDeletePack(packId: string): Promise<void>;
|
||||
|
||||
export function downloadStickerPack(
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2019-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* global
|
||||
textsecure,
|
||||
Signal,
|
||||
|
|
3
js/modules/string_to_array_buffer.d.ts
vendored
3
js/modules/string_to_array_buffer.d.ts
vendored
|
@ -1 +1,4 @@
|
|||
// Copyright 2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
export function stringToArrayBuffer(string: string): ArrayBuffer;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
exports.stringToArrayBuffer = string => {
|
||||
if (typeof string !== 'string') {
|
||||
throw new TypeError("'string' must be a string");
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
const is = require('@sindresorhus/is');
|
||||
|
||||
const {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
const { isArrayBuffer, isFunction, isUndefined, omit } = require('lodash');
|
||||
|
||||
// type Context :: {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
const { omit, compact, map } = require('lodash');
|
||||
|
||||
const { toLogFormat } = require('./errors');
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* global window */
|
||||
|
||||
const { isFunction, isNumber } = require('lodash');
|
||||
|
|
3
js/modules/types/errors.d.ts
vendored
3
js/modules/types/errors.d.ts
vendored
|
@ -1 +1,4 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
export function toLogFormat(error: any): string;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
// toLogFormat :: Error -> String
|
||||
exports.toLogFormat = error => {
|
||||
if (!error) {
|
||||
|
|
3
js/modules/types/message.d.ts
vendored
3
js/modules/types/message.d.ts
vendored
|
@ -1 +1,4 @@
|
|||
// Copyright 2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
export const CURRENT_SCHEMA_VERSION: number;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
const { isFunction, isObject, isString, omit } = require('lodash');
|
||||
|
||||
const Contact = require('./contact');
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
const { isNumber } = require('lodash');
|
||||
|
||||
exports.isValid = value => isNumber(value) && value >= 0;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* global document, URL, Blob */
|
||||
|
||||
const loadImage = require('blueimp-load-image');
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2018-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
/* eslint-env browser */
|
||||
|
||||
/* global i18n: false */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue