@hyperframes/parsers 0.9.35 → 0.9.36
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.
|
@@ -50,6 +50,7 @@ declare function cleanAssetUrl(url: string): string;
|
|
|
50
50
|
declare function isWithinProjectRoot(projectDir: string, candidate: string, pathModule?: PathModuleLike): boolean;
|
|
51
51
|
declare function resolveLocalAssetCandidates(projectDir: string, url: string): string[];
|
|
52
52
|
declare function namesAnotherNetworkRoot(base: string, target: string): boolean;
|
|
53
|
+
declare function srcOnAnotherNetworkRoot(projectDir: string, src: string): boolean;
|
|
53
54
|
/** The project file a data-composition-src names, as the preview reads it; null when it leaves the project. */
|
|
54
55
|
declare function resolveCompositionSrc(projectDir: string, src: string): string | null;
|
|
55
56
|
declare function localAbsoluteAssetFile(projectDir: string, src: string): string | null;
|
|
@@ -77,4 +78,4 @@ declare const readTextFile: (path: string) => string;
|
|
|
77
78
|
/** Reads through one descriptor, so the file-type check and the read see the same file. */
|
|
78
79
|
declare function readProjectFile(path: string): ProjectFileRead;
|
|
79
80
|
|
|
80
|
-
export { type ProjectFileRead, cleanAssetUrl, collectSubCompositionSrcs, decodeTextHonoringBom, hasUnresolvedTemplatingToken, isRemoteOrInlineUrl, isUnresolvedAssetPlaceholder, isWithinProjectRoot, localAbsoluteAssetFile, maskNonScannableRanges, namesAnotherNetworkRoot, readProjectFile, readTextFile, resolveAuthoredAssetFile, resolveCompositionSrc, resolveExistingLocalAsset, resolveLocalAssetCandidates, resolveProjectRelativeSrc };
|
|
81
|
+
export { type ProjectFileRead, cleanAssetUrl, collectSubCompositionSrcs, decodeTextHonoringBom, hasUnresolvedTemplatingToken, isRemoteOrInlineUrl, isUnresolvedAssetPlaceholder, isWithinProjectRoot, localAbsoluteAssetFile, maskNonScannableRanges, namesAnotherNetworkRoot, readProjectFile, readTextFile, resolveAuthoredAssetFile, resolveCompositionSrc, resolveExistingLocalAsset, resolveLocalAssetCandidates, resolveProjectRelativeSrc, srcOnAnotherNetworkRoot };
|
package/dist/assetResolution.js
CHANGED
|
@@ -210,6 +210,10 @@ function namesAnotherNetworkRoot(base, target) {
|
|
|
210
210
|
const root = parse(resolve3(target)).root;
|
|
211
211
|
return /^[\\/]{2}/.test(root) && root.toLowerCase() !== parse(resolve3(base)).root.toLowerCase();
|
|
212
212
|
}
|
|
213
|
+
function srcOnAnotherNetworkRoot(projectDir, src) {
|
|
214
|
+
const path = fileUrlAsPath(cleanAssetUrl(src));
|
|
215
|
+
return isAbsolute2(path) && namesAnotherNetworkRoot(projectDir, path);
|
|
216
|
+
}
|
|
213
217
|
var LEADING_PARENT_SEGMENT = /^\.\.(?:[\\/]|$)/;
|
|
214
218
|
function staysInsideProject(projectDir, path) {
|
|
215
219
|
const relativePath = relative2(resolve3(projectDir), path);
|
|
@@ -338,5 +342,6 @@ export {
|
|
|
338
342
|
resolveCompositionSrc,
|
|
339
343
|
resolveExistingLocalAsset,
|
|
340
344
|
resolveLocalAssetCandidates,
|
|
341
|
-
resolveProjectRelativeSrc
|
|
345
|
+
resolveProjectRelativeSrc,
|
|
346
|
+
srcOnAnotherNetworkRoot
|
|
342
347
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/parsers",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.36",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/heygen-com/hyperframes",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"tsx": "^4.21.0",
|
|
140
140
|
"typescript": "^5.0.0",
|
|
141
141
|
"vitest": "^4.1.11",
|
|
142
|
-
"@hyperframes/core": "0.9.
|
|
142
|
+
"@hyperframes/core": "0.9.36"
|
|
143
143
|
},
|
|
144
144
|
"scripts": {
|
|
145
145
|
"build": "tsup",
|