flowscale 1.0.8 → 1.0.10
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/build/index.js +1 -1
- package/build/types.js +1 -1
- package/package.json +1 -2
package/build/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a0_0x5a40(_0xe945df,_0xd68e0e){const _0xe834c4=a0_0xe834();return a0_0x5a40=function(_0x5a40dd,_0x460441){_0x5a40dd=_0x5a40dd-0x8d;let _0x3349be=_0xe834c4[_0x5a40dd];return _0x3349be;},a0_0x5a40(_0xe945df,_0xd68e0e);}const a0_0x5ed9ff=a0_0x5a40;(function(_0x41dd83,_0x44d2e2){const _0x203116=a0_0x5a40,_0x521bf8=_0x41dd83();while(!![]){try{const _0x24a456=parseInt(_0x203116(0xcd))/0x1*(parseInt(_0x203116(0xc3))/0x2)+parseInt(_0x203116(0x92))/0x3*(parseInt(_0x203116(0xc6))/0x4)+-parseInt(_0x203116(0x96))/0x5+parseInt(_0x203116(0xa7))/0x6+parseInt(_0x203116(0xb6))/0x7*(parseInt(_0x203116(0xa5))/0x8)+-parseInt(_0x203116(0xb0))/0x9+parseInt(_0x203116(0xb1))/0xa*(-parseInt(_0x203116(0xcf))/0xb);if(_0x24a456===_0x44d2e2)break;else _0x521bf8['push'](_0x521bf8['shift']());}catch(_0x5a2034){_0x521bf8['push'](_0x521bf8['shift']());}}}(a0_0xe834,0xdbcae));var __importDefault=this&&this['__importDefault']||function(_0x329175){return _0x329175&&_0x329175['__esModule']?_0x329175:{'default':_0x329175};};Object[a0_0x5ed9ff(0x97)](exports,'__esModule',{'value':!![]}),exports['FlowscaleAPI']=void 0x0;const axios_1=__importDefault(require(a0_0x5ed9ff(0xb7))),form_data_1=__importDefault(require(a0_0x5ed9ff(0xaf))),fs_1=__importDefault(require('fs')),path_1=__importDefault(require('path'));function a0_0xe834(){const _0x29c3ea=['jVnBK','basename','handleError','getHeaders','getRuns','LOdVU','default','16293EKlBoF','status','stringify','.dat','196830QdYunZ','defineProperty','pJVjV','apiKey','dJLQq','isAxiosError','/api/v1/runs','No\x20response\x20received\x20from\x20API\x20server','/cancel','headers','ZjcsO','&group_id=','Run\x20Timeout','ReadStream','get','9904noIEDH','error','2784996cHoHEo','hasOwnProperty','cMqok','append','createReadStream','AOfDO','post','RqHEZ','form-data','5296401BYTkmh','10184730MNpiCC','appendFormData','create','response','baseUrl','6447mpnvdi','axios','isBuffer','isArray','message','\x20-\x20','Error:\x20','X-API-KEY','/api/v1/runs/','getOutput','executeWorkflow','/api/v1/runs/output','PYGkf','3738sQheyw','use','getQueue','252HmTOBc','request','checkHealth','/api/v1/comfy/queue','client','/api/v1/comfy/health','FlowscaleAPI','866xxBAxk','assign','22Ttrpsz','cancelRun','data'];a0_0xe834=function(){return _0x29c3ea;};return a0_0xe834();}class FlowscaleAPI{constructor(_0x11d681,_0x33822d){const _0x9d379e=a0_0x5ed9ff,_0x16b3f9={'RqHEZ':_0x9d379e(0xbd)};this['apiKey']=_0x11d681,this[_0x9d379e(0xb5)]=_0x33822d,this[_0x9d379e(0xca)]=axios_1[_0x9d379e(0x91)][_0x9d379e(0xb3)]({'baseURL':this[_0x9d379e(0xb5)]}),this[_0x9d379e(0xca)]['interceptors'][_0x9d379e(0xc7)][_0x9d379e(0xc4)](_0x453ba8=>{const _0x4899de=_0x9d379e;return!_0x453ba8[_0x4899de(0x9f)]&&(_0x453ba8[_0x4899de(0x9f)]={}),_0x453ba8['headers'][_0x16b3f9[_0x4899de(0xae)]]=this[_0x4899de(0x99)],_0x453ba8;});}async[a0_0x5ed9ff(0xc8)](){const _0x1b7103=a0_0x5ed9ff,_0x49df63={'dJLQq':_0x1b7103(0xcb)};try{const _0x3a5c79=await this[_0x1b7103(0xca)][_0x1b7103(0xa4)](_0x49df63[_0x1b7103(0x9a)]);return _0x3a5c79[_0x1b7103(0xd1)];}catch(_0x4a9ca6){this['handleError'](_0x4a9ca6);}}async[a0_0x5ed9ff(0xc5)](){const _0x40bc0e=a0_0x5ed9ff;try{const _0x5b4779=await this[_0x40bc0e(0xca)][_0x40bc0e(0xa4)](_0x40bc0e(0xc9));return _0x5b4779['data'];}catch(_0xe24c63){this[_0x40bc0e(0x8d)](_0xe24c63);}}async[a0_0x5ed9ff(0xc0)](_0x3a9eeb,_0x5a922a,_0x3062eb){const _0x547371=a0_0x5ed9ff,_0x56623b={'cMqok':function(_0x46e8c9,_0x33e5ce){return _0x46e8c9(_0x33e5ce);},'PYGkf':function(_0xe1bb80,_0x2e7296){return _0xe1bb80(_0x2e7296);}};try{const _0xcb00a2=new form_data_1[(_0x547371(0x91))]();for(const _0x5d84e9 in _0x5a922a){if(_0x5a922a[_0x547371(0xa8)](_0x5d84e9)){const _0x88984c=_0x5a922a[_0x5d84e9];Array[_0x547371(0xb9)](_0x88984c)?_0x88984c['forEach'](_0x234eb0=>{this['appendFormData'](_0xcb00a2,_0x5d84e9,_0x234eb0);}):this[_0x547371(0xb2)](_0xcb00a2,_0x5d84e9,_0x88984c);}}const _0x43e13c=Object['assign'](Object[_0x547371(0xce)]({},_0xcb00a2[_0x547371(0x8e)]()),{'X-API-KEY':this[_0x547371(0x99)]}),_0x32f8ba='/api/v1/runs?workflow_id='+_0x56623b[_0x547371(0xa9)](encodeURIComponent,_0x3a9eeb)+(_0x3062eb?_0x547371(0xa1)+_0x56623b[_0x547371(0xc2)](encodeURIComponent,_0x3062eb):''),_0x33e601=await this[_0x547371(0xca)][_0x547371(0xad)](_0x32f8ba,_0xcb00a2,{'headers':_0x43e13c});return _0x33e601[_0x547371(0xd1)];}catch(_0x522fd3){this['handleError'](_0x522fd3);}}async[a0_0x5ed9ff(0xbf)](_0x2355b5){const _0x5833da=a0_0x5ed9ff,_0x1c94f4={'pJVjV':function(_0x3b9ed6,_0x42d9a4){return _0x3b9ed6===_0x42d9a4;},'JXHXf':_0x5833da(0xa2)};try{const _0x1fb445=await this[_0x5833da(0xca)][_0x5833da(0xa4)](_0x5833da(0xc1),{'params':{'filename':_0x2355b5}});if(_0x1fb445['status']===0xcc)return null;return _0x1fb445[_0x5833da(0xd1)];}catch(_0x3acd2e){const _0x35e577=_0x3acd2e;if(_0x35e577[_0x5833da(0xb4)]&&_0x1c94f4['pJVjV'](_0x35e577[_0x5833da(0xb4)][_0x5833da(0x93)],0xcc))return null;else{if(_0x35e577[_0x5833da(0xb4)]&&_0x1c94f4[_0x5833da(0x98)](_0x35e577[_0x5833da(0xb4)][_0x5833da(0x93)],0x198))throw new Error(_0x1c94f4['JXHXf']);else this[_0x5833da(0x8d)](_0x3acd2e);}}}async[a0_0x5ed9ff(0xd0)](_0x232193){const _0x508f76=a0_0x5ed9ff,_0x2cf794={'OdMms':function(_0x5712f9,_0x403582){return _0x5712f9(_0x403582);}};try{const _0x3a3e68=await this[_0x508f76(0xca)]['post'](_0x508f76(0xbe)+_0x2cf794['OdMms'](encodeURIComponent,_0x232193)+_0x508f76(0x9e));return _0x3a3e68[_0x508f76(0xd1)];}catch(_0x13f420){this['handleError'](_0x13f420);}}async['getRun'](_0x464afd){const _0x42f799=a0_0x5ed9ff,_0x3a06f8={'ZjcsO':function(_0x126d51,_0x4aac7e){return _0x126d51(_0x4aac7e);}};try{const _0x268884=await this[_0x42f799(0xca)][_0x42f799(0xa4)](_0x42f799(0xbe)+_0x3a06f8[_0x42f799(0xa0)](encodeURIComponent,_0x464afd));return _0x268884[_0x42f799(0xd1)];}catch(_0x29f7b3){this['handleError'](_0x29f7b3);}}async[a0_0x5ed9ff(0x8f)](_0x50b836){const _0x57b4c8=a0_0x5ed9ff;try{const _0x4abe6c=_0x50b836?{'group_id':_0x50b836}:{},_0x14e784=await this[_0x57b4c8(0xca)]['get'](_0x57b4c8(0x9c),{'params':_0x4abe6c});return _0x14e784[_0x57b4c8(0xd1)];}catch(_0x8fb1db){this[_0x57b4c8(0x8d)](_0x8fb1db);}}['appendFormData'](_0x1fe3f7,_0x28a0fe,_0x4a9f9b){const _0x3eb78e=a0_0x5ed9ff,_0x34fd50={'AOfDO':function(_0x408972,_0x4cf185){return _0x408972 instanceof _0x4cf185;},'LOdVU':function(_0x185cc3,_0x443302){return _0x185cc3===_0x443302;}};if(_0x34fd50[_0x3eb78e(0xac)](_0x4a9f9b,fs_1[_0x3eb78e(0x91)][_0x3eb78e(0xa3)]))_0x1fe3f7[_0x3eb78e(0xaa)](_0x28a0fe,_0x4a9f9b);else{if(Buffer[_0x3eb78e(0xb8)](_0x4a9f9b))_0x1fe3f7[_0x3eb78e(0xaa)](_0x28a0fe,_0x4a9f9b,{'filename':_0x28a0fe+_0x3eb78e(0x95)});else{if(_0x34fd50[_0x3eb78e(0x90)](typeof _0x4a9f9b,'string')&&fs_1[_0x3eb78e(0x91)]['existsSync'](_0x4a9f9b)){const _0x12f911=path_1[_0x3eb78e(0x91)][_0x3eb78e(0xd3)](_0x4a9f9b);_0x1fe3f7[_0x3eb78e(0xaa)](_0x28a0fe,fs_1[_0x3eb78e(0x91)][_0x3eb78e(0xab)](_0x4a9f9b),_0x12f911);}else _0x1fe3f7[_0x3eb78e(0xaa)](_0x28a0fe,_0x4a9f9b);}}}[a0_0x5ed9ff(0x8d)](_0x56b03e){const _0x22aa77=a0_0x5ed9ff,_0x4bd758={'jVnBK':_0x22aa77(0x9d)};if(axios_1[_0x22aa77(0x91)][_0x22aa77(0x9b)](_0x56b03e)){if(_0x56b03e['response'])throw new Error(_0x22aa77(0xbc)+_0x56b03e[_0x22aa77(0xb4)][_0x22aa77(0x93)]+'\x20'+_0x56b03e['response']['statusText']+_0x22aa77(0xbb)+JSON[_0x22aa77(0x94)](_0x56b03e[_0x22aa77(0xb4)][_0x22aa77(0xd1)]));else{if(_0x56b03e['request'])throw new Error(_0x4bd758[_0x22aa77(0xd2)]);}}console[_0x22aa77(0xa6)](_0x56b03e);throw new Error('Error:\x20'+_0x56b03e[_0x22aa77(0xba)]);}}exports[a0_0x5ed9ff(0xcc)]=FlowscaleAPI;
|
package/build/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a1_0x1b1a(_0x36037a,_0x40f7bc){var _0x314667=a1_0x3146();return a1_0x1b1a=function(_0x1b1a97,_0x171d59){_0x1b1a97=_0x1b1a97-0x91;var _0x2f973d=_0x314667[_0x1b1a97];return _0x2f973d;},a1_0x1b1a(_0x36037a,_0x40f7bc);}var a1_0x17e3e5=a1_0x1b1a;(function(_0x8d28f,_0x4ac3ab){var _0xc3d43d=a1_0x1b1a,_0x4012aa=_0x8d28f();while(!![]){try{var _0x498b9c=parseInt(_0xc3d43d(0x9d))/0x1*(parseInt(_0xc3d43d(0x94))/0x2)+-parseInt(_0xc3d43d(0x9c))/0x3*(parseInt(_0xc3d43d(0x9a))/0x4)+-parseInt(_0xc3d43d(0x9b))/0x5*(-parseInt(_0xc3d43d(0x99))/0x6)+parseInt(_0xc3d43d(0x91))/0x7+parseInt(_0xc3d43d(0x92))/0x8*(-parseInt(_0xc3d43d(0x98))/0x9)+parseInt(_0xc3d43d(0x96))/0xa*(-parseInt(_0xc3d43d(0x95))/0xb)+parseInt(_0xc3d43d(0x97))/0xc;if(_0x498b9c===_0x4ac3ab)break;else _0x4012aa['push'](_0x4012aa['shift']());}catch(_0x46efc7){_0x4012aa['push'](_0x4012aa['shift']());}}}(a1_0x3146,0x91b07));function a1_0x3146(){var _0x5f15a4=['16381824RxlyWM','549VgKbrd','1027902MYLjFE','124xhXdRO','15lFlVdX','102099RrYhiy','1aqhobI','1252083mkaTKP','50376vALnMF','__esModule','1101034sKiyxY','153626DLyiau','410ebYvBj'];a1_0x3146=function(){return _0x5f15a4;};return a1_0x3146();}Object['defineProperty'](exports,a1_0x17e3e5(0x93),{'value':!![]});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowscale",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "An NPM library for communicating with the Flowscale APIs",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"files": ["build/**/*"],
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"axios": "^1.7.7",
|
|
23
|
-
"flowscale-test": "^1.0.1",
|
|
24
23
|
"form-data": "^4.0.1"
|
|
25
24
|
},
|
|
26
25
|
"devDependencies": {
|