Skip to content
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

use node https instead of uwebsockets #180

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@
"socket.io": "^4.8.0",
"svgo": "catalog:",
"typescript": "catalog:",
"uWebSockets.js": "github:uNetworking/uWebSockets.js#semver:^20.49.0",
"validate-npm-package-name": "^5.0.0",
"vite": "catalog:",
"vite-node": "catalog:",
Expand Down
42 changes: 2 additions & 40 deletions packages/core/src/cli/lib/init-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,8 @@ export async function initDmnoForService(workspaceInfo: ScannedWorkspaceInfo, se
**/.dmno/.icon-cache
# local config overrides
**/.dmno/.env.local
# local ssl certs
**/.dmno/certs
`;
await fs.promises.writeFile(gitIgnorePath, gitIgnore);
console.log(setupStepMessage(`.gitignore ${createdGitIgnore ? 'created' : 'updated'} with dmno files!`, { path: gitIgnorePath }));
Expand Down Expand Up @@ -532,44 +534,4 @@ export async function initDmnoForService(workspaceInfo: ScannedWorkspaceInfo, se
docs: '/guides/typescript',
}));
}

// const tsConfigFiles = await (
// new fdir() // eslint-disable-line new-cap
// .withRelativePaths()
// .glob('./tsconfig.json', './tsconfig.*.json', 'jsconfig.json')
// .withMaxDepth(0)
// .crawl(service.path)
// .withPromise()
// );
// if (!tsConfigFiles.length) {
// console.log(setupStepMessage('Failed to inject dmno types - no tsconfig/jsconfig found', {
// type: 'failure',
// docs: '/guides/typescript',
// }));
// }
// for (const tsConfigFileName of tsConfigFiles) {
// const tsConfigPath = `${service.path}/${tsConfigFileName}`;
// const originalTsConfigContents = (await fs.promises.readFile(tsConfigPath)).toString();
// const updatedTsConfigContents = await injectDmnoTypesIntoTsConfig(originalTsConfigContents);
// if (updatedTsConfigContents) {
// // TODO: maybe want to confirm with the user and show a diff?
// await fs.promises.writeFile(tsConfigPath, updatedTsConfigContents);

// console.log(setupStepMessage(`injected dmno types into ${tsConfigFileName}`, {
// path: tsConfigPath,
// // docs: suggestedDmnoIntegration.docs,
// }));
// } else {
// console.log(setupStepMessage('tsconfig already includes dmno types', {
// type: 'noop',
// path: tsConfigPath,
// // docs: suggestedDmnoIntegration.docs,
// }));
// }
// }


// SECRETS PLUGINS
// TODO
// if (service.isRoot) {}
}
13 changes: 0 additions & 13 deletions packages/core/src/cli/lib/init-process.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
import kleur from 'kleur';

process.on('uncaughtException', (err) => {
if (err.message.includes('Error loading shared library ld-linux-')) {
console.log([
'🚨 💡 🚨 💡 🚨',
'',
kleur.bold('uWebsockets compat issue. If you are running in Docker, try adding this line to your Dockerfile:'),
'',
' RUN ln -s "/lib/libc.musl-$(uname -m).so.1" "/lib/ld-linux-$(uname -m).so.1"',
'',
'🚨 💡 🚨 💡 🚨',
'',
].join('\n'));
}

console.log(kleur.red(`UNCAUGHT EXCEPTION: ${err.message}`));
console.log(kleur.red(`UNCAUGHT EXCEPTION: ${err.stack}`));
// eslint-disable-next-line no-restricted-syntax
Expand Down
Loading
Loading