This repository has been archived by the owner on Mar 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
70 additions
and
66 deletions.
There are no files selected for viewing
This file contains 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 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,6 @@ | ||
#!/usr/bin/env node | ||
|
||
import minimist from 'minimist'; | ||
import main from '../lib/server/inline-main.mjs'; | ||
import main from '../lib/server/inline/main.mjs'; | ||
|
||
main(minimist(process.argv.slice(2)), 'inherit'); |
This file contains 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 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 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
File renamed without changes.
This file contains 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,4 +1,3 @@ | ||
import logger from './logger.mjs'; | ||
import Appmap from './appmap/index.mjs'; | ||
|
||
const checkHas = (object, key) => { | ||
|
This file contains 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,5 +1,5 @@ | ||
import { getDefaultConfig } from '../config.mjs'; | ||
import { makeDispatch } from '../dispatch.mjs'; | ||
import Dispatcher from '../dispatcher.mjs'; | ||
import { makeChannel } from './response.mjs'; | ||
|
||
export default () => makeChannel(makeDispatch(getDefaultConfig())); | ||
export default () => makeChannel(new Dispatcher(getDefaultConfig())); |
This file contains 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 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,27 +1,28 @@ | ||
import logger from '../../logger.mjs'; | ||
import logger from '../logger.mjs'; | ||
|
||
export const makeChannel = (dispatcher) => ({ | ||
requestSync: (json1) => { | ||
logger.info(); | ||
logger.info('inline sync request: %j', json1); | ||
const json2 = dispatcher.dispatch(json1); | ||
logger.info(); | ||
logger.info('inline sync response success: %j', json2); | ||
return json2; | ||
}, | ||
requestAsync: (json1, pending) => { | ||
logger.info(); | ||
if (pending === null) { | ||
const json2 = dispatcher.dispatch(json1); | ||
if (json1 !== null) { | ||
throw new Error(``); | ||
} | ||
} else { | ||
let json2; | ||
try { | ||
json2 = dispatcher.dispatch(json1); | ||
} catch (error) { | ||
logger.info('inline async request: %j', json1); | ||
let json2; | ||
try { | ||
json2 = dispatcher.dispatch(json1); | ||
} catch (error) { | ||
logger.info('inline async request failure: %s', error.stack); | ||
if (pending !== null) { | ||
pending.reject(error); | ||
} | ||
logger.info(json2); | ||
pending.resolve(json2); | ||
} | ||
if (json2 !== undefined) { | ||
logger.info('inline sync response success: %j', json2); | ||
if (pending !== null) { | ||
pending.resolve(json2); | ||
} | ||
} | ||
}, | ||
}); |
This file contains 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 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 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 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,3 @@ | ||
export { makeServer as makeHttp1Server } from './http1.mjs'; | ||
export { makeServer as makeHttp2Server } from './http2.mjs'; | ||
export { registerChild } from './fork.mjs'; |