@igniter-js/cli 0.2.69 → 0.2.71
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.js +20 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17141,8 +17141,17 @@ async function loadRouter(routerPath) {
|
|
|
17141
17141
|
format: "cjs",
|
|
17142
17142
|
write: false,
|
|
17143
17143
|
// Keep the result in memory
|
|
17144
|
-
logLevel: "silent"
|
|
17144
|
+
logLevel: "silent",
|
|
17145
17145
|
// We will handle our own logging
|
|
17146
|
+
external: [
|
|
17147
|
+
"@igniter-js/*",
|
|
17148
|
+
"@prisma/*",
|
|
17149
|
+
"prisma",
|
|
17150
|
+
"redis",
|
|
17151
|
+
"ioredis",
|
|
17152
|
+
"bullmq",
|
|
17153
|
+
"@opentelemetry/*"
|
|
17154
|
+
]
|
|
17146
17155
|
});
|
|
17147
17156
|
const [outputFile] = result.outputFiles;
|
|
17148
17157
|
if (!outputFile) {
|
|
@@ -17150,7 +17159,14 @@ async function loadRouter(routerPath) {
|
|
|
17150
17159
|
}
|
|
17151
17160
|
const compiledCode = outputFile.text;
|
|
17152
17161
|
const routerModule = { exports: {} };
|
|
17153
|
-
const
|
|
17162
|
+
const projectRequire = (0, import_module.createRequire)(fullPath);
|
|
17163
|
+
const requireFunc = (moduleName) => {
|
|
17164
|
+
try {
|
|
17165
|
+
return projectRequire(moduleName);
|
|
17166
|
+
} catch (error) {
|
|
17167
|
+
return require(moduleName);
|
|
17168
|
+
}
|
|
17169
|
+
};
|
|
17154
17170
|
const factory = new Function("exports", "require", "module", "__filename", "__dirname", compiledCode);
|
|
17155
17171
|
factory(routerModule.exports, requireFunc, routerModule, fullPath, path7.dirname(fullPath));
|
|
17156
17172
|
const moduleExports = routerModule.exports;
|
|
@@ -17171,7 +17187,7 @@ ${errorMessages}`;
|
|
|
17171
17187
|
throw new RouterLoadError(`Failed to load router from ${routerPath}`, error);
|
|
17172
17188
|
}
|
|
17173
17189
|
}
|
|
17174
|
-
var path7, import_esbuild, RouterLoadError;
|
|
17190
|
+
var path7, import_esbuild, import_module, RouterLoadError;
|
|
17175
17191
|
var init_introspector = __esm({
|
|
17176
17192
|
"src/adapters/build/introspector.ts"() {
|
|
17177
17193
|
"use strict";
|
|
@@ -17179,6 +17195,7 @@ var init_introspector = __esm({
|
|
|
17179
17195
|
import_esbuild = require("esbuild");
|
|
17180
17196
|
init_logger();
|
|
17181
17197
|
init_esm();
|
|
17198
|
+
import_module = require("module");
|
|
17182
17199
|
RouterLoadError = class extends Error {
|
|
17183
17200
|
constructor(message, originalError) {
|
|
17184
17201
|
super(message);
|