{"version":3,"sources":["jsdelivr-header.js","/npm/run-sketch-plugin@1.0.3/lib/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,IAAI,SAAW,QAAQ,iBACnB,KAAO,SAAS,KAEhB,SAAW,QAAQ,YAEnB,YAAc,SAAqB,GACrC,IAAI,EAAY,EAAK,UACjB,EAAa,EAAK,WAGlB,EAAM,0BAA4B,OAAO,GAAa,KAC1D,MAAO,qFAAiE,OAAO,GAAc,MAAQ,EAAM,GAC7G,EAEI,iBAAmB,SAA0B,GAC/C,OAAO,IAAI,SAAQ,SAAU,EAAS,GACpC,KAAK,IAAM,OAAO,UAAY,UAAY,OAAO,YAAY,IAAY,KAAM,SAAU,EAAK,EAAQ,GAChG,GACF,EAAO,GAGT,EAAQ,CAAE,OAAQ,EAAQ,OAAQ,GACpC,GACF,GACF,EAEA,OAAO,QAAU","file":"/npm/run-sketch-plugin@1.0.3/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/run-sketch-plugin@1.0.3/lib/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","var _require = require('child_process'),\n    exec = _require.exec;\n\nvar coscript = require('coscript');\n\nvar makeCommand = function makeCommand(_ref) {\n  var bundleURL = _ref.bundleURL,\n      identifier = _ref.identifier;\n\n  var delegate = 'COScript.app(\"Sketch\").delegate()';\n  var url = 'NSURL.fileURLWithPath(\"' + String(bundleURL) + '\")';\n  return delegate + '.runPluginCommandWithIdentifier_fromBundleAtURL(\"' + String(identifier) + '\", ' + url + ')';\n};\n\nvar runPluginCommand = function runPluginCommand(options) {\n  return new Promise(function (resolve, reject) {\n    exec('\"' + String(coscript) + '\" -e \\'' + String(makeCommand(options)) + '\\'', function (err, stdout, stderr) {\n      if (err) {\n        reject(err);\n      }\n\n      resolve({ stdout: stdout, stderr: stderr });\n    });\n  });\n};\n\nmodule.exports = runPluginCommand;"]}