Headers for TS files (#798)
This commit is contained in:
parent
5dceaa8149
commit
7dcbf25069
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
import { Base64EncodedHubProtocol } from "../Microsoft.AspNetCore.SignalR.Client.TS/Base64EncodedHubProtocol"
|
import { Base64EncodedHubProtocol } from "../Microsoft.AspNetCore.SignalR.Client.TS/Base64EncodedHubProtocol"
|
||||||
import { IHubProtocol, HubMessage, ProtocolType } from "../Microsoft.AspNetCore.SignalR.Client.TS/IHubProtocol"
|
import { IHubProtocol, HubMessage, ProtocolType } from "../Microsoft.AspNetCore.SignalR.Client.TS/IHubProtocol"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
import { ITransport, TransportType } from "../Microsoft.AspNetCore.SignalR.Client.TS/Transports"
|
import { ITransport, TransportType } from "../Microsoft.AspNetCore.SignalR.Client.TS/Transports"
|
||||||
|
|
||||||
export function eachTransport(action: (transport: TransportType) => void) {
|
export function eachTransport(action: (transport: TransportType) => void) {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
import { IHttpClient } from "../Microsoft.AspNetCore.SignalR.Client.TS/HttpClient"
|
import { IHttpClient } from "../Microsoft.AspNetCore.SignalR.Client.TS/HttpClient"
|
||||||
import { HttpConnection } from "../Microsoft.AspNetCore.SignalR.Client.TS/HttpConnection"
|
import { HttpConnection } from "../Microsoft.AspNetCore.SignalR.Client.TS/HttpConnection"
|
||||||
import { IHttpConnectionOptions } from "../Microsoft.AspNetCore.SignalR.Client.TS/IHttpConnectionOptions"
|
import { IHttpConnectionOptions } from "../Microsoft.AspNetCore.SignalR.Client.TS/IHttpConnectionOptions"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
import { TextMessageFormat, BinaryMessageFormat } from "../Microsoft.AspNetCore.SignalR.Client.TS/Formatters"
|
import { TextMessageFormat, BinaryMessageFormat } from "../Microsoft.AspNetCore.SignalR.Client.TS/Formatters"
|
||||||
|
|
||||||
describe("Text Message Formatter", () => {
|
describe("Text Message Formatter", () => {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
import { IConnection } from "../Microsoft.AspNetCore.SignalR.Client.TS/IConnection"
|
import { IConnection } from "../Microsoft.AspNetCore.SignalR.Client.TS/IConnection"
|
||||||
import { HubConnection } from "../Microsoft.AspNetCore.SignalR.Client.TS/HubConnection"
|
import { HubConnection } from "../Microsoft.AspNetCore.SignalR.Client.TS/HubConnection"
|
||||||
import { DataReceived, ConnectionClosed } from "../Microsoft.AspNetCore.SignalR.Client.TS/Common"
|
import { DataReceived, ConnectionClosed } from "../Microsoft.AspNetCore.SignalR.Client.TS/Common"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
export function asyncit(expectation: string, assertion?: () => Promise<any>, timeout?: number): void {
|
export function asyncit(expectation: string, assertion?: () => Promise<any>, timeout?: number): void {
|
||||||
let testFunction: (done: DoneFn) => void;
|
let testFunction: (done: DoneFn) => void;
|
||||||
if (assertion) {
|
if (assertion) {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
import { MessagePackHubProtocol } from "../Microsoft.AspNetCore.SignalR.Client.TS/MessagePackHubProtocol"
|
import { MessagePackHubProtocol } from "../Microsoft.AspNetCore.SignalR.Client.TS/MessagePackHubProtocol"
|
||||||
import { MessageType, InvocationMessage, CompletionMessage, ResultMessage } from "../Microsoft.AspNetCore.SignalR.Client.TS/IHubProtocol"
|
import { MessageType, InvocationMessage, CompletionMessage, ResultMessage } from "../Microsoft.AspNetCore.SignalR.Client.TS/IHubProtocol"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
import { IHubProtocol, HubMessage, ProtocolType } from "./IHubProtocol"
|
import { IHubProtocol, HubMessage, ProtocolType } from "./IHubProtocol"
|
||||||
|
|
||||||
export class Base64EncodedHubProtocol implements IHubProtocol {
|
export class Base64EncodedHubProtocol implements IHubProtocol {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
export declare type DataReceived = (data: any) => void;
|
export declare type DataReceived = (data: any) => void;
|
||||||
export declare type ConnectionClosed = (e?: Error) => void;
|
export declare type ConnectionClosed = (e?: Error) => void;
|
||||||
export declare type TransportClosed = (e?: Error) => void;
|
export declare type TransportClosed = (e?: Error) => void;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
export namespace TextMessageFormat {
|
export namespace TextMessageFormat {
|
||||||
|
|
||||||
const RecordSeparator = String.fromCharCode(0x1e);
|
const RecordSeparator = String.fromCharCode(0x1e);
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
import { HttpError } from "./HttpError"
|
import { HttpError } from "./HttpError"
|
||||||
|
|
||||||
export interface IHttpClient {
|
export interface IHttpClient {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
import { DataReceived, ConnectionClosed } from "./Common"
|
import { DataReceived, ConnectionClosed } from "./Common"
|
||||||
import { IConnection } from "./IConnection"
|
import { IConnection } from "./IConnection"
|
||||||
import { ITransport, TransferMode, TransportType, WebSocketTransport, ServerSentEventsTransport, LongPollingTransport } from "./Transports"
|
import { ITransport, TransferMode, TransportType, WebSocketTransport, ServerSentEventsTransport, LongPollingTransport } from "./Transports"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
export class HttpError extends Error {
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
export class HttpError extends Error {
|
||||||
statusCode: number;
|
statusCode: number;
|
||||||
constructor(errorMessage: string, statusCode: number) {
|
constructor(errorMessage: string, statusCode: number) {
|
||||||
super(errorMessage);
|
super(errorMessage);
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
import { ConnectionClosed } from "./Common"
|
import { ConnectionClosed } from "./Common"
|
||||||
import { IConnection } from "./IConnection"
|
import { IConnection } from "./IConnection"
|
||||||
import { TransportType, TransferMode } from "./Transports"
|
import { TransportType, TransferMode } from "./Transports"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
import { DataReceived, ConnectionClosed } from "./Common"
|
import { DataReceived, ConnectionClosed } from "./Common"
|
||||||
import { TransportType, TransferMode, ITransport } from "./Transports"
|
import { TransportType, TransferMode, ITransport } from "./Transports"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
import { IHttpClient } from "./HttpClient"
|
import { IHttpClient } from "./HttpClient"
|
||||||
import { TransportType, ITransport } from "./Transports"
|
import { TransportType, ITransport } from "./Transports"
|
||||||
import { ILogger, LogLevel } from "./ILogger";
|
import { ILogger, LogLevel } from "./ILogger";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
export const enum MessageType {
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
export const enum MessageType {
|
||||||
Invocation = 1,
|
Invocation = 1,
|
||||||
Result,
|
Result,
|
||||||
Completion
|
Completion
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
export enum LogLevel {
|
export enum LogLevel {
|
||||||
Information = 0,
|
Information = 0,
|
||||||
Warning,
|
Warning,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
import { TextMessageFormat } from "./Formatters";
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
import { TextMessageFormat } from "./Formatters";
|
||||||
import { IHubProtocol, ProtocolType, HubMessage } from "./IHubProtocol";
|
import { IHubProtocol, ProtocolType, HubMessage } from "./IHubProtocol";
|
||||||
|
|
||||||
export class JsonHubProtocol implements IHubProtocol {
|
export class JsonHubProtocol implements IHubProtocol {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
import { ILogger, LogLevel } from "./ILogger"
|
import { ILogger, LogLevel } from "./ILogger"
|
||||||
|
|
||||||
export class NullLogger implements ILogger {
|
export class NullLogger implements ILogger {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
import { IHubProtocol, ProtocolType, MessageType, HubMessage, InvocationMessage, ResultMessage, CompletionMessage } from "./IHubProtocol";
|
import { IHubProtocol, ProtocolType, MessageType, HubMessage, InvocationMessage, ResultMessage, CompletionMessage } from "./IHubProtocol";
|
||||||
import { BinaryMessageFormat } from "./Formatters"
|
import { BinaryMessageFormat } from "./Formatters"
|
||||||
import * as msgpack5 from "msgpack5"
|
import * as msgpack5 from "msgpack5"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
// TODO: Seamless RxJs integration
|
// TODO: Seamless RxJs integration
|
||||||
// From RxJs: https://github.com/ReactiveX/rxjs/blob/master/src/Observer.ts
|
// From RxJs: https://github.com/ReactiveX/rxjs/blob/master/src/Observer.ts
|
||||||
export interface Observer<T> {
|
export interface Observer<T> {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
import { DataReceived, TransportClosed } from "./Common"
|
import { DataReceived, TransportClosed } from "./Common"
|
||||||
import { IHttpClient } from "./HttpClient"
|
import { IHttpClient } from "./HttpClient"
|
||||||
import { HttpError } from "./HttpError"
|
import { HttpError } from "./HttpError"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
export * from "./Common"
|
export * from "./Common"
|
||||||
export * from "./HttpConnection"
|
export * from "./HttpConnection"
|
||||||
export * from "./HttpClient"
|
export * from "./HttpClient"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var ECHOENDPOINT_URL = "http://" + document.location.host + "/echo";
|
var ECHOENDPOINT_URL = "http://" + document.location.host + "/echo";
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
describe('connection', function () {
|
describe('connection', function () {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var TESTHUBENDPOINT_URL = 'http://' + document.location.host + '/testhub';
|
var TESTHUBENDPOINT_URL = 'http://' + document.location.host + '/testhub';
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
describe('WebSockets', function () {
|
describe('WebSockets', function () {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue