| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c7c961f commit c093d1e
68 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,7 @@ | |||
| 1 | 1 | /build/* | |
| 2 | 2 | !/build/codegen/ | |
| 3 | + /node_modules/ | ||
| 4 | + /vendor/libgit2/ | ||
| 3 | 5 | /doc/* | |
| 4 | 6 | !/doc/Theme.css | |
| 5 | - /node_modules | ||
| 6 | 7 | /test/.reposCache | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -54,60 +54,26 @@ | |||
| 54 | 54 | ], | |
| 55 | 55 | ||
| 56 | 56 | "conditions": [ | |
| 57 | - ['OS=="win"', { | ||
| 58 | - "link_settings": { | ||
| 57 | + [ | ||
| 58 | + "OS=='win'", { | ||
| 59 | 59 | "libraries": [ | |
| 60 | - "-lgit2.lib", | ||
| 60 | + "-l../vendor/libgit2/build/Debug/git2.lib" | ||
| 61 | + ], | ||
| 62 | + }, { # 'OS!="win"' | ||
| 63 | + "libraries": [ | ||
| 64 | + "-L<!(pwd)/vendor/libgit2/build", | ||
| 65 | + "-lgit2" | ||
| 61 | 66 | ] | |
| 62 | - }, | ||
| 63 | - "configurations": { | ||
| 64 | - "Release": { | ||
| 65 | - "msvs_settings": { | ||
| 66 | - "VCCLCompilerTool": { | ||
| 67 | - "RuntimeLibrary": 0, | ||
| 68 | - "Optimization": 3, | ||
| 69 | - "FavorSizeOrSpeed": 1, | ||
| 70 | - "InlineFunctionExpansion": 2, | ||
| 71 | - "WholeProgramOptimization": "true", | ||
| 72 | - "OmitFramePointers": "true", | ||
| 73 | - "EnableFunctionLevelLinking": "true", | ||
| 74 | - "EnableIntrinsicFunctions": "true", | ||
| 75 | - "RuntimeTypeInfo": "false", | ||
| 76 | - "ExceptionHandling": "0", | ||
| 77 | - "GenerateDebugInformation": "true", | ||
| 78 | - "AdditionalOptions": [ | ||
| 79 | - "/MP /EHsc" | ||
| 80 | - ] | ||
| 81 | - }, | ||
| 82 | - "VCLibrarianTool": { | ||
| 83 | - "AdditionalOptions": [ | ||
| 84 | - "/LTCG" | ||
| 85 | - ] | ||
| 86 | - }, | ||
| 87 | - "VCLinkerTool": { | ||
| 88 | - "LinkTimeCodeGeneration": 1, | ||
| 89 | - "OptimizeReferences": 2, | ||
| 90 | - "EnableCOMDATFolding": 2, | ||
| 91 | - "LinkIncremental": 1, | ||
| 92 | - "AdditionalLibraryDirectories": [ | ||
| 93 | - "../vendor/libgit2/build/debug" | ||
| 94 | - ] | ||
| 95 | - } | ||
| 96 | - } | ||
| 97 | - } | ||
| 98 | 67 | } | |
| 99 | - }, { # Not Windows. | ||
| 100 | - "libraries": [ | ||
| 101 | - "-L<!(pwd)/vendor/libgit2/build", | ||
| 102 | - "-lgit2" | ||
| 103 | - ] | ||
| 104 | - }], | ||
| 68 | + ], | ||
| 105 | 69 | ||
| 106 | - ['OS=="mac"', { | ||
| 107 | - "xcode_settings": { | ||
| 108 | - "GCC_ENABLE_CPP_EXCEPTIONS": "YES" | ||
| 70 | + [ | ||
| 71 | + "OS=='mac'", { | ||
| 72 | + "xcode_settings": { | ||
| 73 | + "GCC_ENABLE_CPP_EXCEPTIONS": "YES" | ||
| 74 | + } | ||
| 109 | 75 | } | |
| 110 | - }] | ||
| 76 | + ] | ||
| 111 | 77 | ] | |
| 112 | 78 | } | |
| 113 | 79 | ] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,7 +20,7 @@ | |||
| 20 | 20 | <% } else if (arg.cppClassName == 'Buffer') { -%> | |
| 21 | 21 | from_<%- arg.name %> = Buffer::Data(args[<%- jsArg %>]->ToObject()); | |
| 22 | 22 | <% } else if (isV8Value(arg.cppClassName)) { -%> | |
| 23 | - from_<%- arg.name %> = (<%- arg.cType %>) args[<%- jsArg %>]->To<%- arg.cppClassName %>()->Value(); | ||
| 23 | + from_<%- arg.name %> = (<%- arg.cType %>) <%- arg.additionalCast %> <%- arg.cast %> args[<%- jsArg %>]->To<%- arg.cppClassName %>()->Value(); | ||
| 24 | 24 | <% } else { -%> | |
| 25 | 25 | from_<%- arg.name %> = ObjectWrap::Unwrap<<%- arg.cppClassName %>>(args[<%- jsArg %>]->ToObject())->GetValue(); | |
| 26 | 26 | <% } -%> | |
@@ -29,4 +29,4 @@ | |||
| 29 | 29 | from_<%- arg.name %> = 0; | |
| 30 | 30 | } | |
| 31 | 31 | <% } -%> | |
| 32 | - <% } -%> | ||
| 32 | + <% } -%> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10380,7 +10380,8 @@ | |||
| 10380 | 10380 | "cType": "git_direction", | |
| 10381 | 10381 | "cppClassName": "Number", | |
| 10382 | 10382 | "jsClassName": "Number", | |
| 10383 | - "comment": "GIT_DIRECTION_FETCH if you want to fetch or GIT_DIRECTION_PUSH if you want to push" | ||
| 10383 | + "comment": "GIT_DIRECTION_FETCH if you want to fetch or GIT_DIRECTION_PUSH if you want to push", | ||
| 10384 | + "additionalCast": "(int)" | ||
| 10384 | 10385 | } | |
| 10385 | 10386 | ], | |
| 10386 | 10387 | "isAsync": true, | |
@@ -17283,7 +17284,8 @@ | |||
| 17283 | 17284 | "cType": "git_filemode_t", | |
| 17284 | 17285 | "cppClassName": "Number", | |
| 17285 | 17286 | "jsClassName": "Number", | |
| 17286 | - "comment": "Folder attributes of the entry. This parameter must be valued with one of the following entries: 0040000, 0100644, 0100755, 0120000 or 0160000." | ||
| 17287 | + "comment": "Folder attributes of the entry. This parameter must be valued with one of the following entries: 0040000, 0100644, 0100755, 0120000 or 0160000.", | ||
| 17288 | + "additionalCast": "(int)" | ||
| 17287 | 17289 | } | |
| 17288 | 17290 | ], | |
| 17289 | 17291 | "isAsync": false, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,7 +8,6 @@ | |||
| 8 | 8 | #include <v8.h> | |
| 9 | 9 | #include <node.h> | |
| 10 | 10 | #include <string> | |
| 11 | - #include "nan.h" | ||
| 12 | 11 | ||
| 13 | 12 | #include "git2.h" | |
| 14 | 13 | ||
@@ -18,7 +17,7 @@ using namespace v8; | |||
| 18 | 17 | class GitBlob : public ObjectWrap { | |
| 19 | 18 | public: | |
| 20 | 19 | ||
| 21 | - static Persistent<FunctionTemplate> constructor_template; | ||
| 20 | + static Persistent<Function> constructor_template; | ||
| 22 | 21 | static void Initialize (Handle<v8::Object> target); | |
| 23 | 22 | ||
| 24 | 23 | git_blob *GetValue(); | |
@@ -29,12 +28,13 @@ class GitBlob : public ObjectWrap { | |||
| 29 | 28 | GitBlob(git_blob *raw); | |
| 30 | 29 | ~GitBlob(); | |
| 31 | 30 | ||
| 32 | - static NAN_METHOD(New); | ||
| 31 | + static Handle<Value> New(const Arguments& args); | ||
| 33 | 32 | ||
| 34 | - static NAN_METHOD(Oid); | ||
| 35 | - static NAN_METHOD(Content); | ||
| 36 | - static NAN_METHOD(Size); | ||
| 37 | - static NAN_METHOD(IsBinary); | ||
| 33 | + | ||
| 34 | + static Handle<Value> Oid(const Arguments& args); | ||
| 35 | + static Handle<Value> Content(const Arguments& args); | ||
| 36 | + static Handle<Value> Size(const Arguments& args); | ||
| 37 | + static Handle<Value> IsBinary(const Arguments& args); | ||
| 38 | 38 | git_blob *raw; | |
| 39 | 39 | }; | |
| 40 | 40 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,8 +9,6 @@ | |||
| 9 | 9 | #include <node.h> | |
| 10 | 10 | #include <string> | |
| 11 | 11 | ||
| 12 | - #include "nan.h" | ||
| 13 | - | ||
| 14 | 12 | #include "git2.h" | |
| 15 | 13 | ||
| 16 | 14 | using namespace node; | |
@@ -19,7 +17,7 @@ using namespace v8; | |||
| 19 | 17 | class Branch : public ObjectWrap { | |
| 20 | 18 | public: | |
| 21 | 19 | ||
| 22 | - static Persistent<FunctionTemplate> constructor_template; | ||
| 20 | + static Persistent<Function> constructor_template; | ||
| 23 | 21 | static void Initialize (Handle<v8::Object> target); | |
| 24 | 22 | ||
| 25 | 23 | git_branch *GetValue(); | |
@@ -30,19 +28,20 @@ class Branch : public ObjectWrap { | |||
| 30 | 28 | Branch(git_branch *raw); | |
| 31 | 29 | ~Branch(); | |
| 32 | 30 | ||
| 33 | - static NAN_METHOD(New); | ||
| 34 | - | ||
| 35 | - static NAN_METHOD(Create); | ||
| 36 | - static NAN_METHOD(Delete); | ||
| 37 | - static NAN_METHOD(Foreach); | ||
| 38 | - static NAN_METHOD(Move); | ||
| 39 | - static NAN_METHOD(Lookup); | ||
| 40 | - static NAN_METHOD(Name); | ||
| 41 | - static NAN_METHOD(Upstream); | ||
| 42 | - static NAN_METHOD(SetUpstream); | ||
| 43 | - static NAN_METHOD(UpstreamName); | ||
| 44 | - static NAN_METHOD(IsHead); | ||
| 45 | - static NAN_METHOD(RemoteName); | ||
| 31 | + static Handle<Value> New(const Arguments& args); | ||
| 32 | + | ||
| 33 | + | ||
| 34 | + static Handle<Value> Create(const Arguments& args); | ||
| 35 | + static Handle<Value> Delete(const Arguments& args); | ||
| 36 | + static Handle<Value> Foreach(const Arguments& args); | ||
| 37 | + static Handle<Value> Move(const Arguments& args); | ||
| 38 | + static Handle<Value> Lookup(const Arguments& args); | ||
| 39 | + static Handle<Value> Name(const Arguments& args); | ||
| 40 | + static Handle<Value> Upstream(const Arguments& args); | ||
| 41 | + static Handle<Value> SetUpstream(const Arguments& args); | ||
| 42 | + static Handle<Value> UpstreamName(const Arguments& args); | ||
| 43 | + static Handle<Value> IsHead(const Arguments& args); | ||
| 44 | + static Handle<Value> RemoteName(const Arguments& args); | ||
| 46 | 45 | git_branch *raw; | |
| 47 | 46 | }; | |
| 48 | 47 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,8 +9,6 @@ | |||
| 9 | 9 | #include <node.h> | |
| 10 | 10 | #include <string> | |
| 11 | 11 | ||
| 12 | - #include "nan.h" | ||
| 13 | - | ||
| 14 | 12 | #include "git2.h" | |
| 15 | 13 | ||
| 16 | 14 | using namespace node; | |
@@ -19,7 +17,7 @@ using namespace v8; | |||
| 19 | 17 | class GitCloneOptions : public ObjectWrap { | |
| 20 | 18 | public: | |
| 21 | 19 | ||
| 22 | - static Persistent<FunctionTemplate> constructor_template; | ||
| 20 | + static Persistent<Function> constructor_template; | ||
| 23 | 21 | static void Initialize (Handle<v8::Object> target); | |
| 24 | 22 | ||
| 25 | 23 | git_clone_options *GetValue(); | |
@@ -30,7 +28,8 @@ class GitCloneOptions : public ObjectWrap { | |||
| 30 | 28 | GitCloneOptions(git_clone_options *raw); | |
| 31 | 29 | ~GitCloneOptions(); | |
| 32 | 30 | ||
| 33 | - static NAN_METHOD(New); | ||
| 31 | + static Handle<Value> New(const Arguments& args); | ||
| 32 | + | ||
| 34 | 33 | ||
| 35 | 34 | git_clone_options *raw; | |
| 36 | 35 | }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,8 +9,6 @@ | |||
| 9 | 9 | #include <node.h> | |
| 10 | 10 | #include <string> | |
| 11 | 11 | ||
| 12 | - #include "nan.h" | ||
| 13 | - | ||
| 14 | 12 | #include "git2.h" | |
| 15 | 13 | ||
| 16 | 14 | using namespace node; | |
@@ -19,7 +17,7 @@ using namespace v8; | |||
| 19 | 17 | class GitCommit : public ObjectWrap { | |
| 20 | 18 | public: | |
| 21 | 19 | ||
| 22 | - static Persistent<FunctionTemplate> constructor_template; | ||
| 20 | + static Persistent<Function> constructor_template; | ||
| 23 | 21 | static void Initialize (Handle<v8::Object> target); | |
| 24 | 22 | ||
| 25 | 23 | git_commit *GetValue(); | |
@@ -30,19 +28,20 @@ class GitCommit : public ObjectWrap { | |||
| 30 | 28 | GitCommit(git_commit *raw); | |
| 31 | 29 | ~GitCommit(); | |
| 32 | 30 | ||
| 33 | - static NAN_METHOD(New); | ||
| 34 | - | ||
| 35 | - static NAN_METHOD(Oid); | ||
| 36 | - static NAN_METHOD(MessageEncoding); | ||
| 37 | - static NAN_METHOD(Message); | ||
| 38 | - static NAN_METHOD(Time); | ||
| 39 | - static NAN_METHOD(Offset); | ||
| 40 | - static NAN_METHOD(Committer); | ||
| 41 | - static NAN_METHOD(Author); | ||
| 42 | - static NAN_METHOD(TreeId); | ||
| 43 | - static NAN_METHOD(ParentCount); | ||
| 44 | - static NAN_METHOD(ParentId); | ||
| 45 | - static NAN_METHOD(NthGenAncestor); | ||
| 31 | + static Handle<Value> New(const Arguments& args); | ||
| 32 | + | ||
| 33 | + | ||
| 34 | + static Handle<Value> Oid(const Arguments& args); | ||
| 35 | + static Handle<Value> MessageEncoding(const Arguments& args); | ||
| 36 | + static Handle<Value> Message(const Arguments& args); | ||
| 37 | + static Handle<Value> Time(const Arguments& args); | ||
| 38 | + static Handle<Value> Offset(const Arguments& args); | ||
| 39 | + static Handle<Value> Committer(const Arguments& args); | ||
| 40 | + static Handle<Value> Author(const Arguments& args); | ||
| 41 | + static Handle<Value> TreeId(const Arguments& args); | ||
| 42 | + static Handle<Value> ParentCount(const Arguments& args); | ||
| 43 | + static Handle<Value> ParentId(const Arguments& args); | ||
| 44 | + static Handle<Value> NthGenAncestor(const Arguments& args); | ||
| 46 | 45 | git_commit *raw; | |
| 47 | 46 | }; | |
| 48 | 47 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,8 +9,6 @@ | |||
| 9 | 9 | #include <node.h> | |
| 10 | 10 | #include <string> | |
| 11 | 11 | ||
| 12 | - #include "nan.h" | ||
| 13 | - | ||
| 14 | 12 | #include "git2.h" | |
| 15 | 13 | ||
| 16 | 14 | using namespace node; | |
@@ -19,7 +17,7 @@ using namespace v8; | |||
| 19 | 17 | class GitDelta : public ObjectWrap { | |
| 20 | 18 | public: | |
| 21 | 19 | ||
| 22 | - static Persistent<FunctionTemplate> constructor_template; | ||
| 20 | + static Persistent<Function> constructor_template; | ||
| 23 | 21 | static void Initialize (Handle<v8::Object> target); | |
| 24 | 22 | ||
| 25 | 23 | git_diff_delta *GetValue(); | |
@@ -30,13 +28,13 @@ class GitDelta : public ObjectWrap { | |||
| 30 | 28 | GitDelta(git_diff_delta *raw); | |
| 31 | 29 | ~GitDelta(); | |
| 32 | 30 | ||
| 33 | - static NAN_METHOD(New); | ||
| 31 | + static Handle<Value> New(const Arguments& args); | ||
| 34 | 32 | ||
| 35 | - static NAN_METHOD(OldFile); | ||
| 36 | - static NAN_METHOD(NewFile); | ||
| 37 | - static NAN_METHOD(Status); | ||
| 38 | - static NAN_METHOD(Similarity); | ||
| 39 | - static NAN_METHOD(Flags); | ||
| 33 | + static Handle<Value> OldFile(const Arguments& args); | ||
| 34 | + static Handle<Value> NewFile(const Arguments& args); | ||
| 35 | + static Handle<Value> Status(const Arguments& args); | ||
| 36 | + static Handle<Value> Similarity(const Arguments& args); | ||
| 37 | + static Handle<Value> Flags(const Arguments& args); | ||
| 40 | 38 | ||
| 41 | 39 | git_diff_delta *raw; | |
| 42 | 40 | }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,8 +9,6 @@ | |||
| 9 | 9 | #include <node.h> | |
| 10 | 10 | #include <string> | |
| 11 | 11 | ||
| 12 | - #include "nan.h" | ||
| 13 | - | ||
| 14 | 12 | #include "git2.h" | |
| 15 | 13 | ||
| 16 | 14 | using namespace node; | |
@@ -19,7 +17,7 @@ using namespace v8; | |||
| 19 | 17 | class GitDiffFile : public ObjectWrap { | |
| 20 | 18 | public: | |
| 21 | 19 | ||
| 22 | - static Persistent<FunctionTemplate> constructor_template; | ||
| 20 | + static Persistent<Function> constructor_template; | ||
| 23 | 21 | static void Initialize (Handle<v8::Object> target); | |
| 24 | 22 | ||
| 25 | 23 | git_diff_file *GetValue(); | |
@@ -30,13 +28,13 @@ class GitDiffFile : public ObjectWrap { | |||
| 30 | 28 | GitDiffFile(git_diff_file *raw); | |
| 31 | 29 | ~GitDiffFile(); | |
| 32 | 30 | ||
| 33 | - static NAN_METHOD(New); | ||
| 31 | + static Handle<Value> New(const Arguments& args); | ||
| 34 | 32 | ||
| 35 | - static NAN_METHOD(Oid); | ||
| 36 | - static NAN_METHOD(Path); | ||
| 37 | - static NAN_METHOD(Size); | ||
| 38 | - static NAN_METHOD(Flags); | ||
| 39 | - static NAN_METHOD(Mode); | ||
| 33 | + static Handle<Value> Oid(const Arguments& args); | ||
| 34 | + static Handle<Value> Path(const Arguments& args); | ||
| 35 | + static Handle<Value> Size(const Arguments& args); | ||
| 36 | + static Handle<Value> Flags(const Arguments& args); | ||
| 37 | + static Handle<Value> Mode(const Arguments& args); | ||
| 40 | 38 | ||
| 41 | 39 | git_diff_file *raw; | |
| 42 | 40 | }; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments