Skip to content

Commit a55201e

Browse files
committed
result of 'just format'
1 parent 36a3bda commit a55201e

File tree

96 files changed

+2657
-2619
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+2657
-2619
lines changed

web/.eslintrc.cjs

Lines changed: 349 additions & 320 deletions
Large diffs are not rendered by default.

web/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
# Web Application
22

33
This application is built using:
4+
45
- [VueJS](https://vuejs.org)
5-
- Vue 3, Composition API w/ Setup API
6+
- Vue 3, Composition API w/ Setup API
67
- [Quasar Framework V2](https://quasar.dev/)
78
- [Just (justfiles)](https://just.systems)
89
- [Typescript](https://www.typescriptlang.org/)
910
- [Vite](https://vitejs.dev/)
1011
- [Sass w/ SCSS syntax](https://sass-lang.com/documentation/syntax/)
1112
- [ESLint](https://eslint.org/)
12-
- Using almost the same rules as Connect Dashboard project
13+
- Using almost the same rules as Connect Dashboard project
1314
- [Pinia](https://pinia.vuejs.org/)
1415
- [Axios](https://axios-http.com/docs/intro)
1516
- [Vitest](https://vitest.dev/)
@@ -18,17 +19,17 @@ This application is built using:
1819
# Installing the prerequisites
1920

2021
1. Node JS (LTS Version)
21-
- NOTE: use of nvm is highly recommended:
22-
- [NVM](https://github.com/nvm-sh/nvm#installing-and-updating)
23-
- Global version of node is NOT recommended, but...
24-
- [NodeJS](https://nodejs.org/en/download)
22+
- NOTE: use of nvm is highly recommended:
23+
- [NVM](https://github.com/nvm-sh/nvm#installing-and-updating)
24+
- Global version of node is NOT recommended, but...
25+
- [NodeJS](https://nodejs.org/en/download)
2526
2. Install Just:
26-
- `[Just](https://just.systems/man/en/)
27+
- `[Just](https://just.systems/man/en/)
2728

2829
# Building the client
2930

3031
1. Default recipe will clean, image, bootstrap, validate, build and test agent & client
31-
- `just`
32+
- `just`
3233

3334
# Common Developer tasks
3435

web/index.html

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
<!doctype html>
22
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" href="/favicon.ico" sizes="48x48" />
6+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8+
<title>Posit Publisher</title>
9+
</head>
310

4-
<head>
5-
<meta charset="UTF-8" />
6-
<link rel="icon" href="/favicon.ico" sizes="48x48">
7-
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
8-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
9-
<title>Posit Publisher</title>
10-
</head>
11-
12-
<body>
13-
<div id="app"></div>
14-
<script type="module" src="/src/main.ts"></script>
15-
</body>
16-
11+
<body>
12+
<div id="app"></div>
13+
<script type="module" src="/src/main.ts"></script>
14+
</body>
1715
</html>

web/src/App.vue

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
<template>
44
<div id="app">
5-
<q-layout
6-
view="hHh lpR fFf"
7-
>
5+
<q-layout view="hHh lpR fFf">
86
<AppHeader />
97

108
<q-page-container>
@@ -17,10 +15,10 @@
1715
</template>
1816

1917
<script setup lang="ts">
20-
import AppHeader from 'src/components/AppHeader.vue';
21-
import { onBeforeUnmount } from 'vue';
22-
import { useEventStore } from 'src/stores/events';
23-
import { useDeploymentStore } from 'src/stores/deployments';
18+
import AppHeader from "src/components/AppHeader.vue";
19+
import { onBeforeUnmount } from "vue";
20+
import { useEventStore } from "src/stores/events";
21+
import { useDeploymentStore } from "src/stores/deployments";
2422

2523
const eventStore = useEventStore();
2624

@@ -31,7 +29,6 @@ onBeforeUnmount(() => {
3129

3230
// Let's start population of the deployments as quickly as possible
3331
useDeploymentStore();
34-
3532
</script>
3633

3734
<style lang="scss">

web/src/api/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# API Wrapper Library
1+
# API Wrapper Library
22

33
A library to enable convenient access to the Publisher Client API and its
44
response types.
55

66
## Usage
77

88
```typescript
9-
import { useApi } from 'src/api';
9+
import { useApi } from "src/api";
1010

1111
const api = useApi();
1212

@@ -22,7 +22,7 @@ using `setBaseUrl`. This changes the client so all requests will use the new
2222
base URL. This will need to be done before any requests are made.
2323

2424
```typescript
25-
api.setBaseUrl('http://localhost:9000/api');
25+
api.setBaseUrl("http://localhost:9000/api");
2626
```
2727

2828
## Organization

web/src/api/client.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright (C) 2023 by Posit Software, PBC.
22

3-
import axios from 'axios';
3+
import axios from "axios";
44

5-
import { Accounts } from 'src/api/resources/Accounts';
6-
import { Deployments } from 'src/api/resources/Deployments';
7-
import { Configurations } from 'src/api/resources/Configurations';
8-
import { Files } from 'src/api/resources/Files';
5+
import { Accounts } from "src/api/resources/Accounts";
6+
import { Deployments } from "src/api/resources/Deployments";
7+
import { Configurations } from "src/api/resources/Configurations";
8+
import { Files } from "src/api/resources/Files";
99

1010
class PublishingClientApi {
1111
private client;
@@ -17,7 +17,7 @@ class PublishingClientApi {
1717

1818
constructor() {
1919
this.client = axios.create({
20-
baseURL: '/api',
20+
baseURL: "/api",
2121
});
2222

2323
this.accounts = new Accounts(this.client);

web/src/api/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Copyright (C) 2023 by Posit Software, PBC.
22

3-
export { api as default, useApi } from 'src/api/client';
3+
export { api as default, useApi } from "src/api/client";
44

5-
export * from 'src/api/types/accounts';
6-
export * from 'src/api/types/configurations';
7-
export * from 'src/api/types/connect';
8-
export * from 'src/api/types/deployments';
9-
export * from 'src/api/types/events';
10-
export * from 'src/api/types/schema';
5+
export * from "src/api/types/accounts";
6+
export * from "src/api/types/configurations";
7+
export * from "src/api/types/connect";
8+
export * from "src/api/types/deployments";
9+
export * from "src/api/types/events";
10+
export * from "src/api/types/schema";

web/src/api/resources/Accounts.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Copyright (C) 2023 by Posit Software, PBC.
22

3-
import { AxiosInstance } from 'axios';
3+
import { AxiosInstance } from "axios";
44

5-
import { Account } from 'src/api/types/accounts';
5+
import { Account } from "src/api/types/accounts";
66

77
export class Accounts {
88
private client: AxiosInstance;
@@ -15,9 +15,7 @@ export class Accounts {
1515
// 200 - success
1616
// 500 - internal server error
1717
getAll() {
18-
return this.client.get<{ accounts: Account[] }>(
19-
'/accounts',
20-
);
18+
return this.client.get<{ accounts: Account[] }>("/accounts");
2119
}
2220

2321
// Returns:
@@ -26,8 +24,6 @@ export class Accounts {
2624
// 500 - internal server error
2725
get(accountName: string) {
2826
const encodedAccountName = encodeURIComponent(accountName);
29-
return this.client.get<Account>(
30-
`/accounts/${encodedAccountName}`,
31-
);
27+
return this.client.get<Account>(`/accounts/${encodedAccountName}`);
3228
}
3329
}

web/src/api/resources/Configurations.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Copyright (C) 2023 by Posit Software, PBC.
22

3-
import { AxiosInstance } from 'axios';
3+
import { AxiosInstance } from "axios";
44

55
import {
66
Configuration,
77
ConfigurationDetails,
88
ConfigurationError,
9-
} from '../types/configurations';
9+
} from "../types/configurations";
1010

1111
export class Configurations {
1212
private client: AxiosInstance;
@@ -20,7 +20,7 @@ export class Configurations {
2020
// 500 - internal server error
2121
getAll() {
2222
return this.client.get<Array<Configuration | ConfigurationError>>(
23-
'/configurations',
23+
"/configurations",
2424
);
2525
}
2626

@@ -48,6 +48,6 @@ export class Configurations {
4848
// 400 - bad request
4949
// 500 - internal server error
5050
inspect() {
51-
return this.client.post<ConfigurationDetails[]>('/inspect');
51+
return this.client.post<ConfigurationDetails[]>("/inspect");
5252
}
5353
}

web/src/api/resources/Deployments.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
// Copyright (C) 2023 by Posit Software, PBC.
22

3-
import { AxiosInstance } from 'axios';
3+
import { AxiosInstance } from "axios";
44

5-
import { Deployment, DeploymentError, PreDeployment } from 'src/api/types/deployments';
5+
import {
6+
Deployment,
7+
DeploymentError,
8+
PreDeployment,
9+
} from "src/api/types/deployments";
610

711
export class Deployments {
812
private client: AxiosInstance;
@@ -16,7 +20,7 @@ export class Deployments {
1620
// 500 - internal server error
1721
getAll() {
1822
return this.client.get<Array<Deployment | PreDeployment | DeploymentError>>(
19-
'/deployments',
23+
"/deployments",
2024
);
2125
}
2226

@@ -37,26 +41,23 @@ export class Deployments {
3741
// 409 - conflict
3842
// 500 - internal server error
3943
// Errors returned through event stream
40-
createNew(accountName? : string, saveName?: string) {
44+
createNew(accountName?: string, saveName?: string) {
4145
const params = {
4246
account: accountName,
4347
saveName,
4448
};
45-
return this.client.post<PreDeployment>(
46-
'/deployments',
47-
params,
48-
);
49+
return this.client.post<PreDeployment>("/deployments", params);
4950
}
5051

5152
// Returns:
5253
// 200 - success
5354
// 400 - bad request
5455
// 500 - internal server error
5556
// Errors returned through event stream
56-
publish(targetName: string, accountName? : string) {
57+
publish(targetName: string, accountName?: string) {
5758
const params = {
5859
account: accountName,
59-
config: 'default', // hardcoded for now
60+
config: "default", // hardcoded for now
6061
};
6162
const encodedTarget = encodeURIComponent(targetName);
6263
return this.client.post<{ localId: string }>(
@@ -71,8 +72,6 @@ export class Deployments {
7172
// 500 - internal server error
7273
delete(saveName: string) {
7374
const encodedSaveName = encodeURIComponent(saveName);
74-
return this.client.delete(
75-
`deployments/${encodedSaveName}`
76-
);
75+
return this.client.delete(`deployments/${encodedSaveName}`);
7776
}
7877
}

0 commit comments

Comments
 (0)