Socket
Socket
Sign inDemoInstall

@bentley/bentleyjs-core

Package Overview
Dependencies
Maintainers
4
Versions
524
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bentley/bentleyjs-core - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

12

CHANGELOG.json

@@ -5,2 +5,14 @@ {

{
"version": "2.2.0",
"tag": "@bentley/bentleyjs-core_v2.2.0",
"date": "Fri, 19 Jun 2020 14:10:03 GMT",
"comments": {
"none": [
{
"comment": "Introduce GeoServiceStatus status code"
}
]
}
},
{
"version": "2.1.0",

@@ -7,0 +19,0 @@ "tag": "@bentley/bentleyjs-core_v2.1.0",

9

CHANGELOG.md
# Change Log - @bentley/bentleyjs-core
This log was last generated on Thu, 28 May 2020 22:48:59 GMT and should not be manually modified.
This log was last generated on Fri, 19 Jun 2020 14:10:03 GMT and should not be manually modified.
## 2.2.0
Fri, 19 Jun 2020 14:10:03 GMT
### Updates
- Introduce GeoServiceStatus status code
## 2.1.0

@@ -6,0 +13,0 @@ Thu, 28 May 2020 22:48:59 GMT

@@ -328,2 +328,16 @@ /** @packageDocumentation

}
/** GeoServiceStatus errors
* @public
*/
export declare enum GeoServiceStatus {
Success = 0,
GEOSERVICESTATUS_BASE = 147456,
NoGeoLocation = 65602,
OutOfUsefulRange = 147457,
OutOfMathematicalDomain = 147458,
NoDatumConverter = 147459,
VerticalDatumConvertError = 147460,
CSMapError = 147461,
Pending = 147462
}
/** When you want to associate an explanatory message with an error status value.

@@ -330,0 +344,0 @@ * @beta Internal?

@@ -347,2 +347,19 @@ "use strict";

})(ExtensionStatus = exports.ExtensionStatus || (exports.ExtensionStatus = {}));
/** GeoServiceStatus errors
* @public
*/
var GeoServiceStatus;
(function (GeoServiceStatus) {
GeoServiceStatus[GeoServiceStatus["Success"] = 0] = "Success";
GeoServiceStatus[GeoServiceStatus["GEOSERVICESTATUS_BASE"] = 147456] = "GEOSERVICESTATUS_BASE";
// Error mapped from 'IModelStatus'
GeoServiceStatus[GeoServiceStatus["NoGeoLocation"] = 65602] = "NoGeoLocation";
// Following errors are mapped from 'GeoCoordStatus'
GeoServiceStatus[GeoServiceStatus["OutOfUsefulRange"] = 147457] = "OutOfUsefulRange";
GeoServiceStatus[GeoServiceStatus["OutOfMathematicalDomain"] = 147458] = "OutOfMathematicalDomain";
GeoServiceStatus[GeoServiceStatus["NoDatumConverter"] = 147459] = "NoDatumConverter";
GeoServiceStatus[GeoServiceStatus["VerticalDatumConvertError"] = 147460] = "VerticalDatumConvertError";
GeoServiceStatus[GeoServiceStatus["CSMapError"] = 147461] = "CSMapError";
GeoServiceStatus[GeoServiceStatus["Pending"] = 147462] = "Pending";
})(GeoServiceStatus = exports.GeoServiceStatus || (exports.GeoServiceStatus = {}));
/** The error type thrown by this module. `BentleyError` subclasses `Error` to add an `errorNumber` member. See [[IModelStatus]] for `errorNumber` values.

@@ -668,2 +685,10 @@ * @public

case ExtensionStatus.UploadError: return "Failed to upload file";
// GeoServiceStatus
case GeoServiceStatus.NoGeoLocation: return "No GeoLocation";
case GeoServiceStatus.OutOfUsefulRange: return "Out of useful range";
case GeoServiceStatus.OutOfMathematicalDomain: return "Out of mathematical domain";
case GeoServiceStatus.NoDatumConverter: return "No datum converter";
case GeoServiceStatus.VerticalDatumConvertError: return "Vertical datum convert error";
case GeoServiceStatus.CSMapError: return "CSMap error";
case GeoServiceStatus.Pending: return "Pending";
// Unexpected cases

@@ -670,0 +695,0 @@ case IModelStatus.Success:

@@ -15,2 +15,12 @@ "use strict";

exports.isElectronRenderer = isElectronRendererFn();
function electronRendererFn() {
if (exports.isElectronRenderer) {
// Wrapping this require in a try/catch signals to webpack that this is only an optional dependency
try {
return require("electron"); // tslint:disable-line:no-var-requires
}
catch (error) { }
}
return undefined;
}
/**

@@ -21,3 +31,3 @@ * Utility to wrap import of the electron module

*/
exports.electronRenderer = (exports.isElectronRenderer) ? require("electron") : undefined; // tslint:disable-line:no-var-requires
exports.electronRenderer = electronRendererFn();
//# sourceMappingURL=ElectronUtils.js.map

12

lib/Id.d.ts

@@ -253,10 +253,8 @@ /** @packageDocumentation

/**
* Normalize a Guid value if possible. Normalization converts the Guid string to a standard format. The following processing is done -
* - Trim any leading or trailing whitespace characters
* - Convert to lower case
* - Convert to the standard Guid format "8-4-4-4-12". Note that each of the numbers in the format represents a group of characters of that size. These groups are separated by dashes to make up the entire Guid string.
* - If the above conversion fails, return the *original* string that was passed in as-is.
* Normalize a Guid string if possible. Normalization consists of:
* - Convert all characters to lower case
* - Trim any leading or trailing whitespace
* - Convert to the standard Guid format "8-4-4-4-12", repositioning the '-' characters as necessary, presuming there are exactly 32 hexadecimal digits.
* @param value Input value that represents a Guid
* @returns Normalized representation of the Guid string
* @internal
* @returns Normalized representation of the Guid string. If the normalization fails, return the *original* value unmodified (Note: it is *not* a valid Guid)
*/

@@ -263,0 +261,0 @@ function normalize(value: GuidString): GuidString;

@@ -575,17 +575,15 @@ "use strict";

/**
* Normalize a Guid value if possible. Normalization converts the Guid string to a standard format. The following processing is done -
* - Trim any leading or trailing whitespace characters
* - Convert to lower case
* - Convert to the standard Guid format "8-4-4-4-12". Note that each of the numbers in the format represents a group of characters of that size. These groups are separated by dashes to make up the entire Guid string.
* - If the above conversion fails, return the *original* string that was passed in as-is.
* Normalize a Guid string if possible. Normalization consists of:
* - Convert all characters to lower case
* - Trim any leading or trailing whitespace
* - Convert to the standard Guid format "8-4-4-4-12", repositioning the '-' characters as necessary, presuming there are exactly 32 hexadecimal digits.
* @param value Input value that represents a Guid
* @returns Normalized representation of the Guid string
* @internal
* @returns Normalized representation of the Guid string. If the normalization fails, return the *original* value unmodified (Note: it is *not* a valid Guid)
*/
function normalize(value) {
const lowerValue = value.toLowerCase().trim();
// Return if it's already formatted to be a Guid or a V4Guid
// Return if it's already formatted to be a Guid
if (isGuid(lowerValue))
return lowerValue;
// Remove any existing "-" in-between and try to parse the string as a guid
// Remove any existing "-" characters and position them properly, if there remains exactly 32 hexadecimal digits
const noDashValue = lowerValue.replace(/-/g, "");

@@ -596,3 +594,3 @@ const noDashPattern = /^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/;

}
// Return original string if it cannot be normalized
// Return unmodified string - (note: it is *not* a valid Guid)
return value;

@@ -599,0 +597,0 @@ }

{
"name": "@bentley/bentleyjs-core",
"version": "2.1.0",
"version": "2.2.0",
"description": "Bentley JavaScript core components",

@@ -33,3 +33,3 @@ "main": "lib/bentleyjs-core.js",

"devDependencies": {
"@bentley/build-tools": "2.1.0",
"@bentley/build-tools": "2.2.0",
"@types/chai": "^4.1.4",

@@ -36,0 +36,0 @@ "@types/chai-as-promised": "^7",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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