@ankhorage/studio 0.10.6 → 0.10.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../../src/host/layout/templates/auth/adapter.ts"],"names":[],"mappings":"AAAA,UAAU,0BAA0B;IAClC,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC,QAAQ,GAAG,OAAO,CAAC,EAAE,CAAC;CAC3D;AAED,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,0BAA+B,UAoDxE"}
1
+ {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../../src/host/layout/templates/auth/adapter.ts"],"names":[],"mappings":"AAAA,UAAU,0BAA0B;IAClC,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC,QAAQ,GAAG,OAAO,CAAC,EAAE,CAAC;CAC3D;AAED,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,0BAA+B,UA4DxE"}
@@ -1,13 +1,22 @@
1
1
  export function getAuthAdapterTs(options = {}) {
2
- const oauthProviders = JSON.stringify(options.oauthProviders ?? []);
2
+ const oauthProviders = options.oauthProviders ?? [];
3
+ const oauthProviderDeclaration = oauthProviders.length > 0
4
+ ? `const generatedOAuthProviders = ${JSON.stringify(oauthProviders)} as const;\n\n`
5
+ : '';
6
+ const oauthProviderProperty = oauthProviders.length > 0 ? '\n oauthProviders: generatedOAuthProviders,' : '';
3
7
  return `import type { AuthAdapter, AuthResult, AuthSession, AuthUser } from '@ankhorage/contracts/auth';
4
8
  import { createSupabaseAuthAdapter } from '@ankhorage/supabase-auth';
5
9
 
6
10
  import { AUTH_SESSION_STORAGE_KEY, authSessionStorage } from './session';
7
11
 
8
- const generatedOAuthProviders = ${oauthProviders} as const;
12
+ declare const process: {
13
+ readonly env: {
14
+ readonly EXPO_PUBLIC_SUPABASE_URL?: string;
15
+ readonly EXPO_PUBLIC_SUPABASE_ANON_KEY?: string;
16
+ };
17
+ };
9
18
 
10
- const supabaseUrl = process.env.EXPO_PUBLIC_SUPABASE_URL?.trim() ?? '';
19
+ ${oauthProviderDeclaration}const supabaseUrl = process.env.EXPO_PUBLIC_SUPABASE_URL?.trim() ?? '';
11
20
  const supabaseAnonKey = process.env.EXPO_PUBLIC_SUPABASE_ANON_KEY?.trim() ?? '';
12
21
 
13
22
  export const authAdapter: AuthAdapter =
@@ -16,10 +25,7 @@ export const authAdapter: AuthAdapter =
16
25
  url: supabaseUrl,
17
26
  anonKey: supabaseAnonKey,
18
27
  storage: authSessionStorage,
19
- storageKey: AUTH_SESSION_STORAGE_KEY,
20
- ...(generatedOAuthProviders.length > 0
21
- ? { oauthProviders: generatedOAuthProviders }
22
- : {}),
28
+ storageKey: AUTH_SESSION_STORAGE_KEY,${oauthProviderProperty}
23
29
  })
24
30
  : createMissingSupabaseAuthAdapter();
25
31
 
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../../src/host/layout/templates/auth/adapter.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,gBAAgB,CAAC,UAAsC,EAAE;IACvE,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC;IAEpE,OAAO;;;;;kCAKyB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2C/C,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../../src/host/layout/templates/auth/adapter.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,gBAAgB,CAAC,UAAsC,EAAE;IACvE,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,IAAI,EAAE,CAAC;IACpD,MAAM,wBAAwB,GAC5B,cAAc,CAAC,MAAM,GAAG,CAAC;QACvB,CAAC,CAAC,mCAAmC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,gBAAgB;QACnF,CAAC,CAAC,EAAE,CAAC;IACT,MAAM,qBAAqB,GACzB,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,oDAAoD,CAAC,CAAC,CAAC,EAAE,CAAC;IAExF,OAAO;;;;;;;;;;;;EAYP,wBAAwB;;;;;;;;;+CASqB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BnE,CAAC;AACF,CAAC"}
@@ -3,7 +3,7 @@ export function getIndexRedirectRouteTsx(href) {
3
3
  return `import { Redirect } from 'expo-router';
4
4
 
5
5
  export default function IndexRoute() {
6
- return <Redirect href={'${escapeStringLiteral(href)}'} />;
6
+ return <Redirect href={'${escapeStringLiteral(href)}'} withAnchor />;
7
7
  }
8
8
  `;
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ankhorage/studio",
3
- "version": "0.10.6",
3
+ "version": "0.10.7",
4
4
  "description": "Studio authoring package for Ankhorage apps",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/ankhorage/studio#readme",