@driftless-sh/cli 0.1.46 → 0.1.47
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 +19 -3
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -213426,11 +213426,26 @@ var require_nestjs_extractor = __commonJS({
|
|
|
213426
213426
|
}
|
|
213427
213427
|
return null;
|
|
213428
213428
|
}
|
|
213429
|
+
function calleeName(expr) {
|
|
213430
|
+
if (typescript_1.default.isIdentifier(expr))
|
|
213431
|
+
return expr.text;
|
|
213432
|
+
if (typescript_1.default.isPropertyAccessExpression(expr) && typescript_1.default.isIdentifier(expr.name))
|
|
213433
|
+
return expr.name.text;
|
|
213434
|
+
return null;
|
|
213435
|
+
}
|
|
213429
213436
|
function argText(arg) {
|
|
213430
213437
|
if (typescript_1.default.isStringLiteralLike(arg))
|
|
213431
213438
|
return [arg.text];
|
|
213432
213439
|
if (typescript_1.default.isIdentifier(arg))
|
|
213433
213440
|
return [arg.text];
|
|
213441
|
+
if (typescript_1.default.isCallExpression(arg) || typescript_1.default.isNewExpression(arg)) {
|
|
213442
|
+
const n = calleeName(arg.expression);
|
|
213443
|
+
return n ? [n] : [];
|
|
213444
|
+
}
|
|
213445
|
+
if (typescript_1.default.isPropertyAccessExpression(arg)) {
|
|
213446
|
+
const n = calleeName(arg);
|
|
213447
|
+
return n ? [n] : [];
|
|
213448
|
+
}
|
|
213434
213449
|
if (typescript_1.default.isObjectLiteralExpression(arg)) {
|
|
213435
213450
|
const out = [];
|
|
213436
213451
|
for (const prop of arg.properties) {
|
|
@@ -213873,11 +213888,12 @@ var require_nestjs_extractor = __commonJS({
|
|
|
213873
213888
|
const controllerName = className || "UnknownController";
|
|
213874
213889
|
const controllerPath = extractControllerPath(cls);
|
|
213875
213890
|
const moduleName = moduleByDir.get(node_path_1.default.dirname(facts.filePath)) ?? null;
|
|
213891
|
+
const classGuards = (cls.decoratorArgs["UseGuards"] ?? []).filter((g) => /^[A-Z]\w*$/.test(g));
|
|
213876
213892
|
for (const method of methods) {
|
|
213877
213893
|
const endpointDecorators = extractEndpointPath(method, controllerPath);
|
|
213878
213894
|
if (endpointDecorators.length === 0)
|
|
213879
213895
|
continue;
|
|
213880
|
-
const methodGuards = extractGuardsFromMethod(method);
|
|
213896
|
+
const methodGuards = [.../* @__PURE__ */ new Set([...classGuards, ...extractGuardsFromMethod(method)])];
|
|
213881
213897
|
methodGuards.forEach((g) => guardNames.add(g));
|
|
213882
213898
|
const { params, bodyDto, return_type } = extractEndpointParams(method);
|
|
213883
213899
|
const paramInfos = params.filter((p) => p.source === "param");
|
|
@@ -214560,7 +214576,7 @@ async function installSkillCommand() {
|
|
|
214560
214576
|
// src/commands/init.ts
|
|
214561
214577
|
function getVersion() {
|
|
214562
214578
|
try {
|
|
214563
|
-
return "0.1.
|
|
214579
|
+
return "0.1.47";
|
|
214564
214580
|
} catch {
|
|
214565
214581
|
return "0.0.0";
|
|
214566
214582
|
}
|
|
@@ -216669,7 +216685,7 @@ async function graphCommand(args) {
|
|
|
216669
216685
|
}
|
|
216670
216686
|
|
|
216671
216687
|
// src/index.ts
|
|
216672
|
-
var VERSION = "0.1.
|
|
216688
|
+
var VERSION = "0.1.47";
|
|
216673
216689
|
var HELP_TEXT = `Driftless CLI v${VERSION} \u2014 Living repo context for humans and coding agents
|
|
216674
216690
|
|
|
216675
216691
|
Install: npm install -g @driftless-sh/cli
|