@astryxdesign/cli 0.6.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/CHANGELOG.md +48 -1
- package/README.md +76 -67
- package/api/build/build.test.mjs +37 -0
- package/api/build/build.type.mjs +1 -1
- package/api/build/kit/kit.mjs +31 -1
- package/api/component/_adapter.mjs +14 -28
- package/api/component/integration-import-agreement.test.mjs +318 -0
- package/api/doctor/doctor.d.mts +32 -3
- package/api/doctor/doctor.doc.mjs +2 -1
- package/api/doctor/doctor.mjs +97 -4
- package/api/doctor/doctor.test.mjs +90 -1
- package/api/gap-report/gap-report-worker.d.mts +4 -0
- package/api/gap-report/gap-report-worker.mjs +73 -0
- package/api/gap-report/gap-report.d.mts +81 -0
- package/api/gap-report/gap-report.doc.d.mts +9 -0
- package/api/gap-report/gap-report.doc.mjs +127 -0
- package/api/gap-report/gap-report.mjs +707 -0
- package/api/gap-report/gap-report.test.mjs +1210 -0
- package/api/gap-report/gap-report.type.d.mts +88 -0
- package/api/gap-report/gap-report.type.mjs +69 -0
- package/api/index.d.mts +8 -1
- package/api/index.mjs +24 -1
- package/api/integration/add-contribution.d.mts +44 -0
- package/api/integration/add-contribution.mjs +1160 -0
- package/api/integration/add-contribution.test.mjs +733 -0
- package/api/integration/add-helpers.d.mts +80 -0
- package/api/integration/add-helpers.mjs +333 -0
- package/api/integration/add-helpers.test.mjs +161 -0
- package/api/integration/add-theme.d.mts +10 -0
- package/api/integration/add-theme.mjs +332 -0
- package/api/integration/add-theme.test.mjs +194 -0
- package/api/integration/integration-authoring.type.d.mts +55 -0
- package/api/integration/integration-authoring.type.mjs +76 -0
- package/api/integration/integration-block-exports.test.mjs +4 -0
- package/api/integration/integrationAdd.doc.d.mts +5 -0
- package/api/integration/integrationAdd.doc.mjs +100 -0
- package/api/integration/integrationAddAgentDoc.doc.d.mts +5 -0
- package/api/integration/integrationAddAgentDoc.doc.mjs +49 -0
- package/api/integration/integrationAddCodemod.doc.d.mts +5 -0
- package/api/integration/integrationAddCodemod.doc.mjs +55 -0
- package/api/integration/integrationAddComponent.doc.d.mts +5 -0
- package/api/integration/integrationAddComponent.doc.mjs +49 -0
- package/api/integration/integrationAddDoc.doc.d.mts +5 -0
- package/api/integration/integrationAddDoc.doc.mjs +59 -0
- package/api/integration/integrationAddTemplate.doc.d.mts +5 -0
- package/api/integration/integrationAddTemplate.doc.mjs +55 -0
- package/api/integration/integrationAddTheme.doc.d.mts +5 -0
- package/api/integration/integrationAddTheme.doc.mjs +85 -0
- package/api/integration/integrationPackCheck.doc.d.mts +5 -0
- package/api/integration/integrationPackCheck.doc.mjs +35 -0
- package/api/integration/pack-check.d.mts +27 -0
- package/api/integration/pack-check.mjs +795 -0
- package/api/integration/pack-check.test.mjs +569 -0
- package/api/integration/pack-check.type.d.mts +45 -0
- package/api/integration/pack-check.type.mjs +56 -0
- package/api/integration/public-api.test.mjs +21 -0
- package/api/integration/validate-integration.mjs +221 -11
- package/api/integration/validate-integration.test.mjs +189 -5
- package/api/integration/validateIntegration.doc.mjs +2 -2
- package/api/json/index.ts +1 -0
- package/api/search/search.mjs +19 -1
- package/api/theme/_adapter.d.mts +26 -28
- package/api/theme/_adapter.mjs +101 -38
- package/api/theme/add/add.d.mts +2 -1
- package/api/theme/add/add.mjs +56 -20
- package/api/theme/add/add.test.mjs +1 -0
- package/api/theme/build/build.d.mts +25 -0
- package/api/theme/build/build.mjs +101 -70
- package/api/theme/build/build.test.mjs +77 -44
- package/api/theme/integration-themes.test.mjs +183 -0
- package/api/theme/list/list.d.mts +10 -2
- package/api/theme/list/list.mjs +31 -10
- package/api/theme/list/list.test.mjs +102 -23
- package/api/theme/listThemes.doc.d.mts +1 -5
- package/api/theme/listThemes.doc.mjs +6 -13
- package/api/theme/targets/targets.test.mjs +22 -8
- package/api/theme/theme.d.mts +1 -1
- package/api/theme/theme.mjs +1 -1
- package/api/theme/theme.type.d.mts +9 -0
- package/api/theme/theme.type.mjs +3 -1
- package/api/theme/themeAdd.doc.d.mts +1 -4
- package/api/theme/themeAdd.doc.mjs +31 -31
- package/api/theme/themeBuild.doc.mjs +1 -1
- package/api/theme/themeList.doc.d.mts +1 -4
- package/api/theme/themeList.doc.mjs +7 -15
- package/api/theme/themeListAvailable.doc.d.mts +8 -0
- package/api/theme/themeListAvailable.doc.mjs +57 -0
- package/api/theme/themeTargets.doc.mjs +21 -7
- package/api/upgrade/_adapter.d.mts +2 -0
- package/api/upgrade/_adapter.mjs +1 -0
- package/api/upgrade/registry/registry.d.mts +40 -0
- package/api/upgrade/registry/registry.mjs +1154 -0
- package/api/upgrade/registry/registry.test.mjs +826 -0
- package/api/upgrade/run/run.mjs +49 -8
- package/api/upgrade/status/status.d.mts +6 -4
- package/api/upgrade/status/status.mjs +26 -8
- package/api/upgrade/upgrade.d.mts +2 -2
- package/api/upgrade/upgrade.doc.mjs +33 -9
- package/api/upgrade/upgrade.mjs +34 -7
- package/api/upgrade/upgrade.test.mjs +198 -8
- package/api/upgrade/upgrade.type.d.mts +90 -1
- package/api/upgrade/upgrade.type.mjs +51 -2
- package/assets/docs/cli-integrations.doc.mjs +152 -28
- package/assets/docs/getting-started.doc.mjs +1 -1
- package/assets/docs/{shadcn-compatibility.doc.mjs → shadcn-compatibility.doc.draft.mjs} +23 -13
- package/assets/docs/styling.doc.mjs +3 -3
- package/assets/docs/theme.doc.dense.mjs +2 -2
- package/assets/docs/theme.doc.mjs +23 -13
- package/assets/docs/theme.doc.zh.mjs +1 -1
- package/assets/templates/blocks/components/BaseTypeahead/BaseTypeaheadCustomSearch.doc.mjs +2 -1
- package/assets/templates/blocks/components/BaseTypeahead/BaseTypeaheadCustomSearch.tsx +38 -12
- package/assets/templates/blocks/components/BaseTypeahead/BaseTypeaheadShowcase.doc.mjs +15 -0
- package/assets/templates/blocks/components/BaseTypeahead/BaseTypeaheadShowcase.tsx +87 -0
- package/assets/templates/blocks/components/BottomSheet/BottomSheetSwitcherReviewFlow.doc.mjs +23 -0
- package/assets/templates/blocks/components/BottomSheet/BottomSheetSwitcherReviewFlow.tsx +75 -0
- package/assets/templates/blocks/components/BreadcrumbItem/BreadcrumbItemShowcase.tsx +5 -19
- package/assets/templates/blocks/components/Center/CenterHorizontal.doc.mjs +3 -2
- package/assets/templates/blocks/components/Center/CenterHorizontal.tsx +4 -5
- package/assets/templates/blocks/components/Toast/ToastAction.tsx +2 -1
- package/assets/templates/blocks/components/Toast/ToastDeduplication.tsx +2 -1
- package/assets/templates/blocks/components/Toast/ToastDismiss.tsx +2 -1
- package/assets/templates/blocks/components/Toast/ToastShowcase.tsx +2 -1
- package/assets/templates/blocks/components/Toast/ToastStacking.tsx +2 -1
- package/assets/templates/blocks/components/Toast/ToastTypes.tsx +2 -1
- package/assets/templates/pages/dashboard/template.doc.mjs +2 -2
- package/assets/templates/pages/dashboard-alert-rail/template.doc.mjs +3 -2
- package/assets/templates/pages/dashboard-cohort-funnel/template.doc.mjs +3 -2
- package/assets/templates/pages/dashboard-comparison/template.doc.mjs +3 -3
- package/assets/templates/pages/dashboard-composition/template.doc.mjs +2 -2
- package/assets/templates/pages/dashboard-progress/template.doc.mjs +2 -2
- package/assets/templates/pages/dashboard-scorecard/template.doc.mjs +2 -2
- package/assets/templates/themes/butter/butterTheme.ts +3 -3
- package/assets/templates/themes/neutral/neutralTheme.ts +2 -2
- package/assets/templates/themes/stone/stoneTheme.ts +3 -3
- package/assets/theme.template.ts +4 -7
- package/authoring/config/config.doc.mjs +9 -1
- package/authoring/config/parse.d.mts +2 -0
- package/authoring/config/parse.mjs +28 -3
- package/authoring/config/parse.test.mjs +25 -3
- package/authoring/config/type.ts +3 -0
- package/authoring/doctypes/_schema.d.mts +3 -0
- package/authoring/doctypes/_schema.mjs +6 -1
- package/authoring/doctypes/base/type.ts +6 -6
- package/authoring/doctypes/component/component.doc.mjs +6 -0
- package/authoring/doctypes/component/type.ts +2 -0
- package/authoring/gap-report/parse.d.mts +63 -0
- package/authoring/gap-report/parse.mjs +121 -0
- package/authoring/gap-report/parse.test.mjs +172 -0
- package/authoring/gap-report/type.ts +107 -0
- package/authoring/index.d.mts +1 -0
- package/authoring/index.d.ts +12 -0
- package/authoring/index.mjs +4 -0
- package/authoring/integration/integration.doc.mjs +14 -2
- package/authoring/integration/parse.test.mjs +9 -4
- package/authoring/integration/schema.d.mts +2 -0
- package/authoring/integration/schema.mjs +1 -0
- package/authoring/integration/type.ts +23 -6
- package/authoring/shadcn/receipt.d.mts +219 -0
- package/authoring/shadcn/receipt.mjs +248 -0
- package/authoring/shadcn/receipt.test.mjs +187 -0
- package/authoring/shadcn/source-variants.d.mts +28 -0
- package/authoring/shadcn/source-variants.mjs +176 -0
- package/authoring/shadcn/source-variants.test.mjs +120 -0
- package/clients/cli/commands/build-theme.mjs +54 -19
- package/clients/cli/commands/build-theme.variants.test.mjs +15 -12
- package/clients/cli/commands/component/index.mjs +1 -1
- package/clients/cli/commands/docs.test.mjs +1 -0
- package/clients/cli/commands/doctor-integration.doc.mjs +1 -1
- package/clients/cli/commands/gap-report.doc.mjs +73 -0
- package/clients/cli/commands/gap-report.mjs +114 -0
- package/clients/cli/commands/gap-report.test.mjs +198 -0
- package/clients/cli/commands/import-hint-correctness.test.mjs +88 -0
- package/clients/cli/commands/integration-add.doc.mjs +88 -0
- package/clients/cli/commands/integration-authoring.test.mjs +177 -0
- package/clients/cli/commands/integration-pack.doc.mjs +34 -0
- package/clients/cli/commands/integration-real-world.test.mjs +618 -0
- package/clients/cli/commands/integration.doc.mjs +28 -0
- package/clients/cli/commands/integration.mjs +153 -0
- package/clients/cli/commands/theme-add.doc.mjs +11 -6
- package/clients/cli/commands/theme-list.doc.mjs +21 -5
- package/clients/cli/commands/theme-targets.behavior.test.mjs +19 -2
- package/clients/cli/commands/theme.doc.mjs +2 -2
- package/clients/cli/commands/upgrade.doc.mjs +17 -4
- package/clients/cli/commands/upgrade.mjs +12 -1
- package/clients/cli/commands/upgrade.test.mjs +41 -0
- package/clients/cli/index.mjs +5 -0
- package/clients/cli/lib/component-format.mjs +42 -26
- package/clients/cli/lib/component-format.test.mjs +34 -3
- package/clients/cli/lib/manifest.mjs +12 -0
- package/foundation/config/project-themes.test.mjs +127 -0
- package/foundation/config/project.d.mts +23 -4
- package/foundation/config/project.mjs +96 -9
- package/foundation/config/project.test.mjs +132 -6
- package/foundation/discovery/component-discovery.d.mts +36 -0
- package/foundation/discovery/component-discovery.mjs +96 -0
- package/foundation/discovery/theme-discovery.d.mts +39 -0
- package/foundation/discovery/theme-discovery.mjs +650 -0
- package/foundation/discovery/theme-discovery.test.mjs +375 -0
- package/foundation/discovery/theming-targets.d.mts +16 -0
- package/foundation/discovery/theming-targets.mjs +39 -3
- package/foundation/discovery/theming-targets.test.mjs +139 -0
- package/foundation/integrations/autolink.d.mts +96 -0
- package/foundation/integrations/autolink.mjs +265 -0
- package/foundation/integrations/autolink.test.mjs +430 -0
- package/foundation/integrations/contribution-inventory.d.mts +152 -0
- package/foundation/integrations/contribution-inventory.mjs +497 -0
- package/foundation/integrations/contribution-inventory.test.mjs +361 -0
- package/foundation/integrations/integrations.d.mts +73 -9
- package/foundation/integrations/integrations.mjs +158 -8
- package/foundation/integrations/integrations.test.mjs +152 -29
- package/foundation/integrations/manifest-writer.d.mts +56 -0
- package/foundation/integrations/manifest-writer.mjs +328 -0
- package/foundation/integrations/manifest-writer.test.mjs +229 -0
- package/foundation/integrations/validate-contributions.mjs +81 -6
- package/foundation/response/error-codes.d.mts +4 -1
- package/foundation/response/error-codes.doc.mjs +16 -1
- package/foundation/response/error-codes.mjs +10 -1
- package/foundation/response/response-types.doc.mjs +23 -2
- package/package.json +8 -1
|
@@ -23,7 +23,10 @@ import {
|
|
|
23
23
|
generateThemeRulesSplit as mockGenerateThemeRulesSplit,
|
|
24
24
|
generateOnMediaCSS as mockGenerateOnMediaCSS,
|
|
25
25
|
} from '@astryxdesign/core/theme';
|
|
26
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
themeBuild,
|
|
28
|
+
validateComponentOverridesAgainstRegistry,
|
|
29
|
+
} from './build.mjs';
|
|
27
30
|
|
|
28
31
|
// `themeBuild` captures core's generator once at module load. Wrap the two
|
|
29
32
|
// CSS-emitting exports in vi.fn (call-through by default) so the receipt tests
|
|
@@ -91,12 +94,12 @@ describe('themeBuild() — receipt', () => {
|
|
|
91
94
|
`export default {
|
|
92
95
|
name: 'local-theme',
|
|
93
96
|
localTokens: {
|
|
94
|
-
'--
|
|
97
|
+
'--ac-selection-ink': ['#0077b6', '#48cae4'],
|
|
95
98
|
},
|
|
96
99
|
components: {
|
|
97
100
|
badge: {
|
|
98
101
|
'variant:info': {
|
|
99
|
-
backgroundColor: 'var(--
|
|
102
|
+
backgroundColor: 'var(--ac-selection-ink)',
|
|
100
103
|
},
|
|
101
104
|
},
|
|
102
105
|
},
|
|
@@ -108,48 +111,12 @@ describe('themeBuild() — receipt', () => {
|
|
|
108
111
|
const built = fs.readFileSync(path.join(tmpDir, 'local-theme.js'), 'utf8');
|
|
109
112
|
|
|
110
113
|
expect(result?.data.tokenCount).toBe(1);
|
|
111
|
-
expect(css).toContain(
|
|
112
|
-
'--astryx-theme-local-theme-color-status-fill-accent: light-dark(#0077b6, #48cae4);',
|
|
113
|
-
);
|
|
114
|
+
expect(css).toContain('--ac-selection-ink: light-dark(#0077b6, #48cae4);');
|
|
114
115
|
expect(built).toContain('localTokens: {');
|
|
115
116
|
expect(built).toContain('__localTokenOwners: {');
|
|
116
117
|
expect(built).toContain('__localTokenLineage: ["local-theme"]');
|
|
117
118
|
});
|
|
118
119
|
|
|
119
|
-
it.each(['VAR', 'vAr'])(
|
|
120
|
-
'rejects undeclared local-token references using %s() before writing outputs',
|
|
121
|
-
async functionName => {
|
|
122
|
-
const themeFile = path.join(tmpDir, 'invalid-local-theme.mjs');
|
|
123
|
-
fs.writeFileSync(
|
|
124
|
-
themeFile,
|
|
125
|
-
`export default {
|
|
126
|
-
name: 'invalid-local-theme',
|
|
127
|
-
localTokens: {},
|
|
128
|
-
components: {
|
|
129
|
-
badge: {
|
|
130
|
-
base: {
|
|
131
|
-
color: '${functionName}(--astryx-theme-invalid-local-theme-color-missing)',
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
};\n`,
|
|
136
|
-
);
|
|
137
|
-
|
|
138
|
-
await expect(
|
|
139
|
-
themeBuild('invalid-local-theme.mjs', {}, {cwd: tmpDir}),
|
|
140
|
-
).rejects.toThrow(/has no declaration/);
|
|
141
|
-
expect(fs.existsSync(path.join(tmpDir, 'invalid-local-theme.css'))).toBe(
|
|
142
|
-
false,
|
|
143
|
-
);
|
|
144
|
-
expect(fs.existsSync(path.join(tmpDir, 'invalid-local-theme.js'))).toBe(
|
|
145
|
-
false,
|
|
146
|
-
);
|
|
147
|
-
expect(fs.existsSync(path.join(tmpDir, 'invalid-local-theme.d.ts'))).toBe(
|
|
148
|
-
false,
|
|
149
|
-
);
|
|
150
|
-
},
|
|
151
|
-
);
|
|
152
|
-
|
|
153
120
|
it.each(['VAR', 'vAr'])(
|
|
154
121
|
'rejects local-token cycles using %s() before writing outputs',
|
|
155
122
|
async functionName => {
|
|
@@ -351,7 +318,7 @@ describe('themeBuild() — check mode', () => {
|
|
|
351
318
|
describe('themeBuild() — component override validation', () => {
|
|
352
319
|
it('accepts documented state keys without an "Unknown prop" warning', async () => {
|
|
353
320
|
// The state-key syntax the Theming Infrastructure wiki documents —
|
|
354
|
-
// `radio: {checked}`, `calendar-day: {today, selected}` — is declared in
|
|
321
|
+
// `radio-indicator: {checked}`, `calendar-day: {today, selected}` — is declared in
|
|
355
322
|
// each component's doc under `theming.targets[].states`, not
|
|
356
323
|
// `visualProps`. `loadKnownComponents()` read only `visualProps`, so every
|
|
357
324
|
// one of these warned "Unknown prop": documented syntax that looked broken.
|
|
@@ -362,7 +329,7 @@ describe('themeBuild() — component override validation', () => {
|
|
|
362
329
|
name: 'states',
|
|
363
330
|
tokens: {'--color-bg': '#0a0a0a'},
|
|
364
331
|
components: {
|
|
365
|
-
radio: {
|
|
332
|
+
'radio-indicator': {
|
|
366
333
|
checked: {borderColor: 'var(--color-accent)'},
|
|
367
334
|
'checked+disabled': {opacity: '0.5'},
|
|
368
335
|
},
|
|
@@ -409,16 +376,82 @@ describe('themeBuild() — component override validation', () => {
|
|
|
409
376
|
`export default {
|
|
410
377
|
name: 'bogus',
|
|
411
378
|
tokens: {'--color-bg': '#0a0a0a'},
|
|
412
|
-
components: {radio: {notAState: {opacity: '0.5'}}},
|
|
379
|
+
components: {'radio-indicator': {notAState: {opacity: '0.5'}}},
|
|
413
380
|
};\n`,
|
|
414
381
|
);
|
|
415
382
|
|
|
416
383
|
const result = await themeBuild('bogus.mjs', {}, {cwd: tmpDir});
|
|
417
384
|
|
|
418
385
|
expect(result?.data.warnings).toEqual([
|
|
419
|
-
expect.stringContaining(
|
|
386
|
+
expect.stringContaining(
|
|
387
|
+
'Unknown prop "notAState" on component "radio-indicator"',
|
|
388
|
+
),
|
|
420
389
|
]);
|
|
421
390
|
});
|
|
391
|
+
|
|
392
|
+
it('warns with the exact replacement for deprecated root and media targets', () => {
|
|
393
|
+
const registry = {
|
|
394
|
+
propsByKey: {
|
|
395
|
+
'old-target': ['variant'],
|
|
396
|
+
'new-target': ['variant'],
|
|
397
|
+
},
|
|
398
|
+
deprecatedByKey: {'old-target': 'new-target'},
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
expect(
|
|
402
|
+
validateComponentOverridesAgainstRegistry(
|
|
403
|
+
{
|
|
404
|
+
components: {
|
|
405
|
+
'old-target': {base: {color: 'red'}},
|
|
406
|
+
'new-target': {base: {color: 'blue'}},
|
|
407
|
+
},
|
|
408
|
+
onDark: {
|
|
409
|
+
components: {
|
|
410
|
+
'old-target': {'variant:quiet': {color: 'pink'}},
|
|
411
|
+
},
|
|
412
|
+
},
|
|
413
|
+
adaptations: {
|
|
414
|
+
rules: [
|
|
415
|
+
{
|
|
416
|
+
when: {contrast: 'more'},
|
|
417
|
+
value: {
|
|
418
|
+
components: {
|
|
419
|
+
'old-target': {'variant:loud': {color: 'purple'}},
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
},
|
|
423
|
+
],
|
|
424
|
+
},
|
|
425
|
+
},
|
|
426
|
+
registry,
|
|
427
|
+
),
|
|
428
|
+
).toEqual([
|
|
429
|
+
'Deprecated component target "old-target". Use "new-target" instead.',
|
|
430
|
+
'Deprecated component target "old-target" in onDark. Use "new-target" instead.',
|
|
431
|
+
'Deprecated component target "old-target" in adaptation rule 1. Use "new-target" instead.',
|
|
432
|
+
]);
|
|
433
|
+
});
|
|
434
|
+
|
|
435
|
+
it('warns with the exact replacement for a supported deprecated target', async () => {
|
|
436
|
+
const themeFile = path.join(tmpDir, 'deprecated-target.mjs');
|
|
437
|
+
fs.writeFileSync(
|
|
438
|
+
themeFile,
|
|
439
|
+
`export default {
|
|
440
|
+
name: 'deprecated-target',
|
|
441
|
+
tokens: {},
|
|
442
|
+
components: {progressbar: {base: {color: 'red'}}},
|
|
443
|
+
};\n`,
|
|
444
|
+
);
|
|
445
|
+
|
|
446
|
+
const result = await themeBuild('deprecated-target.mjs', {}, {cwd: tmpDir});
|
|
447
|
+
|
|
448
|
+
expect(result?.data.warnings).toContain(
|
|
449
|
+
'Deprecated component target "progressbar". Use "progress-bar" instead.',
|
|
450
|
+
);
|
|
451
|
+
expect(
|
|
452
|
+
fs.readFileSync(path.join(tmpDir, 'deprecated-target.css'), 'utf8'),
|
|
453
|
+
).toContain('.astryx-progressbar');
|
|
454
|
+
});
|
|
422
455
|
});
|
|
423
456
|
|
|
424
457
|
describe('themeBuild() — the shipped theme template', () => {
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
import {afterEach, beforeEach, describe, expect, it} from 'vitest';
|
|
4
|
+
import * as fs from 'node:fs';
|
|
5
|
+
import * as path from 'node:path';
|
|
6
|
+
import {themeAdd} from './add/add.mjs';
|
|
7
|
+
|
|
8
|
+
let tmpDir;
|
|
9
|
+
|
|
10
|
+
function installThemeIntegration(
|
|
11
|
+
packageName,
|
|
12
|
+
slug,
|
|
13
|
+
source = 'export const oceanTheme = {};\n',
|
|
14
|
+
extraFiles = {},
|
|
15
|
+
) {
|
|
16
|
+
const packageDir = path.join(
|
|
17
|
+
tmpDir,
|
|
18
|
+
'node_modules',
|
|
19
|
+
...packageName.split('/'),
|
|
20
|
+
);
|
|
21
|
+
const themeDir = path.join(packageDir, 'themes', slug);
|
|
22
|
+
fs.mkdirSync(themeDir, {recursive: true});
|
|
23
|
+
fs.writeFileSync(
|
|
24
|
+
path.join(packageDir, 'package.json'),
|
|
25
|
+
JSON.stringify({name: packageName, version: '1.0.0'}),
|
|
26
|
+
);
|
|
27
|
+
fs.writeFileSync(
|
|
28
|
+
path.join(packageDir, 'astryx.integration.mjs'),
|
|
29
|
+
`export default {themes: './themes'};\n`,
|
|
30
|
+
);
|
|
31
|
+
fs.writeFileSync(
|
|
32
|
+
path.join(packageDir, 'themes', 'manifest.json'),
|
|
33
|
+
JSON.stringify({
|
|
34
|
+
version: 1,
|
|
35
|
+
themes: [
|
|
36
|
+
{
|
|
37
|
+
slug,
|
|
38
|
+
displayName: slug === 'neutral' ? 'Neutral Plus' : 'Ocean',
|
|
39
|
+
description: 'Integration-owned theme.',
|
|
40
|
+
maintained: true,
|
|
41
|
+
entry: 'oceanTheme.ts',
|
|
42
|
+
exportName: 'oceanTheme',
|
|
43
|
+
files: ['oceanTheme.ts', ...Object.keys(extraFiles)],
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
}),
|
|
47
|
+
);
|
|
48
|
+
fs.writeFileSync(path.join(themeDir, 'oceanTheme.ts'), source);
|
|
49
|
+
for (const [relativePath, contents] of Object.entries(extraFiles)) {
|
|
50
|
+
const file = path.join(themeDir, relativePath);
|
|
51
|
+
fs.mkdirSync(path.dirname(file), {recursive: true});
|
|
52
|
+
fs.writeFileSync(file, contents);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
beforeEach(() => {
|
|
57
|
+
tmpDir = fs.mkdtempSync(
|
|
58
|
+
path.join(process.cwd(), '.astryx-theme-integration-'),
|
|
59
|
+
);
|
|
60
|
+
fs.writeFileSync(
|
|
61
|
+
path.join(tmpDir, 'package.json'),
|
|
62
|
+
JSON.stringify({
|
|
63
|
+
name: 'consumer',
|
|
64
|
+
dependencies: {'@acme/themes': '^1.0.0'},
|
|
65
|
+
}),
|
|
66
|
+
);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
afterEach(() => {
|
|
70
|
+
fs.rmSync(tmpDir, {recursive: true, force: true});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
describe('themeAdd with integration themes', () => {
|
|
74
|
+
it('copies source from an installed integration and records its owner', async () => {
|
|
75
|
+
installThemeIntegration('@acme/themes', 'ocean');
|
|
76
|
+
const result = await themeAdd('ocean', {cwd: tmpDir});
|
|
77
|
+
|
|
78
|
+
expect(result.data.package).toBe('@acme/themes');
|
|
79
|
+
expect(result.data.outputDir).toBe(path.join('src', 'themes', 'ocean'));
|
|
80
|
+
expect(
|
|
81
|
+
fs.readFileSync(
|
|
82
|
+
path.join(tmpDir, 'src', 'themes', 'ocean', 'oceanTheme.ts'),
|
|
83
|
+
'utf-8',
|
|
84
|
+
),
|
|
85
|
+
).toContain('oceanTheme');
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
it('copies nested files listed by an integration theme catalog', async () => {
|
|
89
|
+
installThemeIntegration(
|
|
90
|
+
'@acme/themes',
|
|
91
|
+
'ocean',
|
|
92
|
+
"import {oceanBlue} from './tokens/colors';\nexport const oceanTheme = {oceanBlue};\n",
|
|
93
|
+
{'tokens/colors.ts': "export const oceanBlue = '#0064e0';\n"},
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
const result = await themeAdd('ocean', {cwd: tmpDir});
|
|
97
|
+
|
|
98
|
+
expect(result.data.files).toEqual(['oceanTheme.ts', 'tokens/colors.ts']);
|
|
99
|
+
expect(
|
|
100
|
+
fs.readFileSync(
|
|
101
|
+
path.join(tmpDir, 'src', 'themes', 'ocean', 'tokens', 'colors.ts'),
|
|
102
|
+
'utf-8',
|
|
103
|
+
),
|
|
104
|
+
).toContain('oceanBlue');
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
it('rejects a nested destination symlink that escapes the project', async () => {
|
|
108
|
+
installThemeIntegration(
|
|
109
|
+
'@acme/themes',
|
|
110
|
+
'ocean',
|
|
111
|
+
"import {oceanBlue} from './tokens/colors';\nexport const oceanTheme = {oceanBlue};\n",
|
|
112
|
+
{'tokens/colors.ts': "export const oceanBlue = '#0064e0';\n"},
|
|
113
|
+
);
|
|
114
|
+
const outsideDir = fs.mkdtempSync(
|
|
115
|
+
path.join(process.cwd(), '.astryx-theme-outside-'),
|
|
116
|
+
);
|
|
117
|
+
try {
|
|
118
|
+
const targetDir = path.join(tmpDir, 'src', 'themes', 'ocean');
|
|
119
|
+
fs.mkdirSync(targetDir, {recursive: true});
|
|
120
|
+
fs.symlinkSync(
|
|
121
|
+
outsideDir,
|
|
122
|
+
path.join(targetDir, 'tokens'),
|
|
123
|
+
process.platform === 'win32' ? 'junction' : 'dir',
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
await expect(themeAdd('ocean', {cwd: tmpDir})).rejects.toMatchObject({
|
|
127
|
+
code: 'ERR_PATH_TRAVERSAL',
|
|
128
|
+
});
|
|
129
|
+
expect(fs.existsSync(path.join(outsideDir, 'colors.ts'))).toBe(false);
|
|
130
|
+
expect(fs.existsSync(path.join(targetDir, 'oceanTheme.ts'))).toBe(false);
|
|
131
|
+
} finally {
|
|
132
|
+
fs.rmSync(outsideDir, {recursive: true, force: true});
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
it('fails closed on a duplicate slug and resolves it with package scope', async () => {
|
|
137
|
+
installThemeIntegration('@acme/themes', 'neutral');
|
|
138
|
+
|
|
139
|
+
await expect(themeAdd('neutral', {cwd: tmpDir})).rejects.toMatchObject({
|
|
140
|
+
code: 'ERR_AMBIGUOUS_THEME',
|
|
141
|
+
});
|
|
142
|
+
const result = await themeAdd('neutral', {
|
|
143
|
+
cwd: tmpDir,
|
|
144
|
+
package: '@acme/themes',
|
|
145
|
+
});
|
|
146
|
+
expect(result.data.package).toBe('@acme/themes');
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
it('reports a selected installed package with a corrupted theme catalog', async () => {
|
|
150
|
+
installThemeIntegration(
|
|
151
|
+
'@acme/themes',
|
|
152
|
+
'ocean',
|
|
153
|
+
"export {oceanBlue} from './tokens/colors';\n",
|
|
154
|
+
{'tokens/colors.ts': "export const oceanBlue = '#0064e0';\n"},
|
|
155
|
+
);
|
|
156
|
+
fs.rmSync(
|
|
157
|
+
path.join(
|
|
158
|
+
tmpDir,
|
|
159
|
+
'node_modules',
|
|
160
|
+
'@acme',
|
|
161
|
+
'themes',
|
|
162
|
+
'themes',
|
|
163
|
+
'ocean',
|
|
164
|
+
'tokens',
|
|
165
|
+
'colors.ts',
|
|
166
|
+
),
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
await expect(
|
|
170
|
+
themeAdd('ocean', {cwd: tmpDir, package: '@acme/themes'}),
|
|
171
|
+
).rejects.toMatchObject({
|
|
172
|
+
code: 'ERR_THEME_INVALID',
|
|
173
|
+
message: expect.stringContaining('tokens/colors.ts'),
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
it('reports an unknown package selection without falling back to another owner', async () => {
|
|
178
|
+
installThemeIntegration('@acme/themes', 'ocean');
|
|
179
|
+
await expect(
|
|
180
|
+
themeAdd('ocean', {cwd: tmpDir, package: '@other/themes'}),
|
|
181
|
+
).rejects.toMatchObject({code: 'ERR_UNKNOWN_THEME'});
|
|
182
|
+
});
|
|
183
|
+
});
|
|
@@ -2,8 +2,16 @@
|
|
|
2
2
|
// DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* List
|
|
6
|
-
* scaffold). Pure projection of the manifest; no I/O beyond the adapter read.
|
|
5
|
+
* List themes bundled with this CLI build.
|
|
7
6
|
* @returns {import('../theme.type.mjs').ThemeListResponse}
|
|
8
7
|
*/
|
|
9
8
|
export function themeList(): import("../theme.type.mjs").ThemeListResponse;
|
|
9
|
+
/**
|
|
10
|
+
* List bundled and installed integration themes available to this project.
|
|
11
|
+
* @param {{cwd?: string, package?: string}} [options]
|
|
12
|
+
* @returns {Promise<import('../theme.type.mjs').ThemeListResponse>}
|
|
13
|
+
*/
|
|
14
|
+
export function themeListAvailable(options?: {
|
|
15
|
+
cwd?: string;
|
|
16
|
+
package?: string;
|
|
17
|
+
}): Promise<import("../theme.type.mjs").ThemeListResponse>;
|
package/api/theme/list/list.mjs
CHANGED
|
@@ -1,25 +1,46 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file
|
|
5
|
-
*
|
|
4
|
+
* @file Theme-list projections. `themeList()` retains its historical synchronous
|
|
5
|
+
* bundled-only API contract. `themeListAvailable()` is the project-aware command
|
|
6
|
+
* seam that adds installed integration themes and owner packages.
|
|
6
7
|
*/
|
|
7
8
|
|
|
8
|
-
import {listThemes} from '../_adapter.mjs';
|
|
9
|
+
import {listAvailableThemes, listThemes} from '../_adapter.mjs';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
|
-
* List
|
|
12
|
-
* scaffold). Pure projection of the manifest; no I/O beyond the adapter read.
|
|
12
|
+
* List themes bundled with this CLI build.
|
|
13
13
|
* @returns {import('../theme.type.mjs').ThemeListResponse}
|
|
14
14
|
*/
|
|
15
15
|
export function themeList() {
|
|
16
16
|
return {
|
|
17
17
|
type: 'theme.list',
|
|
18
|
-
data: listThemes().map(
|
|
19
|
-
slug:
|
|
20
|
-
displayName:
|
|
21
|
-
description:
|
|
22
|
-
maintained:
|
|
18
|
+
data: listThemes().map(theme => ({
|
|
19
|
+
slug: theme.slug,
|
|
20
|
+
displayName: theme.displayName,
|
|
21
|
+
description: theme.description,
|
|
22
|
+
maintained: theme.maintained,
|
|
23
23
|
})),
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* List bundled and installed integration themes available to this project.
|
|
29
|
+
* @param {{cwd?: string, package?: string}} [options]
|
|
30
|
+
* @returns {Promise<import('../theme.type.mjs').ThemeListResponse>}
|
|
31
|
+
*/
|
|
32
|
+
export async function themeListAvailable(options = {}) {
|
|
33
|
+
const themes = await listAvailableThemes(options.cwd);
|
|
34
|
+
return {
|
|
35
|
+
type: 'theme.list',
|
|
36
|
+
data: themes
|
|
37
|
+
.filter(theme => options.package == null || theme.package === options.package)
|
|
38
|
+
.map(theme => ({
|
|
39
|
+
slug: theme.slug,
|
|
40
|
+
displayName: theme.displayName,
|
|
41
|
+
description: theme.description,
|
|
42
|
+
maintained: theme.maintained,
|
|
43
|
+
package: theme.package,
|
|
44
|
+
})),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -1,41 +1,120 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import {afterEach, beforeEach, describe, expect, it} from 'vitest';
|
|
4
|
+
import * as fs from 'node:fs';
|
|
5
|
+
import * as path from 'node:path';
|
|
6
|
+
import {themeList, themeListAvailable} from './list.mjs';
|
|
7
|
+
import {BUNDLED_THEME_PACKAGE} from '../../../foundation/discovery/theme-discovery.mjs';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
import {themeList} from './list.mjs';
|
|
9
|
+
let tmpDir;
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
function installThemeIntegration(packageName = '@acme/themes', slug = 'ocean') {
|
|
12
|
+
const packageDir = path.join(tmpDir, 'node_modules', ...packageName.split('/'));
|
|
13
|
+
const themeDir = path.join(packageDir, 'themes', slug);
|
|
14
|
+
fs.mkdirSync(themeDir, {recursive: true});
|
|
15
|
+
fs.writeFileSync(
|
|
16
|
+
path.join(packageDir, 'package.json'),
|
|
17
|
+
JSON.stringify({name: packageName, version: '1.0.0'}),
|
|
18
|
+
);
|
|
19
|
+
fs.writeFileSync(
|
|
20
|
+
path.join(packageDir, 'astryx.integration.mjs'),
|
|
21
|
+
`export default {themes: './themes'};\n`,
|
|
22
|
+
);
|
|
23
|
+
fs.writeFileSync(
|
|
24
|
+
path.join(packageDir, 'themes', 'manifest.json'),
|
|
25
|
+
JSON.stringify({
|
|
26
|
+
version: 1,
|
|
27
|
+
themes: [
|
|
28
|
+
{
|
|
29
|
+
slug,
|
|
30
|
+
displayName: 'Ocean',
|
|
31
|
+
description: 'Blue and calm.',
|
|
32
|
+
maintained: true,
|
|
33
|
+
entry: 'oceanTheme.ts',
|
|
34
|
+
exportName: 'oceanTheme',
|
|
35
|
+
files: ['oceanTheme.ts'],
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
}),
|
|
39
|
+
);
|
|
40
|
+
fs.writeFileSync(
|
|
41
|
+
path.join(themeDir, 'oceanTheme.ts'),
|
|
42
|
+
'export const oceanTheme = {};\n',
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
beforeEach(() => {
|
|
47
|
+
tmpDir = fs.mkdtempSync(path.join(process.cwd(), '.astryx-theme-list-'));
|
|
48
|
+
fs.writeFileSync(
|
|
49
|
+
path.join(tmpDir, 'package.json'),
|
|
50
|
+
JSON.stringify({name: 'consumer', dependencies: {'@acme/themes': '^1.0.0'}}),
|
|
51
|
+
);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
afterEach(() => {
|
|
55
|
+
fs.rmSync(tmpDir, {recursive: true, force: true});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
describe('themeList (bundled compatibility API)', () => {
|
|
59
|
+
it('stays synchronous and preserves the original entry shape', () => {
|
|
14
60
|
const result = themeList();
|
|
15
61
|
expect(result.type).toBe('theme.list');
|
|
16
|
-
expect(Array.isArray(result.data)).toBe(true);
|
|
17
62
|
expect(result.data.length).toBeGreaterThan(0);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
63
|
+
expect(Object.keys(result.data[0]).sort()).toEqual([
|
|
64
|
+
'description',
|
|
65
|
+
'displayName',
|
|
66
|
+
'maintained',
|
|
67
|
+
'slug',
|
|
68
|
+
]);
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
describe('themeListAvailable (project-aware API)', () => {
|
|
73
|
+
it('returns bundled themes with owner package', async () => {
|
|
74
|
+
const result = await themeListAvailable({cwd: tmpDir});
|
|
75
|
+
expect(result.type).toBe('theme.list');
|
|
76
|
+
expect(result.data.length).toBeGreaterThan(0);
|
|
77
|
+
expect(
|
|
78
|
+
result.data.some(theme => theme.package === BUNDLED_THEME_PACKAGE),
|
|
79
|
+
).toBe(true);
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it('surfaces a maintained installed integration theme', async () => {
|
|
83
|
+
installThemeIntegration();
|
|
84
|
+
const result = await themeListAvailable({cwd: tmpDir});
|
|
85
|
+
expect(result.data).toContainEqual({
|
|
86
|
+
slug: 'ocean',
|
|
87
|
+
displayName: 'Ocean',
|
|
88
|
+
description: 'Blue and calm.',
|
|
89
|
+
maintained: true,
|
|
90
|
+
package: '@acme/themes',
|
|
91
|
+
});
|
|
24
92
|
});
|
|
25
93
|
|
|
26
|
-
it('
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
94
|
+
it('filters by exact owner package', async () => {
|
|
95
|
+
installThemeIntegration();
|
|
96
|
+
const result = await themeListAvailable({
|
|
97
|
+
cwd: tmpDir,
|
|
98
|
+
package: '@acme/themes',
|
|
99
|
+
});
|
|
100
|
+
expect(result.data).toEqual([
|
|
101
|
+
{
|
|
102
|
+
slug: 'ocean',
|
|
103
|
+
displayName: 'Ocean',
|
|
104
|
+
description: 'Blue and calm.',
|
|
105
|
+
maintained: true,
|
|
106
|
+
package: '@acme/themes',
|
|
107
|
+
},
|
|
108
|
+
]);
|
|
30
109
|
});
|
|
31
110
|
|
|
32
|
-
it('projects only
|
|
33
|
-
const [first] =
|
|
34
|
-
expect(first).toBeTruthy();
|
|
111
|
+
it('projects only public list fields', async () => {
|
|
112
|
+
const [first] = (await themeListAvailable({cwd: tmpDir})).data;
|
|
35
113
|
expect(Object.keys(first ?? {}).sort()).toEqual([
|
|
36
114
|
'description',
|
|
37
115
|
'displayName',
|
|
38
116
|
'maintained',
|
|
117
|
+
'package',
|
|
39
118
|
'slug',
|
|
40
119
|
]);
|
|
41
120
|
});
|
|
@@ -2,11 +2,7 @@
|
|
|
2
2
|
// DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* @file FunctionDoc for the
|
|
6
|
-
* command's shared data layer (`_adapter.mjs`); the BundledTheme shape lives
|
|
7
|
-
* there. This helper has no CLI command of its own — themeList and themeAdd
|
|
8
|
-
* sit on it.
|
|
9
|
-
* @position packages/cli/api/theme — function documentation
|
|
5
|
+
* @file FunctionDoc for the synchronous bundled-theme compatibility helper.
|
|
10
6
|
*/
|
|
11
7
|
/** @type {import('@astryxdesign/cli/authoring').FunctionDoc} */
|
|
12
8
|
export const doc: import("@astryxdesign/cli/authoring").FunctionDoc;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file FunctionDoc for the
|
|
5
|
-
* command's shared data layer (`_adapter.mjs`); the BundledTheme shape lives
|
|
6
|
-
* there. This helper has no CLI command of its own — themeList and themeAdd
|
|
7
|
-
* sit on it.
|
|
8
|
-
* @position packages/cli/api/theme — function documentation
|
|
4
|
+
* @file FunctionDoc for the synchronous bundled-theme compatibility helper.
|
|
9
5
|
*/
|
|
10
6
|
|
|
11
7
|
/** @type {import('@astryxdesign/cli/authoring').FunctionDoc} */
|
|
@@ -14,12 +10,9 @@ export const doc = {
|
|
|
14
10
|
kind: 'api',
|
|
15
11
|
name: 'listThemes',
|
|
16
12
|
displayName: 'listThemes()',
|
|
17
|
-
summary: 'Read the bundled-theme manifest
|
|
13
|
+
summary: 'Read the CLI bundled-theme manifest.',
|
|
18
14
|
description:
|
|
19
|
-
|
|
20
|
-
'(templates/themes/manifest.json, generated by scripts/generate-cli-themes.mjs) and returns ' +
|
|
21
|
-
'the parsed entries. themeList() projects this into the theme.list envelope; themeAdd() ' +
|
|
22
|
-
'resolves a slug against it. Returns synchronously.',
|
|
15
|
+
'Reads templates/themes/manifest.json and returns its raw entries synchronously. This low-level helper keeps its historical bundled-only contract; project-aware themeList() and themeAdd() also discover source themes from installed integrations.',
|
|
23
16
|
importPath: '@astryxdesign/cli/api',
|
|
24
17
|
signature: 'listThemes(): BundledTheme[]',
|
|
25
18
|
keywords: ['theme', 'themes', 'manifest', 'bundled', 'adapter', 'list'],
|
|
@@ -28,17 +21,17 @@ export const doc = {
|
|
|
28
21
|
{
|
|
29
22
|
type: 'BundledTheme[]',
|
|
30
23
|
description:
|
|
31
|
-
'The
|
|
24
|
+
'The bundled manifest entries: slug, displayName, description, maintained, entry, exportName, and files.',
|
|
32
25
|
},
|
|
33
26
|
],
|
|
34
27
|
throws: [
|
|
35
28
|
{
|
|
36
29
|
code: 'ERR_NO_SOURCE',
|
|
37
|
-
when: 'the
|
|
30
|
+
when: 'the bundled catalog is missing, invalid, or references missing source files',
|
|
38
31
|
},
|
|
39
32
|
],
|
|
40
33
|
examples: [
|
|
41
|
-
{label: 'Read
|
|
34
|
+
{label: 'Read bundled entries', code: 'const themes = listThemes();'},
|
|
42
35
|
],
|
|
43
36
|
related: ['themeList', 'themeAdd', 'themeBuild'],
|
|
44
37
|
};
|