@clerk/expo 3.0.0-snapshot.v20251217165918 → 3.0.0-snapshot.v20251218165926
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/app.plugin.js +1 -1
- package/dist/errorThrower.d.ts +1 -1
- package/dist/hooks/useSignInWithGoogle.types.d.ts +0 -1
- package/dist/hooks/useSignInWithGoogle.types.d.ts.map +1 -1
- package/dist/hooks/useSignInWithGoogle.types.js.map +1 -1
- package/{plugin/build → dist/plugin}/withClerkExpo.d.ts +1 -0
- package/dist/plugin/withClerkExpo.d.ts.map +1 -0
- package/dist/plugin/withClerkExpo.js +61 -0
- package/dist/plugin/withClerkExpo.js.map +1 -0
- package/dist/provider/ClerkProvider.js +1 -1
- package/dist/utils/errors.d.ts +1 -1
- package/package.json +9 -12
- package/plugin/build/withClerkExpo.js +0 -36
- package/plugin/src/withClerkExpo.ts +0 -45
- package/plugin/tsconfig.json +0 -15
package/app.plugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require('./plugin/
|
|
1
|
+
module.exports = require('./dist/plugin/withClerkExpo');
|
package/dist/errorThrower.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignInWithGoogle.types.d.ts","sourceRoot":"","sources":["../../src/hooks/useSignInWithGoogle.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErF,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"useSignInWithGoogle.types.d.ts","sourceRoot":"","sources":["../../src/hooks/useSignInWithGoogle.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErF,MAAM,MAAM,mCAAmC,GAAG;IAChD,cAAc,CAAC,EAAE,oBAAoB,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,uCAAuC,GAAG;IACpD,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useSignInWithGoogle.types.ts"],"sourcesContent":["import type { SetActive, SignInResource, SignUpResource } from '@clerk/shared/types';\n\nexport type
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useSignInWithGoogle.types.ts"],"sourcesContent":["import type { SetActive, SignInResource, SignUpResource } from '@clerk/shared/types';\n\nexport type StartGoogleAuthenticationFlowParams = {\n unsafeMetadata?: SignUpUnsafeMetadata;\n};\n\nexport type StartGoogleAuthenticationFlowReturnType = {\n createdSessionId: string | null;\n setActive?: SetActive;\n signIn?: SignInResource;\n signUp?: SignUpResource;\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withClerkExpo.d.ts","sourceRoot":"","sources":["../../src/plugin/withClerkExpo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAsC,MAAM,sBAAsB,CAAC;;AA4C7F,wBAAiF"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var withClerkExpo_exports = {};
|
|
30
|
+
__export(withClerkExpo_exports, {
|
|
31
|
+
default: () => withClerkExpo_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(withClerkExpo_exports);
|
|
34
|
+
var import_config_plugins = require("@expo/config-plugins");
|
|
35
|
+
var import_package = __toESM(require("../../package.json"));
|
|
36
|
+
const withClerkGoogleSignIn = (config) => {
|
|
37
|
+
var _a;
|
|
38
|
+
const iosUrlScheme = process.env.EXPO_PUBLIC_CLERK_GOOGLE_IOS_URL_SCHEME || ((_a = config.extra) == null ? void 0 : _a.EXPO_PUBLIC_CLERK_GOOGLE_IOS_URL_SCHEME);
|
|
39
|
+
if (!iosUrlScheme) {
|
|
40
|
+
return config;
|
|
41
|
+
}
|
|
42
|
+
return (0, import_config_plugins.withInfoPlist)(config, (modConfig) => {
|
|
43
|
+
if (!Array.isArray(modConfig.modResults.CFBundleURLTypes)) {
|
|
44
|
+
modConfig.modResults.CFBundleURLTypes = [];
|
|
45
|
+
}
|
|
46
|
+
const schemeExists = modConfig.modResults.CFBundleURLTypes.some(
|
|
47
|
+
(urlType) => {
|
|
48
|
+
var _a2;
|
|
49
|
+
return (_a2 = urlType.CFBundleURLSchemes) == null ? void 0 : _a2.includes(iosUrlScheme);
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
if (!schemeExists) {
|
|
53
|
+
modConfig.modResults.CFBundleURLTypes.push({
|
|
54
|
+
CFBundleURLSchemes: [iosUrlScheme]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
return modConfig;
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
var withClerkExpo_default = (0, import_config_plugins.createRunOncePlugin)(withClerkGoogleSignIn, import_package.default.name, import_package.default.version);
|
|
61
|
+
//# sourceMappingURL=withClerkExpo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/plugin/withClerkExpo.ts"],"sourcesContent":["import { type ConfigPlugin, createRunOncePlugin, withInfoPlist } from '@expo/config-plugins';\n\nimport pkg from '../../package.json';\n\n/**\n * Expo config plugin for @clerk/expo.\n *\n * This plugin configures the iOS URL scheme required for Google Sign-In.\n * The native Android module is automatically linked via expo-module.config.json.\n */\nconst withClerkGoogleSignIn: ConfigPlugin = config => {\n // Get the iOS URL scheme from environment or config.extra\n // We capture it here before entering the mod callback\n const iosUrlScheme =\n process.env.EXPO_PUBLIC_CLERK_GOOGLE_IOS_URL_SCHEME ||\n (config as { extra?: Record<string, string> }).extra?.EXPO_PUBLIC_CLERK_GOOGLE_IOS_URL_SCHEME;\n\n if (!iosUrlScheme) {\n // No URL scheme configured, skip iOS configuration\n return config;\n }\n\n // Add iOS URL scheme for Google Sign-In\n return withInfoPlist(config, modConfig => {\n if (!Array.isArray(modConfig.modResults.CFBundleURLTypes)) {\n modConfig.modResults.CFBundleURLTypes = [];\n }\n\n // Check if the scheme is already added to avoid duplicates\n const schemeExists = modConfig.modResults.CFBundleURLTypes.some(urlType =>\n urlType.CFBundleURLSchemes?.includes(iosUrlScheme),\n );\n\n if (!schemeExists) {\n // Add Google Sign-In URL scheme\n modConfig.modResults.CFBundleURLTypes.push({\n CFBundleURLSchemes: [iosUrlScheme],\n });\n }\n\n return modConfig;\n });\n};\n\nexport default createRunOncePlugin(withClerkGoogleSignIn, pkg.name, pkg.version);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAAsE;AAEtE,qBAAgB;AAQhB,MAAM,wBAAsC,YAAU;AAVtD;AAaE,QAAM,eACJ,QAAQ,IAAI,6CACX,YAA8C,UAA9C,mBAAqD;AAExD,MAAI,CAAC,cAAc;AAEjB,WAAO;AAAA,EACT;AAGA,aAAO,qCAAc,QAAQ,eAAa;AACxC,QAAI,CAAC,MAAM,QAAQ,UAAU,WAAW,gBAAgB,GAAG;AACzD,gBAAU,WAAW,mBAAmB,CAAC;AAAA,IAC3C;AAGA,UAAM,eAAe,UAAU,WAAW,iBAAiB;AAAA,MAAK,aAAQ;AA7B5E,YAAAA;AA8BM,gBAAAA,MAAA,QAAQ,uBAAR,gBAAAA,IAA4B,SAAS;AAAA;AAAA,IACvC;AAEA,QAAI,CAAC,cAAc;AAEjB,gBAAU,WAAW,iBAAiB,KAAK;AAAA,QACzC,oBAAoB,CAAC,YAAY;AAAA,MACnC,CAAC;AAAA,IACH;AAEA,WAAO;AAAA,EACT,CAAC;AACH;AAEA,IAAO,4BAAQ,2CAAoB,uBAAuB,eAAAC,QAAI,MAAM,eAAAA,QAAI,OAAO;","names":["_a","pkg"]}
|
|
@@ -39,7 +39,7 @@ var import_runtime = require("../utils/runtime");
|
|
|
39
39
|
var import_singleton = require("./singleton");
|
|
40
40
|
const SDK_METADATA = {
|
|
41
41
|
name: "@clerk/expo",
|
|
42
|
-
version: "3.0.0-snapshot.
|
|
42
|
+
version: "3.0.0-snapshot.v20251218165926"
|
|
43
43
|
};
|
|
44
44
|
function ClerkProvider(props) {
|
|
45
45
|
const {
|
package/dist/utils/errors.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const errorThrower: import("@clerk/shared/error-
|
|
1
|
+
export declare const errorThrower: import("@clerk/shared/error-o9rMDFII").y;
|
|
2
2
|
//# sourceMappingURL=errors.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clerk/expo",
|
|
3
|
-
"version": "3.0.0-snapshot.
|
|
3
|
+
"version": "3.0.0-snapshot.v20251218165926",
|
|
4
4
|
"description": "Clerk React Native/Expo library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -59,8 +59,7 @@
|
|
|
59
59
|
"./legacy": {
|
|
60
60
|
"types": "./dist/legacy.d.ts",
|
|
61
61
|
"default": "./dist/legacy.js"
|
|
62
|
-
}
|
|
63
|
-
"./app.plugin.js": "./app.plugin.js"
|
|
62
|
+
}
|
|
64
63
|
},
|
|
65
64
|
"main": "./dist/index.js",
|
|
66
65
|
"source": "./src/index.ts",
|
|
@@ -70,16 +69,15 @@
|
|
|
70
69
|
"android",
|
|
71
70
|
"ios",
|
|
72
71
|
"expo-module.config.json",
|
|
73
|
-
"app.plugin.js"
|
|
74
|
-
"plugin"
|
|
72
|
+
"app.plugin.js"
|
|
75
73
|
],
|
|
76
74
|
"dependencies": {
|
|
77
75
|
"base-64": "^1.0.0",
|
|
78
76
|
"react-native-url-polyfill": "2.0.0",
|
|
79
77
|
"tslib": "2.8.1",
|
|
80
|
-
"@clerk/clerk-js": "6.0.0-snapshot.
|
|
81
|
-
"@clerk/react": "6.0.0-snapshot.
|
|
82
|
-
"@clerk/shared": "4.0.0-snapshot.
|
|
78
|
+
"@clerk/clerk-js": "6.0.0-snapshot.v20251218165926",
|
|
79
|
+
"@clerk/react": "6.0.0-snapshot.v20251218165926",
|
|
80
|
+
"@clerk/shared": "4.0.0-snapshot.v20251218165926"
|
|
83
81
|
},
|
|
84
82
|
"devDependencies": {
|
|
85
83
|
"@expo/config-plugins": "^54.0.4",
|
|
@@ -93,10 +91,10 @@
|
|
|
93
91
|
"expo-secure-store": "^12.8.1",
|
|
94
92
|
"expo-web-browser": "^12.8.2",
|
|
95
93
|
"react-native": "^0.81.4",
|
|
96
|
-
"@clerk/expo-passkeys": "1.0.0-snapshot.
|
|
94
|
+
"@clerk/expo-passkeys": "1.0.0-snapshot.v20251218165926"
|
|
97
95
|
},
|
|
98
96
|
"peerDependencies": {
|
|
99
|
-
"@clerk/expo-passkeys": "1.0.0-snapshot.
|
|
97
|
+
"@clerk/expo-passkeys": "1.0.0-snapshot.v20251218165926",
|
|
100
98
|
"expo": ">=53 <55",
|
|
101
99
|
"expo-apple-authentication": ">=7.0.0",
|
|
102
100
|
"expo-auth-session": ">=5",
|
|
@@ -137,9 +135,8 @@
|
|
|
137
135
|
"access": "public"
|
|
138
136
|
},
|
|
139
137
|
"scripts": {
|
|
140
|
-
"build": "tsup
|
|
138
|
+
"build": "tsup",
|
|
141
139
|
"build:declarations": "tsc -p tsconfig.declarations.json",
|
|
142
|
-
"build:plugin": "tsc -p plugin/tsconfig.json",
|
|
143
140
|
"clean": "rimraf ./dist",
|
|
144
141
|
"dev": "tsup --watch",
|
|
145
142
|
"dev:publish": "pnpm dev -- --env.publish",
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const config_plugins_1 = require("@expo/config-plugins");
|
|
4
|
-
const pkg = require('../../package.json');
|
|
5
|
-
/**
|
|
6
|
-
* Expo config plugin for @clerk/expo.
|
|
7
|
-
*
|
|
8
|
-
* This plugin configures the iOS URL scheme required for Google Sign-In.
|
|
9
|
-
* The native Android module is automatically linked via expo-module.config.json.
|
|
10
|
-
*/
|
|
11
|
-
const withClerkGoogleSignIn = config => {
|
|
12
|
-
// Get the iOS URL scheme from environment or config.extra
|
|
13
|
-
// We capture it here before entering the mod callback
|
|
14
|
-
const iosUrlScheme = process.env.EXPO_PUBLIC_CLERK_GOOGLE_IOS_URL_SCHEME ||
|
|
15
|
-
config.extra?.EXPO_PUBLIC_CLERK_GOOGLE_IOS_URL_SCHEME;
|
|
16
|
-
if (!iosUrlScheme) {
|
|
17
|
-
// No URL scheme configured, skip iOS configuration
|
|
18
|
-
return config;
|
|
19
|
-
}
|
|
20
|
-
// Add iOS URL scheme for Google Sign-In
|
|
21
|
-
return (0, config_plugins_1.withInfoPlist)(config, modConfig => {
|
|
22
|
-
if (!Array.isArray(modConfig.modResults.CFBundleURLTypes)) {
|
|
23
|
-
modConfig.modResults.CFBundleURLTypes = [];
|
|
24
|
-
}
|
|
25
|
-
// Check if the scheme is already added to avoid duplicates
|
|
26
|
-
const schemeExists = modConfig.modResults.CFBundleURLTypes.some(urlType => urlType.CFBundleURLSchemes?.includes(iosUrlScheme));
|
|
27
|
-
if (!schemeExists) {
|
|
28
|
-
// Add Google Sign-In URL scheme
|
|
29
|
-
modConfig.modResults.CFBundleURLTypes.push({
|
|
30
|
-
CFBundleURLSchemes: [iosUrlScheme],
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
return modConfig;
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
exports.default = (0, config_plugins_1.createRunOncePlugin)(withClerkGoogleSignIn, pkg.name, pkg.version);
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { createRunOncePlugin, withInfoPlist, type ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
-
|
|
3
|
-
const pkg = require('../../package.json');
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Expo config plugin for @clerk/expo.
|
|
7
|
-
*
|
|
8
|
-
* This plugin configures the iOS URL scheme required for Google Sign-In.
|
|
9
|
-
* The native Android module is automatically linked via expo-module.config.json.
|
|
10
|
-
*/
|
|
11
|
-
const withClerkGoogleSignIn: ConfigPlugin = config => {
|
|
12
|
-
// Get the iOS URL scheme from environment or config.extra
|
|
13
|
-
// We capture it here before entering the mod callback
|
|
14
|
-
const iosUrlScheme =
|
|
15
|
-
process.env.EXPO_PUBLIC_CLERK_GOOGLE_IOS_URL_SCHEME ||
|
|
16
|
-
(config as { extra?: Record<string, string> }).extra?.EXPO_PUBLIC_CLERK_GOOGLE_IOS_URL_SCHEME;
|
|
17
|
-
|
|
18
|
-
if (!iosUrlScheme) {
|
|
19
|
-
// No URL scheme configured, skip iOS configuration
|
|
20
|
-
return config;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// Add iOS URL scheme for Google Sign-In
|
|
24
|
-
return withInfoPlist(config, modConfig => {
|
|
25
|
-
if (!Array.isArray(modConfig.modResults.CFBundleURLTypes)) {
|
|
26
|
-
modConfig.modResults.CFBundleURLTypes = [];
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// Check if the scheme is already added to avoid duplicates
|
|
30
|
-
const schemeExists = modConfig.modResults.CFBundleURLTypes.some(urlType =>
|
|
31
|
-
urlType.CFBundleURLSchemes?.includes(iosUrlScheme),
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
if (!schemeExists) {
|
|
35
|
-
// Add Google Sign-In URL scheme
|
|
36
|
-
modConfig.modResults.CFBundleURLTypes.push({
|
|
37
|
-
CFBundleURLSchemes: [iosUrlScheme],
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return modConfig;
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export default createRunOncePlugin(withClerkGoogleSignIn, pkg.name, pkg.version);
|
package/plugin/tsconfig.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"module": "CommonJS",
|
|
5
|
-
"moduleResolution": "node",
|
|
6
|
-
"outDir": "build",
|
|
7
|
-
"rootDir": "src",
|
|
8
|
-
"declaration": true,
|
|
9
|
-
"strict": true,
|
|
10
|
-
"esModuleInterop": true,
|
|
11
|
-
"skipLibCheck": true
|
|
12
|
-
},
|
|
13
|
-
"include": ["./src"],
|
|
14
|
-
"exclude": ["**/__tests__/*"]
|
|
15
|
-
}
|