| declare const constants: { | ||
| signals: Record<string, number> | ||
| errnos: Record<string, number> | ||
| priority: Record<string, number> | ||
| } | ||
| export = constants |
| declare class OSError extends Error { | ||
| readonly code: string | ||
| } | ||
| export = OSError |
+1
-1
@@ -1,2 +0,2 @@ | ||
| cmake_minimum_required(VERSION 3.25) | ||
| cmake_minimum_required(VERSION 4.0) | ||
@@ -3,0 +3,0 @@ find_package(cmake-bare REQUIRED PATHS node_modules/cmake-bare) |
+4
-5
@@ -1,7 +0,6 @@ | ||
| export const constants: { | ||
| signals: Record<string, number> | ||
| errnos: Record<string, number> | ||
| priority: Record<string, number> | ||
| } | ||
| import constants from './lib/constants' | ||
| import errors from './lib/errors' | ||
| export { constants, errors } | ||
| export const EOL: '\r\n' | '\n' | ||
@@ -8,0 +7,0 @@ |
+1
-0
@@ -6,2 +6,3 @@ const binding = require('./binding') | ||
| exports.constants = constants | ||
| exports.errors = errors | ||
@@ -8,0 +9,0 @@ exports.EOL = binding.platform === 'win32' ? '\r\n' : '\n' |
+3
-3
| module.exports = class OSError extends Error { | ||
| constructor(msg, code, fn = OSError) { | ||
| constructor(msg, fn = OSError, code = fn.name) { | ||
| super(`${code}: ${msg}`) | ||
@@ -16,8 +16,8 @@ this.code = code | ||
| static UNKNOWN_SIGNAL(msg) { | ||
| return new OSError(msg, 'UNKNOWN_SIGNAL', OSError.UNKNOWN_SIGNAL) | ||
| return new OSError(msg, OSError.UNKNOWN_SIGNAL) | ||
| } | ||
| static TITLE_OVERFLOW(msg) { | ||
| return new OSError(msg, 'TITLE_OVERFLOW', OSError.TITLE_OVERFLOW) | ||
| return new OSError(msg, OSError.TITLE_OVERFLOW) | ||
| } | ||
| } |
+10
-4
| { | ||
| "name": "bare-os", | ||
| "version": "3.9.0", | ||
| "version": "3.9.1", | ||
| "description": "Operating system utilities for Bare", | ||
| "exports": { | ||
| "./package": "./package.json", | ||
| ".": { | ||
@@ -10,5 +11,10 @@ "types": "./index.d.ts", | ||
| }, | ||
| "./package": "./package.json", | ||
| "./constants": "./lib/constants.js", | ||
| "./errors": "./lib/errors.js" | ||
| "./constants": { | ||
| "types": "./lib/constants.d.ts", | ||
| "default": "./lib/constants.js" | ||
| }, | ||
| "./errors": { | ||
| "types": "./lib/errors.d.ts", | ||
| "default": "./lib/errors.js" | ||
| } | ||
| }, | ||
@@ -15,0 +21,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
921225
0.04%25
8.7%239
3.91%