This repository was archived by the owner on Jul 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 375
build: add eslint-plugin-node rulesets to yarn lint #1714
Closed
Closed
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
7801072
add prod dependency for packaging
hailiu2586 2efbd56
Merge branch 'stable' into hailiu/server-build
hailiu2586 3f747fa
explicitly adding format-message-parse to work around yarn workspace …
hailiu2586 bee898b
allow prepare-prod to use local .tgz install path
hailiu2586 c8cbf8e
remove ludown to align with stable branch
hailiu2586 1a750e5
Stable release 12-10-19
cwhitten 262397b
integrate with grpc based app insights
hailiu2586 3149a20
fix importing of commands/configAppInsights
hailiu2586 845bc14
Merge branch 'stable' into hailiu/server-build
hailiu2586 c6a11fd
Merge branch 'hailiu/appinsights' into hailiu/server-build
hailiu2586 30a4984
revert change to package.json
hailiu2586 cb4e9e0
add myget feed
hailiu2586 daec326
revert .npmrc
hailiu2586 6404d73
add missing dependency
hailiu2586 3606f37
enable eslint-node-plugin to enforce node/no-extraneous-import rule
hailiu2586 fed39ab
Merge branch 'master' into hailiu/server-build
hailiu2586 c9573f2
streamline eslint settings
hailiu2586 b63d335
integrate async telemetry setup
hailiu2586 3ead039
fix lg-language-server path
hailiu2586 88aed66
allow languageServer to take basePath
hailiu2586 1d5f658
use LgEditorContext to inject language server base path
hailiu2586 f79adcc
refactor how to config app insights
hailiu2586 dd46e3d
Merge branch 'master' into hailiu/server-build
hailiu2586 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| @bfcomposer:registry=https://botbuilder.myget.org/F/botbuilder-declarative/npm/ | ||
| @bfcomposer:registry=https://botbuilder.myget.org/F/botbuilder-declarative/npm/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
Composer/packages/lib/code-editor/src/utils/LgEditorContext.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| import React from 'react'; | ||
|
|
||
| const LgEditorContext = React.createContext<{ basePath: string }>({ basePath: '/' }); | ||
|
|
||
| export default LgEditorContext; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| import 'dotenv/config'; | ||
| import path from 'path'; | ||
| import crypto from 'crypto'; | ||
|
|
@@ -41,6 +40,19 @@ const CS_POLICIES = [ | |
| 'upgrade-insecure-requests;', | ||
| ]; | ||
|
|
||
| async function configAppInsightsAsNeeded(): Promise<boolean> { | ||
| const appInsightsKey = process.env.SharedAppInsightsKey; | ||
| if (appInsightsKey) { | ||
| //eslint-disable-next-line node/no-missing-require | ||
| const configAppInsights = require('commands/configAppInsights').default as SelfHostCommands.SetupTelemetry; | ||
| await configAppInsights(appInsightsKey); | ||
|
|
||
| return true; | ||
| } | ||
|
|
||
| return false; | ||
| } | ||
|
|
||
| app.all('*', function(req: Request, res: Response, next: NextFunction) { | ||
| res.header('Access-Control-Allow-Origin', '*'); | ||
| res.header('Access-Control-Allow-Methods', 'GET,HEAD,OPTIONS,POST,PUT,DELETE'); | ||
|
|
@@ -101,12 +113,6 @@ app.get('*', function(req, res) { | |
| }); | ||
|
|
||
| const port = process.env.PORT || 5000; | ||
| const server = app.listen(port, () => { | ||
| if (process.env.NODE_ENV === 'production') { | ||
| // eslint-disable-next-line no-console | ||
| console.log(`\n\nComposer now running at:\n\nhttp://localhost:${port}\n`); | ||
| } | ||
| }); | ||
|
|
||
| const wss: ws.Server = new ws.Server({ | ||
| noServer: true, | ||
|
|
@@ -121,13 +127,21 @@ function launchLanguageServer(socket: rpc.IWebSocket) { | |
| server.start(); | ||
| } | ||
|
|
||
| attachLSPServer(wss, server, '/lg-language-server', webSocket => { | ||
| // launch language server when the web socket is opened | ||
| if (webSocket.readyState === webSocket.OPEN) { | ||
| launchLanguageServer(webSocket); | ||
| } else { | ||
| webSocket.on('open', () => { | ||
| configAppInsightsAsNeeded().then(() => { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @a-b-r-o-w-n does this refactor meet your requirement on how app insights get configured?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was thinking we could add that in a separate pull request.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ping @hailiu2586 |
||
| const server = app.listen(port, () => { | ||
| if (process.env.NODE_ENV === 'production') { | ||
| // eslint-disable-next-line no-console | ||
| console.log(`\n\nComposer now running at:\n\nhttp://localhost:${port}\n`); | ||
| } | ||
| }); | ||
| attachLSPServer(wss, server, `${BASEURL}/lg-language-server`, webSocket => { | ||
| // launch language server when the web socket is opened | ||
| if (webSocket.readyState === webSocket.OPEN) { | ||
| launchLanguageServer(webSocket); | ||
| }); | ||
| } | ||
| } else { | ||
| webSocket.on('open', () => { | ||
| launchLanguageServer(webSocket); | ||
| }); | ||
| } | ||
| }); | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.