@niledatabase/server 5.2.0-alpha.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3661,9 +3661,10 @@ var Server = class {
|
|
|
3661
3661
|
if (typeof create2 !== "function") {
|
|
3662
3662
|
continue;
|
|
3663
3663
|
}
|
|
3664
|
-
const ext = create2(
|
|
3665
|
-
if (ext.onConfigure) {
|
|
3666
|
-
|
|
3664
|
+
const ext = create2();
|
|
3665
|
+
if (typeof ext.onConfigure === "function") {
|
|
3666
|
+
this.#config.logger("[EXTENSION]").debug(`configuring for ${ext.id}`);
|
|
3667
|
+
ext.onConfigure(this);
|
|
3667
3668
|
}
|
|
3668
3669
|
if (ext?.replace?.handlers) {
|
|
3669
3670
|
this.#config.logger("[EXTENSION]").debug(`${ext.id} replacing handlers`);
|
|
@@ -3703,7 +3704,7 @@ var Server = class {
|
|
|
3703
3704
|
return {
|
|
3704
3705
|
remove: async (id) => {
|
|
3705
3706
|
if (!this.#config.extensions) return;
|
|
3706
|
-
const resolved = this.#config.extensions.map((ext) => ext(
|
|
3707
|
+
const resolved = this.#config.extensions.map((ext) => ext());
|
|
3707
3708
|
const index = resolved.findIndex((ext) => ext.id === id);
|
|
3708
3709
|
if (index !== -1) {
|
|
3709
3710
|
this.#config.extensions.splice(index, 1);
|