easyproctor 0.0.65 → 0.0.66

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/esm/index.js CHANGED
@@ -49518,7 +49518,7 @@ async function uploadBackup(data, config2, proctoringToken) {
49518
49518
  const s3Client = new S3Client({
49519
49519
  region: "us-east-1",
49520
49520
  credentials: {
49521
- accessKeyId: config2.accessKeyId,
49521
+ accessKeyId: "here",
49522
49522
  secretAccessKey: config2.secretAccessKey
49523
49523
  }
49524
49524
  });
@@ -49538,11 +49538,13 @@ async function uploadBackup(data, config2, proctoringToken) {
49538
49538
  loadingBoolean = false;
49539
49539
  clearInterval(loadingInterval);
49540
49540
  onProgress && onProgress(Math.round(100));
49541
- await makeRequest({
49541
+ makeRequest({
49542
49542
  url: `/Proctoring/aws-to-azure`,
49543
49543
  method: "POST",
49544
49544
  jwt: proctoringToken,
49545
- body: `${file.name}`
49545
+ body: {
49546
+ "objectName": `${file.name}`
49547
+ }
49546
49548
  });
49547
49549
  }).catch((err) => {
49548
49550
  throw err;
package/index.js CHANGED
@@ -74279,7 +74279,7 @@ async function uploadBackup(data, config2, proctoringToken) {
74279
74279
  const s3Client = new import_client_s32.S3Client({
74280
74280
  region: "us-east-1",
74281
74281
  credentials: {
74282
- accessKeyId: config2.accessKeyId,
74282
+ accessKeyId: "here",
74283
74283
  secretAccessKey: config2.secretAccessKey
74284
74284
  }
74285
74285
  });
@@ -74299,11 +74299,13 @@ async function uploadBackup(data, config2, proctoringToken) {
74299
74299
  loadingBoolean = false;
74300
74300
  clearInterval(loadingInterval);
74301
74301
  onProgress && onProgress(Math.round(100));
74302
- await makeRequest({
74302
+ makeRequest({
74303
74303
  url: `/Proctoring/aws-to-azure`,
74304
74304
  method: "POST",
74305
74305
  jwt: proctoringToken,
74306
- body: `${file.name}`
74306
+ body: {
74307
+ "objectName": `${file.name}`
74308
+ }
74307
74309
  });
74308
74310
  }).catch((err) => {
74309
74311
  throw err;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easyproctor",
3
- "version": "0.0.65",
3
+ "version": "0.0.66",
4
4
  "description": "Modulo web de gravação do EasyProctor",
5
5
  "main": "./index.js",
6
6
  "module": "./esm/index.js",
@@ -63,7 +63,7 @@ Erro on Azure upload
63
63
  `,dn+=` File size: ${t.size}
64
64
  `,dn+=` File type: ${t.type}
65
65
  `,cr.registerError(a,dn),WX(a),l}),dn+=`Blob: Step 5
66
- `}catch(t){await tne(n,o,e).catch(async()=>{throw WX(a),t})}}async function tne(n,a,o){try{let{file:e,onProgress:t}=n,r={Bucket:"iarisprod",Key:e.name,Body:e};console.log("file"),console.log(e);let i=new VX({region:"us-east-1",credentials:{accessKeyId:a.accessKeyId,secretAccessKey:a.secretAccessKey}});try{let c=0;t&&t(Math.round(0)),v2=setInterval(()=>{_2&&(t&&t(Math.round(c)),c++,c==99&&(c=0))},3e3);let s=await i.send(new Pk(r)).then(async()=>{_2=!1,clearInterval(v2),t&&t(Math.round(100)),await Ca({url:"/Proctoring/aws-to-azure",method:"POST",jwt:o,body:`${e.name}`})}).catch(l=>{throw l})}catch(c){throw c}}catch(e){dn+=`
66
+ `}catch(t){await tne(n,o,e).catch(async()=>{throw WX(a),t})}}async function tne(n,a,o){try{let{file:e,onProgress:t}=n,r={Bucket:"iarisprod",Key:e.name,Body:e};console.log("file"),console.log(e);let i=new VX({region:"us-east-1",credentials:{accessKeyId:"here",secretAccessKey:a.secretAccessKey}});try{let c=0;t&&t(Math.round(0)),v2=setInterval(()=>{_2&&(t&&t(Math.round(c)),c++,c==99&&(c=0))},3e3);let s=await i.send(new Pk(r)).then(async()=>{_2=!1,clearInterval(v2),t&&t(Math.round(100)),Ca({url:"/Proctoring/aws-to-azure",method:"POST",jwt:o,body:{objectName:`${e.name}`}})}).catch(l=>{throw l})}catch(c){throw c}}catch(e){dn+=`
67
67
  \u2022 Error on AWS upload
68
68
  `,dn+=e;try{rne(n)}catch(t){throw t}throw e}}function rne(n){try{let{file:a,onProgress:o}=n,e=URL.createObjectURL(a),t=document.createElement("a");document.body.appendChild(t),t.style.display="none",t.href=e,t.download=a.name,t.click(),window.URL.revokeObjectURL(e),_2=!1,clearInterval(v2),o&&o(Math.round(100))}catch(a){throw dn+=`
69
69
  \u2022 Error on machine download -> ${n.file.name}