nativescript 8.5.1-dev.0 → 8.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/config/config.json +5 -0
  2. package/lib/.d.ts +37 -2
  3. package/lib/base-package-manager.js +1 -3
  4. package/lib/bootstrap.js +12 -1
  5. package/lib/commands/build.js +6 -2
  6. package/lib/commands/clean.js +1 -2
  7. package/lib/commands/config.js +5 -6
  8. package/lib/commands/create-project.js +11 -12
  9. package/lib/commands/debug.js +11 -10
  10. package/lib/commands/plugin/list-plugins.js +2 -3
  11. package/lib/commands/post-install.js +5 -3
  12. package/lib/commands/preview.js +3 -4
  13. package/lib/commands/run.js +19 -17
  14. package/lib/commands/test-init.js +15 -14
  15. package/lib/commands/test.js +3 -0
  16. package/lib/commands/update.js +1 -1
  17. package/lib/common/bootstrap.js +1 -0
  18. package/lib/common/child-process.js +3 -3
  19. package/lib/common/codeGeneration/code-printer.js +1 -1
  20. package/lib/common/commands/device/device-log-stream.js +1 -1
  21. package/lib/common/commands/device/list-devices.js +8 -7
  22. package/lib/common/commands/generate-messages.js +1 -1
  23. package/lib/common/constants.js +11 -11
  24. package/lib/common/declarations.d.ts +53 -1
  25. package/lib/common/definitions/byline.d.ts +4 -0
  26. package/lib/common/definitions/colors.d.ts +24 -0
  27. package/lib/common/definitions/commands-service.d.ts +1 -0
  28. package/lib/common/definitions/commands.d.ts +1 -0
  29. package/lib/common/definitions/google-analytics.d.ts +5 -0
  30. package/lib/common/definitions/marked.d.ts +125 -0
  31. package/lib/common/definitions/open.d.ts +5 -0
  32. package/lib/common/definitions/osenv.d.ts +4 -0
  33. package/lib/common/definitions/plist.d.ts +7 -0
  34. package/lib/common/definitions/rimraf.d.ts +9 -0
  35. package/lib/common/definitions/shelljs.d.ts +583 -0
  36. package/lib/common/definitions/simple-plist.d.ts +7 -0
  37. package/lib/common/definitions/xmlhttprequest.d.ts +29 -0
  38. package/lib/common/dispatchers.js +5 -0
  39. package/lib/common/file-system.js +22 -18
  40. package/lib/common/host-info.js +4 -4
  41. package/lib/common/http-client.js +2 -2
  42. package/lib/common/logger/layouts/cli-layout.js +2 -6
  43. package/lib/common/logger/logger.js +7 -7
  44. package/lib/common/mobile/android/android-debug-bridge-result-handler.js +1 -1
  45. package/lib/common/mobile/android/android-log-filter.js +5 -5
  46. package/lib/common/mobile/android/android-virtual-device-service.js +2 -2
  47. package/lib/common/mobile/android/genymotion/genymotion-service.js +2 -2
  48. package/lib/common/mobile/android/logcat-helper.js +1 -1
  49. package/lib/common/mobile/device-log-provider.js +8 -8
  50. package/lib/common/mobile/ios/device/ios-device-file-system.js +1 -1
  51. package/lib/common/mobile/ios/simulator/ios-emulator-services.js +1 -1
  52. package/lib/common/mobile/ios/simulator/ios-sim-resolver.js +1 -1
  53. package/lib/common/mobile/mobile-helper.js +1 -1
  54. package/lib/common/mobile/wp8/wp8-emulator-services.js +4 -4
  55. package/lib/common/opener.js +1 -5
  56. package/lib/common/plist-parser.js +3 -3
  57. package/lib/common/project-helper.js +2 -2
  58. package/lib/common/services/analytics/google-analytics-custom-dimensions.d.ts +7 -7
  59. package/lib/common/services/auto-completion-service.js +2 -2
  60. package/lib/common/services/commands-service.js +114 -5
  61. package/lib/common/services/help-service.js +16 -16
  62. package/lib/common/services/hooks-service.js +2 -3
  63. package/lib/common/services/json-file-settings-service.js +3 -3
  64. package/lib/common/services/lock-service.js +5 -5
  65. package/lib/common/services/messages-service.js +6 -6
  66. package/lib/common/services/net-service.js +1 -1
  67. package/lib/common/services/project-files-manager.js +2 -2
  68. package/lib/common/services/settings-service.js +2 -2
  69. package/lib/common/test/definitions/mocha.d.ts +86 -0
  70. package/lib/common/validators/project-name-validator.js +1 -1
  71. package/lib/common/validators/validation-result.js +1 -1
  72. package/lib/common/verify-node-version.js +2 -2
  73. package/lib/config.js +8 -3
  74. package/lib/constants.js +32 -18
  75. package/lib/controllers/build-controller.js +5 -5
  76. package/lib/controllers/company-insights-controller.js +78 -0
  77. package/lib/controllers/debug-controller.js +2 -2
  78. package/lib/controllers/migrate-controller.js +20 -21
  79. package/lib/controllers/preview-app-controller.js +251 -0
  80. package/lib/controllers/update-controller.js +4 -5
  81. package/lib/declarations.d.ts +24 -0
  82. package/lib/definitions/build.d.ts +1 -1
  83. package/lib/definitions/company-insights-controller.d.ts +59 -0
  84. package/lib/definitions/email-validator.d.ts +8 -0
  85. package/lib/definitions/libnpmconfig.d.ts +3 -0
  86. package/lib/definitions/livesync.d.ts +10 -0
  87. package/lib/definitions/npm.d.ts +12 -0
  88. package/lib/definitions/preview-app-livesync.d.ts +116 -0
  89. package/lib/definitions/project.d.ts +6 -0
  90. package/lib/definitions/xcode.d.ts +1 -1
  91. package/lib/device-sockets/ios/app-debug-socket-proxy-factory.js +4 -15
  92. package/lib/device-sockets/ios/notification.js +1 -1
  93. package/lib/helpers/android-bundle-validator-helper.js +1 -1
  94. package/lib/helpers/network-connectivity-validator.js +1 -1
  95. package/lib/helpers/options-track-helper.js +1 -1
  96. package/lib/nativescript-cli.js +10 -8
  97. package/lib/options.js +21 -61
  98. package/lib/package-installation-manager.js +4 -5
  99. package/lib/project-data.js +10 -9
  100. package/lib/providers/project-files-provider.js +3 -3
  101. package/lib/services/analytics/analytics-broker-process.js +3 -0
  102. package/lib/services/analytics/analytics-broker.js +5 -5
  103. package/lib/services/analytics/analytics-service.js +4 -0
  104. package/lib/services/analytics/analytics.d.ts +8 -1
  105. package/lib/services/analytics/google-analytics-provider.js +21 -1
  106. package/lib/services/analytics-settings-service.js +11 -3
  107. package/lib/services/android-device-debug-service.js +3 -3
  108. package/lib/services/android-plugin-build-service.js +36 -3
  109. package/lib/services/android-resources-migration-service.js +1 -1
  110. package/lib/services/assets-generation/assets-generation-service.js +5 -5
  111. package/lib/services/{build-artifacts-service.js → build-artefacts-service.js} +4 -4
  112. package/lib/services/cocoapods-service.js +1 -1
  113. package/lib/services/device/device-install-app-service.js +3 -3
  114. package/lib/services/doctor-service.js +9 -10
  115. package/lib/services/extensibility-service.js +8 -8
  116. package/lib/services/ios-entitlements-service.js +1 -1
  117. package/lib/services/ios-project-service.js +5 -5
  118. package/lib/services/ios-provision-service.js +7 -7
  119. package/lib/services/ios-watch-app-service.js +1 -1
  120. package/lib/services/ip-service.js +4 -2
  121. package/lib/services/itmstransporter-service.js +2 -2
  122. package/lib/services/livesync/android-device-livesync-sockets-service.js +1 -1
  123. package/lib/services/livesync/android-livesync-tool.js +5 -5
  124. package/lib/services/livesync/ios-device-livesync-service.js +2 -2
  125. package/lib/services/livesync/platform-livesync-service-base.js +1 -2
  126. package/lib/services/livesync/playground/devices/preview-devices-service.js +67 -0
  127. package/lib/services/livesync/playground/preview-app-constants.js +23 -0
  128. package/lib/services/livesync/playground/preview-app-files-service.js +83 -0
  129. package/lib/services/livesync/playground/preview-app-log-provider.js +14 -0
  130. package/lib/services/livesync/playground/preview-app-plugins-service.js +134 -0
  131. package/lib/services/livesync/playground/preview-qr-code-service.js +109 -0
  132. package/lib/services/livesync/playground/preview-schema-service.js +57 -0
  133. package/lib/services/livesync/playground/preview-sdk-service.js +112 -0
  134. package/lib/services/log-parser-service.js +5 -1
  135. package/lib/services/log-source-map-service.js +7 -10
  136. package/lib/services/npm-config-service.js +9 -23
  137. package/lib/services/performance-service.js +3 -3
  138. package/lib/services/platform-environment-requirements.js +1 -1
  139. package/lib/services/playground-service.js +65 -0
  140. package/lib/services/plugins-service.js +19 -19
  141. package/lib/services/project-backup-service.js +3 -4
  142. package/lib/services/project-cleanup-service.js +2 -3
  143. package/lib/services/test-execution-service.js +2 -2
  144. package/lib/services/timeline-profiler-service.js +1 -4
  145. package/lib/services/user-settings-service.js +4 -4
  146. package/lib/tools/config-manipulation/config-transformer.js +3 -3
  147. package/lib/tools/node-modules/node-modules-builder.js +1 -1
  148. package/lib/xml-validator.js +47 -0
  149. package/package.json +90 -88
  150. package/vendor/gradle-plugin/build.gradle +28 -176
  151. package/vendor/gradle-plugin/gradle.properties +16 -1
  152. package/lib/color.js +0 -5
  153. package/node_modules/@npmcli/move-file/LICENSE.md +0 -22
  154. package/node_modules/@npmcli/move-file/README.md +0 -69
  155. package/node_modules/@npmcli/move-file/lib/index.js +0 -185
  156. package/node_modules/@npmcli/move-file/node_modules/mkdirp/CHANGELOG.md +0 -15
  157. package/node_modules/@npmcli/move-file/node_modules/mkdirp/LICENSE +0 -21
  158. package/node_modules/@npmcli/move-file/node_modules/mkdirp/bin/cmd.js +0 -68
  159. package/node_modules/@npmcli/move-file/node_modules/mkdirp/index.js +0 -31
  160. package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/find-made.js +0 -29
  161. package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/mkdirp-manual.js +0 -64
  162. package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/mkdirp-native.js +0 -39
  163. package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/opts-arg.js +0 -23
  164. package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/path-arg.js +0 -29
  165. package/node_modules/@npmcli/move-file/node_modules/mkdirp/lib/use-native.js +0 -10
  166. package/node_modules/@npmcli/move-file/node_modules/mkdirp/package.json +0 -44
  167. package/node_modules/@npmcli/move-file/node_modules/mkdirp/readme.markdown +0 -266
  168. package/node_modules/@npmcli/move-file/package.json +0 -47
  169. package/node_modules/balanced-match/.npmignore +0 -5
  170. package/node_modules/balanced-match/LICENSE.md +0 -21
  171. package/node_modules/balanced-match/README.md +0 -91
  172. package/node_modules/balanced-match/index.js +0 -59
  173. package/node_modules/balanced-match/package.json +0 -49
  174. package/node_modules/brace-expansion/LICENSE +0 -21
  175. package/node_modules/brace-expansion/README.md +0 -129
  176. package/node_modules/brace-expansion/index.js +0 -201
  177. package/node_modules/brace-expansion/package.json +0 -47
  178. package/node_modules/concat-map/.travis.yml +0 -4
  179. package/node_modules/concat-map/LICENSE +0 -18
  180. package/node_modules/concat-map/README.markdown +0 -62
  181. package/node_modules/concat-map/example/map.js +0 -6
  182. package/node_modules/concat-map/index.js +0 -13
  183. package/node_modules/concat-map/package.json +0 -43
  184. package/node_modules/concat-map/test/map.js +0 -39
  185. package/node_modules/fs.realpath/LICENSE +0 -43
  186. package/node_modules/fs.realpath/README.md +0 -33
  187. package/node_modules/fs.realpath/index.js +0 -66
  188. package/node_modules/fs.realpath/old.js +0 -303
  189. package/node_modules/fs.realpath/package.json +0 -26
  190. package/node_modules/inflight/LICENSE +0 -15
  191. package/node_modules/inflight/README.md +0 -37
  192. package/node_modules/inflight/inflight.js +0 -54
  193. package/node_modules/inflight/package.json +0 -29
  194. package/node_modules/inherits/LICENSE +0 -16
  195. package/node_modules/inherits/README.md +0 -42
  196. package/node_modules/inherits/inherits.js +0 -9
  197. package/node_modules/inherits/inherits_browser.js +0 -27
  198. package/node_modules/inherits/package.json +0 -29
  199. package/node_modules/once/LICENSE +0 -15
  200. package/node_modules/once/README.md +0 -79
  201. package/node_modules/once/once.js +0 -42
  202. package/node_modules/once/package.json +0 -33
  203. package/node_modules/path-is-absolute/index.js +0 -20
  204. package/node_modules/path-is-absolute/license +0 -21
  205. package/node_modules/path-is-absolute/package.json +0 -43
  206. package/node_modules/path-is-absolute/readme.md +0 -59
  207. package/node_modules/rimraf/CHANGELOG.md +0 -65
  208. package/node_modules/rimraf/LICENSE +0 -15
  209. package/node_modules/rimraf/README.md +0 -101
  210. package/node_modules/rimraf/bin.js +0 -68
  211. package/node_modules/rimraf/node_modules/glob/LICENSE +0 -21
  212. package/node_modules/rimraf/node_modules/glob/README.md +0 -378
  213. package/node_modules/rimraf/node_modules/glob/common.js +0 -238
  214. package/node_modules/rimraf/node_modules/glob/glob.js +0 -790
  215. package/node_modules/rimraf/node_modules/glob/package.json +0 -55
  216. package/node_modules/rimraf/node_modules/glob/sync.js +0 -486
  217. package/node_modules/rimraf/node_modules/minimatch/LICENSE +0 -15
  218. package/node_modules/rimraf/node_modules/minimatch/README.md +0 -230
  219. package/node_modules/rimraf/node_modules/minimatch/minimatch.js +0 -947
  220. package/node_modules/rimraf/node_modules/minimatch/package.json +0 -33
  221. package/node_modules/rimraf/package.json +0 -32
  222. package/node_modules/rimraf/rimraf.js +0 -360
  223. package/node_modules/stringify-package/CHANGELOG.md +0 -16
  224. package/node_modules/stringify-package/LICENSE +0 -13
  225. package/node_modules/stringify-package/README.md +0 -55
  226. package/node_modules/stringify-package/index.js +0 -18
  227. package/node_modules/stringify-package/package.json +0 -38
  228. package/node_modules/wrappy/LICENSE +0 -15
  229. package/node_modules/wrappy/README.md +0 -36
  230. package/node_modules/wrappy/package.json +0 -29
  231. package/node_modules/wrappy/wrappy.js +0 -33
@@ -1,29 +0,0 @@
1
- {
2
- "name": "inflight",
3
- "version": "1.0.6",
4
- "description": "Add callbacks to requests in flight to avoid async duplication",
5
- "main": "inflight.js",
6
- "files": [
7
- "inflight.js"
8
- ],
9
- "dependencies": {
10
- "once": "^1.3.0",
11
- "wrappy": "1"
12
- },
13
- "devDependencies": {
14
- "tap": "^7.1.2"
15
- },
16
- "scripts": {
17
- "test": "tap test.js --100"
18
- },
19
- "repository": {
20
- "type": "git",
21
- "url": "https://github.com/npm/inflight.git"
22
- },
23
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
24
- "bugs": {
25
- "url": "https://github.com/isaacs/inflight/issues"
26
- },
27
- "homepage": "https://github.com/isaacs/inflight",
28
- "license": "ISC"
29
- }
@@ -1,16 +0,0 @@
1
- The ISC License
2
-
3
- Copyright (c) Isaac Z. Schlueter
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted, provided that the above
7
- copyright notice and this permission notice appear in all copies.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
11
- FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
- PERFORMANCE OF THIS SOFTWARE.
16
-
@@ -1,42 +0,0 @@
1
- Browser-friendly inheritance fully compatible with standard node.js
2
- [inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
3
-
4
- This package exports standard `inherits` from node.js `util` module in
5
- node environment, but also provides alternative browser-friendly
6
- implementation through [browser
7
- field](https://gist.github.com/shtylman/4339901). Alternative
8
- implementation is a literal copy of standard one located in standalone
9
- module to avoid requiring of `util`. It also has a shim for old
10
- browsers with no `Object.create` support.
11
-
12
- While keeping you sure you are using standard `inherits`
13
- implementation in node.js environment, it allows bundlers such as
14
- [browserify](https://github.com/substack/node-browserify) to not
15
- include full `util` package to your client code if all you need is
16
- just `inherits` function. It worth, because browser shim for `util`
17
- package is large and `inherits` is often the single function you need
18
- from it.
19
-
20
- It's recommended to use this package instead of
21
- `require('util').inherits` for any code that has chances to be used
22
- not only in node.js but in browser too.
23
-
24
- ## usage
25
-
26
- ```js
27
- var inherits = require('inherits');
28
- // then use exactly as the standard one
29
- ```
30
-
31
- ## note on version ~1.0
32
-
33
- Version ~1.0 had completely different motivation and is not compatible
34
- neither with 2.0 nor with standard node.js `inherits`.
35
-
36
- If you are using version ~1.0 and planning to switch to ~2.0, be
37
- careful:
38
-
39
- * new version uses `super_` instead of `super` for referencing
40
- superclass
41
- * new version overwrites current prototype while old one preserves any
42
- existing fields on it
@@ -1,9 +0,0 @@
1
- try {
2
- var util = require('util');
3
- /* istanbul ignore next */
4
- if (typeof util.inherits !== 'function') throw '';
5
- module.exports = util.inherits;
6
- } catch (e) {
7
- /* istanbul ignore next */
8
- module.exports = require('./inherits_browser.js');
9
- }
@@ -1,27 +0,0 @@
1
- if (typeof Object.create === 'function') {
2
- // implementation from standard node.js 'util' module
3
- module.exports = function inherits(ctor, superCtor) {
4
- if (superCtor) {
5
- ctor.super_ = superCtor
6
- ctor.prototype = Object.create(superCtor.prototype, {
7
- constructor: {
8
- value: ctor,
9
- enumerable: false,
10
- writable: true,
11
- configurable: true
12
- }
13
- })
14
- }
15
- };
16
- } else {
17
- // old school shim for old browsers
18
- module.exports = function inherits(ctor, superCtor) {
19
- if (superCtor) {
20
- ctor.super_ = superCtor
21
- var TempCtor = function () {}
22
- TempCtor.prototype = superCtor.prototype
23
- ctor.prototype = new TempCtor()
24
- ctor.prototype.constructor = ctor
25
- }
26
- }
27
- }
@@ -1,29 +0,0 @@
1
- {
2
- "name": "inherits",
3
- "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
4
- "version": "2.0.4",
5
- "keywords": [
6
- "inheritance",
7
- "class",
8
- "klass",
9
- "oop",
10
- "object-oriented",
11
- "inherits",
12
- "browser",
13
- "browserify"
14
- ],
15
- "main": "./inherits.js",
16
- "browser": "./inherits_browser.js",
17
- "repository": "git://github.com/isaacs/inherits",
18
- "license": "ISC",
19
- "scripts": {
20
- "test": "tap"
21
- },
22
- "devDependencies": {
23
- "tap": "^14.2.4"
24
- },
25
- "files": [
26
- "inherits.js",
27
- "inherits_browser.js"
28
- ]
29
- }
@@ -1,15 +0,0 @@
1
- The ISC License
2
-
3
- Copyright (c) Isaac Z. Schlueter and Contributors
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted, provided that the above
7
- copyright notice and this permission notice appear in all copies.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -1,79 +0,0 @@
1
- # once
2
-
3
- Only call a function once.
4
-
5
- ## usage
6
-
7
- ```javascript
8
- var once = require('once')
9
-
10
- function load (file, cb) {
11
- cb = once(cb)
12
- loader.load('file')
13
- loader.once('load', cb)
14
- loader.once('error', cb)
15
- }
16
- ```
17
-
18
- Or add to the Function.prototype in a responsible way:
19
-
20
- ```javascript
21
- // only has to be done once
22
- require('once').proto()
23
-
24
- function load (file, cb) {
25
- cb = cb.once()
26
- loader.load('file')
27
- loader.once('load', cb)
28
- loader.once('error', cb)
29
- }
30
- ```
31
-
32
- Ironically, the prototype feature makes this module twice as
33
- complicated as necessary.
34
-
35
- To check whether you function has been called, use `fn.called`. Once the
36
- function is called for the first time the return value of the original
37
- function is saved in `fn.value` and subsequent calls will continue to
38
- return this value.
39
-
40
- ```javascript
41
- var once = require('once')
42
-
43
- function load (cb) {
44
- cb = once(cb)
45
- var stream = createStream()
46
- stream.once('data', cb)
47
- stream.once('end', function () {
48
- if (!cb.called) cb(new Error('not found'))
49
- })
50
- }
51
- ```
52
-
53
- ## `once.strict(func)`
54
-
55
- Throw an error if the function is called twice.
56
-
57
- Some functions are expected to be called only once. Using `once` for them would
58
- potentially hide logical errors.
59
-
60
- In the example below, the `greet` function has to call the callback only once:
61
-
62
- ```javascript
63
- function greet (name, cb) {
64
- // return is missing from the if statement
65
- // when no name is passed, the callback is called twice
66
- if (!name) cb('Hello anonymous')
67
- cb('Hello ' + name)
68
- }
69
-
70
- function log (msg) {
71
- console.log(msg)
72
- }
73
-
74
- // this will print 'Hello anonymous' but the logical error will be missed
75
- greet(null, once(msg))
76
-
77
- // once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time
78
- greet(null, once.strict(msg))
79
- ```
@@ -1,42 +0,0 @@
1
- var wrappy = require('wrappy')
2
- module.exports = wrappy(once)
3
- module.exports.strict = wrappy(onceStrict)
4
-
5
- once.proto = once(function () {
6
- Object.defineProperty(Function.prototype, 'once', {
7
- value: function () {
8
- return once(this)
9
- },
10
- configurable: true
11
- })
12
-
13
- Object.defineProperty(Function.prototype, 'onceStrict', {
14
- value: function () {
15
- return onceStrict(this)
16
- },
17
- configurable: true
18
- })
19
- })
20
-
21
- function once (fn) {
22
- var f = function () {
23
- if (f.called) return f.value
24
- f.called = true
25
- return f.value = fn.apply(this, arguments)
26
- }
27
- f.called = false
28
- return f
29
- }
30
-
31
- function onceStrict (fn) {
32
- var f = function () {
33
- if (f.called)
34
- throw new Error(f.onceError)
35
- f.called = true
36
- return f.value = fn.apply(this, arguments)
37
- }
38
- var name = fn.name || 'Function wrapped with `once`'
39
- f.onceError = name + " shouldn't be called more than once"
40
- f.called = false
41
- return f
42
- }
@@ -1,33 +0,0 @@
1
- {
2
- "name": "once",
3
- "version": "1.4.0",
4
- "description": "Run a function exactly one time",
5
- "main": "once.js",
6
- "directories": {
7
- "test": "test"
8
- },
9
- "dependencies": {
10
- "wrappy": "1"
11
- },
12
- "devDependencies": {
13
- "tap": "^7.0.1"
14
- },
15
- "scripts": {
16
- "test": "tap test/*.js"
17
- },
18
- "files": [
19
- "once.js"
20
- ],
21
- "repository": {
22
- "type": "git",
23
- "url": "git://github.com/isaacs/once"
24
- },
25
- "keywords": [
26
- "once",
27
- "function",
28
- "one",
29
- "single"
30
- ],
31
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
32
- "license": "ISC"
33
- }
@@ -1,20 +0,0 @@
1
- 'use strict';
2
-
3
- function posix(path) {
4
- return path.charAt(0) === '/';
5
- }
6
-
7
- function win32(path) {
8
- // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
9
- var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
10
- var result = splitDeviceRe.exec(path);
11
- var device = result[1] || '';
12
- var isUnc = Boolean(device && device.charAt(1) !== ':');
13
-
14
- // UNC paths are always absolute
15
- return Boolean(result[2] || isUnc);
16
- }
17
-
18
- module.exports = process.platform === 'win32' ? win32 : posix;
19
- module.exports.posix = posix;
20
- module.exports.win32 = win32;
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
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
13
- all 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
21
- THE SOFTWARE.
@@ -1,43 +0,0 @@
1
- {
2
- "name": "path-is-absolute",
3
- "version": "1.0.1",
4
- "description": "Node.js 0.12 path.isAbsolute() ponyfill",
5
- "license": "MIT",
6
- "repository": "sindresorhus/path-is-absolute",
7
- "author": {
8
- "name": "Sindre Sorhus",
9
- "email": "sindresorhus@gmail.com",
10
- "url": "sindresorhus.com"
11
- },
12
- "engines": {
13
- "node": ">=0.10.0"
14
- },
15
- "scripts": {
16
- "test": "xo && node test.js"
17
- },
18
- "files": [
19
- "index.js"
20
- ],
21
- "keywords": [
22
- "path",
23
- "paths",
24
- "file",
25
- "dir",
26
- "absolute",
27
- "isabsolute",
28
- "is-absolute",
29
- "built-in",
30
- "util",
31
- "utils",
32
- "core",
33
- "ponyfill",
34
- "polyfill",
35
- "shim",
36
- "is",
37
- "detect",
38
- "check"
39
- ],
40
- "devDependencies": {
41
- "xo": "^0.16.0"
42
- }
43
- }
@@ -1,59 +0,0 @@
1
- # path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute)
2
-
3
- > Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com)
4
-
5
-
6
- ## Install
7
-
8
- ```
9
- $ npm install --save path-is-absolute
10
- ```
11
-
12
-
13
- ## Usage
14
-
15
- ```js
16
- const pathIsAbsolute = require('path-is-absolute');
17
-
18
- // Running on Linux
19
- pathIsAbsolute('/home/foo');
20
- //=> true
21
- pathIsAbsolute('C:/Users/foo');
22
- //=> false
23
-
24
- // Running on Windows
25
- pathIsAbsolute('C:/Users/foo');
26
- //=> true
27
- pathIsAbsolute('/home/foo');
28
- //=> false
29
-
30
- // Running on any OS
31
- pathIsAbsolute.posix('/home/foo');
32
- //=> true
33
- pathIsAbsolute.posix('C:/Users/foo');
34
- //=> false
35
- pathIsAbsolute.win32('C:/Users/foo');
36
- //=> true
37
- pathIsAbsolute.win32('/home/foo');
38
- //=> false
39
- ```
40
-
41
-
42
- ## API
43
-
44
- See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path).
45
-
46
- ### pathIsAbsolute(path)
47
-
48
- ### pathIsAbsolute.posix(path)
49
-
50
- POSIX specific version.
51
-
52
- ### pathIsAbsolute.win32(path)
53
-
54
- Windows specific version.
55
-
56
-
57
- ## License
58
-
59
- MIT © [Sindre Sorhus](https://sindresorhus.com)
@@ -1,65 +0,0 @@
1
- # v3.0
2
-
3
- - Add `--preserve-root` option to executable (default true)
4
- - Drop support for Node.js below version 6
5
-
6
- # v2.7
7
-
8
- - Make `glob` an optional dependency
9
-
10
- # 2.6
11
-
12
- - Retry on EBUSY on non-windows platforms as well
13
- - Make `rimraf.sync` 10000% more reliable on Windows
14
-
15
- # 2.5
16
-
17
- - Handle Windows EPERM when lstat-ing read-only dirs
18
- - Add glob option to pass options to glob
19
-
20
- # 2.4
21
-
22
- - Add EPERM to delay/retry loop
23
- - Add `disableGlob` option
24
-
25
- # 2.3
26
-
27
- - Make maxBusyTries and emfileWait configurable
28
- - Handle weird SunOS unlink-dir issue
29
- - Glob the CLI arg for better Windows support
30
-
31
- # 2.2
32
-
33
- - Handle ENOENT properly on Windows
34
- - Allow overriding fs methods
35
- - Treat EPERM as indicative of non-empty dir
36
- - Remove optional graceful-fs dep
37
- - Consistently return null error instead of undefined on success
38
- - win32: Treat ENOTEMPTY the same as EBUSY
39
- - Add `rimraf` binary
40
-
41
- # 2.1
42
-
43
- - Fix SunOS error code for a non-empty directory
44
- - Try rmdir before readdir
45
- - Treat EISDIR like EPERM
46
- - Remove chmod
47
- - Remove lstat polyfill, node 0.7 is not supported
48
-
49
- # 2.0
50
-
51
- - Fix myGid call to check process.getgid
52
- - Simplify the EBUSY backoff logic.
53
- - Use fs.lstat in node >= 0.7.9
54
- - Remove gently option
55
- - remove fiber implementation
56
- - Delete files that are marked read-only
57
-
58
- # 1.0
59
-
60
- - Allow ENOENT in sync method
61
- - Throw when no callback is provided
62
- - Make opts.gently an absolute path
63
- - use 'stat' if 'lstat' is not available
64
- - Consistent error naming, and rethrow non-ENOENT stat errors
65
- - add fiber implementation
@@ -1,15 +0,0 @@
1
- The ISC License
2
-
3
- Copyright (c) Isaac Z. Schlueter and Contributors
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted, provided that the above
7
- copyright notice and this permission notice appear in all copies.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -1,101 +0,0 @@
1
- [![Build Status](https://travis-ci.org/isaacs/rimraf.svg?branch=master)](https://travis-ci.org/isaacs/rimraf) [![Dependency Status](https://david-dm.org/isaacs/rimraf.svg)](https://david-dm.org/isaacs/rimraf) [![devDependency Status](https://david-dm.org/isaacs/rimraf/dev-status.svg)](https://david-dm.org/isaacs/rimraf#info=devDependencies)
2
-
3
- The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node.
4
-
5
- Install with `npm install rimraf`, or just drop rimraf.js somewhere.
6
-
7
- ## API
8
-
9
- `rimraf(f, [opts], callback)`
10
-
11
- The first parameter will be interpreted as a globbing pattern for files. If you
12
- want to disable globbing you can do so with `opts.disableGlob` (defaults to
13
- `false`). This might be handy, for instance, if you have filenames that contain
14
- globbing wildcard characters.
15
-
16
- The callback will be called with an error if there is one. Certain
17
- errors are handled for you:
18
-
19
- * Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of
20
- `opts.maxBusyTries` times before giving up, adding 100ms of wait
21
- between each attempt. The default `maxBusyTries` is 3.
22
- * `ENOENT` - If the file doesn't exist, rimraf will return
23
- successfully, since your desired outcome is already the case.
24
- * `EMFILE` - Since `readdir` requires opening a file descriptor, it's
25
- possible to hit `EMFILE` if too many file descriptors are in use.
26
- In the sync case, there's nothing to be done for this. But in the
27
- async case, rimraf will gradually back off with timeouts up to
28
- `opts.emfileWait` ms, which defaults to 1000.
29
-
30
- ## options
31
-
32
- * unlink, chmod, stat, lstat, rmdir, readdir,
33
- unlinkSync, chmodSync, statSync, lstatSync, rmdirSync, readdirSync
34
-
35
- In order to use a custom file system library, you can override
36
- specific fs functions on the options object.
37
-
38
- If any of these functions are present on the options object, then
39
- the supplied function will be used instead of the default fs
40
- method.
41
-
42
- Sync methods are only relevant for `rimraf.sync()`, of course.
43
-
44
- For example:
45
-
46
- ```javascript
47
- var myCustomFS = require('some-custom-fs')
48
-
49
- rimraf('some-thing', myCustomFS, callback)
50
- ```
51
-
52
- * maxBusyTries
53
-
54
- If an `EBUSY`, `ENOTEMPTY`, or `EPERM` error code is encountered
55
- on Windows systems, then rimraf will retry with a linear backoff
56
- wait of 100ms longer on each try. The default maxBusyTries is 3.
57
-
58
- Only relevant for async usage.
59
-
60
- * emfileWait
61
-
62
- If an `EMFILE` error is encountered, then rimraf will retry
63
- repeatedly with a linear backoff of 1ms longer on each try, until
64
- the timeout counter hits this max. The default limit is 1000.
65
-
66
- If you repeatedly encounter `EMFILE` errors, then consider using
67
- [graceful-fs](http://npm.im/graceful-fs) in your program.
68
-
69
- Only relevant for async usage.
70
-
71
- * glob
72
-
73
- Set to `false` to disable [glob](http://npm.im/glob) pattern
74
- matching.
75
-
76
- Set to an object to pass options to the glob module. The default
77
- glob options are `{ nosort: true, silent: true }`.
78
-
79
- Glob version 6 is used in this module.
80
-
81
- Relevant for both sync and async usage.
82
-
83
- * disableGlob
84
-
85
- Set to any non-falsey value to disable globbing entirely.
86
- (Equivalent to setting `glob: false`.)
87
-
88
- ## rimraf.sync
89
-
90
- It can remove stuff synchronously, too. But that's not so good. Use
91
- the async API. It's better.
92
-
93
- ## CLI
94
-
95
- If installed with `npm install rimraf -g` it can be used as a global
96
- command `rimraf <path> [<path> ...]` which is useful for cross platform support.
97
-
98
- ## mkdirp
99
-
100
- If you need to create a directory recursively, check out
101
- [mkdirp](https://github.com/substack/node-mkdirp).