sfmc-language-lsp 4.4.0 → 4.5.0

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.
Files changed (54) hide show
  1. package/README.md +39 -0
  2. package/dist/cjs/package-version.cjs +1 -1
  3. package/dist/cjs/typescript/index.cjs +16 -0
  4. package/dist/cjs/typescript/index.d.ts +11 -0
  5. package/dist/cjs/typescript/index.d.ts.map +1 -0
  6. package/dist/cjs/typescript/index.js.map +1 -0
  7. package/dist/cjs/typescript/orchestration.cjs +108 -0
  8. package/dist/cjs/typescript/orchestration.d.ts +59 -0
  9. package/dist/cjs/typescript/orchestration.d.ts.map +1 -0
  10. package/dist/cjs/typescript/orchestration.js.map +1 -0
  11. package/dist/cjs/typescript/service.cjs +810 -0
  12. package/dist/cjs/typescript/service.d.ts +52 -0
  13. package/dist/cjs/typescript/service.d.ts.map +1 -0
  14. package/dist/cjs/typescript/service.js.map +1 -0
  15. package/dist/cjs/typescript/source-analysis.cjs +582 -0
  16. package/dist/cjs/typescript/source-analysis.d.ts +110 -0
  17. package/dist/cjs/typescript/source-analysis.d.ts.map +1 -0
  18. package/dist/cjs/typescript/source-analysis.js.map +1 -0
  19. package/dist/cjs/utils/regions.cjs +15 -4
  20. package/dist/cjs/utils/regions.d.ts +3 -1
  21. package/dist/cjs/utils/regions.d.ts.map +1 -1
  22. package/dist/cjs/utils/regions.js.map +1 -1
  23. package/dist/esm/package-version.js +1 -1
  24. package/dist/esm/typescript/index.d.ts +11 -0
  25. package/dist/esm/typescript/index.d.ts.map +1 -0
  26. package/dist/esm/typescript/index.js +9 -0
  27. package/dist/esm/typescript/index.js.map +1 -0
  28. package/dist/esm/typescript/orchestration.d.ts +59 -0
  29. package/dist/esm/typescript/orchestration.d.ts.map +1 -0
  30. package/dist/esm/typescript/orchestration.js +103 -0
  31. package/dist/esm/typescript/orchestration.js.map +1 -0
  32. package/dist/esm/typescript/service.d.ts +52 -0
  33. package/dist/esm/typescript/service.d.ts.map +1 -0
  34. package/dist/esm/typescript/service.js +774 -0
  35. package/dist/esm/typescript/service.js.map +1 -0
  36. package/dist/esm/typescript/source-analysis.d.ts +110 -0
  37. package/dist/esm/typescript/source-analysis.d.ts.map +1 -0
  38. package/dist/esm/typescript/source-analysis.js +572 -0
  39. package/dist/esm/typescript/source-analysis.js.map +1 -0
  40. package/dist/esm/utils/regions.d.ts +3 -1
  41. package/dist/esm/utils/regions.d.ts.map +1 -1
  42. package/dist/esm/utils/regions.js +15 -4
  43. package/dist/esm/utils/regions.js.map +1 -1
  44. package/dist/types/typescript/index.d.ts +11 -0
  45. package/dist/types/typescript/index.d.ts.map +1 -0
  46. package/dist/types/typescript/orchestration.d.ts +59 -0
  47. package/dist/types/typescript/orchestration.d.ts.map +1 -0
  48. package/dist/types/typescript/service.d.ts +52 -0
  49. package/dist/types/typescript/service.d.ts.map +1 -0
  50. package/dist/types/typescript/source-analysis.d.ts +110 -0
  51. package/dist/types/typescript/source-analysis.d.ts.map +1 -0
  52. package/dist/types/utils/regions.d.ts +3 -1
  53. package/dist/types/utils/regions.d.ts.map +1 -1
  54. package/package.json +14 -1
@@ -0,0 +1,572 @@
1
+ /**
2
+ * Text-only analysis of SSJS source for the embedded TypeScript service: ESLint-style global
3
+ * comments, prototype/static polyfills and the comment ranges used to filter diagnostics and
4
+ * remap definitions. Nothing here depends on TypeScript or on the runtime environment.
5
+ */
6
+ // ---------------------------------------------------------------------------
7
+ // ESLint global comment parser
8
+ // ---------------------------------------------------------------------------
9
+ /**
10
+ * Parses ESLint-style global comments from SSJS source text and returns a
11
+ * TypeScript ambient declaration string for all declared names.
12
+ *
13
+ * Supported forms:
14
+ * /* global DEBUG, deKey * /
15
+ * /* globals DEBUG, deKey * /
16
+ * /* global DEBUG:readonly, deKey:writable * /
17
+ *
18
+ * Qualifiers (`:readonly`, `:writable`) are accepted for ESLint compatibility
19
+ * but ignored — all names are declared as `any` for the TS checker.
20
+ *
21
+ * Returns an empty string when no global comments are present.
22
+ * @param text - SSJS source text to scan
23
+ * @returns TypeScript `declare var` statements, or an empty string
24
+ */
25
+ export function parseGlobalCommentDeclarations(text) {
26
+ // Matches: /* global[s] <body> */ — non-greedy, allows multiline bodies.
27
+ const GLOBAL_COMMENT = /\/\*\s*globals?\s+([\s\S]*?)\*\//g;
28
+ // Conservative ASCII JS identifier — rejects anything that looks like a
29
+ // qualifier fragment or punctuation that slipped through the split.
30
+ const IDENT = /^[$A-Z_a-z][\w$]*$/;
31
+ const names = new Set();
32
+ let match;
33
+ while ((match = GLOBAL_COMMENT.exec(text)) !== null) {
34
+ // Body may use commas and/or whitespace as separators.
35
+ const parts = match[1].split(/[\s,]+/);
36
+ for (const part of parts) {
37
+ // Strip optional :readonly / :writable qualifier.
38
+ const name = part ? part.split(':', 1)[0].trim() : '';
39
+ if (name && IDENT.test(name)) {
40
+ names.add(name);
41
+ }
42
+ }
43
+ }
44
+ return names.size === 0
45
+ ? ''
46
+ : [...names].map((n) => `declare var ${n}: any;`).join('\n') + '\n';
47
+ }
48
+ // ---------------------------------------------------------------------------
49
+ // Prototype polyfill parser
50
+ // ---------------------------------------------------------------------------
51
+ /**
52
+ * Built-in constructors whose `.prototype` can be polyfilled in SSJS, mapped to
53
+ * the TypeScript interface that `sfmc-globals.d.ts` declares for instances of
54
+ * that type. `Array` is generic (`interface Array<T>`) so it carries its type
55
+ * parameter; the rest are non-generic.
56
+ */
57
+ const POLYFILL_INTERFACE_BY_CTOR = {
58
+ Array: { iface: 'Array', typeParams: '<T>' },
59
+ String: { iface: 'String', typeParams: '' },
60
+ Number: { iface: 'Number', typeParams: '' },
61
+ Boolean: { iface: 'Boolean', typeParams: '' },
62
+ Object: { iface: 'Object', typeParams: '' },
63
+ Date: { iface: 'Date', typeParams: '' },
64
+ Function: { iface: 'Function', typeParams: '' },
65
+ RegExp: { iface: 'RegExp', typeParams: '' },
66
+ };
67
+ /**
68
+ * Scans SSJS source for prototype polyfills of the form
69
+ * `Ctor.prototype.method = ...` and returns TypeScript interface-merge
70
+ * declarations that add each polyfilled method to the matching built-in
71
+ * interface from `sfmc-globals.d.ts`.
72
+ *
73
+ * Because the bundled `sfmc-globals.d.ts` intentionally declares only the
74
+ * SSJS-supported subset of built-in methods (no `Array.prototype.forEach`,
75
+ * `String.prototype.startsWith`, …), polyfilling an unsupported method would
76
+ * otherwise raise `Property 'X' does not exist` on both the assignment and
77
+ * every later call. Merging the polyfilled members back into the interface
78
+ * teaches the checker that those methods now exist for this document.
79
+ *
80
+ * Each polyfilled member is emitted as a *method signature* (not a bare
81
+ * `: any` property) so hover reports `(method) String.startsWith(...)` rather
82
+ * than `(property) … : any`. When the polyfill is assigned a function
83
+ * expression, the function's own parameter names are reused — typed from the
84
+ * polyfill's `@param {Type}` / `@returns {Type}` JSDoc when present, otherwise
85
+ * `any` — and any JSDoc block immediately preceding the assignment is forwarded
86
+ * so the checker surfaces the documented `@param` / `@returns` text on hover.
87
+ * The polyfill's body is still type-checked normally and unrelated diagnostics
88
+ * are preserved.
89
+ *
90
+ * Returns an empty string when no prototype polyfills are present.
91
+ * @param text - SSJS source text to scan
92
+ * @returns TypeScript interface-merge statements, or an empty string
93
+ */
94
+ export function parsePolyfillDeclarations(text) {
95
+ // Match `Ctor.prototype.method = function (params) {` where Ctor is a known
96
+ // built-in. Captures the constructor, the method name, and — when the value
97
+ // is a function expression — its parameter list. The trailing function part
98
+ // is optional so non-function polyfills still register the member.
99
+ // The canonical polyfill form ssjs-data ships uses a self-guard —
100
+ // `String.prototype.trim = String.prototype.trim || function (…)` — so
101
+ // tolerate an optional `<expr> ||` prefix between `=` and `function`.
102
+ const POLYFILL = /\b(Array|String|Number|Boolean|Object|Date|Function|RegExp)\s*\.\s*prototype\s*\.\s*([$A-Z_a-z][\w$]*)\s*(?:=\s*(?:[$A-Z_a-z][\w$.]*\s*\|\|\s*)?function\s*\*?\s*[$A-Z_a-z]*\s*\(([^)]*)\))?/g;
103
+ const membersByIface = new Map();
104
+ let match;
105
+ while ((match = POLYFILL.exec(text)) !== null) {
106
+ const ctor = match[1];
107
+ const method = match[2];
108
+ const rawParameters = match[3];
109
+ const target = POLYFILL_INTERFACE_BY_CTOR[ctor];
110
+ if (!target)
111
+ continue;
112
+ const parameters = rawParameters === undefined
113
+ ? []
114
+ : rawParameters
115
+ .split(',')
116
+ .map((p) => p.trim())
117
+ // Strip default values / rest syntax — only the name matters.
118
+ .map((p) => p
119
+ .replace(/^\.\.\./, '')
120
+ .split('=', 1)[0]
121
+ .trim())
122
+ .filter((p) => /^[$A-Z_a-z][\w$]*$/.test(p));
123
+ const rawJsdoc = extractPrecedingJsdoc(text, match.index);
124
+ const { paramTypes, optionalParams, returnType } = parseJsdocTypes(rawJsdoc);
125
+ // Strip JSDoc type annotations before forwarding: in a `.d.ts` TypeScript
126
+ // type-checks `@param {Type}` / `@property {Type}` / `@typedef` tags, so an
127
+ // undeclared or duplicate type name (e.g. a user `@typedef Client`) would
128
+ // raise spurious diagnostics and break the interface merge. The synthesized
129
+ // signature already carries the (sanitized) types.
130
+ const jsdoc = stripJsdocTypeAnnotations(rawJsdoc);
131
+ let bucket = membersByIface.get(target.iface);
132
+ if (!bucket) {
133
+ bucket = { typeParams: target.typeParams, methods: new Map() };
134
+ membersByIface.set(target.iface, bucket);
135
+ }
136
+ // First declaration with a function signature wins; a later bare
137
+ // reference must not overwrite captured params/jsdoc.
138
+ const existing = bucket.methods.get(method);
139
+ if (!existing || (existing.params.length === 0 && parameters.length > 0)) {
140
+ bucket.methods.set(method, {
141
+ params: parameters,
142
+ jsdoc,
143
+ paramTypes,
144
+ optionalParams,
145
+ returnType,
146
+ });
147
+ }
148
+ }
149
+ const staticBlocks = parseStaticPolyfillDeclarations(text);
150
+ if (membersByIface.size === 0)
151
+ return staticBlocks;
152
+ const blocks = [];
153
+ for (const [iface, { typeParams, methods }] of membersByIface) {
154
+ const memberLines = [];
155
+ // The instance type of the interface being merged (e.g. `Array<T>`,
156
+ // `String`). Emitted as an explicit `this` parameter on each method so
157
+ // that under `noLib:true` a polyfill body reading `this.length` or doing
158
+ // `return this` (e.g. `Array.prototype.copyWithin` / `fill`) type-checks
159
+ // against the array/string instance rather than the function object.
160
+ const thisType = `${iface}${typeParams}`;
161
+ for (const [name, { params, jsdoc, paramTypes, optionalParams, returnType }] of methods) {
162
+ if (jsdoc)
163
+ memberLines.push(indentLines(jsdoc, ' '.repeat(4)));
164
+ // Use the JSDoc `@param {Type}` / `@returns {Type}` annotations when
165
+ // present so hover reports the documented types instead of `any`.
166
+ // A parameter marked optional in JSDoc (`[name]`) emits `name?: type`;
167
+ // every parameter after an optional one must also be optional in TS.
168
+ let isSawOptional = false;
169
+ const parameterString = params
170
+ .map((p) => {
171
+ const optional = isSawOptional || optionalParams.has(p);
172
+ if (optional)
173
+ isSawOptional = true;
174
+ return `${p}${optional ? '?' : ''}: ${paramTypes.get(p) ?? 'any'}`;
175
+ })
176
+ .join(', ');
177
+ const signatureParameters = parameterString
178
+ ? `this: ${thisType}, ${parameterString}`
179
+ : `this: ${thisType}`;
180
+ memberLines.push(` ${name}(${signatureParameters}): ${returnType};`);
181
+ }
182
+ blocks.push(`interface ${iface}${typeParams} {\n${memberLines.join('\n')}\n}`);
183
+ }
184
+ return blocks.join('\n') + '\n' + staticBlocks;
185
+ }
186
+ /**
187
+ * Built-in constructors whose STATIC members can be polyfilled in SSJS, mapped to
188
+ * the declaration target that the merge must re-open. `Math` is a namespace
189
+ * (`declare namespace Math`), the others are `*Constructor` interfaces declared by
190
+ * `sfmc-globals.d.ts` (e.g. `interface ArrayConstructor`).
191
+ */
192
+ const STATIC_POLYFILL_TARGET_BY_CTOR = {
193
+ Array: { target: 'ArrayConstructor', kind: 'interface' },
194
+ Object: { target: 'ObjectConstructor', kind: 'interface' },
195
+ Number: { target: 'NumberConstructor', kind: 'interface' },
196
+ String: { target: 'StringConstructor', kind: 'interface' },
197
+ Date: { target: 'DateConstructor', kind: 'interface' },
198
+ Math: { target: 'Math', kind: 'namespace' },
199
+ JSON: { target: 'JSON', kind: 'namespace' },
200
+ };
201
+ /**
202
+ * Scans SSJS source for STATIC polyfills of the form `Ctor.method = function (…)`
203
+ * (e.g. `Array.isArray = …`, `Object.getPrototypeOf = …`, `Math.max = …`) and
204
+ * returns TypeScript declarations that add each member to the matching
205
+ * `*Constructor` interface (via declaration merging) or `Math`/`JSON` namespace.
206
+ *
207
+ * Like `parsePolyfillDeclarations` for prototype members, this is required because
208
+ * `sfmc-globals.d.ts` intentionally omits unsupported statics. Once the
209
+ * "Insert polyfill" quick-fix adds `Array.isArray = function () { … }`, the
210
+ * assignment target must exist or TypeScript raises ts2339
211
+ * ("Property 'isArray' does not exist on type 'ArrayConstructor'").
212
+ *
213
+ * Returns an empty string when no static polyfills are present.
214
+ * @param text - SSJS source text to scan
215
+ * @returns TypeScript merge statements, or an empty string
216
+ */
217
+ function parseStaticPolyfillDeclarations(text) {
218
+ // Match `Ctor.method = function (params)` where Ctor is a known built-in and
219
+ // `method` is NOT `prototype` (those are handled by parsePolyfillDeclarations).
220
+ // The canonical polyfill form ssjs-data ships uses a self-guard —
221
+ // `Array.isArray = Array.isArray || function (…)` — so tolerate an optional
222
+ // `<expr> ||` prefix between `=` and `function` (e.g. `Array.isArray ||`).
223
+ const STATIC_POLYFILL = /\b(Array|Object|Number|String|Date|Math|JSON)\s*\.\s*([$A-Z_a-z][\w$]*)\s*=\s*(?:[$A-Z_a-z][\w$.]*\s*\|\|\s*)?function\s*\*?\s*[$A-Z_a-z]*\s*\(([^)]*)\)/g;
224
+ // target name → { kind, methods }
225
+ const byTarget = new Map();
226
+ let match;
227
+ while ((match = STATIC_POLYFILL.exec(text)) !== null) {
228
+ const ctor = match[1];
229
+ const method = match[2];
230
+ if (method === 'prototype')
231
+ continue;
232
+ const target = STATIC_POLYFILL_TARGET_BY_CTOR[ctor];
233
+ if (!target)
234
+ continue;
235
+ const rawParameters = match[3];
236
+ const parameters = rawParameters
237
+ .split(',')
238
+ .map((p) => p.trim())
239
+ .map((p) => p
240
+ .replace(/^\.\.\./, '')
241
+ .split('=', 1)[0]
242
+ .trim())
243
+ .filter((p) => /^[$A-Z_a-z][\w$]*$/.test(p));
244
+ const rawJsdoc = extractPrecedingJsdoc(text, match.index);
245
+ const { paramTypes, optionalParams, returnType } = parseJsdocTypes(rawJsdoc);
246
+ const jsdoc = stripJsdocTypeAnnotations(rawJsdoc);
247
+ let bucket = byTarget.get(target.target);
248
+ if (!bucket) {
249
+ bucket = { kind: target.kind, methods: new Map() };
250
+ byTarget.set(target.target, bucket);
251
+ }
252
+ if (!bucket.methods.has(method)) {
253
+ bucket.methods.set(method, {
254
+ params: parameters,
255
+ jsdoc,
256
+ paramTypes,
257
+ optionalParams,
258
+ returnType,
259
+ });
260
+ }
261
+ }
262
+ if (byTarget.size === 0)
263
+ return '';
264
+ const blocks = [];
265
+ for (const [target, { kind, methods }] of byTarget) {
266
+ const memberLines = [];
267
+ for (const [name, { params, jsdoc, paramTypes, optionalParams, returnType }] of methods) {
268
+ if (jsdoc)
269
+ memberLines.push(indentLines(jsdoc, ' '.repeat(4)));
270
+ let isSawOptional = false;
271
+ const parameterString = params
272
+ .map((p) => {
273
+ const optional = isSawOptional || optionalParams.has(p);
274
+ if (optional)
275
+ isSawOptional = true;
276
+ return `${p}${optional ? '?' : ''}: ${paramTypes.get(p) ?? 'any'}`;
277
+ })
278
+ .join(', ');
279
+ // Namespace members use `function name(...)`; interface members `name(...)`.
280
+ memberLines.push(kind === 'namespace'
281
+ ? ` function ${name}(${parameterString}): ${returnType};`
282
+ : ` ${name}(${parameterString}): ${returnType};`);
283
+ }
284
+ const header = kind === 'namespace' ? `declare namespace ${target}` : `interface ${target}`;
285
+ blocks.push(`${header} {\n${memberLines.join('\n')}\n}`);
286
+ }
287
+ return blocks.join('\n') + '\n';
288
+ }
289
+ /**
290
+ * Map a single JSDoc type token to a TypeScript-safe type. Primitives and the
291
+ * known built-in interfaces pass through (with canonical casing); `Array`
292
+ * becomes `any[]`; anything not recognised (e.g. user types like `Client` that
293
+ * are not declared in the virtual program) falls back to `any` so the generated
294
+ * `.polyfills.d.ts` never references an undeclared name.
295
+ * @param raw - a single JSDoc type token (no `{}`)
296
+ * @returns a TypeScript-safe type string
297
+ */
298
+ function jsdocTokenToTsType(raw) {
299
+ const t = raw.trim();
300
+ if (!t)
301
+ return 'any';
302
+ // String literal unions like 'a'|'b' — keep as-is (valid TS literal types).
303
+ if (/^(['"]).*\1$/.test(t))
304
+ return t;
305
+ const lower = t.toLowerCase();
306
+ switch (lower) {
307
+ case 'array': {
308
+ return 'any[]';
309
+ }
310
+ case 'void':
311
+ case 'undefined':
312
+ case 'null':
313
+ case 'any': {
314
+ return lower;
315
+ }
316
+ case 'string':
317
+ case 'number':
318
+ case 'boolean': {
319
+ return lower;
320
+ }
321
+ case 'object': {
322
+ return 'Object';
323
+ }
324
+ case 'date': {
325
+ return 'Date';
326
+ }
327
+ case 'function': {
328
+ return 'Function';
329
+ }
330
+ case 'regexp': {
331
+ return 'RegExp';
332
+ }
333
+ default: {
334
+ return 'any';
335
+ }
336
+ }
337
+ }
338
+ /**
339
+ * Convert a JSDoc type expression (the text inside `{...}`) into a TypeScript
340
+ * type, supporting `|` unions and `Type[]` array suffixes. Unknown tokens
341
+ * degrade to `any`.
342
+ * @param expression - JSDoc type expression without surrounding braces
343
+ * @returns a TypeScript-safe type string
344
+ */
345
+ function jsdocTypeToTs(expression) {
346
+ const trimmed = expression.trim();
347
+ if (!trimmed)
348
+ return 'any';
349
+ if (trimmed.includes('|')) {
350
+ return trimmed
351
+ .split('|')
352
+ .map((p) => jsdocTypeToTs(p))
353
+ .join(' | ');
354
+ }
355
+ // `Type[]` suffix.
356
+ const arrayMatch = trimmed.match(/^(.+?)\s*\[\s*\]$/);
357
+ if (arrayMatch) {
358
+ const inner = jsdocTokenToTsType(arrayMatch[1]);
359
+ return inner === 'any' ? 'any[]' : `${inner}[]`;
360
+ }
361
+ return jsdocTokenToTsType(trimmed);
362
+ }
363
+ /**
364
+ * Parse `@param {Type} name` and `@returns {Type}` annotations out of a JSDoc
365
+ * comment block, returning a map of parameter name to TS type, the set of
366
+ * parameters marked optional (JSDoc `[name]` / `[name=default]` syntax), and the
367
+ * return type (defaulting to `any` when no `@returns` type is documented).
368
+ * @param jsdoc - the raw JSDoc comment block
369
+ * @returns parsed parameter types, optional-parameter names, and the return type
370
+ */
371
+ function parseJsdocTypes(jsdoc) {
372
+ const parameterTypes = new Map();
373
+ const optionalParameters = new Set();
374
+ let returnType = 'any';
375
+ if (!jsdoc)
376
+ return { paramTypes: parameterTypes, optionalParams: optionalParameters, returnType };
377
+ // Match `@param {Type} name` and the optional form `@param {Type} [name]`
378
+ // (or `[name=default]`). The bracket and default value only mark optionality
379
+ // — the bare identifier is captured as the parameter name.
380
+ const parameterRe = /@param\s*\{([^}]*)\}\s*(\[)?\s*([$A-Z_a-z][\w$]*)(?:\s*=\s*[^\]]*)?(\])?/g;
381
+ let m;
382
+ while ((m = parameterRe.exec(jsdoc)) !== null) {
383
+ const name = m[3];
384
+ parameterTypes.set(name, jsdocTypeToTs(m[1]));
385
+ if (m[2] === '[' && m[4] === ']')
386
+ optionalParameters.add(name);
387
+ }
388
+ const returnRe = /@returns?\s*\{([^}]*)\}/;
389
+ const rm = returnRe.exec(jsdoc);
390
+ if (rm)
391
+ returnType = jsdocTypeToTs(rm[1]);
392
+ return { paramTypes: parameterTypes, optionalParams: optionalParameters, returnType };
393
+ }
394
+ /**
395
+ * Remove JSDoc *type* annotations from a comment block so it is safe to forward
396
+ * into a generated `.d.ts`. TypeScript type-checks type expressions inside JSDoc
397
+ * tags (`@param {Type}`, `@returns {Type}`, `@property {Type}`, `@typedef
398
+ * {Type}`, …); an undeclared or duplicate type name in a forwarded comment
399
+ * would raise spurious diagnostics and can break the surrounding interface merge.
400
+ * Stripping the `{...}` (and dropping whole `@typedef`/`@property` lines, which
401
+ * only exist to declare types) leaves human-readable descriptions intact while
402
+ * removing anything TypeScript would try to resolve.
403
+ * @param jsdoc - the raw JSDoc comment block
404
+ * @returns the JSDoc block with type annotations removed
405
+ */
406
+ function stripJsdocTypeAnnotations(jsdoc) {
407
+ if (!jsdoc)
408
+ return '';
409
+ const cleaned = jsdoc
410
+ .split('\n')
411
+ .filter((line) => !/^\s*\*?\s*@(?:typedef|property|prop)\b/.test(line))
412
+ // Remove the `{Type}` token from any remaining tag (e.g. @param, @returns).
413
+ .map((line) => line.replaceAll(/(@\w+)\s*\{[^}]*\}/g, '$1'))
414
+ .join('\n');
415
+ return cleaned;
416
+ }
417
+ /**
418
+ * Extract the JSDoc block (`/** … *\/`) immediately preceding `index` in
419
+ * `text`, ignoring intervening whitespace. Returns the raw comment (without
420
+ * surrounding indentation) or an empty string when none is directly adjacent.
421
+ * @param text - full source text
422
+ * @param index - offset of the polyfill assignment
423
+ * @returns the adjacent JSDoc comment, or an empty string
424
+ */
425
+ function extractPrecedingJsdoc(text, index) {
426
+ const before = text.slice(0, index);
427
+ // Only a JSDoc block separated from the assignment by whitespace counts.
428
+ // The body must not contain a `*/`, so the match is the *closest* comment to
429
+ // the assignment — otherwise a lazy `[\s\S]*?` would span from an earlier
430
+ // comment across intervening source code into this one.
431
+ const match = before.match(/\/\*\*(?:(?!\*\/)[\s\S])*\*\/\s*$/);
432
+ if (!match)
433
+ return '';
434
+ // Normalize leading indentation so re-indentation is predictable.
435
+ return match[0]
436
+ .split('\n')
437
+ .map((l) => l.replace(/^\s+/, () => (l.trimStart().startsWith('*') ? ' ' : '')))
438
+ .join('\n');
439
+ }
440
+ /**
441
+ * Re-indent a multi-line block so every line is prefixed with `indent`.
442
+ * @param block - text block to indent
443
+ * @param indent - indentation string to prepend to each line
444
+ * @returns the indented block
445
+ */
446
+ function indentLines(block, indent) {
447
+ return block
448
+ .split('\n')
449
+ .map((l) => indent + l)
450
+ .join('\n');
451
+ }
452
+ /**
453
+ * Compute the `[start, end)` offset ranges of every JSDoc block comment
454
+ * (`/** … *\/`) in the given source text.
455
+ * @param text - full document text
456
+ * @returns an array of `[start, end)` offset tuples
457
+ */
458
+ export function jsdocCommentRanges(text) {
459
+ const ranges = [];
460
+ const re = /\/\*\*[\s\S]*?\*\//g;
461
+ let m;
462
+ while ((m = re.exec(text)) !== null) {
463
+ ranges.push([m.index, m.index + m[0].length]);
464
+ }
465
+ return ranges;
466
+ }
467
+ /**
468
+ * Determine whether `offset` falls within any of the supplied comment ranges.
469
+ * @param offset - character offset to test
470
+ * @param ranges - JSDoc comment ranges from {@link jsdocCommentRanges}
471
+ * @returns true when the offset is inside a JSDoc comment
472
+ */
473
+ export function isInsideJsdoc(offset, ranges) {
474
+ return ranges.some(([start, end]) => offset >= start && offset < end);
475
+ }
476
+ /**
477
+ * Compute the `[start, end)` offset ranges of every prototype-polyfill
478
+ * assignment body — `Ctor.prototype.method = [Ctor.prototype.method ||] function (…) { … }`.
479
+ *
480
+ * The self-guarded form (`X = X || function () {}`) defeats TypeScript's
481
+ * contextual `this` typing under `noLib:true`: the declared `this: any[]`
482
+ * parameter on the merged interface member does not flow into the function
483
+ * operand of the `||`, so a body reading `this.length` or doing `return this`
484
+ * raises spurious ts2339 / ts2322. These are known-good SSJS polyfills, so the
485
+ * `this`-related diagnostics inside their bodies are suppressed.
486
+ * @param text - full document text
487
+ * @returns an array of `[start, end)` offset tuples spanning each assignment body
488
+ */
489
+ export function prototypePolyfillBodyRanges(text) {
490
+ const ranges = [];
491
+ // Match up to the opening `{` of the function body; then balance braces to
492
+ // find the matching close so the whole body is covered.
493
+ const re = /\b(?:Array|String|Number|Boolean|Object|Date|Function|RegExp)\s*\.\s*prototype\s*\.\s*[$A-Z_a-z][\w$]*\s*=\s*(?:[$A-Z_a-z][\w$.]*\s*\|\|\s*)?function\s*\*?\s*[$A-Z_a-z]*\s*\([^)]*\)\s*\{/g;
494
+ let m;
495
+ while ((m = re.exec(text)) !== null) {
496
+ const bodyOpen = m.index + m[0].length - 1;
497
+ let depth = 1;
498
+ let index = bodyOpen + 1;
499
+ for (; index < text.length && depth > 0; index++) {
500
+ const ch = text[index];
501
+ if (ch === '{')
502
+ depth += 1;
503
+ else if (ch === '}')
504
+ depth -= 1;
505
+ }
506
+ ranges.push([m.index, index]);
507
+ }
508
+ return ranges;
509
+ }
510
+ /**
511
+ * Read the method identifier at `offset` inside a generated `.polyfills.d.ts`
512
+ * interface member so the reference remap can locate the matching prototype
513
+ * assignment in the source document.
514
+ * @param text - the polyfills declaration file content
515
+ * @param offset - the reference text-span start within that file
516
+ * @returns the method name at the offset, or an empty string
517
+ */
518
+ export function prototypeMethodNameFor(text, offset) {
519
+ const match = /^[$A-Z_a-z][\w$]*/.exec(text.slice(offset));
520
+ return match ? match[0] : '';
521
+ }
522
+ /**
523
+ * Determine whether `offset` falls inside a line (`// …`) or block (`/* … *\/`)
524
+ * comment in the given source text. Used to detect when TypeScript resolved a
525
+ * prototype-polyfill definition into its leading JSDoc block instead of the
526
+ * assignment identifier, so the definition can be redirected to the code line.
527
+ * @param text - source text to scan
528
+ * @param offset - character offset to test
529
+ * @returns true when the offset lies within a comment
530
+ */
531
+ export function isOffsetInsideComment(text, offset) {
532
+ // Block comments: /* … */ (covers JSDoc /** … */).
533
+ const block = /\/\*[\s\S]*?\*\//g;
534
+ let m;
535
+ while ((m = block.exec(text)) !== null) {
536
+ if (offset >= m.index && offset < m.index + m[0].length)
537
+ return true;
538
+ }
539
+ // Line comments: // … to end of line.
540
+ const line = /\/\/[^\n]*/g;
541
+ while ((m = line.exec(text)) !== null) {
542
+ if (offset >= m.index && offset < m.index + m[0].length)
543
+ return true;
544
+ }
545
+ return false;
546
+ }
547
+ /**
548
+ * Locate the `…prototype.<method>` assignment for a polyfilled method in the
549
+ * document source and return the text span covering the method name, so
550
+ * go-to-definition lands on the polyfill itself.
551
+ * @param text - document source text
552
+ * @param method - the polyfilled method name
553
+ * @returns the method-name text span, or null if not found
554
+ */
555
+ export function findPrototypeAssignmentSpan(text, method) {
556
+ const escaped = method.replaceAll('$', String.raw `\$`);
557
+ const re = new RegExp(String.raw `\bprototype\s*\.\s*(` + escaped + String.raw `)\b`, 'g');
558
+ let match;
559
+ while ((match = re.exec(text)) !== null) {
560
+ // Offset of the captured method name (group 1) within the full match.
561
+ const start = match.index + match[0].indexOf(match[1]);
562
+ // The polyfill's own JSDoc references the method as
563
+ // `Ctor.prototype.method` in prose (e.g. "Polyfill for
564
+ // String.prototype.search"); skip any match inside a comment so the
565
+ // span lands on the real assignment identifier, not the doc text.
566
+ if (isOffsetInsideComment(text, start))
567
+ continue;
568
+ return { start, length: match[1].length };
569
+ }
570
+ return undefined;
571
+ }
572
+ //# sourceMappingURL=source-analysis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-analysis.js","sourceRoot":"","sources":["../../../src/typescript/source-analysis.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,8EAA8E;AAC9E,+BAA+B;AAC/B,8EAA8E;AAE9E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,8BAA8B,CAAC,IAAY;IACvD,0EAA0E;IAC1E,MAAM,cAAc,GAAG,mCAAmC,CAAC;IAC3D,wEAAwE;IACxE,oEAAoE;IACpE,MAAM,KAAK,GAAG,oBAAoB,CAAC;IAEnC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,IAAI,KAA6B,CAAC;IAClC,OAAO,CAAC,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAClD,uDAAuD;QACvD,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACvC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACvB,kDAAkD;YAClD,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACtD,IAAI,IAAI,IAAI,KAAK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C,sEAAsE;QACtE,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACvD,oDAAoD;QACpD,uDAAuD;QACvD,oEAAoE;QACpE,kEAAkE;QAClE,IAAI,qBAAqB,CAAC,IAAI,EAAE,KAAK,CAAC;YAAE,SAAS;QACjD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC9C,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC"}
@@ -118,7 +118,9 @@ export declare function getSanitizedHandlebarsText(text: string): string;
118
118
  * AMPscript regions is preserved (strings blanked, comments blanked).
119
119
  * Everything outside AMPscript regions is replaced with spaces.
120
120
  * This lets validators run regex safely without accidentally matching
121
- * HTML content outside AMPscript blocks.
121
+ * HTML content outside AMPscript blocks. Line breaks are kept everywhere, so
122
+ * that the result has the same lines as the document and a line number found
123
+ * in it is a line number of the document.
122
124
  * @param text - Full document text.
123
125
  * @returns Sanitized text with only AMPscript region content preserved.
124
126
  */
@@ -1 +1 @@
1
- {"version":3,"file":"regions.d.ts","sourceRoot":"","sources":["../../../src/utils/regions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,MAAM,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,QAAQ,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;OAEG;IAC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