diff --git a/.changeset/purple-zebras-vanish.md b/.changeset/purple-zebras-vanish.md new file mode 100644 index 00000000..798eba6a --- /dev/null +++ b/.changeset/purple-zebras-vanish.md @@ -0,0 +1,5 @@ +--- +"@dmno/cloudflare-platform": patch +--- + +clean up logs for dwrangler diff --git a/packages/docs-site/src/content/docs/docs/platforms/netlify.mdx b/packages/docs-site/src/content/docs/docs/platforms/netlify.mdx index 0b5e07ed..ec0f4de2 100644 --- a/packages/docs-site/src/content/docs/docs/platforms/netlify.mdx +++ b/packages/docs-site/src/content/docs/docs/platforms/netlify.mdx @@ -9,8 +9,6 @@ import AstroLogo from "~icons/logos/astro"; import TabbedCode from '@/components/TabbedCode.astro'; import BugReportLink from '@/components/BugReportLink.astro'; -At DMNO we _love_ [Netlify](https://netlify.com/). This very site is hosted on it! That's why we're very excited to make it easier and safer to use environment variables in all of your Netlify-hosted projects. - This platform integration exposes a pre-made config schema and underlying types to interact with the env vars that Netlify injects while on their platform. It also exposes a Netlify build plugin - which injects your resolved DMNO config into functions and edge functions. You may not need to use this plugin if you already have a build process that injects config values into your functions code before deployment. diff --git a/packages/platforms/cloudflare/src/dwrangler.ts b/packages/platforms/cloudflare/src/dwrangler.ts index 5dd925e7..a25da767 100644 --- a/packages/platforms/cloudflare/src/dwrangler.ts +++ b/packages/platforms/cloudflare/src/dwrangler.ts @@ -99,7 +99,7 @@ let wranglerProcess: ChildProcess | undefined; if (isDevMode) { dmnoServer.enableWatchMode(async () => { - console.log('reload!!!'); + console.log('reload triggered by DMNO config change'); dmnoHasTriggeredReload = true; if (wranglerProcess) { // wranglerProcess.kill(15); @@ -173,7 +173,7 @@ async function restartWrangler() { } // always inject static items using --define const allReplacements = { ...staticReplacements.dmnoConfig, ...staticReplacements.dmnoPublicConfig }; - console.log(allReplacements); + debug('define replacements', allReplacements); for (const k in allReplacements) { wranglerBuildArgs.push('--define', `${k}:${allReplacements[k]}`); } @@ -205,7 +205,6 @@ async function restartWrangler() { console.log('1 - CREATING NEW VERSION'); - const multiStepDeployEnv = { FORCE_COLOR: 'true', ...process.env, @@ -290,7 +289,7 @@ async function restartWrangler() { // console.log('error!', data); // }); wranglerProcess.on('exit', (code, signal) => { - console.log('wranglerProcess exit', { code, signal }); + debug('wranglerProcess exit', { code, signal }); // we are seeing wrangler exit code 0 and no signal both when // the user hits CTRL+C and when we restart the process // so we have to track whether we restarted it and ignore the close signal we get right after @@ -305,18 +304,18 @@ async function restartWrangler() { process.exit(exitCode); } }); - // wranglerProcess.on('close', () => { - // console.log('wrangler process - close'); - // }); - // wranglerProcess.on('disconnect', () => { - // console.log('wrangler process - disconnect'); - // }); - // wranglerProcess.on('error', () => { - // console.log('wrangler process - error'); - // }); - // wranglerProcess.on('message', () => { - // console.log('wrangler process - message'); - // }); + // wranglerProcess.on('close', () => { + // console.log('wrangler process - close'); + // }); + // wranglerProcess.on('disconnect', () => { + // console.log('wrangler process - disconnect'); + // }); + // wranglerProcess.on('error', () => { + // console.log('wrangler process - error'); + // }); + // wranglerProcess.on('message', () => { + // console.log('wrangler process - message'); + // }); } }