@openclaw/google-meet 2026.9.3 → 2026.9.5
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/assets/activity.svg +40 -0
- package/assets/icon.png +0 -0
- package/dist/{chrome-create-PKAyxCiL.js → .setup/chrome-create-BZRBHJp9.mjs} +1 -1
- package/dist/{cli-HxUMx7pI.js → .setup/cli-MJjnaxoP.mjs} +68 -88
- package/dist/{config-wBK8loBb.js → .setup/config-C-6enWkx.mjs} +2 -0
- package/dist/{create-BbQ9g_AK.js → .setup/create-sGWmlpgC.mjs} +3 -3
- package/dist/{google-meet-platform-adapter-C3J-iFRE.js → .setup/google-meet-platform-adapter-DQZ74Kd5.mjs} +32 -3
- package/dist/{node-host-BXtXbsMa.js → .setup/node-host-BOzEP_Us.mjs} +3 -3
- package/dist/{node-invoke-policy-B0gOlLJR.js → .setup/node-invoke-policy-hwXq9MfV.mjs} +2 -2
- package/dist/{oauth-DgBscjXK.js → .setup/oauth-22Ey-zCb.mjs} +1 -1
- package/dist/{plugin-helpers-DkI5A7LT.js → .setup/plugin-helpers-rGjL9QFK.mjs} +5 -5
- package/dist/{plugin-registration-ona5lHdz.js → .setup/plugin-registration-CfZbUMDY.mjs} +7 -7
- package/dist/{runtime-BKbf6Uj_.js → .setup/runtime-D_C0dFI1.mjs} +22 -307
- package/dist/cli-metadata.js +1 -1
- package/dist/index.js +4 -4
- package/node_modules/jszip/.github/FUNDING.yml +1 -0
- package/node_modules/jszip/.github/actions/setup/action.yml +23 -0
- package/node_modules/jszip/.github/workflows/benchmark.yml +38 -0
- package/node_modules/jszip/.github/workflows/main.yml +55 -0
- package/node_modules/jszip/CHANGES.md +6 -0
- package/node_modules/jszip/dist/jszip.js +28 -19
- package/node_modules/jszip/dist/jszip.min.js +2 -2
- package/node_modules/jszip/index.d.ts +14 -0
- package/node_modules/jszip/lib/index.js +1 -1
- package/node_modules/jszip/lib/utils.js +26 -17
- package/node_modules/jszip/package.json +2 -2
- package/node_modules/typebox/build/compile/validator.d.mts +1 -1
- package/node_modules/typebox/build/compile/validator.mjs +1 -1
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +7 -5
- package/node_modules/typebox/build/format/iri.mjs +5 -1
- package/node_modules/typebox/build/guard/emit.mjs +2 -4
- package/node_modules/typebox/build/guard/guard.mjs +6 -18
- package/node_modules/typebox/build/guard/string.mjs +16 -24
- package/node_modules/typebox/build/schema/build.mjs +2 -2
- package/node_modules/typebox/build/schema/check.mjs +1 -1
- package/node_modules/typebox/build/schema/compile.d.mts +3 -2
- package/node_modules/typebox/build/schema/compile.mjs +8 -8
- package/node_modules/typebox/build/schema/engine/_context.d.mts +6 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +23 -15
- package/node_modules/typebox/build/schema/engine/_functions.d.mts +2 -2
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/_reducer.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/_refine.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/_refine.mjs +4 -7
- package/node_modules/typebox/build/schema/engine/_stack.d.mts +34 -16
- package/node_modules/typebox/build/schema/engine/_stack.mjs +148 -104
- package/node_modules/typebox/build/schema/engine/additionalItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +8 -8
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +26 -18
- package/node_modules/typebox/build/schema/engine/allOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/allOf.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/anyOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/anyOf.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/boolean.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/const.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/const.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/contains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/contains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependencies.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +3 -6
- package/node_modules/typebox/build/schema/engine/dependentRequired.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependentSchemas.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/enum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/enum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/format.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/format.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/if.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/if.mjs +7 -15
- package/node_modules/typebox/build/schema/engine/items.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/items.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/maxContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minItems.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/minItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/multipleOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/multipleOf.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/not.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -8
- package/node_modules/typebox/build/schema/engine/oneOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +6 -11
- package/node_modules/typebox/build/schema/engine/pattern.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -7
- package/node_modules/typebox/build/schema/engine/patternProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/prefixItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/prefixItems.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/properties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/properties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/propertyNames.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +4 -10
- package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/ref.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/ref.mjs +19 -15
- package/node_modules/typebox/build/schema/engine/required.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/required.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/schema.d.mts +7 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +137 -133
- package/node_modules/typebox/build/schema/engine/type.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/uniqueItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +2 -6
- package/node_modules/typebox/build/schema/errors.d.mts +2 -2
- package/node_modules/typebox/build/schema/errors.mjs +8 -14
- package/node_modules/typebox/build/schema/intern/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
- package/node_modules/typebox/build/schema/intern/intern.d.mts +11 -0
- package/node_modules/typebox/build/schema/intern/intern.mjs +293 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.mjs +288 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.mjs +300 -0
- package/node_modules/typebox/build/schema/meta/draft_3.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_3.mjs +143 -0
- package/node_modules/typebox/build/schema/meta/draft_4.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_4.mjs +149 -0
- package/node_modules/typebox/build/schema/meta/draft_6.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_6.mjs +155 -0
- package/node_modules/typebox/build/schema/meta/draft_7.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_7.mjs +172 -0
- package/node_modules/typebox/build/schema/meta/index.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/index.mjs +2 -0
- package/node_modules/typebox/build/schema/meta/meta.d.mts +9 -0
- package/node_modules/typebox/build/schema/meta/meta.mjs +15 -0
- package/node_modules/typebox/build/schema/meta/schema.d.mts +6 -0
- package/node_modules/typebox/build/schema/meta/schema.mjs +1 -0
- package/node_modules/typebox/build/schema/parse.d.mts +1 -0
- package/node_modules/typebox/build/schema/parse.mjs +10 -5
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +8 -3
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +268 -139
- package/node_modules/typebox/build/schema/schema.d.mts +2 -0
- package/node_modules/typebox/build/schema/schema.mjs +2 -0
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -12
- package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +59 -89
- package/openclaw.plugin.json +33 -0
- package/package.json +10 -7
- package/node_modules/jszip/.github/workflows/pr.yaml +0 -58
- package/node_modules/jszip/.jekyll-metadata +0 -0
- package/node_modules/jszip/.travis.yml +0 -17
- package/node_modules/jszip/deps.js +0 -37
- package/node_modules/jszip/graph.svg +0 -601
- /package/dist/{cli-output-mode-BwH_6tH8.js → .setup/cli-output-mode-BwH_6tH8.mjs} +0 -0
- /package/dist/{google-api-errors-BDYXfKRa.js → .setup/google-api-errors-BDYXfKRa.mjs} +0 -0
- /package/dist/{google-meet-platform-constants-Bs5iAg3E.js → .setup/google-meet-platform-constants-Bs5iAg3E.mjs} +0 -0
- /package/dist/{meet-url-BP2Jlvjs.js → .setup/meet-url-BP2Jlvjs.mjs} +0 -0
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { n as GOOGLE_MEET_NODE_COMMAND } from "./google-meet-platform-constants-Bs5iAg3E.
|
|
2
|
-
import { t as normalizeMeetUrl } from "./meet-url-BP2Jlvjs.
|
|
3
|
-
import { c as callBrowserProxyOnNode, l as resolveChromeNode, u as resolveChromeNodeInfo } from "./chrome-create-
|
|
4
|
-
import { n as normalizeDialInNumber, t as GOOGLE_MEET_PLATFORM_ADAPTER } from "./google-meet-platform-adapter-
|
|
1
|
+
import { n as GOOGLE_MEET_NODE_COMMAND, t as GOOGLE_MEET_BROWSER_NODE_ADAPTER } from "./google-meet-platform-constants-Bs5iAg3E.mjs";
|
|
2
|
+
import { t as normalizeMeetUrl } from "./meet-url-BP2Jlvjs.mjs";
|
|
3
|
+
import { c as callBrowserProxyOnNode, l as resolveChromeNode, u as resolveChromeNodeInfo } from "./chrome-create-BZRBHJp9.mjs";
|
|
4
|
+
import { n as normalizeDialInNumber, t as GOOGLE_MEET_PLATFORM_ADAPTER } from "./google-meet-platform-adapter-DQZ74Kd5.mjs";
|
|
5
5
|
import { asOptionalRecord, asRecord, normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
7
|
-
import { addTimerTimeoutGraceMs } from "openclaw/plugin-sdk/number-runtime";
|
|
8
7
|
import { GatewayClient, startGatewayClientWhenEventLoopReady } from "openclaw/plugin-sdk/gateway-runtime";
|
|
9
8
|
import path from "node:path";
|
|
10
9
|
import { isBlockedHostnameOrIp } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
11
|
-
import { MeetingPlatformAdapter, MeetingSessionRuntime, addMeetingSetupCheck,
|
|
10
|
+
import { MeetingPlatformAdapter, MeetingSessionRuntime, addMeetingSetupCheck, createMeetingSession, createMeetingSetupStatus, createMeetingVoiceCallGateway, endMeetingVoiceCallGatewayCall, getMeetingVoiceCallGatewayCall, isMeetingVoiceCallMissingError, joinMeetingViaVoiceCallGateway, leaveMeetingWithBrowser, readMeetingTranscriptWithBrowser, recoverMeetingBrowserTab, resolveLocalMeetingBrowserRequest, speakMeetingViaVoiceCallGateway } from "openclaw/plugin-sdk/meeting-runtime";
|
|
12
11
|
import { resolveDefaultAgentId } from "openclaw/plugin-sdk/agent-runtime";
|
|
13
12
|
import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
|
|
14
13
|
import fs from "node:fs";
|
|
@@ -206,126 +205,28 @@ function addGoogleMeetSetupCheck(status, check) {
|
|
|
206
205
|
}
|
|
207
206
|
//#endregion
|
|
208
207
|
//#region extensions/google-meet/src/transports/chrome.ts
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
timeoutMs: params.timeoutMs,
|
|
223
|
-
run: async (argv, timeoutMs) => {
|
|
224
|
-
const result = await params.runtime.system.runCommandWithTimeout(argv, { timeoutMs });
|
|
225
|
-
return {
|
|
226
|
-
...result,
|
|
227
|
-
code: result.code ?? 1
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
return audio;
|
|
232
|
-
}
|
|
233
|
-
async function assertGoogleMeetAudioAvailable(params) {
|
|
234
|
-
await prepareGoogleMeetAudioRuntime(params);
|
|
235
|
-
}
|
|
208
|
+
const chromeTransport = MeetingPlatformAdapter.createChromeTransportWithExternalAudio({
|
|
209
|
+
browserNodeAdapter: GOOGLE_MEET_BROWSER_NODE_ADAPTER,
|
|
210
|
+
isRealtimeRouteReady: (mode, health) => !MeetingPlatformAdapter.isTalkBackMode(mode) || MeetingPlatformAdapter.isRealtimeRouteReady(mode, health),
|
|
211
|
+
isTalkBackMode: MeetingPlatformAdapter.isTalkBackMode,
|
|
212
|
+
meetingLabel: "Google Meet",
|
|
213
|
+
nodeCommandName: GOOGLE_MEET_NODE_COMMAND,
|
|
214
|
+
platform: GOOGLE_MEET_PLATFORM_ADAPTER,
|
|
215
|
+
preserveTrackedBrowserOnEngineFailure: false,
|
|
216
|
+
startupFailurePolicy: "owned",
|
|
217
|
+
runtime: MeetingPlatformAdapter.createChromeRuntimeBindings()
|
|
218
|
+
});
|
|
219
|
+
const assertGoogleMeetAudioAvailable = chromeTransport.assertAudioDeviceAvailable;
|
|
220
|
+
const launchChromeMeetOnNode = chromeTransport.launchOnNode;
|
|
236
221
|
async function launchChromeMeet(params) {
|
|
237
|
-
|
|
238
|
-
const checkRealtimeAudioPrerequisites = async () => {
|
|
239
|
-
if (!MeetingPlatformAdapter.isTalkBackMode(params.mode)) return;
|
|
240
|
-
audio = await prepareGoogleMeetAudioRuntime({
|
|
241
|
-
runtime: params.runtime,
|
|
242
|
-
config: params.config,
|
|
243
|
-
timeoutMs: Math.min(params.config.chrome.joinTimeoutMs, 1e4)
|
|
244
|
-
});
|
|
245
|
-
if (params.config.chrome.audioBridgeHealthCommand) {
|
|
246
|
-
const health = await params.runtime.system.runCommandWithTimeout(params.config.chrome.audioBridgeHealthCommand, { timeoutMs: params.config.chrome.joinTimeoutMs });
|
|
247
|
-
if (health.code !== 0) throw new Error(`Chrome audio bridge health check failed: ${health.stderr || health.stdout || health.code}`);
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
const startRealtimeAudioBridge = async () => {
|
|
251
|
-
if (!MeetingPlatformAdapter.isTalkBackMode(params.mode)) return;
|
|
252
|
-
if (params.config.chrome.audioBridgeCommand) {
|
|
253
|
-
if (params.mode === "agent") throw new Error("Chrome agent mode requires chrome.audioInputCommand and chrome.audioOutputCommand so OpenClaw can run STT and regular TTS directly.");
|
|
254
|
-
const bridge = await params.runtime.system.runCommandWithTimeout(params.config.chrome.audioBridgeCommand, { timeoutMs: params.config.chrome.joinTimeoutMs });
|
|
255
|
-
if (bridge.code !== 0) throw new Error(`failed to start Chrome audio bridge: ${bridge.stderr || bridge.stdout || bridge.code}`);
|
|
256
|
-
return { type: "external-command" };
|
|
257
|
-
}
|
|
258
|
-
if (!params.config.chrome.audioInputCommand || !params.config.chrome.audioOutputCommand) throw new Error("Chrome talk-back mode requires chrome.audioInputCommand and chrome.audioOutputCommand, or chrome.audioBridgeCommand for an external bridge.");
|
|
259
|
-
if (!audio) throw new Error("Google Meet audio backend was not prepared.");
|
|
260
|
-
const transport = createLocalMeetingRealtimeAudioTransport({
|
|
261
|
-
inputCommand: audio.inputCommand,
|
|
262
|
-
outputCommand: audio.outputCommand,
|
|
263
|
-
audioFormat: params.config.chrome.audioFormat,
|
|
264
|
-
bargeInInputCommand: params.config.chrome.bargeInInputCommand,
|
|
265
|
-
bargeInRmsThreshold: params.config.chrome.bargeInRmsThreshold,
|
|
266
|
-
bargeInPeakThreshold: params.config.chrome.bargeInPeakThreshold,
|
|
267
|
-
bargeInCooldownMs: params.config.chrome.bargeInCooldownMs,
|
|
268
|
-
logger: params.logger,
|
|
269
|
-
logScope: GOOGLE_MEET_PLATFORM_ADAPTER.logScope
|
|
270
|
-
});
|
|
271
|
-
const bindings = createMeetingRealtimeEngineBindings({
|
|
272
|
-
platform: GOOGLE_MEET_PLATFORM_ADAPTER,
|
|
273
|
-
...params
|
|
274
|
-
});
|
|
275
|
-
const engine = params.mode === "agent" ? await startMeetingAgentRealtimeEngine({
|
|
276
|
-
config: params.config,
|
|
277
|
-
fullConfig: params.fullConfig,
|
|
278
|
-
runtime: params.runtime,
|
|
279
|
-
platform: bindings.platform,
|
|
280
|
-
meetingSessionId: params.meetingSessionId,
|
|
281
|
-
requesterSessionKey: params.requesterSessionKey,
|
|
282
|
-
transport,
|
|
283
|
-
logger: params.logger,
|
|
284
|
-
consultAgent: bindings.consultAgent
|
|
285
|
-
}) : await startMeetingRealtimeEngine({
|
|
286
|
-
config: {
|
|
287
|
-
...params.config,
|
|
288
|
-
realtime: {
|
|
289
|
-
...params.config.realtime,
|
|
290
|
-
strategy: "bidi"
|
|
291
|
-
}
|
|
292
|
-
},
|
|
293
|
-
fullConfig: params.fullConfig,
|
|
294
|
-
runtime: params.runtime,
|
|
295
|
-
...bindings,
|
|
296
|
-
meetingSessionId: params.meetingSessionId,
|
|
297
|
-
requesterSessionKey: params.requesterSessionKey,
|
|
298
|
-
transport,
|
|
299
|
-
logger: params.logger
|
|
300
|
-
});
|
|
301
|
-
return {
|
|
302
|
-
type: "command-pair",
|
|
303
|
-
inputCommand: audio.inputCommand,
|
|
304
|
-
outputCommand: audio.outputCommand,
|
|
305
|
-
...engine
|
|
306
|
-
};
|
|
307
|
-
};
|
|
308
|
-
await checkRealtimeAudioPrerequisites();
|
|
309
|
-
const result = await openOrRecoverMeetWithBrowser({
|
|
310
|
-
callBrowser: await resolveLocalMeetingBrowserRequest(params.runtime),
|
|
311
|
-
config: params.config,
|
|
312
|
-
captureCaptions: shouldCaptureCaptions(params.mode, params.fullConfig),
|
|
313
|
-
locationLabel: "in local Chrome",
|
|
314
|
-
meetingSessionId: params.meetingSessionId,
|
|
315
|
-
mode: params.mode,
|
|
316
|
-
url: params.url
|
|
317
|
-
});
|
|
318
|
-
const audioBridge = MeetingPlatformAdapter.isRealtimeRouteReady(params.mode, result.browser) ? await startRealtimeAudioBridge() : void 0;
|
|
222
|
+
const result = await chromeTransport.launchInChrome(params);
|
|
319
223
|
return {
|
|
320
224
|
...result,
|
|
321
|
-
|
|
322
|
-
audioBridge
|
|
225
|
+
audioBridge: result.audioBridge
|
|
323
226
|
};
|
|
324
227
|
}
|
|
325
|
-
function
|
|
326
|
-
|
|
327
|
-
if (!value || typeof value !== "object") throw new Error("Google Meet node returned an invalid start result.");
|
|
328
|
-
return value;
|
|
228
|
+
function shouldCaptureCaptions(mode, fullConfig) {
|
|
229
|
+
return mode === "transcribe" || !fullConfig || resolveTranscriptsConfig(fullConfig.transcripts).enabled;
|
|
329
230
|
}
|
|
330
231
|
function chromeNodeBrowserRequest(runtime, nodeId) {
|
|
331
232
|
return async (request) => await callBrowserProxyOnNode({
|
|
@@ -367,43 +268,6 @@ async function readChromeMeetTranscript(params) {
|
|
|
367
268
|
timeoutMs: Math.min(Math.max(1e3, params.config.chrome.joinTimeoutMs), 1e4)
|
|
368
269
|
});
|
|
369
270
|
}
|
|
370
|
-
async function openOrRecoverMeetWithBrowser(params) {
|
|
371
|
-
if (!params.config.chrome.launch) {
|
|
372
|
-
const recovered = await recoverMeetingBrowserTab({
|
|
373
|
-
adapter: GOOGLE_MEET_PLATFORM_ADAPTER,
|
|
374
|
-
allowSessionAdoption: true,
|
|
375
|
-
autoJoin: params.config.chrome.autoJoin,
|
|
376
|
-
callBrowser: params.callBrowser,
|
|
377
|
-
captureCaptions: params.captureCaptions,
|
|
378
|
-
config: params.config.chrome,
|
|
379
|
-
locationLabel: params.locationLabel,
|
|
380
|
-
meetingSessionId: params.meetingSessionId,
|
|
381
|
-
mode: params.mode,
|
|
382
|
-
requestedMeetingUrl: params.url,
|
|
383
|
-
trackedMeetingUrl: params.url,
|
|
384
|
-
trackedTargetId: void 0
|
|
385
|
-
});
|
|
386
|
-
return {
|
|
387
|
-
launched: false,
|
|
388
|
-
browser: recovered.browser,
|
|
389
|
-
tab: recovered.targetId ? {
|
|
390
|
-
targetId: recovered.targetId,
|
|
391
|
-
openedByPlugin: false
|
|
392
|
-
} : void 0
|
|
393
|
-
};
|
|
394
|
-
}
|
|
395
|
-
return await openMeetingWithBrowser({
|
|
396
|
-
adapter: GOOGLE_MEET_PLATFORM_ADAPTER,
|
|
397
|
-
callBrowser: params.callBrowser,
|
|
398
|
-
config: params.config.chrome,
|
|
399
|
-
session: {
|
|
400
|
-
captureCaptions: params.captureCaptions,
|
|
401
|
-
mode: params.mode,
|
|
402
|
-
meetingSessionId: params.meetingSessionId,
|
|
403
|
-
url: params.url
|
|
404
|
-
}
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
271
|
async function recoverCurrentMeetTab(params) {
|
|
408
272
|
const node = params.transport === "chrome-node" ? { nodeId: await resolveChromeNode({
|
|
409
273
|
runtime: params.runtime,
|
|
@@ -428,155 +292,6 @@ async function recoverCurrentMeetTab(params) {
|
|
|
428
292
|
})
|
|
429
293
|
};
|
|
430
294
|
}
|
|
431
|
-
async function launchChromeMeetOnNode(params) {
|
|
432
|
-
const nodeId = await resolveChromeNode({
|
|
433
|
-
runtime: params.runtime,
|
|
434
|
-
requestedNode: params.config.chromeNode.node
|
|
435
|
-
});
|
|
436
|
-
try {
|
|
437
|
-
await params.runtime.nodes.invoke({
|
|
438
|
-
nodeId,
|
|
439
|
-
command: GOOGLE_MEET_NODE_COMMAND,
|
|
440
|
-
params: {
|
|
441
|
-
action: "stopByUrl",
|
|
442
|
-
url: params.url,
|
|
443
|
-
mode: params.mode
|
|
444
|
-
},
|
|
445
|
-
timeoutMs: 5e3
|
|
446
|
-
});
|
|
447
|
-
} catch (error) {
|
|
448
|
-
params.logger.debug?.(`[google-meet] node bridge cleanup before join ignored: ${error instanceof Error ? error.message : String(error)}`);
|
|
449
|
-
}
|
|
450
|
-
const setup = MeetingPlatformAdapter.isTalkBackMode(params.mode) ? parseNodeStartResult(await params.runtime.nodes.invoke({
|
|
451
|
-
nodeId,
|
|
452
|
-
command: GOOGLE_MEET_NODE_COMMAND,
|
|
453
|
-
params: {
|
|
454
|
-
action: "setup",
|
|
455
|
-
audioBackend: params.config.chrome.audioBackend,
|
|
456
|
-
audioFormat: params.config.chrome.audioFormat,
|
|
457
|
-
audioBufferBytes: params.config.chrome.audioBufferBytes,
|
|
458
|
-
...params.config.chrome.audioInputCommandOverride ? { audioInputCommand: params.config.chrome.audioInputCommandOverride } : {},
|
|
459
|
-
...params.config.chrome.audioOutputCommandOverride ? { audioOutputCommand: params.config.chrome.audioOutputCommandOverride } : {}
|
|
460
|
-
},
|
|
461
|
-
timeoutMs: 12e3
|
|
462
|
-
})) : void 0;
|
|
463
|
-
const browserControl = await openOrRecoverMeetWithBrowser({
|
|
464
|
-
callBrowser: chromeNodeBrowserRequest(params.runtime, nodeId),
|
|
465
|
-
locationLabel: "on the selected Chrome node",
|
|
466
|
-
config: params.config,
|
|
467
|
-
captureCaptions: shouldCaptureCaptions(params.mode, params.fullConfig),
|
|
468
|
-
mode: params.mode,
|
|
469
|
-
meetingSessionId: params.meetingSessionId,
|
|
470
|
-
url: params.url
|
|
471
|
-
});
|
|
472
|
-
if (MeetingPlatformAdapter.isTalkBackMode(params.mode) && !MeetingPlatformAdapter.isRealtimeRouteReady(params.mode, browserControl.browser)) return {
|
|
473
|
-
nodeId,
|
|
474
|
-
launched: browserControl.launched,
|
|
475
|
-
audioBackend: setup?.audioBackend,
|
|
476
|
-
browser: browserControl.browser,
|
|
477
|
-
tab: browserControl.tab
|
|
478
|
-
};
|
|
479
|
-
const result = parseNodeStartResult(await params.runtime.nodes.invoke({
|
|
480
|
-
nodeId,
|
|
481
|
-
command: GOOGLE_MEET_NODE_COMMAND,
|
|
482
|
-
params: {
|
|
483
|
-
action: "start",
|
|
484
|
-
url: params.url,
|
|
485
|
-
mode: params.mode,
|
|
486
|
-
launch: false,
|
|
487
|
-
browserProfile: params.config.chrome.browserProfile,
|
|
488
|
-
joinTimeoutMs: params.config.chrome.joinTimeoutMs,
|
|
489
|
-
audioBackend: params.config.chrome.audioBackend,
|
|
490
|
-
audioFormat: params.config.chrome.audioFormat,
|
|
491
|
-
audioBufferBytes: params.config.chrome.audioBufferBytes,
|
|
492
|
-
...params.config.chrome.audioInputCommandOverride ? { audioInputCommand: params.config.chrome.audioInputCommandOverride } : {},
|
|
493
|
-
...params.config.chrome.audioOutputCommandOverride ? { audioOutputCommand: params.config.chrome.audioOutputCommandOverride } : {},
|
|
494
|
-
audioBridgeCommand: params.config.chrome.audioBridgeCommand,
|
|
495
|
-
audioBridgeHealthCommand: params.config.chrome.audioBridgeHealthCommand
|
|
496
|
-
},
|
|
497
|
-
timeoutMs: addTimerTimeoutGraceMs(params.config.chrome.joinTimeoutMs) ?? 1
|
|
498
|
-
}));
|
|
499
|
-
if (result.audioBridge?.type === "node-command-pair") {
|
|
500
|
-
if (!result.bridgeId) throw new Error("Google Meet node did not return an audio bridge id.");
|
|
501
|
-
const transport = createNodeMeetingRealtimeAudioTransport({
|
|
502
|
-
runtime: params.runtime,
|
|
503
|
-
nodeId,
|
|
504
|
-
bridgeId: result.bridgeId,
|
|
505
|
-
audioFormat: params.config.chrome.audioFormat,
|
|
506
|
-
logger: params.logger,
|
|
507
|
-
commandName: GOOGLE_MEET_NODE_COMMAND,
|
|
508
|
-
logScope: GOOGLE_MEET_PLATFORM_ADAPTER.logScope,
|
|
509
|
-
logPrefix: params.mode === "agent" ? "node agent" : "node"
|
|
510
|
-
});
|
|
511
|
-
Reflect.set(transport, Symbol.for("openclaw.internal.meeting-node-output-generation.v1"), result.audioBridge.outputGeneration === true);
|
|
512
|
-
const bindings = createMeetingRealtimeEngineBindings({
|
|
513
|
-
platform: GOOGLE_MEET_PLATFORM_ADAPTER,
|
|
514
|
-
...params
|
|
515
|
-
});
|
|
516
|
-
const engine = params.mode === "agent" ? await startMeetingAgentRealtimeEngine({
|
|
517
|
-
config: params.config,
|
|
518
|
-
fullConfig: params.fullConfig,
|
|
519
|
-
runtime: params.runtime,
|
|
520
|
-
platform: bindings.platform,
|
|
521
|
-
meetingSessionId: params.meetingSessionId,
|
|
522
|
-
requesterSessionKey: params.requesterSessionKey,
|
|
523
|
-
logPrefix: "node",
|
|
524
|
-
transport,
|
|
525
|
-
logger: params.logger,
|
|
526
|
-
consultAgent: bindings.consultAgent
|
|
527
|
-
}) : await startMeetingRealtimeEngine({
|
|
528
|
-
config: {
|
|
529
|
-
...params.config,
|
|
530
|
-
realtime: {
|
|
531
|
-
...params.config.realtime,
|
|
532
|
-
strategy: "bidi"
|
|
533
|
-
}
|
|
534
|
-
},
|
|
535
|
-
fullConfig: params.fullConfig,
|
|
536
|
-
runtime: params.runtime,
|
|
537
|
-
...bindings,
|
|
538
|
-
meetingSessionId: params.meetingSessionId,
|
|
539
|
-
requesterSessionKey: params.requesterSessionKey,
|
|
540
|
-
logPrefix: "node",
|
|
541
|
-
talkSessionId: `google-meet:${params.meetingSessionId}:${result.bridgeId}:node-realtime`,
|
|
542
|
-
talkContext: {
|
|
543
|
-
nodeId,
|
|
544
|
-
bridgeId: result.bridgeId
|
|
545
|
-
},
|
|
546
|
-
transport,
|
|
547
|
-
logger: params.logger
|
|
548
|
-
});
|
|
549
|
-
const bridge = {
|
|
550
|
-
type: "node-command-pair",
|
|
551
|
-
nodeId,
|
|
552
|
-
bridgeId: result.bridgeId,
|
|
553
|
-
...engine
|
|
554
|
-
};
|
|
555
|
-
return {
|
|
556
|
-
nodeId,
|
|
557
|
-
launched: browserControl.launched || result.launched === true,
|
|
558
|
-
audioBackend: result.audioBackend ?? setup?.audioBackend,
|
|
559
|
-
audioBridge: bridge,
|
|
560
|
-
browser: browserControl.browser ?? result.browser,
|
|
561
|
-
tab: browserControl.tab
|
|
562
|
-
};
|
|
563
|
-
}
|
|
564
|
-
if (result.audioBridge?.type === "external-command") return {
|
|
565
|
-
nodeId,
|
|
566
|
-
launched: browserControl.launched || result.launched === true,
|
|
567
|
-
audioBackend: result.audioBackend ?? setup?.audioBackend,
|
|
568
|
-
audioBridge: { type: "external-command" },
|
|
569
|
-
browser: browserControl.browser ?? result.browser,
|
|
570
|
-
tab: browserControl.tab
|
|
571
|
-
};
|
|
572
|
-
return {
|
|
573
|
-
nodeId,
|
|
574
|
-
launched: browserControl.launched || result.launched === true,
|
|
575
|
-
audioBackend: result.audioBackend ?? setup?.audioBackend,
|
|
576
|
-
browser: browserControl.browser ?? result.browser,
|
|
577
|
-
tab: browserControl.tab
|
|
578
|
-
};
|
|
579
|
-
}
|
|
580
295
|
//#endregion
|
|
581
296
|
//#region extensions/google-meet/src/runtime-setup.ts
|
|
582
297
|
function collectChromeAudioCommands(config) {
|
package/dist/cli-metadata.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as GOOGLE_MEET_CLI_DESCRIPTOR } from "
|
|
1
|
+
import { t as GOOGLE_MEET_CLI_DESCRIPTOR } from "./.setup/cli-output-mode-BwH_6tH8.mjs";
|
|
2
2
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
3
3
|
//#region extensions/google-meet/cli-metadata.ts
|
|
4
4
|
var cli_metadata_default = definePluginEntry({
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as GOOGLE_MEET_CLI_DESCRIPTOR } from "
|
|
2
|
-
import { n as GOOGLE_MEET_NODE_COMMAND } from "
|
|
3
|
-
import { r as resolveGoogleMeetConfig } from "
|
|
4
|
-
import { a as createLazyGoogleMeetNodeInvokePolicy, c as loadGoogleMeetCliModule, d as normalizeMode, f as normalizeTransport, h as shouldJoinCreatedMeet, i as createGoogleMeetRuntimeAccessor, l as loadGoogleMeetNodeHostModule, m as sendGoogleMeetGatewayError, n as assertGoogleMeetAgentToolActionSupported, o as formatGoogleMeetGatewayError, p as resolveMeetingInput, r as callGoogleMeetGatewayFromTool, s as keepTrustedToolAgentId, t as asParamRecord, u as loadGoogleMeetPluginHelpers } from "
|
|
1
|
+
import { t as GOOGLE_MEET_CLI_DESCRIPTOR } from "./.setup/cli-output-mode-BwH_6tH8.mjs";
|
|
2
|
+
import { n as GOOGLE_MEET_NODE_COMMAND } from "./.setup/google-meet-platform-constants-Bs5iAg3E.mjs";
|
|
3
|
+
import { r as resolveGoogleMeetConfig } from "./.setup/config-C-6enWkx.mjs";
|
|
4
|
+
import { a as createLazyGoogleMeetNodeInvokePolicy, c as loadGoogleMeetCliModule, d as normalizeMode, f as normalizeTransport, h as shouldJoinCreatedMeet, i as createGoogleMeetRuntimeAccessor, l as loadGoogleMeetNodeHostModule, m as sendGoogleMeetGatewayError, n as assertGoogleMeetAgentToolActionSupported, o as formatGoogleMeetGatewayError, p as resolveMeetingInput, r as callGoogleMeetGatewayFromTool, s as keepTrustedToolAgentId, t as asParamRecord, u as loadGoogleMeetPluginHelpers } from "./.setup/plugin-registration-CfZbUMDY.mjs";
|
|
5
5
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { jsonResult } from "openclaw/plugin-sdk/tool-results";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
github: Stuk
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: Set up workspace
|
|
2
|
+
description: Sets up the workspace by installing Node.js and dependencies.
|
|
3
|
+
|
|
4
|
+
inputs:
|
|
5
|
+
node-version:
|
|
6
|
+
description: The Node.js version to install.
|
|
7
|
+
required: false
|
|
8
|
+
default: "lts/*"
|
|
9
|
+
|
|
10
|
+
runs:
|
|
11
|
+
using: composite
|
|
12
|
+
steps:
|
|
13
|
+
- name: Install Node.js
|
|
14
|
+
uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
node-version: ${{ inputs.node-version }}
|
|
17
|
+
cache: npm
|
|
18
|
+
|
|
19
|
+
- name: Install dependencies
|
|
20
|
+
# Because the lockfile is not compatible between all supported Node.js versions we need to run `npm install`.
|
|
21
|
+
# When support for older versions of Node.js is dropped, this can be changed to `npm ci`.
|
|
22
|
+
run: npm install
|
|
23
|
+
shell: bash
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Benchmark
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
jobs:
|
|
6
|
+
benchmark:
|
|
7
|
+
name: Run benchmark
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- name: Checkout repository
|
|
11
|
+
uses: actions/checkout@v4
|
|
12
|
+
|
|
13
|
+
- name: Set up workspace
|
|
14
|
+
uses: ./.github/actions/setup
|
|
15
|
+
|
|
16
|
+
- name: Install browsers
|
|
17
|
+
run: npx playwright install --with-deps
|
|
18
|
+
|
|
19
|
+
- name: Run benchmark
|
|
20
|
+
run: npm run benchmark | tee benchmark.txt
|
|
21
|
+
|
|
22
|
+
- name: Download previous benchmark data
|
|
23
|
+
uses: actions/cache@v4
|
|
24
|
+
with:
|
|
25
|
+
path: ./cache
|
|
26
|
+
key: ${{ runner.os }}-benchmark
|
|
27
|
+
|
|
28
|
+
- name: Store benchmark result
|
|
29
|
+
uses: benchmark-action/github-action-benchmark@v1
|
|
30
|
+
with:
|
|
31
|
+
tool: benchmarkjs
|
|
32
|
+
output-file-path: benchmark.txt
|
|
33
|
+
external-data-json-path: ./cache/benchmark-data.json
|
|
34
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
35
|
+
alert-threshold: 150%
|
|
36
|
+
comment-on-alert: true
|
|
37
|
+
fail-on-alert: true
|
|
38
|
+
alert-comment-cc-users: "@Stuk"
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
pull_request:
|
|
6
|
+
branches: [main]
|
|
7
|
+
jobs:
|
|
8
|
+
lint:
|
|
9
|
+
name: Lint
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: Checkout repository
|
|
13
|
+
uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Set up workspace
|
|
16
|
+
uses: ./.github/actions/setup
|
|
17
|
+
|
|
18
|
+
- name: Run linter
|
|
19
|
+
run: npm run lint
|
|
20
|
+
|
|
21
|
+
test-node:
|
|
22
|
+
name: Test on Node.js ${{ matrix.node-version }}
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
strategy:
|
|
25
|
+
fail-fast: false
|
|
26
|
+
matrix:
|
|
27
|
+
node-version: [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]
|
|
28
|
+
steps:
|
|
29
|
+
- name: Checkout repository
|
|
30
|
+
uses: actions/checkout@v4
|
|
31
|
+
|
|
32
|
+
- name: Set up workspace
|
|
33
|
+
uses: ./.github/actions/setup
|
|
34
|
+
with:
|
|
35
|
+
node-version: ${{ matrix.node-version }}
|
|
36
|
+
|
|
37
|
+
- name: Run tests
|
|
38
|
+
run: npm run test-node
|
|
39
|
+
|
|
40
|
+
test-browser:
|
|
41
|
+
name: Test in browser
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
steps:
|
|
44
|
+
- name: Checkout repository
|
|
45
|
+
uses: actions/checkout@v4
|
|
46
|
+
|
|
47
|
+
- name: Set up workspace
|
|
48
|
+
uses: ./.github/actions/setup
|
|
49
|
+
|
|
50
|
+
- name: Install browsers
|
|
51
|
+
run: npx playwright install --with-deps
|
|
52
|
+
|
|
53
|
+
- name: Run tests
|
|
54
|
+
run: npm run test-browser
|
|
55
|
+
|
|
@@ -4,6 +4,12 @@ layout: default
|
|
|
4
4
|
section: main
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
### v3.10.2 2026-09-09
|
|
8
|
+
|
|
9
|
+
- Fix cross-realm binary type detection in `getTypeOf`. Fixes [#759](https://github.com/Stuk/jszip/issues/759) (see [#578](https://github.com/Stuk/jszip/pull/578))
|
|
10
|
+
- Add missing types for `JSZip.defaults`. Fixes [#690](https://github.com/Stuk/jszip/issues/690) (see [#927](https://github.com/Stuk/jszip/pull/927))
|
|
11
|
+
- Fix Blob support in Node.js 18 and up. Fixes [#941](https://github.com/Stuk/jszip/issues/941) (see [#955](https://github.com/Stuk/jszip/pull/955))
|
|
12
|
+
|
|
7
13
|
### v3.10.1 2022-08-02
|
|
8
14
|
|
|
9
15
|
- Add sponsorship files.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
|
|
3
|
-
JSZip v3.10.
|
|
3
|
+
JSZip v3.10.2 - A JavaScript class for generating and reading zip files
|
|
4
4
|
<http://stuartk.com/jszip>
|
|
5
5
|
|
|
6
6
|
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
|
|
@@ -1057,7 +1057,7 @@ JSZip.defaults = require("./defaults");
|
|
|
1057
1057
|
|
|
1058
1058
|
// TODO find a better way to handle this version,
|
|
1059
1059
|
// a require('package.json').version doesn't work with webpack, see #327
|
|
1060
|
-
JSZip.version = "3.10.
|
|
1060
|
+
JSZip.version = "3.10.2";
|
|
1061
1061
|
|
|
1062
1062
|
JSZip.loadAsync = function (content, options) {
|
|
1063
1063
|
return new JSZip().loadAsync(content, options);
|
|
@@ -3390,16 +3390,17 @@ exports.getTypeOf = function(input) {
|
|
|
3390
3390
|
if (typeof input === "string") {
|
|
3391
3391
|
return "string";
|
|
3392
3392
|
}
|
|
3393
|
-
|
|
3393
|
+
var proto = Object.prototype.toString.call(input);
|
|
3394
|
+
if (proto === "[object Array]") {
|
|
3394
3395
|
return "array";
|
|
3395
3396
|
}
|
|
3396
3397
|
if (support.nodebuffer && nodejsUtils.isBuffer(input)) {
|
|
3397
3398
|
return "nodebuffer";
|
|
3398
3399
|
}
|
|
3399
|
-
if (support.uint8array &&
|
|
3400
|
+
if (support.uint8array && proto === "[object Uint8Array]") {
|
|
3400
3401
|
return "uint8array";
|
|
3401
3402
|
}
|
|
3402
|
-
if (support.arraybuffer &&
|
|
3403
|
+
if (support.arraybuffer && proto === "[object ArrayBuffer]") {
|
|
3403
3404
|
return "arraybuffer";
|
|
3404
3405
|
}
|
|
3405
3406
|
};
|
|
@@ -3492,21 +3493,29 @@ exports.prepareContent = function(name, inputData, isBinary, isOptimizedBinarySt
|
|
|
3492
3493
|
|
|
3493
3494
|
var isBlob = support.blob && (data instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(data)) !== -1);
|
|
3494
3495
|
|
|
3495
|
-
if (isBlob
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3496
|
+
if (isBlob) {
|
|
3497
|
+
if (typeof Blob.prototype.arrayBuffer !== "undefined") {
|
|
3498
|
+
return data.arrayBuffer();
|
|
3499
|
+
} else if (typeof FileReader !== "undefined") {
|
|
3500
|
+
return new external.Promise(function (resolve, reject) {
|
|
3501
|
+
var reader = new FileReader();
|
|
3502
|
+
|
|
3503
|
+
reader.onload = function(e) {
|
|
3504
|
+
resolve(e.target.result);
|
|
3505
|
+
};
|
|
3506
|
+
reader.onerror = function(e) {
|
|
3507
|
+
reject(e.target.error);
|
|
3508
|
+
};
|
|
3509
|
+
reader.readAsArrayBuffer(data);
|
|
3510
|
+
});
|
|
3511
|
+
} else {
|
|
3512
|
+
return external.Promise.reject(
|
|
3513
|
+
new Error(name + " is a Blob, but we have no way of reading it.")
|
|
3514
|
+
);
|
|
3515
|
+
}
|
|
3509
3516
|
}
|
|
3517
|
+
|
|
3518
|
+
return data;
|
|
3510
3519
|
});
|
|
3511
3520
|
|
|
3512
3521
|
return promise.then(function(data) {
|