revojs 0.1.25 → 0.1.27
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.
|
@@ -249,9 +249,9 @@ async function createServer() {
|
|
|
249
249
|
const middlewares = new Array();
|
|
250
250
|
const routes = await import("#virtual/routes").then((module) => Object.entries(module.default));
|
|
251
251
|
for (const [path, route] of routes) {
|
|
252
|
-
const segments = path.
|
|
252
|
+
const segments = path.split("/");
|
|
253
253
|
for (const attribute of segments.pop()?.split(".") ?? []) {
|
|
254
|
-
if (attribute === "
|
|
254
|
+
if (attribute === "js" || attribute === "ts") continue;
|
|
255
255
|
if (attribute === "get" || attribute === "post" || attribute === "put" || attribute === "delete" || attribute === "patch" || attribute === "options" || attribute === "head" || attribute === "trace" || attribute === "connect") segments.unshift(attribute);
|
|
256
256
|
else segments.push(attribute);
|
|
257
257
|
}
|
|
@@ -423,7 +423,7 @@ var App = class extends Hookable {
|
|
|
423
423
|
}
|
|
424
424
|
},
|
|
425
425
|
sources: { routes: {
|
|
426
|
-
match: "
|
|
426
|
+
match: "**/{get,head,post,put,delete,connect,options,trace,patch}.{js,ts}",
|
|
427
427
|
entries: ["./routes"]
|
|
428
428
|
} },
|
|
429
429
|
development: { middlewares: [] },
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as isClient, B as setCookie, C as WILDCARD, D as defineRoute, E as defineMiddleware, F as sendHtml, G as useRouter, H as useCookies, I as sendJson, J as useUrl, K as useServer, L as sendRedirect, M as mimeType, N as mimeTypes, O as getState, P as sendBadRequest, R as sendText, S as STATES, T as createServer, U as useHeaders, V as setState, W as useQuery, Y as withQuery, _ as PARAMETER_MATCH, a as Hookable, b as Router, c as defineHook, d as parseSchema, f as OPTIONAL_PARAMETER, g as PARAMETER, h as OPTIONAL_WILDCARD_MATCH, i as SERVER, j as isServer, k as invoke, l as isFailure, m as OPTIONAL_WILDCARD, n as CLIENT, o as Scope, p as OPTIONAL_PARAMETER_MATCH, q as useSetCookies, r as CLOSE_HOOK, s as defineContext, t as App, u as mergeObjects, v as ROUTER_CONTEXT, w as WILDCARD_MATCH, x as SERVER_CONTEXT, y as Radix, z as sendUnauthorized } from "./app-
|
|
1
|
+
import { A as isClient, B as setCookie, C as WILDCARD, D as defineRoute, E as defineMiddleware, F as sendHtml, G as useRouter, H as useCookies, I as sendJson, J as useUrl, K as useServer, L as sendRedirect, M as mimeType, N as mimeTypes, O as getState, P as sendBadRequest, R as sendText, S as STATES, T as createServer, U as useHeaders, V as setState, W as useQuery, Y as withQuery, _ as PARAMETER_MATCH, a as Hookable, b as Router, c as defineHook, d as parseSchema, f as OPTIONAL_PARAMETER, g as PARAMETER, h as OPTIONAL_WILDCARD_MATCH, i as SERVER, j as isServer, k as invoke, l as isFailure, m as OPTIONAL_WILDCARD, n as CLIENT, o as Scope, p as OPTIONAL_PARAMETER_MATCH, q as useSetCookies, r as CLOSE_HOOK, s as defineContext, t as App, u as mergeObjects, v as ROUTER_CONTEXT, w as WILDCARD_MATCH, x as SERVER_CONTEXT, y as Radix, z as sendUnauthorized } from "./app-CSa1GP_X.js";
|
|
2
2
|
|
|
3
3
|
//#region src/client/index.ts
|
|
4
4
|
async function $fetch(scope, input, options) {
|
package/dist/vite/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as SERVER, k as invoke, n as CLIENT, o as Scope, r as CLOSE_HOOK, t as App, x as SERVER_CONTEXT } from "../app-
|
|
1
|
+
import { i as SERVER, k as invoke, n as CLIENT, o as Scope, r as CLOSE_HOOK, t as App, x as SERVER_CONTEXT } from "../app-CSa1GP_X.js";
|
|
2
2
|
import { a as useKit, i as addVirtual, r as addTypes } from "../kit-BQv19une.js";
|
|
3
3
|
import { basename, isAbsolute, join, posix, resolve, win32 } from "path";
|
|
4
4
|
import { mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
|
|
@@ -10,7 +10,7 @@ import { Readable, Stream } from "stream";
|
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
12
|
var name = "revojs";
|
|
13
|
-
var version = "0.1.
|
|
13
|
+
var version = "0.1.27";
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region src/vite/node/index.ts
|