@adelie/server 0.0.0-stage → 0.5.0
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/LICENSE +201 -0
- package/README.md +53 -2
- package/dist/api/types.d.ts +6195 -0
- package/dist/api/types.js +10 -0
- package/dist/api/types.js.map +1 -0
- package/dist/auth-token.d.ts +50 -0
- package/dist/auth-token.js +55 -0
- package/dist/auth-token.js.map +1 -0
- package/dist/chunk-B5IP37ZQ.js +56 -0
- package/dist/chunk-B5IP37ZQ.js.map +1 -0
- package/dist/chunk-BQZC56BR.js +78 -0
- package/dist/chunk-BQZC56BR.js.map +1 -0
- package/dist/chunk-C2S2LVQ7.js +14 -0
- package/dist/chunk-C2S2LVQ7.js.map +1 -0
- package/dist/chunk-CXGWSWJA.js +485 -0
- package/dist/chunk-CXGWSWJA.js.map +1 -0
- package/dist/chunk-GO6G445C.js +83 -0
- package/dist/chunk-GO6G445C.js.map +1 -0
- package/dist/chunk-HMTT2PX4.js +93 -0
- package/dist/chunk-HMTT2PX4.js.map +1 -0
- package/dist/chunk-IZEMORXV.js +16 -0
- package/dist/chunk-IZEMORXV.js.map +1 -0
- package/dist/chunk-K4ZSUT72.js +34 -0
- package/dist/chunk-K4ZSUT72.js.map +1 -0
- package/dist/chunk-WPYTS7TI.js +178 -0
- package/dist/chunk-WPYTS7TI.js.map +1 -0
- package/dist/chunk-ZZUQGQD6.js +954 -0
- package/dist/chunk-ZZUQGQD6.js.map +1 -0
- package/dist/hmr/manifest.d.ts +1 -0
- package/dist/hmr/manifest.js +16 -0
- package/dist/hmr/manifest.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +81551 -0
- package/dist/index.js.map +1 -0
- package/dist/initial-password.d.ts +14 -0
- package/dist/initial-password.js +12 -0
- package/dist/initial-password.js.map +1 -0
- package/dist/install.ps1 +492 -0
- package/dist/install.sh +494 -0
- package/dist/lock.d.ts +26 -0
- package/dist/lock.js +20 -0
- package/dist/lock.js.map +1 -0
- package/dist/machine-status.d.ts +18 -0
- package/dist/machine-status.js +38 -0
- package/dist/machine-status.js.map +1 -0
- package/dist/plugin/index.d.ts +3002 -0
- package/dist/plugin/index.js +1 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/reset-admin-password.d.ts +25 -0
- package/dist/reset-admin-password.js +45 -0
- package/dist/reset-admin-password.js.map +1 -0
- package/dist/secret-file.d.ts +3 -0
- package/dist/secret-file.js +19 -0
- package/dist/secret-file.js.map +1 -0
- package/dist/version-report.d.ts +12 -0
- package/dist/version-report.js +9 -0
- package/dist/version-report.js.map +1 -0
- package/package.json +106 -3
- package/web-dist/adelie-icon.svg +46 -0
- package/web-dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/web-dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/web-dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/web-dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/web-dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/web-dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/web-dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/web-dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/web-dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/web-dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/web-dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/web-dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/web-dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/web-dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/web-dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/web-dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/web-dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/web-dist/assets/KaTeX_Size3-Regular-gV2CO0n9.woff2 +0 -0
- package/web-dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/web-dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/web-dist/assets/addon-clipboard-BU5GZsef.js +1 -0
- package/web-dist/assets/addon-fit-B_mXSH9E.js +1 -0
- package/web-dist/assets/addon-web-links-CrIdpbXy.js +1 -0
- package/web-dist/assets/c-BG-tZi7o.js +1 -0
- package/web-dist/assets/c-BIGW1oBm.js +1 -0
- package/web-dist/assets/cpp-CaeG3uDQ.js +1 -0
- package/web-dist/assets/cpp-DIPi6g--.js +1 -0
- package/web-dist/assets/css-Br67jR8j.js +1 -0
- package/web-dist/assets/css-CLj8gQPS.js +1 -0
- package/web-dist/assets/diff-D97Zzqfu.js +1 -0
- package/web-dist/assets/diff-jW5kmiru.js +1 -0
- package/web-dist/assets/github-dark-BQV5ugrc.js +1 -0
- package/web-dist/assets/github-dark-DHJKELXO.js +1 -0
- package/web-dist/assets/github-light-DAi9KRSo.js +1 -0
- package/web-dist/assets/github-light-Rcb2q3L5.js +1 -0
- package/web-dist/assets/go-B7VTfpnm.js +1 -0
- package/web-dist/assets/go-C27-OAKa.js +1 -0
- package/web-dist/assets/highlighter-BDxr2Reu.js +2 -0
- package/web-dist/assets/highlighter-core-C91BgiW7.js +152 -0
- package/web-dist/assets/highlighter.worker-CPvC3l9a.js +152 -0
- package/web-dist/assets/html-BW_6VhB7.js +1 -0
- package/web-dist/assets/html-pp8916En.js +1 -0
- package/web-dist/assets/ibm-plex-sans-condensed-latin-600-normal-CRd5VyFf.woff2 +0 -0
- package/web-dist/assets/ibm-plex-sans-condensed-latin-ext-600-normal-CBdNZ9Ci.woff2 +0 -0
- package/web-dist/assets/ibm-plex-sans-latin-ext-wght-normal-CIII54If.woff2 +0 -0
- package/web-dist/assets/ibm-plex-sans-latin-wght-normal-IvpUvPa2.woff2 +0 -0
- package/web-dist/assets/index-By5tJCWt.js +1080 -0
- package/web-dist/assets/index-DU13e4im.css +1 -0
- package/web-dist/assets/ini-BEwlwnbL.js +1 -0
- package/web-dist/assets/ini-Dix3pTmg.js +1 -0
- package/web-dist/assets/java-BTDmaRNO.js +1 -0
- package/web-dist/assets/java-CylS5w8V.js +1 -0
- package/web-dist/assets/javascript-WyGyM1wV.js +1 -0
- package/web-dist/assets/javascript-wDzz0qaB.js +1 -0
- package/web-dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/web-dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/web-dist/assets/json-B8JryHcM.js +1 -0
- package/web-dist/assets/json-Cp-IABpG.js +1 -0
- package/web-dist/assets/jsx-8cLv2Six.js +1 -0
- package/web-dist/assets/jsx-g9-lgVsj.js +1 -0
- package/web-dist/assets/log-2UxHyX5q.js +1 -0
- package/web-dist/assets/log-CcaF_xNv.js +1 -0
- package/web-dist/assets/markdown-Cvjx9yec.js +1 -0
- package/web-dist/assets/markdown-DX-TNHnc.js +1 -0
- package/web-dist/assets/misans-400-100-DHkMCix2.woff2 +0 -0
- package/web-dist/assets/misans-400-101-CwgSLsmc.woff2 +0 -0
- package/web-dist/assets/misans-400-102-BQgefHPQ.woff2 +0 -0
- package/web-dist/assets/misans-400-103-CP58Mc_T.woff2 +0 -0
- package/web-dist/assets/misans-400-104-Ta_Xu1gd.woff2 +0 -0
- package/web-dist/assets/misans-400-105-CDop11AR.woff2 +0 -0
- package/web-dist/assets/misans-400-106-Dv8y0ubk.woff2 +0 -0
- package/web-dist/assets/misans-400-107-CjnHtp9E.woff2 +0 -0
- package/web-dist/assets/misans-400-108-BA8nQUBw.woff2 +0 -0
- package/web-dist/assets/misans-400-109-B6uEN0pG.woff2 +0 -0
- package/web-dist/assets/misans-400-110-BQqnShrY.woff2 +0 -0
- package/web-dist/assets/misans-400-111-CHB-Jj5X.woff2 +0 -0
- package/web-dist/assets/misans-400-112-D1dh4Cjx.woff2 +0 -0
- package/web-dist/assets/misans-400-113-Bw_wNCFp.woff2 +0 -0
- package/web-dist/assets/misans-400-114-CUb-5IzE.woff2 +0 -0
- package/web-dist/assets/misans-400-115-BICOatsO.woff2 +0 -0
- package/web-dist/assets/misans-400-116-B3_gmYW6.woff2 +0 -0
- package/web-dist/assets/misans-400-117-B8k_y3cv.woff2 +0 -0
- package/web-dist/assets/misans-400-118-C-2Cf5C6.woff2 +0 -0
- package/web-dist/assets/misans-400-119-CmLP7xnX.woff2 +0 -0
- package/web-dist/assets/misans-400-21-DsSSD_Zj.woff2 +0 -0
- package/web-dist/assets/misans-400-22-rtkxWOv4.woff2 +0 -0
- package/web-dist/assets/misans-400-23-CDDB4M1H.woff2 +0 -0
- package/web-dist/assets/misans-400-24-Dqf_XeOL.woff2 +0 -0
- package/web-dist/assets/misans-400-25-C4U1tJ5J.woff2 +0 -0
- package/web-dist/assets/misans-400-26-CEXOK-nT.woff2 +0 -0
- package/web-dist/assets/misans-400-27-BrNOAScF.woff2 +0 -0
- package/web-dist/assets/misans-400-28-CPpEnCkG.woff2 +0 -0
- package/web-dist/assets/misans-400-29-C9JMVw8g.woff2 +0 -0
- package/web-dist/assets/misans-400-30-CD-QimXa.woff2 +0 -0
- package/web-dist/assets/misans-400-31-S4k06NbS.woff2 +0 -0
- package/web-dist/assets/misans-400-32-zRMBDkz6.woff2 +0 -0
- package/web-dist/assets/misans-400-33-sQ_tNZSM.woff2 +0 -0
- package/web-dist/assets/misans-400-34-8LEGljja.woff2 +0 -0
- package/web-dist/assets/misans-400-35-CxSPyuiU.woff2 +0 -0
- package/web-dist/assets/misans-400-36-BY1i4WtO.woff2 +0 -0
- package/web-dist/assets/misans-400-37-C0oF42pu.woff2 +0 -0
- package/web-dist/assets/misans-400-38-y7xcB90w.woff2 +0 -0
- package/web-dist/assets/misans-400-39-C307YgZx.woff2 +0 -0
- package/web-dist/assets/misans-400-40-ByZr736f.woff2 +0 -0
- package/web-dist/assets/misans-400-41-ChKEw5zV.woff2 +0 -0
- package/web-dist/assets/misans-400-42-CD__zJu5.woff2 +0 -0
- package/web-dist/assets/misans-400-43-CqNV6_TG.woff2 +0 -0
- package/web-dist/assets/misans-400-44-zE-akmW8.woff2 +0 -0
- package/web-dist/assets/misans-400-45-Du98otwc.woff2 +0 -0
- package/web-dist/assets/misans-400-46-B6JXbEy2.woff2 +0 -0
- package/web-dist/assets/misans-400-47-DpqW0kSq.woff2 +0 -0
- package/web-dist/assets/misans-400-48-BprON5Q_.woff2 +0 -0
- package/web-dist/assets/misans-400-49-N-ct3sN6.woff2 +0 -0
- package/web-dist/assets/misans-400-5-ton_4jCN.woff2 +0 -0
- package/web-dist/assets/misans-400-50-JgU49P0U.woff2 +0 -0
- package/web-dist/assets/misans-400-51-DSS3Moge.woff2 +0 -0
- package/web-dist/assets/misans-400-52-BMoXFmwE.woff2 +0 -0
- package/web-dist/assets/misans-400-53-BaLMGl4z.woff2 +0 -0
- package/web-dist/assets/misans-400-54-CaeSn3OR.woff2 +0 -0
- package/web-dist/assets/misans-400-55-BBqrtLxN.woff2 +0 -0
- package/web-dist/assets/misans-400-56-DAZ5BnbO.woff2 +0 -0
- package/web-dist/assets/misans-400-57-F-n3b0gI.woff2 +0 -0
- package/web-dist/assets/misans-400-58-DEUuPQAq.woff2 +0 -0
- package/web-dist/assets/misans-400-59-DXP5rhCL.woff2 +0 -0
- package/web-dist/assets/misans-400-6-DWCCUO_c.woff2 +0 -0
- package/web-dist/assets/misans-400-60-BE6IO6zJ.woff2 +0 -0
- package/web-dist/assets/misans-400-61-5Qb1gaxK.woff2 +0 -0
- package/web-dist/assets/misans-400-62-D_tJKNAj.woff2 +0 -0
- package/web-dist/assets/misans-400-63-hwmne8yB.woff2 +0 -0
- package/web-dist/assets/misans-400-64-BGedxReM.woff2 +0 -0
- package/web-dist/assets/misans-400-65-BaKPsugb.woff2 +0 -0
- package/web-dist/assets/misans-400-66-IdaOMzCz.woff2 +0 -0
- package/web-dist/assets/misans-400-67-BdWyS83H.woff2 +0 -0
- package/web-dist/assets/misans-400-68-DrZ_1swq.woff2 +0 -0
- package/web-dist/assets/misans-400-69-B3jsSD92.woff2 +0 -0
- package/web-dist/assets/misans-400-70-D6UZI2Ua.woff2 +0 -0
- package/web-dist/assets/misans-400-71-HFxyMCYg.woff2 +0 -0
- package/web-dist/assets/misans-400-72-CP5A-yQP.woff2 +0 -0
- package/web-dist/assets/misans-400-73-BoD_bu6s.woff2 +0 -0
- package/web-dist/assets/misans-400-74-CbJlhZlZ.woff2 +0 -0
- package/web-dist/assets/misans-400-75-BsbWuELX.woff2 +0 -0
- package/web-dist/assets/misans-400-76-DkwiQhof.woff2 +0 -0
- package/web-dist/assets/misans-400-77-6pVHXHnF.woff2 +0 -0
- package/web-dist/assets/misans-400-78-CfUF6pih.woff2 +0 -0
- package/web-dist/assets/misans-400-79-BCS3Dx4e.woff2 +0 -0
- package/web-dist/assets/misans-400-80-BEYSdQ_N.woff2 +0 -0
- package/web-dist/assets/misans-400-81-BzL-Gncx.woff2 +0 -0
- package/web-dist/assets/misans-400-82-CaENmdUU.woff2 +0 -0
- package/web-dist/assets/misans-400-83-Bvq1eBcA.woff2 +0 -0
- package/web-dist/assets/misans-400-84-Ctd90hiP.woff2 +0 -0
- package/web-dist/assets/misans-400-85-DWuOxfL1.woff2 +0 -0
- package/web-dist/assets/misans-400-86-D5niZS5c.woff2 +0 -0
- package/web-dist/assets/misans-400-87-DkOIADQJ.woff2 +0 -0
- package/web-dist/assets/misans-400-88-CGY4WTcC.woff2 +0 -0
- package/web-dist/assets/misans-400-89-CA3eoMTt.woff2 +0 -0
- package/web-dist/assets/misans-400-90-CzxR9MYb.woff2 +0 -0
- package/web-dist/assets/misans-400-91-Dyr85txc.woff2 +0 -0
- package/web-dist/assets/misans-400-97-qEZrCUNe.woff2 +0 -0
- package/web-dist/assets/misans-400-cyrillic--hFcG0Xp.woff2 +0 -0
- package/web-dist/assets/misans-400-extra-ZRI9n2Hu.woff2 +0 -0
- package/web-dist/assets/misans-400-latin-BRDR1WaL.woff2 +0 -0
- package/web-dist/assets/misans-400-latin-ext-6xS-MvHW.woff2 +0 -0
- package/web-dist/assets/misans-400-vietnamese-D7xD7kBB.woff2 +0 -0
- package/web-dist/assets/misans-500-100-BHuGA96E.woff2 +0 -0
- package/web-dist/assets/misans-500-101-CDMYUz0c.woff2 +0 -0
- package/web-dist/assets/misans-500-102-CWcqYYCV.woff2 +0 -0
- package/web-dist/assets/misans-500-103-BE1QSEzY.woff2 +0 -0
- package/web-dist/assets/misans-500-104-CDp743BV.woff2 +0 -0
- package/web-dist/assets/misans-500-105-y7dY6Foi.woff2 +0 -0
- package/web-dist/assets/misans-500-106-CP-kGZ6j.woff2 +0 -0
- package/web-dist/assets/misans-500-107-CUc8Hvle.woff2 +0 -0
- package/web-dist/assets/misans-500-108-ItN_x8jX.woff2 +0 -0
- package/web-dist/assets/misans-500-109-CEtf3R4D.woff2 +0 -0
- package/web-dist/assets/misans-500-110-BSZSHYRL.woff2 +0 -0
- package/web-dist/assets/misans-500-111-DfdArrjn.woff2 +0 -0
- package/web-dist/assets/misans-500-112-DRtNyrQw.woff2 +0 -0
- package/web-dist/assets/misans-500-113-CDT7tKuB.woff2 +0 -0
- package/web-dist/assets/misans-500-114-CCh4jwL8.woff2 +0 -0
- package/web-dist/assets/misans-500-115-DplUgPp0.woff2 +0 -0
- package/web-dist/assets/misans-500-116-C7eCklyK.woff2 +0 -0
- package/web-dist/assets/misans-500-117-BA0KabyT.woff2 +0 -0
- package/web-dist/assets/misans-500-118-V_M0eu2q.woff2 +0 -0
- package/web-dist/assets/misans-500-119-Cgf3Hszt.woff2 +0 -0
- package/web-dist/assets/misans-500-21-Di6DyR6O.woff2 +0 -0
- package/web-dist/assets/misans-500-22-CSnXvtL-.woff2 +0 -0
- package/web-dist/assets/misans-500-23-A06Hm9a6.woff2 +0 -0
- package/web-dist/assets/misans-500-24-Df97RCik.woff2 +0 -0
- package/web-dist/assets/misans-500-25-bOSJ6YXH.woff2 +0 -0
- package/web-dist/assets/misans-500-26-C65icgBb.woff2 +0 -0
- package/web-dist/assets/misans-500-27-C_GRm0va.woff2 +0 -0
- package/web-dist/assets/misans-500-28-CzZkqO0l.woff2 +0 -0
- package/web-dist/assets/misans-500-29-BReyeRyX.woff2 +0 -0
- package/web-dist/assets/misans-500-30-DzfjlROz.woff2 +0 -0
- package/web-dist/assets/misans-500-31-B2nLpgdU.woff2 +0 -0
- package/web-dist/assets/misans-500-32-Bz3rHm8X.woff2 +0 -0
- package/web-dist/assets/misans-500-33-AU3lZ1vY.woff2 +0 -0
- package/web-dist/assets/misans-500-34-CBAWkH-I.woff2 +0 -0
- package/web-dist/assets/misans-500-35-VgnGd14P.woff2 +0 -0
- package/web-dist/assets/misans-500-36-B2kfXv6A.woff2 +0 -0
- package/web-dist/assets/misans-500-37-DhKo8ykb.woff2 +0 -0
- package/web-dist/assets/misans-500-38-D8tTxFuc.woff2 +0 -0
- package/web-dist/assets/misans-500-39-DTm3aqJQ.woff2 +0 -0
- package/web-dist/assets/misans-500-40-C_akwj8_.woff2 +0 -0
- package/web-dist/assets/misans-500-41-RVM1JHQW.woff2 +0 -0
- package/web-dist/assets/misans-500-42-MVWIN_il.woff2 +0 -0
- package/web-dist/assets/misans-500-43-BtLZYNyD.woff2 +0 -0
- package/web-dist/assets/misans-500-44-D0QHMl6G.woff2 +0 -0
- package/web-dist/assets/misans-500-45-DRlclX7-.woff2 +0 -0
- package/web-dist/assets/misans-500-46-BEWswL4N.woff2 +0 -0
- package/web-dist/assets/misans-500-47-COSoxWaW.woff2 +0 -0
- package/web-dist/assets/misans-500-48-DZAISq3n.woff2 +0 -0
- package/web-dist/assets/misans-500-49-KSfi7MW0.woff2 +0 -0
- package/web-dist/assets/misans-500-5-h1SBcwuW.woff2 +0 -0
- package/web-dist/assets/misans-500-50-CIVMfG11.woff2 +0 -0
- package/web-dist/assets/misans-500-51-BdeNBhBL.woff2 +0 -0
- package/web-dist/assets/misans-500-52-CEW4e7ex.woff2 +0 -0
- package/web-dist/assets/misans-500-53-lmPCsEnt.woff2 +0 -0
- package/web-dist/assets/misans-500-54-B_7AqKQW.woff2 +0 -0
- package/web-dist/assets/misans-500-55-B-3RtUnH.woff2 +0 -0
- package/web-dist/assets/misans-500-56-g6D0e0cW.woff2 +0 -0
- package/web-dist/assets/misans-500-57-D5hp5Yqr.woff2 +0 -0
- package/web-dist/assets/misans-500-58-ilnDgEKt.woff2 +0 -0
- package/web-dist/assets/misans-500-59-DJYXz8tr.woff2 +0 -0
- package/web-dist/assets/misans-500-6-uCdpdDQy.woff2 +0 -0
- package/web-dist/assets/misans-500-60-B3Iaqx0p.woff2 +0 -0
- package/web-dist/assets/misans-500-61-CMxqg5hc.woff2 +0 -0
- package/web-dist/assets/misans-500-62-7FY8O2NQ.woff2 +0 -0
- package/web-dist/assets/misans-500-63-JP6vEuJf.woff2 +0 -0
- package/web-dist/assets/misans-500-64-Cdub62jh.woff2 +0 -0
- package/web-dist/assets/misans-500-65-DVHk_mlC.woff2 +0 -0
- package/web-dist/assets/misans-500-66-BX39wRtF.woff2 +0 -0
- package/web-dist/assets/misans-500-67-BcsepI3X.woff2 +0 -0
- package/web-dist/assets/misans-500-68-etUIUjrh.woff2 +0 -0
- package/web-dist/assets/misans-500-69-DfhVmnuA.woff2 +0 -0
- package/web-dist/assets/misans-500-70-D6dgy6-B.woff2 +0 -0
- package/web-dist/assets/misans-500-71-PkeKjcVn.woff2 +0 -0
- package/web-dist/assets/misans-500-72-D66Fnb30.woff2 +0 -0
- package/web-dist/assets/misans-500-73-jr9z9870.woff2 +0 -0
- package/web-dist/assets/misans-500-74-DsCkPKwe.woff2 +0 -0
- package/web-dist/assets/misans-500-75-Dkooq6KM.woff2 +0 -0
- package/web-dist/assets/misans-500-76-B0sfieHl.woff2 +0 -0
- package/web-dist/assets/misans-500-77-8tflq1ji.woff2 +0 -0
- package/web-dist/assets/misans-500-78-COKdMbdp.woff2 +0 -0
- package/web-dist/assets/misans-500-79-Bm0rBjSF.woff2 +0 -0
- package/web-dist/assets/misans-500-80-B9OoAnyy.woff2 +0 -0
- package/web-dist/assets/misans-500-81-DsQ9tpfX.woff2 +0 -0
- package/web-dist/assets/misans-500-82-VKsL2Tk2.woff2 +0 -0
- package/web-dist/assets/misans-500-83-Ce6mfHYD.woff2 +0 -0
- package/web-dist/assets/misans-500-84-D7kPSZLm.woff2 +0 -0
- package/web-dist/assets/misans-500-85-W5L0cEfd.woff2 +0 -0
- package/web-dist/assets/misans-500-86-DukGOEET.woff2 +0 -0
- package/web-dist/assets/misans-500-87-BJ_Lok6j.woff2 +0 -0
- package/web-dist/assets/misans-500-88-DbJ11zcA.woff2 +0 -0
- package/web-dist/assets/misans-500-89-LNKcEq6M.woff2 +0 -0
- package/web-dist/assets/misans-500-90-DNDDgSCd.woff2 +0 -0
- package/web-dist/assets/misans-500-91-rT8Q0evu.woff2 +0 -0
- package/web-dist/assets/misans-500-97-c8zW_WRq.woff2 +0 -0
- package/web-dist/assets/misans-500-cyrillic-CLHOGwgx.woff2 +0 -0
- package/web-dist/assets/misans-500-extra-CTAMEQ59.woff2 +0 -0
- package/web-dist/assets/misans-500-latin-Be606ott.woff2 +0 -0
- package/web-dist/assets/misans-500-latin-ext-BzDyL4sU.woff2 +0 -0
- package/web-dist/assets/misans-500-vietnamese-DBOLOqZH.woff2 +0 -0
- package/web-dist/assets/mona-sans-latin-ext-wght-normal-BqSk0Z3x.woff2 +0 -0
- package/web-dist/assets/mona-sans-latin-wght-normal-Pz49MTQZ.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-100-wght-normal-DrqXJETY.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-101-wght-normal-c94LAl5p.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-102-wght-normal-C1RtbCZr.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-103-wght-normal-DGHo20nu.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-104-wght-normal-CJT2ioDJ.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-105-wght-normal-BFoiJwz2.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-106-wght-normal-D6uUHw3w.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-107-wght-normal-kFQzJDLH.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-108-wght-normal-7aXvqIa2.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-109-wght-normal-CnjNbNmw.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-110-wght-normal-D2JBr045.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-111-wght-normal-ClFr5QXM.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-112-wght-normal-CiZxJMyY.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-113-wght-normal-OgQXOX6x.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-114-wght-normal-CRH9SDZu.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-115-wght-normal-BN__2iBG.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-116-wght-normal-vdFVzbO2.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-117-wght-normal-Dsz3vkzU.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-118-wght-normal-BPEb0gM9.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-119-wght-normal-BfzSEbFz.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-21-wght-normal-DIu_1ZBI.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-22-wght-normal-VXjdYcT-.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-23-wght-normal-4HrHKhpL.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-24-wght-normal-B58DWgHS.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-25-wght-normal-C3Jm6l7O.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-26-wght-normal-YNOygvr_.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-27-wght-normal-BP2pEGQH.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-28-wght-normal-BWPKDbtH.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-29-wght-normal-45aVmHn_.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-30-wght-normal-B8_s30jZ.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-31-wght-normal-DW0t445S.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-32-wght-normal-ShbWPcei.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-33-wght-normal-BOTZYTjM.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-34-wght-normal-BF1rqDSt.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-35-wght-normal-Bosspiyr.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-36-wght-normal-CtU9CyKw.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-37-wght-normal-ghDiyiuv.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-38-wght-normal-4Nz8k_dt.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-39-wght-normal-Ddtm1XVC.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-4-wght-normal-BRbPMj-C.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-40-wght-normal-BVn4-kgX.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-41-wght-normal-CZqajZnl.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-42-wght-normal-CQ4lY28u.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-43-wght-normal-psppu0d8.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-44-wght-normal-cbKJlTUe.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-45-wght-normal-MKIEVRIC.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-46-wght-normal-CErGc6Mt.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-47-wght-normal-C5Kgg1_m.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-48-wght-normal-DFMjDDY6.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-49-wght-normal-B7l_3BZr.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-5-wght-normal-DI846rD9.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-50-wght-normal-C5KfAmFp.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-51-wght-normal-C2bq6hC8.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-52-wght-normal-P18e_Y0j.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-53-wght-normal-Bgkuo2tF.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-54-wght-normal-DL5lmlUd.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-55-wght-normal-BV_Oy6IF.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-56-wght-normal-B4L7Hj8f.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-57-wght-normal-DU8YBsDj.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-58-wght-normal-CE0BKS9u.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-59-wght-normal-Azv2Ku9_.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-6-wght-normal-ozUCEY9O.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-60-wght-normal-C1lngC61.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-61-wght-normal-BxWkGF5M.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-62-wght-normal-CXXMAq-5.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-63-wght-normal-4La5uKvS.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-64-wght-normal-CbIuD2Eg.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-65-wght-normal-BGqvKda2.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-66-wght-normal-BvNozWOY.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-67-wght-normal-CC-WRBV-.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-68-wght-normal-c0FjfUaj.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-69-wght-normal-D596Jjl2.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-70-wght-normal-ColEcmtJ.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-71-wght-normal-ChZfXpdg.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-72-wght-normal-D1VyfEG3.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-73-wght-normal-DwSJRYPJ.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-74-wght-normal-Cte7o1QG.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-75-wght-normal-B0qL41rF.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-76-wght-normal-BPLMO_2x.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-77-wght-normal-Dkbi3pye.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-78-wght-normal-BFUXeSw6.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-79-wght-normal-DoJG4UTB.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-80-wght-normal-BEFypWOO.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-81-wght-normal-ed_TZlfo.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-82-wght-normal-DcxfR5OJ.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-83-wght-normal-C9UjAcMM.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-84-wght-normal-C7NxT478.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-85-wght-normal-DBcDBu1n.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-86-wght-normal-CLJIoPpl.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-87-wght-normal-DYfJ-vGE.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-88-wght-normal-ClNDOCGW.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-89-wght-normal-IQU_KQA8.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-90-wght-normal-BWcrRNoG.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-91-wght-normal-CGekvDdH.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-97-wght-normal-BsBHkXi3.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-98-wght-normal-BZqSA1r_.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-99-wght-normal-Q_IptJM5.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-cyrillic-wght-normal-CRA5_Pf1.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-latin-ext-wght-normal-CqPqLCfe.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-latin-wght-normal-DYAKOyvl.woff2 +0 -0
- package/web-dist/assets/noto-sans-sc-vietnamese-wght-normal-y5SU35Rl.woff2 +0 -0
- package/web-dist/assets/php-CNeTOyEV.js +1 -0
- package/web-dist/assets/php-Csjmro_R.js +1 -0
- package/web-dist/assets/python-B6Ihcp-E.js +1 -0
- package/web-dist/assets/python-B6aJPvgy.js +1 -0
- package/web-dist/assets/ruby-B13GW9FM.js +1 -0
- package/web-dist/assets/ruby-CYiNE6ps.js +1 -0
- package/web-dist/assets/rust-B1yitclQ.js +1 -0
- package/web-dist/assets/rust-CxuBE0J8.js +1 -0
- package/web-dist/assets/shellscript-DgJyDXW6.js +1 -0
- package/web-dist/assets/shellscript-Yzrsuije.js +1 -0
- package/web-dist/assets/sql-CRqJ_cUM.js +1 -0
- package/web-dist/assets/sql-Dq2MiB0T.js +1 -0
- package/web-dist/assets/toml-Ms459DBw.js +1 -0
- package/web-dist/assets/toml-vGWfd6FD.js +1 -0
- package/web-dist/assets/tsx-COt5Ahok.js +1 -0
- package/web-dist/assets/tsx-D6116Ycy.js +1 -0
- package/web-dist/assets/typescript-BPQ3VLAy.js +1 -0
- package/web-dist/assets/typescript-BqvgUolh.js +1 -0
- package/web-dist/assets/xml-BkAJuBCc.js +1 -0
- package/web-dist/assets/xml-sdJ4AIDG.js +1 -0
- package/web-dist/assets/xterm-BT4qZAkH.js +9 -0
- package/web-dist/assets/yaml-Bopit2L3.js +1 -0
- package/web-dist/assets/yaml-Buea-lGh.js +1 -0
- package/web-dist/fonts-licenses/ibm-plex-sans-condensed.txt +93 -0
- package/web-dist/fonts-licenses/ibm-plex-sans.txt +93 -0
- package/web-dist/fonts-licenses/jetbrains-mono.txt +93 -0
- package/web-dist/fonts-licenses/misans.txt +119 -0
- package/web-dist/fonts-licenses/mona-sans.txt +93 -0
- package/web-dist/fonts-licenses/noto-sans-sc.txt +93 -0
- package/web-dist/index.html +29 -0
- package/web-dist/workflow-ui.css +261 -0
package/dist/install.sh
ADDED
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Adelie one-line installer.
|
|
3
|
+
#
|
|
4
|
+
# curl -fsSL https://github.com/lmliheng/Adelie/releases/latest/download/install.sh | sh
|
|
5
|
+
#
|
|
6
|
+
# Options:
|
|
7
|
+
# PENGUIN_VERSION=vX.Y.Z choose a version (same as --version vX.Y.Z); a published Release
|
|
8
|
+
# installer defaults to its own version, an unstamped source copy to latest
|
|
9
|
+
# PENGUIN_INSTALL_DIR=<dir> install dir; default ~/.adelie
|
|
10
|
+
# PENGUIN_ARCHIVE=<file> install a local Release archive without network access (same as --archive <file>)
|
|
11
|
+
# PENGUIN_DOWNLOAD_SOURCE=auto|github choose the online source; default auto (GitHub Releases)
|
|
12
|
+
# PENGUIN_DOWNLOAD_BASE_URL=<url> exact online asset directory selected by the stable forwarder
|
|
13
|
+
# PENGUIN_DOWNLOAD_FALLBACK_BASE_URL=<url> fallback for PENGUIN_DOWNLOAD_BASE_URL
|
|
14
|
+
# --universal install the universal package (no bundled Node runtime; needs system Node >= 24)
|
|
15
|
+
# --no-modify-path do not put `penguin` on PATH (no ~/.local/bin/penguin symlink); for a second
|
|
16
|
+
# installation beside the one the command belongs to
|
|
17
|
+
#
|
|
18
|
+
# Each Release attaches exactly one artifact per target: penguin-<target>.tar.gz, a shallow
|
|
19
|
+
# installer bundle holding this script, the program payload (payload.tar.gz) and the payload's
|
|
20
|
+
# checksum. Online installs download that bundle and verify it against its published .sha256;
|
|
21
|
+
# offline installs transfer the same single file, extract it once and run the bundled
|
|
22
|
+
# ./install.sh, which installs the sibling payload with no network access. Both paths verify
|
|
23
|
+
# the payload checksum sealed inside the bundle before anything is staged. Releases up to
|
|
24
|
+
# v0.1.5 shipped the program tree directly (top-level penguin/); such archives are still
|
|
25
|
+
# accepted, from --version pins and --archive files alike.
|
|
26
|
+
#
|
|
27
|
+
# The data dir (~/.adelie/data by default) sits under the install home but is never touched by reinstall/upgrade (which only replace bin/lib/web/node). The launcher exports the root it lives under, so an install made before the rename (at ~/.penguin) keeps reading its own data there.
|
|
28
|
+
#
|
|
29
|
+
# Docs: https://lmliheng.github.io/Adelie/docs/quickstart-cli
|
|
30
|
+
set -eu
|
|
31
|
+
|
|
32
|
+
REPO="https://github.com/lmliheng/Adelie"
|
|
33
|
+
GITHUB_RELEASE_ROOT="$REPO/releases/download"
|
|
34
|
+
GITHUB_LATEST_BASE="$REPO/releases/latest/download"
|
|
35
|
+
VERSION="${PENGUIN_VERSION:-}"
|
|
36
|
+
INSTALL_DIR="${PENGUIN_INSTALL_DIR:-$HOME/.adelie}"
|
|
37
|
+
BIN_DIR="$HOME/.local/bin"
|
|
38
|
+
MODIFY_PATH=1
|
|
39
|
+
UNIVERSAL=0
|
|
40
|
+
ARCHIVE="${PENGUIN_ARCHIVE:-}"
|
|
41
|
+
SOURCE_MODE="${PENGUIN_DOWNLOAD_SOURCE:-auto}"
|
|
42
|
+
DOWNLOAD_BASE_URL="${PENGUIN_DOWNLOAD_BASE_URL:-}"
|
|
43
|
+
DOWNLOAD_FALLBACK_BASE_URL="${PENGUIN_DOWNLOAD_FALLBACK_BASE_URL:-}"
|
|
44
|
+
PAYLOAD_NAME="payload.tar.gz"
|
|
45
|
+
# The release workflow replaces this token with the immutable tag before publishing both the
|
|
46
|
+
# standalone installer and the copies sealed inside the Linux, macOS and universal bundles.
|
|
47
|
+
EMBEDDED_RELEASE_VERSION="v0.5.0"
|
|
48
|
+
|
|
49
|
+
fail() {
|
|
50
|
+
echo "error: $1" >&2
|
|
51
|
+
exit 1
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
validate_https_url() {
|
|
55
|
+
case "$2" in
|
|
56
|
+
https://*) ;;
|
|
57
|
+
*) fail "$1 must be an absolute HTTPS URL" ;;
|
|
58
|
+
esac
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
is_release_tag() {
|
|
62
|
+
case "$1" in
|
|
63
|
+
v[0-9A-Za-z]* ) ;;
|
|
64
|
+
*) return 1 ;;
|
|
65
|
+
esac
|
|
66
|
+
case "$1" in
|
|
67
|
+
*[!0-9A-Za-z._-]*) return 1 ;;
|
|
68
|
+
esac
|
|
69
|
+
return 0
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
validate_release_tag() {
|
|
73
|
+
is_release_tag "$1" || fail "invalid release version: $1"
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
download_source_label() {
|
|
77
|
+
case "$1" in
|
|
78
|
+
https://github.com/*) printf '%s\n' "GitHub" ;;
|
|
79
|
+
*) printf '%s\n' "configured mirror" ;;
|
|
80
|
+
esac
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
# --- Parse args (also passable via curl | sh -s -- --universal) ---
|
|
84
|
+
while [ $# -gt 0 ]; do
|
|
85
|
+
case "$1" in
|
|
86
|
+
--version)
|
|
87
|
+
[ $# -ge 2 ] || fail "--version requires a value (e.g. --version v1.0.0)"
|
|
88
|
+
VERSION="$2"
|
|
89
|
+
shift 2
|
|
90
|
+
;;
|
|
91
|
+
--universal)
|
|
92
|
+
UNIVERSAL=1
|
|
93
|
+
shift
|
|
94
|
+
;;
|
|
95
|
+
--no-modify-path)
|
|
96
|
+
MODIFY_PATH=0
|
|
97
|
+
shift
|
|
98
|
+
;;
|
|
99
|
+
--archive)
|
|
100
|
+
[ $# -ge 2 ] || fail "--archive requires a path to a Release archive"
|
|
101
|
+
ARCHIVE="$2"
|
|
102
|
+
shift 2
|
|
103
|
+
;;
|
|
104
|
+
*)
|
|
105
|
+
fail "unknown option: $1"
|
|
106
|
+
;;
|
|
107
|
+
esac
|
|
108
|
+
done
|
|
109
|
+
|
|
110
|
+
# --- Detect platform: Linux/Darwin x64/arm64; other platforms should use the universal package ---
|
|
111
|
+
TARGET="universal"
|
|
112
|
+
if [ "$UNIVERSAL" -eq 0 ]; then
|
|
113
|
+
case "$(uname -s)" in
|
|
114
|
+
Linux) os="linux" ;;
|
|
115
|
+
Darwin) os="darwin" ;;
|
|
116
|
+
*) fail "unsupported OS: $(uname -s). Install Node.js >= 24, then re-run with --universal." ;;
|
|
117
|
+
esac
|
|
118
|
+
case "$(uname -m)" in
|
|
119
|
+
x86_64) arch="x64" ;;
|
|
120
|
+
aarch64 | arm64) arch="arm64" ;;
|
|
121
|
+
*) fail "unsupported architecture: $(uname -m). Install Node.js >= 24, then re-run with --universal." ;;
|
|
122
|
+
esac
|
|
123
|
+
TARGET="$os-$arch"
|
|
124
|
+
fi
|
|
125
|
+
ASSET="penguin-$TARGET.tar.gz"
|
|
126
|
+
|
|
127
|
+
if [ -n "$ARCHIVE" ] && [ -n "$VERSION" ]; then
|
|
128
|
+
fail "--archive/PENGUIN_ARCHIVE cannot be combined with --version/PENGUIN_VERSION"
|
|
129
|
+
fi
|
|
130
|
+
if [ -n "$VERSION" ]; then
|
|
131
|
+
validate_release_tag "$VERSION"
|
|
132
|
+
fi
|
|
133
|
+
case "$SOURCE_MODE" in
|
|
134
|
+
auto | github) ;;
|
|
135
|
+
*) fail "PENGUIN_DOWNLOAD_SOURCE must be auto or github" ;;
|
|
136
|
+
esac
|
|
137
|
+
RESOLVED_RELEASE_VERSION="$VERSION"
|
|
138
|
+
if [ -z "$RESOLVED_RELEASE_VERSION" ] && is_release_tag "$EMBEDDED_RELEASE_VERSION"; then
|
|
139
|
+
RESOLVED_RELEASE_VERSION="$EMBEDDED_RELEASE_VERSION"
|
|
140
|
+
fi
|
|
141
|
+
if [ -n "$DOWNLOAD_BASE_URL" ]; then
|
|
142
|
+
DOWNLOAD_BASE_URL="${DOWNLOAD_BASE_URL%/}"
|
|
143
|
+
validate_https_url PENGUIN_DOWNLOAD_BASE_URL "$DOWNLOAD_BASE_URL"
|
|
144
|
+
if [ -n "$DOWNLOAD_FALLBACK_BASE_URL" ]; then
|
|
145
|
+
DOWNLOAD_FALLBACK_BASE_URL="${DOWNLOAD_FALLBACK_BASE_URL%/}"
|
|
146
|
+
validate_https_url PENGUIN_DOWNLOAD_FALLBACK_BASE_URL "$DOWNLOAD_FALLBACK_BASE_URL"
|
|
147
|
+
fi
|
|
148
|
+
else
|
|
149
|
+
DOWNLOAD_FALLBACK_BASE_URL=""
|
|
150
|
+
fi
|
|
151
|
+
|
|
152
|
+
# --- Universal package precheck: system Node >= 24 (platform packages bundle the runtime, so exempt) ---
|
|
153
|
+
if [ "$UNIVERSAL" -eq 1 ]; then
|
|
154
|
+
command -v node >/dev/null 2>&1 \
|
|
155
|
+
|| fail "the universal package needs Node.js >= 24 on PATH (none found)."
|
|
156
|
+
node_version="$(node --version)" # e.g. v24.18.0
|
|
157
|
+
v="${node_version#v}"
|
|
158
|
+
major="${v%%.*}"
|
|
159
|
+
if [ "$major" -lt 24 ]; then
|
|
160
|
+
fail "the universal package needs Node.js >= 24, found $node_version."
|
|
161
|
+
fi
|
|
162
|
+
fi
|
|
163
|
+
|
|
164
|
+
TMP="$(mktemp -d)"
|
|
165
|
+
STAGING=""
|
|
166
|
+
OLD_DIR=""
|
|
167
|
+
SWAP_ACTIVE=0
|
|
168
|
+
MOVED_OLD=""
|
|
169
|
+
MOVED_NEW=""
|
|
170
|
+
|
|
171
|
+
# Moves one directory to a new location even when the directory inode itself cannot be renamed
|
|
172
|
+
# — a mount point, a process's CWD, or a filesystem that pins in-use directories (overlayfs
|
|
173
|
+
# under Docker reports EBUSY when `penguin update` replaces the very lib/ its own process runs
|
|
174
|
+
# from). Strategies, in order: plain rename; per-entry renames into a fresh or existing
|
|
175
|
+
# destination; per-entry copy with the source entry removed (POSIX keeps an unlinked-but-open
|
|
176
|
+
# file valid for the process using it). A pinned, now-empty source directory is left in place
|
|
177
|
+
# and reused by the incoming move.
|
|
178
|
+
relocate_dir() {
|
|
179
|
+
rl_src="$1"
|
|
180
|
+
rl_dst="$2"
|
|
181
|
+
if [ ! -e "$rl_dst" ] && mv "$rl_src" "$rl_dst" 2>/dev/null; then
|
|
182
|
+
return 0
|
|
183
|
+
fi
|
|
184
|
+
[ -d "$rl_src" ] || return 1
|
|
185
|
+
mkdir -p "$rl_dst" || return 1
|
|
186
|
+
rl_failed=0
|
|
187
|
+
for rl_entry in "$rl_src"/* "$rl_src"/.[!.]* "$rl_src"/..?*; do
|
|
188
|
+
[ -e "$rl_entry" ] || [ -L "$rl_entry" ] || continue
|
|
189
|
+
if ! mv "$rl_entry" "$rl_dst/" 2>/dev/null; then
|
|
190
|
+
cp -Rp "$rl_entry" "$rl_dst/" || rl_failed=1
|
|
191
|
+
rm -rf "$rl_entry" || rl_failed=1
|
|
192
|
+
fi
|
|
193
|
+
done
|
|
194
|
+
[ "$rl_failed" -eq 0 ] || return 1
|
|
195
|
+
[ -z "$(ls -A "$rl_src" 2>/dev/null)" ] || return 1
|
|
196
|
+
rmdir "$rl_src" 2>/dev/null || :
|
|
197
|
+
return 0
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
rollback_install() {
|
|
201
|
+
rollback_failed=0
|
|
202
|
+
for d in $MOVED_NEW; do
|
|
203
|
+
# Clearing may leave a pinned-but-empty directory husk; the restore below reuses it.
|
|
204
|
+
rm -rf "$INSTALL_DIR/$d" 2>/dev/null || :
|
|
205
|
+
if [ -e "$INSTALL_DIR/$d" ] && [ -n "$(ls -A "$INSTALL_DIR/$d" 2>/dev/null)" ]; then
|
|
206
|
+
rollback_failed=1
|
|
207
|
+
fi
|
|
208
|
+
done
|
|
209
|
+
for d in $MOVED_OLD; do
|
|
210
|
+
if [ -e "$OLD_DIR/$d" ]; then
|
|
211
|
+
relocate_dir "$OLD_DIR/$d" "$INSTALL_DIR/$d" || rollback_failed=1
|
|
212
|
+
fi
|
|
213
|
+
done
|
|
214
|
+
if [ "$rollback_failed" -ne 0 ]; then
|
|
215
|
+
echo "error: automatic rollback was incomplete; previous files remain in $OLD_DIR" >&2
|
|
216
|
+
return 1
|
|
217
|
+
fi
|
|
218
|
+
echo "Previous Adelie installation restored." >&2
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
cleanup() {
|
|
222
|
+
status=$?
|
|
223
|
+
trap - EXIT HUP INT TERM
|
|
224
|
+
set +e
|
|
225
|
+
if [ "$SWAP_ACTIVE" -eq 1 ]; then
|
|
226
|
+
rollback_install
|
|
227
|
+
fi
|
|
228
|
+
rm -rf "$TMP"
|
|
229
|
+
[ -z "$STAGING" ] || rm -rf "$STAGING"
|
|
230
|
+
[ -z "$OLD_DIR" ] || rm -rf "$OLD_DIR"
|
|
231
|
+
exit "$status"
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
trap cleanup EXIT
|
|
235
|
+
trap 'exit 129' HUP
|
|
236
|
+
trap 'exit 130' INT
|
|
237
|
+
trap 'exit 143' TERM
|
|
238
|
+
|
|
239
|
+
# Verifies file $1 against the sha256sum-format file $2 ($3 names the layer in messages).
|
|
240
|
+
# Checksums are never optional: every install path either downloads the published .sha256 or
|
|
241
|
+
# reads the one sealed inside the bundle.
|
|
242
|
+
verify_sha256() {
|
|
243
|
+
vs_expected="$(awk 'NR == 1 { print $1 }' "$2" | tr 'A-F' 'a-f')"
|
|
244
|
+
[ -n "$vs_expected" ] || fail "checksum file is empty or malformed: $2"
|
|
245
|
+
if command -v sha256sum >/dev/null 2>&1; then
|
|
246
|
+
vs_actual="$(sha256sum "$1" | awk '{ print $1 }')"
|
|
247
|
+
elif command -v shasum >/dev/null 2>&1; then
|
|
248
|
+
vs_actual="$(shasum -a 256 "$1" | awk '{ print $1 }')"
|
|
249
|
+
else
|
|
250
|
+
fail "sha256sum or shasum is required for checksum verification"
|
|
251
|
+
fi
|
|
252
|
+
[ "$vs_actual" = "$vs_expected" ] || fail "checksum mismatch for $3."
|
|
253
|
+
echo "$3 checksum OK."
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
sha256_file() {
|
|
257
|
+
if command -v sha256sum >/dev/null 2>&1; then
|
|
258
|
+
sha256sum "$1" | awk '{ print $1 }'
|
|
259
|
+
elif command -v shasum >/dev/null 2>&1; then
|
|
260
|
+
shasum -a 256 "$1" | awk '{ print $1 }'
|
|
261
|
+
else
|
|
262
|
+
fail "sha256sum or shasum is required for checksum verification"
|
|
263
|
+
fi
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
# Downloads the bundle and its checksum as a pair. Transport failures may try a same-version
|
|
267
|
+
# fallback; checksum failures are handled afterwards and always abort rather than being hidden
|
|
268
|
+
# by a different source.
|
|
269
|
+
download_release_pair() {
|
|
270
|
+
drp_base="$1"
|
|
271
|
+
drp_label="$(download_source_label "$drp_base")"
|
|
272
|
+
echo "Downloading $ASSET from $drp_label ..."
|
|
273
|
+
rm -f "$ARCHIVE_PATH" "$TMP/$ASSET.sha256"
|
|
274
|
+
curl -fSL --progress-bar --connect-timeout 5 --speed-limit 65536 --speed-time 20 "$drp_base/$ASSET" -o "$ARCHIVE_PATH" \
|
|
275
|
+
|| return 1
|
|
276
|
+
curl -fsSL --connect-timeout 5 --speed-limit 1024 --speed-time 20 "$drp_base/$ASSET.sha256" -o "$TMP/$ASSET.sha256" \
|
|
277
|
+
|| return 1
|
|
278
|
+
return 0
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
# --- Resolve the program payload. Three entries converge on PAYLOAD_PATH:
|
|
282
|
+
# (a) bundled offline: this script sits next to payload.tar.gz in an extracted bundle;
|
|
283
|
+
# (b) --archive <file>: a local installer bundle, or a payload/legacy program archive;
|
|
284
|
+
# (c) online: download penguin-<target>.tar.gz and verify it, then open it.
|
|
285
|
+
# A bundle is recognized by containing payload.tar.gz at its top level; anything else is a
|
|
286
|
+
# program archive (payload.tar.gz itself, or a pre-0.1.6 release archive) whose top level
|
|
287
|
+
# is penguin/. ---
|
|
288
|
+
LOCAL_ARCHIVE=0
|
|
289
|
+
ARCHIVE_SHAPE=""
|
|
290
|
+
ARCHIVE_PATH=""
|
|
291
|
+
ARCHIVE_NAME=""
|
|
292
|
+
PAYLOAD_PATH=""
|
|
293
|
+
|
|
294
|
+
# Sibling pickup engages only for a real file actually named install.sh — the name it carries
|
|
295
|
+
# inside a bundle. A forwarder or `curl | sh` run never satisfies that (no file, or a random
|
|
296
|
+
# temp name), so an online installer cannot be steered by archives someone planted next to a
|
|
297
|
+
# temporary script in a shared directory.
|
|
298
|
+
SIBLING_PAYLOAD=""
|
|
299
|
+
if [ -z "$ARCHIVE" ] && [ -f "$0" ] && [ "$(basename "$0")" = "install.sh" ]; then
|
|
300
|
+
script_dir="$(CDPATH= cd "$(dirname "$0")" && pwd)"
|
|
301
|
+
if [ -f "$script_dir/$PAYLOAD_NAME" ]; then
|
|
302
|
+
SIBLING_PAYLOAD="$script_dir/$PAYLOAD_NAME"
|
|
303
|
+
fi
|
|
304
|
+
fi
|
|
305
|
+
|
|
306
|
+
if [ -n "$SIBLING_PAYLOAD" ]; then
|
|
307
|
+
# (a) Extracted bundle: install the sibling payload; no network access at all.
|
|
308
|
+
[ -z "$VERSION" ] \
|
|
309
|
+
|| fail "--version/PENGUIN_VERSION cannot be combined with the bundled offline installer"
|
|
310
|
+
echo "Using bundled payload $SIBLING_PAYLOAD ..."
|
|
311
|
+
[ -f "$SIBLING_PAYLOAD.sha256" ] \
|
|
312
|
+
|| fail "offline checksum file not found: $SIBLING_PAYLOAD.sha256"
|
|
313
|
+
verify_sha256 "$SIBLING_PAYLOAD" "$SIBLING_PAYLOAD.sha256" "Payload"
|
|
314
|
+
PAYLOAD_PATH="$SIBLING_PAYLOAD"
|
|
315
|
+
ARCHIVE_NAME="$PAYLOAD_NAME"
|
|
316
|
+
LOCAL_ARCHIVE=1
|
|
317
|
+
elif [ -n "$ARCHIVE" ]; then
|
|
318
|
+
# (b) Explicit local archive; its shape is probed below.
|
|
319
|
+
[ -f "$ARCHIVE" ] || fail "local archive not found: $ARCHIVE"
|
|
320
|
+
archive_name="${ARCHIVE##*/}"
|
|
321
|
+
archive_dir="$(CDPATH= cd "$(dirname "$ARCHIVE")" && pwd)"
|
|
322
|
+
ARCHIVE_PATH="$archive_dir/$archive_name"
|
|
323
|
+
ARCHIVE_NAME="$archive_name"
|
|
324
|
+
LOCAL_ARCHIVE=1
|
|
325
|
+
echo "Using local archive $ARCHIVE_PATH ..."
|
|
326
|
+
else
|
|
327
|
+
# (c) Online: an explicit forwarder/configured URL wins. Otherwise a stamped Release installer
|
|
328
|
+
# uses its own immutable version; an unstamped source-tree installer falls back to the
|
|
329
|
+
# release GitHub currently marks latest.
|
|
330
|
+
FALLBACK_BASE_URL="$DOWNLOAD_FALLBACK_BASE_URL"
|
|
331
|
+
if [ -n "$DOWNLOAD_BASE_URL" ]; then
|
|
332
|
+
BASE_URL="$DOWNLOAD_BASE_URL"
|
|
333
|
+
elif [ -n "$RESOLVED_RELEASE_VERSION" ]; then
|
|
334
|
+
BASE_URL="$GITHUB_RELEASE_ROOT/$RESOLVED_RELEASE_VERSION"
|
|
335
|
+
else
|
|
336
|
+
BASE_URL="$GITHUB_LATEST_BASE"
|
|
337
|
+
fi
|
|
338
|
+
ARCHIVE_PATH="$TMP/$ASSET"
|
|
339
|
+
ARCHIVE_NAME="$ASSET"
|
|
340
|
+
if ! download_release_pair "$BASE_URL"; then
|
|
341
|
+
if [ -n "$FALLBACK_BASE_URL" ] && [ "$FALLBACK_BASE_URL" != "$BASE_URL" ]; then
|
|
342
|
+
echo "Primary download source unavailable; trying $(download_source_label "$FALLBACK_BASE_URL") ..."
|
|
343
|
+
download_release_pair "$FALLBACK_BASE_URL" \
|
|
344
|
+
|| fail "download failed from both the primary source and its fallback. Check your network, then retry."
|
|
345
|
+
else
|
|
346
|
+
fail "download failed from $(download_source_label "$BASE_URL"). Check the version tag and your network, then retry."
|
|
347
|
+
fi
|
|
348
|
+
fi
|
|
349
|
+
verify_sha256 "$ARCHIVE_PATH" "$TMP/$ASSET.sha256" "Bundle"
|
|
350
|
+
fi
|
|
351
|
+
|
|
352
|
+
if [ -z "$PAYLOAD_PATH" ]; then
|
|
353
|
+
if tar -tzf "$ARCHIVE_PATH" 2>/dev/null | head -50 | grep -qE "^(\./)?$PAYLOAD_NAME\$"; then
|
|
354
|
+
ARCHIVE_SHAPE="bundle"
|
|
355
|
+
else
|
|
356
|
+
ARCHIVE_SHAPE="program"
|
|
357
|
+
fi
|
|
358
|
+
if [ "$ARCHIVE_SHAPE" = "bundle" ]; then
|
|
359
|
+
# A local bundle is self-verifying through its sealed payload checksum; when the published
|
|
360
|
+
# outer .sha256 was transferred alongside it, verify that layer too.
|
|
361
|
+
if [ "$LOCAL_ARCHIVE" -eq 1 ] && [ -f "$ARCHIVE_PATH.sha256" ]; then
|
|
362
|
+
verify_sha256 "$ARCHIVE_PATH" "$ARCHIVE_PATH.sha256" "Bundle"
|
|
363
|
+
fi
|
|
364
|
+
BUNDLE_DIR="$TMP/bundle"
|
|
365
|
+
mkdir -p "$BUNDLE_DIR"
|
|
366
|
+
tar -xzf "$ARCHIVE_PATH" -C "$BUNDLE_DIR"
|
|
367
|
+
PAYLOAD_PATH="$BUNDLE_DIR/$PAYLOAD_NAME"
|
|
368
|
+
[ -f "$PAYLOAD_PATH" ] || fail "unexpected bundle layout: $PAYLOAD_NAME missing."
|
|
369
|
+
[ -f "$PAYLOAD_PATH.sha256" ] || fail "unexpected bundle layout: $PAYLOAD_NAME.sha256 missing."
|
|
370
|
+
verify_sha256 "$PAYLOAD_PATH" "$PAYLOAD_PATH.sha256" "Payload"
|
|
371
|
+
else
|
|
372
|
+
# Program archive (payload.tar.gz, or a pre-0.1.6 release archive). A local file needs an
|
|
373
|
+
# adjacent checksum — its own, or the canonical asset checksum next to a renamed legacy
|
|
374
|
+
# file; an online download was already verified against the published .sha256 above.
|
|
375
|
+
if [ "$LOCAL_ARCHIVE" -eq 1 ]; then
|
|
376
|
+
SHA_PATH="$ARCHIVE_PATH.sha256"
|
|
377
|
+
if [ ! -f "$SHA_PATH" ] && [ "$ARCHIVE_NAME" != "$ASSET" ] && [ -f "$archive_dir/$ASSET.sha256" ]; then
|
|
378
|
+
SHA_PATH="$archive_dir/$ASSET.sha256"
|
|
379
|
+
fi
|
|
380
|
+
[ -f "$SHA_PATH" ] || fail "offline checksum file not found: $SHA_PATH"
|
|
381
|
+
verify_sha256 "$ARCHIVE_PATH" "$SHA_PATH" "Payload"
|
|
382
|
+
fi
|
|
383
|
+
PAYLOAD_PATH="$ARCHIVE_PATH"
|
|
384
|
+
fi
|
|
385
|
+
fi
|
|
386
|
+
|
|
387
|
+
# --- Extract and validate in staging before touching the current install. The final same-filesystem
|
|
388
|
+
# swap keeps the previous dirs in .old.$$ until the installed command runs successfully; any
|
|
389
|
+
# move or launch failure restores them automatically. The data dir is never part of the swap. ---
|
|
390
|
+
tar -xzf "$PAYLOAD_PATH" -C "$TMP"
|
|
391
|
+
[ -d "$TMP/penguin" ] || fail "unexpected archive layout: top-level penguin/ missing."
|
|
392
|
+
MANIFEST_PATH="$TMP/penguin/package-manifest.json"
|
|
393
|
+
if [ -f "$MANIFEST_PATH" ]; then
|
|
394
|
+
manifest_target="$(sed -n 's/.*"target"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$MANIFEST_PATH" | head -n 1)"
|
|
395
|
+
[ -n "$manifest_target" ] || fail "package manifest is malformed: target missing."
|
|
396
|
+
[ "$manifest_target" = "$TARGET" ] \
|
|
397
|
+
|| fail "package target mismatch: expected $TARGET, found $manifest_target."
|
|
398
|
+
elif [ "$LOCAL_ARCHIVE" -eq 1 ] && [ "$ARCHIVE_SHAPE" = "program" ] && [ "$ARCHIVE_NAME" != "$ASSET" ]; then
|
|
399
|
+
fail "a renamed local archive must contain package-manifest.json; use the original filename for legacy packages."
|
|
400
|
+
fi
|
|
401
|
+
mkdir -p "$INSTALL_DIR"
|
|
402
|
+
STAGING="$INSTALL_DIR/.staging.$$"
|
|
403
|
+
OLD_DIR="$INSTALL_DIR/.old.$$"
|
|
404
|
+
rm -rf "$STAGING"
|
|
405
|
+
rm -rf "$OLD_DIR"
|
|
406
|
+
mkdir -p "$STAGING"
|
|
407
|
+
for d in bin lib web node; do
|
|
408
|
+
if [ -e "$TMP/penguin/$d" ]; then
|
|
409
|
+
mv "$TMP/penguin/$d" "$STAGING/$d"
|
|
410
|
+
fi
|
|
411
|
+
done
|
|
412
|
+
[ -x "$STAGING/bin/penguin" ] || fail "unexpected archive layout: bin/penguin missing."
|
|
413
|
+
|
|
414
|
+
# The launcher resolves lib/, web/ and node/ relative to itself, so staging is a faithful
|
|
415
|
+
# preflight that catches macOS execution policy and runtime/package failures before replacement.
|
|
416
|
+
if candidate_version="$("$STAGING/bin/penguin" --version)"; then
|
|
417
|
+
[ -n "$candidate_version" ] || fail "candidate Adelie returned an empty version."
|
|
418
|
+
else
|
|
419
|
+
candidate_status=$?
|
|
420
|
+
fail "candidate Adelie failed to run (exit status $candidate_status). See the error above."
|
|
421
|
+
fi
|
|
422
|
+
|
|
423
|
+
mkdir -p "$OLD_DIR"
|
|
424
|
+
SWAP_ACTIVE=1
|
|
425
|
+
for d in bin lib web node; do
|
|
426
|
+
if [ -e "$INSTALL_DIR/$d" ]; then
|
|
427
|
+
if relocate_dir "$INSTALL_DIR/$d" "$OLD_DIR/$d"; then
|
|
428
|
+
MOVED_OLD="$MOVED_OLD $d"
|
|
429
|
+
else
|
|
430
|
+
fail "could not move the existing $d directory aside (stop running penguin processes and retry); the previous installation will be restored."
|
|
431
|
+
fi
|
|
432
|
+
fi
|
|
433
|
+
done
|
|
434
|
+
for d in bin lib web node; do
|
|
435
|
+
if [ -e "$STAGING/$d" ]; then
|
|
436
|
+
if relocate_dir "$STAGING/$d" "$INSTALL_DIR/$d"; then
|
|
437
|
+
MOVED_NEW="$MOVED_NEW $d"
|
|
438
|
+
else
|
|
439
|
+
fail "could not install the new $d directory; the previous installation will be restored."
|
|
440
|
+
fi
|
|
441
|
+
fi
|
|
442
|
+
done
|
|
443
|
+
[ -x "$INSTALL_DIR/bin/penguin" ] || fail "install incomplete: $INSTALL_DIR/bin/penguin missing."
|
|
444
|
+
|
|
445
|
+
# Verify again from the final path before deleting the backup. Keep stderr visible so platform
|
|
446
|
+
# policy, permission and runtime errors are not disguised as an "unknown" version.
|
|
447
|
+
if installed_version="$("$INSTALL_DIR/bin/penguin" --version)"; then
|
|
448
|
+
[ -n "$installed_version" ] || fail "installed Adelie returned an empty version."
|
|
449
|
+
else
|
|
450
|
+
version_status=$?
|
|
451
|
+
fail "installed Adelie failed to run (exit status $version_status); the previous installation will be restored. See the error above."
|
|
452
|
+
fi
|
|
453
|
+
|
|
454
|
+
SWAP_ACTIVE=0
|
|
455
|
+
if ! rm -rf "$OLD_DIR"; then
|
|
456
|
+
echo "warning: could not remove the previous installation backup at $OLD_DIR" >&2
|
|
457
|
+
fi
|
|
458
|
+
OLD_DIR=""
|
|
459
|
+
rm -rf "$STAGING"
|
|
460
|
+
STAGING=""
|
|
461
|
+
|
|
462
|
+
# --- Symlink into ~/.local/bin and check PATH only after the install is known to work.
|
|
463
|
+
# --no-modify-path skips both: ~/.local/bin/penguin is one name, and a second
|
|
464
|
+
# installation that took it would hand its program to whoever types `penguin`. ---
|
|
465
|
+
PATH_MISSING=0
|
|
466
|
+
PENGUIN_COMMAND="penguin"
|
|
467
|
+
if [ "$MODIFY_PATH" -eq 1 ]; then
|
|
468
|
+
mkdir -p "$BIN_DIR"
|
|
469
|
+
ln -sf "$INSTALL_DIR/bin/penguin" "$BIN_DIR/penguin"
|
|
470
|
+
case ":$PATH:" in
|
|
471
|
+
*":$BIN_DIR:"*) ;;
|
|
472
|
+
*) PATH_MISSING=1 ;;
|
|
473
|
+
esac
|
|
474
|
+
else
|
|
475
|
+
PENGUIN_COMMAND="$INSTALL_DIR/bin/penguin"
|
|
476
|
+
fi
|
|
477
|
+
|
|
478
|
+
echo ""
|
|
479
|
+
echo "Adelie $installed_version installed to $INSTALL_DIR"
|
|
480
|
+
if [ "$PATH_MISSING" -eq 1 ]; then
|
|
481
|
+
echo ""
|
|
482
|
+
echo "note: installation succeeded, but $BIN_DIR is not on your PATH. Add it to your shell profile:"
|
|
483
|
+
case "${SHELL:-}" in
|
|
484
|
+
*/zsh) echo " echo 'export PATH=\"\$HOME/.local/bin:\$PATH\"' >> ~/.zshrc && source ~/.zshrc" ;;
|
|
485
|
+
*/bash) echo " echo 'export PATH=\"\$HOME/.local/bin:\$PATH\"' >> ~/.bashrc && source ~/.bashrc" ;;
|
|
486
|
+
*/fish) echo " fish_add_path \$HOME/.local/bin" ;;
|
|
487
|
+
*) echo " export PATH=\"\$HOME/.local/bin:\$PATH\"" ;;
|
|
488
|
+
esac
|
|
489
|
+
fi
|
|
490
|
+
echo ""
|
|
491
|
+
echo "Get started:"
|
|
492
|
+
echo " $PENGUIN_COMMAND --help # all commands"
|
|
493
|
+
echo " $PENGUIN_COMMAND web # start the Web UI at http://127.0.0.1:4000 (a first-login link is printed on first start)"
|
|
494
|
+
echo " $PENGUIN_COMMAND server # headless server (PORT / HOST to override)"
|
package/dist/lock.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
interface ServerLock {
|
|
2
|
+
pid: number;
|
|
3
|
+
port: number;
|
|
4
|
+
startedAt: string;
|
|
5
|
+
}
|
|
6
|
+
declare function serverLockPath(root: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* The lock's text, parsed; anything that is not one reads as "no lock".
|
|
9
|
+
*
|
|
10
|
+
* Exported because a lock is also read where the file is not: a controller looking at
|
|
11
|
+
* ANOTHER machine gets this same text back from an ssh `cat` (machines/server-state.ts). The
|
|
12
|
+
* shape is defined once here so the two readers cannot drift apart.
|
|
13
|
+
*/
|
|
14
|
+
declare function parseServerLock(raw: string): ServerLock | null;
|
|
15
|
+
/** Reads the lock file; a missing or malformed file reads as "no lock". */
|
|
16
|
+
declare function readServerLock(root: string): ServerLock | null;
|
|
17
|
+
/** True when the lock's process is alive AND its port accepts connections. */
|
|
18
|
+
declare function isServerLockAlive(lock: ServerLock): Promise<boolean>;
|
|
19
|
+
/** Convenience for pre-checks: the live lock on this root, or null (absent or stale). */
|
|
20
|
+
declare function liveServerLock(root: string): Promise<ServerLock | null>;
|
|
21
|
+
/** Writes the lock atomically (tmp + rename; the parent directory must already exist). */
|
|
22
|
+
declare function acquireServerLock(root: string, lock: ServerLock): void;
|
|
23
|
+
/** Removes the lock if it is still ours (best-effort; never throws on shutdown paths). */
|
|
24
|
+
declare function releaseServerLock(root: string): void;
|
|
25
|
+
|
|
26
|
+
export { type ServerLock, acquireServerLock, isServerLockAlive, liveServerLock, parseServerLock, readServerLock, releaseServerLock, serverLockPath };
|
package/dist/lock.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
acquireServerLock,
|
|
3
|
+
isServerLockAlive,
|
|
4
|
+
liveServerLock,
|
|
5
|
+
parseServerLock,
|
|
6
|
+
readServerLock,
|
|
7
|
+
releaseServerLock,
|
|
8
|
+
serverLockPath
|
|
9
|
+
} from "./chunk-BQZC56BR.js";
|
|
10
|
+
import "./chunk-B5IP37ZQ.js";
|
|
11
|
+
export {
|
|
12
|
+
acquireServerLock,
|
|
13
|
+
isServerLockAlive,
|
|
14
|
+
liveServerLock,
|
|
15
|
+
parseServerLock,
|
|
16
|
+
readServerLock,
|
|
17
|
+
releaseServerLock,
|
|
18
|
+
serverLockPath
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=lock.js.map
|
package/dist/lock.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** What `penguin server status` prints, as one line of JSON. */
|
|
2
|
+
interface MachineStatus {
|
|
3
|
+
/** A server owns this root right now: its pid is alive and its port answers. */
|
|
4
|
+
running: boolean;
|
|
5
|
+
/** The live server's port and pid; null when nothing is running. */
|
|
6
|
+
port: number | null;
|
|
7
|
+
pid: number | null;
|
|
8
|
+
/**
|
|
9
|
+
* This machine's own id, or null when it has none yet — the id is minted the first time a
|
|
10
|
+
* server boots here, so an installed-but-never-run machine legitimately has none, and
|
|
11
|
+
* saying null is better than minting one to answer a question.
|
|
12
|
+
*/
|
|
13
|
+
machineId: string | null;
|
|
14
|
+
}
|
|
15
|
+
/** `dbPath` may be elsewhere (ADELIE_WEB_DB, or its pre-rename PENGUIN_WEB_DB), as everywhere else that reads this database. */
|
|
16
|
+
declare function readMachineStatus(root: string, dbPath?: string): Promise<MachineStatus>;
|
|
17
|
+
|
|
18
|
+
export { type MachineStatus, readMachineStatus };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MachinesRepo
|
|
3
|
+
} from "./chunk-HMTT2PX4.js";
|
|
4
|
+
import {
|
|
5
|
+
liveServerLock
|
|
6
|
+
} from "./chunk-BQZC56BR.js";
|
|
7
|
+
import {
|
|
8
|
+
openDatabaseReadOnly
|
|
9
|
+
} from "./chunk-ZZUQGQD6.js";
|
|
10
|
+
import "./chunk-B5IP37ZQ.js";
|
|
11
|
+
|
|
12
|
+
// src/machine-status.ts
|
|
13
|
+
import fs from "fs";
|
|
14
|
+
import path from "path";
|
|
15
|
+
async function readMachineStatus(root, dbPath = path.join(root, "web.db")) {
|
|
16
|
+
const lock = await liveServerLock(root);
|
|
17
|
+
return {
|
|
18
|
+
running: lock !== null,
|
|
19
|
+
port: lock?.port ?? null,
|
|
20
|
+
pid: lock?.pid ?? null,
|
|
21
|
+
machineId: readMachineId(dbPath)
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function readMachineId(dbPath) {
|
|
25
|
+
if (!fs.existsSync(dbPath)) return null;
|
|
26
|
+
const db = openDatabaseReadOnly(dbPath);
|
|
27
|
+
try {
|
|
28
|
+
return new MachinesRepo(db).peekOwnId();
|
|
29
|
+
} catch {
|
|
30
|
+
return null;
|
|
31
|
+
} finally {
|
|
32
|
+
db.close();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
readMachineStatus
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=machine-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/machine-status.ts"],"sourcesContent":["/**\n * \"Is a server running on this data root, and which machine is this?\" — answered from the\n * root itself, by whoever can read it, with no server needed and safely while one runs (the\n * same terms as `penguin auth token`, which writes to this database live).\n *\n * Exported as `@adelie/server/machine-status` for `penguin server status`, which\n * is how a CONTROLLER asks: it runs that one command over ssh and reads back JSON. The\n * question used to be asked in shell — `cat` the lock, `sed` the pid out of it, `kill -0`,\n * `cat` a second file for the id — which meant a parser on this side for a format with no\n * definition, and no answer at all from a Windows remote, `kill -0` having no cmd.exe\n * equivalent. Asking the machine's own CLI moves both problems to the side that has Node.\n *\n * Liveness is the local lock's own test (pid alive AND the port accepting), which the shell\n * version could not do: it only had `kill -0`, and a recycled pid reads as a live server.\n */\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { openDatabaseReadOnly } from \"./db/database.js\";\nimport { MachinesRepo } from \"./db/repos/machines.js\";\nimport { liveServerLock } from \"./lock.js\";\n\n/** What `penguin server status` prints, as one line of JSON. */\nexport interface MachineStatus {\n /** A server owns this root right now: its pid is alive and its port answers. */\n running: boolean;\n /** The live server's port and pid; null when nothing is running. */\n port: number | null;\n pid: number | null;\n /**\n * This machine's own id, or null when it has none yet — the id is minted the first time a\n * server boots here, so an installed-but-never-run machine legitimately has none, and\n * saying null is better than minting one to answer a question.\n */\n machineId: string | null;\n}\n\n/** `dbPath` may be elsewhere (ADELIE_WEB_DB, or its pre-rename PENGUIN_WEB_DB), as everywhere else that reads this database. */\nexport async function readMachineStatus(\n root: string,\n dbPath: string = path.join(root, \"web.db\"),\n): Promise<MachineStatus> {\n const lock = await liveServerLock(root);\n return {\n running: lock !== null,\n port: lock?.port ?? null,\n pid: lock?.pid ?? null,\n machineId: readMachineId(dbPath),\n };\n}\n\n/**\n * Reads the id and changes nothing — and cannot: the connection is read-only.\n *\n * `openDatabaseReadOnly`, never `openDatabase`: the latter is the SCHEMA path — CREATE TABLE,\n * the ensureColumn list, an ALTER with a backfill, and the migrations. A controller asking a\n * machine what it is would then reshape that machine's database under the prepared statements\n * of the server running there, on a build that may be older than this question. A read-only\n * open makes that impossible rather than merely not done.\n *\n * Existence-checked first, because opening would create the file (and its directory) on a\n * root no server has ever used — a probe must not leave a data root behind it. A machine\n * whose database predates the `machine` table answers with no id rather than an error: it is\n * one that has never run a build that mints one, which is the truth about it.\n */\nfunction readMachineId(dbPath: string): string | null {\n if (!fs.existsSync(dbPath)) return null;\n const db = openDatabaseReadOnly(dbPath);\n try {\n return new MachinesRepo(db).peekOwnId();\n } catch {\n return null;\n } finally {\n db.close();\n }\n}\n"],"mappings":";;;;;;;;;;;;AAeA,OAAO,QAAQ;AACf,OAAO,UAAU;AAqBjB,eAAsB,kBACpB,MACA,SAAiB,KAAK,KAAK,MAAM,QAAQ,GACjB;AACxB,QAAM,OAAO,MAAM,eAAe,IAAI;AACtC,SAAO;AAAA,IACL,SAAS,SAAS;AAAA,IAClB,MAAM,MAAM,QAAQ;AAAA,IACpB,KAAK,MAAM,OAAO;AAAA,IAClB,WAAW,cAAc,MAAM;AAAA,EACjC;AACF;AAgBA,SAAS,cAAc,QAA+B;AACpD,MAAI,CAAC,GAAG,WAAW,MAAM,EAAG,QAAO;AACnC,QAAM,KAAK,qBAAqB,MAAM;AACtC,MAAI;AACF,WAAO,IAAI,aAAa,EAAE,EAAE,UAAU;AAAA,EACxC,QAAQ;AACN,WAAO;AAAA,EACT,UAAE;AACA,OAAG,MAAM;AAAA,EACX;AACF;","names":[]}
|