@igniter-js/cli 0.2.67 → 0.2.69-alpha
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 +42 -37
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +41 -36
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -2
package/dist/index.mjs
CHANGED
|
@@ -4280,21 +4280,19 @@ var require_supports_color = __commonJS({
|
|
|
4280
4280
|
var tty = __require("tty");
|
|
4281
4281
|
var hasFlag = require_has_flag();
|
|
4282
4282
|
var { env } = process;
|
|
4283
|
-
var
|
|
4283
|
+
var forceColor;
|
|
4284
4284
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
4285
|
-
|
|
4285
|
+
forceColor = 0;
|
|
4286
4286
|
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
4287
|
-
|
|
4287
|
+
forceColor = 1;
|
|
4288
4288
|
}
|
|
4289
|
-
|
|
4290
|
-
if (
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
}
|
|
4297
|
-
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
4289
|
+
if ("FORCE_COLOR" in env) {
|
|
4290
|
+
if (env.FORCE_COLOR === "true") {
|
|
4291
|
+
forceColor = 1;
|
|
4292
|
+
} else if (env.FORCE_COLOR === "false") {
|
|
4293
|
+
forceColor = 0;
|
|
4294
|
+
} else {
|
|
4295
|
+
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
4298
4296
|
}
|
|
4299
4297
|
}
|
|
4300
4298
|
function translateLevel(level) {
|
|
@@ -4308,22 +4306,15 @@ var require_supports_color = __commonJS({
|
|
|
4308
4306
|
has16m: level >= 3
|
|
4309
4307
|
};
|
|
4310
4308
|
}
|
|
4311
|
-
function supportsColor(haveStream,
|
|
4312
|
-
const noFlagForceColor = envForceColor();
|
|
4313
|
-
if (noFlagForceColor !== void 0) {
|
|
4314
|
-
flagForceColor = noFlagForceColor;
|
|
4315
|
-
}
|
|
4316
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
4309
|
+
function supportsColor(haveStream, streamIsTTY) {
|
|
4317
4310
|
if (forceColor === 0) {
|
|
4318
4311
|
return 0;
|
|
4319
4312
|
}
|
|
4320
|
-
if (
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
return 2;
|
|
4326
|
-
}
|
|
4313
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
4314
|
+
return 3;
|
|
4315
|
+
}
|
|
4316
|
+
if (hasFlag("color=256")) {
|
|
4317
|
+
return 2;
|
|
4327
4318
|
}
|
|
4328
4319
|
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
4329
4320
|
return 0;
|
|
@@ -4340,7 +4331,7 @@ var require_supports_color = __commonJS({
|
|
|
4340
4331
|
return 1;
|
|
4341
4332
|
}
|
|
4342
4333
|
if ("CI" in env) {
|
|
4343
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"
|
|
4334
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
4344
4335
|
return 1;
|
|
4345
4336
|
}
|
|
4346
4337
|
return min;
|
|
@@ -4352,7 +4343,7 @@ var require_supports_color = __commonJS({
|
|
|
4352
4343
|
return 3;
|
|
4353
4344
|
}
|
|
4354
4345
|
if ("TERM_PROGRAM" in env) {
|
|
4355
|
-
const version =
|
|
4346
|
+
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
4356
4347
|
switch (env.TERM_PROGRAM) {
|
|
4357
4348
|
case "iTerm.app":
|
|
4358
4349
|
return version >= 3 ? 3 : 2;
|
|
@@ -4371,17 +4362,14 @@ var require_supports_color = __commonJS({
|
|
|
4371
4362
|
}
|
|
4372
4363
|
return min;
|
|
4373
4364
|
}
|
|
4374
|
-
function getSupportLevel(stream
|
|
4375
|
-
const level = supportsColor(stream,
|
|
4376
|
-
streamIsTTY: stream && stream.isTTY,
|
|
4377
|
-
...options
|
|
4378
|
-
});
|
|
4365
|
+
function getSupportLevel(stream) {
|
|
4366
|
+
const level = supportsColor(stream, stream && stream.isTTY);
|
|
4379
4367
|
return translateLevel(level);
|
|
4380
4368
|
}
|
|
4381
4369
|
module.exports = {
|
|
4382
4370
|
supportsColor: getSupportLevel,
|
|
4383
|
-
stdout:
|
|
4384
|
-
stderr:
|
|
4371
|
+
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
4372
|
+
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
4385
4373
|
};
|
|
4386
4374
|
}
|
|
4387
4375
|
});
|
|
@@ -17107,6 +17095,7 @@ __export(introspector_exports, {
|
|
|
17107
17095
|
});
|
|
17108
17096
|
import * as path7 from "path";
|
|
17109
17097
|
import { build } from "esbuild";
|
|
17098
|
+
import { createRequire } from "module";
|
|
17110
17099
|
function introspectRouter(router) {
|
|
17111
17100
|
const logger6 = createChildLogger({ component: "router-introspector" });
|
|
17112
17101
|
logger6.debug("Starting router introspection");
|
|
@@ -17160,8 +17149,17 @@ async function loadRouter(routerPath) {
|
|
|
17160
17149
|
format: "cjs",
|
|
17161
17150
|
write: false,
|
|
17162
17151
|
// Keep the result in memory
|
|
17163
|
-
logLevel: "silent"
|
|
17152
|
+
logLevel: "silent",
|
|
17164
17153
|
// We will handle our own logging
|
|
17154
|
+
external: [
|
|
17155
|
+
"@igniter-js/*",
|
|
17156
|
+
"@prisma/*",
|
|
17157
|
+
"prisma",
|
|
17158
|
+
"redis",
|
|
17159
|
+
"ioredis",
|
|
17160
|
+
"bullmq",
|
|
17161
|
+
"@opentelemetry/*"
|
|
17162
|
+
]
|
|
17165
17163
|
});
|
|
17166
17164
|
const [outputFile] = result.outputFiles;
|
|
17167
17165
|
if (!outputFile) {
|
|
@@ -17169,7 +17167,14 @@ async function loadRouter(routerPath) {
|
|
|
17169
17167
|
}
|
|
17170
17168
|
const compiledCode = outputFile.text;
|
|
17171
17169
|
const routerModule = { exports: {} };
|
|
17172
|
-
const
|
|
17170
|
+
const projectRequire = createRequire(fullPath);
|
|
17171
|
+
const requireFunc = (moduleName) => {
|
|
17172
|
+
try {
|
|
17173
|
+
return projectRequire(moduleName);
|
|
17174
|
+
} catch (error) {
|
|
17175
|
+
return __require(moduleName);
|
|
17176
|
+
}
|
|
17177
|
+
};
|
|
17173
17178
|
const factory = new Function("exports", "require", "module", "__filename", "__dirname", compiledCode);
|
|
17174
17179
|
factory(routerModule.exports, requireFunc, routerModule, fullPath, path7.dirname(fullPath));
|
|
17175
17180
|
const moduleExports = routerModule.exports;
|