@buoy-gg/impersonate 7.0.17 → 7.0.19
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/lib/commonjs/impersonate/components/ImpersonateModal.js +2 -0
- package/lib/commonjs/impersonate/components/UserCard.js +1 -0
- package/lib/commonjs/sync/impersonateSyncAdapter.js +62 -3
- package/lib/module/impersonate/components/ImpersonateModal.js +2 -0
- package/lib/module/impersonate/components/UserCard.js +1 -0
- package/lib/module/sync/impersonateSyncAdapter.js +60 -3
- package/lib/typescript/impersonate/components/ImpersonateModal.d.ts.map +1 -1
- package/lib/typescript/impersonate/components/UserCard.d.ts.map +1 -1
- package/lib/typescript/sync/impersonateSyncAdapter.d.ts +15 -6
- package/lib/typescript/sync/impersonateSyncAdapter.d.ts.map +1 -1
- package/package.json +8 -3
|
@@ -178,6 +178,7 @@ function ImpersonateModal({
|
|
|
178
178
|
color: _sharedUi.macOSColors.text.secondary
|
|
179
179
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
180
180
|
ref: searchInputRef,
|
|
181
|
+
testID: "buoy-impersonate-search-input",
|
|
181
182
|
style: styles.headerSearchInput,
|
|
182
183
|
placeholder: "Search by email, name, or ID...",
|
|
183
184
|
placeholderTextColor: _sharedUi.macOSColors.text.muted,
|
|
@@ -213,6 +214,7 @@ function ImpersonateModal({
|
|
|
213
214
|
})
|
|
214
215
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ModalHeader.Actions, {
|
|
215
216
|
children: activeTab === "search" && !isSearchActive && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
217
|
+
testID: "buoy-impersonate-search-toggle",
|
|
216
218
|
onPress: () => setIsSearchActive(true),
|
|
217
219
|
style: styles.headerActionButton,
|
|
218
220
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Search, {
|
|
@@ -31,6 +31,7 @@ function UserCard({
|
|
|
31
31
|
const showEmail = user.email && user.displayName;
|
|
32
32
|
const role = typeof user.metadata?.role === "string" ? user.metadata.role : null;
|
|
33
33
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
34
|
+
testID: `buoy-impersonate-user-${user.id}`,
|
|
34
35
|
style: [styles.container, isActive && styles.activeContainer, variant === "compact" && styles.compactContainer],
|
|
35
36
|
onPress: onPress,
|
|
36
37
|
disabled: isActive,
|
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.SNAPSHOT_URI_INLINE_LIMIT = exports.SNAPSHOT_METADATA_INLINE_LIMIT = void 0;
|
|
6
7
|
exports.createImpersonateSyncAdapter = createImpersonateSyncAdapter;
|
|
7
8
|
exports.impersonateSyncAdapter = void 0;
|
|
8
9
|
exports.registerImpersonateSearchUsers = registerImpersonateSearchUsers;
|
|
10
|
+
exports.toWireUri = toWireUri;
|
|
11
|
+
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
12
|
var _impersonateStore = require("../impersonate/utils/impersonateStore");
|
|
10
13
|
// Registered by createImpersonateTool, so the zero-config adapter (see
|
|
11
14
|
// FloatingDevTools' auto external sync) can proxy the dashboard's user
|
|
@@ -16,9 +19,65 @@ let registeredSearchUsers = null;
|
|
|
16
19
|
function registerImpersonateSearchUsers(handler) {
|
|
17
20
|
registeredSearchUsers = handler;
|
|
18
21
|
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* `data:` avatar URLs (and any URL over this) are NOT copied onto the
|
|
25
|
+
* snapshot. UserCard renders initials, not the image, but apps still put
|
|
26
|
+
* base64 photos on `avatarUrl` / dump the API user into `metadata`. Ten
|
|
27
|
+
* history entries of those blow the 2MB emit budget and drop the panel.
|
|
28
|
+
*/
|
|
29
|
+
const SNAPSHOT_URI_INLINE_LIMIT = exports.SNAPSHOT_URI_INLINE_LIMIT = 2 * 1024;
|
|
30
|
+
const SNAPSHOT_METADATA_INLINE_LIMIT = exports.SNAPSHOT_METADATA_INLINE_LIMIT = 16 * 1024;
|
|
31
|
+
const METADATA_ON_DEVICE = Object.freeze({
|
|
32
|
+
__buoyOmitted: "user-metadata",
|
|
33
|
+
note: "User metadata stays on the device."
|
|
34
|
+
});
|
|
35
|
+
function toWireUri(uri) {
|
|
36
|
+
if (!uri) return uri;
|
|
37
|
+
if (uri.startsWith("data:")) {
|
|
38
|
+
const comma = uri.indexOf(",");
|
|
39
|
+
const header = comma >= 0 ? uri.slice(0, Math.min(comma + 1, 64)) : "data:";
|
|
40
|
+
return `${header}[${uri.length} chars]`;
|
|
41
|
+
}
|
|
42
|
+
if (uri.length <= SNAPSHOT_URI_INLINE_LIMIT) return uri;
|
|
43
|
+
return `${uri.slice(0, SNAPSHOT_URI_INLINE_LIMIT)}… [${uri.length - SNAPSHOT_URI_INLINE_LIMIT} more]`;
|
|
44
|
+
}
|
|
45
|
+
function toWireMetadata(metadata) {
|
|
46
|
+
if (!metadata) return metadata;
|
|
47
|
+
const role = typeof metadata.role === "string" ? metadata.role : undefined;
|
|
48
|
+
if (!(0, _sharedUi.isOverWireBudget)(metadata, SNAPSHOT_METADATA_INLINE_LIMIT)) return metadata;
|
|
49
|
+
// Keep `role` so UserCard still badges the impersonated user.
|
|
50
|
+
return role ? {
|
|
51
|
+
role,
|
|
52
|
+
...METADATA_ON_DEVICE
|
|
53
|
+
} : {
|
|
54
|
+
...METADATA_ON_DEVICE
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function toWireUser(user) {
|
|
58
|
+
return {
|
|
59
|
+
...user,
|
|
60
|
+
avatarUrl: toWireUri(user.avatarUrl),
|
|
61
|
+
metadata: toWireMetadata(user.metadata)
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function toWireState(state) {
|
|
65
|
+
return {
|
|
66
|
+
...state,
|
|
67
|
+
currentUser: state.currentUser ? toWireUser(state.currentUser) : null,
|
|
68
|
+
history: state.history.map(entry => ({
|
|
69
|
+
...entry,
|
|
70
|
+
user: toWireUser(entry.user)
|
|
71
|
+
}))
|
|
72
|
+
};
|
|
73
|
+
}
|
|
19
74
|
function buildActions(onSearchUsers) {
|
|
20
75
|
return {
|
|
21
|
-
searchUsers: params =>
|
|
76
|
+
searchUsers: async params => {
|
|
77
|
+
const query = String(params?.query ?? "");
|
|
78
|
+
const users = await onSearchUsers(query);
|
|
79
|
+
return Array.isArray(users) ? users.map(toWireUser) : users;
|
|
80
|
+
},
|
|
22
81
|
startImpersonation: params => _impersonateStore.impersonateStore.startImpersonation(params.user),
|
|
23
82
|
stopImpersonation: () => _impersonateStore.impersonateStore.stopImpersonation(),
|
|
24
83
|
pauseImpersonation: () => _impersonateStore.impersonateStore.pauseImpersonation(),
|
|
@@ -43,7 +102,7 @@ function createImpersonateSyncAdapter({
|
|
|
43
102
|
}) {
|
|
44
103
|
return {
|
|
45
104
|
version: 1,
|
|
46
|
-
getSnapshot: () => _impersonateStore.impersonateStore.getState(),
|
|
105
|
+
getSnapshot: () => toWireState(_impersonateStore.impersonateStore.getState()),
|
|
47
106
|
subscribe: onChange => _impersonateStore.impersonateStore.subscribe(onChange),
|
|
48
107
|
actions: buildActions(onSearchUsers)
|
|
49
108
|
};
|
|
@@ -57,7 +116,7 @@ function createImpersonateSyncAdapter({
|
|
|
57
116
|
*/
|
|
58
117
|
const impersonateSyncAdapter = exports.impersonateSyncAdapter = {
|
|
59
118
|
version: 1,
|
|
60
|
-
getSnapshot: () => _impersonateStore.impersonateStore.getState(),
|
|
119
|
+
getSnapshot: () => toWireState(_impersonateStore.impersonateStore.getState()),
|
|
61
120
|
subscribe: onChange => _impersonateStore.impersonateStore.subscribe(onChange),
|
|
62
121
|
actions: buildActions(query => {
|
|
63
122
|
if (!registeredSearchUsers) {
|
|
@@ -173,6 +173,7 @@ export function ImpersonateModal({
|
|
|
173
173
|
color: macOSColors.text.secondary
|
|
174
174
|
}), /*#__PURE__*/_jsx(TextInput, {
|
|
175
175
|
ref: searchInputRef,
|
|
176
|
+
testID: "buoy-impersonate-search-input",
|
|
176
177
|
style: styles.headerSearchInput,
|
|
177
178
|
placeholder: "Search by email, name, or ID...",
|
|
178
179
|
placeholderTextColor: macOSColors.text.muted,
|
|
@@ -208,6 +209,7 @@ export function ImpersonateModal({
|
|
|
208
209
|
})
|
|
209
210
|
}), /*#__PURE__*/_jsx(ModalHeader.Actions, {
|
|
210
211
|
children: activeTab === "search" && !isSearchActive && /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
212
|
+
testID: "buoy-impersonate-search-toggle",
|
|
211
213
|
onPress: () => setIsSearchActive(true),
|
|
212
214
|
style: styles.headerActionButton,
|
|
213
215
|
children: /*#__PURE__*/_jsx(Search, {
|
|
@@ -26,6 +26,7 @@ export function UserCard({
|
|
|
26
26
|
const showEmail = user.email && user.displayName;
|
|
27
27
|
const role = typeof user.metadata?.role === "string" ? user.metadata.role : null;
|
|
28
28
|
return /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
29
|
+
testID: `buoy-impersonate-user-${user.id}`,
|
|
29
30
|
style: [styles.container, isActive && styles.activeContainer, variant === "compact" && styles.compactContainer],
|
|
30
31
|
onPress: onPress,
|
|
31
32
|
disabled: isActive,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { isOverWireBudget } from "@buoy-gg/shared-ui";
|
|
3
4
|
import { impersonateStore } from "../impersonate/utils/impersonateStore";
|
|
4
5
|
// Registered by createImpersonateTool, so the zero-config adapter (see
|
|
5
6
|
// FloatingDevTools' auto external sync) can proxy the dashboard's user
|
|
@@ -10,9 +11,65 @@ let registeredSearchUsers = null;
|
|
|
10
11
|
export function registerImpersonateSearchUsers(handler) {
|
|
11
12
|
registeredSearchUsers = handler;
|
|
12
13
|
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* `data:` avatar URLs (and any URL over this) are NOT copied onto the
|
|
17
|
+
* snapshot. UserCard renders initials, not the image, but apps still put
|
|
18
|
+
* base64 photos on `avatarUrl` / dump the API user into `metadata`. Ten
|
|
19
|
+
* history entries of those blow the 2MB emit budget and drop the panel.
|
|
20
|
+
*/
|
|
21
|
+
export const SNAPSHOT_URI_INLINE_LIMIT = 2 * 1024;
|
|
22
|
+
export const SNAPSHOT_METADATA_INLINE_LIMIT = 16 * 1024;
|
|
23
|
+
const METADATA_ON_DEVICE = Object.freeze({
|
|
24
|
+
__buoyOmitted: "user-metadata",
|
|
25
|
+
note: "User metadata stays on the device."
|
|
26
|
+
});
|
|
27
|
+
export function toWireUri(uri) {
|
|
28
|
+
if (!uri) return uri;
|
|
29
|
+
if (uri.startsWith("data:")) {
|
|
30
|
+
const comma = uri.indexOf(",");
|
|
31
|
+
const header = comma >= 0 ? uri.slice(0, Math.min(comma + 1, 64)) : "data:";
|
|
32
|
+
return `${header}[${uri.length} chars]`;
|
|
33
|
+
}
|
|
34
|
+
if (uri.length <= SNAPSHOT_URI_INLINE_LIMIT) return uri;
|
|
35
|
+
return `${uri.slice(0, SNAPSHOT_URI_INLINE_LIMIT)}… [${uri.length - SNAPSHOT_URI_INLINE_LIMIT} more]`;
|
|
36
|
+
}
|
|
37
|
+
function toWireMetadata(metadata) {
|
|
38
|
+
if (!metadata) return metadata;
|
|
39
|
+
const role = typeof metadata.role === "string" ? metadata.role : undefined;
|
|
40
|
+
if (!isOverWireBudget(metadata, SNAPSHOT_METADATA_INLINE_LIMIT)) return metadata;
|
|
41
|
+
// Keep `role` so UserCard still badges the impersonated user.
|
|
42
|
+
return role ? {
|
|
43
|
+
role,
|
|
44
|
+
...METADATA_ON_DEVICE
|
|
45
|
+
} : {
|
|
46
|
+
...METADATA_ON_DEVICE
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function toWireUser(user) {
|
|
50
|
+
return {
|
|
51
|
+
...user,
|
|
52
|
+
avatarUrl: toWireUri(user.avatarUrl),
|
|
53
|
+
metadata: toWireMetadata(user.metadata)
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function toWireState(state) {
|
|
57
|
+
return {
|
|
58
|
+
...state,
|
|
59
|
+
currentUser: state.currentUser ? toWireUser(state.currentUser) : null,
|
|
60
|
+
history: state.history.map(entry => ({
|
|
61
|
+
...entry,
|
|
62
|
+
user: toWireUser(entry.user)
|
|
63
|
+
}))
|
|
64
|
+
};
|
|
65
|
+
}
|
|
13
66
|
function buildActions(onSearchUsers) {
|
|
14
67
|
return {
|
|
15
|
-
searchUsers: params =>
|
|
68
|
+
searchUsers: async params => {
|
|
69
|
+
const query = String(params?.query ?? "");
|
|
70
|
+
const users = await onSearchUsers(query);
|
|
71
|
+
return Array.isArray(users) ? users.map(toWireUser) : users;
|
|
72
|
+
},
|
|
16
73
|
startImpersonation: params => impersonateStore.startImpersonation(params.user),
|
|
17
74
|
stopImpersonation: () => impersonateStore.stopImpersonation(),
|
|
18
75
|
pauseImpersonation: () => impersonateStore.pauseImpersonation(),
|
|
@@ -37,7 +94,7 @@ export function createImpersonateSyncAdapter({
|
|
|
37
94
|
}) {
|
|
38
95
|
return {
|
|
39
96
|
version: 1,
|
|
40
|
-
getSnapshot: () => impersonateStore.getState(),
|
|
97
|
+
getSnapshot: () => toWireState(impersonateStore.getState()),
|
|
41
98
|
subscribe: onChange => impersonateStore.subscribe(onChange),
|
|
42
99
|
actions: buildActions(onSearchUsers)
|
|
43
100
|
};
|
|
@@ -51,7 +108,7 @@ export function createImpersonateSyncAdapter({
|
|
|
51
108
|
*/
|
|
52
109
|
export const impersonateSyncAdapter = {
|
|
53
110
|
version: 1,
|
|
54
|
-
getSnapshot: () => impersonateStore.getState(),
|
|
111
|
+
getSnapshot: () => toWireState(impersonateStore.getState()),
|
|
55
112
|
subscribe: onChange => impersonateStore.subscribe(onChange),
|
|
56
113
|
actions: buildActions(query => {
|
|
57
114
|
if (!registeredSearchUsers) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImpersonateModal.d.ts","sourceRoot":"","sources":["../../../../src/impersonate/components/ImpersonateModal.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AAiBxE,OAAO,KAAK,EAAE,qBAAqB,EAA0B,MAAM,UAAU,CAAC;AAgC9E,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,eAAsB,EACtB,MAAc,GACf,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"ImpersonateModal.d.ts","sourceRoot":"","sources":["../../../../src/impersonate/components/ImpersonateModal.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AAiBxE,OAAO,KAAK,EAAE,qBAAqB,EAA0B,MAAM,UAAU,CAAC;AAgC9E,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,eAAsB,EACtB,MAAc,GACf,EAAE,qBAAqB,4BA2PvB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,IAAI,CAAC,qBAAqB,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC,qBAGrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserCard.d.ts","sourceRoot":"","sources":["../../../../src/impersonate/components/UserCard.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAErC,MAAM,WAAW,aAAa;IAC5B,gBAAgB;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,wDAAwD;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,yBAAyB;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sBAAsB;IACtB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAED,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,QAAgB,EAChB,OAAO,EACP,MAAM,EACN,QAAQ,EACR,gBAAwB,EACxB,YAAY,EACZ,OAAmB,GACpB,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"UserCard.d.ts","sourceRoot":"","sources":["../../../../src/impersonate/components/UserCard.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAErC,MAAM,WAAW,aAAa;IAC5B,gBAAgB;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,wDAAwD;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,yBAAyB;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sBAAsB;IACtB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAED,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,QAAgB,EAChB,OAAO,EACP,MAAM,EACN,QAAQ,EACR,gBAAwB,EACxB,YAAY,EACZ,OAAmB,GACpB,EAAE,aAAa,qBA4Ff"}
|
|
@@ -2,6 +2,15 @@ import type { User, ImpersonationState } from "../impersonate/types";
|
|
|
2
2
|
type SearchUsersHandler = (query: string) => Promise<User[]>;
|
|
3
3
|
/** @internal Called by createImpersonateTool with the app's onSearchUsers. */
|
|
4
4
|
export declare function registerImpersonateSearchUsers(handler: SearchUsersHandler | null): void;
|
|
5
|
+
/**
|
|
6
|
+
* `data:` avatar URLs (and any URL over this) are NOT copied onto the
|
|
7
|
+
* snapshot. UserCard renders initials, not the image, but apps still put
|
|
8
|
+
* base64 photos on `avatarUrl` / dump the API user into `metadata`. Ten
|
|
9
|
+
* history entries of those blow the 2MB emit budget and drop the panel.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SNAPSHOT_URI_INLINE_LIMIT: number;
|
|
12
|
+
export declare const SNAPSHOT_METADATA_INLINE_LIMIT: number;
|
|
13
|
+
export declare function toWireUri(uri: string | undefined): string | undefined;
|
|
5
14
|
interface CreateImpersonateSyncAdapterOptions {
|
|
6
15
|
/**
|
|
7
16
|
* Same user-search callback you pass to the ImpersonateModal — the
|
|
@@ -25,12 +34,12 @@ export declare function createImpersonateSyncAdapter({ onSearchUsers, }: CreateI
|
|
|
25
34
|
subscribe: (onChange: () => void) => () => void;
|
|
26
35
|
actions: {
|
|
27
36
|
searchUsers: (params: unknown) => Promise<User[]>;
|
|
28
|
-
startImpersonation: (params
|
|
37
|
+
startImpersonation: (params?: unknown) => Promise<void>;
|
|
29
38
|
stopImpersonation: () => Promise<void>;
|
|
30
39
|
pauseImpersonation: () => Promise<void>;
|
|
31
40
|
resumeImpersonation: () => Promise<void>;
|
|
32
|
-
updateSettings: (params
|
|
33
|
-
removeFromHistory: (params
|
|
41
|
+
updateSettings: (params?: unknown) => Promise<void>;
|
|
42
|
+
removeFromHistory: (params?: unknown) => Promise<void>;
|
|
34
43
|
clearHistory: () => Promise<void>;
|
|
35
44
|
};
|
|
36
45
|
};
|
|
@@ -46,12 +55,12 @@ export declare const impersonateSyncAdapter: {
|
|
|
46
55
|
subscribe: (onChange: () => void) => () => void;
|
|
47
56
|
actions: {
|
|
48
57
|
searchUsers: (params: unknown) => Promise<User[]>;
|
|
49
|
-
startImpersonation: (params
|
|
58
|
+
startImpersonation: (params?: unknown) => Promise<void>;
|
|
50
59
|
stopImpersonation: () => Promise<void>;
|
|
51
60
|
pauseImpersonation: () => Promise<void>;
|
|
52
61
|
resumeImpersonation: () => Promise<void>;
|
|
53
|
-
updateSettings: (params
|
|
54
|
-
removeFromHistory: (params
|
|
62
|
+
updateSettings: (params?: unknown) => Promise<void>;
|
|
63
|
+
removeFromHistory: (params?: unknown) => Promise<void>;
|
|
55
64
|
clearHistory: () => Promise<void>;
|
|
56
65
|
};
|
|
57
66
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impersonateSyncAdapter.d.ts","sourceRoot":"","sources":["../../../src/sync/impersonateSyncAdapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"impersonateSyncAdapter.d.ts","sourceRoot":"","sources":["../../../src/sync/impersonateSyncAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAErE,KAAK,kBAAkB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;AAO7D,8EAA8E;AAC9E,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,kBAAkB,GAAG,IAAI,GACjC,IAAI,CAEN;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,QAAW,CAAC;AAClD,eAAO,MAAM,8BAA8B,QAAY,CAAC;AAQxD,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAUrE;AA2DD,UAAU,mCAAmC;IAC3C;;;OAGG;IACH,aAAa,EAAE,kBAAkB,CAAC;CACnC;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,aAAa,GACd,EAAE,mCAAmC;;uBAGjB,kBAAkB;0BACb,MAAM,IAAI;;8BAlDJ,OAAO;sCAOL,OAAO;;;;kCAKX,OAAO;qCAQJ,OAAO;;;EAiCvC;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;uBAEhB,kBAAkB;0BACb,MAAM,IAAI;;8BAhEF,OAAO;sCAOL,OAAO;;;;kCAKX,OAAO;qCAQJ,OAAO;;;CAqDvC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/impersonate",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.19",
|
|
4
4
|
"description": "Test your React Native app as any user, role, or flag combo — without logging out or rebuilding. Part of Buoy devtools.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@buoy-gg/shared-ui": "^7.0.
|
|
29
|
+
"@buoy-gg/shared-ui": "^7.0.19"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": "*",
|
|
@@ -53,7 +53,12 @@
|
|
|
53
53
|
"sourceMaps": false
|
|
54
54
|
}
|
|
55
55
|
],
|
|
56
|
-
|
|
56
|
+
[
|
|
57
|
+
"typescript",
|
|
58
|
+
{
|
|
59
|
+
"project": "tsconfig.build.json"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
57
62
|
]
|
|
58
63
|
},
|
|
59
64
|
"repository": {
|