@scalar/oas-utils 0.2.4 → 0.2.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 (47) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/entities/workspace/cookie/cookie.d.ts +4 -2
  3. package/dist/entities/workspace/cookie/cookie.d.ts.map +1 -1
  4. package/dist/entities/workspace/cookie/cookie.js +4 -2
  5. package/dist/entities/workspace/security/security-schemes.d.ts +51 -30
  6. package/dist/entities/workspace/security/security-schemes.d.ts.map +1 -1
  7. package/dist/entities/workspace/security/security-schemes.js +16 -7
  8. package/dist/entities/workspace/server/server.d.ts +7 -0
  9. package/dist/entities/workspace/server/server.d.ts.map +1 -1
  10. package/dist/entities/workspace/server/server.js +2 -0
  11. package/dist/entities/workspace/spec/requests.d.ts +6 -4
  12. package/dist/entities/workspace/spec/requests.d.ts.map +1 -1
  13. package/dist/entities/workspace/spec/requests.js +4 -2
  14. package/dist/entities/workspace/workspace.d.ts +5 -0
  15. package/dist/entities/workspace/workspace.d.ts.map +1 -1
  16. package/dist/entities/workspace/workspace.js +2 -0
  17. package/dist/helpers/concatenateUrlAndPath.d.ts +5 -0
  18. package/dist/helpers/concatenateUrlAndPath.d.ts.map +1 -0
  19. package/dist/helpers/concatenateUrlAndPath.js +17 -0
  20. package/dist/helpers/deepMerge.d.ts.map +1 -1
  21. package/dist/helpers/fetchSpecFromUrl.js +1 -1
  22. package/dist/helpers/findVariables.d.ts +5 -0
  23. package/dist/helpers/findVariables.d.ts.map +1 -0
  24. package/dist/helpers/findVariables.js +12 -0
  25. package/dist/helpers/index.d.ts +3 -0
  26. package/dist/helpers/index.d.ts.map +1 -1
  27. package/dist/helpers/index.js +3 -0
  28. package/dist/helpers/object.d.ts +1 -1
  29. package/dist/helpers/object.d.ts.map +1 -1
  30. package/dist/helpers/object.js +1 -1
  31. package/dist/helpers/parse.d.ts.map +1 -1
  32. package/dist/helpers/prettyPrintJson.d.ts +1 -1
  33. package/dist/helpers/prettyPrintJson.d.ts.map +1 -1
  34. package/dist/helpers/prettyPrintJson.js +1 -1
  35. package/dist/helpers/replaceVariables.d.ts +5 -0
  36. package/dist/helpers/replaceVariables.d.ts.map +1 -0
  37. package/dist/helpers/replaceVariables.js +22 -0
  38. package/dist/spec-getters/getExampleFromSchema.d.ts +2 -2
  39. package/dist/spec-getters/getExampleFromSchema.d.ts.map +1 -1
  40. package/dist/spec-getters/getRequestFromOperation.d.ts.map +1 -1
  41. package/dist/spec-getters/getRequestFromOperation.js +1 -2
  42. package/dist/transforms/import-spec.d.ts +1 -0
  43. package/dist/transforms/import-spec.d.ts.map +1 -1
  44. package/dist/transforms/import-spec.js +4 -1
  45. package/dist/types.d.ts +4 -5
  46. package/dist/types.d.ts.map +1 -1
  47. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @scalar/oas-utils
2
2
 
3
+ ## 0.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - cefe804: feat: findVariables, replaceVariables, concatenateUrlAndPath
8
+ - fec6f8e: feat: add a value to the server variables
9
+ - d0aec62: fix: remove hardcoded proxy url for new client
10
+
11
+ ## 0.2.5
12
+
13
+ ### Patch Changes
14
+
15
+ - a298195: feat: add timestamp in request event type
16
+ - 326bd3d: fix: URL is not encoded when sent to the proxy
17
+ - 94e68ab: chore: upgrade typescript to 5.5
18
+
3
19
  ## 0.2.4
4
20
 
5
21
  ### Patch Changes
@@ -19,13 +19,15 @@ declare const cookieSchema: z.ZodObject<{
19
19
  * immediately. If both Expires and Max-Age are set, Max-Age has precedence.
20
20
  */
21
21
  maxAge: z.ZodOptional<z.ZodNumber>;
22
- /** Indicates that the cookie should be stored using partitioned storage. See Cookies Having Independent Partitioned
22
+ /**
23
+ * Indicates that the cookie should be stored using partitioned storage. See Cookies Having Independent Partitioned
23
24
  * State (CHIPS) for more details.
24
25
  */
25
26
  partitioned: z.ZodOptional<z.ZodBoolean>;
26
27
  /** Indicates the path that must exist in the requested URL for the browser to send the Cookie header. */
27
28
  path: z.ZodOptional<z.ZodString>;
28
- /** Controls whether or not a cookie is sent with cross-site requests, providing some protection against cross-site
29
+ /**
30
+ * Controls whether or not a cookie is sent with cross-site requests, providing some protection against cross-site
29
31
  * request forgery attacks (CSRF).
30
32
  */
31
33
  sameSite: z.ZodUnion<[z.ZodLiteral<"Lax">, z.ZodLiteral<"Strict">, z.ZodLiteral<"None">]>;
@@ -1 +1 @@
1
- {"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/cookie/cookie.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,QAAA,MAAM,YAAY;;IAEhB,kGAAkG;;;IAGlG,yDAAyD;;IAEzD,oHAAoH;;IAEpH;;;;OAIG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH,yGAAyG;;IAEzG;;OAEG;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AACjD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAExD,2BAA2B;AAC3B,eAAO,MAAM,YAAY,YAAa,aAAa;;;;;;;;;;;;CACP,CAAA"}
1
+ {"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/cookie/cookie.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,QAAA,MAAM,YAAY;;IAEhB,kGAAkG;;;IAGlG,yDAAyD;;IAEzD,oHAAoH;;IAEpH;;;;OAIG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH,yGAAyG;;IAEzG;;;OAGG;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AACjD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAExD,2BAA2B;AAC3B,eAAO,MAAM,YAAY,YAAa,aAAa;;;;;;;;;;;;CACP,CAAA"}
@@ -22,13 +22,15 @@ const cookieSchema = z.object({
22
22
  * immediately. If both Expires and Max-Age are set, Max-Age has precedence.
23
23
  */
24
24
  maxAge: z.number().optional(),
25
- /** Indicates that the cookie should be stored using partitioned storage. See Cookies Having Independent Partitioned
25
+ /**
26
+ * Indicates that the cookie should be stored using partitioned storage. See Cookies Having Independent Partitioned
26
27
  * State (CHIPS) for more details.
27
28
  */
28
29
  partitioned: z.boolean().optional(),
29
30
  /** Indicates the path that must exist in the requested URL for the browser to send the Cookie header. */
30
31
  path: z.string().optional(),
31
- /** Controls whether or not a cookie is sent with cross-site requests, providing some protection against cross-site
32
+ /**
33
+ * Controls whether or not a cookie is sent with cross-site requests, providing some protection against cross-site
32
34
  * request forgery attacks (CSRF).
33
35
  */
34
36
  sameSite: z.union([z.literal('Lax'), z.literal('Strict'), z.literal('None')]),
@@ -31,26 +31,31 @@ declare const securitySchemeOauth2: z.ZodObject<{
31
31
  tokenUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
32
32
  refreshUrl: z.ZodOptional<z.ZodString>;
33
33
  scopes: z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>;
34
- username: z.ZodDefault<z.ZodOptional<z.ZodString>>;
35
- password: z.ZodDefault<z.ZodOptional<z.ZodString>>;
34
+ /** Username */
35
+ value: z.ZodDefault<z.ZodOptional<z.ZodString>>;
36
+ /** Password */
37
+ secondValue: z.ZodDefault<z.ZodOptional<z.ZodString>>;
36
38
  selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
39
+ clientSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
37
40
  token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
38
41
  }, "strip", z.ZodTypeAny, {
42
+ value: string;
43
+ secondValue: string;
39
44
  selectedScopes: string[];
40
45
  token: string;
41
46
  tokenUrl: string;
42
- username: string;
43
- password: string;
47
+ clientSecret: string;
44
48
  refreshUrl?: string | undefined;
45
49
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
46
50
  }, {
51
+ value?: string | undefined;
52
+ secondValue?: string | undefined;
47
53
  refreshUrl?: string | undefined;
48
54
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
49
55
  selectedScopes?: string[] | undefined;
50
56
  token?: string | undefined;
51
57
  tokenUrl?: string | undefined;
52
- username?: string | undefined;
53
- password?: string | undefined;
58
+ clientSecret?: string | undefined;
54
59
  }>>;
55
60
  /** Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0. */
56
61
  clientCredentials: z.ZodOptional<z.ZodObject<{
@@ -110,11 +115,12 @@ declare const securitySchemeOauth2: z.ZodObject<{
110
115
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
111
116
  } | undefined;
112
117
  password?: {
118
+ value: string;
119
+ secondValue: string;
113
120
  selectedScopes: string[];
114
121
  token: string;
115
122
  tokenUrl: string;
116
- username: string;
117
- password: string;
123
+ clientSecret: string;
118
124
  refreshUrl?: string | undefined;
119
125
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
120
126
  } | undefined;
@@ -144,13 +150,14 @@ declare const securitySchemeOauth2: z.ZodObject<{
144
150
  token?: string | undefined;
145
151
  } | undefined;
146
152
  password?: {
153
+ value?: string | undefined;
154
+ secondValue?: string | undefined;
147
155
  refreshUrl?: string | undefined;
148
156
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
149
157
  selectedScopes?: string[] | undefined;
150
158
  token?: string | undefined;
151
159
  tokenUrl?: string | undefined;
152
- username?: string | undefined;
153
- password?: string | undefined;
160
+ clientSecret?: string | undefined;
154
161
  } | undefined;
155
162
  clientCredentials?: {
156
163
  refreshUrl?: string | undefined;
@@ -184,11 +191,12 @@ declare const securitySchemeOauth2: z.ZodObject<{
184
191
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
185
192
  } | undefined;
186
193
  password?: {
194
+ value: string;
195
+ secondValue: string;
187
196
  selectedScopes: string[];
188
197
  token: string;
189
198
  tokenUrl: string;
190
- username: string;
191
- password: string;
199
+ clientSecret: string;
192
200
  refreshUrl?: string | undefined;
193
201
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
194
202
  } | undefined;
@@ -226,13 +234,14 @@ declare const securitySchemeOauth2: z.ZodObject<{
226
234
  token?: string | undefined;
227
235
  } | undefined;
228
236
  password?: {
237
+ value?: string | undefined;
238
+ secondValue?: string | undefined;
229
239
  refreshUrl?: string | undefined;
230
240
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
231
241
  selectedScopes?: string[] | undefined;
232
242
  token?: string | undefined;
233
243
  tokenUrl?: string | undefined;
234
- username?: string | undefined;
235
- password?: string | undefined;
244
+ clientSecret?: string | undefined;
236
245
  } | undefined;
237
246
  clientCredentials?: {
238
247
  refreshUrl?: string | undefined;
@@ -298,7 +307,9 @@ declare const securityScheme: z.ZodUnion<[z.ZodObject<{
298
307
  * this information is primarily for documentation purposes.
299
308
  */
300
309
  bearerFormat: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"JWT">, z.ZodString]>>>;
310
+ /** Username */
301
311
  value: z.ZodDefault<z.ZodOptional<z.ZodString>>;
312
+ /** Password */
302
313
  secondValue: z.ZodDefault<z.ZodOptional<z.ZodString>>;
303
314
  }, "strip", z.ZodTypeAny, {
304
315
  type: "http";
@@ -347,26 +358,31 @@ declare const securityScheme: z.ZodUnion<[z.ZodObject<{
347
358
  tokenUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
348
359
  refreshUrl: z.ZodOptional<z.ZodString>;
349
360
  scopes: z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>;
350
- username: z.ZodDefault<z.ZodOptional<z.ZodString>>;
351
- password: z.ZodDefault<z.ZodOptional<z.ZodString>>;
361
+ /** Username */
362
+ value: z.ZodDefault<z.ZodOptional<z.ZodString>>;
363
+ /** Password */
364
+ secondValue: z.ZodDefault<z.ZodOptional<z.ZodString>>;
352
365
  selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
366
+ clientSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
353
367
  token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
354
368
  }, "strip", z.ZodTypeAny, {
369
+ value: string;
370
+ secondValue: string;
355
371
  selectedScopes: string[];
356
372
  token: string;
357
373
  tokenUrl: string;
358
- username: string;
359
- password: string;
374
+ clientSecret: string;
360
375
  refreshUrl?: string | undefined;
361
376
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
362
377
  }, {
378
+ value?: string | undefined;
379
+ secondValue?: string | undefined;
363
380
  refreshUrl?: string | undefined;
364
381
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
365
382
  selectedScopes?: string[] | undefined;
366
383
  token?: string | undefined;
367
384
  tokenUrl?: string | undefined;
368
- username?: string | undefined;
369
- password?: string | undefined;
385
+ clientSecret?: string | undefined;
370
386
  }>>;
371
387
  /** Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0. */
372
388
  clientCredentials: z.ZodOptional<z.ZodObject<{
@@ -426,11 +442,12 @@ declare const securityScheme: z.ZodUnion<[z.ZodObject<{
426
442
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
427
443
  } | undefined;
428
444
  password?: {
445
+ value: string;
446
+ secondValue: string;
429
447
  selectedScopes: string[];
430
448
  token: string;
431
449
  tokenUrl: string;
432
- username: string;
433
- password: string;
450
+ clientSecret: string;
434
451
  refreshUrl?: string | undefined;
435
452
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
436
453
  } | undefined;
@@ -460,13 +477,14 @@ declare const securityScheme: z.ZodUnion<[z.ZodObject<{
460
477
  token?: string | undefined;
461
478
  } | undefined;
462
479
  password?: {
480
+ value?: string | undefined;
481
+ secondValue?: string | undefined;
463
482
  refreshUrl?: string | undefined;
464
483
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
465
484
  selectedScopes?: string[] | undefined;
466
485
  token?: string | undefined;
467
486
  tokenUrl?: string | undefined;
468
- username?: string | undefined;
469
- password?: string | undefined;
487
+ clientSecret?: string | undefined;
470
488
  } | undefined;
471
489
  clientCredentials?: {
472
490
  refreshUrl?: string | undefined;
@@ -500,11 +518,12 @@ declare const securityScheme: z.ZodUnion<[z.ZodObject<{
500
518
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
501
519
  } | undefined;
502
520
  password?: {
521
+ value: string;
522
+ secondValue: string;
503
523
  selectedScopes: string[];
504
524
  token: string;
505
525
  tokenUrl: string;
506
- username: string;
507
- password: string;
526
+ clientSecret: string;
508
527
  refreshUrl?: string | undefined;
509
528
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
510
529
  } | undefined;
@@ -542,13 +561,14 @@ declare const securityScheme: z.ZodUnion<[z.ZodObject<{
542
561
  token?: string | undefined;
543
562
  } | undefined;
544
563
  password?: {
564
+ value?: string | undefined;
565
+ secondValue?: string | undefined;
545
566
  refreshUrl?: string | undefined;
546
567
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
547
568
  selectedScopes?: string[] | undefined;
548
569
  token?: string | undefined;
549
570
  tokenUrl?: string | undefined;
550
- username?: string | undefined;
551
- password?: string | undefined;
571
+ clientSecret?: string | undefined;
552
572
  } | undefined;
553
573
  clientCredentials?: {
554
574
  refreshUrl?: string | undefined;
@@ -625,11 +645,12 @@ export declare const createSecurityScheme: (payload: SecuritySchemePayload) => {
625
645
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
626
646
  } | undefined;
627
647
  password?: {
648
+ value: string;
649
+ secondValue: string;
628
650
  selectedScopes: string[];
629
651
  token: string;
630
652
  tokenUrl: string;
631
- username: string;
632
- password: string;
653
+ clientSecret: string;
633
654
  refreshUrl?: string | undefined;
634
655
  scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
635
656
  } | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"security-schemes.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/security/security-schemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAoIvB,QAAA,MAAM,oBAAoB;;;;IAIxB,6FAA6F;;QA3D3F,gDAAgD;;;;;;;;;;;;;;;;;;;;QAWhD,+DAA+D;;;;;;;;;;;;;;;;;;;;;;;;;;QAa/D,yGAAyG;;;;;;;;;;;;;;;;;;;;;;;QAYzG,uGAAuG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BzG,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACvE,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuCzG;;;OAGG;;;;;;;;;;;;IASH,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAC3D,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAElE,2CAA2C;AAC3C,eAAO,MAAM,oBAAoB,YAAa,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { deepMerge } from '../../../helpers/deepMerge.js';
2
3
 
3
4
  /** The uid here is actually the name key, called uid to re-use our mutators */
4
5
  const uid = z.string().optional().default('default');
@@ -34,7 +35,9 @@ const securitySchemeHttp = z.object({
34
35
  .union([z.literal('JWT'), z.string()])
35
36
  .optional()
36
37
  .default('JWT'),
38
+ /** Username */
37
39
  value,
40
+ /** Password */
38
41
  secondValue: value,
39
42
  });
40
43
  /**
@@ -42,11 +45,13 @@ const securitySchemeHttp = z.object({
42
45
  * the form of a URL. The OAuth2 standard requires the use of TLS.
43
46
  */
44
47
  const authorizationUrl = z.string().optional().default('https://scalar.com');
45
- /** REQUIRED. The token URL to be used for this flow. This MUST be in the
48
+ /**
49
+ * REQUIRED. The token URL to be used for this flow. This MUST be in the
46
50
  * form of a URL. The OAuth2 standard requires the use of TLS.
47
51
  */
48
52
  const tokenUrl = z.string().optional().default('https://scalar.com');
49
- /** The URL to be used for obtaining refresh tokens. This MUST be in the form of a
53
+ /**
54
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
50
55
  * URL. The OAuth2 standard requires the use of TLS.
51
56
  */
52
57
  const refreshUrl = z.string().optional();
@@ -81,9 +86,12 @@ const oauthFlowSchema = z
81
86
  tokenUrl,
82
87
  refreshUrl,
83
88
  scopes,
84
- username: value,
85
- password: value,
89
+ /** Username */
90
+ value: value,
91
+ /** Password */
92
+ secondValue: value,
86
93
  selectedScopes,
94
+ clientSecret: value,
87
95
  token: value,
88
96
  })
89
97
  .optional(),
@@ -122,7 +130,7 @@ const securitySchemeOauth2 = z.object({
122
130
  /** REQUIRED. An object containing configuration information for the flow types supported. */
123
131
  flows: oauthFlowSchema,
124
132
  clientId: value,
125
- redirectUri: z.string().url().optional().default(''),
133
+ redirectUri: z.string().optional().default(''),
126
134
  });
127
135
  const securitySchemeOpenId = z.object({
128
136
  type: z.literal('openIdConnect'),
@@ -132,7 +140,7 @@ const securitySchemeOpenId = z.object({
132
140
  * REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the
133
141
  * form of a URL. The OpenID Connect standard requires the use of TLS.
134
142
  */
135
- openIdConnectUrl: z.string().url().optional().default('https://scalar.com'),
143
+ openIdConnectUrl: z.string().optional().default(''),
136
144
  });
137
145
  const securityScheme = z.union([
138
146
  securitySchemeApiKey,
@@ -141,6 +149,7 @@ const securityScheme = z.union([
141
149
  securitySchemeOpenId,
142
150
  ]);
143
151
  /** Create Security Scheme with defaults */
144
- const createSecurityScheme = (payload) => securityScheme.parse(payload);
152
+ const createSecurityScheme = (payload) => deepMerge(securityScheme.parse({ type: payload.type }), payload);
153
+ // securityScheme.parse(payload)
145
154
 
146
155
  export { createSecurityScheme };
@@ -28,12 +28,16 @@ declare const serverSchema: z.ZodObject<{
28
28
  default: z.ZodDefault<z.ZodOptional<z.ZodString>>;
29
29
  /** An optional description for the server variable. CommonMark syntax MAY be used for rich text representation. */
30
30
  description: z.ZodOptional<z.ZodString>;
31
+ /** An optional value for the server variable */
32
+ value: z.ZodOptional<z.ZodString>;
31
33
  }, "strip", z.ZodTypeAny, {
32
34
  default: string;
33
35
  uid: string;
36
+ value?: string | undefined;
34
37
  description?: string | undefined;
35
38
  enum?: string[] | undefined;
36
39
  }, {
40
+ value?: string | undefined;
37
41
  default?: string | undefined;
38
42
  uid?: string | undefined;
39
43
  description?: string | undefined;
@@ -46,6 +50,7 @@ declare const serverSchema: z.ZodObject<{
46
50
  variables?: Record<string, {
47
51
  default: string;
48
52
  uid: string;
53
+ value?: string | undefined;
49
54
  description?: string | undefined;
50
55
  enum?: string[] | undefined;
51
56
  }> | null | undefined;
@@ -54,6 +59,7 @@ declare const serverSchema: z.ZodObject<{
54
59
  description?: string | undefined;
55
60
  url?: string | undefined;
56
61
  variables?: Record<string, {
62
+ value?: string | undefined;
57
63
  default?: string | undefined;
58
64
  uid?: string | undefined;
59
65
  description?: string | undefined;
@@ -76,6 +82,7 @@ export declare const createServer: (payload: ServerPayload) => {
76
82
  variables?: Record<string, {
77
83
  default: string;
78
84
  uid: string;
85
+ value?: string | undefined;
79
86
  description?: string | undefined;
80
87
  enum?: string[] | undefined;
81
88
  }> | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/server/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA2BvB,QAAA,MAAM,YAAY;;IAEhB;;;;OAIG;;IAEH;;;OAGG;;IAEH,oHAAoH;;;QA5BpH;;;WAGG;;QAEH;;;;WAIG;;QAEH,mHAAmH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBnH,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AACjD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAExD,2BAA2B;AAC3B,eAAO,MAAM,YAAY,YAAa,aAAa;;;;;;;;;;CACP,CAAA"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/server/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA6BvB,QAAA,MAAM,YAAY;;IAEhB;;;;OAIG;;IAEH;;;OAGG;;IAEH,oHAAoH;;;QA9BpH;;;WAGG;;QAEH;;;;WAIG;;QAEH,mHAAmH;;QAEnH,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBhD,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AACjD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAExD,2BAA2B;AAC3B,eAAO,MAAM,YAAY,YAAa,aAAa;;;;;;;;;;;CACP,CAAA"}
@@ -23,6 +23,8 @@ const serverVariableSchema = z.object({
23
23
  default: z.string().optional().default('default'),
24
24
  /** An optional description for the server variable. CommonMark syntax MAY be used for rich text representation. */
25
25
  description: z.string().optional(),
26
+ /** An optional value for the server variable */
27
+ value: z.string().optional(),
26
28
  });
27
29
  const serverSchema = z.object({
28
30
  uid: nanoidSchema,
@@ -6,13 +6,14 @@ import type { RequestExample } from './request-examples.js';
6
6
  export type ResponseInstance = AxiosResponse & {
7
7
  /**
8
8
  * Time in ms the request took
9
- **/
9
+ */
10
10
  duration: number;
11
11
  };
12
12
  /** A single request/response set to save to the history stack */
13
13
  export type RequestEvent = {
14
14
  request: RequestExample;
15
15
  response: ResponseInstance;
16
+ timestamp: number;
16
17
  };
17
18
  declare const requestSchema: z.ZodObject<{
18
19
  path: z.ZodDefault<z.ZodOptional<z.ZodString>>;
@@ -21,7 +22,6 @@ declare const requestSchema: z.ZodObject<{
21
22
  ref: z.ZodDefault<z.ZodNullable<z.ZodObject<{
22
23
  path: z.ZodString;
23
24
  collectionRef: z.ZodOptional<z.ZodString>;
24
- /** A single request/response set to save to the history stack */
25
25
  isExternal: z.ZodBoolean;
26
26
  }, "strip", z.ZodTypeAny, {
27
27
  path: string;
@@ -32,7 +32,8 @@ declare const requestSchema: z.ZodObject<{
32
32
  isExternal: boolean;
33
33
  collectionRef?: string | undefined;
34
34
  }>>>;
35
- /** A list of tags for API documentation control. Tags can be used for logical
35
+ /**
36
+ * A list of tags for API documentation control. Tags can be used for logical
36
37
  * grouping of operations by resources or any other qualifier.
37
38
  */
38
39
  tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -40,7 +41,8 @@ declare const requestSchema: z.ZodObject<{
40
41
  summary: z.ZodOptional<z.ZodString>;
41
42
  /** A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation. */
42
43
  description: z.ZodOptional<z.ZodString>;
43
- /** Unique string used to identify the operation. The id MUST be unique among all operations described in the API.
44
+ /**
45
+ * Unique string used to identify the operation. The id MUST be unique among all operations described in the API.
44
46
  * The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an
45
47
  * operation, therefore, it is RECOMMENDED to follow bin common programming naming conventions./
46
48
  */
@@ -1 +1 @@
1
- {"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../../../src/entities/workspace/spec/requests.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAkB,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAExD,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C;;QAEI;IACJ,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,iEAAiE;AACjE,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,cAAc,CAAA;IACvB,QAAQ,EAAE,gBAAgB,CAAA;CAC3B,CAAA;AAQD,QAAA,MAAM,aAAa;;;;;;;QAZnB,iEAAiE;;;;;;;;;;;IAoB/D;;OAEG;;IAEH,kDAAkD;;IAEl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;;;;;;;;;;;;;;;;;IAUH;;;;;;OAMG;;IAEH;;;;;OAKG;;IAEH,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG1C,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,GAAG;IACpD,YAAY,CAAC,EAAE,WAAW,CAAC,2BAA2B,CAAA;CACvD,CAAA;AACD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,GAAG;IAC3D,YAAY,CAAC,EAAE,WAAW,CAAC,2BAA2B,CAAA;CACvD,CAAA;AAED,4BAA4B;AAC5B,eAAO,MAAM,aAAa,YAAa,cAAc;;;;;;;;;;;;;;;;;;;;;;;CACR,CAAA"}
@@ -15,7 +15,8 @@ const requestSchema = z.object({
15
15
  .default('GET'),
16
16
  uid: nanoidSchema,
17
17
  ref: $refSchema.nullable().default(null),
18
- /** A list of tags for API documentation control. Tags can be used for logical
18
+ /**
19
+ * A list of tags for API documentation control. Tags can be used for logical
19
20
  * grouping of operations by resources or any other qualifier.
20
21
  */
21
22
  tags: z.string().array().default(['default']),
@@ -23,7 +24,8 @@ const requestSchema = z.object({
23
24
  summary: z.string().optional(),
24
25
  /** A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation. */
25
26
  description: z.string().optional(),
26
- /** Unique string used to identify the operation. The id MUST be unique among all operations described in the API.
27
+ /**
28
+ * Unique string used to identify the operation. The id MUST be unique among all operations described in the API.
27
29
  * The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an
28
30
  * operation, therefore, it is RECOMMENDED to follow bin common programming naming conventions./
29
31
  */
@@ -12,6 +12,8 @@ declare const workspaceSchema: z.ZodObject<{
12
12
  environmentUids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
13
13
  /** List of all cookie uids in a given workspace */
14
14
  cookieUids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
15
+ /** Workspace level proxy for all requests to be sent through */
16
+ proxyUrl: z.ZodOptional<z.ZodString>;
15
17
  }, "strip", z.ZodTypeAny, {
16
18
  uid: string;
17
19
  description: string;
@@ -20,6 +22,7 @@ declare const workspaceSchema: z.ZodObject<{
20
22
  collectionUids: string[];
21
23
  environmentUids: string[];
22
24
  cookieUids: string[];
25
+ proxyUrl?: string | undefined;
23
26
  }, {
24
27
  uid?: string | undefined;
25
28
  description?: string | undefined;
@@ -28,6 +31,7 @@ declare const workspaceSchema: z.ZodObject<{
28
31
  collectionUids?: string[] | undefined;
29
32
  environmentUids?: string[] | undefined;
30
33
  cookieUids?: string[] | undefined;
34
+ proxyUrl?: string | undefined;
31
35
  }>;
32
36
  /** The base scalar workspace */
33
37
  export type Workspace = z.infer<typeof workspaceSchema>;
@@ -40,6 +44,7 @@ export declare const createWorkspace: (payload: WorkspacePayload) => {
40
44
  collectionUids: string[];
41
45
  environmentUids: string[];
42
46
  cookieUids: string[];
47
+ proxyUrl?: string | undefined;
43
48
  };
44
49
  export {};
45
50
  //# sourceMappingURL=workspace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../src/entities/workspace/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,QAAA,MAAM,eAAe;;;IAGnB,4BAA4B;;IAE5B,6EAA6E;;IAE7E,uDAAuD;;IAEvD,wDAAwD;;IAExD,mDAAmD;;;;;;;;;;;;;;;;;;EAEnD,CAAA;AAEF,gCAAgC;AAChC,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AACvD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAE9D,eAAO,MAAM,eAAe,YAAa,gBAAgB;;;;;;;;CACzB,CAAA"}
1
+ {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../src/entities/workspace/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,QAAA,MAAM,eAAe;;;IAGnB,4BAA4B;;IAE5B,6EAA6E;;IAE7E,uDAAuD;;IAEvD,wDAAwD;;IAExD,mDAAmD;;IAEnD,gEAAgE;;;;;;;;;;;;;;;;;;;;EAEhE,CAAA;AAEF,gCAAgC;AAChC,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AACvD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAE9D,eAAO,MAAM,eAAe,YAAa,gBAAgB;;;;;;;;;CACzB,CAAA"}
@@ -14,6 +14,8 @@ const workspaceSchema = z.object({
14
14
  environmentUids: z.array(z.string()).default([]),
15
15
  /** List of all cookie uids in a given workspace */
16
16
  cookieUids: z.array(z.string()).default([]),
17
+ /** Workspace level proxy for all requests to be sent through */
18
+ proxyUrl: z.string().optional(),
17
19
  });
18
20
  const createWorkspace = (payload) => workspaceSchema.parse(payload);
19
21
 
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Make sure the URL and path are concatenated correctly.
3
+ */
4
+ export declare const concatenateUrlAndPath: (url: string, path?: string) => string;
5
+ //# sourceMappingURL=concatenateUrlAndPath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concatenateUrlAndPath.d.ts","sourceRoot":"","sources":["../../src/helpers/concatenateUrlAndPath.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,qBAAqB,QAAS,MAAM,SAAS,MAAM,WAc/D,CAAA"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Make sure the URL and path are concatenated correctly.
3
+ */
4
+ const concatenateUrlAndPath = (url, path) => {
5
+ if (typeof path !== 'string' || !path.length) {
6
+ return url;
7
+ }
8
+ const trimmedUrl = url.trim();
9
+ const trimmedPath = path.trim();
10
+ const urlWithSlash = trimmedUrl.endsWith('/') ? trimmedUrl : `${trimmedUrl}/`;
11
+ const pathWithoutSlash = trimmedPath.startsWith('/')
12
+ ? trimmedPath.slice(1)
13
+ : trimmedPath;
14
+ return [urlWithSlash, pathWithoutSlash].join('');
15
+ };
16
+
17
+ export { concatenateUrlAndPath };
@@ -1 +1 @@
1
- {"version":3,"file":"deepMerge.d.ts","sourceRoot":"","sources":["../../src/helpers/deepMerge.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,SAAS,+CACZ,CAAC,cACG,CAAC,EAAE,KACd,CAmBF,CAAA"}
1
+ {"version":3,"file":"deepMerge.d.ts","sourceRoot":"","sources":["../../src/helpers/deepMerge.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,UAClD,CAAC,cACG,CAAC,EAAE,KACd,CAmBF,CAAA"}
@@ -6,7 +6,7 @@ const OLD_PROXY_URL = 'https://api.scalar.com/request-proxy';
6
6
  const NEW_PROXY_URL = 'https://proxy.scalar.com';
7
7
  /** Redirects the request to a proxy server with a given URL. */
8
8
  function redirectToProxy(proxy, url) {
9
- return `${proxy}?scalar_url=${encodeURI(url)}`;
9
+ return `${proxy}?scalar_url=${encodeURIComponent(url)}`;
10
10
  }
11
11
  /** Fetches an OpenAPI/Swagger specification from a given URL. */
12
12
  async function fetchSpecFromUrl(url, proxy) {
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Find all strings wrapped in {} or {{}} in value.
3
+ */
4
+ export declare const findVariables: (value: string) => string[];
5
+ //# sourceMappingURL=findVariables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findVariables.d.ts","sourceRoot":"","sources":["../../src/helpers/findVariables.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,aAAa,UAAW,MAAM,aAO1C,CAAA"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Find all strings wrapped in {} or {{}} in value.
3
+ */
4
+ const findVariables = (value) => {
5
+ // Wrapped in single or double curly braces.
6
+ // Ignores whitespace
7
+ // Works with lowercase, uppercase, numbers, dashes, underscores
8
+ const regex = /(?:\{+)\s*(\w+)\s*(?:\}+)/g;
9
+ return [...value.matchAll(regex)].map((match) => match[1].trim()) || [];
10
+ };
11
+
12
+ export { findVariables };
@@ -1,6 +1,8 @@
1
+ export * from './concatenateUrlAndPath.js';
1
2
  export * from './createHash.js';
2
3
  export * from './deepMerge.js';
3
4
  export * from './fetchSpecFromUrl.js';
5
+ export * from './findVariables.js';
4
6
  export * from './httpMethods.js';
5
7
  export * from './httpStatusCodes.js';
6
8
  export * from './iterateTitle.js';
@@ -9,6 +11,7 @@ export * from './normalizeMimeTypeObject.js';
9
11
  export * from './object.js';
10
12
  export * from './parse.js';
11
13
  export * from './prettyPrintJson.js';
14
+ export * from './replaceVariables.js';
12
15
  export * from './schema-model.js';
13
16
  export * from './ssrState.js';
14
17
  export * from './string.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA"}
@@ -1,6 +1,8 @@
1
+ export { concatenateUrlAndPath } from './concatenateUrlAndPath.js';
1
2
  export { createHash } from './createHash.js';
2
3
  export { deepMerge } from './deepMerge.js';
3
4
  export { fetchSpecFromUrl } from './fetchSpecFromUrl.js';
5
+ export { findVariables } from './findVariables.js';
4
6
  export { REQUEST_METHODS, getRequest } from './httpMethods.js';
5
7
  export { httpStatusCodes } from './httpStatusCodes.js';
6
8
  export { iterateTitle } from './iterateTitle.js';
@@ -9,6 +11,7 @@ export { normalizeMimeTypeObject } from './normalizeMimeTypeObject.js';
9
11
  export { getObjectKeys, objectMerge } from './object.js';
10
12
  export { formatJsonOrYamlString, isJsonString, json, parseJsonOrYaml, transformToJson, yaml } from './parse.js';
11
13
  export { prettyPrintJson, replaceCircularDependencies } from './prettyPrintJson.js';
14
+ export { replaceVariables } from './replaceVariables.js';
12
15
  export { schemaModel } from './schema-model.js';
13
16
  export { defaultStateFactory, ssrState } from './ssrState.js';
14
17
  export { camelToTitleWords } from './string.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Overwrite a target object a new replacement object handling removed keys
3
- **/
3
+ */
4
4
  export declare function objectMerge<A extends object, B extends object>(target: A, replacement: B): B;
5
5
  /**
6
6
  * Type safe version of Object.keys
@@ -1 +1 @@
1
- {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../src/helpers/object.ts"],"names":[],"mappings":"AACA;;IAEI;AACJ,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,EAC5D,MAAM,EAAE,CAAC,EACT,WAAW,EAAE,CAAC,KAYf;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,0BAA2B,CAAC,KAAG,CAAC,MAAM,CAAC,CAAC,EACjC,CAAA"}
1
+ {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../src/helpers/object.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,EAC5D,MAAM,EAAE,CAAC,EACT,WAAW,EAAE,CAAC,GAWc,CAAC,CAC9B;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,MAAM,OAAO,CAAC,KAAG,CAAC,MAAM,CAAC,CAAC,EACjC,CAAA"}
@@ -1,7 +1,7 @@
1
1
  // TODO: This is a copy of packages/core-interface/src/database/utility.ts
2
2
  /**
3
3
  * Overwrite a target object a new replacement object handling removed keys
4
- **/
4
+ */
5
5
  function objectMerge(target, replacement) {
6
6
  // Clear any keys that have been removed in the replacement
7
7
  Object.keys(target).forEach((key) => {
@@ -1 +1 @@
1
- {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/helpers/parse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,SAAS,EAAE,MAAM,MAAM,CAAA;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEzC,KAAK,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;AAE9E,4CAA4C;AAC5C,eAAO,MAAM,IAAI;IACf,2DAA2D;iBAC9C,MAAM;IAKnB,6CAA6C;gDAEtC,MAAM,YACD,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,G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CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC,GAC9B,SAAS,GAAG,CAAC;qBAOC,MAAM;CACxB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,WAAY,GAAG,YAIvC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,UAAW,MAAM,WAG5C,CAAA;AAED,0EAA0E;AAC1E,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,UAYnD;AAED,wCAAwC;AACxC,eAAO,MAAM,eAAe,UAAW,MAAM,GAAG,SAAS,KAAG,SAc3D,CAAA"}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Takes JSON and formats it.
3
- **/
3
+ */
4
4
  export declare const prettyPrintJson: (value: string | number | any[] | Record<any, any>) => string;
5
5
  /**
6
6
  * JSON.stringify, but with circular dependencies replaced with '[Circular]'
@@ -1 +1 @@
1
- {"version":3,"file":"prettyPrintJson.d.ts","sourceRoot":"","sources":["../../src/helpers/prettyPrintJson.ts"],"names":[],"mappings":"AAEA;;IAEI;AACJ,eAAO,MAAM,eAAe,UACnB,MAAM,GAAG,MAAM,GAAG,GAAG,EAAE,GAAG,OAAO,GAAG,EAAE,GAAG,CAAC,WAsBlD,CAAA;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,GAAG,UAiBvD"}
1
+ {"version":3,"file":"prettyPrintJson.d.ts","sourceRoot":"","sources":["../../src/helpers/prettyPrintJson.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,eAAe,UACnB,MAAM,GAAG,MAAM,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,WAsBlD,CAAA;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,GAAG,UAiBvD"}
@@ -2,7 +2,7 @@ import { isJsonString } from './parse.js';
2
2
 
3
3
  /**
4
4
  * Takes JSON and formats it.
5
- **/
5
+ */
6
6
  const prettyPrintJson = (value) => {
7
7
  if (typeof value === 'string') {
8
8
  // JSON string
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This function takes a string and replace {variables} with given values.
3
+ */
4
+ export declare function replaceVariables(value: string, variablesOrCallback: Record<string, string | number> | ((match: string) => string)): string;
5
+ //# sourceMappingURL=replaceVariables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replaceVariables.d.ts","sourceRoot":"","sources":["../../src/helpers/replaceVariables.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,EACb,mBAAmB,EACf,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAC/B,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,UAkBhC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * This function takes a string and replace {variables} with given values.
3
+ */
4
+ function replaceVariables(value, variablesOrCallback) {
5
+ // Replace all variables (example: {{ baseurl }} with an HTML tag)
6
+ const doubleCurlyBrackets = /{{\s*([\w.-]+)\s*}}/g;
7
+ const singleCurlyBrackets = /{\s*([\w.-]+)\s*}/g;
8
+ const callback = (_, match) => {
9
+ if (typeof variablesOrCallback === 'function') {
10
+ return variablesOrCallback(match);
11
+ }
12
+ else {
13
+ return variablesOrCallback[match]?.toString();
14
+ }
15
+ };
16
+ // Loop through all matches and replace the match with the variable value
17
+ return value
18
+ .replace(doubleCurlyBrackets, callback)
19
+ .replace(singleCurlyBrackets, callback);
20
+ }
21
+
22
+ export { replaceVariables };
@@ -5,7 +5,7 @@ export declare const getExampleFromSchema: (schema: Record<string, any>, options
5
5
  /**
6
6
  * The fallback string for empty string values.
7
7
  * @default ''
8
- **/
8
+ */
9
9
  emptyString?: string;
10
10
  /**
11
11
  * Whether to use the XML tag names as keys
@@ -16,7 +16,7 @@ export declare const getExampleFromSchema: (schema: Record<string, any>, options
16
16
  * Whether to show read-only/write-only properties. Otherwise all properties are shown.
17
17
  * @default undefined
18
18
  */
19
- mode?: 'read' | 'write';
19
+ mode?: "read" | "write";
20
20
  /**
21
21
  * Dynamic values to add to the example.
22
22
  */
@@ -1 +1 @@
1
- {"version":3,"file":"getExampleFromSchema.d.ts","sourceRoot":"","sources":["../../src/spec-getters/getExampleFromSchema.ts"],"names":[],"mappings":"AAsCA;;GAEG;AACH,eAAO,MAAM,oBAAoB,WACvB,OAAO,MAAM,EAAE,GAAG,CAAC,YACjB;IACR;;;QAGI;IACJ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,MAAM,EAAE,GAAG,CAAC,CAAA;IAC/B;;OAEG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAA;CACzC,UACM,MAAM,iBACE,OAAO,MAAM,EAAE,GAAG,CAAC,SAC3B,MAAM,KACZ,GAkSF,CAAA"}
1
+ {"version":3,"file":"getExampleFromSchema.d.ts","sourceRoot":"","sources":["../../src/spec-getters/getExampleFromSchema.ts"],"names":[],"mappings":"AAsCA;;GAEG;AACH,eAAO,MAAM,oBAAoB,WACvB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YACjB;IACR;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC/B;;OAEG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAA;CACzC,UACM,MAAM,iBACE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,SAC3B,MAAM,KACZ,GAkSF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"getRequestFromOperation.d.ts","sourceRoot":"","sources":["../../src/spec-getters/getRequestFromOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,kBAAkB,EAGlB,oBAAoB,EACrB,MAAM,UAAU,CAAA;AAIjB,eAAO,MAAM,uBAAuB,cACvB,oBAAoB,YACrB;IACR;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,uBACoB,MAAM,GAAG,MAAM,KACnC,QAAQ,kBAAkB,CA8D5B,CAAA"}
1
+ {"version":3,"file":"getRequestFromOperation.d.ts","sourceRoot":"","sources":["../../src/spec-getters/getRequestFromOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,kBAAkB,EAGlB,oBAAoB,EACrB,MAAM,UAAU,CAAA;AAIjB,eAAO,MAAM,uBAAuB,cACvB,oBAAoB,YACrB;IACR;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,uBACoB,MAAM,GAAG,MAAM,KACnC,OAAO,CAAC,kBAAkB,CA6D5B,CAAA"}
@@ -38,8 +38,7 @@ const getRequestFromOperation = (operation, options, selectedExampleKey) => {
38
38
  ...getParametersFromOperation(operation, 'header', options?.requiredOnly),
39
39
  ...(requestBody?.headers ?? []),
40
40
  ],
41
- // TODO: Sorry, something is off here and I don’t get it.
42
- // @ts-ignore
41
+ // @ts-expect-error Sorry, something is off here and I don’t get it.
43
42
  postData: requestBody?.postData,
44
43
  queryString: getParametersFromOperation(operation, 'query', options?.requiredOnly),
45
44
  cookies: getParametersFromOperation(operation, 'cookie', options?.requiredOnly),
@@ -19,6 +19,7 @@ export declare const importSpecToWorkspace: (spec: string | AnyObject) => Promis
19
19
  variables?: Record<string, {
20
20
  default: string;
21
21
  uid: string;
22
+ value?: string | undefined;
22
23
  description?: string | undefined;
23
24
  enum?: string[] | undefined;
24
25
  }> | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"import-spec.d.ts","sourceRoot":"","sources":["../../src/transforms/import-spec.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAiB,MAAM,2BAA2B,CAAA;AAKvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAWxC,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,SAAgB,MAAM,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0KnE,CAAA"}
1
+ {"version":3,"file":"import-spec.d.ts","sourceRoot":"","sources":["../../src/transforms/import-spec.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAiB,MAAM,2BAA2B,CAAA;AAKvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAWxC,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,SAAgB,MAAM,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6KnE,CAAA"}
@@ -80,7 +80,10 @@ const importSpecToWorkspace = async (spec) => {
80
80
  requests.push(request);
81
81
  });
82
82
  });
83
- const tags = schemaModel(schema?.tags, tagObjectSchema.array());
83
+ // todo workaround till we rethink how we do createTags
84
+ const tags = schemaModel(schema?.tags, tagObjectSchema.array(), false) ?? [
85
+ { name: 'default' },
86
+ ];
84
87
  // If there are request tags that are only defined in
85
88
  requestTags.forEach((requestTag) => {
86
89
  if (!tags.some((tag) => tag.name === requestTag)) {
package/dist/types.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import type { ExternalDocumentation } from './entities/workspace/collection/index.js';
2
- import type { Server } from './entities/workspace/server/index.js';
3
2
  import type { RequestMethod } from './helpers/index.js';
4
3
  import type { OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-parser';
5
4
  import type { HarRequest } from 'httpsnippet-lite';
@@ -42,15 +41,15 @@ export type Information = {
42
41
  'deprecated'?: boolean;
43
42
  /**
44
43
  * Scalar
45
- **/
44
+ */
46
45
  'x-custom-examples'?: CustomRequestExample[];
47
46
  /**
48
47
  * Redocly, current
49
- **/
48
+ */
50
49
  'x-codeSamples'?: CustomRequestExample[];
51
50
  /**
52
51
  * Redocly, deprecated
53
- **/
52
+ */
54
53
  'x-code-samples'?: CustomRequestExample[];
55
54
  };
56
55
  export type Operation = {
@@ -187,7 +186,7 @@ export type Spec = {
187
186
  'basePath'?: OpenAPIV2.Document['basePath'];
188
187
  'schemes'?: OpenAPIV2.Document['schemes'];
189
188
  'externalDocs'?: ExternalDocumentation;
190
- 'servers'?: Server[];
189
+ 'servers'?: OpenAPIV3.Document['servers'] | OpenAPIV3_1.Document['servers'];
191
190
  'components'?: OpenAPIV3.ComponentsObject | OpenAPIV3_1.ComponentsObject;
192
191
  'webhooks'?: Webhooks;
193
192
  'definitions'?: Definitions;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAE3C,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAE5D,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI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C,SAAS,CAAC,CAAA;IACzC,cAAc,CAAC,EAAE,qBAAqB,CAAA;IACtC,SAAS,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;IAC3E,YAAY,CAAC,EAAE,SAAS,CAAC,gBAAgB,GAAG,WAAW,CAAC,gBAAgB,CAAA;IACxE,UAAU,CAAC,EAAE,QAAQ,CAAA;IACrB,aAAa,CAAC,EAAE,WAAW,CAAA;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;IACzC,SAAS,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;IAC3E,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAA;IAC1B,UAAU,CAAC,EAAE,SAAS,CAAC,yBAAyB,EAAE,CAAA;CACnD,CAAA"}
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "specification",
17
17
  "yaml"
18
18
  ],
19
- "version": "0.2.4",
19
+ "version": "0.2.6",
20
20
  "engines": {
21
21
  "node": ">=18"
22
22
  },
@@ -101,7 +101,7 @@
101
101
  "type-fest": "^4.20.0",
102
102
  "vite": "^5.2.10",
103
103
  "vitest": "^1.6.0",
104
- "@scalar/build-tooling": "0.1.6"
104
+ "@scalar/build-tooling": "0.1.7"
105
105
  },
106
106
  "scripts": {
107
107
  "build": "scalar-build-rollup",