Skip to content

Commit

Permalink
refactor: handle ci errors
Browse files Browse the repository at this point in the history
  • Loading branch information
z0gSh1u committed Sep 11, 2024
1 parent c0ffbfa commit e066536
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
node-version: ['18', '20']
python-version: ['3.8']
python-version: ['3.10']

ci-python:
name: 'CI: Python'
Expand All @@ -32,4 +32,4 @@ jobs:
fail-fast: false
matrix:
node-version: ['18']
python-version: ['3.8']
python-version: ['3.10']
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ pnpm-lock.yaml

# template
**/template

# JSON
**/*.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export class SecretNoteContentContribution implements ContentContribution {
secretNoteModel.currentFileContents = currentFileContents;
secretNoteModel.filePath = currentFileContents.path;

/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
// @ts-ignore
if (!secretNoteModel.quickEditMode && !secretNoteModel.readOnly) {
secretNoteModel.startKernelConnection();
Expand Down
1 change: 1 addition & 0 deletions packages/secretnote-lite/src/modules/file/preview-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export class FilePreviewView extends BaseView {

constructor(
@inject(FileService) fileService: FileService,
/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
// @ts-ignore
@contrib(FilePreviewContribution)
providers: Contribution.Provider<FilePreviewContribution>,
Expand Down
5 changes: 3 additions & 2 deletions packages/secretnote-lite/src/modules/layout/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
}

.secretnote-header {
background: #fff;
border-bottom: 1px solid var(--mana-secretnote-divider-color);
background: #fff;

.logo {
display: inline-flex;
Expand Down Expand Up @@ -76,15 +76,16 @@
position: absolute;
bottom: 0;
width: 100%;
padding: 12px;
border-top: 1px solid var(--mana-secretnote-divider-color);
text-align: center;
padding: 12px;
}

.about-bar {
a.ant-typography {
color: var(--custom-blue-400) !important;
}

.icon-container {
line-height: 0;
}
Expand Down
1 change: 1 addition & 0 deletions packages/secretnote-lite/src/modules/layout/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export class SideBarView extends DefaultSlotView {
readonly providers: Contribution.Provider<SideBarContribution>;

constructor(
/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
// @ts-ignore
@contrib(SideBarContribution)
providers: Contribution.Provider<SideBarContribution>,
Expand Down
2 changes: 1 addition & 1 deletion packages/secretnote-lite/src/modules/metrics/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
}

.server-name {
margin-bottom: 4px;
color: var(--mana-secretnote-text-color);
font-size: 14px;
font-weight: 600;
text-align: left;
margin-bottom: 4px;
}

.placeholder {
Expand Down
1 change: 1 addition & 0 deletions packages/secretnote-lite/src/modules/metrics/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const MetricsComponent = () => {
return () => {
service.disable();
};
/* eslint-disable-next-line react-hooks/exhaustive-deps */
}, []);

const formatMetric = (v: (typeof metrics)[1]) =>
Expand Down
4 changes: 2 additions & 2 deletions packages/secretnote-lite/src/modules/node/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
padding: 16px;

.title {
margin-bottom: 20px;
color: rgb(45 55 72 / 88%);
font-size: 16px;
font-weight: 600;
color: rgba(45, 55, 72, 0.88);
margin-bottom: 20px;
}

label {
Expand Down
3 changes: 2 additions & 1 deletion packages/secretnote-lite/src/modules/notebook/drive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const DriveName = 'SecretNoteContentsDrive';
@singleton()
export class SecretNoteContentsDrive implements IContentsDrive {
readonly name: string = DriveName; // Name of drive, used at the leading component of file paths.
protected apiEndpoint: string = 'api/contents';
protected apiEndpoint = 'api/contents';
protected _isDisposed = false;
protected fileChangedEmitter = new Emitter<IContentsChangedArgs>();

Expand Down Expand Up @@ -96,6 +96,7 @@ export class SecretNoteContentsDrive implements IContentsDrive {
* @override Drive._getSettings
*/
protected _getSettings(...args: any) /* :ISettings */ {
/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
// @ts-ignore
return void 0;
}
Expand Down
20 changes: 12 additions & 8 deletions packages/secretnote-lite/src/modules/server/server-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,17 @@ export class SecretNoteServerManager {
this.defaultServerManager = defaultServerManager;
this.updateServerConnectionSettings();
this.getResourcesAndVersions();
this.getServerList().then((servers) => {
// The default ServerManager must be launched to get LSP to work.
// If there exists servers at the beginning, just launch directly.
// Otherwise postpone the launch until a server is added.
servers?.length &&
!this.defaultServerManager.loaded &&
this.defaultServerManager.launch();
});
this.getServerList()
.then((servers) => {
// The default ServerManager must be launched to get LSP to work.
// If there exists servers at the beginning, just launch directly.
// Otherwise postpone the launch until a server is added.
servers?.length &&
!this.defaultServerManager.loaded &&
this.defaultServerManager.launch();
return;
})
.catch((e) => genericErrorHandler(e, { silent: true }));
}

/**
Expand Down Expand Up @@ -228,6 +231,7 @@ export class SecretNoteServerManager {
try {
const data = await Promise.race([
request('api/kernelspecs', {}, server.id),
/* eslint-disable-next-line promise/param-names */
new Promise((_, reject) => {
setTimeout(() => reject(new Error('timeout')), 5000);
}),
Expand Down
10 changes: 5 additions & 5 deletions packages/secretnote-lite/src/modules/welcome/index.less
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.secretnote-welcome-page {
overflow: auto;
width: 100%;
height: 100%;
overflow: auto;
box-sizing: border-box;
padding: 32px 48px;
color: var(--mana-secretnote-text-color);
background-color: #fff;
color: var(--mana-secretnote-text-color);

.ant-steps {
margin-top: 16px;
Expand All @@ -17,11 +17,11 @@
}

code {
font-size: 13px;
background-color: #efefef;
border: 1px solid #ddd;
display: inline-block;
padding: 1px 4px;
border: 1px solid #ddd;
background-color: #efefef;
font-size: 13px;
}

a {
Expand Down

0 comments on commit e066536

Please sign in to comment.