@ms-cloudpack/path-utilities 2.5.0 → 2.6.1
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/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/normalizedPathRelativeTo.d.ts +8 -0
- package/lib/normalizedPathRelativeTo.d.ts.map +1 -0
- package/lib/normalizedPathRelativeTo.js +17 -0
- package/lib/normalizedPathRelativeTo.js.map +1 -0
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { isFileSync } from './isFileSync.js';
|
|
|
4
4
|
export { isFile } from './isFile.js';
|
|
5
5
|
export { isFolderSync } from './isFolderSync.js';
|
|
6
6
|
export { isFolder } from './isFolder.js';
|
|
7
|
+
export { normalizedPathRelativeTo } from './normalizedPathRelativeTo.js';
|
|
7
8
|
export { typescriptExtensions, javascriptExtensions, sourceExtensions } from './sourceExtensions.js';
|
|
8
9
|
export { sourceToIntermediatePath } from './sourceToIntermediatePath.js';
|
|
9
10
|
export { findPackageRoot } from './findPackageRoot.js';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACrG,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACrG,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export { isFileSync } from './isFileSync.js';
|
|
|
4
4
|
export { isFile } from './isFile.js';
|
|
5
5
|
export { isFolderSync } from './isFolderSync.js';
|
|
6
6
|
export { isFolder } from './isFolder.js';
|
|
7
|
+
export { normalizedPathRelativeTo } from './normalizedPathRelativeTo.js';
|
|
7
8
|
export { typescriptExtensions, javascriptExtensions, sourceExtensions } from './sourceExtensions.js';
|
|
8
9
|
export { sourceToIntermediatePath } from './sourceToIntermediatePath.js';
|
|
9
10
|
export { findPackageRoot } from './findPackageRoot.js';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACrG,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["export { globSourceFiles } from './globSourceFiles.js';\nexport { intermediateToSourcePath } from './intermediateToSourcePath.js';\nexport { isFileSync } from './isFileSync.js';\nexport { isFile } from './isFile.js';\nexport { isFolderSync } from './isFolderSync.js';\nexport { isFolder } from './isFolder.js';\nexport { typescriptExtensions, javascriptExtensions, sourceExtensions } from './sourceExtensions.js';\nexport { sourceToIntermediatePath } from './sourceToIntermediatePath.js';\nexport { findPackageRoot } from './findPackageRoot.js';\nexport { pathSymbolReplacement } from './pathSymbolReplacement.js';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACrG,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["export { globSourceFiles } from './globSourceFiles.js';\nexport { intermediateToSourcePath } from './intermediateToSourcePath.js';\nexport { isFileSync } from './isFileSync.js';\nexport { isFile } from './isFile.js';\nexport { isFolderSync } from './isFolderSync.js';\nexport { isFolder } from './isFolder.js';\nexport { normalizedPathRelativeTo } from './normalizedPathRelativeTo.js';\nexport { typescriptExtensions, javascriptExtensions, sourceExtensions } from './sourceExtensions.js';\nexport { sourceToIntermediatePath } from './sourceToIntermediatePath.js';\nexport { findPackageRoot } from './findPackageRoot.js';\nexport { pathSymbolReplacement } from './pathSymbolReplacement.js';\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get a normalized path relative to another path. This should be used when getting a relative path
|
|
3
|
+
* which you want to normalize (same logic as `normalizeRelativePath`), but there's any risk that
|
|
4
|
+
* the files might possibly be on different Windows drive letters. If this is the case, an absolute
|
|
5
|
+
* path with normalized slashes is returned.
|
|
6
|
+
*/
|
|
7
|
+
export declare function normalizedPathRelativeTo(fromPath: string, toPath: string): string;
|
|
8
|
+
//# sourceMappingURL=normalizedPathRelativeTo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizedPathRelativeTo.d.ts","sourceRoot":"","sources":["../src/normalizedPathRelativeTo.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAOjF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { slash, normalizeRelativePath } from '@ms-cloudpack/path-string-parsing';
|
|
3
|
+
/**
|
|
4
|
+
* Get a normalized path relative to another path. This should be used when getting a relative path
|
|
5
|
+
* which you want to normalize (same logic as `normalizeRelativePath`), but there's any risk that
|
|
6
|
+
* the files might possibly be on different Windows drive letters. If this is the case, an absolute
|
|
7
|
+
* path with normalized slashes is returned.
|
|
8
|
+
*/
|
|
9
|
+
export function normalizedPathRelativeTo(fromPath, toPath) {
|
|
10
|
+
const relativePath = path.relative(fromPath, toPath);
|
|
11
|
+
if (path.isAbsolute(relativePath)) {
|
|
12
|
+
// this is the different drive letters case
|
|
13
|
+
return slash(toPath);
|
|
14
|
+
}
|
|
15
|
+
return normalizeRelativePath(relativePath);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=normalizedPathRelativeTo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizedPathRelativeTo.js","sourceRoot":"","sources":["../src/normalizedPathRelativeTo.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAEjF;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,QAAgB,EAAE,MAAc;IACvE,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACrD,IAAI,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QAClC,2CAA2C;QAC3C,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,qBAAqB,CAAC,YAAY,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["import path from 'path';\nimport { slash, normalizeRelativePath } from '@ms-cloudpack/path-string-parsing';\n\n/**\n * Get a normalized path relative to another path. This should be used when getting a relative path\n * which you want to normalize (same logic as `normalizeRelativePath`), but there's any risk that\n * the files might possibly be on different Windows drive letters. If this is the case, an absolute\n * path with normalized slashes is returned.\n */\nexport function normalizedPathRelativeTo(fromPath: string, toPath: string): string {\n const relativePath = path.relative(fromPath, toPath);\n if (path.isAbsolute(relativePath)) {\n // this is the different drive letters case\n return slash(toPath);\n }\n return normalizeRelativePath(relativePath);\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/path-utilities",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "Utilities for resolving paths between source/intermediate/output locations in Cloudpack.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"test": "cloudpack-scripts test"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@ms-cloudpack/path-string-parsing": "^1.1
|
|
27
|
+
"@ms-cloudpack/path-string-parsing": "^1.2.1",
|
|
28
28
|
"fast-glob": "^3.2.12"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|