@effect/platform 0.93.2 → 0.93.3
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/dist/cjs/HttpApiScalar.js +3 -3
- package/dist/cjs/HttpApiScalar.js.map +1 -1
- package/dist/dts/HttpApiScalar.d.ts +2 -10
- package/dist/dts/HttpApiScalar.d.ts.map +1 -1
- package/dist/esm/HttpApiScalar.js +3 -3
- package/dist/esm/HttpApiScalar.js.map +1 -1
- package/package.json +2 -2
- package/src/HttpApiScalar.ts +26 -37
|
@@ -22,7 +22,7 @@ const makeHandler = options => {
|
|
|
22
22
|
const spec = OpenApi.fromApi(options.api);
|
|
23
23
|
const source = options?.source;
|
|
24
24
|
const scalarConfig = {
|
|
25
|
-
_integration: "
|
|
25
|
+
_integration: "html",
|
|
26
26
|
...options?.scalar
|
|
27
27
|
};
|
|
28
28
|
const response = HttpServerResponse.html(`<!doctype html>
|
|
@@ -52,7 +52,7 @@ const makeHandler = options => {
|
|
|
52
52
|
* @since 1.0.0
|
|
53
53
|
* @category layers
|
|
54
54
|
*/
|
|
55
|
-
const layer = options => _HttpApiBuilder.Router.use(
|
|
55
|
+
const layer = options => _HttpApiBuilder.Router.use(Effect.fnUntraced(function* (router) {
|
|
56
56
|
const {
|
|
57
57
|
api
|
|
58
58
|
} = yield* _HttpApi.Api;
|
|
@@ -71,7 +71,7 @@ const layer = options => _HttpApiBuilder.Router.use(router => Effect.gen(functio
|
|
|
71
71
|
* @category layers
|
|
72
72
|
*/
|
|
73
73
|
exports.layer = layer;
|
|
74
|
-
const layerCdn = options => _HttpApiBuilder.Router.use(
|
|
74
|
+
const layerCdn = options => _HttpApiBuilder.Router.use(Effect.fnUntraced(function* (router) {
|
|
75
75
|
const {
|
|
76
76
|
api
|
|
77
77
|
} = yield* _HttpApi.Api;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpApiScalar.js","names":["Effect","_interopRequireWildcard","require","Layer","_HttpApi","_HttpApiBuilder","HttpLayerRouter","HttpServerResponse","Html","internal","OpenApi","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","makeHandler","options","spec","fromApi","api","source","scalarConfig","_integration","scalar","response","html","escape","info","title","description","escapeJson","_tag","version","succeed","layer","Router","use","
|
|
1
|
+
{"version":3,"file":"HttpApiScalar.js","names":["Effect","_interopRequireWildcard","require","Layer","_HttpApi","_HttpApiBuilder","HttpLayerRouter","HttpServerResponse","Html","internal","OpenApi","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","makeHandler","options","spec","fromApi","api","source","scalarConfig","_integration","scalar","response","html","escape","info","title","description","escapeJson","_tag","version","succeed","layer","Router","use","fnUntraced","router","Api","handler","javascript","path","exports","layerCdn","layerHttpLayerRouter","HttpRouter","add","effectDiscard","layerHttpLayerRouterCdn"],"sources":["../../src/HttpApiScalar.ts"],"sourcesContent":[null],"mappings":";;;;;;AAGA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAL,uBAAA,CAAAC,OAAA;AACA,IAAAK,kBAAA,GAAAN,uBAAA,CAAAC,OAAA;AACA,IAAAM,IAAA,GAAAP,uBAAA,CAAAC,OAAA;AACA,IAAAO,QAAA,GAAAR,uBAAA,CAAAC,OAAA;AACA,IAAAQ,OAAA,GAAAT,uBAAA,CAAAC,OAAA;AAAuC,SAAAD,wBAAAU,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAU,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAA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 import * as HttpLayerRouter from "./HttpLayerRouter.js";
|
|
|
6
6
|
* @since 1.0.0
|
|
7
7
|
* @category model
|
|
8
8
|
*/
|
|
9
|
-
export type ScalarThemeId = "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "
|
|
9
|
+
export type ScalarThemeId = "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "saturn" | "kepler" | "mars" | "deepSpace" | "laserwave" | "none";
|
|
10
10
|
/**
|
|
11
11
|
* @see https://github.com/scalar/scalar/blob/main/documentation/configuration.md
|
|
12
12
|
*
|
|
@@ -19,9 +19,7 @@ export type ScalarConfig = {
|
|
|
19
19
|
/** The layout to use for the references */
|
|
20
20
|
layout?: "modern" | "classic";
|
|
21
21
|
/** URL to a request proxy for the API client */
|
|
22
|
-
|
|
23
|
-
/** Whether the spec input should show */
|
|
24
|
-
isEditable?: boolean;
|
|
22
|
+
proxyUrl?: string;
|
|
25
23
|
/** Whether to show the sidebar */
|
|
26
24
|
showSidebar?: boolean;
|
|
27
25
|
/**
|
|
@@ -30,12 +28,6 @@ export type ScalarConfig = {
|
|
|
30
28
|
* Default: `false`
|
|
31
29
|
*/
|
|
32
30
|
hideModels?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Whether to show the “Download OpenAPI Document” button
|
|
35
|
-
*
|
|
36
|
-
* Default: `false`
|
|
37
|
-
*/
|
|
38
|
-
hideDownloadButton?: boolean;
|
|
39
31
|
/**
|
|
40
32
|
* Whether to show the “Test Request” button
|
|
41
33
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpApiScalar.d.ts","sourceRoot":"","sources":["../../src/HttpApiScalar.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAClC,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAE5C,OAAO,KAAK,eAAe,MAAM,sBAAsB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CAAA;IACjC,QAAQ,CAAC,IAAI,EAAE,IAAI,MAAM,EAAE,CAAA;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAA;CAC/B,KACE,KAAK,CAAC,KAAK,CACd,KAAK,EACL,KAAK,EACL,eAAe,CAAC,UAAU,CAgBL,CAAA"}
|
|
@@ -14,7 +14,7 @@ const makeHandler = options => {
|
|
|
14
14
|
const spec = OpenApi.fromApi(options.api);
|
|
15
15
|
const source = options?.source;
|
|
16
16
|
const scalarConfig = {
|
|
17
|
-
_integration: "
|
|
17
|
+
_integration: "html",
|
|
18
18
|
...options?.scalar
|
|
19
19
|
};
|
|
20
20
|
const response = HttpServerResponse.html(`<!doctype html>
|
|
@@ -44,7 +44,7 @@ const makeHandler = options => {
|
|
|
44
44
|
* @since 1.0.0
|
|
45
45
|
* @category layers
|
|
46
46
|
*/
|
|
47
|
-
export const layer = options => Router.use(
|
|
47
|
+
export const layer = options => Router.use(Effect.fnUntraced(function* (router) {
|
|
48
48
|
const {
|
|
49
49
|
api
|
|
50
50
|
} = yield* Api;
|
|
@@ -62,7 +62,7 @@ export const layer = options => Router.use(router => Effect.gen(function* () {
|
|
|
62
62
|
* @since 1.0.0
|
|
63
63
|
* @category layers
|
|
64
64
|
*/
|
|
65
|
-
export const layerCdn = options => Router.use(
|
|
65
|
+
export const layerCdn = options => Router.use(Effect.fnUntraced(function* (router) {
|
|
66
66
|
const {
|
|
67
67
|
api
|
|
68
68
|
} = yield* Api;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpApiScalar.js","names":["Effect","Layer","Api","Router","HttpLayerRouter","HttpServerResponse","Html","internal","OpenApi","makeHandler","options","spec","fromApi","api","source","scalarConfig","_integration","scalar","response","html","escape","info","title","description","escapeJson","_tag","version","succeed","layer","use","
|
|
1
|
+
{"version":3,"file":"HttpApiScalar.js","names":["Effect","Layer","Api","Router","HttpLayerRouter","HttpServerResponse","Html","internal","OpenApi","makeHandler","options","spec","fromApi","api","source","scalarConfig","_integration","scalar","response","html","escape","info","title","description","escapeJson","_tag","version","succeed","layer","use","fnUntraced","router","handler","javascript","get","path","layerCdn","layerHttpLayerRouter","HttpRouter","add","effectDiscard","layerHttpLayerRouterCdn"],"sources":["../../src/HttpApiScalar.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,SAASC,GAAG,QAAQ,cAAc;AAElC,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,OAAO,KAAKC,eAAe,MAAM,sBAAsB;AACvD,OAAO,KAAKC,kBAAkB,MAAM,yBAAyB;AAC7D,OAAO,KAAKC,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,QAAQ,MAAM,6BAA6B;AACvD,OAAO,KAAKC,OAAO,MAAM,cAAc;AA2FvC,MAAMC,WAAW,GAAIC,OAUpB,IAAI;EACH,MAAMC,IAAI,GAAGH,OAAO,CAACI,OAAO,CAACF,OAAO,CAACG,GAAU,CAAC;EAEhD,MAAMC,MAAM,GAAGJ,OAAO,EAAEI,MAAM;EAE9B,MAAMC,YAAY,GAAG;IACnBC,YAAY,EAAE,MAAM;IACpB,GAAGN,OAAO,EAAEO;GACb;EAED,MAAMC,QAAQ,GAAGb,kBAAkB,CAACc,IAAI,CAAC;;;;aAI9Bb,IAAI,CAACc,MAAM,CAACT,IAAI,CAACU,IAAI,CAACC,KAAK,CAAC;MAErC,CAACX,IAAI,CAACU,IAAI,CAACE,WAAW,GAClB,EAAE,GACF,qCAAqCjB,IAAI,CAACc,MAAM,CAACT,IAAI,CAACU,IAAI,CAACE,WAAW,CAAC,KAC7E;MAEE,CAACZ,IAAI,CAACU,IAAI,CAACE,WAAW,GAClB,EAAE,GACF,wCAAwCjB,IAAI,CAACc,MAAM,CAACT,IAAI,CAACU,IA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,OAAO,CAAC;AACtD,CAAC,CAAC,CAAC;AAEL;;;;AAIA,OAAO,MAAMK,oBAAoB,gBAU7BrC,MAAM,CAAC8B,UAAU,CAAC,WAAUpB,OAI/B;EACC,MAAMqB,MAAM,GAAG,OAAO3B,eAAe,CAACkC,UAAU;EAChD,MAAMN,OAAO,GAAGvB,WAAW,CAAC;IAC1B,GAAGC,OAAO;IACVI,MAAM,EAAE;MACNW,IAAI,EAAE,QAAQ;MACdX,MAAM,EAAEP,QAAQ,CAAC0B;;GAEpB,CAAC;EACF,OAAOF,MAAM,CAACQ,GAAG,CAAC,KAAK,EAAE7B,OAAO,CAACyB,IAAI,EAAEH,OAAO,CAAC;AACjD,CAAC,EAAE/B,KAAK,CAACuC,aAAa,CAAC;AAEvB;;;;AAIA,OAAO,MAAMC,uBAAuB,gBAWhCzC,MAAM,CAAC8B,UAAU,CAAC,WAAUpB,OAK/B;EACC,MAAMqB,MAAM,GAAG,OAAO3B,eAAe,CAACkC,UAAU;EAChD,MAAMN,OAAO,GAAGvB,WAAW,CAAC;IAC1B,GAAGC,OAAO;IACVI,MAAM,EAAE;MACNW,IAAI,EAAE,KAAK;MACXC,OAAO,EAAEhB,OAAO,EAAEgB;;GAErB,CAAC;EACF,OAAOK,MAAM,CAACQ,GAAG,CAAC,KAAK,EAAE7B,OAAO,CAACyB,IAAI,EAAEH,OAAO,CAAC;AACjD,CAAC,EAAE/B,KAAK,CAACuC,aAAa,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/platform",
|
|
3
|
-
"version": "0.93.
|
|
3
|
+
"version": "0.93.3",
|
|
4
4
|
"description": "Unified interfaces for common platform-specific services",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"multipasta": "^0.2.7"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"effect": "^3.19.
|
|
19
|
+
"effect": "^3.19.4"
|
|
20
20
|
},
|
|
21
21
|
"publishConfig": {
|
|
22
22
|
"provenance": true
|
package/src/HttpApiScalar.ts
CHANGED
|
@@ -23,10 +23,11 @@ export type ScalarThemeId =
|
|
|
23
23
|
| "purple"
|
|
24
24
|
| "solarized"
|
|
25
25
|
| "bluePlanet"
|
|
26
|
-
| "deepSpace"
|
|
27
26
|
| "saturn"
|
|
28
27
|
| "kepler"
|
|
29
28
|
| "mars"
|
|
29
|
+
| "deepSpace"
|
|
30
|
+
| "laserwave"
|
|
30
31
|
| "none"
|
|
31
32
|
|
|
32
33
|
/**
|
|
@@ -41,9 +42,7 @@ export type ScalarConfig = {
|
|
|
41
42
|
/** The layout to use for the references */
|
|
42
43
|
layout?: "modern" | "classic"
|
|
43
44
|
/** URL to a request proxy for the API client */
|
|
44
|
-
|
|
45
|
-
/** Whether the spec input should show */
|
|
46
|
-
isEditable?: boolean
|
|
45
|
+
proxyUrl?: string
|
|
47
46
|
/** Whether to show the sidebar */
|
|
48
47
|
showSidebar?: boolean
|
|
49
48
|
/**
|
|
@@ -52,12 +51,6 @@ export type ScalarConfig = {
|
|
|
52
51
|
* Default: `false`
|
|
53
52
|
*/
|
|
54
53
|
hideModels?: boolean
|
|
55
|
-
/**
|
|
56
|
-
* Whether to show the “Download OpenAPI Document” button
|
|
57
|
-
*
|
|
58
|
-
* Default: `false`
|
|
59
|
-
*/
|
|
60
|
-
hideDownloadButton?: boolean
|
|
61
54
|
/**
|
|
62
55
|
* Whether to show the “Test Request” button
|
|
63
56
|
*
|
|
@@ -124,7 +117,7 @@ const makeHandler = (options: {
|
|
|
124
117
|
const source = options?.source
|
|
125
118
|
|
|
126
119
|
const scalarConfig = {
|
|
127
|
-
_integration: "
|
|
120
|
+
_integration: "html",
|
|
128
121
|
...options?.scalar
|
|
129
122
|
}
|
|
130
123
|
|
|
@@ -175,20 +168,18 @@ export const layer = (options?: {
|
|
|
175
168
|
readonly path?: `/${string}` | undefined
|
|
176
169
|
readonly scalar?: ScalarConfig
|
|
177
170
|
}): Layer.Layer<never, never, Api> =>
|
|
178
|
-
Router.use((router)
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
})
|
|
189
|
-
yield* router.get(options?.path ?? "/docs", handler)
|
|
171
|
+
Router.use(Effect.fnUntraced(function*(router) {
|
|
172
|
+
const { api } = yield* Api
|
|
173
|
+
const handler = makeHandler({
|
|
174
|
+
...options,
|
|
175
|
+
api,
|
|
176
|
+
source: {
|
|
177
|
+
_tag: "Inline",
|
|
178
|
+
source: internal.javascript
|
|
179
|
+
}
|
|
190
180
|
})
|
|
191
|
-
|
|
181
|
+
yield* router.get(options?.path ?? "/docs", handler)
|
|
182
|
+
}))
|
|
192
183
|
|
|
193
184
|
/**
|
|
194
185
|
* @since 1.0.0
|
|
@@ -199,20 +190,18 @@ export const layerCdn = (options?: {
|
|
|
199
190
|
readonly scalar?: ScalarConfig
|
|
200
191
|
readonly version?: string | undefined
|
|
201
192
|
}): Layer.Layer<never, never, Api> =>
|
|
202
|
-
Router.use((router)
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
})
|
|
213
|
-
yield* router.get(options?.path ?? "/docs", handler)
|
|
193
|
+
Router.use(Effect.fnUntraced(function*(router) {
|
|
194
|
+
const { api } = yield* Api
|
|
195
|
+
const handler = makeHandler({
|
|
196
|
+
...options,
|
|
197
|
+
api,
|
|
198
|
+
source: {
|
|
199
|
+
_tag: "Cdn",
|
|
200
|
+
version: options?.version
|
|
201
|
+
}
|
|
214
202
|
})
|
|
215
|
-
|
|
203
|
+
yield* router.get(options?.path ?? "/docs", handler)
|
|
204
|
+
}))
|
|
216
205
|
|
|
217
206
|
/**
|
|
218
207
|
* @since 1.0.0
|