@junobuild/did-tools 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node/index.mjs +5 -2
- package/dist/node/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/node/index.mjs
CHANGED
|
@@ -53,7 +53,9 @@ ${t}`,i}}}});var IT=A(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{v
|
|
|
53
53
|
|
|
54
54
|
return ${ei(i)};
|
|
55
55
|
})(${DT(this.node)})
|
|
56
|
-
`;return this.replaceWith(u)[0].get("arguments.0")}function fW(e){let t=e.params.findIndex(r=>KK(r)||WK(r));return t===-1?e.params.length:t}});var UT=A(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye._guessExecutionStatusRelativeTo=kW;Ye._resolve=qT;Ye.canHaveVariableDeclarationOrExpression=vW;Ye.canSwapBetweenExpressionAndStatement=CW;Ye.getSource=NW;Ye.isCompletionRecord=IW;Ye.isConstantExpression=FW;Ye.isInStrictMode=jW;Ye.isNodeType=AW;Ye.isStatementOrBlock=wW;Ye.isStatic=PW;Ye.matchesPattern=EW;Ye.referencesImport=OW;Ye.resolve=BW;Ye.willIMaybeExecuteBefore=_W;var hW=de(),{STATEMENT_OR_BLOCK_KEYS:dW,VISITOR_KEYS:mW,isBlockStatement:RT,isExpression:yW,isIdentifier:TW,isLiteral:gW,isStringLiteral:SW,isType:bW,matchesPattern:xW}=hW;function EW(e,t){return xW(this.node,e,t)}Ye.has=function(t){var r;let i=(r=this.node)==null?void 0:r[t];return i&&Array.isArray(i)?!!i.length:!!i};function PW(){return this.scope.isStatic(this.node)}Ye.is=Ye.has,Ye.isnt=function(t){return!this.has(t)},Ye.equals=function(t,r){return this.node[t]===r};function AW(e){return bW(this.type,e)}function vW(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function CW(e){return this.key!=="body"||!this.parentPath.isArrowFunctionExpression()?!1:this.isExpression()?RT(e):this.isBlockStatement()?yW(e):!1}function IW(e){let t=this,r=!0;do{let{type:i,container:s}=t;if(!r&&(t.isFunction()||i==="StaticBlock"))return!!e;if(r=!1,Array.isArray(s)&&t.key!==s.length-1)return!1}while((t=t.parentPath)&&!t.isProgram()&&!t.isDoExpression());return!0}function wW(){return this.parentPath.isLabeledStatement()||RT(this.container)?!1:dW.includes(this.key)}function OW(e,t){if(!this.isReferencedIdentifier()){if(this.isJSXMemberExpression()&&this.node.property.name===t||(this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?SW(this.node.property,{value:t}):this.node.property.name===t)){let n=this.get("object");return n.isReferencedIdentifier()&&n.referencesImport(e,"*")}return!1}let r=this.scope.getBinding(this.node.name);if(!r||r.kind!=="module")return!1;let i=r.path,s=i.parentPath;if(!s.isImportDeclaration())return!1;if(s.node.source.value===e){if(!t)return!0}else return!1;return!!(i.isImportDefaultSpecifier()&&t==="default"||i.isImportNamespaceSpecifier()&&t==="*"||i.isImportSpecifier()&&TW(i.node.imported,{name:t}))}function NW(){let e=this.node;if(e.end){let t=this.hub.getCode();if(t)return t.slice(e.start,e.end)}return""}function _W(e){return this._guessExecutionStatusRelativeTo(e)!=="after"}function BT(e){return e.isProgram()?e:(e.parentPath.scope.getFunctionParent()||e.parentPath.scope.getProgramParent()).path}function DW(e,t){switch(e){case"LogicalExpression":return t==="right";case"ConditionalExpression":case"IfStatement":return t==="consequent"||t==="alternate";case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return t==="body";case"ForStatement":return t==="body"||t==="update";case"SwitchStatement":return t==="cases";case"TryStatement":return t==="handler";case"AssignmentPattern":return t==="right";case"OptionalMemberExpression":return t==="property";case"OptionalCallExpression":return t==="arguments";default:return!1}}function FT(e,t){for(let r=0;r<t;r++){let i=e[r];if(DW(i.parent.type,i.parentKey))return!0}return!1}var jT=Symbol();function kW(e){return jc(this,e,new Map)}function jc(e,t,r){let i={this:BT(e),target:BT(t)};if(i.target.node!==i.this.node)return MW(e,i.target,r);let s={target:t.getAncestry(),this:e.getAncestry()};if(s.target.includes(e))return"after";if(s.this.includes(t))return"before";let n,a={target:0,this:0};for(;!n&&a.this<s.this.length;){let c=s.this[a.this];a.target=s.target.indexOf(c),a.target>=0?n=c:a.this++}if(!n)throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");if(FT(s.this,a.this-1)||FT(s.target,a.target-1))return"unknown";let o={this:s.this[a.this-1],target:s.target[a.target-1]};if(o.target.listKey&&o.this.listKey&&o.target.container===o.this.container)return o.target.key>o.this.key?"before":"after";let l=mW[n.type],u={this:l.indexOf(o.this.parentKey),target:l.indexOf(o.target.parentKey)};return u.target>u.this?"before":"after"}function LW(e,t,r){if(t.isFunctionDeclaration()){if(t.parentPath.isExportDeclaration())return"unknown"}else return jc(e,t,r)==="before"?"before":"unknown";let i=t.scope.getBinding(t.node.id.name);if(!i.references)return"before";let s=i.referencePaths,n;for(let a of s){if(!!a.find(u=>u.node===t.node))continue;if(a.key!=="callee"||!a.parentPath.isCallExpression())return"unknown";let l=jc(e,a,r);if(n&&n!==l)return"unknown";n=l}return n}function MW(e,t,r){let i=r.get(e.node),s;if(!i)r.set(e.node,i=new Map);else if(s=i.get(t.node))return s===jT?"unknown":s;i.set(t.node,jT);let n=LW(e,t,r);return i.set(t.node,n),n}function BW(e,t){return qT.call(this,e,t)||this}function qT(e,t){var r;if(!((r=t)!=null&&r.includes(this)))if(t=t||[],t.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){let i=this.scope.getBinding(this.node.name);if(!i||!i.constant||i.kind==="module")return;if(i.path!==this){let s=i.path.resolve(e,t);return this.find(n=>n.node===s.node)?void 0:s}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){let i=this.toComputedKey();if(!gW(i))return;let s=i.value,n=this.get("object").resolve(e,t);if(n.isObjectExpression()){let a=n.get("properties");for(let o of a){if(!o.isProperty())continue;let l=o.get("key"),u=o.isnt("computed")&&l.isIdentifier({name:s});if(u=u||l.isLiteral({value:s}),u)return o.get("value").resolve(e,t)}}else if(n.isArrayExpression()&&!isNaN(+s)){let o=n.get("elements")[s];if(o)return o.resolve(e,t)}}}}function FW(){if(this.isIdentifier()){let e=this.scope.getBinding(this.node.name);return e?e.constant:!1}if(this.isLiteral())return this.isRegExpLiteral()?!1:this.isTemplateLiteral()?this.get("expressions").every(e=>e.isConstantExpression()):!0;if(this.isUnaryExpression())return this.node.operator!=="void"?!1:this.get("argument").isConstantExpression();if(this.isBinaryExpression()){let{operator:e}=this.node;return e!=="in"&&e!=="instanceof"&&this.get("left").isConstantExpression()&&this.get("right").isConstantExpression()}return this.isMemberExpression()?!this.node.computed&&this.get("object").isIdentifier({name:"Symbol"})&&!this.scope.hasBinding("Symbol",{noGlobals:!0}):this.isCallExpression()?this.node.arguments.length===1&&this.get("callee").matchesPattern("Symbol.for")&&!this.scope.hasBinding("Symbol",{noGlobals:!0})&&this.get("arguments")[0].isStringLiteral():!1}function jW(){return!!(this.isProgram()?this:this.parentPath).find(r=>{if(r.isProgram({sourceType:"module"})||r.isClass())return!0;if(r.isArrowFunctionExpression()&&!r.get("body").isBlockStatement())return!1;let i;if(r.isFunction())i=r.node.body;else if(r.isProgram())i=r.node;else return!1;for(let s of i.directives)if(s.value.value==="use strict")return!0})}});var XT=A(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt._getKey=WT;rt._getPattern=YT;rt.get=tY;rt.getAllNextSiblings=ZW;rt.getAllPrevSiblings=eY;rt.getAssignmentIdentifiers=rY;rt.getBindingIdentifierPaths=nY;rt.getBindingIdentifiers=iY;rt.getCompletionRecords=HW;rt.getNextSibling=QW;rt.getOpposite=XW;rt.getOuterBindingIdentifierPaths=aY;rt.getOuterBindingIdentifiers=sY;rt.getPrevSibling=zW;rt.getSibling=GW;var qc=_r(),RW=de(),{getAssignmentIdentifiers:qW,getBindingIdentifiers:KT,getOuterBindingIdentifiers:UW,numericLiteral:VW,unaryExpression:KW}=RW,Uc=0,Ps=1;function WW(e){return{type:Uc,path:e}}function YW(e){return{type:Ps,path:e}}function XW(){return this.key==="left"?this.getSibling("right"):this.key==="right"?this.getSibling("left"):null}function Ci(e,t,r){return e&&t.push(...Ii(e,r)),t}function JW(e,t,r){let i=[];for(let s=0;s<e.length;s++){let n=e[s],a=Ii(n,r),o=[],l=[];for(let u of a)u.type===Uc&&o.push(u),u.type===Ps&&l.push(u);o.length&&(i=o),t.push(...l)}return t.push(...i),t}function $W(e){e.forEach(t=>{t.type=Ps})}function Rc(e,t){e.forEach(r=>{r.path.isBreakStatement({label:null})&&(t?r.path.replaceWith(KW("void",VW(0))):r.path.remove())})}function VT(e,t){let r=[];if(t.canHaveBreak){let i=[];for(let s=0;s<e.length;s++){let n=e[s],a=Object.assign({},t,{inCaseClause:!1});n.isBlockStatement()&&(t.inCaseClause||t.shouldPopulateBreak)?a.shouldPopulateBreak=!0:a.shouldPopulateBreak=!1;let o=Ii(n,a);if(o.length>0&&o.every(l=>l.type===Ps)){i.length>0&&o.every(l=>l.path.isBreakStatement({label:null}))?($W(i),r.push(...i),i.some(l=>l.path.isDeclaration())&&(r.push(...o),Rc(o,!0)),Rc(o,!1)):(r.push(...o),t.shouldPopulateBreak||Rc(o,!0));break}if(s===e.length-1)r.push(...o);else{i=[];for(let l=0;l<o.length;l++){let u=o[l];u.type===Ps&&r.push(u),u.type===Uc&&i.push(u)}}}}else if(e.length)for(let i=e.length-1;i>=0;i--){let s=Ii(e[i],t);if(s.length>1||s.length===1&&!s[0].path.isVariableDeclaration()){r.push(...s);break}}return r}function Ii(e,t){let r=[];if(e.isIfStatement())r=Ci(e.get("consequent"),r,t),r=Ci(e.get("alternate"),r,t);else{if(e.isDoExpression()||e.isFor()||e.isWhile()||e.isLabeledStatement())return Ci(e.get("body"),r,t);if(e.isProgram()||e.isBlockStatement())return VT(e.get("body"),t);if(e.isFunction())return Ii(e.get("body"),t);if(e.isTryStatement())r=Ci(e.get("block"),r,t),r=Ci(e.get("handler"),r,t);else{if(e.isCatchClause())return Ci(e.get("body"),r,t);if(e.isSwitchStatement())return JW(e.get("cases"),r,t);if(e.isSwitchCase())return VT(e.get("consequent"),{canHaveBreak:!0,shouldPopulateBreak:!1,inCaseClause:!0});e.isBreakStatement()?r.push(YW(e)):r.push(WW(e))}}return r}function HW(){return Ii(this,{canHaveBreak:!1,shouldPopulateBreak:!1,inCaseClause:!1}).map(t=>t.path)}function GW(e){return qc.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e}).setContext(this.context)}function zW(){return this.getSibling(this.key-1)}function QW(){return this.getSibling(this.key+1)}function ZW(){let e=this.key,t=this.getSibling(++e),r=[];for(;t.node;)r.push(t),t=this.getSibling(++e);return r}function eY(){let e=this.key,t=this.getSibling(--e),r=[];for(;t.node;)r.push(t),t=this.getSibling(--e);return r}function tY(e,t=!0){t===!0&&(t=this.context);let r=e.split(".");return r.length===1?WT.call(this,e,t):YT.call(this,r,t)}function WT(e,t){let r=this.node,i=r[e];return Array.isArray(i)?i.map((s,n)=>qc.default.get({listKey:e,parentPath:this,parent:r,container:i,key:n}).setContext(t)):qc.default.get({parentPath:this,parent:r,container:r,key:e}).setContext(t)}function YT(e,t){let r=this;for(let i of e)i==="."?r=r.parentPath:Array.isArray(r)?r=r[i]:r=r.get(i,t);return r}function rY(){return qW(this.node)}function iY(e){return KT(this.node,e)}function sY(e){return UW(this.node,e)}function nY(e=!1,t=!1){let i=[this],s=Object.create(null);for(;i.length;){let n=i.shift();if(!n||!n.node)continue;let a=KT.keys[n.node.type];if(n.isIdentifier()){e?(s[n.node.name]=s[n.node.name]||[]).push(n):s[n.node.name]=n;continue}if(n.isExportDeclaration()){let o=n.get("declaration");o.isDeclaration()&&i.push(o);continue}if(t){if(n.isFunctionDeclaration()){i.push(n.get("id"));continue}if(n.isFunctionExpression())continue}if(a)for(let o=0;o<a.length;o++){let l=a[o],u=n.get(l);Array.isArray(u)?i.push(...u):u.node&&i.push(u)}}return s}function aY(e=!1){return this.getBindingIdentifierPaths(e,!0)}});var $T=A(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});As.addComment=pY;As.addComments=fY;As.shareCommentsWithSiblings=cY;var oY=de(),{addComment:lY,addComments:uY}=oY;function cY(){if(typeof this.key=="string")return;let e=this.node;if(!e)return;let t=e.trailingComments,r=e.leadingComments;if(!t&&!r)return;let i=this.getSibling(this.key-1),s=this.getSibling(this.key+1),n=!!i.node,a=!!s.node;n&&(r&&i.addComments("trailing",JT(r,i.node.trailingComments)),t&&!a&&i.addComments("trailing",t)),a&&(t&&s.addComments("leading",JT(t,s.node.leadingComments)),r&&!n&&s.addComments("leading",r))}function JT(e,t){if(!(t!=null&&t.length))return e;let r=new Set(t);return e.filter(i=>!r.has(i))}function pY(e,t,r){lY(this.node,e,t,r)}function fY(e,t){uY(this.node,e,t)}});var _r=A(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.default=Zt.SHOULD_STOP=Zt.SHOULD_SKIP=Zt.REMOVED=void 0;var hY=ru(),dY=Xh(),mY=us(),yY=mu(),zT=de(),na=zT,TY=Xr(),gY=Nm(),zt=_m(),wi=zm(),Oi=fc(),HT=dT(),ti=MT(),$e=UT(),QT=Ht(),Xe=QT,Ni=zn(),Qt=Qn(),Tt=XT(),Vc=$T(),SY=lu(),{validate:bY}=zT,GT=dY("babel"),hz=Zt.REMOVED=1,dz=Zt.SHOULD_STOP=2,mz=Zt.SHOULD_SKIP=4,hr=Zt.default=class ZT{constructor(t,r){this.contexts=[],this.state=null,this.opts=null,this._traverseFlags=0,this.skipKeys=null,this.parentPath=null,this.container=null,this.listKey=null,this.key=null,this.node=null,this.type=null,this.parent=r,this.hub=t,this.data=null,this.context=null,this.scope=null}get removed(){return(this._traverseFlags&1)>0}set removed(t){t?this._traverseFlags|=1:this._traverseFlags&=-2}get shouldStop(){return(this._traverseFlags&2)>0}set shouldStop(t){t?this._traverseFlags|=2:this._traverseFlags&=-3}get shouldSkip(){return(this._traverseFlags&4)>0}set shouldSkip(t){t?this._traverseFlags|=4:this._traverseFlags&=-5}static get({hub:t,parentPath:r,parent:i,container:s,listKey:n,key:a}){if(!t&&r&&(t=r.hub),!i)throw new Error("To get a node path the parent needs to exist");let o=s[a],l=TY.getOrCreateCachedPaths(t,i),u=l.get(o);return u||(u=new ZT(t,i),o&&l.set(o,u)),QT.setup.call(u,r,s,n,a),u}getScope(t){return this.isScope()?new yY.default(this):t}setData(t,r){return this.data==null&&(this.data=Object.create(null)),this.data[t]=r}getData(t,r){this.data==null&&(this.data=Object.create(null));let i=this.data[t];return i===void 0&&r!==void 0&&(i=this.data[t]=r),i}hasNode(){return this.node!=null}buildCodeFrameError(t,r=SyntaxError){return this.hub.buildError(this.node,t,r)}traverse(t,r){(0,mY.default)(this.node,t,this.scope,r,this)}set(t,r){bY(this.node,t,r),this.node[t]=r}getPathLocation(){let t=[],r=this;do{let i=r.key;r.inList&&(i=`${r.listKey}[${i}]`),t.unshift(i)}while(r=r.parentPath);return t.join(".")}debug(t){GT.enabled&>(`${this.getPathLocation()} ${this.type}: ${t}`)}toString(){return(0,gY.default)(this.node).code}get inList(){return!!this.listKey}set inList(t){t||(this.listKey=null)}get parentKey(){return this.listKey||this.key}},xY={findParent:zt.findParent,find:zt.find,getFunctionParent:zt.getFunctionParent,getStatementParent:zt.getStatementParent,getEarliestCommonAncestorFrom:zt.getEarliestCommonAncestorFrom,getDeepestCommonAncestorFrom:zt.getDeepestCommonAncestorFrom,getAncestry:zt.getAncestry,isAncestor:zt.isAncestor,isDescendant:zt.isDescendant,inType:zt.inType,getTypeAnnotation:wi.getTypeAnnotation,isBaseType:wi.isBaseType,couldBeBaseType:wi.couldBeBaseType,baseTypeStrictlyMatches:wi.baseTypeStrictlyMatches,isGenericType:wi.isGenericType,replaceWithMultiple:Oi.replaceWithMultiple,replaceWithSourceString:Oi.replaceWithSourceString,replaceWith:Oi.replaceWith,replaceExpressionWithStatements:Oi.replaceExpressionWithStatements,replaceInline:Oi.replaceInline,evaluateTruthy:HT.evaluateTruthy,evaluate:HT.evaluate,toComputedKey:ti.toComputedKey,ensureBlock:ti.ensureBlock,unwrapFunctionEnvironment:ti.unwrapFunctionEnvironment,arrowFunctionToExpression:ti.arrowFunctionToExpression,splitExportDeclaration:ti.splitExportDeclaration,ensureFunctionName:ti.ensureFunctionName,matchesPattern:$e.matchesPattern,isStatic:$e.isStatic,isNodeType:$e.isNodeType,canHaveVariableDeclarationOrExpression:$e.canHaveVariableDeclarationOrExpression,canSwapBetweenExpressionAndStatement:$e.canSwapBetweenExpressionAndStatement,isCompletionRecord:$e.isCompletionRecord,isStatementOrBlock:$e.isStatementOrBlock,referencesImport:$e.referencesImport,getSource:$e.getSource,willIMaybeExecuteBefore:$e.willIMaybeExecuteBefore,_guessExecutionStatusRelativeTo:$e._guessExecutionStatusRelativeTo,resolve:$e.resolve,isConstantExpression:$e.isConstantExpression,isInStrictMode:$e.isInStrictMode,isDenylisted:Xe.isDenylisted,visit:Xe.visit,skip:Xe.skip,skipKey:Xe.skipKey,stop:Xe.stop,setContext:Xe.setContext,requeue:Xe.requeue,requeueComputedKeyAndDecorators:Xe.requeueComputedKeyAndDecorators,remove:Ni.remove,insertBefore:Qt.insertBefore,insertAfter:Qt.insertAfter,unshiftContainer:Qt.unshiftContainer,pushContainer:Qt.pushContainer,getOpposite:Tt.getOpposite,getCompletionRecords:Tt.getCompletionRecords,getSibling:Tt.getSibling,getPrevSibling:Tt.getPrevSibling,getNextSibling:Tt.getNextSibling,getAllNextSiblings:Tt.getAllNextSiblings,getAllPrevSiblings:Tt.getAllPrevSiblings,get:Tt.get,getAssignmentIdentifiers:Tt.getAssignmentIdentifiers,getBindingIdentifiers:Tt.getBindingIdentifiers,getOuterBindingIdentifiers:Tt.getOuterBindingIdentifiers,getBindingIdentifierPaths:Tt.getBindingIdentifierPaths,getOuterBindingIdentifierPaths:Tt.getOuterBindingIdentifierPaths,shareCommentsWithSiblings:Vc.shareCommentsWithSiblings,addComment:Vc.addComment,addComments:Vc.addComments};Object.assign(hr.prototype,xY);hr.prototype.arrowFunctionToShadowed=ti.arrowFunctionToShadowed,Object.assign(hr.prototype,{has:$e.has,is:$e.is,isnt:$e.isnt,equals:$e.equals,hoist:Qt.hoist,updateSiblingKeys:Qt.updateSiblingKeys,call:Xe.call,isBlacklisted:Xe.isBlacklisted,setScope:Xe.setScope,resync:Xe.resync,popContext:Xe.popContext,pushContext:Xe.pushContext,setup:Xe.setup,setKey:Xe.setKey});hr.prototype._guessExecutionStatusRelativeToDifferentFunctions=$e._guessExecutionStatusRelativeTo,hr.prototype._guessExecutionStatusRelativeToDifferentFunctions=$e._guessExecutionStatusRelativeTo,Object.assign(hr.prototype,{_getTypeAnnotation:wi._getTypeAnnotation,_replaceWith:Oi._replaceWith,_resolve:$e._resolve,_call:Xe._call,_resyncParent:Xe._resyncParent,_resyncKey:Xe._resyncKey,_resyncList:Xe._resyncList,_resyncRemoved:Xe._resyncRemoved,_getQueueContexts:Xe._getQueueContexts,_removeFromScope:Ni._removeFromScope,_callRemovalHooks:Ni._callRemovalHooks,_remove:Ni._remove,_markRemoved:Ni._markRemoved,_assertUnremoved:Ni._assertUnremoved,_containerInsert:Qt._containerInsert,_containerInsertBefore:Qt._containerInsertBefore,_containerInsertAfter:Qt._containerInsertAfter,_verifyNodeList:Qt._verifyNodeList,_getKey:Tt._getKey,_getPattern:Tt._getPattern});for(let e of na.TYPES){let t=`is${e}`,r=na[t];hr.prototype[t]=function(i){return r(this.node,i)},hr.prototype[`assert${e}`]=function(i){if(!r(this.node,i))throw new TypeError(`Expected node path of type ${e}`)}}Object.assign(hr.prototype,SY);for(let e of Object.keys(hY))e[0]!=="_"&&(na.TYPES.includes(e)||na.TYPES.push(e))});var e0=A(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.default=void 0;var EY=_r(),PY=de(),Kc=Ht(),{VISITOR_KEYS:AY}=PY,Wc=class{constructor(t,r,i,s){this.queue=null,this.priorityQueue=null,this.parentPath=s,this.scope=t,this.state=i,this.opts=r}shouldVisit(t){let r=this.opts;if(r.enter||r.exit||r[t.type])return!0;let i=AY[t.type];if(!(i!=null&&i.length))return!1;for(let s of i)if(t[s])return!0;return!1}create(t,r,i,s){return EY.default.get({parentPath:this.parentPath,parent:t,container:r,key:i,listKey:s})}maybeQueue(t,r){this.queue&&(r?this.queue.push(t):this.priorityQueue.push(t))}visitMultiple(t,r,i){if(t.length===0)return!1;let s=[];for(let n=0;n<t.length;n++){let a=t[n];a&&this.shouldVisit(a)&&s.push(this.create(r,t,n,i))}return this.visitQueue(s)}visitSingle(t,r){return this.shouldVisit(t[r])?this.visitQueue([this.create(t,t,r)]):!1}visitQueue(t){this.queue=t,this.priorityQueue=[];let r=new WeakSet,i=!1,s=0;for(;s<t.length;){let n=t[s];if(s++,Kc.resync.call(n),(n.contexts.length===0||n.contexts[n.contexts.length-1]!==this)&&Kc.pushContext.call(n,this),n.key===null)continue;let{node:a}=n;if(!r.has(a)){if(a&&r.add(a),n.visit()){i=!0;break}if(this.priorityQueue.length&&(i=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=t,i))break}}for(let n=0;n<s;n++)Kc.popContext.call(t[n]);return this.queue=null,i}visit(t,r){let i=t[r];return i?Array.isArray(i)?this.visitMultiple(i,t,r):this.visitSingle(t,r):!1}};aa.default=Wc});var Tn=A(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});Yc.traverseNode=wY;var vY=e0(),CY=de(),{VISITOR_KEYS:IY}=CY;function wY(e,t,r,i,s,n,a){let o=IY[e.type];if(!o)return!1;let l=new vY.default(r,t,i,s);if(a)return n!=null&&n[s.parentKey]?!1:l.visitQueue([s]);for(let u of o)if(!(n!=null&&n[u])&&l.visit(e,u))return!0;return!1}});var Ht=A(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re._call=Jc;Re._getQueueContexts=WY;Re._resyncKey=a0;Re._resyncList=o0;Re._resyncParent=n0;Re._resyncRemoved=jY;Re.call=Xc;Re.isDenylisted=i0;Re.popContext=RY;Re.pushContext=qY;Re.requeue=VY;Re.requeueComputedKeyAndDecorators=KY;Re.resync=FY;Re.setContext=BY;Re.setKey=oa;Re.setScope=s0;Re.setup=UY;Re.skip=kY;Re.skipKey=LY;Re.stop=MY;Re.visit=DY;var OY=Tn(),t0=_r(),NY=zn(),_Y=de();function Xc(e){let t=this.opts;if(this.debug(e),this.node&&Jc.call(this,t[e]))return!0;if(this.node){var r;return Jc.call(this,(r=t[this.node.type])==null?void 0:r[e])}return!1}function Jc(e){if(!e)return!1;for(let t of e){if(!t)continue;let r=this.node;if(!r)return!0;let i=t.call(this.state,this,this.state);if(i&&typeof i=="object"&&typeof i.then=="function")throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");if(i)throw new Error(`Unexpected return value from visitor method ${t}`);if(this.node!==r||this._traverseFlags>0)return!0}return!1}function i0(){var e;let t=(e=this.opts.denylist)!=null?e:this.opts.blacklist;return t&&t.indexOf(this.node.type)>-1}Re.isBlacklisted=i0;function r0(e,t){e.context!==t&&(e.context=t,e.state=t.state,e.opts=t.opts)}function DY(){var e,t;if(!this.node||this.isDenylisted()||(e=(t=this.opts).shouldSkip)!=null&&e.call(t,this))return!1;let r=this.context;return this.shouldSkip||Xc.call(this,"enter")?(this.debug("Skip..."),this.shouldStop):(r0(this,r),this.debug("Recursing into..."),this.shouldStop=(0,OY.traverseNode)(this.node,this.opts,this.scope,this.state,this,this.skipKeys),r0(this,r),Xc.call(this,"exit"),this.shouldStop)}function kY(){this.shouldSkip=!0}function LY(e){this.skipKeys==null&&(this.skipKeys={}),this.skipKeys[e]=!0}function MY(){this._traverseFlags|=t0.SHOULD_SKIP|t0.SHOULD_STOP}function s0(){var e,t;if((e=this.opts)!=null&&e.noScope)return;let r=this.parentPath;((this.key==="key"||this.listKey==="decorators")&&r.isMethod()||this.key==="discriminant"&&r.isSwitchStatement())&&(r=r.parentPath);let i;for(;r&&!i;){var s;if((s=r.opts)!=null&&s.noScope)return;i=r.scope,r=r.parentPath}this.scope=this.getScope(i),(t=this.scope)==null||t.init()}function BY(e){return this.skipKeys!=null&&(this.skipKeys={}),this._traverseFlags=0,e&&(this.context=e,this.state=e.state,this.opts=e.opts),s0.call(this),this}function FY(){this.removed||(n0.call(this),o0.call(this),a0.call(this))}function n0(){this.parentPath&&(this.parent=this.parentPath.node)}function a0(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(let e=0;e<this.container.length;e++)if(this.container[e]===this.node){oa.call(this,e);return}}else for(let e of Object.keys(this.container))if(this.container[e]===this.node){oa.call(this,e);return}this.key=null}}function o0(){if(!this.parent||!this.inList)return;let e=this.parent[this.listKey];this.container!==e&&(this.container=e||null)}function jY(){(this.key==null||!this.container||this.container[this.key]!==this.node)&&NY._markRemoved.call(this)}function RY(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0)}function qY(e){this.contexts.push(e),this.setContext(e)}function UY(e,t,r,i){this.listKey=r,this.container=t,this.parentPath=e||this.parentPath,oa.call(this,i)}function oa(e){var t;this.key=e,this.node=this.container[this.key],this.type=(t=this.node)==null?void 0:t.type}function VY(e=this){if(e.removed)return;let t=this.contexts;for(let r of t)r.maybeQueue(e)}function KY(){let{context:e,node:t}=this;if(!_Y.isPrivate(t)&&t.computed&&e.maybeQueue(this.get("key")),t.decorators)for(let r of this.get("decorators"))e.maybeQueue(r)}function WY(){let e=this,t=this.contexts;for(;!t.length&&(e=e.parentPath,!!e);)t=e.contexts;return t}});var l0=A(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.default=void 0;var $c=class{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(t,r,i=TypeError){return new i(r)}};la.default=$c});var us=A(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});Object.defineProperty(dr,"Hub",{enumerable:!0,get:function(){return HY.default}});Object.defineProperty(dr,"NodePath",{enumerable:!0,get:function(){return JY.default}});Object.defineProperty(dr,"Scope",{enumerable:!0,get:function(){return $Y.default}});dr.visitors=dr.default=void 0;Ht();var vs=os();dr.visitors=vs;var YY=de(),XY=Xr(),u0=Tn(),JY=_r(),$Y=mu(),HY=l0(),{VISITOR_KEYS:GY,removeProperties:zY,traverseFast:c0}=YY;function Mt(e,t={},r,i,s,n){if(e){if(!t.noScope&&!r&&e.type!=="Program"&&e.type!=="File")throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${e.type} node without passing scope and parentPath.`);if(!s&&n)throw new Error("visitSelf can only be used when providing a NodePath.");GY[e.type]&&(vs.explode(t),(0,u0.traverseNode)(e,t,r,i,s,null,n))}}var xz=dr.default=Mt;Mt.visitors=vs;Mt.verify=vs.verify;Mt.explode=vs.explode;Mt.cheap=function(e,t){c0(e,t)};Mt.node=function(e,t,r,i,s,n){(0,u0.traverseNode)(e,t,r,i,s,n)};Mt.clearNode=function(e,t){zY(e,t)};Mt.removeProperties=function(e,t){return c0(e,Mt.clearNode,t),e};function QY(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}Mt.hasType=function(e,t,r){if(r!=null&&r.includes(e.type))return!1;if(e.type===t)return!0;let i={has:!1,type:t};return Mt(e,{noScope:!0,denylist:r,enter:QY},null,i),i.has};Mt.cache=XY});import{writeFile as cX}from"node:fs/promises";var ZY=ip(Rs(),1),_e=ip(de(),1);import{isNullish as Hc,nonNullish as eX}from"@junobuild/utils";import{readFile as tX}from"node:fs/promises";var{parse:rX}=ZY,iX={sourceType:"module",plugins:["typescript"]},p0=async({inputFile:e})=>{let t=await tX(e,"utf-8"),r=rX(t,iX),i=[],s=[],n=[],{default:a}=us();return a(r,{TSInterfaceDeclaration(o){if(o.node.id.name==="_SERVICE"){let l=o.node.body.body;for(let u of l)if(u.type==="TSMethodSignature"||u.type==="TSPropertySignature"){let c=sX(u);eX(c)&&i.push(c)}}else s.push(o.node.id.name)},TSTypeAliasDeclaration(o){n.push(o.node.id.name)}}),{methods:i,imports:[...s,...n]}},Cs=e=>Hc(e)?"unknown":(0,_e.isTSTypeReference)(e)?e.typeName?.name??"unknown":(0,_e.isTSStringKeyword)(e)?"string":(0,_e.isTSNumberKeyword)(e)?"number":(0,_e.isTSBooleanKeyword)(e)?"boolean":(0,_e.isTSBigIntKeyword)(e)?"bigint":(0,_e.isTSSymbolKeyword)(e)?"symbol":(0,_e.isTSNullKeyword)(e)?"null":(0,_e.isTSUndefinedKeyword)(e)?"undefined":(0,_e.isTSVoidKeyword)(e)?"void":(0,_e.isTSNeverKeyword)(e)?"never":(0,_e.isTSUnknownKeyword)(e)?"unknown":(0,_e.isTSAnyKeyword)(e)?"any":(0,_e.isTSObjectKeyword)(e)?"object":(0,_e.isTSTupleType)(e)?`[${e.elementTypes.map(Cs).join(", ")}]`:(0,_e.isTSArrayType)(e)?Cs(e.elementType)+"[]":"unknown",sX=e=>{let{type:t,key:r}=e,s=(()=>{if(r.type==="Identifier")return r.name;if(r.type==="StringLiteral")return r.value})();if(Hc(s)||t!=="TSPropertySignature")return;let n=e.typeAnnotation?.typeAnnotation;if(!(0,_e.isTSTypeReference)(n)||n.typeName?.name!=="ActorMethod"||Hc(n.typeParameters))return;let[o,l]=n.typeParameters.params,u=(0,_e.isTSTupleType)(o)?o.elementTypes.map(Cs):[Cs(o)];return{name:s,paramsType:u,returnType:Cs(l)}};var nX=`%IMPORT%
|
|
56
|
+
`;return this.replaceWith(u)[0].get("arguments.0")}function fW(e){let t=e.params.findIndex(r=>KK(r)||WK(r));return t===-1?e.params.length:t}});var UT=A(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye._guessExecutionStatusRelativeTo=kW;Ye._resolve=qT;Ye.canHaveVariableDeclarationOrExpression=vW;Ye.canSwapBetweenExpressionAndStatement=CW;Ye.getSource=NW;Ye.isCompletionRecord=IW;Ye.isConstantExpression=FW;Ye.isInStrictMode=jW;Ye.isNodeType=AW;Ye.isStatementOrBlock=wW;Ye.isStatic=PW;Ye.matchesPattern=EW;Ye.referencesImport=OW;Ye.resolve=BW;Ye.willIMaybeExecuteBefore=_W;var hW=de(),{STATEMENT_OR_BLOCK_KEYS:dW,VISITOR_KEYS:mW,isBlockStatement:RT,isExpression:yW,isIdentifier:TW,isLiteral:gW,isStringLiteral:SW,isType:bW,matchesPattern:xW}=hW;function EW(e,t){return xW(this.node,e,t)}Ye.has=function(t){var r;let i=(r=this.node)==null?void 0:r[t];return i&&Array.isArray(i)?!!i.length:!!i};function PW(){return this.scope.isStatic(this.node)}Ye.is=Ye.has,Ye.isnt=function(t){return!this.has(t)},Ye.equals=function(t,r){return this.node[t]===r};function AW(e){return bW(this.type,e)}function vW(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function CW(e){return this.key!=="body"||!this.parentPath.isArrowFunctionExpression()?!1:this.isExpression()?RT(e):this.isBlockStatement()?yW(e):!1}function IW(e){let t=this,r=!0;do{let{type:i,container:s}=t;if(!r&&(t.isFunction()||i==="StaticBlock"))return!!e;if(r=!1,Array.isArray(s)&&t.key!==s.length-1)return!1}while((t=t.parentPath)&&!t.isProgram()&&!t.isDoExpression());return!0}function wW(){return this.parentPath.isLabeledStatement()||RT(this.container)?!1:dW.includes(this.key)}function OW(e,t){if(!this.isReferencedIdentifier()){if(this.isJSXMemberExpression()&&this.node.property.name===t||(this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?SW(this.node.property,{value:t}):this.node.property.name===t)){let n=this.get("object");return n.isReferencedIdentifier()&&n.referencesImport(e,"*")}return!1}let r=this.scope.getBinding(this.node.name);if(!r||r.kind!=="module")return!1;let i=r.path,s=i.parentPath;if(!s.isImportDeclaration())return!1;if(s.node.source.value===e){if(!t)return!0}else return!1;return!!(i.isImportDefaultSpecifier()&&t==="default"||i.isImportNamespaceSpecifier()&&t==="*"||i.isImportSpecifier()&&TW(i.node.imported,{name:t}))}function NW(){let e=this.node;if(e.end){let t=this.hub.getCode();if(t)return t.slice(e.start,e.end)}return""}function _W(e){return this._guessExecutionStatusRelativeTo(e)!=="after"}function BT(e){return e.isProgram()?e:(e.parentPath.scope.getFunctionParent()||e.parentPath.scope.getProgramParent()).path}function DW(e,t){switch(e){case"LogicalExpression":return t==="right";case"ConditionalExpression":case"IfStatement":return t==="consequent"||t==="alternate";case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return t==="body";case"ForStatement":return t==="body"||t==="update";case"SwitchStatement":return t==="cases";case"TryStatement":return t==="handler";case"AssignmentPattern":return t==="right";case"OptionalMemberExpression":return t==="property";case"OptionalCallExpression":return t==="arguments";default:return!1}}function FT(e,t){for(let r=0;r<t;r++){let i=e[r];if(DW(i.parent.type,i.parentKey))return!0}return!1}var jT=Symbol();function kW(e){return jc(this,e,new Map)}function jc(e,t,r){let i={this:BT(e),target:BT(t)};if(i.target.node!==i.this.node)return MW(e,i.target,r);let s={target:t.getAncestry(),this:e.getAncestry()};if(s.target.includes(e))return"after";if(s.this.includes(t))return"before";let n,a={target:0,this:0};for(;!n&&a.this<s.this.length;){let c=s.this[a.this];a.target=s.target.indexOf(c),a.target>=0?n=c:a.this++}if(!n)throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");if(FT(s.this,a.this-1)||FT(s.target,a.target-1))return"unknown";let o={this:s.this[a.this-1],target:s.target[a.target-1]};if(o.target.listKey&&o.this.listKey&&o.target.container===o.this.container)return o.target.key>o.this.key?"before":"after";let l=mW[n.type],u={this:l.indexOf(o.this.parentKey),target:l.indexOf(o.target.parentKey)};return u.target>u.this?"before":"after"}function LW(e,t,r){if(t.isFunctionDeclaration()){if(t.parentPath.isExportDeclaration())return"unknown"}else return jc(e,t,r)==="before"?"before":"unknown";let i=t.scope.getBinding(t.node.id.name);if(!i.references)return"before";let s=i.referencePaths,n;for(let a of s){if(!!a.find(u=>u.node===t.node))continue;if(a.key!=="callee"||!a.parentPath.isCallExpression())return"unknown";let l=jc(e,a,r);if(n&&n!==l)return"unknown";n=l}return n}function MW(e,t,r){let i=r.get(e.node),s;if(!i)r.set(e.node,i=new Map);else if(s=i.get(t.node))return s===jT?"unknown":s;i.set(t.node,jT);let n=LW(e,t,r);return i.set(t.node,n),n}function BW(e,t){return qT.call(this,e,t)||this}function qT(e,t){var r;if(!((r=t)!=null&&r.includes(this)))if(t=t||[],t.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){let i=this.scope.getBinding(this.node.name);if(!i||!i.constant||i.kind==="module")return;if(i.path!==this){let s=i.path.resolve(e,t);return this.find(n=>n.node===s.node)?void 0:s}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){let i=this.toComputedKey();if(!gW(i))return;let s=i.value,n=this.get("object").resolve(e,t);if(n.isObjectExpression()){let a=n.get("properties");for(let o of a){if(!o.isProperty())continue;let l=o.get("key"),u=o.isnt("computed")&&l.isIdentifier({name:s});if(u=u||l.isLiteral({value:s}),u)return o.get("value").resolve(e,t)}}else if(n.isArrayExpression()&&!isNaN(+s)){let o=n.get("elements")[s];if(o)return o.resolve(e,t)}}}}function FW(){if(this.isIdentifier()){let e=this.scope.getBinding(this.node.name);return e?e.constant:!1}if(this.isLiteral())return this.isRegExpLiteral()?!1:this.isTemplateLiteral()?this.get("expressions").every(e=>e.isConstantExpression()):!0;if(this.isUnaryExpression())return this.node.operator!=="void"?!1:this.get("argument").isConstantExpression();if(this.isBinaryExpression()){let{operator:e}=this.node;return e!=="in"&&e!=="instanceof"&&this.get("left").isConstantExpression()&&this.get("right").isConstantExpression()}return this.isMemberExpression()?!this.node.computed&&this.get("object").isIdentifier({name:"Symbol"})&&!this.scope.hasBinding("Symbol",{noGlobals:!0}):this.isCallExpression()?this.node.arguments.length===1&&this.get("callee").matchesPattern("Symbol.for")&&!this.scope.hasBinding("Symbol",{noGlobals:!0})&&this.get("arguments")[0].isStringLiteral():!1}function jW(){return!!(this.isProgram()?this:this.parentPath).find(r=>{if(r.isProgram({sourceType:"module"})||r.isClass())return!0;if(r.isArrowFunctionExpression()&&!r.get("body").isBlockStatement())return!1;let i;if(r.isFunction())i=r.node.body;else if(r.isProgram())i=r.node;else return!1;for(let s of i.directives)if(s.value.value==="use strict")return!0})}});var XT=A(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt._getKey=WT;rt._getPattern=YT;rt.get=tY;rt.getAllNextSiblings=ZW;rt.getAllPrevSiblings=eY;rt.getAssignmentIdentifiers=rY;rt.getBindingIdentifierPaths=nY;rt.getBindingIdentifiers=iY;rt.getCompletionRecords=HW;rt.getNextSibling=QW;rt.getOpposite=XW;rt.getOuterBindingIdentifierPaths=aY;rt.getOuterBindingIdentifiers=sY;rt.getPrevSibling=zW;rt.getSibling=GW;var qc=_r(),RW=de(),{getAssignmentIdentifiers:qW,getBindingIdentifiers:KT,getOuterBindingIdentifiers:UW,numericLiteral:VW,unaryExpression:KW}=RW,Uc=0,Ps=1;function WW(e){return{type:Uc,path:e}}function YW(e){return{type:Ps,path:e}}function XW(){return this.key==="left"?this.getSibling("right"):this.key==="right"?this.getSibling("left"):null}function Ci(e,t,r){return e&&t.push(...Ii(e,r)),t}function JW(e,t,r){let i=[];for(let s=0;s<e.length;s++){let n=e[s],a=Ii(n,r),o=[],l=[];for(let u of a)u.type===Uc&&o.push(u),u.type===Ps&&l.push(u);o.length&&(i=o),t.push(...l)}return t.push(...i),t}function $W(e){e.forEach(t=>{t.type=Ps})}function Rc(e,t){e.forEach(r=>{r.path.isBreakStatement({label:null})&&(t?r.path.replaceWith(KW("void",VW(0))):r.path.remove())})}function VT(e,t){let r=[];if(t.canHaveBreak){let i=[];for(let s=0;s<e.length;s++){let n=e[s],a=Object.assign({},t,{inCaseClause:!1});n.isBlockStatement()&&(t.inCaseClause||t.shouldPopulateBreak)?a.shouldPopulateBreak=!0:a.shouldPopulateBreak=!1;let o=Ii(n,a);if(o.length>0&&o.every(l=>l.type===Ps)){i.length>0&&o.every(l=>l.path.isBreakStatement({label:null}))?($W(i),r.push(...i),i.some(l=>l.path.isDeclaration())&&(r.push(...o),Rc(o,!0)),Rc(o,!1)):(r.push(...o),t.shouldPopulateBreak||Rc(o,!0));break}if(s===e.length-1)r.push(...o);else{i=[];for(let l=0;l<o.length;l++){let u=o[l];u.type===Ps&&r.push(u),u.type===Uc&&i.push(u)}}}}else if(e.length)for(let i=e.length-1;i>=0;i--){let s=Ii(e[i],t);if(s.length>1||s.length===1&&!s[0].path.isVariableDeclaration()){r.push(...s);break}}return r}function Ii(e,t){let r=[];if(e.isIfStatement())r=Ci(e.get("consequent"),r,t),r=Ci(e.get("alternate"),r,t);else{if(e.isDoExpression()||e.isFor()||e.isWhile()||e.isLabeledStatement())return Ci(e.get("body"),r,t);if(e.isProgram()||e.isBlockStatement())return VT(e.get("body"),t);if(e.isFunction())return Ii(e.get("body"),t);if(e.isTryStatement())r=Ci(e.get("block"),r,t),r=Ci(e.get("handler"),r,t);else{if(e.isCatchClause())return Ci(e.get("body"),r,t);if(e.isSwitchStatement())return JW(e.get("cases"),r,t);if(e.isSwitchCase())return VT(e.get("consequent"),{canHaveBreak:!0,shouldPopulateBreak:!1,inCaseClause:!0});e.isBreakStatement()?r.push(YW(e)):r.push(WW(e))}}return r}function HW(){return Ii(this,{canHaveBreak:!1,shouldPopulateBreak:!1,inCaseClause:!1}).map(t=>t.path)}function GW(e){return qc.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e}).setContext(this.context)}function zW(){return this.getSibling(this.key-1)}function QW(){return this.getSibling(this.key+1)}function ZW(){let e=this.key,t=this.getSibling(++e),r=[];for(;t.node;)r.push(t),t=this.getSibling(++e);return r}function eY(){let e=this.key,t=this.getSibling(--e),r=[];for(;t.node;)r.push(t),t=this.getSibling(--e);return r}function tY(e,t=!0){t===!0&&(t=this.context);let r=e.split(".");return r.length===1?WT.call(this,e,t):YT.call(this,r,t)}function WT(e,t){let r=this.node,i=r[e];return Array.isArray(i)?i.map((s,n)=>qc.default.get({listKey:e,parentPath:this,parent:r,container:i,key:n}).setContext(t)):qc.default.get({parentPath:this,parent:r,container:r,key:e}).setContext(t)}function YT(e,t){let r=this;for(let i of e)i==="."?r=r.parentPath:Array.isArray(r)?r=r[i]:r=r.get(i,t);return r}function rY(){return qW(this.node)}function iY(e){return KT(this.node,e)}function sY(e){return UW(this.node,e)}function nY(e=!1,t=!1){let i=[this],s=Object.create(null);for(;i.length;){let n=i.shift();if(!n||!n.node)continue;let a=KT.keys[n.node.type];if(n.isIdentifier()){e?(s[n.node.name]=s[n.node.name]||[]).push(n):s[n.node.name]=n;continue}if(n.isExportDeclaration()){let o=n.get("declaration");o.isDeclaration()&&i.push(o);continue}if(t){if(n.isFunctionDeclaration()){i.push(n.get("id"));continue}if(n.isFunctionExpression())continue}if(a)for(let o=0;o<a.length;o++){let l=a[o],u=n.get(l);Array.isArray(u)?i.push(...u):u.node&&i.push(u)}}return s}function aY(e=!1){return this.getBindingIdentifierPaths(e,!0)}});var $T=A(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});As.addComment=pY;As.addComments=fY;As.shareCommentsWithSiblings=cY;var oY=de(),{addComment:lY,addComments:uY}=oY;function cY(){if(typeof this.key=="string")return;let e=this.node;if(!e)return;let t=e.trailingComments,r=e.leadingComments;if(!t&&!r)return;let i=this.getSibling(this.key-1),s=this.getSibling(this.key+1),n=!!i.node,a=!!s.node;n&&(r&&i.addComments("trailing",JT(r,i.node.trailingComments)),t&&!a&&i.addComments("trailing",t)),a&&(t&&s.addComments("leading",JT(t,s.node.leadingComments)),r&&!n&&s.addComments("leading",r))}function JT(e,t){if(!(t!=null&&t.length))return e;let r=new Set(t);return e.filter(i=>!r.has(i))}function pY(e,t,r){lY(this.node,e,t,r)}function fY(e,t){uY(this.node,e,t)}});var _r=A(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.default=Zt.SHOULD_STOP=Zt.SHOULD_SKIP=Zt.REMOVED=void 0;var hY=ru(),dY=Xh(),mY=us(),yY=mu(),zT=de(),na=zT,TY=Xr(),gY=Nm(),zt=_m(),wi=zm(),Oi=fc(),HT=dT(),ti=MT(),$e=UT(),QT=Ht(),Xe=QT,Ni=zn(),Qt=Qn(),Tt=XT(),Vc=$T(),SY=lu(),{validate:bY}=zT,GT=dY("babel"),hz=Zt.REMOVED=1,dz=Zt.SHOULD_STOP=2,mz=Zt.SHOULD_SKIP=4,hr=Zt.default=class ZT{constructor(t,r){this.contexts=[],this.state=null,this.opts=null,this._traverseFlags=0,this.skipKeys=null,this.parentPath=null,this.container=null,this.listKey=null,this.key=null,this.node=null,this.type=null,this.parent=r,this.hub=t,this.data=null,this.context=null,this.scope=null}get removed(){return(this._traverseFlags&1)>0}set removed(t){t?this._traverseFlags|=1:this._traverseFlags&=-2}get shouldStop(){return(this._traverseFlags&2)>0}set shouldStop(t){t?this._traverseFlags|=2:this._traverseFlags&=-3}get shouldSkip(){return(this._traverseFlags&4)>0}set shouldSkip(t){t?this._traverseFlags|=4:this._traverseFlags&=-5}static get({hub:t,parentPath:r,parent:i,container:s,listKey:n,key:a}){if(!t&&r&&(t=r.hub),!i)throw new Error("To get a node path the parent needs to exist");let o=s[a],l=TY.getOrCreateCachedPaths(t,i),u=l.get(o);return u||(u=new ZT(t,i),o&&l.set(o,u)),QT.setup.call(u,r,s,n,a),u}getScope(t){return this.isScope()?new yY.default(this):t}setData(t,r){return this.data==null&&(this.data=Object.create(null)),this.data[t]=r}getData(t,r){this.data==null&&(this.data=Object.create(null));let i=this.data[t];return i===void 0&&r!==void 0&&(i=this.data[t]=r),i}hasNode(){return this.node!=null}buildCodeFrameError(t,r=SyntaxError){return this.hub.buildError(this.node,t,r)}traverse(t,r){(0,mY.default)(this.node,t,this.scope,r,this)}set(t,r){bY(this.node,t,r),this.node[t]=r}getPathLocation(){let t=[],r=this;do{let i=r.key;r.inList&&(i=`${r.listKey}[${i}]`),t.unshift(i)}while(r=r.parentPath);return t.join(".")}debug(t){GT.enabled&>(`${this.getPathLocation()} ${this.type}: ${t}`)}toString(){return(0,gY.default)(this.node).code}get inList(){return!!this.listKey}set inList(t){t||(this.listKey=null)}get parentKey(){return this.listKey||this.key}},xY={findParent:zt.findParent,find:zt.find,getFunctionParent:zt.getFunctionParent,getStatementParent:zt.getStatementParent,getEarliestCommonAncestorFrom:zt.getEarliestCommonAncestorFrom,getDeepestCommonAncestorFrom:zt.getDeepestCommonAncestorFrom,getAncestry:zt.getAncestry,isAncestor:zt.isAncestor,isDescendant:zt.isDescendant,inType:zt.inType,getTypeAnnotation:wi.getTypeAnnotation,isBaseType:wi.isBaseType,couldBeBaseType:wi.couldBeBaseType,baseTypeStrictlyMatches:wi.baseTypeStrictlyMatches,isGenericType:wi.isGenericType,replaceWithMultiple:Oi.replaceWithMultiple,replaceWithSourceString:Oi.replaceWithSourceString,replaceWith:Oi.replaceWith,replaceExpressionWithStatements:Oi.replaceExpressionWithStatements,replaceInline:Oi.replaceInline,evaluateTruthy:HT.evaluateTruthy,evaluate:HT.evaluate,toComputedKey:ti.toComputedKey,ensureBlock:ti.ensureBlock,unwrapFunctionEnvironment:ti.unwrapFunctionEnvironment,arrowFunctionToExpression:ti.arrowFunctionToExpression,splitExportDeclaration:ti.splitExportDeclaration,ensureFunctionName:ti.ensureFunctionName,matchesPattern:$e.matchesPattern,isStatic:$e.isStatic,isNodeType:$e.isNodeType,canHaveVariableDeclarationOrExpression:$e.canHaveVariableDeclarationOrExpression,canSwapBetweenExpressionAndStatement:$e.canSwapBetweenExpressionAndStatement,isCompletionRecord:$e.isCompletionRecord,isStatementOrBlock:$e.isStatementOrBlock,referencesImport:$e.referencesImport,getSource:$e.getSource,willIMaybeExecuteBefore:$e.willIMaybeExecuteBefore,_guessExecutionStatusRelativeTo:$e._guessExecutionStatusRelativeTo,resolve:$e.resolve,isConstantExpression:$e.isConstantExpression,isInStrictMode:$e.isInStrictMode,isDenylisted:Xe.isDenylisted,visit:Xe.visit,skip:Xe.skip,skipKey:Xe.skipKey,stop:Xe.stop,setContext:Xe.setContext,requeue:Xe.requeue,requeueComputedKeyAndDecorators:Xe.requeueComputedKeyAndDecorators,remove:Ni.remove,insertBefore:Qt.insertBefore,insertAfter:Qt.insertAfter,unshiftContainer:Qt.unshiftContainer,pushContainer:Qt.pushContainer,getOpposite:Tt.getOpposite,getCompletionRecords:Tt.getCompletionRecords,getSibling:Tt.getSibling,getPrevSibling:Tt.getPrevSibling,getNextSibling:Tt.getNextSibling,getAllNextSiblings:Tt.getAllNextSiblings,getAllPrevSiblings:Tt.getAllPrevSiblings,get:Tt.get,getAssignmentIdentifiers:Tt.getAssignmentIdentifiers,getBindingIdentifiers:Tt.getBindingIdentifiers,getOuterBindingIdentifiers:Tt.getOuterBindingIdentifiers,getBindingIdentifierPaths:Tt.getBindingIdentifierPaths,getOuterBindingIdentifierPaths:Tt.getOuterBindingIdentifierPaths,shareCommentsWithSiblings:Vc.shareCommentsWithSiblings,addComment:Vc.addComment,addComments:Vc.addComments};Object.assign(hr.prototype,xY);hr.prototype.arrowFunctionToShadowed=ti.arrowFunctionToShadowed,Object.assign(hr.prototype,{has:$e.has,is:$e.is,isnt:$e.isnt,equals:$e.equals,hoist:Qt.hoist,updateSiblingKeys:Qt.updateSiblingKeys,call:Xe.call,isBlacklisted:Xe.isBlacklisted,setScope:Xe.setScope,resync:Xe.resync,popContext:Xe.popContext,pushContext:Xe.pushContext,setup:Xe.setup,setKey:Xe.setKey});hr.prototype._guessExecutionStatusRelativeToDifferentFunctions=$e._guessExecutionStatusRelativeTo,hr.prototype._guessExecutionStatusRelativeToDifferentFunctions=$e._guessExecutionStatusRelativeTo,Object.assign(hr.prototype,{_getTypeAnnotation:wi._getTypeAnnotation,_replaceWith:Oi._replaceWith,_resolve:$e._resolve,_call:Xe._call,_resyncParent:Xe._resyncParent,_resyncKey:Xe._resyncKey,_resyncList:Xe._resyncList,_resyncRemoved:Xe._resyncRemoved,_getQueueContexts:Xe._getQueueContexts,_removeFromScope:Ni._removeFromScope,_callRemovalHooks:Ni._callRemovalHooks,_remove:Ni._remove,_markRemoved:Ni._markRemoved,_assertUnremoved:Ni._assertUnremoved,_containerInsert:Qt._containerInsert,_containerInsertBefore:Qt._containerInsertBefore,_containerInsertAfter:Qt._containerInsertAfter,_verifyNodeList:Qt._verifyNodeList,_getKey:Tt._getKey,_getPattern:Tt._getPattern});for(let e of na.TYPES){let t=`is${e}`,r=na[t];hr.prototype[t]=function(i){return r(this.node,i)},hr.prototype[`assert${e}`]=function(i){if(!r(this.node,i))throw new TypeError(`Expected node path of type ${e}`)}}Object.assign(hr.prototype,SY);for(let e of Object.keys(hY))e[0]!=="_"&&(na.TYPES.includes(e)||na.TYPES.push(e))});var e0=A(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.default=void 0;var EY=_r(),PY=de(),Kc=Ht(),{VISITOR_KEYS:AY}=PY,Wc=class{constructor(t,r,i,s){this.queue=null,this.priorityQueue=null,this.parentPath=s,this.scope=t,this.state=i,this.opts=r}shouldVisit(t){let r=this.opts;if(r.enter||r.exit||r[t.type])return!0;let i=AY[t.type];if(!(i!=null&&i.length))return!1;for(let s of i)if(t[s])return!0;return!1}create(t,r,i,s){return EY.default.get({parentPath:this.parentPath,parent:t,container:r,key:i,listKey:s})}maybeQueue(t,r){this.queue&&(r?this.queue.push(t):this.priorityQueue.push(t))}visitMultiple(t,r,i){if(t.length===0)return!1;let s=[];for(let n=0;n<t.length;n++){let a=t[n];a&&this.shouldVisit(a)&&s.push(this.create(r,t,n,i))}return this.visitQueue(s)}visitSingle(t,r){return this.shouldVisit(t[r])?this.visitQueue([this.create(t,t,r)]):!1}visitQueue(t){this.queue=t,this.priorityQueue=[];let r=new WeakSet,i=!1,s=0;for(;s<t.length;){let n=t[s];if(s++,Kc.resync.call(n),(n.contexts.length===0||n.contexts[n.contexts.length-1]!==this)&&Kc.pushContext.call(n,this),n.key===null)continue;let{node:a}=n;if(!r.has(a)){if(a&&r.add(a),n.visit()){i=!0;break}if(this.priorityQueue.length&&(i=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=t,i))break}}for(let n=0;n<s;n++)Kc.popContext.call(t[n]);return this.queue=null,i}visit(t,r){let i=t[r];return i?Array.isArray(i)?this.visitMultiple(i,t,r):this.visitSingle(t,r):!1}};aa.default=Wc});var Tn=A(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});Yc.traverseNode=wY;var vY=e0(),CY=de(),{VISITOR_KEYS:IY}=CY;function wY(e,t,r,i,s,n,a){let o=IY[e.type];if(!o)return!1;let l=new vY.default(r,t,i,s);if(a)return n!=null&&n[s.parentKey]?!1:l.visitQueue([s]);for(let u of o)if(!(n!=null&&n[u])&&l.visit(e,u))return!0;return!1}});var Ht=A(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re._call=Jc;Re._getQueueContexts=WY;Re._resyncKey=a0;Re._resyncList=o0;Re._resyncParent=n0;Re._resyncRemoved=jY;Re.call=Xc;Re.isDenylisted=i0;Re.popContext=RY;Re.pushContext=qY;Re.requeue=VY;Re.requeueComputedKeyAndDecorators=KY;Re.resync=FY;Re.setContext=BY;Re.setKey=oa;Re.setScope=s0;Re.setup=UY;Re.skip=kY;Re.skipKey=LY;Re.stop=MY;Re.visit=DY;var OY=Tn(),t0=_r(),NY=zn(),_Y=de();function Xc(e){let t=this.opts;if(this.debug(e),this.node&&Jc.call(this,t[e]))return!0;if(this.node){var r;return Jc.call(this,(r=t[this.node.type])==null?void 0:r[e])}return!1}function Jc(e){if(!e)return!1;for(let t of e){if(!t)continue;let r=this.node;if(!r)return!0;let i=t.call(this.state,this,this.state);if(i&&typeof i=="object"&&typeof i.then=="function")throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");if(i)throw new Error(`Unexpected return value from visitor method ${t}`);if(this.node!==r||this._traverseFlags>0)return!0}return!1}function i0(){var e;let t=(e=this.opts.denylist)!=null?e:this.opts.blacklist;return t&&t.indexOf(this.node.type)>-1}Re.isBlacklisted=i0;function r0(e,t){e.context!==t&&(e.context=t,e.state=t.state,e.opts=t.opts)}function DY(){var e,t;if(!this.node||this.isDenylisted()||(e=(t=this.opts).shouldSkip)!=null&&e.call(t,this))return!1;let r=this.context;return this.shouldSkip||Xc.call(this,"enter")?(this.debug("Skip..."),this.shouldStop):(r0(this,r),this.debug("Recursing into..."),this.shouldStop=(0,OY.traverseNode)(this.node,this.opts,this.scope,this.state,this,this.skipKeys),r0(this,r),Xc.call(this,"exit"),this.shouldStop)}function kY(){this.shouldSkip=!0}function LY(e){this.skipKeys==null&&(this.skipKeys={}),this.skipKeys[e]=!0}function MY(){this._traverseFlags|=t0.SHOULD_SKIP|t0.SHOULD_STOP}function s0(){var e,t;if((e=this.opts)!=null&&e.noScope)return;let r=this.parentPath;((this.key==="key"||this.listKey==="decorators")&&r.isMethod()||this.key==="discriminant"&&r.isSwitchStatement())&&(r=r.parentPath);let i;for(;r&&!i;){var s;if((s=r.opts)!=null&&s.noScope)return;i=r.scope,r=r.parentPath}this.scope=this.getScope(i),(t=this.scope)==null||t.init()}function BY(e){return this.skipKeys!=null&&(this.skipKeys={}),this._traverseFlags=0,e&&(this.context=e,this.state=e.state,this.opts=e.opts),s0.call(this),this}function FY(){this.removed||(n0.call(this),o0.call(this),a0.call(this))}function n0(){this.parentPath&&(this.parent=this.parentPath.node)}function a0(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(let e=0;e<this.container.length;e++)if(this.container[e]===this.node){oa.call(this,e);return}}else for(let e of Object.keys(this.container))if(this.container[e]===this.node){oa.call(this,e);return}this.key=null}}function o0(){if(!this.parent||!this.inList)return;let e=this.parent[this.listKey];this.container!==e&&(this.container=e||null)}function jY(){(this.key==null||!this.container||this.container[this.key]!==this.node)&&NY._markRemoved.call(this)}function RY(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0)}function qY(e){this.contexts.push(e),this.setContext(e)}function UY(e,t,r,i){this.listKey=r,this.container=t,this.parentPath=e||this.parentPath,oa.call(this,i)}function oa(e){var t;this.key=e,this.node=this.container[this.key],this.type=(t=this.node)==null?void 0:t.type}function VY(e=this){if(e.removed)return;let t=this.contexts;for(let r of t)r.maybeQueue(e)}function KY(){let{context:e,node:t}=this;if(!_Y.isPrivate(t)&&t.computed&&e.maybeQueue(this.get("key")),t.decorators)for(let r of this.get("decorators"))e.maybeQueue(r)}function WY(){let e=this,t=this.contexts;for(;!t.length&&(e=e.parentPath,!!e);)t=e.contexts;return t}});var l0=A(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.default=void 0;var $c=class{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(t,r,i=TypeError){return new i(r)}};la.default=$c});var us=A(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});Object.defineProperty(dr,"Hub",{enumerable:!0,get:function(){return HY.default}});Object.defineProperty(dr,"NodePath",{enumerable:!0,get:function(){return JY.default}});Object.defineProperty(dr,"Scope",{enumerable:!0,get:function(){return $Y.default}});dr.visitors=dr.default=void 0;Ht();var vs=os();dr.visitors=vs;var YY=de(),XY=Xr(),u0=Tn(),JY=_r(),$Y=mu(),HY=l0(),{VISITOR_KEYS:GY,removeProperties:zY,traverseFast:c0}=YY;function Mt(e,t={},r,i,s,n){if(e){if(!t.noScope&&!r&&e.type!=="Program"&&e.type!=="File")throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${e.type} node without passing scope and parentPath.`);if(!s&&n)throw new Error("visitSelf can only be used when providing a NodePath.");GY[e.type]&&(vs.explode(t),(0,u0.traverseNode)(e,t,r,i,s,null,n))}}var xz=dr.default=Mt;Mt.visitors=vs;Mt.verify=vs.verify;Mt.explode=vs.explode;Mt.cheap=function(e,t){c0(e,t)};Mt.node=function(e,t,r,i,s,n){(0,u0.traverseNode)(e,t,r,i,s,n)};Mt.clearNode=function(e,t){zY(e,t)};Mt.removeProperties=function(e,t){return c0(e,Mt.clearNode,t),e};function QY(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}Mt.hasType=function(e,t,r){if(r!=null&&r.includes(e.type))return!1;if(e.type===t)return!0;let i={has:!1,type:t};return Mt(e,{noScope:!0,denylist:r,enter:QY},null,i),i.has};Mt.cache=XY});import{writeFile as cX}from"node:fs/promises";var ZY=ip(Rs(),1),_e=ip(de(),1);import{isNullish as Hc,nonNullish as eX}from"@junobuild/utils";import{readFile as tX}from"node:fs/promises";var{parse:rX}=ZY,iX={sourceType:"module",plugins:["typescript"]},p0=async({inputFile:e})=>{let t=await tX(e,"utf-8"),r=rX(t,iX),i=[],s=[],n=[],{default:a}=us();return a(r,{TSInterfaceDeclaration(o){if(o.node.id.name==="_SERVICE"){let l=o.node.body.body;for(let u of l)if(u.type==="TSMethodSignature"||u.type==="TSPropertySignature"){let c=sX(u);eX(c)&&i.push(c)}}else s.push(o.node.id.name)},TSTypeAliasDeclaration(o){n.push(o.node.id.name)}}),{methods:i,imports:[...s,...n]}},Cs=e=>Hc(e)?"unknown":(0,_e.isTSTypeReference)(e)?e.typeName?.name??"unknown":(0,_e.isTSStringKeyword)(e)?"string":(0,_e.isTSNumberKeyword)(e)?"number":(0,_e.isTSBooleanKeyword)(e)?"boolean":(0,_e.isTSBigIntKeyword)(e)?"bigint":(0,_e.isTSSymbolKeyword)(e)?"symbol":(0,_e.isTSNullKeyword)(e)?"null":(0,_e.isTSUndefinedKeyword)(e)?"undefined":(0,_e.isTSVoidKeyword)(e)?"void":(0,_e.isTSNeverKeyword)(e)?"never":(0,_e.isTSUnknownKeyword)(e)?"unknown":(0,_e.isTSAnyKeyword)(e)?"any":(0,_e.isTSObjectKeyword)(e)?"object":(0,_e.isTSTupleType)(e)?`[${e.elementTypes.map(Cs).join(", ")}]`:(0,_e.isTSArrayType)(e)?Cs(e.elementType)+"[]":"unknown",sX=e=>{let{type:t,key:r}=e,s=(()=>{if(r.type==="Identifier")return r.name;if(r.type==="StringLiteral")return r.value})();if(Hc(s)||t!=="TSPropertySignature")return;let n=e.typeAnnotation?.typeAnnotation;if(!(0,_e.isTSTypeReference)(n)||n.typeName?.name!=="ActorMethod"||Hc(n.typeParameters))return;let[o,l]=n.typeParameters.params,u=(0,_e.isTSTupleType)(o)?o.elementTypes.map(Cs):[Cs(o)];return{name:s,paramsType:u,returnType:Cs(l)}};var nX=`// This file was automatically generated by the Juno CLI.
|
|
57
|
+
// Any modifications may be overwritten.
|
|
58
|
+
%IMPORT%
|
|
57
59
|
import {idlFactory} from './satellite.factory.did.js';
|
|
58
60
|
import {getSatelliteExtendedActor} from '@junobuild/%CORE_LIB%';
|
|
59
61
|
|
|
@@ -70,7 +72,8 @@ import {getSatelliteExtendedActor} from '@junobuild/%CORE_LIB%';
|
|
|
70
72
|
});
|
|
71
73
|
|
|
72
74
|
return await %DID_METHOD_NAME%(%CALL_PARAMS%);
|
|
73
|
-
}`,lX
|
|
75
|
+
}`,lX=`
|
|
76
|
+
import type {_SERVICE as SatelliteActor%IMPORTS%} from './satellite.did';`,f0=({methods:e,imports:t,transformerOptions:{coreLib:r,outputLanguage:i}})=>{let s=i==="js"?oX:aX,n=e.map(a=>{let o=uX(a),l=s;return Object.entries(o).map(([u,c])=>{l=l.replaceAll(`%${u}%`,c)}),l}).join(`
|
|
74
77
|
|
|
75
78
|
`);return nX.replace("%CORE_LIB%",r??"core").replace("%METHODS%",n).replace("%IMPORT%",i==="js"?"":lX.replace("%IMPORTS%",t.length===0?"":`, ${t.join(", ")}`)).trim()},uX=({name:e,returnType:t,paramsType:r})=>{let s=(l=>l.replace(/_./g,u=>u[1].toUpperCase()))(e),n=r.map((l,u)=>({param:`value${u}`,type:l})),a=`${n.map(({param:l})=>l).join(", ")}`,o=n.map(({param:l,type:u})=>`${l}: ${u}`).join(", ");return{METHOD_NAME:s,DID_METHOD_NAME:e,METHOD_RESULT:t,PARAMS:o,CALL_PARAMS:a}};var Nz=async({inputFile:e,outputFile:t,transformerOptions:r})=>{let i=await p0({inputFile:e}),s=f0({...i,transformerOptions:r});await cX(t,s,"utf-8")};export{Nz as generateApi};
|
|
76
79
|
//# sourceMappingURL=index.mjs.map
|