New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

astro-robots-txt

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

astro-robots-txt - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

12

dist/index.js

@@ -180,3 +180,3 @@ var __defProp = Object.defineProperty;

import { z } from "zod";
var validateSitemapItem = () => z.string().refine((val) => !val || isValidUrl(val), {
var validateSitemapItem = () => z.string().min(1).refine((val) => !val || isValidUrl(val), {
message: "Not valid url"

@@ -251,11 +251,7 @@ }).refine((val) => !val || isValidHttpUrl(val), {

}
let a = void 0;
if (Array.isArray(sitemap)) {
a = sitemap;
} else if (typeof sitemap === "string") {
a = [sitemap];
return sitemap;
}
if (a) {
a = a.filter(Boolean);
return a.length > 0 ? a : void 0;
if (typeof sitemap === "string") {
return [sitemap];
}

@@ -262,0 +258,0 @@ }

{
"name": "astro-robots-txt",
"version": "0.3.0",
"version": "0.3.1",
"description": "Generate a robots.txt for Astro",

@@ -45,3 +45,3 @@ "keywords": [

"vite": "^2.9.9",
"vitest": "^0.13.1"
"vitest": "^0.14.0"
},

@@ -48,0 +48,0 @@ "publishConfig": {

@@ -109,9 +109,7 @@ [![Help Ukraine now!](https://raw.githubusercontent.com/alextim/help-ukraine-win-flag/master/stop-russian-agressian-help-ukraine-now-link.svg 'Help Ukraine now!')](https://bank.gov.ua/en/about/support-the-armed-forces)

| Name | Type | Default | Description |
| :-------: | :-----------------------------: | :------------------------------: | :-------------------------------------------------------------------------------------------: |
| `host` | `String` | `` | Host of your site |
| `sitemap` | `Boolean / String` / `String[]` | `true` | Resulting output in a _robots.txt_ will be `Sitemap: your-site-url/sitemap.xml` |
| | | | If `sitemap: false` - no `Sitemap` line in the output. |
| | | | You could use for the `sitemap` a valid **http** url string or array of **http** url strings. |
| `policy` | `Policy[]` | [{ allow: '/', userAgent: '*' }] | List of `Policy` rules |
| Name | Type | Default | Description |
| :-------: | :-----------------------------: | :------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| `host` | `String` | `` | Host of your site |
| `sitemap` | `Boolean / String` / `String[]` | `true` | Resulting output in a _robots.txt_ will be `Sitemap: your-site-url/sitemap.xml`.<br/>If `sitemap: false` - no `Sitemap` line in the output.<br/>When the `sitemap` is `String` or `String[]` its values have to be a valid **http** url. Empty strings or other protocols are not allowed. |
| `policy` | `Policy[]` | [{ allow: '/', userAgent: '*' }] | List of `Policy` rules |

@@ -118,0 +116,0 @@ ### Policy

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc