@rodyssey/cli 0.5.0 → 0.7.0

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 (2) hide show
  1. package/dist/cli.js +1914 -1744
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -2071,7 +2071,7 @@ var {
2071
2071
  // package.json
2072
2072
  var package_default = {
2073
2073
  name: "@rodyssey/cli",
2074
- version: "0.5.0",
2074
+ version: "0.7.0",
2075
2075
  description: "Scaffold new projects from airconcepts templates",
2076
2076
  repository: {
2077
2077
  type: "git",
@@ -2474,7 +2474,7 @@ Server view:`);
2474
2474
 
2475
2475
  // src/create.ts
2476
2476
  import { execSync } from "node:child_process";
2477
- import { existsSync as existsSync3, rmSync } from "node:fs";
2477
+ import { existsSync as existsSync5, rmSync, writeFileSync as writeFileSync5 } from "node:fs";
2478
2478
  import path2 from "node:path";
2479
2479
 
2480
2480
  // src/utils.ts
@@ -2548,1441 +2548,598 @@ function loadEnv(envName, options = {}) {
2548
2548
  }
2549
2549
  }
2550
2550
 
2551
- // src/create.ts
2552
- var PLACEHOLDER = "__PROJECT_NAME__";
2553
- var PLACEHOLDER_LOWER = "__project_name__";
2554
- var REPLACEMENT_FILES = {
2555
- webapp: ["package.json", "index.html"],
2556
- "webapp-fullstack": ["package.json", "wrangler.jsonc"]
2551
+ // src/config-file.ts
2552
+ import { existsSync as existsSync4, readFileSync as readFileSync4, writeFileSync as writeFileSync4 } from "node:fs";
2553
+ import { resolve as resolve2 } from "node:path";
2554
+
2555
+ // src/update-webapp-config.ts
2556
+ import { existsSync as existsSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "node:fs";
2557
+ import { resolve } from "node:path";
2558
+ var CONFIG_URLS = {
2559
+ local: "http://localhost:5176/api/webapps/config",
2560
+ development: "https://development-cms.rodyssey.ai/api/webapps/config",
2561
+ staging: "https://staging-cms.rodyssey.ai/api/webapps/config",
2562
+ production: "https://cms.rodyssey.ai/api/webapps/config"
2557
2563
  };
2558
- function isObject2(value) {
2559
- return !!value && typeof value === "object" && !Array.isArray(value);
2560
- }
2561
- function pickString(...values) {
2562
- return values.find((value) => typeof value === "string" && value.length > 0);
2564
+ function parseJsonOption(value, optionName) {
2565
+ const maybePath = resolve(process.cwd(), value);
2566
+ const raw = existsSync3(maybePath) ? readFileSync3(maybePath, "utf-8") : value;
2567
+ try {
2568
+ const parsed = JSON.parse(raw);
2569
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
2570
+ throw new Error("value must be a JSON object");
2571
+ }
2572
+ return parsed;
2573
+ } catch (error) {
2574
+ const message = error instanceof Error ? error.message : String(error);
2575
+ throw new Error(`Invalid ${optionName}: ${message}`);
2576
+ }
2563
2577
  }
2564
- function nestedObject(value, key) {
2565
- if (!isObject2(value))
2578
+ function coerceMaybeNull(value) {
2579
+ if (value === undefined)
2566
2580
  return;
2567
- const nested = value[key];
2568
- return isObject2(nested) ? nested : undefined;
2581
+ if (value === "null")
2582
+ return null;
2583
+ return value;
2569
2584
  }
2570
- function extractWebappId(payload) {
2571
- const webapp = nestedObject(payload, "webapp");
2572
- return pickString(webapp?.id, webapp?.webappId);
2585
+ function resolveConfigUrl(options, required = true) {
2586
+ const configUrl = options.url || process.env.WEBAPP_CONFIG_URL || CONFIG_URLS[options.env];
2587
+ if (!configUrl) {
2588
+ if (!required)
2589
+ return;
2590
+ console.error("❌ Error: no webapp config endpoint configured.");
2591
+ console.error(`\uD83D\uDCA1 Use one of these environments: ${Object.keys(CONFIG_URLS).join(", ")}, pass --url, or set WEBAPP_CONFIG_URL in your .env file.`);
2592
+ process.exit(1);
2593
+ }
2594
+ const url = new URL(configUrl);
2595
+ if (!options.host && !options.port) {
2596
+ return url.toString().replace(/\/$/, "");
2597
+ }
2598
+ if (options.host)
2599
+ url.hostname = options.host;
2600
+ if (options.port)
2601
+ url.port = String(options.port);
2602
+ return url.toString().replace(/\/$/, "");
2573
2603
  }
2574
- function extractDeployToken(payload) {
2575
- const webapp = nestedObject(payload, "webapp");
2576
- return pickString(webapp?.deployToken, webapp?.deploymentToken);
2604
+ function buildDetailsPayload(options) {
2605
+ const payload = options.details ? parseJsonOption(options.details, "--details") : {};
2606
+ const title = coerceMaybeNull(options.title);
2607
+ const description = coerceMaybeNull(options.description);
2608
+ const coverImg = coerceMaybeNull(options.coverImg);
2609
+ if (title !== undefined)
2610
+ payload.title = title;
2611
+ if (description !== undefined)
2612
+ payload.description = description;
2613
+ if (coverImg !== undefined)
2614
+ payload.coverImg = coverImg;
2615
+ if (options.localization !== undefined) {
2616
+ payload.localization = options.localization === "null" ? null : parseJsonOption(options.localization, "--localization");
2617
+ }
2618
+ return payload;
2577
2619
  }
2578
- function writeProjectEnv(projectDir, provisioned) {
2579
- upsertEnvFile(path2.join(projectDir, ".env"), {
2580
- WEBAPP_ID: provisioned.webappId,
2581
- DEPLOY_TOKEN: provisioned.deployToken
2582
- });
2620
+ function resolveWebappId(webappId) {
2621
+ const resolved = webappId || process.env.WEBAPP_ID;
2622
+ if (!resolved) {
2623
+ console.error("❌ Error: WEBAPP_ID is not set. Pass --webapp-id or set it in your .env file.");
2624
+ process.exit(1);
2625
+ }
2626
+ return resolved;
2583
2627
  }
2584
- async function provisionWebapp(projectName, options) {
2585
- const cmsUrl = resolveCmsUrl(options.env, options.cmsUrl);
2586
- const token = resolveSessionToken(options.env);
2587
- const createUrl = options.createUrl || `${cmsUrl}/api/cli/webapps/create`;
2588
- const createResponse = await fetch(createUrl, {
2589
- method: "POST",
2628
+ function ensureDeployToken(env) {
2629
+ if (process.env.DEPLOY_TOKEN)
2630
+ return;
2631
+ console.error("❌ Error: DEPLOY_TOKEN is not set in environment variables.");
2632
+ console.info(`\uD83D\uDCA1 Please check your .env or .env.${env} file.`);
2633
+ process.exit(1);
2634
+ }
2635
+ function getConfigUrl(options, required = true) {
2636
+ return resolveConfigUrl(options, required);
2637
+ }
2638
+ async function patchWebappConfig(options) {
2639
+ loadEnv(options.env);
2640
+ const webappId = resolveWebappId(options.webappId);
2641
+ const CONFIG_URL = getConfigUrl(options, false);
2642
+ if (!CONFIG_URL) {
2643
+ throw new Error("No webapp config endpoint configured.");
2644
+ }
2645
+ ensureDeployToken(options.env);
2646
+ const response = await fetch(CONFIG_URL, {
2647
+ method: "PATCH",
2590
2648
  headers: {
2591
- Accept: "application/json",
2592
- Authorization: `Bearer ${token}`,
2649
+ Authorization: `Bearer ${process.env.DEPLOY_TOKEN}`,
2593
2650
  "Content-Type": "application/json"
2594
2651
  },
2595
- body: JSON.stringify({ title: projectName })
2652
+ body: JSON.stringify({ webappId, details: options.details })
2596
2653
  });
2597
- const createPayload = await readResponsePayload(createResponse);
2598
- if (!createResponse.ok) {
2599
- throw new Error(`CMS webapp creation failed: ${createResponse.status} ${createResponse.statusText}
2600
- ${JSON.stringify(createPayload, null, 2)}`);
2654
+ if (!response.ok) {
2655
+ const errorText = await response.text();
2656
+ throw new Error(`Config update failed: ${response.status} ${response.statusText}
2657
+ ${errorText}`);
2601
2658
  }
2602
- const webappId = extractWebappId(createPayload);
2603
- if (!webappId) {
2604
- throw new Error(`CMS create response did not include webapp.id:
2605
- ${JSON.stringify(createPayload, null, 2)}`);
2659
+ return await response.json().catch(() => {
2660
+ return;
2661
+ });
2662
+ }
2663
+ async function fetchWebappConfig(options) {
2664
+ loadEnv(options.env);
2665
+ const webappId = resolveWebappId(options.webappId);
2666
+ const CONFIG_URL = getConfigUrl(options, false);
2667
+ if (!CONFIG_URL) {
2668
+ throw new Error("No webapp config endpoint configured.");
2606
2669
  }
2607
- const deployToken = extractDeployToken(createPayload);
2608
- if (!deployToken) {
2609
- throw new Error(`CMS create response did not include webapp.deployToken:
2610
- ${JSON.stringify(createPayload, null, 2)}`);
2670
+ ensureDeployToken(options.env);
2671
+ const url = new URL(CONFIG_URL);
2672
+ url.searchParams.set("webappId", webappId);
2673
+ const response = await fetch(url, {
2674
+ method: "GET",
2675
+ headers: {
2676
+ Authorization: `Bearer ${process.env.DEPLOY_TOKEN}`,
2677
+ Accept: "application/json"
2678
+ }
2679
+ });
2680
+ if (!response.ok) {
2681
+ const errorText = await response.text();
2682
+ throw new Error(`Config fetch failed: ${response.status} ${response.statusText}
2683
+ ${errorText}`);
2611
2684
  }
2612
- return {
2613
- webappId,
2614
- deployToken
2615
- };
2685
+ return await response.json();
2616
2686
  }
2617
- async function create(projectName, repoUrl, templateName, autoCreate) {
2618
- const targetDir = path2.resolve(process.cwd(), projectName);
2619
- if (existsSync3(targetDir)) {
2620
- console.error(`
2621
- Directory "${projectName}" already exists.
2687
+ async function getWebappConfig(options) {
2688
+ loadEnv(options.env);
2689
+ const webappId = resolveWebappId(options.webappId);
2690
+ const CONFIG_URL = getConfigUrl(options);
2691
+ if (!CONFIG_URL)
2692
+ return;
2693
+ const url = new URL(CONFIG_URL);
2694
+ url.searchParams.set("webappId", webappId);
2695
+ console.log(`⚙️ Pulling webapp config for [${options.env}] environment...`);
2696
+ console.log(`\uD83D\uDCCD Config URL: ${url.toString()}`);
2697
+ console.log(`\uD83D\uDCCD Webapp ID: ${webappId}
2622
2698
  `);
2699
+ const config = await fetchWebappConfig(options);
2700
+ const output = JSON.stringify(config, null, 2);
2701
+ if (options.out) {
2702
+ writeFileSync3(options.out, `${output}
2703
+ `, "utf-8");
2704
+ console.log(`✅ Webapp config written to ${options.out}`);
2705
+ return;
2706
+ }
2707
+ console.log(output);
2708
+ }
2709
+ async function updateWebappConfig(options) {
2710
+ loadEnv(options.env);
2711
+ const webappId = resolveWebappId(options.webappId);
2712
+ const details = buildDetailsPayload(options);
2713
+ if (Object.keys(details).length === 0) {
2714
+ console.error("❌ Error: no detail fields provided. Use --title, --description, --cover-img, --localization, or --details.");
2623
2715
  process.exit(1);
2624
2716
  }
2625
- if (autoCreate?.enabled) {
2626
- resolveCmsUrl(autoCreate.env, autoCreate.cmsUrl);
2627
- resolveSessionToken(autoCreate.env);
2717
+ const payload = { webappId, details };
2718
+ const CONFIG_URL = getConfigUrl(options, !options.dryRun);
2719
+ if (!options.dryRun)
2720
+ ensureDeployToken(options.env);
2721
+ console.log(`⚙️ Updating webapp config for [${options.env}] environment...`);
2722
+ if (CONFIG_URL) {
2723
+ console.log(`\uD83D\uDCCD Config URL: ${CONFIG_URL}`);
2628
2724
  }
2629
- console.log(`
2630
- ⏳ Cloning template "${templateName}"...
2631
- `);
2632
- try {
2633
- execSync(`git clone --depth 1 ${repoUrl} ${projectName}`, {
2634
- stdio: "inherit",
2635
- cwd: process.cwd()
2636
- });
2637
- } catch {
2638
- console.error(`
2639
- ✖ Failed to clone template. Make sure you have SSH access to the repo.
2725
+ console.log(`\uD83D\uDCCD Webapp ID: ${webappId}
2640
2726
  `);
2641
- process.exit(1);
2642
- }
2643
- const gitDir = path2.join(targetDir, ".git");
2644
- if (existsSync3(gitDir)) {
2645
- rmSync(gitDir, { recursive: true, force: true });
2727
+ if (options.dryRun) {
2728
+ console.log("\uD83E\uDDEA Dry run payload:");
2729
+ console.log(JSON.stringify(payload, null, 2));
2730
+ return;
2646
2731
  }
2647
- const filesToReplace = REPLACEMENT_FILES[templateName] ?? [];
2648
- if (filesToReplace.length > 0) {
2649
- console.log(` \uD83D\uDCDD Replacing project name...`);
2650
- replaceInFiles(targetDir, filesToReplace, PLACEHOLDER, projectName);
2651
- replaceInFiles(targetDir, filesToReplace, PLACEHOLDER_LOWER, projectName.toLowerCase());
2732
+ if (!CONFIG_URL)
2733
+ return;
2734
+ const result = await patchWebappConfig({
2735
+ env: options.env,
2736
+ details,
2737
+ webappId,
2738
+ url: options.url,
2739
+ host: options.host,
2740
+ port: options.port
2741
+ });
2742
+ console.log("✅ Webapp config updated");
2743
+ if (result !== undefined) {
2744
+ console.log(`
2745
+ \uD83D\uDCCB Update result:`, result);
2652
2746
  }
2653
- execSync("git init", { stdio: "ignore", cwd: targetDir });
2654
- if (autoCreate?.enabled) {
2655
- console.log(` \uD83C\uDF10 Creating CMS webapp in [${autoCreate.env}]...`);
2656
- const provisioned = await provisionWebapp(projectName, autoCreate);
2657
- writeProjectEnv(targetDir, provisioned);
2658
- console.log(` \uD83D\uDD10 Wrote WEBAPP_ID and DEPLOY_TOKEN to .env`);
2659
- console.log(` \uD83D\uDCCD Webapp ID: ${provisioned.webappId}`);
2747
+ }
2748
+
2749
+ // src/cli-ui.ts
2750
+ function isPlainObject(value) {
2751
+ return !!value && typeof value === "object" && !Array.isArray(value) && Object.getPrototypeOf(value) === Object.prototype;
2752
+ }
2753
+ function compact(value) {
2754
+ return JSON.stringify(value);
2755
+ }
2756
+ function pretty(value) {
2757
+ return JSON.stringify(value, null, 2);
2758
+ }
2759
+ function useColor() {
2760
+ return !!process.stdout.isTTY && !process.env.NO_COLOR;
2761
+ }
2762
+ function paint(code, text) {
2763
+ return useColor() ? `\x1B[${code}m${text}\x1B[0m` : text;
2764
+ }
2765
+ var green = (s) => paint("32", s);
2766
+ var red = (s) => paint("31", s);
2767
+ var yellow = (s) => paint("33", s);
2768
+ var dim = (s) => paint("2", s);
2769
+ var strike = (s) => paint("9", s);
2770
+ async function prompt(question) {
2771
+ const readline = await import("node:readline");
2772
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
2773
+ return new Promise((resolveAnswer) => {
2774
+ rl.question(question, (answer) => {
2775
+ rl.close();
2776
+ resolveAnswer(answer);
2777
+ });
2778
+ });
2779
+ }
2780
+ function isExplicitYes(answer) {
2781
+ const trimmed = answer.trim().toLowerCase();
2782
+ return trimmed === "y" || trimmed === "yes";
2783
+ }
2784
+ function pathToDot(path2) {
2785
+ return path2.replace(/^\//, "").replaceAll("/", ".");
2786
+ }
2787
+ function deepEqual(a, b) {
2788
+ if (a === b)
2789
+ return true;
2790
+ if (typeof a !== typeof b)
2791
+ return false;
2792
+ if (a === null || b === null)
2793
+ return false;
2794
+ if (Array.isArray(a) || Array.isArray(b)) {
2795
+ if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length)
2796
+ return false;
2797
+ return a.every((v, i) => deepEqual(v, b[i]));
2660
2798
  }
2661
- console.log(`
2662
- Project "${projectName}" created successfully!
2799
+ if (typeof a === "object" && typeof b === "object") {
2800
+ const ak = Object.keys(a);
2801
+ const bk = Object.keys(b);
2802
+ if (ak.length !== bk.length)
2803
+ return false;
2804
+ return ak.every((k) => deepEqual(a[k], b[k]));
2805
+ }
2806
+ return false;
2807
+ }
2808
+ function diffJson(before, after, path2 = "") {
2809
+ if (deepEqual(before, after))
2810
+ return [];
2811
+ if (before === undefined)
2812
+ return [{ path: path2, kind: "add", after }];
2813
+ if (after === undefined)
2814
+ return [{ path: path2, kind: "remove", before }];
2815
+ if (!isPlainObject(before) || !isPlainObject(after)) {
2816
+ return [{ path: path2, kind: "change", before, after }];
2817
+ }
2818
+ const keys = new Set([...Object.keys(before), ...Object.keys(after)]);
2819
+ const out = [];
2820
+ for (const key of keys) {
2821
+ out.push(...diffJson(before[key], after[key], `${path2}/${key}`));
2822
+ }
2823
+ return out;
2824
+ }
2825
+ function deltaLine(d) {
2826
+ const path2 = pathToDot(d.path) || "(root)";
2827
+ if (d.kind === "add")
2828
+ return green(` ${path2}: ${compact(d.after)}`);
2829
+ if (d.kind === "change") {
2830
+ return yellow(` ${path2}: ${strike(compact(d.before))} → ${compact(d.after)}`);
2831
+ }
2832
+ return red(strike(` ${path2}: ${compact(d.before)}`));
2833
+ }
2834
+ function formatObjectDelta(deltas, header) {
2835
+ if (deltas.length === 0)
2836
+ return `${header}
2837
+ ${dim(" (no changes)")}`;
2838
+ const adds = deltas.filter((d) => d.kind === "add");
2839
+ const changes = deltas.filter((d) => d.kind === "change");
2840
+ const removes = deltas.filter((d) => d.kind === "remove");
2841
+ const sections = [];
2842
+ if (adds.length)
2843
+ sections.push([green("New"), ...adds.map(deltaLine)].join(`
2844
+ `));
2845
+ if (changes.length)
2846
+ sections.push([yellow("Update"), ...changes.map(deltaLine)].join(`
2847
+ `));
2848
+ if (removes.length)
2849
+ sections.push([red("Delete"), ...removes.map(deltaLine)].join(`
2850
+ `));
2851
+ return `${header}
2663
2852
 
2664
- Next steps:
2853
+ ${sections.join(`
2665
2854
 
2666
- cd ${projectName}
2667
- bun install
2668
- bun run dev
2669
- `);
2855
+ `)}`;
2670
2856
  }
2671
2857
 
2672
- // src/deploy.ts
2673
- import { execSync as execSync2 } from "node:child_process";
2674
- import { existsSync as existsSync7, readFileSync as readFileSync6, readdirSync, statSync, unlinkSync } from "node:fs";
2675
- import { join as join2 } from "node:path";
2676
-
2677
- // node_modules/mime/dist/types/other.js
2678
- var types = {
2679
- "application/prs.cww": ["cww"],
2680
- "application/prs.xsf+xml": ["xsf"],
2681
- "application/vnd.1000minds.decision-model+xml": ["1km"],
2682
- "application/vnd.3gpp.pic-bw-large": ["plb"],
2683
- "application/vnd.3gpp.pic-bw-small": ["psb"],
2684
- "application/vnd.3gpp.pic-bw-var": ["pvb"],
2685
- "application/vnd.3gpp2.tcap": ["tcap"],
2686
- "application/vnd.3m.post-it-notes": ["pwn"],
2687
- "application/vnd.accpac.simply.aso": ["aso"],
2688
- "application/vnd.accpac.simply.imp": ["imp"],
2689
- "application/vnd.acucobol": ["acu"],
2690
- "application/vnd.acucorp": ["atc", "acutc"],
2691
- "application/vnd.adobe.air-application-installer-package+zip": ["air"],
2692
- "application/vnd.adobe.formscentral.fcdt": ["fcdt"],
2693
- "application/vnd.adobe.fxp": ["fxp", "fxpl"],
2694
- "application/vnd.adobe.xdp+xml": ["xdp"],
2695
- "application/vnd.adobe.xfdf": ["*xfdf"],
2696
- "application/vnd.age": ["age"],
2697
- "application/vnd.ahead.space": ["ahead"],
2698
- "application/vnd.airzip.filesecure.azf": ["azf"],
2699
- "application/vnd.airzip.filesecure.azs": ["azs"],
2700
- "application/vnd.amazon.ebook": ["azw"],
2701
- "application/vnd.americandynamics.acc": ["acc"],
2702
- "application/vnd.amiga.ami": ["ami"],
2703
- "application/vnd.android.package-archive": ["apk"],
2704
- "application/vnd.anser-web-certificate-issue-initiation": ["cii"],
2705
- "application/vnd.anser-web-funds-transfer-initiation": ["fti"],
2706
- "application/vnd.antix.game-component": ["atx"],
2707
- "application/vnd.apple.installer+xml": ["mpkg"],
2708
- "application/vnd.apple.keynote": ["key"],
2709
- "application/vnd.apple.mpegurl": ["m3u8"],
2710
- "application/vnd.apple.numbers": ["numbers"],
2711
- "application/vnd.apple.pages": ["pages"],
2712
- "application/vnd.apple.pkpass": ["pkpass"],
2713
- "application/vnd.aristanetworks.swi": ["swi"],
2714
- "application/vnd.astraea-software.iota": ["iota"],
2715
- "application/vnd.audiograph": ["aep"],
2716
- "application/vnd.autodesk.fbx": ["fbx"],
2717
- "application/vnd.balsamiq.bmml+xml": ["bmml"],
2718
- "application/vnd.blueice.multipass": ["mpm"],
2719
- "application/vnd.bmi": ["bmi"],
2720
- "application/vnd.businessobjects": ["rep"],
2721
- "application/vnd.chemdraw+xml": ["cdxml"],
2722
- "application/vnd.chipnuts.karaoke-mmd": ["mmd"],
2723
- "application/vnd.cinderella": ["cdy"],
2724
- "application/vnd.citationstyles.style+xml": ["csl"],
2725
- "application/vnd.claymore": ["cla"],
2726
- "application/vnd.cloanto.rp9": ["rp9"],
2727
- "application/vnd.clonk.c4group": ["c4g", "c4d", "c4f", "c4p", "c4u"],
2728
- "application/vnd.cluetrust.cartomobile-config": ["c11amc"],
2729
- "application/vnd.cluetrust.cartomobile-config-pkg": ["c11amz"],
2730
- "application/vnd.commonspace": ["csp"],
2731
- "application/vnd.contact.cmsg": ["cdbcmsg"],
2732
- "application/vnd.cosmocaller": ["cmc"],
2733
- "application/vnd.crick.clicker": ["clkx"],
2734
- "application/vnd.crick.clicker.keyboard": ["clkk"],
2735
- "application/vnd.crick.clicker.palette": ["clkp"],
2736
- "application/vnd.crick.clicker.template": ["clkt"],
2737
- "application/vnd.crick.clicker.wordbank": ["clkw"],
2738
- "application/vnd.criticaltools.wbs+xml": ["wbs"],
2739
- "application/vnd.ctc-posml": ["pml"],
2740
- "application/vnd.cups-ppd": ["ppd"],
2741
- "application/vnd.curl.car": ["car"],
2742
- "application/vnd.curl.pcurl": ["pcurl"],
2743
- "application/vnd.dart": ["dart"],
2744
- "application/vnd.data-vision.rdz": ["rdz"],
2745
- "application/vnd.dbf": ["dbf"],
2746
- "application/vnd.dcmp+xml": ["dcmp"],
2747
- "application/vnd.dece.data": ["uvf", "uvvf", "uvd", "uvvd"],
2748
- "application/vnd.dece.ttml+xml": ["uvt", "uvvt"],
2749
- "application/vnd.dece.unspecified": ["uvx", "uvvx"],
2750
- "application/vnd.dece.zip": ["uvz", "uvvz"],
2751
- "application/vnd.denovo.fcselayout-link": ["fe_launch"],
2752
- "application/vnd.dna": ["dna"],
2753
- "application/vnd.dolby.mlp": ["mlp"],
2754
- "application/vnd.dpgraph": ["dpg"],
2755
- "application/vnd.dreamfactory": ["dfac"],
2756
- "application/vnd.ds-keypoint": ["kpxx"],
2757
- "application/vnd.dvb.ait": ["ait"],
2758
- "application/vnd.dvb.service": ["svc"],
2759
- "application/vnd.dynageo": ["geo"],
2760
- "application/vnd.ecowin.chart": ["mag"],
2761
- "application/vnd.enliven": ["nml"],
2762
- "application/vnd.epson.esf": ["esf"],
2763
- "application/vnd.epson.msf": ["msf"],
2764
- "application/vnd.epson.quickanime": ["qam"],
2765
- "application/vnd.epson.salt": ["slt"],
2766
- "application/vnd.epson.ssf": ["ssf"],
2767
- "application/vnd.eszigno3+xml": ["es3", "et3"],
2768
- "application/vnd.ezpix-album": ["ez2"],
2769
- "application/vnd.ezpix-package": ["ez3"],
2770
- "application/vnd.fdf": ["*fdf"],
2771
- "application/vnd.fdsn.mseed": ["mseed"],
2772
- "application/vnd.fdsn.seed": ["seed", "dataless"],
2773
- "application/vnd.flographit": ["gph"],
2774
- "application/vnd.fluxtime.clip": ["ftc"],
2775
- "application/vnd.framemaker": ["fm", "frame", "maker", "book"],
2776
- "application/vnd.frogans.fnc": ["fnc"],
2777
- "application/vnd.frogans.ltf": ["ltf"],
2778
- "application/vnd.fsc.weblaunch": ["fsc"],
2779
- "application/vnd.fujitsu.oasys": ["oas"],
2780
- "application/vnd.fujitsu.oasys2": ["oa2"],
2781
- "application/vnd.fujitsu.oasys3": ["oa3"],
2782
- "application/vnd.fujitsu.oasysgp": ["fg5"],
2783
- "application/vnd.fujitsu.oasysprs": ["bh2"],
2784
- "application/vnd.fujixerox.ddd": ["ddd"],
2785
- "application/vnd.fujixerox.docuworks": ["xdw"],
2786
- "application/vnd.fujixerox.docuworks.binder": ["xbd"],
2787
- "application/vnd.fuzzysheet": ["fzs"],
2788
- "application/vnd.genomatix.tuxedo": ["txd"],
2789
- "application/vnd.geogebra.file": ["ggb"],
2790
- "application/vnd.geogebra.slides": ["ggs"],
2791
- "application/vnd.geogebra.tool": ["ggt"],
2792
- "application/vnd.geometry-explorer": ["gex", "gre"],
2793
- "application/vnd.geonext": ["gxt"],
2794
- "application/vnd.geoplan": ["g2w"],
2795
- "application/vnd.geospace": ["g3w"],
2796
- "application/vnd.gmx": ["gmx"],
2797
- "application/vnd.google-apps.document": ["gdoc"],
2798
- "application/vnd.google-apps.drawing": ["gdraw"],
2799
- "application/vnd.google-apps.form": ["gform"],
2800
- "application/vnd.google-apps.jam": ["gjam"],
2801
- "application/vnd.google-apps.map": ["gmap"],
2802
- "application/vnd.google-apps.presentation": ["gslides"],
2803
- "application/vnd.google-apps.script": ["gscript"],
2804
- "application/vnd.google-apps.site": ["gsite"],
2805
- "application/vnd.google-apps.spreadsheet": ["gsheet"],
2806
- "application/vnd.google-earth.kml+xml": ["kml"],
2807
- "application/vnd.google-earth.kmz": ["kmz"],
2808
- "application/vnd.gov.sk.xmldatacontainer+xml": ["xdcf"],
2809
- "application/vnd.grafeq": ["gqf", "gqs"],
2810
- "application/vnd.groove-account": ["gac"],
2811
- "application/vnd.groove-help": ["ghf"],
2812
- "application/vnd.groove-identity-message": ["gim"],
2813
- "application/vnd.groove-injector": ["grv"],
2814
- "application/vnd.groove-tool-message": ["gtm"],
2815
- "application/vnd.groove-tool-template": ["tpl"],
2816
- "application/vnd.groove-vcard": ["vcg"],
2817
- "application/vnd.hal+xml": ["hal"],
2818
- "application/vnd.handheld-entertainment+xml": ["zmm"],
2819
- "application/vnd.hbci": ["hbci"],
2820
- "application/vnd.hhe.lesson-player": ["les"],
2821
- "application/vnd.hp-hpgl": ["hpgl"],
2822
- "application/vnd.hp-hpid": ["hpid"],
2823
- "application/vnd.hp-hps": ["hps"],
2824
- "application/vnd.hp-jlyt": ["jlt"],
2825
- "application/vnd.hp-pcl": ["pcl"],
2826
- "application/vnd.hp-pclxl": ["pclxl"],
2827
- "application/vnd.hydrostatix.sof-data": ["sfd-hdstx"],
2828
- "application/vnd.ibm.minipay": ["mpy"],
2829
- "application/vnd.ibm.modcap": ["afp", "listafp", "list3820"],
2830
- "application/vnd.ibm.rights-management": ["irm"],
2831
- "application/vnd.ibm.secure-container": ["sc"],
2832
- "application/vnd.iccprofile": ["icc", "icm"],
2833
- "application/vnd.igloader": ["igl"],
2834
- "application/vnd.immervision-ivp": ["ivp"],
2835
- "application/vnd.immervision-ivu": ["ivu"],
2836
- "application/vnd.insors.igm": ["igm"],
2837
- "application/vnd.intercon.formnet": ["xpw", "xpx"],
2838
- "application/vnd.intergeo": ["i2g"],
2839
- "application/vnd.intu.qbo": ["qbo"],
2840
- "application/vnd.intu.qfx": ["qfx"],
2841
- "application/vnd.ipunplugged.rcprofile": ["rcprofile"],
2842
- "application/vnd.irepository.package+xml": ["irp"],
2843
- "application/vnd.is-xpr": ["xpr"],
2844
- "application/vnd.isac.fcs": ["fcs"],
2845
- "application/vnd.jam": ["jam"],
2846
- "application/vnd.jcp.javame.midlet-rms": ["rms"],
2847
- "application/vnd.jisp": ["jisp"],
2848
- "application/vnd.joost.joda-archive": ["joda"],
2849
- "application/vnd.kahootz": ["ktz", "ktr"],
2850
- "application/vnd.kde.karbon": ["karbon"],
2851
- "application/vnd.kde.kchart": ["chrt"],
2852
- "application/vnd.kde.kformula": ["kfo"],
2853
- "application/vnd.kde.kivio": ["flw"],
2854
- "application/vnd.kde.kontour": ["kon"],
2855
- "application/vnd.kde.kpresenter": ["kpr", "kpt"],
2856
- "application/vnd.kde.kspread": ["ksp"],
2857
- "application/vnd.kde.kword": ["kwd", "kwt"],
2858
- "application/vnd.kenameaapp": ["htke"],
2859
- "application/vnd.kidspiration": ["kia"],
2860
- "application/vnd.kinar": ["kne", "knp"],
2861
- "application/vnd.koan": ["skp", "skd", "skt", "skm"],
2862
- "application/vnd.kodak-descriptor": ["sse"],
2863
- "application/vnd.las.las+xml": ["lasxml"],
2864
- "application/vnd.llamagraphics.life-balance.desktop": ["lbd"],
2865
- "application/vnd.llamagraphics.life-balance.exchange+xml": ["lbe"],
2866
- "application/vnd.lotus-1-2-3": ["123"],
2867
- "application/vnd.lotus-approach": ["apr"],
2868
- "application/vnd.lotus-freelance": ["pre"],
2869
- "application/vnd.lotus-notes": ["nsf"],
2870
- "application/vnd.lotus-organizer": ["org"],
2871
- "application/vnd.lotus-screencam": ["scm"],
2872
- "application/vnd.lotus-wordpro": ["lwp"],
2873
- "application/vnd.macports.portpkg": ["portpkg"],
2874
- "application/vnd.mapbox-vector-tile": ["mvt"],
2875
- "application/vnd.mcd": ["mcd"],
2876
- "application/vnd.medcalcdata": ["mc1"],
2877
- "application/vnd.mediastation.cdkey": ["cdkey"],
2878
- "application/vnd.mfer": ["mwf"],
2879
- "application/vnd.mfmp": ["mfm"],
2880
- "application/vnd.micrografx.flo": ["flo"],
2881
- "application/vnd.micrografx.igx": ["igx"],
2882
- "application/vnd.mif": ["mif"],
2883
- "application/vnd.mobius.daf": ["daf"],
2884
- "application/vnd.mobius.dis": ["dis"],
2885
- "application/vnd.mobius.mbk": ["mbk"],
2886
- "application/vnd.mobius.mqy": ["mqy"],
2887
- "application/vnd.mobius.msl": ["msl"],
2888
- "application/vnd.mobius.plc": ["plc"],
2889
- "application/vnd.mobius.txf": ["txf"],
2890
- "application/vnd.mophun.application": ["mpn"],
2891
- "application/vnd.mophun.certificate": ["mpc"],
2892
- "application/vnd.mozilla.xul+xml": ["xul"],
2893
- "application/vnd.ms-artgalry": ["cil"],
2894
- "application/vnd.ms-cab-compressed": ["cab"],
2895
- "application/vnd.ms-excel": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"],
2896
- "application/vnd.ms-excel.addin.macroenabled.12": ["xlam"],
2897
- "application/vnd.ms-excel.sheet.binary.macroenabled.12": ["xlsb"],
2898
- "application/vnd.ms-excel.sheet.macroenabled.12": ["xlsm"],
2899
- "application/vnd.ms-excel.template.macroenabled.12": ["xltm"],
2900
- "application/vnd.ms-fontobject": ["eot"],
2901
- "application/vnd.ms-htmlhelp": ["chm"],
2902
- "application/vnd.ms-ims": ["ims"],
2903
- "application/vnd.ms-lrm": ["lrm"],
2904
- "application/vnd.ms-officetheme": ["thmx"],
2905
- "application/vnd.ms-outlook": ["msg"],
2906
- "application/vnd.ms-pki.seccat": ["cat"],
2907
- "application/vnd.ms-pki.stl": ["*stl"],
2908
- "application/vnd.ms-powerpoint": ["ppt", "pps", "pot"],
2909
- "application/vnd.ms-powerpoint.addin.macroenabled.12": ["ppam"],
2910
- "application/vnd.ms-powerpoint.presentation.macroenabled.12": ["pptm"],
2911
- "application/vnd.ms-powerpoint.slide.macroenabled.12": ["sldm"],
2912
- "application/vnd.ms-powerpoint.slideshow.macroenabled.12": ["ppsm"],
2913
- "application/vnd.ms-powerpoint.template.macroenabled.12": ["potm"],
2914
- "application/vnd.ms-project": ["*mpp", "mpt"],
2915
- "application/vnd.ms-visio.viewer": ["vdx"],
2916
- "application/vnd.ms-word.document.macroenabled.12": ["docm"],
2917
- "application/vnd.ms-word.template.macroenabled.12": ["dotm"],
2918
- "application/vnd.ms-works": ["wps", "wks", "wcm", "wdb"],
2919
- "application/vnd.ms-wpl": ["wpl"],
2920
- "application/vnd.ms-xpsdocument": ["xps"],
2921
- "application/vnd.mseq": ["mseq"],
2922
- "application/vnd.musician": ["mus"],
2923
- "application/vnd.muvee.style": ["msty"],
2924
- "application/vnd.mynfc": ["taglet"],
2925
- "application/vnd.nato.bindingdataobject+xml": ["bdo"],
2926
- "application/vnd.neurolanguage.nlu": ["nlu"],
2927
- "application/vnd.nitf": ["ntf", "nitf"],
2928
- "application/vnd.noblenet-directory": ["nnd"],
2929
- "application/vnd.noblenet-sealer": ["nns"],
2930
- "application/vnd.noblenet-web": ["nnw"],
2931
- "application/vnd.nokia.n-gage.ac+xml": ["*ac"],
2932
- "application/vnd.nokia.n-gage.data": ["ngdat"],
2933
- "application/vnd.nokia.n-gage.symbian.install": ["n-gage"],
2934
- "application/vnd.nokia.radio-preset": ["rpst"],
2935
- "application/vnd.nokia.radio-presets": ["rpss"],
2936
- "application/vnd.novadigm.edm": ["edm"],
2937
- "application/vnd.novadigm.edx": ["edx"],
2938
- "application/vnd.novadigm.ext": ["ext"],
2939
- "application/vnd.oasis.opendocument.chart": ["odc"],
2940
- "application/vnd.oasis.opendocument.chart-template": ["otc"],
2941
- "application/vnd.oasis.opendocument.database": ["odb"],
2942
- "application/vnd.oasis.opendocument.formula": ["odf"],
2943
- "application/vnd.oasis.opendocument.formula-template": ["odft"],
2944
- "application/vnd.oasis.opendocument.graphics": ["odg"],
2945
- "application/vnd.oasis.opendocument.graphics-template": ["otg"],
2946
- "application/vnd.oasis.opendocument.image": ["odi"],
2947
- "application/vnd.oasis.opendocument.image-template": ["oti"],
2948
- "application/vnd.oasis.opendocument.presentation": ["odp"],
2949
- "application/vnd.oasis.opendocument.presentation-template": ["otp"],
2950
- "application/vnd.oasis.opendocument.spreadsheet": ["ods"],
2951
- "application/vnd.oasis.opendocument.spreadsheet-template": ["ots"],
2952
- "application/vnd.oasis.opendocument.text": ["odt"],
2953
- "application/vnd.oasis.opendocument.text-master": ["odm"],
2954
- "application/vnd.oasis.opendocument.text-template": ["ott"],
2955
- "application/vnd.oasis.opendocument.text-web": ["oth"],
2956
- "application/vnd.olpc-sugar": ["xo"],
2957
- "application/vnd.oma.dd2+xml": ["dd2"],
2958
- "application/vnd.openblox.game+xml": ["obgx"],
2959
- "application/vnd.openofficeorg.extension": ["oxt"],
2960
- "application/vnd.openstreetmap.data+xml": ["osm"],
2961
- "application/vnd.openxmlformats-officedocument.presentationml.presentation": [
2962
- "pptx"
2963
- ],
2964
- "application/vnd.openxmlformats-officedocument.presentationml.slide": [
2965
- "sldx"
2966
- ],
2967
- "application/vnd.openxmlformats-officedocument.presentationml.slideshow": [
2968
- "ppsx"
2969
- ],
2970
- "application/vnd.openxmlformats-officedocument.presentationml.template": [
2971
- "potx"
2972
- ],
2973
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ["xlsx"],
2974
- "application/vnd.openxmlformats-officedocument.spreadsheetml.template": [
2975
- "xltx"
2976
- ],
2977
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document": [
2978
- "docx"
2979
- ],
2980
- "application/vnd.openxmlformats-officedocument.wordprocessingml.template": [
2981
- "dotx"
2982
- ],
2983
- "application/vnd.osgeo.mapguide.package": ["mgp"],
2984
- "application/vnd.osgi.dp": ["dp"],
2985
- "application/vnd.osgi.subsystem": ["esa"],
2986
- "application/vnd.palm": ["pdb", "pqa", "oprc"],
2987
- "application/vnd.pawaafile": ["paw"],
2988
- "application/vnd.pg.format": ["str"],
2989
- "application/vnd.pg.osasli": ["ei6"],
2990
- "application/vnd.picsel": ["efif"],
2991
- "application/vnd.pmi.widget": ["wg"],
2992
- "application/vnd.pocketlearn": ["plf"],
2993
- "application/vnd.powerbuilder6": ["pbd"],
2994
- "application/vnd.previewsystems.box": ["box"],
2995
- "application/vnd.procrate.brushset": ["brushset"],
2996
- "application/vnd.procreate.brush": ["brush"],
2997
- "application/vnd.procreate.dream": ["drm"],
2998
- "application/vnd.proteus.magazine": ["mgz"],
2999
- "application/vnd.publishare-delta-tree": ["qps"],
3000
- "application/vnd.pvi.ptid1": ["ptid"],
3001
- "application/vnd.pwg-xhtml-print+xml": ["xhtm"],
3002
- "application/vnd.quark.quarkxpress": [
3003
- "qxd",
3004
- "qxt",
3005
- "qwd",
3006
- "qwt",
3007
- "qxl",
3008
- "qxb"
3009
- ],
3010
- "application/vnd.rar": ["rar"],
3011
- "application/vnd.realvnc.bed": ["bed"],
3012
- "application/vnd.recordare.musicxml": ["mxl"],
3013
- "application/vnd.recordare.musicxml+xml": ["musicxml"],
3014
- "application/vnd.rig.cryptonote": ["cryptonote"],
3015
- "application/vnd.rim.cod": ["cod"],
3016
- "application/vnd.rn-realmedia": ["rm"],
3017
- "application/vnd.rn-realmedia-vbr": ["rmvb"],
3018
- "application/vnd.route66.link66+xml": ["link66"],
3019
- "application/vnd.sailingtracker.track": ["st"],
3020
- "application/vnd.seemail": ["see"],
3021
- "application/vnd.sema": ["sema"],
3022
- "application/vnd.semd": ["semd"],
3023
- "application/vnd.semf": ["semf"],
3024
- "application/vnd.shana.informed.formdata": ["ifm"],
3025
- "application/vnd.shana.informed.formtemplate": ["itp"],
3026
- "application/vnd.shana.informed.interchange": ["iif"],
3027
- "application/vnd.shana.informed.package": ["ipk"],
3028
- "application/vnd.simtech-mindmapper": ["twd", "twds"],
3029
- "application/vnd.smaf": ["mmf"],
3030
- "application/vnd.smart.teacher": ["teacher"],
3031
- "application/vnd.software602.filler.form+xml": ["fo"],
3032
- "application/vnd.solent.sdkm+xml": ["sdkm", "sdkd"],
3033
- "application/vnd.spotfire.dxp": ["dxp"],
3034
- "application/vnd.spotfire.sfs": ["sfs"],
3035
- "application/vnd.stardivision.calc": ["sdc"],
3036
- "application/vnd.stardivision.draw": ["sda"],
3037
- "application/vnd.stardivision.impress": ["sdd"],
3038
- "application/vnd.stardivision.math": ["smf"],
3039
- "application/vnd.stardivision.writer": ["sdw", "vor"],
3040
- "application/vnd.stardivision.writer-global": ["sgl"],
3041
- "application/vnd.stepmania.package": ["smzip"],
3042
- "application/vnd.stepmania.stepchart": ["sm"],
3043
- "application/vnd.sun.wadl+xml": ["wadl"],
3044
- "application/vnd.sun.xml.calc": ["sxc"],
3045
- "application/vnd.sun.xml.calc.template": ["stc"],
3046
- "application/vnd.sun.xml.draw": ["sxd"],
3047
- "application/vnd.sun.xml.draw.template": ["std"],
3048
- "application/vnd.sun.xml.impress": ["sxi"],
3049
- "application/vnd.sun.xml.impress.template": ["sti"],
3050
- "application/vnd.sun.xml.math": ["sxm"],
3051
- "application/vnd.sun.xml.writer": ["sxw"],
3052
- "application/vnd.sun.xml.writer.global": ["sxg"],
3053
- "application/vnd.sun.xml.writer.template": ["stw"],
3054
- "application/vnd.sus-calendar": ["sus", "susp"],
3055
- "application/vnd.svd": ["svd"],
3056
- "application/vnd.symbian.install": ["sis", "sisx"],
3057
- "application/vnd.syncml+xml": ["xsm"],
3058
- "application/vnd.syncml.dm+wbxml": ["bdm"],
3059
- "application/vnd.syncml.dm+xml": ["xdm"],
3060
- "application/vnd.syncml.dmddf+xml": ["ddf"],
3061
- "application/vnd.tao.intent-module-archive": ["tao"],
3062
- "application/vnd.tcpdump.pcap": ["pcap", "cap", "dmp"],
3063
- "application/vnd.tmobile-livetv": ["tmo"],
3064
- "application/vnd.trid.tpt": ["tpt"],
3065
- "application/vnd.triscape.mxs": ["mxs"],
3066
- "application/vnd.trueapp": ["tra"],
3067
- "application/vnd.ufdl": ["ufd", "ufdl"],
3068
- "application/vnd.uiq.theme": ["utz"],
3069
- "application/vnd.umajin": ["umj"],
3070
- "application/vnd.unity": ["unityweb"],
3071
- "application/vnd.uoml+xml": ["uoml", "uo"],
3072
- "application/vnd.vcx": ["vcx"],
3073
- "application/vnd.visio": ["vsd", "vst", "vss", "vsw", "vsdx", "vtx"],
3074
- "application/vnd.visionary": ["vis"],
3075
- "application/vnd.vsf": ["vsf"],
3076
- "application/vnd.wap.wbxml": ["wbxml"],
3077
- "application/vnd.wap.wmlc": ["wmlc"],
3078
- "application/vnd.wap.wmlscriptc": ["wmlsc"],
3079
- "application/vnd.webturbo": ["wtb"],
3080
- "application/vnd.wolfram.player": ["nbp"],
3081
- "application/vnd.wordperfect": ["wpd"],
3082
- "application/vnd.wqd": ["wqd"],
3083
- "application/vnd.wt.stf": ["stf"],
3084
- "application/vnd.xara": ["xar"],
3085
- "application/vnd.xfdl": ["xfdl"],
3086
- "application/vnd.yamaha.hv-dic": ["hvd"],
3087
- "application/vnd.yamaha.hv-script": ["hvs"],
3088
- "application/vnd.yamaha.hv-voice": ["hvp"],
3089
- "application/vnd.yamaha.openscoreformat": ["osf"],
3090
- "application/vnd.yamaha.openscoreformat.osfpvg+xml": ["osfpvg"],
3091
- "application/vnd.yamaha.smaf-audio": ["saf"],
3092
- "application/vnd.yamaha.smaf-phrase": ["spf"],
3093
- "application/vnd.yellowriver-custom-menu": ["cmp"],
3094
- "application/vnd.zul": ["zir", "zirz"],
3095
- "application/vnd.zzazz.deck+xml": ["zaz"],
3096
- "application/x-7z-compressed": ["7z"],
3097
- "application/x-abiword": ["abw"],
3098
- "application/x-ace-compressed": ["ace"],
3099
- "application/x-apple-diskimage": ["*dmg"],
3100
- "application/x-arj": ["arj"],
3101
- "application/x-authorware-bin": ["aab", "x32", "u32", "vox"],
3102
- "application/x-authorware-map": ["aam"],
3103
- "application/x-authorware-seg": ["aas"],
3104
- "application/x-bcpio": ["bcpio"],
3105
- "application/x-bdoc": ["*bdoc"],
3106
- "application/x-bittorrent": ["torrent"],
3107
- "application/x-blender": ["blend"],
3108
- "application/x-blorb": ["blb", "blorb"],
3109
- "application/x-bzip": ["bz"],
3110
- "application/x-bzip2": ["bz2", "boz"],
3111
- "application/x-cbr": ["cbr", "cba", "cbt", "cbz", "cb7"],
3112
- "application/x-cdlink": ["vcd"],
3113
- "application/x-cfs-compressed": ["cfs"],
3114
- "application/x-chat": ["chat"],
3115
- "application/x-chess-pgn": ["pgn"],
3116
- "application/x-chrome-extension": ["crx"],
3117
- "application/x-cocoa": ["cco"],
3118
- "application/x-compressed": ["*rar"],
3119
- "application/x-conference": ["nsc"],
3120
- "application/x-cpio": ["cpio"],
3121
- "application/x-csh": ["csh"],
3122
- "application/x-debian-package": ["*deb", "udeb"],
3123
- "application/x-dgc-compressed": ["dgc"],
3124
- "application/x-director": [
3125
- "dir",
3126
- "dcr",
3127
- "dxr",
3128
- "cst",
3129
- "cct",
3130
- "cxt",
3131
- "w3d",
3132
- "fgd",
3133
- "swa"
3134
- ],
3135
- "application/x-doom": ["wad"],
3136
- "application/x-dtbncx+xml": ["ncx"],
3137
- "application/x-dtbook+xml": ["dtb"],
3138
- "application/x-dtbresource+xml": ["res"],
3139
- "application/x-dvi": ["dvi"],
3140
- "application/x-envoy": ["evy"],
3141
- "application/x-eva": ["eva"],
3142
- "application/x-font-bdf": ["bdf"],
3143
- "application/x-font-ghostscript": ["gsf"],
3144
- "application/x-font-linux-psf": ["psf"],
3145
- "application/x-font-pcf": ["pcf"],
3146
- "application/x-font-snf": ["snf"],
3147
- "application/x-font-type1": ["pfa", "pfb", "pfm", "afm"],
3148
- "application/x-freearc": ["arc"],
3149
- "application/x-futuresplash": ["spl"],
3150
- "application/x-gca-compressed": ["gca"],
3151
- "application/x-glulx": ["ulx"],
3152
- "application/x-gnumeric": ["gnumeric"],
3153
- "application/x-gramps-xml": ["gramps"],
3154
- "application/x-gtar": ["gtar"],
3155
- "application/x-hdf": ["hdf"],
3156
- "application/x-httpd-php": ["php"],
3157
- "application/x-install-instructions": ["install"],
3158
- "application/x-ipynb+json": ["ipynb"],
3159
- "application/x-iso9660-image": ["*iso"],
3160
- "application/x-iwork-keynote-sffkey": ["*key"],
3161
- "application/x-iwork-numbers-sffnumbers": ["*numbers"],
3162
- "application/x-iwork-pages-sffpages": ["*pages"],
3163
- "application/x-java-archive-diff": ["jardiff"],
3164
- "application/x-java-jnlp-file": ["jnlp"],
3165
- "application/x-keepass2": ["kdbx"],
3166
- "application/x-latex": ["latex"],
3167
- "application/x-lua-bytecode": ["luac"],
3168
- "application/x-lzh-compressed": ["lzh", "lha"],
3169
- "application/x-makeself": ["run"],
3170
- "application/x-mie": ["mie"],
3171
- "application/x-mobipocket-ebook": ["*prc", "mobi"],
3172
- "application/x-ms-application": ["application"],
3173
- "application/x-ms-shortcut": ["lnk"],
3174
- "application/x-ms-wmd": ["wmd"],
3175
- "application/x-ms-wmz": ["wmz"],
3176
- "application/x-ms-xbap": ["xbap"],
3177
- "application/x-msaccess": ["mdb"],
3178
- "application/x-msbinder": ["obd"],
3179
- "application/x-mscardfile": ["crd"],
3180
- "application/x-msclip": ["clp"],
3181
- "application/x-msdos-program": ["*exe"],
3182
- "application/x-msdownload": ["*exe", "*dll", "com", "bat", "*msi"],
3183
- "application/x-msmediaview": ["mvb", "m13", "m14"],
3184
- "application/x-msmetafile": ["*wmf", "*wmz", "*emf", "emz"],
3185
- "application/x-msmoney": ["mny"],
3186
- "application/x-mspublisher": ["pub"],
3187
- "application/x-msschedule": ["scd"],
3188
- "application/x-msterminal": ["trm"],
3189
- "application/x-mswrite": ["wri"],
3190
- "application/x-netcdf": ["nc", "cdf"],
3191
- "application/x-ns-proxy-autoconfig": ["pac"],
3192
- "application/x-nzb": ["nzb"],
3193
- "application/x-perl": ["pl", "pm"],
3194
- "application/x-pilot": ["*prc", "*pdb"],
3195
- "application/x-pkcs12": ["p12", "pfx"],
3196
- "application/x-pkcs7-certificates": ["p7b", "spc"],
3197
- "application/x-pkcs7-certreqresp": ["p7r"],
3198
- "application/x-rar-compressed": ["*rar"],
3199
- "application/x-redhat-package-manager": ["rpm"],
3200
- "application/x-research-info-systems": ["ris"],
3201
- "application/x-sea": ["sea"],
3202
- "application/x-sh": ["sh"],
3203
- "application/x-shar": ["shar"],
3204
- "application/x-shockwave-flash": ["swf"],
3205
- "application/x-silverlight-app": ["xap"],
3206
- "application/x-sql": ["*sql"],
3207
- "application/x-stuffit": ["sit"],
3208
- "application/x-stuffitx": ["sitx"],
3209
- "application/x-subrip": ["srt"],
3210
- "application/x-sv4cpio": ["sv4cpio"],
3211
- "application/x-sv4crc": ["sv4crc"],
3212
- "application/x-t3vm-image": ["t3"],
3213
- "application/x-tads": ["gam"],
3214
- "application/x-tar": ["tar"],
3215
- "application/x-tcl": ["tcl", "tk"],
3216
- "application/x-tex": ["tex"],
3217
- "application/x-tex-tfm": ["tfm"],
3218
- "application/x-texinfo": ["texinfo", "texi"],
3219
- "application/x-tgif": ["*obj"],
3220
- "application/x-ustar": ["ustar"],
3221
- "application/x-virtualbox-hdd": ["hdd"],
3222
- "application/x-virtualbox-ova": ["ova"],
3223
- "application/x-virtualbox-ovf": ["ovf"],
3224
- "application/x-virtualbox-vbox": ["vbox"],
3225
- "application/x-virtualbox-vbox-extpack": ["vbox-extpack"],
3226
- "application/x-virtualbox-vdi": ["vdi"],
3227
- "application/x-virtualbox-vhd": ["vhd"],
3228
- "application/x-virtualbox-vmdk": ["vmdk"],
3229
- "application/x-wais-source": ["src"],
3230
- "application/x-web-app-manifest+json": ["webapp"],
3231
- "application/x-x509-ca-cert": ["der", "crt", "pem"],
3232
- "application/x-xfig": ["fig"],
3233
- "application/x-xliff+xml": ["*xlf"],
3234
- "application/x-xpinstall": ["xpi"],
3235
- "application/x-xz": ["xz"],
3236
- "application/x-zip-compressed": ["*zip"],
3237
- "application/x-zmachine": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"],
3238
- "audio/vnd.dece.audio": ["uva", "uvva"],
3239
- "audio/vnd.digital-winds": ["eol"],
3240
- "audio/vnd.dra": ["dra"],
3241
- "audio/vnd.dts": ["dts"],
3242
- "audio/vnd.dts.hd": ["dtshd"],
3243
- "audio/vnd.lucent.voice": ["lvp"],
3244
- "audio/vnd.ms-playready.media.pya": ["pya"],
3245
- "audio/vnd.nuera.ecelp4800": ["ecelp4800"],
3246
- "audio/vnd.nuera.ecelp7470": ["ecelp7470"],
3247
- "audio/vnd.nuera.ecelp9600": ["ecelp9600"],
3248
- "audio/vnd.rip": ["rip"],
3249
- "audio/x-aac": ["*aac"],
3250
- "audio/x-aiff": ["aif", "aiff", "aifc"],
3251
- "audio/x-caf": ["caf"],
3252
- "audio/x-flac": ["flac"],
3253
- "audio/x-m4a": ["*m4a"],
3254
- "audio/x-matroska": ["mka"],
3255
- "audio/x-mpegurl": ["m3u"],
3256
- "audio/x-ms-wax": ["wax"],
3257
- "audio/x-ms-wma": ["wma"],
3258
- "audio/x-pn-realaudio": ["ram", "ra"],
3259
- "audio/x-pn-realaudio-plugin": ["rmp"],
3260
- "audio/x-realaudio": ["*ra"],
3261
- "audio/x-wav": ["*wav"],
3262
- "chemical/x-cdx": ["cdx"],
3263
- "chemical/x-cif": ["cif"],
3264
- "chemical/x-cmdf": ["cmdf"],
3265
- "chemical/x-cml": ["cml"],
3266
- "chemical/x-csml": ["csml"],
3267
- "chemical/x-xyz": ["xyz"],
3268
- "image/prs.btif": ["btif", "btf"],
3269
- "image/prs.pti": ["pti"],
3270
- "image/vnd.adobe.photoshop": ["psd"],
3271
- "image/vnd.airzip.accelerator.azv": ["azv"],
3272
- "image/vnd.blockfact.facti": ["facti"],
3273
- "image/vnd.dece.graphic": ["uvi", "uvvi", "uvg", "uvvg"],
3274
- "image/vnd.djvu": ["djvu", "djv"],
3275
- "image/vnd.dvb.subtitle": ["*sub"],
3276
- "image/vnd.dwg": ["dwg"],
3277
- "image/vnd.dxf": ["dxf"],
3278
- "image/vnd.fastbidsheet": ["fbs"],
3279
- "image/vnd.fpx": ["fpx"],
3280
- "image/vnd.fst": ["fst"],
3281
- "image/vnd.fujixerox.edmics-mmr": ["mmr"],
3282
- "image/vnd.fujixerox.edmics-rlc": ["rlc"],
3283
- "image/vnd.microsoft.icon": ["ico"],
3284
- "image/vnd.ms-dds": ["dds"],
3285
- "image/vnd.ms-modi": ["mdi"],
3286
- "image/vnd.ms-photo": ["wdp"],
3287
- "image/vnd.net-fpx": ["npx"],
3288
- "image/vnd.pco.b16": ["b16"],
3289
- "image/vnd.tencent.tap": ["tap"],
3290
- "image/vnd.valve.source.texture": ["vtf"],
3291
- "image/vnd.wap.wbmp": ["wbmp"],
3292
- "image/vnd.xiff": ["xif"],
3293
- "image/vnd.zbrush.pcx": ["pcx"],
3294
- "image/x-3ds": ["3ds"],
3295
- "image/x-adobe-dng": ["dng"],
3296
- "image/x-cmu-raster": ["ras"],
3297
- "image/x-cmx": ["cmx"],
3298
- "image/x-freehand": ["fh", "fhc", "fh4", "fh5", "fh7"],
3299
- "image/x-icon": ["*ico"],
3300
- "image/x-jng": ["jng"],
3301
- "image/x-mrsid-image": ["sid"],
3302
- "image/x-ms-bmp": ["*bmp"],
3303
- "image/x-pcx": ["*pcx"],
3304
- "image/x-pict": ["pic", "pct"],
3305
- "image/x-portable-anymap": ["pnm"],
3306
- "image/x-portable-bitmap": ["pbm"],
3307
- "image/x-portable-graymap": ["pgm"],
3308
- "image/x-portable-pixmap": ["ppm"],
3309
- "image/x-rgb": ["rgb"],
3310
- "image/x-tga": ["tga"],
3311
- "image/x-xbitmap": ["xbm"],
3312
- "image/x-xpixmap": ["xpm"],
3313
- "image/x-xwindowdump": ["xwd"],
3314
- "message/vnd.wfa.wsc": ["wsc"],
3315
- "model/vnd.bary": ["bary"],
3316
- "model/vnd.cld": ["cld"],
3317
- "model/vnd.collada+xml": ["dae"],
3318
- "model/vnd.dwf": ["dwf"],
3319
- "model/vnd.gdl": ["gdl"],
3320
- "model/vnd.gtw": ["gtw"],
3321
- "model/vnd.mts": ["*mts"],
3322
- "model/vnd.opengex": ["ogex"],
3323
- "model/vnd.parasolid.transmit.binary": ["x_b"],
3324
- "model/vnd.parasolid.transmit.text": ["x_t"],
3325
- "model/vnd.pytha.pyox": ["pyo", "pyox"],
3326
- "model/vnd.sap.vds": ["vds"],
3327
- "model/vnd.usda": ["usda"],
3328
- "model/vnd.usdz+zip": ["usdz"],
3329
- "model/vnd.valve.source.compiled-map": ["bsp"],
3330
- "model/vnd.vtu": ["vtu"],
3331
- "text/prs.lines.tag": ["dsc"],
3332
- "text/vnd.curl": ["curl"],
3333
- "text/vnd.curl.dcurl": ["dcurl"],
3334
- "text/vnd.curl.mcurl": ["mcurl"],
3335
- "text/vnd.curl.scurl": ["scurl"],
3336
- "text/vnd.dvb.subtitle": ["sub"],
3337
- "text/vnd.familysearch.gedcom": ["ged"],
3338
- "text/vnd.fly": ["fly"],
3339
- "text/vnd.fmi.flexstor": ["flx"],
3340
- "text/vnd.graphviz": ["gv"],
3341
- "text/vnd.in3d.3dml": ["3dml"],
3342
- "text/vnd.in3d.spot": ["spot"],
3343
- "text/vnd.sun.j2me.app-descriptor": ["jad"],
3344
- "text/vnd.wap.wml": ["wml"],
3345
- "text/vnd.wap.wmlscript": ["wmls"],
3346
- "text/x-asm": ["s", "asm"],
3347
- "text/x-c": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"],
3348
- "text/x-component": ["htc"],
3349
- "text/x-fortran": ["f", "for", "f77", "f90"],
3350
- "text/x-handlebars-template": ["hbs"],
3351
- "text/x-java-source": ["java"],
3352
- "text/x-lua": ["lua"],
3353
- "text/x-markdown": ["mkd"],
3354
- "text/x-nfo": ["nfo"],
3355
- "text/x-opml": ["opml"],
3356
- "text/x-org": ["*org"],
3357
- "text/x-pascal": ["p", "pas"],
3358
- "text/x-processing": ["pde"],
3359
- "text/x-sass": ["sass"],
3360
- "text/x-scss": ["scss"],
3361
- "text/x-setext": ["etx"],
3362
- "text/x-sfv": ["sfv"],
3363
- "text/x-suse-ymp": ["ymp"],
3364
- "text/x-uuencode": ["uu"],
3365
- "text/x-vcalendar": ["vcs"],
3366
- "text/x-vcard": ["vcf"],
3367
- "video/vnd.dece.hd": ["uvh", "uvvh"],
3368
- "video/vnd.dece.mobile": ["uvm", "uvvm"],
3369
- "video/vnd.dece.pd": ["uvp", "uvvp"],
3370
- "video/vnd.dece.sd": ["uvs", "uvvs"],
3371
- "video/vnd.dece.video": ["uvv", "uvvv"],
3372
- "video/vnd.dvb.file": ["dvb"],
3373
- "video/vnd.fvt": ["fvt"],
3374
- "video/vnd.mpegurl": ["mxu", "m4u"],
3375
- "video/vnd.ms-playready.media.pyv": ["pyv"],
3376
- "video/vnd.uvvu.mp4": ["uvu", "uvvu"],
3377
- "video/vnd.vivo": ["viv"],
3378
- "video/x-f4v": ["f4v"],
3379
- "video/x-fli": ["fli"],
3380
- "video/x-flv": ["flv"],
3381
- "video/x-m4v": ["m4v"],
3382
- "video/x-matroska": ["mkv", "mk3d", "mks"],
3383
- "video/x-mng": ["mng"],
3384
- "video/x-ms-asf": ["asf", "asx"],
3385
- "video/x-ms-vob": ["vob"],
3386
- "video/x-ms-wm": ["wm"],
3387
- "video/x-ms-wmv": ["wmv"],
3388
- "video/x-ms-wmx": ["wmx"],
3389
- "video/x-ms-wvx": ["wvx"],
3390
- "video/x-msvideo": ["avi"],
3391
- "video/x-sgi-movie": ["movie"],
3392
- "video/x-smv": ["smv"],
3393
- "x-conference/x-cooltalk": ["ice"]
3394
- };
3395
- Object.freeze(types);
3396
- var other_default = types;
3397
-
3398
- // node_modules/mime/dist/types/standard.js
3399
- var types2 = {
3400
- "application/andrew-inset": ["ez"],
3401
- "application/appinstaller": ["appinstaller"],
3402
- "application/applixware": ["aw"],
3403
- "application/appx": ["appx"],
3404
- "application/appxbundle": ["appxbundle"],
3405
- "application/atom+xml": ["atom"],
3406
- "application/atomcat+xml": ["atomcat"],
3407
- "application/atomdeleted+xml": ["atomdeleted"],
3408
- "application/atomsvc+xml": ["atomsvc"],
3409
- "application/atsc-dwd+xml": ["dwd"],
3410
- "application/atsc-held+xml": ["held"],
3411
- "application/atsc-rsat+xml": ["rsat"],
3412
- "application/automationml-aml+xml": ["aml"],
3413
- "application/automationml-amlx+zip": ["amlx"],
3414
- "application/bdoc": ["bdoc"],
3415
- "application/calendar+xml": ["xcs"],
3416
- "application/ccxml+xml": ["ccxml"],
3417
- "application/cdfx+xml": ["cdfx"],
3418
- "application/cdmi-capability": ["cdmia"],
3419
- "application/cdmi-container": ["cdmic"],
3420
- "application/cdmi-domain": ["cdmid"],
3421
- "application/cdmi-object": ["cdmio"],
3422
- "application/cdmi-queue": ["cdmiq"],
3423
- "application/cpl+xml": ["cpl"],
3424
- "application/cu-seeme": ["cu"],
3425
- "application/cwl": ["cwl"],
3426
- "application/dash+xml": ["mpd"],
3427
- "application/dash-patch+xml": ["mpp"],
3428
- "application/davmount+xml": ["davmount"],
3429
- "application/dicom": ["dcm"],
3430
- "application/docbook+xml": ["dbk"],
3431
- "application/dssc+der": ["dssc"],
3432
- "application/dssc+xml": ["xdssc"],
3433
- "application/ecmascript": ["ecma"],
3434
- "application/emma+xml": ["emma"],
3435
- "application/emotionml+xml": ["emotionml"],
3436
- "application/epub+zip": ["epub"],
3437
- "application/exi": ["exi"],
3438
- "application/express": ["exp"],
3439
- "application/fdf": ["fdf"],
3440
- "application/fdt+xml": ["fdt"],
3441
- "application/font-tdpfr": ["pfr"],
3442
- "application/geo+json": ["geojson"],
3443
- "application/gml+xml": ["gml"],
3444
- "application/gpx+xml": ["gpx"],
3445
- "application/gxf": ["gxf"],
3446
- "application/gzip": ["gz"],
3447
- "application/hjson": ["hjson"],
3448
- "application/hyperstudio": ["stk"],
3449
- "application/inkml+xml": ["ink", "inkml"],
3450
- "application/ipfix": ["ipfix"],
3451
- "application/its+xml": ["its"],
3452
- "application/java-archive": ["jar", "war", "ear"],
3453
- "application/java-serialized-object": ["ser"],
3454
- "application/java-vm": ["class"],
3455
- "application/javascript": ["*js"],
3456
- "application/json": ["json", "map"],
3457
- "application/json5": ["json5"],
3458
- "application/jsonml+json": ["jsonml"],
3459
- "application/ld+json": ["jsonld"],
3460
- "application/lgr+xml": ["lgr"],
3461
- "application/lost+xml": ["lostxml"],
3462
- "application/mac-binhex40": ["hqx"],
3463
- "application/mac-compactpro": ["cpt"],
3464
- "application/mads+xml": ["mads"],
3465
- "application/manifest+json": ["webmanifest"],
3466
- "application/marc": ["mrc"],
3467
- "application/marcxml+xml": ["mrcx"],
3468
- "application/mathematica": ["ma", "nb", "mb"],
3469
- "application/mathml+xml": ["mathml"],
3470
- "application/mbox": ["mbox"],
3471
- "application/media-policy-dataset+xml": ["mpf"],
3472
- "application/mediaservercontrol+xml": ["mscml"],
3473
- "application/metalink+xml": ["metalink"],
3474
- "application/metalink4+xml": ["meta4"],
3475
- "application/mets+xml": ["mets"],
3476
- "application/mmt-aei+xml": ["maei"],
3477
- "application/mmt-usd+xml": ["musd"],
3478
- "application/mods+xml": ["mods"],
3479
- "application/mp21": ["m21", "mp21"],
3480
- "application/mp4": ["*mp4", "*mpg4", "mp4s", "m4p"],
3481
- "application/msix": ["msix"],
3482
- "application/msixbundle": ["msixbundle"],
3483
- "application/msword": ["doc", "dot"],
3484
- "application/mxf": ["mxf"],
3485
- "application/n-quads": ["nq"],
3486
- "application/n-triples": ["nt"],
3487
- "application/node": ["cjs"],
3488
- "application/octet-stream": [
3489
- "bin",
3490
- "dms",
3491
- "lrf",
3492
- "mar",
3493
- "so",
3494
- "dist",
3495
- "distz",
3496
- "pkg",
3497
- "bpk",
3498
- "dump",
3499
- "elc",
3500
- "deploy",
3501
- "exe",
3502
- "dll",
3503
- "deb",
3504
- "dmg",
3505
- "iso",
3506
- "img",
3507
- "msi",
3508
- "msp",
3509
- "msm",
3510
- "buffer"
3511
- ],
3512
- "application/oda": ["oda"],
3513
- "application/oebps-package+xml": ["opf"],
3514
- "application/ogg": ["ogx"],
3515
- "application/omdoc+xml": ["omdoc"],
3516
- "application/onenote": [
3517
- "onetoc",
3518
- "onetoc2",
3519
- "onetmp",
3520
- "onepkg",
3521
- "one",
3522
- "onea"
3523
- ],
3524
- "application/oxps": ["oxps"],
3525
- "application/p2p-overlay+xml": ["relo"],
3526
- "application/patch-ops-error+xml": ["xer"],
3527
- "application/pdf": ["pdf"],
3528
- "application/pgp-encrypted": ["pgp"],
3529
- "application/pgp-keys": ["asc"],
3530
- "application/pgp-signature": ["sig", "*asc"],
3531
- "application/pics-rules": ["prf"],
3532
- "application/pkcs10": ["p10"],
3533
- "application/pkcs7-mime": ["p7m", "p7c"],
3534
- "application/pkcs7-signature": ["p7s"],
3535
- "application/pkcs8": ["p8"],
3536
- "application/pkix-attr-cert": ["ac"],
3537
- "application/pkix-cert": ["cer"],
3538
- "application/pkix-crl": ["crl"],
3539
- "application/pkix-pkipath": ["pkipath"],
3540
- "application/pkixcmp": ["pki"],
3541
- "application/pls+xml": ["pls"],
3542
- "application/postscript": ["ai", "eps", "ps"],
3543
- "application/provenance+xml": ["provx"],
3544
- "application/pskc+xml": ["pskcxml"],
3545
- "application/raml+yaml": ["raml"],
3546
- "application/rdf+xml": ["rdf", "owl"],
3547
- "application/reginfo+xml": ["rif"],
3548
- "application/relax-ng-compact-syntax": ["rnc"],
3549
- "application/resource-lists+xml": ["rl"],
3550
- "application/resource-lists-diff+xml": ["rld"],
3551
- "application/rls-services+xml": ["rs"],
3552
- "application/route-apd+xml": ["rapd"],
3553
- "application/route-s-tsid+xml": ["sls"],
3554
- "application/route-usd+xml": ["rusd"],
3555
- "application/rpki-ghostbusters": ["gbr"],
3556
- "application/rpki-manifest": ["mft"],
3557
- "application/rpki-roa": ["roa"],
3558
- "application/rsd+xml": ["rsd"],
3559
- "application/rss+xml": ["rss"],
3560
- "application/rtf": ["rtf"],
3561
- "application/sbml+xml": ["sbml"],
3562
- "application/scvp-cv-request": ["scq"],
3563
- "application/scvp-cv-response": ["scs"],
3564
- "application/scvp-vp-request": ["spq"],
3565
- "application/scvp-vp-response": ["spp"],
3566
- "application/sdp": ["sdp"],
3567
- "application/senml+xml": ["senmlx"],
3568
- "application/sensml+xml": ["sensmlx"],
3569
- "application/set-payment-initiation": ["setpay"],
3570
- "application/set-registration-initiation": ["setreg"],
3571
- "application/shf+xml": ["shf"],
3572
- "application/sieve": ["siv", "sieve"],
3573
- "application/smil+xml": ["smi", "smil"],
3574
- "application/sparql-query": ["rq"],
3575
- "application/sparql-results+xml": ["srx"],
3576
- "application/sql": ["sql"],
3577
- "application/srgs": ["gram"],
3578
- "application/srgs+xml": ["grxml"],
3579
- "application/sru+xml": ["sru"],
3580
- "application/ssdl+xml": ["ssdl"],
3581
- "application/ssml+xml": ["ssml"],
3582
- "application/swid+xml": ["swidtag"],
3583
- "application/tei+xml": ["tei", "teicorpus"],
3584
- "application/thraud+xml": ["tfi"],
3585
- "application/timestamped-data": ["tsd"],
3586
- "application/toml": ["toml"],
3587
- "application/trig": ["trig"],
3588
- "application/ttml+xml": ["ttml"],
3589
- "application/ubjson": ["ubj"],
3590
- "application/urc-ressheet+xml": ["rsheet"],
3591
- "application/urc-targetdesc+xml": ["td"],
3592
- "application/voicexml+xml": ["vxml"],
3593
- "application/wasm": ["wasm"],
3594
- "application/watcherinfo+xml": ["wif"],
3595
- "application/widget": ["wgt"],
3596
- "application/winhlp": ["hlp"],
3597
- "application/wsdl+xml": ["wsdl"],
3598
- "application/wspolicy+xml": ["wspolicy"],
3599
- "application/xaml+xml": ["xaml"],
3600
- "application/xcap-att+xml": ["xav"],
3601
- "application/xcap-caps+xml": ["xca"],
3602
- "application/xcap-diff+xml": ["xdf"],
3603
- "application/xcap-el+xml": ["xel"],
3604
- "application/xcap-ns+xml": ["xns"],
3605
- "application/xenc+xml": ["xenc"],
3606
- "application/xfdf": ["xfdf"],
3607
- "application/xhtml+xml": ["xhtml", "xht"],
3608
- "application/xliff+xml": ["xlf"],
3609
- "application/xml": ["xml", "xsl", "xsd", "rng"],
3610
- "application/xml-dtd": ["dtd"],
3611
- "application/xop+xml": ["xop"],
3612
- "application/xproc+xml": ["xpl"],
3613
- "application/xslt+xml": ["*xsl", "xslt"],
3614
- "application/xspf+xml": ["xspf"],
3615
- "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"],
3616
- "application/yang": ["yang"],
3617
- "application/yin+xml": ["yin"],
3618
- "application/zip": ["zip"],
3619
- "application/zip+dotlottie": ["lottie"],
3620
- "audio/3gpp": ["*3gpp"],
3621
- "audio/aac": ["adts", "aac"],
3622
- "audio/adpcm": ["adp"],
3623
- "audio/amr": ["amr"],
3624
- "audio/basic": ["au", "snd"],
3625
- "audio/midi": ["mid", "midi", "kar", "rmi"],
3626
- "audio/mobile-xmf": ["mxmf"],
3627
- "audio/mp3": ["*mp3"],
3628
- "audio/mp4": ["m4a", "mp4a", "m4b"],
3629
- "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"],
3630
- "audio/ogg": ["oga", "ogg", "spx", "opus"],
3631
- "audio/s3m": ["s3m"],
3632
- "audio/silk": ["sil"],
3633
- "audio/wav": ["wav"],
3634
- "audio/wave": ["*wav"],
3635
- "audio/webm": ["weba"],
3636
- "audio/xm": ["xm"],
3637
- "font/collection": ["ttc"],
3638
- "font/otf": ["otf"],
3639
- "font/ttf": ["ttf"],
3640
- "font/woff": ["woff"],
3641
- "font/woff2": ["woff2"],
3642
- "image/aces": ["exr"],
3643
- "image/apng": ["apng"],
3644
- "image/avci": ["avci"],
3645
- "image/avcs": ["avcs"],
3646
- "image/avif": ["avif"],
3647
- "image/bmp": ["bmp", "dib"],
3648
- "image/cgm": ["cgm"],
3649
- "image/dicom-rle": ["drle"],
3650
- "image/dpx": ["dpx"],
3651
- "image/emf": ["emf"],
3652
- "image/fits": ["fits"],
3653
- "image/g3fax": ["g3"],
3654
- "image/gif": ["gif"],
3655
- "image/heic": ["heic"],
3656
- "image/heic-sequence": ["heics"],
3657
- "image/heif": ["heif"],
3658
- "image/heif-sequence": ["heifs"],
3659
- "image/hej2k": ["hej2"],
3660
- "image/ief": ["ief"],
3661
- "image/jaii": ["jaii"],
3662
- "image/jais": ["jais"],
3663
- "image/jls": ["jls"],
3664
- "image/jp2": ["jp2", "jpg2"],
3665
- "image/jpeg": ["jpg", "jpeg", "jpe"],
3666
- "image/jph": ["jph"],
3667
- "image/jphc": ["jhc"],
3668
- "image/jpm": ["jpm", "jpgm"],
3669
- "image/jpx": ["jpx", "jpf"],
3670
- "image/jxl": ["jxl"],
3671
- "image/jxr": ["jxr"],
3672
- "image/jxra": ["jxra"],
3673
- "image/jxrs": ["jxrs"],
3674
- "image/jxs": ["jxs"],
3675
- "image/jxsc": ["jxsc"],
3676
- "image/jxsi": ["jxsi"],
3677
- "image/jxss": ["jxss"],
3678
- "image/ktx": ["ktx"],
3679
- "image/ktx2": ["ktx2"],
3680
- "image/pjpeg": ["jfif"],
3681
- "image/png": ["png"],
3682
- "image/sgi": ["sgi"],
3683
- "image/svg+xml": ["svg", "svgz"],
3684
- "image/t38": ["t38"],
3685
- "image/tiff": ["tif", "tiff"],
3686
- "image/tiff-fx": ["tfx"],
3687
- "image/webp": ["webp"],
3688
- "image/wmf": ["wmf"],
3689
- "message/disposition-notification": ["disposition-notification"],
3690
- "message/global": ["u8msg"],
3691
- "message/global-delivery-status": ["u8dsn"],
3692
- "message/global-disposition-notification": ["u8mdn"],
3693
- "message/global-headers": ["u8hdr"],
3694
- "message/rfc822": ["eml", "mime", "mht", "mhtml"],
3695
- "model/3mf": ["3mf"],
3696
- "model/gltf+json": ["gltf"],
3697
- "model/gltf-binary": ["glb"],
3698
- "model/iges": ["igs", "iges"],
3699
- "model/jt": ["jt"],
3700
- "model/mesh": ["msh", "mesh", "silo"],
3701
- "model/mtl": ["mtl"],
3702
- "model/obj": ["obj"],
3703
- "model/prc": ["prc"],
3704
- "model/step": ["step", "stp", "stpnc", "p21", "210"],
3705
- "model/step+xml": ["stpx"],
3706
- "model/step+zip": ["stpz"],
3707
- "model/step-xml+zip": ["stpxz"],
3708
- "model/stl": ["stl"],
3709
- "model/u3d": ["u3d"],
3710
- "model/vrml": ["wrl", "vrml"],
3711
- "model/x3d+binary": ["*x3db", "x3dbz"],
3712
- "model/x3d+fastinfoset": ["x3db"],
3713
- "model/x3d+vrml": ["*x3dv", "x3dvz"],
3714
- "model/x3d+xml": ["x3d", "x3dz"],
3715
- "model/x3d-vrml": ["x3dv"],
3716
- "text/cache-manifest": ["appcache", "manifest"],
3717
- "text/calendar": ["ics", "ifb"],
3718
- "text/coffeescript": ["coffee", "litcoffee"],
3719
- "text/css": ["css"],
3720
- "text/csv": ["csv"],
3721
- "text/html": ["html", "htm", "shtml"],
3722
- "text/jade": ["jade"],
3723
- "text/javascript": ["js", "mjs"],
3724
- "text/jsx": ["jsx"],
3725
- "text/less": ["less"],
3726
- "text/markdown": ["md", "markdown"],
3727
- "text/mathml": ["mml"],
3728
- "text/mdx": ["mdx"],
3729
- "text/n3": ["n3"],
3730
- "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"],
3731
- "text/richtext": ["rtx"],
3732
- "text/rtf": ["*rtf"],
3733
- "text/sgml": ["sgml", "sgm"],
3734
- "text/shex": ["shex"],
3735
- "text/slim": ["slim", "slm"],
3736
- "text/spdx": ["spdx"],
3737
- "text/stylus": ["stylus", "styl"],
3738
- "text/tab-separated-values": ["tsv"],
3739
- "text/troff": ["t", "tr", "roff", "man", "me", "ms"],
3740
- "text/turtle": ["ttl"],
3741
- "text/uri-list": ["uri", "uris", "urls"],
3742
- "text/vcard": ["vcard"],
3743
- "text/vtt": ["vtt"],
3744
- "text/wgsl": ["wgsl"],
3745
- "text/xml": ["*xml"],
3746
- "text/yaml": ["yaml", "yml"],
3747
- "video/3gpp": ["3gp", "3gpp"],
3748
- "video/3gpp2": ["3g2"],
3749
- "video/h261": ["h261"],
3750
- "video/h263": ["h263"],
3751
- "video/h264": ["h264"],
3752
- "video/iso.segment": ["m4s"],
3753
- "video/jpeg": ["jpgv"],
3754
- "video/jpm": ["*jpm", "*jpgm"],
3755
- "video/mj2": ["mj2", "mjp2"],
3756
- "video/mp2t": ["ts", "m2t", "m2ts", "mts"],
3757
- "video/mp4": ["mp4", "mp4v", "mpg4"],
3758
- "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"],
3759
- "video/ogg": ["ogv"],
3760
- "video/quicktime": ["qt", "mov"],
3761
- "video/webm": ["webm"]
3762
- };
3763
- Object.freeze(types2);
3764
- var standard_default = types2;
3765
-
3766
- // node_modules/mime/dist/src/Mime.js
3767
- var __classPrivateFieldGet = function(receiver, state, kind, f) {
3768
- if (kind === "a" && !f)
3769
- throw new TypeError("Private accessor was defined without a getter");
3770
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
3771
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
3772
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
3773
- };
3774
- var _Mime_extensionToType;
3775
- var _Mime_typeToExtension;
3776
- var _Mime_typeToExtensions;
3777
-
3778
- class Mime {
3779
- constructor(...args) {
3780
- _Mime_extensionToType.set(this, new Map);
3781
- _Mime_typeToExtension.set(this, new Map);
3782
- _Mime_typeToExtensions.set(this, new Map);
3783
- for (const arg of args) {
3784
- this.define(arg);
3785
- }
2858
+ // src/config-file.ts
2859
+ var DEFAULT_CONFIG_FILE = "webapp.config.json";
2860
+ var READ_ONLY_FIELDS = new Set(["appType"]);
2861
+ function stripReadOnlyFields(details) {
2862
+ const out = {};
2863
+ for (const [key, value] of Object.entries(details)) {
2864
+ if (!READ_ONLY_FIELDS.has(key))
2865
+ out[key] = value;
3786
2866
  }
3787
- define(typeMap, force = false) {
3788
- for (let [type, extensions] of Object.entries(typeMap)) {
3789
- type = type.toLowerCase();
3790
- extensions = extensions.map((ext) => ext.toLowerCase());
3791
- if (!__classPrivateFieldGet(this, _Mime_typeToExtensions, "f").has(type)) {
3792
- __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").set(type, new Set);
3793
- }
3794
- const allExtensions = __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type);
3795
- let first = true;
3796
- for (let extension of extensions) {
3797
- const starred = extension.startsWith("*");
3798
- extension = starred ? extension.slice(1) : extension;
3799
- allExtensions?.add(extension);
3800
- if (first) {
3801
- __classPrivateFieldGet(this, _Mime_typeToExtension, "f").set(type, extension);
3802
- }
3803
- first = false;
3804
- if (starred)
3805
- continue;
3806
- const currentType = __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(extension);
3807
- if (currentType && currentType != type && !force) {
3808
- throw new Error(`"${type} -> ${extension}" conflicts with "${currentType} -> ${extension}". Pass \`force=true\` to override this definition.`);
3809
- }
3810
- __classPrivateFieldGet(this, _Mime_extensionToType, "f").set(extension, type);
3811
- }
2867
+ return out;
2868
+ }
2869
+ function isClearSignalEmpty(value) {
2870
+ if (value === null)
2871
+ return true;
2872
+ if (Array.isArray(value) && value.length === 0)
2873
+ return true;
2874
+ if (isPlainObject(value) && Object.keys(value).length === 0)
2875
+ return true;
2876
+ return false;
2877
+ }
2878
+ function sanitizeDetails(details) {
2879
+ const out = {};
2880
+ for (const [key, value] of Object.entries(details)) {
2881
+ if (isClearSignalEmpty(value))
2882
+ continue;
2883
+ out[key] = value;
2884
+ }
2885
+ return out;
2886
+ }
2887
+ function unwrapDetails(payload) {
2888
+ if (isPlainObject(payload) && isPlainObject(payload.details)) {
2889
+ return payload.details;
2890
+ }
2891
+ if (isPlainObject(payload) && "details" in payload)
2892
+ return {};
2893
+ if (isPlainObject(payload))
2894
+ return payload;
2895
+ return {};
2896
+ }
2897
+ function projectDetailsPatch(current, patch) {
2898
+ const next = { ...current };
2899
+ for (const [key, value] of Object.entries(patch)) {
2900
+ if (isClearSignalEmpty(value)) {
2901
+ delete next[key];
2902
+ } else {
2903
+ next[key] = value;
3812
2904
  }
3813
- return this;
3814
2905
  }
3815
- getType(path3) {
3816
- if (typeof path3 !== "string")
3817
- return null;
3818
- const last = path3.replace(/^.*[/\\]/s, "").toLowerCase();
3819
- const ext = last.replace(/^.*\./s, "").toLowerCase();
3820
- const hasPath = last.length < path3.length;
3821
- const hasDot = ext.length < last.length - 1;
3822
- if (!hasDot && hasPath)
3823
- return null;
3824
- return __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(ext) ?? null;
2906
+ return next;
2907
+ }
2908
+ function computeDetailsDelta(current, fileDetails) {
2909
+ return diffJson(current, projectDetailsPatch(current, fileDetails));
2910
+ }
2911
+ function readConfigFile(filePath) {
2912
+ if (!existsSync4(filePath)) {
2913
+ throw new Error(`Config file not found: ${filePath}. Run \`ro app config pull\` first.`);
3825
2914
  }
3826
- getExtension(type) {
3827
- if (typeof type !== "string")
3828
- return null;
3829
- type = type?.split?.(";")[0];
3830
- return (type && __classPrivateFieldGet(this, _Mime_typeToExtension, "f").get(type.trim().toLowerCase())) ?? null;
2915
+ let raw;
2916
+ try {
2917
+ raw = readFileSync4(filePath, "utf-8");
2918
+ } catch (error) {
2919
+ const message = error instanceof Error ? error.message : String(error);
2920
+ throw new Error(`Could not read ${filePath}: ${message}`);
3831
2921
  }
3832
- getAllExtensions(type) {
3833
- if (typeof type !== "string")
3834
- return null;
3835
- return __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type.toLowerCase()) ?? null;
2922
+ let parsed;
2923
+ try {
2924
+ parsed = JSON.parse(raw);
2925
+ } catch (error) {
2926
+ const message = error instanceof Error ? error.message : String(error);
2927
+ throw new Error(`Invalid JSON in ${filePath}: ${message}`);
3836
2928
  }
3837
- _freeze() {
3838
- this.define = () => {
3839
- throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances");
3840
- };
3841
- Object.freeze(this);
3842
- for (const extensions of __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").values()) {
3843
- Object.freeze(extensions);
3844
- }
3845
- return this;
2929
+ if (!isPlainObject(parsed)) {
2930
+ throw new Error(`${filePath} must contain a JSON object.`);
3846
2931
  }
3847
- _getTestState() {
3848
- return {
3849
- types: __classPrivateFieldGet(this, _Mime_extensionToType, "f"),
3850
- extensions: __classPrivateFieldGet(this, _Mime_typeToExtension, "f")
3851
- };
2932
+ return parsed;
2933
+ }
2934
+ async function pullWebappConfig(options) {
2935
+ const raw = await fetchWebappConfig({
2936
+ env: options.env,
2937
+ webappId: options.webappId,
2938
+ url: options.url,
2939
+ host: options.host,
2940
+ port: options.port
2941
+ });
2942
+ const details = stripReadOnlyFields(unwrapDetails(raw));
2943
+ const cleaned = sanitizeDetails(details);
2944
+ const stripped = Object.keys(details).length - Object.keys(cleaned).length;
2945
+ const fileName = options.out || DEFAULT_CONFIG_FILE;
2946
+ const outPath = resolve2(process.cwd(), fileName);
2947
+ writeFileSync4(outPath, `${JSON.stringify(cleaned, null, 2)}
2948
+ `, "utf-8");
2949
+ console.log(`✅ Wrote ${fileName} (${Object.keys(cleaned).length} fields, ${stripped} empty default${stripped === 1 ? "" : "s"} stripped)`);
2950
+ }
2951
+ async function pushWebappConfig(options) {
2952
+ const fileName = options.file || DEFAULT_CONFIG_FILE;
2953
+ const filePath = resolve2(process.cwd(), fileName);
2954
+ const fileDetails = stripReadOnlyFields(readConfigFile(filePath));
2955
+ const raw = await fetchWebappConfig({
2956
+ env: options.env,
2957
+ webappId: options.webappId,
2958
+ url: options.url,
2959
+ host: options.host,
2960
+ port: options.port
2961
+ });
2962
+ const current = unwrapDetails(raw);
2963
+ const deltas = computeDetailsDelta(current, fileDetails);
2964
+ console.log(formatObjectDelta(deltas, `Pushing ${fileName} → [${options.env}]`));
2965
+ if (deltas.length === 0) {
2966
+ console.log(`
2967
+ ✓ Already in sync — nothing to push.`);
2968
+ return;
2969
+ }
2970
+ if (options.dryRun) {
2971
+ console.log(`
2972
+ ↷ Dry run — no request sent.`);
2973
+ return;
2974
+ }
2975
+ const tty = !!process.stdin.isTTY && !!process.stdout.isTTY;
2976
+ if (!options.yes) {
2977
+ if (!tty) {
2978
+ throw new Error("Refusing to push in non-interactive mode. Pass --yes to confirm or --dry-run to preview.");
2979
+ }
2980
+ const answer = await prompt(`
2981
+ Proceed with push on [${options.env}]? (y/N): `);
2982
+ if (!isExplicitYes(answer)) {
2983
+ console.log("✋ Aborted.");
2984
+ return;
2985
+ }
3852
2986
  }
2987
+ await patchWebappConfig({
2988
+ env: options.env,
2989
+ details: fileDetails,
2990
+ webappId: options.webappId,
2991
+ url: options.url,
2992
+ host: options.host,
2993
+ port: options.port
2994
+ });
2995
+ console.log(`
2996
+ ✅ Webapp config pushed.`);
3853
2997
  }
3854
- _Mime_extensionToType = new WeakMap, _Mime_typeToExtension = new WeakMap, _Mime_typeToExtensions = new WeakMap;
3855
- var Mime_default = Mime;
3856
-
3857
- // node_modules/mime/dist/src/index.js
3858
- var src_default = new Mime_default(standard_default, other_default)._freeze();
3859
-
3860
- // src/config-file.ts
3861
- import { existsSync as existsSync5, readFileSync as readFileSync4, writeFileSync as writeFileSync4 } from "node:fs";
3862
- import { resolve as resolve2 } from "node:path";
3863
-
3864
- // src/update-webapp-config.ts
3865
- import { existsSync as existsSync4, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "node:fs";
3866
- import { resolve } from "node:path";
3867
- var CONFIG_URLS = {
3868
- local: "http://localhost:5176/api/webapps/config",
3869
- development: "https://development-cms.rodyssey.ai/api/webapps/config",
3870
- staging: "https://staging-cms.rodyssey.ai/api/webapps/config",
3871
- production: "https://cms.rodyssey.ai/api/webapps/config"
3872
- };
3873
- function parseJsonOption(value, optionName) {
3874
- const maybePath = resolve(process.cwd(), value);
3875
- const raw = existsSync4(maybePath) ? readFileSync3(maybePath, "utf-8") : value;
2998
+ async function checkConfigDriftOnDeploy(options) {
2999
+ const fileName = options.file || DEFAULT_CONFIG_FILE;
3000
+ const filePath = resolve2(process.cwd(), fileName);
3001
+ if (!existsSync4(filePath))
3002
+ return;
3003
+ if (!process.env.WEBAPP_ID) {
3004
+ console.warn(`
3005
+ ⚠️ Skipping config drift check: WEBAPP_ID is not set.`);
3006
+ return;
3007
+ }
3008
+ let fileDetails;
3009
+ try {
3010
+ fileDetails = stripReadOnlyFields(readConfigFile(filePath));
3011
+ } catch (error) {
3012
+ const message = error instanceof Error ? error.message : String(error);
3013
+ console.warn(`
3014
+ ⚠️ Skipping config drift check: ${message}`);
3015
+ return;
3016
+ }
3017
+ let current;
3018
+ try {
3019
+ const raw = await fetchWebappConfig({
3020
+ env: options.env,
3021
+ host: options.host,
3022
+ port: options.port
3023
+ });
3024
+ current = unwrapDetails(raw);
3025
+ } catch (error) {
3026
+ const message = error instanceof Error ? error.message : String(error);
3027
+ console.warn(`
3028
+ ⚠️ Could not check config drift: ${message}`);
3029
+ return;
3030
+ }
3031
+ const deltas = computeDetailsDelta(current, fileDetails);
3032
+ if (deltas.length === 0)
3033
+ return;
3034
+ console.log(`
3035
+ \uD83D\uDCDD ${fileName} differs from the CMS:`);
3036
+ console.log(formatObjectDelta(deltas, `Config drift on [${options.env}]`));
3037
+ const tty = !!process.stdin.isTTY && !!process.stdout.isTTY;
3038
+ let shouldPush = options.pushConfig === true;
3039
+ if (!shouldPush) {
3040
+ if (!tty) {
3041
+ console.log(`
3042
+ ℹ️ ${fileName} differs from CMS — run 'ro app config push' to sync, or deploy with --push-config.`);
3043
+ return;
3044
+ }
3045
+ const answer = await prompt(`
3046
+ Push ${fileName} to the CMS now? (y/N): `);
3047
+ shouldPush = isExplicitYes(answer);
3048
+ }
3049
+ if (!shouldPush) {
3050
+ console.log(`
3051
+ ↷ Skipped. Run 'ro app config push' later to sync.`);
3052
+ return;
3053
+ }
3876
3054
  try {
3877
- const parsed = JSON.parse(raw);
3878
- if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
3879
- throw new Error("value must be a JSON object");
3880
- }
3881
- return parsed;
3055
+ await patchWebappConfig({
3056
+ env: options.env,
3057
+ details: fileDetails,
3058
+ host: options.host,
3059
+ port: options.port
3060
+ });
3061
+ console.log("✅ Webapp config pushed.");
3882
3062
  } catch (error) {
3883
3063
  const message = error instanceof Error ? error.message : String(error);
3884
- throw new Error(`Invalid ${optionName}: ${message}`);
3064
+ console.warn(`
3065
+ ⚠️ Config push failed (deploy still succeeded): ${message}`);
3066
+ console.warn(" Retry with: ro app config push");
3885
3067
  }
3886
3068
  }
3887
- function coerceMaybeNull(value) {
3888
- if (value === undefined)
3889
- return;
3890
- if (value === "null")
3891
- return null;
3892
- return value;
3069
+
3070
+ // src/create.ts
3071
+ var PLACEHOLDER = "__PROJECT_NAME__";
3072
+ var PLACEHOLDER_LOWER = "__project_name__";
3073
+ var REPLACEMENT_FILES = {
3074
+ webapp: ["package.json", "index.html"],
3075
+ "webapp-fullstack": ["package.json", "wrangler.jsonc"]
3076
+ };
3077
+ function isObject2(value) {
3078
+ return !!value && typeof value === "object" && !Array.isArray(value);
3893
3079
  }
3894
- function resolveConfigUrl(options, required = true) {
3895
- const configUrl = options.url || process.env.WEBAPP_CONFIG_URL || CONFIG_URLS[options.env];
3896
- if (!configUrl) {
3897
- if (!required)
3898
- return;
3899
- console.error("❌ Error: no webapp config endpoint configured.");
3900
- console.error(`\uD83D\uDCA1 Use one of these environments: ${Object.keys(CONFIG_URLS).join(", ")}, pass --url, or set WEBAPP_CONFIG_URL in your .env file.`);
3901
- process.exit(1);
3902
- }
3903
- const url = new URL(configUrl);
3904
- if (!options.host && !options.port) {
3905
- return url.toString().replace(/\/$/, "");
3906
- }
3907
- if (options.host)
3908
- url.hostname = options.host;
3909
- if (options.port)
3910
- url.port = String(options.port);
3911
- return url.toString().replace(/\/$/, "");
3080
+ function pickString(...values) {
3081
+ return values.find((value) => typeof value === "string" && value.length > 0);
3912
3082
  }
3913
- function buildDetailsPayload(options) {
3914
- const payload = options.details ? parseJsonOption(options.details, "--details") : {};
3915
- const title = coerceMaybeNull(options.title);
3916
- const description = coerceMaybeNull(options.description);
3917
- const coverImg = coerceMaybeNull(options.coverImg);
3918
- if (title !== undefined)
3919
- payload.title = title;
3920
- if (description !== undefined)
3921
- payload.description = description;
3922
- if (coverImg !== undefined)
3923
- payload.coverImg = coverImg;
3924
- if (options.localization !== undefined) {
3925
- payload.localization = options.localization === "null" ? null : parseJsonOption(options.localization, "--localization");
3926
- }
3927
- return payload;
3083
+ function nestedObject(value, key) {
3084
+ if (!isObject2(value))
3085
+ return;
3086
+ const nested = value[key];
3087
+ return isObject2(nested) ? nested : undefined;
3928
3088
  }
3929
- function resolveWebappId(webappId) {
3930
- const resolved = webappId || process.env.WEBAPP_ID;
3931
- if (!resolved) {
3932
- console.error("❌ Error: WEBAPP_ID is not set. Pass --webapp-id or set it in your .env file.");
3933
- process.exit(1);
3934
- }
3935
- return resolved;
3089
+ function extractWebappId(payload) {
3090
+ const webapp = nestedObject(payload, "webapp");
3091
+ return pickString(webapp?.id, webapp?.webappId);
3936
3092
  }
3937
- function ensureDeployToken(env) {
3938
- if (process.env.DEPLOY_TOKEN)
3939
- return;
3940
- console.error("❌ Error: DEPLOY_TOKEN is not set in environment variables.");
3941
- console.info(`\uD83D\uDCA1 Please check your .env or .env.${env} file.`);
3942
- process.exit(1);
3093
+ function extractDeployToken(payload) {
3094
+ const webapp = nestedObject(payload, "webapp");
3095
+ return pickString(webapp?.deployToken, webapp?.deploymentToken);
3943
3096
  }
3944
- function getConfigUrl(options, required = true) {
3945
- return resolveConfigUrl(options, required);
3097
+ function writeProjectEnv(projectDir, provisioned) {
3098
+ upsertEnvFile(path2.join(projectDir, ".env"), {
3099
+ WEBAPP_ID: provisioned.webappId,
3100
+ DEPLOY_TOKEN: provisioned.deployToken
3101
+ });
3946
3102
  }
3947
- async function patchWebappConfig(options) {
3948
- loadEnv(options.env);
3949
- const webappId = resolveWebappId(options.webappId);
3950
- const CONFIG_URL = getConfigUrl(options, false);
3951
- if (!CONFIG_URL) {
3952
- throw new Error("No webapp config endpoint configured.");
3953
- }
3954
- ensureDeployToken(options.env);
3955
- const response = await fetch(CONFIG_URL, {
3956
- method: "PATCH",
3103
+ async function provisionWebapp(projectName, options) {
3104
+ const cmsUrl = resolveCmsUrl(options.env, options.cmsUrl);
3105
+ const token = resolveSessionToken(options.env);
3106
+ const createUrl = options.createUrl || `${cmsUrl}/api/cli/webapps/create`;
3107
+ const createResponse = await fetch(createUrl, {
3108
+ method: "POST",
3957
3109
  headers: {
3958
- Authorization: `Bearer ${process.env.DEPLOY_TOKEN}`,
3110
+ Accept: "application/json",
3111
+ Authorization: `Bearer ${token}`,
3959
3112
  "Content-Type": "application/json"
3960
3113
  },
3961
- body: JSON.stringify({ webappId, details: options.details })
3114
+ body: JSON.stringify({ title: projectName })
3962
3115
  });
3963
- if (!response.ok) {
3964
- const errorText = await response.text();
3965
- throw new Error(`Config update failed: ${response.status} ${response.statusText}
3966
- ${errorText}`);
3116
+ const createPayload = await readResponsePayload(createResponse);
3117
+ if (!createResponse.ok) {
3118
+ throw new Error(`CMS webapp creation failed: ${createResponse.status} ${createResponse.statusText}
3119
+ ${JSON.stringify(createPayload, null, 2)}`);
3967
3120
  }
3968
- return await response.json().catch(() => {
3969
- return;
3970
- });
3971
- }
3972
- async function fetchWebappConfig(options) {
3973
- loadEnv(options.env);
3974
- const webappId = resolveWebappId(options.webappId);
3975
- const CONFIG_URL = getConfigUrl(options, false);
3976
- if (!CONFIG_URL) {
3977
- throw new Error("No webapp config endpoint configured.");
3121
+ const webappId = extractWebappId(createPayload);
3122
+ if (!webappId) {
3123
+ throw new Error(`CMS create response did not include webapp.id:
3124
+ ${JSON.stringify(createPayload, null, 2)}`);
3978
3125
  }
3979
- ensureDeployToken(options.env);
3980
- const url = new URL(CONFIG_URL);
3126
+ const deployToken = extractDeployToken(createPayload);
3127
+ if (!deployToken) {
3128
+ throw new Error(`CMS create response did not include webapp.deployToken:
3129
+ ${JSON.stringify(createPayload, null, 2)}`);
3130
+ }
3131
+ return {
3132
+ webappId,
3133
+ deployToken
3134
+ };
3135
+ }
3136
+ async function fetchCmsConfig(cmsUrl, webappId, deployToken) {
3137
+ const url = new URL(`${cmsUrl}/api/webapps/config`);
3981
3138
  url.searchParams.set("webappId", webappId);
3982
3139
  const response = await fetch(url, {
3983
3140
  method: "GET",
3984
3141
  headers: {
3985
- Authorization: `Bearer ${process.env.DEPLOY_TOKEN}`,
3142
+ Authorization: `Bearer ${deployToken}`,
3986
3143
  Accept: "application/json"
3987
3144
  }
3988
3145
  });
@@ -3991,381 +3148,1267 @@ async function fetchWebappConfig(options) {
3991
3148
  throw new Error(`Config fetch failed: ${response.status} ${response.statusText}
3992
3149
  ${errorText}`);
3993
3150
  }
3994
- return await response.json();
3151
+ return response.json();
3995
3152
  }
3996
- async function getWebappConfig(options) {
3997
- loadEnv(options.env);
3998
- const webappId = resolveWebappId(options.webappId);
3999
- const CONFIG_URL = getConfigUrl(options);
4000
- if (!CONFIG_URL)
4001
- return;
4002
- const url = new URL(CONFIG_URL);
4003
- url.searchParams.set("webappId", webappId);
4004
- console.log(`⚙️ Pulling webapp config for [${options.env}] environment...`);
4005
- console.log(`\uD83D\uDCCD Config URL: ${url.toString()}`);
4006
- console.log(`\uD83D\uDCCD Webapp ID: ${webappId}
4007
- `);
4008
- const config = await fetchWebappConfig(options);
4009
- const output = JSON.stringify(config, null, 2);
4010
- if (options.out) {
4011
- writeFileSync3(options.out, `${output}
3153
+ function writeProjectConfig(projectDir, details) {
3154
+ writeFileSync5(path2.join(projectDir, DEFAULT_CONFIG_FILE), `${JSON.stringify(details, null, 2)}
4012
3155
  `, "utf-8");
4013
- console.log(`✅ Webapp config written to ${options.out}`);
4014
- return;
4015
- }
4016
- console.log(output);
4017
- }
4018
- async function updateWebappConfig(options) {
4019
- loadEnv(options.env);
4020
- const webappId = resolveWebappId(options.webappId);
4021
- const details = buildDetailsPayload(options);
4022
- if (Object.keys(details).length === 0) {
4023
- console.error("❌ Error: no detail fields provided. Use --title, --description, --cover-img, --localization, or --details.");
4024
- process.exit(1);
4025
- }
4026
- const payload = { webappId, details };
4027
- const CONFIG_URL = getConfigUrl(options, !options.dryRun);
4028
- if (!options.dryRun)
4029
- ensureDeployToken(options.env);
4030
- console.log(`⚙️ Updating webapp config for [${options.env}] environment...`);
4031
- if (CONFIG_URL) {
4032
- console.log(`\uD83D\uDCCD Config URL: ${CONFIG_URL}`);
4033
- }
4034
- console.log(`\uD83D\uDCCD Webapp ID: ${webappId}
4035
- `);
4036
- if (options.dryRun) {
4037
- console.log("\uD83E\uDDEA Dry run payload:");
4038
- console.log(JSON.stringify(payload, null, 2));
4039
- return;
4040
- }
4041
- if (!CONFIG_URL)
4042
- return;
4043
- const result = await patchWebappConfig({
4044
- env: options.env,
4045
- details,
4046
- webappId,
4047
- url: options.url,
4048
- host: options.host,
4049
- port: options.port
4050
- });
4051
- console.log("✅ Webapp config updated");
4052
- if (result !== undefined) {
4053
- console.log(`
4054
- \uD83D\uDCCB Update result:`, result);
4055
- }
4056
- }
4057
-
4058
- // src/cli-ui.ts
4059
- function isPlainObject(value) {
4060
- return !!value && typeof value === "object" && !Array.isArray(value) && Object.getPrototypeOf(value) === Object.prototype;
4061
- }
4062
- function compact(value) {
4063
- return JSON.stringify(value);
4064
- }
4065
- function pretty(value) {
4066
- return JSON.stringify(value, null, 2);
4067
- }
4068
- function useColor() {
4069
- return !!process.stdout.isTTY && !process.env.NO_COLOR;
4070
- }
4071
- function paint(code, text) {
4072
- return useColor() ? `\x1B[${code}m${text}\x1B[0m` : text;
4073
- }
4074
- var green = (s) => paint("32", s);
4075
- var red = (s) => paint("31", s);
4076
- var yellow = (s) => paint("33", s);
4077
- var dim = (s) => paint("2", s);
4078
- var strike = (s) => paint("9", s);
4079
- async function prompt(question) {
4080
- const readline = await import("node:readline");
4081
- const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
4082
- return new Promise((resolveAnswer) => {
4083
- rl.question(question, (answer) => {
4084
- rl.close();
4085
- resolveAnswer(answer);
4086
- });
4087
- });
4088
- }
4089
- function isExplicitYes(answer) {
4090
- const trimmed = answer.trim().toLowerCase();
4091
- return trimmed === "y" || trimmed === "yes";
4092
- }
4093
- function pathToDot(path3) {
4094
- return path3.replace(/^\//, "").replaceAll("/", ".");
4095
3156
  }
4096
- function deepEqual(a, b) {
4097
- if (a === b)
4098
- return true;
4099
- if (typeof a !== typeof b)
4100
- return false;
4101
- if (a === null || b === null)
4102
- return false;
4103
- if (Array.isArray(a) || Array.isArray(b)) {
4104
- if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length)
4105
- return false;
4106
- return a.every((v, i) => deepEqual(v, b[i]));
3157
+ async function create(projectName, repoUrl, templateName, autoCreate) {
3158
+ const targetDir = path2.resolve(process.cwd(), projectName);
3159
+ if (existsSync5(targetDir)) {
3160
+ console.error(`
3161
+ Directory "${projectName}" already exists.
3162
+ `);
3163
+ process.exit(1);
4107
3164
  }
4108
- if (typeof a === "object" && typeof b === "object") {
4109
- const ak = Object.keys(a);
4110
- const bk = Object.keys(b);
4111
- if (ak.length !== bk.length)
4112
- return false;
4113
- return ak.every((k) => deepEqual(a[k], b[k]));
3165
+ if (autoCreate?.enabled) {
3166
+ resolveCmsUrl(autoCreate.env, autoCreate.cmsUrl);
3167
+ resolveSessionToken(autoCreate.env);
4114
3168
  }
4115
- return false;
4116
- }
4117
- function diffJson(before, after, path3 = "") {
4118
- if (deepEqual(before, after))
4119
- return [];
4120
- if (before === undefined)
4121
- return [{ path: path3, kind: "add", after }];
4122
- if (after === undefined)
4123
- return [{ path: path3, kind: "remove", before }];
4124
- if (!isPlainObject(before) || !isPlainObject(after)) {
4125
- return [{ path: path3, kind: "change", before, after }];
3169
+ console.log(`
3170
+ ⏳ Cloning template "${templateName}"...
3171
+ `);
3172
+ try {
3173
+ execSync(`git clone --depth 1 ${repoUrl} ${projectName}`, {
3174
+ stdio: "inherit",
3175
+ cwd: process.cwd()
3176
+ });
3177
+ } catch {
3178
+ console.error(`
3179
+ Failed to clone template. Make sure you have SSH access to the repo.
3180
+ `);
3181
+ process.exit(1);
4126
3182
  }
4127
- const keys = new Set([...Object.keys(before), ...Object.keys(after)]);
4128
- const out = [];
4129
- for (const key of keys) {
4130
- out.push(...diffJson(before[key], after[key], `${path3}/${key}`));
3183
+ const gitDir = path2.join(targetDir, ".git");
3184
+ if (existsSync5(gitDir)) {
3185
+ rmSync(gitDir, { recursive: true, force: true });
4131
3186
  }
4132
- return out;
4133
- }
4134
- function deltaLine(d) {
4135
- const path3 = pathToDot(d.path) || "(root)";
4136
- if (d.kind === "add")
4137
- return green(` ${path3}: ${compact(d.after)}`);
4138
- if (d.kind === "change") {
4139
- return yellow(` ${path3}: ${strike(compact(d.before))} → ${compact(d.after)}`);
3187
+ const filesToReplace = REPLACEMENT_FILES[templateName] ?? [];
3188
+ if (filesToReplace.length > 0) {
3189
+ console.log(` \uD83D\uDCDD Replacing project name...`);
3190
+ replaceInFiles(targetDir, filesToReplace, PLACEHOLDER, projectName);
3191
+ replaceInFiles(targetDir, filesToReplace, PLACEHOLDER_LOWER, projectName.toLowerCase());
4140
3192
  }
4141
- return red(strike(` ${path3}: ${compact(d.before)}`));
4142
- }
4143
- function formatObjectDelta(deltas, header) {
4144
- if (deltas.length === 0)
4145
- return `${header}
4146
- ${dim(" (no changes)")}`;
4147
- const adds = deltas.filter((d) => d.kind === "add");
4148
- const changes = deltas.filter((d) => d.kind === "change");
4149
- const removes = deltas.filter((d) => d.kind === "remove");
4150
- const sections = [];
4151
- if (adds.length)
4152
- sections.push([green("New"), ...adds.map(deltaLine)].join(`
4153
- `));
4154
- if (changes.length)
4155
- sections.push([yellow("Update"), ...changes.map(deltaLine)].join(`
4156
- `));
4157
- if (removes.length)
4158
- sections.push([red("Delete"), ...removes.map(deltaLine)].join(`
4159
- `));
4160
- return `${header}
3193
+ execSync("git init", { stdio: "ignore", cwd: targetDir });
3194
+ if (autoCreate?.enabled) {
3195
+ console.log(` \uD83C\uDF10 Creating CMS webapp in [${autoCreate.env}]...`);
3196
+ const provisioned = await provisionWebapp(projectName, autoCreate);
3197
+ writeProjectEnv(targetDir, provisioned);
3198
+ console.log(` \uD83D\uDD10 Wrote WEBAPP_ID and DEPLOY_TOKEN to .env`);
3199
+ console.log(` \uD83D\uDCCD Webapp ID: ${provisioned.webappId}`);
3200
+ try {
3201
+ const cmsUrl = resolveCmsUrl(autoCreate.env, autoCreate.cmsUrl);
3202
+ const raw = await fetchCmsConfig(cmsUrl, provisioned.webappId, provisioned.deployToken);
3203
+ writeProjectConfig(targetDir, sanitizeDetails(unwrapDetails(raw)));
3204
+ console.log(` \uD83D\uDCC4 Wrote webapp.config.json (pulled from CMS)`);
3205
+ } catch (err) {
3206
+ const msg = err instanceof Error ? err.message : String(err);
3207
+ console.warn(` ⚠️ Could not pull config from CMS (${msg}) — wrote empty webapp.config.json`);
3208
+ writeProjectConfig(targetDir, {});
3209
+ }
3210
+ } else {
3211
+ writeProjectConfig(targetDir, {});
3212
+ console.log(` \uD83D\uDCC4 Wrote webapp.config.json`);
3213
+ }
3214
+ console.log(`
3215
+ ✅ Project "${projectName}" created successfully!
4161
3216
 
4162
- ${sections.join(`
3217
+ Next steps:
4163
3218
 
4164
- `)}`;
3219
+ cd ${projectName}
3220
+ bun install
3221
+ bun run dev
3222
+ `);
4165
3223
  }
4166
3224
 
4167
- // src/config-file.ts
4168
- var DEFAULT_CONFIG_FILE = "webapp.config.json";
4169
- function isClearSignalEmpty(value) {
4170
- if (value === null)
4171
- return true;
4172
- if (Array.isArray(value) && value.length === 0)
4173
- return true;
4174
- if (isPlainObject(value) && Object.keys(value).length === 0)
4175
- return true;
4176
- return false;
4177
- }
4178
- function sanitizeDetails(details) {
4179
- const out = {};
4180
- for (const [key, value] of Object.entries(details)) {
4181
- if (isClearSignalEmpty(value))
4182
- continue;
4183
- out[key] = value;
4184
- }
4185
- return out;
4186
- }
4187
- function unwrapDetails(payload) {
4188
- if (isPlainObject(payload) && isPlainObject(payload.details)) {
4189
- return payload.details;
4190
- }
4191
- if (isPlainObject(payload) && "details" in payload)
4192
- return {};
4193
- if (isPlainObject(payload))
4194
- return payload;
4195
- return {};
4196
- }
4197
- function projectDetailsPatch(current, patch) {
4198
- const next = { ...current };
4199
- for (const [key, value] of Object.entries(patch)) {
4200
- if (isClearSignalEmpty(value)) {
4201
- delete next[key];
4202
- } else {
4203
- next[key] = value;
4204
- }
4205
- }
4206
- return next;
4207
- }
4208
- function computeDetailsDelta(current, fileDetails) {
4209
- return diffJson(current, projectDetailsPatch(current, fileDetails));
4210
- }
4211
- function readConfigFile(filePath) {
4212
- if (!existsSync5(filePath)) {
4213
- throw new Error(`Config file not found: ${filePath}. Run \`ro app config pull\` first.`);
4214
- }
4215
- let raw;
4216
- try {
4217
- raw = readFileSync4(filePath, "utf-8");
4218
- } catch (error) {
4219
- const message = error instanceof Error ? error.message : String(error);
4220
- throw new Error(`Could not read ${filePath}: ${message}`);
4221
- }
4222
- let parsed;
4223
- try {
4224
- parsed = JSON.parse(raw);
4225
- } catch (error) {
4226
- const message = error instanceof Error ? error.message : String(error);
4227
- throw new Error(`Invalid JSON in ${filePath}: ${message}`);
4228
- }
4229
- if (!isPlainObject(parsed)) {
4230
- throw new Error(`${filePath} must contain a JSON object.`);
4231
- }
4232
- return parsed;
4233
- }
4234
- async function pullWebappConfig(options) {
4235
- const raw = await fetchWebappConfig({
4236
- env: options.env,
4237
- webappId: options.webappId,
4238
- url: options.url,
4239
- host: options.host,
4240
- port: options.port
4241
- });
4242
- const details = unwrapDetails(raw);
4243
- const cleaned = sanitizeDetails(details);
4244
- const stripped = Object.keys(details).length - Object.keys(cleaned).length;
4245
- const fileName = options.out || DEFAULT_CONFIG_FILE;
4246
- const outPath = resolve2(process.cwd(), fileName);
4247
- writeFileSync4(outPath, `${JSON.stringify(cleaned, null, 2)}
4248
- `, "utf-8");
4249
- console.log(`✅ Wrote ${fileName} (${Object.keys(cleaned).length} fields, ${stripped} empty default${stripped === 1 ? "" : "s"} stripped)`);
4250
- }
4251
- async function pushWebappConfig(options) {
4252
- const fileName = options.file || DEFAULT_CONFIG_FILE;
4253
- const filePath = resolve2(process.cwd(), fileName);
4254
- const fileDetails = readConfigFile(filePath);
4255
- const raw = await fetchWebappConfig({
4256
- env: options.env,
4257
- webappId: options.webappId,
4258
- url: options.url,
4259
- host: options.host,
4260
- port: options.port
4261
- });
4262
- const current = unwrapDetails(raw);
4263
- const deltas = computeDetailsDelta(current, fileDetails);
4264
- console.log(formatObjectDelta(deltas, `Pushing ${fileName} → [${options.env}]`));
4265
- if (deltas.length === 0) {
4266
- console.log(`
4267
- Already in sync — nothing to push.`);
4268
- return;
4269
- }
4270
- if (options.dryRun) {
4271
- console.log(`
4272
- Dry run — no request sent.`);
4273
- return;
4274
- }
4275
- const tty = !!process.stdin.isTTY && !!process.stdout.isTTY;
4276
- if (!options.yes) {
4277
- if (!tty) {
4278
- throw new Error("Refusing to push in non-interactive mode. Pass --yes to confirm or --dry-run to preview.");
3225
+ // src/deploy.ts
3226
+ import { execSync as execSync2 } from "node:child_process";
3227
+ import { existsSync as existsSync7, readFileSync as readFileSync6, readdirSync, statSync, unlinkSync } from "node:fs";
3228
+ import { join as join2 } from "node:path";
3229
+
3230
+ // node_modules/mime/dist/types/other.js
3231
+ var types = {
3232
+ "application/prs.cww": ["cww"],
3233
+ "application/prs.xsf+xml": ["xsf"],
3234
+ "application/vnd.1000minds.decision-model+xml": ["1km"],
3235
+ "application/vnd.3gpp.pic-bw-large": ["plb"],
3236
+ "application/vnd.3gpp.pic-bw-small": ["psb"],
3237
+ "application/vnd.3gpp.pic-bw-var": ["pvb"],
3238
+ "application/vnd.3gpp2.tcap": ["tcap"],
3239
+ "application/vnd.3m.post-it-notes": ["pwn"],
3240
+ "application/vnd.accpac.simply.aso": ["aso"],
3241
+ "application/vnd.accpac.simply.imp": ["imp"],
3242
+ "application/vnd.acucobol": ["acu"],
3243
+ "application/vnd.acucorp": ["atc", "acutc"],
3244
+ "application/vnd.adobe.air-application-installer-package+zip": ["air"],
3245
+ "application/vnd.adobe.formscentral.fcdt": ["fcdt"],
3246
+ "application/vnd.adobe.fxp": ["fxp", "fxpl"],
3247
+ "application/vnd.adobe.xdp+xml": ["xdp"],
3248
+ "application/vnd.adobe.xfdf": ["*xfdf"],
3249
+ "application/vnd.age": ["age"],
3250
+ "application/vnd.ahead.space": ["ahead"],
3251
+ "application/vnd.airzip.filesecure.azf": ["azf"],
3252
+ "application/vnd.airzip.filesecure.azs": ["azs"],
3253
+ "application/vnd.amazon.ebook": ["azw"],
3254
+ "application/vnd.americandynamics.acc": ["acc"],
3255
+ "application/vnd.amiga.ami": ["ami"],
3256
+ "application/vnd.android.package-archive": ["apk"],
3257
+ "application/vnd.anser-web-certificate-issue-initiation": ["cii"],
3258
+ "application/vnd.anser-web-funds-transfer-initiation": ["fti"],
3259
+ "application/vnd.antix.game-component": ["atx"],
3260
+ "application/vnd.apple.installer+xml": ["mpkg"],
3261
+ "application/vnd.apple.keynote": ["key"],
3262
+ "application/vnd.apple.mpegurl": ["m3u8"],
3263
+ "application/vnd.apple.numbers": ["numbers"],
3264
+ "application/vnd.apple.pages": ["pages"],
3265
+ "application/vnd.apple.pkpass": ["pkpass"],
3266
+ "application/vnd.aristanetworks.swi": ["swi"],
3267
+ "application/vnd.astraea-software.iota": ["iota"],
3268
+ "application/vnd.audiograph": ["aep"],
3269
+ "application/vnd.autodesk.fbx": ["fbx"],
3270
+ "application/vnd.balsamiq.bmml+xml": ["bmml"],
3271
+ "application/vnd.blueice.multipass": ["mpm"],
3272
+ "application/vnd.bmi": ["bmi"],
3273
+ "application/vnd.businessobjects": ["rep"],
3274
+ "application/vnd.chemdraw+xml": ["cdxml"],
3275
+ "application/vnd.chipnuts.karaoke-mmd": ["mmd"],
3276
+ "application/vnd.cinderella": ["cdy"],
3277
+ "application/vnd.citationstyles.style+xml": ["csl"],
3278
+ "application/vnd.claymore": ["cla"],
3279
+ "application/vnd.cloanto.rp9": ["rp9"],
3280
+ "application/vnd.clonk.c4group": ["c4g", "c4d", "c4f", "c4p", "c4u"],
3281
+ "application/vnd.cluetrust.cartomobile-config": ["c11amc"],
3282
+ "application/vnd.cluetrust.cartomobile-config-pkg": ["c11amz"],
3283
+ "application/vnd.commonspace": ["csp"],
3284
+ "application/vnd.contact.cmsg": ["cdbcmsg"],
3285
+ "application/vnd.cosmocaller": ["cmc"],
3286
+ "application/vnd.crick.clicker": ["clkx"],
3287
+ "application/vnd.crick.clicker.keyboard": ["clkk"],
3288
+ "application/vnd.crick.clicker.palette": ["clkp"],
3289
+ "application/vnd.crick.clicker.template": ["clkt"],
3290
+ "application/vnd.crick.clicker.wordbank": ["clkw"],
3291
+ "application/vnd.criticaltools.wbs+xml": ["wbs"],
3292
+ "application/vnd.ctc-posml": ["pml"],
3293
+ "application/vnd.cups-ppd": ["ppd"],
3294
+ "application/vnd.curl.car": ["car"],
3295
+ "application/vnd.curl.pcurl": ["pcurl"],
3296
+ "application/vnd.dart": ["dart"],
3297
+ "application/vnd.data-vision.rdz": ["rdz"],
3298
+ "application/vnd.dbf": ["dbf"],
3299
+ "application/vnd.dcmp+xml": ["dcmp"],
3300
+ "application/vnd.dece.data": ["uvf", "uvvf", "uvd", "uvvd"],
3301
+ "application/vnd.dece.ttml+xml": ["uvt", "uvvt"],
3302
+ "application/vnd.dece.unspecified": ["uvx", "uvvx"],
3303
+ "application/vnd.dece.zip": ["uvz", "uvvz"],
3304
+ "application/vnd.denovo.fcselayout-link": ["fe_launch"],
3305
+ "application/vnd.dna": ["dna"],
3306
+ "application/vnd.dolby.mlp": ["mlp"],
3307
+ "application/vnd.dpgraph": ["dpg"],
3308
+ "application/vnd.dreamfactory": ["dfac"],
3309
+ "application/vnd.ds-keypoint": ["kpxx"],
3310
+ "application/vnd.dvb.ait": ["ait"],
3311
+ "application/vnd.dvb.service": ["svc"],
3312
+ "application/vnd.dynageo": ["geo"],
3313
+ "application/vnd.ecowin.chart": ["mag"],
3314
+ "application/vnd.enliven": ["nml"],
3315
+ "application/vnd.epson.esf": ["esf"],
3316
+ "application/vnd.epson.msf": ["msf"],
3317
+ "application/vnd.epson.quickanime": ["qam"],
3318
+ "application/vnd.epson.salt": ["slt"],
3319
+ "application/vnd.epson.ssf": ["ssf"],
3320
+ "application/vnd.eszigno3+xml": ["es3", "et3"],
3321
+ "application/vnd.ezpix-album": ["ez2"],
3322
+ "application/vnd.ezpix-package": ["ez3"],
3323
+ "application/vnd.fdf": ["*fdf"],
3324
+ "application/vnd.fdsn.mseed": ["mseed"],
3325
+ "application/vnd.fdsn.seed": ["seed", "dataless"],
3326
+ "application/vnd.flographit": ["gph"],
3327
+ "application/vnd.fluxtime.clip": ["ftc"],
3328
+ "application/vnd.framemaker": ["fm", "frame", "maker", "book"],
3329
+ "application/vnd.frogans.fnc": ["fnc"],
3330
+ "application/vnd.frogans.ltf": ["ltf"],
3331
+ "application/vnd.fsc.weblaunch": ["fsc"],
3332
+ "application/vnd.fujitsu.oasys": ["oas"],
3333
+ "application/vnd.fujitsu.oasys2": ["oa2"],
3334
+ "application/vnd.fujitsu.oasys3": ["oa3"],
3335
+ "application/vnd.fujitsu.oasysgp": ["fg5"],
3336
+ "application/vnd.fujitsu.oasysprs": ["bh2"],
3337
+ "application/vnd.fujixerox.ddd": ["ddd"],
3338
+ "application/vnd.fujixerox.docuworks": ["xdw"],
3339
+ "application/vnd.fujixerox.docuworks.binder": ["xbd"],
3340
+ "application/vnd.fuzzysheet": ["fzs"],
3341
+ "application/vnd.genomatix.tuxedo": ["txd"],
3342
+ "application/vnd.geogebra.file": ["ggb"],
3343
+ "application/vnd.geogebra.slides": ["ggs"],
3344
+ "application/vnd.geogebra.tool": ["ggt"],
3345
+ "application/vnd.geometry-explorer": ["gex", "gre"],
3346
+ "application/vnd.geonext": ["gxt"],
3347
+ "application/vnd.geoplan": ["g2w"],
3348
+ "application/vnd.geospace": ["g3w"],
3349
+ "application/vnd.gmx": ["gmx"],
3350
+ "application/vnd.google-apps.document": ["gdoc"],
3351
+ "application/vnd.google-apps.drawing": ["gdraw"],
3352
+ "application/vnd.google-apps.form": ["gform"],
3353
+ "application/vnd.google-apps.jam": ["gjam"],
3354
+ "application/vnd.google-apps.map": ["gmap"],
3355
+ "application/vnd.google-apps.presentation": ["gslides"],
3356
+ "application/vnd.google-apps.script": ["gscript"],
3357
+ "application/vnd.google-apps.site": ["gsite"],
3358
+ "application/vnd.google-apps.spreadsheet": ["gsheet"],
3359
+ "application/vnd.google-earth.kml+xml": ["kml"],
3360
+ "application/vnd.google-earth.kmz": ["kmz"],
3361
+ "application/vnd.gov.sk.xmldatacontainer+xml": ["xdcf"],
3362
+ "application/vnd.grafeq": ["gqf", "gqs"],
3363
+ "application/vnd.groove-account": ["gac"],
3364
+ "application/vnd.groove-help": ["ghf"],
3365
+ "application/vnd.groove-identity-message": ["gim"],
3366
+ "application/vnd.groove-injector": ["grv"],
3367
+ "application/vnd.groove-tool-message": ["gtm"],
3368
+ "application/vnd.groove-tool-template": ["tpl"],
3369
+ "application/vnd.groove-vcard": ["vcg"],
3370
+ "application/vnd.hal+xml": ["hal"],
3371
+ "application/vnd.handheld-entertainment+xml": ["zmm"],
3372
+ "application/vnd.hbci": ["hbci"],
3373
+ "application/vnd.hhe.lesson-player": ["les"],
3374
+ "application/vnd.hp-hpgl": ["hpgl"],
3375
+ "application/vnd.hp-hpid": ["hpid"],
3376
+ "application/vnd.hp-hps": ["hps"],
3377
+ "application/vnd.hp-jlyt": ["jlt"],
3378
+ "application/vnd.hp-pcl": ["pcl"],
3379
+ "application/vnd.hp-pclxl": ["pclxl"],
3380
+ "application/vnd.hydrostatix.sof-data": ["sfd-hdstx"],
3381
+ "application/vnd.ibm.minipay": ["mpy"],
3382
+ "application/vnd.ibm.modcap": ["afp", "listafp", "list3820"],
3383
+ "application/vnd.ibm.rights-management": ["irm"],
3384
+ "application/vnd.ibm.secure-container": ["sc"],
3385
+ "application/vnd.iccprofile": ["icc", "icm"],
3386
+ "application/vnd.igloader": ["igl"],
3387
+ "application/vnd.immervision-ivp": ["ivp"],
3388
+ "application/vnd.immervision-ivu": ["ivu"],
3389
+ "application/vnd.insors.igm": ["igm"],
3390
+ "application/vnd.intercon.formnet": ["xpw", "xpx"],
3391
+ "application/vnd.intergeo": ["i2g"],
3392
+ "application/vnd.intu.qbo": ["qbo"],
3393
+ "application/vnd.intu.qfx": ["qfx"],
3394
+ "application/vnd.ipunplugged.rcprofile": ["rcprofile"],
3395
+ "application/vnd.irepository.package+xml": ["irp"],
3396
+ "application/vnd.is-xpr": ["xpr"],
3397
+ "application/vnd.isac.fcs": ["fcs"],
3398
+ "application/vnd.jam": ["jam"],
3399
+ "application/vnd.jcp.javame.midlet-rms": ["rms"],
3400
+ "application/vnd.jisp": ["jisp"],
3401
+ "application/vnd.joost.joda-archive": ["joda"],
3402
+ "application/vnd.kahootz": ["ktz", "ktr"],
3403
+ "application/vnd.kde.karbon": ["karbon"],
3404
+ "application/vnd.kde.kchart": ["chrt"],
3405
+ "application/vnd.kde.kformula": ["kfo"],
3406
+ "application/vnd.kde.kivio": ["flw"],
3407
+ "application/vnd.kde.kontour": ["kon"],
3408
+ "application/vnd.kde.kpresenter": ["kpr", "kpt"],
3409
+ "application/vnd.kde.kspread": ["ksp"],
3410
+ "application/vnd.kde.kword": ["kwd", "kwt"],
3411
+ "application/vnd.kenameaapp": ["htke"],
3412
+ "application/vnd.kidspiration": ["kia"],
3413
+ "application/vnd.kinar": ["kne", "knp"],
3414
+ "application/vnd.koan": ["skp", "skd", "skt", "skm"],
3415
+ "application/vnd.kodak-descriptor": ["sse"],
3416
+ "application/vnd.las.las+xml": ["lasxml"],
3417
+ "application/vnd.llamagraphics.life-balance.desktop": ["lbd"],
3418
+ "application/vnd.llamagraphics.life-balance.exchange+xml": ["lbe"],
3419
+ "application/vnd.lotus-1-2-3": ["123"],
3420
+ "application/vnd.lotus-approach": ["apr"],
3421
+ "application/vnd.lotus-freelance": ["pre"],
3422
+ "application/vnd.lotus-notes": ["nsf"],
3423
+ "application/vnd.lotus-organizer": ["org"],
3424
+ "application/vnd.lotus-screencam": ["scm"],
3425
+ "application/vnd.lotus-wordpro": ["lwp"],
3426
+ "application/vnd.macports.portpkg": ["portpkg"],
3427
+ "application/vnd.mapbox-vector-tile": ["mvt"],
3428
+ "application/vnd.mcd": ["mcd"],
3429
+ "application/vnd.medcalcdata": ["mc1"],
3430
+ "application/vnd.mediastation.cdkey": ["cdkey"],
3431
+ "application/vnd.mfer": ["mwf"],
3432
+ "application/vnd.mfmp": ["mfm"],
3433
+ "application/vnd.micrografx.flo": ["flo"],
3434
+ "application/vnd.micrografx.igx": ["igx"],
3435
+ "application/vnd.mif": ["mif"],
3436
+ "application/vnd.mobius.daf": ["daf"],
3437
+ "application/vnd.mobius.dis": ["dis"],
3438
+ "application/vnd.mobius.mbk": ["mbk"],
3439
+ "application/vnd.mobius.mqy": ["mqy"],
3440
+ "application/vnd.mobius.msl": ["msl"],
3441
+ "application/vnd.mobius.plc": ["plc"],
3442
+ "application/vnd.mobius.txf": ["txf"],
3443
+ "application/vnd.mophun.application": ["mpn"],
3444
+ "application/vnd.mophun.certificate": ["mpc"],
3445
+ "application/vnd.mozilla.xul+xml": ["xul"],
3446
+ "application/vnd.ms-artgalry": ["cil"],
3447
+ "application/vnd.ms-cab-compressed": ["cab"],
3448
+ "application/vnd.ms-excel": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"],
3449
+ "application/vnd.ms-excel.addin.macroenabled.12": ["xlam"],
3450
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12": ["xlsb"],
3451
+ "application/vnd.ms-excel.sheet.macroenabled.12": ["xlsm"],
3452
+ "application/vnd.ms-excel.template.macroenabled.12": ["xltm"],
3453
+ "application/vnd.ms-fontobject": ["eot"],
3454
+ "application/vnd.ms-htmlhelp": ["chm"],
3455
+ "application/vnd.ms-ims": ["ims"],
3456
+ "application/vnd.ms-lrm": ["lrm"],
3457
+ "application/vnd.ms-officetheme": ["thmx"],
3458
+ "application/vnd.ms-outlook": ["msg"],
3459
+ "application/vnd.ms-pki.seccat": ["cat"],
3460
+ "application/vnd.ms-pki.stl": ["*stl"],
3461
+ "application/vnd.ms-powerpoint": ["ppt", "pps", "pot"],
3462
+ "application/vnd.ms-powerpoint.addin.macroenabled.12": ["ppam"],
3463
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12": ["pptm"],
3464
+ "application/vnd.ms-powerpoint.slide.macroenabled.12": ["sldm"],
3465
+ "application/vnd.ms-powerpoint.slideshow.macroenabled.12": ["ppsm"],
3466
+ "application/vnd.ms-powerpoint.template.macroenabled.12": ["potm"],
3467
+ "application/vnd.ms-project": ["*mpp", "mpt"],
3468
+ "application/vnd.ms-visio.viewer": ["vdx"],
3469
+ "application/vnd.ms-word.document.macroenabled.12": ["docm"],
3470
+ "application/vnd.ms-word.template.macroenabled.12": ["dotm"],
3471
+ "application/vnd.ms-works": ["wps", "wks", "wcm", "wdb"],
3472
+ "application/vnd.ms-wpl": ["wpl"],
3473
+ "application/vnd.ms-xpsdocument": ["xps"],
3474
+ "application/vnd.mseq": ["mseq"],
3475
+ "application/vnd.musician": ["mus"],
3476
+ "application/vnd.muvee.style": ["msty"],
3477
+ "application/vnd.mynfc": ["taglet"],
3478
+ "application/vnd.nato.bindingdataobject+xml": ["bdo"],
3479
+ "application/vnd.neurolanguage.nlu": ["nlu"],
3480
+ "application/vnd.nitf": ["ntf", "nitf"],
3481
+ "application/vnd.noblenet-directory": ["nnd"],
3482
+ "application/vnd.noblenet-sealer": ["nns"],
3483
+ "application/vnd.noblenet-web": ["nnw"],
3484
+ "application/vnd.nokia.n-gage.ac+xml": ["*ac"],
3485
+ "application/vnd.nokia.n-gage.data": ["ngdat"],
3486
+ "application/vnd.nokia.n-gage.symbian.install": ["n-gage"],
3487
+ "application/vnd.nokia.radio-preset": ["rpst"],
3488
+ "application/vnd.nokia.radio-presets": ["rpss"],
3489
+ "application/vnd.novadigm.edm": ["edm"],
3490
+ "application/vnd.novadigm.edx": ["edx"],
3491
+ "application/vnd.novadigm.ext": ["ext"],
3492
+ "application/vnd.oasis.opendocument.chart": ["odc"],
3493
+ "application/vnd.oasis.opendocument.chart-template": ["otc"],
3494
+ "application/vnd.oasis.opendocument.database": ["odb"],
3495
+ "application/vnd.oasis.opendocument.formula": ["odf"],
3496
+ "application/vnd.oasis.opendocument.formula-template": ["odft"],
3497
+ "application/vnd.oasis.opendocument.graphics": ["odg"],
3498
+ "application/vnd.oasis.opendocument.graphics-template": ["otg"],
3499
+ "application/vnd.oasis.opendocument.image": ["odi"],
3500
+ "application/vnd.oasis.opendocument.image-template": ["oti"],
3501
+ "application/vnd.oasis.opendocument.presentation": ["odp"],
3502
+ "application/vnd.oasis.opendocument.presentation-template": ["otp"],
3503
+ "application/vnd.oasis.opendocument.spreadsheet": ["ods"],
3504
+ "application/vnd.oasis.opendocument.spreadsheet-template": ["ots"],
3505
+ "application/vnd.oasis.opendocument.text": ["odt"],
3506
+ "application/vnd.oasis.opendocument.text-master": ["odm"],
3507
+ "application/vnd.oasis.opendocument.text-template": ["ott"],
3508
+ "application/vnd.oasis.opendocument.text-web": ["oth"],
3509
+ "application/vnd.olpc-sugar": ["xo"],
3510
+ "application/vnd.oma.dd2+xml": ["dd2"],
3511
+ "application/vnd.openblox.game+xml": ["obgx"],
3512
+ "application/vnd.openofficeorg.extension": ["oxt"],
3513
+ "application/vnd.openstreetmap.data+xml": ["osm"],
3514
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": [
3515
+ "pptx"
3516
+ ],
3517
+ "application/vnd.openxmlformats-officedocument.presentationml.slide": [
3518
+ "sldx"
3519
+ ],
3520
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow": [
3521
+ "ppsx"
3522
+ ],
3523
+ "application/vnd.openxmlformats-officedocument.presentationml.template": [
3524
+ "potx"
3525
+ ],
3526
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ["xlsx"],
3527
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.template": [
3528
+ "xltx"
3529
+ ],
3530
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": [
3531
+ "docx"
3532
+ ],
3533
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template": [
3534
+ "dotx"
3535
+ ],
3536
+ "application/vnd.osgeo.mapguide.package": ["mgp"],
3537
+ "application/vnd.osgi.dp": ["dp"],
3538
+ "application/vnd.osgi.subsystem": ["esa"],
3539
+ "application/vnd.palm": ["pdb", "pqa", "oprc"],
3540
+ "application/vnd.pawaafile": ["paw"],
3541
+ "application/vnd.pg.format": ["str"],
3542
+ "application/vnd.pg.osasli": ["ei6"],
3543
+ "application/vnd.picsel": ["efif"],
3544
+ "application/vnd.pmi.widget": ["wg"],
3545
+ "application/vnd.pocketlearn": ["plf"],
3546
+ "application/vnd.powerbuilder6": ["pbd"],
3547
+ "application/vnd.previewsystems.box": ["box"],
3548
+ "application/vnd.procrate.brushset": ["brushset"],
3549
+ "application/vnd.procreate.brush": ["brush"],
3550
+ "application/vnd.procreate.dream": ["drm"],
3551
+ "application/vnd.proteus.magazine": ["mgz"],
3552
+ "application/vnd.publishare-delta-tree": ["qps"],
3553
+ "application/vnd.pvi.ptid1": ["ptid"],
3554
+ "application/vnd.pwg-xhtml-print+xml": ["xhtm"],
3555
+ "application/vnd.quark.quarkxpress": [
3556
+ "qxd",
3557
+ "qxt",
3558
+ "qwd",
3559
+ "qwt",
3560
+ "qxl",
3561
+ "qxb"
3562
+ ],
3563
+ "application/vnd.rar": ["rar"],
3564
+ "application/vnd.realvnc.bed": ["bed"],
3565
+ "application/vnd.recordare.musicxml": ["mxl"],
3566
+ "application/vnd.recordare.musicxml+xml": ["musicxml"],
3567
+ "application/vnd.rig.cryptonote": ["cryptonote"],
3568
+ "application/vnd.rim.cod": ["cod"],
3569
+ "application/vnd.rn-realmedia": ["rm"],
3570
+ "application/vnd.rn-realmedia-vbr": ["rmvb"],
3571
+ "application/vnd.route66.link66+xml": ["link66"],
3572
+ "application/vnd.sailingtracker.track": ["st"],
3573
+ "application/vnd.seemail": ["see"],
3574
+ "application/vnd.sema": ["sema"],
3575
+ "application/vnd.semd": ["semd"],
3576
+ "application/vnd.semf": ["semf"],
3577
+ "application/vnd.shana.informed.formdata": ["ifm"],
3578
+ "application/vnd.shana.informed.formtemplate": ["itp"],
3579
+ "application/vnd.shana.informed.interchange": ["iif"],
3580
+ "application/vnd.shana.informed.package": ["ipk"],
3581
+ "application/vnd.simtech-mindmapper": ["twd", "twds"],
3582
+ "application/vnd.smaf": ["mmf"],
3583
+ "application/vnd.smart.teacher": ["teacher"],
3584
+ "application/vnd.software602.filler.form+xml": ["fo"],
3585
+ "application/vnd.solent.sdkm+xml": ["sdkm", "sdkd"],
3586
+ "application/vnd.spotfire.dxp": ["dxp"],
3587
+ "application/vnd.spotfire.sfs": ["sfs"],
3588
+ "application/vnd.stardivision.calc": ["sdc"],
3589
+ "application/vnd.stardivision.draw": ["sda"],
3590
+ "application/vnd.stardivision.impress": ["sdd"],
3591
+ "application/vnd.stardivision.math": ["smf"],
3592
+ "application/vnd.stardivision.writer": ["sdw", "vor"],
3593
+ "application/vnd.stardivision.writer-global": ["sgl"],
3594
+ "application/vnd.stepmania.package": ["smzip"],
3595
+ "application/vnd.stepmania.stepchart": ["sm"],
3596
+ "application/vnd.sun.wadl+xml": ["wadl"],
3597
+ "application/vnd.sun.xml.calc": ["sxc"],
3598
+ "application/vnd.sun.xml.calc.template": ["stc"],
3599
+ "application/vnd.sun.xml.draw": ["sxd"],
3600
+ "application/vnd.sun.xml.draw.template": ["std"],
3601
+ "application/vnd.sun.xml.impress": ["sxi"],
3602
+ "application/vnd.sun.xml.impress.template": ["sti"],
3603
+ "application/vnd.sun.xml.math": ["sxm"],
3604
+ "application/vnd.sun.xml.writer": ["sxw"],
3605
+ "application/vnd.sun.xml.writer.global": ["sxg"],
3606
+ "application/vnd.sun.xml.writer.template": ["stw"],
3607
+ "application/vnd.sus-calendar": ["sus", "susp"],
3608
+ "application/vnd.svd": ["svd"],
3609
+ "application/vnd.symbian.install": ["sis", "sisx"],
3610
+ "application/vnd.syncml+xml": ["xsm"],
3611
+ "application/vnd.syncml.dm+wbxml": ["bdm"],
3612
+ "application/vnd.syncml.dm+xml": ["xdm"],
3613
+ "application/vnd.syncml.dmddf+xml": ["ddf"],
3614
+ "application/vnd.tao.intent-module-archive": ["tao"],
3615
+ "application/vnd.tcpdump.pcap": ["pcap", "cap", "dmp"],
3616
+ "application/vnd.tmobile-livetv": ["tmo"],
3617
+ "application/vnd.trid.tpt": ["tpt"],
3618
+ "application/vnd.triscape.mxs": ["mxs"],
3619
+ "application/vnd.trueapp": ["tra"],
3620
+ "application/vnd.ufdl": ["ufd", "ufdl"],
3621
+ "application/vnd.uiq.theme": ["utz"],
3622
+ "application/vnd.umajin": ["umj"],
3623
+ "application/vnd.unity": ["unityweb"],
3624
+ "application/vnd.uoml+xml": ["uoml", "uo"],
3625
+ "application/vnd.vcx": ["vcx"],
3626
+ "application/vnd.visio": ["vsd", "vst", "vss", "vsw", "vsdx", "vtx"],
3627
+ "application/vnd.visionary": ["vis"],
3628
+ "application/vnd.vsf": ["vsf"],
3629
+ "application/vnd.wap.wbxml": ["wbxml"],
3630
+ "application/vnd.wap.wmlc": ["wmlc"],
3631
+ "application/vnd.wap.wmlscriptc": ["wmlsc"],
3632
+ "application/vnd.webturbo": ["wtb"],
3633
+ "application/vnd.wolfram.player": ["nbp"],
3634
+ "application/vnd.wordperfect": ["wpd"],
3635
+ "application/vnd.wqd": ["wqd"],
3636
+ "application/vnd.wt.stf": ["stf"],
3637
+ "application/vnd.xara": ["xar"],
3638
+ "application/vnd.xfdl": ["xfdl"],
3639
+ "application/vnd.yamaha.hv-dic": ["hvd"],
3640
+ "application/vnd.yamaha.hv-script": ["hvs"],
3641
+ "application/vnd.yamaha.hv-voice": ["hvp"],
3642
+ "application/vnd.yamaha.openscoreformat": ["osf"],
3643
+ "application/vnd.yamaha.openscoreformat.osfpvg+xml": ["osfpvg"],
3644
+ "application/vnd.yamaha.smaf-audio": ["saf"],
3645
+ "application/vnd.yamaha.smaf-phrase": ["spf"],
3646
+ "application/vnd.yellowriver-custom-menu": ["cmp"],
3647
+ "application/vnd.zul": ["zir", "zirz"],
3648
+ "application/vnd.zzazz.deck+xml": ["zaz"],
3649
+ "application/x-7z-compressed": ["7z"],
3650
+ "application/x-abiword": ["abw"],
3651
+ "application/x-ace-compressed": ["ace"],
3652
+ "application/x-apple-diskimage": ["*dmg"],
3653
+ "application/x-arj": ["arj"],
3654
+ "application/x-authorware-bin": ["aab", "x32", "u32", "vox"],
3655
+ "application/x-authorware-map": ["aam"],
3656
+ "application/x-authorware-seg": ["aas"],
3657
+ "application/x-bcpio": ["bcpio"],
3658
+ "application/x-bdoc": ["*bdoc"],
3659
+ "application/x-bittorrent": ["torrent"],
3660
+ "application/x-blender": ["blend"],
3661
+ "application/x-blorb": ["blb", "blorb"],
3662
+ "application/x-bzip": ["bz"],
3663
+ "application/x-bzip2": ["bz2", "boz"],
3664
+ "application/x-cbr": ["cbr", "cba", "cbt", "cbz", "cb7"],
3665
+ "application/x-cdlink": ["vcd"],
3666
+ "application/x-cfs-compressed": ["cfs"],
3667
+ "application/x-chat": ["chat"],
3668
+ "application/x-chess-pgn": ["pgn"],
3669
+ "application/x-chrome-extension": ["crx"],
3670
+ "application/x-cocoa": ["cco"],
3671
+ "application/x-compressed": ["*rar"],
3672
+ "application/x-conference": ["nsc"],
3673
+ "application/x-cpio": ["cpio"],
3674
+ "application/x-csh": ["csh"],
3675
+ "application/x-debian-package": ["*deb", "udeb"],
3676
+ "application/x-dgc-compressed": ["dgc"],
3677
+ "application/x-director": [
3678
+ "dir",
3679
+ "dcr",
3680
+ "dxr",
3681
+ "cst",
3682
+ "cct",
3683
+ "cxt",
3684
+ "w3d",
3685
+ "fgd",
3686
+ "swa"
3687
+ ],
3688
+ "application/x-doom": ["wad"],
3689
+ "application/x-dtbncx+xml": ["ncx"],
3690
+ "application/x-dtbook+xml": ["dtb"],
3691
+ "application/x-dtbresource+xml": ["res"],
3692
+ "application/x-dvi": ["dvi"],
3693
+ "application/x-envoy": ["evy"],
3694
+ "application/x-eva": ["eva"],
3695
+ "application/x-font-bdf": ["bdf"],
3696
+ "application/x-font-ghostscript": ["gsf"],
3697
+ "application/x-font-linux-psf": ["psf"],
3698
+ "application/x-font-pcf": ["pcf"],
3699
+ "application/x-font-snf": ["snf"],
3700
+ "application/x-font-type1": ["pfa", "pfb", "pfm", "afm"],
3701
+ "application/x-freearc": ["arc"],
3702
+ "application/x-futuresplash": ["spl"],
3703
+ "application/x-gca-compressed": ["gca"],
3704
+ "application/x-glulx": ["ulx"],
3705
+ "application/x-gnumeric": ["gnumeric"],
3706
+ "application/x-gramps-xml": ["gramps"],
3707
+ "application/x-gtar": ["gtar"],
3708
+ "application/x-hdf": ["hdf"],
3709
+ "application/x-httpd-php": ["php"],
3710
+ "application/x-install-instructions": ["install"],
3711
+ "application/x-ipynb+json": ["ipynb"],
3712
+ "application/x-iso9660-image": ["*iso"],
3713
+ "application/x-iwork-keynote-sffkey": ["*key"],
3714
+ "application/x-iwork-numbers-sffnumbers": ["*numbers"],
3715
+ "application/x-iwork-pages-sffpages": ["*pages"],
3716
+ "application/x-java-archive-diff": ["jardiff"],
3717
+ "application/x-java-jnlp-file": ["jnlp"],
3718
+ "application/x-keepass2": ["kdbx"],
3719
+ "application/x-latex": ["latex"],
3720
+ "application/x-lua-bytecode": ["luac"],
3721
+ "application/x-lzh-compressed": ["lzh", "lha"],
3722
+ "application/x-makeself": ["run"],
3723
+ "application/x-mie": ["mie"],
3724
+ "application/x-mobipocket-ebook": ["*prc", "mobi"],
3725
+ "application/x-ms-application": ["application"],
3726
+ "application/x-ms-shortcut": ["lnk"],
3727
+ "application/x-ms-wmd": ["wmd"],
3728
+ "application/x-ms-wmz": ["wmz"],
3729
+ "application/x-ms-xbap": ["xbap"],
3730
+ "application/x-msaccess": ["mdb"],
3731
+ "application/x-msbinder": ["obd"],
3732
+ "application/x-mscardfile": ["crd"],
3733
+ "application/x-msclip": ["clp"],
3734
+ "application/x-msdos-program": ["*exe"],
3735
+ "application/x-msdownload": ["*exe", "*dll", "com", "bat", "*msi"],
3736
+ "application/x-msmediaview": ["mvb", "m13", "m14"],
3737
+ "application/x-msmetafile": ["*wmf", "*wmz", "*emf", "emz"],
3738
+ "application/x-msmoney": ["mny"],
3739
+ "application/x-mspublisher": ["pub"],
3740
+ "application/x-msschedule": ["scd"],
3741
+ "application/x-msterminal": ["trm"],
3742
+ "application/x-mswrite": ["wri"],
3743
+ "application/x-netcdf": ["nc", "cdf"],
3744
+ "application/x-ns-proxy-autoconfig": ["pac"],
3745
+ "application/x-nzb": ["nzb"],
3746
+ "application/x-perl": ["pl", "pm"],
3747
+ "application/x-pilot": ["*prc", "*pdb"],
3748
+ "application/x-pkcs12": ["p12", "pfx"],
3749
+ "application/x-pkcs7-certificates": ["p7b", "spc"],
3750
+ "application/x-pkcs7-certreqresp": ["p7r"],
3751
+ "application/x-rar-compressed": ["*rar"],
3752
+ "application/x-redhat-package-manager": ["rpm"],
3753
+ "application/x-research-info-systems": ["ris"],
3754
+ "application/x-sea": ["sea"],
3755
+ "application/x-sh": ["sh"],
3756
+ "application/x-shar": ["shar"],
3757
+ "application/x-shockwave-flash": ["swf"],
3758
+ "application/x-silverlight-app": ["xap"],
3759
+ "application/x-sql": ["*sql"],
3760
+ "application/x-stuffit": ["sit"],
3761
+ "application/x-stuffitx": ["sitx"],
3762
+ "application/x-subrip": ["srt"],
3763
+ "application/x-sv4cpio": ["sv4cpio"],
3764
+ "application/x-sv4crc": ["sv4crc"],
3765
+ "application/x-t3vm-image": ["t3"],
3766
+ "application/x-tads": ["gam"],
3767
+ "application/x-tar": ["tar"],
3768
+ "application/x-tcl": ["tcl", "tk"],
3769
+ "application/x-tex": ["tex"],
3770
+ "application/x-tex-tfm": ["tfm"],
3771
+ "application/x-texinfo": ["texinfo", "texi"],
3772
+ "application/x-tgif": ["*obj"],
3773
+ "application/x-ustar": ["ustar"],
3774
+ "application/x-virtualbox-hdd": ["hdd"],
3775
+ "application/x-virtualbox-ova": ["ova"],
3776
+ "application/x-virtualbox-ovf": ["ovf"],
3777
+ "application/x-virtualbox-vbox": ["vbox"],
3778
+ "application/x-virtualbox-vbox-extpack": ["vbox-extpack"],
3779
+ "application/x-virtualbox-vdi": ["vdi"],
3780
+ "application/x-virtualbox-vhd": ["vhd"],
3781
+ "application/x-virtualbox-vmdk": ["vmdk"],
3782
+ "application/x-wais-source": ["src"],
3783
+ "application/x-web-app-manifest+json": ["webapp"],
3784
+ "application/x-x509-ca-cert": ["der", "crt", "pem"],
3785
+ "application/x-xfig": ["fig"],
3786
+ "application/x-xliff+xml": ["*xlf"],
3787
+ "application/x-xpinstall": ["xpi"],
3788
+ "application/x-xz": ["xz"],
3789
+ "application/x-zip-compressed": ["*zip"],
3790
+ "application/x-zmachine": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"],
3791
+ "audio/vnd.dece.audio": ["uva", "uvva"],
3792
+ "audio/vnd.digital-winds": ["eol"],
3793
+ "audio/vnd.dra": ["dra"],
3794
+ "audio/vnd.dts": ["dts"],
3795
+ "audio/vnd.dts.hd": ["dtshd"],
3796
+ "audio/vnd.lucent.voice": ["lvp"],
3797
+ "audio/vnd.ms-playready.media.pya": ["pya"],
3798
+ "audio/vnd.nuera.ecelp4800": ["ecelp4800"],
3799
+ "audio/vnd.nuera.ecelp7470": ["ecelp7470"],
3800
+ "audio/vnd.nuera.ecelp9600": ["ecelp9600"],
3801
+ "audio/vnd.rip": ["rip"],
3802
+ "audio/x-aac": ["*aac"],
3803
+ "audio/x-aiff": ["aif", "aiff", "aifc"],
3804
+ "audio/x-caf": ["caf"],
3805
+ "audio/x-flac": ["flac"],
3806
+ "audio/x-m4a": ["*m4a"],
3807
+ "audio/x-matroska": ["mka"],
3808
+ "audio/x-mpegurl": ["m3u"],
3809
+ "audio/x-ms-wax": ["wax"],
3810
+ "audio/x-ms-wma": ["wma"],
3811
+ "audio/x-pn-realaudio": ["ram", "ra"],
3812
+ "audio/x-pn-realaudio-plugin": ["rmp"],
3813
+ "audio/x-realaudio": ["*ra"],
3814
+ "audio/x-wav": ["*wav"],
3815
+ "chemical/x-cdx": ["cdx"],
3816
+ "chemical/x-cif": ["cif"],
3817
+ "chemical/x-cmdf": ["cmdf"],
3818
+ "chemical/x-cml": ["cml"],
3819
+ "chemical/x-csml": ["csml"],
3820
+ "chemical/x-xyz": ["xyz"],
3821
+ "image/prs.btif": ["btif", "btf"],
3822
+ "image/prs.pti": ["pti"],
3823
+ "image/vnd.adobe.photoshop": ["psd"],
3824
+ "image/vnd.airzip.accelerator.azv": ["azv"],
3825
+ "image/vnd.blockfact.facti": ["facti"],
3826
+ "image/vnd.dece.graphic": ["uvi", "uvvi", "uvg", "uvvg"],
3827
+ "image/vnd.djvu": ["djvu", "djv"],
3828
+ "image/vnd.dvb.subtitle": ["*sub"],
3829
+ "image/vnd.dwg": ["dwg"],
3830
+ "image/vnd.dxf": ["dxf"],
3831
+ "image/vnd.fastbidsheet": ["fbs"],
3832
+ "image/vnd.fpx": ["fpx"],
3833
+ "image/vnd.fst": ["fst"],
3834
+ "image/vnd.fujixerox.edmics-mmr": ["mmr"],
3835
+ "image/vnd.fujixerox.edmics-rlc": ["rlc"],
3836
+ "image/vnd.microsoft.icon": ["ico"],
3837
+ "image/vnd.ms-dds": ["dds"],
3838
+ "image/vnd.ms-modi": ["mdi"],
3839
+ "image/vnd.ms-photo": ["wdp"],
3840
+ "image/vnd.net-fpx": ["npx"],
3841
+ "image/vnd.pco.b16": ["b16"],
3842
+ "image/vnd.tencent.tap": ["tap"],
3843
+ "image/vnd.valve.source.texture": ["vtf"],
3844
+ "image/vnd.wap.wbmp": ["wbmp"],
3845
+ "image/vnd.xiff": ["xif"],
3846
+ "image/vnd.zbrush.pcx": ["pcx"],
3847
+ "image/x-3ds": ["3ds"],
3848
+ "image/x-adobe-dng": ["dng"],
3849
+ "image/x-cmu-raster": ["ras"],
3850
+ "image/x-cmx": ["cmx"],
3851
+ "image/x-freehand": ["fh", "fhc", "fh4", "fh5", "fh7"],
3852
+ "image/x-icon": ["*ico"],
3853
+ "image/x-jng": ["jng"],
3854
+ "image/x-mrsid-image": ["sid"],
3855
+ "image/x-ms-bmp": ["*bmp"],
3856
+ "image/x-pcx": ["*pcx"],
3857
+ "image/x-pict": ["pic", "pct"],
3858
+ "image/x-portable-anymap": ["pnm"],
3859
+ "image/x-portable-bitmap": ["pbm"],
3860
+ "image/x-portable-graymap": ["pgm"],
3861
+ "image/x-portable-pixmap": ["ppm"],
3862
+ "image/x-rgb": ["rgb"],
3863
+ "image/x-tga": ["tga"],
3864
+ "image/x-xbitmap": ["xbm"],
3865
+ "image/x-xpixmap": ["xpm"],
3866
+ "image/x-xwindowdump": ["xwd"],
3867
+ "message/vnd.wfa.wsc": ["wsc"],
3868
+ "model/vnd.bary": ["bary"],
3869
+ "model/vnd.cld": ["cld"],
3870
+ "model/vnd.collada+xml": ["dae"],
3871
+ "model/vnd.dwf": ["dwf"],
3872
+ "model/vnd.gdl": ["gdl"],
3873
+ "model/vnd.gtw": ["gtw"],
3874
+ "model/vnd.mts": ["*mts"],
3875
+ "model/vnd.opengex": ["ogex"],
3876
+ "model/vnd.parasolid.transmit.binary": ["x_b"],
3877
+ "model/vnd.parasolid.transmit.text": ["x_t"],
3878
+ "model/vnd.pytha.pyox": ["pyo", "pyox"],
3879
+ "model/vnd.sap.vds": ["vds"],
3880
+ "model/vnd.usda": ["usda"],
3881
+ "model/vnd.usdz+zip": ["usdz"],
3882
+ "model/vnd.valve.source.compiled-map": ["bsp"],
3883
+ "model/vnd.vtu": ["vtu"],
3884
+ "text/prs.lines.tag": ["dsc"],
3885
+ "text/vnd.curl": ["curl"],
3886
+ "text/vnd.curl.dcurl": ["dcurl"],
3887
+ "text/vnd.curl.mcurl": ["mcurl"],
3888
+ "text/vnd.curl.scurl": ["scurl"],
3889
+ "text/vnd.dvb.subtitle": ["sub"],
3890
+ "text/vnd.familysearch.gedcom": ["ged"],
3891
+ "text/vnd.fly": ["fly"],
3892
+ "text/vnd.fmi.flexstor": ["flx"],
3893
+ "text/vnd.graphviz": ["gv"],
3894
+ "text/vnd.in3d.3dml": ["3dml"],
3895
+ "text/vnd.in3d.spot": ["spot"],
3896
+ "text/vnd.sun.j2me.app-descriptor": ["jad"],
3897
+ "text/vnd.wap.wml": ["wml"],
3898
+ "text/vnd.wap.wmlscript": ["wmls"],
3899
+ "text/x-asm": ["s", "asm"],
3900
+ "text/x-c": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"],
3901
+ "text/x-component": ["htc"],
3902
+ "text/x-fortran": ["f", "for", "f77", "f90"],
3903
+ "text/x-handlebars-template": ["hbs"],
3904
+ "text/x-java-source": ["java"],
3905
+ "text/x-lua": ["lua"],
3906
+ "text/x-markdown": ["mkd"],
3907
+ "text/x-nfo": ["nfo"],
3908
+ "text/x-opml": ["opml"],
3909
+ "text/x-org": ["*org"],
3910
+ "text/x-pascal": ["p", "pas"],
3911
+ "text/x-processing": ["pde"],
3912
+ "text/x-sass": ["sass"],
3913
+ "text/x-scss": ["scss"],
3914
+ "text/x-setext": ["etx"],
3915
+ "text/x-sfv": ["sfv"],
3916
+ "text/x-suse-ymp": ["ymp"],
3917
+ "text/x-uuencode": ["uu"],
3918
+ "text/x-vcalendar": ["vcs"],
3919
+ "text/x-vcard": ["vcf"],
3920
+ "video/vnd.dece.hd": ["uvh", "uvvh"],
3921
+ "video/vnd.dece.mobile": ["uvm", "uvvm"],
3922
+ "video/vnd.dece.pd": ["uvp", "uvvp"],
3923
+ "video/vnd.dece.sd": ["uvs", "uvvs"],
3924
+ "video/vnd.dece.video": ["uvv", "uvvv"],
3925
+ "video/vnd.dvb.file": ["dvb"],
3926
+ "video/vnd.fvt": ["fvt"],
3927
+ "video/vnd.mpegurl": ["mxu", "m4u"],
3928
+ "video/vnd.ms-playready.media.pyv": ["pyv"],
3929
+ "video/vnd.uvvu.mp4": ["uvu", "uvvu"],
3930
+ "video/vnd.vivo": ["viv"],
3931
+ "video/x-f4v": ["f4v"],
3932
+ "video/x-fli": ["fli"],
3933
+ "video/x-flv": ["flv"],
3934
+ "video/x-m4v": ["m4v"],
3935
+ "video/x-matroska": ["mkv", "mk3d", "mks"],
3936
+ "video/x-mng": ["mng"],
3937
+ "video/x-ms-asf": ["asf", "asx"],
3938
+ "video/x-ms-vob": ["vob"],
3939
+ "video/x-ms-wm": ["wm"],
3940
+ "video/x-ms-wmv": ["wmv"],
3941
+ "video/x-ms-wmx": ["wmx"],
3942
+ "video/x-ms-wvx": ["wvx"],
3943
+ "video/x-msvideo": ["avi"],
3944
+ "video/x-sgi-movie": ["movie"],
3945
+ "video/x-smv": ["smv"],
3946
+ "x-conference/x-cooltalk": ["ice"]
3947
+ };
3948
+ Object.freeze(types);
3949
+ var other_default = types;
3950
+
3951
+ // node_modules/mime/dist/types/standard.js
3952
+ var types2 = {
3953
+ "application/andrew-inset": ["ez"],
3954
+ "application/appinstaller": ["appinstaller"],
3955
+ "application/applixware": ["aw"],
3956
+ "application/appx": ["appx"],
3957
+ "application/appxbundle": ["appxbundle"],
3958
+ "application/atom+xml": ["atom"],
3959
+ "application/atomcat+xml": ["atomcat"],
3960
+ "application/atomdeleted+xml": ["atomdeleted"],
3961
+ "application/atomsvc+xml": ["atomsvc"],
3962
+ "application/atsc-dwd+xml": ["dwd"],
3963
+ "application/atsc-held+xml": ["held"],
3964
+ "application/atsc-rsat+xml": ["rsat"],
3965
+ "application/automationml-aml+xml": ["aml"],
3966
+ "application/automationml-amlx+zip": ["amlx"],
3967
+ "application/bdoc": ["bdoc"],
3968
+ "application/calendar+xml": ["xcs"],
3969
+ "application/ccxml+xml": ["ccxml"],
3970
+ "application/cdfx+xml": ["cdfx"],
3971
+ "application/cdmi-capability": ["cdmia"],
3972
+ "application/cdmi-container": ["cdmic"],
3973
+ "application/cdmi-domain": ["cdmid"],
3974
+ "application/cdmi-object": ["cdmio"],
3975
+ "application/cdmi-queue": ["cdmiq"],
3976
+ "application/cpl+xml": ["cpl"],
3977
+ "application/cu-seeme": ["cu"],
3978
+ "application/cwl": ["cwl"],
3979
+ "application/dash+xml": ["mpd"],
3980
+ "application/dash-patch+xml": ["mpp"],
3981
+ "application/davmount+xml": ["davmount"],
3982
+ "application/dicom": ["dcm"],
3983
+ "application/docbook+xml": ["dbk"],
3984
+ "application/dssc+der": ["dssc"],
3985
+ "application/dssc+xml": ["xdssc"],
3986
+ "application/ecmascript": ["ecma"],
3987
+ "application/emma+xml": ["emma"],
3988
+ "application/emotionml+xml": ["emotionml"],
3989
+ "application/epub+zip": ["epub"],
3990
+ "application/exi": ["exi"],
3991
+ "application/express": ["exp"],
3992
+ "application/fdf": ["fdf"],
3993
+ "application/fdt+xml": ["fdt"],
3994
+ "application/font-tdpfr": ["pfr"],
3995
+ "application/geo+json": ["geojson"],
3996
+ "application/gml+xml": ["gml"],
3997
+ "application/gpx+xml": ["gpx"],
3998
+ "application/gxf": ["gxf"],
3999
+ "application/gzip": ["gz"],
4000
+ "application/hjson": ["hjson"],
4001
+ "application/hyperstudio": ["stk"],
4002
+ "application/inkml+xml": ["ink", "inkml"],
4003
+ "application/ipfix": ["ipfix"],
4004
+ "application/its+xml": ["its"],
4005
+ "application/java-archive": ["jar", "war", "ear"],
4006
+ "application/java-serialized-object": ["ser"],
4007
+ "application/java-vm": ["class"],
4008
+ "application/javascript": ["*js"],
4009
+ "application/json": ["json", "map"],
4010
+ "application/json5": ["json5"],
4011
+ "application/jsonml+json": ["jsonml"],
4012
+ "application/ld+json": ["jsonld"],
4013
+ "application/lgr+xml": ["lgr"],
4014
+ "application/lost+xml": ["lostxml"],
4015
+ "application/mac-binhex40": ["hqx"],
4016
+ "application/mac-compactpro": ["cpt"],
4017
+ "application/mads+xml": ["mads"],
4018
+ "application/manifest+json": ["webmanifest"],
4019
+ "application/marc": ["mrc"],
4020
+ "application/marcxml+xml": ["mrcx"],
4021
+ "application/mathematica": ["ma", "nb", "mb"],
4022
+ "application/mathml+xml": ["mathml"],
4023
+ "application/mbox": ["mbox"],
4024
+ "application/media-policy-dataset+xml": ["mpf"],
4025
+ "application/mediaservercontrol+xml": ["mscml"],
4026
+ "application/metalink+xml": ["metalink"],
4027
+ "application/metalink4+xml": ["meta4"],
4028
+ "application/mets+xml": ["mets"],
4029
+ "application/mmt-aei+xml": ["maei"],
4030
+ "application/mmt-usd+xml": ["musd"],
4031
+ "application/mods+xml": ["mods"],
4032
+ "application/mp21": ["m21", "mp21"],
4033
+ "application/mp4": ["*mp4", "*mpg4", "mp4s", "m4p"],
4034
+ "application/msix": ["msix"],
4035
+ "application/msixbundle": ["msixbundle"],
4036
+ "application/msword": ["doc", "dot"],
4037
+ "application/mxf": ["mxf"],
4038
+ "application/n-quads": ["nq"],
4039
+ "application/n-triples": ["nt"],
4040
+ "application/node": ["cjs"],
4041
+ "application/octet-stream": [
4042
+ "bin",
4043
+ "dms",
4044
+ "lrf",
4045
+ "mar",
4046
+ "so",
4047
+ "dist",
4048
+ "distz",
4049
+ "pkg",
4050
+ "bpk",
4051
+ "dump",
4052
+ "elc",
4053
+ "deploy",
4054
+ "exe",
4055
+ "dll",
4056
+ "deb",
4057
+ "dmg",
4058
+ "iso",
4059
+ "img",
4060
+ "msi",
4061
+ "msp",
4062
+ "msm",
4063
+ "buffer"
4064
+ ],
4065
+ "application/oda": ["oda"],
4066
+ "application/oebps-package+xml": ["opf"],
4067
+ "application/ogg": ["ogx"],
4068
+ "application/omdoc+xml": ["omdoc"],
4069
+ "application/onenote": [
4070
+ "onetoc",
4071
+ "onetoc2",
4072
+ "onetmp",
4073
+ "onepkg",
4074
+ "one",
4075
+ "onea"
4076
+ ],
4077
+ "application/oxps": ["oxps"],
4078
+ "application/p2p-overlay+xml": ["relo"],
4079
+ "application/patch-ops-error+xml": ["xer"],
4080
+ "application/pdf": ["pdf"],
4081
+ "application/pgp-encrypted": ["pgp"],
4082
+ "application/pgp-keys": ["asc"],
4083
+ "application/pgp-signature": ["sig", "*asc"],
4084
+ "application/pics-rules": ["prf"],
4085
+ "application/pkcs10": ["p10"],
4086
+ "application/pkcs7-mime": ["p7m", "p7c"],
4087
+ "application/pkcs7-signature": ["p7s"],
4088
+ "application/pkcs8": ["p8"],
4089
+ "application/pkix-attr-cert": ["ac"],
4090
+ "application/pkix-cert": ["cer"],
4091
+ "application/pkix-crl": ["crl"],
4092
+ "application/pkix-pkipath": ["pkipath"],
4093
+ "application/pkixcmp": ["pki"],
4094
+ "application/pls+xml": ["pls"],
4095
+ "application/postscript": ["ai", "eps", "ps"],
4096
+ "application/provenance+xml": ["provx"],
4097
+ "application/pskc+xml": ["pskcxml"],
4098
+ "application/raml+yaml": ["raml"],
4099
+ "application/rdf+xml": ["rdf", "owl"],
4100
+ "application/reginfo+xml": ["rif"],
4101
+ "application/relax-ng-compact-syntax": ["rnc"],
4102
+ "application/resource-lists+xml": ["rl"],
4103
+ "application/resource-lists-diff+xml": ["rld"],
4104
+ "application/rls-services+xml": ["rs"],
4105
+ "application/route-apd+xml": ["rapd"],
4106
+ "application/route-s-tsid+xml": ["sls"],
4107
+ "application/route-usd+xml": ["rusd"],
4108
+ "application/rpki-ghostbusters": ["gbr"],
4109
+ "application/rpki-manifest": ["mft"],
4110
+ "application/rpki-roa": ["roa"],
4111
+ "application/rsd+xml": ["rsd"],
4112
+ "application/rss+xml": ["rss"],
4113
+ "application/rtf": ["rtf"],
4114
+ "application/sbml+xml": ["sbml"],
4115
+ "application/scvp-cv-request": ["scq"],
4116
+ "application/scvp-cv-response": ["scs"],
4117
+ "application/scvp-vp-request": ["spq"],
4118
+ "application/scvp-vp-response": ["spp"],
4119
+ "application/sdp": ["sdp"],
4120
+ "application/senml+xml": ["senmlx"],
4121
+ "application/sensml+xml": ["sensmlx"],
4122
+ "application/set-payment-initiation": ["setpay"],
4123
+ "application/set-registration-initiation": ["setreg"],
4124
+ "application/shf+xml": ["shf"],
4125
+ "application/sieve": ["siv", "sieve"],
4126
+ "application/smil+xml": ["smi", "smil"],
4127
+ "application/sparql-query": ["rq"],
4128
+ "application/sparql-results+xml": ["srx"],
4129
+ "application/sql": ["sql"],
4130
+ "application/srgs": ["gram"],
4131
+ "application/srgs+xml": ["grxml"],
4132
+ "application/sru+xml": ["sru"],
4133
+ "application/ssdl+xml": ["ssdl"],
4134
+ "application/ssml+xml": ["ssml"],
4135
+ "application/swid+xml": ["swidtag"],
4136
+ "application/tei+xml": ["tei", "teicorpus"],
4137
+ "application/thraud+xml": ["tfi"],
4138
+ "application/timestamped-data": ["tsd"],
4139
+ "application/toml": ["toml"],
4140
+ "application/trig": ["trig"],
4141
+ "application/ttml+xml": ["ttml"],
4142
+ "application/ubjson": ["ubj"],
4143
+ "application/urc-ressheet+xml": ["rsheet"],
4144
+ "application/urc-targetdesc+xml": ["td"],
4145
+ "application/voicexml+xml": ["vxml"],
4146
+ "application/wasm": ["wasm"],
4147
+ "application/watcherinfo+xml": ["wif"],
4148
+ "application/widget": ["wgt"],
4149
+ "application/winhlp": ["hlp"],
4150
+ "application/wsdl+xml": ["wsdl"],
4151
+ "application/wspolicy+xml": ["wspolicy"],
4152
+ "application/xaml+xml": ["xaml"],
4153
+ "application/xcap-att+xml": ["xav"],
4154
+ "application/xcap-caps+xml": ["xca"],
4155
+ "application/xcap-diff+xml": ["xdf"],
4156
+ "application/xcap-el+xml": ["xel"],
4157
+ "application/xcap-ns+xml": ["xns"],
4158
+ "application/xenc+xml": ["xenc"],
4159
+ "application/xfdf": ["xfdf"],
4160
+ "application/xhtml+xml": ["xhtml", "xht"],
4161
+ "application/xliff+xml": ["xlf"],
4162
+ "application/xml": ["xml", "xsl", "xsd", "rng"],
4163
+ "application/xml-dtd": ["dtd"],
4164
+ "application/xop+xml": ["xop"],
4165
+ "application/xproc+xml": ["xpl"],
4166
+ "application/xslt+xml": ["*xsl", "xslt"],
4167
+ "application/xspf+xml": ["xspf"],
4168
+ "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"],
4169
+ "application/yang": ["yang"],
4170
+ "application/yin+xml": ["yin"],
4171
+ "application/zip": ["zip"],
4172
+ "application/zip+dotlottie": ["lottie"],
4173
+ "audio/3gpp": ["*3gpp"],
4174
+ "audio/aac": ["adts", "aac"],
4175
+ "audio/adpcm": ["adp"],
4176
+ "audio/amr": ["amr"],
4177
+ "audio/basic": ["au", "snd"],
4178
+ "audio/midi": ["mid", "midi", "kar", "rmi"],
4179
+ "audio/mobile-xmf": ["mxmf"],
4180
+ "audio/mp3": ["*mp3"],
4181
+ "audio/mp4": ["m4a", "mp4a", "m4b"],
4182
+ "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"],
4183
+ "audio/ogg": ["oga", "ogg", "spx", "opus"],
4184
+ "audio/s3m": ["s3m"],
4185
+ "audio/silk": ["sil"],
4186
+ "audio/wav": ["wav"],
4187
+ "audio/wave": ["*wav"],
4188
+ "audio/webm": ["weba"],
4189
+ "audio/xm": ["xm"],
4190
+ "font/collection": ["ttc"],
4191
+ "font/otf": ["otf"],
4192
+ "font/ttf": ["ttf"],
4193
+ "font/woff": ["woff"],
4194
+ "font/woff2": ["woff2"],
4195
+ "image/aces": ["exr"],
4196
+ "image/apng": ["apng"],
4197
+ "image/avci": ["avci"],
4198
+ "image/avcs": ["avcs"],
4199
+ "image/avif": ["avif"],
4200
+ "image/bmp": ["bmp", "dib"],
4201
+ "image/cgm": ["cgm"],
4202
+ "image/dicom-rle": ["drle"],
4203
+ "image/dpx": ["dpx"],
4204
+ "image/emf": ["emf"],
4205
+ "image/fits": ["fits"],
4206
+ "image/g3fax": ["g3"],
4207
+ "image/gif": ["gif"],
4208
+ "image/heic": ["heic"],
4209
+ "image/heic-sequence": ["heics"],
4210
+ "image/heif": ["heif"],
4211
+ "image/heif-sequence": ["heifs"],
4212
+ "image/hej2k": ["hej2"],
4213
+ "image/ief": ["ief"],
4214
+ "image/jaii": ["jaii"],
4215
+ "image/jais": ["jais"],
4216
+ "image/jls": ["jls"],
4217
+ "image/jp2": ["jp2", "jpg2"],
4218
+ "image/jpeg": ["jpg", "jpeg", "jpe"],
4219
+ "image/jph": ["jph"],
4220
+ "image/jphc": ["jhc"],
4221
+ "image/jpm": ["jpm", "jpgm"],
4222
+ "image/jpx": ["jpx", "jpf"],
4223
+ "image/jxl": ["jxl"],
4224
+ "image/jxr": ["jxr"],
4225
+ "image/jxra": ["jxra"],
4226
+ "image/jxrs": ["jxrs"],
4227
+ "image/jxs": ["jxs"],
4228
+ "image/jxsc": ["jxsc"],
4229
+ "image/jxsi": ["jxsi"],
4230
+ "image/jxss": ["jxss"],
4231
+ "image/ktx": ["ktx"],
4232
+ "image/ktx2": ["ktx2"],
4233
+ "image/pjpeg": ["jfif"],
4234
+ "image/png": ["png"],
4235
+ "image/sgi": ["sgi"],
4236
+ "image/svg+xml": ["svg", "svgz"],
4237
+ "image/t38": ["t38"],
4238
+ "image/tiff": ["tif", "tiff"],
4239
+ "image/tiff-fx": ["tfx"],
4240
+ "image/webp": ["webp"],
4241
+ "image/wmf": ["wmf"],
4242
+ "message/disposition-notification": ["disposition-notification"],
4243
+ "message/global": ["u8msg"],
4244
+ "message/global-delivery-status": ["u8dsn"],
4245
+ "message/global-disposition-notification": ["u8mdn"],
4246
+ "message/global-headers": ["u8hdr"],
4247
+ "message/rfc822": ["eml", "mime", "mht", "mhtml"],
4248
+ "model/3mf": ["3mf"],
4249
+ "model/gltf+json": ["gltf"],
4250
+ "model/gltf-binary": ["glb"],
4251
+ "model/iges": ["igs", "iges"],
4252
+ "model/jt": ["jt"],
4253
+ "model/mesh": ["msh", "mesh", "silo"],
4254
+ "model/mtl": ["mtl"],
4255
+ "model/obj": ["obj"],
4256
+ "model/prc": ["prc"],
4257
+ "model/step": ["step", "stp", "stpnc", "p21", "210"],
4258
+ "model/step+xml": ["stpx"],
4259
+ "model/step+zip": ["stpz"],
4260
+ "model/step-xml+zip": ["stpxz"],
4261
+ "model/stl": ["stl"],
4262
+ "model/u3d": ["u3d"],
4263
+ "model/vrml": ["wrl", "vrml"],
4264
+ "model/x3d+binary": ["*x3db", "x3dbz"],
4265
+ "model/x3d+fastinfoset": ["x3db"],
4266
+ "model/x3d+vrml": ["*x3dv", "x3dvz"],
4267
+ "model/x3d+xml": ["x3d", "x3dz"],
4268
+ "model/x3d-vrml": ["x3dv"],
4269
+ "text/cache-manifest": ["appcache", "manifest"],
4270
+ "text/calendar": ["ics", "ifb"],
4271
+ "text/coffeescript": ["coffee", "litcoffee"],
4272
+ "text/css": ["css"],
4273
+ "text/csv": ["csv"],
4274
+ "text/html": ["html", "htm", "shtml"],
4275
+ "text/jade": ["jade"],
4276
+ "text/javascript": ["js", "mjs"],
4277
+ "text/jsx": ["jsx"],
4278
+ "text/less": ["less"],
4279
+ "text/markdown": ["md", "markdown"],
4280
+ "text/mathml": ["mml"],
4281
+ "text/mdx": ["mdx"],
4282
+ "text/n3": ["n3"],
4283
+ "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"],
4284
+ "text/richtext": ["rtx"],
4285
+ "text/rtf": ["*rtf"],
4286
+ "text/sgml": ["sgml", "sgm"],
4287
+ "text/shex": ["shex"],
4288
+ "text/slim": ["slim", "slm"],
4289
+ "text/spdx": ["spdx"],
4290
+ "text/stylus": ["stylus", "styl"],
4291
+ "text/tab-separated-values": ["tsv"],
4292
+ "text/troff": ["t", "tr", "roff", "man", "me", "ms"],
4293
+ "text/turtle": ["ttl"],
4294
+ "text/uri-list": ["uri", "uris", "urls"],
4295
+ "text/vcard": ["vcard"],
4296
+ "text/vtt": ["vtt"],
4297
+ "text/wgsl": ["wgsl"],
4298
+ "text/xml": ["*xml"],
4299
+ "text/yaml": ["yaml", "yml"],
4300
+ "video/3gpp": ["3gp", "3gpp"],
4301
+ "video/3gpp2": ["3g2"],
4302
+ "video/h261": ["h261"],
4303
+ "video/h263": ["h263"],
4304
+ "video/h264": ["h264"],
4305
+ "video/iso.segment": ["m4s"],
4306
+ "video/jpeg": ["jpgv"],
4307
+ "video/jpm": ["*jpm", "*jpgm"],
4308
+ "video/mj2": ["mj2", "mjp2"],
4309
+ "video/mp2t": ["ts", "m2t", "m2ts", "mts"],
4310
+ "video/mp4": ["mp4", "mp4v", "mpg4"],
4311
+ "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"],
4312
+ "video/ogg": ["ogv"],
4313
+ "video/quicktime": ["qt", "mov"],
4314
+ "video/webm": ["webm"]
4315
+ };
4316
+ Object.freeze(types2);
4317
+ var standard_default = types2;
4318
+
4319
+ // node_modules/mime/dist/src/Mime.js
4320
+ var __classPrivateFieldGet = function(receiver, state, kind, f) {
4321
+ if (kind === "a" && !f)
4322
+ throw new TypeError("Private accessor was defined without a getter");
4323
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
4324
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
4325
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
4326
+ };
4327
+ var _Mime_extensionToType;
4328
+ var _Mime_typeToExtension;
4329
+ var _Mime_typeToExtensions;
4330
+
4331
+ class Mime {
4332
+ constructor(...args) {
4333
+ _Mime_extensionToType.set(this, new Map);
4334
+ _Mime_typeToExtension.set(this, new Map);
4335
+ _Mime_typeToExtensions.set(this, new Map);
4336
+ for (const arg of args) {
4337
+ this.define(arg);
4279
4338
  }
4280
- const answer = await prompt(`
4281
- Proceed with push on [${options.env}]? (y/N): `);
4282
- if (!isExplicitYes(answer)) {
4283
- console.log("✋ Aborted.");
4284
- return;
4339
+ }
4340
+ define(typeMap, force = false) {
4341
+ for (let [type, extensions] of Object.entries(typeMap)) {
4342
+ type = type.toLowerCase();
4343
+ extensions = extensions.map((ext) => ext.toLowerCase());
4344
+ if (!__classPrivateFieldGet(this, _Mime_typeToExtensions, "f").has(type)) {
4345
+ __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").set(type, new Set);
4346
+ }
4347
+ const allExtensions = __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type);
4348
+ let first = true;
4349
+ for (let extension of extensions) {
4350
+ const starred = extension.startsWith("*");
4351
+ extension = starred ? extension.slice(1) : extension;
4352
+ allExtensions?.add(extension);
4353
+ if (first) {
4354
+ __classPrivateFieldGet(this, _Mime_typeToExtension, "f").set(type, extension);
4355
+ }
4356
+ first = false;
4357
+ if (starred)
4358
+ continue;
4359
+ const currentType = __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(extension);
4360
+ if (currentType && currentType != type && !force) {
4361
+ throw new Error(`"${type} -> ${extension}" conflicts with "${currentType} -> ${extension}". Pass \`force=true\` to override this definition.`);
4362
+ }
4363
+ __classPrivateFieldGet(this, _Mime_extensionToType, "f").set(extension, type);
4364
+ }
4285
4365
  }
4366
+ return this;
4286
4367
  }
4287
- await patchWebappConfig({
4288
- env: options.env,
4289
- details: fileDetails,
4290
- webappId: options.webappId,
4291
- url: options.url,
4292
- host: options.host,
4293
- port: options.port
4294
- });
4295
- console.log(`
4296
- Webapp config pushed.`);
4297
- }
4298
- async function checkConfigDriftOnDeploy(options) {
4299
- const fileName = options.file || DEFAULT_CONFIG_FILE;
4300
- const filePath = resolve2(process.cwd(), fileName);
4301
- if (!existsSync5(filePath))
4302
- return;
4303
- if (!process.env.WEBAPP_ID) {
4304
- console.warn(`
4305
- ⚠️ Skipping config drift check: WEBAPP_ID is not set.`);
4306
- return;
4368
+ getType(path3) {
4369
+ if (typeof path3 !== "string")
4370
+ return null;
4371
+ const last = path3.replace(/^.*[/\\]/s, "").toLowerCase();
4372
+ const ext = last.replace(/^.*\./s, "").toLowerCase();
4373
+ const hasPath = last.length < path3.length;
4374
+ const hasDot = ext.length < last.length - 1;
4375
+ if (!hasDot && hasPath)
4376
+ return null;
4377
+ return __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(ext) ?? null;
4307
4378
  }
4308
- let fileDetails;
4309
- try {
4310
- fileDetails = readConfigFile(filePath);
4311
- } catch (error) {
4312
- const message = error instanceof Error ? error.message : String(error);
4313
- console.warn(`
4314
- ⚠️ Skipping config drift check: ${message}`);
4315
- return;
4379
+ getExtension(type) {
4380
+ if (typeof type !== "string")
4381
+ return null;
4382
+ type = type?.split?.(";")[0];
4383
+ return (type && __classPrivateFieldGet(this, _Mime_typeToExtension, "f").get(type.trim().toLowerCase())) ?? null;
4316
4384
  }
4317
- let current;
4318
- try {
4319
- const raw = await fetchWebappConfig({
4320
- env: options.env,
4321
- host: options.host,
4322
- port: options.port
4323
- });
4324
- current = unwrapDetails(raw);
4325
- } catch (error) {
4326
- const message = error instanceof Error ? error.message : String(error);
4327
- console.warn(`
4328
- ⚠️ Could not check config drift: ${message}`);
4329
- return;
4385
+ getAllExtensions(type) {
4386
+ if (typeof type !== "string")
4387
+ return null;
4388
+ return __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").get(type.toLowerCase()) ?? null;
4330
4389
  }
4331
- const deltas = computeDetailsDelta(current, fileDetails);
4332
- if (deltas.length === 0)
4333
- return;
4334
- console.log(`
4335
- \uD83D\uDCDD ${fileName} differs from the CMS:`);
4336
- console.log(formatObjectDelta(deltas, `Config drift on [${options.env}]`));
4337
- const tty = !!process.stdin.isTTY && !!process.stdout.isTTY;
4338
- let shouldPush = options.pushConfig === true;
4339
- if (!shouldPush) {
4340
- if (!tty) {
4341
- console.log(`
4342
- ℹ️ ${fileName} differs from CMS — run 'ro app config push' to sync, or deploy with --push-config.`);
4343
- return;
4390
+ _freeze() {
4391
+ this.define = () => {
4392
+ throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances");
4393
+ };
4394
+ Object.freeze(this);
4395
+ for (const extensions of __classPrivateFieldGet(this, _Mime_typeToExtensions, "f").values()) {
4396
+ Object.freeze(extensions);
4344
4397
  }
4345
- const answer = await prompt(`
4346
- Push ${fileName} to the CMS now? (y/N): `);
4347
- shouldPush = isExplicitYes(answer);
4348
- }
4349
- if (!shouldPush) {
4350
- console.log(`
4351
- ↷ Skipped. Run 'ro app config push' later to sync.`);
4352
- return;
4398
+ return this;
4353
4399
  }
4354
- try {
4355
- await patchWebappConfig({
4356
- env: options.env,
4357
- details: fileDetails,
4358
- host: options.host,
4359
- port: options.port
4360
- });
4361
- console.log("✅ Webapp config pushed.");
4362
- } catch (error) {
4363
- const message = error instanceof Error ? error.message : String(error);
4364
- console.warn(`
4365
- ⚠️ Config push failed (deploy still succeeded): ${message}`);
4366
- console.warn(" Retry with: ro app config push");
4400
+ _getTestState() {
4401
+ return {
4402
+ types: __classPrivateFieldGet(this, _Mime_extensionToType, "f"),
4403
+ extensions: __classPrivateFieldGet(this, _Mime_typeToExtension, "f")
4404
+ };
4367
4405
  }
4368
4406
  }
4407
+ _Mime_extensionToType = new WeakMap, _Mime_typeToExtension = new WeakMap, _Mime_typeToExtensions = new WeakMap;
4408
+ var Mime_default = Mime;
4409
+
4410
+ // node_modules/mime/dist/src/index.js
4411
+ var src_default = new Mime_default(standard_default, other_default)._freeze();
4369
4412
 
4370
4413
  // src/sync-widget-manifest.ts
4371
4414
  import { existsSync as existsSync6, readFileSync as readFileSync5 } from "node:fs";
@@ -4877,7 +4920,7 @@ async function deploy(env = "development", overrides = {}) {
4877
4920
  }
4878
4921
 
4879
4922
  // src/global-config.ts
4880
- import { existsSync as existsSync8, readFileSync as readFileSync7, writeFileSync as writeFileSync5 } from "node:fs";
4923
+ import { existsSync as existsSync8, readFileSync as readFileSync7, writeFileSync as writeFileSync6 } from "node:fs";
4881
4924
  import { resolve as resolve4 } from "node:path";
4882
4925
  var PROD_ENV = "production";
4883
4926
  function applyMergePatch(target, patch) {
@@ -5018,7 +5061,7 @@ ${pretty(payload)}`);
5018
5061
  const text = pretty(payload);
5019
5062
  if (options.out) {
5020
5063
  const outPath = resolve4(process.cwd(), options.out);
5021
- writeFileSync5(outPath, `${text}
5064
+ writeFileSync6(outPath, `${text}
5022
5065
  `, "utf-8");
5023
5066
  console.log(`✅ Wrote global config to ${outPath}`);
5024
5067
  } else {
@@ -5113,7 +5156,7 @@ async function patchGlobalConfig(options) {
5113
5156
  }
5114
5157
 
5115
5158
  // src/group.ts
5116
- import { writeFileSync as writeFileSync6 } from "node:fs";
5159
+ import { writeFileSync as writeFileSync7 } from "node:fs";
5117
5160
  import { resolve as resolve5 } from "node:path";
5118
5161
  var PROD_ENV2 = "production";
5119
5162
  var ENTITY_TYPES = ["webapp", "character", "scene", "story"];
@@ -5204,7 +5247,7 @@ ${pretty(payload)}`);
5204
5247
  function emitRead(payload, human, options) {
5205
5248
  if (options.out) {
5206
5249
  const outPath = resolve5(process.cwd(), options.out);
5207
- writeFileSync6(outPath, `${pretty(payload)}
5250
+ writeFileSync7(outPath, `${pretty(payload)}
5208
5251
  `, "utf-8");
5209
5252
  console.log(`✅ Wrote response to ${outPath}`);
5210
5253
  return;
@@ -5271,6 +5314,106 @@ async function removeFromGroup(groupId, options) {
5271
5314
  // src/promote.ts
5272
5315
  import { existsSync as existsSync9, readFileSync as readFileSync8 } from "node:fs";
5273
5316
  import { resolve as resolve6 } from "node:path";
5317
+
5318
+ // src/release.ts
5319
+ var WEBAPP_TYPES = [
5320
+ "RO_APP",
5321
+ "RO_APP_REMOTE",
5322
+ "VIBED_APP",
5323
+ "STORY_GAME",
5324
+ "UTILITY",
5325
+ "APP_MISSION",
5326
+ "ADMIN_TOOL",
5327
+ "CHAT_APP",
5328
+ "1TO1_CHAT_APP",
5329
+ "STORY_APP",
5330
+ "HIDDEN_APP",
5331
+ "CMS_APP",
5332
+ "TEMP_APP"
5333
+ ];
5334
+ var RELEASE_URLS = {
5335
+ local: "http://localhost:5176/api/cli/webapps/release",
5336
+ development: "https://development-cms.rodyssey.ai/api/cli/webapps/release",
5337
+ staging: "https://staging-cms.rodyssey.ai/api/cli/webapps/release",
5338
+ production: "https://cms.rodyssey.ai/api/cli/webapps/release"
5339
+ };
5340
+ function parseWebappType(raw) {
5341
+ if (WEBAPP_TYPES.includes(raw)) {
5342
+ return raw;
5343
+ }
5344
+ throw new Error(`--type must be one of: ${WEBAPP_TYPES.join(", ")}`);
5345
+ }
5346
+ function resolveWebappId3(webappId) {
5347
+ const resolved = webappId || process.env.WEBAPP_ID;
5348
+ if (!resolved) {
5349
+ throw new Error("WEBAPP_ID is not set. Pass --webapp-id or set it in your .env file.");
5350
+ }
5351
+ return resolved;
5352
+ }
5353
+ function ensureDeployToken3(env) {
5354
+ if (process.env.DEPLOY_TOKEN)
5355
+ return process.env.DEPLOY_TOKEN;
5356
+ throw new Error(`DEPLOY_TOKEN is not set. Please check your .env or .env.${env} file.`);
5357
+ }
5358
+ function resolveReleaseUrl(env, url) {
5359
+ const resolved = url || RELEASE_URLS[env];
5360
+ if (!resolved) {
5361
+ throw new Error(`Unknown environment: "${env}". Use one of: ${Object.keys(RELEASE_URLS).join(", ")}, or pass --url.`);
5362
+ }
5363
+ return resolved;
5364
+ }
5365
+ async function releaseWebapp(options) {
5366
+ loadEnv(options.env);
5367
+ const appType = parseWebappType(options.type ?? "RO_APP");
5368
+ const webappId = resolveWebappId3(options.webappId);
5369
+ console.log(`\uD83D\uDE80 Release webapp ${webappId} as [${appType}] on [${options.env}]`);
5370
+ if (options.dryRun) {
5371
+ console.log(dim(`
5372
+ ↷ Dry run — no request sent.`));
5373
+ return;
5374
+ }
5375
+ const tty = !!process.stdin.isTTY && !!process.stdout.isTTY;
5376
+ if (!options.yes) {
5377
+ if (!tty) {
5378
+ throw new Error("Refusing to release in non-interactive mode. Pass --yes to confirm or --dry-run to preview.");
5379
+ }
5380
+ const answer = await prompt(`
5381
+ Proceed with release on [${options.env}]? (y/N): `);
5382
+ if (!isExplicitYes(answer)) {
5383
+ console.log("✋ Aborted.");
5384
+ return;
5385
+ }
5386
+ }
5387
+ const token = ensureDeployToken3(options.env);
5388
+ const url = resolveReleaseUrl(options.env, options.url);
5389
+ const response = await fetch(url, {
5390
+ method: "PATCH",
5391
+ headers: {
5392
+ Accept: "application/json",
5393
+ "Content-Type": "application/json",
5394
+ Authorization: `Bearer ${token}`
5395
+ },
5396
+ body: JSON.stringify({ webappId, appType })
5397
+ });
5398
+ let payload;
5399
+ try {
5400
+ payload = await response.json();
5401
+ } catch {
5402
+ throw new Error(`${response.status} ${response.statusText} (no JSON body)`);
5403
+ }
5404
+ if (!response.ok) {
5405
+ throw new Error(`PATCH ${url} failed: ${response.status} ${response.statusText}
5406
+ ${pretty(payload)}`);
5407
+ }
5408
+ if (options.json) {
5409
+ console.log(pretty(payload));
5410
+ return;
5411
+ }
5412
+ console.log(`
5413
+ ✅ Released as ${appType}.`);
5414
+ }
5415
+
5416
+ // src/promote.ts
5274
5417
  var DEFAULT_SOURCE_ENV = "development";
5275
5418
  var PROD_ENV3 = "production";
5276
5419
  var PROD_ENV_FILE = ".env.production";
@@ -5380,6 +5523,27 @@ Deploy to production now? (y/N): `);
5380
5523
  process.env.DEPLOY_TOKEN = deployToken;
5381
5524
  await deploy(PROD_ENV3, { skipConfigCheck: true });
5382
5525
  }
5526
+ async function maybeReleaseWebapp(options, webappId, deployToken) {
5527
+ const releaseType = options.releaseType ?? "RO_APP";
5528
+ const releaseRequested = options.release === true || options.releaseType !== undefined;
5529
+ if (!releaseRequested) {
5530
+ if (!process.stdin.isTTY || !process.stdout.isTTY)
5531
+ return;
5532
+ const answer = await prompt2(`
5533
+ Release as [${releaseType}] on ${PROD_ENV3}? (y/N): `);
5534
+ if (!isExplicitYes2(answer)) {
5535
+ console.log(`
5536
+ ↷ Skipping release. Run later with:
5537
+
5538
+ ro app release --type ${releaseType} -e production
5539
+ `);
5540
+ return;
5541
+ }
5542
+ }
5543
+ process.env.WEBAPP_ID = webappId;
5544
+ process.env.DEPLOY_TOKEN = deployToken;
5545
+ await releaseWebapp({ env: PROD_ENV3, type: releaseType, yes: true });
5546
+ }
5383
5547
  async function promote(options) {
5384
5548
  assertDeployOptions(options);
5385
5549
  loadEnv();
@@ -5471,11 +5635,12 @@ ${JSON.stringify(payload, null, 2)}`);
5471
5635
  console.log(`✅ Wrote WEBAPP_ID and DEPLOY_TOKEN to ${PROD_ENV_FILE}`);
5472
5636
  console.log(`\uD83D\uDCCD Webapp ID: ${webappId}`);
5473
5637
  await maybeDeployProduction(options, webappId, deployToken);
5638
+ await maybeReleaseWebapp(options, webappId, deployToken);
5474
5639
  }
5475
5640
 
5476
5641
  // src/upgrade-template.ts
5477
5642
  import { execSync as execSync3 } from "node:child_process";
5478
- import { existsSync as existsSync10, readFileSync as readFileSync9, writeFileSync as writeFileSync7, mkdirSync as mkdirSync2, copyFileSync, rmSync as rmSync2 } from "node:fs";
5643
+ import { existsSync as existsSync10, readFileSync as readFileSync9, writeFileSync as writeFileSync8, mkdirSync as mkdirSync2, copyFileSync, rmSync as rmSync2 } from "node:fs";
5479
5644
  import path3 from "node:path";
5480
5645
  var TEMPLATES = {
5481
5646
  webapp: {
@@ -5621,7 +5786,7 @@ function updatePackageJsonScripts(template) {
5621
5786
  console.log(` \uD83D\uDCDD ${change.action} script: "${change.name}"`);
5622
5787
  }
5623
5788
  if (result.updated) {
5624
- writeFileSync7(pkgPath, JSON.stringify(pkg, null, 2) + `
5789
+ writeFileSync8(pkgPath, JSON.stringify(pkg, null, 2) + `
5625
5790
  `, "utf-8");
5626
5791
  console.log(`✅ package.json scripts updated
5627
5792
  `);
@@ -5677,7 +5842,7 @@ function ensureBuildScript() {
5677
5842
  return;
5678
5843
  }
5679
5844
  pkg.scripts.build = result.script;
5680
- writeFileSync7(pkgPath, JSON.stringify(pkg, null, 2) + `
5845
+ writeFileSync8(pkgPath, JSON.stringify(pkg, null, 2) + `
5681
5846
  `, "utf-8");
5682
5847
  console.log(` \uD83D\uDCDD Added "vite build --mode server-scripts" to the build script`);
5683
5848
  }
@@ -6003,7 +6168,7 @@ function splitBatches(entries, sizeOf) {
6003
6168
  batches.push(current);
6004
6169
  return batches;
6005
6170
  }
6006
- function ensureDeployToken3(env) {
6171
+ function ensureDeployToken4(env) {
6007
6172
  if (process.env.DEPLOY_TOKEN)
6008
6173
  return process.env.DEPLOY_TOKEN;
6009
6174
  throw new Error(`DEPLOY_TOKEN is not set. Please check your .env or .env.${env} file.`);
@@ -6025,7 +6190,7 @@ async function pushAssets(inputs, options) {
6025
6190
  ↷ Dry run — no request sent.`));
6026
6191
  return;
6027
6192
  }
6028
- const token = ensureDeployToken3(options.env);
6193
+ const token = ensureDeployToken4(options.env);
6029
6194
  const uploaded = [];
6030
6195
  for (const [index, batch] of batches.entries()) {
6031
6196
  const formData = new FormData;
@@ -6186,7 +6351,7 @@ app.command("create").argument("<project-name>", "Name of the project to create"
6186
6351
  createUrl: options.createUrl
6187
6352
  });
6188
6353
  });
6189
- app.command("promote").description("Promote the current webapp to production (creates a prod record with the same WEBAPP_ID)").option("--details <json-or-file>", "Full WebappDetails JSON object or path to a JSON file. Skips the source-pull and confirmation prompts when provided.").option("-y, --yes", "Auto-accept pulling the latest details from development").option("--cms-url <url>", "Production CMS base URL. Defaults to the production environment").option("--promote-url <url>", "Full CMS promote endpoint. Defaults to <cms-url>/api/cli/webapps/promote").option("--from <env>", "Source environment to pull details from (testing override). Defaults to development", "development").option("--deploy", "Deploy to production immediately after promotion").option("--skip-deploy", "Do not ask to deploy after promotion").action(async (options) => {
6354
+ app.command("promote").description("Promote the current webapp to production (creates a prod record with the same WEBAPP_ID)").option("--details <json-or-file>", "Full WebappDetails JSON object or path to a JSON file. Skips the source-pull and confirmation prompts when provided.").option("-y, --yes", "Auto-accept pulling the latest details from development").option("--cms-url <url>", "Production CMS base URL. Defaults to the production environment").option("--promote-url <url>", "Full CMS promote endpoint. Defaults to <cms-url>/api/cli/webapps/promote").option("--from <env>", "Source environment to pull details from (testing override). Defaults to development", "development").option("--deploy", "Deploy to production immediately after promotion").option("--skip-deploy", "Do not ask to deploy after promotion").option("--release", "Set the app type on production after promotion (default type: RO_APP)").option("--release-type <appType>", `App type to set on release (implies --release). One of: ${WEBAPP_TYPES.join(", ")}`).action(async (options) => {
6190
6355
  await promote({
6191
6356
  details: options.details,
6192
6357
  yes: options.yes,
@@ -6194,7 +6359,9 @@ app.command("promote").description("Promote the current webapp to production (cr
6194
6359
  promoteUrl: options.promoteUrl,
6195
6360
  from: options.from,
6196
6361
  deploy: options.deploy,
6197
- skipDeploy: options.skipDeploy
6362
+ skipDeploy: options.skipDeploy,
6363
+ release: options.release,
6364
+ releaseType: options.releaseType
6198
6365
  });
6199
6366
  });
6200
6367
  app.command("update-game-sdk").description("Download and update the GameSDK library, types, and documentation").action(async () => {
@@ -6219,6 +6386,9 @@ addConfigTargetOptions(config.command("pull").description("Pull the CMS webapp c
6219
6386
  addConfigTargetOptions(config.command("push").description("Push webapp.config.json back to the CMS (previews a diff and confirms)").option("--file <path>", "Config file to push (default: webapp.config.json)").option("--dry-run", "Preview the delta without sending").option("-y, --yes", "Skip the confirmation prompt")).action(async (options) => {
6220
6387
  await pushWebappConfig(options);
6221
6388
  });
6389
+ app.command("release").description("Set the webapp app type (e.g. promote a TEMP_APP to RO_APP)").option("--type <appType>", "App type to set (default: RO_APP)").option("-e, --env <environment>", "Target environment (local | development | staging | production)", "development").option("--webapp-id <id>", "Override WEBAPP_ID from .env").option("--url <url>", "Override the release endpoint URL").option("--dry-run", "Preview the release without sending").option("-y, --yes", "Skip confirmation prompt").option("--json", "Print the raw JSON result").action(async (options) => {
6390
+ await releaseWebapp(options);
6391
+ });
6222
6392
  var assets = app.command("assets").description("Manage webapp assets (R2-hosted files)");
6223
6393
  assets.command("push").description("Upload or overwrite webapp assets and print their public URLs").argument("<paths...>", "Files and/or directories to upload").option("--dest <remote-dir>", "Remote directory prefix (e.g. images)").option("-e, --env <environment>", "Target environment (local | development | staging | production)", "development").option("--url <url>", "Override the assets endpoint URL").option("--host <host>", "Override the assets endpoint host").option("--port <port>", "Override the assets endpoint port", parseInt).option("--dry-run", "Preview the local→remote mapping without uploading").option("--json", "Print the raw JSON result").action(async (paths, options) => {
6224
6394
  await pushAssets(paths, options);