const fs = require('fs');
const _ = require('lodash');
module.exports = (options, pkg) => {
options.replacer = options.replacer || {}
let replacer = 'corifeus';
if (typeof (options.replacer) === 'string') {
replacer = options.replacer;
} else if (options.replacer.hasOwnProperty('type')) {
replacer = options.replacer.type;
}
let commonBuild = `[](https://paypal.me/patrikx3) [](https://www.patrikx3.com/en/front/contact) [](https://www.facebook.com/corifeus.software) `
if (pkg.corifeus && pkg.corifeus.publish === true) {
// 
commonBuild = `[](https://www.npmjs.com/package/${pkg.name}) ` + commonBuild
}
const replaceFiles = [
'artifacts/**/*.md',
'docs/**/*.md',
'*.md',
'!node_modules',
'!build',
'!LICENSE.md',
'!readme.md',
'!README.md',
]
const defaultHeader = {
header: true,
replace: `
# \${pkg.description}
`,
files: replaceFiles
}
let defaultFooterNpm = ``
if (pkg.corifeus && pkg.corifeus.publish === true) {
// 
defaultFooterNpm = `[](https://www.npmjs.com/package/${pkg.name}) `
}
const defaultFooter = {
footer: true,
replace: `
---
# 🌐 Meet Assistant SaaS — meeting.corifeus.com
Don't want to install anything? Try the **hosted version** at **[meeting.corifeus.com](https://meeting.corifeus.com)** — full meeting workflow built for European businesses, no setup, no API key, no command line.
What the hosted version offers:
- **21-language live translation** during the meeting
- **AI summaries, action items, decisions, attendees, key quotes** auto-generated after every meeting
- **Custom vocabulary** — your client / company / industry terms corrected automatically (Pro+ tier)
- **Searchable meeting library** — find any decision or promise across all your past meetings
- **Shareable read-only links** — send a clean meeting summary to a client or teammate, no signup needed on their end
- **One-click email summary** after each meeting
- **Premium engine on every plan** — no downgraded model, ever
- **EU billing** — Stripe Tax + VAT-compliant + EUR-priced (Solo €19.99 / Pro €39.99 / Business €99.99 per month, no lock-in)
- **GDPR-compliant by default** — browser-language auto-detection, no tracking cookies, your meetings stored encrypted
Try the live demo (1 minute free, no signup) or browse the **public sample meeting** at [meeting.corifeus.com/sample](https://meeting.corifeus.com/sample).
---
# Corifeus Network
AI-powered network & email toolkit — free, no signup.
**Web** · [network.corifeus.com](https://network.corifeus.com) **MCP** · [\`npm i -g p3x-network-mcp\`](https://www.npmjs.com/package/p3x-network-mcp)
- **AI Network Assistant** — ask in plain language, get a full domain health report
- **Network Audit** — DNS, SSL, security headers, DNSBL, BGP, IPv6, geolocation in one call
- **Diagnostics** — DNS lookup & global propagation, WHOIS, reverse DNS, HTTP check, my-IP
- **Mail Tester** — live SPF/DKIM/DMARC + spam score + AI fix suggestions, results emailed (localized)
- **Monitoring** — TCP / HTTP / Ping with alerts and public status pages
- **MCP server** — 17 tools exposed to Claude Code, Codex, Cursor, any MCP client
- **Install** — \`claude mcp add p3x-network -- npx p3x-network-mcp\`
- **Try** — *"audit example.com"*, *"why do my emails land in spam? test me@example.com"*
- **Source** — [patrikx3/network](https://github.com/patrikx3/network) · [patrikx3/network-mcp](https://github.com/patrikx3/network-mcp)
- **Contact** — [patrikx3.com](https://www.patrikx3.com/en/front/contact) · [donate](https://paypal.me/patrikx3)
---
## ❤️ Support Our Open-Source Project
If you appreciate our work, consider ⭐ starring this repository or 💰 making a donation to support server maintenance and ongoing development. Your support means the world to us—thank you!
---
### 🌍 About My Domains
All my domains, including [patrikx3.com](https://patrikx3.com), [corifeus.eu](https://corifeus.eu), and [corifeus.com](https://corifeus.com), are developed in my spare time. While you may encounter minor errors, the sites are generally stable and fully functional.
---
### 📈 Versioning Policy
**Version Structure:** We follow a **Major.Minor.Patch** versioning scheme:
- **Major:** 📅 Corresponds to the current year.
- **Minor:** 🌓 Set as 4 for releases from January to June, and 10 for July to December.
- **Patch:** 🔧 Incremental, updated with each build.
**🚨 Important Changes:** Any breaking changes are prominently noted in the readme to keep you informed.
[**\${pkg.name.toUpperCase()}**](https://corifeus.com/\${git.repo === 'corifeus' ? 'matrix' : git.repo}) Build v\${pkg.version}
${defaultFooterNpm}[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [](https://www.patrikx3.com/en/front/contact) [](https://www.facebook.com/corifeus.software)
`,
files: replaceFiles
};
let angularVersion = '';
let nodeJsInfo = `
### NodeJS LTS is supported
### 🛠️ Built on NodeJs version
\`\`\`txt
${process.version}
\`\`\`
`;
if (options.replacer.hasOwnProperty('nodejsinfo') && options.replacer.nodejsinfo === false) {
nodeJsInfo = '';
}
const angularPkgPath = `${process.cwd()}/node_modules/@angular/core/package.json`;
if (fs.existsSync(angularPkgPath)) {
const angularPkg = JSON.parse(fs.readFileSync(angularPkgPath).toString());
angularVersion = `
# 📦 Built on Angular
\`\`\`text
${angularPkg.version}
\`\`\`
`
}
const hideNodeVersion = options.hasOwnProperty('replacer') && options.replacer.node === false;
let hideBuild = options.hasOwnProperty('replacer') && options.replacer.build === false;
pkg.corifeus.build = !hideBuild;
// let build = hideBuild ? '' : `[](https://travis-ci.com/patrikx3/\${git.repo}) [](https://scrutinizer-ci.com/g/patrikx3/\${git.repo}/?branch=master) [](https://scrutinizer-ci.com/g/patrikx3/\${git.repo}/?branch=master)`
let build = commonBuild
// https://api.travis-ci.com/patrikx3/redis-ui-material.svg?branch=master
/*
build += hideBuild ? '' : `[](https://travis-ci.com/patrikx3/\${git.repo})
[](https://network.corifeus.com/status/31ad7a5c194347c33e5445dbaf8)
`
*/
// https://github.com/patrikx3/onenote/workflows/build/badge.svg
build += hideBuild ? '' : `[](https://network.corifeus.com/status/31ad7a5c194347c33e5445dbaf8)
`
//build += opencollectiveHeader
// below is to add additional status
const domainInfo = `
🌌 **Bugs are evident™ - MATRIX️**
🚧 **This project is under active development!**
📢 **We welcome your feedback and contributions.**
`
let nodeVersion = hideNodeVersion ? `# 🛠️ \${pkg.description} v\${pkg.version}
${domainInfo}
# Description
` : `# \${pkg.description} v\${pkg.version}
${domainInfo}
${nodeJsInfo}
${angularVersion}
# 📝 Description
`
const footerMain = _.clone(defaultFooter);
footerMain.files = [
'readme.md',
'README.md',
];
switch (replacer) {
case 'corifeus':
options.config['cory-replace'] = {
headerMain: {
header: true,
replace: `
${build}
${build.trim() === '' ? '' : '---'}
${nodeVersion}
`,
files: [
'readme.md',
'README.md',
]
},
footerMain: footerMain,
header: defaultHeader,
footer: defaultFooter
}
break;
case 'p3x':
let nonEmptyP3x = '';
if (!options.empty) {
nonEmptyP3x = `${build}
`
}
options.config['cory-replace'] = {
headerMain: {
header: true,
/* [](https://trello.com/b/gqKHzZGy/p3x)
*/
replace: `
${nonEmptyP3x}
${nodeVersion}
`,
files: [
'readme.md',
'README.md',
]
},
footerMain: footerMain,
header: defaultHeader,
footer: defaultFooter
};
break;
case 'build':
case 'lede':
case 'openwrt':
let nonEmptyBuild = '';
if (!options.empty) {
/*
nonEmptyBuild = `[](https://travis-ci.com/patrikx3/\${git.repo}) [](https://scrutinizer-ci.com/g/patrikx3/\${git.repo}/?branch=master) [](https://scrutinizer-ci.com/g/patrikx3/\${git.repo}/?branch=master)
# \${pkg.description}
`
*/
nonEmptyBuild = `[](https://network.corifeus.com/status/31ad7a5c194347c33e5445dbaf8)
# \${pkg.description}
`
}
if (replacer === 'openwrt') {
nonEmptyBuild += `
`
}
options.config['cory-replace'] = {
headerMain: {
header: true,
/* [](https://trello.com/b/gqKHzZGy/p3x)
*/
replace: `
${commonBuild} ${nonEmptyBuild}
`,
files: [
'readme.md',
'README.md',
]
},
footerMain: footerMain,
header: defaultHeader,
footer: defaultFooter
};
break;
case 'home':
options.config['cory-replace'] = {
header: {
header: true,
replace: `
# \${pkg.description}
`,
files: [
'readme.md',
'README.md',
]
},
footer: defaultFooter,
}
break;
default:
throw new Error(`unknown replacer ${options.replacer}`)
}
/*
if (options.replacer.hasOwnProperty('npmio') && options.replacer.npmio === true && options.config['cory-replace'].hasOwnProperty('headerMain')) {
const replace = options.config['cory-replace'].headerMain.replace;
const append = replace.substring(replace.indexOf('---'));
options.config['cory-replace'].headerMain.replace = replace.substring(0, replace.indexOf('---')) + `
[](https://www.npmjs.com/package/\${pkg.name}/)
` + append
}
*/
}