(
source: PluginLoad["source"],
spec: string,
target: string,
meta: { state: PluginMeta.State; entry: PluginMeta.Entry } | undefined,
id?: string,
)
| 310 | } |
| 311 | |
| 312 | function createMeta( |
| 313 | source: PluginLoad["source"], |
| 314 | spec: string, |
| 315 | target: string, |
| 316 | meta: { state: PluginMeta.State; entry: PluginMeta.Entry } | undefined, |
| 317 | id?: string, |
| 318 | ): TuiPluginMeta { |
| 319 | if (meta) { |
| 320 | return { |
| 321 | state: meta.state, |
| 322 | ...meta.entry, |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | const now = Date.now() |
| 327 | return { |
| 328 | state: source === "internal" ? "same" : "first", |
| 329 | id: id ?? spec, |
| 330 | source, |
| 331 | spec, |
| 332 | target, |
| 333 | first_time: now, |
| 334 | last_time: now, |
| 335 | time_changed: now, |
| 336 | load_count: 1, |
| 337 | fingerprint: target, |
| 338 | } |
| 339 | } |
| 340 | |
| 341 | function loadInternalPlugin(item: InternalTuiPlugin): PluginLoad { |
| 342 | const spec = item.id |
no outgoing calls
no test coverage detected