Skip to content

Commit 80bdc58

Browse files
authored
chore(vue,nuxt): Add satellite application types (#5911)
1 parent ce6dd89 commit 80bdc58

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

.changeset/four-mangos-punch.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@clerk/nuxt": patch
3+
"@clerk/vue": patch
4+
---
5+
6+
Add `isSatellite` prop type in Vue and Nuxt SDKs

packages/nuxt/src/module.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import type { LoadClerkJsScriptOptions } from '@clerk/shared/loadClerkJsScript';
1+
import type { Without } from '@clerk/types';
2+
import type { PluginOptions } from '@clerk/vue';
23
import {
34
addComponent,
45
addImports,
@@ -11,7 +12,7 @@ import {
1112
updateRuntimeConfig,
1213
} from '@nuxt/kit';
1314

14-
export type ModuleOptions = Omit<LoadClerkJsScriptOptions, 'routerPush' | 'routerReplace' | 'publishableKey'> & {
15+
export type ModuleOptions = Without<PluginOptions, 'routerPush' | 'routerReplace' | 'publishableKey'> & {
1516
publishableKey?: string;
1617
/**
1718
* Skip the automatic server middleware registration. When enabled, you'll need to
@@ -63,6 +64,7 @@ export default defineNuxtModule<ModuleOptions>({
6364
clerkJSUrl: options.clerkJSUrl,
6465
clerkJSVariant: options.clerkJSVariant,
6566
clerkJSVersion: options.clerkJSVersion,
67+
isSatellite: options.isSatellite,
6668
// Backend specific variables that are safe to share.
6769
// We want them to be overridable like the other public keys (e.g NUXT_PUBLIC_CLERK_PROXY_URL)
6870
proxyUrl: options.proxyUrl,

packages/vue/src/plugin.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { inBrowser } from '@clerk/shared/browser';
22
import { deriveState } from '@clerk/shared/deriveState';
33
import { loadClerkJsScript, type LoadClerkJsScriptOptions } from '@clerk/shared/loadClerkJsScript';
4-
import type { Clerk, ClientResource, Resources } from '@clerk/types';
4+
import type { Clerk, ClientResource, MultiDomainAndOrProxy, Resources, Without } from '@clerk/types';
55
import type { Plugin } from 'vue';
66
import { computed, ref, shallowRef, triggerRef } from 'vue';
77

88
import { ClerkInjectionKey } from './keys';
99

10-
export type PluginOptions = LoadClerkJsScriptOptions;
10+
export type PluginOptions = Without<LoadClerkJsScriptOptions, 'domain' | 'proxyUrl'> & MultiDomainAndOrProxy;
1111

1212
const SDK_METADATA = {
1313
name: PACKAGE_NAME,
@@ -48,10 +48,10 @@ export const clerkPlugin: Plugin<[PluginOptions]> = {
4848
organization: undefined,
4949
});
5050

51-
const options: LoadClerkJsScriptOptions = {
51+
const options = {
5252
...pluginOptions,
5353
sdkMetadata: pluginOptions.sdkMetadata || SDK_METADATA,
54-
};
54+
} as LoadClerkJsScriptOptions;
5555

5656
// We need this check for SSR apps like Nuxt as it will try to run this code on the server
5757
// and loadClerkJsScript contains browser-specific code

0 commit comments

Comments
 (0)