trying to stop proxy.js from exporting
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user