@jsenv/core 24.4.3 → 24.4.4
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/dist/browser_runtime/asset-manifest.json +1 -1
- package/dist/browser_runtime/{browser_runtime-015d0fc5.js → browser_runtime-75fe4f45.js} +33 -87
- package/dist/browser_runtime/{browser_runtime-015d0fc5.js.map → browser_runtime-75fe4f45.js.map} +4 -9
- package/dist/build_manifest.js +5 -5
- package/dist/compile_proxy/asset-manifest.json +2 -2
- package/dist/{redirector/assets/s.js-55849eca.map → compile_proxy/assets/s.js-6192a06c.map} +4 -10
- package/dist/compile_proxy/{compile_proxy-2eabd1f7.html → compile_proxy-58947390.html} +33 -87
- package/dist/redirector/asset-manifest.json +2 -2
- package/dist/{toolbar/assets/s.js-55849eca.map → redirector/assets/s.js-6192a06c.map} +4 -10
- package/dist/redirector/{redirector-3029c4d3.html → redirector-3c40c078.html} +33 -87
- package/dist/toolbar/asset-manifest.json +2 -2
- package/dist/{compile_proxy/assets/s.js-55849eca.map → toolbar/assets/s.js-6192a06c.map} +4 -10
- package/dist/toolbar/{toolbar-40bcd3a0.html → toolbar-37d80823.html} +33 -87
- package/dist/toolbar_injector/asset-manifest.json +1 -1
- package/dist/toolbar_injector/{toolbar_injector-0a9d5d4c.js → toolbar_injector-b162830d.js} +2 -2
- package/dist/toolbar_injector/{toolbar_injector-0a9d5d4c.js.map → toolbar_injector-b162830d.js.map} +2 -2
- package/package.json +3 -2
- package/src/internal/runtime/s.js +22 -66
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
var autoImportCandidates = {};
|
|
600
600
|
var systemRegister = systemJSPrototype.register;
|
|
601
601
|
var inlineScriptCount = 0;
|
|
602
|
-
systemJSPrototype.register = function (deps, declare) {
|
|
602
|
+
systemJSPrototype.register = function (deps, declare, autoUrl) {
|
|
603
603
|
if (hasDocument && document.readyState === 'loading' && typeof deps !== 'string') {
|
|
604
604
|
var scripts = document.querySelectorAll('script[src]');
|
|
605
605
|
var lastScript = scripts[scripts.length - 1];
|
|
@@ -608,6 +608,9 @@
|
|
|
608
608
|
if (lastScript) {
|
|
609
609
|
lastAutoImportUrl = lastScript.src;
|
|
610
610
|
}
|
|
611
|
+
else if (autoUrl) {
|
|
612
|
+
lastAutoImportUrl = autoUrl
|
|
613
|
+
}
|
|
611
614
|
else {
|
|
612
615
|
inlineScriptCount++
|
|
613
616
|
lastAutoImportUrl = document.location.href + "__inline_script__" + inlineScriptCount;
|
|
@@ -727,84 +730,37 @@
|
|
|
727
730
|
|
|
728
731
|
}());
|
|
729
732
|
|
|
730
|
-
(function(){
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
* System.register('x', ...) can be imported as System.import('x')
|
|
736
|
-
*/
|
|
737
|
-
(function (global) {
|
|
738
|
-
var System = global.System;
|
|
739
|
-
setRegisterRegistry(System);
|
|
740
|
-
var systemJSPrototype = System.constructor.prototype;
|
|
741
|
-
var constructor = System.constructor;
|
|
742
|
-
var SystemJS = function () {
|
|
743
|
-
constructor.call(this);
|
|
744
|
-
setRegisterRegistry(this);
|
|
745
|
-
};
|
|
746
|
-
SystemJS.prototype = systemJSPrototype;
|
|
747
|
-
System.constructor = SystemJS;
|
|
733
|
+
(function(){
|
|
734
|
+
var envGlobal = typeof self !== 'undefined' ? self : global;
|
|
735
|
+
var System = envGlobal.System;
|
|
736
|
+
var register = System.register;
|
|
737
|
+
var registerRegistry = Object.create(null)
|
|
748
738
|
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
function setRegisterRegistry(systemInstance) {
|
|
752
|
-
systemInstance.registerRegistry = Object.create(null);
|
|
753
|
-
systemInstance.namedRegisterAliases = Object.create(null);
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
var register = systemJSPrototype.register;
|
|
757
|
-
systemJSPrototype.register = function (name, deps, declare) {
|
|
758
|
-
if (typeof name !== 'string')
|
|
759
|
-
return register.apply(this, arguments);
|
|
739
|
+
System.register = function (name, deps, declare) {
|
|
740
|
+
if (typeof name !== 'string') return register.apply(this, arguments);
|
|
760
741
|
var define = [deps, declare];
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
firstName = name;
|
|
765
|
-
}
|
|
766
|
-
Promise.resolve().then(function () {
|
|
767
|
-
firstNamedDefine = null;
|
|
768
|
-
firstName = null;
|
|
769
|
-
});
|
|
770
|
-
return register.apply(this, [deps, declare]);
|
|
742
|
+
var url = System.resolve(`./${name}`);
|
|
743
|
+
registerRegistry[url] = define;
|
|
744
|
+
return register.call(this, deps, declare, url);
|
|
771
745
|
};
|
|
772
746
|
|
|
773
|
-
var
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
// Prefer import map (or other existing) resolution over the registerRegistry
|
|
777
|
-
return resolve.call(this, id, parentURL);
|
|
778
|
-
} catch (err) {
|
|
779
|
-
if (id in this.registerRegistry) {
|
|
780
|
-
return this.namedRegisterAliases[id] || id;
|
|
781
|
-
}
|
|
782
|
-
throw err;
|
|
783
|
-
}
|
|
784
|
-
};
|
|
747
|
+
var instantiate = System.instantiate;
|
|
748
|
+
System.instantiate = function (url, firstParentUrl) {
|
|
749
|
+
var result = registerRegistry[url];
|
|
785
750
|
|
|
786
|
-
var instantiate = systemJSPrototype.instantiate;
|
|
787
|
-
systemJSPrototype.instantiate = function (url, firstParentUrl) {
|
|
788
|
-
var result = this.registerRegistry[url];
|
|
789
751
|
if (result) {
|
|
790
|
-
|
|
752
|
+
registerRegistry[url] = null;
|
|
791
753
|
return result;
|
|
792
754
|
} else {
|
|
793
755
|
return instantiate.call(this, url, firstParentUrl);
|
|
794
756
|
}
|
|
795
757
|
};
|
|
796
758
|
|
|
797
|
-
var getRegister =
|
|
798
|
-
|
|
759
|
+
var getRegister = System.getRegister;
|
|
760
|
+
System.getRegister = function (url) {
|
|
799
761
|
// Calling getRegister() because other extras need to know it was called so they can perform side effects
|
|
800
762
|
var register = getRegister.call(this, url);
|
|
801
|
-
|
|
802
|
-
if (firstName && url) {
|
|
803
|
-
this.namedRegisterAliases[firstName] = url;
|
|
804
|
-
}
|
|
805
|
-
var result = firstNamedDefine || register;
|
|
806
|
-
firstNamedDefine = null;
|
|
807
|
-
firstName = null;
|
|
763
|
+
var result = registerRegistry[url] || register;
|
|
808
764
|
return result;
|
|
809
765
|
};
|
|
810
|
-
}
|
|
766
|
+
}());
|