UNPKG

admina

Version:

Detect root/admin/sudo and execute commands as it if available

145 lines 4.83 kB
{ "name": "admina", "version": "1.0.1", "description": "Detect root/admin/sudo and execute commands as it if available", "homepage": "https://github.com/aminya/admina", "repository": "https://github.com/aminya/admina", "license": "Apache-2.0", "author": "Amin Yahyaabadi", "exports": { "import": "./dist/index.node.mjs", "require": "./dist/index.node.cjs" }, "type": "module", "main": "./dist/index.node.cjs", "module": "./dist/index.node.mjs", "module.deno": "./dist/index.deno.mjs", "source": "./src/index.mts", "engines": { "node": ">=12.x", "deno": ">=1" }, "targets": { "main": { "source": "./src/index.mts", "context": "node", "engines": { "node": ">=12.x" }, "optimize": true, "includeNodeModules": true, "outputFormat": "commonjs", "isLibrary": true }, "module": { "source": "./src/index.mts", "context": "node", "engines": { "node": ">=20.x" }, "optimize": true, "includeNodeModules": false, "outputFormat": "esmodule", "isLibrary": true }, "module.deno": { "source": "./src/index.mts", "context": "node", "engines": { "deno": ">=1" }, "optimize": false, "includeNodeModules": true, "outputFormat": "esmodule", "isLibrary": true } }, "alias": { "fs/promises": "./src/compat/fs/promises.mts" }, "files": [ "dist/", "src/", "tsconfig.json", "dev/tsc-mjs.mjs", "LICENSE_dependencies.txt" ], "prettier": "prettier-config-atomic", "dependencies": { "execa": "^7", "which": "^4.0.0" }, "devDependencies": { "@babel/cli": "^7.23.4", "@parcel/transformer-typescript-tsc": "^2.11.0", "@types/fs-extra": "^11.0.4", "@types/jest": "^29.5.11", "@types/node": "^20.11.5", "@types/which": "^3.0.3", "@upleveled/babel-plugin-remove-node-prefix": "^1.0.5", "cross-env": "7.0.3", "cspell": "^8.3.2", "eslint": "^8.56.0", "eslint-config-atomic": "^1.20.6", "fs-extra": "^11.2.0", "jest": "^29.7.0", "npm-check-updates": "^16.14.12", "npm-run-all2": "^6.1.1", "parcel": "2.11.0", "prettier": "3.2.2", "prettier-config-atomic": "^4.0.0", "readme-md-generator": "^1.0.0", "shx": "0.3.4", "tempy": "<3", "terser-config-atomic": "^1.0.0", "ts-jest": "^29.1.1", "ts-node": "^10.9.2", "ts-readme": "^1.1.3", "typescript": "^5.3.3" }, "keywords": [ "sudo", "root", "is-root", "is-sudo", "exec-sudo", "exec-root", "isroot", "issudo", "exec", "execa", "spawn", "system", "unix", "linux", "github-actions", "github", "actions", "gitlab", "ci" ], "scripts": { "build": "run-s clean build.tsc build.parcel build.types", "build.parcel": "shx rm -rf dist/node/index.js* && cross-env NODE_ENV=production parcel build && run-s build.babel", "build.babel": "babel ./dist/*.cjs --out-dir dist --out-file-extension '.cjs' --plugins @upleveled/babel-plugin-remove-node-prefix --compact --no-babelrc --source-maps true", "build.types": "shx cp ./dist/index.d.mts ./dist/index.node.d.mts && shx cp ./dist/index.d.mts ./dist/index.node.d.cts && shx cp ./dist/index.d.mts ./dist/index.deno.d.mts", "build.tsc": "tsc -p ./src/tsconfig.json", "bump": "ncu -u && pnpm update", "clean": "shx rm -rf dist && shx mkdir ./dist", "dev": "cross-env NODE_ENV=development parcel watch", "docs": "shx rm -rf ./README.md && pnpm exec readme --path ./dev/docs/readme.md -y && pnpm exec ts-readme --header-depth 3 && pnpm run format", "format": "run-s lint.prettier", "lint": "run-p --aggregate-output --continue-on-error lint.cspell lint.eslint lint.prettier", "lint.cspell": "cspell lint --no-progress --show-suggestions", "lint.eslint": "eslint **/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix", "lint.prettier": "prettier --write .", "test": "run-s build && run-p --continue-on-error --aggregate-output test.unit test.integration.node.cjs test.integration.node.mjs", "test.integration.node.cjs": "node ./test/node-integration.cjs", "test.integration.node.mjs": "node ./test/node-integration.mjs", "test.integration.deno": "deno run ./test/deno-integration.ts", "test.lint": "run-p --aggregate-output --continue-on-error lint.cspell test.lint.eslint test.lint.prettier", "test.lint.eslint": "eslint **/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml} --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/", "test.lint.prettier": "prettier . --check", "test.unit": "cross-env NODE_DEBUG=execa jest --verbose --useStderr" } }