001-drive-proxy-adapter #1

Merged
Peter.Morton merged 25 commits from 001-drive-proxy-adapter into main 2026-03-07 12:45:57 -06:00
Showing only changes of commit 07968927fc - Show all commits

View File

@@ -6,7 +6,7 @@
* *
* ARCHITECTURE: * ARCHITECTURE:
* - Loaded by server.js using vm.Script (same as proxy.js) * - Loaded by server.js using vm.Script (same as proxy.js)
* - Returns a single object containing all helper functions * - Function that returns a single object containing all helper functions
* - Injected into globalVariableContext for access by proxy.js * - Injected into globalVariableContext for access by proxy.js
* - NO IMPORTS - All dependencies provided via VM context * - NO IMPORTS - All dependencies provided via VM context
* *
@@ -17,6 +17,7 @@
* @returns {Object} Helpers object with all utility functions * @returns {Object} Helpers object with all utility functions
*/ */
(function() {
/** /**
* Custom error for document count exceeding limit * Custom error for document count exceeding limit
*/ */
@@ -281,12 +282,11 @@ function parseRoute(method, url) {
// All other paths return 404 // All other paths return 404
return { route: null, error: "Not found", statusCode: 404 }; return { route: null, error: "Not found", statusCode: 404 };
} }
// ============================================================================= // =============================================================================
// Return helpers object with all functions // Return helpers object with all functions
// ============================================================================= // =============================================================================
({ return {
// Error classes // Error classes
DocumentCountExceededError, DocumentCountExceededError,
@@ -309,4 +309,5 @@ generateSitemap,
// Routing // Routing
parseRoute, parseRoute,
}); };
})();