git-shots-cli 0.6.0 → 0.6.1

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 (2) hide show
  1. package/dist/index.js +4 -4
  2. package/package.json +27 -27
package/dist/index.js CHANGED
@@ -503,7 +503,7 @@ async function syncFlows(config) {
503
503
  const listUrl = `${config.server}/api/projects/${config.project}/flows`;
504
504
  let existingFlows = [];
505
505
  try {
506
- const res = await fetch(listUrl, { headers: { Origin: config.server } });
506
+ const res = await fetch(listUrl, { headers: { Origin: config.server, ...authHeaders(config) } });
507
507
  if (res.ok) {
508
508
  const data = await res.json();
509
509
  existingFlows = data.flows ?? [];
@@ -517,7 +517,7 @@ async function syncFlows(config) {
517
517
  const patchUrl = `${config.server}/api/projects/${config.project}/flows/${flow.slug}`;
518
518
  const patchRes = await fetch(patchUrl, {
519
519
  method: "PATCH",
520
- headers: { "Content-Type": "application/json", Origin: config.server },
520
+ headers: { "Content-Type": "application/json", Origin: config.server, ...authHeaders(config) },
521
521
  body: JSON.stringify({
522
522
  name: flow.name,
523
523
  description: flow.description ?? null,
@@ -532,7 +532,7 @@ async function syncFlows(config) {
532
532
  const stepsUrl = `${config.server}/api/projects/${config.project}/flows/${flow.slug}/steps`;
533
533
  const stepsRes = await fetch(stepsUrl, {
534
534
  method: "PUT",
535
- headers: { "Content-Type": "application/json", Origin: config.server },
535
+ headers: { "Content-Type": "application/json", Origin: config.server, ...authHeaders(config) },
536
536
  body: JSON.stringify({ steps: flow.steps })
537
537
  });
538
538
  if (stepsRes.ok) {
@@ -545,7 +545,7 @@ async function syncFlows(config) {
545
545
  const createUrl = `${config.server}/api/projects/${config.project}/flows`;
546
546
  const res = await fetch(createUrl, {
547
547
  method: "POST",
548
- headers: { "Content-Type": "application/json", Origin: config.server },
548
+ headers: { "Content-Type": "application/json", Origin: config.server, ...authHeaders(config) },
549
549
  body: JSON.stringify({
550
550
  slug: flow.slug,
551
551
  name: flow.name,
package/package.json CHANGED
@@ -1,27 +1,27 @@
1
- {
2
- "name": "git-shots-cli",
3
- "version": "0.6.0",
4
- "description": "CLI for git-shots visual regression platform",
5
- "type": "module",
6
- "bin": {
7
- "git-shots": "./dist/index.js"
8
- },
9
- "files": [
10
- "dist"
11
- ],
12
- "scripts": {
13
- "build": "tsup src/index.ts --format esm --dts",
14
- "dev": "tsup src/index.ts --format esm --watch"
15
- },
16
- "dependencies": {
17
- "commander": "^12.0.0",
18
- "chalk": "^5.3.0",
19
- "dotenv": "^16.4.0",
20
- "glob": "^11.0.0"
21
- },
22
- "devDependencies": {
23
- "tsup": "^8.0.0",
24
- "typescript": "^5.0.0",
25
- "@types/node": "^22.0.0"
26
- }
27
- }
1
+ {
2
+ "name": "git-shots-cli",
3
+ "version": "0.6.1",
4
+ "description": "CLI for git-shots visual regression platform",
5
+ "type": "module",
6
+ "bin": {
7
+ "git-shots": "./dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "scripts": {
13
+ "build": "tsup src/index.ts --format esm --dts",
14
+ "dev": "tsup src/index.ts --format esm --watch"
15
+ },
16
+ "dependencies": {
17
+ "commander": "^12.0.0",
18
+ "chalk": "^5.3.0",
19
+ "dotenv": "^16.4.0",
20
+ "glob": "^11.0.0"
21
+ },
22
+ "devDependencies": {
23
+ "tsup": "^8.0.0",
24
+ "typescript": "^5.0.0",
25
+ "@types/node": "^22.0.0"
26
+ }
27
+ }