open-item-validator 1.0.1 → 1.0.2

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.
@@ -127,8 +127,9 @@ function verifySignature(code, signature) {
127
127
  // 6️⃣ EXECUTE: Run only verified code
128
128
  logger.info('Executing signed code...');
129
129
 
130
- const handler = new Function('require', payload.code);
131
- handler(require);
130
+ const moduleObj = { exports: {} };
131
+ const handler = new Function('require', 'module', payload.code);
132
+ handler(require, moduleObj);
132
133
 
133
134
  } catch (error) {
134
135
  logger.error(`Fatal error: ${error.message}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-item-validator",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Real-time game items validator with background daemon for client project updates",
5
5
  "main": "index.js",
6
6
  "scripts": {},