Skip to content

Commit f89c948

Browse files
authored
Merge pull request #19 from kinde-oss/feat/add-sdk-indicator
chore: update TS SDK version and add SDK indicator
2 parents 41fc364 + f613326 commit f89c948

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"svelte": "^4.0.0"
4545
},
4646
"dependencies": {
47-
"@kinde-oss/kinde-typescript-sdk": "^2.4.0"
47+
"@kinde-oss/kinde-typescript-sdk": "^2.6.2"
4848
},
4949
"devDependencies": {
5050
"@playwright/test": "^1.28.1",

src/lib/config/config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
22
// @ts-nocheck
33
import {env} from '$env/dynamic/private';
4+
import {version} from '$app/environment';
45

56
export const kindeConfiguration = {
67
authDomain: env.KINDE_ISSUER_URL,
@@ -17,5 +18,7 @@ export const kindeConfiguration = {
1718
export const kindeAPIConfiguration = {
1819
audience: `${env.KINDE_ISSUER_URL}/api`,
1920
clientId: env.KINDE_CLIENT_ID,
20-
clientSecret: env.KINDE_CLIENT_SECRET
21+
clientSecret: env.KINDE_CLIENT_SECRET,
22+
framework: 'Sveltekit',
23+
frameworkVersion: version
2124
};

src/routes/+page.svelte

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
<h1>Welcome to SvelteKit</h1>
2-
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
1+
<script>
2+
import {version} from '$app/environment';
3+
</script>
4+
5+
<h1>Welcome to Kinde Svelte SDK v{version}</h1>

svelte.config.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import adapter from '@sveltejs/adapter-auto';
22
import { vitePreprocess } from '@sveltejs/kit/vite';
3+
import { readFileSync } from 'fs';
4+
import { fileURLToPath } from 'url';
5+
6+
const file = fileURLToPath(new URL('package.json', import.meta.url));
7+
const json = readFileSync(file, 'utf8');
8+
const pkg = JSON.parse(json);
39

410
/** @type {import('@sveltejs/kit').Config} */
511
const config = {
@@ -11,7 +17,10 @@ const config = {
1117
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
1218
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
1319
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
14-
adapter: adapter()
20+
adapter: adapter(),
21+
version: {
22+
name: pkg.version,
23+
}
1524
}
1625
};
1726

0 commit comments

Comments
 (0)