astro-indexnow 0.0.1 → 0.0.3

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/dist/setup.d.ts CHANGED
@@ -1,2 +1,5 @@
1
- export default function setup({ addIntegration, prompt }: any): Promise<void>;
1
+ declare const _default: () => import("astro").AstroIntegration & {
2
+ setup: ({ prompt, addIntegration }: any) => Promise<void>;
3
+ };
4
+ export default _default;
2
5
  //# sourceMappingURL=setup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA,wBAA8B,KAAK,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,GAAG,iBAuBlE"}
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":";wCAU8C,GAAG;;AARjD,wBAmCG"}
package/dist/setup.js CHANGED
@@ -1,21 +1,33 @@
1
- export default async function setup({ addIntegration, prompt }) {
2
- const key = await prompt({
3
- name: "key",
4
- type: "text",
5
- message: "Enter your IndexNow API key:",
6
- validate: (value) => value ? true : "IndexNow key is required",
7
- });
8
- const siteUrl = await prompt({
9
- name: "siteUrl",
10
- type: "text",
11
- message: "Site URL (e.g. https://example.com):",
12
- });
13
- addIntegration({
14
- name: "astro-indexnow",
15
- import: "astro-indexnow",
16
- options: {
17
- key,
18
- siteUrl: siteUrl || undefined,
19
- },
20
- });
21
- }
1
+ import { defineIntegration } from "astro-integration-kit";
2
+ export default defineIntegration({
3
+ name: "astro-indexnow",
4
+ setup() {
5
+ return {
6
+ // REQUIRED by astro-integration-kit (even if unused)
7
+ hooks: {},
8
+ async setup({ prompt, addIntegration }) {
9
+ const key = await prompt({
10
+ name: "key",
11
+ type: "text",
12
+ message: "Enter your IndexNow API key:",
13
+ validate(value) {
14
+ return value ? true : "IndexNow key is required";
15
+ },
16
+ });
17
+ const siteUrl = await prompt({
18
+ name: "siteUrl",
19
+ type: "text",
20
+ message: "Site URL (e.g. https://example.com):",
21
+ });
22
+ addIntegration({
23
+ name: "indexNow",
24
+ import: "astro-indexnow",
25
+ options: {
26
+ key,
27
+ siteUrl: siteUrl || undefined,
28
+ },
29
+ });
30
+ },
31
+ };
32
+ },
33
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-indexnow",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Astro integration to submit changed pages to IndexNow automatically",
5
5
  "type": "module",
6
6
  "exports": {
@@ -21,9 +21,10 @@
21
21
  "seo"
22
22
  ],
23
23
  "peerDependencies": {
24
- "astro": "^4.0.0"
24
+ "astro": "^4.0.0 || ^5.0.0"
25
25
  },
26
26
  "devDependencies": {
27
+ "astro-integration-kit": "^0.19.1",
27
28
  "typescript": "^5.0.0"
28
29
  }
29
- }
30
+ }