mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	rename files
This commit is contained in:
		
							parent
							
								
									0a73ea0574
								
							
						
					
					
						commit
						a4951d8dc8
					
				@ -1,15 +1,13 @@
 | 
				
			|||||||
'use strict';
 | 
					'use strict';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const util = require('util');
 | 
					class NameExistsError extends Error {
 | 
				
			||||||
 | 
					    constructor (message) {
 | 
				
			||||||
function NameExistsError (message) {
 | 
					        super();
 | 
				
			||||||
    Error.call(this);
 | 
					 | 
				
			||||||
        Error.captureStackTrace(this, this.constructor);
 | 
					        Error.captureStackTrace(this, this.constructor);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.name = this.constructor.name;
 | 
					        this.name = this.constructor.name;
 | 
				
			||||||
        this.message = message;
 | 
					        this.message = message;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
util.inherits(NameExistsError, Error);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
module.exports = NameExistsError;
 | 
					module.exports = NameExistsError;
 | 
				
			||||||
 | 
				
			|||||||
@ -1,15 +1,13 @@
 | 
				
			|||||||
'use strict';
 | 
					'use strict';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const util = require('util');
 | 
					class NotFoundError extends Error {
 | 
				
			||||||
 | 
					    constructor (message) {
 | 
				
			||||||
function NotFoundError (message) {
 | 
					        super();
 | 
				
			||||||
    Error.call(this);
 | 
					 | 
				
			||||||
        Error.captureStackTrace(this, this.constructor);
 | 
					        Error.captureStackTrace(this, this.constructor);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.name = this.constructor.name;
 | 
					        this.name = this.constructor.name;
 | 
				
			||||||
        this.message = message;
 | 
					        this.message = message;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
util.inherits(NotFoundError, Error);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
module.exports = NotFoundError;
 | 
					module.exports = NotFoundError;
 | 
				
			||||||
 | 
				
			|||||||
@ -1,15 +1,13 @@
 | 
				
			|||||||
'use strict';
 | 
					'use strict';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const util = require('util');
 | 
					class ValidationError extends Error {
 | 
				
			||||||
 | 
					    constructor (message) {
 | 
				
			||||||
function ValidationError (message) {
 | 
					        super();
 | 
				
			||||||
    Error.call(this);
 | 
					 | 
				
			||||||
        Error.captureStackTrace(this, this.constructor);
 | 
					        Error.captureStackTrace(this, this.constructor);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.name = this.constructor.name;
 | 
					        this.name = this.constructor.name;
 | 
				
			||||||
        this.message = message;
 | 
					        this.message = message;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
util.inherits(ValidationError, Error);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
module.exports = ValidationError;
 | 
					module.exports = ValidationError;
 | 
				
			||||||
 | 
				
			|||||||
@ -1,16 +1,15 @@
 | 
				
			|||||||
'use strict';
 | 
					'use strict';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const util = require('util');
 | 
					 | 
				
			||||||
const EventEmitter = require('events').EventEmitter;
 | 
					const EventEmitter = require('events').EventEmitter;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function EventStore (eventDb) {
 | 
					module.exports = class EventStore extends EventEmitter {
 | 
				
			||||||
 | 
					    constructor (eventDb) {
 | 
				
			||||||
 | 
					        super();
 | 
				
			||||||
        this.eventDb = eventDb;
 | 
					        this.eventDb = eventDb;
 | 
				
			||||||
    EventEmitter.call(this);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
util.inherits(EventStore, EventEmitter);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
EventStore.prototype.create = function (event) {
 | 
					    create  (event) {
 | 
				
			||||||
        return this.eventDb.store(event).then(() => this.emit(event.type, event));
 | 
					        return this.eventDb.store(event).then(() => this.emit(event.type, event));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module.exports = EventStore;
 | 
					 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ const logger = require('./lib/logger');
 | 
				
			|||||||
const migrator = require('./migrator');
 | 
					const migrator = require('./migrator');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const DEFAULT_OPTIONS = {
 | 
					const DEFAULT_OPTIONS = {
 | 
				
			||||||
    databaseUri: process.env.DATABASE_URL,
 | 
					    databaseUri: process.env.DATABASE_URL || 'postgres://unleash_user:passord@localhost:5432/unleash',
 | 
				
			||||||
    port: process.env.HTTP_PORT || process.env.PORT || 4242,
 | 
					    port: process.env.HTTP_PORT || process.env.PORT || 4242,
 | 
				
			||||||
    baseUriPath: process.env.BASE_URI_PATH || '',
 | 
					    baseUriPath: process.env.BASE_URI_PATH || '',
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user