@jsenv/core 27.0.0-alpha.3 → 27.0.0-alpha.30
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/main.js +4 -0
- package/package.json +17 -14
- package/readme.md +4 -12
- package/src/build/build.js +527 -307
- package/src/build/build_urls_generator.js +33 -21
- package/src/build/graph_utils.js +31 -0
- package/src/build/{inject_version_mappings.js → inject_global_version_mappings.js} +33 -15
- package/src/build/inject_service_worker_urls.js +79 -0
- package/src/build/resync_ressource_hints.js +68 -0
- package/src/build/start_build_server.js +201 -0
- package/src/dev/plugins/explorer/jsenv_plugin_explorer.js +2 -2
- package/src/dev/plugins/toolbar/jsenv_plugin_toolbar.js +3 -1
- package/src/dev/start_dev_server.js +58 -26
- package/src/execute/execute.js +30 -4
- package/src/execute/run.js +19 -56
- package/src/execute/runtimes/browsers/from_playwright.js +201 -147
- package/src/execute/runtimes/node/controllable_file.mjs +26 -10
- package/src/execute/runtimes/node/node_execution_performance.js +67 -0
- package/src/execute/runtimes/node/node_process.js +280 -39
- package/src/omega/{runtime_support/default_runtime_support.js → compat/default_runtime_compat.js} +3 -5
- package/src/omega/{runtime_support/features_compatibility.js → compat/features_compats.js} +66 -4
- package/src/omega/compat/runtime_compat.js +50 -0
- package/src/omega/errors.js +51 -58
- package/src/omega/fetched_content_compliance.js +24 -0
- package/src/omega/file_url_converter.js +8 -50
- package/src/omega/kitchen.js +409 -286
- package/src/omega/server/file_service.js +9 -11
- package/src/omega/url_graph/url_graph_load.js +14 -7
- package/src/omega/url_graph/url_graph_report.js +17 -15
- package/src/omega/url_graph.js +32 -10
- package/src/omega/web_workers.js +42 -0
- package/src/{dev/plugins/autoreload → plugins/autoreload/dev_sse}/client/autoreload_preference.js +0 -0
- package/src/{dev/plugins/autoreload → plugins/autoreload/dev_sse}/client/event_source_client.js +2 -2
- package/src/{dev/plugins/autoreload → plugins/autoreload/dev_sse}/client/reload.js +0 -0
- package/src/{dev/plugins/autoreload → plugins/autoreload/dev_sse}/client/url_helpers.js +0 -0
- package/src/plugins/autoreload/dev_sse/jsenv_plugin_dev_sse_client.js +41 -0
- package/src/{dev/plugins/autoreload/jsenv_plugin_autoreload.js → plugins/autoreload/dev_sse/jsenv_plugin_dev_sse_server.js} +27 -168
- package/src/plugins/autoreload/jsenv_plugin_autoreload.js +25 -0
- package/src/plugins/autoreload/jsenv_plugin_hmr.js +35 -0
- package/src/plugins/bundling/css/bundle_css.js +21 -0
- package/src/plugins/bundling/js_classic_workers/bundle_js_classic_workers.js +13 -0
- package/src/{build/plugins/bundle_js_module/jsenv_plugin_bundle_js_module.js → plugins/bundling/js_module/bundle_js_module.js} +108 -78
- package/src/plugins/bundling/jsenv_plugin_bundling.js +51 -0
- package/src/{omega/core_plugins → plugins}/commonjs_globals/jsenv_plugin_commonjs_globals.js +48 -41
- package/src/plugins/file_urls/jsenv_plugin_file_urls.js +66 -0
- package/src/{omega/core_plugins → plugins}/filesystem_magic/jsenv_plugin_filesystem_magic.js +7 -4
- package/src/{omega/core_plugins → plugins}/html_supervisor/client/error_in_document.js +0 -0
- package/src/{omega/core_plugins → plugins}/html_supervisor/client/error_in_notification.js +0 -0
- package/src/{omega/core_plugins → plugins}/html_supervisor/client/html_supervisor_installer.js +3 -2
- package/src/{omega/core_plugins → plugins}/html_supervisor/client/html_supervisor_setup.js +0 -0
- package/src/{omega/core_plugins → plugins}/html_supervisor/client/perf_browser.js +0 -0
- package/src/{omega/core_plugins → plugins}/html_supervisor/client/uneval_exception.js +0 -0
- package/src/{omega/core_plugins → plugins}/html_supervisor/jsenv_plugin_html_supervisor.js +38 -46
- package/src/plugins/http_urls/jsenv_plugin_http_urls.js +12 -0
- package/src/{dev/plugins/autoreload → plugins/import_meta_hot}/babel_plugin_metadata_import_meta_hot.js +4 -5
- package/src/{dev/plugins/autoreload → plugins/import_meta_hot}/client/import_meta_hot.js +3 -1
- package/src/{dev/plugins/autoreload → plugins/import_meta_hot}/html_hot_dependencies.js +2 -2
- package/src/plugins/import_meta_hot/jsenv_plugin_import_meta_hot.js +98 -0
- package/src/{omega/core_plugins → plugins}/import_meta_scenarios/jsenv_plugin_import_meta_scenarios.js +26 -8
- package/src/plugins/import_meta_url/client/import_meta_url_browser.js +52 -0
- package/src/plugins/import_meta_url/client/import_meta_url_commonjs.mjs +9 -0
- package/src/{omega/core_plugins → plugins}/importmap/jsenv_plugin_importmap.js +37 -31
- package/src/plugins/inject_globals/jsenv_plugin_inject_globals.js +25 -0
- package/src/{omega/core_plugins → plugins}/inline/client/inline_content.js +0 -0
- package/src/{omega/core_plugins → plugins}/inline/jsenv_plugin_data_urls.js +18 -14
- package/src/{omega/core_plugins/inline/jsenv_plugin_js_and_css_inside_html.js → plugins/inline/jsenv_plugin_html_inline_content.js} +61 -40
- package/src/plugins/inline/jsenv_plugin_inline.js +36 -0
- package/src/{omega/core_plugins → plugins}/inline/jsenv_plugin_inline_query_param.js +6 -6
- package/src/plugins/inline/jsenv_plugin_js_inline_content.js +263 -0
- package/src/plugins/leading_slash/jsenv_plugin_leading_slash.js +13 -0
- package/src/plugins/minification/css/minify_css.js +9 -0
- package/src/plugins/minification/html/minify_html.js +15 -0
- package/src/{build/plugins/minify_js/jsenv_plugin_minify_js.js → plugins/minification/js/minify_js.js} +6 -22
- package/src/plugins/minification/jsenv_plugin_minification.js +78 -0
- package/src/plugins/minification/json/minify_json.js +8 -0
- package/src/{omega/core_plugins → plugins}/node_esm_resolution/jsenv_plugin_node_esm_resolution.js +15 -15
- package/src/{omega → plugins}/plugin_controller.js +18 -10
- package/src/plugins/plugins.js +73 -0
- package/src/plugins/transpilation/as_js_classic/client/s.js +808 -0
- package/src/plugins/transpilation/as_js_classic/client/s.js.md +1 -0
- package/src/plugins/transpilation/as_js_classic/helpers/babel_plugin_transform_import_meta_url.js +47 -0
- package/src/plugins/transpilation/as_js_classic/helpers/systemjs_old.js +43 -0
- package/src/plugins/transpilation/as_js_classic/jsenv_plugin_as_js_classic.js +183 -0
- package/src/plugins/transpilation/as_js_classic/jsenv_plugin_script_type_module_as_classic.js +256 -0
- package/src/plugins/transpilation/as_js_classic/jsenv_plugin_workers_type_module_as_classic.js +139 -0
- package/src/{omega/core_plugins → plugins/transpilation}/babel/global_this/babel_plugin_global_this_as_jsenv_import.js +0 -0
- package/src/{omega/core_plugins → plugins/transpilation}/babel/global_this/client/global_this.js +0 -0
- package/src/{omega/core_plugins/babel/babel_helper → plugins/transpilation/babel/helpers}/babel_plugin_babel_helpers_as_jsenv_imports.js +1 -2
- package/src/plugins/transpilation/babel/helpers/babel_plugin_structure.js +161 -0
- package/src/{omega/core_plugins → plugins/transpilation}/babel/helpers/babel_plugins_compatibility.js +0 -0
- package/src/{omega/core_plugins → plugins/transpilation}/babel/jsenv_plugin_babel.js +38 -22
- package/src/{omega/core_plugins → plugins/transpilation}/babel/new_stylesheet/babel_plugin_new_stylesheet_as_jsenv_import.js +31 -6
- package/src/{omega/core_plugins → plugins/transpilation}/babel/new_stylesheet/client/.eslintrc.cjs +0 -0
- package/src/{omega/core_plugins → plugins/transpilation}/babel/new_stylesheet/client/new_stylesheet.js +0 -0
- package/src/{omega/core_plugins → plugins/transpilation}/babel/regenerator_runtime/babel_plugin_regenerator_runtime_as_jsenv_import.js +0 -0
- package/src/{omega/core_plugins → plugins/transpilation}/babel/regenerator_runtime/client/regenerator_runtime.js +0 -0
- package/src/plugins/transpilation/css_parcel/jsenv_plugin_css_parcel.js +18 -0
- package/src/plugins/transpilation/fetch_original_url_info.js +30 -0
- package/src/{omega/core_plugins → plugins/transpilation}/import_assertions/helpers/babel_plugin_metadata_import_assertions.js +0 -0
- package/src/plugins/transpilation/import_assertions/jsenv_plugin_import_assertions.js +225 -0
- package/src/plugins/transpilation/jsenv_plugin_top_level_await.js +37 -0
- package/src/plugins/transpilation/jsenv_plugin_transpilation.js +44 -0
- package/src/plugins/url_references/css/css_urls.js +49 -0
- package/src/plugins/url_references/html/html_urls.js +273 -0
- package/src/plugins/url_references/js/js_urls.js +163 -0
- package/src/plugins/url_references/jsenv_plugin_url_references.js +18 -0
- package/src/plugins/url_references/webmanifest/webmanifest_urls.js +17 -0
- package/src/{omega/core_plugins → plugins}/url_resolution/jsenv_plugin_url_resolution.js +12 -5
- package/src/{omega/core_plugins → plugins}/url_version/jsenv_plugin_url_version.js +8 -8
- package/src/test/execute_plan.js +25 -11
- package/src/test/execute_test_plan.js +14 -1
- package/src/test/logs_file_execution.js +8 -7
- package/src/build/plugins/minify_html/jsenv_plugin_minify_html.js +0 -30
- package/src/dev/plugins/autoreload/client/event_source_connection.js +0 -195
- package/src/dev/plugins/autoreload/sse_service.js +0 -149
- package/src/execute/runtimes/node/controlled_process.js +0 -316
- package/src/omega/core_plugins/babel/babel_helper/babel_helper_directory.js +0 -29
- package/src/omega/core_plugins/babel/babel_helper/client/.eslintrc.cjs +0 -24
- package/src/omega/core_plugins/babel/babel_helper/client/AsyncGenerator/AsyncGenerator.js +0 -81
- package/src/omega/core_plugins/babel/babel_helper/client/AwaitValue/AwaitValue.js +0 -3
- package/src/omega/core_plugins/babel/babel_helper/client/applyDecoratorDescriptor/applyDecoratorDescriptor.js +0 -33
- package/src/omega/core_plugins/babel/babel_helper/client/arrayLikeToArray/arrayLikeToArray.js +0 -7
- package/src/omega/core_plugins/babel/babel_helper/client/arrayWithHoles/arrayWithHoles.js +0 -4
- package/src/omega/core_plugins/babel/babel_helper/client/arrayWithoutHoles/arrayWithoutHoles.js +0 -6
- package/src/omega/core_plugins/babel/babel_helper/client/assertThisInitialized/assertThisInitialized.js +0 -7
- package/src/omega/core_plugins/babel/babel_helper/client/asyncGeneratorDelegate/asyncGeneratorDelegate.js +0 -40
- package/src/omega/core_plugins/babel/babel_helper/client/asyncIterator/asyncIterator.js +0 -65
- package/src/omega/core_plugins/babel/babel_helper/client/asyncToGenerator/asyncToGenerator.js +0 -34
- package/src/omega/core_plugins/babel/babel_helper/client/awaitAsyncGenerator/awaitAsyncGenerator.js +0 -5
- package/src/omega/core_plugins/babel/babel_helper/client/classApplyDescriptorDestructureSet/classApplyDescriptorDestructureSet.js +0 -20
- package/src/omega/core_plugins/babel/babel_helper/client/classApplyDescriptorGet/classApplyDescriptorGet.js +0 -6
- package/src/omega/core_plugins/babel/babel_helper/client/classApplyDescriptorSet/classApplyDescriptorSet.js +0 -13
- package/src/omega/core_plugins/babel/babel_helper/client/classCallCheck/classCallCheck.js +0 -5
- package/src/omega/core_plugins/babel/babel_helper/client/classCheckPrivateStaticAccess/classCheckPrivateStaticAccess.js +0 -5
- package/src/omega/core_plugins/babel/babel_helper/client/classCheckPrivateStaticFieldDescriptor/classCheckPrivateStaticFieldDescriptor.js +0 -6
- package/src/omega/core_plugins/babel/babel_helper/client/classExtractFieldDescriptor/classExtractFieldDescriptor.js +0 -7
- package/src/omega/core_plugins/babel/babel_helper/client/classNameTDZError/classNameTDZError.js +0 -4
- package/src/omega/core_plugins/babel/babel_helper/client/classPrivateFieldDestructureSet/classPrivateFieldDestructureSet.js +0 -7
- package/src/omega/core_plugins/babel/babel_helper/client/classPrivateFieldGet/classPrivateFieldGet.js +0 -7
- package/src/omega/core_plugins/babel/babel_helper/client/classPrivateFieldLooseBase/classPrivateFieldLooseBase.js +0 -6
- package/src/omega/core_plugins/babel/babel_helper/client/classPrivateFieldLooseKey/classPrivateFieldLooseKey.js +0 -5
- package/src/omega/core_plugins/babel/babel_helper/client/classPrivateFieldSet/classPrivateFieldSet.js +0 -8
- package/src/omega/core_plugins/babel/babel_helper/client/classPrivateMethodGet/classPrivateMethodGet.js +0 -6
- package/src/omega/core_plugins/babel/babel_helper/client/classPrivateMethodSet/classPrivateMethodSet.js +0 -3
- package/src/omega/core_plugins/babel/babel_helper/client/classStaticPrivateFieldSpecGet/classStaticPrivateFieldSpecGet.js +0 -9
- package/src/omega/core_plugins/babel/babel_helper/client/classStaticPrivateFieldSpecSet/classStaticPrivateFieldSpecSet.js +0 -15
- package/src/omega/core_plugins/babel/babel_helper/client/classStaticPrivateMethodGet/classStaticPrivateMethodGet.js +0 -6
- package/src/omega/core_plugins/babel/babel_helper/client/classStaticPrivateMethodSet/classStaticPrivateMethodSet.js +0 -3
- package/src/omega/core_plugins/babel/babel_helper/client/construct/construct.js +0 -16
- package/src/omega/core_plugins/babel/babel_helper/client/createClass/createClass.js +0 -15
- package/src/omega/core_plugins/babel/babel_helper/client/createForOfIteratorHelper/createForOfIteratorHelper.js +0 -60
- package/src/omega/core_plugins/babel/babel_helper/client/createForOfIteratorHelperLoose/createForOfIteratorHelperLoose.js +0 -23
- package/src/omega/core_plugins/babel/babel_helper/client/createRawReactElement/createRawReactElement.js +0 -50
- package/src/omega/core_plugins/babel/babel_helper/client/createSuper/createSuper.js +0 -22
- package/src/omega/core_plugins/babel/babel_helper/client/decorate/decorate.js +0 -403
- package/src/omega/core_plugins/babel/babel_helper/client/defaults/defaults.js +0 -11
- package/src/omega/core_plugins/babel/babel_helper/client/defineEnumerableProperties/defineEnumerableProperties.js +0 -23
- package/src/omega/core_plugins/babel/babel_helper/client/defineProperty/defineProperty.js +0 -18
- package/src/omega/core_plugins/babel/babel_helper/client/extends/extends.js +0 -14
- package/src/omega/core_plugins/babel/babel_helper/client/get/get.js +0 -19
- package/src/omega/core_plugins/babel/babel_helper/client/getPrototypeOf/getPrototypeOf.js +0 -4
- package/src/omega/core_plugins/babel/babel_helper/client/inherits/inherits.js +0 -19
- package/src/omega/core_plugins/babel/babel_helper/client/inheritsLoose/inheritsLoose.js +0 -7
- package/src/omega/core_plugins/babel/babel_helper/client/initializerDefineProperty/initializerDefineProperty.js +0 -10
- package/src/omega/core_plugins/babel/babel_helper/client/initializerWarningHelper/initializerWarningHelper.js +0 -6
- package/src/omega/core_plugins/babel/babel_helper/client/instanceof/instanceof.js +0 -6
- package/src/omega/core_plugins/babel/babel_helper/client/interopRequireDefault/interopRequireDefault.js +0 -3
- package/src/omega/core_plugins/babel/babel_helper/client/interopRequireWildcard/interopRequireWildcard.js +0 -37
- package/src/omega/core_plugins/babel/babel_helper/client/isNativeFunction/isNativeFunction.js +0 -4
- package/src/omega/core_plugins/babel/babel_helper/client/isNativeReflectConstruct/isNativeReflectConstruct.js +0 -21
- package/src/omega/core_plugins/babel/babel_helper/client/iterableToArray/iterableToArray.js +0 -7
- package/src/omega/core_plugins/babel/babel_helper/client/iterableToArrayLimit/iterableToArrayLimit.js +0 -36
- package/src/omega/core_plugins/babel/babel_helper/client/iterableToArrayLimitLoose/iterableToArrayLimitLoose.js +0 -10
- package/src/omega/core_plugins/babel/babel_helper/client/jsx/jsx.js +0 -50
- package/src/omega/core_plugins/babel/babel_helper/client/maybeArrayLike/maybeArrayLike.js +0 -10
- package/src/omega/core_plugins/babel/babel_helper/client/newArrowCheck/newArrowCheck.js +0 -5
- package/src/omega/core_plugins/babel/babel_helper/client/nonIterableRest/nonIterableRest.js +0 -5
- package/src/omega/core_plugins/babel/babel_helper/client/nonIterableSpread/nonIterableSpread.js +0 -5
- package/src/omega/core_plugins/babel/babel_helper/client/objectDestructuringEmpty/objectDestructuringEmpty.js +0 -3
- package/src/omega/core_plugins/babel/babel_helper/client/objectSpread/objectSpread.js +0 -23
- package/src/omega/core_plugins/babel/babel_helper/client/objectSpread2/objectSpread2.js +0 -41
- package/src/omega/core_plugins/babel/babel_helper/client/objectWithoutProperties/objectWithoutProperties.js +0 -19
- package/src/omega/core_plugins/babel/babel_helper/client/objectWithoutPropertiesLoose/objectWithoutPropertiesLoose.js +0 -13
- package/src/omega/core_plugins/babel/babel_helper/client/possibleConstructorReturn/possibleConstructorReturn.js +0 -10
- package/src/omega/core_plugins/babel/babel_helper/client/readOnlyError/readOnlyError.js +0 -4
- package/src/omega/core_plugins/babel/babel_helper/client/readme.md +0 -8
- package/src/omega/core_plugins/babel/babel_helper/client/set/set.js +0 -44
- package/src/omega/core_plugins/babel/babel_helper/client/setPrototypeOf/setPrototypeOf.js +0 -6
- package/src/omega/core_plugins/babel/babel_helper/client/skipFirstGeneratorNext/skipFirstGeneratorNext.js +0 -8
- package/src/omega/core_plugins/babel/babel_helper/client/slicedToArray/slicedToArray.js +0 -10
- package/src/omega/core_plugins/babel/babel_helper/client/slicedToArrayLoose/slicedToArrayLoose.js +0 -13
- package/src/omega/core_plugins/babel/babel_helper/client/superPropBase/superPropBase.js +0 -10
- package/src/omega/core_plugins/babel/babel_helper/client/taggedTemplateLiteral/taggedTemplateLiteral.js +0 -10
- package/src/omega/core_plugins/babel/babel_helper/client/taggedTemplateLiteralLoose/taggedTemplateLiteralLoose.js +0 -7
- package/src/omega/core_plugins/babel/babel_helper/client/tdz/tdz.js +0 -4
- package/src/omega/core_plugins/babel/babel_helper/client/temporalRef/temporalRef.js +0 -6
- package/src/omega/core_plugins/babel/babel_helper/client/temporalUndefined/temporalUndefined.js +0 -3
- package/src/omega/core_plugins/babel/babel_helper/client/toArray/toArray.js +0 -10
- package/src/omega/core_plugins/babel/babel_helper/client/toConsumableArray/toConsumableArray.js +0 -10
- package/src/omega/core_plugins/babel/babel_helper/client/toPrimitive/toPrimitive.js +0 -10
- package/src/omega/core_plugins/babel/babel_helper/client/toPropertyKey/toPropertyKey.js +0 -6
- package/src/omega/core_plugins/babel/babel_helper/client/typeof/typeof.js +0 -14
- package/src/omega/core_plugins/babel/babel_helper/client/unsupportedIterableToArray/unsupportedIterableToArray.js +0 -12
- package/src/omega/core_plugins/babel/babel_helper/client/wrapAsyncGenerator/wrapAsyncGenerator.js +0 -8
- package/src/omega/core_plugins/babel/babel_helper/client/wrapNativeSuper/wrapNativeSuper.js +0 -30
- package/src/omega/core_plugins/babel/babel_helper/client/wrapRegExp/wrapRegExp.js +0 -63
- package/src/omega/core_plugins/babel/babel_helper/client/writeOnlyError/writeOnlyError.js +0 -4
- package/src/omega/core_plugins/babel/helpers/babel_plugin_structure.js +0 -187
- package/src/omega/core_plugins/file_urls/jsenv_plugin_file_urls.js +0 -67
- package/src/omega/core_plugins/import_assertions/helpers/json_module.js +0 -12
- package/src/omega/core_plugins/import_assertions/helpers/text_module.js +0 -6
- package/src/omega/core_plugins/import_assertions/jsenv_plugin_import_assertions.js +0 -211
- package/src/omega/core_plugins/inline/jsenv_plugin_inline.js +0 -13
- package/src/omega/core_plugins/inline/jsenv_plugin_new_inline_content.js +0 -210
- package/src/omega/core_plugins/leading_slash/jsenv_plugin_leading_slash.js +0 -12
- package/src/omega/core_plugins.js +0 -39
- package/src/omega/runtime_support/runtime_support.js +0 -20
- package/src/omega/url_mentions/css_url_mentions.js +0 -63
- package/src/omega/url_mentions/html_url_mentions.js +0 -185
- package/src/omega/url_mentions/js_module_url_mentions.js +0 -91
- package/src/omega/url_mentions/parse_url_mentions.js +0 -37
- package/src/omega/url_mentions/worker_classic_url_mentions.js +0 -37
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export default function (arr, i) {
|
|
2
|
-
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return
|
|
3
|
-
var _arr = []
|
|
4
|
-
for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done; ) {
|
|
5
|
-
_arr.push(_step.value)
|
|
6
|
-
if (i && _arr.length === i) break
|
|
7
|
-
}
|
|
8
|
-
// eslint-disable-next-line consistent-return
|
|
9
|
-
return _arr
|
|
10
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
var REACT_ELEMENT_TYPE;
|
|
2
|
-
|
|
3
|
-
export default function _createRawReactElement(type, props, key, children) {
|
|
4
|
-
if (!REACT_ELEMENT_TYPE) {
|
|
5
|
-
REACT_ELEMENT_TYPE =
|
|
6
|
-
(typeof Symbol === "function" &&
|
|
7
|
-
// "for" is a reserved keyword in ES3 so escaping it here for backward compatibility
|
|
8
|
-
Symbol["for"] &&
|
|
9
|
-
Symbol["for"]("react.element")) ||
|
|
10
|
-
0xeac7;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
var defaultProps = type && type.defaultProps;
|
|
14
|
-
var childrenLength = arguments.length - 3;
|
|
15
|
-
|
|
16
|
-
if (!props && childrenLength !== 0) {
|
|
17
|
-
// If we're going to assign props.children, we create a new object now
|
|
18
|
-
// to avoid mutating defaultProps.
|
|
19
|
-
props = { children: void 0 };
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (childrenLength === 1) {
|
|
23
|
-
props.children = children;
|
|
24
|
-
} else if (childrenLength > 1) {
|
|
25
|
-
var childArray = new Array(childrenLength);
|
|
26
|
-
for (var i = 0; i < childrenLength; i++) {
|
|
27
|
-
childArray[i] = arguments[i + 3];
|
|
28
|
-
}
|
|
29
|
-
props.children = childArray;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (props && defaultProps) {
|
|
33
|
-
for (var propName in defaultProps) {
|
|
34
|
-
if (props[propName] === void 0) {
|
|
35
|
-
props[propName] = defaultProps[propName];
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
} else if (!props) {
|
|
39
|
-
props = defaultProps || {};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return {
|
|
43
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
44
|
-
type: type,
|
|
45
|
-
key: key === undefined ? null : "" + key,
|
|
46
|
-
ref: null,
|
|
47
|
-
props: props,
|
|
48
|
-
_owner: null,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import arrayLikeToArray from "../arrayLikeToArray/arrayLikeToArray.js"
|
|
2
|
-
|
|
3
|
-
export default function _maybeArrayLike(next, arr, i) {
|
|
4
|
-
if (arr && !Array.isArray(arr) && typeof arr.length === "number") {
|
|
5
|
-
var len = arr.length
|
|
6
|
-
// eslint-disable-next-line no-void
|
|
7
|
-
return arrayLikeToArray(arr, i !== void 0 && i < len ? i : len)
|
|
8
|
-
}
|
|
9
|
-
return next(arr, i)
|
|
10
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import defineProperty from "../defineProperty/defineProperty.js"
|
|
2
|
-
|
|
3
|
-
export default function (target) {
|
|
4
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
5
|
-
// eslint-disable-next-line
|
|
6
|
-
var source = arguments[i] != null ? Object(arguments[i]) : {}
|
|
7
|
-
var ownKeys = Object.keys(source)
|
|
8
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
9
|
-
ownKeys.push.apply(
|
|
10
|
-
ownKeys,
|
|
11
|
-
// eslint-disable-next-line no-loop-func
|
|
12
|
-
Object.getOwnPropertySymbols(source).filter(function (sym) {
|
|
13
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable
|
|
14
|
-
}),
|
|
15
|
-
)
|
|
16
|
-
}
|
|
17
|
-
// eslint-disable-next-line no-loop-func
|
|
18
|
-
ownKeys.forEach(function (key) {
|
|
19
|
-
defineProperty(target, key, source[key])
|
|
20
|
-
})
|
|
21
|
-
}
|
|
22
|
-
return target
|
|
23
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import defineProperty from "../defineProperty/defineProperty.js"
|
|
2
|
-
|
|
3
|
-
// This function is different to "Reflect.ownKeys". The enumerableOnly
|
|
4
|
-
// filters on symbol properties only. Returned string properties are always
|
|
5
|
-
// enumerable. It is good to use in objectSpread.
|
|
6
|
-
|
|
7
|
-
function ownKeys(object, enumerableOnly) {
|
|
8
|
-
var keys = Object.keys(object);
|
|
9
|
-
if (Object.getOwnPropertySymbols) {
|
|
10
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
11
|
-
if (enumerableOnly) {
|
|
12
|
-
symbols = symbols.filter(function (sym) {
|
|
13
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
keys.push.apply(keys, symbols);
|
|
17
|
-
}
|
|
18
|
-
return keys;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export default function _objectSpread2(target) {
|
|
22
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
23
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
24
|
-
if (i % 2) {
|
|
25
|
-
ownKeys(Object(source), true).forEach(function (key) {
|
|
26
|
-
defineProperty(target, key, source[key]);
|
|
27
|
-
});
|
|
28
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
29
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
30
|
-
} else {
|
|
31
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
32
|
-
Object.defineProperty(
|
|
33
|
-
target,
|
|
34
|
-
key,
|
|
35
|
-
Object.getOwnPropertyDescriptor(source, key)
|
|
36
|
-
);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return target;
|
|
41
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import objectWithoutPropertiesLoose from "../objectWithoutPropertiesLoose/objectWithoutPropertiesLoose.js"
|
|
2
|
-
|
|
3
|
-
export default (source, excluded) => {
|
|
4
|
-
if (source === null) return {}
|
|
5
|
-
|
|
6
|
-
var target = objectWithoutPropertiesLoose(source, excluded)
|
|
7
|
-
var key
|
|
8
|
-
var i
|
|
9
|
-
if (Object.getOwnPropertySymbols) {
|
|
10
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source)
|
|
11
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
12
|
-
key = sourceSymbolKeys[i]
|
|
13
|
-
if (excluded.indexOf(key) >= 0) continue
|
|
14
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue
|
|
15
|
-
target[key] = source[key]
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return target
|
|
19
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export default (source, excluded) => {
|
|
2
|
-
if (source === null) return {}
|
|
3
|
-
var target = {}
|
|
4
|
-
var sourceKeys = Object.keys(source)
|
|
5
|
-
var key
|
|
6
|
-
var i
|
|
7
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
8
|
-
key = sourceKeys[i]
|
|
9
|
-
if (excluded.indexOf(key) >= 0) continue
|
|
10
|
-
target[key] = source[key]
|
|
11
|
-
}
|
|
12
|
-
return target
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import assertThisInitialized from "../assertThisInitialized/assertThisInitialized.js"
|
|
2
|
-
|
|
3
|
-
export default (self, call) => {
|
|
4
|
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
5
|
-
return call
|
|
6
|
-
} else if (call !== void 0) {
|
|
7
|
-
throw new TypeError("Derived constructors may only return object or undefined")
|
|
8
|
-
}
|
|
9
|
-
return assertThisInitialized(self)
|
|
10
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Babel helpers
|
|
2
|
-
|
|
3
|
-
Babel helpers are copied in there to properly appear in sourcemap.
|
|
4
|
-
|
|
5
|
-
- Last sync date: 31 January 2022
|
|
6
|
-
|
|
7
|
-
- Helpers file: https://github.com/babel/babel/blob/main/packages/babel-helpers/src/helpers.ts
|
|
8
|
-
- Individual helpers: https://github.com/babel/babel/tree/main/packages/babel-helpers/src/helpers
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import superPropBase from "../superPropBase/superPropBase.js"
|
|
2
|
-
import defineProperty from "../defineProperty/defineProperty.js"
|
|
3
|
-
|
|
4
|
-
function reflectSetPolyfill(target, property, value, receiver) {
|
|
5
|
-
var base = superPropBase(target, property)
|
|
6
|
-
var desc
|
|
7
|
-
if (base) {
|
|
8
|
-
desc = Object.getOwnPropertyDescriptor(base, property)
|
|
9
|
-
if (desc.set) {
|
|
10
|
-
desc.set.call(receiver, value)
|
|
11
|
-
return true
|
|
12
|
-
} else if (!desc.writable) {
|
|
13
|
-
// Both getter and non-writable fall into this.
|
|
14
|
-
return false
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
// Without a super that defines the property, spec boils down to
|
|
18
|
-
// "define on receiver" for some reason.
|
|
19
|
-
desc = Object.getOwnPropertyDescriptor(receiver, property)
|
|
20
|
-
if (desc) {
|
|
21
|
-
if (!desc.writable) {
|
|
22
|
-
// Setter, getter, and non-writable fall into this.
|
|
23
|
-
return false
|
|
24
|
-
}
|
|
25
|
-
desc.value = value
|
|
26
|
-
Object.defineProperty(receiver, property, desc)
|
|
27
|
-
} else {
|
|
28
|
-
// Avoid setters that may be defined on Sub's prototype, but not on
|
|
29
|
-
// the instance.
|
|
30
|
-
defineProperty(receiver, property, value)
|
|
31
|
-
}
|
|
32
|
-
return true
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
var reflectSet = typeof Reflect !== "undefined" && Reflect.set ? Reflect.set : reflectSetPolyfill
|
|
36
|
-
|
|
37
|
-
export default (target, property, value, receiver, isStrict) => {
|
|
38
|
-
// eslint-disable-next-line no-obj-calls
|
|
39
|
-
var s = reflectSet(target, property, value, receiver || target)
|
|
40
|
-
if (!s && isStrict) {
|
|
41
|
-
throw new Error("failed to set property")
|
|
42
|
-
}
|
|
43
|
-
return value
|
|
44
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import arrayWithHoles from "../arrayWithHoles/arrayWithHoles.js"
|
|
2
|
-
import iterableToArrayLimit from "../iterableToArrayLimit/iterableToArrayLimit.js"
|
|
3
|
-
import unsupportedIterableToArray from "../unsupportedIterableToArray/unsupportedIterableToArray.js"
|
|
4
|
-
import nonIterableRest from "../nonIterableRest/nonIterableRest.js"
|
|
5
|
-
|
|
6
|
-
export default (arr, i) =>
|
|
7
|
-
arrayWithHoles(arr) ||
|
|
8
|
-
iterableToArrayLimit(arr, i) ||
|
|
9
|
-
unsupportedIterableToArray(arr, i) ||
|
|
10
|
-
nonIterableRest()
|
package/src/omega/core_plugins/babel/babel_helper/client/slicedToArrayLoose/slicedToArrayLoose.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import arrayWithHoles from "../arrayWithHoles/arrayWithHoles.js"
|
|
2
|
-
import iterableToArrayLimitLoose from "../iterableToArrayLimitLoose/iterableToArrayLimitLoose.js"
|
|
3
|
-
import unsupportedIterableToArray from "../unsupportedIterableToArray/unsupportedIterableToArray.js"
|
|
4
|
-
import nonIterableRest from "../nonIterableRest/nonIterableRest.js"
|
|
5
|
-
|
|
6
|
-
export default function (arr, i) {
|
|
7
|
-
return (
|
|
8
|
-
arrayWithHoles(arr) ||
|
|
9
|
-
iterableToArrayLimitLoose(arr, i) ||
|
|
10
|
-
unsupportedIterableToArray(arr, i) ||
|
|
11
|
-
nonIterableRest()
|
|
12
|
-
)
|
|
13
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import getPrototypeOf from "../getPrototypeOf/getPrototypeOf.js"
|
|
2
|
-
|
|
3
|
-
export default function (object, property) {
|
|
4
|
-
// Yes, this throws if object is null to being with, that's on purpose.
|
|
5
|
-
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
|
6
|
-
object = getPrototypeOf(object)
|
|
7
|
-
if (object === null) break
|
|
8
|
-
}
|
|
9
|
-
return object
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import arrayWithHoles from "../arrayWithHoles/arrayWithHoles.js"
|
|
2
|
-
import iterableToArray from "../iterableToArray/iterableToArray.js"
|
|
3
|
-
import unsupportedIterableToArray from "../unsupportedIterableToArray/unsupportedIterableToArray.js"
|
|
4
|
-
import nonIterableRest from "../nonIterableRest/nonIterableRest.js"
|
|
5
|
-
|
|
6
|
-
export default (arr) =>
|
|
7
|
-
arrayWithHoles(arr) ||
|
|
8
|
-
iterableToArray(arr) ||
|
|
9
|
-
unsupportedIterableToArray(arr) ||
|
|
10
|
-
nonIterableRest()
|
package/src/omega/core_plugins/babel/babel_helper/client/toConsumableArray/toConsumableArray.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import arrayWithoutHoles from "../arrayWithoutHoles/arrayWithoutHoles.js"
|
|
2
|
-
import iterableToArray from "../iterableToArray/iterableToArray.js"
|
|
3
|
-
import unsupportedIterableToArray from "../unsupportedIterableToArray/unsupportedIterableToArray.js"
|
|
4
|
-
import nonIterableSpread from "../nonIterableSpread/nonIterableSpread.js"
|
|
5
|
-
|
|
6
|
-
export default (arr) =>
|
|
7
|
-
arrayWithoutHoles(arr) ||
|
|
8
|
-
iterableToArray(arr) ||
|
|
9
|
-
unsupportedIterableToArray(arr) ||
|
|
10
|
-
nonIterableSpread()
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export default function (input, hint /* : "default" | "string" | "number" | void */) {
|
|
2
|
-
if (typeof input !== "object" || input === null) return input
|
|
3
|
-
var prim = input[Symbol.toPrimitive]
|
|
4
|
-
if (prim !== undefined) {
|
|
5
|
-
var res = prim.call(input, hint || "default")
|
|
6
|
-
if (typeof res !== "object") return res
|
|
7
|
-
throw new TypeError("@@toPrimitive must return a primitive value.")
|
|
8
|
-
}
|
|
9
|
-
return (hint === "string" ? String : Number)(input)
|
|
10
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const nativeTypeOf = (obj) => typeof obj
|
|
2
|
-
|
|
3
|
-
const customTypeOf = (obj) => {
|
|
4
|
-
return obj &&
|
|
5
|
-
typeof Symbol === "function" &&
|
|
6
|
-
obj.constructor === Symbol &&
|
|
7
|
-
obj !== Symbol.prototype
|
|
8
|
-
? "symbol"
|
|
9
|
-
: typeof obj
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export default typeof Symbol === "function" && typeof Symbol.iterator === "symbol"
|
|
13
|
-
? nativeTypeOf
|
|
14
|
-
: customTypeOf
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/* eslint-disable consistent-return */
|
|
2
|
-
import arrayLikeToArray from "../arrayLikeToArray/arrayLikeToArray.js"
|
|
3
|
-
|
|
4
|
-
export default function unsupportedIterableToArray(o, minLen) {
|
|
5
|
-
if (!o) return
|
|
6
|
-
if (typeof o === "string") return arrayLikeToArray(o, minLen)
|
|
7
|
-
var n = Object.prototype.toString.call(o).slice(8, -1)
|
|
8
|
-
if (n === "Object" && o.constructor) n = o.constructor.name
|
|
9
|
-
if (n === "Map" || n === "Set") return Array.from(o)
|
|
10
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
11
|
-
return arrayLikeToArray(o, minLen)
|
|
12
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import getPrototypeOf from "../getPrototypeOf/getPrototypeOf.js"
|
|
2
|
-
import setPrototypeOf from "../setPrototypeOf/setPrototypeOf.js"
|
|
3
|
-
import isNativeFunction from "../isNativeFunction/isNativeFunction.js"
|
|
4
|
-
import construct from "../construct/construct.js"
|
|
5
|
-
|
|
6
|
-
var _cache = typeof Map === "function" ? new Map() : undefined
|
|
7
|
-
|
|
8
|
-
export default function (Class) {
|
|
9
|
-
if (Class === null || !isNativeFunction(Class)) return Class
|
|
10
|
-
if (typeof Class !== "function") {
|
|
11
|
-
throw new TypeError("Super expression must either be null or a function")
|
|
12
|
-
}
|
|
13
|
-
if (typeof _cache !== "undefined") {
|
|
14
|
-
if (_cache.has(Class)) return _cache.get(Class)
|
|
15
|
-
_cache.set(Class, Wrapper)
|
|
16
|
-
}
|
|
17
|
-
function Wrapper() {
|
|
18
|
-
// eslint-disable-next-line prefer-rest-params
|
|
19
|
-
return construct(Class, arguments, getPrototypeOf(this).constructor)
|
|
20
|
-
}
|
|
21
|
-
Wrapper.prototype = Object.create(Class.prototype, {
|
|
22
|
-
constructor: {
|
|
23
|
-
value: Wrapper,
|
|
24
|
-
enumerable: false,
|
|
25
|
-
writable: true,
|
|
26
|
-
configurable: true,
|
|
27
|
-
},
|
|
28
|
-
})
|
|
29
|
-
return setPrototypeOf(Wrapper, Class)
|
|
30
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import setPrototypeOf from "../setPrototypeOf/setPrototypeOf.js"
|
|
2
|
-
import inherits from "../inherits/inherits.js"
|
|
3
|
-
|
|
4
|
-
export default function _wrapRegExp() {
|
|
5
|
-
_wrapRegExp = function (re, groups) {
|
|
6
|
-
return new BabelRegExp(re, undefined, groups);
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
var _super = RegExp.prototype;
|
|
10
|
-
var _groups = new WeakMap();
|
|
11
|
-
|
|
12
|
-
function BabelRegExp(re, flags, groups) {
|
|
13
|
-
var _this = new RegExp(re, flags);
|
|
14
|
-
// if the regex is recreated with 'g' flag
|
|
15
|
-
_groups.set(_this, groups || _groups.get(re));
|
|
16
|
-
return setPrototypeOf(_this, BabelRegExp.prototype);
|
|
17
|
-
}
|
|
18
|
-
inherits(BabelRegExp, RegExp);
|
|
19
|
-
|
|
20
|
-
BabelRegExp.prototype.exec = function (str) {
|
|
21
|
-
var result = _super.exec.call(this, str);
|
|
22
|
-
if (result) result.groups = buildGroups(result, this);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
|
|
26
|
-
if (typeof substitution === "string") {
|
|
27
|
-
var groups = _groups.get(this);
|
|
28
|
-
return _super[Symbol.replace].call(
|
|
29
|
-
this,
|
|
30
|
-
str,
|
|
31
|
-
substitution.replace(/\$<([^>]+)>/g, function (_, name) {
|
|
32
|
-
return "$" + groups[name];
|
|
33
|
-
})
|
|
34
|
-
);
|
|
35
|
-
} else if (typeof substitution === "function") {
|
|
36
|
-
var _this = this;
|
|
37
|
-
return _super[Symbol.replace].call(this, str, function () {
|
|
38
|
-
var args = arguments;
|
|
39
|
-
// Modern engines already pass result.groups returned by exec() as the last arg.
|
|
40
|
-
if (typeof args[args.length - 1] !== "object") {
|
|
41
|
-
args = [].slice.call(args);
|
|
42
|
-
args.push(buildGroups(args, _this));
|
|
43
|
-
}
|
|
44
|
-
return substitution.apply(this, args);
|
|
45
|
-
});
|
|
46
|
-
} else {
|
|
47
|
-
return _super[Symbol.replace].call(this, str, substitution);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
function buildGroups(result, re) {
|
|
52
|
-
// NOTE: This function should return undefined if there are no groups,
|
|
53
|
-
// but in that case Babel doesn't add the wrapper anyway.
|
|
54
|
-
|
|
55
|
-
var g = _groups.get(re);
|
|
56
|
-
return Object.keys(g).reduce(function (groups, name) {
|
|
57
|
-
groups[name] = result[g[name]];
|
|
58
|
-
return groups;
|
|
59
|
-
}, Object.create(null));
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
return _wrapRegExp.apply(this, arguments);
|
|
63
|
-
}
|