feat(blog): add file-based blog with dynamic slugs, MDX content and layout shell
- Introduced blog routing using Next.js App Router - Implemented dynamic [slug] pages for blog posts - Added MDX-based content loading via lib/posts - Integrated shared TopBar layout with navigation - Established clear content, lib and component separation
This commit is contained in:
39
apps/public-web/node_modules/next/dist/esm/lib/has-necessary-dependencies.js
generated
vendored
Normal file
39
apps/public-web/node_modules/next/dist/esm/lib/has-necessary-dependencies.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
import { existsSync, realpathSync } from 'fs';
|
||||
import { resolveFrom } from './resolve-from';
|
||||
import { dirname, join, relative } from 'path';
|
||||
export function hasNecessaryDependencies(baseDir, requiredPackages) {
|
||||
let resolutions = new Map();
|
||||
const missingPackages = [];
|
||||
for (const p of requiredPackages){
|
||||
try {
|
||||
const pkgPath = realpathSync(resolveFrom(baseDir, `${p.pkg}/package.json`));
|
||||
const pkgDir = dirname(pkgPath);
|
||||
resolutions.set(join(p.pkg, 'package.json'), pkgPath);
|
||||
if (p.exportsRestrict) {
|
||||
const fileNameToVerify = relative(p.pkg, p.file);
|
||||
if (fileNameToVerify) {
|
||||
const fileToVerify = join(pkgDir, fileNameToVerify);
|
||||
if (existsSync(fileToVerify)) {
|
||||
resolutions.set(p.pkg, fileToVerify);
|
||||
} else {
|
||||
missingPackages.push(p);
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
resolutions.set(p.pkg, pkgPath);
|
||||
}
|
||||
} else {
|
||||
resolutions.set(p.pkg, resolveFrom(baseDir, p.file));
|
||||
}
|
||||
} catch (_) {
|
||||
missingPackages.push(p);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return {
|
||||
resolved: resolutions,
|
||||
missing: missingPackages
|
||||
};
|
||||
}
|
||||
|
||||
//# sourceMappingURL=has-necessary-dependencies.js.map
|
||||
Reference in New Issue
Block a user