ts-pantry 0.11.171 → 0.11.172
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/bin/cli.js +1 -1
- package/dist/bin/desktop.js +1 -1
- package/dist/chunk-35x1m26s.js +2 -0
- package/dist/{chunk-m0v0mb32.js → chunk-a0qvjn4a.js} +1 -1
- package/dist/src/native/index.js +1 -1
- package/dist/src/native/release.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-0hxqkw7h.js +0 -2
package/dist/bin/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{q}from"../chunk-7q8as4h2.js";import{r,f,b,D,H,ye,k,R,I,O,W,ke,ve,n,X,z,u,Z,E,_,L,M,l,ee,Ce,je,Se,ha,fa}from"../chunk-h0t00ce5.js";import{a,C}from"../chunk-02k5jygc.js";import"../chunk-y67kbve9.js";import"../chunk-t965ankb.js";import{Sa}from"../chunk-hnhjtezs.js";import{d}from"../chunk-
|
|
2
|
+
import{q}from"../chunk-7q8as4h2.js";import{r,f,b,D,H,ye,k,R,I,O,W,ke,ve,n,X,z,u,Z,E,_,L,M,l,ee,Ce,je,Se,ha,fa}from"../chunk-h0t00ce5.js";import{a,C}from"../chunk-02k5jygc.js";import"../chunk-y67kbve9.js";import"../chunk-t965ankb.js";import{Sa}from"../chunk-hnhjtezs.js";import{d}from"../chunk-35x1m26s.js";import m from"node:fs";import v from"node:path";import s from"node:process";C();async function ae(t="src/pantry"){if(!m.existsSync(t))throw Error(`Pantry directory not found: ${t}. Please run 'bun ./bin/cli.ts update-pantry' first.`);let e=[];function o(i,c=""){let g=m.readdirSync(i,{withFileTypes:!0}),p=v.join(i,"package.yml");if(c&&m.existsSync(p))e.push(c);for(let S of g)if(S.isDirectory()&&!S.name.startsWith(".")){let w=c?`${c}/${S.name}`:S.name,x=v.join(i,S.name);o(x,w)}}return o(t),console.log(`\uD83D\uDCE6 Found ${e.length} packages in local pantry`),e.sort()}async function ce(t=!1){async function e(p){let S=new URL("https://s3.amazonaws.com/dist.tea.xyz/");if(S.searchParams.set("list-type","2"),S.searchParams.set("prefix",""),S.searchParams.set("max-keys","1000"),p)S.searchParams.set("continuation-token",p);let w=await fetch(S.toString());if(!w.ok)throw Error(`Failed to fetch S3 listing: ${w.status}`);let x=await w.text(),B=[],J=x.match(/<Key>([^<]+)<\/Key>/g);if(J)for(let G of J){let U=G.replace(/<Key>([^<]+)<\/Key>/,"$1");B.push({Key:U})}let y=x.includes("<IsTruncated>true</IsTruncated>"),F=x.match(/<NextContinuationToken>([^<]+)<\/NextContinuationToken>/),h=F?F[1]:void 0;return{IsTruncated:y,NextContinuationToken:h,Contents:B}}console.log("Scraping packages from S3 registry...");let o=new Set,i;do{let p=await e(i);for(let S of p.Contents){let w=S.Key,x=w.split("/");if(x.length===0)continue;if(x[0].startsWith(".")||x[0].includes(" ")||w.match(/\.(md|txt|yml|yaml|json)$/i))continue;let B=["darwin","linux","windows"],J=-1;for(let y=1;y<x.length;y++)if(B.includes(x[y])){J=y;break}if(J>0){let y=x.slice(0,J).join("/");if(y.includes("."))o.add(y)}else if(x.length>=2&&x[0].includes(".")&&!x[1].startsWith("v")&&!x[1].match(/^\d/)){let y=`${x[0]}/${x[1]}`;o.add(y)}else if(x.length>=1&&x[0].includes("."))o.add(x[0])}i=p.NextContinuationToken,console.log(`Found ${o.size} packages so far...`)}while(i);let c=Array.from(o).sort(),g=[];for(let p of c){if(!p.includes(".")||p.match(/^[a-z0-9.-]+\.[a-z]{2,}(\/[\w.-]+){0,20}$/i)===null)continue;if(p.endsWith("/README.rst")||p.endsWith("/README")||p.includes("/docs/"))continue;if(p.endsWith("/.pkgroot"))continue;if(["amazon.com/aws","charm.sh","code.videolan.org","crates.io"].includes(p))continue;g.push(p)}return console.log(`\uD83D\uDCE6 Found ${g.length} valid packages in registry`),g}async function le(t,e){let i=`/**
|
|
3
3
|
* Constants used throughout the ts-pantry package
|
|
4
4
|
* This file is auto-generated from ${e}. Do not edit manually.
|
|
5
5
|
* Generated on ${new Date().toISOString()}
|
package/dist/bin/desktop.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import{q}from"../chunk-7q8as4h2.js";import"../chunk-t965ankb.js";import"../chunk-h6wpf5z0.js";import{G,K,fe,Ye}from"../chunk-y9k1j6rh.js";import{d}from"../chunk-
|
|
2
|
+
import{q}from"../chunk-7q8as4h2.js";import"../chunk-t965ankb.js";import"../chunk-h6wpf5z0.js";import{G,K,fe,Ye}from"../chunk-y9k1j6rh.js";import{d}from"../chunk-35x1m26s.js";import{chmodSync as k,mkdirSync as h,renameSync as P,rmSync as b,writeFileSync as f}from"node:fs";import{homedir as S}from"node:os";import{isAbsolute as x,join as s}from"node:path";var a=(t)=>t.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'");function D(t,e,r){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
3
3
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
4
4
|
<plist version="1.0"><dict>
|
|
5
5
|
<key>Label</key><string>dev.pantry.desktop</string>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Te}from"./chunk-02k5jygc.js";import{d}from"./chunk-
|
|
1
|
+
import{Te}from"./chunk-02k5jygc.js";import{d}from"./chunk-35x1m26s.js";import{existsSync as Qe,readFileSync as et}from"node:fs";import{join as tt,resolve as J,sep as rt}from"node:path";var ko={revision:"e1d6e40100ae2c35c96f9d96ed826f08ddf1f48b",version:"0.0.367"};function Re(r){let i=r.split(".");return i.length>1&&i.every((o)=>/^[A-Za-z]\w*$/.test(o))}function s(r,i){let o=J(r,i);if(o===J(r)||!o.startsWith(`${J(r)}${rt}`))throw Error(`Native output must be inside the project: ${i}`);return o}function p(r,i=!1){let o=tt(r,"pantry.json");if(!Qe(o)){if(i)throw Error("Native publishing requires pantry.json with a native configuration");return}let n=JSON.parse(et(o,"utf8")).native;if(!n){if(i)throw Error("pantry.json must declare native app settings");return}if(n.environment!==void 0&&(typeof n.environment!=="string"||!/^[a-z][a-z0-9-]*$/.test(n.environment)))throw Error("Invalid native release environment name");if(n.runtime&&(!/^[a-f0-9]{40}$/.test(n.runtime.revision)||!/^\d+\.\d+\.\d+$/.test(n.runtime.version)))throw Error("Craft requires an immutable 40-character Git revision and an exact version");for(let c of[n.build,...n.checks?.before??[],...n.checks?.after??[]])if(c!==void 0&&(!Array.isArray(c)||!c.length||c.some((a)=>typeof a!=="string"||!a)))throw Error("Native commands must be nonempty argument arrays");if(n.macos?.maxBundleSize!==void 0&&(!Number.isSafeInteger(n.macos.maxBundleSize)||n.macos.maxBundleSize<=0))throw Error("maxBundleSize must be a positive byte count");if(n.registry){if(typeof n.registry.domain!=="string"||!/^[a-z0-9](?:[a-z0-9._-]|\/(?=[a-z0-9])){0,213}$/i.test(n.registry.domain)||n.registry.domain.includes("..")||n.registry.domain.endsWith("/"))throw Error("Native registry publishing requires an exact package domain");if(n.registry.url){let c=new URL(n.registry.url);if(c.username||c.password||c.search||c.hash||c.protocol!=="https:"&&!(c.protocol==="http:"&&["127.0.0.1","localhost","[::1]"].includes(c.hostname)))throw Error("Native registry URL must use HTTPS, or HTTP on loopback for testing")}if(!n.macos?.notarize)throw Error("Native registry apps require notarized macOS distribution")}if(n.android){if(s(r,n.android.bundle),!Re(n.android.packageName)||!n.android.track||!["draft","completed","inProgress"].includes(n.android.status))throw Error("Android publishing requires a package name, track and explicit release status");let c=n.android.userFraction;if(n.android.status==="inProgress"?!(typeof c==="number"&&c>0&&c<1):c!==void 0)throw Error("Only an inProgress rollout requires userFraction between zero and one")}return n}import it from"node:process";import{spawn as nt}from"node:child_process";var t=(r,i,o={})=>new Promise((n,c)=>{if(o.timeoutMs!==void 0&&(!Number.isSafeInteger(o.timeoutMs)||o.timeoutMs<=0||o.timeoutMs>2147483647)){c(Error("A native command timeout must be a positive integer no greater than 2147483647ms"));return}let a=nt(r,i,{cwd:o.cwd,env:o.env??it.env,stdio:o.inherit?"inherit":[o.input===void 0?"ignore":"pipe","pipe","pipe"]}),u="",m="";a.stdout?.on("data",(h)=>{u+=h.toString()}),a.stderr?.on("data",(h)=>{m+=h.toString()});let y,g,f=!1,l=()=>{if(y!==void 0)clearTimeout(y)},v=()=>{a.stdin?.destroy(),a.stdout?.destroy(),a.stderr?.destroy()};if(a.once("error",(h)=>{g=f?Error(g.message,{cause:h}):h,l()}),a.stdin?.once("error",(h)=>{g=f?Error(g.message,{cause:h}):h}),a.once("exit",()=>{if(!f)return;v()}),a.once("close",(h)=>{if(l(),g)c(g);else n({exitCode:h??1,stdout:u,stderr:m})}),o.timeoutMs!==void 0)y=setTimeout(()=>{if(f=!0,g=Error(`Native command timed out after ${o.timeoutMs}ms: ${r}`),a.exitCode!==null||a.signalCode)v();else try{a.kill("SIGKILL")}catch(h){g=Error(g.message,{cause:h})}},o.timeoutMs);if(o.input!==void 0)a.stdin?.end(o.input)});function e(r,i){if(i.exitCode!==0)throw Error(`${r} failed (${i.exitCode}): ${i.stdout}
|
|
2
2
|
${i.stderr}`.trim());return i}import z from"node:process";import{createHash as at}from"node:crypto";import{existsSync as k,mkdirSync as ct,readFileSync as X,rmSync as ut,writeFileSync as pt}from"node:fs";import{join as N,resolve as dt}from"node:path";var H="(?:0|[1-9]\\d*)",ce="(?:0|[1-9]\\d*|\\d*[A-Za-z-][0-9A-Za-z-]*)",pe=`${H}\\.${H}\\.${H}(?:-${ce}(?:\\.${ce})*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?`,ot=new RegExp(`^${pe}$`),st=new RegExp(`^pantry\\s+(${pe})(?:\\s+\\([^\\r\\n()]+\\))?$`);if(!ot.test(d))throw Error("The native SDK requires a valid paired Pantry SDK/CLI version");var Oe=`^${d}`;async function Z(r,i,o){let n=`ts-pantry@${d} native provisioning requires Pantry ${Oe} on PATH in ${i}.`,c="Install or upgrade the Pantry CLI on that PATH before retrying.",a;try{a=await r("pantry",["--version"],{cwd:i,env:o,timeoutMs:1e4})}catch(m){throw Error(`${n} Could not run \`pantry --version\`. Install or upgrade the Pantry CLI on that PATH before retrying.`,{cause:m})}if(a.exitCode!==0)throw Error(`${n} \`pantry --version\` exited ${a.exitCode}. Install or upgrade the Pantry CLI on that PATH before retrying.`);let u=st.exec(a.stdout.trim()||a.stderr.trim())?.[1];if(!u)throw Error(`${n} \`pantry --version\` returned an invalid native CLI version. Install or upgrade the Pantry CLI on that PATH before retrying.`);if(Te(Oe,[u])!==u)throw Error(`${n} Found ${u}. Install or upgrade the Pantry CLI on that PATH before retrying.`)}function Ut(r,i=k){for(let o of[N(r,"bin","zig"),N(r,"zig")])if(i(o))return o;return null}function _a(r,i,o=z.arch){if(!/^[a-f0-9]{40}$/.test(r))throw Error("Craft revision must be immutable");if(!/^\d+\.\d+(?:\.\d+)?$/.test(i))throw Error("A valid minimum macOS version is required");let n=o==="arm64"?"aarch64":o==="x64"?"x86_64":void 0;if(!n)throw Error(`Unsupported native architecture: ${o}`);return`revision=${r};ReleaseSmall;js-runtime=false;target=${n}-macos.${i}`}function Ct(r,i,o=z.arch){if(!r.runtime)throw Error("No Craft runtime configured");return at("sha256").update(`${_a(r.runtime.revision,i,o)};version=${r.runtime.version};schema=1`).digest("hex")}function jt(r){let i=r.workspaces?.[""]?.system?.["ziglang.org"];if(typeof i!=="string"||!/^\d+\.\d+\.\d+(?:-[\w.-]+)?(?:\+[\w.-]+)?$/.test(i))throw Error("Craft must lock an exact Zig compiler version");return i}function St(r){if(!k(N(r,"packages/zig/build.zig.zon")))throw Error("Craft dependency manifest is missing");let i=N(r,".github/actions/first-party-zig-deps/pins.env");if(!k(i))return{kind:"manifest"};let o=X(i,"utf8");return{kind:"legacy-pins",sources:[["zig-js","zig_js"],["zig-regex","zig_regex"],["zig-gc","zig_gc"]].map(([c,a])=>{let u=o.match(new RegExp(`^${a}=([a-f0-9]{40})$`,"m"))?.[1];if(!u)throw Error(`Missing upstream dependency pin: ${a}`);return{repository:`zig-utils/${c}`,revision:u,directory:c}})}}async function Ta(r,i,o,n={}){let c=n.env??z.env;if(c.CRAFT_BIN){let w=dt(r,c.CRAFT_BIN);if(!k(w))throw Error(`CRAFT_BIN does not exist: ${w}`);return w}if(!i.runtime)return;if(z.platform!=="darwin")throw Error("The configured macOS Craft runtime must be built on macOS");let a=n.command??t,{revision:u,version:m}=i.runtime,y=_a(u,o),g=N(r,".pantry/native/runtimes",Ct(i,o)),f=N(g,"Tools/craft"),l=N(f,"packages/zig/zig-out/bin/craft"),v=N(f,".pantry-runtime-profile"),h=()=>!k(l)||!k(v)||X(v,"utf8")!==y;if(h())await Z(a,k(f)?f:r,c);let E=async(w,I,P=c,x=!1)=>e(w[0],await a(w[0],w.slice(1),{cwd:I,env:P,inherit:x})),b=async(w,I,P)=>{if(!/^[a-f0-9]{40}$/.test(I))throw Error(`Missing immutable dependency pin: ${w}`);if(ct(P,{recursive:!0}),!k(N(P,".git")))await E(["git","init","--quiet"],P),await E(["git","remote","add","origin",`https://github.com/${w}.git`],P),await E(["git","fetch","--quiet","--depth","1","origin",I],P),await E(["git","checkout","--quiet","--detach","FETCH_HEAD"],P);let x=(await E(["git","rev-parse","HEAD"],P)).stdout.trim();if(x!==I)throw Error(`Unexpected source revision in ${P}: ${x}`);if((await E(["git","status","--porcelain","--untracked-files=no"],P)).stdout.trim())throw Error(`Modified runtime source in ${P}`)};await b("craft-native/craft",u,f);let R=St(f);if(R.kind==="legacy-pins")for(let w of R.sources)await b(w.repository,w.revision,N(g,"Libraries",w.directory));if(h()){await Z(a,f,c),ut(v,{force:!0});let w=JSON.parse(X(N(f,"pantry.lock"),"utf8")),I=jt(w);await E(["pantry","install",`ziglang.org@${I}`,"--no-save","--ignore-scripts"],f,c,!0);let P=N(f,"pantry/ziglang.org",`v${I}`),x=Ut(P);if(!x)throw Error(`Locked Zig compiler is missing under ${P}`);let M={...c,CRAFT_ZIG:x};if(R.kind==="manifest")await E(["bun","scripts/zig.ts","--core","build","--fetch"],f,M,!0);let ae=(await E(["xcrun","--sdk","macosx","--show-sdk-path"],f)).stdout.trim();if(!ae)throw Error("The macOS SDK is required");let Xe=y.split("target=")[1];await E(["bun","scripts/zig.ts","--core","--versioned","build","-Doptimize=ReleaseSmall","-Djs-runtime=false",`-Dtarget=${Xe}`,`-Dmacos-sdk=${ae}`],f,M,!0),pt(v,y)}let se=await E([l,"--version"],f);if(!`${se.stdout}${se.stderr}`.includes(`craft version ${m}`))throw Error(`Craft does not match configured version ${m}`);return l}import ft from"node:process";import{existsSync as fe,mkdirSync as lt,mkdtempSync as mt,readFileSync as yt,rmSync as de,writeFileSync as le}from"node:fs";import{tmpdir as gt}from"node:os";import{join as L,resolve as ht}from"node:path";function Q(r){return r.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function Dt(r){let i=(o)=>typeof o==="boolean"?`<${o}/>`:typeof o==="string"?`<string>${Q(o)}</string>`:Array.isArray(o)&&o.every((n)=>typeof n==="string")?`<array>${o.map((n)=>`<string>${Q(n)}</string>`).join("")}</array>`:(()=>{throw Error("Unsupported entitlement value")})();return`<?xml version="1.0" encoding="UTF-8"?>
|
|
3
3
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
4
4
|
<plist version="1.0"><dict>${Object.entries(r).map(([o,n])=>`<key>${Q(o)}</key>${i(n)}`).join("")}</dict></plist>
|
package/dist/src/native/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../chunk-02k5jygc.js";import{ko,Re,s,p,t,e,Oe,Ut,_a,Ct,jt,St,Ta,Dt,vo,xo,Le,Va,qa,Y,B,Ra,Oa,La,Me,j,Ma,Ne,ue,Fe,Na,Fa,he,At,S}from"../../chunk-
|
|
1
|
+
import"../../chunk-02k5jygc.js";import{ko,Re,s,p,t,e,Oe,Ut,_a,Ct,jt,St,Ta,Dt,vo,xo,Le,Va,qa,Y,B,Ra,Oa,La,Me,j,Ma,Ne,ue,Fe,Na,Fa,he,At,S}from"../../chunk-a0qvjn4a.js";import{T,De,Ae,Ie,Da,Ia}from"../../chunk-hnhjtezs.js";import{createHash as Z,createSign as Q}from"node:crypto";import{createReadStream as U,existsSync as ee,statSync as te}from"node:fs";import{basename as re}from"node:path";import{finished as ie}from"node:stream/promises";var M="https://androidpublisher.googleapis.com",q="https://oauth2.googleapis.com/token";async function Ke(r,i={}){if(!ee(r.bundle)||!r.bundle.endsWith(".aab"))throw Error("Google Play delivery requires an existing signed .aab");if(!Re(r.packageName)||!r.track||!["draft","completed","inProgress"].includes(r.status))throw Error("Google Play requires a package, track and explicit release status");if(r.status==="inProgress"?!(typeof r.userFraction==="number"&&r.userFraction>0&&r.userFraction<1):r.userFraction!==void 0)throw Error("Only an inProgress release requires userFraction between zero and one");let o=JSON.parse(r.serviceAccount);if(o.type!=="service_account"||!o.client_email||!o.private_key)throw Error("A Google Play service account JSON key is required");let a=i.fetch??fetch,c=Math.floor((i.now?.()??Date.now())/1000),n=(b)=>Buffer.from(JSON.stringify(b)).toString("base64url"),u=`${n({alg:"RS256",typ:"JWT"})}.${n({iss:o.client_email,scope:"https://www.googleapis.com/auth/androidpublisher",aud:q,iat:c,exp:c+3600})}`,v=`${u}.${Q("RSA-SHA256").update(u).sign(o.private_key,"base64url")}`,f=await a(q,{method:"POST",body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:v})});if(!f.ok)throw Error(`Google Play authentication failed (${f.status})`);let d=await f.json();if(!d.access_token)throw Error("Google did not return an access token");let l={Authorization:`Bearer ${d.access_token}`,"Content-Type":"application/json"},g=`/androidpublisher/v3/applications/${encodeURIComponent(r.packageName)}/edits`,m=async(b,R,N)=>{let h=await a(`${M}${b}`,{method:R,headers:l,...N!==void 0?{body:JSON.stringify(N)}:{},signal:AbortSignal.timeout(120000)});if(!h.ok)throw Error(`Google Play ${R} failed (${h.status}): ${await h.text()}`);return h.status===204?{}:await h.json()},w=await m(g,"POST",{});if(typeof w.id!=="string"||!w.id)throw Error("Google Play did not return an edit ID");let A=`${g}/${encodeURIComponent(w.id)}`,C=!1;try{let b=Z("sha256");for await(let E of U(r.bundle))b.update(E);let R=b.digest("hex"),N=U(r.bundle),h=ie(N).then(()=>{return},(E)=>E),P;try{P=await a(`${M}/upload${A}/bundles?uploadType=media`,{method:"POST",headers:{Authorization:l.Authorization,"Content-Type":"application/octet-stream","Content-Length":String(te(r.bundle).size)},body:N,duplex:"half",signal:AbortSignal.timeout(120000)})}finally{N.destroy();let E=await h;if(E&&E.code!=="ERR_STREAM_PREMATURE_CLOSE")throw E}if(!P.ok)throw Error(`Google Play bundle upload failed (${P.status}): ${await P.text()}`);let x=await P.json();if(!Number.isSafeInteger(x.versionCode)||x.versionCode<=0||x.sha256?.toLowerCase()!==R)throw Error("Google Play uploaded bundle does not match the local SHA-256 and version code");if(await m(`${A}/tracks/${encodeURIComponent(r.track)}`,"PUT",{track:r.track,releases:[{status:r.status,versionCodes:[String(x.versionCode)],...r.releaseName?{name:r.releaseName}:{},...r.userFraction!==void 0?{userFraction:r.userFraction}:{},...r.releaseNotes?{releaseNotes:r.releaseNotes}:{}}]}),await m(`${A}:validate`,"POST"),!r.validateOnly){if((await m(`${A}:commit?changesInReviewBehavior=ERROR_IF_IN_REVIEW`,"POST")).id!==w.id)throw Error("Google Play commit did not confirm the edit ID");C=!0}return{schemaVersion:1,bundle:re(r.bundle),packageName:r.packageName,track:r.track,status:r.status,versionCode:x.versionCode,sha256:R,editId:w.id,validated:!0,committed:C,completedAt:new Date().toISOString()}}finally{if(!C)await m(A,"DELETE")}}import{chmodSync as ae,existsSync as G,mkdirSync as ne}from"node:fs";import{dirname as oe,resolve as se}from"node:path";import J from"node:process";var ce=String.raw`
|
|
2
2
|
import Foundation
|
|
3
3
|
import Security
|
|
4
4
|
import CryptoKit
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{qe}from"../../chunk-qhf2sgz4.js";import"../../chunk-02k5jygc.js";import{t,e,S}from"../../chunk-
|
|
1
|
+
import{qe}from"../../chunk-qhf2sgz4.js";import"../../chunk-02k5jygc.js";import{t,e,S}from"../../chunk-a0qvjn4a.js";async function se(s,a,o={}){if(!["patch","minor","major"].includes(a.bump))throw Error("Native release bump must be patch, minor or major");let i=o.command??t,r=async(m)=>e("Native release Git check",await i("git",m,{cwd:s})).stdout.trim(),n=await r(["rev-parse","HEAD"]);if(await r(["branch","--show-current"])!=="main")throw Error("Native releases must be cut from main");if(await r(["status","--porcelain","--untracked-files=normal"]))throw Error("Commit native app source before releasing");await S(s,"check",{command:i}),await qe({cwd:s,release:a.bump,expectedSource:n,recursive:!0,commit:!a.dryRun,tag:!a.dryRun,push:!a.dryRun,dryRun:a.dryRun,yes:!0})}export{se as releaseNativeApp};
|
package/package.json
CHANGED
package/dist/chunk-0hxqkw7h.js
DELETED