@salesforce/ui-bundle-features 1.117.2
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/LICENSE.txt +82 -0
- package/README.md +153 -0
- package/dist/aggregate-features.d.ts +16 -0
- package/dist/aggregate-features.d.ts.map +1 -0
- package/dist/aggregate-features.js +43 -0
- package/dist/aggregate-features.js.map +1 -0
- package/dist/cli.d.ts +8 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +71 -0
- package/dist/cli.js.map +1 -0
- package/dist/conflict-detector.d.ts +31 -0
- package/dist/conflict-detector.d.ts.map +1 -0
- package/dist/conflict-detector.js +153 -0
- package/dist/conflict-detector.js.map +1 -0
- package/dist/dependency-resolver.d.ts +18 -0
- package/dist/dependency-resolver.d.ts.map +1 -0
- package/dist/dependency-resolver.js +96 -0
- package/dist/dependency-resolver.js.map +1 -0
- package/dist/describe-command.d.ts +10 -0
- package/dist/describe-command.d.ts.map +1 -0
- package/dist/describe-command.js +119 -0
- package/dist/describe-command.js.map +1 -0
- package/dist/feature-metadata.d.ts +30 -0
- package/dist/feature-metadata.d.ts.map +1 -0
- package/dist/feature-metadata.js +136 -0
- package/dist/feature-metadata.js.map +1 -0
- package/dist/feature-search.d.ts +16 -0
- package/dist/feature-search.d.ts.map +1 -0
- package/dist/feature-search.js +140 -0
- package/dist/feature-search.js.map +1 -0
- package/dist/features.json +137 -0
- package/dist/file-copier.d.ts +15 -0
- package/dist/file-copier.d.ts.map +1 -0
- package/dist/file-copier.js +105 -0
- package/dist/file-copier.js.map +1 -0
- package/dist/install-command.d.ts +15 -0
- package/dist/install-command.d.ts.map +1 -0
- package/dist/install-command.js +314 -0
- package/dist/install-command.js.map +1 -0
- package/dist/list-command.d.ts +13 -0
- package/dist/list-command.d.ts.map +1 -0
- package/dist/list-command.js +71 -0
- package/dist/list-command.js.map +1 -0
- package/dist/logger.d.ts +48 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +82 -0
- package/dist/logger.js.map +1 -0
- package/dist/package-manager.d.ts +22 -0
- package/dist/package-manager.d.ts.map +1 -0
- package/dist/package-manager.js +172 -0
- package/dist/package-manager.js.map +1 -0
- package/dist/placeholder-resolver.d.ts +25 -0
- package/dist/placeholder-resolver.d.ts.map +1 -0
- package/dist/placeholder-resolver.js +78 -0
- package/dist/placeholder-resolver.js.map +1 -0
- package/dist/schema-loader.d.ts +17 -0
- package/dist/schema-loader.d.ts.map +1 -0
- package/dist/schema-loader.js +82 -0
- package/dist/schema-loader.js.map +1 -0
- package/dist/types.d.ts +174 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/dist/utils.d.ts +30 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +58 -0
- package/dist/utils.js.map +1 -0
- package/package.json +53 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import type { Logger } from "./logger.js";
|
|
7
|
+
/**
|
|
8
|
+
* Schema structure from features.json files
|
|
9
|
+
*/
|
|
10
|
+
export interface FileCopySchema {
|
|
11
|
+
/** Other features that must be installed first */
|
|
12
|
+
readonly featureDependencies?: readonly string[];
|
|
13
|
+
/** npm packages to add to dependencies */
|
|
14
|
+
readonly packageDependencies?: Readonly<Record<string, string>>;
|
|
15
|
+
/** npm packages to add to devDependencies */
|
|
16
|
+
readonly packageDevDependencies?: Readonly<Record<string, string>>;
|
|
17
|
+
/** File/directory copy operations */
|
|
18
|
+
readonly copy?: readonly CopyOperation[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A single copy operation
|
|
22
|
+
*/
|
|
23
|
+
export interface CopyOperation {
|
|
24
|
+
/** Source path relative to package's dist/ directory */
|
|
25
|
+
readonly from: string;
|
|
26
|
+
/** Destination path (may contain <uiBundle> placeholder) */
|
|
27
|
+
readonly to: string;
|
|
28
|
+
/** Optional description of what this copies */
|
|
29
|
+
readonly description?: string;
|
|
30
|
+
/** For __example__ files: the target file where patterns should be integrated */
|
|
31
|
+
readonly integrationTarget?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Conflict handling mode
|
|
35
|
+
*/
|
|
36
|
+
export type ConflictMode = "prompt" | "error" | "skip" | "overwrite";
|
|
37
|
+
/**
|
|
38
|
+
* User's choice for handling a specific conflict
|
|
39
|
+
*/
|
|
40
|
+
export type ConflictResolution = "skip" | "overwrite" | "cancel";
|
|
41
|
+
/**
|
|
42
|
+
* Map of file paths to conflict resolutions
|
|
43
|
+
*/
|
|
44
|
+
export type ConflictResolutionMap = Record<string, ConflictResolution>;
|
|
45
|
+
/**
|
|
46
|
+
* Shared context for installation operations
|
|
47
|
+
*/
|
|
48
|
+
export interface InstallationContext {
|
|
49
|
+
/** SFDX source directory (e.g., force-app/main/default) */
|
|
50
|
+
sfdxSource: string;
|
|
51
|
+
/** Specific UI bundle directory (e.g., force-app/main/default/uiBundles/my-ui-bundle) */
|
|
52
|
+
uiBundleDir: string;
|
|
53
|
+
/** UI bundle name extracted from uiBundleDir (e.g., "my-ui-bundle") */
|
|
54
|
+
uiBundleName: string;
|
|
55
|
+
/** Enable verbose logging */
|
|
56
|
+
verbose: boolean;
|
|
57
|
+
/** Dry run mode - show what would be done without changes */
|
|
58
|
+
dryRun: boolean;
|
|
59
|
+
/** Conflict handling mode */
|
|
60
|
+
conflictMode: ConflictMode;
|
|
61
|
+
/** Conflict resolution map (from file or interactive prompts) */
|
|
62
|
+
conflictResolutions: ConflictResolutionMap;
|
|
63
|
+
/** Track installed features to prevent duplicates */
|
|
64
|
+
installedFeatures: Set<string>;
|
|
65
|
+
/** Track all copied example files with their integration targets */
|
|
66
|
+
copiedExampleFiles: {
|
|
67
|
+
file: string;
|
|
68
|
+
integrationTarget?: string;
|
|
69
|
+
}[];
|
|
70
|
+
/** Logger instance (verbose-aware) */
|
|
71
|
+
logger: Logger;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Feature registry entry
|
|
75
|
+
*/
|
|
76
|
+
export interface FeatureDefinition {
|
|
77
|
+
/** Display name for the feature */
|
|
78
|
+
readonly name: string;
|
|
79
|
+
/** npm package name */
|
|
80
|
+
readonly package: string;
|
|
81
|
+
/** Optional description */
|
|
82
|
+
readonly description?: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Feature registry mapping feature names to packages
|
|
86
|
+
*/
|
|
87
|
+
export type FeatureRegistry = Record<string, string>;
|
|
88
|
+
/**
|
|
89
|
+
* Feature definition as exported from individual feature.ts files.
|
|
90
|
+
* Each feature directory exports a default FeatureDefinitionFile.
|
|
91
|
+
*/
|
|
92
|
+
export interface FeatureDefinitionFile {
|
|
93
|
+
/** Registry key for this feature (e.g., "authentication", "global-search") */
|
|
94
|
+
readonly key: string;
|
|
95
|
+
/** Display name */
|
|
96
|
+
readonly name: string;
|
|
97
|
+
/** npm package name */
|
|
98
|
+
readonly package: string;
|
|
99
|
+
/** Short description (1-2 sentences) */
|
|
100
|
+
readonly shortDescription: string;
|
|
101
|
+
/** Long description (detailed explanation) */
|
|
102
|
+
readonly longDescription: string;
|
|
103
|
+
/** Search keywords */
|
|
104
|
+
readonly keywords: readonly string[];
|
|
105
|
+
/** Feature dependencies */
|
|
106
|
+
readonly featureDependencies?: readonly string[];
|
|
107
|
+
/** Package dependencies */
|
|
108
|
+
readonly packageDependencies?: Readonly<Record<string, string>>;
|
|
109
|
+
/** Package dev dependencies */
|
|
110
|
+
readonly packageDevDependencies?: Readonly<Record<string, string>>;
|
|
111
|
+
/** Copy operations (includes __example__ files with integrationTarget) */
|
|
112
|
+
readonly copy?: readonly CopyOperation[];
|
|
113
|
+
/** List of feature capabilities */
|
|
114
|
+
readonly features?: readonly string[];
|
|
115
|
+
/** List of included components */
|
|
116
|
+
readonly components?: readonly string[];
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Detailed feature metadata
|
|
120
|
+
*/
|
|
121
|
+
export interface FeatureMetadata {
|
|
122
|
+
/** Display name */
|
|
123
|
+
readonly name: string;
|
|
124
|
+
/** npm package name */
|
|
125
|
+
readonly package: string;
|
|
126
|
+
/** Short description (1-2 sentences) */
|
|
127
|
+
readonly shortDescription: string;
|
|
128
|
+
/** Long description (detailed explanation) */
|
|
129
|
+
readonly longDescription: string;
|
|
130
|
+
/** Search keywords */
|
|
131
|
+
readonly keywords: readonly string[];
|
|
132
|
+
/** Feature dependencies */
|
|
133
|
+
readonly featureDependencies?: readonly string[];
|
|
134
|
+
/** Package dependencies */
|
|
135
|
+
readonly packageDependencies?: Readonly<Record<string, string>>;
|
|
136
|
+
/** Package dev dependencies */
|
|
137
|
+
readonly packageDevDependencies?: Readonly<Record<string, string>>;
|
|
138
|
+
/** Copy operations (includes __example__ files with integrationTarget) */
|
|
139
|
+
readonly copy?: readonly CopyOperation[];
|
|
140
|
+
/** List of feature capabilities */
|
|
141
|
+
readonly features?: readonly string[];
|
|
142
|
+
/** List of included components */
|
|
143
|
+
readonly components?: readonly string[];
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Features metadata collection
|
|
147
|
+
*/
|
|
148
|
+
export interface FeaturesMetadata {
|
|
149
|
+
features: Record<string, FeatureMetadata>;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Search result with scoring information
|
|
153
|
+
*/
|
|
154
|
+
export interface SearchResult {
|
|
155
|
+
/** The feature that matched the search */
|
|
156
|
+
readonly feature: FeatureMetadata;
|
|
157
|
+
/** Relevance score (higher = more relevant) */
|
|
158
|
+
readonly score: number;
|
|
159
|
+
/** Fields that matched the search terms (for debugging) */
|
|
160
|
+
readonly matchedFields: readonly string[];
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* CLI options
|
|
164
|
+
*/
|
|
165
|
+
export interface CliOptions {
|
|
166
|
+
sfdxSource?: string;
|
|
167
|
+
uiBundleDir?: string;
|
|
168
|
+
verbose?: boolean;
|
|
169
|
+
dryRun?: boolean;
|
|
170
|
+
yes?: boolean;
|
|
171
|
+
onConflict?: ConflictMode;
|
|
172
|
+
conflictResolution?: string;
|
|
173
|
+
}
|
|
174
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,kDAAkD;IAClD,QAAQ,CAAC,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEjD,0CAA0C;IAC1C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAEhE,6CAA6C;IAC7C,QAAQ,CAAC,sBAAsB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAEnE,qCAAqC;IACrC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,+CAA+C;IAC/C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B,iFAAiF;IACjF,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,WAAW,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":[],"mappings":"AAAA;;;;GAIG"}
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Check if a path exists
|
|
8
|
+
*/
|
|
9
|
+
export declare function pathExists(path: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Resolve an absolute path from a potentially relative path
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolvePath(path: string, base?: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Extract UI bundle name from UI bundle directory path
|
|
16
|
+
*/
|
|
17
|
+
export declare function extractUIBundleName(uiBundleDir: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* Check if a path points to SFDX metadata (Apex classes, objects, etc.)
|
|
20
|
+
*/
|
|
21
|
+
export declare function isSfdxMetadataPath(path: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Check if a path contains the UI bundle placeholder
|
|
24
|
+
*/
|
|
25
|
+
export declare function hasUIBundlePlaceholder(path: string): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Normalize path separators to forward slashes
|
|
28
|
+
*/
|
|
29
|
+
export declare function normalizePath(path: string): string;
|
|
30
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAK/D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAcxD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD"}
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import { existsSync } from "fs";
|
|
7
|
+
import { basename, resolve } from "path";
|
|
8
|
+
/**
|
|
9
|
+
* Check if a path exists
|
|
10
|
+
*/
|
|
11
|
+
export function pathExists(path) {
|
|
12
|
+
return existsSync(path);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Resolve an absolute path from a potentially relative path
|
|
16
|
+
*/
|
|
17
|
+
export function resolvePath(path, base) {
|
|
18
|
+
if (base) {
|
|
19
|
+
return resolve(base, path);
|
|
20
|
+
}
|
|
21
|
+
return resolve(path);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Extract UI bundle name from UI bundle directory path
|
|
25
|
+
*/
|
|
26
|
+
export function extractUIBundleName(uiBundleDir) {
|
|
27
|
+
return basename(uiBundleDir);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Check if a path points to SFDX metadata (Apex classes, objects, etc.)
|
|
31
|
+
*/
|
|
32
|
+
export function isSfdxMetadataPath(path) {
|
|
33
|
+
const sfdxPatterns = [
|
|
34
|
+
"force-app/main/default/classes",
|
|
35
|
+
"force-app/main/default/objects",
|
|
36
|
+
"force-app/main/default/triggers",
|
|
37
|
+
"force-app/main/default/lwc",
|
|
38
|
+
"force-app/main/default/aura",
|
|
39
|
+
"force-app/main/default/staticresources",
|
|
40
|
+
"force-app/main/default/layouts",
|
|
41
|
+
"force-app/main/default/permissionsets",
|
|
42
|
+
"force-app/main/default/profiles",
|
|
43
|
+
];
|
|
44
|
+
return sfdxPatterns.some((pattern) => path.startsWith(pattern));
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Check if a path contains the UI bundle placeholder
|
|
48
|
+
*/
|
|
49
|
+
export function hasUIBundlePlaceholder(path) {
|
|
50
|
+
return path.includes("<uiBundle>");
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Normalize path separators to forward slashes
|
|
54
|
+
*/
|
|
55
|
+
export function normalizePath(path) {
|
|
56
|
+
return path.replace(/\\/g, "/");
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEzC;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACtC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,IAAa;IACtD,IAAI,IAAI,EAAE,CAAC;QACV,OAAO,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,WAAmB;IACtD,OAAO,QAAQ,CAAC,WAAW,CAAC,CAAC;AAC9B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC9C,MAAM,YAAY,GAAG;QACpB,gCAAgC;QAChC,gCAAgC;QAChC,iCAAiC;QACjC,4BAA4B;QAC5B,6BAA6B;QAC7B,wCAAwC;QACxC,gCAAgC;QAChC,uCAAuC;QACvC,iCAAiC;KACjC,CAAC;IAEF,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;AACjE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAY;IAClD,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACzC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACjC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@salesforce/ui-bundle-features",
|
|
3
|
+
"version": "1.117.2",
|
|
4
|
+
"description": "CLI tool for searching and installing UI features into Salesforce UI Bundles",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/cli.js",
|
|
8
|
+
"bin": {
|
|
9
|
+
"ui-bundle-features": "./dist/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc --build && tsx scripts/aggregate-features.ts",
|
|
17
|
+
"clean": "rm -rf dist tsconfig.tsbuildinfo",
|
|
18
|
+
"dev": "tsx src/cli.ts",
|
|
19
|
+
"prepublishOnly": "npm run build",
|
|
20
|
+
"test": "vitest run",
|
|
21
|
+
"test:watch": "vitest",
|
|
22
|
+
"test:unit": "vitest run unit",
|
|
23
|
+
"test:e2e": "vitest run e2e",
|
|
24
|
+
"test:coverage": "vitest run --coverage"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"salesforce",
|
|
28
|
+
"ui",
|
|
29
|
+
"features",
|
|
30
|
+
"cli",
|
|
31
|
+
"installer"
|
|
32
|
+
],
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"commander": "^13.0.0",
|
|
35
|
+
"inquirer": "^12.0.0",
|
|
36
|
+
"ora": "^9.3.0",
|
|
37
|
+
"zod": "^3.24.1"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/inquirer": "^9.0.9",
|
|
41
|
+
"@types/node": "^22.0.0",
|
|
42
|
+
"@vitest/coverage-v8": "^4.0.17",
|
|
43
|
+
"tsx": "^4.19.2",
|
|
44
|
+
"typescript": "~5.9.3",
|
|
45
|
+
"vitest": "^4.0.17"
|
|
46
|
+
},
|
|
47
|
+
"engines": {
|
|
48
|
+
"node": ">=20.0.0"
|
|
49
|
+
},
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"access": "public"
|
|
52
|
+
}
|
|
53
|
+
}
|