@osdk/create-app 0.17.0-main-20240529132607 → 0.17.0
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.
- package/CHANGELOG.md +55 -1
- package/build/browser/index.js +16 -14
- package/build/browser/index.js.map +1 -1
- package/build/cjs/index.cjs +16 -15
- package/build/cjs/index.cjs.map +1 -1
- package/build/esm/index.js +16 -14
- package/build/esm/index.js.map +1 -1
- package/build/esm/run.d.ts.map +1 -1
- package/build/esm/templates.d.ts.map +1 -1
- package/package.json +19 -10
- package/templates/template-next-static-export/.eslintrc.json +0 -4
- package/templates/template-next-static-export/README.md.hbs +0 -35
- package/templates/template-next-static-export/_gitignore +0 -36
- package/templates/template-next-static-export/next.config.js.hbs +0 -17
- package/templates/template-next-static-export/package.json.hbs +0 -25
- package/templates/template-next-static-export/public/next.svg +0 -20
- package/templates/template-next-static-export/public/palantir.svg +0 -3
- package/templates/template-next-static-export/src/app/auth/callback/page.tsx +0 -25
- package/templates/template-next-static-export/src/app/globals.css +0 -81
- package/templates/template-next-static-export/src/app/icon.svg +0 -20
- package/templates/template-next-static-export/src/app/layout.module.css +0 -11
- package/templates/template-next-static-export/src/app/layout.tsx +0 -51
- package/templates/template-next-static-export/src/app/login/page.tsx +0 -43
- package/templates/template-next-static-export/src/app/page.module.css +0 -7
- package/templates/template-next-static-export/src/app/page.tsx.hbs +0 -53
- package/templates/template-next-static-export/src/lib/client.ts.hbs +0 -31
- package/templates/template-next-static-export/src/lib/useAuthenticated.ts +0 -25
- package/templates/template-next-static-export/tsconfig.json +0 -27
- package/templates/template-react/.eslintrc.cjs +0 -18
- package/templates/template-react/README.md.hbs +0 -35
- package/templates/template-react/_gitignore +0 -24
- package/templates/template-react/index.html +0 -15
- package/templates/template-react/package.json.hbs +0 -30
- package/templates/template-react/public/palantir.svg +0 -3
- package/templates/template-react/public/react.svg +0 -1
- package/templates/template-react/src/AuthCallback.tsx +0 -24
- package/templates/template-react/src/AuthenticatedRoute.tsx +0 -33
- package/templates/template-react/src/Home.module.css +0 -7
- package/templates/template-react/src/Home.tsx.hbs +0 -47
- package/templates/template-react/src/Layout.module.css +0 -10
- package/templates/template-react/src/Layout.tsx +0 -29
- package/templates/template-react/src/Login.tsx +0 -40
- package/templates/template-react/src/client.ts.hbs +0 -31
- package/templates/template-react/src/index.css +0 -81
- package/templates/template-react/src/main.tsx +0 -33
- package/templates/template-react/src/vite-env.d.ts +0 -1
- package/templates/template-react/tsconfig.json +0 -25
- package/templates/template-react/tsconfig.node.json +0 -10
- package/templates/template-react/vite.config.ts.hbs +0 -19
- package/templates/template-tutorial-todo-app/.eslintrc.cjs +0 -18
- package/templates/template-tutorial-todo-app/README.md.hbs +0 -33
- package/templates/template-tutorial-todo-app/index.html +0 -15
- package/templates/template-tutorial-todo-app/package.json.hbs +0 -31
- package/templates/template-tutorial-todo-app/public/todo-app.svg +0 -4
- package/templates/template-tutorial-todo-app/src/AuthCallback.tsx +0 -24
- package/templates/template-tutorial-todo-app/src/AuthenticatedRoute.tsx +0 -33
- package/templates/template-tutorial-todo-app/src/CreateProjectButton.tsx +0 -33
- package/templates/template-tutorial-todo-app/src/CreateProjectDialog.tsx +0 -56
- package/templates/template-tutorial-todo-app/src/CreateTaskButton.tsx +0 -35
- package/templates/template-tutorial-todo-app/src/CreateTaskDialog.tsx +0 -52
- package/templates/template-tutorial-todo-app/src/DeleteProjectButton.tsx +0 -34
- package/templates/template-tutorial-todo-app/src/DeleteProjectDialog.tsx +0 -46
- package/templates/template-tutorial-todo-app/src/Dialog.module.css +0 -5
- package/templates/template-tutorial-todo-app/src/Dialog.tsx +0 -19
- package/templates/template-tutorial-todo-app/src/Home.module.css +0 -35
- package/templates/template-tutorial-todo-app/src/Home.tsx +0 -62
- package/templates/template-tutorial-todo-app/src/Layout.module.css +0 -16
- package/templates/template-tutorial-todo-app/src/Layout.tsx +0 -21
- package/templates/template-tutorial-todo-app/src/Login.module.css +0 -5
- package/templates/template-tutorial-todo-app/src/Login.tsx +0 -42
- package/templates/template-tutorial-todo-app/src/ProjectSelect.tsx +0 -40
- package/templates/template-tutorial-todo-app/src/TaskList.module.css +0 -6
- package/templates/template-tutorial-todo-app/src/TaskList.tsx +0 -38
- package/templates/template-tutorial-todo-app/src/TaskListItem.module.css +0 -3
- package/templates/template-tutorial-todo-app/src/TaskListItem.tsx +0 -37
- package/templates/template-tutorial-todo-app/src/client.ts.hbs +0 -31
- package/templates/template-tutorial-todo-app/src/index.css +0 -80
- package/templates/template-tutorial-todo-app/src/main.tsx +0 -33
- package/templates/template-tutorial-todo-app/src/mocks.ts +0 -137
- package/templates/template-tutorial-todo-app/src/useProjectTasks.ts +0 -55
- package/templates/template-tutorial-todo-app/src/useProjects.ts +0 -43
- package/templates/template-tutorial-todo-app/src/vite-env.d.ts +0 -1
- package/templates/template-tutorial-todo-app/tsconfig.json +0 -25
- package/templates/template-tutorial-todo-app/tsconfig.node.json +0 -10
- package/templates/template-tutorial-todo-app/vite.config.ts.hbs +0 -19
- package/templates/template-vue/.vscode/extensions.json +0 -3
- package/templates/template-vue/README.md.hbs +0 -35
- package/templates/template-vue/_gitignore +0 -24
- package/templates/template-vue/index.html +0 -15
- package/templates/template-vue/package.json.hbs +0 -22
- package/templates/template-vue/public/palantir.svg +0 -3
- package/templates/template-vue/public/vue.svg +0 -1
- package/templates/template-vue/src/AuthCallback.vue +0 -22
- package/templates/template-vue/src/Home.vue.hbs +0 -38
- package/templates/template-vue/src/Layout.vue +0 -26
- package/templates/template-vue/src/Login.vue +0 -36
- package/templates/template-vue/src/client.ts.hbs +0 -31
- package/templates/template-vue/src/main.ts +0 -35
- package/templates/template-vue/src/style.css +0 -81
- package/templates/template-vue/src/vite-env.d.ts +0 -1
- package/templates/template-vue/tsconfig.json +0 -25
- package/templates/template-vue/tsconfig.node.json +0 -10
- package/templates/template-vue/vite.config.ts.hbs +0 -24
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import react from "@vitejs/plugin-react";
|
|
2
|
-
import { defineConfig } from "vite";
|
|
3
|
-
|
|
4
|
-
// https://vitejs.dev/config/
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [react()],
|
|
7
|
-
server: {
|
|
8
|
-
port: 8080,
|
|
9
|
-
{{#if corsProxy}}
|
|
10
|
-
proxy: {
|
|
11
|
-
"^(/multipass/api|/api)": {
|
|
12
|
-
target: "{{foundryUrl}}",
|
|
13
|
-
changeOrigin: true,
|
|
14
|
-
secure: true,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
{{/if}}
|
|
18
|
-
},
|
|
19
|
-
});
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# {{project}}
|
|
2
|
-
|
|
3
|
-
This project was generated with [`@osdk/create-app`](https://www.npmjs.com/package/@osdk/create-app) and demonstrates using the Ontology SDK package `{{osdkPackage}}` with Vue on top of Vite. Check out the [Vite](https://vitejs.dev/guide/) docs for further configuration.
|
|
4
|
-
|
|
5
|
-
## Developing
|
|
6
|
-
|
|
7
|
-
Run the following command or equivalent with your preferred package manager to start a local development server on `http://localhost:8080`:
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
npm run dev
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Development configuration is stored in `.env.development`.
|
|
14
|
-
|
|
15
|
-
{{#if corsProxy}}
|
|
16
|
-
In order to make API requests to Foundry, a CORS proxy has been set up for local development which may be removed if the stack is configured to allow `http://localhost:8080` to load resources. The configured OAuth client must also allow `http://localhost:8080/auth/callback` as a redirect URL.
|
|
17
|
-
{{else}}
|
|
18
|
-
In order to make API requests to Foundry, CORS must be configured for the stack to allow `http://localhost:8080` to load resources. If this has not been configured and you are unable to request this, you can alternatively generate your project again with `--corsProxy true` to use a proxy for API requests during local development. The configured OAuth client must also allow `http://localhost:8080/auth/callback` as a redirect URL.
|
|
19
|
-
{{/if}}
|
|
20
|
-
|
|
21
|
-
## Deploying
|
|
22
|
-
|
|
23
|
-
Run the following command or equivalent with your preferred package manager to create a production build of your application:
|
|
24
|
-
|
|
25
|
-
```sh
|
|
26
|
-
npm run build
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Production configuration is stored in `.env.production`.
|
|
30
|
-
|
|
31
|
-
If you did not fill in the URL your production application will be hosted on you will need to fill in the `VITE_FOUNDRY_REDIRECT_URL` in `.env.production`.
|
|
32
|
-
|
|
33
|
-
In order to make API requests to Foundry, CORS must be configured for the stack to allow the production origin to load resources. This will be automatically done for you if you are using Foundry website hosting. The configured OAuth client must also allow the production origin auth callback as a redirect URL.
|
|
34
|
-
|
|
35
|
-
A `foundry.config.json` file is included in the root of this project to make deploying to Foundry website hosting with [`@osdk/cli`](https://www.npmjs.com/package/@osdk/cli) easier. If you are not using Foundry website hosting for your application you may delete this file.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Logs
|
|
2
|
-
logs
|
|
3
|
-
*.log
|
|
4
|
-
npm-debug.log*
|
|
5
|
-
yarn-debug.log*
|
|
6
|
-
yarn-error.log*
|
|
7
|
-
pnpm-debug.log*
|
|
8
|
-
lerna-debug.log*
|
|
9
|
-
|
|
10
|
-
node_modules
|
|
11
|
-
dist
|
|
12
|
-
dist-ssr
|
|
13
|
-
*.local
|
|
14
|
-
|
|
15
|
-
# Editor directories and files
|
|
16
|
-
.vscode/*
|
|
17
|
-
!.vscode/extensions.json
|
|
18
|
-
.idea
|
|
19
|
-
.DS_Store
|
|
20
|
-
*.suo
|
|
21
|
-
*.ntvs*
|
|
22
|
-
*.njsproj
|
|
23
|
-
*.sln
|
|
24
|
-
*.sw?
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/vue.svg" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>Ontology SDK + Vue</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="app-container">
|
|
11
|
-
<div id="app"></div>
|
|
12
|
-
</div>
|
|
13
|
-
<script type="module" src="/src/main.ts"></script>
|
|
14
|
-
</body>
|
|
15
|
-
</html>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{project}}",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.0.0",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite",
|
|
8
|
-
"build": "vue-tsc && vite build",
|
|
9
|
-
"preview": "vite preview"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"{{osdkPackage}}": "latest",
|
|
13
|
-
"vue": "^3.4.27",
|
|
14
|
-
"vue-router": "^4.2.5"
|
|
15
|
-
},
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"@vitejs/plugin-vue": "^4.5.0",
|
|
18
|
-
"typescript": "^5.2.2",
|
|
19
|
-
"vite": "^5.2.11",
|
|
20
|
-
"vue-tsc": "^1.8.22"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.10768 6.06401C4.10768 8.3771 5.96702 10.2526 8.26059 10.2526C10.5543 10.2526 12.4138 8.3771 12.4138 6.06401C12.4138 3.7508 10.5543 1.87553 8.26059 1.87553C5.96702 1.87553 4.10768 3.7508 4.10768 6.06401ZM8.26093 13.923L13.6299 11.5848L14.5217 13.3091L8.26093 16L2 13.3091L2.89201 11.5848L8.26093 13.923ZM8.26101 0C4.94367 0 2.25442 2.71228 2.25442 6.05803C2.25442 9.40378 4.94367 12.1159 8.26101 12.1159C11.5782 12.1159 14.2676 9.40378 14.2676 6.05803C14.2676 2.71228 11.5782 0 8.26101 0Z" fill="#111418"/>
|
|
3
|
-
</svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { onMounted, ref } from "vue";
|
|
3
|
-
import client from "./client";
|
|
4
|
-
import { useRouter } from "vue-router";
|
|
5
|
-
|
|
6
|
-
const router = useRouter();
|
|
7
|
-
|
|
8
|
-
const error = ref<string>();
|
|
9
|
-
|
|
10
|
-
onMounted(() => {
|
|
11
|
-
client.auth
|
|
12
|
-
.signIn()
|
|
13
|
-
.then(() => router.replace("/"))
|
|
14
|
-
.catch((e: unknown) => {
|
|
15
|
-
error.value = (e as Error).message;
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<template>
|
|
21
|
-
<div>{{ error != null ? error : "Authenticating…" }}</div>
|
|
22
|
-
</template>
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import client from "./client";
|
|
3
|
-
|
|
4
|
-
const objectApiNames = Object.keys(client.ontology.objects);
|
|
5
|
-
const actionApiNames = Object.keys(client.ontology.actions);
|
|
6
|
-
const queryApiNames = Object.keys(client.ontology.queries);
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<h1>{{osdkPackage}}</h1>
|
|
11
|
-
<p>
|
|
12
|
-
Welcome to your Ontology SDK! Try using any of the following methods now.
|
|
13
|
-
</p>
|
|
14
|
-
<div class="methods">
|
|
15
|
-
<div>
|
|
16
|
-
<h2>Objects (\{{ objectApiNames.length }})</h2>
|
|
17
|
-
<pre v-for="objectApiName in objectApiNames" key="objectApiName">client.ontology.objects.\{{ objectApiName }}</pre>
|
|
18
|
-
</div>
|
|
19
|
-
<div>
|
|
20
|
-
<h2>Actions (\{{ actionApiNames.length }})</h2>
|
|
21
|
-
<pre v-for="actionApiName in actionApiNames" key="actionApiName">client.ontology.actions.\{{ actionApiName }}</pre>
|
|
22
|
-
</div>
|
|
23
|
-
<div>
|
|
24
|
-
<h2>Queries (\{{ queryApiNames.length }})</h2>
|
|
25
|
-
<pre v-for="queryApiName in queryApiNames" key="queryApiName">client.ontology.queries.\{{ queryApiName }}</pre>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<style scoped>
|
|
31
|
-
.methods {
|
|
32
|
-
padding: 2em;
|
|
33
|
-
gap: 2em;
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: row;
|
|
36
|
-
flex-wrap: wrap;
|
|
37
|
-
}
|
|
38
|
-
</style>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<a
|
|
4
|
-
href="https://www.palantir.com/docs/foundry/ontology-sdk/overview/"
|
|
5
|
-
target="_blank"
|
|
6
|
-
>
|
|
7
|
-
<img src="/palantir.svg" class="logo" alt="Palantir logo" />
|
|
8
|
-
</a>
|
|
9
|
-
<a href="https://vuejs.org/" target="_blank">
|
|
10
|
-
<img src="/vue.svg" class="logo" alt="Vue logo" />
|
|
11
|
-
</a>
|
|
12
|
-
</div>
|
|
13
|
-
<router-view />
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<style scoped>
|
|
17
|
-
.logo {
|
|
18
|
-
height: 6em;
|
|
19
|
-
padding: 1.5em;
|
|
20
|
-
will-change: filter;
|
|
21
|
-
transition: filter 300ms;
|
|
22
|
-
}
|
|
23
|
-
.logo:hover {
|
|
24
|
-
filter: drop-shadow(0 0 2em #646cffaa);
|
|
25
|
-
}
|
|
26
|
-
</style>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { onUpdated, ref } from "vue";
|
|
3
|
-
import client from "./client";
|
|
4
|
-
import { useRouter } from "vue-router";
|
|
5
|
-
|
|
6
|
-
const router = useRouter();
|
|
7
|
-
|
|
8
|
-
const isLoggingIn = ref(false);
|
|
9
|
-
const error = ref<string>();
|
|
10
|
-
|
|
11
|
-
const login = async () => {
|
|
12
|
-
isLoggingIn.value = true;
|
|
13
|
-
try {
|
|
14
|
-
await client.auth.signIn();
|
|
15
|
-
} catch (e: unknown) {
|
|
16
|
-
error.value = (e as Error).message;
|
|
17
|
-
} finally {
|
|
18
|
-
isLoggingIn.value = false;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
onUpdated(() => {
|
|
23
|
-
// If the token exists but a user tries to load /login, redirect to the home page instead
|
|
24
|
-
if (client.auth.token != null) {
|
|
25
|
-
router.replace("/");
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<template>
|
|
31
|
-
<h1>Ontology SDK</h1>
|
|
32
|
-
<button @click="login">
|
|
33
|
-
{{ isLoggingIn ? "Logging in…" : "Log in " }}
|
|
34
|
-
</button>
|
|
35
|
-
<div v-if="error">Unable to log in: {{ error }}</div>
|
|
36
|
-
</template>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { FoundryClient, PublicClientAuth } from "{{osdkPackage}}";
|
|
2
|
-
|
|
3
|
-
const url = import.meta.env.VITE_FOUNDRY_API_URL;
|
|
4
|
-
const clientId = import.meta.env.VITE_FOUNDRY_CLIENT_ID;
|
|
5
|
-
const redirectUrl = import.meta.env.VITE_FOUNDRY_REDIRECT_URL;
|
|
6
|
-
checkEnv(url, "VITE_FOUNDRY_API_URL");
|
|
7
|
-
checkEnv(clientId, "VITE_FOUNDRY_CLIENT_ID");
|
|
8
|
-
checkEnv(redirectUrl, "VITE_FOUNDRY_REDIRECT_URL");
|
|
9
|
-
|
|
10
|
-
function checkEnv(
|
|
11
|
-
value: string | undefined,
|
|
12
|
-
name: string,
|
|
13
|
-
): asserts value is string {
|
|
14
|
-
if (value == null) {
|
|
15
|
-
throw new Error(`Missing environment variable: ${name}`);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Initialize the client to interact with the Ontology SDK
|
|
21
|
-
*/
|
|
22
|
-
const client = new FoundryClient({
|
|
23
|
-
url,
|
|
24
|
-
auth: new PublicClientAuth({
|
|
25
|
-
clientId,
|
|
26
|
-
url,
|
|
27
|
-
redirectUrl,
|
|
28
|
-
}),
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export default client;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { createApp } from "vue";
|
|
2
|
-
import { createRouter, createWebHistory } from "vue-router";
|
|
3
|
-
import AuthCallback from "./AuthCallback.vue";
|
|
4
|
-
import client from "./client";
|
|
5
|
-
import Home from "./Home.vue";
|
|
6
|
-
import Layout from "./Layout.vue";
|
|
7
|
-
import Login from "./Login.vue";
|
|
8
|
-
import "./style.css";
|
|
9
|
-
|
|
10
|
-
const routes = [
|
|
11
|
-
{ path: "/", component: Home, meta: { requiresAuth: true } },
|
|
12
|
-
{ path: "/login", component: Login },
|
|
13
|
-
{ path: "/auth/callback", component: AuthCallback },
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
const router = createRouter({
|
|
17
|
-
history: createWebHistory(),
|
|
18
|
-
routes,
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
router.beforeEach(async (to) => {
|
|
22
|
-
if (
|
|
23
|
-
to.meta.requiresAuth
|
|
24
|
-
&& (client.auth.token == null || client.auth.token.isExpired)
|
|
25
|
-
) {
|
|
26
|
-
try {
|
|
27
|
-
await client.auth.refresh();
|
|
28
|
-
} catch (e: unknown) {
|
|
29
|
-
// If we cannot refresh the token (i.e. the user is not logged in) we redirect to the login page
|
|
30
|
-
return "/login";
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
createApp(Layout).use(router).mount("#app");
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400;
|
|
5
|
-
|
|
6
|
-
color-scheme: light dark;
|
|
7
|
-
color: rgba(255, 255, 255, 0.87);
|
|
8
|
-
background-color: #242424;
|
|
9
|
-
|
|
10
|
-
font-synthesis: none;
|
|
11
|
-
text-rendering: optimizeLegibility;
|
|
12
|
-
-webkit-font-smoothing: antialiased;
|
|
13
|
-
-moz-osx-font-smoothing: grayscale;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
#app-container {
|
|
17
|
-
display: flex;
|
|
18
|
-
flex: 1;
|
|
19
|
-
align-items: center;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
#app {
|
|
23
|
-
max-width: 1280px;
|
|
24
|
-
margin: 0 auto;
|
|
25
|
-
padding: 2rem;
|
|
26
|
-
text-align: center;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
a {
|
|
30
|
-
font-weight: 500;
|
|
31
|
-
color: #646cff;
|
|
32
|
-
text-decoration: inherit;
|
|
33
|
-
}
|
|
34
|
-
a:hover {
|
|
35
|
-
color: #535bf2;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
body {
|
|
39
|
-
margin: 0;
|
|
40
|
-
display: flex;
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
min-width: 320px;
|
|
43
|
-
min-height: 100vh;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
h1 {
|
|
47
|
-
font-size: 3.2em;
|
|
48
|
-
line-height: 1.1;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
button {
|
|
52
|
-
border-radius: 8px;
|
|
53
|
-
border: 1px solid transparent;
|
|
54
|
-
padding: 0.6em 1.2em;
|
|
55
|
-
font-size: 1em;
|
|
56
|
-
font-weight: 500;
|
|
57
|
-
font-family: inherit;
|
|
58
|
-
background-color: #1a1a1a;
|
|
59
|
-
cursor: pointer;
|
|
60
|
-
transition: border-color 0.25s;
|
|
61
|
-
}
|
|
62
|
-
button:hover {
|
|
63
|
-
border-color: #646cff;
|
|
64
|
-
}
|
|
65
|
-
button:focus,
|
|
66
|
-
button:focus-visible {
|
|
67
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@media (prefers-color-scheme: light) {
|
|
71
|
-
:root {
|
|
72
|
-
color: #213547;
|
|
73
|
-
background-color: #ffffff;
|
|
74
|
-
}
|
|
75
|
-
a:hover {
|
|
76
|
-
color: #747bff;
|
|
77
|
-
}
|
|
78
|
-
button {
|
|
79
|
-
background-color: #f9f9f9;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
|
|
9
|
-
/* Bundler mode */
|
|
10
|
-
"moduleResolution": "bundler",
|
|
11
|
-
"allowImportingTsExtensions": true,
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"isolatedModules": true,
|
|
14
|
-
"noEmit": true,
|
|
15
|
-
"jsx": "preserve",
|
|
16
|
-
|
|
17
|
-
/* Linting */
|
|
18
|
-
"strict": true,
|
|
19
|
-
"noUnusedLocals": true,
|
|
20
|
-
"noUnusedParameters": true,
|
|
21
|
-
"noFallthroughCasesInSwitch": true
|
|
22
|
-
},
|
|
23
|
-
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],
|
|
24
|
-
"references": [{ "path": "./tsconfig.node.json" }]
|
|
25
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import vue from "@vitejs/plugin-vue";
|
|
2
|
-
import { defineConfig } from "vite";
|
|
3
|
-
|
|
4
|
-
// https://vitejs.dev/config/
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [vue()],
|
|
7
|
-
server: {
|
|
8
|
-
port: 8080,
|
|
9
|
-
{{#if corsProxy}}
|
|
10
|
-
proxy: {
|
|
11
|
-
"^(/multipass/api|/api)": {
|
|
12
|
-
target: "{{foundryUrl}}",
|
|
13
|
-
changeOrigin: true,
|
|
14
|
-
secure: true,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
{{/if}}
|
|
18
|
-
},
|
|
19
|
-
resolve: {
|
|
20
|
-
alias: {
|
|
21
|
-
vue: "vue/dist/vue.esm-bundler",
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
});
|