bsmnt 0.5.0 → 0.6.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 +1 -0
- package/dist/application/add-hooks/index.d.ts.map +1 -1
- package/dist/application/add-hooks/index.js +1 -0
- package/dist/application/add-hooks/index.js.map +1 -1
- package/dist/application/add-integration/index.d.ts +13 -6
- package/dist/application/add-integration/index.d.ts.map +1 -1
- package/dist/application/add-integration/index.js +145 -62
- package/dist/application/add-integration/index.js.map +1 -1
- package/dist/application/create-project/build-context.d.ts +3 -1
- package/dist/application/create-project/build-context.d.ts.map +1 -1
- package/dist/application/create-project/build-context.js +2 -1
- package/dist/application/create-project/build-context.js.map +1 -1
- package/dist/application/create-project/index.d.ts +3 -1
- package/dist/application/create-project/index.d.ts.map +1 -1
- package/dist/application/create-project/index.js +4 -2
- package/dist/application/create-project/index.js.map +1 -1
- package/dist/application/install-skills/index.js +1 -1
- package/dist/application/install-skills/index.js.map +1 -1
- package/dist/core/create/execute-plan.d.ts +4 -0
- package/dist/core/create/execute-plan.d.ts.map +1 -1
- package/dist/core/create/execute-plan.js +8 -0
- package/dist/core/create/execute-plan.js.map +1 -1
- package/dist/core/create/types.d.ts +2 -0
- package/dist/core/create/types.d.ts.map +1 -1
- package/dist/domain/skills.d.ts +26 -0
- package/dist/domain/skills.d.ts.map +1 -1
- package/dist/domain/skills.js +13 -0
- package/dist/domain/skills.js.map +1 -1
- package/dist/index.js +53 -28
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/create/executor.d.ts.map +1 -1
- package/dist/infrastructure/create/executor.js +5 -0
- package/dist/infrastructure/create/executor.js.map +1 -1
- package/dist/infrastructure/create/lifecycle-registry.d.ts.map +1 -1
- package/dist/infrastructure/create/lifecycle-registry.js +2 -0
- package/dist/infrastructure/create/lifecycle-registry.js.map +1 -1
- package/dist/infrastructure/create/setup-agent.d.ts +2 -0
- package/dist/infrastructure/create/setup-agent.d.ts.map +1 -1
- package/dist/infrastructure/create/setup-agent.js +9 -8
- package/dist/infrastructure/create/setup-agent.js.map +1 -1
- package/dist/infrastructure/create/setup-dotenvx.d.ts +41 -0
- package/dist/infrastructure/create/setup-dotenvx.d.ts.map +1 -0
- package/dist/infrastructure/create/setup-dotenvx.js +502 -0
- package/dist/infrastructure/create/setup-dotenvx.js.map +1 -0
- package/dist/infrastructure/create/setup-sanity.d.ts +13 -1
- package/dist/infrastructure/create/setup-sanity.d.ts.map +1 -1
- package/dist/infrastructure/create/setup-sanity.js +71 -31
- package/dist/infrastructure/create/setup-sanity.js.map +1 -1
- package/dist/modules/features/cms/sanity/config.d.ts.map +1 -1
- package/dist/modules/features/cms/sanity/config.js +2 -1
- package/dist/modules/features/cms/sanity/config.js.map +1 -1
- package/dist/modules/features/cms/sanity/mergers/layout.d.ts.map +1 -1
- package/dist/modules/features/cms/sanity/mergers/layout.js +10 -0
- package/dist/modules/features/cms/sanity/mergers/layout.js.map +1 -1
- package/dist/modules/features/env/dotenvx/config.d.ts +13 -0
- package/dist/modules/features/env/dotenvx/config.d.ts.map +1 -0
- package/dist/modules/features/env/dotenvx/config.js +47 -0
- package/dist/modules/features/env/dotenvx/config.js.map +1 -0
- package/dist/paths.d.ts +8 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +8 -0
- package/dist/paths.js.map +1 -1
- package/package.json +5 -1
- package/src/agent-skills/json-ld/SKILL.md +85 -0
- package/src/agent-skills/manage-env/SKILL.md +67 -0
- package/src/modules/features/cms/sanity/files/app/blog/[slug]/page.tsx +48 -21
- package/src/modules/features/cms/sanity/files/components/sanity/structured-data.tsx +83 -0
- package/src/modules/features/cms/sanity/files/lib/integrations/sanity/queries.ts +14 -0
- package/src/modules/features/cms/sanity/files/lib/integrations/sanity/sanity.config.ts +19 -3
- package/src/modules/features/cms/sanity/files/lib/integrations/sanity/sanity.types.ts +1 -0
- package/src/modules/features/cms/sanity/files/lib/integrations/sanity/schemas/index.ts +36 -1
- package/src/modules/features/cms/sanity/files/lib/integrations/sanity/schemas/metadata.ts +12 -1
- package/src/modules/features/cms/sanity/files/lib/integrations/sanity/schemas/structured-data-blocks.ts +416 -0
- package/src/modules/features/cms/sanity/files/lib/integrations/sanity/schemas/structured-data.ts +100 -0
- package/src/modules/features/cms/sanity/files/lib/integrations/sanity/structure.ts +37 -2
- package/src/modules/features/cms/sanity/files/lib/integrations/sanity/utils/page-json-ld.ts +208 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/components/same-as-input.tsx +66 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/fetchers/layout.ts +20 -1
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/icons.ts +17 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/queries.ts +22 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/index.ts +28 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/layout/company-data.ts +8 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/layout/structured-data.ts +124 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/shared/metadata.ts +12 -1
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/shared/structured-data-blocks.ts +436 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/singletons.ts +13 -1
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/utils/page-json-ld.ts +208 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/utils/json-ld.tsx +324 -15
- package/src/modules/features/env/dotenvx/files/decrypt-env.mjs +45 -0
- package/src/modules/features/env/dotenvx/files/gitleaks.yml +25 -0
- package/src/modules/features/env/dotenvx/files/instrumentation.ts +14 -0
- package/src/modules/features/env/dotenvx/files/push-keys.mjs +129 -0
- package/src/modules/features/env/dotenvx/files/save-key.mjs +129 -0
- package/src/modules/features/env/dotenvx/files/setup-env.mjs +67 -0
- package/src/modules/features/env/dotenvx/files/vercelignore +4 -0
- package/src/modules/features/env/dotenvx/files/write-env.mjs +47 -0
- package/src/templates/next-default/.env.example +14 -6
- package/src/templates/next-default/.github/workflows/ci.yml +22 -1
- package/src/templates/next-default/.vscode/extensions.json +3 -0
- package/src/templates/next-default/README.md +31 -0
- package/src/templates/next-default/lib/utils/json-ld.tsx +327 -21
- package/src/templates/next-default/next.config.ts +6 -0
- package/src/templates/next-experiments/.env.example +14 -6
- package/src/templates/next-experiments/.github/workflows/ci.yml +22 -1
- package/src/templates/next-experiments/.vscode/extensions.json +3 -0
- package/src/templates/next-experiments/README.md +31 -0
- package/src/templates/next-experiments/lib/utils/json-ld.tsx +327 -21
- package/src/templates/next-experiments/next.config.ts +6 -0
- package/src/templates/next-pagebuilder/.env.example +19 -1
- package/src/templates/next-pagebuilder/.github/workflows/ci.yml +21 -1
- package/src/templates/next-pagebuilder/.vscode/extensions.json +3 -0
- package/src/templates/next-pagebuilder/README.md +31 -0
- package/src/templates/next-pagebuilder/components/layout/json-ld/index.tsx +32 -19
- package/src/templates/next-pagebuilder/components/page-document/index.tsx +38 -0
- package/src/templates/next-pagebuilder/lib/integrations/sanity/sanity.types.ts +36 -2
- package/src/templates/next-pagebuilder/next.config.ts +6 -0
- package/src/templates/next-webgl/.env.example +14 -6
- package/src/templates/next-webgl/.github/workflows/ci.yml +22 -1
- package/src/templates/next-webgl/.vscode/extensions.json +3 -0
- package/src/templates/next-webgl/README.md +31 -0
- package/src/templates/next-webgl/lib/utils/json-ld.tsx +327 -21
- package/src/templates/next-webgl/next.config.ts +6 -0
- package/src/modules/features/cms/sanity/files/lib/utils/json-ld.tsx +0 -244
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
Article,
|
|
3
|
-
BreadcrumbList,
|
|
4
|
-
Organization,
|
|
5
|
-
SearchAction,
|
|
6
|
-
Thing,
|
|
7
|
-
WebPage,
|
|
8
|
-
WebSite,
|
|
9
|
-
WithContext,
|
|
10
|
-
} from "schema-dts";
|
|
11
|
-
|
|
12
|
-
const APP_BASE_URL = process.env.NEXT_PUBLIC_BASE_URL;
|
|
13
|
-
|
|
14
|
-
function isAbsoluteUrl(value: string) {
|
|
15
|
-
return /^https?:\/\//.test(value);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function resolveUrl(value?: string) {
|
|
19
|
-
if (!value) return APP_BASE_URL;
|
|
20
|
-
if (isAbsoluteUrl(value)) return value;
|
|
21
|
-
if (!APP_BASE_URL) return undefined;
|
|
22
|
-
|
|
23
|
-
return new URL(value, APP_BASE_URL).toString();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/* -------------------------------- Component ------------------------------- */
|
|
27
|
-
|
|
28
|
-
export function JsonLd<T extends Thing>({ data }: { data: WithContext<T> }) {
|
|
29
|
-
return (
|
|
30
|
-
<script
|
|
31
|
-
type="application/ld+json"
|
|
32
|
-
dangerouslySetInnerHTML={{
|
|
33
|
-
__html: JSON.stringify(data).replace(/</g, "\\u003c"),
|
|
34
|
-
}}
|
|
35
|
-
/>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* -------------------------------- Generators ------------------------------ */
|
|
40
|
-
|
|
41
|
-
interface WebSiteJsonLdOptions {
|
|
42
|
-
name: string;
|
|
43
|
-
url?: string;
|
|
44
|
-
description?: string;
|
|
45
|
-
/** URL to site-wide search (e.g. "/search?q={search_term_string}") */
|
|
46
|
-
searchUrl?: string;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export function generateWebSiteJsonLd(
|
|
50
|
-
options: WebSiteJsonLdOptions,
|
|
51
|
-
): WithContext<WebSite> {
|
|
52
|
-
const { name, url, description, searchUrl } = options;
|
|
53
|
-
const resolvedUrl = resolveUrl(url);
|
|
54
|
-
const resolvedSearchUrl = resolveUrl(searchUrl);
|
|
55
|
-
|
|
56
|
-
return {
|
|
57
|
-
"@context": "https://schema.org",
|
|
58
|
-
"@type": "WebSite",
|
|
59
|
-
name,
|
|
60
|
-
...(resolvedUrl && { url: resolvedUrl }),
|
|
61
|
-
...(description && { description }),
|
|
62
|
-
...(resolvedSearchUrl && {
|
|
63
|
-
potentialAction: {
|
|
64
|
-
"@type": "SearchAction",
|
|
65
|
-
target: resolvedSearchUrl,
|
|
66
|
-
"query-input": "required name=search_term_string",
|
|
67
|
-
} as SearchAction & { "query-input": string },
|
|
68
|
-
}),
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
interface OrganizationJsonLdOptions {
|
|
73
|
-
name: string;
|
|
74
|
-
url?: string;
|
|
75
|
-
logo?: string;
|
|
76
|
-
description?: string;
|
|
77
|
-
sameAs?: string[];
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export function generateOrganizationJsonLd(
|
|
81
|
-
options: OrganizationJsonLdOptions,
|
|
82
|
-
): WithContext<Organization> {
|
|
83
|
-
const { name, url, logo, description, sameAs } = options;
|
|
84
|
-
const resolvedUrl = resolveUrl(url);
|
|
85
|
-
const resolvedLogo = resolveUrl(logo);
|
|
86
|
-
|
|
87
|
-
return {
|
|
88
|
-
"@context": "https://schema.org",
|
|
89
|
-
"@type": "Organization",
|
|
90
|
-
name,
|
|
91
|
-
...(resolvedUrl && { url: resolvedUrl }),
|
|
92
|
-
...(resolvedLogo && { logo: resolvedLogo }),
|
|
93
|
-
...(description && { description }),
|
|
94
|
-
...(sameAs && { sameAs }),
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
interface WebPageJsonLdOptions {
|
|
99
|
-
title: string;
|
|
100
|
-
url?: string;
|
|
101
|
-
description?: string;
|
|
102
|
-
image?: string;
|
|
103
|
-
datePublished?: string;
|
|
104
|
-
dateModified?: string;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export function generateWebPageJsonLd(
|
|
108
|
-
options: WebPageJsonLdOptions,
|
|
109
|
-
): WithContext<WebPage> {
|
|
110
|
-
const { title, url, description, image, datePublished, dateModified } =
|
|
111
|
-
options;
|
|
112
|
-
const resolvedUrl = resolveUrl(url);
|
|
113
|
-
const resolvedImage = resolveUrl(image);
|
|
114
|
-
|
|
115
|
-
return {
|
|
116
|
-
"@context": "https://schema.org",
|
|
117
|
-
"@type": "WebPage",
|
|
118
|
-
name: title,
|
|
119
|
-
...(resolvedUrl && { url: resolvedUrl }),
|
|
120
|
-
...(description && { description }),
|
|
121
|
-
...(resolvedImage && { image: resolvedImage }),
|
|
122
|
-
...(datePublished && { datePublished }),
|
|
123
|
-
...(dateModified && { dateModified }),
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
interface ArticleJsonLdOptions {
|
|
128
|
-
title: string;
|
|
129
|
-
url?: string;
|
|
130
|
-
description?: string;
|
|
131
|
-
image?: string;
|
|
132
|
-
datePublished?: string;
|
|
133
|
-
dateModified?: string;
|
|
134
|
-
authorName?: string;
|
|
135
|
-
authorUrl?: string;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export function generateArticleJsonLd(
|
|
139
|
-
options: ArticleJsonLdOptions,
|
|
140
|
-
): WithContext<Article> {
|
|
141
|
-
const {
|
|
142
|
-
title,
|
|
143
|
-
url,
|
|
144
|
-
description,
|
|
145
|
-
image,
|
|
146
|
-
datePublished,
|
|
147
|
-
dateModified,
|
|
148
|
-
authorName,
|
|
149
|
-
authorUrl,
|
|
150
|
-
} = options;
|
|
151
|
-
const resolvedUrl = resolveUrl(url);
|
|
152
|
-
const resolvedImage = resolveUrl(image);
|
|
153
|
-
|
|
154
|
-
return {
|
|
155
|
-
"@context": "https://schema.org",
|
|
156
|
-
"@type": "Article",
|
|
157
|
-
headline: title,
|
|
158
|
-
...(resolvedUrl && { url: resolvedUrl }),
|
|
159
|
-
...(description && { description }),
|
|
160
|
-
...(resolvedImage && { image: resolvedImage }),
|
|
161
|
-
...(datePublished && { datePublished }),
|
|
162
|
-
...(dateModified && { dateModified }),
|
|
163
|
-
...(authorName && {
|
|
164
|
-
author: {
|
|
165
|
-
"@type": "Person",
|
|
166
|
-
name: authorName,
|
|
167
|
-
...(authorUrl && { url: authorUrl }),
|
|
168
|
-
},
|
|
169
|
-
}),
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
interface BreadcrumbItem {
|
|
174
|
-
name: string;
|
|
175
|
-
url: string;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
export function generateBreadcrumbJsonLd(
|
|
179
|
-
items: BreadcrumbItem[],
|
|
180
|
-
): WithContext<BreadcrumbList> {
|
|
181
|
-
return {
|
|
182
|
-
"@context": "https://schema.org",
|
|
183
|
-
"@type": "BreadcrumbList",
|
|
184
|
-
itemListElement: items.map((item, index) => {
|
|
185
|
-
const resolvedItemUrl = resolveUrl(item.url);
|
|
186
|
-
|
|
187
|
-
return {
|
|
188
|
-
"@type": "ListItem",
|
|
189
|
-
position: index + 1,
|
|
190
|
-
name: item.name,
|
|
191
|
-
...(resolvedItemUrl && { item: resolvedItemUrl }),
|
|
192
|
-
};
|
|
193
|
-
}),
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/* ----------------------------- Sanity Helpers ----------------------------- */
|
|
198
|
-
|
|
199
|
-
interface SanityDocument {
|
|
200
|
-
title?: string;
|
|
201
|
-
metadata?: {
|
|
202
|
-
title?: string;
|
|
203
|
-
description?: string;
|
|
204
|
-
image?: { asset?: { url?: string } };
|
|
205
|
-
};
|
|
206
|
-
_updatedAt?: string;
|
|
207
|
-
publishedAt?: string;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
export function generateSanityArticleJsonLd(options: {
|
|
211
|
-
document: SanityDocument;
|
|
212
|
-
url?: string;
|
|
213
|
-
authorName?: string;
|
|
214
|
-
authorUrl?: string;
|
|
215
|
-
}): WithContext<Article> {
|
|
216
|
-
const { document, url, authorName, authorUrl } = options;
|
|
217
|
-
|
|
218
|
-
return generateArticleJsonLd({
|
|
219
|
-
title: document.metadata?.title || document.title || "",
|
|
220
|
-
url,
|
|
221
|
-
description: document.metadata?.description,
|
|
222
|
-
image: document.metadata?.image?.asset?.url,
|
|
223
|
-
datePublished: document.publishedAt,
|
|
224
|
-
dateModified: document._updatedAt,
|
|
225
|
-
authorName,
|
|
226
|
-
authorUrl,
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
export function generateSanityWebPageJsonLd(options: {
|
|
231
|
-
document: SanityDocument;
|
|
232
|
-
url?: string;
|
|
233
|
-
}): WithContext<WebPage> {
|
|
234
|
-
const { document, url } = options;
|
|
235
|
-
|
|
236
|
-
return generateWebPageJsonLd({
|
|
237
|
-
title: document.metadata?.title || document.title || "",
|
|
238
|
-
url,
|
|
239
|
-
description: document.metadata?.description,
|
|
240
|
-
image: document.metadata?.image?.asset?.url,
|
|
241
|
-
datePublished: document.publishedAt,
|
|
242
|
-
dateModified: document._updatedAt,
|
|
243
|
-
});
|
|
244
|
-
}
|