@dogsbay/adapter-posthog 0.0.0-stage → 0.2.0-beta.136
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/index.d.ts +11 -0
- package/dist/index.js +241 -0
- package/dist/nav.d.ts +22 -0
- package/dist/nav.js +123 -0
- package/package.json +27 -3
- package/README.md +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PostHog site adapter for @dogsbay/format-gatsby.
|
|
3
|
+
*
|
|
4
|
+
* Two jobs (the generic importer owns the rest): map PostHog's
|
|
5
|
+
* globally-injected MDX components to Dogsbay directives (or strip +
|
|
6
|
+
* ledger the interactive long tail), and extract the nav from
|
|
7
|
+
* `src/navs/index.js`.
|
|
8
|
+
*/
|
|
9
|
+
import type { GatsbyAdapter } from "@dogsbay/format-gatsby";
|
|
10
|
+
export declare const posthogAdapter: GatsbyAdapter;
|
|
11
|
+
export default posthogAdapter;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PostHog site adapter for @dogsbay/format-gatsby.
|
|
3
|
+
*
|
|
4
|
+
* Two jobs (the generic importer owns the rest): map PostHog's
|
|
5
|
+
* globally-injected MDX components to Dogsbay directives (or strip +
|
|
6
|
+
* ledger the interactive long tail), and extract the nav from
|
|
7
|
+
* `src/navs/index.js`.
|
|
8
|
+
*/
|
|
9
|
+
import { extractPosthogNav } from "./nav.js";
|
|
10
|
+
/** PostHog CalloutBox `type` → Dogsbay callout kind. */
|
|
11
|
+
const CALLOUT_TYPE = {
|
|
12
|
+
fyi: "note",
|
|
13
|
+
info: "info",
|
|
14
|
+
action: "tip",
|
|
15
|
+
tip: "tip",
|
|
16
|
+
caution: "caution",
|
|
17
|
+
warning: "warning",
|
|
18
|
+
danger: "danger",
|
|
19
|
+
task: "note",
|
|
20
|
+
};
|
|
21
|
+
/** A remote-image component (`imageLight`/`image`/`src` → an image node). */
|
|
22
|
+
function imageMapping() {
|
|
23
|
+
return {
|
|
24
|
+
type: "image",
|
|
25
|
+
container: false,
|
|
26
|
+
propsFromAttrs: (a) => ({
|
|
27
|
+
src: a.imageLight ?? a.imageDark ?? a.image ?? a.src ?? "",
|
|
28
|
+
alt: a.alt ?? "",
|
|
29
|
+
}),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/** Drop a component entirely (wrapper + inner), recorded in the ledger. */
|
|
33
|
+
const dropAll = {
|
|
34
|
+
type: "callout",
|
|
35
|
+
container: true,
|
|
36
|
+
strip: true,
|
|
37
|
+
children: "ignore",
|
|
38
|
+
};
|
|
39
|
+
/** Unwrap a component: drop the wrapper, keep its inner blocks. */
|
|
40
|
+
const unwrap = {
|
|
41
|
+
type: "callout",
|
|
42
|
+
container: true,
|
|
43
|
+
strip: true,
|
|
44
|
+
children: "blocks",
|
|
45
|
+
};
|
|
46
|
+
/** Emit a fixed code block (for near-static data-driven components). */
|
|
47
|
+
function codeNode(code, language = "bash") {
|
|
48
|
+
return { type: "code", container: false, toNode: () => ({ type: "code", props: { code, language } }) };
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Placeholder for a data-driven React component that has NO static
|
|
52
|
+
* markdown source (logo grids, generated snippets). Honest + ledgered:
|
|
53
|
+
* the panel shows what's missing rather than rendering blank.
|
|
54
|
+
*/
|
|
55
|
+
function placeholder(label) {
|
|
56
|
+
return {
|
|
57
|
+
type: "callout",
|
|
58
|
+
container: false,
|
|
59
|
+
toNode: () => ({
|
|
60
|
+
type: "callout",
|
|
61
|
+
props: { type: "info" },
|
|
62
|
+
children: [
|
|
63
|
+
{
|
|
64
|
+
// `type: "html"` so the markup survives both the direct
|
|
65
|
+
// tree→astro serializer and the dogsbay-md round-trip; a
|
|
66
|
+
// paragraph's `.html` is only honored on the latter.
|
|
67
|
+
type: "html",
|
|
68
|
+
html: `<p><strong>${label}</strong> is generated by an interactive component on posthog.com and has no static source in the docs — see the <a href="https://posthog.com/docs">live docs</a>.</p>`,
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
}),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
const components = {
|
|
75
|
+
// --- clean directive maps (the 80% win) ---
|
|
76
|
+
ProductScreenshot: imageMapping(),
|
|
77
|
+
ProductVideo: imageMapping(),
|
|
78
|
+
CalloutBox: {
|
|
79
|
+
type: "callout",
|
|
80
|
+
container: true,
|
|
81
|
+
children: "blocks",
|
|
82
|
+
propsFromAttrs: (a) => ({ type: CALLOUT_TYPE[(a.type ?? "").toLowerCase()] ?? "note" }),
|
|
83
|
+
},
|
|
84
|
+
Caption: { type: "paragraph", container: true, children: "blocks" },
|
|
85
|
+
// MultiLanguage wraps language-labelled fences; unwrap to keep the code.
|
|
86
|
+
MultiLanguage: unwrap,
|
|
87
|
+
// --- interactive / data-driven long tail: drop, ledgered ---
|
|
88
|
+
QuestLog: dropAll,
|
|
89
|
+
QuestLogItem: dropAll,
|
|
90
|
+
OSButton: dropAll,
|
|
91
|
+
PostHogProvider: unwrap,
|
|
92
|
+
PostHogFeature: unwrap,
|
|
93
|
+
PostHogPageView: dropAll,
|
|
94
|
+
OnboardingContentWrapper: unwrap,
|
|
95
|
+
CallToAction: dropAll,
|
|
96
|
+
PromptExample: unwrap,
|
|
97
|
+
SolvedQuestions: dropAll,
|
|
98
|
+
AskAIInput: dropAll,
|
|
99
|
+
ProductChangelog: dropAll,
|
|
100
|
+
SettingProperties: dropAll,
|
|
101
|
+
DetailPostHogIPs: dropAll,
|
|
102
|
+
SourceParameters: dropAll,
|
|
103
|
+
FeatureAvailability: dropAll,
|
|
104
|
+
// --- additional data-driven long tail (surfaced by the full run) ---
|
|
105
|
+
SourceTables: dropAll,
|
|
106
|
+
SourceSetupIntro: dropAll,
|
|
107
|
+
SyncModes: dropAll,
|
|
108
|
+
TemplateParameters: dropAll,
|
|
109
|
+
TroubleshootingLink: dropAll,
|
|
110
|
+
AlphaRelease: dropAll,
|
|
111
|
+
BetaTag: dropAll,
|
|
112
|
+
ProductCard: dropAll,
|
|
113
|
+
PostHogIPsInline: dropAll,
|
|
114
|
+
PostHogIPsTable: dropAll,
|
|
115
|
+
PostHogCaptureOnViewed: unwrap,
|
|
116
|
+
MCPConfigSnippet: dropAll,
|
|
117
|
+
ComparisonRow: dropAll,
|
|
118
|
+
DistinctIdReuseWarning: dropAll,
|
|
119
|
+
DetailSetUpReverseProxy: dropAll,
|
|
120
|
+
DetailGroupProductsInOneProject: dropAll,
|
|
121
|
+
// conditional/layout wrappers → unwrap (keep the inner prose)
|
|
122
|
+
HideOnCDPIndex: unwrap,
|
|
123
|
+
Link: unwrap,
|
|
124
|
+
// --- data-driven React with no static markdown: recover what's static,
|
|
125
|
+
// placeholder the rest (honest, ledgered) instead of a blank panel ---
|
|
126
|
+
WizardCommand: codeNode("npx @posthog/wizard"),
|
|
127
|
+
WizardSupportedFrameworks: placeholder("Supported frameworks & languages"),
|
|
128
|
+
SDKs: placeholder("PostHog SDKs / client libraries"),
|
|
129
|
+
Frameworks: placeholder("Framework guides"),
|
|
130
|
+
WebsiteJSHtmlSnippet: placeholder("JavaScript web install snippet"),
|
|
131
|
+
Wizard: unwrap,
|
|
132
|
+
API: placeholder("API reference overview"),
|
|
133
|
+
};
|
|
134
|
+
/** Human labels for common `<MultiLanguage>` fence languages. */
|
|
135
|
+
const LANG_LABEL = {
|
|
136
|
+
"js-web": "Web",
|
|
137
|
+
js: "JavaScript",
|
|
138
|
+
ts: "TypeScript",
|
|
139
|
+
node: "Node.js",
|
|
140
|
+
"react-native": "React Native",
|
|
141
|
+
ios_swift: "iOS",
|
|
142
|
+
swift: "iOS",
|
|
143
|
+
android_kotlin: "Android",
|
|
144
|
+
kotlin: "Android",
|
|
145
|
+
python: "Python",
|
|
146
|
+
ruby: "Ruby",
|
|
147
|
+
php: "PHP",
|
|
148
|
+
go: "Go",
|
|
149
|
+
csharp: "C#",
|
|
150
|
+
java: "Java",
|
|
151
|
+
bash: "Shell",
|
|
152
|
+
curl: "cURL",
|
|
153
|
+
};
|
|
154
|
+
function prettify(s) {
|
|
155
|
+
return LANG_LABEL[s] ?? s.replace(/[-_]/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
156
|
+
}
|
|
157
|
+
const escAttr = (s) => s.replace(/"/g, """);
|
|
158
|
+
/**
|
|
159
|
+
* Convert PostHog's tab-like components to the `<Tabs><Tab label=…>`
|
|
160
|
+
* shape format-mdx's builtins turn into real Dogsbay `:::tabs` — so the
|
|
161
|
+
* tab UX is preserved instead of flattened. Two forms:
|
|
162
|
+
*
|
|
163
|
+
* - `<Tab.Group>` (Headless-UI, dotted namespace): labels from the
|
|
164
|
+
* `<Tab.List>` `<Tab>…</Tab>` items, one panel per `<Tab.Panel>`.
|
|
165
|
+
* - `<MultiLanguage>`: one tab per fenced code block, labelled by the
|
|
166
|
+
* fence language.
|
|
167
|
+
*
|
|
168
|
+
* These are always prose (never inside code fences), so a raw-text
|
|
169
|
+
* rewrite before parsing is safe.
|
|
170
|
+
*/
|
|
171
|
+
function convertTabs(src) {
|
|
172
|
+
// 1. Tab.Group → Tabs
|
|
173
|
+
src = src.replace(/<Tab\.Group\b[^>]*>([\s\S]*?)<\/Tab\.Group>/g, (_full, body) => {
|
|
174
|
+
const listM = body.match(/<Tab\.List>([\s\S]*?)<\/Tab\.List>/);
|
|
175
|
+
const labels = listM
|
|
176
|
+
? [...listM[1].matchAll(/<Tab\b[^>]*>([\s\S]*?)<\/Tab>/g)].map((m) => m[1].replace(/<[^>]+>/g, "").trim())
|
|
177
|
+
: [];
|
|
178
|
+
const panels = [
|
|
179
|
+
...body.matchAll(/<Tab\.Panel\b[^>]*>([\s\S]*?)<\/Tab\.Panel>/g),
|
|
180
|
+
].map((m) => m[1].trim());
|
|
181
|
+
if (panels.length === 0)
|
|
182
|
+
return body.replace(/<\/?Tab\.[A-Za-z]+\b[^>]*>/g, "");
|
|
183
|
+
const tabs = panels
|
|
184
|
+
.map((p, i) => `<Tab label="${escAttr(labels[i] ?? `Tab ${i + 1}`)}">\n\n${p}\n\n</Tab>`)
|
|
185
|
+
.join("\n");
|
|
186
|
+
return `<Tabs>\n${tabs}\n</Tabs>`;
|
|
187
|
+
});
|
|
188
|
+
// 2. MultiLanguage → Tabs (one tab per fenced block, labelled by lang)
|
|
189
|
+
src = src.replace(/<MultiLanguage\b[^>]*>([\s\S]*?)<\/MultiLanguage>/g, (_full, body) => {
|
|
190
|
+
const fences = [...body.matchAll(/```([\w-]*)\r?\n([\s\S]*?)```/g)];
|
|
191
|
+
if (fences.length < 2)
|
|
192
|
+
return body; // 0-1 fences: no tabs needed, keep content
|
|
193
|
+
const tabs = fences
|
|
194
|
+
.map(([, lang, code]) => `<Tab label="${escAttr(prettify(lang || "Example"))}">\n\n\`\`\`${lang}\n${code}\`\`\`\n\n</Tab>`)
|
|
195
|
+
.join("\n");
|
|
196
|
+
return `<Tabs>\n${tabs}\n</Tabs>`;
|
|
197
|
+
});
|
|
198
|
+
return src;
|
|
199
|
+
}
|
|
200
|
+
const mdx = {
|
|
201
|
+
name: "posthog",
|
|
202
|
+
preprocess: (source) => convertTabs(source),
|
|
203
|
+
components,
|
|
204
|
+
selfClosingTags: [
|
|
205
|
+
"ProductScreenshot",
|
|
206
|
+
"ProductVideo",
|
|
207
|
+
"SourceTables",
|
|
208
|
+
"SourceSetupIntro",
|
|
209
|
+
"SyncModes",
|
|
210
|
+
"TemplateParameters",
|
|
211
|
+
"TroubleshootingLink",
|
|
212
|
+
"AlphaRelease",
|
|
213
|
+
"BetaTag",
|
|
214
|
+
"ProductCard",
|
|
215
|
+
"PostHogIPsInline",
|
|
216
|
+
"PostHogIPsTable",
|
|
217
|
+
"MCPConfigSnippet",
|
|
218
|
+
"DistinctIdReuseWarning",
|
|
219
|
+
"WizardSupportedFrameworks",
|
|
220
|
+
"DetailSetUpReverseProxy",
|
|
221
|
+
"DetailGroupProductsInOneProject",
|
|
222
|
+
"DetailPostHogIPs",
|
|
223
|
+
"FeatureAvailability",
|
|
224
|
+
"WizardCommand",
|
|
225
|
+
"WizardSupportedFrameworks",
|
|
226
|
+
"SDKs",
|
|
227
|
+
"Frameworks",
|
|
228
|
+
"WebsiteJSHtmlSnippet",
|
|
229
|
+
"API",
|
|
230
|
+
],
|
|
231
|
+
// Strip inline icon components (`<IconGraph />`) that ride inside prose.
|
|
232
|
+
inlineTransforms: [[/<Icon[A-Za-z0-9]+\b[^>]*\/>/g, ""]],
|
|
233
|
+
};
|
|
234
|
+
export const posthogAdapter = {
|
|
235
|
+
name: "posthog",
|
|
236
|
+
mdx,
|
|
237
|
+
linkBase: "/docs",
|
|
238
|
+
externalBase: "https://posthog.com",
|
|
239
|
+
extractNav: ({ sourceDir, hrefPrefix }) => extractPosthogNav(sourceDir, hrefPrefix),
|
|
240
|
+
};
|
|
241
|
+
export default posthogAdapter;
|
package/dist/nav.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extract Dogsbay nav from PostHog's `src/navs/index.js` — a 7.7k-line
|
|
3
|
+
* hand-maintained module of `export const <product> = { name, url,
|
|
4
|
+
* children: [...] }` trees. It is PURE static data (string icons, no JS
|
|
5
|
+
* imports), so it is statically readable without execution: this walker
|
|
6
|
+
* captures each exported object literal and maps it to NavItem[] using
|
|
7
|
+
* the same balanced-literal scanners format-mdx uses for TSX sidebars.
|
|
8
|
+
*
|
|
9
|
+
* `dynamicChildren` (API-injected, only 4 in the tree) are ignored here
|
|
10
|
+
* — the static children present alongside them are kept; the injected
|
|
11
|
+
* ones are a known, ledgered gap.
|
|
12
|
+
*/
|
|
13
|
+
import type { NavItem } from "@dogsbay/format-mdx";
|
|
14
|
+
/** Locate PostHog's navs/index.js relative to the docs source dir. */
|
|
15
|
+
export declare function findNavModule(sourceDir: string): string | null;
|
|
16
|
+
/**
|
|
17
|
+
* PostHog's canonical docs nav is the single `export const docsMenu`
|
|
18
|
+
* object (its children are the product groups). The other object exports
|
|
19
|
+
* (`communityMenu`, `companyMenu`, `pricingMenu`, …) are the marketing
|
|
20
|
+
* nav — deliberately excluded.
|
|
21
|
+
*/
|
|
22
|
+
export declare function extractPosthogNav(sourceDir: string, hrefPrefix: string): NavItem[] | null;
|
package/dist/nav.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extract Dogsbay nav from PostHog's `src/navs/index.js` — a 7.7k-line
|
|
3
|
+
* hand-maintained module of `export const <product> = { name, url,
|
|
4
|
+
* children: [...] }` trees. It is PURE static data (string icons, no JS
|
|
5
|
+
* imports), so it is statically readable without execution: this walker
|
|
6
|
+
* captures each exported object literal and maps it to NavItem[] using
|
|
7
|
+
* the same balanced-literal scanners format-mdx uses for TSX sidebars.
|
|
8
|
+
*
|
|
9
|
+
* `dynamicChildren` (API-injected, only 4 in the tree) are ignored here
|
|
10
|
+
* — the static children present alongside them are kept; the injected
|
|
11
|
+
* ones are a known, ledgered gap.
|
|
12
|
+
*/
|
|
13
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
14
|
+
import { join } from "node:path";
|
|
15
|
+
import { parseJsObjectEntries, parseJsArrayElements, scanBalancedLiteral, } from "@dogsbay/format-mdx";
|
|
16
|
+
function unquote(raw) {
|
|
17
|
+
if (!raw)
|
|
18
|
+
return undefined;
|
|
19
|
+
const m = raw.trim().match(/^(["'`])([\s\S]*)\1$/);
|
|
20
|
+
return m ? m[2] : undefined;
|
|
21
|
+
}
|
|
22
|
+
function objToNav(objSrc) {
|
|
23
|
+
const entries = parseJsObjectEntries(objSrc);
|
|
24
|
+
if (!entries)
|
|
25
|
+
return null;
|
|
26
|
+
const o = Object.fromEntries(entries);
|
|
27
|
+
const label = unquote(o.name) ?? unquote(o.title) ?? unquote(o.label);
|
|
28
|
+
if (!label)
|
|
29
|
+
return null;
|
|
30
|
+
const nav = { label };
|
|
31
|
+
const url = unquote(o.url) ?? unquote(o.href);
|
|
32
|
+
if (url)
|
|
33
|
+
nav.url = url;
|
|
34
|
+
const childSrc = o.children?.trim();
|
|
35
|
+
if (childSrc?.startsWith("[")) {
|
|
36
|
+
const els = parseJsArrayElements(childSrc);
|
|
37
|
+
if (els) {
|
|
38
|
+
const kids = els.map(objToNav).filter((c) => c !== null);
|
|
39
|
+
if (kids.length)
|
|
40
|
+
nav.children = kids;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return nav;
|
|
44
|
+
}
|
|
45
|
+
/** `/docs/cdp/sources` → `cdp/sources` (slug relative to contents/docs). */
|
|
46
|
+
function urlToSlug(url) {
|
|
47
|
+
return url.replace(/^\/docs\/?/, "").replace(/\/$/, "");
|
|
48
|
+
}
|
|
49
|
+
function toNavItems(raws, hrefPrefix) {
|
|
50
|
+
const pref = hrefPrefix.replace(/\/$/, "");
|
|
51
|
+
const out = [];
|
|
52
|
+
for (const r of raws) {
|
|
53
|
+
const item = { label: r.label };
|
|
54
|
+
if (r.url) {
|
|
55
|
+
if (/^[a-z]+:\/\//.test(r.url))
|
|
56
|
+
item.href = r.url; // external
|
|
57
|
+
else {
|
|
58
|
+
const slug = urlToSlug(r.url);
|
|
59
|
+
item.href = slug ? `${pref}/${slug}` : pref || "/";
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (r.children) {
|
|
63
|
+
const kids = toNavItems(r.children, hrefPrefix);
|
|
64
|
+
if (kids.length)
|
|
65
|
+
item.children = kids;
|
|
66
|
+
}
|
|
67
|
+
// The Dogsbay nav schema requires href OR children — PostHog's
|
|
68
|
+
// `{name}`-only section dividers have neither; drop them.
|
|
69
|
+
if (!item.href && !item.children)
|
|
70
|
+
continue;
|
|
71
|
+
out.push(item);
|
|
72
|
+
}
|
|
73
|
+
return out;
|
|
74
|
+
}
|
|
75
|
+
const NAV_CANDIDATES = [
|
|
76
|
+
"../../src/navs/index.js",
|
|
77
|
+
"../src/navs/index.js",
|
|
78
|
+
"src/navs/index.js",
|
|
79
|
+
"../../../src/navs/index.js",
|
|
80
|
+
];
|
|
81
|
+
/** Locate PostHog's navs/index.js relative to the docs source dir. */
|
|
82
|
+
export function findNavModule(sourceDir) {
|
|
83
|
+
for (const c of NAV_CANDIDATES) {
|
|
84
|
+
const p = join(sourceDir, c);
|
|
85
|
+
if (existsSync(p))
|
|
86
|
+
return p;
|
|
87
|
+
}
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
/** Capture the object literal of a named `export const <name> = { … }`. */
|
|
91
|
+
function captureExportObject(src, name) {
|
|
92
|
+
const re = new RegExp(`export\\s+const\\s+${name}\\s*(?::[^=]*?)?=\\s*`);
|
|
93
|
+
const m = re.exec(src);
|
|
94
|
+
if (!m)
|
|
95
|
+
return null;
|
|
96
|
+
const start = m.index + m[0].length;
|
|
97
|
+
if (src[start] !== "{")
|
|
98
|
+
return null;
|
|
99
|
+
const end = scanBalancedLiteral(src, start);
|
|
100
|
+
return end === -1 ? null : src.slice(start, end);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* PostHog's canonical docs nav is the single `export const docsMenu`
|
|
104
|
+
* object (its children are the product groups). The other object exports
|
|
105
|
+
* (`communityMenu`, `companyMenu`, `pricingMenu`, …) are the marketing
|
|
106
|
+
* nav — deliberately excluded.
|
|
107
|
+
*/
|
|
108
|
+
export function extractPosthogNav(sourceDir, hrefPrefix) {
|
|
109
|
+
const navFile = findNavModule(sourceDir);
|
|
110
|
+
if (!navFile)
|
|
111
|
+
return null;
|
|
112
|
+
const src = readFileSync(navFile, "utf-8");
|
|
113
|
+
const docsMenuSrc = captureExportObject(src, "docsMenu");
|
|
114
|
+
if (docsMenuSrc) {
|
|
115
|
+
const nav = objToNav(docsMenuSrc);
|
|
116
|
+
// Use its children (the product groups) as the top-level nav; if it
|
|
117
|
+
// has none, fall back to the docsMenu node itself.
|
|
118
|
+
const roots = nav?.children?.length ? nav.children : nav ? [nav] : [];
|
|
119
|
+
if (roots.length)
|
|
120
|
+
return toNavItems(roots, hrefPrefix);
|
|
121
|
+
}
|
|
122
|
+
return null;
|
|
123
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dogsbay/adapter-posthog",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.0-beta.136",
|
|
4
|
+
"description": "PostHog site adapter for @dogsbay/format-gatsby — maps PostHog's MDX components to directives and extracts nav from src/navs/index.js.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@dogsbay/format-gatsby": "0.2.0-beta.136",
|
|
18
|
+
"@dogsbay/format-mdx": "0.2.0-beta.136"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@types/node": "^25.9.5",
|
|
22
|
+
"typescript": "^5.9.3",
|
|
23
|
+
"vitest": "^4.1.10"
|
|
24
|
+
},
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "tsc",
|
|
28
|
+
"test": "vitest run"
|
|
29
|
+
}
|
|
6
30
|
}
|
package/README.md
DELETED