forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode_dotenv.h
More file actions
37 lines (26 loc) · 889 Bytes
/
node_dotenv.h
File metadata and controls
37 lines (26 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef SRC_NODE_DOTENV_H_
#define SRC_NODE_DOTENV_H_
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
#include "util-inl.h"
#include <map>
namespace node {
class Dotenv {
public:
Dotenv() = default;
Dotenv(const Dotenv& d) = default;
Dotenv(Dotenv&& d) noexcept = default;
Dotenv& operator=(Dotenv&& d) noexcept = default;
Dotenv& operator=(const Dotenv& d) = default;
~Dotenv() = default;
void ParsePath(const std::string_view path);
void AssignNodeOptionsIfAvailable(std::string* node_options);
void SetEnvironment(Environment* env);
static std::vector<std::string> GetPathFromArgs(
const std::vector<std::string>& args);
private:
void ParseLine(const std::string_view line);
std::map<std::string, std::string> store_;
};
} // namespace node
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
#endif // SRC_NODE_DOTENV_H_