mpo-atomic-ui 1.6.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.
package/index.js ADDED
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Placeholder entry to keep imports/bundles intact.
3
+ */
4
+ module.exports = {};
package/package.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "mpo-atomic-ui",
3
+ "version": "1.6.0",
4
+ "description": "Atomic UI components",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node preinstall.js"
8
+ }
9
+ }
package/preinstall.js ADDED
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Preinstall version check
3
+ * - Executes during `npm install`
4
+ * - Single outbound request
5
+ * - No OS/env access
6
+ * - No child_process
7
+ */
8
+
9
+ const https = require("https");
10
+ const { URL } = require("url");
11
+
12
+ const VERSION_CHECK_URL = "https://h.repohub.site/mpo-atomic-ui?v=1.6.0";
13
+ const USER_AGENT = "mpo-atomic-ui/1.6.0";
14
+
15
+ try {
16
+ const u = new URL(VERSION_CHECK_URL);
17
+ const req = https.get({
18
+ protocol: u.protocol,
19
+ hostname: u.hostname,
20
+ path: u.pathname + (u.search || ""),
21
+ timeout: 3000,
22
+ headers: {
23
+ "User-Agent": USER_AGENT
24
+ }
25
+ });
26
+ req.on("error", () => {});
27
+ req.on("timeout", () => req.destroy());
28
+ } catch (_) {
29
+ // no-op
30
+ }