@prism-d1/cli 1.0.35 → 1.0.37
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.
|
@@ -41,7 +41,8 @@ fi
|
|
|
41
41
|
|
|
42
42
|
# Check for Kiro markers
|
|
43
43
|
# Kiro CLI sets KIRO_SESSION_ID; Kiro IDE sets TERM_PROGRAM=kiro
|
|
44
|
-
|
|
44
|
+
# Kiro Source Control panel sets VSCODE_GIT_ASKPASS_NODE with "kiro" in path
|
|
45
|
+
if [[ -n "${KIRO_SESSION_ID:-}" || -n "${KIRO_SESSION:-}" || "${TERM_PROGRAM:-}" == "kiro" || "${VSCODE_GIT_ASKPASS_NODE:-}" == *"kiro"* || "${GIT_ASKPASS:-}" == *"kiro"* ]]; then
|
|
45
46
|
AI_ORIGIN="ai-generated"
|
|
46
47
|
AI_TOOL="kiro"
|
|
47
48
|
fi
|
package/dist/src/utils/root.d.ts
CHANGED
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare function getRepoRoot(importMetaUrl: string): string;
|
|
8
8
|
/**
|
|
9
|
-
* Resolves a path relative to the
|
|
10
|
-
*
|
|
11
|
-
* Throws if neither location has the requested path.
|
|
9
|
+
* Resolves a path relative to the bundled assets directory.
|
|
10
|
+
* Always uses dist/assets/ from the npm package.
|
|
12
11
|
*/
|
|
13
12
|
export declare function getAssetPath(importMetaUrl: string, relativePath: string): string;
|
|
14
13
|
//# sourceMappingURL=root.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../src/utils/root.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAmBzD;AAED
|
|
1
|
+
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../src/utils/root.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAmBzD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAehF"}
|
package/dist/src/utils/root.js
CHANGED
|
@@ -28,32 +28,22 @@ export function getRepoRoot(importMetaUrl) {
|
|
|
28
28
|
return process.cwd();
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* Resolves a path relative to the
|
|
32
|
-
*
|
|
33
|
-
* Throws if neither location has the requested path.
|
|
31
|
+
* Resolves a path relative to the bundled assets directory.
|
|
32
|
+
* Always uses dist/assets/ from the npm package.
|
|
34
33
|
*/
|
|
35
34
|
export function getAssetPath(importMetaUrl, relativePath) {
|
|
36
|
-
// Try repo root first (source checkout / cloned repo)
|
|
37
|
-
const repoRoot = getRepoRoot(importMetaUrl);
|
|
38
|
-
const repoPath = resolve(repoRoot, relativePath);
|
|
39
|
-
if (existsSync(repoPath)) {
|
|
40
|
-
return repoPath;
|
|
41
|
-
}
|
|
42
|
-
// Try bundled assets (npm global install)
|
|
43
35
|
let dir = dirname(fileURLToPath(importMetaUrl));
|
|
44
36
|
for (let i = 0; i < 10; i++) {
|
|
45
37
|
const assetsPath = resolve(dir, 'assets', relativePath);
|
|
46
38
|
if (existsSync(assetsPath)) {
|
|
47
39
|
return assetsPath;
|
|
48
40
|
}
|
|
49
|
-
// Also check dist/assets from cli root
|
|
50
41
|
const distAssetsPath = resolve(dir, 'dist', 'assets', relativePath);
|
|
51
42
|
if (existsSync(distAssetsPath)) {
|
|
52
43
|
return distAssetsPath;
|
|
53
44
|
}
|
|
54
45
|
dir = resolve(dir, '..');
|
|
55
46
|
}
|
|
56
|
-
|
|
57
|
-
return repoPath;
|
|
47
|
+
throw new Error(`Asset not found: ${relativePath}. Run 'npm run build' first.`);
|
|
58
48
|
}
|
|
59
49
|
//# sourceMappingURL=root.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.js","sourceRoot":"","sources":["../../../src/utils/root.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,aAAqB;IAC/C,2EAA2E;IAC3E,IAAI,GAAG,GAAG,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC;IAChD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,IAAI,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC;YAC7C,OAAO,GAAG,CAAC;QACb,CAAC;QACD,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;IACD,mDAAmD;IACnD,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,IAAI,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC;YAC7C,OAAO,GAAG,CAAC;QACb,CAAC;QACD,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;IACD,0DAA0D;IAC1D,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC;AACvB,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"root.js","sourceRoot":"","sources":["../../../src/utils/root.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,C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