@devbro/pashmak 0.1.49 → 0.1.52
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/DatabaseServiceProvider.d.mts +2 -2
- package/dist/DatabaseServiceProvider.mjs +5 -1
- package/dist/DatabaseServiceProvider.mjs.map +1 -1
- package/dist/app/console/generate/GenerateApiDocsCommand.mjs +5 -5
- package/dist/app/console/generate/GenerateApiDocsCommand.mjs.map +1 -1
- package/dist/app/console/project/base_project/src/config/default.mts.tpl +16 -1
- package/dist/bin/DatabaseServiceProvider.cjs +4 -0
- package/dist/bin/app/console/DefaultCommand.cjs +97 -58
- package/dist/bin/app/console/KeyGenerateCommand.cjs +97 -58
- package/dist/bin/app/console/StartCommand.cjs +97 -58
- package/dist/bin/app/console/generate/GenerateApiDocsCommand.cjs +102 -63
- package/dist/bin/app/console/generate/GenerateControllerCommand.cjs +97 -58
- package/dist/bin/app/console/generate/index.cjs +102 -63
- package/dist/bin/app/console/index.cjs +102 -63
- package/dist/bin/app/console/migrate/GenerateMigrateCommand.cjs +97 -58
- package/dist/bin/app/console/migrate/MigrateCommand.cjs +97 -58
- package/dist/bin/app/console/migrate/MigrateRollbackCommand.cjs +97 -58
- package/dist/bin/app/console/migrate/index.cjs +97 -58
- package/dist/bin/app/console/queue/GenerateQueueMigrateCommand.cjs +97 -58
- package/dist/bin/cache.cjs +97 -58
- package/dist/bin/facades.cjs +97 -58
- package/dist/bin/factories.cjs +97 -58
- package/dist/bin/http.cjs +97 -58
- package/dist/bin/index.cjs +106 -63
- package/dist/bin/middlewares.cjs +97 -58
- package/dist/bin/queue.cjs +97 -58
- package/dist/facades.d.mts +6 -6
- package/dist/facades.mjs +97 -58
- package/dist/facades.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -687,27 +687,58 @@ import_neko_storage.StorageProviderFactory.register("sftp", (opt) => {
|
|
|
687
687
|
// src/facades.mts
|
|
688
688
|
var import_neko_cache2 = require("@devbro/neko-cache");
|
|
689
689
|
var import_neko_queue2 = require("@devbro/neko-queue");
|
|
690
|
+
function wrapSingletonWithAccessors(singletonFn) {
|
|
691
|
+
let methodsInitialized = false;
|
|
692
|
+
const initializeMethods = /* @__PURE__ */ __name(() => {
|
|
693
|
+
if (methodsInitialized) return;
|
|
694
|
+
const defaultInstance = singletonFn();
|
|
695
|
+
const prototype = Object.getPrototypeOf(defaultInstance);
|
|
696
|
+
const methodNames = Object.getOwnPropertyNames(prototype).filter(
|
|
697
|
+
(name) => name !== "constructor" && typeof prototype[name] === "function"
|
|
698
|
+
);
|
|
699
|
+
for (const methodName of methodNames) {
|
|
700
|
+
singletonFn[methodName] = (...args) => {
|
|
701
|
+
const instance = singletonFn();
|
|
702
|
+
return instance[methodName](...args);
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
methodsInitialized = true;
|
|
706
|
+
}, "initializeMethods");
|
|
707
|
+
return new Proxy(singletonFn, {
|
|
708
|
+
get(target, prop, receiver) {
|
|
709
|
+
if (typeof prop === "string" && !Reflect.has(target, prop)) {
|
|
710
|
+
initializeMethods();
|
|
711
|
+
}
|
|
712
|
+
return Reflect.get(target, prop, receiver);
|
|
713
|
+
}
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
__name(wrapSingletonWithAccessors, "wrapSingletonWithAccessors");
|
|
690
717
|
var router = (0, import_neko_helper3.createSingleton)(() => new Router());
|
|
691
|
-
var scheduler = (
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
718
|
+
var scheduler = wrapSingletonWithAccessors(
|
|
719
|
+
(0, import_neko_helper3.createSingleton)(() => {
|
|
720
|
+
const rc = new import_neko_scheduler.Scheduler();
|
|
721
|
+
rc.setErrorHandler((err, job) => {
|
|
722
|
+
logger().error({
|
|
723
|
+
msg: "Scheduled job error",
|
|
724
|
+
err,
|
|
725
|
+
job_name: job.getName()
|
|
726
|
+
});
|
|
698
727
|
});
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
728
|
+
return rc;
|
|
729
|
+
})
|
|
730
|
+
);
|
|
702
731
|
var db = /* @__PURE__ */ __name((label = "default") => (0, import_neko_context3.ctx)().getOrThrow(["database", label]), "db");
|
|
703
|
-
var storage = (
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
732
|
+
var storage = wrapSingletonWithAccessors(
|
|
733
|
+
(0, import_neko_helper3.createSingleton)((label = "default") => {
|
|
734
|
+
let storage_config = import_neko_config.config.get(["storages", label].join("."));
|
|
735
|
+
const provider = import_neko_storage2.StorageProviderFactory.create(
|
|
736
|
+
storage_config.provider,
|
|
737
|
+
storage_config.config
|
|
738
|
+
);
|
|
739
|
+
return new import_neko_storage2.Storage(provider);
|
|
740
|
+
})
|
|
741
|
+
);
|
|
711
742
|
var cli = (0, import_neko_helper3.createSingleton)(() => {
|
|
712
743
|
const [node, app, ...args] = process.argv;
|
|
713
744
|
return new import_clipanion.Cli({
|
|
@@ -722,46 +753,54 @@ var httpServer = (0, import_neko_helper3.createSingleton)(() => {
|
|
|
722
753
|
server.setRouter(router());
|
|
723
754
|
return server;
|
|
724
755
|
});
|
|
725
|
-
var logger = (
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
mailer_config.config
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
queue_config.
|
|
750
|
-
queue_config
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
});
|
|
756
|
+
var logger = wrapSingletonWithAccessors(
|
|
757
|
+
(0, import_neko_helper3.createSingleton)((label) => {
|
|
758
|
+
const logger_config = import_neko_config.config.get(["loggers", label].join("."));
|
|
759
|
+
const rc = new import_neko_logger.Logger(logger_config);
|
|
760
|
+
rc.setExtrasFunction((message) => {
|
|
761
|
+
message.requestId = (0, import_neko_context3.ctxSafe)()?.get("requestId") || "N/A";
|
|
762
|
+
return message;
|
|
763
|
+
});
|
|
764
|
+
return rc;
|
|
765
|
+
})
|
|
766
|
+
);
|
|
767
|
+
var mailer = wrapSingletonWithAccessors(
|
|
768
|
+
(0, import_neko_helper3.createSingleton)((label) => {
|
|
769
|
+
const mailer_config = import_neko_config.config.get(["mailer", label].join("."));
|
|
770
|
+
const provider = import_neko_mailer2.MailerProviderFactory.create(
|
|
771
|
+
mailer_config.provider,
|
|
772
|
+
mailer_config.config
|
|
773
|
+
);
|
|
774
|
+
const rc = new import_neko_mailer2.Mailer(provider);
|
|
775
|
+
return rc;
|
|
776
|
+
})
|
|
777
|
+
);
|
|
778
|
+
var queue = wrapSingletonWithAccessors(
|
|
779
|
+
(0, import_neko_helper3.createSingleton)((label) => {
|
|
780
|
+
const queue_config = import_neko_config.config.get(["queues", label].join("."));
|
|
781
|
+
if (!queue_config) {
|
|
782
|
+
throw new Error(`Queue configuration for '${label}' not found`);
|
|
783
|
+
}
|
|
784
|
+
const provider = import_neko_queue2.QueueTransportFactory.create(
|
|
785
|
+
queue_config.provider,
|
|
786
|
+
queue_config.config
|
|
787
|
+
);
|
|
788
|
+
return new import_neko_queue2.QueueConnection(provider);
|
|
789
|
+
})
|
|
790
|
+
);
|
|
791
|
+
var cache = wrapSingletonWithAccessors(
|
|
792
|
+
(0, import_neko_helper3.createSingleton)((label) => {
|
|
793
|
+
const cache_config = import_neko_config.config.get(["caches", label].join("."));
|
|
794
|
+
if (!cache_config) {
|
|
795
|
+
throw new Error(`Cache configuration for '${label}' not found`);
|
|
796
|
+
}
|
|
797
|
+
const provider = CacheProviderFactory.create(
|
|
798
|
+
cache_config.provider,
|
|
799
|
+
cache_config.config
|
|
800
|
+
);
|
|
801
|
+
return new import_neko_cache2.Cache(provider);
|
|
802
|
+
})
|
|
803
|
+
);
|
|
765
804
|
|
|
766
805
|
// src/app/console/queue/GenerateQueueMigrateCommand.mts
|
|
767
806
|
var import_clipanion2 = require("clipanion");
|
package/dist/bin/cache.cjs
CHANGED
|
@@ -688,27 +688,58 @@ import_neko_storage.StorageProviderFactory.register("sftp", (opt) => {
|
|
|
688
688
|
// src/facades.mts
|
|
689
689
|
var import_neko_cache2 = require("@devbro/neko-cache");
|
|
690
690
|
var import_neko_queue2 = require("@devbro/neko-queue");
|
|
691
|
+
function wrapSingletonWithAccessors(singletonFn) {
|
|
692
|
+
let methodsInitialized = false;
|
|
693
|
+
const initializeMethods = /* @__PURE__ */ __name(() => {
|
|
694
|
+
if (methodsInitialized) return;
|
|
695
|
+
const defaultInstance = singletonFn();
|
|
696
|
+
const prototype = Object.getPrototypeOf(defaultInstance);
|
|
697
|
+
const methodNames = Object.getOwnPropertyNames(prototype).filter(
|
|
698
|
+
(name) => name !== "constructor" && typeof prototype[name] === "function"
|
|
699
|
+
);
|
|
700
|
+
for (const methodName of methodNames) {
|
|
701
|
+
singletonFn[methodName] = (...args) => {
|
|
702
|
+
const instance = singletonFn();
|
|
703
|
+
return instance[methodName](...args);
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
methodsInitialized = true;
|
|
707
|
+
}, "initializeMethods");
|
|
708
|
+
return new Proxy(singletonFn, {
|
|
709
|
+
get(target, prop, receiver) {
|
|
710
|
+
if (typeof prop === "string" && !Reflect.has(target, prop)) {
|
|
711
|
+
initializeMethods();
|
|
712
|
+
}
|
|
713
|
+
return Reflect.get(target, prop, receiver);
|
|
714
|
+
}
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
__name(wrapSingletonWithAccessors, "wrapSingletonWithAccessors");
|
|
691
718
|
var router = (0, import_neko_helper3.createSingleton)(() => new Router());
|
|
692
|
-
var scheduler = (
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
719
|
+
var scheduler = wrapSingletonWithAccessors(
|
|
720
|
+
(0, import_neko_helper3.createSingleton)(() => {
|
|
721
|
+
const rc = new import_neko_scheduler.Scheduler();
|
|
722
|
+
rc.setErrorHandler((err, job) => {
|
|
723
|
+
logger().error({
|
|
724
|
+
msg: "Scheduled job error",
|
|
725
|
+
err,
|
|
726
|
+
job_name: job.getName()
|
|
727
|
+
});
|
|
699
728
|
});
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
729
|
+
return rc;
|
|
730
|
+
})
|
|
731
|
+
);
|
|
703
732
|
var db = /* @__PURE__ */ __name((label = "default") => (0, import_neko_context3.ctx)().getOrThrow(["database", label]), "db");
|
|
704
|
-
var storage = (
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
733
|
+
var storage = wrapSingletonWithAccessors(
|
|
734
|
+
(0, import_neko_helper3.createSingleton)((label = "default") => {
|
|
735
|
+
let storage_config = import_neko_config.config.get(["storages", label].join("."));
|
|
736
|
+
const provider = import_neko_storage2.StorageProviderFactory.create(
|
|
737
|
+
storage_config.provider,
|
|
738
|
+
storage_config.config
|
|
739
|
+
);
|
|
740
|
+
return new import_neko_storage2.Storage(provider);
|
|
741
|
+
})
|
|
742
|
+
);
|
|
712
743
|
var cli = (0, import_neko_helper3.createSingleton)(() => {
|
|
713
744
|
const [node, app, ...args] = process.argv;
|
|
714
745
|
return new import_clipanion.Cli({
|
|
@@ -723,46 +754,54 @@ var httpServer = (0, import_neko_helper3.createSingleton)(() => {
|
|
|
723
754
|
server.setRouter(router());
|
|
724
755
|
return server;
|
|
725
756
|
});
|
|
726
|
-
var logger = (
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
mailer_config.config
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
queue_config.
|
|
751
|
-
queue_config
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
});
|
|
757
|
+
var logger = wrapSingletonWithAccessors(
|
|
758
|
+
(0, import_neko_helper3.createSingleton)((label) => {
|
|
759
|
+
const logger_config = import_neko_config.config.get(["loggers", label].join("."));
|
|
760
|
+
const rc = new import_neko_logger.Logger(logger_config);
|
|
761
|
+
rc.setExtrasFunction((message) => {
|
|
762
|
+
message.requestId = (0, import_neko_context3.ctxSafe)()?.get("requestId") || "N/A";
|
|
763
|
+
return message;
|
|
764
|
+
});
|
|
765
|
+
return rc;
|
|
766
|
+
})
|
|
767
|
+
);
|
|
768
|
+
var mailer = wrapSingletonWithAccessors(
|
|
769
|
+
(0, import_neko_helper3.createSingleton)((label) => {
|
|
770
|
+
const mailer_config = import_neko_config.config.get(["mailer", label].join("."));
|
|
771
|
+
const provider = import_neko_mailer2.MailerProviderFactory.create(
|
|
772
|
+
mailer_config.provider,
|
|
773
|
+
mailer_config.config
|
|
774
|
+
);
|
|
775
|
+
const rc = new import_neko_mailer2.Mailer(provider);
|
|
776
|
+
return rc;
|
|
777
|
+
})
|
|
778
|
+
);
|
|
779
|
+
var queue = wrapSingletonWithAccessors(
|
|
780
|
+
(0, import_neko_helper3.createSingleton)((label) => {
|
|
781
|
+
const queue_config = import_neko_config.config.get(["queues", label].join("."));
|
|
782
|
+
if (!queue_config) {
|
|
783
|
+
throw new Error(`Queue configuration for '${label}' not found`);
|
|
784
|
+
}
|
|
785
|
+
const provider = import_neko_queue2.QueueTransportFactory.create(
|
|
786
|
+
queue_config.provider,
|
|
787
|
+
queue_config.config
|
|
788
|
+
);
|
|
789
|
+
return new import_neko_queue2.QueueConnection(provider);
|
|
790
|
+
})
|
|
791
|
+
);
|
|
792
|
+
var cache = wrapSingletonWithAccessors(
|
|
793
|
+
(0, import_neko_helper3.createSingleton)((label) => {
|
|
794
|
+
const cache_config = import_neko_config.config.get(["caches", label].join("."));
|
|
795
|
+
if (!cache_config) {
|
|
796
|
+
throw new Error(`Cache configuration for '${label}' not found`);
|
|
797
|
+
}
|
|
798
|
+
const provider = CacheProviderFactory.create(
|
|
799
|
+
cache_config.provider,
|
|
800
|
+
cache_config.config
|
|
801
|
+
);
|
|
802
|
+
return new import_neko_cache2.Cache(provider);
|
|
803
|
+
})
|
|
804
|
+
);
|
|
766
805
|
|
|
767
806
|
// src/cache.mts
|
|
768
807
|
async function cacheQuery(q, options = {}) {
|
package/dist/bin/facades.cjs
CHANGED
|
@@ -696,27 +696,58 @@ import_neko_storage.StorageProviderFactory.register("sftp", (opt) => {
|
|
|
696
696
|
// src/facades.mts
|
|
697
697
|
var import_neko_cache2 = require("@devbro/neko-cache");
|
|
698
698
|
var import_neko_queue2 = require("@devbro/neko-queue");
|
|
699
|
+
function wrapSingletonWithAccessors(singletonFn) {
|
|
700
|
+
let methodsInitialized = false;
|
|
701
|
+
const initializeMethods = /* @__PURE__ */ __name(() => {
|
|
702
|
+
if (methodsInitialized) return;
|
|
703
|
+
const defaultInstance = singletonFn();
|
|
704
|
+
const prototype = Object.getPrototypeOf(defaultInstance);
|
|
705
|
+
const methodNames = Object.getOwnPropertyNames(prototype).filter(
|
|
706
|
+
(name) => name !== "constructor" && typeof prototype[name] === "function"
|
|
707
|
+
);
|
|
708
|
+
for (const methodName of methodNames) {
|
|
709
|
+
singletonFn[methodName] = (...args) => {
|
|
710
|
+
const instance = singletonFn();
|
|
711
|
+
return instance[methodName](...args);
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
methodsInitialized = true;
|
|
715
|
+
}, "initializeMethods");
|
|
716
|
+
return new Proxy(singletonFn, {
|
|
717
|
+
get(target, prop, receiver) {
|
|
718
|
+
if (typeof prop === "string" && !Reflect.has(target, prop)) {
|
|
719
|
+
initializeMethods();
|
|
720
|
+
}
|
|
721
|
+
return Reflect.get(target, prop, receiver);
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
__name(wrapSingletonWithAccessors, "wrapSingletonWithAccessors");
|
|
699
726
|
var router = (0, import_neko_helper3.createSingleton)(() => new Router());
|
|
700
|
-
var scheduler = (
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
727
|
+
var scheduler = wrapSingletonWithAccessors(
|
|
728
|
+
(0, import_neko_helper3.createSingleton)(() => {
|
|
729
|
+
const rc = new import_neko_scheduler.Scheduler();
|
|
730
|
+
rc.setErrorHandler((err, job) => {
|
|
731
|
+
logger().error({
|
|
732
|
+
msg: "Scheduled job error",
|
|
733
|
+
err,
|
|
734
|
+
job_name: job.getName()
|
|
735
|
+
});
|
|
707
736
|
});
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
737
|
+
return rc;
|
|
738
|
+
})
|
|
739
|
+
);
|
|
711
740
|
var db = /* @__PURE__ */ __name((label = "default") => (0, import_neko_context3.ctx)().getOrThrow(["database", label]), "db");
|
|
712
|
-
var storage = (
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
741
|
+
var storage = wrapSingletonWithAccessors(
|
|
742
|
+
(0, import_neko_helper3.createSingleton)((label = "default") => {
|
|
743
|
+
let storage_config = import_neko_config.config.get(["storages", label].join("."));
|
|
744
|
+
const provider = import_neko_storage2.StorageProviderFactory.create(
|
|
745
|
+
storage_config.provider,
|
|
746
|
+
storage_config.config
|
|
747
|
+
);
|
|
748
|
+
return new import_neko_storage2.Storage(provider);
|
|
749
|
+
})
|
|
750
|
+
);
|
|
720
751
|
var cli = (0, import_neko_helper3.createSingleton)(() => {
|
|
721
752
|
const [node, app, ...args] = process.argv;
|
|
722
753
|
return new import_clipanion.Cli({
|
|
@@ -731,46 +762,54 @@ var httpServer = (0, import_neko_helper3.createSingleton)(() => {
|
|
|
731
762
|
server.setRouter(router());
|
|
732
763
|
return server;
|
|
733
764
|
});
|
|
734
|
-
var logger = (
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
mailer_config.config
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
queue_config.
|
|
759
|
-
queue_config
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
});
|
|
765
|
+
var logger = wrapSingletonWithAccessors(
|
|
766
|
+
(0, import_neko_helper3.createSingleton)((label) => {
|
|
767
|
+
const logger_config = import_neko_config.config.get(["loggers", label].join("."));
|
|
768
|
+
const rc = new import_neko_logger.Logger(logger_config);
|
|
769
|
+
rc.setExtrasFunction((message) => {
|
|
770
|
+
message.requestId = (0, import_neko_context3.ctxSafe)()?.get("requestId") || "N/A";
|
|
771
|
+
return message;
|
|
772
|
+
});
|
|
773
|
+
return rc;
|
|
774
|
+
})
|
|
775
|
+
);
|
|
776
|
+
var mailer = wrapSingletonWithAccessors(
|
|
777
|
+
(0, import_neko_helper3.createSingleton)((label) => {
|
|
778
|
+
const mailer_config = import_neko_config.config.get(["mailer", label].join("."));
|
|
779
|
+
const provider = import_neko_mailer2.MailerProviderFactory.create(
|
|
780
|
+
mailer_config.provider,
|
|
781
|
+
mailer_config.config
|
|
782
|
+
);
|
|
783
|
+
const rc = new import_neko_mailer2.Mailer(provider);
|
|
784
|
+
return rc;
|
|
785
|
+
})
|
|
786
|
+
);
|
|
787
|
+
var queue = wrapSingletonWithAccessors(
|
|
788
|
+
(0, import_neko_helper3.createSingleton)((label) => {
|
|
789
|
+
const queue_config = import_neko_config.config.get(["queues", label].join("."));
|
|
790
|
+
if (!queue_config) {
|
|
791
|
+
throw new Error(`Queue configuration for '${label}' not found`);
|
|
792
|
+
}
|
|
793
|
+
const provider = import_neko_queue2.QueueTransportFactory.create(
|
|
794
|
+
queue_config.provider,
|
|
795
|
+
queue_config.config
|
|
796
|
+
);
|
|
797
|
+
return new import_neko_queue2.QueueConnection(provider);
|
|
798
|
+
})
|
|
799
|
+
);
|
|
800
|
+
var cache = wrapSingletonWithAccessors(
|
|
801
|
+
(0, import_neko_helper3.createSingleton)((label) => {
|
|
802
|
+
const cache_config = import_neko_config.config.get(["caches", label].join("."));
|
|
803
|
+
if (!cache_config) {
|
|
804
|
+
throw new Error(`Cache configuration for '${label}' not found`);
|
|
805
|
+
}
|
|
806
|
+
const provider = CacheProviderFactory.create(
|
|
807
|
+
cache_config.provider,
|
|
808
|
+
cache_config.config
|
|
809
|
+
);
|
|
810
|
+
return new import_neko_cache2.Cache(provider);
|
|
811
|
+
})
|
|
812
|
+
);
|
|
774
813
|
// Annotate the CommonJS export names for ESM import in node:
|
|
775
814
|
0 && (module.exports = {
|
|
776
815
|
cache,
|