@r5n/sisyphus 0.3.35 → 0.3.41
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/README.md +46 -34
- package/dist/cli.js +111 -129
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -60,20 +60,20 @@ sisyphus init --nonInteractive --tag latest
|
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
62
|
# Interactive version creation
|
|
63
|
-
sisyphus
|
|
63
|
+
sisyphus version
|
|
64
64
|
|
|
65
65
|
# Quick version with commit message
|
|
66
|
-
sisyphus
|
|
66
|
+
sisyphus version "feat: add new feature" --packages @org/package-a:minor
|
|
67
67
|
|
|
68
68
|
# Specific version bump
|
|
69
|
-
sisyphus
|
|
69
|
+
sisyphus version --packages @org/core:major @org/utils:patch
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
### 3. Roll Stones (Release)
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
75
|
# Check pending releases
|
|
76
|
-
sisyphus
|
|
76
|
+
sisyphus check
|
|
77
77
|
|
|
78
78
|
# Release with all features
|
|
79
79
|
sisyphus roll --publish --github
|
|
@@ -88,47 +88,59 @@ sisyphus roll --dry-run
|
|
|
88
88
|
Initialize Sisyphus in your project.
|
|
89
89
|
|
|
90
90
|
**Options:**
|
|
91
|
+
- `-i, --ignore <packages>` - Packages to ignore (multiple allowed)
|
|
91
92
|
- `-n, --nonInteractive` - Skip interactive prompts
|
|
92
93
|
- `-o, --overwrite` - Overwrite existing configuration
|
|
93
94
|
- `-s, --single` - Single package mode (non-monorepo)
|
|
94
|
-
- `-i, --ignore <packages>` - Packages to ignore (multiple allowed)
|
|
95
95
|
- `-t, --tag <tag>` - Default release tag (default: "latest")
|
|
96
96
|
|
|
97
|
-
### `sisyphus
|
|
97
|
+
### `sisyphus version`
|
|
98
98
|
Create a new version stone (changeset).
|
|
99
99
|
|
|
100
100
|
**Options:**
|
|
101
|
-
- `-
|
|
102
|
-
- `-
|
|
101
|
+
- `-b, --bump <type>` - Bump type (major/minor/patch)
|
|
102
|
+
- `-d, --dryRun` - Preview changes without creating stone
|
|
103
|
+
- `-f, --filter <string>` - Filter packages by name
|
|
103
104
|
- `-s, --snapshot` - Create snapshot versions
|
|
104
105
|
- `-t, --tag <tag>` - Release tag (e.g., "beta", "alpha")
|
|
105
|
-
- `-
|
|
106
|
+
- `-y, --yes` - Skip confirmation prompt
|
|
106
107
|
|
|
107
108
|
**Examples:**
|
|
108
109
|
```bash
|
|
109
|
-
# Create stone
|
|
110
|
-
sisyphus
|
|
110
|
+
# Create stone interactively
|
|
111
|
+
sisyphus version
|
|
111
112
|
|
|
112
|
-
#
|
|
113
|
-
sisyphus
|
|
113
|
+
# Create stone with specific bump
|
|
114
|
+
sisyphus version --bump minor --filter @org/core
|
|
114
115
|
|
|
115
116
|
# Snapshot release
|
|
116
|
-
sisyphus
|
|
117
|
+
sisyphus version --snapshot --tag dev
|
|
118
|
+
|
|
119
|
+
# Skip confirmation
|
|
120
|
+
sisyphus version --yes
|
|
117
121
|
```
|
|
118
122
|
|
|
119
123
|
### `sisyphus roll`
|
|
120
124
|
Process stones and release packages.
|
|
121
125
|
|
|
122
126
|
**Options:**
|
|
123
|
-
- `-
|
|
124
|
-
- `-
|
|
127
|
+
- `-c, --changelog` - Generate changelog
|
|
128
|
+
- `-d, --dryRun` - Preview release without publishing
|
|
125
129
|
- `-g, --github` - Create GitHub releases
|
|
126
|
-
-
|
|
130
|
+
- `-n, --npm` - Publish to npm
|
|
131
|
+
- `-r, --changelogRoot` - Generate root changelog
|
|
132
|
+
- `-t, --withTags` - Create git tags
|
|
127
133
|
- `--githubToken <token>` - GitHub authentication token
|
|
134
|
+
- `--npmToken <token>` - NPM authentication token
|
|
135
|
+
- `--rootTag <tag>` - Root package tag
|
|
128
136
|
|
|
129
|
-
### `sisyphus
|
|
137
|
+
### `sisyphus check`
|
|
130
138
|
Check current stones and package states.
|
|
131
139
|
|
|
140
|
+
**Options:**
|
|
141
|
+
- `--debug` - Show debug information
|
|
142
|
+
- `--json` - Output in JSON format
|
|
143
|
+
|
|
132
144
|
**Output includes:**
|
|
133
145
|
- Pending stones with version changes
|
|
134
146
|
- Affected packages
|
|
@@ -140,8 +152,8 @@ Show help information for commands.
|
|
|
140
152
|
|
|
141
153
|
```bash
|
|
142
154
|
sisyphus help
|
|
143
|
-
sisyphus help
|
|
144
|
-
sisyphus
|
|
155
|
+
sisyphus help version
|
|
156
|
+
sisyphus version --help
|
|
145
157
|
```
|
|
146
158
|
|
|
147
159
|
## 🔧 Configuration
|
|
@@ -161,7 +173,7 @@ Sisyphus uses `.sisyphus/config.json`:
|
|
|
161
173
|
|
|
162
174
|
```json
|
|
163
175
|
{
|
|
164
|
-
"$schema": "https://
|
|
176
|
+
"$schema": "https://raw.githubusercontent.com/r5n-labs/clis/main/packages/sisyphus/schema.json",
|
|
165
177
|
"tag": "latest",
|
|
166
178
|
"ignore": ["packages/*-internal"],
|
|
167
179
|
"single": false,
|
|
@@ -240,31 +252,31 @@ your-project/
|
|
|
240
252
|
|
|
241
253
|
```bash
|
|
242
254
|
# Monday: Feature development
|
|
243
|
-
sisyphus
|
|
255
|
+
sisyphus version --bump minor --filter @app/core
|
|
244
256
|
|
|
245
257
|
# Tuesday: Bug fix
|
|
246
|
-
sisyphus
|
|
258
|
+
sisyphus version --bump patch --filter @app/auth
|
|
247
259
|
|
|
248
260
|
# Wednesday: Breaking change
|
|
249
|
-
sisyphus
|
|
261
|
+
sisyphus version --bump major --filter @app/api
|
|
250
262
|
|
|
251
263
|
# Friday: Release everything
|
|
252
|
-
sisyphus
|
|
253
|
-
sisyphus roll --
|
|
264
|
+
sisyphus check # Review pending changes
|
|
265
|
+
sisyphus roll --npm --github --changelog
|
|
254
266
|
```
|
|
255
267
|
|
|
256
268
|
### Prerelease Workflow
|
|
257
269
|
|
|
258
270
|
```bash
|
|
259
271
|
# Create beta versions
|
|
260
|
-
sisyphus
|
|
272
|
+
sisyphus version --bump minor --filter @org/new-feature --tag beta
|
|
261
273
|
|
|
262
274
|
# Roll beta release
|
|
263
|
-
sisyphus roll --
|
|
275
|
+
sisyphus roll --npm
|
|
264
276
|
|
|
265
277
|
# Later, promote to stable
|
|
266
|
-
sisyphus
|
|
267
|
-
sisyphus roll --
|
|
278
|
+
sisyphus version --bump minor --filter @org/new-feature --tag latest
|
|
279
|
+
sisyphus roll --npm
|
|
268
280
|
```
|
|
269
281
|
|
|
270
282
|
### CI/CD Integration
|
|
@@ -296,7 +308,7 @@ jobs:
|
|
|
296
308
|
|
|
297
309
|
- name: Release
|
|
298
310
|
if: steps.check.outputs.has_stones == 'true'
|
|
299
|
-
run: bunx @r5n/sisyphus roll --
|
|
311
|
+
run: bunx @r5n/sisyphus roll --npm --github --changelog
|
|
300
312
|
env:
|
|
301
313
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
302
314
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -313,7 +325,7 @@ jobs:
|
|
|
313
325
|
|
|
314
326
|
### Best Practices
|
|
315
327
|
|
|
316
|
-
1. Review stones before rolling (`sisyphus
|
|
328
|
+
1. Review stones before rolling (`sisyphus check`)
|
|
317
329
|
2. Use dry-run mode for safety
|
|
318
330
|
3. Commit stones to version control
|
|
319
331
|
4. Set up branch protection for release branches
|
|
@@ -323,11 +335,11 @@ jobs:
|
|
|
323
335
|
### Common Issues
|
|
324
336
|
|
|
325
337
|
1. **"No stones found"**
|
|
326
|
-
- Create stones with `sisyphus
|
|
338
|
+
- Create stones with `sisyphus version` first
|
|
327
339
|
- Check `.sisyphus/stones/` directory
|
|
328
340
|
|
|
329
341
|
2. **"Package not found"**
|
|
330
|
-
- Verify package name in
|
|
342
|
+
- Verify package name in version command
|
|
331
343
|
- Check if package is ignored in config
|
|
332
344
|
|
|
333
345
|
3. **"Publish failed"**
|
package/dist/cli.js
CHANGED
|
@@ -1,112 +1,112 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
var bo=Object.create;var{getPrototypeOf:go,defineProperty:tr,getOwnPropertyNames:yo}=Object;var $o=Object.prototype.hasOwnProperty;var rn=(r,o,t)=>{t=r!=null?bo(go(r)):{};let e=o||!r||!r.__esModule?tr(t,"default",{value:r,enumerable:!0}):t;for(let s of yo(r))if(!$o.call(e,s))tr(e,s,{get:()=>r[s],enumerable:!0});return e};var er=(r,o)=>()=>(o||r((o={exports:{}}).exports,o),o.exports);var xo=import.meta.require;var kn=er((re,sr)=>{var Rn={to(r,o){if(!o)return`\x1B[${r+1}G`;return`\x1B[${o+1};${r+1}H`},move(r,o){let t="";if(r<0)t+=`\x1B[${-r}D`;else if(r>0)t+=`\x1B[${r}C`;if(o<0)t+=`\x1B[${-o}A`;else if(o>0)t+=`\x1B[${o}B`;return t},up:(r=1)=>`\x1B[${r}A`,down:(r=1)=>`\x1B[${r}B`,forward:(r=1)=>`\x1B[${r}C`,backward:(r=1)=>`\x1B[${r}D`,nextLine:(r=1)=>"\x1B[E".repeat(r),prevLine:(r=1)=>"\x1B[F".repeat(r),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},wo={up:(r=1)=>"\x1B[S".repeat(r),down:(r=1)=>"\x1B[T".repeat(r)},So={screen:"\x1B[2J",up:(r=1)=>"\x1B[1J".repeat(r),down:(r=1)=>"\x1B[J".repeat(r),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(r){let o="";for(let t=0;t<r;t++)o+=this.line+(t<r-1?Rn.up():"");if(r)o+=Rn.left;return o}};sr.exports={cursor:Rn,scroll:wo,erase:So,beep:"\x07"}});var An=er((oe,In)=>{var ln=process||{},ir=ln.argv||[],cn=ln.env||{},vo=!(!!cn.NO_COLOR||ir.includes("--no-color"))&&(!!cn.FORCE_COLOR||ir.includes("--color")||ln.platform==="win32"||(ln.stdout||{}).isTTY&&cn.TERM!=="dumb"||!!cn.CI),Eo=(r,o,t=r)=>(e)=>{let s=""+e,i=s.indexOf(o,r.length);return~i?r+Oo(s,o,t,i)+o:r+s+o},Oo=(r,o,t,e)=>{let s="",i=0;do s+=r.substring(i,e)+t,i=e+o.length,e=r.indexOf(o,i);while(~e);return s+r.substring(i)},ar=(r=vo)=>{let o=r?Eo:()=>String;return{isColorSupported:r,reset:o("\x1B[0m","\x1B[0m"),bold:o("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:o("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:o("\x1B[3m","\x1B[23m"),underline:o("\x1B[4m","\x1B[24m"),inverse:o("\x1B[7m","\x1B[27m"),hidden:o("\x1B[8m","\x1B[28m"),strikethrough:o("\x1B[9m","\x1B[29m"),black:o("\x1B[30m","\x1B[39m"),red:o("\x1B[31m","\x1B[39m"),green:o("\x1B[32m","\x1B[39m"),yellow:o("\x1B[33m","\x1B[39m"),blue:o("\x1B[34m","\x1B[39m"),magenta:o("\x1B[35m","\x1B[39m"),cyan:o("\x1B[36m","\x1B[39m"),white:o("\x1B[37m","\x1B[39m"),gray:o("\x1B[90m","\x1B[39m"),bgBlack:o("\x1B[40m","\x1B[49m"),bgRed:o("\x1B[41m","\x1B[49m"),bgGreen:o("\x1B[42m","\x1B[49m"),bgYellow:o("\x1B[43m","\x1B[49m"),bgBlue:o("\x1B[44m","\x1B[49m"),bgMagenta:o("\x1B[45m","\x1B[49m"),bgCyan:o("\x1B[46m","\x1B[49m"),bgWhite:o("\x1B[47m","\x1B[49m"),blackBright:o("\x1B[90m","\x1B[39m"),redBright:o("\x1B[91m","\x1B[39m"),greenBright:o("\x1B[92m","\x1B[39m"),yellowBright:o("\x1B[93m","\x1B[39m"),blueBright:o("\x1B[94m","\x1B[39m"),magentaBright:o("\x1B[95m","\x1B[39m"),cyanBright:o("\x1B[96m","\x1B[39m"),whiteBright:o("\x1B[97m","\x1B[39m"),bgBlackBright:o("\x1B[100m","\x1B[49m"),bgRedBright:o("\x1B[101m","\x1B[49m"),bgGreenBright:o("\x1B[102m","\x1B[49m"),bgYellowBright:o("\x1B[103m","\x1B[49m"),bgBlueBright:o("\x1B[104m","\x1B[49m"),bgMagentaBright:o("\x1B[105m","\x1B[49m"),bgCyanBright:o("\x1B[106m","\x1B[49m"),bgWhiteBright:o("\x1B[107m","\x1B[49m")}};In.exports=ar();In.exports.createColors=ar});import{stripVTControlCharacters as Tn}from"util";var A=rn(kn(),1),$r=rn(An(),1);import{stdin as dr,stdout as yr}from"process";import*as L from"readline";import cr from"readline";import{Writable as uo}from"stream";function _o({onlyFirst:r=!1}={}){let o=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(o,r?void 0:"g")}var Ro=_o();function xr(r){if(typeof r!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof r}\``);return r.replace(Ro,"")}function wr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Sr={exports:{}};(function(r){var o={};r.exports=o,o.eastAsianWidth=function(e){var s=e.charCodeAt(0),i=e.length==2?e.charCodeAt(1):0,n=s;return 55296<=s&&s<=56319&&56320<=i&&i<=57343&&(s&=1023,i&=1023,n=s<<10|i,n+=65536),n==12288||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":n==8361||65377<=n&&n<=65470||65474<=n&&n<=65479||65482<=n&&n<=65487||65490<=n&&n<=65495||65498<=n&&n<=65500||65512<=n&&n<=65518?"H":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":32<=n&&n<=126||162<=n&&n<=163||165<=n&&n<=166||n==172||n==175||10214<=n&&n<=10221||10629<=n&&n<=10630?"Na":n==161||n==164||167<=n&&n<=168||n==170||173<=n&&n<=174||176<=n&&n<=180||182<=n&&n<=186||188<=n&&n<=191||n==198||n==208||215<=n&&n<=216||222<=n&&n<=225||n==230||232<=n&&n<=234||236<=n&&n<=237||n==240||242<=n&&n<=243||247<=n&&n<=250||n==252||n==254||n==257||n==273||n==275||n==283||294<=n&&n<=295||n==299||305<=n&&n<=307||n==312||319<=n&&n<=322||n==324||328<=n&&n<=331||n==333||338<=n&&n<=339||358<=n&&n<=359||n==363||n==462||n==464||n==466||n==468||n==470||n==472||n==474||n==476||n==593||n==609||n==708||n==711||713<=n&&n<=715||n==717||n==720||728<=n&&n<=731||n==733||n==735||768<=n&&n<=879||913<=n&&n<=929||931<=n&&n<=937||945<=n&&n<=961||963<=n&&n<=969||n==1025||1040<=n&&n<=1103||n==1105||n==8208||8211<=n&&n<=8214||8216<=n&&n<=8217||8220<=n&&n<=8221||8224<=n&&n<=8226||8228<=n&&n<=8231||n==8240||8242<=n&&n<=8243||n==8245||n==8251||n==8254||n==8308||n==8319||8321<=n&&n<=8324||n==8364||n==8451||n==8453||n==8457||n==8467||n==8470||8481<=n&&n<=8482||n==8486||n==8491||8531<=n&&n<=8532||8539<=n&&n<=8542||8544<=n&&n<=8555||8560<=n&&n<=8569||n==8585||8592<=n&&n<=8601||8632<=n&&n<=8633||n==8658||n==8660||n==8679||n==8704||8706<=n&&n<=8707||8711<=n&&n<=8712||n==8715||n==8719||n==8721||n==8725||n==8730||8733<=n&&n<=8736||n==8739||n==8741||8743<=n&&n<=8748||n==8750||8756<=n&&n<=8759||8764<=n&&n<=8765||n==8776||n==8780||n==8786||8800<=n&&n<=8801||8804<=n&&n<=8807||8810<=n&&n<=8811||8814<=n&&n<=8815||8834<=n&&n<=8835||8838<=n&&n<=8839||n==8853||n==8857||n==8869||n==8895||n==8978||9312<=n&&n<=9449||9451<=n&&n<=9547||9552<=n&&n<=9587||9600<=n&&n<=9615||9618<=n&&n<=9621||9632<=n&&n<=9633||9635<=n&&n<=9641||9650<=n&&n<=9651||9654<=n&&n<=9655||9660<=n&&n<=9661||9664<=n&&n<=9665||9670<=n&&n<=9672||n==9675||9678<=n&&n<=9681||9698<=n&&n<=9701||n==9711||9733<=n&&n<=9734||n==9737||9742<=n&&n<=9743||9748<=n&&n<=9749||n==9756||n==9758||n==9792||n==9794||9824<=n&&n<=9825||9827<=n&&n<=9829||9831<=n&&n<=9834||9836<=n&&n<=9837||n==9839||9886<=n&&n<=9887||9918<=n&&n<=9919||9924<=n&&n<=9933||9935<=n&&n<=9953||n==9955||9960<=n&&n<=9983||n==10045||n==10071||10102<=n&&n<=10111||11093<=n&&n<=11097||12872<=n&&n<=12879||57344<=n&&n<=63743||65024<=n&&n<=65039||n==65533||127232<=n&&n<=127242||127248<=n&&n<=127277||127280<=n&&n<=127337||127344<=n&&n<=127386||917760<=n&&n<=917999||983040<=n&&n<=1048573||1048576<=n&&n<=1114109?"A":"N"},o.characterLength=function(e){var s=this.eastAsianWidth(e);return s=="F"||s=="W"||s=="A"?2:1};function t(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}o.length=function(e){for(var s=t(e),i=0,n=0;n<s.length;n++)i=i+this.characterLength(s[n]);return i},o.slice=function(e,s,i){textLen=o.length(e),s=s||0,i=i||1,s<0&&(s=textLen+s),i<0&&(i=textLen+i);for(var n="",c=0,l=t(e),p=0;p<l.length;p++){var h=l[p],f=o.length(h);if(c>=s-(f==2?1:0))if(c+f<=i)n+=h;else break;c+=f}return n}})(Sr);var ko=Sr.exports,Io=wr(ko),Ao=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},No=wr(Ao);function on(r,o={}){if(typeof r!="string"||r.length===0||(o={ambiguousIsNarrow:!0,...o},r=xr(r),r.length===0))return 0;r=r.replace(No()," ");let t=o.ambiguousIsNarrow?1:2,e=0;for(let s of r){let i=s.codePointAt(0);if(i<=31||i>=127&&i<=159||i>=768&&i<=879)continue;switch(Io.eastAsianWidth(s)){case"F":case"W":e+=2;break;case"A":e+=t;break;default:e+=1}}return e}var Nn=10,lr=(r=0)=>(o)=>`\x1B[${o+r}m`,mr=(r=0)=>(o)=>`\x1B[${38+r};5;${o}m`,pr=(r=0)=>(o,t,e)=>`\x1B[${38+r};2;${o};${t};${e}m`,O={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(O.modifier);var Co=Object.keys(O.color),Go=Object.keys(O.bgColor);[...Co];function Po(){let r=new Map;for(let[o,t]of Object.entries(O)){for(let[e,s]of Object.entries(t))O[e]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},t[e]=O[e],r.set(s[0],s[1]);Object.defineProperty(O,o,{value:t,enumerable:!1})}return Object.defineProperty(O,"codes",{value:r,enumerable:!1}),O.color.close="\x1B[39m",O.bgColor.close="\x1B[49m",O.color.ansi=lr(),O.color.ansi256=mr(),O.color.ansi16m=pr(),O.bgColor.ansi=lr(Nn),O.bgColor.ansi256=mr(Nn),O.bgColor.ansi16m=pr(Nn),Object.defineProperties(O,{rgbToAnsi256:{value:(o,t,e)=>o===t&&t===e?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(t/255*5)+Math.round(e/255*5),enumerable:!1},hexToRgb:{value:(o)=>{let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(o.toString(16));if(!t)return[0,0,0];let[e]=t;e.length===3&&(e=[...e].map((i)=>i+i).join(""));let s=Number.parseInt(e,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:(o)=>O.rgbToAnsi256(...O.hexToRgb(o)),enumerable:!1},ansi256ToAnsi:{value:(o)=>{if(o<8)return 30+o;if(o<16)return 90+(o-8);let t,e,s;if(o>=232)t=((o-232)*10+8)/255,e=t,s=t;else{o-=16;let c=o%36;t=Math.floor(o/36)/5,e=Math.floor(c/6)/5,s=c%6/5}let i=Math.max(t,e,s)*2;if(i===0)return 30;let n=30+(Math.round(s)<<2|Math.round(e)<<1|Math.round(t));return i===2&&(n+=60),n},enumerable:!1},rgbToAnsi:{value:(o,t,e)=>O.ansi256ToAnsi(O.rgbToAnsi256(o,t,e)),enumerable:!1},hexToAnsi:{value:(o)=>O.ansi256ToAnsi(O.hexToAnsi256(o)),enumerable:!1}}),O}var Mo=Po(),hn=new Set(["\x1B","\x9B"]),jo=39,Pn="\x07",vr="[",Bo="]",Er="m",Mn=`${Bo}8;;`,hr=(r)=>`${hn.values().next().value}${vr}${r}${Er}`,fr=(r)=>`${hn.values().next().value}${Mn}${r}${Pn}`,Uo=(r)=>r.split(" ").map((o)=>on(o)),Cn=(r,o,t)=>{let e=[...o],s=!1,i=!1,n=on(xr(r[r.length-1]));for(let[c,l]of e.entries()){let p=on(l);if(n+p<=t?r[r.length-1]+=l:(r.push(l),n=0),hn.has(l)&&(s=!0,i=e.slice(c+1).join("").startsWith(Mn)),s){i?l===Pn&&(s=!1,i=!1):l===Er&&(s=!1);continue}n+=p,n===t&&c<e.length-1&&(r.push(""),n=0)}!n&&r[r.length-1].length>0&&r.length>1&&(r[r.length-2]+=r.pop())},To=(r)=>{let o=r.split(" "),t=o.length;for(;t>0&&!(on(o[t-1])>0);)t--;return t===o.length?r:o.slice(0,t).join(" ")+o.slice(t).join("")},Ho=(r,o,t={})=>{if(t.trim!==!1&&r.trim()==="")return"";let e="",s,i,n=Uo(r),c=[""];for(let[p,h]of r.split(" ").entries()){t.trim!==!1&&(c[c.length-1]=c[c.length-1].trimStart());let f=on(c[c.length-1]);if(p!==0&&(f>=o&&(t.wordWrap===!1||t.trim===!1)&&(c.push(""),f=0),(f>0||t.trim===!1)&&(c[c.length-1]+=" ",f++)),t.hard&&n[p]>o){let g=o-f,d=1+Math.floor((n[p]-g-1)/o);Math.floor((n[p]-1)/o)<d&&c.push(""),Cn(c,h,o);continue}if(f+n[p]>o&&f>0&&n[p]>0){if(t.wordWrap===!1&&f<o){Cn(c,h,o);continue}c.push("")}if(f+n[p]>o&&t.wordWrap===!1){Cn(c,h,o);continue}c[c.length-1]+=h}t.trim!==!1&&(c=c.map((p)=>To(p)));let l=[...c.join(`
|
|
3
|
-
`)];for(let[
|
|
4
|
-
`?(i&&(e+=
|
|
5
|
-
`&&(s&&
|
|
2
|
+
var go=Object.create;var{getPrototypeOf:yo,defineProperty:er,getOwnPropertyNames:$o}=Object;var xo=Object.prototype.hasOwnProperty;var on=(r,o,t)=>{t=r!=null?go(yo(r)):{};let e=o||!r||!r.__esModule?er(t,"default",{value:r,enumerable:!0}):t;for(let s of $o(r))if(!xo.call(e,s))er(e,s,{get:()=>r[s],enumerable:!0});return e};var sr=(r,o)=>()=>(o||r((o={exports:{}}).exports,o),o.exports);var wo=import.meta.require;var Nn=sr((me,cr)=>{var Cn={to(r,o){if(!o)return`\x1B[${r+1}G`;return`\x1B[${o+1};${r+1}H`},move(r,o){let t="";if(r<0)t+=`\x1B[${-r}D`;else if(r>0)t+=`\x1B[${r}C`;if(o<0)t+=`\x1B[${-o}A`;else if(o>0)t+=`\x1B[${o}B`;return t},up:(r=1)=>`\x1B[${r}A`,down:(r=1)=>`\x1B[${r}B`,forward:(r=1)=>`\x1B[${r}C`,backward:(r=1)=>`\x1B[${r}D`,nextLine:(r=1)=>"\x1B[E".repeat(r),prevLine:(r=1)=>"\x1B[F".repeat(r),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},Ro={up:(r=1)=>"\x1B[S".repeat(r),down:(r=1)=>"\x1B[T".repeat(r)},ko={screen:"\x1B[2J",up:(r=1)=>"\x1B[1J".repeat(r),down:(r=1)=>"\x1B[J".repeat(r),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(r){let o="";for(let t=0;t<r;t++)o+=this.line+(t<r-1?Cn.up():"");if(r)o+=Cn.left;return o}};cr.exports={cursor:Cn,scroll:Ro,erase:ko,beep:"\x07"}});var Gn=sr((fe,An)=>{var fn=process||{},lr=fn.argv||[],mn=fn.env||{},Io=!(!!mn.NO_COLOR||lr.includes("--no-color"))&&(!!mn.FORCE_COLOR||lr.includes("--color")||fn.platform==="win32"||(fn.stdout||{}).isTTY&&mn.TERM!=="dumb"||!!mn.CI),Co=(r,o,t=r)=>(e)=>{let s=""+e,i=s.indexOf(o,r.length);return~i?r+No(s,o,t,i)+o:r+s+o},No=(r,o,t,e)=>{let s="",i=0;do s+=r.substring(i,e)+t,i=e+o.length,e=r.indexOf(o,i);while(~e);return s+r.substring(i)},mr=(r=Io)=>{let o=r?Co:()=>String;return{isColorSupported:r,reset:o("\x1B[0m","\x1B[0m"),bold:o("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:o("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:o("\x1B[3m","\x1B[23m"),underline:o("\x1B[4m","\x1B[24m"),inverse:o("\x1B[7m","\x1B[27m"),hidden:o("\x1B[8m","\x1B[28m"),strikethrough:o("\x1B[9m","\x1B[29m"),black:o("\x1B[30m","\x1B[39m"),red:o("\x1B[31m","\x1B[39m"),green:o("\x1B[32m","\x1B[39m"),yellow:o("\x1B[33m","\x1B[39m"),blue:o("\x1B[34m","\x1B[39m"),magenta:o("\x1B[35m","\x1B[39m"),cyan:o("\x1B[36m","\x1B[39m"),white:o("\x1B[37m","\x1B[39m"),gray:o("\x1B[90m","\x1B[39m"),bgBlack:o("\x1B[40m","\x1B[49m"),bgRed:o("\x1B[41m","\x1B[49m"),bgGreen:o("\x1B[42m","\x1B[49m"),bgYellow:o("\x1B[43m","\x1B[49m"),bgBlue:o("\x1B[44m","\x1B[49m"),bgMagenta:o("\x1B[45m","\x1B[49m"),bgCyan:o("\x1B[46m","\x1B[49m"),bgWhite:o("\x1B[47m","\x1B[49m"),blackBright:o("\x1B[90m","\x1B[39m"),redBright:o("\x1B[91m","\x1B[39m"),greenBright:o("\x1B[92m","\x1B[39m"),yellowBright:o("\x1B[93m","\x1B[39m"),blueBright:o("\x1B[94m","\x1B[39m"),magentaBright:o("\x1B[95m","\x1B[39m"),cyanBright:o("\x1B[96m","\x1B[39m"),whiteBright:o("\x1B[97m","\x1B[39m"),bgBlackBright:o("\x1B[100m","\x1B[49m"),bgRedBright:o("\x1B[101m","\x1B[49m"),bgGreenBright:o("\x1B[102m","\x1B[49m"),bgYellowBright:o("\x1B[103m","\x1B[49m"),bgBlueBright:o("\x1B[104m","\x1B[49m"),bgMagentaBright:o("\x1B[105m","\x1B[49m"),bgCyanBright:o("\x1B[106m","\x1B[49m"),bgWhiteBright:o("\x1B[107m","\x1B[49m")}};An.exports=mr();An.exports.createColors=mr});var So=!process.env.NO_COLOR&&(process.env.FORCE_COLOR||process.stdout.isTTY),vo=["blue","cyan","gray","green","magenta","red","white","yellow"],uo=["bold","dim","italic","underline","reset"],ar={bold:"\x1B[1m",dim:"\x1B[2m",italic:"\x1B[3m",reset:"\x1B[0m",underline:"\x1B[4m"},Eo={"\x1B[30m":"\x1B[90m","\x1B[31m":"\x1B[91m","\x1B[32m":"\x1B[92m","\x1B[33m":"\x1B[93m","\x1B[34m":"\x1B[94m","\x1B[35m":"\x1B[95m","\x1B[36m":"\x1B[96m","\x1B[37m":"\x1B[97m"};function kn(r){return(o)=>So?`${r}${o}${ar.reset}`:o}function ir({bright:r=!1,color:o}){let t=Bun.color(o,"ansi");if(!t)return"";return r?Eo[t]||t:t}var Oo=vo.reduce((r,o)=>{return r[o]=kn(ir({color:o})),r[`${o}Bright`]=kn(ir({bright:!0,color:o})),r},{}),_o=uo.reduce((r,o)=>{return r[o]=kn(ar[o]),r},{}),c={...Oo,..._o};var I=({prefix:r="",level:o=process.env.DEBUG?0:1}={})=>{function t(...a){if(o<=0){let l=a.join(" ");console.log(ln({level:c.dim("DEBUG"),message:l,prefix:r}))}}function e(...a){if(o<=1){let l=a.join(" ");console.info(ln({level:c.cyan("INFO "),message:l,prefix:r}))}}function s(...a){if(o<=2){let l=a.join(" ");console.warn(ln({level:c.yellow("WARN "),message:l,prefix:r}))}}function i(...a){if(o<=3){let l=a.join(" ");console.error(ln({level:c.red("ERROR"),message:l,prefix:r}))}}function n(a){return I({level:o,prefix:`${r}:${a}`})}return{child:n,debug:t,error:i,info:e,warn:s}},In=I();function ln({prefix:r,level:o,message:t}){let e=new Date().toISOString().split("T")[1]?.split(".")[0]||"",s=r?`[${r}] `:"";return`${c.dim(e||"")} ${o} ${s}${t}`}var y={arrow:c.yellow,bold:c.bold,boolean:c.cyan,bullet:c.yellow,busy:c.yellow,command:c.green,dim:c.dim,error:c.red,flag:c.yellow,info:c.cyan,number:c.magenta,offline:c.red,online:c.green,separator:c.dim,string:c.green,success:c.green,value:c.cyan,warning:c.yellow};import{stripVTControlCharacters as zn}from"util";var N=on(Nn(),1),Sr=on(Gn(),1);import{stdin as xr,stdout as wr}from"process";import*as K from"readline";import fr from"readline";import{Writable as Ao}from"stream";function Go({onlyFirst:r=!1}={}){let o=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(o,r?void 0:"g")}var Mo=Go();function vr(r){if(typeof r!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof r}\``);return r.replace(Mo,"")}function ur(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Er={exports:{}};(function(r){var o={};r.exports=o,o.eastAsianWidth=function(e){var s=e.charCodeAt(0),i=e.length==2?e.charCodeAt(1):0,n=s;return 55296<=s&&s<=56319&&56320<=i&&i<=57343&&(s&=1023,i&=1023,n=s<<10|i,n+=65536),n==12288||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":n==8361||65377<=n&&n<=65470||65474<=n&&n<=65479||65482<=n&&n<=65487||65490<=n&&n<=65495||65498<=n&&n<=65500||65512<=n&&n<=65518?"H":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":32<=n&&n<=126||162<=n&&n<=163||165<=n&&n<=166||n==172||n==175||10214<=n&&n<=10221||10629<=n&&n<=10630?"Na":n==161||n==164||167<=n&&n<=168||n==170||173<=n&&n<=174||176<=n&&n<=180||182<=n&&n<=186||188<=n&&n<=191||n==198||n==208||215<=n&&n<=216||222<=n&&n<=225||n==230||232<=n&&n<=234||236<=n&&n<=237||n==240||242<=n&&n<=243||247<=n&&n<=250||n==252||n==254||n==257||n==273||n==275||n==283||294<=n&&n<=295||n==299||305<=n&&n<=307||n==312||319<=n&&n<=322||n==324||328<=n&&n<=331||n==333||338<=n&&n<=339||358<=n&&n<=359||n==363||n==462||n==464||n==466||n==468||n==470||n==472||n==474||n==476||n==593||n==609||n==708||n==711||713<=n&&n<=715||n==717||n==720||728<=n&&n<=731||n==733||n==735||768<=n&&n<=879||913<=n&&n<=929||931<=n&&n<=937||945<=n&&n<=961||963<=n&&n<=969||n==1025||1040<=n&&n<=1103||n==1105||n==8208||8211<=n&&n<=8214||8216<=n&&n<=8217||8220<=n&&n<=8221||8224<=n&&n<=8226||8228<=n&&n<=8231||n==8240||8242<=n&&n<=8243||n==8245||n==8251||n==8254||n==8308||n==8319||8321<=n&&n<=8324||n==8364||n==8451||n==8453||n==8457||n==8467||n==8470||8481<=n&&n<=8482||n==8486||n==8491||8531<=n&&n<=8532||8539<=n&&n<=8542||8544<=n&&n<=8555||8560<=n&&n<=8569||n==8585||8592<=n&&n<=8601||8632<=n&&n<=8633||n==8658||n==8660||n==8679||n==8704||8706<=n&&n<=8707||8711<=n&&n<=8712||n==8715||n==8719||n==8721||n==8725||n==8730||8733<=n&&n<=8736||n==8739||n==8741||8743<=n&&n<=8748||n==8750||8756<=n&&n<=8759||8764<=n&&n<=8765||n==8776||n==8780||n==8786||8800<=n&&n<=8801||8804<=n&&n<=8807||8810<=n&&n<=8811||8814<=n&&n<=8815||8834<=n&&n<=8835||8838<=n&&n<=8839||n==8853||n==8857||n==8869||n==8895||n==8978||9312<=n&&n<=9449||9451<=n&&n<=9547||9552<=n&&n<=9587||9600<=n&&n<=9615||9618<=n&&n<=9621||9632<=n&&n<=9633||9635<=n&&n<=9641||9650<=n&&n<=9651||9654<=n&&n<=9655||9660<=n&&n<=9661||9664<=n&&n<=9665||9670<=n&&n<=9672||n==9675||9678<=n&&n<=9681||9698<=n&&n<=9701||n==9711||9733<=n&&n<=9734||n==9737||9742<=n&&n<=9743||9748<=n&&n<=9749||n==9756||n==9758||n==9792||n==9794||9824<=n&&n<=9825||9827<=n&&n<=9829||9831<=n&&n<=9834||9836<=n&&n<=9837||n==9839||9886<=n&&n<=9887||9918<=n&&n<=9919||9924<=n&&n<=9933||9935<=n&&n<=9953||n==9955||9960<=n&&n<=9983||n==10045||n==10071||10102<=n&&n<=10111||11093<=n&&n<=11097||12872<=n&&n<=12879||57344<=n&&n<=63743||65024<=n&&n<=65039||n==65533||127232<=n&&n<=127242||127248<=n&&n<=127277||127280<=n&&n<=127337||127344<=n&&n<=127386||917760<=n&&n<=917999||983040<=n&&n<=1048573||1048576<=n&&n<=1114109?"A":"N"},o.characterLength=function(e){var s=this.eastAsianWidth(e);return s=="F"||s=="W"||s=="A"?2:1};function t(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}o.length=function(e){for(var s=t(e),i=0,n=0;n<s.length;n++)i=i+this.characterLength(s[n]);return i},o.slice=function(e,s,i){textLen=o.length(e),s=s||0,i=i||1,s<0&&(s=textLen+s),i<0&&(i=textLen+i);for(var n="",a=0,l=t(e),f=0;f<l.length;f++){var b=l[f],p=o.length(b);if(a>=s-(p==2?1:0))if(a+p<=i)n+=b;else break;a+=p}return n}})(Er);var Po=Er.exports,jo=ur(Po),Uo=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},Bo=ur(Uo);function tn(r,o={}){if(typeof r!="string"||r.length===0||(o={ambiguousIsNarrow:!0,...o},r=vr(r),r.length===0))return 0;r=r.replace(Bo()," ");let t=o.ambiguousIsNarrow?1:2,e=0;for(let s of r){let i=s.codePointAt(0);if(i<=31||i>=127&&i<=159||i>=768&&i<=879)continue;switch(jo.eastAsianWidth(s)){case"F":case"W":e+=2;break;case"A":e+=t;break;default:e+=1}}return e}var Mn=10,br=(r=0)=>(o)=>`\x1B[${o+r}m`,pr=(r=0)=>(o)=>`\x1B[${38+r};5;${o}m`,hr=(r=0)=>(o,t,e)=>`\x1B[${38+r};2;${o};${t};${e}m`,O={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(O.modifier);var Ho=Object.keys(O.color),To=Object.keys(O.bgColor);[...Ho];function qo(){let r=new Map;for(let[o,t]of Object.entries(O)){for(let[e,s]of Object.entries(t))O[e]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},t[e]=O[e],r.set(s[0],s[1]);Object.defineProperty(O,o,{value:t,enumerable:!1})}return Object.defineProperty(O,"codes",{value:r,enumerable:!1}),O.color.close="\x1B[39m",O.bgColor.close="\x1B[49m",O.color.ansi=br(),O.color.ansi256=pr(),O.color.ansi16m=hr(),O.bgColor.ansi=br(Mn),O.bgColor.ansi256=pr(Mn),O.bgColor.ansi16m=hr(Mn),Object.defineProperties(O,{rgbToAnsi256:{value:(o,t,e)=>o===t&&t===e?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(t/255*5)+Math.round(e/255*5),enumerable:!1},hexToRgb:{value:(o)=>{let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(o.toString(16));if(!t)return[0,0,0];let[e]=t;e.length===3&&(e=[...e].map((i)=>i+i).join(""));let s=Number.parseInt(e,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:(o)=>O.rgbToAnsi256(...O.hexToRgb(o)),enumerable:!1},ansi256ToAnsi:{value:(o)=>{if(o<8)return 30+o;if(o<16)return 90+(o-8);let t,e,s;if(o>=232)t=((o-232)*10+8)/255,e=t,s=t;else{o-=16;let a=o%36;t=Math.floor(o/36)/5,e=Math.floor(a/6)/5,s=a%6/5}let i=Math.max(t,e,s)*2;if(i===0)return 30;let n=30+(Math.round(s)<<2|Math.round(e)<<1|Math.round(t));return i===2&&(n+=60),n},enumerable:!1},rgbToAnsi:{value:(o,t,e)=>O.ansi256ToAnsi(O.rgbToAnsi256(o,t,e)),enumerable:!1},hexToAnsi:{value:(o)=>O.ansi256ToAnsi(O.hexToAnsi256(o)),enumerable:!1}}),O}var zo=qo(),hn=new Set(["\x1B","\x9B"]),Ko=39,Un="\x07",Or="[",Lo="]",_r="m",Bn=`${Lo}8;;`,gr=(r)=>`${hn.values().next().value}${Or}${r}${_r}`,dr=(r)=>`${hn.values().next().value}${Bn}${r}${Un}`,Jo=(r)=>r.split(" ").map((o)=>tn(o)),Pn=(r,o,t)=>{let e=[...o],s=!1,i=!1,n=tn(vr(r[r.length-1]));for(let[a,l]of e.entries()){let f=tn(l);if(n+f<=t?r[r.length-1]+=l:(r.push(l),n=0),hn.has(l)&&(s=!0,i=e.slice(a+1).join("").startsWith(Bn)),s){i?l===Un&&(s=!1,i=!1):l===_r&&(s=!1);continue}n+=f,n===t&&a<e.length-1&&(r.push(""),n=0)}!n&&r[r.length-1].length>0&&r.length>1&&(r[r.length-2]+=r.pop())},Yo=(r)=>{let o=r.split(" "),t=o.length;for(;t>0&&!(tn(o[t-1])>0);)t--;return t===o.length?r:o.slice(0,t).join(" ")+o.slice(t).join("")},Wo=(r,o,t={})=>{if(t.trim!==!1&&r.trim()==="")return"";let e="",s,i,n=Jo(r),a=[""];for(let[f,b]of r.split(" ").entries()){t.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=tn(a[a.length-1]);if(f!==0&&(p>=o&&(t.wordWrap===!1||t.trim===!1)&&(a.push(""),p=0),(p>0||t.trim===!1)&&(a[a.length-1]+=" ",p++)),t.hard&&n[f]>o){let g=o-p,d=1+Math.floor((n[f]-g-1)/o);Math.floor((n[f]-1)/o)<d&&a.push(""),Pn(a,b,o);continue}if(p+n[f]>o&&p>0&&n[f]>0){if(t.wordWrap===!1&&p<o){Pn(a,b,o);continue}a.push("")}if(p+n[f]>o&&t.wordWrap===!1){Pn(a,b,o);continue}a[a.length-1]+=b}t.trim!==!1&&(a=a.map((f)=>Yo(f)));let l=[...a.join(`
|
|
3
|
+
`)];for(let[f,b]of l.entries()){if(e+=b,hn.has(b)){let{groups:g}=new RegExp(`(?:\\${Or}(?<code>\\d+)m|\\${Bn}(?<uri>.*)${Un})`).exec(l.slice(f).join(""))||{groups:{}};if(g.code!==void 0){let d=Number.parseFloat(g.code);s=d===Ko?void 0:d}else g.uri!==void 0&&(i=g.uri.length===0?void 0:g.uri)}let p=zo.codes.get(Number(s));l[f+1]===`
|
|
4
|
+
`?(i&&(e+=dr("")),s&&p&&(e+=gr(p))):b===`
|
|
5
|
+
`&&(s&&p&&(e+=gr(s)),i&&(e+=dr(i)))}return e};function yr(r,o,t){return String(r).normalize().replace(/\r\n/g,`
|
|
6
6
|
`).split(`
|
|
7
|
-
`).map((e)=>
|
|
8
|
-
`)}var
|
|
7
|
+
`).map((e)=>Wo(e,o,t)).join(`
|
|
8
|
+
`)}var Xo=["up","down","left","right","space","enter","cancel"],pn={actions:new Set(Xo),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]])};function Hn(r,o){if(typeof r=="string")return pn.aliases.get(r)===o;for(let t of r)if(t!==void 0&&Hn(t,o))return!0;return!1}function Zo(r,o){if(r===o)return;let t=r.split(`
|
|
9
9
|
`),e=o.split(`
|
|
10
|
-
`),s=[];for(let i=0;i<Math.max(t.length,e.length);i++)t[i]!==e[i]&&s.push(i);return s}var
|
|
11
|
-
`),
|
|
12
|
-
`).length-1;this.output.write(
|
|
13
|
-
`);this.output.write(e[t]),this._prevFrame=r,this.output.write(
|
|
10
|
+
`),s=[];for(let i=0;i<Math.max(t.length,e.length);i++)t[i]!==e[i]&&s.push(i);return s}var Qo=globalThis.process.platform.startsWith("win"),jn=Symbol("clack:cancel");function q(r){return r===jn}function bn(r,o){let t=r;t.isTTY&&t.setRawMode(o)}function Rr({input:r=xr,output:o=wr,overwrite:t=!0,hideCursor:e=!0}={}){let s=K.createInterface({input:r,output:o,prompt:"",tabSize:1});K.emitKeypressEvents(r,s),r.isTTY&&r.setRawMode(!0);let i=(n,{name:a,sequence:l})=>{let f=String(n);if(Hn([f,a,l],"cancel")){e&&o.write(N.cursor.show),process.exit(0);return}if(!t)return;K.moveCursor(o,a==="return"?0:-1,a==="return"?-1:0,()=>{K.clearLine(o,1,()=>{r.once("keypress",i)})})};return e&&o.write(N.cursor.hide),r.once("keypress",i),()=>{r.off("keypress",i),e&&o.write(N.cursor.show),r.isTTY&&!Qo&&r.setRawMode(!1),s.terminal=!1,s.close()}}var Vo=Object.defineProperty,Fo=(r,o,t)=>(o in r)?Vo(r,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[o]=t,G=(r,o,t)=>(Fo(r,typeof o!="symbol"?o+"":o,t),t);class gn{constructor(r,o=!0){G(this,"input"),G(this,"output"),G(this,"_abortSignal"),G(this,"rl"),G(this,"opts"),G(this,"_render"),G(this,"_track",!1),G(this,"_prevFrame",""),G(this,"_subscribers",new Map),G(this,"_cursor",0),G(this,"state","initial"),G(this,"error",""),G(this,"value");let{input:t=xr,output:e=wr,render:s,signal:i,...n}=r;this.opts=n,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=s.bind(this),this._track=o,this._abortSignal=i,this.input=t,this.output=e}unsubscribe(){this._subscribers.clear()}setSubscriber(r,o){let t=this._subscribers.get(r)??[];t.push(o),this._subscribers.set(r,t)}on(r,o){this.setSubscriber(r,{cb:o})}once(r,o){this.setSubscriber(r,{cb:o,once:!0})}emit(r,...o){let t=this._subscribers.get(r)??[],e=[];for(let s of t)s.cb(...o),s.once&&e.push(()=>t.splice(t.indexOf(s),1));for(let s of e)s()}prompt(){return new Promise((r,o)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),r(jn);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let t=new Ao;t._write=(e,s,i)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),i()},this.input.pipe(t),this.rl=fr.createInterface({input:this.input,output:t,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),fr.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),bn(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(N.cursor.show),this.output.off("resize",this.render),bn(this.input,!1),r(this.value)}),this.once("cancel",()=>{this.output.write(N.cursor.show),this.output.off("resize",this.render),bn(this.input,!1),r(jn)})})}onKeypress(r,o){if(this.state==="error"&&(this.state="active"),o?.name&&(!this._track&&pn.aliases.has(o.name)&&this.emit("cursor",pn.aliases.get(o.name)),pn.actions.has(o.name)&&this.emit("cursor",o.name)),r&&(r.toLowerCase()==="y"||r.toLowerCase()==="n")&&this.emit("confirm",r.toLowerCase()==="y"),r==="\t"&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),r&&this.emit("key",r.toLowerCase()),o?.name==="return"){if(this.opts.validate){let t=this.opts.validate(this.value);t&&(this.error=t instanceof Error?t.message:t,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}Hn([r,o?.name,o?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
|
|
11
|
+
`),bn(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let r=yr(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
12
|
+
`).length-1;this.output.write(N.cursor.move(-999,r*-1))}render(){let r=yr(this._render(this)??"",process.stdout.columns,{hard:!0});if(r!==this._prevFrame){if(this.state==="initial")this.output.write(N.cursor.hide);else{let o=Zo(this._prevFrame,r);if(this.restoreCursor(),o&&o?.length===1){let t=o[0];this.output.write(N.cursor.move(0,t)),this.output.write(N.erase.lines(1));let e=r.split(`
|
|
13
|
+
`);this.output.write(e[t]),this._prevFrame=r,this.output.write(N.cursor.move(0,e.length-t-1));return}if(o&&o?.length>1){let t=o[0];this.output.write(N.cursor.move(0,t)),this.output.write(N.erase.down());let e=r.split(`
|
|
14
14
|
`).slice(t);this.output.write(e.join(`
|
|
15
|
-
`)),this._prevFrame=r;return}this.output.write(
|
|
16
|
-
${
|
|
15
|
+
`)),this._prevFrame=r;return}this.output.write(N.erase.down())}this.output.write(r),this.state==="initial"&&(this.state="active"),this._prevFrame=r}}}class Tn extends gn{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(r){super(r,!1),this.value=!!r.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",(o)=>{this.output.write(N.cursor.move(0,-1)),this.value=o,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}var Do;Do=new WeakMap;var nt=Object.defineProperty,rt=(r,o,t)=>(o in r)?nt(r,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[o]=t,$r=(r,o,t)=>(rt(r,typeof o!="symbol"?o+"":o,t),t),kr=class extends gn{constructor(r){super(r,!1),$r(this,"options"),$r(this,"cursor",0),this.options=r.options,this.value=[...r.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:o})=>o===r.cursorAt),0),this.on("key",(o)=>{o==="a"&&this.toggleAll()}),this.on("cursor",(o)=>{switch(o){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let r=this.value.length===this.options.length;this.value=r?[]:this.options.map((o)=>o.value)}toggleValue(){let r=this.value.includes(this._value);this.value=r?this.value.filter((o)=>o!==this._value):[...this.value,this._value]}};class qn extends gn{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;let r=this.value.slice(0,this.cursor),[o,...t]=this.value.slice(this.cursor);return`${r}${Sr.default.inverse(o)}${t.join("")}`}get cursor(){return this._cursor}constructor(r){super(r),this.on("finalize",()=>{this.value||(this.value=r.defaultValue)})}}var m=on(Gn(),1),dn=on(Nn(),1);import j from"process";function ot(){return j.platform!=="win32"?j.env.TERM!=="linux":!!j.env.CI||!!j.env.WT_SESSION||!!j.env.TERMINUS_SUBLIME||j.env.ConEmuTask==="{cmd::Cmder}"||j.env.TERM_PROGRAM==="Terminus-Sublime"||j.env.TERM_PROGRAM==="vscode"||j.env.TERM==="xterm-256color"||j.env.TERM==="alacritty"||j.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Kn=ot(),k=(r,o)=>Kn?r:o,tt=k("\u25C6","*"),Mr=k("\u25A0","x"),Pr=k("\u25B2","x"),yn=k("\u25C7","o"),Oe=k("\u250C","T"),u=k("\u2502","|"),V=k("\u2514","\u2014"),Ir=k("\u25CF",">"),Cr=k("\u25CB"," "),et=k("\u25FB","[\u2022]"),Nr=k("\u25FC","[+]"),st=k("\u25FB","[ ]"),_e=k("\u25AA","\u2022"),Ar=k("\u2500","-"),it=k("\u256E","+"),at=k("\u251C","+"),ct=k("\u256F","+"),lt=k("\u25CF","\u2022"),mt=k("\u25C6","*"),ft=k("\u25B2","!"),bt=k("\u25A0","x"),Ln=(r)=>{switch(r){case"initial":case"active":return m.default.cyan(tt);case"cancel":return m.default.red(Mr);case"error":return m.default.yellow(Pr);case"submit":return m.default.green(yn)}},Gr=(r)=>{let{cursor:o,options:t,style:e}=r,s=r.maxItems??Number.POSITIVE_INFINITY,i=Math.max(process.stdout.rows-4,0),n=Math.min(i,Math.max(s,5)),a=0;o>=a+n-3?a=Math.max(Math.min(o-n+3,t.length-n),0):o<a+2&&(a=Math.max(o-2,0));let l=n<t.length&&a>0,f=n<t.length&&a+n<t.length;return t.slice(a,a+n).map((b,p,g)=>{let d=p===0&&l,h=p===g.length-1&&f;return d||h?m.default.dim("..."):e(b,p+a===o)})},L=(r)=>new qn({validate:r.validate,placeholder:r.placeholder,defaultValue:r.defaultValue,initialValue:r.initialValue,render(){let o=`${m.default.gray(u)}
|
|
16
|
+
${Ln(this.state)} ${r.message}
|
|
17
17
|
`,t=r.placeholder?m.default.inverse(r.placeholder[0])+m.default.dim(r.placeholder.slice(1)):m.default.inverse(m.default.hidden("_")),e=this.value?this.valueWithCursor:t;switch(this.state){case"error":return`${o.trim()}
|
|
18
|
-
${m.default.yellow(
|
|
19
|
-
${m.default.yellow(
|
|
20
|
-
`;case"submit":return`${o}${m.default.gray(
|
|
21
|
-
${m.default.gray(
|
|
22
|
-
${m.default.cyan(
|
|
23
|
-
`}}}).prompt();var
|
|
24
|
-
${
|
|
25
|
-
`,s=this.value?o:t;switch(this.state){case"submit":return`${e}${m.default.gray(
|
|
26
|
-
${m.default.gray(
|
|
27
|
-
${m.default.cyan(
|
|
28
|
-
`}}}).prompt()};var
|
|
29
|
-
${m.default.reset(m.default.dim(`Press ${m.default.gray(m.default.bgWhite(m.default.inverse(" space ")))} to select, ${m.default.gray(m.default.bgWhite(m.default.inverse(" enter ")))} to submit`))}`},render(){let t=`${m.default.gray(
|
|
30
|
-
${
|
|
31
|
-
`,e=(s,i)=>{let n=this.value.includes(s.value);return i&&n?o(s,"active-selected"):n?o(s,"selected"):o(s,i?"active":"inactive")};switch(this.state){case"submit":return`${t}${m.default.gray(
|
|
32
|
-
${m.default.gray(
|
|
33
|
-
`).map((i,n)=>n===0?`${m.default.yellow(
|
|
34
|
-
`);return`${t+m.default.yellow(
|
|
35
|
-
${m.default.yellow(
|
|
18
|
+
${m.default.yellow(u)} ${e}
|
|
19
|
+
${m.default.yellow(V)} ${m.default.yellow(this.error)}
|
|
20
|
+
`;case"submit":return`${o}${m.default.gray(u)} ${m.default.dim(this.value||r.placeholder)}`;case"cancel":return`${o}${m.default.gray(u)} ${m.default.strikethrough(m.default.dim(this.value??""))}${this.value?.trim()?`
|
|
21
|
+
${m.default.gray(u)}`:""}`;default:return`${o}${m.default.cyan(u)} ${e}
|
|
22
|
+
${m.default.cyan(V)}
|
|
23
|
+
`}}}).prompt();var U=(r)=>{let o=r.active??"Yes",t=r.inactive??"No";return new Tn({active:o,inactive:t,initialValue:r.initialValue??!0,render(){let e=`${m.default.gray(u)}
|
|
24
|
+
${Ln(this.state)} ${r.message}
|
|
25
|
+
`,s=this.value?o:t;switch(this.state){case"submit":return`${e}${m.default.gray(u)} ${m.default.dim(s)}`;case"cancel":return`${e}${m.default.gray(u)} ${m.default.strikethrough(m.default.dim(s))}
|
|
26
|
+
${m.default.gray(u)}`;default:return`${e}${m.default.cyan(u)} ${this.value?`${m.default.green(Ir)} ${o}`:`${m.default.dim(Cr)} ${m.default.dim(o)}`} ${m.default.dim("/")} ${this.value?`${m.default.dim(Cr)} ${m.default.dim(t)}`:`${m.default.green(Ir)} ${t}`}
|
|
27
|
+
${m.default.cyan(V)}
|
|
28
|
+
`}}}).prompt()};var jr=(r)=>{let o=(t,e)=>{let s=t.label??String(t.value);return e==="active"?`${m.default.cyan(et)} ${s} ${t.hint?m.default.dim(`(${t.hint})`):""}`:e==="selected"?`${m.default.green(Nr)} ${m.default.dim(s)} ${t.hint?m.default.dim(`(${t.hint})`):""}`:e==="cancelled"?`${m.default.strikethrough(m.default.dim(s))}`:e==="active-selected"?`${m.default.green(Nr)} ${s} ${t.hint?m.default.dim(`(${t.hint})`):""}`:e==="submitted"?`${m.default.dim(s)}`:`${m.default.dim(st)} ${m.default.dim(s)}`};return new kr({options:r.options,initialValues:r.initialValues,required:r.required??!0,cursorAt:r.cursorAt,validate(t){if(this.required&&t.length===0)return`Please select at least one option.
|
|
29
|
+
${m.default.reset(m.default.dim(`Press ${m.default.gray(m.default.bgWhite(m.default.inverse(" space ")))} to select, ${m.default.gray(m.default.bgWhite(m.default.inverse(" enter ")))} to submit`))}`},render(){let t=`${m.default.gray(u)}
|
|
30
|
+
${Ln(this.state)} ${r.message}
|
|
31
|
+
`,e=(s,i)=>{let n=this.value.includes(s.value);return i&&n?o(s,"active-selected"):n?o(s,"selected"):o(s,i?"active":"inactive")};switch(this.state){case"submit":return`${t}${m.default.gray(u)} ${this.options.filter(({value:s})=>this.value.includes(s)).map((s)=>o(s,"submitted")).join(m.default.dim(", "))||m.default.dim("none")}`;case"cancel":{let s=this.options.filter(({value:i})=>this.value.includes(i)).map((i)=>o(i,"cancelled")).join(m.default.dim(", "));return`${t}${m.default.gray(u)} ${s.trim()?`${s}
|
|
32
|
+
${m.default.gray(u)}`:""}`}case"error":{let s=this.error.split(`
|
|
33
|
+
`).map((i,n)=>n===0?`${m.default.yellow(V)} ${m.default.yellow(i)}`:` ${i}`).join(`
|
|
34
|
+
`);return`${t+m.default.yellow(u)} ${Gr({options:this.options,cursor:this.cursor,maxItems:r.maxItems,style:e}).join(`
|
|
35
|
+
${m.default.yellow(u)} `)}
|
|
36
36
|
${s}
|
|
37
|
-
`}default:return`${t}${m.default.cyan(
|
|
38
|
-
${m.default.cyan(
|
|
39
|
-
${m.default.cyan(
|
|
40
|
-
`}}}).prompt()};var
|
|
37
|
+
`}default:return`${t}${m.default.cyan(u)} ${Gr({options:this.options,cursor:this.cursor,maxItems:r.maxItems,style:e}).join(`
|
|
38
|
+
${m.default.cyan(u)} `)}
|
|
39
|
+
${m.default.cyan(V)}
|
|
40
|
+
`}}}).prompt()};var C=(r="",o="")=>{let t=`
|
|
41
41
|
${r}
|
|
42
42
|
`.split(`
|
|
43
|
-
`),e=
|
|
44
|
-
`);process.stdout.write(`${m.default.gray(
|
|
45
|
-
${m.default.green(
|
|
43
|
+
`),e=zn(o).length,s=Math.max(t.reduce((n,a)=>{let l=zn(a);return l.length>n?l.length:n},0),e)+2,i=t.map((n)=>`${m.default.gray(u)} ${m.default.dim(n)}${" ".repeat(s-zn(n).length)}${m.default.gray(u)}`).join(`
|
|
44
|
+
`);process.stdout.write(`${m.default.gray(u)}
|
|
45
|
+
${m.default.green(yn)} ${m.default.reset(o)} ${m.default.gray(Ar.repeat(Math.max(s-e-1,1))+it)}
|
|
46
46
|
${i}
|
|
47
|
-
${m.default.gray(
|
|
48
|
-
`)},
|
|
47
|
+
${m.default.gray(at+Ar.repeat(s+2)+ct)}
|
|
48
|
+
`)},Ur=(r="")=>{process.stdout.write(`${m.default.gray(V)} ${m.default.red(r)}
|
|
49
49
|
|
|
50
|
-
`)};var
|
|
51
|
-
`);t.push(`${o} ${e}`,...s.map((i)=>`${m.default.gray(
|
|
50
|
+
`)};var R={message:(r="",{symbol:o=m.default.gray(u)}={})=>{let t=[`${m.default.gray(u)}`];if(r){let[e,...s]=r.split(`
|
|
51
|
+
`);t.push(`${o} ${e}`,...s.map((i)=>`${m.default.gray(u)} ${i}`))}process.stdout.write(`${t.join(`
|
|
52
52
|
`)}
|
|
53
|
-
`)},info:(r)=>{
|
|
54
|
-
`);let
|
|
55
|
-
`);process.stdout.write(
|
|
56
|
-
`);let E=0,
|
|
57
|
-
`):process.stdout.write(`${
|
|
58
|
-
`),
|
|
59
|
-
`;if(t){if(!e)
|
|
60
|
-
${
|
|
61
|
-
${d}`);return{...
|
|
62
|
-
`;if(r){if(!o)
|
|
63
|
-
${
|
|
64
|
-
${n}`);return}await Bun.write(i,n),
|
|
65
|
-
`).filter(Boolean).map((
|
|
66
|
-
|
|
67
|
-
If you want to run Sisyphus in single-mode/root package, use --single flag or set \`"single": true\` in .sisyphus/config.json.`);let i=await
|
|
68
|
-
`):[`# ${
|
|
69
|
-
${
|
|
70
|
-
`)}`);else if(!await
|
|
53
|
+
`)},info:(r)=>{R.message(r,{symbol:m.default.blue(lt)})},success:(r)=>{R.message(r,{symbol:m.default.green(mt)})},step:(r)=>{R.message(r,{symbol:m.default.green(yn)})},warn:(r)=>{R.message(r,{symbol:m.default.yellow(ft)})},warning:(r)=>{R.warn(r)},error:(r)=>{R.message(r,{symbol:m.default.red(bt)})}},Re=`${m.default.gray(u)} `;var Br=({indicator:r="dots"}={})=>{let o=Kn?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],t=Kn?80:120,e=process.env.CI==="true",s,i,n=!1,a="",l,f=performance.now(),b=(w)=>{let E=w>1?"Something went wrong":"Canceled";n&&A(E,w)},p=()=>b(2),g=()=>b(1),d=()=>{process.on("uncaughtExceptionMonitor",p),process.on("unhandledRejection",p),process.on("SIGINT",g),process.on("SIGTERM",g),process.on("exit",b)},h=()=>{process.removeListener("uncaughtExceptionMonitor",p),process.removeListener("unhandledRejection",p),process.removeListener("SIGINT",g),process.removeListener("SIGTERM",g),process.removeListener("exit",b)},$=()=>{if(l===void 0)return;e&&process.stdout.write(`
|
|
54
|
+
`);let w=l.split(`
|
|
55
|
+
`);process.stdout.write(dn.cursor.move(-999,w.length-1)),process.stdout.write(dn.erase.down(w.length))},_=(w)=>w.replace(/\.+$/,""),v=(w)=>{let E=(performance.now()-w)/1000,S=Math.floor(E/60),P=Math.floor(E%60);return S>0?`[${S}m ${P}s]`:`[${P}s]`},x=(w="")=>{n=!0,s=Rr(),a=_(w),f=performance.now(),process.stdout.write(`${m.default.gray(u)}
|
|
56
|
+
`);let E=0,S=0;d(),i=setInterval(()=>{if(e&&a===l)return;$(),l=a;let P=m.default.magenta(o[E]);if(e)process.stdout.write(`${P} ${a}...`);else if(r==="timer")process.stdout.write(`${P} ${a} ${v(f)}`);else{let H=".".repeat(Math.floor(S)).slice(0,3);process.stdout.write(`${P} ${a}${H}`)}E=E+1<o.length?E+1:0,S=S<o.length?S+0.125:0},t)},A=(w="",E=0)=>{n=!1,clearInterval(i),$();let S=E===0?m.default.green(yn):E===1?m.default.red(Mr):m.default.red(Pr);a=_(w??a),r==="timer"?process.stdout.write(`${S} ${a} ${v(f)}
|
|
57
|
+
`):process.stdout.write(`${S} ${a}
|
|
58
|
+
`),h(),s()};return{start:x,stop:A,message:(w="")=>{a=_(w??a)}}},Jn=async(r,o)=>{let t={},e=Object.keys(r);for(let s of e){let i=r[s],n=await i({results:t})?.catch((a)=>{throw a});if(typeof o?.onCancel=="function"&&q(n)){t[s]="canceled",o.onCancel({results:t});continue}t[s]=n}return t};var pt={"core.auth.failed":"Authentication failed","core.auth.invalid_token":"Token is invalid or expired","core.fs.cannot_read":"Cannot read file","core.fs.cannot_write":"Cannot write to file","core.fs.directory_not_found":"Directory not found","core.fs.file_not_found":"File not found","core.git.dirty_working_dir":"Working directory has uncommitted changes","core.git.no_commits":"No commits found","core.git.not_repository":"Not a git repository","core.git.operation_failed":"Git operation failed","core.invalid_argument":"Invalid argument","core.invalid_config":"Invalid configuration","core.network.request_failed":"Network request failed","core.operation_cancelled":"Operation cancelled","core.operation_failed":"Operation failed","core.permission_denied":"Permission denied","hydra.config.invalid_format":"Invalid configuration format","hydra.config.missing_required":"Missing required configuration","hydra.config.not_found":"Configuration file not found","hydra.runner.creation_failed":"Runner creation failed","hydra.runner.not_found":"Runner not found","hydra.runner.removal_failed":"Runner removal failed","hydra.token.decryption_failed":"Token decryption failed","hydra.token.encryption_failed":"Token encryption failed","sisyphus.publish.failed":"Publishing failed","sisyphus.release.no_changes":"No changes to release","sisyphus.stone.invalid":"Invalid stone format","sisyphus.stone.not_found":"No stones found","sisyphus.version.conflict":"Version conflict detected","sisyphus.version.invalid_format":"Invalid version format"};function Hr(r,o){let t=pt[r]||"Unknown error";return o?`${t}: ${o}`:t}var F=I({prefix:"cli-core"}).child("error");class Yn extends Error{code;context;constructor(r,o,t){let e=r.includes(".")&&!r.includes(" ")?Hr(r,t):r;super(e);this.code=o;this.context=t;this.name="CLIError"}}function Tr(r={}){let{errorPrefix:o="\u2717"}=r;return function t(e){if(q(e))F.info("Operation cancelled"),process.exit(0);if(e instanceof Yn){if(F.error(`${o} ${e.message}`),e.code)F.error(` Error code: ${e.code}`)}else if(e instanceof Error)F.error(`${o} ${e.message}`);else F.error(`${o} An unexpected error occurred`),F.error(String(e));process.exit(1)}}var z=new Uint32Array(65536),ht=(r,o)=>{let t=r.length,e=o.length,s=1<<t-1,i=-1,n=0,a=t,l=t;while(l--)z[r.charCodeAt(l)]|=1<<l;for(l=0;l<e;l++){let f=z[o.charCodeAt(l)],b=f|n;if(f|=(f&i)+i^i,n|=~(f|i),i&=f,n&s)a++;if(i&s)a--;n=n<<1|1,i=i<<1|~(b|n),n&=b}l=t;while(l--)z[r.charCodeAt(l)]=0;return a},gt=(r,o)=>{let t=o.length,e=r.length,s=[],i=[],n=Math.ceil(t/32),a=Math.ceil(e/32);for(let h=0;h<n;h++)i[h]=-1,s[h]=0;let l=0;for(;l<a-1;l++){let h=0,$=-1,_=l*32,v=Math.min(32,e)+_;for(let x=_;x<v;x++)z[r.charCodeAt(x)]|=1<<x;for(let x=0;x<t;x++){let A=z[o.charCodeAt(x)],w=i[x/32|0]>>>x&1,E=s[x/32|0]>>>x&1,S=A|h,P=((A|E)&$)+$^$|A|E,H=h|~(P|$),Q=$&P;if(H>>>31^w)i[x/32|0]^=1<<x;if(Q>>>31^E)s[x/32|0]^=1<<x;H=H<<1|w,Q=Q<<1|E,$=Q|~(S|H),h=H&S}for(let x=_;x<v;x++)z[r.charCodeAt(x)]=0}let f=0,b=-1,p=l*32,g=Math.min(32,e-p)+p;for(let h=p;h<g;h++)z[r.charCodeAt(h)]|=1<<h;let d=e;for(let h=0;h<t;h++){let $=z[o.charCodeAt(h)],_=i[h/32|0]>>>h&1,v=s[h/32|0]>>>h&1,x=$|f,A=(($|v)&b)+b^b|$|v,w=f|~(A|b),E=b&A;if(d+=w>>>e-1&1,d-=E>>>e-1&1,w>>>31^_)i[h/32|0]^=1<<h;if(E>>>31^v)s[h/32|0]^=1<<h;w=w<<1|_,E=E<<1|v,b=E|~(x|w),f=w&x}for(let h=p;h<g;h++)z[r.charCodeAt(h)]=0;return d},qr=(r,o)=>{if(r.length<o.length){let t=o;o=r,r=t}if(o.length===0)return r.length;if(r.length<=32)return ht(r,o);return gt(r,o)};function zr(r,o,t=3){return o.map((i)=>({distance:qr(r.toLowerCase(),i.toLowerCase()),option:i})).filter(({distance:i})=>i<=Math.max(3,r.length/2)).sort((i,n)=>i.distance-n.distance).slice(0,t).map(({option:i})=>i)}function Kr(r,o){return o[r.toLowerCase()]||null}var Lr=I({prefix:"cli-core"}).child("graceful");async function Wn(r,o={}){let{fallback:t,logLevel:e="warn",message:s="Operation failed gracefully"}=o;try{return await r()}catch(i){let n=i instanceof Error?i.message:String(i);if(Lr[e](`${s}: ${n}`),t)try{await t()}catch(a){Lr.error(`Fallback also failed: ${a instanceof Error?a.message:String(a)}`)}return}}var dt={backoffMultiplier:2,initialDelay:1000,maxAttempts:3,maxDelay:30000,onRetry:(r,o)=>{In.warn(`Retry attempt ${r}: ${o.message}`)},retryableErrors:["ECONNREFUSED","ECONNRESET","ETIMEDOUT","ENOTFOUND","rate limit","429","503","502","504","npm ERR!","EPUBLISHCONFLICT"]};async function Jr(r,o={}){let t={...dt,...o},e=new Error("Operation failed");for(let s=1;s<=t.maxAttempts;s++)try{return await r()}catch(i){if(e=i instanceof Error?i:new Error(String(i)),!t.retryableErrors.some((l)=>e.message.toLowerCase().includes(l.toLowerCase()))||s===t.maxAttempts)throw e;t.onRetry(s,e);let a=Math.min(t.initialDelay*t.backoffMultiplier**(s-1),t.maxDelay);await new Promise((l)=>setTimeout(l,a))}throw e}var D=(r)=>{return r.map=(o)=>D((t)=>o(r(t))),r.or=(o)=>D((t)=>{try{return r(t)}catch(e){return o(t)}}),r},Xn=()=>"bad banditype"();var Zn=(r)=>D((o)=>typeof o===typeof r?o:Xn()),J=()=>Zn("");var Yr=()=>Zn(!0);var $n=()=>Zn();var Wr=(r)=>D((o)=>o instanceof r?o:Xn());var W=(r)=>Wr(Object).map((o)=>{let t={};for(let e in r){let s=r[e](o[e]);s!==void 0&&(t[e]=s)}return t});var xn=(r)=>Wr(Array).map((o)=>o.map(r));function Qn(r,o){return D((t)=>{try{return r(t)}catch{try{return o(t)}catch{throw new Error("No matching schema in union")}}})}function nn(r,o){return(t)=>{if(t===void 0)return o;return r(t)}}function Xr(r){return{parse(o){try{return r(o)}catch(t){throw new Error(t instanceof Error?t.message:"Validation failed")}},safeParse(o){try{return{data:r(o),success:!0}}catch(t){return{error:t instanceof Error?t:new Error("Validation failed"),success:!1}}},validator:r}}function Vn(){return Qn($n(),J())}function yt(){return Qn($n(),Yr())}function Fn(r){return nn(J(),r)}function wn(r){return nn(Vn(),r)}function Y(r){return nn(yt(),r)}function Sn(r){return Qn($n(),r)}var Zr=Tr({errorPrefix:"\u2717"});var{$:vn}=globalThis.Bun;var $t=W({commit:J(),date:J()}),xt=W({author:wn("r5n-bot"),email:Vn(),message:wn("release(\uD83C\uDF89): <packageName@version>")}),wt=W({commitAndPush:Y(!1),github:Y(!1),npm:Y(!1),tags:Y(!1)}),St=W({generate:Y(!0),root:Y(!1)}),Dn=Xr(W({$schema:Fn("https://raw.githubusercontent.com/r5n-labs/clis/refs/heads/develop/packages/cli/sisyphus/schema.json"),changelog:Sn(St),commit:Sn(xt),configPath:wn(".sisyphus"),ignore:nn(xn(J()),[]),lastStone:$t,release:Sn(wt),single:Y(!1),stones:nn(xn(J()),[]),tag:Fn("latest")}));var nr=I({prefix:"sisyphus"}).child("helpers"),Vr="***",rr=["dependency","patch","minor","major","snapshot"],rn={dependency:"\uD83D\uDCE6",patch:"\uD83D\uDC1B",minor:"\u2728",major:"\uD83D\uDEA8",snapshot:"\uD83D\uDCF8"};function Fr({stream:r=process.stdout}={}){return Boolean(r?.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}function en(r){if(typeof r==="function")r();else Ur(r||"Operation cancelled by user");process.exit(0)}function Dr(r){return r}async function M({overwrite:r,tag:o,dryRun:t,silent:e,configPath:s=".sisyphus",...i}={}){let n=`./${s}/config.json`,l=await Bun.file(n).exists(),f=l&&r,b=Bun.spawnSync(["git","rev-parse","HEAD"]).stdout.toString().trim();if(b.length===0)throw new Error("Couldn't find git repository. Have you initialized git repository?");let p;if(l)try{let h=await Bun.file(".sisyphus/config.json").json(),$=Dn.safeParse(h);if(!$.success)throw nr.error("Configuration validation failed:",h,$),$.error instanceof Error?new Error(`Invalid configuration file: ${$.error.message}`):$.error;p=$.data}catch(h){if(h instanceof Error)throw new Error(`Invalid configuration file: ${h.message}`);throw new Error("Failed to parse configuration file")}else p=Dn.parse({$schema:"https://raw.githubusercontent.com/r5n-labs/clis/refs/heads/develop/packages/cli/sisyphus/schema.json",ignore:[],lastStone:{commit:b,date:new Date().toISOString().split(".")[0]||""},stones:[],tag:o||"latest"});let g={...p,...i},d=`${JSON.stringify(g,null,2)}
|
|
59
|
+
`;if(t){if(!e)nr.info(`${c.bold(c.yellow("[dry-run]"))}
|
|
60
|
+
${c.italic(".sisyphus/config.json")}:
|
|
61
|
+
${d}`);return{...p,...i}}if(f)try{await vn`rm -rf ${s}`.quiet()}catch{}if(l&&!r)return g;return await vn`mkdir -p ${s}`.quiet(),await Bun.write(n,d),g}async function no({dryRun:r,silent:o,configPath:t,...e}){let s=await M({configPath:t}),i=`./${t||s.configPath||".sisyphus"}/config.json`,n=`${JSON.stringify({...s,...e},null,2)}
|
|
62
|
+
`;if(r){if(!o)nr.info(`${c.bold(c.yellow("[dry-run]"))}
|
|
63
|
+
${c.italic(i)} would be updated to
|
|
64
|
+
${n}`);return}await Bun.write(i,n),C(`${c.green("Sisyphus config updated!")}`)}function un({name:r,version:o,bump:t,tag:e}){return`${r}@${o} => ${c.green(T({bump:t,tag:e,version:o}))} ${rn[t]}`}function vt({baseVersion:r,bump:o}){let[t="0",e="0",s="0"]=r.split(".");switch(o){case"major":return`${Number.parseInt(t,10)+1}.0.0`;case"minor":return`${t}.${Number.parseInt(e,10)+1}.0`;case"dependency":case"patch":return`${t}.${e}.${Number.parseInt(s,10)+1}`;default:return`${t}.${e}.${s}`}}function T({version:r="",bump:o,tag:t}){let[e="0.0.0",s=""]=r.split("-"),[i="",n="0"]=s.split(".");if(o==="snapshot"){let a=new Date().toISOString().replace(/[.ZT:-]/g,"").slice(0,14);return`0.0.0-${t||"nightly"}-${a}`}if(t&&!o){let a=t===i?Number.parseInt(n,10)+1:1;return`${e}-${t}.${a}`}if(t||o==="dependency"&&i){let a=t===i?Number.parseInt(n,10)+1:1;return`${e}-${t||i}.${a}`}return vt({baseVersion:e,bump:o})}async function En({dryRun:r,silent:o,configPath:t,testModeEnabled:e}={}){let s=e,i=await M({configPath:t,dryRun:r,silent:o}),n=s&&t?`${t}/stones`:`./${t||i.configPath||".sisyphus"}/stones`;try{let l=(await vn`ls ${n} 2>/dev/null || true`.quiet()).stdout.toString().trim();if(!l)return[];return l.split(`
|
|
65
|
+
`).filter(Boolean).map((b)=>b.replace(".md",""))}catch(a){if(!r)await vn`mkdir -p ${n}`.quiet();return[]}}async function X({filter:r,single:o}={}){let t=process.cwd(),e=await Bun.file("package.json").json();if(o)return Et(e);let s=e?.workspaces||[];if(s.length===0)throw new Error(`Seems like package.json doesn't have \`workspaces\` field or it's empty. Are you sure you are in the root of the workspace? (cwd: ${t})
|
|
66
|
+
|
|
67
|
+
If you want to run Sisyphus in single-mode/root package, use --single flag or set \`"single": true\` in .sisyphus/config.json.`);let i=await ut({cwd:t,workspaces:s}),n=Object.keys(i);return{packageNames:r?n.filter((a)=>a.includes(r)):n,packages:i}}async function ut({workspaces:r,cwd:o}){let t={},e={};for(let s of r){let i=new Bun.Glob(`${s}/package.json`).scanSync({cwd:o});for(let n of i){let{name:a,version:l,dependencies:f={},devDependencies:b={}}=await Bun.file(n).json(),g=Object.entries({...f,...b}).map(([d,h])=>h.startsWith("workspace")?d:"").filter(Boolean);for(let d of g)if(e[d]||=[],!e[d].includes(a))e[d].push(a);t[a]={bump:"dependency",dependencyOf:[],file:n,name:a,version:l}}}for(let[s,i]of Object.entries(e))if(t[s])t[s].dependencyOf=i;return t}function Et({name:r,version:o}){return{packageNames:[r],packages:{[r]:{bump:"dependency",dependencyOf:[],file:"package.json",name:r,version:o||"0.0.0"}}}}import{parseArgs as Bt}from"util";var{$:B}=globalThis.Bun;var sn=I({prefix:"sisyphus"}).child("changelog");async function oo({changelogRoot:r,commit:o,dryRun:t=!1,stones:e}){let s=[""],{lastStone:{commit:i=""}}=await M(),n=Ot({stones:e});for(let[a,{bump:l,path:f,changelog:b}]of n.entries()){let p=[...b,ro({commit:o,lastCommit:i})],g=await Bun.file(f).exists(),[d,...h]=g?(await Bun.file(f).text()).split(`
|
|
68
|
+
`):[`# ${a}`],$=[d,...p,...h];if(t)sn.info(`${c.bold(c.yellow("[dry-run]"))}
|
|
69
|
+
${$.join(`
|
|
70
|
+
`)}`);else if(!await Wn(async()=>{return sn.info(`Writing changelog to ${f}`),await Bun.write(f,`${$.join(`
|
|
71
71
|
`).trimEnd()}
|
|
72
|
-
`),!0},{logLevel:"error",message:`Failed to write changelog to ${
|
|
73
|
-
`):["# Changelog"],
|
|
72
|
+
`),!0},{logLevel:"error",message:`Failed to write changelog to ${f}`}))continue;let[_="",,,v=""]=b;if(!s.includes(v))s.unshift(v);s.push(`### ${rn[l]} ${a}@${_.slice(7)}`)}if(r){let a=Bun.file("CHANGELOG.md"),l=await a.exists(),[f,...b]=l?(await a.text()).split(`
|
|
73
|
+
`):["# Changelog"],p=[f,"",...s,...b,ro({commit:o,lastCommit:i,root:!0})];if(t)sn.info(`${c.bold(c.yellow("[dry-run]"))}
|
|
74
74
|
Root changelog:
|
|
75
|
-
${
|
|
76
|
-
`)}`);else await
|
|
77
|
-
`))},{logLevel:"error",message:"Failed to write root changelog"})}}function Ot({stones:r}){let o=new Map;for(let{tag:t,packages:e,message:s}of r)for(let{file:i,name:n,version:
|
|
78
|
-
`).map((n)=>{if(n.length===0)return;let[
|
|
75
|
+
${p.join(`
|
|
76
|
+
`)}`);else await Wn(async()=>{sn.info(`Writing root changelog to ${a.name}`),await Bun.write(a,p.join(`
|
|
77
|
+
`))},{logLevel:"error",message:"Failed to write root changelog"})}}function Ot({stones:r}){let o=new Map;for(let{tag:t,packages:e,message:s}of r)for(let{file:i,name:n,version:a,bump:l}of e){let f=T({bump:l,tag:t,version:a}),{bump:b,path:p,changelog:g}=o.get(n)??{bump:l,changelog:[],path:i.replace("package.json","CHANGELOG.md")},[d="",,,h=""]=g,$=[d.replace("### ","")||"0.0.0",f].sort(Bun.semver.order)[1];o.set(n,{bump:b,changelog:[`### ${rn[l]} ${$}`,"",g.length>0?"__Stones:__":"__Stone:__",`_${s}${h?`, ${h.replace(/_/g,"")}_`:"_"}`],path:p})}return o}var or="#@!";function ro({root:r,lastCommit:o,commit:t}){let e=(()=>{try{return Bun.spawnSync(["git","remote","get-url","origin"]).stdout.toString().trim().split(":")[1]?.replaceAll(".git","")||""}catch{return""}})(),i=(()=>{try{return Bun.spawnSync(["git","log",`--pretty=format:%H${or}%s${or}%cn`,`${o}..${t}`]).stdout.toString()}catch{return sn.warn("Could not get git commit history"),""}})().split(`
|
|
78
|
+
`).map((n)=>{if(n.length===0)return;let[a="",l="",f=""]=n.split(or);return`- ${e?`[${a.slice(0,7)} ${l}](https://github.com/${e}/commit/${a})`:l} (by [@${f}](https://github.com/${f}))`}).filter(Boolean);return i.length>0?`
|
|
79
79
|
<details><summary>${i.length} ${r?"Commits in this release":"Commits since last stone"}:</summary>
|
|
80
80
|
${i.join(`
|
|
81
81
|
`)}
|
|
82
|
-
</details>`:""}var
|
|
83
|
-
|
|
84
|
-
${e||""}`,draft:!1,name:t,prerelease:o.includes("-"),tag_name:o}),headers:{Accept:"application/vnd.github.v3+json",Authorization:`Bearer ${r}`,"Content-Type":"application/json"},method:"POST"});if(!
|
|
85
|
-
Please provide one by using ${
|
|
86
|
-
${i instanceof Error?i.message:i}`),
|
|
87
|
-
`);await
|
|
88
|
-
${e}`,name:`Release ${o}`,tag:o,token:r}),
|
|
89
|
-
Please provide one by using ${
|
|
90
|
-
Error during build step. If you don't have a build step, you can ignore this message.`)}}function
|
|
91
|
-
${
|
|
92
|
-
`).filter(Boolean).map((d)=>d.replace(".md","")):[];if(g.length>0)return
|
|
93
|
-
`),[g]=
|
|
94
|
-
${
|
|
82
|
+
</details>`:""}var _t=/github\.com[:/]([^/]+)\/([^/]+)/;async function Rt(){if(process.env.GITHUB_REPOSITORY){let[r,o]=process.env.GITHUB_REPOSITORY.split("/");return{owner:r,repo:o}}try{let r=await Bun.file("package.json").json(),o=r.repository?.url||r.repository;if(typeof o==="string"){let t=o.replace("git+","").replace(".git","").replace("git@github.com:","https://github.com/"),[,e,s]=t.match(_t)||[];return{owner:e,repo:s}}}catch{}throw new Error("Could not determine GitHub repository. Please set GITHUB_REPOSITORY environment variable or ensure package.json has a valid repository URL.")}async function to({token:r,tag:o,name:t,body:e}){let{owner:s,repo:i}=await Rt();if(!(s&&i))throw new Error("Could not determine GitHub repository. Please set GITHUB_REPOSITORY environment variable or ensure package.json has a valid repository URL.");let n=`https://api.github.com/repos/${s}/${i}/releases`;try{let a=await fetch(n,{body:JSON.stringify({body:`${t}
|
|
83
|
+
|
|
84
|
+
${e||""}`,draft:!1,name:t,prerelease:o.includes("-"),tag_name:o}),headers:{Accept:"application/vnd.github.v3+json",Authorization:`Bearer ${r}`,"Content-Type":"application/json"},method:"POST"});if(!a.ok){let l=await a.text();throw new Error(`GitHub API returned ${a.status}: ${l}`)}return a.json()}catch(a){if(a instanceof Error)throw new Error(`Failed to create GitHub release: ${a.message}`);throw a}}async function eo({dryRun:r,github:o,githubToken:t,packages:e,rootTag:s,withTags:i}){if(r){R.info("Skipping git operations in dry run mode");return}if(kt(i,e),It(s),o)await Ct({githubToken:t,packages:e,rootTag:s,withTags:i})}function kt(r,o){if(!r)return;for(let{name:t,version:e}of Object.values(o)){let s=`${t}@${e}`,{exitCode:i,stderr:n}=Bun.spawnSync(["git","tag",s,"-m",`Release ${s}`,"-f"]);if(i!==0)R.error(`Failed to create git tag ${s}: ${n?n.toString():"Unknown error"}`)}}function It(r){if(!r)return;let o=Bun.spawnSync(["git","tag",r,"-m","Release","-f"]);if(o.exitCode!==0)R.error(`Failed to create root tag ${r}: ${o.stderr?Buffer.from(o.stderr).toString():"Unknown error"}`)}async function Ct({githubToken:r,packages:o,rootTag:t,withTags:e}){let s=r||process.env.GITHUB_TOKEN;if(!s)return C(c.reset(c.bold(`${c.redBright("No Github token found.")}
|
|
85
|
+
Please provide one by using ${c.cyanBright("--githubToken")} flag or by setting ${c.green("GITHUB_TOKEN")} environment variable.`)));try{await Nt(s,e,o),await At(s,t,o)}catch(i){return R.error(`Failed to create GitHub release:
|
|
86
|
+
${i instanceof Error?i.message:i}`),C(c.reset(c.bold(c.redBright("Failed to create GitHub release. Check your token and permissions."))))}}async function Nt(r,o,t){if(!o)return;for(let e of Object.values(t)){let s=`${e.name}@${e.version}`;await to({body:`Release of ${e.name} version ${e.version}`,name:`Release ${s}`,tag:s,token:r}),C(c.green(`\u2713 Created GitHub release for ${s}`))}}async function At(r,o,t){if(!o)return;let e=Object.values(t).map((s)=>`- ${s.name}@${s.version}`).join(`
|
|
87
|
+
`);await to({body:`Packages included:
|
|
88
|
+
${e}`,name:`Release ${o}`,tag:o,token:r}),C(c.green(`\u2713 Created GitHub root release ${o}`))}var{$:Gt}=globalThis.Bun;async function so({packages:r,dryRun:o,npmToken:t}){let e=t||process.env.NPM_CONFIG_TOKEN||process.env.NPM_TOKEN;if(!(e||o))return C(c.reset(c.bold(`${c.redBright("No NPM token found.")}
|
|
89
|
+
Please provide one by using ${c.cyanBright("--npmToken")} flag or by setting one of ${c.green("NPM_CONFIG_TOKEN")} or ${c.green("NPM_TOKEN")} environment variables.`)));await Mt({dryRun:o,packages:r,token:e})}async function Mt({packages:r,dryRun:o,token:t}){let e=await Pt();for(let{name:s,version:i,tag:n,file:a}of Object.values(r)){let l=Br();l.start(`${o?c.yellow("[dry-run]: Test "):""}Publishing ${c.magenta(s)}@${c.cyanBright(i)}...`),await jt({cwd:a.replace("package.json","")});let f=await(async()=>{try{let b=Ut({dryRun:o,otp:e,tag:n});return await Jr(async()=>{let{stdout:p,exitCode:g}=Bun.spawnSync(b,{cwd:a.replace("package.json",""),env:{...process.env,NPM_CONFIG_TOKEN:t,NPM_TOKEN:t},stderr:"inherit"});if(g!==0)throw new Error(`npm publish failed with exit code ${g}`);return p},{onRetry:(p,g)=>{l.stop(),l.start(`${o?c.yellow("[dry-run]: Test "):""}Retrying publish ${c.magenta(s)}@${c.cyanBright(i)} (attempt ${p})...`)}}),`${c.green("Successfully published")} ${c.magenta(s)}@${c.cyanBright(i)}`}catch(b){return R.error(b instanceof Error?b.message:String(b)),`${c.bold(`${c.redBright("Failed")} ${c.magenta(s)}@${c.cyanBright(i)}`)}`}})();l.stop(`${o?c.yellow("[dry-run]: Test "):""}${f}`)}}async function Pt(){if(!Fr())return"";let r=await L({message:"Provide your NPM one-time password"});return q(r)?"":r}async function jt({cwd:r}){try{let o=await Gt`cd ${r} && bun run build`.quiet();if(o.exitCode!==0)throw new Error(`Build failed with exit code ${o.exitCode}`)}catch(o){try{if(!(await Bun.file(`${r}/package.json`).json()).scripts?.build)return}catch{}R.warn(`${o instanceof Error?o.message:String(o)}:
|
|
90
|
+
Error during build step. If you don't have a build step, you can ignore this message.`)}}function Ut({dryRun:r,tag:o,otp:t}){return["npm","publish","--access","public"].concat(o?["--tag",o]:[]).concat(r?["--dry-run"]:[]).concat(t?["--otp",t]:[])}var Z=I({prefix:"sisyphus"}).child("roll");function Ht(){let{values:r}=Bt({allowPositionals:!0,args:Bun.argv,options:{changelog:{short:"c",type:"boolean"},changelogRoot:{short:"r",type:"boolean"},dryRun:{default:!1,short:"d",type:"boolean"},github:{short:"g",type:"boolean"},githubToken:{type:"string"},npm:{short:"n",type:"boolean"},npmToken:{type:"string"},rootTag:{type:"string"},withTags:{short:"t",type:"boolean"}},strict:!0});return r}async function io(){let r=Ht(),{dryRun:o,changelog:t,changelogRoot:e,github:s,githubToken:i,npm:n,npmToken:a,rootTag:l,withTags:f}=r,b=await M(),p=Bun.spawnSync(["git","rev-parse","HEAD"]).stdout.toString().trim(),g=await(async()=>{try{return await tr()}catch{return[]}})();if(g.length===0)return C(c.reset(c.bold(`${c.redBright("No stones found.")}
|
|
91
|
+
${c.reset(`Run ${c.green("bunx @r5n/sisyphus")}${c.yellow(" version")} and create some first.`)}`)));if(typeof t==="boolean"?t:b.changelog?.generate)await oo({changelogRoot:typeof e==="boolean"?e:b.changelog?.root,commit:p,dryRun:o,stones:g});let d=await Tt({dryRun:o,stones:g});if(typeof n==="boolean"?n:b.release?.npm)await so({dryRun:o,npmToken:a,packages:d});let h=new Date().toISOString().split(".")[0]||"";if(await eo({dryRun:o,github:typeof s==="boolean"?s:b.release?.github,githubToken:i,packages:d,rootTag:l,withTags:typeof f==="boolean"?f:b.release?.tags}),await no({dryRun:o,lastStone:{commit:p,date:h},stones:[]}),!o)await B`rm -rf .sisyphus/stones`.quiet();if(b.release?.commitAndPush){let $=Object.values(d).map((A)=>`${A.name}@${A.version}`).join(", "),_=b.commit?.message?b.commit.message.replace("{message}",$):`release(\uD83C\uDF89): ${$}`,{stdout:v}=await B`git config user.name`.quiet(),{stdout:x}=await B`git config user.email`.quiet();console.log(`git config user.name "${v.toString().trim()}"`,`git config user.email "${x.toString().trim()}"`),await B`bun lint`.quiet(),await B`git config user.name "Sisyphus"`,await B`git config user.email "contact@r5n.dev"`,await B`git commit --all -m "${_}"`,await B`git push`,await B`git config user.name "${v.toString().trim()}"`,await B`git config user.email "${x.toString().trim()}"`}}async function tr({dryRun:r,silent:o,configPath:t,testModeEnabled:e}={}){let s=e,i=await En({configPath:t,dryRun:r,silent:o}),{packages:n}=await X({single:s}),a=t||".sisyphus";if(s&&i.length===0&&t)try{let f=`${t}/stones`,p=(await B`ls ${f} 2>/dev/null || true`.quiet()).stdout.toString().trim(),g=p?p.split(`
|
|
92
|
+
`).filter(Boolean).map((d)=>d.replace(".md","")):[];if(g.length>0)return Z.info(`Found ${g.length} stones in test environment`),[{message:"Test stone config",name:g[0],packages:[{bump:"major",file:`${t}/workspace/packages/test-pkg/package.json`,name:"@test/pkg",version:"1.0.0"}],tag:"latest"}]}catch(f){Z.error(`Test directory read error: ${f}`)}let l=[];for(let f of i)try{let p=(await Bun.file(`${a}/stones/${f}.md`).text()).split(`
|
|
93
|
+
`),[g]=p,d=g?.replace(/^#+\s*/,"")||"",h=p.findIndex((S)=>S.includes("|")&&S.includes(":---:"));if(h===-1){Z.error(`Failed to parse stone ${f} - could not find table format`);continue}let $=p[h-1],_=p[h+1];if(!$||!_){Z.error(`Failed to parse stone ${f} - invalid table structure`);continue}let v=$.split("|").map((S)=>S.trim()).filter(Boolean),x=_.split("|").map((S)=>S.trim()).filter(Boolean),A=[];for(let S=0;S<v.length;S++){let P=v[S],H=x[S];if(H){let Q=H.split(",").map((cn)=>cn.trim());for(let cn of Q)if(n[cn])A.push({...n[cn],bump:P})}}let w=p.find((S)=>S.trim().startsWith("_")&&S.trim().endsWith("_")),E=w?w.replace(/_/g,"").trim():"";l.push({message:d.trim(),name:f,packages:A,tag:E})}catch(b){Z.error(`Error processing stone ${f}
|
|
94
|
+
${b instanceof Error?b.message:String(b)}`)}return l}async function Tt({stones:r,dryRun:o=!1}){let t=[],e={};for(let{tag:i,packages:n,message:a}of r){t.push(a);for(let l of n){e[l.name]||=l;let f=e[l.name]||l;if(i)f.tag=i;f.bump=rr.indexOf(l.bump)>rr.indexOf(f.bump)?l.bump:f.bump,e[l.name]=f}}let s=Object.values(e).reduce((i,n)=>{return i[n.name]={...n,version:n.tag?T({tag:n.tag,version:T({bump:n.bump,version:n.version})}):T({bump:n.bump,version:n.version})},i},{});if(o)Z.info(`${c.bold(c.yellow("[dry-run]"))}
|
|
95
95
|
Config for next release:
|
|
96
96
|
Stones: ${t.join(", ")}
|
|
97
|
-
${JSON.stringify(s,null,2)}`);else{let i={};for(let[n,
|
|
98
|
-
`)}}return s}var
|
|
99
|
-
${
|
|
100
|
-
${
|
|
101
|
-
${g.packages.map((d)=>` ${
|
|
97
|
+
${JSON.stringify(s,null,2)}`);else{let i={};for(let[n,a]of Object.entries(s))try{let l=await Bun.file(a.file).json();i[n]={...a,version:l.version}}catch(l){Z.error(`Could not read current version for ${n}: ${l}`)}for(let{version:n,file:a}of Object.values(s)){let l=await Bun.file(a).json();l.version=n,await Bun.write(a,`${JSON.stringify(l,null,2)}
|
|
98
|
+
`)}}return s}var ao=I({prefix:"sisyphus"}).child("check");async function co(){let r=await import("util").then((g)=>g.parseArgs),{values:o}=r({allowPositionals:!0,args:Bun.argv,options:{debug:{type:"boolean"},json:{type:"boolean"}},strict:!1}),{json:t=!1,debug:e=!1}=o,s=Boolean(t);await M({dryRun:!0,silent:s});let{packages:i,packageNames:n}=await X(),{packages:a,packageNames:[l=""]}=await X({single:!0}),f=await tr({dryRun:!0,silent:s});if(e)ao.info("DEBUG: Stone configs:",JSON.stringify(f,null,2)),ao.info("DEBUG: Packages:",JSON.stringify(i,null,2));if(s){let g={packages:n.map((d)=>({name:d,version:i[d]?.version})),root:{name:l,version:a[l]?.version},stones:f.map((d)=>({message:d.message,name:d.name,packages:d.packages.map((h)=>({bump:h.bump,name:h.name,newVersion:T({bump:h.bump,tag:d.tag,version:h.version}),version:h.version})),tag:d.tag}))};console.log(JSON.stringify(g,null,2));return}let b=f.length>0?`${y.bold(y.success("Stones:"))}
|
|
99
|
+
${f.map((g)=>`${y.arrow("\u2192")} ${y.bold("Stone:")} ${y.number(g.name)}
|
|
100
|
+
${y.bold("Packages:")}
|
|
101
|
+
${g.packages.map((d)=>` ${rn[d.bump]} ${y.value(d.name)}@${y.success(T({bump:d.bump,tag:g.tag,version:d.version}))} ${y.dim(`(${d.bump})`)}`).join(`
|
|
102
102
|
`)}`).join(`
|
|
103
103
|
|
|
104
|
-
`)}`:"",
|
|
105
|
-
${
|
|
106
|
-
${n.map((g)=>{let d=i[g]?.version?`@${i[g]?.version}`:"";return` ${
|
|
104
|
+
`)}`:"",p=a[l]?.version?`@${a[l]?.version}`:"";if(!s)R.step(`${y.bold(y.success("Root package:"))} ${y.value(l)}${y.dim(p)}
|
|
105
|
+
${y.bold(y.success("Packages:"))}
|
|
106
|
+
${n.map((g)=>{let d=i[g]?.version?`@${i[g]?.version}`:"";return` ${y.bullet("\u2022")} ${y.value(g)}${y.dim(d)}`}).join(`
|
|
107
107
|
`)}
|
|
108
108
|
|
|
109
|
-
${
|
|
109
|
+
${b}`),C(y.success("Sisyphus check complete."))}var On="0.3.41";var lo={check:`
|
|
110
110
|
sisyphus check - Check current state and pending changes
|
|
111
111
|
|
|
112
112
|
USAGE
|
|
@@ -175,55 +175,37 @@ EXAMPLES
|
|
|
175
175
|
|
|
176
176
|
# Preview version changes
|
|
177
177
|
sisyphus version --dry-run
|
|
178
|
-
`};function
|
|
179
|
-
`).map((e)=>{if(e.startsWith("sisyphus"))return
|
|
178
|
+
`};function _n(r){if(r&&lo[r]){let t=lo[r].split(`
|
|
179
|
+
`).map((e)=>{if(e.startsWith("sisyphus"))return y.bold(e);if(e==="USAGE"||e==="OPTIONS"||e==="EXAMPLES")return y.bold(e);if(e.startsWith(" -")){let s=e.match(/^(\s+-\w,\s--\w+)\s+(.+)$/);if(s){let[,i="",n=""]=s,a=n.replace("(required)",y.error("(required)")).replace(/\(default: ([^)]+)\)/g,(l,f)=>y.dim(`(default: ${f})`)).replace(/\[boolean\]/g,y.boolean("[boolean]")).replace(/\[string\]/g,y.string("[string]")).replace(/\[number\]/g,y.number("[number]"));return` ${y.flag(i.padEnd(26))} ${a}`}}if(e.startsWith(" # "))return y.dim(e);if(e.startsWith(" sisyphus"))return` ${y.value(e.trim())}`;return e}).join(`
|
|
180
180
|
`);console.log(t);return}console.log(`
|
|
181
|
-
${
|
|
181
|
+
${y.bold(`Sisyphus@${On} - The rock-solid versioning system`)}
|
|
182
182
|
|
|
183
|
-
${
|
|
183
|
+
${y.bold("USAGE")}
|
|
184
184
|
sisyphus <command> [options]
|
|
185
185
|
|
|
186
|
-
${
|
|
187
|
-
${
|
|
188
|
-
${
|
|
189
|
-
${
|
|
190
|
-
${
|
|
191
|
-
${
|
|
192
|
-
|
|
193
|
-
${a.dim("GLOBAL OPTIONS")}
|
|
194
|
-
-h, --help Show this help message
|
|
195
|
-
-v, --version Show version number
|
|
186
|
+
${y.bold("COMMANDS")}
|
|
187
|
+
${y.command("init")} Initialize Sisyphus in your project
|
|
188
|
+
${y.command("check")} Check current state and pending changes
|
|
189
|
+
${y.command("version")} Create a new version stone for next release
|
|
190
|
+
${y.command("roll")} Roll the stones and release packages
|
|
191
|
+
${y.command("help")} Show this help message
|
|
196
192
|
|
|
197
|
-
${
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
# Create a version stone for changes
|
|
202
|
-
${a.cyan("sisyphus version")}
|
|
203
|
-
|
|
204
|
-
# Release packages with accumulated changes
|
|
205
|
-
${a.cyan("sisyphus roll")}
|
|
193
|
+
Use ${y.value("sisyphus <command> --help")} for more information about a command.
|
|
194
|
+
`)}import{parseArgs as Kt}from"util";async function mo({single:r,tag:o,ignore:t}){let e=await Jn({commitAndPush:()=>U({active:"Yes, commit and push the release",inactive:"Skip commit",initialValue:!1,message:"Should `roll` command commit and push the release?"}),commitConfig:()=>U({active:"Yes, configure commit",inactive:"Skip commit config",initialValue:!1,message:"Configure commit for release? Default commit message is `release(\uD83C\uDF89): <packageName@version>`"}),commitAuthor:({results:{commitConfig:s}})=>s?L({message:"Commit author",placeholder:"r5n-bot"}):void 0,commitEmail:({results:{commitConfig:s}})=>s?L({message:"Commit author email",placeholder:"r5n-bot@users.noreply.github.com"}):void 0,commitMessage:({results:{commitConfig:s}})=>s?L({message:"Commit message",placeholder:"release(\uD83C\uDF89): <packageName@version>"}):void 0,generateChangelog:()=>U({active:"Yes, Generate changelog",inactive:"Skip changelog",initialValue:!0,message:"Generate changelog for release?"}),releaseOnGitHub:()=>U({active:"Yes, create a GitHub release",inactive:"Skip GitHub release",initialValue:!1,message:"Create a release on GitHub when releasing packages?"}),releaseOnNPM:()=>U({active:"Yes, publish packages to NPM",inactive:"Skip NPM release",initialValue:!1,message:"Publish packages to NPM when releasing packages?"}),releaseTags:()=>U({active:"Yes, create tags for the release",inactive:"Skip tags",initialValue:!1,message:"Create tags for the release?"}),rootChangelog:({results:{generateChangelog:s}})=>s?U({active:"Yes, generate combined changelog",inactive:"Skip root changelog",initialValue:!0,message:"Generate combined changelog for monorepo?"}):void 0,single:()=>U({active:"Yes, setup for root package",inactive:"No, setup for monorepo workspace packages",initialValue:r,message:"Setup Sisyphus for only root package?"}),tag:()=>L({initialValue:o,message:"Tag used when versioning packages. Leave `latest` if you are not sure or want to release packages with latest tag.",placeholder:"latest"})},{onCancel:()=>en()});return{commitAndPush:!!e.commitAndPush,commitAuthor:e.commitAuthor||"",commitConfig:!!e.commitConfig,commitEmail:e.commitEmail||"",commitMessage:e.commitMessage||"",generateChangelog:e.generateChangelog,releaseOnGitHub:!!e.releaseOnGitHub,releaseOnNPM:!!e.releaseOnNPM,releaseTags:!!e.releaseTags,rootChangelog:!!e.rootChangelog,single:e.single,tag:e.tag}}async function fo({bump:r,packages:o,packageNames:t,tag:e}){let s=zt({packageNames:t,packages:o,tag:e}),i=`
|
|
195
|
+
- ${c.dim(c.italic(`Press ${c.underline(c.bold(c.whiteBright("a")))} to select/unselect all, ${c.underline(c.bold(c.whiteBright("SPACE")))} to select/unselect, ${c.underline(c.bold(c.whiteBright("ARROWS")))} to move, ${c.underline(c.bold(c.whiteBright("ENTER")))} to confirm`))}
|
|
196
|
+
`,n=r?[r]:["major","minor","patch"];R.info(i);let{message:a,majorPackages:l,minorPackages:f,patchPackages:b}=await Jn({majorPackages:()=>n.includes("major")?s({bump:"major"}):void 0,minorPackages:({results:{majorPackages:p}})=>n.includes("minor")?s({bump:"minor",filterPackages:p||[]}):void 0,patchPackages:({results:{majorPackages:p,minorPackages:g}})=>n.includes("patch")?s({bump:"patch",filterPackages:(p||[]).concat(g||[])}):void 0,message:()=>L({message:`Name of the stone. ${c.dim(c.italic("Default prefix or message can be configured in config."))}`,placeholder:"New feature"})},{onCancel:()=>en()});return{majorPackages:l||[],message:a,minorPackages:f||[],patchPackages:b||[]}}function zt({packageNames:r,tag:o,packages:t}){return({bump:e,filterPackages:s=[]})=>{let i=r.filter((a)=>!s?.includes(a)).map((a)=>({label:un({bump:e,name:a,tag:o,version:t[a]?.version||"0.0.0"}),value:a})),n={major:c.red,minor:c.yellow,patch:c.green};return i.length>0?jr({initialValues:void 0,message:`Select packages for ${c.bold(n[e](e))} bump.`,options:i,required:!1}):void 0}}async function bo(){let{values:{nonInteractive:r,overwrite:o,tag:t,single:e,ignore:s}}=Kt({allowPositionals:!0,args:Bun.argv,options:{ignore:{default:[],multiple:!0,short:"i",type:"string"},nonInteractive:{default:!1,short:"n",type:"boolean"},overwrite:{default:!1,short:"o",type:"boolean"},single:{default:!1,short:"s",type:"boolean"},tag:{default:"latest",short:"t",type:"string"}},strict:!0});if(r)await M({ignore:s,overwrite:o,single:e,tag:t});else{let{commitAndPush:i,commitAuthor:n,commitConfig:a,commitEmail:l,commitMessage:f,generateChangelog:b,releaseOnGitHub:p,releaseOnNPM:g,releaseTags:d,rootChangelog:h,single:$,tag:_}=await mo({ignore:s,single:e,tag:t}),v={ignore:s,single:$,tag:_};if(a)v.commit={author:n,email:l,message:f};if(p||g||i)v.release={commitAndPush:i,github:p,npm:g,tags:d};if(b)v.changelog={generate:b,root:h};await M({overwrite:o,...v})}C(`${c.magenta(`${c.bold("Sisyphus ")}${c.underline(c.italic(`v${On}`))}`)}${c.green(" is setup to roll stones.")}
|
|
206
197
|
|
|
207
|
-
|
|
208
|
-
${a.cyan("sisyphus check")}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
${a.dim("Learn more at https://github.com/r5n-labs/clis")}
|
|
212
|
-
`)}import{parseArgs as Lt}from"util";async function lo({single:r,tag:o,ignore:t}){let e=await Ln({commitAndPush:()=>j({active:"Yes, commit and push the release",inactive:"Skip commit",initialValue:!1,message:"Should `roll` command commit and push the release?"}),commitConfig:()=>j({active:"Yes, configure commit",inactive:"Skip commit config",initialValue:!1,message:"Configure commit for release? Default commit message is `release(\uD83C\uDF89): <packageName@version>`"}),commitAuthor:({results:{commitConfig:s}})=>s?z({message:"Commit author",placeholder:"r5n-bot"}):void 0,commitEmail:({results:{commitConfig:s}})=>s?z({message:"Commit author email",placeholder:"r5n-bot@users.noreply.github.com"}):void 0,commitMessage:({results:{commitConfig:s}})=>s?z({message:"Commit message",placeholder:"release(\uD83C\uDF89): <packageName@version>"}):void 0,generateChangelog:()=>j({active:"Yes, Generate changelog",inactive:"Skip changelog",initialValue:!0,message:"Generate changelog for release?"}),releaseOnGitHub:()=>j({active:"Yes, create a GitHub release",inactive:"Skip GitHub release",initialValue:!1,message:"Create a release on GitHub when releasing packages?"}),releaseOnNPM:()=>j({active:"Yes, publish packages to NPM",inactive:"Skip NPM release",initialValue:!1,message:"Publish packages to NPM when releasing packages?"}),releaseTags:()=>j({active:"Yes, create tags for the release",inactive:"Skip tags",initialValue:!1,message:"Create tags for the release?"}),rootChangelog:({results:{generateChangelog:s}})=>s?j({active:"Yes, generate combined changelog",inactive:"Skip root changelog",initialValue:!0,message:"Generate combined changelog for monorepo?"}):void 0,single:()=>j({active:"Yes, setup for root package",inactive:"No, setup for monorepo workspace packages",initialValue:r,message:"Setup Sisyphus for only root package?"}),tag:()=>z({initialValue:o,message:"Tag used when versioning packages. Leave `latest` if you are not sure or want to release packages with latest tag.",placeholder:"latest"})},{onCancel:()=>tn()});return{commitAndPush:!!e.commitAndPush,commitAuthor:e.commitAuthor||"",commitConfig:!!e.commitConfig,commitEmail:e.commitEmail||"",commitMessage:e.commitMessage||"",generateChangelog:e.generateChangelog,releaseOnGitHub:!!e.releaseOnGitHub,releaseOnNPM:!!e.releaseOnNPM,releaseTags:!!e.releaseTags,rootChangelog:!!e.rootChangelog,single:e.single,tag:e.tag}}async function mo({bump:r,packages:o,packageNames:t,tag:e}){let s=qt({packageNames:t,packages:o,tag:e}),i=`
|
|
213
|
-
- ${a.dim(a.italic(`Press ${a.underline(a.bold(a.whiteBright("a")))} to select/unselect all, ${a.underline(a.bold(a.whiteBright("SPACE")))} to select/unselect, ${a.underline(a.bold(a.whiteBright("ARROWS")))} to move, ${a.underline(a.bold(a.whiteBright("ENTER")))} to confirm`))}
|
|
214
|
-
`,n=r?[r]:["major","minor","patch"];_.info(i);let{message:c,majorPackages:l,minorPackages:p,patchPackages:h}=await Ln({majorPackages:()=>n.includes("major")?s({bump:"major"}):void 0,minorPackages:({results:{majorPackages:f}})=>n.includes("minor")?s({bump:"minor",filterPackages:f||[]}):void 0,patchPackages:({results:{majorPackages:f,minorPackages:g}})=>n.includes("patch")?s({bump:"patch",filterPackages:(f||[]).concat(g||[])}):void 0,message:()=>z({message:`Name of the stone. ${a.dim(a.italic("Default prefix or message can be configured in config."))}`,placeholder:"New feature"})},{onCancel:()=>tn()});return{majorPackages:l||[],message:c,minorPackages:p||[],patchPackages:h||[]}}function qt({packageNames:r,tag:o,packages:t}){return({bump:e,filterPackages:s=[]})=>{let i=r.filter((c)=>!s?.includes(c)).map((c)=>({label:vn({bump:e,name:c,tag:o,version:t[c]?.version||"0.0.0"}),value:c})),n={major:a.red,minor:a.yellow,patch:a.green};return i.length>0?Gr({initialValues:void 0,message:`Select packages for ${a.bold(n[e](e))} bump.`,options:i,required:!1}):void 0}}async function po(){let{values:{nonInteractive:r,overwrite:o,tag:t,single:e,ignore:s}}=Lt({allowPositionals:!0,args:Bun.argv,options:{ignore:{default:[],multiple:!0,short:"i",type:"string"},nonInteractive:{default:!1,short:"n",type:"boolean"},overwrite:{default:!1,short:"o",type:"boolean"},single:{default:!1,short:"s",type:"boolean"},tag:{default:"latest",short:"t",type:"string"}},strict:!0});if(r)await G({ignore:s,overwrite:o,single:e,tag:t});else{let{commitAndPush:i,commitAuthor:n,commitConfig:c,commitEmail:l,commitMessage:p,generateChangelog:h,releaseOnGitHub:f,releaseOnNPM:g,releaseTags:d,rootChangelog:b,single:y,tag:u}=await lo({ignore:s,single:e,tag:t}),S={ignore:s,single:y,tag:u};if(c)S.commit={author:n,email:l,message:p};if(f||g||i)S.release={commitAndPush:i,github:f,npm:g,tags:d};if(h)S.changelog={generate:h,root:b};await G({overwrite:o,...S})}k(`${a.magenta(`${a.bold("Sisyphus ")}${a.underline(a.italic(`v${On}`))}`)}${a.green(" is setup to roll stones.")}
|
|
215
|
-
|
|
216
|
-
You can now start by creating a new stone by running ${a.reset(a.green("bunx @r5n/sisyphus"))}${a.blue(" version")}
|
|
198
|
+
You can now start by creating a new stone by running ${c.reset(c.green("bunx @r5n/sisyphus"))}${c.blue(" version")}
|
|
217
199
|
and following the prompts.
|
|
218
200
|
|
|
219
|
-
After you finished, you can release it by running ${
|
|
220
|
-
`)}import{parseArgs as
|
|
201
|
+
After you finished, you can release it by running ${c.reset(c.green("bunx @r5n/sisyphus"))}${c.blue(" roll")}
|
|
202
|
+
`)}import{parseArgs as Wt}from"util";import{randomUUID as Lt}from"crypto";var Jt=["major","minor","patch","dependency","snapshot"];function Yt({message:r,tag:o,packages:t}){let e=t.reduce((i,n)=>{return i[n.bump]=i[n.bump]||[],i[n.bump].push(n.name),i},{}),s=Jt.filter((i)=>e[i]?.length>0);return[`### ${r}`,o?`_${o}_`:"",Vr,"",`| ${s.join(" | ")} |`,`| ${s.map(()=>":---:").join(" | ")} |`,`| ${s.map((i)=>e[i]?.join(", ")||"").join(" | ")} |`,""]}async function po({majorPackages:r,message:o,minorPackages:t,packages:e,patchPackages:s,tag:i,configPath:n}){let l=`${`${(await En({configPath:n})).length+1}`.padStart(4,"0")}-${Lt().slice(0,8)}`,f=[...r,...t,...s],b=f.flatMap((h)=>e[h]?.dependencyOf||[]),g=[{packages:r,type:"major"},{packages:t,type:"minor"},{packages:s,type:"patch"},{packages:b.filter((h)=>!f.includes(h)),type:"dependency"}].flatMap(({packages:h,type:$})=>h.map((_)=>{let v=e[_];if(!v)throw new Error(`Package ${_} not found`);return{...v,bump:$,tag:i}})).filter(Boolean),d=Yt({message:o,packages:g,tag:i});return{packages:g,stoneContent:d,stoneName:l}}function Xt(){let{values:r}=Wt({allowPositionals:!0,args:Bun.argv,options:{bump:{default:"",short:"b",type:"string"},dryRun:{default:!1,short:"d",type:"boolean"},filter:{default:"",short:"f",type:"string"},snapshot:{default:!1,short:"s",type:"boolean"},tag:{default:"",short:"t",type:"string"},yes:{default:!1,short:"y",type:"boolean"}},strict:!0});return r}function Zt(r){let{snapshot:o,bump:t}=r;if(o&&t)throw new Error(`Cannot use both ${c.cyanBright("--snapshot")} and ${c.cyanBright("--bump")} options, pick one.`)}async function Qt(){let r=await U({active:"Yes, continue",inactive:"No, cancel",message:"Are you sure you want to create a new stone?"});if(!r||q(r))throw new Error("Operation cancelled by user")}async function Vt(r,o,t){await Bun.write(`.sisyphus/stones/${r}.md`,o.join(`
|
|
221
203
|
`)),await Bun.write(".sisyphus/config.json",`${JSON.stringify(t,null,2)}
|
|
222
|
-
`)}async function
|
|
223
|
-
`)):""}${
|
|
224
|
-
`,`${
|
|
225
|
-
`)),o){
|
|
204
|
+
`)}async function ho(){try{let r=Xt();Zt(r);let{dryRun:o}=Dr(r),{packages:t,packageNames:e}=await X({filter:r.filter}),{message:s,majorPackages:i,minorPackages:n,patchPackages:a}=await fo({bump:r.bump,packageNames:e,packages:t,tag:r.tag}),{packages:l,stoneContent:f,stoneName:b}=await po({majorPackages:i,message:s,minorPackages:n,packages:t,patchPackages:a,tag:r.tag});if(R.step([`${r.dryRun?c.bold(c.yellow(`[dry-run]
|
|
205
|
+
`)):""}${c.italic("Changes preview:")}
|
|
206
|
+
`,`${c.italic("Stone: ")}${c.bold(s)}`,...l.map(un)].join(`
|
|
207
|
+
`)),o){R.info(`${c.bold(c.yellow("[dry-run]"))}
|
|
226
208
|
Stone file preview:
|
|
227
|
-
${
|
|
228
|
-
`)}`);return}if(!r.yes)await
|
|
229
|
-
or create another stone with ${
|
|
209
|
+
${f.join(`
|
|
210
|
+
`)}`);return}if(!r.yes)await Qt();let p=await M();p.stones.push(b),await Vt(b,f,p),C(`Now you can run ${c.green("bunx @r5n/sisyphus roll")} to release packages
|
|
211
|
+
or create another stone with ${c.green("bunx @r5n/sisyphus version")}`,`${c.bold("Stone ")}${c.italic(`${b}.md`)} ${c.green("created!")}`)}catch(r){en(r instanceof Error?r.message:String(r))}}var Rn=["init","check","version","roll","help"],an=I({prefix:"sisyphus"}),Ft={c:"check",cheack:"check",chekc:"check",h:"help",i:"init",initialise:"init",inti:"init",intialize:"init",publish:"roll",r:"roll",relase:"release",release:"roll",rool:"roll",state:"check",status:"check",v:"version",ver:"version",verison:"version"};async function Dt(){try{let[,,r,...o]=process.argv;if(!r||r==="--help"||r==="-h"){_n();return}let t=r;if(!Rn.includes(r)){let e=Kr(r,Ft);if(e&&Rn.includes(e))t=e,an.warn(`Assuming you meant '${e}'`)}if(!Rn.includes(t)){an.error(`Unknown command: ${r}`);let e=zr(r,Rn);if(e.length>0){an.error("Did you mean one of these?");for(let s of e)an.error(` ${s}`)}an.error("Run 'sisyphus --help' for usage information"),process.exit(1)}if(o.includes("--help")||o.includes("-h")){_n(t);return}switch(t){case"init":await bo();break;case"check":await co();break;case"version":await ho();break;case"roll":await io();break;case"help":{let e=o[0];_n(e);break}default:throw new Error(`Unknown command: ${t}`)}}catch(r){Zr(r)}}await Dt();
|
package/package.json
CHANGED
|
@@ -20,9 +20,8 @@
|
|
|
20
20
|
"registry": "https://registry.npmjs.org/"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
23
|
-
"directory": "packages/cli/sisyphus",
|
|
24
23
|
"type": "git",
|
|
25
|
-
"url": "git+https://github.com/r5n-
|
|
24
|
+
"url": "git+https://github.com/r5n-labs/clis.git"
|
|
26
25
|
},
|
|
27
26
|
"scripts": {
|
|
28
27
|
"build": "rm -rf dist && bun build.ts",
|
|
@@ -36,5 +35,5 @@
|
|
|
36
35
|
},
|
|
37
36
|
"type": "module",
|
|
38
37
|
"types": "src/cli.ts",
|
|
39
|
-
"version": "0.3.
|
|
38
|
+
"version": "0.3.41"
|
|
40
39
|
}
|