@hyperframes/lint 0.7.84 → 0.7.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4883,6 +4883,7 @@ import { checkSubCompositionUsability } from "@hyperframes/parsers/sub-compositi
4883
4883
  import { parseHTML } from "linkedom";
4884
4884
  import {
4885
4885
  cleanAssetUrl as cleanAssetUrl2,
4886
+ hasUnresolvedTemplatingToken as hasUnresolvedTemplatingToken2,
4886
4887
  isRemoteOrInlineUrl as isRemoteOrInlineUrl2,
4887
4888
  isWithinProjectRoot,
4888
4889
  maskNonScannableRanges as maskNonScannableRanges2,
@@ -4896,6 +4897,7 @@ import { rewriteAssetPath } from "@hyperframes/parsers/asset-paths";
4896
4897
  import { findFfBinary } from "@hyperframes/parsers/ff-binaries";
4897
4898
  import {
4898
4899
  cleanAssetUrl,
4900
+ hasUnresolvedTemplatingToken,
4899
4901
  isRemoteOrInlineUrl,
4900
4902
  maskNonScannableRanges,
4901
4903
  resolveExistingLocalAsset
@@ -4945,7 +4947,9 @@ function collectLocalVideoCandidates(projectDir, htmlSources) {
4945
4947
  const re = new RegExp(videoSrcRe.source, videoSrcRe.flags);
4946
4948
  let match;
4947
4949
  while ((match = re.exec(scannable)) !== null) {
4948
- const src = cleanAssetUrl(match[1] ?? "");
4950
+ const rawSrc = match[1] ?? "";
4951
+ if (hasUnresolvedTemplatingToken(rawSrc)) continue;
4952
+ const src = cleanAssetUrl(rawSrc);
4949
4953
  if (!src) continue;
4950
4954
  if (isRemoteOrInlineUrl(src)) continue;
4951
4955
  if (/^__[A-Z_]+__$/.test(src)) continue;
@@ -5175,6 +5179,7 @@ function lintAudioSrcNotFound(projectDir, htmlSources) {
5175
5179
  const src = match[1];
5176
5180
  if (/^(https?:|data:|blob:)/i.test(src)) continue;
5177
5181
  if (/^__[A-Z_]+__$/.test(src)) continue;
5182
+ if (hasUnresolvedTemplatingToken2(src)) continue;
5178
5183
  const rootRelative = compSrcPath ? rewriteAssetPath2(compSrcPath, src) : src;
5179
5184
  if (!resolveLocalAssetCandidates(projectDir, rootRelative).some(existsSync)) {
5180
5185
  missingSrcs.push(src);
@@ -5203,6 +5208,7 @@ function lintMissingLocalAsset(projectDir, htmlSources) {
5203
5208
  while ((match = re.exec(scannable)) !== null) {
5204
5209
  const tagName = (match[1] ?? "").toLowerCase();
5205
5210
  const rawSrc = match[2] ?? "";
5211
+ if (hasUnresolvedTemplatingToken2(rawSrc)) continue;
5206
5212
  const src = cleanAssetUrl2(rawSrc);
5207
5213
  if (!src) continue;
5208
5214
  if (isRemoteOrInlineUrl2(src)) continue;
@@ -5238,6 +5244,7 @@ function lintTextureMaskAssetNotFound(projectDir, htmlSources) {
5238
5244
  const pattern = new RegExp(MASK_IMAGE_URL_RE.source, MASK_IMAGE_URL_RE.flags);
5239
5245
  while ((match = pattern.exec(cssSource.content)) !== null) {
5240
5246
  const rawUrl = match[1] ?? match[2] ?? match[3] ?? "";
5247
+ if (hasUnresolvedTemplatingToken2(rawUrl)) continue;
5241
5248
  const url = cleanAssetUrl2(rawUrl);
5242
5249
  if (!url || isRemoteOrInlineUrl2(url)) continue;
5243
5250
  if (/^__[A-Z_]+__$/.test(url)) continue;
@@ -5345,6 +5352,7 @@ function lintMissingOrEmptySubComposition(projectDir, rootHtml) {
5345
5352
  const srcPath = (match[1] ?? "").trim();
5346
5353
  if (!srcPath) continue;
5347
5354
  if (/^__[A-Z_]+__$/.test(srcPath)) continue;
5355
+ if (hasUnresolvedTemplatingToken2(srcPath)) continue;
5348
5356
  const filePath = resolve(projectDir, srcPath);
5349
5357
  if (visited.has(filePath)) continue;
5350
5358
  visited.add(filePath);