@astryxdesign/cli 0.7.16 → 0.7.17-canary.gb36275e
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 +13 -23
- package/api/build/_adapter.d.mts +5 -0
- package/api/build/_adapter.mjs +49 -34
- package/api/build/blocks/blocks.d.mts +7 -5
- package/api/build/blocks/blocks.mjs +113 -26
- package/api/build/build.doc.mjs +2 -1
- package/api/build/kit/rank.mjs +59 -12
- package/api/build/kit/weights.d.mts +16 -3
- package/api/build/kit/weights.json +1 -1
- package/api/build/kit/weights.mjs +238 -31
- package/api/build/kit/word-model.d.mts +23 -0
- package/api/build/kit/word-model.mjs +46 -0
- package/api/build/kit/words.d.mts +42 -0
- package/api/build/kit/words.mjs +82 -1
- package/api/component/__fixtures__/resolutions/modules.txt +4 -5
- package/api/component/list/list.d.mts +1 -1
- package/api/component/list/list.mjs +46 -5
- package/api/discover/_adapter.d.mts +1 -1
- package/api/docs/_adapter.d.mts +26 -2
- package/api/docs/_adapter.mjs +217 -5
- package/api/docs/docs.d.mts +3 -0
- package/api/docs/docs.doc.mjs +7 -1
- package/api/docs/docs.mjs +12 -0
- package/api/docs/docs.type.d.mts +5 -0
- package/api/docs/docs.type.mjs +2 -0
- package/api/docs/node/node.mjs +1 -1
- package/api/doctor/_adapter.d.mts +27 -5
- package/api/doctor/_adapter.mjs +77 -6
- package/api/doctor/built-checks.mjs +38 -13
- package/api/doctor/doctor.d.mts +4 -3
- package/api/doctor/doctor.mjs +14 -7
- package/api/doctor/theme-checks.mjs +121 -17
- package/api/render/_adapter.mjs +531 -192
- package/api/render/render.doc.mjs +11 -3
- package/api/render/render.type.d.mts +30 -0
- package/api/render/render.type.mjs +19 -0
- package/api/search/ORDERING.md +1 -1
- package/api/search/_candidate-score.mjs +51 -32
- package/api/search/_fit-order.mjs +3 -3
- package/api/search/_result.d.mts +5 -5
- package/api/search/_score.d.mts +6 -1
- package/api/search/_score.mjs +15 -3
- package/api/search/search.d.mts +1 -1
- package/api/theme/_adapter.mjs +10 -0
- package/api/theme/build/build.d.mts +47 -0
- package/api/theme/build/build.mjs +147 -25
- package/api/theme/theme.type.d.mts +10 -0
- package/api/theme/theme.type.mjs +7 -1
- package/api/theme-edit/_adapter.d.mts +48 -0
- package/api/theme-edit/_adapter.mjs +675 -42
- package/api/theme-edit/_check.d.mts +28 -22
- package/api/theme-edit/_check.mjs +1481 -252
- package/api/theme-edit/_color.d.mts +9 -0
- package/api/theme-edit/_color.mjs +41 -1
- package/api/theme-edit/_compiler.mjs +9 -0
- package/api/theme-edit/_context.mjs +60 -3
- package/api/theme-edit/_css.mjs +21 -1
- package/api/theme-edit/_edit.d.mts +22 -0
- package/api/theme-edit/_edit.mjs +1196 -88
- package/api/theme-edit/_how-commands.d.mts +57 -0
- package/api/theme-edit/_how-commands.mjs +536 -1
- package/api/theme-edit/_how-question.d.mts +65 -0
- package/api/theme-edit/_how-question.mjs +4401 -225
- package/api/theme-edit/_how.mjs +104 -4
- package/api/theme-edit/_marks.d.mts +31 -5
- package/api/theme-edit/_marks.mjs +57 -5
- package/api/theme-edit/_normal.d.mts +153 -0
- package/api/theme-edit/_normal.mjs +661 -0
- package/api/theme-edit/_palette.mjs +10 -4
- package/api/theme-edit/_parts.d.mts +8 -0
- package/api/theme-edit/_parts.mjs +103 -2
- package/api/theme-edit/_preview-app.d.mts +7 -1
- package/api/theme-edit/_preview-app.mjs +205 -17
- package/api/theme-edit/_preview.d.mts +64 -8
- package/api/theme-edit/_preview.mjs +447 -89
- package/api/theme-edit/_settings.d.mts +176 -5
- package/api/theme-edit/_settings.mjs +1936 -128
- package/api/theme-edit/_tables.d.mts +6 -0
- package/api/theme-edit/_tables.mjs +32 -1
- package/api/theme-edit/theme-edit.type.d.mts +10 -1
- package/api/theme-edit/theme-edit.type.mjs +4 -1
- package/api/theme-edit/themeEditPreviewApp.doc.mjs +3 -3
- package/assets/codemods/run-codemod.mjs +73 -6
- package/assets/codemods/transforms/next/index.mjs +11 -1
- package/assets/codemods/transforms/next/migrate-item-swipe-actions-to-swipe.mjs +394 -0
- package/assets/docs/author-a-theme.doc.mjs +1 -0
- package/assets/docs/theme.doc.dense.mjs +2 -2
- package/assets/docs/theme.doc.mjs +1 -1
- package/assets/docs/tree/check-your-docs.doc.mjs +1 -1
- package/assets/docs/tree/cli-command.doc.mjs +2 -3
- package/assets/docs/tree/render-pages.doc.mjs +43 -2
- package/assets/docs/tree/template-doc-overview.doc.mjs +1 -1
- package/assets/docs/tree/test-in-an-app.doc.mjs +1 -1
- package/assets/docs/use-a-theme.doc.mjs +1 -1
- package/assets/docs.generated.json +2 -2
- package/assets/self-audit.generated.json +1 -1
- package/assets/templates/blocks/components/ChatComposerInput/useChatDictationHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/ChatComposerInput/useChatDictationHookUsage.tsx +38 -0
- package/assets/templates/blocks/components/SyntaxTheme/useSyntaxThemeHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/SyntaxTheme/useSyntaxThemeHookUsage.tsx +36 -0
- package/assets/templates/components.generated.json +1 -1
- package/assets/templates/pages/ai-chat/template.doc.mjs +5 -4
- package/assets/templates/pages/ai-chat-landing/template.doc.mjs +2 -1
- package/assets/templates/pages/blank/template.doc.mjs +1 -1
- package/assets/templates/pages/canvas-editor/template.doc.mjs +4 -2
- package/assets/templates/pages/centered-hero/template.doc.mjs +9 -1
- package/assets/templates/pages/classic-gallery/template.doc.mjs +1 -1
- package/assets/templates/pages/contact-form/template.doc.mjs +2 -1
- package/assets/templates/pages/dashboard/template.doc.mjs +3 -2
- package/assets/templates/pages/dashboard-alert-rail/template.doc.mjs +2 -1
- package/assets/templates/pages/dashboard-cohort-funnel/template.doc.mjs +2 -1
- package/assets/templates/pages/dashboard-composition/template.doc.mjs +2 -1
- package/assets/templates/pages/dashboard-progress/template.doc.mjs +6 -3
- package/assets/templates/pages/detail-page/template.doc.mjs +10 -3
- package/assets/templates/pages/documentation/template.doc.mjs +4 -1
- package/assets/templates/pages/documentation-design/template.doc.mjs +7 -1
- package/assets/templates/pages/documentation-technical/template.doc.mjs +7 -1
- package/assets/templates/pages/editor/template.doc.mjs +2 -8
- package/assets/templates/pages/file-explorer/template.doc.mjs +1 -1
- package/assets/templates/pages/form-two-column/template.doc.mjs +4 -3
- package/assets/templates/pages/form-wizard/template.doc.mjs +5 -3
- package/assets/templates/pages/gallery-hero/template.doc.mjs +4 -2
- package/assets/templates/pages/ide/page.tsx +24 -2
- package/assets/templates/pages/kanban-board/template.doc.mjs +1 -9
- package/assets/templates/pages/library/template.doc.mjs +4 -1
- package/assets/templates/pages/login/template.doc.mjs +2 -1
- package/assets/templates/pages/login-card/template.doc.mjs +2 -1
- package/assets/templates/pages/login-split/template.doc.mjs +2 -1
- package/assets/templates/pages/login-sso/template.doc.mjs +4 -2
- package/assets/templates/pages/mixed-gallery/template.doc.mjs +2 -1
- package/assets/templates/pages/product-detail/template.doc.mjs +4 -2
- package/assets/templates/pages/product-gallery/template.doc.mjs +2 -1
- package/assets/templates/pages/settings-dialog/template.doc.mjs +2 -1
- package/assets/templates/pages/settings-sidebar/template.doc.mjs +2 -1
- package/assets/templates/pages/shell-nav/template.doc.mjs +4 -2
- package/assets/templates/pages/shell-side-nav/template.doc.mjs +5 -3
- package/assets/templates/pages/shell-top-nav/template.doc.mjs +2 -1
- package/assets/templates/pages/side-gallery/template.doc.mjs +9 -1
- package/assets/templates/pages/table-filter/template.doc.mjs +9 -8
- package/assets/templates/pages/table-grouped/template.doc.mjs +4 -2
- package/assets/templates/pages/table-page/template.doc.mjs +5 -4
- package/assets/templates/pages/table-tree/template.doc.mjs +6 -3
- package/assets/templates/pages/theme-showcase/template.doc.mjs +2 -9
- package/assets/templates/pages/work-item-detail/template.doc.mjs +1 -0
- package/authoring/debug/parse.d.mts +3 -3
- package/authoring/doctypes/_schema.d.mts +3 -3
- package/authoring/doctypes/command/command.doc.mjs +1 -1
- package/authoring/doctypes/template/template.doc.mjs +1 -1
- package/authoring/doctypes/template/type.ts +9 -0
- package/clients/cli/bin/astryx.mjs +6 -9
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/component.doc.mjs +1 -1
- package/clients/cli/commands/component.mjs +20 -2
- package/clients/cli/commands/docs.doc.mjs +7 -1
- package/clients/cli/commands/docs.mjs +3 -1
- package/clients/cli/commands/doctor.mjs +22 -14
- package/clients/cli/commands/experimental/render.mjs +32 -1
- package/clients/cli/commands/experimental/theme.mjs +65 -14
- package/clients/cli/commands/experimental-render.doc.mjs +2 -2
- package/clients/cli/commands/experimental-theme-compile.doc.mjs +3 -3
- package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-preview-app.doc.mjs +1 -1
- package/clients/cli/commands/search.doc.mjs +2 -1
- package/clients/cli/commands/search.mjs +6 -1
- package/clients/cli/commands/template.mjs +4 -2
- package/clients/cli/commands/theme-build.doc.mjs +5 -1
- package/clients/cli/commands/theme.doc.mjs +1 -1
- package/clients/cli/commands/theme.mjs +153 -5
- package/clients/cli/commands/upgrade.mjs +42 -7
- package/clients/cli/index.mjs +1 -1
- package/clients/cli/lib/component-format.mjs +205 -98
- package/clients/cli/lib/hook-format.mjs +9 -19
- package/clients/cli/manifest.generated.json +1 -1
- package/foundation/agent-docs/agent-docs.mjs +1 -1
- package/foundation/config/theme-state.d.mts +13 -1
- package/foundation/config/theme-state.mjs +47 -7
- package/foundation/discovery/component-discovery.d.mts +11 -0
- package/foundation/discovery/component-discovery.mjs +27 -2
- package/foundation/discovery/component-replacement.mjs +130 -1
- package/foundation/discovery/entry-name-files.d.mts +43 -0
- package/foundation/discovery/entry-name-files.mjs +264 -0
- package/foundation/discovery/hook-discovery.d.mts +8 -2
- package/foundation/discovery/hook-discovery.mjs +20 -7
- package/foundation/discovery/package-exports.d.mts +10 -0
- package/foundation/discovery/package-exports.mjs +56 -3
- package/foundation/discovery/runner-allowlist.d.mts +1 -0
- package/foundation/discovery/runner-allowlist.mjs +2 -0
- package/foundation/discovery/template-adapter.d.mts +52 -0
- package/foundation/discovery/template-adapter.mjs +173 -10
- package/foundation/discovery/theme-imports.d.mts +14 -0
- package/foundation/discovery/theme-imports.mjs +43 -1
- package/foundation/doc-compiler/import.mjs +7 -1
- package/foundation/doc-compiler/parse-readable.mjs +4 -1
- package/foundation/doc-compiler/stored-docs.d.mts +22 -0
- package/foundation/doc-compiler/stored-docs.mjs +49 -0
- package/foundation/fs/cache-eviction.d.mts +21 -0
- package/foundation/fs/cache-eviction.mjs +73 -0
- package/foundation/fs/gather-cache.d.mts +25 -4
- package/foundation/fs/gather-cache.mjs +163 -53
- package/foundation/fs/jiti-cache.d.mts +19 -1
- package/foundation/fs/jiti-cache.mjs +130 -6
- package/foundation/fs/kept-tree.d.mts +60 -0
- package/foundation/fs/kept-tree.mjs +154 -0
- package/foundation/fs/module-loader.d.mts +18 -2
- package/foundation/fs/module-loader.mjs +92 -20
- package/foundation/identity/provider-identity.d.mts +6 -0
- package/foundation/identity/provider-identity.mjs +10 -1
- package/foundation/render/embedded-imports.d.mts +5 -4
- package/foundation/render/embedded-imports.mjs +7 -16
- package/foundation/render/file-header.d.mts +66 -0
- package/foundation/render/file-header.mjs +118 -0
- package/foundation/render/host-answer.d.mts +18 -0
- package/foundation/render/host-answer.mjs +46 -0
- package/foundation/render/host-exit.d.mts +1 -0
- package/foundation/render/host-exit.mjs +6 -1
- package/foundation/render/html-reader.d.mts +55 -2
- package/foundation/render/html-reader.mjs +145 -26
- package/foundation/render/markup-edits.d.mts +57 -0
- package/foundation/render/markup-edits.mjs +182 -0
- package/foundation/render/page-host.mjs +29 -12
- package/foundation/render/page-worker.mjs +83 -13
- package/foundation/render/render-page.d.mts +34 -2
- package/foundation/render/render-page.mjs +210 -29
- package/foundation/render/source-block.d.mts +73 -6
- package/foundation/render/source-block.mjs +170 -19
- package/foundation/render/ts-paths.d.mts +53 -6
- package/foundation/render/ts-paths.mjs +286 -41
- package/foundation/response/error-codes.d.mts +3 -1
- package/foundation/response/error-codes.d.ts +1 -0
- package/foundation/response/error-codes.doc.mjs +12 -1
- package/foundation/response/error-codes.mjs +10 -0
- package/foundation/text/string-utils.d.mts +3 -2
- package/foundation/text/string-utils.mjs +16 -3
- package/foundation/text/suggest-order.d.mts +9 -0
- package/foundation/text/suggest-order.mjs +13 -0
- package/host/index.mjs +8 -6
- package/package.json +6 -6
package/api/doctor/_adapter.mjs
CHANGED
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
} from '../../foundation/agent-docs/computer-agent-text.mjs';
|
|
40
40
|
import {computerAgentTextSettings} from '../../foundation/env/user-settings.mjs';
|
|
41
41
|
import * as fs from 'node:fs';
|
|
42
|
+
import {createRequire} from 'node:module';
|
|
42
43
|
import {placeholderUses} from '../../foundation/discovery/template-icons.mjs';
|
|
43
44
|
export {placeholderFixes} from '../../foundation/discovery/template-icons.mjs';
|
|
44
45
|
export {
|
|
@@ -76,15 +77,16 @@ export {
|
|
|
76
77
|
resolveThemeModule,
|
|
77
78
|
} from '../../foundation/config/theme-state.mjs';
|
|
78
79
|
export {
|
|
79
|
-
|
|
80
|
+
fileMark,
|
|
81
|
+
generatedSourceCommand,
|
|
80
82
|
isPrivateVarRefusal,
|
|
81
83
|
missingThemePackage,
|
|
82
84
|
themeBuild,
|
|
83
85
|
validateThemePrivateInputs,
|
|
84
86
|
} from '../theme/build/build.mjs';
|
|
85
|
-
export {APP_COPY_MARK, EDITOR_GENERATED_MARK} from '../theme-edit/_marks.mjs';
|
|
86
87
|
export {installCommandFor as packageInstallCommand} from '../../foundation/discovery/template-needs.mjs';
|
|
87
88
|
export {resolveRecordedTheme} from '../theme/theme.mjs';
|
|
89
|
+
export {themeIdentifier} from '../theme/_fork.mjs';
|
|
88
90
|
export {collectUnloadedFonts} from '../theme/build/font-warning.mjs';
|
|
89
91
|
|
|
90
92
|
// What the authoring-docs check reads (./_authoring-audit.mjs), reached only
|
|
@@ -113,15 +115,22 @@ const CHECK_CODEC = {
|
|
|
113
115
|
* A doctor check that reads only files, kept between runs through the kept
|
|
114
116
|
* gather (foundation/fs/gather-cache.mjs): a later `doctor` with every file,
|
|
115
117
|
* folder, module and environment variable it read unchanged reads the check
|
|
116
|
-
* back. Only the docs checks go through here; a
|
|
117
|
-
* time, the network or anything else the stamps do
|
|
118
|
+
* back. Only the docs checks and the theme-wiring scan go through here; a
|
|
119
|
+
* check that depends on the time, the network or anything else the stamps do
|
|
120
|
+
* not see never does.
|
|
118
121
|
* @template T
|
|
119
122
|
* @param {{name: string, cwd: string, coreDir: string | null}} where - The
|
|
120
123
|
* check, the project folder, and the Core folder the project loads.
|
|
121
124
|
* @param {() => Promise<T>} check
|
|
125
|
+
* @param {{encode: (value: any) => any, decode: (stored: any) => any, valid?: (value: any) => boolean}} [codec]
|
|
126
|
+
* How the value is kept: a check record unless given.
|
|
122
127
|
* @returns {Promise<T>}
|
|
123
128
|
*/
|
|
124
|
-
export function keptFileCheck(
|
|
129
|
+
export function keptFileCheck(
|
|
130
|
+
{name, cwd, coreDir},
|
|
131
|
+
check,
|
|
132
|
+
codec = CHECK_CODEC,
|
|
133
|
+
) {
|
|
125
134
|
// Only a recorded run (a plain `doctor` from the bin) reads or keeps one: a
|
|
126
135
|
// hosted run names its commands its own way, so it always checks.
|
|
127
136
|
if (!recordedRun()) return check();
|
|
@@ -129,10 +138,33 @@ export function keptFileCheck({name, cwd, coreDir}, check) {
|
|
|
129
138
|
// With the command name the checks print commands with.
|
|
130
139
|
['doctor-check', name, cwd, coreDir, getCliInvocation(cwd)],
|
|
131
140
|
check,
|
|
132
|
-
|
|
141
|
+
codec,
|
|
133
142
|
);
|
|
134
143
|
}
|
|
135
144
|
|
|
145
|
+
/**
|
|
146
|
+
* The theme-wiring scan's result ({@link themeImportWiring}), kept exactly,
|
|
147
|
+
* with its shape.
|
|
148
|
+
*/
|
|
149
|
+
export const THEME_WIRING_CODEC = {
|
|
150
|
+
encode: (/** @type {any} */ value) => value,
|
|
151
|
+
decode: (/** @type {any} */ value) => value,
|
|
152
|
+
valid: (/** @type {any} */ value) =>
|
|
153
|
+
value != null &&
|
|
154
|
+
Array.isArray(value.wired) &&
|
|
155
|
+
Array.isArray(value.unconfirmed) &&
|
|
156
|
+
value.wired.every(
|
|
157
|
+
(/** @type {any} */ w) =>
|
|
158
|
+
w != null &&
|
|
159
|
+
typeof w.slug === 'string' &&
|
|
160
|
+
typeof w.owner === 'string' &&
|
|
161
|
+
typeof w.file === 'string',
|
|
162
|
+
) &&
|
|
163
|
+
value.unconfirmed.every(
|
|
164
|
+
(/** @type {any} */ u) => u != null && typeof u.file === 'string',
|
|
165
|
+
),
|
|
166
|
+
};
|
|
167
|
+
|
|
136
168
|
/**
|
|
137
169
|
* Package written to the generated app record for one discovered theme.
|
|
138
170
|
* @param {import('../../foundation/discovery/theme-discovery.mjs').DiscoveredTheme} theme
|
|
@@ -306,6 +338,45 @@ export function doctorStylesheetImports(css) {
|
|
|
306
338
|
return new Set(cssImports(css));
|
|
307
339
|
}
|
|
308
340
|
|
|
341
|
+
/**
|
|
342
|
+
* The file a local stylesheet `@import` names, from the stylesheet that
|
|
343
|
+
* imports it: a relative path, or a package's file as Node resolves it
|
|
344
|
+
* (`@fontsource/inter/index.css`). Null for a URL (http, https, `//`) or an
|
|
345
|
+
* import that does not resolve.
|
|
346
|
+
* @param {string} specifier
|
|
347
|
+
* @param {string} fromFile
|
|
348
|
+
* @returns {string | null}
|
|
349
|
+
*/
|
|
350
|
+
export function doctorStylesheetImportFile(specifier, fromFile) {
|
|
351
|
+
if (/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(specifier)) return null;
|
|
352
|
+
const isFile = (/** @type {string} */ f) => {
|
|
353
|
+
try {
|
|
354
|
+
return fs.statSync(f).isFile();
|
|
355
|
+
} catch {
|
|
356
|
+
return false;
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
// A bare name is a file beside the stylesheet first (`@import
|
|
360
|
+
// "faces.css"`, as a browser reads it), then a package.
|
|
361
|
+
const beside = path.resolve(path.dirname(fromFile), specifier);
|
|
362
|
+
if (isFile(beside)) return beside;
|
|
363
|
+
if (/^\.{1,2}\//.test(specifier)) return null;
|
|
364
|
+
try {
|
|
365
|
+
// Packages resolve from where the stylesheet really is (a linked
|
|
366
|
+
// install, as pnpm makes, keeps its own dependencies there).
|
|
367
|
+
let real = fromFile;
|
|
368
|
+
try {
|
|
369
|
+
real = fs.realpathSync(fromFile);
|
|
370
|
+
} catch {
|
|
371
|
+
real = fromFile;
|
|
372
|
+
}
|
|
373
|
+
const file = createRequire(real).resolve(specifier);
|
|
374
|
+
return isFile(file) ? file : null;
|
|
375
|
+
} catch {
|
|
376
|
+
return null;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
309
380
|
/**
|
|
310
381
|
* The `@astryxdesign/core` range a package's peerDependencies declare, and
|
|
311
382
|
* whether it accepts `coreVersion` (spec:AST-017/FR12). The one rule every
|
|
@@ -71,6 +71,7 @@ function hasJsx(text) {
|
|
|
71
71
|
sourceType: 'unambiguous',
|
|
72
72
|
plugins,
|
|
73
73
|
errorRecovery: true,
|
|
74
|
+
attachComment: false,
|
|
74
75
|
});
|
|
75
76
|
break;
|
|
76
77
|
} catch {
|
|
@@ -254,14 +255,24 @@ let lineCache = {text: null, starts: [0]};
|
|
|
254
255
|
* @param {string} text
|
|
255
256
|
*/
|
|
256
257
|
function withoutComments(text, ext = '', parsed = commentRanges(text, ext)) {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
258
|
+
return parsed ? blankRanges(text, parsed) : scanOutComments(text);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Text with each range blanked, every character but a line break made a
|
|
263
|
+
* space, so every offset and line stays where it was.
|
|
264
|
+
* @param {string} text
|
|
265
|
+
* @param {Array<[number, number]>} ranges in order, none overlapping
|
|
266
|
+
*/
|
|
267
|
+
function blankRanges(text, ranges) {
|
|
268
|
+
let out = '';
|
|
269
|
+
let at = 0;
|
|
270
|
+
for (const [start, end] of ranges) {
|
|
271
|
+
out +=
|
|
272
|
+
text.slice(at, start) + text.slice(start, end).replace(/[^\n]/g, ' ');
|
|
273
|
+
at = end;
|
|
263
274
|
}
|
|
264
|
-
return
|
|
275
|
+
return out + text.slice(at);
|
|
265
276
|
}
|
|
266
277
|
|
|
267
278
|
/**
|
|
@@ -287,6 +298,8 @@ function parseSource(text, ext) {
|
|
|
287
298
|
sourceType: 'unambiguous',
|
|
288
299
|
plugins,
|
|
289
300
|
errorRecovery: true,
|
|
301
|
+
// The checks read the file's list of comments, never a node's.
|
|
302
|
+
attachComment: false,
|
|
290
303
|
});
|
|
291
304
|
} catch {
|
|
292
305
|
// try the next set of syntax plugins
|
|
@@ -311,15 +324,24 @@ function commentRanges(text, ext, ast = parseSource(text, ext)) {
|
|
|
311
324
|
);
|
|
312
325
|
}
|
|
313
326
|
|
|
327
|
+
/**
|
|
328
|
+
* Whether a source can hold a `require()` or `import()` call: the word
|
|
329
|
+
* `require`, `import` followed by a parenthesis or a comment, or a Unicode
|
|
330
|
+
* escape, which can spell `require`. A source with none of these has no such
|
|
331
|
+
* call, so its syntax tree is not walked for one.
|
|
332
|
+
*/
|
|
333
|
+
const MAY_CALL = /\brequire\b|\bimport\s*(?:\(|\/[*/]|<!--|-->)|\\u/;
|
|
334
|
+
|
|
314
335
|
/**
|
|
315
336
|
* The imports a parsed source file makes, read from its syntax tree so that
|
|
316
337
|
* an import written in a string, a template literal or JSX text (a code
|
|
317
338
|
* sample on a page) is not one: import and export-from declarations, and
|
|
318
339
|
* `require()` and `import()` of a string.
|
|
319
340
|
* @param {any} ast
|
|
341
|
+
* @param {string} source the file's text
|
|
320
342
|
* @returns {{spec: string, names: string[], at: number}[]}
|
|
321
343
|
*/
|
|
322
|
-
function astImports(ast) {
|
|
344
|
+
function astImports(ast, source) {
|
|
323
345
|
/** @type {{spec: string, names: string[], at: number}[]} */
|
|
324
346
|
const found = [];
|
|
325
347
|
for (const node of ast.program.body) {
|
|
@@ -354,7 +376,7 @@ function astImports(ast) {
|
|
|
354
376
|
}
|
|
355
377
|
}
|
|
356
378
|
/** @type {any[]} */
|
|
357
|
-
const stack = [ast.program];
|
|
379
|
+
const stack = MAY_CALL.test(source) ? [ast.program] : [];
|
|
358
380
|
while (stack.length > 0) {
|
|
359
381
|
const node = stack.pop();
|
|
360
382
|
if (!node || typeof node.type !== 'string') continue;
|
|
@@ -384,7 +406,8 @@ function astImports(ast) {
|
|
|
384
406
|
* @param {string} text
|
|
385
407
|
*/
|
|
386
408
|
function scanOutComments(text) {
|
|
387
|
-
|
|
409
|
+
/** @type {Array<[number, number]>} */
|
|
410
|
+
const comments = [];
|
|
388
411
|
/** @type {string | null} the quote of the string being read */
|
|
389
412
|
let quote = null;
|
|
390
413
|
for (let i = 0; i < text.length; i++) {
|
|
@@ -405,10 +428,10 @@ function scanOutComments(text) {
|
|
|
405
428
|
next === '/'
|
|
406
429
|
? (text.indexOf('\n', i) + 1 || text.length + 1) - 1
|
|
407
430
|
: (text.indexOf('*/', i + 2) + 1 || text.length - 1) + 1;
|
|
408
|
-
|
|
431
|
+
comments.push([i, end]);
|
|
409
432
|
i = end - 1;
|
|
410
433
|
}
|
|
411
|
-
return
|
|
434
|
+
return blankRanges(text, comments);
|
|
412
435
|
}
|
|
413
436
|
|
|
414
437
|
/**
|
|
@@ -634,7 +657,9 @@ export function scanBuilt(target, packages, {fileLimit} = {}) {
|
|
|
634
657
|
const astryxNames = new Set();
|
|
635
658
|
const iconNames = new Set();
|
|
636
659
|
let fileImports = 0;
|
|
637
|
-
for (const {spec, names, at} of ast
|
|
660
|
+
for (const {spec, names, at} of ast
|
|
661
|
+
? astImports(ast, raw)
|
|
662
|
+
: importsOf(text)) {
|
|
638
663
|
if (isAstryxSpecifier(spec, packages)) {
|
|
639
664
|
fileImports++;
|
|
640
665
|
imported.add(
|
package/api/doctor/doctor.d.mts
CHANGED
|
@@ -310,9 +310,10 @@ export function checkComputerIntegrationsAvailable({ installed, candidates, inst
|
|
|
310
310
|
elsewhere?: boolean;
|
|
311
311
|
}): DoctorCheck;
|
|
312
312
|
/**
|
|
313
|
-
* Where `search` and `build` keep their gathered catalog between runs,
|
|
314
|
-
*
|
|
315
|
-
* run
|
|
313
|
+
* Where `search` and `build` keep their gathered catalog between runs, how
|
|
314
|
+
* much it holds, and the most it and jiti's transpile cache hold; and, in a
|
|
315
|
+
* run under Yarn Plug'n'Play's loader, that the run keeps none
|
|
316
|
+
* (runsUnderPnp). Left out of a checkout, which keeps none.
|
|
316
317
|
* @returns {DoctorCheck | null}
|
|
317
318
|
*/
|
|
318
319
|
export function checkGatherCache(): DoctorCheck | null;
|
package/api/doctor/doctor.mjs
CHANGED
|
@@ -101,6 +101,7 @@ import {
|
|
|
101
101
|
} from '../../foundation/agent-docs/computer-agent-text.mjs';
|
|
102
102
|
import {
|
|
103
103
|
keptFileCheck,
|
|
104
|
+
THEME_WIRING_CODEC,
|
|
104
105
|
alignCommand,
|
|
105
106
|
addCliCommandFor,
|
|
106
107
|
computerAgentTextState,
|
|
@@ -2309,9 +2310,10 @@ async function runComputerChecks(cwd) {
|
|
|
2309
2310
|
}
|
|
2310
2311
|
|
|
2311
2312
|
/**
|
|
2312
|
-
* Where `search` and `build` keep their gathered catalog between runs,
|
|
2313
|
-
*
|
|
2314
|
-
* run
|
|
2313
|
+
* Where `search` and `build` keep their gathered catalog between runs, how
|
|
2314
|
+
* much it holds, and the most it and jiti's transpile cache hold; and, in a
|
|
2315
|
+
* run under Yarn Plug'n'Play's loader, that the run keeps none
|
|
2316
|
+
* (runsUnderPnp). Left out of a checkout, which keeps none.
|
|
2315
2317
|
* @returns {DoctorCheck | null}
|
|
2316
2318
|
*/
|
|
2317
2319
|
export function checkGatherCache() {
|
|
@@ -2322,7 +2324,7 @@ export function checkGatherCache() {
|
|
|
2322
2324
|
id: 'gather-cache',
|
|
2323
2325
|
label: 'Kept catalog cache',
|
|
2324
2326
|
status: 'info',
|
|
2325
|
-
message: `search, build, component, template, theme, discover, docs and doctor keep what they gather (search's catalogs, each integration's check results, template discovery's records, integrations' theme records, and doctor's docs checks) in ${summary.dir} (${summary.entries} ${summary.entries === 1 ? 'entry' : 'entries'}, ${size})${summary.pnp ? ", but not in a run under Yarn Plug'n'Play's loader, such as `yarn astryx`, which gathers every time" : ''}; each is used only while nothing it read has changed, and deleting the folder clears it.`,
|
|
2327
|
+
message: `search, build, component, template, theme, discover, docs and doctor keep what they gather (search's catalogs, each integration's check results, template discovery's records, the component list, integrations' theme records, the docs not-found hint's name summaries, and doctor's docs checks and theme-wiring scan) in ${summary.dir} (${summary.entries} ${summary.entries === 1 ? 'entry' : 'entries'}, ${size})${summary.pnp ? ", but not in a run under Yarn Plug'n'Play's loader, such as `yarn astryx`, which gathers every time" : ''}; each is used only while nothing it read has changed, and deleting the folder clears it. The folder holds at most ${summary.limitBytes / (1024 * 1024)} MB and removes its oldest entries first, as does the transpile cache in ${summary.jitiDir}, which keeps every copy written in the last day, or read in the last day where the file system records reads.`,
|
|
2326
2328
|
};
|
|
2327
2329
|
}
|
|
2328
2330
|
|
|
@@ -2555,10 +2557,15 @@ export async function runChecks(options = {}) {
|
|
|
2555
2557
|
if (check) checks.push(check);
|
|
2556
2558
|
if (fn === checkVersionAlignment) {
|
|
2557
2559
|
const appThemeChecks = await checkAppThemes(cwd);
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2560
|
+
// The wiring scan reads only files and modules (the app's source, the
|
|
2561
|
+
// themes and the packages that declare them) and runs nothing, so it is
|
|
2562
|
+
// kept like the docs checks.
|
|
2563
|
+
const wiring = await keptFileCheck(
|
|
2564
|
+
{name: 'theme-wiring', cwd, coreDir: coreDir ?? null},
|
|
2565
|
+
() => themeImportWiring(cwd),
|
|
2566
|
+
THEME_WIRING_CODEC,
|
|
2561
2567
|
);
|
|
2568
|
+
checks.push(checkThemes(cwd, appThemeChecks, wiring), ...appThemeChecks);
|
|
2562
2569
|
checks.push(await checkConfig(ctx));
|
|
2563
2570
|
}
|
|
2564
2571
|
}
|
|
@@ -13,6 +13,7 @@ import postcss from 'postcss';
|
|
|
13
13
|
import {
|
|
14
14
|
collectUnloadedFonts,
|
|
15
15
|
discoverDoctorThemes,
|
|
16
|
+
themeIdentifier,
|
|
16
17
|
discoverDoctorUnmigratedCopies,
|
|
17
18
|
corePeerRange,
|
|
18
19
|
findDoctorCoreDir,
|
|
@@ -32,15 +33,15 @@ import {
|
|
|
32
33
|
resolveRecordedTheme,
|
|
33
34
|
resolveThemeModule,
|
|
34
35
|
SOURCE_EXTENSIONS,
|
|
36
|
+
doctorStylesheetImportFile,
|
|
37
|
+
fileMark,
|
|
38
|
+
generatedSourceCommand,
|
|
35
39
|
isPrivateVarRefusal,
|
|
36
40
|
missingThemePackage,
|
|
37
41
|
packageInstallCommand,
|
|
38
42
|
themeBuild,
|
|
39
43
|
themeRecordOwner,
|
|
40
44
|
validateThemePrivateInputs,
|
|
41
|
-
GENERATED_MARKER,
|
|
42
|
-
APP_COPY_MARK,
|
|
43
|
-
EDITOR_GENERATED_MARK,
|
|
44
45
|
} from './_adapter.mjs';
|
|
45
46
|
import {
|
|
46
47
|
getCliInvocation,
|
|
@@ -117,7 +118,15 @@ function refreshThemeCommand(projectDir, run, available, slug, owner) {
|
|
|
117
118
|
}
|
|
118
119
|
const source = theme
|
|
119
120
|
? relative(projectDir, path.join(theme.sourceDir, theme.entry))
|
|
120
|
-
: projectPath(path.join(owner, slug, `${slug}Theme.ts`));
|
|
121
|
+
: projectPath(path.join(owner, slug, `${themeIdentifier(slug)}Theme.ts`));
|
|
122
|
+
// A source another command generates (its leading comment carries that
|
|
123
|
+
// command's mark), or a missing one that command writes: the fix is that
|
|
124
|
+
// command, which writes the source and its outputs together.
|
|
125
|
+
const by = generatedSourceCommand(path.resolve(projectDir, source));
|
|
126
|
+
if (by)
|
|
127
|
+
return /^astryx\s/.test(by)
|
|
128
|
+
? `${run} ${by.replace(/^astryx\s+/, '')}; ${run} theme add ${slug}`
|
|
129
|
+
: `Rebuild ${projectPath(path.dirname(source))}/ with ${by}, then run ${run} theme add ${slug}`;
|
|
121
130
|
return `${run} theme build ${source}; ${run} theme add ${slug}`;
|
|
122
131
|
}
|
|
123
132
|
|
|
@@ -225,12 +234,7 @@ function sourceImportEvidence(root, generatedModule) {
|
|
|
225
234
|
* @param {string} source
|
|
226
235
|
*/
|
|
227
236
|
function generatedThemeFile(source) {
|
|
228
|
-
|
|
229
|
-
/^\s*(?:\/\*[\s\S]*?\*\/|(?:\/\/[^\n]*(?:\n|$)\s*)+)/.exec(source)?.[0] ??
|
|
230
|
-
'';
|
|
231
|
-
return [GENERATED_MARKER, EDITOR_GENERATED_MARK, APP_COPY_MARK].some(m =>
|
|
232
|
-
leading.includes(m),
|
|
233
|
-
);
|
|
237
|
+
return fileMark(source) != null;
|
|
234
238
|
}
|
|
235
239
|
|
|
236
240
|
/**
|
|
@@ -447,19 +451,61 @@ function namedThemeFonts(files) {
|
|
|
447
451
|
return new Set(names.values());
|
|
448
452
|
}
|
|
449
453
|
|
|
450
|
-
/**
|
|
451
|
-
|
|
454
|
+
/**
|
|
455
|
+
* The families a font stylesheet loads with `@font-face`, following its
|
|
456
|
+
* local `@import`s (a relative file, or a package's stylesheet such as
|
|
457
|
+
* `@fontsource/inter/index.css`); `external` when it imports a URL
|
|
458
|
+
* (http, https, `//`), whose families doctor cannot read.
|
|
459
|
+
* @param {string} css
|
|
460
|
+
* @param {string} [file] the stylesheet's path, to resolve local imports
|
|
461
|
+
* @param {Set<string>} [seen]
|
|
462
|
+
*/
|
|
463
|
+
function fontStylesheetEvidence(css, file, seen = new Set()) {
|
|
452
464
|
const loaded = new Set();
|
|
453
465
|
let external = false;
|
|
466
|
+
let unread = false;
|
|
454
467
|
const root = postcss.parse(css);
|
|
455
468
|
root.walkAtRules(atRule => {
|
|
456
|
-
if (atRule.name.toLowerCase() === 'import')
|
|
469
|
+
if (atRule.name.toLowerCase() === 'import') {
|
|
470
|
+
const spec = [...doctorStylesheetImports(`@import ${atRule.params};`)][0];
|
|
471
|
+
if (!spec || /^(?:https?:)?\/\//i.test(spec)) {
|
|
472
|
+
external = true;
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
const target = file ? doctorStylesheetImportFile(spec, file) : null;
|
|
476
|
+
if (!target) {
|
|
477
|
+
// A local import doctor cannot follow may load the font: it
|
|
478
|
+
// cannot prove it either way.
|
|
479
|
+
unread = true;
|
|
480
|
+
return;
|
|
481
|
+
}
|
|
482
|
+
if (seen.has(target)) return;
|
|
483
|
+
if (seen.size > 20) {
|
|
484
|
+
// Past the limit doctor follows, the rest is not proven either way.
|
|
485
|
+
unread = true;
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
seen.add(target);
|
|
489
|
+
try {
|
|
490
|
+
const inner = fontStylesheetEvidence(
|
|
491
|
+
readTextFile(target),
|
|
492
|
+
target,
|
|
493
|
+
seen,
|
|
494
|
+
);
|
|
495
|
+
for (const name of inner.loaded) loaded.add(name);
|
|
496
|
+
external ||= inner.external;
|
|
497
|
+
unread ||= inner.unread;
|
|
498
|
+
} catch {
|
|
499
|
+
unread = true;
|
|
500
|
+
}
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
457
503
|
if (atRule.name.toLowerCase() !== 'font-face') return;
|
|
458
504
|
atRule.walkDecls(/^font-family$/iu, declaration => {
|
|
459
505
|
loaded.add(normalizeFontName(declaration.value).toLowerCase());
|
|
460
506
|
});
|
|
461
507
|
});
|
|
462
|
-
return {loaded, external};
|
|
508
|
+
return {loaded, external, unread};
|
|
463
509
|
}
|
|
464
510
|
|
|
465
511
|
/** @param {import('postcss').Rule} rule @param {string} slug */
|
|
@@ -702,6 +748,9 @@ export async function themeImportWiring(cwd) {
|
|
|
702
748
|
} catch {
|
|
703
749
|
continue;
|
|
704
750
|
}
|
|
751
|
+
// A file the CLI generates (a theme build, the editor's files) imports
|
|
752
|
+
// its base to extend it, never to render it: it wires nothing.
|
|
753
|
+
if (generatedThemeFile(source)) continue;
|
|
705
754
|
const shown = relative(projectDir, file);
|
|
706
755
|
const candidates = themes.filter(
|
|
707
756
|
theme =>
|
|
@@ -718,6 +767,11 @@ export async function themeImportWiring(cwd) {
|
|
|
718
767
|
path.extname(file) === '.css'
|
|
719
768
|
? doctorStylesheetImports(source)
|
|
720
769
|
: moduleSpecifiers(source, {runtimeOnly: true});
|
|
770
|
+
// An import used only as a theme's `extends` (a theme source such
|
|
771
|
+
// as the editor's) renders nothing.
|
|
772
|
+
if (path.extname(file) !== '.css')
|
|
773
|
+
for (const from of extendOnlySpecifiers(parseModule(source)))
|
|
774
|
+
specifiers.delete(from);
|
|
721
775
|
} catch {
|
|
722
776
|
specifiers = new Set();
|
|
723
777
|
}
|
|
@@ -1066,14 +1120,48 @@ export async function checkAppThemes(cwd) {
|
|
|
1066
1120
|
label: 'Theme owners and built imports',
|
|
1067
1121
|
status: 'fail',
|
|
1068
1122
|
message: discoveryError.message,
|
|
1069
|
-
|
|
1123
|
+
// The added theme the broken folder holds, by its name.
|
|
1124
|
+
fix: (() => {
|
|
1125
|
+
const named = ownerEntries.find(([slug]) =>
|
|
1126
|
+
new RegExp(
|
|
1127
|
+
`(^|[\\s/"'(])${slug.replace(/[-]/g, '\\-')}([\\s/"').,:]|$)`,
|
|
1128
|
+
).test(discoveryError.message),
|
|
1129
|
+
)?.[0];
|
|
1130
|
+
if (!named)
|
|
1131
|
+
return 'Fix or move what the message names, then run doctor again.';
|
|
1132
|
+
// A theme another command generates: that command writes it again
|
|
1133
|
+
// (its fix is no `theme build`).
|
|
1134
|
+
const owner = String(state.themes[named]);
|
|
1135
|
+
const fix = isLocalThemeOwner(owner)
|
|
1136
|
+
? refreshThemeCommand(state.projectDir, run, [], named, owner)
|
|
1137
|
+
: null;
|
|
1138
|
+
return fix && !fix.includes(' theme build ')
|
|
1139
|
+
? fix
|
|
1140
|
+
: `Fix or move what the message names, then run ${run} theme add ${named}`;
|
|
1141
|
+
})(),
|
|
1070
1142
|
});
|
|
1071
1143
|
} else if (resolutionProblems.length > 0) {
|
|
1072
1144
|
checks.push({
|
|
1073
1145
|
id: 'theme-owners',
|
|
1074
1146
|
label: 'Theme owners and built imports',
|
|
1075
1147
|
status: 'fail',
|
|
1076
|
-
message: resolutionProblems
|
|
1148
|
+
message: resolutionProblems
|
|
1149
|
+
.map(problem =>
|
|
1150
|
+
// A theme another command generates is not rebuilt with `theme
|
|
1151
|
+
// build`: its fix names that command, so its message does not.
|
|
1152
|
+
refreshThemeCommand(
|
|
1153
|
+
state.projectDir,
|
|
1154
|
+
run,
|
|
1155
|
+
available,
|
|
1156
|
+
problem.slug,
|
|
1157
|
+
problem.owner,
|
|
1158
|
+
).includes(' theme build ')
|
|
1159
|
+
? problem.message
|
|
1160
|
+
: problem.message
|
|
1161
|
+
.replace(/\s*Run `[^`]*theme build[^`]*` and try again\./, '')
|
|
1162
|
+
.replace(/\s*Rebuild it with `[^`]*theme build[^`]*`\.?/, ''),
|
|
1163
|
+
)
|
|
1164
|
+
.join(' '),
|
|
1077
1165
|
fix: resolutionProblems
|
|
1078
1166
|
.map(problem =>
|
|
1079
1167
|
refreshThemeCommand(
|
|
@@ -1231,8 +1319,14 @@ export async function checkAppThemes(cwd) {
|
|
|
1231
1319
|
);
|
|
1232
1320
|
if (!availableTheme) continue;
|
|
1233
1321
|
try {
|
|
1322
|
+
const sourceFile = path.join(
|
|
1323
|
+
availableTheme.sourceDir,
|
|
1324
|
+
availableTheme.entry,
|
|
1325
|
+
);
|
|
1326
|
+
// Every added local theme is compared, a copy another command
|
|
1327
|
+
// generates included; only its fix names that command.
|
|
1234
1328
|
const receipt = await themeBuild(
|
|
1235
|
-
|
|
1329
|
+
sourceFile,
|
|
1236
1330
|
{check: true},
|
|
1237
1331
|
{cwd: state.projectDir, projectCore: true},
|
|
1238
1332
|
);
|
|
@@ -1469,6 +1563,8 @@ export async function checkAppThemes(cwd) {
|
|
|
1469
1563
|
|
|
1470
1564
|
const fontFailures = [];
|
|
1471
1565
|
const externalFontWarnings = [];
|
|
1566
|
+
/** Families behind a local font import doctor could not follow. */
|
|
1567
|
+
const unreadFontWarnings = [];
|
|
1472
1568
|
const missingFontWarnings = [];
|
|
1473
1569
|
let generatedImports = null;
|
|
1474
1570
|
try {
|
|
@@ -1509,6 +1605,7 @@ export async function checkAppThemes(cwd) {
|
|
|
1509
1605
|
try {
|
|
1510
1606
|
const evidence = fontStylesheetEvidence(
|
|
1511
1607
|
readTextFile(theme.fontStylesheetFile),
|
|
1608
|
+
theme.fontStylesheetFile,
|
|
1512
1609
|
);
|
|
1513
1610
|
const missing = [...names].filter(
|
|
1514
1611
|
name => !evidence.loaded.has(name.toLowerCase()),
|
|
@@ -1516,6 +1613,8 @@ export async function checkAppThemes(cwd) {
|
|
|
1516
1613
|
if (missing.length === 0) continue;
|
|
1517
1614
|
if (evidence.external) {
|
|
1518
1615
|
externalFontWarnings.push(`${theme.slug}: ${missing.join(', ')}`);
|
|
1616
|
+
} else if (evidence.unread) {
|
|
1617
|
+
unreadFontWarnings.push(`${theme.slug}: ${missing.join(', ')}`);
|
|
1519
1618
|
} else {
|
|
1520
1619
|
fontFailures.push({theme, message: missing.join(', ')});
|
|
1521
1620
|
}
|
|
@@ -1553,6 +1652,11 @@ export async function checkAppThemes(cwd) {
|
|
|
1553
1652
|
);
|
|
1554
1653
|
}
|
|
1555
1654
|
}
|
|
1655
|
+
if (unreadFontWarnings.length > 0) {
|
|
1656
|
+
fontWarningMessages.push(
|
|
1657
|
+
`Font imports doctor could not follow prevent proof for ${unreadFontWarnings.join('; ')}.`,
|
|
1658
|
+
);
|
|
1659
|
+
}
|
|
1556
1660
|
if (externalFontWarnings.length > 0) {
|
|
1557
1661
|
fontWarningMessages.push(
|
|
1558
1662
|
`External font imports prevent proof for ${externalFontWarnings.join('; ')}.`,
|