bluelamp 6.6.21-rc.1 → 6.6.21
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var l=Object.getOwnPropertyDescriptor(t,n);l&&!("get"in l?!t.__esModule:l.writable||l.configurable)||(l={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,l)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var r=e(t),l=0;l<r.length;l++)"default"!==r[l]&&__createBinding(n,t,r[l]);return __setModuleDefault(n,t),n}}();Object.defineProperty(exports,"__esModule",{value:!0}),exports.SHELL_PROBE_TIMEOUT_MS=void 0,exports.staticCandidates=staticCandidates,exports.pickPathFromShellOutput=pickPathFromShellOutput,exports.resolveClaudeBinWith=resolveClaudeBinWith,exports.isExecutableFile=isExecutableFile,exports.resolveLoginShell=resolveLoginShell,exports.askLoginShellForClaude=askLoginShellForClaude,exports.askLoginShellCommandV=askLoginShellCommandV,exports.resolveClaudeBinDetailed=resolveClaudeBinDetailed;const node_child_process_1=require("node:child_process"),fs=__importStar(require("node:fs")),os=__importStar(require("node:os")),path=__importStar(require("node:path"));function staticCandidates(e){return[path.join(e,".local","bin","claude"),path.join(e,".claude","local","claude"),"/opt/homebrew/bin/claude","/usr/local/bin/claude","/usr/bin/claude"]}function pickPathFromShellOutput(e){const t=e.split("\n").map(e=>e.trim()).filter(e=>e.length>0);for(let e=t.length-1;e>=0;e-=1)if(t[e].startsWith("/"))return t[e];return null}function resolveClaudeBinWith(e){const t=e.env("SCHEDULER_CLAUDE_BIN");if(t&&t.length>0)return{bin:t,source:"env"};const n=e.askLoginShell();if(null!==n&&e.isExecutable(n))return{bin:n,source:"login_shell"};for(const t of staticCandidates(e.home()))if(e.isExecutable(t))return{bin:t,source:"static_candidate"};return{bin:null,error:`claude 実行ファイルを解決できません(${null===n?"ログインシェルからは取得できず":`ログインシェルは ${n} を返したが実行可能ファイルではない`}/静的候補もすべて不在)。SCHEDULER_CLAUDE_BIN に絶対パスを設定すれば確実に解決できます`}}function isExecutableFile(e){try{return!!fs.statSync(e).isFile()&&(fs.accessSync(e,fs.constants.X_OK),!0)}catch{return!1}}function resolveLoginShell(){const e=process.env.SHELL;if(e&&e.length>0)return e;try{const e=os.userInfo().shell;if(e&&e.length>0)return e}catch{}return null}function askLoginShellForClaude(){return askLoginShellCommandV("claude")}function askLoginShellCommandV(e){if(!/^[A-Za-z0-9_-]+$/.test(e))return null;const t=resolveLoginShell();if(null===t)return null;try{return pickPathFromShellOutput((0,node_child_process_1.execFileSync)(t,["-lic",`command -v ${e}`],{encoding:"utf-8",timeout:exports.SHELL_PROBE_TIMEOUT_MS,stdio:["ignore","pipe","ignore"]}))}catch{return null}}function resolveClaudeBinDetailed(){return resolveClaudeBinWith({env:e=>process.env[e],home:()=>os.homedir(),isExecutable:isExecutableFile,askLoginShell:askLoginShellForClaude})}exports.SHELL_PROBE_TIMEOUT_MS=5e3;
|
package/package.json
CHANGED