Skip to content

Commit

Permalink
Merge branch 'image-cdn-cli-fixes' of https://github.com/netlify/cli
Browse files Browse the repository at this point in the history
…into image-cdn-cli-fixes
  • Loading branch information
kathmbeck committed Nov 20, 2023
2 parents 1e06bd3 + f68554b commit 08cee52
Show file tree
Hide file tree
Showing 10 changed files with 723 additions and 817 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jobs:
run:
npm ls -a -p | wc -l | tr -d ' \n' > .delta.dependencyCount && echo " (Dependency count)" >>
.delta.dependencyCount
- name: Get TypeScript conversion progress
run:
grep -r --exclude-dir="node_modules" --include="*.mts" "@ts-expect-error" . | wc -l | xargs >
.delta.tsConversion && echo " (Number of ts-expect-error directives)" >> .delta.tsConversion
- name: Save PR number
if: github.event_name == 'pull_request'
run: echo ${{ github.event.number }} > ./pr_number
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).



## [17.5.2](https://github.com/netlify/cli/compare/v17.5.1...v17.5.2) (2023-11-20)


### Bug Fixes

* also run blobs on `ntl serve` ([#6183](https://github.com/netlify/cli/issues/6183)) ([0ecd72e](https://github.com/netlify/cli/commit/0ecd72e327cb7b537908347afc699880fda64942))
* expose params to edge functions with `cache: "manual"` ([#6194](https://github.com/netlify/cli/issues/6194)) ([f1986d9](https://github.com/netlify/cli/commit/f1986d90c5fa2c1f6e66721d27d5febc9c6fe423))

## [17.5.1](https://github.com/netlify/cli/compare/v17.5.0...v17.5.1) (2023-11-17)


Expand Down
891 changes: 458 additions & 433 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "netlify-cli",
"description": "Netlify command line tool",
"version": "17.5.1",
"version": "17.5.2",
"author": "Netlify Inc.",
"type": "module",
"engines": {
Expand Down Expand Up @@ -82,12 +82,12 @@
"@bugsnag/js": "7.20.2",
"@fastify/static": "6.10.2",
"@netlify/blobs": "6.3.0",
"@netlify/build": "29.26.6",
"@netlify/build": "29.27.0",
"@netlify/build-info": "7.11.1",
"@netlify/config": "20.10.0",
"@netlify/edge-bundler": "10.1.2",
"@netlify/edge-bundler": "10.1.3",
"@netlify/local-functions-proxy": "1.1.1",
"@netlify/zip-it-and-ship-it": "9.26.1",
"@netlify/zip-it-and-ship-it": "9.26.2",
"@octokit/rest": "19.0.13",
"ansi-escapes": "6.2.0",
"ansi-styles": "6.2.1",
Expand Down Expand Up @@ -188,20 +188,20 @@
"uuid": "9.0.0",
"wait-port": "1.0.4",
"write-file-atomic": "5.0.1",
"ws": "^8.14.2",
"ws": "8.14.2",
"zod": "3.22.4"
},
"devDependencies": {
"@babel/preset-react": "7.22.5",
"@netlify/eslint-config-node": "7.0.0",
"@netlify/functions": "2.0.2",
"@types/fs-extra": "11.0.1",
"@netlify/functions": "2.4.0",
"@types/fs-extra": "11.0.4",
"@types/inquirer": "9.0.7",
"@types/node": "20.9.0",
"@types/prettyjson": "0.0.30",
"@types/semver": "7.5.0",
"@types/ws": "^8.5.9",
"@types/uuid": "9.0.7",
"@types/ws": "8.5.9",
"@vitest/coverage-v8": "1.0.0-beta.4",
"c8": "7.14.0",
"eslint-plugin-sort-destructure-keys": "1.5.0",
Expand Down
13 changes: 11 additions & 2 deletions src/commands/serve/serve.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import process from 'process'

import { Option } from 'commander'

import { getBlobsContext } from '../../lib/blobs/blobs.mjs'
import { promptEditorHelper } from '../../lib/edge-functions/editor-helper.mjs'
import { startFunctionsServer } from '../../lib/functions/server.mjs'
import { printBanner } from '../../utils/banner.mjs'
Expand All @@ -22,6 +23,7 @@ import { ensureNetlifyIgnore } from '../../utils/gitignore.mjs'
import openBrowser from '../../utils/open-browser.mjs'
import { generateInspectSettings, startProxyServer } from '../../utils/proxy-server.mjs'
import { runBuildTimeline } from '../../utils/run-build.mjs'
import type { ServerSettings } from '../../utils/types.js'
import { getGeoCountryArgParser } from '../../utils/validation.mjs'

/**
Expand Down Expand Up @@ -70,15 +72,15 @@ const serve = async (options, command) => {
// Netlify Build are loaded.
await getInternalFunctionsDir({ base: site.root, ensureExists: true })

let settings = /** @type {import('../../utils/types.js').ServerSettings} */ {}
let settings: ServerSettings
try {
settings = await detectServerSettings(devConfig, options, command)

cachedConfig.config = getConfigWithPlugins(cachedConfig.config, settings)
} catch (error_) {
// @ts-expect-error TS(2571) FIXME: Object is of type 'unknown'.
log(NETLIFYDEVERR, error_.message)
exit(1)
return exit(1)
}

command.setAnalyticsPayload({ live: options.live })
Expand All @@ -94,8 +96,15 @@ const serve = async (options, command) => {
options,
})

const blobsContext = await getBlobsContext({
debug: options.debug,
projectRoot: command.workingDir,
siteID: site.id ?? 'unknown-site-id',
})

const functionsRegistry = await startFunctionsServer({
api,
blobsContext,
command,
config,
debug: options.debug,
Expand Down
Loading

0 comments on commit 08cee52

Please sign in to comment.