Some checks failed
CI / go (push) Waiting to run
CI / docker (push) Waiting to run
CI / lint-go (push) Waiting to run
CI / lint-docs (push) Waiting to run
CI / check-paperclip (push) Waiting to run
Deploy static site / Deploy to GitHub Pages (push) Has been cancelled
Deploy static site / Deploy via Docker to hatch.surf (push) Has been cancelled
Resolved conflicts by taking GitHub versions for: - .dockerignore, .gitignore, Dockerfile, README.md, docker-compose.yml Kept deploy.sh updated to: - Pull from GitHub (primary source) - Push to Gitea (push-mirror) - Build from site/ directory (GitHub structure) Co-Authored-By: Paperclip <noreply@paperclip.ing>
34 lines
1.0 KiB
JavaScript
34 lines
1.0 KiB
JavaScript
import { getPathMatch } from '../../shared/lib/router/utils/path-match';
|
|
import { parseVersionInfo } from './parse-version-info';
|
|
export const matchNextPageBundleRequest = getPathMatch('/_next/static/chunks/pages/:path*.js(\\.map|)');
|
|
export async function getVersionInfo() {
|
|
let installed = '0.0.0';
|
|
try {
|
|
installed = require('next/package.json').version;
|
|
let res;
|
|
try {
|
|
// use NPM registry regardless user using Yarn
|
|
res = await fetch('https://registry.npmjs.org/-/package/next/dist-tags');
|
|
} catch {
|
|
// ignore fetch errors
|
|
}
|
|
if (!res || !res.ok) return {
|
|
installed,
|
|
staleness: 'unknown'
|
|
};
|
|
const { latest, canary } = await res.json();
|
|
return parseVersionInfo({
|
|
installed,
|
|
latest,
|
|
canary
|
|
});
|
|
} catch (e) {
|
|
console.error(e);
|
|
return {
|
|
installed,
|
|
staleness: 'unknown'
|
|
};
|
|
}
|
|
}
|
|
|
|
//# sourceMappingURL=hot-reloader-shared-utils.js.map
|