Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
185 changes: 182 additions & 3 deletions src/dbt_client/dbtFusionCommandIntegration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,141 @@ import {
DBTNode,
DBTDetection,
DBTProjectDetection,
DBTCommandExecutionInfrastructure,
DBTCommandFactory,
DBTCommandExecutionStrategy,
} from "./dbtIntegration";
import {
CommandProcessExecutionFactory,
DBTProject,
DBTTerminal,
PythonEnvironment,
TelemetryService,
AltimateRequest,
} from "../modules";
import { DBTCloudProjectIntegration, getDBTPath } from "./dbtCloudIntegration";
import { ValidationProvider } from "../validation_provider";
import { DeferToProdService } from "../services/deferToProdService";
import { DBTCloudProjectIntegration } from "./dbtCloudIntegration";
import path, { join } from "path";
import which from "which";

/**
* Resolves the dbtf alias from shell configuration
* @returns The resolved path/command that dbtf aliases to, or null if not found
*/
async function resolveDbtfAlias(
commandProcessExecutionFactory: CommandProcessExecutionFactory,
terminal: DBTTerminal,
): Promise<string | null> {
const platform = process.platform;

// Windows: Use doskey to check for aliases/macros
if (platform === "win32") {
try {
const aliasProcess =
commandProcessExecutionFactory.createCommandProcessExecution({
command: "doskey",
args: ["/macros"],
cwd: getFirstWorkspacePath(),
});

const { stdout } = await aliasProcess.complete();

// Parse output like: "dbtf=path\to\dbt $*"
const match = stdout.match(/dbtf=(.+?)(?:\s+\$\*)?$/m);
if (match) {
const resolved = match[1].trim();
terminal.debug("resolveDbtfAlias", `Found Windows macro: ${resolved}`);
return resolved;
}
} catch (error) {
terminal.debug(
"resolveDbtfAlias",
"Windows doskey resolution failed",
error,
);
}
return null;
}

// Unix-like systems: Use shell alias command
const shell = process.env.SHELL || "/bin/bash";

try {
const aliasProcess =
commandProcessExecutionFactory.createCommandProcessExecution({
command: shell,
args: ["-i", "-c", "alias dbtf 2>/dev/null || echo ''"],
cwd: getFirstWorkspacePath(),
});

const { stdout } = await aliasProcess.complete();
terminal.debug("resolveDbtfAlias", `alias command output: ${stdout}`);

// Parse different alias formats
// Bash: alias dbtf='path' or alias dbtf="path"
// Zsh: dbtf: aliased to path
// Direct: dbtf=path
const bashMatch = stdout.match(/alias dbtf=['"](.+?)['"]/);
const zshMatch = stdout.match(/dbtf.*aliased to (.+?)$/m);
const directMatch = stdout.match(/dbtf=(.+?)$/m);

if (bashMatch) {
const resolved = bashMatch[1].trim();
terminal.debug("resolveDbtfAlias", `Found bash alias: ${resolved}`);
return resolved;
}
if (zshMatch) {
const resolved = zshMatch[1].trim();
terminal.debug("resolveDbtfAlias", `Found zsh alias: ${resolved}`);
return resolved;
}
if (directMatch) {
const resolved = directMatch[1].trim();
terminal.debug("resolveDbtfAlias", `Found direct alias: ${resolved}`);
return resolved;
}
} catch (error) {
terminal.debug("resolveDbtfAlias", "Shell alias resolution failed", error);
}

return null;
}
Comment on lines +41 to +118
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Alias probing via interactive shells can have side‑effects; consider safer approach.

Spawning an interactive shell (-i) sources user RC files, which may run arbitrary code and slow detection. Prefer:

  • Try PATH first (which("dbtf")) before alias probing.
  • If alias probing is required, add a short timeout and use a non‑interactive login shell (e.g., bash -lc) or parse known RC files directly.

🏁 Script executed:

#!/bin/bash
# Do we enforce timeouts on CommandProcessExecutionFactory executions?
rg -nP -C2 'createCommandProcessExecution\([^)]*\)' src | sed -n '1,120p'

Length of output: 0


I need to refine the search strategy since the initial command produced no output. Let me gather the necessary information with broader searches.


---

🏁 Script executed:

```shell
#!/bin/bash
# Find CommandProcessExecutionFactory definition and interface
fd -t f -e ts -e tsx | xargs grep -l 'CommandProcessExecutionFactory' | head -10

Length of output: 366


🏁 Script executed:

#!/bin/bash
# Look for createCommandProcessExecution usage with broader context
rg -n 'createCommandProcessExecution' src -A3 -B3

Length of output: 20906


🏁 Script executed:

#!/bin/bash
# Search for timeout-related configurations in the codebase
rg -n 'timeout|Timeout|duration|Duration' src/dbt_client/ | grep -iE '(timeout|duration)' | head -20

Length of output: 97


🏁 Script executed:

#!/bin/bash
# Examine the dbtFusionCommandIntegration file structure
cat src/dbt_client/dbtFusionCommandIntegration.ts | head -150

Length of output: 4325


I need to examine the CommandProcessExecutionFactory and CommandProcessExecution implementations to verify timeout capabilities.


---

🏁 Script executed:

```shell
#!/bin/bash
# Get the full CommandProcessExecutionFactory class definition
cat src/commandProcessExecution.ts

Length of output: 4465


🏁 Script executed:

#!/bin/bash
# Search for CommandProcessExecution interface or class
rg -n 'class CommandProcessExecution|interface CommandProcessExecution' src -A20

Length of output: 2432


🏁 Script executed:

#!/bin/bash
# Check if there are any timeout-related parameters in process execution
rg -n 'timeout|Timeout' src/commandProcessExecution.ts

Length of output: 0


Interactive shell with -i flag sources user RC files; add timeout and reverse lookup order.

The concerns in the review are valid:

  1. Interactive shell risk (confirmed): Line 83 uses -i flag which sources shell RC files (.bashrc, .zshrc, etc.), potentially executing arbitrary user code and adding startup overhead.

  2. No timeout enforcement (confirmed): CommandProcessExecutionFactory has no timeout parameter or mechanism. The CommandProcessExecution.complete() method can hang indefinitely with no timeout handling.

  3. Suboptimal lookup order (confirmed): Alias probing runs before the PATH check via which("dbt"). Reversing this order would avoid unnecessary interactive shell spawning in most cases.

Recommended fixes:

  • Add a timeout parameter to CommandProcessExecutionFactory.createCommandProcessExecution() and apply it in the spawn() method
  • Use non-interactive shell: change -i -c to -lc (login shell, non-interactive)
  • In resolveDbtfPath(), try which("dbtf") before alias probing to avoid RC file sourcing when unnecessary
🤖 Prompt for AI Agents
In src/dbt_client/dbtFusionCommandIntegration.ts around lines 41 to 118, the
alias probing uses an interactive shell (-i) with no timeout and runs before a
PATH lookup; update resolveDbtfAlias to spawn a non-interactive login shell by
changing args from ["-i", "-c", "alias dbtf 2>/dev/null || echo ''"] to ["-lc",
"alias dbtf 2>/dev/null || echo ''"], pass a timeout option into
commandProcessExecutionFactory.createCommandProcessExecution(...) (e.g. { ...,
timeout: SOME_MS }) so the underlying spawn/complete call cannot hang
indefinitely, and then flip the probing order in resolveDbtfPath (call
which("dbt") first and only call resolveDbtfAlias if which fails) so you avoid
sourcing user RC files unless necessary.


/**
* Resolves the dbtf command path with fallback chain:
* 1. Try to resolve shell alias for dbtf
* 2. Try to find dbt in PATH
* 3. Fallback to "dbt" as command name
* @returns The resolved path to the dbt/dbtf command
*/
async function resolveDbtfPath(
commandProcessExecutionFactory: CommandProcessExecutionFactory,
terminal: DBTTerminal,
): Promise<string> {
// Try to resolve alias via shell
const aliasResolved = await resolveDbtfAlias(
commandProcessExecutionFactory,
terminal,
);
if (aliasResolved) {
terminal.debug("resolveDbtfPath", `Resolved via alias: ${aliasResolved}`);
return aliasResolved;
}

// Try which/where for dbt
try {
const dbtPath = await which("dbt");
terminal.debug("resolveDbtfPath", `Found dbt in PATH: ${dbtPath}`);
return dbtPath;
} catch {
// dbt not in PATH either
}

// Fallback to just "dbt" command name
terminal.debug("resolveDbtfPath", "Falling back to 'dbt' command");
return "dbt";
}
Comment on lines +121 to +153
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Resolver prefers “dbt” over “dbtf” — breaks stated goal; fix resolution order and fallback.

Current flow: alias(dbtf) → which("dbt") → "dbt". This can run dbt core instead of dbtf, making fusion detection fail. Prefer dbtf everywhere, with optional last‑chance dbt only if you explicitly validate it’s fusion.

Apply this diff to align with “use dbtf”:

- * 2. Try to find dbt in PATH
- * 3. Fallback to "dbt" as command name
+ * 2. Try to find dbtf in PATH
+ * 3. Fallback to "dbtf" as command name
@@
-  // Try which/where for dbt
+  // Try which/where for dbtf
   try {
-    const dbtPath = await which("dbt");
-    terminal.debug("resolveDbtfPath", `Found dbt in PATH: ${dbtPath}`);
-    return dbtPath;
-  } catch {
-    // dbt not in PATH either
+    const dbtfPath = await which("dbtf", { nothrow: true } as any);
+    if (dbtfPath) {
+      terminal.debug("resolveDbtfPath", `Found dbtf in PATH: ${dbtfPath}`);
+      return dbtfPath;
+    }
+  } catch {
+    // dbtf not in PATH either
   }
 
-  // Fallback to just "dbt" command name
-  terminal.debug("resolveDbtfPath", "Falling back to 'dbt' command");
-  return "dbt";
+  // Fallback to just "dbtf" command name
+  terminal.debug("resolveDbtfPath", "Falling back to 'dbtf' command");
+  return "dbtf";

Optional: If you keep a dbt fallback, only accept it when dbt --version contains “dbt‑fusion”, otherwise ignore it.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* Resolves the dbtf command path with fallback chain:
* 1. Try to resolve shell alias for dbtf
* 2. Try to find dbt in PATH
* 3. Fallback to "dbt" as command name
* @returns The resolved path to the dbt/dbtf command
*/
async function resolveDbtfPath(
commandProcessExecutionFactory: CommandProcessExecutionFactory,
terminal: DBTTerminal,
): Promise<string> {
// Try to resolve alias via shell
const aliasResolved = await resolveDbtfAlias(
commandProcessExecutionFactory,
terminal,
);
if (aliasResolved) {
terminal.debug("resolveDbtfPath", `Resolved via alias: ${aliasResolved}`);
return aliasResolved;
}
// Try which/where for dbt
try {
const dbtPath = await which("dbt");
terminal.debug("resolveDbtfPath", `Found dbt in PATH: ${dbtPath}`);
return dbtPath;
} catch {
// dbt not in PATH either
}
// Fallback to just "dbt" command name
terminal.debug("resolveDbtfPath", "Falling back to 'dbt' command");
return "dbt";
}
* Resolves the dbtf command path with fallback chain:
* 1. Try to resolve shell alias for dbtf
* 2. Try to find dbtf in PATH
* 3. Fallback to "dbtf" as command name
* @returns The resolved path to the dbt/dbtf command
*/
async function resolveDbtfPath(
commandProcessExecutionFactory: CommandProcessExecutionFactory,
terminal: DBTTerminal,
): Promise<string> {
// Try to resolve alias via shell
const aliasResolved = await resolveDbtfAlias(
commandProcessExecutionFactory,
terminal,
);
if (aliasResolved) {
terminal.debug("resolveDbtfPath", `Resolved via alias: ${aliasResolved}`);
return aliasResolved;
}
// Try which/where for dbtf
try {
const dbtfPath = await which("dbtf", { nothrow: true } as any);
if (dbtfPath) {
terminal.debug("resolveDbtfPath", `Found dbtf in PATH: ${dbtfPath}`);
return dbtfPath;
}
} catch {
// dbtf not in PATH either
}
// Fallback to just "dbtf" command name
terminal.debug("resolveDbtfPath", "Falling back to 'dbtf' command");
return "dbtf";
}
🤖 Prompt for AI Agents
In src/dbt_client/dbtFusionCommandIntegration.ts around lines 121-153, the
resolver currently tries alias(dbtf) → which("dbt") → "dbt", which can cause
core dbt to be chosen; change the resolution order to prefer dbtf everywhere:
after the existing aliasResolved check, attempt which("dbtf") next and return it
if found; only then attempt which("dbt") as a last-resort fallback but validate
it by running `dbt --version` (or equivalent via the provided
commandProcessExecutionFactory/terminal) and accept it only if the version
output contains "dbt-fusion"; if that validation fails, do not return plain
"dbt" — instead fall back to the literal "dbtf" command name and log the
decision via terminal.debug.


@provideSingleton(DBTFusionCommandDetection)
export class DBTFusionCommandDetection implements DBTDetection {
Expand All @@ -35,12 +161,22 @@ export class DBTFusionCommandDetection implements DBTDetection {
) {}

async detectDBT(): Promise<boolean> {
const dbtPath = getDBTPath(this.pythonEnvironment, this.terminal);
try {
this.terminal.debug("DBTCLIDetection", "Detecting dbt fusion cli");

// Resolve dbtf command (handles aliases, symlinks, PATH)
const dbtfPath = await resolveDbtfPath(
this.commandProcessExecutionFactory,
this.terminal,
);
this.terminal.debug(
"DBTCLIDetection",
`Resolved dbtf command to: ${dbtfPath}`,
);

const checkDBTInstalledProcess =
this.commandProcessExecutionFactory.createCommandProcessExecution({
command: dbtPath,
command: dbtfPath,
args: ["--version"],
Comment on lines +167 to 180
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Potential break if alias resolves to multi‑word command.

If resolveDbtfAlias returns something like “pipx run dbtf”, passing it as command plus args=["--version"] may fail unless the process runner uses shell=true or supports a command+preArgs split.

If shell=true is not used, consider:

  • Returning { command, preArgs } from resolveDbtfPath, or
  • Splitting on whitespace respecting quotes, or
  • Always executing through a shell when the resolved string contains whitespace.

🏁 Script executed:

#!/bin/bash
# Inspect the process runner to confirm shell mode and arg handling
rg -nP -C3 'class\s+CommandProcessExecutionFactory|createCommandProcessExecution\(' src

# Look for child_process.spawn usage and shell:true
rg -nP -C2 'spawn\s*\(|shell\s*:\s*true' src

Length of output: 16237


cwd: getFirstWorkspacePath(),
});
Expand Down Expand Up @@ -97,6 +233,36 @@ export class DBTFusionCommandProjectDetection implements DBTProjectDetection {

@provideSingleton(DBTFusionCommandProjectIntegration)
export class DBTFusionCommandProjectIntegration extends DBTCloudProjectIntegration {
constructor(
executionInfrastructure: DBTCommandExecutionInfrastructure,
dbtCommandFactory: DBTCommandFactory,
cliDBTCommandExecutionStrategyFactory: (
path: Uri,
dbtPath: string,
) => DBTCommandExecutionStrategy,
telemetry: TelemetryService,
pythonEnvironment: PythonEnvironment,
terminal: DBTTerminal,
validationProvider: ValidationProvider,
deferToProdService: DeferToProdService,
projectRoot: Uri,
altimateRequest: AltimateRequest,
private commandProcessExecutionFactory: CommandProcessExecutionFactory,
) {
super(
executionInfrastructure,
dbtCommandFactory,
cliDBTCommandExecutionStrategyFactory,
telemetry,
pythonEnvironment,
terminal,
validationProvider,
deferToProdService,
projectRoot,
altimateRequest,
);
}

protected dbtCloudCommand(command: DBTCommand) {
command.setExecutionStrategy(
this.cliDBTCommandExecutionStrategyFactory(
Expand All @@ -107,6 +273,19 @@ export class DBTFusionCommandProjectIntegration extends DBTCloudProjectIntegrati
return command;
}

async initializeProject(): Promise<void> {
await super.initializeProject();
// Resolve dbtf command (handles aliases, symlinks, PATH)
this.dbtPath = await resolveDbtfPath(
this.commandProcessExecutionFactory,
this.terminal,
);
this.terminal.debug(
"DBTFusionInitialization",
`Resolved dbtf command to: ${this.dbtPath}`,
);
}
Comment on lines +276 to +287
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Initialize with dbtf path; ensure final fallback is “dbtf”.

Given the resolver fix above, this.dbtPath will reliably point to dbtf. If you add a dbt fallback, gate it by verifying it’s the fusion CLI to avoid running core by mistake.


🏁 Script executed:

#!/bin/bash
# Sanity: where is initializeProject called for Fusion projects?
rg -nP -C2 'initializeProject\s*\(' src | rg -nP 'DBTFusionCommandProjectIntegration' -n -C2

Length of output: 0


I need to search more broadly to understand the codebase structure. Let me try different approaches to verify the initialization and any fallback logic.


🏁 Script executed:

#!/bin/bash
# Search for initializeProject calls more broadly
echo "=== initializeProject calls in src ==="
rg -n 'initializeProject\s*\(' src --type ts

echo ""
echo "=== DBTFusionCommandIntegration class definition ==="
rg -n 'class\s+DBTFusionCommand.*Integration' src --type ts -A 5

echo ""
echo "=== resolveDbtfPath function ==="
rg -n 'resolveDbtfPath' src --type ts -B 2 -A 10

Length of output: 6351



🏁 Script executed:

#!/bin/bash
# Check how dbtPath is used after initialization
echo "=== dbtPath usage in file ==="
rg -n 'this\.dbtPath' src/dbt_client/dbtFusionCommandIntegration.ts -A 2 -B 2

echo ""
echo "=== Check if there's any CLI verification logic ==="
rg -n 'dbtf\|fusion.*cli\|verify.*cli' src/dbt_client/dbtFusionCommandIntegration.ts -i

echo ""
echo "=== Look at parent class initializeProject (DBTCloudProjectIntegration) ==="
rg -n 'class DBTCloudProjectIntegration' src/dbt_client/dbtCloudIntegration.ts -A 20

Length of output: 1590


Fallback command should be "dbtf" or gated with CLI verification, not bare "dbt".

The resolveDbtfPath() function (lines 127-153) currently falls back to "dbt" on line 152. For a Fusion integration, this risks invoking dbt core instead of the fusion CLI. Either:

  1. Change fallback to "dbtf", or
  2. Add verification/gating to confirm it's the fusion CLI before using the fallback

Currently there is no verification logic to distinguish between core and fusion CLI invocations.

🤖 Prompt for AI Agents
In src/dbt_client/dbtFusionCommandIntegration.ts around lines 276 to 287, the
code uses resolveDbtfPath which currently falls back to "dbt" and can mistakenly
invoke dbt-core; update resolveDbtfPath so its fallback is "dbtf" (not "dbt")
and add a verification step: after resolving a path, check the executable
name/version to confirm it is the Fusion CLI (e.g., executable basename equals
"dbtf" or run a lightweight version/identify command and validate output); if
verification fails, continue searching for "dbtf" on PATH and only fall back to
the literal "dbtf" when a verified Fusion CLI cannot be found, otherwise throw a
clear error.


protected async initializePaths() {
// No way to get these paths from the fusion executable
this.targetPath = join(this.projectRoot.fsPath, "target");
Expand Down
1 change: 1 addition & 0 deletions src/inversify.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ container
container.get(DeferToProdService),
projectRoot,
container.get(AltimateRequest),
container.get(CommandProcessExecutionFactory),
);
Comment on lines +228 to 229
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

DI wiring looks correct; confirm factory signature/arity.

Passing CommandProcessExecutionFactory as the last ctor arg matches the updated DBTFusionCommandProjectIntegration constructor. Please also verify the factory’s declared parameter tuple and return type align with the actual lambda (it currently appears typed as [Uri, DiagnosticCollection] while only (projectRoot: Uri) is accepted, and the bound generic uses DBTCoreProjectIntegration). Prevents subtle DI/type errors later.

Run to double-check DI signatures:


🏁 Script executed:

#!/bin/bash
# Check factory symbols, arities, and ctor params
rg -nP -C2 'Factory<DBTFusionCommandProjectIntegration>|DBTFusionCommandProjectIntegration\s*constructor\(' src

# Ensure all "toFactory<...,[...]>" entries match the returned lambda arity
rg -nP -C1 'toFactory<\s*DBTFusionCommandProjectIntegration\s*,\s*\[.*\]\s*>' src/inversify.config.ts

Length of output: 729


🏁 Script executed:

#!/bin/bash
# Get full factory binding definition including parameter tuple
sed -n '208,225p' src/inversify.config.ts

echo "---"

# Find DBTFusionCommandProjectIntegration class/interface definition and constructor
rg -nP -C5 'class\s+DBTFusionCommandProjectIntegration|interface\s+DBTFusionCommandProjectIntegration' src

echo "---"

# Search for constructor parameters in DBTFusionCommandProjectIntegration
rg -nP -C8 'DBTFusionCommandProjectIntegration\s*\{' src

Length of output: 162


🏁 Script executed:

#!/bin/bash
# Get full factory binding definition including parameter tuple
sed -n '208,225p' src/inversify.config.ts

echo "---"

# Find DBTFusionCommandProjectIntegration class/interface definition and constructor
rg -nP -C5 'class\s+DBTFusionCommandProjectIntegration|interface\s+DBTFusionCommandProjectIntegration' src

echo "---"

# Search for constructor parameters in DBTFusionCommandProjectIntegration
rg -nP -C8 'DBTFusionCommandProjectIntegration\s*\{' src

Length of output: 1650


🏁 Script executed:

#!/bin/bash
# Get full DBTFusionCommandProjectIntegration constructor
sed -n '235,260p' src/dbt_client/dbtFusionCommandIntegration.ts

echo "---"

# Check if DBTCoreProjectIntegration is used elsewhere in similar factory patterns to understand the bind type
rg -nP -C3 'bind<\s*interfaces\.Factory<DBTCoreProjectIntegration>' src/inversify.config.ts

echo "---"

# Check what interface/type Factory is bound to for other similar integrations
rg -nP -C3 'toFactory<\s*DBT.*CommandProjectIntegration' src/inversify.config.ts

Length of output: 890


🏁 Script executed:

#!/bin/bash
# Look for other CommandProjectIntegration factory patterns to understand bind type pattern
rg -nP -B3 -A10 'toFactory<\s*DBTCloudProjectIntegration|toFactory<\s*DBTCoreCommandProjectIntegration' src/inversify.config.ts | head -50

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Find all toFactory patterns to understand bind/toFactory type relationship
rg -nP -B2 'toFactory<' src/inversify.config.ts | head -80

echo "---"

# Search for all Factory string bindings to see naming patterns
rg -nP '"Factory<' src/inversify.config.ts

Length of output: 2663


🏁 Script executed:

#!/bin/bash
# Get parameter tuples for DBTCoreCommandProjectIntegration and DBTFusionCommandProjectIntegration
sed -n '179,195p' src/inversify.config.ts

echo "---"

sed -n '209,225p' src/inversify.config.ts

Length of output: 1402


Fix DI wiring: Correct factory type and parameter tuple mismatch.

Lines 209–213 have two critical issues:

  1. Line 209: bind<interfaces.Factory<DBTCoreProjectIntegration>> should be bind<interfaces.Factory<DBTFusionCommandProjectIntegration>> to match the string key and toFactory first type parameter.

  2. Line 212–213: Parameter tuple [Uri, DiagnosticCollection] should be [Uri] because the returned lambda only accepts (projectRoot: Uri), not two parameters. Compare to DBTCoreCommandProjectIntegration (lines 182–186), which correctly declares [Uri, DiagnosticCollection] and accepts both parameters in its lambda.

These mismatches will cause type/runtime errors when the factory is resolved and invoked.

🤖 Prompt for AI Agents
In src/inversify.config.ts around lines 228 to 229, the DI binding has a wrong
factory generic and an incorrect parameter tuple: change the bind generic from
interfaces.Factory<DBTCoreProjectIntegration> to
interfaces.Factory<DBTFusionCommandProjectIntegration> to match the string
key/toFactory target, and update the factory parameter tuple from [Uri,
DiagnosticCollection] to [Uri] so the returned lambda signature accepts only
(projectRoot: Uri); adjust the toFactory registration types accordingly so the
factory resolves and invokes with the correct types.

};
});
Expand Down
Loading