@platform/cell.schema
Advanced tools
Comparing version 0.5.71 to 0.5.72
@@ -6,3 +6,3 @@ "use strict"; | ||
name: '@platform/cell.schema', | ||
version: '0.5.71', | ||
version: '0.5.72', | ||
}; |
@@ -10,2 +10,20 @@ export declare const FilePath: { | ||
}; | ||
Local: { | ||
toAbsolutePath(args: { | ||
path: string; | ||
root: string; | ||
}): string; | ||
toRelativePath(args: { | ||
path: string; | ||
root: string; | ||
}): string; | ||
toAbsoluteLocation(args: { | ||
path: string; | ||
root: string; | ||
}): string; | ||
toRelativeLocation(args: { | ||
path: string; | ||
root: string; | ||
}): string; | ||
}; | ||
}; |
@@ -36,2 +36,33 @@ "use strict"; | ||
}, | ||
Local: { | ||
toAbsolutePath: function (args) { | ||
var root = Clean.root(args.root); | ||
var path = Clean.path(args.path, root); | ||
return root + "/" + path; | ||
}, | ||
toRelativePath: function (args) { | ||
var root = Clean.root(args.root); | ||
var path = Clean.path(args.path, root); | ||
return "~/" + path; | ||
}, | ||
toAbsoluteLocation: function (args) { | ||
return "file://" + exports.FilePath.Local.toAbsolutePath(args); | ||
}, | ||
toRelativeLocation: function (args) { | ||
return "file://" + exports.FilePath.Local.toRelativePath(args); | ||
}, | ||
}, | ||
}; | ||
var Clean = { | ||
root: function (path) { | ||
return (path !== null && path !== void 0 ? path : '').trim().replace(/\/*$/, ''); | ||
}, | ||
path: function (path, root) { | ||
return (path !== null && path !== void 0 ? path : '') | ||
.trim() | ||
.replace(/^file\:\/\//, '') | ||
.replace(new RegExp("^" + root), '') | ||
.replace(/^\~\//, '') | ||
.replace(/^\/*/, ''); | ||
}, | ||
}; |
@@ -59,2 +59,20 @@ import { t } from '../common'; | ||
}; | ||
Local: { | ||
toAbsolutePath(args: { | ||
path: string; | ||
root: string; | ||
}): string; | ||
toRelativePath(args: { | ||
path: string; | ||
root: string; | ||
}): string; | ||
toAbsoluteLocation(args: { | ||
path: string; | ||
root: string; | ||
}): string; | ||
toRelativeLocation(args: { | ||
path: string; | ||
root: string; | ||
}): string; | ||
}; | ||
}; | ||
@@ -61,0 +79,0 @@ type: "FILE"; |
@@ -64,2 +64,20 @@ import { t, hash, coord, Mime } from '../common'; | ||
}; | ||
Local: { | ||
toAbsolutePath(args: { | ||
path: string; | ||
root: string; | ||
}): string; | ||
toRelativePath(args: { | ||
path: string; | ||
root: string; | ||
}): string; | ||
toAbsoluteLocation(args: { | ||
path: string; | ||
root: string; | ||
}): string; | ||
toRelativeLocation(args: { | ||
path: string; | ||
root: string; | ||
}): string; | ||
}; | ||
}; | ||
@@ -66,0 +84,0 @@ type: "FILE"; |
{ | ||
"name": "@platform/cell.schema", | ||
"version": "0.5.71", | ||
"version": "0.5.72", | ||
"description": "URI and database schemas for the `cell.os`.", | ||
@@ -15,4 +15,4 @@ "main": "lib/index", | ||
"@platform/cache": "0.3.17", | ||
"@platform/cell.coord": "0.8.253", | ||
"@platform/cell.types": "0.5.68", | ||
"@platform/cell.coord": "0.8.254", | ||
"@platform/cell.types": "0.5.69", | ||
"@platform/fs.types": "0.1.8", | ||
@@ -19,0 +19,0 @@ "@platform/fsdb.types": "0.6.58", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
90090
2448
+ Added@platform/cell.coord@0.8.254(transitive)
+ Added@platform/cell.types@0.5.69(transitive)
- Removed@platform/cell.coord@0.8.253(transitive)
- Removed@platform/cell.types@0.5.68(transitive)
Updated@platform/cell.coord@0.8.254
Updated@platform/cell.types@0.5.69