angular-slickgrid 4.2.0 → 4.2.3

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 (415) hide show
  1. package/LICENSE +20 -20
  2. package/{dist/app → app}/modules/angular-slickgrid/components/angular-slickgrid.component.d.ts +2 -2
  3. package/{dist/app → app}/modules/angular-slickgrid/constants.d.ts +0 -0
  4. package/{dist/app → app}/modules/angular-slickgrid/extensions/index.d.ts +0 -0
  5. package/{dist/app → app}/modules/angular-slickgrid/extensions/slickRowDetailView.d.ts +0 -2
  6. package/{dist/app → app}/modules/angular-slickgrid/global-grid-options.d.ts +0 -0
  7. package/{dist/app → app}/modules/angular-slickgrid/index.d.ts +0 -0
  8. package/{dist/app → app}/modules/angular-slickgrid/models/angularComponentOutput.interface.d.ts +0 -0
  9. package/{dist/app → app}/modules/angular-slickgrid/models/angularGridInstance.interface.d.ts +0 -0
  10. package/{dist/app → app}/modules/angular-slickgrid/models/externalTestingDependencies.interface.d.ts +0 -0
  11. package/{dist/app → app}/modules/angular-slickgrid/models/gridOption.interface.d.ts +0 -0
  12. package/{dist/app → app}/modules/angular-slickgrid/models/index.d.ts +0 -0
  13. package/{dist/app → app}/modules/angular-slickgrid/models/rowDetailView.interface.d.ts +0 -0
  14. package/{dist/app → app}/modules/angular-slickgrid/models/slickGrid.interface.d.ts +0 -0
  15. package/{dist/app → app}/modules/angular-slickgrid/modules/angular-slickgrid.module.d.ts +0 -0
  16. package/{dist/app → app}/modules/angular-slickgrid/services/angularUtil.service.d.ts +0 -0
  17. package/{dist/app → app}/modules/angular-slickgrid/services/bsDropdown.service.d.ts +0 -0
  18. package/{dist/app → app}/modules/angular-slickgrid/services/container.service.d.ts +1 -0
  19. package/{dist/app → app}/modules/angular-slickgrid/services/index.d.ts +0 -0
  20. package/{dist/app → app}/modules/angular-slickgrid/services/translater.service.d.ts +0 -0
  21. package/{dist/app → app}/modules/angular-slickgrid/services/utilities.d.ts +0 -0
  22. package/{dist/app → app}/modules/angular-slickgrid/slickgrid-config.d.ts +0 -0
  23. package/docs/assets/lib/multiple-select/README.md +17 -0
  24. package/{dist/esm2020 → esm2020}/angular-slickgrid.mjs +0 -0
  25. package/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +1170 -0
  26. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/constants.mjs +1 -1
  27. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/extensions/index.mjs +1 -1
  28. package/esm2020/app/modules/angular-slickgrid/extensions/slickRowDetailView.mjs +298 -0
  29. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/global-grid-options.mjs +1 -1
  30. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/index.mjs +1 -1
  31. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/models/angularComponentOutput.interface.mjs +1 -1
  32. package/esm2020/app/modules/angular-slickgrid/models/angularGridInstance.interface.mjs +2 -0
  33. package/esm2020/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.mjs +2 -0
  34. package/esm2020/app/modules/angular-slickgrid/models/gridOption.interface.mjs +2 -0
  35. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/models/index.mjs +1 -1
  36. package/esm2020/app/modules/angular-slickgrid/models/rowDetailView.interface.mjs +2 -0
  37. package/esm2020/app/modules/angular-slickgrid/models/slickGrid.interface.mjs +2 -0
  38. package/esm2020/app/modules/angular-slickgrid/modules/angular-slickgrid.module.mjs +43 -0
  39. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/angularUtil.service.mjs +4 -4
  40. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/bsDropdown.service.mjs +4 -4
  41. package/esm2020/app/modules/angular-slickgrid/services/container.service.mjs +29 -0
  42. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/index.mjs +1 -1
  43. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/translater.service.mjs +4 -4
  44. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/utilities.mjs +1 -1
  45. package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/slickgrid-config.mjs +1 -1
  46. package/{dist/esm2020 → esm2020}/public_api.mjs +1 -1
  47. package/{dist/fesm2015 → fesm2015}/angular-slickgrid.mjs +48 -51
  48. package/fesm2015/angular-slickgrid.mjs.map +1 -0
  49. package/{dist/fesm2020 → fesm2020}/angular-slickgrid.mjs +48 -51
  50. package/fesm2020/angular-slickgrid.mjs.map +1 -0
  51. package/{dist/i18n → i18n}/en.json +89 -89
  52. package/{dist/i18n → i18n}/fr.json +90 -90
  53. package/{dist/angular-slickgrid.d.ts → index.d.ts} +0 -0
  54. package/package.json +33 -118
  55. package/{dist/public_api.d.ts → public_api.d.ts} +0 -0
  56. package/test/cypress/node_modules/@cypress/request/README.md +1038 -0
  57. package/test/cypress/node_modules/@cypress/xvfb/README.md +48 -0
  58. package/test/cypress/node_modules/@cypress/xvfb/node_modules/debug/README.md +437 -0
  59. package/test/cypress/node_modules/@types/node/README.md +16 -0
  60. package/test/cypress/node_modules/@types/sinonjs__fake-timers/README.md +16 -0
  61. package/test/cypress/node_modules/@types/sizzle/README.md +16 -0
  62. package/test/cypress/node_modules/@types/yauzl/README.md +16 -0
  63. package/test/cypress/node_modules/@types/yauzl/node_modules/@types/node/README.md +16 -0
  64. package/test/cypress/node_modules/aggregate-error/README.md +61 -0
  65. package/test/cypress/node_modules/ansi-colors/README.md +315 -0
  66. package/test/cypress/node_modules/ansi-escapes/README.md +245 -0
  67. package/test/cypress/node_modules/ansi-regex/README.md +78 -0
  68. package/test/cypress/node_modules/ansi-styles/README.md +152 -0
  69. package/test/cypress/node_modules/arch/README.md +71 -0
  70. package/test/cypress/node_modules/asn1/README.md +50 -0
  71. package/test/cypress/node_modules/assert-plus/README.md +162 -0
  72. package/test/cypress/node_modules/astral-regex/README.md +46 -0
  73. package/test/cypress/node_modules/async/README.md +60 -0
  74. package/test/cypress/node_modules/asynckit/README.md +233 -0
  75. package/test/cypress/node_modules/at-least-node/README.md +25 -0
  76. package/test/cypress/node_modules/aws-sign2/README.md +4 -0
  77. package/test/cypress/node_modules/aws4/README.md +183 -0
  78. package/test/cypress/node_modules/balanced-match/README.md +91 -0
  79. package/test/cypress/node_modules/base64-js/README.md +34 -0
  80. package/test/cypress/node_modules/bcrypt-pbkdf/README.md +45 -0
  81. package/test/cypress/node_modules/blob-util/README.md +623 -0
  82. package/test/cypress/node_modules/bluebird/README.md +57 -0
  83. package/test/cypress/node_modules/brace-expansion/README.md +129 -0
  84. package/test/cypress/node_modules/buffer/README.md +410 -0
  85. package/test/cypress/node_modules/buffer-crc32/README.md +47 -0
  86. package/test/cypress/node_modules/cachedir/README.md +27 -0
  87. package/test/cypress/node_modules/caseless/README.md +45 -0
  88. package/test/cypress/node_modules/chalk/README.md +293 -0
  89. package/test/cypress/node_modules/chalk/node_modules/supports-color/README.md +76 -0
  90. package/test/cypress/node_modules/check-more-types/README.md +952 -0
  91. package/test/cypress/node_modules/ci-info/README.md +114 -0
  92. package/test/cypress/node_modules/clean-stack/README.md +76 -0
  93. package/test/cypress/node_modules/cli-cursor/README.md +55 -0
  94. package/test/cypress/node_modules/cli-table3/README.md +218 -0
  95. package/test/cypress/node_modules/cli-truncate/README.md +139 -0
  96. package/test/cypress/node_modules/color-convert/README.md +68 -0
  97. package/test/cypress/node_modules/color-name/README.md +11 -0
  98. package/test/cypress/node_modules/colorette/README.md +102 -0
  99. package/test/cypress/node_modules/colors/README.md +221 -0
  100. package/test/cypress/node_modules/combined-stream/README.md +138 -0
  101. package/test/cypress/node_modules/commander/README.md +737 -0
  102. package/test/cypress/node_modules/common-tags/README.md +687 -0
  103. package/test/cypress/node_modules/core-util-is/README.md +3 -0
  104. package/test/cypress/node_modules/cross-spawn/README.md +96 -0
  105. package/test/cypress/node_modules/cypress/README.md +25 -0
  106. package/test/cypress/node_modules/cypress/mount-utils/README.md +14 -0
  107. package/test/cypress/node_modules/cypress/react/README.md +414 -0
  108. package/test/cypress/node_modules/cypress/vue/README.md +678 -0
  109. package/test/cypress/node_modules/cypress/vue2/README.md +693 -0
  110. package/test/cypress/node_modules/dashdash/README.md +574 -0
  111. package/test/cypress/node_modules/dayjs/README.md +128 -0
  112. package/test/cypress/node_modules/debug/README.md +455 -0
  113. package/test/cypress/node_modules/delayed-stream/README.md +141 -0
  114. package/test/cypress/node_modules/ecc-jsbn/README.md +8 -0
  115. package/test/cypress/node_modules/emoji-regex/README.md +73 -0
  116. package/test/cypress/node_modules/end-of-stream/README.md +54 -0
  117. package/test/cypress/node_modules/enquirer/README.md +1752 -0
  118. package/test/cypress/node_modules/escape-string-regexp/README.md +27 -0
  119. package/test/cypress/node_modules/eventemitter2/README.md +809 -0
  120. package/test/cypress/node_modules/execa/README.md +656 -0
  121. package/test/cypress/node_modules/executable/README.md +64 -0
  122. package/test/cypress/node_modules/extend/README.md +81 -0
  123. package/test/cypress/node_modules/extract-zip/README.md +57 -0
  124. package/test/cypress/node_modules/extract-zip/node_modules/debug/README.md +455 -0
  125. package/test/cypress/node_modules/extsprintf/README.md +46 -0
  126. package/test/cypress/node_modules/fd-slicer/README.md +199 -0
  127. package/test/cypress/node_modules/figures/README.md +139 -0
  128. package/test/cypress/node_modules/forever-agent/README.md +4 -0
  129. package/test/cypress/node_modules/form-data/README.md +234 -0
  130. package/test/cypress/node_modules/fs-extra/README.md +264 -0
  131. package/test/cypress/node_modules/fs.realpath/README.md +33 -0
  132. package/test/cypress/node_modules/get-stream/README.md +124 -0
  133. package/test/cypress/node_modules/getos/README.md +79 -0
  134. package/test/cypress/node_modules/getpass/README.md +32 -0
  135. package/test/cypress/node_modules/glob/README.md +375 -0
  136. package/test/cypress/node_modules/global-dirs/README.md +72 -0
  137. package/test/cypress/node_modules/graceful-fs/README.md +133 -0
  138. package/test/cypress/node_modules/has-flag/README.md +89 -0
  139. package/test/cypress/node_modules/http-signature/README.md +80 -0
  140. package/test/cypress/node_modules/human-signals/README.md +155 -0
  141. package/test/cypress/node_modules/ieee754/README.md +51 -0
  142. package/test/cypress/node_modules/indent-string/README.md +70 -0
  143. package/test/cypress/node_modules/inflight/README.md +37 -0
  144. package/test/cypress/node_modules/inherits/README.md +42 -0
  145. package/test/cypress/node_modules/ini/README.md +102 -0
  146. package/test/cypress/node_modules/is-ci/README.md +50 -0
  147. package/test/cypress/node_modules/is-fullwidth-code-point/README.md +39 -0
  148. package/test/cypress/node_modules/is-installed-globally/README.md +31 -0
  149. package/test/cypress/node_modules/is-path-inside/README.md +63 -0
  150. package/test/cypress/node_modules/is-stream/README.md +57 -0
  151. package/test/cypress/node_modules/is-typedarray/README.md +16 -0
  152. package/test/cypress/node_modules/isexe/README.md +51 -0
  153. package/test/cypress/node_modules/isstream/README.md +66 -0
  154. package/test/cypress/node_modules/jsbn/README.md +175 -0
  155. package/test/cypress/node_modules/json-schema/README.md +3 -0
  156. package/test/cypress/node_modules/json-stringify-safe/README.md +52 -0
  157. package/test/cypress/node_modules/jsonfile/README.md +205 -0
  158. package/test/cypress/node_modules/jsonfile/node_modules/universalify/README.md +76 -0
  159. package/test/cypress/node_modules/jsprim/README.md +287 -0
  160. package/test/cypress/node_modules/lazy-ass/README.md +269 -0
  161. package/test/cypress/node_modules/listr2/README.md +17 -0
  162. package/test/cypress/node_modules/lodash/README.md +39 -0
  163. package/test/cypress/node_modules/lodash.once/README.md +18 -0
  164. package/test/cypress/node_modules/log-symbols/README.md +51 -0
  165. package/test/cypress/node_modules/log-update/README.md +97 -0
  166. package/test/cypress/node_modules/log-update/node_modules/slice-ansi/README.md +66 -0
  167. package/test/cypress/node_modules/log-update/node_modules/wrap-ansi/README.md +97 -0
  168. package/test/cypress/node_modules/lru-cache/README.md +166 -0
  169. package/test/cypress/node_modules/merge-stream/README.md +78 -0
  170. package/test/cypress/node_modules/mime-db/README.md +102 -0
  171. package/test/cypress/node_modules/mime-types/README.md +123 -0
  172. package/test/cypress/node_modules/mimic-fn/README.md +69 -0
  173. package/test/cypress/node_modules/minimatch/README.md +209 -0
  174. package/test/cypress/node_modules/ms/README.md +60 -0
  175. package/test/cypress/node_modules/npm-run-path/README.md +115 -0
  176. package/test/cypress/node_modules/once/README.md +79 -0
  177. package/test/cypress/node_modules/onetime/README.md +94 -0
  178. package/test/cypress/node_modules/ospath/README.md +53 -0
  179. package/test/cypress/node_modules/p-map/README.md +89 -0
  180. package/test/cypress/node_modules/path-is-absolute/README.md +59 -0
  181. package/test/cypress/node_modules/path-key/README.md +61 -0
  182. package/test/cypress/node_modules/pend/README.md +41 -0
  183. package/test/cypress/node_modules/performance-now/README.md +30 -0
  184. package/test/cypress/node_modules/pify/README.md +119 -0
  185. package/test/cypress/node_modules/pretty-bytes/README.md +131 -0
  186. package/test/cypress/node_modules/proxy-from-env/README.md +131 -0
  187. package/test/cypress/node_modules/psl/README.md +215 -0
  188. package/test/cypress/node_modules/pump/README.md +65 -0
  189. package/test/cypress/node_modules/punycode/README.md +122 -0
  190. package/test/cypress/node_modules/qs/README.md +475 -0
  191. package/test/cypress/node_modules/request-progress/README.md +78 -0
  192. package/test/cypress/node_modules/restore-cursor/README.md +26 -0
  193. package/test/cypress/node_modules/rimraf/README.md +101 -0
  194. package/test/cypress/node_modules/rxjs/README.md +147 -0
  195. package/test/cypress/node_modules/rxjs/_esm2015/README.md +147 -0
  196. package/test/cypress/node_modules/rxjs/_esm5/README.md +147 -0
  197. package/test/cypress/node_modules/rxjs/src/README.md +147 -0
  198. package/test/cypress/node_modules/safe-buffer/README.md +584 -0
  199. package/test/cypress/node_modules/safer-buffer/README.md +156 -0
  200. package/test/cypress/node_modules/semver/README.md +566 -0
  201. package/test/cypress/node_modules/shebang-command/README.md +34 -0
  202. package/test/cypress/node_modules/shebang-regex/README.md +33 -0
  203. package/test/cypress/node_modules/signal-exit/README.md +39 -0
  204. package/test/cypress/node_modules/slice-ansi/README.md +72 -0
  205. package/test/cypress/node_modules/sshpk/README.md +804 -0
  206. package/test/cypress/node_modules/string-width/README.md +50 -0
  207. package/test/cypress/node_modules/strip-ansi/README.md +46 -0
  208. package/test/cypress/node_modules/strip-final-newline/README.md +30 -0
  209. package/test/cypress/node_modules/supports-color/README.md +77 -0
  210. package/test/cypress/node_modules/throttleit/README.md +32 -0
  211. package/test/cypress/node_modules/tmp/README.md +365 -0
  212. package/test/cypress/node_modules/tough-cookie/README.md +527 -0
  213. package/test/cypress/node_modules/tslib/README.md +142 -0
  214. package/test/cypress/node_modules/tunnel-agent/README.md +4 -0
  215. package/test/cypress/node_modules/tweetnacl/README.md +459 -0
  216. package/test/cypress/node_modules/type-fest/README.md +760 -0
  217. package/test/cypress/node_modules/universalify/README.md +76 -0
  218. package/test/cypress/node_modules/untildify/README.md +30 -0
  219. package/test/cypress/node_modules/uuid/README.md +505 -0
  220. package/test/cypress/node_modules/verror/README.md +528 -0
  221. package/test/cypress/node_modules/verror/node_modules/extsprintf/README.md +46 -0
  222. package/test/cypress/node_modules/which/README.md +54 -0
  223. package/test/cypress/node_modules/wrap-ansi/README.md +91 -0
  224. package/test/cypress/node_modules/wrappy/README.md +36 -0
  225. package/test/cypress/node_modules/yallist/README.md +204 -0
  226. package/test/cypress/node_modules/yauzl/README.md +658 -0
  227. package/.browserslistrc +0 -12
  228. package/.codecov.yml +0 -17
  229. package/.editorconfig +0 -18
  230. package/.eslintrc.json +0 -50
  231. package/.github/CODE_OF_CONDUCT.md +0 -76
  232. package/.github/FUNDING.yml +0 -8
  233. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -54
  234. package/.github/ISSUE_TEMPLATE/config.yml +0 -5
  235. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -44
  236. package/.github/renovate.json5 +0 -26
  237. package/.github/stale.yml +0 -7
  238. package/.github/workflows/main.yml +0 -83
  239. package/.vscode/extensions.json +0 -9
  240. package/.vscode/launch.json +0 -72
  241. package/.vscode/settings.json +0 -7
  242. package/.vscode/tasks.json +0 -77
  243. package/CHANGELOG.md +0 -1172
  244. package/angular.json +0 -148
  245. package/dist/LICENSE +0 -20
  246. package/dist/README.md +0 -182
  247. package/dist/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +0 -1171
  248. package/dist/esm2020/app/modules/angular-slickgrid/extensions/slickRowDetailView.mjs +0 -300
  249. package/dist/esm2020/app/modules/angular-slickgrid/models/angularGridInstance.interface.mjs +0 -2
  250. package/dist/esm2020/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.mjs +0 -2
  251. package/dist/esm2020/app/modules/angular-slickgrid/models/gridOption.interface.mjs +0 -2
  252. package/dist/esm2020/app/modules/angular-slickgrid/models/rowDetailView.interface.mjs +0 -2
  253. package/dist/esm2020/app/modules/angular-slickgrid/models/slickGrid.interface.mjs +0 -2
  254. package/dist/esm2020/app/modules/angular-slickgrid/modules/angular-slickgrid.module.mjs +0 -46
  255. package/dist/esm2020/app/modules/angular-slickgrid/services/container.service.mjs +0 -26
  256. package/dist/fesm2015/angular-slickgrid.mjs.map +0 -1
  257. package/dist/fesm2020/angular-slickgrid.mjs.map +0 -1
  258. package/dist/package.json +0 -79
  259. package/global.d.ts +0 -1
  260. package/ngcc.config.js +0 -13
  261. package/screenshots/column-picker.png +0 -0
  262. package/screenshots/composite-editor.png +0 -0
  263. package/screenshots/draggable-grouping.png +0 -0
  264. package/screenshots/editors.png +0 -0
  265. package/screenshots/export-to-file.png +0 -0
  266. package/screenshots/filter_and_sort.png +0 -0
  267. package/screenshots/formatters.png +0 -0
  268. package/screenshots/frozen.png +0 -0
  269. package/screenshots/multipleSelectFilter.png +0 -0
  270. package/screenshots/pagination.png +0 -0
  271. package/screenshots/selectFilter.png +0 -0
  272. package/screenshots/singleFilter.png +0 -0
  273. package/src/app/app-routing.module.ts +0 -83
  274. package/src/app/app.component.html +0 -160
  275. package/src/app/app.component.scss +0 -65
  276. package/src/app/app.component.ts +0 -10
  277. package/src/app/app.module.ts +0 -175
  278. package/src/app/examples/custom-angularComponentEditor.ts +0 -184
  279. package/src/app/examples/custom-angularComponentFilter.ts +0 -126
  280. package/src/app/examples/custom-inputEditor.ts +0 -124
  281. package/src/app/examples/custom-inputFilter.ts +0 -142
  282. package/src/app/examples/custom-titleFormatter.component.ts +0 -8
  283. package/src/app/examples/editor-ng-select.component.ts +0 -37
  284. package/src/app/examples/filter-ng-select.component.ts +0 -32
  285. package/src/app/examples/grid-additem.component.html +0 -48
  286. package/src/app/examples/grid-additem.component.ts +0 -272
  287. package/src/app/examples/grid-angular.component.html +0 -79
  288. package/src/app/examples/grid-angular.component.scss +0 -28
  289. package/src/app/examples/grid-angular.component.ts +0 -370
  290. package/src/app/examples/grid-autoheight.component.html +0 -52
  291. package/src/app/examples/grid-autoheight.component.ts +0 -147
  292. package/src/app/examples/grid-basic.component.html +0 -29
  293. package/src/app/examples/grid-basic.component.ts +0 -82
  294. package/src/app/examples/grid-clientside.component.html +0 -51
  295. package/src/app/examples/grid-clientside.component.ts +0 -293
  296. package/src/app/examples/grid-colspan.component.html +0 -39
  297. package/src/app/examples/grid-colspan.component.scss +0 -11
  298. package/src/app/examples/grid-colspan.component.ts +0 -155
  299. package/src/app/examples/grid-composite-editor.component.html +0 -79
  300. package/src/app/examples/grid-composite-editor.component.scss +0 -19
  301. package/src/app/examples/grid-composite-editor.component.ts +0 -948
  302. package/src/app/examples/grid-contextmenu.component.html +0 -62
  303. package/src/app/examples/grid-contextmenu.component.scss +0 -44
  304. package/src/app/examples/grid-contextmenu.component.ts +0 -473
  305. package/src/app/examples/grid-custom-tooltip.component.html +0 -25
  306. package/src/app/examples/grid-custom-tooltip.component.scss +0 -77
  307. package/src/app/examples/grid-custom-tooltip.component.ts +0 -483
  308. package/src/app/examples/grid-draggrouping.component.html +0 -93
  309. package/src/app/examples/grid-draggrouping.component.ts +0 -397
  310. package/src/app/examples/grid-editor.component.html +0 -88
  311. package/src/app/examples/grid-editor.component.ts +0 -699
  312. package/src/app/examples/grid-formatter.component.html +0 -26
  313. package/src/app/examples/grid-formatter.component.ts +0 -162
  314. package/src/app/examples/grid-frozen.component.html +0 -65
  315. package/src/app/examples/grid-frozen.component.scss +0 -11
  316. package/src/app/examples/grid-frozen.component.ts +0 -303
  317. package/src/app/examples/grid-graphql-nopage.component.html +0 -33
  318. package/src/app/examples/grid-graphql-nopage.component.scss +0 -9
  319. package/src/app/examples/grid-graphql-nopage.component.ts +0 -242
  320. package/src/app/examples/grid-graphql.component.html +0 -87
  321. package/src/app/examples/grid-graphql.component.ts +0 -304
  322. package/src/app/examples/grid-grouping.component.html +0 -80
  323. package/src/app/examples/grid-grouping.component.ts +0 -313
  324. package/src/app/examples/grid-headerbutton.component.html +0 -31
  325. package/src/app/examples/grid-headerbutton.component.scss +0 -10
  326. package/src/app/examples/grid-headerbutton.component.ts +0 -233
  327. package/src/app/examples/grid-headermenu.component.html +0 -31
  328. package/src/app/examples/grid-headermenu.component.scss +0 -25
  329. package/src/app/examples/grid-headermenu.component.ts +0 -159
  330. package/src/app/examples/grid-localization.component.html +0 -54
  331. package/src/app/examples/grid-localization.component.ts +0 -293
  332. package/src/app/examples/grid-menu.component.html +0 -37
  333. package/src/app/examples/grid-menu.component.scss +0 -28
  334. package/src/app/examples/grid-menu.component.ts +0 -229
  335. package/src/app/examples/grid-odata.component.html +0 -116
  336. package/src/app/examples/grid-odata.component.ts +0 -441
  337. package/src/app/examples/grid-range.component.html +0 -74
  338. package/src/app/examples/grid-range.component.ts +0 -291
  339. package/src/app/examples/grid-remote.component.html +0 -37
  340. package/src/app/examples/grid-remote.component.ts +0 -153
  341. package/src/app/examples/grid-resize-by-content.component.html +0 -62
  342. package/src/app/examples/grid-resize-by-content.component.scss +0 -19
  343. package/src/app/examples/grid-resize-by-content.component.ts +0 -780
  344. package/src/app/examples/grid-rowdetail.component.html +0 -35
  345. package/src/app/examples/grid-rowdetail.component.ts +0 -205
  346. package/src/app/examples/grid-rowmove.component.html +0 -49
  347. package/src/app/examples/grid-rowmove.component.ts +0 -234
  348. package/src/app/examples/grid-rowselection.component.html +0 -76
  349. package/src/app/examples/grid-rowselection.component.ts +0 -267
  350. package/src/app/examples/grid-state.component.html +0 -36
  351. package/src/app/examples/grid-state.component.ts +0 -259
  352. package/src/app/examples/grid-tabs.component.html +0 -35
  353. package/src/app/examples/grid-tabs.component.ts +0 -115
  354. package/src/app/examples/grid-trading.component.html +0 -58
  355. package/src/app/examples/grid-trading.component.scss +0 -49
  356. package/src/app/examples/grid-trading.component.ts +0 -319
  357. package/src/app/examples/grid-tree-data-hierarchical.component.html +0 -79
  358. package/src/app/examples/grid-tree-data-hierarchical.component.scss +0 -47
  359. package/src/app/examples/grid-tree-data-hierarchical.component.ts +0 -311
  360. package/src/app/examples/grid-tree-data-parent-child.component.html +0 -108
  361. package/src/app/examples/grid-tree-data-parent-child.component.scss +0 -10
  362. package/src/app/examples/grid-tree-data-parent-child.component.ts +0 -351
  363. package/src/app/examples/home.component.html +0 -41
  364. package/src/app/examples/home.component.ts +0 -9
  365. package/src/app/examples/rowdetail-preload.component.ts +0 -10
  366. package/src/app/examples/rowdetail-view.component.html +0 -36
  367. package/src/app/examples/rowdetail-view.component.ts +0 -54
  368. package/src/app/examples/swt-common-grid-pagination.component.ts +0 -156
  369. package/src/app/examples/swt-common-grid-test.component.html +0 -30
  370. package/src/app/examples/swt-common-grid-test.component.ts +0 -219
  371. package/src/app/examples/swt-common-grid.component.ts +0 -436
  372. package/src/app/examples/swt-logger.service.ts +0 -165
  373. package/src/app/modules/angular-slickgrid/components/angular-slickgrid.component.html +0 -4
  374. package/src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts +0 -1395
  375. package/src/app/modules/angular-slickgrid/constants.ts +0 -97
  376. package/src/app/modules/angular-slickgrid/extensions/index.ts +0 -1
  377. package/src/app/modules/angular-slickgrid/extensions/slickRowDetailView.ts +0 -375
  378. package/src/app/modules/angular-slickgrid/global-grid-options.ts +0 -245
  379. package/src/app/modules/angular-slickgrid/index.ts +0 -11
  380. package/src/app/modules/angular-slickgrid/models/angularComponentOutput.interface.ts +0 -6
  381. package/src/app/modules/angular-slickgrid/models/angularGridInstance.interface.ts +0 -68
  382. package/src/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.ts +0 -37
  383. package/src/app/modules/angular-slickgrid/models/gridOption.interface.ts +0 -12
  384. package/src/app/modules/angular-slickgrid/models/index.ts +0 -6
  385. package/src/app/modules/angular-slickgrid/models/rowDetailView.interface.ts +0 -33
  386. package/src/app/modules/angular-slickgrid/models/slickGrid.interface.ts +0 -7
  387. package/src/app/modules/angular-slickgrid/modules/angular-slickgrid.module.ts +0 -37
  388. package/src/app/modules/angular-slickgrid/services/angularUtil.service.ts +0 -48
  389. package/src/app/modules/angular-slickgrid/services/bsDropdown.service.ts +0 -142
  390. package/src/app/modules/angular-slickgrid/services/container.service.ts +0 -24
  391. package/src/app/modules/angular-slickgrid/services/index.ts +0 -5
  392. package/src/app/modules/angular-slickgrid/services/translater.service.ts +0 -38
  393. package/src/app/modules/angular-slickgrid/services/utilities.ts +0 -19
  394. package/src/app/modules/angular-slickgrid/slickgrid-config.ts +0 -10
  395. package/src/app/slickgrid-custom-variables.scss +0 -10
  396. package/src/assets/.gitkeep +0 -0
  397. package/src/assets/data/collection_100_numbers.json +0 -12
  398. package/src/assets/data/collection_500_numbers.json +0 -52
  399. package/src/assets/data/countries.json +0 -245
  400. package/src/assets/data/country_names.json +0 -245
  401. package/src/assets/data/customers_100.json +0 -102
  402. package/src/assets/i18n/en.json +0 -90
  403. package/src/assets/i18n/fr.json +0 -91
  404. package/src/environments/environment.prod.ts +0 -3
  405. package/src/environments/environment.ts +0 -8
  406. package/src/favicon.ico +0 -0
  407. package/src/index.html +0 -18
  408. package/src/main.ts +0 -13
  409. package/src/polyfills.ts +0 -52
  410. package/src/public_api.ts +0 -1
  411. package/src/styles.scss +0 -66
  412. package/src/typings.d.ts +0 -10
  413. package/tsconfig.app.json +0 -25
  414. package/tsconfig.json +0 -40
  415. package/tsconfig.spec.json +0 -23
@@ -0,0 +1,528 @@
1
+ # verror: rich JavaScript errors
2
+
3
+ This module provides several classes in support of Joyent's [Best Practices for
4
+ Error Handling in Node.js](http://www.joyent.com/developers/node/design/errors).
5
+ If you find any of the behavior here confusing or surprising, check out that
6
+ document first.
7
+
8
+ The error classes here support:
9
+
10
+ * printf-style arguments for the message
11
+ * chains of causes
12
+ * properties to provide extra information about the error
13
+ * creating your own subclasses that support all of these
14
+
15
+ The classes here are:
16
+
17
+ * **VError**, for chaining errors while preserving each one's error message.
18
+ This is useful in servers and command-line utilities when you want to
19
+ propagate an error up a call stack, but allow various levels to add their own
20
+ context. See examples below.
21
+ * **WError**, for wrapping errors while hiding the lower-level messages from the
22
+ top-level error. This is useful for API endpoints where you don't want to
23
+ expose internal error messages, but you still want to preserve the error chain
24
+ for logging and debugging.
25
+ * **SError**, which is just like VError but interprets printf-style arguments
26
+ more strictly.
27
+ * **MultiError**, which is just an Error that encapsulates one or more other
28
+ errors. (This is used for parallel operations that return several errors.)
29
+
30
+
31
+ # Quick start
32
+
33
+ First, install the package:
34
+
35
+ npm install verror
36
+
37
+ If nothing else, you can use VError as a drop-in replacement for the built-in
38
+ JavaScript Error class, with the addition of printf-style messages:
39
+
40
+ ```javascript
41
+ var err = new VError('missing file: "%s"', '/etc/passwd');
42
+ console.log(err.message);
43
+ ```
44
+
45
+ This prints:
46
+
47
+ missing file: "/etc/passwd"
48
+
49
+ You can also pass a `cause` argument, which is any other Error object:
50
+
51
+ ```javascript
52
+ var fs = require('fs');
53
+ var filename = '/nonexistent';
54
+ fs.stat(filename, function (err1) {
55
+ var err2 = new VError(err1, 'stat "%s"', filename);
56
+ console.error(err2.message);
57
+ });
58
+ ```
59
+
60
+ This prints out:
61
+
62
+ stat "/nonexistent": ENOENT, stat '/nonexistent'
63
+
64
+ which resembles how Unix programs typically report errors:
65
+
66
+ $ sort /nonexistent
67
+ sort: open failed: /nonexistent: No such file or directory
68
+
69
+ To match the Unixy feel, when you print out the error, just prepend the
70
+ program's name to the VError's `message`. Or just call
71
+ [node-cmdutil.fail(your_verror)](https://github.com/joyent/node-cmdutil), which
72
+ does this for you.
73
+
74
+ You can get the next-level Error using `err.cause()`:
75
+
76
+ ```javascript
77
+ console.error(err2.cause().message);
78
+ ```
79
+
80
+ prints:
81
+
82
+ ENOENT, stat '/nonexistent'
83
+
84
+ Of course, you can chain these as many times as you want, and it works with any
85
+ kind of Error:
86
+
87
+ ```javascript
88
+ var err1 = new Error('No such file or directory');
89
+ var err2 = new VError(err1, 'failed to stat "%s"', '/junk');
90
+ var err3 = new VError(err2, 'request failed');
91
+ console.error(err3.message);
92
+ ```
93
+
94
+ This prints:
95
+
96
+ request failed: failed to stat "/junk": No such file or directory
97
+
98
+ The idea is that each layer in the stack annotates the error with a description
99
+ of what it was doing. The end result is a message that explains what happened
100
+ at each level.
101
+
102
+ You can also decorate Error objects with additional information so that callers
103
+ can not only handle each kind of error differently, but also construct their own
104
+ error messages (e.g., to localize them, format them, group them by type, and so
105
+ on). See the example below.
106
+
107
+
108
+ # Deeper dive
109
+
110
+ The two main goals for VError are:
111
+
112
+ * **Make it easy to construct clear, complete error messages intended for
113
+ people.** Clear error messages greatly improve both user experience and
114
+ debuggability, so we wanted to make it easy to build them. That's why the
115
+ constructor takes printf-style arguments.
116
+ * **Make it easy to construct objects with programmatically-accessible
117
+ metadata** (which we call _informational properties_). Instead of just saying
118
+ "connection refused while connecting to 192.168.1.2:80", you can add
119
+ properties like `"ip": "192.168.1.2"` and `"tcpPort": 80`. This can be used
120
+ for feeding into monitoring systems, analyzing large numbers of Errors (as
121
+ from a log file), or localizing error messages.
122
+
123
+ To really make this useful, it also needs to be easy to compose Errors:
124
+ higher-level code should be able to augment the Errors reported by lower-level
125
+ code to provide a more complete description of what happened. Instead of saying
126
+ "connection refused", you can say "operation X failed: connection refused".
127
+ That's why VError supports `causes`.
128
+
129
+ In order for all this to work, programmers need to know that it's generally safe
130
+ to wrap lower-level Errors with higher-level ones. If you have existing code
131
+ that handles Errors produced by a library, you should be able to wrap those
132
+ Errors with a VError to add information without breaking the error handling
133
+ code. There are two obvious ways that this could break such consumers:
134
+
135
+ * The error's name might change. People typically use `name` to determine what
136
+ kind of Error they've got. To ensure compatibility, you can create VErrors
137
+ with custom names, but this approach isn't great because it prevents you from
138
+ representing complex failures. For this reason, VError provides
139
+ `findCauseByName`, which essentially asks: does this Error _or any of its
140
+ causes_ have this specific type? If error handling code uses
141
+ `findCauseByName`, then subsystems can construct very specific causal chains
142
+ for debuggability and still let people handle simple cases easily. There's an
143
+ example below.
144
+ * The error's properties might change. People often hang additional properties
145
+ off of Error objects. If we wrap an existing Error in a new Error, those
146
+ properties would be lost unless we copied them. But there are a variety of
147
+ both standard and non-standard Error properties that should _not_ be copied in
148
+ this way: most obviously `name`, `message`, and `stack`, but also `fileName`,
149
+ `lineNumber`, and a few others. Plus, it's useful for some Error subclasses
150
+ to have their own private properties -- and there'd be no way to know whether
151
+ these should be copied. For these reasons, VError first-classes these
152
+ information properties. You have to provide them in the constructor, you can
153
+ only fetch them with the `info()` function, and VError takes care of making
154
+ sure properties from causes wind up in the `info()` output.
155
+
156
+ Let's put this all together with an example from the node-fast RPC library.
157
+ node-fast implements a simple RPC protocol for Node programs. There's a server
158
+ and client interface, and clients make RPC requests to servers. Let's say the
159
+ server fails with an UnauthorizedError with message "user 'bob' is not
160
+ authorized". The client wraps all server errors with a FastServerError. The
161
+ client also wraps all request errors with a FastRequestError that includes the
162
+ name of the RPC call being made. The result of this failed RPC might look like
163
+ this:
164
+
165
+ name: FastRequestError
166
+ message: "request failed: server error: user 'bob' is not authorized"
167
+ rpcMsgid: <unique identifier for this request>
168
+ rpcMethod: GetObject
169
+ cause:
170
+ name: FastServerError
171
+ message: "server error: user 'bob' is not authorized"
172
+ cause:
173
+ name: UnauthorizedError
174
+ message: "user 'bob' is not authorized"
175
+ rpcUser: "bob"
176
+
177
+ When the caller uses `VError.info()`, the information properties are collapsed
178
+ so that it looks like this:
179
+
180
+ message: "request failed: server error: user 'bob' is not authorized"
181
+ rpcMsgid: <unique identifier for this request>
182
+ rpcMethod: GetObject
183
+ rpcUser: "bob"
184
+
185
+ Taking this apart:
186
+
187
+ * The error's message is a complete description of the problem. The caller can
188
+ report this directly to its caller, which can potentially make its way back to
189
+ an end user (if appropriate). It can also be logged.
190
+ * The caller can tell that the request failed on the server, rather than as a
191
+ result of a client problem (e.g., failure to serialize the request), a
192
+ transport problem (e.g., failure to connect to the server), or something else
193
+ (e.g., a timeout). They do this using `findCauseByName('FastServerError')`
194
+ rather than checking the `name` field directly.
195
+ * If the caller logs this error, the logs can be analyzed to aggregate
196
+ errors by cause, by RPC method name, by user, or whatever. Or the
197
+ error can be correlated with other events for the same rpcMsgid.
198
+ * It wasn't very hard for any part of the code to contribute to this Error.
199
+ Each part of the stack has just a few lines to provide exactly what it knows,
200
+ with very little boilerplate.
201
+
202
+ It's not expected that you'd use these complex forms all the time. Despite
203
+ supporting the complex case above, you can still just do:
204
+
205
+ new VError("my service isn't working");
206
+
207
+ for the simple cases.
208
+
209
+
210
+ # Reference: VError, WError, SError
211
+
212
+ VError, WError, and SError are convenient drop-in replacements for `Error` that
213
+ support printf-style arguments, first-class causes, informational properties,
214
+ and other useful features.
215
+
216
+
217
+ ## Constructors
218
+
219
+ The VError constructor has several forms:
220
+
221
+ ```javascript
222
+ /*
223
+ * This is the most general form. You can specify any supported options
224
+ * (including "cause" and "info") this way.
225
+ */
226
+ new VError(options, sprintf_args...)
227
+
228
+ /*
229
+ * This is a useful shorthand when the only option you need is "cause".
230
+ */
231
+ new VError(cause, sprintf_args...)
232
+
233
+ /*
234
+ * This is a useful shorthand when you don't need any options at all.
235
+ */
236
+ new VError(sprintf_args...)
237
+ ```
238
+
239
+ All of these forms construct a new VError that behaves just like the built-in
240
+ JavaScript `Error` class, with some additional methods described below.
241
+
242
+ In the first form, `options` is a plain object with any of the following
243
+ optional properties:
244
+
245
+ Option name | Type | Meaning
246
+ ---------------- | ---------------- | -------
247
+ `name` | string | Describes what kind of error this is. This is intended for programmatic use to distinguish between different kinds of errors. Note that in modern versions of Node.js, this name is ignored in the `stack` property value, but callers can still use the `name` property to get at it.
248
+ `cause` | any Error object | Indicates that the new error was caused by `cause`. See `cause()` below. If unspecified, the cause will be `null`.
249
+ `strict` | boolean | If true, then `null` and `undefined` values in `sprintf_args` are passed through to `sprintf()`. Otherwise, these are replaced with the strings `'null'`, and '`undefined`', respectively.
250
+ `constructorOpt` | function | If specified, then the stack trace for this error ends at function `constructorOpt`. Functions called by `constructorOpt` will not show up in the stack. This is useful when this class is subclassed.
251
+ `info` | object | Specifies arbitrary informational properties that are available through the `VError.info(err)` static class method. See that method for details.
252
+
253
+ The second form is equivalent to using the first form with the specified `cause`
254
+ as the error's cause. This form is distinguished from the first form because
255
+ the first argument is an Error.
256
+
257
+ The third form is equivalent to using the first form with all default option
258
+ values. This form is distinguished from the other forms because the first
259
+ argument is not an object or an Error.
260
+
261
+ The `WError` constructor is used exactly the same way as the `VError`
262
+ constructor. The `SError` constructor is also used the same way as the
263
+ `VError` constructor except that in all cases, the `strict` property is
264
+ overriden to `true.
265
+
266
+
267
+ ## Public properties
268
+
269
+ `VError`, `WError`, and `SError` all provide the same public properties as
270
+ JavaScript's built-in Error objects.
271
+
272
+ Property name | Type | Meaning
273
+ ------------- | ------ | -------
274
+ `name` | string | Programmatically-usable name of the error.
275
+ `message` | string | Human-readable summary of the failure. Programmatically-accessible details are provided through `VError.info(err)` class method.
276
+ `stack` | string | Human-readable stack trace where the Error was constructed.
277
+
278
+ For all of these classes, the printf-style arguments passed to the constructor
279
+ are processed with `sprintf()` to form a message. For `WError`, this becomes
280
+ the complete `message` property. For `SError` and `VError`, this message is
281
+ prepended to the message of the cause, if any (with a suitable separator), and
282
+ the result becomes the `message` property.
283
+
284
+ The `stack` property is managed entirely by the underlying JavaScript
285
+ implementation. It's generally implemented using a getter function because
286
+ constructing the human-readable stack trace is somewhat expensive.
287
+
288
+ ## Class methods
289
+
290
+ The following methods are defined on the `VError` class and as exported
291
+ functions on the `verror` module. They're defined this way rather than using
292
+ methods on VError instances so that they can be used on Errors not created with
293
+ `VError`.
294
+
295
+ ### `VError.cause(err)`
296
+
297
+ The `cause()` function returns the next Error in the cause chain for `err`, or
298
+ `null` if there is no next error. See the `cause` argument to the constructor.
299
+ Errors can have arbitrarily long cause chains. You can walk the `cause` chain
300
+ by invoking `VError.cause(err)` on each subsequent return value. If `err` is
301
+ not a `VError`, the cause is `null`.
302
+
303
+ ### `VError.info(err)`
304
+
305
+ Returns an object with all of the extra error information that's been associated
306
+ with this Error and all of its causes. These are the properties passed in using
307
+ the `info` option to the constructor. Properties not specified in the
308
+ constructor for this Error are implicitly inherited from this error's cause.
309
+
310
+ These properties are intended to provide programmatically-accessible metadata
311
+ about the error. For an error that indicates a failure to resolve a DNS name,
312
+ informational properties might include the DNS name to be resolved, or even the
313
+ list of resolvers used to resolve it. The values of these properties should
314
+ generally be plain objects (i.e., consisting only of null, undefined, numbers,
315
+ booleans, strings, and objects and arrays containing only other plain objects).
316
+
317
+ ### `VError.fullStack(err)`
318
+
319
+ Returns a string containing the full stack trace, with all nested errors recursively
320
+ reported as `'caused by:' + err.stack`.
321
+
322
+ ### `VError.findCauseByName(err, name)`
323
+
324
+ The `findCauseByName()` function traverses the cause chain for `err`, looking
325
+ for an error whose `name` property matches the passed in `name` value. If no
326
+ match is found, `null` is returned.
327
+
328
+ If all you want is to know _whether_ there's a cause (and you don't care what it
329
+ is), you can use `VError.hasCauseWithName(err, name)`.
330
+
331
+ If a vanilla error or a non-VError error is passed in, then there is no cause
332
+ chain to traverse. In this scenario, the function will check the `name`
333
+ property of only `err`.
334
+
335
+ ### `VError.hasCauseWithName(err, name)`
336
+
337
+ Returns true if and only if `VError.findCauseByName(err, name)` would return
338
+ a non-null value. This essentially determines whether `err` has any cause in
339
+ its cause chain that has name `name`.
340
+
341
+ ### `VError.errorFromList(errors)`
342
+
343
+ Given an array of Error objects (possibly empty), return a single error
344
+ representing the whole collection of errors. If the list has:
345
+
346
+ * 0 elements, returns `null`
347
+ * 1 element, returns the sole error
348
+ * more than 1 element, returns a MultiError referencing the whole list
349
+
350
+ This is useful for cases where an operation may produce any number of errors,
351
+ and you ultimately want to implement the usual `callback(err)` pattern. You can
352
+ accumulate the errors in an array and then invoke
353
+ `callback(VError.errorFromList(errors))` when the operation is complete.
354
+
355
+
356
+ ### `VError.errorForEach(err, func)`
357
+
358
+ Convenience function for iterating an error that may itself be a MultiError.
359
+
360
+ In all cases, `err` must be an Error. If `err` is a MultiError, then `func` is
361
+ invoked as `func(errorN)` for each of the underlying errors of the MultiError.
362
+ If `err` is any other kind of error, `func` is invoked once as `func(err)`. In
363
+ all cases, `func` is invoked synchronously.
364
+
365
+ This is useful for cases where an operation may produce any number of warnings
366
+ that may be encapsulated with a MultiError -- but may not be.
367
+
368
+ This function does not iterate an error's cause chain.
369
+
370
+
371
+ ## Examples
372
+
373
+ The "Demo" section above covers several basic cases. Here's a more advanced
374
+ case:
375
+
376
+ ```javascript
377
+ var err1 = new VError('something bad happened');
378
+ /* ... */
379
+ var err2 = new VError({
380
+ 'name': 'ConnectionError',
381
+ 'cause': err1,
382
+ 'info': {
383
+ 'errno': 'ECONNREFUSED',
384
+ 'remote_ip': '127.0.0.1',
385
+ 'port': 215
386
+ }
387
+ }, 'failed to connect to "%s:%d"', '127.0.0.1', 215);
388
+
389
+ console.log(err2.message);
390
+ console.log(err2.name);
391
+ console.log(VError.info(err2));
392
+ console.log(err2.stack);
393
+ ```
394
+
395
+ This outputs:
396
+
397
+ failed to connect to "127.0.0.1:215": something bad happened
398
+ ConnectionError
399
+ { errno: 'ECONNREFUSED', remote_ip: '127.0.0.1', port: 215 }
400
+ ConnectionError: failed to connect to "127.0.0.1:215": something bad happened
401
+ at Object.<anonymous> (/home/dap/node-verror/examples/info.js:5:12)
402
+ at Module._compile (module.js:456:26)
403
+ at Object.Module._extensions..js (module.js:474:10)
404
+ at Module.load (module.js:356:32)
405
+ at Function.Module._load (module.js:312:12)
406
+ at Function.Module.runMain (module.js:497:10)
407
+ at startup (node.js:119:16)
408
+ at node.js:935:3
409
+
410
+ Information properties are inherited up the cause chain, with values at the top
411
+ of the chain overriding same-named values lower in the chain. To continue that
412
+ example:
413
+
414
+ ```javascript
415
+ var err3 = new VError({
416
+ 'name': 'RequestError',
417
+ 'cause': err2,
418
+ 'info': {
419
+ 'errno': 'EBADREQUEST'
420
+ }
421
+ }, 'request failed');
422
+
423
+ console.log(err3.message);
424
+ console.log(err3.name);
425
+ console.log(VError.info(err3));
426
+ console.log(err3.stack);
427
+ ```
428
+
429
+ This outputs:
430
+
431
+ request failed: failed to connect to "127.0.0.1:215": something bad happened
432
+ RequestError
433
+ { errno: 'EBADREQUEST', remote_ip: '127.0.0.1', port: 215 }
434
+ RequestError: request failed: failed to connect to "127.0.0.1:215": something bad happened
435
+ at Object.<anonymous> (/home/dap/node-verror/examples/info.js:20:12)
436
+ at Module._compile (module.js:456:26)
437
+ at Object.Module._extensions..js (module.js:474:10)
438
+ at Module.load (module.js:356:32)
439
+ at Function.Module._load (module.js:312:12)
440
+ at Function.Module.runMain (module.js:497:10)
441
+ at startup (node.js:119:16)
442
+ at node.js:935:3
443
+
444
+ You can also print the complete stack trace of combined `Error`s by using
445
+ `VError.fullStack(err).`
446
+
447
+ ```javascript
448
+ var err1 = new VError('something bad happened');
449
+ /* ... */
450
+ var err2 = new VError(err1, 'something really bad happened here');
451
+
452
+ console.log(VError.fullStack(err2));
453
+ ```
454
+
455
+ This outputs:
456
+
457
+ VError: something really bad happened here: something bad happened
458
+ at Object.<anonymous> (/home/dap/node-verror/examples/fullStack.js:5:12)
459
+ at Module._compile (module.js:409:26)
460
+ at Object.Module._extensions..js (module.js:416:10)
461
+ at Module.load (module.js:343:32)
462
+ at Function.Module._load (module.js:300:12)
463
+ at Function.Module.runMain (module.js:441:10)
464
+ at startup (node.js:139:18)
465
+ at node.js:968:3
466
+ caused by: VError: something bad happened
467
+ at Object.<anonymous> (/home/dap/node-verror/examples/fullStack.js:3:12)
468
+ at Module._compile (module.js:409:26)
469
+ at Object.Module._extensions..js (module.js:416:10)
470
+ at Module.load (module.js:343:32)
471
+ at Function.Module._load (module.js:300:12)
472
+ at Function.Module.runMain (module.js:441:10)
473
+ at startup (node.js:139:18)
474
+ at node.js:968:3
475
+
476
+ `VError.fullStack` is also safe to use on regular `Error`s, so feel free to use
477
+ it whenever you need to extract the stack trace from an `Error`, regardless if
478
+ it's a `VError` or not.
479
+
480
+ # Reference: MultiError
481
+
482
+ MultiError is an Error class that represents a group of Errors. This is used
483
+ when you logically need to provide a single Error, but you want to preserve
484
+ information about multiple underying Errors. A common case is when you execute
485
+ several operations in parallel and some of them fail.
486
+
487
+ MultiErrors are constructed as:
488
+
489
+ ```javascript
490
+ new MultiError(error_list)
491
+ ```
492
+
493
+ `error_list` is an array of at least one `Error` object.
494
+
495
+ The cause of the MultiError is the first error provided. None of the other
496
+ `VError` options are supported. The `message` for a MultiError consists the
497
+ `message` from the first error, prepended with a message indicating that there
498
+ were other errors.
499
+
500
+ For example:
501
+
502
+ ```javascript
503
+ err = new MultiError([
504
+ new Error('failed to resolve DNS name "abc.example.com"'),
505
+ new Error('failed to resolve DNS name "def.example.com"'),
506
+ ]);
507
+
508
+ console.error(err.message);
509
+ ```
510
+
511
+ outputs:
512
+
513
+ first of 2 errors: failed to resolve DNS name "abc.example.com"
514
+
515
+ See the convenience function `VError.errorFromList`, which is sometimes simpler
516
+ to use than this constructor.
517
+
518
+ ## Public methods
519
+
520
+
521
+ ### `errors()`
522
+
523
+ Returns an array of the errors used to construct this MultiError.
524
+
525
+
526
+ # Contributing
527
+
528
+ See separate [contribution guidelines](CONTRIBUTING.md).
@@ -0,0 +1,46 @@
1
+ # extsprintf: extended POSIX-style sprintf
2
+
3
+ Stripped down version of s[n]printf(3c). We make a best effort to throw an
4
+ exception when given a format string we don't understand, rather than ignoring
5
+ it, so that we won't break existing programs if/when we go implement the rest
6
+ of this.
7
+
8
+ This implementation currently supports specifying
9
+
10
+ * field alignment ('-' flag),
11
+ * zero-pad ('0' flag)
12
+ * always show numeric sign ('+' flag),
13
+ * field width
14
+ * conversions for strings, decimal integers, and floats (numbers).
15
+ * argument size specifiers. These are all accepted but ignored, since
16
+ Javascript has no notion of the physical size of an argument.
17
+
18
+ Everything else is currently unsupported, most notably: precision, unsigned
19
+ numbers, non-decimal numbers, and characters.
20
+
21
+ Besides the usual POSIX conversions, this implementation supports:
22
+
23
+ * `%j`: pretty-print a JSON object (using node's "inspect")
24
+ * `%r`: pretty-print an Error object
25
+
26
+ # Example
27
+
28
+ First, install it:
29
+
30
+ # npm install extsprintf
31
+
32
+ Now, use it:
33
+
34
+ var mod_extsprintf = require('extsprintf');
35
+ console.log(mod_extsprintf.sprintf('hello %25s', 'world'));
36
+
37
+ outputs:
38
+
39
+ hello world
40
+
41
+ # Also supported
42
+
43
+ **printf**: same args as sprintf, but prints the result to stdout
44
+
45
+ **fprintf**: same args as sprintf, preceded by a Node stream. Prints the result
46
+ to the given stream.
@@ -0,0 +1,54 @@
1
+ # which
2
+
3
+ Like the unix `which` utility.
4
+
5
+ Finds the first instance of a specified executable in the PATH
6
+ environment variable. Does not cache the results, so `hash -r` is not
7
+ needed when the PATH changes.
8
+
9
+ ## USAGE
10
+
11
+ ```javascript
12
+ var which = require('which')
13
+
14
+ // async usage
15
+ which('node', function (er, resolvedPath) {
16
+ // er is returned if no "node" is found on the PATH
17
+ // if it is found, then the absolute path to the exec is returned
18
+ })
19
+
20
+ // or promise
21
+ which('node').then(resolvedPath => { ... }).catch(er => { ... not found ... })
22
+
23
+ // sync usage
24
+ // throws if not found
25
+ var resolved = which.sync('node')
26
+
27
+ // if nothrow option is used, returns null if not found
28
+ resolved = which.sync('node', {nothrow: true})
29
+
30
+ // Pass options to override the PATH and PATHEXT environment vars.
31
+ which('node', { path: someOtherPath }, function (er, resolved) {
32
+ if (er)
33
+ throw er
34
+ console.log('found at %j', resolved)
35
+ })
36
+ ```
37
+
38
+ ## CLI USAGE
39
+
40
+ Same as the BSD `which(1)` binary.
41
+
42
+ ```
43
+ usage: which [-as] program ...
44
+ ```
45
+
46
+ ## OPTIONS
47
+
48
+ You may pass an options object as the second argument.
49
+
50
+ - `path`: Use instead of the `PATH` environment variable.
51
+ - `pathExt`: Use instead of the `PATHEXT` environment variable.
52
+ - `all`: Return all matches, instead of just the first one. Note that
53
+ this means the function returns an array of strings instead of a
54
+ single string.