Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create browser (es5) output in botframework-streaming #1764

Merged
merged 3 commits into from
Feb 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libraries/botframework-streaming/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/browser
/lib
/node_modules
*.js.map
Expand Down
10 changes: 6 additions & 4 deletions libraries/botframework-streaming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"url": "https://github.com/microsoft/botbuilder-js.git"
},
"main": "lib/index.js",
"browser": "browser/index-browser.js",
"typings": "lib/index.d.ts",
"dependencies": {
"@types/ws": "^6.0.3",
Expand All @@ -41,15 +42,16 @@
"typescript": "3.5.3"
},
"scripts": {
"build": "tsc",
"clean": "erase /q /s .\\lib",
"build": "tsc -p tsconfig.json && tsc -p tsconfig-browser.json",
"clean": "erase /q /s .\\lib .\\browser",
"eslint": "eslint ./src/*.ts ./src/**/*.ts",
"eslint-fix": "eslint ./src/*.ts ./src/**/*.ts --fix",
"set-version": "npm version --allow-same-version ${Version}",
"test": "tsc && nyc mocha tests/"
"test": "npm run build && nyc mocha tests/"
},
"files": [
"/lib",
"/src"
"/src",
"/browser"
]
}
29 changes: 29 additions & 0 deletions libraries/botframework-streaming/src/index-browser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* @module botframework-streaming
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

export { ContentStream } from './contentStream';
export { HttpContent } from './httpContentStream';
export {
INodeBuffer,
INodeIncomingMessage,
INodeSocket,
IReceiveRequest,
IReceiveResponse,
ISocket,
IStreamingTransportClient,
IStreamingTransportServer,
} from './interfaces';
export { RequestHandler } from './requestHandler';
export { StreamingRequest } from './streamingRequest';
export { StreamingResponse } from './streamingResponse';
export { SubscribableStream } from './subscribableStream';
export {
BrowserWebSocket,
WebSocketClient,
WebSocketServer
} from './webSocket/index-browser';
12 changes: 12 additions & 0 deletions libraries/botframework-streaming/src/webSocket/index-browser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* @module botframework-streaming
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

export { BrowserWebSocket } from './browserWebSocket';
export { WebSocketClient } from './webSocketClient';
export { WebSocketServer } from './webSocketServer';
export { WebSocketTransport } from './webSocketTransport';
22 changes: 22 additions & 0 deletions libraries/botframework-streaming/tsconfig-browser.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["es2015"],
"module": "commonjs",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"outDir": "./browser",
"rootDir": "./src",
"types" : ["node"]
},
"exclude": [
"browser",
"lib",
"node_modules",
"./src/index.ts",
"./src/webSocket/index.ts",
"./src/webSocket/nodeWebSocket.ts",
"src/namedPipe"
]
}
6 changes: 6 additions & 0 deletions libraries/botframework-streaming/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@
"rootDir": "./src",
"types" : ["node"]
},
"exclude": [
"**/index-browser.ts",
"browser",
"lib",
"node_modules"
]
}