Files
csources-nimble/nimble-linux/@mnimblepkg@spublish.nim.c
T
2022-09-19 10:00:41 +03:00

2054 lines
100 KiB
C

/* Generated by Nim Compiler v1.7.1 */
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.h>
#include <setjmp.h>
#include <sys/types.h>
#include <pthread.h>
#include <unistd.h>
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef far
#undef powerpc
#undef unix
# define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
# define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
# define nimln_(n, file) \
FR_.line = n; FR_.filename = file;
typedef struct tyObject_PackageInfo__y9ahmwzrCcWrfsrJgR1q4lw tyObject_PackageInfo__y9ahmwzrCcWrfsrJgR1q4lw;
typedef struct tyObject_Options__LR5gStV09bAFaOqz9agkkZxQ tyObject_Options__LR5gStV09bAFaOqz9agkkZxQ;
typedef struct tyObject_Auth__BHbQxO9bMmttlUd9bhNwob7Q tyObject_Auth__BHbQxO9bMmttlUd9bhNwob7Q;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tyObject_HttpClientBasecolonObjectType___UPZdfed89aNSioeMjzFgefA tyObject_HttpClientBasecolonObjectType___UPZdfed89aNSioeMjzFgefA;
typedef struct tyObject_Config__4CDaXnHluuDhjlvHrDG8RA tyObject_Config__4CDaXnHluuDhjlvHrDG8RA;
typedef struct tyObject_Table__9cUbBDOJGZJU2domnRMqAHQ tyObject_Table__9cUbBDOJGZJU2domnRMqAHQ;
typedef struct tySequence__sQx7tKsP6HE09cszRIkxbdg tySequence__sQx7tKsP6HE09cszRIkxbdg;
typedef struct tyObject_Uri__j49bukNPrq747O1GRd4Ng9bQ tyObject_Uri__j49bukNPrq747O1GRd4Ng9bQ;
typedef struct tyObject_Action__Axd3qAbppa2kHdtxRGykNw tyObject_Action__Axd3qAbppa2kHdtxRGykNw;
typedef struct tySequence__kLwf9aGQcuduFr4gekUDa2w tySequence__kLwf9aGQcuduFr4gekUDa2w;
typedef struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ tySequence__sM4lkSb7zS6F7OVMvW9cffQ;
typedef struct tySequence__K2J9a59aomOCxv7VVeiHZfug tySequence__K2J9a59aomOCxv7VVeiHZfug;
typedef struct tyObject_Option__vK1KzfYf1DGLiUIpLm9cS0A tyObject_Option__vK1KzfYf1DGLiUIpLm9cS0A;
typedef struct tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q;
typedef struct tyObject_Table__861JQ0xhLIYW2jzxkMweLQ tyObject_Table__861JQ0xhLIYW2jzxkMweLQ;
typedef struct tySequence__v6NVljHM6giAeuZKHEoQNA tySequence__v6NVljHM6giAeuZKHEoQNA;
typedef struct tyObject_SslContextcolonObjectType___nNdejAl9bbVbX7sP6RJ4h0w tyObject_SslContextcolonObjectType___nNdejAl9bbVbX7sP6RJ4h0w;
typedef struct tyObject_SocketImpl__aIhANOOoETolVz9cccNO9cRQ tyObject_SocketImpl__aIhANOOoETolVz9cccNO9cRQ;
typedef struct tyObject_HttpHeaderscolonObjectType___GM611pWlOrQ7hvMPcuAACA tyObject_HttpHeaderscolonObjectType___GM611pWlOrQ7hvMPcuAACA;
typedef struct tyObject_ProxycolonObjectType___CigKkL8U2DnJdbYRi9aI9aoQ tyObject_ProxycolonObjectType___CigKkL8U2DnJdbYRi9aI9aoQ;
typedef struct tyObject_MonoTime__FEvFMlkqJiSSGVO6HgTv8w tyObject_MonoTime__FEvFMlkqJiSSGVO6HgTv8w;
typedef struct tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ;
typedef struct Exception Exception;
typedef struct RootObj RootObj;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tySequence__uB9b75OUPRENsBAu4AnoePA tySequence__uB9b75OUPRENsBAu4AnoePA;
typedef struct TSafePoint TSafePoint;
typedef struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g;
typedef struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w;
typedef struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ;
typedef struct tyObject_GcStack__7fytPA5bBsob6See21YMRA tyObject_GcStack__7fytPA5bBsob6See21YMRA;
typedef struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg;
typedef struct tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ;
typedef struct tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg;
typedef struct tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw;
typedef struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA;
typedef struct tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw;
typedef struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw;
typedef struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg;
typedef struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyTuple__ujsjpB2O9cjj3uDHsXbnSzg;
typedef struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg;
typedef struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ;
typedef struct tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg;
typedef struct tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw;
typedef struct tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg;
typedef struct tyObject_Table__qagh2zcXAhSb9aRfetCb26g tyObject_Table__qagh2zcXAhSb9aRfetCb26g;
typedef struct tyTuple__UV3llMMYFckfui8YMBuUZA tyTuple__UV3llMMYFckfui8YMBuUZA;
typedef struct tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg;
typedef struct tySequence__MlAD6nAPq9bHKla9cWiIZP0g tySequence__MlAD6nAPq9bHKla9cWiIZP0g;
typedef struct tySequence__oLpBKXzW3hF9aCVMo5EymfQ tySequence__oLpBKXzW3hF9aCVMo5EymfQ;
typedef struct tyObject_MultipartDatacolonObjectType___pa59bn7R9cBmjUm9clF5koL7g tyObject_MultipartDatacolonObjectType___pa59bn7R9cBmjUm9clF5koL7g;
typedef struct tyObject_NimbleError__6rmfqzY5PO7blXdlEs8gjQ tyObject_NimbleError__6rmfqzY5PO7blXdlEs8gjQ;
typedef struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA;
typedef struct tyTuple__XOVT24GHXwqiEj5GCsEGCA tyTuple__XOVT24GHXwqiEj5GCsEGCA;
typedef struct tyObject_HashSet__CD8Dpv0WGmASelVaNSo6zg tyObject_HashSet__CD8Dpv0WGmASelVaNSo6zg;
typedef struct tySequence__4eRCaZmrYLLw2k30GPTiMw tySequence__4eRCaZmrYLLw2k30GPTiMw;
typedef struct tyObject_Table__Ji6x6JQ0gVMaFr8AIk18Ug tyObject_Table__Ji6x6JQ0gVMaFr8AIk18Ug;
typedef struct tySequence__SFipDZIkFtPcrLs0AGBBjQ tySequence__SFipDZIkFtPcrLs0AGBBjQ;
typedef struct tyTuple__BjxoJYFE5BulbiU15SM6nQ tyTuple__BjxoJYFE5BulbiU15SM6nQ;
typedef struct tyObject_Version__9bU0a4Oqtl9aJmGyzYi8ZnBA tyObject_Version__9bU0a4Oqtl9aJmGyzYi8ZnBA;
typedef struct tyObject_Sha1Hash__zQwLVDNef3gJr9bhL9bRloJw tyObject_Sha1Hash__zQwLVDNef3gJr9bhL9bRloJw;
typedef struct tyObject_OrderedTable__b2SAayIK9c6IoZnFt9cutJhQ tyObject_OrderedTable__b2SAayIK9c6IoZnFt9cutJhQ;
typedef struct tySequence__ZkxkVxJvB9aqet9cfVQmFTZw tySequence__ZkxkVxJvB9aqet9cfVQmFTZw;
typedef struct tyObject_PackageMetaData__EO1rPizWROcibmAlVzA30w tyObject_PackageMetaData__EO1rPizWROcibmAlVzA30w;
typedef struct tyObject_HashSet__aCgx9aJWOlGNhL9b41LIC4Wg tyObject_HashSet__aCgx9aJWOlGNhL9b41LIC4Wg;
typedef struct tySequence__72hOjuY2LKiowAwLCg19a9bA tySequence__72hOjuY2LKiowAwLCg19a9bA;
typedef struct tyTuple__jq7X5k7hWG0tdTZTDkiyGQ tyTuple__jq7X5k7hWG0tdTZTDkiyGQ;
typedef struct tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw;
typedef struct tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q;
typedef struct tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw;
typedef struct tyTuple__vQEyvUeZmB7ODgnsZ5BScQ tyTuple__vQEyvUeZmB7ODgnsZ5BScQ;
typedef struct tyObject_PackageList__00UcE13159cf20wGpsHwwMg tyObject_PackageList__00UcE13159cf20wGpsHwwMg;
typedef struct tyTuple__gDWaEqPfhOauJWKMBm8bzg tyTuple__gDWaEqPfhOauJWKMBm8bzg;
typedef struct tyObject_VersionRangeObj__FrJQzed5Yezqp6gCbEyg0w tyObject_VersionRangeObj__FrJQzed5Yezqp6gCbEyg0w;
typedef struct tyTuple__7OnuWIzW3xYXy9bIUIvuRmA tyTuple__7OnuWIzW3xYXy9bIUIvuRmA;
typedef struct tyTuple__rLNSKSsDc19cDzAtjOZs9cSw tyTuple__rLNSKSsDc19cDzAtjOZs9cSw;
typedef struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA;
typedef struct tyTuple__awOivLjlO76sGdHY7nQUjQ tyTuple__awOivLjlO76sGdHY7nQUjQ;
typedef struct tyTuple__QeWl6B6ffS4pU6WWrtcrDw tyTuple__QeWl6B6ffS4pU6WWrtcrDw;
typedef struct tyTuple__8ZxhPt1NwfElsJs8zUSV9bg tyTuple__8ZxhPt1NwfElsJs8zUSV9bg;
typedef struct tyTuple__m8l9a4rYFktlUTIniXgnvog tyTuple__m8l9a4rYFktlUTIniXgnvog;
typedef struct tyObject_LockFileDep__PkUOL8vzIvRRmF9bLOPRlhg tyObject_LockFileDep__PkUOL8vzIvRRmF9bLOPRlhg;
typedef struct tyObject_Checksums__aZcxVfkZCt9bd29bg29aMe9aaA tyObject_Checksums__aZcxVfkZCt9bd29bg29aMe9aaA;
typedef struct tyTuple__r1NtfsBxxsYs1cV48P1DyA tyTuple__r1NtfsBxxsYs1cV48P1DyA;
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct tyObject_Auth__BHbQxO9bMmttlUd9bhNwob7Q {
NimStringDesc* user;
NimStringDesc* token;
tyObject_HttpClientBasecolonObjectType___UPZdfed89aNSioeMjzFgefA* http;
};
struct tyObject_Table__9cUbBDOJGZJU2domnRMqAHQ {
tySequence__sQx7tKsP6HE09cszRIkxbdg* data;
NI counter;
};
struct tyObject_Uri__j49bukNPrq747O1GRd4Ng9bQ {
NimStringDesc* scheme;
NimStringDesc* username;
NimStringDesc* password;
NimStringDesc* hostname;
NimStringDesc* port;
NimStringDesc* path;
NimStringDesc* query;
NimStringDesc* anchor;
NIM_BOOL opaque;
NIM_BOOL isIpv6;
};
struct tyObject_Config__4CDaXnHluuDhjlvHrDG8RA {
NimStringDesc* nimbleDir;
NIM_BOOL chcp;
tyObject_Table__9cUbBDOJGZJU2domnRMqAHQ packageLists;
NIM_BOOL cloneUsingHttps;
tyObject_Uri__j49bukNPrq747O1GRd4Ng9bQ httpProxy;
};
typedef NU8 tyEnum_ForcePrompt__djMIU0KJ4yj4ST3o49caOhA;
typedef NU8 tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ;
typedef NU8 tyEnum_ActionType__w1V3R82mpkCDejycxLFPdg;
struct tyObject_Option__vK1KzfYf1DGLiUIpLm9cS0A {
NimStringDesc* val;
NIM_BOOL has;
};
struct tyObject_Action__Axd3qAbppa2kHdtxRGykNw {
tyEnum_ActionType__w1V3R82mpkCDejycxLFPdg typ;
union{
struct {NIM_BOOL listOnly;
} _typ_2;
struct {NimStringDesc* optionalURL;
} _typ_3;
struct {tySequence__kLwf9aGQcuduFr4gekUDa2w* packages;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* passNimFlags;
tySequence__K2J9a59aomOCxv7VVeiHZfug* devActions;
NimStringDesc* path;
NIM_BOOL noRebuild;
NIM_BOOL withDependencies;
NimStringDesc* developFile;
NIM_BOOL global;
} _typ_4;
struct {tySequence__sM4lkSb7zS6F7OVMvW9cffQ* search;
} _typ_5;
struct {NimStringDesc* projName;
NimStringDesc* vcsOption;
} _typ_6;
struct {NimStringDesc* file;
NimStringDesc* backend;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* additionalArguments;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* compileOptions;
} _typ_7;
struct {tyObject_Option__vK1KzfYf1DGLiUIpLm9cS0A runFile;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* compileFlags;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* runFlags;
} _typ_8;
struct {NimStringDesc* command;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* arguments;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* custCompileFlags;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* custRunFlags;
} _typ_9;
struct {NimStringDesc* format;
} _typ_10;
};
};
typedef NU8 tyEnum_DumpMode__lrp4056pVLtFZp9cfnP5HtA;
struct tyObject_Options__LR5gStV09bAFaOqz9agkkZxQ {
tyEnum_ForcePrompt__djMIU0KJ4yj4ST3o49caOhA forcePrompts;
NIM_BOOL depsOnly;
NIM_BOOL uninstallRevDeps;
NIM_BOOL queryVersions;
NIM_BOOL queryInstalled;
NimStringDesc* nimbleDir;
tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ verbosity;
tyObject_Action__Axd3qAbppa2kHdtxRGykNw action;
tyObject_Config__4CDaXnHluuDhjlvHrDG8RA config;
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* nimbleData;
tyObject_Table__861JQ0xhLIYW2jzxkMweLQ* pkgInfoCache;
NIM_BOOL showHelp;
NimStringDesc* lockFileName;
NIM_BOOL showVersion;
NIM_BOOL offline;
NIM_BOOL noColor;
NIM_BOOL disableValidation;
NIM_BOOL continueTestsOnFailure;
NIM_BOOL forceFullClone;
tySequence__v6NVljHM6giAeuZKHEoQNA* unknownFlags;
tyEnum_DumpMode__lrp4056pVLtFZp9cfnP5HtA dumpMode;
NimStringDesc* startDir;
NimStringDesc* nim;
NIM_BOOL localdeps;
NIM_BOOL developLocaldeps;
NIM_BOOL disableSslCertCheck;
NIM_BOOL enableTarballs;
NimStringDesc* package;
};
typedef struct {
N_NIMCALL_PTR(void, ClP_0) (NI64 total, NI64 progress, NI64 speed, void* ClE_0);
void* ClE_0;
} tyProc__TSOsjF4c9aXotPerq9cEE56A;
struct tyObject_MonoTime__FEvFMlkqJiSSGVO6HgTv8w {
NI64 ticks;
};
struct tyObject_HttpClientBasecolonObjectType___UPZdfed89aNSioeMjzFgefA {
tyObject_SocketImpl__aIhANOOoETolVz9cccNO9cRQ* socket;
NIM_BOOL connected;
tyObject_Uri__j49bukNPrq747O1GRd4Ng9bQ currentURL;
tyObject_HttpHeaderscolonObjectType___GM611pWlOrQ7hvMPcuAACA* headers;
NI maxRedirects;
NimStringDesc* userAgent;
NI timeout;
tyObject_ProxycolonObjectType___CigKkL8U2DnJdbYRi9aI9aoQ* proxy;
tyProc__TSOsjF4c9aXotPerq9cEE56A onProgressChanged;
tyObject_SslContextcolonObjectType___nNdejAl9bbVbX7sP6RJ4h0w* sslContext;
NI64 contentTotal;
NI64 contentProgress;
NI64 oneSecondProgress;
tyObject_MonoTime__FEvFMlkqJiSSGVO6HgTv8w lastProgressReport;
tyObject_StreamObj__THYguAi9bSgidczZ3ywEIMQ* bodyStream;
NIM_BOOL getBody;
};
typedef NU8 tyEnum_DisplayType__HypVeg1P09aXzPaqyobO7xA;
typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A;
typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ;
typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
struct TNimType {
NI size;
NI align;
tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A kind;
tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
TNimType* base;
TNimNode* node;
void* finalizer;
tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
};
struct RootObj {
TNimType* m_type;
};
struct Exception {
RootObj Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
tySequence__uB9b75OUPRENsBAu4AnoePA* trace;
Exception* up;
};
typedef long tyArray__TcvIiMAJvcwzNLsZkfnFnQ[25];
struct TSafePoint {
TSafePoint* prev;
NI status;
jmp_buf context;
};
typedef NU8 tySet_tyChar__nmiMWKVIe46vacnhAFrQvw[32];
typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
struct TNimNode {
tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g {
NI refcount;
TNimType* typ;
};
struct tyObject_GcStack__7fytPA5bBsob6See21YMRA {
void* bottom;
};
struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w {
NI len;
NI cap;
tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g** d;
};
typedef tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ* tyArray__SPr7N6UKfuF549bNPiUvSRw[256];
typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
typedef tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* tyArray__N1u1nqOgmuJN9cSZrnMHgOQ[32];
typedef tyArray__N1u1nqOgmuJN9cSZrnMHgOQ tyArray__B6durA4ZCi1xjJvRtyYxMg[24];
typedef tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw* tyArray__lh2A89ahMmYg9bCmpVaplLbA[256];
struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA {
tyArray__lh2A89ahMmYg9bCmpVaplLbA data;
};
typedef tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* tyArray__0aOLqZchNi8nWtMTi8ND8w[2];
struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw {
tyArray__0aOLqZchNi8nWtMTi8ND8w link;
NI key;
NI upperBound;
NI level;
};
struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg {
tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* Field0;
NI Field1;
};
typedef tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyArray__LzOv2eCDGiceMKQstCLmhw[30];
struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg {
NI len;
tyArray__LzOv2eCDGiceMKQstCLmhw chunks;
tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg* next;
};
struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg {
NI minLargeObj;
NI maxLargeObj;
tyArray__SPr7N6UKfuF549bNPiUvSRw freeSmallChunks;
NU32 flBitmap;
tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
tyArray__B6durA4ZCi1xjJvRtyYxMg matrix;
tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw* llmem;
NI currMem;
NI maxMem;
NI freeMem;
NI occ;
NI lastSize;
tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA chunkStarts;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* root;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* deleted;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* last;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* freeAvlNodes;
NIM_BOOL locked;
NIM_BOOL blockChunkSizeIncrease;
NI nextChunkSize;
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw bottomData;
tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg heapLinks;
};
struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg {
NI stackScans;
NI cycleCollections;
NI maxThreshold;
NI maxStackSize;
NI maxStackCells;
NI cycleTableSize;
NI64 maxPause;
};
struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ {
NI counter;
NI max;
tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg* head;
tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg** data;
};
typedef long tyArray__xDUyu9aScDpt0JZLU6q9aEZQ[5];
struct tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw {
tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg* head;
tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg* tail;
pthread_mutex_t lock;
};
struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ {
tyObject_GcStack__7fytPA5bBsob6See21YMRA stack;
NI cycleThreshold;
NI zctThreshold;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w zct;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w decStack;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tempStack;
NI recGcLock;
tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg region;
tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg stat;
tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ marked;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w additionalRoots;
tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw toDispose;
NI gcThreadId;
};
struct tyObject_HttpHeaderscolonObjectType___GM611pWlOrQ7hvMPcuAACA {
tyObject_Table__qagh2zcXAhSb9aRfetCb26g* table;
NIM_BOOL isTitleCase;
};
struct tyTuple__UV3llMMYFckfui8YMBuUZA {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
typedef tyTuple__UV3llMMYFckfui8YMBuUZA tyArray__0ipey9aZuUA8jy4OAHzODQg[3];
typedef NU8 tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg;
struct tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg {
tySequence__MlAD6nAPq9bHKla9cWiIZP0g* data;
NI counter;
NI first;
NI last;
};
struct tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q {
NIM_BOOL isUnquoted;
tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg kind;
union{
struct {NimStringDesc* str;
} _kind_1;
struct {NI64 num;
} _kind_2;
struct {NF fnum;
} _kind_3;
struct {NIM_BOOL bval;
} _kind_4;
struct {tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg fields;
} _kind_6;
struct {tySequence__oLpBKXzW3hF9aCVMo5EymfQ* elems;
} _kind_7;
};
};
struct tyTuple__XOVT24GHXwqiEj5GCsEGCA {
NimStringDesc* Field0;
NI Field1;
};
struct tyObject_HashSet__CD8Dpv0WGmASelVaNSo6zg {
tySequence__4eRCaZmrYLLw2k30GPTiMw* data;
NI counter;
};
struct tyObject_Table__Ji6x6JQ0gVMaFr8AIk18Ug {
tySequence__SFipDZIkFtPcrLs0AGBBjQ* data;
NI counter;
};
struct tyObject_Version__9bU0a4Oqtl9aJmGyzYi8ZnBA {
NimStringDesc* version;
};
struct tyObject_Sha1Hash__zQwLVDNef3gJr9bhL9bRloJw {
NimStringDesc* hashValue;
};
struct tyTuple__BjxoJYFE5BulbiU15SM6nQ {
NimStringDesc* Field0;
tyObject_Version__9bU0a4Oqtl9aJmGyzYi8ZnBA Field1;
tyObject_Sha1Hash__zQwLVDNef3gJr9bhL9bRloJw Field2;
};
struct tyObject_OrderedTable__b2SAayIK9c6IoZnFt9cutJhQ {
tySequence__ZkxkVxJvB9aqet9cfVQmFTZw* data;
NI counter;
NI first;
NI last;
};
typedef NU8 tyEnum_DownloadMethod__IqkMKe5PGkzDG0ayIWPJ6w;
struct tyObject_HashSet__aCgx9aJWOlGNhL9b41LIC4Wg {
tySequence__72hOjuY2LKiowAwLCg19a9bA* data;
NI counter;
};
struct tyObject_PackageMetaData__EO1rPizWROcibmAlVzA30w {
NimStringDesc* url;
tyEnum_DownloadMethod__IqkMKe5PGkzDG0ayIWPJ6w downloadMethod;
tyObject_Sha1Hash__zQwLVDNef3gJr9bhL9bRloJw vcsRevision;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* files;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* binaries;
tyObject_HashSet__aCgx9aJWOlGNhL9b41LIC4Wg specialVersions;
};
struct tyObject_PackageInfo__y9ahmwzrCcWrfsrJgR1q4lw {
NimStringDesc* myPath;
NIM_BOOL isNimScript;
NIM_BOOL isMinimal;
NIM_BOOL isInstalled;
tyObject_HashSet__CD8Dpv0WGmASelVaNSo6zg nimbleTasks;
tyObject_HashSet__CD8Dpv0WGmASelVaNSo6zg postHooks;
tyObject_HashSet__CD8Dpv0WGmASelVaNSo6zg preHooks;
NimStringDesc* author;
NimStringDesc* description;
NimStringDesc* license;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* skipDirs;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* skipFiles;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* skipExt;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* installDirs;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* installFiles;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* installExt;
tySequence__kLwf9aGQcuduFr4gekUDa2w* requires;
tyObject_Table__Ji6x6JQ0gVMaFr8AIk18Ug bin;
NimStringDesc* binDir;
NimStringDesc* srcDir;
NimStringDesc* backend;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* foreignDeps;
tyTuple__BjxoJYFE5BulbiU15SM6nQ basicInfo;
tyObject_OrderedTable__b2SAayIK9c6IoZnFt9cutJhQ lockedDeps;
tyObject_PackageMetaData__EO1rPizWROcibmAlVzA30w metaData;
NIM_BOOL isLink;
};
struct tyTuple__jq7X5k7hWG0tdTZTDkiyGQ {
NimStringDesc* Field0;
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* Field1;
};
typedef tyTuple__jq7X5k7hWG0tdTZTDkiyGQ tyArray__Xkn9cR0g9aWIRwE2cFDfN3nQ[7];
struct tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q {
NI64 seconds;
NI nanosecond;
};
typedef NU8 tyEnum_WeekDay__SVfemTA9aCOyua2TJYa6yBg;
struct tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw {
RootObj Sup;
NI nanosecond;
NI second;
NI minute;
NI hour;
NI monthdayZero;
NI monthZero;
NI year;
tyEnum_WeekDay__SVfemTA9aCOyua2TJYa6yBg weekday;
NI yearday;
NIM_BOOL isDst;
tyObject_TimezonecolonObjectType___F8OvqlxXyGXRSiK9c1fCDVw* timezone;
NI utcOffset;
};
typedef NimStringDesc* tyArray__sMpvt1sOxOJ3LFGulnbeMQ[4];
struct tyObject_PackageList__00UcE13159cf20wGpsHwwMg {
NimStringDesc* name;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* urls;
NimStringDesc* path;
};
struct tyTuple__vQEyvUeZmB7ODgnsZ5BScQ {
NI Field0;
NimStringDesc* Field1;
tyObject_PackageList__00UcE13159cf20wGpsHwwMg Field2;
};
struct tyTuple__gDWaEqPfhOauJWKMBm8bzg {
NimStringDesc* Field0;
tyObject_VersionRangeObj__FrJQzed5Yezqp6gCbEyg0w* Field1;
};
typedef NU8 tyEnum_DevelopActionType__x2ItfH5czqSlrOttkAoYOQ;
struct tyTuple__7OnuWIzW3xYXy9bIUIvuRmA {
tyEnum_DevelopActionType__x2ItfH5czqSlrOttkAoYOQ Field0;
NimStringDesc* Field1;
};
typedef NU8 tyEnum_CmdLineKind__XkdXq9atxjiuhkFFh0XYrSA;
struct tyTuple__rLNSKSsDc19cDzAtjOZs9cSw {
tyEnum_CmdLineKind__XkdXq9atxjiuhkFFh0XYrSA Field0;
NimStringDesc* Field1;
NimStringDesc* Field2;
};
struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA {
NCSTRING procname;
NI line;
NCSTRING filename;
};
struct tyTuple__awOivLjlO76sGdHY7nQUjQ {
NI Field0;
NI Field1;
NimStringDesc* Field2;
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* Field3;
};
struct tyTuple__QeWl6B6ffS4pU6WWrtcrDw {
NI Field0;
NimStringDesc* Field1;
};
struct tyTuple__8ZxhPt1NwfElsJs8zUSV9bg {
NI Field0;
NimStringDesc* Field1;
NimStringDesc* Field2;
};
struct tyObject_Checksums__aZcxVfkZCt9bd29bg29aMe9aaA {
tyObject_Sha1Hash__zQwLVDNef3gJr9bhL9bRloJw sha1;
};
struct tyObject_LockFileDep__PkUOL8vzIvRRmF9bLOPRlhg {
tyObject_Version__9bU0a4Oqtl9aJmGyzYi8ZnBA version;
tyObject_Sha1Hash__zQwLVDNef3gJr9bhL9bRloJw vcsRevision;
NimStringDesc* url;
tyEnum_DownloadMethod__IqkMKe5PGkzDG0ayIWPJ6w downloadMethod;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* dependencies;
tyObject_Checksums__aZcxVfkZCt9bd29bg29aMe9aaA checksums;
};
struct tyTuple__m8l9a4rYFktlUTIniXgnvog {
NI Field0;
NI Field1;
NimStringDesc* Field2;
tyObject_LockFileDep__PkUOL8vzIvRRmF9bLOPRlhg Field3;
};
struct tyTuple__r1NtfsBxxsYs1cV48P1DyA {
NI Field0;
tyObject_Version__9bU0a4Oqtl9aJmGyzYi8ZnBA Field1;
};
struct tySequence__sM4lkSb7zS6F7OVMvW9cffQ {
TGenericSeq Sup;
NimStringDesc* data[SEQ_DECL_SIZE];
};
struct tySequence__sQx7tKsP6HE09cszRIkxbdg {
TGenericSeq Sup;
tyTuple__vQEyvUeZmB7ODgnsZ5BScQ data[SEQ_DECL_SIZE];
};
struct tySequence__kLwf9aGQcuduFr4gekUDa2w {
TGenericSeq Sup;
tyTuple__gDWaEqPfhOauJWKMBm8bzg data[SEQ_DECL_SIZE];
};
struct tySequence__K2J9a59aomOCxv7VVeiHZfug {
TGenericSeq Sup;
tyTuple__7OnuWIzW3xYXy9bIUIvuRmA data[SEQ_DECL_SIZE];
};
struct tySequence__v6NVljHM6giAeuZKHEoQNA {
TGenericSeq Sup;
tyTuple__rLNSKSsDc19cDzAtjOZs9cSw data[SEQ_DECL_SIZE];
};
struct tySequence__uB9b75OUPRENsBAu4AnoePA {
TGenericSeq Sup;
tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA data[SEQ_DECL_SIZE];
};
struct tySequence__MlAD6nAPq9bHKla9cWiIZP0g {
TGenericSeq Sup;
tyTuple__awOivLjlO76sGdHY7nQUjQ data[SEQ_DECL_SIZE];
};
struct tySequence__oLpBKXzW3hF9aCVMo5EymfQ {
TGenericSeq Sup;
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* data[SEQ_DECL_SIZE];
};
struct tySequence__4eRCaZmrYLLw2k30GPTiMw {
TGenericSeq Sup;
tyTuple__QeWl6B6ffS4pU6WWrtcrDw data[SEQ_DECL_SIZE];
};
struct tySequence__SFipDZIkFtPcrLs0AGBBjQ {
TGenericSeq Sup;
tyTuple__8ZxhPt1NwfElsJs8zUSV9bg data[SEQ_DECL_SIZE];
};
struct tySequence__ZkxkVxJvB9aqet9cfVQmFTZw {
TGenericSeq Sup;
tyTuple__m8l9a4rYFktlUTIniXgnvog data[SEQ_DECL_SIZE];
};
struct tySequence__72hOjuY2LKiowAwLCg19a9bA {
TGenericSeq Sup;
tyTuple__r1NtfsBxxsYs1cV48P1DyA data[SEQ_DECL_SIZE];
};
static N_INLINE(void, nimZeroMem)(void* p, NI size);
static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size);
N_LIB_PRIVATE N_NIMCALL(void, getGithubAuth__nimblepkgZpublish_41)(tyObject_Options__LR5gStV09bAFaOqz9agkkZxQ* o, tyObject_Auth__BHbQxO9bMmttlUd9bhNwob7Q* Result);
N_LIB_PRIVATE N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size);
N_LIB_PRIVATE N_NIMCALL(tyObject_SslContextcolonObjectType___nNdejAl9bbVbX7sP6RJ4h0w*, newSSLContext__nimblepkgZtools_185)(NIM_BOOL disabled);
N_LIB_PRIVATE N_NIMCALL(tyObject_HttpClientBasecolonObjectType___UPZdfed89aNSioeMjzFgefA*, newHttpClient__pureZhttpclient_751)(NimStringDesc* userAgent, NI maxRedirects, tyObject_SslContextcolonObjectType___nNdejAl9bbVbX7sP6RJ4h0w* sslContext, tyObject_ProxycolonObjectType___CigKkL8U2DnJdbYRi9aI9aoQ* proxy, NI timeout, tyObject_HttpHeaderscolonObjectType___GM611pWlOrQ7hvMPcuAACA* headers);
N_LIB_PRIVATE N_NIMCALL(tyObject_ProxycolonObjectType___CigKkL8U2DnJdbYRi9aI9aoQ*, getProxy__nimblepkgZoptions_2177)(tyObject_Options__LR5gStV09bAFaOqz9agkkZxQ* options);
N_LIB_PRIVATE N_NIMCALL(tyObject_HttpHeaderscolonObjectType___GM611pWlOrQ7hvMPcuAACA*, newHttpHeaders__pureZhttpcore_114)(NIM_BOOL titleCase);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, existsEnv__pureZos_426)(NimStringDesc* key);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, getEnv__pureZos_421)(NimStringDesc* key, NimStringDesc* default_0);
N_LIB_PRIVATE N_NIMCALL(void, display__nimblepkgZcli_156)(NimStringDesc* category, NimStringDesc* msg, tyEnum_DisplayType__HypVeg1P09aXzPaqyobO7xA displayType, tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ priority);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
static N_INLINE(NimStringDesc*, slash___pureZos_121)(NimStringDesc* head, NimStringDesc* tail);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nosjoinPath)(NimStringDesc* head, NimStringDesc* tail);
static N_INLINE(void, nimFrame)(TFrame* s);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_3527)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuStrip)(NimStringDesc* s, NIM_BOOL leading, NIM_BOOL trailing, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw chars);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, readFile__stdZsyncio_472)(NimStringDesc* filename);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
static N_INLINE(void, copyMem__system_1727)(void* dest, void* source, NI size);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
static N_INLINE(void, popSafePoint)(void);
static N_INLINE(TFrame*, getFrame)(void);
static N_INLINE(void, setFrame)(TFrame* s);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isObj)(TNimType* obj, TNimType* subclass);
static N_INLINE(Exception*, nimBorrowCurrentException)(void);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, requestNewToken__nimblepkgZpublish_36)(tyObject_Config__4CDaXnHluuDhjlvHrDG8RA* cfg);
N_LIB_PRIVATE N_NIMCALL(void, nossleep)(NI milsecs);
N_LIB_PRIVATE N_NIMCALL(void, openDefaultBrowser__pureZbrowsers_13)(NimStringDesc* url);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, promptCustom__nimblepkgZcli_713)(NimStringDesc* question, NimStringDesc* default_0);
N_LIB_PRIVATE N_NIMCALL(void, writeFile__stdZsyncio_477)(NimStringDesc* filename, NimStringDesc* content);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
static N_INLINE(void, popCurrentException)(void);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incRef__system_5898)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
static N_INLINE(NI, pluspercent___system_696)(NI x, NI y);
static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5860)(void* usr);
static N_INLINE(NI, minuspercent___system_716)(NI x, NI y);
static N_INLINE(void, decRef__system_5905)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y);
static N_INLINE(void, rtlAddZCT__system_5903)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
N_LIB_PRIVATE N_NOINLINE(void, addZCT__system_5854)(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w* s, tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
N_LIB_PRIVATE N_NIMCALL(void, reraiseException)(void);
N_LIB_PRIVATE N_NIMCALL(void, createHeaders__nimblepkgZpublish_25)(tyObject_Auth__BHbQxO9bMmttlUd9bhNwob7Q a);
N_LIB_PRIVATE N_NIMCALL(tyObject_HttpHeaderscolonObjectType___GM611pWlOrQ7hvMPcuAACA*, newHttpHeaders__pureZhttpcore_1618)(tyTuple__UV3llMMYFckfui8YMBuUZA* keyValuePairs, NI keyValuePairsLen_0, NIM_BOOL titleCase);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuFormatSingleElem)(NimStringDesc* formatstr, NimStringDesc* a);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, parseJson__pureZjson_5292)(NimStringDesc* buffer, NIM_BOOL rawIntegers, NIM_BOOL rawFloats);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, getContent__nimblepkgZdownload_2194)(tyObject_HttpClientBasecolonObjectType___UPZdfed89aNSioeMjzFgefA* client, NimStringDesc* url);
static N_INLINE(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, X5BX5D___pureZjson_3069)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node, NimStringDesc* name);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__stdZassertions_56)(NimStringDesc* msg);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q**, X5BX5D___pureZjson_2663)(tyObject_OrderedTable__ZZvSdVkA2s2sIyifu4cpkg* t, NimStringDesc* key);
N_LIB_PRIVATE N_NOINLINE(void, raiseFieldError2)(NimStringDesc* f, NimStringDesc* discVal);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, reprDiscriminant)(NI e, TNimType* typ);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, getNimbleUserTempDir__nimblepkgZtools_122)(void);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, forkExists__nimblepkgZpublish_55)(tyObject_Auth__BHbQxO9bMmttlUd9bhNwob7Q a);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isCorrectFork__nimblepkgZpublish_52)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* j);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, getBool__pureZjson_185)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* n, NIM_BOOL default_0);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, X7BX7D___pureZjson_3602)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node, NimStringDesc* key);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, getStr__pureZjson_144)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* n, NimStringDesc* default_0);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(NIM_BOOL, equalMem__system_1735)(void* a, void* b, NI size);
static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size);
N_LIB_PRIVATE N_NIMCALL(void, createFork__nimblepkgZpublish_64)(tyObject_Auth__BHbQxO9bMmttlUd9bhNwob7Q a);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, postContent__nimblepkgZpublish_66)(tyObject_HttpClientBasecolonObjectType___UPZdfed89aNSioeMjzFgefA* client, NimStringDesc* url, NimStringDesc* body, tyObject_MultipartDatacolonObjectType___pa59bn7R9cBmjUm9clF5koL7g* multipart);
N_LIB_PRIVATE N_NIMCALL(tyObject_NimbleError__6rmfqzY5PO7blXdlEs8gjQ*, nimbleError__nimblepkgZcommon_26)(NimStringDesc* msg, NimStringDesc* hint, tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA* details);
N_LIB_PRIVATE N_NIMCALL(void, raiseExceptionEx)(Exception* e, NCSTRING ename, NCSTRING procname, NCSTRING filename, NI line);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nosdirExists)(NimStringDesc* dir);
N_LIB_PRIVATE N_NIMCALL(void, nosremoveDir)(NimStringDesc* dir, NIM_BOOL checkDir);
N_LIB_PRIVATE N_NIMCALL(void, noscreateDir)(NimStringDesc* dir);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nosgetCurrentDir)(void);
static N_INLINE(void, setCurrentDir__pureZos_741)(NimStringDesc* newDir);
static N_INLINE(NCSTRING, nimToCStringConv)(NimStringDesc* s);
N_LIB_PRIVATE N_NOINLINE(void, raiseOSError__pureZos_405)(NI32 errorCode, NimStringDesc* additionalInfo);
N_LIB_PRIVATE N_NIMCALL(NI32, osLastError__pureZos_408)(void);
N_LIB_PRIVATE N_NIMCALL(void, doCmd__nimblepkgZtools_22)(NimStringDesc* cmd);
N_LIB_PRIVATE N_NIMCALL(void, nimLeaveFinally)(void);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nosfileExists)(NimStringDesc* filename);
N_LIB_PRIVATE N_NIMCALL(void, doCmdEx__nimblepkgZtools_29)(NimStringDesc* cmd, tyTuple__XOVT24GHXwqiEj5GCsEGCA* Result);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, nsuEndsWith)(NimStringDesc* s, NimStringDesc* suffix);
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i, NI64 a, NI64 b);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, setLengthStr)(NimStringDesc* s, NI newLen);
N_LIB_PRIVATE N_NIMCALL(void, parseUri__pureZuri_209)(NimStringDesc* uri, tyObject_Uri__j49bukNPrq747O1GRd4Ng9bQ* Result);
N_LIB_PRIVATE N_NIMCALL(void, userAborted__nimblepkgZpublish_24)(void);
N_LIB_PRIVATE N_NIMCALL(void, editJson__nimblepkgZpublish_151)(tyObject_PackageInfo__y9ahmwzrCcWrfsrJgR1q4lw* p, NimStringDesc* url, NimStringDesc* tags, NimStringDesc* downloadMethod);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, parseFile__pureZjson_5297)(NimStringDesc* filename);
N_LIB_PRIVATE N_NIMCALL(void, add__pureZjson_228)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* father, tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* child);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___pureZjson_1831)(tyTuple__jq7X5k7hWG0tdTZTDkiyGQ* keyVals, NI keyValsLen_0);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___pureZjson_1802)(NimStringDesc* s);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___nimblepkgZpublish_107)(NimStringDesc** s, NI sLen_0);
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, newJArray__pureZjson_120)(void);
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i, NI n);
N_LIB_PRIVATE N_NIMCALL(tySequence__sM4lkSb7zS6F7OVMvW9cffQ*, nsuSplitCharSet)(NimStringDesc* s, tySet_tyChar__nmiMWKVIe46vacnhAFrQvw seps, NI maxsplit);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, cleanupWhitespace__nimblepkgZpublish_114)(NimStringDesc* s);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
static N_INLINE(NIM_CHAR*, X5BX5D___system_8349)(NimStringDesc** s, NI i);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, pretty__pureZjson_4514)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node, NI indent);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, format__nimblepkgZpublish_216)(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* dt);
N_LIB_PRIVATE N_NIMCALL(void, utc__pureZtimes_1554)(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q t, tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw* Result);
N_LIB_PRIVATE N_NIMCALL(tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q, getTime__pureZtimes_1024)(void);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, createPullRequest__nimblepkgZpublish_94)(tyObject_Auth__BHbQxO9bMmttlUd9bhNwob7Q a, NimStringDesc* packageName, NimStringDesc* branch);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nsuFormatOpenArray)(NimStringDesc* formatstr, NimStringDesc** a, NI aLen_0);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_2, "Nim httpclient/1.7.1", 20);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_3, "NIMBLE_GITHUB_API_TOKEN", 23);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_4, "Info:", 5);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_5, "Using the \'NIMBLE_GITHUB_API_TOKEN\' environment variable for the GitHub API Token.", 82);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_7, "github_api_token", 16);
static NIM_CONST tySet_tyChar__nmiMWKVIe46vacnhAFrQvw TM__1xecg8IpX44AZWJSOKndVQ_8 = {
0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_9, "Using GitHub API Token in file: ", 32);
extern TNimType NTIioerror__iLZrPn9anoh9ad1MmO0RczFw_;
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_10, "Please create a new personal access token on Github in order to allow Nimble to fork the packages repository.", 109);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_11, "Hint:", 5);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_12, "Make sure to give the access token access to public repos (public_repo scope)!", 78);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_13, "Your default browser should open with the following URL: https://github.com/settings/tokens/new", 95);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_14, "https://github.com/settings/tokens/new", 38);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_15, "Personal access token\?", 22);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_16, "Writing access token to file:", 29);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_17, "Authorization", 13);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_18, "token $1", 8);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_20, "Content-Type", 12);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_21, "application/x-www-form-urlencoded", 33);
static NIM_CONST tyTuple__UV3llMMYFckfui8YMBuUZA TM__1xecg8IpX44AZWJSOKndVQ_19 = {((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_20),
((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_21)}
;
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_23, "Accept", 6);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_24, "*/*", 3);
static NIM_CONST tyTuple__UV3llMMYFckfui8YMBuUZA TM__1xecg8IpX44AZWJSOKndVQ_22 = {((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_23),
((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_24)}
;
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_25, "https://api.github.com/user", 27);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_26, "/home/yyoncho/Sources/nim/Nim/lib/pure/json.nim(512, 9) `not isNil(node)` ", 74);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_27, "/home/yyoncho/Sources/nim/Nim/lib/pure/json.nim(513, 9) `node.kind == JObject` ", 79);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_28, "field \'fields\' is not accessible for type \'JsonNodeObj\' using \'kind = ", 70);
extern TNimType NTIjsonnodekind__RUngo7nCHe6O8aBGIcrhtg_;
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_29, "login", 5);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_30, "field \'str\' is not accessible for type \'JsonNodeObj\' using \'kind = ", 67);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_31, "Success:", 8);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_32, "Verified as ", 12);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_33, "nimble-packages-fork", 20);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_35, "https://api.github.com/repos/", 29);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_36, "/packages", 9);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_37, "fork", 4);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_38, "parent", 6);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_39, "full_name", 9);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_40, "nim-lang/packages", 17);
extern TNimType NTIjsonparsingerror__XTejXaID1NT7KS9byQm3Jxg_;
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_42, "https://api.github.com/repos/nim-lang/packages/forks", 52);
extern TNimType NTIhttprequesterror__L1L9b70HFrKWeYV59a3EWeaA_;
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_43, "Unable to create fork. Access token might not have enough permissions.", 70);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_44, "Waiting 10s to let Github create a fork", 39);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_45, "Finished waiting", 16);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_46, "Removing", 8);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_47, "old packages fork git directory.", 32);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_49, "Copying", 7);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_50, "packages fork into: ", 20);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_51, "git init", 8);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_52, "git checkout -b master", 22);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_53, "git pull https://github.com/", 28);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_54, "Updating", 8);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_55, "the fork", 8);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_56, "git pull https://github.com/nim-lang/packages.git master", 56);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_57, "git push https://", 17);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_58, "@github.com/", 12);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_59, "/packages master", 16);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_60, "Cannot find nimble-packages-fork git repository. Cloning failed.", 64);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_61, "packages.json", 13);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_62, "No packages file found in cloned fork.", 38);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_63, ".git", 4);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_64, "git ls-remote --get-url", 23);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_66, "git", 3);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_67, "ssh://", 6);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_68, "https://", 8);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_69, "/", 1);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_70, "Cannot publish the repository URL because it contains username and/or password. Fix the remote URL. Hint: \"git remote -v\"", 121);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_71, ".hg", 3);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_72, "hg", 2);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_73, "No .git nor .hg directory found. Stopping.", 42);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_74, "Github URL of ", 14);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_75, "\?", 1);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_76, "User aborted the process.", 25);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_77, "Whitespace separated list of tags\? (For example: web library wrapper)", 69);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_79, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim(147, 12) `contents.kind == JArray` ", 94);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_80, "name", 4);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_81, "url", 3);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_82, "method", 6);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_83, "tags", 4);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_85, "description", 11);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_86, "license", 7);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_87, "web", 3);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_99, "add-", 4);
extern TNimType NTIdatetime__d9cK9cyKZPJJxFXUmx8dSpPw_;
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_100, "git checkout -B ", 16);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_101, "git commit packages.json -m \"Added package ", 43);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_102, "\"", 1);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_103, "Pushing", 7);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_104, "to remote of fork.", 18);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_105, "/packages ", 10);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_106, "Info", 4);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_107, "Creating PR", 11);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_108, "https://api.github.com/repos/nim-lang/packages/pulls", 52);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_109, "{\"title\": \"Add package $1\", \"head\": \"$2:$3\",\012 \"base\": \"$4\"}", 73);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_110, "master", 6);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_111, "html_url", 8);
STRING_LITERAL(TM__1xecg8IpX44AZWJSOKndVQ_112, "Pull request successful, check at ", 34);
extern NIM_THREADVAR TSafePoint* excHandler__system_3095;
extern NIM_THREADVAR TSafePoint* excHandler__system_3095;
extern NIM_THREADVAR TFrame* framePtr__system_3094;
extern NIM_THREADVAR TFrame* framePtr__system_3094;
extern NIM_THREADVAR TFrame* framePtr__system_3094;
extern NIM_THREADVAR TFrame* framePtr__system_3094;
extern NIM_THREADVAR TFrame* framePtr__system_3094;
extern NIM_THREADVAR TFrame* framePtr__system_3094;
extern NIM_THREADVAR TSafePoint* excHandler__system_3095;
extern NIM_THREADVAR TSafePoint* excHandler__system_3095;
extern NIM_THREADVAR TFrame* framePtr__system_3094;
extern NIM_THREADVAR TFrame* framePtr__system_3094;
extern NIM_THREADVAR Exception* currException__system_3096;
extern NIM_THREADVAR Exception* currException__system_3096;
extern NIM_THREADVAR Exception* currException__system_3096;
extern NIM_THREADVAR tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ gch__system_5793;
static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size) {
void* T1_;
T1_ = (void*)0;
T1_ = memset(a, v, ((size_t) (size)));
}
static N_INLINE(void, nimZeroMem)(void* p, NI size) {
nimSetMem__systemZmemory_7(p, ((int) 0), size);
}
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size) {
void* T1_;
T1_ = (void*)0;
T1_ = memcpy(dest, source, ((size_t) (size)));
}
static N_INLINE(void, pushSafePoint)(TSafePoint* s) {
(*s).prev = excHandler__system_3095;
excHandler__system_3095 = s;
}
static N_INLINE(void, nimFrame)(TFrame* s) {
{
if (!(framePtr__system_3094 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s).calldepth = ((NI16) 0);
}
goto LA1_;
LA3_: ;
{
(*s).calldepth = (NI16)((*framePtr__system_3094).calldepth + ((NI16) 1));
}
LA1_: ;
(*s).prev = framePtr__system_3094;
framePtr__system_3094 = s;
{
if (!((*s).calldepth == ((NI16) 2000))) goto LA8_;
callDepthLimitReached__system_3527();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_3094 = (*framePtr__system_3094).prev;
}
static N_INLINE(NimStringDesc*, slash___pureZos_121)(NimStringDesc* head, NimStringDesc* tail) {
NimStringDesc* result;
nimfr_("/", "/home/yyoncho/Sources/nim/Nim/lib/pure/os.nim");
result = NIM_NIL;
nimln_(237, "/home/yyoncho/Sources/nim/Nim/lib/pure/os.nim");
result = nosjoinPath(head, tail);
popFrame();
return result;
}
static N_INLINE(void, copyMem__system_1727)(void* dest, void* source, NI size) {
nimCopyMem(dest, source, size);
}
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src) {
{
if (!!((src == ((NimStringDesc*) NIM_NIL)))) goto LA3_;
copyMem__system_1727(((void*) ((&(*dest).data[(*dest).Sup.len]))), ((void*) ((*src).data)), ((NI) ((NI)((*src).Sup.len + ((NI) 1)))));
(*dest).Sup.len += (*src).Sup.len;
}
LA3_: ;
}
static N_INLINE(void, popSafePoint)(void) {
excHandler__system_3095 = (*excHandler__system_3095).prev;
}
static N_INLINE(TFrame*, getFrame)(void) {
TFrame* result;
result = (TFrame*)0;
result = framePtr__system_3094;
return result;
}
static N_INLINE(void, setFrame)(TFrame* s) {
framePtr__system_3094 = s;
}
static N_INLINE(Exception*, nimBorrowCurrentException)(void) {
Exception* result;
nimfr_("nimBorrowCurrentException", "/home/yyoncho/Sources/nim/Nim/lib/system.nim");
result = NIM_NIL;
nimln_(2436, "/home/yyoncho/Sources/nim/Nim/lib/system.nim");
result = currException__system_3096;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, requestNewToken__nimblepkgZpublish_36)(tyObject_Config__4CDaXnHluuDhjlvHrDG8RA* cfg) {
NimStringDesc* result;
NimStringDesc* token;
NimStringDesc* T1_;
NimStringDesc* tokenWritePath;
NimStringDesc* T2_;
nimfr_("requestNewToken", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{ result = NIM_NIL;
nimln_(36, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
display__nimblepkgZcli_156(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_4), ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_10), ((tyEnum_DisplayType__HypVeg1P09aXzPaqyobO7xA) 4), ((tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ) 3));
nimln_(39, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
display__nimblepkgZcli_156(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_11), ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_12), ((tyEnum_DisplayType__HypVeg1P09aXzPaqyobO7xA) 1), ((tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ) 3));
nimln_(41, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
nossleep(((NI) 5000));
nimln_(42, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
display__nimblepkgZcli_156(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_4), ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_13), ((tyEnum_DisplayType__HypVeg1P09aXzPaqyobO7xA) 4), ((tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ) 3));
nimln_(44, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
nossleep(((NI) 3000));
nimln_(45, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
openDefaultBrowser__pureZbrowsers_13(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_14));
nimln_(46, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T1_ = NIM_NIL;
T1_ = promptCustom__nimblepkgZcli_713(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_15), ((NimStringDesc*) NIM_NIL));
token = nsuStrip(T1_, NIM_TRUE, NIM_TRUE, TM__1xecg8IpX44AZWJSOKndVQ_8);
nimln_(48, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
tokenWritePath = slash___pureZos_121((*cfg).nimbleDir, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_7));
nimln_(49, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T2_ = NIM_NIL;
T2_ = rawNewString((tokenWritePath ? tokenWritePath->Sup.len : 0) + 29);
appendString(T2_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_16));
appendString(T2_, tokenWritePath);
display__nimblepkgZcli_156(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_4), T2_, ((tyEnum_DisplayType__HypVeg1P09aXzPaqyobO7xA) 4), ((tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ) 3));
nimln_(51, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
writeFile__stdZsyncio_477(tokenWritePath, token);
nimln_(52, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
nossleep(((NI) 3000));
nimln_(53, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
result = copyString(token);
goto BeforeRet_;
}BeforeRet_: ;
popFrame();
return result;
}
static N_INLINE(NI, pluspercent___system_696)(NI x, NI y) {
NI result;
nimfr_("+%", "/home/yyoncho/Sources/nim/Nim/lib/system/arithmetics.nim");
result = (NI)0;
nimln_(403, "/home/yyoncho/Sources/nim/Nim/lib/system/arithmetics.nim");
nimln_(407, "/home/yyoncho/Sources/nim/Nim/lib/system/arithmetics.nim");
result = ((NI) ((NU)((NU64)(((NU) (x))) + (NU64)(((NU) (y))))));
popFrame();
return result;
}
static N_INLINE(void, incRef__system_5898)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
nimfr_("incRef", "/home/yyoncho/Sources/nim/Nim/lib/system/gc.nim");
nimln_(231, "/home/yyoncho/Sources/nim/Nim/lib/system/gc.nim");
(*c).refcount = pluspercent___system_696((*c).refcount, ((NI) 8));
popFrame();
}
static N_INLINE(NI, minuspercent___system_716)(NI x, NI y) {
NI result;
nimfr_("-%", "/home/yyoncho/Sources/nim/Nim/lib/system/arithmetics.nim");
result = (NI)0;
nimln_(414, "/home/yyoncho/Sources/nim/Nim/lib/system/arithmetics.nim");
nimln_(418, "/home/yyoncho/Sources/nim/Nim/lib/system/arithmetics.nim");
result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
popFrame();
return result;
}
static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5860)(void* usr) {
tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* result;
NI T1_;
nimfr_("usrToCell", "/home/yyoncho/Sources/nim/Nim/lib/system/gc.nim");
result = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
nimln_(177, "/home/yyoncho/Sources/nim/Nim/lib/system/gc.nim");
T1_ = (NI)0;
T1_ = minuspercent___system_716(((NI) (ptrdiff_t) (usr)), ((NI) 16));
result = ((tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*) (T1_));
popFrame();
return result;
}
static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y) {
NIM_BOOL result;
nimfr_("<%", "/home/yyoncho/Sources/nim/Nim/lib/system/comparisons.nim");
result = (NIM_BOOL)0;
nimln_(186, "/home/yyoncho/Sources/nim/Nim/lib/system/comparisons.nim");
nimln_(188, "/home/yyoncho/Sources/nim/Nim/lib/system/comparisons.nim");
result = ((NU64)(((NU) (x))) < (NU64)(((NU) (y))));
popFrame();
return result;
}
static N_INLINE(void, rtlAddZCT__system_5903)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
nimfr_("rtlAddZCT", "/home/yyoncho/Sources/nim/Nim/lib/system/gc.nim");
nimln_(243, "/home/yyoncho/Sources/nim/Nim/lib/system/gc.nim");
addZCT__system_5854((&gch__system_5793.zct), c);
popFrame();
}
static N_INLINE(void, decRef__system_5905)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
nimfr_("decRef", "/home/yyoncho/Sources/nim/Nim/lib/system/gc.nim");
nimln_(248, "/home/yyoncho/Sources/nim/Nim/lib/system/gc.nim");
(*c).refcount = minuspercent___system_716((*c).refcount, ((NI) 8));
nimln_(249, "/home/yyoncho/Sources/nim/Nim/lib/system/gc.nim");
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = ltpercent___system_1005((*c).refcount, ((NI) 8));
if (!T3_) goto LA4_;
nimln_(250, "/home/yyoncho/Sources/nim/Nim/lib/system/gc.nim");
rtlAddZCT__system_5903(c);
}
LA4_: ;
popFrame();
}
static N_INLINE(void, asgnRef)(void** dest, void* src) {
nimfr_("asgnRef", "/home/yyoncho/Sources/nim/Nim/lib/system/gc.nim");
nimln_(286, "/home/yyoncho/Sources/nim/Nim/lib/system/gc.nim");
{
tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T5_;
if (!!((src == NIM_NIL))) goto LA3_;
T5_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
T5_ = usrToCell__system_5860(src);
incRef__system_5898(T5_);
}
LA3_: ;
nimln_(287, "/home/yyoncho/Sources/nim/Nim/lib/system/gc.nim");
{
tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T10_;
if (!!(((*dest) == NIM_NIL))) goto LA8_;
T10_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
T10_ = usrToCell__system_5860((*dest));
decRef__system_5905(T10_);
}
LA8_: ;
nimln_(288, "/home/yyoncho/Sources/nim/Nim/lib/system/gc.nim");
(*dest) = src;
popFrame();
}
static N_INLINE(void, popCurrentException)(void) {
asgnRef((void**) (&currException__system_3096), (*currException__system_3096).up);
}
N_LIB_PRIVATE N_NIMCALL(void, createHeaders__nimblepkgZpublish_25)(tyObject_Auth__BHbQxO9bMmttlUd9bhNwob7Q a) {
tyArray__0ipey9aZuUA8jy4OAHzODQg T1_;
nimfr_("createHeaders", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
nimln_(29, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
nimZeroMem((void*)T1_, sizeof(tyArray__0ipey9aZuUA8jy4OAHzODQg));
T1_[0].Field0 = copyString(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_17));
nimln_(30, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T1_[0].Field1 = nsuFormatSingleElem(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_18), a.token);
T1_[1].Field0 = copyString(TM__1xecg8IpX44AZWJSOKndVQ_19.Field0);
T1_[1].Field1 = copyString(TM__1xecg8IpX44AZWJSOKndVQ_19.Field1);
T1_[2].Field0 = copyString(TM__1xecg8IpX44AZWJSOKndVQ_22.Field0);
T1_[2].Field1 = copyString(TM__1xecg8IpX44AZWJSOKndVQ_22.Field1);
nimln_(29, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
asgnRef((void**) (&(*a.http).headers), newHttpHeaders__pureZhttpcore_1618(T1_, 3, NIM_FALSE));
popFrame();
}
static N_INLINE(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, X5BX5D___pureZjson_3069)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* node, NimStringDesc* name) {
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q** T9_;
nimfr_("[]", "/home/yyoncho/Sources/nim/Nim/lib/pure/json.nim");
result = NIM_NIL;
nimln_(512, "/home/yyoncho/Sources/nim/Nim/lib/pure/json.nim");
{
if (!!(!((node == 0)))) goto LA3_;
failedAssertImpl__stdZassertions_56(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_26));
}
LA3_: ;
nimln_(513, "/home/yyoncho/Sources/nim/Nim/lib/pure/json.nim");
{
if (!!(((*node).kind == ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 5)))) goto LA7_;
failedAssertImpl__stdZassertions_56(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_27));
}
LA7_: ;
nimln_(516, "/home/yyoncho/Sources/nim/Nim/lib/pure/json.nim");
if (!(((32 &((NU8)1<<((NU)((*node).kind)&7U)))!=0))) { raiseFieldError2(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_28), reprDiscriminant(((NI)(*node).kind) + (NI)IL64(0), (&NTIjsonnodekind__RUngo7nCHe6O8aBGIcrhtg_))); }
T9_ = (tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q**)0;
T9_ = X5BX5D___pureZjson_2663((&(*node)._kind_6.fields), name);
result = (*T9_);
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, getGithubAuth__nimblepkgZpublish_41)(tyObject_Options__LR5gStV09bAFaOqz9agkkZxQ* o, tyObject_Auth__BHbQxO9bMmttlUd9bhNwob7Q* Result) {
tyObject_Config__4CDaXnHluuDhjlvHrDG8RA cfg;
tyObject_SslContextcolonObjectType___nNdejAl9bbVbX7sP6RJ4h0w* ctx;
tyObject_ProxycolonObjectType___CigKkL8U2DnJdbYRi9aI9aoQ* T1_;
tyObject_HttpHeaderscolonObjectType___GM611pWlOrQ7hvMPcuAACA* T2_;
TFrame* _nimCurFrame;
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* resp;
NimStringDesc* T13_;
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T14_;
NimStringDesc* T15_;
nimfr_("getGithubAuth", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
_nimCurFrame = getFrame();
unsureAsgnRef((void**)&(*Result).user, NIM_NIL);
unsureAsgnRef((void**)&(*Result).token, NIM_NIL);
unsureAsgnRef((void**)&(*Result).http, NIM_NIL);
nimZeroMem((void*)(&cfg), sizeof(tyObject_Config__4CDaXnHluuDhjlvHrDG8RA));
nimln_(56, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
nimCopyMem((void*)(&cfg), (NIM_CONST void*)(&(*o).config), sizeof(cfg));
nimln_(57, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
ctx = newSSLContext__nimblepkgZtools_185((*o).disableSslCertCheck);
nimln_(58, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T1_ = NIM_NIL;
T1_ = getProxy__nimblepkgZoptions_2177(o);
nimln_(586, "/home/yyoncho/Sources/nim/Nim/lib/pure/httpclient.nim");
T2_ = NIM_NIL;
T2_ = newHttpHeaders__pureZhttpcore_114(NIM_FALSE);
nimln_(58, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
unsureAsgnRef((void**) (&(*Result).http), newHttpClient__pureZhttpclient_751(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_2), ((NI) 5), ctx, T1_, ((NI) -1), T2_));
nimln_(60, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
NIM_BOOL T5_;
T5_ = (NIM_BOOL)0;
T5_ = existsEnv__pureZos_426(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_3));
if (!T5_) goto LA6_;
nimln_(61, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
unsureAsgnRef((void**) (&(*Result).token), getEnv__pureZos_421(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_3), ((NimStringDesc*) NIM_NIL)));
nimln_(62, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
display__nimblepkgZcli_156(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_4), ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_5), ((tyEnum_DisplayType__HypVeg1P09aXzPaqyobO7xA) 4), ((tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ) 3));
}
goto LA3_;
LA6_: ;
{
TSafePoint TM__1xecg8IpX44AZWJSOKndVQ_6;
NimStringDesc* apiTokenFilePath;
NimStringDesc* T9_;
NimStringDesc* T10_;
nimln_(67, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
pushSafePoint(&TM__1xecg8IpX44AZWJSOKndVQ_6);
TM__1xecg8IpX44AZWJSOKndVQ_6.status = setjmp(TM__1xecg8IpX44AZWJSOKndVQ_6.context);
if (TM__1xecg8IpX44AZWJSOKndVQ_6.status == 0) {
nimln_(68, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
apiTokenFilePath = slash___pureZos_121(cfg.nimbleDir, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_7));
nimln_(69, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T9_ = NIM_NIL;
T9_ = readFile__stdZsyncio_472(apiTokenFilePath);
unsureAsgnRef((void**) (&(*Result).token), nsuStrip(T9_, NIM_TRUE, NIM_TRUE, TM__1xecg8IpX44AZWJSOKndVQ_8));
nimln_(70, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T10_ = NIM_NIL;
T10_ = rawNewString((apiTokenFilePath ? apiTokenFilePath->Sup.len : 0) + 32);
appendString(T10_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_9));
appendString(T10_, apiTokenFilePath);
display__nimblepkgZcli_156(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_4), T10_, ((tyEnum_DisplayType__HypVeg1P09aXzPaqyobO7xA) 4), ((tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ) 3));
popSafePoint();
}
else {
popSafePoint();
setFrame(_nimCurFrame);
if (isObj(nimBorrowCurrentException()->Sup.m_type, (&NTIioerror__iLZrPn9anoh9ad1MmO0RczFw_))) {
TM__1xecg8IpX44AZWJSOKndVQ_6.status = 0;
nimln_(73, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
unsureAsgnRef((void**) (&(*Result).token), requestNewToken__nimblepkgZpublish_36((&cfg)));
popCurrentException();
}
}
if (TM__1xecg8IpX44AZWJSOKndVQ_6.status != 0) reraiseException();
}
LA3_: ;
nimln_(74, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
createHeaders__nimblepkgZpublish_25((*Result));
nimln_(75, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T13_ = NIM_NIL;
T13_ = getContent__nimblepkgZdownload_2194((*Result).http, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_25));
resp = parseJson__pureZjson_5292(T13_, NIM_FALSE, NIM_FALSE);
nimln_(77, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T14_ = NIM_NIL;
T14_ = X5BX5D___pureZjson_3069(resp, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_29));
if (!(((16 &((NU8)1<<((NU)((*T14_).kind)&7U)))!=0))) { raiseFieldError2(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_30), reprDiscriminant(((NI)(*T14_).kind) + (NI)IL64(0), (&NTIjsonnodekind__RUngo7nCHe6O8aBGIcrhtg_))); }
unsureAsgnRef((void**) (&(*Result).user), copyString((*T14_)._kind_1.str));
nimln_(78, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T15_ = NIM_NIL;
T15_ = rawNewString(((*Result).user ? (*Result).user->Sup.len : 0) + 12);
appendString(T15_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_32));
appendString(T15_, (*Result).user);
display__nimblepkgZcli_156(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_31), T15_, ((tyEnum_DisplayType__HypVeg1P09aXzPaqyobO7xA) 5), ((tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ) 3));
popFrame();
}
static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size) {
int result;
result = (int)0;
result = memcmp(a, b, ((size_t) (size)));
return result;
}
static N_INLINE(NIM_BOOL, equalMem__system_1735)(void* a, void* b, NI size) {
NIM_BOOL result;
int T1_;
result = (NIM_BOOL)0;
T1_ = (int)0;
T1_ = nimCmpMem(a, b, size);
result = (T1_ == ((NI32) 0));
return result;
}
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {
NIM_BOOL result;
NI alen;
NI blen;
nimfr_("eqStrings", "/home/yyoncho/Sources/nim/Nim/lib/system/strmantle.nim");
{ result = (NIM_BOOL)0;
nimln_(27, "/home/yyoncho/Sources/nim/Nim/lib/system/strmantle.nim");
alen = (a ? a->Sup.len : 0);
nimln_(28, "/home/yyoncho/Sources/nim/Nim/lib/system/strmantle.nim");
blen = (b ? b->Sup.len : 0);
nimln_(29, "/home/yyoncho/Sources/nim/Nim/lib/system/strmantle.nim");
{
if (!(alen == blen)) goto LA3_;
nimln_(30, "/home/yyoncho/Sources/nim/Nim/lib/system/strmantle.nim");
{
if (!(alen == ((NI) 0))) goto LA7_;
result = NIM_TRUE;
goto BeforeRet_;
}
LA7_: ;
nimln_(31, "/home/yyoncho/Sources/nim/Nim/lib/system/strmantle.nim");
result = equalMem__system_1735(((void*) ((&a->data[((NI) 0)]))), ((void*) ((&b->data[((NI) 0)]))), ((NI) (alen)));
goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, isCorrectFork__nimblepkgZpublish_52)(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* j) {
NIM_BOOL result;
nimfr_("isCorrectFork", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
result = (NIM_BOOL)0;
nimln_(82, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
result = NIM_FALSE;
nimln_(83, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T3_;
NIM_BOOL T4_;
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T7_;
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T8_;
NimStringDesc* T9_;
T3_ = NIM_NIL;
T3_ = X7BX7D___pureZjson_3602(j, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_37));
T4_ = (NIM_BOOL)0;
T4_ = getBool__pureZjson_185(T3_, NIM_FALSE);
if (!T4_) goto LA5_;
nimln_(84, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T7_ = NIM_NIL;
T7_ = X7BX7D___pureZjson_3602(j, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_38));
T8_ = NIM_NIL;
T8_ = X7BX7D___pureZjson_3602(T7_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_39));
T9_ = NIM_NIL;
T9_ = getStr__pureZjson_144(T8_, ((NimStringDesc*) NIM_NIL));
result = eqStrings(T9_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_40));
}
LA5_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, forkExists__nimblepkgZpublish_55)(tyObject_Auth__BHbQxO9bMmttlUd9bhNwob7Q a) {
NIM_BOOL volatile result;
TSafePoint TM__1xecg8IpX44AZWJSOKndVQ_34;
NimStringDesc* x;
NimStringDesc* T1_;
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* j;
TFrame* _nimCurFrame;
nimfr_("forkExists", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
_nimCurFrame = getFrame();
result = (NIM_BOOL)0;
nimln_(87, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
pushSafePoint(&TM__1xecg8IpX44AZWJSOKndVQ_34);
TM__1xecg8IpX44AZWJSOKndVQ_34.status = setjmp(TM__1xecg8IpX44AZWJSOKndVQ_34.context);
if (TM__1xecg8IpX44AZWJSOKndVQ_34.status == 0) {
nimln_(88, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T1_ = NIM_NIL;
T1_ = rawNewString((a.user ? a.user->Sup.len : 0) + 38);
appendString(T1_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_35));
appendString(T1_, a.user);
appendString(T1_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_36));
x = getContent__nimblepkgZdownload_2194(a.http, T1_);
nimln_(89, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
j = parseJson__pureZjson_5292(x, NIM_FALSE, NIM_FALSE);
nimln_(90, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
result = isCorrectFork__nimblepkgZpublish_52(j);
popSafePoint();
}
else {
popSafePoint();
setFrame(_nimCurFrame);
if (isObj(nimBorrowCurrentException()->Sup.m_type, (&NTIjsonparsingerror__XTejXaID1NT7KS9byQm3Jxg_))||isObj(nimBorrowCurrentException()->Sup.m_type, (&NTIioerror__iLZrPn9anoh9ad1MmO0RczFw_))) {
TM__1xecg8IpX44AZWJSOKndVQ_34.status = 0;
nimln_(92, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
result = NIM_FALSE;
popCurrentException();
}
}
if (TM__1xecg8IpX44AZWJSOKndVQ_34.status != 0) reraiseException();
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, createFork__nimblepkgZpublish_64)(tyObject_Auth__BHbQxO9bMmttlUd9bhNwob7Q a) {
TSafePoint TM__1xecg8IpX44AZWJSOKndVQ_41;
NimStringDesc* T1_;
TFrame* _nimCurFrame;
nimfr_("createFork", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
_nimCurFrame = getFrame();
nimln_(95, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
pushSafePoint(&TM__1xecg8IpX44AZWJSOKndVQ_41);
TM__1xecg8IpX44AZWJSOKndVQ_41.status = setjmp(TM__1xecg8IpX44AZWJSOKndVQ_41.context);
if (TM__1xecg8IpX44AZWJSOKndVQ_41.status == 0) {
nimln_(96, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T1_ = NIM_NIL;
T1_ = postContent__nimblepkgZpublish_66(a.http, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_42), ((NimStringDesc*) NIM_NIL), ((tyObject_MultipartDatacolonObjectType___pa59bn7R9cBmjUm9clF5koL7g*) NIM_NIL));
(void)(T1_);
popSafePoint();
}
else {
popSafePoint();
setFrame(_nimCurFrame);
if (isObj(nimBorrowCurrentException()->Sup.m_type, (&NTIhttprequesterror__L1L9b70HFrKWeYV59a3EWeaA_))) {
tyObject_NimbleError__6rmfqzY5PO7blXdlEs8gjQ* T4_;
TM__1xecg8IpX44AZWJSOKndVQ_41.status = 0;
nimln_(98, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T4_ = NIM_NIL;
T4_ = nimbleError__nimblepkgZcommon_26(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_43), ((NimStringDesc*) NIM_NIL), ((tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA*) NIM_NIL));
raiseExceptionEx((Exception*)T4_, "NimbleError", "createFork", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim", 98);
popCurrentException();
}
}
if (TM__1xecg8IpX44AZWJSOKndVQ_41.status != 0) reraiseException();
popFrame();
}
static N_INLINE(NCSTRING, nimToCStringConv)(NimStringDesc* s) {
NCSTRING result;
result = (NCSTRING)0;
{
NIM_BOOL T3_;
T3_ = (NIM_BOOL)0;
T3_ = (s == ((NimStringDesc*) NIM_NIL));
if (T3_) goto LA4_;
T3_ = ((*s).Sup.len == ((NI) 0));
LA4_: ;
if (!T3_) goto LA5_;
result = "";
}
goto LA1_;
LA5_: ;
{
result = ((NCSTRING) ((*s).data));
}
LA1_: ;
return result;
}
static N_INLINE(void, setCurrentDir__pureZos_741)(NimStringDesc* newDir) {
nimfr_("setCurrentDir", "/home/yyoncho/Sources/nim/Nim/lib/pure/os.nim");
nimln_(1435, "/home/yyoncho/Sources/nim/Nim/lib/pure/os.nim");
{
int T3_;
NI32 T6_;
T3_ = (int)0;
T3_ = chdir(nimToCStringConv(newDir));
if (!!((T3_ == ((NI32) 0)))) goto LA4_;
T6_ = (NI32)0;
T6_ = osLastError__pureZos_408();
raiseOSError__pureZos_405(T6_, newDir);
}
LA4_: ;
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(void, userAborted__nimblepkgZpublish_24)(void) {
tyObject_NimbleError__6rmfqzY5PO7blXdlEs8gjQ* T1_;
nimfr_("userAborted", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
nimln_(26, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T1_ = NIM_NIL;
T1_ = nimbleError__nimblepkgZcommon_26(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_76), ((NimStringDesc*) NIM_NIL), ((tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA*) NIM_NIL));
raiseExceptionEx((Exception*)T1_, "NimbleError", "userAborted", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim", 26);
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q*, percent___nimblepkgZpublish_107)(NimStringDesc** s, NI sLen_0) {
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* result;
nimfr_("%", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
result = NIM_NIL;
nimln_(110, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
result = newJArray__pureZjson_120();
{
NimStringDesc** x;
NI i;
x = (NimStringDesc**)0;
nimln_(11, "/home/yyoncho/Sources/nim/Nim/lib/system/iterators.nim");
i = ((NI) 0);
{
nimln_(12, "/home/yyoncho/Sources/nim/Nim/lib/system/iterators.nim");
while (1) {
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T4_;
NI TM__1xecg8IpX44AZWJSOKndVQ_84;
if (!(i < sLen_0)) goto LA3;
nimln_(111, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
if (i < 0 || i >= sLen_0){ raiseIndexError2(i,sLen_0-1); }
x = (&s[i]);
T4_ = NIM_NIL;
T4_ = percent___pureZjson_1802((*x));
add__pureZjson_228(result, T4_);
nimln_(14, "/home/yyoncho/Sources/nim/Nim/lib/system/iterators.nim");
if (nimAddInt(i, ((NI) 1), &TM__1xecg8IpX44AZWJSOKndVQ_84)) { raiseOverflow(); };
i = (NI)(TM__1xecg8IpX44AZWJSOKndVQ_84);
} LA3: ;
}
}
popFrame();
return result;
}
static N_INLINE(NIM_CHAR*, X5BX5D___system_8349)(NimStringDesc** s, NI i) {
NIM_CHAR* result;
NI TM__1xecg8IpX44AZWJSOKndVQ_98;
nimfr_("[]", "/home/yyoncho/Sources/nim/Nim/lib/system.nim");
result = (NIM_CHAR*)0;
nimln_(2671, "/home/yyoncho/Sources/nim/Nim/lib/system.nim");
if (nimSubInt(((*s) ? (*s)->Sup.len : 0), i, &TM__1xecg8IpX44AZWJSOKndVQ_98)) { raiseOverflow(); };
if ((NI)(TM__1xecg8IpX44AZWJSOKndVQ_98) < 0 || (NI)(TM__1xecg8IpX44AZWJSOKndVQ_98) >= ((*s) ? (*s)->Sup.len : 0)){ raiseIndexError2((NI)(TM__1xecg8IpX44AZWJSOKndVQ_98),((*s) ? (*s)->Sup.len : 0)-1); }
result = (&(*s)->data[(NI)(TM__1xecg8IpX44AZWJSOKndVQ_98)]);
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, cleanupWhitespace__nimblepkgZpublish_114)(NimStringDesc* s) {
NimStringDesc* result;
NI i;
nimfr_("cleanupWhitespace", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
result = NIM_NIL;
nimln_(115, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
if (((s ? s->Sup.len : 0)) < ((NI) 0) || ((s ? s->Sup.len : 0)) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI((s ? s->Sup.len : 0), ((NI) 0), ((NI) IL64(9223372036854775807))); }
result = rawNewString(((NI) ((s ? s->Sup.len : 0))));
nimln_(116, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
i = ((NI) 0);
{
nimln_(117, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
while (1) {
if (!(i < (s ? s->Sup.len : 0))) goto LA2;
nimln_(118, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
NI j;
NI TM__1xecg8IpX44AZWJSOKndVQ_88;
if (i < 0 || i >= (s ? s->Sup.len : 0)){ raiseIndexError2(i,(s ? s->Sup.len : 0)-1); }
if (!((NU8)(s->data[i]) == (NU8)(32))) goto LA5_;
nimln_(119, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
if (nimAddInt(i, ((NI) 1), &TM__1xecg8IpX44AZWJSOKndVQ_88)) { raiseOverflow(); };
j = (NI)(TM__1xecg8IpX44AZWJSOKndVQ_88);
{
nimln_(120, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
while (1) {
NI TM__1xecg8IpX44AZWJSOKndVQ_89;
if (j < 0 || j >= (s ? s->Sup.len : 0)){ raiseIndexError2(j,(s ? s->Sup.len : 0)-1); }
if (!((NU8)(s->data[j]) == (NU8)(32))) goto LA8;
if (nimAddInt(j, ((NI) 1), &TM__1xecg8IpX44AZWJSOKndVQ_89)) { raiseOverflow(); };
j = (NI)(TM__1xecg8IpX44AZWJSOKndVQ_89);
} LA8: ;
}
nimln_(121, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
NI TM__1xecg8IpX44AZWJSOKndVQ_90;
if (j < 0 || j >= (s ? s->Sup.len : 0)){ raiseIndexError2(j,(s ? s->Sup.len : 0)-1); }
if (!((NU8)(s->data[j]) == (NU8)(13))) goto LA11_;
nimln_(122, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
if (nimAddInt(j, ((NI) 1), &TM__1xecg8IpX44AZWJSOKndVQ_90)) { raiseOverflow(); };
j = (NI)(TM__1xecg8IpX44AZWJSOKndVQ_90);
nimln_(123, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
NI TM__1xecg8IpX44AZWJSOKndVQ_91;
if (j < 0 || j >= (s ? s->Sup.len : 0)){ raiseIndexError2(j,(s ? s->Sup.len : 0)-1); }
if (!((NU8)(s->data[j]) == (NU8)(10))) goto LA15_;
if (nimAddInt(j, ((NI) 1), &TM__1xecg8IpX44AZWJSOKndVQ_91)) { raiseOverflow(); };
j = (NI)(TM__1xecg8IpX44AZWJSOKndVQ_91);
}
LA15_: ;
nimln_(124, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
result = addChar(result, 10);
nimln_(125, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
i = j;
}
goto LA9_;
LA11_: ;
{
NI TM__1xecg8IpX44AZWJSOKndVQ_92;
nimln_(126, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
if (j < 0 || j >= (s ? s->Sup.len : 0)){ raiseIndexError2(j,(s ? s->Sup.len : 0)-1); }
if (!((NU8)(s->data[j]) == (NU8)(10))) goto LA18_;
nimln_(127, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
result = addChar(result, 10);
nimln_(128, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
if (nimAddInt(j, ((NI) 1), &TM__1xecg8IpX44AZWJSOKndVQ_92)) { raiseOverflow(); };
i = (NI)(TM__1xecg8IpX44AZWJSOKndVQ_92);
}
goto LA9_;
LA18_: ;
{
NI TM__1xecg8IpX44AZWJSOKndVQ_93;
nimln_(130, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
result = addChar(result, 32);
nimln_(131, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
if (nimAddInt(i, ((NI) 1), &TM__1xecg8IpX44AZWJSOKndVQ_93)) { raiseOverflow(); };
i = (NI)(TM__1xecg8IpX44AZWJSOKndVQ_93);
}
LA9_: ;
}
goto LA3_;
LA5_: ;
{
NI TM__1xecg8IpX44AZWJSOKndVQ_94;
nimln_(132, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
if (i < 0 || i >= (s ? s->Sup.len : 0)){ raiseIndexError2(i,(s ? s->Sup.len : 0)-1); }
if (!((NU8)(s->data[i]) == (NU8)(13))) goto LA22_;
nimln_(133, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
if (nimAddInt(i, ((NI) 1), &TM__1xecg8IpX44AZWJSOKndVQ_94)) { raiseOverflow(); };
i = (NI)(TM__1xecg8IpX44AZWJSOKndVQ_94);
nimln_(134, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
NI TM__1xecg8IpX44AZWJSOKndVQ_95;
if (i < 0 || i >= (s ? s->Sup.len : 0)){ raiseIndexError2(i,(s ? s->Sup.len : 0)-1); }
if (!((NU8)(s->data[i]) == (NU8)(10))) goto LA26_;
if (nimAddInt(i, ((NI) 1), &TM__1xecg8IpX44AZWJSOKndVQ_95)) { raiseOverflow(); };
i = (NI)(TM__1xecg8IpX44AZWJSOKndVQ_95);
}
LA26_: ;
nimln_(135, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
result = addChar(result, 10);
}
goto LA3_;
LA22_: ;
{
NI TM__1xecg8IpX44AZWJSOKndVQ_96;
nimln_(136, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
if (i < 0 || i >= (s ? s->Sup.len : 0)){ raiseIndexError2(i,(s ? s->Sup.len : 0)-1); }
if (!((NU8)(s->data[i]) == (NU8)(10))) goto LA29_;
nimln_(137, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
result = addChar(result, 10);
nimln_(138, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
if (nimAddInt(i, ((NI) 1), &TM__1xecg8IpX44AZWJSOKndVQ_96)) { raiseOverflow(); };
i = (NI)(TM__1xecg8IpX44AZWJSOKndVQ_96);
}
goto LA3_;
LA29_: ;
{
NI TM__1xecg8IpX44AZWJSOKndVQ_97;
nimln_(140, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
if (i < 0 || i >= (s ? s->Sup.len : 0)){ raiseIndexError2(i,(s ? s->Sup.len : 0)-1); }
result = addChar(result, s->data[i]);
nimln_(141, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
if (nimAddInt(i, ((NI) 1), &TM__1xecg8IpX44AZWJSOKndVQ_97)) { raiseOverflow(); };
i = (NI)(TM__1xecg8IpX44AZWJSOKndVQ_97);
}
LA3_: ;
} LA2: ;
}
nimln_(142, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
NIM_CHAR* T34_;
T34_ = (NIM_CHAR*)0;
T34_ = X5BX5D___system_8349((&result), ((NI) 1));
if (!!(((NU8)((*T34_)) == (NU8)(10)))) goto LA35_;
nimln_(143, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
result = addChar(result, 10);
}
LA35_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, editJson__nimblepkgZpublish_151)(tyObject_PackageInfo__y9ahmwzrCcWrfsrJgR1q4lw* p, NimStringDesc* url, NimStringDesc* tags, NimStringDesc* downloadMethod) {
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* contents;
tyArray__Xkn9cR0g9aWIRwE2cFDfN3nQ T5_;
tySequence__sM4lkSb7zS6F7OVMvW9cffQ* T6_;
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T7_;
NimStringDesc* T8_;
NimStringDesc* T9_;
nimfr_("editJson", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
nimln_(146, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
contents = parseFile__pureZjson_5297(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_61));
nimln_(147, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
if (!!(((*contents).kind == ((tyEnum_JsonNodeKind__RUngo7nCHe6O8aBGIcrhtg) 6)))) goto LA3_;
failedAssertImpl__stdZassertions_56(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_79));
}
LA3_: ;
nimln_(148, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
nimZeroMem((void*)T5_, sizeof(tyArray__Xkn9cR0g9aWIRwE2cFDfN3nQ));
T5_[0].Field0 = copyString(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_80));
nimln_(149, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T5_[0].Field1 = percent___pureZjson_1802((*p).basicInfo.Field0);
T5_[1].Field0 = copyString(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_81));
nimln_(150, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T5_[1].Field1 = percent___pureZjson_1802(url);
T5_[2].Field0 = copyString(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_82));
nimln_(151, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T5_[2].Field1 = percent___pureZjson_1802(downloadMethod);
T5_[3].Field0 = copyString(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_83));
nimln_(152, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T6_ = NIM_NIL;
T6_ = nsuSplitCharSet(tags, TM__1xecg8IpX44AZWJSOKndVQ_8, ((NI) -1));
T5_[3].Field1 = percent___nimblepkgZpublish_107(T6_->data, (T6_ ? T6_->Sup.len : 0));
T5_[4].Field0 = copyString(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_85));
nimln_(153, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T5_[4].Field1 = percent___pureZjson_1802((*p).description);
T5_[5].Field0 = copyString(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_86));
nimln_(154, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T5_[5].Field1 = percent___pureZjson_1802((*p).license);
T5_[6].Field0 = copyString(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_87));
nimln_(155, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T5_[6].Field1 = percent___pureZjson_1802(url);
nimln_(148, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T7_ = NIM_NIL;
T7_ = percent___pureZjson_1831(T5_, 7);
add__pureZjson_228(contents, T7_);
nimln_(157, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T8_ = NIM_NIL;
T8_ = pretty__pureZjson_4514(contents, ((NI) 2));
T9_ = NIM_NIL;
T9_ = cleanupWhitespace__nimblepkgZpublish_114(T8_);
writeFile__stdZsyncio_477(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_61), T9_);
popFrame();
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, createPullRequest__nimblepkgZpublish_94)(tyObject_Auth__BHbQxO9bMmttlUd9bhNwob7Q a, NimStringDesc* packageName, NimStringDesc* branch) {
NimStringDesc* result;
NimStringDesc* body;
tyArray__sMpvt1sOxOJ3LFGulnbeMQ T1_;
NimStringDesc* T2_;
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* pr;
tyObject_JsonNodeObj__df9bshXB7C9cTiWPIOtX3j1Q* T3_;
nimfr_("createPullRequest", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{ result = NIM_NIL;
nimln_(102, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
display__nimblepkgZcli_156(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_106), ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_107), ((tyEnum_DisplayType__HypVeg1P09aXzPaqyobO7xA) 4), ((tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ) 3));
nimln_(103, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
nimln_(105, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
nimZeroMem((void*)T1_, sizeof(tyArray__sMpvt1sOxOJ3LFGulnbeMQ));
T1_[0] = copyString(packageName);
T1_[1] = copyString(a.user);
T1_[2] = copyString(branch);
T1_[3] = copyString(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_110));
T2_ = NIM_NIL;
T2_ = nsuFormatOpenArray(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_109), T1_, 4);
nimln_(103, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
body = postContent__nimblepkgZpublish_66(a.http, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_108), T2_, ((tyObject_MultipartDatacolonObjectType___pa59bn7R9cBmjUm9clF5koL7g*) NIM_NIL));
nimln_(106, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
pr = parseJson__pureZjson_5292(body, NIM_FALSE, NIM_FALSE);
nimln_(107, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T3_ = NIM_NIL;
T3_ = X7BX7D___pureZjson_3602(pr, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_111));
result = getStr__pureZjson_144(T3_, ((NimStringDesc*) NIM_NIL));
goto BeforeRet_;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(void, publish__nimblepkgZpublish_200)(tyObject_PackageInfo__y9ahmwzrCcWrfsrJgR1q4lw* p, tyObject_Options__LR5gStV09bAFaOqz9agkkZxQ* o) {
tyObject_Auth__BHbQxO9bMmttlUd9bhNwob7Q auth;
NimStringDesc* pkgsDir;
NimStringDesc* T1_;
NimStringDesc* lastDirX60gensym7_;
TFrame* _nimCurFrame;
NimStringDesc* url;
NimStringDesc* downloadMethod;
NimStringDesc* tags;
NimStringDesc* lastDirX60gensym10_;
nimfr_("publish", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
_nimCurFrame = getFrame();
nimZeroMem((void*)(&auth), sizeof(tyObject_Auth__BHbQxO9bMmttlUd9bhNwob7Q));
nimln_(161, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
getGithubAuth__nimblepkgZpublish_41(o, (&auth));
nimln_(162, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T1_ = NIM_NIL;
T1_ = getNimbleUserTempDir__nimblepkgZtools_122();
pkgsDir = slash___pureZos_121(T1_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_33));
nimln_(163, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
NIM_BOOL T4_;
T4_ = (NIM_BOOL)0;
T4_ = forkExists__nimblepkgZpublish_55(auth);
if (!!(T4_)) goto LA5_;
nimln_(164, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
createFork__nimblepkgZpublish_64(auth);
nimln_(165, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
display__nimblepkgZcli_156(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_4), ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_44), ((tyEnum_DisplayType__HypVeg1P09aXzPaqyobO7xA) 4), ((tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ) 3));
nimln_(167, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
nossleep(((NI) 10000));
nimln_(169, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
display__nimblepkgZcli_156(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_4), ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_45), ((tyEnum_DisplayType__HypVeg1P09aXzPaqyobO7xA) 4), ((tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ) 1));
}
LA5_: ;
nimln_(170, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
NIM_BOOL T9_;
T9_ = (NIM_BOOL)0;
T9_ = nosdirExists(pkgsDir);
if (!T9_) goto LA10_;
nimln_(171, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
display__nimblepkgZcli_156(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_46), ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_47), ((tyEnum_DisplayType__HypVeg1P09aXzPaqyobO7xA) 4), ((tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ) 1));
nimln_(173, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
nosremoveDir(pkgsDir, NIM_FALSE);
}
LA10_: ;
nimln_(174, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
noscreateDir(pkgsDir);
nimln_(67, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/common.nim");
lastDirX60gensym7_ = nosgetCurrentDir();
nimln_(68, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/common.nim");
setCurrentDir__pureZos_741(pkgsDir);
{
TSafePoint TM__1xecg8IpX44AZWJSOKndVQ_48;
NimStringDesc* T13_;
NimStringDesc* T14_;
NimStringDesc* T15_;
nimln_(70, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/common.nim");
pushSafePoint(&TM__1xecg8IpX44AZWJSOKndVQ_48);
TM__1xecg8IpX44AZWJSOKndVQ_48.status = setjmp(TM__1xecg8IpX44AZWJSOKndVQ_48.context);
if (TM__1xecg8IpX44AZWJSOKndVQ_48.status == 0) {
nimln_(178, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T13_ = NIM_NIL;
T13_ = rawNewString((pkgsDir ? pkgsDir->Sup.len : 0) + 20);
appendString(T13_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_50));
appendString(T13_, pkgsDir);
display__nimblepkgZcli_156(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_49), T13_, ((tyEnum_DisplayType__HypVeg1P09aXzPaqyobO7xA) 4), ((tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ) 3));
nimln_(179, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
doCmd__nimblepkgZtools_22(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_51));
nimln_(182, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
doCmd__nimblepkgZtools_22(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_52));
nimln_(183, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T14_ = NIM_NIL;
T14_ = rawNewString((auth.user ? auth.user->Sup.len : 0) + 37);
appendString(T14_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_53));
appendString(T14_, auth.user);
appendString(T14_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_36));
doCmd__nimblepkgZtools_22(T14_);
nimln_(185, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
display__nimblepkgZcli_156(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_54), ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_55), ((tyEnum_DisplayType__HypVeg1P09aXzPaqyobO7xA) 4), ((tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ) 3));
nimln_(186, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
doCmd__nimblepkgZtools_22(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_56));
nimln_(187, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T15_ = NIM_NIL;
T15_ = rawNewString((auth.token ? auth.token->Sup.len : 0) + (auth.user ? auth.user->Sup.len : 0) + 45);
appendString(T15_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_57));
appendString(T15_, auth.token);
appendString(T15_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_58));
appendString(T15_, auth.user);
appendString(T15_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_59));
doCmd__nimblepkgZtools_22(T15_);
popSafePoint();
}
else {
popSafePoint();
setFrame(_nimCurFrame);
}
{
nimln_(70, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/common.nim");
setCurrentDir__pureZos_741(lastDirX60gensym7_);
if (TM__1xecg8IpX44AZWJSOKndVQ_48.status != 0) nimLeaveFinally();
}
if (TM__1xecg8IpX44AZWJSOKndVQ_48.status != 0) reraiseException();
}
nimln_(189, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
NIM_BOOL T20_;
tyObject_NimbleError__6rmfqzY5PO7blXdlEs8gjQ* T23_;
T20_ = (NIM_BOOL)0;
T20_ = nosdirExists(pkgsDir);
if (!!(T20_)) goto LA21_;
nimln_(190, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T23_ = NIM_NIL;
T23_ = nimbleError__nimblepkgZcommon_26(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_60), ((NimStringDesc*) NIM_NIL), ((tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA*) NIM_NIL));
raiseExceptionEx((Exception*)T23_, "NimbleError", "publish", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim", 190);
}
LA21_: ;
nimln_(193, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
NimStringDesc* T26_;
NIM_BOOL T27_;
tyObject_NimbleError__6rmfqzY5PO7blXdlEs8gjQ* T30_;
T26_ = NIM_NIL;
T26_ = slash___pureZos_121(pkgsDir, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_61));
T27_ = (NIM_BOOL)0;
T27_ = nosfileExists(T26_);
if (!!(T27_)) goto LA28_;
nimln_(194, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T30_ = NIM_NIL;
T30_ = nimbleError__nimblepkgZcommon_26(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_62), ((NimStringDesc*) NIM_NIL), ((tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA*) NIM_NIL));
raiseExceptionEx((Exception*)T30_, "NimbleError", "publish", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim", 194);
}
LA28_: ;
nimln_(199, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
url = ((NimStringDesc*) NIM_NIL);
nimln_(200, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
downloadMethod = ((NimStringDesc*) NIM_NIL);
nimln_(201, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
NimStringDesc* T33_;
NimStringDesc* T34_;
NIM_BOOL T35_;
tyTuple__XOVT24GHXwqiEj5GCsEGCA T38_;
NimStringDesc* output;
NI exitCode;
tyObject_Uri__j49bukNPrq747O1GRd4Ng9bQ parsed;
T33_ = NIM_NIL;
T33_ = nosgetCurrentDir();
T34_ = NIM_NIL;
T34_ = slash___pureZos_121(T33_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_63));
T35_ = (NIM_BOOL)0;
T35_ = nosdirExists(T34_);
if (!T35_) goto LA36_;
nimln_(202, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
nimZeroMem((void*)(&T38_), sizeof(tyTuple__XOVT24GHXwqiEj5GCsEGCA));
doCmdEx__nimblepkgZtools_29(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_64), (&T38_));
output = NIM_NIL;
output = T38_.Field0;
exitCode = (NI)0;
exitCode = T38_.Field1;
nimln_(203, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
if (!(exitCode == ((NI) 0))) goto LA41_;
nimln_(204, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
url = nsuStrip(output, NIM_TRUE, NIM_TRUE, TM__1xecg8IpX44AZWJSOKndVQ_8);
nimln_(205, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
NIM_BOOL T45_;
NI TM__1xecg8IpX44AZWJSOKndVQ_65;
T45_ = (NIM_BOOL)0;
T45_ = nsuEndsWith(url, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_63));
if (!T45_) goto LA46_;
if (nimSubInt((url ? url->Sup.len : 0), ((NI) 4), &TM__1xecg8IpX44AZWJSOKndVQ_65)) { raiseOverflow(); };
if (((NI)(TM__1xecg8IpX44AZWJSOKndVQ_65)) < ((NI) 0) || ((NI)(TM__1xecg8IpX44AZWJSOKndVQ_65)) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI((NI)(TM__1xecg8IpX44AZWJSOKndVQ_65), ((NI) 0), ((NI) IL64(9223372036854775807))); }
url = setLengthStr(url, ((NI) ((NI)(TM__1xecg8IpX44AZWJSOKndVQ_65))));
}
LA46_: ;
nimln_(206, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
downloadMethod = copyString(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_66));
}
LA41_: ;
nimZeroMem((void*)(&parsed), sizeof(tyObject_Uri__j49bukNPrq747O1GRd4Ng9bQ));
nimln_(207, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
parseUri__pureZuri_209(url, (&parsed));
nimln_(209, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
tyObject_Uri__j49bukNPrq747O1GRd4Ng9bQ sshUrl;
NimStringDesc* T52_;
NimStringDesc* T53_;
if (!((parsed.scheme ? parsed.scheme->Sup.len : 0) == 0)) goto LA50_;
nimZeroMem((void*)(&sshUrl), sizeof(tyObject_Uri__j49bukNPrq747O1GRd4Ng9bQ));
nimln_(211, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T52_ = NIM_NIL;
T52_ = rawNewString((url ? url->Sup.len : 0) + 6);
appendString(T52_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_67));
appendString(T52_, url);
parseUri__pureZuri_209(T52_, (&sshUrl));
nimln_(212, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T53_ = NIM_NIL;
T53_ = rawNewString((sshUrl.hostname ? sshUrl.hostname->Sup.len : 0) + (sshUrl.port ? sshUrl.port->Sup.len : 0) + (sshUrl.path ? sshUrl.path->Sup.len : 0) + 9);
appendString(T53_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_68));
appendString(T53_, sshUrl.hostname);
appendString(T53_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_69));
appendString(T53_, sshUrl.port);
appendString(T53_, sshUrl.path);
url = T53_;
}
goto LA48_;
LA50_: ;
{
NIM_BOOL T55_;
tyObject_NimbleError__6rmfqzY5PO7blXdlEs8gjQ* T59_;
nimln_(213, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T55_ = (NIM_BOOL)0;
T55_ = !(((parsed.username ? parsed.username->Sup.len : 0) == 0));
if (T55_) goto LA56_;
T55_ = !(((parsed.password ? parsed.password->Sup.len : 0) == 0));
LA56_: ;
if (!T55_) goto LA57_;
nimln_(216, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T59_ = NIM_NIL;
T59_ = nimbleError__nimblepkgZcommon_26(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_70), ((NimStringDesc*) NIM_NIL), ((tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA*) NIM_NIL));
raiseExceptionEx((Exception*)T59_, "NimbleError", "publish", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim", 216);
}
goto LA48_;
LA57_: ;
LA48_: ;
}
goto LA31_;
LA36_: ;
{
NimStringDesc* T61_;
NimStringDesc* T62_;
NIM_BOOL T63_;
nimln_(220, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T61_ = NIM_NIL;
T61_ = nosgetCurrentDir();
T62_ = NIM_NIL;
T62_ = slash___pureZos_121(T61_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_71));
T63_ = (NIM_BOOL)0;
T63_ = nosdirExists(T62_);
if (!T63_) goto LA64_;
nimln_(221, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
downloadMethod = copyString(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_72));
}
goto LA31_;
LA64_: ;
{
tyObject_NimbleError__6rmfqzY5PO7blXdlEs8gjQ* T67_;
nimln_(224, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T67_ = NIM_NIL;
T67_ = nimbleError__nimblepkgZcommon_26(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_73), ((NimStringDesc*) NIM_NIL), ((tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA*) NIM_NIL));
raiseExceptionEx((Exception*)T67_, "NimbleError", "publish", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim", 224);
}
LA31_: ;
nimln_(227, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
NimStringDesc* T72_;
if (!((url ? url->Sup.len : 0) == ((NI) 0))) goto LA70_;
nimln_(228, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T72_ = NIM_NIL;
T72_ = rawNewString(((*p).basicInfo.Field0 ? (*p).basicInfo.Field0->Sup.len : 0) + 15);
appendString(T72_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_74));
appendString(T72_, (*p).basicInfo.Field0);
appendString(T72_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_75));
url = promptCustom__nimblepkgZcli_713(T72_, ((NimStringDesc*) NIM_NIL));
nimln_(229, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
{
if (!((url ? url->Sup.len : 0) == ((NI) 0))) goto LA75_;
userAborted__nimblepkgZpublish_24();
}
LA75_: ;
}
LA70_: ;
nimln_(231, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
tags = promptCustom__nimblepkgZcli_713(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_77), ((NimStringDesc*) NIM_NIL));
nimln_(67, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/common.nim");
lastDirX60gensym10_ = nosgetCurrentDir();
nimln_(68, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/common.nim");
setCurrentDir__pureZos_741(pkgsDir);
{
TSafePoint TM__1xecg8IpX44AZWJSOKndVQ_78;
NimStringDesc* branchName;
NimStringDesc* T78_;
tyObject_Time__3y2ZpqsTJLqdZvpC9a0rU2Q T79_;
tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw T80_;
NimStringDesc* T81_;
NimStringDesc* T82_;
NimStringDesc* T83_;
NimStringDesc* T84_;
NimStringDesc* prUrl;
NimStringDesc* T85_;
nimln_(70, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/common.nim");
pushSafePoint(&TM__1xecg8IpX44AZWJSOKndVQ_78);
TM__1xecg8IpX44AZWJSOKndVQ_78.status = setjmp(TM__1xecg8IpX44AZWJSOKndVQ_78.context);
if (TM__1xecg8IpX44AZWJSOKndVQ_78.status == 0) {
nimln_(237, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
editJson__nimblepkgZpublish_151(p, url, tags, downloadMethod);
nimln_(238, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T78_ = NIM_NIL;
T79_ = getTime__pureZtimes_1024();
nimZeroMem((void*)(&T80_), sizeof(tyObject_DateTime__d9cK9cyKZPJJxFXUmx8dSpPw));
T80_.Sup.m_type = (&NTIdatetime__d9cK9cyKZPJJxFXUmx8dSpPw_);
utc__pureZtimes_1554(T79_, (&T80_));
T81_ = NIM_NIL;
T81_ = format__nimblepkgZpublish_216((&T80_));
T78_ = rawNewString(((*p).basicInfo.Field0 ? (*p).basicInfo.Field0->Sup.len : 0) + (T81_ ? T81_->Sup.len : 0) + 4);
appendString(T78_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_99));
appendString(T78_, (*p).basicInfo.Field0);
appendString(T78_, T81_);
branchName = T78_;
nimln_(239, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T82_ = NIM_NIL;
T82_ = rawNewString((branchName ? branchName->Sup.len : 0) + 16);
appendString(T82_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_100));
appendString(T82_, branchName);
doCmd__nimblepkgZtools_22(T82_);
nimln_(240, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T83_ = NIM_NIL;
T83_ = rawNewString(((*p).basicInfo.Field0 ? (*p).basicInfo.Field0->Sup.len : 0) + 44);
appendString(T83_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_101));
appendString(T83_, (*p).basicInfo.Field0);
appendString(T83_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_102));
doCmd__nimblepkgZtools_22(T83_);
nimln_(241, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
display__nimblepkgZcli_156(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_103), ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_104), ((tyEnum_DisplayType__HypVeg1P09aXzPaqyobO7xA) 4), ((tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ) 3));
nimln_(242, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T84_ = NIM_NIL;
T84_ = rawNewString((auth.token ? auth.token->Sup.len : 0) + (auth.user ? auth.user->Sup.len : 0) + (branchName ? branchName->Sup.len : 0) + 39);
appendString(T84_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_57));
appendString(T84_, auth.token);
appendString(T84_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_58));
appendString(T84_, auth.user);
appendString(T84_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_105));
appendString(T84_, branchName);
doCmd__nimblepkgZtools_22(T84_);
nimln_(243, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
prUrl = createPullRequest__nimblepkgZpublish_94(auth, (*p).basicInfo.Field0, branchName);
nimln_(244, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/publish.nim");
T85_ = NIM_NIL;
T85_ = rawNewString((prUrl ? prUrl->Sup.len : 0) + 34);
appendString(T85_, ((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_112));
appendString(T85_, prUrl);
display__nimblepkgZcli_156(((NimStringDesc*) &TM__1xecg8IpX44AZWJSOKndVQ_31), T85_, ((tyEnum_DisplayType__HypVeg1P09aXzPaqyobO7xA) 5), ((tyEnum_Priority__8lOyDpa4mymX3OHP5fBsAQ) 3));
popSafePoint();
}
else {
popSafePoint();
setFrame(_nimCurFrame);
}
{
nimln_(70, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/common.nim");
setCurrentDir__pureZos_741(lastDirX60gensym10_);
if (TM__1xecg8IpX44AZWJSOKndVQ_78.status != 0) nimLeaveFinally();
}
if (TM__1xecg8IpX44AZWJSOKndVQ_78.status != 0) reraiseException();
}
popFrame();
}