@web-to-figma/desktop 1.0.0 → 1.0.1
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/README.md +47 -1
- package/dist/auth/captureSession.js +1 -1
- package/dist/auth/jwtSecret.d.ts +7 -0
- package/dist/auth/jwtSecret.js +1 -1
- package/dist/capture/browserPool.js +1 -1
- package/dist/capture/captureService.js +1 -1
- package/dist/capture/captureStatus.js +1 -1
- package/dist/capture/chromeDownloader.js +1 -1
- package/dist/capture/crxUtils.js +1 -1
- package/dist/capture/extensionPinPolicy.js +1 -1
- package/dist/capture/headedBrowserState.js +1 -1
- package/dist/capture/headedExtension.js +1 -1
- package/dist/capture/manualLaunch.js +1 -1
- package/dist/index.js +2 -0
- package/dist/server/middleware/desktopJwt.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5ec043,_0x2a1ee6){const _0xafa318=_0x38a3,_0x107b25=_0x5ec043();while(!![]){try{const _0x5b3e8c=-parseInt(_0xafa318(0x9b))/0x1+parseInt(_0xafa318(0xaa))/0x2*(-parseInt(_0xafa318(0xae))/0x3)+parseInt(_0xafa318(0xb1))/0x4+parseInt(_0xafa318(0x9e))/0x5+parseInt(_0xafa318(0xb5))/0x6+-parseInt(_0xafa318(0xa6))/0x7*(-parseInt(_0xafa318(0xa5))/0x8)+-parseInt(_0xafa318(0xa7))/0x9;if(_0x5b3e8c===_0x2a1ee6)break;else _0x107b25['push'](_0x107b25['shift']());}catch(_0x217178){_0x107b25['push'](_0x107b25['shift']());}}}(_0x1f27,0x83763));import _0x2524b3 from'jsonwebtoken';import{getSecretForKid}from'../../auth/jwtSecret.js';import{redactRequestHeaders}from'../../security/redact.js';function requestPath(_0x44bde5){return _0x44bde5['split']('?')[0x0]??_0x44bde5;}function _0x38a3(_0x1a2809,_0xa0a06f){_0x1a2809=_0x1a2809-0x8e;const _0x1f2706=_0x1f27();let _0x38a34e=_0x1f2706[_0x1a2809];if(_0x38a3['kLJahu']===undefined){var _0x1e729e=function(_0x21bd0f){const _0x12f230='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2524b3='',_0x44bde5='';for(let _0x387f46=0x0,_0x4cfb67,_0x382117,_0x347fa6=0x0;_0x382117=_0x21bd0f['charAt'](_0x347fa6++);~_0x382117&&(_0x4cfb67=_0x387f46%0x4?_0x4cfb67*0x40+_0x382117:_0x382117,_0x387f46++%0x4)?_0x2524b3+=String['fromCharCode'](0xff&_0x4cfb67>>(-0x2*_0x387f46&0x6)):0x0){_0x382117=_0x12f230['indexOf'](_0x382117);}for(let _0x297c4c=0x0,_0x4ce7c8=_0x2524b3['length'];_0x297c4c<_0x4ce7c8;_0x297c4c++){_0x44bde5+='%'+('00'+_0x2524b3['charCodeAt'](_0x297c4c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x44bde5);};_0x38a3['zqLehk']=_0x1e729e,_0x38a3['LbKawl']={},_0x38a3['kLJahu']=!![];}const _0x4fd121=_0x1f2706[0x0],_0x837a8a=_0x1a2809+_0x4fd121,_0x1a8780=_0x38a3['LbKawl'][_0x837a8a];return!_0x1a8780?(_0x38a34e=_0x38a3['zqLehk'](_0x38a34e),_0x38a3['LbKawl'][_0x837a8a]=_0x38a34e):_0x38a34e=_0x1a8780,_0x38a34e;}function isPublicPath(_0x387f46){const _0x155ada=_0x38a3;return _0x387f46===_0x155ada(0xb6);}export function requiresJwt(_0x4cfb67,_0x382117){const _0x58bfd1=_0x38a3;if(_0x4cfb67==='GET'&&_0x382117['startsWith'](_0x58bfd1(0x99)))return![];if(_0x4cfb67===_0x58bfd1(0x91)&&_0x382117===_0x58bfd1(0xa2))return!![];if(_0x4cfb67===_0x58bfd1(0x90)&&_0x382117===_0x58bfd1(0x95))return!![];if(_0x4cfb67==='POST'&&_0x382117===_0x58bfd1(0x92))return!![];return![];}function logAuthFailure(_0x347fa6,_0x297c4c,_0x4ce7c8,_0x4877f6){const _0x15cfd4=_0x38a3;_0x347fa6['logger'][_0x15cfd4(0x8e)]({'reason':_0x297c4c,'path':_0x4ce7c8['url']['split']('?')[0x0],'headers':redactRequestHeaders(_0x4ce7c8[_0x15cfd4(0xac)]),'err':_0x4877f6 instanceof Error?_0x4877f6[_0x15cfd4(0xa1)]:_0x4877f6},_0x15cfd4(0xb2));if(_0x347fa6[_0x15cfd4(0xaf)]){const _0x529312=_0x4877f6 instanceof Error?_0x4877f6[_0x15cfd4(0xa1)]:String(_0x4877f6??'');console[_0x15cfd4(0x8e)](_0x15cfd4(0xb7)+_0x297c4c+'\x20'+_0x4ce7c8['url']+(_0x529312?':\x20'+_0x529312:''));}}function logAuthSuccess(_0x2c3fd3,_0xa630a1){const _0x4060da=_0x38a3;_0x2c3fd3[_0x4060da(0xaf)]&&console['log'](_0x4060da(0x97)+_0xa630a1[_0x4060da(0xa0)]+'\x20'+_0xa630a1[_0x4060da(0x98)]);}export function registerDesktopAuth(_0x12e917,_0x58a2a0){const _0x4a9273=_0x38a3;_0x12e917[_0x4a9273(0x93)](_0x4a9273(0x8f),async(_0x16dd95,_0x35a163)=>{const _0x1e9411=_0x4a9273;if(_0x16dd95['method']==='OPTIONS')return;const _0x8dbc23=requestPath(_0x16dd95['url']);if(isPublicPath(_0x8dbc23)||!requiresJwt(_0x16dd95[_0x1e9411(0xa0)],_0x8dbc23))return;const _0x22bbac=_0x16dd95[_0x1e9411(0xac)][_0x1e9411(0xa3)];if(!_0x22bbac||typeof _0x22bbac!=='string')return logAuthFailure(_0x58a2a0,_0x1e9411(0xad),_0x16dd95),_0x35a163[_0x1e9411(0x9c)](0x191)[_0x1e9411(0xb8)]({'message':_0x1e9411(0xb3)});try{const _0x4b24e2=_0x2524b3[_0x1e9411(0xab)](_0x22bbac,{'complete':!![]}),_0x1751dc=_0x4b24e2&&typeof _0x4b24e2===_0x1e9411(0x94)&&_0x4b24e2[_0x1e9411(0xa4)]?_0x4b24e2[_0x1e9411(0xa4)][_0x1e9411(0xa8)]:undefined,_0x204127=_0x2524b3[_0x1e9411(0xb0)](_0x22bbac,getSecretForKid(_0x1751dc),{'algorithms':[_0x1e9411(0x9d)],'issuer':_0x1e9411(0xb4),'audience':_0x1e9411(0x96)});_0x16dd95[_0x1e9411(0xa9)]=_0x204127[_0x1e9411(0x9a)],logAuthSuccess(_0x58a2a0,_0x16dd95);}catch(_0x1677a2){return logAuthFailure(_0x58a2a0,_0x1e9411(0x9f),_0x16dd95,_0x1677a2),_0x35a163[_0x1e9411(0x9c)](0x191)[_0x1e9411(0xb8)]({'message':_0x1e9411(0xb3)});}});}function _0x1f27(){const _0x2c8e5a=['D2vIlxrVlwzPz21HlwrLC2T0B3a','w2f1DgHDig9Ria','DxjS','l2zPBgvZlW','C3vI','mtCWnZCXvhLYwgfN','y29Kzq','sfmYnty','ndqYnJeXnuTjrLzTyq','Aw52ywXPzf9QD3q','Bwv0Ag9K','BwvZC2fNzq','l2fWAs9HCNrPzMfJDc9Jyxb0DxjL','Ec13DgyTzgvZA3rVCc1QD3q','AgvHzgvY','og5vEwvuzG','ndyWmJiYn05wC3vgsW','mtmZmZuZotb5u0nIAgm','A2LK','zgvZA3rVCeP3Dfn1yG','mZK2nJG2sxjXqKDb','zgvJB2rL','AgvHzgvYCW','BwLZC2LUz19QD3q','m3nzBKHiyW','DMvYyM9Zzq','DMvYAwz5','ntq2mJq4B0fgv1fQ','yxv0Af9MywLSzwq','vw5HDxrOB3jPEMvK','D2vIlxrVlwzPz21HlxbSDwDPBG','ndi2mdi3me9oC3D6BW','l2HLywX0Aa','w2f1DgHDia','C2vUza','zxjYB3i','B25szxf1zxn0','r0vu','ue9tva','l2fWAs9HCNrPzMfJDc9Jyw5JzwWTy2fWDhvYzq','ywrKsg9VAW','B2jQzwn0','l2fWAs9HCNrPzMfJDc9Jyxb0DxjLlxn0yxr1CW'];_0x1f27=function(){return _0x2c8e5a;};return _0x1f27();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@web-to-figma/desktop",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Web to Figma Desktop - Convert any website or HTML code to design",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dev": "npm run build && node bin/web-to-figma.js start --verbose",
|
|
33
33
|
"doctor": "npm run build && node bin/web-to-figma.js doctor",
|
|
34
34
|
"test": "npm run build && npm run test:run",
|
|
35
|
-
"test:run": "node --test dist/test/versionCheck.test.js dist/test/captureStatus.test.js dist/test/desktopJwt.test.js dist/test/uploadBody.test.js dist/test/checkServer.test.js dist/test/headedBrowserState.test.js dist/test/crxUtils.test.js",
|
|
35
|
+
"test:run": "node --test dist/test/versionCheck.test.js dist/test/captureStatus.test.js dist/test/desktopJwt.test.js dist/test/jwtSecret.test.js dist/test/uploadBody.test.js dist/test/checkServer.test.js dist/test/headedBrowserState.test.js dist/test/crxUtils.test.js",
|
|
36
36
|
"smoke": "npm run build && npm run smoke:run",
|
|
37
37
|
"smoke:run": "node scripts/smoke-test.js",
|
|
38
38
|
"prepack": "node scripts/prepack.js",
|