Skip to content

Commit

Permalink
rerun prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
ikreymer committed Sep 19, 2024
1 parent dae7e57 commit 721090a
Show file tree
Hide file tree
Showing 18 changed files with 134 additions and 123 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
id: version
attributes:
label: ArchiveWeb.page Version
description: "This can be found on the app home page under \"About\""
description: 'This can be found on the app home page under "About"'
placeholder: "v0.11.3"
validations:
required: true
Expand All @@ -20,7 +20,7 @@ body:
"I was trying to archive a page however..."
Please submit any screenshots/videos that can be used to understand how to reproduce the issue. You can attach images by clicking this area to highlight it and then dragging files into the browser window.
If something wasn't captured in the way you expect please include a link to the archived item if possible.
validations:
required: true
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature-change.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ body:
label: Requirements
description: |
Intended primarily for use by Webrecorder team, leave blank if unknown.
List the outcomes of the feature being implemented without design or implementation details.
placeholder: |
1. Item metadata should show links to the collections that the item belongs to.
Expand All @@ -43,6 +43,6 @@ body:
placeholder: |
- [ ] Mockups:
- [ ] Design:
- [ ] UI:
- [ ] UI:
validations:
required: false
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@
"dist": "yarn run build && yarn run pack",
"dist-dev": "yarn run build-dev && yarn run pack",
"release": "yarn run build && electron-builder",
"lint": "eslint ./src/ webpack.config.js"
"lint": "eslint ./src/ webpack.config.js",
"format": "prettier --write ./"
},
"build": {
"afterSign": "build/notarize.js",
Expand Down
20 changes: 11 additions & 9 deletions src/electron/electron-recorder-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ class ElectronRecorderApp extends ElectronReplayApp {

if (method === "OPTIONS") {
statusLine = "HTTP/1.1 200 OK";
responseHeaders["Access-Control-Allow-Headers"] = ["Authorization, Content-Type"];
responseHeaders["Access-Control-Allow-Headers"] = [
"Authorization, Content-Type",
];
responseHeaders["Access-Control-Allow-Methods"] = ["GET, PUT, POST"];
}
responseHeaders["Access-Control-Allow-Origin"] = ["*"];
callback({responseHeaders, statusLine});
callback({ responseHeaders, statusLine });
} else {
callback({responseHeaders});
callback({ responseHeaders });
}
});

Expand All @@ -69,12 +71,12 @@ class ElectronRecorderApp extends ElectronReplayApp {
console.log(`will-download: ${origFilename}`);

item.setSavePath(
unusedFilenameSync(path.join(app.getPath("downloads"), origFilename))
unusedFilenameSync(path.join(app.getPath("downloads"), origFilename)),
);

ipcMain.on("dlcancel:" + origFilename, () => {
console.log(
`Canceled download for ${origFilename} to ${item.getSavePath()}`
`Canceled download for ${origFilename} to ${item.getSavePath()}`,
);
item.cancel();
});
Expand Down Expand Up @@ -216,7 +218,7 @@ class ElectronRecorderApp extends ElectronReplayApp {
startRec,
// @ts-expect-error - TS7006 - Parameter 'autorun' implicitly has an 'any' type.
autorun,
popupView = null
popupView = null,
) {
const id = recWebContents.id;

Expand Down Expand Up @@ -292,7 +294,7 @@ class ElectronRecorderApp extends ElectronReplayApp {
// @ts-expect-error - TS7006 - Parameter 'additionalFeatures' implicitly has an 'any' type.
additionalFeatures,
// @ts-expect-error - TS7006 - Parameter 'referrer' implicitly has an 'any' type.
referrer
referrer,
) => {
event.preventDefault();
event.newGuest = this.createRecordWindow({ url, collId, startRec });
Expand All @@ -303,9 +305,9 @@ class ElectronRecorderApp extends ElectronReplayApp {
disposition,
options,
additionalFeatures,
referrer
referrer,
);
}
},
);

recWebContents.on("destroyed", () => {
Expand Down
4 changes: 2 additions & 2 deletions src/electron/electron-recorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ElectronRecorder extends Recorder {
// @ts-expect-error - TS2339 - Property 'shutdownPromise' does not exist on type 'ElectronRecorder'.
this.shutdownPromise = new Promise(
// @ts-expect-error - TS2339 - Property '_shutdownResolve' does not exist on type 'ElectronRecorder'.
(resolve) => (this._shutdownResolve = resolve)
(resolve) => (this._shutdownResolve = resolve),
);

// @ts-expect-error - TS2339 - Property 'recWC' does not exist on type 'ElectronRecorder'.
Expand Down Expand Up @@ -231,7 +231,7 @@ class ElectronRecorder extends Recorder {
responseHeaders: responseHeaders,
body: base64Str,
},
sessions
sessions,
);
} catch (e) {
console.warn(e);
Expand Down
6 changes: 3 additions & 3 deletions src/electron/rec-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ class RecWindowUI extends LitElement {
}
.overlay-idle {
background-color: #4D7C0F;
background-color: #4d7c0f;
}
.overlay-waiting {
background-color: #C5A802;
background-color: #c5a802;
}
.overlay-auto {
background-color: #0891B2;
background-color: #0891b2;
}
`);
}
Expand Down
39 changes: 18 additions & 21 deletions src/embed.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
<!doctype html>
<html>
<head>
<script src="ui.js"></script>
<style>
html {
width: 100%;
height: 100%;
display: flex;
}

<head>
<script src="ui.js"></script>
<style>
html {
width: 100%;
height: 100%;
display: flex;
}

body {
width: 100%;
}
body {
width: 100%;
}

record-web-page {
border: 1px solid black;
display: flex;
height: 100%;
}
</style>

<head>
record-web-page {
border: 1px solid black;
display: flex;
height: 100%;
}
</style>
</head>

<body>
<record-web-page url="https://example.com/"></record-web-page>
</body>

</html>
6 changes: 3 additions & 3 deletions src/ext/bg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ chrome.tabs.onCreated.addListener((tab) => {
tab.id,
{ waitForTabUpdate, collId, openUrl, autorun },
// @ts-expect-error - TS2554 - Expected 2 arguments, but got 3.
openUrl
openUrl,
);
}
});
Expand Down Expand Up @@ -321,7 +321,7 @@ chrome.runtime.onMessage.addListener(
disableCSPForTab(message.tabId);
break;
}
}
},
);

// ===========================================================================
Expand All @@ -344,7 +344,7 @@ async function disableCSPForTab(tabId) {
"Page.setBypassCSP",
{ enabled: true },
// @ts-expect-error - TS7006 - Parameter 'resp' implicitly has an 'any' type.
(resp) => resolve(resp)
(resp) => resolve(resp),
);
});

Expand Down
8 changes: 4 additions & 4 deletions src/ext/browser-recorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class BrowserRecorder extends Recorder {
port = null,
openWinMap = null,
autorun = false,
}
},
) {
super();

Expand Down Expand Up @@ -129,7 +129,7 @@ class BrowserRecorder extends Recorder {

if (numOtherRecorders > 0) {
console.log(
`closing session, not detaching, ${numOtherRecorders} other recording tab(s) left`
`closing session, not detaching, ${numOtherRecorders} other recording tab(s) left`,
);
return this.sessionClose([]);
} else {
Expand Down Expand Up @@ -376,7 +376,7 @@ class BrowserRecorder extends Recorder {
} else {
// @ts-expect-error - TS7005 - Variable 'prr' implicitly has an 'any' type.
prr.reject(
chrome.runtime.lastError ? chrome.runtime.lastError.message : ""
chrome.runtime.lastError ? chrome.runtime.lastError.message : "",
);
}
};
Expand All @@ -402,7 +402,7 @@ class BrowserRecorder extends Recorder {
this.debuggee,
method,
params,
sessionId
sessionId,
);
} catch (e) {
console.warn(e);
Expand Down
6 changes: 3 additions & 3 deletions src/popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class RecPopup extends LitElement {
params.set(
"ts",
// @ts-expect-error - TS2339 - Property 'pageTs' does not exist on type 'RecPopup'.
new Date(this.pageTs).toISOString().replace(/[-:TZ.]/g, "")
new Date(this.pageTs).toISOString().replace(/[-:TZ.]/g, ""),
);
params.set("view", "pages");

Expand Down Expand Up @@ -616,7 +616,7 @@ class RecPopup extends LitElement {
class="dropdown-item"
>${coll.title}</a
>
`
`,
)
}
</div>
Expand Down Expand Up @@ -884,7 +884,7 @@ class RecPopup extends LitElement {
html` <tr>
<td>${name}</td>
<th>${value}</th>
</tr>`
</tr>`,
)
}`
: ""
Expand Down
Loading

0 comments on commit 721090a

Please sign in to comment.