@robinpath/robots 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -96
- package/package.json +37 -7
- package/dist/index.d.ts +0 -6
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -6
- package/dist/index.js.map +0 -1
- package/dist/robots.d.ts +0 -178
- package/dist/robots.d.ts.map +0 -1
- package/dist/robots.js +0 -174
- package/dist/robots.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
# @robinpath/robots
|
|
2
|
-
|
|
3
|
-
> robots.txt parsing, generation, URL permission checking, and crawl configuration
|
|
4
|
-
|
|
5
|
-
   
|
|
6
|
-
|
|
7
|
-
## Why use this module?
|
|
8
|
-
|
|
9
|
-
The `robots` module lets you:
|
|
10
|
-
|
|
11
|
-
- Parse robots.txt content
|
|
12
|
-
- Generate robots.txt
|
|
13
|
-
- Check if URL is allowed
|
|
14
|
-
- Check if URL is disallowed
|
|
15
|
-
- Get crawl delay for agent
|
|
16
|
-
|
|
17
|
-
All functions are callable directly from RobinPath scripts with a simple, consistent API.
|
|
18
|
-
|
|
19
|
-
## Installation
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npm install @robinpath/robots
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Quick Start
|
|
26
|
-
|
|
27
|
-
No credentials needed — start using it right away:
|
|
28
|
-
|
|
29
|
-
```robinpath
|
|
30
|
-
robots.create {"rules": [{"userAgent": "*", "disallow": ["/admin"]}]}
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Available Functions
|
|
34
|
-
|
|
35
|
-
| Function | Description |
|
|
36
|
-
|----------|-------------|
|
|
37
|
-
| `robots.parse` | Parse robots.txt content |
|
|
38
|
-
| `robots.create` | Generate robots.txt |
|
|
39
|
-
| `robots.isAllowed` | Check if URL is allowed |
|
|
40
|
-
| `robots.isDisallowed` | Check if URL is disallowed |
|
|
41
|
-
| `robots.getCrawlDelay` | Get crawl delay for agent |
|
|
42
|
-
| `robots.getSitemaps` | Get sitemap URLs |
|
|
43
|
-
| `robots.getRules` | Get rules for agent |
|
|
44
|
-
| `robots.addRule` | Add rule to robots config |
|
|
45
|
-
| `robots.removeRule` | Remove rule by user agent |
|
|
46
|
-
| `robots.addSitemap` | Add sitemap URL |
|
|
47
|
-
| `robots.allowAll` | Generate allow-all robots.txt |
|
|
48
|
-
| `robots.disallowAll` | Generate disallow-all robots.txt |
|
|
49
|
-
| `robots.fetch` | Fetch and parse robots.txt from URL |
|
|
50
|
-
|
|
51
|
-
## Examples
|
|
52
|
-
|
|
53
|
-
### Generate robots.txt
|
|
54
|
-
|
|
55
|
-
```robinpath
|
|
56
|
-
robots.create {"rules": [{"userAgent": "*", "disallow": ["/admin"]}]}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### Check if URL is allowed
|
|
60
|
-
|
|
61
|
-
```robinpath
|
|
62
|
-
robots.isAllowed $robots "/page" "Googlebot"
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### Check if URL is disallowed
|
|
66
|
-
|
|
67
|
-
```robinpath
|
|
68
|
-
robots.isDisallowed $robots "/admin"
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Integration with RobinPath
|
|
72
|
-
|
|
73
|
-
```typescript
|
|
74
|
-
import { RobinPath } from "@wiredwp/robinpath";
|
|
75
|
-
import Module from "@robinpath/robots";
|
|
76
|
-
|
|
77
|
-
const rp = new RobinPath();
|
|
78
|
-
rp.registerModule(Module.name, Module.functions);
|
|
79
|
-
rp.registerModuleMeta(Module.name, Module.functionMetadata);
|
|
80
|
-
|
|
81
|
-
const result = await rp.executeScript(`
|
|
82
|
-
robots.create {"rules": [{"userAgent": "*", "disallow": ["/admin"]}]}
|
|
83
|
-
`);
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Full API Reference
|
|
87
|
-
|
|
88
|
-
See [MODULE.md](./MODULE.md) for complete documentation including all parameters, return types, error handling, and advanced examples.
|
|
89
|
-
|
|
90
|
-
## Related Modules
|
|
91
|
-
|
|
92
|
-
- [`@robinpath/json`](../json) — JSON module for complementary functionality
|
|
93
|
-
|
|
94
|
-
## License
|
|
95
|
-
|
|
96
|
-
MIT
|
|
1
|
+
# @robinpath/robots
|
|
2
|
+
|
|
3
|
+
> robots.txt parsing, generation, URL permission checking, and crawl configuration
|
|
4
|
+
|
|
5
|
+
   
|
|
6
|
+
|
|
7
|
+
## Why use this module?
|
|
8
|
+
|
|
9
|
+
The `robots` module lets you:
|
|
10
|
+
|
|
11
|
+
- Parse robots.txt content
|
|
12
|
+
- Generate robots.txt
|
|
13
|
+
- Check if URL is allowed
|
|
14
|
+
- Check if URL is disallowed
|
|
15
|
+
- Get crawl delay for agent
|
|
16
|
+
|
|
17
|
+
All functions are callable directly from RobinPath scripts with a simple, consistent API.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install @robinpath/robots
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
No credentials needed — start using it right away:
|
|
28
|
+
|
|
29
|
+
```robinpath
|
|
30
|
+
robots.create {"rules": [{"userAgent": "*", "disallow": ["/admin"]}]}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Available Functions
|
|
34
|
+
|
|
35
|
+
| Function | Description |
|
|
36
|
+
|----------|-------------|
|
|
37
|
+
| `robots.parse` | Parse robots.txt content |
|
|
38
|
+
| `robots.create` | Generate robots.txt |
|
|
39
|
+
| `robots.isAllowed` | Check if URL is allowed |
|
|
40
|
+
| `robots.isDisallowed` | Check if URL is disallowed |
|
|
41
|
+
| `robots.getCrawlDelay` | Get crawl delay for agent |
|
|
42
|
+
| `robots.getSitemaps` | Get sitemap URLs |
|
|
43
|
+
| `robots.getRules` | Get rules for agent |
|
|
44
|
+
| `robots.addRule` | Add rule to robots config |
|
|
45
|
+
| `robots.removeRule` | Remove rule by user agent |
|
|
46
|
+
| `robots.addSitemap` | Add sitemap URL |
|
|
47
|
+
| `robots.allowAll` | Generate allow-all robots.txt |
|
|
48
|
+
| `robots.disallowAll` | Generate disallow-all robots.txt |
|
|
49
|
+
| `robots.fetch` | Fetch and parse robots.txt from URL |
|
|
50
|
+
|
|
51
|
+
## Examples
|
|
52
|
+
|
|
53
|
+
### Generate robots.txt
|
|
54
|
+
|
|
55
|
+
```robinpath
|
|
56
|
+
robots.create {"rules": [{"userAgent": "*", "disallow": ["/admin"]}]}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Check if URL is allowed
|
|
60
|
+
|
|
61
|
+
```robinpath
|
|
62
|
+
robots.isAllowed $robots "/page" "Googlebot"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Check if URL is disallowed
|
|
66
|
+
|
|
67
|
+
```robinpath
|
|
68
|
+
robots.isDisallowed $robots "/admin"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Integration with RobinPath
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
import { RobinPath } from "@wiredwp/robinpath";
|
|
75
|
+
import Module from "@robinpath/robots";
|
|
76
|
+
|
|
77
|
+
const rp = new RobinPath();
|
|
78
|
+
rp.registerModule(Module.name, Module.functions);
|
|
79
|
+
rp.registerModuleMeta(Module.name, Module.functionMetadata);
|
|
80
|
+
|
|
81
|
+
const result = await rp.executeScript(`
|
|
82
|
+
robots.create {"rules": [{"userAgent": "*", "disallow": ["/admin"]}]}
|
|
83
|
+
`);
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Full API Reference
|
|
87
|
+
|
|
88
|
+
See [MODULE.md](./MODULE.md) for complete documentation including all parameters, return types, error handling, and advanced examples.
|
|
89
|
+
|
|
90
|
+
## Related Modules
|
|
91
|
+
|
|
92
|
+
- [`@robinpath/json`](../json) — JSON module for complementary functionality
|
|
93
|
+
|
|
94
|
+
## License
|
|
95
|
+
|
|
96
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,13 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robinpath/robots",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"publishConfig": {
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
5
7
|
"type": "module",
|
|
6
8
|
"main": "dist/index.js",
|
|
7
9
|
"types": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc",
|
|
21
|
+
"test": "node --import tsx --test tests/*.test.ts"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@robinpath/core": ">=0.20.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@robinpath/core": "^0.30.1",
|
|
28
|
+
"tsx": "^4.19.0",
|
|
29
|
+
"typescript": "^5.6.0"
|
|
30
|
+
},
|
|
31
|
+
"description": "robots.txt parsing, generation, URL permission checking, and crawl configuration",
|
|
32
|
+
"keywords": [
|
|
33
|
+
"robots",
|
|
34
|
+
"web"
|
|
35
|
+
],
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"robinpath": {
|
|
38
|
+
"category": "web",
|
|
39
|
+
"type": "utility",
|
|
40
|
+
"auth": "none",
|
|
41
|
+
"functionCount": 13
|
|
42
|
+
}
|
|
13
43
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ModuleAdapter } from "@wiredwp/robinpath";
|
|
2
|
-
declare const RobotsModule: ModuleAdapter;
|
|
3
|
-
export default RobotsModule;
|
|
4
|
-
export { RobotsModule };
|
|
5
|
-
export { RobotsFunctions, RobotsFunctionMetadata, RobotsModuleMetadata } from "./robots.js";
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,QAAA,MAAM,YAAY,EAAE,aAA2K,CAAC;AAChM,eAAe,YAAY,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { RobotsFunctions, RobotsFunctionMetadata, RobotsModuleMetadata } from "./robots.js";
|
|
2
|
-
const RobotsModule = { name: "robots", functions: RobotsFunctions, functionMetadata: RobotsFunctionMetadata, moduleMetadata: RobotsModuleMetadata, global: false };
|
|
3
|
-
export default RobotsModule;
|
|
4
|
-
export { RobotsModule };
|
|
5
|
-
export { RobotsFunctions, RobotsFunctionMetadata, RobotsModuleMetadata } from "./robots.js";
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC5F,MAAM,YAAY,GAAkB,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,sBAA6B,EAAE,cAAc,EAAE,oBAA2B,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAChM,eAAe,YAAY,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/robots.d.ts
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import type { BuiltinHandler } from "@wiredwp/robinpath";
|
|
2
|
-
export declare const RobotsFunctions: Record<string, BuiltinHandler>;
|
|
3
|
-
export declare const RobotsFunctionMetadata: {
|
|
4
|
-
parse: {
|
|
5
|
-
description: string;
|
|
6
|
-
parameters: {
|
|
7
|
-
name: string;
|
|
8
|
-
dataType: string;
|
|
9
|
-
description: string;
|
|
10
|
-
formInputType: string;
|
|
11
|
-
required: boolean;
|
|
12
|
-
}[];
|
|
13
|
-
returnType: string;
|
|
14
|
-
returnDescription: string;
|
|
15
|
-
example: string;
|
|
16
|
-
};
|
|
17
|
-
create: {
|
|
18
|
-
description: string;
|
|
19
|
-
parameters: {
|
|
20
|
-
name: string;
|
|
21
|
-
dataType: string;
|
|
22
|
-
description: string;
|
|
23
|
-
formInputType: string;
|
|
24
|
-
required: boolean;
|
|
25
|
-
}[];
|
|
26
|
-
returnType: string;
|
|
27
|
-
returnDescription: string;
|
|
28
|
-
example: string;
|
|
29
|
-
};
|
|
30
|
-
isAllowed: {
|
|
31
|
-
description: string;
|
|
32
|
-
parameters: {
|
|
33
|
-
name: string;
|
|
34
|
-
dataType: string;
|
|
35
|
-
description: string;
|
|
36
|
-
formInputType: string;
|
|
37
|
-
required: boolean;
|
|
38
|
-
}[];
|
|
39
|
-
returnType: string;
|
|
40
|
-
returnDescription: string;
|
|
41
|
-
example: string;
|
|
42
|
-
};
|
|
43
|
-
isDisallowed: {
|
|
44
|
-
description: string;
|
|
45
|
-
parameters: {
|
|
46
|
-
name: string;
|
|
47
|
-
dataType: string;
|
|
48
|
-
description: string;
|
|
49
|
-
formInputType: string;
|
|
50
|
-
required: boolean;
|
|
51
|
-
}[];
|
|
52
|
-
returnType: string;
|
|
53
|
-
returnDescription: string;
|
|
54
|
-
example: string;
|
|
55
|
-
};
|
|
56
|
-
getCrawlDelay: {
|
|
57
|
-
description: string;
|
|
58
|
-
parameters: {
|
|
59
|
-
name: string;
|
|
60
|
-
dataType: string;
|
|
61
|
-
description: string;
|
|
62
|
-
formInputType: string;
|
|
63
|
-
required: boolean;
|
|
64
|
-
}[];
|
|
65
|
-
returnType: string;
|
|
66
|
-
returnDescription: string;
|
|
67
|
-
example: string;
|
|
68
|
-
};
|
|
69
|
-
getSitemaps: {
|
|
70
|
-
description: string;
|
|
71
|
-
parameters: {
|
|
72
|
-
name: string;
|
|
73
|
-
dataType: string;
|
|
74
|
-
description: string;
|
|
75
|
-
formInputType: string;
|
|
76
|
-
required: boolean;
|
|
77
|
-
}[];
|
|
78
|
-
returnType: string;
|
|
79
|
-
returnDescription: string;
|
|
80
|
-
example: string;
|
|
81
|
-
};
|
|
82
|
-
getRules: {
|
|
83
|
-
description: string;
|
|
84
|
-
parameters: {
|
|
85
|
-
name: string;
|
|
86
|
-
dataType: string;
|
|
87
|
-
description: string;
|
|
88
|
-
formInputType: string;
|
|
89
|
-
required: boolean;
|
|
90
|
-
}[];
|
|
91
|
-
returnType: string;
|
|
92
|
-
returnDescription: string;
|
|
93
|
-
example: string;
|
|
94
|
-
};
|
|
95
|
-
addRule: {
|
|
96
|
-
description: string;
|
|
97
|
-
parameters: {
|
|
98
|
-
name: string;
|
|
99
|
-
dataType: string;
|
|
100
|
-
description: string;
|
|
101
|
-
formInputType: string;
|
|
102
|
-
required: boolean;
|
|
103
|
-
}[];
|
|
104
|
-
returnType: string;
|
|
105
|
-
returnDescription: string;
|
|
106
|
-
example: string;
|
|
107
|
-
};
|
|
108
|
-
removeRule: {
|
|
109
|
-
description: string;
|
|
110
|
-
parameters: {
|
|
111
|
-
name: string;
|
|
112
|
-
dataType: string;
|
|
113
|
-
description: string;
|
|
114
|
-
formInputType: string;
|
|
115
|
-
required: boolean;
|
|
116
|
-
}[];
|
|
117
|
-
returnType: string;
|
|
118
|
-
returnDescription: string;
|
|
119
|
-
example: string;
|
|
120
|
-
};
|
|
121
|
-
addSitemap: {
|
|
122
|
-
description: string;
|
|
123
|
-
parameters: {
|
|
124
|
-
name: string;
|
|
125
|
-
dataType: string;
|
|
126
|
-
description: string;
|
|
127
|
-
formInputType: string;
|
|
128
|
-
required: boolean;
|
|
129
|
-
}[];
|
|
130
|
-
returnType: string;
|
|
131
|
-
returnDescription: string;
|
|
132
|
-
example: string;
|
|
133
|
-
};
|
|
134
|
-
allowAll: {
|
|
135
|
-
description: string;
|
|
136
|
-
parameters: {
|
|
137
|
-
name: string;
|
|
138
|
-
dataType: string;
|
|
139
|
-
description: string;
|
|
140
|
-
formInputType: string;
|
|
141
|
-
required: boolean;
|
|
142
|
-
}[];
|
|
143
|
-
returnType: string;
|
|
144
|
-
returnDescription: string;
|
|
145
|
-
example: string;
|
|
146
|
-
};
|
|
147
|
-
disallowAll: {
|
|
148
|
-
description: string;
|
|
149
|
-
parameters: {
|
|
150
|
-
name: string;
|
|
151
|
-
dataType: string;
|
|
152
|
-
description: string;
|
|
153
|
-
formInputType: string;
|
|
154
|
-
required: boolean;
|
|
155
|
-
}[];
|
|
156
|
-
returnType: string;
|
|
157
|
-
returnDescription: string;
|
|
158
|
-
example: string;
|
|
159
|
-
};
|
|
160
|
-
fetch: {
|
|
161
|
-
description: string;
|
|
162
|
-
parameters: {
|
|
163
|
-
name: string;
|
|
164
|
-
dataType: string;
|
|
165
|
-
description: string;
|
|
166
|
-
formInputType: string;
|
|
167
|
-
required: boolean;
|
|
168
|
-
}[];
|
|
169
|
-
returnType: string;
|
|
170
|
-
returnDescription: string;
|
|
171
|
-
example: string;
|
|
172
|
-
};
|
|
173
|
-
};
|
|
174
|
-
export declare const RobotsModuleMetadata: {
|
|
175
|
-
description: string;
|
|
176
|
-
methods: string[];
|
|
177
|
-
};
|
|
178
|
-
//# sourceMappingURL=robots.d.ts.map
|
package/dist/robots.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"robots.d.ts","sourceRoot":"","sources":["../src/robots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAA2C,MAAM,oBAAoB,CAAC;AA2JlG,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAgK,CAAC;AAE5N,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAclC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;CAGhC,CAAC"}
|
package/dist/robots.js
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
const parse = (args) => {
|
|
2
|
-
const text = String(args[0] ?? "");
|
|
3
|
-
const rules = [];
|
|
4
|
-
const sitemaps = [];
|
|
5
|
-
let host;
|
|
6
|
-
let current = null;
|
|
7
|
-
for (const rawLine of text.split(/\r?\n/)) {
|
|
8
|
-
const line = rawLine.replace(/#.*$/, "").trim();
|
|
9
|
-
if (!line)
|
|
10
|
-
continue;
|
|
11
|
-
const colonIdx = line.indexOf(":");
|
|
12
|
-
if (colonIdx < 0)
|
|
13
|
-
continue;
|
|
14
|
-
const key = line.substring(0, colonIdx).trim().toLowerCase();
|
|
15
|
-
const value = line.substring(colonIdx + 1).trim();
|
|
16
|
-
if (key === "user-agent") {
|
|
17
|
-
current = { userAgent: value, allow: [], disallow: [] };
|
|
18
|
-
rules.push(current);
|
|
19
|
-
}
|
|
20
|
-
else if (key === "allow" && current) {
|
|
21
|
-
current.allow.push(value);
|
|
22
|
-
}
|
|
23
|
-
else if (key === "disallow" && current) {
|
|
24
|
-
current.disallow.push(value);
|
|
25
|
-
}
|
|
26
|
-
else if (key === "crawl-delay" && current) {
|
|
27
|
-
current.crawlDelay = parseFloat(value);
|
|
28
|
-
}
|
|
29
|
-
else if (key === "sitemap") {
|
|
30
|
-
sitemaps.push(value);
|
|
31
|
-
}
|
|
32
|
-
else if (key === "host") {
|
|
33
|
-
host = value;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return { rules, sitemaps, host };
|
|
37
|
-
};
|
|
38
|
-
const create = (args) => {
|
|
39
|
-
const config = (typeof args[0] === "object" && args[0] !== null ? args[0] : {});
|
|
40
|
-
const lines = [];
|
|
41
|
-
const rules = config.rules ?? [];
|
|
42
|
-
for (const rule of rules) {
|
|
43
|
-
lines.push(`User-agent: ${rule.userAgent}`);
|
|
44
|
-
for (const d of rule.disallow ?? [])
|
|
45
|
-
lines.push(`Disallow: ${d}`);
|
|
46
|
-
for (const a of rule.allow ?? [])
|
|
47
|
-
lines.push(`Allow: ${a}`);
|
|
48
|
-
if (rule.crawlDelay !== undefined)
|
|
49
|
-
lines.push(`Crawl-delay: ${rule.crawlDelay}`);
|
|
50
|
-
lines.push("");
|
|
51
|
-
}
|
|
52
|
-
for (const s of config.sitemaps ?? [])
|
|
53
|
-
lines.push(`Sitemap: ${s}`);
|
|
54
|
-
if (config.host)
|
|
55
|
-
lines.push(`Host: ${config.host}`);
|
|
56
|
-
return lines.join("\n").trim();
|
|
57
|
-
};
|
|
58
|
-
function pathMatches(pattern, path) {
|
|
59
|
-
if (!pattern)
|
|
60
|
-
return false;
|
|
61
|
-
let re = pattern.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*");
|
|
62
|
-
if (re.endsWith("$"))
|
|
63
|
-
re = re;
|
|
64
|
-
else
|
|
65
|
-
re = re + ".*";
|
|
66
|
-
return new RegExp("^" + re).test(path);
|
|
67
|
-
}
|
|
68
|
-
const isAllowed = (args) => {
|
|
69
|
-
const robotsTxt = (typeof args[0] === "object" && args[0] !== null ? args[0] : parse([String(args[0] ?? "")]));
|
|
70
|
-
const url = String(args[1] ?? "/");
|
|
71
|
-
const agent = String(args[2] ?? "*").toLowerCase();
|
|
72
|
-
const path = url.startsWith("http") ? new URL(url).pathname : url;
|
|
73
|
-
const applicableRules = robotsTxt.rules.filter((r) => r.userAgent === "*" || r.userAgent.toLowerCase() === agent);
|
|
74
|
-
if (applicableRules.length === 0)
|
|
75
|
-
return true;
|
|
76
|
-
let bestMatch = "";
|
|
77
|
-
let allowed = true;
|
|
78
|
-
for (const rule of applicableRules) {
|
|
79
|
-
for (const pattern of rule.allow) {
|
|
80
|
-
if (pathMatches(pattern, path) && pattern.length > bestMatch.length) {
|
|
81
|
-
bestMatch = pattern;
|
|
82
|
-
allowed = true;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
for (const pattern of rule.disallow) {
|
|
86
|
-
if (pathMatches(pattern, path) && pattern.length > bestMatch.length) {
|
|
87
|
-
bestMatch = pattern;
|
|
88
|
-
allowed = false;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return allowed;
|
|
93
|
-
};
|
|
94
|
-
const isDisallowed = (args) => !isAllowed(args);
|
|
95
|
-
const getCrawlDelay = (args) => {
|
|
96
|
-
const robotsTxt = (typeof args[0] === "object" && args[0] !== null ? args[0] : parse([String(args[0] ?? "")]));
|
|
97
|
-
const agent = String(args[1] ?? "*").toLowerCase();
|
|
98
|
-
for (const rule of robotsTxt.rules) {
|
|
99
|
-
if (rule.userAgent.toLowerCase() === agent && rule.crawlDelay !== undefined)
|
|
100
|
-
return rule.crawlDelay;
|
|
101
|
-
}
|
|
102
|
-
for (const rule of robotsTxt.rules) {
|
|
103
|
-
if (rule.userAgent === "*" && rule.crawlDelay !== undefined)
|
|
104
|
-
return rule.crawlDelay;
|
|
105
|
-
}
|
|
106
|
-
return null;
|
|
107
|
-
};
|
|
108
|
-
const getSitemaps = (args) => {
|
|
109
|
-
const robotsTxt = (typeof args[0] === "object" && args[0] !== null ? args[0] : parse([String(args[0] ?? "")]));
|
|
110
|
-
return robotsTxt.sitemaps;
|
|
111
|
-
};
|
|
112
|
-
const getRules = (args) => {
|
|
113
|
-
const robotsTxt = (typeof args[0] === "object" && args[0] !== null ? args[0] : parse([String(args[0] ?? "")]));
|
|
114
|
-
const agent = args[1] ? String(args[1]).toLowerCase() : undefined;
|
|
115
|
-
if (!agent)
|
|
116
|
-
return robotsTxt.rules;
|
|
117
|
-
return robotsTxt.rules.filter((r) => r.userAgent === "*" || r.userAgent.toLowerCase() === agent);
|
|
118
|
-
};
|
|
119
|
-
const addRule = (args) => {
|
|
120
|
-
const robotsTxt = (typeof args[0] === "object" && args[0] !== null ? args[0] : parse([String(args[0] ?? "")]));
|
|
121
|
-
const rule = (typeof args[1] === "object" && args[1] !== null ? args[1] : {});
|
|
122
|
-
const newRule = { userAgent: rule.userAgent ?? "*", allow: rule.allow ?? [], disallow: rule.disallow ?? [], crawlDelay: rule.crawlDelay };
|
|
123
|
-
return { ...robotsTxt, rules: [...robotsTxt.rules, newRule] };
|
|
124
|
-
};
|
|
125
|
-
const removeRule = (args) => {
|
|
126
|
-
const robotsTxt = (typeof args[0] === "object" && args[0] !== null ? args[0] : parse([String(args[0] ?? "")]));
|
|
127
|
-
const agent = String(args[1] ?? "*").toLowerCase();
|
|
128
|
-
return { ...robotsTxt, rules: robotsTxt.rules.filter((r) => r.userAgent.toLowerCase() !== agent) };
|
|
129
|
-
};
|
|
130
|
-
const addSitemap = (args) => {
|
|
131
|
-
const robotsTxt = (typeof args[0] === "object" && args[0] !== null ? args[0] : parse([String(args[0] ?? "")]));
|
|
132
|
-
const url = String(args[1] ?? "");
|
|
133
|
-
if (robotsTxt.sitemaps.includes(url))
|
|
134
|
-
return robotsTxt;
|
|
135
|
-
return { ...robotsTxt, sitemaps: [...robotsTxt.sitemaps, url] };
|
|
136
|
-
};
|
|
137
|
-
const allowAll = (args) => {
|
|
138
|
-
const agent = String(args[0] ?? "*");
|
|
139
|
-
return create([{ rules: [{ userAgent: agent, allow: ["/"], disallow: [] }], sitemaps: [] }]);
|
|
140
|
-
};
|
|
141
|
-
const disallowAll = (args) => {
|
|
142
|
-
const agent = String(args[0] ?? "*");
|
|
143
|
-
return create([{ rules: [{ userAgent: agent, allow: [], disallow: ["/"] }], sitemaps: [] }]);
|
|
144
|
-
};
|
|
145
|
-
const fetchRobots = async (args) => {
|
|
146
|
-
const baseUrl = String(args[0] ?? "").replace(/\/+$/, "");
|
|
147
|
-
const url = baseUrl.includes("robots.txt") ? baseUrl : `${baseUrl}/robots.txt`;
|
|
148
|
-
const res = await fetch(url);
|
|
149
|
-
if (!res.ok)
|
|
150
|
-
return { found: false, status: res.status, parsed: null, raw: "" };
|
|
151
|
-
const text = await res.text();
|
|
152
|
-
return { found: true, status: res.status, parsed: parse([text]), raw: text };
|
|
153
|
-
};
|
|
154
|
-
export const RobotsFunctions = { parse, create, isAllowed, isDisallowed, getCrawlDelay, getSitemaps, getRules, addRule, removeRule, addSitemap, allowAll, disallowAll, fetch: fetchRobots };
|
|
155
|
-
export const RobotsFunctionMetadata = {
|
|
156
|
-
parse: { description: "Parse robots.txt content", parameters: [{ name: "text", dataType: "string", description: "robots.txt content", formInputType: "text", required: true }], returnType: "object", returnDescription: "{rules[], sitemaps[], host}", example: 'robots.parse $text' },
|
|
157
|
-
create: { description: "Generate robots.txt", parameters: [{ name: "config", dataType: "object", description: "{rules[], sitemaps[], host}", formInputType: "text", required: true }], returnType: "string", returnDescription: "robots.txt content", example: 'robots.create {"rules": [{"userAgent": "*", "disallow": ["/admin"]}]}' },
|
|
158
|
-
isAllowed: { description: "Check if URL is allowed", parameters: [{ name: "robots", dataType: "object", description: "Parsed robots or raw text", formInputType: "text", required: true }, { name: "url", dataType: "string", description: "URL or path", formInputType: "text", required: true }, { name: "userAgent", dataType: "string", description: "Bot name (default *)", formInputType: "text", required: false }], returnType: "boolean", returnDescription: "true if allowed", example: 'robots.isAllowed $robots "/page" "Googlebot"' },
|
|
159
|
-
isDisallowed: { description: "Check if URL is disallowed", parameters: [{ name: "robots", dataType: "object", description: "Parsed robots or raw text", formInputType: "text", required: true }, { name: "url", dataType: "string", description: "URL or path", formInputType: "text", required: true }, { name: "userAgent", dataType: "string", description: "Bot name", formInputType: "text", required: false }], returnType: "boolean", returnDescription: "true if disallowed", example: 'robots.isDisallowed $robots "/admin"' },
|
|
160
|
-
getCrawlDelay: { description: "Get crawl delay for agent", parameters: [{ name: "robots", dataType: "object", description: "Parsed robots", formInputType: "text", required: true }, { name: "userAgent", dataType: "string", description: "Bot name", formInputType: "text", required: false }], returnType: "number", returnDescription: "Delay in seconds or null", example: 'robots.getCrawlDelay $robots "Googlebot"' },
|
|
161
|
-
getSitemaps: { description: "Get sitemap URLs", parameters: [{ name: "robots", dataType: "object", description: "Parsed robots", formInputType: "text", required: true }], returnType: "array", returnDescription: "Sitemap URLs", example: 'robots.getSitemaps $robots' },
|
|
162
|
-
getRules: { description: "Get rules for agent", parameters: [{ name: "robots", dataType: "object", description: "Parsed robots", formInputType: "text", required: true }, { name: "userAgent", dataType: "string", description: "Bot name (all if omitted)", formInputType: "text", required: false }], returnType: "array", returnDescription: "Matching rules", example: 'robots.getRules $robots "Googlebot"' },
|
|
163
|
-
addRule: { description: "Add rule to robots config", parameters: [{ name: "robots", dataType: "object", description: "Parsed robots", formInputType: "text", required: true }, { name: "rule", dataType: "object", description: "{userAgent, allow[], disallow[], crawlDelay}", formInputType: "text", required: true }], returnType: "object", returnDescription: "Updated config", example: 'robots.addRule $robots {"userAgent": "BadBot", "disallow": ["/"]}' },
|
|
164
|
-
removeRule: { description: "Remove rule by user agent", parameters: [{ name: "robots", dataType: "object", description: "Parsed robots", formInputType: "text", required: true }, { name: "userAgent", dataType: "string", description: "Bot name", formInputType: "text", required: true }], returnType: "object", returnDescription: "Updated config", example: 'robots.removeRule $robots "BadBot"' },
|
|
165
|
-
addSitemap: { description: "Add sitemap URL", parameters: [{ name: "robots", dataType: "object", description: "Parsed robots", formInputType: "text", required: true }, { name: "url", dataType: "string", description: "Sitemap URL", formInputType: "text", required: true }], returnType: "object", returnDescription: "Updated config", example: 'robots.addSitemap $robots "https://example.com/sitemap.xml"' },
|
|
166
|
-
allowAll: { description: "Generate allow-all robots.txt", parameters: [{ name: "userAgent", dataType: "string", description: "Bot name (default *)", formInputType: "text", required: false }], returnType: "string", returnDescription: "robots.txt", example: 'robots.allowAll' },
|
|
167
|
-
disallowAll: { description: "Generate disallow-all robots.txt", parameters: [{ name: "userAgent", dataType: "string", description: "Bot name (default *)", formInputType: "text", required: false }], returnType: "string", returnDescription: "robots.txt", example: 'robots.disallowAll' },
|
|
168
|
-
fetch: { description: "Fetch and parse robots.txt from URL", parameters: [{ name: "url", dataType: "string", description: "Site URL", formInputType: "text", required: true }], returnType: "object", returnDescription: "{found, status, parsed, raw}", example: 'robots.fetch "https://example.com"' },
|
|
169
|
-
};
|
|
170
|
-
export const RobotsModuleMetadata = {
|
|
171
|
-
description: "robots.txt parsing, generation, URL permission checking, and crawl configuration",
|
|
172
|
-
methods: ["parse", "create", "isAllowed", "isDisallowed", "getCrawlDelay", "getSitemaps", "getRules", "addRule", "removeRule", "addSitemap", "allowAll", "disallowAll", "fetch"],
|
|
173
|
-
};
|
|
174
|
-
//# sourceMappingURL=robots.js.map
|
package/dist/robots.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"robots.js","sourceRoot":"","sources":["../src/robots.ts"],"names":[],"mappings":"AAeA,MAAM,KAAK,GAAmB,CAAC,IAAI,EAAE,EAAE;IACrC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IACnC,MAAM,KAAK,GAAiB,EAAE,CAAC;IAC/B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,IAAI,IAAwB,CAAC;IAC7B,IAAI,OAAO,GAAsB,IAAI,CAAC;IACtC,KAAK,MAAM,OAAO,IA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