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":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@architect/deploy@7.0.3/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","let _inventory = require('@architect/inventory')\nlet awsLite = require('@aws-lite/client')\nlet { updater } = require('@architect/utils')\nlet cleanup = require('./src/utils/cleanup')\n\nlet direct = require('./src/direct')\nlet sam = require('./src/sam')\nlet _static = require('./src/static')\n\nfunction run (mod) {\n  return function (options, callback) {\n    let promise\n    if (!callback) {\n      promise = new Promise(function ugh (res, rej) {\n        callback = function errback (err, result) {\n          if (err) rej(err)\n          else res(result)\n        }\n      })\n    }\n\n    // Always attempt to clean up after ourselves before exiting\n    function clean (err, result) {\n      cleanup()\n      if (err) callback(err)\n      else callback(null, result)\n    }\n\n    // Entered via CLI (or something that supplied inventory)\n    if (options.inventory) {\n      go(options)\n\n    }\n    else {\n      _inventory({ env: true }, function (err, inventory) {\n        if (err) callback(err)\n        else {\n          options.inventory = inventory\n          go(options)\n        }\n      })\n    }\n\n    function go (options) {\n      let region = options.region || options.inventory.inv.aws.region\n      let plugins = [\n        import('@aws-lite/apigatewayv2'),\n        import('@aws-lite/cloudformation'),\n        import('@aws-lite/cloudfront'),\n        import('@aws-lite/lambda'),\n        import('@aws-lite/s3'),\n        import('@aws-lite/ssm'),\n      ]\n      let params = { region, plugins }\n      if (options.credentials) params = { ...options.credentials, ...params }\n      if (options.inventory.inv?.aws?.profile) params.profile = options.inventory.inv.aws.profile\n      awsLite(params)\n        .then(aws => {\n          let updateOptions = options.quiet ? { quiet: options.quiet } : {}\n          mod({ ...options, aws, region, update: updater('Deploy', updateOptions) }, clean)\n        })\n        .catch(callback)\n    }\n\n    return promise\n  }\n}\n\nmodule.exports = {\n  direct: run(direct),\n  sam:    run(sam),\n  static: run(_static),\n}\n"]}