uawdijnntqw1x1x1
IP : 216.73.216.86
Hostname : 6.87.74.97.host.secureserver.net
Kernel : Linux 6.87.74.97.host.secureserver.net 4.18.0-553.83.1.el8_10.x86_64 #1 SMP Mon Nov 10 04:22:44 EST 2025 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
emeraadmin
/
www
/
Service
/
..
/
node_modules
/
d3-array
/
..
/
react
/
..
/
..
/
4d695
/
parse-conflict-json.tar
/
/
package.json000064400000003045151701443550007041 0ustar00{ "_id": "parse-conflict-json@3.0.1", "_inBundle": true, "_location": "/npm/parse-conflict-json", "_phantomChildren": {}, "_requiredBy": [ "/npm", "/npm/@npmcli/arborist" ], "author": { "name": "GitHub Inc." }, "bugs": { "url": "https://github.com/npm/parse-conflict-json/issues" }, "dependencies": { "json-parse-even-better-errors": "^3.0.0", "just-diff": "^6.0.0", "just-diff-apply": "^5.2.0" }, "description": "Parse a JSON string that has git merge conflicts, resolving if possible", "devDependencies": { "@npmcli/eslint-config": "^4.0.0", "@npmcli/template-oss": "4.12.0", "tap": "^16.0.1" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, "files": [ "bin/", "lib/" ], "homepage": "https://github.com/npm/parse-conflict-json#readme", "license": "ISC", "main": "lib", "name": "parse-conflict-json", "repository": { "type": "git", "url": "git+https://github.com/npm/parse-conflict-json.git" }, "scripts": { "lint": "eslint \"**/*.js\"", "lintfix": "npm run lint -- --fix", "postlint": "template-oss-check", "posttest": "npm run lint", "snap": "tap", "template-oss-apply": "template-oss-apply --force", "test": "tap" }, "tap": { "check-coverage": true, "nyc-arg": [ "--exclude", "tap-snapshots/**" ] }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", "version": "4.12.0" }, "version": "3.0.1" } lib/index.js000064400000005551151701443550006772 0ustar00const parseJSON = require('json-parse-even-better-errors') const { diff } = require('just-diff') const { diffApply } = require('just-diff-apply') const globalObjectProperties = Object.getOwnPropertyNames(Object.prototype) const stripBOM = content => { content = content.toString() // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) // because the buffer-to-string conversion in `fs.readFileSync()` // translates it to FEFF, the UTF-16 BOM. if (content.charCodeAt(0) === 0xFEFF) { content = content.slice(1) } return content } const PARENT_RE = /\|{7,}/g const OURS_RE = /<{7,}/g const THEIRS_RE = /={7,}/g const END_RE = />{7,}/g const isDiff = str => str.match(OURS_RE) && str.match(THEIRS_RE) && str.match(END_RE) const parseConflictJSON = (str, reviver, prefer) => { prefer = prefer || 'ours' if (prefer !== 'theirs' && prefer !== 'ours') { throw new TypeError('prefer param must be "ours" or "theirs" if set') } str = stripBOM(str) if (!isDiff(str)) { return parseJSON(str) } const pieces = str.split(/[\n\r]+/g).reduce((acc, line) => { if (line.match(PARENT_RE)) { acc.state = 'parent' } else if (line.match(OURS_RE)) { acc.state = 'ours' } else if (line.match(THEIRS_RE)) { acc.state = 'theirs' } else if (line.match(END_RE)) { acc.state = 'top' } else { if (acc.state === 'top' || acc.state === 'ours') { acc.ours += line } if (acc.state === 'top' || acc.state === 'theirs') { acc.theirs += line } if (acc.state === 'top' || acc.state === 'parent') { acc.parent += line } } return acc }, { state: 'top', ours: '', theirs: '', parent: '', }) // this will throw if either piece is not valid JSON, that's intended const parent = parseJSON(pieces.parent, reviver) const ours = parseJSON(pieces.ours, reviver) const theirs = parseJSON(pieces.theirs, reviver) return prefer === 'ours' ? resolve(parent, ours, theirs) : resolve(parent, theirs, ours) } const isObj = obj => obj && typeof obj === 'object' const copyPath = (to, from, path, i) => { const p = path[i] if (isObj(to[p]) && isObj(from[p]) && Array.isArray(to[p]) === Array.isArray(from[p])) { return copyPath(to[p], from[p], path, i + 1) } to[p] = from[p] } // get the diff from parent->ours and applying our changes on top of theirs. // If they turned an object into a non-object, then put it back. const resolve = (parent, ours, theirs) => { const dours = diff(parent, ours) for (let i = 0; i < dours.length; i++) { if (globalObjectProperties.find(prop => dours[i].path.includes(prop))) { continue } try { diffApply(theirs, [dours[i]]) } catch (e) { copyPath(theirs, ours, dours[i].path, 0) } } return theirs } module.exports = Object.assign(parseConflictJSON, { isDiff }) LICENSE.md000064400000001436151701443550006161 0ustar00<!-- This file is automatically added by @npmcli/template-oss. Do not edit. --> ISC License Copyright npm, Inc. 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 NPM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NPM 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.
/home/emeraadmin/www/Service/../node_modules/d3-array/../react/../../4d695/parse-conflict-json.tar