-
Notifications
You must be signed in to change notification settings - Fork 2
🤖 Migrate site, api, database, runtime, server packages to OSS #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| const bindings: Bindings = { | ||
| apiBaseURL: srv.url, | ||
| matchRequestHost: (hostname) => { | ||
| const regex = new RegExp(`^(.*)\.${srv.url.host}$`); |
Check failure
Code scanning / CodeQL
Useless regular-expression character escape High test
regular expression
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 1 day ago
To fix the problem, escape the period correctly in the string for the RegExp constructor. In JavaScript string literals, a literal backslash is represented as \\, so you should use "\\." in the pattern. In a template literal such as a backtick string, you must double the backslash to get a single backslash through to the final regular expression. Update the line in packages/api/src/test.ts (line 90) so that the regular expression uses "\\." rather than "\.". No additional imports, methods, or dependencies are required.
-
Copy modified line R90
| @@ -87,7 +87,7 @@ | ||
| const bindings: Bindings = { | ||
| apiBaseURL: srv.url, | ||
| matchRequestHost: (hostname) => { | ||
| const regex = new RegExp(`^(.*)\.${srv.url.host}$`); | ||
| const regex = new RegExp(`^(.*)\\.${srv.url.host}$`); | ||
| const exec = regex.exec(hostname); | ||
| if (exec) { | ||
| return exec[1]; |
- Copy database, runtime, api, site, server packages from blink.so - Replace MIT LICENSE with AGPL-3.0 from coder/coder - Remove billing pages from site - Stub out compute-protocol-worker and billing dependencies - Remove ai-gateway tests (billing-dependent) - Update root package.json with new workspaces and scripts - Update CI workflow to build new packages - Add prettier-plugin-organize-imports - Copy root files: bunfig.toml, .env.example, AGENTS.md, scripts/db.ts
This reverts commit ce9bb88.
- Remove packages/billing/ entirely (was stub package) - Update all package.json files to use Zod ^4.0.0 - Revert Zod 3 compatibility changes (z.string().uuid() -> z.uuid() etc.) - Inline billing stubs in ai-gateway.server.ts (Money, ingestUsageEvent) _Generated with cmux_
- Update CI to run all tests: bun test --timeout 30000 - Add missing workspace deps: - api: @blink.so/database, @blink.so/runtime, drizzle-orm, postgres, uuid, happy-dom - site: @blink.so/api, @blink.so/database, uuid - runtime: @blink.so/api, hono - scout-agent: workspace:* for all @blink-sdk/* packages, @octokit/core, @slack/bolt - database: bcrypt-ts _Generated with cmux_
Add 50ms delay in afterAll to allow React's deferred work to complete before deleting globalThis.window, preventing 'window is not defined' error. _Generated with cmux_
Summary
Migrates core packages from blink.so to the OSS repository:
Changes
Generated with
cmux