@sveltejs/kit 1.0.0-next.35 → 1.0.0-next.352

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 (69) hide show
  1. package/README.md +12 -9
  2. package/assets/app/env.js +16 -0
  3. package/assets/app/navigation.js +24 -0
  4. package/assets/app/paths.js +1 -0
  5. package/assets/app/stores.js +97 -0
  6. package/assets/client/singletons.js +13 -0
  7. package/assets/client/start.js +1787 -0
  8. package/assets/components/error.svelte +18 -2
  9. package/assets/env.js +8 -0
  10. package/assets/paths.js +13 -0
  11. package/assets/server/index.js +3380 -0
  12. package/dist/chunks/constants.js +663 -0
  13. package/dist/chunks/filesystem.js +110 -0
  14. package/dist/chunks/index.js +1363 -0
  15. package/dist/chunks/index2.js +120 -0
  16. package/dist/chunks/index3.js +183 -0
  17. package/dist/chunks/index4.js +215 -0
  18. package/dist/chunks/index5.js +15748 -0
  19. package/dist/chunks/misc.js +78 -0
  20. package/dist/chunks/multipart-parser.js +444 -0
  21. package/dist/chunks/object.js +83 -0
  22. package/dist/chunks/plugin.js +558 -0
  23. package/dist/chunks/sync.js +856 -0
  24. package/dist/chunks/write_tsconfig.js +169 -0
  25. package/dist/cli.js +1028 -87
  26. package/dist/hooks.js +28 -0
  27. package/dist/node/polyfills.js +6654 -0
  28. package/dist/node.js +301 -0
  29. package/package.json +95 -55
  30. package/types/ambient.d.ts +307 -0
  31. package/types/index.d.ts +294 -0
  32. package/types/internal.d.ts +326 -0
  33. package/types/private.d.ts +235 -0
  34. package/CHANGELOG.md +0 -371
  35. package/assets/runtime/app/navigation.js +0 -23
  36. package/assets/runtime/app/navigation.js.map +0 -1
  37. package/assets/runtime/app/paths.js +0 -2
  38. package/assets/runtime/app/paths.js.map +0 -1
  39. package/assets/runtime/app/stores.js +0 -78
  40. package/assets/runtime/app/stores.js.map +0 -1
  41. package/assets/runtime/internal/singletons.js +0 -15
  42. package/assets/runtime/internal/singletons.js.map +0 -1
  43. package/assets/runtime/internal/start.js +0 -614
  44. package/assets/runtime/internal/start.js.map +0 -1
  45. package/assets/runtime/utils-85ebcc60.js +0 -18
  46. package/assets/runtime/utils-85ebcc60.js.map +0 -1
  47. package/dist/api.js +0 -28
  48. package/dist/api.js.map +0 -1
  49. package/dist/cli.js.map +0 -1
  50. package/dist/create_app.js +0 -502
  51. package/dist/create_app.js.map +0 -1
  52. package/dist/index.js +0 -327
  53. package/dist/index.js.map +0 -1
  54. package/dist/index2.js +0 -3497
  55. package/dist/index2.js.map +0 -1
  56. package/dist/index3.js +0 -296
  57. package/dist/index3.js.map +0 -1
  58. package/dist/index4.js +0 -311
  59. package/dist/index4.js.map +0 -1
  60. package/dist/index5.js +0 -221
  61. package/dist/index5.js.map +0 -1
  62. package/dist/index6.js +0 -730
  63. package/dist/index6.js.map +0 -1
  64. package/dist/renderer.js +0 -2429
  65. package/dist/renderer.js.map +0 -1
  66. package/dist/standard.js +0 -100
  67. package/dist/standard.js.map +0 -1
  68. package/dist/utils.js +0 -61
  69. package/dist/utils.js.map +0 -1
@@ -1,18 +0,0 @@
1
- function find_anchor(node) {
2
- while (node && node.nodeName.toUpperCase() !== 'A') node = node.parentNode; // SVG <a> elements have a lowercase name
3
- return node;
4
- }
5
-
6
- function get_base_uri(window_document) {
7
- let baseURI = window_document.baseURI;
8
-
9
- if (!baseURI) {
10
- const baseTags = window_document.getElementsByTagName('base');
11
- baseURI = baseTags.length ? baseTags[0].href : window_document.URL;
12
- }
13
-
14
- return baseURI;
15
- }
16
-
17
- export { find_anchor as f, get_base_uri as g };
18
- //# sourceMappingURL=utils-85ebcc60.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils-85ebcc60.js","sources":["../../src/runtime/internal/utils.js"],"sourcesContent":["export function find_anchor(node) {\n\twhile (node && node.nodeName.toUpperCase() !== 'A') node = node.parentNode; // SVG <a> elements have a lowercase name\n\treturn node;\n}\n\nexport function get_base_uri(window_document) {\n\tlet baseURI = window_document.baseURI;\n\n\tif (!baseURI) {\n\t\tconst baseTags = window_document.getElementsByTagName('base');\n\t\tbaseURI = baseTags.length ? baseTags[0].href : window_document.URL;\n\t}\n\n\treturn baseURI;\n}\n"],"names":[],"mappings":"AAAO,SAAS,WAAW,CAAC,IAAI,EAAE;AAClC,CAAC,OAAO,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,GAAG,EAAE,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC;AAC5E,CAAC,OAAO,IAAI,CAAC;AACb,CAAC;AACD;AACO,SAAS,YAAY,CAAC,eAAe,EAAE;AAC9C,CAAC,IAAI,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC;AACvC;AACA,CAAC,IAAI,CAAC,OAAO,EAAE;AACf,EAAE,MAAM,QAAQ,GAAG,eAAe,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAChE,EAAE,OAAO,GAAG,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,eAAe,CAAC,GAAG,CAAC;AACrE,EAAE;AACF;AACA,CAAC,OAAO,OAAO,CAAC;AAChB;;;;"}
package/dist/api.js DELETED
@@ -1,28 +0,0 @@
1
- export { dev } from './index2.js';
2
- export { build } from './index3.js';
3
- export { start } from './index4.js';
4
- export { l as load_config } from './index.js';
5
- import 'http';
6
- import 'fs';
7
- import 'path';
8
- import 'url';
9
- import 'events';
10
- import 'cheap-watch';
11
- import 'util';
12
- import 'os';
13
- import 'https';
14
- import 'child_process';
15
- import 'domain';
16
- import 'querystring';
17
- import 'vm';
18
- import 'vite';
19
- import './create_app.js';
20
- import './standard.js';
21
- import './utils.js';
22
- import './renderer.js';
23
- import 'crypto';
24
- import 'stream';
25
- import 'zlib';
26
- import './index5.js';
27
- import '@sveltejs/vite-plugin-svelte';
28
- //# sourceMappingURL=api.js.map
package/dist/api.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/cli.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.js","sources":["../src/cli.js"],"sourcesContent":["import { existsSync } from 'fs';\nimport sade from 'sade';\nimport colors from 'kleur';\nimport { load_config } from './api/load_config';\nimport * as pkg from '../package.json';\n\nasync function get_config() {\n\t// TODO this is temporary, for the benefit of early adopters\n\tif (existsSync('snowpack.config.js') || existsSync('snowpack.config.cjs')) {\n\t\t// prettier-ignore\n\t\tconsole.error(colors.bold().red(\n\t\t\t'SvelteKit now uses https://vitejs.dev. Please replace snowpack.config.js with vite.config.js:'\n\t\t));\n\n\t\t// prettier-ignore\n\t\tconsole.error(`\n\t\t\timport { resolve } from 'path';\n\n\t\t\texport default {\n\t\t\t\tresolve: {\n\t\t\t\t\talias: {\n\t\t\t\t\t\t$components: resolve('src/components')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t`.replace(/^\\t{3}/gm, '').replace(/\\t/gm, ' ').trim());\n\t}\n\n\ttry {\n\t\treturn await load_config();\n\t} catch (error) {\n\t\tlet message = error.message;\n\n\t\tif (error.code === 'MODULE_NOT_FOUND') {\n\t\t\tif (existsSync('svelte.config.js')) {\n\t\t\t\t// TODO this is temporary, for the benefit of early adopters\n\t\t\t\tmessage =\n\t\t\t\t\t'You must rename svelte.config.js to svelte.config.cjs, and snowpack.config.js to snowpack.config.cjs';\n\t\t\t} else {\n\t\t\t\tmessage = 'Missing svelte.config.cjs';\n\t\t\t}\n\t\t} else if (error.name === 'SyntaxError') {\n\t\t\tmessage = 'Malformed svelte.config.cjs';\n\t\t}\n\n\t\tconsole.error(colors.bold().red(message));\n\t\tconsole.error(colors.grey(error.stack));\n\t\tprocess.exit(1);\n\t}\n}\n\nfunction handle_error(error) {\n\tconsole.log(colors.bold().red(`> ${error.message}`));\n\tconsole.log(colors.gray(error.stack));\n\tprocess.exit(1);\n}\n\nasync function launch(port) {\n\tconst { exec } = await import('child_process');\n\texec(`${process.platform == 'win32' ? 'start' : 'open'} http://localhost:${port}`);\n}\n\nconst prog = sade('svelte-kit').version(pkg.version);\n\nprog\n\t.command('dev')\n\t.describe('Start a development server')\n\t.option('-p, --port', 'Port', 3000)\n\t.option('-o, --open', 'Open a browser tab', false)\n\t.action(async ({ port, open }) => {\n\t\tprocess.env.NODE_ENV = 'development';\n\t\tconst config = await get_config();\n\n\t\tconst { dev } = await import('./api/dev');\n\n\t\ttry {\n\t\t\tconst watcher = await dev({ port, config });\n\n\t\t\twatcher.on('stdout', (data) => {\n\t\t\t\tprocess.stdout.write(data);\n\t\t\t});\n\n\t\t\twatcher.on('stderr', (data) => {\n\t\t\t\tprocess.stderr.write(data);\n\t\t\t});\n\n\t\t\tconsole.log(colors.bold().cyan(`> Listening on http://localhost:${watcher.port}`));\n\t\t\tif (open) launch(watcher.port);\n\t\t} catch (error) {\n\t\t\thandle_error(error);\n\t\t}\n\t});\n\nprog\n\t.command('build')\n\t.describe('Create a production build of your app')\n\t.action(async () => {\n\t\tprocess.env.NODE_ENV = 'production';\n\t\tconst config = await get_config();\n\n\t\tconst { build } = await import('./api/build');\n\n\t\ttry {\n\t\t\tawait build(config);\n\t\t} catch (error) {\n\t\t\thandle_error(error);\n\t\t}\n\t});\n\nprog\n\t.command('start')\n\t.describe('Serve an already-built app')\n\t.option('-p, --port', 'Port', 3000)\n\t.option('-o, --open', 'Open a browser tab', false)\n\t.action(async ({ port, open }) => {\n\t\tprocess.env.NODE_ENV = 'production';\n\t\tconst config = await get_config();\n\n\t\tconst { start } = await import('./api/start');\n\n\t\ttry {\n\t\t\tawait start({ port, config });\n\n\t\t\tconsole.log(colors.bold().cyan(`> Listening on http://localhost:${port}`));\n\t\t\tif (open) if (open) launch(port);\n\t\t} catch (error) {\n\t\t\thandle_error(error);\n\t\t}\n\t});\n\nprog\n\t.command('adapt')\n\t.describe('Customise your production build for different platforms')\n\t.option('--verbose', 'Log more stuff', false)\n\t.action(async ({ verbose }) => {\n\t\tprocess.env.NODE_ENV = 'production';\n\t\tconst config = await get_config();\n\n\t\tconst { adapt } = await import('./api/adapt');\n\n\t\ttry {\n\t\t\tawait adapt(config, { verbose });\n\t\t} catch (error) {\n\t\t\thandle_error(error);\n\t\t}\n\t});\n\nprog.parse(process.argv, { unknown: (arg) => `Unknown option: ${arg}` });\n"],"names":["colors","pkg.version"],"mappings":";;;;;;;;AAMA,eAAe,UAAU,GAAG;AAC5B;AACA,CAAC,IAAI,UAAU,CAAC,oBAAoB,CAAC,IAAI,UAAU,CAAC,qBAAqB,CAAC,EAAE;AAC5E;AACA,EAAE,OAAO,CAAC,KAAK,CAACA,CAAM,CAAC,IAAI,EAAE,CAAC,GAAG;AACjC,GAAG,+FAA+F;AAClG,GAAG,CAAC,CAAC;AACL;AACA;AACA,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAC1D,EAAE;AACF;AACA,CAAC,IAAI;AACL,EAAE,OAAO,MAAM,WAAW,EAAE,CAAC;AAC7B,EAAE,CAAC,OAAO,KAAK,EAAE;AACjB,EAAE,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;AAC9B;AACA,EAAE,IAAI,KAAK,CAAC,IAAI,KAAK,kBAAkB,EAAE;AACzC,GAAG,IAAI,UAAU,CAAC,kBAAkB,CAAC,EAAE;AACvC;AACA,IAAI,OAAO;AACX,KAAK,sGAAsG,CAAC;AAC5G,IAAI,MAAM;AACV,IAAI,OAAO,GAAG,2BAA2B,CAAC;AAC1C,IAAI;AACJ,GAAG,MAAM,IAAI,KAAK,CAAC,IAAI,KAAK,aAAa,EAAE;AAC3C,GAAG,OAAO,GAAG,6BAA6B,CAAC;AAC3C,GAAG;AACH;A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,CAAC,yDAAyD,CAAC;AACrE,EAAE,MAAM,CAAC,WAAW,EAAE,gBAAgB,EAAE,KAAK,CAAC;AAC9C,EAAE,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK;AAChC,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,YAAY,CAAC;AACtC,EAAE,MAAM,MAAM,GAAG,MAAM,UAAU,EAAE,CAAC;AACpC;AACA,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,OAAO,aAAa,CAAC,CAAC;AAChD;AACA,EAAE,IAAI;AACN,GAAG,MAAM,KAAK,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;AACpC,GAAG,CAAC,OAAO,KAAK,EAAE;AAClB,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;AACvB,GAAG;AACH,EAAE,CAAC,CAAC;AACJ;AACA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC"}
@@ -1,502 +0,0 @@
1
- import { writeFileSync, statSync, utimesSync, existsSync, readdirSync } from 'fs';
2
- import { dirname, join, relative, extname } from 'path';
3
- import { M as Mime_1, s as standard } from './standard.js';
4
- import { m as mkdirp } from './utils.js';
5
-
6
- var other = {"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};
7
-
8
- var mime = new Mime_1(standard, other);
9
-
10
- function posixify(str) {
11
- return str.replace(/\\/g, '/');
12
- }
13
-
14
- const previous_contents = new Map();
15
-
16
- function write_if_changed(file, code) {
17
- if (code !== previous_contents.get(file)) {
18
- previous_contents.set(file, code);
19
- mkdirp(dirname(file));
20
- writeFileSync(file, code);
21
- fudge_mtime(file);
22
- }
23
- }
24
-
25
- function fudge_mtime(file) {
26
- // need to fudge the mtime so that webpack doesn't go doolally
27
- const { atime, mtime } = statSync(file);
28
- utimesSync(file, new Date(atime.getTime() - 999999), new Date(mtime.getTime() - 999999));
29
- }
30
-
31
- // TODO components could just be an array of strings
32
-
33
- function create_manifest_data({
34
- config,
35
- output,
36
- cwd = process.cwd(),
37
- extensions = '.svelte'
38
- }) {
39
- // TODO support .svelte.md etc?
40
- const component_extensions = extensions.split(' ');
41
-
42
- function find_layout(file_name, dir) {
43
- const files = component_extensions.map((ext) => join(dir, `${file_name}${ext}`));
44
- return files.find((file) => existsSync(join(cwd, file)));
45
- }
46
-
47
- const components = [];
48
- const pages = [];
49
- const endpoints = [];
50
-
51
- const seen = new Map();
52
- const check_pattern = (pattern, file) => {
53
- pattern = pattern.toString();
54
-
55
- if (seen.has(pattern)) {
56
- throw new Error(`The ${seen.get(pattern)} and ${file} routes clash`);
57
- }
58
-
59
- seen.set(pattern, file);
60
- };
61
-
62
- const default_layout = `${output}/components/layout.svelte`;
63
- const default_error = `${output}/components/error.svelte`;
64
-
65
- function walk(dir, parent_segments, parent_params, stack) {
66
- const items = readdirSync(dir)
67
- .map((basename) => {
68
- const resolved = join(dir, basename);
69
- const file = relative(cwd, resolved);
70
- const is_dir = statSync(resolved).isDirectory();
71
-
72
- const ext = extname(basename);
73
-
74
- if (basename[0] === '$') return null; // $layout, $error
75
- if (basename[0] === '_') return null; // private files
76
- if (basename[0] === '.' && basename !== '.well-known') return null;
77
- if (!is_dir && !/^\.[a-z]+$/i.test(ext)) return null; // filter out tmp files etc
78
-
79
- const segment = is_dir ? basename : basename.slice(0, -ext.length);
80
-
81
- if (/\]\[/.test(segment)) {
82
- throw new Error(`Invalid route ${file} — parameters must be separated`);
83
- }
84
-
85
- const parts = get_parts(segment);
86
- const is_index = is_dir ? false : basename.startsWith('index.');
87
- const is_page = component_extensions.indexOf(ext) !== -1;
88
- const route_suffix = basename.slice(basename.indexOf('.'), -ext.length);
89
-
90
- parts.forEach((part) => {
91
- if (part.qualifier && /[()?:]/.test(part.qualifier.slice(1, -1))) {
92
- throw new Error(`Invalid route ${file} — cannot use (, ), ? or : in route qualifiers`);
93
- }
94
- });
95
-
96
- return {
97
- basename,
98
- ext,
99
- parts,
100
- file: posixify(file),
101
- is_dir,
102
- is_index,
103
- is_page,
104
- route_suffix
105
- };
106
- })
107
- .filter(Boolean)
108
- .sort(comparator);
109
-
110
- items.forEach((item) => {
111
- const segments = parent_segments.slice();
112
-
113
- if (item.is_index) {
114
- if (item.route_suffix) {
115
- if (segments.length > 0) {
116
- const last_segment = segments[segments.length - 1].slice();
117
- const last_part = last_segment[last_segment.length - 1];
118
-
119
- if (last_part.dynamic) {
120
- last_segment.push({ dynamic: false, content: item.route_suffix });
121
- } else {
122
- last_segment[last_segment.length - 1] = {
123
- dynamic: false,
124
- content: `${last_part.content}${item.route_suffix}`
125
- };
126
- }
127
-
128
- segments[segments.length - 1] = last_segment;
129
- } else {
130
- segments.push(item.parts);
131
- }
132
- }
133
- } else {
134
- segments.push(item.parts);
135
- }
136
-
137
- const params = parent_params.slice();
138
- params.push(...item.parts.filter((p) => p.dynamic).map((p) => p.content));
139
-
140
- if (item.is_dir) {
141
- const component = find_layout('$layout', item.file);
142
-
143
- if (component) components.push(component);
144
-
145
- walk(
146
- join(dir, item.basename),
147
- segments,
148
- params,
149
- component ? stack.concat(component) : stack
150
- );
151
- } else if (item.is_page) {
152
- components.push(item.file);
153
-
154
- const parts =
155
- item.is_index && stack[stack.length - 1] === null
156
- ? stack.slice(0, -1).concat(item.file)
157
- : stack.concat(item.file);
158
-
159
- const pattern = get_pattern(segments, true);
160
- check_pattern(pattern, item.file);
161
-
162
- pages.push({
163
- pattern,
164
- params,
165
- parts
166
- });
167
- } else {
168
- const pattern = get_pattern(segments, !item.route_suffix);
169
- check_pattern(pattern, item.file);
170
-
171
- endpoints.push({
172
- pattern,
173
- file: item.file,
174
- params
175
- });
176
- }
177
- });
178
- }
179
-
180
- const layout = find_layout('$layout', config.files.routes) || default_layout;
181
- const error = find_layout('$error', config.files.routes) || default_error;
182
-
183
- walk(join(cwd, config.files.routes), [], [], []);
184
-
185
- const assets_dir = join(cwd, config.files.assets);
186
-
187
- return {
188
- assets: existsSync(assets_dir) ? list_files(assets_dir, '') : [],
189
- layout,
190
- error,
191
- components,
192
- pages,
193
- endpoints
194
- };
195
- }
196
-
197
- function is_spread(path) {
198
- const spread_pattern = /\[\.{3}/g;
199
- return spread_pattern.test(path);
200
- }
201
-
202
- function comparator(a, b) {
203
- if (a.is_index !== b.is_index) {
204
- if (a.is_index) return is_spread(a.file) ? 1 : -1;
205
-
206
- return is_spread(b.file) ? -1 : 1;
207
- }
208
-
209
- const max = Math.max(a.parts.length, b.parts.length);
210
-
211
- for (let i = 0; i < max; i += 1) {
212
- const a_sub_part = a.parts[i];
213
- const b_sub_part = b.parts[i];
214
-
215
- if (!a_sub_part) return 1; // b is more specific, so goes first
216
- if (!b_sub_part) return -1;
217
-
218
- // if spread && index, order later
219
- if (a_sub_part.spread && b_sub_part.spread) {
220
- return a.is_index ? 1 : -1;
221
- }
222
-
223
- // If one is ...spread order it later
224
- if (a_sub_part.spread !== b_sub_part.spread) return a_sub_part.spread ? 1 : -1;
225
-
226
- if (a_sub_part.dynamic !== b_sub_part.dynamic) {
227
- return a_sub_part.dynamic ? 1 : -1;
228
- }
229
-
230
- if (!a_sub_part.dynamic && a_sub_part.content !== b_sub_part.content) {
231
- return (
232
- b_sub_part.content.length - a_sub_part.content.length ||
233
- (a_sub_part.content < b_sub_part.content ? -1 : 1)
234
- );
235
- }
236
-
237
- // If both parts dynamic, check for regexp patterns
238
- if (a_sub_part.dynamic && b_sub_part.dynamic) {
239
- const regexp_pattern = /\((.*?)\)/;
240
- const a_match = regexp_pattern.exec(a_sub_part.content);
241
- const b_match = regexp_pattern.exec(b_sub_part.content);
242
-
243
- if (!a_match && b_match) {
244
- return 1; // No regexp, so less specific than b
245
- }
246
- if (!b_match && a_match) {
247
- return -1;
248
- }
249
- if (a_match && b_match && a_match[1] !== b_match[1]) {
250
- return b_match[1].length - a_match[1].length;
251
- }
252
- }
253
- }
254
- }
255
-
256
- function get_parts(part) {
257
- return part
258
- .split(/\[(.+?\(.+?\)|.+?)\]/)
259
- .map((str, i) => {
260
- if (!str) return null;
261
- const dynamic = i % 2 === 1;
262
-
263
- const [, content, qualifier] = dynamic ? /([^(]+)(\(.+\))?$/.exec(str) : [null, str, null];
264
-
265
- return {
266
- content,
267
- dynamic,
268
- spread: dynamic && /^\.{3}.+$/.test(content),
269
- qualifier
270
- };
271
- })
272
- .filter(Boolean);
273
- }
274
-
275
- function get_pattern(segments, add_trailing_slash) {
276
- const path = segments
277
- .map((segment) => {
278
- return segment
279
- .map((part) => {
280
- return part.dynamic
281
- ? part.qualifier || (part.spread ? '(.+)' : '([^/]+?)')
282
- : encodeURI(part.content.normalize())
283
- .replace(/\?/g, '%3F')
284
- .replace(/#/g, '%23')
285
- .replace(/%5B/g, '[')
286
- .replace(/%5D/g, ']')
287
- .replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
288
- })
289
- .join('');
290
- })
291
- .join('\\/');
292
-
293
- const trailing = add_trailing_slash && segments.length ? '\\/?$' : '$';
294
-
295
- return new RegExp(`^\\/${path}${trailing}`);
296
- }
297
-
298
- function list_files(dir, path, files = []) {
299
- readdirSync(dir).forEach((file) => {
300
- const full = `${dir}/${file}`;
301
-
302
- const stats = statSync(full);
303
- const joined = path ? `${path}/${file}` : file;
304
-
305
- if (stats.isDirectory()) {
306
- list_files(full, joined, files);
307
- } else {
308
- if (file === '.DS_Store') return;
309
- files.push({
310
- file: joined,
311
- size: stats.size,
312
- type: mime.getType(joined)
313
- });
314
- }
315
- });
316
-
317
- return files;
318
- }
319
-
320
- const s = JSON.stringify;
321
-
322
- function create_app({ manifest_data, output }) {
323
- const dir = `${output}/generated`;
324
-
325
- write_if_changed(`${dir}/manifest.js`, generate_client_manifest(manifest_data, dir));
326
-
327
- write_if_changed(`${dir}/root.svelte`, generate_app(manifest_data, dir));
328
- }
329
-
330
- function trim(str) {
331
- return str.replace(/^\t\t/gm, '').trim();
332
- }
333
-
334
- function generate_client_manifest(manifest_data, dir) {
335
- const page_ids = new Set(manifest_data.pages.map((page) => page.pattern.toString()));
336
-
337
- const endpoints_to_ignore = manifest_data.endpoints.filter(
338
- (route) => !page_ids.has(route.pattern.toString())
339
- );
340
-
341
- const component_indexes = {};
342
-
343
- const get_path = (c) => relative(dir, c);
344
-
345
- const components = `[
346
- ${manifest_data.components
347
- .map((component, i) => {
348
- component_indexes[component] = i;
349
-
350
- return `() => import(${s(get_path(component))})`;
351
- })
352
- .join(',\n\t\t\t\t')}
353
- ]`.replace(/^\t/gm, '');
354
-
355
- const pages = `[
356
- ${manifest_data.pages
357
- .map((page) => {
358
- const params = page.params.length
359
- ? '(m) => ({ ' +
360
- page.params
361
- .map((param, i) => {
362
- return param.startsWith('...')
363
- ? `${param.slice(3)}: d(m[${i + 1}]).split('/')`
364
- : `${param}: d(m[${i + 1}])`;
365
- })
366
- .join(', ') +
367
- '})'
368
- : 'empty';
369
-
370
- return `{
371
- // ${page.parts[page.parts.length - 1]}
372
- pattern: ${page.pattern},
373
- params: ${params},
374
- parts: [${page.parts.map((part) => `components[${component_indexes[part]}]`).join(', ')}]
375
- }`;
376
- })
377
- .join(',\n\n\t\t')}
378
- ]`.replace(/^\t/gm, '');
379
-
380
- return trim(`
381
- import * as layout from ${s(get_path(manifest_data.layout))};
382
-
383
- const components = ${components};
384
-
385
- const d = decodeURIComponent;
386
- const empty = () => ({});
387
-
388
- export const pages = ${pages};
389
-
390
- export const ignore = [
391
- ${endpoints_to_ignore.map((route) => route.pattern).join(',\n\t\t\t')}
392
- ];
393
-
394
- export { layout };
395
- `);
396
- }
397
-
398
- function generate_app(manifest_data, dir) {
399
- // TODO remove default layout altogether
400
-
401
- const max_depth = Math.max(
402
- ...manifest_data.pages.map((page) => page.parts.filter(Boolean).length)
403
- );
404
-
405
- const levels = [];
406
- for (let i = 0; i <= max_depth; i += 1) {
407
- levels.push(i);
408
- }
409
-
410
- let l = max_depth;
411
-
412
- let pyramid = `<svelte:component this={components[${l}]} {...(props_${l} || {})}/>`;
413
-
414
- while (l-- > 1) {
415
- pyramid = `
416
- <svelte:component this={components[${l}]} {...(props_${l} || {})}>
417
- {#if components[${l + 1}]}
418
- ${pyramid.replace(/\n/g, '\n\t\t\t\t\t')}
419
- {/if}
420
- </svelte:component>
421
- `
422
- .replace(/^\t\t\t/gm, '')
423
- .trim();
424
- }
425
-
426
- const error_file = relative(dir, manifest_data.error);
427
-
428
- return trim(`
429
- <!-- This file is generated by @sveltejs/kit — do not edit it! -->
430
- <script>
431
- import { setContext, afterUpdate, onMount } from 'svelte';
432
- import ErrorComponent from ${s(error_file)};
433
-
434
- // error handling
435
- export let status = undefined;
436
- export let error = undefined;
437
-
438
- // stores
439
- export let stores;
440
- export let page;
441
-
442
- export let components;
443
- ${levels.map((l) => `export let props_${l} = null;`).join('\n\t\t\t')}
444
-
445
- const Layout = components[0];
446
-
447
- setContext('__svelte__', stores);
448
-
449
- $: stores.page.set(page);
450
- afterUpdate(stores.page.notify);
451
-
452
- let mounted = false;
453
- let navigated = false;
454
- let title = null;
455
-
456
- onMount(() => {
457
- const unsubscribe = stores.page.subscribe(() => {
458
- if (mounted) {
459
- navigated = true;
460
- title = document.title;
461
- }
462
- });
463
-
464
- mounted = true;
465
- return unsubscribe;
466
- });
467
- </script>
468
-
469
- <Layout {...(props_0 || {})}>
470
- {#if error}
471
- <ErrorComponent {status} {error}/>
472
- {:else}
473
- ${pyramid.replace(/\n/g, '\n\t\t\t\t')}
474
- {/if}
475
- </Layout>
476
-
477
- {#if mounted}
478
- <div id="svelte-announcer" aria-live="assertive" aria-atomic="true">
479
- {#if navigated}
480
- Navigated to {title}
481
- {/if}
482
- </div>
483
- {/if}
484
-
485
- <style>
486
- #svelte-announcer {
487
- position: absolute;
488
- left: 0;
489
- top: 0;
490
- clip: rect(0 0 0 0);
491
- clip-path: inset(50%);
492
- overflow: hidden;
493
- white-space: nowrap;
494
- width: 1px;
495
- height: 1px;
496
- }
497
- </style>
498
- `);
499
- }
500
-
501
- export { create_app as a, create_manifest_data as c };
502
- //# sourceMappingURL=create_app.js.map