@teambit/ripple 0.0.257 → 0.0.259
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ripple.cmd.d.ts +31 -1
- package/dist/ripple.cmd.js +135 -2
- package/dist/ripple.cmd.js.map +1 -1
- package/dist/ripple.main.runtime.d.ts +46 -0
- package/dist/ripple.main.runtime.js +109 -2
- package/dist/ripple.main.runtime.js.map +1 -1
- package/dist/ripple.spec.d.ts +1 -0
- package/dist/ripple.spec.js +417 -0
- package/dist/ripple.spec.js.map +1 -0
- package/package.json +13 -8
- /package/dist/{preview-1789507760807.js → preview-1789739547673.js} +0 -0
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _chai() {
|
|
4
|
+
const data = require("chai");
|
|
5
|
+
_chai = function () {
|
|
6
|
+
return data;
|
|
7
|
+
};
|
|
8
|
+
return data;
|
|
9
|
+
}
|
|
10
|
+
function _rippleMain() {
|
|
11
|
+
const data = require("./ripple.main.runtime");
|
|
12
|
+
_rippleMain = function () {
|
|
13
|
+
return data;
|
|
14
|
+
};
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
function _ripple() {
|
|
18
|
+
const data = require("./ripple.cmd");
|
|
19
|
+
_ripple = function () {
|
|
20
|
+
return data;
|
|
21
|
+
};
|
|
22
|
+
return data;
|
|
23
|
+
}
|
|
24
|
+
const LANE_ID = 'org.scope/my-lane';
|
|
25
|
+
|
|
26
|
+
/** resolves with the rejection reason, and fails the test when the promise unexpectedly resolves */
|
|
27
|
+
async function rejectionOf(promise) {
|
|
28
|
+
try {
|
|
29
|
+
await promise;
|
|
30
|
+
} catch (err) {
|
|
31
|
+
return err;
|
|
32
|
+
}
|
|
33
|
+
throw new Error('expected the promise to reject, but it resolved');
|
|
34
|
+
}
|
|
35
|
+
const JOB = {
|
|
36
|
+
id: 'job-1',
|
|
37
|
+
slug: 'job-1-slug',
|
|
38
|
+
laneId: LANE_ID,
|
|
39
|
+
simulation: true,
|
|
40
|
+
status: {
|
|
41
|
+
phase: 'PENDING'
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
function createRippleMain(opts = {}) {
|
|
45
|
+
const token = opts.token === undefined ? 'test-token' : opts.token;
|
|
46
|
+
const cloud = {
|
|
47
|
+
getAuthToken: () => token,
|
|
48
|
+
getCloudApi: () => 'https://api.test.local',
|
|
49
|
+
getAuthHeader: () => ({
|
|
50
|
+
Authorization: `Bearer ${token}`
|
|
51
|
+
})
|
|
52
|
+
};
|
|
53
|
+
const logger = {
|
|
54
|
+
debug: () => undefined,
|
|
55
|
+
warn: () => undefined,
|
|
56
|
+
error: () => undefined
|
|
57
|
+
};
|
|
58
|
+
const workspace = opts.currentLaneId ? {
|
|
59
|
+
getCurrentLaneId: () => ({
|
|
60
|
+
isDefault: () => false,
|
|
61
|
+
toString: () => opts.currentLaneId
|
|
62
|
+
}),
|
|
63
|
+
consumer: {
|
|
64
|
+
bitMap: {
|
|
65
|
+
isLaneExported: opts.isLaneExported ?? true
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
} : undefined;
|
|
69
|
+
const ripple = new (_rippleMain().RippleMain)(cloud, logger, workspace);
|
|
70
|
+
// the runtime fetches through the agent-aware fetcher, which doesn't go through globalThis.fetch.
|
|
71
|
+
// point it back at the global so the stub installed in beforeEach intercepts the requests.
|
|
72
|
+
ripple.fetcher = (url, init) => globalThis.fetch(url, init);
|
|
73
|
+
return ripple;
|
|
74
|
+
}
|
|
75
|
+
describe('RippleMain.simulateLane()', () => {
|
|
76
|
+
let realFetch;
|
|
77
|
+
let requests;
|
|
78
|
+
let responseBody;
|
|
79
|
+
/** responses consumed in order before falling back to `responseBody` */
|
|
80
|
+
let queuedResponses;
|
|
81
|
+
beforeEach(() => {
|
|
82
|
+
realFetch = globalThis.fetch;
|
|
83
|
+
requests = [];
|
|
84
|
+
queuedResponses = [];
|
|
85
|
+
responseBody = {
|
|
86
|
+
data: {
|
|
87
|
+
simulateLane: JOB
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
globalThis.fetch = async (url, init) => {
|
|
91
|
+
requests.push({
|
|
92
|
+
url: String(url),
|
|
93
|
+
headers: init.headers,
|
|
94
|
+
body: JSON.parse(init.body)
|
|
95
|
+
});
|
|
96
|
+
return new Response(JSON.stringify(queuedResponses.shift() ?? responseBody), {
|
|
97
|
+
status: 200,
|
|
98
|
+
headers: {
|
|
99
|
+
'content-type': 'application/json'
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
});
|
|
104
|
+
afterEach(() => {
|
|
105
|
+
globalThis.fetch = realFetch;
|
|
106
|
+
});
|
|
107
|
+
it('should send the simulateLane mutation with the lane id and the auth header', async () => {
|
|
108
|
+
const ripple = createRippleMain();
|
|
109
|
+
const job = await ripple.simulateLane(LANE_ID);
|
|
110
|
+
(0, _chai().expect)(job).to.deep.equal(JOB);
|
|
111
|
+
(0, _chai().expect)(requests).to.have.lengthOf(1);
|
|
112
|
+
const [request] = requests;
|
|
113
|
+
(0, _chai().expect)(request.url).to.equal('https://api.test.local/graphql');
|
|
114
|
+
(0, _chai().expect)(request.headers.Authorization).to.equal('Bearer test-token');
|
|
115
|
+
(0, _chai().expect)(request.body.query).to.match(/^\s*mutation simulateLane\(/);
|
|
116
|
+
(0, _chai().expect)(request.body.query).to.include('simulateLane(laneId: $laneId, options: $options)');
|
|
117
|
+
(0, _chai().expect)(request.body.variables.laneId).to.equal(LANE_ID);
|
|
118
|
+
});
|
|
119
|
+
it('should always send options.network, empty when no filter is given', async () => {
|
|
120
|
+
// the resolver reads options.network unconditionally, so omitting options fails server-side
|
|
121
|
+
const ripple = createRippleMain();
|
|
122
|
+
await ripple.simulateLane(LANE_ID);
|
|
123
|
+
(0, _chai().expect)(requests[0].body.variables.options).to.deep.equal({
|
|
124
|
+
network: {}
|
|
125
|
+
});
|
|
126
|
+
await ripple.simulateLane(LANE_ID, {
|
|
127
|
+
scopeIds: undefined,
|
|
128
|
+
ownerIds: [],
|
|
129
|
+
excludeScopeIds: undefined
|
|
130
|
+
});
|
|
131
|
+
(0, _chai().expect)(requests[1].body.variables.options).to.deep.equal({
|
|
132
|
+
network: {}
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
it('should pass the network filter as options.network', async () => {
|
|
136
|
+
const ripple = createRippleMain();
|
|
137
|
+
await ripple.simulateLane(LANE_ID, {
|
|
138
|
+
scopeIds: ['org.a'],
|
|
139
|
+
excludeScopeIds: ['org.b']
|
|
140
|
+
});
|
|
141
|
+
(0, _chai().expect)(requests[0].body.variables.options).to.deep.equal({
|
|
142
|
+
network: {
|
|
143
|
+
scopeIds: ['org.a'],
|
|
144
|
+
excludeScopeIds: ['org.b']
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
it('should fetch the persisted job by slug when the mutation returns a job without an id', async () => {
|
|
149
|
+
// the mutation responds before the job is persisted: only the slug is set, id and status are null
|
|
150
|
+
queuedResponses.push({
|
|
151
|
+
data: {
|
|
152
|
+
simulateLane: {
|
|
153
|
+
id: null,
|
|
154
|
+
slug: JOB.slug,
|
|
155
|
+
status: null
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
queuedResponses.push({
|
|
160
|
+
data: {
|
|
161
|
+
getJob: JOB
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
const ripple = createRippleMain();
|
|
165
|
+
const job = await ripple.simulateLane(LANE_ID);
|
|
166
|
+
(0, _chai().expect)(job).to.deep.equal(JOB);
|
|
167
|
+
(0, _chai().expect)(requests).to.have.lengthOf(2);
|
|
168
|
+
(0, _chai().expect)(requests[1].body.query).to.include('getJob(slug: $slug)');
|
|
169
|
+
(0, _chai().expect)(requests[1].body.variables).to.deep.equal({
|
|
170
|
+
slug: JOB.slug
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
it('should keep looking the job up while it is not persisted yet', async () => {
|
|
174
|
+
queuedResponses.push({
|
|
175
|
+
data: {
|
|
176
|
+
simulateLane: {
|
|
177
|
+
id: null,
|
|
178
|
+
slug: JOB.slug,
|
|
179
|
+
status: null
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
queuedResponses.push({
|
|
184
|
+
data: {
|
|
185
|
+
getJob: null
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
queuedResponses.push({
|
|
189
|
+
data: {
|
|
190
|
+
getJob: JOB
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
const ripple = createRippleMain();
|
|
194
|
+
const job = await ripple.simulateLane(LANE_ID);
|
|
195
|
+
(0, _chai().expect)(job).to.deep.equal(JOB);
|
|
196
|
+
(0, _chai().expect)(requests).to.have.lengthOf(3);
|
|
197
|
+
});
|
|
198
|
+
it('should return the started job when it never gets persisted, rather than failing the simulation', async () => {
|
|
199
|
+
// the simulation is already running at this point, so the caller reports it without an id
|
|
200
|
+
const started = {
|
|
201
|
+
id: null,
|
|
202
|
+
slug: JOB.slug,
|
|
203
|
+
status: null
|
|
204
|
+
};
|
|
205
|
+
queuedResponses.push({
|
|
206
|
+
data: {
|
|
207
|
+
simulateLane: started
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
responseBody = {
|
|
211
|
+
data: {
|
|
212
|
+
getJob: null
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
const ripple = createRippleMain();
|
|
216
|
+
const job = await ripple.simulateLane(LANE_ID);
|
|
217
|
+
(0, _chai().expect)(job).to.deep.equal(started);
|
|
218
|
+
(0, _chai().expect)(requests).to.have.lengthOf(4); // the mutation + the lookup attempts
|
|
219
|
+
});
|
|
220
|
+
it('should throw when not logged in, without calling the API', async () => {
|
|
221
|
+
const ripple = createRippleMain({
|
|
222
|
+
token: null
|
|
223
|
+
});
|
|
224
|
+
const error = await rejectionOf(ripple.simulateLane(LANE_ID));
|
|
225
|
+
(0, _chai().expect)(error.message).to.include('not logged in');
|
|
226
|
+
(0, _chai().expect)(requests).to.have.lengthOf(0);
|
|
227
|
+
});
|
|
228
|
+
it('should surface GraphQL errors', async () => {
|
|
229
|
+
responseBody = {
|
|
230
|
+
errors: [{
|
|
231
|
+
message: 'lane not found'
|
|
232
|
+
}]
|
|
233
|
+
};
|
|
234
|
+
const ripple = createRippleMain();
|
|
235
|
+
const error = await rejectionOf(ripple.simulateLane(LANE_ID));
|
|
236
|
+
(0, _chai().expect)(error.message).to.include('lane not found');
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
describe('RippleSimulateCmd', () => {
|
|
240
|
+
function createCmd(opts = {}) {
|
|
241
|
+
const calls = [];
|
|
242
|
+
const ripple = {
|
|
243
|
+
getCurrentLaneId: () => opts.currentLaneId,
|
|
244
|
+
isCurrentLaneExported: () => opts.currentLaneId ? opts.isLaneExported ?? true : undefined,
|
|
245
|
+
simulateLane: async (laneId, network) => {
|
|
246
|
+
calls.push({
|
|
247
|
+
laneId,
|
|
248
|
+
network
|
|
249
|
+
});
|
|
250
|
+
return JOB;
|
|
251
|
+
},
|
|
252
|
+
getJobUrl: job => `https://bit.test/ripple-ci/job/${job.slug}`
|
|
253
|
+
};
|
|
254
|
+
return {
|
|
255
|
+
cmd: new (_ripple().RippleSimulateCmd)(ripple),
|
|
256
|
+
calls
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
it('should fail when not on a lane and no --lane is given', async () => {
|
|
260
|
+
const {
|
|
261
|
+
cmd,
|
|
262
|
+
calls
|
|
263
|
+
} = createCmd();
|
|
264
|
+
const error = await rejectionOf(cmd.json([], {}));
|
|
265
|
+
(0, _chai().expect)(error.message).to.include('requires a lane');
|
|
266
|
+
(0, _chai().expect)(calls).to.have.lengthOf(0);
|
|
267
|
+
});
|
|
268
|
+
it('should refuse to simulate the current lane when it was never exported', async () => {
|
|
269
|
+
const {
|
|
270
|
+
cmd,
|
|
271
|
+
calls
|
|
272
|
+
} = createCmd({
|
|
273
|
+
currentLaneId: LANE_ID,
|
|
274
|
+
isLaneExported: false
|
|
275
|
+
});
|
|
276
|
+
const error = await rejectionOf(cmd.json([], {}));
|
|
277
|
+
(0, _chai().expect)(error.message).to.include('never exported');
|
|
278
|
+
(0, _chai().expect)(calls).to.have.lengthOf(0);
|
|
279
|
+
});
|
|
280
|
+
it('should simulate the current lane by default, searching dependents in the lane scope', async () => {
|
|
281
|
+
const {
|
|
282
|
+
cmd,
|
|
283
|
+
calls
|
|
284
|
+
} = createCmd({
|
|
285
|
+
currentLaneId: LANE_ID
|
|
286
|
+
});
|
|
287
|
+
const result = await cmd.json([], {});
|
|
288
|
+
(0, _chai().expect)(calls.map(call => call.laneId)).to.deep.equal([LANE_ID]);
|
|
289
|
+
// the server can't resolve the dependents graph without a network filter
|
|
290
|
+
const network = {
|
|
291
|
+
scopeIds: ['org.scope'],
|
|
292
|
+
ownerIds: undefined,
|
|
293
|
+
excludeScopeIds: undefined
|
|
294
|
+
};
|
|
295
|
+
(0, _chai().expect)(calls[0].network).to.deep.equal(network);
|
|
296
|
+
(0, _chai().expect)(result).to.deep.equal({
|
|
297
|
+
laneId: LANE_ID,
|
|
298
|
+
job: JOB,
|
|
299
|
+
network,
|
|
300
|
+
url: 'https://bit.test/ripple-ci/job/job-1-slug'
|
|
301
|
+
});
|
|
302
|
+
});
|
|
303
|
+
it('should not default the scope when an owners filter is given', async () => {
|
|
304
|
+
const {
|
|
305
|
+
cmd,
|
|
306
|
+
calls
|
|
307
|
+
} = createCmd({
|
|
308
|
+
currentLaneId: LANE_ID
|
|
309
|
+
});
|
|
310
|
+
await cmd.json([], {
|
|
311
|
+
owners: 'org'
|
|
312
|
+
});
|
|
313
|
+
(0, _chai().expect)(calls[0].network).to.deep.equal({
|
|
314
|
+
scopeIds: undefined,
|
|
315
|
+
ownerIds: ['org'],
|
|
316
|
+
excludeScopeIds: undefined
|
|
317
|
+
});
|
|
318
|
+
});
|
|
319
|
+
it('should prefer --lane over the current lane and not apply the exported check to it', async () => {
|
|
320
|
+
const {
|
|
321
|
+
cmd,
|
|
322
|
+
calls
|
|
323
|
+
} = createCmd({
|
|
324
|
+
currentLaneId: LANE_ID,
|
|
325
|
+
isLaneExported: false
|
|
326
|
+
});
|
|
327
|
+
await cmd.json([], {
|
|
328
|
+
lane: 'org.scope/other-lane'
|
|
329
|
+
});
|
|
330
|
+
(0, _chai().expect)(calls.map(call => call.laneId)).to.deep.equal(['org.scope/other-lane']);
|
|
331
|
+
});
|
|
332
|
+
it('should apply the exported check when --lane names the current lane', async () => {
|
|
333
|
+
const {
|
|
334
|
+
cmd,
|
|
335
|
+
calls
|
|
336
|
+
} = createCmd({
|
|
337
|
+
currentLaneId: LANE_ID,
|
|
338
|
+
isLaneExported: false
|
|
339
|
+
});
|
|
340
|
+
const error = await rejectionOf(cmd.json([], {
|
|
341
|
+
lane: LANE_ID
|
|
342
|
+
}));
|
|
343
|
+
(0, _chai().expect)(error.message).to.include('never exported');
|
|
344
|
+
(0, _chai().expect)(calls).to.have.lengthOf(0);
|
|
345
|
+
});
|
|
346
|
+
it('should reject the default lane and malformed lane ids without calling the cloud', async () => {
|
|
347
|
+
const {
|
|
348
|
+
cmd,
|
|
349
|
+
calls
|
|
350
|
+
} = createCmd({
|
|
351
|
+
currentLaneId: LANE_ID
|
|
352
|
+
});
|
|
353
|
+
const mainError = await rejectionOf(cmd.json([], {
|
|
354
|
+
lane: 'main'
|
|
355
|
+
}));
|
|
356
|
+
(0, _chai().expect)(mainError.message).to.include('default lane');
|
|
357
|
+
const scopedMainError = await rejectionOf(cmd.json([], {
|
|
358
|
+
lane: 'org.scope/main'
|
|
359
|
+
}));
|
|
360
|
+
(0, _chai().expect)(scopedMainError.message).to.include('default lane');
|
|
361
|
+
const malformedError = await rejectionOf(cmd.json([], {
|
|
362
|
+
lane: 'no-delimiter'
|
|
363
|
+
}));
|
|
364
|
+
(0, _chai().expect)(malformedError.message).to.include('invalid --lane');
|
|
365
|
+
(0, _chai().expect)(calls).to.have.lengthOf(0);
|
|
366
|
+
});
|
|
367
|
+
it('should split the comma-separated network flags and drop empty entries', async () => {
|
|
368
|
+
const {
|
|
369
|
+
cmd,
|
|
370
|
+
calls
|
|
371
|
+
} = createCmd({
|
|
372
|
+
currentLaneId: LANE_ID
|
|
373
|
+
});
|
|
374
|
+
await cmd.json([], {
|
|
375
|
+
scopes: 'org.a, org.b,',
|
|
376
|
+
owners: '',
|
|
377
|
+
excludeScopes: 'org.c'
|
|
378
|
+
});
|
|
379
|
+
(0, _chai().expect)(calls[0].network).to.deep.equal({
|
|
380
|
+
scopeIds: ['org.a', 'org.b'],
|
|
381
|
+
ownerIds: undefined,
|
|
382
|
+
excludeScopeIds: ['org.c']
|
|
383
|
+
});
|
|
384
|
+
});
|
|
385
|
+
it('should keep the lane scope as the search base when only --exclude-scopes is given', async () => {
|
|
386
|
+
const {
|
|
387
|
+
cmd,
|
|
388
|
+
calls
|
|
389
|
+
} = createCmd({
|
|
390
|
+
currentLaneId: LANE_ID
|
|
391
|
+
});
|
|
392
|
+
await cmd.json([], {
|
|
393
|
+
excludeScopes: 'org.c'
|
|
394
|
+
});
|
|
395
|
+
(0, _chai().expect)(calls[0].network).to.deep.equal({
|
|
396
|
+
scopeIds: ['org.scope'],
|
|
397
|
+
ownerIds: undefined,
|
|
398
|
+
excludeScopeIds: ['org.c']
|
|
399
|
+
});
|
|
400
|
+
});
|
|
401
|
+
it('should report the job id, the network, the url and the follow-up command', async () => {
|
|
402
|
+
const {
|
|
403
|
+
cmd
|
|
404
|
+
} = createCmd({
|
|
405
|
+
currentLaneId: LANE_ID
|
|
406
|
+
});
|
|
407
|
+
const output = await cmd.report([], {});
|
|
408
|
+
(0, _chai().expect)(output).to.include(LANE_ID);
|
|
409
|
+
(0, _chai().expect)(output).to.include('job-1');
|
|
410
|
+
(0, _chai().expect)(output).to.include('scopes org.scope');
|
|
411
|
+
(0, _chai().expect)(output).to.include('default: the lane scope');
|
|
412
|
+
(0, _chai().expect)(output).to.include('https://bit.test/ripple-ci/job/job-1-slug');
|
|
413
|
+
(0, _chai().expect)(output).to.include('bit ripple log job-1');
|
|
414
|
+
});
|
|
415
|
+
});
|
|
416
|
+
|
|
417
|
+
//# sourceMappingURL=ripple.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_chai","data","require","_rippleMain","_ripple","LANE_ID","rejectionOf","promise","err","Error","JOB","id","slug","laneId","simulation","status","phase","createRippleMain","opts","token","undefined","cloud","getAuthToken","getCloudApi","getAuthHeader","Authorization","logger","debug","warn","error","workspace","currentLaneId","getCurrentLaneId","isDefault","toString","consumer","bitMap","isLaneExported","ripple","RippleMain","fetcher","url","init","globalThis","fetch","describe","realFetch","requests","responseBody","queuedResponses","beforeEach","simulateLane","push","String","headers","body","JSON","parse","Response","stringify","shift","afterEach","it","job","expect","to","deep","equal","have","lengthOf","request","query","match","include","variables","options","network","scopeIds","ownerIds","excludeScopeIds","getJob","started","message","errors","createCmd","calls","isCurrentLaneExported","getJobUrl","cmd","RippleSimulateCmd","json","result","map","call","owners","lane","mainError","scopedMainError","malformedError","scopes","excludeScopes","output","report"],"sources":["ripple.spec.ts"],"sourcesContent":["import { expect } from 'chai';\nimport type { CloudMain } from '@teambit/cloud';\nimport type { Logger } from '@teambit/logger';\nimport type { Workspace } from '@teambit/workspace';\nimport { RippleMain, type RippleJob, type SimulateNetwork } from './ripple.main.runtime';\nimport { RippleSimulateCmd } from './ripple.cmd';\n\nconst LANE_ID = 'org.scope/my-lane';\n\n/** resolves with the rejection reason, and fails the test when the promise unexpectedly resolves */\nasync function rejectionOf(promise: Promise<unknown>): Promise<Error> {\n try {\n await promise;\n } catch (err) {\n return err as Error;\n }\n throw new Error('expected the promise to reject, but it resolved');\n}\nconst JOB: RippleJob = {\n id: 'job-1',\n slug: 'job-1-slug',\n laneId: LANE_ID,\n simulation: true,\n status: { phase: 'PENDING' },\n};\n\nfunction createRippleMain(\n opts: { token?: string | null; currentLaneId?: string; isLaneExported?: boolean } = {}\n): RippleMain {\n const token = opts.token === undefined ? 'test-token' : opts.token;\n const cloud = {\n getAuthToken: () => token,\n getCloudApi: () => 'https://api.test.local',\n getAuthHeader: () => ({ Authorization: `Bearer ${token}` }),\n } as unknown as CloudMain;\n const logger = { debug: () => undefined, warn: () => undefined, error: () => undefined } as unknown as Logger;\n const workspace = opts.currentLaneId\n ? ({\n getCurrentLaneId: () => ({ isDefault: () => false, toString: () => opts.currentLaneId }),\n consumer: { bitMap: { isLaneExported: opts.isLaneExported ?? true } },\n } as unknown as Workspace)\n : undefined;\n const ripple = new RippleMain(cloud, logger, workspace);\n // the runtime fetches through the agent-aware fetcher, which doesn't go through globalThis.fetch.\n // point it back at the global so the stub installed in beforeEach intercepts the requests.\n (ripple as any).fetcher = (url: any, init: any) => globalThis.fetch(url, init);\n return ripple;\n}\n\ndescribe('RippleMain.simulateLane()', () => {\n let realFetch: typeof fetch;\n let requests: Array<{ url: string; headers: Record<string, string>; body: any }>;\n let responseBody: Record<string, any>;\n /** responses consumed in order before falling back to `responseBody` */\n let queuedResponses: Record<string, any>[];\n\n beforeEach(() => {\n realFetch = globalThis.fetch;\n requests = [];\n queuedResponses = [];\n responseBody = { data: { simulateLane: JOB } };\n globalThis.fetch = (async (url: any, init: any) => {\n requests.push({ url: String(url), headers: init.headers, body: JSON.parse(init.body) });\n return new Response(JSON.stringify(queuedResponses.shift() ?? responseBody), {\n status: 200,\n headers: { 'content-type': 'application/json' },\n });\n }) as typeof fetch;\n });\n\n afterEach(() => {\n globalThis.fetch = realFetch;\n });\n\n it('should send the simulateLane mutation with the lane id and the auth header', async () => {\n const ripple = createRippleMain();\n const job = await ripple.simulateLane(LANE_ID);\n expect(job).to.deep.equal(JOB);\n expect(requests).to.have.lengthOf(1);\n const [request] = requests;\n expect(request.url).to.equal('https://api.test.local/graphql');\n expect(request.headers.Authorization).to.equal('Bearer test-token');\n expect(request.body.query).to.match(/^\\s*mutation simulateLane\\(/);\n expect(request.body.query).to.include('simulateLane(laneId: $laneId, options: $options)');\n expect(request.body.variables.laneId).to.equal(LANE_ID);\n });\n\n it('should always send options.network, empty when no filter is given', async () => {\n // the resolver reads options.network unconditionally, so omitting options fails server-side\n const ripple = createRippleMain();\n await ripple.simulateLane(LANE_ID);\n expect(requests[0].body.variables.options).to.deep.equal({ network: {} });\n\n await ripple.simulateLane(LANE_ID, { scopeIds: undefined, ownerIds: [], excludeScopeIds: undefined });\n expect(requests[1].body.variables.options).to.deep.equal({ network: {} });\n });\n\n it('should pass the network filter as options.network', async () => {\n const ripple = createRippleMain();\n await ripple.simulateLane(LANE_ID, { scopeIds: ['org.a'], excludeScopeIds: ['org.b'] });\n expect(requests[0].body.variables.options).to.deep.equal({\n network: { scopeIds: ['org.a'], excludeScopeIds: ['org.b'] },\n });\n });\n\n it('should fetch the persisted job by slug when the mutation returns a job without an id', async () => {\n // the mutation responds before the job is persisted: only the slug is set, id and status are null\n queuedResponses.push({ data: { simulateLane: { id: null, slug: JOB.slug, status: null } } });\n queuedResponses.push({ data: { getJob: JOB } });\n const ripple = createRippleMain();\n const job = await ripple.simulateLane(LANE_ID);\n expect(job).to.deep.equal(JOB);\n expect(requests).to.have.lengthOf(2);\n expect(requests[1].body.query).to.include('getJob(slug: $slug)');\n expect(requests[1].body.variables).to.deep.equal({ slug: JOB.slug });\n });\n\n it('should keep looking the job up while it is not persisted yet', async () => {\n queuedResponses.push({ data: { simulateLane: { id: null, slug: JOB.slug, status: null } } });\n queuedResponses.push({ data: { getJob: null } });\n queuedResponses.push({ data: { getJob: JOB } });\n const ripple = createRippleMain();\n const job = await ripple.simulateLane(LANE_ID);\n expect(job).to.deep.equal(JOB);\n expect(requests).to.have.lengthOf(3);\n });\n\n it('should return the started job when it never gets persisted, rather than failing the simulation', async () => {\n // the simulation is already running at this point, so the caller reports it without an id\n const started = { id: null, slug: JOB.slug, status: null };\n queuedResponses.push({ data: { simulateLane: started } });\n responseBody = { data: { getJob: null } };\n const ripple = createRippleMain();\n const job = await ripple.simulateLane(LANE_ID);\n expect(job).to.deep.equal(started);\n expect(requests).to.have.lengthOf(4); // the mutation + the lookup attempts\n });\n\n it('should throw when not logged in, without calling the API', async () => {\n const ripple = createRippleMain({ token: null });\n const error = await rejectionOf(ripple.simulateLane(LANE_ID));\n expect(error.message).to.include('not logged in');\n expect(requests).to.have.lengthOf(0);\n });\n\n it('should surface GraphQL errors', async () => {\n responseBody = { errors: [{ message: 'lane not found' }] };\n const ripple = createRippleMain();\n const error = await rejectionOf(ripple.simulateLane(LANE_ID));\n expect(error.message).to.include('lane not found');\n });\n});\n\ndescribe('RippleSimulateCmd', () => {\n type SimulateCall = { laneId: string; network?: SimulateNetwork };\n\n function createCmd(opts: { currentLaneId?: string; isLaneExported?: boolean } = {}) {\n const calls: SimulateCall[] = [];\n const ripple = {\n getCurrentLaneId: () => opts.currentLaneId,\n isCurrentLaneExported: () => (opts.currentLaneId ? (opts.isLaneExported ?? true) : undefined),\n simulateLane: async (laneId: string, network?: SimulateNetwork) => {\n calls.push({ laneId, network });\n return JOB;\n },\n getJobUrl: (job: RippleJob) => `https://bit.test/ripple-ci/job/${job.slug}`,\n } as unknown as RippleMain;\n return { cmd: new RippleSimulateCmd(ripple), calls };\n }\n\n it('should fail when not on a lane and no --lane is given', async () => {\n const { cmd, calls } = createCmd();\n const error = await rejectionOf(cmd.json([], {}));\n expect(error.message).to.include('requires a lane');\n expect(calls).to.have.lengthOf(0);\n });\n\n it('should refuse to simulate the current lane when it was never exported', async () => {\n const { cmd, calls } = createCmd({ currentLaneId: LANE_ID, isLaneExported: false });\n const error = await rejectionOf(cmd.json([], {}));\n expect(error.message).to.include('never exported');\n expect(calls).to.have.lengthOf(0);\n });\n\n it('should simulate the current lane by default, searching dependents in the lane scope', async () => {\n const { cmd, calls } = createCmd({ currentLaneId: LANE_ID });\n const result = await cmd.json([], {});\n expect(calls.map((call) => call.laneId)).to.deep.equal([LANE_ID]);\n // the server can't resolve the dependents graph without a network filter\n const network = { scopeIds: ['org.scope'], ownerIds: undefined, excludeScopeIds: undefined };\n expect(calls[0].network).to.deep.equal(network);\n expect(result).to.deep.equal({\n laneId: LANE_ID,\n job: JOB,\n network,\n url: 'https://bit.test/ripple-ci/job/job-1-slug',\n });\n });\n\n it('should not default the scope when an owners filter is given', async () => {\n const { cmd, calls } = createCmd({ currentLaneId: LANE_ID });\n await cmd.json([], { owners: 'org' });\n expect(calls[0].network).to.deep.equal({ scopeIds: undefined, ownerIds: ['org'], excludeScopeIds: undefined });\n });\n\n it('should prefer --lane over the current lane and not apply the exported check to it', async () => {\n const { cmd, calls } = createCmd({ currentLaneId: LANE_ID, isLaneExported: false });\n await cmd.json([], { lane: 'org.scope/other-lane' });\n expect(calls.map((call) => call.laneId)).to.deep.equal(['org.scope/other-lane']);\n });\n\n it('should apply the exported check when --lane names the current lane', async () => {\n const { cmd, calls } = createCmd({ currentLaneId: LANE_ID, isLaneExported: false });\n const error = await rejectionOf(cmd.json([], { lane: LANE_ID }));\n expect(error.message).to.include('never exported');\n expect(calls).to.have.lengthOf(0);\n });\n\n it('should reject the default lane and malformed lane ids without calling the cloud', async () => {\n const { cmd, calls } = createCmd({ currentLaneId: LANE_ID });\n const mainError = await rejectionOf(cmd.json([], { lane: 'main' }));\n expect(mainError.message).to.include('default lane');\n const scopedMainError = await rejectionOf(cmd.json([], { lane: 'org.scope/main' }));\n expect(scopedMainError.message).to.include('default lane');\n const malformedError = await rejectionOf(cmd.json([], { lane: 'no-delimiter' }));\n expect(malformedError.message).to.include('invalid --lane');\n expect(calls).to.have.lengthOf(0);\n });\n\n it('should split the comma-separated network flags and drop empty entries', async () => {\n const { cmd, calls } = createCmd({ currentLaneId: LANE_ID });\n await cmd.json([], { scopes: 'org.a, org.b,', owners: '', excludeScopes: 'org.c' });\n expect(calls[0].network).to.deep.equal({\n scopeIds: ['org.a', 'org.b'],\n ownerIds: undefined,\n excludeScopeIds: ['org.c'],\n });\n });\n\n it('should keep the lane scope as the search base when only --exclude-scopes is given', async () => {\n const { cmd, calls } = createCmd({ currentLaneId: LANE_ID });\n await cmd.json([], { excludeScopes: 'org.c' });\n expect(calls[0].network).to.deep.equal({\n scopeIds: ['org.scope'],\n ownerIds: undefined,\n excludeScopeIds: ['org.c'],\n });\n });\n\n it('should report the job id, the network, the url and the follow-up command', async () => {\n const { cmd } = createCmd({ currentLaneId: LANE_ID });\n const output = await cmd.report([], {});\n expect(output).to.include(LANE_ID);\n expect(output).to.include('job-1');\n expect(output).to.include('scopes org.scope');\n expect(output).to.include('default: the lane scope');\n expect(output).to.include('https://bit.test/ripple-ci/job/job-1-slug');\n expect(output).to.include('bit ripple log job-1');\n });\n});\n"],"mappings":";;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,MAAMI,OAAO,GAAG,mBAAmB;;AAEnC;AACA,eAAeC,WAAWA,CAACC,OAAyB,EAAkB;EACpE,IAAI;IACF,MAAMA,OAAO;EACf,CAAC,CAAC,OAAOC,GAAG,EAAE;IACZ,OAAOA,GAAG;EACZ;EACA,MAAM,IAAIC,KAAK,CAAC,iDAAiD,CAAC;AACpE;AACA,MAAMC,GAAc,GAAG;EACrBC,EAAE,EAAE,OAAO;EACXC,IAAI,EAAE,YAAY;EAClBC,MAAM,EAAER,OAAO;EACfS,UAAU,EAAE,IAAI;EAChBC,MAAM,EAAE;IAAEC,KAAK,EAAE;EAAU;AAC7B,CAAC;AAED,SAASC,gBAAgBA,CACvBC,IAA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AM,EAACqC,MAAM,CAAC,CAACpC,EAAE,CAACQ,OAAO,CAAC,OAAO,CAAC;IAClC,IAAAT,cAAM,EAACqC,MAAM,CAAC,CAACpC,EAAE,CAACQ,OAAO,CAAC,kBAAkB,CAAC;IAC7C,IAAAT,cAAM,EAACqC,MAAM,CAAC,CAACpC,EAAE,CAACQ,OAAO,CAAC,yBAAyB,CAAC;IACpD,IAAAT,cAAM,EAACqC,MAAM,CAAC,CAACpC,EAAE,CAACQ,OAAO,CAAC,2CAA2C,CAAC;IACtE,IAAAT,cAAM,EAACqC,MAAM,CAAC,CAACpC,EAAE,CAACQ,OAAO,CAAC,sBAAsB,CAAC;EACnD,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,30 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/ripple",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.259",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/cloud/ripple",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.cloud",
|
|
8
8
|
"name": "ripple",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.259"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "4.1.2",
|
|
13
13
|
"strip-ansi": "6.0.0",
|
|
14
14
|
"cli-table": "0.3.6",
|
|
15
15
|
"@teambit/harmony": "0.4.12",
|
|
16
|
-
"@teambit/
|
|
16
|
+
"@teambit/bit-error": "0.0.404",
|
|
17
|
+
"@teambit/cli": "0.0.1393",
|
|
18
|
+
"@teambit/lane-id": "0.0.312",
|
|
17
19
|
"@teambit/legacy.constants": "0.0.44",
|
|
18
|
-
"@teambit/logger": "0.0.
|
|
19
|
-
"@teambit/
|
|
20
|
-
"@teambit/
|
|
21
|
-
"@teambit/
|
|
20
|
+
"@teambit/logger": "0.0.1486",
|
|
21
|
+
"@teambit/scope.network": "0.0.164",
|
|
22
|
+
"@teambit/export": "1.0.1171",
|
|
23
|
+
"@teambit/cloud": "0.0.1472",
|
|
24
|
+
"@teambit/workspace": "1.0.1171"
|
|
22
25
|
},
|
|
23
26
|
"devDependencies": {
|
|
24
27
|
"@types/cli-table": "^0.3.0",
|
|
25
28
|
"@teambit/harmony.envs.core-aspect-env": "2.1.1"
|
|
26
29
|
},
|
|
27
|
-
"peerDependencies": {
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"chai": "5.2.1"
|
|
32
|
+
},
|
|
28
33
|
"license": "Apache-2.0",
|
|
29
34
|
"optionalDependencies": {},
|
|
30
35
|
"peerDependenciesMeta": {},
|
|
File without changes
|