@astryxdesign/cli 0.7.15 → 0.7.16-canary.g07c77c0
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 +5 -3
- package/api/build/_adapter.d.mts +1 -0
- package/api/build/blocks/blocks.d.mts +1 -0
- package/api/build/blocks/blocks.mjs +18 -1
- package/api/component/_adapter.d.mts +1 -1
- package/api/component/_adapter.mjs +28 -1
- package/api/doctor/_adapter.d.mts +17 -0
- package/api/doctor/_adapter.mjs +43 -0
- package/api/doctor/built-checks.mjs +1 -1
- package/api/doctor/doctor.mjs +18 -4
- package/api/doctor/theme-checks.mjs +1 -1
- package/api/integration/add-contribution.mjs +3 -3
- package/api/integration/pack-check.mjs +14 -8
- package/api/integration/validate-integration.mjs +1 -1
- package/api/search/_adapter.mjs +15 -16
- package/api/search/_entries.d.mts +2 -1
- package/api/search/_entries.mjs +28 -1
- package/api/swizzle/_moduleGraph.mjs +1 -1
- package/api/theme/_adapter.d.mts +5 -2
- package/api/theme/_adapter.mjs +43 -12
- package/api/theme/_fork.mjs +1 -1
- package/api/theme/build/build.d.mts +116 -32
- package/api/theme/build/build.mjs +449 -102
- package/api/theme/eject/eject.mjs +22 -1
- package/api/theme/template/template.d.mts +19 -0
- package/api/theme/template/template.mjs +102 -25
- package/api/theme/theme.type.d.mts +5 -1
- package/api/theme/theme.type.mjs +2 -1
- package/api/theme/themeBuild.doc.mjs +3 -3
- package/api/theme/themeEject.doc.mjs +1 -1
- package/api/theme/themeTemplate.doc.mjs +9 -3
- package/api/theme-edit/_adapter.d.mts +32 -2
- package/api/theme-edit/_adapter.mjs +213 -36
- package/api/theme-edit/_check.d.mts +69 -3
- package/api/theme-edit/_check.mjs +1517 -218
- package/api/theme-edit/_color.d.mts +2 -8
- package/api/theme-edit/_color.mjs +292 -219
- package/api/theme-edit/_compiler.d.mts +1 -0
- package/api/theme-edit/_compiler.mjs +20 -1
- package/api/theme-edit/_context.d.mts +29 -0
- package/api/theme-edit/_context.mjs +426 -40
- package/api/theme-edit/_css.d.mts +60 -1
- package/api/theme-edit/_css.mjs +404 -28
- package/api/theme-edit/_edit.d.mts +9 -0
- package/api/theme-edit/_edit.mjs +1300 -135
- package/api/theme-edit/_how-commands.d.mts +11 -26
- package/api/theme-edit/_how-commands.mjs +30 -2
- package/api/theme-edit/_how-question.d.mts +7 -0
- package/api/theme-edit/_how-question.mjs +1304 -176
- package/api/theme-edit/_how.mjs +144 -30
- package/api/theme-edit/_overview.mjs +2 -0
- package/api/theme-edit/_palette.d.mts +11 -0
- package/api/theme-edit/_palette.mjs +194 -65
- package/api/theme-edit/_parts.d.mts +33 -0
- package/api/theme-edit/_parts.mjs +138 -9
- package/api/theme-edit/_png.d.mts +18 -0
- package/api/theme-edit/_png.mjs +95 -14
- package/api/theme-edit/_preview-app.d.mts +9 -0
- package/api/theme-edit/_preview-app.mjs +1191 -71
- package/api/theme-edit/_preview.d.mts +16 -3
- package/api/theme-edit/_preview.mjs +335 -30
- package/api/theme-edit/_project.d.mts +11 -0
- package/api/theme-edit/_project.mjs +46 -12
- package/api/theme-edit/_settings.d.mts +240 -5
- package/api/theme-edit/_settings.mjs +2561 -115
- package/api/theme-edit/_tables.d.mts +24 -0
- package/api/theme-edit/_tables.mjs +211 -149
- package/api/theme-edit/_vet.d.mts +42 -0
- package/api/theme-edit/_vet.mjs +144 -0
- package/api/theme-edit/theme-edit.type.d.mts +2 -1
- package/api/theme-edit/theme-edit.type.mjs +1 -1
- package/api/theme-edit/themeEditNew.doc.mjs +1 -1
- package/api/theme-edit/themeEditShow.doc.mjs +11 -3
- package/api/upgrade/registry/registry.mjs +6 -1
- package/assets/codemods/parse.mjs +2 -2
- package/assets/docs/tree/single-component.doc.mjs +11 -2
- package/assets/docs/tree/tokens-and-setup.doc.mjs +39 -3
- package/assets/docs.generated.json +2 -2
- package/assets/preview-app/next.config.mjs +7 -1
- package/assets/preview-app/package.json +1 -0
- package/assets/preview-app/src/app/globals.css +1 -0
- package/assets/self-audit.generated.json +1 -1
- package/assets/templates/blocks/components/Table/ColumnsVirtualizationHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/Table/ColumnsVirtualizationHookUsage.tsx +53 -0
- package/assets/templates/blocks/components/Table/InfiniteScrollHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/Table/InfiniteScrollHookUsage.tsx +33 -0
- package/assets/templates/components.generated.json +1 -1
- package/assets/templates/pages/dashboard/page.tsx +1 -1
- package/authoring/doctypes/_schema.d.mts +52 -5
- package/authoring/doctypes/_schema.mjs +62 -7
- package/authoring/doctypes/base/type.ts +10 -0
- package/authoring/doctypes/component/component.doc.mjs +1 -1
- package/authoring/doctypes/function/function.doc.mjs +6 -0
- package/authoring/doctypes/function/type.ts +3 -0
- package/authoring/doctypes/legacy.mjs +5 -1
- package/authoring/index.d.ts +1 -0
- package/authoring/shadcn/source-variants.d.mts +1 -1
- package/authoring/shadcn/source-variants.mjs +32 -10
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/doctor.doc.mjs +2 -2
- package/clients/cli/commands/experimental/theme.mjs +237 -45
- package/clients/cli/commands/experimental-theme-compile.doc.mjs +2 -2
- package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +2 -2
- package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +2 -2
- package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +3 -3
- package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +2 -2
- package/clients/cli/commands/experimental-theme-editor.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-eject.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-preview-add.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-template.doc.mjs +2 -2
- package/clients/cli/commands/theme-build.doc.mjs +2 -2
- package/clients/cli/commands/theme-eject.doc.mjs +1 -1
- package/clients/cli/commands/theme-template.doc.mjs +3 -1
- package/clients/cli/commands/theme.mjs +190 -46
- package/clients/cli/formatters/index.mjs +7 -4
- package/clients/cli/lib/cli-error.mjs +9 -3
- package/clients/cli/lib/component-format.mjs +27 -9
- package/clients/cli/lib/json-shim.mjs +72 -2
- package/clients/cli/manifest.generated.json +1 -1
- package/clients/cli/run.mjs +49 -0
- package/foundation/agent-docs/agent-docs-target.d.mts +2 -6
- package/foundation/agent-docs/agent-docs-target.mjs +9 -17
- package/foundation/agent-docs/agent-docs.mjs +3 -2
- package/foundation/config/config-writer.mjs +2 -2
- package/foundation/config/project.mjs +60 -14
- package/foundation/discovery/component-discovery.mjs +5 -17
- package/foundation/discovery/icon-set-writer.mjs +1 -1
- package/foundation/discovery/module-exports.mjs +1 -15
- package/foundation/discovery/template-adapter.mjs +44 -19
- package/foundation/discovery/template-source-tree.mjs +3 -16
- package/foundation/discovery/theme-discovery.d.mts +5 -1
- package/foundation/discovery/theme-discovery.mjs +30 -35
- package/foundation/fs/exact-codec.d.mts +35 -0
- package/foundation/fs/exact-codec.mjs +148 -0
- package/foundation/fs/gather-cache.d.mts +15 -5
- package/foundation/fs/gather-cache.mjs +123 -30
- package/foundation/fs/paths.d.mts +39 -0
- package/foundation/fs/paths.mjs +44 -11
- package/foundation/fs/read-record.mjs +11 -1
- package/foundation/integrations/contribution-fixes.mjs +1 -16
- package/foundation/integrations/may-have-integrations.mjs +3 -2
- package/foundation/integrations/public-imports.mjs +1 -1
- package/foundation/render/embedded-imports.mjs +1 -1
- package/foundation/render/host-exit.d.mts +8 -0
- package/foundation/render/host-exit.mjs +11 -0
- package/foundation/render/page-host.mjs +56 -10
- package/foundation/render/page-worker.mjs +14 -0
- package/foundation/render/render-page.mjs +37 -2
- package/foundation/response/error-codes.d.mts +2 -1
- package/foundation/response/error-codes.d.ts +1 -0
- package/foundation/response/error-codes.doc.mjs +5 -0
- package/foundation/response/error-codes.mjs +3 -0
- package/foundation/response/json.d.mts +15 -0
- package/foundation/response/json.mjs +52 -1
- package/foundation/response/response-types.doc.mjs +1 -1
- package/foundation/runtime/lazy-dependencies.d.mts +14 -0
- package/foundation/runtime/lazy-dependencies.mjs +82 -0
- package/foundation/xle/browser.d.mts +2 -2
- package/package.json +7 -6
package/api/theme/_adapter.mjs
CHANGED
|
@@ -16,6 +16,7 @@ import {createRequire} from 'node:module';
|
|
|
16
16
|
import {
|
|
17
17
|
findCarriedCoreDir,
|
|
18
18
|
findPackageRoot,
|
|
19
|
+
projectWritePath,
|
|
19
20
|
requireCoreDir,
|
|
20
21
|
} from '../../foundation/fs/paths.mjs';
|
|
21
22
|
import {tryLock, userCacheDir} from '../../foundation/release/cache.mjs';
|
|
@@ -645,8 +646,10 @@ function themeDescriptorName(file) {
|
|
|
645
646
|
* @param {{cwd: string, targetPath?: string, overwrite?: boolean, takenSlugs?: Set<string>}} options
|
|
646
647
|
* `takenSlugs`: the slugs of the themes the project can use, which a fork's
|
|
647
648
|
* new folder name may not take
|
|
648
|
-
* @returns {{outputDir: string, files: string[]
|
|
649
|
-
* directory
|
|
649
|
+
* @returns {{outputDir: string, files: string[], editorFolder: string | null}}
|
|
650
|
+
* the output directory relative to the working folder, the files written,
|
|
651
|
+
* named as the fork names them, and the folder the theme editor made that
|
|
652
|
+
* holds the fork, relative to the working folder, or null
|
|
650
653
|
*/
|
|
651
654
|
export function ejectThemeFiles(
|
|
652
655
|
theme,
|
|
@@ -655,15 +658,17 @@ export function ejectThemeFiles(
|
|
|
655
658
|
// The fork lands in the project, as list and add read it: the default root
|
|
656
659
|
// is the project's, and a relative [path] is read from the working folder
|
|
657
660
|
// but must stay inside the project.
|
|
658
|
-
|
|
659
|
-
//
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
661
|
+
// Read as every theme command reads a path it writes; a backslash
|
|
662
|
+
// separates folders on every platform.
|
|
663
|
+
const {
|
|
664
|
+
projectDir,
|
|
665
|
+
typed: targetPath,
|
|
666
|
+
relative: target,
|
|
667
|
+
} = projectWritePath(
|
|
668
|
+
cwd,
|
|
669
|
+
typedPath || undefined,
|
|
670
|
+
defaultEjectTarget(theme.slug),
|
|
671
|
+
);
|
|
667
672
|
let resolvedDir;
|
|
668
673
|
try {
|
|
669
674
|
resolvedDir = assertWithin(target, projectDir, {
|
|
@@ -830,7 +835,33 @@ export function ejectThemeFiles(
|
|
|
830
835
|
throw new AstryxError(message, undefined, ERROR_CODES.ERR_WRITE_FAILED);
|
|
831
836
|
}
|
|
832
837
|
|
|
833
|
-
|
|
838
|
+
const editorDir = enclosingEditorFolder(resolvedDir, projectDir);
|
|
839
|
+
return {
|
|
840
|
+
outputDir: path.relative(cwd, resolvedDir) || '.',
|
|
841
|
+
files: names,
|
|
842
|
+
editorFolder:
|
|
843
|
+
editorDir == null ? null : path.relative(cwd, editorDir) || '.',
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
* The nearest folder above `dir`, up to the project root, that the theme
|
|
849
|
+
* editor made, or null. Eject refuses the editor's folder itself; a subfolder
|
|
850
|
+
* of it is written as released CLIs did, with a warning.
|
|
851
|
+
* @param {string} dir
|
|
852
|
+
* @param {string} projectDir
|
|
853
|
+
* @returns {string | null}
|
|
854
|
+
*/
|
|
855
|
+
function enclosingEditorFolder(dir, projectDir) {
|
|
856
|
+
const root = path.resolve(projectDir);
|
|
857
|
+
let current = path.resolve(dir);
|
|
858
|
+
while (current !== root) {
|
|
859
|
+
const parent = path.dirname(current);
|
|
860
|
+
if (parent === current) return null;
|
|
861
|
+
current = parent;
|
|
862
|
+
if (editorThemeRecord(current)) return current;
|
|
863
|
+
}
|
|
864
|
+
return null;
|
|
834
865
|
}
|
|
835
866
|
|
|
836
867
|
/**
|
package/api/theme/_fork.mjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import * as path from 'node:path';
|
|
14
|
-
import {parse} from '
|
|
14
|
+
import {babelParse as parse} from '../../foundation/runtime/lazy-dependencies.mjs';
|
|
15
15
|
import {AstryxError} from '../error.mjs';
|
|
16
16
|
import {ERROR_CODES} from '../../foundation/response/error-codes.mjs';
|
|
17
17
|
import {
|
|
@@ -68,6 +68,46 @@ export function themeSourceFiles(filePath: string): string[];
|
|
|
68
68
|
* @returns {string[]} at most three paths
|
|
69
69
|
*/
|
|
70
70
|
export function themeSourceGuesses(file: string, cwd: string): string[];
|
|
71
|
+
/**
|
|
72
|
+
* Hand the theme editor warnings of the builds in this process to
|
|
73
|
+
* `listener` instead of the logger. CLI-internal: the watch child's
|
|
74
|
+
* hand-off to its parent.
|
|
75
|
+
* @param {((warning: string) => void) | null} listener
|
|
76
|
+
*/
|
|
77
|
+
export function setEditorFolderListener(listener: ((warning: string) => void) | null): void;
|
|
78
|
+
/**
|
|
79
|
+
* Tell `listener` when a build in this process finds private var errors.
|
|
80
|
+
* CLI-internal.
|
|
81
|
+
* @param {(() => void) | null} listener
|
|
82
|
+
*/
|
|
83
|
+
export function setPrivateVarErrorListener(listener: (() => void) | null): void;
|
|
84
|
+
/**
|
|
85
|
+
* A build's mode flags: what it does (`--check` compares, never writes) and
|
|
86
|
+
* where (`--out`), carried into every build command a refusal suggests.
|
|
87
|
+
* @typedef {{check?: boolean, out?: string, iconsSpecifier?: string}} BuildMode
|
|
88
|
+
*/
|
|
89
|
+
/**
|
|
90
|
+
* How a suggested build writes its source: `glob` leaves a pattern as typed
|
|
91
|
+
* (unquoted, so the shell expands it); `family` makes it a --family run,
|
|
92
|
+
* and `familyKey` names its key (a family run never takes --out).
|
|
93
|
+
* @typedef {{glob?: boolean, family?: boolean, familyKey?: string}} SuggestionShape
|
|
94
|
+
*/
|
|
95
|
+
/**
|
|
96
|
+
* The `theme build` command for `source` with the caller's mode flags, so a
|
|
97
|
+
* suggestion never turns a check into a write or moves the outputs.
|
|
98
|
+
* @param {string | string[]} source as the user types it, from cwd; several
|
|
99
|
+
* for a family (with `shape.familyKey`)
|
|
100
|
+
* @param {BuildMode} mode
|
|
101
|
+
* @param {string} cwd
|
|
102
|
+
* @param {{group: string, build: string}} [words] the command's own words
|
|
103
|
+
* (`experimental theme compile`), else `theme build`
|
|
104
|
+
* @param {SuggestionShape} [shape]
|
|
105
|
+
* @returns {string}
|
|
106
|
+
*/
|
|
107
|
+
export function buildSuggestion(source: string | string[], mode: BuildMode, cwd: string, words?: {
|
|
108
|
+
group: string;
|
|
109
|
+
build: string;
|
|
110
|
+
}, shape?: SuggestionShape): string;
|
|
71
111
|
/**
|
|
72
112
|
* Publish the outputs a batch deferred, one theme at a time, in build order.
|
|
73
113
|
* @param {Array<Array<{dest: string, content: string}>>} deferred
|
|
@@ -77,11 +117,12 @@ export function writeDeferredBuildOutputs(deferred: Array<Array<{
|
|
|
77
117
|
content: string;
|
|
78
118
|
}>>): void;
|
|
79
119
|
/**
|
|
80
|
-
* Import specifier for install/scaffold instructions
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
120
|
+
* Import specifier for install/scaffold instructions, from a file directly
|
|
121
|
+
* in the project's src/ (the file the printed snippet says it is relative
|
|
122
|
+
* to; callers pass the output folder from the outputs' project root): an output
|
|
123
|
+
* under src/ is `./themes/gothic/gothic`, one beside src/ is
|
|
124
|
+
* `../themes/gothic/gothic`.
|
|
125
|
+
* @param {string} relDir the output folder, relative to the outputs' project root
|
|
85
126
|
* @param {string} base
|
|
86
127
|
* @returns {string}
|
|
87
128
|
*/
|
|
@@ -155,6 +196,7 @@ export function printCompactTrailer(trailers: ThemeBuildTrailer[], { hint }?: {
|
|
|
155
196
|
* @param {{out?: string, check?: boolean, iconsSpecifier?: string}} [options]
|
|
156
197
|
* @param {{cwd?: string}} [ctx]
|
|
157
198
|
* @param {{compact?: boolean}} [report]
|
|
199
|
+
* @param {ThemeBuildHandOff} [handOff]
|
|
158
200
|
* @returns {Promise<{receipt: import('../theme.type.mjs').ThemeBuildResponse | import('../theme.type.mjs').ThemeBuildCheckResponse | null, trailer: ThemeBuildTrailer | null}>}
|
|
159
201
|
*/
|
|
160
202
|
export function themeBuildForReport(file: string, options?: {
|
|
@@ -165,7 +207,7 @@ export function themeBuildForReport(file: string, options?: {
|
|
|
165
207
|
cwd?: string;
|
|
166
208
|
}, { compact }?: {
|
|
167
209
|
compact?: boolean;
|
|
168
|
-
}): Promise<{
|
|
210
|
+
}, handOff?: ThemeBuildHandOff): Promise<{
|
|
169
211
|
receipt: import("../theme.type.mjs").ThemeBuildResponse | import("../theme.type.mjs").ThemeBuildCheckResponse | null;
|
|
170
212
|
trailer: ThemeBuildTrailer | null;
|
|
171
213
|
}>;
|
|
@@ -178,36 +220,37 @@ export function themeBuild(file: string, options?: {
|
|
|
178
220
|
cwd?: string;
|
|
179
221
|
projectCore?: boolean;
|
|
180
222
|
}): Promise<import("../theme.type.mjs").ThemeBuildResponse | import("../theme.type.mjs").ThemeBuildCheckResponse | null>;
|
|
181
|
-
/**
|
|
223
|
+
/**
|
|
224
|
+
* {@link themeBuild} with the CLI's hand-off: the same build, outputs, and
|
|
225
|
+
* receipt, plus what only the CLI's batch and scratch builds pass.
|
|
226
|
+
* CLI-internal: not exported from the API entry.
|
|
227
|
+
* @param {string} file
|
|
228
|
+
* @param {{out?: string, check?: boolean, iconsSpecifier?: string}} options
|
|
229
|
+
* @param {{cwd?: string, projectCore?: boolean}} ctx
|
|
230
|
+
* @param {ThemeBuildHandOff} handOff
|
|
231
|
+
* @returns {Promise<import('../theme.type.mjs').ThemeBuildResponse | import('../theme.type.mjs').ThemeBuildCheckResponse | null>}
|
|
232
|
+
*/
|
|
233
|
+
export function themeBuildWithHandOff(file: string, options: {
|
|
234
|
+
out?: string;
|
|
235
|
+
check?: boolean;
|
|
236
|
+
iconsSpecifier?: string;
|
|
237
|
+
}, ctx: {
|
|
238
|
+
cwd?: string;
|
|
239
|
+
projectCore?: boolean;
|
|
240
|
+
}, handOff: ThemeBuildHandOff): Promise<import("../theme.type.mjs").ThemeBuildResponse | import("../theme.type.mjs").ThemeBuildCheckResponse | null>;
|
|
241
|
+
/** @param {string[]} files @param {{familyKey: string, check?: boolean, iconsSpecifier?: string}} options @param {{cwd?: string}} [ctx] @param {{commandWords?: {group: string, build: string}}} [handOff] - the CLI's words for the rebuild hint */
|
|
182
242
|
export function themeBuildFamily(files: string[], options: {
|
|
183
243
|
familyKey: string;
|
|
184
244
|
check?: boolean;
|
|
185
245
|
iconsSpecifier?: string;
|
|
186
|
-
__onPrivateVarError?: () => void;
|
|
187
|
-
__commandWords?: {
|
|
188
|
-
group: string;
|
|
189
|
-
build: string;
|
|
190
|
-
};
|
|
191
246
|
}, { cwd }?: {
|
|
192
247
|
cwd?: string;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
upToDate: boolean;
|
|
198
|
-
stale: {
|
|
199
|
-
path: string;
|
|
200
|
-
reason: "missing" | "outdated";
|
|
201
|
-
}[];
|
|
202
|
-
checked: string[];
|
|
203
|
-
tokenCount?: undefined;
|
|
204
|
-
componentCount?: undefined;
|
|
205
|
-
sizeKB?: undefined;
|
|
206
|
-
outputs?: undefined;
|
|
207
|
-
warnings?: undefined;
|
|
208
|
-
notices?: undefined;
|
|
248
|
+
}, handOff?: {
|
|
249
|
+
commandWords?: {
|
|
250
|
+
group: string;
|
|
251
|
+
build: string;
|
|
209
252
|
};
|
|
210
|
-
} | {
|
|
253
|
+
}): Promise<import("../theme.type.mjs").ThemeBuildCheckResponse | {
|
|
211
254
|
type: string;
|
|
212
255
|
data: {
|
|
213
256
|
name: any;
|
|
@@ -222,9 +265,6 @@ export function themeBuildFamily(files: string[], options: {
|
|
|
222
265
|
};
|
|
223
266
|
warnings: any[];
|
|
224
267
|
notices: string[];
|
|
225
|
-
upToDate?: undefined;
|
|
226
|
-
stale?: undefined;
|
|
227
|
-
checked?: undefined;
|
|
228
268
|
};
|
|
229
269
|
}>;
|
|
230
270
|
/**
|
|
@@ -240,6 +280,25 @@ export type CoreBindings = {
|
|
|
240
280
|
generateOnMediaCSS: any;
|
|
241
281
|
generateAdaptationCSS: any;
|
|
242
282
|
};
|
|
283
|
+
/**
|
|
284
|
+
* A build's mode flags: what it does (`--check` compares, never writes) and
|
|
285
|
+
* where (`--out`), carried into every build command a refusal suggests.
|
|
286
|
+
*/
|
|
287
|
+
export type BuildMode = {
|
|
288
|
+
check?: boolean;
|
|
289
|
+
out?: string;
|
|
290
|
+
iconsSpecifier?: string;
|
|
291
|
+
};
|
|
292
|
+
/**
|
|
293
|
+
* How a suggested build writes its source: `glob` leaves a pattern as typed
|
|
294
|
+
* (unquoted, so the shell expands it); `family` makes it a --family run,
|
|
295
|
+
* and `familyKey` names its key (a family run never takes --out).
|
|
296
|
+
*/
|
|
297
|
+
export type SuggestionShape = {
|
|
298
|
+
glob?: boolean;
|
|
299
|
+
family?: boolean;
|
|
300
|
+
familyKey?: string;
|
|
301
|
+
};
|
|
243
302
|
/**
|
|
244
303
|
* How one `prop:value` pair on a component target is classified — the single
|
|
245
304
|
* vocabulary both the root and adaptation paths reason in.
|
|
@@ -287,3 +346,28 @@ export type ThemeBuildTrailer = {
|
|
|
287
346
|
*/
|
|
288
347
|
fontNotices: string[];
|
|
289
348
|
};
|
|
349
|
+
/**
|
|
350
|
+
* What the CLI hands a build beyond themeBuild's options. CLI-internal, never
|
|
351
|
+
* a themeBuild option: `claimedOutputs` records the outputs earlier builds in
|
|
352
|
+
* one run wrote, so a later theme cannot replace them; with `deferredWrites`
|
|
353
|
+
* the build adds its outputs to that list instead of writing them, for
|
|
354
|
+
* writeDeferredBuildOutputs; `writeRoot` replaces `cwd` as the directory every
|
|
355
|
+
* output must stay inside, for a scratch build; `commandWords` names the
|
|
356
|
+
* command in the rebuild hint; `prepareFamily`, `familyLoader`, and
|
|
357
|
+
* `familyInterception` make the build a family member's plan.
|
|
358
|
+
*/
|
|
359
|
+
export type ThemeBuildHandOff = {
|
|
360
|
+
prepareFamily?: boolean;
|
|
361
|
+
familyLoader?: any;
|
|
362
|
+
familyInterception?: any;
|
|
363
|
+
writeRoot?: string;
|
|
364
|
+
claimedOutputs?: Map<string, string>;
|
|
365
|
+
deferredWrites?: Array<Array<{
|
|
366
|
+
dest: string;
|
|
367
|
+
content: string;
|
|
368
|
+
}>>;
|
|
369
|
+
commandWords?: {
|
|
370
|
+
group: string;
|
|
371
|
+
build: string;
|
|
372
|
+
};
|
|
373
|
+
};
|