-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathindex.js
More file actions
22 lines (18 loc) · 714 Bytes
/
index.js
File metadata and controls
22 lines (18 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const Application = require('./lib/Application');
const Response = require('./lib/Response');
class LegacyCottageModule extends Application {
constructor(...args) {
super(...args);
console.warn('cottage: Warning: importing cottage as a default import is deprecated.');
console.warn(" Please use `const { Cottage } = require('cottage')` instead.");
}
}
LegacyCottageModule.Cottage = Application;
LegacyCottageModule.Response = Response;
Object.defineProperty(LegacyCottageModule, 'Status', {
get() {
console.warn('cottage: Warning: Status is deprecated. use cottage.Response instead');
return Response;
}
});
module.exports = LegacyCottageModule;