aboutsummaryrefslogtreecommitdiff
path: root/sandbox/testAppNevena/Front/node_modules/chownr
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/testAppNevena/Front/node_modules/chownr')
-rw-r--r--sandbox/testAppNevena/Front/node_modules/chownr/LICENSE15
-rw-r--r--sandbox/testAppNevena/Front/node_modules/chownr/README.md3
-rw-r--r--sandbox/testAppNevena/Front/node_modules/chownr/chownr.js167
-rw-r--r--sandbox/testAppNevena/Front/node_modules/chownr/package.json32
4 files changed, 0 insertions, 217 deletions
diff --git a/sandbox/testAppNevena/Front/node_modules/chownr/LICENSE b/sandbox/testAppNevena/Front/node_modules/chownr/LICENSE
deleted file mode 100644
index 19129e31..00000000
--- a/sandbox/testAppNevena/Front/node_modules/chownr/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/sandbox/testAppNevena/Front/node_modules/chownr/README.md b/sandbox/testAppNevena/Front/node_modules/chownr/README.md
deleted file mode 100644
index 70e9a54a..00000000
--- a/sandbox/testAppNevena/Front/node_modules/chownr/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-Like `chown -R`.
-
-Takes the same arguments as `fs.chown()`
diff --git a/sandbox/testAppNevena/Front/node_modules/chownr/chownr.js b/sandbox/testAppNevena/Front/node_modules/chownr/chownr.js
deleted file mode 100644
index 0d409321..00000000
--- a/sandbox/testAppNevena/Front/node_modules/chownr/chownr.js
+++ /dev/null
@@ -1,167 +0,0 @@
-'use strict'
-const fs = require('fs')
-const path = require('path')
-
-/* istanbul ignore next */
-const LCHOWN = fs.lchown ? 'lchown' : 'chown'
-/* istanbul ignore next */
-const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync'
-
-/* istanbul ignore next */
-const needEISDIRHandled = fs.lchown &&
- !process.version.match(/v1[1-9]+\./) &&
- !process.version.match(/v10\.[6-9]/)
-
-const lchownSync = (path, uid, gid) => {
- try {
- return fs[LCHOWNSYNC](path, uid, gid)
- } catch (er) {
- if (er.code !== 'ENOENT')
- throw er
- }
-}
-
-/* istanbul ignore next */
-const chownSync = (path, uid, gid) => {
- try {
- return fs.chownSync(path, uid, gid)
- } catch (er) {
- if (er.code !== 'ENOENT')
- throw er
- }
-}
-
-/* istanbul ignore next */
-const handleEISDIR =
- needEISDIRHandled ? (path, uid, gid, cb) => er => {
- // Node prior to v10 had a very questionable implementation of
- // fs.lchown, which would always try to call fs.open on a directory
- // Fall back to fs.chown in those cases.
- if (!er || er.code !== 'EISDIR')
- cb(er)
- else
- fs.chown(path, uid, gid, cb)
- }
- : (_, __, ___, cb) => cb
-
-/* istanbul ignore next */
-const handleEISDirSync =
- needEISDIRHandled ? (path, uid, gid) => {
- try {
- return lchownSync(path, uid, gid)
- } catch (er) {
- if (er.code !== 'EISDIR')
- throw er
- chownSync(path, uid, gid)
- }
- }
- : (path, uid, gid) => lchownSync(path, uid, gid)
-
-// fs.readdir could only accept an options object as of node v6
-const nodeVersion = process.version
-let readdir = (path, options, cb) => fs.readdir(path, options, cb)
-let readdirSync = (path, options) => fs.readdirSync(path, options)
-/* istanbul ignore next */
-if (/^v4\./.test(nodeVersion))
- readdir = (path, options, cb) => fs.readdir(path, cb)
-
-const chown = (cpath, uid, gid, cb) => {
- fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, er => {
- // Skip ENOENT error
- cb(er && er.code !== 'ENOENT' ? er : null)
- }))
-}
-
-const chownrKid = (p, child, uid, gid, cb) => {
- if (typeof child === 'string')
- return fs.lstat(path.resolve(p, child), (er, stats) => {
- // Skip ENOENT error
- if (er)
- return cb(er.code !== 'ENOENT' ? er : null)
- stats.name = child
- chownrKid(p, stats, uid, gid, cb)
- })
-
- if (child.isDirectory()) {
- chownr(path.resolve(p, child.name), uid, gid, er => {
- if (er)
- return cb(er)
- const cpath = path.resolve(p, child.name)
- chown(cpath, uid, gid, cb)
- })
- } else {
- const cpath = path.resolve(p, child.name)
- chown(cpath, uid, gid, cb)
- }
-}
-
-
-const chownr = (p, uid, gid, cb) => {
- readdir(p, { withFileTypes: true }, (er, children) => {
- // any error other than ENOTDIR or ENOTSUP means it's not readable,
- // or doesn't exist. give up.
- if (er) {
- if (er.code === 'ENOENT')
- return cb()
- else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')
- return cb(er)
- }
- if (er || !children.length)
- return chown(p, uid, gid, cb)
-
- let len = children.length
- let errState = null
- const then = er => {
- if (errState)
- return
- if (er)
- return cb(errState = er)
- if (-- len === 0)
- return chown(p, uid, gid, cb)
- }
-
- children.forEach(child => chownrKid(p, child, uid, gid, then))
- })
-}
-
-const chownrKidSync = (p, child, uid, gid) => {
- if (typeof child === 'string') {
- try {
- const stats = fs.lstatSync(path.resolve(p, child))
- stats.name = child
- child = stats
- } catch (er) {
- if (er.code === 'ENOENT')
- return
- else
- throw er
- }
- }
-
- if (child.isDirectory())
- chownrSync(path.resolve(p, child.name), uid, gid)
-
- handleEISDirSync(path.resolve(p, child.name), uid, gid)
-}
-
-const chownrSync = (p, uid, gid) => {
- let children
- try {
- children = readdirSync(p, { withFileTypes: true })
- } catch (er) {
- if (er.code === 'ENOENT')
- return
- else if (er.code === 'ENOTDIR' || er.code === 'ENOTSUP')
- return handleEISDirSync(p, uid, gid)
- else
- throw er
- }
-
- if (children && children.length)
- children.forEach(child => chownrKidSync(p, child, uid, gid))
-
- return handleEISDirSync(p, uid, gid)
-}
-
-module.exports = chownr
-chownr.sync = chownrSync
diff --git a/sandbox/testAppNevena/Front/node_modules/chownr/package.json b/sandbox/testAppNevena/Front/node_modules/chownr/package.json
deleted file mode 100644
index 5b0214ca..00000000
--- a/sandbox/testAppNevena/Front/node_modules/chownr/package.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
- "name": "chownr",
- "description": "like `chown -R`",
- "version": "2.0.0",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/chownr.git"
- },
- "main": "chownr.js",
- "files": [
- "chownr.js"
- ],
- "devDependencies": {
- "mkdirp": "0.3",
- "rimraf": "^2.7.1",
- "tap": "^14.10.6"
- },
- "tap": {
- "check-coverage": true
- },
- "scripts": {
- "test": "tap",
- "preversion": "npm test",
- "postversion": "npm publish",
- "prepublishOnly": "git push origin --follow-tags"
- },
- "license": "ISC",
- "engines": {
- "node": ">=10"
- }
-}