MCPcopy
hub / github.com/meteor/meteor / connect

Method connect

tools/shell-client.ts:51–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49 };
50
51 connect() {
52 const infoFile = getInfoFile(this.shellDir);
53
54 fs.readFile(infoFile, "utf8", (err, json) => {
55 if (err) {
56 return this.reconnect();
57 }
58
59 let info;
60 try {
61 info = JSON.parse(json);
62 } catch (err) {
63 return this.reconnect();
64 }
65
66 if (info.status !== "enabled") {
67 if (this.firstTimeConnecting) {
68 return this.reconnect();
69 }
70
71 if (info.reason) {
72 console.error(info.reason);
73 }
74
75 console.error(EXITING_MESSAGE);
76 process.exit(0);
77 }
78
79 this.setUpSocket(
80 net.connect(info.port, "127.0.0.1"),
81 info.key
82 );
83 });
84 };
85
86 setUpSocketForSingleUse(sock: net.Socket, key: string) {
87 sock.on("connect", function () {

Callers 13

reconnectMethod · 0.95
connectFunction · 0.45
accounts_tests.jsFile · 0.45
_initConnectionMethod · 0.45
password_tests.jsFile · 0.45
connection.jsFile · 0.45
mongo_driver.jsFile · 0.45
livedata_tests.jsFile · 0.45

Calls 6

reconnectMethod · 0.95
setUpSocketMethod · 0.95
getInfoFileFunction · 0.70
parseMethod · 0.65
readFileMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected