revojs 0.1.48 → 0.1.49

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.
@@ -598,11 +598,11 @@ var App = class extends Hookable {
598
598
  },
599
599
  sources: {
600
600
  routes: {
601
- match: "**/{get,head,post,put,delete,connect,options,trace,patch}.{js,ts}",
601
+ match: ["**/{get,head,post,put,delete,connect,options,trace,patch}.{js,ts}", "!*.d.ts"],
602
602
  entries: ["./routes"]
603
603
  },
604
604
  middleware: {
605
- match: "**/*.{js,ts}",
605
+ match: ["**/*.{js,ts}", "!*.d.ts"],
606
606
  entries: ["./middleware"]
607
607
  }
608
608
  },
@@ -1,6 +1,34 @@
1
1
  #!/usr/bin/env node
2
- import { n as version, t as name } from "../package-BHwUvHq6.mjs";
2
+ import { n as version, t as name } from "../package-CL2E27Tm.mjs";
3
3
  import { defineCommand, runMain } from "citty";
4
+ import { copyFileSync, mkdirSync } from "fs";
5
+ import { dirname, join, relative } from "path";
6
+ import { rolldown } from "rolldown";
7
+ import { dts } from "rolldown-plugin-dts";
8
+ import { glob } from "tinyglobby";
9
+ //#endregion
10
+ //#region src/commands/module/index.ts
11
+ var module_default = defineCommand({ subCommands: { build: defineCommand({ async setup() {
12
+ await (await rolldown({
13
+ input: await glob(["./src/**/*.{js,ts}", "!./src/**/*.d.ts"]),
14
+ plugins: [dts()],
15
+ external: () => true
16
+ })).write({
17
+ cleanDir: true,
18
+ preserveModules: true,
19
+ sanitizeFileName: false
20
+ });
21
+ for (const file of await glob([
22
+ "./src/**/*.*",
23
+ "!./src/**/*.js",
24
+ "!./src/**/!(*.d).ts"
25
+ ])) {
26
+ const target = join("./dist", relative("./src", file));
27
+ mkdirSync(dirname(target), { recursive: true });
28
+ copyFileSync(file, target);
29
+ }
30
+ } }) } });
31
+ //#endregion
4
32
  //#region src/commands/run/index.ts
5
33
  var run_default = defineCommand({ setup() {} });
6
34
  //#endregion
@@ -10,7 +38,10 @@ runMain(defineCommand({
10
38
  name,
11
39
  version
12
40
  },
13
- subCommands: { run: run_default }
41
+ subCommands: {
42
+ module: module_default,
43
+ run: run_default
44
+ }
14
45
  }));
15
46
  //#endregion
16
47
  export {};
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as useHeaders, A as encodings, B as sendCreated, C as WILDCARD, D as createServer, E as cookieSameSites, F as isServer, G as sendRedirect, H as sendNoContent, I as mimeType, J as setCookie, K as sendResponse, L as mimeTypes, M as httpMethods, N as invoke, O as defineMiddleware, P as isClient, Q as useCookies, R as parseCookiePair, S as STATES, T as cookiePriorities, U as sendNotFound, V as sendForbidden, W as sendOk, X as statusCodes, Y as setState, Z as useBody, _ as PARAMETER_MATCH, a as Hookable, at as useUrl, b as Router, c as defineHook, d as parseSchema, et as useParameters, f as OPTIONAL_PARAMETER, g as PARAMETER, h as OPTIONAL_WILDCARD_MATCH, i as SERVER, it as useSetCookies, j as getState, k as defineRoute, l as isFailure, m as OPTIONAL_WILDCARD, n as CLIENT, nt as useRouter, o as Scope, ot as withQuery, p as OPTIONAL_PARAMETER_MATCH, q as sendUnauthorized, r as CLOSE_HOOK, rt as useServer, s as defineContext, t as App, tt as useQuery, u as mergeObjects, v as ROUTER_CONTEXT, w as WILDCARD_MATCH, x as SERVER_CONTEXT, y as Radix, z as sendBadRequest } from "./app-DqEq3uwt.mjs";
1
+ import { $ as useHeaders, A as encodings, B as sendCreated, C as WILDCARD, D as createServer, E as cookieSameSites, F as isServer, G as sendRedirect, H as sendNoContent, I as mimeType, J as setCookie, K as sendResponse, L as mimeTypes, M as httpMethods, N as invoke, O as defineMiddleware, P as isClient, Q as useCookies, R as parseCookiePair, S as STATES, T as cookiePriorities, U as sendNotFound, V as sendForbidden, W as sendOk, X as statusCodes, Y as setState, Z as useBody, _ as PARAMETER_MATCH, a as Hookable, at as useUrl, b as Router, c as defineHook, d as parseSchema, et as useParameters, f as OPTIONAL_PARAMETER, g as PARAMETER, h as OPTIONAL_WILDCARD_MATCH, i as SERVER, it as useSetCookies, j as getState, k as defineRoute, l as isFailure, m as OPTIONAL_WILDCARD, n as CLIENT, nt as useRouter, o as Scope, ot as withQuery, p as OPTIONAL_PARAMETER_MATCH, q as sendUnauthorized, r as CLOSE_HOOK, rt as useServer, s as defineContext, t as App, tt as useQuery, u as mergeObjects, v as ROUTER_CONTEXT, w as WILDCARD_MATCH, x as SERVER_CONTEXT, y as Radix, z as sendBadRequest } from "./app-BMQ38K-1.mjs";
2
2
  import assets from "#assets";
3
3
  //#region src/client/index.ts
4
4
  async function $fetch(scope, input, options) {
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
2
  var name = "revojs";
3
- var version = "0.1.48";
3
+ var version = "0.1.49";
4
4
  //#endregion
5
5
  export { version as n, name as t };
@@ -1,11 +1,11 @@
1
- import { I as mimeType, N as invoke, n as CLIENT, o as Scope, r as CLOSE_HOOK, t as App, u as mergeObjects, x as SERVER_CONTEXT } from "../app-DqEq3uwt.mjs";
2
- import { n as version, t as name } from "../package-BHwUvHq6.mjs";
1
+ import { I as mimeType, N as invoke, n as CLIENT, o as Scope, r as CLOSE_HOOK, t as App, u as mergeObjects, x as SERVER_CONTEXT } from "../app-BMQ38K-1.mjs";
2
+ import { n as version, t as name } from "../package-CL2E27Tm.mjs";
3
3
  import { addTemplate, addTypes, addVirtual, useKit } from "../kit/index.mjs";
4
- import { basename, dirname, isAbsolute, join, posix, resolve, win32 } from "path";
5
4
  import { mkdirSync, readFileSync, rmSync, statSync, writeFileSync } from "fs";
6
- import { cwd } from "process";
5
+ import { basename, dirname, isAbsolute, join, posix, resolve, win32 } from "path";
7
6
  import { globSync } from "tinyglobby";
8
- import { isRunnableDevEnvironment, mergeConfig } from "vite";
7
+ import { cwd } from "process";
8
+ import { isRunnableDevEnvironment } from "vite";
9
9
  import { once } from "events";
10
10
  import { Readable } from "stream";
11
11
  //#region src/vite/node/index.ts
@@ -202,7 +202,7 @@ async function revojs(config) {
202
202
  mkdirSync(dirname(path), { recursive: true });
203
203
  writeFileSync(path, await app.config.templates[template]());
204
204
  }
205
- return mergeConfig({
205
+ return mergeObjects({
206
206
  appType: "custom",
207
207
  optimizeDeps: { exclude: ["revojs"] },
208
208
  build: { emptyOutDir: false },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revojs",
3
- "version": "0.1.48",
3
+ "version": "0.1.49",
4
4
  "license": "MIT",
5
5
  "repository": "tellua/revojs",
6
6
  "bin": {
@@ -37,6 +37,8 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "citty": "^0.2.2",
40
+ "rolldown": "^1.0.0-rc.12",
41
+ "rolldown-plugin-dts": "^0.23.2",
40
42
  "tinyglobby": "^0.2.15",
41
43
  "vite": "^8.0.3"
42
44
  },