trying to stop proxy.js from exporting

This commit is contained in:
2026-03-07 00:02:46 -06:00
parent e9495f65b5
commit 67b36f97ce
5 changed files with 45 additions and 172 deletions

View File

@@ -44,10 +44,12 @@ Follow-up TODOs:
**Rationale**: Monolithic architecture enables simple packaging as a single IVA Studio proxy script and prevents fragmentation of business logic across multiple files. ALL functionality must be in one place.
### I. Zero External Imports from `proxy.js` (NON-NEGOTIABLE)
### I. Zero External Imports or Exports from `proxy.js` (NON-NEGOTIABLE)
`proxy.js` MUST have **ZERO import statements**. All dependencies MUST be provided as global objects by server.js.
`proxy.js` MUST have **ZERO export statements**. The proxy.js file should be treated as a single function that receives (req, res) parameters and loaded as a route into the server.js file.
**File system access** from `proxy.js` is **ABSOLUTELY PROHIBITED** under any circumstances. The `fs` module MUST NOT be imported into proxy.js.
**External libraries** (axios, jwt, googleapis, etc.) MUST NOT be imported. Use globals provided by server.js instead.
@@ -68,6 +70,8 @@ Follow-up TODOs:
- proxy.js MUST have NO `import` statements (file should start with comments, then code)
- During code review, verify first line of code is NOT an import
- Any `import` statement in proxy.js MUST be rejected immediately
- proxy.js MUST have NO `export` statements
- Any `export` statement in proxy.js MUST be rejected immediately
- All file operations MUST be in server.js, which then provides data via globals
- All external libraries MUST be provided as globals by server.js