@socketsecurity/cli-with-sentry 1.16.0 → 1.17.0

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 (316) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE +87 -0
  3. package/README.md +13 -13
  4. package/bin/cli.js +9 -9
  5. package/dist/.config/tsconfig.dts.tsbuildinfo +1 -1
  6. package/dist/cli.js +2120 -4305
  7. package/dist/cli.js.map +1 -1
  8. package/dist/constants.js +71 -87
  9. package/dist/constants.js.map +1 -1
  10. package/dist/env-helpers.js +63 -0
  11. package/dist/env-helpers.js.map +1 -0
  12. package/dist/instrument-with-sentry.js +7 -7
  13. package/dist/instrument-with-sentry.js.map +1 -1
  14. package/dist/manifest-scripts/dotnet-tool/Microsoft.Build.Locator.dll +0 -0
  15. package/dist/manifest-scripts/dotnet-tool/socket-facts-dotnet.deps.json +2 -2
  16. package/dist/manifest-scripts/dotnet-tool/socket-facts-dotnet.dll +0 -0
  17. package/dist/manifest-scripts/maven-extension/coana-maven-extension.jar +0 -0
  18. package/dist/runtime-constants.js +345 -0
  19. package/dist/runtime-constants.js.map +1 -0
  20. package/dist/shadow-npm-bin2.js +9 -13
  21. package/dist/shadow-npm-bin2.js.map +1 -1
  22. package/dist/shadow-npm-inject.js +10 -15
  23. package/dist/shadow-npm-inject.js.map +1 -1
  24. package/dist/shadow-npx-bin.js.map +1 -1
  25. package/dist/shadow-pnpm-bin2.js +21 -25
  26. package/dist/shadow-pnpm-bin2.js.map +1 -1
  27. package/dist/shadow-yarn-bin.js +4 -6
  28. package/dist/shadow-yarn-bin.js.map +1 -1
  29. package/dist/socket-completion.bash +0 -0
  30. package/dist/spawn-sync.js +47 -0
  31. package/dist/spawn-sync.js.map +1 -0
  32. package/dist/spinner.js +182 -0
  33. package/dist/spinner.js.map +1 -0
  34. package/dist/types/commands/fix/generated-socket-facts.d.mts +5 -2
  35. package/dist/types/commands/fix/handle-fix.d.mts +1 -1
  36. package/dist/types/commands/fix/types.d.mts +1 -1
  37. package/dist/types/commands/manifest/bazel/process.d.mts +2 -2
  38. package/dist/types/commands/manifest/convert-dotnet-to-facts.d.mts +3 -6
  39. package/dist/types/commands/manifest/discover-manifest-roots.d.mts +10 -11
  40. package/dist/types/commands/manifest/generate-recursive-manifests.d.mts +16 -30
  41. package/dist/types/commands/manifest/generate_auto_manifest.d.mts +6 -11
  42. package/dist/types/commands/manifest/load-build.d.mts +3 -11
  43. package/dist/types/commands/manifest/run-manifest-facts.d.mts +88 -29
  44. package/dist/types/commands/manifest/scripts/build-tool.d.mts +2 -0
  45. package/dist/types/commands/optimize/add-overrides.d.mts +2 -2
  46. package/dist/types/commands/optimize/get-dependency-entries.d.mts +1 -1
  47. package/dist/types/commands/optimize/get-overrides-by-agent.d.mts +16 -7
  48. package/dist/types/commands/optimize/update-lockfile.d.mts +2 -2
  49. package/dist/types/commands/optimize/update-manifest-by-agent.d.mts +4 -2
  50. package/dist/types/commands/package/fetch-purls-shallow-score.d.mts +2 -2
  51. package/dist/types/commands/scan/fetch-supported-scan-file-names.d.mts +1 -1
  52. package/dist/types/commands/scan/generate-report.d.mts +1 -1
  53. package/dist/types/commands/scan/handle-create-new-scan.d.mts +5 -1
  54. package/dist/types/commands/scan/output-create-new-scan.d.mts +1 -1
  55. package/dist/types/commands/scan/output-diff-scan.d.mts +4 -2
  56. package/dist/types/commands/scan/perform-reachability-analysis.d.mts +4 -6
  57. package/dist/types/commands/scan/run-dynamic-sbom-inference.d.mts +7 -15
  58. package/dist/types/constants/runtime.d.mts +417 -0
  59. package/dist/types/constants.d.mts +9 -10
  60. package/dist/types/paths/coana.d.mts +5 -0
  61. package/dist/types/paths/uv.d.mts +2 -0
  62. package/dist/types/sea/adapters/cdxgen-worker.d.mts +1 -0
  63. package/dist/types/sea/adapters/synp-worker.d.mts +1 -0
  64. package/dist/types/sea/build/cdxgen-fixture.d.mts +4 -0
  65. package/dist/types/sea/build/smoke-test.d.mts +2 -0
  66. package/dist/types/sea/build-sea.d.mts +4 -2
  67. package/dist/types/sea/download-bytes.d.mts +0 -1
  68. package/dist/types/sea/paths/archive.d.mts +3 -0
  69. package/dist/types/sea/paths/coana-cache.d.mts +1 -0
  70. package/dist/types/sea/paths/native-tools.d.mts +13 -0
  71. package/dist/types/sea/pnpm-lock.d.mts +22 -0
  72. package/dist/types/sea/rollup-workers.d.mts +1 -0
  73. package/dist/types/sea/runtime.d.mts +4 -3
  74. package/dist/types/sea/vfs-digest.d.mts +2 -0
  75. package/dist/types/shadow/common.d.mts +1 -1
  76. package/dist/types/shadow/npm/arborist-helpers.d.mts +1 -1
  77. package/dist/types/shadow/npm/bin.d.mts +1 -1
  78. package/dist/types/shadow/npm/install.d.mts +3 -3
  79. package/dist/types/shadow/npm-base.d.mts +1 -1
  80. package/dist/types/shadow/npx/bin.d.mts +1 -1
  81. package/dist/types/shadow/pnpm/bin.d.mts +1 -1
  82. package/dist/types/shadow/yarn/bin.d.mts +1 -1
  83. package/dist/types/test/mocks/socket-auth.d.mts +40 -39
  84. package/dist/types/utils/agent.d.mts +6 -1
  85. package/dist/types/utils/alert/artifact.d.mts +1 -1
  86. package/dist/types/utils/alerts-map.d.mts +1 -1
  87. package/dist/types/utils/api.d.mts +1 -1
  88. package/dist/types/utils/arrays.d.mts +6 -0
  89. package/dist/types/utils/bin.d.mts +26 -0
  90. package/dist/types/utils/{coana-release.d.mts → coana/release.d.mts} +5 -3
  91. package/dist/types/utils/debug.d.mts +23 -49
  92. package/dist/types/utils/dlx.d.mts +1 -1
  93. package/dist/types/utils/ecosystem.d.mts +1 -9
  94. package/dist/types/utils/env.d.mts +24 -0
  95. package/dist/types/utils/errors.d.mts +2 -2
  96. package/dist/types/utils/escape-regexp.d.mts +6 -0
  97. package/dist/types/utils/fs.d.mts +33 -0
  98. package/dist/types/utils/github.d.mts +1 -1
  99. package/dist/types/utils/globs.d.mts +1 -0
  100. package/dist/types/utils/logger.d.mts +51 -0
  101. package/dist/types/utils/objects.d.mts +11 -0
  102. package/dist/types/utils/package-environment.d.mts +3 -3
  103. package/dist/types/utils/packages.d.mts +65 -0
  104. package/dist/types/utils/path.d.mts +3 -0
  105. package/dist/types/utils/promises.d.mts +23 -0
  106. package/dist/types/utils/prompts.d.mts +25 -0
  107. package/dist/types/utils/purl.d.mts +4 -1
  108. package/dist/types/utils/socket-package-alert.d.mts +1 -1
  109. package/dist/types/utils/socket-url.d.mts +1 -1
  110. package/dist/types/utils/sorts.d.mts +1 -0
  111. package/dist/types/utils/spawn-sync.d.mts +3 -0
  112. package/dist/types/utils/spawn.d.mts +67 -0
  113. package/dist/types/utils/spec.d.mts +1 -1
  114. package/dist/types/utils/spinner.d.mts +46 -0
  115. package/dist/types/utils/streams.d.mts +3 -0
  116. package/dist/types/utils/strings.d.mts +6 -0
  117. package/dist/types/utils/url.d.mts +2 -0
  118. package/dist/types/utils/words.d.mts +1 -0
  119. package/dist/utils.js +4481 -806
  120. package/dist/utils.js.map +1 -1
  121. package/dist/vendor.js +39737 -41318
  122. package/external/blessed-contrib/lib/widget/charts/line.js +172 -149
  123. package/package.json +43 -36
  124. package/shadow-bin/npm +0 -0
  125. package/shadow-bin/npx +0 -0
  126. package/shadow-bin/pnpm +0 -0
  127. package/shadow-bin/yarn +0 -0
  128. package/dist/types/commands/manifest/convert-gradle-to-facts.d.mts +0 -19
  129. package/dist/types/commands/manifest/convert-maven-to-facts.d.mts +0 -19
  130. package/dist/types/commands/manifest/convert-sbt-to-facts.d.mts +0 -22
  131. package/dist/types/commands/manifest/enumerate-workspaces.d.mts +0 -22
  132. package/dist/types/commands/manifest/expand-env-var-refs.d.mts +0 -9
  133. package/dist/types/sea/archive-paths.d.mts +0 -6
  134. package/external/@socketsecurity/registry/LICENSE +0 -21
  135. package/external/@socketsecurity/registry/README.md +0 -9
  136. package/external/@socketsecurity/registry/extensions.json +0 -28
  137. package/external/@socketsecurity/registry/external/@inquirer/confirm.js +0 -3165
  138. package/external/@socketsecurity/registry/external/@inquirer/input.js +0 -3202
  139. package/external/@socketsecurity/registry/external/@inquirer/password.js +0 -3307
  140. package/external/@socketsecurity/registry/external/@inquirer/search.js +0 -3519
  141. package/external/@socketsecurity/registry/external/@inquirer/select.js +0 -3655
  142. package/external/@socketsecurity/registry/external/@npmcli/package-json/index.js +0 -21406
  143. package/external/@socketsecurity/registry/external/@npmcli/package-json/lib/read-package.js +0 -183
  144. package/external/@socketsecurity/registry/external/@npmcli/package-json/lib/sort.js +0 -274
  145. package/external/@socketsecurity/registry/external/@npmcli/promise-spawn.js +0 -704
  146. package/external/@socketsecurity/registry/external/@socketregistry/is-unicode-supported.js +0 -54
  147. package/external/@socketsecurity/registry/external/@socketregistry/packageurl-js.js +0 -4516
  148. package/external/@socketsecurity/registry/external/@socketregistry/yocto-spinner.js +0 -453
  149. package/external/@socketsecurity/registry/external/@yarnpkg/extensions.js +0 -1406
  150. package/external/@socketsecurity/registry/external/browserslist.js +0 -20496
  151. package/external/@socketsecurity/registry/external/cacache.js +0 -16208
  152. package/external/@socketsecurity/registry/external/debug.js +0 -1163
  153. package/external/@socketsecurity/registry/external/fast-glob.js +0 -7994
  154. package/external/@socketsecurity/registry/external/fast-sort.js +0 -181
  155. package/external/@socketsecurity/registry/external/libnpmpack.js +0 -106271
  156. package/external/@socketsecurity/registry/external/make-fetch-happen.js +0 -38997
  157. package/external/@socketsecurity/registry/external/normalize-package-data.js +0 -5343
  158. package/external/@socketsecurity/registry/external/npm-package-arg.js +0 -5773
  159. package/external/@socketsecurity/registry/external/pacote.js +0 -74109
  160. package/external/@socketsecurity/registry/external/picomatch.js +0 -2307
  161. package/external/@socketsecurity/registry/external/semver.js +0 -2618
  162. package/external/@socketsecurity/registry/external/signal-exit.js +0 -336
  163. package/external/@socketsecurity/registry/external/spdx-correct.js +0 -1457
  164. package/external/@socketsecurity/registry/external/spdx-expression-parse.js +0 -1043
  165. package/external/@socketsecurity/registry/external/streaming-iterables.js +0 -326
  166. package/external/@socketsecurity/registry/external/validate-npm-package-name.js +0 -108
  167. package/external/@socketsecurity/registry/external/which.js +0 -405
  168. package/external/@socketsecurity/registry/external/yoctocolors-cjs.js +0 -101
  169. package/external/@socketsecurity/registry/index.js +0 -31
  170. package/external/@socketsecurity/registry/lib/agent.js +0 -390
  171. package/external/@socketsecurity/registry/lib/arrays.js +0 -89
  172. package/external/@socketsecurity/registry/lib/bin.js +0 -650
  173. package/external/@socketsecurity/registry/lib/constants/abort-controller.js +0 -15
  174. package/external/@socketsecurity/registry/lib/constants/abort-signal.js +0 -27
  175. package/external/@socketsecurity/registry/lib/constants/at-latest.js +0 -3
  176. package/external/@socketsecurity/registry/lib/constants/biome-json.js +0 -3
  177. package/external/@socketsecurity/registry/lib/constants/bun-lock.js +0 -3
  178. package/external/@socketsecurity/registry/lib/constants/bun-lockb.js +0 -3
  179. package/external/@socketsecurity/registry/lib/constants/bun.js +0 -3
  180. package/external/@socketsecurity/registry/lib/constants/ci.js +0 -3
  181. package/external/@socketsecurity/registry/lib/constants/column-limit.js +0 -3
  182. package/external/@socketsecurity/registry/lib/constants/copy-left-licenses.js +0 -27
  183. package/external/@socketsecurity/registry/lib/constants/darwin.js +0 -3
  184. package/external/@socketsecurity/registry/lib/constants/dot-git-dir.js +0 -3
  185. package/external/@socketsecurity/registry/lib/constants/dot-package-lock-json.js +0 -3
  186. package/external/@socketsecurity/registry/lib/constants/dot-socket-dir.js +0 -3
  187. package/external/@socketsecurity/registry/lib/constants/empty-file.js +0 -3
  188. package/external/@socketsecurity/registry/lib/constants/empty-value.js +0 -3
  189. package/external/@socketsecurity/registry/lib/constants/env.js +0 -59
  190. package/external/@socketsecurity/registry/lib/constants/eslint-config-js.js +0 -3
  191. package/external/@socketsecurity/registry/lib/constants/esnext.js +0 -3
  192. package/external/@socketsecurity/registry/lib/constants/exec-path.js +0 -3
  193. package/external/@socketsecurity/registry/lib/constants/ext-cjs.js +0 -3
  194. package/external/@socketsecurity/registry/lib/constants/ext-cmd.js +0 -3
  195. package/external/@socketsecurity/registry/lib/constants/ext-cts.js +0 -3
  196. package/external/@socketsecurity/registry/lib/constants/ext-dts.js +0 -3
  197. package/external/@socketsecurity/registry/lib/constants/ext-js.js +0 -3
  198. package/external/@socketsecurity/registry/lib/constants/ext-json.js +0 -3
  199. package/external/@socketsecurity/registry/lib/constants/ext-lock.js +0 -3
  200. package/external/@socketsecurity/registry/lib/constants/ext-lockb.js +0 -3
  201. package/external/@socketsecurity/registry/lib/constants/ext-md.js +0 -3
  202. package/external/@socketsecurity/registry/lib/constants/ext-mjs.js +0 -3
  203. package/external/@socketsecurity/registry/lib/constants/ext-mts.js +0 -3
  204. package/external/@socketsecurity/registry/lib/constants/ext-ps1.js +0 -3
  205. package/external/@socketsecurity/registry/lib/constants/ext-yaml.js +0 -3
  206. package/external/@socketsecurity/registry/lib/constants/ext-yml.js +0 -3
  207. package/external/@socketsecurity/registry/lib/constants/extensions-json.js +0 -3
  208. package/external/@socketsecurity/registry/lib/constants/extensions.js +0 -3
  209. package/external/@socketsecurity/registry/lib/constants/get-ipc.js +0 -10
  210. package/external/@socketsecurity/registry/lib/constants/gitignore.js +0 -3
  211. package/external/@socketsecurity/registry/lib/constants/index.js +0 -139
  212. package/external/@socketsecurity/registry/lib/constants/ipc-handler.js +0 -19
  213. package/external/@socketsecurity/registry/lib/constants/ipc-object.js +0 -6
  214. package/external/@socketsecurity/registry/lib/constants/ipc-promise.js +0 -47
  215. package/external/@socketsecurity/registry/lib/constants/ipc-target.js +0 -3
  216. package/external/@socketsecurity/registry/lib/constants/k-internals-symbol.js +0 -3
  217. package/external/@socketsecurity/registry/lib/constants/latest.js +0 -3
  218. package/external/@socketsecurity/registry/lib/constants/license-glob-recursive.js +0 -3
  219. package/external/@socketsecurity/registry/lib/constants/license-glob.js +0 -3
  220. package/external/@socketsecurity/registry/lib/constants/license-original-glob-recursive.js +0 -3
  221. package/external/@socketsecurity/registry/lib/constants/license-original-glob.js +0 -3
  222. package/external/@socketsecurity/registry/lib/constants/license-original.js +0 -3
  223. package/external/@socketsecurity/registry/lib/constants/license.js +0 -3
  224. package/external/@socketsecurity/registry/lib/constants/lifecycle-script-names.js +0 -18
  225. package/external/@socketsecurity/registry/lib/constants/loop-sentinel.js +0 -3
  226. package/external/@socketsecurity/registry/lib/constants/maintained-node-versions.js +0 -47
  227. package/external/@socketsecurity/registry/lib/constants/manifest-json.js +0 -3
  228. package/external/@socketsecurity/registry/lib/constants/mit.js +0 -3
  229. package/external/@socketsecurity/registry/lib/constants/node-auth-token.js +0 -3
  230. package/external/@socketsecurity/registry/lib/constants/node-debug-flags.js +0 -9
  231. package/external/@socketsecurity/registry/lib/constants/node-env.js +0 -3
  232. package/external/@socketsecurity/registry/lib/constants/node-harden-flags.js +0 -29
  233. package/external/@socketsecurity/registry/lib/constants/node-modules-glob-recursive.js +0 -3
  234. package/external/@socketsecurity/registry/lib/constants/node-modules.js +0 -3
  235. package/external/@socketsecurity/registry/lib/constants/node-no-warnings-flags.js +0 -16
  236. package/external/@socketsecurity/registry/lib/constants/node-version.js +0 -3
  237. package/external/@socketsecurity/registry/lib/constants/npm-exec-path.js +0 -5
  238. package/external/@socketsecurity/registry/lib/constants/npm-real-exec-path.js +0 -6
  239. package/external/@socketsecurity/registry/lib/constants/npm-shrinkwrap-json.js +0 -3
  240. package/external/@socketsecurity/registry/lib/constants/npm.js +0 -3
  241. package/external/@socketsecurity/registry/lib/constants/npx.js +0 -3
  242. package/external/@socketsecurity/registry/lib/constants/overrides.js +0 -3
  243. package/external/@socketsecurity/registry/lib/constants/package-default-node-range.js +0 -6
  244. package/external/@socketsecurity/registry/lib/constants/package-default-socket-categories.js +0 -3
  245. package/external/@socketsecurity/registry/lib/constants/package-default-version.js +0 -3
  246. package/external/@socketsecurity/registry/lib/constants/package-extensions.js +0 -47
  247. package/external/@socketsecurity/registry/lib/constants/package-json.js +0 -3
  248. package/external/@socketsecurity/registry/lib/constants/package-lock-json.js +0 -3
  249. package/external/@socketsecurity/registry/lib/constants/packument-cache.js +0 -3
  250. package/external/@socketsecurity/registry/lib/constants/pacote-cache-path.js +0 -9
  251. package/external/@socketsecurity/registry/lib/constants/pnpm-exec-path.js +0 -5
  252. package/external/@socketsecurity/registry/lib/constants/pnpm-lock-yaml.js +0 -3
  253. package/external/@socketsecurity/registry/lib/constants/pnpm.js +0 -3
  254. package/external/@socketsecurity/registry/lib/constants/pre-commit.js +0 -3
  255. package/external/@socketsecurity/registry/lib/constants/readme-glob-recursive.js +0 -3
  256. package/external/@socketsecurity/registry/lib/constants/readme-glob.js +0 -3
  257. package/external/@socketsecurity/registry/lib/constants/readme-md.js +0 -3
  258. package/external/@socketsecurity/registry/lib/constants/registry-scope-delimiter.js +0 -3
  259. package/external/@socketsecurity/registry/lib/constants/registry.js +0 -3
  260. package/external/@socketsecurity/registry/lib/constants/resolutions.js +0 -3
  261. package/external/@socketsecurity/registry/lib/constants/socket-github-org.js +0 -3
  262. package/external/@socketsecurity/registry/lib/constants/socket-ipc-handshake.js +0 -3
  263. package/external/@socketsecurity/registry/lib/constants/socket-override-scope.js +0 -3
  264. package/external/@socketsecurity/registry/lib/constants/socket-public-api-token.js +0 -3
  265. package/external/@socketsecurity/registry/lib/constants/socket-registry-npm-org.js +0 -3
  266. package/external/@socketsecurity/registry/lib/constants/socket-registry-package-name.js +0 -3
  267. package/external/@socketsecurity/registry/lib/constants/socket-registry-repo-name.js +0 -3
  268. package/external/@socketsecurity/registry/lib/constants/socket-registry-scope.js +0 -3
  269. package/external/@socketsecurity/registry/lib/constants/socket-security-scope.js +0 -3
  270. package/external/@socketsecurity/registry/lib/constants/spinner.js +0 -4
  271. package/external/@socketsecurity/registry/lib/constants/supports-node-compile-cache-api.js +0 -8
  272. package/external/@socketsecurity/registry/lib/constants/supports-node-compile-cache-env-var.js +0 -8
  273. package/external/@socketsecurity/registry/lib/constants/supports-node-disable-warning-flag.js +0 -8
  274. package/external/@socketsecurity/registry/lib/constants/supports-node-permission-flag.js +0 -8
  275. package/external/@socketsecurity/registry/lib/constants/supports-node-require-module.js +0 -3
  276. package/external/@socketsecurity/registry/lib/constants/supports-node-run.js +0 -8
  277. package/external/@socketsecurity/registry/lib/constants/supports-process-send.js +0 -5
  278. package/external/@socketsecurity/registry/lib/constants/ts-libs-available.js +0 -22
  279. package/external/@socketsecurity/registry/lib/constants/ts-types-available.js +0 -3
  280. package/external/@socketsecurity/registry/lib/constants/tsconfig-json.js +0 -3
  281. package/external/@socketsecurity/registry/lib/constants/undefined-token.js +0 -3
  282. package/external/@socketsecurity/registry/lib/constants/unknown-error.js +0 -3
  283. package/external/@socketsecurity/registry/lib/constants/unknown-value.js +0 -3
  284. package/external/@socketsecurity/registry/lib/constants/unlicenced.js +0 -3
  285. package/external/@socketsecurity/registry/lib/constants/unlicensed.js +0 -3
  286. package/external/@socketsecurity/registry/lib/constants/utf8.js +0 -3
  287. package/external/@socketsecurity/registry/lib/constants/vitest.js +0 -3
  288. package/external/@socketsecurity/registry/lib/constants/vlt-lock-json.js +0 -3
  289. package/external/@socketsecurity/registry/lib/constants/vlt.js +0 -3
  290. package/external/@socketsecurity/registry/lib/constants/win32.js +0 -3
  291. package/external/@socketsecurity/registry/lib/constants/yarn-berry.js +0 -3
  292. package/external/@socketsecurity/registry/lib/constants/yarn-classic.js +0 -3
  293. package/external/@socketsecurity/registry/lib/constants/yarn-exec-path.js +0 -5
  294. package/external/@socketsecurity/registry/lib/constants/yarn-lock.js +0 -3
  295. package/external/@socketsecurity/registry/lib/constants/yarn.js +0 -3
  296. package/external/@socketsecurity/registry/lib/debug.js +0 -264
  297. package/external/@socketsecurity/registry/lib/env.js +0 -62
  298. package/external/@socketsecurity/registry/lib/fs.js +0 -556
  299. package/external/@socketsecurity/registry/lib/functions.js +0 -20
  300. package/external/@socketsecurity/registry/lib/globs.js +0 -145
  301. package/external/@socketsecurity/registry/lib/json.js +0 -69
  302. package/external/@socketsecurity/registry/lib/logger.js +0 -534
  303. package/external/@socketsecurity/registry/lib/objects.js +0 -422
  304. package/external/@socketsecurity/registry/lib/packages.js +0 -1379
  305. package/external/@socketsecurity/registry/lib/path.js +0 -231
  306. package/external/@socketsecurity/registry/lib/promises.js +0 -286
  307. package/external/@socketsecurity/registry/lib/prompts.js +0 -63
  308. package/external/@socketsecurity/registry/lib/regexps.js +0 -23
  309. package/external/@socketsecurity/registry/lib/sorts.js +0 -70
  310. package/external/@socketsecurity/registry/lib/spawn.js +0 -252
  311. package/external/@socketsecurity/registry/lib/spinner.js +0 -205
  312. package/external/@socketsecurity/registry/lib/streams.js +0 -84
  313. package/external/@socketsecurity/registry/lib/strings.js +0 -235
  314. package/external/@socketsecurity/registry/lib/url.js +0 -68
  315. package/external/@socketsecurity/registry/lib/words.js +0 -45
  316. package/external/@socketsecurity/registry/manifest.json +0 -1875
@@ -1,1457 +0,0 @@
1
- 'use strict'
2
-
3
- const require$$1$1 = [
4
- '0BSD',
5
- '3D-Slicer-1.0',
6
- 'AAL',
7
- 'ADSL',
8
- 'AFL-1.1',
9
- 'AFL-1.2',
10
- 'AFL-2.0',
11
- 'AFL-2.1',
12
- 'AFL-3.0',
13
- 'AGPL-1.0-only',
14
- 'AGPL-1.0-or-later',
15
- 'AGPL-3.0-only',
16
- 'AGPL-3.0-or-later',
17
- 'AMD-newlib',
18
- 'AMDPLPA',
19
- 'AML',
20
- 'AML-glslang',
21
- 'AMPAS',
22
- 'ANTLR-PD',
23
- 'ANTLR-PD-fallback',
24
- 'APAFML',
25
- 'APL-1.0',
26
- 'APSL-1.0',
27
- 'APSL-1.1',
28
- 'APSL-1.2',
29
- 'APSL-2.0',
30
- 'ASWF-Digital-Assets-1.0',
31
- 'ASWF-Digital-Assets-1.1',
32
- 'Abstyles',
33
- 'AdaCore-doc',
34
- 'Adobe-2006',
35
- 'Adobe-Display-PostScript',
36
- 'Adobe-Glyph',
37
- 'Adobe-Utopia',
38
- 'Afmparse',
39
- 'Aladdin',
40
- 'Apache-1.0',
41
- 'Apache-1.1',
42
- 'Apache-2.0',
43
- 'App-s2p',
44
- 'Arphic-1999',
45
- 'Artistic-1.0',
46
- 'Artistic-1.0-Perl',
47
- 'Artistic-1.0-cl8',
48
- 'Artistic-2.0',
49
- 'Artistic-dist',
50
- 'Aspell-RU',
51
- 'BSD-1-Clause',
52
- 'BSD-2-Clause',
53
- 'BSD-2-Clause-Darwin',
54
- 'BSD-2-Clause-Patent',
55
- 'BSD-2-Clause-Views',
56
- 'BSD-2-Clause-first-lines',
57
- 'BSD-2-Clause-pkgconf-disclaimer',
58
- 'BSD-3-Clause',
59
- 'BSD-3-Clause-Attribution',
60
- 'BSD-3-Clause-Clear',
61
- 'BSD-3-Clause-HP',
62
- 'BSD-3-Clause-LBNL',
63
- 'BSD-3-Clause-Modification',
64
- 'BSD-3-Clause-No-Military-License',
65
- 'BSD-3-Clause-No-Nuclear-License',
66
- 'BSD-3-Clause-No-Nuclear-License-2014',
67
- 'BSD-3-Clause-No-Nuclear-Warranty',
68
- 'BSD-3-Clause-Open-MPI',
69
- 'BSD-3-Clause-Sun',
70
- 'BSD-3-Clause-acpica',
71
- 'BSD-3-Clause-flex',
72
- 'BSD-4-Clause',
73
- 'BSD-4-Clause-Shortened',
74
- 'BSD-4-Clause-UC',
75
- 'BSD-4.3RENO',
76
- 'BSD-4.3TAHOE',
77
- 'BSD-Advertising-Acknowledgement',
78
- 'BSD-Attribution-HPND-disclaimer',
79
- 'BSD-Inferno-Nettverk',
80
- 'BSD-Protection',
81
- 'BSD-Source-Code',
82
- 'BSD-Source-beginning-file',
83
- 'BSD-Systemics',
84
- 'BSD-Systemics-W3Works',
85
- 'BSL-1.0',
86
- 'BUSL-1.1',
87
- 'Baekmuk',
88
- 'Bahyph',
89
- 'Barr',
90
- 'Beerware',
91
- 'BitTorrent-1.0',
92
- 'BitTorrent-1.1',
93
- 'Bitstream-Charter',
94
- 'Bitstream-Vera',
95
- 'BlueOak-1.0.0',
96
- 'Boehm-GC',
97
- 'Boehm-GC-without-fee',
98
- 'Borceux',
99
- 'Brian-Gladman-2-Clause',
100
- 'Brian-Gladman-3-Clause',
101
- 'C-UDA-1.0',
102
- 'CAL-1.0',
103
- 'CAL-1.0-Combined-Work-Exception',
104
- 'CATOSL-1.1',
105
- 'CC-BY-1.0',
106
- 'CC-BY-2.0',
107
- 'CC-BY-2.5',
108
- 'CC-BY-2.5-AU',
109
- 'CC-BY-3.0',
110
- 'CC-BY-3.0-AT',
111
- 'CC-BY-3.0-AU',
112
- 'CC-BY-3.0-DE',
113
- 'CC-BY-3.0-IGO',
114
- 'CC-BY-3.0-NL',
115
- 'CC-BY-3.0-US',
116
- 'CC-BY-4.0',
117
- 'CC-BY-NC-1.0',
118
- 'CC-BY-NC-2.0',
119
- 'CC-BY-NC-2.5',
120
- 'CC-BY-NC-3.0',
121
- 'CC-BY-NC-3.0-DE',
122
- 'CC-BY-NC-4.0',
123
- 'CC-BY-NC-ND-1.0',
124
- 'CC-BY-NC-ND-2.0',
125
- 'CC-BY-NC-ND-2.5',
126
- 'CC-BY-NC-ND-3.0',
127
- 'CC-BY-NC-ND-3.0-DE',
128
- 'CC-BY-NC-ND-3.0-IGO',
129
- 'CC-BY-NC-ND-4.0',
130
- 'CC-BY-NC-SA-1.0',
131
- 'CC-BY-NC-SA-2.0',
132
- 'CC-BY-NC-SA-2.0-DE',
133
- 'CC-BY-NC-SA-2.0-FR',
134
- 'CC-BY-NC-SA-2.0-UK',
135
- 'CC-BY-NC-SA-2.5',
136
- 'CC-BY-NC-SA-3.0',
137
- 'CC-BY-NC-SA-3.0-DE',
138
- 'CC-BY-NC-SA-3.0-IGO',
139
- 'CC-BY-NC-SA-4.0',
140
- 'CC-BY-ND-1.0',
141
- 'CC-BY-ND-2.0',
142
- 'CC-BY-ND-2.5',
143
- 'CC-BY-ND-3.0',
144
- 'CC-BY-ND-3.0-DE',
145
- 'CC-BY-ND-4.0',
146
- 'CC-BY-SA-1.0',
147
- 'CC-BY-SA-2.0',
148
- 'CC-BY-SA-2.0-UK',
149
- 'CC-BY-SA-2.1-JP',
150
- 'CC-BY-SA-2.5',
151
- 'CC-BY-SA-3.0',
152
- 'CC-BY-SA-3.0-AT',
153
- 'CC-BY-SA-3.0-DE',
154
- 'CC-BY-SA-3.0-IGO',
155
- 'CC-BY-SA-4.0',
156
- 'CC-PDDC',
157
- 'CC-PDM-1.0',
158
- 'CC-SA-1.0',
159
- 'CC0-1.0',
160
- 'CDDL-1.0',
161
- 'CDDL-1.1',
162
- 'CDL-1.0',
163
- 'CDLA-Permissive-1.0',
164
- 'CDLA-Permissive-2.0',
165
- 'CDLA-Sharing-1.0',
166
- 'CECILL-1.0',
167
- 'CECILL-1.1',
168
- 'CECILL-2.0',
169
- 'CECILL-2.1',
170
- 'CECILL-B',
171
- 'CECILL-C',
172
- 'CERN-OHL-1.1',
173
- 'CERN-OHL-1.2',
174
- 'CERN-OHL-P-2.0',
175
- 'CERN-OHL-S-2.0',
176
- 'CERN-OHL-W-2.0',
177
- 'CFITSIO',
178
- 'CMU-Mach',
179
- 'CMU-Mach-nodoc',
180
- 'CNRI-Jython',
181
- 'CNRI-Python',
182
- 'CNRI-Python-GPL-Compatible',
183
- 'COIL-1.0',
184
- 'CPAL-1.0',
185
- 'CPL-1.0',
186
- 'CPOL-1.02',
187
- 'CUA-OPL-1.0',
188
- 'Caldera',
189
- 'Caldera-no-preamble',
190
- 'Catharon',
191
- 'ClArtistic',
192
- 'Clips',
193
- 'Community-Spec-1.0',
194
- 'Condor-1.1',
195
- 'Cornell-Lossless-JPEG',
196
- 'Cronyx',
197
- 'Crossword',
198
- 'CryptoSwift',
199
- 'CrystalStacker',
200
- 'Cube',
201
- 'D-FSL-1.0',
202
- 'DEC-3-Clause',
203
- 'DL-DE-BY-2.0',
204
- 'DL-DE-ZERO-2.0',
205
- 'DOC',
206
- 'DRL-1.0',
207
- 'DRL-1.1',
208
- 'DSDP',
209
- 'DocBook-DTD',
210
- 'DocBook-Schema',
211
- 'DocBook-Stylesheet',
212
- 'DocBook-XML',
213
- 'Dotseqn',
214
- 'ECL-1.0',
215
- 'ECL-2.0',
216
- 'EFL-1.0',
217
- 'EFL-2.0',
218
- 'EPICS',
219
- 'EPL-1.0',
220
- 'EPL-2.0',
221
- 'EUDatagrid',
222
- 'EUPL-1.0',
223
- 'EUPL-1.1',
224
- 'EUPL-1.2',
225
- 'Elastic-2.0',
226
- 'Entessa',
227
- 'ErlPL-1.1',
228
- 'Eurosym',
229
- 'FBM',
230
- 'FDK-AAC',
231
- 'FSFAP',
232
- 'FSFAP-no-warranty-disclaimer',
233
- 'FSFUL',
234
- 'FSFULLR',
235
- 'FSFULLRSD',
236
- 'FSFULLRWD',
237
- 'FSL-1.1-ALv2',
238
- 'FSL-1.1-MIT',
239
- 'FTL',
240
- 'Fair',
241
- 'Ferguson-Twofish',
242
- 'Frameworx-1.0',
243
- 'FreeBSD-DOC',
244
- 'FreeImage',
245
- 'Furuseth',
246
- 'GCR-docs',
247
- 'GD',
248
- 'GFDL-1.1-invariants-only',
249
- 'GFDL-1.1-invariants-or-later',
250
- 'GFDL-1.1-no-invariants-only',
251
- 'GFDL-1.1-no-invariants-or-later',
252
- 'GFDL-1.1-only',
253
- 'GFDL-1.1-or-later',
254
- 'GFDL-1.2-invariants-only',
255
- 'GFDL-1.2-invariants-or-later',
256
- 'GFDL-1.2-no-invariants-only',
257
- 'GFDL-1.2-no-invariants-or-later',
258
- 'GFDL-1.2-only',
259
- 'GFDL-1.2-or-later',
260
- 'GFDL-1.3-invariants-only',
261
- 'GFDL-1.3-invariants-or-later',
262
- 'GFDL-1.3-no-invariants-only',
263
- 'GFDL-1.3-no-invariants-or-later',
264
- 'GFDL-1.3-only',
265
- 'GFDL-1.3-or-later',
266
- 'GL2PS',
267
- 'GLWTPL',
268
- 'GPL-1.0-only',
269
- 'GPL-1.0-or-later',
270
- 'GPL-2.0-only',
271
- 'GPL-2.0-or-later',
272
- 'GPL-3.0-only',
273
- 'GPL-3.0-or-later',
274
- 'Game-Programming-Gems',
275
- 'Giftware',
276
- 'Glide',
277
- 'Glulxe',
278
- 'Graphics-Gems',
279
- 'Gutmann',
280
- 'HDF5',
281
- 'HIDAPI',
282
- 'HP-1986',
283
- 'HP-1989',
284
- 'HPND',
285
- 'HPND-DEC',
286
- 'HPND-Fenneberg-Livingston',
287
- 'HPND-INRIA-IMAG',
288
- 'HPND-Intel',
289
- 'HPND-Kevlin-Henney',
290
- 'HPND-MIT-disclaimer',
291
- 'HPND-Markus-Kuhn',
292
- 'HPND-Netrek',
293
- 'HPND-Pbmplus',
294
- 'HPND-UC',
295
- 'HPND-UC-export-US',
296
- 'HPND-doc',
297
- 'HPND-doc-sell',
298
- 'HPND-export-US',
299
- 'HPND-export-US-acknowledgement',
300
- 'HPND-export-US-modify',
301
- 'HPND-export2-US',
302
- 'HPND-merchantability-variant',
303
- 'HPND-sell-MIT-disclaimer-xserver',
304
- 'HPND-sell-regexpr',
305
- 'HPND-sell-variant',
306
- 'HPND-sell-variant-MIT-disclaimer',
307
- 'HPND-sell-variant-MIT-disclaimer-rev',
308
- 'HTMLTIDY',
309
- 'HaskellReport',
310
- 'Hippocratic-2.1',
311
- 'IBM-pibs',
312
- 'ICU',
313
- 'IEC-Code-Components-EULA',
314
- 'IJG',
315
- 'IJG-short',
316
- 'IPA',
317
- 'IPL-1.0',
318
- 'ISC',
319
- 'ISC-Veillard',
320
- 'ImageMagick',
321
- 'Imlib2',
322
- 'Info-ZIP',
323
- 'Inner-Net-2.0',
324
- 'InnoSetup',
325
- 'Intel',
326
- 'Intel-ACPI',
327
- 'Interbase-1.0',
328
- 'JPL-image',
329
- 'JPNIC',
330
- 'JSON',
331
- 'Jam',
332
- 'JasPer-2.0',
333
- 'Kastrup',
334
- 'Kazlib',
335
- 'Knuth-CTAN',
336
- 'LAL-1.2',
337
- 'LAL-1.3',
338
- 'LGPL-2.0-only',
339
- 'LGPL-2.0-or-later',
340
- 'LGPL-2.1-only',
341
- 'LGPL-2.1-or-later',
342
- 'LGPL-3.0-only',
343
- 'LGPL-3.0-or-later',
344
- 'LGPLLR',
345
- 'LOOP',
346
- 'LPD-document',
347
- 'LPL-1.0',
348
- 'LPL-1.02',
349
- 'LPPL-1.0',
350
- 'LPPL-1.1',
351
- 'LPPL-1.2',
352
- 'LPPL-1.3a',
353
- 'LPPL-1.3c',
354
- 'LZMA-SDK-9.11-to-9.20',
355
- 'LZMA-SDK-9.22',
356
- 'Latex2e',
357
- 'Latex2e-translated-notice',
358
- 'Leptonica',
359
- 'LiLiQ-P-1.1',
360
- 'LiLiQ-R-1.1',
361
- 'LiLiQ-Rplus-1.1',
362
- 'Libpng',
363
- 'Linux-OpenIB',
364
- 'Linux-man-pages-1-para',
365
- 'Linux-man-pages-copyleft',
366
- 'Linux-man-pages-copyleft-2-para',
367
- 'Linux-man-pages-copyleft-var',
368
- 'Lucida-Bitmap-Fonts',
369
- 'MIPS',
370
- 'MIT',
371
- 'MIT-0',
372
- 'MIT-CMU',
373
- 'MIT-Click',
374
- 'MIT-Festival',
375
- 'MIT-Khronos-old',
376
- 'MIT-Modern-Variant',
377
- 'MIT-Wu',
378
- 'MIT-advertising',
379
- 'MIT-enna',
380
- 'MIT-feh',
381
- 'MIT-open-group',
382
- 'MIT-testregex',
383
- 'MITNFA',
384
- 'MMIXware',
385
- 'MPEG-SSG',
386
- 'MPL-1.0',
387
- 'MPL-1.1',
388
- 'MPL-2.0',
389
- 'MPL-2.0-no-copyleft-exception',
390
- 'MS-LPL',
391
- 'MS-PL',
392
- 'MS-RL',
393
- 'MTLL',
394
- 'Mackerras-3-Clause',
395
- 'Mackerras-3-Clause-acknowledgment',
396
- 'MakeIndex',
397
- 'Martin-Birgmeier',
398
- 'McPhee-slideshow',
399
- 'Minpack',
400
- 'MirOS',
401
- 'Motosoto',
402
- 'MulanPSL-1.0',
403
- 'MulanPSL-2.0',
404
- 'Multics',
405
- 'Mup',
406
- 'NAIST-2003',
407
- 'NASA-1.3',
408
- 'NBPL-1.0',
409
- 'NCBI-PD',
410
- 'NCGL-UK-2.0',
411
- 'NCL',
412
- 'NCSA',
413
- 'NGPL',
414
- 'NICTA-1.0',
415
- 'NIST-PD',
416
- 'NIST-PD-fallback',
417
- 'NIST-Software',
418
- 'NLOD-1.0',
419
- 'NLOD-2.0',
420
- 'NLPL',
421
- 'NOSL',
422
- 'NPL-1.0',
423
- 'NPL-1.1',
424
- 'NPOSL-3.0',
425
- 'NRL',
426
- 'NTIA-PD',
427
- 'NTP',
428
- 'NTP-0',
429
- 'Naumen',
430
- 'NetCDF',
431
- 'Newsletr',
432
- 'Nokia',
433
- 'Noweb',
434
- 'O-UDA-1.0',
435
- 'OAR',
436
- 'OCCT-PL',
437
- 'OCLC-2.0',
438
- 'ODC-By-1.0',
439
- 'ODbL-1.0',
440
- 'OFFIS',
441
- 'OFL-1.0',
442
- 'OFL-1.0-RFN',
443
- 'OFL-1.0-no-RFN',
444
- 'OFL-1.1',
445
- 'OFL-1.1-RFN',
446
- 'OFL-1.1-no-RFN',
447
- 'OGC-1.0',
448
- 'OGDL-Taiwan-1.0',
449
- 'OGL-Canada-2.0',
450
- 'OGL-UK-1.0',
451
- 'OGL-UK-2.0',
452
- 'OGL-UK-3.0',
453
- 'OGTSL',
454
- 'OLDAP-1.1',
455
- 'OLDAP-1.2',
456
- 'OLDAP-1.3',
457
- 'OLDAP-1.4',
458
- 'OLDAP-2.0',
459
- 'OLDAP-2.0.1',
460
- 'OLDAP-2.1',
461
- 'OLDAP-2.2',
462
- 'OLDAP-2.2.1',
463
- 'OLDAP-2.2.2',
464
- 'OLDAP-2.3',
465
- 'OLDAP-2.4',
466
- 'OLDAP-2.5',
467
- 'OLDAP-2.6',
468
- 'OLDAP-2.7',
469
- 'OLDAP-2.8',
470
- 'OLFL-1.3',
471
- 'OML',
472
- 'OPL-1.0',
473
- 'OPL-UK-3.0',
474
- 'OPUBL-1.0',
475
- 'OSET-PL-2.1',
476
- 'OSL-1.0',
477
- 'OSL-1.1',
478
- 'OSL-2.0',
479
- 'OSL-2.1',
480
- 'OSL-3.0',
481
- 'OpenPBS-2.3',
482
- 'OpenSSL',
483
- 'OpenSSL-standalone',
484
- 'OpenVision',
485
- 'PADL',
486
- 'PDDL-1.0',
487
- 'PHP-3.0',
488
- 'PHP-3.01',
489
- 'PPL',
490
- 'PSF-2.0',
491
- 'Parity-6.0.0',
492
- 'Parity-7.0.0',
493
- 'Pixar',
494
- 'Plexus',
495
- 'PolyForm-Noncommercial-1.0.0',
496
- 'PolyForm-Small-Business-1.0.0',
497
- 'PostgreSQL',
498
- 'Python-2.0',
499
- 'Python-2.0.1',
500
- 'QPL-1.0',
501
- 'QPL-1.0-INRIA-2004',
502
- 'Qhull',
503
- 'RHeCos-1.1',
504
- 'RPL-1.1',
505
- 'RPL-1.5',
506
- 'RPSL-1.0',
507
- 'RSA-MD',
508
- 'RSCPL',
509
- 'Rdisc',
510
- 'Ruby',
511
- 'Ruby-pty',
512
- 'SAX-PD',
513
- 'SAX-PD-2.0',
514
- 'SCEA',
515
- 'SGI-B-1.0',
516
- 'SGI-B-1.1',
517
- 'SGI-B-2.0',
518
- 'SGI-OpenGL',
519
- 'SGP4',
520
- 'SHL-0.5',
521
- 'SHL-0.51',
522
- 'SISSL',
523
- 'SISSL-1.2',
524
- 'SL',
525
- 'SMAIL-GPL',
526
- 'SMLNJ',
527
- 'SMPPL',
528
- 'SNIA',
529
- 'SOFA',
530
- 'SPL-1.0',
531
- 'SSH-OpenSSH',
532
- 'SSH-short',
533
- 'SSLeay-standalone',
534
- 'SSPL-1.0',
535
- 'SUL-1.0',
536
- 'SWL',
537
- 'Saxpath',
538
- 'SchemeReport',
539
- 'Sendmail',
540
- 'Sendmail-8.23',
541
- 'Sendmail-Open-Source-1.1',
542
- 'SimPL-2.0',
543
- 'Sleepycat',
544
- 'Soundex',
545
- 'Spencer-86',
546
- 'Spencer-94',
547
- 'Spencer-99',
548
- 'SugarCRM-1.1.3',
549
- 'Sun-PPP',
550
- 'Sun-PPP-2000',
551
- 'SunPro',
552
- 'Symlinks',
553
- 'TAPR-OHL-1.0',
554
- 'TCL',
555
- 'TCP-wrappers',
556
- 'TGPPL-1.0',
557
- 'TMate',
558
- 'TORQUE-1.1',
559
- 'TOSL',
560
- 'TPDL',
561
- 'TPL-1.0',
562
- 'TTWL',
563
- 'TTYP0',
564
- 'TU-Berlin-1.0',
565
- 'TU-Berlin-2.0',
566
- 'TermReadKey',
567
- 'ThirdEye',
568
- 'TrustedQSL',
569
- 'UCAR',
570
- 'UCL-1.0',
571
- 'UMich-Merit',
572
- 'UPL-1.0',
573
- 'URT-RLE',
574
- 'Ubuntu-font-1.0',
575
- 'Unicode-3.0',
576
- 'Unicode-DFS-2015',
577
- 'Unicode-DFS-2016',
578
- 'Unicode-TOU',
579
- 'UnixCrypt',
580
- 'Unlicense',
581
- 'Unlicense-libtelnet',
582
- 'Unlicense-libwhirlpool',
583
- 'VOSTROM',
584
- 'VSL-1.0',
585
- 'Vim',
586
- 'W3C',
587
- 'W3C-19980720',
588
- 'W3C-20150513',
589
- 'WTFPL',
590
- 'Watcom-1.0',
591
- 'Widget-Workshop',
592
- 'Wsuipa',
593
- 'X11',
594
- 'X11-distribute-modifications-variant',
595
- 'X11-swapped',
596
- 'XFree86-1.1',
597
- 'XSkat',
598
- 'Xdebug-1.03',
599
- 'Xerox',
600
- 'Xfig',
601
- 'Xnet',
602
- 'YPL-1.0',
603
- 'YPL-1.1',
604
- 'ZPL-1.1',
605
- 'ZPL-2.0',
606
- 'ZPL-2.1',
607
- 'Zed',
608
- 'Zeeff',
609
- 'Zend-2.0',
610
- 'Zimbra-1.3',
611
- 'Zimbra-1.4',
612
- 'Zlib',
613
- 'any-OSI',
614
- 'any-OSI-perl-modules',
615
- 'bcrypt-Solar-Designer',
616
- 'blessing',
617
- 'bzip2-1.0.6',
618
- 'check-cvs',
619
- 'checkmk',
620
- 'copyleft-next-0.3.0',
621
- 'copyleft-next-0.3.1',
622
- 'curl',
623
- 'cve-tou',
624
- 'diffmark',
625
- 'dtoa',
626
- 'dvipdfm',
627
- 'eGenix',
628
- 'etalab-2.0',
629
- 'fwlw',
630
- 'gSOAP-1.3b',
631
- 'generic-xts',
632
- 'gnuplot',
633
- 'gtkbook',
634
- 'hdparm',
635
- 'iMatix',
636
- 'jove',
637
- 'libpng-1.6.35',
638
- 'libpng-2.0',
639
- 'libselinux-1.0',
640
- 'libtiff',
641
- 'libutil-David-Nugent',
642
- 'lsof',
643
- 'magaz',
644
- 'mailprio',
645
- 'man2html',
646
- 'metamail',
647
- 'mpi-permissive',
648
- 'mpich2',
649
- 'mplus',
650
- 'ngrep',
651
- 'pkgconf',
652
- 'pnmstitch',
653
- 'psfrag',
654
- 'psutils',
655
- 'python-ldap',
656
- 'radvd',
657
- 'snprintf',
658
- 'softSurfer',
659
- 'ssh-keyscan',
660
- 'swrule',
661
- 'threeparttable',
662
- 'ulem',
663
- 'w3m',
664
- 'wwl',
665
- 'xinetd',
666
- 'xkeyboard-config-Zinoviev',
667
- 'xlock',
668
- 'xpp',
669
- 'xzoom',
670
- 'zlib-acknowledgement'
671
- ]
672
-
673
- const require$$1 = [
674
- 'AGPL-1.0',
675
- 'AGPL-3.0',
676
- 'BSD-2-Clause-FreeBSD',
677
- 'BSD-2-Clause-NetBSD',
678
- 'GFDL-1.1',
679
- 'GFDL-1.2',
680
- 'GFDL-1.3',
681
- 'GPL-1.0',
682
- 'GPL-2.0',
683
- 'GPL-2.0-with-GCC-exception',
684
- 'GPL-2.0-with-autoconf-exception',
685
- 'GPL-2.0-with-bison-exception',
686
- 'GPL-2.0-with-classpath-exception',
687
- 'GPL-2.0-with-font-exception',
688
- 'GPL-3.0',
689
- 'GPL-3.0-with-GCC-exception',
690
- 'GPL-3.0-with-autoconf-exception',
691
- 'LGPL-2.0',
692
- 'LGPL-2.1',
693
- 'LGPL-3.0',
694
- 'Net-SNMP',
695
- 'Nunit',
696
- 'StandardML-NJ',
697
- 'bzip2-1.0.5',
698
- 'eCos-2.0',
699
- 'wxWindows'
700
- ]
701
-
702
- const require$$2 = [
703
- '389-exception',
704
- 'Asterisk-exception',
705
- 'Autoconf-exception-2.0',
706
- 'Autoconf-exception-3.0',
707
- 'Autoconf-exception-generic',
708
- 'Autoconf-exception-generic-3.0',
709
- 'Autoconf-exception-macro',
710
- 'Bison-exception-1.24',
711
- 'Bison-exception-2.2',
712
- 'Bootloader-exception',
713
- 'Classpath-exception-2.0',
714
- 'CLISP-exception-2.0',
715
- 'cryptsetup-OpenSSL-exception',
716
- 'DigiRule-FOSS-exception',
717
- 'eCos-exception-2.0',
718
- 'Fawkes-Runtime-exception',
719
- 'FLTK-exception',
720
- 'fmt-exception',
721
- 'Font-exception-2.0',
722
- 'freertos-exception-2.0',
723
- 'GCC-exception-2.0',
724
- 'GCC-exception-2.0-note',
725
- 'GCC-exception-3.1',
726
- 'Gmsh-exception',
727
- 'GNAT-exception',
728
- 'GNOME-examples-exception',
729
- 'GNU-compiler-exception',
730
- 'gnu-javamail-exception',
731
- 'GPL-3.0-interface-exception',
732
- 'GPL-3.0-linking-exception',
733
- 'GPL-3.0-linking-source-exception',
734
- 'GPL-CC-1.0',
735
- 'GStreamer-exception-2005',
736
- 'GStreamer-exception-2008',
737
- 'i2p-gpl-java-exception',
738
- 'KiCad-libraries-exception',
739
- 'LGPL-3.0-linking-exception',
740
- 'libpri-OpenH323-exception',
741
- 'Libtool-exception',
742
- 'Linux-syscall-note',
743
- 'LLGPL',
744
- 'LLVM-exception',
745
- 'LZMA-exception',
746
- 'mif-exception',
747
- 'OCaml-LGPL-linking-exception',
748
- 'OCCT-exception-1.0',
749
- 'OpenJDK-assembly-exception-1.0',
750
- 'openvpn-openssl-exception',
751
- 'PS-or-PDF-font-exception-20170817',
752
- 'QPL-1.0-INRIA-2004-exception',
753
- 'Qt-GPL-exception-1.0',
754
- 'Qt-LGPL-exception-1.1',
755
- 'Qwt-exception-1.0',
756
- 'SANE-exception',
757
- 'SHL-2.0',
758
- 'SHL-2.1',
759
- 'stunnel-exception',
760
- 'SWI-exception',
761
- 'Swift-exception',
762
- 'Texinfo-exception',
763
- 'u-boot-exception-2.0',
764
- 'UBDL-exception',
765
- 'Universal-FOSS-exception-1.0',
766
- 'vsftpd-openssl-exception',
767
- 'WxWindows-exception-3.1',
768
- 'x11vnc-openssl-exception'
769
- ]
770
-
771
- let scan
772
- let hasRequiredScan
773
- function requireScan() {
774
- if (hasRequiredScan) {
775
- return scan
776
- }
777
- hasRequiredScan = 1
778
- const licenses = [].concat(require$$1$1).concat(require$$1)
779
- const exceptions = require$$2
780
- scan = function (source) {
781
- let index = 0
782
- function hasMore() {
783
- return index < source.length
784
- }
785
-
786
- // `value` can be a regexp or a string.
787
- // If it is recognized, the matching source string is returned and
788
- // the index is incremented. Otherwise `undefined` is returned.
789
- function read(value) {
790
- if (value instanceof RegExp) {
791
- const chars = source.slice(index)
792
- const match = chars.match(value)
793
- if (match) {
794
- index += match[0].length
795
- return match[0]
796
- }
797
- } else {
798
- if (source.indexOf(value, index) === index) {
799
- index += value.length
800
- return value
801
- }
802
- }
803
- }
804
- function skipWhitespace() {
805
- read(/[ ]*/)
806
- }
807
- function operator() {
808
- let string
809
- const possibilities = ['WITH', 'AND', 'OR', '(', ')', ':', '+']
810
- for (let i = 0; i < possibilities.length; i++) {
811
- string = read(possibilities[i])
812
- if (string) {
813
- break
814
- }
815
- }
816
- if (string === '+' && index > 1 && source[index - 2] === ' ') {
817
- throw new Error('Space before `+`')
818
- }
819
- return (
820
- string && {
821
- type: 'OPERATOR',
822
- string: string
823
- }
824
- )
825
- }
826
- function idstring() {
827
- return read(/[A-Za-z0-9-.]+/)
828
- }
829
- function expectIdstring() {
830
- const string = idstring()
831
- if (!string) {
832
- throw new Error('Expected idstring at offset ' + index)
833
- }
834
- return string
835
- }
836
- function documentRef() {
837
- if (read('DocumentRef-')) {
838
- const string = expectIdstring()
839
- return {
840
- type: 'DOCUMENTREF',
841
- string: string
842
- }
843
- }
844
- }
845
- function licenseRef() {
846
- if (read('LicenseRef-')) {
847
- const string = expectIdstring()
848
- return {
849
- type: 'LICENSEREF',
850
- string: string
851
- }
852
- }
853
- }
854
- function identifier() {
855
- const begin = index
856
- const string = idstring()
857
- if (licenses.indexOf(string) !== -1) {
858
- return {
859
- type: 'LICENSE',
860
- string: string
861
- }
862
- } else if (exceptions.indexOf(string) !== -1) {
863
- return {
864
- type: 'EXCEPTION',
865
- string: string
866
- }
867
- }
868
- index = begin
869
- }
870
-
871
- // Tries to read the next token. Returns `undefined` if no token is
872
- // recognized.
873
- function parseToken() {
874
- // Ordering matters
875
- return operator() || documentRef() || licenseRef() || identifier()
876
- }
877
- const tokens = []
878
- while (hasMore()) {
879
- skipWhitespace()
880
- if (!hasMore()) {
881
- break
882
- }
883
- const token = parseToken()
884
- if (!token) {
885
- throw new Error('Unexpected `' + source[index] + '` at offset ' + index)
886
- }
887
- tokens.push(token)
888
- }
889
- return tokens
890
- }
891
- return scan
892
- }
893
-
894
- let parse
895
- let hasRequiredParse
896
- function requireParse() {
897
- if (hasRequiredParse) {
898
- return parse
899
- }
900
- hasRequiredParse = 1
901
-
902
- // The ABNF grammar in the spec is totally ambiguous.
903
- //
904
- // This parser follows the operator precedence defined in the
905
- // `Order of Precedence and Parentheses` section.
906
-
907
- parse = function (tokens) {
908
- let index = 0
909
- function hasMore() {
910
- return index < tokens.length
911
- }
912
- function token() {
913
- return hasMore() ? tokens[index] : null
914
- }
915
- function next() {
916
- if (!hasMore()) {
917
- throw new Error()
918
- }
919
- index++
920
- }
921
- function parseOperator(operator) {
922
- const t = token()
923
- if (t && t.type === 'OPERATOR' && operator === t.string) {
924
- next()
925
- return t.string
926
- }
927
- }
928
- function parseWith() {
929
- if (parseOperator('WITH')) {
930
- const t = token()
931
- if (t && t.type === 'EXCEPTION') {
932
- next()
933
- return t.string
934
- }
935
- throw new Error('Expected exception after `WITH`')
936
- }
937
- }
938
- function parseLicenseRef() {
939
- // TODO: Actually, everything is concatenated into one string
940
- // for backward-compatibility but it could be better to return
941
- // a nice structure.
942
- const begin = index
943
- let string = ''
944
- let t = token()
945
- if (t.type === 'DOCUMENTREF') {
946
- next()
947
- string += 'DocumentRef-' + t.string + ':'
948
- if (!parseOperator(':')) {
949
- throw new Error('Expected `:` after `DocumentRef-...`')
950
- }
951
- }
952
- t = token()
953
- if (t.type === 'LICENSEREF') {
954
- next()
955
- string += 'LicenseRef-' + t.string
956
- return {
957
- license: string
958
- }
959
- }
960
- index = begin
961
- }
962
- function parseLicense() {
963
- const t = token()
964
- if (t && t.type === 'LICENSE') {
965
- next()
966
- const node = {
967
- license: t.string
968
- }
969
- if (parseOperator('+')) {
970
- node.plus = true
971
- }
972
- const exception = parseWith()
973
- if (exception) {
974
- node.exception = exception
975
- }
976
- return node
977
- }
978
- }
979
- function parseParenthesizedExpression() {
980
- const left = parseOperator('(')
981
- if (!left) {
982
- return
983
- }
984
- const expr = parseExpression()
985
- if (!parseOperator(')')) {
986
- throw new Error('Expected `)`')
987
- }
988
- return expr
989
- }
990
- function parseAtom() {
991
- return (
992
- parseParenthesizedExpression() || parseLicenseRef() || parseLicense()
993
- )
994
- }
995
- function makeBinaryOpParser(operator, nextParser) {
996
- return function parseBinaryOp() {
997
- const left = nextParser()
998
- if (!left) {
999
- return
1000
- }
1001
- if (!parseOperator(operator)) {
1002
- return left
1003
- }
1004
- const right = parseBinaryOp()
1005
- if (!right) {
1006
- throw new Error('Expected expression')
1007
- }
1008
- return {
1009
- left: left,
1010
- conjunction: operator.toLowerCase(),
1011
- right: right
1012
- }
1013
- }
1014
- }
1015
- const parseAnd = makeBinaryOpParser('AND', parseAtom)
1016
- const parseExpression = makeBinaryOpParser('OR', parseAnd)
1017
- const node = parseExpression()
1018
- if (!node || hasMore()) {
1019
- throw new Error('Syntax error')
1020
- }
1021
- return node
1022
- }
1023
- return parse
1024
- }
1025
-
1026
- let spdxExpressionParse
1027
- let hasRequiredSpdxExpressionParse
1028
- function requireSpdxExpressionParse() {
1029
- if (hasRequiredSpdxExpressionParse) {
1030
- return spdxExpressionParse
1031
- }
1032
- hasRequiredSpdxExpressionParse = 1
1033
- const scan = requireScan()
1034
- const parse = requireParse()
1035
- spdxExpressionParse = function (source) {
1036
- return parse(scan(source))
1037
- }
1038
- return spdxExpressionParse
1039
- }
1040
-
1041
- /*
1042
- Copyright spdx-correct.js contributors
1043
-
1044
- Licensed under the Apache License, Version 2.0 (the "License");
1045
- you may not use this file except in compliance with the License.
1046
- You may obtain a copy of the License at
1047
-
1048
- http://www.apache.org/licenses/LICENSE-2.0
1049
-
1050
- Unless required by applicable law or agreed to in writing, software
1051
- distributed under the License is distributed on an "AS IS" BASIS,
1052
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1053
- See the License for the specific language governing permissions and
1054
- limitations under the License.
1055
- */
1056
- let spdxCorrect
1057
- let hasRequiredSpdxCorrect
1058
- function requireSpdxCorrect() {
1059
- if (hasRequiredSpdxCorrect) {
1060
- return spdxCorrect
1061
- }
1062
- hasRequiredSpdxCorrect = 1
1063
- const parse = requireSpdxExpressionParse()
1064
- const spdxLicenseIds = require$$1$1
1065
- function valid(string) {
1066
- try {
1067
- parse(string)
1068
- return true
1069
- } catch (error) {
1070
- return false
1071
- }
1072
- }
1073
-
1074
- // Sorting function that orders the given array of transpositions such
1075
- // that a transposition with the longer pattern comes before a transposition
1076
- // with a shorter pattern. This is to prevent e.g. the transposition
1077
- // ["General Public License", "GPL"] from matching to "Lesser General Public License"
1078
- // before a longer and more accurate transposition ["Lesser General Public License", "LGPL"]
1079
- // has a chance to be recognized.
1080
- function sortTranspositions(a, b) {
1081
- const length = b[0].length - a[0].length
1082
- if (length !== 0) {
1083
- return length
1084
- }
1085
- return a[0].toUpperCase().localeCompare(b[0].toUpperCase())
1086
- }
1087
-
1088
- // Common transpositions of license identifier acronyms
1089
- const transpositions = [
1090
- ['APGL', 'AGPL'],
1091
- ['Gpl', 'GPL'],
1092
- ['GLP', 'GPL'],
1093
- ['APL', 'Apache'],
1094
- ['ISD', 'ISC'],
1095
- ['GLP', 'GPL'],
1096
- ['IST', 'ISC'],
1097
- ['Claude', 'Clause'],
1098
- [' or later', '+'],
1099
- [' International', ''],
1100
- ['GNU', 'GPL'],
1101
- ['GUN', 'GPL'],
1102
- ['+', ''],
1103
- ['GNU GPL', 'GPL'],
1104
- ['GNU LGPL', 'LGPL'],
1105
- ['GNU/GPL', 'GPL'],
1106
- ['GNU GLP', 'GPL'],
1107
- ['GNU LESSER GENERAL PUBLIC LICENSE', 'LGPL'],
1108
- ['GNU Lesser General Public License', 'LGPL'],
1109
- ['GNU LESSER GENERAL PUBLIC LICENSE', 'LGPL-2.1'],
1110
- ['GNU Lesser General Public License', 'LGPL-2.1'],
1111
- ['LESSER GENERAL PUBLIC LICENSE', 'LGPL'],
1112
- ['Lesser General Public License', 'LGPL'],
1113
- ['LESSER GENERAL PUBLIC LICENSE', 'LGPL-2.1'],
1114
- ['Lesser General Public License', 'LGPL-2.1'],
1115
- ['GNU General Public License', 'GPL'],
1116
- ['Gnu public license', 'GPL'],
1117
- ['GNU Public License', 'GPL'],
1118
- ['GNU GENERAL PUBLIC LICENSE', 'GPL'],
1119
- ['MTI', 'MIT'],
1120
- ['Mozilla Public License', 'MPL'],
1121
- ['Universal Permissive License', 'UPL'],
1122
- ['WTH', 'WTF'],
1123
- ['WTFGPL', 'WTFPL'],
1124
- ['-License', '']
1125
- ].sort(sortTranspositions)
1126
- const TRANSPOSED = 0
1127
- const CORRECT = 1
1128
-
1129
- // Simple corrections to nearly valid identifiers.
1130
- const transforms = [
1131
- // e.g. 'mit'
1132
- function (argument) {
1133
- return argument.toUpperCase()
1134
- },
1135
- // e.g. 'MIT '
1136
- function (argument) {
1137
- return argument.trim()
1138
- },
1139
- // e.g. 'M.I.T.'
1140
- function (argument) {
1141
- return argument.replace(/\./g, '')
1142
- },
1143
- // e.g. 'Apache- 2.0'
1144
- function (argument) {
1145
- return argument.replace(/\s+/g, '')
1146
- },
1147
- // e.g. 'CC BY 4.0''
1148
- function (argument) {
1149
- return argument.replace(/\s+/g, '-')
1150
- },
1151
- // e.g. 'LGPLv2.1'
1152
- function (argument) {
1153
- return argument.replace('v', '-')
1154
- },
1155
- // e.g. 'Apache 2.0'
1156
- function (argument) {
1157
- return argument.replace(/,?\s*(\d)/, '-$1')
1158
- },
1159
- // e.g. 'GPL 2'
1160
- function (argument) {
1161
- return argument.replace(/,?\s*(\d)/, '-$1.0')
1162
- },
1163
- // e.g. 'Apache Version 2.0'
1164
- function (argument) {
1165
- return argument.replace(
1166
- /,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,
1167
- '-$2'
1168
- )
1169
- },
1170
- // e.g. 'Apache Version 2'
1171
- function (argument) {
1172
- return argument.replace(
1173
- /,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,
1174
- '-$2.0'
1175
- )
1176
- },
1177
- // e.g. 'ZLIB'
1178
- function (argument) {
1179
- return argument[0].toUpperCase() + argument.slice(1)
1180
- },
1181
- // e.g. 'MPL/2.0'
1182
- function (argument) {
1183
- return argument.replace('/', '-')
1184
- },
1185
- // e.g. 'Apache 2'
1186
- function (argument) {
1187
- return argument.replace(/\s*V\s*(\d)/, '-$1').replace(/(\d)$/, '$1.0')
1188
- },
1189
- // e.g. 'GPL-2.0', 'GPL-3.0'
1190
- function (argument) {
1191
- if (argument.indexOf('3.0') !== -1) {
1192
- return argument + '-or-later'
1193
- } else {
1194
- return argument + '-only'
1195
- }
1196
- },
1197
- // e.g. 'GPL-2.0-'
1198
- function (argument) {
1199
- return argument + 'only'
1200
- },
1201
- // e.g. 'GPL2'
1202
- function (argument) {
1203
- return argument.replace(/(\d)$/, '-$1.0')
1204
- },
1205
- // e.g. 'BSD 3'
1206
- function (argument) {
1207
- return argument.replace(/(-| )?(\d)$/, '-$2-Clause')
1208
- },
1209
- // e.g. 'BSD clause 3'
1210
- function (argument) {
1211
- return argument.replace(/(-| )clause(-| )(\d)/, '-$3-Clause')
1212
- },
1213
- // e.g. 'New BSD license'
1214
- function (argument) {
1215
- return argument.replace(
1216
- /\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,
1217
- 'BSD-3-Clause'
1218
- )
1219
- },
1220
- // e.g. 'Simplified BSD license'
1221
- function (argument) {
1222
- return argument.replace(
1223
- /\bSimplified(-| )?BSD((-| )License)?/i,
1224
- 'BSD-2-Clause'
1225
- )
1226
- },
1227
- // e.g. 'Free BSD license'
1228
- function (argument) {
1229
- return argument.replace(
1230
- /\b(Free|Net)(-| )?BSD((-| )License)?/i,
1231
- 'BSD-2-Clause-$1BSD'
1232
- )
1233
- },
1234
- // e.g. 'Clear BSD license'
1235
- function (argument) {
1236
- return argument.replace(
1237
- /\bClear(-| )?BSD((-| )License)?/i,
1238
- 'BSD-3-Clause-Clear'
1239
- )
1240
- },
1241
- // e.g. 'Old BSD License'
1242
- function (argument) {
1243
- return argument.replace(
1244
- /\b(Old|Original)(-| )?BSD((-| )License)?/i,
1245
- 'BSD-4-Clause'
1246
- )
1247
- },
1248
- // e.g. 'BY-NC-4.0'
1249
- function (argument) {
1250
- return 'CC-' + argument
1251
- },
1252
- // e.g. 'BY-NC'
1253
- function (argument) {
1254
- return 'CC-' + argument + '-4.0'
1255
- },
1256
- // e.g. 'Attribution-NonCommercial'
1257
- function (argument) {
1258
- return argument
1259
- .replace('Attribution', 'BY')
1260
- .replace('NonCommercial', 'NC')
1261
- .replace('NoDerivatives', 'ND')
1262
- .replace(/ (\d)/, '-$1')
1263
- .replace(/ ?International/, '')
1264
- },
1265
- // e.g. 'Attribution-NonCommercial'
1266
- function (argument) {
1267
- return (
1268
- 'CC-' +
1269
- argument
1270
- .replace('Attribution', 'BY')
1271
- .replace('NonCommercial', 'NC')
1272
- .replace('NoDerivatives', 'ND')
1273
- .replace(/ (\d)/, '-$1')
1274
- .replace(/ ?International/, '') +
1275
- '-4.0'
1276
- )
1277
- }
1278
- ]
1279
- let licensesWithVersions = spdxLicenseIds
1280
- .map(function (id) {
1281
- const match = /^(.*)-\d+\.\d+$/.exec(id)
1282
- return match ? [match[0], match[1]] : [id, null]
1283
- })
1284
- .reduce(function (objectMap, item) {
1285
- const key = item[1]
1286
- objectMap[key] = objectMap[key] || []
1287
- objectMap[key].push(item[0])
1288
- return objectMap
1289
- }, {})
1290
- const licensesWithOneVersion = Object.keys(licensesWithVersions)
1291
- .map(function makeEntries(key) {
1292
- return [key, licensesWithVersions[key]]
1293
- })
1294
- .filter(function identifySoleVersions(item) {
1295
- return (
1296
- // Licenses has just one valid version suffix.
1297
- item[1].length === 1 &&
1298
- item[0] !== null &&
1299
- // APL will be considered Apache, rather than APL-1.0
1300
- item[0] !== 'APL'
1301
- )
1302
- })
1303
- .map(function createLastResorts(item) {
1304
- return [item[0], item[1][0]]
1305
- })
1306
- licensesWithVersions = undefined
1307
-
1308
- // If all else fails, guess that strings containing certain substrings
1309
- // meant to identify certain licenses.
1310
- const lastResorts = [
1311
- ['UNLI', 'Unlicense'],
1312
- ['WTF', 'WTFPL'],
1313
- ['2 CLAUSE', 'BSD-2-Clause'],
1314
- ['2-CLAUSE', 'BSD-2-Clause'],
1315
- ['3 CLAUSE', 'BSD-3-Clause'],
1316
- ['3-CLAUSE', 'BSD-3-Clause'],
1317
- ['AFFERO', 'AGPL-3.0-or-later'],
1318
- ['AGPL', 'AGPL-3.0-or-later'],
1319
- ['APACHE', 'Apache-2.0'],
1320
- ['ARTISTIC', 'Artistic-2.0'],
1321
- ['Affero', 'AGPL-3.0-or-later'],
1322
- ['BEER', 'Beerware'],
1323
- ['BOOST', 'BSL-1.0'],
1324
- ['BSD', 'BSD-2-Clause'],
1325
- ['CDDL', 'CDDL-1.1'],
1326
- ['ECLIPSE', 'EPL-1.0'],
1327
- ['FUCK', 'WTFPL'],
1328
- ['GNU', 'GPL-3.0-or-later'],
1329
- ['LGPL', 'LGPL-3.0-or-later'],
1330
- ['GPLV1', 'GPL-1.0-only'],
1331
- ['GPL-1', 'GPL-1.0-only'],
1332
- ['GPLV2', 'GPL-2.0-only'],
1333
- ['GPL-2', 'GPL-2.0-only'],
1334
- ['GPL', 'GPL-3.0-or-later'],
1335
- ['MIT +NO-FALSE-ATTRIBS', 'MITNFA'],
1336
- ['MIT', 'MIT'],
1337
- ['MPL', 'MPL-2.0'],
1338
- ['X11', 'X11'],
1339
- ['ZLIB', 'Zlib']
1340
- ]
1341
- .concat(licensesWithOneVersion)
1342
- .sort(sortTranspositions)
1343
- const SUBSTRING = 0
1344
- const IDENTIFIER = 1
1345
- const validTransformation = function (identifier) {
1346
- for (let i = 0; i < transforms.length; i++) {
1347
- const transformed = transforms[i](identifier).trim()
1348
- if (transformed !== identifier && valid(transformed)) {
1349
- return transformed
1350
- }
1351
- }
1352
- return null
1353
- }
1354
- const validLastResort = function (identifier) {
1355
- const upperCased = identifier.toUpperCase()
1356
- for (let i = 0; i < lastResorts.length; i++) {
1357
- const lastResort = lastResorts[i]
1358
- if (upperCased.indexOf(lastResort[SUBSTRING]) > -1) {
1359
- return lastResort[IDENTIFIER]
1360
- }
1361
- }
1362
- return null
1363
- }
1364
- const anyCorrection = function (identifier, check) {
1365
- for (let i = 0; i < transpositions.length; i++) {
1366
- const transposition = transpositions[i]
1367
- const transposed = transposition[TRANSPOSED]
1368
- if (identifier.indexOf(transposed) > -1) {
1369
- const corrected = identifier.replace(transposed, transposition[CORRECT])
1370
- const checked = check(corrected)
1371
- if (checked !== null) {
1372
- return checked
1373
- }
1374
- }
1375
- }
1376
- return null
1377
- }
1378
- spdxCorrect = function (identifier, options) {
1379
- options = options || {}
1380
- const upgrade = options.upgrade === undefined ? true : !!options.upgrade
1381
- function postprocess(value) {
1382
- return upgrade ? upgradeGPLs(value) : value
1383
- }
1384
- const validArugment =
1385
- typeof identifier === 'string' && identifier.trim().length !== 0
1386
- if (!validArugment) {
1387
- throw Error('Invalid argument. Expected non-empty string.')
1388
- }
1389
- identifier = identifier.trim()
1390
- if (valid(identifier)) {
1391
- return postprocess(identifier)
1392
- }
1393
- const noPlus = identifier.replace(/\+$/, '').trim()
1394
- if (valid(noPlus)) {
1395
- return postprocess(noPlus)
1396
- }
1397
- let transformed = validTransformation(identifier)
1398
- if (transformed !== null) {
1399
- return postprocess(transformed)
1400
- }
1401
- transformed = anyCorrection(identifier, function (argument) {
1402
- if (valid(argument)) {
1403
- return argument
1404
- }
1405
- return validTransformation(argument)
1406
- })
1407
- if (transformed !== null) {
1408
- return postprocess(transformed)
1409
- }
1410
- transformed = validLastResort(identifier)
1411
- if (transformed !== null) {
1412
- return postprocess(transformed)
1413
- }
1414
- transformed = anyCorrection(identifier, validLastResort)
1415
- if (transformed !== null) {
1416
- return postprocess(transformed)
1417
- }
1418
- return null
1419
- }
1420
- function upgradeGPLs(value) {
1421
- if (
1422
- [
1423
- 'GPL-1.0',
1424
- 'LGPL-1.0',
1425
- 'AGPL-1.0',
1426
- 'GPL-2.0',
1427
- 'LGPL-2.0',
1428
- 'AGPL-2.0',
1429
- 'LGPL-2.1'
1430
- ].indexOf(value) !== -1
1431
- ) {
1432
- return value + '-only'
1433
- } else if (
1434
- [
1435
- 'GPL-1.0+',
1436
- 'GPL-2.0+',
1437
- 'GPL-3.0+',
1438
- 'LGPL-2.0+',
1439
- 'LGPL-2.1+',
1440
- 'LGPL-3.0+',
1441
- 'AGPL-1.0+',
1442
- 'AGPL-3.0+'
1443
- ].indexOf(value) !== -1
1444
- ) {
1445
- return value.replace(/\+$/, '-or-later')
1446
- } else if (['GPL-3.0', 'LGPL-3.0', 'AGPL-3.0'].indexOf(value) !== -1) {
1447
- return value + '-or-later'
1448
- } else {
1449
- return value
1450
- }
1451
- }
1452
- return spdxCorrect
1453
- }
1454
-
1455
- const spdxCorrectExports = requireSpdxCorrect()
1456
-
1457
- module.exports = spdxCorrectExports