admina
Version:
Detect root/admin/sudo and execute commands as it if available
146 lines • 4.95 kB
JSON
{
"name": "admina",
"version": "2.0.0",
"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.28.6",
"@parcel/transformer-typescript-tsc": "^2.12.0",
"@types/fs-extra": "^11.0.4",
"@types/jest": "^30.0.0",
"@types/node": "^20.11.5",
"@types/which": "^3.0.3",
"@upleveled/babel-plugin-remove-node-prefix": "^1.0.5",
"cross-env": "10.1.0",
"cspell": "^10.0.0",
"eslint": "^10.4.0",
"eslint-config-atomic": "^2.2.0",
"fs-extra": "^11.2.0",
"is-stream": "^3.0.0",
"jest": "^30.4.2",
"npm-check-updates": "^22.2.0",
"npm-run-all2": "^9.0.1",
"parcel": "2.12.0",
"prettier": "3.8.3",
"prettier-config-atomic": "^4.0.0",
"readme-md-generator": "^1.0.0",
"shx": "0.4.0",
"tempy": "<4",
"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/index.node.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 --cache --cache-location ./.cache/prettier/ .",
"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 --cache --cache-location ./.cache/prettier/ --check .",
"test.unit": "cross-env NODE_DEBUG=execa jest --verbose --useStderr"
}
}