-
Notifications
You must be signed in to change notification settings - Fork 213
Comparing changes
Open a pull request
base repository: firebase/firebase-functions
base: master
head repository: firebase/firebase-functions
compare: feat/stdio-discovery-backup
- 13 commits
- 4 files changed
- 3 contributors
Commits on Jul 11, 2025
-
feat: add stdio-based function discovery mode
Adds an alternative discovery mechanism that outputs function manifests via stderr instead of starting an HTTP server. This improves reliability by avoiding issues where module loading blocks the HTTP endpoint from becoming available. When FUNCTIONS_DISCOVERY_MODE=stdio is set: - Outputs base64-encoded manifest to stderr with __FIREBASE_FUNCTIONS_MANIFEST__: prefix - Outputs errors to stderr with __FIREBASE_FUNCTIONS_MANIFEST_ERROR__: prefix - Exits immediately without starting HTTP server - Maintains backward compatibility (HTTP remains default) Includes comprehensive tests that verify both HTTP and stdio discovery work correctly for all test cases (commonjs, esm, various configurations).
Configuration menu - View commit details
-
Copy full SHA for e0d6028 - Browse repository at this point
Copy the full SHA e0d6028View commit details -
test: add comprehensive tests for stdio discovery
- Add test fixture for broken syntax error handling - Refactor tests to use unified DiscoveryResult interface - Parameterize tests with nested loops to test all cases with both discovery methods - Add error handling tests for both HTTP and stdio discovery - All stdio discovery tests passing (16/16)
Configuration menu - View commit details
-
Copy full SHA for 62e37ba - Browse repository at this point
Copy the full SHA 62e37baView commit details -
fix: resolve linting errors in firebase-functions.ts
- Mark runStdioDiscovery() promise with void operator - Move handleQuitquitquit function to program root - Fix TypeScript warnings for error handling - Add eslint-disable comment for Express async handler
Configuration menu - View commit details
-
Copy full SHA for 0c2da1f - Browse repository at this point
Copy the full SHA 0c2da1fView commit details -
fix: address PR review comments for stdio discovery
- Add proper error handling for non-Error objects - Define MANIFEST_PREFIX and MANIFEST_ERROR_PREFIX constants - Fix HTTP discovery retry logic regression in tests - Make regex patterns multiline-safe for manifest and error parsing - Add timeout handling for stdio discovery in tests
Configuration menu - View commit details
-
Copy full SHA for a5f0b05 - Browse repository at this point
Copy the full SHA a5f0b05View commit details -
Configuration menu - View commit details
-
Copy full SHA for 08aca82 - Browse repository at this point
Copy the full SHA 08aca82View commit details -
fix: clean up broken-syntax fixture to match other fixtures
- Remove unnecessary dependencies from package.json - Remove package-lock.json - The npm link is handled by run.sh script
Configuration menu - View commit details
-
Copy full SHA for 0222d2f - Browse repository at this point
Copy the full SHA 0222d2fView commit details -
fix: address additional PR review comments
- Use process.exitCode instead of process.exit() to prevent race conditions with stderr buffer flushing - Refactor test to define discoveryMethods array once to reduce code duplication
Configuration menu - View commit details
-
Copy full SHA for 900d316 - Browse repository at this point
Copy the full SHA 900d316View commit details -
Configuration menu - View commit details
-
Copy full SHA for d48b3a2 - Browse repository at this point
Copy the full SHA d48b3a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 088534a - Browse repository at this point
Copy the full SHA 088534aView commit details -
refactor: use XML-style tags for stdio discovery output
- Replace magic string prefixes with self-documenting XML tags - Add explicit start/end markers to handle OS buffering edge cases - Make regex parsing more robust and less greedy - Addresses review comment about regex being too greedy
Configuration menu - View commit details
-
Copy full SHA for d384aaf - Browse repository at this point
Copy the full SHA d384aafView commit details -
Configuration menu - View commit details
-
Copy full SHA for ebebfa0 - Browse repository at this point
Copy the full SHA ebebfa0View commit details -
Update src/bin/firebase-functions.ts
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 74e3275 - Browse repository at this point
Copy the full SHA 74e3275View commit details -
Configuration menu - View commit details
-
Copy full SHA for 478b8c2 - Browse repository at this point
Copy the full SHA 478b8c2View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...feat/stdio-discovery-backup