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.169 to 0.0.170

27

dist/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__UNSTABLE_proxy = exports.__UNSTABLE_loader = exports.lazy = exports.bin = exports.currentTarget = void 0;
exports.__UNSTABLE_proxy = exports.proxy = exports.__UNSTABLE_loader = exports.lazy = exports.bin = exports.currentTarget = void 0;
function currentTarget() {

@@ -153,4 +153,11 @@ let os = null;

exports.__UNSTABLE_loader = __UNSTABLE_loader;
function __UNSTABLE_proxy(loaders) {
function isTargetTable(options) {
return !('targets' in options);
}
function proxy(options) {
if (isTargetTable(options)) {
options = { targets: options };
}
const target = currentTarget();
const loaders = options.targets;
if (!loaders.hasOwnProperty(target)) {

@@ -163,3 +170,13 @@ throw new Error(`no precompiled module found for ${target}`);

if (!loaded) {
loaded = loader();
if (options.debug) {
try {
loaded = options.debug();
}
catch (_e) {
loaded = null;
}
}
if (!loaded) {
loaded = loader();
}
}

@@ -205,2 +222,6 @@ return loaded;

}
exports.proxy = proxy;
function __UNSTABLE_proxy(options) {
return proxy(options);
}
exports.__UNSTABLE_proxy = __UNSTABLE_proxy;

2

package.json
{
"name": "@neon-rs/load",
"version": "0.0.169",
"version": "0.0.170",
"description": "Utilities for loading Neon modules.",

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

@@ -11,2 +11,9 @@ export declare function currentTarget(): string;

export declare function __UNSTABLE_loader(loaders: Record<string, () => Record<string, any>>): () => Record<string, any>;
export declare function __UNSTABLE_proxy(loaders: Record<string, () => Record<string, any>>): any;
export type ModuleObject = Record<string, any>;
export type TargetTable = Record<string, () => ModuleObject>;
export type ProxyOptions = {
targets: TargetTable;
debug?: () => ModuleObject;
};
export declare function proxy(options: TargetTable | ProxyOptions): any;
export declare function __UNSTABLE_proxy(options: TargetTable | ProxyOptions): 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