printer-notifications/node_modules/sander/dist/sander.es.js.map

1 line
40 KiB
Plaintext
Raw Normal View History

2023-11-13 21:10:04 +00:00
{"version":3,"file":"sander.es.js","sources":["../src/utils/resolvePath.js","../src/methodMakers/standardMethod.js","../src/methodMakers/fileDescriptorMethod.js","../src/utils/resolvePathAndOptions.js","../src/specialMethods/createReadStream-createWriteStream.js","../src/specialMethods/exists.js","../src/specialMethods/link-rename.js","../src/specialMethods/mkdir.js","../src/specialMethods/open.js","../src/specialMethods/symlink.js","../src/specialMethods/writeFile-appendFile.js","../src/extraMethods/copydir.js","../src/extraMethods/copyFile.js","../src/extraMethods/lsr.js","../src/extraMethods/rimraf.js","../src/extraMethods/symlinkOrCopy.js","../src/sander.js"],"sourcesContent":["import { resolve } from 'path';\n\nexport default function resolvePath ( args ) {\n\treturn resolve.apply( null, args );\n}","import * as fs from 'graceful-fs';\nimport resolvePath from '../utils/resolvePath';\n\nfunction normaliseArguments ( args ) {\n\tconst len = args.length;\n\n\tlet buildingPath = true;\n\tlet pathargs = [];\n\tlet normalised = [ null ]; // null is a placeholder for the resolved path\n\tlet i;\n\n\tfor ( i = 0; i < len; i += 1 ) {\n\t\tif ( buildingPath && typeof args[i] === 'string' ) {\n\t\t\tpathargs[i] = args[i];\n\t\t} else {\n\t\t\tbuildingPath = false;\n\t\t\tnormalised.push( args[i] );\n\t\t}\n\t}\n\n\tnormalised[0] = resolvePath( pathargs );\n\n\treturn normalised;\n}\n\nexport function asyncMethod ( methodName ) {\n\treturn function () {\n\t\tconst args = normaliseArguments( arguments );\n\n\t\treturn new Promise( ( fulfil, reject ) => {\n\t\t\targs.push( ( err, result ) => {\n\t\t\t\tif ( err ) {\n\t\t\t\t\treject( err );\n\t\t\t\t} else {\n\t\t\t\t\tfulfil( result );\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tfs[ methodName ].apply( fs, args );\n\t\t});\n\t};\n}\n\nexport function syncMethod ( methodName ) {\n\treturn function () {\n\t\tconst args = normaliseArguments( arguments );\n\t\treturn fs[ methodName ].apply( fs, args );\n\t};\n}","import * as fs from 'graceful-fs';\n\nexport function asyncFileDescriptorMethod ( methodName ) {\n\treturn function () {\n\t\tlet args = [];\n\t\tlet i = arguments.length;\n\n\t\twhile ( i-- ) {\n\t\t\targs[i] = arguments[i];\n\t\t}\n\n\t\treturn new Promise( ( fulfil, reject ) => {\n\t\t\targs.push( ( err, result ) => {\n\t\t\t\tif ( err ) {\n\t\t\t\t\treject( err );\n\t\t\t\t} else {\n\t\t\t\t\tfulfil( result );\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tfs[ methodName ].apply( fs, args );\n\t\t});\n\t};\n}","import { resolve } from 'path';\n\nexport default function resolvePathAndOptions ( args ) {\n\tlet options;\n\tlet pathargs;\n\n\tif ( typeof args[ args.length - 1 ] === 'object' ) {\n\t\toptions = args[ args.length - 1 ];\n\n\t\tlet i = args.length - 1;\n\t\tpathargs = new Array( i );\n\n\t\twhile ( i-- ) {\n\t\t\tpathargs[i] = args[i];\n\t\t}\n\t} else {\n\t\toptions = {};\n\t\tpathargs = args;\n\t}\n\n\tconst resolvedPath = resolve.apply( null, pathargs );\n\n\treturn { options, resolvedPath };\n}","import * as fs from 'graceful-fs';\nimport { dirname } from 'path';\nimport mkdirp from 'mkdirp';\nimport resolvePathAndOptions from '../utils/resolvePathAndOptions';\n\nexport function createReadStream () {\n\tconst { resolvedPath, options } = resolvePathAndOptions( arguments );\n\treturn fs.createReadStream( resolvedPath, options );\n}\n\nexport function createWriteStream () {\n\tconst { resolvedPath, options } = resolvePathAndOptions( arguments );\n\n\tmkdirp.sync( dirname( resolvedPath ) );\n\treturn fs.createWriteStream( resolvedPath, options );\n}","import * as fs from 'graceful-fs';\nimport resolvePath from '../utils/resolvePath';\n\nexport function exists () {\n\tconst target = resolvePath( arguments );\n\n\treturn new Promise( fulfil => {\n\t\tfs.exists( target, exists => fulfil( exists ) );\n\t});\n}\n\nexport function existsSync () {\n\treturn fs.existsSync( resolvePath( arguments ) );\n}","import * as fs from 'graceful-fs';\nimport { dirname } from 'path';\nimport mkdirp from 'mkdirp';\nimport resolvePath from '../utils/resolvePath';\n\nexport const rename = asyncMethod( 'rename'