@scalar/api-client 2.22.3 → 2.23.2

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 (121) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/style.css +1 -1
  3. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +13 -3
  4. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  5. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +68 -68
  6. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +5 -3
  7. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +1 -1
  8. package/dist/v2/blocks/operation-block/helpers/build-request-security.js +1 -1
  9. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +3 -2
  10. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
  11. package/dist/v2/blocks/operation-block/index.d.ts +2 -1
  12. package/dist/v2/blocks/operation-block/index.d.ts.map +1 -1
  13. package/dist/v2/blocks/operation-block/index.js +7 -4
  14. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +3 -2
  15. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
  16. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +2 -2
  17. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +3 -2
  18. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
  19. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +2 -2
  20. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts.map +1 -1
  21. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +3 -2
  22. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
  23. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +2 -2
  24. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts.map +1 -1
  25. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +8 -5
  26. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  27. package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
  28. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +4 -4
  29. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
  30. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +49 -45
  31. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
  32. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +4 -2
  33. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  34. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +18 -181
  35. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
  36. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +118 -107
  37. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +3 -2
  38. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  39. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +30 -33
  40. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +11 -178
  41. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  42. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -110
  43. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts.map +1 -1
  44. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +5 -29
  45. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts +6 -0
  46. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -0
  47. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +85 -0
  48. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +9 -0
  49. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -0
  50. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +15 -0
  51. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +3 -2
  52. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
  53. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +23 -0
  54. package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -0
  55. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +2 -2
  56. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
  57. package/dist/v2/blocks/scalar-auth-selector-block/index.js +4 -6
  58. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  59. package/dist/v2/features/app/App.vue.js +127 -92
  60. package/dist/v2/features/app/app-state.d.ts +1 -1
  61. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  62. package/dist/v2/features/app/app-state.js +145 -142
  63. package/dist/v2/features/app/helpers/routes.d.ts +1 -1
  64. package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
  65. package/dist/v2/features/app/helpers/routes.js +31 -25
  66. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  67. package/dist/v2/features/collection/components/Authentication.vue.js +1 -1
  68. package/dist/v2/features/collection/components/Authentication.vue2.js +14 -11
  69. package/dist/v2/features/import-listener/ImportListener.vue.d.ts +52 -0
  70. package/dist/v2/features/import-listener/ImportListener.vue.d.ts.map +1 -0
  71. package/dist/v2/features/import-listener/ImportListener.vue.js +91 -0
  72. package/dist/v2/features/import-listener/ImportListener.vue2.js +4 -0
  73. package/dist/v2/features/import-listener/components/DropEventListener.vue.d.ts +7 -0
  74. package/dist/v2/features/import-listener/components/DropEventListener.vue.d.ts.map +1 -0
  75. package/dist/v2/features/import-listener/components/DropEventListener.vue.js +81 -0
  76. package/dist/v2/features/import-listener/components/DropEventListener.vue2.js +4 -0
  77. package/dist/v2/features/import-listener/components/ImportModal.vue.d.ts +40 -0
  78. package/dist/v2/features/import-listener/components/ImportModal.vue.d.ts.map +1 -0
  79. package/dist/v2/features/import-listener/components/ImportModal.vue.js +170 -0
  80. package/dist/v2/features/import-listener/components/ImportModal.vue3.js +5 -0
  81. package/dist/v2/features/import-listener/components/WorkspaceSelector.vue.d.ts +29 -0
  82. package/dist/v2/features/import-listener/components/WorkspaceSelector.vue.d.ts.map +1 -0
  83. package/dist/v2/features/import-listener/components/WorkspaceSelector.vue.js +83 -0
  84. package/dist/v2/features/import-listener/components/WorkspaceSelector.vue2.js +4 -0
  85. package/dist/v2/features/import-listener/helpers/generate-unique-slug.d.ts +16 -0
  86. package/dist/v2/features/import-listener/helpers/generate-unique-slug.d.ts.map +1 -0
  87. package/dist/v2/features/import-listener/helpers/generate-unique-slug.js +11 -0
  88. package/dist/v2/features/import-listener/helpers/get-url-query-parameter.d.ts +8 -0
  89. package/dist/v2/features/import-listener/helpers/get-url-query-parameter.d.ts.map +1 -0
  90. package/dist/v2/features/import-listener/helpers/get-url-query-parameter.js +4 -0
  91. package/dist/v2/features/import-listener/helpers/import-document-to-workspace.d.ts +30 -0
  92. package/dist/v2/features/import-listener/helpers/import-document-to-workspace.d.ts.map +1 -0
  93. package/dist/v2/features/import-listener/helpers/import-document-to-workspace.js +33 -0
  94. package/dist/v2/features/import-listener/helpers/load-document-from-source.d.ts +15 -0
  95. package/dist/v2/features/import-listener/helpers/load-document-from-source.d.ts.map +1 -0
  96. package/dist/v2/features/import-listener/helpers/load-document-from-source.js +28 -0
  97. package/dist/v2/features/import-listener/helpers/wait-for-condition.d.ts +15 -0
  98. package/dist/v2/features/import-listener/helpers/wait-for-condition.d.ts.map +1 -0
  99. package/dist/v2/features/import-listener/helpers/wait-for-condition.js +16 -0
  100. package/dist/v2/features/import-listener/index.d.ts +2 -0
  101. package/dist/v2/features/import-listener/index.d.ts.map +1 -0
  102. package/dist/v2/features/import-listener/index.js +4 -0
  103. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  104. package/dist/v2/features/modal/Modal.vue.js +1 -1
  105. package/dist/v2/features/modal/Modal.vue2.js +14 -12
  106. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  107. package/dist/v2/features/operation/Operation.vue.js +44 -35
  108. package/dist/v2/features/operation/helpers/get-selected-security.d.ts +3 -5
  109. package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -1
  110. package/dist/v2/workspace-events.d.ts.map +1 -1
  111. package/dist/v2/workspace-events.js +116 -109
  112. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  113. package/package.json +19 -14
  114. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts +0 -2
  115. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts.map +0 -1
  116. package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts +0 -8
  117. package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts.map +0 -1
  118. package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.js +0 -33
  119. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.d.ts +0 -7
  120. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.d.ts.map +0 -1
  121. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.js +0 -13
@@ -1,203 +1,210 @@
1
- import { generateClientMutators as p } from "@scalar/workspace-store/mutators";
2
- import { computed as c } from "vue";
3
- const r = (a, i, t) => async (o) => {
4
- const n = await t[a]?.onBeforeExecute?.(o) ?? o;
5
- return await i(n), await t[a]?.onAfterExecute?.(n), n;
1
+ import { generateClientMutators as i } from "@scalar/workspace-store/mutators";
2
+ import { computed as p } from "vue";
3
+ const r = (t, c, a) => async (o) => {
4
+ const n = await a[t]?.onBeforeExecute?.(o) ?? o;
5
+ return await c(n), await a[t]?.onAfterExecute?.(n), n;
6
6
  };
7
7
  function l({
8
- eventBus: a,
9
- store: i,
10
- hooks: t
8
+ eventBus: t,
9
+ store: c,
10
+ hooks: a
11
11
  }) {
12
- const o = c(() => p(i.value)), n = ({ collectionType: e }) => e === "document" ? o.value.active() : o.value.workspace();
13
- a.on(
12
+ const o = p(() => i(c.value)), n = ({ collectionType: e }) => e === "document" ? o.value.active() : o.value.workspace();
13
+ t.on(
14
14
  "workspace:update:active-proxy",
15
- (e) => r("workspace:update:active-proxy", o.value.workspace().workspace.updateActiveProxy, t)(e)
16
- ), a.on(
15
+ (e) => r("workspace:update:active-proxy", o.value.workspace().workspace.updateActiveProxy, a)(e)
16
+ ), t.on(
17
17
  "workspace:update:color-mode",
18
- (e) => r("workspace:update:color-mode", o.value.workspace().workspace.updateColorMode, t)(e)
19
- ), a.on(
18
+ (e) => r("workspace:update:color-mode", o.value.workspace().workspace.updateColorMode, a)(e)
19
+ ), t.on(
20
20
  "workspace:update:theme",
21
- (e) => r("workspace:update:theme", o.value.workspace().workspace.updateTheme, t)(e)
22
- ), a.on(
21
+ (e) => r("workspace:update:theme", o.value.workspace().workspace.updateTheme, a)(e)
22
+ ), t.on(
23
23
  "workspace:update:selected-client",
24
24
  (e) => r(
25
25
  "workspace:update:selected-client",
26
26
  o.value.workspace().workspace.updateSelectedClient,
27
- t
27
+ a
28
28
  )(e)
29
- ), a.on(
29
+ ), t.on(
30
30
  "document:update:icon",
31
- (e) => r("document:update:icon", o.value.active().document.updateDocumentIcon, t)(e)
32
- ), a.on(
31
+ (e) => r("document:update:icon", o.value.active().document.updateDocumentIcon, a)(e)
32
+ ), t.on(
33
33
  "document:update:info",
34
- (e) => r("document:update:info", o.value.active().document.updateDocumentInfo, t)(e)
35
- ), a.on(
34
+ (e) => r("document:update:info", o.value.active().document.updateDocumentInfo, a)(e)
35
+ ), t.on(
36
36
  "document:toggle:security",
37
- (e) => r("document:toggle:security", o.value.active().document.toggleSecurity, t)(e)
38
- ), a.on(
37
+ (e) => r("document:toggle:security", o.value.active().document.toggleSecurity, a)(e)
38
+ ), t.on(
39
39
  "document:update:watch-mode",
40
- (e) => r("document:update:watch-mode", o.value.active().document.updateWatchMode, t)(e)
41
- ), a.on(
40
+ (e) => r("document:update:watch-mode", o.value.active().document.updateWatchMode, a)(e)
41
+ ), t.on(
42
42
  "document:create:empty-document",
43
- (e) => r("document:create:empty-document", o.value.active().document.createEmptyDocument, t)(e)
44
- ), a.on(
43
+ (e) => r("document:create:empty-document", o.value.active().document.createEmptyDocument, a)(e)
44
+ ), t.on(
45
45
  "document:delete:document",
46
- (e) => r("document:delete:document", o.value.active().document.deleteDocument, t)(e)
47
- ), a.on(
46
+ (e) => r("document:delete:document", o.value.active().document.deleteDocument, a)(e)
47
+ ), t.on(
48
48
  "environment:upsert:environment",
49
- (e) => r("environment:upsert:environment", n(e).environment.upsertEnvironment, t)(e)
50
- ), a.on(
49
+ (e) => r("environment:upsert:environment", n(e).environment.upsertEnvironment, a)(e)
50
+ ), t.on(
51
51
  "environment:delete:environment",
52
- (e) => r("environment:delete:environment", n(e).environment.deleteEnvironment, t)(e)
53
- ), a.on(
52
+ (e) => r("environment:delete:environment", n(e).environment.deleteEnvironment, a)(e)
53
+ ), t.on(
54
54
  "environment:upsert:environment-variable",
55
55
  (e) => r(
56
56
  "environment:upsert:environment-variable",
57
57
  n(e).environment.upsertEnvironmentVariable,
58
- t
58
+ a
59
59
  )(e)
60
- ), a.on(
60
+ ), t.on(
61
61
  "environment:delete:environment-variable",
62
62
  (e) => r(
63
63
  "environment:delete:environment-variable",
64
64
  n(e).environment.deleteEnvironmentVariable,
65
- t
65
+ a
66
66
  )(e)
67
- ), a.on("cookie:upsert:cookie", async (e) => {
68
- await r("cookie:upsert:cookie", n(e).cookie.upsertCookie, t)(e);
69
- }), a.on("cookie:delete:cookie", async (e) => {
70
- await r("cookie:delete:cookie", n(e).cookie.deleteCookie, t)(e);
71
- }), a.on(
67
+ ), t.on("cookie:upsert:cookie", async (e) => {
68
+ await r("cookie:upsert:cookie", n(e).cookie.upsertCookie, a)(e);
69
+ }), t.on("cookie:delete:cookie", async (e) => {
70
+ await r("cookie:delete:cookie", n(e).cookie.deleteCookie, a)(e);
71
+ }), t.on(
72
72
  "auth:delete:security-scheme",
73
- (e) => r("auth:delete:security-scheme", o.value.active().auth.deleteSecurityScheme, t)(e)
74
- ), a.on(
73
+ (e) => r("auth:delete:security-scheme", o.value.active().auth.deleteSecurityScheme, a)(e)
74
+ ), t.on(
75
75
  "auth:update:active-index",
76
- (e) => r("auth:update:active-index", o.value.active().auth.updateSelectedAuthTab, t)(e)
77
- ), a.on(
76
+ (e) => r("auth:update:active-index", o.value.active().auth.updateSelectedAuthTab, a)(e)
77
+ ), t.on(
78
78
  "auth:update:security-scheme",
79
- (e) => r("auth:update:security-scheme", o.value.active().auth.updateSecurityScheme, t)(e)
80
- ), a.on(
79
+ (e) => r("auth:update:security-scheme", o.value.active().auth.updateSecurityScheme, a)(e)
80
+ ), t.on(
81
81
  "auth:update:selected-scopes",
82
- (e) => r("auth:update:selected-scopes", o.value.active().auth.updateSelectedScopes, t)(e)
83
- ), a.on(
82
+ (e) => r("auth:update:selected-scopes", o.value.active().auth.updateSelectedScopes, a)(e)
83
+ ), t.on(
84
84
  "auth:update:selected-security-schemes",
85
85
  (e) => r(
86
86
  "auth:update:selected-security-schemes",
87
87
  o.value.active().auth.updateSelectedSecuritySchemes,
88
- t
88
+ a
89
89
  )(e)
90
- ), a.on(
90
+ ), t.on(
91
+ "auth:update:security-scheme-secrets",
92
+ (e) => r(
93
+ "auth:update:security-scheme-secrets",
94
+ o.value.active().auth.updateSecuritySchemeSecrets,
95
+ a
96
+ )(e)
97
+ ), t.on(
91
98
  "server:add:server",
92
- (e) => r("server:add:server", o.value.active().server.addServer, t)(e)
93
- ), a.on(
99
+ (e) => r("server:add:server", o.value.active().server.addServer, a)(e)
100
+ ), t.on(
94
101
  "server:update:server",
95
- (e) => r("server:update:server", o.value.active().server.updateServer, t)(e)
96
- ), a.on(
102
+ (e) => r("server:update:server", o.value.active().server.updateServer, a)(e)
103
+ ), t.on(
97
104
  "server:delete:server",
98
- (e) => r("server:delete:server", o.value.active().server.deleteServer, t)(e)
99
- ), a.on(
105
+ (e) => r("server:delete:server", o.value.active().server.deleteServer, a)(e)
106
+ ), t.on(
100
107
  "server:update:variables",
101
- (e) => r("server:update:variables", o.value.active().server.updateServerVariables, t)(e)
102
- ), a.on(
108
+ (e) => r("server:update:variables", o.value.active().server.updateServerVariables, a)(e)
109
+ ), t.on(
103
110
  "server:update:selected",
104
- (e) => r("server:update:selected", o.value.active().server.updateSelectedServer, t)(e)
105
- ), a.on(
111
+ (e) => r("server:update:selected", o.value.active().server.updateSelectedServer, a)(e)
112
+ ), t.on(
106
113
  "operation:create:operation",
107
- (e) => r("operation:create:operation", o.value.active().operation.createOperation, t)(e)
108
- ), a.on(
114
+ (e) => r("operation:create:operation", o.value.active().operation.createOperation, a)(e)
115
+ ), t.on(
109
116
  "operation:update:pathMethod",
110
117
  (e) => r(
111
118
  "operation:update:pathMethod",
112
119
  o.value.active().operation.updateOperationPathMethod,
113
- t
120
+ a
114
121
  )(e)
115
- ), a.on(
122
+ ), t.on(
116
123
  "operation:update:summary",
117
- (e) => r("operation:update:summary", o.value.active().operation.updateOperationSummary, t)(e)
118
- ), a.on(
124
+ (e) => r("operation:update:summary", o.value.active().operation.updateOperationSummary, a)(e)
125
+ ), t.on(
119
126
  "operation:delete:operation",
120
- (e) => r("operation:delete:operation", o.value.active().operation.deleteOperation, t)(e)
121
- ), a.on(
127
+ (e) => r("operation:delete:operation", o.value.active().operation.deleteOperation, a)(e)
128
+ ), t.on(
122
129
  "operation:delete:example",
123
- (e) => r("operation:delete:example", o.value.active().operation.deleteOperationExample, t)(e)
124
- ), a.on(
130
+ (e) => r("operation:delete:example", o.value.active().operation.deleteOperationExample, a)(e)
131
+ ), t.on(
125
132
  "operation:upsert:parameter",
126
- (e) => r("operation:upsert:parameter", o.value.active().operation.upsertOperationParameter, t)(e)
127
- ), a.on(
133
+ (e) => r("operation:upsert:parameter", o.value.active().operation.upsertOperationParameter, a)(e)
134
+ ), t.on(
128
135
  "operation:update:extra-parameters",
129
136
  (e) => r(
130
137
  "operation:update:extra-parameters",
131
138
  o.value.active().operation.updateOperationExtraParameters,
132
- t
139
+ a
133
140
  )(e)
134
- ), a.on(
141
+ ), t.on(
135
142
  "operation:delete:parameter",
136
- (e) => r("operation:delete:parameter", o.value.active().operation.deleteOperationParameter, t)(e)
137
- ), a.on(
143
+ (e) => r("operation:delete:parameter", o.value.active().operation.deleteOperationParameter, a)(e)
144
+ ), t.on(
138
145
  "operation:delete-all:parameters",
139
146
  (e) => r(
140
147
  "operation:delete-all:parameters",
141
148
  o.value.active().operation.deleteAllOperationParameters,
142
- t
149
+ a
143
150
  )(e)
144
- ), a.on(
151
+ ), t.on(
145
152
  "operation:update:requestBody:contentType",
146
153
  (e) => r(
147
154
  "operation:update:requestBody:contentType",
148
155
  o.value.active().operation.updateOperationRequestBodyContentType,
149
- t
156
+ a
150
157
  )(e)
151
- ), a.on(
158
+ ), t.on(
152
159
  "operation:update:requestBody:value",
153
160
  (e) => r(
154
161
  "operation:update:requestBody:value",
155
162
  o.value.active().operation.updateOperationRequestBodyExample,
156
- t
163
+ a
157
164
  )(e)
158
- ), a.on(
165
+ ), t.on(
159
166
  "operation:update:requestBody:formValue",
160
167
  (e) => r(
161
168
  "operation:update:requestBody:formValue",
162
169
  o.value.active().operation.updateOperationRequestBodyFormValue,
163
- t
170
+ a
164
171
  )(e)
165
- ), a.on(
172
+ ), t.on(
166
173
  "operation:reload:history",
167
- (e) => r("operation:reload:history", o.value.active().operation.reloadOperationHistory, t)(e)
168
- ), a.on(
174
+ (e) => r("operation:reload:history", o.value.active().operation.reloadOperationHistory, a)(e)
175
+ ), t.on(
169
176
  "tag:create:tag",
170
- (e) => r("tag:create:tag", o.value.active().tag.createTag, t)(e)
171
- ), a.on(
177
+ (e) => r("tag:create:tag", o.value.active().tag.createTag, a)(e)
178
+ ), t.on(
172
179
  "tag:delete:tag",
173
- (e) => r("tag:delete:tag", o.value.active().tag.deleteTag, t)(e)
174
- ), a.on(
180
+ (e) => r("tag:delete:tag", o.value.active().tag.deleteTag, a)(e)
181
+ ), t.on(
175
182
  "tabs:add:tab",
176
- (e) => r("tabs:add:tab", o.value.workspace().tabs.addTab, t)(e)
177
- ), a.on(
183
+ (e) => r("tabs:add:tab", o.value.workspace().tabs.addTab, a)(e)
184
+ ), t.on(
178
185
  "tabs:close:tab",
179
- (e) => r("tabs:close:tab", o.value.workspace().tabs.closeTab, t)(e)
180
- ), a.on(
186
+ (e) => r("tabs:close:tab", o.value.workspace().tabs.closeTab, a)(e)
187
+ ), t.on(
181
188
  "tabs:close:other-tabs",
182
- (e) => r("tabs:close:other-tabs", o.value.workspace().tabs.closeOtherTabs, t)(e)
183
- ), a.on(
189
+ (e) => r("tabs:close:other-tabs", o.value.workspace().tabs.closeOtherTabs, a)(e)
190
+ ), t.on(
184
191
  "tabs:focus:tab",
185
- (e) => r("tabs:focus:tab", o.value.workspace().tabs.focusTab, t)(e)
186
- ), a.on(
192
+ (e) => r("tabs:focus:tab", o.value.workspace().tabs.focusTab, a)(e)
193
+ ), t.on(
187
194
  "tabs:focus:tab-last",
188
- (e) => r("tabs:focus:tab-last", o.value.workspace().tabs.focusLastTab, t)(e)
189
- ), a.on(
195
+ (e) => r("tabs:focus:tab-last", o.value.workspace().tabs.focusLastTab, a)(e)
196
+ ), t.on(
190
197
  "tabs:navigate:previous",
191
- (e) => r("tabs:navigate:previous", o.value.workspace().tabs.navigatePreviousTab, t)(e)
192
- ), a.on(
198
+ (e) => r("tabs:navigate:previous", o.value.workspace().tabs.navigatePreviousTab, a)(e)
199
+ ), t.on(
193
200
  "tabs:navigate:next",
194
- (e) => r("tabs:navigate:next", o.value.workspace().tabs.navigateNextTab, t)(e)
195
- ), a.on(
201
+ (e) => r("tabs:navigate:next", o.value.workspace().tabs.navigateNextTab, a)(e)
202
+ ), t.on(
196
203
  "tabs:update:tabs",
197
- (e) => r("tabs:update:tabs", o.value.workspace().tabs.updateTabs, t)(e)
198
- ), a.on(
204
+ (e) => r("tabs:update:tabs", o.value.workspace().tabs.updateTabs, a)(e)
205
+ ), t.on(
199
206
  "hooks:on:request:complete",
200
- (e) => r("hooks:on:request:complete", o.value.active().operation.addResponseToHistory, t)(e)
207
+ (e) => r("hooks:on:request:complete", o.value.active().operation.addResponseToHistory, a)(e)
201
208
  );
202
209
  }
203
210
  export {
@@ -33,7 +33,7 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
33
33
  }));
34
34
  }, f = (u) => {
35
35
  u?.createNew && g.name === "request" && p();
36
- }, v = "2.22.3";
36
+ }, v = "2.23.2";
37
37
  return q(() => a.hotKeys.on(f)), R(() => a.hotKeys.off(f)), (u, e) => (l(), n("div", W, [
38
38
  s("div", {
39
39
  class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.22.3",
21
+ "version": "2.23.2",
22
22
  "engines": {
23
23
  "node": ">=20"
24
24
  },
@@ -231,6 +231,11 @@
231
231
  "types": "./dist/v2/features/global-cookies/index.d.ts",
232
232
  "default": "./dist/v2/features/global-cookies/index.js"
233
233
  },
234
+ "./v2/features/import-listener": {
235
+ "import": "./dist/v2/features/import-listener/index.js",
236
+ "types": "./dist/v2/features/import-listener/index.d.ts",
237
+ "default": "./dist/v2/features/import-listener/index.js"
238
+ },
234
239
  "./v2/features/modal": {
235
240
  "import": "./dist/v2/features/modal/index.js",
236
241
  "types": "./dist/v2/features/modal/index.d.ts",
@@ -321,26 +326,26 @@
321
326
  "whatwg-mimetype": "4.0.0",
322
327
  "yaml": "^2.8.0",
323
328
  "zod": "^4.3.5",
324
- "@scalar/components": "0.17.2",
325
329
  "@scalar/analytics-client": "1.0.1",
330
+ "@scalar/components": "0.17.3",
326
331
  "@scalar/draggable": "0.3.0",
327
- "@scalar/import": "0.4.47",
332
+ "@scalar/helpers": "0.2.11",
328
333
  "@scalar/icons": "0.5.2",
329
- "@scalar/json-magic": "0.9.5",
330
- "@scalar/oas-utils": "0.6.32",
331
- "@scalar/openapi-parser": "0.24.6",
332
- "@scalar/object-utils": "1.2.24",
334
+ "@scalar/import": "0.4.48",
335
+ "@scalar/json-magic": "0.9.6",
336
+ "@scalar/oas-utils": "0.6.33",
337
+ "@scalar/openapi-parser": "0.24.7",
338
+ "@scalar/postman-to-openapi": "0.4.3",
333
339
  "@scalar/openapi-types": "0.5.3",
334
- "@scalar/postman-to-openapi": "0.4.2",
335
- "@scalar/sidebar": "0.7.25",
336
- "@scalar/snippetz": "0.6.10",
340
+ "@scalar/object-utils": "1.2.25",
341
+ "@scalar/sidebar": "0.7.26",
342
+ "@scalar/snippetz": "0.6.11",
337
343
  "@scalar/themes": "0.14.0",
338
- "@scalar/use-codemirror": "0.13.29",
339
- "@scalar/types": "0.6.1",
344
+ "@scalar/types": "0.6.2",
345
+ "@scalar/use-codemirror": "0.13.30",
340
346
  "@scalar/use-hooks": "0.3.7",
341
347
  "@scalar/use-toasts": "0.9.1",
342
- "@scalar/workspace-store": "0.28.1",
343
- "@scalar/helpers": "0.2.10"
348
+ "@scalar/workspace-store": "0.28.2"
344
349
  },
345
350
  "devDependencies": {
346
351
  "@tailwindcss/vite": "^4.1.18",
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=operation-to-har.bench.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operation-to-har.bench.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- import type { SecurityScheme } from '@scalar/oas-utils/entities/spec';
2
- import { type SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
- import type { PartialDeep } from 'type-fest';
4
- /**
5
- * Convert the old security scheme to the new one with secret extensions
6
- */
7
- export declare const convertSecuritySchemeSecrets: (scheme: PartialDeep<SecurityScheme & SecuritySchemeObject>) => SecuritySchemeObject;
8
- //# sourceMappingURL=convert-security-scheme-secrets.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"convert-security-scheme-secrets.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAErE,OAAO,EAEL,KAAK,oBAAoB,EAE1B,MAAM,8DAA8D,CAAA;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAiC5C;;GAEG;AACH,eAAO,MAAM,4BAA4B,GACvC,QAAQ,WAAW,CAAC,cAAc,GAAG,oBAAoB,CAAC,KACzD,oBA+BF,CAAA"}
@@ -1,33 +0,0 @@
1
- import { objectEntries as l } from "@scalar/helpers/object/object-entries";
2
- import { coerceValue as a } from "@scalar/workspace-store/schemas/typebox-coerce";
3
- import { SecuritySchemeObjectSchema as n } from "@scalar/workspace-store/schemas/v3.1/strict/openapi-document";
4
- const S = {
5
- clientSecret: "x-scalar-secret-client-secret",
6
- password: "x-scalar-secret-password",
7
- token: "x-scalar-secret-token",
8
- username: "x-scalar-secret-username",
9
- value: "x-scalar-secret-token",
10
- "x-scalar-client-id": "x-scalar-secret-client-id",
11
- "x-scalar-redirect-uri": "x-scalar-secret-redirect-uri"
12
- }, i = (e) => {
13
- const r = { ...e };
14
- for (const [t, s] of l(S))
15
- e[t] && (r[s] ||= e[t]);
16
- return r;
17
- }, E = (e) => {
18
- if (e.type === "oauth2") {
19
- const r = /* @__PURE__ */ new Set(), t = l(e.flows ?? {}).reduce(
20
- (o, [d, c]) => (o[d] = c && i(c), c?.selectedScopes?.forEach((u) => r.add(u)), o),
21
- {}
22
- ), s = r.size > 0 && !e["x-default-scopes"]?.length ? { "x-default-scopes": Array.from(r) } : {};
23
- return a(n, {
24
- ...e,
25
- flows: t,
26
- ...s
27
- });
28
- }
29
- return a(n, i(e));
30
- };
31
- export {
32
- E as convertSecuritySchemeSecrets
33
- };
@@ -1,7 +0,0 @@
1
- import type { AuthenticationConfiguration } from '@scalar/types/api-reference';
2
- import type { ComponentsObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
3
- /** Document security merged with the config security schemes */
4
- export type MergedSecuritySchemes = NonNullable<ComponentsObject['securitySchemes']>;
5
- /** Merge the authentication config with the document security schemes */
6
- export declare const mergeAuthConfig: (documentSecuritySchemes?: ComponentsObject["securitySchemes"], configSecuritySchemes?: AuthenticationConfiguration["securitySchemes"]) => MergedSecuritySchemes;
7
- //# sourceMappingURL=merge-auth-config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"merge-auth-config.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAE9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAA;AAMpG,gEAAgE;AAChE,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAA;AAEpF,yEAAyE;AACzE,eAAO,MAAM,eAAe,GAC1B,0BAAyB,gBAAgB,CAAC,iBAAiB,CAAM,EACjE,wBAAuB,2BAA2B,CAAC,iBAAiB,CAAM,KACzE,qBAcF,CAAA"}
@@ -1,13 +0,0 @@
1
- import { objectEntries as s } from "@scalar/helpers/object/object-entries";
2
- import { mergeObjects as n } from "@scalar/workspace-store/helpers/merge-object";
3
- import { convertSecuritySchemeSecrets as i } from "./convert-security-scheme-secrets.js";
4
- import { getResolvedRefDeep as S } from "../../operation-code-sample/helpers/get-resolved-ref-deep.js";
5
- const u = (e = {}, r = {}) => {
6
- const t = S(e), o = n(t, r) ?? {};
7
- return Object.fromEntries(
8
- s(o).map(([c, m]) => [c, i(m)])
9
- );
10
- };
11
- export {
12
- u as mergeAuthConfig
13
- };