dsh-plugin-container-windows 0.0.0-stage → 0.5.1

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.
Files changed (52) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +109 -2
  3. package/README.zh-CN.md +110 -0
  4. package/cordis.patch.yml +3 -0
  5. package/docs/ai-chat.png +0 -0
  6. package/docs/ai-new-session.png +0 -0
  7. package/docs/apple-container.png +0 -0
  8. package/docs/attach.png +0 -0
  9. package/docs/docker-console.png +0 -0
  10. package/docs/docker-overview.png +0 -0
  11. package/docs/docker-volumes.png +0 -0
  12. package/docs/image-architecture.png +0 -0
  13. package/docs/package-install.png +0 -0
  14. package/docs/provider-switch.png +0 -0
  15. package/docs/run-container.png +0 -0
  16. package/index.js +141 -0
  17. package/lib/client.js +4092 -0
  18. package/package.json +72 -4
  19. package/src/client/api.js +98 -0
  20. package/src/client/attach.jsx +134 -0
  21. package/src/client/build-image.jsx +224 -0
  22. package/src/client/components.jsx +325 -0
  23. package/src/client/hooks.js +161 -0
  24. package/src/client/i18n.js +602 -0
  25. package/src/client/icons.jsx +239 -0
  26. package/src/client/index.jsx +90 -0
  27. package/src/client/page.jsx +854 -0
  28. package/src/client/platforms.js +2 -0
  29. package/src/client/push-image.jsx +113 -0
  30. package/src/client/run-container.jsx +187 -0
  31. package/src/client/runs.js +182 -0
  32. package/src/client/store.js +91 -0
  33. package/src/client/styles.js +383 -0
  34. package/src/client/tabs/compose.jsx +94 -0
  35. package/src/client/tabs/console.jsx +211 -0
  36. package/src/client/tabs/containers.jsx +148 -0
  37. package/src/client/tabs/images.jsx +154 -0
  38. package/src/client/tabs/networks.jsx +91 -0
  39. package/src/client/tabs/overview.jsx +266 -0
  40. package/src/client/tabs/volumes.jsx +76 -0
  41. package/src/host/apple-cli.js +319 -0
  42. package/src/host/apple.js +495 -0
  43. package/src/host/attach.js +246 -0
  44. package/src/host/commands.js +241 -0
  45. package/src/host/docker-cli.js +468 -0
  46. package/src/host/images.js +143 -0
  47. package/src/host/jobs.js +245 -0
  48. package/src/host/parsers.js +484 -0
  49. package/src/host/runtime.js +379 -0
  50. package/src/host/service.js +892 -0
  51. package/src/host/tools.js +198 -0
  52. package/src/host/util.js +97 -0
@@ -0,0 +1,495 @@
1
+ /**
2
+ * Apple `container` provider.
3
+ *
4
+ * Read-only discovery uses `container system status/version` and the JSON list
5
+ * commands; mutations are normal jobs through the same JobManager used by the
6
+ * Docker provider. There is no Docker context, image store, or Compose here.
7
+ */
8
+ import { cpus, homedir, totalmem } from 'node:os'
9
+ import { statSync } from 'node:fs'
10
+
11
+ import {
12
+ CommandError,
13
+ describeCommand,
14
+ detectDestructive,
15
+ normalizeSubcommand,
16
+ parseArguments,
17
+ parseCommand,
18
+ resolveCwd,
19
+ } from './commands.js'
20
+ import { AppleCli } from './apple-cli.js'
21
+ import { LONG_JOB_MS, buildArgv, buildSpec, platformOf, pushSpec } from './images.js'
22
+ import { JobManager } from './jobs.js'
23
+ import {
24
+ firstLine,
25
+ normalizeAppleContainer,
26
+ normalizeAppleImage,
27
+ normalizeAppleNetwork,
28
+ normalizeAppleVolume,
29
+ parseAppleDf,
30
+ parseAppleSystemStatus,
31
+ parseAppleSystemVersion,
32
+ summarizeStderr,
33
+ } from './parsers.js'
34
+ import { messageOf, optionalInteger, requireString } from './util.js'
35
+
36
+ const VALUE_CACHE_MS = 1500
37
+
38
+ /** @param {string} value */
39
+ function safeId(value) {
40
+ const id = requireString(value, 'id', { max: 256 })
41
+ if (!/^[A-Za-z0-9][A-Za-z0-9_.:/@-]{0,255}$/u.test(id)) throw new CommandError('资源 ID 不合法')
42
+ return id
43
+ }
44
+
45
+ /** @param {string} value */
46
+ function safeImageRef(value) {
47
+ const reference = requireString(value, 'reference', { max: 512 })
48
+ if (!/^[A-Za-z0-9][A-Za-z0-9_.:/@-]*$/u.test(reference)) throw new CommandError('镜像名不合法')
49
+ return reference
50
+ }
51
+
52
+ /** @param {unknown} value @param {string} field */
53
+ function stringList(value, field) {
54
+ if (value === undefined || value === null) return []
55
+ if (!Array.isArray(value)) throw new CommandError(`${field} 必须是字符串数组`)
56
+ if (value.length > 64) throw new CommandError(`${field} 数量过多`)
57
+ return value.map((entry, index) => requireString(entry, `${field}[${String(index)}]`, { max: 512 }))
58
+ }
59
+
60
+ /** @param {string} value */
61
+ function safePort(value) {
62
+ if (!/^(?:(?:\d{1,3}\.){3}\d{1,3}:)?\d{1,5}:\d{1,5}(?:\/(?:tcp|udp))?$/u.test(value) && !/^\d{1,5}(?:\/(?:tcp|udp))?$/u.test(value)) {
63
+ throw new CommandError(`端口格式不合法: ${value}(示例 8080:80)`)
64
+ }
65
+ return value
66
+ }
67
+
68
+ /** @param {string} value */
69
+ function safeEnv(value) {
70
+ if (!/^[A-Za-z_][A-Za-z0-9_]*=[^\r\n]*$/u.test(value)) throw new CommandError(`环境变量格式不合法: ${value}(示例 KEY=VALUE)`)
71
+ return value
72
+ }
73
+
74
+ export class AppleProvider {
75
+ /**
76
+ * @param {{
77
+ * subprocess: any,
78
+ * config?: Record<string, any>,
79
+ * env?: NodeJS.ProcessEnv,
80
+ * home?: string,
81
+ * platform?: NodeJS.Platform,
82
+ * logger?: any,
83
+ * }} options
84
+ */
85
+ constructor(options) {
86
+ this.config = options.config ?? {}
87
+ this.home = options.home ?? homedir()
88
+ this.env = options.env ?? process.env
89
+ this.platform = options.platform ?? process.platform
90
+ this.logger = options.logger
91
+ this.controlEnabled = this.platform === 'darwin' && this.config.enableRuntimeControl !== false
92
+ this.cli = new AppleCli({
93
+ subprocess: options.subprocess,
94
+ config: this.config,
95
+ env: this.env,
96
+ home: this.home,
97
+ platform: this.platform,
98
+ logger: this.logger,
99
+ })
100
+ this.jobs = new JobManager({
101
+ subprocess: options.subprocess,
102
+ cli: this.cli,
103
+ maxOutputBytes: Number(this.config.maxOutputBytes ?? 1024 * 1024),
104
+ maxRuns: Number(this.config.maxConcurrentRuns ?? 4),
105
+ idPrefix: 'apple',
106
+ })
107
+ this.cache = new Map()
108
+ }
109
+
110
+ /** @param {AbortSignal | undefined} signal */
111
+ async info(signal) {
112
+ if (this.platform !== 'darwin') {
113
+ return {
114
+ id: 'apple-container',
115
+ label: 'Apple container',
116
+ available: false,
117
+ running: false,
118
+ version: null,
119
+ detail: 'Apple container 仅支持 macOS',
120
+ }
121
+ }
122
+ let path = null
123
+ try {
124
+ path = await this.cli.ensureContainer({ signal, force: true })
125
+ } catch (error) {
126
+ return {
127
+ id: 'apple-container',
128
+ label: 'Apple container',
129
+ available: false,
130
+ running: false,
131
+ version: null,
132
+ detail: messageOf(error),
133
+ }
134
+ }
135
+ const status = parseAppleSystemStatus(await this.cli.systemStatus(signal))
136
+ const probe = status.status === 'running' ? undefined : await this.cli.probe(signal)
137
+ const running = status.status === 'running' || probe !== undefined
138
+ const versions = parseAppleSystemVersion(await this.cli.systemVersion(signal))
139
+ return {
140
+ id: 'apple-container',
141
+ label: 'Apple container',
142
+ available: true,
143
+ running,
144
+ version: versions.containerVersion || null,
145
+ detail: path,
146
+ }
147
+ }
148
+
149
+ invalidate() {
150
+ this.cache.clear()
151
+ }
152
+
153
+ /** @param {string} key @param {() => Promise<any>} produce */
154
+ async cached(key, produce) {
155
+ const now = Date.now()
156
+ const hit = this.cache.get(key)
157
+ if (hit !== undefined && now - hit.at < VALUE_CACHE_MS) return hit.value
158
+ const value = await produce()
159
+ this.cache.set(key, { at: now, value })
160
+ return value
161
+ }
162
+
163
+ /**
164
+ * @param {Record<string, any>} payload
165
+ * @param {AbortSignal | undefined} signal
166
+ */
167
+ async status(payload, signal) {
168
+ let path = null
169
+ let cliError = null
170
+ try {
171
+ path = await this.cli.ensureContainer({ signal })
172
+ } catch (error) {
173
+ cliError = error
174
+ }
175
+ const system = path === null
176
+ ? { status: 'unavailable', error: messageOf(cliError), raw: null }
177
+ : parseAppleSystemStatus(await this.cli.systemStatus(signal))
178
+ if (path !== null && system.status !== 'running') {
179
+ const probe = await this.cli.probe(signal)
180
+ if (probe !== undefined) {
181
+ system.status = 'running'
182
+ system.error = null
183
+ }
184
+ }
185
+ const versions = path === null ? { containerVersion: '', apiServerVersion: '', components: [] } : parseAppleSystemVersion(await this.cli.systemVersion(signal))
186
+ let df = null
187
+ let dfError = null
188
+ if (path !== null && system.status === 'running') {
189
+ try {
190
+ df = await this.cli.df(signal)
191
+ } catch (error) {
192
+ dfError = messageOf(error)
193
+ }
194
+ }
195
+ const running = system.status === 'running'
196
+ const daemonState = running ? 'running' : system.status === 'unavailable' || system.status === 'error' ? 'unreachable' : 'stopped'
197
+ const server = {
198
+ name: 'container-apiserver',
199
+ version: versions.apiServerVersion || system.apiServerVersion || '',
200
+ ncpu: cpus().length,
201
+ memTotal: totalmem(),
202
+ containers: Number(df?.containers?.total) || 0,
203
+ containersRunning: Number(df?.containers?.active) || 0,
204
+ containersStopped: Math.max(0, (Number(df?.containers?.total) || 0) - (Number(df?.containers?.active) || 0)),
205
+ images: Number(df?.images?.total) || 0,
206
+ operatingSystem: 'Apple container',
207
+ architecture: this.platform === 'darwin' ? 'arm64' : this.platform,
208
+ }
209
+ const warnings = []
210
+ if (typeof system.error === 'string' && system.error !== '') warnings.push(firstLine(system.error))
211
+ if (dfError) warnings.push(firstLine(dfError))
212
+ const value = {
213
+ provider: 'apple-container',
214
+ fetchedAt: Date.now(),
215
+ platform: this.platform,
216
+ cli: {
217
+ installed: path !== null,
218
+ path,
219
+ version: versions.containerVersion || null,
220
+ error: cliError === null ? null : messageOf(cliError),
221
+ },
222
+ daemon: {
223
+ state: daemonState,
224
+ error: typeof system.error === 'string' && system.error !== '' ? summarizeStderr(system.error) : null,
225
+ },
226
+ context: {
227
+ selected: null,
228
+ current: null,
229
+ endpoint: '',
230
+ description: 'Apple container',
231
+ contexts: [],
232
+ },
233
+ client: {
234
+ version: versions.containerVersion || null,
235
+ context: null,
236
+ os: 'darwin',
237
+ arch: 'arm64',
238
+ },
239
+ server,
240
+ runtime: {
241
+ kind: 'apple-container',
242
+ label: 'Apple container',
243
+ profile: null,
244
+ installed: path !== null,
245
+ running,
246
+ vmRunning: running,
247
+ canStart: this.controlEnabled && path !== null && !running,
248
+ canStop: this.controlEnabled && path !== null && running,
249
+ canRestart: false,
250
+ endpoint: '',
251
+ details: {
252
+ system: system.raw ?? null,
253
+ status: system.status,
254
+ components: versions.components,
255
+ disk: df,
256
+ },
257
+ error: system.error ?? dfError ?? (cliError === null ? null : messageOf(cliError)),
258
+ },
259
+ env: {
260
+ dockerHost: false,
261
+ dockerContext: null,
262
+ },
263
+ capabilities: {
264
+ enableRuntimeControl: this.controlEnabled,
265
+ maxOutputBytes: Number(this.config.maxOutputBytes ?? 1024 * 1024),
266
+ defaultTimeoutMs: Number(this.config.defaultTimeoutMs ?? 120_000),
267
+ compose: false,
268
+ contexts: false,
269
+ },
270
+ warnings,
271
+ }
272
+ return value
273
+ }
274
+
275
+ /**
276
+ * @param {Record<string, any>} payload
277
+ * @param {AbortSignal | undefined} signal
278
+ */
279
+ async list(payload, signal) {
280
+ const resource = requireString(payload.resource, 'resource')
281
+ const all = payload.all !== false
282
+ const key = `${resource}:${all ? 'all' : 'running'}`
283
+ return this.cached(key, async () => {
284
+ let items
285
+ let format = 'json'
286
+ if (resource === 'containers') {
287
+ const raw = await this.cli.json(['list', ...(all ? ['-a'] : []), '--format', 'json'], { signal })
288
+ items = (Array.isArray(raw) ? raw : []).map(normalizeAppleContainer)
289
+ } else if (resource === 'images') {
290
+ const raw = await this.cli.json(['image', 'list', '--format', 'json'], { signal })
291
+ items = (Array.isArray(raw) ? raw : []).map(normalizeAppleImage)
292
+ } else if (resource === 'volumes') {
293
+ const raw = await this.cli.json(['volume', 'list', '--format', 'json'], { signal })
294
+ items = (Array.isArray(raw) ? raw : []).map(normalizeAppleVolume)
295
+ } else if (resource === 'networks') {
296
+ const raw = await this.cli.json(['network', 'list', '--format', 'json'], { signal })
297
+ items = (Array.isArray(raw) ? raw : []).map(normalizeAppleNetwork)
298
+ } else if (resource === 'disk') {
299
+ const raw = await this.cli.json(['system', 'df', '--format', 'json'], { signal })
300
+ items = parseAppleDf(raw)
301
+ } else if (resource === 'compose') {
302
+ throw new CommandError('Apple container 不支持 Compose;请切换到 Docker provider', 'container/unsupported')
303
+ } else {
304
+ throw new CommandError(`不支持的资源类型: ${resource}`)
305
+ }
306
+ return { fetchedAt: Date.now(), items, format, warnings: [] }
307
+ })
308
+ }
309
+
310
+ /**
311
+ * @param {Record<string, any>} payload
312
+ * @param {AbortSignal | undefined} signal
313
+ */
314
+ async inspect(payload, signal) {
315
+ const kind = requireString(payload.kind, 'kind')
316
+ const command = {
317
+ container: ['inspect', safeId(payload.id)],
318
+ image: ['image', 'inspect', safeId(payload.id)],
319
+ volume: ['volume', 'inspect', safeId(payload.id)],
320
+ network: ['network', 'inspect', safeId(payload.id)],
321
+ }[kind]
322
+ if (command === undefined) throw new CommandError('不支持的 inspect 类型')
323
+ const raw = await this.cli.json(command, { signal, timeoutMs: 20_000, maxBytes: 4 * 1024 * 1024 })
324
+ const value = Array.isArray(raw) ? raw[0] ?? null : raw
325
+ return { value, raw: JSON.stringify(value, null, 2), warnings: [] }
326
+ }
327
+
328
+ /**
329
+ * @param {Record<string, any>} payload
330
+ * @param {AbortSignal | undefined} signal
331
+ */
332
+ async run(payload, signal) {
333
+ const path = await this.cli.ensureContainer({ signal })
334
+ let subargv
335
+ if (payload.argv !== undefined) {
336
+ if (payload.command !== undefined) throw new CommandError('command 和 argv 只能提供一个')
337
+ subargv = normalizeSubcommand(payload.argv, { dockerPath: path, commandName: 'container', platform: this.platform })
338
+ } else {
339
+ subargv = parseCommand(requireString(payload.command, 'command'), { dockerPath: path, commandName: 'container', platform: this.platform })
340
+ }
341
+ const cwd = resolveCwd(payload.cwd, { fallback: this.home, statSync })
342
+ const displayCommand = describeCommand(subargv, null, 'container')
343
+ const destructive = detectDestructive(subargv)
344
+ if (destructive.dangerous && payload.confirm !== true) {
345
+ throw Object.assign(new Error(`危险操作需要确认: ${displayCommand}`), {
346
+ code: 'docker/confirmation-required',
347
+ details: { command: displayCommand, reason: destructive.reason },
348
+ })
349
+ }
350
+ const timeoutMs = optionalInteger(payload.timeoutMs, 'timeoutMs', { min: 5000, max: 30 * 60_000 }) ?? Number(this.config.defaultTimeoutMs ?? 120_000)
351
+ const run = this.jobs.start({
352
+ argv: [path, ...subargv],
353
+ displayCommand,
354
+ context: null,
355
+ cwd,
356
+ title: typeof payload.title === 'string' ? payload.title : '',
357
+ timeoutMs,
358
+ })
359
+ this.invalidate()
360
+ return { run }
361
+ }
362
+
363
+ /**
364
+ * Semantic quick action mapped to Apple CLI syntax.
365
+ * @param {Record<string, any>} payload
366
+ * @param {AbortSignal | undefined} signal
367
+ */
368
+ async action(payload, signal) {
369
+ const kind = requireString(payload.kind, 'kind')
370
+ const action = requireString(payload.action, 'action')
371
+ if (kind === 'container' && action === 'run') {
372
+ const image = safeImageRef(payload.image)
373
+ const name = payload.name === undefined || payload.name === null ? undefined : safeId(payload.name)
374
+ const args = parseArguments(payload.command === undefined || payload.command === null ? '' : requireString(payload.command, 'command'), { platform: this.platform })
375
+ const ports = stringList(payload.ports, 'ports').map(safePort)
376
+ const env = stringList(payload.env, 'env').map(safeEnv)
377
+ const argv = [
378
+ 'run',
379
+ '-d',
380
+ ...(name === undefined ? [] : ['--name', name]),
381
+ ...ports.flatMap((port) => ['-p', port]),
382
+ ...env.flatMap((entry) => ['-e', entry]),
383
+ image,
384
+ ...args,
385
+ ]
386
+ return this.run({
387
+ argv,
388
+ cwd: payload.cwd,
389
+ title: payload.title ?? `container run ${image}`,
390
+ }, signal)
391
+ }
392
+ if (kind === 'container') {
393
+ const id = safeId(payload.id)
394
+ if (action === 'restart') throw new CommandError('Apple container 不支持一键重启;请先停止再启动', 'container/unsupported')
395
+ const argv = action === 'start'
396
+ ? ['start', id]
397
+ : action === 'stop'
398
+ ? ['stop', id]
399
+ : action === 'delete'
400
+ ? ['delete', id]
401
+ : action === 'logs'
402
+ ? ['logs', ...(payload.follow === true ? ['-f', '-n', '100'] : ['-n', '500']), id]
403
+ : undefined
404
+ if (argv === undefined) throw new CommandError(`不支持的操作: ${action}`)
405
+ return this.run({ argv, confirm: payload.confirm, cwd: payload.cwd, title: payload.title ?? `container ${action} ${id}` }, signal)
406
+ }
407
+ if (kind === 'image') {
408
+ if (action === 'pull') {
409
+ const platform = platformOf(payload.platform)
410
+ return this.run({ argv: ['image', 'pull', ...(platform === undefined ? [] : ['--platform', platform]), safeImageRef(payload.id ?? payload.reference)], cwd: payload.cwd, timeoutMs: LONG_JOB_MS, title: payload.title ?? 'container image pull' }, signal)
411
+ }
412
+ if (action === 'build') {
413
+ const spec = buildSpec(payload)
414
+ return this.run({ argv: buildArgv(spec), cwd: spec.contextDir, timeoutMs: LONG_JOB_MS, title: payload.title ?? `container build ${spec.tag}` }, signal)
415
+ }
416
+ if (action === 'push') {
417
+ const { source, target } = pushSpec(payload)
418
+ if (target !== source) {
419
+ const tagged = await this.cli.exec(['image', 'tag', source, target], { signal, cwd: this.home, timeoutMs: 20_000 })
420
+ if (tagged.exitCode !== 0) throw new CommandError(`${tagged.stderr}${tagged.stdout}`.trim() || `container image tag 退出码 ${String(tagged.exitCode)}`, 'container/exec-failed')
421
+ }
422
+ return this.run({ argv: ['image', 'push', target], cwd: payload.cwd, timeoutMs: LONG_JOB_MS, title: payload.title ?? `container image push ${target}` }, signal)
423
+ }
424
+ if (action === 'delete') {
425
+ return this.run({ argv: ['image', 'delete', safeId(payload.id)], confirm: payload.confirm, cwd: payload.cwd, title: payload.title ?? 'container image delete' }, signal)
426
+ }
427
+ throw new CommandError(`不支持的镜像操作: ${action}`)
428
+ }
429
+ if (kind === 'volume') {
430
+ if (action !== 'delete') throw new CommandError(`不支持的卷操作: ${action}`)
431
+ return this.run({ argv: ['volume', 'delete', safeId(payload.id)], confirm: payload.confirm, cwd: payload.cwd, title: payload.title ?? 'container volume delete' }, signal)
432
+ }
433
+ if (kind === 'network') {
434
+ if (action !== 'delete') throw new CommandError(`不支持的网络操作: ${action}`)
435
+ return this.run({ argv: ['network', 'delete', safeId(payload.id)], confirm: payload.confirm, cwd: payload.cwd, title: payload.title ?? 'container network delete' }, signal)
436
+ }
437
+ throw new CommandError(`不支持的资源类型: ${kind}`)
438
+ }
439
+
440
+ /**
441
+ * @param {Record<string, any>} payload
442
+ * @param {AbortSignal | undefined} signal
443
+ */
444
+ async runtimeAction(payload, signal) {
445
+ const action = requireString(payload.action, 'action')
446
+ if (action !== 'start' && action !== 'stop') throw new CommandError('Apple container 只支持 system start/stop', 'container/unsupported')
447
+ if (action === 'stop' && payload.confirm !== true) {
448
+ throw Object.assign(new Error('停止 Apple container 系统服务会中断所有容器'), {
449
+ code: 'docker/confirmation-required',
450
+ details: { command: 'container system stop', reason: 'runtime-stop' },
451
+ })
452
+ }
453
+ const path = await this.cli.ensureContainer({ signal })
454
+ const argv = action === 'start'
455
+ ? [path, 'system', 'start', '--disable-kernel-install', '--timeout', '120']
456
+ : [path, 'system', 'stop']
457
+ const displayCommand = action === 'start'
458
+ ? 'container system start --disable-kernel-install --timeout 120'
459
+ : 'container system stop'
460
+ const run = this.jobs.start({
461
+ argv,
462
+ displayCommand,
463
+ context: null,
464
+ cwd: this.home,
465
+ title: action === 'start' ? 'container system start' : 'container system stop',
466
+ timeoutMs: 10 * 60_000,
467
+ })
468
+ this.invalidate()
469
+ return { run, dispatched: true, message: displayCommand }
470
+ }
471
+
472
+ /** @param {Record<string, any>} payload */
473
+ poll(payload) {
474
+ const runId = requireString(payload.runId, 'runId')
475
+ return this.jobs.poll({
476
+ runId,
477
+ stdoutOffset: optionalInteger(payload.stdoutOffset, 'stdoutOffset', { min: 0 }),
478
+ stderrOffset: optionalInteger(payload.stderrOffset, 'stderrOffset', { min: 0 }),
479
+ })
480
+ }
481
+
482
+ /** @param {Record<string, any>} payload */
483
+ cancel(payload) {
484
+ return this.jobs.cancel(requireString(payload.runId, 'runId'))
485
+ }
486
+
487
+ dispose() {
488
+ this.jobs.dispose()
489
+ this.cache.clear()
490
+ }
491
+ }
492
+
493
+ export function createAppleProvider(options) {
494
+ return new AppleProvider(options)
495
+ }