-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into SyncV1ServicesDeprecationWarning
- Loading branch information
Showing
10 changed files
with
129 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@twilio/runtime-handler': patch | ||
--- | ||
|
||
Fix error messages in local development |
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,5 @@ | ||
--- | ||
'@twilio/runtime-handler': patch | ||
--- | ||
|
||
Don't check for exact Content-Type matches |
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,6 @@ | ||
--- | ||
'twilio-run': patch | ||
'@twilio-labs/plugin-serverless': patch | ||
--- | ||
|
||
Fix of debug/inspect mode by disabling fork process |
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
35 changes: 35 additions & 0 deletions
35
packages/runtime-handler/src/dev-runtime/internal/crossForkLogger.ts
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,35 @@ | ||
import { LoggerInstance } from '../types'; | ||
|
||
export class CrossForkLogger implements LoggerInstance { | ||
constructor() {} | ||
|
||
debug(msg: string) { | ||
this.sendLog('debug', msg); | ||
} | ||
|
||
info(msg: string) { | ||
this.sendLog('info', msg); | ||
} | ||
|
||
warn(msg: string, title: string = '') { | ||
this.sendLog('warn', msg, title); | ||
} | ||
|
||
error(msg: string, title: string = '') { | ||
this.sendLog('error', msg, title); | ||
} | ||
|
||
log(msg: string, level: number) { | ||
this.sendLog('log', msg, level); | ||
} | ||
|
||
private sendLog(level: keyof LoggerInstance, ...args: (string | number)[]) { | ||
process.send && | ||
process.send({ | ||
crossForkLogMessage: { | ||
level, | ||
args: args, | ||
}, | ||
}); | ||
} | ||
} |
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
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