@allanoricil/nrg-sentinel 1.0.2 → 1.0.4
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 +1 -1
- package/bin/node-red.js +2 -2
- package/flow-diff.js +2 -2
- package/package.json +1 -1
- package/plugin.html +2 -2
- package/plugin.js +2 -2
- package/preload.js +2 -2
- package/review-ui.html +2 -2
- package/safe-deployment-queue.js +2 -2
- package/service-worker.js +2 -2
- package/sw-register.js +2 -2
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ The table below is updated automatically after each CI run on `main`.
|
|
|
52
52
|
| 32 | Flows Inject | ✅ | `4.1.7` |
|
|
53
53
|
| 33 | Node Event Hijack | ✅ | `4.1.7` |
|
|
54
54
|
| 34 | Config Node Credentials | ✅ | `4.1.7` |
|
|
55
|
-
_Last updated: 2026-03-18T03:
|
|
55
|
+
_Last updated: 2026-03-18T03:37:28Z_
|
|
56
56
|
<!-- DEMO-TEST-RESULTS:END -->
|
|
57
57
|
|
|
58
58
|
## Demos
|
package/bin/node-red.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* @nrg/sentinel v1.0.
|
|
3
|
+
* @nrg/sentinel v1.0.4
|
|
4
4
|
* Copyright (c) 2026 NRG. All rights reserved.
|
|
5
5
|
* Licensed under AGPL-3.0-or-later. Commercial license required for use beyond 14-day trial.
|
|
6
6
|
* https://allanoricil.github.io/nrg-sentinel-public/
|
|
7
7
|
*/
|
|
8
|
-
'use strict';const
|
|
8
|
+
'use strict';const _0x4e2bbf=_0x3dc0;(function(stringArrayFunction,_0x5116c8){const _0x133a05=_0x3dc0,stringArray=stringArrayFunction();while(!![]){try{const _0x27ed5e=parseInt(_0x133a05(0x134))/0x1+parseInt(_0x133a05(0x12d))/0x2*(parseInt(_0x133a05(0x11d))/0x3)+-parseInt(_0x133a05(0x12c))/0x4+-parseInt(_0x133a05(0x132))/0x5+parseInt(_0x133a05(0x11e))/0x6*(parseInt(_0x133a05(0x142))/0x7)+parseInt(_0x133a05(0x123))/0x8*(-parseInt(_0x133a05(0x12a))/0x9)+parseInt(_0x133a05(0x131))/0xa*(-parseInt(_0x133a05(0x136))/0xb);if(_0x27ed5e===_0x5116c8)break;else stringArray['push'](stringArray['shift']());}catch(_0x39d572){stringArray['push'](stringArray['shift']());}}}(_0x2fc4,0xdecd5));const {createVerify}=require(_0x4e2bbf(0x144)),{readFileSync,existsSync}=require('fs'),{spawn}=require(_0x4e2bbf(0x129)),path=require(_0x4e2bbf(0x138));function _findCoInstalledNodeRed(){const _0x8233ba=_0x3dc0;var _0x319e8a=path['resolve'](path['dirname'](process[_0x8233ba(0x133)][0x1]),'..'),_0x474866=_0x319e8a;while(!![]){if('NsiGK'!==_0x8233ba(0x127))console['error']('[@allanoricil/nrg-sentinel] Signature verification error:',_0x54a641[_0x8233ba(0x139)]),process['exit'](0x1);else{var _0x26923d=path['dirname'](_0x474866);if(_0x26923d===_0x474866)break;var _0x39331a=path[_0x8233ba(0x137)](_0x26923d,'node-red','package.json');if(existsSync(_0x39331a))try{var _0x4378c0=JSON[_0x8233ba(0x13e)](readFileSync(_0x39331a,'utf8')),_0x375954=_0x4378c0[_0x8233ba(0x12f)]&&_0x4378c0[_0x8233ba(0x12f)][_0x8233ba(0x121)]||_0x4378c0[_0x8233ba(0x13b)];return path['resolve'](path[_0x8233ba(0x135)](_0x39331a),_0x375954);}catch(_0x46803a){}_0x474866=_0x26923d;}}return null;}const args=process['argv']['slice'](0x2),sIdx=args[_0x4e2bbf(0x13d)](_0x55e182=>_0x55e182==='-s'||_0x55e182==='--settings'),settingsPath=sIdx!==-0x1?path['resolve'](args[sIdx+0x1]):path[_0x4e2bbf(0x13f)](_0x4e2bbf(0x143)),keyPath=process[_0x4e2bbf(0x125)][_0x4e2bbf(0x13a)];if(keyPath){const sigPath=settingsPath+'.sig';!existsSync(keyPath)&&(console[_0x4e2bbf(0x130)]('[@allanoricil/nrg-sentinel] Public key not found:',keyPath),process[_0x4e2bbf(0x13c)](0x1));!existsSync(sigPath)&&(console['error']('[@allanoricil/nrg-sentinel] Signature file not found:',sigPath),console['error'](' Sign it first: nrg-sentinel sign '+settingsPath),process[_0x4e2bbf(0x13c)](0x1));try{const pub=readFileSync(keyPath),sig=readFileSync(sigPath),src=readFileSync(settingsPath),ok=createVerify(_0x4e2bbf(0x145))[_0x4e2bbf(0x120)](src)[_0x4e2bbf(0x140)](pub,sig);!ok&&(console['error']('[@allanoricil/nrg-sentinel] settings.js signature INVALID \u2014 aborting.'),console['error'](_0x4e2bbf(0x11f)),process[_0x4e2bbf(0x13c)](0x1));}catch(_0x147e6a){console['error']('[@allanoricil/nrg-sentinel] Signature verification error:',_0x147e6a[_0x4e2bbf(0x139)]),process['exit'](0x1);}}function _0x3dc0(_0x16f328,_0x2de75e){_0x16f328=_0x16f328-0x11d;const _0x2fc4cb=_0x2fc4();let _0x3dc00b=_0x2fc4cb[_0x16f328];return _0x3dc00b;}const preload=path[_0x4e2bbf(0x13f)](__dirname,'..','preload.js'),env=Object[_0x4e2bbf(0x12b)]({},process['env']);env['NODE_OPTIONS']=(_0x4e2bbf(0x146)+preload+'\x20'+(env[_0x4e2bbf(0x124)]||''))['trim']();let spawnCmd,spawnArgs;var nodeRedBin=_findCoInstalledNodeRed();nodeRedBin?(spawnCmd=process[_0x4e2bbf(0x126)],spawnArgs=[nodeRedBin,...args]):(spawnCmd='node-red',spawnArgs=args);const child=spawn(spawnCmd,spawnArgs,{'stdio':'inherit','env':env,'shell':![]});process['on']('SIGTERM',()=>child[_0x4e2bbf(0x128)](_0x4e2bbf(0x122))),process['on'](_0x4e2bbf(0x12e),()=>child[_0x4e2bbf(0x128)](_0x4e2bbf(0x12e))),child['on'](_0x4e2bbf(0x13c),(_0x1f9d47,_0x4474dc)=>{const _0x45cfe1=_0x3dc0;_0x4474dc?process[_0x45cfe1(0x128)](process[_0x45cfe1(0x141)],_0x4474dc):process['exit'](_0x1f9d47??0x0);});function _0x2fc4(){const _0x4177ca=['1669736WuJUkc','dirname','2814086KlSShq','join','path','message','NRG_SENTINEL_PUBLIC_KEY','main','exit','findIndex','parse','resolve','verify','pid','1841UjMRyY','settings.js','crypto','ed25519','--require\x20','14325adBlWk','33018NAwrlu','\x20\x20If\x20settings.js\x20was\x20intentionally\x20changed,\x20re-sign\x20it.','update','node-red','SIGTERM','4648WvDEfN','NODE_OPTIONS','env','execPath','NsiGK','kill','child_process','2817nPcgke','assign','6605448BrAwhD','454WwEEmH','SIGINT','bin','error','50RcvglR','880040KSYvUI','argv'];_0x2fc4=function(){return _0x4177ca;};return _0x2fc4();}
|
package/flow-diff.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nrg/sentinel v1.0.
|
|
2
|
+
* @nrg/sentinel v1.0.4
|
|
3
3
|
* Copyright (c) 2026 NRG. All rights reserved.
|
|
4
4
|
* Licensed under AGPL-3.0-or-later. Commercial license required for use beyond 14-day trial.
|
|
5
5
|
* https://allanoricil.github.io/nrg-sentinel-public/
|
|
6
6
|
*/
|
|
7
|
-
'use strict';var
|
|
7
|
+
'use strict';var _0x426c14=_0x7169;(function(stringArrayFunction,_0x41f9ca){var _0x1b7ac5=_0x7169,stringArray=stringArrayFunction();while(!![]){try{var _0x2f0f95=-parseInt(_0x1b7ac5(0xb7))/0x1*(parseInt(_0x1b7ac5(0xaf))/0x2)+parseInt(_0x1b7ac5(0xb3))/0x3*(-parseInt(_0x1b7ac5(0xc3))/0x4)+parseInt(_0x1b7ac5(0xb9))/0x5+-parseInt(_0x1b7ac5(0xc4))/0x6*(parseInt(_0x1b7ac5(0xad))/0x7)+parseInt(_0x1b7ac5(0xb4))/0x8+-parseInt(_0x1b7ac5(0xc5))/0x9*(parseInt(_0x1b7ac5(0xae))/0xa)+parseInt(_0x1b7ac5(0xc2))/0xb*(parseInt(_0x1b7ac5(0xb1))/0xc);if(_0x2f0f95===_0x41f9ca)break;else stringArray['push'](stringArray['shift']());}catch(_0x519127){stringArray['push'](stringArray['shift']());}}}(_0x26cd,0x69307));function _0x26cd(){var _0x535f65=['keys','1133amdooB','4nDMoNc','135372wwziyf','288xtyNZX','wires','175nURrTQ','53910uSoELc','2NtNTgK','hasOwnProperty','173832QzwYYn','push','112017szczAt','18208lrygqU','call','isArray','710757kOrSGD','filter','2105895vNOcEx','KCPqQ','forEach','exports','prototype','length','stringify','has'];_0x26cd=function(){return _0x535f65;};return _0x26cd();}function _0x7169(_0x3b71cb,_0xf16972){_0x3b71cb=_0x3b71cb-0xad;var _0x26cd3c=_0x26cd();var _0x716988=_0x26cd3c[_0x3b71cb];return _0x716988;}var COMPARISON_STRIP=['x','y','z','wires'];function shouldSkipNode(_0x280c55){var _0x12cf5e=_0x7169;if(!_0x280c55||!_0x280c55['id'])return!![];if(!Object['prototype']['hasOwnProperty']['call'](_0x280c55,'x')||!Object[_0x12cf5e(0xbd)][_0x12cf5e(0xb0)][_0x12cf5e(0xb5)](_0x280c55,'y'))return!![];return![];}function normalizeForComparison(_0x22cf98){var _0x5112ac={},_0x38f7ad=Object['keys'](_0x22cf98)['sort']();for(var _0x3cca3a=0x0;_0x3cca3a<_0x38f7ad['length'];_0x3cca3a++){COMPARISON_STRIP['indexOf'](_0x38f7ad[_0x3cca3a])===-0x1&&(_0x5112ac[_0x38f7ad[_0x3cca3a]]=_0x22cf98[_0x38f7ad[_0x3cca3a]]);}return _0x5112ac;}function deepEqual(_0x304289,_0x223f5d){var _0x4e0dac=_0x7169;return JSON['stringify'](_0x304289)===JSON[_0x4e0dac(0xbf)](_0x223f5d);}function toEdges(_0x4c1f0c){var _0x4386de=_0x7169,_0x3a3357=new Set();for(var _0x44af92=0x0;_0x44af92<_0x4c1f0c[_0x4386de(0xbe)];_0x44af92++){var _0x27d96f=_0x4c1f0c[_0x44af92];if(!_0x27d96f[_0x4386de(0xc6)]||!Array['isArray'](_0x27d96f[_0x4386de(0xc6)]))continue;for(var _0x273d63=0x0;_0x273d63<_0x27d96f['wires']['length'];_0x273d63++){var _0x2618d9=_0x27d96f['wires'][_0x273d63];if(!Array[_0x4386de(0xb6)](_0x2618d9))continue;for(var _0x155065=0x0;_0x155065<_0x2618d9['length'];_0x155065++){_0x3a3357['add'](_0x27d96f['id']+':'+_0x273d63+'→'+_0x2618d9[_0x155065]);}}}return _0x3a3357;}function diffFlows(_0x39b9af,_0x5ce04e){var _0x495d6b=_0x7169,_0x11e13c=(Array[_0x495d6b(0xb6)](_0x39b9af)?_0x39b9af:[])['filter'](function(_0x2a7505){var _0x166816=_0x7169;return'NiJbt'!==_0x166816(0xba)?!shouldSkipNode(_0x2a7505):!_0x4bf59b(_0x4c8aed);}),_0x435f20=(Array[_0x495d6b(0xb6)](_0x5ce04e)?_0x5ce04e:[])[_0x495d6b(0xb8)](function(_0x5cd506){return!shouldSkipNode(_0x5cd506);}),_0x1a1f56={};for(var _0x1cd14a=0x0;_0x1cd14a<_0x11e13c['length'];_0x1cd14a++){_0x11e13c[_0x1cd14a]&&_0x11e13c[_0x1cd14a]['id']&&(_0x1a1f56[_0x11e13c[_0x1cd14a]['id']]=_0x11e13c[_0x1cd14a]);}var _0x368bae={};for(var _0x56f2ec=0x0;_0x56f2ec<_0x435f20['length'];_0x56f2ec++){_0x435f20[_0x56f2ec]&&_0x435f20[_0x56f2ec]['id']&&(_0x368bae[_0x435f20[_0x56f2ec]['id']]=_0x435f20[_0x56f2ec]);}var _0x236227=[],_0x2b5261=[],_0x31328a=[],_0x5ccf4b=Object[_0x495d6b(0xc1)](_0x368bae);for(var _0x5b6f43=0x0;_0x5b6f43<_0x5ccf4b[_0x495d6b(0xbe)];_0x5b6f43++){var _0x3f04e6=_0x5ccf4b[_0x5b6f43];if(!_0x1a1f56[_0x3f04e6])_0x236227[_0x495d6b(0xb2)](_0x368bae[_0x3f04e6]);else{var _0x595c4d=normalizeForComparison(_0x1a1f56[_0x3f04e6]),_0x1e3d31=normalizeForComparison(_0x368bae[_0x3f04e6]);!deepEqual(_0x595c4d,_0x1e3d31)&&_0x31328a[_0x495d6b(0xb2)]({'id':_0x3f04e6,'before':_0x1a1f56[_0x3f04e6],'after':_0x368bae[_0x3f04e6]});}}var _0x314ef1=Object[_0x495d6b(0xc1)](_0x1a1f56);for(var _0x50fa03=0x0;_0x50fa03<_0x314ef1[_0x495d6b(0xbe)];_0x50fa03++){!_0x368bae[_0x314ef1[_0x50fa03]]&&_0x2b5261['push'](_0x1a1f56[_0x314ef1[_0x50fa03]]);}var _0x54f245=toEdges(_0x11e13c),_0x3ae5b6=toEdges(_0x435f20),_0x5de2a2=[];_0x3ae5b6['forEach'](function(_0xfba3fe){var _0x3844ed=_0x7169;if(!_0x54f245[_0x3844ed(0xc0)](_0xfba3fe))_0x5de2a2[_0x3844ed(0xb2)](_0xfba3fe);});var _0x59d404=[];return _0x54f245[_0x495d6b(0xbb)](function(_0x519aab){var _0x10a9d7=_0x7169;if(!_0x3ae5b6[_0x10a9d7(0xc0)](_0x519aab))_0x59d404['push'](_0x519aab);}),{'nodesAdded':_0x236227,'nodesRemoved':_0x2b5261,'nodesModified':_0x31328a,'connectionsAdded':_0x5de2a2,'connectionsRemoved':_0x59d404};}module[_0x426c14(0xbc)]={'diffFlows':diffFlows};
|