|
1 | 1 | #ifndef SRC_NODE_MESSAGES_SRC_H_ |
2 | 2 | #define SRC_NODE_MESSAGES_SRC_H_ |
3 | 3 |
|
| 4 | +// node --help output |
| 5 | + |
| 6 | +#if HAVE_OPENSSL |
| 7 | +#define NODE_HELP_OPENSSL \ |
| 8 | + " --tls-cipher-list=val use an alternative default TLS cipher list\n" |
| 9 | +#else // !HAVE_OPENSSL |
| 10 | +#define NODE_HELP_OPENSSL "" |
| 11 | +#endif // HAVE_OPENSSL |
| 12 | + |
| 13 | +#if defined(NODE_HAVE_I18N_SUPPORT) |
| 14 | +#if !defined(NODE_HAVE_SMALL_ICU) |
| 15 | +#define NODE_HELP_I18N_SMALL_ICU \ |
| 16 | + " note: linked-in ICU data is\n" \ |
| 17 | + " present.\n" |
| 18 | +#else // defined(NODE_HAVE_SMALL_ICU) |
| 19 | +#define NODE_HELP_I18N_SMALL_ICU "" |
| 20 | +#endif // !defined(NODE_HAVE_SMALL_ICU) |
| 21 | +#define NODE_HELP_I18N \ |
| 22 | + " --icu-data-dir=dir set ICU data load path to dir\n" \ |
| 23 | + " (overrides NODE_ICU_DATA)\n" \ |
| 24 | + NODE_HELP_I18N_SMALL_ICU |
| 25 | + |
| 26 | +#define NODE_HELP_ICU_DATA \ |
| 27 | + "NODE_ICU_DATA data path for ICU (Intl object) data\n" \ |
| 28 | + " (will extend linked-in data)\n" |
| 29 | + |
| 30 | +#else // !defined(NODE_HAVE_I18N_SUPPORT) |
| 31 | +#define NODE_HELP_ICU_DATA "" |
| 32 | +#define NODE_HELP_I18N "" |
| 33 | +#endif // defined(NODE_HAVE_I18N_SUPPORT) |
| 34 | + |
| 35 | +// Determine the path separator |
| 36 | +#ifdef _WIN32 |
| 37 | +#define NODE_HELP_SEP ";" |
| 38 | +#else |
| 39 | +#define NODE_HELP_SEP ":" |
| 40 | +#endif |
| 41 | + |
| 42 | +#define STR_NODEHELP \ |
| 43 | +"Usage: node [options] [ -e script | script.js ] [arguments] \n" \ |
| 44 | + " node debug script.js [arguments] \n" \ |
| 45 | + "\n" \ |
| 46 | + "Options:\n" \ |
| 47 | + " -v, --version print Node.js version\n" \ |
| 48 | + " -e, --eval script evaluate script\n" \ |
| 49 | + " -p, --print evaluate script and print result\n" \ |
| 50 | + " -c, --check syntax check script without executing\n" \ |
| 51 | + " -i, --interactive always enter the REPL even if stdin\n" \ |
| 52 | + " does not appear to be a terminal\n" \ |
| 53 | + " -r, --require module to preload (option can be repeated)\n" \ |
| 54 | + " --no-deprecation silence deprecation warnings\n" \ |
| 55 | + " --throw-deprecation throw an exception anytime a deprecated " \ |
| 56 | + "function is used\n" \ |
| 57 | + " --trace-deprecation show stack traces on deprecations\n" \ |
| 58 | + " --trace-sync-io show stack trace when use of sync IO\n" \ |
| 59 | + " is detected after the first tick\n" \ |
| 60 | + " --track-heap-objects track heap object allocations for heap " \ |
| 61 | + "snapshots\n" \ |
| 62 | + " --prof-process process v8 profiler output generated\n" \ |
| 63 | + " using --prof\n" \ |
| 64 | + " --v8-options print v8 command line options\n" \ |
| 65 | + NODE_HELP_OPENSSL \ |
| 66 | + NODE_HELP_I18N \ |
| 67 | + "\n" \ |
| 68 | + "Environment variables:\n" \ |
| 69 | + "NODE_PATH '" NODE_HELP_SEP "'-separated list of " \ |
| 70 | + "directories\n" \ |
| 71 | + " prefixed to the module search path.\n" \ |
| 72 | + "NODE_DISABLE_COLORS set to 1 to disable colors in the REPL\n" \ |
| 73 | + NODE_HELP_ICU_DATA \ |
| 74 | + "NODE_REPL_HISTORY path to the persistent REPL history file\n" \ |
| 75 | + "\n" \ |
| 76 | + "Documentation can be found at https://nodejs.org/\n" |
| 77 | + |
| 78 | +// Other messages ... |
| 79 | + |
4 | 80 | #define NODE_MESSAGE_UNKNOWN "(Message Unknown)" |
5 | 81 |
|
6 | 82 | #define NODE_DEPRECATE_MESSAGE(what, alternate) \ |
7 | 83 | what " is deprecated. Use " alternate " instead." |
8 | 84 |
|
| 85 | +#define STR_SYNC_WARNING "(node:%d) WARNING: Detected use of sync API\n" |
| 86 | +#define STR_AT "at" |
| 87 | +#define STR_OPENSSL_FIPS_FAIL "openssl fips failed: %s\n" |
| 88 | +#define STR_PROCESS_TICKDOMAIN_NONFUNCTION \ |
| 89 | + "process._tickDomainCallback assigned to non-function\n" |
| 90 | +#define STR_RAW_ENCODING_REMOVED \ |
| 91 | + "'raw' encoding (array of integers) has been removed. Use 'binary'.\n" |
| 92 | +#define STR_MODULE_VERSION_MISMATCH \ |
| 93 | + "Module version mismatch. Expected %d, got %d." |
| 94 | +#define STR_BINDING "Binding %s" |
| 95 | +#define STR_NO_SUCH_MODULE "No such module: %s" |
| 96 | +#define STR_NO_SUCH_MODULE_LINKED "No such module was linked: %s" |
| 97 | +#define STR_DEBUGPORT_OUTOFRANGE "Debug port must be in range 1024 to 65535.\n" |
| 98 | +#define STR_REQUIRES_ARGUMENT "%s: %s requires an argument\n" |
| 99 | +#define STR_START_DEBUGGER_FAIL "Starting debugger on port %d failed\n" |
| 100 | +#define STR_START_DEBUGGER_AGENT "Starting debugger agent.\n" |
| 101 | +#define STR_BAD_OPTION "bad option" |
| 102 | + |
9 | 103 | // The messages used in src/*.cc |
10 | 104 | // These are used only within the Node.js native source |
11 | 105 | #define STR_CONVERT_ARGS_TO_UTF8_FAIL "Could not convert arguments to utf8." |
12 | 106 | #define STR_OUTOFMEMORY "Out of memory" |
13 | | -#define STR_CALLBACK_NOT_ASSIGNED \ |
14 | | - "init callback is not assigned to a function" |
15 | | -#define STR_HOOKSSHOULDNOTBESET \ |
16 | | - "hooks should not be set while also enabled" |
17 | | -#define STR_INITCALLBACK \ |
18 | | - "init callback must be a function" |
19 | | -#define STR_INVALID_FILENAME \ |
20 | | - "filename must be a valid string" |
21 | | -#define STR_INDEX_OUT_OF_RANGE \ |
22 | | - "out of range index" |
23 | | -#define STR_ARGUMENT_BUFFER \ |
24 | | - "argument should be a Buffer" |
25 | | -#define STR_ARGUMENT_STRING \ |
26 | | - "Argument must be a string" |
27 | | -#define STR_ARGUMENT_ARRAYBUFFER \ |
28 | | - "argument is not an ArrayBuffer" |
29 | | -#define STR_UNABLE_TO_SET_PROTOTYPE \ |
30 | | - "Unable to set Object prototype" |
31 | | -#define STR_INVALID_HEX \ |
32 | | - "Invalid hex string" |
33 | | -#define STR_OFFSET_OUTOFBOUNDS \ |
34 | | - "Offset is out of bounds" |
35 | | -#define STR_LENGTH_OUTOFBOUNDS \ |
36 | | - "length out of bounds" |
37 | | -#define STR_SANDBOX_OBJECT \ |
38 | | - "sandbox argument must be an object." |
39 | | -#define STR_VMSCRIPT_AS_CONSTRUCTOR \ |
40 | | - "Must call vm.Script as a constructor." |
41 | | -#define STR_CONTEXTIFIED_MUST_BE_OBJECT \ |
| 107 | +#define STR_CALLBACK_NOT_ASSIGNED "init callback is not assigned to a function" |
| 108 | +#define STR_HOOKSSHOULDNOTBESET "hooks should not be set while also enabled" |
| 109 | +#define STR_INITCALLBACK "init callback must be a function" |
| 110 | +#define STR_INVALID_FILENAME "filename must be a valid string" |
| 111 | +#define STR_INDEX_OUT_OF_RANGE "out of range index" |
| 112 | +#define STR_ARGUMENT_BUFFER "argument should be a Buffer" |
| 113 | +#define STR_ARGUMENT_STRING "Argument must be a string" |
| 114 | +#define STR_ARGUMENT_ARRAYBUFFER "argument is not an ArrayBuffer" |
| 115 | +#define STR_UNABLE_TO_SET_PROTOTYPE "Unable to set Object prototype" |
| 116 | +#define STR_INVALID_HEX "Invalid hex string" |
| 117 | +#define STR_OFFSET_OUTOFBOUNDS "Offset is out of bounds" |
| 118 | +#define STR_LENGTH_OUTOFBOUNDS "length out of bounds" |
| 119 | +#define STR_SANDBOX_OBJECT "sandbox argument must be an object." |
| 120 | +#define STR_VMSCRIPT_AS_CONSTRUCTOR "Must call vm.Script as a constructor." |
| 121 | +#define STR_CONTEXTIFIED_MUST_BE_OBJECT \ |
42 | 122 | "contextifiedSandbox argument must be an object." |
43 | | -#define STR_SANDBOX_ARGUMENT_CONVERSION \ |
| 123 | +#define STR_SANDBOX_ARGUMENT_CONVERSION \ |
44 | 124 | "sandbox argument must have been converted to a context." |
45 | | -#define STR_OPTIONS_OBJECT \ |
46 | | - "options must be an object" |
47 | | -#define STR_TIMEOUT_POSITIVE \ |
48 | | - "timeout must be a positive number" |
49 | | -#define STR_CANNOT_CALL_SCRIPT_METHODS \ |
| 125 | +#define STR_OPTIONS_OBJECT "options must be an object" |
| 126 | +#define STR_TIMEOUT_POSITIVE "timeout must be a positive number" |
| 127 | +#define STR_CANNOT_CALL_SCRIPT_METHODS \ |
50 | 128 | "Script methods can only be called on script instances." |
51 | | -#define STR_SCRIPT_EXECUTION_TIMEDOUT \ |
52 | | - "Script execution timed out." |
53 | | -#define STR_NOT_STRING_BUFFER \ |
54 | | - "Not a string or buffer" |
55 | | -#define STR_NOT_BUFFER \ |
56 | | - "Not a buffer" |
57 | | -#define STR_SSLV2_METHODS_DISABLED \ |
58 | | - "SSLv2 methods disabled" |
59 | | -#define STR_SSLV3_METHODS_DISABLED \ |
60 | | - "SSLv3 methods disabled" |
61 | | -#define STR_UNKNOWN_METHOD \ |
62 | | - "Unknown method" |
| 129 | +#define STR_SCRIPT_EXECUTION_TIMEDOUT "Script execution timed out." |
| 130 | +#define STR_NOT_STRING_BUFFER "Not a string or buffer" |
| 131 | +#define STR_NOT_BUFFER "Not a buffer" |
| 132 | +#define STR_SSLV2_METHODS_DISABLED "SSLv2 methods disabled" |
| 133 | +#define STR_SSLV3_METHODS_DISABLED "SSLv3 methods disabled" |
| 134 | +#define STR_UNKNOWN_METHOD "Unknown method" |
63 | 135 | #define STR_BAD_PARAMETER "Bad parameter" |
64 | 136 | #define STR_PEM_READ_BIO "PEM_read_bio_PrivateKey" |
65 | 137 | #define STR_CTX_USE_PRIVATEKEY "SSL_CTX_use_PrivateKey" |
|
694 | 766 | "directory. This functionality is deprecated and will be removed soon.") \ |
695 | 767 | XX(MODULE_REQUIREREPL_DEPRECATED, "Module.requireRepl is deprecated.") \ |
696 | 768 | XX(NET_SERVER_CONNECTIONS_DEPRECATED, \ |
697 | | - NODE_DEPRECATE_MESSAGE("Server.connections", \ |
698 | | - "Server.getConnections")) \ |
| 769 | + NODE_DEPRECATE_MESSAGE("Server.connections", "Server.getConnections")) \ |
699 | 770 | XX(NET_SERVER_CONNECTIONS_DEPRECATED_SET, \ |
700 | 771 | "Server.connections property is deprecated.") \ |
701 | 772 | XX(NET_SERVER_LISTENFD_DEPRECATED, \ |
|
0 commit comments