@marko/run 0.5.13 → 0.5.15

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.
@@ -1,5 +1,5 @@
1
1
  import type { Plugin, ResolvedConfig } from "vite";
2
- import type { Options, Adapter, PackageData } from "./types";
2
+ import type { Adapter, Options, PackageData } from "./types";
3
3
  export declare const defaultPort: number;
4
4
  export default function markoRun(opts?: Options): Plugin[];
5
5
  export declare function getPackageData(dir: string): Promise<PackageData | null>;
@@ -1,5 +1,5 @@
1
+ import type { PathInfo, RoutableFile, RoutableFileType } from "../types";
1
2
  import type { Path, Segment } from "./parse";
2
- import type { RoutableFile, RoutableFileType, PathInfo } from "../types";
3
3
  export default class VDir {
4
4
  #private;
5
5
  readonly parent: VDir | null;
@@ -1,8 +1,8 @@
1
- import type { RoutableFileType, HttpVerb, RoutableFileTypes } from "./constants";
2
1
  import type { Options as MarkoViteOptions } from "@marko/vite";
3
- import type { ResolvedConfig, UserConfig, InlineConfig } from "vite";
2
+ import type { InlineConfig, ResolvedConfig, UserConfig } from "vite";
3
+ import type { HttpVerb, RoutableFileType, RoutableFileTypes } from "./constants";
4
4
  import type { SpawnedServer } from "./utils/server";
5
- export type { RoutableFileType, HttpVerb };
5
+ export type { HttpVerb, RoutableFileType };
6
6
  export type StartServer = (port?: number) => Promise<void>;
7
7
  export interface AdapterConfig {
8
8
  root: string;
@@ -1,4 +1,4 @@
1
- import type { Options, AdapterConfig } from '../types';
1
+ import type { AdapterConfig, Options } from "../types";
2
2
  export declare const getExternalPluginOptions: <T>(viteConfig: T) => Readonly<Options> | undefined;
3
3
  export declare const setExternalPluginOptions: <T>(viteConfig: T, value: Options) => T;
4
4
  export declare const getExternalAdapterOptions: <T>(viteConfig: T) => Readonly<AdapterConfig> | undefined;
@@ -1,3 +1,3 @@
1
- import type { OutputBundle, NormalizedOutputOptions } from "rollup";
1
+ import type { NormalizedOutputOptions, OutputBundle } from "rollup";
2
2
  import type { BuiltRoutes } from "../types";
3
3
  export declare function logRoutesTable(routes: BuiltRoutes, bundle: OutputBundle, options: NormalizedOutputOptions): void;
@@ -1,3 +1,3 @@
1
1
  import type { HttpVerb, Route } from "../types";
2
- export declare function getVerbs(route: Route): ("get" | "post" | "put" | "delete")[];
3
- export declare function hasVerb(route: Route, verb: HttpVerb): boolean | import("../types").RoutableFile | undefined;
2
+ export declare function getVerbs(route: Route, noAutoHead?: boolean): HttpVerb[];
3
+ export declare function hasVerb(route: Route, verb: HttpVerb): boolean;
@@ -1,6 +1,6 @@
1
- import { type Socket } from "net";
2
1
  import { type ChildProcess, type StdioOptions } from "child_process";
3
2
  import { type Worker } from "cluster";
3
+ import { type Socket } from "net";
4
4
  export interface SpawnedServer {
5
5
  port: number;
6
6
  close(): Promise<void> | void;
package/package.json CHANGED
@@ -1,31 +1,18 @@
1
1
  {
2
2
  "name": "@marko/run",
3
- "version": "0.5.13",
3
+ "version": "0.5.15",
4
4
  "description": "The Marko application framework.",
5
- "license": "MIT",
5
+ "keywords": [
6
+ "marko"
7
+ ],
6
8
  "homepage": "https://github.com/marko-js/run/tree/main/packages/run",
7
- "logo": {
8
- "url": "https://github.com/marko-js/run/raw/main/assets/marko-run.png"
9
- },
10
9
  "repository": {
11
10
  "type": "git",
12
11
  "url": "https://github.com/marko-js/run.git"
13
12
  },
13
+ "license": "MIT",
14
14
  "author": "Ryan Turnquist <rturnq@gmail.com>",
15
- "keywords": [
16
- "marko"
17
- ],
18
15
  "type": "module",
19
- "bin": {
20
- "marko-run": "./dist/cli/index.mjs"
21
- },
22
- "scripts": {
23
- "test": "cross-env NODE_ENV=test mocha \"./src/**/__tests__/*.test.?(c)ts\"",
24
- "test:watch": "npm test -- --watch",
25
- "test:inspect": "npm test -- --inspect",
26
- "test:update": "npm test -- --update",
27
- "build": "rm -rf ./dist && tsc -b && tsx scripts/build.ts"
28
- },
29
16
  "exports": {
30
17
  ".": {
31
18
  "types": "./dist/runtime/index.d.ts",
@@ -56,40 +43,43 @@
56
43
  "require": "./dist/adapter/index.cjs"
57
44
  }
58
45
  },
59
- "typesVersions": {
60
- "*": {
61
- "*": [
62
- "./dist/runtime/index.d.ts"
63
- ],
64
- "namespace": [
65
- "./dist/runtime/namespace.d.ts"
66
- ],
67
- "router": [
68
- "./dist/runtime/router.d.ts"
69
- ],
70
- "vite": [
71
- "./dist/vite/index.d.ts"
72
- ],
73
- "adapter/middleware": [
74
- "./dist/adapter/middleware.d.ts"
75
- ],
76
- "adapter": [
77
- "./dist/adapter/index.d.ts"
78
- ]
79
- }
80
- },
81
46
  "types": "./dist/runtime/index.d.ts",
82
- "main": "./src/runtime/index.ts",
47
+ "bin": {
48
+ "marko-run": "./dist/cli/index.mjs"
49
+ },
83
50
  "files": [
84
51
  "dist"
85
52
  ],
86
- "peerDependencies": {
87
- "marko": "5 - 6"
53
+ "scripts": {
54
+ "build": "rm -rf ./dist && tsc -b && tsx scripts/build.ts"
55
+ },
56
+ "dependencies": {
57
+ "@marko/run-explorer": "^0.1.2",
58
+ "@marko/vite": "^5.0.10",
59
+ "browserslist": "^4.24.2",
60
+ "cli-table3": "^0.6.5",
61
+ "compression": "^1.7.5",
62
+ "debug": "^4.3.7",
63
+ "dotenv": "^16.4.5",
64
+ "draftlog": "^1.0.13",
65
+ "esbuild-plugin-browserslist": "^0.15.0",
66
+ "glob": "^11.0.0",
67
+ "human-format": "^1.2.1",
68
+ "kleur": "^4.1.5",
69
+ "parse-node-args": "^1.1.2",
70
+ "sade": "^1.8.1",
71
+ "serve-static": "^1.16.2",
72
+ "supports-color": "^9.4.0",
73
+ "undici": "^6.21.0",
74
+ "vite": "^6.0.0",
75
+ "warp10": "^2.1.0"
88
76
  },
89
77
  "devDependencies": {
90
78
  "@babel/types": "^7.26.0",
91
79
  "@marko/fixture-snapshots": "^2.2.1",
92
80
  "@marko/testing-library": "^6.2.0",
81
+ "@types/debug": "^4.1.12",
82
+ "@types/diff": "^7.0.0",
93
83
  "@types/glob": "^8.1.0",
94
84
  "@types/human-format": "^1.0.3",
95
85
  "@types/jsdom": "^21.1.7",
@@ -112,25 +102,32 @@
112
102
  "tsx": "^4.19.2",
113
103
  "typescript": "^5.7.2"
114
104
  },
115
- "dependencies": {
116
- "@marko/run-explorer": "^0.1.2",
117
- "@marko/vite": "^5.0.10",
118
- "browserslist": "^4.24.2",
119
- "cli-table3": "^0.6.5",
120
- "compression": "^1.7.5",
121
- "debug": "^4.3.7",
122
- "dotenv": "^16.4.5",
123
- "draftlog": "^1.0.13",
124
- "esbuild-plugin-browserslist": "^0.15.0",
125
- "glob": "^11.0.0",
126
- "human-format": "^1.2.1",
127
- "kleur": "^4.1.5",
128
- "parse-node-args": "^1.1.2",
129
- "sade": "^1.8.1",
130
- "serve-static": "^1.16.2",
131
- "supports-color": "^9.4.0",
132
- "undici": "^6.21.0",
133
- "vite": "^6.0.0",
134
- "warp10": "^2.1.0"
105
+ "peerDependencies": {
106
+ "marko": "5 - 6"
107
+ },
108
+ "logo": {
109
+ "url": "https://github.com/marko-js/run/raw/main/assets/marko-run.png"
110
+ },
111
+ "typesVersions": {
112
+ "*": {
113
+ "*": [
114
+ "./dist/runtime/index.d.ts"
115
+ ],
116
+ "namespace": [
117
+ "./dist/runtime/namespace.d.ts"
118
+ ],
119
+ "router": [
120
+ "./dist/runtime/router.d.ts"
121
+ ],
122
+ "vite": [
123
+ "./dist/vite/index.d.ts"
124
+ ],
125
+ "adapter/middleware": [
126
+ "./dist/adapter/middleware.d.ts"
127
+ ],
128
+ "adapter": [
129
+ "./dist/adapter/index.d.ts"
130
+ ]
131
+ }
135
132
  }
136
133
  }