-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!:
resolvePDFJS
for missing top-level await support in Cf workers
- Loading branch information
1 parent
ad5eb92
commit 128a01e
Showing
10 changed files
with
188 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/build/pdf.mjs b/build/pdf.mjs | ||
index aa2be7dae0e57a4602cf87f3846e042b33ae419c..69959962a681710a684c0055b239ba2a22a720d4 100644 | ||
--- a/build/pdf.mjs | ||
+++ b/build/pdf.mjs | ||
@@ -20,6 +20,7 @@ | ||
* JavaScript code in this page | ||
*/ | ||
|
||
+export async function initPDFJS() { | ||
/******/ var __webpack_modules__ = ({ | ||
|
||
/***/ 640: | ||
@@ -16877,7 +16878,8 @@ const AnnotationPrefix = "pdfjs_internal_id_"; | ||
/******/ var __webpack_exports__shadow = __webpack_exports__.shadow; | ||
/******/ var __webpack_exports__updateTextLayer = __webpack_exports__.updateTextLayer; | ||
/******/ var __webpack_exports__version = __webpack_exports__.version; | ||
-/******/ export { __webpack_exports__AbortException as AbortException, __webpack_exports__AnnotationEditorLayer as AnnotationEditorLayer, __webpack_exports__AnnotationEditorParamsType as AnnotationEditorParamsType, __webpack_exports__AnnotationEditorType as AnnotationEditorType, __webpack_exports__AnnotationEditorUIManager as AnnotationEditorUIManager, __webpack_exports__AnnotationLayer as AnnotationLayer, __webpack_exports__AnnotationMode as AnnotationMode, __webpack_exports__CMapCompressionType as CMapCompressionType, __webpack_exports__DOMSVGFactory as DOMSVGFactory, __webpack_exports__FeatureTest as FeatureTest, __webpack_exports__GlobalWorkerOptions as GlobalWorkerOptions, __webpack_exports__ImageKind as ImageKind, __webpack_exports__InvalidPDFException as InvalidPDFException, __webpack_exports__MissingPDFException as MissingPDFException, __webpack_exports__OPS as OPS, __webpack_exports__PDFDataRangeTransport as PDFDataRangeTransport, __webpack_exports__PDFDateString as PDFDateString, __webpack_exports__PDFWorker as PDFWorker, __webpack_exports__PasswordResponses as PasswordResponses, __webpack_exports__PermissionFlag as PermissionFlag, __webpack_exports__PixelsPerInch as PixelsPerInch, __webpack_exports__PromiseCapability as PromiseCapability, __webpack_exports__RenderingCancelledException as RenderingCancelledException, __webpack_exports__UnexpectedResponseException as UnexpectedResponseException, __webpack_exports__Util as Util, __webpack_exports__VerbosityLevel as VerbosityLevel, __webpack_exports__XfaLayer as XfaLayer, __webpack_exports__build as build, __webpack_exports__createValidAbsoluteUrl as createValidAbsoluteUrl, __webpack_exports__getDocument as getDocument, __webpack_exports__getFilenameFromUrl as getFilenameFromUrl, __webpack_exports__getPdfFilenameFromUrl as getPdfFilenameFromUrl, __webpack_exports__getXfaPageViewport as getXfaPageViewport, __webpack_exports__isDataScheme as isDataScheme, __webpack_exports__isPdfFile as isPdfFile, __webpack_exports__noContextMenu as noContextMenu, __webpack_exports__normalizeUnicode as normalizeUnicode, __webpack_exports__renderTextLayer as renderTextLayer, __webpack_exports__setLayerDimensions as setLayerDimensions, __webpack_exports__shadow as shadow, __webpack_exports__updateTextLayer as updateTextLayer, __webpack_exports__version as version }; | ||
+/******/ return { AbortException: __webpack_exports__AbortException, AnnotationEditorLayer: __webpack_exports__AnnotationEditorLayer, AnnotationEditorParamsType: __webpack_exports__AnnotationEditorParamsType, AnnotationEditorType: __webpack_exports__AnnotationEditorType, AnnotationEditorUIManager: __webpack_exports__AnnotationEditorUIManager, AnnotationLayer: __webpack_exports__AnnotationLayer, AnnotationMode: __webpack_exports__AnnotationMode, CMapCompressionType: __webpack_exports__CMapCompressionType, DOMSVGFactory: __webpack_exports__DOMSVGFactory, FeatureTest: __webpack_exports__FeatureTest, GlobalWorkerOptions: __webpack_exports__GlobalWorkerOptions, ImageKind: __webpack_exports__ImageKind, InvalidPDFException: __webpack_exports__InvalidPDFException, MissingPDFException: __webpack_exports__MissingPDFException, OPS: __webpack_exports__OPS, PDFDataRangeTransport: __webpack_exports__PDFDataRangeTransport, PDFDateString: __webpack_exports__PDFDateString, PDFWorker: __webpack_exports__PDFWorker, PasswordResponses: __webpack_exports__PasswordResponses, PermissionFlag: __webpack_exports__PermissionFlag, PixelsPerInch: __webpack_exports__PixelsPerInch, PromiseCapability: __webpack_exports__PromiseCapability, RenderingCancelledException: __webpack_exports__RenderingCancelledException, UnexpectedResponseException: __webpack_exports__UnexpectedResponseException, Util: __webpack_exports__Util, VerbosityLevel: __webpack_exports__VerbosityLevel, XfaLayer: __webpack_exports__XfaLayer, build: __webpack_exports__build, createValidAbsoluteUrl: __webpack_exports__createValidAbsoluteUrl, getDocument: __webpack_exports__getDocument, getFilenameFromUrl: __webpack_exports__getFilenameFromUrl, getPdfFilenameFromUrl: __webpack_exports__getPdfFilenameFromUrl, getXfaPageViewport: __webpack_exports__getXfaPageViewport, isDataScheme: __webpack_exports__isDataScheme, isPdfFile: __webpack_exports__isPdfFile, noContextMenu: __webpack_exports__noContextMenu, normalizeUnicode: __webpack_exports__normalizeUnicode, renderTextLayer: __webpack_exports__renderTextLayer, setLayerDimensions: __webpack_exports__setLayerDimensions, shadow: __webpack_exports__shadow, updateTextLayer: __webpack_exports__updateTextLayer, version: __webpack_exports__version }; | ||
/******/ | ||
+} | ||
|
||
//# sourceMappingURL=pdf.mjs.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
export default new Proxy({}, { | ||
get(target, prop) { | ||
return () => { | ||
throw new Error(`[pdfjs-serverless] canvas.${prop} is not implemented`) | ||
} | ||
export default new Proxy( | ||
{}, | ||
{ | ||
get(target, prop) { | ||
return () => { | ||
throw new Error(`[pdfjs-serverless] canvas.${prop} is not implemented`) | ||
} | ||
}, | ||
}, | ||
}) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.