New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-opcua-service-translate-browse-path

Package Overview
Dependencies
Maintainers
0
Versions
222
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.139.0 to 2.141.0

9

dist/make_relative_path.d.ts

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

import { RelativePath } from "node-opcua-types";
import { RelativePath, RelativePathElement } from "node-opcua-types";
export declare function unescape(str: string): string;
export declare function escape(str: string): string;
export interface RelativePathEx extends RelativePath {
elements: RelativePathElement[];
}
/**

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

*/
export declare function makeRelativePath(str: string, addressSpace?: any): RelativePath;
export declare function makeRelativePath(str: string, addressSpace?: any): RelativePathEx;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.unescape = unescape;
exports.escape = escape;
exports.makeRelativePath = makeRelativePath;

@@ -75,3 +77,5 @@ /**

//
// regular character
const regCharacters = /[^/.<>:#!&]/;
// reserved character
const regReservedCharacters = /[/.<>:#!&]/;

@@ -84,4 +88,24 @@ const regName = new RegExp("(" + regCharacters.source + "|(&" + regReservedCharacters.source + "))+");

function unescape(str) {
return str.replace(/&/g, "");
// replace all &x by
str = str.replace(/&\//g, "/");
str = str.replace(/&\./g, ".");
str = str.replace(/&</g, "<");
str = str.replace(/&>/g, ">");
str = str.replace(/&:/g, ":");
str = str.replace(/&#/g, "#");
str = str.replace(/&!/g, "!");
return str.replace(/&&/g, "&");
}
function escape(str) {
// replace all &x by
str = str.replace(/&/g, "&&");
str = str.replace(/\//g, "&/");
str = str.replace(/\./g, "&.");
str = str.replace(/</g, "&<");
str = str.replace(/>/g, "&>");
str = str.replace(/:/g, "&:");
str = str.replace(/#/g, "&#");
str = str.replace(/!/g, "&!");
return str;
}
function makeQualifiedName(mm) {

@@ -88,0 +112,0 @@ const strName = mm[10];

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

import { QualifiedName } from "node-opcua-data-model";
import { QualifiedNameLike } from "node-opcua-data-model";
import { NodeId } from "node-opcua-nodeid";

@@ -10,2 +10,2 @@ import { BrowsePath } from "./imports";

nodeId: NodeId;
}, targetNames: QualifiedName[] | null): BrowsePath;
}, targetNames: QualifiedNameLike[] | null): BrowsePath;
{
"name": "node-opcua-service-translate-browse-path",
"version": "2.139.0",
"version": "2.141.0",
"description": "pure nodejs OPCUA SDK - module service-translate-browse-path",

@@ -17,3 +17,3 @@ "scripts": {

"node-opcua-nodeid": "2.139.0",
"node-opcua-types": "2.139.0"
"node-opcua-types": "2.141.0"
},

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

"homepage": "http://node-opcua.github.io/",
"gitHead": "b7a01d31c7602d323e60a5f4a54428199a266f29",
"gitHead": "7467e145ce9ebad2c80cabb096189bda7714083d",
"files": [

@@ -38,0 +38,0 @@ "dist",

@@ -7,3 +7,3 @@ /**

import { NodeId, resolveNodeId } from "node-opcua-nodeid";
import { RelativePath } from "node-opcua-types";
import { RelativePath, RelativePathElement } from "node-opcua-types";
/*=

@@ -77,7 +77,14 @@ * Release 1.03 page 152 OPC Unified Architecture, Part 4

//
// regular character
const regCharacters = /[^/.<>:#!&]/;
// reserved character
const regReservedCharacters = /[/.<>:#!&]/;
const regName = new RegExp("(" + regCharacters.source + "|(&" + regReservedCharacters.source + "))+");
const regNamespaceIndex = /[0-9]+/;
const regBrowseName = new RegExp("(" + regNamespaceIndex.source + ":)?(" + regName.source + ")");
const regReferenceType = new RegExp("/|\\.|(<(#)?(!)?(" + regBrowseName.source + ")>)");

@@ -87,6 +94,27 @@

function unescape(str: string): string {
return str.replace(/&/g, "");
export function unescape(str: string): string {
// replace all &x by
str = str.replace(/&\//g, "/");
str = str.replace(/&\./g, ".");
str = str.replace(/&</g, "<");
str = str.replace(/&>/g, ">");
str = str.replace(/&:/g, ":");
str = str.replace(/&#/g, "#");
str = str.replace(/&!/g, "!");
return str.replace(/&&/g, "&");
}
export function escape(str: string): string {
// replace all &x by
str = str.replace(/&/g, "&&");
str = str.replace(/\//g, "&/");
str = str.replace(/\./g, "&.");
str = str.replace(/</g, "&<");
str = str.replace(/>/g, "&>");
str = str.replace(/:/g, "&:");
str = str.replace(/#/g, "&#");
str = str.replace(/!/g, "&!");
return str;
}
function makeQualifiedName(mm: RegExpMatchArray): QualifiedName {

@@ -102,2 +130,7 @@ const strName = mm[10];

export interface RelativePathEx extends RelativePath {
elements: RelativePathElement[];
}
/**

@@ -116,3 +149,3 @@ * construct a RelativePath from a string containing the relative path description.

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

@@ -119,0 +152,0 @@ elements: []

@@ -5,3 +5,3 @@ /**

import { ReferenceTypeIds } from "node-opcua-constants";
import { QualifiedName } from "node-opcua-data-model";
import { QualifiedName, QualifiedNameLike } from "node-opcua-data-model";
import { makeNodeId, NodeId } from "node-opcua-nodeid";

@@ -20,3 +20,3 @@ import { BrowsePath } from "./imports";

startingNode: { nodeId: NodeId },
targetNames: QualifiedName[] | null
targetNames: QualifiedNameLike[] | null
): BrowsePath {

@@ -23,0 +23,0 @@ targetNames = targetNames || [];

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