├── .github
├── FUNDING.yaml
└── workflows
│ └── release.yaml
├── .gitignore
├── LICENSE
├── META-INF
└── com
│ └── google
│ └── android
│ ├── update-binary
│ └── updater-script
├── README.md
├── common
├── repo.json
└── service.sh
├── install.sh
├── module.prop
└── system
├── bin
├── grf
└── node
├── etc
├── mkshrc.d
│ └── node_on_android.d.sh
└── node.d
│ └── log.js
├── system_ext
└── bin
│ └── node
├── usr
└── share
│ ├── mmrl
│ └── config
│ │ └── node_on_android
│ │ ├── App.jsx
│ │ ├── index.jsx
│ │ └── locale
│ │ ├── de.json
│ │ ├── en.json
│ │ └── index.js
│ ├── node
│ ├── bin
│ │ └── node
│ └── node_modules
│ │ ├── @android
│ │ ├── os
│ │ │ ├── index.js
│ │ │ ├── package.json
│ │ │ └── src
│ │ │ │ ├── Build.js
│ │ │ │ ├── System.js
│ │ │ │ └── SystemProperties.js
│ │ └── util
│ │ │ ├── index.js
│ │ │ ├── package.json
│ │ │ └── src
│ │ │ └── Log.js
│ │ ├── android
│ │ ├── .gitignore
│ │ ├── .gitmodules
│ │ ├── .prettierrc
│ │ ├── binding.gyp
│ │ ├── build
│ │ │ ├── Makefile
│ │ │ ├── Release
│ │ │ │ ├── .deps
│ │ │ │ │ └── Release
│ │ │ │ │ │ ├── android-os.node.d
│ │ │ │ │ │ ├── android-util.node.d
│ │ │ │ │ │ └── obj.target
│ │ │ │ │ │ ├── android-os.node.d
│ │ │ │ │ │ └── android-util.node.d
│ │ │ │ ├── android-os.node
│ │ │ │ ├── android-util.node
│ │ │ │ └── obj.target
│ │ │ │ │ ├── android-os.node
│ │ │ │ │ └── android-util.node
│ │ │ ├── android-os.target.mk
│ │ │ ├── android-util.target.mk
│ │ │ ├── binding.Makefile
│ │ │ ├── config.gypi
│ │ │ └── node_gyp_bins
│ │ │ │ └── python3
│ │ ├── include
│ │ │ └── internal
│ │ │ │ ├── internal
│ │ │ │ └── properties.h
│ │ │ │ ├── os
│ │ │ │ ├── environment.h
│ │ │ │ ├── properties.h
│ │ │ │ └── system.h
│ │ │ │ └── util
│ │ │ │ ├── audioplayer.h
│ │ │ │ ├── log.h
│ │ │ │ └── sleep.h
│ │ ├── index.js
│ │ ├── lib
│ │ │ ├── Build.js
│ │ │ ├── Environment.js
│ │ │ ├── File.js
│ │ │ ├── Log.js
│ │ │ ├── Magisk.js
│ │ │ ├── MagiskModule.js
│ │ │ ├── System.js
│ │ │ └── SystemProperties.js
│ │ ├── node_modules
│ │ │ ├── .package-lock.json
│ │ │ ├── bindings
│ │ │ │ ├── LICENSE.md
│ │ │ │ ├── README.md
│ │ │ │ ├── bindings.js
│ │ │ │ └── package.json
│ │ │ ├── file-uri-to-path
│ │ │ │ ├── .npmignore
│ │ │ │ ├── .travis.yml
│ │ │ │ ├── History.md
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── index.d.ts
│ │ │ │ ├── index.js
│ │ │ │ ├── package.json
│ │ │ │ └── test
│ │ │ │ │ ├── test.js
│ │ │ │ │ └── tests.json
│ │ │ └── node-addon-api
│ │ │ │ ├── LICENSE.md
│ │ │ │ ├── README.md
│ │ │ │ ├── common.gypi
│ │ │ │ ├── except.gypi
│ │ │ │ ├── index.js
│ │ │ │ ├── napi-inl.deprecated.h
│ │ │ │ ├── napi-inl.h
│ │ │ │ ├── napi.h
│ │ │ │ ├── node_api.gyp
│ │ │ │ ├── noexcept.gypi
│ │ │ │ ├── nothing.c
│ │ │ │ ├── package-support.json
│ │ │ │ ├── package.json
│ │ │ │ └── tools
│ │ │ │ ├── README.md
│ │ │ │ ├── check-napi.js
│ │ │ │ ├── clang-format.js
│ │ │ │ ├── conversion.js
│ │ │ │ └── eslint-format.js
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── android-os.cpp
│ │ │ ├── android-util.cpp
│ │ │ ├── internal
│ │ │ │ └── properties.cpp
│ │ │ ├── os
│ │ │ │ ├── environment.cpp
│ │ │ │ ├── properties.cpp
│ │ │ │ └── system.cpp
│ │ │ └── util
│ │ │ │ ├── audioplayer.cpp
│ │ │ │ ├── log.cpp
│ │ │ │ └── sleep.cpp
│ │ └── test.js
│ │ ├── bindings
│ │ ├── LICENSE.md
│ │ ├── README.md
│ │ ├── bindings.js
│ │ └── package.json
│ │ ├── file-uri-to-path
│ │ ├── .npmignore
│ │ ├── .travis.yml
│ │ ├── History.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── package.json
│ │ └── test
│ │ │ ├── test.js
│ │ │ └── tests.json
│ │ ├── mconf
│ │ ├── Makefile
│ │ ├── binding.gyp
│ │ ├── build
│ │ │ ├── Makefile
│ │ │ ├── Release
│ │ │ │ ├── .deps
│ │ │ │ │ └── Release
│ │ │ │ │ │ ├── mconf.node.d
│ │ │ │ │ │ └── obj.target
│ │ │ │ │ │ ├── mconf.node.d
│ │ │ │ │ │ └── mconf
│ │ │ │ │ │ └── src
│ │ │ │ │ │ └── mconf.o.d
│ │ │ │ ├── mconf.node
│ │ │ │ └── obj.target
│ │ │ │ │ ├── mconf.node
│ │ │ │ │ └── mconf
│ │ │ │ │ └── src
│ │ │ │ │ └── mconf.o
│ │ │ ├── binding.Makefile
│ │ │ ├── config.gypi
│ │ │ ├── mconf.target.mk
│ │ │ └── node_gyp_bins
│ │ │ │ └── python3
│ │ ├── include
│ │ │ └── INIReader.h
│ │ ├── index.js
│ │ ├── lib
│ │ │ └── mconf.js
│ │ ├── node_modules
│ │ │ └── .package-lock.json
│ │ ├── package-lock.json
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── mconf
│ │ │ └── mconf.cpp
│ │ └── test.js
│ │ └── node-addon-api
│ │ ├── LICENSE.md
│ │ ├── README.md
│ │ ├── common.gypi
│ │ ├── except.gypi
│ │ ├── index.js
│ │ ├── napi-inl.deprecated.h
│ │ ├── napi-inl.h
│ │ ├── napi.h
│ │ ├── node_api.gyp
│ │ ├── noexcept.gypi
│ │ ├── nothing.c
│ │ ├── package-support.json
│ │ ├── package.json
│ │ └── tools
│ │ ├── README.md
│ │ ├── check-napi.js
│ │ ├── clang-format.js
│ │ ├── conversion.js
│ │ └── eslint-format.js
│ └── yarn
│ ├── bin
│ ├── yarn
│ ├── yarn.js
│ ├── yarng
│ └── yarnpkg
│ ├── lib
│ ├── cli.js
│ └── v8-compile-cache.js
│ └── package.json
└── vendor
└── bin
└── node
/.github/FUNDING.yaml:
--------------------------------------------------------------------------------
1 | github: DerGoogler
2 |
--------------------------------------------------------------------------------
/.github/workflows/release.yaml:
--------------------------------------------------------------------------------
1 | name: release
2 |
3 | on:
4 | push:
5 | tags: [ v*.*.* ]
6 |
7 | jobs:
8 | deploy:
9 | name: Deploy
10 | runs-on: ubuntu-latest
11 | steps:
12 | - uses: actions/checkout@v2
13 |
14 | - name: Build
15 | run: |
16 | zip -r "${{ env.NAME }}-release.zip" . -x ".git" "README.md" ".github" ".gitignore"
17 | - id: get_version
18 | uses: battila7/get-version-action@v2
19 |
20 | - name: Publish
21 | uses: softprops/action-gh-release@v1
22 | with:
23 | files: '${{ env.NAME }}*'
24 | draft: true
25 |
26 | env:
27 | NAME: 'node'
28 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.zip
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Jimmy Böhm
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/META-INF/com/google/android/update-binary:
--------------------------------------------------------------------------------
1 | #!/sbin/sh
2 |
3 | #################
4 | # Initialization
5 | #################
6 |
7 | umask 022
8 |
9 | # echo before loading util_functions
10 | ui_print() { echo "$1"; }
11 |
12 | require_new_magisk() {
13 | ui_print "*******************************"
14 | ui_print " Please install Magisk v20.4+! "
15 | ui_print "*******************************"
16 | exit 1
17 | }
18 |
19 | #########################
20 | # Load util_functions.sh
21 | #########################
22 |
23 | OUTFD=$2
24 | ZIPFILE=$3
25 |
26 | mount /data 2>/dev/null
27 |
28 | [ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
29 | . /data/adb/magisk/util_functions.sh
30 | [ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk
31 |
32 | install_module
33 | exit 0
--------------------------------------------------------------------------------
/META-INF/com/google/android/updater-script:
--------------------------------------------------------------------------------
1 | #MAGISK
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [nodejs]: https://nodejs.org/en/
2 | [foxmmm]: https://github.com/Fox2Code/FoxMagiskModuleManager
3 |
4 |
5 |
6 |
10 |
11 |
12 |
13 | # Systemless Node.js
14 |
15 | **Disclaimer**
16 | [Node.js][nodejs] are able to read and write the entire system, I'm not responsible for any stolen data, accounts or something. Install it at your own rist!
17 |
18 | # Important!
19 |
20 | Since version `1.1.4` requires this module [Systemless mksh.rc](https://github.com/Magisk-Modules-Alt-Repo/mkshrc) to be installed.
21 |
22 | ## Installation
23 |
24 | Via [MMRL](https://github.com/DerGoogler/MMRL) or via the [MMRL CLI](https://github.com/DerGoogler/MMRL-CLI)
25 |
26 | ```shell
27 | mmrl install -yr node_on_android
28 | ```
29 |
30 | ## Information
31 |
32 | - Some binaries can't be used when `/system` it not linked into `/usr`. You need to charge from `#!/usr/bin/env node` to `#!/system/bin/env node`
33 | - `node-gyp` isn't available. Someone need to ports `python`
34 | - [Learn more](https://github.com/Magisk-Modules-Alt-Repo/node/wiki/Install-Code-Server-and-run-it) how to make `node-gyp` work
35 | - Do not update `yarn` itself. This can break the functionality.
36 |
37 | - Please don't execute global installed binaries on boot. This module need link `/system` to `/usr` first!
38 | - This module uses an own `mkshrc` file, this causes problems with some other modules, like Terminal modifications. Be uninstalling these modules before using this!
39 |
40 | ## Running service files
41 |
42 | Files must be located in `/system/etc/node.d` and running on every boot after 2 minutes.
43 |
44 | Valid file extensions:
45 |
46 | - `*.js`
47 | - `*.cjs`
48 | - `*.mjs`
49 |
50 | ## Installing NPM
51 |
52 | Since 1.1.4 NPM is useable!
53 |
54 | ```shell
55 | # Install npm via yarn
56 | yarn global add npm
57 |
58 | # npm will only works when /system is into /usr linked
59 | # If not - you have to change from "#!/usr/bin/env node" to "#!/system/bin/env node"
60 | nano $(realpath $(which npm))
61 | ```
62 |
63 | ## Googler's Fetcher (grf)
64 |
65 | This is an small binary that just executes npm in a short way
66 |
67 | ### Usage
68 |
69 | ```shell
70 | grf add wget
71 | # grf add audiotools
72 | # grf add bash
73 | ```
74 |
75 | More can you find in [Googlers-Repo/addons](https://github.com/Googlers-Repo/addons)
76 |
77 | ## Module development
78 |
79 | If you want develop global libraries for usage use please:
80 |
81 | ```shell
82 | #!/system/bin/env node
83 | ```
84 |
85 | or this (not recommended)
86 |
87 | ```shell
88 | #!/usr/bin/env node
89 | ```
90 |
91 | > `/system` is linked to `/usr` which makes it possible to execute `npm` or `nodemon`
92 |
93 | ## Installation
94 |
95 | Node.js version: 16.15.1
96 |
97 | Yarn version: 1.23.0
98 |
99 | Module can be downloaded from [FoxMMM][foxmmm]. The instalation should be always be in [FoxMMM][foxmmm].
100 |
101 | **Included binaries**
102 |
103 | - `yarn`
104 | - `node`
105 |
106 | # Node API
107 |
108 | ## Get some properties..
109 |
110 | ```javascript
111 | const { SystemProperties, Build } = require("android");
112 |
113 | const id = SystemProperties.get("ro.build.id");
114 | console.log(id);
115 | // alternatively can you use:
116 | console.log(Build.ID);
117 |
118 | // List props
119 | const props = SystemProperties.list();
120 | // With own callback
121 | // SystemProperties.list((prop)=> {
122 | // console.log(prop)
123 | // });
124 | console.log(props);
125 | ```
126 |
127 | ## Logging
128 |
129 | Logging in JavaScript is 1:1 the same as in Java
130 |
131 | ```javascript
132 | const { Log } = require("android");
133 |
134 | const TAG = "TEST";
135 |
136 | Log.i(TAG, "Logging from JavaScript, %s!", "Kevin");
137 | ```
138 |
139 | Check in logs
140 |
141 | ```shell
142 | logcat -s TEST:*
143 | ```
144 |
145 | ## Environment
146 |
147 | Logging in JavaScript is 1:1 the same as in Java
148 |
149 | ```javascript
150 | const { Environment } = require("android");
151 |
152 | const user = Environment.whoami();
153 | const rootfs = Environment.rootfs();
154 | const home = Environment.homedir();
155 | const tmp = Environment.tmpdir();
156 |
157 | console.log({
158 | user,
159 | home,
160 | rootfs,
161 | tmp,
162 | });
163 |
164 | // 'System.getenv()' is deprecated
165 | const home = Environment.getenv("HOME");
166 | console.log(home);
167 | ```
168 |
169 | > ROOTFS is customizable via `setprop`
170 | > Example: `setprop persist.mkshrc.rootfs /data/`
171 |
--------------------------------------------------------------------------------
/common/repo.json:
--------------------------------------------------------------------------------
1 | {
2 | "license": "MIT",
3 | "support": "https://github.com/Magisk-Modules-Alt-Repo/node/issues",
4 | "donate": "https://github.com/sponsors/DerGoogler",
5 | "cover": "https://github.com/DerGoogler/cdn/blob/master/images/Node.js.Cover.png?raw=true",
6 | "icon": "https://avatars.githubusercontent.com/u/9950313?s=200&v=4",
7 | "require": [
8 | "mkshrc"
9 | ],
10 | "categories": [
11 | "Coding",
12 | "Configurable",
13 | "Tools"
14 | ],
15 | "readme": "https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/node/master/README.md"
16 | }
17 |
--------------------------------------------------------------------------------
/common/service.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 |
3 | MODPATH=${0%/*}
4 |
5 | get_conf_from_file() {
6 | local file="$1"
7 | local default_value="$3"
8 | local value
9 | if [ -f "$file" ]; then
10 | value=$(sed -n "s|^$2 = ||p" "$file" 2>/dev/null)
11 | if [ -z "$value" ]; then
12 | echo "$default_value"
13 | else
14 | echo "$value"
15 | fi
16 | else
17 | echo "$default_value"
18 | fi
19 | }
20 |
21 | node_on_android() { echo "$(get_conf_from_file "/data/adb/mmrl/node_on_android.prop" "$1" "$2")"; }
22 | mkshrc() { echo "$(get_conf_from_file "/data/adb/mmrl/mkshrc.prop" "$1" "$2")"; }
23 |
24 | NODE_PATH="$NODE_PATH:/system/usr/share/node/node_modules"
25 |
26 | ROOTFS=$(mkshrc "rootfs" "/data/mkuser")
27 | ENABLE_SERVICE=$(node_on_android "service" "true")
28 | DESC_TEXT=$(node_on_android "desc" "true")
29 | DISABLE_NOTIFY=$(node_on_android "notify" "true")
30 | ENABLE_LOGGING=$(node_on_android "logging" "false")
31 |
32 | PIDS_DIR="$ROOTFS/var/nodeservice"
33 | PIDS_FILE="$PIDS_DIR/pids.prop"
34 |
35 | _log() {
36 | if [ "$ENABLE_LOGGING" = "true" ];then
37 | if command -v log >/dev/null ; then
38 | log -p "$1" "$2" -t "NodeJs"
39 | fi
40 | fi
41 | }
42 |
43 | notify() {
44 | if [ ! "$DISABLE_NOTIFY" = "false" ]; then
45 | su -lp 2000 -c "cmd notification post -S bigtext -t '$1' '$RANDOM' '$2'"
46 | fi
47 | }
48 |
49 | _setmkservice() {
50 | if [ ! -d "$PIDS_DIR" ]; then
51 | mkdir "$PIDS_DIR"
52 | fi
53 |
54 | if [ ! -f "$PIDS_FILE" ]; then
55 | touch "$PIDS_FILE"
56 | fi
57 |
58 | local thekey="$1"
59 | local newvalue="$2"
60 |
61 | if ! grep -R "^[#]*\s*${thekey}=.*" $PIDS_FILE > /dev/null; then
62 | _log "w" "APPENDING because '${thekey}' not found"
63 | echo "$thekey=$newvalue" >> $PIDS_FILE
64 | else
65 | _log "w" "SETTING because '${thekey}' found already"
66 | sed -ir "s/^[#]*\s*${thekey}=.*/$thekey=$newvalue/" $PIDS_FILE
67 | fi
68 | }
69 |
70 | _getmkservice() {
71 | grep "${1}" "$PIDS_FILE" | cut -d'=' -f2
72 | }
73 |
74 | main() {
75 | if [ -f "$PIDS_FILE" ]; then
76 | rm $PIDS_FILE
77 | fi
78 |
79 | local TITLE="Node.js Service Startup"
80 | local NODE_D="/system/etc/node.d"
81 | local NODE_D_USER="/data/adb/node.d"
82 |
83 | if ! command -v nohup >/dev/null; then
84 | notify "$TITLE" "The \"nohup\" binary was not found! Please ensure you have it installed."
85 | _log "e" "nohup binary wasn't found"
86 | exit 1
87 | fi
88 |
89 | notify "$TITLE" "Start executing scripts in $NODE_D and $NODE_D_USER"
90 |
91 | if [ -d "$NODE_D_USER" ]; then
92 | for script_u in $(ls $NODE_D_USER/* | egrep '\.js$|\.cjs$|\.mjs$'); do
93 | if [ -f $script_u ]; then
94 | nohup node $script_u >/dev/null 2>&1 &
95 | _setmkservice "user_$(basename ${script_u%.*})" "$!"
96 | _log "i" "$script_u has been executed with \"nohup\""
97 | fi
98 | done
99 | else
100 | _log "w" "unable to find $NODE_D_USER folder"
101 | fi
102 |
103 | if [ -d "$NODE_D" ]; then
104 | for script_s in $(ls $NODE_D/* | egrep '\.js$|\.cjs$|\.mjs$'); do
105 | if [ -f $script_s ]; then
106 | nohup node $script_s >/dev/null 2>&1 &
107 | _setmkservice "$(basename ${script_d%.*})" "$!"
108 | _log "i" "$script_s has been executed with \"nohup\""
109 | fi
110 | done
111 | else
112 | _log "w" "unable to find $NODE_D folder"
113 | fi
114 |
115 | if [ "$DESC_TEXT" = "true" ];then
116 | local SERVICE_COUNT=$((`ls -1 $NODE_D_USER | wc -l` + `ls -1 $NODE_D | wc -l`))
117 | cp "$MODPATH/module.prop" "$MODPATH/temp.prop"
118 | sed -Ei "s/^description=(\[.*][[:space:]]*)?/description=[$SERVICE_COUNT Service] /g" "$MODPATH/temp.prop"
119 | mv "$MODPATH/temp.prop" "$MODPATH/module.prop"
120 | fi
121 | unset script_s script_u
122 | }
123 |
124 | while [[ $(getprop sys.boot_completed) -ne 1 ]]; do
125 | sleep 1
126 | done
127 |
128 | sleep 120
129 |
130 | if [ "$ENABLE_SERVICE" = "true" ]; then
131 | main "$@"
132 | fi
--------------------------------------------------------------------------------
/install.sh:
--------------------------------------------------------------------------------
1 | SKIPMOUNT=false
2 | PROPFILE=false
3 | POSTFSDATA=false
4 | LATESTARTSERVICE=true
5 |
6 | print_modname() {
7 | ui_print "======================================="
8 | ui_print " Node.js "
9 | ui_print "---------------------------------------"
10 | ui_print " Running Node.js on "
11 | ui_print " a Android device "
12 | ui_print "---------------------------------------"
13 | ui_print " Magisk-Modules-Alt-Repo/node "
14 | ui_print "======================================="
15 | }
16 |
17 | YARN_HOME=/system/usr/share/yarn
18 | NODE_HOME=/system/usr/share/node
19 | SDK_VERSION=$(getprop ro.build.version.sdk)
20 | MINSDK=23
21 |
22 | findRequire() {
23 | local id="$1" # Get the ID passed to the function
24 |
25 | # Check if the ID exists in BULK_MODULES
26 | local id_in_bulk=$(echo "$BULK_MODULES" | grep -qw "$id" && echo "true" || echo "false")
27 |
28 | # Check if the directory exists
29 | local id_dir_exists=$( [ -d "/data/adb/modules/$id" ] && echo "true" || echo "false" )
30 |
31 | # Return true only if both conditions are met
32 | if [ "$id_in_bulk" = "true" ] || [ "$id_dir_exists" = "true" ]; then
33 | echo "true"
34 | else
35 | echo "false"
36 | fi
37 | }
38 |
39 |
40 | on_install() {
41 | ui_print "- Checking Android SDK version"
42 | ui_print "- SDK version: $SDK_VERSION"
43 | if [ $SDK_VERSION -lt $MINSDK ]; then
44 | abort "Node.js requires Android 6 and above to work!"
45 | fi
46 |
47 | ui_print "- Extracting module files"
48 | unzip -o "$ZIPFILE" 'system/*' -d $MODPATH >&2
49 |
50 | if [ "$(findRequire mkshrc)" = "false" ]; then
51 | echo "! Unable to find Systemless Mkshrc is missing. Cannot find in /data/adb/modules or \$BULK_MODULES"
52 | fi
53 |
54 | [ -d "$MODPATH/system/bin/" ] || mkdir -p "$MODPATH/system/bin/"
55 |
56 | ui_print "- Successfully installed Yarn"
57 | ui_print "- Please reboot where the \"yarn\" command will be available."
58 | }
59 |
60 |
61 | set_permissions() {
62 | # The following is the default rule, DO NOT remove
63 | set_perm_recursive $MODPATH 0 0 0755 0644
64 | set_perm $MODPATH/$NODE_HOME/bin/node 0 0 0755
65 | set_perm $MODPATH/system/system_ext/bin/node 0 0 0755
66 | set_perm $MODPATH/system/vendor/bin/node 0 0 0755
67 | set_perm $MODPATH/system/bin/grf 0 0 0755
68 | set_perm $MODPATH/$YARN_HOME/bin/yarn 0 0 0755
69 | set_perm $MODPATH/$YARN_HOME/bin/yarng 0 0 0755
70 | set_perm $MODPATH/$YARN_HOME/bin/yarn.js 0 0 0755
71 | set_perm $MODPATH/$YARN_HOME/bin/yarnpkg 0 0 0755
72 | }
73 |
--------------------------------------------------------------------------------
/module.prop:
--------------------------------------------------------------------------------
1 | id=node_on_android
2 | name=Systemless Node.js
3 | version=1.6.7
4 | versionCode=167
5 | author=Der_Googler
6 | description=Node.js is a cross-platform, open-source server environment that can run on Windows, Linux, Unix, macOS, and more.
7 |
--------------------------------------------------------------------------------
/system/bin/grf:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 |
3 | # Isolate the environment
4 | (
5 | function printHelp {
6 | echo ""
7 | echo "Usage: grf add [library]"
8 | echo "\t-a, add \t Library to be added"
9 | echo "\t-r, remove \t Library to be removed"
10 | echo "\t-h. help \t Prints the help"
11 | exit 1 # Exit script after printing help
12 | }
13 |
14 | # Checking if core api is available from mkshrc
15 | if [ ! -z $MKLIB ]; then
16 | source $MKLIB/util/setperm.sh
17 | else
18 | echo "grf was not able to find the core api from mkshrc. Do you have mkshrc installed?"
19 | exit 1
20 | fi
21 |
22 | if ! command -v npm >/dev/null; then
23 | echo "Please install NPM with Yarn over the Node.js Magisk Module"
24 | exit 1
25 | fi
26 |
27 | function install {
28 | if [ -z "$1" ]; then
29 | echo "Please enter an valid library name"
30 | fi
31 | $PREFIX/bin/npm install -g "com.googler.$1"
32 | for bin in $PREFIX/lib/node_modules/com.googler.$1/bin/*; do
33 | if [ -f $bin ]; then
34 | echo "Set permission for $bin"
35 | setperm $bin $USER $USER 0755
36 | fi
37 | done
38 | unset bin
39 | }
40 |
41 | function uninstall {
42 | if [ -z "$1" ]; then
43 | echo "Please enter an valid library name"
44 | fi
45 | $PREFIX/bin/npm uninstall -g "com.googler.$1"
46 | }
47 |
48 | while getopts "s:hm:a:r" opt; do
49 | case "$opt" in
50 | a) install $OPTARG ;;
51 | r) uninstall $OPTARG ;;
52 | h) printHelp ;;
53 | esac
54 | done
55 |
56 | while [ "${1:-}" != "" ]; do
57 | case "$1" in
58 | "add")
59 | install $2
60 | ;;
61 | "remove")
62 | uninstall $2
63 | ;;
64 | "help")
65 | printHelp
66 | ;;
67 | esac
68 | shift
69 | done
70 | )
71 |
--------------------------------------------------------------------------------
/system/bin/node:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 | exec /system/usr/share/node/bin/node "$@"
--------------------------------------------------------------------------------
/system/etc/mkshrc.d/node_on_android.d.sh:
--------------------------------------------------------------------------------
1 | ## Node.js module requirements
2 | export PATH="$PATH:/system/usr/share/yarn/bin:$HOME/.config/yarn/global/node_modules/.bin"
3 | export NODE_PATH="$NODE_PATH:/system/usr/share/node/node_modules"
4 |
5 | # Symlink /system into /usr. This is only a requirement for the Node.js module, to make binaries work.
6 | sudo mount -o rw,remount / >/dev/null
7 | if [ ! -d "/usr" ]; then
8 | sudo ln -s -T /system /usr >/dev/null
9 | fi
10 | sudo mount -o ro,remount / >/dev/null
11 |
--------------------------------------------------------------------------------
/system/etc/node.d/log.js:
--------------------------------------------------------------------------------
1 | const { Log } = require("android");
2 | Log.i("Node-Log-Test", "Initial logger initialized");
3 |
--------------------------------------------------------------------------------
/system/system_ext/bin/node:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 | exec /system/usr/share/node/bin/node "$@"
--------------------------------------------------------------------------------
/system/usr/share/mmrl/config/node_on_android/App.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Page, Toolbar } from "@mmrl/ui";
3 | import { useConfig, useActivity, useStrings } from "@mmrl/hooks";
4 | import { BugReport } from "@mui/icons-material";
5 | import { List, Divider, ListItemText, Switch, ListItemButton, ListSubheader, ListItem, ListItemIcon } from "@mui/material";
6 |
7 | function App() {
8 | const { context } = useActivity();
9 | const { strings } = useStrings();
10 |
11 | const [config, setConfig] = useConfig();
12 |
13 | const renderToolbar = () => {
14 | return (
15 |
16 |
17 |
18 |
19 | {strings("title")}
20 |
21 | );
22 | };
23 |
24 | return (
25 |
26 | {strings("service")}}>
27 |
28 |
29 | setConfig("notify", e.target.checked)} />
30 |
31 |
32 |
33 | setConfig("logging", e.target.checked)} />
34 |
35 |
36 |
37 | setConfig("desc", e.target.checked)} />
38 |
39 |
40 |
41 | setConfig("service", e.target.checked)} />
42 |
43 |
44 |
45 |
46 |
47 | {strings("project")}}>
48 |
49 | window.open("https://github.com/Magisk-Modules-Alt-Repo/node/issues")}>
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | );
59 | }
60 |
61 | export { App };
62 |
--------------------------------------------------------------------------------
/system/usr/share/mmrl/config/node_on_android/index.jsx:
--------------------------------------------------------------------------------
1 | import { StringsProvider, ConfigProvider } from "@mmrl/providers";
2 | import { withRequireNewVersion } from "@mmrl/hoc";
3 |
4 | import { locales } from "./locale/index";
5 | import { App } from "./App";
6 |
7 | const configFIle = new SuFile(`/data/adb/mmrl/${__idname}.prop`);
8 | if (!configFIle.exist()) {
9 | configFIle.create();
10 | }
11 |
12 | export default withRequireNewVersion({
13 | versionCode: 21918,
14 | component: () => {
15 | return (
16 |
17 |
27 |
28 |
29 |
30 | );
31 | },
32 | });
33 |
--------------------------------------------------------------------------------
/system/usr/share/mmrl/config/node_on_android/locale/de.json:
--------------------------------------------------------------------------------
1 | {
2 | "report_issue": "Ein Problem melden",
3 | "project": "Projekt",
4 | "logging": "Protokollierung",
5 | "s_up_notify": "Startbenachrichtigung",
6 | "desc_notice": "Beschreibungshinweis",
7 | "desc_notice_sub": "Zeigt einen Text in der Modulbeschreibung an und zeigt an, wie viele Service-Skripte ausgeführt werden"
8 | }
9 |
--------------------------------------------------------------------------------
/system/usr/share/mmrl/config/node_on_android/locale/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Configure Node.js",
3 | "service": "Service",
4 | "report_issue": "Report a issue",
5 | "project": "Project",
6 | "logging": "Logging",
7 | "s_up_notify": "Start up notification",
8 | "desc_notice": "Description notice",
9 | "desc_notice_sub": "Shows a text in the module description and shows how many service scripts are running",
10 | "service_title": "Service",
11 | "service_desc": "Enable start up scripts"
12 | }
13 |
--------------------------------------------------------------------------------
/system/usr/share/mmrl/config/node_on_android/locale/index.js:
--------------------------------------------------------------------------------
1 | import en from "./locale/en";
2 | import de from "./locale/de";
3 |
4 | const locales = {
5 | en: en,
6 | de: de,
7 | };
8 |
9 | export { locales };
10 |
--------------------------------------------------------------------------------
/system/usr/share/node/bin/node:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/node/bc369b99a109b16e354b9f0c24befed61869784d/system/usr/share/node/bin/node
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/@android/os/index.js:
--------------------------------------------------------------------------------
1 | const { Build } = require("./src/Build.js");
2 | const { System } = require("./src/System.js");
3 | const { SystemProperties } = require("./src/SystemProperties.js");
4 | module.exports = { Build, System, SystemProperties };
5 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/@android/os/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@android/os",
3 | "version": "1.0.0",
4 | "main": "index.js",
5 | "type": "commonjs",
6 | "author": "Der_Googler",
7 | "license": "MIT"
8 | }
9 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/@android/os/src/Build.js:
--------------------------------------------------------------------------------
1 | const { SystemProperties } = require("./SystemProperties.js");
2 |
3 | class Build {
4 | static TAG = "Build";
5 | static UNKNOWN = "unknown";
6 | static ID = SystemProperties.get("ro.build.id");
7 | static DISPLAY = SystemProperties.get("ro.build.display.id");
8 | static PRODUCT = SystemProperties.get("ro.product.name");
9 | static DEVICE = SystemProperties.get("ro.product.device");
10 | static BOARD = SystemProperties.get("ro.product.board");
11 | static MANUFACTURER = SystemProperties.get("ro.product.manufacturer");
12 | static BRAND = SystemProperties.get("ro.product.brand");
13 | static MODEL = SystemProperties.get("ro.product.model");
14 | static BOOTLOADER = SystemProperties.get("ro.bootloader");
15 | static HARDWARE = SystemProperties.get("ro.hardware");
16 | static SKU = SystemProperties.get("ro.boot.hardware.sku");
17 | static ODM_SKU = SystemProperties.get("ro.boot.product.hardware.sku");
18 | static IS_EMULATOR = SystemProperties.get("ro.boot.qemu") === "1";
19 | static SERIAL = SystemProperties.get("no.such.thing");
20 | static SUPPORTED_ABIS = SystemProperties.get("ro.product.cpu.abilist").split(",");
21 | static SUPPORTED_32_BIT_ABIS = SystemProperties.getList("ro.product.cpu.abilist32", ",");
22 | static SUPPORTED_64_BIT_ABIS = SystemProperties.getList("ro.product.cpu.abilist64", ",");
23 | static VERSION = class {
24 | static INCREMENTAL = SystemProperties.get("ro.build.version.incremental");
25 | static RELEASE = SystemProperties.get("ro.build.version.release");
26 | static RELEASE_OR_CODENAME = SystemProperties.get("ro.build.version.release_or_codename");
27 | static RELEASE_OR_PREVIEW_DISPLAY = SystemProperties.get("ro.build.version.release_or_preview_display");
28 | static BASE_OS = SystemProperties.get("ro.build.version.base_os", "");
29 | static SECURITY_PATCH = SystemProperties.get("ro.build.version.security_patch", "");
30 | static SDK = SystemProperties.getNumber("ro.build.version.sdk", 0);
31 | static CODENAME = SystemProperties.get("ro.build.version.codename");
32 | static KNOWN_CODENAMES = SystemProperties.getList("ro.build.version.known_codenames", ",");
33 | static ALL_CODENAMES = SystemProperties.getList("ro.build.version.all_codenames", ",");
34 | static MIN_SUPPORTED_TARGET_SDK_INT = SystemProperties.getNumber("ro.build.version.min_supported_target_sdk", 0);
35 | };
36 | static VERSION_CODES = class {
37 | static BASE = 1;
38 | static BASE_1_1 = 2;
39 | static CUPCAKE = 3;
40 | static DONUT = 4;
41 | static ECLAIR = 5;
42 | static ECLAIR_0_1 = 6;
43 | static ECLAIR_MR1 = 7;
44 | static FROYO = 8;
45 | static GINGERBREAD = 9;
46 | static GINGERBREAD_MR1 = 10;
47 | static HONEYCOMB = 11;
48 | static HONEYCOMB_MR1 = 12;
49 | static HONEYCOMB_MR2 = 13;
50 | static ICE_CREAM_SANDWICH = 14;
51 | static ICE_CREAM_SANDWICH_MR1 = 15;
52 | static JELLY_BEAN = 16;
53 | static JELLY_BEAN_MR1 = 17;
54 | static JELLY_BEAN_MR2 = 18;
55 | static KITKAT = 19;
56 | static KITKAT_WATCH = 20;
57 | static L = 21;
58 | static LOLLIPOP = 21;
59 | static LOLLIPOP_MR1 = 22;
60 | static M = 23;
61 | static N = 24;
62 | static N_MR1 = 25;
63 | static O = 26;
64 | static O_MR1 = 27;
65 | static P = 28;
66 | static Q = 29;
67 | static R = 30;
68 | static S = 31;
69 | static S_V2 = 32;
70 | static TIRAMISU = 33;
71 | };
72 | static TYPE = SystemProperties.get("ro.build.type");
73 | static TAGS = SystemProperties.get("ro.build.tags");
74 | static FINGERPRINT = this.deriveFingerprint();
75 | static deriveFingerprint() {
76 | const finger = SystemProperties.get("ro.build.fingerprint", "");
77 | if (finger === "") {
78 | finger =
79 | SystemProperties.get("ro.product.brand") +
80 | "/" +
81 | SystemProperties.get("ro.product.name") +
82 | "/" +
83 | SystemProperties.get("ro.product.device") +
84 | ":" +
85 | SystemProperties.get("ro.build.version.release") +
86 | "/" +
87 | SystemProperties.get("ro.build.id") +
88 | "/" +
89 | SystemProperties.get("ro.build.version.incremental") +
90 | ":" +
91 | SystemProperties.get("ro.build.type") +
92 | "/" +
93 | SystemProperties.get("ro.build.tags");
94 | }
95 | return finger;
96 | }
97 | static HW_TIMEOUT_MULTIPLIER = SystemProperties.getNumber("ro.hw_timeout_multiplier", 1);
98 | static IS_TREBLE_ENABLED = SystemProperties.getBoolean("ro.treble.enabled", false);
99 | static TIME = SystemProperties.getNumber("ro.build.date.utc") * 1000;
100 | static USER = SystemProperties.get("ro.build.user");
101 | static HOST = SystemProperties.get("ro.build.host");
102 | static IS_DEBUGGABLE = SystemProperties.getNumber("ro.debuggable", 0) == 1;
103 | static IS_ARC = SystemProperties.getBoolean("ro.boot.container", false);
104 | }
105 |
106 | module.exports = { Build };
107 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/@android/os/src/System.js:
--------------------------------------------------------------------------------
1 | const { getenv, setenv, cmd } = require("/system/usr/share/node/lib/android-os.node");
2 | const util = require("util");
3 |
4 | class System {
5 | static cmd(c, ...data) {
6 | if (typeof c != "string") throw new Error("the command beeds to be an string");
7 | return cmd(util.format(c, ...data)).trim();
8 | }
9 |
10 | static setenv(name, value, overrid) {
11 | setenv(String(name), String(value), Number(overrid));
12 | }
13 |
14 | static getenv(name) {
15 | if (!name) throw new Error("Undefined name");
16 | return getenv(String(name));
17 | }
18 |
19 | static openApp(pkg, act) {
20 | return this.cmd("am start -n %s/.%s", pkg, act);
21 | }
22 |
23 | static openFile(file, mimeType) {
24 | return this.cmd("am start -a android.intent.action.VIEW -d file://%s -t %s", file, mimeType);
25 | }
26 |
27 | static openUrl(url) {
28 | var pattern = new RegExp(
29 | "^(https?:\\/\\/)?" + // protocol
30 | "((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|" + // domain name
31 | "((\\d{1,3}\\.){3}\\d{1,3}))" + // OR ip (v4) address
32 | "(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*" + // port and path
33 | "(\\?[;&a-z\\d%_.~+=-]*)?" + // query string
34 | "(\\#[-a-z\\d_]*)?$",
35 | "i"
36 | ); // fragment locator
37 | if (!pattern.test(url)) {
38 | throw new Error(`'${url}' is not a valid url!`);
39 | } else {
40 | return this.cmd("am start -a android.intent.action.VIEW -d %s", url);
41 | }
42 | }
43 |
44 | static notify(id, title, message, ...data) {
45 | if (typeof id != "number") throw new Error("The 'id' should be an number");
46 | if (typeof title != "string") throw new Error("The 'title' should be an string");
47 | if (typeof message != "string") throw new Error("The 'message' should be an string");
48 | return this.cmd(`su -lp 2000 -c "cmd notification post -S bigtext -t '${title}' '${id}' '${util.format(message, ...data)}'"`);
49 | }
50 | }
51 |
52 | module.exports = { System };
53 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/@android/os/src/SystemProperties.js:
--------------------------------------------------------------------------------
1 | const { getprop, setprop } = require("/system/usr/share/node/lib/android-os.node");
2 |
3 | class SystemProperties {
4 | static PROP_VALUE_MAX = 91;
5 |
6 | static get(key, def = "") {
7 | return String(getprop(key)) || def;
8 | }
9 |
10 | static getList(key, separator = ",") {
11 | return String(getprop(key)).split(separator) || [];
12 | }
13 |
14 | static getNumber(key, def = 0) {
15 | return Number(getprop(key)) || def;
16 | }
17 |
18 | static getBoolean(key, def = false) {
19 | return getprop(key) === "true" || def;
20 | }
21 |
22 | static set(key, val) {
23 | if (val != null && !key.startsWith("ro.") && val.length > this.PROP_VALUE_MAX) {
24 | throw new Error("value of system property '" + key + "' is longer than " + this.PROP_VALUE_MAX + " bytes: " + val);
25 | }
26 | setprop(key, val);
27 | }
28 | }
29 |
30 | module.exports = { SystemProperties };
31 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/@android/util/index.js:
--------------------------------------------------------------------------------
1 | const { Log } = require("./src/Log.js");
2 | module.exports = { Log };
3 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/@android/util/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@android/util",
3 | "version": "1.0.0",
4 | "main": "index.js",
5 | "type": "commonjs",
6 | "author": "Der_Googler",
7 | "license": "MIT"
8 | }
9 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/@android/util/src/Log.js:
--------------------------------------------------------------------------------
1 | const { __android_log_write } = require("/system/usr/share/node/lib/android-util.node");
2 | const util = require("util");
3 |
4 | class Log {
5 | static VERBOSE = 2;
6 | static DEBUG = 3;
7 | static INFO = 4;
8 | static WARN = 5;
9 | static ERROR = 6;
10 | static v(tag, msg, ...data) {
11 | __android_log_write(this.VERBOSE, String(tag), util.format(msg, ...data));
12 | }
13 | static d(tag, msg, ...data) {
14 | __android_log_write(this.DEBUG, String(tag), util.format(msg, ...data));
15 | }
16 | static i(tag, msg, ...data) {
17 | __android_log_write(this.INFO, String(tag), util.format(msg, ...data));
18 | }
19 | static w(tag, msg, ...data) {
20 | __android_log_write(this.WARN, String(tag), util.format(msg, ...data));
21 | }
22 | static e(tag, msg, ...data) {
23 | __android_log_write(this.ERROR, String(tag), util.format(msg, ...data));
24 | }
25 | }
26 |
27 | module.exports = { Log };
28 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | build
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/.gitmodules:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/node/bc369b99a109b16e354b9f0c24befed61869784d/system/usr/share/node/node_modules/android/.gitmodules
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "printWidth": 250,
3 | "tabWidth": 2,
4 | "useTabs": false,
5 | "semi": true,
6 | "singleQuote": false,
7 | "trailingComma": "es5",
8 | "bracketSpacing": true,
9 | "jsxBracketSameLine": false,
10 | "fluid": false
11 | }
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/binding.gyp:
--------------------------------------------------------------------------------
1 | {
2 | "targets": [
3 | {
4 | "target_name": "android-os",
5 | "include_dirs": [
6 | "/dev/null || (rm -rf "Release/android-os.node" && cp -af "Release/obj.target/android-os.node" "Release/android-os.node")
2 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/build/Release/.deps/Release/android-util.node.d:
--------------------------------------------------------------------------------
1 | cmd_Release/android-util.node := ln -f "Release/obj.target/android-util.node" "Release/android-util.node" 2>/dev/null || (rm -rf "Release/android-util.node" && cp -af "Release/obj.target/android-util.node" "Release/android-util.node")
2 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/build/Release/.deps/Release/obj.target/android-os.node.d:
--------------------------------------------------------------------------------
1 | cmd_Release/obj.target/android-os.node := g++ -o Release/obj.target/android-os.node -shared -rdynamic -fPIC -Wl,-soname=android-os.node -Wl,--start-group Release/obj.target/android-os/src/internal/properties.o Release/obj.target/android-os/src/os/system.o Release/obj.target/android-os/src/os/properties.o Release/obj.target/android-os/src/os/environment.o Release/obj.target/android-os/src/android-os.o -Wl,--end-group -llog
2 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/build/Release/.deps/Release/obj.target/android-util.node.d:
--------------------------------------------------------------------------------
1 | cmd_Release/obj.target/android-util.node := g++ -o Release/obj.target/android-util.node -shared -rdynamic -fPIC -Wl,-soname=android-util.node -Wl,--start-group Release/obj.target/android-util/src/util/log.o Release/obj.target/android-util/src/util/sleep.o Release/obj.target/android-util/src/android-util.o -Wl,--end-group -llog
2 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/build/Release/android-os.node:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/node/bc369b99a109b16e354b9f0c24befed61869784d/system/usr/share/node/node_modules/android/build/Release/android-os.node
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/build/Release/android-util.node:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/node/bc369b99a109b16e354b9f0c24befed61869784d/system/usr/share/node/node_modules/android/build/Release/android-util.node
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/build/Release/obj.target/android-os.node:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/node/bc369b99a109b16e354b9f0c24befed61869784d/system/usr/share/node/node_modules/android/build/Release/obj.target/android-os.node
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/build/Release/obj.target/android-util.node:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/node/bc369b99a109b16e354b9f0c24befed61869784d/system/usr/share/node/node_modules/android/build/Release/obj.target/android-util.node
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/build/android-os.target.mk:
--------------------------------------------------------------------------------
1 | # This file is generated by gyp; do not edit.
2 |
3 | TOOLSET := target
4 | TARGET := android-os
5 | DEFS_Debug := \
6 | '-DNODE_GYP_MODULE_NAME=android-os' \
7 | '-DUSING_UV_SHARED=1' \
8 | '-DUSING_V8_SHARED=1' \
9 | '-DV8_DEPRECATION_WARNINGS=1' \
10 | '-DV8_DEPRECATION_WARNINGS' \
11 | '-DV8_IMMINENT_DEPRECATION_WARNINGS' \
12 | '-D_GLIBCXX_USE_CXX11_ABI=1' \
13 | '-D_LARGEFILE_SOURCE' \
14 | '-D_FILE_OFFSET_BITS=64' \
15 | '-D__STDC_FORMAT_MACROS' \
16 | '-DOPENSSL_NO_PINSHARED' \
17 | '-DOPENSSL_THREADS' \
18 | '-DOPENSSL_NO_ASM' \
19 | '-DNAPI_DISABLE_CPP_EXCEPTIONS' \
20 | '-DBUILDING_NODE_EXTENSION' \
21 | '-D_GLIBCXX_USE_C99_MATH' \
22 | '-DDEBUG' \
23 | '-D_DEBUG' \
24 | '-DV8_ENABLE_CHECKS'
25 |
26 | # Flags passed to all source files.
27 | CFLAGS_Debug := \
28 | -fPIC \
29 | -Wall \
30 | -Wextra \
31 | -Wno-unused-parameter \
32 | -g \
33 | -O0 \
34 | -fPIC
35 |
36 | # Flags passed to only C files.
37 | CFLAGS_C_Debug :=
38 |
39 | # Flags passed to only C++ files.
40 | CFLAGS_CC_Debug := \
41 | -fno-rtti \
42 | -fno-exceptions \
43 | -std=gnu++14
44 |
45 | INCS_Debug := \
46 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/include/node \
47 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/src \
48 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/openssl/config \
49 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/openssl/openssl/include \
50 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/uv/include \
51 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/zlib \
52 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/v8/include \
53 | -I/data/mkuser/home/u0_a203/node-core/include \
54 | -I$(srcdir)/node_modules/node-addon-api
55 |
56 | DEFS_Release := \
57 | '-DNODE_GYP_MODULE_NAME=android-os' \
58 | '-DUSING_UV_SHARED=1' \
59 | '-DUSING_V8_SHARED=1' \
60 | '-DV8_DEPRECATION_WARNINGS=1' \
61 | '-DV8_DEPRECATION_WARNINGS' \
62 | '-DV8_IMMINENT_DEPRECATION_WARNINGS' \
63 | '-D_GLIBCXX_USE_CXX11_ABI=1' \
64 | '-D_LARGEFILE_SOURCE' \
65 | '-D_FILE_OFFSET_BITS=64' \
66 | '-D__STDC_FORMAT_MACROS' \
67 | '-DOPENSSL_NO_PINSHARED' \
68 | '-DOPENSSL_THREADS' \
69 | '-DOPENSSL_NO_ASM' \
70 | '-DNAPI_DISABLE_CPP_EXCEPTIONS' \
71 | '-DBUILDING_NODE_EXTENSION' \
72 | '-D_GLIBCXX_USE_C99_MATH'
73 |
74 | # Flags passed to all source files.
75 | CFLAGS_Release := \
76 | -fPIC \
77 | -Wall \
78 | -Wextra \
79 | -Wno-unused-parameter \
80 | -O3 \
81 | -fno-omit-frame-pointer \
82 | -fPIC
83 |
84 | # Flags passed to only C files.
85 | CFLAGS_C_Release :=
86 |
87 | # Flags passed to only C++ files.
88 | CFLAGS_CC_Release := \
89 | -fno-rtti \
90 | -fno-exceptions \
91 | -std=gnu++14
92 |
93 | INCS_Release := \
94 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/include/node \
95 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/src \
96 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/openssl/config \
97 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/openssl/openssl/include \
98 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/uv/include \
99 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/zlib \
100 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/v8/include \
101 | -I/data/mkuser/home/u0_a203/node-core/include \
102 | -I$(srcdir)/node_modules/node-addon-api
103 |
104 | OBJS := \
105 | $(obj).target/$(TARGET)/src/internal/properties.o \
106 | $(obj).target/$(TARGET)/src/os/system.o \
107 | $(obj).target/$(TARGET)/src/os/properties.o \
108 | $(obj).target/$(TARGET)/src/os/environment.o \
109 | $(obj).target/$(TARGET)/src/android-os.o
110 |
111 | # Add to the list of files we specially track dependencies for.
112 | all_deps += $(OBJS)
113 |
114 | # CFLAGS et al overrides must be target-local.
115 | # See "Target-specific Variable Values" in the GNU Make manual.
116 | $(OBJS): TOOLSET := $(TOOLSET)
117 | $(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
118 | $(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
119 |
120 | # Suffix rules, putting all outputs into $(obj).
121 |
122 | $(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
123 | @$(call do_cmd,cxx,1)
124 |
125 | # Try building from generated source, too.
126 |
127 | $(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
128 | @$(call do_cmd,cxx,1)
129 |
130 | $(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
131 | @$(call do_cmd,cxx,1)
132 |
133 | # End of this set of suffix rules
134 | ### Rules for final target.
135 | LDFLAGS_Debug := \
136 | -rdynamic \
137 | -fPIC
138 |
139 | LDFLAGS_Release := \
140 | -rdynamic \
141 | -fPIC
142 |
143 | LIBS := \
144 | -llog
145 |
146 | $(obj).target/android-os.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
147 | $(obj).target/android-os.node: LIBS := $(LIBS)
148 | $(obj).target/android-os.node: TOOLSET := $(TOOLSET)
149 | $(obj).target/android-os.node: $(OBJS) FORCE_DO_CMD
150 | $(call do_cmd,solink_module)
151 |
152 | all_deps += $(obj).target/android-os.node
153 | # Add target alias
154 | .PHONY: android-os
155 | android-os: $(builddir)/android-os.node
156 |
157 | # Copy this to the executable output path.
158 | $(builddir)/android-os.node: TOOLSET := $(TOOLSET)
159 | $(builddir)/android-os.node: $(obj).target/android-os.node FORCE_DO_CMD
160 | $(call do_cmd,copy)
161 |
162 | all_deps += $(builddir)/android-os.node
163 | # Short alias for building this executable.
164 | .PHONY: android-os.node
165 | android-os.node: $(obj).target/android-os.node $(builddir)/android-os.node
166 |
167 | # Add executable to "all" target.
168 | .PHONY: all
169 | all: $(builddir)/android-os.node
170 |
171 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/build/android-util.target.mk:
--------------------------------------------------------------------------------
1 | # This file is generated by gyp; do not edit.
2 |
3 | TOOLSET := target
4 | TARGET := android-util
5 | DEFS_Debug := \
6 | '-DNODE_GYP_MODULE_NAME=android-util' \
7 | '-DUSING_UV_SHARED=1' \
8 | '-DUSING_V8_SHARED=1' \
9 | '-DV8_DEPRECATION_WARNINGS=1' \
10 | '-DV8_DEPRECATION_WARNINGS' \
11 | '-DV8_IMMINENT_DEPRECATION_WARNINGS' \
12 | '-D_GLIBCXX_USE_CXX11_ABI=1' \
13 | '-D_LARGEFILE_SOURCE' \
14 | '-D_FILE_OFFSET_BITS=64' \
15 | '-D__STDC_FORMAT_MACROS' \
16 | '-DOPENSSL_NO_PINSHARED' \
17 | '-DOPENSSL_THREADS' \
18 | '-DOPENSSL_NO_ASM' \
19 | '-DNAPI_DISABLE_CPP_EXCEPTIONS' \
20 | '-DBUILDING_NODE_EXTENSION' \
21 | '-D_GLIBCXX_USE_C99_MATH' \
22 | '-DDEBUG' \
23 | '-D_DEBUG' \
24 | '-DV8_ENABLE_CHECKS'
25 |
26 | # Flags passed to all source files.
27 | CFLAGS_Debug := \
28 | -fPIC \
29 | -Wall \
30 | -Wextra \
31 | -Wno-unused-parameter \
32 | -g \
33 | -O0 \
34 | -fPIC
35 |
36 | # Flags passed to only C files.
37 | CFLAGS_C_Debug :=
38 |
39 | # Flags passed to only C++ files.
40 | CFLAGS_CC_Debug := \
41 | -fno-rtti \
42 | -fno-exceptions \
43 | -std=gnu++14
44 |
45 | INCS_Debug := \
46 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/include/node \
47 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/src \
48 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/openssl/config \
49 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/openssl/openssl/include \
50 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/uv/include \
51 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/zlib \
52 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/v8/include \
53 | -I/data/mkuser/home/u0_a203/node-core/include \
54 | -I$(srcdir)/node_modules/node-addon-api
55 |
56 | DEFS_Release := \
57 | '-DNODE_GYP_MODULE_NAME=android-util' \
58 | '-DUSING_UV_SHARED=1' \
59 | '-DUSING_V8_SHARED=1' \
60 | '-DV8_DEPRECATION_WARNINGS=1' \
61 | '-DV8_DEPRECATION_WARNINGS' \
62 | '-DV8_IMMINENT_DEPRECATION_WARNINGS' \
63 | '-D_GLIBCXX_USE_CXX11_ABI=1' \
64 | '-D_LARGEFILE_SOURCE' \
65 | '-D_FILE_OFFSET_BITS=64' \
66 | '-D__STDC_FORMAT_MACROS' \
67 | '-DOPENSSL_NO_PINSHARED' \
68 | '-DOPENSSL_THREADS' \
69 | '-DOPENSSL_NO_ASM' \
70 | '-DNAPI_DISABLE_CPP_EXCEPTIONS' \
71 | '-DBUILDING_NODE_EXTENSION' \
72 | '-D_GLIBCXX_USE_C99_MATH'
73 |
74 | # Flags passed to all source files.
75 | CFLAGS_Release := \
76 | -fPIC \
77 | -Wall \
78 | -Wextra \
79 | -Wno-unused-parameter \
80 | -O3 \
81 | -fno-omit-frame-pointer \
82 | -fPIC
83 |
84 | # Flags passed to only C files.
85 | CFLAGS_C_Release :=
86 |
87 | # Flags passed to only C++ files.
88 | CFLAGS_CC_Release := \
89 | -fno-rtti \
90 | -fno-exceptions \
91 | -std=gnu++14
92 |
93 | INCS_Release := \
94 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/include/node \
95 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/src \
96 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/openssl/config \
97 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/openssl/openssl/include \
98 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/uv/include \
99 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/zlib \
100 | -I/data/mkuser/home/u0_a203/.cache/node-gyp/16.15.1/deps/v8/include \
101 | -I/data/mkuser/home/u0_a203/node-core/include \
102 | -I$(srcdir)/node_modules/node-addon-api
103 |
104 | OBJS := \
105 | $(obj).target/$(TARGET)/src/util/log.o \
106 | $(obj).target/$(TARGET)/src/util/sleep.o \
107 | $(obj).target/$(TARGET)/src/android-util.o
108 |
109 | # Add to the list of files we specially track dependencies for.
110 | all_deps += $(OBJS)
111 |
112 | # CFLAGS et al overrides must be target-local.
113 | # See "Target-specific Variable Values" in the GNU Make manual.
114 | $(OBJS): TOOLSET := $(TOOLSET)
115 | $(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
116 | $(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
117 |
118 | # Suffix rules, putting all outputs into $(obj).
119 |
120 | $(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
121 | @$(call do_cmd,cxx,1)
122 |
123 | # Try building from generated source, too.
124 |
125 | $(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
126 | @$(call do_cmd,cxx,1)
127 |
128 | $(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
129 | @$(call do_cmd,cxx,1)
130 |
131 | # End of this set of suffix rules
132 | ### Rules for final target.
133 | LDFLAGS_Debug := \
134 | -rdynamic \
135 | -fPIC
136 |
137 | LDFLAGS_Release := \
138 | -rdynamic \
139 | -fPIC
140 |
141 | LIBS := \
142 | -llog
143 |
144 | $(obj).target/android-util.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
145 | $(obj).target/android-util.node: LIBS := $(LIBS)
146 | $(obj).target/android-util.node: TOOLSET := $(TOOLSET)
147 | $(obj).target/android-util.node: $(OBJS) FORCE_DO_CMD
148 | $(call do_cmd,solink_module)
149 |
150 | all_deps += $(obj).target/android-util.node
151 | # Add target alias
152 | .PHONY: android-util
153 | android-util: $(builddir)/android-util.node
154 |
155 | # Copy this to the executable output path.
156 | $(builddir)/android-util.node: TOOLSET := $(TOOLSET)
157 | $(builddir)/android-util.node: $(obj).target/android-util.node FORCE_DO_CMD
158 | $(call do_cmd,copy)
159 |
160 | all_deps += $(builddir)/android-util.node
161 | # Short alias for building this executable.
162 | .PHONY: android-util.node
163 | android-util.node: $(obj).target/android-util.node $(builddir)/android-util.node
164 |
165 | # Add executable to "all" target.
166 | .PHONY: all
167 | all: $(builddir)/android-util.node
168 |
169 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/build/binding.Makefile:
--------------------------------------------------------------------------------
1 | # This file is generated by gyp; do not edit.
2 |
3 | export builddir_name ?= ./build/.
4 | .PHONY: all
5 | all:
6 | $(MAKE) android-util android-os
7 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/build/node_gyp_bins/python3:
--------------------------------------------------------------------------------
1 | /data/mkuser/home/u0_a203/.local/bin/python
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/include/internal/internal/properties.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #pragma once
18 |
19 | #include
20 | #include
21 | #include
22 |
23 | #if __has_include()
24 | #include
25 | #else
26 | #define PROP_VALUE_MAX 92
27 | #endif
28 |
29 | #ifdef __cplusplus
30 | extern "C" {
31 | #endif
32 |
33 | //
34 | // Deprecated.
35 | //
36 | // See for better API.
37 | //
38 |
39 | #define PROPERTY_KEY_MAX PROP_NAME_MAX
40 | #define PROPERTY_VALUE_MAX PROP_VALUE_MAX
41 |
42 | /* property_get: returns the length of the value which will never be
43 | ** greater than PROPERTY_VALUE_MAX - 1 and will always be zero terminated.
44 | ** (the length does not include the terminating zero).
45 | **
46 | ** If the property read fails or returns an empty value, the default
47 | ** value is used (if nonnull).
48 | */
49 | int property_get(const char* key, char* value, const char* default_value);
50 |
51 | /* property_get_bool: returns the value of key coerced into a
52 | ** boolean. If the property is not set, then the default value is returned.
53 | **
54 | * The following is considered to be true (1):
55 | ** "1", "true", "y", "yes", "on"
56 | **
57 | ** The following is considered to be false (0):
58 | ** "0", "false", "n", "no", "off"
59 | **
60 | ** The conversion is whitespace-sensitive (e.g. " off" will not be false).
61 | **
62 | ** If no property with this key is set (or the key is NULL) or the boolean
63 | ** conversion fails, the default value is returned.
64 | **/
65 | int8_t property_get_bool(const char *key, int8_t default_value);
66 |
67 | /* property_get_int64: returns the value of key truncated and coerced into a
68 | ** int64_t. If the property is not set, then the default value is used.
69 | **
70 | ** The numeric conversion is identical to strtoimax with the base inferred:
71 | ** - All digits up to the first non-digit characters are read
72 | ** - The longest consecutive prefix of digits is converted to a long
73 | **
74 | ** Valid strings of digits are:
75 | ** - An optional sign character + or -
76 | ** - An optional prefix indicating the base (otherwise base 10 is assumed)
77 | ** -- 0 prefix is octal
78 | ** -- 0x / 0X prefix is hex
79 | **
80 | ** Leading/trailing whitespace is ignored. Overflow/underflow will cause
81 | ** numeric conversion to fail.
82 | **
83 | ** If no property with this key is set (or the key is NULL) or the numeric
84 | ** conversion fails, the default value is returned.
85 | **/
86 | int64_t property_get_int64(const char *key, int64_t default_value);
87 |
88 | /* property_get_int32: returns the value of key truncated and coerced into an
89 | ** int32_t. If the property is not set, then the default value is used.
90 | **
91 | ** The numeric conversion is identical to strtoimax with the base inferred:
92 | ** - All digits up to the first non-digit characters are read
93 | ** - The longest consecutive prefix of digits is converted to a long
94 | **
95 | ** Valid strings of digits are:
96 | ** - An optional sign character + or -
97 | ** - An optional prefix indicating the base (otherwise base 10 is assumed)
98 | ** -- 0 prefix is octal
99 | ** -- 0x / 0X prefix is hex
100 | **
101 | ** Leading/trailing whitespace is ignored. Overflow/underflow will cause
102 | ** numeric conversion to fail.
103 | **
104 | ** If no property with this key is set (or the key is NULL) or the numeric
105 | ** conversion fails, the default value is returned.
106 | **/
107 | int32_t property_get_int32(const char *key, int32_t default_value);
108 |
109 | /* property_set: returns 0 on success, < 0 on failure
110 | */
111 | int property_set(const char *key, const char *value);
112 |
113 | int property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie);
114 |
115 | #if defined(__BIONIC_FORTIFY)
116 | #define __property_get_err_str "property_get() called with too small of a buffer"
117 |
118 | #if defined(__clang__)
119 |
120 | /* Some projects use -Weverything; diagnose_if is clang-specific. */
121 | #pragma clang diagnostic push
122 | #pragma clang diagnostic ignored "-Wgcc-compat"
123 | int property_get(const char* key, char* value, const char* default_value)
124 | __clang_error_if(__bos(value) != __BIONIC_FORTIFY_UNKNOWN_SIZE &&
125 | __bos(value) < PROPERTY_VALUE_MAX,
126 | __property_get_err_str);
127 | #pragma clang diagnostic pop
128 |
129 | #else /* defined(__clang__) */
130 |
131 | extern int __property_get_real(const char *, char *, const char *)
132 | __asm__(__USER_LABEL_PREFIX__ "property_get");
133 | __errordecl(__property_get_too_small_error, __property_get_err_str);
134 |
135 | __BIONIC_FORTIFY_INLINE
136 | int property_get(const char *key, char *value, const char *default_value) {
137 | size_t bos = __bos(value);
138 | if (bos < PROPERTY_VALUE_MAX) {
139 | __property_get_too_small_error();
140 | }
141 | return __property_get_real(key, value, default_value);
142 | }
143 |
144 | #endif /* defined(__clang__) */
145 |
146 | #undef __property_get_err_str
147 | #endif /* defined(__BIONIC_FORTIFY) */
148 |
149 | #ifdef __cplusplus
150 | }
151 | #endif
152 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/include/internal/os/environment.h:
--------------------------------------------------------------------------------
1 | #ifndef ENVIRONNMENT_H
2 | #define ENVIRONNMENT_H
3 |
4 | #include
5 |
6 | using namespace Napi;
7 |
8 | class BaseEnvironment : public Napi::ObjectWrap {
9 | public:
10 | static Napi::Object Init(Napi::Env env, Napi::Object exports);
11 | BaseEnvironment(const Napi::CallbackInfo& info);
12 | static Napi::Value CreateNewItem(const Napi::CallbackInfo& info);
13 |
14 | private:
15 | static Napi::Value GetEnv(const Napi::CallbackInfo& info);
16 | static Napi::Value SetEnv(const Napi::CallbackInfo& info);
17 | static Napi::Value Uname(const Napi::CallbackInfo& info);
18 | static Napi::Value WhoAmI(const Napi::CallbackInfo& info);
19 | };
20 |
21 | #endif
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/include/internal/os/properties.h:
--------------------------------------------------------------------------------
1 | #ifndef PROPERTIES_H
2 | #define PROPERTIES_H
3 |
4 | #include
5 |
6 | using namespace Napi;
7 |
8 | class BaseProperties : public Napi::ObjectWrap {
9 | public:
10 | static Napi::Object Init(Napi::Env env, Napi::Object exports);
11 | BaseProperties(const Napi::CallbackInfo& info);
12 | static Napi::Value CreateNewItem(const Napi::CallbackInfo& info);
13 |
14 | private:
15 | static Napi::Value GetProp(const Napi::CallbackInfo& info);
16 | static Napi::Value GetPropBool(const Napi::CallbackInfo& info);
17 | static Napi::Value GetPropInt(const Napi::CallbackInfo& info);
18 | static Napi::Value SetProp(const Napi::CallbackInfo& info);
19 | static Napi::Value ListProps(const Napi::CallbackInfo& info);
20 | };
21 |
22 | #endif
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/include/internal/os/system.h:
--------------------------------------------------------------------------------
1 | #ifndef SYSTEM_H
2 | #define SYSTEM_H
3 |
4 | #include
5 |
6 | using namespace Napi;
7 |
8 | class BaseSystem : public Napi::ObjectWrap {
9 | public:
10 | static Napi::Object Init(Napi::Env env, Napi::Object exports);
11 | BaseSystem(const Napi::CallbackInfo& info);
12 | static Napi::Value CreateNewItem(const Napi::CallbackInfo& info);
13 |
14 | private:
15 | static Napi::Value GetEnv(const Napi::CallbackInfo& info);
16 | static Napi::Value SetEnv(const Napi::CallbackInfo& info);
17 | static Napi::Value Cmd(const Napi::CallbackInfo& info);
18 | static Napi::Value Spawn(const Napi::CallbackInfo& info);
19 | };
20 |
21 | #endif
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/include/internal/util/audioplayer.h:
--------------------------------------------------------------------------------
1 | #ifndef AUDIOPLAYER_H
2 | #define AUDIOPLAYER_H
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | using namespace Napi;
9 |
10 | class BaseAudioPlayer : public Napi::ObjectWrap {
11 | public:
12 | static Napi::Object Init(Napi::Env env, Napi::Object exports);
13 | BaseAudioPlayer(const Napi::CallbackInfo& info);
14 | ~BaseAudioPlayer();
15 | static Napi::Value CreateNewItem(const Napi::CallbackInfo& info);
16 | // void play(char const* uri);
17 |
18 |
19 |
20 | /**
21 | * This allows setting the stream type (default:SL_ANDROID_STREAM_MEDIA):
22 | * SL_ANDROID_STREAM_ALARM - same as android.media.AudioManager.STREAM_ALARM
23 | * SL_ANDROID_STREAM_MEDIA - same as android.media.AudioManager.STREAM_MUSIC
24 | * SL_ANDROID_STREAM_NOTIFICATION - same as android.media.AudioManager.STREAM_NOTIFICATION
25 | * SL_ANDROID_STREAM_RING - same as android.media.AudioManager.STREAM_RING
26 | * SL_ANDROID_STREAM_SYSTEM - same as android.media.AudioManager.STREAM_SYSTEM
27 | * SL_ANDROID_STREAM_VOICE - same as android.media.AudioManager.STREAM_VOICE_CALL
28 | */
29 | // void setStreamType(SLint32 streamType) { this->androidStreamType = streamType; }
30 | private:
31 | int streamType;
32 | Napi::Value Play(const Napi::CallbackInfo& info);
33 | Napi::Value SetStreamType(const Napi::CallbackInfo& info);
34 | SLObjectItf mSlEngineObject{NULL};
35 | SLEngineItf mSlEngineInterface{NULL};
36 | SLObjectItf mSlOutputMixObject{NULL};
37 | SLint32 androidStreamType{SL_ANDROID_STREAM_MEDIA};
38 | };
39 |
40 | #endif
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/include/internal/util/log.h:
--------------------------------------------------------------------------------
1 | #ifndef LOG_H
2 | #define LOG_H
3 |
4 | #include
5 |
6 | using namespace Napi;
7 |
8 | class BaseLog : public Napi::ObjectWrap {
9 | public:
10 | static Napi::Object Init(Napi::Env env, Napi::Object exports);
11 | BaseLog(const Napi::CallbackInfo& info);
12 | static Napi::Value CreateNewItem(const Napi::CallbackInfo& info);
13 |
14 | private:
15 | static Napi::Value NativeLog(const Napi::CallbackInfo& info);
16 | };
17 |
18 | #endif
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/include/internal/util/sleep.h:
--------------------------------------------------------------------------------
1 | #ifndef SLEEP_H
2 | #define SLEEP_H
3 |
4 | #include
5 |
6 | using namespace Napi;
7 |
8 | Value Sleep(const CallbackInfo& info);
9 |
10 | #endif
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/index.js:
--------------------------------------------------------------------------------
1 | const { Build } = require("./lib/Build.js");
2 | const { System } = require("./lib/System.js");
3 | const { SystemProperties } = require("./lib/SystemProperties.js");
4 | const { Log } = require("./lib/Log.js");
5 | const { File } = require("./lib/File.js");
6 | const { sleep } = require("bindings")("android-util.node");
7 | const { Environment } = require("./lib/Environment.js");
8 |
9 | module.exports = {
10 | Build,
11 | System,
12 | SystemProperties,
13 | Log,
14 | File,
15 | sleep,
16 | Environment,
17 | };
18 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/lib/Build.js:
--------------------------------------------------------------------------------
1 | const { SystemProperties } = require("./SystemProperties.js");
2 |
3 | /**
4 | * Information about the current build, extracted from system properties.
5 | */
6 | class Build {
7 | static TAG = "Build";
8 | static UNKNOWN = "unknown";
9 | static ID = SystemProperties.get("ro.build.id");
10 | static DISPLAY = SystemProperties.get("ro.build.display.id");
11 | static PRODUCT = SystemProperties.get("ro.product.name");
12 | static DEVICE = SystemProperties.get("ro.product.device");
13 | static BOARD = SystemProperties.get("ro.product.board");
14 | static MANUFACTURER = SystemProperties.get("ro.product.manufacturer");
15 | static BRAND = SystemProperties.get("ro.product.brand");
16 | static MODEL = SystemProperties.get("ro.product.model");
17 | static BOOTLOADER = SystemProperties.get("ro.bootloader");
18 | static HARDWARE = SystemProperties.get("ro.hardware");
19 | static SKU = SystemProperties.get("ro.boot.hardware.sku");
20 | static ODM_SKU = SystemProperties.get("ro.boot.product.hardware.sku");
21 | static LOCKED = SystemProperties.get("ro.boot.flash.locked") === "0";
22 | static IS_EMULATOR = SystemProperties.get("ro.boot.qemu") === "1";
23 | static SERIAL = SystemProperties.get("no.such.thing");
24 | static SUPPORTED_ABIS = SystemProperties.get("ro.product.cpu.abilist").split(",");
25 | static SUPPORTED_32_BIT_ABIS = SystemProperties.getList("ro.product.cpu.abilist32", ",");
26 | static SUPPORTED_64_BIT_ABIS = SystemProperties.getList("ro.product.cpu.abilist64", ",");
27 | /**
28 | * Various version strings.
29 | */
30 | static VERSION = class {
31 | static INCREMENTAL = SystemProperties.get("ro.build.version.incremental");
32 | static RELEASE = SystemProperties.get("ro.build.version.release");
33 | static RELEASE_OR_CODENAME = SystemProperties.get("ro.build.version.release_or_codename");
34 | static RELEASE_OR_PREVIEW_DISPLAY = SystemProperties.get("ro.build.version.release_or_preview_display");
35 | static BASE_OS = SystemProperties.get("ro.build.version.base_os", "");
36 | static SECURITY_PATCH = SystemProperties.get("ro.build.version.security_patch", "");
37 | static SDK = SystemProperties.getInt("ro.build.version.sdk", 0);
38 | static CODENAME = SystemProperties.get("ro.build.version.codename");
39 | static KNOWN_CODENAMES = SystemProperties.getList("ro.build.version.known_codenames", ",");
40 | static ALL_CODENAMES = SystemProperties.getList("ro.build.version.all_codenames", ",");
41 | static MIN_SUPPORTED_TARGET_SDK_INT = SystemProperties.getInt("ro.build.version.min_supported_target_sdk", 0);
42 | static require(version) {
43 | if (typeof version != "number") {
44 | throw new TypeError("The version should be an string")
45 | }
46 | return this.SDK >= version;
47 | }
48 | };
49 | static VERSION_CODES = class {
50 | static BASE = 1;
51 | static BASE_1_1 = 2;
52 | static CUPCAKE = 3;
53 | static DONUT = 4;
54 | static ECLAIR = 5;
55 | static ECLAIR_0_1 = 6;
56 | static ECLAIR_MR1 = 7;
57 | static FROYO = 8;
58 | static GINGERBREAD = 9;
59 | static GINGERBREAD_MR1 = 10;
60 | static HONEYCOMB = 11;
61 | static HONEYCOMB_MR1 = 12;
62 | static HONEYCOMB_MR2 = 13;
63 | static ICE_CREAM_SANDWICH = 14;
64 | static ICE_CREAM_SANDWICH_MR1 = 15;
65 | static JELLY_BEAN = 16;
66 | static JELLY_BEAN_MR1 = 17;
67 | static JELLY_BEAN_MR2 = 18;
68 | static KITKAT = 19;
69 | static KITKAT_WATCH = 20;
70 | static L = 21;
71 | static LOLLIPOP = 21;
72 | static LOLLIPOP_MR1 = 22;
73 | static M = 23;
74 | static N = 24;
75 | static N_MR1 = 25;
76 | static O = 26;
77 | static O_MR1 = 27;
78 | static P = 28;
79 | static Q = 29;
80 | static R = 30;
81 | static S = 31;
82 | static S_V2 = 32;
83 | static TIRAMISU = 33;
84 | };
85 | static TYPE = SystemProperties.get("ro.build.type");
86 | static TAGS = SystemProperties.get("ro.build.tags");
87 | static FINGERPRINT = this.deriveFingerprint();
88 | static deriveFingerprint() {
89 | const finger = SystemProperties.get("ro.build.fingerprint", "");
90 | if (finger === "") {
91 | finger =
92 | SystemProperties.get("ro.product.brand") +
93 | "/" +
94 | SystemProperties.get("ro.product.name") +
95 | "/" +
96 | SystemProperties.get("ro.product.device") +
97 | ":" +
98 | SystemProperties.get("ro.build.version.release") +
99 | "/" +
100 | SystemProperties.get("ro.build.id") +
101 | "/" +
102 | SystemProperties.get("ro.build.version.incremental") +
103 | ":" +
104 | SystemProperties.get("ro.build.type") +
105 | "/" +
106 | SystemProperties.get("ro.build.tags");
107 | }
108 | return finger;
109 | }
110 | static HW_TIMEOUT_MULTIPLIER = SystemProperties.getInt("ro.hw_timeout_multiplier", 1);
111 | static IS_TREBLE_ENABLED = SystemProperties.getBoolean("ro.treble.enabled", false);
112 | static TIME = SystemProperties.getInt("ro.build.date.utc") * 1000;
113 | static USER = SystemProperties.get("ro.build.user");
114 | static HOST = SystemProperties.get("ro.build.host");
115 | static IS_DEBUGGABLE = SystemProperties.getInt("ro.debuggable", 0) == 1;
116 | static IS_ARC = SystemProperties.getBoolean("ro.boot.container", false);
117 | }
118 |
119 | module.exports = { Build };
120 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/lib/Environment.js:
--------------------------------------------------------------------------------
1 | const { BaseEnvironment } = require("bindings")("android-os.node");
2 | const { SystemProperties } = require("./SystemProperties.js");
3 | const { mconf } = require("mconf");
4 |
5 | class Environment extends BaseEnvironment {
6 | constructor() {
7 | super();
8 | }
9 |
10 | static setenv(name, value, overrid = 1) {
11 | if (!name) throw new TypeError("Undefined name");
12 | if (!value) throw new TypeError("Undefined value");
13 | super.setenv(String(name), String(value), Number(overrid));
14 | }
15 |
16 | static getenv(name) {
17 | if (!name) throw new TypeError("Undefined name");
18 | return super.getenv(String(name));
19 | }
20 |
21 | static rootfs() {
22 | return mconf("mkshrc", "rootfs", "/data/mkuser");
23 | }
24 |
25 | static whoami() {
26 | return super.whoami();
27 | }
28 |
29 | static homedir() {
30 | if (this.whoami() == "root") {
31 | return this.rootfs() + "/root";
32 | } else {
33 | return this.rootfs() + "/home/" + this.whoami();
34 | }
35 | }
36 |
37 | static tmpdir() {
38 | return this.rootfs() + "/tmp";
39 | }
40 | }
41 |
42 | module.exports = { Environment };
43 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/lib/File.js:
--------------------------------------------------------------------------------
1 | const fs = require("fs");
2 |
3 | class File {
4 | constructor(file) {
5 | this._file = file;
6 | }
7 |
8 | canAccess() {
9 | try {
10 | fs.accessSync(this._file, fs.constants.R_OK | fs.constants.W_OK);
11 | return true;
12 | } catch (err) {
13 | return err;
14 | }
15 | }
16 |
17 | write(data) {
18 | try {
19 | fs.writeFileSync(this._file, data);
20 | } catch (err) {
21 | throw new Error(err);
22 | }
23 | }
24 |
25 | read() {
26 | try {
27 | return fs.readFileSync(this._file, "utf8");
28 | } catch (err) {
29 | throw new Error(err);
30 | }
31 | }
32 |
33 | delete() {
34 | try {
35 | fs.unlinkSync(this._file);
36 | } catch (err) {
37 | throw new Error(err);
38 | }
39 | }
40 | }
41 |
42 | module.exports = { File };
43 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/lib/Log.js:
--------------------------------------------------------------------------------
1 | const util = require("util");
2 | const { BaseLog } = require("bindings")("android-util.node");
3 |
4 | class Log extends BaseLog {
5 | static VERBOSE = 2;
6 | static DEBUG = 3;
7 | static INFO = 4;
8 | static WARN = 5;
9 | static ERROR = 6;
10 | static v(tag, msg, ...data) {
11 | super.native_log(this.VERBOSE, String(tag), util.format(msg, ...data));
12 | }
13 | static d(tag, msg, ...data) {
14 | super.native_log(this.DEBUG, String(tag), util.format(msg, ...data));
15 | }
16 | static i(tag, msg, ...data) {
17 | super.native_log(this.INFO, String(tag), util.format(msg, ...data));
18 | }
19 | static w(tag, msg, ...data) {
20 | super.native_log(this.WARN, String(tag), util.format(msg, ...data));
21 | }
22 | static e(tag, msg, ...data) {
23 | super.native_log(this.ERROR, String(tag), util.format(msg, ...data));
24 | }
25 | }
26 |
27 | module.exports = { Log };
28 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/lib/Magisk.js:
--------------------------------------------------------------------------------
1 | const fs = require("fs");
2 | const { Build } = require("./Build");
3 | const { System } = require("./System");
4 |
5 | class Magisk {
6 | static LOGFILE = "/cache/magisk.log";
7 | static UNBLOCKFILE = "/dev/.magisk_unblock";
8 | static SECURE_DIR = "/data/adb";
9 | static MODULEROOT = this.SECURE_DIR + "/modules";
10 | static MODULEUPGRADE = this.SECURE_DIR + "/modules_update";
11 | static DATABIN = this.SECURE_DIR + "/magisk";
12 | static MAGISKDB = this.SECURE_DIR + "/magisk.db";
13 |
14 | // tmpfs paths
15 | static MAGISKTMP = Build.SDK >= Build.VERSION_CODES.R ? System.cmd("magisk --path") : "/sbin";
16 | static INTLROOT = ".magisk";
17 | static MIRRDIR = this.INTLROOT + "/mirror";
18 | static RULESDIR = this.MIRRDIR + "/sepolicy.rules";
19 | static BLOCKDIR = this.INTLROOT + "/block";
20 | static WORKERDIR = this.INTLROOT + "/worker";
21 | static MODULEMNT = this.INTLROOT + "/modules";
22 | static BBPATH = this.INTLROOT + "/busybox";
23 | static ROOTOVL = this.INTLROOT + "/rootdir";
24 | static SHELLPTS = this.INTLROOT + "/pts";
25 | static ROOTMNT = this.ROOTOVL + "/.mount_list";
26 | static ZYGISKBIN = this.INTLROOT + "/zygisk";
27 | static SELINUXMOCK = this.INTLROOT + "/selinux";
28 | static APP_DATA_DIR = Build.SDK >= Build.VERSION_CODES.N ? "/data/user_de" : "/data/user";
29 |
30 | static installed() {
31 | const paths = [
32 | "/system/app/Superuser.apk",
33 | "/sbin/su",
34 | "/system/bin/su",
35 | "/system/xbin/su",
36 | "/data/local/xbin/su",
37 | "/data/local/bin/su",
38 | "/system/sd/xbin/su",
39 | "/system/bin/failsafe/su",
40 | "/data/local/su",
41 | "/su/bin/su",
42 | ];
43 | for (const path in paths) {
44 | if (fs.existsSync(path)) return true;
45 | }
46 | return false;
47 | }
48 | }
49 |
50 | module.exports = { Magisk };
51 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/lib/MagiskModule.js:
--------------------------------------------------------------------------------
1 | const { File } = require("@android/util");
2 |
3 | class MagiskModule {
4 | constructor(name) {
5 | this._name = name;
6 | this._root = Magisk.MODULEROOT + "/" + name;
7 |
8 | const r = new File(Magisk.MODULEROOT);
9 | if (!r.canAccess()) {
10 | throw new Error(r.canAccess());
11 | }
12 |
13 | const props = new File(this._root + "/module.prop");
14 | if (props.canAccess()) {
15 | try {
16 | // Objects are bad to handle, so we use "new Map()".
17 | this.info = new Map(
18 | props
19 | .read()
20 | .split("\n")
21 | .map((row) => row.split("="))
22 | );
23 | } catch (err) {
24 | throw new Error(err);
25 | }
26 | } else {
27 | throw new Error(props.canAccess());
28 | }
29 | }
30 |
31 | disable() {
32 | const disable = new File(this._root + "/disable");
33 | if (disable.canAccess()) {
34 | disable.write("");
35 | } else {
36 | throw new Error(disable.canAccess());
37 | }
38 | }
39 |
40 | enable() {
41 | const disable = new File(this._root + "/disable");
42 | if (disable.canAccess()) {
43 | disable.delete();
44 | } else {
45 | throw new Error(disable.canAccess());
46 | }
47 | }
48 |
49 | remove() {
50 | const remove = new File(this._root + "/remove");
51 | if (remove.canAccess()) {
52 | remove.write("");
53 | } else {
54 | throw new Error(remove.canAccess());
55 | }
56 | }
57 |
58 | unremove() {
59 | const remove = new File(this._root + "/remove");
60 | if (remove.canAccess()) {
61 | remove.delete();
62 | } else {
63 | throw new Error(remove.canAccess());
64 | }
65 | }
66 | }
67 |
68 | module.exports = { MagiskModule };
69 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/lib/System.js:
--------------------------------------------------------------------------------
1 | const util = require("util");
2 | const { BaseSystem } = require("bindings")("android-os.node");
3 |
4 | class System extends BaseSystem {
5 | static cmd(c, ...data) {
6 | if (typeof c != "string") throw new TypeError("the command beeds to be an string");
7 | // Don't allow modules/libraries to change the battery state
8 | if (/((sudo)?\s?cmd\s?battery\s?(set|reset|unplug)?\s?(-f)?)/mg.test(c)) {
9 | throw new Error("'System.cmd()' are not allowed to change the battery state!")
10 | }
11 | return super.cmd(util.format(c, ...data)).trim();
12 | }
13 |
14 | static setenv(name, value, overrid = 1) {
15 | super.setenv(String(name), String(value), Number(overrid));
16 | }
17 |
18 | static getenv(name) {
19 | if (!name) throw new TypeError("Undefined name");
20 | return super.getenv(String(name));
21 | }
22 |
23 | static openApp(pkg, act) {
24 | return this.cmd("am start -n %s/.%s", pkg, act);
25 | }
26 |
27 | static openFile(file, mimeType) {
28 | return this.cmd("am start -a android.intent.action.VIEW -d file://%s -t %s", file, mimeType);
29 | }
30 |
31 | static openUrl(url) {
32 | var pattern = new RegExp(
33 | "^(https?:\\/\\/)?" + // protocol
34 | "((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|" + // domain name
35 | "((\\d{1,3}\\.){3}\\d{1,3}))" + // OR ip (v4) address
36 | "(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*" + // port and path
37 | "(\\?[;&a-z\\d%_.~+=-]*)?" + // query string
38 | "(\\#[-a-z\\d_]*)?$",
39 | "i"
40 | ); // fragment locator
41 | if (!pattern.test(url)) {
42 | throw new TypeError(`'${url}' is not a valid url!`);
43 | } else {
44 | return this.cmd("am start -a android.intent.action.VIEW -d %s", url);
45 | }
46 | }
47 |
48 | static uname() { return super.uname() }
49 |
50 | static notify(id, title, message, ...data) {
51 | if (typeof id != "number") throw new TypeError("The 'id' should be an number");
52 | if (typeof title != "string") throw new TypeError("The 'title' should be an string");
53 | if (typeof message != "string") throw new TypeError("The 'message' should be an string");
54 | return this.cmd(`su -lp 2000 -c "cmd notification post -S bigtext -t '${title}' '${id}' '${util.format(message, ...data)}'"`);
55 | }
56 | }
57 |
58 | module.exports = { System };
59 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/lib/SystemProperties.js:
--------------------------------------------------------------------------------
1 | const { BaseProperties } = require("bindings")("android-os.node");
2 |
3 | class SystemProperties extends BaseProperties {
4 | static TAG = "NodeSystemProperties";
5 | static PROP_VALUE_MAX = 91;
6 | static TRACK_KEY_ACCESS = false;
7 |
8 | constructor() {
9 | super();
10 | }
11 |
12 | static get(key, def) {
13 | return this.native_get(key, def);
14 | }
15 |
16 | static getList(key, sep = ",") {
17 | if (typeof key != "string") {
18 | throw new TypeError("The key should be an string");
19 | }
20 |
21 | if (typeof sep != "string") {
22 | throw new TypeError("The separator should be an string");
23 | }
24 |
25 | const result = this.get(key, "");
26 |
27 | return result != "" ? result.split(sep) : [];
28 | }
29 |
30 | static getBoolean(key, def) {
31 | return this.native_get_boolean(key, def);
32 | }
33 |
34 | static getInt(key, def) {
35 | return this.native_get_int(key, def);
36 | }
37 |
38 | static list(cb) {
39 | let _props = [];
40 | if (typeof cb == "function") {
41 | this.native_list(cb);
42 | } else {
43 | this.native_list((name, val) => {
44 | _props.push(name);
45 | })
46 | }
47 | return _props || [];
48 | }
49 |
50 | static set(key, val) {
51 | if (typeof key != "string") {
52 | throw new TypeError("The key should be an string");
53 | }
54 |
55 | if (val != null && !key.startsWith("ro.") && val.length > this.PROP_VALUE_MAX) {
56 | throw new Error("value of system property '" + key + "' is longer than " + this.PROP_VALUE_MAX + " bytes: " + val);
57 | }
58 |
59 | super.native_set(key, String(val));
60 | }
61 |
62 | static native_get(key, def = "") {
63 | return super.native_get(key, def)
64 | }
65 |
66 | static native_get_boolean(key, def = false) {
67 | return super.native_get_boolean(key, def)
68 | }
69 |
70 | static native_get_int(key, def = 0) {
71 | return super.native_get_int(key, def)
72 | }
73 | }
74 |
75 | module.exports = {
76 | SystemProperties
77 | };
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/.package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "android",
3 | "version": "1.0.0",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "node_modules/bindings": {
8 | "version": "1.5.0",
9 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
10 | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
11 | "dependencies": {
12 | "file-uri-to-path": "1.0.0"
13 | }
14 | },
15 | "node_modules/file-uri-to-path": {
16 | "version": "1.0.0",
17 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
18 | "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
19 | },
20 | "node_modules/node-addon-api": {
21 | "version": "5.1.0",
22 | "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz",
23 | "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA=="
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/bindings/LICENSE.md:
--------------------------------------------------------------------------------
1 | (The MIT License)
2 |
3 | Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | 'Software'), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/bindings/README.md:
--------------------------------------------------------------------------------
1 | node-bindings
2 | =============
3 | ### Helper module for loading your native module's `.node` file
4 |
5 | This is a helper module for authors of Node.js native addon modules.
6 | It is basically the "swiss army knife" of `require()`ing your native module's
7 | `.node` file.
8 |
9 | Throughout the course of Node's native addon history, addons have ended up being
10 | compiled in a variety of different places, depending on which build tool and which
11 | version of node was used. To make matters worse, now the `gyp` build tool can
12 | produce either a __Release__ or __Debug__ build, each being built into different
13 | locations.
14 |
15 | This module checks _all_ the possible locations that a native addon would be built
16 | at, and returns the first one that loads successfully.
17 |
18 |
19 | Installation
20 | ------------
21 |
22 | Install with `npm`:
23 |
24 | ``` bash
25 | $ npm install --save bindings
26 | ```
27 |
28 | Or add it to the `"dependencies"` section of your `package.json` file.
29 |
30 |
31 | Example
32 | -------
33 |
34 | `require()`ing the proper bindings file for the current node version, platform
35 | and architecture is as simple as:
36 |
37 | ``` js
38 | var bindings = require('bindings')('binding.node')
39 |
40 | // Use your bindings defined in your C files
41 | bindings.your_c_function()
42 | ```
43 |
44 |
45 | Nice Error Output
46 | -----------------
47 |
48 | When the `.node` file could not be loaded, `node-bindings` throws an Error with
49 | a nice error message telling you exactly what was tried. You can also check the
50 | `err.tries` Array property.
51 |
52 | ```
53 | Error: Could not load the bindings file. Tried:
54 | → /Users/nrajlich/ref/build/binding.node
55 | → /Users/nrajlich/ref/build/Debug/binding.node
56 | → /Users/nrajlich/ref/build/Release/binding.node
57 | → /Users/nrajlich/ref/out/Debug/binding.node
58 | → /Users/nrajlich/ref/Debug/binding.node
59 | → /Users/nrajlich/ref/out/Release/binding.node
60 | → /Users/nrajlich/ref/Release/binding.node
61 | → /Users/nrajlich/ref/build/default/binding.node
62 | → /Users/nrajlich/ref/compiled/0.8.2/darwin/x64/binding.node
63 | at bindings (/Users/nrajlich/ref/node_modules/bindings/bindings.js:84:13)
64 | at Object. (/Users/nrajlich/ref/lib/ref.js:5:47)
65 | at Module._compile (module.js:449:26)
66 | at Object.Module._extensions..js (module.js:467:10)
67 | at Module.load (module.js:356:32)
68 | at Function.Module._load (module.js:312:12)
69 | ...
70 | ```
71 |
72 | The searching for the `.node` file will originate from the first directory in which has a `package.json` file is found.
73 |
74 | License
75 | -------
76 |
77 | (The MIT License)
78 |
79 | Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>
80 |
81 | Permission is hereby granted, free of charge, to any person obtaining
82 | a copy of this software and associated documentation files (the
83 | 'Software'), to deal in the Software without restriction, including
84 | without limitation the rights to use, copy, modify, merge, publish,
85 | distribute, sublicense, and/or sell copies of the Software, and to
86 | permit persons to whom the Software is furnished to do so, subject to
87 | the following conditions:
88 |
89 | The above copyright notice and this permission notice shall be
90 | included in all copies or substantial portions of the Software.
91 |
92 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
93 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
94 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
95 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
96 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
97 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
98 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
99 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/bindings/bindings.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Module dependencies.
3 | */
4 |
5 | var fs = require('fs'),
6 | path = require('path'),
7 | fileURLToPath = require('file-uri-to-path'),
8 | join = path.join,
9 | dirname = path.dirname,
10 | exists =
11 | (fs.accessSync &&
12 | function(path) {
13 | try {
14 | fs.accessSync(path);
15 | } catch (e) {
16 | return false;
17 | }
18 | return true;
19 | }) ||
20 | fs.existsSync ||
21 | path.existsSync,
22 | defaults = {
23 | arrow: process.env.NODE_BINDINGS_ARROW || ' → ',
24 | compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled',
25 | platform: process.platform,
26 | arch: process.arch,
27 | nodePreGyp:
28 | 'node-v' +
29 | process.versions.modules +
30 | '-' +
31 | process.platform +
32 | '-' +
33 | process.arch,
34 | version: process.versions.node,
35 | bindings: 'bindings.node',
36 | try: [
37 | // node-gyp's linked version in the "build" dir
38 | ['module_root', 'build', 'bindings'],
39 | // node-waf and gyp_addon (a.k.a node-gyp)
40 | ['module_root', 'build', 'Debug', 'bindings'],
41 | ['module_root', 'build', 'Release', 'bindings'],
42 | // Debug files, for development (legacy behavior, remove for node v0.9)
43 | ['module_root', 'out', 'Debug', 'bindings'],
44 | ['module_root', 'Debug', 'bindings'],
45 | // Release files, but manually compiled (legacy behavior, remove for node v0.9)
46 | ['module_root', 'out', 'Release', 'bindings'],
47 | ['module_root', 'Release', 'bindings'],
48 | // Legacy from node-waf, node <= 0.4.x
49 | ['module_root', 'build', 'default', 'bindings'],
50 | // Production "Release" buildtype binary (meh...)
51 | ['module_root', 'compiled', 'version', 'platform', 'arch', 'bindings'],
52 | // node-qbs builds
53 | ['module_root', 'addon-build', 'release', 'install-root', 'bindings'],
54 | ['module_root', 'addon-build', 'debug', 'install-root', 'bindings'],
55 | ['module_root', 'addon-build', 'default', 'install-root', 'bindings'],
56 | // node-pre-gyp path ./lib/binding/{node_abi}-{platform}-{arch}
57 | ['module_root', 'lib', 'binding', 'nodePreGyp', 'bindings']
58 | ]
59 | };
60 |
61 | /**
62 | * The main `bindings()` function loads the compiled bindings for a given module.
63 | * It uses V8's Error API to determine the parent filename that this function is
64 | * being invoked from, which is then used to find the root directory.
65 | */
66 |
67 | function bindings(opts) {
68 | // Argument surgery
69 | if (typeof opts == 'string') {
70 | opts = { bindings: opts };
71 | } else if (!opts) {
72 | opts = {};
73 | }
74 |
75 | // maps `defaults` onto `opts` object
76 | Object.keys(defaults).map(function(i) {
77 | if (!(i in opts)) opts[i] = defaults[i];
78 | });
79 |
80 | // Get the module root
81 | if (!opts.module_root) {
82 | opts.module_root = exports.getRoot(exports.getFileName());
83 | }
84 |
85 | // Ensure the given bindings name ends with .node
86 | if (path.extname(opts.bindings) != '.node') {
87 | opts.bindings += '.node';
88 | }
89 |
90 | // https://github.com/webpack/webpack/issues/4175#issuecomment-342931035
91 | var requireFunc =
92 | typeof __webpack_require__ === 'function'
93 | ? __non_webpack_require__
94 | : require;
95 |
96 | var tries = [],
97 | i = 0,
98 | l = opts.try.length,
99 | n,
100 | b,
101 | err;
102 |
103 | for (; i < l; i++) {
104 | n = join.apply(
105 | null,
106 | opts.try[i].map(function(p) {
107 | return opts[p] || p;
108 | })
109 | );
110 | tries.push(n);
111 | try {
112 | b = opts.path ? requireFunc.resolve(n) : requireFunc(n);
113 | if (!opts.path) {
114 | b.path = n;
115 | }
116 | return b;
117 | } catch (e) {
118 | if (e.code !== 'MODULE_NOT_FOUND' &&
119 | e.code !== 'QUALIFIED_PATH_RESOLUTION_FAILED' &&
120 | !/not find/i.test(e.message)) {
121 | throw e;
122 | }
123 | }
124 | }
125 |
126 | err = new Error(
127 | 'Could not locate the bindings file. Tried:\n' +
128 | tries
129 | .map(function(a) {
130 | return opts.arrow + a;
131 | })
132 | .join('\n')
133 | );
134 | err.tries = tries;
135 | throw err;
136 | }
137 | module.exports = exports = bindings;
138 |
139 | /**
140 | * Gets the filename of the JavaScript file that invokes this function.
141 | * Used to help find the root directory of a module.
142 | * Optionally accepts an filename argument to skip when searching for the invoking filename
143 | */
144 |
145 | exports.getFileName = function getFileName(calling_file) {
146 | var origPST = Error.prepareStackTrace,
147 | origSTL = Error.stackTraceLimit,
148 | dummy = {},
149 | fileName;
150 |
151 | Error.stackTraceLimit = 10;
152 |
153 | Error.prepareStackTrace = function(e, st) {
154 | for (var i = 0, l = st.length; i < l; i++) {
155 | fileName = st[i].getFileName();
156 | if (fileName !== __filename) {
157 | if (calling_file) {
158 | if (fileName !== calling_file) {
159 | return;
160 | }
161 | } else {
162 | return;
163 | }
164 | }
165 | }
166 | };
167 |
168 | // run the 'prepareStackTrace' function above
169 | Error.captureStackTrace(dummy);
170 | dummy.stack;
171 |
172 | // cleanup
173 | Error.prepareStackTrace = origPST;
174 | Error.stackTraceLimit = origSTL;
175 |
176 | // handle filename that starts with "file://"
177 | var fileSchema = 'file://';
178 | if (fileName.indexOf(fileSchema) === 0) {
179 | fileName = fileURLToPath(fileName);
180 | }
181 |
182 | return fileName;
183 | };
184 |
185 | /**
186 | * Gets the root directory of a module, given an arbitrary filename
187 | * somewhere in the module tree. The "root directory" is the directory
188 | * containing the `package.json` file.
189 | *
190 | * In: /home/nate/node-native-module/lib/index.js
191 | * Out: /home/nate/node-native-module
192 | */
193 |
194 | exports.getRoot = function getRoot(file) {
195 | var dir = dirname(file),
196 | prev;
197 | while (true) {
198 | if (dir === '.') {
199 | // Avoids an infinite loop in rare cases, like the REPL
200 | dir = process.cwd();
201 | }
202 | if (
203 | exists(join(dir, 'package.json')) ||
204 | exists(join(dir, 'node_modules'))
205 | ) {
206 | // Found the 'package.json' file or 'node_modules' dir; we're done
207 | return dir;
208 | }
209 | if (prev === dir) {
210 | // Got to the top
211 | throw new Error(
212 | 'Could not find module root given file: "' +
213 | file +
214 | '". Do you have a `package.json` file? '
215 | );
216 | }
217 | // Try the parent dir next
218 | prev = dir;
219 | dir = join(dir, '..');
220 | }
221 | };
222 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/bindings/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bindings",
3 | "description": "Helper module for loading your native module's .node file",
4 | "keywords": [
5 | "native",
6 | "addon",
7 | "bindings",
8 | "gyp",
9 | "waf",
10 | "c",
11 | "c++"
12 | ],
13 | "version": "1.5.0",
14 | "author": "Nathan Rajlich (http://tootallnate.net)",
15 | "repository": {
16 | "type": "git",
17 | "url": "git://github.com/TooTallNate/node-bindings.git"
18 | },
19 | "main": "./bindings.js",
20 | "bugs": {
21 | "url": "https://github.com/TooTallNate/node-bindings/issues"
22 | },
23 | "homepage": "https://github.com/TooTallNate/node-bindings",
24 | "license": "MIT",
25 | "dependencies": {
26 | "file-uri-to-path": "1.0.0"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/file-uri-to-path/.npmignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/file-uri-to-path/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 |
3 | language: node_js
4 |
5 | node_js:
6 | - "0.8"
7 | - "0.10"
8 | - "0.12"
9 | - "1"
10 | - "2"
11 | - "3"
12 | - "4"
13 | - "5"
14 | - "6"
15 | - "7"
16 | - "8"
17 |
18 | install:
19 | - PATH="`npm bin`:`npm bin -g`:$PATH"
20 | # Node 0.8 comes with a too obsolete npm
21 | - if [[ "`node --version`" =~ ^v0\.8\. ]]; then npm install -g npm@1.4.28 ; fi
22 | # Install dependencies and build
23 | - npm install
24 |
25 | script:
26 | # Output useful info for debugging
27 | - node --version
28 | - npm --version
29 | # Run tests
30 | - npm test
31 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/file-uri-to-path/History.md:
--------------------------------------------------------------------------------
1 |
2 | 1.0.0 / 2017-07-06
3 | ==================
4 |
5 | * update "mocha" to v3
6 | * fixed unicode URI decoding (#6)
7 | * add typings for Typescript
8 | * README: use SVG Travis-CI badge
9 | * add LICENSE file (MIT)
10 | * add .travis.yml file (testing Node.js 0.8 through 8 currently)
11 | * add README.md file
12 |
13 | 0.0.2 / 2014-01-27
14 | ==================
15 |
16 | * index: invert the path separators on Windows
17 |
18 | 0.0.1 / 2014-01-27
19 | ==================
20 |
21 | * initial commit
22 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/file-uri-to-path/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014 Nathan Rajlich
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | 'Software'), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/file-uri-to-path/README.md:
--------------------------------------------------------------------------------
1 | file-uri-to-path
2 | ================
3 | ### Convert a `file:` URI to a file path
4 | [](https://travis-ci.org/TooTallNate/file-uri-to-path)
5 |
6 | Accepts a `file:` URI and returns a regular file path suitable for use with the
7 | `fs` module functions.
8 |
9 |
10 | Installation
11 | ------------
12 |
13 | Install with `npm`:
14 |
15 | ``` bash
16 | $ npm install file-uri-to-path
17 | ```
18 |
19 |
20 | Example
21 | -------
22 |
23 | ``` js
24 | var uri2path = require('file-uri-to-path');
25 |
26 | uri2path('file://localhost/c|/WINDOWS/clock.avi');
27 | // "c:\\WINDOWS\\clock.avi"
28 |
29 | uri2path('file:///c|/WINDOWS/clock.avi');
30 | // "c:\\WINDOWS\\clock.avi"
31 |
32 | uri2path('file://localhost/c:/WINDOWS/clock.avi');
33 | // "c:\\WINDOWS\\clock.avi"
34 |
35 | uri2path('file://hostname/path/to/the%20file.txt');
36 | // "\\\\hostname\\path\\to\\the file.txt"
37 |
38 | uri2path('file:///c:/path/to/the%20file.txt');
39 | // "c:\\path\\to\\the file.txt"
40 | ```
41 |
42 |
43 | API
44 | ---
45 |
46 | ### fileUriToPath(String uri) → String
47 |
48 |
49 |
50 | License
51 | -------
52 |
53 | (The MIT License)
54 |
55 | Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
56 |
57 | Permission is hereby granted, free of charge, to any person obtaining
58 | a copy of this software and associated documentation files (the
59 | 'Software'), to deal in the Software without restriction, including
60 | without limitation the rights to use, copy, modify, merge, publish,
61 | distribute, sublicense, and/or sell copies of the Software, and to
62 | permit persons to whom the Software is furnished to do so, subject to
63 | the following conditions:
64 |
65 | The above copyright notice and this permission notice shall be
66 | included in all copies or substantial portions of the Software.
67 |
68 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
69 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
70 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
71 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
72 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
73 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
74 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
75 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/file-uri-to-path/index.d.ts:
--------------------------------------------------------------------------------
1 | declare function fileUriToPath(uri: string): string;
2 | export = fileUriToPath;
3 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/file-uri-to-path/index.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Module dependencies.
4 | */
5 |
6 | var sep = require('path').sep || '/';
7 |
8 | /**
9 | * Module exports.
10 | */
11 |
12 | module.exports = fileUriToPath;
13 |
14 | /**
15 | * File URI to Path function.
16 | *
17 | * @param {String} uri
18 | * @return {String} path
19 | * @api public
20 | */
21 |
22 | function fileUriToPath (uri) {
23 | if ('string' != typeof uri ||
24 | uri.length <= 7 ||
25 | 'file://' != uri.substring(0, 7)) {
26 | throw new TypeError('must pass in a file:// URI to convert to a file path');
27 | }
28 |
29 | var rest = decodeURI(uri.substring(7));
30 | var firstSlash = rest.indexOf('/');
31 | var host = rest.substring(0, firstSlash);
32 | var path = rest.substring(firstSlash + 1);
33 |
34 | // 2. Scheme Definition
35 | // As a special case, can be the string "localhost" or the empty
36 | // string; this is interpreted as "the machine from which the URL is
37 | // being interpreted".
38 | if ('localhost' == host) host = '';
39 |
40 | if (host) {
41 | host = sep + sep + host;
42 | }
43 |
44 | // 3.2 Drives, drive letters, mount points, file system root
45 | // Drive letters are mapped into the top of a file URI in various ways,
46 | // depending on the implementation; some applications substitute
47 | // vertical bar ("|") for the colon after the drive letter, yielding
48 | // "file:///c|/tmp/test.txt". In some cases, the colon is left
49 | // unchanged, as in "file:///c:/tmp/test.txt". In other cases, the
50 | // colon is simply omitted, as in "file:///c/tmp/test.txt".
51 | path = path.replace(/^(.+)\|/, '$1:');
52 |
53 | // for Windows, we need to invert the path separators from what a URI uses
54 | if (sep == '\\') {
55 | path = path.replace(/\//g, '\\');
56 | }
57 |
58 | if (/^.+\:/.test(path)) {
59 | // has Windows drive at beginning of path
60 | } else {
61 | // unix path…
62 | path = sep + path;
63 | }
64 |
65 | return host + path;
66 | }
67 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/file-uri-to-path/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "file-uri-to-path",
3 | "version": "1.0.0",
4 | "description": "Convert a file: URI to a file path",
5 | "main": "index.js",
6 | "types": "index.d.ts",
7 | "directories": {
8 | "test": "test"
9 | },
10 | "scripts": {
11 | "test": "mocha --reporter spec"
12 | },
13 | "repository": {
14 | "type": "git",
15 | "url": "git://github.com/TooTallNate/file-uri-to-path.git"
16 | },
17 | "keywords": [
18 | "file",
19 | "uri",
20 | "convert",
21 | "path"
22 | ],
23 | "author": "Nathan Rajlich (http://n8.io/)",
24 | "license": "MIT",
25 | "bugs": {
26 | "url": "https://github.com/TooTallNate/file-uri-to-path/issues"
27 | },
28 | "homepage": "https://github.com/TooTallNate/file-uri-to-path",
29 | "devDependencies": {
30 | "mocha": "3"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/file-uri-to-path/test/test.js:
--------------------------------------------------------------------------------
1 |
2 | var sep = require('path').sep || '/';
3 | var assert = require('assert');
4 | var uri2path = require('../');
5 | var tests = require('./tests.json');
6 |
7 | describe('file-uri-to-path', function () {
8 |
9 | Object.keys(tests).forEach(function (uri) {
10 |
11 | // the test cases were generated from Windows' PathCreateFromUrlA() function.
12 | // On Unix, we have to replace the path separator with the Unix one instead of
13 | // the Windows one.
14 | var expected = tests[uri].replace(/\\/g, sep);
15 |
16 | it('should convert ' + JSON.stringify(uri) + ' to ' + JSON.stringify(expected),
17 | function () {
18 | var actual = uri2path(uri);
19 | assert.equal(actual, expected);
20 | });
21 |
22 | });
23 |
24 | });
25 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/file-uri-to-path/test/tests.json:
--------------------------------------------------------------------------------
1 | {
2 | "file://host/path": "\\\\host\\path",
3 | "file://localhost/etc/fstab": "\\etc\\fstab",
4 | "file:///etc/fstab": "\\etc\\fstab",
5 | "file:///c:/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
6 | "file://localhost/c|/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
7 | "file:///c|/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
8 | "file://localhost/c:/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
9 | "file://hostname/path/to/the%20file.txt": "\\\\hostname\\path\\to\\the file.txt",
10 | "file:///c:/path/to/the%20file.txt": "c:\\path\\to\\the file.txt",
11 | "file:///C:/Documents%20and%20Settings/davris/FileSchemeURIs.doc": "C:\\Documents and Settings\\davris\\FileSchemeURIs.doc",
12 | "file:///C:/caf%C3%A9/%C3%A5r/d%C3%BCnn/%E7%89%9B%E9%93%83/Ph%E1%BB%9F/%F0%9F%98%B5.exe": "C:\\café\\år\\dünn\\牛铃\\Phở\\😵.exe"
13 | }
14 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/node-addon-api/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 | =====================
3 |
4 | Copyright (c) 2017 Node.js API collaborators
5 | -----------------------------------
6 |
7 | *Node.js API collaborators listed at *
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/node-addon-api/common.gypi:
--------------------------------------------------------------------------------
1 | {
2 | 'variables': {
3 | 'NAPI_VERSION%': "`.
30 | 3. `Napi::New(env, value);` to `Napi::[Type]::New(env, value);
31 |
32 |
33 | ### Major Reconstructions
34 | The implementation of `Napi::ObjectWrap` is significantly different from NAN's. `Napi::ObjectWrap` takes a pointer to the wrapped object and creates a reference to the wrapped object inside ObjectWrap constructor. `Napi::ObjectWrap` also associates wrapped object's instance methods to Javascript module instead of static methods like NAN.
35 |
36 | So if you use Nan::ObjectWrap in your module, you will need to execute the following steps.
37 |
38 | 1. Convert your [ClassName]::New function to a constructor function that takes a `Napi::CallbackInfo`. Declare it as
39 | ```
40 | [ClassName](const Napi::CallbackInfo& info);
41 | ```
42 | and define it as
43 | ```
44 | [ClassName]::[ClassName](const Napi::CallbackInfo& info) : Napi::ObjectWrap<[ClassName]>(info){
45 | ...
46 | }
47 | ```
48 | This way, the `Napi::ObjectWrap` constructor will be invoked after the object has been instantiated and `Napi::ObjectWrap` can use the `this` pointer to create a reference to the wrapped object.
49 |
50 | 2. Move your original constructor code into the new constructor. Delete your original constructor.
51 | 3. In your class initialization function, associate native methods in the following way.
52 | ```
53 | Napi::FunctionReference constructor;
54 |
55 | void [ClassName]::Init(Napi::Env env, Napi::Object exports, Napi::Object module) {
56 | Napi::HandleScope scope(env);
57 | Napi::Function ctor = DefineClass(env, "Canvas", {
58 | InstanceMethod<&[ClassName]::Func1>("Func1"),
59 | InstanceMethod<&[ClassName]::Func2>("Func2"),
60 | InstanceAccessor<&[ClassName]::ValueGetter>("Value"),
61 | StaticMethod<&[ClassName]::StaticMethod>("MethodName"),
62 | InstanceValue("Value", Napi::[Type]::New(env, value)),
63 | });
64 |
65 | constructor = Napi::Persistent(ctor);
66 | constructor .SuppressDestruct();
67 | exports.Set("[ClassName]", ctor);
68 | }
69 | ```
70 | 4. In function where you need to Unwrap the ObjectWrap in NAN like `[ClassName]* native = Nan::ObjectWrap::Unwrap<[ClassName]>(info.This());`, use `this` pointer directly as the unwrapped object as each ObjectWrap instance is associated with a unique object instance.
71 |
72 |
73 | If you still find issues after following this guide, please leave us an issue describing your problem and we will try to resolve it.
74 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/node-addon-api/tools/check-napi.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | // Descend into a directory structure and, for each file matching *.node, output
3 | // based on the imports found in the file whether it's an N-API module or not.
4 |
5 | const fs = require('fs');
6 | const path = require('path');
7 |
8 | // Read the output of the command, break it into lines, and use the reducer to
9 | // decide whether the file is an N-API module or not.
10 | function checkFile (file, command, argv, reducer) {
11 | const child = require('child_process').spawn(command, argv, {
12 | stdio: ['inherit', 'pipe', 'inherit']
13 | });
14 | let leftover = '';
15 | let isNapi;
16 | child.stdout.on('data', (chunk) => {
17 | if (isNapi === undefined) {
18 | chunk = (leftover + chunk.toString()).split(/[\r\n]+/);
19 | leftover = chunk.pop();
20 | isNapi = chunk.reduce(reducer, isNapi);
21 | if (isNapi !== undefined) {
22 | child.kill();
23 | }
24 | }
25 | });
26 | child.on('close', (code, signal) => {
27 | if ((code === null && signal !== null) || (code !== 0)) {
28 | console.log(
29 | command + ' exited with code: ' + code + ' and signal: ' + signal);
30 | } else {
31 | // Green if it's a N-API module, red otherwise.
32 | console.log(
33 | '\x1b[' + (isNapi ? '42' : '41') + 'm' +
34 | (isNapi ? ' N-API' : 'Not N-API') +
35 | '\x1b[0m: ' + file);
36 | }
37 | });
38 | }
39 |
40 | // Use nm -a to list symbols.
41 | function checkFileUNIX (file) {
42 | checkFile(file, 'nm', ['-a', file], (soFar, line) => {
43 | if (soFar === undefined) {
44 | line = line.match(/([0-9a-f]*)? ([a-zA-Z]) (.*$)/);
45 | if (line[2] === 'U') {
46 | if (/^napi/.test(line[3])) {
47 | soFar = true;
48 | }
49 | }
50 | }
51 | return soFar;
52 | });
53 | }
54 |
55 | // Use dumpbin /imports to list symbols.
56 | function checkFileWin32 (file) {
57 | checkFile(file, 'dumpbin', ['/imports', file], (soFar, line) => {
58 | if (soFar === undefined) {
59 | line = line.match(/([0-9a-f]*)? +([a-zA-Z0-9]) (.*$)/);
60 | if (line && /^napi/.test(line[line.length - 1])) {
61 | soFar = true;
62 | }
63 | }
64 | return soFar;
65 | });
66 | }
67 |
68 | // Descend into a directory structure and pass each file ending in '.node' to
69 | // one of the above checks, depending on the OS.
70 | function recurse (top) {
71 | fs.readdir(top, (error, items) => {
72 | if (error) {
73 | throw new Error('error reading directory ' + top + ': ' + error);
74 | }
75 | items.forEach((item) => {
76 | item = path.join(top, item);
77 | fs.stat(item, ((item) => (error, stats) => {
78 | if (error) {
79 | throw new Error('error about ' + item + ': ' + error);
80 | }
81 | if (stats.isDirectory()) {
82 | recurse(item);
83 | } else if (/[.]node$/.test(item) &&
84 | // Explicitly ignore files called 'nothing.node' because they are
85 | // artefacts of node-addon-api having identified a version of
86 | // Node.js that ships with a correct implementation of N-API.
87 | path.basename(item) !== 'nothing.node') {
88 | process.platform === 'win32'
89 | ? checkFileWin32(item)
90 | : checkFileUNIX(item);
91 | }
92 | })(item));
93 | });
94 | });
95 | }
96 |
97 | // Start with the directory given on the command line or the current directory
98 | // if nothing was given.
99 | recurse(process.argv.length > 3 ? process.argv[2] : '.');
100 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/node-addon-api/tools/clang-format.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | const spawn = require('child_process').spawnSync;
4 | const path = require('path');
5 |
6 | const filesToCheck = ['*.h', '*.cc'];
7 | const FORMAT_START = process.env.FORMAT_START || 'main';
8 |
9 | function main (args) {
10 | let fix = false;
11 | while (args.length > 0) {
12 | switch (args[0]) {
13 | case '-f':
14 | case '--fix':
15 | fix = true;
16 | break;
17 | default:
18 | }
19 | args.shift();
20 | }
21 |
22 | const clangFormatPath = path.dirname(require.resolve('clang-format'));
23 | const binary = process.platform === 'win32'
24 | ? 'node_modules\\.bin\\clang-format.cmd'
25 | : 'node_modules/.bin/clang-format';
26 | const options = ['--binary=' + binary, '--style=file'];
27 | if (fix) {
28 | options.push(FORMAT_START);
29 | } else {
30 | options.push('--diff', FORMAT_START);
31 | }
32 |
33 | const gitClangFormatPath = path.join(clangFormatPath, 'bin/git-clang-format');
34 | const result = spawn(
35 | 'python',
36 | [gitClangFormatPath, ...options, '--', ...filesToCheck],
37 | { encoding: 'utf-8' }
38 | );
39 |
40 | if (result.stderr) {
41 | console.error('Error running git-clang-format:', result.stderr);
42 | return 2;
43 | }
44 |
45 | const clangFormatOutput = result.stdout.trim();
46 | // Bail fast if in fix mode.
47 | if (fix) {
48 | console.log(clangFormatOutput);
49 | return 0;
50 | }
51 | // Detect if there is any complains from clang-format
52 | if (
53 | clangFormatOutput !== '' &&
54 | clangFormatOutput !== 'no modified files to format' &&
55 | clangFormatOutput !== 'clang-format did not modify any files'
56 | ) {
57 | console.error(clangFormatOutput);
58 | const fixCmd = 'npm run lint:fix';
59 | console.error(`
60 | ERROR: please run "${fixCmd}" to format changes in your commit
61 | Note that when running the command locally, please keep your local
62 | main branch and working branch up to date with nodejs/node-addon-api
63 | to exclude un-related complains.
64 | Or you can run "env FORMAT_START=upstream/main ${fixCmd}".`);
65 | return 1;
66 | }
67 | }
68 |
69 | if (require.main === module) {
70 | process.exitCode = main(process.argv.slice(2));
71 | }
72 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/node_modules/node-addon-api/tools/eslint-format.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | const spawn = require('child_process').spawnSync;
4 |
5 | const filesToCheck = '*.js';
6 | const FORMAT_START = process.env.FORMAT_START || 'main';
7 | const IS_WIN = process.platform === 'win32';
8 | const ESLINT_PATH = IS_WIN ? 'node_modules\\.bin\\eslint.cmd' : 'node_modules/.bin/eslint';
9 |
10 | function main (args) {
11 | let fix = false;
12 | while (args.length > 0) {
13 | switch (args[0]) {
14 | case '-f':
15 | case '--fix':
16 | fix = true;
17 | break;
18 | default:
19 | }
20 | args.shift();
21 | }
22 |
23 | // Check js files that change on unstaged file
24 | const fileUnStaged = spawn(
25 | 'git',
26 | ['diff', '--name-only', FORMAT_START, filesToCheck],
27 | {
28 | encoding: 'utf-8'
29 | }
30 | );
31 |
32 | // Check js files that change on staged file
33 | const fileStaged = spawn(
34 | 'git',
35 | ['diff', '--name-only', '--cached', FORMAT_START, filesToCheck],
36 | {
37 | encoding: 'utf-8'
38 | }
39 | );
40 |
41 | const options = [
42 | ...fileStaged.stdout.split('\n').filter((f) => f !== ''),
43 | ...fileUnStaged.stdout.split('\n').filter((f) => f !== '')
44 | ];
45 |
46 | if (fix) {
47 | options.push('--fix');
48 | }
49 |
50 | const result = spawn(ESLINT_PATH, [...options], {
51 | encoding: 'utf-8'
52 | });
53 |
54 | if (result.error && result.error.errno === 'ENOENT') {
55 | console.error('Eslint not found! Eslint is supposed to be found at ', ESLINT_PATH);
56 | return 2;
57 | }
58 |
59 | if (result.status === 1) {
60 | console.error('Eslint error:', result.stdout);
61 | const fixCmd = 'npm run lint:fix';
62 | console.error(`ERROR: please run "${fixCmd}" to format changes in your commit
63 | Note that when running the command locally, please keep your local
64 | main branch and working branch up to date with nodejs/node-addon-api
65 | to exclude un-related complains.
66 | Or you can run "env FORMAT_START=upstream/main ${fixCmd}".
67 | Also fix JS files by yourself if necessary.`);
68 | return 1;
69 | }
70 |
71 | if (result.stderr) {
72 | console.error('Error running eslint:', result.stderr);
73 | return 2;
74 | }
75 | }
76 |
77 | if (require.main === module) {
78 | process.exitCode = main(process.argv.slice(2));
79 | }
80 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "android",
3 | "version": "1.0.0",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "android",
9 | "version": "1.0.0",
10 | "license": "MIT",
11 | "dependencies": {
12 | "bindings": "^1.5.0",
13 | "node-addon-api": "^5.1.0"
14 | }
15 | },
16 | "node_modules/bindings": {
17 | "version": "1.5.0",
18 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
19 | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
20 | "dependencies": {
21 | "file-uri-to-path": "1.0.0"
22 | }
23 | },
24 | "node_modules/file-uri-to-path": {
25 | "version": "1.0.0",
26 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
27 | "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
28 | },
29 | "node_modules/node-addon-api": {
30 | "version": "5.1.0",
31 | "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz",
32 | "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA=="
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "android",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "type": "commonjs",
7 | "scripts": {
8 | "clean": "node-gyp clean",
9 | "build": "node-gyp build",
10 | "configure": "node-gyp configure"
11 | },
12 | "author": "Der_Googler",
13 | "license": "MIT",
14 | "gypfile": true,
15 | "dependencies": {
16 | "bindings": "^1.5.0",
17 | "node-addon-api": "^5.1.0"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/src/android-os.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 |
6 | using namespace Napi;
7 |
8 | Object Init(Env env, Object exports) {
9 | BaseProperties::Init(env, exports);
10 | BaseSystem::Init(env, exports);
11 | BaseEnvironment::Init(env, exports);
12 | return exports;
13 | }
14 |
15 | NODE_API_MODULE(addon, Init)
16 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/src/android-util.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | // #include
5 |
6 | using namespace Napi;
7 |
8 | Napi::Object Init(Napi::Env env, Napi::Object exports) {
9 | exports.Set(String::New(env, "sleep"), Napi::Function::New(env, Sleep));
10 | BaseLog::Init(env, exports);
11 | // BaseAudioPlayer::Init(env, exports);
12 | return exports;
13 | }
14 |
15 | NODE_API_MODULE(addon, Init)
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/src/internal/properties.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2006 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include
18 |
19 | #include
20 | #include
21 | #include
22 | #include
23 | #include
24 | #include
25 | #include
26 |
27 | #include
28 |
29 | int8_t property_get_bool(const char* key, int8_t default_value) {
30 | if (!key) return default_value;
31 |
32 | int8_t result = default_value;
33 | char buf[PROPERTY_VALUE_MAX] = {};
34 |
35 | int len = property_get(key, buf, "");
36 | if (len == 1) {
37 | char ch = buf[0];
38 | if (ch == '0' || ch == 'n') {
39 | result = false;
40 | } else if (ch == '1' || ch == 'y') {
41 | result = true;
42 | }
43 | } else if (len > 1) {
44 | if (!strcmp(buf, "no") || !strcmp(buf, "false") || !strcmp(buf, "off")) {
45 | result = false;
46 | } else if (!strcmp(buf, "yes") || !strcmp(buf, "true") || !strcmp(buf, "on")) {
47 | result = true;
48 | }
49 | }
50 |
51 | return result;
52 | }
53 |
54 | template
55 | static T property_get_int(const char* key, T default_value) {
56 | if (!key) return default_value;
57 |
58 | char value[PROPERTY_VALUE_MAX] = {};
59 | if (property_get(key, value, "") < 1) return default_value;
60 |
61 | // libcutils unwisely allows octal, which libbase doesn't.
62 | T result = default_value;
63 | int saved_errno = errno;
64 | errno = 0;
65 | char* end = nullptr;
66 | intmax_t v = strtoimax(value, &end, 0);
67 | if (errno != ERANGE && end != value && v >= std::numeric_limits::min() &&
68 | v <= std::numeric_limits::max()) {
69 | result = v;
70 | }
71 | errno = saved_errno;
72 | return result;
73 | }
74 |
75 | int64_t property_get_int64(const char* key, int64_t default_value) {
76 | return property_get_int(key, default_value);
77 | }
78 |
79 | int32_t property_get_int32(const char* key, int32_t default_value) {
80 | return property_get_int(key, default_value);
81 | }
82 |
83 | int property_set(const char* key, const char* value) {
84 | return __system_property_set(key, value);
85 | }
86 |
87 | int property_get(const char* key, char* value, const char* default_value) {
88 | int len = __system_property_get(key, value);
89 | if (len < 1 && default_value) {
90 | snprintf(value, PROPERTY_VALUE_MAX, "%s", default_value);
91 | return strlen(value);
92 | }
93 | return len;
94 | }
95 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/src/os/environment.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | using namespace std;
12 | using namespace Napi;
13 |
14 | Napi::Object BaseEnvironment::Init(Napi::Env env, Napi::Object exports) {
15 | // This method is used to hook the accessor and method callbacks
16 | Napi::Function func = DefineClass(env, "BaseEnvironment", {
17 | StaticMethod<&BaseEnvironment::GetEnv>("getenv", static_cast(napi_writable | napi_configurable)),
18 | StaticMethod<&BaseEnvironment::SetEnv>("setenv", static_cast(napi_writable | napi_configurable)),
19 | StaticMethod<&BaseEnvironment::Uname>("uname", static_cast(napi_writable | napi_configurable)),
20 | StaticMethod<&BaseEnvironment::WhoAmI>("whoami", static_cast(napi_writable | napi_configurable)),
21 | StaticMethod<&BaseEnvironment::CreateNewItem>("CreateNewItem", static_cast(napi_writable | napi_configurable)),
22 | });
23 |
24 | Napi::FunctionReference* constructor = new Napi::FunctionReference();
25 |
26 | // Create a persistent reference to the class constructor. This will allow
27 | // a function called on a class prototype and a function
28 | // called on instance of a class to be distinguished from each other.
29 | *constructor = Napi::Persistent(func);
30 | exports.Set("BaseEnvironment", func);
31 |
32 | // Store the constructor as the add-on instance data. This will allow this
33 | // add-on to support multiple instances of itself running on multiple worker
34 | // threads, as well as multiple instances of itself running in different
35 | // contexts on the same thread.
36 | //
37 | // By default, the value set on the environment here will be destroyed when
38 | // the add-on is unloaded using the `delete` operator, but it is also
39 | // possible to supply a custom deleter.
40 | env.SetInstanceData(constructor);
41 |
42 | return exports;
43 | }
44 |
45 | BaseEnvironment::BaseEnvironment(const Napi::CallbackInfo& info) :
46 | Napi::ObjectWrap(info) {
47 | Napi::Env env = info.Env();
48 | }
49 |
50 |
51 | Napi::Value BaseEnvironment::GetEnv(const Napi::CallbackInfo& info) {
52 | Napi::Env env = info.Env();
53 |
54 | if (info.Length() < 1) {
55 | Napi::TypeError::New(env, "Wrong number of arguments").ThrowAsJavaScriptException();
56 | return env.Null();
57 | }
58 |
59 | if (!info[0].IsString()) {
60 | Napi::TypeError::New(env, "Wrong arguments").ThrowAsJavaScriptException();
61 | return env.Null();
62 | }
63 |
64 | std::string name = info[0].As();
65 |
66 | return Napi::String::New(env, getenv(name.c_str()));
67 | }
68 |
69 | Napi::Value BaseEnvironment::SetEnv(const Napi::CallbackInfo& info) {
70 | Napi::Env env = info.Env();
71 |
72 | if (info.Length() < 3) {
73 | Napi::TypeError::New(env, "Wrong number of arguments").ThrowAsJavaScriptException();
74 | return env.Null();
75 | }
76 |
77 | if (!info[0].IsString() || !info[1].IsString() || !info[2].IsNumber()) {
78 | Napi::TypeError::New(env, "Wrong arguments").ThrowAsJavaScriptException();
79 | return env.Null();
80 | }
81 |
82 | string name = info[0].As();
83 | string value = info[1].As();
84 | int overrid = info[2].As();
85 |
86 | setenv(name.c_str(), value.c_str(), overrid);
87 |
88 | return Napi::String::New(env, getenv(name.c_str()));
89 | }
90 |
91 | Napi::Value BaseEnvironment::Uname(const Napi::CallbackInfo& info) {
92 | Napi::Env env = info.Env();
93 |
94 | struct utsname buffer;
95 |
96 | if (uname(&buffer) == -1) {
97 | Napi::TypeError::New(env, "uname call failed!").ThrowAsJavaScriptException();
98 | return env.Null();
99 | }
100 |
101 | Object obj = Object::New(env);
102 |
103 | obj.Set("sysname" , Napi::String::New(env, buffer.sysname ));
104 | obj.Set("nodename" , Napi::String::New(env, buffer.nodename ));
105 | obj.Set("release" , Napi::String::New(env, buffer.release ));
106 | obj.Set("version" , Napi::String::New(env, buffer.version ));
107 | obj.Set("machine" , Napi::String::New(env, buffer.machine ));
108 |
109 | #ifdef _GNU_SOURCE
110 | obj.Set("domainname", Napi::String::New(env, buffer.domainname));
111 | #endif
112 |
113 | return obj;
114 | }
115 |
116 | Napi::Value BaseEnvironment::WhoAmI(const Napi::CallbackInfo& info) {
117 | Napi::Env env = info.Env();
118 |
119 | register struct passwd *pw;
120 | register uid_t uid;
121 |
122 | uid = geteuid();
123 | pw = getpwuid(uid);
124 | if (pw) {
125 | return Napi::String::New(env, pw->pw_name);
126 | }
127 | char buffer [50];
128 | sprintf(buffer, "Cannot find username for UID %u", (unsigned) uid);
129 | Napi::TypeError::New(env, buffer).ThrowAsJavaScriptException();
130 | return env.Null();
131 | }
132 |
133 | // Create a new item using the constructor stored during Init.
134 | Napi::Value BaseEnvironment::CreateNewItem(const Napi::CallbackInfo& info) {
135 | // Retrieve the instance data we stored during `Init()`. We only stored the
136 | // constructor there, so we retrieve it here to create a new instance of the
137 | // JS class the constructor represents.
138 | Napi::FunctionReference* constructor = info.Env().GetInstanceData();
139 | return constructor->New({ Napi::Number::New(info.Env(), 42) });
140 | }
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/src/os/system.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 |
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include
21 | #include
22 | #include
23 | #include
24 | #include
25 |
26 | using namespace std;
27 | using namespace Napi;
28 |
29 | Napi::Object BaseSystem::Init(Napi::Env env, Napi::Object exports) {
30 | // This method is used to hook the accessor and method callbacks
31 | Napi::Function func = DefineClass(env, "BaseSystem", {
32 | StaticMethod<&BaseSystem::GetEnv>("getenv", static_cast(napi_writable | napi_configurable)),
33 | StaticMethod<&BaseSystem::SetEnv>("setenv", static_cast(napi_writable | napi_configurable)),
34 | StaticMethod<&BaseSystem::Cmd>("cmd", static_cast(napi_writable | napi_configurable)),
35 | StaticMethod<&BaseSystem::Spawn>("spawn", static_cast(napi_writable | napi_configurable)),
36 | StaticMethod<&BaseSystem::CreateNewItem>("CreateNewItem", static_cast(napi_writable | napi_configurable)),
37 | });
38 |
39 | Napi::FunctionReference* constructor = new Napi::FunctionReference();
40 |
41 | // Create a persistent reference to the class constructor. This will allow
42 | // a function called on a class prototype and a function
43 | // called on instance of a class to be distinguished from each other.
44 | *constructor = Napi::Persistent(func);
45 | exports.Set("BaseSystem", func);
46 |
47 | // Store the constructor as the add-on instance data. This will allow this
48 | // add-on to support multiple instances of itself running on multiple worker
49 | // threads, as well as multiple instances of itself running in different
50 | // contexts on the same thread.
51 | //
52 | // By default, the value set on the environment here will be destroyed when
53 | // the add-on is unloaded using the `delete` operator, but it is also
54 | // possible to supply a custom deleter.
55 | env.SetInstanceData(constructor);
56 |
57 | return exports;
58 | }
59 |
60 | BaseSystem::BaseSystem(const Napi::CallbackInfo& info) :
61 | Napi::ObjectWrap(info) {
62 | Napi::Env env = info.Env();
63 | }
64 |
65 | // Dep
66 | Napi::Value BaseSystem::GetEnv(const Napi::CallbackInfo& info) {
67 | Napi::Env env = info.Env();
68 |
69 | if (info.Length() < 1) {
70 | Napi::TypeError::New(env, "Wrong number of arguments").ThrowAsJavaScriptException();
71 | return env.Null();
72 | }
73 |
74 | if (!info[0].IsString()) {
75 | Napi::TypeError::New(env, "Wrong arguments").ThrowAsJavaScriptException();
76 | return env.Null();
77 | }
78 |
79 | std::string name = info[0].As();
80 |
81 | return Napi::String::New(env, getenv(name.c_str()));
82 | }
83 |
84 | // Dep
85 | Napi::Value BaseSystem::SetEnv(const Napi::CallbackInfo& info) {
86 | Napi::Env env = info.Env();
87 |
88 | if (info.Length() < 3) {
89 | Napi::TypeError::New(env, "Wrong number of arguments").ThrowAsJavaScriptException();
90 | return env.Null();
91 | }
92 |
93 | if (!info[0].IsString() || !info[1].IsString() || !info[2].IsNumber()) {
94 | Napi::TypeError::New(env, "Wrong arguments").ThrowAsJavaScriptException();
95 | return env.Null();
96 | }
97 |
98 | string name = info[0].As();
99 | string value = info[1].As();
100 | int overrid = info[2].As();
101 |
102 | setenv(name.c_str(), value.c_str(), overrid);
103 |
104 | return Napi::String::New(env, getenv(name.c_str()));
105 | }
106 |
107 | Napi::Value BaseSystem::Cmd(const Napi::CallbackInfo& info) {
108 | Napi::Env env = info.Env();
109 |
110 | if (info.Length() < 1) {
111 | Napi::TypeError::New(env, "Wrong number of arguments").ThrowAsJavaScriptException();
112 | return env.Null();
113 | }
114 |
115 | if (!info[0].IsString()) {
116 | Napi::TypeError::New(env, "Wrong arguments").ThrowAsJavaScriptException();
117 | return env.Null();
118 | }
119 |
120 | string cmd = info[0].As();
121 |
122 | array buffer;
123 | string result;
124 | unique_ptr pipe(popen(cmd.c_str(), "r"), pclose);
125 |
126 | if (!pipe) {
127 | Napi::TypeError::New(env, "popen() failed!").ThrowAsJavaScriptException();
128 | return env.Null();
129 | }
130 |
131 | while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
132 | result += buffer.data();
133 | }
134 |
135 | return Napi::String::New(env, result);
136 | }
137 |
138 | Napi::Value BaseSystem::Spawn(const Napi::CallbackInfo& info) {
139 | Napi::Env env = info.Env();
140 |
141 | if (info.Length() < 2) {
142 | Napi::TypeError::New(env, "Wrong number of arguments").ThrowAsJavaScriptException();
143 | return env.Null();
144 | }
145 |
146 | if (!info[0].IsString()) {
147 | Napi::TypeError::New(env, "The command should be an string").ThrowAsJavaScriptException();
148 | return env.Null();
149 | }
150 |
151 | if (!info[1].IsFunction()) {
152 | Napi::TypeError::New(env, "the calback should be an function").ThrowAsJavaScriptException();
153 | return env.Null();
154 | }
155 |
156 | string cmd = info[0].As();
157 | Napi::Function cb = info[1].As();
158 |
159 | array buffer;
160 | unique_ptr pipe(popen(cmd.c_str(), "r"), pclose);
161 |
162 | if (!pipe) {
163 | Napi::TypeError::New(env, "popen() failed!").ThrowAsJavaScriptException();
164 | return env.Null();
165 | }
166 |
167 | while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
168 | cb.Call(env.Global(), {Napi::String::New(env, buffer.data())});
169 | }
170 |
171 | return env.Null();
172 | }
173 |
174 | // Create a new item using the constructor stored during Init.
175 | Napi::Value BaseSystem::CreateNewItem(const Napi::CallbackInfo& info) {
176 | // Retrieve the instance data we stored during `Init()`. We only stored the
177 | // constructor there, so we retrieve it here to create a new instance of the
178 | // JS class the constructor represents.
179 | Napi::FunctionReference* constructor = info.Env().GetInstanceData();
180 | return constructor->New({ Napi::Number::New(info.Env(), 42) });
181 | }
182 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/src/util/log.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | using namespace std;
6 | using namespace Napi;
7 |
8 | Napi::Object BaseLog::Init(Napi::Env env, Napi::Object exports) {
9 | // This method is used to hook the accessor and method callbacks
10 | Napi::Function func = DefineClass(env, "BaseLog", {
11 | StaticMethod<&BaseLog::NativeLog>("native_log", static_cast(napi_writable | napi_configurable)),
12 | StaticMethod<&BaseLog::CreateNewItem>("CreateNewItem", static_cast(napi_writable | napi_configurable)),
13 | });
14 |
15 | Napi::FunctionReference* constructor = new Napi::FunctionReference();
16 |
17 | // Create a persistent reference to the class constructor. This will allow
18 | // a function called on a class prototype and a function
19 | // called on instance of a class to be distinguished from each other.
20 | *constructor = Napi::Persistent(func);
21 | exports.Set("BaseLog", func);
22 |
23 | // Store the constructor as the add-on instance data. This will allow this
24 | // add-on to support multiple instances of itself running on multiple worker
25 | // threads, as well as multiple instances of itself running in different
26 | // contexts on the same thread.
27 | //
28 | // By default, the value set on the environment here will be destroyed when
29 | // the add-on is unloaded using the `delete` operator, but it is also
30 | // possible to supply a custom deleter.
31 | env.SetInstanceData(constructor);
32 |
33 | return exports;
34 | }
35 |
36 | BaseLog::BaseLog(const Napi::CallbackInfo& info) : Napi::ObjectWrap(info) {
37 | // Napi::Env env = info.Env();
38 | }
39 |
40 |
41 |
42 | Napi::Value BaseLog::NativeLog(const Napi::CallbackInfo& info) {
43 | Napi::Env env = info.Env();
44 |
45 | if (info.Length() < 3) {
46 | Napi::TypeError::New(env, "Wrong number of arguments").ThrowAsJavaScriptException();
47 | return env.Null();
48 | }
49 |
50 | if (!info[0].IsNumber()) {
51 | Napi::TypeError::New(env, "The 'prio' should be an number").ThrowAsJavaScriptException();
52 | return env.Null();
53 | }
54 |
55 | if (!info[1].IsString()) {
56 | Napi::TypeError::New(env, "The 'tag' should be an string").ThrowAsJavaScriptException();
57 | return env.Null();
58 | }
59 |
60 | if (!info[2].IsString()) {
61 | Napi::TypeError::New(env, "the 'msg' should be an string").ThrowAsJavaScriptException();
62 | return env.Null();
63 | }
64 |
65 | int prio = info[0].As().Int32Value();
66 | string tag = info[1].As();
67 | string msg = info[2].As();
68 |
69 | __android_log_write(prio, tag.c_str(), msg.c_str());
70 |
71 | return env.Null();
72 | }
73 |
74 | // Create a new item using the constructor stored during Init.
75 | Napi::Value BaseLog::CreateNewItem(const Napi::CallbackInfo& info) {
76 | // Retrieve the instance data we stored during `Init()`. We only stored the
77 | // constructor there, so we retrieve it here to create a new instance of the
78 | // JS class the constructor represents.
79 | Napi::FunctionReference* constructor = info.Env().GetInstanceData();
80 | return constructor->New({ Napi::Number::New(info.Env(), 42) });
81 | }
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/src/util/sleep.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 |
6 | using namespace std;
7 | using namespace Napi;
8 |
9 | Value Sleep(const CallbackInfo& info) {
10 | Env env = info.Env();
11 |
12 | if (info.Length() < 1) {
13 | TypeError::New(env, "Wrong number of arguments").ThrowAsJavaScriptException();
14 | return env.Null();
15 | }
16 |
17 | if (!info[0].IsNumber()) {
18 | TypeError::New(env, "Wrong arguments").ThrowAsJavaScriptException();
19 | return env.Null();
20 | }
21 |
22 | int secs = info[0].As().Int32Value();
23 |
24 | sleep(secs);
25 |
26 | return env.Null();
27 | }
28 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/android/test.js:
--------------------------------------------------------------------------------
1 | const { System, SystemProperties, Build, Environment } = require(".");
2 | //const { BaseSeLinux } = require("bindings")("android-util.node");
3 |
4 | // console.log(System.uname())
5 |
6 | // Should throw error
7 | // System.cmd("cmd battery reset -f")
8 |
9 | //const locked = SystemProperties.native_getBoolean("ro.boot.flash.locked")
10 | //console.log(locked)
11 |
12 | //const sdk = SystemProperties.native_getInt("ro.build.version.sdk")
13 | //console.log(sdk)
14 |
15 | const props = SystemProperties.list()
16 |
17 | console.log(props)
18 |
19 | // console.log(Build.VERSION.require(33))
20 |
21 | // const user = BaseEnvironment.getenv("USER")
22 | /*const user = Environment.whoami()
23 | const home = Environment.homedir()
24 | const tmp = Environment.tmpdir()
25 | */
26 | /*console.log({
27 | user,
28 | home,
29 | tmp
30 | })*/
31 |
32 | // System.spawn('echo -e "Default \\e[33mYellow"', (res) => {
33 | // console.log("---: " + res.trim());
34 | // });
35 |
36 | //const enabled = BaseSeLinux.isEnabled();
37 | //console.log(enabled)
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/bindings/LICENSE.md:
--------------------------------------------------------------------------------
1 | (The MIT License)
2 |
3 | Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | 'Software'), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/bindings/README.md:
--------------------------------------------------------------------------------
1 | node-bindings
2 | =============
3 | ### Helper module for loading your native module's `.node` file
4 |
5 | This is a helper module for authors of Node.js native addon modules.
6 | It is basically the "swiss army knife" of `require()`ing your native module's
7 | `.node` file.
8 |
9 | Throughout the course of Node's native addon history, addons have ended up being
10 | compiled in a variety of different places, depending on which build tool and which
11 | version of node was used. To make matters worse, now the `gyp` build tool can
12 | produce either a __Release__ or __Debug__ build, each being built into different
13 | locations.
14 |
15 | This module checks _all_ the possible locations that a native addon would be built
16 | at, and returns the first one that loads successfully.
17 |
18 |
19 | Installation
20 | ------------
21 |
22 | Install with `npm`:
23 |
24 | ``` bash
25 | $ npm install --save bindings
26 | ```
27 |
28 | Or add it to the `"dependencies"` section of your `package.json` file.
29 |
30 |
31 | Example
32 | -------
33 |
34 | `require()`ing the proper bindings file for the current node version, platform
35 | and architecture is as simple as:
36 |
37 | ``` js
38 | var bindings = require('bindings')('binding.node')
39 |
40 | // Use your bindings defined in your C files
41 | bindings.your_c_function()
42 | ```
43 |
44 |
45 | Nice Error Output
46 | -----------------
47 |
48 | When the `.node` file could not be loaded, `node-bindings` throws an Error with
49 | a nice error message telling you exactly what was tried. You can also check the
50 | `err.tries` Array property.
51 |
52 | ```
53 | Error: Could not load the bindings file. Tried:
54 | → /Users/nrajlich/ref/build/binding.node
55 | → /Users/nrajlich/ref/build/Debug/binding.node
56 | → /Users/nrajlich/ref/build/Release/binding.node
57 | → /Users/nrajlich/ref/out/Debug/binding.node
58 | → /Users/nrajlich/ref/Debug/binding.node
59 | → /Users/nrajlich/ref/out/Release/binding.node
60 | → /Users/nrajlich/ref/Release/binding.node
61 | → /Users/nrajlich/ref/build/default/binding.node
62 | → /Users/nrajlich/ref/compiled/0.8.2/darwin/x64/binding.node
63 | at bindings (/Users/nrajlich/ref/node_modules/bindings/bindings.js:84:13)
64 | at Object. (/Users/nrajlich/ref/lib/ref.js:5:47)
65 | at Module._compile (module.js:449:26)
66 | at Object.Module._extensions..js (module.js:467:10)
67 | at Module.load (module.js:356:32)
68 | at Function.Module._load (module.js:312:12)
69 | ...
70 | ```
71 |
72 | The searching for the `.node` file will originate from the first directory in which has a `package.json` file is found.
73 |
74 | License
75 | -------
76 |
77 | (The MIT License)
78 |
79 | Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>
80 |
81 | Permission is hereby granted, free of charge, to any person obtaining
82 | a copy of this software and associated documentation files (the
83 | 'Software'), to deal in the Software without restriction, including
84 | without limitation the rights to use, copy, modify, merge, publish,
85 | distribute, sublicense, and/or sell copies of the Software, and to
86 | permit persons to whom the Software is furnished to do so, subject to
87 | the following conditions:
88 |
89 | The above copyright notice and this permission notice shall be
90 | included in all copies or substantial portions of the Software.
91 |
92 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
93 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
94 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
95 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
96 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
97 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
98 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
99 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/bindings/bindings.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Module dependencies.
3 | */
4 |
5 | var fs = require('fs'),
6 | path = require('path'),
7 | fileURLToPath = require('file-uri-to-path'),
8 | join = path.join,
9 | dirname = path.dirname,
10 | exists =
11 | (fs.accessSync &&
12 | function(path) {
13 | try {
14 | fs.accessSync(path);
15 | } catch (e) {
16 | return false;
17 | }
18 | return true;
19 | }) ||
20 | fs.existsSync ||
21 | path.existsSync,
22 | defaults = {
23 | arrow: process.env.NODE_BINDINGS_ARROW || ' → ',
24 | compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled',
25 | platform: process.platform,
26 | arch: process.arch,
27 | nodePreGyp:
28 | 'node-v' +
29 | process.versions.modules +
30 | '-' +
31 | process.platform +
32 | '-' +
33 | process.arch,
34 | version: process.versions.node,
35 | bindings: 'bindings.node',
36 | try: [
37 | // node-gyp's linked version in the "build" dir
38 | ['module_root', 'build', 'bindings'],
39 | // node-waf and gyp_addon (a.k.a node-gyp)
40 | ['module_root', 'build', 'Debug', 'bindings'],
41 | ['module_root', 'build', 'Release', 'bindings'],
42 | // Debug files, for development (legacy behavior, remove for node v0.9)
43 | ['module_root', 'out', 'Debug', 'bindings'],
44 | ['module_root', 'Debug', 'bindings'],
45 | // Release files, but manually compiled (legacy behavior, remove for node v0.9)
46 | ['module_root', 'out', 'Release', 'bindings'],
47 | ['module_root', 'Release', 'bindings'],
48 | // Legacy from node-waf, node <= 0.4.x
49 | ['module_root', 'build', 'default', 'bindings'],
50 | // Production "Release" buildtype binary (meh...)
51 | ['module_root', 'compiled', 'version', 'platform', 'arch', 'bindings'],
52 | // node-qbs builds
53 | ['module_root', 'addon-build', 'release', 'install-root', 'bindings'],
54 | ['module_root', 'addon-build', 'debug', 'install-root', 'bindings'],
55 | ['module_root', 'addon-build', 'default', 'install-root', 'bindings'],
56 | // node-pre-gyp path ./lib/binding/{node_abi}-{platform}-{arch}
57 | ['module_root', 'lib', 'binding', 'nodePreGyp', 'bindings']
58 | ]
59 | };
60 |
61 | /**
62 | * The main `bindings()` function loads the compiled bindings for a given module.
63 | * It uses V8's Error API to determine the parent filename that this function is
64 | * being invoked from, which is then used to find the root directory.
65 | */
66 |
67 | function bindings(opts) {
68 | // Argument surgery
69 | if (typeof opts == 'string') {
70 | opts = { bindings: opts };
71 | } else if (!opts) {
72 | opts = {};
73 | }
74 |
75 | // maps `defaults` onto `opts` object
76 | Object.keys(defaults).map(function(i) {
77 | if (!(i in opts)) opts[i] = defaults[i];
78 | });
79 |
80 | // Get the module root
81 | if (!opts.module_root) {
82 | opts.module_root = exports.getRoot(exports.getFileName());
83 | }
84 |
85 | // Ensure the given bindings name ends with .node
86 | if (path.extname(opts.bindings) != '.node') {
87 | opts.bindings += '.node';
88 | }
89 |
90 | // https://github.com/webpack/webpack/issues/4175#issuecomment-342931035
91 | var requireFunc =
92 | typeof __webpack_require__ === 'function'
93 | ? __non_webpack_require__
94 | : require;
95 |
96 | var tries = [],
97 | i = 0,
98 | l = opts.try.length,
99 | n,
100 | b,
101 | err;
102 |
103 | for (; i < l; i++) {
104 | n = join.apply(
105 | null,
106 | opts.try[i].map(function(p) {
107 | return opts[p] || p;
108 | })
109 | );
110 | tries.push(n);
111 | try {
112 | b = opts.path ? requireFunc.resolve(n) : requireFunc(n);
113 | if (!opts.path) {
114 | b.path = n;
115 | }
116 | return b;
117 | } catch (e) {
118 | if (e.code !== 'MODULE_NOT_FOUND' &&
119 | e.code !== 'QUALIFIED_PATH_RESOLUTION_FAILED' &&
120 | !/not find/i.test(e.message)) {
121 | throw e;
122 | }
123 | }
124 | }
125 |
126 | err = new Error(
127 | 'Could not locate the bindings file. Tried:\n' +
128 | tries
129 | .map(function(a) {
130 | return opts.arrow + a;
131 | })
132 | .join('\n')
133 | );
134 | err.tries = tries;
135 | throw err;
136 | }
137 | module.exports = exports = bindings;
138 |
139 | /**
140 | * Gets the filename of the JavaScript file that invokes this function.
141 | * Used to help find the root directory of a module.
142 | * Optionally accepts an filename argument to skip when searching for the invoking filename
143 | */
144 |
145 | exports.getFileName = function getFileName(calling_file) {
146 | var origPST = Error.prepareStackTrace,
147 | origSTL = Error.stackTraceLimit,
148 | dummy = {},
149 | fileName;
150 |
151 | Error.stackTraceLimit = 10;
152 |
153 | Error.prepareStackTrace = function(e, st) {
154 | for (var i = 0, l = st.length; i < l; i++) {
155 | fileName = st[i].getFileName();
156 | if (fileName !== __filename) {
157 | if (calling_file) {
158 | if (fileName !== calling_file) {
159 | return;
160 | }
161 | } else {
162 | return;
163 | }
164 | }
165 | }
166 | };
167 |
168 | // run the 'prepareStackTrace' function above
169 | Error.captureStackTrace(dummy);
170 | dummy.stack;
171 |
172 | // cleanup
173 | Error.prepareStackTrace = origPST;
174 | Error.stackTraceLimit = origSTL;
175 |
176 | // handle filename that starts with "file://"
177 | var fileSchema = 'file://';
178 | if (fileName.indexOf(fileSchema) === 0) {
179 | fileName = fileURLToPath(fileName);
180 | }
181 |
182 | return fileName;
183 | };
184 |
185 | /**
186 | * Gets the root directory of a module, given an arbitrary filename
187 | * somewhere in the module tree. The "root directory" is the directory
188 | * containing the `package.json` file.
189 | *
190 | * In: /home/nate/node-native-module/lib/index.js
191 | * Out: /home/nate/node-native-module
192 | */
193 |
194 | exports.getRoot = function getRoot(file) {
195 | var dir = dirname(file),
196 | prev;
197 | while (true) {
198 | if (dir === '.') {
199 | // Avoids an infinite loop in rare cases, like the REPL
200 | dir = process.cwd();
201 | }
202 | if (
203 | exists(join(dir, 'package.json')) ||
204 | exists(join(dir, 'node_modules'))
205 | ) {
206 | // Found the 'package.json' file or 'node_modules' dir; we're done
207 | return dir;
208 | }
209 | if (prev === dir) {
210 | // Got to the top
211 | throw new Error(
212 | 'Could not find module root given file: "' +
213 | file +
214 | '". Do you have a `package.json` file? '
215 | );
216 | }
217 | // Try the parent dir next
218 | prev = dir;
219 | dir = join(dir, '..');
220 | }
221 | };
222 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/bindings/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bindings",
3 | "description": "Helper module for loading your native module's .node file",
4 | "keywords": [
5 | "native",
6 | "addon",
7 | "bindings",
8 | "gyp",
9 | "waf",
10 | "c",
11 | "c++"
12 | ],
13 | "version": "1.5.0",
14 | "author": "Nathan Rajlich (http://tootallnate.net)",
15 | "repository": {
16 | "type": "git",
17 | "url": "git://github.com/TooTallNate/node-bindings.git"
18 | },
19 | "main": "./bindings.js",
20 | "bugs": {
21 | "url": "https://github.com/TooTallNate/node-bindings/issues"
22 | },
23 | "homepage": "https://github.com/TooTallNate/node-bindings",
24 | "license": "MIT",
25 | "dependencies": {
26 | "file-uri-to-path": "1.0.0"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/file-uri-to-path/.npmignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/file-uri-to-path/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 |
3 | language: node_js
4 |
5 | node_js:
6 | - "0.8"
7 | - "0.10"
8 | - "0.12"
9 | - "1"
10 | - "2"
11 | - "3"
12 | - "4"
13 | - "5"
14 | - "6"
15 | - "7"
16 | - "8"
17 |
18 | install:
19 | - PATH="`npm bin`:`npm bin -g`:$PATH"
20 | # Node 0.8 comes with a too obsolete npm
21 | - if [[ "`node --version`" =~ ^v0\.8\. ]]; then npm install -g npm@1.4.28 ; fi
22 | # Install dependencies and build
23 | - npm install
24 |
25 | script:
26 | # Output useful info for debugging
27 | - node --version
28 | - npm --version
29 | # Run tests
30 | - npm test
31 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/file-uri-to-path/History.md:
--------------------------------------------------------------------------------
1 |
2 | 1.0.0 / 2017-07-06
3 | ==================
4 |
5 | * update "mocha" to v3
6 | * fixed unicode URI decoding (#6)
7 | * add typings for Typescript
8 | * README: use SVG Travis-CI badge
9 | * add LICENSE file (MIT)
10 | * add .travis.yml file (testing Node.js 0.8 through 8 currently)
11 | * add README.md file
12 |
13 | 0.0.2 / 2014-01-27
14 | ==================
15 |
16 | * index: invert the path separators on Windows
17 |
18 | 0.0.1 / 2014-01-27
19 | ==================
20 |
21 | * initial commit
22 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/file-uri-to-path/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014 Nathan Rajlich
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | 'Software'), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/file-uri-to-path/README.md:
--------------------------------------------------------------------------------
1 | file-uri-to-path
2 | ================
3 | ### Convert a `file:` URI to a file path
4 | [](https://travis-ci.org/TooTallNate/file-uri-to-path)
5 |
6 | Accepts a `file:` URI and returns a regular file path suitable for use with the
7 | `fs` module functions.
8 |
9 |
10 | Installation
11 | ------------
12 |
13 | Install with `npm`:
14 |
15 | ``` bash
16 | $ npm install file-uri-to-path
17 | ```
18 |
19 |
20 | Example
21 | -------
22 |
23 | ``` js
24 | var uri2path = require('file-uri-to-path');
25 |
26 | uri2path('file://localhost/c|/WINDOWS/clock.avi');
27 | // "c:\\WINDOWS\\clock.avi"
28 |
29 | uri2path('file:///c|/WINDOWS/clock.avi');
30 | // "c:\\WINDOWS\\clock.avi"
31 |
32 | uri2path('file://localhost/c:/WINDOWS/clock.avi');
33 | // "c:\\WINDOWS\\clock.avi"
34 |
35 | uri2path('file://hostname/path/to/the%20file.txt');
36 | // "\\\\hostname\\path\\to\\the file.txt"
37 |
38 | uri2path('file:///c:/path/to/the%20file.txt');
39 | // "c:\\path\\to\\the file.txt"
40 | ```
41 |
42 |
43 | API
44 | ---
45 |
46 | ### fileUriToPath(String uri) → String
47 |
48 |
49 |
50 | License
51 | -------
52 |
53 | (The MIT License)
54 |
55 | Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
56 |
57 | Permission is hereby granted, free of charge, to any person obtaining
58 | a copy of this software and associated documentation files (the
59 | 'Software'), to deal in the Software without restriction, including
60 | without limitation the rights to use, copy, modify, merge, publish,
61 | distribute, sublicense, and/or sell copies of the Software, and to
62 | permit persons to whom the Software is furnished to do so, subject to
63 | the following conditions:
64 |
65 | The above copyright notice and this permission notice shall be
66 | included in all copies or substantial portions of the Software.
67 |
68 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
69 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
70 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
71 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
72 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
73 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
74 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
75 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/file-uri-to-path/index.d.ts:
--------------------------------------------------------------------------------
1 | declare function fileUriToPath(uri: string): string;
2 | export = fileUriToPath;
3 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/file-uri-to-path/index.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Module dependencies.
4 | */
5 |
6 | var sep = require('path').sep || '/';
7 |
8 | /**
9 | * Module exports.
10 | */
11 |
12 | module.exports = fileUriToPath;
13 |
14 | /**
15 | * File URI to Path function.
16 | *
17 | * @param {String} uri
18 | * @return {String} path
19 | * @api public
20 | */
21 |
22 | function fileUriToPath (uri) {
23 | if ('string' != typeof uri ||
24 | uri.length <= 7 ||
25 | 'file://' != uri.substring(0, 7)) {
26 | throw new TypeError('must pass in a file:// URI to convert to a file path');
27 | }
28 |
29 | var rest = decodeURI(uri.substring(7));
30 | var firstSlash = rest.indexOf('/');
31 | var host = rest.substring(0, firstSlash);
32 | var path = rest.substring(firstSlash + 1);
33 |
34 | // 2. Scheme Definition
35 | // As a special case, can be the string "localhost" or the empty
36 | // string; this is interpreted as "the machine from which the URL is
37 | // being interpreted".
38 | if ('localhost' == host) host = '';
39 |
40 | if (host) {
41 | host = sep + sep + host;
42 | }
43 |
44 | // 3.2 Drives, drive letters, mount points, file system root
45 | // Drive letters are mapped into the top of a file URI in various ways,
46 | // depending on the implementation; some applications substitute
47 | // vertical bar ("|") for the colon after the drive letter, yielding
48 | // "file:///c|/tmp/test.txt". In some cases, the colon is left
49 | // unchanged, as in "file:///c:/tmp/test.txt". In other cases, the
50 | // colon is simply omitted, as in "file:///c/tmp/test.txt".
51 | path = path.replace(/^(.+)\|/, '$1:');
52 |
53 | // for Windows, we need to invert the path separators from what a URI uses
54 | if (sep == '\\') {
55 | path = path.replace(/\//g, '\\');
56 | }
57 |
58 | if (/^.+\:/.test(path)) {
59 | // has Windows drive at beginning of path
60 | } else {
61 | // unix path…
62 | path = sep + path;
63 | }
64 |
65 | return host + path;
66 | }
67 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/file-uri-to-path/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "file-uri-to-path",
3 | "version": "1.0.0",
4 | "description": "Convert a file: URI to a file path",
5 | "main": "index.js",
6 | "types": "index.d.ts",
7 | "directories": {
8 | "test": "test"
9 | },
10 | "scripts": {
11 | "test": "mocha --reporter spec"
12 | },
13 | "repository": {
14 | "type": "git",
15 | "url": "git://github.com/TooTallNate/file-uri-to-path.git"
16 | },
17 | "keywords": [
18 | "file",
19 | "uri",
20 | "convert",
21 | "path"
22 | ],
23 | "author": "Nathan Rajlich (http://n8.io/)",
24 | "license": "MIT",
25 | "bugs": {
26 | "url": "https://github.com/TooTallNate/file-uri-to-path/issues"
27 | },
28 | "homepage": "https://github.com/TooTallNate/file-uri-to-path",
29 | "devDependencies": {
30 | "mocha": "3"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/file-uri-to-path/test/test.js:
--------------------------------------------------------------------------------
1 |
2 | var sep = require('path').sep || '/';
3 | var assert = require('assert');
4 | var uri2path = require('../');
5 | var tests = require('./tests.json');
6 |
7 | describe('file-uri-to-path', function () {
8 |
9 | Object.keys(tests).forEach(function (uri) {
10 |
11 | // the test cases were generated from Windows' PathCreateFromUrlA() function.
12 | // On Unix, we have to replace the path separator with the Unix one instead of
13 | // the Windows one.
14 | var expected = tests[uri].replace(/\\/g, sep);
15 |
16 | it('should convert ' + JSON.stringify(uri) + ' to ' + JSON.stringify(expected),
17 | function () {
18 | var actual = uri2path(uri);
19 | assert.equal(actual, expected);
20 | });
21 |
22 | });
23 |
24 | });
25 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/file-uri-to-path/test/tests.json:
--------------------------------------------------------------------------------
1 | {
2 | "file://host/path": "\\\\host\\path",
3 | "file://localhost/etc/fstab": "\\etc\\fstab",
4 | "file:///etc/fstab": "\\etc\\fstab",
5 | "file:///c:/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
6 | "file://localhost/c|/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
7 | "file:///c|/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
8 | "file://localhost/c:/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
9 | "file://hostname/path/to/the%20file.txt": "\\\\hostname\\path\\to\\the file.txt",
10 | "file:///c:/path/to/the%20file.txt": "c:\\path\\to\\the file.txt",
11 | "file:///C:/Documents%20and%20Settings/davris/FileSchemeURIs.doc": "C:\\Documents and Settings\\davris\\FileSchemeURIs.doc",
12 | "file:///C:/caf%C3%A9/%C3%A5r/d%C3%BCnn/%E7%89%9B%E9%93%83/Ph%E1%BB%9F/%F0%9F%98%B5.exe": "C:\\café\\år\\dünn\\牛铃\\Phở\\😵.exe"
13 | }
14 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/Makefile:
--------------------------------------------------------------------------------
1 | INC_DIR = $(PWD)/include
2 | CXXFLAGS += -pie -std=c++14 -fno-exceptions -I$(INC_DIR)
3 | PREFIX ?= /usr/local
4 |
5 | src/mconf: src/mconf.cpp
6 |
7 | clean:
8 | rm -f src/mconf
9 |
10 | install: src/mconf
11 | mkdir -p $(DESTDIR)$(PREFIX)/bin
12 | install src/mconf $(DESTDIR)$(PREFIX)/bin/mconf
13 |
14 | uninstall:
15 | rm -f $(PREFIX)/bin/mconf
16 |
17 | .PHONY: clean install uninstall
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/binding.gyp:
--------------------------------------------------------------------------------
1 | {
2 | "targets": [
3 | {
4 | "target_name": "mconf",
5 | "include_dirs": [
6 | "/dev/null || (rm -rf "Release/mconf.node" && cp -af "Release/obj.target/mconf.node" "Release/mconf.node")
2 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/build/Release/.deps/Release/obj.target/mconf.node.d:
--------------------------------------------------------------------------------
1 | cmd_Release/obj.target/mconf.node := g++ -o Release/obj.target/mconf.node -shared -rdynamic -fPIC -Wl,-soname=mconf.node -Wl,--start-group Release/obj.target/mconf/src/mconf.o -Wl,--end-group -llog
2 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/build/Release/.deps/Release/obj.target/mconf/src/mconf.o.d:
--------------------------------------------------------------------------------
1 | cmd_Release/obj.target/mconf/src/mconf.o := g++ -o Release/obj.target/mconf/src/mconf.o ../src/mconf.cpp '-DNODE_GYP_MODULE_NAME=mconf' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DOPENSSL_NO_ASM' '-DNAPI_DISABLE_CPP_EXCEPTIONS' '-DBUILDING_NODE_EXTENSION' '-D_GLIBCXX_USE_C99_MATH' -I/data/mkuser/root/.cache/node-gyp/16.15.1/include/node -I/data/mkuser/root/.cache/node-gyp/16.15.1/src -I/data/mkuser/root/.cache/node-gyp/16.15.1/deps/openssl/config -I/data/mkuser/root/.cache/node-gyp/16.15.1/deps/openssl/openssl/include -I/data/mkuser/root/.cache/node-gyp/16.15.1/deps/uv/include -I/data/mkuser/root/.cache/node-gyp/16.15.1/deps/zlib -I/data/mkuser/root/.cache/node-gyp/16.15.1/deps/v8/include -I/data/data/io.spck.editor.node/files/ini/include -I../node_modules/node-addon-api -fPIC -Wall -Wextra -Wno-unused-parameter -O3 -fno-omit-frame-pointer -fPIC -fno-rtti -fno-exceptions -std=gnu++14 -MMD -MF ./Release/.deps/Release/obj.target/mconf/src/mconf.o.d.raw -c
2 | Release/obj.target/mconf/src/mconf.o: ../src/mconf.cpp \
3 | /data/data/io.spck.editor.node/files/ini/include/INIReader.h \
4 | ../node_modules/node-addon-api/napi.h \
5 | /data/mkuser/root/.cache/node-gyp/16.15.1/include/node/node_api.h \
6 | /data/mkuser/root/.cache/node-gyp/16.15.1/include/node/js_native_api.h \
7 | /data/mkuser/root/.cache/node-gyp/16.15.1/include/node/js_native_api_types.h \
8 | /data/mkuser/root/.cache/node-gyp/16.15.1/include/node/node_api_types.h \
9 | ../node_modules/node-addon-api/napi-inl.h \
10 | ../node_modules/node-addon-api/napi-inl.deprecated.h
11 | ../src/mconf.cpp:
12 | /data/data/io.spck.editor.node/files/ini/include/INIReader.h:
13 | ../node_modules/node-addon-api/napi.h:
14 | /data/mkuser/root/.cache/node-gyp/16.15.1/include/node/node_api.h:
15 | /data/mkuser/root/.cache/node-gyp/16.15.1/include/node/js_native_api.h:
16 | /data/mkuser/root/.cache/node-gyp/16.15.1/include/node/js_native_api_types.h:
17 | /data/mkuser/root/.cache/node-gyp/16.15.1/include/node/node_api_types.h:
18 | ../node_modules/node-addon-api/napi-inl.h:
19 | ../node_modules/node-addon-api/napi-inl.deprecated.h:
20 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/build/Release/mconf.node:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/node/bc369b99a109b16e354b9f0c24befed61869784d/system/usr/share/node/node_modules/mconf/build/Release/mconf.node
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/build/Release/obj.target/mconf.node:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/node/bc369b99a109b16e354b9f0c24befed61869784d/system/usr/share/node/node_modules/mconf/build/Release/obj.target/mconf.node
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/build/Release/obj.target/mconf/src/mconf.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/node/bc369b99a109b16e354b9f0c24befed61869784d/system/usr/share/node/node_modules/mconf/build/Release/obj.target/mconf/src/mconf.o
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/build/binding.Makefile:
--------------------------------------------------------------------------------
1 | # This file is generated by gyp; do not edit.
2 |
3 | export builddir_name ?= ./build/.
4 | .PHONY: all
5 | all:
6 | $(MAKE) mconf
7 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/build/mconf.target.mk:
--------------------------------------------------------------------------------
1 | # This file is generated by gyp; do not edit.
2 |
3 | TOOLSET := target
4 | TARGET := mconf
5 | DEFS_Debug := \
6 | '-DNODE_GYP_MODULE_NAME=mconf' \
7 | '-DUSING_UV_SHARED=1' \
8 | '-DUSING_V8_SHARED=1' \
9 | '-DV8_DEPRECATION_WARNINGS=1' \
10 | '-DV8_DEPRECATION_WARNINGS' \
11 | '-DV8_IMMINENT_DEPRECATION_WARNINGS' \
12 | '-D_GLIBCXX_USE_CXX11_ABI=1' \
13 | '-D_LARGEFILE_SOURCE' \
14 | '-D_FILE_OFFSET_BITS=64' \
15 | '-D__STDC_FORMAT_MACROS' \
16 | '-DOPENSSL_NO_PINSHARED' \
17 | '-DOPENSSL_THREADS' \
18 | '-DOPENSSL_NO_ASM' \
19 | '-DNAPI_DISABLE_CPP_EXCEPTIONS' \
20 | '-DBUILDING_NODE_EXTENSION' \
21 | '-D_GLIBCXX_USE_C99_MATH' \
22 | '-DDEBUG' \
23 | '-D_DEBUG' \
24 | '-DV8_ENABLE_CHECKS'
25 |
26 | # Flags passed to all source files.
27 | CFLAGS_Debug := \
28 | -fPIC \
29 | -Wall \
30 | -Wextra \
31 | -Wno-unused-parameter \
32 | -g \
33 | -O0 \
34 | -fPIC
35 |
36 | # Flags passed to only C files.
37 | CFLAGS_C_Debug :=
38 |
39 | # Flags passed to only C++ files.
40 | CFLAGS_CC_Debug := \
41 | -fno-rtti \
42 | -fno-exceptions \
43 | -std=gnu++14
44 |
45 | INCS_Debug := \
46 | -I/data/mkuser/root/.cache/node-gyp/16.15.1/include/node \
47 | -I/data/mkuser/root/.cache/node-gyp/16.15.1/src \
48 | -I/data/mkuser/root/.cache/node-gyp/16.15.1/deps/openssl/config \
49 | -I/data/mkuser/root/.cache/node-gyp/16.15.1/deps/openssl/openssl/include \
50 | -I/data/mkuser/root/.cache/node-gyp/16.15.1/deps/uv/include \
51 | -I/data/mkuser/root/.cache/node-gyp/16.15.1/deps/zlib \
52 | -I/data/mkuser/root/.cache/node-gyp/16.15.1/deps/v8/include \
53 | -I/data/data/io.spck.editor.node/files/ini/include \
54 | -I$(srcdir)/node_modules/node-addon-api
55 |
56 | DEFS_Release := \
57 | '-DNODE_GYP_MODULE_NAME=mconf' \
58 | '-DUSING_UV_SHARED=1' \
59 | '-DUSING_V8_SHARED=1' \
60 | '-DV8_DEPRECATION_WARNINGS=1' \
61 | '-DV8_DEPRECATION_WARNINGS' \
62 | '-DV8_IMMINENT_DEPRECATION_WARNINGS' \
63 | '-D_GLIBCXX_USE_CXX11_ABI=1' \
64 | '-D_LARGEFILE_SOURCE' \
65 | '-D_FILE_OFFSET_BITS=64' \
66 | '-D__STDC_FORMAT_MACROS' \
67 | '-DOPENSSL_NO_PINSHARED' \
68 | '-DOPENSSL_THREADS' \
69 | '-DOPENSSL_NO_ASM' \
70 | '-DNAPI_DISABLE_CPP_EXCEPTIONS' \
71 | '-DBUILDING_NODE_EXTENSION' \
72 | '-D_GLIBCXX_USE_C99_MATH'
73 |
74 | # Flags passed to all source files.
75 | CFLAGS_Release := \
76 | -fPIC \
77 | -Wall \
78 | -Wextra \
79 | -Wno-unused-parameter \
80 | -O3 \
81 | -fno-omit-frame-pointer \
82 | -fPIC
83 |
84 | # Flags passed to only C files.
85 | CFLAGS_C_Release :=
86 |
87 | # Flags passed to only C++ files.
88 | CFLAGS_CC_Release := \
89 | -fno-rtti \
90 | -fno-exceptions \
91 | -std=gnu++14
92 |
93 | INCS_Release := \
94 | -I/data/mkuser/root/.cache/node-gyp/16.15.1/include/node \
95 | -I/data/mkuser/root/.cache/node-gyp/16.15.1/src \
96 | -I/data/mkuser/root/.cache/node-gyp/16.15.1/deps/openssl/config \
97 | -I/data/mkuser/root/.cache/node-gyp/16.15.1/deps/openssl/openssl/include \
98 | -I/data/mkuser/root/.cache/node-gyp/16.15.1/deps/uv/include \
99 | -I/data/mkuser/root/.cache/node-gyp/16.15.1/deps/zlib \
100 | -I/data/mkuser/root/.cache/node-gyp/16.15.1/deps/v8/include \
101 | -I/data/data/io.spck.editor.node/files/ini/include \
102 | -I$(srcdir)/node_modules/node-addon-api
103 |
104 | OBJS := \
105 | $(obj).target/$(TARGET)/src/mconf.o
106 |
107 | # Add to the list of files we specially track dependencies for.
108 | all_deps += $(OBJS)
109 |
110 | # CFLAGS et al overrides must be target-local.
111 | # See "Target-specific Variable Values" in the GNU Make manual.
112 | $(OBJS): TOOLSET := $(TOOLSET)
113 | $(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
114 | $(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
115 |
116 | # Suffix rules, putting all outputs into $(obj).
117 |
118 | $(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
119 | @$(call do_cmd,cxx,1)
120 |
121 | # Try building from generated source, too.
122 |
123 | $(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
124 | @$(call do_cmd,cxx,1)
125 |
126 | $(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
127 | @$(call do_cmd,cxx,1)
128 |
129 | # End of this set of suffix rules
130 | ### Rules for final target.
131 | LDFLAGS_Debug := \
132 | -rdynamic \
133 | -fPIC
134 |
135 | LDFLAGS_Release := \
136 | -rdynamic \
137 | -fPIC
138 |
139 | LIBS := \
140 | -llog
141 |
142 | $(obj).target/mconf.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
143 | $(obj).target/mconf.node: LIBS := $(LIBS)
144 | $(obj).target/mconf.node: TOOLSET := $(TOOLSET)
145 | $(obj).target/mconf.node: $(OBJS) FORCE_DO_CMD
146 | $(call do_cmd,solink_module)
147 |
148 | all_deps += $(obj).target/mconf.node
149 | # Add target alias
150 | .PHONY: mconf
151 | mconf: $(builddir)/mconf.node
152 |
153 | # Copy this to the executable output path.
154 | $(builddir)/mconf.node: TOOLSET := $(TOOLSET)
155 | $(builddir)/mconf.node: $(obj).target/mconf.node FORCE_DO_CMD
156 | $(call do_cmd,copy)
157 |
158 | all_deps += $(builddir)/mconf.node
159 | # Short alias for building this executable.
160 | .PHONY: mconf.node
161 | mconf.node: $(obj).target/mconf.node $(builddir)/mconf.node
162 |
163 | # Add executable to "all" target.
164 | .PHONY: all
165 | all: $(builddir)/mconf.node
166 |
167 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/build/node_gyp_bins/python3:
--------------------------------------------------------------------------------
1 | /data/mkuser/usr/bin/python
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/index.js:
--------------------------------------------------------------------------------
1 | const { mconf } = require("./lib/mconf.js");
2 |
3 | module.exports = {
4 | mconf,
5 | };
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/lib/mconf.js:
--------------------------------------------------------------------------------
1 | const { mconf } = require("bindings")("mconf.node");
2 | module.exports = { mconf };
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/node_modules/.package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mconf",
3 | "version": "1.0.0",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "node_modules/bindings": {
8 | "version": "1.5.0",
9 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
10 | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
11 | "dependencies": {
12 | "file-uri-to-path": "1.0.0"
13 | }
14 | },
15 | "node_modules/file-uri-to-path": {
16 | "version": "1.0.0",
17 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
18 | "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
19 | },
20 | "node_modules/node-addon-api": {
21 | "version": "7.0.0",
22 | "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.0.0.tgz",
23 | "integrity": "sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA=="
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mconf",
3 | "version": "1.0.0",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "mconf",
9 | "version": "1.0.0",
10 | "hasInstallScript": true,
11 | "license": "MIT",
12 | "dependencies": {
13 | "bindings": "^1.5.0",
14 | "node-addon-api": "^7.0.0"
15 | }
16 | },
17 | "node_modules/bindings": {
18 | "version": "1.5.0",
19 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
20 | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
21 | "dependencies": {
22 | "file-uri-to-path": "1.0.0"
23 | }
24 | },
25 | "node_modules/file-uri-to-path": {
26 | "version": "1.0.0",
27 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
28 | "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
29 | },
30 | "node_modules/node-addon-api": {
31 | "version": "7.0.0",
32 | "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.0.0.tgz",
33 | "integrity": "sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA=="
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mconf",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "install": "node-gyp rebuild",
8 | "clean": "node-gyp clean && make clean",
9 | "build": "node-gyp build && make",
10 | "configure": "node-gyp configure",
11 | "build-prod": "npm run clean && npm run configure && npm run build"
12 | },
13 | "author": "Der_Googler",
14 | "license": "MIT",
15 | "gypfile": true,
16 | "dependencies": {
17 | "bindings": "^1.5.0",
18 | "node-addon-api": "^7.0.0"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/src/mconf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/node/bc369b99a109b16e354b9f0c24befed61869784d/system/usr/share/node/node_modules/mconf/src/mconf
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/src/mconf.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 |
7 | using namespace std;
8 |
9 | void usage(int status) {
10 | FILE *stream = (status == EXIT_SUCCESS) ? stdout : stderr;
11 |
12 | fprintf(stream,
13 | "MMRL Config\n\n"
14 | "Usage: mconf [options]\n\n"
15 | "Options:\n"
16 | " -s, --scope NAME Specify scope\n"
17 | " -k, --key NAME Specify key\n"
18 | " -d, --default NAME Specify default value\n"
19 | " -h, --help Display this help message and exit\n\n");
20 | exit(status);
21 | }
22 |
23 | string mconf(const char* scope, const char* key, const char* def) {
24 | const char* conf_file = "/data/adb/mmrl/config.ini";
25 |
26 | /* Find MMRL Config File */
27 | FILE *file;
28 | if (!(file = fopen(conf_file, "r"))) {
29 | fclose(file);
30 | return def;
31 | }
32 |
33 | INIReader reader(conf_file);
34 |
35 | if (reader.ParseError() != 0) {
36 | return def;
37 | }
38 |
39 | return reader.Get(scope, key, def);
40 | }
41 |
42 | int main(int argc, char* argv[]) {
43 |
44 | int c;
45 | struct option long_opts[] = {
46 | { "scope", required_argument, nullptr, 's' },
47 | { "key", required_argument, nullptr, 'k' },
48 | { "default", required_argument, nullptr, 'd' },
49 | { "help", no_argument, nullptr, 'h' },
50 | { nullptr, 0, nullptr, 0 },
51 | };
52 |
53 |
54 | const char* scope = NULL;
55 | const char* key = NULL;
56 | const char* def = "unknown";
57 |
58 | while ((c = getopt_long(argc, argv, "s:k:d:h", long_opts, nullptr)) != -1) {
59 | switch (c) {
60 | case 'h':
61 | usage(EXIT_SUCCESS);
62 | case 's':
63 | scope = optarg;
64 | break;
65 | case 'k':
66 | key = optarg;
67 | break;
68 | case 'd':
69 | def = optarg;
70 | break;
71 | default:
72 | usage(EXIT_SUCCESS);
73 | }
74 | }
75 |
76 | cout << mconf(scope, key, def) << endl;
77 |
78 | return EXIT_SUCCESS;
79 | }
80 |
81 | #if __has_include()
82 | #include
83 |
84 | using namespace Napi;
85 |
86 | Value Add(const CallbackInfo& info) {
87 | Env env = info.Env();
88 |
89 | if (info.Length() < 2) {
90 | TypeError::New(env, "Wrong number of arguments").ThrowAsJavaScriptException();
91 | return env.Null();
92 | }
93 |
94 | if (!info[0].IsString() || !info[1].IsString() || !info[2].IsString()) {
95 | TypeError::New(env, "Wrong arguments").ThrowAsJavaScriptException();
96 | return env.Null();
97 | }
98 |
99 | string scope = info[0].As();
100 | string key = info[1].As();
101 | string def = info[2].As();
102 |
103 | return String::New(env, mconf(scope.c_str(), key.c_str(), def.c_str()));
104 | }
105 |
106 | Object Init(Env env, Object exports) {
107 | exports.Set(String::New(env, "mconf"), Function::New(env, Add));
108 | return exports;
109 | }
110 |
111 | NODE_API_MODULE(addon, Init)
112 |
113 | #endif
114 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/mconf/test.js:
--------------------------------------------------------------------------------
1 | const { mconf } =require(".")
2 |
3 | const name = mconf("mkshrc", "namve", "Cook")
4 |
5 | console.log(name)
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/node-addon-api/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 | =====================
3 |
4 | Copyright (c) 2017 Node.js API collaborators
5 | -----------------------------------
6 |
7 | *Node.js API collaborators listed at *
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/node-addon-api/common.gypi:
--------------------------------------------------------------------------------
1 | {
2 | 'variables': {
3 | 'NAPI_VERSION%': "
9 | inline PropertyDescriptor PropertyDescriptor::Accessor(
10 | const char* utf8name,
11 | Getter getter,
12 | napi_property_attributes attributes,
13 | void* /*data*/) {
14 | using CbData = details::CallbackData;
15 | // TODO: Delete when the function is destroyed
16 | auto callbackData = new CbData({getter, nullptr});
17 |
18 | return PropertyDescriptor({utf8name,
19 | nullptr,
20 | nullptr,
21 | CbData::Wrapper,
22 | nullptr,
23 | nullptr,
24 | attributes,
25 | callbackData});
26 | }
27 |
28 | template
29 | inline PropertyDescriptor PropertyDescriptor::Accessor(
30 | const std::string& utf8name,
31 | Getter getter,
32 | napi_property_attributes attributes,
33 | void* data) {
34 | return Accessor(utf8name.c_str(), getter, attributes, data);
35 | }
36 |
37 | template
38 | inline PropertyDescriptor PropertyDescriptor::Accessor(
39 | napi_value name,
40 | Getter getter,
41 | napi_property_attributes attributes,
42 | void* /*data*/) {
43 | using CbData = details::CallbackData;
44 | // TODO: Delete when the function is destroyed
45 | auto callbackData = new CbData({getter, nullptr});
46 |
47 | return PropertyDescriptor({nullptr,
48 | name,
49 | nullptr,
50 | CbData::Wrapper,
51 | nullptr,
52 | nullptr,
53 | attributes,
54 | callbackData});
55 | }
56 |
57 | template
58 | inline PropertyDescriptor PropertyDescriptor::Accessor(
59 | Name name, Getter getter, napi_property_attributes attributes, void* data) {
60 | napi_value nameValue = name;
61 | return PropertyDescriptor::Accessor(nameValue, getter, attributes, data);
62 | }
63 |
64 | template
65 | inline PropertyDescriptor PropertyDescriptor::Accessor(
66 | const char* utf8name,
67 | Getter getter,
68 | Setter setter,
69 | napi_property_attributes attributes,
70 | void* /*data*/) {
71 | using CbData = details::AccessorCallbackData;
72 | // TODO: Delete when the function is destroyed
73 | auto callbackData = new CbData({getter, setter, nullptr});
74 |
75 | return PropertyDescriptor({utf8name,
76 | nullptr,
77 | nullptr,
78 | CbData::GetterWrapper,
79 | CbData::SetterWrapper,
80 | nullptr,
81 | attributes,
82 | callbackData});
83 | }
84 |
85 | template
86 | inline PropertyDescriptor PropertyDescriptor::Accessor(
87 | const std::string& utf8name,
88 | Getter getter,
89 | Setter setter,
90 | napi_property_attributes attributes,
91 | void* data) {
92 | return Accessor(utf8name.c_str(), getter, setter, attributes, data);
93 | }
94 |
95 | template
96 | inline PropertyDescriptor PropertyDescriptor::Accessor(
97 | napi_value name,
98 | Getter getter,
99 | Setter setter,
100 | napi_property_attributes attributes,
101 | void* /*data*/) {
102 | using CbData = details::AccessorCallbackData;
103 | // TODO: Delete when the function is destroyed
104 | auto callbackData = new CbData({getter, setter, nullptr});
105 |
106 | return PropertyDescriptor({nullptr,
107 | name,
108 | nullptr,
109 | CbData::GetterWrapper,
110 | CbData::SetterWrapper,
111 | nullptr,
112 | attributes,
113 | callbackData});
114 | }
115 |
116 | template
117 | inline PropertyDescriptor PropertyDescriptor::Accessor(
118 | Name name,
119 | Getter getter,
120 | Setter setter,
121 | napi_property_attributes attributes,
122 | void* data) {
123 | napi_value nameValue = name;
124 | return PropertyDescriptor::Accessor(
125 | nameValue, getter, setter, attributes, data);
126 | }
127 |
128 | template
129 | inline PropertyDescriptor PropertyDescriptor::Function(
130 | const char* utf8name,
131 | Callable cb,
132 | napi_property_attributes attributes,
133 | void* /*data*/) {
134 | using ReturnType = decltype(cb(CallbackInfo(nullptr, nullptr)));
135 | using CbData = details::CallbackData;
136 | // TODO: Delete when the function is destroyed
137 | auto callbackData = new CbData({cb, nullptr});
138 |
139 | return PropertyDescriptor({utf8name,
140 | nullptr,
141 | CbData::Wrapper,
142 | nullptr,
143 | nullptr,
144 | nullptr,
145 | attributes,
146 | callbackData});
147 | }
148 |
149 | template
150 | inline PropertyDescriptor PropertyDescriptor::Function(
151 | const std::string& utf8name,
152 | Callable cb,
153 | napi_property_attributes attributes,
154 | void* data) {
155 | return Function(utf8name.c_str(), cb, attributes, data);
156 | }
157 |
158 | template
159 | inline PropertyDescriptor PropertyDescriptor::Function(
160 | napi_value name,
161 | Callable cb,
162 | napi_property_attributes attributes,
163 | void* /*data*/) {
164 | using ReturnType = decltype(cb(CallbackInfo(nullptr, nullptr)));
165 | using CbData = details::CallbackData;
166 | // TODO: Delete when the function is destroyed
167 | auto callbackData = new CbData({cb, nullptr});
168 |
169 | return PropertyDescriptor({nullptr,
170 | name,
171 | CbData::Wrapper,
172 | nullptr,
173 | nullptr,
174 | nullptr,
175 | attributes,
176 | callbackData});
177 | }
178 |
179 | template
180 | inline PropertyDescriptor PropertyDescriptor::Function(
181 | Name name, Callable cb, napi_property_attributes attributes, void* data) {
182 | napi_value nameValue = name;
183 | return PropertyDescriptor::Function(nameValue, cb, attributes, data);
184 | }
185 |
186 | #endif // !SRC_NAPI_INL_DEPRECATED_H_
187 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/node-addon-api/node_api.gyp:
--------------------------------------------------------------------------------
1 | {
2 | 'targets': [
3 | {
4 | 'target_name': 'nothing',
5 | 'type': 'static_library',
6 | 'sources': [ 'nothing.c' ]
7 | }
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/node-addon-api/noexcept.gypi:
--------------------------------------------------------------------------------
1 | {
2 | 'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ],
3 | 'cflags': [ '-fno-exceptions' ],
4 | 'cflags_cc': [ '-fno-exceptions' ],
5 | 'conditions': [
6 | ["OS=='win'", {
7 | # _HAS_EXCEPTIONS is already defined and set to 0 in common.gypi
8 | #"defines": [
9 | # "_HAS_EXCEPTIONS=0"
10 | #],
11 | "msvs_settings": {
12 | "VCCLCompilerTool": {
13 | 'ExceptionHandling': 0,
14 | 'EnablePREfast': 'true',
15 | },
16 | },
17 | }],
18 | ["OS=='mac'", {
19 | 'xcode_settings': {
20 | 'CLANG_CXX_LIBRARY': 'libc++',
21 | 'MACOSX_DEPLOYMENT_TARGET': '10.7',
22 | 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO',
23 | },
24 | }],
25 | ],
26 | }
27 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/node-addon-api/nothing.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Magisk-Modules-Alt-Repo/node/bc369b99a109b16e354b9f0c24befed61869784d/system/usr/share/node/node_modules/node-addon-api/nothing.c
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/node-addon-api/package-support.json:
--------------------------------------------------------------------------------
1 | {
2 | "versions": [
3 | {
4 | "version": "*",
5 | "target": {
6 | "node": "active"
7 | },
8 | "response": {
9 | "type": "time-permitting",
10 | "paid": false,
11 | "contact": {
12 | "name": "node-addon-api team",
13 | "url": "https://github.com/nodejs/node-addon-api/issues"
14 | }
15 | },
16 | "backing": [ { "project": "https://github.com/nodejs" },
17 | { "foundation": "https://openjsf.org/" }
18 | ]
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/node-addon-api/tools/README.md:
--------------------------------------------------------------------------------
1 | # Tools
2 |
3 | ## clang-format
4 |
5 | The clang-format checking tools is designed to check changed lines of code compared to given git-refs.
6 |
7 | ## Migration Script
8 |
9 | The migration tool is designed to reduce repetitive work in the migration process. However, the script is not aiming to convert every thing for you. There are usually some small fixes and major reconstruction required.
10 |
11 | ### How To Use
12 |
13 | To run the conversion script, first make sure you have the latest `node-addon-api` in your `node_modules` directory.
14 | ```
15 | npm install node-addon-api
16 | ```
17 |
18 | Then run the script passing your project directory
19 | ```
20 | node ./node_modules/node-addon-api/tools/conversion.js ./
21 | ```
22 |
23 | After finish, recompile and debug things that are missed by the script.
24 |
25 |
26 | ### Quick Fixes
27 | Here is the list of things that can be fixed easily.
28 | 1. Change your methods' return value to void if it doesn't return value to JavaScript.
29 | 2. Use `.` to access attribute or to invoke member function in Napi::Object instead of `->`.
30 | 3. `Napi::New(env, value);` to `Napi::[Type]::New(env, value);
31 |
32 |
33 | ### Major Reconstructions
34 | The implementation of `Napi::ObjectWrap` is significantly different from NAN's. `Napi::ObjectWrap` takes a pointer to the wrapped object and creates a reference to the wrapped object inside ObjectWrap constructor. `Napi::ObjectWrap` also associates wrapped object's instance methods to Javascript module instead of static methods like NAN.
35 |
36 | So if you use Nan::ObjectWrap in your module, you will need to execute the following steps.
37 |
38 | 1. Convert your [ClassName]::New function to a constructor function that takes a `Napi::CallbackInfo`. Declare it as
39 | ```
40 | [ClassName](const Napi::CallbackInfo& info);
41 | ```
42 | and define it as
43 | ```
44 | [ClassName]::[ClassName](const Napi::CallbackInfo& info) : Napi::ObjectWrap<[ClassName]>(info){
45 | ...
46 | }
47 | ```
48 | This way, the `Napi::ObjectWrap` constructor will be invoked after the object has been instantiated and `Napi::ObjectWrap` can use the `this` pointer to create a reference to the wrapped object.
49 |
50 | 2. Move your original constructor code into the new constructor. Delete your original constructor.
51 | 3. In your class initialization function, associate native methods in the following way.
52 | ```
53 | Napi::FunctionReference constructor;
54 |
55 | void [ClassName]::Init(Napi::Env env, Napi::Object exports, Napi::Object module) {
56 | Napi::HandleScope scope(env);
57 | Napi::Function ctor = DefineClass(env, "Canvas", {
58 | InstanceMethod<&[ClassName]::Func1>("Func1"),
59 | InstanceMethod<&[ClassName]::Func2>("Func2"),
60 | InstanceAccessor<&[ClassName]::ValueGetter>("Value"),
61 | StaticMethod<&[ClassName]::StaticMethod>("MethodName"),
62 | InstanceValue("Value", Napi::[Type]::New(env, value)),
63 | });
64 |
65 | constructor = Napi::Persistent(ctor);
66 | constructor .SuppressDestruct();
67 | exports.Set("[ClassName]", ctor);
68 | }
69 | ```
70 | 4. In function where you need to Unwrap the ObjectWrap in NAN like `[ClassName]* native = Nan::ObjectWrap::Unwrap<[ClassName]>(info.This());`, use `this` pointer directly as the unwrapped object as each ObjectWrap instance is associated with a unique object instance.
71 |
72 |
73 | If you still find issues after following this guide, please leave us an issue describing your problem and we will try to resolve it.
74 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/node-addon-api/tools/check-napi.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | // Descend into a directory structure and, for each file matching *.node, output
3 | // based on the imports found in the file whether it's an N-API module or not.
4 |
5 | const fs = require('fs');
6 | const path = require('path');
7 |
8 | // Read the output of the command, break it into lines, and use the reducer to
9 | // decide whether the file is an N-API module or not.
10 | function checkFile (file, command, argv, reducer) {
11 | const child = require('child_process').spawn(command, argv, {
12 | stdio: ['inherit', 'pipe', 'inherit']
13 | });
14 | let leftover = '';
15 | let isNapi;
16 | child.stdout.on('data', (chunk) => {
17 | if (isNapi === undefined) {
18 | chunk = (leftover + chunk.toString()).split(/[\r\n]+/);
19 | leftover = chunk.pop();
20 | isNapi = chunk.reduce(reducer, isNapi);
21 | if (isNapi !== undefined) {
22 | child.kill();
23 | }
24 | }
25 | });
26 | child.on('close', (code, signal) => {
27 | if ((code === null && signal !== null) || (code !== 0)) {
28 | console.log(
29 | command + ' exited with code: ' + code + ' and signal: ' + signal);
30 | } else {
31 | // Green if it's a N-API module, red otherwise.
32 | console.log(
33 | '\x1b[' + (isNapi ? '42' : '41') + 'm' +
34 | (isNapi ? ' N-API' : 'Not N-API') +
35 | '\x1b[0m: ' + file);
36 | }
37 | });
38 | }
39 |
40 | // Use nm -a to list symbols.
41 | function checkFileUNIX (file) {
42 | checkFile(file, 'nm', ['-a', file], (soFar, line) => {
43 | if (soFar === undefined) {
44 | line = line.match(/([0-9a-f]*)? ([a-zA-Z]) (.*$)/);
45 | if (line[2] === 'U') {
46 | if (/^napi/.test(line[3])) {
47 | soFar = true;
48 | }
49 | }
50 | }
51 | return soFar;
52 | });
53 | }
54 |
55 | // Use dumpbin /imports to list symbols.
56 | function checkFileWin32 (file) {
57 | checkFile(file, 'dumpbin', ['/imports', file], (soFar, line) => {
58 | if (soFar === undefined) {
59 | line = line.match(/([0-9a-f]*)? +([a-zA-Z0-9]) (.*$)/);
60 | if (line && /^napi/.test(line[line.length - 1])) {
61 | soFar = true;
62 | }
63 | }
64 | return soFar;
65 | });
66 | }
67 |
68 | // Descend into a directory structure and pass each file ending in '.node' to
69 | // one of the above checks, depending on the OS.
70 | function recurse (top) {
71 | fs.readdir(top, (error, items) => {
72 | if (error) {
73 | throw new Error('error reading directory ' + top + ': ' + error);
74 | }
75 | items.forEach((item) => {
76 | item = path.join(top, item);
77 | fs.stat(item, ((item) => (error, stats) => {
78 | if (error) {
79 | throw new Error('error about ' + item + ': ' + error);
80 | }
81 | if (stats.isDirectory()) {
82 | recurse(item);
83 | } else if (/[.]node$/.test(item) &&
84 | // Explicitly ignore files called 'nothing.node' because they are
85 | // artefacts of node-addon-api having identified a version of
86 | // Node.js that ships with a correct implementation of N-API.
87 | path.basename(item) !== 'nothing.node') {
88 | process.platform === 'win32'
89 | ? checkFileWin32(item)
90 | : checkFileUNIX(item);
91 | }
92 | })(item));
93 | });
94 | });
95 | }
96 |
97 | // Start with the directory given on the command line or the current directory
98 | // if nothing was given.
99 | recurse(process.argv.length > 3 ? process.argv[2] : '.');
100 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/node-addon-api/tools/clang-format.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | const spawn = require('child_process').spawnSync;
4 | const path = require('path');
5 |
6 | const filesToCheck = ['*.h', '*.cc'];
7 | const FORMAT_START = process.env.FORMAT_START || 'main';
8 |
9 | function main (args) {
10 | let fix = false;
11 | while (args.length > 0) {
12 | switch (args[0]) {
13 | case '-f':
14 | case '--fix':
15 | fix = true;
16 | break;
17 | default:
18 | }
19 | args.shift();
20 | }
21 |
22 | const clangFormatPath = path.dirname(require.resolve('clang-format'));
23 | const binary = process.platform === 'win32'
24 | ? 'node_modules\\.bin\\clang-format.cmd'
25 | : 'node_modules/.bin/clang-format';
26 | const options = ['--binary=' + binary, '--style=file'];
27 | if (fix) {
28 | options.push(FORMAT_START);
29 | } else {
30 | options.push('--diff', FORMAT_START);
31 | }
32 |
33 | const gitClangFormatPath = path.join(clangFormatPath, 'bin/git-clang-format');
34 | const result = spawn(
35 | 'python',
36 | [gitClangFormatPath, ...options, '--', ...filesToCheck],
37 | { encoding: 'utf-8' }
38 | );
39 |
40 | if (result.stderr) {
41 | console.error('Error running git-clang-format:', result.stderr);
42 | return 2;
43 | }
44 |
45 | const clangFormatOutput = result.stdout.trim();
46 | // Bail fast if in fix mode.
47 | if (fix) {
48 | console.log(clangFormatOutput);
49 | return 0;
50 | }
51 | // Detect if there is any complains from clang-format
52 | if (
53 | clangFormatOutput !== '' &&
54 | clangFormatOutput !== 'no modified files to format' &&
55 | clangFormatOutput !== 'clang-format did not modify any files'
56 | ) {
57 | console.error(clangFormatOutput);
58 | const fixCmd = 'npm run lint:fix';
59 | console.error(`
60 | ERROR: please run "${fixCmd}" to format changes in your commit
61 | Note that when running the command locally, please keep your local
62 | main branch and working branch up to date with nodejs/node-addon-api
63 | to exclude un-related complains.
64 | Or you can run "env FORMAT_START=upstream/main ${fixCmd}".`);
65 | return 1;
66 | }
67 | }
68 |
69 | if (require.main === module) {
70 | process.exitCode = main(process.argv.slice(2));
71 | }
72 |
--------------------------------------------------------------------------------
/system/usr/share/node/node_modules/node-addon-api/tools/eslint-format.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | const spawn = require('child_process').spawnSync;
4 |
5 | const filesToCheck = '*.js';
6 | const FORMAT_START = process.env.FORMAT_START || 'main';
7 | const IS_WIN = process.platform === 'win32';
8 | const ESLINT_PATH = IS_WIN ? 'node_modules\\.bin\\eslint.cmd' : 'node_modules/.bin/eslint';
9 |
10 | function main (args) {
11 | let fix = false;
12 | while (args.length > 0) {
13 | switch (args[0]) {
14 | case '-f':
15 | case '--fix':
16 | fix = true;
17 | break;
18 | default:
19 | }
20 | args.shift();
21 | }
22 |
23 | // Check js files that change on unstaged file
24 | const fileUnStaged = spawn(
25 | 'git',
26 | ['diff', '--name-only', '--diff-filter=d', FORMAT_START, filesToCheck],
27 | {
28 | encoding: 'utf-8'
29 | }
30 | );
31 |
32 | // Check js files that change on staged file
33 | const fileStaged = spawn(
34 | 'git',
35 | ['diff', '--name-only', '--cached', '--diff-filter=d', FORMAT_START, filesToCheck],
36 | {
37 | encoding: 'utf-8'
38 | }
39 | );
40 |
41 | const options = [
42 | ...fileStaged.stdout.split('\n').filter((f) => f !== ''),
43 | ...fileUnStaged.stdout.split('\n').filter((f) => f !== '')
44 | ];
45 |
46 | if (fix) {
47 | options.push('--fix');
48 | }
49 |
50 | const result = spawn(ESLINT_PATH, [...options], {
51 | encoding: 'utf-8'
52 | });
53 |
54 | if (result.error && result.error.errno === 'ENOENT') {
55 | console.error('Eslint not found! Eslint is supposed to be found at ', ESLINT_PATH);
56 | return 2;
57 | }
58 |
59 | if (result.status === 1) {
60 | console.error('Eslint error:', result.stdout);
61 | const fixCmd = 'npm run lint:fix';
62 | console.error(`ERROR: please run "${fixCmd}" to format changes in your commit
63 | Note that when running the command locally, please keep your local
64 | main branch and working branch up to date with nodejs/node-addon-api
65 | to exclude un-related complains.
66 | Or you can run "env FORMAT_START=upstream/main ${fixCmd}".
67 | Also fix JS files by yourself if necessary.`);
68 | return 1;
69 | }
70 |
71 | if (result.stderr) {
72 | console.error('Error running eslint:', result.stderr);
73 | return 2;
74 | }
75 | }
76 |
77 | if (require.main === module) {
78 | process.exitCode = main(process.argv.slice(2));
79 | }
80 |
--------------------------------------------------------------------------------
/system/usr/share/yarn/bin/yarn:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 | argv0=$(echo "$0" | sed -e 's,\\,/,g')
3 | basedir=$(dirname "$(readlink "$0" || echo "$argv0")")
4 |
5 | case "$(uname -s)" in
6 | Darwin) basedir="$(cd "$(dirname "$argv0")" && pwd)" ;;
7 | Linux) basedir=$(dirname "$(readlink -f "$0" || echo "$argv0")") ;;
8 | *CYGWIN*) basedir=$(cygpath -w "$basedir") ;;
9 | *MSYS*) basedir=$(cygpath -w "$basedir") ;;
10 | esac
11 |
12 | command_exists() {
13 | command -v "$1" >/dev/null 2>&1
14 | }
15 |
16 | if command_exists node; then
17 | if [ "$YARN_FORCE_WINPTY" = 1 ] || command_exists winpty && test -t 1; then
18 | winpty node "$basedir/yarn.js" "$@"
19 | else
20 | exec node "$basedir/yarn.js" "$@"
21 | fi
22 | ret=$?
23 | # Debian and Ubuntu use "nodejs" as the name of the binary, not "node", so we
24 | # search for that too. See:
25 | # https://lists.debian.org/debian-devel-announce/2012/07/msg00002.html
26 | # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614907
27 | elif command_exists nodejs; then
28 | exec nodejs "$basedir/yarn.js" "$@"
29 | ret=$?
30 | else
31 | echo >&2 'Yarn requires Node.js 4.0 or higher to be installed.'
32 | ret=1
33 | fi
34 |
35 | exit $ret
36 |
--------------------------------------------------------------------------------
/system/usr/share/yarn/bin/yarn.js:
--------------------------------------------------------------------------------
1 | #!/system/bin/env node
2 |
3 | /* eslint-disable no-var */
4 | /* eslint-disable flowtype/require-valid-file-annotation */
5 | "use strict";
6 |
7 | var ver = process.versions.node;
8 | var majorVer = parseInt(ver.split(".")[0], 10);
9 |
10 | if (majorVer < 4) {
11 | console.error("Node version " + ver + " is not supported, please use Node.js 4.0 or higher.");
12 | process.exit(1); // eslint-disable-line no-process-exit
13 | } else {
14 | try {
15 | require(__dirname + "/../lib/v8-compile-cache.js");
16 | } catch (err) {
17 | // We don't have/need this on legacy builds and dev builds
18 | }
19 |
20 | // Just requiring this package will trigger a yarn run since the
21 | // `require.main === module` check inside `cli/index.js` will always
22 | // be truthy when built with webpack :(
23 | // `lib/cli` may be `lib/cli/index.js` or `lib/cli.js` depending on the build.
24 | var cli = require(__dirname + "/../lib/cli");
25 | if (!cli.autoRun) {
26 | cli.default().catch(function (error) {
27 | console.error(error.stack || error.message || error);
28 | process.exitCode = 1;
29 | });
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/system/usr/share/yarn/bin/yarng:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 | argv0=$(echo "$0" | sed -e 's,\\,/,g')
3 | basedir=$(dirname "$(readlink "$0" || echo "$argv0")")
4 |
5 | case "$(uname -s)" in
6 | Darwin) basedir="$(cd "$(dirname "$argv0")" && pwd)" ;;
7 | Linux) basedir=$(dirname "$(readlink -f "$0" || echo "$argv0")") ;;
8 | *CYGWIN*) basedir=$(cygpath -w "$basedir") ;;
9 | *MSYS*) basedir=$(cygpath -w "$basedir") ;;
10 | esac
11 |
12 | command_exists() {
13 | command -v "$1" >/dev/null 2>&1
14 | }
15 |
16 | if command_exists node; then
17 | if [ "$YARN_FORCE_WINPTY" = 1 ] || command_exists winpty && test -t 1; then
18 | winpty node "$basedir/yarn.js" "global" "$@"
19 | else
20 | exec node "$basedir/yarn.js" "global" "$@"
21 | fi
22 | ret=$?
23 | # Debian and Ubuntu use "nodejs" as the name of the binary, not "node", so we
24 | # search for that too. See:
25 | # https://lists.debian.org/debian-devel-announce/2012/07/msg00002.html
26 | # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614907
27 | elif command_exists nodejs; then
28 | exec nodejs "$basedir/yarn.js" "global" "$@"
29 | ret=$?
30 | else
31 | echo >&2 'Yarn requires Node.js 4.0 or higher to be installed.'
32 | ret=1
33 | fi
34 |
35 | exit $ret
36 |
--------------------------------------------------------------------------------
/system/usr/share/yarn/bin/yarnpkg:
--------------------------------------------------------------------------------
1 | #!/system/bin/env node
2 | require("./yarn.js");
3 |
--------------------------------------------------------------------------------
/system/usr/share/yarn/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "yarn",
3 | "installationMethod": "tar",
4 | "version": "1.23.0-0",
5 | "license": "BSD-2-Clause",
6 | "preferGlobal": true,
7 | "description": "📦🐈 Fast, reliable, and secure dependency management.",
8 | "resolutions": {
9 | "sshpk": "^1.14.2"
10 | },
11 | "engines": {
12 | "node": ">=4.0.0"
13 | },
14 | "repository": "yarnpkg/yarn",
15 | "bin": {
16 | "yarn": "./bin/yarn.js",
17 | "yarnpkg": "./bin/yarn.js"
18 | },
19 | "config": {
20 | "commitizen": {
21 | "path": "./node_modules/cz-conventional-changelog"
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/system/vendor/bin/node:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 | exec /system/usr/share/node/bin/node "$@"
--------------------------------------------------------------------------------