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 +4 -1
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +33 -21
- package/package.json +4 -3
package/dist/setup.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
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
|
package/dist/setup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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.
|
|
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
|
+
}
|