@xrmforge/devkit 0.7.3 → 0.7.4
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.
|
@@ -218,6 +218,27 @@ checkPattern(
|
|
|
218
218
|
['logger.ts'],
|
|
219
219
|
);
|
|
220
220
|
|
|
221
|
+
// ── Type Safety Bypass ───────────────────────────────────────────────────────
|
|
222
|
+
|
|
223
|
+
// 3l2. Cast to Xrm.FormContext (bypasses typed form interface)
|
|
224
|
+
checkPattern(
|
|
225
|
+
'Cast to Xrm.FormContext (use typedForm $unsafe() for off-form fields)',
|
|
226
|
+
formFiles,
|
|
227
|
+
/as\s+(?:unknown\s+as\s+)?Xrm\.FormContext/,
|
|
228
|
+
);
|
|
229
|
+
|
|
230
|
+
// 3l3. Raw strings in $filter (field names must use Fields Enum interpolation)
|
|
231
|
+
checkPattern(
|
|
232
|
+
'Raw field names in $filter (use Fields Enum interpolation)',
|
|
233
|
+
allSrcFiles,
|
|
234
|
+
/\$filter=[^$]*\b(?:eq|ne|gt|lt|ge|le|contains|startswith)\b/,
|
|
235
|
+
['generated/', 'validate-form'],
|
|
236
|
+
[
|
|
237
|
+
// Allow if the line contains template literal interpolation (${...})
|
|
238
|
+
/\$\{/,
|
|
239
|
+
],
|
|
240
|
+
);
|
|
241
|
+
|
|
221
242
|
// ── Handler Pattern ──────────────────────────────────────────────────────────
|
|
222
243
|
|
|
223
244
|
// 3l. Exported handlers without wrapHandler or wrapCommand
|