@enonic/js-utils
Advanced tools
Comparing version 0.16.1 to 0.16.2
@@ -235,4 +235,25 @@ var __defProp = Object.defineProperty; | ||
var JavaBridge = class { | ||
constructor() { | ||
constructor({ | ||
app, | ||
log | ||
}) { | ||
this._repos = {}; | ||
this.log = { | ||
debug: (...params) => { | ||
console.debug(...params); | ||
}, | ||
error: (...params) => { | ||
console.error(...params); | ||
}, | ||
info: (...params) => { | ||
console.info(...params); | ||
}, | ||
warning: (...params) => { | ||
console.warn(...params); | ||
} | ||
}; | ||
this.app = app; | ||
if (log) { | ||
this.log = log; | ||
} | ||
} | ||
@@ -239,0 +260,0 @@ createRepo({ |
@@ -235,4 +235,25 @@ var __defProp = Object.defineProperty; | ||
var JavaBridge = class { | ||
constructor() { | ||
constructor({ | ||
app, | ||
log | ||
}) { | ||
this._repos = {}; | ||
this.log = { | ||
debug: (...params) => { | ||
console.debug(...params); | ||
}, | ||
error: (...params) => { | ||
console.error(...params); | ||
}, | ||
info: (...params) => { | ||
console.info(...params); | ||
}, | ||
warning: (...params) => { | ||
console.warn(...params); | ||
} | ||
}; | ||
this.app = app; | ||
if (log) { | ||
this.log = log; | ||
} | ||
} | ||
@@ -239,0 +260,0 @@ createRepo({ |
@@ -57,3 +57,3 @@ { | ||
}, | ||
"version": "0.16.1" | ||
"version": "0.16.2" | ||
} |
import type { | ||
App, | ||
Log | ||
} from './globals.d' | ||
import type { | ||
CreateRepoParams, | ||
@@ -23,6 +27,22 @@ RepositoryConfig | ||
private _repos :Repos = {}; | ||
readonly app :App; | ||
readonly log :Log = { | ||
debug: (...params) => { console.debug(...params) }, | ||
error: (...params) => { console.error(...params) }, | ||
info: (...params) => { console.info(...params) }, | ||
warning: (...params) => { console.warn(...params) } | ||
}; | ||
constructor() { | ||
//this._repos = {} as Repos; | ||
} | ||
constructor({ | ||
app, | ||
log | ||
} :{ | ||
app :App | ||
log? :Log | ||
}) { | ||
this.app = app; | ||
if (log) { | ||
this.log = log; | ||
} | ||
} // constructor | ||
@@ -29,0 +49,0 @@ createRepo({ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1036028
208
27377