trix-ui 0.2.14 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/add/analysis.d.ts +4 -4
- package/dist/commands/add/analysis.js +56 -56
- package/dist/commands/add/command.d.ts +2 -2
- package/dist/commands/add/command.js +205 -202
- package/dist/commands/add/command.js.map +1 -1
- package/dist/commands/add/config.d.ts +2 -2
- package/dist/commands/add/config.js +11 -11
- package/dist/commands/add/install.d.ts +27 -27
- package/dist/commands/add/install.js +80 -80
- package/dist/commands/add/package-manager.d.ts +1 -1
- package/dist/commands/add/package-manager.js +4 -4
- package/dist/commands/add/project-files.d.ts +2 -2
- package/dist/commands/add/project-files.js +17 -17
- package/dist/commands/add/prompts.d.ts +3 -3
- package/dist/commands/add/prompts.js +28 -28
- package/dist/commands/add/registry.d.ts +4 -4
- package/dist/commands/add/registry.js +6 -6
- package/dist/commands/add/types.d.ts +33 -33
- package/dist/commands/add/types.js +1 -1
- package/dist/commands/add/ui.d.ts +4 -4
- package/dist/commands/add/ui.js +55 -55
- package/dist/commands/add/validation.d.ts +3 -3
- package/dist/commands/add/validation.js +30 -30
- package/dist/commands/add-collection.d.ts +1 -1
- package/dist/commands/add-collection.js +1 -1
- package/dist/commands/add-composite.d.ts +2 -2
- package/dist/commands/add-composite.js +205 -201
- package/dist/commands/add-composite.js.map +1 -1
- package/dist/commands/add-section.d.ts +2 -2
- package/dist/commands/add-section.js +205 -201
- package/dist/commands/add-section.js.map +1 -1
- package/dist/commands/add-wrapper.d.ts +2 -2
- package/dist/commands/add-wrapper.js +205 -201
- package/dist/commands/add-wrapper.js.map +1 -1
- package/dist/commands/add.d.ts +1 -1
- package/dist/commands/add.js +1 -1
- package/dist/commands/build.d.ts +2 -2
- package/dist/commands/build.js +104 -104
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/doctor.d.ts +2 -2
- package/dist/commands/doctor.js +67 -67
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init/command.d.ts +8 -2
- package/dist/commands/init/command.js +186 -114
- package/dist/commands/init/command.js.map +1 -1
- package/dist/commands/init/config.d.ts +9 -2
- package/dist/commands/init/config.js +45 -25
- package/dist/commands/init/config.js.map +1 -1
- package/dist/commands/init/constants.d.ts +3 -3
- package/dist/commands/init/constants.js +105 -105
- package/dist/commands/init/dependencies.d.ts +22 -5
- package/dist/commands/init/dependencies.js +86 -52
- package/dist/commands/init/dependencies.js.map +1 -1
- package/dist/commands/init/filesystem.d.ts +7 -1
- package/dist/commands/init/filesystem.js +16 -10
- package/dist/commands/init/filesystem.js.map +1 -1
- package/dist/commands/init/lockfile.d.ts +1 -1
- package/dist/commands/init/lockfile.js +1 -1
- package/dist/commands/init/package-json.d.ts +17 -6
- package/dist/commands/init/package-json.js +28 -18
- package/dist/commands/init/package-json.js.map +1 -1
- package/dist/commands/init/project.d.ts +15 -3
- package/dist/commands/init/project.js +120 -97
- package/dist/commands/init/project.js.map +1 -1
- package/dist/commands/init/tailwind.d.ts +14 -3
- package/dist/commands/init/tailwind.js +141 -33
- package/dist/commands/init/tailwind.js.map +1 -1
- package/dist/commands/init/templates.d.ts +15 -3
- package/dist/commands/init/templates.js +27 -15
- package/dist/commands/init/templates.js.map +1 -1
- package/dist/commands/init/tsconfig.d.ts +14 -2
- package/dist/commands/init/tsconfig.js +561 -273
- package/dist/commands/init/tsconfig.js.map +1 -1
- package/dist/commands/init/types.d.ts +34 -33
- package/dist/commands/init/types.js +1 -1
- package/dist/commands/init/ui.d.ts +12 -3
- package/dist/commands/init/ui.js +45 -33
- package/dist/commands/init/ui.js.map +1 -1
- package/dist/commands/init/vite.d.ts +1 -1
- package/dist/commands/init/vite.js +17 -27
- package/dist/commands/init/vite.js.map +1 -1
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.js +1 -1
- package/dist/commands/list.d.ts +2 -2
- package/dist/commands/list.js +69 -62
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/remove.d.ts +2 -2
- package/dist/commands/remove.js +95 -93
- package/dist/commands/remove.js.map +1 -1
- package/dist/commands/shared/add-collection.d.ts +50 -50
- package/dist/commands/shared/add-collection.js +206 -206
- package/dist/commands/shared/list-entries.d.ts +6 -6
- package/dist/commands/shared/list-entries.js +12 -12
- package/dist/commands/shared/name-utils.d.ts +1 -1
- package/dist/commands/shared/name-utils.js +13 -13
- package/dist/commands/shared/remove-entries.d.ts +16 -16
- package/dist/commands/shared/remove-entries.js +41 -41
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/icons/libraries.d.ts +37 -37
- package/dist/icons/libraries.js +34 -34
- package/dist/index.d.ts +1 -2
- package/dist/index.js +29 -30
- package/dist/index.js.map +1 -1
- package/dist/lib/config.d.ts +45 -45
- package/dist/lib/config.js +97 -97
- package/dist/lib/fs.d.ts +82 -76
- package/dist/lib/fs.js +299 -302
- package/dist/lib/fs.js.map +1 -1
- package/dist/lib/highlighter.d.ts +6 -6
- package/dist/lib/highlighter.js +7 -7
- package/dist/lib/install.d.ts +19 -19
- package/dist/lib/install.js +101 -55
- package/dist/lib/install.js.map +1 -1
- package/dist/lib/lockfile.d.ts +63 -63
- package/dist/lib/lockfile.js +179 -173
- package/dist/lib/lockfile.js.map +1 -1
- package/dist/lib/logger.d.ts +8 -8
- package/dist/lib/logger.js +41 -41
- package/dist/lib/logger.js.map +1 -1
- package/dist/lib/paths.d.ts +14 -14
- package/dist/lib/paths.js +41 -31
- package/dist/lib/paths.js.map +1 -1
- package/dist/lib/registry.d.ts +35 -35
- package/dist/lib/registry.js +180 -180
- package/dist/schema/index.d.ts +1128 -1128
- package/dist/schema/index.js +237 -238
- package/dist/schema/index.js.map +1 -1
- package/dist/styles/create-style-map.d.ts +4 -4
- package/dist/styles/create-style-map.js +68 -68
- package/dist/styles/transform-style-map.d.ts +3 -3
- package/dist/styles/transform-style-map.js +428 -428
- package/dist/styles/transform.d.ts +10 -10
- package/dist/styles/transform.js +15 -15
- package/dist/utils/index.d.ts +6 -6
- package/dist/utils/index.js +5 -5
- package/dist/utils/transformers/transform-icons.d.ts +2 -2
- package/dist/utils/transformers/transform-icons.js +164 -164
- package/dist/utils/transformers/transform-menu.d.ts +2 -2
- package/dist/utils/transformers/transform-menu.js +39 -39
- package/dist/utils/transformers/transform-render.d.ts +2 -2
- package/dist/utils/transformers/transform-render.js +97 -97
- package/dist/utils/transformers/types.d.ts +14 -14
- package/dist/utils/transformers/types.js +1 -1
- package/package.json +69 -69
- package/dist/__tests__/contracts/registry.test.d.ts +0 -1
- package/dist/__tests__/contracts/registry.test.js +0 -42
- package/dist/__tests__/contracts/registry.test.js.map +0 -1
- package/dist/__tests__/e2e/cli.test.d.ts +0 -1
- package/dist/__tests__/e2e/cli.test.js +0 -67
- package/dist/__tests__/e2e/cli.test.js.map +0 -1
- package/dist/__tests__/helpers/fs.d.ts +0 -5
- package/dist/__tests__/helpers/fs.js +0 -26
- package/dist/__tests__/helpers/fs.js.map +0 -1
- package/dist/__tests__/integration/commands.integration.test.d.ts +0 -1
- package/dist/__tests__/integration/commands.integration.test.js +0 -184
- package/dist/__tests__/integration/commands.integration.test.js.map +0 -1
- package/dist/commands/__tests__/add-composite.test.d.ts +0 -2
- package/dist/commands/__tests__/add-composite.test.js +0 -171
- package/dist/commands/__tests__/add-composite.test.js.map +0 -1
- package/dist/commands/__tests__/add-entry.mocks.d.ts +0 -23
- package/dist/commands/__tests__/add-entry.mocks.js +0 -64
- package/dist/commands/__tests__/add-entry.mocks.js.map +0 -1
- package/dist/commands/__tests__/add-section.test.d.ts +0 -2
- package/dist/commands/__tests__/add-section.test.js +0 -191
- package/dist/commands/__tests__/add-section.test.js.map +0 -1
- package/dist/commands/__tests__/add-wrapper.test.d.ts +0 -2
- package/dist/commands/__tests__/add-wrapper.test.js +0 -171
- package/dist/commands/__tests__/add-wrapper.test.js.map +0 -1
- package/dist/commands/__tests__/cli-mocks.d.ts +0 -1
- package/dist/commands/__tests__/cli-mocks.js +0 -24
- package/dist/commands/__tests__/cli-mocks.js.map +0 -1
- package/dist/commands/__tests__/doctor.mocks.d.ts +0 -6
- package/dist/commands/__tests__/doctor.mocks.js +0 -20
- package/dist/commands/__tests__/doctor.mocks.js.map +0 -1
- package/dist/commands/__tests__/doctor.test.d.ts +0 -2
- package/dist/commands/__tests__/doctor.test.js +0 -80
- package/dist/commands/__tests__/doctor.test.js.map +0 -1
- package/dist/commands/__tests__/list.mocks.d.ts +0 -8
- package/dist/commands/__tests__/list.mocks.js +0 -20
- package/dist/commands/__tests__/list.mocks.js.map +0 -1
- package/dist/commands/__tests__/list.test.d.ts +0 -2
- package/dist/commands/__tests__/list.test.js +0 -60
- package/dist/commands/__tests__/list.test.js.map +0 -1
- package/dist/commands/__tests__/remove.mocks.d.ts +0 -9
- package/dist/commands/__tests__/remove.mocks.js +0 -26
- package/dist/commands/__tests__/remove.mocks.js.map +0 -1
- package/dist/commands/__tests__/remove.test.d.ts +0 -2
- package/dist/commands/__tests__/remove.test.js +0 -116
- package/dist/commands/__tests__/remove.test.js.map +0 -1
- package/dist/commands/add/__tests__/__mocks__/cli-mocks.d.ts +0 -1
- package/dist/commands/add/__tests__/__mocks__/cli-mocks.js +0 -21
- package/dist/commands/add/__tests__/__mocks__/cli-mocks.js.map +0 -1
- package/dist/commands/add/__tests__/add.mocks.d.ts +0 -19
- package/dist/commands/add/__tests__/add.mocks.js +0 -60
- package/dist/commands/add/__tests__/add.mocks.js.map +0 -1
- package/dist/commands/add/__tests__/add.test.d.ts +0 -2
- package/dist/commands/add/__tests__/add.test.js +0 -141
- package/dist/commands/add/__tests__/add.test.js.map +0 -1
- package/dist/commands/init/__tests__/init.mocks.d.ts +0 -24
- package/dist/commands/init/__tests__/init.mocks.js +0 -84
- package/dist/commands/init/__tests__/init.mocks.js.map +0 -1
- package/dist/commands/init/__tests__/init.test.d.ts +0 -2
- package/dist/commands/init/__tests__/init.test.js +0 -283
- package/dist/commands/init/__tests__/init.test.js.map +0 -1
- package/dist/commands/init/__tests__/tailwind.test.d.ts +0 -1
- package/dist/commands/init/__tests__/tailwind.test.js +0 -56
- package/dist/commands/init/__tests__/tailwind.test.js.map +0 -1
- package/dist/commands/init/__tests__/tsconfig.test.d.ts +0 -1
- package/dist/commands/init/__tests__/tsconfig.test.js +0 -108
- package/dist/commands/init/__tests__/tsconfig.test.js.map +0 -1
- package/dist/commands/init/__tests__/vite.test.d.ts +0 -1
- package/dist/commands/init/__tests__/vite.test.js +0 -66
- package/dist/commands/init/__tests__/vite.test.js.map +0 -1
- package/dist/commands/list-sections.d.ts +0 -2
- package/dist/commands/list-sections.js +0 -20
- package/dist/commands/list-sections.js.map +0 -1
- package/dist/commands/list-wrappers.d.ts +0 -2
- package/dist/commands/list-wrappers.js +0 -20
- package/dist/commands/list-wrappers.js.map +0 -1
- package/dist/commands/remove-section.d.ts +0 -2
- package/dist/commands/remove-section.js +0 -37
- package/dist/commands/remove-section.js.map +0 -1
- package/dist/commands/remove-wrapper.d.ts +0 -2
- package/dist/commands/remove-wrapper.js +0 -37
- package/dist/commands/remove-wrapper.js.map +0 -1
- package/dist/lib/__tests__/config.test.d.ts +0 -1
- package/dist/lib/__tests__/config.test.js +0 -49
- package/dist/lib/__tests__/config.test.js.map +0 -1
- package/dist/lib/__tests__/install.test.d.ts +0 -1
- package/dist/lib/__tests__/install.test.js +0 -149
- package/dist/lib/__tests__/install.test.js.map +0 -1
- package/dist/lib/__tests__/lockfile.test.d.ts +0 -1
- package/dist/lib/__tests__/lockfile.test.js +0 -89
- package/dist/lib/__tests__/lockfile.test.js.map +0 -1
- package/dist/lib/__tests__/paths.test.d.ts +0 -1
- package/dist/lib/__tests__/paths.test.js +0 -39
- package/dist/lib/__tests__/paths.test.js.map +0 -1
- package/dist/lib/__tests__/registry.test.d.ts +0 -1
- package/dist/lib/__tests__/registry.test.js +0 -76
- package/dist/lib/__tests__/registry.test.js.map +0 -1
package/dist/commands/remove.js
CHANGED
|
@@ -1,94 +1,96 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { Command } from "commander";
|
|
3
|
-
import { loadConfig } from "../lib/config.js";
|
|
4
|
-
import { loadLockfile, saveLockfile } from "../lib/lockfile.js";
|
|
5
|
-
import { getRegistryComposites, getRegistrySections, getRegistryWrappers, loadRegistry } from "../lib/registry.js";
|
|
6
|
-
import { removeEntries } from "./shared/remove-entries.js";
|
|
7
|
-
function toNameList(value) {
|
|
8
|
-
if (!value) {
|
|
9
|
-
return [];
|
|
10
|
-
}
|
|
11
|
-
return Array.isArray(value) ? value : [value];
|
|
12
|
-
}
|
|
13
|
-
export const removeCommand = new Command("remove")
|
|
14
|
-
.description("Remove components, sections, wrappers, or composites from your project")
|
|
15
|
-
.argument("[components...]", "component names")
|
|
16
|
-
.option("--force", "remove files even if not tracked in lockfile")
|
|
17
|
-
.option("-c, --cwd <path>", "working directory to remove items")
|
|
18
|
-
.option("-s, --section <sections...>", "remove sections")
|
|
19
|
-
.option("-w, --wrapper <wrappers...>", "remove wrappers")
|
|
20
|
-
.option("--composite <composites...>", "remove composites")
|
|
21
|
-
.action(async (components, options) => {
|
|
22
|
-
try {
|
|
23
|
-
const sectionNames = toNameList(options.section);
|
|
24
|
-
const wrapperNames = toNameList(options.wrapper);
|
|
25
|
-
const compositeNames = toNameList(options.composite);
|
|
26
|
-
const hasSections = sectionNames.length > 0;
|
|
27
|
-
const hasWrappers = wrapperNames.length > 0;
|
|
28
|
-
const hasComposites = compositeNames.length > 0;
|
|
29
|
-
const hasComponents = components.length > 0;
|
|
30
|
-
const selectedTypes = [hasComponents, hasSections, hasWrappers, hasComposites]
|
|
31
|
-
.filter(Boolean)
|
|
32
|
-
.length;
|
|
33
|
-
if (selectedTypes === 0) {
|
|
34
|
-
console.error("Provide component names or use --section/--wrapper/--composite.");
|
|
35
|
-
process.exit(1);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { loadConfig } from "../lib/config.js";
|
|
4
|
+
import { loadLockfile, saveLockfile } from "../lib/lockfile.js";
|
|
5
|
+
import { getRegistryComposites, getRegistrySections, getRegistryWrappers, loadRegistry } from "../lib/registry.js";
|
|
6
|
+
import { removeEntries } from "./shared/remove-entries.js";
|
|
7
|
+
function toNameList(value) {
|
|
8
|
+
if (!value) {
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
11
|
+
return Array.isArray(value) ? value : [value];
|
|
12
|
+
}
|
|
13
|
+
export const removeCommand = new Command("remove")
|
|
14
|
+
.description("Remove components, sections, wrappers, or composites from your project")
|
|
15
|
+
.argument("[components...]", "component names")
|
|
16
|
+
.option("--force", "remove files even if not tracked in lockfile")
|
|
17
|
+
.option("-c, --cwd <path>", "working directory to remove items")
|
|
18
|
+
.option("-s, --section <sections...>", "remove sections")
|
|
19
|
+
.option("-w, --wrapper <wrappers...>", "remove wrappers")
|
|
20
|
+
.option("--composite <composites...>", "remove composites")
|
|
21
|
+
.action(async (components, options) => {
|
|
22
|
+
try {
|
|
23
|
+
const sectionNames = toNameList(options.section);
|
|
24
|
+
const wrapperNames = toNameList(options.wrapper);
|
|
25
|
+
const compositeNames = toNameList(options.composite);
|
|
26
|
+
const hasSections = sectionNames.length > 0;
|
|
27
|
+
const hasWrappers = wrapperNames.length > 0;
|
|
28
|
+
const hasComposites = compositeNames.length > 0;
|
|
29
|
+
const hasComponents = components.length > 0;
|
|
30
|
+
const selectedTypes = [hasComponents, hasSections, hasWrappers, hasComposites]
|
|
31
|
+
.filter(Boolean)
|
|
32
|
+
.length;
|
|
33
|
+
if (selectedTypes === 0) {
|
|
34
|
+
console.error("Provide component names or use --section/--wrapper/--composite.");
|
|
35
|
+
process.exit(1);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (selectedTypes > 1) {
|
|
39
|
+
console.error("Choose only one target type: components (positional), --section, --wrapper, or --composite.");
|
|
40
|
+
process.exit(1);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const cwd = path.resolve(options.cwd || process.cwd());
|
|
44
|
+
const config = await loadConfig(cwd);
|
|
45
|
+
const registry = await loadRegistry(config, cwd);
|
|
46
|
+
const lockfile = await loadLockfile(cwd);
|
|
47
|
+
const targetLabel = hasSections
|
|
48
|
+
? "sections"
|
|
49
|
+
: hasWrappers
|
|
50
|
+
? "wrappers"
|
|
51
|
+
: hasComposites
|
|
52
|
+
? "composites"
|
|
53
|
+
: "components";
|
|
54
|
+
const registryEntries = hasSections
|
|
55
|
+
? getRegistrySections(registry)
|
|
56
|
+
: hasWrappers
|
|
57
|
+
? getRegistryWrappers(registry)
|
|
58
|
+
: hasComposites
|
|
59
|
+
? getRegistryComposites(registry)
|
|
60
|
+
: registry.components;
|
|
61
|
+
const lockEntries = hasSections
|
|
62
|
+
? lockfile.sections
|
|
63
|
+
: hasWrappers
|
|
64
|
+
? lockfile.wrappers
|
|
65
|
+
: hasComposites
|
|
66
|
+
? lockfile.composites
|
|
67
|
+
: lockfile.components;
|
|
68
|
+
const names = hasSections
|
|
69
|
+
? sectionNames
|
|
70
|
+
: hasWrappers
|
|
71
|
+
? wrapperNames
|
|
72
|
+
: hasComposites
|
|
73
|
+
? compositeNames
|
|
74
|
+
: components;
|
|
75
|
+
const { removed, skipped } = await removeEntries({
|
|
76
|
+
cwd,
|
|
77
|
+
config,
|
|
78
|
+
registryEntries,
|
|
79
|
+
lockEntries,
|
|
80
|
+
names,
|
|
81
|
+
force: Boolean(options.force)
|
|
82
|
+
});
|
|
83
|
+
await saveLockfile(cwd, lockfile);
|
|
84
|
+
if (removed.length) {
|
|
85
|
+
console.log(`Removed ${targetLabel}: ${removed.join(", ")}`);
|
|
86
|
+
}
|
|
87
|
+
if (skipped.length) {
|
|
88
|
+
console.log(`Skipped ${targetLabel} (not installed): ${skipped.join(", ")}`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
console.error(error.message);
|
|
93
|
+
process.exit(1);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
94
96
|
//# sourceMappingURL=remove.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../src/commands/remove.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACb,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAU1D,SAAS,UAAU,CAAC,KAAyB;IAC3C,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OA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AO,CAAC,MAAM,EAAE,CAAC;YACnB,OAAO,CAAC,GAAG,CAAC,WAAW,WAAW,qBAAqB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAC9E,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAE,KAAe,CAAC,OAAO,CAAC,CAAA;QACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import type { Ora } from "ora";
|
|
2
|
-
import type { Lockfile, LockfileComponent } from "../../lib/lockfile.js";
|
|
3
|
-
import type { RegistryIndex, RegistryItem } from "../../lib/registry.js";
|
|
4
|
-
import type { AddConfig, AddOptions } from "../add/types.js";
|
|
5
|
-
export interface EntryValidation {
|
|
6
|
-
valid: string[];
|
|
7
|
-
invalid: string[];
|
|
8
|
-
suggestions: string[];
|
|
9
|
-
}
|
|
10
|
-
export interface EntryDependencyAnalysis {
|
|
11
|
-
entries: string[];
|
|
12
|
-
componentDependencies: string[];
|
|
13
|
-
npmDependencies: Set<string>;
|
|
14
|
-
conflicts: string[];
|
|
15
|
-
totalTargets: number;
|
|
16
|
-
totalToInstall: number;
|
|
17
|
-
missingDependencies: string[];
|
|
18
|
-
}
|
|
19
|
-
export interface EntryInstallResult {
|
|
20
|
-
installed: string[];
|
|
21
|
-
skipped: string[];
|
|
22
|
-
failed: string[];
|
|
23
|
-
npmDependencies: Set<string>;
|
|
24
|
-
}
|
|
25
|
-
export interface CollectionInstallResult {
|
|
26
|
-
entries: EntryInstallResult;
|
|
27
|
-
dependencies: EntryInstallResult;
|
|
28
|
-
npmDependencies: Set<string>;
|
|
29
|
-
conflicts: string[];
|
|
30
|
-
}
|
|
31
|
-
export interface EntryLabels {
|
|
32
|
-
entrySingular: string;
|
|
33
|
-
entryPlural: string;
|
|
34
|
-
}
|
|
35
|
-
export declare function normalizeEntryNames(names: string[]): string[];
|
|
36
|
-
export declare function getEntryNames(entries: RegistryItem[]): string[];
|
|
37
|
-
export declare function createEntryMap(entries: RegistryItem[]): Map<string, RegistryItem>;
|
|
38
|
-
export declare function validateEntries(names: string[], entries: RegistryItem[]): EntryValidation;
|
|
39
|
-
export declare function analyzeEntryDependencies(names: string[], entries: RegistryItem[], registry: RegistryIndex, lockfile: Lockfile, lockKey: "sections" | "wrappers" | "composites"): EntryDependencyAnalysis;
|
|
40
|
-
export declare function confirmOverwrite(entryPlural: string): Promise<boolean>;
|
|
41
|
-
export declare function displayInstallationPlan(analysis: EntryDependencyAnalysis, options: AddOptions, labels: EntryLabels): void;
|
|
42
|
-
export declare function displayResults(result: CollectionInstallResult, options: AddOptions, labels: EntryLabels): void;
|
|
43
|
-
export declare function installEntries(entries: RegistryItem[], names: string[], lockEntries: Record<string, LockfileComponent>, options: {
|
|
44
|
-
cwd: string;
|
|
45
|
-
config: AddConfig;
|
|
46
|
-
force: boolean;
|
|
47
|
-
spinner: Ora | null;
|
|
48
|
-
itemLabel: string;
|
|
49
|
-
}): Promise<EntryInstallResult>;
|
|
50
|
-
export declare function createEmptyResult(): EntryInstallResult;
|
|
1
|
+
import type { Ora } from "ora";
|
|
2
|
+
import type { Lockfile, LockfileComponent } from "../../lib/lockfile.js";
|
|
3
|
+
import type { RegistryIndex, RegistryItem } from "../../lib/registry.js";
|
|
4
|
+
import type { AddConfig, AddOptions } from "../add/types.js";
|
|
5
|
+
export interface EntryValidation {
|
|
6
|
+
valid: string[];
|
|
7
|
+
invalid: string[];
|
|
8
|
+
suggestions: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface EntryDependencyAnalysis {
|
|
11
|
+
entries: string[];
|
|
12
|
+
componentDependencies: string[];
|
|
13
|
+
npmDependencies: Set<string>;
|
|
14
|
+
conflicts: string[];
|
|
15
|
+
totalTargets: number;
|
|
16
|
+
totalToInstall: number;
|
|
17
|
+
missingDependencies: string[];
|
|
18
|
+
}
|
|
19
|
+
export interface EntryInstallResult {
|
|
20
|
+
installed: string[];
|
|
21
|
+
skipped: string[];
|
|
22
|
+
failed: string[];
|
|
23
|
+
npmDependencies: Set<string>;
|
|
24
|
+
}
|
|
25
|
+
export interface CollectionInstallResult {
|
|
26
|
+
entries: EntryInstallResult;
|
|
27
|
+
dependencies: EntryInstallResult;
|
|
28
|
+
npmDependencies: Set<string>;
|
|
29
|
+
conflicts: string[];
|
|
30
|
+
}
|
|
31
|
+
export interface EntryLabels {
|
|
32
|
+
entrySingular: string;
|
|
33
|
+
entryPlural: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function normalizeEntryNames(names: string[]): string[];
|
|
36
|
+
export declare function getEntryNames(entries: RegistryItem[]): string[];
|
|
37
|
+
export declare function createEntryMap(entries: RegistryItem[]): Map<string, RegistryItem>;
|
|
38
|
+
export declare function validateEntries(names: string[], entries: RegistryItem[]): EntryValidation;
|
|
39
|
+
export declare function analyzeEntryDependencies(names: string[], entries: RegistryItem[], registry: RegistryIndex, lockfile: Lockfile, lockKey: "sections" | "wrappers" | "composites"): EntryDependencyAnalysis;
|
|
40
|
+
export declare function confirmOverwrite(entryPlural: string): Promise<boolean>;
|
|
41
|
+
export declare function displayInstallationPlan(analysis: EntryDependencyAnalysis, options: AddOptions, labels: EntryLabels): void;
|
|
42
|
+
export declare function displayResults(result: CollectionInstallResult, options: AddOptions, labels: EntryLabels): void;
|
|
43
|
+
export declare function installEntries(entries: RegistryItem[], names: string[], lockEntries: Record<string, LockfileComponent>, options: {
|
|
44
|
+
cwd: string;
|
|
45
|
+
config: AddConfig;
|
|
46
|
+
force: boolean;
|
|
47
|
+
spinner: Ora | null;
|
|
48
|
+
itemLabel: string;
|
|
49
|
+
}): Promise<EntryInstallResult>;
|
|
50
|
+
export declare function createEmptyResult(): EntryInstallResult;
|