Skip to content

Commit

Permalink
Rename Server to Camomile
Browse files Browse the repository at this point in the history
  • Loading branch information
Murderlon committed Sep 28, 2023
1 parent e0a347b commit b6e6913
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export {Server} from './lib/server.js'
export {Camomile} from './lib/server.js'
4 changes: 2 additions & 2 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function filterHeaders(allowedHeaders) {
/*
* Node.js HTTP server to proxy insecure content via HTTPS.
*/
export class Server extends EventEmitter {
export class Camomile extends EventEmitter {
/**
* @param {Readonly<Options>} options
*/
Expand All @@ -55,7 +55,7 @@ export class Server extends EventEmitter {
}
this.options = {
...options,
serverName: options.serverName || 'camo',
serverName: options.serverName || 'camomile',
maxSize: options.maxSize || 100 * 1024 * 1024 // 100 MB
}
}
Expand Down
6 changes: 3 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {MockAgent, setGlobalDispatcher, fetch} from 'undici'

// TODO: use published version of this plugin
import {camo} from './rehype-github-image/camo.js'
import {Server} from './index.js'
import {Camomile} from './index.js'
import {securityHeaders} from './lib/constants.js'

const host = '127.0.0.1'
Expand All @@ -16,11 +16,11 @@ const secret = 'myVerySecretSecret'
const toProxyUrl = camo(addr, secret)

/**
* @returns {Promise<InstanceType<Server>>}
* @returns {Promise<InstanceType<Camomile>>}
*/
function createTestServer() {
return new Promise((resolve) => {
const server = new Server({
const server = new Camomile({
secret,
serverName: 'camo',
maxSize: 0.5 * 1024 * 1024
Expand Down

0 comments on commit b6e6913

Please sign in to comment.