Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1fc64c5

Browse files
authored
Merge branch 'master' into fix/incorrect-filter-count
2 parents381c00a +215d810 commit1fc64c5

File tree

17 files changed

+208
-59
lines changed

17 files changed

+208
-59
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name:Deploy Preview
2+
3+
on:
4+
issue_comment:
5+
types:[created]
6+
7+
jobs:
8+
deploy:
9+
if:|
10+
github.event.issue.pull_request &&
11+
github.event.comment.body == '@github-actions deploy-preview'
12+
runs-on:ubuntu-latest
13+
steps:
14+
-name:Trigger Preview Deployment
15+
uses:peter-evans/repository-dispatch@v2
16+
with:
17+
token:${{ secrets.REQUESTLY_CLOUD_TOKEN }}
18+
repository:requestly/requestly-cloud
19+
event-type:deploy-preview
20+
client-payload:'{"pr_number": "${{ github.event.issue.number }}"}'

‎app/src/components/Home/components/ApiClientCard/index.tsx‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import { trackHomeApisActionClicked } from "components/Home/analytics";
2121
import{RoleBasedComponent,useRBAC}from"features/rbac";
2222
import{RQButton,RQTooltip}from"lib/design-system-v2/components";
2323
import{useTabServiceWithSelector}from"componentsV2/Tabs/store/tabServiceStore";
24+
import{SiOpenapiinitiative}from"@react-icons/all-files/si/SiOpenapiinitiative";
25+
import{useFeatureIsOn}from"@growthbook/growthbook-react";
2426
import"./apiClientCard.scss";
2527

2628
interfaceCardOptions{
@@ -36,6 +38,7 @@ const ApiClientCard = () => {
3638
const[cardOptions]=useState<CardOptions>(!isEmpty(tabs) ?getOptions(tabs) :null);
3739
const{ validatePermission}=useRBAC();
3840
const{ isValidPermission}=validatePermission("api_client_request","create");
41+
constisOpenApiSupportEnabled=useFeatureIsOn("openapi-import-support");
3942

4043
constcreateNewHandler=useCallback(
4144
(type:CreateType)=>{
@@ -98,6 +101,13 @@ const ApiClientCard = () => {
98101
},
99102
{
100103
key:"4",
104+
hidden:!isOpenApiSupportEnabled,
105+
label:"OpenAPI",
106+
icon:<SiOpenapiinitiative/>,
107+
onClick:()=>importTriggerHandler(ApiClientImporterType.OPENAPI),
108+
},
109+
{
110+
key:"5",
101111
label:"Requestly",
102112
icon:<imgsrc={"/assets/img/brandLogos/requestly-icon.svg"}alt="Requestly"/>,
103113
onClick:()=>importTriggerHandler(ApiClientImporterType.REQUESTLY),

‎app/src/componentsV2/Tabs/components/TabsContainer.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { Outlet, unstable_useBlocker } from "react-router-dom";
77
import{DraftRequestContainerTabSource}from"features/apiClient/screens/apiClient/components/views/components/DraftRequestContainer/draftRequestContainerTabSource";
88
import{RQButton}from"lib/design-system-v2/components";
99
import{MdClose}from"@react-icons/all-files/md/MdClose";
10+
import{IoIosArrowDown}from"@react-icons/all-files/io/IoIosArrowDown";
1011
import{useSetUrl}from"../hooks/useSetUrl";
1112
importPATHSfrom"config/constants/sub/paths";
1213
import{useCloseActiveTabShortcut}from"hooks/useCloseActiveTabShortcut";
@@ -181,6 +182,8 @@ export const TabsContainer: React.FC = () => {
181182
activeKey={activeTabId?.toString()}
182183
className="tabs-content"
183184
popupClassName="tabs-content-more-dropdown"
185+
moreIcon={<IoIosArrowDown/>}
186+
size="small"
184187
onChange={(key)=>{
185188
setActiveTab(parseInt(key));
186189
}}

‎app/src/componentsV2/Tabs/components/tabsContainer.scss‎

Lines changed: 93 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,23 @@
2323
.ant-tabs.tabs-content {
2424
& >.ant-tabs-nav {
2525
margin-bottom:0;
26+
position:relative;
27+
28+
// Add shadow effect when more icon is visible (indicating overflow)
29+
&:has(.ant-tabs-nav-more) {
30+
&::after {
31+
content:"";
32+
position:absolute;
33+
top:0;
34+
right:56px;
35+
bottom:0;
36+
width:42px;
37+
background:linear-gradient(270deg,#1a1a1a0%,rgba(26,26,26,0)100%);
38+
pointer-events:none;
39+
z-index:1;
40+
margin-bottom:1px;
41+
}
42+
}
2643

2744
.ant-tabs-nav-wrap {
2845
height:32px;
@@ -34,7 +51,7 @@
3451
.ant-tabs-nav-list {
3552
display:flex;
3653
align-items:center;
37-
gap:12px;
54+
gap:3px;
3855

3956
.ant-tabs-nav-add {
4057
width:24px;
@@ -44,7 +61,6 @@
4461
padding:0;
4562
border:none;
4663
background-color:transparent;
47-
margin-left:-6px;
4864
color:var(--requestly-color-text-default);
4965

5066
&:hover {
@@ -60,13 +76,11 @@
6076

6177
.ant-tabs-tab {
6278
padding:04px;
63-
width:144px;
79+
width:auto;
6480
max-width:144px;
65-
border-radius:0;
66-
border:none;
67-
background:none;
68-
border-bottom:2pxsolidtransparent;
69-
81+
border-radius:4px;
82+
background:rgba(255,255,255,0.04);
83+
height:24px;
7084
.ant-tabs-tab-btn {
7185
width:100%;
7286
overflow:hidden;
@@ -78,8 +92,15 @@
7892
}
7993

8094
&:hover {
95+
border-radius:4px;
96+
border:1pxsolidvar(--requestly-color-white-t-10,rgba(255,255,255,0.06));
97+
background:var(--requestly-color-white-t-10,rgba(255,255,255,0.06));
8198
.tab-close-button {
8299
display:flex;
100+
border-radius:4px;
101+
&:hover {
102+
background:var(--requestly-color-white-t-20,rgba(255,255,255,0.12));
103+
}
83104
}
84105

85106
.unsaved-changes-indicator {
@@ -91,20 +112,16 @@
91112
.ant-tabs-tab +.ant-tabs-tab {
92113
margin:0;
93114
position:relative;
94-
95-
&::before {
96-
content:"";
97-
position:absolute;
98-
left:-6px;
99-
top:20%;
100-
bottom:20%;
101-
width:1px;
102-
background-color:var(--requestly-color-surface-2);
103-
}
104115
}
105116

106117
.ant-tabs-tab-active {
107-
border-bottom:2pxsolidvar(--requestly-color-primary,#004eeb);
118+
border-radius:4px;
119+
border:1pxsolidvar(--requestly-color-white-t-20,rgba(255,255,255,0.12));
120+
background-color:var(--requestly-color-white-t-20,rgba(255,255,255,0.12));
121+
122+
&:hover {
123+
background-color:var(--requestly-color-white-t-20,rgba(255,255,255,0.12));
124+
}
108125

109126
.tab-title {
110127
.icon,
@@ -116,20 +133,42 @@
116133
}
117134

118135
.ant-tabs-nav-operations {
136+
display:flex;
137+
height:24px;
138+
margin-top:2px;
139+
gap:var(--requestly-space-4,8px);
140+
width:60px;
119141
.ant-tabs-nav-more {
120142
cursor:pointer;
121-
padding:1px8px;
143+
width:24px;
144+
height:24px;
145+
border-radius:4px;
146+
padding:0;
147+
border:none;
148+
background-color:transparent;
149+
color:var(--requestly-color-text-default);
150+
order:2;// Move more icon to the left
151+
152+
&:hover {
153+
background:var(--requestly-color-white-t-20,rgba(255,255,255,0.12));
154+
}
155+
156+
svg {
157+
width:10px;
158+
height:14px;
159+
margin-top:5px;
160+
}
122161
}
123162

124163
.ant-tabs-nav-add {
125-
width:32px;
164+
width:24px;
126165
min-width:24px;
127-
border-radius:0;
166+
border-radius:4px;
128167
padding:0;
129168
border:none;
130169
background-color:transparent;
131-
margin-left:-6px;
132170
color:var(--requestly-color-text-default);
171+
order:1;// Move add icon to the right
133172

134173
&:hover {
135174
background:var(--requestly-color-white-t-20,rgba(255,255,255,0.12));
@@ -154,6 +193,12 @@
154193
text-overflow:ellipsis;
155194
position:relative;
156195

196+
&:hover {
197+
.tab-actions {
198+
display:flex;
199+
}
200+
}
201+
157202
.tab-title {
158203
user-select:none;
159204
display:flex;
@@ -163,6 +208,8 @@
163208
overflow:hidden;
164209
text-overflow:ellipsis;
165210
white-space:nowrap;
211+
flex:1;
212+
min-width:0;
166213

167214
.icon {
168215
display:flex;
@@ -174,30 +221,43 @@
174221
}
175222

176223
.title {
177-
text-align:center;
224+
text-align:left;
178225
overflow:hidden;
179226
text-overflow:ellipsis;
180227
white-space:nowrap;
181228
padding:8px0;
229+
padding-right:26px;
182230
color:var(--requestly-color-text-subtle,#bbb);
183231
font-size:var(--requestly-font-size-xs,11px);
184232
font-style:normal;
185233
font-weight:400;
186234
line-height:var(--requestly-font-line-height-xs,15px);
235+
flex:1;
236+
min-width:0;
187237
}
188238
}
189239

190240
.tab-actions {
191241
flex-shrink:0;
192-
margin-left:auto;
193-
display:flex;
242+
display:none;
194243
align-items:center;
195244
justify-content:center;
196245
position:absolute;
197-
top:0;
198246
right:0;
199-
bottom:0;
200-
background-color:var(--requestly-color-background);
247+
248+
.tab-close-button {
249+
height:16px;
250+
width:16px;
251+
padding:0;
252+
display:flex;
253+
align-items:center;
254+
justify-content:center;
255+
256+
svg {
257+
width:10px;
258+
height:14px;
259+
}
260+
}
201261
}
202262

203263
.unsaved-changes-indicator {
@@ -221,7 +281,10 @@
221281

222282
.tabs-content-more-dropdown {
223283
.ant-tabs-dropdown-menu {
224-
max-width:250px;
284+
width:280px;
285+
max-height:480px;
286+
background-color:var(--requestly-space-4-color-surface-1,#282828);
287+
border-radius:4px;
225288

226289
.ant-tabs-dropdown-menu-item {
227290
.tab-title-container {

‎app/src/features/apiClient/commands/collectionRunner/runCollection.command.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { DataFileParseError } from "features/apiClient/screens/apiClient/compone
3333
import{ITERATIONS_MAX_LIMIT}from"features/apiClient/store/collectionRunConfig/runConfig.store";
3434
import{renderVariables}from"backend/environment/utils";
3535
import{createDummyVariablesStoreFromPrimitives}from"features/apiClient/store/variables/variables.store";
36+
import{ExecutionContext}from"features/apiClient/helpers/httpRequestExecutor/scriptExecutionContext";
3637

3738
functionparseExecutingRequestEntry(entry:RQAPI.ApiEntry):RequestExecutionResult["entry"]{
3839
returnisHTTPApiEntry(entry)
@@ -393,14 +394,16 @@ class Runner {
393394
asyncrun(){
394395
try{
395396
awaitthis.beforeStart();
397+
constexecutionContext:ExecutionContext={}asExecutionContext;// Empty object that will be filled and shared across iterations
396398

397399
forawait(const{ request, iteration, startTime}ofthis.iterate()){
398400
const{ currentExecutingRequest, scopes}=this.beforeRequestExecutionStart(iteration,request,startTime);
399401
constresult=awaitthis.executor.executeSingleRequest(
400402
request.id,
401403
request.data,
402404
this.runContext.runResultStore.getState().abortController,
403-
scopes
405+
scopes,
406+
executionContext// Pass the same execution context across all iterations
404407
);
405408

406409
this.afterRequestExecutionComplete(currentExecutingRequest,result);

‎app/src/features/apiClient/helpers/auth.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ export function extractAuthHeadersAndParams(auth: RQAPI.Auth) {
101101
caseAuthorization.Type.BASIC_AUTH:{
102102
if(!auth.authConfigStore?.[Authorization.Type.BASIC_AUTH])break;// invalid auth config gets stored as null for now
103103
const{ username="", password=""}=auth.authConfigStore[Authorization.Type.BASIC_AUTH];
104-
addEntryToResults(resultingHeaders,"Authorization",`Basic${btoa(`${username}:${password}`)}`);
104+
constcredentials=`${username}:${password}`;
105+
// Use TextEncoder and btoa to handle UTF-8 characters properly
106+
constbase64Credentials=btoa(String.fromCharCode(...newTextEncoder().encode(credentials)));
107+
addEntryToResults(resultingHeaders,"Authorization",`Basic${base64Credentials}`);
105108
break;
106109
}
107110
caseAuthorization.Type.BEARER_TOKEN:{

‎app/src/features/apiClient/helpers/batchRequestExecutor.ts‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { RQAPI } from "../types";
33
import{GraphQLRequestExecutor}from"./graphQLRequestExecutor/GraphQLRequestExecutor";
44
import{HttpRequestExecutor}from"./httpRequestExecutor/httpRequestExecutor";
55
import{Scope}from"./variableResolver/variable-resolver";
6+
import{ExecutionContext}from"./httpRequestExecutor/scriptExecutionContext";
7+
68
exportclassBatchRequestExecutor{
79
constructor(
810
privatehttpRequestExecutor:HttpRequestExecutor,
@@ -13,12 +15,19 @@ export class BatchRequestExecutor {
1315
recordId:string,
1416
entry:RQAPI.ApiEntry,
1517
abortController?:AbortController,
16-
scopes?:Scope[]
18+
scopes?:Scope[],
19+
executionContext?:ExecutionContext
1720
):Promise<RQAPI.ExecutionResult>{
1821
if(isGraphQLApiEntry(entry)){
19-
returnthis.graphQLRequestExecutor.executeGraphQLRequest(recordId,entry,abortController,scopes);
22+
returnthis.graphQLRequestExecutor.executeGraphQLRequest(
23+
recordId,
24+
entry,
25+
abortController,
26+
scopes,
27+
executionContext
28+
);
2029
}elseif(isHTTPApiEntry(entry)){
21-
returnthis.httpRequestExecutor.execute(recordId,entry,abortController,scopes);
30+
returnthis.httpRequestExecutor.execute(recordId,entry,abortController,scopes,executionContext);
2231
}
2332

2433
thrownewError("Unsupported API entry type");

‎app/src/features/apiClient/helpers/graphQLRequestExecutor/GraphQLRequestExecutor.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
}from"../../screens/apiClient/components/views/graphql/utils";
66
import{HttpRequestExecutor}from"../httpRequestExecutor/httpRequestExecutor";
77
import{Scope}from"../variableResolver/variable-resolver";
8+
import{ExecutionContext}from"../httpRequestExecutor/scriptExecutionContext";
89

910
exportclassGraphQLRequestExecutorextendsHttpRequestExecutor{
1011
/**
@@ -15,14 +16,16 @@ export class GraphQLRequestExecutor extends HttpRequestExecutor {
1516
recordId:string,
1617
entry:RQAPI.GraphQLApiEntry,
1718
abortController?:AbortController,
18-
scopes?:Scope[]
19+
scopes?:Scope[],
20+
executionContext?:ExecutionContext
1921
):Promise<RQAPI.ExecutionResult>{
2022
consthttpPreparedEntry=this.prepareGraphQLRequest(recordId,entry,scopes);
2123
constapiClientExecutionResult=awaitthis.execute(
2224
recordId,
2325
httpPreparedEntry.preparedEntry,
2426
abortController,
25-
scopes
27+
scopes,
28+
executionContext
2629
);
2730
constgraphQLEntryWithResponse:RQAPI.GraphQLApiEntry=httpEntryToGraphQLEntryAdapter(
2831
apiClientExecutionResult.executedEntryasRQAPI.HttpApiEntry

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp