@snap/camera-kit 0.18.0 → 0.18.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.
- package/LICENSE.md +15 -393
- package/README.md +1 -1
- package/dist/environment.js +1 -1
- package/dist/environment.js.map +1 -1
- package/dist/extensions/RemoteApiServices.d.ts.map +1 -1
- package/dist/extensions/RemoteApiServices.js +7 -3
- package/dist/extensions/RemoteApiServices.js.map +1 -1
- package/dist/handlers/customLensCoreHandler.d.ts +8 -0
- package/dist/handlers/customLensCoreHandler.d.ts.map +1 -0
- package/dist/handlers/{debugHandler.js → customLensCoreHandler.js} +2 -8
- package/dist/handlers/customLensCoreHandler.js.map +1 -0
- package/dist/handlers/defaultFetchHandler.d.ts.map +1 -1
- package/dist/handlers/defaultFetchHandler.js +0 -2
- package/dist/handlers/defaultFetchHandler.js.map +1 -1
- package/dist/lens-core-module/generated-types.d.ts +5 -1
- package/dist/lens-core-module/generated-types.d.ts.map +1 -1
- package/dist/lens-core-module/generated-types.js.map +1 -1
- package/dist/lens-core-module/loader/lensCoreFactory.d.ts.map +1 -1
- package/dist/lens-core-module/loader/lensCoreFactory.js +7 -2
- package/dist/lens-core-module/loader/lensCoreFactory.js.map +1 -1
- package/dist/lensCoreWasmVersions.js +3 -3
- package/dist/lensCoreWasmVersions.js.map +1 -1
- package/docs/html/classes/CameraKit.html +2 -2
- package/docs/html/classes/CameraKitSession.html +2 -2
- package/docs/html/classes/CameraKitSource.html +2 -2
- package/docs/html/classes/LensPerformanceMeasurement.html +2 -2
- package/docs/html/classes/LensPerformanceMetrics.html +2 -2
- package/docs/html/classes/LensRepository.html +2 -2
- package/docs/html/classes/Transform2D.html +2 -2
- package/docs/html/classes/TypedCustomEvent.html +2 -2
- package/docs/html/classes/TypedEventTarget.html +2 -2
- package/docs/html/enums/Lens_CameraFacing.html +2 -2
- package/docs/html/functions/ConcatInjectable.html +2 -2
- package/docs/html/functions/Injectable.html +2 -2
- package/docs/html/functions/bootstrapCameraKit.html +2 -2
- package/docs/html/functions/createExtension.html +2 -2
- package/docs/html/functions/createImageSource.html +2 -2
- package/docs/html/functions/createMediaStreamSource.html +2 -2
- package/docs/html/functions/createVideoSource.html +2 -2
- package/docs/html/functions/estimateLensPerformance.html +2 -2
- package/docs/html/functions/lensSourcesFactory.html +2 -2
- package/docs/html/functions/remoteApiServicesFactory.html +2 -2
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/index.html +3 -3
- package/docs/html/interfaces/BitmojiUserInfo.html +2 -2
- package/docs/html/interfaces/CameraKitBootstrapConfiguration.html +2 -2
- package/docs/html/interfaces/CameraKitDeviceOptions.html +2 -2
- package/docs/html/interfaces/CameraKitSourceInfo.html +2 -2
- package/docs/html/interfaces/CameraKitSourceSubscriber.html +2 -2
- package/docs/html/interfaces/ComputedFrameMetrics.html +2 -2
- package/docs/html/interfaces/CreateSessionOptions.html +2 -2
- package/docs/html/interfaces/EstimatedLensPerformance.html +2 -2
- package/docs/html/interfaces/FriendUserInfo.html +2 -2
- package/docs/html/interfaces/FunctionSourceOptions.html +2 -2
- package/docs/html/interfaces/Lens.html +2 -2
- package/docs/html/interfaces/LensCreator.html +2 -2
- package/docs/html/interfaces/LensLaunchData.html +2 -2
- package/docs/html/interfaces/LensSource.html +2 -2
- package/docs/html/interfaces/LensUserData.html +2 -2
- package/docs/html/interfaces/LoadAssetRequest.html +2 -2
- package/docs/html/interfaces/MediaStreamSourceOptions.html +2 -2
- package/docs/html/interfaces/Preview.html +2 -2
- package/docs/html/interfaces/RemoteApiRequest.html +2 -2
- package/docs/html/interfaces/RemoteApiResponse.html +2 -2
- package/docs/html/interfaces/RemoteApiService.html +2 -2
- package/docs/html/interfaces/Snapcode.html +2 -2
- package/docs/html/interfaces/UriCancelRequest.html +2 -2
- package/docs/html/interfaces/UriRequest.html +2 -2
- package/docs/html/interfaces/UriResponse.html +2 -2
- package/docs/html/interfaces/VideoSourceOptions.html +2 -2
- package/docs/html/modules.html +2 -2
- package/docs/html/types/ArgumentValidationError.html +2 -2
- package/docs/html/types/AssetLoader.html +2 -2
- package/docs/html/types/AssetResponse.html +1 -1
- package/docs/html/types/AssetTiming.html +2 -2
- package/docs/html/types/BenchmarkError.html +1 -1
- package/docs/html/types/BootstrapError.html +2 -2
- package/docs/html/types/CacheKeyNotFoundError.html +1 -1
- package/docs/html/types/CameraKitSessionEventListener.html +2 -2
- package/docs/html/types/CameraKitSessionEvents.html +2 -2
- package/docs/html/types/CameraKitSourceError.html +1 -1
- package/docs/html/types/ConfigurationError.html +2 -2
- package/docs/html/types/FetchHandler.html +1 -1
- package/docs/html/types/Keyboard.html +2 -2
- package/docs/html/types/KeyboardEvents.html +2 -2
- package/docs/html/types/LegalError.html +1 -1
- package/docs/html/types/LensAbortError.html +2 -2
- package/docs/html/types/LensAssetError.html +2 -2
- package/docs/html/types/LensContentValidationError.html +1 -1
- package/docs/html/types/LensError.html +1 -1
- package/docs/html/types/LensExecutionError.html +2 -2
- package/docs/html/types/LensImagePickerError.html +2 -2
- package/docs/html/types/LensLaunchParams.html +2 -2
- package/docs/html/types/LensMetricsEvents.html +2 -2
- package/docs/html/types/LensPerformanceCluster.html +1 -1
- package/docs/html/types/LensView.html +2 -2
- package/docs/html/types/LensWait.html +2 -2
- package/docs/html/types/Matrix.html +2 -2
- package/docs/html/types/PersistentStoreError.html +2 -2
- package/docs/html/types/PlatformNotSupportedError.html +2 -2
- package/docs/html/types/PublicContainer.html +2 -2
- package/docs/html/types/PublicServices.html +2 -2
- package/docs/html/types/RemoteApiCancelRequestHandler.html +2 -2
- package/docs/html/types/RemoteApiRequestHandler.html +2 -2
- package/docs/html/types/RemoteApiServices.html +1 -1
- package/docs/html/types/RemoteApiStatus.html +2 -2
- package/docs/html/types/RenderTarget.html +2 -2
- package/docs/html/types/Uri.html +1 -1
- package/docs/html/types/WebGLError.html +1 -1
- package/docs/html/types/Zodiac.html +1 -1
- package/docs/html/variables/extensionRequestContext.html +2 -2
- package/docs/md/README.md +1 -1
- package/docs/md/classes/CameraKit.md +1 -1
- package/docs/md/classes/CameraKitSession.md +1 -1
- package/docs/md/classes/CameraKitSource.md +1 -1
- package/docs/md/classes/LensPerformanceMeasurement.md +1 -1
- package/docs/md/classes/LensPerformanceMetrics.md +1 -1
- package/docs/md/classes/LensRepository.md +1 -1
- package/docs/md/classes/Transform2D.md +1 -1
- package/docs/md/classes/TypedCustomEvent.md +1 -1
- package/docs/md/classes/TypedEventTarget.md +1 -1
- package/docs/md/enums/Lens_CameraFacing.md +1 -1
- package/docs/md/interfaces/BitmojiUserInfo.md +1 -1
- package/docs/md/interfaces/CameraKitBootstrapConfiguration.md +1 -1
- package/docs/md/interfaces/CameraKitDeviceOptions.md +1 -1
- package/docs/md/interfaces/CameraKitSourceInfo.md +1 -1
- package/docs/md/interfaces/CameraKitSourceSubscriber.md +1 -1
- package/docs/md/interfaces/ComputedFrameMetrics.md +1 -1
- package/docs/md/interfaces/CreateSessionOptions.md +1 -1
- package/docs/md/interfaces/EstimatedLensPerformance.md +1 -1
- package/docs/md/interfaces/FriendUserInfo.md +1 -1
- package/docs/md/interfaces/FunctionSourceOptions.md +1 -1
- package/docs/md/interfaces/Lens.md +1 -1
- package/docs/md/interfaces/LensCreator.md +1 -1
- package/docs/md/interfaces/LensLaunchData.md +1 -1
- package/docs/md/interfaces/LensSource.md +1 -1
- package/docs/md/interfaces/LensUserData.md +1 -1
- package/docs/md/interfaces/LoadAssetRequest.md +1 -1
- package/docs/md/interfaces/MediaStreamSourceOptions.md +1 -1
- package/docs/md/interfaces/Preview.md +1 -1
- package/docs/md/interfaces/RemoteApiRequest.md +1 -1
- package/docs/md/interfaces/RemoteApiResponse.md +1 -1
- package/docs/md/interfaces/RemoteApiService.md +1 -1
- package/docs/md/interfaces/Snapcode.md +1 -1
- package/docs/md/interfaces/UriCancelRequest.md +1 -1
- package/docs/md/interfaces/UriRequest.md +1 -1
- package/docs/md/interfaces/UriResponse.md +1 -1
- package/docs/md/interfaces/VideoSourceOptions.md +1 -1
- package/docs/md/modules.md +2 -2
- package/package.json +2 -2
- package/dist/handlers/debugHandler.d.ts +0 -9
- package/dist/handlers/debugHandler.d.ts.map +0 -1
- package/dist/handlers/debugHandler.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteApiServices.js","sourceRoot":"","sources":["../../src/extensions/RemoteApiServices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,mEAAmE,CAAC;AAKvH,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AActD,MAAM,MAAM,GAAG,SAAS,CAAC,mBAAmB,CAAC,CAAC;AAE9C,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AACtD,MAAM,oBAAoB,GAAG,0BAA0B,CAAC;AACxD,MAAM,4BAA4B,GAAG,kEAAkE,CAAC;AAExG,MAAM,uBAAuB,GAGzB;IACA,OAAO,EAAE,YAAY,CAAC,OAAO;IAC7B,UAAU,EAAE,YAAY,CAAC,UAAU;IACnC,UAAU,EAAE,YAAY,CAAC,WAAW;IACpC,YAAY,EAAE,YAAY,CAAC,aAAa;IACxC,QAAQ,EAAE,YAAY,CAAC,S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QACH,GAAG,EAAE,oCAAoC;QAEzC,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI;YAC9B,WAAW,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/C,CAAC;QAED,aAAa,CAAC,OAAO,EAAE,IAAI;YACvB,iBAAiB,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9C,CAAC;KACJ,CAAC;AACN,CAAC","sourcesContent":["import { Subject, catchError, filter, map, merge, retry, takeUntil, tap } from \"rxjs\";\nimport { forActions } from \"@snap/state-management\";\nimport { Injectable } from \"../dependency-injection/Injectable\";\nimport { RemoteApiInfo } from \"../generated-proto/pb_schema/camera_kit/v3/features/remote_api_info\";\nimport { ResponseCode, responseCodeToNumber } from \"../generated-proto/pb_schema/lenses/remote_api/remote_api_service\";\nimport type { LensRepository } from \"../lens/LensRepository\";\nimport type { Lens } from \"../lens/Lens\";\nimport type { LensState } from \"../session/lensState\";\nimport type { SessionState } from \"../session/sessionState\";\nimport { getLogger } from \"../logger/logger\";\nimport type { EnumToPublicStringLiteralMap, ExcludeKeys } from \"../common/types\";\nimport type { MetricsClient } from \"../clients/metricsClient\";\nimport { Count } from \"../metrics/operational/Count\";\nimport { joinMetricNames } from \"../metrics/operational/Metric\";\nimport type { UriCancelRequest, UriHandler, UriRequest, UriResponse } from \"./UriHandlers\";\nimport { extractSchemeAndRoute } from \"./UriHandlers\";\n\n// NOTE: There's potential for overloads when reporting metrics if reporting is triggered on each frame,\n// (i.e., when the lens sends Remote API requests every frame).\n// As of now, this isn't a concern because src/metrics/operational/operationalMetricsReporter.ts aggregates\n// \"count\" metrics into a single metric within a batch, and the Remote API service currently\n// reports only \"count\" metrics. For instance, if 30 metrics with the same name are generated per second,\n// given the current bundle size of 100 operational metrics, there will be one metrics report approximately\n// every 3.3 seconds.\n// In the future, if we opt to report \"histogram\" or other metric types, they must be approached with caution:\n// either the operationalMetricsReporter should be enhanced to aggregate such metrics,\n// or the Remote API service should manage it directly.\n// Mobiles ticket: https://jira.sc-corp.net/browse/CAMKIT-3092\n\nconst logger = getLogger(\"RemoteApiServices\");\n\nconst uriResponseOkCode = 200;\nconst apiResponseStatusHeader = \":sc_lens_api_status\";\nconst apiBinaryContentType = \"application/octet-stream\";\nconst remoteApiInfoProtobufTypeUrl = \"type.googleapis.com/com.snap.camerakit.v3.features.RemoteApiInfo\";\n\nconst statusToResponseCodeMap: ExcludeKeys<\n EnumToPublicStringLiteralMap<typeof ResponseCode>,\n \"responseCodeUnset\" | \"unrecognized\"\n> = {\n success: ResponseCode.SUCCESS,\n redirected: ResponseCode.REDIRECTED,\n badRequest: ResponseCode.BAD_REQUEST,\n accessDenied: ResponseCode.ACCESS_DENIED,\n notFound: ResponseCode.NOT_FOUND,\n timeout: ResponseCode.TIMEOUT,\n requestTooLarge: ResponseCode.REQUEST_TOO_LARGE,\n serverError: ResponseCode.SERVER_ERROR,\n cancelled: ResponseCode.CANCELLED,\n proxyError: ResponseCode.PROXY_ERROR,\n // NOTE: This rule helps keep the public-facing RemoteApiStatus type consistent with the proto.\n // We prefer using a separate type for TypeDoc purposes.\n} satisfies Record<RemoteApiStatus, ResponseCode>;\n\ntype LensId = string;\ntype RequestId = string;\n\ntype UriRequestEvent = {\n request: UriRequest;\n reply: (response: UriResponse) => void;\n lens: Lens;\n};\n\ntype UriCancelRequestEvent = {\n request: UriCancelRequest;\n lens: Lens;\n};\n\ninterface LensRequestState {\n cancellationHandlers: Map<RequestId, RemoteApiCancelRequestHandler>;\n supportedSpecIds: Set<string>;\n}\n\n/**\n * Invokes the cancellation handler associated with the provided key and removes it from the collection of handlers.\n */\nfunction callCancellationHandler(\n cancellationHandlers: Map<RequestId, RemoteApiCancelRequestHandler>,\n ...keys: RequestId[]\n) {\n for (const key of keys) {\n cancellationHandlers.get(key)?.();\n cancellationHandlers.delete(key);\n }\n}\n\n/**\n * Removes the specified lenses' metadata from the cache and invokes their cancellation callbacks.\n *\n * @param lensRequestState The state representing the lens cache.\n * @param lensIds An array of lens IDs to be removed from the cache\n * and for which the cancellation callbacks will be invoked.\n */\nfunction handleLensApplicationEnd(lensRequestState: Map<LensId, LensRequestState>, ...lensIds: LensId[]) {\n for (const lensId of lensIds) {\n const state = lensRequestState.get(lensId);\n if (state) {\n callCancellationHandler(state.cancellationHandlers, ...state.cancellationHandlers.keys());\n lensRequestState.delete(lensId);\n }\n }\n}\n\n/**\n * Status of a Remote API response.\n */\nexport type RemoteApiStatus =\n | \"success\"\n | \"redirected\"\n | \"badRequest\"\n | \"accessDenied\"\n | \"notFound\"\n | \"timeout\"\n | \"requestTooLarge\"\n | \"serverError\"\n | \"cancelled\"\n | \"proxyError\";\n\n/**\n * Remote API request sent by a lens.\n */\nexport interface RemoteApiRequest {\n /**\n * Unique id of the remote API service specification.\n */\n apiSpecId: string;\n /**\n * Unique id of the remote API service endpoint requested by this request.\n */\n endpointId: string;\n /**\n * A map of named parameters associated with the request.\n */\n parameters: Record<string, string>;\n /**\n * Additional binary request payload.\n */\n body: ArrayBuffer;\n}\n\n/**\n * Remote API response to a request sent by a lens.\n */\nexport interface RemoteApiResponse {\n /**\n * Status of the response\n */\n status: RemoteApiStatus;\n /**\n * A map of named metadata associated with the response.\n */\n metadata: Record<string, string>;\n /**\n * Additional binary request payload.\n */\n body: ArrayBuffer;\n}\n\n/**\n * Represents a Remote API request cancellation handler function.\n */\nexport type RemoteApiCancelRequestHandler = () => void;\n\n/**\n * Represents a Remote API request handler function.\n * It is provided with a reply callback that must be invoked to send a response back to the lens.\n * The reply callback can be invoked multiple times if needed.\n * Additionally, the handler can return a cancellation callback, which is triggered when the lens cancels the request.\n */\nexport type RemoteApiRequestHandler = (\n reply: (response: RemoteApiResponse) => void\n) => RemoteApiCancelRequestHandler | void;\n\n/**\n * Service to handle a lens Remote API request.\n */\nexport interface RemoteApiService {\n /**\n * Remote API spec ID(s).\n */\n apiSpecId: string;\n\n /**\n * This method is called by Camera Kit when a lens triggers a Remote API request with a corresponding spec ID.\n * If the service can handle the request, the method returns a request handler; otherwise, it returns nothing.\n * @param request Remote API request object.\n * @param lens Lens that triggers the request.\n * @returns A request handler if applicable.\n */\n getRequestHandler(request: RemoteApiRequest, lens: Lens): RemoteApiRequestHandler | undefined;\n}\n\nexport type RemoteApiServices = RemoteApiService[];\n\nexport const remoteApiServicesFactory = Injectable(\"remoteApiServices\", () => {\n const remoteApiServices: RemoteApiServices = [];\n return remoteApiServices;\n});\n\n/**\n * Provides a URI handler that searches for a match within the provided services to handle Remote API requests,\n * i.e., those whose URI starts with 'app://remote-api/performApiRequest'.\n */\nexport function getRemoteApiUriHandler(\n registeredServices: RemoteApiService[],\n sessionState: SessionState,\n lensState: LensState,\n lensRepository: LensRepository,\n metrics: MetricsClient\n): UriHandler {\n // Groups services by spec ID for faster lookups.\n const registeredServiceMap = new Map<string, RemoteApiService[]>();\n for (const service of registeredServices) {\n const existingServices = registeredServiceMap.get(service.apiSpecId) || [];\n registeredServiceMap.set(service.apiSpecId, [...existingServices, service]);\n }\n\n const uriRequests = new Subject<UriRequestEvent>();\n const uriCancelRequests = new Subject<UriCancelRequestEvent>();\n const lensRequestState = new Map<LensId, LensRequestState>();\n\n const lensTurnOffEvents = lensState.events.pipe(\n forActions(\"turnedOff\"),\n\n tap(([action]) => handleLensApplicationEnd(lensRequestState, action.data.id))\n );\n\n const uriRequestEvents = uriRequests.pipe(\n map((uriRequest) => {\n const lensId = uriRequest.lens.id;\n\n if (!lensRequestState.has(lensId)) {\n lensRequestState.set(lensId, {\n // Prepares a collection to store cancellation handlers.\n // A specific handler will be invoked when a cancellation request is issued by the lens.\n // All handlers will be invoked when the lens is replaced with another one or the session\n // is destroyed.\n cancellationHandlers: new Map(),\n // Parse lens metadata to obtain supported Remote API specs.\n supportedSpecIds: new Set(\n (lensRepository.getLensMetadata(lensId)?.featureMetadata ?? [])\n .filter((feature) => feature.typeUrl === remoteApiInfoProtobufTypeUrl)\n .flatMap((any) => RemoteApiInfo.decode(any.value).apiSpecIds)\n ),\n });\n }\n const requestState = lensRequestState.get(lensId)!;\n\n // Extracts the spec ID and endpoint ID from the provided Remote API request URI.\n // The given URI is expected to conform to the following specification:\n // eslint-disable-next-line max-len\n // https://docs.google.com/document/d/18fbGYDhD2N_aMTe4ZLY4QKeCSoMeJuklG28TutDzLZc/edit#bookmark=id.p2y39gwgbm4g\n const { route } = extractSchemeAndRoute(uriRequest.request.uri);\n const [specId, endpointIdWithQuery] = route.split(\"/\").slice(2);\n const [endpointId] = endpointIdWithQuery.split(\"?\");\n\n return { uriRequest, specId, endpointId, requestState };\n }),\n\n // only handle requests for API spec ID that current lens supports\n filter(({ specId, requestState }) => requestState.supportedSpecIds.has(specId)),\n\n // only handle requests if we have a registered service for it\n filter(({ specId }) => registeredServiceMap.has(specId)),\n\n map(({ uriRequest, specId, endpointId, requestState }) => {\n const dimensions = { specId };\n const reportSingleCount = (name: string) => {\n metrics.setOperationalMetrics(\n Count.count(joinMetricNames([\"lens\", \"remote-api\", name]), 1, dimensions)\n );\n };\n\n reportSingleCount(\"requests\");\n\n const remoteApiRequest: RemoteApiRequest = {\n apiSpecId: specId,\n body: uriRequest.request.data,\n endpointId,\n parameters: uriRequest.request.metadata,\n };\n\n // Looks for the first Remote API request handler.\n for (const service of registeredServiceMap.get(specId) ?? []) {\n let requestHandler: RemoteApiRequestHandler | undefined = undefined;\n try {\n requestHandler = service.getRequestHandler(remoteApiRequest, uriRequest.lens);\n } catch (error) {\n logger.warn(\"Client's Remote API request handler factory threw an error.\", error);\n }\n\n if (requestHandler) {\n reportSingleCount(\"handled-requests\");\n\n let cancellationHandler: RemoteApiCancelRequestHandler | void = undefined;\n try {\n // Calls client's Remote API handler to process the request.\n cancellationHandler = requestHandler((response) => {\n reportSingleCount(\"responses\");\n\n const responseCode = statusToResponseCodeMap[response.status] ?? ResponseCode.UNRECOGNIZED;\n const uriResponse: UriResponse = {\n code: uriResponseOkCode,\n description: \"\",\n contentType: apiBinaryContentType,\n data: response.body,\n metadata: {\n ...response.metadata,\n [apiResponseStatusHeader]: responseCodeToNumber(responseCode).toString(),\n },\n };\n uriRequest.reply(uriResponse);\n });\n } catch (error) {\n logger.warn(\"Client's Remote API request handler threw an error.\", error);\n }\n\n if (typeof cancellationHandler === \"function\") {\n requestState.cancellationHandlers.set(uriRequest.request.identifier, () => {\n try {\n cancellationHandler!();\n } catch (error) {\n logger.warn(\"Client's Remote API request cancellation handler threw an error.\", error);\n }\n });\n }\n\n break;\n }\n }\n })\n );\n\n const uriCancelRequestEvents = uriCancelRequests.pipe(\n tap((uriRequest) => {\n const cancellationHandlers = lensRequestState.get(uriRequest.lens.id)?.cancellationHandlers;\n if (cancellationHandlers) {\n callCancellationHandler(cancellationHandlers, uriRequest.request.requestId);\n }\n })\n );\n\n merge(lensTurnOffEvents, uriRequestEvents, uriCancelRequestEvents)\n .pipe(\n catchError((error, sourcePipe) => {\n // The expectation is that if an error occurs, it happens in our own implementation,\n // because app callbacks are wrapped with try..catch blocks.\n // Therefore, we would like to report this error.\n logger.error(error);\n metrics.setOperationalMetrics(Count.count(joinMetricNames([\"lens\", \"remote-api\", \"errors\"]), 1));\n // Return the source pipe so that we can retry the pipe instead of just completing it.\n return sourcePipe;\n }),\n // When the pipe completes due to an error,\n // we want to resubscribe to the original pipe to keep it alive.\n retry(),\n takeUntil(sessionState.events.pipe(forActions(\"destroy\")))\n )\n .subscribe({\n complete: () => handleLensApplicationEnd(lensRequestState, ...lensRequestState.keys()),\n });\n\n return {\n uri: \"app://remote-api/performApiRequest\",\n\n handleRequest(request, reply, lens) {\n uriRequests.next({ request, reply, lens });\n },\n\n cancelRequest(request, lens) {\n uriCancelRequests.next({ request, lens });\n },\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"RemoteApiServices.js","sourceRoot":"","sources":["../../src/extensions/RemoteApiServices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE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C,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9C,CAAC;KACJ,CAAC;AACN,CAAC","sourcesContent":["import { Subject, catchError, filter, map, merge, retry, takeUntil, tap } from \"rxjs\";\nimport { forActions } from \"@snap/state-management\";\nimport { Injectable } from \"../dependency-injection/Injectable\";\nimport { RemoteApiInfo } from \"../generated-proto/pb_schema/camera_kit/v3/features/remote_api_info\";\nimport { ResponseCode, responseCodeToNumber } from \"../generated-proto/pb_schema/lenses/remote_api/remote_api_service\";\nimport type { LensRepository } from \"../lens/LensRepository\";\nimport type { Lens } from \"../lens/Lens\";\nimport type { LensState } from \"../session/lensState\";\nimport type { SessionState } from \"../session/sessionState\";\nimport { getLogger } from \"../logger/logger\";\nimport type { EnumToPublicStringLiteralMap, ExcludeKeys } from \"../common/types\";\nimport type { MetricsClient } from \"../clients/metricsClient\";\nimport { Count } from \"../metrics/operational/Count\";\nimport { joinMetricNames } from \"../metrics/operational/Metric\";\nimport type { UriCancelRequest, UriHandler, UriRequest, UriResponse } from \"./UriHandlers\";\nimport { extractSchemeAndRoute } from \"./UriHandlers\";\n\n// NOTE: There's potential for overloads when reporting metrics if reporting is triggered on each frame,\n// (i.e., when the lens sends Remote API requests every frame).\n// As of now, this isn't a concern because src/metrics/operational/operationalMetricsReporter.ts aggregates\n// \"count\" metrics into a single metric within a batch, and the Remote API service currently\n// reports only \"count\" metrics. For instance, if 30 metrics with the same name are generated per second,\n// given the current bundle size of 100 operational metrics, there will be one metrics report approximately\n// every 3.3 seconds.\n// In the future, if we opt to report \"histogram\" or other metric types, they must be approached with caution:\n// either the operationalMetricsReporter should be enhanced to aggregate such metrics,\n// or the Remote API service should manage it directly.\n// Mobiles ticket: https://jira.sc-corp.net/browse/CAMKIT-3092\n\nconst logger = getLogger(\"RemoteApiServices\");\n\nconst uriResponseOkCode = 200;\nconst apiResponseStatusHeader = \":sc_lens_api_status\";\nconst apiBinaryContentType = \"application/octet-stream\";\nconst remoteApiInfoProtobufTypeUrl = \"type.googleapis.com/com.snap.camerakit.v3.features.RemoteApiInfo\";\nconst remoteApiUploadImageSpecId = \"af3f69c8-2e62-441f-8b1c-d3956f7b336c\";\n\nconst statusToResponseCodeMap: ExcludeKeys<\n EnumToPublicStringLiteralMap<typeof ResponseCode>,\n \"responseCodeUnset\" | \"unrecognized\"\n> = {\n success: ResponseCode.SUCCESS,\n redirected: ResponseCode.REDIRECTED,\n badRequest: ResponseCode.BAD_REQUEST,\n accessDenied: ResponseCode.ACCESS_DENIED,\n notFound: ResponseCode.NOT_FOUND,\n timeout: ResponseCode.TIMEOUT,\n requestTooLarge: ResponseCode.REQUEST_TOO_LARGE,\n serverError: ResponseCode.SERVER_ERROR,\n cancelled: ResponseCode.CANCELLED,\n proxyError: ResponseCode.PROXY_ERROR,\n // NOTE: This rule helps keep the public-facing RemoteApiStatus type consistent with the proto.\n // We prefer using a separate type for TypeDoc purposes.\n} satisfies Record<RemoteApiStatus, ResponseCode>;\n\ntype LensId = string;\ntype RequestId = string;\n\ntype UriRequestEvent = {\n request: UriRequest;\n reply: (response: UriResponse) => void;\n lens: Lens;\n};\n\ntype UriCancelRequestEvent = {\n request: UriCancelRequest;\n lens: Lens;\n};\n\ninterface LensRequestState {\n cancellationHandlers: Map<RequestId, RemoteApiCancelRequestHandler>;\n supportedSpecIds: Set<string>;\n}\n\n/**\n * Invokes the cancellation handler associated with the provided key and removes it from the collection of handlers.\n */\nfunction callCancellationHandler(\n cancellationHandlers: Map<RequestId, RemoteApiCancelRequestHandler>,\n ...keys: RequestId[]\n) {\n for (const key of keys) {\n cancellationHandlers.get(key)?.();\n cancellationHandlers.delete(key);\n }\n}\n\n/**\n * Removes the specified lenses' metadata from the cache and invokes their cancellation callbacks.\n *\n * @param lensRequestState The state representing the lens cache.\n * @param lensIds An array of lens IDs to be removed from the cache\n * and for which the cancellation callbacks will be invoked.\n */\nfunction handleLensApplicationEnd(lensRequestState: Map<LensId, LensRequestState>, ...lensIds: LensId[]) {\n for (const lensId of lensIds) {\n const state = lensRequestState.get(lensId);\n if (state) {\n callCancellationHandler(state.cancellationHandlers, ...state.cancellationHandlers.keys());\n lensRequestState.delete(lensId);\n }\n }\n}\n\n/**\n * Status of a Remote API response.\n */\nexport type RemoteApiStatus =\n | \"success\"\n | \"redirected\"\n | \"badRequest\"\n | \"accessDenied\"\n | \"notFound\"\n | \"timeout\"\n | \"requestTooLarge\"\n | \"serverError\"\n | \"cancelled\"\n | \"proxyError\";\n\n/**\n * Remote API request sent by a lens.\n */\nexport interface RemoteApiRequest {\n /**\n * Unique id of the remote API service specification.\n */\n apiSpecId: string;\n /**\n * Unique id of the remote API service endpoint requested by this request.\n */\n endpointId: string;\n /**\n * A map of named parameters associated with the request.\n */\n parameters: Record<string, string>;\n /**\n * Additional binary request payload.\n */\n body: ArrayBuffer;\n}\n\n/**\n * Remote API response to a request sent by a lens.\n */\nexport interface RemoteApiResponse {\n /**\n * Status of the response\n */\n status: RemoteApiStatus;\n /**\n * A map of named metadata associated with the response.\n */\n metadata: Record<string, string>;\n /**\n * Additional binary request payload.\n */\n body: ArrayBuffer;\n}\n\n/**\n * Represents a Remote API request cancellation handler function.\n */\nexport type RemoteApiCancelRequestHandler = () => void;\n\n/**\n * Represents a Remote API request handler function.\n * It is provided with a reply callback that must be invoked to send a response back to the lens.\n * The reply callback can be invoked multiple times if needed.\n * Additionally, the handler can return a cancellation callback, which is triggered when the lens cancels the request.\n */\nexport type RemoteApiRequestHandler = (\n reply: (response: RemoteApiResponse) => void\n) => RemoteApiCancelRequestHandler | void;\n\n/**\n * Service to handle a lens Remote API request.\n */\nexport interface RemoteApiService {\n /**\n * Remote API spec ID(s).\n */\n apiSpecId: string;\n\n /**\n * This method is called by Camera Kit when a lens triggers a Remote API request with a corresponding spec ID.\n * If the service can handle the request, the method returns a request handler; otherwise, it returns nothing.\n * @param request Remote API request object.\n * @param lens Lens that triggers the request.\n * @returns A request handler if applicable.\n */\n getRequestHandler(request: RemoteApiRequest, lens: Lens): RemoteApiRequestHandler | undefined;\n}\n\nexport type RemoteApiServices = RemoteApiService[];\n\nexport const remoteApiServicesFactory = Injectable(\"remoteApiServices\", () => {\n const remoteApiServices: RemoteApiServices = [];\n return remoteApiServices;\n});\n\n/**\n * Provides a URI handler that searches for a match within the provided services to handle Remote API requests,\n * i.e., those whose URI starts with 'app://remote-api/performApiRequest'.\n */\nexport function getRemoteApiUriHandler(\n registeredServices: RemoteApiService[],\n sessionState: SessionState,\n lensState: LensState,\n lensRepository: LensRepository,\n metrics: MetricsClient\n): UriHandler {\n // Groups services by spec ID for faster lookups.\n const registeredServiceMap = new Map<string, RemoteApiService[]>();\n for (const service of registeredServices) {\n const existingServices = registeredServiceMap.get(service.apiSpecId) || [];\n registeredServiceMap.set(service.apiSpecId, [...existingServices, service]);\n }\n\n const uriRequests = new Subject<UriRequestEvent>();\n const uriCancelRequests = new Subject<UriCancelRequestEvent>();\n const lensRequestState = new Map<LensId, LensRequestState>();\n\n const lensTurnOffEvents = lensState.events.pipe(\n forActions(\"turnedOff\"),\n\n tap(([action]) => handleLensApplicationEnd(lensRequestState, action.data.id))\n );\n\n const uriRequestEvents = uriRequests.pipe(\n map((uriRequest) => {\n const lensId = uriRequest.lens.id;\n\n if (!lensRequestState.has(lensId)) {\n lensRequestState.set(lensId, {\n // Prepares a collection to store cancellation handlers.\n // A specific handler will be invoked when a cancellation request is issued by the lens.\n // All handlers will be invoked when the lens is replaced with another one or the session\n // is destroyed.\n cancellationHandlers: new Map(),\n supportedSpecIds: new Set([\n // Parse lens metadata to obtain supported Remote API specs.\n ...(lensRepository.getLensMetadata(lensId)?.featureMetadata ?? [])\n .filter((feature) => feature.typeUrl === remoteApiInfoProtobufTypeUrl)\n .flatMap((any) => RemoteApiInfo.decode(any.value).apiSpecIds),\n // Also add remoteApiUploadImageSpecId as this spec should be available for all lenses.\n // See https://jira.sc-corp.net/browse/CAMKIT-6245.\n remoteApiUploadImageSpecId,\n ]),\n });\n }\n const requestState = lensRequestState.get(lensId)!;\n\n // Extracts the spec ID and endpoint ID from the provided Remote API request URI.\n // The given URI is expected to conform to the following specification:\n // eslint-disable-next-line max-len\n // https://docs.google.com/document/d/18fbGYDhD2N_aMTe4ZLY4QKeCSoMeJuklG28TutDzLZc/edit#bookmark=id.p2y39gwgbm4g\n const { route } = extractSchemeAndRoute(uriRequest.request.uri);\n const [specId, endpointIdWithQuery] = route.split(\"/\").slice(2);\n const [endpointId] = endpointIdWithQuery.split(\"?\");\n\n return { uriRequest, specId, endpointId, requestState };\n }),\n\n // only handle requests for API spec ID that current lens supports\n filter(({ specId, requestState }) => requestState.supportedSpecIds.has(specId)),\n\n // only handle requests if we have a registered service for it\n filter(({ specId }) => registeredServiceMap.has(specId)),\n\n map(({ uriRequest, specId, endpointId, requestState }) => {\n const dimensions = { specId };\n const reportSingleCount = (name: string) => {\n metrics.setOperationalMetrics(\n Count.count(joinMetricNames([\"lens\", \"remote-api\", name]), 1, dimensions)\n );\n };\n\n reportSingleCount(\"requests\");\n\n const remoteApiRequest: RemoteApiRequest = {\n apiSpecId: specId,\n body: uriRequest.request.data,\n endpointId,\n parameters: uriRequest.request.metadata,\n };\n\n // Looks for the first Remote API request handler.\n for (const service of registeredServiceMap.get(specId) ?? []) {\n let requestHandler: RemoteApiRequestHandler | undefined = undefined;\n try {\n requestHandler = service.getRequestHandler(remoteApiRequest, uriRequest.lens);\n } catch (error) {\n logger.warn(\"Client's Remote API request handler factory threw an error.\", error);\n }\n\n if (requestHandler) {\n reportSingleCount(\"handled-requests\");\n\n let cancellationHandler: RemoteApiCancelRequestHandler | void = undefined;\n try {\n // Calls client's Remote API handler to process the request.\n cancellationHandler = requestHandler((response) => {\n reportSingleCount(\"responses\");\n\n const responseCode = statusToResponseCodeMap[response.status] ?? ResponseCode.UNRECOGNIZED;\n const uriResponse: UriResponse = {\n code: uriResponseOkCode,\n description: \"\",\n contentType: apiBinaryContentType,\n data: response.body,\n metadata: {\n ...response.metadata,\n [apiResponseStatusHeader]: responseCodeToNumber(responseCode).toString(),\n },\n };\n uriRequest.reply(uriResponse);\n });\n } catch (error) {\n logger.warn(\"Client's Remote API request handler threw an error.\", error);\n }\n\n if (typeof cancellationHandler === \"function\") {\n requestState.cancellationHandlers.set(uriRequest.request.identifier, () => {\n try {\n cancellationHandler!();\n } catch (error) {\n logger.warn(\"Client's Remote API request cancellation handler threw an error.\", error);\n }\n });\n }\n\n break;\n }\n }\n })\n );\n\n const uriCancelRequestEvents = uriCancelRequests.pipe(\n tap((uriRequest) => {\n const cancellationHandlers = lensRequestState.get(uriRequest.lens.id)?.cancellationHandlers;\n if (cancellationHandlers) {\n callCancellationHandler(cancellationHandlers, uriRequest.request.requestId);\n }\n })\n );\n\n merge(lensTurnOffEvents, uriRequestEvents, uriCancelRequestEvents)\n .pipe(\n catchError((error, sourcePipe) => {\n // The expectation is that if an error occurs, it happens in our own implementation,\n // because app callbacks are wrapped with try..catch blocks.\n // Therefore, we would like to report this error.\n logger.error(error);\n metrics.setOperationalMetrics(Count.count(joinMetricNames([\"lens\", \"remote-api\", \"errors\"]), 1));\n // Return the source pipe so that we can retry the pipe instead of just completing it.\n return sourcePipe;\n }),\n // When the pipe completes due to an error,\n // we want to resubscribe to the original pipe to keep it alive.\n retry(),\n takeUntil(sessionState.events.pipe(forActions(\"destroy\")))\n )\n .subscribe({\n complete: () => handleLensApplicationEnd(lensRequestState, ...lensRequestState.keys()),\n });\n\n return {\n uri: \"app://remote-api/performApiRequest\",\n\n handleRequest(request, reply, lens) {\n uriRequests.next({ request, reply, lens });\n },\n\n cancelRequest(request, lens) {\n uriCancelRequests.next({ request, lens });\n },\n };\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ChainableHandler } from "./HandlerChainBuilder";
|
|
2
|
+
/**
|
|
3
|
+
* Adds cookies to auth requests to custom LensCore binaries.
|
|
4
|
+
*
|
|
5
|
+
* @returns {@link ChainableHandler}, suitable for use in {@link HandlerChainBuilder.map}
|
|
6
|
+
*/
|
|
7
|
+
export declare const createCustomLensCoreHandler: <Res>() => ChainableHandler<RequestInfo, Res, RequestInfo, Res, RequestInit | undefined>;
|
|
8
|
+
//# sourceMappingURL=customLensCoreHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customLensCoreHandler.d.ts","sourceRoot":"","sources":["../../src/handlers/customLensCoreHandler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,0FAoBvC,CAAC"}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { isString } from "../common/typeguards";
|
|
2
|
-
|
|
3
|
-
export const createDebugHandler = () => {
|
|
4
|
-
var _a;
|
|
5
|
-
const noCustomWasmEndpoint = !((_a = getConfigurationOverrides()) === null || _a === void 0 ? void 0 : _a.wasmEndpointOverride);
|
|
6
|
-
if (noCustomWasmEndpoint) {
|
|
7
|
-
return (next) => next;
|
|
8
|
-
}
|
|
2
|
+
export const createCustomLensCoreHandler = () => {
|
|
9
3
|
return (next) => (input, init) => {
|
|
10
4
|
var _a;
|
|
11
5
|
const url = isString(input) ? input : (_a = input === null || input === void 0 ? void 0 : input.url) !== null && _a !== void 0 ? _a : "";
|
|
@@ -15,4 +9,4 @@ export const createDebugHandler = () => {
|
|
|
15
9
|
return next(input, init);
|
|
16
10
|
};
|
|
17
11
|
};
|
|
18
|
-
//# sourceMappingURL=
|
|
12
|
+
//# sourceMappingURL=customLensCoreHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customLensCoreHandler.js","sourceRoot":"","sources":["../../src/handlers/customLensCoreHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAShD,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAMzC,EAAE;IACA,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;;QAC7B,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,GAAG,mCAAI,EAAE,CAAC;QAIvD,IAAI,GAAG,CAAC,UAAU,CAAC,qCAAqC,CAAC,EAAE;YACvD,OAAO,IAAI,CAAC,KAAK,kCACV,IAAI,KACP,WAAW,EAAE,SAAS,IACxB,CAAC;SACN;QACD,OAAO,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { isString } from \"../common/typeguards\";\nimport type { ChainableHandler } from \"./HandlerChainBuilder\";\nimport { HandlerChainBuilder } from \"./HandlerChainBuilder\";\n\n/**\n * Adds cookies to auth requests to custom LensCore binaries.\n *\n * @returns {@link ChainableHandler}, suitable for use in {@link HandlerChainBuilder.map}\n */\nexport const createCustomLensCoreHandler = <Res>(): ChainableHandler<\n RequestInfo,\n Res,\n RequestInfo,\n Res,\n RequestInit | undefined\n> => {\n return (next) => (input, init) => {\n const url = isString(input) ? input : input?.url ?? \"\";\n // if requests are made to internal LensCore binaries site\n // we have to include cookies for auth purposes\n // as per https://wiki.sc-corp.net/x/KsnRCg\n if (url.startsWith(\"https://lens-core-wasm.sc-corp.net/\")) {\n return next(input, {\n ...init,\n credentials: \"include\",\n });\n }\n return next(input, init);\n };\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultFetchHandler.d.ts","sourceRoot":"","sources":["../../src/handlers/defaultFetchHandler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"defaultFetchHandler.d.ts","sourceRoot":"","sources":["../../src/handlers/defaultFetchHandler.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,QAAQ,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;AAEhG;;;;;;;;GAQG;AAEH,eAAO,MAAM,0BAA0B;;;;CAsBrC,CAAC"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Injectable } from "../dependency-injection/Injectable";
|
|
2
|
-
import { createDebugHandler } from "./debugHandler";
|
|
3
2
|
import { HandlerChainBuilder } from "./HandlerChainBuilder";
|
|
4
3
|
import { createNoCorsRetryingFetchHandler } from "./noCorsRetryingFetchHandler";
|
|
5
4
|
import { createRetryingHandler } from "./retryingHandler";
|
|
6
5
|
import { createTimeoutHandler } from "./timeoutHandler";
|
|
7
6
|
export const defaultFetchHandlerFactory = Injectable("defaultFetchHandler", () => {
|
|
8
7
|
return (new HandlerChainBuilder(fetch)
|
|
9
|
-
.map(createDebugHandler())
|
|
10
8
|
.map(createTimeoutHandler({ timeout: 20 * 1000 }))
|
|
11
9
|
.map(createNoCorsRetryingFetchHandler())
|
|
12
10
|
.map(createRetryingHandler({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultFetchHandler.js","sourceRoot":"","sources":["../../src/handlers/defaultFetchHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"defaultFetchHandler.js","sourceRoot":"","sources":["../../src/handlers/defaultFetchHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,gCAAgC,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAcxD,MAAM,CAAC,MAAM,0BAA0B,GAAG,UAAU,CAAC,qBAAqB,EAAE,GAAiB,EAAE;IAC3F,OAAO,CACH,IAAI,mBAAmB,CAAC,KAAK,CAAC;SAGzB,GAAG,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;SACjD,GAAG,CAAC,gCAAgC,EAAE,CAAC;SACvC,GAAG,CACA,qBAAqB,CAAC;QAClB,UAAU,EAAE,CAAC;QACb,cAAc,EAAE,CAAC,eAAe,EAAE,EAAE;YAGhC,IAAI,eAAe,YAAY,QAAQ,EAAE;gBACrC,IAAI,eAAe,CAAC,EAAE;oBAAE,OAAO,KAAK,CAAC;gBACrC,IAAI,eAAe,CAAC,MAAM,GAAG,GAAG,GAAG,GAAG;oBAAE,OAAO,KAAK,CAAC;aACxD;YACD,OAAO,IAAI,CAAC;QAChB,CAAC;KACJ,CAAC,CACL,CAAC,OAAO,CAChB,CAAC;AACN,CAAC,CAAC,CAAC","sourcesContent":["import { Injectable } from \"../dependency-injection/Injectable\";\nimport { HandlerChainBuilder } from \"./HandlerChainBuilder\";\nimport { createNoCorsRetryingFetchHandler } from \"./noCorsRetryingFetchHandler\";\nimport { createRetryingHandler } from \"./retryingHandler\";\nimport { createTimeoutHandler } from \"./timeoutHandler\";\n\nexport type FetchHandler<R = Response> = (input: RequestInfo, init?: RequestInit) => Promise<R>;\n\n/**\n * The default Fetch implementation, used to make a simple HTTP requests without any custom headers. This can be passed\n * to `HandlerChainBuilder` to form the basis for other Fetch implementations (e.g. with custom headers, which extract\n * the Response body, etc.)\n *\n * Has support for retries, client-side timeout, and navigating federated auth flows that may not support CORs requests.\n *\n * @internal\n */\n\nexport const defaultFetchHandlerFactory = Injectable(\"defaultFetchHandler\", (): FetchHandler => {\n return (\n new HandlerChainBuilder(fetch)\n // The 20-second per-request timeout is pretty arbitrary, it's just set to be longer than our API gateway\n // timeout (15s) and lower than the browsers own timeout (variable, Chrome's is 5m).\n .map(createTimeoutHandler({ timeout: 20 * 1000 }))\n .map(createNoCorsRetryingFetchHandler())\n .map(\n createRetryingHandler({\n maxRetries: 3,\n retryPredicate: (responseOrError) => {\n // Don't retry successful Responses or Responses with a 4xx HTTP status code (indicating a\n // client error). Do retry all 5xx HTTP status codes.\n if (responseOrError instanceof Response) {\n if (responseOrError.ok) return false;\n if (responseOrError.status % 400 < 100) return false;\n }\n return true;\n },\n })\n ).handler\n );\n});\n"]}
|
|
@@ -52,6 +52,10 @@ export interface XrCapabilities {
|
|
|
52
52
|
sixDofSupported: boolean;
|
|
53
53
|
sceneDepthSupported: boolean;
|
|
54
54
|
}
|
|
55
|
+
export interface OnTurnOnParam {
|
|
56
|
+
needsAudioInput: boolean;
|
|
57
|
+
}
|
|
58
|
+
export type TurnOnEventHandler = (arg: OnTurnOnParam) => void;
|
|
55
59
|
export interface InitializeInput {
|
|
56
60
|
canvas?: HTMLCanvasElement | string;
|
|
57
61
|
outputResolution?: Dimensions;
|
|
@@ -153,7 +157,7 @@ export interface LensDescriptor {
|
|
|
153
157
|
lensChecksum: string;
|
|
154
158
|
lensPath?: string;
|
|
155
159
|
lensDataBuffer?: Uint8Array | ArrayBuffer;
|
|
156
|
-
onTurnOn?:
|
|
160
|
+
onTurnOn?: TurnOnEventHandler;
|
|
157
161
|
onTurnOff?: DefaultEventHandler;
|
|
158
162
|
onFirstFrameProcessed?: DefaultEventHandler;
|
|
159
163
|
onResourcesLoaded?: DefaultEventHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.d.ts","sourceRoot":"","sources":["../../src/lens-core-module/generated-types.ts"],"names":[],"mappings":";;AAAA,MAAM,MAAM,mBAAmB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;AAE3D,MAAM,MAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;AAE/D,MAAM,MAAM,iBAAiB,GAAG;IAAE,KAAK,EAAE,MAAM,CAA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AAK,IAAI,CAAC;IAClE,oBAAoB,EAAE,CAAC,MAAM,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAClE,8BAA8B,EAAE,CAAC,QAAQ,EAAE,2BAA2B,KAAK,IAAI,CAAC;IAChF,gCAAgC,EAAE,CAAC,QAAQ,EAAE,6BAA6B,KAAK,IAAI,CAAC;IACpF,yBAAyB,EAAE,CAAC,MAAM,EAAE,8BAA8B,KAAK,IAAI,CAAC;IAC5E,iBAAiB,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAC5D,cAAc,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACtD,cAAc,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACtD,kBAAkB,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAC9D,wBAAwB,EAAE,CAAC,MAAM,EAAE,6BAA6B,KAAK,IAAI,CAAC;IAC1E,yBAAyB,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACzF,uBAAuB,EAAE,CAAC,OAAO,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;CACnE;AAED,OAAO,CAAC,MAAM,CAAC;IAQX,SAAS,kBAAkB,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,GAAG,cAAc,CAAC,CAAC;CACnH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../src/lens-core-module/generated-types.ts"],"names":[],"mappings":"","sourcesContent":["export type DefaultEventHandler = (...data: any[]) => void;\n\nexport type DefaultErrorHandler = (err: LensCoreError) => void;\n\nexport type LensCoreEnumValue = { value: number };\n\nexport type GetOutputCanvasesOutput = Record<number, HTMLCanvasElement>;\n\nexport type SetRenderSizeInput = SetRenderSizeMatchInputResolutionInput | SetRenderSizeExplicitInput;\n\nexport type SetRemoteAssetsProviderInput = (assetDescriptor: AssetDescriptor) => void;\n\nexport type SetRemoteAssetsUploadHandlerInput = (assetUploadDescriptor: AssetUploadDescriptor) => void;\n\nexport type ContentType =\n | \"text/plain\"\n | \"text/html\"\n | \"application/json\"\n | \"application/octet-stream\"\n | \"application/x-protobuf\"\n | \"application/grpc\";\n\nexport type SavePersistentStoreCallback = (id: string, data: ArrayBuffer) => void;\n\nexport type ShowHintCallback = (effectId: string, hintId: string) => void;\n\nexport type HideHintCallback = (effectId: string) => void;\n\nexport type ReceiveInstanceCallback = (instance: WebAssembly.Instance, module: WebAssembly.Module) => void;\n\nexport type AssetType = LensCoreEnumValue;\n\nexport type CanvasType = LensCoreEnumValue;\n\nexport type RenderLoopMode = LensCoreEnumValue;\n\nexport type LensApiVisibility = LensCoreEnumValue;\n\nexport type DeviceClass = LensCoreEnumValue;\n\nexport type UserDataAccess = LensCoreEnumValue;\n\nexport type InterfaceControl = LensCoreEnumValue;\n\nexport type InterfaceAction = LensCoreEnumValue;\n\nexport type ExternalMediaOrientation = LensCoreEnumValue;\n\nexport type ErrorType = LensCoreEnumValue;\n\nexport type Uri = `${string}://${string}`;\n\nexport type Dimensions = { width: number; height: number };\n\nexport type Size2D = { width: number; height: number };\n\nexport type Vec2D = { x: number; y: number };\n\nexport type Rect = { origin: Vec2D; size: Size2D };\n\nexport interface ClearAllLensesInput {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface OnFrameProcessedParam {\n processingTimeMs: number;\n}\n\nexport interface XrCapabilities {\n sixDofSupported: boolean;\n sceneDepthSupported: boolean;\n}\n\nexport interface InitializeInput {\n canvas?: HTMLCanvasElement | string;\n outputResolution?: Dimensions;\n showFpsPanel?: boolean;\n shouldUseWorker?: boolean;\n onFrameProcessed?: (arg: OnFrameProcessedParam) => void;\n xrCapabilities?: XrCapabilities;\n onFailure?: DefaultErrorHandler;\n onSuccess?: DefaultEventHandler;\n exceptionHandler?: (error: LensCoreError) => void;\n}\n\nexport interface PlayCanvasInput {\n type: CanvasType;\n onReady?: () => void;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface PauseCanvasInput {\n type: CanvasType;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetFpsLimitInput {\n fps: number;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetInputTransformInput {\n matrix: Float32Array | ArrayBuffer;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetOnFrameProcessedInput {\n onFrameProcessed: (arg: OnFrameProcessedParam) => void;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderSizeMatchInputResolutionInput {\n mode: \"matchInputResolution\";\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderSizeExplicitInput {\n mode: \"explicit\";\n target: Dimensions;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderLoopInput {\n mode: RenderLoopMode;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface TeardownInput {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultEventHandler;\n}\n\nexport interface ReplayTrackingDataInput {\n buffer: Uint8Array | ArrayBuffer;\n}\n\nexport interface UseMediaElementInput {\n media?: HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | MediaStream;\n requestWebcam?: boolean;\n startOnFrontCamera?: boolean;\n mirrorMedia?: boolean;\n pauseExistingMedia?: boolean;\n autoplayNewMedia?: boolean;\n autoplayPreviewCanvas?: boolean;\n useManualFrameProcessing?: boolean;\n replayTrackingData?: ReplayTrackingDataInput;\n onFailure?: DefaultErrorHandler;\n onSuccess?: DefaultEventHandler;\n}\n\nexport interface UriListener {\n handleRequest: (request: UriRequest) => void;\n cancelRequest?: (request: UriCancelRequest) => void;\n}\n\nexport interface UriRequest {\n uri: Uri;\n identifier: string;\n method: \"GET\" | \"POST\";\n contentType: ContentType;\n data: ArrayBuffer;\n metadata: Record<string, string>;\n}\n\nexport interface UriResponse {\n code: number;\n description: string;\n contentType: ContentType;\n data: ArrayBuffer;\n metadata?: Record<string, string>;\n}\n\nexport interface UriCancelRequest {\n uri: Uri;\n requestId: string;\n}\n\nexport interface LensDescriptor {\n lensId: string;\n lensChecksum: string;\n lensPath?: string;\n lensDataBuffer?: Uint8Array | ArrayBuffer;\n onTurnOn?: DefaultEventHandler;\n onTurnOff?: DefaultEventHandler;\n onFirstFrameProcessed?: DefaultEventHandler;\n onResourcesLoaded?: DefaultEventHandler;\n launchData?: Uint8Array | ArrayBuffer;\n apiVisibility?: LensApiVisibility;\n publicApiUserDataAccess?: UserDataAccess;\n}\n\nexport interface AddLensInput extends LensDescriptor {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface ReplaceLensesInput {\n lenses: LensDescriptor | Array<LensDescriptor>;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface RemoveLensInput {\n lensId: string;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface AssetDescriptor {\n assetId: string;\n assetType: AssetType;\n avatarId?: string;\n effectId?: string;\n encryptionKey?: ArrayBuffer;\n}\n\nexport interface AssetUploadDescriptor {\n requestId: number;\n assetId: string;\n assetType: AssetType;\n effectId: string;\n assetBuffer: ArrayBuffer;\n encryptionKey?: ArrayBuffer;\n encryptionIv?: ArrayBuffer;\n assetBatchId?: string;\n}\n\nexport interface ProvideRemoteAssetsResponseInput {\n assetId: string;\n assetType: AssetType;\n assetBuffer?: ArrayBuffer;\n assetChecksum?: string;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface ProvideRemoteAssetsUploadResponseInput {\n requestId: number;\n success: boolean;\n assetUrl?: string;\n assetUploadMetadata?: ArrayBuffer;\n}\n\nexport interface XRInput {\n layer: XRWebGLLayer;\n binding: XRWebGLBinding;\n frame: XRFrame;\n referenceSpace: XRReferenceSpace;\n}\n\nexport interface ProcessFrameInput {\n inputFrame: ImageBitmap | HTMLCanvasElement | HTMLImageElement | VideoFrame | XRInput;\n timestampMillis: number;\n renderTimestampMillis?: number;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface LensCoreError extends Error {\n otherExceptions?: Array<Error>;\n cause: { type: ErrorType; metadata?: any };\n}\n\nexport interface ImageToYuvBufferInput {\n image: Uint8Array | ArrayBuffer | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap;\n width: number;\n height: number;\n outputBuffer?: Uint8Array | ArrayBuffer;\n onSuccess: (buffer: ArrayBuffer) => void;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface YuvBufferToBitmapInput {\n buffer: Uint8Array | ArrayBuffer;\n width: number;\n height: number;\n targetWidth?: number;\n targetHeight?: number;\n preserveCanvasState?: boolean;\n allowBufferTransfer?: boolean;\n onSuccess: (bitmap: ImageBitmap) => void;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetInterfaceControlVisibilityInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n visibility: boolean;\n}\n\nexport interface HandleClientInterfaceActionInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n interfaceAction: InterfaceAction;\n}\n\nexport interface ProvideExternalImageInput {\n data: Uint8Array | ArrayBuffer;\n orientation: ExternalMediaOrientation;\n faceRects?: Array<Rect>;\n}\n\nexport interface ProvideExternalVideoInput {\n data: Uint8Array | ArrayBuffer;\n orientation: ExternalMediaOrientation;\n relStartPosition?: number;\n relEndPosition?: number;\n volume?: number;\n}\n\nexport interface ScreenDimmingRequestInput {\n effectId: string;\n enabled: boolean;\n}\n\nexport type ScreenDimmingRequestHandler = (config: ScreenDimmingRequestInput) => void;\n\nexport interface ClientInterfaceData {\n HeaderId?: string;\n DescriptionId?: string;\n FaceFilteringEnabled?: \"0\" | \"1\";\n FaceFilteringMultipleFaces?: \"0\" | \"1\";\n ImageEnabled?: \"0\" | \"1\";\n VideoEnabled?: \"0\" | \"1\";\n}\n\nexport interface ClientInterfaceRequestInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n interfaceAction: InterfaceAction;\n data: ClientInterfaceData;\n}\n\nexport type ClientInterfaceRequestHandler = (config: ClientInterfaceRequestInput) => void;\n\nexport interface LensCoreConfig {\n configId: string;\n value:\n | { stringValue: string }\n | { boolValue: boolean }\n | { intValue: number }\n | { longValue: number }\n | { floatValue: number }\n | {\n anyValue: {\n typeUrl: string;\n value: Uint8Array | ArrayBuffer;\n };\n };\n}\n\nexport type SetPreloadedConfigurationInput = Array<LensCoreConfig>;\n\nexport interface SetAllSoundsMutedInput {\n muted: boolean;\n fade: boolean;\n}\n\nexport interface SetDeviceClassInput {\n deviceClass: DeviceClass;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetAudioParametersInput {\n parameters: {\n numChannels?: number;\n sampleRate?: number;\n };\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SystemFont {\n name: string;\n data: Uint8Array | ArrayBuffer;\n}\n\nexport interface SetSystemFontsInput {\n fonts: SystemFont[]\n}\n\nexport interface ProcessAudioSampleBufferInput {\n input: Float32Array[] | ArrayBuffer[];\n output?: Float32Array[] | ArrayBuffer[];\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface BeginWebXrInput {\n glContext: WebGL2RenderingContext;\n requestConfig: {\n requiredFeatures?: string[]\n }\n}\n\nexport interface InitialEmscriptenModule {\n mainScriptUrlOrBlob: string;\n compiledModule?: WebAssembly.Module;\n pthreadWorkerScriptUrl?: string;\n instantiateWasm?: (importObject: WebAssembly.Imports, receiveInstance: ReceiveInstanceCallback) => void;\n print?: (text: string) => void;\n printErr?: (text: string) => void;\n}\n\nexport interface LensCoreModule extends InitialEmscriptenModule {\n AssetType: {\n RemoteMediaByUrl: AssetType;\n DeviceDependent: AssetType;\n Static: AssetType;\n URL: AssetType;\n BitmojiDynamicAsset: AssetType;\n };\n\n CanvasType: {\n None: CanvasType;\n Preview: CanvasType;\n Capture: CanvasType;\n All: CanvasType;\n };\n\n LensApiVisibility: {\n Dev: LensApiVisibility;\n Private: LensApiVisibility;\n Public: LensApiVisibility;\n };\n\n DeviceClass: {\n Undefined: DeviceClass;\n BarelyWorking: DeviceClass;\n LowEnd: DeviceClass;\n MidEnd: DeviceClass;\n HighEnd: DeviceClass;\n };\n\n RenderLoopMode: {\n SetTimeout: RenderLoopMode;\n RequestAnimationFrame: RenderLoopMode;\n };\n\n UserDataAccess: {\n Restricted: UserDataAccess;\n Unrestricted: UserDataAccess;\n };\n\n InterfaceControl: {\n ToggleCameraButton: InterfaceControl;\n ImagePicker: InterfaceControl;\n Hint: InterfaceControl;\n Modal: InterfaceControl;\n LinkBitmojiCallToAction: InterfaceControl;\n SnapButton: InterfaceControl;\n PlayButton: InterfaceControl;\n All: InterfaceControl;\n ExitFullScreenButton: InterfaceControl;\n MemoriesButton: InterfaceControl;\n LensAttachmentButton: InterfaceControl;\n ReverseCamera: InterfaceControl;\n };\n\n InterfaceAction: {\n EnableHighlight: InterfaceAction;\n DisableHighlight: InterfaceAction;\n Trigger: InterfaceAction;\n Show: InterfaceAction;\n Hide: InterfaceAction;\n };\n\n ExternalMediaOrientation: {\n CW0: ExternalMediaOrientation;\n CW90: ExternalMediaOrientation;\n CW180: ExternalMediaOrientation;\n CW270: ExternalMediaOrientation;\n };\n\n ErrorType: {\n LensDeserialization: ErrorType;\n Validation: ErrorType;\n Uncategorized: ErrorType;\n LensExecution: ErrorType;\n Abort: ErrorType;\n Uninitialized: ErrorType;\n };\n\n initialize: (config: InitializeInput) => void;\n processFrame: (config: ProcessFrameInput) => void;\n addLens: (config: AddLensInput) => void;\n replaceLenses: (config: ReplaceLensesInput) => void;\n removeLens: (config: RemoveLensInput) => void;\n clearAllLenses: (config: ClearAllLensesInput) => void;\n teardown: (config: TeardownInput) => void;\n useMediaElement: (config: UseMediaElementInput) => void;\n setFPSLimit: (config: SetFpsLimitInput) => void;\n setRenderLoopMode: (config: SetRenderLoopInput) => void;\n getCoreVersion: () => number;\n playCanvas: (input: PlayCanvasInput) => void;\n pauseCanvas: (input: PauseCanvasInput) => void;\n getOutputCanvases: () => GetOutputCanvasesOutput;\n setRenderSize: (input: SetRenderSizeInput) => void;\n startProfiling: () => void;\n endProfiling: () => void;\n setInputTransform: (config: SetInputTransformInput) => void;\n registerUriListener: (scheme: string, route: string, listener: UriListener) => void;\n provideUriResponse: (requestId: string, response: UriResponse) => void;\n setRemoteAssetsProvider: (provider: SetRemoteAssetsProviderInput) => void;\n provideRemoteAssetsResponse: (assetResponse: ProvideRemoteAssetsResponseInput) => void;\n setRemoteAssetsUploadHandler: (provider: SetRemoteAssetsUploadHandlerInput) => void;\n provideRemoteAssetsUploadResponse: (assetResponse: ProvideRemoteAssetsUploadResponseInput) => void;\n registerShowHintCallback: (callback: ShowHintCallback) => void;\n registerHideHintCallback: (callback: HideHintCallback) => void;\n registerSavePersistentStoreCallback: (callback: SavePersistentStoreCallback) => void;\n imageToYuvBuffer: (config: ImageToYuvBufferInput) => void;\n yuvBufferToBitmap: (config: YuvBufferToBitmapInput) => void;\n setOnFrameProcessedCallback: (config: SetOnFrameProcessedInput) => void;\n setInterfaceControlVisibility: (config: SetInterfaceControlVisibilityInput) => void;\n handleClientInterfaceAction: (config: HandleClientInterfaceActionInput) => void;\n provideExternalImage: (config: ProvideExternalImageInput) => void;\n provideExternalVideo: (config: ProvideExternalVideoInput) => void;\n setScreenDimmingRequestHandler: (callback: ScreenDimmingRequestHandler) => void;\n setClientInterfaceRequestHandler: (callback: ClientInterfaceRequestHandler) => void;\n setPreloadedConfiguration: (config: SetPreloadedConfigurationInput) => void;\n setAllSoundsMuted: (config: SetAllSoundsMutedInput) => void;\n setDeviceClass: (config: SetDeviceClassInput) => void;\n setSystemFonts: (config: SetSystemFontsInput) => void;\n setAudioParameters: (config: SetAudioParametersInput) => void;\n processAudioSampleBuffer: (config: ProcessAudioSampleBufferInput) => void;\n registerBeginWebXrHandler: (handler: ((config: BeginWebXrInput) => void) | null) => void;\n registerEndWebXrHandler: (handler: (() => void) | null) => void;\n}\n\ndeclare global {\n // This function is provided by the Emscripten glue file and responsible for initialization, will be fullfiled\n // when everything is loaded and it is safe to call compiled functions\n // eslint-disable-next-line max-len\n // https://emscripten.org/docs/getting_started/FAQ.html#how-can-i-tell-when-the-page-is-fully-loaded-and-it-is-safe-to-call-compiled-functions\n // Function is defined by the LensCore web assembly\n // eslint-disable-next-line max-len\n // https://github.sc-corp.net/Snapchat/LensCore/blob/6715da8c877d593e4fe133f4145eb3022204525d/Platforms/WebAssembly/LookserySDK/CMakeLists.txt#L65\n function createLensesModule(module: InitialEmscriptenModule): Promise<InitialEmscriptenModule & LensCoreModule>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../src/lens-core-module/generated-types.ts"],"names":[],"mappings":"","sourcesContent":["export type DefaultEventHandler = (...data: any[]) => void;\n\nexport type DefaultErrorHandler = (err: LensCoreError) => void;\n\nexport type LensCoreEnumValue = { value: number };\n\nexport type GetOutputCanvasesOutput = Record<number, HTMLCanvasElement>;\n\nexport type SetRenderSizeInput = SetRenderSizeMatchInputResolutionInput | SetRenderSizeExplicitInput;\n\nexport type SetRemoteAssetsProviderInput = (assetDescriptor: AssetDescriptor) => void;\n\nexport type SetRemoteAssetsUploadHandlerInput = (assetUploadDescriptor: AssetUploadDescriptor) => void;\n\nexport type ContentType =\n | \"text/plain\"\n | \"text/html\"\n | \"application/json\"\n | \"application/octet-stream\"\n | \"application/x-protobuf\"\n | \"application/grpc\";\n\nexport type SavePersistentStoreCallback = (id: string, data: ArrayBuffer) => void;\n\nexport type ShowHintCallback = (effectId: string, hintId: string) => void;\n\nexport type HideHintCallback = (effectId: string) => void;\n\nexport type ReceiveInstanceCallback = (instance: WebAssembly.Instance, module: WebAssembly.Module) => void;\n\nexport type AssetType = LensCoreEnumValue;\n\nexport type CanvasType = LensCoreEnumValue;\n\nexport type RenderLoopMode = LensCoreEnumValue;\n\nexport type LensApiVisibility = LensCoreEnumValue;\n\nexport type DeviceClass = LensCoreEnumValue;\n\nexport type UserDataAccess = LensCoreEnumValue;\n\nexport type InterfaceControl = LensCoreEnumValue;\n\nexport type InterfaceAction = LensCoreEnumValue;\n\nexport type ExternalMediaOrientation = LensCoreEnumValue;\n\nexport type ErrorType = LensCoreEnumValue;\n\nexport type Uri = `${string}://${string}`;\n\nexport type Dimensions = { width: number; height: number };\n\nexport type Size2D = { width: number; height: number };\n\nexport type Vec2D = { x: number; y: number };\n\nexport type Rect = { origin: Vec2D; size: Size2D };\n\nexport interface ClearAllLensesInput {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface OnFrameProcessedParam {\n processingTimeMs: number;\n}\n\nexport interface XrCapabilities {\n sixDofSupported: boolean;\n sceneDepthSupported: boolean;\n}\n\nexport interface OnTurnOnParam {\n needsAudioInput: boolean;\n}\n\nexport type TurnOnEventHandler = (arg: OnTurnOnParam) => void;\n\nexport interface InitializeInput {\n canvas?: HTMLCanvasElement | string;\n outputResolution?: Dimensions;\n showFpsPanel?: boolean;\n shouldUseWorker?: boolean;\n onFrameProcessed?: (arg: OnFrameProcessedParam) => void;\n xrCapabilities?: XrCapabilities;\n onFailure?: DefaultErrorHandler;\n onSuccess?: DefaultEventHandler;\n exceptionHandler?: (error: LensCoreError) => void;\n}\n\nexport interface PlayCanvasInput {\n type: CanvasType;\n onReady?: () => void;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface PauseCanvasInput {\n type: CanvasType;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetFpsLimitInput {\n fps: number;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetInputTransformInput {\n matrix: Float32Array | ArrayBuffer;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetOnFrameProcessedInput {\n onFrameProcessed: (arg: OnFrameProcessedParam) => void;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderSizeMatchInputResolutionInput {\n mode: \"matchInputResolution\";\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderSizeExplicitInput {\n mode: \"explicit\";\n target: Dimensions;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetRenderLoopInput {\n mode: RenderLoopMode;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface TeardownInput {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultEventHandler;\n}\n\nexport interface ReplayTrackingDataInput {\n buffer: Uint8Array | ArrayBuffer;\n}\n\nexport interface UseMediaElementInput {\n media?: HTMLCanvasElement | HTMLImageElement | HTMLVideoElement | MediaStream;\n requestWebcam?: boolean;\n startOnFrontCamera?: boolean;\n mirrorMedia?: boolean;\n pauseExistingMedia?: boolean;\n autoplayNewMedia?: boolean;\n autoplayPreviewCanvas?: boolean;\n useManualFrameProcessing?: boolean;\n replayTrackingData?: ReplayTrackingDataInput;\n onFailure?: DefaultErrorHandler;\n onSuccess?: DefaultEventHandler;\n}\n\nexport interface UriListener {\n handleRequest: (request: UriRequest) => void;\n cancelRequest?: (request: UriCancelRequest) => void;\n}\n\nexport interface UriRequest {\n uri: Uri;\n identifier: string;\n method: \"GET\" | \"POST\";\n contentType: ContentType;\n data: ArrayBuffer;\n metadata: Record<string, string>;\n}\n\nexport interface UriResponse {\n code: number;\n description: string;\n contentType: ContentType;\n data: ArrayBuffer;\n metadata?: Record<string, string>;\n}\n\nexport interface UriCancelRequest {\n uri: Uri;\n requestId: string;\n}\n\nexport interface LensDescriptor {\n lensId: string;\n lensChecksum: string;\n lensPath?: string;\n lensDataBuffer?: Uint8Array | ArrayBuffer;\n onTurnOn?: TurnOnEventHandler;\n onTurnOff?: DefaultEventHandler;\n onFirstFrameProcessed?: DefaultEventHandler;\n onResourcesLoaded?: DefaultEventHandler;\n launchData?: Uint8Array | ArrayBuffer;\n apiVisibility?: LensApiVisibility;\n publicApiUserDataAccess?: UserDataAccess;\n}\n\nexport interface AddLensInput extends LensDescriptor {\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface ReplaceLensesInput {\n lenses: LensDescriptor | Array<LensDescriptor>;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface RemoveLensInput {\n lensId: string;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface AssetDescriptor {\n assetId: string;\n assetType: AssetType;\n avatarId?: string;\n effectId?: string;\n encryptionKey?: ArrayBuffer;\n}\n\nexport interface AssetUploadDescriptor {\n requestId: number;\n assetId: string;\n assetType: AssetType;\n effectId: string;\n assetBuffer: ArrayBuffer;\n encryptionKey?: ArrayBuffer;\n encryptionIv?: ArrayBuffer;\n assetBatchId?: string;\n}\n\nexport interface ProvideRemoteAssetsResponseInput {\n assetId: string;\n assetType: AssetType;\n assetBuffer?: ArrayBuffer;\n assetChecksum?: string;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface ProvideRemoteAssetsUploadResponseInput {\n requestId: number;\n success: boolean;\n assetUrl?: string;\n assetUploadMetadata?: ArrayBuffer;\n}\n\nexport interface XRInput {\n layer: XRWebGLLayer;\n binding: XRWebGLBinding;\n frame: XRFrame;\n referenceSpace: XRReferenceSpace;\n}\n\nexport interface ProcessFrameInput {\n inputFrame: ImageBitmap | HTMLCanvasElement | HTMLImageElement | VideoFrame | XRInput;\n timestampMillis: number;\n renderTimestampMillis?: number;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface LensCoreError extends Error {\n otherExceptions?: Array<Error>;\n cause: { type: ErrorType; metadata?: any };\n}\n\nexport interface ImageToYuvBufferInput {\n image: Uint8Array | ArrayBuffer | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap;\n width: number;\n height: number;\n outputBuffer?: Uint8Array | ArrayBuffer;\n onSuccess: (buffer: ArrayBuffer) => void;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface YuvBufferToBitmapInput {\n buffer: Uint8Array | ArrayBuffer;\n width: number;\n height: number;\n targetWidth?: number;\n targetHeight?: number;\n preserveCanvasState?: boolean;\n allowBufferTransfer?: boolean;\n onSuccess: (bitmap: ImageBitmap) => void;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetInterfaceControlVisibilityInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n visibility: boolean;\n}\n\nexport interface HandleClientInterfaceActionInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n interfaceAction: InterfaceAction;\n}\n\nexport interface ProvideExternalImageInput {\n data: Uint8Array | ArrayBuffer;\n orientation: ExternalMediaOrientation;\n faceRects?: Array<Rect>;\n}\n\nexport interface ProvideExternalVideoInput {\n data: Uint8Array | ArrayBuffer;\n orientation: ExternalMediaOrientation;\n relStartPosition?: number;\n relEndPosition?: number;\n volume?: number;\n}\n\nexport interface ScreenDimmingRequestInput {\n effectId: string;\n enabled: boolean;\n}\n\nexport type ScreenDimmingRequestHandler = (config: ScreenDimmingRequestInput) => void;\n\nexport interface ClientInterfaceData {\n HeaderId?: string;\n DescriptionId?: string;\n FaceFilteringEnabled?: \"0\" | \"1\";\n FaceFilteringMultipleFaces?: \"0\" | \"1\";\n ImageEnabled?: \"0\" | \"1\";\n VideoEnabled?: \"0\" | \"1\";\n}\n\nexport interface ClientInterfaceRequestInput {\n effectId: string;\n interfaceControl: InterfaceControl;\n interfaceAction: InterfaceAction;\n data: ClientInterfaceData;\n}\n\nexport type ClientInterfaceRequestHandler = (config: ClientInterfaceRequestInput) => void;\n\nexport interface LensCoreConfig {\n configId: string;\n value:\n | { stringValue: string }\n | { boolValue: boolean }\n | { intValue: number }\n | { longValue: number }\n | { floatValue: number }\n | {\n anyValue: {\n typeUrl: string;\n value: Uint8Array | ArrayBuffer;\n };\n };\n}\n\nexport type SetPreloadedConfigurationInput = Array<LensCoreConfig>;\n\nexport interface SetAllSoundsMutedInput {\n muted: boolean;\n fade: boolean;\n}\n\nexport interface SetDeviceClassInput {\n deviceClass: DeviceClass;\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SetAudioParametersInput {\n parameters: {\n numChannels?: number;\n sampleRate?: number;\n };\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface SystemFont {\n name: string;\n data: Uint8Array | ArrayBuffer;\n}\n\nexport interface SetSystemFontsInput {\n fonts: SystemFont[]\n}\n\nexport interface ProcessAudioSampleBufferInput {\n input: Float32Array[] | ArrayBuffer[];\n output?: Float32Array[] | ArrayBuffer[];\n onSuccess?: DefaultEventHandler;\n onFailure?: DefaultErrorHandler;\n}\n\nexport interface BeginWebXrInput {\n glContext: WebGL2RenderingContext;\n requestConfig: {\n requiredFeatures?: string[]\n }\n}\n\nexport interface InitialEmscriptenModule {\n mainScriptUrlOrBlob: string;\n compiledModule?: WebAssembly.Module;\n pthreadWorkerScriptUrl?: string;\n instantiateWasm?: (importObject: WebAssembly.Imports, receiveInstance: ReceiveInstanceCallback) => void;\n print?: (text: string) => void;\n printErr?: (text: string) => void;\n}\n\nexport interface LensCoreModule extends InitialEmscriptenModule {\n AssetType: {\n RemoteMediaByUrl: AssetType;\n DeviceDependent: AssetType;\n Static: AssetType;\n URL: AssetType;\n BitmojiDynamicAsset: AssetType;\n };\n\n CanvasType: {\n None: CanvasType;\n Preview: CanvasType;\n Capture: CanvasType;\n All: CanvasType;\n };\n\n LensApiVisibility: {\n Dev: LensApiVisibility;\n Private: LensApiVisibility;\n Public: LensApiVisibility;\n };\n\n DeviceClass: {\n Undefined: DeviceClass;\n BarelyWorking: DeviceClass;\n LowEnd: DeviceClass;\n MidEnd: DeviceClass;\n HighEnd: DeviceClass;\n };\n\n RenderLoopMode: {\n SetTimeout: RenderLoopMode;\n RequestAnimationFrame: RenderLoopMode;\n };\n\n UserDataAccess: {\n Restricted: UserDataAccess;\n Unrestricted: UserDataAccess;\n };\n\n InterfaceControl: {\n ToggleCameraButton: InterfaceControl;\n ImagePicker: InterfaceControl;\n Hint: InterfaceControl;\n Modal: InterfaceControl;\n LinkBitmojiCallToAction: InterfaceControl;\n SnapButton: InterfaceControl;\n PlayButton: InterfaceControl;\n All: InterfaceControl;\n ExitFullScreenButton: InterfaceControl;\n MemoriesButton: InterfaceControl;\n LensAttachmentButton: InterfaceControl;\n ReverseCamera: InterfaceControl;\n };\n\n InterfaceAction: {\n EnableHighlight: InterfaceAction;\n DisableHighlight: InterfaceAction;\n Trigger: InterfaceAction;\n Show: InterfaceAction;\n Hide: InterfaceAction;\n };\n\n ExternalMediaOrientation: {\n CW0: ExternalMediaOrientation;\n CW90: ExternalMediaOrientation;\n CW180: ExternalMediaOrientation;\n CW270: ExternalMediaOrientation;\n };\n\n ErrorType: {\n LensDeserialization: ErrorType;\n Validation: ErrorType;\n Uncategorized: ErrorType;\n LensExecution: ErrorType;\n Abort: ErrorType;\n Uninitialized: ErrorType;\n };\n\n initialize: (config: InitializeInput) => void;\n processFrame: (config: ProcessFrameInput) => void;\n addLens: (config: AddLensInput) => void;\n replaceLenses: (config: ReplaceLensesInput) => void;\n removeLens: (config: RemoveLensInput) => void;\n clearAllLenses: (config: ClearAllLensesInput) => void;\n teardown: (config: TeardownInput) => void;\n useMediaElement: (config: UseMediaElementInput) => void;\n setFPSLimit: (config: SetFpsLimitInput) => void;\n setRenderLoopMode: (config: SetRenderLoopInput) => void;\n getCoreVersion: () => number;\n playCanvas: (input: PlayCanvasInput) => void;\n pauseCanvas: (input: PauseCanvasInput) => void;\n getOutputCanvases: () => GetOutputCanvasesOutput;\n setRenderSize: (input: SetRenderSizeInput) => void;\n startProfiling: () => void;\n endProfiling: () => void;\n setInputTransform: (config: SetInputTransformInput) => void;\n registerUriListener: (scheme: string, route: string, listener: UriListener) => void;\n provideUriResponse: (requestId: string, response: UriResponse) => void;\n setRemoteAssetsProvider: (provider: SetRemoteAssetsProviderInput) => void;\n provideRemoteAssetsResponse: (assetResponse: ProvideRemoteAssetsResponseInput) => void;\n setRemoteAssetsUploadHandler: (provider: SetRemoteAssetsUploadHandlerInput) => void;\n provideRemoteAssetsUploadResponse: (assetResponse: ProvideRemoteAssetsUploadResponseInput) => void;\n registerShowHintCallback: (callback: ShowHintCallback) => void;\n registerHideHintCallback: (callback: HideHintCallback) => void;\n registerSavePersistentStoreCallback: (callback: SavePersistentStoreCallback) => void;\n imageToYuvBuffer: (config: ImageToYuvBufferInput) => void;\n yuvBufferToBitmap: (config: YuvBufferToBitmapInput) => void;\n setOnFrameProcessedCallback: (config: SetOnFrameProcessedInput) => void;\n setInterfaceControlVisibility: (config: SetInterfaceControlVisibilityInput) => void;\n handleClientInterfaceAction: (config: HandleClientInterfaceActionInput) => void;\n provideExternalImage: (config: ProvideExternalImageInput) => void;\n provideExternalVideo: (config: ProvideExternalVideoInput) => void;\n setScreenDimmingRequestHandler: (callback: ScreenDimmingRequestHandler) => void;\n setClientInterfaceRequestHandler: (callback: ClientInterfaceRequestHandler) => void;\n setPreloadedConfiguration: (config: SetPreloadedConfigurationInput) => void;\n setAllSoundsMuted: (config: SetAllSoundsMutedInput) => void;\n setDeviceClass: (config: SetDeviceClassInput) => void;\n setSystemFonts: (config: SetSystemFontsInput) => void;\n setAudioParameters: (config: SetAudioParametersInput) => void;\n processAudioSampleBuffer: (config: ProcessAudioSampleBufferInput) => void;\n registerBeginWebXrHandler: (handler: ((config: BeginWebXrInput) => void) | null) => void;\n registerEndWebXrHandler: (handler: (() => void) | null) => void;\n}\n\ndeclare global {\n // This function is provided by the Emscripten glue file and responsible for initialization, will be fullfiled\n // when everything is loaded and it is safe to call compiled functions\n // eslint-disable-next-line max-len\n // https://emscripten.org/docs/getting_started/FAQ.html#how-can-i-tell-when-the-page-is-fully-loaded-and-it-is-safe-to-call-compiled-functions\n // Function is defined by the LensCore web assembly\n // eslint-disable-next-line max-len\n // https://github.sc-corp.net/Snapchat/LensCore/blob/6715da8c877d593e4fe133f4145eb3022204525d/Platforms/WebAssembly/LookserySDK/CMakeLists.txt#L65\n function createLensesModule(module: InitialEmscriptenModule): Promise<InitialEmscriptenModule & LensCoreModule>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lensCoreFactory.d.ts","sourceRoot":"","sources":["../../../src/lens-core-module/loader/lensCoreFactory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"lensCoreFactory.d.ts","sourceRoot":"","sources":["../../../src/lens-core-module/loader/lensCoreFactory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAcvE;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;;;CA6E3B,CAAC"}
|
|
@@ -6,6 +6,8 @@ import { defaultFetchHandlerFactory } from "../../handlers/defaultFetchHandler";
|
|
|
6
6
|
import { getLogger } from "../../logger/logger";
|
|
7
7
|
import { createLensCore } from "../lensCore";
|
|
8
8
|
import { loadScript } from "../../common/loadScript";
|
|
9
|
+
import { HandlerChainBuilder } from "../../handlers/HandlerChainBuilder";
|
|
10
|
+
import { createCustomLensCoreHandler } from "../../handlers/customLensCoreHandler";
|
|
9
11
|
import { getRequiredBootstrapURLs } from "./bootstrapURLs";
|
|
10
12
|
const logger = getLogger("lensCoreFactory");
|
|
11
13
|
const findMatch = (regex, strings) => strings.find((s) => regex.test(s));
|
|
@@ -13,6 +15,9 @@ export const lensCoreFactory = Injectable("lensCore", [defaultFetchHandlerFactor
|
|
|
13
15
|
var _a, _b;
|
|
14
16
|
let lensCoreJS;
|
|
15
17
|
let lensCoreWASM;
|
|
18
|
+
let lensCoreHandler = lensCoreOverrideUrls || wasmEndpointOverride
|
|
19
|
+
? new HandlerChainBuilder(handler).map(createCustomLensCoreHandler()).handler
|
|
20
|
+
: handler;
|
|
16
21
|
if (lensCoreOverrideUrls) {
|
|
17
22
|
lensCoreJS = lensCoreOverrideUrls.js;
|
|
18
23
|
lensCoreWASM = lensCoreOverrideUrls.wasm;
|
|
@@ -26,7 +31,7 @@ export const lensCoreFactory = Injectable("lensCore", [defaultFetchHandlerFactor
|
|
|
26
31
|
throw new Error(`Cannot fetch required LensCore assets. Either the JS or WASM filename is missing from ` +
|
|
27
32
|
`this list: ${assetURLs}.`);
|
|
28
33
|
}
|
|
29
|
-
const glueScript = yield
|
|
34
|
+
const glueScript = yield lensCoreHandler(lensCoreJS).then((r) => r.blob());
|
|
30
35
|
lensCoreJS = URL.createObjectURL(glueScript);
|
|
31
36
|
}
|
|
32
37
|
const scriptElement = yield loadScript(lensCoreJS);
|
|
@@ -35,7 +40,7 @@ export const lensCoreFactory = Injectable("lensCore", [defaultFetchHandlerFactor
|
|
|
35
40
|
const moduleInit = globalThis.createLensesModule((initialModule = {
|
|
36
41
|
mainScriptUrlOrBlob: lensCoreJS,
|
|
37
42
|
instantiateWasm: (importObject, receiveInstance) => {
|
|
38
|
-
WebAssembly.instantiateStreaming(
|
|
43
|
+
WebAssembly.instantiateStreaming(lensCoreHandler(lensCoreWASM), importObject)
|
|
39
44
|
.then(function ({ instance, module }) {
|
|
40
45
|
receiveInstance(instance, module);
|
|
41
46
|
initialModule.compiledModule = module;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lensCoreFactory.js","sourceRoot":"","sources":["../../../src/lens-core-module/loader/lensCoreFactory.ts"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,4BAA4B,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAEnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,MAAM,MAAM,GAAG,SAAS,CAAC,iBAAiB,CAAC,CAAC;AAE5C,MAAM,SAAS,GAAG,CAAC,KAAa,EAAE,OAAiB,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAY3F,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CACrC,UAAU,EACV,CAAC,0BAA0B,CAAC,KAAK,EAAE,kBAAkB,CAAU,EAC/D,CAAO,OAAqB,EAAE,EAAE,oBAAoB,EAAE,oBAAoB,EAA0B,EAAE,EAAE;;IACpG,IAAI,UAAkB,CAAC;IACvB,IAAI,YAAoB,CAAC;IAEzB,IAAI,oBAAoB,EAAE;QACtB,UAAU,GAAG,oBAAoB,CAAC,EAAE,CAAC;QACrC,YAAY,GAAG,oBAAoB,CAAC,IAAI,CAAC;KAC5C;SAAM;QACH,MAAM,gBAAgB,GAAG,oBAAoB,aAApB,oBAAoB,cAApB,oBA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,CAAC,UAAU,CAAC,CAAC;IAEnD,MAAM,QAAQ,GAAG,MAAM,IAAI,OAAO,CAA2C,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC7F,IAAI,aAA+C,CAAC;QAMpD,MAAM,UAAU,GAAG,UAAU,CAAC,kBAAkB,CAC5C,CAAC,aAAa,GAAG;YAEb,mBAAmB,EAAE,UAAU;YAE/B,eAAe,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,EAAE;gBAC/C,WAAW,CAAC,oBAAoB,CAAC,eAAe,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;qBACxE,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE;oBAChC,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;oBAElC,aAAa,CAAC,cAAc,GAAG,MAAM,CAAC;oBACtC,OAAO,CAAC,UAAU,CAAC,CAAC;gBACxB,CAAC,CAAC;qBACD,KAAK,CAAC,MAAM,CAAC,CAAC;YACvB,CAAC;SACJ,CAAC,CACL,CAAC;IACN,CAAC,CAAC,CAAC;IAGH,aAAa,CAAC,MAAM,EAAE,CAAC;IAGvB,IAAI,YAAY,CAAC,OAAO,IAAI,GAAG,QAAQ,CAAC,cAAc,EAAE,EAAE,EAAE;QACxD,MAAM,CAAC,IAAI,CACP,4BAA4B,QAAQ,CAAC,cAAc,EAAE,gCACjD,YAAY,CAAC,OACjB,GAAG,CACN,CAAC;KACL;IAED,OAAO,cAAc,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC,CAAA,CACJ,CAAC","sourcesContent":["import lensCoreWasm from \"../../lensCoreWasmVersions\";\nimport type { CameraKitConfiguration } from \"../../configuration\";\nimport { configurationToken } from \"../../configuration\";\nimport { Injectable } from \"../../dependency-injection/Injectable\";\nimport type { FetchHandler } from \"../../handlers/defaultFetchHandler\";\nimport { defaultFetchHandlerFactory } from \"../../handlers/defaultFetchHandler\";\nimport type { InitialEmscriptenModule, LensCoreModule } from \"../generated-types\";\nimport { getLogger } from \"../../logger/logger\";\nimport { createLensCore } from \"../lensCore\";\nimport { loadScript } from \"../../common/loadScript\";\nimport { HandlerChainBuilder } from \"../../handlers/HandlerChainBuilder\";\nimport { createCustomLensCoreHandler } from \"../../handlers/customLensCoreHandler\";\nimport { getRequiredBootstrapURLs } from \"./bootstrapURLs\";\n\nconst logger = getLogger(\"lensCoreFactory\");\n\nconst findMatch = (regex: RegExp, strings: string[]) => strings.find((s) => regex.test(s));\n\n/**\n * This component is responsible for:\n * 1) Loading LensCore WebAssembly (WASM) assets\n * 2) Using the WASM assets to initialize the LensCore WASM module\n *\n * By default, WASM assets will be loaded from the Bolt CDN – but if `endpoint` is provided, assets will be loaded\n * using it as a base URL.\n *\n * @internal\n */\nexport const lensCoreFactory = Injectable(\n \"lensCore\",\n [defaultFetchHandlerFactory.token, configurationToken] as const,\n async (handler: FetchHandler, { lensCoreOverrideUrls, wasmEndpointOverride }: CameraKitConfiguration) => {\n let lensCoreJS: string;\n let lensCoreWASM: string;\n // We only use custom handler when LensCore is loaded from a custom location.\n let lensCoreHandler =\n lensCoreOverrideUrls || wasmEndpointOverride\n ? new HandlerChainBuilder(handler).map(createCustomLensCoreHandler()).handler\n : handler;\n\n if (lensCoreOverrideUrls) {\n lensCoreJS = lensCoreOverrideUrls.js;\n lensCoreWASM = lensCoreOverrideUrls.wasm;\n } else {\n const endpointOverride = wasmEndpointOverride ?? undefined;\n const assetURLs = await getRequiredBootstrapURLs(endpointOverride);\n\n lensCoreJS = findMatch(/\\.js/, assetURLs) ?? \"\";\n lensCoreWASM = findMatch(/\\.wasm/, assetURLs) ?? \"\";\n\n if (!lensCoreJS || !lensCoreWASM) {\n throw new Error(\n `Cannot fetch required LensCore assets. Either the JS or WASM filename is missing from ` +\n `this list: ${assetURLs}.`\n );\n }\n\n // Fetching here and creating an Object URL lets LensCore optimized loading itself in a WebWorker,\n // otherwise the glue script would need to be downloaded again.\n const glueScript = await lensCoreHandler(lensCoreJS).then((r) => r.blob());\n lensCoreJS = URL.createObjectURL(glueScript);\n }\n\n const scriptElement = await loadScript(lensCoreJS);\n\n const lensCore = await new Promise<InitialEmscriptenModule & LensCoreModule>((resolve, reject) => {\n let initialModule: Partial<InitialEmscriptenModule>;\n // will trigger WASM initialization and data loading,\n // after completion it will be safe to call imported WASM functions\n // More about emscripten initialization:\n // eslint-disable-next-line max-len\n // https://emscripten.org/docs/getting_started/FAQ.html?highlight=modularize#how-can-i-tell-when-the-page-is-fully-loaded-and-it-is-safe-to-call-compiled-functions\n const moduleInit = globalThis.createLensesModule(\n (initialModule = {\n // url will be used for loading glue JS during Worker initialization\n mainScriptUrlOrBlob: lensCoreJS,\n // will be triggered by Emscripten during the initialization\n instantiateWasm: (importObject, receiveInstance) => {\n WebAssembly.instantiateStreaming(lensCoreHandler(lensCoreWASM), importObject)\n .then(function ({ instance, module }) {\n receiveInstance(instance, module);\n // compiled module will be reused in Worker\n initialModule.compiledModule = module;\n resolve(moduleInit);\n })\n .catch(reject);\n },\n })\n );\n });\n\n // now when we have LensCore WASM in memory we can release the script element\n scriptElement.remove();\n\n // print warning if loaded version differs from hardcoded one\n if (lensCoreWasm.version != `${lensCore.getCoreVersion()}`) {\n logger.warn(\n `Loaded LensCore version (${lensCore.getCoreVersion()}) differs from expected one (${\n lensCoreWasm.version\n })`\n );\n }\n\n return createLensCore(lensCore);\n }\n);\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
version: "
|
|
3
|
-
buildNumber: "
|
|
4
|
-
baseUrl: "https://cf-st.sc-cdn.net/d/
|
|
2
|
+
version: "267",
|
|
3
|
+
buildNumber: "312",
|
|
4
|
+
baseUrl: "https://cf-st.sc-cdn.net/d/P7GNr57Olcevwd0qGstFA?go=IgsKCTIBBEgBUFxgAQ%3D%3D&uc=92",
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=lensCoreWasmVersions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lensCoreWasmVersions.js","sourceRoot":"","sources":["../src/lensCoreWasmVersions.ts"],"names":[],"mappings":"AAAA,eAAe;IACX,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,oFAAoF;CAChG,CAAC","sourcesContent":["export default {\n version: \"
|
|
1
|
+
{"version":3,"file":"lensCoreWasmVersions.js","sourceRoot":"","sources":["../src/lensCoreWasmVersions.ts"],"names":[],"mappings":"AAAA,eAAe;IACX,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,oFAAoF;CAChG,CAAC","sourcesContent":["export default {\n version: \"267\",\n buildNumber: \"312\",\n baseUrl: \"https://cf-st.sc-cdn.net/d/P7GNr57Olcevwd0qGstFA?go=IgsKCTIBBEgBUFxgAQ%3D%3D&uc=92\",\n};\n"]}
|