@snappedly-tools/shipyard 0.4.1 → 0.4.4-staging.35699051936

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/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { CODEX_MODELS, formatErrorMessage } from './chunk-VDHZO5PP.js';
2
- export { CODEX_MODELS, CODEX_REASONING_EFFORTS } from './chunk-VDHZO5PP.js';
3
- import { CwdError, resolveCwd, getCurrentBranch, generateTempBranchName, CONFIG_DIR, LOGS_DIR, assertNoSymlinkComponents, FileDisplay, ClackDisplay, WorktreeDockerSandboxFactory, SandboxConfig, Display, CLI_NAME, PRODUCT_NAME, pruneStale, create, copyToWorktree, runHostHooks, startSandbox, resolveGitMounts, patchGitMountsForWindows, SANDBOX_REPO_DIR, remove, makeSandboxFromHandle, syncOut, withSandboxLifecycle, hasUncommittedChanges, registerShutdown, SandboxFactory, PromptError, ConfigDirError, AgentError, SessionCaptureError, PromptExpansionTimeoutError, SilentDisplay, AgentIdleTimeoutError } from './chunk-2GT3OPO5.js';
1
+ import { CODEX_MODELS, resolveEnv, formatErrorMessage } from './chunk-BYXKYXK6.js';
2
+ export { CODEX_MODELS, CODEX_REASONING_EFFORTS } from './chunk-BYXKYXK6.js';
3
+ import { CwdError, resolveCwd, getCurrentBranch, generateTempBranchName, CONFIG_DIR, LOGS_DIR, assertNoSymlinkComponents, FileDisplay, ClackDisplay, WorktreeDockerSandboxFactory, SandboxConfig, Display, CLI_NAME, PRODUCT_NAME, pruneStale, create, copyToWorktree, runHostHooks, startSandbox, resolveGitMounts, patchGitMountsForWindows, SANDBOX_REPO_DIR, remove, makeSandboxFromHandle, syncOut, withSandboxLifecycle, hasUncommittedChanges, registerShutdown, SandboxFactory, PromptError, AgentError, SessionCaptureError, PromptExpansionTimeoutError, SilentDisplay, AgentIdleTimeoutError } from './chunk-KPJFCYX5.js';
4
4
  import { shellQuote, toSessionTransferHandle } from './chunk-KMGNFXKN.js';
5
5
  export { createBindMountSandboxProvider, createIsolatedSandboxProvider } from './chunk-KMGNFXKN.js';
6
6
  import { noSandbox } from './chunk-VW4MI5GJ.js';
@@ -652,62 +652,6 @@ var resolvePrompt = (options) => {
652
652
  return { text: text2, source: "template" };
653
653
  });
654
654
  };
655
- var parseEnvFile = (filePath) => Effect.gen(function* () {
656
- const fs = yield* FileSystem.FileSystem;
657
- const symlink = yield* fs.readLink(filePath).pipe(
658
- Effect.map(() => true),
659
- Effect.catchAll(() => Effect.succeed(false))
660
- );
661
- if (symlink) return {};
662
- const content = yield* fs.readFileString(filePath).pipe(Effect.catchAll(() => Effect.succeed(null)));
663
- if (content === null) return {};
664
- const vars = {};
665
- for (const line of content.split("\n")) {
666
- const trimmed = line.trim();
667
- if (!trimmed || trimmed.startsWith("#")) continue;
668
- const eqIndex = trimmed.indexOf("=");
669
- if (eqIndex === -1) continue;
670
- const key = trimmed.slice(0, eqIndex).trim();
671
- let value = trimmed.slice(eqIndex + 1).trim();
672
- const isDoubleQuoted = value.length >= 2 && value[0] === '"' && value[value.length - 1] === '"';
673
- const isSingleQuoted = value.length >= 2 && value[0] === "'" && value[value.length - 1] === "'";
674
- if (isDoubleQuoted || isSingleQuoted) {
675
- value = value.slice(1, -1);
676
- }
677
- if (isDoubleQuoted) {
678
- value = value.replace(/\\([nrt\\])/g, (_, ch) => {
679
- const escapes = {
680
- n: "\n",
681
- r: "\r",
682
- t: " ",
683
- "\\": "\\"
684
- };
685
- return escapes[ch] ?? ch;
686
- });
687
- }
688
- vars[key] = value;
689
- }
690
- return vars;
691
- });
692
- var resolveEnv = (repoDir) => Effect.gen(function* () {
693
- const configDir = join(repoDir, CONFIG_DIR);
694
- const envPath = join(configDir, ".env");
695
- yield* Effect.tryPromise({
696
- try: () => assertNoSymlinkComponents(repoDir, envPath, "environment file"),
697
- catch: (e) => new ConfigDirError({
698
- message: `Refusing symlinked environment path: ${e instanceof Error ? e.message : String(e)}`
699
- })
700
- });
701
- const shipyardEnv = yield* parseEnvFile(envPath);
702
- const result3 = {};
703
- for (const key of Object.keys(shipyardEnv)) {
704
- const value = shipyardEnv[key] ?? process.env[key];
705
- if (value !== void 0) {
706
- result3[key] = value;
707
- }
708
- }
709
- return result3;
710
- });
711
655
 
712
656
  // src/mergeProviderEnv.ts
713
657
  var mergeProviderEnv = (options) => {