UNPKG

1.15 kBSource Map (JSON)View Raw
1{"version":3,"sources":["../src/error.js"],"names":[],"mappings":";;;;;;;;;;;;AAEO,IAAM,8BAAW;AACtB,UAAQ,6BADc;AAEtB,kBAAgB,8CAFM;AAGtB,oBAAkB,mDAHI;AAItB,sBAAoB;AAJE,CAAjB;;;AAQA,IAAM,kCAAa,EAAnB;;;;;;AACP,uBAAmB,OAAO,IAAP,CAAY,QAAZ,CAAnB,8HAA0C;AAAA,QAA/B,IAA+B;;AACxC,eAAW,IAAX,IAAmB,IAAnB;AACD;;;;;;;;;;;;;;;;IAEY,W,WAAA,W;;;AAIX,uBAAY,IAAZ,EAA0B;AAAA;;AAAA,+FAClB,SAAS,IAAT,CADkB;;AAExB,UAAK,IAAL,GAAY,IAAZ;AACA,UAAK,MAAL,GAAc,IAAd;AAHwB;AAIzB;;;EAR8B,K","file":"error.js","sourcesContent":["/* @flow */\n\nexport const MESSAGES = {\n ENOENT: 'File or directory not found',\n NOT_MOTION_APP: 'Unable to run, directory is not a motion app',\n INVALID_MANIFEST: \"There are syntax errors in your '.motion.js' file\",\n ALREADY_MOTION_APP: 'Directory is already a motion app'\n}\n\n// Note: This is generating automatically from MESSAGES\nexport const ERROR_CODE = {}\nfor (const name of Object.keys(MESSAGES)) {\n ERROR_CODE[name] = name\n}\n\nexport class MotionError extends Error {\n code: string;\n motion: boolean;\n\n constructor(code: string) {\n super(MESSAGES[code])\n this.code = code\n this.motion = true\n }\n}\n"]}
\No newline at end of file