@rizom/brain 0.2.0-alpha.50 → 0.2.0-alpha.52
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/brain.js +895 -793
- package/dist/entities.d.ts +51 -11
- package/dist/entities.js +108 -108
- package/dist/entities.js.map +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/dist/interfaces.d.ts +19 -13
- package/dist/interfaces.js +68 -68
- package/dist/interfaces.js.map +5 -7
- package/dist/plugins.d.ts +104 -29
- package/dist/plugins.js +109 -109
- package/dist/plugins.js.map +21 -21
- package/dist/services.d.ts +51 -11
- package/dist/services.js +98 -98
- package/dist/services.js.map +5 -5
- package/dist/site.js +118 -116
- package/dist/site.js.map +70 -67
- package/dist/themes.js +9 -5
- package/dist/themes.js.map +2 -2
- package/package.json +1 -1
- package/templates/deploy/scripts/update-dns.ts +14 -4
package/dist/themes.js
CHANGED
|
@@ -45,6 +45,10 @@ var e=`/* ============================================
|
|
|
45
45
|
/* Selection colors */
|
|
46
46
|
--color-selection: var(--color-selection);
|
|
47
47
|
|
|
48
|
+
/* Rule colors \u2014 subtle hairlines for dividers, entry borders, footer top */
|
|
49
|
+
--color-rule: var(--color-rule);
|
|
50
|
+
--color-rule-strong: var(--color-rule-strong);
|
|
51
|
+
|
|
48
52
|
/* Monospace font \u2014 used by ui-library widgets, code blocks, etc.
|
|
49
53
|
Defined by every theme (or left empty for ranger). Brand-specific
|
|
50
54
|
fonts (\`font-display\`, \`font-body\`, \`font-label\`, \`font-nav\`)
|
|
@@ -347,21 +351,21 @@ var e=`/* ============================================
|
|
|
347
351
|
============================================ */
|
|
348
352
|
@layer theme-base {
|
|
349
353
|
[data-theme="dark"] .sun-icon {
|
|
350
|
-
display:
|
|
354
|
+
display: none;
|
|
351
355
|
}
|
|
352
356
|
[data-theme="dark"] .moon-icon {
|
|
353
|
-
display:
|
|
357
|
+
display: block;
|
|
354
358
|
}
|
|
355
359
|
[data-theme="light"] .sun-icon {
|
|
356
|
-
display:
|
|
360
|
+
display: block;
|
|
357
361
|
}
|
|
358
362
|
[data-theme="light"] .moon-icon {
|
|
359
|
-
display:
|
|
363
|
+
display: none;
|
|
360
364
|
}
|
|
361
365
|
}
|
|
362
366
|
`;function o(t){return e+`
|
|
363
367
|
|
|
364
368
|
`+t}export{o as composeTheme};
|
|
365
369
|
|
|
366
|
-
//# debugId=
|
|
370
|
+
//# debugId=11AD1BC3215EB2DC64756E2164756E21
|
|
367
371
|
//# sourceMappingURL=themes.js.map
|
package/dist/themes.js.map
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"// Types for CSS imports are defined in types.d.ts\n/// <reference types=\"./types.d.ts\" />\n\nimport themeBaseCSS from \"./theme-base.css\" with { type: \"text\" };\n\n/**\n * Compose a complete theme by prepending shared base utilities.\n *\n * Base utilities live in @layer theme-base; theme-specific styles\n * should use @layer theme-override to guarantee correct cascade order.\n */\nexport function composeTheme(themeCSS: string): string {\n return themeBaseCSS + \"\\n\\n\" + themeCSS;\n}\n\nexport default themeBaseCSS;\nexport { themeBaseCSS };\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWO,SAAS,CAAY,CAAC,EAA0B,CACrD,OAAO,EAAe;AAAA;AAAA,EAAS",
|
|
8
|
+
"debugId": "11AD1BC3215EB2DC64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -16,8 +16,11 @@ interface CloudflareResult {
|
|
|
16
16
|
result?: Array<{ id: string }>;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
async function
|
|
20
|
-
|
|
19
|
+
async function findRecordId(
|
|
20
|
+
name: string,
|
|
21
|
+
type: "A" | "CNAME",
|
|
22
|
+
): Promise<string | undefined> {
|
|
23
|
+
const lookupUrl = `${baseUrl}/zones/${zoneId}/dns_records?type=${type}&name=${encodeURIComponent(name)}`;
|
|
21
24
|
const lookup = await fetch(lookupUrl, { headers });
|
|
22
25
|
const payload = (await readJsonResponse(
|
|
23
26
|
lookup,
|
|
@@ -27,9 +30,16 @@ async function upsertRecord(name: string): Promise<void> {
|
|
|
27
30
|
throw new Error(`Cloudflare DNS lookup failed: ${JSON.stringify(payload)}`);
|
|
28
31
|
}
|
|
29
32
|
|
|
30
|
-
|
|
33
|
+
return payload.result?.[0]?.id;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
async function upsertRecord(name: string): Promise<void> {
|
|
37
|
+
// Prefer an existing A record. If the hostname currently has a CNAME,
|
|
38
|
+
// replace that CNAME in-place so deploys can claim legacy www aliases.
|
|
39
|
+
const existing =
|
|
40
|
+
(await findRecordId(name, "A")) ?? (await findRecordId(name, "CNAME"));
|
|
31
41
|
const url = existing
|
|
32
|
-
? `${baseUrl}/zones/${zoneId}/dns_records/${existing
|
|
42
|
+
? `${baseUrl}/zones/${zoneId}/dns_records/${existing}`
|
|
33
43
|
: `${baseUrl}/zones/${zoneId}/dns_records`;
|
|
34
44
|
|
|
35
45
|
const response = await fetch(url, {
|