@vizhub/runtime 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/buildHTML.js +71 -0
- package/dist/cjs/common/packageJson.js +81 -0
- package/dist/cjs/common/packageJson.test.js +148 -0
- package/dist/cjs/common/sucrasePlugin.js +27 -0
- package/dist/cjs/common/virtualFileSystem.js +79 -0
- package/dist/cjs/determineRuntimeVersion.js +26 -0
- package/dist/cjs/determineRuntimeVersion.test.js +103 -0
- package/dist/cjs/index.js +9 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/test/fixtures/v1/basicHTML.js +18 -0
- package/dist/cjs/test/fixtures/v1/fetchProxy.js +15 -0
- package/dist/cjs/test/fixtures/v1/index.js +15 -0
- package/dist/cjs/test/fixtures/v1/jsScriptTag.js +12 -0
- package/dist/cjs/test/fixtures/v1/protocolTest.js +18 -0
- package/dist/cjs/test/fixtures/v1/styleTest.js +18 -0
- package/dist/cjs/test/fixtures/v1/xmlTest.js +22 -0
- package/dist/cjs/test/fixtures/v2/basicBundle.js +8 -0
- package/dist/cjs/test/fixtures/v2/basicBundleNoExtension.js +8 -0
- package/dist/cjs/test/fixtures/v2/d3Import.js +10 -0
- package/dist/cjs/test/fixtures/v2/d3ImportPkg.js +22 -0
- package/dist/cjs/test/fixtures/v2/d3RosettaImportPkg.js +22 -0
- package/dist/cjs/test/fixtures/v2/es6Preserve.js +9 -0
- package/dist/cjs/test/fixtures/v2/generatorSupport.js +9 -0
- package/dist/cjs/test/fixtures/v2/index.js +45 -0
- package/dist/cjs/test/fixtures/v2/jsxTranspile.js +9 -0
- package/dist/cjs/test/fixtures/v2/reactDomImport.js +11 -0
- package/dist/cjs/test/fixtures/v2/reactDomImportPkg.js +27 -0
- package/dist/cjs/test/fixtures/v2/reactImport.js +10 -0
- package/dist/cjs/test/fixtures/v2/reactImportPkg.js +20 -0
- package/dist/cjs/test/fixtures/v2/sourceMapErrorFixture.js +22 -0
- package/dist/cjs/test/fixtures/v2/unicodeSupport.js +9 -0
- package/dist/cjs/test/fixtures/v3/basicIndexJS.js +10 -0
- package/dist/cjs/test/fixtures/v3/cssImport.js +12 -0
- package/dist/cjs/test/fixtures/v3/csvImport.js +14 -0
- package/dist/cjs/test/fixtures/v3/csvStrangeChars.js +15 -0
- package/dist/cjs/test/fixtures/v3/index.js +25 -0
- package/dist/cjs/test/fixtures/v3/jsExport.js +13 -0
- package/dist/cjs/test/fixtures/v3/sourcemap.js +13 -0
- package/dist/cjs/test/fixtures/v3/svelte.js +21 -0
- package/dist/cjs/test/fixtures/v3/vizContent.js +14 -0
- package/dist/cjs/test/fixtures/v3/vizImport.js +88 -0
- package/dist/cjs/test/fixtures/v4/d3Usage.js +34 -0
- package/dist/cjs/test/fixtures/v4/esmBuild.js +21 -0
- package/dist/cjs/test/fixtures/v4/fetchInterception.js +21 -0
- package/dist/cjs/test/fixtures/v4/index.js +21 -0
- package/dist/cjs/test/fixtures/v4/jsScriptTagTypeModule.js +21 -0
- package/dist/cjs/test/fixtures/v4/jsScriptTagTypeModules.js +15 -0
- package/dist/cjs/test/fixtures/v4/reactHooks.js +50 -0
- package/dist/cjs/test/fixtures/v4/reactJsx.js +37 -0
- package/dist/cjs/test/fixtures/v4/threeJsUsage.js +27 -0
- package/dist/cjs/test/fixtures/v4/typeScriptSupport.js +32 -0
- package/dist/cjs/test/testInBrowser.js +50 -0
- package/dist/cjs/test/testStackTrace.js +58 -0
- package/dist/cjs/test/v1.test.js +70 -0
- package/dist/cjs/test/v2.test.js +124 -0
- package/dist/cjs/test/v3.test.js +119 -0
- package/dist/cjs/test/v4.test.js +105 -0
- package/dist/cjs/types.js +2 -0
- package/dist/cjs/utils/vizContentToFileCollection.js +23 -0
- package/dist/cjs/utils/vizContentToFileCollection.test.js +77 -0
- package/dist/cjs/v2/computeBundleJSV2.js +33 -0
- package/dist/cjs/v2/getComputedIndexHtml.js +86 -0
- package/dist/cjs/v2/getComputedIndexHtml.test.js +136 -0
- package/dist/cjs/v2/index.js +5 -0
- package/dist/cjs/v2/v2Build.js +15 -0
- package/dist/cjs/v3/cleanRollupErrorMessage.js +13 -0
- package/dist/cjs/v3/computeBundleJSV3.js +52 -0
- package/dist/cjs/v3/createVizContent.js +27 -0
- package/dist/cjs/v3/extractVizImport.js +27 -0
- package/dist/cjs/v3/extractVizImport.test.js +32 -0
- package/dist/cjs/v3/htmlTemplate.js +93 -0
- package/dist/cjs/v3/index.js +5 -0
- package/dist/cjs/v3/parseId.js +9 -0
- package/dist/cjs/v3/parseId.test.js +27 -0
- package/dist/cjs/v3/setupV3Runtime.js +345 -0
- package/dist/cjs/v3/slugCache.js +39 -0
- package/dist/cjs/v3/slugCache.test.js +107 -0
- package/dist/cjs/v3/transformDSV/dsvParseSrc.js +124 -0
- package/dist/cjs/v3/transformDSV/index.js +44 -0
- package/dist/cjs/v3/transformSvelte.js +81 -0
- package/dist/cjs/v3/types.js +2 -0
- package/dist/cjs/v3/v3Build.js +34 -0
- package/dist/cjs/v3/vizCache.js +40 -0
- package/dist/cjs/v3/vizCache.test.js +100 -0
- package/dist/cjs/v3/vizLoad.js +50 -0
- package/dist/cjs/v3/vizResolve.js +73 -0
- package/dist/cjs/v4/index.js +138 -0
- package/dist/esm/buildHTML.js +67 -0
- package/dist/esm/common/packageJson.js +71 -0
- package/dist/esm/common/packageJson.test.js +146 -0
- package/dist/esm/common/sucrasePlugin.js +24 -0
- package/dist/esm/common/virtualFileSystem.js +75 -0
- package/dist/esm/determineRuntimeVersion.js +22 -0
- package/dist/esm/determineRuntimeVersion.test.js +101 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/test/fixtures/v1/basicHTML.js +15 -0
- package/dist/esm/test/fixtures/v1/fetchProxy.js +12 -0
- package/dist/esm/test/fixtures/v1/index.js +6 -0
- package/dist/esm/test/fixtures/v1/jsScriptTag.js +9 -0
- package/dist/esm/test/fixtures/v1/protocolTest.js +15 -0
- package/dist/esm/test/fixtures/v1/styleTest.js +15 -0
- package/dist/esm/test/fixtures/v1/xmlTest.js +19 -0
- package/dist/esm/test/fixtures/v2/basicBundle.js +5 -0
- package/dist/esm/test/fixtures/v2/basicBundleNoExtension.js +5 -0
- package/dist/esm/test/fixtures/v2/d3Import.js +7 -0
- package/dist/esm/test/fixtures/v2/d3ImportPkg.js +19 -0
- package/dist/esm/test/fixtures/v2/d3RosettaImportPkg.js +19 -0
- package/dist/esm/test/fixtures/v2/es6Preserve.js +6 -0
- package/dist/esm/test/fixtures/v2/generatorSupport.js +6 -0
- package/dist/esm/test/fixtures/v2/index.js +15 -0
- package/dist/esm/test/fixtures/v2/jsxTranspile.js +6 -0
- package/dist/esm/test/fixtures/v2/reactDomImport.js +8 -0
- package/dist/esm/test/fixtures/v2/reactDomImportPkg.js +24 -0
- package/dist/esm/test/fixtures/v2/reactImport.js +7 -0
- package/dist/esm/test/fixtures/v2/reactImportPkg.js +17 -0
- package/dist/esm/test/fixtures/v2/sourceMapErrorFixture.js +19 -0
- package/dist/esm/test/fixtures/v2/unicodeSupport.js +6 -0
- package/dist/esm/test/fixtures/v3/basicIndexJS.js +7 -0
- package/dist/esm/test/fixtures/v3/cssImport.js +9 -0
- package/dist/esm/test/fixtures/v3/csvImport.js +11 -0
- package/dist/esm/test/fixtures/v3/csvStrangeChars.js +12 -0
- package/dist/esm/test/fixtures/v3/index.js +9 -0
- package/dist/esm/test/fixtures/v3/jsExport.js +10 -0
- package/dist/esm/test/fixtures/v3/sourcemap.js +10 -0
- package/dist/esm/test/fixtures/v3/svelte.js +18 -0
- package/dist/esm/test/fixtures/v3/vizContent.js +11 -0
- package/dist/esm/test/fixtures/v3/vizImport.js +85 -0
- package/dist/esm/test/fixtures/v4/d3Usage.js +31 -0
- package/dist/esm/test/fixtures/v4/esmBuild.js +18 -0
- package/dist/esm/test/fixtures/v4/fetchInterception.js +18 -0
- package/dist/esm/test/fixtures/v4/index.js +9 -0
- package/dist/esm/test/fixtures/v4/jsScriptTagTypeModule.js +18 -0
- package/dist/esm/test/fixtures/v4/jsScriptTagTypeModules.js +12 -0
- package/dist/esm/test/fixtures/v4/reactHooks.js +47 -0
- package/dist/esm/test/fixtures/v4/reactJsx.js +34 -0
- package/dist/esm/test/fixtures/v4/threeJsUsage.js +24 -0
- package/dist/esm/test/fixtures/v4/typeScriptSupport.js +29 -0
- package/dist/esm/test/testInBrowser.js +47 -0
- package/dist/esm/test/testStackTrace.js +55 -0
- package/dist/esm/test/v1.test.js +65 -0
- package/dist/esm/test/v2.test.js +121 -0
- package/dist/esm/test/v3.test.js +114 -0
- package/dist/esm/test/v4.test.js +100 -0
- package/dist/esm/types.js +1 -0
- package/dist/esm/utils/vizContentToFileCollection.js +19 -0
- package/dist/esm/utils/vizContentToFileCollection.test.js +75 -0
- package/dist/esm/v2/computeBundleJSV2.js +29 -0
- package/dist/esm/v2/getComputedIndexHtml.js +81 -0
- package/dist/esm/v2/getComputedIndexHtml.test.js +134 -0
- package/dist/esm/v2/index.js +1 -0
- package/dist/esm/v2/v2Build.js +11 -0
- package/dist/esm/v3/cleanRollupErrorMessage.js +9 -0
- package/dist/esm/v3/computeBundleJSV3.js +48 -0
- package/dist/esm/v3/createVizContent.js +23 -0
- package/dist/esm/v3/extractVizImport.js +23 -0
- package/dist/esm/v3/extractVizImport.test.js +30 -0
- package/dist/esm/v3/htmlTemplate.js +89 -0
- package/dist/esm/v3/index.js +1 -0
- package/dist/esm/v3/parseId.js +5 -0
- package/dist/esm/v3/parseId.test.js +25 -0
- package/dist/esm/v3/setupV3Runtime.js +341 -0
- package/dist/esm/v3/slugCache.js +35 -0
- package/dist/esm/v3/slugCache.test.js +105 -0
- package/dist/esm/v3/transformDSV/dsvParseSrc.js +121 -0
- package/dist/esm/v3/transformDSV/index.js +40 -0
- package/dist/esm/v3/transformSvelte.js +77 -0
- package/dist/esm/v3/types.js +1 -0
- package/dist/esm/v3/v3Build.js +30 -0
- package/dist/esm/v3/vizCache.js +36 -0
- package/dist/esm/v3/vizCache.test.js +98 -0
- package/dist/esm/v3/vizLoad.js +46 -0
- package/dist/esm/v3/vizResolve.js +69 -0
- package/dist/esm/v4/index.js +134 -0
- package/dist/types/buildHTML.d.ts +14 -0
- package/dist/types/common/packageJson.d.ts +39 -0
- package/dist/types/common/packageJson.test.d.ts +1 -0
- package/dist/types/common/sucrasePlugin.d.ts +2 -0
- package/dist/types/common/virtualFileSystem.d.ts +3 -0
- package/dist/types/determineRuntimeVersion.d.ts +3 -0
- package/dist/types/determineRuntimeVersion.test.d.ts +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/test/fixtures/v1/basicHTML.d.ts +3 -0
- package/dist/types/test/fixtures/v1/fetchProxy.d.ts +5 -0
- package/dist/types/test/fixtures/v1/index.d.ts +6 -0
- package/dist/types/test/fixtures/v1/jsScriptTag.d.ts +4 -0
- package/dist/types/test/fixtures/v1/protocolTest.d.ts +3 -0
- package/dist/types/test/fixtures/v1/styleTest.d.ts +4 -0
- package/dist/types/test/fixtures/v1/xmlTest.d.ts +4 -0
- package/dist/types/test/fixtures/v2/basicBundle.d.ts +5 -0
- package/dist/types/test/fixtures/v2/basicBundleNoExtension.d.ts +5 -0
- package/dist/types/test/fixtures/v2/d3Import.d.ts +4 -0
- package/dist/types/test/fixtures/v2/d3ImportPkg.d.ts +5 -0
- package/dist/types/test/fixtures/v2/d3RosettaImportPkg.d.ts +5 -0
- package/dist/types/test/fixtures/v2/es6Preserve.d.ts +4 -0
- package/dist/types/test/fixtures/v2/generatorSupport.d.ts +4 -0
- package/dist/types/test/fixtures/v2/index.d.ts +14 -0
- package/dist/types/test/fixtures/v2/jsxTranspile.d.ts +4 -0
- package/dist/types/test/fixtures/v2/reactDomImport.d.ts +4 -0
- package/dist/types/test/fixtures/v2/reactDomImportPkg.d.ts +5 -0
- package/dist/types/test/fixtures/v2/reactImport.d.ts +4 -0
- package/dist/types/test/fixtures/v2/reactImportPkg.d.ts +5 -0
- package/dist/types/test/fixtures/v2/sourceMapErrorFixture.d.ts +5 -0
- package/dist/types/test/fixtures/v2/unicodeSupport.d.ts +4 -0
- package/dist/types/test/fixtures/v3/basicIndexJS.d.ts +3 -0
- package/dist/types/test/fixtures/v3/cssImport.d.ts +4 -0
- package/dist/types/test/fixtures/v3/csvImport.d.ts +4 -0
- package/dist/types/test/fixtures/v3/csvStrangeChars.d.ts +4 -0
- package/dist/types/test/fixtures/v3/index.d.ts +9 -0
- package/dist/types/test/fixtures/v3/jsExport.d.ts +4 -0
- package/dist/types/test/fixtures/v3/sourcemap.d.ts +3 -0
- package/dist/types/test/fixtures/v3/svelte.d.ts +4 -0
- package/dist/types/test/fixtures/v3/vizContent.d.ts +2 -0
- package/dist/types/test/fixtures/v3/vizImport.d.ts +6 -0
- package/dist/types/test/fixtures/v4/d3Usage.d.ts +5 -0
- package/dist/types/test/fixtures/v4/esmBuild.d.ts +5 -0
- package/dist/types/test/fixtures/v4/fetchInterception.d.ts +5 -0
- package/dist/types/test/fixtures/v4/index.d.ts +9 -0
- package/dist/types/test/fixtures/v4/jsScriptTagTypeModule.d.ts +4 -0
- package/dist/types/test/fixtures/v4/jsScriptTagTypeModules.d.ts +5 -0
- package/dist/types/test/fixtures/v4/reactHooks.d.ts +6 -0
- package/dist/types/test/fixtures/v4/reactJsx.d.ts +6 -0
- package/dist/types/test/fixtures/v4/threeJsUsage.d.ts +4 -0
- package/dist/types/test/fixtures/v4/typeScriptSupport.d.ts +5 -0
- package/dist/types/test/testInBrowser.d.ts +15 -0
- package/dist/types/test/testStackTrace.d.ts +9 -0
- package/dist/types/test/v1.test.d.ts +1 -0
- package/dist/types/test/v2.test.d.ts +1 -0
- package/dist/types/test/v3.test.d.ts +1 -0
- package/dist/types/test/v4.test.d.ts +1 -0
- package/dist/types/types.d.ts +1 -0
- package/dist/types/utils/vizContentToFileCollection.d.ts +7 -0
- package/dist/types/utils/vizContentToFileCollection.test.d.ts +1 -0
- package/dist/types/v2/computeBundleJSV2.d.ts +7 -0
- package/dist/types/v2/getComputedIndexHtml.d.ts +4 -0
- package/dist/types/v2/getComputedIndexHtml.test.d.ts +1 -0
- package/dist/types/v2/index.d.ts +1 -0
- package/dist/types/v2/v2Build.d.ts +7 -0
- package/dist/types/v3/cleanRollupErrorMessage.d.ts +4 -0
- package/dist/types/v3/computeBundleJSV3.d.ts +17 -0
- package/dist/types/v3/createVizContent.d.ts +8 -0
- package/dist/types/v3/extractVizImport.d.ts +6 -0
- package/dist/types/v3/extractVizImport.test.d.ts +1 -0
- package/dist/types/v3/htmlTemplate.d.ts +5 -0
- package/dist/types/v3/index.d.ts +1 -0
- package/dist/types/v3/parseId.d.ts +6 -0
- package/dist/types/v3/parseId.test.d.ts +1 -0
- package/dist/types/v3/setupV3Runtime.d.ts +15 -0
- package/dist/types/v3/slugCache.d.ts +11 -0
- package/dist/types/v3/slugCache.test.d.ts +1 -0
- package/dist/types/v3/transformDSV/dsvParseSrc.d.ts +1 -0
- package/dist/types/v3/transformDSV/index.d.ts +2 -0
- package/dist/types/v3/transformSvelte.d.ts +8 -0
- package/dist/types/v3/types.d.ts +65 -0
- package/dist/types/v3/v3Build.d.ts +14 -0
- package/dist/types/v3/vizCache.d.ts +10 -0
- package/dist/types/v3/vizCache.test.d.ts +1 -0
- package/dist/types/v3/vizLoad.d.ts +7 -0
- package/dist/types/v3/vizResolve.d.ts +7 -0
- package/dist/types/v4/index.d.ts +10 -0
- package/package.json +14 -7
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.xmlTest = void 0;
|
|
4
|
+
exports.xmlTest = {
|
|
5
|
+
"index.html": `<!DOCTYPE html>
|
|
6
|
+
<html>
|
|
7
|
+
<body>
|
|
8
|
+
<script>
|
|
9
|
+
const xhr = new XMLHttpRequest();
|
|
10
|
+
xhr.open('GET', 'data.xml');
|
|
11
|
+
xhr.onload = () => {
|
|
12
|
+
console.log(xhr.responseXML.documentElement.nodeName);
|
|
13
|
+
};
|
|
14
|
+
xhr.send();
|
|
15
|
+
</script>
|
|
16
|
+
</body>
|
|
17
|
+
</html>`,
|
|
18
|
+
"data.xml": `<?xml version="1.0" encoding="UTF-8"?>
|
|
19
|
+
<root>
|
|
20
|
+
<item>Test</item>
|
|
21
|
+
</root>`,
|
|
22
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.basicBundle = void 0;
|
|
4
|
+
exports.basicBundle = {
|
|
5
|
+
"index.html": "<script src='bundle.js'></script>",
|
|
6
|
+
"index.js": 'import { foo } from "./foo.js"; console.log(foo);',
|
|
7
|
+
"foo.js": 'export const foo = "bar";',
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.basicBundleNoExtension = void 0;
|
|
4
|
+
exports.basicBundleNoExtension = {
|
|
5
|
+
"index.html": "<script src='bundle.js'></script>",
|
|
6
|
+
"index.js": 'import { foo } from "./foo"; console.log(foo);',
|
|
7
|
+
"foo.js": 'export const foo = "bar";',
|
|
8
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.d3Import = void 0;
|
|
4
|
+
exports.d3Import = {
|
|
5
|
+
"index.html": `
|
|
6
|
+
<script src='https://cdn.jsdelivr.net/npm/d3@6.7.0/dist/d3.min.js'></script>
|
|
7
|
+
<script src='bundle.js'></script>
|
|
8
|
+
`,
|
|
9
|
+
"index.js": 'import { select } from "d3"; console.log(typeof select);',
|
|
10
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.d3ImportPkg = void 0;
|
|
4
|
+
exports.d3ImportPkg = {
|
|
5
|
+
"index.html": `
|
|
6
|
+
<script src='bundle.js'></script>
|
|
7
|
+
`,
|
|
8
|
+
"index.js": 'import { select } from "d3"; console.log(typeof select);',
|
|
9
|
+
"package.json": `{
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"d3": "6.7.0"
|
|
12
|
+
},
|
|
13
|
+
"vizhub": {
|
|
14
|
+
"libraries": {
|
|
15
|
+
"d3": {
|
|
16
|
+
"global": "d3",
|
|
17
|
+
"path": "/dist/d3.min.js"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}`,
|
|
22
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.d3RosettaImportPkg = void 0;
|
|
4
|
+
exports.d3RosettaImportPkg = {
|
|
5
|
+
"index.html": `
|
|
6
|
+
<script src='bundle.js'></script>
|
|
7
|
+
`,
|
|
8
|
+
"index.js": 'import { one } from "d3-rosetta"; console.log(typeof one);',
|
|
9
|
+
"package.json": `{
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"d3-rosetta": "1.0.0"
|
|
12
|
+
},
|
|
13
|
+
"vizhub": {
|
|
14
|
+
"libraries": {
|
|
15
|
+
"d3-rosetta": {
|
|
16
|
+
"global": "d3Rosetta",
|
|
17
|
+
"path": "/dist/d3-rosetta.umd.js"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}`,
|
|
22
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generatorSupport = void 0;
|
|
4
|
+
exports.generatorSupport = {
|
|
5
|
+
"index.html": `
|
|
6
|
+
<script src='bundle.js'></script>
|
|
7
|
+
`,
|
|
8
|
+
"index.js": "console.log(function* () { yield 5; }().next().value)",
|
|
9
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.d3RosettaImportPkg = exports.unicodeSupport = exports.generatorSupport = exports.es6Preserve = exports.jsxTranspile = exports.reactDomImportPkg = exports.reactDomImport = exports.reactImportPkg = exports.reactImport = exports.d3ImportPkg = exports.d3Import = exports.basicBundleNoExtension = exports.basicBundle = void 0;
|
|
18
|
+
var basicBundle_1 = require("./basicBundle");
|
|
19
|
+
Object.defineProperty(exports, "basicBundle", { enumerable: true, get: function () { return basicBundle_1.basicBundle; } });
|
|
20
|
+
var basicBundleNoExtension_1 = require("./basicBundleNoExtension");
|
|
21
|
+
Object.defineProperty(exports, "basicBundleNoExtension", { enumerable: true, get: function () { return basicBundleNoExtension_1.basicBundleNoExtension; } });
|
|
22
|
+
var d3Import_1 = require("./d3Import");
|
|
23
|
+
Object.defineProperty(exports, "d3Import", { enumerable: true, get: function () { return d3Import_1.d3Import; } });
|
|
24
|
+
var d3ImportPkg_1 = require("./d3ImportPkg");
|
|
25
|
+
Object.defineProperty(exports, "d3ImportPkg", { enumerable: true, get: function () { return d3ImportPkg_1.d3ImportPkg; } });
|
|
26
|
+
var reactImport_1 = require("./reactImport");
|
|
27
|
+
Object.defineProperty(exports, "reactImport", { enumerable: true, get: function () { return reactImport_1.reactImport; } });
|
|
28
|
+
var reactImportPkg_1 = require("./reactImportPkg");
|
|
29
|
+
Object.defineProperty(exports, "reactImportPkg", { enumerable: true, get: function () { return reactImportPkg_1.reactImportPkg; } });
|
|
30
|
+
var reactDomImport_1 = require("./reactDomImport");
|
|
31
|
+
Object.defineProperty(exports, "reactDomImport", { enumerable: true, get: function () { return reactDomImport_1.reactDomImport; } });
|
|
32
|
+
var reactDomImportPkg_1 = require("./reactDomImportPkg");
|
|
33
|
+
Object.defineProperty(exports, "reactDomImportPkg", { enumerable: true, get: function () { return reactDomImportPkg_1.reactDomImportPkg; } });
|
|
34
|
+
var jsxTranspile_1 = require("./jsxTranspile");
|
|
35
|
+
Object.defineProperty(exports, "jsxTranspile", { enumerable: true, get: function () { return jsxTranspile_1.jsxTranspile; } });
|
|
36
|
+
var es6Preserve_1 = require("./es6Preserve");
|
|
37
|
+
Object.defineProperty(exports, "es6Preserve", { enumerable: true, get: function () { return es6Preserve_1.es6Preserve; } });
|
|
38
|
+
var generatorSupport_1 = require("./generatorSupport");
|
|
39
|
+
Object.defineProperty(exports, "generatorSupport", { enumerable: true, get: function () { return generatorSupport_1.generatorSupport; } });
|
|
40
|
+
var unicodeSupport_1 = require("./unicodeSupport");
|
|
41
|
+
Object.defineProperty(exports, "unicodeSupport", { enumerable: true, get: function () { return unicodeSupport_1.unicodeSupport; } });
|
|
42
|
+
var d3RosettaImportPkg_1 = require("./d3RosettaImportPkg");
|
|
43
|
+
Object.defineProperty(exports, "d3RosettaImportPkg", { enumerable: true, get: function () { return d3RosettaImportPkg_1.d3RosettaImportPkg; } });
|
|
44
|
+
// Make sure to add the sourceMapErrorFixture to the exports
|
|
45
|
+
__exportStar(require("./sourceMapErrorFixture"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reactDomImport = void 0;
|
|
4
|
+
exports.reactDomImport = {
|
|
5
|
+
"index.html": `
|
|
6
|
+
<script src='https://cdn.jsdelivr.net/npm/react@18.3.1/umd/react.production.min.js'></script>
|
|
7
|
+
<script src='https://cdn.jsdelivr.net/npm/react-dom@18.3.1/umd/react-dom.production.min.js'></script>
|
|
8
|
+
<script src='bundle.js'></script>
|
|
9
|
+
`,
|
|
10
|
+
"index.js": 'import ReactDOM from "react-dom"; console.log(typeof ReactDOM);',
|
|
11
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reactDomImportPkg = void 0;
|
|
4
|
+
exports.reactDomImportPkg = {
|
|
5
|
+
"index.html": `
|
|
6
|
+
<script src='bundle.js'></script>
|
|
7
|
+
`,
|
|
8
|
+
"index.js": 'import ReactDOM from "react-dom"; console.log(typeof ReactDOM);',
|
|
9
|
+
"package.json": `{
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"react": "18.2.0",
|
|
12
|
+
"react-dom": "18.2.0"
|
|
13
|
+
},
|
|
14
|
+
"vizhub": {
|
|
15
|
+
"libraries": {
|
|
16
|
+
"react": {
|
|
17
|
+
"global": "React",
|
|
18
|
+
"path": "/umd/react.production.min.js"
|
|
19
|
+
},
|
|
20
|
+
"react-dom": {
|
|
21
|
+
"global": "ReactDOM",
|
|
22
|
+
"path": "/umd/react-dom.production.min.js"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}`,
|
|
27
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reactImport = void 0;
|
|
4
|
+
exports.reactImport = {
|
|
5
|
+
"index.html": `
|
|
6
|
+
<script src='https://cdn.jsdelivr.net/npm/react@18.3.1/umd/react.production.min.js'></script>
|
|
7
|
+
<script src='bundle.js'></script>
|
|
8
|
+
`,
|
|
9
|
+
"index.js": 'import React from "react"; console.log(typeof React);',
|
|
10
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reactImportPkg = void 0;
|
|
4
|
+
exports.reactImportPkg = {
|
|
5
|
+
"index.html": `<script src='bundle.js'></script>`,
|
|
6
|
+
"index.js": 'import React from "react"; console.log(typeof React);',
|
|
7
|
+
"package.json": `{
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"react": "18.2.0"
|
|
10
|
+
},
|
|
11
|
+
"vizhub": {
|
|
12
|
+
"libraries": {
|
|
13
|
+
"react": {
|
|
14
|
+
"global": "React",
|
|
15
|
+
"path": "/umd/react.production.min.js"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}`,
|
|
20
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sourceMapErrorFixture = void 0;
|
|
4
|
+
exports.sourceMapErrorFixture = {
|
|
5
|
+
"index.html": "<script src='bundle.js'></script>",
|
|
6
|
+
"index.js": `
|
|
7
|
+
import { generateError } from "./error.js";
|
|
8
|
+
|
|
9
|
+
// Line numbers are important for this test
|
|
10
|
+
// This will be line 6 in the original source
|
|
11
|
+
generateError();
|
|
12
|
+
|
|
13
|
+
// Add a console log to help debug
|
|
14
|
+
console.log("If you see this, the error was caught by the window.onerror handler");
|
|
15
|
+
`,
|
|
16
|
+
"error.js": `
|
|
17
|
+
export function generateError() {
|
|
18
|
+
// This is line 3 in error.js
|
|
19
|
+
throw new Error("Test error for sourcemap validation");
|
|
20
|
+
}
|
|
21
|
+
`,
|
|
22
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cssImport = void 0;
|
|
4
|
+
exports.cssImport = {
|
|
5
|
+
"index.js": `
|
|
6
|
+
import './styles.css';
|
|
7
|
+
console.log(getComputedStyle(document.body).color);
|
|
8
|
+
`,
|
|
9
|
+
"styles.css": `
|
|
10
|
+
body { color: red; }
|
|
11
|
+
`,
|
|
12
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.csvImport = void 0;
|
|
4
|
+
exports.csvImport = {
|
|
5
|
+
"index.js": `
|
|
6
|
+
import data from './data.csv';
|
|
7
|
+
console.log(data[0].variety);
|
|
8
|
+
`,
|
|
9
|
+
"data.csv": `"sepal.length","sepal.width","petal.length","petal.width","variety"
|
|
10
|
+
5.1,3.5,1.4,.2,"Setosa"
|
|
11
|
+
4.9,3,1.4,.2,"Setosa"
|
|
12
|
+
4.7,3.2,1.3,.2,"Setosa"
|
|
13
|
+
4.6,3.1,1.5,.2,"Setosa"`,
|
|
14
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.csvStrangeChars = void 0;
|
|
4
|
+
exports.csvStrangeChars = {
|
|
5
|
+
"index.js": `
|
|
6
|
+
import data from './data.csv';
|
|
7
|
+
console.log(data[0].Country);
|
|
8
|
+
`,
|
|
9
|
+
"data.csv": `Country,Users,New users,Engaged sessions,Engagement rate,Engaged sessions per user,Average engagement time,Event count,Conversions,Total revenue
|
|
10
|
+
Türkiye,180,177,133,0.5450819672131147,0.7388888888888889,86.22777777777777,1007,0,0
|
|
11
|
+
(not set),28,27,2,0.06896551724137931,0.07142857142857142,7.178571428571429,101,0,0
|
|
12
|
+
Myanmar (Burma),11,11,29,0.58,2.6363636363636362,141.0909090909091,209,0,0
|
|
13
|
+
Côte d'Ivoire,10,10,8,0.6666666666666666,0.8,33.4,57,0,0
|
|
14
|
+
Réunion,1,1,0,0,0,0,5,0,0`,
|
|
15
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sourcemap = exports.svelte = exports.sampleContentVizImportWithCSS = exports.sampleContentWithCSS = exports.sampleContentVizImportSlug = exports.sampleContentVizImport = exports.sampleContent = exports.csvStrangeChars = exports.csvImport = exports.cssImport = exports.jsExport = exports.sampleVizContent = exports.basicIndexJS = void 0;
|
|
4
|
+
var basicIndexJS_1 = require("./basicIndexJS");
|
|
5
|
+
Object.defineProperty(exports, "basicIndexJS", { enumerable: true, get: function () { return basicIndexJS_1.basicIndexJS; } });
|
|
6
|
+
var vizContent_1 = require("./vizContent");
|
|
7
|
+
Object.defineProperty(exports, "sampleVizContent", { enumerable: true, get: function () { return vizContent_1.sampleVizContent; } });
|
|
8
|
+
var jsExport_1 = require("./jsExport");
|
|
9
|
+
Object.defineProperty(exports, "jsExport", { enumerable: true, get: function () { return jsExport_1.jsExport; } });
|
|
10
|
+
var cssImport_1 = require("./cssImport");
|
|
11
|
+
Object.defineProperty(exports, "cssImport", { enumerable: true, get: function () { return cssImport_1.cssImport; } });
|
|
12
|
+
var csvImport_1 = require("./csvImport");
|
|
13
|
+
Object.defineProperty(exports, "csvImport", { enumerable: true, get: function () { return csvImport_1.csvImport; } });
|
|
14
|
+
var csvStrangeChars_1 = require("./csvStrangeChars");
|
|
15
|
+
Object.defineProperty(exports, "csvStrangeChars", { enumerable: true, get: function () { return csvStrangeChars_1.csvStrangeChars; } });
|
|
16
|
+
var vizImport_1 = require("./vizImport");
|
|
17
|
+
Object.defineProperty(exports, "sampleContent", { enumerable: true, get: function () { return vizImport_1.sampleContent; } });
|
|
18
|
+
Object.defineProperty(exports, "sampleContentVizImport", { enumerable: true, get: function () { return vizImport_1.sampleContentVizImport; } });
|
|
19
|
+
Object.defineProperty(exports, "sampleContentVizImportSlug", { enumerable: true, get: function () { return vizImport_1.sampleContentVizImportSlug; } });
|
|
20
|
+
Object.defineProperty(exports, "sampleContentWithCSS", { enumerable: true, get: function () { return vizImport_1.sampleContentWithCSS; } });
|
|
21
|
+
Object.defineProperty(exports, "sampleContentVizImportWithCSS", { enumerable: true, get: function () { return vizImport_1.sampleContentVizImportWithCSS; } });
|
|
22
|
+
var svelte_1 = require("./svelte");
|
|
23
|
+
Object.defineProperty(exports, "svelte", { enumerable: true, get: function () { return svelte_1.svelte; } });
|
|
24
|
+
var sourcemap_1 = require("./sourcemap");
|
|
25
|
+
Object.defineProperty(exports, "sourcemap", { enumerable: true, get: function () { return sourcemap_1.sourcemap; } });
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.jsExport = void 0;
|
|
4
|
+
exports.jsExport = {
|
|
5
|
+
"index.js": `
|
|
6
|
+
import { innerMessage } from './message';
|
|
7
|
+
export const message = "Outer " + innerMessage;
|
|
8
|
+
console.log(message);
|
|
9
|
+
`,
|
|
10
|
+
"message.js": `
|
|
11
|
+
export const innerMessage = "Inner";
|
|
12
|
+
`,
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sourcemap = void 0;
|
|
4
|
+
exports.sourcemap = {
|
|
5
|
+
"index.js": `
|
|
6
|
+
const x = 1;
|
|
7
|
+
const y = 2;
|
|
8
|
+
console.log(x + y);
|
|
9
|
+
|
|
10
|
+
// The error should resolve to this line number, 6.
|
|
11
|
+
throw new Error("Hello main!");
|
|
12
|
+
`,
|
|
13
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.svelte = void 0;
|
|
4
|
+
exports.svelte = {
|
|
5
|
+
"App.svelte": `
|
|
6
|
+
<script>
|
|
7
|
+
const name = 'Svelte';
|
|
8
|
+
console.log(name);
|
|
9
|
+
</script>
|
|
10
|
+
<h1>Hello {name}!</h1>
|
|
11
|
+
`,
|
|
12
|
+
"index.js": `
|
|
13
|
+
import App from './App.svelte';
|
|
14
|
+
|
|
15
|
+
export const main = (container) => {
|
|
16
|
+
new App({
|
|
17
|
+
target: container,
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
`,
|
|
21
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sampleVizContent = void 0;
|
|
4
|
+
const createVizContent_1 = require("../../../v3/createVizContent");
|
|
5
|
+
// Content for testing JS imports
|
|
6
|
+
exports.sampleVizContent = (0, createVizContent_1.createVizContent)({
|
|
7
|
+
"index.js": `
|
|
8
|
+
import { innerMessage } from './message';
|
|
9
|
+
export const message = "Outer " + innerMessage;
|
|
10
|
+
`,
|
|
11
|
+
"message.js": `
|
|
12
|
+
export const innerMessage = "Inner";
|
|
13
|
+
`,
|
|
14
|
+
});
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sampleContentVizImportWithCSS = exports.sampleContentWithCSS = exports.sampleContentVizImportSlug = exports.sampleContentVizImport = exports.sampleContent = void 0;
|
|
4
|
+
// Sample content for testing JS imports
|
|
5
|
+
exports.sampleContent = {
|
|
6
|
+
id: "84bddfb1cc0545f299e5083c3e71e0bb",
|
|
7
|
+
files: {
|
|
8
|
+
"7548392": {
|
|
9
|
+
name: "index.js",
|
|
10
|
+
text: `
|
|
11
|
+
import { innerMessage } from './message';
|
|
12
|
+
export const message = "Outer " + innerMessage;
|
|
13
|
+
`,
|
|
14
|
+
},
|
|
15
|
+
"6714854": {
|
|
16
|
+
name: "message.js",
|
|
17
|
+
text: `
|
|
18
|
+
export const innerMessage = "Inner";
|
|
19
|
+
`,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
title: "Sample Content for Exporting",
|
|
23
|
+
};
|
|
24
|
+
// Sample content for testing JS imports
|
|
25
|
+
// across vizzes by id
|
|
26
|
+
exports.sampleContentVizImport = {
|
|
27
|
+
id: "a6014044e0c6425f911a7e128e1928a6",
|
|
28
|
+
files: {
|
|
29
|
+
"7548392": {
|
|
30
|
+
name: "index.js",
|
|
31
|
+
text: `
|
|
32
|
+
import { message } from '@joe/${exports.sampleContent.id}';
|
|
33
|
+
console.log("Imported from viz: " + message);
|
|
34
|
+
`,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
title: "Sample Content for Viz Importing",
|
|
38
|
+
};
|
|
39
|
+
// Sample content for testing JS imports
|
|
40
|
+
// across vizzes by slug
|
|
41
|
+
exports.sampleContentVizImportSlug = {
|
|
42
|
+
id: "6f8aec8c3cd348d7a7d4661cc8d75c9a",
|
|
43
|
+
files: {
|
|
44
|
+
"7548392": {
|
|
45
|
+
name: "index.js",
|
|
46
|
+
text: `
|
|
47
|
+
import { message } from '@joe/sample-content-slug';
|
|
48
|
+
console.log("Imported from viz with slug: " + message);
|
|
49
|
+
`,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
title: "Sample Content for Viz Importing",
|
|
53
|
+
};
|
|
54
|
+
// Sample content for testing CSS imports
|
|
55
|
+
exports.sampleContentWithCSS = {
|
|
56
|
+
id: "cd52ba7f80834807b72e66ce4abac185",
|
|
57
|
+
files: {
|
|
58
|
+
"5473849": {
|
|
59
|
+
name: "index.js",
|
|
60
|
+
text: `
|
|
61
|
+
import './styles.css';
|
|
62
|
+
`,
|
|
63
|
+
},
|
|
64
|
+
"0175432": {
|
|
65
|
+
name: "styles.css",
|
|
66
|
+
text: `
|
|
67
|
+
body { color: red; }
|
|
68
|
+
`,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
title: "Sample Content for CSS Importing",
|
|
72
|
+
};
|
|
73
|
+
// Sample content for testing CSS imports
|
|
74
|
+
// across vizzes
|
|
75
|
+
exports.sampleContentVizImportWithCSS = {
|
|
76
|
+
id: "816040d214484b41b653bd6916a11fd9",
|
|
77
|
+
files: {
|
|
78
|
+
"7548392": {
|
|
79
|
+
name: "index.js",
|
|
80
|
+
text: `
|
|
81
|
+
// Import for the CSS side effect
|
|
82
|
+
import '@joe/${exports.sampleContentWithCSS.id}';
|
|
83
|
+
console.log(getComputedStyle(document.body).color);
|
|
84
|
+
`,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
title: "Sample Content for Viz Importing with CSS",
|
|
88
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.d3Usage = void 0;
|
|
4
|
+
exports.d3Usage = {
|
|
5
|
+
"index.html": `<!DOCTYPE html>
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>D3 Test</title>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="chart"></div>
|
|
12
|
+
<script type="module" src="index.js"></script>
|
|
13
|
+
</body>
|
|
14
|
+
</html>`,
|
|
15
|
+
"index.js": `import * as d3 from 'd3';
|
|
16
|
+
|
|
17
|
+
const svg = d3.select('#chart')
|
|
18
|
+
.append('svg')
|
|
19
|
+
.attr('width', 100)
|
|
20
|
+
.attr('height', 100);
|
|
21
|
+
|
|
22
|
+
svg.append('circle')
|
|
23
|
+
.attr('cx', 50)
|
|
24
|
+
.attr('cy', 50)
|
|
25
|
+
.attr('r', 40)
|
|
26
|
+
.style('fill', 'blue');
|
|
27
|
+
|
|
28
|
+
console.log('D3 chart rendered successfully');`,
|
|
29
|
+
"package.json": `{
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"d3": "^7.8.5"
|
|
32
|
+
}
|
|
33
|
+
}`,
|
|
34
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.esmBuild = void 0;
|
|
4
|
+
exports.esmBuild = {
|
|
5
|
+
"index.html": `<!DOCTYPE html>
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>ESM Build Test</title>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<script type="module" src="index.js"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>`,
|
|
14
|
+
"index.js": `import { format } from 'date-fns';
|
|
15
|
+
console.log(format(new Date(), 'yyyy-MM-dd'));`,
|
|
16
|
+
"package.json": `{
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"date-fns": "2.30.0"
|
|
19
|
+
}
|
|
20
|
+
}`,
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchInterception = void 0;
|
|
4
|
+
exports.fetchInterception = {
|
|
5
|
+
"index.html": `<!DOCTYPE html>
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>Fetch Interception Test</title>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<script type="module" src="index.js"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>`,
|
|
14
|
+
"index.js": `
|
|
15
|
+
fetch("data.json")
|
|
16
|
+
.then(response => response.json())
|
|
17
|
+
.then(data => console.log(data.message));`,
|
|
18
|
+
"data.json": `{
|
|
19
|
+
"message": "Fetch intercepted successfully"
|
|
20
|
+
}`,
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.typeScriptSupport = exports.reactHooks = exports.threeJsUsage = exports.d3Usage = exports.reactJsx = exports.esmBuild = exports.fetchInterception = exports.jsScriptTagTypeModules = exports.jsScriptTagTypeModule = void 0;
|
|
4
|
+
var jsScriptTagTypeModule_1 = require("./jsScriptTagTypeModule");
|
|
5
|
+
Object.defineProperty(exports, "jsScriptTagTypeModule", { enumerable: true, get: function () { return jsScriptTagTypeModule_1.jsScriptTagTypeModule; } });
|
|
6
|
+
var jsScriptTagTypeModules_1 = require("./jsScriptTagTypeModules");
|
|
7
|
+
Object.defineProperty(exports, "jsScriptTagTypeModules", { enumerable: true, get: function () { return jsScriptTagTypeModules_1.jsScriptTagTypeModules; } });
|
|
8
|
+
var fetchInterception_1 = require("./fetchInterception");
|
|
9
|
+
Object.defineProperty(exports, "fetchInterception", { enumerable: true, get: function () { return fetchInterception_1.fetchInterception; } });
|
|
10
|
+
var esmBuild_1 = require("./esmBuild");
|
|
11
|
+
Object.defineProperty(exports, "esmBuild", { enumerable: true, get: function () { return esmBuild_1.esmBuild; } });
|
|
12
|
+
var reactJsx_1 = require("./reactJsx");
|
|
13
|
+
Object.defineProperty(exports, "reactJsx", { enumerable: true, get: function () { return reactJsx_1.reactJsx; } });
|
|
14
|
+
var d3Usage_1 = require("./d3Usage");
|
|
15
|
+
Object.defineProperty(exports, "d3Usage", { enumerable: true, get: function () { return d3Usage_1.d3Usage; } });
|
|
16
|
+
var threeJsUsage_1 = require("./threeJsUsage");
|
|
17
|
+
Object.defineProperty(exports, "threeJsUsage", { enumerable: true, get: function () { return threeJsUsage_1.threeJsUsage; } });
|
|
18
|
+
var reactHooks_1 = require("./reactHooks");
|
|
19
|
+
Object.defineProperty(exports, "reactHooks", { enumerable: true, get: function () { return reactHooks_1.reactHooks; } });
|
|
20
|
+
var typeScriptSupport_1 = require("./typeScriptSupport");
|
|
21
|
+
Object.defineProperty(exports, "typeScriptSupport", { enumerable: true, get: function () { return typeScriptSupport_1.typeScriptSupport; } });
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.jsScriptTagTypeModule = void 0;
|
|
4
|
+
exports.jsScriptTagTypeModule = {
|
|
5
|
+
"index.html": `<!DOCTYPE html>
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<script type="importmap">
|
|
9
|
+
{
|
|
10
|
+
"imports": {
|
|
11
|
+
"greeter": "data:text/javascript;charset=utf-8,export const greeting = \\"Hello, ES Module!\\";"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
15
|
+
</head>
|
|
16
|
+
<body>
|
|
17
|
+
<script type="module" src="index.js"></script>
|
|
18
|
+
</body>
|
|
19
|
+
</html>`,
|
|
20
|
+
"index.js": `import { greeting } from 'greeter';\nconsole.log(greeting);`,
|
|
21
|
+
};
|