fmode-ng 0.0.59 → 0.0.60

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.
@@ -5,6 +5,6 @@
5
5
  * 保留所有权利 All Rights Reserved.
6
6
  * /home/ryan/workspace/nova/nova-admin/dist/fmode-ng/esm2022/lib/nova-cloud/ncloud-api-func.mjs
7
7
  */
8
- export async function ncloudApi(t,e,o="POST",n){t=n+t;try{const n=await fetch(t,{method:o,headers:{"Content-Type":"application/json"},body:JSON.stringify(e),credentials:"omit"}),a=await n.json();return!a||200!==a.code&&1!==a.code?null:a.data}catch(t){throw t}}export async function novaql(t,e,o){const n=o+"/novaql/select";let a={sql:t};e&&e.length>0&&(a.params=JSON.stringify(e));try{const t=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a),credentials:"omit"}),e=await t.json();if(e&&200===e.code)return e.data}catch(t){throw t}}export async function apig(t,e,o="POST",n){localStorage.setItem("NOVA_APIG_SERVER","aHR0cHMlM0ElMkYlMkZzZXJ2ZXIuZm1vZGUuY24lMkZhcGklMkZhcGlnJTJG"),n||(n=localStorage.getItem("NOVA_APIG_SERVER"),n=decodeURIComponent(atob(n))),t=n+t;let a=Parse.User.current(),r={"Content-Type":"application/json",Authorization:`Bearer ${a?.getSessionToken()}`};try{let n=await fetch(t,{method:o,headers:r,body:e?JSON.stringify(e):null,credentials:"include"});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);let a=await n.json();return!a||200!==a.code&&1!==a.code&&0!==a.code?null:a.data}catch(t){throw console.error("请求出错",t),t}}
8
+ import Parse from"parse";export async function ncloudApi(t,e,o="POST",a){t=a+t;try{const a=await fetch(t,{method:o,headers:{"Content-Type":"application/json"},body:JSON.stringify(e),credentials:"omit"}),n=await a.json();return!n||200!==n.code&&1!==n.code?null:n.data}catch(t){throw t}}export async function novaql(t,e,o){const a=o+"/novaql/select";let n={sql:t};e&&e.length>0&&(n.params=JSON.stringify(e));try{const t=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),credentials:"omit"}),e=await t.json();if(e&&200===e.code)return e.data}catch(t){throw t}}export async function apig(t,e,o="POST",a){localStorage.setItem("NOVA_APIG_SERVER","aHR0cHMlM0ElMkYlMkZzZXJ2ZXIuZm1vZGUuY24lMkZhcGklMkZhcGlnJTJG"),a||(a=localStorage.getItem("NOVA_APIG_SERVER"),a=decodeURIComponent(atob(a))),t=a+t;let n=Parse.User.current(),r={"Content-Type":"application/json",Authorization:`Bearer ${n?.getSessionToken()}`};try{let a=await fetch(t,{method:o,headers:r,body:e?JSON.stringify(e):null,credentials:"include"});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);let n=await a.json();return!n||200!==n.code&&1!==n.code&&0!==n.code?null:n.data}catch(t){throw console.error("请求出错",t),t}}
9
9
  var MODULE_PATH_NEED = `6K+l5paH5Lu25piv5pys6aG555uu55qE5LiA6YOo5YiGIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBDb21wb25lbnRzIGluIEZtb2RlIEluYy4KICAgIOeJiOadg+aJgOaciSDCqSDmnKrmnaXpo57pqawgwqkg5rGf6KW/6ISR5o6n56eR5oqA5pyJ6ZmQ5YWs5Y+4IENvcHlyaWdodCDCqSBGbW9kZSBUZWNobm9sb2d5IENvLiwgTHRkLgogICAg5L+d55WZ5omA5pyJ5p2D5YipIEFsbCBSaWdodHMgUmVzZXJ2ZWQuCiAgICDkuKXnpoHlnKjmnKrnu4/mjojmnYPnmoTmg4XlhrXkuIvvvIzpgJrov4fku7vkvZXlqpLku4vlpI3liLbmraTmlofku7YgVW5hdXRob3JpemVkIGNvcHlpbmcgb2YgdGhpcyBmaWxlLCB2aWEgYW55IG1lZGl1bSBpcyBzdHJpY3RseSBwcm9oaWJpdGVkCiAgICDor6Xmlofku7bmmK/kuJPmnInnmoTmnLrlr4bmlofku7YgUHJvcHJpZXRhcnkgYW5kIGNvbmZpZGVudGlhbAogICAKICAgIENvcHlyaWdodCAyMDIxLW5vdyBGbW9kZSBJbmMuIHN1cHBvcnRAZm1vZGUuY24uIDE4NjA3MDA3MDczLgogICAg5L+d55WZ5omA5pyJ5p2D5YipIEFsbCByaWdodHMgcmVzZXJ2ZWQuCgogICAgUEFUSDovaG9tZS9yeWFuL3dvcmtzcGFjZS9ub3ZhL25vdmEtYWRtaW4vZGlzdC9mbW9kZS1uZy9lc20yMDIyL2xpYi9ub3ZhLWNsb3VkL25jbG91ZC1hcGktZnVuYy5tanM=`
10
10