petdex 1.2.1 → 1.2.2

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.
Files changed (2) hide show
  1. package/dist/petdex.js +1 -1
  2. package/package.json +1 -1
package/dist/petdex.js CHANGED
@@ -59,7 +59,7 @@ ${k("gray",c)}`:""}`}default:{let X=J?`${k("cyan",c)} `:"",W=J?k("cyan",h8):"",
59
59
  `).length,U=J?2:1;return`${V}${X}${NY({output:$.output,cursor:this.cursor,options:this.options,maxItems:$.maxItems,columnPadding:X.length,rowPadding:K+U,style:(F,j)=>Q(F,F.disabled?"disabled":j?"active":"inactive")}).join(`
60
60
  ${X}`)}
61
61
  ${W}
62
- `}}}}).prompt()};var JH=`${k("gray",c)} `;var U4=_1(d2(),1),I=_1(Q3(),1);var J3={name:"petdex",version:"1.2.1",description:"CLI for Petdex. Install, browse, and submit Codex pets from your terminal.",keywords:["petdex","codex","openai-codex","pets","pet","mascot","cli","terminal","animated","pixel-art","developer-tools","fun"],homepage:"https://petdex.dev",repository:{type:"git",url:"git+https://github.com/crafter-station/petdex.git",directory:"packages/petdex-cli"},license:"MIT",type:"module",engines:{node:">=20"},bin:{petdex:"dist/petdex.js"},files:["dist","README.md","AGENTS.md","CLAUDE.md"],scripts:{build:"bun build ./bin/petdex.ts --target=node --outfile=./dist/petdex.js --minify --external @napi-rs/keyring",postbuild:`node -e 'const f="./dist/petdex.js";const fs=require("fs");const c=fs.readFileSync(f,"utf8");if(!c.startsWith("#!")){fs.writeFileSync(f,"#!/usr/bin/env node\\n"+c)}fs.chmodSync(f,0o755)'`,typecheck:"tsc --noEmit"},dependencies:{"@clack/prompts":"^1.3.0",jszip:"^3.10.1",picocolors:"^1.1.1"},optionalDependencies:{"@napi-rs/keyring":"^1.1.6"},devDependencies:{"@types/node":"^26.0.0","bun-types":"^1.3.13",typescript:"^7.0.2"}};var OW=new Set(["assets.petdex.dev"]);function o2($){try{let Q=new URL($);if(Q.protocol!=="https:")return!1;return OW.has(Q.hostname)}catch{return!1}}var i2=["profile","email","openid","offline_access"];async function q3({petdexUrl:$,env:Q=process.env,fetchImpl:J=fetch,warnOnFallback:q=!0}){let{CLERK_ISSUER:Y,CLERK_OAUTH_CLIENT_ID:G}=Q;if(Y&&G)return{issuer:Y,clientId:G,scopes:i2};try{let V=await J(`${$}/api/cli/auth-config`,{signal:AbortSignal.timeout(3000)});if(V.ok){let X=await V.json(),W=typeof X.issuer==="string"?X.issuer:null,K=typeof X.clientId==="string"?X.clientId:null,U=Array.isArray(X.scopes)?X.scopes.filter((F)=>typeof F==="string"):null;if(W&&K)return{issuer:Y??W,clientId:G??K,scopes:U&&U.length>0?U:i2}}}catch{}if(q)console.error("petdex: unable to refresh auth configuration; using fallback authentication values.");return{issuer:Y??"https://clerk.petdex.dev",clientId:G??"LcThwEayl6KAA1Qm",scopes:i2}}import{spawn as hW}from"node:child_process";import{createServer as BW}from"node:http";class h extends Error{code;constructor($,Q){super(Q);this.name="ClerkCliAuthError",this.code=$}}var DW=`<!doctype html>
62
+ `}}}}).prompt()};var JH=`${k("gray",c)} `;var U4=_1(d2(),1),I=_1(Q3(),1);var J3={name:"petdex",version:"1.2.2",description:"CLI for Petdex. Install, browse, and submit Codex pets from your terminal.",keywords:["petdex","codex","openai-codex","pets","pet","mascot","cli","terminal","animated","pixel-art","developer-tools","fun"],homepage:"https://petdex.dev",repository:{type:"git",url:"git+https://github.com/crafter-station/petdex.git",directory:"packages/petdex-cli"},license:"MIT",type:"module",engines:{node:">=20"},bin:{petdex:"dist/petdex.js"},files:["dist","README.md","AGENTS.md","CLAUDE.md"],scripts:{build:"bun build ./bin/petdex.ts --target=node --outfile=./dist/petdex.js --minify --external @napi-rs/keyring",postbuild:`node -e 'const f="./dist/petdex.js";const fs=require("fs");const c=fs.readFileSync(f,"utf8");if(!c.startsWith("#!")){fs.writeFileSync(f,"#!/usr/bin/env node\\n"+c)}fs.chmodSync(f,0o755)'`,typecheck:"tsc --noEmit"},dependencies:{"@clack/prompts":"^1.3.0",jszip:"^3.10.1",picocolors:"^1.1.1"},optionalDependencies:{"@napi-rs/keyring":"^1.1.6"},devDependencies:{"@types/node":"^26.0.0","bun-types":"^1.3.13",typescript:"^7.0.2"}};var OW=new Set(["assets.petdex.dev"]);function o2($){try{let Q=new URL($);if(Q.protocol!=="https:")return!1;return OW.has(Q.hostname)}catch{return!1}}var i2=["profile","email","openid","offline_access"];async function q3({petdexUrl:$,env:Q=process.env,fetchImpl:J=fetch,warnOnFallback:q=!0}){let{CLERK_ISSUER:Y,CLERK_OAUTH_CLIENT_ID:G}=Q;if(Y&&G)return{issuer:Y,clientId:G,scopes:i2};try{let V=await J(`${$}/api/cli/auth-config`,{signal:AbortSignal.timeout(3000)});if(V.ok){let X=await V.json(),W=typeof X.issuer==="string"?X.issuer:null,K=typeof X.clientId==="string"?X.clientId:null,U=Array.isArray(X.scopes)?X.scopes.filter((F)=>typeof F==="string"):null;if(W&&K)return{issuer:Y??W,clientId:G??K,scopes:U&&U.length>0?U:i2}}}catch{}if(q)console.error("petdex: unable to refresh auth configuration; using fallback authentication values.");return{issuer:Y??"https://clerk.petdex.dev",clientId:G??"LcThwEayl6KAA1Qm",scopes:i2}}import{spawn as hW}from"node:child_process";import{createServer as BW}from"node:http";class h extends Error{code;constructor($,Q){super(Q);this.name="ClerkCliAuthError",this.code=$}}var DW=`<!doctype html>
63
63
  <html>
64
64
  <head><meta charset="utf-8"><title>Authentication complete</title></head>
65
65
  <body><h1>Authentication complete</h1><p>You can close this tab and return to your terminal.</p></body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "petdex",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "CLI for Petdex. Install, browse, and submit Codex pets from your terminal.",
5
5
  "keywords": [
6
6
  "petdex",