Socket
Socket
Sign inDemoInstall

@platform/cell.schema

Package Overview
Dependencies
Maintainers
1
Versions
289
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@platform/cell.schema - npm Package Compare versions

Comparing version 0.5.71 to 0.5.72

2

lib/common/constants.pkg.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc