mirror of
https://github.com/geoffsee/open-gsio.git
synced 2025-09-08 22:56:46 +00:00
change semantics
Update README deployment steps and add deploy:secrets script to package.json update local inference script and README update lockfile reconfigure package scripts for development update test execution pass server tests Update README with revised Bun commands and workspace details remove pnpm package manager designator create bun server
This commit is contained in:

committed by
Geoff Seemueller

parent
1055cda2f1
commit
497eb22ad8
36
packages/client/scripts/generate_robots_txt.js
Executable file
36
packages/client/scripts/generate_robots_txt.js
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bun
|
||||
|
||||
import fs from "fs";
|
||||
import {parseArgs} from "util";
|
||||
|
||||
|
||||
const {positionals} = parseArgs({
|
||||
args: Bun.argv,
|
||||
options: {},
|
||||
strict: true,
|
||||
allowPositionals: true,
|
||||
});
|
||||
|
||||
const currentDate = new Date().toISOString().split("T")[0];
|
||||
|
||||
const host = positionals[2];
|
||||
|
||||
const robotsTxtTemplate = `
|
||||
User-agent: *
|
||||
Allow: /
|
||||
Allow: /connect
|
||||
Disallow: /api
|
||||
Disallow: /assets
|
||||
|
||||
Sitemap: https://${host}/sitemap.xml
|
||||
`;
|
||||
|
||||
const robotsTxtPath = "./public/robots.txt";
|
||||
|
||||
fs.writeFile(robotsTxtPath, robotsTxtTemplate, (err) => {
|
||||
if (err) {
|
||||
console.error("Error writing robots.txt:", err);
|
||||
process.exit(1);
|
||||
}
|
||||
console.log("robots.txt created successfully:", currentDate);
|
||||
});
|
Reference in New Issue
Block a user