@astryxdesign/cli 0.6.3-canary.db4e378 → 0.6.3-canary.ddb63c3
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 +20 -1
- package/api/blog/blog.doc.mjs +1 -0
- package/api/build/build.doc.mjs +1 -0
- package/api/component/component.doc.mjs +1 -0
- package/api/discover/discover.doc.mjs +1 -0
- package/api/docs/_adapter.d.mts +3 -8
- package/api/docs/_adapter.mjs +13 -105
- package/api/docs/docs.doc.mjs +1 -0
- package/api/docs/list/list.mjs +3 -7
- package/api/doctor/doctor.d.mts +25 -3
- package/api/doctor/doctor.doc.mjs +1 -0
- package/api/doctor/doctor.mjs +185 -13
- package/api/doctor/doctor.test.mjs +326 -1
- package/api/gap-report/gap-report.doc.mjs +1 -0
- package/api/hook/_adapter.mjs +19 -5
- package/api/hook/hook.doc.mjs +1 -0
- package/api/hook/list/list.d.mts +1 -1
- package/api/hook/list/list.mjs +69 -17
- package/api/init/init.doc.mjs +1 -0
- package/api/integration/add-contribution.mjs +7 -7
- package/api/integration/add-contribution.test.mjs +37 -3
- package/api/integration/add-theme.mjs +34 -64
- package/api/integration/add-theme.test.mjs +105 -21
- package/api/integration/authoring-checks.test.mjs +8 -4
- package/api/integration/integration-block-exports.test.mjs +10 -6
- package/api/integration/integrationAdd.doc.mjs +1 -0
- package/api/integration/integrationAddAgentDoc.doc.mjs +1 -0
- package/api/integration/integrationAddCodemod.doc.mjs +1 -0
- package/api/integration/integrationAddComponent.doc.mjs +1 -0
- package/api/integration/integrationAddDoc.doc.mjs +1 -0
- package/api/integration/integrationAddTemplate.doc.mjs +1 -0
- package/api/integration/integrationAddTheme.doc.mjs +6 -5
- package/api/integration/integrationComponentConflicts.doc.mjs +1 -0
- package/api/integration/integrationDocConflicts.doc.mjs +1 -0
- package/api/integration/integrationPackCheck.doc.mjs +1 -0
- package/api/integration/integrationTemplateConflicts.doc.mjs +1 -0
- package/api/integration/pack-check.test.mjs +17 -47
- package/api/integration/summarizeIssues.doc.mjs +1 -0
- package/api/integration/validate-integration-fixes.test.mjs +1389 -0
- package/api/integration/validate-integration.mjs +50 -102
- package/api/integration/validate-integration.test.mjs +85 -23
- package/api/integration/validate-unread-theme-folders.test.mjs +110 -0
- package/api/integration/validateIntegration.doc.mjs +1 -0
- package/api/json/assertResponse.doc.mjs +1 -0
- package/api/json/isError.doc.mjs +1 -0
- package/api/json/parseResponse.doc.mjs +1 -0
- package/api/layout/layoutCheck.doc.mjs +1 -0
- package/api/layout/layoutExpand.doc.mjs +1 -0
- package/api/layout/layoutGrammar.doc.mjs +1 -0
- package/api/search/search.doc.mjs +1 -0
- package/api/search/search.mjs +16 -6
- package/api/swizzle/swizzle.doc.mjs +1 -0
- package/api/template/template-suffix.test.mjs +41 -21
- package/api/template/template.doc.mjs +1 -0
- package/api/theme/_adapter.d.mts +2 -3
- package/api/theme/_adapter.mjs +4 -5
- package/api/theme/add/add.binary.test.mjs +10 -17
- package/api/theme/add/add.test.mjs +14 -1
- package/api/theme/generateTonalPalette.doc.mjs +1 -0
- package/api/theme/integration-themes.test.mjs +39 -28
- package/api/theme/list/list.test.mjs +19 -20
- package/api/theme/listThemes.doc.mjs +6 -5
- package/api/theme/themeAdd.doc.mjs +4 -3
- package/api/theme/themeBuild.doc.mjs +1 -0
- package/api/theme/themeList.doc.mjs +6 -3
- package/api/theme/themeListAvailable.doc.mjs +5 -3
- package/api/theme/themePaletteGenerate.doc.mjs +1 -0
- package/api/theme/themeTargets.doc.mjs +1 -0
- package/api/theme/themeTemplate.doc.mjs +1 -0
- package/api/upgrade/_adapter.d.mts +12 -3
- package/api/upgrade/_adapter.mjs +81 -66
- package/api/upgrade/provider-agreement.test.mjs +152 -0
- package/api/upgrade/run/run.mjs +1 -0
- package/api/upgrade/upgrade.doc.mjs +1 -0
- package/assets/codemods/integration-discovery.mjs +8 -2
- package/assets/codemods/integration-discovery.test.mjs +15 -0
- package/assets/codemods/runner.mjs +115 -5
- package/assets/codemods/transforms/next/__tests__/migrate-theme-catalog-to-descriptors.test.mjs +216 -0
- package/assets/codemods/transforms/next/index.mjs +11 -1
- package/assets/codemods/transforms/next/migrate-theme-catalog-to-descriptors.mjs +141 -0
- package/assets/docs/cli-integrations.doc.mjs +17 -30
- package/assets/docs/cli.doc.mjs +15 -0
- package/assets/docs/theme.doc.mjs +1 -1
- package/assets/templates/themes/butter/butterTheme.doc.mjs +11 -0
- package/assets/templates/themes/chocolate/chocolateTheme.doc.mjs +11 -0
- package/assets/templates/themes/gothic/gothicTheme.doc.mjs +11 -0
- package/assets/templates/themes/matcha/matchaTheme.doc.mjs +11 -0
- package/assets/templates/themes/neutral/neutralTheme.doc.mjs +11 -0
- package/assets/templates/themes/stone/stoneTheme.doc.mjs +11 -0
- package/assets/templates/themes/y2k/y2kTheme.doc.mjs +11 -0
- package/authoring/codemod/codemod.doc.mjs +1 -1
- package/authoring/config/config.doc.mjs +1 -1
- package/authoring/debug/debug.doc.d.mts +11 -0
- package/authoring/debug/debug.doc.mjs +182 -0
- package/authoring/doctypes/base/graph-fields.doc.mjs +1 -1
- package/authoring/doctypes/command/command.doc.mjs +1 -1
- package/authoring/doctypes/command/type.ts +1 -1
- package/authoring/doctypes/component/type.ts +2 -2
- package/authoring/doctypes/doctypes-new.test.mjs +48 -6
- package/authoring/doctypes/enum/enum.doc.mjs +1 -1
- package/authoring/doctypes/enum/type.ts +1 -1
- package/authoring/doctypes/function/function.doc.mjs +1 -1
- package/authoring/doctypes/function/type.ts +1 -1
- package/authoring/doctypes/hook/type.ts +2 -2
- package/authoring/doctypes/load-contract.test.mjs +2 -1
- package/authoring/doctypes/parse.d.mts +4 -2
- package/authoring/doctypes/parse.mjs +7 -3
- package/authoring/doctypes/reference/reference.doc.mjs +1 -1
- package/authoring/doctypes/reference/type.ts +2 -2
- package/authoring/doctypes/schema/schema.doc.mjs +1 -1
- package/authoring/doctypes/schema/type.ts +1 -2
- package/authoring/doctypes/template/template.doc.mjs +3 -3
- package/authoring/doctypes/theme/parse.d.mts +35 -0
- package/authoring/doctypes/theme/parse.mjs +76 -0
- package/authoring/doctypes/theme/theme.doc.d.mts +9 -0
- package/authoring/doctypes/theme/theme.doc.mjs +79 -0
- package/authoring/doctypes/theme/type.ts +42 -0
- package/authoring/doctypes/types.ts +2 -1
- package/authoring/gap-report/gap-report.doc.d.mts +12 -0
- package/authoring/gap-report/gap-report.doc.mjs +183 -0
- package/authoring/index.d.mts +1 -0
- package/authoring/index.d.ts +6 -4
- package/authoring/index.mjs +2 -1
- package/authoring/integration/integration.doc.mjs +2 -2
- package/authoring/integration/type.ts +3 -9
- package/clients/cli/__tests__/cliManifest.test.ts +27 -29
- package/clients/cli/commands/blog.doc.mjs +1 -1
- package/clients/cli/commands/build.doc.mjs +1 -1
- package/clients/cli/commands/component.doc.mjs +1 -1
- package/clients/cli/commands/discover.doc.mjs +1 -1
- package/clients/cli/commands/docs.doc.mjs +1 -1
- package/clients/cli/commands/doctor-integration-components.doc.mjs +1 -1
- package/clients/cli/commands/doctor-integration-docs.doc.mjs +1 -1
- package/clients/cli/commands/doctor-integration-templates.doc.mjs +1 -1
- package/clients/cli/commands/doctor-integration-validate.doc.mjs +1 -1
- package/clients/cli/commands/doctor-integration.doc.mjs +1 -1
- package/clients/cli/commands/doctor-integration.test.mjs +15 -7
- package/clients/cli/commands/doctor.doc.mjs +1 -1
- package/clients/cli/commands/gap-report.doc.mjs +1 -1
- package/clients/cli/commands/hook.doc.mjs +1 -1
- package/clients/cli/commands/init.doc.mjs +1 -1
- package/clients/cli/commands/integration-add.controls.test.mjs +1 -1
- package/clients/cli/commands/integration-add.doc.mjs +1 -1
- package/clients/cli/commands/integration-pack.doc.mjs +1 -1
- package/clients/cli/commands/integration-real-world.test.mjs +3 -9
- package/clients/cli/commands/integration.doc.mjs +1 -1
- package/clients/cli/commands/layout-check.doc.mjs +1 -1
- package/clients/cli/commands/layout-expand.doc.mjs +1 -1
- package/clients/cli/commands/layout-grammar.doc.mjs +1 -1
- package/clients/cli/commands/layout.doc.mjs +1 -1
- package/clients/cli/commands/manifest.doc.mjs +1 -1
- package/clients/cli/commands/search.doc.mjs +1 -1
- package/clients/cli/commands/swizzle.doc.mjs +1 -1
- package/clients/cli/commands/template.doc.mjs +1 -1
- package/clients/cli/commands/theme-add.doc.mjs +2 -2
- package/clients/cli/commands/theme-build.doc.mjs +1 -1
- package/clients/cli/commands/theme-list.doc.mjs +2 -2
- package/clients/cli/commands/theme-palette-generate.doc.mjs +3 -3
- package/clients/cli/commands/theme-palette.doc.mjs +1 -1
- package/clients/cli/commands/theme-targets.doc.mjs +1 -1
- package/clients/cli/commands/theme-template.doc.mjs +1 -1
- package/clients/cli/commands/theme.doc.mjs +1 -1
- package/clients/cli/commands/upgrade.doc.mjs +1 -1
- package/clients/cli/lib/hook-format.mjs +14 -5
- package/foundation/config/project-themes.test.mjs +11 -19
- package/foundation/config/project.d.mts +8 -0
- package/foundation/config/project.mjs +50 -21
- package/foundation/config/project.test.mjs +3 -16
- package/foundation/discovery/authoring-self-docs.d.mts +6 -0
- package/foundation/discovery/authoring-self-docs.mjs +17 -7
- package/foundation/discovery/authoring-surface.d.mts +74 -0
- package/foundation/discovery/authoring-surface.mjs +525 -0
- package/foundation/discovery/authoring-surface.test.mjs +392 -0
- package/foundation/discovery/cli-self-docs.d.mts +113 -0
- package/foundation/discovery/cli-self-docs.mjs +514 -0
- package/foundation/discovery/cli-self-docs.test.mjs +437 -0
- package/foundation/discovery/component-loader.d.mts +35 -38
- package/foundation/discovery/component-loader.mjs +53 -222
- package/foundation/discovery/docs-discovery.d.mts +3 -2
- package/foundation/discovery/docs-discovery.mjs +8 -12
- package/foundation/discovery/docs-discovery.test.mjs +8 -5
- package/foundation/discovery/template-adapter.d.mts +7 -0
- package/foundation/discovery/template-adapter.mjs +27 -40
- package/foundation/discovery/template-adapter.test.mjs +15 -0
- package/foundation/discovery/theme-discovery.d.mts +67 -7
- package/foundation/discovery/theme-discovery.mjs +916 -186
- package/foundation/discovery/theme-discovery.test.mjs +613 -219
- package/foundation/doc-compiler/bundle.d.mts +47 -0
- package/foundation/doc-compiler/bundle.mjs +218 -0
- package/foundation/doc-compiler/bundle.test.mjs +255 -0
- package/foundation/doc-compiler/compile.d.mts +200 -0
- package/foundation/doc-compiler/compile.mjs +254 -5
- package/foundation/doc-compiler/diagnostics.d.mts +126 -0
- package/foundation/doc-compiler/diagnostics.mjs +277 -0
- package/foundation/doc-compiler/doc-compiler.test.mjs +28 -1
- package/foundation/doc-compiler/doc-loads.test.mjs +1642 -0
- package/foundation/doc-compiler/import.d.mts +24 -0
- package/foundation/doc-compiler/import.mjs +59 -0
- package/foundation/doc-compiler/inputs.d.mts +102 -0
- package/foundation/doc-compiler/inputs.mjs +286 -0
- package/foundation/doc-compiler/inputs.test.mjs +299 -0
- package/foundation/doc-compiler/ir.d.mts +13 -0
- package/foundation/doc-compiler/ir.mjs +189 -12
- package/foundation/doc-compiler/lower-doc.test.mjs +492 -0
- package/foundation/doc-compiler/overlays.d.mts +37 -0
- package/foundation/doc-compiler/overlays.mjs +206 -0
- package/foundation/doc-compiler/parse-readable.d.mts +9 -0
- package/foundation/doc-compiler/parse-readable.mjs +29 -0
- package/foundation/doc-compiler/read.d.mts +126 -0
- package/foundation/doc-compiler/read.mjs +320 -0
- package/foundation/doc-compiler/read.test.mjs +313 -0
- package/foundation/doc-compiler/source.d.mts +33 -0
- package/foundation/doc-compiler/source.mjs +128 -0
- package/foundation/integrations/autolink.d.mts +58 -1
- package/foundation/integrations/autolink.mjs +143 -57
- package/foundation/integrations/contribution-fixes.d.mts +145 -0
- package/foundation/integrations/contribution-fixes.mjs +1284 -0
- package/foundation/integrations/contribution-inventory.d.mts +1 -1
- package/foundation/integrations/contribution-inventory.mjs +17 -20
- package/foundation/integrations/contribution-inventory.test.mjs +67 -27
- package/foundation/integrations/integrations.d.mts +3 -0
- package/foundation/integrations/integrations.mjs +11 -97
- package/foundation/integrations/provider-ledger.test.mjs +275 -0
- package/foundation/integrations/provider-resolution.d.mts +152 -0
- package/foundation/integrations/provider-resolution.mjs +576 -0
- package/foundation/integrations/provider-resolution.test.mjs +369 -0
- package/foundation/integrations/theme-descriptor.d.mts +8 -0
- package/foundation/integrations/theme-descriptor.mjs +44 -0
- package/foundation/integrations/validate-contributions.mjs +104 -10
- package/foundation/response/error-codes.doc.mjs +2 -2
- package/foundation/response/error-codes.mjs +1 -1
- package/foundation/response/response-types.doc.mjs +1 -1
- package/foundation/response/response.doc.mjs +1 -1
- package/foundation/text/string-utils.mjs +22 -10
- package/package.json +9 -9
- package/assets/templates/themes/manifest.json +0 -95
|
@@ -9,7 +9,7 @@ export const doc = {
|
|
|
9
9
|
type: 'command',
|
|
10
10
|
name: 'doctor integration validate',
|
|
11
11
|
displayName: 'astryx doctor integration validate',
|
|
12
|
-
namespace: 'cli',
|
|
12
|
+
namespace: 'cli/commands',
|
|
13
13
|
summary: 'Validate an integration manifest and its contributions',
|
|
14
14
|
description:
|
|
15
15
|
'Validates one integration at a time: the local package rooted at cwd, or an ' +
|
|
@@ -9,7 +9,7 @@ export const doc = {
|
|
|
9
9
|
type: 'command',
|
|
10
10
|
name: 'doctor integration',
|
|
11
11
|
displayName: 'astryx doctor integration',
|
|
12
|
-
namespace: 'cli',
|
|
12
|
+
namespace: 'cli/commands',
|
|
13
13
|
summary: 'Check an integration package while authoring it',
|
|
14
14
|
description:
|
|
15
15
|
'The integration-authoring diagnostics group. Validate a manifest and all ' +
|
|
@@ -44,7 +44,7 @@ function writeIntegration({
|
|
|
44
44
|
const stem = path.join(tmpDir, 'templates', id);
|
|
45
45
|
fs.mkdirSync(path.dirname(stem), {recursive: true});
|
|
46
46
|
fs.writeFileSync(
|
|
47
|
-
`${stem}.
|
|
47
|
+
`${stem}.doc.mjs`,
|
|
48
48
|
`export default {type: 'page', name: ${JSON.stringify(name)}, description: 'fixture'};\n`,
|
|
49
49
|
);
|
|
50
50
|
fs.writeFileSync(
|
|
@@ -124,7 +124,12 @@ describe('doctor integration — command', () => {
|
|
|
124
124
|
return true;
|
|
125
125
|
});
|
|
126
126
|
|
|
127
|
-
await createProgram().parseAsync([
|
|
127
|
+
await createProgram().parseAsync([
|
|
128
|
+
'node',
|
|
129
|
+
'astryx',
|
|
130
|
+
'doctor',
|
|
131
|
+
'integration',
|
|
132
|
+
]);
|
|
128
133
|
|
|
129
134
|
const output = writes.join('');
|
|
130
135
|
expect(output).toContain('validate [package]');
|
|
@@ -136,7 +141,9 @@ describe('doctor integration — command', () => {
|
|
|
136
141
|
|
|
137
142
|
it('explains the optional package argument in every leaf help', () => {
|
|
138
143
|
const program = createProgram();
|
|
139
|
-
const doctor = program.commands.find(
|
|
144
|
+
const doctor = program.commands.find(
|
|
145
|
+
command => command.name() === 'doctor',
|
|
146
|
+
);
|
|
140
147
|
const integration = doctor?.commands.find(
|
|
141
148
|
command => command.name() === 'integration',
|
|
142
149
|
);
|
|
@@ -152,7 +159,10 @@ describe('doctor integration — command', () => {
|
|
|
152
159
|
});
|
|
153
160
|
|
|
154
161
|
it('templates explains how to check an installed package when no local manifest exists', async () => {
|
|
155
|
-
fs.writeFileSync(
|
|
162
|
+
fs.writeFileSync(
|
|
163
|
+
path.join(tmpDir, 'package.json'),
|
|
164
|
+
JSON.stringify({name: 'plain'}),
|
|
165
|
+
);
|
|
156
166
|
process.chdir(tmpDir);
|
|
157
167
|
|
|
158
168
|
await createProgram().parseAsync([
|
|
@@ -278,9 +288,7 @@ describe('doctor integration — command', () => {
|
|
|
278
288
|
const output = logCalls.join('\n');
|
|
279
289
|
expect(output).toContain('[warn]');
|
|
280
290
|
expect(output).toContain(core.name);
|
|
281
|
-
expect(output).toContain(
|
|
282
|
-
`component ${core.name} --package @acme/widgets`,
|
|
283
|
-
);
|
|
291
|
+
expect(output).toContain(`component ${core.name} --package @acme/widgets`);
|
|
284
292
|
expect(process.exitCode).toBeUndefined();
|
|
285
293
|
});
|
|
286
294
|
|
|
@@ -12,7 +12,7 @@ export const doc = {
|
|
|
12
12
|
type: 'command',
|
|
13
13
|
name: 'doctor',
|
|
14
14
|
displayName: 'astryx doctor',
|
|
15
|
-
namespace: 'cli',
|
|
15
|
+
namespace: 'cli/commands',
|
|
16
16
|
summary: 'Diagnose Astryx projects and integration packages',
|
|
17
17
|
description:
|
|
18
18
|
'Runs read-only project health diagnostics by default: Node version, @astryxdesign/core ' +
|
|
@@ -10,7 +10,7 @@ export const doc = {
|
|
|
10
10
|
type: 'command',
|
|
11
11
|
name: 'gap-report',
|
|
12
12
|
displayName: 'astryx gap-report',
|
|
13
|
-
namespace: 'cli',
|
|
13
|
+
namespace: 'cli/commands',
|
|
14
14
|
summary: 'Route a design-system gap to its owning package',
|
|
15
15
|
description:
|
|
16
16
|
'Reports a missing component, variant, layout, styling, accessibility, API, or documentation capability. The command selects an explicit package first, then a unique component owner, then Core. The report fans out to every effective handler: project config first, then each loaded integration in config order. Public handlers require --confirm-public per handler; internal handlers always run. A handler failure is isolated and does not prevent later handlers.',
|
|
@@ -12,7 +12,7 @@ export const doc = {
|
|
|
12
12
|
type: 'command',
|
|
13
13
|
name: 'hook',
|
|
14
14
|
displayName: 'astryx hook',
|
|
15
|
-
namespace: 'cli',
|
|
15
|
+
namespace: 'cli/commands',
|
|
16
16
|
summary: 'List hooks or print hook docs',
|
|
17
17
|
description:
|
|
18
18
|
'Resolves a hook by name and prints its authored doc, or lists the catalog grouped ' +
|
|
@@ -12,7 +12,7 @@ export const doc = {
|
|
|
12
12
|
type: 'command',
|
|
13
13
|
name: 'init',
|
|
14
14
|
displayName: 'astryx init',
|
|
15
|
-
namespace: 'cli',
|
|
15
|
+
namespace: 'cli/commands',
|
|
16
16
|
summary: 'Initialize the design system in your project',
|
|
17
17
|
description:
|
|
18
18
|
'Non-interactive project setup (no prompts, so it behaves the same for humans, ' +
|
|
@@ -126,7 +126,7 @@ describe('integration add control definitions', () => {
|
|
|
126
126
|
);
|
|
127
127
|
expect(page.status).toBe(0);
|
|
128
128
|
expect(
|
|
129
|
-
fs.readFileSync(path.join(tmpDir, 'templates', 'acme-page.
|
|
129
|
+
fs.readFileSync(path.join(tmpDir, 'templates', 'acme-page.doc.mjs'), 'utf-8'),
|
|
130
130
|
).toContain("type: 'page'");
|
|
131
131
|
});
|
|
132
132
|
});
|
|
@@ -5,7 +5,7 @@ export const doc = {
|
|
|
5
5
|
type: 'command',
|
|
6
6
|
name: 'integration add',
|
|
7
7
|
displayName: 'astryx integration add',
|
|
8
|
-
namespace: 'cli',
|
|
8
|
+
namespace: 'cli/commands',
|
|
9
9
|
summary: 'Add one working contribution to an integration package',
|
|
10
10
|
description:
|
|
11
11
|
'Writes the complete minimum shape the selected contribution needs, creates the integration manifest on first use, declares the root only after a valid contribution exists, and verifies the result through the same discovery contract the packed-package check uses.',
|
|
@@ -5,7 +5,7 @@ export const doc = {
|
|
|
5
5
|
type: 'command',
|
|
6
6
|
name: 'integration pack',
|
|
7
7
|
displayName: 'astryx integration pack',
|
|
8
|
-
namespace: 'cli',
|
|
8
|
+
namespace: 'cli/commands',
|
|
9
9
|
summary: 'Prove the packed integration is what consumers receive',
|
|
10
10
|
description:
|
|
11
11
|
'Runs the package lifecycle, packs with npm, checks every required contribution file against the real tarball, extracts it into a scratch consumer, and compares the local and packed contribution inventories through one shared contract.',
|
|
@@ -201,13 +201,6 @@ export const oceanTheme = defineTheme({
|
|
|
201
201
|
});
|
|
202
202
|
`,
|
|
203
203
|
);
|
|
204
|
-
const catalogFile = path.join(providerDir, 'themes', 'manifest.json');
|
|
205
|
-
const catalog = JSON.parse(fs.readFileSync(catalogFile, 'utf-8'));
|
|
206
|
-
catalog.themes[0].files.push(
|
|
207
|
-
'tokens/ocean.palette.ts',
|
|
208
|
-
'tokens/ocean.palette.receipt.json',
|
|
209
|
-
);
|
|
210
|
-
writeJson(catalogFile, catalog);
|
|
211
204
|
|
|
212
205
|
const providerPackage = JSON.parse(
|
|
213
206
|
fs.readFileSync(path.join(providerDir, 'package.json'), 'utf-8'),
|
|
@@ -464,8 +457,9 @@ export const oceanTheme = defineTheme({
|
|
|
464
457
|
outputDir: target,
|
|
465
458
|
files: [
|
|
466
459
|
'oceanTheme.ts',
|
|
467
|
-
'
|
|
460
|
+
'oceanTheme.doc.mjs',
|
|
468
461
|
'tokens/ocean.palette.receipt.json',
|
|
462
|
+
'tokens/ocean.palette.ts',
|
|
469
463
|
],
|
|
470
464
|
},
|
|
471
465
|
});
|
|
@@ -612,7 +606,7 @@ export const oceanTheme = defineTheme({
|
|
|
612
606
|
expect(corruptedInstall.status).not.toBe(0);
|
|
613
607
|
expect(parseEnvelope(corruptedInstall.stdout)).toMatchObject({
|
|
614
608
|
code: 'ERR_THEME_INVALID',
|
|
615
|
-
error: expect.stringContaining('ocean.palette
|
|
609
|
+
error: expect.stringContaining('./tokens/ocean.palette'),
|
|
616
610
|
});
|
|
617
611
|
}, 120_000);
|
|
618
612
|
});
|
|
@@ -5,7 +5,7 @@ export const doc = {
|
|
|
5
5
|
type: 'command',
|
|
6
6
|
name: 'integration',
|
|
7
7
|
displayName: 'astryx integration',
|
|
8
|
-
namespace: 'cli',
|
|
8
|
+
namespace: 'cli/commands',
|
|
9
9
|
summary: 'Author and verify an Astryx integration package',
|
|
10
10
|
description:
|
|
11
11
|
'Add contributions that are valid on arrival, then prove the packed package exposes the same contributions a consumer will receive.',
|
|
@@ -13,7 +13,7 @@ export const doc = {
|
|
|
13
13
|
type: 'command',
|
|
14
14
|
name: 'layout expand',
|
|
15
15
|
displayName: 'astryx layout expand',
|
|
16
|
-
namespace: 'cli',
|
|
16
|
+
namespace: 'cli/commands',
|
|
17
17
|
summary: 'Expand a layout expression into validated XDS TSX',
|
|
18
18
|
description:
|
|
19
19
|
'Parses and validates a compressed XLE/XLO expression, then expands it into ' +
|
|
@@ -13,7 +13,7 @@ export const doc = {
|
|
|
13
13
|
type: 'command',
|
|
14
14
|
name: 'layout grammar',
|
|
15
15
|
displayName: 'astryx layout grammar',
|
|
16
|
-
namespace: 'cli',
|
|
16
|
+
namespace: 'cli/commands',
|
|
17
17
|
summary:
|
|
18
18
|
'Print the XLE/XLO cheatsheet (alias table generated from this branch)',
|
|
19
19
|
description:
|
|
@@ -12,7 +12,7 @@ export const doc = {
|
|
|
12
12
|
type: 'command',
|
|
13
13
|
name: 'layout',
|
|
14
14
|
displayName: 'astryx layout',
|
|
15
|
-
namespace: 'cli',
|
|
15
|
+
namespace: 'cli/commands',
|
|
16
16
|
summary: 'Generate XDS layouts from compressed expressions (XLE/XLO)',
|
|
17
17
|
description:
|
|
18
18
|
'The layout command group. Running astryx layout with no subcommand prints the ' +
|
|
@@ -12,7 +12,7 @@ export const doc = {
|
|
|
12
12
|
type: 'command',
|
|
13
13
|
name: 'manifest',
|
|
14
14
|
displayName: 'astryx manifest',
|
|
15
|
-
namespace: 'cli',
|
|
15
|
+
namespace: 'cli/commands',
|
|
16
16
|
summary: 'Print the full CLI capability manifest (use with --json).',
|
|
17
17
|
description:
|
|
18
18
|
'Emits the complete CLI surface: every command with its arguments, options, ' +
|
|
@@ -12,7 +12,7 @@ export const doc = {
|
|
|
12
12
|
type: 'command',
|
|
13
13
|
name: 'search',
|
|
14
14
|
displayName: 'astryx search',
|
|
15
|
-
namespace: 'cli',
|
|
15
|
+
namespace: 'cli/commands',
|
|
16
16
|
summary: 'Search components, hooks, docs, and templates in one ranked list',
|
|
17
17
|
description:
|
|
18
18
|
'Terminal front-end to search(): prints one ranked, greppable list across ' +
|
|
@@ -12,7 +12,7 @@ export const doc = {
|
|
|
12
12
|
type: 'command',
|
|
13
13
|
name: 'swizzle',
|
|
14
14
|
displayName: 'astryx swizzle',
|
|
15
|
-
namespace: 'cli',
|
|
15
|
+
namespace: 'cli/commands',
|
|
16
16
|
summary: 'Copy component source for customization',
|
|
17
17
|
description:
|
|
18
18
|
"Ejects a component's source from the resolved @astryxdesign/core (or its owning " +
|
|
@@ -13,7 +13,7 @@ export const doc = {
|
|
|
13
13
|
type: 'command',
|
|
14
14
|
name: 'template',
|
|
15
15
|
displayName: 'astryx template',
|
|
16
|
-
namespace: 'cli',
|
|
16
|
+
namespace: 'cli/commands',
|
|
17
17
|
summary: 'Inject a page or block template',
|
|
18
18
|
description:
|
|
19
19
|
'One entry point for the template family: with no name it lists the discovered ' +
|
|
@@ -13,7 +13,7 @@ export const doc = {
|
|
|
13
13
|
type: 'command',
|
|
14
14
|
name: 'theme add',
|
|
15
15
|
displayName: 'astryx theme add',
|
|
16
|
-
namespace: 'cli',
|
|
16
|
+
namespace: 'cli/commands',
|
|
17
17
|
summary: 'Scaffold a theme into your project as editable source',
|
|
18
18
|
description:
|
|
19
19
|
"Copies a bundled or installed integration theme's source into your project so you own it. " +
|
|
@@ -49,7 +49,7 @@ export const doc = {
|
|
|
49
49
|
{code: 0, when: 'success'},
|
|
50
50
|
{
|
|
51
51
|
code: 1,
|
|
52
|
-
when: 'unknown or ambiguous theme, a path escape, a missing
|
|
52
|
+
when: 'unknown or ambiguous theme, a path escape, a missing descriptor or source, or an existing file without --overwrite',
|
|
53
53
|
},
|
|
54
54
|
],
|
|
55
55
|
related: ['theme list', 'theme build'],
|
|
@@ -13,7 +13,7 @@ export const doc = {
|
|
|
13
13
|
type: 'command',
|
|
14
14
|
name: 'theme build',
|
|
15
15
|
displayName: 'astryx theme build',
|
|
16
|
-
namespace: 'cli',
|
|
16
|
+
namespace: 'cli/commands',
|
|
17
17
|
summary: 'Compile standalone themes or one keyed theme family',
|
|
18
18
|
description:
|
|
19
19
|
'Compiles defineTheme() sources through the same theme pipeline into scoped CSS, ' +
|
|
@@ -13,7 +13,7 @@ export const doc = {
|
|
|
13
13
|
type: 'command',
|
|
14
14
|
name: 'theme list',
|
|
15
15
|
displayName: 'astryx theme list',
|
|
16
|
-
namespace: 'cli',
|
|
16
|
+
namespace: 'cli/commands',
|
|
17
17
|
summary: 'List themes available to add',
|
|
18
18
|
description:
|
|
19
19
|
'Lists themes bundled with this CLI and source themes contributed by installed integrations, ' +
|
|
@@ -37,7 +37,7 @@ export const doc = {
|
|
|
37
37
|
{code: 0, when: 'success'},
|
|
38
38
|
{
|
|
39
39
|
code: 1,
|
|
40
|
-
when: '
|
|
40
|
+
when: 'a bundled or installed theme descriptor cannot be read',
|
|
41
41
|
},
|
|
42
42
|
],
|
|
43
43
|
related: ['theme add', 'theme build'],
|
|
@@ -5,7 +5,7 @@ export const doc = {
|
|
|
5
5
|
type: 'command',
|
|
6
6
|
name: 'theme palette generate',
|
|
7
7
|
displayName: 'astryx theme palette generate',
|
|
8
|
-
namespace: 'cli',
|
|
8
|
+
namespace: 'cli/commands',
|
|
9
9
|
summary: 'Generate an OKLCH palette candidate for human review',
|
|
10
10
|
description:
|
|
11
11
|
'Reads an explicit JSON request and runs the versioned astryx-oklch-v1 recipe. ' +
|
|
@@ -21,8 +21,8 @@ export const doc = {
|
|
|
21
21
|
'JSON is also supported. Existing author-owned files are left untouched unless --overwrite is explicit. ' +
|
|
22
22
|
'When used in a theme integration, keep the palette request under the theme slug, ' +
|
|
23
23
|
'write the candidate and receipt under that same slug, import the candidate from the theme source, ' +
|
|
24
|
-
|
|
25
|
-
'
|
|
24
|
+
'and keep all three inside the theme directory: `astryx theme add` copies that whole ' +
|
|
25
|
+
'directory into the consumer project, so nothing else has to list them.',
|
|
26
26
|
fn: 'themePaletteGenerate',
|
|
27
27
|
args: [{name: 'config', param: 'configPath', required: true}],
|
|
28
28
|
options: [
|
|
@@ -5,7 +5,7 @@ export const doc = {
|
|
|
5
5
|
type: 'command',
|
|
6
6
|
name: 'theme palette',
|
|
7
7
|
displayName: 'astryx theme palette',
|
|
8
|
-
namespace: 'cli',
|
|
8
|
+
namespace: 'cli/commands',
|
|
9
9
|
summary: 'Create and work with theme-owned color palettes',
|
|
10
10
|
description:
|
|
11
11
|
'Palette authoring tools. The initial generate command creates reviewable candidates. ' +
|
|
@@ -13,7 +13,7 @@ export const doc = {
|
|
|
13
13
|
type: 'command',
|
|
14
14
|
name: 'theme targets',
|
|
15
15
|
displayName: 'astryx theme targets',
|
|
16
|
-
namespace: 'cli',
|
|
16
|
+
namespace: 'cli/commands',
|
|
17
17
|
summary: 'List the component theming targets a theme can override',
|
|
18
18
|
description:
|
|
19
19
|
'Prints every `defineTheme` components key across the system: the stable class it paints, ' +
|
|
@@ -13,7 +13,7 @@ export const doc = {
|
|
|
13
13
|
type: 'command',
|
|
14
14
|
name: 'theme template',
|
|
15
15
|
displayName: 'astryx theme template',
|
|
16
|
-
namespace: 'cli',
|
|
16
|
+
namespace: 'cli/commands',
|
|
17
17
|
summary: 'Write the annotated theme template into your project',
|
|
18
18
|
description:
|
|
19
19
|
'Writes theme.template.ts: the annotated reference for the whole theme surface, covering every ' +
|
|
@@ -12,7 +12,7 @@ export const doc = {
|
|
|
12
12
|
type: 'command',
|
|
13
13
|
name: 'theme',
|
|
14
14
|
displayName: 'astryx theme',
|
|
15
|
-
namespace: 'cli',
|
|
15
|
+
namespace: 'cli/commands',
|
|
16
16
|
summary: 'Theme tools: build, export, and manage themes',
|
|
17
17
|
description:
|
|
18
18
|
'The theme command group. Running astryx theme with no subcommand prints the ' +
|
|
@@ -12,7 +12,7 @@ export const doc = {
|
|
|
12
12
|
type: 'command',
|
|
13
13
|
name: 'upgrade',
|
|
14
14
|
displayName: 'astryx upgrade',
|
|
15
|
-
namespace: 'cli',
|
|
15
|
+
namespace: 'cli/commands',
|
|
16
16
|
summary: 'Migrate versions and update ShadCN-copied compositions',
|
|
17
17
|
description:
|
|
18
18
|
'Migrates project source from a previous Astryx version to the installed one by ' +
|
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
* - Brief: signature line with import hint, description, key params
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
discoverHooks,
|
|
14
|
+
findHookDoc,
|
|
15
|
+
} from '../../../foundation/discovery/hook-discovery.mjs';
|
|
13
16
|
import {loadDocs} from '../../../foundation/discovery/component-loader.mjs';
|
|
14
17
|
import {formatAccessibility, mdCell} from './component-format.mjs';
|
|
15
18
|
|
|
@@ -23,7 +26,9 @@ function buildSignature(docs) {
|
|
|
23
26
|
const name = docs.name;
|
|
24
27
|
|
|
25
28
|
// Build params string — only top-level params (skip options.foo nested params)
|
|
26
|
-
const topParams = (docs.params || []).filter(
|
|
29
|
+
const topParams = (docs.params || []).filter(
|
|
30
|
+
(/** @type {any} */ p) => !p.name.includes('.'),
|
|
31
|
+
);
|
|
27
32
|
const paramStr = topParams
|
|
28
33
|
.map((/** @type {any} */ p) => {
|
|
29
34
|
const opt = p.required ? '' : '?';
|
|
@@ -150,7 +155,9 @@ export function formatHookCompact(docs, importPath) {
|
|
|
150
155
|
const imp = importPath || docs.importPath;
|
|
151
156
|
if (imp) {
|
|
152
157
|
sections.push('## Import\n');
|
|
153
|
-
sections.push(
|
|
158
|
+
sections.push(
|
|
159
|
+
`\`\`\`tsx\nimport { ${docs.name} } from '${imp}';\n\`\`\`\n`,
|
|
160
|
+
);
|
|
154
161
|
}
|
|
155
162
|
|
|
156
163
|
// Best Practices (matches component compact)
|
|
@@ -228,7 +235,9 @@ export function formatHookBrief(docs) {
|
|
|
228
235
|
// Key params (matches component brief 'prop, prop' line)
|
|
229
236
|
const paramNames = (docs.params || [])
|
|
230
237
|
.filter((/** @type {any} */ p) => !p.name.includes('.'))
|
|
231
|
-
.map((/** @type {any} */ p) =>
|
|
238
|
+
.map((/** @type {any} */ p) =>
|
|
239
|
+
p.required ? `${p.name}: ${p.type.split('|')[0].trim()}` : p.name,
|
|
240
|
+
);
|
|
232
241
|
if (paramNames.length > 0) {
|
|
233
242
|
output.push(` ${paramNames.join(', ')}`);
|
|
234
243
|
}
|
|
@@ -253,7 +262,7 @@ export async function formatHookBriefAll(coreDir) {
|
|
|
253
262
|
const docPath = findHookDoc(coreDir, hookName);
|
|
254
263
|
if (docPath) {
|
|
255
264
|
try {
|
|
256
|
-
const docs = await loadDocs(docPath);
|
|
265
|
+
const docs = await loadDocs(docPath, {root: 'hooks'});
|
|
257
266
|
output.push(formatHookBrief(docs));
|
|
258
267
|
} catch {
|
|
259
268
|
output.push(`${hookName}\n (no docs)\n`);
|
|
@@ -15,6 +15,7 @@ function installThemeIntegration(packageName, slug) {
|
|
|
15
15
|
...packageName.split('/'),
|
|
16
16
|
);
|
|
17
17
|
const themeDir = path.join(packageDir, 'themes', slug);
|
|
18
|
+
const stem = `${slug.replace(/-([a-z0-9])/gu, (_, character) => character.toUpperCase())}Theme`;
|
|
18
19
|
fs.mkdirSync(themeDir, {recursive: true});
|
|
19
20
|
fs.writeFileSync(
|
|
20
21
|
path.join(packageDir, 'package.json'),
|
|
@@ -22,28 +23,19 @@ function installThemeIntegration(packageName, slug) {
|
|
|
22
23
|
);
|
|
23
24
|
fs.writeFileSync(
|
|
24
25
|
path.join(packageDir, 'astryx.integration.mjs'),
|
|
25
|
-
`export default {themes: './themes'}
|
|
26
|
+
`export default {themes: './themes'};
|
|
27
|
+
`,
|
|
26
28
|
);
|
|
27
29
|
fs.writeFileSync(
|
|
28
|
-
path.join(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
{
|
|
33
|
-
slug,
|
|
34
|
-
displayName: 'Ocean',
|
|
35
|
-
description: 'Blue and calm.',
|
|
36
|
-
maintained: true,
|
|
37
|
-
entry: 'oceanTheme.ts',
|
|
38
|
-
exportName: 'oceanTheme',
|
|
39
|
-
files: ['oceanTheme.ts'],
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
}),
|
|
30
|
+
path.join(themeDir, `${stem}.doc.mjs`),
|
|
31
|
+
`/** @type {import('@astryxdesign/cli/authoring').ThemeDoc} */
|
|
32
|
+
export default {type: 'theme', name: '${slug}', displayName: 'Ocean', description: 'Blue and calm.', maintained: true};
|
|
33
|
+
`,
|
|
43
34
|
);
|
|
44
35
|
fs.writeFileSync(
|
|
45
|
-
path.join(themeDir,
|
|
46
|
-
`export const
|
|
36
|
+
path.join(themeDir, `${stem}.ts`),
|
|
37
|
+
`export const ${stem} = {};
|
|
38
|
+
`,
|
|
47
39
|
);
|
|
48
40
|
}
|
|
49
41
|
|
|
@@ -99,7 +91,7 @@ describe('Project themes', () => {
|
|
|
99
91
|
]);
|
|
100
92
|
});
|
|
101
93
|
|
|
102
|
-
it('records an invalid integration theme
|
|
94
|
+
it('records an invalid integration theme descriptor as an issue', async () => {
|
|
103
95
|
installThemeIntegration('@acme/themes', 'ocean');
|
|
104
96
|
fs.rmSync(
|
|
105
97
|
path.join(
|
|
@@ -9,6 +9,14 @@
|
|
|
9
9
|
* @returns {string|null}
|
|
10
10
|
*/
|
|
11
11
|
export function findConfigPath(startDir?: string): string | null;
|
|
12
|
+
/**
|
|
13
|
+
* The provider ledger a Project resolved at load: one outcome for every
|
|
14
|
+
* package directory configured, autolinked, or authored. Internal: upgrade
|
|
15
|
+
* resolves on top of it, and tests account for every candidate with it.
|
|
16
|
+
* @param {Project} project
|
|
17
|
+
* @returns {import('../integrations/provider-resolution.mjs').ProviderLedger}
|
|
18
|
+
*/
|
|
19
|
+
export function providerLedgerOf(project: Project): import("../integrations/provider-resolution.mjs").ProviderLedger;
|
|
12
20
|
/**
|
|
13
21
|
* An integration issue tagged with the owner package. The base
|
|
14
22
|
* {@link import('../integrations/issue').AstryxIntegrationIssue} fields plus the
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
* async). It does what loadConfig did — find the config sibling-of
|
|
16
16
|
* package.json, import + validate it, load the configured integrations —
|
|
17
17
|
* plus autolink the installed ones no config names, and self-resolve the
|
|
18
|
-
* package being authored when it carries a manifest.
|
|
18
|
+
* package being authored when it carries a manifest. Provider identity is
|
|
19
|
+
* resolved once over all three (see integrations/provider-resolution), and
|
|
20
|
+
* the ledger is kept for {@link providerLedgerOf}. Discovery is LAZY.
|
|
19
21
|
* - Discovery methods (components/templates/codemods/docs/themes) are MEMOIZED per
|
|
20
22
|
* instance (via the pluggable cache) and orchestrate the EXISTING discovery
|
|
21
23
|
* functions — Project never reimplements discovery.
|
|
@@ -38,10 +40,10 @@ import {parseConfig} from '../../authoring/config/parse.mjs';
|
|
|
38
40
|
import {
|
|
39
41
|
loadIntegrations,
|
|
40
42
|
loadLocalIntegration,
|
|
41
|
-
markProviderConflicts,
|
|
42
43
|
resolvePackageDir,
|
|
43
44
|
} from '../integrations/integrations.mjs';
|
|
44
|
-
import {
|
|
45
|
+
import {loadAutolinkCandidates} from '../integrations/autolink.mjs';
|
|
46
|
+
import {resolveProviders} from '../integrations/provider-resolution.mjs';
|
|
45
47
|
import {
|
|
46
48
|
setProject as setDebugProject,
|
|
47
49
|
setEventHandler as setDebugEventHandler,
|
|
@@ -297,6 +299,24 @@ export function findConfigPath(startDir = process.cwd()) {
|
|
|
297
299
|
return present.length === 1 ? present[0] : null;
|
|
298
300
|
}
|
|
299
301
|
|
|
302
|
+
/**
|
|
303
|
+
* The provider ledger each loaded Project resolved, kept off the class so it
|
|
304
|
+
* is not part of the Project API.
|
|
305
|
+
* @type {WeakMap<Project, import('../integrations/provider-resolution.mjs').ProviderLedger>}
|
|
306
|
+
*/
|
|
307
|
+
const PROVIDER_LEDGERS = new WeakMap();
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* The provider ledger a Project resolved at load: one outcome for every
|
|
311
|
+
* package directory configured, autolinked, or authored. Internal: upgrade
|
|
312
|
+
* resolves on top of it, and tests account for every candidate with it.
|
|
313
|
+
* @param {Project} project
|
|
314
|
+
* @returns {import('../integrations/provider-resolution.mjs').ProviderLedger}
|
|
315
|
+
*/
|
|
316
|
+
export function providerLedgerOf(project) {
|
|
317
|
+
return PROVIDER_LEDGERS.get(project) ?? new Map();
|
|
318
|
+
}
|
|
319
|
+
|
|
300
320
|
/**
|
|
301
321
|
* The single API for reading resolved project configuration. Construct via the
|
|
302
322
|
* async {@link Project.load} factory.
|
|
@@ -402,17 +422,14 @@ export class Project {
|
|
|
402
422
|
// This runs whether or not a config exists, because the projects it reaches
|
|
403
423
|
// are overwhelmingly the ones with no astryx.config at all: a scaffold adds
|
|
404
424
|
// the dependency and writes no config, and the integration then contributes
|
|
405
|
-
// nothing for want of a line nobody knew to write.
|
|
425
|
+
// nothing for want of a line nobody knew to write. Resolved AFTER the
|
|
406
426
|
// configured ones so an explicit entry keeps its position and its
|
|
407
427
|
// precedence in every discovery order.
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
fresh,
|
|
414
|
-
})),
|
|
415
|
-
];
|
|
428
|
+
const autolinked = await loadAutolinkCandidates({
|
|
429
|
+
projectDir,
|
|
430
|
+
loaded: loadedIntegrations,
|
|
431
|
+
fresh,
|
|
432
|
+
});
|
|
416
433
|
|
|
417
434
|
// The package being authored is the one package that cannot install itself.
|
|
418
435
|
// When it carries a manifest, resolve its working bytes directly so every
|
|
@@ -420,17 +437,27 @@ export class Project {
|
|
|
420
437
|
// replaces the same installed package in place, preserving configured
|
|
421
438
|
// precedence while making the source being edited authoritative.
|
|
422
439
|
const localIntegration = await loadLocalIntegrationSafely(projectDir, fresh);
|
|
423
|
-
if (localIntegration) {
|
|
424
|
-
const existing = loadedIntegrations.findIndex(
|
|
425
|
-
integration => integration.name === localIntegration.name,
|
|
426
|
-
);
|
|
427
|
-
if (existing === -1) loadedIntegrations.push(localIntegration);
|
|
428
|
-
else loadedIntegrations[existing] = localIntegration;
|
|
429
|
-
}
|
|
430
440
|
|
|
431
441
|
// Autolinked and local packages can claim a provider ID that a configured
|
|
432
442
|
// package already holds, so identity is resolved once over the final set.
|
|
433
|
-
|
|
443
|
+
const resolution = resolveProviders([
|
|
444
|
+
...loadedIntegrations.map(integration => ({
|
|
445
|
+
source: /** @type {const} */ ('configured'),
|
|
446
|
+
integration,
|
|
447
|
+
spec: integration.__spec,
|
|
448
|
+
})),
|
|
449
|
+
...autolinked,
|
|
450
|
+
...(localIntegration
|
|
451
|
+
? [
|
|
452
|
+
{
|
|
453
|
+
source: /** @type {const} */ ('local'),
|
|
454
|
+
integration: localIntegration,
|
|
455
|
+
spec: localIntegration.__spec,
|
|
456
|
+
},
|
|
457
|
+
]
|
|
458
|
+
: []),
|
|
459
|
+
]);
|
|
460
|
+
loadedIntegrations = resolution.integrations;
|
|
434
461
|
|
|
435
462
|
// The debug recorder resolves its settings synchronously, long before any
|
|
436
463
|
// command gets here, so this is where a project's `debug` block gets a
|
|
@@ -461,7 +488,7 @@ export class Project {
|
|
|
461
488
|
// Never let recording break config loading.
|
|
462
489
|
}
|
|
463
490
|
|
|
464
|
-
|
|
491
|
+
const project = new Project({
|
|
465
492
|
cwd,
|
|
466
493
|
configPath,
|
|
467
494
|
config,
|
|
@@ -470,6 +497,8 @@ export class Project {
|
|
|
470
497
|
cache: resolvedCache,
|
|
471
498
|
hash,
|
|
472
499
|
});
|
|
500
|
+
PROVIDER_LEDGERS.set(project, resolution.ledger);
|
|
501
|
+
return project;
|
|
473
502
|
}
|
|
474
503
|
|
|
475
504
|
/**
|