@scalar/core 0.3.16 → 0.3.17

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @scalar/core
2
2
 
3
+ ## 0.3.17
4
+
5
+ ### Patch Changes
6
+
7
+ - fd2c4ba: fix: html rendering does not output functions in arrays
8
+ - Updated dependencies [005fba9]
9
+ - @scalar/types@0.2.16
10
+
3
11
  ## 0.3.16
4
12
 
5
13
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"html-rendering.d.ts","sourceRoot":"","sources":["../../../src/libs/html-rendering/html-rendering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAA;AAGxG,YAAY,EAAE,0BAA0B,EAAE,CAAA;AA+C1C;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,oBAAoB,OAAO,CAAC,0BAA0B,CAAC,EAAE,oBAAgB,WAwBxG,CAAA;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,aAAa,EAAE,OAAO,CAAC,yBAAyB,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,UA6B5F;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,oBAAoB,OAAO,CAAC,yBAAyB,CAAC,KACrD,OAAO,CAAC,yBAAyB,CAkBnC,CAAA"}
1
+ {"version":3,"file":"html-rendering.d.ts","sourceRoot":"","sources":["../../../src/libs/html-rendering/html-rendering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAA;AAGxG,YAAY,EAAE,0BAA0B,EAAE,CAAA;AA+C1C;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,oBAAoB,OAAO,CAAC,0BAA0B,CAAC,EAAE,oBAAgB,WAwBxG,CAAA;AASD;;GAEG;AACH,wBAAgB,aAAa,CAAC,aAAa,EAAE,OAAO,CAAC,yBAAyB,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,UAiC5F;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,oBAAoB,OAAO,CAAC,yBAAyB,CAAC,KACrD,OAAO,CAAC,yBAAyB,CAkBnC,CAAA"}
@@ -65,6 +65,12 @@ const getHtmlDocument = (givenConfiguration, customTheme = '') => {
65
65
  </html>`;
66
66
  return content;
67
67
  };
68
+ /**
69
+ * Helper function to serialize arrays that may contain functions
70
+ */
71
+ const serializeArrayWithFunctions = (arr) => {
72
+ return `[${arr.map((item) => (typeof item === 'function' ? item.toString() : JSON.stringify(item))).join(', ')}]`;
73
+ };
68
74
  /**
69
75
  * The script tags to load the @scalar/api-reference package from the CDN.
70
76
  */
@@ -76,6 +82,11 @@ function getScriptTags(configuration, cdn) {
76
82
  functionProps.push(`"${key}": ${value.toString()}`);
77
83
  delete restConfig[key];
78
84
  }
85
+ else if (Array.isArray(value) && value.some((item) => typeof item === 'function')) {
86
+ // Handle arrays that contain functions (like plugins)
87
+ functionProps.push(`"${key}": ${serializeArrayWithFunctions(value)}`);
88
+ delete restConfig[key];
89
+ }
79
90
  }
80
91
  // Stringify the rest of the configuration
81
92
  const configString = JSON.stringify(restConfig, null, 2)
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "directory": "packages/core"
12
12
  },
13
13
  "keywords": [],
14
- "version": "0.3.16",
14
+ "version": "0.3.17",
15
15
  "engines": {
16
16
  "node": ">=20"
17
17
  },
@@ -35,11 +35,11 @@
35
35
  ],
36
36
  "module": "dist/index.js",
37
37
  "dependencies": {
38
- "@scalar/types": "0.2.15"
38
+ "@scalar/types": "0.2.16"
39
39
  },
40
40
  "devDependencies": {
41
- "vite": "6.1.6",
42
- "@scalar/build-tooling": "0.2.6"
41
+ "vite": "7.1.5",
42
+ "@scalar/build-tooling": "0.2.7"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "scalar-build-rollup",