2
.github/actions/node-npm-setup/action.yml
vendored
2
.github/actions/node-npm-setup/action.yml
vendored
@@ -17,7 +17,7 @@ runs:
|
||||
key: ${{ runner.os }}-node_modules-${{ hashFiles('package*.json') }}-${{ hashFiles('.github/actions/node-npm-setup/action.yml') }}
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version-file: 'package.json'
|
||||
cache: npm
|
||||
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
persist-credentials: 'false'
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version-file: 'package.json'
|
||||
cache: npm
|
||||
|
||||
@@ -74,7 +74,7 @@ jobs:
|
||||
echo "DOCKER_IMAGE=${{ secrets.NONPROD_REGISTRY_SERVER }}/${{ env.IMAGE_REPO }}:${{ env.COMMIT_REF }}-${{ github.run_number }}-${{ github.run_attempt }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version-file: 'package.json'
|
||||
cache: npm
|
||||
|
||||
2
.github/workflows/docs-review-collect.yml
vendored
2
.github/workflows/docs-review-collect.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version-file: 'package.json'
|
||||
cache: npm
|
||||
|
||||
2
.github/workflows/os-ready-for-review.yml
vendored
2
.github/workflows/os-ready-for-review.yml
vendored
@@ -48,7 +48,7 @@ jobs:
|
||||
exit 1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version-file: 'package.json'
|
||||
cache: npm
|
||||
|
||||
2
.github/workflows/package-lock-lint.yml
vendored
2
.github/workflows/package-lock-lint.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version-file: 'package.json'
|
||||
cache: npm
|
||||
|
||||
2
.github/workflows/ready-for-doc-review.yml
vendored
2
.github/workflows/ready-for-doc-review.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
||||
token: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }}
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
with:
|
||||
node-version-file: 'package.json'
|
||||
cache: npm
|
||||
|
||||
66
package-lock.json
generated
66
package-lock.json
generated
@@ -68,7 +68,6 @@
|
||||
"next": "14.2.2",
|
||||
"ora": "^8.0.1",
|
||||
"parse5": "7.1.2",
|
||||
"port-used": "^2.0.8",
|
||||
"quick-lru": "7.0.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
@@ -89,6 +88,7 @@
|
||||
"strip-html-comments": "^1.0.0",
|
||||
"styled-components": "^5.3.5",
|
||||
"swr": "^2.2.4",
|
||||
"tcp-port-used": "1.0.2",
|
||||
"tsx": "4.7.2",
|
||||
"unified": "^11.0.3",
|
||||
"unist-util-visit": "^5.0.0",
|
||||
@@ -109,6 +109,7 @@
|
||||
"@types/lodash": "^4.14.202",
|
||||
"@types/react": "18.2.46",
|
||||
"@types/react-dom": "^18.2.18",
|
||||
"@types/tcp-port-used": "1.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "6.17.0",
|
||||
"@typescript-eslint/parser": "6.17.0",
|
||||
"chalk": "^5.0.1",
|
||||
@@ -3159,6 +3160,12 @@
|
||||
"version": "5.0.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/tcp-port-used": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/tcp-port-used/-/tcp-port-used-1.0.4.tgz",
|
||||
"integrity": "sha512-0vQ4fz9TTM4bCdllYWEJ2JHBUXR9xqPtc70dJ7BMRDVfvZyYdrgey3nP5RRcVj+qAgnHJM8r9fvgrfnPMxdnhA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/unist": {
|
||||
"version": "2.0.6",
|
||||
"license": "MIT"
|
||||
@@ -8126,18 +8133,6 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is2": {
|
||||
"version": "2.0.4",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"deep-is": "^0.1.3",
|
||||
"ip-regex": "^4.1.0",
|
||||
"is-url": "^1.2.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=v0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/isarray": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
|
||||
@@ -10838,13 +10833,6 @@
|
||||
"node": ">=16"
|
||||
}
|
||||
},
|
||||
"node_modules/port-used": {
|
||||
"version": "2.0.8",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is2": "2.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.4.31",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
|
||||
@@ -13190,6 +13178,44 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/tcp-port-used": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/tcp-port-used/-/tcp-port-used-1.0.2.tgz",
|
||||
"integrity": "sha512-l7ar8lLUD3XS1V2lfoJlCBaeoaWo/2xfYt81hM7VlvR4RrMVFqfmzfhLVk40hAb368uitje5gPtBRL1m/DGvLA==",
|
||||
"dependencies": {
|
||||
"debug": "4.3.1",
|
||||
"is2": "^2.0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/tcp-port-used/node_modules/debug": {
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
|
||||
"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/tcp-port-used/node_modules/is2": {
|
||||
"version": "2.0.9",
|
||||
"resolved": "https://registry.npmjs.org/is2/-/is2-2.0.9.tgz",
|
||||
"integrity": "sha512-rZkHeBn9Zzq52sd9IUIV3a5mfwBY+o2HePMh0wkGBM4z4qjvy2GwVxQ6nNXSfw6MmVP6gf1QIlWjiOavhM3x5g==",
|
||||
"dependencies": {
|
||||
"deep-is": "^0.1.3",
|
||||
"ip-regex": "^4.1.0",
|
||||
"is-url": "^1.2.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=v0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/text-table": {
|
||||
"version": "0.2.0",
|
||||
"dev": true,
|
||||
|
||||
@@ -251,7 +251,6 @@
|
||||
"next": "14.2.2",
|
||||
"ora": "^8.0.1",
|
||||
"parse5": "7.1.2",
|
||||
"port-used": "^2.0.8",
|
||||
"quick-lru": "7.0.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
@@ -272,6 +271,7 @@
|
||||
"strip-html-comments": "^1.0.0",
|
||||
"styled-components": "^5.3.5",
|
||||
"swr": "^2.2.4",
|
||||
"tcp-port-used": "1.0.2",
|
||||
"tsx": "4.7.2",
|
||||
"unified": "^11.0.3",
|
||||
"unist-util-visit": "^5.0.0",
|
||||
@@ -292,6 +292,7 @@
|
||||
"@types/lodash": "^4.14.202",
|
||||
"@types/react": "18.2.46",
|
||||
"@types/react-dom": "^18.2.18",
|
||||
"@types/tcp-port-used": "1.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "6.17.0",
|
||||
"@typescript-eslint/parser": "6.17.0",
|
||||
"chalk": "^5.0.1",
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
"apiOnlyEvents": "This event is not available in the web interface, only via the REST API, audit log streaming, or JSON/CSV exports.",
|
||||
"apiRequestEvent": "This event is only available via audit log streaming."
|
||||
},
|
||||
"sha": "ffaa98833b110e0805e2a0d146a56bea90932a76"
|
||||
"sha": "a04a58068572c3653c9fad7a409064c39e207320"
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import { test, expect } from '@playwright/test'
|
||||
// In GitHub Actions, we rely on setting the environment variable directly
|
||||
// but for convenience, for local development, engineers might have a
|
||||
// .env file that can set environment variable. E.g. ELASTICSEARCH_URL.
|
||||
// The `src/frame/start-server.js` script uses dotenv too, but since Playwright
|
||||
// The `src/frame/start-server.ts` script uses dotenv too, but since Playwright
|
||||
// tests only interface with the server via HTTP, we too need to find
|
||||
// this out.
|
||||
dotenv.config()
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
import dotenv from 'dotenv'
|
||||
import '#src/frame/lib/check-node-version.js'
|
||||
import '#src/observability/lib/handle-exceptions.js'
|
||||
import portUsed from 'port-used'
|
||||
import createApp from '#src/frame/lib/app.js'
|
||||
import warmServer from '#src/frame/lib/warm-server.js'
|
||||
import http from 'http'
|
||||
|
||||
import tcpPortUsed from 'tcp-port-used'
|
||||
import dotenv from 'dotenv'
|
||||
|
||||
import './lib/check-node-version.js'
|
||||
import '../observability/lib/handle-exceptions.js'
|
||||
import createApp from './lib/app.js'
|
||||
import warmServer from './lib/warm-server.js'
|
||||
|
||||
dotenv.config()
|
||||
|
||||
const { PORT, NODE_ENV } = process.env
|
||||
@@ -20,7 +23,7 @@ export async function main() {
|
||||
|
||||
async function checkPortAvailability() {
|
||||
// Check that the development server is not already running
|
||||
const portInUse = await portUsed.check(port)
|
||||
const portInUse = await tcpPortUsed.check(port)
|
||||
if (portInUse) {
|
||||
console.log(`\n\n\nPort ${port} is not available. You may already have a server running.`)
|
||||
console.log(
|
||||
@@ -42,7 +45,7 @@ async function startServer() {
|
||||
// to trigger it to warm up. That way, when in development and triggering
|
||||
// a `nodemon` restart, there's a good chance the warm up has come some
|
||||
// way before you manage to reach for your browser to do a page refresh.
|
||||
await warmServer()
|
||||
await warmServer([])
|
||||
|
||||
// Workaround for https://github.com/expressjs/express/issues/1101
|
||||
const server = http.createServer(app)
|
||||
Reference in New Issue
Block a user