mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
3234c05c6e
* Enable noImplicitAny. * extracts PreviewMode * Update packages/insomnia/src/network/certificate-url-parse.ts * Add missing type. * un-any-ifies some of the modal onDone callbacks easy enough. * few more onDone, but the async ones this time * Get rid of jsonlint any. * adds noImplicitAny support for insomnia-smoke-test * fixes playwright type error * avoid full @ts-ignore in playwright Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
14 lines
426 B
TypeScript
14 lines
426 B
TypeScript
const getCreds = (user: string, pass: string, encoding: BufferEncoding) => ({
|
|
raw: { user, pass },
|
|
encoded: {
|
|
user: Buffer.from(user, encoding).toString(),
|
|
pass: Buffer.from(pass, encoding).toString(),
|
|
},
|
|
combined: Buffer.from(`${user}:${pass}`, encoding).toString('base64'),
|
|
});
|
|
|
|
export const basicAuthCreds = {
|
|
utf8: getCreds('user', 'pass', 'utf8'),
|
|
latin1: getCreds('user-é', 'pass-é', 'latin1'),
|
|
};
|