@sonordev/site-kit 1.2.7
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 +376 -0
- package/dist/SetupWizard-Cki06kB0.d.mts +12 -0
- package/dist/SetupWizard-Cki06kB0.d.ts +12 -0
- package/dist/analytics/index.d.mts +93 -0
- package/dist/analytics/index.d.ts +93 -0
- package/dist/analytics/index.js +89 -0
- package/dist/analytics/index.js.map +1 -0
- package/dist/analytics/index.mjs +71 -0
- package/dist/analytics/index.mjs.map +1 -0
- package/dist/api-CWtoFJCO.d.mts +137 -0
- package/dist/api-CWtoFJCO.d.ts +137 -0
- package/dist/blog/index.d.mts +305 -0
- package/dist/blog/index.d.ts +305 -0
- package/dist/blog/index.js +1578 -0
- package/dist/blog/index.js.map +1 -0
- package/dist/blog/index.mjs +1562 -0
- package/dist/blog/index.mjs.map +1 -0
- package/dist/blog/server.d.mts +229 -0
- package/dist/blog/server.d.ts +229 -0
- package/dist/blog/server.js +692 -0
- package/dist/blog/server.js.map +1 -0
- package/dist/blog/server.mjs +666 -0
- package/dist/blog/server.mjs.map +1 -0
- package/dist/chunk-24277A3Q.mjs +968 -0
- package/dist/chunk-24277A3Q.mjs.map +1 -0
- package/dist/chunk-373TK6TZ.js +321 -0
- package/dist/chunk-373TK6TZ.js.map +1 -0
- package/dist/chunk-3MYZS6PD.js +30 -0
- package/dist/chunk-3MYZS6PD.js.map +1 -0
- package/dist/chunk-43GBM4SX.js +283 -0
- package/dist/chunk-43GBM4SX.js.map +1 -0
- package/dist/chunk-4XPGGLVP.mjs +53 -0
- package/dist/chunk-4XPGGLVP.mjs.map +1 -0
- package/dist/chunk-622GAQP5.js +2008 -0
- package/dist/chunk-622GAQP5.js.map +1 -0
- package/dist/chunk-6BIPAKL4.mjs +28 -0
- package/dist/chunk-6BIPAKL4.mjs.map +1 -0
- package/dist/chunk-6ZCISNAB.mjs +343 -0
- package/dist/chunk-6ZCISNAB.mjs.map +1 -0
- package/dist/chunk-72MQFHYJ.js +1429 -0
- package/dist/chunk-72MQFHYJ.js.map +1 -0
- package/dist/chunk-7557OTHW.js +62 -0
- package/dist/chunk-7557OTHW.js.map +1 -0
- package/dist/chunk-7FUV73JZ.js +981 -0
- package/dist/chunk-7FUV73JZ.js.map +1 -0
- package/dist/chunk-7RF6PVHA.mjs +324 -0
- package/dist/chunk-7RF6PVHA.mjs.map +1 -0
- package/dist/chunk-7RYCHO6D.mjs +134 -0
- package/dist/chunk-7RYCHO6D.mjs.map +1 -0
- package/dist/chunk-7UKPRW25.mjs +1999 -0
- package/dist/chunk-7UKPRW25.mjs.map +1 -0
- package/dist/chunk-7URAOG2M.js +14864 -0
- package/dist/chunk-7URAOG2M.js.map +1 -0
- package/dist/chunk-AFAO3TGS.mjs +810 -0
- package/dist/chunk-AFAO3TGS.mjs.map +1 -0
- package/dist/chunk-BYLIU6XG.js +343 -0
- package/dist/chunk-BYLIU6XG.js.map +1 -0
- package/dist/chunk-D63MUKZ6.mjs +4423 -0
- package/dist/chunk-D63MUKZ6.mjs.map +1 -0
- package/dist/chunk-DDKW2FNA.js +390 -0
- package/dist/chunk-DDKW2FNA.js.map +1 -0
- package/dist/chunk-DQYMKR27.mjs +341 -0
- package/dist/chunk-DQYMKR27.mjs.map +1 -0
- package/dist/chunk-DW5UJKHH.js +221 -0
- package/dist/chunk-DW5UJKHH.js.map +1 -0
- package/dist/chunk-EEZCR6E6.js +50 -0
- package/dist/chunk-EEZCR6E6.js.map +1 -0
- package/dist/chunk-GCJXQ4AG.mjs +59 -0
- package/dist/chunk-GCJXQ4AG.mjs.map +1 -0
- package/dist/chunk-JGNQK2G6.mjs +14845 -0
- package/dist/chunk-JGNQK2G6.mjs.map +1 -0
- package/dist/chunk-JTLOJLWQ.mjs +563 -0
- package/dist/chunk-JTLOJLWQ.mjs.map +1 -0
- package/dist/chunk-K23A4G76.mjs +202 -0
- package/dist/chunk-K23A4G76.mjs.map +1 -0
- package/dist/chunk-KKU3K7RG.js +336 -0
- package/dist/chunk-KKU3K7RG.js.map +1 -0
- package/dist/chunk-KUGMH4ZF.js +571 -0
- package/dist/chunk-KUGMH4ZF.js.map +1 -0
- package/dist/chunk-LBVWVP72.js +110 -0
- package/dist/chunk-LBVWVP72.js.map +1 -0
- package/dist/chunk-LIVWLY2P.js +138 -0
- package/dist/chunk-LIVWLY2P.js.map +1 -0
- package/dist/chunk-M2T6R7BA.mjs +1003 -0
- package/dist/chunk-M2T6R7BA.mjs.map +1 -0
- package/dist/chunk-MV3QN7PW.mjs +47 -0
- package/dist/chunk-MV3QN7PW.mjs.map +1 -0
- package/dist/chunk-OB7E654K.js +72 -0
- package/dist/chunk-OB7E654K.js.map +1 -0
- package/dist/chunk-OIIKTGRL.mjs +380 -0
- package/dist/chunk-OIIKTGRL.mjs.map +1 -0
- package/dist/chunk-P3UWIUJS.mjs +1427 -0
- package/dist/chunk-P3UWIUJS.mjs.map +1 -0
- package/dist/chunk-PKN27UMH.mjs +136 -0
- package/dist/chunk-PKN27UMH.mjs.map +1 -0
- package/dist/chunk-QXV4667R.mjs +105 -0
- package/dist/chunk-QXV4667R.mjs.map +1 -0
- package/dist/chunk-S7FRYNSU.mjs +315 -0
- package/dist/chunk-S7FRYNSU.mjs.map +1 -0
- package/dist/chunk-TFLQX7K7.mjs +68 -0
- package/dist/chunk-TFLQX7K7.mjs.map +1 -0
- package/dist/chunk-UWE5PCYJ.mjs +279 -0
- package/dist/chunk-UWE5PCYJ.mjs.map +1 -0
- package/dist/chunk-UYFDNX2F.js +4469 -0
- package/dist/chunk-UYFDNX2F.js.map +1 -0
- package/dist/chunk-W4PALSGM.js +350 -0
- package/dist/chunk-W4PALSGM.js.map +1 -0
- package/dist/chunk-WECQ6KOB.js +1008 -0
- package/dist/chunk-WECQ6KOB.js.map +1 -0
- package/dist/chunk-XQQWI6WB.js +814 -0
- package/dist/chunk-XQQWI6WB.js.map +1 -0
- package/dist/chunk-XZJOZJB6.js +140 -0
- package/dist/chunk-XZJOZJB6.js.map +1 -0
- package/dist/chunk-ZSMWDLMK.js +63 -0
- package/dist/chunk-ZSMWDLMK.js.map +1 -0
- package/dist/cli/index.js +37243 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/index.mjs +37209 -0
- package/dist/cli/index.mjs.map +1 -0
- package/dist/commerce/index.d.mts +170 -0
- package/dist/commerce/index.d.ts +170 -0
- package/dist/commerce/index.js +174 -0
- package/dist/commerce/index.js.map +1 -0
- package/dist/commerce/index.mjs +5 -0
- package/dist/commerce/index.mjs.map +1 -0
- package/dist/commerce/server.d.mts +107 -0
- package/dist/commerce/server.d.ts +107 -0
- package/dist/commerce/server.js +187 -0
- package/dist/commerce/server.js.map +1 -0
- package/dist/commerce/server.mjs +177 -0
- package/dist/commerce/server.mjs.map +1 -0
- package/dist/config/index.d.mts +43 -0
- package/dist/config/index.d.ts +43 -0
- package/dist/config/index.js +66 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/index.mjs +64 -0
- package/dist/config/index.mjs.map +1 -0
- package/dist/engage/index.d.mts +33 -0
- package/dist/engage/index.d.ts +33 -0
- package/dist/engage/index.js +22 -0
- package/dist/engage/index.js.map +1 -0
- package/dist/engage/index.mjs +5 -0
- package/dist/engage/index.mjs.map +1 -0
- package/dist/forms/index.d.mts +437 -0
- package/dist/forms/index.d.ts +437 -0
- package/dist/forms/index.js +1168 -0
- package/dist/forms/index.js.map +1 -0
- package/dist/forms/index.mjs +1142 -0
- package/dist/forms/index.mjs.map +1 -0
- package/dist/generators-2XKQMPKH.mjs +4 -0
- package/dist/generators-2XKQMPKH.mjs.map +1 -0
- package/dist/generators-DTMO36DV.js +33 -0
- package/dist/generators-DTMO36DV.js.map +1 -0
- package/dist/images/index.d.mts +4 -0
- package/dist/images/index.d.ts +4 -0
- package/dist/images/index.js +46 -0
- package/dist/images/index.js.map +1 -0
- package/dist/images/index.mjs +5 -0
- package/dist/images/index.mjs.map +1 -0
- package/dist/images/server.d.mts +69 -0
- package/dist/images/server.d.ts +69 -0
- package/dist/images/server.js +21 -0
- package/dist/images/server.js.map +1 -0
- package/dist/images/server.mjs +4 -0
- package/dist/images/server.mjs.map +1 -0
- package/dist/index.d.mts +846 -0
- package/dist/index.d.ts +846 -0
- package/dist/index.js +2623 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2416 -0
- package/dist/index.mjs.map +1 -0
- package/dist/layout/index.d.mts +53 -0
- package/dist/layout/index.d.ts +53 -0
- package/dist/layout/index.js +187 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/layout/index.mjs +185 -0
- package/dist/layout/index.mjs.map +1 -0
- package/dist/llms/index.d.mts +448 -0
- package/dist/llms/index.d.ts +448 -0
- package/dist/llms/index.js +581 -0
- package/dist/llms/index.js.map +1 -0
- package/dist/llms/index.mjs +529 -0
- package/dist/llms/index.mjs.map +1 -0
- package/dist/manifest/index.d.mts +62 -0
- package/dist/manifest/index.d.ts +62 -0
- package/dist/manifest/index.js +85 -0
- package/dist/manifest/index.js.map +1 -0
- package/dist/manifest/index.mjs +83 -0
- package/dist/manifest/index.mjs.map +1 -0
- package/dist/middleware/index.d.mts +63 -0
- package/dist/middleware/index.d.ts +63 -0
- package/dist/middleware/index.js +54 -0
- package/dist/middleware/index.js.map +1 -0
- package/dist/middleware/index.mjs +51 -0
- package/dist/middleware/index.mjs.map +1 -0
- package/dist/migrator-2MQHOFDQ.mjs +4 -0
- package/dist/migrator-2MQHOFDQ.mjs.map +1 -0
- package/dist/migrator-THJCF6MZ.js +37 -0
- package/dist/migrator-THJCF6MZ.js.map +1 -0
- package/dist/redirects/index.d.mts +78 -0
- package/dist/redirects/index.d.ts +78 -0
- package/dist/redirects/index.js +26 -0
- package/dist/redirects/index.js.map +1 -0
- package/dist/redirects/index.mjs +5 -0
- package/dist/redirects/index.mjs.map +1 -0
- package/dist/reputation/index.d.mts +57 -0
- package/dist/reputation/index.d.ts +57 -0
- package/dist/reputation/index.js +21 -0
- package/dist/reputation/index.js.map +1 -0
- package/dist/reputation/index.mjs +4 -0
- package/dist/reputation/index.mjs.map +1 -0
- package/dist/robots/index.d.mts +38 -0
- package/dist/robots/index.d.ts +38 -0
- package/dist/robots/index.js +52 -0
- package/dist/robots/index.js.map +1 -0
- package/dist/robots/index.mjs +50 -0
- package/dist/robots/index.mjs.map +1 -0
- package/dist/routing-B5XS-6_W.d.mts +118 -0
- package/dist/routing-DZYzyDHw.d.ts +118 -0
- package/dist/scanner-GAF5PO5F.js +53 -0
- package/dist/scanner-GAF5PO5F.js.map +1 -0
- package/dist/scanner-LKJKW7IT.mjs +4 -0
- package/dist/scanner-LKJKW7IT.mjs.map +1 -0
- package/dist/securityHeaders-nwZ6nP4g.d.mts +24 -0
- package/dist/securityHeaders-nwZ6nP4g.d.ts +24 -0
- package/dist/seo/index.d.mts +600 -0
- package/dist/seo/index.d.ts +600 -0
- package/dist/seo/index.js +883 -0
- package/dist/seo/index.js.map +1 -0
- package/dist/seo/index.mjs +773 -0
- package/dist/seo/index.mjs.map +1 -0
- package/dist/seo/register-sitemap-cli.js +151 -0
- package/dist/seo/register-sitemap-cli.js.map +1 -0
- package/dist/seo/register-sitemap-cli.mjs +144 -0
- package/dist/seo/register-sitemap-cli.mjs.map +1 -0
- package/dist/seo/server.d.mts +107 -0
- package/dist/seo/server.d.ts +107 -0
- package/dist/seo/server.js +207 -0
- package/dist/seo/server.js.map +1 -0
- package/dist/seo/server.mjs +186 -0
- package/dist/seo/server.mjs.map +1 -0
- package/dist/server-api-EWXKOQZA.mjs +4 -0
- package/dist/server-api-EWXKOQZA.mjs.map +1 -0
- package/dist/server-api-GJPNRYUP.js +81 -0
- package/dist/server-api-GJPNRYUP.js.map +1 -0
- package/dist/setup/client.d.mts +60 -0
- package/dist/setup/client.d.ts +60 -0
- package/dist/setup/client.js +31 -0
- package/dist/setup/client.js.map +1 -0
- package/dist/setup/client.mjs +6 -0
- package/dist/setup/client.mjs.map +1 -0
- package/dist/setup/index.d.mts +5 -0
- package/dist/setup/index.d.ts +5 -0
- package/dist/setup/index.js +35 -0
- package/dist/setup/index.js.map +1 -0
- package/dist/setup/index.mjs +6 -0
- package/dist/setup/index.mjs.map +1 -0
- package/dist/setup/server.d.mts +14 -0
- package/dist/setup/server.d.ts +14 -0
- package/dist/setup/server.js +13 -0
- package/dist/setup/server.js.map +1 -0
- package/dist/setup/server.mjs +4 -0
- package/dist/setup/server.mjs.map +1 -0
- package/dist/site-config/index.d.mts +24 -0
- package/dist/site-config/index.d.ts +24 -0
- package/dist/site-config/index.js +17 -0
- package/dist/site-config/index.js.map +1 -0
- package/dist/site-config/index.mjs +4 -0
- package/dist/site-config/index.mjs.map +1 -0
- package/dist/sitemap/index.d.mts +96 -0
- package/dist/sitemap/index.d.ts +96 -0
- package/dist/sitemap/index.js +288 -0
- package/dist/sitemap/index.js.map +1 -0
- package/dist/sitemap/index.mjs +285 -0
- package/dist/sitemap/index.mjs.map +1 -0
- package/dist/socket-loader-J26QHHOB.js +16 -0
- package/dist/socket-loader-J26QHHOB.js.map +1 -0
- package/dist/socket-loader-R7S2YJ2J.mjs +14 -0
- package/dist/socket-loader-R7S2YJ2J.mjs.map +1 -0
- package/dist/types-0dmq3k20.d.mts +168 -0
- package/dist/types-0dmq3k20.d.ts +168 -0
- package/dist/types-Blb2QNkV.d.mts +263 -0
- package/dist/types-Blb2QNkV.d.ts +263 -0
- package/dist/types-BnCwwUX3.d.mts +250 -0
- package/dist/types-BnCwwUX3.d.ts +250 -0
- package/dist/types-CGlnp43R.d.mts +312 -0
- package/dist/types-CGlnp43R.d.ts +312 -0
- package/dist/types-D08004rU.d.mts +179 -0
- package/dist/types-D08004rU.d.ts +179 -0
- package/dist/types-DNSYU7qI.d.mts +127 -0
- package/dist/types-DNSYU7qI.d.ts +127 -0
- package/dist/types-KZP_VWZp.d.mts +266 -0
- package/dist/types-KZP_VWZp.d.ts +266 -0
- package/dist/useEventModal-BVTx69XE.d.mts +274 -0
- package/dist/useEventModal-Dx1dItTJ.d.ts +274 -0
- package/dist/web-vitals-444RLW3B.js +252 -0
- package/dist/web-vitals-444RLW3B.js.map +1 -0
- package/dist/web-vitals-KPICZIEF.mjs +241 -0
- package/dist/web-vitals-KPICZIEF.mjs.map +1 -0
- package/package.json +192 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkDW5UJKHH_js = require('./chunk-DW5UJKHH.js');
|
|
4
|
+
require('./chunk-ZSMWDLMK.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "ensureMetadata", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkDW5UJKHH_js.ensureMetadata; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "getABTest", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkDW5UJKHH_js.getABTest; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "getContentBlock", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkDW5UJKHH_js.getContentBlock; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "getEntities", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkDW5UJKHH_js.getEntities; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "getEntityEnhancedSchema", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunkDW5UJKHH_js.getEntityEnhancedSchema; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "getFAQData", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunkDW5UJKHH_js.getFAQData; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "getInternalLinks", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return chunkDW5UJKHH_js.getInternalLinks; }
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "getManagedScripts", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return chunkDW5UJKHH_js.getManagedScripts; }
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "getPrimaryEntity", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () { return chunkDW5UJKHH_js.getPrimaryEntity; }
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "getRedirectData", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () { return chunkDW5UJKHH_js.getRedirectData; }
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "getRobotsData", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () { return chunkDW5UJKHH_js.getRobotsData; }
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, "getSEOPageData", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () { return chunkDW5UJKHH_js.getSEOPageData; }
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "getSchemaMarkups", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () { return chunkDW5UJKHH_js.getSchemaMarkups; }
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "getSitemapEntries", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () { return chunkDW5UJKHH_js.getSitemapEntries; }
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(exports, "getVisibilityScore", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () { return chunkDW5UJKHH_js.getVisibilityScore; }
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "getVisibilitySummary", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function () { return chunkDW5UJKHH_js.getVisibilitySummary; }
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "recordABImpression", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () { return chunkDW5UJKHH_js.recordABImpression; }
|
|
75
|
+
});
|
|
76
|
+
Object.defineProperty(exports, "registerSitemap", {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () { return chunkDW5UJKHH_js.registerSitemap; }
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=server-api-GJPNRYUP.js.map
|
|
81
|
+
//# sourceMappingURL=server-api-GJPNRYUP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"server-api-GJPNRYUP.js"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export { S as SetupWizard, S as UptradeSetup } from '../SetupWizard-Cki06kB0.mjs';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Integration Code Generator
|
|
6
|
+
*
|
|
7
|
+
* Generates site-kit integration code snippets based on enabled modules.
|
|
8
|
+
* Used by SetupWizard and can be called standalone.
|
|
9
|
+
*/
|
|
10
|
+
interface IntegrationSnippet {
|
|
11
|
+
module: string;
|
|
12
|
+
snippetType: 'install' | 'layout' | 'component' | 'page' | 'api-route' | 'env';
|
|
13
|
+
title: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
filePath?: string;
|
|
16
|
+
code: string;
|
|
17
|
+
language: 'typescript' | 'tsx' | 'bash' | 'env';
|
|
18
|
+
order: number;
|
|
19
|
+
required: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface GeneratorContext {
|
|
22
|
+
projectId: string;
|
|
23
|
+
projectName?: string;
|
|
24
|
+
apiUrl?: string;
|
|
25
|
+
enabledModules: string[];
|
|
26
|
+
brand?: {
|
|
27
|
+
primaryColor?: string;
|
|
28
|
+
secondaryColor?: string;
|
|
29
|
+
businessName?: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Generate all integration code snippets for enabled modules
|
|
34
|
+
*/
|
|
35
|
+
declare function generateIntegrationCode(context: GeneratorContext): IntegrationSnippet[];
|
|
36
|
+
/**
|
|
37
|
+
* Get snippets grouped by module
|
|
38
|
+
*/
|
|
39
|
+
declare function getSnippetsByModule(snippets: IntegrationSnippet[]): Record<string, IntegrationSnippet[]>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* IntegrationCodeView - Display generated site-kit integration code
|
|
43
|
+
*
|
|
44
|
+
* Shows code snippets grouped by module with copy functionality.
|
|
45
|
+
* Can be used in setup wizards or admin dashboards.
|
|
46
|
+
*/
|
|
47
|
+
interface IntegrationCodeViewProps {
|
|
48
|
+
projectId: string;
|
|
49
|
+
enabledModules: string[];
|
|
50
|
+
apiUrl?: string;
|
|
51
|
+
brand?: {
|
|
52
|
+
primaryColor?: string;
|
|
53
|
+
businessName?: string;
|
|
54
|
+
};
|
|
55
|
+
className?: string;
|
|
56
|
+
onCopy?: (code: string, title: string) => void;
|
|
57
|
+
}
|
|
58
|
+
declare function IntegrationCodeView({ projectId, enabledModules, apiUrl, brand, className, onCopy, }: IntegrationCodeViewProps): react_jsx_runtime.JSX.Element;
|
|
59
|
+
|
|
60
|
+
export { type GeneratorContext, IntegrationCodeView, type IntegrationCodeViewProps, type IntegrationSnippet, generateIntegrationCode, getSnippetsByModule };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export { S as SetupWizard, S as UptradeSetup } from '../SetupWizard-Cki06kB0.js';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Integration Code Generator
|
|
6
|
+
*
|
|
7
|
+
* Generates site-kit integration code snippets based on enabled modules.
|
|
8
|
+
* Used by SetupWizard and can be called standalone.
|
|
9
|
+
*/
|
|
10
|
+
interface IntegrationSnippet {
|
|
11
|
+
module: string;
|
|
12
|
+
snippetType: 'install' | 'layout' | 'component' | 'page' | 'api-route' | 'env';
|
|
13
|
+
title: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
filePath?: string;
|
|
16
|
+
code: string;
|
|
17
|
+
language: 'typescript' | 'tsx' | 'bash' | 'env';
|
|
18
|
+
order: number;
|
|
19
|
+
required: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface GeneratorContext {
|
|
22
|
+
projectId: string;
|
|
23
|
+
projectName?: string;
|
|
24
|
+
apiUrl?: string;
|
|
25
|
+
enabledModules: string[];
|
|
26
|
+
brand?: {
|
|
27
|
+
primaryColor?: string;
|
|
28
|
+
secondaryColor?: string;
|
|
29
|
+
businessName?: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Generate all integration code snippets for enabled modules
|
|
34
|
+
*/
|
|
35
|
+
declare function generateIntegrationCode(context: GeneratorContext): IntegrationSnippet[];
|
|
36
|
+
/**
|
|
37
|
+
* Get snippets grouped by module
|
|
38
|
+
*/
|
|
39
|
+
declare function getSnippetsByModule(snippets: IntegrationSnippet[]): Record<string, IntegrationSnippet[]>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* IntegrationCodeView - Display generated site-kit integration code
|
|
43
|
+
*
|
|
44
|
+
* Shows code snippets grouped by module with copy functionality.
|
|
45
|
+
* Can be used in setup wizards or admin dashboards.
|
|
46
|
+
*/
|
|
47
|
+
interface IntegrationCodeViewProps {
|
|
48
|
+
projectId: string;
|
|
49
|
+
enabledModules: string[];
|
|
50
|
+
apiUrl?: string;
|
|
51
|
+
brand?: {
|
|
52
|
+
primaryColor?: string;
|
|
53
|
+
businessName?: string;
|
|
54
|
+
};
|
|
55
|
+
className?: string;
|
|
56
|
+
onCopy?: (code: string, title: string) => void;
|
|
57
|
+
}
|
|
58
|
+
declare function IntegrationCodeView({ projectId, enabledModules, apiUrl, brand, className, onCopy, }: IntegrationCodeViewProps): react_jsx_runtime.JSX.Element;
|
|
59
|
+
|
|
60
|
+
export { type GeneratorContext, IntegrationCodeView, type IntegrationCodeViewProps, type IntegrationSnippet, generateIntegrationCode, getSnippetsByModule };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkXQQWI6WB_js = require('../chunk-XQQWI6WB.js');
|
|
5
|
+
var chunk72MQFHYJ_js = require('../chunk-72MQFHYJ.js');
|
|
6
|
+
require('../chunk-ZSMWDLMK.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "IntegrationCodeView", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return chunkXQQWI6WB_js.IntegrationCodeView; }
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "generateIntegrationCode", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return chunkXQQWI6WB_js.generateIntegrationCode; }
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "getSnippetsByModule", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return chunkXQQWI6WB_js.getSnippetsByModule; }
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, "SetupWizard", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return chunk72MQFHYJ_js.SetupWizard; }
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "UptradeSetup", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () { return chunk72MQFHYJ_js.SetupWizard; }
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=client.js.map
|
|
31
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"client.js"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
export { IntegrationCodeView, generateIntegrationCode, getSnippetsByModule } from '../chunk-AFAO3TGS.mjs';
|
|
3
|
+
export { SetupWizard, SetupWizard as UptradeSetup } from '../chunk-P3UWIUJS.mjs';
|
|
4
|
+
import '../chunk-4XPGGLVP.mjs';
|
|
5
|
+
//# sourceMappingURL=client.mjs.map
|
|
6
|
+
//# sourceMappingURL=client.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"client.mjs"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { S as SetupWizard, S as UptradeSetup } from '../SetupWizard-Cki06kB0.mjs';
|
|
2
|
+
export { handleRequest } from './server.mjs';
|
|
3
|
+
export { GeneratorContext, IntegrationCodeView, IntegrationCodeViewProps, IntegrationSnippet, generateIntegrationCode, getSnippetsByModule } from './client.mjs';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'next/server';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { S as SetupWizard, S as UptradeSetup } from '../SetupWizard-Cki06kB0.js';
|
|
2
|
+
export { handleRequest } from './server.js';
|
|
3
|
+
export { GeneratorContext, IntegrationCodeView, IntegrationCodeViewProps, IntegrationSnippet, generateIntegrationCode, getSnippetsByModule } from './client.js';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'next/server';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkXQQWI6WB_js = require('../chunk-XQQWI6WB.js');
|
|
4
|
+
var chunkBYLIU6XG_js = require('../chunk-BYLIU6XG.js');
|
|
5
|
+
var chunk72MQFHYJ_js = require('../chunk-72MQFHYJ.js');
|
|
6
|
+
require('../chunk-ZSMWDLMK.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "IntegrationCodeView", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return chunkXQQWI6WB_js.IntegrationCodeView; }
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "generateIntegrationCode", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return chunkXQQWI6WB_js.generateIntegrationCode; }
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "getSnippetsByModule", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return chunkXQQWI6WB_js.getSnippetsByModule; }
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, "handleRequest", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return chunkBYLIU6XG_js.handleRequest; }
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "SetupWizard", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () { return chunk72MQFHYJ_js.SetupWizard; }
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "UptradeSetup", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () { return chunk72MQFHYJ_js.SetupWizard; }
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { IntegrationCodeView, generateIntegrationCode, getSnippetsByModule } from '../chunk-AFAO3TGS.mjs';
|
|
2
|
+
export { handleRequest } from '../chunk-DQYMKR27.mjs';
|
|
3
|
+
export { SetupWizard, SetupWizard as UptradeSetup } from '../chunk-P3UWIUJS.mjs';
|
|
4
|
+
import '../chunk-4XPGGLVP.mjs';
|
|
5
|
+
//# sourceMappingURL=index.mjs.map
|
|
6
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Setup Wizard API Handlers
|
|
5
|
+
*
|
|
6
|
+
* These are Next.js API route handlers that the SetupWizard component calls.
|
|
7
|
+
* They run on the server and have access to fs for code generation.
|
|
8
|
+
*
|
|
9
|
+
* Usage: Copy these to your app/_uptrade/api/ folder
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
declare function handleRequest(req: NextRequest, route: string): Promise<NextResponse>;
|
|
13
|
+
|
|
14
|
+
export { handleRequest };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Setup Wizard API Handlers
|
|
5
|
+
*
|
|
6
|
+
* These are Next.js API route handlers that the SetupWizard component calls.
|
|
7
|
+
* They run on the server and have access to fs for code generation.
|
|
8
|
+
*
|
|
9
|
+
* Usage: Copy these to your app/_uptrade/api/ folder
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
declare function handleRequest(req: NextRequest, route: string): Promise<NextResponse>;
|
|
13
|
+
|
|
14
|
+
export { handleRequest };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkBYLIU6XG_js = require('../chunk-BYLIU6XG.js');
|
|
4
|
+
require('../chunk-ZSMWDLMK.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "handleRequest", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkBYLIU6XG_js.handleRequest; }
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=server.js.map
|
|
13
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"server.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"server.mjs"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Site config from Portal (project-info) by API key.
|
|
3
|
+
* Resolves site_url and domain so consumers only need NEXT_PUBLIC_UPTRADE_API_KEY.
|
|
4
|
+
*/
|
|
5
|
+
interface SiteConfig {
|
|
6
|
+
site_url: string;
|
|
7
|
+
domain: string;
|
|
8
|
+
}
|
|
9
|
+
interface GetSiteConfigOptions {
|
|
10
|
+
apiKey?: string;
|
|
11
|
+
apiUrl?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Fetch site_url and domain from Portal project-info for the given API key.
|
|
15
|
+
* Uses in-memory cache (TTL 10 min) keyed by apiKey.
|
|
16
|
+
* Safe for Edge (middleware) and Node (route handlers).
|
|
17
|
+
*/
|
|
18
|
+
declare function getSiteConfig(options?: GetSiteConfigOptions): Promise<SiteConfig | null>;
|
|
19
|
+
/**
|
|
20
|
+
* Clear in-memory site config cache (e.g. for tests).
|
|
21
|
+
*/
|
|
22
|
+
declare function clearSiteConfigCache(): void;
|
|
23
|
+
|
|
24
|
+
export { type GetSiteConfigOptions, type SiteConfig, clearSiteConfigCache, getSiteConfig };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Site config from Portal (project-info) by API key.
|
|
3
|
+
* Resolves site_url and domain so consumers only need NEXT_PUBLIC_UPTRADE_API_KEY.
|
|
4
|
+
*/
|
|
5
|
+
interface SiteConfig {
|
|
6
|
+
site_url: string;
|
|
7
|
+
domain: string;
|
|
8
|
+
}
|
|
9
|
+
interface GetSiteConfigOptions {
|
|
10
|
+
apiKey?: string;
|
|
11
|
+
apiUrl?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Fetch site_url and domain from Portal project-info for the given API key.
|
|
15
|
+
* Uses in-memory cache (TTL 10 min) keyed by apiKey.
|
|
16
|
+
* Safe for Edge (middleware) and Node (route handlers).
|
|
17
|
+
*/
|
|
18
|
+
declare function getSiteConfig(options?: GetSiteConfigOptions): Promise<SiteConfig | null>;
|
|
19
|
+
/**
|
|
20
|
+
* Clear in-memory site config cache (e.g. for tests).
|
|
21
|
+
*/
|
|
22
|
+
declare function clearSiteConfigCache(): void;
|
|
23
|
+
|
|
24
|
+
export { type GetSiteConfigOptions, type SiteConfig, clearSiteConfigCache, getSiteConfig };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk7557OTHW_js = require('../chunk-7557OTHW.js');
|
|
4
|
+
require('../chunk-ZSMWDLMK.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "clearSiteConfigCache", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunk7557OTHW_js.clearSiteConfigCache; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "getSiteConfig", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunk7557OTHW_js.getSiteConfig; }
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { L as LLMsDataResponse } from '../types-Blb2QNkV.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @sonordev/site-kit - Sitemap Generator
|
|
5
|
+
*
|
|
6
|
+
* Automatically generates sitemap.xml from Next.js app directory structure.
|
|
7
|
+
* Works at build time to discover all pages and sync them to Portal API.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* // app/sitemap.ts
|
|
12
|
+
* import { createSitemap } from '@sonordev/site-kit/sitemap'
|
|
13
|
+
*
|
|
14
|
+
* export default createSitemap({
|
|
15
|
+
* baseUrl: 'https://example.com',
|
|
16
|
+
* // Optional: exclude patterns
|
|
17
|
+
* exclude: ['/admin/*', '/api/*'],
|
|
18
|
+
* // Optional: additional dynamic routes
|
|
19
|
+
* additionalPaths: async () => [
|
|
20
|
+
* { path: '/blog/post-1', priority: 0.7 },
|
|
21
|
+
* ]
|
|
22
|
+
* })
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
interface SitemapEntry {
|
|
26
|
+
url: string;
|
|
27
|
+
lastModified?: Date | string;
|
|
28
|
+
changeFrequency?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
|
|
29
|
+
priority?: number;
|
|
30
|
+
}
|
|
31
|
+
interface SitemapConfig {
|
|
32
|
+
/** Base URL for the site (optional when apiKey is set; then resolved from Portal project-info) */
|
|
33
|
+
baseUrl?: string;
|
|
34
|
+
/** Glob patterns to exclude (e.g., ['/admin/*', '/api/*']) */
|
|
35
|
+
exclude?: string[];
|
|
36
|
+
/** Default priority for pages */
|
|
37
|
+
defaultPriority?: number;
|
|
38
|
+
/** Default change frequency */
|
|
39
|
+
defaultChangeFrequency?: SitemapEntry['changeFrequency'];
|
|
40
|
+
/** Additional paths to include (for dynamic routes) */
|
|
41
|
+
additionalPaths?: () => Promise<Array<{
|
|
42
|
+
path: string;
|
|
43
|
+
priority?: number;
|
|
44
|
+
changeFrequency?: SitemapEntry['changeFrequency'];
|
|
45
|
+
}>>;
|
|
46
|
+
/** Priority overrides by path pattern */
|
|
47
|
+
priorities?: Record<string, number>;
|
|
48
|
+
/** Portal API URL for syncing (defaults to NEXT_PUBLIC_UPTRADE_API_URL or https://api.uptrademedia.com) */
|
|
49
|
+
apiUrl?: string;
|
|
50
|
+
/** Portal API key for syncing (defaults to NEXT_PUBLIC_UPTRADE_API_KEY) */
|
|
51
|
+
apiKey?: string;
|
|
52
|
+
/** Disable auto-sync to Portal API */
|
|
53
|
+
disableSync?: boolean;
|
|
54
|
+
/** When true, await meta optimization before build completes (for build-time llms.txt with managed_llm_schema) */
|
|
55
|
+
awaitMetaOptimization?: boolean;
|
|
56
|
+
/** When true (default when API key present), write AI-optimized llms.txt to public/llms.txt after sitemap sync */
|
|
57
|
+
optimizedLLMsTxt?: boolean;
|
|
58
|
+
/** When true with optimizedLLMsTxt, also write public/llms-full.txt */
|
|
59
|
+
optimizedLLMsFullTxt?: boolean;
|
|
60
|
+
/** When Portal returns empty services, use this to supply local site data for llms.txt */
|
|
61
|
+
getLocalData?: () => Promise<LLMsDataResponse | null>;
|
|
62
|
+
/** Use Signal AI visibility scores to compute page priority (40% visibility + 30% depth + 30% base) */
|
|
63
|
+
intelligentPriority?: boolean;
|
|
64
|
+
}
|
|
65
|
+
interface SyncSitemapOptions {
|
|
66
|
+
/** Trigger Signal AI meta optimization after sync */
|
|
67
|
+
optimizeMeta?: boolean;
|
|
68
|
+
/** When true, wait for meta optimization to complete (for build-time llms.txt) */
|
|
69
|
+
awaitMeta?: boolean;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Sync sitemap entries to Portal API
|
|
73
|
+
* Called automatically by createSitemap at build time
|
|
74
|
+
*/
|
|
75
|
+
declare function syncSitemapToPortal(entries: SitemapEntry[], apiUrl: string, apiKey: string, options?: SyncSitemapOptions): Promise<{
|
|
76
|
+
success: boolean;
|
|
77
|
+
created: number;
|
|
78
|
+
updated: number;
|
|
79
|
+
}>;
|
|
80
|
+
/**
|
|
81
|
+
* Create a sitemap generator function for Next.js
|
|
82
|
+
* Automatically syncs to Portal API at build time.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* // app/sitemap.ts
|
|
87
|
+
* import { createSitemap } from '@sonordev/site-kit/sitemap'
|
|
88
|
+
*
|
|
89
|
+
* export default createSitemap({
|
|
90
|
+
* baseUrl: 'https://example.com'
|
|
91
|
+
* })
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
declare function createSitemap(config: SitemapConfig): () => SitemapEntry[] | Promise<SitemapEntry[]>;
|
|
95
|
+
|
|
96
|
+
export { type SitemapConfig, type SitemapEntry, type SyncSitemapOptions, createSitemap, syncSitemapToPortal };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { L as LLMsDataResponse } from '../types-Blb2QNkV.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @sonordev/site-kit - Sitemap Generator
|
|
5
|
+
*
|
|
6
|
+
* Automatically generates sitemap.xml from Next.js app directory structure.
|
|
7
|
+
* Works at build time to discover all pages and sync them to Portal API.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* // app/sitemap.ts
|
|
12
|
+
* import { createSitemap } from '@sonordev/site-kit/sitemap'
|
|
13
|
+
*
|
|
14
|
+
* export default createSitemap({
|
|
15
|
+
* baseUrl: 'https://example.com',
|
|
16
|
+
* // Optional: exclude patterns
|
|
17
|
+
* exclude: ['/admin/*', '/api/*'],
|
|
18
|
+
* // Optional: additional dynamic routes
|
|
19
|
+
* additionalPaths: async () => [
|
|
20
|
+
* { path: '/blog/post-1', priority: 0.7 },
|
|
21
|
+
* ]
|
|
22
|
+
* })
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
interface SitemapEntry {
|
|
26
|
+
url: string;
|
|
27
|
+
lastModified?: Date | string;
|
|
28
|
+
changeFrequency?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
|
|
29
|
+
priority?: number;
|
|
30
|
+
}
|
|
31
|
+
interface SitemapConfig {
|
|
32
|
+
/** Base URL for the site (optional when apiKey is set; then resolved from Portal project-info) */
|
|
33
|
+
baseUrl?: string;
|
|
34
|
+
/** Glob patterns to exclude (e.g., ['/admin/*', '/api/*']) */
|
|
35
|
+
exclude?: string[];
|
|
36
|
+
/** Default priority for pages */
|
|
37
|
+
defaultPriority?: number;
|
|
38
|
+
/** Default change frequency */
|
|
39
|
+
defaultChangeFrequency?: SitemapEntry['changeFrequency'];
|
|
40
|
+
/** Additional paths to include (for dynamic routes) */
|
|
41
|
+
additionalPaths?: () => Promise<Array<{
|
|
42
|
+
path: string;
|
|
43
|
+
priority?: number;
|
|
44
|
+
changeFrequency?: SitemapEntry['changeFrequency'];
|
|
45
|
+
}>>;
|
|
46
|
+
/** Priority overrides by path pattern */
|
|
47
|
+
priorities?: Record<string, number>;
|
|
48
|
+
/** Portal API URL for syncing (defaults to NEXT_PUBLIC_UPTRADE_API_URL or https://api.uptrademedia.com) */
|
|
49
|
+
apiUrl?: string;
|
|
50
|
+
/** Portal API key for syncing (defaults to NEXT_PUBLIC_UPTRADE_API_KEY) */
|
|
51
|
+
apiKey?: string;
|
|
52
|
+
/** Disable auto-sync to Portal API */
|
|
53
|
+
disableSync?: boolean;
|
|
54
|
+
/** When true, await meta optimization before build completes (for build-time llms.txt with managed_llm_schema) */
|
|
55
|
+
awaitMetaOptimization?: boolean;
|
|
56
|
+
/** When true (default when API key present), write AI-optimized llms.txt to public/llms.txt after sitemap sync */
|
|
57
|
+
optimizedLLMsTxt?: boolean;
|
|
58
|
+
/** When true with optimizedLLMsTxt, also write public/llms-full.txt */
|
|
59
|
+
optimizedLLMsFullTxt?: boolean;
|
|
60
|
+
/** When Portal returns empty services, use this to supply local site data for llms.txt */
|
|
61
|
+
getLocalData?: () => Promise<LLMsDataResponse | null>;
|
|
62
|
+
/** Use Signal AI visibility scores to compute page priority (40% visibility + 30% depth + 30% base) */
|
|
63
|
+
intelligentPriority?: boolean;
|
|
64
|
+
}
|
|
65
|
+
interface SyncSitemapOptions {
|
|
66
|
+
/** Trigger Signal AI meta optimization after sync */
|
|
67
|
+
optimizeMeta?: boolean;
|
|
68
|
+
/** When true, wait for meta optimization to complete (for build-time llms.txt) */
|
|
69
|
+
awaitMeta?: boolean;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Sync sitemap entries to Portal API
|
|
73
|
+
* Called automatically by createSitemap at build time
|
|
74
|
+
*/
|
|
75
|
+
declare function syncSitemapToPortal(entries: SitemapEntry[], apiUrl: string, apiKey: string, options?: SyncSitemapOptions): Promise<{
|
|
76
|
+
success: boolean;
|
|
77
|
+
created: number;
|
|
78
|
+
updated: number;
|
|
79
|
+
}>;
|
|
80
|
+
/**
|
|
81
|
+
* Create a sitemap generator function for Next.js
|
|
82
|
+
* Automatically syncs to Portal API at build time.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* // app/sitemap.ts
|
|
87
|
+
* import { createSitemap } from '@sonordev/site-kit/sitemap'
|
|
88
|
+
*
|
|
89
|
+
* export default createSitemap({
|
|
90
|
+
* baseUrl: 'https://example.com'
|
|
91
|
+
* })
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
declare function createSitemap(config: SitemapConfig): () => SitemapEntry[] | Promise<SitemapEntry[]>;
|
|
95
|
+
|
|
96
|
+
export { type SitemapConfig, type SitemapEntry, type SyncSitemapOptions, createSitemap, syncSitemapToPortal };
|