@fugood/bricks-cli 2.25.0-beta.61 → 2.25.0-beta.62
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/lib/10.js +1 -1
- package/lib/117.js +1 -1
- package/lib/209.js +112 -0
- package/lib/212.js +1 -0
- package/lib/215.js +1 -1
- package/lib/223.js +4 -4
- package/lib/247.js +1 -0
- package/lib/320.js +2 -2
- package/lib/332.js +13 -0
- package/lib/358.js +1 -0
- package/lib/370.js +1 -0
- package/lib/387.js +35 -0
- package/lib/405.js +1 -0
- package/lib/456.js +2 -2
- package/lib/486.js +1 -0
- package/lib/511.js +1 -1
- package/lib/557.js +1 -1
- package/lib/563.js +1 -1
- package/lib/583.js +22 -0
- package/lib/658.js +2 -0
- package/lib/663.js +1 -1
- package/lib/690.js +1 -0
- package/lib/708.js +8 -6
- package/lib/785.js +1 -0
- package/lib/818.js +1 -0
- package/lib/831.js +1 -0
- package/lib/907.js +872 -0
- package/lib/915.js +3 -2
- package/lib/936.js +1 -0
- package/lib/940.js +19 -1
- package/lib/index.js +98 -1142
- package/package.json +5 -5
- package/lib/3.js +0 -1
- package/lib/412.js +0 -1
package/lib/663.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const __rspack_esm_id=663;export const __rspack_esm_ids=[663];export const __webpack_modules__={70604(t){t.exports=function(t){if("u">typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports},90250(t,e,r){var i=r(3634),n=r(70604),o=r(78243),s=r(5523);t.exports=function(t){return i(t)||n(t)||o(t)||s()},t.exports.__esModule=!0,t.exports.default=t.exports},69995(t,e,r){r.d(e,{H:()=>i});function i(t,e){try{var r=JSON.parse(t).error,i=r?.message??r;if("string"==typeof i&&i)return i}catch{}return t||e}},42208(t,e,r){r.d(e,{RP:()=>a});var i=r(99436),n=r(75720),o="CTOR",s="ctor@bricks.tools",l=`Co-authored-by: ${o} <${s}>`;function u(){return(u=i(function*(t){return!!(yield(0,n.sh)`cd ${t} && git config user.email`.quiet().nothrow().text()).trim()})).apply(this,arguments)}function a(t,e){return c.apply(this,arguments)}function c(){return(c=i(function*(t,e,r=[]){var i=yield function(t){return u.apply(this,arguments)}(t),n=i?[]:["-c",`user.name=${o}`,"-c",`user.email=${s}`],a=[];for(var c of e)a.push("-m",c);return i&&a.push("-m",l),[...n,"commit",...r,...a]})).apply(this,arguments)}},13376(t,e,r){r.d(e,{a:()=>u,p:()=>s});var i=r(99436),n=r(51455),o=".bricks/.last-pushed-commit";function s(t){return l.apply(this,arguments)}function l(){return(l=i(function*(t){try{return(yield(0,n.readFile)(`${t}/${o}`,"utf8")).trim()||null}catch{return null}})).apply(this,arguments)}function u(t,e){return a.apply(this,arguments)}function a(){return(a=i(function*(t,e){e&&(yield(0,n.mkdir)(`${t}/.bricks`,{recursive:!0}),yield(0,n.writeFile)(`${t}/${o}`,e))})).apply(this,arguments)}},69070(t,e,r){r.d(e,{k:()=>s,q:()=>u});var i=r(99436),n=r(26848),o=r(1708);function s(t){return l.apply(this,arguments)}function l(){return(l=i(function*(t){if(!o.stdin.isTTY)return"";var e=(0,n.createInterface)({input:o.stdin,output:o.stdout});try{return(yield e.question(`${t} `)).trim()}finally{e.close()}})).apply(this,arguments)}function u(t){return a.apply(this,arguments)}function a(){return(a=i(function*(t){return(yield s(t))==="y"})).apply(this,arguments)}},75720(t,e,r){r.d(e,{p:()=>d,sh:()=>f});var i,n,o=r(90250),s=r(99436),l=r(5018),u=r(44668),a=r(31421),c=r(73024),d=()=>{var t=process.argv[1];return t&&(0,c.existsSync)(t)?[process.execPath,t]:[process.execPath]},h=u(function t(e){l(this,t),this._cwd=void 0,this._mode="default",this._throw=!0,this._env=void 0,this._promise=null,this.args=e},[{key:"cwd",value:function(t){return this._cwd=t,this}},{key:"quiet",value:function(){return this._mode="quiet",this}},{key:"nothrow",value:function(){return this._throw=!1,this}},{key:"env",value:function(t){return this._env={...this._env,...t},this}},{key:"text",value:(i=s(function*(){return"default"===this._mode&&(this._mode="text"),(yield this.run()).stdout.toString("utf8")}),function(){return i.apply(this,arguments)})},{key:"then",value:function(t,e){return this.run().then(t,e)}},{key:"run",value:function(){return this._promise||(this._promise=this.exec()),this._promise}},{key:"exec",value:(n=s(function*(){var t=o(this.args),e=t[0],r=(function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i})(t).slice(1);if(!e)throw Error("sh: empty command");var i="default"===this._mode?["inherit","pipe","pipe"]:"quiet"===this._mode?["ignore","pipe","pipe"]:["inherit","pipe","pipe"],n=this._env?{...process.env,...this._env}:void 0,s=(0,a.spawn)(e,r,{cwd:this._cwd,stdio:i,env:n}),l=[],u=[];s.stdout?.on("data",t=>{l.push(t),"default"===this._mode&&process.stdout.write(t)}),s.stderr?.on("data",t=>{u.push(t),"default"===this._mode&&process.stderr.write(t)});var c=yield new Promise((t,e)=>{s.on("error",e),s.on("close",e=>t(e??0))}),d=Buffer.concat(l),h=Buffer.concat(u);if(0!==c&&this._throw){var p=Error(`sh: command failed with exit ${c}: ${this.args.join(" ")}`);throw p.exitCode=c,p.stdout=d,p.stderr=h,p}return{exitCode:c,stdout:d,stderr:h}}),function(){return n.apply(this,arguments)})}]),p=/\s/;function f(t,...e){var r,i,n,o,s,l=(r=[],i="",n=!1,o=()=>{n&&(r.push(i),i="",n=!1)},s=t=>{i+=t,n=!0},(t.forEach((t,r)=>{for(var i=0;i<t.length;i++){var n=t[i];p.test(n)?o():s(n)}r<e.length&&(t=>{if(null!=t){if(Array.isArray(t))return t.forEach((t,e)=>{e>0&&o(),s(String(t))});s(String(t))}})(e[r])}),o(),r.length>=3&&"cd"===r[0]&&"&&"===r[2])?{tokens:r.slice(3),initialCwd:r[1]}:{tokens:r}),u=l.tokens,a=l.initialCwd,c=new h(u);return a&&c.cwd(a),c}},47090(t,e,r){r.r(e),r.d(e,{pull:()=>y});var i=r(99436),n=r(51455),o=r(73024),s=r(76760),l=r(75720),u=r(69995),a=r(42208),c=r(13376),d=r(69070),h=["subspaces","automation-tests"];function p(t,e){return f.apply(this,arguments)}function f(){return(f=i(function*(t,e){if(!(0,o.existsSync)(t))return[];var r,l=[],u=yield(0,n.readdir)(t,{withFileTypes:!0});return yield Promise.all(u.map((r=i(function*(r){var i=(0,s.join)(t,r.name);r.isDirectory()?l.push(...yield p(i,e)):r.isFile()&&r.name.endsWith(".ts")&&l.push((0,s.relative)(e,i))}),function(t){return r.apply(this,arguments)}))),l})).apply(this,arguments)}function y(){return m.apply(this,arguments)}function m(){return(m=i(function*(t={}){var e,o,f=process.cwd(),y=!!t.force,m=0===(yield(0,l.sh)`cd ${f} && git status`.nothrow()).exitCode;if(m){if(yield(0,l.sh)`cd ${f} && git diff --name-only --diff-filter=ACMR`.text())if(y){console.log("Force mode: committing unstaged changes before pull..."),yield(0,l.sh)`cd ${f} && git add .`;var g=yield(0,a.RP)(f,["chore(force-pull): saved unstaged changes before pull"]);yield(0,l.sh)`cd ${f} && git ${g}`}else throw Error("Unstaged changes found, please commit or stash your changes before pulling")}else if(!(yield(0,d.q)("No git repository found, so it will not be safe to pull, continue? (y/n)")))throw Error("Pull cancelled");var v=JSON.parse((yield(0,n.readFile)(`${f}/application.json`,"utf8"))),$="module"===v.type,_=$?"module":"app";console.log(`Pulling ${_} project (${v.id})...`);var w=yield(0,l.sh)`bricks ${_} project-pull ${v.id} --json`.quiet().nothrow();if(0!==w.exitCode){var x=w.stderr.toString()||w.stdout.toString();throw Error((0,u.H)(x,"Pull failed"))}var k=JSON.parse(w.stdout.toString()),b=k.files,C=k.lastCommitId,S=(yield(0,c.p)(f))||C,P=$?"BRICKS_PROJECT_try-pull-module":"BRICKS_PROJECT_try-pull-application",j="";if(m&&!y){if(!(j=(yield(0,l.sh)`cd ${f} && git branch --show-current`.text()).trim()))throw Error("Cannot pull from a detached HEAD");console.log(`Checking commit ${S}...`);var E=(yield(0,l.sh)`cd ${f} && git rev-list -1 ${S}`.nothrow().text()).trim().match(/^[\da-f]{40}$/);if((yield(0,l.sh)`cd ${f} && git rev-parse HEAD`.text()).trim()===C)throw Error("Commit not changed");yield(0,l.sh)`cd ${f} && git branch -D ${P}`.nothrow(),E?yield(0,l.sh)`cd ${f} && git checkout -b ${P} ${S}`.nothrow():yield(0,l.sh)`cd ${f} && git checkout -b ${P}`}var R=yield(0,n.readFile)(`${f}/.oxfmtrc.json`,"utf8").then(JSON.parse).catch(()=>({trailingComma:"all",tabWidth:2,semi:!1,singleQuote:!0,printWidth:100})),A=new Set(b.map(t=>t.name)),q=[];yield Promise.all(h.map((e=i(function*(t){for(var e of yield p((0,s.join)(f,t),f)){var r=e.split(/[\\/]/).join("/");A.has(r)||q.push(r)}}),function(t){return e.apply(this,arguments)}))),yield Promise.all(q.map(t=>(0,n.unlink)(`${f}/${t}`)));var F=(yield r.e(75).then(r.bind(r,79491))).format;if(yield Promise.all(b.map((o=i(function*(t){var e=t.input;t.formatable&&(e=(yield F(t.name,t.input,R)).code);var r=(0,s.join)(f,t.name);return yield(0,n.mkdir)((0,s.dirname)(r),{recursive:!0}),(0,n.writeFile)(r,e)}),function(t){return o.apply(this,arguments)}))),m){if(yield(0,l.sh)`cd ${f} && git add .`,(yield(0,l.sh)`cd ${f} && git diff --cached --name-only`.text()).trim()){var O=y?`chore(force-pull): apply force pull-${_}`:$?"chore(project): apply file changes from BRICKS module":"chore(project): apply file changes from BRICKS application",B=yield(0,a.RP)(f,[O]);yield(0,l.sh)`cd ${f} && git ${B}`}if(!y){if(yield(0,l.sh)`cd ${f} && git checkout ${j}`,0!==(yield(0,l.sh)`cd ${f} && git merge ${P} --no-edit`.nothrow()).exitCode){yield(0,l.sh)`cd ${f} && git add .`;var D=yield(0,a.RP)(f,[`chore(project): merge with conflicts (resolve in ${j})`],["--no-verify"]);yield(0,l.sh)`cd ${f} && git ${D}`}yield(0,l.sh)`cd ${f} && git branch -D ${P}`.nothrow()}var I=(yield(0,l.sh)`cd ${f} && git rev-parse HEAD`.nothrow().text()).trim();I&&(yield(0,c.a)(f,I))}console.log(`${$?"Module":"App"} project pulled: ${b.length} files${q.length?`, removed ${q.length} orphan .ts file${1===q.length?"":"s"}`:""}${y?" (force)":""}`)})).apply(this,arguments)}}};
|
|
1
|
+
export const __rspack_esm_id=663;export const __rspack_esm_ids=[663];export const __webpack_modules__={5018(t){t.exports=function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},44668(t,e,r){var i=r(56347);function o(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,i(o.key),o)}}t.exports=function(t,e,r){return e&&o(t.prototype,e),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},70604(t){t.exports=function(t){if("u">typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports},90250(t,e,r){var i=r(3634),o=r(70604),n=r(78243),s=r(5523);t.exports=function(t){return i(t)||o(t)||n(t)||s()},t.exports.__esModule=!0,t.exports.default=t.exports},23878(t,e,r){var i=r(14319).default;t.exports=function(t,e){if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=i(o))return o;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},56347(t,e,r){var i=r(14319).default,o=r(23878);t.exports=function(t){var e=o(t,"string");return"symbol"==i(e)?e:e+""},t.exports.__esModule=!0,t.exports.default=t.exports},14319(t){function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},69995(t,e,r){r.d(e,{H:()=>i});function i(t,e){try{var r=JSON.parse(t).error,i=r?.message??r;if("string"==typeof i&&i)return i}catch{}return t||e}},42208(t,e,r){r.d(e,{RP:()=>a});var i=r(99436),o=r(75720),n="CTOR",s="ctor@bricks.tools",l=`Co-authored-by: ${n} <${s}>`;function u(){return(u=i(function*(t){return!!(yield(0,o.sh)`cd ${t} && git config user.email`.quiet().nothrow().text()).trim()})).apply(this,arguments)}function a(t,e){return c.apply(this,arguments)}function c(){return(c=i(function*(t,e,r=[]){var i=yield function(t){return u.apply(this,arguments)}(t),o=i?[]:["-c",`user.name=${n}`,"-c",`user.email=${s}`],a=[];for(var c of e)a.push("-m",c);return i&&a.push("-m",l),[...o,"commit",...r,...a]})).apply(this,arguments)}},13376(t,e,r){r.d(e,{a:()=>u,p:()=>s});var i=r(99436),o=r(51455),n=".bricks/.last-pushed-commit";function s(t){return l.apply(this,arguments)}function l(){return(l=i(function*(t){try{return(yield(0,o.readFile)(`${t}/${n}`,"utf8")).trim()||null}catch{return null}})).apply(this,arguments)}function u(t,e){return a.apply(this,arguments)}function a(){return(a=i(function*(t,e){e&&(yield(0,o.mkdir)(`${t}/.bricks`,{recursive:!0}),yield(0,o.writeFile)(`${t}/${n}`,e))})).apply(this,arguments)}},69070(t,e,r){r.d(e,{k:()=>s,q:()=>u});var i=r(99436),o=r(26848),n=r(1708);function s(t){return l.apply(this,arguments)}function l(){return(l=i(function*(t){if(!n.stdin.isTTY)return"";var e=(0,o.createInterface)({input:n.stdin,output:n.stdout});try{return(yield e.question(`${t} `)).trim()}finally{e.close()}})).apply(this,arguments)}function u(t){return a.apply(this,arguments)}function a(){return(a=i(function*(t){return(yield s(t))==="y"})).apply(this,arguments)}},75720(t,e,r){r.d(e,{p:()=>d,sh:()=>f});var i,o,n=r(90250),s=r(99436),l=r(5018),u=r(44668),a=r(31421),c=r(73024),d=()=>{var t=process.argv[1];return t&&(0,c.existsSync)(t)?[process.execPath,t]:[process.execPath]},p=u(function t(e){l(this,t),this._cwd=void 0,this._mode="default",this._throw=!0,this._env=void 0,this._promise=null,this.args=e},[{key:"cwd",value:function(t){return this._cwd=t,this}},{key:"quiet",value:function(){return this._mode="quiet",this}},{key:"nothrow",value:function(){return this._throw=!1,this}},{key:"env",value:function(t){return this._env={...this._env,...t},this}},{key:"text",value:(i=s(function*(){return"default"===this._mode&&(this._mode="text"),(yield this.run()).stdout.toString("utf8")}),function(){return i.apply(this,arguments)})},{key:"then",value:function(t,e){return this.run().then(t,e)}},{key:"run",value:function(){return this._promise||(this._promise=this.exec()),this._promise}},{key:"exec",value:(o=s(function*(){var t=n(this.args),e=t[0],r=(function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i})(t).slice(1);if(!e)throw Error("sh: empty command");var i="default"===this._mode?["inherit","pipe","pipe"]:"quiet"===this._mode?["ignore","pipe","pipe"]:["inherit","pipe","pipe"],o=this._env?{...process.env,...this._env}:void 0,s=(0,a.spawn)(e,r,{cwd:this._cwd,stdio:i,env:o}),l=[],u=[];s.stdout?.on("data",t=>{l.push(t),"default"===this._mode&&process.stdout.write(t)}),s.stderr?.on("data",t=>{u.push(t),"default"===this._mode&&process.stderr.write(t)});var c=yield new Promise((t,e)=>{s.on("error",e),s.on("close",e=>t(e??0))}),d=Buffer.concat(l),p=Buffer.concat(u);if(0!==c&&this._throw){var h=Error(`sh: command failed with exit ${c}: ${this.args.join(" ")}`);throw h.exitCode=c,h.stdout=d,h.stderr=p,h}return{exitCode:c,stdout:d,stderr:p}}),function(){return o.apply(this,arguments)})}]),h=/\s/;function f(t,...e){var r,i,o,n,s,l=(r=[],i="",o=!1,n=()=>{o&&(r.push(i),i="",o=!1)},s=t=>{i+=t,o=!0},(t.forEach((t,r)=>{for(var i=0;i<t.length;i++){var o=t[i];h.test(o)?n():s(o)}r<e.length&&(t=>{if(null!=t){if(Array.isArray(t))return t.forEach((t,e)=>{e>0&&n(),s(String(t))});s(String(t))}})(e[r])}),n(),r.length>=3&&"cd"===r[0]&&"&&"===r[2])?{tokens:r.slice(3),initialCwd:r[1]}:{tokens:r}),u=l.tokens,a=l.initialCwd,c=new p(u);return a&&c.cwd(a),c}},47090(t,e,r){r.r(e),r.d(e,{pull:()=>y});var i=r(99436),o=r(51455),n=r(73024),s=r(76760),l=r(75720),u=r(69995),a=r(42208),c=r(13376),d=r(69070),p=["subspaces","automation-tests"];function h(t,e){return f.apply(this,arguments)}function f(){return(f=i(function*(t,e){if(!(0,n.existsSync)(t))return[];var r,l=[],u=yield(0,o.readdir)(t,{withFileTypes:!0});return yield Promise.all(u.map((r=i(function*(r){var i=(0,s.join)(t,r.name);r.isDirectory()?l.push(...yield h(i,e)):r.isFile()&&r.name.endsWith(".ts")&&l.push((0,s.relative)(e,i))}),function(t){return r.apply(this,arguments)}))),l})).apply(this,arguments)}function y(){return m.apply(this,arguments)}function m(){return(m=i(function*(t={}){var e,n,f=process.cwd(),y=!!t.force,m=0===(yield(0,l.sh)`cd ${f} && git status`.nothrow()).exitCode;if(m){if(yield(0,l.sh)`cd ${f} && git diff --name-only --diff-filter=ACMR`.text())if(y){console.log("Force mode: committing unstaged changes before pull..."),yield(0,l.sh)`cd ${f} && git add .`;var v=yield(0,a.RP)(f,["chore(force-pull): saved unstaged changes before pull"]);yield(0,l.sh)`cd ${f} && git ${v}`}else throw Error("Unstaged changes found, please commit or stash your changes before pulling")}else if(!(yield(0,d.q)("No git repository found, so it will not be safe to pull, continue? (y/n)")))throw Error("Pull cancelled");var g=JSON.parse((yield(0,o.readFile)(`${f}/application.json`,"utf8"))),$="module"===g.type,x=$?"module":"app";console.log(`Pulling ${x} project (${g.id})...`);var _=yield(0,l.sh)`bricks ${x} project-pull ${g.id} --json`.quiet().nothrow();if(0!==_.exitCode){var w=_.stderr.toString()||_.stdout.toString();throw Error((0,u.H)(w,"Pull failed"))}var b=JSON.parse(_.stdout.toString()),k=b.files,S=b.lastCommitId,C=(yield(0,c.p)(f))||S,P=$?"BRICKS_PROJECT_try-pull-module":"BRICKS_PROJECT_try-pull-application",j="";if(m&&!y){if(!(j=(yield(0,l.sh)`cd ${f} && git branch --show-current`.text()).trim()))throw Error("Cannot pull from a detached HEAD");console.log(`Checking commit ${C}...`);var E=(yield(0,l.sh)`cd ${f} && git rev-list -1 ${C}`.nothrow().text()).trim().match(/^[\da-f]{40}$/);if((yield(0,l.sh)`cd ${f} && git rev-parse HEAD`.text()).trim()===S)throw Error("Commit not changed");yield(0,l.sh)`cd ${f} && git branch -D ${P}`.nothrow(),E?yield(0,l.sh)`cd ${f} && git checkout -b ${P} ${C}`.nothrow():yield(0,l.sh)`cd ${f} && git checkout -b ${P}`}var R=yield(0,o.readFile)(`${f}/.oxfmtrc.json`,"utf8").then(JSON.parse).catch(()=>({trailingComma:"all",tabWidth:2,semi:!1,singleQuote:!0,printWidth:100})),M=new Set(k.map(t=>t.name)),A=[];yield Promise.all(p.map((e=i(function*(t){for(var e of yield h((0,s.join)(f,t),f)){var r=e.split(/[\\/]/).join("/");M.has(r)||A.push(r)}}),function(t){return e.apply(this,arguments)}))),yield Promise.all(A.map(t=>(0,o.unlink)(`${f}/${t}`)));var O=(yield r.e(75).then(r.bind(r,79491))).format;if(yield Promise.all(k.map((n=i(function*(t){var e=t.input;t.formatable&&(e=(yield O(t.name,t.input,R)).code);var r=(0,s.join)(f,t.name);return yield(0,o.mkdir)((0,s.dirname)(r),{recursive:!0}),(0,o.writeFile)(r,e)}),function(t){return n.apply(this,arguments)}))),m){if(yield(0,l.sh)`cd ${f} && git add .`,(yield(0,l.sh)`cd ${f} && git diff --cached --name-only`.text()).trim()){var q=y?`chore(force-pull): apply force pull-${x}`:$?"chore(project): apply file changes from BRICKS module":"chore(project): apply file changes from BRICKS application",F=yield(0,a.RP)(f,[q]);yield(0,l.sh)`cd ${f} && git ${F}`}if(!y){if(yield(0,l.sh)`cd ${f} && git checkout ${j}`,0!==(yield(0,l.sh)`cd ${f} && git merge ${P} --no-edit`.nothrow()).exitCode){yield(0,l.sh)`cd ${f} && git add .`;var T=yield(0,a.RP)(f,[`chore(project): merge with conflicts (resolve in ${j})`],["--no-verify"]);yield(0,l.sh)`cd ${f} && git ${T}`}yield(0,l.sh)`cd ${f} && git branch -D ${P}`.nothrow()}var B=(yield(0,l.sh)`cd ${f} && git rev-parse HEAD`.nothrow().text()).trim();B&&(yield(0,c.a)(f,B))}console.log(`${$?"Module":"App"} project pulled: ${k.length} files${A.length?`, removed ${A.length} orphan .ts file${1===A.length?"":"s"}`:""}${y?" (force)":""}`)})).apply(this,arguments)}}};
|
package/lib/690.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const __rspack_esm_id=690;export const __rspack_esm_ids=[690];export const __webpack_modules__={65650(e,t,l){e.exports=l(78942).Symbol},65111(e){e.exports=function(e,t){for(var l=-1,n=null==e?0:e.length,o=Array(n);++l<n;)o[l]=t(e[l],l,e);return o}},44187(e){e.exports=function(e,t,l,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(l=e[++o]);++o<i;)l=t(l,e[o],o,e);return l}},39546(e){var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},87379(e,t,l){var n=l(65650),o=l(8870),i=l(29005),r=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":r&&r in Object(e)?o(e):i(e)}},51035(e){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},52291(e,t,l){var n=l(65650),o=l(65111),i=l(53142),r=l(51187),u=1/0,f=n?n.prototype:void 0,a=f?f.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(r(t))return a?a.call(t):"";var l=t+"";return"0"==l&&1/t==-u?"-0":l}},93640(e,t,l){var n=l(44187),o=l(45881),i=l(39850),r=RegExp("['’]","g");e.exports=function(e){return function(t){return n(i(o(t).replace(r,"")),e,"")}}},69968(e,t,l){e.exports=l(51035)({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"})},74967(e){e.exports="object"==typeof global&&global&&global.Object===Object&&global},8870(e,t,l){var n=l(65650),o=Object.prototype,i=o.hasOwnProperty,r=o.toString,u=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,u),l=e[u];try{e[u]=void 0;var n=!0}catch(e){}var o=r.call(e);return n&&(t?e[u]=l:delete e[u]),o}},15813(e){var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},29005(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},78942(e,t,l){var n=l(74967),o="object"==typeof self&&self&&self.Object===Object&&self;e.exports=n||o||Function("return this")()},10482(e){var t="\\ud800-\\udfff",l="\\u2700-\\u27bf",n="a-z\\xdf-\\xf6\\xf8-\\xff",o="A-Z\\xc0-\\xd6\\xd8-\\xde",i="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",r="['’]",u="["+i+"]",f="["+n+"]",a="[^"+t+i+"\\d+"+l+n+o+"]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",d="["+o+"]",h="(?:"+f+"|"+a+")",p="(?:"+d+"|"+a+")",D="(?:"+r+"(?:d|ll|m|re|s|t|ve))?",g="(?:"+r+"(?:D|LL|M|RE|S|T|VE))?",b="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",w="[\\ufe0e\\ufe0f]?",x="(?:\\u200d(?:"+["[^"+t+"]",s,c].join("|")+")"+w+b+")*",B="(?:"+["["+l+"]",s,c].join("|")+")"+(w+b+x),U=RegExp([d+"?"+f+"+"+D+"(?="+[u,d,"$"].join("|")+")",p+"+"+g+"(?="+[u,d+h,"$"].join("|")+")",d+"?"+h+"+"+D,d+"+"+g,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",B].join("|"),"g");e.exports=function(e){return e.match(U)||[]}},45881(e,t,l){var n=l(69968),o=l(95243),i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=o(e))&&e.replace(i,n).replace(r,"")}},53142(e){e.exports=Array.isArray},80547(e){e.exports=function(e){return null!=e&&"object"==typeof e}},51187(e,t,l){var n=l(87379),o=l(80547);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},10750(e,t,l){e.exports=l(93640)(function(e,t,l){return e+(l?"-":"")+t.toLowerCase()})},95243(e,t,l){var n=l(52291);e.exports=function(e){return null==e?"":n(e)}},39850(e,t,l){var n=l(39546),o=l(15813),i=l(95243),r=l(10482);e.exports=function(e,t,l){return(e=i(e),void 0===(t=l?void 0:t))?o(e)?r(e):n(e):e.match(t)||[]}},16699(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},62192(e,t,l){var n=l(16699);e.exports=function(e){var t={},l=!1;function o(t,o){return l=!0,{done:!1,value:new n(o=new Promise(function(l){l(e[t](o))}),1)}}return t["u">typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return l?(l=!1,e):o("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(l)throw l=!1,e;return o("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return l?(l=!1,e):o("return",e)}),t},e.exports.__esModule=!0,e.exports.default=e.exports},32235(e,t,l){var n=l(16699);e.exports=function(e){return new n(e,0)},e.exports.__esModule=!0,e.exports.default=e.exports},4275(e,t,l){var n=l(16699);function o(e){var t,l;function o(t,l){try{var r=e[t](l),u=r.value,f=u instanceof n;Promise.resolve(f?u.v:u).then(function(l){if(f){var n="return"===t?"return":"next";if(!u.k||l.done)return o(n,l);l=e[n](l).value}i(r.done?"return":"normal",l)},function(e){o("throw",e)})}catch(e){i("throw",e)}}function i(e,n){switch(e){case"return":t.resolve({value:n,done:!0});break;case"throw":t.reject(n);break;default:t.resolve({value:n,done:!1})}(t=t.next)?o(t.key,t.arg):l=null}this._invoke=function(e,n){return new Promise(function(i,r){var u={key:e,arg:n,resolve:i,reject:r,next:null};l?l=l.next=u:(t=l=u,o(e,n))})},"function"!=typeof e.return&&(this.return=void 0)}o.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},o.prototype.next=function(e){return this._invoke("next",e)},o.prototype.throw=function(e){return this._invoke("throw",e)},o.prototype.return=function(e){return this._invoke("return",e)},e.exports=function(e){return function(){return new o(e.apply(this,arguments))}},e.exports.__esModule=!0,e.exports.default=e.exports},48724(e,t,l){l.d(t,{Ay:()=>D});var n=l(51649),o=l(8498),i=l(29122);let r={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"\xbd",oneThird:"⅓",oneQuarter:"\xbc",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"\xbe",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},u={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},f={...r,...u},a={...r,tick:"√",info:"i",warning:"‼",cross:"\xd7",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(\xd7)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xd7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xd7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},s=(0,i.A)()?f:a;Object.entries(u);let c=function({isSelected:e=!1}){return n.default.createElement(o.Box,{marginRight:1},e?n.default.createElement(o.Text,{color:"blue"},s.pointer):n.default.createElement(o.Text,null," "))},d=function({isSelected:e=!1,label:t}){return n.createElement(o.Text,{color:e?"blue":void 0},t)};var h=l(57975);function p(e,t){if(!Array.isArray(e))throw TypeError(`Expected an array, got \`${typeof e}\`.`);if(!Number.isSafeInteger(t))throw TypeError(`The \`steps\` parameter must be an integer, got ${t}.`);let{length:l}=e;if(0===l)return[...e];let n=(t%l+l)%l;return 0===n?[...e]:[...e.slice(-n),...e.slice(0,-n)]}let D=function({items:e=[],isFocused:t=!0,initialIndex:l=0,indicatorComponent:i=c,itemComponent:r=d,limit:u,onSelect:f,onHighlight:a}){let s="number"==typeof u&&e.length>u,D=s?Math.min(u,e.length):e.length,g=D-1,[b,w]=(0,n.useState)(l>g?g-l:0),[x,B]=(0,n.useState)(l?l>g?g:l:0),U=(0,n.useRef)(e);(0,n.useEffect)(()=>{(0,h.isDeepStrictEqual)(U.current.map(e=>e.value),e.map(e=>e.value))||(w(0),B(0)),U.current=e},[e]),(0,o.useInput)((0,n.useCallback)((t,l)=>{if("k"===t||l.upArrow){let t=(s?D:e.length)-1,l=0===x,n=l?b+1:b,o=l?s?x:t:x-1;w(n),B(o);let i=s?p(e,n).slice(0,D):e;"function"==typeof a&&a(i[o])}if("j"===t||l.downArrow){let t=x===(s?D:e.length)-1,l=t?b-1:b,n=t?s?x:0:x+1;w(l),B(n);let o=s?p(e,l).slice(0,D):e;"function"==typeof a&&a(o[n])}if(/^[1-9]$/.test(t)){let l=Number.parseInt(t,10)-1,n=s?p(e,b).slice(0,D):e;if(l>=0&&l<n.length){let e=n[l];e&&f?.(e)}}if(l.return){let t=s?p(e,b).slice(0,D):e;"function"==typeof f&&f(t[x])}},[s,D,b,x,e,f,a]),{isActive:t});let R=s?p(e,b).slice(0,D):e;return n.default.createElement(o.Box,{flexDirection:"column"},R.map((e,t)=>{let l=t===x;return n.default.createElement(o.Box,{key:e.key??e.value},n.default.createElement(i,{isSelected:l}),n.default.createElement(r,{...e,isSelected:l}))}))}},47882(e,t,l){l.d(t,{A:()=>r});var n=l(51649),o=l(8498),i=l(47661);let r=function({type:e="dots"}){let[t,l]=(0,n.useState)(0),r=i[e];return(0,n.useEffect)(()=>{let e=setInterval(()=>{l(e=>e===r.frames.length-1?0:e+1)},r.interval);return()=>{clearInterval(e)}},[r]),n.default.createElement(o.Text,null,r.frames[t])}},29253(e,t,l){l.d(t,{A:()=>r});var n=l(51649),o=l(8498),i=l(73284);let r=function({value:e,placeholder:t="",focus:l=!0,mask:r,highlightPastedText:u=!1,showCursor:f=!0,onChange:a,onSubmit:s}){let[c,d]=(0,n.useState)({cursorOffset:(e||"").length,cursorWidth:0}),{cursorOffset:h,cursorWidth:p}=c;(0,n.useEffect)(()=>{d(t=>{if(!l||!f)return t;let n=e||"";return t.cursorOffset>n.length-1?{cursorOffset:n.length,cursorWidth:0}:t})},[e,l,f]);let D=u?p:0,g=r?r.repeat(e.length):e,b=g,w=t?i.default.grey(t):void 0;if(f&&l){w=t.length>0?i.default.inverse(t[0])+i.default.grey(t.slice(1)):i.default.inverse(" "),b=g.length>0?"":i.default.inverse(" ");let e=0;for(let t of g)b+=e>=h-D&&e<=h?i.default.inverse(t):t,e++;g.length>0&&h===g.length&&(b+=i.default.inverse(" "))}return(0,o.useInput)((t,l)=>{if(l.upArrow||l.downArrow||l.ctrl&&"c"===t||l.tab||l.shift&&l.tab)return;if(l.return){s&&s(e);return}let n=h,o=e,i=0;l.leftArrow?f&&n--:l.rightArrow?f&&n++:l.backspace||l.delete?h>0&&(o=e.slice(0,h-1)+e.slice(h,e.length),n--):(o=e.slice(0,h)+t+e.slice(h,e.length),n+=t.length,t.length>1&&(i=t.length)),h<0&&(n=0),h>e.length&&(n=e.length),d({cursorOffset:n,cursorWidth:i}),o!==e&&a(o)},{isActive:l}),n.default.createElement(o.Text,null,t?g.length>0?b:w:b)}}};
|