domagic-turbopack-plugin 1.1.27 → 1.1.29
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/init.js +12 -2
- package/package.json +2 -2
package/dist/init.js
CHANGED
|
@@ -104,7 +104,7 @@ function detectExplicitAgent(env, lookupCommand) {
|
|
|
104
104
|
['claude-code', 'DOMAGIC_CLAUDE_CODE_CMD'],
|
|
105
105
|
['gemini', 'DOMAGIC_GEMINI_CMD'],
|
|
106
106
|
]) {
|
|
107
|
-
const configured = env[envName]
|
|
107
|
+
const configured = resolveConfiguredCommand(env[envName], lookupCommand);
|
|
108
108
|
if (configured) {
|
|
109
109
|
return {
|
|
110
110
|
provider,
|
|
@@ -146,11 +146,21 @@ function getProviderCommandCandidates(provider) {
|
|
|
146
146
|
}
|
|
147
147
|
return ['gemini', 'gemini-cli'];
|
|
148
148
|
}
|
|
149
|
+
function resolveConfiguredCommand(command, lookupCommand) {
|
|
150
|
+
const trimmed = command?.trim();
|
|
151
|
+
if (!trimmed) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
if (trimmed.includes(path.sep)) {
|
|
155
|
+
return isExecutable(trimmed) ? trimmed : undefined;
|
|
156
|
+
}
|
|
157
|
+
return lookupCommand(trimmed) ?? undefined;
|
|
158
|
+
}
|
|
149
159
|
function createPathLookup(env) {
|
|
150
160
|
const pathEntries = (env.PATH ?? '').split(path.delimiter).filter(Boolean);
|
|
151
161
|
return (command) => {
|
|
152
162
|
if (command.includes(path.sep)) {
|
|
153
|
-
return command;
|
|
163
|
+
return isExecutable(command) ? command : null;
|
|
154
164
|
}
|
|
155
165
|
for (const entry of pathEntries) {
|
|
156
166
|
const candidate = path.join(entry, command);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "domagic-turbopack-plugin",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.29",
|
|
4
4
|
"description": "A development-only Turbopack adapter for DOM source mapping and AI-assisted style edits.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"test": "vitest run --config vitest.config.ts"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"domagic-vite-plugin": "1.1.
|
|
52
|
+
"domagic-vite-plugin": "1.1.29",
|
|
53
53
|
"typescript": "^5.9.3"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|