@salesforce/webapp-template-cli-experimental 1.3.3

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.
Files changed (71) hide show
  1. package/LICENSE.txt +82 -0
  2. package/README.md +1464 -0
  3. package/dist/commands/apply-patches.d.ts +23 -0
  4. package/dist/commands/apply-patches.d.ts.map +1 -0
  5. package/dist/commands/apply-patches.js +650 -0
  6. package/dist/commands/apply-patches.js.map +1 -0
  7. package/dist/commands/new-app-feature.d.ts +7 -0
  8. package/dist/commands/new-app-feature.d.ts.map +1 -0
  9. package/dist/commands/new-app-feature.js +208 -0
  10. package/dist/commands/new-app-feature.js.map +1 -0
  11. package/dist/commands/new-app.d.ts +6 -0
  12. package/dist/commands/new-app.d.ts.map +1 -0
  13. package/dist/commands/new-app.js +7 -0
  14. package/dist/commands/new-app.js.map +1 -0
  15. package/dist/commands/watch-patches.d.ts +4 -0
  16. package/dist/commands/watch-patches.d.ts.map +1 -0
  17. package/dist/commands/watch-patches.js +128 -0
  18. package/dist/commands/watch-patches.js.map +1 -0
  19. package/dist/core/dependency-resolver.d.ts +40 -0
  20. package/dist/core/dependency-resolver.d.ts.map +1 -0
  21. package/dist/core/dependency-resolver.js +126 -0
  22. package/dist/core/dependency-resolver.js.map +1 -0
  23. package/dist/core/file-operations.d.ts +55 -0
  24. package/dist/core/file-operations.d.ts.map +1 -0
  25. package/dist/core/file-operations.js +350 -0
  26. package/dist/core/file-operations.js.map +1 -0
  27. package/dist/core/package-json-merger.d.ts +31 -0
  28. package/dist/core/package-json-merger.d.ts.map +1 -0
  29. package/dist/core/package-json-merger.js +149 -0
  30. package/dist/core/package-json-merger.js.map +1 -0
  31. package/dist/core/patch-loader.d.ts +18 -0
  32. package/dist/core/patch-loader.d.ts.map +1 -0
  33. package/dist/core/patch-loader.js +115 -0
  34. package/dist/core/patch-loader.js.map +1 -0
  35. package/dist/index.d.ts +3 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +95 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/types.d.ts +28 -0
  40. package/dist/types.d.ts.map +1 -0
  41. package/dist/types.js +2 -0
  42. package/dist/types.js.map +1 -0
  43. package/dist/utils/debounce.d.ts +9 -0
  44. package/dist/utils/debounce.d.ts.map +1 -0
  45. package/dist/utils/debounce.js +20 -0
  46. package/dist/utils/debounce.js.map +1 -0
  47. package/dist/utils/import-merger.d.ts +17 -0
  48. package/dist/utils/import-merger.d.ts.map +1 -0
  49. package/dist/utils/import-merger.js +244 -0
  50. package/dist/utils/import-merger.js.map +1 -0
  51. package/dist/utils/logger.d.ts +6 -0
  52. package/dist/utils/logger.d.ts.map +1 -0
  53. package/dist/utils/logger.js +22 -0
  54. package/dist/utils/logger.js.map +1 -0
  55. package/dist/utils/path-mappings.d.ts +94 -0
  56. package/dist/utils/path-mappings.d.ts.map +1 -0
  57. package/dist/utils/path-mappings.js +139 -0
  58. package/dist/utils/path-mappings.js.map +1 -0
  59. package/dist/utils/paths.d.ts +61 -0
  60. package/dist/utils/paths.d.ts.map +1 -0
  61. package/dist/utils/paths.js +178 -0
  62. package/dist/utils/paths.js.map +1 -0
  63. package/dist/utils/route-merger.d.ts +107 -0
  64. package/dist/utils/route-merger.d.ts.map +1 -0
  65. package/dist/utils/route-merger.js +358 -0
  66. package/dist/utils/route-merger.js.map +1 -0
  67. package/dist/utils/validation.d.ts +35 -0
  68. package/dist/utils/validation.d.ts.map +1 -0
  69. package/dist/utils/validation.js +137 -0
  70. package/dist/utils/validation.js.map +1 -0
  71. package/package.json +44 -0
@@ -0,0 +1,115 @@
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 { join } from "path";
8
+ import { pathToFileURL } from "url";
9
+ export class FeatureLoadError extends Error {
10
+ constructor(message) {
11
+ super(message);
12
+ this.name = "FeatureLoadError";
13
+ }
14
+ }
15
+ /**
16
+ * Extract feature name from feature path
17
+ * Examples:
18
+ * - 'packages/feature-navigation-menu' -> 'feature-navigation-menu'
19
+ * - '/absolute/path/to/feature-name' -> 'feature-name'
20
+ * - 'packages/reference-app-vibe-coding-starter' -> 'reference-app-vibe-coding-starter'
21
+ */
22
+ function extractFeatureName(featurePath) {
23
+ const parts = featurePath.split("/");
24
+ return parts[parts.length - 1];
25
+ }
26
+ /**
27
+ * Load features from a feature's feature.ts file
28
+ */
29
+ export async function loadFeature(featurePath) {
30
+ const featureFilePath = join(featurePath, "feature.ts");
31
+ if (!existsSync(featureFilePath)) {
32
+ throw new FeatureLoadError(`No feature.ts found in feature path '${featurePath}'`);
33
+ }
34
+ try {
35
+ // Convert to file URL for dynamic import
36
+ const featurePathUrl = pathToFileURL(featureFilePath).href;
37
+ const module = await import(featurePathUrl);
38
+ // Require default export
39
+ if (!module.default) {
40
+ throw new FeatureLoadError(`feature.ts must have a default export (array or object) in ${featureFilePath}`);
41
+ }
42
+ // Helper to check if a value looks like a feature object
43
+ // Checks if value is a plain object (not array, not null) that matches Feature structure
44
+ // Accepts any value from dynamic import (module.default is typed as any) and narrows to Feature type
45
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- module.default from dynamic import is typed as any
46
+ const isFeatureLike = (value) => {
47
+ return value !== null && typeof value === "object" && !Array.isArray(value);
48
+ };
49
+ let features;
50
+ if (Array.isArray(module.default)) {
51
+ features = module.default;
52
+ }
53
+ else if (isFeatureLike(module.default)) {
54
+ features = [module.default];
55
+ }
56
+ else {
57
+ throw new FeatureLoadError(`Default export must be a Feature object or Feature[] array in ${featureFilePath}`);
58
+ }
59
+ // Extract feature name from path for constructing defaults
60
+ const featureName = extractFeatureName(featurePath);
61
+ // Extract configuration from features (with defaults)
62
+ // Default to SFDX structure: src/force-app/main/default/webapplications/{name}
63
+ let templateDir = "src";
64
+ let webAppName = featureName; // Default to feature name
65
+ let routeFilePath;
66
+ let dependencies = [];
67
+ let pathMappings = {}; // Default: enabled with no custom mappings
68
+ let siteContainer = false;
69
+ // Check if any feature specifies custom configuration
70
+ for (const feature of features) {
71
+ if (feature.templateDir) {
72
+ templateDir = feature.templateDir;
73
+ }
74
+ if (feature.webAppName) {
75
+ webAppName = feature.webAppName;
76
+ }
77
+ if (feature.routeFilePath) {
78
+ routeFilePath = feature.routeFilePath;
79
+ }
80
+ if (feature.dependencies) {
81
+ // Merge dependencies from all features
82
+ dependencies = [...new Set([...dependencies, ...feature.dependencies])];
83
+ }
84
+ if (feature.pathMappings) {
85
+ // If any feature specifies pathMappings, use it
86
+ // Last one wins if multiple features specify it
87
+ pathMappings = feature.pathMappings;
88
+ }
89
+ if (feature.siteContainer) {
90
+ siteContainer = true;
91
+ }
92
+ }
93
+ // Set default routeFilePath if not explicitly provided
94
+ // Default to SFDX structure path
95
+ if (!routeFilePath) {
96
+ routeFilePath = `force-app/main/default/webapplications/${webAppName}/src/routes.tsx`;
97
+ }
98
+ return {
99
+ features,
100
+ templateDir,
101
+ webAppName,
102
+ routeFilePath,
103
+ dependencies,
104
+ pathMappings,
105
+ siteContainer,
106
+ };
107
+ }
108
+ catch (err) {
109
+ if (err instanceof FeatureLoadError) {
110
+ throw err;
111
+ }
112
+ throw new FeatureLoadError(`Failed to load feature from ${featureFilePath}: ${err instanceof Error ? err.message : String(err)}`);
113
+ }
114
+ }
115
+ //# sourceMappingURL=patch-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patch-loader.js","sourceRoot":"","sources":["../../src/core/patch-loader.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAGpC,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAC1C,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,I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AC3B,aAAa,GAAG,IAAI,CAAC;YACtB,CAAC;QACF,CAAC;QAED,uDAAuD;QACvD,iCAAiC;QACjC,IAAI,CAAC,aAAa,EAAE,CAAC;YACpB,aAAa,GAAG,0CAA0C,UAAU,iBAAiB,CAAC;QACvF,CAAC;QAED,OAAO;YACN,QAAQ;YACR,WAAW;YACX,UAAU;YACV,aAAa;YACb,YAAY;YACZ,YAAY;YACZ,aAAa;SACb,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,IAAI,GAAG,YAAY,gBAAgB,EAAE,CAAC;YACrC,MAAM,GAAG,CAAC;QACX,CAAC;QACD,MAAM,IAAI,gBAAgB,CACzB,+BAA+B,eAAe,KAAK,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CACrG,CAAC;IACH,CAAC;AACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,95 @@
1
+ #!/usr/bin/env node
2
+ /*
3
+ * Copyright (c) 2026, Salesforce, Inc.,
4
+ * All rights reserved.
5
+ * For full license text, see the LICENSE.txt file
6
+ */
7
+ import { readFileSync } from "fs";
8
+ import { join, dirname } from "path";
9
+ import { fileURLToPath } from "url";
10
+ import { Command } from "commander";
11
+ import { applyPatchesCommand } from "./commands/apply-patches.js";
12
+ import { newAppOrFeatureCommand } from "./commands/new-app-feature.js";
13
+ // Get package.json for version info
14
+ const __dirname = dirname(fileURLToPath(import.meta.url));
15
+ const packageJsonPath = join(__dirname, "../package.json");
16
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
17
+ const program = new Command();
18
+ program
19
+ .name("apply-patches")
20
+ .description("CLI tool for applying feature patches to base apps")
21
+ .version(packageJson.version);
22
+ program
23
+ .command("apply-patches")
24
+ .description("Apply feature patches to an app")
25
+ .argument("<feature-path>", "Path to the feature (e.g., packages/template/feature/feature-navigation-menu)")
26
+ .argument("<app-path>", "Path to the app (e.g., packages/template/base-app/base-react-app or my-app)")
27
+ .argument("<target-dir>", "Target directory to copy app to before applying patches")
28
+ .option("--skip-dependency-changes", "Skip installing dependencies from package.json")
29
+ .option("--reset", "Reset target directory to base app state before applying patches (preserves node_modules)")
30
+ .action(async (featurePath, appPath, targetDir, options) => {
31
+ try {
32
+ await applyPatchesCommand(featurePath, appPath, {
33
+ targetDirName: targetDir,
34
+ skipDependencyChanges: options.skipDependencyChanges,
35
+ reset: options.reset,
36
+ });
37
+ process.exit(0);
38
+ }
39
+ catch (_err) {
40
+ process.exit(1);
41
+ }
42
+ });
43
+ program
44
+ .command("watch-patches")
45
+ .description("Watch feature template directory and auto-apply patches on changes")
46
+ .argument("<feature-path>", "Path to the feature (e.g., packages/template/feature/feature-navigation-menu)")
47
+ .argument("<app-path>", "Path to the app (e.g., packages/template/base-app/base-react-app or my-app)")
48
+ .argument("<target-dir>", "Target directory to apply patches to")
49
+ .action(async (featurePath, appPath, targetDir) => {
50
+ try {
51
+ // Dynamic import to avoid loading turbowatch when not needed
52
+ const { watchPatchesCommand } = await import("./commands/watch-patches.js");
53
+ await watchPatchesCommand(featurePath, appPath, targetDir);
54
+ }
55
+ catch (_err) {
56
+ process.exit(1);
57
+ }
58
+ });
59
+ program
60
+ .command("new-feature")
61
+ .description("Create a new feature package from the base-feature template")
62
+ .argument("<feature-name>", 'Name of the feature (will be prefixed with "feature-")')
63
+ .action(async (featureName) => {
64
+ try {
65
+ await newAppOrFeatureCommand(featureName, "feature");
66
+ process.exit(0);
67
+ }
68
+ catch (_err) {
69
+ process.exit(1);
70
+ }
71
+ });
72
+ program
73
+ .command("new-app")
74
+ .description("Create a new reference app package from the base-reference-app template")
75
+ .argument("<app-name>", 'Name of the app (will be prefixed with "app-")')
76
+ .action(async (appName) => {
77
+ try {
78
+ await newAppOrFeatureCommand(appName, "app");
79
+ process.exit(0);
80
+ }
81
+ catch (_err) {
82
+ process.exit(1);
83
+ }
84
+ });
85
+ // If no command specified, default to apply-patches
86
+ if (process.argv.length > 2 && !process.argv[2].startsWith("-")) {
87
+ // If first argument is not a recognized command, treat as apply-patches command
88
+ const args = process.argv.slice(2);
89
+ const knownCommands = ["apply-patches", "watch-patches", "new-feature", "new-app"];
90
+ if (!knownCommands.includes(args[0]) && !args[0].startsWith("-")) {
91
+ process.argv.splice(2, 0, "apply-patches");
92
+ }
93
+ }
94
+ program.parse(process.argv);
95
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,oCAAoC;AACpC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;AAC3D,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC;AAEvE,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACL,IAAI,CAAC,eAAe,CAAC;KACrB,WAAW,C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AAK,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,aAAa,GAAG,CAAC,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;IACnF,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAClE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,eAAe,CAAC,CAAC;IAC5C,CAAC;AACF,CAAC;AAED,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ export interface PackageJsonDependencies {
7
+ dependencies?: Record<string, string>;
8
+ devDependencies?: Record<string, string>;
9
+ }
10
+ export interface PathMapping {
11
+ from: string;
12
+ to: string;
13
+ }
14
+ export interface PathMappings {
15
+ mappings?: PathMapping[];
16
+ enabled?: boolean;
17
+ }
18
+ export interface Feature {
19
+ templateDir?: string;
20
+ webAppName?: string;
21
+ routeFilePath?: string;
22
+ packageJson?: PackageJsonDependencies;
23
+ dependencies?: string[];
24
+ pathMappings?: PathMappings;
25
+ /** When true, copy site-container metadata from template-site-container and replace parameters with app name */
26
+ siteContainer?: boolean;
27
+ }
28
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,YAAY;IAC5B,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,OAAO;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,gHAAgH;IAChH,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ type DebounceableFunction = (...args: any[]) => any;
7
+ export declare function debounce<T extends DebounceableFunction>(func: T, wait: number): (...args: Parameters<T>) => void;
8
+ export {};
9
+ //# sourceMappingURL=debounce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../src/utils/debounce.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,KAAK,oBAAoB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAEpD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,oBAAoB,EACtD,IAAI,EAAE,CAAC,EACP,IAAI,EAAE,MAAM,GACV,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAelC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ export function debounce(func, wait) {
7
+ let timeoutId = null;
8
+ return function debounced(...args) {
9
+ // Clear any existing timeout
10
+ if (timeoutId !== null) {
11
+ clearTimeout(timeoutId);
12
+ }
13
+ // Set a new timeout
14
+ timeoutId = setTimeout(() => {
15
+ func(...args);
16
+ timeoutId = null;
17
+ }, wait);
18
+ };
19
+ }
20
+ //# sourceMappingURL=debounce.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounce.js","sourceRoot":"","sources":["../../src/utils/debounce.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,MAAM,UAAU,QAAQ,CACvB,IAAO,EACP,IAAY;IAEZ,IAAI,SAAS,GAA0B,IAAI,CAAC;IAE5C,OAAO,SAAS,SAAS,CAAC,GAAG,IAAmB;QAC/C,6BAA6B;QAC7B,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;YACxB,YAAY,CAAC,SAAS,CAAC,CAAC;QACzB,CAAC;QAED,oBAAoB;QACpB,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE;YAC3B,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;YACd,SAAS,GAAG,IAAI,CAAC;QAClB,CAAC,EAAE,IAAI,CAAC,CAAC;IACV,CAAC,CAAC;AACH,CAAC"}
@@ -0,0 +1,17 @@
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 SourceFile } from "ts-morph";
7
+ /**
8
+ * Merge imports from feature file into target file
9
+ * Handles:
10
+ * - Deduplicating imports from the same module
11
+ * - Merging named imports from the same module
12
+ * - Preventing duplicate default import names from different modules
13
+ * - Merging different import types from the same module
14
+ * - Removing imports from __delete__ marked files
15
+ */
16
+ export declare function mergeImports(featureFile: SourceFile, targetFile: SourceFile): void;
17
+ //# sourceMappingURL=import-merger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import-merger.d.ts","sourceRoot":"","sources":["../../src/utils/import-merger.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,CA6HlF"}
@@ -0,0 +1,244 @@
1
+ /**
2
+ * Merge imports from feature file into target file
3
+ * Handles:
4
+ * - Deduplicating imports from the same module
5
+ * - Merging named imports from the same module
6
+ * - Preventing duplicate default import names from different modules
7
+ * - Merging different import types from the same module
8
+ * - Removing imports from __delete__ marked files
9
+ */
10
+ export function mergeImports(featureFile, targetFile) {
11
+ const featureImports = featureFile.getImportDeclarations();
12
+ const targetImports = targetFile.getImportDeclarations();
13
+ // Build a map of existing target imports by module specifier
14
+ // This handles multiple imports from the same module in the target
15
+ const targetImportsMap = new Map();
16
+ const duplicateTargetImports = [];
17
+ for (const imp of targetImports) {
18
+ const moduleSpecifier = imp.getModuleSpecifierValue();
19
+ if (!targetImportsMap.has(moduleSpecifier)) {
20
+ targetImportsMap.set(moduleSpecifier, imp);
21
+ }
22
+ else {
23
+ // Found a duplicate import from same module, mark for merging
24
+ duplicateTargetImports.push(imp);
25
+ }
26
+ }
27
+ // Merge duplicate imports in target first
28
+ for (const duplicateImport of duplicateTargetImports) {
29
+ const moduleSpecifier = duplicateImport.getModuleSpecifierValue();
30
+ const primaryImport = targetImportsMap.get(moduleSpecifier);
31
+ if (primaryImport) {
32
+ mergeImportDeclarations(duplicateImport, primaryImport);
33
+ duplicateImport.remove();
34
+ }
35
+ }
36
+ // Track all default import names already in target (to prevent conflicts)
37
+ const existingDefaultImportNames = new Set();
38
+ for (const imp of targetFile.getImportDeclarations()) {
39
+ const defaultImport = imp.getDefaultImport();
40
+ if (defaultImport) {
41
+ existingDefaultImportNames.add(defaultImport.getText());
42
+ }
43
+ }
44
+ // Add/merge imports from feature
45
+ for (const featureImport of featureImports) {
46
+ const moduleSpecifier = featureImport.getModuleSpecifierValue();
47
+ const targetImport = targetImportsMap.get(moduleSpecifier);
48
+ const featureDefaultImport = featureImport.getDefaultImport()?.getText();
49
+ if (!targetImport) {
50
+ // Import from this module doesn't exist in target
51
+ // Check if default import name would conflict
52
+ if (featureDefaultImport && existingDefaultImportNames.has(featureDefaultImport)) {
53
+ // Feature import has same name as existing import from different module
54
+ // Feature should take precedence - find and replace the conflicting import
55
+ const conflictingImport = targetFile
56
+ .getImportDeclarations()
57
+ .find((imp) => imp.getDefaultImport()?.getText() === featureDefaultImport &&
58
+ imp.getModuleSpecifierValue() !== moduleSpecifier);
59
+ if (conflictingImport) {
60
+ // Replace the module specifier of the conflicting import
61
+ conflictingImport.setModuleSpecifier(moduleSpecifier);
62
+ // Merge any named imports from feature into the updated import
63
+ const featureNamedImports = featureImport.getNamedImports();
64
+ if (featureNamedImports.length > 0) {
65
+ const existingNamedImports = new Set(conflictingImport.getNamedImports().map((ni) => ni.getName()));
66
+ for (const namedImport of featureNamedImports) {
67
+ const importName = namedImport.getName();
68
+ if (!existingNamedImports.has(importName)) {
69
+ conflictingImport.addNamedImport({
70
+ name: importName,
71
+ alias: namedImport.getAliasNode()?.getText(),
72
+ });
73
+ }
74
+ }
75
+ }
76
+ // Update the map to point to the updated import
77
+ targetImportsMap.set(moduleSpecifier, conflictingImport);
78
+ continue;
79
+ }
80
+ }
81
+ // Add the import
82
+ targetFile.addImportDeclaration({
83
+ moduleSpecifier: moduleSpecifier,
84
+ isTypeOnly: featureImport.isTypeOnly(),
85
+ namedImports: featureImport.getNamedImports().map((ni) => ({
86
+ name: ni.getName(),
87
+ alias: ni.getAliasNode()?.getText(),
88
+ isTypeOnly: ni.isTypeOnly(),
89
+ })),
90
+ defaultImport: featureDefaultImport,
91
+ namespaceImport: featureImport.getNamespaceImport()?.getText(),
92
+ });
93
+ // Track the new default import
94
+ if (featureDefaultImport) {
95
+ existingDefaultImportNames.add(featureDefaultImport);
96
+ }
97
+ // Update map with new import
98
+ const newImports = targetFile.getImportDeclarations();
99
+ const addedImport = newImports[newImports.length - 1];
100
+ targetImportsMap.set(moduleSpecifier, addedImport);
101
+ }
102
+ else {
103
+ // Import from this module exists, merge them
104
+ mergeImportDeclarations(featureImport, targetImport);
105
+ }
106
+ }
107
+ // Final deduplication pass for named imports
108
+ deduplicateNamedImports(targetFile);
109
+ // Remove imports from __delete__ marked files
110
+ removeDeleteMarkedImports(targetFile);
111
+ // Ensure proper formatting: blank line after imports
112
+ ensureBlankLineAfterImports(targetFile);
113
+ // Don't call organizeImports() as it can be too aggressive and remove imports
114
+ // that are actually needed but appear unused in the isolated file context
115
+ }
116
+ /**
117
+ * Merge sourceImport into targetImport
118
+ * Combines default imports, named imports, and namespace imports
119
+ * Handles type imports vs regular imports appropriately
120
+ */
121
+ function mergeImportDeclarations(sourceImport, targetImport) {
122
+ const sourceIsTypeOnly = sourceImport.isTypeOnly();
123
+ const targetIsTypeOnly = targetImport.isTypeOnly();
124
+ // If type-only status differs, we need to add a separate import declaration
125
+ // instead of merging, because you can't mix type and regular imports
126
+ if (sourceIsTypeOnly !== targetIsTypeOnly) {
127
+ // Get the source file and add a new import
128
+ const targetFile = targetImport.getSourceFile();
129
+ const moduleSpecifier = sourceImport.getModuleSpecifierValue();
130
+ // Check if an import with matching type-only status already exists
131
+ const existingMatchingImport = targetFile
132
+ .getImportDeclarations()
133
+ .find((imp) => imp.getModuleSpecifierValue() === moduleSpecifier &&
134
+ imp.isTypeOnly() === sourceIsTypeOnly &&
135
+ imp !== targetImport);
136
+ if (existingMatchingImport) {
137
+ // Merge into the matching import instead
138
+ mergeImportDeclarations(sourceImport, existingMatchingImport);
139
+ return;
140
+ }
141
+ // Add new import with same type-only status as source
142
+ targetFile.addImportDeclaration({
143
+ moduleSpecifier: moduleSpecifier,
144
+ isTypeOnly: sourceIsTypeOnly,
145
+ namedImports: sourceImport.getNamedImports().map((ni) => ({
146
+ name: ni.getName(),
147
+ alias: ni.getAliasNode()?.getText(),
148
+ isTypeOnly: ni.isTypeOnly(),
149
+ })),
150
+ defaultImport: sourceImport.getDefaultImport()?.getText(),
151
+ namespaceImport: sourceImport.getNamespaceImport()?.getText(),
152
+ });
153
+ return;
154
+ }
155
+ // Same type-only status, proceed with merge
156
+ // Add default import if target doesn't have one and source does
157
+ const sourceDefaultImport = sourceImport.getDefaultImport();
158
+ const targetDefaultImport = targetImport.getDefaultImport();
159
+ if (sourceDefaultImport && !targetDefaultImport) {
160
+ targetImport.setDefaultImport(sourceDefaultImport.getText());
161
+ }
162
+ // Add namespace import if target doesn't have one and source does
163
+ const sourceNamespaceImport = sourceImport.getNamespaceImport();
164
+ const targetNamespaceImport = targetImport.getNamespaceImport();
165
+ if (sourceNamespaceImport && !targetNamespaceImport) {
166
+ targetImport.setNamespaceImport(sourceNamespaceImport.getText());
167
+ }
168
+ // Merge named imports
169
+ const targetNamedImports = new Set(targetImport.getNamedImports().map((ni) => ni.getName()));
170
+ for (const sourceNamedImport of sourceImport.getNamedImports()) {
171
+ const importName = sourceNamedImport.getName();
172
+ if (!targetNamedImports.has(importName)) {
173
+ targetImport.addNamedImport({
174
+ name: importName,
175
+ alias: sourceNamedImport.getAliasNode()?.getText(),
176
+ isTypeOnly: sourceNamedImport.isTypeOnly(),
177
+ });
178
+ }
179
+ }
180
+ }
181
+ /**
182
+ * Remove duplicate named imports within each import declaration
183
+ */
184
+ function deduplicateNamedImports(file) {
185
+ const allImports = file.getImportDeclarations();
186
+ for (const imp of allImports) {
187
+ const namedImports = imp.getNamedImports();
188
+ const seen = new Set();
189
+ for (const namedImport of namedImports) {
190
+ const name = namedImport.getName();
191
+ if (seen.has(name)) {
192
+ namedImport.remove();
193
+ }
194
+ else {
195
+ seen.add(name);
196
+ }
197
+ }
198
+ }
199
+ }
200
+ /**
201
+ * Remove imports from files marked with __delete__ prefix
202
+ * These imports reference deleted files and should be removed
203
+ */
204
+ function removeDeleteMarkedImports(file) {
205
+ const DELETE_PREFIX = "__delete__";
206
+ const allImports = file.getImportDeclarations();
207
+ for (const imp of allImports) {
208
+ const moduleSpecifier = imp.getModuleSpecifierValue();
209
+ // Check if the module specifier contains __delete__ prefix
210
+ // This covers both direct paths like "./__delete__new" and path segments
211
+ if (moduleSpecifier.includes(DELETE_PREFIX)) {
212
+ imp.remove();
213
+ }
214
+ }
215
+ }
216
+ /**
217
+ * Ensure there's a blank line after the last import declaration
218
+ * This maintains proper formatting between imports and code
219
+ */
220
+ function ensureBlankLineAfterImports(file) {
221
+ const imports = file.getImportDeclarations();
222
+ if (imports.length === 0) {
223
+ return; // No imports, nothing to do
224
+ }
225
+ const lastImport = imports[imports.length - 1];
226
+ // Get the next statement after imports (if any)
227
+ const statements = file.getStatements();
228
+ const lastImportIndex = statements.findIndex((stmt) => stmt === lastImport);
229
+ if (lastImportIndex === -1 || lastImportIndex === statements.length - 1) {
230
+ return; // Last import is the last statement, no code after it
231
+ }
232
+ const nextStatement = statements[lastImportIndex + 1];
233
+ // Check if there's already proper spacing
234
+ const fullText = file.getFullText();
235
+ const textBetween = fullText.substring(lastImport.getEnd(), nextStatement.getStart());
236
+ // Count newlines in the text between
237
+ const newlineCount = (textBetween.match(/\n/g) || []).length;
238
+ // We want at least 2 newlines (one ends the import, one creates blank line)
239
+ if (newlineCount < 2) {
240
+ // Insert additional newline after the last import
241
+ file.insertText(lastImport.getEnd(), "\n");
242
+ }
243
+ }
244
+ //# sourceMappingURL=import-merger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import-merger.js","sourceRoot":"","sources":["../../src/utils/import-merger.ts"],"names":[],"mappings":"AAOA;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,WAAuB,EAAE,UAAsB;IAC3E,MAAM,cAAc,GAAG,WAAW,CAAC,qBAAqB,EAAE,CAAC;IAC3D,MAAM,aAAa,GAAG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,CAAC,4BAA4B;IACrC,CAAC;IAED,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAE/C,gDAAgD;IAChD,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;IACxC,MAAM,eAAe,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC;IAE5E,IAAI,eAAe,KAAK,CAAC,CAAC,IAAI,eAAe,KAAK,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzE,OAAO,CAAC,sDAAsD;IAC/D,CAAC;IAED,MAAM,aAAa,GAAG,UAAU,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC;IAEtD,0CAA0C;IAC1C,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IACpC,MAAM,WAAW,GAAG,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEtF,qCAAqC;IACrC,MAAM,YAAY,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;IAE7D,4EAA4E;IAC5E,IAAI,YAAY,GAAG,CAAC,EAAE,CAAC;QACtB,kDAAkD;QAClD,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC;AACF,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare function success(message: string): void;
2
+ export declare function error(message: string): void;
3
+ export declare function info(message: string): void;
4
+ export declare function warning(message: string): void;
5
+ export declare function heading(message: string): void;
6
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAOA,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE7C;AAED,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE3C;AAED,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE1C;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE7C;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE7C"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright (c) 2026, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+ import chalk from "chalk";
7
+ export function success(message) {
8
+ console.log(chalk.green("✓"), message);
9
+ }
10
+ export function error(message) {
11
+ console.error(chalk.red("✗"), message);
12
+ }
13
+ export function info(message) {
14
+ console.log(chalk.blue("ℹ"), message);
15
+ }
16
+ export function warning(message) {
17
+ console.log(chalk.yellow("⚠"), message);
18
+ }
19
+ export function heading(message) {
20
+ console.log(chalk.bold.cyan(`\n${message}`));
21
+ }
22
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,UAAU,OAAO,CAAC,OAAe;IACtC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,OAAe;IACpC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,OAAe;IACnC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,OAAe;IACtC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,OAAe;IACtC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC;AAC9C,CAAC"}