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

@waiting/shared-core

Package Overview
Dependencies
Maintainers
0
Versions
199
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@waiting/shared-core - npm Package Compare versions

Comparing version 23.25.1 to 23.25.2

dist/index.d.ts.map

1

dist/index.d.ts
export * from './lib/index.js';
export { $ } from 'zx';
//# sourceMappingURL=index.d.ts.map

@@ -5,1 +5,2 @@ export declare function assertNever(x: never): never;

*/
//# sourceMappingURL=asset.d.ts.map
export type * from './types.js';
export * from './util.js';
//# sourceMappingURL=index.d.ts.map

@@ -19,1 +19,2 @@ export interface CallerInfo extends CallerInfoBase {

}
//# sourceMappingURL=types.d.ts.map

@@ -24,1 +24,2 @@ import type { CallerInfo } from './types.js';

export declare function getStackCallerSites(stackTraceLimit?: number): NodeJS.CallSite[];
//# sourceMappingURL=util.d.ts.map

28

dist/lib/callstack/util.js

@@ -119,13 +119,5 @@ import assert from 'node:assert/strict';

}
const stacks = getStackCallerSites(depth + 1);
const site = stacks[depth];
const stacks = getStackCallerSites(depth + 5);
const site = pickSite(stacks.slice(depth - 1), ret);
assert(site, 'stack empty');
// // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
// const enclosingLineNumber: number | undefined = site.getEnclosingLineNumber
// ? site.getEnclosingLineNumber() as unknown as number
// : 0
// // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
// const enclosingColNumber: number | undefined = site.getEnclosingColumnNumber
// ? site.getEnclosingColumnNumber() as unknown as number
// : 0
const funcName = site.getFunctionName() ?? '';

@@ -153,2 +145,18 @@ const methodName = site.getMethodName() ?? '';

}
function pickSite(data, needle) {
const site = data.find((item) => {
const fileName = item.getFileName() ?? '';
const funcName = item.getFunctionName() ?? '';
const lineNumber = item.getLineNumber() ?? -1;
const columnNumber = item.getColumnNumber() ?? -1;
if (fileName === needle.path
&& funcName === needle.funcName
&& lineNumber === needle.lineNumber
&& columnNumber === needle.columnNumber) {
return true;
}
return false;
});
return site;
}
/**

@@ -155,0 +163,0 @@ * Get stack string, line/column number transformed with source-map

import minimist from 'minimist';
export declare function retrieveArgsFromProcess<T extends minimist.ParsedArgs = minimist.ParsedArgs>(processArgv?: string[]): T;
//# sourceMappingURL=cli.d.ts.map
export declare const isWin32: boolean;
export declare const userHome: string;
export declare const defaultPropDescriptor: PropertyDescriptor;
//# sourceMappingURL=consts.d.ts.map

@@ -12,1 +12,2 @@ import type { ISO8601String } from '@waiting/shared-types';

export declare function formatDateTime(input: number | string | Date, locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
//# sourceMappingURL=date.d.ts.map

@@ -6,1 +6,2 @@ /**

export declare function getKeyByEnumValue<T extends Record<string, unknown>>(enumType: T, enumValue: string | number): keyof T | undefined;
//# sourceMappingURL=enum.d.ts.map

@@ -19,1 +19,2 @@ export interface GenErrorOptions {

export declare function genError(options: GenErrorOptions): Error;
//# sourceMappingURL=error.d.ts.map

@@ -5,1 +5,2 @@ export type FnCallParam = string | string[] | readonly string[];

export declare function expandFFIParamArray(input: FnCallParams): FnParamsExpand;
//# sourceMappingURL=ffi.d.ts.map

@@ -7,1 +7,2 @@ /**

export declare function genAbsolutePath(path: string, fileUrlPrefix?: boolean): string;
//# sourceMappingURL=file.d.ts.map
import type { MethodTypeUnknown } from '@waiting/shared-types';
export declare function isArrowFunction(fn: MethodTypeUnknown): boolean;
//# sourceMappingURL=function.d.ts.map

@@ -33,1 +33,2 @@ export declare const appDir: string;

export declare function nFormatter(positiveNum: number, digits?: number, separator?: string): string;
//# sourceMappingURL=helper.d.ts.map
import type { IncomingHttpHeaders } from 'node:http';
import type { Headers as UndiciHeaders } from 'undici';
export declare function retrieveHeadersItem(headers: IncomingHttpHeaders | HeadersInit | UndiciHeaders | undefined, name: string): string | undefined;
//# sourceMappingURL=http.d.ts.map

@@ -22,1 +22,2 @@ export * from './asset.js';

export * from './callstack/index.js';
//# sourceMappingURL=index.d.ts.map

@@ -11,1 +11,2 @@ /**

export declare function bigIntMax(...args: bigint[]): bigint;
//# sourceMappingURL=math.d.ts.map

@@ -5,1 +5,2 @@ /**

export declare function saveHeapSnapshot(path: string): Promise<void>;
//# sourceMappingURL=memory.d.ts.map

@@ -5,1 +5,2 @@ /**

export declare function genModuleAbsolutePathIfExists(projectDir: string, modulePath: string): Promise<string | undefined>;
//# sourceMappingURL=module.d.ts.map

@@ -10,1 +10,2 @@ import type { NetworkInterfaceInfo } from 'node:os';

export declare function retrieveExternalNetWorkInfo(): NetworkInterfaceInfo[];
//# sourceMappingURL=net.d.ts.map

@@ -9,1 +9,2 @@ import type { NpmPkgView } from '@waiting/shared-types';

export declare function compareVersions(version1: string, version2: string): number;
//# sourceMappingURL=npm-pkg.d.ts.map
export * from './ssh.shell.js';
export * from './user.shell.js';
export * from './user.types.js';
//# sourceMappingURL=index.shell.d.ts.map
#!/usr/bin/env tsx
export declare function updateSshAllowUser(userName: string): Promise<void>;
//# sourceMappingURL=ssh.shell.d.ts.map

@@ -9,1 +9,2 @@ #!/usr/bin/env tsx

export declare function userExists(userName: string): Promise<boolean>;
//# sourceMappingURL=user.shell.d.ts.map

@@ -38,1 +38,2 @@ export interface CreateUserOptions {

}
//# sourceMappingURL=user.types.d.ts.map

@@ -19,1 +19,2 @@ import type { ProcInfo } from '@waiting/shared-types';

export declare function retrieveProcInfo(items?: ProcInfoItem[]): Promise<Partial<ProcInfo>>;
//# sourceMappingURL=stats.d.ts.map

@@ -59,1 +59,2 @@ import type { CamelKeys, CamelToSnake, SnakeKeys, SnakeToCamel, SnakeToPascal } from '@waiting/shared-types';

delimiter?: D, recursive?: Recursive): SnakeKeys<T, D, Recursive>;
//# sourceMappingURL=string.d.ts.map

@@ -59,1 +59,2 @@ import type { WriteFileOptions } from 'node:fs';

export declare function genRandomString(length?: number): string;
//# sourceMappingURL=utils.d.ts.map
import type { MiddlewarePathPattern } from '@waiting/shared-types';
export declare function isPathMatchRules(path: string, rules?: MiddlewarePathPattern): boolean;
//# sourceMappingURL=web.d.ts.map
export declare function patchZxQuote(): void;
export declare function _patchZxQuote(): void;
//# sourceMappingURL=zx.d.ts.map
{
"name": "@waiting/shared-core",
"author": "waiting",
"version": "23.25.1",
"version": "23.25.2",
"description": "node core function re export with Promise or Observable",

@@ -83,3 +83,3 @@ "keywords": [

},
"gitHead": "987fd89890783a057c0323052cf73237e22097d6"
"gitHead": "5dcf92c5f9099849b34f041e35215013b8d26a30"
}

@@ -152,16 +152,6 @@ import assert from 'node:assert/strict'

const stacks = getStackCallerSites(depth + 1)
const site = stacks[depth]
const stacks = getStackCallerSites(depth + 5)
const site = pickSite(stacks.slice(depth - 1), ret)
assert(site, 'stack empty')
// // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
// const enclosingLineNumber: number | undefined = site.getEnclosingLineNumber
// ? site.getEnclosingLineNumber() as unknown as number
// : 0
// // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
// const enclosingColNumber: number | undefined = site.getEnclosingColumnNumber
// ? site.getEnclosingColumnNumber() as unknown as number
// : 0
const funcName = site.getFunctionName() ?? ''

@@ -192,3 +182,22 @@ const methodName = site.getMethodName() ?? ''

function pickSite(data: NodeJS.CallSite[], needle: CallerInfo): NodeJS.CallSite | undefined {
const site = data.find((item) => {
const fileName = item.getFileName() ?? ''
const funcName = item.getFunctionName() ?? ''
const lineNumber = item.getLineNumber() ?? -1
const columnNumber = item.getColumnNumber() ?? -1
if (fileName === needle.path
&& funcName === needle.funcName
&& lineNumber === needle.lineNumber
&& columnNumber === needle.columnNumber
) {
return true
}
return false
})
return site
}
/**

@@ -195,0 +204,0 @@ * Get stack string, line/column number transformed with source-map

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