@jsenv/core 27.0.0-alpha.64 → 27.0.0-alpha.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/dist/babel_helpers/AsyncGenerator/AsyncGenerator.js +95 -0
  2. package/dist/babel_helpers/AwaitValue/AwaitValue.js +3 -0
  3. package/dist/babel_helpers/applyDecoratorDescriptor/applyDecoratorDescriptor.js +29 -0
  4. package/dist/babel_helpers/arrayLikeToArray/arrayLikeToArray.js +9 -0
  5. package/dist/babel_helpers/arrayWithHoles/arrayWithHoles.js +4 -0
  6. package/dist/babel_helpers/arrayWithoutHoles/arrayWithoutHoles.js +5 -0
  7. package/dist/babel_helpers/assertThisInitialized/assertThisInitialized.js +8 -0
  8. package/dist/babel_helpers/asyncGeneratorDelegate/asyncGeneratorDelegate.js +52 -0
  9. package/dist/babel_helpers/asyncIterator/asyncIterator.js +78 -0
  10. package/dist/babel_helpers/asyncToGenerator/asyncToGenerator.js +39 -0
  11. package/dist/babel_helpers/awaitAsyncGenerator/awaitAsyncGenerator.js +4 -0
  12. package/dist/babel_helpers/classApplyDescriptorDestructureSet/classApplyDescriptorDestructureSet.js +24 -0
  13. package/dist/babel_helpers/classApplyDescriptorGet/classApplyDescriptorGet.js +7 -0
  14. package/dist/babel_helpers/classApplyDescriptorSet/classApplyDescriptorSet.js +14 -0
  15. package/dist/babel_helpers/classCallCheck/classCallCheck.js +5 -0
  16. package/dist/babel_helpers/classCheckPrivateStaticAccess/classCheckPrivateStaticAccess.js +5 -0
  17. package/dist/babel_helpers/classCheckPrivateStaticFieldDescriptor/classCheckPrivateStaticFieldDescriptor.js +6 -0
  18. package/dist/babel_helpers/classExtractFieldDescriptor/classExtractFieldDescriptor.js +8 -0
  19. package/dist/babel_helpers/classNameTDZError/classNameTDZError.js +4 -0
  20. package/dist/babel_helpers/classPrivateFieldDestructureSet/classPrivateFieldDestructureSet.js +6 -0
  21. package/dist/babel_helpers/classPrivateFieldGet/classPrivateFieldGet.js +6 -0
  22. package/dist/babel_helpers/classPrivateFieldLooseBase/classPrivateFieldLooseBase.js +7 -0
  23. package/dist/babel_helpers/classPrivateFieldLooseKey/classPrivateFieldLooseKey.js +5 -0
  24. package/dist/babel_helpers/classPrivateFieldSet/classPrivateFieldSet.js +7 -0
  25. package/dist/babel_helpers/classPrivateMethodGet/classPrivateMethodGet.js +7 -0
  26. package/dist/babel_helpers/classPrivateMethodSet/classPrivateMethodSet.js +3 -0
  27. package/dist/babel_helpers/classStaticPrivateFieldSpecGet/classStaticPrivateFieldSpecGet.js +8 -0
  28. package/dist/babel_helpers/classStaticPrivateFieldSpecSet/classStaticPrivateFieldSpecSet.js +9 -0
  29. package/dist/babel_helpers/classStaticPrivateMethodGet/classStaticPrivateMethodGet.js +5 -0
  30. package/dist/babel_helpers/classStaticPrivateMethodSet/classStaticPrivateMethodSet.js +3 -0
  31. package/dist/babel_helpers/construct/construct.js +15 -0
  32. package/dist/babel_helpers/createClass/createClass.js +18 -0
  33. package/dist/babel_helpers/createForOfIteratorHelper/createForOfIteratorHelper.js +63 -0
  34. package/dist/babel_helpers/createForOfIteratorHelperLoose/createForOfIteratorHelperLoose.js +22 -0
  35. package/dist/babel_helpers/createRawReactElement/createRawReactElement.js +50 -0
  36. package/dist/babel_helpers/createSuper/createSuper.js +22 -0
  37. package/dist/babel_helpers/decorate/decorate.js +622 -0
  38. package/dist/babel_helpers/defaults/defaults.js +14 -0
  39. package/dist/babel_helpers/defineEnumerableProperties/defineEnumerableProperties.js +26 -0
  40. package/dist/babel_helpers/defineProperty/defineProperty.js +19 -0
  41. package/dist/babel_helpers/extends/extends.js +16 -0
  42. package/dist/babel_helpers/get/get.js +21 -0
  43. package/dist/babel_helpers/getPrototypeOf/getPrototypeOf.js +2 -0
  44. package/dist/babel_helpers/inherits/inherits.js +21 -0
  45. package/dist/babel_helpers/inheritsLoose/inheritsLoose.js +6 -0
  46. package/dist/babel_helpers/initializerDefineProperty/initializerDefineProperty.js +10 -0
  47. package/dist/babel_helpers/initializerWarningHelper/initializerWarningHelper.js +3 -0
  48. package/dist/babel_helpers/instanceof/instanceof.js +7 -0
  49. package/dist/babel_helpers/interopRequireDefault/interopRequireDefault.js +5 -0
  50. package/dist/babel_helpers/interopRequireWildcard/interopRequireWildcard.js +49 -0
  51. package/dist/babel_helpers/isNativeFunction/isNativeFunction.js +4 -0
  52. package/dist/babel_helpers/isNativeReflectConstruct/isNativeReflectConstruct.js +21 -0
  53. package/dist/babel_helpers/iterableToArray/iterableToArray.js +3 -0
  54. package/dist/babel_helpers/iterableToArrayLimit/iterableToArrayLimit.js +38 -0
  55. package/dist/babel_helpers/iterableToArrayLimitLoose/iterableToArrayLimitLoose.js +13 -0
  56. package/dist/babel_helpers/jsx/jsx.js +49 -0
  57. package/dist/babel_helpers/maybeArrayLike/maybeArrayLike.js +10 -0
  58. package/dist/babel_helpers/newArrowCheck/newArrowCheck.js +5 -0
  59. package/dist/babel_helpers/nonIterableRest/nonIterableRest.js +3 -0
  60. package/dist/babel_helpers/nonIterableSpread/nonIterableSpread.js +3 -0
  61. package/dist/babel_helpers/objectDestructuringEmpty/objectDestructuringEmpty.js +3 -0
  62. package/dist/babel_helpers/objectSpread/objectSpread.js +22 -0
  63. package/dist/babel_helpers/objectSpread2/objectSpread2.js +41 -0
  64. package/dist/babel_helpers/objectWithoutProperties/objectWithoutProperties.js +20 -0
  65. package/dist/babel_helpers/objectWithoutPropertiesLoose/objectWithoutPropertiesLoose.js +15 -0
  66. package/dist/babel_helpers/possibleConstructorReturn/possibleConstructorReturn.js +10 -0
  67. package/dist/babel_helpers/readOnlyError/readOnlyError.js +4 -0
  68. package/dist/babel_helpers/readme.md +8 -0
  69. package/dist/babel_helpers/set/set.js +51 -0
  70. package/dist/babel_helpers/setPrototypeOf/setPrototypeOf.js +5 -0
  71. package/dist/babel_helpers/skipFirstGeneratorNext/skipFirstGeneratorNext.js +8 -0
  72. package/dist/babel_helpers/slicedToArray/slicedToArray.js +5 -0
  73. package/dist/babel_helpers/slicedToArrayLoose/slicedToArrayLoose.js +7 -0
  74. package/dist/babel_helpers/superPropBase/superPropBase.js +10 -0
  75. package/dist/babel_helpers/taggedTemplateLiteral/taggedTemplateLiteral.js +11 -0
  76. package/dist/babel_helpers/taggedTemplateLiteralLoose/taggedTemplateLiteralLoose.js +8 -0
  77. package/dist/babel_helpers/tdz/tdz.js +4 -0
  78. package/dist/babel_helpers/temporalRef/temporalRef.js +5 -0
  79. package/dist/babel_helpers/temporalUndefined/temporalUndefined.js +3 -0
  80. package/dist/babel_helpers/toArray/toArray.js +5 -0
  81. package/dist/babel_helpers/toConsumableArray/toConsumableArray.js +5 -0
  82. package/dist/babel_helpers/toPrimitive/toPrimitive.js +14 -0
  83. package/dist/babel_helpers/toPropertyKey/toPropertyKey.js +5 -0
  84. package/dist/babel_helpers/typeof/typeof.js +7 -0
  85. package/dist/babel_helpers/unsupportedIterableToArray/unsupportedIterableToArray.js +10 -0
  86. package/dist/babel_helpers/wrapAsyncGenerator/wrapAsyncGenerator.js +7 -0
  87. package/dist/babel_helpers/wrapNativeSuper/wrapNativeSuper.js +35 -0
  88. package/dist/babel_helpers/wrapRegExp/wrapRegExp.js +67 -0
  89. package/dist/babel_helpers/writeOnlyError/writeOnlyError.js +4 -0
  90. package/dist/html/explorer.html +557 -0
  91. package/dist/js/controllable_file.mjs +227 -0
  92. package/dist/{event_source_client.js → js/event_source_client.js} +19 -244
  93. package/dist/js/global_this.js +32 -0
  94. package/dist/js/html_supervisor_installer.js +522 -0
  95. package/dist/js/html_supervisor_setup.js +79 -0
  96. package/dist/{import_meta_hot.js → js/import_meta_hot.js} +1 -3
  97. package/dist/js/inline_content.js +8 -0
  98. package/dist/js/new_stylesheet.js +409 -0
  99. package/dist/js/regenerator_runtime.js +721 -0
  100. package/dist/js/s.js +429 -0
  101. package/dist/main.js +13450 -0
  102. package/dist/other/jsenv.png +0 -0
  103. package/dist/s.js.map +59 -62
  104. package/package.json +16 -12
  105. package/src/build/build.js +169 -68
  106. package/src/build/build_urls_generator.js +18 -2
  107. package/src/build/inject_service_worker_urls.js +1 -1
  108. package/src/build/resync_ressource_hints.js +56 -9
  109. package/src/dev/plugins/explorer/client/explorer.html +1 -1
  110. package/src/dev/plugins/explorer/jsenv_plugin_explorer.js +1 -1
  111. package/src/dev/start_dev_server.js +17 -3
  112. package/src/execute/execute.js +3 -0
  113. package/src/omega/errors.js +12 -9
  114. package/src/omega/kitchen.js +252 -217
  115. package/src/omega/server/file_service.js +1 -1
  116. package/src/omega/url_graph/url_graph_report.js +2 -2
  117. package/src/omega/url_graph/url_info_transformations.js +10 -5
  118. package/src/omega/url_graph.js +3 -2
  119. package/src/plugins/autoreload/dev_sse/jsenv_plugin_dev_sse_client.js +5 -10
  120. package/src/plugins/autoreload/jsenv_plugin_autoreload.js +1 -3
  121. package/src/plugins/bundling/js_module/bundle_js_module.js +66 -24
  122. package/src/plugins/file_urls/jsenv_plugin_file_urls.js +185 -53
  123. package/src/plugins/html_supervisor/jsenv_plugin_html_supervisor.js +9 -13
  124. package/src/plugins/http_urls/jsenv_plugin_http_urls.js +6 -6
  125. package/src/plugins/import_meta_hot/jsenv_plugin_import_meta_hot.js +5 -10
  126. package/src/plugins/inline/jsenv_plugin_js_inline_content.js +2 -2
  127. package/src/plugins/node_esm_resolution/jsenv_plugin_node_esm_resolution.js +12 -2
  128. package/src/plugins/node_runtime/jsenv_plugin_node_runtime.js +12 -0
  129. package/src/plugins/plugin_controller.js +17 -3
  130. package/src/plugins/plugins.js +16 -19
  131. package/src/plugins/transpilation/as_js_classic/jsenv_plugin_as_js_classic.js +17 -19
  132. package/src/plugins/transpilation/as_js_classic/{jsenv_plugin_script_type_module_as_classic.js → jsenv_plugin_as_js_classic_html.js} +0 -0
  133. package/src/plugins/transpilation/import_assertions/jsenv_plugin_import_assertions.js +9 -4
  134. package/src/plugins/transpilation/jsenv_plugin_transpilation.js +1 -2
  135. package/src/plugins/url_analysis/css/css_urls.js +1 -1
  136. package/src/plugins/url_analysis/html/html_urls.js +4 -1
  137. package/src/plugins/url_analysis/js/js_urls.js +3 -2
  138. package/src/plugins/url_analysis/jsenv_plugin_url_analysis.js +94 -1
  139. package/src/plugins/url_analysis/webmanifest/webmanifest_urls.js +3 -0
  140. package/src/plugins/url_resolution/jsenv_plugin_url_resolution.js +0 -3
  141. package/src/test/execute_plan.js +3 -1
  142. package/dist/event_source_client.js.map +0 -188
  143. package/dist/html_supervisor_installer.js +0 -1236
  144. package/dist/html_supervisor_installer.js.map +0 -337
  145. package/dist/html_supervisor_setup.js +0 -95
  146. package/dist/html_supervisor_setup.js.map +0 -57
  147. package/dist/import_meta_hot.js.map +0 -42
  148. package/src/jsenv_root_directory_url.js +0 -1
  149. package/src/omega/compat/default_runtime_compat.js +0 -11
  150. package/src/plugins/filesystem_magic/jsenv_plugin_filesystem_magic.js +0 -61
  151. package/src/plugins/transpilation/babel/new_stylesheet/client/.eslintrc.cjs +0 -24
@@ -1,337 +0,0 @@
1
- {
2
- "version": 3,
3
- "file": "html_supervisor_installer.js",
4
- "sources": [
5
- "../node_modules/@jsenv/uneval/src/internal/isComposite.js",
6
- "../node_modules/@jsenv/uneval/src/internal/global-value-path.js",
7
- "../node_modules/@jsenv/uneval/src/internal/decompose.js",
8
- "../node_modules/@jsenv/uneval/src/internal/sortRecipe.js",
9
- "../node_modules/@jsenv/uneval/src/internal/escapeString.js",
10
- "../node_modules/@jsenv/uneval/src/uneval.js",
11
- "../src/plugins/html_supervisor/client/uneval_exception.js",
12
- "../src/plugins/html_supervisor/client/error_in_document.js",
13
- "../src/plugins/html_supervisor/client/error_in_notification.js",
14
- "../src/plugins/html_supervisor/client/html_supervisor_installer.js"
15
- ],
16
- "sourcesContent": [
17
- "// https://developer.mozilla.org/en-US/docs/Glossary/Primitive\n\nexport const isComposite = (value) => {\n if (value === null) {\n return false\n }\n\n const type = typeof value\n if (type === \"object\") {\n return true\n }\n\n if (type === \"function\") {\n return true\n }\n\n return false\n}\n",
18
- "import { isComposite } from \"./isComposite.js\"\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap\nconst compositeWellKnownMap = new WeakMap()\nconst primitiveWellKnownMap = new Map()\n\nexport const getCompositeGlobalPath = (value) => compositeWellKnownMap.get(value)\n\nexport const getPrimitiveGlobalPath = (value) => primitiveWellKnownMap.get(value)\n\nconst visitGlobalObject = (value) => {\n const visitValue = (value, path) => {\n if (isComposite(value)) {\n // prevent infinite recursion\n if (compositeWellKnownMap.has(value)) {\n return\n }\n compositeWellKnownMap.set(value, path)\n\n const visitProperty = (property) => {\n let descriptor\n try {\n descriptor = Object.getOwnPropertyDescriptor(value, property)\n } catch (e) {\n if (e.name === \"SecurityError\") {\n return\n }\n throw e\n }\n\n if (!descriptor) {\n // it's apparently possible to have getOwnPropertyNames returning\n // a property that later returns a null descriptor\n // for instance window.showModalDialog in webkit 13.0\n return\n }\n\n // do not trigger getter/setter\n if (\"value\" in descriptor) {\n const propertyValue = descriptor.value\n visitValue(propertyValue, [...path, property])\n }\n }\n\n Object.getOwnPropertyNames(value).forEach((name) => visitProperty(name))\n Object.getOwnPropertySymbols(value).forEach((symbol) => visitProperty(symbol))\n }\n\n primitiveWellKnownMap.set(value, path)\n return\n }\n\n visitValue(value, [])\n}\n\nif (typeof window === \"object\") visitGlobalObject(window)\n\nif (typeof global === \"object\") visitGlobalObject(global)\n",
19
- "/**\n * transforms a javascript value into an object describing it.\n *\n */\n\nimport { isComposite } from \"./isComposite.js\"\nimport { getCompositeGlobalPath, getPrimitiveGlobalPath } from \"./global-value-path.js\"\n\nexport const decompose = (mainValue, { functionAllowed, prototypeStrict, ignoreSymbols }) => {\n const valueMap = {}\n const recipeArray = []\n\n const valueToIdentifier = (value, path = []) => {\n if (!isComposite(value)) {\n const existingIdentifier = identifierForPrimitive(value)\n if (existingIdentifier !== undefined) {\n return existingIdentifier\n }\n const identifier = identifierForNewValue(value)\n recipeArray[identifier] = primitiveToRecipe(value)\n return identifier\n }\n\n if (typeof Promise === \"function\" && value instanceof Promise) {\n throw new Error(createPromiseAreNotSupportedMessage({ path }))\n }\n if (typeof WeakSet === \"function\" && value instanceof WeakSet) {\n throw new Error(createWeakSetAreNotSupportedMessage({ path }))\n }\n if (typeof WeakMap === \"function\" && value instanceof WeakMap) {\n throw new Error(createWeakMapAreNotSupportedMessage({ path }))\n }\n if (typeof value === \"function\" && !functionAllowed) {\n throw new Error(createForbiddenFunctionMessage({ path }))\n }\n\n const existingIdentifier = identifierForComposite(value)\n if (existingIdentifier !== undefined) {\n return existingIdentifier\n }\n const identifier = identifierForNewValue(value)\n\n const compositeGlobalPath = getCompositeGlobalPath(value)\n if (compositeGlobalPath) {\n recipeArray[identifier] = createGlobalReferenceRecipe(compositeGlobalPath)\n return identifier\n }\n\n const propertyDescriptionArray = []\n Object.getOwnPropertyNames(value).forEach((propertyName) => {\n const propertyDescriptor = Object.getOwnPropertyDescriptor(value, propertyName)\n const propertyNameIdentifier = valueToIdentifier(propertyName, [...path, propertyName])\n const propertyDescription = computePropertyDescription(propertyDescriptor, propertyName, path)\n propertyDescriptionArray.push({ propertyNameIdentifier, propertyDescription })\n })\n\n const symbolDescriptionArray = []\n if (!ignoreSymbols) {\n Object.getOwnPropertySymbols(value).forEach((symbol) => {\n const propertyDescriptor = Object.getOwnPropertyDescriptor(value, symbol)\n const symbolIdentifier = valueToIdentifier(symbol, [...path, `[${symbol.toString()}]`])\n const propertyDescription = computePropertyDescription(propertyDescriptor, symbol, path)\n symbolDescriptionArray.push({ symbolIdentifier, propertyDescription })\n })\n }\n\n const methodDescriptionArray = computeMethodDescriptionArray(value, path)\n\n const extensible = Object.isExtensible(value)\n\n recipeArray[identifier] = createCompositeRecipe({\n propertyDescriptionArray,\n symbolDescriptionArray,\n methodDescriptionArray,\n extensible,\n })\n return identifier\n }\n\n const computePropertyDescription = (propertyDescriptor, propertyNameOrSymbol, path) => {\n if (propertyDescriptor.set && !functionAllowed) {\n throw new Error(createForbiddenPropertySetterMessage({ path, propertyNameOrSymbol }))\n }\n if (propertyDescriptor.get && !functionAllowed) {\n throw new Error(createForbiddenPropertyGetterMessage({ path, propertyNameOrSymbol }))\n }\n\n return {\n configurable: propertyDescriptor.configurable,\n writable: propertyDescriptor.writable,\n enumerable: propertyDescriptor.enumerable,\n getIdentifier:\n \"get\" in propertyDescriptor\n ? valueToIdentifier(propertyDescriptor.get, [\n ...path,\n String(propertyNameOrSymbol),\n \"[[descriptor:get]]\",\n ])\n : undefined,\n setIdentifier:\n \"set\" in propertyDescriptor\n ? valueToIdentifier(propertyDescriptor.set, [\n ...path,\n String(propertyNameOrSymbol),\n \"[[descriptor:set]]\",\n ])\n : undefined,\n valueIdentifier:\n \"value\" in propertyDescriptor\n ? valueToIdentifier(propertyDescriptor.value, [\n ...path,\n String(propertyNameOrSymbol),\n \"[[descriptor:value]]\",\n ])\n : undefined,\n }\n }\n\n const computeMethodDescriptionArray = (value, path) => {\n const methodDescriptionArray = []\n\n if (typeof Set === \"function\" && value instanceof Set) {\n const callArray = []\n value.forEach((entryValue, index) => {\n const entryValueIdentifier = valueToIdentifier(entryValue, [\n ...path,\n `[[SetEntryValue]]`,\n index,\n ])\n callArray.push([entryValueIdentifier])\n })\n methodDescriptionArray.push({ methodNameIdentifier: valueToIdentifier(\"add\"), callArray })\n }\n\n if (typeof Map === \"function\" && value instanceof Map) {\n const callArray = []\n value.forEach((entryValue, entryKey) => {\n const entryKeyIdentifier = valueToIdentifier(entryKey, [\n ...path,\n \"[[MapEntryKey]]\",\n entryKey,\n ])\n const entryValueIdentifier = valueToIdentifier(entryValue, [\n ...path,\n \"[[MapEntryValue]]\",\n entryValue,\n ])\n callArray.push([entryKeyIdentifier, entryValueIdentifier])\n })\n methodDescriptionArray.push({ methodNameIdentifier: valueToIdentifier(\"set\"), callArray })\n }\n\n return methodDescriptionArray\n }\n\n const identifierForPrimitive = (value) => {\n return Object.keys(valueMap).find((existingIdentifier) => {\n const existingValue = valueMap[existingIdentifier]\n if (Object.is(value, existingValue)) return true\n return value === existingValue\n })\n }\n\n const identifierForComposite = (value) => {\n return Object.keys(valueMap).find((existingIdentifier) => {\n const existingValue = valueMap[existingIdentifier]\n return value === existingValue\n })\n }\n\n const identifierForNewValue = (value) => {\n const identifier = nextIdentifier()\n valueMap[identifier] = value\n return identifier\n }\n\n let currentIdentifier = -1\n const nextIdentifier = () => {\n const identifier = String(parseInt(currentIdentifier) + 1)\n currentIdentifier = identifier\n return identifier\n }\n\n const mainIdentifier = valueToIdentifier(mainValue)\n\n // prototype, important to keep after the whole structure was visited\n // so that we discover if any prototype is part of the value\n const prototypeValueToIdentifier = (prototypeValue) => {\n // prototype is null\n if (prototypeValue === null) {\n return valueToIdentifier(prototypeValue)\n }\n\n // prototype found somewhere already\n const prototypeExistingIdentifier = identifierForComposite(prototypeValue)\n if (prototypeExistingIdentifier !== undefined) {\n return prototypeExistingIdentifier\n }\n\n // mark prototype as visited\n const prototypeIdentifier = identifierForNewValue(prototypeValue)\n\n // prototype is a global reference ?\n const prototypeGlobalPath = getCompositeGlobalPath(prototypeValue)\n if (prototypeGlobalPath) {\n recipeArray[prototypeIdentifier] = createGlobalReferenceRecipe(prototypeGlobalPath)\n return prototypeIdentifier\n }\n\n // otherwise prototype is unknown\n if (prototypeStrict) {\n throw new Error(createUnknownPrototypeMessage({ prototypeValue }))\n }\n\n return prototypeValueToIdentifier(Object.getPrototypeOf(prototypeValue), true)\n }\n const identifierForValueOf = (value, path = []) => {\n if (value instanceof Array) {\n return valueToIdentifier(value.length, [...path, \"length\"])\n }\n\n if (\"valueOf\" in value === false) {\n return undefined\n }\n\n if (typeof value.valueOf !== \"function\") {\n return undefined\n }\n\n const valueOfReturnValue = value.valueOf()\n if (!isComposite(valueOfReturnValue)) {\n return valueToIdentifier(valueOfReturnValue, [...path, \"valueOf()\"])\n }\n\n if (valueOfReturnValue === value) {\n return undefined\n }\n\n throw new Error(createUnexpectedValueOfReturnValueMessage())\n }\n\n recipeArray.slice().forEach((recipe, index) => {\n if (recipe.type === \"composite\") {\n const value = valueMap[index]\n\n if (typeof value === \"function\") {\n const valueOfIdentifier = nextIdentifier()\n recipeArray[valueOfIdentifier] = {\n type: \"primitive\",\n value,\n }\n recipe.valueOfIdentifier = valueOfIdentifier\n return\n }\n\n if (value instanceof RegExp) {\n const valueOfIdentifier = nextIdentifier()\n recipeArray[valueOfIdentifier] = {\n type: \"primitive\",\n value,\n }\n recipe.valueOfIdentifier = valueOfIdentifier\n return\n }\n\n // valueOf, mandatory to uneval new Date(10) for instance.\n recipe.valueOfIdentifier = identifierForValueOf(value)\n const prototypeValue = Object.getPrototypeOf(value)\n recipe.prototypeIdentifier = prototypeValueToIdentifier(prototypeValue, true)\n }\n })\n\n return {\n recipeArray,\n mainIdentifier,\n valueMap,\n }\n}\n\nconst primitiveToRecipe = (value) => {\n if (typeof value === \"symbol\") {\n return symbolToRecipe(value)\n }\n\n return createPimitiveRecipe(value)\n}\n\nconst symbolToRecipe = (symbol) => {\n const globalSymbolKey = Symbol.keyFor(symbol)\n if (globalSymbolKey !== undefined) {\n return createGlobalSymbolRecipe(globalSymbolKey)\n }\n\n const symbolGlobalPath = getPrimitiveGlobalPath(symbol)\n if (!symbolGlobalPath) {\n throw new Error(createUnknownSymbolMessage({ symbol }))\n }\n\n return createGlobalReferenceRecipe(symbolGlobalPath)\n}\n\nconst createPimitiveRecipe = (value) => {\n return {\n type: \"primitive\",\n value,\n }\n}\n\nconst createGlobalReferenceRecipe = (path) => {\n const recipe = {\n type: \"global-reference\",\n path,\n }\n return recipe\n}\n\nconst createGlobalSymbolRecipe = (key) => {\n return {\n type: \"global-symbol\",\n key,\n }\n}\n\nconst createCompositeRecipe = ({\n prototypeIdentifier,\n valueOfIdentifier,\n propertyDescriptionArray,\n symbolDescriptionArray,\n methodDescriptionArray,\n extensible,\n}) => {\n return {\n type: \"composite\",\n prototypeIdentifier,\n valueOfIdentifier,\n propertyDescriptionArray,\n symbolDescriptionArray,\n methodDescriptionArray,\n extensible,\n }\n}\n\nconst createPromiseAreNotSupportedMessage = ({ path }) => {\n if (path.length === 0) {\n return `promise are not supported.`\n }\n\n return `promise are not supported.\npromise found at: ${path.join(\"\")}`\n}\n\nconst createWeakSetAreNotSupportedMessage = ({ path }) => {\n if (path.length === 0) {\n return `weakSet are not supported.`\n }\n\n return `weakSet are not supported.\nweakSet found at: ${path.join(\"\")}`\n}\n\nconst createWeakMapAreNotSupportedMessage = ({ path }) => {\n if (path.length === 0) {\n return `weakMap are not supported.`\n }\n\n return `weakMap are not supported.\nweakMap found at: ${path.join(\"\")}`\n}\n\nconst createForbiddenFunctionMessage = ({ path }) => {\n if (path.length === 0) {\n return `function are not allowed.`\n }\n\n return `function are not allowed.\nfunction found at: ${path.join(\"\")}`\n}\n\nconst createForbiddenPropertyGetterMessage = ({\n path,\n propertyNameOrSymbol,\n}) => `property getter are not allowed.\ngetter found on property: ${String(propertyNameOrSymbol)}\nat: ${path.join(\"\")}`\n\nconst createForbiddenPropertySetterMessage = ({\n path,\n propertyNameOrSymbol,\n}) => `property setter are not allowed.\nsetter found on property: ${String(propertyNameOrSymbol)}\nat: ${path.join(\"\")}`\n\nconst createUnexpectedValueOfReturnValueMessage = () =>\n `valueOf() must return a primitive of the object itself.`\n\nconst createUnknownSymbolMessage = ({\n symbol,\n}) => `symbol must be global, like Symbol.iterator, or created using Symbol.for().\nsymbol: ${symbol.toString()}`\n\nconst createUnknownPrototypeMessage = ({ prototypeValue }) =>\n `prototype must be global, like Object.prototype, or somewhere in the value.\nprototype constructor name: ${prototypeValue.constructor.name}`\n",
20
- "// be carefull because this function is mutating recipe objects inside the recipeArray.\n// this is not an issue because each recipe object is not accessible from the outside\n// when used internally by uneval\nexport const sortRecipe = (recipeArray) => {\n const findInRecipePrototypeChain = (recipe, callback) => {\n let currentRecipe = recipe\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (currentRecipe.type !== \"composite\") {\n break\n }\n\n const prototypeIdentifier = currentRecipe.prototypeIdentifier\n if (prototypeIdentifier === undefined) {\n break\n }\n\n currentRecipe = recipeArray[prototypeIdentifier]\n\n if (callback(currentRecipe, prototypeIdentifier)) {\n return prototypeIdentifier\n }\n }\n return undefined\n }\n\n const recipeArrayOrdered = recipeArray.slice()\n recipeArrayOrdered.sort((leftRecipe, rightRecipe) => {\n const leftType = leftRecipe.type\n const rightType = rightRecipe.type\n\n if (leftType === \"composite\" && rightType === \"composite\") {\n const rightRecipeIsInLeftRecipePrototypeChain = findInRecipePrototypeChain(\n leftRecipe,\n (recipeCandidate) => recipeCandidate === rightRecipe,\n )\n // if left recipe requires right recipe, left must be after right\n if (rightRecipeIsInLeftRecipePrototypeChain) {\n return 1\n }\n\n const leftRecipeIsInRightRecipePrototypeChain = findInRecipePrototypeChain(\n rightRecipe,\n (recipeCandidate) => recipeCandidate === leftRecipe,\n )\n // if right recipe requires left recipe, right must be after left\n if (leftRecipeIsInRightRecipePrototypeChain) {\n return -1\n }\n }\n\n if (leftType !== rightType) {\n // if left is a composite, left must be after right\n if (leftType === \"composite\") {\n return 1\n }\n\n // if right is a composite, right must be after left\n if (rightType === \"composite\") {\n return -1\n }\n }\n\n const leftIndex = recipeArray.indexOf(leftRecipe)\n const rightIndex = recipeArray.indexOf(rightRecipe)\n // left was before right, don't change that\n if (leftIndex < rightIndex) {\n return -1\n }\n\n // right was after left, don't change that\n return 1\n })\n\n return recipeArrayOrdered\n}\n",
21
- "// https://github.com/joliss/js-string-escape/blob/master/index.js\n// http://javascript.crockford.com/remedial.html\nexport const escapeString = (value) => {\n const string = String(value)\n let i = 0\n const j = string.length\n var escapedString = \"\"\n while (i < j) {\n const char = string[i]\n let escapedChar\n if (char === '\"' || char === \"'\" || char === \"\\\\\") {\n escapedChar = `\\\\${char}`\n } else if (char === \"\\n\") {\n escapedChar = \"\\\\n\"\n } else if (char === \"\\r\") {\n escapedChar = \"\\\\r\"\n } else if (char === \"\\u2028\") {\n escapedChar = \"\\\\u2028\"\n } else if (char === \"\\u2029\") {\n escapedChar = \"\\\\u2029\"\n } else {\n escapedChar = char\n }\n escapedString += escapedChar\n i++\n }\n return escapedString\n}\n",
22
- "import { decompose } from \"./internal/decompose.js\"\nimport { sortRecipe } from \"./internal/sortRecipe.js\"\nimport { escapeString } from \"./internal/escapeString.js\"\n\nexport const uneval = (\n value,\n { functionAllowed = false, prototypeStrict = false, ignoreSymbols = false } = {},\n) => {\n const { recipeArray, mainIdentifier, valueMap } = decompose(value, {\n functionAllowed,\n prototypeStrict,\n ignoreSymbols,\n })\n const recipeArraySorted = sortRecipe(recipeArray)\n\n let source = `(function () {\nvar globalObject\ntry {\n globalObject = Function('return this')() || (42, eval)('this');\n} catch(e) {\n globalObject = window;\n}\n\nfunction safeDefineProperty(object, propertyNameOrSymbol, descriptor) {\n var currentDescriptor = Object.getOwnPropertyDescriptor(object, propertyNameOrSymbol);\n if (currentDescriptor && !currentDescriptor.configurable) return\n Object.defineProperty(object, propertyNameOrSymbol, descriptor)\n};\n`\n\n const variableNameMap = {}\n recipeArray.forEach((recipe, index) => {\n const indexSorted = recipeArraySorted.indexOf(recipe)\n variableNameMap[index] = `_${indexSorted}`\n })\n\n const identifierToVariableName = (identifier) => variableNameMap[identifier]\n\n const recipeToSetupSource = (recipe) => {\n if (recipe.type === \"primitive\") return primitiveRecipeToSetupSource(recipe)\n if (recipe.type === \"global-symbol\") return globalSymbolRecipeToSetupSource(recipe)\n if (recipe.type === \"global-reference\") return globalReferenceRecipeToSetupSource(recipe)\n return compositeRecipeToSetupSource(recipe)\n }\n\n const primitiveRecipeToSetupSource = ({ value }) => {\n const type = typeof value\n\n if (type === \"string\") {\n return `\"${escapeString(value)}\";`\n }\n\n if (type === \"bigint\") {\n return `${value.toString()}n`\n }\n\n if (Object.is(value, -0)) {\n return \"-0;\"\n }\n\n return `${String(value)};`\n }\n\n const globalSymbolRecipeToSetupSource = (recipe) => {\n return `Symbol.for(\"${escapeString(recipe.key)}\");`\n }\n\n const globalReferenceRecipeToSetupSource = (recipe) => {\n const pathSource = recipe.path.map((part) => `[\"${escapeString(part)}\"]`).join(\"\")\n return `globalObject${pathSource};`\n }\n\n const compositeRecipeToSetupSource = ({ prototypeIdentifier, valueOfIdentifier }) => {\n if (prototypeIdentifier === undefined) {\n return identifierToVariableName(valueOfIdentifier)\n }\n\n const prototypeValue = valueMap[prototypeIdentifier]\n if (prototypeValue === null) {\n return `Object.create(null);`\n }\n\n const prototypeConstructor = prototypeValue.constructor\n if (prototypeConstructor === Object) {\n return `Object.create(${identifierToVariableName(prototypeIdentifier)});`\n }\n\n if (valueOfIdentifier === undefined) {\n return `new ${prototypeConstructor.name}();`\n }\n\n if (prototypeConstructor.name === \"BigInt\") {\n return `Object(${identifierToVariableName(valueOfIdentifier)})`\n }\n\n return `new ${prototypeConstructor.name}(${identifierToVariableName(valueOfIdentifier)});`\n }\n\n recipeArraySorted.forEach((recipe) => {\n const recipeVariableName = identifierToVariableName(recipeArray.indexOf(recipe))\n source += `var ${recipeVariableName} = ${recipeToSetupSource(recipe, recipeVariableName)}\n`\n })\n\n const recipeToMutateSource = (recipe, recipeVariableName) => {\n if (recipe.type === \"composite\") {\n return compositeRecipeToMutateSource(recipe, recipeVariableName)\n }\n return ``\n }\n\n const compositeRecipeToMutateSource = (\n { propertyDescriptionArray, symbolDescriptionArray, methodDescriptionArray, extensible },\n recipeVariableName,\n ) => {\n let mutateSource = ``\n\n propertyDescriptionArray.forEach(({ propertyNameIdentifier, propertyDescription }) => {\n mutateSource += generateDefinePropertySource(\n recipeVariableName,\n propertyNameIdentifier,\n propertyDescription,\n )\n })\n\n symbolDescriptionArray.forEach(({ symbolIdentifier, propertyDescription }) => {\n mutateSource += generateDefinePropertySource(\n recipeVariableName,\n symbolIdentifier,\n propertyDescription,\n )\n })\n\n methodDescriptionArray.forEach(({ methodNameIdentifier, callArray }) => {\n mutateSource += generateMethodCallSource(recipeVariableName, methodNameIdentifier, callArray)\n })\n\n if (!extensible) {\n mutateSource += generatePreventExtensionSource(recipeVariableName)\n }\n\n return mutateSource\n }\n\n const generateDefinePropertySource = (\n recipeVariableName,\n propertyNameOrSymbolIdentifier,\n propertyDescription,\n ) => {\n const propertyOrSymbolVariableName = identifierToVariableName(propertyNameOrSymbolIdentifier)\n\n const propertyDescriptorSource = generatePropertyDescriptorSource(propertyDescription)\n return `safeDefineProperty(${recipeVariableName}, ${propertyOrSymbolVariableName}, ${propertyDescriptorSource});`\n }\n\n const generatePropertyDescriptorSource = ({\n configurable,\n writable,\n enumerable,\n getIdentifier,\n setIdentifier,\n valueIdentifier,\n }) => {\n if (valueIdentifier === undefined) {\n return `{\n configurable: ${configurable},\n enumerable: ${enumerable},\n get: ${getIdentifier === undefined ? undefined : identifierToVariableName(getIdentifier)},\n set: ${setIdentifier === undefined ? undefined : identifierToVariableName(setIdentifier)},\n}`\n }\n\n return `{\n configurable: ${configurable},\n writable: ${writable},\n enumerable: ${enumerable},\n value: ${valueIdentifier === undefined ? undefined : identifierToVariableName(valueIdentifier)}\n}`\n }\n\n const generateMethodCallSource = (recipeVariableName, methodNameIdentifier, callArray) => {\n let methodCallSource = ``\n\n const methodVariableName = identifierToVariableName(methodNameIdentifier)\n callArray.forEach((argumentIdentifiers) => {\n const argumentVariableNames = argumentIdentifiers.map((argumentIdentifier) =>\n identifierToVariableName(argumentIdentifier),\n )\n\n methodCallSource += `${recipeVariableName}[${methodVariableName}](${argumentVariableNames.join(\n \",\",\n )});`\n })\n\n return methodCallSource\n }\n\n const generatePreventExtensionSource = (recipeVariableName) => {\n return `Object.preventExtensions(${recipeVariableName});`\n }\n\n recipeArraySorted.forEach((recipe) => {\n const recipeVariableName = identifierToVariableName(recipeArray.indexOf(recipe))\n source += `${recipeToMutateSource(recipe, recipeVariableName)}`\n })\n\n source += `return ${identifierToVariableName(mainIdentifier)}; })()`\n\n return source\n}\n",
23
- "import { uneval } from \"@jsenv/uneval\"\n\nexport const unevalException = (value) => {\n if (value && value.hasOwnProperty(\"toString\")) {\n delete value.toString\n }\n return uneval(value, { ignoreSymbols: true })\n}\n",
24
- "export const displayErrorInDocument = (error) => {\n const title = \"An error occured\"\n let theme =\n error && error.cause && error.cause.code === \"PARSE_ERROR\"\n ? \"light\"\n : \"dark\"\n let message = errorToHTML(error)\n const css = `\n .jsenv-console {\n background: rgba(0, 0, 0, 0.95);\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n z-index: 1000;\n box-sizing: border-box;\n padding: 1em;\n }\n\n .jsenv-console h1 {\n color: red;\n display: flex;\n align-items: center;\n }\n\n #button-close-jsenv-console {\n margin-left: 10px;\n }\n\n .jsenv-console pre {\n overflow: auto;\n max-width: 70em;\n /* avoid scrollbar to hide the text behind it */\n padding: 20px;\n }\n\n .jsenv-console pre[data-theme=\"dark\"] {\n background: #111;\n border: 1px solid #333;\n color: #eee;\n }\n\n .jsenv-console pre[data-theme=\"light\"] {\n background: #1E1E1E;\n border: 1px solid white;\n color: #EEEEEE;\n }\n\n .jsenv-console pre a {\n color: inherit;\n }\n `\n const html = `\n <style type=\"text/css\">${css}></style>\n <div class=\"jsenv-console\">\n <h1>${title} <button id=\"button-close-jsenv-console\">X</button></h1>\n <pre data-theme=\"${theme}\">${message}</pre>\n </div>\n `\n const removeJsenvConsole = appendHMTLInside(html, document.body)\n\n document.querySelector(\"#button-close-jsenv-console\").onclick = () => {\n removeJsenvConsole()\n }\n}\n\nconst escapeHtml = (string) => {\n return string\n .replace(/&/g, \"&amp;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")\n .replace(/\"/g, \"&quot;\")\n .replace(/'/g, \"&#039;\")\n}\n\nconst errorToHTML = (error) => {\n let html\n\n if (error && error instanceof Error) {\n if (error.cause && error.cause.code === \"PARSE_ERROR\") {\n html = error.messageHTML || escapeHtml(error.message)\n }\n // stackTrace formatted by V8\n else if (Error.captureStackTrace) {\n html = escapeHtml(error.stack)\n } else {\n // other stack trace such as firefox do not contain error.message\n html = escapeHtml(`${error.message}\n ${error.stack}`)\n }\n } else if (typeof error === \"string\") {\n html = error\n } else if (error === undefined) {\n html = \"undefined\"\n } else {\n html = JSON.stringify(error)\n }\n\n const htmlWithCorrectLineBreaks = html.replace(/\\n/g, \"\\n\")\n const htmlWithLinks = stringToStringWithLink(htmlWithCorrectLineBreaks, {\n transform: (url) => {\n return { href: url, text: url }\n },\n })\n return htmlWithLinks\n}\n\n// `Error: yo\n// at Object.execute (http://127.0.0.1:57300/build/src/__test__/file-throw.js:9:13)\n// at doExec (http://127.0.0.1:3000/src/__test__/file-throw.js:452:38)\n// at postOrderExec (http://127.0.0.1:3000/src/__test__/file-throw.js:448:16)\n// at http://127.0.0.1:3000/src/__test__/file-throw.js:399:18`.replace(/(?:https?|ftp|file):\\/\\/(.*+)$/gm, (...args) => {\n// debugger\n// })\nconst stringToStringWithLink = (\n source,\n {\n transform = (url) => {\n return {\n href: url,\n text: url,\n }\n },\n } = {},\n) => {\n return source.replace(/(?:https?|ftp|file):\\/\\/\\S+/gm, (match) => {\n let linkHTML = \"\"\n\n const lastChar = match[match.length - 1]\n\n // hotfix because our url regex sucks a bit\n const endsWithSeparationChar = lastChar === \")\" || lastChar === \":\"\n if (endsWithSeparationChar) {\n match = match.slice(0, -1)\n }\n\n const lineAndColumnPattern = /:([0-9]+):([0-9]+)$/\n const lineAndColumMatch = match.match(lineAndColumnPattern)\n if (lineAndColumMatch) {\n const lineAndColumnString = lineAndColumMatch[0]\n const lineNumber = lineAndColumMatch[1]\n const columnNumber = lineAndColumMatch[2]\n const url = match.slice(0, -lineAndColumnString.length)\n const { href, text } = transform(url)\n linkHTML = link({ href, text: `${text}:${lineNumber}:${columnNumber}` })\n } else {\n const linePattern = /:([0-9]+)$/\n const lineMatch = match.match(linePattern)\n if (lineMatch) {\n const lineString = lineMatch[0]\n const lineNumber = lineMatch[1]\n const url = match.slice(0, -lineString.length)\n const { href, text } = transform(url)\n linkHTML = link({\n href,\n text: `${text}:${lineNumber}`,\n })\n } else {\n const url = match\n const { href, text } = transform(url)\n linkHTML = link({ href, text })\n }\n }\n\n if (endsWithSeparationChar) {\n return `${linkHTML}${lastChar}`\n }\n return linkHTML\n })\n}\n\nconst link = ({ href, text = href }) => `<a href=\"${href}\">${text}</a>`\n\nconst appendHMTLInside = (html, parentNode) => {\n const temoraryParent = document.createElement(\"div\")\n temoraryParent.innerHTML = html\n return transferChildren(temoraryParent, parentNode)\n}\n\nconst transferChildren = (fromNode, toNode) => {\n const childNodes = [].slice.call(fromNode.childNodes, 0)\n let i = 0\n while (i < childNodes.length) {\n toNode.appendChild(childNodes[i])\n i++\n }\n return () => {\n let c = 0\n while (c < childNodes.length) {\n fromNode.appendChild(childNodes[c])\n c++\n }\n }\n}\n",
25
- "const { Notification } = window\n\nconst displayErrorNotificationNotAvailable = () => {}\n\nconst displayErrorNotificationImplementation = (error, { icon } = {}) => {\n if (Notification.permission === \"granted\") {\n const notification = new Notification(\"An error occured\", {\n lang: \"en\",\n body: error ? error.stack : \"undefined\",\n icon,\n })\n notification.onclick = () => {\n window.focus()\n }\n }\n}\n\nexport const displayErrorNotification =\n typeof Notification === \"function\"\n ? displayErrorNotificationImplementation\n : displayErrorNotificationNotAvailable\n",
26
- "import { unevalException } from \"./uneval_exception.js\"\nimport { displayErrorInDocument } from \"./error_in_document.js\"\nimport { displayErrorNotification } from \"./error_in_notification.js\"\n\nconst { __html_supervisor__ } = window\n\nexport const installHtmlSupervisor = ({ logs, measurePerf }) => {\n const errorTransformer = null // could implement error stack remapping if needed\n const scriptExecutionResults = {}\n let collectCalled = false\n let pendingExecutionCount = 0\n let resolveScriptExecutionsPromise\n const scriptExecutionsPromise = new Promise((resolve) => {\n resolveScriptExecutionsPromise = resolve\n })\n const onExecutionStart = (name) => {\n scriptExecutionResults[name] = null // ensure execution order is reflected into the object\n pendingExecutionCount++\n if (measurePerf) {\n performance.mark(`execution_start`)\n }\n }\n const onExecutionSettled = (name, executionResult) => {\n if (measurePerf) {\n performance.measure(`execution`, `execution_start`)\n }\n scriptExecutionResults[name] = executionResult\n pendingExecutionCount--\n if (pendingExecutionCount === 0 && collectCalled) {\n resolveScriptExecutionsPromise()\n }\n }\n const onExecutionError = (\n executionResult,\n {\n currentScript,\n errorExposureInNotification = false,\n errorExposureInDocument = true,\n },\n ) => {\n const error = executionResult.error\n if (error && error.code === \"NETWORK_FAILURE\") {\n if (currentScript) {\n const errorEvent = new Event(\"error\")\n currentScript.dispatchEvent(errorEvent)\n }\n } else if (typeof error === \"object\") {\n const globalErrorEvent = new Event(\"error\")\n globalErrorEvent.filename = error.filename\n globalErrorEvent.lineno = error.line || error.lineno\n globalErrorEvent.colno = error.column || error.columnno\n globalErrorEvent.message = error.message\n window.dispatchEvent(globalErrorEvent)\n }\n if (errorExposureInNotification) {\n displayErrorNotification(error)\n }\n if (errorExposureInDocument) {\n displayErrorInDocument(error)\n }\n executionResult.exceptionSource = unevalException(error)\n delete executionResult.error\n }\n const getNavigationStartTime = () => {\n try {\n return window.performance.timing.navigationStart\n } catch (e) {\n return Date.now()\n }\n }\n\n const performExecution = async ({\n src,\n type,\n currentScript,\n execute,\n // https://developer.mozilla.org/en-US/docs/web/html/element/script\n }) => {\n if (logs) {\n console.group(`[jsenv] loading ${type} ${src}`)\n }\n onExecutionStart(src)\n let completed\n let result\n let error\n try {\n result = await execute()\n completed = true\n } catch (e) {\n completed = false\n error = e\n }\n if (completed) {\n const executionResult = {\n status: \"completed\",\n namespace: result,\n coverage: window.__coverage__,\n }\n onExecutionSettled(src, executionResult)\n if (logs) {\n console.log(`${type} load ended`)\n console.groupEnd()\n }\n return\n }\n const executionResult = {\n status: \"errored\",\n coverage: window.__coverage__,\n }\n let errorExposureInConsole = true\n if (error.name === \"SyntaxError\") {\n // errorExposureInConsole = false\n }\n if (errorTransformer) {\n try {\n error = await errorTransformer(error)\n } catch (e) {}\n }\n executionResult.error = error\n onExecutionSettled(src, executionResult)\n onExecutionError(executionResult, {\n currentScript,\n })\n if (errorExposureInConsole) {\n if (typeof window.reportError === \"function\") {\n window.reportError(error)\n } else {\n console.error(error)\n }\n }\n if (logs) {\n console.groupEnd()\n }\n }\n\n const queue = []\n let previousDonePromise = null\n const dequeue = () => {\n const next = queue.shift()\n if (next) {\n __html_supervisor__.addScriptToExecute(next)\n } else {\n const nextDefered = deferQueue.shift()\n if (nextDefered) {\n __html_supervisor__.addScriptToExecute(nextDefered)\n }\n }\n }\n const deferQueue = []\n let previousDeferDonePromise = null\n __html_supervisor__.addScriptToExecute = async (scriptToExecute) => {\n if (scriptToExecute.async) {\n performExecution(scriptToExecute)\n return\n }\n const useDeferQueue =\n scriptToExecute.defer || scriptToExecute.type === \"js_module\"\n if (useDeferQueue) {\n if (document.readyState !== \"interactive\") {\n deferQueue.push(scriptToExecute)\n return\n }\n if (previousDonePromise) {\n // defer must wait for the regular script to be done\n deferQueue.push(scriptToExecute)\n return\n }\n if (previousDeferDonePromise) {\n deferQueue.push(scriptToExecute)\n return\n }\n previousDeferDonePromise = performExecution(scriptToExecute)\n await previousDeferDonePromise\n previousDeferDonePromise = null\n dequeue()\n return\n }\n if (previousDonePromise) {\n queue.push(scriptToExecute)\n return\n }\n previousDonePromise = performExecution(scriptToExecute)\n await previousDonePromise\n previousDonePromise = null\n dequeue()\n }\n if (\n document.readyState !== \"interactive\" &&\n document.readyState !== \"complete\"\n ) {\n document.addEventListener(\"readystatechange\", () => {\n if (document.readyState === \"interactive\") {\n const nextDefered = deferQueue.shift()\n if (nextDefered) {\n __html_supervisor__.addScriptToExecute(nextDefered)\n }\n }\n })\n }\n\n __html_supervisor__.collectScriptResults = async () => {\n collectCalled = true\n if (pendingExecutionCount === 0) {\n resolveScriptExecutionsPromise()\n } else {\n await scriptExecutionsPromise\n }\n\n let status = \"completed\"\n let exceptionSource = \"\"\n Object.keys(scriptExecutionResults).forEach((key) => {\n const scriptExecutionResult = scriptExecutionResults[key]\n if (scriptExecutionResult.status === \"errored\") {\n status = \"errored\"\n exceptionSource = scriptExecutionResult.exceptionSource\n }\n })\n return {\n status,\n ...(status === \"errored\" ? { exceptionSource } : {}),\n startTime: getNavigationStartTime(),\n endTime: Date.now(),\n scriptExecutionResults,\n }\n }\n\n const { scriptsToExecute } = __html_supervisor__\n const copy = scriptsToExecute.slice()\n scriptsToExecute.length = 0\n copy.forEach((scriptToExecute) => {\n __html_supervisor__.addScriptToExecute(scriptToExecute)\n })\n}\n\nexport const superviseScriptTypeModule = ({ src, isInline }) => {\n __html_supervisor__.addScriptToExecute({\n src,\n type: \"js_module\",\n isInline,\n execute: () => import(new URL(src, document.location.href).href),\n })\n}\n"
27
- ],
28
- "names": [
29
- "isComposite",
30
- "value",
31
- "type",
32
- "compositeWellKnownMap",
33
- "WeakMap",
34
- "primitiveWellKnownMap",
35
- "get",
36
- "getPrimitiveGlobalPath",
37
- "visitGlobalObject",
38
- "visitValue",
39
- "path",
40
- "has",
41
- "set",
42
- "descriptor",
43
- "Object",
44
- "getOwnPropertyDescriptor",
45
- "property",
46
- "e",
47
- "name",
48
- "getOwnPropertyNames",
49
- "visitProperty",
50
- "getOwnPropertySymbols",
51
- "forEach",
52
- "symbol",
53
- "window",
54
- "global",
55
- "functionAllowed",
56
- "ignoreSymbols",
57
- "valueMap",
58
- "recipeArray",
59
- "identifierForPrimitive",
60
- "undefined",
61
- "identifier",
62
- "identifierForNewValue",
63
- "primitiveToRecipe",
64
- "Promise",
65
- "Error",
66
- "createPromiseAreNotSupportedMessage",
67
- "createWeakSetAreNotSupportedMessage",
68
- "createForbiddenFunctionMessage",
69
- "existingIdentifier",
70
- "getCompositeGlobalPath",
71
- "compositeGlobalPath",
72
- "createGlobalReferenceRecipe",
73
- "propertyDescriptionArray",
74
- "propertyDescriptor",
75
- "propertyName",
76
- "propertyNameIdentifier",
77
- "valueToIdentifier",
78
- "propertyDescription",
79
- "computePropertyDescription",
80
- "symbolDescriptionArray",
81
- "symbolIdentifier",
82
- "toString",
83
- "push",
84
- "methodDescriptionArray",
85
- "createCompositeRecipe",
86
- "propertyNameOrSymbol",
87
- "createForbiddenPropertySetterMessage",
88
- "configurable",
89
- "writable",
90
- "String",
91
- "setIdentifier",
92
- "valueIdentifier",
93
- "computeMethodDescriptionArray",
94
- "Set",
95
- "callArray",
96
- "entryValue",
97
- "index",
98
- "entryValueIdentifier",
99
- "Map",
100
- "entryKeyIdentifier",
101
- "entryKey",
102
- "methodNameIdentifier",
103
- "find",
104
- "existingValue",
105
- "is",
106
- "identifierForComposite",
107
- "nextIdentifier",
108
- "currentIdentifier",
109
- "parseInt",
110
- "mainIdentifier",
111
- "mainValue",
112
- "prototypeValueToIdentifier",
113
- "prototypeValue",
114
- "prototypeExistingIdentifier",
115
- "prototypeGlobalPath",
116
- "prototypeIdentifier",
117
- "prototypeStrict",
118
- "createUnknownPrototypeMessage",
119
- "Array",
120
- "length",
121
- "valueOfReturnValue",
122
- "valueOf",
123
- "createUnexpectedValueOfReturnValueMessage",
124
- "slice",
125
- "valueOfIdentifier",
126
- "recipe",
127
- "RegExp",
128
- "identifierForValueOf",
129
- "getPrototypeOf",
130
- "symbolToRecipe",
131
- "createPimitiveRecipe",
132
- "globalSymbolKey",
133
- "createGlobalSymbolRecipe",
134
- "symbolGlobalPath",
135
- "createUnknownSymbolMessage",
136
- "key",
137
- "join",
138
- "createWeakMapAreNotSupportedMessage",
139
- "createForbiddenPropertyGetterMessage",
140
- "constructor",
141
- "sortRecipe",
142
- "findInRecipePrototypeChain",
143
- "callback",
144
- "currentRecipe",
145
- "recipeArrayOrdered",
146
- "sort",
147
- "leftRecipe",
148
- "rightRecipe",
149
- "leftType",
150
- "rightType",
151
- "rightRecipeIsInLeftRecipePrototypeChain",
152
- "recipeCandidate",
153
- "leftRecipeIsInRightRecipePrototypeChain",
154
- "leftIndex",
155
- "indexOf",
156
- "rightIndex",
157
- "escapeString",
158
- "string",
159
- "i",
160
- "j",
161
- "escapedString",
162
- "char",
163
- "escapedChar",
164
- "uneval",
165
- "decompose",
166
- "recipeArraySorted",
167
- "source",
168
- "variableNameMap",
169
- "indexSorted",
170
- "identifierToVariableName",
171
- "recipeToSetupSource",
172
- "primitiveRecipeToSetupSource",
173
- "globalSymbolRecipeToSetupSource",
174
- "globalReferenceRecipeToSetupSource",
175
- "pathSource",
176
- "map",
177
- "part",
178
- "compositeRecipeToSetupSource",
179
- "prototypeConstructor",
180
- "recipeVariableName",
181
- "recipeToMutateSource",
182
- "compositeRecipeToMutateSource",
183
- "mutateSource",
184
- "generateDefinePropertySource",
185
- "generateMethodCallSource",
186
- "propertyNameOrSymbolIdentifier",
187
- "propertyDescriptorSource",
188
- "generatePropertyDescriptorSource",
189
- "propertyOrSymbolVariableName",
190
- "enumerable",
191
- "getIdentifier",
192
- "methodCallSource",
193
- "argumentIdentifiers",
194
- "argumentVariableNames",
195
- "argumentIdentifier",
196
- "methodVariableName",
197
- "generatePreventExtensionSource",
198
- "unevalException",
199
- "hasOwnProperty",
200
- "displayErrorInDocument",
201
- "error",
202
- "title",
203
- "theme",
204
- "cause",
205
- "code",
206
- "message",
207
- "errorToHTML",
208
- "css",
209
- "html",
210
- "removeJsenvConsole",
211
- "appendHMTLInside",
212
- "document",
213
- "body",
214
- "querySelector",
215
- "onclick",
216
- "escapeHtml",
217
- "replace",
218
- "messageHTML",
219
- "captureStackTrace",
220
- "stack",
221
- "JSON",
222
- "stringify",
223
- "htmlWithCorrectLineBreaks",
224
- "htmlWithLinks",
225
- "stringToStringWithLink",
226
- "transform",
227
- "url",
228
- "href",
229
- "text",
230
- "match",
231
- "linkHTML",
232
- "lastChar",
233
- "endsWithSeparationChar",
234
- "lineAndColumnPattern",
235
- "lineAndColumMatch",
236
- "lineAndColumnString",
237
- "lineNumber",
238
- "columnNumber",
239
- "link",
240
- "linePattern",
241
- "lineMatch",
242
- "lineString",
243
- "parentNode",
244
- "temoraryParent",
245
- "createElement",
246
- "innerHTML",
247
- "transferChildren",
248
- "fromNode",
249
- "toNode",
250
- "childNodes",
251
- "call",
252
- "appendChild",
253
- "c",
254
- "Notification",
255
- "displayErrorNotificationNotAvailable",
256
- "displayErrorNotificationImplementation",
257
- "icon",
258
- "permission",
259
- "notification",
260
- "lang",
261
- "focus",
262
- "displayErrorNotification",
263
- "installHtmlSupervisor",
264
- "logs",
265
- "scriptExecutionResults",
266
- "pendingExecutionCount",
267
- "resolveScriptExecutionsPromise",
268
- "resolve",
269
- "onExecutionStart",
270
- "measurePerf",
271
- "performance",
272
- "mark",
273
- "onExecutionSettled",
274
- "executionResult",
275
- "measure",
276
- "collectCalled",
277
- "errorEvent",
278
- "currentScript",
279
- "dispatchEvent",
280
- "globalErrorEvent",
281
- "Event",
282
- "filename",
283
- "line",
284
- "lineno",
285
- "colno",
286
- "column",
287
- "columnno",
288
- "errorExposureInDocument",
289
- "exceptionSource",
290
- "timing",
291
- "navigationStart",
292
- "Date",
293
- "now",
294
- "performExecution",
295
- "execute",
296
- "console",
297
- "src",
298
- "completed",
299
- "result",
300
- "status",
301
- "namespace",
302
- "coverage",
303
- "__coverage__",
304
- "log",
305
- "groupEnd",
306
- "reportError",
307
- "queue",
308
- "previousDonePromise",
309
- "dequeue",
310
- "next",
311
- "shift",
312
- "addScriptToExecute",
313
- "nextDefered",
314
- "deferQueue",
315
- "__html_supervisor__",
316
- "previousDeferDonePromise",
317
- "scriptToExecute",
318
- "async",
319
- "useDeferQueue",
320
- "defer",
321
- "readyState",
322
- "addEventListener",
323
- "collectScriptResults",
324
- "keys",
325
- "scriptExecutionResult",
326
- "startTime",
327
- "getNavigationStartTime",
328
- "endTime",
329
- "scriptsToExecute",
330
- "copy",
331
- "superviseScriptTypeModule",
332
- "isInline",
333
- "URL",
334
- "location"
335
- ],
336
- "mappings": "AAAA;AAEO,MAAMA,WAAW,GAAIC,KAAD,IAAW;EACpC,IAAIA,KAAK,KAAK,IAAd,EAAoB;AAClB,IAAA,OAAO,KAAP,CAAA;AACD,GAAA;;EAED,MAAMC,IAAI,GAAG,OAAOD,KAApB,CAAA;;EACA,IAAIC,IAAI,KAAK,QAAb,EAAuB;AACrB,IAAA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ACA,EAAA,MAAMe,IAAI,GAAGD,gBAAgB,CAAC7M,KAAjB,EAAb,CAAA;EACA6M,gBAAgB,CAACjN,MAAjB,GAA0B,CAA1B,CAAA;AACAkN,EAAAA,IAAI,CAACvR,OAAL,CAAc0Q,eAAD,IAAqB;IAChCF,mBAAmB,CAACH,kBAApB,CAAuCK,eAAvC,CAAA,CAAA;GADF,CAAA,CAAA;AAGD,EAlOM;AAoOA,MAAMc,yBAAyB,GAAG,CAAC;EAAElC,GAAF;AAAOmC,EAAAA,QAAAA;AAAP,CAAD,KAAuB;EAC9DjB,mBAAmB,CAACH,kBAApB,CAAuC;IACrCf,GADqC;AAErC1Q,IAAAA,IAAI,EAAE,WAF+B;IAGrC6S,QAHqC;AAIrCrC,IAAAA,OAAO,EAAE,MAAM,OAAO,IAAIsC,GAAJ,CAAQpC,GAAR,EAAarF,QAAQ,CAAC0H,QAAT,CAAkB1G,IAA/B,EAAqCA,IAA5C,CAAA;GAJjB,CAAA,CAAA;AAMD;;;;"
337
- }
@@ -1,95 +0,0 @@
1
- window.__html_supervisor__ = {
2
- // "html_supervisor_installer.js" will implement
3
- // - "addScriptToExecute"
4
- // - "superviseScriptTypeModule"
5
- // - "collectScriptResults"
6
- // and take all executions in "scriptsToExecute" and implement their supervision
7
- scriptsToExecute: [],
8
- addScriptToExecute: scriptToExecute => {
9
- window.__html_supervisor__.scriptsToExecute.push(scriptToExecute);
10
- },
11
- superviseScript: ({
12
- src,
13
- isInline,
14
- crossorigin,
15
- integrity
16
- }) => {
17
- window.__html_supervisor__.addScriptToExecute({
18
- src,
19
- type: "js_classic",
20
- isInline,
21
- currentScript: document.currentScript,
22
- execute: () => {
23
- return new Promise((resolve, reject) => {
24
- const script = document.createElement("script");
25
-
26
- if (crossorigin) {
27
- script.crossorigin = crossorigin;
28
- }
29
-
30
- if (integrity) {
31
- script.integrity = integrity;
32
- }
33
-
34
- script.src = src;
35
- const scriptUrl = new URL(src, window.location).href;
36
- let lastWindowErrorUrl;
37
- let lastWindowError;
38
-
39
- const windowErrorCallback = e => {
40
- lastWindowErrorUrl = e.filename;
41
- lastWindowError = e.error;
42
- };
43
-
44
- const cleanup = () => {
45
- document.body.removeChild(script);
46
- window.removeEventListener("error", windowErrorCallback);
47
- };
48
-
49
- window.addEventListener("error", windowErrorCallback);
50
- script.addEventListener("error", () => {
51
- cleanup();
52
- reject(src);
53
- });
54
- script.addEventListener("load", () => {
55
- cleanup();
56
-
57
- if (lastWindowErrorUrl === scriptUrl) {
58
- reject(lastWindowError);
59
- } else {
60
- resolve();
61
- }
62
- });
63
- document.body.appendChild(script);
64
- });
65
- }
66
- });
67
- },
68
- superviseScriptTypeModule: () => {
69
- throw new Error("htmlSupervisor not installed");
70
- },
71
- getScriptExecutionResults: () => {
72
- // wait for page to load before collecting script execution results
73
- const htmlReadyPromise = new Promise(resolve => {
74
- if (document.readyState === "complete") {
75
- resolve();
76
- return;
77
- }
78
-
79
- const loadCallback = () => {
80
- window.removeEventListener("load", loadCallback);
81
- resolve();
82
- };
83
-
84
- window.addEventListener("load", loadCallback);
85
- });
86
- return htmlReadyPromise.then(() => {
87
- return window.__html_supervisor__.collectScriptResults();
88
- });
89
- },
90
- collectScriptResults: () => {
91
- throw new Error("htmlSupervisor not installed");
92
- }
93
- };
94
-
95
- //# sourceMappingURL=html_supervisor_setup.js.map