Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-opcua-service-translate-browse-path

Package Overview
Dependencies
Maintainers
1
Versions
219
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-opcua-service-translate-browse-path - npm Package Compare versions

Comparing version 2.31.0 to 2.32.0

6

dist/make_browse_path.d.ts

@@ -0,2 +1,6 @@

import { NodeId, NodeIdLike } from "node-opcua-nodeid";
import { BrowsePath } from "node-opcua-types";
export declare function makeBrowsePath(rootNode: any, relativePathBNF: string): BrowsePath;
export declare type NodeIdLikeOrWithNodeId = NodeIdLike | {
nodeId: NodeId;
};
export declare function makeBrowsePath(rootNode: NodeIdLikeOrWithNodeId, relativePathBNF: string): BrowsePath;

2

dist/make_browse_path.js

@@ -8,3 +8,3 @@ "use strict";

function _get_nodeId(node) {
if (node.nodeId) {
if (node.hasOwnProperty("nodeId")) {
return node.nodeId;

@@ -11,0 +11,0 @@ }

@@ -0,1 +1,2 @@

import { RelativePath } from "node-opcua-types";
/**

@@ -14,2 +15,2 @@ * construct a RelativePath from a string containing the relative path description.

*/
export declare function makeRelativePath(str: string, addressSpace?: any): any;
export declare function makeRelativePath(str: string, addressSpace?: any): RelativePath;

@@ -136,5 +136,5 @@ "use strict";

// match 3 => "#" or null
includeSubtypes = (matches[3] !== "#");
includeSubtypes = matches[3] !== "#";
// match 4 => "!" or null
isInverse = (matches[4] === "!");
isInverse = matches[4] === "!";
// match 5

@@ -141,0 +141,0 @@ // namespace match 6 ( ns:)

{
"name": "node-opcua-service-translate-browse-path",
"version": "2.31.0",
"version": "2.32.0",
"description": "pure nodejs OPCUA SDK - module -service-translate-browse-path",

@@ -14,15 +14,15 @@ "scripts": {

"node-opcua-assert": "2.29.0",
"node-opcua-basic-types": "2.31.0",
"node-opcua-basic-types": "2.32.0",
"node-opcua-binary-stream": "2.29.0",
"node-opcua-constants": "2.29.0",
"node-opcua-data-model": "2.31.0",
"node-opcua-factory": "2.31.0",
"node-opcua-data-model": "2.32.0",
"node-opcua-factory": "2.32.0",
"node-opcua-nodeid": "2.31.0",
"node-opcua-service-secure-channel": "2.31.0",
"node-opcua-types": "2.31.0"
"node-opcua-service-secure-channel": "2.32.0",
"node-opcua-types": "2.32.0"
},
"devDependencies": {
"node-opcua-generator": "2.31.0",
"node-opcua-generator": "2.32.0",
"should": "^13.2.3",
"sinon": "^9.2.3"
"sinon": "^9.2.4"
},

@@ -44,3 +44,3 @@ "author": "Etienne Rossignon",

"homepage": "http://node-opcua.github.io/",
"gitHead": "344be19d71445220cf23569881e0234a79d63ee2"
"gitHead": "0837f665b683c6a891d495ae8cf6f701e4a8450e"
}

@@ -5,13 +5,18 @@ /**

import { assert } from "node-opcua-assert";
import { NodeId, resolveNodeId } from "node-opcua-nodeid";
import { NodeId, NodeIdLike, resolveNodeId } from "node-opcua-nodeid";
import { BrowsePath } from "node-opcua-types";
import { makeRelativePath } from "./make_relative_path";
function _get_nodeId(node: any): NodeId {
if (node.nodeId) {
return node.nodeId;
export declare type NodeIdLikeOrWithNodeId =
| NodeIdLike
| {
nodeId: NodeId;
};
function _get_nodeId(node: NodeIdLikeOrWithNodeId): NodeId {
if (node.hasOwnProperty("nodeId")) {
return (node as any).nodeId;
}
return resolveNodeId(node);
return resolveNodeId(node as NodeIdLike);
}
export function makeBrowsePath(rootNode: any, relativePathBNF: string) {
export function makeBrowsePath(rootNode: NodeIdLikeOrWithNodeId, relativePathBNF: string): BrowsePath {
return new BrowsePath({

@@ -18,0 +23,0 @@ startingNode: _get_nodeId(rootNode),

@@ -112,4 +112,3 @@ /**

*/
export function makeRelativePath(str: string, addressSpace?: any) {
export function makeRelativePath(str: string, addressSpace?: any): RelativePath {
let r: any = {

@@ -139,3 +138,2 @@ elements: []

} else if (refStr === ".") {
referenceTypeId = aggregatesReferenceTypeNodeId;

@@ -145,8 +143,7 @@ isInverse = false;

} else {
// match 3 => "#" or null
includeSubtypes = (matches[3] !== "#");
includeSubtypes = matches[3] !== "#";
// match 4 => "!" or null
isInverse = (matches[4] === "!");
isInverse = matches[4] === "!";

@@ -160,3 +157,2 @@ // match 5

referenceTypeId = resolveNodeId(name);
} else {

@@ -171,3 +167,3 @@ // AddressSpace.prototype.findReferenceType = function (refType,namespace)

r.elements.push({referenceTypeId, isInverse, includeSubtypes, targetName});
r.elements.push({ referenceTypeId, isInverse, includeSubtypes, targetName });

@@ -174,0 +170,0 @@ str = str.substr(matches[0].length);

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