@evoscientist/webui 0.3.1 → 0.3.2

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 (167) hide show
  1. package/dist/.next/BUILD_ID +1 -1
  2. package/dist/.next/build-manifest.json +3 -3
  3. package/dist/.next/required-server-files.json +7 -1
  4. package/dist/.next/server/app/_global-error.html +1 -1
  5. package/dist/.next/server/app/_global-error.rsc +1 -1
  6. package/dist/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/dist/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/dist/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  9. package/dist/.next/server/app/_not-found/page.js.nft.json +1 -1
  10. package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/dist/.next/server/app/_not-found.html +1 -1
  12. package/dist/.next/server/app/_not-found.rsc +2 -2
  13. package/dist/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  14. package/dist/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  15. package/dist/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  16. package/dist/.next/server/app/api/memory/executions/route.js.nft.json +1 -1
  17. package/dist/.next/server/app/api/memory/observations/route.js.nft.json +1 -1
  18. package/dist/.next/server/app/api/memory/route.js.nft.json +1 -1
  19. package/dist/.next/server/app/api/skills/catalog/route.js.nft.json +1 -1
  20. package/dist/.next/server/app/api/skills/detail/route.js.nft.json +1 -1
  21. package/dist/.next/server/app/api/skills/install/route.js.nft.json +1 -1
  22. package/dist/.next/server/app/api/skills/route.js.nft.json +1 -1
  23. package/dist/.next/server/app/index.html +1 -1
  24. package/dist/.next/server/app/index.rsc +3 -3
  25. package/dist/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  26. package/dist/.next/server/app/index.segments/_full.segment.rsc +3 -3
  27. package/dist/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  28. package/dist/.next/server/app/page.js.nft.json +1 -1
  29. package/dist/.next/server/app/page_client-reference-manifest.js +1 -1
  30. package/dist/.next/server/chunks/ssr/[root-of-the-server]__1q-wcrf._.js +4 -4
  31. package/dist/.next/server/chunks/ssr/{node_modules_0-uwdov._.js → node_modules_05olfud._.js} +2 -2
  32. package/dist/.next/server/chunks/ssr/{node_modules_0gorpj1._.js → node_modules_0707c4h._.js} +2 -2
  33. package/dist/.next/server/chunks/ssr/{node_modules_0t_f7hd._.js → node_modules_0784dh-._.js} +1 -1
  34. package/dist/.next/server/chunks/ssr/{node_modules_1fe5i2w._.js → node_modules_09zrx7f._.js} +1 -1
  35. package/dist/.next/server/chunks/ssr/{node_modules_16u9hvv._.js → node_modules_0afp9zt._.js} +1 -1
  36. package/dist/.next/server/chunks/ssr/{node_modules_1yd27ha._.js → node_modules_0bhc62w._.js} +1 -1
  37. package/dist/.next/server/chunks/ssr/{node_modules_20f84v9._.js → node_modules_0d3782d._.js} +1 -1
  38. package/dist/.next/server/chunks/ssr/{node_modules_078ku58._.js → node_modules_0gczflt._.js} +1 -1
  39. package/dist/.next/server/chunks/ssr/{node_modules_15h3mt3._.js → node_modules_0i24s-o._.js} +2 -2
  40. package/dist/.next/server/chunks/ssr/{node_modules_0na2xfw._.js → node_modules_0jt-p_3._.js} +2 -2
  41. package/dist/.next/server/chunks/ssr/{node_modules_0rrx3v9._.js → node_modules_0jwjxy_._.js} +2 -2
  42. package/dist/.next/server/chunks/ssr/{node_modules_003l9s_._.js → node_modules_0l773dp._.js} +1 -1
  43. package/dist/.next/server/chunks/ssr/{node_modules_20mk7cs._.js → node_modules_0m8u9v1._.js} +1 -1
  44. package/dist/.next/server/chunks/ssr/{node_modules_0b_h7uo._.js → node_modules_0ml23_q._.js} +2 -2
  45. package/dist/.next/server/chunks/ssr/{node_modules_1i7ymbt._.js → node_modules_0rlst0z._.js} +1 -1
  46. package/dist/.next/server/chunks/ssr/{node_modules_0ygb0yl._.js → node_modules_0tivl4k._.js} +2 -2
  47. package/dist/.next/server/chunks/ssr/{node_modules_0kim9kf._.js → node_modules_13v6kpn._.js} +2 -2
  48. package/dist/.next/server/chunks/ssr/{node_modules_1peqwpp._.js → node_modules_168xluw._.js} +1 -1
  49. package/dist/.next/server/chunks/ssr/{node_modules_207k920._.js → node_modules_16ad5zu._.js} +2 -2
  50. package/dist/.next/server/chunks/ssr/{node_modules_19nwszm._.js → node_modules_18bc60h._.js} +1 -1
  51. package/dist/.next/server/chunks/ssr/{node_modules_0-5losv._.js → node_modules_1aavgsp._.js} +1 -1
  52. package/dist/.next/server/chunks/ssr/{node_modules_01lxr8w._.js → node_modules_1bo2k7k._.js} +1 -1
  53. package/dist/.next/server/chunks/ssr/{node_modules_15sdrja._.js → node_modules_1ch0k2m._.js} +1 -1
  54. package/dist/.next/server/chunks/ssr/{node_modules_0svpaox._.js → node_modules_1dc_thh._.js} +1 -1
  55. package/dist/.next/server/chunks/ssr/{node_modules_1z-i33h._.js → node_modules_1mqkp65._.js} +1 -1
  56. package/dist/.next/server/chunks/ssr/{node_modules_0ibftfb._.js → node_modules_1t21v31._.js} +1 -1
  57. package/dist/.next/server/chunks/ssr/{node_modules_1qo98iu._.js → node_modules_1u__5g0._.js} +1 -1
  58. package/dist/.next/server/chunks/ssr/{node_modules_0f8ss6x._.js → node_modules_1vsvm0k._.js} +2 -2
  59. package/dist/.next/server/chunks/ssr/{node_modules_06d96_7._.js → node_modules_1z3x6_m._.js} +1 -1
  60. package/dist/.next/server/chunks/ssr/{node_modules_0if76xt._.js → node_modules_1zm22k3._.js} +1 -1
  61. package/dist/.next/server/chunks/ssr/{node_modules_katex_dist_katex_mjs_1zkqvut._.js → node_modules_katex_dist_katex_mjs_02vnq48._.js} +1 -1
  62. package/dist/.next/server/middleware-build-manifest.js +3 -3
  63. package/dist/.next/server/pages/404.html +1 -1
  64. package/dist/.next/server/pages/500.html +1 -1
  65. package/dist/.next/static/chunks/{04hyl-myn66lr.css → 09nrlxui_thd6.css} +2 -2
  66. package/dist/.next/static/chunks/3ckjr-0dkyr_7.js +13 -0
  67. package/dist/package.json +2 -2
  68. package/dist/server.js +1 -1
  69. package/package.json +2 -2
  70. package/dist/.next/static/chunks/1pp43a1pyu2lp.js +0 -13
  71. package/dist/node_modules/@img/colour/color.cjs +0 -1596
  72. package/dist/node_modules/@img/colour/index.cjs +0 -1
  73. package/dist/node_modules/@img/colour/package.json +0 -58
  74. package/dist/node_modules/@img/sharp-darwin-arm64/index.cjs +0 -2
  75. package/dist/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64-0.35.4.node +0 -0
  76. package/dist/node_modules/@img/sharp-darwin-arm64/package.json +0 -41
  77. package/dist/node_modules/@img/sharp-libvips-darwin-arm64/README.md +0 -46
  78. package/dist/node_modules/@img/sharp-libvips-darwin-arm64/lib/glib-2.0/include/glibconfig.h +0 -218
  79. package/dist/node_modules/@img/sharp-libvips-darwin-arm64/lib/index.js +0 -1
  80. package/dist/node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.8.18.6.dylib +0 -0
  81. package/dist/node_modules/@img/sharp-libvips-darwin-arm64/package.json +0 -37
  82. package/dist/node_modules/@img/sharp-libvips-darwin-arm64/versions.json +0 -30
  83. package/dist/node_modules/detect-libc/lib/detect-libc.js +0 -313
  84. package/dist/node_modules/detect-libc/lib/elf.js +0 -39
  85. package/dist/node_modules/detect-libc/lib/filesystem.js +0 -51
  86. package/dist/node_modules/detect-libc/lib/process.js +0 -24
  87. package/dist/node_modules/detect-libc/package.json +0 -44
  88. package/dist/node_modules/semver/package.json +0 -38
  89. package/dist/node_modules/sharp/dist/channel.cjs +0 -177
  90. package/dist/node_modules/sharp/dist/channel.mjs +0 -177
  91. package/dist/node_modules/sharp/dist/colour.cjs +0 -199
  92. package/dist/node_modules/sharp/dist/colour.mjs +0 -199
  93. package/dist/node_modules/sharp/dist/composite.cjs +0 -213
  94. package/dist/node_modules/sharp/dist/composite.mjs +0 -213
  95. package/dist/node_modules/sharp/dist/constructor.cjs +0 -511
  96. package/dist/node_modules/sharp/dist/constructor.mjs +0 -511
  97. package/dist/node_modules/sharp/dist/index.cjs +0 -25
  98. package/dist/node_modules/sharp/dist/index.d.cts +0 -1999
  99. package/dist/node_modules/sharp/dist/index.d.mts +0 -2046
  100. package/dist/node_modules/sharp/dist/index.mjs +0 -25
  101. package/dist/node_modules/sharp/dist/input.cjs +0 -819
  102. package/dist/node_modules/sharp/dist/input.mjs +0 -819
  103. package/dist/node_modules/sharp/dist/is.cjs +0 -143
  104. package/dist/node_modules/sharp/dist/is.mjs +0 -143
  105. package/dist/node_modules/sharp/dist/libvips.cjs +0 -212
  106. package/dist/node_modules/sharp/dist/libvips.mjs +0 -212
  107. package/dist/node_modules/sharp/dist/operation.cjs +0 -1002
  108. package/dist/node_modules/sharp/dist/operation.mjs +0 -1002
  109. package/dist/node_modules/sharp/dist/output.cjs +0 -1785
  110. package/dist/node_modules/sharp/dist/output.mjs +0 -1785
  111. package/dist/node_modules/sharp/dist/resize.cjs +0 -617
  112. package/dist/node_modules/sharp/dist/resize.mjs +0 -617
  113. package/dist/node_modules/sharp/dist/sharp.cjs +0 -174
  114. package/dist/node_modules/sharp/dist/sharp.mjs +0 -174
  115. package/dist/node_modules/sharp/dist/utility.cjs +0 -301
  116. package/dist/node_modules/sharp/dist/utility.mjs +0 -301
  117. package/dist/node_modules/sharp/node_modules/semver/classes/comparator.js +0 -143
  118. package/dist/node_modules/sharp/node_modules/semver/classes/range.js +0 -577
  119. package/dist/node_modules/sharp/node_modules/semver/classes/semver.js +0 -350
  120. package/dist/node_modules/sharp/node_modules/semver/functions/clean.js +0 -8
  121. package/dist/node_modules/sharp/node_modules/semver/functions/cmp.js +0 -54
  122. package/dist/node_modules/sharp/node_modules/semver/functions/coerce.js +0 -62
  123. package/dist/node_modules/sharp/node_modules/semver/functions/compare-build.js +0 -9
  124. package/dist/node_modules/sharp/node_modules/semver/functions/compare-loose.js +0 -5
  125. package/dist/node_modules/sharp/node_modules/semver/functions/compare.js +0 -7
  126. package/dist/node_modules/sharp/node_modules/semver/functions/diff.js +0 -60
  127. package/dist/node_modules/sharp/node_modules/semver/functions/eq.js +0 -5
  128. package/dist/node_modules/sharp/node_modules/semver/functions/gt.js +0 -5
  129. package/dist/node_modules/sharp/node_modules/semver/functions/gte.js +0 -5
  130. package/dist/node_modules/sharp/node_modules/semver/functions/inc.js +0 -21
  131. package/dist/node_modules/sharp/node_modules/semver/functions/lt.js +0 -5
  132. package/dist/node_modules/sharp/node_modules/semver/functions/lte.js +0 -5
  133. package/dist/node_modules/sharp/node_modules/semver/functions/major.js +0 -5
  134. package/dist/node_modules/sharp/node_modules/semver/functions/minor.js +0 -5
  135. package/dist/node_modules/sharp/node_modules/semver/functions/neq.js +0 -5
  136. package/dist/node_modules/sharp/node_modules/semver/functions/parse.js +0 -18
  137. package/dist/node_modules/sharp/node_modules/semver/functions/patch.js +0 -5
  138. package/dist/node_modules/sharp/node_modules/semver/functions/prerelease.js +0 -8
  139. package/dist/node_modules/sharp/node_modules/semver/functions/rcompare.js +0 -5
  140. package/dist/node_modules/sharp/node_modules/semver/functions/rsort.js +0 -5
  141. package/dist/node_modules/sharp/node_modules/semver/functions/satisfies.js +0 -12
  142. package/dist/node_modules/sharp/node_modules/semver/functions/sort.js +0 -5
  143. package/dist/node_modules/sharp/node_modules/semver/functions/truncate.js +0 -48
  144. package/dist/node_modules/sharp/node_modules/semver/functions/valid.js +0 -8
  145. package/dist/node_modules/sharp/node_modules/semver/index.js +0 -93
  146. package/dist/node_modules/sharp/node_modules/semver/internal/constants.js +0 -37
  147. package/dist/node_modules/sharp/node_modules/semver/internal/debug.js +0 -11
  148. package/dist/node_modules/sharp/node_modules/semver/internal/identifiers.js +0 -29
  149. package/dist/node_modules/sharp/node_modules/semver/internal/lrucache.js +0 -42
  150. package/dist/node_modules/sharp/node_modules/semver/internal/parse-options.js +0 -17
  151. package/dist/node_modules/sharp/node_modules/semver/internal/re.js +0 -223
  152. package/dist/node_modules/sharp/node_modules/semver/package.json +0 -78
  153. package/dist/node_modules/sharp/node_modules/semver/ranges/gtr.js +0 -6
  154. package/dist/node_modules/sharp/node_modules/semver/ranges/intersects.js +0 -9
  155. package/dist/node_modules/sharp/node_modules/semver/ranges/ltr.js +0 -6
  156. package/dist/node_modules/sharp/node_modules/semver/ranges/max-satisfying.js +0 -27
  157. package/dist/node_modules/sharp/node_modules/semver/ranges/min-satisfying.js +0 -26
  158. package/dist/node_modules/sharp/node_modules/semver/ranges/min-version.js +0 -63
  159. package/dist/node_modules/sharp/node_modules/semver/ranges/outside.js +0 -82
  160. package/dist/node_modules/sharp/node_modules/semver/ranges/simplify.js +0 -49
  161. package/dist/node_modules/sharp/node_modules/semver/ranges/subset.js +0 -249
  162. package/dist/node_modules/sharp/node_modules/semver/ranges/to-comparators.js +0 -10
  163. package/dist/node_modules/sharp/node_modules/semver/ranges/valid.js +0 -13
  164. package/dist/node_modules/sharp/package.json +0 -227
  165. /package/dist/.next/static/{wE9WfZ70fPpTyIBVT_vgk → 6-cCzudznf5YJPljIySXU}/_buildManifest.js +0 -0
  166. /package/dist/.next/static/{wE9WfZ70fPpTyIBVT_vgk → 6-cCzudznf5YJPljIySXU}/_clientMiddlewareManifest.js +0 -0
  167. /package/dist/.next/static/{wE9WfZ70fPpTyIBVT_vgk → 6-cCzudznf5YJPljIySXU}/_ssgManifest.js +0 -0
@@ -1,143 +0,0 @@
1
- /*!
2
- Copyright 2013 Lovell Fuller and others.
3
- SPDX-License-Identifier: Apache-2.0
4
- */
5
-
6
- /**
7
- * Is this value defined and not null?
8
- * @private
9
- */
10
- const defined = (val) => typeof val !== 'undefined' && val !== null;
11
-
12
- /**
13
- * Is this value an object?
14
- * @private
15
- */
16
- const object = (val) => typeof val === 'object';
17
-
18
- /**
19
- * Is this value a plain object?
20
- * @private
21
- */
22
- const plainObject = (val) => Object.prototype.toString.call(val) === '[object Object]';
23
-
24
- /**
25
- * Is this value a function?
26
- * @private
27
- */
28
- const fn = (val) => typeof val === 'function';
29
-
30
- /**
31
- * Is this value a boolean?
32
- * @private
33
- */
34
- const bool = (val) => typeof val === 'boolean';
35
-
36
- /**
37
- * Is this value a Buffer object?
38
- * @private
39
- */
40
- const buffer = (val) => val instanceof Buffer;
41
-
42
- /**
43
- * Is this value a typed array object?. E.g. Uint8Array or Uint8ClampedArray?
44
- * @private
45
- */
46
- const typedArray = (val) => {
47
- if (defined(val)) {
48
- switch (val.constructor) {
49
- case Uint8Array:
50
- case Uint8ClampedArray:
51
- case Int8Array:
52
- case Uint16Array:
53
- case Int16Array:
54
- case Uint32Array:
55
- case Int32Array:
56
- case Float32Array:
57
- case Float64Array:
58
- return true;
59
- }
60
- }
61
-
62
- return false;
63
- };
64
-
65
- /**
66
- * Is this value an ArrayBuffer object?
67
- * @private
68
- */
69
- const arrayBuffer = (val) => val instanceof ArrayBuffer;
70
-
71
- /**
72
- * Is this value a non-empty string?
73
- * @private
74
- */
75
- const string = (val) => typeof val === 'string' && val.length > 0;
76
-
77
- /**
78
- * Is this value a real number?
79
- * @private
80
- */
81
- const number = (val) => typeof val === 'number' && Number.isFinite(val);
82
-
83
- /**
84
- * Is this value an integer?
85
- * @private
86
- */
87
- const integer = (val) => Number.isInteger(val);
88
-
89
- /**
90
- * Is this value within an inclusive given range?
91
- * @private
92
- */
93
- const inRange = (val, min, max) => val >= min && val <= max;
94
-
95
- /**
96
- * Is this value within the elements of an array?
97
- * @private
98
- */
99
- const inArray = (val, list) => list.includes(val);
100
-
101
- /**
102
- * Create an Error with a message relating to an invalid parameter.
103
- *
104
- * @param {string} name - parameter name.
105
- * @param {string} expected - description of the type/value/range expected.
106
- * @param {*} actual - the value received.
107
- * @returns {Error} Containing the formatted message.
108
- * @private
109
- */
110
- const invalidParameterError = (name, expected, actual) => new Error(
111
- `Expected ${expected} for ${name} but received ${actual} of type ${typeof actual}`
112
- );
113
-
114
- /**
115
- * Ensures an Error from C++ contains a JS stack.
116
- *
117
- * @param {Error} native - Error with message from C++.
118
- * @param {Error} context - Error with stack from JS.
119
- * @returns {Error} Error with message and stack.
120
- * @private
121
- */
122
- const nativeError = (native, context) => {
123
- context.message = native.message;
124
- return context;
125
- };
126
-
127
- module.exports = {
128
- defined,
129
- object,
130
- plainObject,
131
- fn,
132
- bool,
133
- buffer,
134
- typedArray,
135
- arrayBuffer,
136
- string,
137
- number,
138
- integer,
139
- inRange,
140
- inArray,
141
- invalidParameterError,
142
- nativeError
143
- };
@@ -1,143 +0,0 @@
1
- /*!
2
- Copyright 2013 Lovell Fuller and others.
3
- SPDX-License-Identifier: Apache-2.0
4
- */
5
-
6
- /**
7
- * Is this value defined and not null?
8
- * @private
9
- */
10
- const defined = (val) => typeof val !== 'undefined' && val !== null;
11
-
12
- /**
13
- * Is this value an object?
14
- * @private
15
- */
16
- const object = (val) => typeof val === 'object';
17
-
18
- /**
19
- * Is this value a plain object?
20
- * @private
21
- */
22
- const plainObject = (val) => Object.prototype.toString.call(val) === '[object Object]';
23
-
24
- /**
25
- * Is this value a function?
26
- * @private
27
- */
28
- const fn = (val) => typeof val === 'function';
29
-
30
- /**
31
- * Is this value a boolean?
32
- * @private
33
- */
34
- const bool = (val) => typeof val === 'boolean';
35
-
36
- /**
37
- * Is this value a Buffer object?
38
- * @private
39
- */
40
- const buffer = (val) => val instanceof Buffer;
41
-
42
- /**
43
- * Is this value a typed array object?. E.g. Uint8Array or Uint8ClampedArray?
44
- * @private
45
- */
46
- const typedArray = (val) => {
47
- if (defined(val)) {
48
- switch (val.constructor) {
49
- case Uint8Array:
50
- case Uint8ClampedArray:
51
- case Int8Array:
52
- case Uint16Array:
53
- case Int16Array:
54
- case Uint32Array:
55
- case Int32Array:
56
- case Float32Array:
57
- case Float64Array:
58
- return true;
59
- }
60
- }
61
-
62
- return false;
63
- };
64
-
65
- /**
66
- * Is this value an ArrayBuffer object?
67
- * @private
68
- */
69
- const arrayBuffer = (val) => val instanceof ArrayBuffer;
70
-
71
- /**
72
- * Is this value a non-empty string?
73
- * @private
74
- */
75
- const string = (val) => typeof val === 'string' && val.length > 0;
76
-
77
- /**
78
- * Is this value a real number?
79
- * @private
80
- */
81
- const number = (val) => typeof val === 'number' && Number.isFinite(val);
82
-
83
- /**
84
- * Is this value an integer?
85
- * @private
86
- */
87
- const integer = (val) => Number.isInteger(val);
88
-
89
- /**
90
- * Is this value within an inclusive given range?
91
- * @private
92
- */
93
- const inRange = (val, min, max) => val >= min && val <= max;
94
-
95
- /**
96
- * Is this value within the elements of an array?
97
- * @private
98
- */
99
- const inArray = (val, list) => list.includes(val);
100
-
101
- /**
102
- * Create an Error with a message relating to an invalid parameter.
103
- *
104
- * @param {string} name - parameter name.
105
- * @param {string} expected - description of the type/value/range expected.
106
- * @param {*} actual - the value received.
107
- * @returns {Error} Containing the formatted message.
108
- * @private
109
- */
110
- const invalidParameterError = (name, expected, actual) => new Error(
111
- `Expected ${expected} for ${name} but received ${actual} of type ${typeof actual}`
112
- );
113
-
114
- /**
115
- * Ensures an Error from C++ contains a JS stack.
116
- *
117
- * @param {Error} native - Error with message from C++.
118
- * @param {Error} context - Error with stack from JS.
119
- * @returns {Error} Error with message and stack.
120
- * @private
121
- */
122
- const nativeError = (native, context) => {
123
- context.message = native.message;
124
- return context;
125
- };
126
-
127
- export default {
128
- defined,
129
- object,
130
- plainObject,
131
- fn,
132
- bool,
133
- buffer,
134
- typedArray,
135
- arrayBuffer,
136
- string,
137
- number,
138
- integer,
139
- inRange,
140
- inArray,
141
- invalidParameterError,
142
- nativeError
143
- };
@@ -1,212 +0,0 @@
1
- /*!
2
- Copyright 2013 Lovell Fuller and others.
3
- SPDX-License-Identifier: Apache-2.0
4
- */
5
-
6
- const { spawnSync } = require('node:child_process');
7
- const { createHash } = require('node:crypto');
8
- const semver = require('semver');
9
- const detectLibc = require('detect-libc');
10
- const pkg = require('../package.json');
11
-
12
- /* node:coverage ignore next */
13
- const minimumLibvipsVersionLabelled = process.env.npm_package_config_libvips || pkg.config.libvips;
14
- const minimumLibvipsVersion = semver.coerce(minimumLibvipsVersionLabelled).version;
15
-
16
- const prebuiltPlatforms = [
17
- 'darwin-arm64', 'darwin-x64',
18
- 'freebsd-arm64', 'freebsd-x64',
19
- 'linux-arm', 'linux-arm64', 'linux-ppc64', 'linux-riscv64', 'linux-s390x', 'linux-wasm32', 'linux-x64',
20
- 'linuxmusl-arm64', 'linuxmusl-x64',
21
- 'win32-arm64', 'win32-ia32', 'win32-x64'
22
- ];
23
-
24
- const spawnSyncOptions = {
25
- encoding: 'utf8',
26
- shell: true
27
- };
28
-
29
- const log = (item) => {
30
- if (item instanceof Error) {
31
- console.error(`sharp: Installation error: ${item.message}`);
32
- } else {
33
- console.log(`sharp: ${item}`);
34
- }
35
- };
36
-
37
- /* node:coverage disable */
38
-
39
- const runtimeLibc = () => detectLibc.isNonGlibcLinuxSync() ? detectLibc.familySync() : '';
40
-
41
- const runtimePlatformArch = () => `${process.platform}${runtimeLibc()}-${process.arch}`;
42
-
43
- const buildPlatformArch = () => {
44
- if (isEmscripten()) {
45
- return 'wasm32';
46
- }
47
- const { npm_config_arch, npm_config_platform, npm_config_libc } = process.env;
48
- const libc = typeof npm_config_libc === 'string' ? npm_config_libc : runtimeLibc();
49
- return `${npm_config_platform || process.platform}${libc}-${npm_config_arch || process.arch}`;
50
- };
51
-
52
- const buildSharpLibvipsIncludeDir = () => {
53
- try {
54
- return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/include`);
55
- } catch {
56
- try {
57
- return require('@img/sharp-libvips-dev/include');
58
- } catch {}
59
- }
60
- return '';
61
- };
62
-
63
- const buildSharpLibvipsCPlusPlusDir = () => {
64
- try {
65
- return require('@img/sharp-libvips-dev/cplusplus');
66
- } catch {}
67
- return '';
68
- };
69
-
70
- const buildSharpLibvipsLibDir = () => {
71
- try {
72
- return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/lib`);
73
- } catch {
74
- try {
75
- return require(`@img/sharp-libvips-${buildPlatformArch()}/lib`);
76
- } catch {}
77
- }
78
- return '';
79
- };
80
-
81
- const isUnsupportedNodeRuntime = () => {
82
- if (process.release?.name === 'node' && process.versions) {
83
- if (!semver.satisfies(process.versions.node, pkg.engines.node)) {
84
- return { found: process.versions.node, expected: pkg.engines.node };
85
- }
86
- }
87
- };
88
-
89
- const isEmscripten = () => {
90
- const { CC } = process.env;
91
- return Boolean(CC?.endsWith('/emcc'));
92
- };
93
-
94
- const isRosetta = () => {
95
- if (process.platform === 'darwin' && process.arch === 'x64') {
96
- const translated = spawnSync('sysctl sysctl.proc_translated', spawnSyncOptions).stdout;
97
- return (translated || '').trim() === 'sysctl.proc_translated: 1';
98
- }
99
- return false;
100
- };
101
-
102
- /* node:coverage enable */
103
-
104
- const sha512 = (s) => createHash('sha512').update(s).digest('hex');
105
-
106
- const yarnLocator = () => {
107
- try {
108
- const identHash = sha512(`imgsharp-libvips-${buildPlatformArch()}`);
109
- const npmVersion = semver.coerce(pkg.optionalDependencies[`@img/sharp-libvips-${buildPlatformArch()}`], {
110
- includePrerelease: true
111
- }).version;
112
- return sha512(`${identHash}npm:${npmVersion}`).slice(0, 10);
113
- } catch {}
114
- return '';
115
- };
116
-
117
- /* node:coverage disable */
118
-
119
- const spawnRebuild = () =>
120
- spawnSync(`node-gyp rebuild --directory=src ${isEmscripten() ? '--nodedir=emscripten' : ''}`, {
121
- ...spawnSyncOptions,
122
- stdio: 'inherit'
123
- }).status;
124
-
125
- const globalLibvipsVersion = () => {
126
- if (process.platform !== 'win32') {
127
- const globalLibvipsVersion = spawnSync('pkg-config --modversion vips-cpp', {
128
- ...spawnSyncOptions,
129
- env: {
130
- ...process.env,
131
- PKG_CONFIG_PATH: pkgConfigPath()
132
- }
133
- }).stdout;
134
- return (globalLibvipsVersion || '').trim();
135
- } else {
136
- return '';
137
- }
138
- };
139
-
140
- const getBrewPkgConfigPath = () => {
141
- try {
142
- const brewPrefix = (spawnSync('brew', ['--prefix'], { encoding: 'utf8' }).stdout || '').trim();
143
- if (brewPrefix) {
144
- return `${brewPrefix}/lib/pkgconfig`;
145
- }
146
- } catch (_err) {}
147
- return undefined;
148
- };
149
-
150
- const getPkgConfigPath = () => {
151
- try {
152
- const pkgConfigPath = (spawnSync('pkg-config', ['--variable', 'pc_path', 'pkg-config'], { encoding: 'utf8' }).stdout || '').trim();
153
- if (pkgConfigPath) {
154
- return pkgConfigPath;
155
- }
156
- } catch (_err) {}
157
- return undefined;
158
- };
159
-
160
- /* node:coverage enable */
161
-
162
- const pkgConfigPath = () => {
163
- if (process.platform !== 'win32') {
164
- return [
165
- getBrewPkgConfigPath(),
166
- getPkgConfigPath(),
167
- process.env.PKG_CONFIG_PATH
168
- ].filter(Boolean).join(':');
169
- } else {
170
- return '';
171
- }
172
- };
173
-
174
- const skipSearch = (status, reason, logger) => {
175
- if (logger) {
176
- logger(`Detected ${reason}, skipping search for globally-installed libvips`);
177
- }
178
- return status;
179
- };
180
-
181
- const useGlobalLibvips = (logger) => {
182
- if (Boolean(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS) === true) {
183
- return skipSearch(false, 'SHARP_IGNORE_GLOBAL_LIBVIPS', logger);
184
- }
185
- if (Boolean(process.env.SHARP_FORCE_GLOBAL_LIBVIPS) === true) {
186
- return skipSearch(true, 'SHARP_FORCE_GLOBAL_LIBVIPS', logger);
187
- }
188
- /* node:coverage ignore next 3 */
189
- if (isRosetta()) {
190
- return skipSearch(false, 'Rosetta', logger);
191
- }
192
- const globalVipsVersion = globalLibvipsVersion();
193
- /* node:coverage ignore next */
194
- return !!globalVipsVersion && semver.gte(globalVipsVersion, minimumLibvipsVersion);
195
- };
196
-
197
- module.exports = {
198
- minimumLibvipsVersion,
199
- prebuiltPlatforms,
200
- buildPlatformArch,
201
- buildSharpLibvipsIncludeDir,
202
- buildSharpLibvipsCPlusPlusDir,
203
- buildSharpLibvipsLibDir,
204
- isUnsupportedNodeRuntime,
205
- runtimePlatformArch,
206
- log,
207
- yarnLocator,
208
- spawnRebuild,
209
- globalLibvipsVersion,
210
- pkgConfigPath,
211
- useGlobalLibvips
212
- };
@@ -1,212 +0,0 @@
1
- /*!
2
- Copyright 2013 Lovell Fuller and others.
3
- SPDX-License-Identifier: Apache-2.0
4
- */
5
-
6
- import { spawnSync } from 'node:child_process';
7
- import { createHash } from 'node:crypto';
8
- import semver from 'semver';
9
- import detectLibc from 'detect-libc';
10
- import pkg from '../package.json' with { type: 'json' };
11
-
12
- /* node:coverage ignore next */
13
- const minimumLibvipsVersionLabelled = process.env.npm_package_config_libvips || pkg.config.libvips;
14
- const minimumLibvipsVersion = semver.coerce(minimumLibvipsVersionLabelled).version;
15
-
16
- const prebuiltPlatforms = [
17
- 'darwin-arm64', 'darwin-x64',
18
- 'freebsd-arm64', 'freebsd-x64',
19
- 'linux-arm', 'linux-arm64', 'linux-ppc64', 'linux-riscv64', 'linux-s390x', 'linux-wasm32', 'linux-x64',
20
- 'linuxmusl-arm64', 'linuxmusl-x64',
21
- 'win32-arm64', 'win32-ia32', 'win32-x64'
22
- ];
23
-
24
- const spawnSyncOptions = {
25
- encoding: 'utf8',
26
- shell: true
27
- };
28
-
29
- const log = (item) => {
30
- if (item instanceof Error) {
31
- console.error(`sharp: Installation error: ${item.message}`);
32
- } else {
33
- console.log(`sharp: ${item}`);
34
- }
35
- };
36
-
37
- /* node:coverage disable */
38
-
39
- const runtimeLibc = () => detectLibc.isNonGlibcLinuxSync() ? detectLibc.familySync() : '';
40
-
41
- const runtimePlatformArch = () => `${process.platform}${runtimeLibc()}-${process.arch}`;
42
-
43
- const buildPlatformArch = () => {
44
- if (isEmscripten()) {
45
- return 'wasm32';
46
- }
47
- const { npm_config_arch, npm_config_platform, npm_config_libc } = process.env;
48
- const libc = typeof npm_config_libc === 'string' ? npm_config_libc : runtimeLibc();
49
- return `${npm_config_platform || process.platform}${libc}-${npm_config_arch || process.arch}`;
50
- };
51
-
52
- const buildSharpLibvipsIncludeDir = () => {
53
- try {
54
- return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/include`);
55
- } catch {
56
- try {
57
- return require('@img/sharp-libvips-dev/include');
58
- } catch {}
59
- }
60
- return '';
61
- };
62
-
63
- const buildSharpLibvipsCPlusPlusDir = () => {
64
- try {
65
- return require('@img/sharp-libvips-dev/cplusplus');
66
- } catch {}
67
- return '';
68
- };
69
-
70
- const buildSharpLibvipsLibDir = () => {
71
- try {
72
- return require(`@img/sharp-libvips-dev-${buildPlatformArch()}/lib`);
73
- } catch {
74
- try {
75
- return require(`@img/sharp-libvips-${buildPlatformArch()}/lib`);
76
- } catch {}
77
- }
78
- return '';
79
- };
80
-
81
- const isUnsupportedNodeRuntime = () => {
82
- if (process.release?.name === 'node' && process.versions) {
83
- if (!semver.satisfies(process.versions.node, pkg.engines.node)) {
84
- return { found: process.versions.node, expected: pkg.engines.node };
85
- }
86
- }
87
- };
88
-
89
- const isEmscripten = () => {
90
- const { CC } = process.env;
91
- return Boolean(CC?.endsWith('/emcc'));
92
- };
93
-
94
- const isRosetta = () => {
95
- if (process.platform === 'darwin' && process.arch === 'x64') {
96
- const translated = spawnSync('sysctl sysctl.proc_translated', spawnSyncOptions).stdout;
97
- return (translated || '').trim() === 'sysctl.proc_translated: 1';
98
- }
99
- return false;
100
- };
101
-
102
- /* node:coverage enable */
103
-
104
- const sha512 = (s) => createHash('sha512').update(s).digest('hex');
105
-
106
- const yarnLocator = () => {
107
- try {
108
- const identHash = sha512(`imgsharp-libvips-${buildPlatformArch()}`);
109
- const npmVersion = semver.coerce(pkg.optionalDependencies[`@img/sharp-libvips-${buildPlatformArch()}`], {
110
- includePrerelease: true
111
- }).version;
112
- return sha512(`${identHash}npm:${npmVersion}`).slice(0, 10);
113
- } catch {}
114
- return '';
115
- };
116
-
117
- /* node:coverage disable */
118
-
119
- const spawnRebuild = () =>
120
- spawnSync(`node-gyp rebuild --directory=src ${isEmscripten() ? '--nodedir=emscripten' : ''}`, {
121
- ...spawnSyncOptions,
122
- stdio: 'inherit'
123
- }).status;
124
-
125
- const globalLibvipsVersion = () => {
126
- if (process.platform !== 'win32') {
127
- const globalLibvipsVersion = spawnSync('pkg-config --modversion vips-cpp', {
128
- ...spawnSyncOptions,
129
- env: {
130
- ...process.env,
131
- PKG_CONFIG_PATH: pkgConfigPath()
132
- }
133
- }).stdout;
134
- return (globalLibvipsVersion || '').trim();
135
- } else {
136
- return '';
137
- }
138
- };
139
-
140
- const getBrewPkgConfigPath = () => {
141
- try {
142
- const brewPrefix = (spawnSync('brew', ['--prefix'], { encoding: 'utf8' }).stdout || '').trim();
143
- if (brewPrefix) {
144
- return `${brewPrefix}/lib/pkgconfig`;
145
- }
146
- } catch (_err) {}
147
- return undefined;
148
- };
149
-
150
- const getPkgConfigPath = () => {
151
- try {
152
- const pkgConfigPath = (spawnSync('pkg-config', ['--variable', 'pc_path', 'pkg-config'], { encoding: 'utf8' }).stdout || '').trim();
153
- if (pkgConfigPath) {
154
- return pkgConfigPath;
155
- }
156
- } catch (_err) {}
157
- return undefined;
158
- };
159
-
160
- /* node:coverage enable */
161
-
162
- const pkgConfigPath = () => {
163
- if (process.platform !== 'win32') {
164
- return [
165
- getBrewPkgConfigPath(),
166
- getPkgConfigPath(),
167
- process.env.PKG_CONFIG_PATH
168
- ].filter(Boolean).join(':');
169
- } else {
170
- return '';
171
- }
172
- };
173
-
174
- const skipSearch = (status, reason, logger) => {
175
- if (logger) {
176
- logger(`Detected ${reason}, skipping search for globally-installed libvips`);
177
- }
178
- return status;
179
- };
180
-
181
- const useGlobalLibvips = (logger) => {
182
- if (Boolean(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS) === true) {
183
- return skipSearch(false, 'SHARP_IGNORE_GLOBAL_LIBVIPS', logger);
184
- }
185
- if (Boolean(process.env.SHARP_FORCE_GLOBAL_LIBVIPS) === true) {
186
- return skipSearch(true, 'SHARP_FORCE_GLOBAL_LIBVIPS', logger);
187
- }
188
- /* node:coverage ignore next 3 */
189
- if (isRosetta()) {
190
- return skipSearch(false, 'Rosetta', logger);
191
- }
192
- const globalVipsVersion = globalLibvipsVersion();
193
- /* node:coverage ignore next */
194
- return !!globalVipsVersion && semver.gte(globalVipsVersion, minimumLibvipsVersion);
195
- };
196
-
197
- export default {
198
- minimumLibvipsVersion,
199
- prebuiltPlatforms,
200
- buildPlatformArch,
201
- buildSharpLibvipsIncludeDir,
202
- buildSharpLibvipsCPlusPlusDir,
203
- buildSharpLibvipsLibDir,
204
- isUnsupportedNodeRuntime,
205
- runtimePlatformArch,
206
- log,
207
- yarnLocator,
208
- spawnRebuild,
209
- globalLibvipsVersion,
210
- pkgConfigPath,
211
- useGlobalLibvips
212
- };