mirror of
https://github.com/signalapp/libsignal.git
synced 2024-09-19 19:42:19 +02:00
node: Move TypeScript source files into ts/ directory
This way, files that reference the non-compiled Native.js/.d.ts can consistently refer to it as '../Native' without having to copy anything around.
This commit is contained in:
parent
1d216bf3a1
commit
734c0e02a3
@ -3,4 +3,4 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
//
|
||||
|
||||
module.exports = require('node-gyp-build')(__dirname + '/..');
|
||||
module.exports = require('node-gyp-build')(__dirname);
|
||||
|
@ -9,6 +9,8 @@
|
||||
"dist/*.d.ts",
|
||||
"dist/zkgroup/**/*.js",
|
||||
"dist/zkgroup/**/*.d.ts",
|
||||
"Native.js",
|
||||
"Native.d.ts",
|
||||
"zkgroup.js",
|
||||
"zkgroup.d.ts",
|
||||
"prebuilds/*/*.node"
|
||||
@ -16,7 +18,7 @@
|
||||
"scripts": {
|
||||
"install": "node-gyp-build",
|
||||
"build": "node-gyp build",
|
||||
"tsc": "tsc -b && yarn cpy Native.js Native.d.ts dist/",
|
||||
"tsc": "tsc -b",
|
||||
"clean": "rimraf dist build prebuilds",
|
||||
"test": "electron-mocha --recursive dist/test --require source-map-support/register",
|
||||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
|
||||
@ -37,7 +39,6 @@
|
||||
"@typescript-eslint/parser": "^4.6.0",
|
||||
"chai": "^4.2.0",
|
||||
"chai-as-promised": "^7.1.1",
|
||||
"cpy-cli": "^3.0.0",
|
||||
"electron": "13.3.0",
|
||||
"electron-mocha": "^10.0",
|
||||
"eslint": "^7.12.1",
|
||||
|
@ -3,7 +3,7 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
//
|
||||
|
||||
import * as Native from './Native';
|
||||
import * as Native from '../Native';
|
||||
|
||||
export class ProtocolAddress {
|
||||
readonly _nativeHandle: Native.ProtocolAddress;
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import { ProtocolAddress } from './Address';
|
||||
import * as Native from './Native';
|
||||
import * as Native from '../Native';
|
||||
|
||||
export enum ErrorCode {
|
||||
Generic,
|
@ -11,7 +11,7 @@ export * from './Errors';
|
||||
import { ProtocolAddress } from './Address';
|
||||
export * from './Address';
|
||||
|
||||
import * as Native from './Native';
|
||||
import * as Native from '../Native';
|
||||
|
||||
export const { initLogger, LogLevel } = Native;
|
||||
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from './internal/ByteArray';
|
||||
import * as Native from '../Native';
|
||||
import * as Native from '../../Native';
|
||||
import NotarySignature from './NotarySignature';
|
||||
|
||||
export default class ServerPublicParams extends ByteArray {
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import { randomBytes } from 'crypto';
|
||||
import * as Native from '../Native';
|
||||
import * as Native from '../../Native';
|
||||
import ByteArray from './internal/ByteArray';
|
||||
|
||||
import { RANDOM_LENGTH } from './internal/Constants';
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
|
||||
export default class AuthCredential extends ByteArray {
|
||||
constructor(contents: Buffer) {
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
import UuidCiphertext from '../groups/UuidCiphertext';
|
||||
|
||||
export default class AuthCredentialPresentation extends ByteArray {
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
export default class AuthCredentialResponse extends ByteArray {
|
||||
constructor(contents: Buffer) {
|
||||
super(contents, Native.AuthCredentialResponse_CheckValidContents);
|
@ -5,7 +5,7 @@
|
||||
|
||||
import { randomBytes } from 'crypto';
|
||||
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
import { RANDOM_LENGTH } from '../internal/Constants';
|
||||
|
||||
import ServerPublicParams from '../ServerPublicParams';
|
@ -5,7 +5,7 @@
|
||||
|
||||
import { randomBytes } from 'crypto';
|
||||
import { RANDOM_LENGTH } from '../internal/Constants';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
|
||||
import ServerSecretParams from '../ServerSecretParams';
|
||||
import AuthCredentialResponse from './AuthCredentialResponse';
|
@ -5,7 +5,7 @@
|
||||
|
||||
import { randomBytes } from 'crypto';
|
||||
import { RANDOM_LENGTH } from '../internal/Constants';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
|
||||
import UuidCiphertext from './UuidCiphertext';
|
||||
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
import GroupIdentifier from './GroupIdentifier';
|
||||
|
||||
export default class GroupPublicParams extends ByteArray {
|
@ -6,7 +6,7 @@
|
||||
import { randomBytes } from 'crypto';
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
import { RANDOM_LENGTH } from '../internal/Constants';
|
||||
import GroupMasterKey from './GroupMasterKey';
|
||||
import GroupPublicParams from './GroupPublicParams';
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
|
||||
export default class ProfileKeyCiphertext extends ByteArray {
|
||||
constructor(contents: Buffer) {
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
|
||||
export default class UuidCiphertext extends ByteArray {
|
||||
constructor(contents: Buffer) {
|
@ -6,7 +6,7 @@
|
||||
import { randomBytes } from 'crypto';
|
||||
|
||||
import { RANDOM_LENGTH } from '../internal/Constants';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
|
||||
import ServerPublicParams from '../ServerPublicParams';
|
||||
import ProfileKeyCredentialRequestContext from './ProfileKeyCredentialRequestContext';
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
import ProfileKeyCommitment from './ProfileKeyCommitment';
|
||||
import ProfileKeyVersion from './ProfileKeyVersion';
|
||||
import { UUIDType, fromUUID } from '../internal/UUIDUtil';
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
|
||||
export default class ProfileKeyCommitment extends ByteArray {
|
||||
constructor(contents: Buffer) {
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
|
||||
export default class ProfileKeyCredential extends ByteArray {
|
||||
constructor(contents: Buffer) {
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
import UuidCiphertext from '../groups/UuidCiphertext';
|
||||
import ProfileKeyCiphertext from '../groups/ProfileKeyCiphertext';
|
||||
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
|
||||
export default class ProfileKeyCredentialRequest extends ByteArray {
|
||||
constructor(contents: Buffer) {
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
import ProfileKeyCredentialRequest from './ProfileKeyCredentialRequest';
|
||||
|
||||
export default class ProfileKeyCredentialRequestContext extends ByteArray {
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
|
||||
export default class ProfileKeyCredentialResponse extends ByteArray {
|
||||
constructor(contents: Buffer) {
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import { randomBytes } from 'crypto';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
import { RANDOM_LENGTH } from '../internal/Constants';
|
||||
|
||||
import ServerSecretParams from '../ServerSecretParams';
|
@ -5,7 +5,7 @@
|
||||
|
||||
import { randomBytes } from 'crypto';
|
||||
import { RANDOM_LENGTH } from '../internal/Constants';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
import ServerPublicParams from '../ServerPublicParams';
|
||||
import ReceiptCredential from './ReceiptCredential';
|
||||
import ReceiptCredentialPresentation from './ReceiptCredentialPresentation';
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
|
||||
export default class ReceiptCredential extends ByteArray {
|
||||
constructor(contents: Buffer) {
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
import ReceiptSerial from './ReceiptSerial';
|
||||
|
||||
export default class ReceiptCredentialPresentation extends ByteArray {
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
|
||||
export default class ReceiptCredentialRequest extends ByteArray {
|
||||
constructor(contents: Buffer) {
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
import ReceiptCredentialRequest from './ReceiptCredentialRequest';
|
||||
|
||||
export default class ReceiptCredentialRequestContext extends ByteArray {
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import ByteArray from '../internal/ByteArray';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
|
||||
export default class ReceiptCredentialResponse extends ByteArray {
|
||||
constructor(contents: Buffer) {
|
@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import { randomBytes } from 'crypto';
|
||||
import * as Native from '../../Native';
|
||||
import * as Native from '../../../Native';
|
||||
import { RANDOM_LENGTH } from '../internal/Constants';
|
||||
import { bufferFromBigUInt64BE } from '../internal/BigIntUtil';
|
||||
import ServerSecretParams from '../ServerSecretParams';
|
@ -7,5 +7,5 @@
|
||||
"strict": true,
|
||||
"sourceMap": true
|
||||
},
|
||||
"include": ["index.ts", "zkgroup/index.ts", "test/*.ts"]
|
||||
"include": ["ts/**/*.ts"]
|
||||
}
|
||||
|
1050
node/yarn.lock
1050
node/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user