@scalar/express-api-reference 0.4.189 → 0.4.192

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,31 @@
1
1
  # @scalar/express-api-reference
2
2
 
3
+ ## 0.4.192
4
+
5
+ ### Patch Changes
6
+
7
+ - bab7990: feat: use new @scalar/core to keep the dependency list short
8
+ - Updated dependencies [bab7990]
9
+ - @scalar/core@0.1.0
10
+
11
+ ## 0.4.191
12
+
13
+ ### Patch Changes
14
+
15
+ - @scalar/api-reference@1.25.129
16
+
17
+ ## 0.4.190
18
+
19
+ ### Patch Changes
20
+
21
+ - 12f1c67: fix: added types to fastify and express dockerfiles
22
+ - 989ad08: fix: include all packages in dockerfile
23
+ - Updated dependencies [89d8b75]
24
+ - Updated dependencies [479a2ef]
25
+ - Updated dependencies [b93b22f]
26
+ - Updated dependencies [89d8b75]
27
+ - @scalar/api-reference@1.25.128
28
+
3
29
  ## 0.4.189
4
30
 
5
31
  ### Patch Changes
@@ -1,5 +1,5 @@
1
- import type { ApiReferenceConfiguration } from './types';
2
1
  import type { Request, Response } from 'express';
2
+ import type { ApiReferenceConfiguration } from './types.ts';
3
3
  /**
4
4
  * The custom theme CSS for the Express theme
5
5
  */
@@ -7,5 +7,5 @@ export declare const customTheme = "\n/* basic theme */\n.light-mode {\n --scal
7
7
  /**
8
8
  * The route handler to render the Scalar API Reference.
9
9
  */
10
- export declare function apiReference(givenConfiguration: ApiReferenceConfiguration): (_: Request, res: Response) => void;
10
+ export declare function apiReference(givenConfiguration: Partial<ApiReferenceConfiguration>): (_: Request, res: Response) => Response<any, Record<string, any>>;
11
11
  //# sourceMappingURL=apiReference.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apiReference.d.ts","sourceRoot":"","sources":["../src/apiReference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAExD,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAShD;;GAEG;AACH,eAAO,MAAM,WAAW,mnGA8FvB,CAAA;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,kBAAkB,EAAE,yBAAyB,OAQ7D,OAAO,OAAO,QAAQ,UAGlC"}
1
+ {"version":3,"file":"apiReference.d.ts","sourceRoot":"","sources":["../src/apiReference.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEhD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA;AAE3D;;GAEG;AACH,eAAO,MAAM,WAAW,mnGA8FvB,CAAA;AASD;;GAEG;AACH,wBAAgB,YAAY,CAAC,kBAAkB,EAAE,OAAO,CAAC,yBAAyB,CAAC,OAQtE,OAAO,OAAO,QAAQ,wCAClC"}
@@ -1,11 +1,5 @@
1
- import { getHtmlDocument } from '@scalar/api-reference/lib/html-rendering';
1
+ import { getHtmlDocument } from '@scalar/core/libs/html-rendering';
2
2
 
3
- /**
4
- * The default configuration for the API Reference.
5
- */
6
- const DEFAULT_CONFIGURATION = {
7
- _integration: 'express',
8
- };
9
3
  /**
10
4
  * The custom theme CSS for the Express theme
11
5
  */
@@ -104,6 +98,12 @@ const customTheme = `
104
98
  --scalar-radius-xl: 3px;
105
99
  }
106
100
  `;
101
+ /**
102
+ * The default configuration for the API Reference.
103
+ */
104
+ const DEFAULT_CONFIGURATION = {
105
+ _integration: 'express',
106
+ };
107
107
  /**
108
108
  * The route handler to render the Scalar API Reference.
109
109
  */
@@ -114,9 +114,7 @@ function apiReference(givenConfiguration) {
114
114
  ...givenConfiguration,
115
115
  };
116
116
  // Respond with the HTML document
117
- return (_, res) => {
118
- res.type('text/html').send(getHtmlDocument(configuration, customTheme));
119
- };
117
+ return (_, res) => res.type('text/html').send(getHtmlDocument(configuration, customTheme));
120
118
  }
121
119
 
122
120
  export { apiReference, customTheme };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from './apiReference.js';
2
- export * from './types';
1
+ export { apiReference } from './apiReference.ts';
2
+ export type { ApiReferenceConfiguration } from './types.ts';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,YAAY,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAA"}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { apiReference, customTheme } from './apiReference.js';
1
+ export { apiReference } from './apiReference.js';
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { HtmlRenderingConfiguration } from '@scalar/api-reference/lib/html-rendering';
1
+ import type { HtmlRenderingConfiguration } from '@scalar/core/libs/html-rendering';
2
2
  /**
3
3
  * The configuration for the Scalar API Reference for Express
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAA;AAE1F;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,0BAA0B,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAA;AAElF;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,0BAA0B,CAAA"}
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "git+https://github.com/scalar/scalar.git",
11
11
  "directory": "integrations/express"
12
12
  },
13
- "version": "0.4.189",
13
+ "version": "0.4.192",
14
14
  "engines": {
15
15
  "node": ">=18"
16
16
  },
@@ -30,8 +30,7 @@
30
30
  ],
31
31
  "module": "dist/index.js",
32
32
  "dependencies": {
33
- "@scalar/api-reference": "1.25.127",
34
- "@scalar/types": "0.0.36"
33
+ "@scalar/core": "0.1.0"
35
34
  },
36
35
  "devDependencies": {
37
36
  "@types/express": "^4.17.21",
@@ -40,7 +39,7 @@
40
39
  "supertest": "^6.3.3",
41
40
  "vite": "^5.4.10",
42
41
  "vitest": "^1.6.0",
43
- "@scalar/build-tooling": "0.1.15"
42
+ "@scalar/build-tooling": "0.1.16"
44
43
  },
45
44
  "scripts": {
46
45
  "build": "scalar-build-rollup",