@posthog/browser 0.4.2 → 0.6.0
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/ARCHITECTURE.md +36 -48
- package/README.md +97 -69
- package/dist/composition/npm/core.d.ts +3 -4
- package/dist/composition/npm/core.js +2 -1
- package/dist/composition/npm/core.mjs +2 -1
- package/dist/composition/npm/index.d.ts +4 -5
- package/dist/composition/npm/index.js +2 -1
- package/dist/composition/npm/index.mjs +2 -1
- package/dist/composition/npm/root-composition.d.ts +4 -4
- package/dist/composition/npm/root-composition.js +0 -16
- package/dist/composition/npm/root-composition.mjs +0 -16
- package/dist/core/context/browser-client.d.ts +4 -35
- package/dist/core/extensions/registry.d.ts +15 -36
- package/dist/core/extensions/registry.js +67 -198
- package/dist/core/extensions/registry.mjs +67 -198
- package/dist/core/posthog.d.ts +3 -2
- package/dist/core/posthog.js +190 -173
- package/dist/core/posthog.mjs +191 -174
- package/dist/core/state/state.d.ts +33 -3
- package/dist/core/state/state.js +122 -27
- package/dist/core/state/state.mjs +107 -27
- package/dist/core/types.d.ts +134 -14
- package/dist/persistence/cookie.d.ts +19 -0
- package/dist/persistence/cookie.js +273 -0
- package/dist/persistence/cookie.mjs +235 -0
- package/dist/platform/logger.d.ts +5 -1
- package/dist/platform/logger.js +3 -3
- package/dist/platform/logger.mjs +3 -3
- package/dist/primitives/id.d.ts +5 -0
- package/dist/primitives/id.js +10 -2
- package/dist/primitives/id.mjs +6 -1
- package/dist/primitives/version.js +1 -1
- package/dist/primitives/version.mjs +1 -1
- package/dist/products/analytics/analytics-core.d.ts +89 -0
- package/dist/products/analytics/analytics-core.js +563 -0
- package/dist/products/analytics/analytics-core.mjs +516 -0
- package/dist/products/analytics/analytics-internal.d.ts +16 -37
- package/dist/products/analytics/analytics-internal.js +2 -10
- package/dist/products/analytics/analytics-internal.mjs +1 -3
- package/dist/products/analytics/analytics-options.d.ts +0 -9
- package/dist/products/analytics/analytics-options.js +1 -38
- package/dist/products/analytics/analytics-options.mjs +1 -17
- package/dist/products/analytics/delivery/analytics-delivery.js +1 -1
- package/dist/products/analytics/delivery/analytics-delivery.mjs +1 -1
- package/dist/products/analytics/delivery/lane.d.ts +8 -1
- package/dist/products/analytics/delivery/lane.js +16 -4
- package/dist/products/analytics/delivery/lane.mjs +16 -4
- package/dist/products/analytics/groups.d.ts +8 -0
- package/dist/products/analytics/groups.js +84 -0
- package/dist/products/analytics/groups.mjs +40 -0
- package/dist/products/analytics/person.d.ts +11 -0
- package/dist/products/analytics/person.js +91 -0
- package/dist/products/analytics/person.mjs +41 -0
- package/dist/products/analytics/properties/analytics-properties.d.ts +1 -0
- package/dist/products/analytics/properties/analytics-properties.js +3 -0
- package/dist/products/analytics/properties/analytics-properties.mjs +1 -1
- package/dist/products/autocapture/autocapture.js +2 -6
- package/dist/products/autocapture/autocapture.mjs +2 -6
- package/dist/products/flags/flags-internal.d.ts +4 -2
- package/dist/products/flags/flags-options.d.ts +16 -2
- package/dist/products/flags/flags-token.d.ts +31 -4
- package/dist/products/flags/flags.d.ts +1 -1
- package/dist/products/flags/flags.js +112 -11
- package/dist/products/flags/flags.mjs +112 -11
- package/dist/products/logs/logs.js +2 -5
- package/dist/products/logs/logs.mjs +2 -5
- package/dist/products/surveys/surveys-extension.js +78 -46
- package/dist/products/surveys/surveys-extension.mjs +80 -48
- package/dist/products/surveys/surveys-internal.d.ts +6 -0
- package/package.json +7 -7
- package/dist/products/analytics/analytics-api.d.ts +0 -32
- package/dist/products/analytics/analytics-api.js +0 -18
- package/dist/products/analytics/analytics-api.mjs +0 -1
- package/dist/products/analytics/analytics-buffer.d.ts +0 -4
- package/dist/products/analytics/analytics-buffer.js +0 -41
- package/dist/products/analytics/analytics-buffer.mjs +0 -3
- package/dist/products/analytics/analytics-extension.d.ts +0 -87
- package/dist/products/analytics/analytics-extension.js +0 -649
- package/dist/products/analytics/analytics-extension.mjs +0 -611
- package/dist/products/analytics/analytics.d.ts +0 -6
- package/dist/products/analytics/analytics.js +0 -42
- package/dist/products/analytics/analytics.mjs +0 -4
- package/dist/products/analytics/automatic-analytics.d.ts +0 -3
- package/dist/products/analytics/automatic-analytics.js +0 -44
- package/dist/products/analytics/automatic-analytics.mjs +0 -6
|
@@ -1,51 +1,30 @@
|
|
|
1
1
|
import type { Client, Extension } from '@posthog/browser-common';
|
|
2
|
-
export type ExtensionLoader<Host
|
|
3
|
-
|
|
4
|
-
export interface AutomaticExtension<Host = Client> {
|
|
2
|
+
export type ExtensionLoader<Host> = () => Extension<Host> | Promise<Extension<Host>>;
|
|
3
|
+
export interface AutomaticExtension<Host> {
|
|
5
4
|
name: string;
|
|
6
5
|
activate(host: Host, acquire: () => Promise<Extension<Host> | undefined>): void | Promise<unknown>;
|
|
7
6
|
}
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Installs extensions on the one client, publishes each as a client property, and owns their lifecycle.
|
|
9
|
+
* Extension names and their bindings share one lookup namespace.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ExtensionRegistry<Host extends object> {
|
|
12
|
+
private readonly _host;
|
|
11
13
|
private readonly _logger;
|
|
12
14
|
private readonly _loaders;
|
|
13
|
-
private readonly _setup;
|
|
14
15
|
private readonly _canInstall;
|
|
15
|
-
private readonly
|
|
16
|
-
private readonly
|
|
17
|
-
private readonly
|
|
18
|
-
private readonly
|
|
19
|
-
private readonly _sharedReservations;
|
|
16
|
+
private readonly _installed;
|
|
17
|
+
private readonly _settingUp;
|
|
18
|
+
private readonly _lookup;
|
|
19
|
+
private readonly _reserved;
|
|
20
20
|
private readonly _pending;
|
|
21
|
-
private readonly
|
|
22
|
-
private readonly _views;
|
|
23
|
-
private readonly _clients;
|
|
24
|
-
private readonly _publications;
|
|
21
|
+
private readonly _retired;
|
|
25
22
|
private _disposed;
|
|
26
|
-
constructor(
|
|
27
|
-
|
|
28
|
-
get<T extends Extension<Host> = Extension<Host>>(name: string): T | undefined;
|
|
29
|
-
getShared<T extends Extension = Extension>(name: string): T | undefined;
|
|
23
|
+
constructor(_host: Host, _logger: Client['logger'], _loaders?: Readonly<Record<string, ExtensionLoader<Host>>>, _canInstall?: () => boolean);
|
|
24
|
+
get<T extends Extension = Extension>(name: string): T | undefined;
|
|
30
25
|
resolve(name: string): Promise<Extension<Host> | undefined>;
|
|
31
26
|
activate({ name, activate }: AutomaticExtension<Host>): Promise<void>;
|
|
32
27
|
install(extension: Extension<Host>): Promise<void>;
|
|
33
|
-
private _existingResolution;
|
|
34
|
-
private _reserveInstallation;
|
|
35
|
-
private _bindingEntries;
|
|
36
|
-
private _publishInstallation;
|
|
37
|
-
rollback(extension: Extension<Host>): Promise<void>;
|
|
38
28
|
flush(reason?: 'flush' | 'shutdown'): Promise<void>;
|
|
39
29
|
dispose(): Promise<void>;
|
|
40
|
-
private _client;
|
|
41
|
-
private _load;
|
|
42
|
-
private _resolveDependency;
|
|
43
|
-
private _reaches;
|
|
44
|
-
private _removeRecord;
|
|
45
|
-
private _assertNameAvailable;
|
|
46
|
-
private _publish;
|
|
47
|
-
private _removePublication;
|
|
48
|
-
private _unpublish;
|
|
49
|
-
private _disposeRecord;
|
|
50
30
|
}
|
|
51
|
-
export {};
|
|
@@ -28,139 +28,91 @@ var __webpack_require__ = {};
|
|
|
28
28
|
var __webpack_exports__ = {};
|
|
29
29
|
__webpack_require__.r(__webpack_exports__);
|
|
30
30
|
class ExtensionRegistry {
|
|
31
|
-
constructor(
|
|
32
|
-
this.
|
|
31
|
+
constructor(_host, _logger, _loaders = {}, _canInstall = ()=>true){
|
|
32
|
+
this._host = _host;
|
|
33
33
|
this._logger = _logger;
|
|
34
34
|
this._loaders = _loaders;
|
|
35
|
-
this._setup = _setup;
|
|
36
35
|
this._canInstall = _canInstall;
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
41
|
-
this._sharedReservations = new Set();
|
|
36
|
+
this._installed = new Map();
|
|
37
|
+
this._settingUp = new Set();
|
|
38
|
+
this._lookup = new Map();
|
|
39
|
+
this._reserved = new Set();
|
|
42
40
|
this._pending = new Map();
|
|
43
|
-
this.
|
|
44
|
-
this._views = new Set();
|
|
45
|
-
this._clients = new Map();
|
|
46
|
-
this._publications = new WeakMap();
|
|
41
|
+
this._retired = new WeakSet();
|
|
47
42
|
this._disposed = false;
|
|
48
43
|
}
|
|
49
|
-
expose(target) {
|
|
50
|
-
if (this._disposed || this._views.has(target)) return;
|
|
51
|
-
const publications = new Map();
|
|
52
|
-
this._publications.set(target, publications);
|
|
53
|
-
try {
|
|
54
|
-
for (const extension of this._extensions.values())this._publish(target, extension.name);
|
|
55
|
-
} catch (error) {
|
|
56
|
-
for (const name of publications.keys())this._removePublication(target, name);
|
|
57
|
-
this._publications.delete(target);
|
|
58
|
-
throw error;
|
|
59
|
-
}
|
|
60
|
-
this._views.add(target);
|
|
61
|
-
}
|
|
62
44
|
get(name) {
|
|
63
|
-
return this.
|
|
64
|
-
}
|
|
65
|
-
getShared(name) {
|
|
66
|
-
return this._shared.get(name);
|
|
45
|
+
return this._lookup.get(name);
|
|
67
46
|
}
|
|
68
47
|
resolve(name) {
|
|
69
48
|
if (this._disposed || !this._canInstall()) return Promise.resolve(void 0);
|
|
70
|
-
const
|
|
71
|
-
if (
|
|
49
|
+
const installed = this._installed.get(name);
|
|
50
|
+
if (installed) return Promise.resolve(installed);
|
|
51
|
+
const pending = this._pending.get(name);
|
|
52
|
+
if (pending) return pending;
|
|
72
53
|
const load = Object.hasOwn(this._loaders, name) ? this._loaders[name] : void 0;
|
|
73
54
|
if (!load) return Promise.resolve(void 0);
|
|
74
|
-
const loading = Promise.resolve().then(
|
|
55
|
+
const loading = Promise.resolve().then(load).then(async (extension)=>{
|
|
56
|
+
if (this._disposed || !this._canInstall()) return void await extension.dispose?.();
|
|
57
|
+
if (extension.name !== name) {
|
|
58
|
+
await extension.dispose?.();
|
|
59
|
+
throw new Error(`Loader for "${name}" returned extension "${extension.name}"`);
|
|
60
|
+
}
|
|
61
|
+
await this.install(extension);
|
|
62
|
+
return this._installed.get(name);
|
|
63
|
+
}).catch((error)=>{
|
|
64
|
+
this._logger.error(`Extension "${name}" loading failed`, error);
|
|
65
|
+
}).finally(()=>this._pending.delete(name));
|
|
75
66
|
this._pending.set(name, loading);
|
|
76
|
-
loading.then(()=>{
|
|
77
|
-
if (this._pending.get(name) === loading) this._pending.delete(name);
|
|
78
|
-
});
|
|
79
67
|
return loading;
|
|
80
68
|
}
|
|
81
69
|
async activate({ name, activate }) {
|
|
82
|
-
if (this._disposed || !this._canInstall() || this.
|
|
70
|
+
if (this._disposed || !this._canInstall() || this._installed.has(name)) return;
|
|
83
71
|
try {
|
|
84
|
-
|
|
85
|
-
this._assertNameAvailable(name);
|
|
86
|
-
await activate(host, ()=>this.resolve(name));
|
|
72
|
+
await activate(this._host, ()=>this.resolve(name));
|
|
87
73
|
} catch (error) {
|
|
88
74
|
this._logger.error(`Extension "${name}" activation failed`, error);
|
|
89
75
|
}
|
|
90
76
|
}
|
|
91
77
|
async install(extension) {
|
|
92
|
-
|
|
93
|
-
|
|
78
|
+
if (this._disposed) throw new Error('The extension registry is disposed');
|
|
79
|
+
if (this._retired.has(extension)) throw new Error('The extension instance has already been disposed');
|
|
80
|
+
const names = [
|
|
81
|
+
extension.name,
|
|
82
|
+
...Object.keys(extension.bindings ?? {})
|
|
83
|
+
];
|
|
84
|
+
for (const key of names)if (!key || this._lookup.has(key) || this._reserved.has(key) || key in this._host) throw new Error(`Extension name "${key}" is invalid or already in use`);
|
|
85
|
+
for (const key of names)this._reserved.add(key);
|
|
86
|
+
this._settingUp.add(extension);
|
|
94
87
|
try {
|
|
95
|
-
|
|
96
|
-
this.
|
|
97
|
-
await this._setup(extension, host);
|
|
98
|
-
this._publishInstallation(installation);
|
|
88
|
+
await extension.setup(this._host);
|
|
89
|
+
if (this._disposed || !this._canInstall()) throw new Error('Extension installation stopped during setup');
|
|
99
90
|
} catch (error) {
|
|
100
|
-
this.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
91
|
+
if (!this._retired.has(extension)) {
|
|
92
|
+
this._retired.add(extension);
|
|
93
|
+
try {
|
|
94
|
+
await extension.dispose?.();
|
|
95
|
+
} catch (disposeError) {
|
|
96
|
+
this._logger.error('Extension cleanup failed after setup failed', disposeError);
|
|
97
|
+
}
|
|
106
98
|
}
|
|
107
99
|
throw error;
|
|
108
100
|
} finally{
|
|
109
|
-
this.
|
|
101
|
+
this._settingUp.delete(extension);
|
|
102
|
+
for (const key of names)this._reserved.delete(key);
|
|
110
103
|
}
|
|
111
|
-
}
|
|
112
|
-
_existingResolution(name) {
|
|
113
|
-
const installed = this.get(name);
|
|
114
|
-
if (installed) return Promise.resolve(installed);
|
|
115
|
-
return this._pending.get(name) ?? this._records.get(name)?.ready;
|
|
116
|
-
}
|
|
117
|
-
_reserveInstallation(extension) {
|
|
118
|
-
if (this._disposed) throw new Error('The extension registry is disposed');
|
|
119
|
-
if (this._retired.has(extension)) throw new Error('The extension instance has already been disposed');
|
|
120
104
|
const { name } = extension;
|
|
121
|
-
|
|
122
|
-
this.
|
|
123
|
-
const bindings
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
ready: new Promise((resolve)=>{
|
|
130
|
-
finish = resolve;
|
|
131
|
-
}),
|
|
132
|
-
finish: (value)=>finish(value)
|
|
133
|
-
};
|
|
134
|
-
this._records.set(name, record);
|
|
135
|
-
for (const [key] of bindings)this._sharedReservations.add(key);
|
|
136
|
-
return {
|
|
137
|
-
name,
|
|
138
|
-
bindings,
|
|
139
|
-
record
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
_bindingEntries(extension) {
|
|
143
|
-
const bindings = Object.entries(extension.bindings ?? {});
|
|
144
|
-
for (const [key] of bindings)if (!key || this._sharedReservations.has(key)) throw new Error(`A shared extension named "${key}" is already installed or the name is invalid`);
|
|
145
|
-
return bindings;
|
|
146
|
-
}
|
|
147
|
-
_publishInstallation({ name, bindings, record }) {
|
|
148
|
-
if (this._disposed || record.disposed || !this._canInstall()) throw new Error('Extension installation stopped during setup');
|
|
149
|
-
this._extensions.set(name, record.extension);
|
|
150
|
-
for (const view of this._views)this._publish(view, name);
|
|
151
|
-
for (const [key, target] of bindings)this._shared.set(key, target);
|
|
152
|
-
record.finish(record.extension);
|
|
153
|
-
}
|
|
154
|
-
async rollback(extension) {
|
|
155
|
-
const record = this._records.get(extension.name);
|
|
156
|
-
if (record?.extension === extension) {
|
|
157
|
-
this._removeRecord(record);
|
|
158
|
-
record.finish(void 0);
|
|
159
|
-
await this._disposeRecord(record);
|
|
160
|
-
}
|
|
105
|
+
this._installed.set(name, extension);
|
|
106
|
+
this._lookup.set(name, extension);
|
|
107
|
+
for (const [key, target] of Object.entries(extension.bindings ?? {}))this._lookup.set(key, target);
|
|
108
|
+
Object.defineProperty(this._host, name, {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
configurable: true,
|
|
111
|
+
get: ()=>this._installed.get(name)
|
|
112
|
+
});
|
|
161
113
|
}
|
|
162
114
|
async flush(reason = 'flush') {
|
|
163
|
-
await Promise.all(Array.from(this.
|
|
115
|
+
await Promise.all(Array.from(this._installed.values()).map(async (extension)=>{
|
|
164
116
|
try {
|
|
165
117
|
await extension.flush?.(reason);
|
|
166
118
|
} catch (error) {
|
|
@@ -171,107 +123,24 @@ class ExtensionRegistry {
|
|
|
171
123
|
async dispose() {
|
|
172
124
|
if (this._disposed) return;
|
|
173
125
|
this._disposed = true;
|
|
174
|
-
const
|
|
175
|
-
this.
|
|
176
|
-
|
|
177
|
-
this.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
126
|
+
const installed = Array.from(this._installed.values()).reverse();
|
|
127
|
+
for (const { name } of installed)Reflect.deleteProperty(this._host, name);
|
|
128
|
+
this._installed.clear();
|
|
129
|
+
this._lookup.clear();
|
|
130
|
+
const extensions = [
|
|
131
|
+
...installed,
|
|
132
|
+
...this._settingUp
|
|
133
|
+
];
|
|
134
|
+
await Promise.all(extensions.map(async (extension)=>{
|
|
135
|
+
if (this._retired.has(extension)) return;
|
|
136
|
+
this._retired.add(extension);
|
|
185
137
|
try {
|
|
186
|
-
await
|
|
138
|
+
await extension.dispose?.();
|
|
187
139
|
} catch (error) {
|
|
188
|
-
this._logger.error(`Extension "${
|
|
140
|
+
this._logger.error(`Extension "${extension.name}" cleanup failed`, error);
|
|
189
141
|
}
|
|
190
142
|
}));
|
|
191
143
|
}
|
|
192
|
-
_client(name) {
|
|
193
|
-
const existing = this._clients.get(name);
|
|
194
|
-
if (void 0 !== existing) return existing;
|
|
195
|
-
const host = this._createClient(name, (target)=>this._resolveDependency(name, target));
|
|
196
|
-
if (!this._disposed) this._clients.set(name, host);
|
|
197
|
-
return host;
|
|
198
|
-
}
|
|
199
|
-
async _load(name, load) {
|
|
200
|
-
try {
|
|
201
|
-
const host = this._client(name);
|
|
202
|
-
this._assertNameAvailable(name);
|
|
203
|
-
const extension = await load(host);
|
|
204
|
-
if (this._disposed || extension.name !== name) {
|
|
205
|
-
await extension.dispose?.();
|
|
206
|
-
if (!this._disposed) throw new Error(`Loader for "${name}" returned extension "${extension.name}"`);
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
209
|
-
await this.install(extension);
|
|
210
|
-
return this.get(name);
|
|
211
|
-
} catch (error) {
|
|
212
|
-
this._logger.error(`Extension "${name}" loading failed`, error);
|
|
213
|
-
return;
|
|
214
|
-
} finally{
|
|
215
|
-
this._dependencies.delete(name);
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
_resolveDependency(owner, target) {
|
|
219
|
-
if (this.get(owner) || this.get(target)) return this.resolve(target);
|
|
220
|
-
if (owner === target || this._reaches(target, owner, new Set())) {
|
|
221
|
-
this._logger.error(`Circular extension dependency: "${owner}" -> "${target}"`, new Error('Circular extension dependency'));
|
|
222
|
-
return Promise.resolve(void 0);
|
|
223
|
-
}
|
|
224
|
-
let dependencies = this._dependencies.get(owner);
|
|
225
|
-
if (!dependencies) this._dependencies.set(owner, dependencies = new Set());
|
|
226
|
-
dependencies.add(target);
|
|
227
|
-
return this.resolve(target);
|
|
228
|
-
}
|
|
229
|
-
_reaches(from, target, visited) {
|
|
230
|
-
if (from === target) return true;
|
|
231
|
-
if (visited.has(from)) return false;
|
|
232
|
-
visited.add(from);
|
|
233
|
-
for (const next of this._dependencies.get(from) ?? [])if (this._reaches(next, target, visited)) return true;
|
|
234
|
-
return false;
|
|
235
|
-
}
|
|
236
|
-
_removeRecord(record) {
|
|
237
|
-
const name = record.extension.name;
|
|
238
|
-
if (this._records.get(name) !== record) return;
|
|
239
|
-
this._records.delete(name);
|
|
240
|
-
this._extensions.delete(name);
|
|
241
|
-
this._unpublish(name);
|
|
242
|
-
for (const key of record.sharedNames){
|
|
243
|
-
this._shared.delete(key);
|
|
244
|
-
this._sharedReservations.delete(key);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
_assertNameAvailable(name) {
|
|
248
|
-
for (const view of this._views)if (name in view) throw new Error(`Extension name "${name}" conflicts with a client capability`);
|
|
249
|
-
}
|
|
250
|
-
_publish(view, name) {
|
|
251
|
-
if (name in view) throw new Error(`Extension name "${name}" conflicts with a client capability`);
|
|
252
|
-
const read = ()=>this.get(name);
|
|
253
|
-
Object.defineProperty(view, name, {
|
|
254
|
-
enumerable: true,
|
|
255
|
-
configurable: true,
|
|
256
|
-
get: read
|
|
257
|
-
});
|
|
258
|
-
this._publications.get(view)?.set(name, read);
|
|
259
|
-
}
|
|
260
|
-
_removePublication(view, name) {
|
|
261
|
-
const read = this._publications.get(view)?.get(name);
|
|
262
|
-
if (read && Object.getOwnPropertyDescriptor(view, name)?.get === read) Reflect.deleteProperty(view, name);
|
|
263
|
-
this._publications.get(view)?.delete(name);
|
|
264
|
-
}
|
|
265
|
-
_unpublish(name) {
|
|
266
|
-
for (const view of this._views)this._removePublication(view, name);
|
|
267
|
-
}
|
|
268
|
-
async _disposeRecord(record) {
|
|
269
|
-
if (!record.disposed) {
|
|
270
|
-
record.disposed = true;
|
|
271
|
-
this._retired.add(record.extension);
|
|
272
|
-
await record.extension.dispose?.();
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
144
|
}
|
|
276
145
|
__webpack_require__.d(__webpack_exports__, {
|
|
277
146
|
ExtensionRegistry: ()=>ExtensionRegistry
|