@north-light/cli 0.3.582 → 0.3.583

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.
@@ -7,4 +7,4 @@ ${t.filter(s=>!n.split(`
7
7
  `).map(l=>l.trim()).includes(s)).join(`
8
8
  `)}
9
9
  `)}catch{}}o(le,"seedExclude");async function Ce(e){await _(e.repo_root,async()=>{const a=await i(["rev-parse","--verify",`refs/heads/${e.branch}`],e.repo_root);if(a.status!==0||a.stdout.trim()!==e.base_sha)return;const r=await i(["worktree","list","--porcelain"],e.repo_root);if(r.status===0){if(r.stdout.split(`
10
- `).some(n=>n.trim()===`branch refs/heads/${e.branch}`)){if((await i(["worktree","remove","--force",e.path],e.repo_root)).status!==0)return}else if(p(e.path))try{N(e.path,{recursive:!0,force:!0})}catch{return}await i(["update-ref","-d",`refs/heads/${e.branch}`,e.base_sha],e.repo_root)}})}o(Ce,"rollbackManagedWorktreeAsync");async function Le(e,a,r="main"){const n=await h(e,["rev-parse","--show-toplevel"],"not_git_repo","Pass --cwd <real repo> pointing inside a git repository.");if(ae(n))throw new c("managed_worktree_base",`cwd ${n} is a managed worktree and cannot be used as a managed worktree base`,"Pass `--cwd` pointing at the repository\u2019s primary checkout and keep `--worktree` set to the desired existing local base branch, including the parent branch.");const t=await L(n);return W(M(t),async()=>{const s=await $(n,r),l=oe(a),u=`crtr/${a}`;if(p(l))throw new c("worktree_path_exists",`managed worktree path already exists: ${l}`,"Remove the stale path or choose a fresh node id.");if((await i(["show-ref","--verify","--quiet",`refs/heads/${u}`],n)).status===0)throw new c("worktree_branch_exists",`managed worktree branch already exists: ${u}`,"Remove the stale branch or choose a fresh node id.");const b={state:"open",path:l,branch:u,repo_root:n,base_ref:r,base_sha:s,created:new Date().toISOString()};await h(n,["branch",u,s],"worktree_branch_create_failed","Inspect the git error, fix the repository/worktree state, then retry spawning with --worktree.");const f=await i(["worktree","add",l,u],n);if(f.status!==0)throw await i(["update-ref","-d",`refs/heads/${u}`,s],n),new c("worktree_add_failed","git worktree add failed","Inspect the git error, fix the repository/worktree state, then retry spawning with --worktree.",v(f));return le(n,t),b},{timeoutMs:C(),timeoutError:o(()=>new c("worktree_lock_timeout",`timed out waiting to create a managed worktree in ${t}`,"Wait for the other managed-worktree operation to finish, then retry."),"timeoutError")})}o(Le,"createManagedWorktreeAsync");async function P(e){if(e.state!=="open"||!p(e.path))return null;const a=await i(["rev-parse","--abbrev-ref","HEAD"],e.path),r=await i(["status","--porcelain"],e.path),n=await i(["rev-parse","HEAD"],e.path);if(a.status!==0||a.stdout.trim()!==e.branch||r.status!==0||r.stdout.trim()!==""||n.status!==0)return null;const t=await i(["rev-parse","--git-path","rebase-merge"],e.path);return t.status!==0||p(t.stdout.trim())?null:n.stdout.trim()}o(P,"cleanTip");async function F(e,a){try{const r=await $(e.path,e.base_ref);return(await i(["merge-base","--is-ancestor",a,r],e.path)).status===0}catch(r){if(r instanceof c&&r.code==="missing_base_branch"&&a===e.base_sha)return!0;throw r}}o(F,"containedInLocalBase");function de(e){return{node_id:"",branch:e.branch,worktree_path:e.path,worktree_removed:!1,worktree_remove_error:`cleanup pending: the caller checkout at ${e.path} remains intact.`,branch_deleted:!1,branch_delete_error:`cleanup pending: local branch ${e.branch} remains checked out at ${e.path}.`}}o(de,"deferred");async function R(e){if(e.state!=="open"||p(e.path))return null;const a=`refs/heads/${e.branch}`,r=await i(["show-ref","--verify","--quiet",a],e.repo_root);if(r.status===1&&r.executionFailed!==!0)return{branchSha:null};if(r.status!==0)return null;const n=await i(["rev-parse","--verify",a],e.repo_root);if(n.status!==0)return null;const t=n.stdout.trim(),s=await i(["worktree","list","--porcelain"],e.repo_root);if(s.status!==0||re(s.stdout,e.branch)!==null)return null;const l=await ie(e.repo_root,e,t);return l===null?null:{branchSha:t,containment:l}}o(R,"proveAbsentPathManagedWorktree");async function pe(e,a,r){return p(a.path)?null:r.branchSha===null?(await k(e,a,"complete"),{node_id:e,branch:a.branch,worktree_path:a.path,worktree_removed:!0,branch_deleted:!0}):r.containment===void 0?null:(await k(e,a,"complete"),{node_id:e,branch:a.branch,worktree_path:a.path,worktree_removed:!0,branch_deleted:!1,branch_delete_error:`local branch ${a.branch} is delivered but retained because its checkout status can change outside crtr's repository lock.`})}o(pe,"autoDropAbsentPathManagedWorktreeLocked");async function fe(e){const a=(await m(e))?.managed_worktree;return a==null||a.state!=="open"||p(a.path)||await R(a)===null?null:_(a.repo_root,async()=>{const r=(await m(e))?.managed_worktree;if(r==null||r.state!=="open")return null;const n=await R(r);if(n===null)return null;const t=await pe(e,r,n);return t===null?null:{dropped:t,landedSha:n.branchSha??r.base_sha}})}o(fe,"concludeAbsentManagedWorktreeAsync");async function Pe(e){const a=(await m(e))?.managed_worktree;if(a==null||a.state!=="open")return null;if(!p(a.path))return(await fe(e))?.dropped??null;const r=await P(a);return r===null||!await F(a,r)?null:_(a.path,async()=>{const n=(await m(e))?.managed_worktree;if(n==null||n.state!=="open")return null;const t=await P(n);return t===null||t!==r||!await F(n,t)?null:(await k(e,n,"pending"),{...de(n),node_id:e})})}o(Pe,"autoDropCleanManagedWorktreeAsync");async function T(e){for(const a of["rebase-merge","rebase-apply"]){const r=await i(["rev-parse","--git-path",a],e);if(r.status!==0||p(r.stdout.trim()))return!0}return!1}o(T,"rebaseInProgress");async function y(e,a,r,n,t,s=a.branch){await U(e,{cwd:a.repo_root,abandoned:{branch:s,tip_sha:r,at:n,by:t}})}o(y,"persistAbandoned");async function Fe(e,a){const r=(await m(e))?.managed_worktree;if(r==null||r.state!=="open")throw new c("no_managed_worktree",`node ${e} has no open managed worktree`,"Nothing to abandon for this node.");const n=[];try{return await _(r.path,()=>we(e,a,n))}finally{await ce(r.path,n[0])}}o(Fe,"abandonManagedWorktreeAsync");async function g(e,a){const{result:r,trash:n}=await he(e.repo_root,e.path);if(n!==void 0&&a.push(n),r.status!==0)throw new c("worktree_remove_failed",`git worktree remove ${e.path} failed`,"Inspect the worktree manually, then retry.",v(r))}o(g,"removeCheckout");async function we(e,a,r){const n=await m(e),t=n?.managed_worktree;if(n===null||t===void 0||t===null||t.state!=="open")throw new c("no_managed_worktree",`node ${e} has no open managed worktree`,"Nothing to abandon for this node.");if(n.status==="active"||n.status==="idle"||X(n.pi_pid))throw new c("node_running",`node ${e} is still running`,"Abandon requires a stopped node with no live broker process. From the running owner, use `crtr node worktree close` to land locally, or make the checkout clean, push its current tip to origin, and rerun `crtr push final`.");if(!p(t.path))throw new c("worktree_missing",`managed worktree path is missing: ${t.path}`,"Inspect the branch and worktree registration, then retry.");const s=await h(t.path,["rev-parse","--abbrev-ref","HEAD"],"branch_check_failed","Inspect the worktree manually, then retry."),l=await i(["show-ref","--verify","--quiet",`refs/heads/${t.branch}`],t.path);if(s!==t.branch){if(l.status===0||s==="HEAD")throw new c("wrong_branch",`managed worktree is not on its recorded branch (expected ${t.branch}, found ${s==="HEAD"?"detached HEAD":s})`,`Inspect ${t.path}, then rerun \`crtr node worktree abandon\`.`);if(await T(t.path)||await h(t.path,["status","--porcelain"],"status_failed","Inspect the worktree manually, then retry.")!=="")throw new c("dirty_worktree","managed worktree has uncommitted changes",`Commit or stash them in ${t.path}, then rerun \`crtr node worktree abandon\`.`);const d=await h(t.path,["rev-parse","HEAD"],"abandon_tip_failed","Inspect the worktree manually, then retry.");await g(t,r);const w=new Date().toISOString();return await y(e,t,d,w,a,s),{node_id:e,branch:s,tip_sha:d,worktree_path:t.path,branch_deleted:!1}}const u=await h(t.path,["rev-parse","HEAD"],"abandon_tip_failed","Inspect the branch manually, then retry.");let b=null;try{const d=await $(t.path,t.base_ref);(await i(["merge-base","--is-ancestor",u,d],t.path)).status===0&&(b=d)}catch(d){if(!(d instanceof c)||d.code!=="missing_base_branch")throw d}const f=new Date().toISOString(),H=await h(t.path,["status","--porcelain"],"status_failed","Inspect the worktree manually, then retry.");if(b!==null&&u===t.base_sha){const d=await h(t.repo_root,["rev-parse",`${u}^{tree}`],"abandon_tree_failed","Inspect the branch manually, then retry."),w=await h(t.repo_root,["-c","user.name=crtr-abandon","-c","user.email=crtr-abandon@localhost","commit-tree",d,"-p",u,"-m","crtr-abandon","-m",`Crtr-Abandon: ${e} ${f}`],"abandon_commit_failed","Inspect the branch manually, then retry.");return await h(t.repo_root,["update-ref",`refs/heads/${t.branch}`,w,u],"abandon_marker_failed","The branch changed while abandon was starting; inspect the worktree, then retry."),await g(t,r),(await i(["update-ref","--stdin"],t.repo_root,se(t.branch,w,`refs/heads/${t.base_ref}`,b))).status===0?(await k(e,t,"complete"),{node_id:e,branch:t.branch,tip_sha:w,worktree_path:t.path,branch_deleted:!0}):(await y(e,t,w,f,a),{node_id:e,branch:t.branch,tip_sha:w,worktree_path:t.path,branch_deleted:!1})}if(!await T(t.path)&&H==="")return await g(t,r),await y(e,t,u,f,a),{node_id:e,branch:t.branch,tip_sha:u,worktree_path:t.path,branch_deleted:!1};await h(t.path,["add","--all"],"abandon_stage_failed","Inspect the worktree manually, then retry."),await h(t.path,["-c","user.name=crtr-abandon","-c","user.email=crtr-abandon@localhost","commit","--allow-empty","-m","crtr-abandon","-m",`Crtr-Abandon: ${e} ${f}`],"abandon_commit_failed","Inspect the worktree manually, then retry.");const A=await h(t.path,["rev-parse","HEAD"],"abandon_tip_failed","Inspect the branch manually, then retry.");return await g(t,r),await y(e,t,A,f,a),{node_id:e,branch:t.branch,tip_sha:A,worktree_path:t.path,branch_deleted:!1}}o(we,"abandonLocked");export{Fe as abandonManagedWorktreeAsync,Me as admitIntoManagedCheckout,Pe as autoDropCleanManagedWorktreeAsync,fe as concludeAbsentManagedWorktreeAsync,Le as createManagedWorktreeAsync,Ce as rollbackManagedWorktreeAsync};
10
+ `).some(n=>n.trim()===`branch refs/heads/${e.branch}`)){if((await i(["worktree","remove","--force",e.path],e.repo_root)).status!==0)return}else if(p(e.path))try{N(e.path,{recursive:!0,force:!0})}catch{return}await i(["update-ref","-d",`refs/heads/${e.branch}`,e.base_sha],e.repo_root)}})}o(Ce,"rollbackManagedWorktreeAsync");async function Le(e,a,r="main"){const n=await h(e,["rev-parse","--show-toplevel"],"not_git_repo","Pass --cwd <real repo> pointing inside a git repository.");if(ae(n))throw new c("managed_worktree_base",`cwd ${n} is a managed worktree and cannot be used as a managed worktree base`,"Pass `--cwd` pointing at the repository\u2019s primary checkout and keep `--worktree` set to the desired existing local base branch, including the parent branch.");const t=await L(n);return W(M(t),async()=>{const s=await $(n,r),l=oe(a),u=`crtr/${a}`;if(p(l))throw new c("worktree_path_exists",`managed worktree path already exists: ${l}`,"Remove the stale path or choose a fresh node id.");if((await i(["show-ref","--verify","--quiet",`refs/heads/${u}`],n)).status===0)throw new c("worktree_branch_exists",`managed worktree branch already exists: ${u}`,"Remove the stale branch or choose a fresh node id.");const b={state:"open",path:l,branch:u,repo_root:n,base_ref:r,base_sha:s,created:new Date().toISOString()};await h(n,["branch",u,s],"worktree_branch_create_failed","Inspect the git error, fix the repository/worktree state, then retry spawning with --worktree.");const f=await i(["worktree","add",l,u],n);if(f.status!==0)throw await i(["update-ref","-d",`refs/heads/${u}`,s],n),new c("worktree_add_failed","git worktree add failed","Inspect the git error, fix the repository/worktree state, then retry spawning with --worktree.",v(f));return le(n,t),b},{timeoutMs:C(),timeoutError:o(()=>new c("worktree_lock_timeout",`timed out waiting to create a managed worktree in ${t}`,"Wait for the other managed-worktree operation to finish, then retry."),"timeoutError")})}o(Le,"createManagedWorktreeAsync");async function P(e){if(e.state!=="open"||!p(e.path))return null;const a=await i(["rev-parse","--abbrev-ref","HEAD"],e.path),r=await i(["status","--porcelain"],e.path),n=await i(["rev-parse","HEAD"],e.path);if(a.status!==0||a.stdout.trim()!==e.branch||r.status!==0||r.stdout.trim()!==""||n.status!==0)return null;const t=await i(["rev-parse","--git-path","rebase-merge"],e.path);return t.status!==0||p(t.stdout.trim())?null:n.stdout.trim()}o(P,"cleanTip");async function F(e,a){try{const r=await $(e.path,e.base_ref);return(await i(["merge-base","--is-ancestor",a,r],e.path)).status===0}catch(r){if(r instanceof c&&r.code==="missing_base_branch")return a===e.base_sha;throw r}}o(F,"containedInLocalBase");function de(e){return{node_id:"",branch:e.branch,worktree_path:e.path,worktree_removed:!1,worktree_remove_error:`cleanup pending: the caller checkout at ${e.path} remains intact.`,branch_deleted:!1,branch_delete_error:`cleanup pending: local branch ${e.branch} remains checked out at ${e.path}.`}}o(de,"deferred");async function R(e){if(e.state!=="open"||p(e.path))return null;const a=`refs/heads/${e.branch}`,r=await i(["show-ref","--verify","--quiet",a],e.repo_root);if(r.status===1&&r.executionFailed!==!0)return{branchSha:null};if(r.status!==0)return null;const n=await i(["rev-parse","--verify",a],e.repo_root);if(n.status!==0)return null;const t=n.stdout.trim(),s=await i(["worktree","list","--porcelain"],e.repo_root);if(s.status!==0||re(s.stdout,e.branch)!==null)return null;const l=await ie(e.repo_root,e,t);return l===null?null:{branchSha:t,containment:l}}o(R,"proveAbsentPathManagedWorktree");async function pe(e,a,r){return p(a.path)?null:r.branchSha===null?(await k(e,a,"complete"),{node_id:e,branch:a.branch,worktree_path:a.path,worktree_removed:!0,branch_deleted:!0}):r.containment===void 0?null:(await k(e,a,"complete"),{node_id:e,branch:a.branch,worktree_path:a.path,worktree_removed:!0,branch_deleted:!1,branch_delete_error:`local branch ${a.branch} is delivered but retained because its checkout status can change outside crtr's repository lock.`})}o(pe,"autoDropAbsentPathManagedWorktreeLocked");async function fe(e){const a=(await m(e))?.managed_worktree;return a==null||a.state!=="open"||p(a.path)||await R(a)===null?null:_(a.repo_root,async()=>{const r=(await m(e))?.managed_worktree;if(r==null||r.state!=="open")return null;const n=await R(r);if(n===null)return null;const t=await pe(e,r,n);return t===null?null:{dropped:t,landedSha:n.branchSha??r.base_sha}})}o(fe,"concludeAbsentManagedWorktreeAsync");async function Pe(e){const a=(await m(e))?.managed_worktree;if(a==null||a.state!=="open")return null;if(!p(a.path))return(await fe(e))?.dropped??null;const r=await P(a);return r===null||!await F(a,r)?null:_(a.path,async()=>{const n=(await m(e))?.managed_worktree;if(n==null||n.state!=="open")return null;const t=await P(n);return t===null||t!==r||!await F(n,t)?null:(await k(e,n,"pending"),{...de(n),node_id:e})})}o(Pe,"autoDropCleanManagedWorktreeAsync");async function T(e){for(const a of["rebase-merge","rebase-apply"]){const r=await i(["rev-parse","--git-path",a],e);if(r.status!==0||p(r.stdout.trim()))return!0}return!1}o(T,"rebaseInProgress");async function y(e,a,r,n,t,s=a.branch){await U(e,{cwd:a.repo_root,abandoned:{branch:s,tip_sha:r,at:n,by:t}})}o(y,"persistAbandoned");async function Fe(e,a){const r=(await m(e))?.managed_worktree;if(r==null||r.state!=="open")throw new c("no_managed_worktree",`node ${e} has no open managed worktree`,"Nothing to abandon for this node.");const n=[];try{return await _(r.path,()=>we(e,a,n))}finally{await ce(r.path,n[0])}}o(Fe,"abandonManagedWorktreeAsync");async function g(e,a){const{result:r,trash:n}=await he(e.repo_root,e.path);if(n!==void 0&&a.push(n),r.status!==0)throw new c("worktree_remove_failed",`git worktree remove ${e.path} failed`,"Inspect the worktree manually, then retry.",v(r))}o(g,"removeCheckout");async function we(e,a,r){const n=await m(e),t=n?.managed_worktree;if(n===null||t===void 0||t===null||t.state!=="open")throw new c("no_managed_worktree",`node ${e} has no open managed worktree`,"Nothing to abandon for this node.");if(n.status==="active"||n.status==="idle"||X(n.pi_pid))throw new c("node_running",`node ${e} is still running`,"Abandon requires a stopped node with no live broker process. From the running owner, use `crtr node worktree close` to land locally, or make the checkout clean, push its current tip to origin, and rerun `crtr push final`.");if(!p(t.path))throw new c("worktree_missing",`managed worktree path is missing: ${t.path}`,"Inspect the branch and worktree registration, then retry.");const s=await h(t.path,["rev-parse","--abbrev-ref","HEAD"],"branch_check_failed","Inspect the worktree manually, then retry."),l=await i(["show-ref","--verify","--quiet",`refs/heads/${t.branch}`],t.path);if(s!==t.branch){if(l.status===0||s==="HEAD")throw new c("wrong_branch",`managed worktree is not on its recorded branch (expected ${t.branch}, found ${s==="HEAD"?"detached HEAD":s})`,`Inspect ${t.path}, then rerun \`crtr node worktree abandon\`.`);if(await T(t.path)||await h(t.path,["status","--porcelain"],"status_failed","Inspect the worktree manually, then retry.")!=="")throw new c("dirty_worktree","managed worktree has uncommitted changes",`Commit or stash them in ${t.path}, then rerun \`crtr node worktree abandon\`.`);const d=await h(t.path,["rev-parse","HEAD"],"abandon_tip_failed","Inspect the worktree manually, then retry.");await g(t,r);const w=new Date().toISOString();return await y(e,t,d,w,a,s),{node_id:e,branch:s,tip_sha:d,worktree_path:t.path,branch_deleted:!1}}const u=await h(t.path,["rev-parse","HEAD"],"abandon_tip_failed","Inspect the branch manually, then retry.");let b=null;try{const d=await $(t.path,t.base_ref);(await i(["merge-base","--is-ancestor",u,d],t.path)).status===0&&(b=d)}catch(d){if(!(d instanceof c)||d.code!=="missing_base_branch")throw d}const f=new Date().toISOString(),H=await h(t.path,["status","--porcelain"],"status_failed","Inspect the worktree manually, then retry.");if(b!==null&&u===t.base_sha){const d=await h(t.repo_root,["rev-parse",`${u}^{tree}`],"abandon_tree_failed","Inspect the branch manually, then retry."),w=await h(t.repo_root,["-c","user.name=crtr-abandon","-c","user.email=crtr-abandon@localhost","commit-tree",d,"-p",u,"-m","crtr-abandon","-m",`Crtr-Abandon: ${e} ${f}`],"abandon_commit_failed","Inspect the branch manually, then retry.");return await h(t.repo_root,["update-ref",`refs/heads/${t.branch}`,w,u],"abandon_marker_failed","The branch changed while abandon was starting; inspect the worktree, then retry."),await g(t,r),(await i(["update-ref","--stdin"],t.repo_root,se(t.branch,w,`refs/heads/${t.base_ref}`,b))).status===0?(await k(e,t,"complete"),{node_id:e,branch:t.branch,tip_sha:w,worktree_path:t.path,branch_deleted:!0}):(await y(e,t,w,f,a),{node_id:e,branch:t.branch,tip_sha:w,worktree_path:t.path,branch_deleted:!1})}if(!await T(t.path)&&H==="")return await g(t,r),await y(e,t,u,f,a),{node_id:e,branch:t.branch,tip_sha:u,worktree_path:t.path,branch_deleted:!1};await h(t.path,["add","--all"],"abandon_stage_failed","Inspect the worktree manually, then retry."),await h(t.path,["-c","user.name=crtr-abandon","-c","user.email=crtr-abandon@localhost","commit","--allow-empty","-m","crtr-abandon","-m",`Crtr-Abandon: ${e} ${f}`],"abandon_commit_failed","Inspect the worktree manually, then retry.");const A=await h(t.path,["rev-parse","HEAD"],"abandon_tip_failed","Inspect the branch manually, then retry.");return await g(t,r),await y(e,t,A,f,a),{node_id:e,branch:t.branch,tip_sha:A,worktree_path:t.path,branch_deleted:!1}}o(we,"abandonLocked");export{Fe as abandonManagedWorktreeAsync,Me as admitIntoManagedCheckout,Pe as autoDropCleanManagedWorktreeAsync,fe as concludeAbsentManagedWorktreeAsync,Le as createManagedWorktreeAsync,Ce as rollbackManagedWorktreeAsync};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/cli",
3
- "version": "0.3.582",
3
+ "version": "0.3.583",
4
4
  "description": "crtr — agent runtime with memory, plugins, and marketplaces",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -145,7 +145,7 @@
145
145
  },
146
146
  "license": "UNLICENSED",
147
147
  "dependencies": {
148
- "@north-light/identity": "0.3.582",
148
+ "@north-light/identity": "0.3.583",
149
149
  "@earendil-works/chord": "1.1.0",
150
150
  "@earendil-works/pi-agent-core": "1.1.0",
151
151
  "@earendil-works/pi-ai": "1.1.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/identity",
3
- "version": "0.3.582",
3
+ "version": "0.3.583",
4
4
  "description": "Northlight access-token verification and scope rules",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/runtime.lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@north-light/cli",
3
- "version": "0.3.582",
3
+ "version": "0.3.583",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@north-light/cli",
9
- "version": "0.3.582",
9
+ "version": "0.3.583",
10
10
  "hasInstallScript": true,
11
11
  "license": "UNLICENSED",
12
12
  "workspaces": [
@@ -28,7 +28,7 @@
28
28
  "@milkdown/preset-gfm": "^7.22.3",
29
29
  "@milkdown/prose": "^7.22.3",
30
30
  "@milkdown/utils": "^7.22.3",
31
- "@north-light/identity": "0.3.582",
31
+ "@north-light/identity": "0.3.583",
32
32
  "cron-parser": "^5.6.0",
33
33
  "esbuild": "^0.27.7",
34
34
  "jose": "^6.2.12",
@@ -11956,17 +11956,17 @@
11956
11956
  },
11957
11957
  "packages/crouter-api": {
11958
11958
  "name": "@north-light/api",
11959
- "version": "0.3.582",
11959
+ "version": "0.3.583",
11960
11960
  "license": "UNLICENSED"
11961
11961
  },
11962
11962
  "packages/crouter-env-docker": {
11963
11963
  "name": "@north-light/env-docker",
11964
- "version": "0.3.582",
11964
+ "version": "0.3.583",
11965
11965
  "license": "UNLICENSED"
11966
11966
  },
11967
11967
  "packages/crouter-identity": {
11968
11968
  "name": "@north-light/identity",
11969
- "version": "0.3.582",
11969
+ "version": "0.3.583",
11970
11970
  "license": "UNLICENSED",
11971
11971
  "dependencies": {
11972
11972
  "jose": "^6.2.1"
@@ -11974,21 +11974,21 @@
11974
11974
  },
11975
11975
  "packages/crouter-plugin": {
11976
11976
  "name": "@north-light/plugin",
11977
- "version": "0.3.582",
11977
+ "version": "0.3.583",
11978
11978
  "license": "UNLICENSED",
11979
11979
  "dependencies": {
11980
- "@north-light/api": "0.3.582",
11981
- "@north-light/identity": "0.3.582"
11980
+ "@north-light/api": "0.3.583",
11981
+ "@north-light/identity": "0.3.583"
11982
11982
  }
11983
11983
  },
11984
11984
  "packages/crouter-sdk": {
11985
11985
  "name": "@north-light/sdk",
11986
- "version": "0.3.582",
11986
+ "version": "0.3.583",
11987
11987
  "license": "UNLICENSED",
11988
11988
  "dependencies": {
11989
- "@north-light/api": "0.3.582",
11990
- "@north-light/identity": "0.3.582",
11991
- "@north-light/plugin": "0.3.582",
11989
+ "@north-light/api": "0.3.583",
11990
+ "@north-light/identity": "0.3.583",
11991
+ "@north-light/plugin": "0.3.583",
11992
11992
  "jose": "^6.2.1"
11993
11993
  },
11994
11994
  "bin": {
@@ -42,7 +42,8 @@ if [ ! -f "$RELEASE_DIR/.complete" ]; then
42
42
  rm -rf "$tmp"
43
43
  trap - EXIT
44
44
  fi
45
- ln -sfn "$RELEASE_DIR" "$ROOT/current.new" && mv -T "$ROOT/current.new" "$ROOT/current"
45
+ current_tmp="$ROOT/current.new.$$"
46
+ ln -sfn "$RELEASE_DIR" "$current_tmp" && mv -T "$current_tmp" "$ROOT/current"
46
47
  # Keep the three newest releases (the current one among them).
47
48
  ls -1t "$RELEASES" 2>/dev/null | grep -v '^\.' | tail -n +4 | while read -r old; do
48
49
  [ "$old" = "$CRTR_RELEASE" ] || rm -rf "${RELEASES:?}/$old"