@yawlabs/ctxlint 0.25.1 → 0.25.3
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/.pre-commit-hooks.yaml +10 -10
- package/AGENT_SESSION_LINT_SPEC.md +632 -612
- package/AGENT_SKILL_LINT_SPEC.md +20 -18
- package/CONTEXT_LINT_SPEC.md +847 -782
- package/MCP_CONFIG_LINT_SPEC.md +434 -419
- package/README.md +553 -553
- package/agent-session-lint-rules.json +243 -243
- package/bin/ctxlint.mjs +410 -360
- package/context-lint-rules.json +715 -754
- package/dist/index.js +1792 -672
- package/mcp-config-lint-rules.json +45 -162
- package/package.json +5 -4
package/dist/index.js
CHANGED
|
@@ -60,9 +60,9 @@ var init_define_WEB_FIRST_SEGMENTS = __esm({
|
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
63
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/utils/is.js
|
|
64
64
|
var require_is = __commonJS({
|
|
65
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
65
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/utils/is.js"(exports) {
|
|
66
66
|
"use strict";
|
|
67
67
|
init_define_WEB_FIRST_SEGMENTS();
|
|
68
68
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -105,9 +105,9 @@ var require_is = __commonJS({
|
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
107
|
|
|
108
|
-
// node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
108
|
+
// node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/is.js
|
|
109
109
|
var require_is2 = __commonJS({
|
|
110
|
-
"node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
110
|
+
"node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/is.js"(exports) {
|
|
111
111
|
"use strict";
|
|
112
112
|
init_define_WEB_FIRST_SEGMENTS();
|
|
113
113
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -142,9 +142,9 @@ var require_is2 = __commonJS({
|
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
144
|
|
|
145
|
-
// node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
145
|
+
// node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/messages.js
|
|
146
146
|
var require_messages = __commonJS({
|
|
147
|
-
"node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
147
|
+
"node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/messages.js"(exports) {
|
|
148
148
|
"use strict";
|
|
149
149
|
init_define_WEB_FIRST_SEGMENTS();
|
|
150
150
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m, k3, k22) {
|
|
@@ -528,9 +528,9 @@ var require_messages = __commonJS({
|
|
|
528
528
|
}
|
|
529
529
|
});
|
|
530
530
|
|
|
531
|
-
// node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
531
|
+
// node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/linkedMap.js
|
|
532
532
|
var require_linkedMap = __commonJS({
|
|
533
|
-
"node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
533
|
+
"node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(exports) {
|
|
534
534
|
"use strict";
|
|
535
535
|
init_define_WEB_FIRST_SEGMENTS();
|
|
536
536
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -913,9 +913,9 @@ var require_linkedMap = __commonJS({
|
|
|
913
913
|
}
|
|
914
914
|
});
|
|
915
915
|
|
|
916
|
-
// node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
916
|
+
// node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/disposable.js
|
|
917
917
|
var require_disposable = __commonJS({
|
|
918
|
-
"node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
918
|
+
"node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/disposable.js"(exports) {
|
|
919
919
|
"use strict";
|
|
920
920
|
init_define_WEB_FIRST_SEGMENTS();
|
|
921
921
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -932,9 +932,9 @@ var require_disposable = __commonJS({
|
|
|
932
932
|
}
|
|
933
933
|
});
|
|
934
934
|
|
|
935
|
-
// node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
935
|
+
// node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/ral.js
|
|
936
936
|
var require_ral = __commonJS({
|
|
937
|
-
"node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
937
|
+
"node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/ral.js"(exports) {
|
|
938
938
|
"use strict";
|
|
939
939
|
init_define_WEB_FIRST_SEGMENTS();
|
|
940
940
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -958,9 +958,9 @@ var require_ral = __commonJS({
|
|
|
958
958
|
}
|
|
959
959
|
});
|
|
960
960
|
|
|
961
|
-
// node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
961
|
+
// node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/events.js
|
|
962
962
|
var require_events = __commonJS({
|
|
963
|
-
"node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
963
|
+
"node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/events.js"(exports) {
|
|
964
964
|
"use strict";
|
|
965
965
|
init_define_WEB_FIRST_SEGMENTS();
|
|
966
966
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
@@ -1096,9 +1096,9 @@ var require_events = __commonJS({
|
|
|
1096
1096
|
}
|
|
1097
1097
|
});
|
|
1098
1098
|
|
|
1099
|
-
// node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
1099
|
+
// node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/cancellation.js
|
|
1100
1100
|
var require_cancellation = __commonJS({
|
|
1101
|
-
"node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
1101
|
+
"node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(exports) {
|
|
1102
1102
|
"use strict";
|
|
1103
1103
|
init_define_WEB_FIRST_SEGMENTS();
|
|
1104
1104
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m, k3, k22) {
|
|
@@ -1226,9 +1226,9 @@ var require_cancellation = __commonJS({
|
|
|
1226
1226
|
}
|
|
1227
1227
|
});
|
|
1228
1228
|
|
|
1229
|
-
// node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
1229
|
+
// node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js
|
|
1230
1230
|
var require_sharedArrayCancellation = __commonJS({
|
|
1231
|
-
"node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
1231
|
+
"node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(exports) {
|
|
1232
1232
|
"use strict";
|
|
1233
1233
|
init_define_WEB_FIRST_SEGMENTS();
|
|
1234
1234
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1306,9 +1306,9 @@ var require_sharedArrayCancellation = __commonJS({
|
|
|
1306
1306
|
}
|
|
1307
1307
|
});
|
|
1308
1308
|
|
|
1309
|
-
// node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
1309
|
+
// node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/semaphore.js
|
|
1310
1310
|
var require_semaphore = __commonJS({
|
|
1311
|
-
"node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
1311
|
+
"node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(exports) {
|
|
1312
1312
|
"use strict";
|
|
1313
1313
|
init_define_WEB_FIRST_SEGMENTS();
|
|
1314
1314
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
@@ -1330,8 +1330,8 @@ var require_semaphore = __commonJS({
|
|
|
1330
1330
|
this._waiting = [];
|
|
1331
1331
|
}
|
|
1332
1332
|
lock(thunk) {
|
|
1333
|
-
return new Promise((
|
|
1334
|
-
this._waiting.push({ thunk, resolve:
|
|
1333
|
+
return new Promise((resolve22, reject) => {
|
|
1334
|
+
this._waiting.push({ thunk, resolve: resolve22, reject });
|
|
1335
1335
|
this.runNext();
|
|
1336
1336
|
});
|
|
1337
1337
|
}
|
|
@@ -1381,9 +1381,9 @@ var require_semaphore = __commonJS({
|
|
|
1381
1381
|
}
|
|
1382
1382
|
});
|
|
1383
1383
|
|
|
1384
|
-
// node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
1384
|
+
// node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/messageReader.js
|
|
1385
1385
|
var require_messageReader = __commonJS({
|
|
1386
|
-
"node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
1386
|
+
"node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(exports) {
|
|
1387
1387
|
"use strict";
|
|
1388
1388
|
init_define_WEB_FIRST_SEGMENTS();
|
|
1389
1389
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m, k3, k22) {
|
|
@@ -1624,9 +1624,9 @@ ${JSON.stringify(Object.fromEntries(headers))}`));
|
|
|
1624
1624
|
}
|
|
1625
1625
|
});
|
|
1626
1626
|
|
|
1627
|
-
// node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
1627
|
+
// node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/messageWriter.js
|
|
1628
1628
|
var require_messageWriter = __commonJS({
|
|
1629
|
-
"node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
1629
|
+
"node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(exports) {
|
|
1630
1630
|
"use strict";
|
|
1631
1631
|
init_define_WEB_FIRST_SEGMENTS();
|
|
1632
1632
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m, k3, k22) {
|
|
@@ -1783,9 +1783,9 @@ var require_messageWriter = __commonJS({
|
|
|
1783
1783
|
}
|
|
1784
1784
|
});
|
|
1785
1785
|
|
|
1786
|
-
// node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
1786
|
+
// node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js
|
|
1787
1787
|
var require_messageBuffer = __commonJS({
|
|
1788
|
-
"node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
1788
|
+
"node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(exports) {
|
|
1789
1789
|
"use strict";
|
|
1790
1790
|
init_define_WEB_FIRST_SEGMENTS();
|
|
1791
1791
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1935,9 +1935,9 @@ ${header}`);
|
|
|
1935
1935
|
}
|
|
1936
1936
|
});
|
|
1937
1937
|
|
|
1938
|
-
// node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
1938
|
+
// node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/connection.js
|
|
1939
1939
|
var require_connection = __commonJS({
|
|
1940
|
-
"node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
1940
|
+
"node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/connection.js"(exports) {
|
|
1941
1941
|
"use strict";
|
|
1942
1942
|
init_define_WEB_FIRST_SEGMENTS();
|
|
1943
1943
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m, k3, k22) {
|
|
@@ -2960,9 +2960,9 @@ ${JSON.stringify(message, null, 4)}`);
|
|
|
2960
2960
|
if (typeof cancellationStrategy.sender.enableCancellation === "function") {
|
|
2961
2961
|
cancellationStrategy.sender.enableCancellation(requestMessage);
|
|
2962
2962
|
}
|
|
2963
|
-
return new Promise(async (
|
|
2963
|
+
return new Promise(async (resolve22, reject) => {
|
|
2964
2964
|
const resolveWithCleanup = (r2) => {
|
|
2965
|
-
|
|
2965
|
+
resolve22(r2);
|
|
2966
2966
|
cancellationStrategy.sender.cleanup(id);
|
|
2967
2967
|
disposable?.dispose();
|
|
2968
2968
|
};
|
|
@@ -3102,9 +3102,9 @@ ${JSON.stringify(message, null, 4)}`);
|
|
|
3102
3102
|
}
|
|
3103
3103
|
});
|
|
3104
3104
|
|
|
3105
|
-
// node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
3105
|
+
// node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/api.js
|
|
3106
3106
|
var require_api = __commonJS({
|
|
3107
|
-
"node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
3107
|
+
"node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/common/api.js"(exports) {
|
|
3108
3108
|
"use strict";
|
|
3109
3109
|
init_define_WEB_FIRST_SEGMENTS();
|
|
3110
3110
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
@@ -4887,9 +4887,9 @@ var init_main = __esm({
|
|
|
4887
4887
|
}
|
|
4888
4888
|
});
|
|
4889
4889
|
|
|
4890
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
4890
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/messages.js
|
|
4891
4891
|
var require_messages2 = __commonJS({
|
|
4892
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
4892
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(exports) {
|
|
4893
4893
|
"use strict";
|
|
4894
4894
|
init_define_WEB_FIRST_SEGMENTS();
|
|
4895
4895
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -4971,9 +4971,9 @@ var require_messages2 = __commonJS({
|
|
|
4971
4971
|
}
|
|
4972
4972
|
});
|
|
4973
4973
|
|
|
4974
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
4974
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js
|
|
4975
4975
|
var require_is3 = __commonJS({
|
|
4976
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
4976
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(exports) {
|
|
4977
4977
|
"use strict";
|
|
4978
4978
|
init_define_WEB_FIRST_SEGMENTS();
|
|
4979
4979
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5016,9 +5016,9 @@ var require_is3 = __commonJS({
|
|
|
5016
5016
|
}
|
|
5017
5017
|
});
|
|
5018
5018
|
|
|
5019
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5019
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js
|
|
5020
5020
|
var require_protocol_implementation = __commonJS({
|
|
5021
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5021
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(exports) {
|
|
5022
5022
|
"use strict";
|
|
5023
5023
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5024
5024
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5034,9 +5034,9 @@ var require_protocol_implementation = __commonJS({
|
|
|
5034
5034
|
}
|
|
5035
5035
|
});
|
|
5036
5036
|
|
|
5037
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5037
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js
|
|
5038
5038
|
var require_protocol_typeDefinition = __commonJS({
|
|
5039
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5039
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(exports) {
|
|
5040
5040
|
"use strict";
|
|
5041
5041
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5042
5042
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5052,9 +5052,9 @@ var require_protocol_typeDefinition = __commonJS({
|
|
|
5052
5052
|
}
|
|
5053
5053
|
});
|
|
5054
5054
|
|
|
5055
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5055
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js
|
|
5056
5056
|
var require_protocol_workspaceFolder = __commonJS({
|
|
5057
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5057
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(exports) {
|
|
5058
5058
|
"use strict";
|
|
5059
5059
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5060
5060
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5077,9 +5077,9 @@ var require_protocol_workspaceFolder = __commonJS({
|
|
|
5077
5077
|
}
|
|
5078
5078
|
});
|
|
5079
5079
|
|
|
5080
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5080
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js
|
|
5081
5081
|
var require_protocol_configuration = __commonJS({
|
|
5082
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5082
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(exports) {
|
|
5083
5083
|
"use strict";
|
|
5084
5084
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5085
5085
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5095,9 +5095,9 @@ var require_protocol_configuration = __commonJS({
|
|
|
5095
5095
|
}
|
|
5096
5096
|
});
|
|
5097
5097
|
|
|
5098
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5098
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js
|
|
5099
5099
|
var require_protocol_colorProvider = __commonJS({
|
|
5100
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5100
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(exports) {
|
|
5101
5101
|
"use strict";
|
|
5102
5102
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5103
5103
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5120,9 +5120,9 @@ var require_protocol_colorProvider = __commonJS({
|
|
|
5120
5120
|
}
|
|
5121
5121
|
});
|
|
5122
5122
|
|
|
5123
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5123
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js
|
|
5124
5124
|
var require_protocol_foldingRange = __commonJS({
|
|
5125
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5125
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(exports) {
|
|
5126
5126
|
"use strict";
|
|
5127
5127
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5128
5128
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5145,9 +5145,9 @@ var require_protocol_foldingRange = __commonJS({
|
|
|
5145
5145
|
}
|
|
5146
5146
|
});
|
|
5147
5147
|
|
|
5148
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5148
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js
|
|
5149
5149
|
var require_protocol_declaration = __commonJS({
|
|
5150
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5150
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(exports) {
|
|
5151
5151
|
"use strict";
|
|
5152
5152
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5153
5153
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5163,9 +5163,9 @@ var require_protocol_declaration = __commonJS({
|
|
|
5163
5163
|
}
|
|
5164
5164
|
});
|
|
5165
5165
|
|
|
5166
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5166
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js
|
|
5167
5167
|
var require_protocol_selectionRange = __commonJS({
|
|
5168
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5168
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(exports) {
|
|
5169
5169
|
"use strict";
|
|
5170
5170
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5171
5171
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5181,9 +5181,9 @@ var require_protocol_selectionRange = __commonJS({
|
|
|
5181
5181
|
}
|
|
5182
5182
|
});
|
|
5183
5183
|
|
|
5184
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5184
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js
|
|
5185
5185
|
var require_protocol_progress = __commonJS({
|
|
5186
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5186
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(exports) {
|
|
5187
5187
|
"use strict";
|
|
5188
5188
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5189
5189
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5214,9 +5214,9 @@ var require_protocol_progress = __commonJS({
|
|
|
5214
5214
|
}
|
|
5215
5215
|
});
|
|
5216
5216
|
|
|
5217
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5217
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js
|
|
5218
5218
|
var require_protocol_callHierarchy = __commonJS({
|
|
5219
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5219
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(exports) {
|
|
5220
5220
|
"use strict";
|
|
5221
5221
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5222
5222
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5246,9 +5246,9 @@ var require_protocol_callHierarchy = __commonJS({
|
|
|
5246
5246
|
}
|
|
5247
5247
|
});
|
|
5248
5248
|
|
|
5249
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5249
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js
|
|
5250
5250
|
var require_protocol_semanticTokens = __commonJS({
|
|
5251
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5251
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(exports) {
|
|
5252
5252
|
"use strict";
|
|
5253
5253
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5254
5254
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5297,9 +5297,9 @@ var require_protocol_semanticTokens = __commonJS({
|
|
|
5297
5297
|
}
|
|
5298
5298
|
});
|
|
5299
5299
|
|
|
5300
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5300
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js
|
|
5301
5301
|
var require_protocol_showDocument = __commonJS({
|
|
5302
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5302
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(exports) {
|
|
5303
5303
|
"use strict";
|
|
5304
5304
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5305
5305
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5315,9 +5315,9 @@ var require_protocol_showDocument = __commonJS({
|
|
|
5315
5315
|
}
|
|
5316
5316
|
});
|
|
5317
5317
|
|
|
5318
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5318
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js
|
|
5319
5319
|
var require_protocol_linkedEditingRange = __commonJS({
|
|
5320
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5320
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(exports) {
|
|
5321
5321
|
"use strict";
|
|
5322
5322
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5323
5323
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5333,9 +5333,9 @@ var require_protocol_linkedEditingRange = __commonJS({
|
|
|
5333
5333
|
}
|
|
5334
5334
|
});
|
|
5335
5335
|
|
|
5336
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5336
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js
|
|
5337
5337
|
var require_protocol_fileOperations = __commonJS({
|
|
5338
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5338
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(exports) {
|
|
5339
5339
|
"use strict";
|
|
5340
5340
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5341
5341
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5391,9 +5391,9 @@ var require_protocol_fileOperations = __commonJS({
|
|
|
5391
5391
|
}
|
|
5392
5392
|
});
|
|
5393
5393
|
|
|
5394
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5394
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js
|
|
5395
5395
|
var require_protocol_moniker = __commonJS({
|
|
5396
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5396
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(exports) {
|
|
5397
5397
|
"use strict";
|
|
5398
5398
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5399
5399
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5423,9 +5423,9 @@ var require_protocol_moniker = __commonJS({
|
|
|
5423
5423
|
}
|
|
5424
5424
|
});
|
|
5425
5425
|
|
|
5426
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5426
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js
|
|
5427
5427
|
var require_protocol_typeHierarchy = __commonJS({
|
|
5428
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5428
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(exports) {
|
|
5429
5429
|
"use strict";
|
|
5430
5430
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5431
5431
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5453,9 +5453,9 @@ var require_protocol_typeHierarchy = __commonJS({
|
|
|
5453
5453
|
}
|
|
5454
5454
|
});
|
|
5455
5455
|
|
|
5456
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5456
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js
|
|
5457
5457
|
var require_protocol_inlineValue = __commonJS({
|
|
5458
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5458
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(exports) {
|
|
5459
5459
|
"use strict";
|
|
5460
5460
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5461
5461
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5478,9 +5478,9 @@ var require_protocol_inlineValue = __commonJS({
|
|
|
5478
5478
|
}
|
|
5479
5479
|
});
|
|
5480
5480
|
|
|
5481
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5481
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js
|
|
5482
5482
|
var require_protocol_inlayHint = __commonJS({
|
|
5483
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5483
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(exports) {
|
|
5484
5484
|
"use strict";
|
|
5485
5485
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5486
5486
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5510,9 +5510,9 @@ var require_protocol_inlayHint = __commonJS({
|
|
|
5510
5510
|
}
|
|
5511
5511
|
});
|
|
5512
5512
|
|
|
5513
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5513
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js
|
|
5514
5514
|
var require_protocol_diagnostic = __commonJS({
|
|
5515
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5515
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(exports) {
|
|
5516
5516
|
"use strict";
|
|
5517
5517
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5518
5518
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m, k3, k22) {
|
|
@@ -5596,9 +5596,9 @@ var require_protocol_diagnostic = __commonJS({
|
|
|
5596
5596
|
}
|
|
5597
5597
|
});
|
|
5598
5598
|
|
|
5599
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5599
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js
|
|
5600
5600
|
var require_protocol_notebook = __commonJS({
|
|
5601
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5601
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(exports) {
|
|
5602
5602
|
"use strict";
|
|
5603
5603
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5604
5604
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m, k3, k22) {
|
|
@@ -5823,9 +5823,9 @@ var require_protocol_notebook = __commonJS({
|
|
|
5823
5823
|
}
|
|
5824
5824
|
});
|
|
5825
5825
|
|
|
5826
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5826
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js
|
|
5827
5827
|
var require_protocol_inlineCompletion = __commonJS({
|
|
5828
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5828
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js"(exports) {
|
|
5829
5829
|
"use strict";
|
|
5830
5830
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5831
5831
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5841,9 +5841,9 @@ var require_protocol_inlineCompletion = __commonJS({
|
|
|
5841
5841
|
}
|
|
5842
5842
|
});
|
|
5843
5843
|
|
|
5844
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5844
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.textDocumentContent.js
|
|
5845
5845
|
var require_protocol_textDocumentContent = __commonJS({
|
|
5846
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5846
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.textDocumentContent.js"(exports) {
|
|
5847
5847
|
"use strict";
|
|
5848
5848
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5849
5849
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -5865,9 +5865,9 @@ var require_protocol_textDocumentContent = __commonJS({
|
|
|
5865
5865
|
}
|
|
5866
5866
|
});
|
|
5867
5867
|
|
|
5868
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5868
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.js
|
|
5869
5869
|
var require_protocol = __commonJS({
|
|
5870
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
5870
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/protocol.js"(exports) {
|
|
5871
5871
|
"use strict";
|
|
5872
5872
|
init_define_WEB_FIRST_SEGMENTS();
|
|
5873
5873
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m, k3, k22) {
|
|
@@ -6594,9 +6594,9 @@ var require_protocol = __commonJS({
|
|
|
6594
6594
|
}
|
|
6595
6595
|
});
|
|
6596
6596
|
|
|
6597
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
6597
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/connection.js
|
|
6598
6598
|
var require_connection2 = __commonJS({
|
|
6599
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
6599
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(exports) {
|
|
6600
6600
|
"use strict";
|
|
6601
6601
|
init_define_WEB_FIRST_SEGMENTS();
|
|
6602
6602
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -6611,9 +6611,9 @@ var require_connection2 = __commonJS({
|
|
|
6611
6611
|
}
|
|
6612
6612
|
});
|
|
6613
6613
|
|
|
6614
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
6614
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/api.js
|
|
6615
6615
|
var require_api2 = __commonJS({
|
|
6616
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
6616
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/common/api.js"(exports) {
|
|
6617
6617
|
"use strict";
|
|
6618
6618
|
init_define_WEB_FIRST_SEGMENTS();
|
|
6619
6619
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m, k3, k22) {
|
|
@@ -6654,9 +6654,9 @@ var require_api2 = __commonJS({
|
|
|
6654
6654
|
}
|
|
6655
6655
|
});
|
|
6656
6656
|
|
|
6657
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
6657
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/utils/uuid.js
|
|
6658
6658
|
var require_uuid = __commonJS({
|
|
6659
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
6659
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/utils/uuid.js"(exports) {
|
|
6660
6660
|
"use strict";
|
|
6661
6661
|
init_define_WEB_FIRST_SEGMENTS();
|
|
6662
6662
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -6747,9 +6747,9 @@ var require_uuid = __commonJS({
|
|
|
6747
6747
|
}
|
|
6748
6748
|
});
|
|
6749
6749
|
|
|
6750
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
6750
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/progress.js
|
|
6751
6751
|
var require_progress = __commonJS({
|
|
6752
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
6752
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/progress.js"(exports) {
|
|
6753
6753
|
"use strict";
|
|
6754
6754
|
init_define_WEB_FIRST_SEGMENTS();
|
|
6755
6755
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -6915,9 +6915,9 @@ var require_progress = __commonJS({
|
|
|
6915
6915
|
}
|
|
6916
6916
|
});
|
|
6917
6917
|
|
|
6918
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
6918
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/configuration.js
|
|
6919
6919
|
var require_configuration = __commonJS({
|
|
6920
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
6920
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/configuration.js"(exports) {
|
|
6921
6921
|
"use strict";
|
|
6922
6922
|
init_define_WEB_FIRST_SEGMENTS();
|
|
6923
6923
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m, k3, k22) {
|
|
@@ -6990,9 +6990,9 @@ var require_configuration = __commonJS({
|
|
|
6990
6990
|
}
|
|
6991
6991
|
});
|
|
6992
6992
|
|
|
6993
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
6993
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/workspaceFolder.js
|
|
6994
6994
|
var require_workspaceFolder = __commonJS({
|
|
6995
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
6995
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/workspaceFolder.js"(exports) {
|
|
6996
6996
|
"use strict";
|
|
6997
6997
|
init_define_WEB_FIRST_SEGMENTS();
|
|
6998
6998
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -7040,9 +7040,9 @@ var require_workspaceFolder = __commonJS({
|
|
|
7040
7040
|
}
|
|
7041
7041
|
});
|
|
7042
7042
|
|
|
7043
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
7043
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/callHierarchy.js
|
|
7044
7044
|
var require_callHierarchy = __commonJS({
|
|
7045
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
7045
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/callHierarchy.js"(exports) {
|
|
7046
7046
|
"use strict";
|
|
7047
7047
|
init_define_WEB_FIRST_SEGMENTS();
|
|
7048
7048
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -7077,9 +7077,9 @@ var require_callHierarchy = __commonJS({
|
|
|
7077
7077
|
}
|
|
7078
7078
|
});
|
|
7079
7079
|
|
|
7080
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
7080
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/semanticTokens.js
|
|
7081
7081
|
var require_semanticTokens = __commonJS({
|
|
7082
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
7082
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/semanticTokens.js"(exports) {
|
|
7083
7083
|
"use strict";
|
|
7084
7084
|
init_define_WEB_FIRST_SEGMENTS();
|
|
7085
7085
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -7317,9 +7317,9 @@ var require_semanticTokens = __commonJS({
|
|
|
7317
7317
|
}
|
|
7318
7318
|
});
|
|
7319
7319
|
|
|
7320
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
7320
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/showDocument.js
|
|
7321
7321
|
var require_showDocument = __commonJS({
|
|
7322
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
7322
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/showDocument.js"(exports) {
|
|
7323
7323
|
"use strict";
|
|
7324
7324
|
init_define_WEB_FIRST_SEGMENTS();
|
|
7325
7325
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -7336,9 +7336,9 @@ var require_showDocument = __commonJS({
|
|
|
7336
7336
|
}
|
|
7337
7337
|
});
|
|
7338
7338
|
|
|
7339
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
7339
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/fileOperations.js
|
|
7340
7340
|
var require_fileOperations = __commonJS({
|
|
7341
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
7341
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/fileOperations.js"(exports) {
|
|
7342
7342
|
"use strict";
|
|
7343
7343
|
init_define_WEB_FIRST_SEGMENTS();
|
|
7344
7344
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -7382,9 +7382,9 @@ var require_fileOperations = __commonJS({
|
|
|
7382
7382
|
}
|
|
7383
7383
|
});
|
|
7384
7384
|
|
|
7385
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
7385
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/linkedEditingRange.js
|
|
7386
7386
|
var require_linkedEditingRange = __commonJS({
|
|
7387
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
7387
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/linkedEditingRange.js"(exports) {
|
|
7388
7388
|
"use strict";
|
|
7389
7389
|
init_define_WEB_FIRST_SEGMENTS();
|
|
7390
7390
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -7403,9 +7403,9 @@ var require_linkedEditingRange = __commonJS({
|
|
|
7403
7403
|
}
|
|
7404
7404
|
});
|
|
7405
7405
|
|
|
7406
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
7406
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/typeHierarchy.js
|
|
7407
7407
|
var require_typeHierarchy = __commonJS({
|
|
7408
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
7408
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/typeHierarchy.js"(exports) {
|
|
7409
7409
|
"use strict";
|
|
7410
7410
|
init_define_WEB_FIRST_SEGMENTS();
|
|
7411
7411
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -7440,9 +7440,9 @@ var require_typeHierarchy = __commonJS({
|
|
|
7440
7440
|
}
|
|
7441
7441
|
});
|
|
7442
7442
|
|
|
7443
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
7443
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/inlineValue.js
|
|
7444
7444
|
var require_inlineValue = __commonJS({
|
|
7445
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
7445
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/inlineValue.js"(exports) {
|
|
7446
7446
|
"use strict";
|
|
7447
7447
|
init_define_WEB_FIRST_SEGMENTS();
|
|
7448
7448
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -7468,9 +7468,9 @@ var require_inlineValue = __commonJS({
|
|
|
7468
7468
|
}
|
|
7469
7469
|
});
|
|
7470
7470
|
|
|
7471
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
7471
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/foldingRange.js
|
|
7472
7472
|
var require_foldingRange = __commonJS({
|
|
7473
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
7473
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/foldingRange.js"(exports) {
|
|
7474
7474
|
"use strict";
|
|
7475
7475
|
init_define_WEB_FIRST_SEGMENTS();
|
|
7476
7476
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -7497,9 +7497,9 @@ var require_foldingRange = __commonJS({
|
|
|
7497
7497
|
}
|
|
7498
7498
|
});
|
|
7499
7499
|
|
|
7500
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
7500
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/inlayHint.js
|
|
7501
7501
|
var require_inlayHint = __commonJS({
|
|
7502
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
7502
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/inlayHint.js"(exports) {
|
|
7503
7503
|
"use strict";
|
|
7504
7504
|
init_define_WEB_FIRST_SEGMENTS();
|
|
7505
7505
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -7530,9 +7530,9 @@ var require_inlayHint = __commonJS({
|
|
|
7530
7530
|
}
|
|
7531
7531
|
});
|
|
7532
7532
|
|
|
7533
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
7533
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/diagnostic.js
|
|
7534
7534
|
var require_diagnostic = __commonJS({
|
|
7535
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
7535
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/diagnostic.js"(exports) {
|
|
7536
7536
|
"use strict";
|
|
7537
7537
|
init_define_WEB_FIRST_SEGMENTS();
|
|
7538
7538
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -7563,9 +7563,9 @@ var require_diagnostic = __commonJS({
|
|
|
7563
7563
|
}
|
|
7564
7564
|
});
|
|
7565
7565
|
|
|
7566
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
7566
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/textDocuments.js
|
|
7567
7567
|
var require_textDocuments = __commonJS({
|
|
7568
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
7568
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/textDocuments.js"(exports) {
|
|
7569
7569
|
"use strict";
|
|
7570
7570
|
init_define_WEB_FIRST_SEGMENTS();
|
|
7571
7571
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -7737,9 +7737,9 @@ var require_textDocuments = __commonJS({
|
|
|
7737
7737
|
}
|
|
7738
7738
|
});
|
|
7739
7739
|
|
|
7740
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
7740
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/notebook.js
|
|
7741
7741
|
var require_notebook = __commonJS({
|
|
7742
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
7742
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/notebook.js"(exports) {
|
|
7743
7743
|
"use strict";
|
|
7744
7744
|
init_define_WEB_FIRST_SEGMENTS();
|
|
7745
7745
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -8007,9 +8007,9 @@ var require_notebook = __commonJS({
|
|
|
8007
8007
|
}
|
|
8008
8008
|
});
|
|
8009
8009
|
|
|
8010
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
8010
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/moniker.js
|
|
8011
8011
|
var require_moniker = __commonJS({
|
|
8012
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
8012
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/moniker.js"(exports) {
|
|
8013
8013
|
"use strict";
|
|
8014
8014
|
init_define_WEB_FIRST_SEGMENTS();
|
|
8015
8015
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -8033,9 +8033,62 @@ var require_moniker = __commonJS({
|
|
|
8033
8033
|
}
|
|
8034
8034
|
});
|
|
8035
8035
|
|
|
8036
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
8036
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/inlineCompletion.js
|
|
8037
|
+
var require_inlineCompletion = __commonJS({
|
|
8038
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/inlineCompletion.js"(exports) {
|
|
8039
|
+
"use strict";
|
|
8040
|
+
init_define_WEB_FIRST_SEGMENTS();
|
|
8041
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8042
|
+
exports.InlineCompletionFeature = void 0;
|
|
8043
|
+
var vscode_languageserver_protocol_1 = require_api2();
|
|
8044
|
+
var InlineCompletionFeature = (Base) => {
|
|
8045
|
+
return class extends Base {
|
|
8046
|
+
get inlineCompletion() {
|
|
8047
|
+
return {
|
|
8048
|
+
on: (handler) => {
|
|
8049
|
+
return this.connection.onRequest(vscode_languageserver_protocol_1.InlineCompletionRequest.type, (params, cancel) => {
|
|
8050
|
+
return handler(params, cancel, this.attachWorkDoneProgress(params));
|
|
8051
|
+
});
|
|
8052
|
+
}
|
|
8053
|
+
};
|
|
8054
|
+
}
|
|
8055
|
+
};
|
|
8056
|
+
};
|
|
8057
|
+
exports.InlineCompletionFeature = InlineCompletionFeature;
|
|
8058
|
+
}
|
|
8059
|
+
});
|
|
8060
|
+
|
|
8061
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/textDocumentContent.js
|
|
8062
|
+
var require_textDocumentContent = __commonJS({
|
|
8063
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/textDocumentContent.js"(exports) {
|
|
8064
|
+
"use strict";
|
|
8065
|
+
init_define_WEB_FIRST_SEGMENTS();
|
|
8066
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8067
|
+
exports.TextDocumentContentFeature = void 0;
|
|
8068
|
+
var vscode_languageserver_protocol_1 = require_api2();
|
|
8069
|
+
var TextDocumentContentFeature = (Base) => {
|
|
8070
|
+
return class extends Base {
|
|
8071
|
+
get textDocumentContent() {
|
|
8072
|
+
return {
|
|
8073
|
+
refresh: (uri) => {
|
|
8074
|
+
return this.connection.sendRequest(vscode_languageserver_protocol_1.TextDocumentContentRefreshRequest.type, { uri });
|
|
8075
|
+
},
|
|
8076
|
+
on: (handler) => {
|
|
8077
|
+
return this.connection.onRequest(vscode_languageserver_protocol_1.TextDocumentContentRequest.type, (params, cancel) => {
|
|
8078
|
+
return handler(params, cancel);
|
|
8079
|
+
});
|
|
8080
|
+
}
|
|
8081
|
+
};
|
|
8082
|
+
}
|
|
8083
|
+
};
|
|
8084
|
+
};
|
|
8085
|
+
exports.TextDocumentContentFeature = TextDocumentContentFeature;
|
|
8086
|
+
}
|
|
8087
|
+
});
|
|
8088
|
+
|
|
8089
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/server.js
|
|
8037
8090
|
var require_server = __commonJS({
|
|
8038
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
8091
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/server.js"(exports) {
|
|
8039
8092
|
"use strict";
|
|
8040
8093
|
init_define_WEB_FIRST_SEGMENTS();
|
|
8041
8094
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m, k3, k22) {
|
|
@@ -8105,6 +8158,8 @@ var require_server = __commonJS({
|
|
|
8105
8158
|
var diagnostic_1 = require_diagnostic();
|
|
8106
8159
|
var notebook_1 = require_notebook();
|
|
8107
8160
|
var moniker_1 = require_moniker();
|
|
8161
|
+
var inlineCompletion_1 = require_inlineCompletion();
|
|
8162
|
+
var textDocumentContent_1 = require_textDocumentContent();
|
|
8108
8163
|
function null2Undefined(value) {
|
|
8109
8164
|
if (value === null) {
|
|
8110
8165
|
return void 0;
|
|
@@ -8402,7 +8457,7 @@ var require_server = __commonJS({
|
|
|
8402
8457
|
return this.connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params);
|
|
8403
8458
|
}
|
|
8404
8459
|
};
|
|
8405
|
-
var RemoteWorkspaceImpl = (0, fileOperations_1.FileOperationsFeature)((0, workspaceFolder_1.WorkspaceFoldersFeature)((0, configuration_1.ConfigurationFeature)(_RemoteWorkspaceImpl)));
|
|
8460
|
+
var RemoteWorkspaceImpl = (0, textDocumentContent_1.TextDocumentContentFeature)((0, fileOperations_1.FileOperationsFeature)((0, workspaceFolder_1.WorkspaceFoldersFeature)((0, configuration_1.ConfigurationFeature)(_RemoteWorkspaceImpl))));
|
|
8406
8461
|
var TracerImpl = class {
|
|
8407
8462
|
_trace;
|
|
8408
8463
|
_connection;
|
|
@@ -8484,7 +8539,7 @@ var require_server = __commonJS({
|
|
|
8484
8539
|
}
|
|
8485
8540
|
};
|
|
8486
8541
|
exports._LanguagesImpl = _LanguagesImpl;
|
|
8487
|
-
var LanguagesImpl = (0, foldingRange_1.FoldingRangeFeature)((0, moniker_1.MonikerFeature)((0, diagnostic_1.DiagnosticFeature)((0, inlayHint_1.InlayHintFeature)((0, inlineValue_1.InlineValueFeature)((0, typeHierarchy_1.TypeHierarchyFeature)((0, linkedEditingRange_1.LinkedEditingRangeFeature)((0, semanticTokens_1.SemanticTokensFeature)((0, callHierarchy_1.CallHierarchyFeature)(_LanguagesImpl)))))))));
|
|
8542
|
+
var LanguagesImpl = (0, inlineCompletion_1.InlineCompletionFeature)((0, foldingRange_1.FoldingRangeFeature)((0, moniker_1.MonikerFeature)((0, diagnostic_1.DiagnosticFeature)((0, inlayHint_1.InlayHintFeature)((0, inlineValue_1.InlineValueFeature)((0, typeHierarchy_1.TypeHierarchyFeature)((0, linkedEditingRange_1.LinkedEditingRangeFeature)((0, semanticTokens_1.SemanticTokensFeature)((0, callHierarchy_1.CallHierarchyFeature)(_LanguagesImpl))))))))));
|
|
8488
8543
|
var _NotebooksImpl = class {
|
|
8489
8544
|
_connection;
|
|
8490
8545
|
constructor() {
|
|
@@ -8590,8 +8645,8 @@ var require_server = __commonJS({
|
|
|
8590
8645
|
if (value instanceof Promise) {
|
|
8591
8646
|
return value;
|
|
8592
8647
|
} else if (Is3.thenable(value)) {
|
|
8593
|
-
return new Promise((
|
|
8594
|
-
value.then((resolved) =>
|
|
8648
|
+
return new Promise((resolve22, reject) => {
|
|
8649
|
+
value.then((resolved) => resolve22(resolved), (error52) => reject(error52));
|
|
8595
8650
|
});
|
|
8596
8651
|
} else {
|
|
8597
8652
|
return Promise.resolve(value);
|
|
@@ -8828,9 +8883,9 @@ var require_server = __commonJS({
|
|
|
8828
8883
|
}
|
|
8829
8884
|
});
|
|
8830
8885
|
|
|
8831
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
8886
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/node/files.js
|
|
8832
8887
|
var require_files = __commonJS({
|
|
8833
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
8888
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/node/files.js"(exports) {
|
|
8834
8889
|
"use strict";
|
|
8835
8890
|
init_define_WEB_FIRST_SEGMENTS();
|
|
8836
8891
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m, k3, k22) {
|
|
@@ -8873,13 +8928,13 @@ var require_files = __commonJS({
|
|
|
8873
8928
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8874
8929
|
exports.FileSystem = void 0;
|
|
8875
8930
|
exports.uriToFilePath = uriToFilePath;
|
|
8876
|
-
exports.resolve =
|
|
8931
|
+
exports.resolve = resolve22;
|
|
8877
8932
|
exports.resolveGlobalNodePath = resolveGlobalNodePath;
|
|
8878
8933
|
exports.resolveGlobalYarnPath = resolveGlobalYarnPath;
|
|
8879
8934
|
exports.resolveModulePath = resolveModulePath;
|
|
8880
8935
|
var url2 = __importStar(__require("url"));
|
|
8881
|
-
var
|
|
8882
|
-
var
|
|
8936
|
+
var path23 = __importStar(__require("path"));
|
|
8937
|
+
var fs18 = __importStar(__require("fs"));
|
|
8883
8938
|
var child_process_1 = __require("child_process");
|
|
8884
8939
|
function uriToFilePath(uri) {
|
|
8885
8940
|
const parsed = url2.parse(uri);
|
|
@@ -8897,12 +8952,12 @@ var require_files = __commonJS({
|
|
|
8897
8952
|
segments.shift();
|
|
8898
8953
|
}
|
|
8899
8954
|
}
|
|
8900
|
-
return
|
|
8955
|
+
return path23.normalize(segments.join("/"));
|
|
8901
8956
|
}
|
|
8902
8957
|
function isWindows() {
|
|
8903
8958
|
return process.platform === "win32";
|
|
8904
8959
|
}
|
|
8905
|
-
function
|
|
8960
|
+
function resolve22(moduleName, nodePath, cwd, tracer) {
|
|
8906
8961
|
const nodePathKey = "NODE_PATH";
|
|
8907
8962
|
const app = [
|
|
8908
8963
|
"var p = process;",
|
|
@@ -8921,13 +8976,13 @@ var require_files = __commonJS({
|
|
|
8921
8976
|
"}",
|
|
8922
8977
|
"});"
|
|
8923
8978
|
].join("");
|
|
8924
|
-
return new Promise((
|
|
8979
|
+
return new Promise((resolve23, reject) => {
|
|
8925
8980
|
const env2 = process.env;
|
|
8926
8981
|
const newEnv = /* @__PURE__ */ Object.create(null);
|
|
8927
8982
|
Object.keys(env2).forEach((key) => newEnv[key] = env2[key]);
|
|
8928
|
-
if (nodePath &&
|
|
8983
|
+
if (nodePath && fs18.existsSync(nodePath)) {
|
|
8929
8984
|
if (newEnv[nodePathKey]) {
|
|
8930
|
-
newEnv[nodePathKey] = nodePath +
|
|
8985
|
+
newEnv[nodePathKey] = nodePath + path23.delimiter + newEnv[nodePathKey];
|
|
8931
8986
|
} else {
|
|
8932
8987
|
newEnv[nodePathKey] = nodePath;
|
|
8933
8988
|
}
|
|
@@ -8953,7 +9008,7 @@ var require_files = __commonJS({
|
|
|
8953
9008
|
if (message2.c === "r") {
|
|
8954
9009
|
cp.send({ c: "e" });
|
|
8955
9010
|
if (message2.s) {
|
|
8956
|
-
|
|
9011
|
+
resolve23(message2.r);
|
|
8957
9012
|
} else {
|
|
8958
9013
|
reject(new Error(`Failed to resolve module: ${moduleName}`));
|
|
8959
9014
|
}
|
|
@@ -8999,9 +9054,9 @@ var require_files = __commonJS({
|
|
|
8999
9054
|
}
|
|
9000
9055
|
if (prefix.length > 0) {
|
|
9001
9056
|
if (isWindows()) {
|
|
9002
|
-
return
|
|
9057
|
+
return path23.join(prefix, "node_modules");
|
|
9003
9058
|
} else {
|
|
9004
|
-
return
|
|
9059
|
+
return path23.join(prefix, "lib", "node_modules");
|
|
9005
9060
|
}
|
|
9006
9061
|
}
|
|
9007
9062
|
return void 0;
|
|
@@ -9040,7 +9095,7 @@ var require_files = __commonJS({
|
|
|
9040
9095
|
try {
|
|
9041
9096
|
const yarn = JSON.parse(line);
|
|
9042
9097
|
if (yarn.type === "log") {
|
|
9043
|
-
return
|
|
9098
|
+
return path23.join(yarn.data, "node_modules");
|
|
9044
9099
|
}
|
|
9045
9100
|
} catch (e) {
|
|
9046
9101
|
}
|
|
@@ -9062,44 +9117,44 @@ var require_files = __commonJS({
|
|
|
9062
9117
|
if (process.platform === "win32") {
|
|
9063
9118
|
_isCaseSensitive = false;
|
|
9064
9119
|
} else {
|
|
9065
|
-
_isCaseSensitive = !
|
|
9120
|
+
_isCaseSensitive = !fs18.existsSync(__filename.toUpperCase()) || !fs18.existsSync(__filename.toLowerCase());
|
|
9066
9121
|
}
|
|
9067
9122
|
return _isCaseSensitive;
|
|
9068
9123
|
}
|
|
9069
9124
|
FileSystem2.isCaseSensitive = isCaseSensitive;
|
|
9070
9125
|
function isParent(parent, child) {
|
|
9071
9126
|
if (isCaseSensitive()) {
|
|
9072
|
-
return
|
|
9127
|
+
return path23.normalize(child).indexOf(path23.normalize(parent)) === 0;
|
|
9073
9128
|
} else {
|
|
9074
|
-
return
|
|
9129
|
+
return path23.normalize(child).toLowerCase().indexOf(path23.normalize(parent).toLowerCase()) === 0;
|
|
9075
9130
|
}
|
|
9076
9131
|
}
|
|
9077
9132
|
FileSystem2.isParent = isParent;
|
|
9078
9133
|
})(FileSystem || (exports.FileSystem = FileSystem = {}));
|
|
9079
9134
|
function resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) {
|
|
9080
9135
|
if (nodePath) {
|
|
9081
|
-
if (!
|
|
9082
|
-
nodePath =
|
|
9136
|
+
if (!path23.isAbsolute(nodePath)) {
|
|
9137
|
+
nodePath = path23.join(workspaceRoot, nodePath);
|
|
9083
9138
|
}
|
|
9084
|
-
return
|
|
9139
|
+
return resolve22(moduleName, nodePath, nodePath, tracer).then((value) => {
|
|
9085
9140
|
if (FileSystem.isParent(nodePath, value)) {
|
|
9086
9141
|
return value;
|
|
9087
9142
|
} else {
|
|
9088
9143
|
return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`));
|
|
9089
9144
|
}
|
|
9090
9145
|
}).then(void 0, (_error) => {
|
|
9091
|
-
return
|
|
9146
|
+
return resolve22(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
|
|
9092
9147
|
});
|
|
9093
9148
|
} else {
|
|
9094
|
-
return
|
|
9149
|
+
return resolve22(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
|
|
9095
9150
|
}
|
|
9096
9151
|
}
|
|
9097
9152
|
}
|
|
9098
9153
|
});
|
|
9099
9154
|
|
|
9100
|
-
// node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
9155
|
+
// node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/node/ril.js
|
|
9101
9156
|
var require_ril = __commonJS({
|
|
9102
|
-
"node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
9157
|
+
"node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/node/ril.js"(exports) {
|
|
9103
9158
|
"use strict";
|
|
9104
9159
|
init_define_WEB_FIRST_SEGMENTS();
|
|
9105
9160
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -9174,10 +9229,10 @@ var require_ril = __commonJS({
|
|
|
9174
9229
|
return api_1.Disposable.create(() => this.stream.off("end", listener));
|
|
9175
9230
|
}
|
|
9176
9231
|
write(data, encoding) {
|
|
9177
|
-
return new Promise((
|
|
9232
|
+
return new Promise((resolve22, reject) => {
|
|
9178
9233
|
const callback = (error52) => {
|
|
9179
9234
|
if (error52 === void 0 || error52 === null) {
|
|
9180
|
-
|
|
9235
|
+
resolve22();
|
|
9181
9236
|
} else {
|
|
9182
9237
|
reject(error52);
|
|
9183
9238
|
}
|
|
@@ -9256,9 +9311,9 @@ var require_ril = __commonJS({
|
|
|
9256
9311
|
}
|
|
9257
9312
|
});
|
|
9258
9313
|
|
|
9259
|
-
// node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
9314
|
+
// node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/node/main.js
|
|
9260
9315
|
var require_main = __commonJS({
|
|
9261
|
-
"node_modules/.pnpm/vscode-jsonrpc@9.0.
|
|
9316
|
+
"node_modules/.pnpm/vscode-jsonrpc@9.0.1/node_modules/vscode-jsonrpc/lib/node/main.js"(exports) {
|
|
9262
9317
|
"use strict";
|
|
9263
9318
|
init_define_WEB_FIRST_SEGMENTS();
|
|
9264
9319
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m, k3, k22) {
|
|
@@ -9314,9 +9369,9 @@ var require_main = __commonJS({
|
|
|
9314
9369
|
exports.createMessageConnection = createMessageConnection;
|
|
9315
9370
|
var ril_1 = __importDefault(require_ril());
|
|
9316
9371
|
ril_1.default.install();
|
|
9317
|
-
var
|
|
9372
|
+
var path23 = __importStar(__require("path"));
|
|
9318
9373
|
var os7 = __importStar(__require("os"));
|
|
9319
|
-
var
|
|
9374
|
+
var fs18 = __importStar(__require("fs"));
|
|
9320
9375
|
var crypto_1 = __require("crypto");
|
|
9321
9376
|
var net_1 = __require("net");
|
|
9322
9377
|
var api_1 = require_api();
|
|
@@ -9449,7 +9504,7 @@ var require_main = __commonJS({
|
|
|
9449
9504
|
var XDG_RUNTIME_DIR = process.env["XDG_RUNTIME_DIR"];
|
|
9450
9505
|
var safeIpcPathLengths = /* @__PURE__ */ new Map([
|
|
9451
9506
|
["linux", 107],
|
|
9452
|
-
["darwin",
|
|
9507
|
+
["darwin", 102]
|
|
9453
9508
|
]);
|
|
9454
9509
|
function generateRandomPipeName() {
|
|
9455
9510
|
if (process.platform === "win32") {
|
|
@@ -9457,7 +9512,7 @@ var require_main = __commonJS({
|
|
|
9457
9512
|
}
|
|
9458
9513
|
let randomLength = 32;
|
|
9459
9514
|
const fixedLength = "/lsp-.sock".length;
|
|
9460
|
-
const tmpDir =
|
|
9515
|
+
const tmpDir = fs18.realpathSync(XDG_RUNTIME_DIR ?? os7.tmpdir());
|
|
9461
9516
|
const limit = safeIpcPathLengths.get(process.platform);
|
|
9462
9517
|
if (limit !== void 0) {
|
|
9463
9518
|
randomLength = Math.min(limit - tmpDir.length - fixedLength, randomLength);
|
|
@@ -9466,14 +9521,14 @@ var require_main = __commonJS({
|
|
|
9466
9521
|
throw new Error(`Unable to generate a random pipe name with ${randomLength} characters.`);
|
|
9467
9522
|
}
|
|
9468
9523
|
const randomSuffix = (0, crypto_1.randomBytes)(Math.floor(randomLength / 2)).toString("hex");
|
|
9469
|
-
return
|
|
9524
|
+
return path23.join(tmpDir, `lsp-${randomSuffix}.sock`);
|
|
9470
9525
|
}
|
|
9471
9526
|
function createClientPipeTransport(pipeName, encoding = "utf-8") {
|
|
9472
9527
|
let connectResolve;
|
|
9473
|
-
const connected = new Promise((
|
|
9474
|
-
connectResolve =
|
|
9528
|
+
const connected = new Promise((resolve22, _reject) => {
|
|
9529
|
+
connectResolve = resolve22;
|
|
9475
9530
|
});
|
|
9476
|
-
return new Promise((
|
|
9531
|
+
return new Promise((resolve22, reject) => {
|
|
9477
9532
|
const server2 = (0, net_1.createServer)((socket) => {
|
|
9478
9533
|
server2.close();
|
|
9479
9534
|
connectResolve([
|
|
@@ -9484,7 +9539,7 @@ var require_main = __commonJS({
|
|
|
9484
9539
|
server2.on("error", reject);
|
|
9485
9540
|
server2.listen(pipeName, () => {
|
|
9486
9541
|
server2.removeListener("error", reject);
|
|
9487
|
-
|
|
9542
|
+
resolve22({
|
|
9488
9543
|
onConnected: () => {
|
|
9489
9544
|
return connected;
|
|
9490
9545
|
}
|
|
@@ -9501,10 +9556,10 @@ var require_main = __commonJS({
|
|
|
9501
9556
|
}
|
|
9502
9557
|
function createClientSocketTransport(port, encoding = "utf-8") {
|
|
9503
9558
|
let connectResolve;
|
|
9504
|
-
const connected = new Promise((
|
|
9505
|
-
connectResolve =
|
|
9559
|
+
const connected = new Promise((resolve22, _reject) => {
|
|
9560
|
+
connectResolve = resolve22;
|
|
9506
9561
|
});
|
|
9507
|
-
return new Promise((
|
|
9562
|
+
return new Promise((resolve22, reject) => {
|
|
9508
9563
|
const server2 = (0, net_1.createServer)((socket) => {
|
|
9509
9564
|
server2.close();
|
|
9510
9565
|
connectResolve([
|
|
@@ -9515,7 +9570,7 @@ var require_main = __commonJS({
|
|
|
9515
9570
|
server2.on("error", reject);
|
|
9516
9571
|
server2.listen(port, "127.0.0.1", () => {
|
|
9517
9572
|
server2.removeListener("error", reject);
|
|
9518
|
-
|
|
9573
|
+
resolve22({
|
|
9519
9574
|
onConnected: () => {
|
|
9520
9575
|
return connected;
|
|
9521
9576
|
}
|
|
@@ -9552,9 +9607,9 @@ var require_main = __commonJS({
|
|
|
9552
9607
|
}
|
|
9553
9608
|
});
|
|
9554
9609
|
|
|
9555
|
-
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
9610
|
+
// node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/node/main.js
|
|
9556
9611
|
var require_main2 = __commonJS({
|
|
9557
|
-
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.
|
|
9612
|
+
"node_modules/.pnpm/vscode-languageserver-protocol@3.18.2/node_modules/vscode-languageserver-protocol/lib/node/main.js"(exports) {
|
|
9558
9613
|
"use strict";
|
|
9559
9614
|
init_define_WEB_FIRST_SEGMENTS();
|
|
9560
9615
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m, k3, k22) {
|
|
@@ -9584,62 +9639,9 @@ var require_main2 = __commonJS({
|
|
|
9584
9639
|
}
|
|
9585
9640
|
});
|
|
9586
9641
|
|
|
9587
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
9588
|
-
var require_inlineCompletion_proposed = __commonJS({
|
|
9589
|
-
"node_modules/.pnpm/vscode-languageserver@10.0.0/node_modules/vscode-languageserver/lib/common/inlineCompletion.proposed.js"(exports) {
|
|
9590
|
-
"use strict";
|
|
9591
|
-
init_define_WEB_FIRST_SEGMENTS();
|
|
9592
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9593
|
-
exports.InlineCompletionFeature = void 0;
|
|
9594
|
-
var vscode_languageserver_protocol_1 = require_api2();
|
|
9595
|
-
var InlineCompletionFeature = (Base) => {
|
|
9596
|
-
return class extends Base {
|
|
9597
|
-
get inlineCompletion() {
|
|
9598
|
-
return {
|
|
9599
|
-
on: (handler) => {
|
|
9600
|
-
return this.connection.onRequest(vscode_languageserver_protocol_1.InlineCompletionRequest.type, (params, cancel) => {
|
|
9601
|
-
return handler(params, cancel, this.attachWorkDoneProgress(params));
|
|
9602
|
-
});
|
|
9603
|
-
}
|
|
9604
|
-
};
|
|
9605
|
-
}
|
|
9606
|
-
};
|
|
9607
|
-
};
|
|
9608
|
-
exports.InlineCompletionFeature = InlineCompletionFeature;
|
|
9609
|
-
}
|
|
9610
|
-
});
|
|
9611
|
-
|
|
9612
|
-
// node_modules/.pnpm/vscode-languageserver@10.0.0/node_modules/vscode-languageserver/lib/common/textDocumentContent.js
|
|
9613
|
-
var require_textDocumentContent = __commonJS({
|
|
9614
|
-
"node_modules/.pnpm/vscode-languageserver@10.0.0/node_modules/vscode-languageserver/lib/common/textDocumentContent.js"(exports) {
|
|
9615
|
-
"use strict";
|
|
9616
|
-
init_define_WEB_FIRST_SEGMENTS();
|
|
9617
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9618
|
-
exports.TextDocumentContentFeature = void 0;
|
|
9619
|
-
var vscode_languageserver_protocol_1 = require_api2();
|
|
9620
|
-
var TextDocumentContentFeature = (Base) => {
|
|
9621
|
-
return class extends Base {
|
|
9622
|
-
get textDocumentContent() {
|
|
9623
|
-
return {
|
|
9624
|
-
refresh: (uri) => {
|
|
9625
|
-
return this.connection.sendRequest(vscode_languageserver_protocol_1.TextDocumentContentRefreshRequest.type, { uri });
|
|
9626
|
-
},
|
|
9627
|
-
on: (handler) => {
|
|
9628
|
-
return this.connection.onRequest(vscode_languageserver_protocol_1.TextDocumentContentRequest.type, (params, cancel) => {
|
|
9629
|
-
return handler(params, cancel);
|
|
9630
|
-
});
|
|
9631
|
-
}
|
|
9632
|
-
};
|
|
9633
|
-
}
|
|
9634
|
-
};
|
|
9635
|
-
};
|
|
9636
|
-
exports.TextDocumentContentFeature = TextDocumentContentFeature;
|
|
9637
|
-
}
|
|
9638
|
-
});
|
|
9639
|
-
|
|
9640
|
-
// node_modules/.pnpm/vscode-languageserver@10.0.0/node_modules/vscode-languageserver/lib/common/api.js
|
|
9642
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/api.js
|
|
9641
9643
|
var require_api3 = __commonJS({
|
|
9642
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
9644
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/common/api.js"(exports) {
|
|
9643
9645
|
"use strict";
|
|
9644
9646
|
init_define_WEB_FIRST_SEGMENTS();
|
|
9645
9647
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m, k3, k22) {
|
|
@@ -9655,30 +9657,6 @@ var require_api3 = __commonJS({
|
|
|
9655
9657
|
if (k22 === void 0) k22 = k3;
|
|
9656
9658
|
o2[k22] = m[k3];
|
|
9657
9659
|
}));
|
|
9658
|
-
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o2, v2) {
|
|
9659
|
-
Object.defineProperty(o2, "default", { enumerable: true, value: v2 });
|
|
9660
|
-
}) : function(o2, v2) {
|
|
9661
|
-
o2["default"] = v2;
|
|
9662
|
-
});
|
|
9663
|
-
var __importStar = exports && exports.__importStar || /* @__PURE__ */ (function() {
|
|
9664
|
-
var ownKeys = function(o2) {
|
|
9665
|
-
ownKeys = Object.getOwnPropertyNames || function(o3) {
|
|
9666
|
-
var ar = [];
|
|
9667
|
-
for (var k3 in o3) if (Object.prototype.hasOwnProperty.call(o3, k3)) ar[ar.length] = k3;
|
|
9668
|
-
return ar;
|
|
9669
|
-
};
|
|
9670
|
-
return ownKeys(o2);
|
|
9671
|
-
};
|
|
9672
|
-
return function(mod) {
|
|
9673
|
-
if (mod && mod.__esModule) return mod;
|
|
9674
|
-
var result = {};
|
|
9675
|
-
if (mod != null) {
|
|
9676
|
-
for (var k3 = ownKeys(mod), i2 = 0; i2 < k3.length; i2++) if (k3[i2] !== "default") __createBinding(result, mod, k3[i2]);
|
|
9677
|
-
}
|
|
9678
|
-
__setModuleDefault(result, mod);
|
|
9679
|
-
return result;
|
|
9680
|
-
};
|
|
9681
|
-
})();
|
|
9682
9660
|
var __exportStar = exports && exports.__exportStar || function(m, exports2) {
|
|
9683
9661
|
for (var p2 in m) if (p2 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p2)) __createBinding(exports2, m, p2);
|
|
9684
9662
|
};
|
|
@@ -9688,8 +9666,6 @@ var require_api3 = __commonJS({
|
|
|
9688
9666
|
Object.defineProperty(exports, "SemanticTokensBuilder", { enumerable: true, get: function() {
|
|
9689
9667
|
return semanticTokens_1.SemanticTokensBuilder;
|
|
9690
9668
|
} });
|
|
9691
|
-
var ic = __importStar(require_inlineCompletion_proposed());
|
|
9692
|
-
var tdc = __importStar(require_textDocumentContent());
|
|
9693
9669
|
__exportStar(require_api2(), exports);
|
|
9694
9670
|
var textDocuments_1 = require_textDocuments();
|
|
9695
9671
|
Object.defineProperty(exports, "TextDocuments", { enumerable: true, get: function() {
|
|
@@ -9703,17 +9679,15 @@ var require_api3 = __commonJS({
|
|
|
9703
9679
|
var ProposedFeatures2;
|
|
9704
9680
|
(function(ProposedFeatures3) {
|
|
9705
9681
|
ProposedFeatures3.all = {
|
|
9706
|
-
__brand: "features"
|
|
9707
|
-
workspace: tdc.TextDocumentContentFeature,
|
|
9708
|
-
languages: ic.InlineCompletionFeature
|
|
9682
|
+
__brand: "features"
|
|
9709
9683
|
};
|
|
9710
9684
|
})(ProposedFeatures2 || (exports.ProposedFeatures = ProposedFeatures2 = {}));
|
|
9711
9685
|
}
|
|
9712
9686
|
});
|
|
9713
9687
|
|
|
9714
|
-
// node_modules/.pnpm/vscode-languageserver@10.
|
|
9688
|
+
// node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/node/main.js
|
|
9715
9689
|
var require_main3 = __commonJS({
|
|
9716
|
-
"node_modules/.pnpm/vscode-languageserver@10.
|
|
9690
|
+
"node_modules/.pnpm/vscode-languageserver@10.1.0/node_modules/vscode-languageserver/lib/node/main.js"(exports) {
|
|
9717
9691
|
"use strict";
|
|
9718
9692
|
init_define_WEB_FIRST_SEGMENTS();
|
|
9719
9693
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o2, m, k3, k22) {
|
|
@@ -13336,9 +13310,9 @@ var init_fs = __esm({
|
|
|
13336
13310
|
}
|
|
13337
13311
|
});
|
|
13338
13312
|
|
|
13339
|
-
// node_modules/.pnpm/picomatch@4.0.
|
|
13313
|
+
// node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/constants.js
|
|
13340
13314
|
var require_constants = __commonJS({
|
|
13341
|
-
"node_modules/.pnpm/picomatch@4.0.
|
|
13315
|
+
"node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/constants.js"(exports, module) {
|
|
13342
13316
|
"use strict";
|
|
13343
13317
|
init_define_WEB_FIRST_SEGMENTS();
|
|
13344
13318
|
var WIN_SLASH = "\\\\/";
|
|
@@ -13539,9 +13513,9 @@ var require_constants = __commonJS({
|
|
|
13539
13513
|
}
|
|
13540
13514
|
});
|
|
13541
13515
|
|
|
13542
|
-
// node_modules/.pnpm/picomatch@4.0.
|
|
13516
|
+
// node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/utils.js
|
|
13543
13517
|
var require_utils = __commonJS({
|
|
13544
|
-
"node_modules/.pnpm/picomatch@4.0.
|
|
13518
|
+
"node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/utils.js"(exports) {
|
|
13545
13519
|
"use strict";
|
|
13546
13520
|
init_define_WEB_FIRST_SEGMENTS();
|
|
13547
13521
|
var {
|
|
@@ -13593,8 +13567,8 @@ var require_utils = __commonJS({
|
|
|
13593
13567
|
}
|
|
13594
13568
|
return output;
|
|
13595
13569
|
};
|
|
13596
|
-
exports.basename = (
|
|
13597
|
-
const segs =
|
|
13570
|
+
exports.basename = (path23, { windows } = {}) => {
|
|
13571
|
+
const segs = path23.split(windows ? /[\\/]/ : "/");
|
|
13598
13572
|
const last2 = segs[segs.length - 1];
|
|
13599
13573
|
if (last2 === "") {
|
|
13600
13574
|
return segs[segs.length - 2];
|
|
@@ -13604,9 +13578,9 @@ var require_utils = __commonJS({
|
|
|
13604
13578
|
}
|
|
13605
13579
|
});
|
|
13606
13580
|
|
|
13607
|
-
// node_modules/.pnpm/picomatch@4.0.
|
|
13581
|
+
// node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/scan.js
|
|
13608
13582
|
var require_scan = __commonJS({
|
|
13609
|
-
"node_modules/.pnpm/picomatch@4.0.
|
|
13583
|
+
"node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/scan.js"(exports, module) {
|
|
13610
13584
|
"use strict";
|
|
13611
13585
|
init_define_WEB_FIRST_SEGMENTS();
|
|
13612
13586
|
var utils = require_utils();
|
|
@@ -13935,9 +13909,9 @@ var require_scan = __commonJS({
|
|
|
13935
13909
|
}
|
|
13936
13910
|
});
|
|
13937
13911
|
|
|
13938
|
-
// node_modules/.pnpm/picomatch@4.0.
|
|
13912
|
+
// node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/parse.js
|
|
13939
13913
|
var require_parse = __commonJS({
|
|
13940
|
-
"node_modules/.pnpm/picomatch@4.0.
|
|
13914
|
+
"node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/parse.js"(exports, module) {
|
|
13941
13915
|
"use strict";
|
|
13942
13916
|
init_define_WEB_FIRST_SEGMENTS();
|
|
13943
13917
|
var constants = require_constants();
|
|
@@ -13969,7 +13943,7 @@ var require_parse = __commonJS({
|
|
|
13969
13943
|
const parts = [];
|
|
13970
13944
|
let bracket = 0;
|
|
13971
13945
|
let paren = 0;
|
|
13972
|
-
let
|
|
13946
|
+
let quote2 = 0;
|
|
13973
13947
|
let value = "";
|
|
13974
13948
|
let escaped = false;
|
|
13975
13949
|
for (const ch of input) {
|
|
@@ -13984,11 +13958,11 @@ var require_parse = __commonJS({
|
|
|
13984
13958
|
continue;
|
|
13985
13959
|
}
|
|
13986
13960
|
if (ch === '"') {
|
|
13987
|
-
|
|
13961
|
+
quote2 = quote2 === 1 ? 0 : 1;
|
|
13988
13962
|
value += ch;
|
|
13989
13963
|
continue;
|
|
13990
13964
|
}
|
|
13991
|
-
if (
|
|
13965
|
+
if (quote2 === 0) {
|
|
13992
13966
|
if (ch === "[") {
|
|
13993
13967
|
bracket++;
|
|
13994
13968
|
} else if (ch === "]" && bracket > 0) {
|
|
@@ -14065,7 +14039,7 @@ var require_parse = __commonJS({
|
|
|
14065
14039
|
}
|
|
14066
14040
|
let bracket = 0;
|
|
14067
14041
|
let paren = 0;
|
|
14068
|
-
let
|
|
14042
|
+
let quote2 = 0;
|
|
14069
14043
|
let escaped = false;
|
|
14070
14044
|
for (let i2 = 1; i2 < pattern.length; i2++) {
|
|
14071
14045
|
const ch = pattern[i2];
|
|
@@ -14078,10 +14052,10 @@ var require_parse = __commonJS({
|
|
|
14078
14052
|
continue;
|
|
14079
14053
|
}
|
|
14080
14054
|
if (ch === '"') {
|
|
14081
|
-
|
|
14055
|
+
quote2 = quote2 === 1 ? 0 : 1;
|
|
14082
14056
|
continue;
|
|
14083
14057
|
}
|
|
14084
|
-
if (
|
|
14058
|
+
if (quote2 === 1) {
|
|
14085
14059
|
continue;
|
|
14086
14060
|
}
|
|
14087
14061
|
if (ch === "[") {
|
|
@@ -14114,7 +14088,11 @@ var require_parse = __commonJS({
|
|
|
14114
14088
|
}
|
|
14115
14089
|
}
|
|
14116
14090
|
};
|
|
14117
|
-
var
|
|
14091
|
+
var buildCharClassStar = (chars) => {
|
|
14092
|
+
const source = chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`;
|
|
14093
|
+
return `${source}*`;
|
|
14094
|
+
};
|
|
14095
|
+
var getStarExtglobSequenceChars = (pattern) => {
|
|
14118
14096
|
let index = 0;
|
|
14119
14097
|
const chars = [];
|
|
14120
14098
|
while (index < pattern.length) {
|
|
@@ -14136,8 +14114,7 @@ var require_parse = __commonJS({
|
|
|
14136
14114
|
if (chars.length < 1) {
|
|
14137
14115
|
return;
|
|
14138
14116
|
}
|
|
14139
|
-
|
|
14140
|
-
return `${source}*`;
|
|
14117
|
+
return chars;
|
|
14141
14118
|
};
|
|
14142
14119
|
var repeatedExtglobRecursion = (pattern) => {
|
|
14143
14120
|
let depth = 0;
|
|
@@ -14161,15 +14138,29 @@ var require_parse = __commonJS({
|
|
|
14161
14138
|
return { risky: true };
|
|
14162
14139
|
}
|
|
14163
14140
|
}
|
|
14141
|
+
const safeChars = [];
|
|
14142
|
+
let sawStarSequence = false;
|
|
14143
|
+
let combinable = true;
|
|
14164
14144
|
for (const branch of branches) {
|
|
14165
|
-
const
|
|
14166
|
-
if (
|
|
14167
|
-
|
|
14145
|
+
const chars = getStarExtglobSequenceChars(branch);
|
|
14146
|
+
if (chars) {
|
|
14147
|
+
sawStarSequence = true;
|
|
14148
|
+
safeChars.push(...chars);
|
|
14149
|
+
continue;
|
|
14150
|
+
}
|
|
14151
|
+
const literal2 = normalizeSimpleBranch(branch);
|
|
14152
|
+
if (literal2 && literal2.length === 1) {
|
|
14153
|
+
safeChars.push(literal2);
|
|
14154
|
+
continue;
|
|
14168
14155
|
}
|
|
14156
|
+
combinable = false;
|
|
14169
14157
|
if (repeatedExtglobRecursion(branch) > max) {
|
|
14170
14158
|
return { risky: true };
|
|
14171
14159
|
}
|
|
14172
14160
|
}
|
|
14161
|
+
if (sawStarSequence) {
|
|
14162
|
+
return combinable ? { risky: true, safeOutput: buildCharClassStar([...new Set(safeChars)]) } : { risky: true };
|
|
14163
|
+
}
|
|
14173
14164
|
return { risky: false };
|
|
14174
14165
|
};
|
|
14175
14166
|
var parse5 = (input, options) => {
|
|
@@ -14441,9 +14432,9 @@ var require_parse = __commonJS({
|
|
|
14441
14432
|
const idx = prev.value.lastIndexOf("[");
|
|
14442
14433
|
const pre = prev.value.slice(0, idx);
|
|
14443
14434
|
const rest2 = prev.value.slice(idx + 2);
|
|
14444
|
-
const
|
|
14445
|
-
if (
|
|
14446
|
-
prev.value = pre +
|
|
14435
|
+
const posix3 = POSIX_REGEX_SOURCE[rest2];
|
|
14436
|
+
if (posix3) {
|
|
14437
|
+
prev.value = pre + posix3;
|
|
14447
14438
|
state.backtrack = true;
|
|
14448
14439
|
advance();
|
|
14449
14440
|
if (!bos.output && tokens.indexOf(prev) === 1) {
|
|
@@ -14933,9 +14924,9 @@ var require_parse = __commonJS({
|
|
|
14933
14924
|
}
|
|
14934
14925
|
});
|
|
14935
14926
|
|
|
14936
|
-
// node_modules/.pnpm/picomatch@4.0.
|
|
14927
|
+
// node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/picomatch.js
|
|
14937
14928
|
var require_picomatch = __commonJS({
|
|
14938
|
-
"node_modules/.pnpm/picomatch@4.0.
|
|
14929
|
+
"node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/picomatch.js"(exports, module) {
|
|
14939
14930
|
"use strict";
|
|
14940
14931
|
init_define_WEB_FIRST_SEGMENTS();
|
|
14941
14932
|
var scan = require_scan();
|
|
@@ -14960,7 +14951,7 @@ var require_picomatch = __commonJS({
|
|
|
14960
14951
|
throw new TypeError("Expected pattern to be a non-empty string");
|
|
14961
14952
|
}
|
|
14962
14953
|
const opts = options || {};
|
|
14963
|
-
const
|
|
14954
|
+
const posix3 = opts.windows;
|
|
14964
14955
|
const regex2 = isState ? picomatch2.compileRe(glob, options) : picomatch2.makeRe(glob, options, false, true);
|
|
14965
14956
|
const state = regex2.state;
|
|
14966
14957
|
delete regex2.state;
|
|
@@ -14970,8 +14961,8 @@ var require_picomatch = __commonJS({
|
|
|
14970
14961
|
isIgnored = picomatch2(opts.ignore, ignoreOpts, returnState);
|
|
14971
14962
|
}
|
|
14972
14963
|
const matcher = (input, returnObject = false) => {
|
|
14973
|
-
const { isMatch, match, output } = picomatch2.test(input, regex2, options, { glob, posix:
|
|
14974
|
-
const result = { glob, state, regex: regex2, posix:
|
|
14964
|
+
const { isMatch, match, output } = picomatch2.test(input, regex2, options, { glob, posix: posix3 });
|
|
14965
|
+
const result = { glob, state, regex: regex2, posix: posix3, input, output, match, isMatch };
|
|
14975
14966
|
if (typeof opts.onResult === "function") {
|
|
14976
14967
|
opts.onResult(result);
|
|
14977
14968
|
}
|
|
@@ -14996,7 +14987,7 @@ var require_picomatch = __commonJS({
|
|
|
14996
14987
|
}
|
|
14997
14988
|
return matcher;
|
|
14998
14989
|
};
|
|
14999
|
-
picomatch2.test = (input, regex2, options, { glob, posix:
|
|
14990
|
+
picomatch2.test = (input, regex2, options, { glob, posix: posix3 } = {}) => {
|
|
15000
14991
|
if (typeof input !== "string") {
|
|
15001
14992
|
throw new TypeError("Expected input to be a string");
|
|
15002
14993
|
}
|
|
@@ -15004,7 +14995,7 @@ var require_picomatch = __commonJS({
|
|
|
15004
14995
|
return { isMatch: false, output: "" };
|
|
15005
14996
|
}
|
|
15006
14997
|
const opts = options || {};
|
|
15007
|
-
const format3 = opts.format || (
|
|
14998
|
+
const format3 = opts.format || (posix3 ? utils.toPosixSlashes : null);
|
|
15008
14999
|
let match = input === glob;
|
|
15009
15000
|
let output = match && format3 ? format3(input) : input;
|
|
15010
15001
|
if (match === false) {
|
|
@@ -15013,16 +15004,16 @@ var require_picomatch = __commonJS({
|
|
|
15013
15004
|
}
|
|
15014
15005
|
if (match === false || opts.capture === true) {
|
|
15015
15006
|
if (opts.matchBase === true || opts.basename === true) {
|
|
15016
|
-
match = picomatch2.matchBase(input, regex2, options,
|
|
15007
|
+
match = picomatch2.matchBase(input, regex2, options, posix3);
|
|
15017
15008
|
} else {
|
|
15018
15009
|
match = regex2.exec(output);
|
|
15019
15010
|
}
|
|
15020
15011
|
}
|
|
15021
15012
|
return { isMatch: Boolean(match), match, output };
|
|
15022
15013
|
};
|
|
15023
|
-
picomatch2.matchBase = (input, glob, options) => {
|
|
15014
|
+
picomatch2.matchBase = (input, glob, options, posix3 = options && options.windows) => {
|
|
15024
15015
|
const regex2 = glob instanceof RegExp ? glob : picomatch2.makeRe(glob, options);
|
|
15025
|
-
return regex2.test(utils.basename(input));
|
|
15016
|
+
return regex2.test(utils.basename(input, { windows: posix3 }));
|
|
15026
15017
|
};
|
|
15027
15018
|
picomatch2.isMatch = (str, patterns, options) => picomatch2(patterns, options)(str);
|
|
15028
15019
|
picomatch2.parse = (pattern, options) => {
|
|
@@ -15074,9 +15065,9 @@ var require_picomatch = __commonJS({
|
|
|
15074
15065
|
}
|
|
15075
15066
|
});
|
|
15076
15067
|
|
|
15077
|
-
// node_modules/.pnpm/picomatch@4.0.
|
|
15068
|
+
// node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/index.js
|
|
15078
15069
|
var require_picomatch2 = __commonJS({
|
|
15079
|
-
"node_modules/.pnpm/picomatch@4.0.
|
|
15070
|
+
"node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/index.js"(exports, module) {
|
|
15080
15071
|
"use strict";
|
|
15081
15072
|
init_define_WEB_FIRST_SEGMENTS();
|
|
15082
15073
|
var pico = require_picomatch();
|
|
@@ -15732,7 +15723,7 @@ var init_parser = __esm({
|
|
|
15732
15723
|
"node_modules"
|
|
15733
15724
|
]);
|
|
15734
15725
|
COMMAND_PREFIXES = /^\s*[\$>]\s+(.+)$/;
|
|
15735
|
-
COMMON_COMMANDS = /^(npm|npx|pnpm|yarn|make|cargo|go\s+(run|build|test)|python|pytest|vitest|jest|mocha|tsc|eslint|prettier|bun|deno)\b/;
|
|
15726
|
+
COMMON_COMMANDS = /^(?:(?:npm|npx|pnpm|yarn|make|cargo|go\s+(?:run|build|test)|python|pytest|vitest|jest|mocha|tsc|eslint|prettier|bun|deno)\b|(?:\.[\\/])?(?:gradlew(?:\.bat)?|mvnw(?:\.cmd)?)(?=\s|$)|(?:gradle|mvn(?:\.cmd)?)(?=\s|$))/;
|
|
15736
15727
|
}
|
|
15737
15728
|
});
|
|
15738
15729
|
|
|
@@ -16537,10 +16528,10 @@ var require_src2 = __commonJS({
|
|
|
16537
16528
|
var fs_1 = __require("fs");
|
|
16538
16529
|
var debug_1 = __importDefault(require_src());
|
|
16539
16530
|
var log = debug_1.default("@kwsites/file-exists");
|
|
16540
|
-
function check2(
|
|
16541
|
-
log(`checking %s`,
|
|
16531
|
+
function check2(path23, isFile, isDirectory2) {
|
|
16532
|
+
log(`checking %s`, path23);
|
|
16542
16533
|
try {
|
|
16543
|
-
const stat3 = fs_1.statSync(
|
|
16534
|
+
const stat3 = fs_1.statSync(path23);
|
|
16544
16535
|
if (stat3.isFile() && isFile) {
|
|
16545
16536
|
log(`[OK] path represents a file`);
|
|
16546
16537
|
return true;
|
|
@@ -16560,8 +16551,8 @@ var require_src2 = __commonJS({
|
|
|
16560
16551
|
throw e;
|
|
16561
16552
|
}
|
|
16562
16553
|
}
|
|
16563
|
-
function exists2(
|
|
16564
|
-
return check2(
|
|
16554
|
+
function exists2(path23, type = exports.READABLE) {
|
|
16555
|
+
return check2(path23, (type & exports.FILE) > 0, (type & exports.FOLDER) > 0);
|
|
16565
16556
|
}
|
|
16566
16557
|
exports.exists = exists2;
|
|
16567
16558
|
exports.FILE = 1;
|
|
@@ -17159,8 +17150,8 @@ function toLinesWithContent(input = "", trimmed2 = true, separator = "\n") {
|
|
|
17159
17150
|
function forEachLineWithContent(input, callback) {
|
|
17160
17151
|
return toLinesWithContent(input, true).map((line) => callback(line));
|
|
17161
17152
|
}
|
|
17162
|
-
function folderExists(
|
|
17163
|
-
return (0, import_file_exists.exists)(
|
|
17153
|
+
function folderExists(path23) {
|
|
17154
|
+
return (0, import_file_exists.exists)(path23, import_file_exists.FOLDER);
|
|
17164
17155
|
}
|
|
17165
17156
|
function append(target, item) {
|
|
17166
17157
|
if (Array.isArray(target)) {
|
|
@@ -17351,8 +17342,8 @@ function checkIsRepoRootTask() {
|
|
|
17351
17342
|
commands,
|
|
17352
17343
|
format: "utf-8",
|
|
17353
17344
|
onError,
|
|
17354
|
-
parser(
|
|
17355
|
-
return /^\.(git)?$/.test(
|
|
17345
|
+
parser(path23) {
|
|
17346
|
+
return /^\.(git)?$/.test(path23.trim());
|
|
17356
17347
|
}
|
|
17357
17348
|
};
|
|
17358
17349
|
}
|
|
@@ -17608,11 +17599,11 @@ function parseGrep(grep) {
|
|
|
17608
17599
|
const paths = /* @__PURE__ */ new Set();
|
|
17609
17600
|
const results = {};
|
|
17610
17601
|
forEachLineWithContent(grep, (input) => {
|
|
17611
|
-
const [
|
|
17612
|
-
paths.add(
|
|
17613
|
-
(results[
|
|
17602
|
+
const [path23, line, preview] = input.split(NULL);
|
|
17603
|
+
paths.add(path23);
|
|
17604
|
+
(results[path23] = results[path23] || []).push({
|
|
17614
17605
|
line: asNumber(line),
|
|
17615
|
-
path:
|
|
17606
|
+
path: path23,
|
|
17616
17607
|
preview
|
|
17617
17608
|
});
|
|
17618
17609
|
});
|
|
@@ -17909,14 +17900,14 @@ function hashObjectTask(filePath, write) {
|
|
|
17909
17900
|
}
|
|
17910
17901
|
return straightThroughStringTask(commands, true);
|
|
17911
17902
|
}
|
|
17912
|
-
function parseInit(bare,
|
|
17903
|
+
function parseInit(bare, path23, text) {
|
|
17913
17904
|
const response = String(text).trim();
|
|
17914
17905
|
let result;
|
|
17915
17906
|
if (result = initResponseRegex.exec(response)) {
|
|
17916
|
-
return new InitSummary(bare,
|
|
17907
|
+
return new InitSummary(bare, path23, false, result[1]);
|
|
17917
17908
|
}
|
|
17918
17909
|
if (result = reInitResponseRegex.exec(response)) {
|
|
17919
|
-
return new InitSummary(bare,
|
|
17910
|
+
return new InitSummary(bare, path23, true, result[1]);
|
|
17920
17911
|
}
|
|
17921
17912
|
let gitDir = "";
|
|
17922
17913
|
const tokens = response.split(" ");
|
|
@@ -17927,12 +17918,12 @@ function parseInit(bare, path21, text) {
|
|
|
17927
17918
|
break;
|
|
17928
17919
|
}
|
|
17929
17920
|
}
|
|
17930
|
-
return new InitSummary(bare,
|
|
17921
|
+
return new InitSummary(bare, path23, /^re/i.test(response), gitDir);
|
|
17931
17922
|
}
|
|
17932
17923
|
function hasBareCommand(command) {
|
|
17933
17924
|
return command.includes(bareCommand);
|
|
17934
17925
|
}
|
|
17935
|
-
function initTask(bare = false,
|
|
17926
|
+
function initTask(bare = false, path23, customArgs) {
|
|
17936
17927
|
const commands = ["init", ...customArgs];
|
|
17937
17928
|
if (bare && !hasBareCommand(commands)) {
|
|
17938
17929
|
commands.splice(1, 0, bareCommand);
|
|
@@ -17941,7 +17932,7 @@ function initTask(bare = false, path21, customArgs) {
|
|
|
17941
17932
|
commands,
|
|
17942
17933
|
format: "utf-8",
|
|
17943
17934
|
parser(text) {
|
|
17944
|
-
return parseInit(commands.includes("--bare"),
|
|
17935
|
+
return parseInit(commands.includes("--bare"), path23, text);
|
|
17945
17936
|
}
|
|
17946
17937
|
};
|
|
17947
17938
|
}
|
|
@@ -18220,14 +18211,14 @@ function splitLine(result, lineStr) {
|
|
|
18220
18211
|
default:
|
|
18221
18212
|
return;
|
|
18222
18213
|
}
|
|
18223
|
-
function data(index, workingDir,
|
|
18214
|
+
function data(index, workingDir, path23) {
|
|
18224
18215
|
const raw = `${index}${workingDir}`;
|
|
18225
18216
|
const handler = parsers6.get(raw);
|
|
18226
18217
|
if (handler) {
|
|
18227
|
-
handler(result,
|
|
18218
|
+
handler(result, path23);
|
|
18228
18219
|
}
|
|
18229
18220
|
if (raw !== "##" && raw !== "!!") {
|
|
18230
|
-
result.files.push(new FileStatusSummary(
|
|
18221
|
+
result.files.push(new FileStatusSummary(path23, index, workingDir));
|
|
18231
18222
|
}
|
|
18232
18223
|
}
|
|
18233
18224
|
}
|
|
@@ -18414,8 +18405,8 @@ function deleteBranchTask(branch, forceDelete = false) {
|
|
|
18414
18405
|
return task;
|
|
18415
18406
|
}
|
|
18416
18407
|
function toPath(input) {
|
|
18417
|
-
const
|
|
18418
|
-
return
|
|
18408
|
+
const path23 = input.trim().replace(/^["']|["']$/g, "");
|
|
18409
|
+
return path23 && normalize2(path23);
|
|
18419
18410
|
}
|
|
18420
18411
|
function checkIgnoreTask(paths) {
|
|
18421
18412
|
return {
|
|
@@ -18554,8 +18545,8 @@ function stashListTask(opt = {}, customArgs) {
|
|
|
18554
18545
|
parser: parser4
|
|
18555
18546
|
};
|
|
18556
18547
|
}
|
|
18557
|
-
function addSubModuleTask(repo,
|
|
18558
|
-
return subModuleTask(["add", repo,
|
|
18548
|
+
function addSubModuleTask(repo, path23) {
|
|
18549
|
+
return subModuleTask(["add", repo, path23]);
|
|
18559
18550
|
}
|
|
18560
18551
|
function initSubModuleTask(customArgs) {
|
|
18561
18552
|
return subModuleTask(["init", ...customArgs]);
|
|
@@ -19818,9 +19809,9 @@ var init_esm = __esm({
|
|
|
19818
19809
|
"src/lib/responses/InitSummary.ts"() {
|
|
19819
19810
|
"use strict";
|
|
19820
19811
|
InitSummary = class {
|
|
19821
|
-
constructor(bare,
|
|
19812
|
+
constructor(bare, path23, existing, gitDir) {
|
|
19822
19813
|
this.bare = bare;
|
|
19823
|
-
this.path =
|
|
19814
|
+
this.path = path23;
|
|
19824
19815
|
this.existing = existing;
|
|
19825
19816
|
this.gitDir = gitDir;
|
|
19826
19817
|
}
|
|
@@ -20353,12 +20344,12 @@ var init_esm = __esm({
|
|
|
20353
20344
|
"use strict";
|
|
20354
20345
|
fromPathRegex = /^(.+)\0(.+)$/;
|
|
20355
20346
|
FileStatusSummary = class {
|
|
20356
|
-
constructor(
|
|
20357
|
-
this.path =
|
|
20347
|
+
constructor(path23, index, working_dir) {
|
|
20348
|
+
this.path = path23;
|
|
20358
20349
|
this.index = index;
|
|
20359
20350
|
this.working_dir = working_dir;
|
|
20360
20351
|
if (index === "R" || working_dir === "R") {
|
|
20361
|
-
const detail = fromPathRegex.exec(
|
|
20352
|
+
const detail = fromPathRegex.exec(path23) || [null, path23, path23];
|
|
20362
20353
|
this.from = detail[2] || "";
|
|
20363
20354
|
this.path = detail[1] || "";
|
|
20364
20355
|
}
|
|
@@ -20620,9 +20611,9 @@ var init_esm = __esm({
|
|
|
20620
20611
|
next
|
|
20621
20612
|
);
|
|
20622
20613
|
}
|
|
20623
|
-
hashObject(
|
|
20614
|
+
hashObject(path23, write) {
|
|
20624
20615
|
return this._runTask(
|
|
20625
|
-
hashObjectTask(
|
|
20616
|
+
hashObjectTask(path23, write === true),
|
|
20626
20617
|
trailingFunctionArgument(arguments)
|
|
20627
20618
|
);
|
|
20628
20619
|
}
|
|
@@ -21259,8 +21250,8 @@ var init_esm = __esm({
|
|
|
21259
21250
|
}
|
|
21260
21251
|
return this._runTask(straightThroughStringTask2(command, this._trimmed), next);
|
|
21261
21252
|
};
|
|
21262
|
-
Git2.prototype.submoduleAdd = function(repo,
|
|
21263
|
-
return this._runTask(addSubModuleTask2(repo,
|
|
21253
|
+
Git2.prototype.submoduleAdd = function(repo, path23, then) {
|
|
21254
|
+
return this._runTask(addSubModuleTask2(repo, path23), trailingFunctionArgument2(arguments));
|
|
21264
21255
|
};
|
|
21265
21256
|
Git2.prototype.submoduleUpdate = function(args2, then) {
|
|
21266
21257
|
return this._runTask(
|
|
@@ -22221,7 +22212,7 @@ var require_levenshtein = __commonJS({
|
|
|
22221
22212
|
} catch (err) {
|
|
22222
22213
|
console.log("Collator could not be initialized and wouldn't be used");
|
|
22223
22214
|
}
|
|
22224
|
-
var
|
|
22215
|
+
var levenshtein4 = (init_mod(), __toCommonJS(mod_exports));
|
|
22225
22216
|
var prevRow = [], str2Char = [];
|
|
22226
22217
|
var Levenshtein = {
|
|
22227
22218
|
/**
|
|
@@ -22266,7 +22257,7 @@ var require_levenshtein = __commonJS({
|
|
|
22266
22257
|
}
|
|
22267
22258
|
return nextCol;
|
|
22268
22259
|
}
|
|
22269
|
-
return
|
|
22260
|
+
return levenshtein4.distance(str1, str2);
|
|
22270
22261
|
}
|
|
22271
22262
|
};
|
|
22272
22263
|
if (typeof define !== "undefined" && define !== null && define.amd) {
|
|
@@ -23062,12 +23053,12 @@ function parseTree(text, errors = [], options = ParseOptions.DEFAULT) {
|
|
|
23062
23053
|
}
|
|
23063
23054
|
return result;
|
|
23064
23055
|
}
|
|
23065
|
-
function findNodeAtLocation(root,
|
|
23056
|
+
function findNodeAtLocation(root, path23) {
|
|
23066
23057
|
if (!root) {
|
|
23067
23058
|
return void 0;
|
|
23068
23059
|
}
|
|
23069
23060
|
let node = root;
|
|
23070
|
-
for (let segment of
|
|
23061
|
+
for (let segment of path23) {
|
|
23071
23062
|
if (typeof segment === "string") {
|
|
23072
23063
|
if (node.type !== "object" || !Array.isArray(node.children)) {
|
|
23073
23064
|
return void 0;
|
|
@@ -23569,20 +23560,20 @@ function splitSegments(cmd) {
|
|
|
23569
23560
|
const out = [];
|
|
23570
23561
|
let buf = "";
|
|
23571
23562
|
let op = "";
|
|
23572
|
-
let
|
|
23563
|
+
let quote2 = null;
|
|
23573
23564
|
for (let i2 = 0; i2 < cmd.length; i2++) {
|
|
23574
23565
|
const ch = cmd[i2];
|
|
23575
|
-
if (
|
|
23566
|
+
if (quote2) {
|
|
23576
23567
|
buf += ch;
|
|
23577
|
-
if (ch === "\\" &&
|
|
23568
|
+
if (ch === "\\" && quote2 !== "'") {
|
|
23578
23569
|
if (i2 + 1 < cmd.length) buf += cmd[++i2];
|
|
23579
23570
|
continue;
|
|
23580
23571
|
}
|
|
23581
|
-
if (ch ===
|
|
23572
|
+
if (ch === quote2) quote2 = null;
|
|
23582
23573
|
continue;
|
|
23583
23574
|
}
|
|
23584
23575
|
if (ch === '"' || ch === "'" || ch === "`") {
|
|
23585
|
-
|
|
23576
|
+
quote2 = ch;
|
|
23586
23577
|
buf += ch;
|
|
23587
23578
|
continue;
|
|
23588
23579
|
}
|
|
@@ -23618,20 +23609,20 @@ function splitSegments(cmd) {
|
|
|
23618
23609
|
function splitPipes(segment) {
|
|
23619
23610
|
const out = [];
|
|
23620
23611
|
let buf = "";
|
|
23621
|
-
let
|
|
23612
|
+
let quote2 = null;
|
|
23622
23613
|
for (let i2 = 0; i2 < segment.length; i2++) {
|
|
23623
23614
|
const ch = segment[i2];
|
|
23624
|
-
if (
|
|
23615
|
+
if (quote2) {
|
|
23625
23616
|
buf += ch;
|
|
23626
|
-
if (ch === "\\" &&
|
|
23617
|
+
if (ch === "\\" && quote2 !== "'") {
|
|
23627
23618
|
if (i2 + 1 < segment.length) buf += segment[++i2];
|
|
23628
23619
|
continue;
|
|
23629
23620
|
}
|
|
23630
|
-
if (ch ===
|
|
23621
|
+
if (ch === quote2) quote2 = null;
|
|
23631
23622
|
continue;
|
|
23632
23623
|
}
|
|
23633
23624
|
if (ch === '"' || ch === "'" || ch === "`") {
|
|
23634
|
-
|
|
23625
|
+
quote2 = ch;
|
|
23635
23626
|
buf += ch;
|
|
23636
23627
|
continue;
|
|
23637
23628
|
}
|
|
@@ -23849,7 +23840,7 @@ function stripComments2(src) {
|
|
|
23849
23840
|
continue;
|
|
23850
23841
|
}
|
|
23851
23842
|
if (ch === '"' || ch === "'" || ch === "`") {
|
|
23852
|
-
const
|
|
23843
|
+
const quote2 = ch;
|
|
23853
23844
|
push(ch, false);
|
|
23854
23845
|
i2++;
|
|
23855
23846
|
while (i2 < src.length) {
|
|
@@ -23859,7 +23850,7 @@ function stripComments2(src) {
|
|
|
23859
23850
|
i2 += 2;
|
|
23860
23851
|
continue;
|
|
23861
23852
|
}
|
|
23862
|
-
if (src[i2] ===
|
|
23853
|
+
if (src[i2] === quote2) break;
|
|
23863
23854
|
push(src[i2], true);
|
|
23864
23855
|
i2++;
|
|
23865
23856
|
}
|
|
@@ -24050,6 +24041,1021 @@ var init_cli_subcommands = __esm({
|
|
|
24050
24041
|
}
|
|
24051
24042
|
});
|
|
24052
24043
|
|
|
24044
|
+
// src/core/checks/gradle-projects.ts
|
|
24045
|
+
import * as fs6 from "node:fs";
|
|
24046
|
+
import * as path7 from "node:path";
|
|
24047
|
+
function findGradleBuildRoot(contextFile, projectRoot, requireWrapper = false) {
|
|
24048
|
+
const root = path7.resolve(projectRoot);
|
|
24049
|
+
let dir = path7.dirname(path7.resolve(contextFile));
|
|
24050
|
+
for (; ; ) {
|
|
24051
|
+
if (SETTINGS_FILES.some((f) => fs6.existsSync(path7.join(dir, f)))) {
|
|
24052
|
+
if (!requireWrapper) return dir;
|
|
24053
|
+
return WRAPPER_FILES.some((f) => fs6.existsSync(path7.join(dir, f))) ? dir : null;
|
|
24054
|
+
}
|
|
24055
|
+
if (dir === root) return null;
|
|
24056
|
+
const parent = path7.dirname(dir);
|
|
24057
|
+
const rel = path7.relative(root, parent);
|
|
24058
|
+
if (parent === dir || rel.startsWith("..") || path7.isAbsolute(rel)) return null;
|
|
24059
|
+
dir = parent;
|
|
24060
|
+
}
|
|
24061
|
+
}
|
|
24062
|
+
function readGradleProjectSet(buildRoot) {
|
|
24063
|
+
const present = SETTINGS_FILES.filter((f) => fs6.existsSync(path7.join(buildRoot, f)));
|
|
24064
|
+
if (present.length !== 1) return null;
|
|
24065
|
+
const parsed = readSettingsFile(path7.join(buildRoot, present[0]));
|
|
24066
|
+
if (!parsed) return null;
|
|
24067
|
+
if (isValidBuildSrc(path7.join(buildRoot, "buildSrc"))) parsed.builds.add("buildSrc");
|
|
24068
|
+
const visited = /* @__PURE__ */ new Set([path7.resolve(buildRoot)]);
|
|
24069
|
+
const queue = parsed.buildDirs.map((d) => ({ dir: path7.resolve(buildRoot, d), depth: 1 }));
|
|
24070
|
+
while (queue.length > 0) {
|
|
24071
|
+
const { dir, depth } = queue.shift();
|
|
24072
|
+
if (visited.has(dir)) continue;
|
|
24073
|
+
visited.add(dir);
|
|
24074
|
+
if (depth > MAX_INCLUDED_BUILD_DEPTH) return null;
|
|
24075
|
+
const files = SETTINGS_FILES.filter((f) => fs6.existsSync(path7.join(dir, f)));
|
|
24076
|
+
if (files.length === 0) continue;
|
|
24077
|
+
if (files.length > 1) return null;
|
|
24078
|
+
const nested = readSettingsFile(path7.join(dir, files[0]));
|
|
24079
|
+
if (!nested) return null;
|
|
24080
|
+
for (const name of nested.builds) parsed.builds.add(name);
|
|
24081
|
+
for (const d of nested.buildDirs) queue.push({ dir: path7.resolve(dir, d), depth: depth + 1 });
|
|
24082
|
+
}
|
|
24083
|
+
return { paths: parsed.paths, builds: parsed.builds, settingsFile: present[0] };
|
|
24084
|
+
}
|
|
24085
|
+
function readSettingsFile(file2) {
|
|
24086
|
+
try {
|
|
24087
|
+
const buf = fs6.readFileSync(file2);
|
|
24088
|
+
if (buf.includes(0)) return null;
|
|
24089
|
+
return parseSettings(stripBom(buf.toString("utf-8")));
|
|
24090
|
+
} catch {
|
|
24091
|
+
return null;
|
|
24092
|
+
}
|
|
24093
|
+
}
|
|
24094
|
+
function isValidBuildSrc(dir) {
|
|
24095
|
+
try {
|
|
24096
|
+
if (!fs6.statSync(dir).isDirectory()) return false;
|
|
24097
|
+
} catch {
|
|
24098
|
+
return false;
|
|
24099
|
+
}
|
|
24100
|
+
const markers = ["settings.gradle", "settings.gradle.kts", "build.gradle", "build.gradle.kts"];
|
|
24101
|
+
if (markers.some((m) => fs6.existsSync(path7.join(dir, m)))) return true;
|
|
24102
|
+
return fs6.existsSync(path7.join(dir, "src"));
|
|
24103
|
+
}
|
|
24104
|
+
function parseSettings(source) {
|
|
24105
|
+
const tokens = tokenize(source);
|
|
24106
|
+
if (!tokens) return null;
|
|
24107
|
+
const paths = /* @__PURE__ */ new Set();
|
|
24108
|
+
const builds = /* @__PURE__ */ new Set();
|
|
24109
|
+
const buildDirs = [];
|
|
24110
|
+
const renames = [];
|
|
24111
|
+
const blocks = [];
|
|
24112
|
+
let pluginManagementEnd = -1;
|
|
24113
|
+
for (let i2 = 0; i2 < tokens.length; i2++) {
|
|
24114
|
+
const t2 = tokens[i2];
|
|
24115
|
+
if (t2.kind === "punct") {
|
|
24116
|
+
if (t2.text === "{") blocks.push(blockOpener(tokens, i2));
|
|
24117
|
+
else if (t2.text === "}") blocks.pop();
|
|
24118
|
+
continue;
|
|
24119
|
+
}
|
|
24120
|
+
if (t2.kind === "string") {
|
|
24121
|
+
const before = tokens[i2 - 1];
|
|
24122
|
+
if (before?.kind === "punct" && (before.text === "." || before.text === "?.")) return null;
|
|
24123
|
+
if (before?.kind === "punct" && before.text === "[" && (t2.text === "name" || t2.text === "setName")) {
|
|
24124
|
+
return null;
|
|
24125
|
+
}
|
|
24126
|
+
continue;
|
|
24127
|
+
}
|
|
24128
|
+
if (t2.kind !== "ident") continue;
|
|
24129
|
+
if (t2.text === "apply") {
|
|
24130
|
+
if (!appliesBenignPlugin(tokens, i2)) return null;
|
|
24131
|
+
continue;
|
|
24132
|
+
}
|
|
24133
|
+
if (t2.text === "pluginManagement" && tokens[i2 + 1]?.text === "{") {
|
|
24134
|
+
pluginManagementEnd = Math.max(pluginManagementEnd, skipBalanced(tokens, i2 + 1));
|
|
24135
|
+
continue;
|
|
24136
|
+
}
|
|
24137
|
+
const prev = tokens[i2 - 1];
|
|
24138
|
+
const receiverDot = prev?.kind === "punct" && (prev.text === "." || prev.text === "?.");
|
|
24139
|
+
const receiver = receiverDot ? tokens[i2 - 2] : void 0;
|
|
24140
|
+
if (OPEN_IDENTIFIERS.has(t2.text)) {
|
|
24141
|
+
const systemProperty = t2.text === "setProperty" && receiver?.kind === "ident" && receiver.text === "System";
|
|
24142
|
+
if (!systemProperty) return null;
|
|
24143
|
+
}
|
|
24144
|
+
if (t2.text === "include" || t2.text === "includeFlat") {
|
|
24145
|
+
const args2 = literalArguments(tokens, i2 + 1);
|
|
24146
|
+
if (!args2) return null;
|
|
24147
|
+
for (const arg of args2) {
|
|
24148
|
+
if (t2.text === "includeFlat") paths.add(`:${arg}`);
|
|
24149
|
+
else addIncludePath(paths, arg);
|
|
24150
|
+
}
|
|
24151
|
+
continue;
|
|
24152
|
+
}
|
|
24153
|
+
if (t2.text === "includeBuild") {
|
|
24154
|
+
if (receiverDot) return null;
|
|
24155
|
+
const args2 = literalArguments(tokens, i2 + 1, 1);
|
|
24156
|
+
if (!args2 || args2.length !== 1) return null;
|
|
24157
|
+
const base = path7.posix.basename(args2[0].replace(/\\/g, "/").replace(/\/+$/, ""));
|
|
24158
|
+
if (!base || base === "." || base === "..") return null;
|
|
24159
|
+
builds.add(base);
|
|
24160
|
+
buildDirs.push(args2[0]);
|
|
24161
|
+
const override = includeBuildNameOverride(tokens, i2 + 1);
|
|
24162
|
+
if (override === null) return null;
|
|
24163
|
+
if (override) builds.add(override);
|
|
24164
|
+
continue;
|
|
24165
|
+
}
|
|
24166
|
+
if (t2.text === "plugins" && tokens[i2 + 1]?.kind === "punct" && tokens[i2 + 1].text === "{") {
|
|
24167
|
+
if (i2 >= pluginManagementEnd && !pluginsBlockIsBenign(tokens, i2 + 1)) return null;
|
|
24168
|
+
i2 = skipBalanced(tokens, i2 + 1) - 1;
|
|
24169
|
+
continue;
|
|
24170
|
+
}
|
|
24171
|
+
if (t2.text === "name" || t2.text === "setName") {
|
|
24172
|
+
const next = tokens[i2 + 1];
|
|
24173
|
+
const after = tokens[i2 + 2];
|
|
24174
|
+
const isAssign = next?.kind === "punct" && next.text === "=";
|
|
24175
|
+
const isCompound = next?.kind === "punct" && /^[-+*/%]$/.test(next.text) && after?.text === "=";
|
|
24176
|
+
const isSetter = t2.text === "setName" && next !== void 0 && next.line === t2.line;
|
|
24177
|
+
if (!isAssign && !isCompound && !isSetter) continue;
|
|
24178
|
+
const local = prev?.kind === "ident" && ["def", "val", "var"].includes(prev.text);
|
|
24179
|
+
if (local) continue;
|
|
24180
|
+
if (receiverDot) {
|
|
24181
|
+
if (receiver?.kind === "ident" && receiver.text === "rootProject") continue;
|
|
24182
|
+
if (isCompound) return null;
|
|
24183
|
+
const target = literalProjectCall(tokens, i2 - 2);
|
|
24184
|
+
const value = isAssign ? literalValue(tokens, i2 + 2) : literalArguments(tokens, i2 + 1, 1)?.[0];
|
|
24185
|
+
if (!target || !value) return null;
|
|
24186
|
+
renames.push({ from: normalizeProjectPath(target), to: value });
|
|
24187
|
+
continue;
|
|
24188
|
+
}
|
|
24189
|
+
const unsafe = blocks.some((b2) => !NAME_SAFE_BLOCKS.has(b2) && !TRANSPARENT_BLOCKS.has(b2));
|
|
24190
|
+
if (unsafe) return null;
|
|
24191
|
+
}
|
|
24192
|
+
}
|
|
24193
|
+
for (const { from, to } of renames) {
|
|
24194
|
+
const parent = from.slice(0, from.lastIndexOf(":"));
|
|
24195
|
+
const moved = `${parent}:${to}`;
|
|
24196
|
+
for (const p2 of [...paths]) {
|
|
24197
|
+
if (p2 === from) paths.add(moved);
|
|
24198
|
+
else if (p2.startsWith(`${from}:`)) paths.add(moved + p2.slice(from.length));
|
|
24199
|
+
}
|
|
24200
|
+
}
|
|
24201
|
+
return { paths, builds, buildDirs };
|
|
24202
|
+
}
|
|
24203
|
+
function addIncludePath(paths, arg) {
|
|
24204
|
+
const segments = arg.replace(/^:/, "").split(":");
|
|
24205
|
+
if (segments.some((s) => s.length === 0)) return;
|
|
24206
|
+
let acc = "";
|
|
24207
|
+
for (const s of segments) {
|
|
24208
|
+
acc += `:${s}`;
|
|
24209
|
+
paths.add(acc);
|
|
24210
|
+
}
|
|
24211
|
+
}
|
|
24212
|
+
function normalizeProjectPath(p2) {
|
|
24213
|
+
return p2.startsWith(":") ? p2 : `:${p2}`;
|
|
24214
|
+
}
|
|
24215
|
+
function literalArguments(tokens, start, max = Infinity) {
|
|
24216
|
+
const out = [];
|
|
24217
|
+
let i2 = start;
|
|
24218
|
+
const first2 = tokens[i2];
|
|
24219
|
+
if (!first2) return null;
|
|
24220
|
+
const parenthesized = first2.kind === "punct" && first2.text === "(";
|
|
24221
|
+
if (parenthesized) i2++;
|
|
24222
|
+
const line = first2.line;
|
|
24223
|
+
for (; ; ) {
|
|
24224
|
+
let t2 = tokens[i2];
|
|
24225
|
+
if (!t2) return parenthesized ? null : out.length ? out : null;
|
|
24226
|
+
if (parenthesized && t2.kind === "punct" && t2.text === ")") return out;
|
|
24227
|
+
if (t2.kind === "punct" && t2.text === "*") t2 = tokens[++i2];
|
|
24228
|
+
if (t2 && t2.kind === "ident" && ["listOf", "arrayOf", "setOf"].includes(t2.text) && tokens[i2 + 1]?.text === "(") {
|
|
24229
|
+
const inner = literalArguments(tokens, i2 + 1);
|
|
24230
|
+
if (!inner) return null;
|
|
24231
|
+
out.push(...inner);
|
|
24232
|
+
i2 = skipBalanced(tokens, i2 + 1);
|
|
24233
|
+
} else if (t2 && t2.kind === "punct" && t2.text === "[") {
|
|
24234
|
+
const inner = literalList(tokens, i2);
|
|
24235
|
+
if (!inner) return null;
|
|
24236
|
+
out.push(...inner.values);
|
|
24237
|
+
i2 = inner.next;
|
|
24238
|
+
} else if (t2 && t2.kind === "string" && !t2.interpolated) {
|
|
24239
|
+
out.push(t2.text);
|
|
24240
|
+
i2++;
|
|
24241
|
+
} else if (t2 && t2.kind === "ident" && t2.text === "file" && tokens[i2 + 1]?.text === "(" && literalValue(tokens, i2 + 2) !== null && tokens[i2 + 3]?.text === ")") {
|
|
24242
|
+
out.push(literalValue(tokens, i2 + 2));
|
|
24243
|
+
i2 += 4;
|
|
24244
|
+
} else {
|
|
24245
|
+
return null;
|
|
24246
|
+
}
|
|
24247
|
+
if (out.length > max) return null;
|
|
24248
|
+
const sep2 = tokens[i2];
|
|
24249
|
+
if (sep2?.kind === "punct" && sep2.text === ",") {
|
|
24250
|
+
i2++;
|
|
24251
|
+
continue;
|
|
24252
|
+
}
|
|
24253
|
+
if (parenthesized) {
|
|
24254
|
+
return sep2?.kind === "punct" && sep2.text === ")" ? out : null;
|
|
24255
|
+
}
|
|
24256
|
+
if (!sep2 || sep2.line > (tokens[i2 - 1]?.line ?? line) || sep2.text === ";" || sep2.text === "}") {
|
|
24257
|
+
return out;
|
|
24258
|
+
}
|
|
24259
|
+
return null;
|
|
24260
|
+
}
|
|
24261
|
+
}
|
|
24262
|
+
function literalList(tokens, start) {
|
|
24263
|
+
const values = [];
|
|
24264
|
+
let i2 = start + 1;
|
|
24265
|
+
for (; ; ) {
|
|
24266
|
+
const t2 = tokens[i2];
|
|
24267
|
+
if (!t2) return null;
|
|
24268
|
+
if (t2.kind === "punct" && t2.text === "]") return { values, next: i2 + 1 };
|
|
24269
|
+
if (t2.kind !== "string" || t2.interpolated) return null;
|
|
24270
|
+
values.push(t2.text);
|
|
24271
|
+
i2++;
|
|
24272
|
+
const sep2 = tokens[i2];
|
|
24273
|
+
if (sep2?.kind === "punct" && sep2.text === ",") i2++;
|
|
24274
|
+
}
|
|
24275
|
+
}
|
|
24276
|
+
function skipBalanced(tokens, start) {
|
|
24277
|
+
const open = tokens[start].text;
|
|
24278
|
+
const close = open === "(" ? ")" : open === "[" ? "]" : "}";
|
|
24279
|
+
let depth = 0;
|
|
24280
|
+
for (let i2 = start; i2 < tokens.length; i2++) {
|
|
24281
|
+
const t2 = tokens[i2];
|
|
24282
|
+
if (t2.kind !== "punct") continue;
|
|
24283
|
+
if (t2.text === open) depth++;
|
|
24284
|
+
else if (t2.text === close && --depth === 0) return i2 + 1;
|
|
24285
|
+
}
|
|
24286
|
+
return tokens.length;
|
|
24287
|
+
}
|
|
24288
|
+
function literalValue(tokens, i2) {
|
|
24289
|
+
const t2 = tokens[i2];
|
|
24290
|
+
return t2?.kind === "string" && !t2.interpolated ? t2.text : null;
|
|
24291
|
+
}
|
|
24292
|
+
function literalProjectCall(tokens, end) {
|
|
24293
|
+
let i2 = end;
|
|
24294
|
+
while (tokens[i2]?.kind === "punct" && tokens[i2].text === "!") i2--;
|
|
24295
|
+
if (tokens[i2]?.text !== ")") return null;
|
|
24296
|
+
const lit = tokens[i2 - 1];
|
|
24297
|
+
const open = tokens[i2 - 2];
|
|
24298
|
+
const fn = tokens[i2 - 3];
|
|
24299
|
+
if (lit?.kind !== "string" || lit.interpolated) return null;
|
|
24300
|
+
if (open?.text !== "(" || fn?.kind !== "ident") return null;
|
|
24301
|
+
if (fn.text !== "project" && fn.text !== "findProject") return null;
|
|
24302
|
+
return lit.text;
|
|
24303
|
+
}
|
|
24304
|
+
function includeBuildNameOverride(tokens, argsStart) {
|
|
24305
|
+
let i2 = argsStart;
|
|
24306
|
+
if (tokens[i2]?.text === "(") i2 = skipBalanced(tokens, i2);
|
|
24307
|
+
else while (tokens[i2]?.kind === "string") i2++;
|
|
24308
|
+
if (tokens[i2]?.text !== "{") return "";
|
|
24309
|
+
const end = skipBalanced(tokens, i2);
|
|
24310
|
+
let found = "";
|
|
24311
|
+
for (let j3 = i2 + 1; j3 < end; j3++) {
|
|
24312
|
+
const t2 = tokens[j3];
|
|
24313
|
+
if (t2.kind !== "ident" || t2.text !== "name" && t2.text !== "setName") continue;
|
|
24314
|
+
let value;
|
|
24315
|
+
if (t2.text === "name" && tokens[j3 + 1]?.text === "=" && tokens[j3 + 2]?.text !== "=") {
|
|
24316
|
+
value = literalValue(tokens, j3 + 2);
|
|
24317
|
+
} else if (t2.text === "setName") {
|
|
24318
|
+
value = literalArguments(tokens, j3 + 1, 1)?.[0] ?? null;
|
|
24319
|
+
} else if (tokens[j3 + 1]?.kind === "punct" && /^[-+*/%]$/.test(tokens[j3 + 1].text)) {
|
|
24320
|
+
return null;
|
|
24321
|
+
} else {
|
|
24322
|
+
continue;
|
|
24323
|
+
}
|
|
24324
|
+
if (value === null) return null;
|
|
24325
|
+
found = value;
|
|
24326
|
+
}
|
|
24327
|
+
return found;
|
|
24328
|
+
}
|
|
24329
|
+
function pluginsBlockIsBenign(tokens, braceIndex) {
|
|
24330
|
+
const end = skipBalanced(tokens, braceIndex);
|
|
24331
|
+
for (let j3 = braceIndex + 1; j3 < end - 1; j3++) {
|
|
24332
|
+
const t2 = tokens[j3];
|
|
24333
|
+
if (t2.kind !== "ident") continue;
|
|
24334
|
+
if (t2.text === "id") {
|
|
24335
|
+
const id = literalValue(tokens, tokens[j3 + 1]?.text === "(" ? j3 + 2 : j3 + 1);
|
|
24336
|
+
if (!id) return false;
|
|
24337
|
+
let applyFalse = false;
|
|
24338
|
+
for (let k3 = j3 + 1; k3 < end - 1 && tokens[k3].line === t2.line; k3++) {
|
|
24339
|
+
if (tokens[k3].text === ";" || tokens[k3].kind === "ident" && tokens[k3].text === "id")
|
|
24340
|
+
break;
|
|
24341
|
+
if (tokens[k3].kind === "ident" && tokens[k3].text === "apply") {
|
|
24342
|
+
const n7 = tokens[k3 + 1]?.text === "(" ? tokens[k3 + 2] : tokens[k3 + 1];
|
|
24343
|
+
applyFalse = n7?.kind === "ident" && n7.text === "false";
|
|
24344
|
+
}
|
|
24345
|
+
}
|
|
24346
|
+
if (!applyFalse && !BENIGN_SETTINGS_PLUGINS.has(id)) return false;
|
|
24347
|
+
} else if (!["version", "apply", "false"].includes(t2.text)) {
|
|
24348
|
+
return false;
|
|
24349
|
+
}
|
|
24350
|
+
}
|
|
24351
|
+
return true;
|
|
24352
|
+
}
|
|
24353
|
+
function appliesBenignPlugin(tokens, i2) {
|
|
24354
|
+
let j3 = i2 + 1;
|
|
24355
|
+
if (tokens[j3]?.text === "(") j3++;
|
|
24356
|
+
const key = tokens[j3];
|
|
24357
|
+
const sep2 = tokens[j3 + 1];
|
|
24358
|
+
if (key?.kind !== "ident" || key.text !== "plugin") return false;
|
|
24359
|
+
if (sep2?.text !== ":" && sep2?.text !== "=") return false;
|
|
24360
|
+
const id = literalValue(tokens, j3 + 2);
|
|
24361
|
+
if (tokens[j3 + 3]?.text === ",") return false;
|
|
24362
|
+
return id !== null && BENIGN_SETTINGS_PLUGINS.has(id);
|
|
24363
|
+
}
|
|
24364
|
+
function blockOpener(tokens, braceIndex) {
|
|
24365
|
+
let j3 = braceIndex - 1;
|
|
24366
|
+
if (tokens[j3]?.text === ")") {
|
|
24367
|
+
let depth = 0;
|
|
24368
|
+
for (; j3 >= 0; j3--) {
|
|
24369
|
+
if (tokens[j3].text === ")") depth++;
|
|
24370
|
+
else if (tokens[j3].text === "(" && --depth === 0) break;
|
|
24371
|
+
}
|
|
24372
|
+
j3--;
|
|
24373
|
+
}
|
|
24374
|
+
const t2 = tokens[j3];
|
|
24375
|
+
return t2?.kind === "ident" ? t2.text : "";
|
|
24376
|
+
}
|
|
24377
|
+
function tokenize(src) {
|
|
24378
|
+
const tokens = [];
|
|
24379
|
+
let line = 1;
|
|
24380
|
+
let i2 = 0;
|
|
24381
|
+
const n7 = src.length;
|
|
24382
|
+
while (i2 < n7) {
|
|
24383
|
+
const c3 = src[i2];
|
|
24384
|
+
if (c3 === "\n") {
|
|
24385
|
+
line++;
|
|
24386
|
+
i2++;
|
|
24387
|
+
continue;
|
|
24388
|
+
}
|
|
24389
|
+
if (c3 === " " || c3 === " " || c3 === "\r") {
|
|
24390
|
+
i2++;
|
|
24391
|
+
continue;
|
|
24392
|
+
}
|
|
24393
|
+
if (c3 === "/" && src[i2 + 1] === "/") {
|
|
24394
|
+
while (i2 < n7 && src[i2] !== "\n") i2++;
|
|
24395
|
+
continue;
|
|
24396
|
+
}
|
|
24397
|
+
if (c3 === "/" && src[i2 + 1] === "*") {
|
|
24398
|
+
const end = src.indexOf("*/", i2 + 2);
|
|
24399
|
+
if (end < 0) return null;
|
|
24400
|
+
for (let k3 = i2; k3 < end; k3++) if (src[k3] === "\n") line++;
|
|
24401
|
+
i2 = end + 2;
|
|
24402
|
+
continue;
|
|
24403
|
+
}
|
|
24404
|
+
if (c3 === "/") {
|
|
24405
|
+
const last2 = tokens[tokens.length - 1];
|
|
24406
|
+
const operandPosition = !last2 || last2.kind === "punct" && ["=", "==", "(", ",", "[", "{", ":", "~", "!", ";"].includes(last2.text) || last2.kind === "ident" && last2.text === "return";
|
|
24407
|
+
if (operandPosition) return null;
|
|
24408
|
+
}
|
|
24409
|
+
if (c3 === "$" && src[i2 + 1] === "/") return null;
|
|
24410
|
+
if (c3 === '"' || c3 === "'") {
|
|
24411
|
+
const triple = src.startsWith(c3.repeat(3), i2);
|
|
24412
|
+
const delim = triple ? c3.repeat(3) : c3;
|
|
24413
|
+
const startLine = line;
|
|
24414
|
+
let j3 = i2 + delim.length;
|
|
24415
|
+
let text = "";
|
|
24416
|
+
let interpolated = false;
|
|
24417
|
+
let closed = false;
|
|
24418
|
+
while (j3 < n7) {
|
|
24419
|
+
if (src.startsWith(delim, j3)) {
|
|
24420
|
+
closed = true;
|
|
24421
|
+
j3 += delim.length;
|
|
24422
|
+
break;
|
|
24423
|
+
}
|
|
24424
|
+
const ch = src[j3];
|
|
24425
|
+
if (ch === "\n") {
|
|
24426
|
+
if (!triple) return null;
|
|
24427
|
+
line++;
|
|
24428
|
+
}
|
|
24429
|
+
if (ch === "\\" && j3 + 1 < n7) {
|
|
24430
|
+
text += src[j3 + 1];
|
|
24431
|
+
j3 += 2;
|
|
24432
|
+
continue;
|
|
24433
|
+
}
|
|
24434
|
+
if (ch === "$" && c3 === '"') {
|
|
24435
|
+
interpolated = true;
|
|
24436
|
+
if (src[j3 + 1] === "{") {
|
|
24437
|
+
const end = skipTemplate(src, j3 + 1);
|
|
24438
|
+
if (end < 0) return null;
|
|
24439
|
+
for (let k3 = j3; k3 < end; k3++) if (src[k3] === "\n") line++;
|
|
24440
|
+
j3 = end;
|
|
24441
|
+
continue;
|
|
24442
|
+
}
|
|
24443
|
+
}
|
|
24444
|
+
text += ch;
|
|
24445
|
+
j3++;
|
|
24446
|
+
}
|
|
24447
|
+
if (!closed) return null;
|
|
24448
|
+
tokens.push({ kind: "string", text, interpolated, line: startLine });
|
|
24449
|
+
i2 = j3;
|
|
24450
|
+
continue;
|
|
24451
|
+
}
|
|
24452
|
+
if (/[A-Za-z_$]/.test(c3)) {
|
|
24453
|
+
let j3 = i2 + 1;
|
|
24454
|
+
while (j3 < n7 && /[\w$]/.test(src[j3])) j3++;
|
|
24455
|
+
tokens.push({ kind: "ident", text: src.slice(i2, j3), line });
|
|
24456
|
+
i2 = j3;
|
|
24457
|
+
continue;
|
|
24458
|
+
}
|
|
24459
|
+
if (c3 === "`") {
|
|
24460
|
+
const end = src.indexOf("`", i2 + 1);
|
|
24461
|
+
if (end < 0) return null;
|
|
24462
|
+
tokens.push({ kind: "ident", text: src.slice(i2 + 1, end), line });
|
|
24463
|
+
i2 = end + 1;
|
|
24464
|
+
continue;
|
|
24465
|
+
}
|
|
24466
|
+
if (c3 === "?" && src[i2 + 1] === ".") {
|
|
24467
|
+
tokens.push({ kind: "punct", text: "?.", line });
|
|
24468
|
+
i2 += 2;
|
|
24469
|
+
continue;
|
|
24470
|
+
}
|
|
24471
|
+
if (c3 === "=" && src[i2 + 1] === "=") {
|
|
24472
|
+
tokens.push({ kind: "punct", text: "==", line });
|
|
24473
|
+
i2 += 2;
|
|
24474
|
+
continue;
|
|
24475
|
+
}
|
|
24476
|
+
tokens.push({ kind: "punct", text: c3, line });
|
|
24477
|
+
i2++;
|
|
24478
|
+
}
|
|
24479
|
+
return tokens;
|
|
24480
|
+
}
|
|
24481
|
+
function skipTemplate(src, open) {
|
|
24482
|
+
let depth = 0;
|
|
24483
|
+
for (let j3 = open; j3 < src.length; j3++) {
|
|
24484
|
+
const ch = src[j3];
|
|
24485
|
+
if (ch === "{") depth++;
|
|
24486
|
+
else if (ch === "}" && --depth === 0) return j3 + 1;
|
|
24487
|
+
else if (ch === '"' || ch === "'") {
|
|
24488
|
+
const end = src.indexOf(ch, j3 + 1);
|
|
24489
|
+
if (end < 0) return -1;
|
|
24490
|
+
j3 = end;
|
|
24491
|
+
}
|
|
24492
|
+
}
|
|
24493
|
+
return -1;
|
|
24494
|
+
}
|
|
24495
|
+
function quote(s) {
|
|
24496
|
+
return s.replace(/[.*+?^${}()|[\]\\/]/g, "\\$&");
|
|
24497
|
+
}
|
|
24498
|
+
function patternForName(name, boundary, add) {
|
|
24499
|
+
let out = "";
|
|
24500
|
+
let pos = 0;
|
|
24501
|
+
boundary.lastIndex = 0;
|
|
24502
|
+
for (const m of name.matchAll(boundary)) {
|
|
24503
|
+
const start = m.index ?? 0;
|
|
24504
|
+
if (start > pos) out += quote(name.slice(pos, start));
|
|
24505
|
+
out += add(pos, m[0]);
|
|
24506
|
+
pos = start + m[0].length;
|
|
24507
|
+
}
|
|
24508
|
+
if (pos < name.length) out += quote(name.slice(pos));
|
|
24509
|
+
return out;
|
|
24510
|
+
}
|
|
24511
|
+
function matchGradleName(pattern, items) {
|
|
24512
|
+
const list = [...items];
|
|
24513
|
+
if (list.includes(pattern)) return pattern;
|
|
24514
|
+
if (!pattern) return null;
|
|
24515
|
+
const camel = patternForName(
|
|
24516
|
+
pattern,
|
|
24517
|
+
CAMEL_BOUNDARY,
|
|
24518
|
+
(_pos, part) => `${quote(part)}[${LOWER}]*`
|
|
24519
|
+
);
|
|
24520
|
+
const kebab = patternForName(
|
|
24521
|
+
pattern,
|
|
24522
|
+
KEBAB_BOUNDARY,
|
|
24523
|
+
(pos, part) => `${pos > 0 ? "-" : ""}${quote(part.toLowerCase())}[${LOWER}0-9]*`
|
|
24524
|
+
);
|
|
24525
|
+
const camelFull = new RegExp(`^(?:${camel})$`, "u");
|
|
24526
|
+
const camelPrefix = new RegExp(`^(?:${camel})`, "u");
|
|
24527
|
+
const camelPrefixCi = new RegExp(`^(?:${camel})`, "iu");
|
|
24528
|
+
const kebabFull = new RegExp(`^(?:${kebab})$`, "u");
|
|
24529
|
+
const kebabPrefix = new RegExp(`^(?:${kebab})[${LOWER}0-9-]*$`, "u");
|
|
24530
|
+
const ci2 = [];
|
|
24531
|
+
const camelMatches = [];
|
|
24532
|
+
const prefixMatches = [];
|
|
24533
|
+
const ciCamel = [];
|
|
24534
|
+
const kebabMatches = [];
|
|
24535
|
+
const kebabPrefixMatches = [];
|
|
24536
|
+
const upper = pattern.toUpperCase();
|
|
24537
|
+
for (const c3 of list) {
|
|
24538
|
+
if (c3.toUpperCase() === upper) ci2.push(c3);
|
|
24539
|
+
if (camelFull.test(c3)) camelMatches.push(c3);
|
|
24540
|
+
if (camelPrefix.test(c3)) prefixMatches.push(c3);
|
|
24541
|
+
if (camelPrefixCi.test(c3)) ciCamel.push(c3);
|
|
24542
|
+
if (kebabFull.test(c3)) kebabMatches.push(c3);
|
|
24543
|
+
if (kebabPrefix.test(c3)) kebabPrefixMatches.push(c3);
|
|
24544
|
+
}
|
|
24545
|
+
const matches = /* @__PURE__ */ new Set();
|
|
24546
|
+
if (ci2.length) ci2.forEach((m) => matches.add(m));
|
|
24547
|
+
else if (camelMatches.length) camelMatches.forEach((m) => matches.add(m));
|
|
24548
|
+
else if (prefixMatches.length) prefixMatches.forEach((m) => matches.add(m));
|
|
24549
|
+
else if (!kebabMatches.length && !kebabPrefixMatches.length)
|
|
24550
|
+
ciCamel.forEach((m) => matches.add(m));
|
|
24551
|
+
if (kebabMatches.length) kebabMatches.forEach((m) => matches.add(m));
|
|
24552
|
+
else kebabPrefixMatches.forEach((m) => matches.add(m));
|
|
24553
|
+
if (matches.size === 1) return [...matches][0];
|
|
24554
|
+
return matches.size > 1 ? "ambiguous" : null;
|
|
24555
|
+
}
|
|
24556
|
+
function gradleProjectRefs(cmd) {
|
|
24557
|
+
const tokens = shellWords(cmd);
|
|
24558
|
+
if (!tokens || tokens.length === 0 || !GRADLE_HEAD.test(tokens[0])) return null;
|
|
24559
|
+
if (tokens.length > 1 && CONTINUATION.test(tokens[tokens.length - 1])) return null;
|
|
24560
|
+
const refs = [];
|
|
24561
|
+
for (let i2 = 1; i2 < tokens.length; i2++) {
|
|
24562
|
+
const tok = tokens[i2];
|
|
24563
|
+
if (tok.startsWith("-")) {
|
|
24564
|
+
const bare = tok.includes("=") ? tok.slice(0, tok.indexOf("=")) : tok;
|
|
24565
|
+
if (RETARGET_OPTIONS.has(bare)) return null;
|
|
24566
|
+
if (!tok.startsWith("--") && tok.length > 2) {
|
|
24567
|
+
if (RETARGET_OPTIONS.has(tok.slice(0, 2))) return null;
|
|
24568
|
+
continue;
|
|
24569
|
+
}
|
|
24570
|
+
if (tok.includes("=")) continue;
|
|
24571
|
+
if (VALUE_OPTIONS.has(tok)) {
|
|
24572
|
+
i2++;
|
|
24573
|
+
continue;
|
|
24574
|
+
}
|
|
24575
|
+
if (tok.startsWith("--") && !BOOLEAN_LONG_OPTIONS.has(tok)) {
|
|
24576
|
+
if (tokens[i2 + 1] && !tokens[i2 + 1].startsWith("-")) i2++;
|
|
24577
|
+
}
|
|
24578
|
+
continue;
|
|
24579
|
+
}
|
|
24580
|
+
if (!TASK_PATH.test(tok)) continue;
|
|
24581
|
+
const absolute = tok.startsWith(":");
|
|
24582
|
+
const segments = (absolute ? tok.slice(1) : tok).split(":");
|
|
24583
|
+
const projectSegments = segments.slice(0, -1);
|
|
24584
|
+
if (projectSegments.length === 0) continue;
|
|
24585
|
+
if (projectSegments.some((s) => PLACEHOLDER_SEGMENT.test(s))) continue;
|
|
24586
|
+
refs.push({ token: tok, segments: projectSegments, absolute });
|
|
24587
|
+
}
|
|
24588
|
+
return refs;
|
|
24589
|
+
}
|
|
24590
|
+
function shellWords(cmd) {
|
|
24591
|
+
const words = [];
|
|
24592
|
+
let buf = "";
|
|
24593
|
+
let inWord = false;
|
|
24594
|
+
let quote2 = null;
|
|
24595
|
+
for (let i2 = 0; i2 < cmd.length; i2++) {
|
|
24596
|
+
const ch = cmd[i2];
|
|
24597
|
+
if (quote2) {
|
|
24598
|
+
if (ch === quote2) quote2 = null;
|
|
24599
|
+
else buf += ch;
|
|
24600
|
+
continue;
|
|
24601
|
+
}
|
|
24602
|
+
if (ch === '"' || ch === "'") {
|
|
24603
|
+
quote2 = ch;
|
|
24604
|
+
inWord = true;
|
|
24605
|
+
continue;
|
|
24606
|
+
}
|
|
24607
|
+
if (ch === " " || ch === " ") {
|
|
24608
|
+
if (inWord) words.push(buf);
|
|
24609
|
+
buf = "";
|
|
24610
|
+
inWord = false;
|
|
24611
|
+
continue;
|
|
24612
|
+
}
|
|
24613
|
+
if (!inWord && ch === "#") break;
|
|
24614
|
+
if (ch === "<") {
|
|
24615
|
+
const close = cmd.slice(i2).search(/>|\s/);
|
|
24616
|
+
if (close > 1 && cmd[i2 + close] === ">") {
|
|
24617
|
+
buf += cmd.slice(i2, i2 + close + 1);
|
|
24618
|
+
i2 += close;
|
|
24619
|
+
inWord = true;
|
|
24620
|
+
continue;
|
|
24621
|
+
}
|
|
24622
|
+
}
|
|
24623
|
+
if (ch === "&" || ch === "|" || ch === ";" || ch === ">" || ch === "<") break;
|
|
24624
|
+
buf += ch;
|
|
24625
|
+
inWord = true;
|
|
24626
|
+
}
|
|
24627
|
+
if (quote2) return null;
|
|
24628
|
+
if (inWord) words.push(buf);
|
|
24629
|
+
return words;
|
|
24630
|
+
}
|
|
24631
|
+
function unresolvedGradleProject(ref, set2) {
|
|
24632
|
+
let current = "";
|
|
24633
|
+
for (let depth = 0; depth < ref.segments.length; depth++) {
|
|
24634
|
+
const seg = ref.segments[depth];
|
|
24635
|
+
const children = childNames(set2.paths, current);
|
|
24636
|
+
if (depth === 0) {
|
|
24637
|
+
const match2 = matchGradleName(seg, [...children, ...set2.builds]);
|
|
24638
|
+
if (match2 === null) return `:${seg}`;
|
|
24639
|
+
if (match2 === "ambiguous" || set2.builds.has(match2)) return null;
|
|
24640
|
+
current = `:${match2}`;
|
|
24641
|
+
continue;
|
|
24642
|
+
}
|
|
24643
|
+
const match = matchGradleName(seg, children);
|
|
24644
|
+
if (match === null) return `${current}:${seg}`;
|
|
24645
|
+
if (match === "ambiguous") return null;
|
|
24646
|
+
current = `${current}:${match}`;
|
|
24647
|
+
}
|
|
24648
|
+
return null;
|
|
24649
|
+
}
|
|
24650
|
+
function childNames(paths, parent) {
|
|
24651
|
+
const out = /* @__PURE__ */ new Set();
|
|
24652
|
+
const prefix = `${parent}:`;
|
|
24653
|
+
for (const p2 of paths) {
|
|
24654
|
+
if (!p2.startsWith(prefix)) continue;
|
|
24655
|
+
const rest = p2.slice(prefix.length);
|
|
24656
|
+
if (rest && !rest.includes(":")) out.add(rest);
|
|
24657
|
+
}
|
|
24658
|
+
return out;
|
|
24659
|
+
}
|
|
24660
|
+
var SETTINGS_FILES, BENIGN_SETTINGS_PLUGINS, OPEN_IDENTIFIERS, WRAPPER_FILES, MAX_INCLUDED_BUILD_DEPTH, NAME_SAFE_BLOCKS, TRANSPARENT_BLOCKS, PUNCT, LOWER, UPPER, CAMEL_BOUNDARY, KEBAB_BOUNDARY, GRADLE_HEAD, VALUE_OPTIONS, RETARGET_OPTIONS, BOOLEAN_LONG_OPTIONS, CONTINUATION, TASK_PATH, PLACEHOLDER_SEGMENT;
|
|
24661
|
+
var init_gradle_projects = __esm({
|
|
24662
|
+
"src/core/checks/gradle-projects.ts"() {
|
|
24663
|
+
"use strict";
|
|
24664
|
+
init_define_WEB_FIRST_SEGMENTS();
|
|
24665
|
+
init_fs();
|
|
24666
|
+
SETTINGS_FILES = ["settings.gradle", "settings.gradle.kts"];
|
|
24667
|
+
BENIGN_SETTINGS_PLUGINS = /* @__PURE__ */ new Set([
|
|
24668
|
+
"com.gradle.develocity",
|
|
24669
|
+
"com.gradle.enterprise",
|
|
24670
|
+
"com.gradle.common-custom-user-data-gradle-plugin",
|
|
24671
|
+
"org.gradle.toolchains.foojay-resolver",
|
|
24672
|
+
"org.gradle.toolchains.foojay-resolver-convention"
|
|
24673
|
+
]);
|
|
24674
|
+
OPEN_IDENTIFIERS = /* @__PURE__ */ new Set([
|
|
24675
|
+
"pluginManager",
|
|
24676
|
+
"settingsEvaluated",
|
|
24677
|
+
"beforeSettings",
|
|
24678
|
+
"evaluate",
|
|
24679
|
+
"GroovyShell",
|
|
24680
|
+
"Eval",
|
|
24681
|
+
"ScriptEngineManager",
|
|
24682
|
+
"createProjectDescriptor",
|
|
24683
|
+
// A settings `buildscript {}` puts a jar on the settings classpath, which can
|
|
24684
|
+
// contribute extension functions on Settings; `classpath` alone misses
|
|
24685
|
+
// `add('classpath', ...)` and Kotlin `"classpath"(...)`.
|
|
24686
|
+
"buildscript",
|
|
24687
|
+
"classpath",
|
|
24688
|
+
"invokeMethod",
|
|
24689
|
+
"metaClass",
|
|
24690
|
+
"methodMissing",
|
|
24691
|
+
"setProperty"
|
|
24692
|
+
]);
|
|
24693
|
+
WRAPPER_FILES = ["gradlew", "gradlew.bat"];
|
|
24694
|
+
MAX_INCLUDED_BUILD_DEPTH = 8;
|
|
24695
|
+
NAME_SAFE_BLOCKS = /* @__PURE__ */ new Set([
|
|
24696
|
+
"pluginManagement",
|
|
24697
|
+
"dependencyResolutionManagement",
|
|
24698
|
+
"repositories",
|
|
24699
|
+
"maven",
|
|
24700
|
+
"ivy",
|
|
24701
|
+
"exclusiveContent",
|
|
24702
|
+
"forRepository",
|
|
24703
|
+
"filter",
|
|
24704
|
+
"content",
|
|
24705
|
+
"credentials",
|
|
24706
|
+
"authentication",
|
|
24707
|
+
"versionCatalogs",
|
|
24708
|
+
"create",
|
|
24709
|
+
"register",
|
|
24710
|
+
"develocity",
|
|
24711
|
+
"gradleEnterprise",
|
|
24712
|
+
"buildScan",
|
|
24713
|
+
"buildCache",
|
|
24714
|
+
"local",
|
|
24715
|
+
"remote",
|
|
24716
|
+
"toolchainManagement",
|
|
24717
|
+
"jvm",
|
|
24718
|
+
"javaRepositories",
|
|
24719
|
+
"includeBuild",
|
|
24720
|
+
"dependencySubstitution"
|
|
24721
|
+
]);
|
|
24722
|
+
TRANSPARENT_BLOCKS = /* @__PURE__ */ new Set([
|
|
24723
|
+
"if",
|
|
24724
|
+
"else",
|
|
24725
|
+
"for",
|
|
24726
|
+
"while",
|
|
24727
|
+
"try",
|
|
24728
|
+
"catch",
|
|
24729
|
+
"finally",
|
|
24730
|
+
"when"
|
|
24731
|
+
]);
|
|
24732
|
+
PUNCT = "[!\"#$%&'()*+,\\-./:;<=>?@\\[\\\\\\]^_`{|}~]";
|
|
24733
|
+
LOWER = "\\p{Lowercase}";
|
|
24734
|
+
UPPER = "\\p{Uppercase}";
|
|
24735
|
+
CAMEL_BOUNDARY = new RegExp(`((^|${PUNCT})${LOWER}+)|((${UPPER}|[0-9])${LOWER}*)`, "gu");
|
|
24736
|
+
KEBAB_BOUNDARY = new RegExp(`((^|${PUNCT})${LOWER}+)|(${UPPER}${LOWER}*)`, "gu");
|
|
24737
|
+
GRADLE_HEAD = /^(?:\.[\\/])?gradlew(?:\.bat)?$|^gradle$/;
|
|
24738
|
+
VALUE_OPTIONS = /* @__PURE__ */ new Set([
|
|
24739
|
+
"-x",
|
|
24740
|
+
"--exclude-task",
|
|
24741
|
+
"-g",
|
|
24742
|
+
"--gradle-user-home",
|
|
24743
|
+
"--project-cache-dir",
|
|
24744
|
+
"--console",
|
|
24745
|
+
"--console-unicode",
|
|
24746
|
+
"--warning-mode",
|
|
24747
|
+
"--max-workers",
|
|
24748
|
+
"--priority",
|
|
24749
|
+
"--develocity-url",
|
|
24750
|
+
"--develocity-plugin-version",
|
|
24751
|
+
"--write-verification-metadata",
|
|
24752
|
+
"-F",
|
|
24753
|
+
"--dependency-verification",
|
|
24754
|
+
"--update-locks",
|
|
24755
|
+
"--configuration-cache-problems",
|
|
24756
|
+
"-D",
|
|
24757
|
+
"--system-prop",
|
|
24758
|
+
"-P",
|
|
24759
|
+
"--project-prop"
|
|
24760
|
+
]);
|
|
24761
|
+
RETARGET_OPTIONS = /* @__PURE__ */ new Set([
|
|
24762
|
+
"-p",
|
|
24763
|
+
"--project-dir",
|
|
24764
|
+
"-c",
|
|
24765
|
+
"--settings-file",
|
|
24766
|
+
"-b",
|
|
24767
|
+
"--build-file",
|
|
24768
|
+
"--include-build",
|
|
24769
|
+
"-I",
|
|
24770
|
+
"--init-script"
|
|
24771
|
+
]);
|
|
24772
|
+
BOOLEAN_LONG_OPTIONS = /* @__PURE__ */ new Set([
|
|
24773
|
+
"--rerun-tasks",
|
|
24774
|
+
"--profile",
|
|
24775
|
+
"--continue",
|
|
24776
|
+
"--no-continue",
|
|
24777
|
+
"--offline",
|
|
24778
|
+
"--refresh-dependencies",
|
|
24779
|
+
"--dry-run",
|
|
24780
|
+
"--continuous",
|
|
24781
|
+
"--no-rebuild",
|
|
24782
|
+
"--configure-on-demand",
|
|
24783
|
+
"--no-configure-on-demand",
|
|
24784
|
+
"--build-cache",
|
|
24785
|
+
"--no-build-cache",
|
|
24786
|
+
"--watch-fs",
|
|
24787
|
+
"--no-watch-fs",
|
|
24788
|
+
"--scan",
|
|
24789
|
+
"--no-scan",
|
|
24790
|
+
"--write-locks",
|
|
24791
|
+
"--refresh-keys",
|
|
24792
|
+
"--export-keys",
|
|
24793
|
+
"--configuration-cache",
|
|
24794
|
+
"--no-configuration-cache",
|
|
24795
|
+
"--property-upgrade-report",
|
|
24796
|
+
"--problems-report",
|
|
24797
|
+
"--no-problems-report",
|
|
24798
|
+
"--task-graph",
|
|
24799
|
+
"--quiet",
|
|
24800
|
+
"--warn",
|
|
24801
|
+
"--info",
|
|
24802
|
+
"--debug",
|
|
24803
|
+
"--stacktrace",
|
|
24804
|
+
"--full-stacktrace",
|
|
24805
|
+
"--non-interactive",
|
|
24806
|
+
"--parallel",
|
|
24807
|
+
"--no-parallel",
|
|
24808
|
+
"--daemon",
|
|
24809
|
+
"--no-daemon",
|
|
24810
|
+
"--foreground",
|
|
24811
|
+
"--stop",
|
|
24812
|
+
"--status",
|
|
24813
|
+
"--help",
|
|
24814
|
+
"--version",
|
|
24815
|
+
"--show-version"
|
|
24816
|
+
]);
|
|
24817
|
+
CONTINUATION = /^[\\^`]$/;
|
|
24818
|
+
TASK_PATH = /^:?[\w.-]+(?::[\w.-]+)+$|^:[\w.-]+$/;
|
|
24819
|
+
PLACEHOLDER_SEGMENT = /^(?:module|project|subproject|submodule|component|feature)(?:[-_]?(?:name|path|id))?$|^(?:my|your|some|example|sample)[-_]|^(?:foo|bar|baz|xxx|name)$/i;
|
|
24820
|
+
}
|
|
24821
|
+
});
|
|
24822
|
+
|
|
24823
|
+
// src/core/checks/maven-modules.ts
|
|
24824
|
+
import * as fs7 from "node:fs";
|
|
24825
|
+
import * as path8 from "node:path";
|
|
24826
|
+
function readMavenReactor(baseDir) {
|
|
24827
|
+
const rootPom = path8.join(baseDir, "pom.xml");
|
|
24828
|
+
if (!fs7.existsSync(rootPom)) return null;
|
|
24829
|
+
const projects = [];
|
|
24830
|
+
const seen = /* @__PURE__ */ new Set();
|
|
24831
|
+
const queue = [path8.resolve(rootPom)];
|
|
24832
|
+
while (queue.length > 0) {
|
|
24833
|
+
const pomFile = realPath(queue.shift());
|
|
24834
|
+
if (pomFile === null) return null;
|
|
24835
|
+
if (seen.has(pomFile)) continue;
|
|
24836
|
+
seen.add(pomFile);
|
|
24837
|
+
if (seen.size > MAX_POMS) return null;
|
|
24838
|
+
let xml;
|
|
24839
|
+
try {
|
|
24840
|
+
xml = readXml(pomFile);
|
|
24841
|
+
} catch {
|
|
24842
|
+
return null;
|
|
24843
|
+
}
|
|
24844
|
+
const model = parsePom(xml);
|
|
24845
|
+
if (!model) return null;
|
|
24846
|
+
const basedir = path8.dirname(pomFile);
|
|
24847
|
+
projects.push({ basedir, pomFile, artifactId: model.artifactId, groupId: model.groupId });
|
|
24848
|
+
for (const module of model.modules) {
|
|
24849
|
+
const target = path8.resolve(basedir, module);
|
|
24850
|
+
let childPom = target;
|
|
24851
|
+
try {
|
|
24852
|
+
if (fs7.statSync(target).isDirectory()) childPom = path8.join(target, "pom.xml");
|
|
24853
|
+
} catch {
|
|
24854
|
+
return null;
|
|
24855
|
+
}
|
|
24856
|
+
queue.push(childPom);
|
|
24857
|
+
}
|
|
24858
|
+
}
|
|
24859
|
+
return projects;
|
|
24860
|
+
}
|
|
24861
|
+
function realPath(p2) {
|
|
24862
|
+
try {
|
|
24863
|
+
return fs7.realpathSync.native(p2);
|
|
24864
|
+
} catch {
|
|
24865
|
+
return null;
|
|
24866
|
+
}
|
|
24867
|
+
}
|
|
24868
|
+
function readXml(file2) {
|
|
24869
|
+
const buf = fs7.readFileSync(file2);
|
|
24870
|
+
if (buf.includes(0)) throw new Error("not UTF-8");
|
|
24871
|
+
return stripBom(buf.toString("utf-8"));
|
|
24872
|
+
}
|
|
24873
|
+
function parsePom(xml) {
|
|
24874
|
+
const cleaned = xml.replace(/<!--[\s\S]*?-->/g, "").replace(/<!\[CDATA\[[\s\S]*?\]\]>/g, "");
|
|
24875
|
+
const tagRe = /<(\/?)([A-Za-z_][\w.:-]*)((?:[^>"']|"[^"]*"|'[^']*')*?)(\/?)>/g;
|
|
24876
|
+
const stack = [];
|
|
24877
|
+
const text = {};
|
|
24878
|
+
const modules = [];
|
|
24879
|
+
let hasModuleList = false;
|
|
24880
|
+
let namespaceVersion = null;
|
|
24881
|
+
let lastEnd = 0;
|
|
24882
|
+
for (const m of cleaned.matchAll(tagRe)) {
|
|
24883
|
+
const [whole, closing, rawName, attrs, selfClosing] = m;
|
|
24884
|
+
const name = rawName.includes(":") ? rawName.slice(rawName.indexOf(":") + 1) : rawName;
|
|
24885
|
+
const start = m.index ?? 0;
|
|
24886
|
+
if (closing) {
|
|
24887
|
+
if (stack[stack.length - 1] !== name) return null;
|
|
24888
|
+
const elementPath = stack.join("/");
|
|
24889
|
+
const value2 = cleaned.slice(lastEnd, start).trim();
|
|
24890
|
+
if (/^project\/(?:artifactId|groupId|modelVersion|packaging)$/.test(elementPath)) {
|
|
24891
|
+
text[elementPath] = value2;
|
|
24892
|
+
}
|
|
24893
|
+
if (elementPath === "project/parent/groupId") text[elementPath] = value2;
|
|
24894
|
+
if (/^project\/(?:profiles\/profile\/)?(?:modules\/module|subprojects\/subproject)$/.test(
|
|
24895
|
+
elementPath
|
|
24896
|
+
)) {
|
|
24897
|
+
if (!value2 || value2.includes("${")) return null;
|
|
24898
|
+
modules.push(decodeEntities(value2));
|
|
24899
|
+
}
|
|
24900
|
+
stack.pop();
|
|
24901
|
+
} else {
|
|
24902
|
+
const elementPath = [...stack, name].join("/");
|
|
24903
|
+
if (elementPath === "project") {
|
|
24904
|
+
namespaceVersion = /xmlns\s*=\s*["']http:\/\/maven\.apache\.org\/POM\/(\d+\.\d+\.\d+)["']/.exec(
|
|
24905
|
+
attrs
|
|
24906
|
+
)?.[1] ?? null;
|
|
24907
|
+
}
|
|
24908
|
+
if (elementPath === "project/modules" || elementPath === "project/subprojects") {
|
|
24909
|
+
hasModuleList = true;
|
|
24910
|
+
}
|
|
24911
|
+
if (!selfClosing) stack.push(name);
|
|
24912
|
+
}
|
|
24913
|
+
lastEnd = start + whole.length;
|
|
24914
|
+
}
|
|
24915
|
+
if (stack.length > 0) return null;
|
|
24916
|
+
const modelVersion = text["project/modelVersion"] || namespaceVersion;
|
|
24917
|
+
const packaging = text["project/packaging"] || "jar";
|
|
24918
|
+
const aggregator = packaging === "pom" || packaging.includes("${");
|
|
24919
|
+
if (aggregator && !hasModuleList && modelVersion !== "4.0.0") return null;
|
|
24920
|
+
const value = (v2) => v2 ? decodeEntities(v2) : null;
|
|
24921
|
+
return {
|
|
24922
|
+
artifactId: value(text["project/artifactId"]),
|
|
24923
|
+
groupId: value(text["project/groupId"] ?? text["project/parent/groupId"]),
|
|
24924
|
+
modules
|
|
24925
|
+
};
|
|
24926
|
+
}
|
|
24927
|
+
function decodeEntities(s) {
|
|
24928
|
+
const codePoint = (n7, raw) => {
|
|
24929
|
+
try {
|
|
24930
|
+
return String.fromCodePoint(n7);
|
|
24931
|
+
} catch {
|
|
24932
|
+
return raw;
|
|
24933
|
+
}
|
|
24934
|
+
};
|
|
24935
|
+
return s.replace(/&#x([0-9a-fA-F]+);/g, (raw, h2) => codePoint(parseInt(h2, 16), raw)).replace(/&#(\d+);/g, (raw, d) => codePoint(Number(d), raw)).replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/&/g, "&");
|
|
24936
|
+
}
|
|
24937
|
+
function mavenSelectors(cmd) {
|
|
24938
|
+
const tokens = shellWords(cmd);
|
|
24939
|
+
if (!tokens || tokens.length === 0 || !MAVEN_HEAD.test(tokens[0])) return null;
|
|
24940
|
+
if (tokens.some((t2) => CONTINUATION.test(t2))) return null;
|
|
24941
|
+
const out = [];
|
|
24942
|
+
const addList = (option, value, isList) => {
|
|
24943
|
+
for (const raw of isList ? value.split(",") : [value]) {
|
|
24944
|
+
let sel = raw.trim();
|
|
24945
|
+
if (isList) sel = sel.replace(/^[!+-]/, "");
|
|
24946
|
+
if (!sel || sel.startsWith("?")) continue;
|
|
24947
|
+
const idPart = sel.slice(sel.lastIndexOf(":") + 1);
|
|
24948
|
+
if (PLACEHOLDER.test(sel) || PLACEHOLDER.test(idPart)) continue;
|
|
24949
|
+
out.push({ selector: sel, option });
|
|
24950
|
+
}
|
|
24951
|
+
};
|
|
24952
|
+
for (let i2 = 1; i2 < tokens.length; i2++) {
|
|
24953
|
+
const tok = tokens[i2];
|
|
24954
|
+
if (!tok.startsWith("-")) continue;
|
|
24955
|
+
const eq = tok.indexOf("=");
|
|
24956
|
+
const bare = eq > 0 && tok.startsWith("--") ? tok.slice(0, eq) : tok;
|
|
24957
|
+
if (RETARGET_OPTIONS2.has(bare)) return null;
|
|
24958
|
+
if (/^-f[^\w-]?.+/.test(tok) && !/^-(?:fae|ff|fn|fos)$/.test(tok)) return null;
|
|
24959
|
+
if (bare === "-pl" || bare === "--projects" || bare === "-rf" || bare === "--resume-from") {
|
|
24960
|
+
const isList = bare === "-pl" || bare === "--projects";
|
|
24961
|
+
const option = isList ? "-pl" : "-rf";
|
|
24962
|
+
if (eq > 0 && tok.startsWith("--")) {
|
|
24963
|
+
addList(option, tok.slice(eq + 1), isList);
|
|
24964
|
+
} else if (tokens[i2 + 1] !== void 0) {
|
|
24965
|
+
addList(option, tokens[++i2], isList);
|
|
24966
|
+
}
|
|
24967
|
+
continue;
|
|
24968
|
+
}
|
|
24969
|
+
if (VALUE_OPTIONS2.has(tok)) i2++;
|
|
24970
|
+
}
|
|
24971
|
+
return out;
|
|
24972
|
+
}
|
|
24973
|
+
function selectorMatches(selector, reactor, baseDir) {
|
|
24974
|
+
if (selector.includes(":")) {
|
|
24975
|
+
if (selector.startsWith(":")) {
|
|
24976
|
+
const artifactId2 = selector.slice(1);
|
|
24977
|
+
return reactor.some((p2) => templateMatches(p2.artifactId, artifactId2));
|
|
24978
|
+
}
|
|
24979
|
+
const [groupId, artifactId, ...rest] = selector.split(":");
|
|
24980
|
+
if (rest.length > 0) return true;
|
|
24981
|
+
return reactor.some(
|
|
24982
|
+
(p2) => templateMatches(p2.artifactId, artifactId) && templateMatches(p2.groupId, groupId)
|
|
24983
|
+
);
|
|
24984
|
+
}
|
|
24985
|
+
const target = realPath(path8.resolve(baseDir, selector));
|
|
24986
|
+
if (target === null) return false;
|
|
24987
|
+
if (fs7.statSync(target).isFile()) return reactor.some((p2) => samePath(p2.pomFile, target));
|
|
24988
|
+
return reactor.some((p2) => samePath(p2.basedir, target));
|
|
24989
|
+
}
|
|
24990
|
+
function templateMatches(template, value) {
|
|
24991
|
+
if (template === null) return true;
|
|
24992
|
+
if (!template.includes("${")) return template === value;
|
|
24993
|
+
const pattern = template.split(/\$\{[^}]*\}/).map((part) => part.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join(".*");
|
|
24994
|
+
return new RegExp(`^${pattern}$`).test(value);
|
|
24995
|
+
}
|
|
24996
|
+
function samePath(a, b2) {
|
|
24997
|
+
return path8.resolve(a) === path8.resolve(b2);
|
|
24998
|
+
}
|
|
24999
|
+
function mavenBaseDirs(contextFile, projectRoot) {
|
|
25000
|
+
const root = path8.resolve(projectRoot);
|
|
25001
|
+
const dirs = [root];
|
|
25002
|
+
let dir = path8.dirname(path8.resolve(contextFile));
|
|
25003
|
+
for (; ; ) {
|
|
25004
|
+
const rel = path8.relative(root, dir);
|
|
25005
|
+
if (rel === "" || rel.startsWith("..") || path8.isAbsolute(rel)) break;
|
|
25006
|
+
if (fs7.existsSync(path8.join(dir, "pom.xml"))) dirs.push(dir);
|
|
25007
|
+
const parent = path8.dirname(dir);
|
|
25008
|
+
if (parent === dir) break;
|
|
25009
|
+
dir = parent;
|
|
25010
|
+
}
|
|
25011
|
+
return dirs;
|
|
25012
|
+
}
|
|
25013
|
+
var MAX_POMS, MAVEN_HEAD, VALUE_OPTIONS2, RETARGET_OPTIONS2, PLACEHOLDER;
|
|
25014
|
+
var init_maven_modules = __esm({
|
|
25015
|
+
"src/core/checks/maven-modules.ts"() {
|
|
25016
|
+
"use strict";
|
|
25017
|
+
init_define_WEB_FIRST_SEGMENTS();
|
|
25018
|
+
init_fs();
|
|
25019
|
+
init_gradle_projects();
|
|
25020
|
+
MAX_POMS = 2e4;
|
|
25021
|
+
MAVEN_HEAD = /^(?:\.[\\/])?mvnw(?:\.cmd)?$|^mvn(?:\.cmd)?$/;
|
|
25022
|
+
VALUE_OPTIONS2 = /* @__PURE__ */ new Set([
|
|
25023
|
+
"-D",
|
|
25024
|
+
"--define",
|
|
25025
|
+
"-P",
|
|
25026
|
+
"--activate-profiles",
|
|
25027
|
+
"-s",
|
|
25028
|
+
"--settings",
|
|
25029
|
+
"-gs",
|
|
25030
|
+
"--global-settings",
|
|
25031
|
+
"-t",
|
|
25032
|
+
"--toolchains",
|
|
25033
|
+
"-gt",
|
|
25034
|
+
"--global-toolchains",
|
|
25035
|
+
"-ps",
|
|
25036
|
+
"--project-settings",
|
|
25037
|
+
"-is",
|
|
25038
|
+
"--install-settings",
|
|
25039
|
+
"-it",
|
|
25040
|
+
"--install-toolchains",
|
|
25041
|
+
"-fos",
|
|
25042
|
+
"--fail-on-severity",
|
|
25043
|
+
"-l",
|
|
25044
|
+
"--log-file",
|
|
25045
|
+
"-T",
|
|
25046
|
+
"--threads",
|
|
25047
|
+
"-b",
|
|
25048
|
+
"--builder",
|
|
25049
|
+
"-canf",
|
|
25050
|
+
"--cache-artifact-not-found",
|
|
25051
|
+
"-sadp",
|
|
25052
|
+
"--strict-artifact-descriptor-policy"
|
|
25053
|
+
]);
|
|
25054
|
+
RETARGET_OPTIONS2 = /* @__PURE__ */ new Set(["-f", "--file", "-N", "--non-recursive", "-af", "--at-file"]);
|
|
25055
|
+
PLACEHOLDER = /[<>{}$*%[\]]|\.\.\.|^path\/to\/|^(?:module|project|submodule|component|feature)(?:[-_]?(?:name|path|id))?$|^(?:my|your|some|example|sample)[-_]|^(?:foo|bar|baz|xxx|name)$/i;
|
|
25056
|
+
}
|
|
25057
|
+
});
|
|
25058
|
+
|
|
24053
25059
|
// src/utils/markdown.ts
|
|
24054
25060
|
function inlineCodeSpans(line) {
|
|
24055
25061
|
const spans = [];
|
|
@@ -24125,8 +25131,8 @@ var init_markdown = __esm({
|
|
|
24125
25131
|
});
|
|
24126
25132
|
|
|
24127
25133
|
// src/core/checks/commands.ts
|
|
24128
|
-
import * as
|
|
24129
|
-
import * as
|
|
25134
|
+
import * as fs8 from "node:fs";
|
|
25135
|
+
import * as path9 from "node:path";
|
|
24130
25136
|
function isManagerBuiltin(manager, sub) {
|
|
24131
25137
|
return PM_MANAGER_BUILTINS[manager]?.has(sub) ?? false;
|
|
24132
25138
|
}
|
|
@@ -24167,7 +25173,7 @@ function loadDeniedCommandPrefixes(projectRoot) {
|
|
|
24167
25173
|
for (const rel of ["settings.json", "settings.local.json"]) {
|
|
24168
25174
|
let content;
|
|
24169
25175
|
try {
|
|
24170
|
-
content = stripBom(
|
|
25176
|
+
content = stripBom(fs8.readFileSync(path9.join(projectRoot, ".claude", rel), "utf-8"));
|
|
24171
25177
|
} catch {
|
|
24172
25178
|
continue;
|
|
24173
25179
|
}
|
|
@@ -24239,9 +25245,8 @@ async function checkCommands(file2, projectRoot) {
|
|
|
24239
25245
|
});
|
|
24240
25246
|
}
|
|
24241
25247
|
}
|
|
24242
|
-
issues.push(
|
|
24243
|
-
|
|
24244
|
-
);
|
|
25248
|
+
issues.push(...checkUnknownSubcommand(file2, projectRoot, pkgJson, deniedPrefixes, contentLines));
|
|
25249
|
+
const jvmCache = { gradle: /* @__PURE__ */ new Map(), maven: /* @__PURE__ */ new Map() };
|
|
24245
25250
|
for (const ref of file2.references.commands) {
|
|
24246
25251
|
if (inHtmlComment(ref.line, ref.column)) continue;
|
|
24247
25252
|
const cmd = ref.value;
|
|
@@ -24258,6 +25263,16 @@ async function checkCommands(file2, projectRoot) {
|
|
|
24258
25263
|
});
|
|
24259
25264
|
}
|
|
24260
25265
|
if (isDeniedCommand(cmd, deniedPrefixes) || isProhibitedRef(contentLines, ref)) continue;
|
|
25266
|
+
const gradleIssues = checkGradleProjects(file2, ref, projectRoot, jvmCache);
|
|
25267
|
+
if (gradleIssues) {
|
|
25268
|
+
issues.push(...gradleIssues);
|
|
25269
|
+
continue;
|
|
25270
|
+
}
|
|
25271
|
+
const mavenIssues = checkMavenModules(file2, ref, projectRoot, jvmCache);
|
|
25272
|
+
if (mavenIssues) {
|
|
25273
|
+
issues.push(...mavenIssues);
|
|
25274
|
+
continue;
|
|
25275
|
+
}
|
|
24261
25276
|
const scriptMatch = cmd.match(NPM_SCRIPT_PATTERN);
|
|
24262
25277
|
if (scriptMatch && pkgJson) {
|
|
24263
25278
|
const scriptName = scriptNameFromMatch(scriptMatch);
|
|
@@ -24300,9 +25315,9 @@ async function checkCommands(file2, projectRoot) {
|
|
|
24300
25315
|
...pkgJson.optionalDependencies
|
|
24301
25316
|
};
|
|
24302
25317
|
if (!(pkgName in allDeps)) {
|
|
24303
|
-
const binPath =
|
|
25318
|
+
const binPath = path9.join(projectRoot, "node_modules", ".bin", pkgName);
|
|
24304
25319
|
try {
|
|
24305
|
-
|
|
25320
|
+
fs8.accessSync(binPath);
|
|
24306
25321
|
} catch {
|
|
24307
25322
|
issues.push({
|
|
24308
25323
|
severity: "warning",
|
|
@@ -24350,9 +25365,9 @@ async function checkCommands(file2, projectRoot) {
|
|
|
24350
25365
|
...pkgJson.optionalDependencies
|
|
24351
25366
|
};
|
|
24352
25367
|
if (!(pkgName in allDeps)) {
|
|
24353
|
-
const binPath =
|
|
25368
|
+
const binPath = path9.join(projectRoot, "node_modules", ".bin", tool);
|
|
24354
25369
|
try {
|
|
24355
|
-
|
|
25370
|
+
fs8.accessSync(binPath);
|
|
24356
25371
|
} catch {
|
|
24357
25372
|
issues.push({
|
|
24358
25373
|
severity: "warning",
|
|
@@ -24396,9 +25411,117 @@ function checkUnknownSubcommand(file2, projectRoot, pkgJson, deniedPrefixes, con
|
|
|
24396
25411
|
}
|
|
24397
25412
|
return issues;
|
|
24398
25413
|
}
|
|
25414
|
+
function checkGradleProjects(file2, ref, projectRoot, cache2) {
|
|
25415
|
+
const refs = gradleProjectRefs(ref.value);
|
|
25416
|
+
if (refs === null) return null;
|
|
25417
|
+
if (refs.length === 0 || cdEarlierInFence(file2.content, ref.line)) return [];
|
|
25418
|
+
const wrapper = !/^gradle(?:\s|$)/.test(ref.value);
|
|
25419
|
+
const buildRoot = findGradleBuildRoot(file2.filePath, projectRoot, wrapper);
|
|
25420
|
+
if (!buildRoot) return [];
|
|
25421
|
+
if (!cache2.gradle.has(buildRoot)) cache2.gradle.set(buildRoot, readGradleProjectSet(buildRoot));
|
|
25422
|
+
const set2 = cache2.gradle.get(buildRoot);
|
|
25423
|
+
if (!set2) return [];
|
|
25424
|
+
const atBuildRoot = path9.resolve(path9.dirname(file2.filePath)) === path9.resolve(buildRoot);
|
|
25425
|
+
const issues = [];
|
|
25426
|
+
for (const projectRef of refs) {
|
|
25427
|
+
if (!projectRef.absolute && !atBuildRoot) continue;
|
|
25428
|
+
const missing = unresolvedGradleProject(projectRef, set2);
|
|
25429
|
+
if (!missing) continue;
|
|
25430
|
+
issues.push({
|
|
25431
|
+
severity: "error",
|
|
25432
|
+
check: "commands",
|
|
25433
|
+
ruleId: "commands/gradle-project-not-found",
|
|
25434
|
+
line: ref.line,
|
|
25435
|
+
message: `"${ref.value}" \u2014 project "${missing}" not found in ${set2.settingsFile}`,
|
|
25436
|
+
suggestion: closestSuggestion(missing, [...set2.paths])
|
|
25437
|
+
});
|
|
25438
|
+
}
|
|
25439
|
+
return issues;
|
|
25440
|
+
}
|
|
25441
|
+
function checkMavenModules(file2, ref, projectRoot, cache2) {
|
|
25442
|
+
const selectors = mavenSelectors(ref.value);
|
|
25443
|
+
if (selectors === null) return null;
|
|
25444
|
+
if (selectors.length === 0 || cdEarlierInFence(file2.content, ref.line)) return [];
|
|
25445
|
+
const bases = [];
|
|
25446
|
+
for (const dir of mavenBaseDirs(file2.filePath, projectRoot)) {
|
|
25447
|
+
if (!fs8.existsSync(path9.join(dir, "pom.xml"))) continue;
|
|
25448
|
+
if (mavenConfigRetargets(dir)) return [];
|
|
25449
|
+
if (!cache2.maven.has(dir)) cache2.maven.set(dir, readMavenReactor(dir));
|
|
25450
|
+
const reactor = cache2.maven.get(dir);
|
|
25451
|
+
if (!reactor) return [];
|
|
25452
|
+
bases.push({ dir, reactor });
|
|
25453
|
+
}
|
|
25454
|
+
if (bases.length === 0) return [];
|
|
25455
|
+
const issues = [];
|
|
25456
|
+
for (const { selector, option } of selectors) {
|
|
25457
|
+
const allProjects = bases.flatMap((b2) => b2.reactor);
|
|
25458
|
+
if (bases.some((b2) => selectorMatches(selector, allProjects, b2.dir))) continue;
|
|
25459
|
+
if (!selector.includes(":") && bases.every((b2) => outside(projectRoot, b2.dir, selector))) {
|
|
25460
|
+
continue;
|
|
25461
|
+
}
|
|
25462
|
+
const known = bases[0].reactor.flatMap((p2) => [
|
|
25463
|
+
path9.relative(bases[0].dir, p2.basedir).replace(/\\/g, "/"),
|
|
25464
|
+
...p2.artifactId && !p2.artifactId.includes("${") ? [`:${p2.artifactId}`] : []
|
|
25465
|
+
]);
|
|
25466
|
+
issues.push({
|
|
25467
|
+
severity: "error",
|
|
25468
|
+
check: "commands",
|
|
25469
|
+
ruleId: "commands/maven-module-not-found",
|
|
25470
|
+
line: ref.line,
|
|
25471
|
+
message: `"${ref.value}" \u2014 ${option} "${selector}" matches no module in the Maven reactor`,
|
|
25472
|
+
suggestion: closestSuggestion(selector, known.filter(Boolean))
|
|
25473
|
+
});
|
|
25474
|
+
}
|
|
25475
|
+
return issues;
|
|
25476
|
+
}
|
|
25477
|
+
function cdEarlierInFence(content, line) {
|
|
25478
|
+
const lines = content.split("\n");
|
|
25479
|
+
const idx = line - 1;
|
|
25480
|
+
const changesDir = (text) => /(?:^|[\s;&|(])(?:cd|pushd)(?:\s|$)/.test(text);
|
|
25481
|
+
let fenceStart = -1;
|
|
25482
|
+
for (let i2 = 0; i2 < idx && i2 < lines.length; i2++) {
|
|
25483
|
+
if (/^\s*```/.test(lines[i2])) fenceStart = fenceStart < 0 ? i2 + 1 : -1;
|
|
25484
|
+
}
|
|
25485
|
+
if (fenceStart >= 0) {
|
|
25486
|
+
for (let i2 = fenceStart; i2 < idx; i2++) if (changesDir(lines[i2])) return true;
|
|
25487
|
+
return false;
|
|
25488
|
+
}
|
|
25489
|
+
for (let i2 = idx - 1; i2 >= 0 && /^\s*[$>]\s+\S/.test(lines[i2]); i2--) {
|
|
25490
|
+
if (changesDir(lines[i2].replace(/^\s*[$>]\s+/, ""))) return true;
|
|
25491
|
+
}
|
|
25492
|
+
return false;
|
|
25493
|
+
}
|
|
25494
|
+
function outside(projectRoot, base, selector) {
|
|
25495
|
+
const rel = path9.relative(path9.resolve(projectRoot), path9.resolve(base, selector));
|
|
25496
|
+
return rel.startsWith("..") || path9.isAbsolute(rel);
|
|
25497
|
+
}
|
|
25498
|
+
function mavenConfigRetargets(dir) {
|
|
25499
|
+
try {
|
|
25500
|
+
const config2 = fs8.readFileSync(path9.join(dir, ".mvn", "maven.config"), "utf-8");
|
|
25501
|
+
return /(?:^|\s)(?:-f(?!(?:ae|f|n|os)(?:\s|$))|--file|-pl|--projects|-N|--non-recursive)/.test(
|
|
25502
|
+
config2
|
|
25503
|
+
);
|
|
25504
|
+
} catch {
|
|
25505
|
+
return false;
|
|
25506
|
+
}
|
|
25507
|
+
}
|
|
25508
|
+
function closestSuggestion(target, candidates) {
|
|
25509
|
+
let best;
|
|
25510
|
+
let bestDist = Infinity;
|
|
25511
|
+
for (const c3 of candidates) {
|
|
25512
|
+
const d = levenshtein2(target.toLowerCase(), c3.toLowerCase());
|
|
25513
|
+
if (d < bestDist) {
|
|
25514
|
+
bestDist = d;
|
|
25515
|
+
best = c3;
|
|
25516
|
+
}
|
|
25517
|
+
}
|
|
25518
|
+
if (best === void 0 || bestDist > Math.max(2, Math.floor(target.length * 0.3)))
|
|
25519
|
+
return void 0;
|
|
25520
|
+
return `Did you mean "${best}"?`;
|
|
25521
|
+
}
|
|
24399
25522
|
function loadMakefile(projectRoot) {
|
|
24400
25523
|
try {
|
|
24401
|
-
return stripBom(
|
|
25524
|
+
return stripBom(fs8.readFileSync(path9.join(projectRoot, "Makefile"), "utf-8"));
|
|
24402
25525
|
} catch {
|
|
24403
25526
|
return null;
|
|
24404
25527
|
}
|
|
@@ -24416,16 +25539,20 @@ function hasMakeTarget(makefile, target) {
|
|
|
24416
25539
|
const pattern = new RegExp(`^${escaped}\\s*:(?!:?=)`, "m");
|
|
24417
25540
|
return pattern.test(makefile);
|
|
24418
25541
|
}
|
|
24419
|
-
var NPM_SCRIPT_PATTERN, MAKE_PATTERN, PM_BUILTIN_SUBCOMMANDS, PM_MANAGER_BUILTINS, PKG_DEPENDENT_TOOL_PATTERN, BIN_TO_PACKAGE, PKG_SHORTHAND_PATTERN, PROHIBITION_TOKEN, CLAUSE_TERMINATOR, RECOMMENDATION_VERB;
|
|
25542
|
+
var import_fast_levenshtein2, levenshtein2, NPM_SCRIPT_PATTERN, MAKE_PATTERN, PM_BUILTIN_SUBCOMMANDS, PM_MANAGER_BUILTINS, PKG_DEPENDENT_TOOL_PATTERN, BIN_TO_PACKAGE, PKG_SHORTHAND_PATTERN, PROHIBITION_TOKEN, CLAUSE_TERMINATOR, RECOMMENDATION_VERB;
|
|
24420
25543
|
var init_commands = __esm({
|
|
24421
25544
|
"src/core/checks/commands.ts"() {
|
|
24422
25545
|
"use strict";
|
|
24423
25546
|
init_define_WEB_FIRST_SEGMENTS();
|
|
24424
25547
|
init_main3();
|
|
25548
|
+
import_fast_levenshtein2 = __toESM(require_levenshtein(), 1);
|
|
24425
25549
|
init_fs();
|
|
24426
25550
|
init_exit_status();
|
|
24427
25551
|
init_cli_subcommands();
|
|
25552
|
+
init_gradle_projects();
|
|
25553
|
+
init_maven_modules();
|
|
24428
25554
|
init_markdown();
|
|
25555
|
+
levenshtein2 = import_fast_levenshtein2.default.get;
|
|
24429
25556
|
NPM_SCRIPT_PATTERN = /^(?:npm\s+run|(pnpm|yarn|bun)(?:\s+(run))?)\s+(\S+)/;
|
|
24430
25557
|
MAKE_PATTERN = /^make\s+\S/;
|
|
24431
25558
|
PM_BUILTIN_SUBCOMMANDS = /* @__PURE__ */ new Set([
|
|
@@ -24502,13 +25629,13 @@ var init_commands = __esm({
|
|
|
24502
25629
|
});
|
|
24503
25630
|
|
|
24504
25631
|
// src/core/checks/staleness.ts
|
|
24505
|
-
import * as
|
|
25632
|
+
import * as path10 from "node:path";
|
|
24506
25633
|
async function checkStaleness(file2, projectRoot) {
|
|
24507
25634
|
const issues = [];
|
|
24508
25635
|
if (!await isGitRepo(projectRoot)) {
|
|
24509
25636
|
return issues;
|
|
24510
25637
|
}
|
|
24511
|
-
const relativePath =
|
|
25638
|
+
const relativePath = path10.relative(projectRoot, file2.filePath).replace(/\\/g, "/");
|
|
24512
25639
|
const lastModified = await getFileLastModified(projectRoot, relativePath);
|
|
24513
25640
|
if (!lastModified || isNaN(lastModified.getTime())) {
|
|
24514
25641
|
return issues;
|
|
@@ -24699,9 +25826,9 @@ var init_tokens2 = __esm({
|
|
|
24699
25826
|
});
|
|
24700
25827
|
|
|
24701
25828
|
// src/core/checks/tier-tokens.ts
|
|
24702
|
-
import * as
|
|
25829
|
+
import * as fs9 from "node:fs";
|
|
24703
25830
|
import * as os2 from "node:os";
|
|
24704
|
-
import * as
|
|
25831
|
+
import * as path11 from "node:path";
|
|
24705
25832
|
function hasFrontmatterList(content, field) {
|
|
24706
25833
|
const lines = content.split("\n");
|
|
24707
25834
|
if (lines[0]?.trim() !== "---") return false;
|
|
@@ -24789,7 +25916,7 @@ function findInviolableCommand(line) {
|
|
|
24789
25916
|
function fingerprintFiles(paths) {
|
|
24790
25917
|
return paths.map((p2) => {
|
|
24791
25918
|
try {
|
|
24792
|
-
const st2 =
|
|
25919
|
+
const st2 = fs9.statSync(p2);
|
|
24793
25920
|
return `${st2.mtimeMs}:${st2.size}`;
|
|
24794
25921
|
} catch {
|
|
24795
25922
|
return "absent";
|
|
@@ -24798,11 +25925,11 @@ function fingerprintFiles(paths) {
|
|
|
24798
25925
|
}
|
|
24799
25926
|
function loadSettingsSources(projectRoot, includeGlobal) {
|
|
24800
25927
|
const candidates = [
|
|
24801
|
-
|
|
24802
|
-
|
|
25928
|
+
path11.join(projectRoot, ".claude", "settings.json"),
|
|
25929
|
+
path11.join(projectRoot, ".claude", "settings.local.json")
|
|
24803
25930
|
];
|
|
24804
25931
|
if (includeGlobal) {
|
|
24805
|
-
candidates.push(
|
|
25932
|
+
candidates.push(path11.join(os2.homedir(), ".claude", "settings.json"));
|
|
24806
25933
|
}
|
|
24807
25934
|
const fingerprint = fingerprintFiles(candidates);
|
|
24808
25935
|
if (settingsCache?.root === projectRoot && settingsCache.includeGlobal === includeGlobal && settingsCache.fingerprint === fingerprint) {
|
|
@@ -24812,7 +25939,7 @@ function loadSettingsSources(projectRoot, includeGlobal) {
|
|
|
24812
25939
|
for (const p2 of candidates) {
|
|
24813
25940
|
let content;
|
|
24814
25941
|
try {
|
|
24815
|
-
content = stripBom(
|
|
25942
|
+
content = stripBom(fs9.readFileSync(p2, "utf-8"));
|
|
24816
25943
|
} catch {
|
|
24817
25944
|
continue;
|
|
24818
25945
|
}
|
|
@@ -24990,7 +26117,7 @@ var init_similarity = __esm({
|
|
|
24990
26117
|
});
|
|
24991
26118
|
|
|
24992
26119
|
// src/core/checks/redundancy.ts
|
|
24993
|
-
import * as
|
|
26120
|
+
import * as path12 from "node:path";
|
|
24994
26121
|
function compilePatterns(allDeps) {
|
|
24995
26122
|
const compiled = [];
|
|
24996
26123
|
for (const [pkg, mentions] of Object.entries(PACKAGE_TECH_MAP)) {
|
|
@@ -25070,8 +26197,8 @@ async function checkRedundancy(file2, projectRoot) {
|
|
|
25070
26197
|
);
|
|
25071
26198
|
if (dirMatch) {
|
|
25072
26199
|
const dir = dirMatch[1].replace(/[`"]/g, "");
|
|
25073
|
-
const baseDir = dir.startsWith("./") || dir.startsWith("../") ?
|
|
25074
|
-
const fullPath =
|
|
26200
|
+
const baseDir = dir.startsWith("./") || dir.startsWith("../") ? path12.dirname(file2.filePath) : projectRoot;
|
|
26201
|
+
const fullPath = path12.resolve(baseDir, dir);
|
|
25075
26202
|
if (isDirectory(fullPath)) {
|
|
25076
26203
|
issues.push({
|
|
25077
26204
|
severity: "info",
|
|
@@ -26099,8 +27226,8 @@ var init_security = __esm({
|
|
|
26099
27226
|
});
|
|
26100
27227
|
|
|
26101
27228
|
// src/core/checks/mcp/commands.ts
|
|
26102
|
-
import * as
|
|
26103
|
-
import * as
|
|
27229
|
+
import * as fs10 from "node:fs";
|
|
27230
|
+
import * as path13 from "node:path";
|
|
26104
27231
|
async function checkMcpCommands(config2, projectRoot) {
|
|
26105
27232
|
const issues = [];
|
|
26106
27233
|
if (config2.parseErrors.length > 0) return issues;
|
|
@@ -26117,7 +27244,7 @@ async function checkMcpCommands(config2, projectRoot) {
|
|
|
26117
27244
|
});
|
|
26118
27245
|
}
|
|
26119
27246
|
if (config2.scope === "project" && LOCAL_PATH_PATTERN.test(server2.command)) {
|
|
26120
|
-
const resolved =
|
|
27247
|
+
const resolved = path13.resolve(projectRoot, server2.command);
|
|
26121
27248
|
if (!fileExistsSafe(resolved)) {
|
|
26122
27249
|
issues.push({
|
|
26123
27250
|
severity: "warning",
|
|
@@ -26132,8 +27259,8 @@ async function checkMcpCommands(config2, projectRoot) {
|
|
|
26132
27259
|
for (const arg of server2.args) {
|
|
26133
27260
|
if (URL_PREFIX.test(arg)) continue;
|
|
26134
27261
|
if (!LOCAL_PATH_PATTERN.test(arg) && !FILE_PATH_PATTERN.test(arg)) continue;
|
|
26135
|
-
if (config2.scope !== "project" && !
|
|
26136
|
-
const resolved =
|
|
27262
|
+
if (config2.scope !== "project" && !path13.isAbsolute(arg)) continue;
|
|
27263
|
+
const resolved = path13.resolve(projectRoot, arg);
|
|
26137
27264
|
if (!fileExistsSafe(resolved)) {
|
|
26138
27265
|
issues.push({
|
|
26139
27266
|
severity: "warning",
|
|
@@ -26150,7 +27277,7 @@ async function checkMcpCommands(config2, projectRoot) {
|
|
|
26150
27277
|
}
|
|
26151
27278
|
function fileExistsSafe(filePath) {
|
|
26152
27279
|
try {
|
|
26153
|
-
|
|
27280
|
+
fs10.accessSync(filePath);
|
|
26154
27281
|
return true;
|
|
26155
27282
|
} catch {
|
|
26156
27283
|
return false;
|
|
@@ -26581,16 +27708,16 @@ var init_redundancy2 = __esm({
|
|
|
26581
27708
|
|
|
26582
27709
|
// src/core/session-parser.ts
|
|
26583
27710
|
import { readFile } from "node:fs/promises";
|
|
26584
|
-
import { readFileSync as
|
|
26585
|
-
import { dirname as
|
|
27711
|
+
import { readFileSync as readFileSync7 } from "node:fs";
|
|
27712
|
+
import { dirname as dirname7, resolve as resolve10 } from "node:path";
|
|
26586
27713
|
import { fileURLToPath } from "node:url";
|
|
26587
27714
|
function loadWebFirstSegments() {
|
|
26588
27715
|
if (typeof define_WEB_FIRST_SEGMENTS_default !== "undefined") {
|
|
26589
27716
|
return new Set(define_WEB_FIRST_SEGMENTS_default);
|
|
26590
27717
|
}
|
|
26591
|
-
const __dir =
|
|
26592
|
-
const fixturePath =
|
|
26593
|
-
const raw = JSON.parse(
|
|
27718
|
+
const __dir = dirname7(fileURLToPath(import.meta.url));
|
|
27719
|
+
const fixturePath = resolve10(__dir, "../../tests/fixtures/web-first-segments.json");
|
|
27720
|
+
const raw = JSON.parse(readFileSync7(fixturePath, "utf-8"));
|
|
26594
27721
|
const list = Array.isArray(raw) ? raw : raw.segments;
|
|
26595
27722
|
return new Set(list);
|
|
26596
27723
|
}
|
|
@@ -26712,14 +27839,14 @@ import { readdir, stat } from "node:fs/promises";
|
|
|
26712
27839
|
import { createReadStream } from "node:fs";
|
|
26713
27840
|
import { homedir as homedir3 } from "node:os";
|
|
26714
27841
|
import { createInterface } from "node:readline";
|
|
26715
|
-
import { dirname as
|
|
26716
|
-
import { existsSync } from "node:fs";
|
|
27842
|
+
import { dirname as dirname8, join as join7, resolve as resolve11 } from "node:path";
|
|
27843
|
+
import { existsSync as existsSync4 } from "node:fs";
|
|
26717
27844
|
function detectProviders() {
|
|
26718
27845
|
if (!home) return [];
|
|
26719
|
-
return AGENT_DIRS.filter((a) =>
|
|
27846
|
+
return AGENT_DIRS.filter((a) => existsSync4(a.dir)).map((a) => a.provider);
|
|
26720
27847
|
}
|
|
26721
27848
|
async function parseJsonlFiltered(filePath, filter) {
|
|
26722
|
-
if (!
|
|
27849
|
+
if (!existsSync4(filePath)) return [];
|
|
26723
27850
|
const results = [];
|
|
26724
27851
|
const rl = createInterface({
|
|
26725
27852
|
input: createReadStream(filePath, { encoding: "utf-8" }),
|
|
@@ -26766,7 +27893,7 @@ async function readJsonlHistory(opts) {
|
|
|
26766
27893
|
}
|
|
26767
27894
|
function agentHistoryPath(provider) {
|
|
26768
27895
|
const agent = AGENT_DIRS.find((a) => a.provider === provider);
|
|
26769
|
-
return agent?.historyFile ?
|
|
27896
|
+
return agent?.historyFile ? join7(agent.dir, agent.historyFile) : "";
|
|
26770
27897
|
}
|
|
26771
27898
|
async function readClaudeHistory() {
|
|
26772
27899
|
return readJsonlHistory({
|
|
@@ -26787,18 +27914,18 @@ async function readCodexHistory() {
|
|
|
26787
27914
|
});
|
|
26788
27915
|
}
|
|
26789
27916
|
async function readClaudeMemories() {
|
|
26790
|
-
const projectsDir =
|
|
26791
|
-
if (!
|
|
27917
|
+
const projectsDir = join7(home, ".claude", "projects");
|
|
27918
|
+
if (!existsSync4(projectsDir)) return [];
|
|
26792
27919
|
const memories = [];
|
|
26793
27920
|
const projectDirs = await readdir(projectsDir).catch(() => []);
|
|
26794
27921
|
for (const projDir of projectDirs) {
|
|
26795
|
-
const memoryDir =
|
|
26796
|
-
if (!
|
|
27922
|
+
const memoryDir = join7(projectsDir, projDir, "memory");
|
|
27923
|
+
if (!existsSync4(memoryDir)) continue;
|
|
26797
27924
|
const files = await readdir(memoryDir).catch(() => []);
|
|
26798
27925
|
for (const file2 of files) {
|
|
26799
27926
|
if (!file2.endsWith(".md") || file2 === "MEMORY.md") continue;
|
|
26800
27927
|
try {
|
|
26801
|
-
const entry = await parseMemoryFile(
|
|
27928
|
+
const entry = await parseMemoryFile(join7(memoryDir, file2), projDir);
|
|
26802
27929
|
memories.push(entry);
|
|
26803
27930
|
} catch {
|
|
26804
27931
|
}
|
|
@@ -26808,7 +27935,7 @@ async function readClaudeMemories() {
|
|
|
26808
27935
|
}
|
|
26809
27936
|
function detectAiderInSiblings(siblings) {
|
|
26810
27937
|
for (const sib of siblings) {
|
|
26811
|
-
if (
|
|
27938
|
+
if (existsSync4(join7(sib.path, ".aider.chat.history.md"))) {
|
|
26812
27939
|
return "aider";
|
|
26813
27940
|
}
|
|
26814
27941
|
}
|
|
@@ -26827,7 +27954,7 @@ async function mapWithConcurrency(items, limit, fn) {
|
|
|
26827
27954
|
return results;
|
|
26828
27955
|
}
|
|
26829
27956
|
async function detectSiblings(projectRoot) {
|
|
26830
|
-
const parentDir =
|
|
27957
|
+
const parentDir = dirname8(resolve11(projectRoot));
|
|
26831
27958
|
let entries;
|
|
26832
27959
|
try {
|
|
26833
27960
|
entries = await readdir(parentDir);
|
|
@@ -26837,16 +27964,16 @@ async function detectSiblings(projectRoot) {
|
|
|
26837
27964
|
const candidates = [];
|
|
26838
27965
|
for (const entry of entries) {
|
|
26839
27966
|
if (entry.startsWith(".") || entry === "node_modules") continue;
|
|
26840
|
-
const fullPath =
|
|
26841
|
-
const entryPath =
|
|
26842
|
-
if (entryPath ===
|
|
27967
|
+
const fullPath = join7(parentDir, entry);
|
|
27968
|
+
const entryPath = resolve11(fullPath);
|
|
27969
|
+
if (entryPath === resolve11(projectRoot)) continue;
|
|
26843
27970
|
try {
|
|
26844
27971
|
const s = await stat(fullPath);
|
|
26845
27972
|
if (!s.isDirectory()) continue;
|
|
26846
27973
|
} catch {
|
|
26847
27974
|
continue;
|
|
26848
27975
|
}
|
|
26849
|
-
const isProject =
|
|
27976
|
+
const isProject = existsSync4(join7(fullPath, ".git")) || existsSync4(join7(fullPath, "package.json")) || existsSync4(join7(fullPath, "Cargo.toml")) || existsSync4(join7(fullPath, "go.mod")) || existsSync4(join7(fullPath, "pyproject.toml"));
|
|
26850
27977
|
if (!isProject) continue;
|
|
26851
27978
|
candidates.push({ fullPath, entryPath, name: entry });
|
|
26852
27979
|
}
|
|
@@ -26874,7 +28001,7 @@ async function detectSiblings(projectRoot) {
|
|
|
26874
28001
|
}
|
|
26875
28002
|
async function resolveSibling(c3) {
|
|
26876
28003
|
const sibling = { path: c3.entryPath.replace(/\\/g, "/"), name: c3.name };
|
|
26877
|
-
if (!
|
|
28004
|
+
if (!existsSync4(join7(c3.fullPath, ".git"))) return sibling;
|
|
26878
28005
|
try {
|
|
26879
28006
|
const git = simpleGit(c3.fullPath);
|
|
26880
28007
|
const remotes = await git.getRemotes(true);
|
|
@@ -26906,7 +28033,7 @@ async function scanSessionData(projectRoot) {
|
|
|
26906
28033
|
history: histories,
|
|
26907
28034
|
memories,
|
|
26908
28035
|
siblings,
|
|
26909
|
-
currentProject:
|
|
28036
|
+
currentProject: resolve11(projectRoot).replace(/\\/g, "/"),
|
|
26910
28037
|
providers
|
|
26911
28038
|
};
|
|
26912
28039
|
}
|
|
@@ -26920,12 +28047,12 @@ var init_session_scanner = __esm({
|
|
|
26920
28047
|
init_fs();
|
|
26921
28048
|
home = process.env.HOME || process.env.USERPROFILE || homedir3();
|
|
26922
28049
|
AGENT_DIRS = [
|
|
26923
|
-
{ provider: "claude-code", dir:
|
|
26924
|
-
{ provider: "codex-cli", dir:
|
|
26925
|
-
{ provider: "vibe-cli", dir:
|
|
28050
|
+
{ provider: "claude-code", dir: join7(home, ".claude"), historyFile: "history.jsonl" },
|
|
28051
|
+
{ provider: "codex-cli", dir: join7(home, ".codex"), historyFile: "history.jsonl" },
|
|
28052
|
+
{ provider: "vibe-cli", dir: join7(home, ".vibe") },
|
|
26926
28053
|
{
|
|
26927
28054
|
provider: "amazon-q",
|
|
26928
|
-
dir:
|
|
28055
|
+
dir: join7(home, ".aws", "amazonq")
|
|
26929
28056
|
},
|
|
26930
28057
|
{
|
|
26931
28058
|
provider: "goose",
|
|
@@ -26934,12 +28061,12 @@ var init_session_scanner = __esm({
|
|
|
26934
28061
|
// which the HOME guard in `detectProviders` does NOT catch (HOME/USERPROFILE
|
|
26935
28062
|
// may still be set). Leave the dir empty so `existsSync('')` is always false
|
|
26936
28063
|
// and we never match a cwd-relative `Block/goose`, mirroring the HOME-guard intent.
|
|
26937
|
-
dir: process.platform === "win32" ? process.env.APPDATA ?
|
|
28064
|
+
dir: process.platform === "win32" ? process.env.APPDATA ? join7(process.env.APPDATA, "Block", "goose") : "" : join7(home, ".config", "goose")
|
|
26938
28065
|
},
|
|
26939
|
-
{ provider: "continue", dir:
|
|
28066
|
+
{ provider: "continue", dir: join7(home, ".continue") },
|
|
26940
28067
|
{
|
|
26941
28068
|
provider: "windsurf",
|
|
26942
|
-
dir:
|
|
28069
|
+
dir: join7(home, ".windsurf")
|
|
26943
28070
|
}
|
|
26944
28071
|
];
|
|
26945
28072
|
SIBLING_RESOLVE_CONCURRENCY = 8;
|
|
@@ -26947,9 +28074,9 @@ var init_session_scanner = __esm({
|
|
|
26947
28074
|
});
|
|
26948
28075
|
|
|
26949
28076
|
// src/core/checks/session/missing-secret.ts
|
|
26950
|
-
import { resolve as
|
|
28077
|
+
import { resolve as resolve12, basename as basename3 } from "node:path";
|
|
26951
28078
|
function normalizePath2(p2) {
|
|
26952
|
-
return
|
|
28079
|
+
return resolve12(p2).replace(/\\/g, "/").toLowerCase();
|
|
26953
28080
|
}
|
|
26954
28081
|
function extractSecretName(display) {
|
|
26955
28082
|
const prefixMatch = display.match(SECRET_SET_PREFIX);
|
|
@@ -26962,9 +28089,9 @@ function extractSecretName(display) {
|
|
|
26962
28089
|
if (VALUE_FLAGS.has(tok) && !tok.includes("=")) {
|
|
26963
28090
|
i2++;
|
|
26964
28091
|
const val = tokens[i2];
|
|
26965
|
-
const
|
|
26966
|
-
if (
|
|
26967
|
-
while (i2 + 1 < tokens.length && !tokens[i2].endsWith(
|
|
28092
|
+
const quote2 = val && (val[0] === '"' || val[0] === "'") ? val[0] : void 0;
|
|
28093
|
+
if (quote2 && !(val.length > 1 && val.endsWith(quote2))) {
|
|
28094
|
+
while (i2 + 1 < tokens.length && !tokens[i2].endsWith(quote2)) i2++;
|
|
26968
28095
|
}
|
|
26969
28096
|
}
|
|
26970
28097
|
}
|
|
@@ -27067,8 +28194,8 @@ var init_missing_secret = __esm({
|
|
|
27067
28194
|
|
|
27068
28195
|
// src/core/checks/session/diverged-file.ts
|
|
27069
28196
|
import { readFile as readFile2, stat as stat2 } from "node:fs/promises";
|
|
27070
|
-
import { join as
|
|
27071
|
-
import { existsSync as
|
|
28197
|
+
import { join as join8, resolve as resolve13 } from "node:path";
|
|
28198
|
+
import { existsSync as existsSync5 } from "node:fs";
|
|
27072
28199
|
async function loadLineSet(absPath) {
|
|
27073
28200
|
let mtimeMs;
|
|
27074
28201
|
let size;
|
|
@@ -27102,14 +28229,14 @@ async function loadLineSet(absPath) {
|
|
|
27102
28229
|
async function checkDivergedFile(ctx) {
|
|
27103
28230
|
const issues = [];
|
|
27104
28231
|
for (const fileName of CANONICAL_FILES) {
|
|
27105
|
-
const currentPath =
|
|
27106
|
-
if (!
|
|
28232
|
+
const currentPath = join8(ctx.currentProject, fileName);
|
|
28233
|
+
if (!existsSync5(currentPath)) continue;
|
|
27107
28234
|
const currentLineSet = await loadLineSet(currentPath);
|
|
27108
28235
|
if (!currentLineSet) continue;
|
|
27109
28236
|
const diverged = [];
|
|
27110
28237
|
for (const sib of ctx.siblings) {
|
|
27111
|
-
const sibPath =
|
|
27112
|
-
if (!
|
|
28238
|
+
const sibPath = join8(sib.path, fileName);
|
|
28239
|
+
if (!existsSync5(sibPath)) continue;
|
|
27113
28240
|
const sibLineSet = await loadLineSet(sibPath);
|
|
27114
28241
|
if (!sibLineSet) continue;
|
|
27115
28242
|
const overlap = jaccardSimilarityFromSets(currentLineSet, sibLineSet, {
|
|
@@ -27119,7 +28246,7 @@ async function checkDivergedFile(ctx) {
|
|
|
27119
28246
|
diverged.push({
|
|
27120
28247
|
sibling: sib.name,
|
|
27121
28248
|
overlap: Math.round(overlap * 100),
|
|
27122
|
-
path:
|
|
28249
|
+
path: resolve13(sibPath)
|
|
27123
28250
|
});
|
|
27124
28251
|
}
|
|
27125
28252
|
}
|
|
@@ -27134,7 +28261,7 @@ async function checkDivergedFile(ctx) {
|
|
|
27134
28261
|
line: 0,
|
|
27135
28262
|
message: `${fileName} has diverged from sibling repos: ${details}`,
|
|
27136
28263
|
suggestion: `Compare with sibling versions to identify unintentional drift`,
|
|
27137
|
-
detail: `File: ${
|
|
28264
|
+
detail: `File: ${resolve13(currentPath)}
|
|
27138
28265
|
Diverged siblings:
|
|
27139
28266
|
${sibPaths}`
|
|
27140
28267
|
});
|
|
@@ -27167,14 +28294,14 @@ var init_diverged_file = __esm({
|
|
|
27167
28294
|
|
|
27168
28295
|
// src/core/checks/session/missing-workflow.ts
|
|
27169
28296
|
import { readdir as readdir2 } from "node:fs/promises";
|
|
27170
|
-
import { join as
|
|
27171
|
-
import { existsSync as
|
|
28297
|
+
import { join as join9 } from "node:path";
|
|
28298
|
+
import { existsSync as existsSync6 } from "node:fs";
|
|
27172
28299
|
async function checkMissingWorkflow(ctx) {
|
|
27173
28300
|
const issues = [];
|
|
27174
|
-
const currentWorkflowDir =
|
|
27175
|
-
if (!
|
|
28301
|
+
const currentWorkflowDir = join9(ctx.currentProject, ".github", "workflows");
|
|
28302
|
+
if (!existsSync6(join9(ctx.currentProject, ".github"))) return issues;
|
|
27176
28303
|
const currentWorkflows = /* @__PURE__ */ new Set();
|
|
27177
|
-
if (
|
|
28304
|
+
if (existsSync6(currentWorkflowDir)) {
|
|
27178
28305
|
try {
|
|
27179
28306
|
const files = await readdir2(currentWorkflowDir);
|
|
27180
28307
|
for (const f of files) {
|
|
@@ -27185,8 +28312,8 @@ async function checkMissingWorkflow(ctx) {
|
|
|
27185
28312
|
}
|
|
27186
28313
|
const workflowMap = /* @__PURE__ */ new Map();
|
|
27187
28314
|
for (const sib of ctx.siblings) {
|
|
27188
|
-
const sibWorkflowDir =
|
|
27189
|
-
if (!
|
|
28315
|
+
const sibWorkflowDir = join9(sib.path, ".github", "workflows");
|
|
28316
|
+
if (!existsSync6(sibWorkflowDir)) continue;
|
|
27190
28317
|
try {
|
|
27191
28318
|
const files = await readdir2(sibWorkflowDir);
|
|
27192
28319
|
for (const f of files) {
|
|
@@ -27222,17 +28349,17 @@ var init_missing_workflow = __esm({
|
|
|
27222
28349
|
});
|
|
27223
28350
|
|
|
27224
28351
|
// src/core/checks/session/stale-memory.ts
|
|
27225
|
-
import { existsSync as
|
|
28352
|
+
import { existsSync as existsSync7 } from "node:fs";
|
|
27226
28353
|
import { homedir as homedir4 } from "node:os";
|
|
27227
|
-
import { resolve as
|
|
28354
|
+
import { resolve as resolve14, isAbsolute as isAbsolute8 } from "node:path";
|
|
27228
28355
|
function resolveRef(ref, projectRoot) {
|
|
27229
28356
|
if (ref.startsWith("~/") || ref === "~") {
|
|
27230
28357
|
const home2 = process.env.HOME || process.env.USERPROFILE || homedir4();
|
|
27231
28358
|
if (!home2) return null;
|
|
27232
|
-
return ref === "~" ? home2 :
|
|
28359
|
+
return ref === "~" ? home2 : resolve14(home2, ref.slice(2));
|
|
27233
28360
|
}
|
|
27234
|
-
if (
|
|
27235
|
-
return
|
|
28361
|
+
if (isAbsolute8(ref)) return ref;
|
|
28362
|
+
return resolve14(projectRoot, ref);
|
|
27236
28363
|
}
|
|
27237
28364
|
async function checkStaleMemory(ctx) {
|
|
27238
28365
|
const issues = [];
|
|
@@ -27244,7 +28371,7 @@ async function checkStaleMemory(ctx) {
|
|
|
27244
28371
|
for (const ref of mem.referencedPaths) {
|
|
27245
28372
|
const fullPath = resolveRef(ref, ctx.currentProject);
|
|
27246
28373
|
if (!fullPath) continue;
|
|
27247
|
-
if (!
|
|
28374
|
+
if (!existsSync7(fullPath)) {
|
|
27248
28375
|
brokenPaths.push(ref);
|
|
27249
28376
|
}
|
|
27250
28377
|
}
|
|
@@ -27329,9 +28456,9 @@ var init_duplicate_memory = __esm({
|
|
|
27329
28456
|
});
|
|
27330
28457
|
|
|
27331
28458
|
// src/core/checks/session/loop-detection.ts
|
|
27332
|
-
import { resolve as
|
|
28459
|
+
import { resolve as resolve15 } from "node:path";
|
|
27333
28460
|
function normalizeProject(p2) {
|
|
27334
|
-
return
|
|
28461
|
+
return resolve15(p2).replace(/\\/g, "/");
|
|
27335
28462
|
}
|
|
27336
28463
|
function findConsecutiveRepeats(displays) {
|
|
27337
28464
|
const results = [];
|
|
@@ -27484,14 +28611,14 @@ var init_loop_detection = __esm({
|
|
|
27484
28611
|
// src/core/checks/session/memory-index-overflow.ts
|
|
27485
28612
|
import { readFile as readFile3 } from "node:fs/promises";
|
|
27486
28613
|
import { homedir as homedir5 } from "node:os";
|
|
27487
|
-
import { join as
|
|
28614
|
+
import { join as join10 } from "node:path";
|
|
27488
28615
|
async function checkMemoryIndexOverflow(ctx) {
|
|
27489
28616
|
const home2 = process.env.HOME || process.env.USERPROFILE || homedir5();
|
|
27490
28617
|
if (!home2) return [];
|
|
27491
28618
|
let content = "";
|
|
27492
28619
|
let memoryFile = "";
|
|
27493
28620
|
for (const encoded of projectDirCandidates(ctx.currentProject)) {
|
|
27494
|
-
const candidate =
|
|
28621
|
+
const candidate = join10(home2, ".claude", "projects", encoded, "memory", "MEMORY.md");
|
|
27495
28622
|
try {
|
|
27496
28623
|
content = stripBom(await readFile3(candidate, "utf-8"));
|
|
27497
28624
|
} catch {
|
|
@@ -27546,10 +28673,10 @@ var init_memory_index_overflow = __esm({
|
|
|
27546
28673
|
});
|
|
27547
28674
|
|
|
27548
28675
|
// src/core/transcript.ts
|
|
27549
|
-
import { createReadStream as createReadStream2, existsSync as
|
|
28676
|
+
import { createReadStream as createReadStream2, existsSync as existsSync8, statSync as statSync7 } from "node:fs";
|
|
27550
28677
|
import { readdir as readdir3 } from "node:fs/promises";
|
|
27551
28678
|
import { homedir as homedir6 } from "node:os";
|
|
27552
|
-
import { join as
|
|
28679
|
+
import { join as join11 } from "node:path";
|
|
27553
28680
|
import { createInterface as createInterface2 } from "node:readline";
|
|
27554
28681
|
function emptyRead() {
|
|
27555
28682
|
return {
|
|
@@ -27589,8 +28716,8 @@ function clearTranscriptCache() {
|
|
|
27589
28716
|
cache.clear();
|
|
27590
28717
|
}
|
|
27591
28718
|
function candidateDirs(project, home2) {
|
|
27592
|
-
const root =
|
|
27593
|
-
return projectDirCandidates(project).map((n7) =>
|
|
28719
|
+
const root = join11(home2, ".claude", "projects");
|
|
28720
|
+
return projectDirCandidates(project).map((n7) => join11(root, n7)).filter((d) => existsSync8(d));
|
|
27594
28721
|
}
|
|
27595
28722
|
async function readUncached(project, home2) {
|
|
27596
28723
|
if (!home2 || !project) return emptyRead();
|
|
@@ -27603,9 +28730,9 @@ async function readUncached(project, home2) {
|
|
|
27603
28730
|
}
|
|
27604
28731
|
}
|
|
27605
28732
|
const files = names.filter(({ name }) => name.endsWith(".jsonl")).map(({ dir, name }) => {
|
|
27606
|
-
const p2 =
|
|
28733
|
+
const p2 = join11(dir, name);
|
|
27607
28734
|
try {
|
|
27608
|
-
return { p: p2, mtime:
|
|
28735
|
+
return { p: p2, mtime: statSync7(p2).mtimeMs };
|
|
27609
28736
|
} catch {
|
|
27610
28737
|
return null;
|
|
27611
28738
|
}
|
|
@@ -27685,13 +28812,13 @@ function turnOf(rec, message, st2, sessionId) {
|
|
|
27685
28812
|
function isSet(v2) {
|
|
27686
28813
|
return v2 !== void 0 && v2 !== null && v2 !== "";
|
|
27687
28814
|
}
|
|
27688
|
-
function readResultLines(rec,
|
|
28815
|
+
function readResultLines(rec, path23) {
|
|
27689
28816
|
const result = rec.toolUseResult;
|
|
27690
28817
|
if (!result || typeof result !== "object") return void 0;
|
|
27691
28818
|
const file2 = result.file;
|
|
27692
28819
|
if (!file2 || typeof file2 !== "object") return void 0;
|
|
27693
28820
|
const { filePath, numLines } = file2;
|
|
27694
|
-
if (filePath !==
|
|
28821
|
+
if (filePath !== path23) return void 0;
|
|
27695
28822
|
return typeof numLines === "number" ? numLines : void 0;
|
|
27696
28823
|
}
|
|
27697
28824
|
function collect(rec, st2) {
|
|
@@ -27877,14 +29004,7 @@ var init_shared_temp_path = __esm({
|
|
|
27877
29004
|
"use strict";
|
|
27878
29005
|
init_define_WEB_FIRST_SEGMENTS();
|
|
27879
29006
|
init_transcript();
|
|
27880
|
-
TEMP_ROOTS = [
|
|
27881
|
-
"/tmp/",
|
|
27882
|
-
"/var/tmp/",
|
|
27883
|
-
"$TMPDIR/",
|
|
27884
|
-
"${TMPDIR}/",
|
|
27885
|
-
"%TEMP%\\",
|
|
27886
|
-
"%TMP%\\"
|
|
27887
|
-
];
|
|
29007
|
+
TEMP_ROOTS = ["/tmp/", "/var/tmp/", "$TMPDIR/", "${TMPDIR}/", "%TEMP%\\", "%TMP%\\"];
|
|
27888
29008
|
SCOPED_MARKERS = [
|
|
27889
29009
|
"$$",
|
|
27890
29010
|
"$pid",
|
|
@@ -28164,7 +29284,7 @@ var init_unresolvable_sha = __esm({
|
|
|
28164
29284
|
});
|
|
28165
29285
|
|
|
28166
29286
|
// src/core/checks/session/large-read.ts
|
|
28167
|
-
import { isAbsolute as
|
|
29287
|
+
import { isAbsolute as isAbsolute9, relative as relative9 } from "node:path";
|
|
28168
29288
|
function qualifies(ev) {
|
|
28169
29289
|
if (ev.kind !== "file-read" || ev.partial || ev.isError) return false;
|
|
28170
29290
|
return (ev.outputTokens ?? 0) >= LARGE_READ_TOKENS;
|
|
@@ -28172,13 +29292,13 @@ function qualifies(ev) {
|
|
|
28172
29292
|
function fmt(n7) {
|
|
28173
29293
|
return n7.toLocaleString("en-US");
|
|
28174
29294
|
}
|
|
28175
|
-
function displayPath(
|
|
28176
|
-
const rel =
|
|
28177
|
-
if (rel && !rel.startsWith("..") && !
|
|
28178
|
-
return
|
|
29295
|
+
function displayPath(path23, project) {
|
|
29296
|
+
const rel = relative9(project, path23);
|
|
29297
|
+
if (rel && !rel.startsWith("..") && !isAbsolute9(rel)) return rel.replace(/\\/g, "/");
|
|
29298
|
+
return path23;
|
|
28179
29299
|
}
|
|
28180
|
-
function fileKey(
|
|
28181
|
-
const slashed =
|
|
29300
|
+
function fileKey(path23) {
|
|
29301
|
+
const slashed = path23.replace(/\\/g, "/");
|
|
28182
29302
|
return process.platform === "win32" ? slashed.toLowerCase() : slashed;
|
|
28183
29303
|
}
|
|
28184
29304
|
async function checkLargeRead(ctx) {
|
|
@@ -28252,11 +29372,11 @@ var init_large_read = __esm({
|
|
|
28252
29372
|
|
|
28253
29373
|
// src/core/checks/ci-coverage.ts
|
|
28254
29374
|
import { readdir as readdir4, readFile as readFile4 } from "node:fs/promises";
|
|
28255
|
-
import { join as
|
|
28256
|
-
import { existsSync as
|
|
29375
|
+
import { join as join12 } from "node:path";
|
|
29376
|
+
import { existsSync as existsSync9 } from "node:fs";
|
|
28257
29377
|
async function findReleaseWorkflows(projectRoot) {
|
|
28258
|
-
const workflowDir =
|
|
28259
|
-
if (!
|
|
29378
|
+
const workflowDir = join12(projectRoot, ".github", "workflows");
|
|
29379
|
+
if (!existsSync9(workflowDir)) return [];
|
|
28260
29380
|
let files;
|
|
28261
29381
|
try {
|
|
28262
29382
|
files = await readdir4(workflowDir);
|
|
@@ -28271,7 +29391,7 @@ async function findReleaseWorkflows(projectRoot) {
|
|
|
28271
29391
|
continue;
|
|
28272
29392
|
}
|
|
28273
29393
|
try {
|
|
28274
|
-
const content = stripBom(await readFile4(
|
|
29394
|
+
const content = stripBom(await readFile4(join12(workflowDir, f), "utf-8"));
|
|
28275
29395
|
const nameMatch = content.match(/^\s*name:\s*(.+?)\s*$/m);
|
|
28276
29396
|
if (nameMatch) {
|
|
28277
29397
|
const name = nameMatch[1].replace(/^(['"])(.*)\1$/, "$2");
|
|
@@ -28331,11 +29451,11 @@ var init_ci_coverage = __esm({
|
|
|
28331
29451
|
|
|
28332
29452
|
// src/core/checks/ci-secrets.ts
|
|
28333
29453
|
import { readdir as readdir5, readFile as readFile5 } from "node:fs/promises";
|
|
28334
|
-
import { join as
|
|
28335
|
-
import { existsSync as
|
|
29454
|
+
import { join as join13 } from "node:path";
|
|
29455
|
+
import { existsSync as existsSync10 } from "node:fs";
|
|
28336
29456
|
async function findSecretUsages(projectRoot) {
|
|
28337
|
-
const workflowDir =
|
|
28338
|
-
if (!
|
|
29457
|
+
const workflowDir = join13(projectRoot, ".github", "workflows");
|
|
29458
|
+
if (!existsSync10(workflowDir)) return [];
|
|
28339
29459
|
let files;
|
|
28340
29460
|
try {
|
|
28341
29461
|
files = await readdir5(workflowDir);
|
|
@@ -28347,7 +29467,7 @@ async function findSecretUsages(projectRoot) {
|
|
|
28347
29467
|
if (!(f.endsWith(".yml") || f.endsWith(".yaml"))) continue;
|
|
28348
29468
|
let content;
|
|
28349
29469
|
try {
|
|
28350
|
-
content = stripBom(await readFile5(
|
|
29470
|
+
content = stripBom(await readFile5(join13(workflowDir, f), "utf-8"));
|
|
28351
29471
|
} catch {
|
|
28352
29472
|
continue;
|
|
28353
29473
|
}
|
|
@@ -28661,26 +29781,26 @@ var init_positions = __esm({
|
|
|
28661
29781
|
});
|
|
28662
29782
|
|
|
28663
29783
|
// src/core/checks/hook-coverage.ts
|
|
28664
|
-
import * as
|
|
29784
|
+
import * as fs11 from "node:fs";
|
|
28665
29785
|
import * as os3 from "node:os";
|
|
28666
|
-
import * as
|
|
29786
|
+
import * as path14 from "node:path";
|
|
28667
29787
|
function loadSettingsSources2(projectRoot, homeDir, includeUserGlobal) {
|
|
28668
29788
|
const home2 = homeDir;
|
|
28669
29789
|
const candidates = [
|
|
28670
29790
|
{
|
|
28671
|
-
filePath:
|
|
28672
|
-
displayPath:
|
|
29791
|
+
filePath: path14.join(projectRoot, ".claude", "settings.json"),
|
|
29792
|
+
displayPath: path14.join(".claude", "settings.json"),
|
|
28673
29793
|
isUserGlobal: false
|
|
28674
29794
|
},
|
|
28675
29795
|
{
|
|
28676
|
-
filePath:
|
|
28677
|
-
displayPath:
|
|
29796
|
+
filePath: path14.join(projectRoot, ".claude", "settings.local.json"),
|
|
29797
|
+
displayPath: path14.join(".claude", "settings.local.json"),
|
|
28678
29798
|
isUserGlobal: false
|
|
28679
29799
|
}
|
|
28680
29800
|
];
|
|
28681
29801
|
if (includeUserGlobal) {
|
|
28682
29802
|
candidates.push({
|
|
28683
|
-
filePath:
|
|
29803
|
+
filePath: path14.join(home2, ".claude", "settings.json"),
|
|
28684
29804
|
displayPath: "~/.claude/settings.json",
|
|
28685
29805
|
isUserGlobal: true
|
|
28686
29806
|
});
|
|
@@ -28689,7 +29809,7 @@ function loadSettingsSources2(projectRoot, homeDir, includeUserGlobal) {
|
|
|
28689
29809
|
for (const c3 of candidates) {
|
|
28690
29810
|
let content;
|
|
28691
29811
|
try {
|
|
28692
|
-
content = stripBom(
|
|
29812
|
+
content = stripBom(fs11.readFileSync(c3.filePath, "utf-8"));
|
|
28693
29813
|
} catch {
|
|
28694
29814
|
continue;
|
|
28695
29815
|
}
|
|
@@ -28701,11 +29821,11 @@ function loadSettingsSources2(projectRoot, homeDir, includeUserGlobal) {
|
|
|
28701
29821
|
function expandPath(raw, projectRoot, homeDir, platform) {
|
|
28702
29822
|
let s = raw;
|
|
28703
29823
|
if (s === "~" || s.startsWith("~/") || s.startsWith("~\\")) {
|
|
28704
|
-
s =
|
|
29824
|
+
s = path14.join(homeDir, s.slice(1));
|
|
28705
29825
|
}
|
|
28706
29826
|
const replacements = {
|
|
28707
29827
|
CLAUDE_PROJECT_DIR: projectRoot,
|
|
28708
|
-
CLAUDE_CONFIG_DIR:
|
|
29828
|
+
CLAUDE_CONFIG_DIR: path14.join(homeDir, ".claude"),
|
|
28709
29829
|
HOME: homeDir,
|
|
28710
29830
|
USERPROFILE: homeDir
|
|
28711
29831
|
};
|
|
@@ -28720,7 +29840,7 @@ function expandPath(raw, projectRoot, homeDir, platform) {
|
|
|
28720
29840
|
if (/\$\{?[A-Za-z_]/.test(s)) return null;
|
|
28721
29841
|
if (/%[A-Za-z_][A-Za-z0-9_]*%/.test(s)) return null;
|
|
28722
29842
|
s = translateMsysDrivePath(s, platform);
|
|
28723
|
-
if (!
|
|
29843
|
+
if (!path14.isAbsolute(s)) s = path14.resolve(projectRoot, s);
|
|
28724
29844
|
return s;
|
|
28725
29845
|
}
|
|
28726
29846
|
function looksLikePath(token) {
|
|
@@ -28858,19 +29978,19 @@ var init_hook_coverage = __esm({
|
|
|
28858
29978
|
});
|
|
28859
29979
|
|
|
28860
29980
|
// src/core/skill-scanner.ts
|
|
28861
|
-
import * as
|
|
29981
|
+
import * as fs12 from "node:fs";
|
|
28862
29982
|
import * as os4 from "node:os";
|
|
28863
|
-
import * as
|
|
29983
|
+
import * as path15 from "node:path";
|
|
28864
29984
|
function defaultHome() {
|
|
28865
29985
|
return process.env.HOME || process.env.USERPROFILE || os4.homedir();
|
|
28866
29986
|
}
|
|
28867
29987
|
function scanSkillFiles(homeDir = defaultHome()) {
|
|
28868
29988
|
const files = [];
|
|
28869
29989
|
const orphanedSkillDirs = [];
|
|
28870
|
-
const claudeDir =
|
|
28871
|
-
const skillsRoot =
|
|
29990
|
+
const claudeDir = path15.join(homeDir, ".claude");
|
|
29991
|
+
const skillsRoot = path15.join(claudeDir, "skills");
|
|
28872
29992
|
for (const name of safeReadDir(skillsRoot, "dir")) {
|
|
28873
|
-
const skillMd =
|
|
29993
|
+
const skillMd = path15.join(skillsRoot, name, "SKILL.md");
|
|
28874
29994
|
const content = safeRead(skillMd);
|
|
28875
29995
|
if (content === null) {
|
|
28876
29996
|
orphanedSkillDirs.push({ name, displayPath: `~/.claude/skills/${name}/` });
|
|
@@ -28884,10 +30004,10 @@ function scanSkillFiles(homeDir = defaultHome()) {
|
|
|
28884
30004
|
content
|
|
28885
30005
|
});
|
|
28886
30006
|
}
|
|
28887
|
-
const agentsRoot =
|
|
30007
|
+
const agentsRoot = path15.join(claudeDir, "agents");
|
|
28888
30008
|
for (const fileName of safeReadDir(agentsRoot, "file")) {
|
|
28889
30009
|
if (!fileName.endsWith(".md")) continue;
|
|
28890
|
-
const agentMd =
|
|
30010
|
+
const agentMd = path15.join(agentsRoot, fileName);
|
|
28891
30011
|
const content = safeRead(agentMd);
|
|
28892
30012
|
if (content === null) continue;
|
|
28893
30013
|
files.push({
|
|
@@ -28903,7 +30023,7 @@ function scanSkillFiles(homeDir = defaultHome()) {
|
|
|
28903
30023
|
function safeReadDir(dir, want) {
|
|
28904
30024
|
let entries;
|
|
28905
30025
|
try {
|
|
28906
|
-
entries =
|
|
30026
|
+
entries = fs12.readdirSync(dir, { withFileTypes: true });
|
|
28907
30027
|
} catch {
|
|
28908
30028
|
return [];
|
|
28909
30029
|
}
|
|
@@ -28911,7 +30031,7 @@ function safeReadDir(dir, want) {
|
|
|
28911
30031
|
if (want === "dir" ? e.isDirectory() : e.isFile()) return true;
|
|
28912
30032
|
if (!e.isSymbolicLink()) return false;
|
|
28913
30033
|
try {
|
|
28914
|
-
const target =
|
|
30034
|
+
const target = fs12.statSync(path15.join(dir, e.name));
|
|
28915
30035
|
return want === "dir" ? target.isDirectory() : target.isFile();
|
|
28916
30036
|
} catch {
|
|
28917
30037
|
return false;
|
|
@@ -28920,7 +30040,7 @@ function safeReadDir(dir, want) {
|
|
|
28920
30040
|
}
|
|
28921
30041
|
function safeRead(file2) {
|
|
28922
30042
|
try {
|
|
28923
|
-
return stripBom(
|
|
30043
|
+
return stripBom(fs12.readFileSync(file2, "utf-8"));
|
|
28924
30044
|
} catch {
|
|
28925
30045
|
return null;
|
|
28926
30046
|
}
|
|
@@ -28934,7 +30054,7 @@ var init_skill_scanner = __esm({
|
|
|
28934
30054
|
});
|
|
28935
30055
|
|
|
28936
30056
|
// src/core/checks/skills.ts
|
|
28937
|
-
import * as
|
|
30057
|
+
import * as path16 from "node:path";
|
|
28938
30058
|
function parseFrontmatter3(content) {
|
|
28939
30059
|
const lines = content.split("\n");
|
|
28940
30060
|
if (lines[0]?.trim() !== "---") {
|
|
@@ -29011,7 +30131,7 @@ function checkMissingFrontmatter(file2, fm) {
|
|
|
29011
30131
|
}
|
|
29012
30132
|
function checkBrokenRefs(file2, fmEndLine) {
|
|
29013
30133
|
const issues = [];
|
|
29014
|
-
const skillDir =
|
|
30134
|
+
const skillDir = path16.dirname(file2.filePath);
|
|
29015
30135
|
const lines = file2.content.split("\n");
|
|
29016
30136
|
let inCode = false;
|
|
29017
30137
|
let codeLang = "";
|
|
@@ -29031,7 +30151,7 @@ function checkBrokenRefs(file2, fmEndLine) {
|
|
|
29031
30151
|
if (PATH_SKIP.test(value)) continue;
|
|
29032
30152
|
if (!value.startsWith("./") && !value.startsWith("../")) continue;
|
|
29033
30153
|
while (/[.,;:]$/.test(value)) value = value.slice(0, -1);
|
|
29034
|
-
const resolved =
|
|
30154
|
+
const resolved = path16.resolve(skillDir, value);
|
|
29035
30155
|
if (fileExists(resolved) || isDirectory(resolved)) continue;
|
|
29036
30156
|
issues.push({
|
|
29037
30157
|
severity: "warning",
|
|
@@ -29296,15 +30416,15 @@ var init_types = __esm({
|
|
|
29296
30416
|
});
|
|
29297
30417
|
|
|
29298
30418
|
// src/version.ts
|
|
29299
|
-
import { readFileSync as
|
|
29300
|
-
import { resolve as
|
|
30419
|
+
import { readFileSync as readFileSync10 } from "node:fs";
|
|
30420
|
+
import { resolve as resolve18, dirname as dirname10 } from "node:path";
|
|
29301
30421
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
29302
30422
|
function loadVersion() {
|
|
29303
|
-
if (true) return "0.25.
|
|
30423
|
+
if (true) return "0.25.3";
|
|
29304
30424
|
try {
|
|
29305
|
-
const __dir =
|
|
29306
|
-
const pkgPath =
|
|
29307
|
-
const pkg = JSON.parse(
|
|
30425
|
+
const __dir = dirname10(fileURLToPath2(import.meta.url));
|
|
30426
|
+
const pkgPath = resolve18(__dir, "../package.json");
|
|
30427
|
+
const pkg = JSON.parse(readFileSync10(pkgPath, "utf-8"));
|
|
29308
30428
|
return pkg.version ?? "0.0.0-dev";
|
|
29309
30429
|
} catch {
|
|
29310
30430
|
return "0.0.0-dev";
|
|
@@ -29320,9 +30440,9 @@ var init_version2 = __esm({
|
|
|
29320
30440
|
});
|
|
29321
30441
|
|
|
29322
30442
|
// src/core/audit.ts
|
|
29323
|
-
import * as
|
|
30443
|
+
import * as fs13 from "node:fs";
|
|
29324
30444
|
import * as os5 from "node:os";
|
|
29325
|
-
import * as
|
|
30445
|
+
import * as path17 from "node:path";
|
|
29326
30446
|
function hasMcpChecks(checks) {
|
|
29327
30447
|
return checks.some((c3) => c3.startsWith("mcp-"));
|
|
29328
30448
|
}
|
|
@@ -29359,7 +30479,7 @@ async function runAudit(projectRoot, activeChecks, options = {}) {
|
|
|
29359
30479
|
const absPath = discoveredFile.absolutePath;
|
|
29360
30480
|
let stat3 = null;
|
|
29361
30481
|
try {
|
|
29362
|
-
const s =
|
|
30482
|
+
const s = fs13.statSync(absPath);
|
|
29363
30483
|
stat3 = { mtimeMs: s.mtimeMs, size: s.size };
|
|
29364
30484
|
} catch {
|
|
29365
30485
|
}
|
|
@@ -29686,12 +30806,12 @@ async function runAudit(projectRoot, activeChecks, options = {}) {
|
|
|
29686
30806
|
return result;
|
|
29687
30807
|
}
|
|
29688
30808
|
async function runAuditOnContent(filePath, content, projectRoot, options = {}) {
|
|
29689
|
-
const tmpDir =
|
|
29690
|
-
const ext =
|
|
29691
|
-
const tmpFile =
|
|
30809
|
+
const tmpDir = fs13.mkdtempSync(path17.join(os5.tmpdir(), "ctxlint-lsp-"));
|
|
30810
|
+
const ext = path17.extname(filePath) || ".md";
|
|
30811
|
+
const tmpFile = path17.join(tmpDir, "content" + ext);
|
|
29692
30812
|
try {
|
|
29693
|
-
|
|
29694
|
-
const tmpRelative =
|
|
30813
|
+
fs13.writeFileSync(tmpFile, content, "utf-8");
|
|
30814
|
+
const tmpRelative = path17.relative(tmpDir, tmpFile);
|
|
29695
30815
|
const rawResult = await runAudit(
|
|
29696
30816
|
tmpDir,
|
|
29697
30817
|
options.depth !== void 0 ? ALL_CHECKS : ALL_CHECKS,
|
|
@@ -29706,13 +30826,13 @@ async function runAuditOnContent(filePath, content, projectRoot, options = {}) {
|
|
|
29706
30826
|
}
|
|
29707
30827
|
);
|
|
29708
30828
|
const remapped = rawResult.files.map((fr) => {
|
|
29709
|
-
const isTmp = fr.path === tmpRelative || fr.path === tmpFile ||
|
|
30829
|
+
const isTmp = fr.path === tmpRelative || fr.path === tmpFile || path17.resolve(tmpDir, fr.path) === tmpFile;
|
|
29710
30830
|
return isTmp ? { ...fr, path: filePath } : fr;
|
|
29711
30831
|
});
|
|
29712
30832
|
return { ...rawResult, files: remapped, projectRoot };
|
|
29713
30833
|
} finally {
|
|
29714
30834
|
try {
|
|
29715
|
-
|
|
30835
|
+
fs13.rmSync(tmpDir, { recursive: true, force: true });
|
|
29716
30836
|
} catch {
|
|
29717
30837
|
}
|
|
29718
30838
|
}
|
|
@@ -29820,7 +30940,7 @@ var server_exports = {};
|
|
|
29820
30940
|
__export(server_exports, {
|
|
29821
30941
|
startLspServer: () => startLspServer
|
|
29822
30942
|
});
|
|
29823
|
-
import * as
|
|
30943
|
+
import * as path18 from "node:path";
|
|
29824
30944
|
async function startLspServer() {
|
|
29825
30945
|
const connection = (0, import_node.createConnection)(import_node.ProposedFeatures.all);
|
|
29826
30946
|
const documents = new import_node.TextDocuments(TextDocument2);
|
|
@@ -29835,7 +30955,7 @@ async function startLspServer() {
|
|
|
29835
30955
|
const uri = doc.uri;
|
|
29836
30956
|
let filePath = uri.startsWith("file://") ? decodeURIComponent(uri.slice(7)) : uri;
|
|
29837
30957
|
filePath = filePath.replace(/^\/([A-Za-z]:)/, "$1");
|
|
29838
|
-
const projectRoot =
|
|
30958
|
+
const projectRoot = path18.dirname(filePath);
|
|
29839
30959
|
try {
|
|
29840
30960
|
const result = await runAuditOnContent(filePath, doc.getText(), projectRoot, {
|
|
29841
30961
|
depth: 2
|
|
@@ -30287,8 +31407,8 @@ var init_parseUtil = __esm({
|
|
|
30287
31407
|
init_errors();
|
|
30288
31408
|
init_en();
|
|
30289
31409
|
makeIssue = (params) => {
|
|
30290
|
-
const { data, path:
|
|
30291
|
-
const fullPath = [...
|
|
31410
|
+
const { data, path: path23, errorMaps, issueData } = params;
|
|
31411
|
+
const fullPath = [...path23, ...issueData.path || []];
|
|
30292
31412
|
const fullIssue = {
|
|
30293
31413
|
...issueData,
|
|
30294
31414
|
path: fullPath
|
|
@@ -30571,11 +31691,11 @@ var init_types2 = __esm({
|
|
|
30571
31691
|
init_parseUtil();
|
|
30572
31692
|
init_util2();
|
|
30573
31693
|
ParseInputLazyPath = class {
|
|
30574
|
-
constructor(parent, value,
|
|
31694
|
+
constructor(parent, value, path23, key) {
|
|
30575
31695
|
this._cachedPath = [];
|
|
30576
31696
|
this.parent = parent;
|
|
30577
31697
|
this.data = value;
|
|
30578
|
-
this._path =
|
|
31698
|
+
this._path = path23;
|
|
30579
31699
|
this._key = key;
|
|
30580
31700
|
}
|
|
30581
31701
|
get path() {
|
|
@@ -34077,10 +35197,10 @@ function mergeDefs(...defs) {
|
|
|
34077
35197
|
function cloneDef(schema) {
|
|
34078
35198
|
return mergeDefs(schema._zod.def);
|
|
34079
35199
|
}
|
|
34080
|
-
function getElementAtPath(obj,
|
|
34081
|
-
if (!
|
|
35200
|
+
function getElementAtPath(obj, path23) {
|
|
35201
|
+
if (!path23)
|
|
34082
35202
|
return obj;
|
|
34083
|
-
return
|
|
35203
|
+
return path23.reduce((acc, key) => acc?.[key], obj);
|
|
34084
35204
|
}
|
|
34085
35205
|
function promiseAllObject(promisesObj) {
|
|
34086
35206
|
const keys = Object.keys(promisesObj);
|
|
@@ -34408,11 +35528,11 @@ function explicitlyAborted(x3, startIndex = 0) {
|
|
|
34408
35528
|
}
|
|
34409
35529
|
return false;
|
|
34410
35530
|
}
|
|
34411
|
-
function prefixIssues(
|
|
35531
|
+
function prefixIssues(path23, issues) {
|
|
34412
35532
|
return issues.map((iss) => {
|
|
34413
35533
|
var _a4;
|
|
34414
35534
|
(_a4 = iss).path ?? (_a4.path = []);
|
|
34415
|
-
iss.path.unshift(
|
|
35535
|
+
iss.path.unshift(path23);
|
|
34416
35536
|
return iss;
|
|
34417
35537
|
});
|
|
34418
35538
|
}
|
|
@@ -34630,16 +35750,16 @@ function flattenError(error52, mapper = (issue2) => issue2.message) {
|
|
|
34630
35750
|
}
|
|
34631
35751
|
function formatError(error52, mapper = (issue2) => issue2.message) {
|
|
34632
35752
|
const fieldErrors = { _errors: [] };
|
|
34633
|
-
const processError = (error53,
|
|
35753
|
+
const processError = (error53, path23 = []) => {
|
|
34634
35754
|
for (const issue2 of error53.issues) {
|
|
34635
35755
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
34636
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
35756
|
+
issue2.errors.map((issues) => processError({ issues }, [...path23, ...issue2.path]));
|
|
34637
35757
|
} else if (issue2.code === "invalid_key") {
|
|
34638
|
-
processError({ issues: issue2.issues }, [...
|
|
35758
|
+
processError({ issues: issue2.issues }, [...path23, ...issue2.path]);
|
|
34639
35759
|
} else if (issue2.code === "invalid_element") {
|
|
34640
|
-
processError({ issues: issue2.issues }, [...
|
|
35760
|
+
processError({ issues: issue2.issues }, [...path23, ...issue2.path]);
|
|
34641
35761
|
} else {
|
|
34642
|
-
const fullpath = [...
|
|
35762
|
+
const fullpath = [...path23, ...issue2.path];
|
|
34643
35763
|
if (fullpath.length === 0) {
|
|
34644
35764
|
fieldErrors._errors.push(mapper(issue2));
|
|
34645
35765
|
} else {
|
|
@@ -34666,17 +35786,17 @@ function formatError(error52, mapper = (issue2) => issue2.message) {
|
|
|
34666
35786
|
}
|
|
34667
35787
|
function treeifyError(error52, mapper = (issue2) => issue2.message) {
|
|
34668
35788
|
const result = { errors: [] };
|
|
34669
|
-
const processError = (error53,
|
|
35789
|
+
const processError = (error53, path23 = []) => {
|
|
34670
35790
|
var _a4, _b;
|
|
34671
35791
|
for (const issue2 of error53.issues) {
|
|
34672
35792
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
34673
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
35793
|
+
issue2.errors.map((issues) => processError({ issues }, [...path23, ...issue2.path]));
|
|
34674
35794
|
} else if (issue2.code === "invalid_key") {
|
|
34675
|
-
processError({ issues: issue2.issues }, [...
|
|
35795
|
+
processError({ issues: issue2.issues }, [...path23, ...issue2.path]);
|
|
34676
35796
|
} else if (issue2.code === "invalid_element") {
|
|
34677
|
-
processError({ issues: issue2.issues }, [...
|
|
35797
|
+
processError({ issues: issue2.issues }, [...path23, ...issue2.path]);
|
|
34678
35798
|
} else {
|
|
34679
|
-
const fullpath = [...
|
|
35799
|
+
const fullpath = [...path23, ...issue2.path];
|
|
34680
35800
|
if (fullpath.length === 0) {
|
|
34681
35801
|
result.errors.push(mapper(issue2));
|
|
34682
35802
|
continue;
|
|
@@ -34708,8 +35828,8 @@ function treeifyError(error52, mapper = (issue2) => issue2.message) {
|
|
|
34708
35828
|
}
|
|
34709
35829
|
function toDotPath(_path) {
|
|
34710
35830
|
const segs = [];
|
|
34711
|
-
const
|
|
34712
|
-
for (const seg of
|
|
35831
|
+
const path23 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
35832
|
+
for (const seg of path23) {
|
|
34713
35833
|
if (typeof seg === "number")
|
|
34714
35834
|
segs.push(`[${seg}]`);
|
|
34715
35835
|
else if (typeof seg === "symbol")
|
|
@@ -48470,13 +49590,13 @@ function resolveRef2(ref, ctx) {
|
|
|
48470
49590
|
if (!ref.startsWith("#")) {
|
|
48471
49591
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
48472
49592
|
}
|
|
48473
|
-
const
|
|
48474
|
-
if (
|
|
49593
|
+
const path23 = ref.slice(1).split("/").filter(Boolean);
|
|
49594
|
+
if (path23.length === 0) {
|
|
48475
49595
|
return ctx.rootSchema;
|
|
48476
49596
|
}
|
|
48477
49597
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
48478
|
-
if (
|
|
48479
|
-
const key =
|
|
49598
|
+
if (path23[0] === defsKey) {
|
|
49599
|
+
const key = path23[1];
|
|
48480
49600
|
if (!key || !ctx.defs[key]) {
|
|
48481
49601
|
throw new Error(`Reference not found: ${ref}`);
|
|
48482
49602
|
}
|
|
@@ -52990,7 +54110,7 @@ var init_protocol = __esm({
|
|
|
52990
54110
|
return;
|
|
52991
54111
|
}
|
|
52992
54112
|
const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1e3;
|
|
52993
|
-
await new Promise((
|
|
54113
|
+
await new Promise((resolve22) => setTimeout(resolve22, pollInterval));
|
|
52994
54114
|
options?.signal?.throwIfAborted();
|
|
52995
54115
|
}
|
|
52996
54116
|
} catch (error52) {
|
|
@@ -53007,7 +54127,7 @@ var init_protocol = __esm({
|
|
|
53007
54127
|
*/
|
|
53008
54128
|
request(request, resultSchema, options) {
|
|
53009
54129
|
const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
|
|
53010
|
-
return new Promise((
|
|
54130
|
+
return new Promise((resolve22, reject) => {
|
|
53011
54131
|
const earlyReject = (error52) => {
|
|
53012
54132
|
reject(error52);
|
|
53013
54133
|
};
|
|
@@ -53085,7 +54205,7 @@ var init_protocol = __esm({
|
|
|
53085
54205
|
if (!parseResult.success) {
|
|
53086
54206
|
reject(parseResult.error);
|
|
53087
54207
|
} else {
|
|
53088
|
-
|
|
54208
|
+
resolve22(parseResult.data);
|
|
53089
54209
|
}
|
|
53090
54210
|
} catch (error52) {
|
|
53091
54211
|
reject(error52);
|
|
@@ -53346,12 +54466,12 @@ var init_protocol = __esm({
|
|
|
53346
54466
|
}
|
|
53347
54467
|
} catch {
|
|
53348
54468
|
}
|
|
53349
|
-
return new Promise((
|
|
54469
|
+
return new Promise((resolve22, reject) => {
|
|
53350
54470
|
if (signal.aborted) {
|
|
53351
54471
|
reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
|
|
53352
54472
|
return;
|
|
53353
54473
|
}
|
|
53354
|
-
const timeoutId = setTimeout(
|
|
54474
|
+
const timeoutId = setTimeout(resolve22, interval);
|
|
53355
54475
|
signal.addEventListener("abort", () => {
|
|
53356
54476
|
clearTimeout(timeoutId);
|
|
53357
54477
|
reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
|
|
@@ -56399,7 +57519,7 @@ var require_compile = __commonJS({
|
|
|
56399
57519
|
const schOrFunc = root.refs[ref];
|
|
56400
57520
|
if (schOrFunc)
|
|
56401
57521
|
return schOrFunc;
|
|
56402
|
-
let _sch =
|
|
57522
|
+
let _sch = resolve22.call(this, root, ref);
|
|
56403
57523
|
if (_sch === void 0) {
|
|
56404
57524
|
const schema = (_a4 = root.localRefs) === null || _a4 === void 0 ? void 0 : _a4[ref];
|
|
56405
57525
|
const { schemaId } = this.opts;
|
|
@@ -56426,7 +57546,7 @@ var require_compile = __commonJS({
|
|
|
56426
57546
|
function sameSchemaEnv(s1, s2) {
|
|
56427
57547
|
return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
|
|
56428
57548
|
}
|
|
56429
|
-
function
|
|
57549
|
+
function resolve22(root, ref) {
|
|
56430
57550
|
let sch;
|
|
56431
57551
|
while (typeof (sch = this.refs[ref]) == "string")
|
|
56432
57552
|
ref = sch;
|
|
@@ -56645,8 +57765,8 @@ var require_utils2 = __commonJS({
|
|
|
56645
57765
|
}
|
|
56646
57766
|
return ind;
|
|
56647
57767
|
}
|
|
56648
|
-
function removeDotSegments(
|
|
56649
|
-
let input =
|
|
57768
|
+
function removeDotSegments(path23) {
|
|
57769
|
+
let input = path23;
|
|
56650
57770
|
const output = [];
|
|
56651
57771
|
let nextSlash = -1;
|
|
56652
57772
|
let len = 0;
|
|
@@ -56899,8 +58019,8 @@ var require_schemes = __commonJS({
|
|
|
56899
58019
|
wsComponent.secure = void 0;
|
|
56900
58020
|
}
|
|
56901
58021
|
if (wsComponent.resourceName) {
|
|
56902
|
-
const [
|
|
56903
|
-
wsComponent.path =
|
|
58022
|
+
const [path23, query] = wsComponent.resourceName.split("?");
|
|
58023
|
+
wsComponent.path = path23 && path23 !== "/" ? path23 : void 0;
|
|
56904
58024
|
wsComponent.query = query;
|
|
56905
58025
|
wsComponent.resourceName = void 0;
|
|
56906
58026
|
}
|
|
@@ -57060,55 +58180,55 @@ var require_fast_uri = __commonJS({
|
|
|
57060
58180
|
}
|
|
57061
58181
|
return uri;
|
|
57062
58182
|
}
|
|
57063
|
-
function
|
|
58183
|
+
function resolve22(baseURI, relativeURI, options) {
|
|
57064
58184
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
57065
58185
|
const resolved = resolveComponent(parse5(baseURI, schemelessOptions), parse5(relativeURI, schemelessOptions), schemelessOptions, true);
|
|
57066
58186
|
schemelessOptions.skipEscape = true;
|
|
57067
58187
|
return serialize(resolved, schemelessOptions);
|
|
57068
58188
|
}
|
|
57069
|
-
function resolveComponent(base,
|
|
58189
|
+
function resolveComponent(base, relative12, options, skipNormalization) {
|
|
57070
58190
|
const target = {};
|
|
57071
58191
|
if (!skipNormalization) {
|
|
57072
58192
|
base = parse5(serialize(base, options), options);
|
|
57073
|
-
|
|
58193
|
+
relative12 = parse5(serialize(relative12, options), options);
|
|
57074
58194
|
}
|
|
57075
58195
|
options = options || {};
|
|
57076
|
-
if (!options.tolerant &&
|
|
57077
|
-
target.scheme =
|
|
57078
|
-
target.userinfo =
|
|
57079
|
-
target.host =
|
|
57080
|
-
target.port =
|
|
57081
|
-
target.path = removeDotSegments(
|
|
57082
|
-
target.query =
|
|
58196
|
+
if (!options.tolerant && relative12.scheme) {
|
|
58197
|
+
target.scheme = relative12.scheme;
|
|
58198
|
+
target.userinfo = relative12.userinfo;
|
|
58199
|
+
target.host = relative12.host;
|
|
58200
|
+
target.port = relative12.port;
|
|
58201
|
+
target.path = removeDotSegments(relative12.path || "");
|
|
58202
|
+
target.query = relative12.query;
|
|
57083
58203
|
} else {
|
|
57084
|
-
if (
|
|
57085
|
-
target.userinfo =
|
|
57086
|
-
target.host =
|
|
57087
|
-
target.port =
|
|
57088
|
-
target.path = removeDotSegments(
|
|
57089
|
-
target.query =
|
|
58204
|
+
if (relative12.userinfo !== void 0 || relative12.host !== void 0 || relative12.port !== void 0) {
|
|
58205
|
+
target.userinfo = relative12.userinfo;
|
|
58206
|
+
target.host = relative12.host;
|
|
58207
|
+
target.port = relative12.port;
|
|
58208
|
+
target.path = removeDotSegments(relative12.path || "");
|
|
58209
|
+
target.query = relative12.query;
|
|
57090
58210
|
} else {
|
|
57091
|
-
if (!
|
|
58211
|
+
if (!relative12.path) {
|
|
57092
58212
|
target.path = base.path;
|
|
57093
|
-
if (
|
|
57094
|
-
target.query =
|
|
58213
|
+
if (relative12.query !== void 0) {
|
|
58214
|
+
target.query = relative12.query;
|
|
57095
58215
|
} else {
|
|
57096
58216
|
target.query = base.query;
|
|
57097
58217
|
}
|
|
57098
58218
|
} else {
|
|
57099
|
-
if (
|
|
57100
|
-
target.path = removeDotSegments(
|
|
58219
|
+
if (relative12.path[0] === "/") {
|
|
58220
|
+
target.path = removeDotSegments(relative12.path);
|
|
57101
58221
|
} else {
|
|
57102
58222
|
if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
|
|
57103
|
-
target.path = "/" +
|
|
58223
|
+
target.path = "/" + relative12.path;
|
|
57104
58224
|
} else if (!base.path) {
|
|
57105
|
-
target.path =
|
|
58225
|
+
target.path = relative12.path;
|
|
57106
58226
|
} else {
|
|
57107
|
-
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) +
|
|
58227
|
+
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative12.path;
|
|
57108
58228
|
}
|
|
57109
58229
|
target.path = removeDotSegments(target.path);
|
|
57110
58230
|
}
|
|
57111
|
-
target.query =
|
|
58231
|
+
target.query = relative12.query;
|
|
57112
58232
|
}
|
|
57113
58233
|
target.userinfo = base.userinfo;
|
|
57114
58234
|
target.host = base.host;
|
|
@@ -57116,7 +58236,7 @@ var require_fast_uri = __commonJS({
|
|
|
57116
58236
|
}
|
|
57117
58237
|
target.scheme = base.scheme;
|
|
57118
58238
|
}
|
|
57119
|
-
target.fragment =
|
|
58239
|
+
target.fragment = relative12.fragment;
|
|
57120
58240
|
return target;
|
|
57121
58241
|
}
|
|
57122
58242
|
function equal(uriA, uriB, options) {
|
|
@@ -57318,7 +58438,7 @@ var require_fast_uri = __commonJS({
|
|
|
57318
58438
|
var fastUri = {
|
|
57319
58439
|
SCHEMES,
|
|
57320
58440
|
normalize: normalize4,
|
|
57321
|
-
resolve:
|
|
58441
|
+
resolve: resolve22,
|
|
57322
58442
|
resolveComponent,
|
|
57323
58443
|
equal,
|
|
57324
58444
|
serialize,
|
|
@@ -60339,12 +61459,12 @@ var require_dist3 = __commonJS({
|
|
|
60339
61459
|
throw new Error(`Unknown format "${name}"`);
|
|
60340
61460
|
return f;
|
|
60341
61461
|
};
|
|
60342
|
-
function addFormats(ajv, list,
|
|
61462
|
+
function addFormats(ajv, list, fs18, exportName) {
|
|
60343
61463
|
var _a4;
|
|
60344
61464
|
var _b;
|
|
60345
61465
|
(_a4 = (_b = ajv.opts.code).formats) !== null && _a4 !== void 0 ? _a4 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
|
|
60346
61466
|
for (const f of list)
|
|
60347
|
-
ajv.addFormat(f,
|
|
61467
|
+
ajv.addFormat(f, fs18[f]);
|
|
60348
61468
|
}
|
|
60349
61469
|
module.exports = exports = formatsPlugin;
|
|
60350
61470
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -61500,7 +62620,7 @@ var init_mcp = __esm({
|
|
|
61500
62620
|
let task = createTaskResult.task;
|
|
61501
62621
|
const pollInterval = task.pollInterval ?? 5e3;
|
|
61502
62622
|
while (task.status !== "completed" && task.status !== "failed" && task.status !== "cancelled") {
|
|
61503
|
-
await new Promise((
|
|
62623
|
+
await new Promise((resolve22) => setTimeout(resolve22, pollInterval));
|
|
61504
62624
|
const updatedTask = await extra.taskStore.getTask(taskId);
|
|
61505
62625
|
if (!updatedTask) {
|
|
61506
62626
|
throw new McpError(ErrorCode.InternalError, `Task ${taskId} not found during polling`);
|
|
@@ -62096,12 +63216,12 @@ var init_stdio2 = __esm({
|
|
|
62096
63216
|
this.onclose?.();
|
|
62097
63217
|
}
|
|
62098
63218
|
send(message) {
|
|
62099
|
-
return new Promise((
|
|
63219
|
+
return new Promise((resolve22) => {
|
|
62100
63220
|
const json2 = serializeMessage(message);
|
|
62101
63221
|
if (this._stdout.write(json2)) {
|
|
62102
|
-
|
|
63222
|
+
resolve22();
|
|
62103
63223
|
} else {
|
|
62104
|
-
this._stdout.once("drain",
|
|
63224
|
+
this._stdout.once("drain", resolve22);
|
|
62105
63225
|
}
|
|
62106
63226
|
});
|
|
62107
63227
|
}
|
|
@@ -62652,7 +63772,7 @@ var init_source = __esm({
|
|
|
62652
63772
|
});
|
|
62653
63773
|
|
|
62654
63774
|
// src/core/fixer.ts
|
|
62655
|
-
import * as
|
|
63775
|
+
import * as fs14 from "node:fs";
|
|
62656
63776
|
function applyFixes(result, options = {}) {
|
|
62657
63777
|
const log = options.quiet ? () => {
|
|
62658
63778
|
} : console.log.bind(console);
|
|
@@ -62690,7 +63810,7 @@ function applyFixes(result, options = {}) {
|
|
|
62690
63810
|
for (const [filePath, fixes] of fixesByFile) {
|
|
62691
63811
|
let content;
|
|
62692
63812
|
try {
|
|
62693
|
-
content =
|
|
63813
|
+
content = fs14.readFileSync(filePath, "utf-8");
|
|
62694
63814
|
} catch (err) {
|
|
62695
63815
|
log(source_default.yellow(" Skipped") + ` ${filePath}: ${err.message}`);
|
|
62696
63816
|
continue;
|
|
@@ -62775,7 +63895,7 @@ function applyFixes(result, options = {}) {
|
|
|
62775
63895
|
}
|
|
62776
63896
|
if (!dryRun) {
|
|
62777
63897
|
try {
|
|
62778
|
-
|
|
63898
|
+
fs14.writeFileSync(filePath, newContent, "utf-8");
|
|
62779
63899
|
} catch (err) {
|
|
62780
63900
|
log(source_default.yellow(" Skipped") + ` ${filePath}: ${err.message}`);
|
|
62781
63901
|
continue;
|
|
@@ -62797,8 +63917,8 @@ var init_fixer = __esm({
|
|
|
62797
63917
|
});
|
|
62798
63918
|
|
|
62799
63919
|
// src/core/config.ts
|
|
62800
|
-
import * as
|
|
62801
|
-
import * as
|
|
63920
|
+
import * as fs15 from "node:fs";
|
|
63921
|
+
import * as path19 from "node:path";
|
|
62802
63922
|
function formatJsonError(content, err) {
|
|
62803
63923
|
const msg = err instanceof Error ? err.message : String(err);
|
|
62804
63924
|
const posMatch = msg.match(/position (\d+)/);
|
|
@@ -62838,7 +63958,7 @@ function suggestKey(unknown2) {
|
|
|
62838
63958
|
let best = null;
|
|
62839
63959
|
let bestDist = Infinity;
|
|
62840
63960
|
for (const known of KNOWN_CONFIG_KEYS) {
|
|
62841
|
-
const d =
|
|
63961
|
+
const d = levenshtein3(unknown2, known);
|
|
62842
63962
|
if (d < bestDist) {
|
|
62843
63963
|
bestDist = d;
|
|
62844
63964
|
best = known;
|
|
@@ -62896,10 +64016,10 @@ function warnIgnoreRulePathPatternMisuse(config2, source) {
|
|
|
62896
64016
|
}
|
|
62897
64017
|
function loadConfig(projectRoot) {
|
|
62898
64018
|
for (const filename of CONFIG_FILENAMES) {
|
|
62899
|
-
const filePath =
|
|
64019
|
+
const filePath = path19.join(projectRoot, filename);
|
|
62900
64020
|
let content;
|
|
62901
64021
|
try {
|
|
62902
|
-
content = stripBom(
|
|
64022
|
+
content = stripBom(fs15.readFileSync(filePath, "utf-8"));
|
|
62903
64023
|
} catch {
|
|
62904
64024
|
continue;
|
|
62905
64025
|
}
|
|
@@ -62910,22 +64030,22 @@ function loadConfig(projectRoot) {
|
|
|
62910
64030
|
function loadConfigFromExplicitPath(configPath) {
|
|
62911
64031
|
let content;
|
|
62912
64032
|
try {
|
|
62913
|
-
content = stripBom(
|
|
64033
|
+
content = stripBom(fs15.readFileSync(configPath, "utf-8"));
|
|
62914
64034
|
} catch (err) {
|
|
62915
64035
|
const detail = err instanceof Error ? err.message : String(err);
|
|
62916
64036
|
throw new Error(`could not load config from ${configPath}: ${detail}`, { cause: err });
|
|
62917
64037
|
}
|
|
62918
64038
|
return parseConfigContent(content, configPath);
|
|
62919
64039
|
}
|
|
62920
|
-
var
|
|
64040
|
+
var import_fast_levenshtein3, levenshtein3, KNOWN_CONFIG_KEYS, CONFIG_FILENAMES;
|
|
62921
64041
|
var init_config2 = __esm({
|
|
62922
64042
|
"src/core/config.ts"() {
|
|
62923
64043
|
"use strict";
|
|
62924
64044
|
init_define_WEB_FIRST_SEGMENTS();
|
|
62925
|
-
|
|
64045
|
+
import_fast_levenshtein3 = __toESM(require_levenshtein(), 1);
|
|
62926
64046
|
init_fs();
|
|
62927
64047
|
init_positions();
|
|
62928
|
-
|
|
64048
|
+
levenshtein3 = import_fast_levenshtein3.default.get;
|
|
62929
64049
|
KNOWN_CONFIG_KEYS = [
|
|
62930
64050
|
"checks",
|
|
62931
64051
|
"ignore",
|
|
@@ -62953,7 +64073,7 @@ __export(server_exports2, {
|
|
|
62953
64073
|
server: () => server,
|
|
62954
64074
|
startServer: () => startServer
|
|
62955
64075
|
});
|
|
62956
|
-
import * as
|
|
64076
|
+
import * as path20 from "node:path";
|
|
62957
64077
|
function describeDisallowed(rawPath) {
|
|
62958
64078
|
const m = rawPath.match(PATH_DISALLOWED);
|
|
62959
64079
|
if (!m) return "unknown";
|
|
@@ -62966,7 +64086,7 @@ function validateProjectPath(rawPath) {
|
|
|
62966
64086
|
`projectPath contains disallowed character ${describeDisallowed(rawPath)} (control chars and shell metacharacters are rejected)`
|
|
62967
64087
|
);
|
|
62968
64088
|
}
|
|
62969
|
-
const resolved =
|
|
64089
|
+
const resolved = path20.resolve(rawPath);
|
|
62970
64090
|
if (!isDirectory(resolved)) {
|
|
62971
64091
|
throw new Error("projectPath is not an existing directory");
|
|
62972
64092
|
}
|
|
@@ -62990,10 +64110,10 @@ function validateFilePathInput(rawPath) {
|
|
|
62990
64110
|
}
|
|
62991
64111
|
}
|
|
62992
64112
|
function resolveWithinRoot(filePath, root) {
|
|
62993
|
-
const resolvedRoot =
|
|
62994
|
-
const resolved =
|
|
62995
|
-
const rel =
|
|
62996
|
-
if (rel.startsWith("..") ||
|
|
64113
|
+
const resolvedRoot = path20.resolve(root);
|
|
64114
|
+
const resolved = path20.resolve(resolvedRoot, filePath);
|
|
64115
|
+
const rel = path20.relative(resolvedRoot, resolved);
|
|
64116
|
+
if (rel.startsWith("..") || path20.isAbsolute(rel)) {
|
|
62997
64117
|
throw new Error("path escapes the project root");
|
|
62998
64118
|
}
|
|
62999
64119
|
return resolved;
|
|
@@ -63092,7 +64212,7 @@ var init_server4 = __esm({
|
|
|
63092
64212
|
exists: fileExists(resolved) || isDirectory(resolved)
|
|
63093
64213
|
};
|
|
63094
64214
|
if (!result.exists) {
|
|
63095
|
-
const rename = await findRenames(root,
|
|
64215
|
+
const rename = await findRenames(root, path20.relative(root, resolved));
|
|
63096
64216
|
if (rename) {
|
|
63097
64217
|
result.renamed = true;
|
|
63098
64218
|
result.newPath = rename.newPath;
|
|
@@ -64513,8 +65633,8 @@ var init_suggestSimilar = __esm({
|
|
|
64513
65633
|
// node_modules/.pnpm/commander@15.0.0/node_modules/commander/lib/command.js
|
|
64514
65634
|
import { EventEmitter as EventEmitter2 } from "node:events";
|
|
64515
65635
|
import childProcess from "node:child_process";
|
|
64516
|
-
import
|
|
64517
|
-
import
|
|
65636
|
+
import path21 from "node:path";
|
|
65637
|
+
import fs16 from "node:fs";
|
|
64518
65638
|
import process5 from "node:process";
|
|
64519
65639
|
import { stripVTControlCharacters as stripVTControlCharacters2 } from "node:util";
|
|
64520
65640
|
function incrementNodeInspectorPort(args2) {
|
|
@@ -65552,7 +66672,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
65552
66672
|
* @param {string} subcommandName
|
|
65553
66673
|
*/
|
|
65554
66674
|
_checkForMissingExecutable(executableFile, executableDir, subcommandName) {
|
|
65555
|
-
if (
|
|
66675
|
+
if (fs16.existsSync(executableFile)) return;
|
|
65556
66676
|
const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
|
|
65557
66677
|
const executableMissing = `'${executableFile}' does not exist
|
|
65558
66678
|
- if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
@@ -65569,11 +66689,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
65569
66689
|
args2 = args2.slice();
|
|
65570
66690
|
const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
65571
66691
|
function findFile(baseDir, baseName) {
|
|
65572
|
-
const localBin =
|
|
65573
|
-
if (
|
|
65574
|
-
if (sourceExt.includes(
|
|
66692
|
+
const localBin = path21.resolve(baseDir, baseName);
|
|
66693
|
+
if (fs16.existsSync(localBin)) return localBin;
|
|
66694
|
+
if (sourceExt.includes(path21.extname(baseName))) return void 0;
|
|
65575
66695
|
const foundExt = sourceExt.find(
|
|
65576
|
-
(ext) =>
|
|
66696
|
+
(ext) => fs16.existsSync(`${localBin}${ext}`)
|
|
65577
66697
|
);
|
|
65578
66698
|
if (foundExt) return `${localBin}${foundExt}`;
|
|
65579
66699
|
return void 0;
|
|
@@ -65585,21 +66705,21 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
65585
66705
|
if (this._scriptPath) {
|
|
65586
66706
|
let resolvedScriptPath;
|
|
65587
66707
|
try {
|
|
65588
|
-
resolvedScriptPath =
|
|
66708
|
+
resolvedScriptPath = fs16.realpathSync(this._scriptPath);
|
|
65589
66709
|
} catch {
|
|
65590
66710
|
resolvedScriptPath = this._scriptPath;
|
|
65591
66711
|
}
|
|
65592
|
-
executableDir =
|
|
65593
|
-
|
|
66712
|
+
executableDir = path21.resolve(
|
|
66713
|
+
path21.dirname(resolvedScriptPath),
|
|
65594
66714
|
executableDir
|
|
65595
66715
|
);
|
|
65596
66716
|
}
|
|
65597
66717
|
if (executableDir) {
|
|
65598
66718
|
let localFile = findFile(executableDir, executableFile);
|
|
65599
66719
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
65600
|
-
const legacyName =
|
|
66720
|
+
const legacyName = path21.basename(
|
|
65601
66721
|
this._scriptPath,
|
|
65602
|
-
|
|
66722
|
+
path21.extname(this._scriptPath)
|
|
65603
66723
|
);
|
|
65604
66724
|
if (legacyName !== this._name) {
|
|
65605
66725
|
localFile = findFile(
|
|
@@ -65610,7 +66730,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
65610
66730
|
}
|
|
65611
66731
|
executableFile = localFile || executableFile;
|
|
65612
66732
|
}
|
|
65613
|
-
const launchWithNode = sourceExt.includes(
|
|
66733
|
+
const launchWithNode = sourceExt.includes(path21.extname(executableFile));
|
|
65614
66734
|
let proc;
|
|
65615
66735
|
if (process5.platform !== "win32") {
|
|
65616
66736
|
if (launchWithNode) {
|
|
@@ -66527,7 +67647,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
66527
67647
|
* @return {Command}
|
|
66528
67648
|
*/
|
|
66529
67649
|
nameFromFilename(filename) {
|
|
66530
|
-
this._name =
|
|
67650
|
+
this._name = path21.basename(filename, path21.extname(filename));
|
|
66531
67651
|
return this;
|
|
66532
67652
|
}
|
|
66533
67653
|
/**
|
|
@@ -66541,9 +67661,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
66541
67661
|
* @param {string} [path]
|
|
66542
67662
|
* @return {(string|null|Command)}
|
|
66543
67663
|
*/
|
|
66544
|
-
executableDir(
|
|
66545
|
-
if (
|
|
66546
|
-
this._executableDir =
|
|
67664
|
+
executableDir(path23) {
|
|
67665
|
+
if (path23 === void 0) return this._executableDir;
|
|
67666
|
+
this._executableDir = path23;
|
|
66547
67667
|
return this;
|
|
66548
67668
|
}
|
|
66549
67669
|
/**
|
|
@@ -69398,7 +70518,7 @@ var init_stdin_discarder = __esm({
|
|
|
69398
70518
|
}
|
|
69399
70519
|
});
|
|
69400
70520
|
|
|
69401
|
-
// node_modules/.pnpm/ora@9.4.
|
|
70521
|
+
// node_modules/.pnpm/ora@9.4.1/node_modules/ora/index.js
|
|
69402
70522
|
import process11 from "node:process";
|
|
69403
70523
|
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
|
69404
70524
|
function ora(options) {
|
|
@@ -69406,7 +70526,7 @@ function ora(options) {
|
|
|
69406
70526
|
}
|
|
69407
70527
|
var RENDER_DEFERRAL_TIMEOUT, SYNCHRONIZED_OUTPUT_ENABLE, SYNCHRONIZED_OUTPUT_DISABLE, activeHooksPerStream, validColors, Ora;
|
|
69408
70528
|
var init_ora = __esm({
|
|
69409
|
-
"node_modules/.pnpm/ora@9.4.
|
|
70529
|
+
"node_modules/.pnpm/ora@9.4.1/node_modules/ora/index.js"() {
|
|
69410
70530
|
init_define_WEB_FIRST_SEGMENTS();
|
|
69411
70531
|
init_source();
|
|
69412
70532
|
init_cli_cursor();
|
|
@@ -69794,7 +70914,7 @@ var init_ora = __esm({
|
|
|
69794
70914
|
return this;
|
|
69795
70915
|
}
|
|
69796
70916
|
start(text) {
|
|
69797
|
-
if (text) {
|
|
70917
|
+
if (text !== void 0) {
|
|
69798
70918
|
this.text = text;
|
|
69799
70919
|
}
|
|
69800
70920
|
if (this.isSilent) {
|
|
@@ -69876,8 +70996,8 @@ var init_ora = __esm({
|
|
|
69876
70996
|
});
|
|
69877
70997
|
|
|
69878
70998
|
// src/core/reporter.ts
|
|
69879
|
-
import { existsSync as
|
|
69880
|
-
import { join as
|
|
70999
|
+
import { existsSync as existsSync11, readFileSync as readFileSync13 } from "node:fs";
|
|
71000
|
+
import { join as join18 } from "node:path";
|
|
69881
71001
|
function classifyFile(f) {
|
|
69882
71002
|
if (f.path === "(project)") return "context";
|
|
69883
71003
|
if (f.path === "(mcp)") return "mcp";
|
|
@@ -69901,9 +71021,9 @@ function isSyntheticBucket(p2) {
|
|
|
69901
71021
|
}
|
|
69902
71022
|
function detectVersionSkew(projectRoot, runningVersion) {
|
|
69903
71023
|
try {
|
|
69904
|
-
const pkgPath =
|
|
69905
|
-
if (!
|
|
69906
|
-
const raw =
|
|
71024
|
+
const pkgPath = join18(projectRoot, "package.json");
|
|
71025
|
+
if (!existsSync11(pkgPath)) return null;
|
|
71026
|
+
const raw = readFileSync13(pkgPath, "utf8").replace(/^\uFEFF/, "");
|
|
69907
71027
|
const pkg = JSON.parse(raw);
|
|
69908
71028
|
const name = pkg.name ?? "";
|
|
69909
71029
|
if (name !== "ctxlint" && name !== "@yawlabs/ctxlint") return null;
|
|
@@ -70403,11 +71523,11 @@ __export(cli_exports, {
|
|
|
70403
71523
|
promptYesNo: () => promptYesNo,
|
|
70404
71524
|
runCli: () => runCli
|
|
70405
71525
|
});
|
|
70406
|
-
import * as
|
|
70407
|
-
import * as
|
|
71526
|
+
import * as fs17 from "node:fs";
|
|
71527
|
+
import * as path22 from "node:path";
|
|
70408
71528
|
function existsAsDirectory(p2) {
|
|
70409
71529
|
try {
|
|
70410
|
-
return
|
|
71530
|
+
return fs17.statSync(p2).isDirectory();
|
|
70411
71531
|
} catch {
|
|
70412
71532
|
return false;
|
|
70413
71533
|
}
|
|
@@ -70434,7 +71554,7 @@ async function runCli() {
|
|
|
70434
71554
|
"Also scan the user-global ~/.claude/settings.json in the dead-hook check (off by default; the standard run only reads project .claude/settings.json[.local])",
|
|
70435
71555
|
false
|
|
70436
71556
|
).option("--no-ignore-file", "Disable .ctxlintignore suppression (see all findings)").option("--watch", "Re-lint on context file changes", false).action(async (projectPath, opts) => {
|
|
70437
|
-
const resolvedPath =
|
|
71557
|
+
const resolvedPath = path22.resolve(projectPath);
|
|
70438
71558
|
if (!existsAsDirectory(resolvedPath)) {
|
|
70439
71559
|
console.error(
|
|
70440
71560
|
`Error: ${resolvedPath} is not an existing directory. Check the path argument.`
|
|
@@ -70573,41 +71693,41 @@ Fixed ${applied.totalFixes} issue${applied.totalFixes !== 1 ? "s" : ""} in ${app
|
|
|
70573
71693
|
const chalk2 = (await Promise.resolve().then(() => (init_source(), source_exports))).default;
|
|
70574
71694
|
console.log(chalk2.dim("\nWatching for changes... (Ctrl+C to stop)\n"));
|
|
70575
71695
|
const watchPaths = [
|
|
70576
|
-
|
|
70577
|
-
|
|
70578
|
-
|
|
70579
|
-
|
|
70580
|
-
|
|
70581
|
-
|
|
70582
|
-
|
|
70583
|
-
|
|
70584
|
-
|
|
70585
|
-
|
|
70586
|
-
|
|
70587
|
-
|
|
70588
|
-
|
|
70589
|
-
|
|
70590
|
-
|
|
71696
|
+
path22.join(resolvedPath, "CLAUDE.md"),
|
|
71697
|
+
path22.join(resolvedPath, "CLAUDE.local.md"),
|
|
71698
|
+
path22.join(resolvedPath, "AGENTS.md"),
|
|
71699
|
+
path22.join(resolvedPath, "AGENT.md"),
|
|
71700
|
+
path22.join(resolvedPath, ".cursorrules"),
|
|
71701
|
+
path22.join(resolvedPath, ".windsurfrules"),
|
|
71702
|
+
path22.join(resolvedPath, ".clinerules"),
|
|
71703
|
+
path22.join(resolvedPath, ".aiderules"),
|
|
71704
|
+
path22.join(resolvedPath, ".continuerules"),
|
|
71705
|
+
path22.join(resolvedPath, ".rules"),
|
|
71706
|
+
path22.join(resolvedPath, ".goosehints"),
|
|
71707
|
+
path22.join(resolvedPath, "GEMINI.md"),
|
|
71708
|
+
path22.join(resolvedPath, "replit.md"),
|
|
71709
|
+
path22.join(resolvedPath, "package.json"),
|
|
71710
|
+
path22.join(resolvedPath, ".mcp.json"),
|
|
70591
71711
|
// ctxlint config — re-resolve on edit so threshold changes,
|
|
70592
71712
|
// ignore-list edits, and check-list overrides take effect without
|
|
70593
71713
|
// restarting the watcher.
|
|
70594
|
-
|
|
70595
|
-
|
|
71714
|
+
path22.join(resolvedPath, ".ctxlintrc"),
|
|
71715
|
+
path22.join(resolvedPath, ".ctxlintrc.json"),
|
|
70596
71716
|
// .ctxlintignore — re-lint when suppression rules change.
|
|
70597
|
-
|
|
71717
|
+
path22.join(resolvedPath, ".ctxlintignore")
|
|
70598
71718
|
];
|
|
70599
71719
|
const watchDirs = [
|
|
70600
|
-
|
|
70601
|
-
|
|
70602
|
-
|
|
70603
|
-
|
|
70604
|
-
|
|
70605
|
-
|
|
70606
|
-
|
|
70607
|
-
|
|
70608
|
-
|
|
70609
|
-
|
|
70610
|
-
|
|
71720
|
+
path22.join(resolvedPath, ".claude"),
|
|
71721
|
+
path22.join(resolvedPath, ".cursor"),
|
|
71722
|
+
path22.join(resolvedPath, ".github"),
|
|
71723
|
+
path22.join(resolvedPath, ".windsurf"),
|
|
71724
|
+
path22.join(resolvedPath, ".aide"),
|
|
71725
|
+
path22.join(resolvedPath, ".amazonq"),
|
|
71726
|
+
path22.join(resolvedPath, ".goose"),
|
|
71727
|
+
path22.join(resolvedPath, ".junie"),
|
|
71728
|
+
path22.join(resolvedPath, ".aiassistant"),
|
|
71729
|
+
path22.join(resolvedPath, ".continue"),
|
|
71730
|
+
path22.join(resolvedPath, ".vscode")
|
|
70611
71731
|
];
|
|
70612
71732
|
const watchers = [];
|
|
70613
71733
|
let debounceTimer = null;
|
|
@@ -70671,13 +71791,13 @@ Fixed ${applied.totalFixes} issue${applied.totalFixes !== 1 ? "s" : ""} in ${app
|
|
|
70671
71791
|
};
|
|
70672
71792
|
for (const filePath of watchPaths) {
|
|
70673
71793
|
try {
|
|
70674
|
-
watchers.push(
|
|
71794
|
+
watchers.push(fs17.watch(filePath, rerun));
|
|
70675
71795
|
} catch {
|
|
70676
71796
|
}
|
|
70677
71797
|
}
|
|
70678
71798
|
for (const dir of watchDirs) {
|
|
70679
71799
|
try {
|
|
70680
|
-
watchers.push(
|
|
71800
|
+
watchers.push(fs17.watch(dir, { recursive: true }, rerun));
|
|
70681
71801
|
} catch {
|
|
70682
71802
|
}
|
|
70683
71803
|
}
|
|
@@ -70698,17 +71818,17 @@ Fixed ${applied.totalFixes} issue${applied.totalFixes !== 1 ? "s" : ""} in ${app
|
|
|
70698
71818
|
}
|
|
70699
71819
|
});
|
|
70700
71820
|
program2.command("init").description("Set up a git pre-commit hook that runs ctxlint --strict").argument("[path]", "Project directory", ".").action(async (projectPath) => {
|
|
70701
|
-
const resolvedRoot =
|
|
70702
|
-
const gitDir =
|
|
70703
|
-
const hooksDir =
|
|
70704
|
-
if (!
|
|
71821
|
+
const resolvedRoot = path22.resolve(projectPath);
|
|
71822
|
+
const gitDir = path22.join(resolvedRoot, ".git");
|
|
71823
|
+
const hooksDir = path22.join(gitDir, "hooks");
|
|
71824
|
+
if (!fs17.existsSync(gitDir)) {
|
|
70705
71825
|
console.error('Error: not a git repository. Run "git init" first.');
|
|
70706
71826
|
process.exit(1);
|
|
70707
71827
|
}
|
|
70708
|
-
if (!
|
|
70709
|
-
|
|
71828
|
+
if (!fs17.existsSync(hooksDir)) {
|
|
71829
|
+
fs17.mkdirSync(hooksDir, { recursive: true });
|
|
70710
71830
|
}
|
|
70711
|
-
const hookPath =
|
|
71831
|
+
const hookPath = path22.join(hooksDir, "pre-commit");
|
|
70712
71832
|
const fullHookContent = `#!/bin/sh
|
|
70713
71833
|
# ctxlint pre-commit hook
|
|
70714
71834
|
npx @yawlabs/ctxlint@${VERSION} --strict
|
|
@@ -70717,15 +71837,15 @@ npx @yawlabs/ctxlint@${VERSION} --strict
|
|
|
70717
71837
|
# ctxlint pre-commit hook
|
|
70718
71838
|
npx @yawlabs/ctxlint@${VERSION} --strict
|
|
70719
71839
|
`;
|
|
70720
|
-
if (
|
|
70721
|
-
const existing =
|
|
71840
|
+
if (fs17.existsSync(hookPath)) {
|
|
71841
|
+
const existing = fs17.readFileSync(hookPath, "utf-8");
|
|
70722
71842
|
const installed = existing.match(
|
|
70723
71843
|
/^[^#\r\n]*\bnpx\s+(?:-y\s+|--yes\s+)?@yawlabs\/ctxlint(?:@(\d+\.\d+\.\d+))?/m
|
|
70724
71844
|
);
|
|
70725
71845
|
if (installed) {
|
|
70726
71846
|
const pinned = installed[1];
|
|
70727
71847
|
if (pinned && pinned !== VERSION) {
|
|
70728
|
-
|
|
71848
|
+
fs17.writeFileSync(
|
|
70729
71849
|
hookPath,
|
|
70730
71850
|
existing.replace(/(@yawlabs\/ctxlint@)\d+\.\d+\.\d+/g, `$1${VERSION}`)
|
|
70731
71851
|
);
|
|
@@ -70735,10 +71855,10 @@ npx @yawlabs/ctxlint@${VERSION} --strict
|
|
|
70735
71855
|
}
|
|
70736
71856
|
return;
|
|
70737
71857
|
}
|
|
70738
|
-
|
|
71858
|
+
fs17.appendFileSync(hookPath, appendHookContent);
|
|
70739
71859
|
console.log("Added ctxlint to existing pre-commit hook.");
|
|
70740
71860
|
} else {
|
|
70741
|
-
|
|
71861
|
+
fs17.writeFileSync(hookPath, fullHookContent, { mode: 493 });
|
|
70742
71862
|
console.log("Created pre-commit hook at .git/hooks/pre-commit");
|
|
70743
71863
|
}
|
|
70744
71864
|
console.log("ctxlint will now run automatically before each commit.");
|
|
@@ -70760,7 +71880,7 @@ function resolveDepth(raw) {
|
|
|
70760
71880
|
return Number.isNaN(parsed) ? 2 : Math.max(0, Math.min(parsed, 10));
|
|
70761
71881
|
}
|
|
70762
71882
|
function resolveSession(resolvedPath, opts, throwOnConfigError = false) {
|
|
70763
|
-
const configPath = opts.config ?
|
|
71883
|
+
const configPath = opts.config ? path22.resolve(opts.config) : void 0;
|
|
70764
71884
|
const config2 = configPath ? loadConfigFromPath(configPath, throwOnConfigError) : loadDiscoveredConfig(resolvedPath, throwOnConfigError);
|
|
70765
71885
|
const mcpGlobal = opts.mcpGlobal || config2?.mcpGlobal || false;
|
|
70766
71886
|
const mcpOnly = opts.mcpOnly || config2?.mcpOnly || false;
|