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

@neon-rs/load

Package Overview
Dependencies
Maintainers
1
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neon-rs/load - npm Package Compare versions

Comparing version 0.0.29 to 0.0.30

48

dist/index.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.custom = exports.scope = exports.debug = exports.currentTarget = void 0;
const path = __importStar(require("path"));
const fs = __importStar(require("fs"));
exports.custom = exports.scope = exports.currentTarget = void 0;
const node_module_1 = require("node:module");
function currentTarget() {

@@ -98,17 +74,17 @@ let os = null;

}
function debug(...components) {
if (components.length === 0 || !components[components.length - 1].endsWith(".node")) {
components.push("index.node");
}
const pathSpec = path.join(...components);
return fs.existsSync(pathSpec) ? require(pathSpec) : null;
}
exports.debug = debug;
// export function debug(...components: string[]) {
// if (components.length === 0 || !components[components.length - 1].endsWith(".node")) {
// components.push("index.node");
// }
// const pathSpec = path.join(...components);
// return fs.existsSync(pathSpec) ? require(pathSpec) : null;
// }
const requireAbsolute = (0, node_module_1.createRequire)(process.cwd());
function scope(scope) {
return require(scope + "/" + currentTarget());
return requireAbsolute(scope + "/" + currentTarget());
}
exports.scope = scope;
function custom(toRequireSpec) {
return require(toRequireSpec(currentTarget()));
return requireAbsolute(toRequireSpec(currentTarget()));
}
exports.custom = custom;
{
"name": "@neon-rs/load",
"version": "0.0.29",
"version": "0.0.30",
"description": "Utilities for loading Neon modules.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

export declare function currentTarget(): string;
export declare function debug(...components: string[]): any;
export declare function scope(scope: string): any;
export declare function custom(toRequireSpec: (target: string) => string): any;
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