plum-e2e 1.3.4 → 1.3.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.
@@ -1,19 +1,3 @@
1
- /*
2
- This file is part of Plum.
3
-
4
- Plum is free software: you can redistribute it and/or modify
5
- it under the terms of the GNU General Public License as published by
6
- the Free Software Foundation, either version 3 of the License, or
7
- (at your option) any later version.
8
-
9
- Plum is distributed in the hope that it will be useful,
10
- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- GNU General Public License for more details.
13
-
14
- You should have received a copy of the GNU General Public License
15
- along with Plum. If not, see https://www.gnu.org/licenses/.
16
- */
17
1
  /*
18
2
  * This file is part of Plum.
19
3
  *
@@ -234,7 +234,7 @@
234
234
  function adjustWorkers(delta) {
235
235
  runnerConfig.update((c) => ({
236
236
  ...c,
237
- workers: Math.max(1, Math.min(16, c.workers + delta))
237
+ workers: Math.max(1, Math.min(10, c.workers + delta))
238
238
  }));
239
239
  }
240
240
 
@@ -353,7 +353,7 @@
353
353
  <button
354
354
  class="step-btn"
355
355
  on:click={() => adjustWorkers(1)}
356
- disabled={cfg.workers >= 16 || state.running}>+</button
356
+ disabled={cfg.workers >= 10 || state.running}>+</button
357
357
  >
358
358
  </div>
359
359
  </div>
@@ -19,8 +19,7 @@ export const API_BASE = import.meta.env.VITE_API_URL ?? 'http://localhost:3001';
19
19
 
20
20
  export const BROWSERS = [
21
21
  { id: 'chromium', label: 'Chrome' },
22
- { id: 'firefox', label: 'Firefox' },
23
- { id: 'webkit', label: 'WebKit' }
22
+ { id: 'firefox', label: 'Firefox' }
24
23
  ];
25
24
 
26
25
  export const TRIGGER_TYPES = Object.freeze({
@@ -28,8 +27,6 @@ export const TRIGGER_TYPES = Object.freeze({
28
27
  CLI: 'command-line-trigger'
29
28
  });
30
29
 
31
- export const WORKER_OPTIONS = [1, 2, 4, 8];
32
-
33
30
  export const REPORTS_PER_PAGE = 15;
34
31
 
35
32
  export const COPY_TIMEOUT_MS = 1400;
@@ -15,23 +15,6 @@
15
15
  * along with Plum. If not, see https://www.gnu.org/licenses/.
16
16
  */
17
17
 
18
- /*
19
- This file is part of Plum.
20
-
21
- Plum is free software: you can redistribute it and/or modify
22
- it under the terms of the GNU General Public License as published by
23
- the Free Software Foundation, either version 3 of the License, or
24
- (at your option) any later version.
25
-
26
- Plum is distributed in the hope that it will be useful,
27
- but WITHOUT ANY WARRANTY; without even the implied warranty of
28
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29
- GNU General Public License for more details.
30
-
31
- You should have received a copy of the GNU General Public License
32
- along with Plum. If not, see https://www.gnu.org/licenses/.
33
- */
34
-
35
18
  import { writable } from 'svelte/store';
36
19
  import { browser } from '$app/environment';
37
20
 
@@ -1,19 +1,3 @@
1
- /*
2
- This file is part of Plum.
3
-
4
- Plum is free software: you can redistribute it and/or modify
5
- it under the terms of the GNU General Public License as published by
6
- the Free Software Foundation, either version 3 of the License, or
7
- (at your option) any later version.
8
-
9
- Plum is distributed in the hope that it will be useful,
10
- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- GNU General Public License for more details.
13
-
14
- You should have received a copy of the GNU General Public License
15
- along with Plum. If not, see https://www.gnu.org/licenses/.
16
- */
17
1
  /*
18
2
  * This file is part of Plum.
19
3
  *
@@ -1,19 +1,3 @@
1
- /*
2
- This file is part of Plum.
3
-
4
- Plum is free software: you can redistribute it and/or modify
5
- it under the terms of the GNU General Public License as published by
6
- the Free Software Foundation, either version 3 of the License, or
7
- (at your option) any later version.
8
-
9
- Plum is distributed in the hope that it will be useful,
10
- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- GNU General Public License for more details.
13
-
14
- You should have received a copy of the GNU General Public License
15
- along with Plum. If not, see https://www.gnu.org/licenses/.
16
- */
17
1
  /*
18
2
  * This file is part of Plum.
19
3
  *
@@ -1,19 +1,3 @@
1
- /*
2
- This file is part of Plum.
3
-
4
- Plum is free software: you can redistribute it and/or modify
5
- it under the terms of the GNU General Public License as published by
6
- the Free Software Foundation, either version 3 of the License, or
7
- (at your option) any later version.
8
-
9
- Plum is distributed in the hope that it will be useful,
10
- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- GNU General Public License for more details.
13
-
14
- You should have received a copy of the GNU General Public License
15
- along with Plum. If not, see https://www.gnu.org/licenses/.
16
- */
17
1
  /*
18
2
  * This file is part of Plum.
19
3
  *
@@ -26,7 +26,7 @@
26
26
  } from '$lib/api/schedules';
27
27
  import { fetchRunners } from '$lib/api/runners';
28
28
  import { activeCronJobs } from '$lib/stores/runner';
29
- import { BROWSERS, WORKER_OPTIONS, TOAST_TIMEOUT_MS } from '$lib/constants';
29
+ import { BROWSERS, TOAST_TIMEOUT_MS } from '$lib/constants';
30
30
  import { stagger } from '$lib/utils/format';
31
31
  import Button from '$lib/components/ui/Button.svelte';
32
32
  import Badge from '$lib/components/ui/Badge.svelte';
@@ -124,6 +124,10 @@
124
124
  form.runnerIds = current.includes(id) ? current.filter((r) => r !== id) : [...current, id];
125
125
  }
126
126
 
127
+ function adjustFormWorkers(delta) {
128
+ form.workers = Math.max(1, Math.min(10, (form.workers || 1) + delta));
129
+ }
130
+
127
131
  function openAddModal() {
128
132
  isEditing = false;
129
133
  editTaskName = '';
@@ -303,18 +307,20 @@
303
307
  <span>Workers</span>
304
308
  <span class="field-hint">Parallel workers for this job</span>
305
309
  </div>
306
- <div class="seg-control">
307
- {#each WORKER_OPTIONS as n}
308
- <button
309
- type="button"
310
- class="seg-btn"
311
- class:active={form.workers === n}
312
- on:click={() => (form.workers = n)}
313
- >
314
- <span class="seg-num">{n}</span>
315
- <span class="seg-label">{n === 1 ? 'worker' : 'workers'}</span>
316
- </button>
317
- {/each}
310
+ <div class="stepper">
311
+ <button
312
+ type="button"
313
+ class="step-btn"
314
+ on:click={() => adjustFormWorkers(-1)}
315
+ disabled={form.workers <= 1}>−</button
316
+ >
317
+ <span class="step-val">{form.workers}</span>
318
+ <button
319
+ type="button"
320
+ class="step-btn"
321
+ on:click={() => adjustFormWorkers(1)}
322
+ disabled={form.workers >= 10}>+</button
323
+ >
318
324
  </div>
319
325
  </div>
320
326
 
@@ -663,6 +669,57 @@
663
669
  color: var(--fail);
664
670
  }
665
671
 
672
+ /* Workers stepper */
673
+ .stepper {
674
+ display: flex;
675
+ align-items: center;
676
+ background: var(--bg-subtle);
677
+ border: 1px solid var(--border);
678
+ border-radius: var(--radius-sm);
679
+ overflow: hidden;
680
+ width: fit-content;
681
+ }
682
+
683
+ .step-btn {
684
+ width: 28px;
685
+ height: 30px;
686
+ display: flex;
687
+ align-items: center;
688
+ justify-content: center;
689
+ border: none;
690
+ background: transparent;
691
+ color: var(--text-muted);
692
+ cursor: pointer;
693
+ font-size: 0.875rem;
694
+ font-weight: 400;
695
+ line-height: 1;
696
+ transition:
697
+ color var(--duration-fast),
698
+ background var(--duration-fast);
699
+ }
700
+
701
+ .step-btn:hover:not(:disabled) {
702
+ color: var(--text);
703
+ background: var(--bg-elevated);
704
+ }
705
+
706
+ .step-btn:disabled {
707
+ opacity: 0.3;
708
+ cursor: default;
709
+ }
710
+
711
+ .step-val {
712
+ min-width: 28px;
713
+ text-align: center;
714
+ font-size: 0.85rem;
715
+ font-weight: 500;
716
+ color: var(--text);
717
+ font-family: 'JetBrains Mono', monospace;
718
+ line-height: 30px;
719
+ border-left: 1px solid var(--border);
720
+ border-right: 1px solid var(--border);
721
+ }
722
+
666
723
  /* Segmented control */
667
724
  .seg-control {
668
725
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plum-e2e",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/silverlunah/plum.git"
@@ -29,10 +29,12 @@
29
29
  "prettier-plugin-svelte": "^3.3.3"
30
30
  },
31
31
  "dependencies": {
32
- "fs-extra": "^11.3.0"
32
+ "@clack/prompts": "^1.5.1",
33
+ "fs-extra": "^11.3.0",
34
+ "picocolors": "^1.1.1"
33
35
  },
34
36
  "type": "module",
35
37
  "lint-staged": {
36
- "*.{js,ts,svelte,json,md,css,html}": "prettier --write"
38
+ "*.{js,ts,mjs,svelte,json,md,css,html}": "prettier --write"
37
39
  }
38
40
  }