@stacksjs/buddy 0.66.0 → 0.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-3zx3yk1m.js → chunk-3whxjf1k.js} +1 -4
- package/dist/chunk-42swmjjw.js +2 -0
- package/dist/chunk-564c63vr.js +2 -0
- package/dist/chunk-5wxk7vka.js +1 -0
- package/dist/chunk-6cscdnf5.js +2 -0
- package/dist/chunk-898dh3kh.js +8 -0
- package/dist/chunk-9g2p5d3j.js +2 -0
- package/dist/chunk-bpa4071y.js +2 -0
- package/dist/chunk-cbtnhpqk.js +2 -0
- package/dist/chunk-f18wwa85.js +827 -0
- package/dist/chunk-g767h9jq.js +3 -0
- package/dist/chunk-hgzxtrgw.js +9 -0
- package/dist/chunk-hqv9y9k2.js +6 -0
- package/dist/chunk-jfs19hhz.js +2 -0
- package/dist/chunk-ncwfzcsm.js +2 -0
- package/dist/chunk-pfb4369d.js +2 -0
- package/dist/chunk-sgm5999j.js +12 -0
- package/dist/chunk-we57sm1m.js +2 -0
- package/dist/chunk-wps8bq6b.js +2 -0
- package/dist/chunk-y2g00ayp.js +2 -0
- package/dist/chunk-ycyg22fp.js +2 -0
- package/dist/cli.js +1 -4
- package/dist/index.js +1 -4
- package/dist/stacks +0 -0
- package/package.json +48 -49
- package/dist/chunk-3cfvbq6w.js +0 -5
- package/dist/chunk-3cfvbq6w.js.map +0 -32
- package/dist/chunk-3v3h2zkp.js +0 -5
- package/dist/chunk-3v3h2zkp.js.map +0 -46
- package/dist/chunk-3zx3yk1m.js.map +0 -15
- package/dist/chunk-8a487snn.js +0 -5
- package/dist/chunk-8a487snn.js.map +0 -9
- package/dist/chunk-9kkf5maz.js +0 -5
- package/dist/chunk-9kkf5maz.js.map +0 -23
- package/dist/chunk-9qba8jdt.js +0 -12
- package/dist/chunk-9qba8jdt.js.map +0 -11
- package/dist/chunk-cvpb67bs.js +0 -5
- package/dist/chunk-cvpb67bs.js.map +0 -10
- package/dist/chunk-eqwfdbyk.js +0 -5
- package/dist/chunk-eqwfdbyk.js.map +0 -17
- package/dist/chunk-f41k7dpa.js +0 -5
- package/dist/chunk-f41k7dpa.js.map +0 -11
- package/dist/chunk-fx1zxxxa.js +0 -9
- package/dist/chunk-fx1zxxxa.js.map +0 -13
- package/dist/chunk-get5gzkc.js +0 -11
- package/dist/chunk-get5gzkc.js.map +0 -10
- package/dist/chunk-m43npkjw.js +0 -5
- package/dist/chunk-m43npkjw.js.map +0 -12
- package/dist/chunk-mrrgcavv.js +0 -831
- package/dist/chunk-mrrgcavv.js.map +0 -240
- package/dist/chunk-n5y0mrsg.js +0 -15
- package/dist/chunk-n5y0mrsg.js.map +0 -173
- package/dist/chunk-qebxvzqz.js +0 -5
- package/dist/chunk-qebxvzqz.js.map +0 -26
- package/dist/chunk-qj2v5psd.js +0 -5
- package/dist/chunk-qj2v5psd.js.map +0 -20
- package/dist/chunk-rh4brnzh.js +0 -5
- package/dist/chunk-rh4brnzh.js.map +0 -16
- package/dist/chunk-w2vwjv6k.js +0 -6
- package/dist/chunk-w2vwjv6k.js.map +0 -57
- package/dist/chunk-w81rbh65.js +0 -5
- package/dist/chunk-w81rbh65.js.map +0 -10
- package/dist/chunk-wayp5kn2.js +0 -5
- package/dist/chunk-wayp5kn2.js.map +0 -22
- package/dist/chunk-x5c5ngpb.js +0 -4
- package/dist/chunk-x5c5ngpb.js.map +0 -23
- package/dist/cli.js.map +0 -10
- package/dist/index.js.map +0 -9
- package/src/cli.ts +0 -105
- package/src/commands/add.ts +0 -71
- package/src/commands/build.ts +0 -299
- package/src/commands/changelog.ts +0 -52
- package/src/commands/clean.ts +0 -46
- package/src/commands/cloud.ts +0 -553
- package/src/commands/commit.ts +0 -26
- package/src/commands/configure.ts +0 -84
- package/src/commands/create.ts +0 -143
- package/src/commands/deploy.ts +0 -194
- package/src/commands/dev.ts +0 -292
- package/src/commands/dns.ts +0 -86
- package/src/commands/domains.ts +0 -255
- package/src/commands/fresh.ts +0 -48
- package/src/commands/generate.ts +0 -202
- package/src/commands/http.ts +0 -57
- package/src/commands/index.ts +0 -33
- package/src/commands/install.ts +0 -30
- package/src/commands/key.ts +0 -36
- package/src/commands/lint.ts +0 -54
- package/src/commands/list.ts +0 -42
- package/src/commands/make.ts +0 -352
- package/src/commands/migrate.ts +0 -105
- package/src/commands/outdated.ts +0 -31
- package/src/commands/ports.ts +0 -188
- package/src/commands/prepublish.ts +0 -28
- package/src/commands/projects.ts +0 -54
- package/src/commands/release.ts +0 -47
- package/src/commands/route.ts +0 -39
- package/src/commands/seed.ts +0 -47
- package/src/commands/setup.ts +0 -145
- package/src/commands/test.ts +0 -214
- package/src/commands/tinker.ts +0 -42
- package/src/commands/types.ts +0 -35
- package/src/commands/upgrade.ts +0 -200
- package/src/commands/version.ts +0 -29
- package/src/custom-cli.ts +0 -35
- package/src/index.ts +0 -1
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../node_modules/universalify/index.js", "../../../../../node_modules/graceful-fs/polyfills.js", "../../../../../node_modules/graceful-fs/legacy-streams.js", "../../../../../node_modules/graceful-fs/clone.js", "../../../../../node_modules/graceful-fs/graceful-fs.js", "../../../../../node_modules/fs-extra/lib/fs/index.js", "../../../../../node_modules/fs-extra/lib/mkdirs/utils.js", "../../../../../node_modules/fs-extra/lib/mkdirs/make-dir.js", "../../../../../node_modules/fs-extra/lib/mkdirs/index.js", "../../../../../node_modules/fs-extra/lib/path-exists/index.js", "../../../../../node_modules/fs-extra/lib/util/utimes.js", "../../../../../node_modules/fs-extra/lib/util/stat.js", "../../../../../node_modules/fs-extra/lib/copy/copy.js", "../../../../../node_modules/fs-extra/lib/copy/copy-sync.js", "../../../../../node_modules/fs-extra/lib/copy/index.js", "../../../../../node_modules/fs-extra/lib/remove/index.js", "../../../../../node_modules/fs-extra/lib/empty/index.js", "../../../../../node_modules/fs-extra/lib/ensure/file.js", "../../../../../node_modules/fs-extra/lib/ensure/link.js", "../../../../../node_modules/fs-extra/lib/ensure/symlink-paths.js", "../../../../../node_modules/fs-extra/lib/ensure/symlink-type.js", "../../../../../node_modules/fs-extra/lib/ensure/symlink.js", "../../../../../node_modules/fs-extra/lib/ensure/index.js", "../../../../../node_modules/jsonfile/utils.js", "../../../../../node_modules/jsonfile/index.js", "../../../../../node_modules/fs-extra/lib/json/jsonfile.js", "../../../../../node_modules/fs-extra/lib/output-file/index.js", "../../../../../node_modules/fs-extra/lib/json/output-json.js", "../../../../../node_modules/fs-extra/lib/json/output-json-sync.js", "../../../../../node_modules/fs-extra/lib/json/index.js", "../../../../../node_modules/fs-extra/lib/move/move.js", "../../../../../node_modules/fs-extra/lib/move/move-sync.js", "../../../../../node_modules/fs-extra/lib/move/index.js", "../../../../../node_modules/fs-extra/lib/index.js", "../../env/src/index.ts", "../../env/src/types.ts", "../../../../../config/env.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"'use strict'\n\nexports.fromCallback = function (fn) {\n return Object.defineProperty(function (...args) {\n if (typeof args[args.length - 1] === 'function') fn.apply(this, args)\n else {\n return new Promise((resolve, reject) => {\n args.push((err, res) => (err != null) ? reject(err) : resolve(res))\n fn.apply(this, args)\n })\n }\n }, 'name', { value: fn.name })\n}\n\nexports.fromPromise = function (fn) {\n return Object.defineProperty(function (...args) {\n const cb = args[args.length - 1]\n if (typeof cb !== 'function') return fn.apply(this, args)\n else {\n args.pop()\n fn.apply(this, args).then(r => cb(null, r), cb)\n }\n }, 'name', { value: fn.name })\n}\n",
|
|
6
|
-
"var constants = require('constants')\n\nvar origCwd = process.cwd\nvar cwd = null\n\nvar platform = process.env.GRACEFUL_FS_PLATFORM || process.platform\n\nprocess.cwd = function() {\n if (!cwd)\n cwd = origCwd.call(process)\n return cwd\n}\ntry {\n process.cwd()\n} catch (er) {}\n\n// This check is needed until node.js 12 is required\nif (typeof process.chdir === 'function') {\n var chdir = process.chdir\n process.chdir = function (d) {\n cwd = null\n chdir.call(process, d)\n }\n if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir)\n}\n\nmodule.exports = patch\n\nfunction patch (fs) {\n // (re-)implement some things that are known busted or missing.\n\n // lchmod, broken prior to 0.6.2\n // back-port the fix here.\n if (constants.hasOwnProperty('O_SYMLINK') &&\n process.version.match(/^v0\\.6\\.[0-2]|^v0\\.5\\./)) {\n patchLchmod(fs)\n }\n\n // lutimes implementation, or no-op\n if (!fs.lutimes) {\n patchLutimes(fs)\n }\n\n // https://github.com/isaacs/node-graceful-fs/issues/4\n // Chown should not fail on einval or eperm if non-root.\n // It should not fail on enosys ever, as this just indicates\n // that a fs doesn't support the intended operation.\n\n fs.chown = chownFix(fs.chown)\n fs.fchown = chownFix(fs.fchown)\n fs.lchown = chownFix(fs.lchown)\n\n fs.chmod = chmodFix(fs.chmod)\n fs.fchmod = chmodFix(fs.fchmod)\n fs.lchmod = chmodFix(fs.lchmod)\n\n fs.chownSync = chownFixSync(fs.chownSync)\n fs.fchownSync = chownFixSync(fs.fchownSync)\n fs.lchownSync = chownFixSync(fs.lchownSync)\n\n fs.chmodSync = chmodFixSync(fs.chmodSync)\n fs.fchmodSync = chmodFixSync(fs.fchmodSync)\n fs.lchmodSync = chmodFixSync(fs.lchmodSync)\n\n fs.stat = statFix(fs.stat)\n fs.fstat = statFix(fs.fstat)\n fs.lstat = statFix(fs.lstat)\n\n fs.statSync = statFixSync(fs.statSync)\n fs.fstatSync = statFixSync(fs.fstatSync)\n fs.lstatSync = statFixSync(fs.lstatSync)\n\n // if lchmod/lchown do not exist, then make them no-ops\n if (fs.chmod && !fs.lchmod) {\n fs.lchmod = function (path, mode, cb) {\n if (cb) process.nextTick(cb)\n }\n fs.lchmodSync = function () {}\n }\n if (fs.chown && !fs.lchown) {\n fs.lchown = function (path, uid, gid, cb) {\n if (cb) process.nextTick(cb)\n }\n fs.lchownSync = function () {}\n }\n\n // on Windows, A/V software can lock the directory, causing this\n // to fail with an EACCES or EPERM if the directory contains newly\n // created files. Try again on failure, for up to 60 seconds.\n\n // Set the timeout this long because some Windows Anti-Virus, such as Parity\n // bit9, may lock files for up to a minute, causing npm package install\n // failures. Also, take care to yield the scheduler. Windows scheduling gives\n // CPU to a busy looping process, which can cause the program causing the lock\n // contention to be starved of CPU by node, so the contention doesn't resolve.\n if (platform === \"win32\") {\n fs.rename = typeof fs.rename !== 'function' ? fs.rename\n : (function (fs$rename) {\n function rename (from, to, cb) {\n var start = Date.now()\n var backoff = 0;\n fs$rename(from, to, function CB (er) {\n if (er\n && (er.code === \"EACCES\" || er.code === \"EPERM\" || er.code === \"EBUSY\")\n && Date.now() - start < 60000) {\n setTimeout(function() {\n fs.stat(to, function (stater, st) {\n if (stater && stater.code === \"ENOENT\")\n fs$rename(from, to, CB);\n else\n cb(er)\n })\n }, backoff)\n if (backoff < 100)\n backoff += 10;\n return;\n }\n if (cb) cb(er)\n })\n }\n if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename)\n return rename\n })(fs.rename)\n }\n\n // if read() returns EAGAIN, then just try it again.\n fs.read = typeof fs.read !== 'function' ? fs.read\n : (function (fs$read) {\n function read (fd, buffer, offset, length, position, callback_) {\n var callback\n if (callback_ && typeof callback_ === 'function') {\n var eagCounter = 0\n callback = function (er, _, __) {\n if (er && er.code === 'EAGAIN' && eagCounter < 10) {\n eagCounter ++\n return fs$read.call(fs, fd, buffer, offset, length, position, callback)\n }\n callback_.apply(this, arguments)\n }\n }\n return fs$read.call(fs, fd, buffer, offset, length, position, callback)\n }\n\n // This ensures `util.promisify` works as it does for native `fs.read`.\n if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read)\n return read\n })(fs.read)\n\n fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync\n : (function (fs$readSync) { return function (fd, buffer, offset, length, position) {\n var eagCounter = 0\n while (true) {\n try {\n return fs$readSync.call(fs, fd, buffer, offset, length, position)\n } catch (er) {\n if (er.code === 'EAGAIN' && eagCounter < 10) {\n eagCounter ++\n continue\n }\n throw er\n }\n }\n }})(fs.readSync)\n\n function patchLchmod (fs) {\n fs.lchmod = function (path, mode, callback) {\n fs.open( path\n , constants.O_WRONLY | constants.O_SYMLINK\n , mode\n , function (err, fd) {\n if (err) {\n if (callback) callback(err)\n return\n }\n // prefer to return the chmod error, if one occurs,\n // but still try to close, and report closing errors if they occur.\n fs.fchmod(fd, mode, function (err) {\n fs.close(fd, function(err2) {\n if (callback) callback(err || err2)\n })\n })\n })\n }\n\n fs.lchmodSync = function (path, mode) {\n var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)\n\n // prefer to return the chmod error, if one occurs,\n // but still try to close, and report closing errors if they occur.\n var threw = true\n var ret\n try {\n ret = fs.fchmodSync(fd, mode)\n threw = false\n } finally {\n if (threw) {\n try {\n fs.closeSync(fd)\n } catch (er) {}\n } else {\n fs.closeSync(fd)\n }\n }\n return ret\n }\n }\n\n function patchLutimes (fs) {\n if (constants.hasOwnProperty(\"O_SYMLINK\") && fs.futimes) {\n fs.lutimes = function (path, at, mt, cb) {\n fs.open(path, constants.O_SYMLINK, function (er, fd) {\n if (er) {\n if (cb) cb(er)\n return\n }\n fs.futimes(fd, at, mt, function (er) {\n fs.close(fd, function (er2) {\n if (cb) cb(er || er2)\n })\n })\n })\n }\n\n fs.lutimesSync = function (path, at, mt) {\n var fd = fs.openSync(path, constants.O_SYMLINK)\n var ret\n var threw = true\n try {\n ret = fs.futimesSync(fd, at, mt)\n threw = false\n } finally {\n if (threw) {\n try {\n fs.closeSync(fd)\n } catch (er) {}\n } else {\n fs.closeSync(fd)\n }\n }\n return ret\n }\n\n } else if (fs.futimes) {\n fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }\n fs.lutimesSync = function () {}\n }\n }\n\n function chmodFix (orig) {\n if (!orig) return orig\n return function (target, mode, cb) {\n return orig.call(fs, target, mode, function (er) {\n if (chownErOk(er)) er = null\n if (cb) cb.apply(this, arguments)\n })\n }\n }\n\n function chmodFixSync (orig) {\n if (!orig) return orig\n return function (target, mode) {\n try {\n return orig.call(fs, target, mode)\n } catch (er) {\n if (!chownErOk(er)) throw er\n }\n }\n }\n\n\n function chownFix (orig) {\n if (!orig) return orig\n return function (target, uid, gid, cb) {\n return orig.call(fs, target, uid, gid, function (er) {\n if (chownErOk(er)) er = null\n if (cb) cb.apply(this, arguments)\n })\n }\n }\n\n function chownFixSync (orig) {\n if (!orig) return orig\n return function (target, uid, gid) {\n try {\n return orig.call(fs, target, uid, gid)\n } catch (er) {\n if (!chownErOk(er)) throw er\n }\n }\n }\n\n function statFix (orig) {\n if (!orig) return orig\n // Older versions of Node erroneously returned signed integers for\n // uid + gid.\n return function (target, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = null\n }\n function callback (er, stats) {\n if (stats) {\n if (stats.uid < 0) stats.uid += 0x100000000\n if (stats.gid < 0) stats.gid += 0x100000000\n }\n if (cb) cb.apply(this, arguments)\n }\n return options ? orig.call(fs, target, options, callback)\n : orig.call(fs, target, callback)\n }\n }\n\n function statFixSync (orig) {\n if (!orig) return orig\n // Older versions of Node erroneously returned signed integers for\n // uid + gid.\n return function (target, options) {\n var stats = options ? orig.call(fs, target, options)\n : orig.call(fs, target)\n if (stats) {\n if (stats.uid < 0) stats.uid += 0x100000000\n if (stats.gid < 0) stats.gid += 0x100000000\n }\n return stats;\n }\n }\n\n // ENOSYS means that the fs doesn't support the op. Just ignore\n // that, because it doesn't matter.\n //\n // if there's no getuid, or if getuid() is something other\n // than 0, and the error is EINVAL or EPERM, then just ignore\n // it.\n //\n // This specific case is a silent failure in cp, install, tar,\n // and most other unix tools that manage permissions.\n //\n // When running as root, or if other types of errors are\n // encountered, then it's strict.\n function chownErOk (er) {\n if (!er)\n return true\n\n if (er.code === \"ENOSYS\")\n return true\n\n var nonroot = !process.getuid || process.getuid() !== 0\n if (nonroot) {\n if (er.code === \"EINVAL\" || er.code === \"EPERM\")\n return true\n }\n\n return false\n }\n}\n",
|
|
7
|
-
"var Stream = require('stream').Stream\n\nmodule.exports = legacy\n\nfunction legacy (fs) {\n return {\n ReadStream: ReadStream,\n WriteStream: WriteStream\n }\n\n function ReadStream (path, options) {\n if (!(this instanceof ReadStream)) return new ReadStream(path, options);\n\n Stream.call(this);\n\n var self = this;\n\n this.path = path;\n this.fd = null;\n this.readable = true;\n this.paused = false;\n\n this.flags = 'r';\n this.mode = 438; /*=0666*/\n this.bufferSize = 64 * 1024;\n\n options = options || {};\n\n // Mixin options into this\n var keys = Object.keys(options);\n for (var index = 0, length = keys.length; index < length; index++) {\n var key = keys[index];\n this[key] = options[key];\n }\n\n if (this.encoding) this.setEncoding(this.encoding);\n\n if (this.start !== undefined) {\n if ('number' !== typeof this.start) {\n throw TypeError('start must be a Number');\n }\n if (this.end === undefined) {\n this.end = Infinity;\n } else if ('number' !== typeof this.end) {\n throw TypeError('end must be a Number');\n }\n\n if (this.start > this.end) {\n throw new Error('start must be <= end');\n }\n\n this.pos = this.start;\n }\n\n if (this.fd !== null) {\n process.nextTick(function() {\n self._read();\n });\n return;\n }\n\n fs.open(this.path, this.flags, this.mode, function (err, fd) {\n if (err) {\n self.emit('error', err);\n self.readable = false;\n return;\n }\n\n self.fd = fd;\n self.emit('open', fd);\n self._read();\n })\n }\n\n function WriteStream (path, options) {\n if (!(this instanceof WriteStream)) return new WriteStream(path, options);\n\n Stream.call(this);\n\n this.path = path;\n this.fd = null;\n this.writable = true;\n\n this.flags = 'w';\n this.encoding = 'binary';\n this.mode = 438; /*=0666*/\n this.bytesWritten = 0;\n\n options = options || {};\n\n // Mixin options into this\n var keys = Object.keys(options);\n for (var index = 0, length = keys.length; index < length; index++) {\n var key = keys[index];\n this[key] = options[key];\n }\n\n if (this.start !== undefined) {\n if ('number' !== typeof this.start) {\n throw TypeError('start must be a Number');\n }\n if (this.start < 0) {\n throw new Error('start must be >= zero');\n }\n\n this.pos = this.start;\n }\n\n this.busy = false;\n this._queue = [];\n\n if (this.fd === null) {\n this._open = fs.open;\n this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);\n this.flush();\n }\n }\n}\n",
|
|
8
|
-
"'use strict'\n\nmodule.exports = clone\n\nvar getPrototypeOf = Object.getPrototypeOf || function (obj) {\n return obj.__proto__\n}\n\nfunction clone (obj) {\n if (obj === null || typeof obj !== 'object')\n return obj\n\n if (obj instanceof Object)\n var copy = { __proto__: getPrototypeOf(obj) }\n else\n var copy = Object.create(null)\n\n Object.getOwnPropertyNames(obj).forEach(function (key) {\n Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))\n })\n\n return copy\n}\n",
|
|
9
|
-
"var fs = require('fs')\nvar polyfills = require('./polyfills.js')\nvar legacy = require('./legacy-streams.js')\nvar clone = require('./clone.js')\n\nvar util = require('util')\n\n/* istanbul ignore next - node 0.x polyfill */\nvar gracefulQueue\nvar previousSymbol\n\n/* istanbul ignore else - node 0.x polyfill */\nif (typeof Symbol === 'function' && typeof Symbol.for === 'function') {\n gracefulQueue = Symbol.for('graceful-fs.queue')\n // This is used in testing by future versions\n previousSymbol = Symbol.for('graceful-fs.previous')\n} else {\n gracefulQueue = '___graceful-fs.queue'\n previousSymbol = '___graceful-fs.previous'\n}\n\nfunction noop () {}\n\nfunction publishQueue(context, queue) {\n Object.defineProperty(context, gracefulQueue, {\n get: function() {\n return queue\n }\n })\n}\n\nvar debug = noop\nif (util.debuglog)\n debug = util.debuglog('gfs4')\nelse if (/\\bgfs4\\b/i.test(process.env.NODE_DEBUG || ''))\n debug = function() {\n var m = util.format.apply(util, arguments)\n m = 'GFS4: ' + m.split(/\\n/).join('\\nGFS4: ')\n console.error(m)\n }\n\n// Once time initialization\nif (!fs[gracefulQueue]) {\n // This queue can be shared by multiple loaded instances\n var queue = global[gracefulQueue] || []\n publishQueue(fs, queue)\n\n // Patch fs.close/closeSync to shared queue version, because we need\n // to retry() whenever a close happens *anywhere* in the program.\n // This is essential when multiple graceful-fs instances are\n // in play at the same time.\n fs.close = (function (fs$close) {\n function close (fd, cb) {\n return fs$close.call(fs, fd, function (err) {\n // This function uses the graceful-fs shared queue\n if (!err) {\n resetQueue()\n }\n\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n })\n }\n\n Object.defineProperty(close, previousSymbol, {\n value: fs$close\n })\n return close\n })(fs.close)\n\n fs.closeSync = (function (fs$closeSync) {\n function closeSync (fd) {\n // This function uses the graceful-fs shared queue\n fs$closeSync.apply(fs, arguments)\n resetQueue()\n }\n\n Object.defineProperty(closeSync, previousSymbol, {\n value: fs$closeSync\n })\n return closeSync\n })(fs.closeSync)\n\n if (/\\bgfs4\\b/i.test(process.env.NODE_DEBUG || '')) {\n process.on('exit', function() {\n debug(fs[gracefulQueue])\n require('assert').equal(fs[gracefulQueue].length, 0)\n })\n }\n}\n\nif (!global[gracefulQueue]) {\n publishQueue(global, fs[gracefulQueue]);\n}\n\nmodule.exports = patch(clone(fs))\nif (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {\n module.exports = patch(fs)\n fs.__patched = true;\n}\n\nfunction patch (fs) {\n // Everything that references the open() function needs to be in here\n polyfills(fs)\n fs.gracefulify = patch\n\n fs.createReadStream = createReadStream\n fs.createWriteStream = createWriteStream\n var fs$readFile = fs.readFile\n fs.readFile = readFile\n function readFile (path, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$readFile(path, options, cb)\n\n function go$readFile (path, options, cb, startTime) {\n return fs$readFile(path, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$writeFile = fs.writeFile\n fs.writeFile = writeFile\n function writeFile (path, data, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$writeFile(path, data, options, cb)\n\n function go$writeFile (path, data, options, cb, startTime) {\n return fs$writeFile(path, data, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$appendFile = fs.appendFile\n if (fs$appendFile)\n fs.appendFile = appendFile\n function appendFile (path, data, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$appendFile(path, data, options, cb)\n\n function go$appendFile (path, data, options, cb, startTime) {\n return fs$appendFile(path, data, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$copyFile = fs.copyFile\n if (fs$copyFile)\n fs.copyFile = copyFile\n function copyFile (src, dest, flags, cb) {\n if (typeof flags === 'function') {\n cb = flags\n flags = 0\n }\n return go$copyFile(src, dest, flags, cb)\n\n function go$copyFile (src, dest, flags, cb, startTime) {\n return fs$copyFile(src, dest, flags, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$readdir = fs.readdir\n fs.readdir = readdir\n var noReaddirOptionVersions = /^v[0-5]\\./\n function readdir (path, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n var go$readdir = noReaddirOptionVersions.test(process.version)\n ? function go$readdir (path, options, cb, startTime) {\n return fs$readdir(path, fs$readdirCallback(\n path, options, cb, startTime\n ))\n }\n : function go$readdir (path, options, cb, startTime) {\n return fs$readdir(path, options, fs$readdirCallback(\n path, options, cb, startTime\n ))\n }\n\n return go$readdir(path, options, cb)\n\n function fs$readdirCallback (path, options, cb, startTime) {\n return function (err, files) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([\n go$readdir,\n [path, options, cb],\n err,\n startTime || Date.now(),\n Date.now()\n ])\n else {\n if (files && files.sort)\n files.sort()\n\n if (typeof cb === 'function')\n cb.call(this, err, files)\n }\n }\n }\n }\n\n if (process.version.substr(0, 4) === 'v0.8') {\n var legStreams = legacy(fs)\n ReadStream = legStreams.ReadStream\n WriteStream = legStreams.WriteStream\n }\n\n var fs$ReadStream = fs.ReadStream\n if (fs$ReadStream) {\n ReadStream.prototype = Object.create(fs$ReadStream.prototype)\n ReadStream.prototype.open = ReadStream$open\n }\n\n var fs$WriteStream = fs.WriteStream\n if (fs$WriteStream) {\n WriteStream.prototype = Object.create(fs$WriteStream.prototype)\n WriteStream.prototype.open = WriteStream$open\n }\n\n Object.defineProperty(fs, 'ReadStream', {\n get: function () {\n return ReadStream\n },\n set: function (val) {\n ReadStream = val\n },\n enumerable: true,\n configurable: true\n })\n Object.defineProperty(fs, 'WriteStream', {\n get: function () {\n return WriteStream\n },\n set: function (val) {\n WriteStream = val\n },\n enumerable: true,\n configurable: true\n })\n\n // legacy names\n var FileReadStream = ReadStream\n Object.defineProperty(fs, 'FileReadStream', {\n get: function () {\n return FileReadStream\n },\n set: function (val) {\n FileReadStream = val\n },\n enumerable: true,\n configurable: true\n })\n var FileWriteStream = WriteStream\n Object.defineProperty(fs, 'FileWriteStream', {\n get: function () {\n return FileWriteStream\n },\n set: function (val) {\n FileWriteStream = val\n },\n enumerable: true,\n configurable: true\n })\n\n function ReadStream (path, options) {\n if (this instanceof ReadStream)\n return fs$ReadStream.apply(this, arguments), this\n else\n return ReadStream.apply(Object.create(ReadStream.prototype), arguments)\n }\n\n function ReadStream$open () {\n var that = this\n open(that.path, that.flags, that.mode, function (err, fd) {\n if (err) {\n if (that.autoClose)\n that.destroy()\n\n that.emit('error', err)\n } else {\n that.fd = fd\n that.emit('open', fd)\n that.read()\n }\n })\n }\n\n function WriteStream (path, options) {\n if (this instanceof WriteStream)\n return fs$WriteStream.apply(this, arguments), this\n else\n return WriteStream.apply(Object.create(WriteStream.prototype), arguments)\n }\n\n function WriteStream$open () {\n var that = this\n open(that.path, that.flags, that.mode, function (err, fd) {\n if (err) {\n that.destroy()\n that.emit('error', err)\n } else {\n that.fd = fd\n that.emit('open', fd)\n }\n })\n }\n\n function createReadStream (path, options) {\n return new fs.ReadStream(path, options)\n }\n\n function createWriteStream (path, options) {\n return new fs.WriteStream(path, options)\n }\n\n var fs$open = fs.open\n fs.open = open\n function open (path, flags, mode, cb) {\n if (typeof mode === 'function')\n cb = mode, mode = null\n\n return go$open(path, flags, mode, cb)\n\n function go$open (path, flags, mode, cb, startTime) {\n return fs$open(path, flags, mode, function (err, fd) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n return fs\n}\n\nfunction enqueue (elem) {\n debug('ENQUEUE', elem[0].name, elem[1])\n fs[gracefulQueue].push(elem)\n retry()\n}\n\n// keep track of the timeout between retry() calls\nvar retryTimer\n\n// reset the startTime and lastTime to now\n// this resets the start of the 60 second overall timeout as well as the\n// delay between attempts so that we'll retry these jobs sooner\nfunction resetQueue () {\n var now = Date.now()\n for (var i = 0; i < fs[gracefulQueue].length; ++i) {\n // entries that are only a length of 2 are from an older version, don't\n // bother modifying those since they'll be retried anyway.\n if (fs[gracefulQueue][i].length > 2) {\n fs[gracefulQueue][i][3] = now // startTime\n fs[gracefulQueue][i][4] = now // lastTime\n }\n }\n // call retry to make sure we're actively processing the queue\n retry()\n}\n\nfunction retry () {\n // clear the timer and remove it to help prevent unintended concurrency\n clearTimeout(retryTimer)\n retryTimer = undefined\n\n if (fs[gracefulQueue].length === 0)\n return\n\n var elem = fs[gracefulQueue].shift()\n var fn = elem[0]\n var args = elem[1]\n // these items may be unset if they were added by an older graceful-fs\n var err = elem[2]\n var startTime = elem[3]\n var lastTime = elem[4]\n\n // if we don't have a startTime we have no way of knowing if we've waited\n // long enough, so go ahead and retry this item now\n if (startTime === undefined) {\n debug('RETRY', fn.name, args)\n fn.apply(null, args)\n } else if (Date.now() - startTime >= 60000) {\n // it's been more than 60 seconds total, bail now\n debug('TIMEOUT', fn.name, args)\n var cb = args.pop()\n if (typeof cb === 'function')\n cb.call(null, err)\n } else {\n // the amount of time between the last attempt and right now\n var sinceAttempt = Date.now() - lastTime\n // the amount of time between when we first tried, and when we last tried\n // rounded up to at least 1\n var sinceStart = Math.max(lastTime - startTime, 1)\n // backoff. wait longer than the total time we've been retrying, but only\n // up to a maximum of 100ms\n var desiredDelay = Math.min(sinceStart * 1.2, 100)\n // it's been long enough since the last retry, do it again\n if (sinceAttempt >= desiredDelay) {\n debug('RETRY', fn.name, args)\n fn.apply(null, args.concat([startTime]))\n } else {\n // if we can't do this job yet, push it to the end of the queue\n // and let the next iteration check again\n fs[gracefulQueue].push(elem)\n }\n }\n\n // schedule our next run if one isn't already scheduled\n if (retryTimer === undefined) {\n retryTimer = setTimeout(retry, 0)\n }\n}\n",
|
|
10
|
-
"'use strict'\n// This is adapted from https://github.com/normalize/mz\n// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors\nconst u = require('universalify').fromCallback\nconst fs = require('graceful-fs')\n\nconst api = [\n 'access',\n 'appendFile',\n 'chmod',\n 'chown',\n 'close',\n 'copyFile',\n 'fchmod',\n 'fchown',\n 'fdatasync',\n 'fstat',\n 'fsync',\n 'ftruncate',\n 'futimes',\n 'lchmod',\n 'lchown',\n 'link',\n 'lstat',\n 'mkdir',\n 'mkdtemp',\n 'open',\n 'opendir',\n 'readdir',\n 'readFile',\n 'readlink',\n 'realpath',\n 'rename',\n 'rm',\n 'rmdir',\n 'stat',\n 'symlink',\n 'truncate',\n 'unlink',\n 'utimes',\n 'writeFile'\n].filter(key => {\n // Some commands are not available on some systems. Ex:\n // fs.cp was added in Node.js v16.7.0\n // fs.lchown is not available on at least some Linux\n return typeof fs[key] === 'function'\n})\n\n// Export cloned fs:\nObject.assign(exports, fs)\n\n// Universalify async methods:\napi.forEach(method => {\n exports[method] = u(fs[method])\n})\n\n// We differ from mz/fs in that we still ship the old, broken, fs.exists()\n// since we are a drop-in replacement for the native module\nexports.exists = function (filename, callback) {\n if (typeof callback === 'function') {\n return fs.exists(filename, callback)\n }\n return new Promise(resolve => {\n return fs.exists(filename, resolve)\n })\n}\n\n// fs.read(), fs.write(), fs.readv(), & fs.writev() need special treatment due to multiple callback args\n\nexports.read = function (fd, buffer, offset, length, position, callback) {\n if (typeof callback === 'function') {\n return fs.read(fd, buffer, offset, length, position, callback)\n }\n return new Promise((resolve, reject) => {\n fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {\n if (err) return reject(err)\n resolve({ bytesRead, buffer })\n })\n })\n}\n\n// Function signature can be\n// fs.write(fd, buffer[, offset[, length[, position]]], callback)\n// OR\n// fs.write(fd, string[, position[, encoding]], callback)\n// We need to handle both cases, so we use ...args\nexports.write = function (fd, buffer, ...args) {\n if (typeof args[args.length - 1] === 'function') {\n return fs.write(fd, buffer, ...args)\n }\n\n return new Promise((resolve, reject) => {\n fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {\n if (err) return reject(err)\n resolve({ bytesWritten, buffer })\n })\n })\n}\n\n// Function signature is\n// s.readv(fd, buffers[, position], callback)\n// We need to handle the optional arg, so we use ...args\nexports.readv = function (fd, buffers, ...args) {\n if (typeof args[args.length - 1] === 'function') {\n return fs.readv(fd, buffers, ...args)\n }\n\n return new Promise((resolve, reject) => {\n fs.readv(fd, buffers, ...args, (err, bytesRead, buffers) => {\n if (err) return reject(err)\n resolve({ bytesRead, buffers })\n })\n })\n}\n\n// Function signature is\n// s.writev(fd, buffers[, position], callback)\n// We need to handle the optional arg, so we use ...args\nexports.writev = function (fd, buffers, ...args) {\n if (typeof args[args.length - 1] === 'function') {\n return fs.writev(fd, buffers, ...args)\n }\n\n return new Promise((resolve, reject) => {\n fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers) => {\n if (err) return reject(err)\n resolve({ bytesWritten, buffers })\n })\n })\n}\n\n// fs.realpath.native sometimes not available if fs is monkey-patched\nif (typeof fs.realpath.native === 'function') {\n exports.realpath.native = u(fs.realpath.native)\n} else {\n process.emitWarning(\n 'fs.realpath.native is not a function. Is fs being monkey-patched?',\n 'Warning', 'fs-extra-WARN0003'\n )\n}\n",
|
|
11
|
-
"// Adapted from https://github.com/sindresorhus/make-dir\n// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n'use strict'\nconst path = require('path')\n\n// https://github.com/nodejs/node/issues/8987\n// https://github.com/libuv/libuv/pull/1088\nmodule.exports.checkPath = function checkPath (pth) {\n if (process.platform === 'win32') {\n const pathHasInvalidWinCharacters = /[<>:\"|?*]/.test(pth.replace(path.parse(pth).root, ''))\n\n if (pathHasInvalidWinCharacters) {\n const error = new Error(`Path contains invalid characters: ${pth}`)\n error.code = 'EINVAL'\n throw error\n }\n }\n}\n",
|
|
12
|
-
"'use strict'\nconst fs = require('../fs')\nconst { checkPath } = require('./utils')\n\nconst getMode = options => {\n const defaults = { mode: 0o777 }\n if (typeof options === 'number') return options\n return ({ ...defaults, ...options }).mode\n}\n\nmodule.exports.makeDir = async (dir, options) => {\n checkPath(dir)\n\n return fs.mkdir(dir, {\n mode: getMode(options),\n recursive: true\n })\n}\n\nmodule.exports.makeDirSync = (dir, options) => {\n checkPath(dir)\n\n return fs.mkdirSync(dir, {\n mode: getMode(options),\n recursive: true\n })\n}\n",
|
|
13
|
-
"'use strict'\nconst u = require('universalify').fromPromise\nconst { makeDir: _makeDir, makeDirSync } = require('./make-dir')\nconst makeDir = u(_makeDir)\n\nmodule.exports = {\n mkdirs: makeDir,\n mkdirsSync: makeDirSync,\n // alias\n mkdirp: makeDir,\n mkdirpSync: makeDirSync,\n ensureDir: makeDir,\n ensureDirSync: makeDirSync\n}\n",
|
|
14
|
-
"'use strict'\nconst u = require('universalify').fromPromise\nconst fs = require('../fs')\n\nfunction pathExists (path) {\n return fs.access(path).then(() => true).catch(() => false)\n}\n\nmodule.exports = {\n pathExists: u(pathExists),\n pathExistsSync: fs.existsSync\n}\n",
|
|
15
|
-
"'use strict'\n\nconst fs = require('../fs')\nconst u = require('universalify').fromPromise\n\nasync function utimesMillis (path, atime, mtime) {\n // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)\n const fd = await fs.open(path, 'r+')\n\n let closeErr = null\n\n try {\n await fs.futimes(fd, atime, mtime)\n } finally {\n try {\n await fs.close(fd)\n } catch (e) {\n closeErr = e\n }\n }\n\n if (closeErr) {\n throw closeErr\n }\n}\n\nfunction utimesMillisSync (path, atime, mtime) {\n const fd = fs.openSync(path, 'r+')\n fs.futimesSync(fd, atime, mtime)\n return fs.closeSync(fd)\n}\n\nmodule.exports = {\n utimesMillis: u(utimesMillis),\n utimesMillisSync\n}\n",
|
|
16
|
-
"'use strict'\n\nconst fs = require('../fs')\nconst path = require('path')\nconst u = require('universalify').fromPromise\n\nfunction getStats (src, dest, opts) {\n const statFunc = opts.dereference\n ? (file) => fs.stat(file, { bigint: true })\n : (file) => fs.lstat(file, { bigint: true })\n return Promise.all([\n statFunc(src),\n statFunc(dest).catch(err => {\n if (err.code === 'ENOENT') return null\n throw err\n })\n ]).then(([srcStat, destStat]) => ({ srcStat, destStat }))\n}\n\nfunction getStatsSync (src, dest, opts) {\n let destStat\n const statFunc = opts.dereference\n ? (file) => fs.statSync(file, { bigint: true })\n : (file) => fs.lstatSync(file, { bigint: true })\n const srcStat = statFunc(src)\n try {\n destStat = statFunc(dest)\n } catch (err) {\n if (err.code === 'ENOENT') return { srcStat, destStat: null }\n throw err\n }\n return { srcStat, destStat }\n}\n\nasync function checkPaths (src, dest, funcName, opts) {\n const { srcStat, destStat } = await getStats(src, dest, opts)\n if (destStat) {\n if (areIdentical(srcStat, destStat)) {\n const srcBaseName = path.basename(src)\n const destBaseName = path.basename(dest)\n if (funcName === 'move' &&\n srcBaseName !== destBaseName &&\n srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {\n return { srcStat, destStat, isChangingCase: true }\n }\n throw new Error('Source and destination must not be the same.')\n }\n if (srcStat.isDirectory() && !destStat.isDirectory()) {\n throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)\n }\n if (!srcStat.isDirectory() && destStat.isDirectory()) {\n throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)\n }\n }\n\n if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {\n throw new Error(errMsg(src, dest, funcName))\n }\n\n return { srcStat, destStat }\n}\n\nfunction checkPathsSync (src, dest, funcName, opts) {\n const { srcStat, destStat } = getStatsSync(src, dest, opts)\n\n if (destStat) {\n if (areIdentical(srcStat, destStat)) {\n const srcBaseName = path.basename(src)\n const destBaseName = path.basename(dest)\n if (funcName === 'move' &&\n srcBaseName !== destBaseName &&\n srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {\n return { srcStat, destStat, isChangingCase: true }\n }\n throw new Error('Source and destination must not be the same.')\n }\n if (srcStat.isDirectory() && !destStat.isDirectory()) {\n throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)\n }\n if (!srcStat.isDirectory() && destStat.isDirectory()) {\n throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)\n }\n }\n\n if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {\n throw new Error(errMsg(src, dest, funcName))\n }\n return { srcStat, destStat }\n}\n\n// recursively check if dest parent is a subdirectory of src.\n// It works for all file types including symlinks since it\n// checks the src and dest inodes. It starts from the deepest\n// parent and stops once it reaches the src parent or the root path.\nasync function checkParentPaths (src, srcStat, dest, funcName) {\n const srcParent = path.resolve(path.dirname(src))\n const destParent = path.resolve(path.dirname(dest))\n if (destParent === srcParent || destParent === path.parse(destParent).root) return\n\n let destStat\n try {\n destStat = await fs.stat(destParent, { bigint: true })\n } catch (err) {\n if (err.code === 'ENOENT') return\n throw err\n }\n\n if (areIdentical(srcStat, destStat)) {\n throw new Error(errMsg(src, dest, funcName))\n }\n\n return checkParentPaths(src, srcStat, destParent, funcName)\n}\n\nfunction checkParentPathsSync (src, srcStat, dest, funcName) {\n const srcParent = path.resolve(path.dirname(src))\n const destParent = path.resolve(path.dirname(dest))\n if (destParent === srcParent || destParent === path.parse(destParent).root) return\n let destStat\n try {\n destStat = fs.statSync(destParent, { bigint: true })\n } catch (err) {\n if (err.code === 'ENOENT') return\n throw err\n }\n if (areIdentical(srcStat, destStat)) {\n throw new Error(errMsg(src, dest, funcName))\n }\n return checkParentPathsSync(src, srcStat, destParent, funcName)\n}\n\nfunction areIdentical (srcStat, destStat) {\n return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev\n}\n\n// return true if dest is a subdir of src, otherwise false.\n// It only checks the path strings.\nfunction isSrcSubdir (src, dest) {\n const srcArr = path.resolve(src).split(path.sep).filter(i => i)\n const destArr = path.resolve(dest).split(path.sep).filter(i => i)\n return srcArr.every((cur, i) => destArr[i] === cur)\n}\n\nfunction errMsg (src, dest, funcName) {\n return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`\n}\n\nmodule.exports = {\n // checkPaths\n checkPaths: u(checkPaths),\n checkPathsSync,\n // checkParent\n checkParentPaths: u(checkParentPaths),\n checkParentPathsSync,\n // Misc\n isSrcSubdir,\n areIdentical\n}\n",
|
|
17
|
-
"'use strict'\n\nconst fs = require('../fs')\nconst path = require('path')\nconst { mkdirs } = require('../mkdirs')\nconst { pathExists } = require('../path-exists')\nconst { utimesMillis } = require('../util/utimes')\nconst stat = require('../util/stat')\n\nasync function copy (src, dest, opts = {}) {\n if (typeof opts === 'function') {\n opts = { filter: opts }\n }\n\n opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now\n opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber\n\n // Warn about using preserveTimestamps on 32-bit node\n if (opts.preserveTimestamps && process.arch === 'ia32') {\n process.emitWarning(\n 'Using the preserveTimestamps option in 32-bit node is not recommended;\\n\\n' +\n '\\tsee https://github.com/jprichardson/node-fs-extra/issues/269',\n 'Warning', 'fs-extra-WARN0001'\n )\n }\n\n const { srcStat, destStat } = await stat.checkPaths(src, dest, 'copy', opts)\n\n await stat.checkParentPaths(src, srcStat, dest, 'copy')\n\n const include = await runFilter(src, dest, opts)\n\n if (!include) return\n\n // check if the parent of dest exists, and create it if it doesn't exist\n const destParent = path.dirname(dest)\n const dirExists = await pathExists(destParent)\n if (!dirExists) {\n await mkdirs(destParent)\n }\n\n await getStatsAndPerformCopy(destStat, src, dest, opts)\n}\n\nasync function runFilter (src, dest, opts) {\n if (!opts.filter) return true\n return opts.filter(src, dest)\n}\n\nasync function getStatsAndPerformCopy (destStat, src, dest, opts) {\n const statFn = opts.dereference ? fs.stat : fs.lstat\n const srcStat = await statFn(src)\n\n if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)\n\n if (\n srcStat.isFile() ||\n srcStat.isCharacterDevice() ||\n srcStat.isBlockDevice()\n ) return onFile(srcStat, destStat, src, dest, opts)\n\n if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)\n if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`)\n if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`)\n throw new Error(`Unknown file: ${src}`)\n}\n\nasync function onFile (srcStat, destStat, src, dest, opts) {\n if (!destStat) return copyFile(srcStat, src, dest, opts)\n\n if (opts.overwrite) {\n await fs.unlink(dest)\n return copyFile(srcStat, src, dest, opts)\n }\n if (opts.errorOnExist) {\n throw new Error(`'${dest}' already exists`)\n }\n}\n\nasync function copyFile (srcStat, src, dest, opts) {\n await fs.copyFile(src, dest)\n if (opts.preserveTimestamps) {\n // Make sure the file is writable before setting the timestamp\n // otherwise open fails with EPERM when invoked with 'r+'\n // (through utimes call)\n if (fileIsNotWritable(srcStat.mode)) {\n await makeFileWritable(dest, srcStat.mode)\n }\n\n // Set timestamps and mode correspondingly\n\n // Note that The initial srcStat.atime cannot be trusted\n // because it is modified by the read(2) system call\n // (See https://nodejs.org/api/fs.html#fs_stat_time_values)\n const updatedSrcStat = await fs.stat(src)\n await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime)\n }\n\n return fs.chmod(dest, srcStat.mode)\n}\n\nfunction fileIsNotWritable (srcMode) {\n return (srcMode & 0o200) === 0\n}\n\nfunction makeFileWritable (dest, srcMode) {\n return fs.chmod(dest, srcMode | 0o200)\n}\n\nasync function onDir (srcStat, destStat, src, dest, opts) {\n // the dest directory might not exist, create it\n if (!destStat) {\n await fs.mkdir(dest)\n }\n\n const items = await fs.readdir(src)\n\n // loop through the files in the current directory to copy everything\n await Promise.all(items.map(async item => {\n const srcItem = path.join(src, item)\n const destItem = path.join(dest, item)\n\n // skip the item if it is matches by the filter function\n const include = await runFilter(srcItem, destItem, opts)\n if (!include) return\n\n const { destStat } = await stat.checkPaths(srcItem, destItem, 'copy', opts)\n\n // If the item is a copyable file, `getStatsAndPerformCopy` will copy it\n // If the item is a directory, `getStatsAndPerformCopy` will call `onDir` recursively\n return getStatsAndPerformCopy(destStat, srcItem, destItem, opts)\n }))\n\n if (!destStat) {\n await fs.chmod(dest, srcStat.mode)\n }\n}\n\nasync function onLink (destStat, src, dest, opts) {\n let resolvedSrc = await fs.readlink(src)\n if (opts.dereference) {\n resolvedSrc = path.resolve(process.cwd(), resolvedSrc)\n }\n if (!destStat) {\n return fs.symlink(resolvedSrc, dest)\n }\n\n let resolvedDest = null\n try {\n resolvedDest = await fs.readlink(dest)\n } catch (e) {\n // dest exists and is a regular file or directory,\n // Windows may throw UNKNOWN error. If dest already exists,\n // fs throws error anyway, so no need to guard against it here.\n if (e.code === 'EINVAL' || e.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest)\n throw e\n }\n if (opts.dereference) {\n resolvedDest = path.resolve(process.cwd(), resolvedDest)\n }\n if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {\n throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)\n }\n\n // do not copy if src is a subdir of dest since unlinking\n // dest in this case would result in removing src contents\n // and therefore a broken symlink would be created.\n if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {\n throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)\n }\n\n // copy the link\n await fs.unlink(dest)\n return fs.symlink(resolvedSrc, dest)\n}\n\nmodule.exports = copy\n",
|
|
18
|
-
"'use strict'\n\nconst fs = require('graceful-fs')\nconst path = require('path')\nconst mkdirsSync = require('../mkdirs').mkdirsSync\nconst utimesMillisSync = require('../util/utimes').utimesMillisSync\nconst stat = require('../util/stat')\n\nfunction copySync (src, dest, opts) {\n if (typeof opts === 'function') {\n opts = { filter: opts }\n }\n\n opts = opts || {}\n opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now\n opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber\n\n // Warn about using preserveTimestamps on 32-bit node\n if (opts.preserveTimestamps && process.arch === 'ia32') {\n process.emitWarning(\n 'Using the preserveTimestamps option in 32-bit node is not recommended;\\n\\n' +\n '\\tsee https://github.com/jprichardson/node-fs-extra/issues/269',\n 'Warning', 'fs-extra-WARN0002'\n )\n }\n\n const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy', opts)\n stat.checkParentPathsSync(src, srcStat, dest, 'copy')\n if (opts.filter && !opts.filter(src, dest)) return\n const destParent = path.dirname(dest)\n if (!fs.existsSync(destParent)) mkdirsSync(destParent)\n return getStats(destStat, src, dest, opts)\n}\n\nfunction getStats (destStat, src, dest, opts) {\n const statSync = opts.dereference ? fs.statSync : fs.lstatSync\n const srcStat = statSync(src)\n\n if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)\n else if (srcStat.isFile() ||\n srcStat.isCharacterDevice() ||\n srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)\n else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)\n else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`)\n else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`)\n throw new Error(`Unknown file: ${src}`)\n}\n\nfunction onFile (srcStat, destStat, src, dest, opts) {\n if (!destStat) return copyFile(srcStat, src, dest, opts)\n return mayCopyFile(srcStat, src, dest, opts)\n}\n\nfunction mayCopyFile (srcStat, src, dest, opts) {\n if (opts.overwrite) {\n fs.unlinkSync(dest)\n return copyFile(srcStat, src, dest, opts)\n } else if (opts.errorOnExist) {\n throw new Error(`'${dest}' already exists`)\n }\n}\n\nfunction copyFile (srcStat, src, dest, opts) {\n fs.copyFileSync(src, dest)\n if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest)\n return setDestMode(dest, srcStat.mode)\n}\n\nfunction handleTimestamps (srcMode, src, dest) {\n // Make sure the file is writable before setting the timestamp\n // otherwise open fails with EPERM when invoked with 'r+'\n // (through utimes call)\n if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode)\n return setDestTimestamps(src, dest)\n}\n\nfunction fileIsNotWritable (srcMode) {\n return (srcMode & 0o200) === 0\n}\n\nfunction makeFileWritable (dest, srcMode) {\n return setDestMode(dest, srcMode | 0o200)\n}\n\nfunction setDestMode (dest, srcMode) {\n return fs.chmodSync(dest, srcMode)\n}\n\nfunction setDestTimestamps (src, dest) {\n // The initial srcStat.atime cannot be trusted\n // because it is modified by the read(2) system call\n // (See https://nodejs.org/api/fs.html#fs_stat_time_values)\n const updatedSrcStat = fs.statSync(src)\n return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime)\n}\n\nfunction onDir (srcStat, destStat, src, dest, opts) {\n if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts)\n return copyDir(src, dest, opts)\n}\n\nfunction mkDirAndCopy (srcMode, src, dest, opts) {\n fs.mkdirSync(dest)\n copyDir(src, dest, opts)\n return setDestMode(dest, srcMode)\n}\n\nfunction copyDir (src, dest, opts) {\n fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts))\n}\n\nfunction copyDirItem (item, src, dest, opts) {\n const srcItem = path.join(src, item)\n const destItem = path.join(dest, item)\n if (opts.filter && !opts.filter(srcItem, destItem)) return\n const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy', opts)\n return getStats(destStat, srcItem, destItem, opts)\n}\n\nfunction onLink (destStat, src, dest, opts) {\n let resolvedSrc = fs.readlinkSync(src)\n if (opts.dereference) {\n resolvedSrc = path.resolve(process.cwd(), resolvedSrc)\n }\n\n if (!destStat) {\n return fs.symlinkSync(resolvedSrc, dest)\n } else {\n let resolvedDest\n try {\n resolvedDest = fs.readlinkSync(dest)\n } catch (err) {\n // dest exists and is a regular file or directory,\n // Windows may throw UNKNOWN error. If dest already exists,\n // fs throws error anyway, so no need to guard against it here.\n if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest)\n throw err\n }\n if (opts.dereference) {\n resolvedDest = path.resolve(process.cwd(), resolvedDest)\n }\n if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {\n throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)\n }\n\n // prevent copy if src is a subdir of dest since unlinking\n // dest in this case would result in removing src contents\n // and therefore a broken symlink would be created.\n if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {\n throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)\n }\n return copyLink(resolvedSrc, dest)\n }\n}\n\nfunction copyLink (resolvedSrc, dest) {\n fs.unlinkSync(dest)\n return fs.symlinkSync(resolvedSrc, dest)\n}\n\nmodule.exports = copySync\n",
|
|
19
|
-
"'use strict'\n\nconst u = require('universalify').fromPromise\nmodule.exports = {\n copy: u(require('./copy')),\n copySync: require('./copy-sync')\n}\n",
|
|
20
|
-
"'use strict'\n\nconst fs = require('graceful-fs')\nconst u = require('universalify').fromCallback\n\nfunction remove (path, callback) {\n fs.rm(path, { recursive: true, force: true }, callback)\n}\n\nfunction removeSync (path) {\n fs.rmSync(path, { recursive: true, force: true })\n}\n\nmodule.exports = {\n remove: u(remove),\n removeSync\n}\n",
|
|
21
|
-
"'use strict'\n\nconst u = require('universalify').fromPromise\nconst fs = require('../fs')\nconst path = require('path')\nconst mkdir = require('../mkdirs')\nconst remove = require('../remove')\n\nconst emptyDir = u(async function emptyDir (dir) {\n let items\n try {\n items = await fs.readdir(dir)\n } catch {\n return mkdir.mkdirs(dir)\n }\n\n return Promise.all(items.map(item => remove.remove(path.join(dir, item))))\n})\n\nfunction emptyDirSync (dir) {\n let items\n try {\n items = fs.readdirSync(dir)\n } catch {\n return mkdir.mkdirsSync(dir)\n }\n\n items.forEach(item => {\n item = path.join(dir, item)\n remove.removeSync(item)\n })\n}\n\nmodule.exports = {\n emptyDirSync,\n emptydirSync: emptyDirSync,\n emptyDir,\n emptydir: emptyDir\n}\n",
|
|
22
|
-
"'use strict'\n\nconst u = require('universalify').fromPromise\nconst path = require('path')\nconst fs = require('../fs')\nconst mkdir = require('../mkdirs')\n\nasync function createFile (file) {\n let stats\n try {\n stats = await fs.stat(file)\n } catch { }\n if (stats && stats.isFile()) return\n\n const dir = path.dirname(file)\n\n let dirStats = null\n try {\n dirStats = await fs.stat(dir)\n } catch (err) {\n // if the directory doesn't exist, make it\n if (err.code === 'ENOENT') {\n await mkdir.mkdirs(dir)\n await fs.writeFile(file, '')\n return\n } else {\n throw err\n }\n }\n\n if (dirStats.isDirectory()) {\n await fs.writeFile(file, '')\n } else {\n // parent is not a directory\n // This is just to cause an internal ENOTDIR error to be thrown\n await fs.readdir(dir)\n }\n}\n\nfunction createFileSync (file) {\n let stats\n try {\n stats = fs.statSync(file)\n } catch { }\n if (stats && stats.isFile()) return\n\n const dir = path.dirname(file)\n try {\n if (!fs.statSync(dir).isDirectory()) {\n // parent is not a directory\n // This is just to cause an internal ENOTDIR error to be thrown\n fs.readdirSync(dir)\n }\n } catch (err) {\n // If the stat call above failed because the directory doesn't exist, create it\n if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir)\n else throw err\n }\n\n fs.writeFileSync(file, '')\n}\n\nmodule.exports = {\n createFile: u(createFile),\n createFileSync\n}\n",
|
|
23
|
-
"'use strict'\n\nconst u = require('universalify').fromPromise\nconst path = require('path')\nconst fs = require('../fs')\nconst mkdir = require('../mkdirs')\nconst { pathExists } = require('../path-exists')\nconst { areIdentical } = require('../util/stat')\n\nasync function createLink (srcpath, dstpath) {\n let dstStat\n try {\n dstStat = await fs.lstat(dstpath)\n } catch {\n // ignore error\n }\n\n let srcStat\n try {\n srcStat = await fs.lstat(srcpath)\n } catch (err) {\n err.message = err.message.replace('lstat', 'ensureLink')\n throw err\n }\n\n if (dstStat && areIdentical(srcStat, dstStat)) return\n\n const dir = path.dirname(dstpath)\n\n const dirExists = await pathExists(dir)\n\n if (!dirExists) {\n await mkdir.mkdirs(dir)\n }\n\n await fs.link(srcpath, dstpath)\n}\n\nfunction createLinkSync (srcpath, dstpath) {\n let dstStat\n try {\n dstStat = fs.lstatSync(dstpath)\n } catch {}\n\n try {\n const srcStat = fs.lstatSync(srcpath)\n if (dstStat && areIdentical(srcStat, dstStat)) return\n } catch (err) {\n err.message = err.message.replace('lstat', 'ensureLink')\n throw err\n }\n\n const dir = path.dirname(dstpath)\n const dirExists = fs.existsSync(dir)\n if (dirExists) return fs.linkSync(srcpath, dstpath)\n mkdir.mkdirsSync(dir)\n\n return fs.linkSync(srcpath, dstpath)\n}\n\nmodule.exports = {\n createLink: u(createLink),\n createLinkSync\n}\n",
|
|
24
|
-
"'use strict'\n\nconst path = require('path')\nconst fs = require('../fs')\nconst { pathExists } = require('../path-exists')\n\nconst u = require('universalify').fromPromise\n\n/**\n * Function that returns two types of paths, one relative to symlink, and one\n * relative to the current working directory. Checks if path is absolute or\n * relative. If the path is relative, this function checks if the path is\n * relative to symlink or relative to current working directory. This is an\n * initiative to find a smarter `srcpath` to supply when building symlinks.\n * This allows you to determine which path to use out of one of three possible\n * types of source paths. The first is an absolute path. This is detected by\n * `path.isAbsolute()`. When an absolute path is provided, it is checked to\n * see if it exists. If it does it's used, if not an error is returned\n * (callback)/ thrown (sync). The other two options for `srcpath` are a\n * relative url. By default Node's `fs.symlink` works by creating a symlink\n * using `dstpath` and expects the `srcpath` to be relative to the newly\n * created symlink. If you provide a `srcpath` that does not exist on the file\n * system it results in a broken symlink. To minimize this, the function\n * checks to see if the 'relative to symlink' source file exists, and if it\n * does it will use it. If it does not, it checks if there's a file that\n * exists that is relative to the current working directory, if does its used.\n * This preserves the expectations of the original fs.symlink spec and adds\n * the ability to pass in `relative to current working direcotry` paths.\n */\n\nasync function symlinkPaths (srcpath, dstpath) {\n if (path.isAbsolute(srcpath)) {\n try {\n await fs.lstat(srcpath)\n } catch (err) {\n err.message = err.message.replace('lstat', 'ensureSymlink')\n throw err\n }\n\n return {\n toCwd: srcpath,\n toDst: srcpath\n }\n }\n\n const dstdir = path.dirname(dstpath)\n const relativeToDst = path.join(dstdir, srcpath)\n\n const exists = await pathExists(relativeToDst)\n if (exists) {\n return {\n toCwd: relativeToDst,\n toDst: srcpath\n }\n }\n\n try {\n await fs.lstat(srcpath)\n } catch (err) {\n err.message = err.message.replace('lstat', 'ensureSymlink')\n throw err\n }\n\n return {\n toCwd: srcpath,\n toDst: path.relative(dstdir, srcpath)\n }\n}\n\nfunction symlinkPathsSync (srcpath, dstpath) {\n if (path.isAbsolute(srcpath)) {\n const exists = fs.existsSync(srcpath)\n if (!exists) throw new Error('absolute srcpath does not exist')\n return {\n toCwd: srcpath,\n toDst: srcpath\n }\n }\n\n const dstdir = path.dirname(dstpath)\n const relativeToDst = path.join(dstdir, srcpath)\n const exists = fs.existsSync(relativeToDst)\n if (exists) {\n return {\n toCwd: relativeToDst,\n toDst: srcpath\n }\n }\n\n const srcExists = fs.existsSync(srcpath)\n if (!srcExists) throw new Error('relative srcpath does not exist')\n return {\n toCwd: srcpath,\n toDst: path.relative(dstdir, srcpath)\n }\n}\n\nmodule.exports = {\n symlinkPaths: u(symlinkPaths),\n symlinkPathsSync\n}\n",
|
|
25
|
-
"'use strict'\n\nconst fs = require('../fs')\nconst u = require('universalify').fromPromise\n\nasync function symlinkType (srcpath, type) {\n if (type) return type\n\n let stats\n try {\n stats = await fs.lstat(srcpath)\n } catch {\n return 'file'\n }\n\n return (stats && stats.isDirectory()) ? 'dir' : 'file'\n}\n\nfunction symlinkTypeSync (srcpath, type) {\n if (type) return type\n\n let stats\n try {\n stats = fs.lstatSync(srcpath)\n } catch {\n return 'file'\n }\n return (stats && stats.isDirectory()) ? 'dir' : 'file'\n}\n\nmodule.exports = {\n symlinkType: u(symlinkType),\n symlinkTypeSync\n}\n",
|
|
26
|
-
"'use strict'\n\nconst u = require('universalify').fromPromise\nconst path = require('path')\nconst fs = require('../fs')\n\nconst { mkdirs, mkdirsSync } = require('../mkdirs')\n\nconst { symlinkPaths, symlinkPathsSync } = require('./symlink-paths')\nconst { symlinkType, symlinkTypeSync } = require('./symlink-type')\n\nconst { pathExists } = require('../path-exists')\n\nconst { areIdentical } = require('../util/stat')\n\nasync function createSymlink (srcpath, dstpath, type) {\n let stats\n try {\n stats = await fs.lstat(dstpath)\n } catch { }\n\n if (stats && stats.isSymbolicLink()) {\n const [srcStat, dstStat] = await Promise.all([\n fs.stat(srcpath),\n fs.stat(dstpath)\n ])\n\n if (areIdentical(srcStat, dstStat)) return\n }\n\n const relative = await symlinkPaths(srcpath, dstpath)\n srcpath = relative.toDst\n const toType = await symlinkType(relative.toCwd, type)\n const dir = path.dirname(dstpath)\n\n if (!(await pathExists(dir))) {\n await mkdirs(dir)\n }\n\n return fs.symlink(srcpath, dstpath, toType)\n}\n\nfunction createSymlinkSync (srcpath, dstpath, type) {\n let stats\n try {\n stats = fs.lstatSync(dstpath)\n } catch { }\n if (stats && stats.isSymbolicLink()) {\n const srcStat = fs.statSync(srcpath)\n const dstStat = fs.statSync(dstpath)\n if (areIdentical(srcStat, dstStat)) return\n }\n\n const relative = symlinkPathsSync(srcpath, dstpath)\n srcpath = relative.toDst\n type = symlinkTypeSync(relative.toCwd, type)\n const dir = path.dirname(dstpath)\n const exists = fs.existsSync(dir)\n if (exists) return fs.symlinkSync(srcpath, dstpath, type)\n mkdirsSync(dir)\n return fs.symlinkSync(srcpath, dstpath, type)\n}\n\nmodule.exports = {\n createSymlink: u(createSymlink),\n createSymlinkSync\n}\n",
|
|
27
|
-
"'use strict'\n\nconst { createFile, createFileSync } = require('./file')\nconst { createLink, createLinkSync } = require('./link')\nconst { createSymlink, createSymlinkSync } = require('./symlink')\n\nmodule.exports = {\n // file\n createFile,\n createFileSync,\n ensureFile: createFile,\n ensureFileSync: createFileSync,\n // link\n createLink,\n createLinkSync,\n ensureLink: createLink,\n ensureLinkSync: createLinkSync,\n // symlink\n createSymlink,\n createSymlinkSync,\n ensureSymlink: createSymlink,\n ensureSymlinkSync: createSymlinkSync\n}\n",
|
|
28
|
-
"function stringify (obj, { EOL = '\\n', finalEOL = true, replacer = null, spaces } = {}) {\n const EOF = finalEOL ? EOL : ''\n const str = JSON.stringify(obj, replacer, spaces)\n\n return str.replace(/\\n/g, EOL) + EOF\n}\n\nfunction stripBom (content) {\n // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified\n if (Buffer.isBuffer(content)) content = content.toString('utf8')\n return content.replace(/^\\uFEFF/, '')\n}\n\nmodule.exports = { stringify, stripBom }\n",
|
|
29
|
-
"let _fs\ntry {\n _fs = require('graceful-fs')\n} catch (_) {\n _fs = require('fs')\n}\nconst universalify = require('universalify')\nconst { stringify, stripBom } = require('./utils')\n\nasync function _readFile (file, options = {}) {\n if (typeof options === 'string') {\n options = { encoding: options }\n }\n\n const fs = options.fs || _fs\n\n const shouldThrow = 'throws' in options ? options.throws : true\n\n let data = await universalify.fromCallback(fs.readFile)(file, options)\n\n data = stripBom(data)\n\n let obj\n try {\n obj = JSON.parse(data, options ? options.reviver : null)\n } catch (err) {\n if (shouldThrow) {\n err.message = `${file}: ${err.message}`\n throw err\n } else {\n return null\n }\n }\n\n return obj\n}\n\nconst readFile = universalify.fromPromise(_readFile)\n\nfunction readFileSync (file, options = {}) {\n if (typeof options === 'string') {\n options = { encoding: options }\n }\n\n const fs = options.fs || _fs\n\n const shouldThrow = 'throws' in options ? options.throws : true\n\n try {\n let content = fs.readFileSync(file, options)\n content = stripBom(content)\n return JSON.parse(content, options.reviver)\n } catch (err) {\n if (shouldThrow) {\n err.message = `${file}: ${err.message}`\n throw err\n } else {\n return null\n }\n }\n}\n\nasync function _writeFile (file, obj, options = {}) {\n const fs = options.fs || _fs\n\n const str = stringify(obj, options)\n\n await universalify.fromCallback(fs.writeFile)(file, str, options)\n}\n\nconst writeFile = universalify.fromPromise(_writeFile)\n\nfunction writeFileSync (file, obj, options = {}) {\n const fs = options.fs || _fs\n\n const str = stringify(obj, options)\n // not sure if fs.writeFileSync returns anything, but just in case\n return fs.writeFileSync(file, str, options)\n}\n\nconst jsonfile = {\n readFile,\n readFileSync,\n writeFile,\n writeFileSync\n}\n\nmodule.exports = jsonfile\n",
|
|
30
|
-
"'use strict'\n\nconst jsonFile = require('jsonfile')\n\nmodule.exports = {\n // jsonfile exports\n readJson: jsonFile.readFile,\n readJsonSync: jsonFile.readFileSync,\n writeJson: jsonFile.writeFile,\n writeJsonSync: jsonFile.writeFileSync\n}\n",
|
|
31
|
-
"'use strict'\n\nconst u = require('universalify').fromPromise\nconst fs = require('../fs')\nconst path = require('path')\nconst mkdir = require('../mkdirs')\nconst pathExists = require('../path-exists').pathExists\n\nasync function outputFile (file, data, encoding = 'utf-8') {\n const dir = path.dirname(file)\n\n if (!(await pathExists(dir))) {\n await mkdir.mkdirs(dir)\n }\n\n return fs.writeFile(file, data, encoding)\n}\n\nfunction outputFileSync (file, ...args) {\n const dir = path.dirname(file)\n if (!fs.existsSync(dir)) {\n mkdir.mkdirsSync(dir)\n }\n\n fs.writeFileSync(file, ...args)\n}\n\nmodule.exports = {\n outputFile: u(outputFile),\n outputFileSync\n}\n",
|
|
32
|
-
"'use strict'\n\nconst { stringify } = require('jsonfile/utils')\nconst { outputFile } = require('../output-file')\n\nasync function outputJson (file, data, options = {}) {\n const str = stringify(data, options)\n\n await outputFile(file, str, options)\n}\n\nmodule.exports = outputJson\n",
|
|
33
|
-
"'use strict'\n\nconst { stringify } = require('jsonfile/utils')\nconst { outputFileSync } = require('../output-file')\n\nfunction outputJsonSync (file, data, options) {\n const str = stringify(data, options)\n\n outputFileSync(file, str, options)\n}\n\nmodule.exports = outputJsonSync\n",
|
|
34
|
-
"'use strict'\n\nconst u = require('universalify').fromPromise\nconst jsonFile = require('./jsonfile')\n\njsonFile.outputJson = u(require('./output-json'))\njsonFile.outputJsonSync = require('./output-json-sync')\n// aliases\njsonFile.outputJSON = jsonFile.outputJson\njsonFile.outputJSONSync = jsonFile.outputJsonSync\njsonFile.writeJSON = jsonFile.writeJson\njsonFile.writeJSONSync = jsonFile.writeJsonSync\njsonFile.readJSON = jsonFile.readJson\njsonFile.readJSONSync = jsonFile.readJsonSync\n\nmodule.exports = jsonFile\n",
|
|
35
|
-
"'use strict'\n\nconst fs = require('../fs')\nconst path = require('path')\nconst { copy } = require('../copy')\nconst { remove } = require('../remove')\nconst { mkdirp } = require('../mkdirs')\nconst { pathExists } = require('../path-exists')\nconst stat = require('../util/stat')\n\nasync function move (src, dest, opts = {}) {\n const overwrite = opts.overwrite || opts.clobber || false\n\n const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, 'move', opts)\n\n await stat.checkParentPaths(src, srcStat, dest, 'move')\n\n // If the parent of dest is not root, make sure it exists before proceeding\n const destParent = path.dirname(dest)\n const parsedParentPath = path.parse(destParent)\n if (parsedParentPath.root !== destParent) {\n await mkdirp(destParent)\n }\n\n return doRename(src, dest, overwrite, isChangingCase)\n}\n\nasync function doRename (src, dest, overwrite, isChangingCase) {\n if (!isChangingCase) {\n if (overwrite) {\n await remove(dest)\n } else if (await pathExists(dest)) {\n throw new Error('dest already exists.')\n }\n }\n\n try {\n // Try w/ rename first, and try copy + remove if EXDEV\n await fs.rename(src, dest)\n } catch (err) {\n if (err.code !== 'EXDEV') {\n throw err\n }\n await moveAcrossDevice(src, dest, overwrite)\n }\n}\n\nasync function moveAcrossDevice (src, dest, overwrite) {\n const opts = {\n overwrite,\n errorOnExist: true,\n preserveTimestamps: true\n }\n\n await copy(src, dest, opts)\n return remove(src)\n}\n\nmodule.exports = move\n",
|
|
36
|
-
"'use strict'\n\nconst fs = require('graceful-fs')\nconst path = require('path')\nconst copySync = require('../copy').copySync\nconst removeSync = require('../remove').removeSync\nconst mkdirpSync = require('../mkdirs').mkdirpSync\nconst stat = require('../util/stat')\n\nfunction moveSync (src, dest, opts) {\n opts = opts || {}\n const overwrite = opts.overwrite || opts.clobber || false\n\n const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, 'move', opts)\n stat.checkParentPathsSync(src, srcStat, dest, 'move')\n if (!isParentRoot(dest)) mkdirpSync(path.dirname(dest))\n return doRename(src, dest, overwrite, isChangingCase)\n}\n\nfunction isParentRoot (dest) {\n const parent = path.dirname(dest)\n const parsedPath = path.parse(parent)\n return parsedPath.root === parent\n}\n\nfunction doRename (src, dest, overwrite, isChangingCase) {\n if (isChangingCase) return rename(src, dest, overwrite)\n if (overwrite) {\n removeSync(dest)\n return rename(src, dest, overwrite)\n }\n if (fs.existsSync(dest)) throw new Error('dest already exists.')\n return rename(src, dest, overwrite)\n}\n\nfunction rename (src, dest, overwrite) {\n try {\n fs.renameSync(src, dest)\n } catch (err) {\n if (err.code !== 'EXDEV') throw err\n return moveAcrossDevice(src, dest, overwrite)\n }\n}\n\nfunction moveAcrossDevice (src, dest, overwrite) {\n const opts = {\n overwrite,\n errorOnExist: true,\n preserveTimestamps: true\n }\n copySync(src, dest, opts)\n return removeSync(src)\n}\n\nmodule.exports = moveSync\n",
|
|
37
|
-
"'use strict'\n\nconst u = require('universalify').fromPromise\nmodule.exports = {\n move: u(require('./move')),\n moveSync: require('./move-sync')\n}\n",
|
|
38
|
-
"'use strict'\n\nmodule.exports = {\n // Export promiseified graceful-fs:\n ...require('./fs'),\n // Export extra methods:\n ...require('./copy'),\n ...require('./empty'),\n ...require('./ensure'),\n ...require('./json'),\n ...require('./mkdirs'),\n ...require('./move'),\n ...require('./output-file'),\n ...require('./path-exists'),\n ...require('./remove')\n}\n",
|
|
39
|
-
"import type { EnvKey } from '../../../env'\nimport type { Env } from './types'\nimport p from 'node:process'\nimport { projectPath } from '@stacksjs/path'\nimport { ValidationBoolean, ValidationEnum, ValidationNumber } from '@stacksjs/validation'\nimport fs from 'fs-extra'\n\nconst handler = {\n get: (target: Env, key: EnvKey) => {\n const value = target[key] as any\n\n // if value is a string but only contains numbers, and the key is not AWS_ACCOUNT_ID, return it as a number\n if (typeof value === 'string' && /^\\d+$/.test(value) && key !== 'AWS_ACCOUNT_ID')\n return Number(value)\n\n // if value is a string but only contains boolean values, return it as a boolean\n if (typeof value === 'string' && /^true|false$/.test(value))\n return value === 'true'\n\n // at some point, let's see if we can remove the need for below\n if (value instanceof ValidationEnum)\n return target[key] as string\n if (value instanceof ValidationBoolean)\n return !!target[key]\n if (value instanceof ValidationNumber)\n return Number(target[key])\n\n return value as string\n },\n}\n\nexport function process(): Env {\n return typeof Bun !== 'undefined' ? (Bun.env as unknown as Env) : (p.env as unknown as Env)\n}\n\nexport const env: Env = new Proxy(process(), handler)\n\nexport function writeEnv(key: EnvKey, value: string, options?: { path: string }): void {\n const envPath = options?.path || projectPath('.env')\n const env = fs.readFileSync(envPath, 'utf-8')\n\n // Split the file into lines\n const lines = env.split('\\n')\n\n // Find the line with the variable we want to update\n const index = lines.findIndex(line => line.startsWith(`${key}=`))\n\n // If the variable exists, update it\n if (index !== -1)\n lines[index] = `${key}=${value}`\n // Otherwise, add a new line\n else lines.push(`${key}=${value}`)\n\n // Join the lines back into a string and write it to the .env file\n fs.writeFileSync(envPath, lines.join('\\n'))\n}\n\nexport * from './types'\n",
|
|
40
|
-
"import type { Infer, VineBoolean, VineEnum, VineNumber, VineString } from '@stacksjs/validation'\nimport type { EnvKey } from '../../../env'\nimport { schema } from '@stacksjs/validation'\nimport env from '~/config/env'\n\ninterface EnumObject {\n [key: string]: string[]\n}\n\nexport const envEnum: EnumObject = {\n APP_ENV: ['local', 'dev', 'development', 'staging', 'prod', 'production'],\n DB_CONNECTION: ['mysql', 'sqlite', 'postgres', 'dynamodb'],\n MAIL_MAILER: ['smtp', 'mailgun', 'ses', 'postmark', 'sendmail', 'log'],\n SEARCH_ENGINE_DRIVER: ['opensearch'],\n FRONTEND_APP_ENV: ['development', 'staging', 'production'],\n}\n\n// we need to get this into the right format so we can infer the type\ntype EnvValue = string | boolean | number | readonly string[]\ntype EnvType = typeof env\ntype EnvKeys = keyof EnvType\ntype EnvMap = {\n [K in EnvKeys]: EnvType[K] extends string\n ? VineString\n : EnvType[K] extends number\n ? VineNumber\n : EnvType[K] extends boolean\n ? VineBoolean\n : EnvType[K] extends readonly string[]\n ? VineEnum<string[]>\n : unknown\n}\n\ntype ValidatorType = VineString | VineNumber | VineBoolean | VineEnum<string[]>\n\nconst envStructure = Object.entries(env).reduce((acc, [key, value]) => {\n let validatorType: ValidatorType\n switch (typeof value) {\n case 'string':\n validatorType = schema.string()\n break\n case 'number':\n validatorType = schema.number()\n break\n case 'boolean':\n validatorType = schema.boolean()\n break\n default:\n if (Array.isArray(value)) {\n validatorType = schema.enum(value as string[])\n break\n }\n\n // check if is on object\n if (typeof value === 'object') {\n const schemaNameSymbol = Symbol.for('schema_name')\n const schemaName = value[schemaNameSymbol]\n // log.debug('value', value)\n // log.debug('schemaName', schemaName)\n\n if (schemaName === 'vine.string') {\n validatorType = schema.string()\n break\n }\n\n if (schemaName === 'vine.number') {\n validatorType = schema.number()\n break\n }\n\n if (schemaName === 'vine.boolean') {\n validatorType = schema.boolean()\n break\n }\n\n // if (schemaName === 'vine.enum') {\n // validatorType = schema.enum(value as string[])\n // break\n // }\n\n // oddly, enums don't trigger schemaName === 'vine.enum'\n if (!schemaName) {\n validatorType = schema.enum(envEnum.APP_ENV)\n break\n }\n\n console.error('Unknown env value type', typeof value)\n }\n\n throw new Error(`Invalid env value for ${key}`)\n }\n const envKey = key as EnvKeys\n\n acc[envKey] = validatorType as any\n return acc\n}, {} as EnvMap)\n\nexport const envSchema = schema.object(envStructure)\nexport type Env = Infer<typeof envSchema>\n\nexport type EnvOptions = Env\nexport type EnvConfig = Partial<Record<EnvKey, EnvValue>>\n\nexport interface FrontendEnv {\n FRONTEND_APP_ENV: 'local' | 'development' | 'staging' | 'production'\n FRONTEND_APP_URL: string\n}\nexport type FrontendEnvKeys = keyof FrontendEnv\n",
|
|
41
|
-
"import type { EnvConfig } from '@stacksjs/env'\nimport { schema } from '@stacksjs/validation'\n\n/**\n * **Env Configuration & Validations**\n *\n * This configuration defines all of your Env validations. Because Stacks is fully-typed, you\n * may hover any of the options below and the definitions will be provided. In case you\n * have any questions, feel free to reach out via Discord or GitHub Discussions.\n */\nexport default {\n APP_NAME: schema.string(),\n APP_ENV: schema.enum(['local', 'dev', 'stage', 'prod']),\n APP_KEY: schema.string(),\n APP_URL: schema.string(),\n\n PORT: schema.number(),\n PORT_BACKEND: schema.number(),\n PORT_ADMIN: schema.number(),\n PORT_LIBRARY: schema.number(),\n PORT_DESKTOP: schema.number(),\n PORT_EMAIL: schema.number(),\n PORT_DOCS: schema.number(),\n PORT_INSPECT: schema.number(),\n PORT_API: schema.number(),\n PORT_SYSTEM_TRAY: schema.number(),\n\n APP_MAINTENANCE: schema.boolean(),\n DEBUG: schema.boolean(),\n\n API_PREFIX: schema.string(),\n DOCS_PREFIX: schema.string(),\n\n DB_CONNECTION: schema.enum(['mysql', 'sqlite', 'postgres']),\n DB_HOST: schema.string(),\n DB_PORT: schema.number(),\n DB_DATABASE: schema.string(),\n DB_USERNAME: schema.string(),\n DB_PASSWORD: schema.string(),\n\n AWS_ACCOUNT_ID: schema.string(),\n AWS_ACCESS_KEY_ID: schema.string(),\n AWS_SECRET_ACCESS_KEY: schema.string(),\n AWS_DEFAULT_REGION: schema.string(),\n AWS_DEFAULT_PASSWORD: schema.string(),\n\n MAIL_MAILER: schema.enum(['ses', 'sendmail', 'log', 'smtp']),\n MAIL_HOST: schema.string(),\n MAIL_PORT: schema.number(),\n MAIL_USERNAME: schema.string(),\n MAIL_PASSWORD: schema.string(),\n MAIL_ENCRYPTION: schema.string(),\n MAIL_FROM_NAME: schema.string(),\n MAIL_FROM_ADDRESS: schema.string(),\n\n SEARCH_ENGINE_DRIVER: schema.enum(['meilisearch', 'algolia', 'typesense']),\n MEILISEARCH_HOST: schema.string(),\n MEILISEARCH_KEY: schema.string(),\n\n FRONTEND_APP_ENV: schema.enum(['development', 'staging', 'production']),\n FRONTEND_APP_URL: schema.string(),\n} satisfies EnvConfig\n"
|
|
42
|
-
],
|
|
43
|
-
"mappings": ";iEAEA,AAAQ,wBAAwB,CAAC,EAAI,CACnC,OAAO,OAAO,uBAAwB,IAAI,EAAM,CAC9C,UAAW,EAAK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AQ,EAAO,GAGrB,UAAW,IAAU,UAAY,QAAQ,KAAK,CAAK,GAAK,IAAQ,iBAC9D,OAAO,OAAO,CAAK,EAGrB,UAAW,IAAU,UAAY,eAAe,KAAK,CAAK,EACxD,OAAO,IAAU,OAGnB,GAAI,aAAiB,GACnB,OAAO,EAAO,GAChB,GAAI,aAAiB,GACnB,QAAS,EAAO,GAClB,GAAI,aAAiB,GACnB,OAAO,OAAO,EAAO,EAAI,EAE3B,OAAO,EAEX,EAMa,GAAW,IAAI,MAAM,GAAQ,EAAG,EAAO",
|
|
44
|
-
"debugId": "DDFB793912998EFC64756E2164756E21",
|
|
45
|
-
"names": []
|
|
46
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../node_modules/@smithy/property-provider/dist-es/ProviderError.js", "../../../../../node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js", "../../../../../node_modules/@smithy/property-provider/dist-es/TokenProviderError.js", "../../../../../node_modules/@smithy/property-provider/dist-es/chain.js", "../../../../../node_modules/@smithy/property-provider/dist-es/fromStatic.js", "../../../../../node_modules/@smithy/property-provider/dist-es/memoize.js"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"export class ProviderError extends Error {\n constructor(message, options = true) {\n let logger;\n let tryNextLink = true;\n if (typeof options === \"boolean\") {\n logger = undefined;\n tryNextLink = options;\n }\n else if (options != null && typeof options === \"object\") {\n logger = options.logger;\n tryNextLink = options.tryNextLink ?? true;\n }\n super(message);\n this.name = \"ProviderError\";\n this.tryNextLink = tryNextLink;\n Object.setPrototypeOf(this, ProviderError.prototype);\n logger?.debug?.(`@smithy/property-provider ${tryNextLink ? \"->\" : \"(!)\"} ${message}`);\n }\n static from(error, options = true) {\n return Object.assign(new this(error.message, options), error);\n }\n}\n",
|
|
6
|
-
"import { ProviderError } from \"./ProviderError\";\nexport class CredentialsProviderError extends ProviderError {\n constructor(message, options = true) {\n super(message, options);\n this.name = \"CredentialsProviderError\";\n Object.setPrototypeOf(this, CredentialsProviderError.prototype);\n }\n}\n",
|
|
7
|
-
"import { ProviderError } from \"./ProviderError\";\nexport class TokenProviderError extends ProviderError {\n constructor(message, options = true) {\n super(message, options);\n this.name = \"TokenProviderError\";\n Object.setPrototypeOf(this, TokenProviderError.prototype);\n }\n}\n",
|
|
8
|
-
"import { ProviderError } from \"./ProviderError\";\nexport const chain = (...providers) => async () => {\n if (providers.length === 0) {\n throw new ProviderError(\"No providers in chain\");\n }\n let lastProviderError;\n for (const provider of providers) {\n try {\n const credentials = await provider();\n return credentials;\n }\n catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n};\n",
|
|
9
|
-
"export const fromStatic = (staticValue) => () => Promise.resolve(staticValue);\n",
|
|
10
|
-
"export const memoize = (provider, isExpired, requiresRefresh) => {\n let resolved;\n let pending;\n let hasResult;\n let isConstant = false;\n const coalesceProvider = async () => {\n if (!pending) {\n pending = provider();\n }\n try {\n resolved = await pending;\n hasResult = true;\n isConstant = false;\n }\n finally {\n pending = undefined;\n }\n return resolved;\n };\n if (isExpired === undefined) {\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider();\n }\n return resolved;\n };\n }\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider();\n }\n if (isConstant) {\n return resolved;\n }\n if (requiresRefresh && !requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider();\n return resolved;\n }\n return resolved;\n };\n};\n"
|
|
11
|
-
],
|
|
12
|
-
"mappings": "AAAO,MAAM,UAAsB,KAAM,CACrC,WAAW,CAAC,EAAS,EAAU,GAAM,CACjC,IAAI,EACA,EAAc,GAClB,UAAW,IAAY,UACnB,EAAS,OACT,EAAc,UAET,GAAW,aAAe,IAAY,SAC3C,EAAS,EAAQ,OACjB,EAAc,EAAQ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EAAW,MAAM,EAAiB,EAEtC,GAAI,EACA,OAAO,EAEX,GAAI,IAAoB,EAAgB,CAAQ,EAE5C,OADA,EAAa,GACN,EAEX,GAAI,EAAU,CAAQ,EAElB,OADA,MAAM,EAAiB,EAChB,EAEX,OAAO",
|
|
13
|
-
"debugId": "694B4CD6D94C250364756E2164756E21",
|
|
14
|
-
"names": []
|
|
15
|
-
}
|
package/dist/chunk-8a487snn.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
var j=Object.create;var{getPrototypeOf:k,defineProperty:e,getOwnPropertyNames:h,getOwnPropertyDescriptor:l}=Object,i=Object.prototype.hasOwnProperty;var m=(a,b,c)=>{c=a!=null?j(k(a)):{};const d=b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c;for(let f of h(a))if(!i.call(d,f))e(d,f,{get:()=>a[f],enumerable:!0});return d},g=new WeakMap,n=(a)=>{var b=g.get(a),c;if(b)return b;if(b=e({},"__esModule",{value:!0}),a&&typeof a==="object"||typeof a==="function")h(a).map((d)=>!i.call(b,d)&&e(b,d,{get:()=>a[d],enumerable:!(c=l(a,d))||c.enumerable}));return g.set(a,b),b},o=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var p=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0,configurable:!0,set:(d)=>b[c]=()=>d})};var q=(a,b)=>()=>(a&&(b=a(a=0)),b);
|
|
2
|
-
export{m as Bb,n as Cb,o as Db,p as Eb,q as Fb};
|
|
3
|
-
|
|
4
|
-
//# debugId=06F4195A536A022C64756E2164756E21
|
|
5
|
-
//# sourceMappingURL=chunk-8a487snn.js.map
|
package/dist/chunk-9kkf5maz.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{sa as z,ta as B}from"./chunk-rh4brnzh.js";import"./chunk-x5c5ngpb.js";import"./chunk-w81rbh65.js";import{vb as K,wb as y}from"./chunk-3zx3yk1m.js";import"./chunk-8a487snn.js";import{parse as p}from"url";import{Buffer as M}from"buffer";import{request as k}from"http";function E(c){return new Promise((I,x)=>{const T=k({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new K("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new K("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{const{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new K("Error response received from instance metadata service"),{statusCode:O})),T.destroy();const $=[];N.on("data",(w)=>{$.push(w)}),N.on("end",()=>{I(M.concat($)),T.destroy()})}),T.end()})}var _=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",D=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var hc=1000,Yc=0,G=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var m=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var X="AWS_CONTAINER_CREDENTIALS_FULL_URI",Z="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",b="AWS_CONTAINER_AUTHORIZATION_TOKEN",mc=(c={})=>{const{timeout:I,maxRetries:x}=G(c);return()=>m(async()=>{const T=await s({logger:c.logger}),N=JSON.parse(await C(I,T));if(!_(N))throw new y("Invalid response received from instance metadata service.",{logger:c.logger});return D(N)},x)},C=async(c,I)=>{if(process.env[b])I.headers={...I.headers,Authorization:process.env[b]};return(await E({...I,timeout:c})).toString()},a="169.254.170.2",n={localhost:!0,"127.0.0.1":!0},o={"http:":!0,"https:":!0},s=async({logger:c})=>{if(process.env[Z])return{hostname:a,path:process.env[Z]};if(process.env[X]){const I=p(process.env[X]);if(!I.hostname||!(I.hostname in n))throw new y(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in o))throw new y(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new y(`The container metadata credential provider cannot be used unless the ${Z} or ${X} environment variable is set`,{tryNextLink:!1,logger:c})};class Q extends y{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,Q.prototype)}}var J;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(J||(J={}));var H={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0};var u;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(u||(u={}));var g="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",l="ec2_metadata_service_endpoint_mode",q={environmentVariableSelector:(c)=>c[g],configFileSelector:(c)=>c[l],default:u.IPv4};var v=async()=>B(await r()||await d()),r=async()=>z(H)(),d=async()=>{const c=await z(q)();switch(c){case u.IPv4:return J.IPv4;case u.IPv6:return J.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(u)}`)}};var L=(c,I)=>{const x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(T)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);const N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var U=(c,I={})=>{const x=I?.logger||console;let T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=L(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=L(T,x);else throw O}return T=N,N}};var P="/latest/meta-data/iam/security-credentials/",e="/latest/api/token",W="AWS_EC2_METADATA_V1_DISABLED",t="ec2_metadata_v1_disabled",F="x-aws-ec2-metadata-token",oc=(c={})=>U(i(c),{logger:c.logger}),i=(c={})=>{let I=!1;const{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=G(c),$=async(w,j)=>{if(I||j.headers?.[F]==null){let h=!1,Y=!1;const R=await z({environmentVariableSelector:(S)=>{const A=S[W];if(Y=!!A&&A!=="false",A===void 0)throw new y(`${W} not set in env, checking config file next.`,{logger:c.logger});return Y},configFileSelector:(S)=>{const A=S[t];return h=!!A&&A!=="false",h},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||R){const S=[];if(c.ec2MetadataV1Disabled)S.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(h)S.push(`config file profile (${t})`);if(Y)S.push(`process environment variable (${W})`);throw new Q(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${S.join(", ")}].`)}}const V=(await m(async()=>{let h;try{h=await Ic(j)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)).trim();return m(async()=>{let h;try{h=await Tc(V,j,c)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)};return async()=>{const w=await v();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),$(O,{...w,timeout:N});else{let j;try{j=(await cc({...w,timeout:N})).toString()}catch(f){if(f?.statusCode===400)throw Object.assign(f,{message:"EC2 Metadata token request returned error"});else if(f.message==="TimeoutError"||[403,404,405].includes(f.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),$(O,{...w,timeout:N})}return $(O,{...w,headers:{[F]:j},timeout:N})}}},cc=async(c)=>E({...c,path:e,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Ic=async(c)=>(await E({...c,path:P})).toString(),Tc=async(c,I,x)=>{const T=JSON.parse((await E({...I,path:P+c})).toString());if(!_(T))throw new y("Invalid response received from instance metadata service.",{logger:x.logger});return D(T)};export{G as providerConfigFromInit,E as httpRequest,v as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,mc as fromContainerMetadata,J as Endpoint,Z as ENV_CMDS_RELATIVE_URI,X as ENV_CMDS_FULL_URI,b as ENV_CMDS_AUTH_TOKEN,hc as DEFAULT_TIMEOUT,Yc as DEFAULT_MAX_RETRIES};
|
|
3
|
-
|
|
4
|
-
//# debugId=9855E2BD98C9B94D64756E2164756E21
|
|
5
|
-
//# sourceMappingURL=chunk-9kkf5maz.js.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js", "../../../../../node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/httpRequest.js", "../../../../../node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/ImdsCredentials.js", "../../../../../node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/RemoteProviderInit.js", "../../../../../node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/retry.js", "../../../../../node_modules/@smithy/credential-provider-imds/dist-es/error/InstanceMetadataV1FallbackError.js", "../../../../../node_modules/@smithy/credential-provider-imds/dist-es/config/Endpoint.js", "../../../../../node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointConfigOptions.js", "../../../../../node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointMode.js", "../../../../../node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointModeConfigOptions.js", "../../../../../node_modules/@smithy/credential-provider-imds/dist-es/utils/getInstanceMetadataEndpoint.js", "../../../../../node_modules/@smithy/credential-provider-imds/dist-es/utils/getExtendedInstanceMetadataCredentials.js", "../../../../../node_modules/@smithy/credential-provider-imds/dist-es/utils/staticStabilityProvider.js", "../../../../../node_modules/@smithy/credential-provider-imds/dist-es/fromInstanceMetadata.js"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { parse } from \"url\";\nimport { httpRequest } from \"./remoteProvider/httpRequest\";\nimport { fromImdsCredentials, isImdsCredentials } from \"./remoteProvider/ImdsCredentials\";\nimport { providerConfigFromInit } from \"./remoteProvider/RemoteProviderInit\";\nimport { retry } from \"./remoteProvider/retry\";\nexport const ENV_CMDS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nexport const ENV_CMDS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nexport const ENV_CMDS_AUTH_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nexport const fromContainerMetadata = (init = {}) => {\n const { timeout, maxRetries } = providerConfigFromInit(init);\n return () => retry(async () => {\n const requestOptions = await getCmdsUri({ logger: init.logger });\n const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));\n if (!isImdsCredentials(credsResponse)) {\n throw new CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger,\n });\n }\n return fromImdsCredentials(credsResponse);\n }, maxRetries);\n};\nconst requestFromEcsImds = async (timeout, options) => {\n if (process.env[ENV_CMDS_AUTH_TOKEN]) {\n options.headers = {\n ...options.headers,\n Authorization: process.env[ENV_CMDS_AUTH_TOKEN],\n };\n }\n const buffer = await httpRequest({\n ...options,\n timeout,\n });\n return buffer.toString();\n};\nconst CMDS_IP = \"169.254.170.2\";\nconst GREENGRASS_HOSTS = {\n localhost: true,\n \"127.0.0.1\": true,\n};\nconst GREENGRASS_PROTOCOLS = {\n \"http:\": true,\n \"https:\": true,\n};\nconst getCmdsUri = async ({ logger }) => {\n if (process.env[ENV_CMDS_RELATIVE_URI]) {\n return {\n hostname: CMDS_IP,\n path: process.env[ENV_CMDS_RELATIVE_URI],\n };\n }\n if (process.env[ENV_CMDS_FULL_URI]) {\n const parsed = parse(process.env[ENV_CMDS_FULL_URI]);\n if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) {\n throw new CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {\n tryNextLink: false,\n logger,\n });\n }\n if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) {\n throw new CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {\n tryNextLink: false,\n logger,\n });\n }\n return {\n ...parsed,\n port: parsed.port ? parseInt(parsed.port, 10) : undefined,\n };\n }\n throw new CredentialsProviderError(\"The container metadata credential provider cannot be used unless\" +\n ` the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment` +\n \" variable is set\", {\n tryNextLink: false,\n logger,\n });\n};\n",
|
|
6
|
-
"import { ProviderError } from \"@smithy/property-provider\";\nimport { Buffer } from \"buffer\";\nimport { request } from \"http\";\nexport function httpRequest(options) {\n return new Promise((resolve, reject) => {\n const req = request({\n method: \"GET\",\n ...options,\n hostname: options.hostname?.replace(/^\\[(.+)\\]$/, \"$1\"),\n });\n req.on(\"error\", (err) => {\n reject(Object.assign(new ProviderError(\"Unable to connect to instance metadata service\"), err));\n req.destroy();\n });\n req.on(\"timeout\", () => {\n reject(new ProviderError(\"TimeoutError from instance metadata service\"));\n req.destroy();\n });\n req.on(\"response\", (res) => {\n const { statusCode = 400 } = res;\n if (statusCode < 200 || 300 <= statusCode) {\n reject(Object.assign(new ProviderError(\"Error response received from instance metadata service\"), { statusCode }));\n req.destroy();\n }\n const chunks = [];\n res.on(\"data\", (chunk) => {\n chunks.push(chunk);\n });\n res.on(\"end\", () => {\n resolve(Buffer.concat(chunks));\n req.destroy();\n });\n });\n req.end();\n });\n}\n",
|
|
7
|
-
"export const isImdsCredentials = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.AccessKeyId === \"string\" &&\n typeof arg.SecretAccessKey === \"string\" &&\n typeof arg.Token === \"string\" &&\n typeof arg.Expiration === \"string\";\nexport const fromImdsCredentials = (creds) => ({\n accessKeyId: creds.AccessKeyId,\n secretAccessKey: creds.SecretAccessKey,\n sessionToken: creds.Token,\n expiration: new Date(creds.Expiration),\n ...(creds.AccountId && { accountId: creds.AccountId }),\n});\n",
|
|
8
|
-
"export const DEFAULT_TIMEOUT = 1000;\nexport const DEFAULT_MAX_RETRIES = 0;\nexport const providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout });\n",
|
|
9
|
-
"export const retry = (toRetry, maxRetries) => {\n let promise = toRetry();\n for (let i = 0; i < maxRetries; i++) {\n promise = promise.catch(toRetry);\n }\n return promise;\n};\n",
|
|
10
|
-
"import { CredentialsProviderError } from \"@smithy/property-provider\";\nexport class InstanceMetadataV1FallbackError extends CredentialsProviderError {\n constructor(message, tryNextLink = true) {\n super(message, tryNextLink);\n this.tryNextLink = tryNextLink;\n this.name = \"InstanceMetadataV1FallbackError\";\n Object.setPrototypeOf(this, InstanceMetadataV1FallbackError.prototype);\n }\n}\n",
|
|
11
|
-
"export var Endpoint;\n(function (Endpoint) {\n Endpoint[\"IPv4\"] = \"http://169.254.169.254\";\n Endpoint[\"IPv6\"] = \"http://[fd00:ec2::254]\";\n})(Endpoint || (Endpoint = {}));\n",
|
|
12
|
-
"export const ENV_ENDPOINT_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT\";\nexport const CONFIG_ENDPOINT_NAME = \"ec2_metadata_service_endpoint\";\nexport const ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],\n default: undefined,\n};\n",
|
|
13
|
-
"export var EndpointMode;\n(function (EndpointMode) {\n EndpointMode[\"IPv4\"] = \"IPv4\";\n EndpointMode[\"IPv6\"] = \"IPv6\";\n})(EndpointMode || (EndpointMode = {}));\n",
|
|
14
|
-
"import { EndpointMode } from \"./EndpointMode\";\nexport const ENV_ENDPOINT_MODE_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE\";\nexport const CONFIG_ENDPOINT_MODE_NAME = \"ec2_metadata_service_endpoint_mode\";\nexport const ENDPOINT_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],\n default: EndpointMode.IPv4,\n};\n",
|
|
15
|
-
"import { loadConfig } from \"@smithy/node-config-provider\";\nimport { parseUrl } from \"@smithy/url-parser\";\nimport { Endpoint as InstanceMetadataEndpoint } from \"../config/Endpoint\";\nimport { ENDPOINT_CONFIG_OPTIONS } from \"../config/EndpointConfigOptions\";\nimport { EndpointMode } from \"../config/EndpointMode\";\nimport { ENDPOINT_MODE_CONFIG_OPTIONS, } from \"../config/EndpointModeConfigOptions\";\nexport const getInstanceMetadataEndpoint = async () => parseUrl((await getFromEndpointConfig()) || (await getFromEndpointModeConfig()));\nconst getFromEndpointConfig = async () => loadConfig(ENDPOINT_CONFIG_OPTIONS)();\nconst getFromEndpointModeConfig = async () => {\n const endpointMode = await loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)();\n switch (endpointMode) {\n case EndpointMode.IPv4:\n return InstanceMetadataEndpoint.IPv4;\n case EndpointMode.IPv6:\n return InstanceMetadataEndpoint.IPv6;\n default:\n throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode)}`);\n }\n};\n",
|
|
16
|
-
"const STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60;\nconst STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60;\nconst STATIC_STABILITY_DOC_URL = \"https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html\";\nexport const getExtendedInstanceMetadataCredentials = (credentials, logger) => {\n const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS +\n Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);\n const newExpiration = new Date(Date.now() + refreshInterval * 1000);\n logger.warn(\"Attempting credential expiration extension due to a credential service availability issue. A refresh of these \" +\n `credentials will be attempted after ${new Date(newExpiration)}.\\nFor more information, please visit: ` +\n STATIC_STABILITY_DOC_URL);\n const originalExpiration = credentials.originalExpiration ?? credentials.expiration;\n return {\n ...credentials,\n ...(originalExpiration ? { originalExpiration } : {}),\n expiration: newExpiration,\n };\n};\n",
|
|
17
|
-
"import { getExtendedInstanceMetadataCredentials } from \"./getExtendedInstanceMetadataCredentials\";\nexport const staticStabilityProvider = (provider, options = {}) => {\n const logger = options?.logger || console;\n let pastCredentials;\n return async () => {\n let credentials;\n try {\n credentials = await provider();\n if (credentials.expiration && credentials.expiration.getTime() < Date.now()) {\n credentials = getExtendedInstanceMetadataCredentials(credentials, logger);\n }\n }\n catch (e) {\n if (pastCredentials) {\n logger.warn(\"Credential renew failed: \", e);\n credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger);\n }\n else {\n throw e;\n }\n }\n pastCredentials = credentials;\n return credentials;\n };\n};\n",
|
|
18
|
-
"import { loadConfig } from \"@smithy/node-config-provider\";\nimport { CredentialsProviderError } from \"@smithy/property-provider\";\nimport { InstanceMetadataV1FallbackError } from \"./error/InstanceMetadataV1FallbackError\";\nimport { httpRequest } from \"./remoteProvider/httpRequest\";\nimport { fromImdsCredentials, isImdsCredentials } from \"./remoteProvider/ImdsCredentials\";\nimport { providerConfigFromInit } from \"./remoteProvider/RemoteProviderInit\";\nimport { retry } from \"./remoteProvider/retry\";\nimport { getInstanceMetadataEndpoint } from \"./utils/getInstanceMetadataEndpoint\";\nimport { staticStabilityProvider } from \"./utils/staticStabilityProvider\";\nconst IMDS_PATH = \"/latest/meta-data/iam/security-credentials/\";\nconst IMDS_TOKEN_PATH = \"/latest/api/token\";\nconst AWS_EC2_METADATA_V1_DISABLED = \"AWS_EC2_METADATA_V1_DISABLED\";\nconst PROFILE_AWS_EC2_METADATA_V1_DISABLED = \"ec2_metadata_v1_disabled\";\nconst X_AWS_EC2_METADATA_TOKEN = \"x-aws-ec2-metadata-token\";\nexport const fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger });\nconst getInstanceMetadataProvider = (init = {}) => {\n let disableFetchToken = false;\n const { logger, profile } = init;\n const { timeout, maxRetries } = providerConfigFromInit(init);\n const getCredentials = async (maxRetries, options) => {\n const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null;\n if (isImdsV1Fallback) {\n let fallbackBlockedFromProfile = false;\n let fallbackBlockedFromProcessEnv = false;\n const configValue = await loadConfig({\n environmentVariableSelector: (env) => {\n const envValue = env[AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProcessEnv = !!envValue && envValue !== \"false\";\n if (envValue === undefined) {\n throw new CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger });\n }\n return fallbackBlockedFromProcessEnv;\n },\n configFileSelector: (profile) => {\n const profileValue = profile[PROFILE_AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProfile = !!profileValue && profileValue !== \"false\";\n return fallbackBlockedFromProfile;\n },\n default: false,\n }, {\n profile,\n })();\n if (init.ec2MetadataV1Disabled || configValue) {\n const causes = [];\n if (init.ec2MetadataV1Disabled)\n causes.push(\"credential provider initialization (runtime option ec2MetadataV1Disabled)\");\n if (fallbackBlockedFromProfile)\n causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`);\n if (fallbackBlockedFromProcessEnv)\n causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`);\n throw new InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(\", \")}].`);\n }\n }\n const imdsProfile = (await retry(async () => {\n let profile;\n try {\n profile = await getProfile(options);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return profile;\n }, maxRetries)).trim();\n return retry(async () => {\n let creds;\n try {\n creds = await getCredentialsFromProfile(imdsProfile, options, init);\n }\n catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return creds;\n }, maxRetries);\n };\n return async () => {\n const endpoint = await getInstanceMetadataEndpoint();\n if (disableFetchToken) {\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (no token fetch)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n else {\n let token;\n try {\n token = (await getMetadataToken({ ...endpoint, timeout })).toString();\n }\n catch (error) {\n if (error?.statusCode === 400) {\n throw Object.assign(error, {\n message: \"EC2 Metadata token request returned error\",\n });\n }\n else if (error.message === \"TimeoutError\" || [403, 404, 405].includes(error.statusCode)) {\n disableFetchToken = true;\n }\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (initial)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n return getCredentials(maxRetries, {\n ...endpoint,\n headers: {\n [X_AWS_EC2_METADATA_TOKEN]: token,\n },\n timeout,\n });\n }\n };\n};\nconst getMetadataToken = async (options) => httpRequest({\n ...options,\n path: IMDS_TOKEN_PATH,\n method: \"PUT\",\n headers: {\n \"x-aws-ec2-metadata-token-ttl-seconds\": \"21600\",\n },\n});\nconst getProfile = async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString();\nconst getCredentialsFromProfile = async (profile, options, init) => {\n const credentialsResponse = JSON.parse((await httpRequest({\n ...options,\n path: IMDS_PATH + profile,\n })).toString());\n if (!isImdsCredentials(credentialsResponse)) {\n throw new CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger,\n });\n }\n return fromImdsCredentials(credentialsResponse);\n};\n"
|
|
19
|
-
],
|
|
20
|
-
"mappings": ";8MACA,UAAS,MCAT,WAAS,SACT,kBAAS,aACF,SAAS,CAAW,CAAC,EAAS,CACjC,OAAO,IAAI,QAAQ,CAAC,EAAS,IAAW,CACpC,MAAM,EAAM,EAAQ,CAChB,OAAQ,SACL,EACH,SAAU,EAAQ,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,EAAS,KAAM,CAAU,CAAC,GAAG,SAAS,EAC9F,GAA4B,MAAO,EAAS,EAAS,IAAS,CAChE,MAAM,EAAsB,KAAK,OAAO,MAAM,EAAY,IACnD,EACH,KAAM,EAAY,CACtB,CAAC,GAAG,SAAS,CAAC,EACd,IAAK,EAAkB,CAAmB,EACtC,MAAM,IAAI,EAAyB,4DAA6D,CAC5F,OAAQ,EAAK,MACjB,CAAC,EAEL,OAAO,EAAoB,CAAmB",
|
|
21
|
-
"debugId": "9855E2BD98C9B94D64756E2164756E21",
|
|
22
|
-
"names": []
|
|
23
|
-
}
|
package/dist/chunk-9qba8jdt.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{ib as $}from"./chunk-x5c5ngpb.js";import{rb as w,sb as z,tb as B}from"./chunk-cvpb67bs.js";import{Ab as Z,wb as x,yb as J}from"./chunk-3zx3yk1m.js";import{Bb as q}from"./chunk-8a487snn.js";var k="AWS_EC2_METADATA_DISABLED",X=async(b)=>{const{ENV_CMDS_FULL_URI:j,ENV_CMDS_RELATIVE_URI:y,fromContainerMetadata:G,fromInstanceMetadata:K}=await import("./chunk-9kkf5maz.js");if(process.env[y]||process.env[j]){b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:Q}=await import("./chunk-fx1zxxxa.js");return J(Q(b),G(b))}if(process.env[k])return async()=>{throw new x("EC2 Instance Metadata Service access disabled",{logger:b.logger})};return b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),K(b)};var Y=!1,A=(b={})=>Z(J(async()=>{if(b.profile??process.env[$]){if(process.env[w]&&process.env[z]){if(!Y)(b.logger?.warn&&b.logger?.constructor?.name!=="NoOpLogger"?b.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
|
|
2
|
-
Multiple credential sources detected:
|
|
3
|
-
Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
|
|
4
|
-
This SDK will proceed with the AWS_PROFILE value.
|
|
5
|
-
|
|
6
|
-
However, a future version may change this behavior to prefer the ENV static credentials.
|
|
7
|
-
Please ensure that your environment only sets either the AWS_PROFILE or the
|
|
8
|
-
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
|
|
9
|
-
`),Y=!0}throw new x("AWS_PROFILE is set, skipping fromEnv provider.",{logger:b.logger,tryNextLink:!0})}return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),B(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:j,ssoAccountId:y,ssoRegion:G,ssoRoleName:K,ssoSession:Q}=b;if(!j&&!y&&!G&&!K&&!Q)throw new x("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:b.logger});const{fromSSO:H}=await import("./chunk-qj2v5psd.js");return H(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:j}=await import("./chunk-eqwfdbyk.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:j}=await import("./chunk-m43npkjw.js");return j(b)()},async()=>{b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:j}=await import("./chunk-f41k7dpa.js");return j(b)()},async()=>{return b.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await X(b))()},async()=>{throw new x("Could not load credentials from any providers",{tryNextLink:!1,logger:b.logger})}),O,v),v=(b)=>b?.expiration!==void 0,O=(b)=>b?.expiration!==void 0&&b.expiration.getTime()-Date.now()<300000;export{A as K};
|
|
10
|
-
|
|
11
|
-
//# debugId=0741CE1BFB21943B64756E2164756E21
|
|
12
|
-
//# sourceMappingURL=chunk-9qba8jdt.js.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../node_modules/@aws-sdk/credential-provider-node/dist-es/remoteProvider.js", "../../../../../node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { chain, CredentialsProviderError } from \"@smithy/property-provider\";\nexport const ENV_IMDS_DISABLED = \"AWS_EC2_METADATA_DISABLED\";\nexport const remoteProvider = async (init) => {\n const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await import(\"@smithy/credential-provider-imds\");\n if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata\");\n const { fromHttp } = await import(\"@aws-sdk/credential-provider-http\");\n return chain(fromHttp(init), fromContainerMetadata(init));\n }\n if (process.env[ENV_IMDS_DISABLED]) {\n return async () => {\n throw new CredentialsProviderError(\"EC2 Instance Metadata Service access disabled\", { logger: init.logger });\n };\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata\");\n return fromInstanceMetadata(init);\n};\n",
|
|
6
|
-
"import { ENV_KEY, ENV_SECRET, fromEnv } from \"@aws-sdk/credential-provider-env\";\nimport { chain, CredentialsProviderError, memoize } from \"@smithy/property-provider\";\nimport { ENV_PROFILE } from \"@smithy/shared-ini-file-loader\";\nimport { remoteProvider } from \"./remoteProvider\";\nlet multipleCredentialSourceWarningEmitted = false;\nexport const defaultProvider = (init = {}) => memoize(chain(async () => {\n const profile = init.profile ?? process.env[ENV_PROFILE];\n if (profile) {\n const envStaticCredentialsAreSet = process.env[ENV_KEY] && process.env[ENV_SECRET];\n if (envStaticCredentialsAreSet) {\n if (!multipleCredentialSourceWarningEmitted) {\n const warnFn = init.logger?.warn && init.logger?.constructor?.name !== \"NoOpLogger\" ? init.logger.warn : console.warn;\n warnFn(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:\n Multiple credential sources detected: \n Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.\n This SDK will proceed with the AWS_PROFILE value.\n \n However, a future version may change this behavior to prefer the ENV static credentials.\n Please ensure that your environment only sets either the AWS_PROFILE or the\n AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.\n`);\n multipleCredentialSourceWarningEmitted = true;\n }\n }\n throw new CredentialsProviderError(\"AWS_PROFILE is set, skipping fromEnv provider.\", {\n logger: init.logger,\n tryNextLink: true,\n });\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromEnv\");\n return fromEnv(init)();\n}, async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n throw new CredentialsProviderError(\"Skipping SSO provider in default chain (inputs do not include SSO fields).\", { logger: init.logger });\n }\n const { fromSSO } = await import(\"@aws-sdk/credential-provider-sso\");\n return fromSSO(init)();\n}, async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromIni\");\n const { fromIni } = await import(\"@aws-sdk/credential-provider-ini\");\n return fromIni(init)();\n}, async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromProcess\");\n const { fromProcess } = await import(\"@aws-sdk/credential-provider-process\");\n return fromProcess(init)();\n}, async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile\");\n const { fromTokenFile } = await import(\"@aws-sdk/credential-provider-web-identity\");\n return fromTokenFile(init)();\n}, async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::remoteProvider\");\n return (await remoteProvider(init))();\n}, async () => {\n throw new CredentialsProviderError(\"Could not load credentials from any providers\", {\n tryNextLink: false,\n logger: init.logger,\n });\n}), credentialsTreatedAsExpired, credentialsWillNeedRefresh);\nexport const credentialsWillNeedRefresh = (credentials) => credentials?.expiration !== undefined;\nexport const credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000;\n"
|
|
7
|
-
],
|
|
8
|
-
"mappings": "sNACO,FAAM,JAAoB,sBACpB,EAAiB,MAAO,IAAS,CAC1C,MAAQ,oBAAmB,wBAAuB,wBAAuB,wBAAyB,KAAa,+BAC/G,GAAI,QAAQ,IAAI,IAA0B,QAAQ,IAAI,GAAoB,CACtE,EAAK,QAAQ,MAAM,oFAAoF,EACvG,MAAQ,YAAa,KAAa,+BAClC,OAAO,EAAM,EAAS,CAAI,EAAG,EAAsB,CAAI,CAAC,EAE5D,GAAI,QAAQ,IAAI,GACZ,MAAO,UAAY,CACf,MAAM,IAAI,EAAyB,gDAAiD,CAAE,OAAQ,EAAK,MAAO,CAAC,GAInH,OADA,EAAK,QAAQ,MAAM,0EAA0E,EACtF,EAAqB,CAAI,GCXpC,IAAI,EAAyC,GAChC,EAAkB,CAAC,EAAO,CAAC,IAAM,EAAQ,EAAM,SAAY,CAEpE,GADgB,EAAK,SAAW,QAAQ,IAAI,GAC/B,CAET,GADmC,QAAQ,IAAI,IAAY,QAAQ,IAAI,IAEnE,IAAK,EAED,CADe,EAAK,QAAQ,MAAQ,EAAK,QAAQ,aAAa,OAAS,aAAe,EAAK,OAAO,KAAO,QAAQ,MAC1G;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAQtB,EACe,EAAyC,GAGjD,MAAM,IAAI,EAAyB,iDAAkD,CACjF,OAAQ,EAAK,OACb,YAAa,EACjB,CAAC,EAGL,OADA,EAAK,QAAQ,MAAM,8DAA8D,EAC1E,EAAQ,CAAI,EAAE,GACtB,SAAY,CACX,EAAK,QAAQ,MAAM,8DAA8D,EACjF,MAAQ,cAAa,eAAc,YAAW,cAAa,cAAe,EAC1E,IAAK,IAAgB,IAAiB,IAAc,IAAgB,EAChE,MAAM,IAAI,EAAyB,6EAA8E,CAAE,OAAQ,EAAK,MAAO,CAAC,EAE5I,MAAQ,WAAY,KAAa,+BACjC,OAAO,EAAQ,CAAI,EAAE,GACtB,SAAY,CACX,EAAK,QAAQ,MAAM,8DAA8D,EACjF,MAAQ,WAAY,KAAa,+BACjC,OAAO,EAAQ,CAAI,EAAE,GACtB,SAAY,CACX,EAAK,QAAQ,MAAM,kEAAkE,EACrF,MAAQ,eAAgB,KAAa,+BACrC,OAAO,EAAY,CAAI,EAAE,GAC1B,SAAY,CACX,EAAK,QAAQ,MAAM,oEAAoE,EACvF,MAAQ,iBAAkB,KAAa,+BACvC,OAAO,EAAc,CAAI,EAAE,GAC5B,SAAY,CAEX,OADA,EAAK,QAAQ,MAAM,qEAAqE,GAChF,MAAM,EAAe,CAAI,GAAG,GACrC,SAAY,CACX,MAAM,IAAI,EAAyB,gDAAiD,CAChF,YAAa,GACb,OAAQ,EAAK,MACjB,CAAC,EACJ,EAAG,EAA6B,CAA0B,EAC9C,EAA6B,CAAC,IAAgB,GAAa,aAAe,OAC1E,EAA8B,CAAC,IAAgB,GAAa,aAAe,QAAa,EAAY,WAAW,QAAQ,EAAI,KAAK,IAAI,EAAI",
|
|
9
|
-
"debugId": "0741CE1BFB21943B64756E2164756E21",
|
|
10
|
-
"names": []
|
|
11
|
-
}
|
package/dist/chunk-cvpb67bs.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ub as A}from"./chunk-get5gzkc.js";import{wb as _}from"./chunk-3zx3yk1m.js";import{Bb as p}from"./chunk-8a487snn.js";var S=p(A(),1);var C="AWS_ACCESS_KEY_ID",N="AWS_SECRET_ACCESS_KEY",a="AWS_SESSION_TOKEN",i="AWS_CREDENTIAL_EXPIRATION",I="AWS_CREDENTIAL_SCOPE",d="AWS_ACCOUNT_ID",T=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const o=process.env[C],r=process.env[N],n=process.env[a],s=process.env[i],t=process.env[I],E=process.env[d];if(o&&r){const c={accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...E&&{accountId:E}};return S.setCredentialFeature(c,"CREDENTIALS_ENV_VARS","g"),c}throw new _("Unable to find environment variable credentials.",{logger:e?.logger})};export{T as fromEnv,a as ENV_SESSION,N as ENV_SECRET,C as ENV_KEY,i as ENV_EXPIRATION,I as ENV_CREDENTIAL_SCOPE,d as ENV_ACCOUNT_ID};export{C as rb,N as sb,T as tb};
|
|
3
|
-
|
|
4
|
-
//# debugId=8D05B713FEAC910D64756E2164756E21
|
|
5
|
-
//# sourceMappingURL=chunk-cvpb67bs.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError } from \"@smithy/property-provider\";\nexport const ENV_KEY = \"AWS_ACCESS_KEY_ID\";\nexport const ENV_SECRET = \"AWS_SECRET_ACCESS_KEY\";\nexport const ENV_SESSION = \"AWS_SESSION_TOKEN\";\nexport const ENV_EXPIRATION = \"AWS_CREDENTIAL_EXPIRATION\";\nexport const ENV_CREDENTIAL_SCOPE = \"AWS_CREDENTIAL_SCOPE\";\nexport const ENV_ACCOUNT_ID = \"AWS_ACCOUNT_ID\";\nexport const fromEnv = (init) => async () => {\n init?.logger?.debug(\"@aws-sdk/credential-provider-env - fromEnv\");\n const accessKeyId = process.env[ENV_KEY];\n const secretAccessKey = process.env[ENV_SECRET];\n const sessionToken = process.env[ENV_SESSION];\n const expiry = process.env[ENV_EXPIRATION];\n const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];\n const accountId = process.env[ENV_ACCOUNT_ID];\n if (accessKeyId && secretAccessKey) {\n const credentials = {\n accessKeyId,\n secretAccessKey,\n ...(sessionToken && { sessionToken }),\n ...(expiry && { expiration: new Date(expiry) }),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_ENV_VARS\", \"g\");\n return credentials;\n }\n throw new CredentialsProviderError(\"Unable to find environment variable credentials.\", { logger: init?.logger });\n};\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";uIAAA,SAEO,FAAM,EAAU,oBACV,EAAa,wBACb,EAAc,oBACd,EAAiB,4BACjB,EAAuB,uBACvB,EAAiB,iBACjB,EAAU,CAAC,IAAS,SAAY,CACzC,GAAM,QAAQ,MAAM,4CAA4C,EAChE,MAAM,EAAc,QAAQ,IAAI,GAC1B,EAAkB,QAAQ,IAAI,GAC9B,EAAe,QAAQ,IAAI,GAC3B,EAAS,QAAQ,IAAI,GACrB,EAAkB,QAAQ,IAAI,GAC9B,EAAY,QAAQ,IAAI,GAC9B,GAAI,GAAe,EAAiB,CAChC,MAAM,EAAc,CAChB,cACA,qBACI,GAAgB,CAAE,cAAa,KAC/B,GAAU,CAAE,WAAY,IAAI,KAAK,CAAM,CAAE,KACzC,GAAmB,CAAE,iBAAgB,KACrC,GAAa,CAAE,WAAU,CACjC,EAEA,OADA,uBAAqB,EAAa,uBAAwB,GAAG,EACtD,EAEX,MAAM,IAAI,EAAyB,mDAAoD,CAAE,OAAQ,GAAM,MAAO,CAAC",
|
|
8
|
-
"debugId": "8D05B713FEAC910D64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-eqwfdbyk.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{jb as L,pb as M}from"./chunk-x5c5ngpb.js";import"./chunk-w81rbh65.js";import{ub as j}from"./chunk-get5gzkc.js";import{wb as O,yb as D}from"./chunk-3zx3yk1m.js";import{Bb as k}from"./chunk-8a487snn.js";var R=k(j(),1);var G=k(j(),1);var J=(y,w,_)=>{const I={EcsContainer:async(b)=>{const{fromHttp:x}=await import("./chunk-fx1zxxxa.js"),{fromContainerMetadata:E}=await import("./chunk-9kkf5maz.js");return _?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>D(x(b??{}),E(b))().then(C)},Ec2InstanceMetadata:async(b)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:x}=await import("./chunk-9kkf5maz.js");return async()=>x(b)().then(C)},Environment:async(b)=>{_?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:x}=await import("./chunk-cvpb67bs.js");return async()=>x(b)().then(C)}};if(y in I)return I[y];else throw new O(`Unsupported credential source in profile ${w}. Got ${y}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:_})},C=(y)=>G.setCredentialFeature(y,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var T=(y,{profile:w="default",logger:_}={})=>{return Boolean(y)&&typeof y==="object"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1&&["undefined","string"].indexOf(typeof y.external_id)>-1&&["undefined","string"].indexOf(typeof y.mfa_serial)>-1&&(u(y,{profile:w,logger:_})||v(y,{profile:w,logger:_}))},u=(y,{profile:w,logger:_})=>{const I=typeof y.source_profile==="string"&&typeof y.credential_source==="undefined";if(I)_?.debug?.(` ${w} isAssumeRoleWithSourceProfile source_profile=${y.source_profile}`);return I},v=(y,{profile:w,logger:_})=>{const I=typeof y.credential_source==="string"&&typeof y.source_profile==="undefined";if(I)_?.debug?.(` ${w} isCredentialSourceProfile credential_source=${y.credential_source}`);return I},U=async(y,w,_,I={})=>{_.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const b=w[y];if(!_.roleAssumer){const{getDefaultRoleAssumer:K}=await import("./chunk-3cfvbq6w.js");_.roleAssumer=K({..._.clientConfig,credentialProviderLogger:_.logger,parentClientConfig:_?.parentClientConfig},_.clientPlugins)}const{source_profile:x}=b;if(x&&x in I)throw new O(`Detected a cycle attempting to resolve credentials for profile ${L(_)}. Profiles visited: `+Object.keys(I).join(", "),{logger:_.logger});_.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${x?`source_profile=[${x}]`:`profile=[${y}]`}`);const E=x?A(x,w,_,{...I,[x]:!0},Q(w[x]??{})):(await J(b.credential_source,y,_.logger)(_))();if(Q(b))return E.then((K)=>R.setCredentialFeature(K,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{const K={RoleArn:b.role_arn,RoleSessionName:b.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:b.external_id,DurationSeconds:parseInt(b.duration_seconds||"3600",10)},{mfa_serial:B}=b;if(B){if(!_.mfaCodeProvider)throw new O(`Profile ${y} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:_.logger,tryNextLink:!1});K.SerialNumber=B,K.TokenCode=await _.mfaCodeProvider(B)}const h=await E;return _.roleAssumer(h,K).then((m)=>R.setCredentialFeature(m,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},Q=(y)=>{return!y.role_arn&&!!y.credential_source};var V=k(j(),1),W=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.credential_process==="string",X=async(y,w)=>import("./chunk-m43npkjw.js").then(({fromProcess:_})=>_({...y,profile:w})().then((I)=>V.setCredentialFeature(I,"CREDENTIALS_PROFILE_PROCESS","v")));var $=k(j(),1),Y=async(y,w,_={})=>{const{fromSSO:I}=await import("./chunk-qj2v5psd.js");return I({profile:y,logger:_.logger})().then((b)=>{if(w.sso_session)return $.setCredentialFeature(b,"CREDENTIALS_PROFILE_SSO","r");else return $.setCredentialFeature(b,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},Z=(y)=>y&&(typeof y.sso_start_url==="string"||typeof y.sso_account_id==="string"||typeof y.sso_session==="string"||typeof y.sso_region==="string"||typeof y.sso_role_name==="string");var H=k(j(),1),q=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.aws_access_key_id==="string"&&typeof y.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof y.aws_session_token)>-1&&["undefined","string"].indexOf(typeof y.aws_account_id)>-1,z=async(y,w)=>{w?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");const _={accessKeyId:y.aws_access_key_id,secretAccessKey:y.aws_secret_access_key,sessionToken:y.aws_session_token,...y.aws_credential_scope&&{credentialScope:y.aws_credential_scope},...y.aws_account_id&&{accountId:y.aws_account_id}};return H.setCredentialFeature(_,"CREDENTIALS_PROFILE","n")};var c=k(j(),1),S=(y)=>Boolean(y)&&typeof y==="object"&&typeof y.web_identity_token_file==="string"&&typeof y.role_arn==="string"&&["undefined","string"].indexOf(typeof y.role_session_name)>-1,F=async(y,w)=>import("./chunk-f41k7dpa.js").then(({fromTokenFile:_})=>_({webIdentityTokenFile:y.web_identity_token_file,roleArn:y.role_arn,roleSessionName:y.role_session_name,roleAssumerWithWebIdentity:w.roleAssumerWithWebIdentity,logger:w.logger,parentClientConfig:w.parentClientConfig})().then((I)=>c.setCredentialFeature(I,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var A=async(y,w,_,I={},b=!1)=>{const x=w[y];if(Object.keys(I).length>0&&q(x))return z(x,_);if(b||T(x,{profile:y,logger:_.logger}))return U(y,w,_,I);if(q(x))return z(x,_);if(S(x))return F(x,_);if(W(x))return X(_,y);if(Z(x))return await Y(y,x,_);throw new O(`Could not resolve credentials using profile: [${y}] in configuration/credentials file(s).`,{logger:_.logger})};var by=(y={})=>async()=>{y.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const w=await M(y);return A(L(y),w,y)};export{by as fromIni};
|
|
3
|
-
|
|
4
|
-
//# debugId=369DE17AF0A5DE1F64756E2164756E21
|
|
5
|
-
//# sourceMappingURL=chunk-eqwfdbyk.js.map
|