one 1.1.311 → 1.1.312

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. package/dist/cjs/cleanUrl.cjs +3 -8
  2. package/dist/cjs/cleanUrl.cjs.map +2 -2
  3. package/dist/cjs/cleanUrl.native.js +5 -8
  4. package/dist/cjs/cleanUrl.native.js.map +2 -2
  5. package/dist/cjs/cli.cjs +0 -2
  6. package/dist/cjs/cli.cjs.map +1 -1
  7. package/dist/cjs/cli.native.js +1 -2
  8. package/dist/cjs/cli.native.js.map +2 -2
  9. package/dist/cjs/config.cjs +1 -1
  10. package/dist/cjs/config.native.js +1 -1
  11. package/dist/cjs/config.native.js.map +1 -1
  12. package/dist/cjs/constants.cjs +9 -1
  13. package/dist/cjs/constants.cjs.map +1 -1
  14. package/dist/cjs/constants.native.js +9 -1
  15. package/dist/cjs/constants.native.js.map +2 -2
  16. package/dist/cjs/createApp.native.cjs +1 -1
  17. package/dist/cjs/createApp.native.js +1 -1
  18. package/dist/cjs/createApp.native.js.map +1 -1
  19. package/dist/cjs/createHandleRequest.cjs +2 -1
  20. package/dist/cjs/createHandleRequest.cjs.map +1 -1
  21. package/dist/cjs/createHandleRequest.native.js +2 -2
  22. package/dist/cjs/createHandleRequest.native.js.map +2 -2
  23. package/dist/cjs/matchers.cjs +1 -1
  24. package/dist/cjs/matchers.cjs.map +1 -1
  25. package/dist/cjs/matchers.native.js +1 -1
  26. package/dist/cjs/matchers.native.js.map +1 -1
  27. package/dist/cjs/serve.cjs +3 -3
  28. package/dist/cjs/serve.cjs.map +1 -1
  29. package/dist/cjs/serve.native.js +2 -2
  30. package/dist/cjs/serve.native.js.map +2 -2
  31. package/dist/cjs/useLoader.cjs +1 -1
  32. package/dist/cjs/useLoader.native.js +1 -1
  33. package/dist/cjs/vite/build.cjs +2 -2
  34. package/dist/cjs/vite/build.cjs.map +1 -1
  35. package/dist/cjs/vite/build.native.js +1 -1
  36. package/dist/cjs/vite/build.native.js.map +1 -1
  37. package/dist/cjs/vite/clientTreeShakePlugin.cjs +1 -1
  38. package/dist/cjs/vite/clientTreeShakePlugin.native.js +1 -1
  39. package/dist/cjs/vite/createFileSystemRouter.cjs +1 -1
  40. package/dist/cjs/vite/createFileSystemRouter.native.js +1 -1
  41. package/dist/cjs/vite/one.cjs +43 -14
  42. package/dist/cjs/vite/one.cjs.map +1 -1
  43. package/dist/cjs/vite/one.native.js +39 -12
  44. package/dist/cjs/vite/one.native.js.map +2 -2
  45. package/dist/cjs/vite/virtualEntryPlugin.cjs +5 -5
  46. package/dist/cjs/vite/virtualEntryPlugin.native.js +5 -5
  47. package/dist/cjs/vite/virtualEntryPlugin.native.js.map +1 -1
  48. package/dist/cjs/vite/vitePluginSsrCss.cjs +1 -1
  49. package/dist/cjs/vite/vitePluginSsrCss.native.js +1 -1
  50. package/dist/esm/cleanUrl.js +10 -9
  51. package/dist/esm/cleanUrl.js.map +1 -1
  52. package/dist/esm/cleanUrl.mjs +4 -9
  53. package/dist/esm/cleanUrl.mjs.map +1 -1
  54. package/dist/esm/cleanUrl.native.js +5 -9
  55. package/dist/esm/cleanUrl.native.js.map +2 -2
  56. package/dist/esm/cli.js +0 -2
  57. package/dist/esm/cli.js.map +1 -1
  58. package/dist/esm/cli.mjs +0 -2
  59. package/dist/esm/cli.mjs.map +1 -1
  60. package/dist/esm/cli.native.js +0 -2
  61. package/dist/esm/cli.native.js.map +2 -2
  62. package/dist/esm/config.js +1 -1
  63. package/dist/esm/config.mjs +1 -1
  64. package/dist/esm/config.mjs.map +1 -1
  65. package/dist/esm/config.native.js +1 -1
  66. package/dist/esm/config.native.js.map +1 -1
  67. package/dist/esm/constants.js +5 -1
  68. package/dist/esm/constants.js.map +1 -1
  69. package/dist/esm/constants.mjs +6 -2
  70. package/dist/esm/constants.mjs.map +1 -1
  71. package/dist/esm/constants.native.js +5 -1
  72. package/dist/esm/constants.native.js.map +2 -2
  73. package/dist/esm/createApp.native.js +1 -1
  74. package/dist/esm/createApp.native.js.map +1 -1
  75. package/dist/esm/createHandleRequest.js +2 -1
  76. package/dist/esm/createHandleRequest.js.map +1 -1
  77. package/dist/esm/createHandleRequest.mjs +2 -1
  78. package/dist/esm/createHandleRequest.mjs.map +1 -1
  79. package/dist/esm/createHandleRequest.native.js +2 -1
  80. package/dist/esm/createHandleRequest.native.js.map +2 -2
  81. package/dist/esm/matchers.js +1 -1
  82. package/dist/esm/matchers.js.map +1 -1
  83. package/dist/esm/matchers.mjs +1 -1
  84. package/dist/esm/matchers.mjs.map +1 -1
  85. package/dist/esm/matchers.native.js +1 -1
  86. package/dist/esm/matchers.native.js.map +1 -1
  87. package/dist/esm/serve.js +4 -4
  88. package/dist/esm/serve.js.map +1 -1
  89. package/dist/esm/serve.mjs +4 -4
  90. package/dist/esm/serve.mjs.map +1 -1
  91. package/dist/esm/serve.native.js +4 -4
  92. package/dist/esm/serve.native.js.map +2 -2
  93. package/dist/esm/useLoader.js +1 -1
  94. package/dist/esm/useLoader.mjs +1 -1
  95. package/dist/esm/useLoader.native.js +1 -1
  96. package/dist/esm/vite/build.js +1 -1
  97. package/dist/esm/vite/build.js.map +1 -1
  98. package/dist/esm/vite/build.mjs +1 -1
  99. package/dist/esm/vite/build.mjs.map +1 -1
  100. package/dist/esm/vite/build.native.js +1 -1
  101. package/dist/esm/vite/build.native.js.map +2 -2
  102. package/dist/esm/vite/clientTreeShakePlugin.js +1 -1
  103. package/dist/esm/vite/clientTreeShakePlugin.mjs +1 -1
  104. package/dist/esm/vite/clientTreeShakePlugin.native.js +1 -1
  105. package/dist/esm/vite/createFileSystemRouter.js +1 -1
  106. package/dist/esm/vite/createFileSystemRouter.mjs +1 -1
  107. package/dist/esm/vite/createFileSystemRouter.native.js +1 -1
  108. package/dist/esm/vite/one.js +43 -14
  109. package/dist/esm/vite/one.js.map +1 -1
  110. package/dist/esm/vite/one.mjs +43 -14
  111. package/dist/esm/vite/one.mjs.map +1 -1
  112. package/dist/esm/vite/one.native.js +41 -14
  113. package/dist/esm/vite/one.native.js.map +2 -2
  114. package/dist/esm/vite/virtualEntryPlugin.js +5 -5
  115. package/dist/esm/vite/virtualEntryPlugin.mjs +5 -5
  116. package/dist/esm/vite/virtualEntryPlugin.mjs.map +1 -1
  117. package/dist/esm/vite/virtualEntryPlugin.native.js +5 -5
  118. package/dist/esm/vite/virtualEntryPlugin.native.js.map +1 -1
  119. package/dist/esm/vite/vitePluginSsrCss.js +1 -1
  120. package/dist/esm/vite/vitePluginSsrCss.mjs +1 -1
  121. package/dist/esm/vite/vitePluginSsrCss.native.js +1 -1
  122. package/package.json +8 -8
  123. package/src/cleanUrl.ts +10 -14
  124. package/src/cli.ts +0 -3
  125. package/src/config.ts +1 -1
  126. package/src/constants.ts +6 -0
  127. package/src/createApp.native.tsx +2 -2
  128. package/src/createHandleRequest.ts +2 -1
  129. package/src/matchers.ts +1 -1
  130. package/src/serve.ts +5 -3
  131. package/src/useLoader.ts +1 -1
  132. package/src/vite/build.ts +2 -1
  133. package/src/vite/clientTreeShakePlugin.ts +1 -1
  134. package/src/vite/createFileSystemRouter.tsx +1 -1
  135. package/src/vite/one.ts +44 -11
  136. package/src/vite/virtualEntryPlugin.ts +5 -5
  137. package/src/vite/vitePluginSsrCss.ts +1 -1
  138. package/types/cleanUrl.d.ts.map +1 -1
  139. package/types/constants.d.ts +4 -0
  140. package/types/constants.d.ts.map +1 -1
  141. package/types/createHandleRequest.d.ts.map +1 -1
  142. package/types/serve.d.ts.map +1 -1
  143. package/types/vite/build.d.ts.map +1 -1
  144. package/types/vite/one.d.ts.map +1 -1
  145. package/dist/cjs/router/constants.cjs +0 -26
  146. package/dist/cjs/router/constants.cjs.map +0 -6
  147. package/dist/cjs/router/constants.native.js +0 -26
  148. package/dist/cjs/router/constants.native.js.map +0 -6
  149. package/dist/cjs/vite/loadEnv.cjs +0 -47
  150. package/dist/cjs/vite/loadEnv.cjs.map +0 -6
  151. package/dist/cjs/vite/loadEnv.native.js +0 -44
  152. package/dist/cjs/vite/loadEnv.native.js.map +0 -6
  153. package/dist/esm/router/constants.js +0 -5
  154. package/dist/esm/router/constants.js.map +0 -6
  155. package/dist/esm/router/constants.mjs +0 -3
  156. package/dist/esm/router/constants.mjs.map +0 -1
  157. package/dist/esm/router/constants.native.js +0 -5
  158. package/dist/esm/router/constants.native.js.map +0 -6
  159. package/dist/esm/vite/loadEnv.js +0 -13
  160. package/dist/esm/vite/loadEnv.js.map +0 -6
  161. package/dist/esm/vite/loadEnv.mjs +0 -13
  162. package/dist/esm/vite/loadEnv.mjs.map +0 -1
  163. package/dist/esm/vite/loadEnv.native.js +0 -16
  164. package/dist/esm/vite/loadEnv.native.js.map +0 -6
  165. package/src/router/constants.ts +0 -4
  166. package/src/vite/loadEnv.ts +0 -11
  167. package/types/router/constants.d.ts +0 -2
  168. package/types/router/constants.d.ts.map +0 -1
  169. package/types/vite/loadEnv.d.ts +0 -2
  170. package/types/vite/loadEnv.d.ts.map +0 -1
@@ -1,44 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: !0 });
10
- }, __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from == "object" || typeof from == "function")
12
- for (let key of __getOwnPropNames(from))
13
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- return to;
15
- };
16
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
- // If the importer is in node compatibility mode or this is not an ESM
18
- // file that has been converted to a CommonJS file using a Babel-
19
- // compatible transform (i.e. "__esModule" has not been set), then set
20
- // "default" to the CommonJS "module.exports" for node compatibility.
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
22
- mod
23
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
24
- var loadEnv_exports = {};
25
- __export(loadEnv_exports, {
26
- loadEnv: () => loadEnv
27
- });
28
- module.exports = __toCommonJS(loadEnv_exports);
29
- var import_node_fs = __toESM(require("node:fs"), 1), import_node_path = __toESM(require("node:path"), 1);
30
- async function loadEnv(root) {
31
- var envPath = import_node_path.default.join(root, ".env");
32
- if (import_node_fs.default.existsSync(envPath)) {
33
- var dotenv = await import("dotenv"), result = dotenv.config({
34
- path: envPath
35
- });
36
- if (result.error) throw result.error;
37
- return !0;
38
- }
39
- }
40
- // Annotate the CommonJS export names for ESM import in node:
41
- 0 && (module.exports = {
42
- loadEnv
43
- });
44
- //# sourceMappingURL=loadEnv.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/loadEnv.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;qBAAe,gCACf,mBAAiB;AAEjB,eAAsBA,QAAQC,MAAY;AACxC,MAAMC,UAAUC,iBAAAA,QAAKC,KAAKH,MAAM,MAAA;AAChC,MAAKI,eAAAA,QAAGC,WAAWJ,OAAAA,GACnB;QAAMK,SAAS,MAAM,OAAO,QAAA,GACtBC,SAASD,OAAOE,OAAO;MAAEN,MAAMD;IAAQ,CAAA;AAC7C,QAAIM,OAAOE,MAAO,OAAMF,OAAOE;AAC/B,WAAO;;AACT;",
5
- "names": ["loadEnv", "root", "envPath", "path", "join", "fs", "existsSync", "dotenv", "result", "config", "error"]
6
- }
@@ -1,5 +0,0 @@
1
- const CACHE_KEY = `${Math.random()}`.slice(3);
2
- export {
3
- CACHE_KEY
4
- };
5
- //# sourceMappingURL=constants.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/router/constants.ts"],
4
- "mappings": "AAGO,MAAM,YAAY,GAAG,KAAK,OAAO,CAAC,GAAG,MAAM,CAAC;",
5
- "names": []
6
- }
@@ -1,3 +0,0 @@
1
- const CACHE_KEY = `${Math.random()}`.slice(3);
2
- export { CACHE_KEY };
3
- //# sourceMappingURL=constants.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CACHE_KEY","Math","random","slice"],"sources":["../../../src/router/constants.ts"],"sourcesContent":[null],"mappings":"AAGO,MAAMA,SAAA,GAAY,GAAGC,IAAA,CAAKC,MAAA,CAAO,CAAC,GAAGC,KAAA,CAAM,CAAC","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- var CACHE_KEY = `${Math.random()}`.slice(3);
2
- export {
3
- CACHE_KEY
4
- };
5
- //# sourceMappingURL=constants.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/router/Users/n8/one/packages/one/src/router/constants.ts"],
4
- "mappings": "AAGO,IAAMA,YAAY,GAAGC,KAAKC,OAAM,CAAA,GAAKC,MAAM,CAAA;",
5
- "names": ["CACHE_KEY", "Math", "random", "slice"]
6
- }
@@ -1,13 +0,0 @@
1
- import fs from "node:fs";
2
- import path from "node:path";
3
- async function loadEnv(root) {
4
- const envPath = path.join(root, ".env");
5
- if (!fs.existsSync(envPath)) return;
6
- const result = (await import("dotenv")).config({ path: envPath });
7
- if (result.error) throw result.error;
8
- return !0;
9
- }
10
- export {
11
- loadEnv
12
- };
13
- //# sourceMappingURL=loadEnv.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/vite/loadEnv.ts"],
4
- "mappings": "AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AAEjB,eAAsB,QAAQ,MAAc;AAC1C,QAAM,UAAU,KAAK,KAAK,MAAM,MAAM;AACtC,MAAI,CAAC,GAAG,WAAW,OAAO,EAAG;AAE7B,QAAM,UADS,MAAM,OAAO,QAAQ,GACd,OAAO,EAAE,MAAM,QAAQ,CAAC;AAC9C,MAAI,OAAO,MAAO,OAAM,OAAO;AAC/B,SAAO;AACT;",
5
- "names": []
6
- }
@@ -1,13 +0,0 @@
1
- import fs from "node:fs";
2
- import path from "node:path";
3
- async function loadEnv(root) {
4
- const envPath = path.join(root, ".env");
5
- if (!fs.existsSync(envPath)) return;
6
- const result = (await import("dotenv")).config({
7
- path: envPath
8
- });
9
- if (result.error) throw result.error;
10
- return !0;
11
- }
12
- export { loadEnv };
13
- //# sourceMappingURL=loadEnv.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["fs","path","loadEnv","root","envPath","join","existsSync","result","config","error"],"sources":["../../../src/vite/loadEnv.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,EAAA,MAAQ;AACf,OAAOC,IAAA,MAAU;AAEjB,eAAsBC,QAAQC,IAAA,EAAc;EAC1C,MAAMC,OAAA,GAAUH,IAAA,CAAKI,IAAA,CAAKF,IAAA,EAAM,MAAM;EACtC,IAAI,CAACH,EAAA,CAAGM,UAAA,CAAWF,OAAO,GAAG;EAE7B,MAAMG,MAAA,IADS,MAAM,OAAO,QAAQ,GACdC,MAAA,CAAO;IAAEP,IAAA,EAAMG;EAAQ,CAAC;EAC9C,IAAIG,MAAA,CAAOE,KAAA,EAAO,MAAMF,MAAA,CAAOE,KAAA;EAC/B,OAAO;AACT","ignoreList":[]}
@@ -1,16 +0,0 @@
1
- import fs from "node:fs";
2
- import path from "node:path";
3
- async function loadEnv(root) {
4
- var envPath = path.join(root, ".env");
5
- if (fs.existsSync(envPath)) {
6
- var dotenv = await import("dotenv"), result = dotenv.config({
7
- path: envPath
8
- });
9
- if (result.error) throw result.error;
10
- return !0;
11
- }
12
- }
13
- export {
14
- loadEnv
15
- };
16
- //# sourceMappingURL=loadEnv.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/loadEnv.ts"],
4
- "mappings": "AAAA,OAAOA,QAAQ;AACf,OAAOC,UAAU;AAEjB,eAAsBC,QAAQC,MAAY;AACxC,MAAMC,UAAUH,KAAKI,KAAKF,MAAM,MAAA;AAChC,MAAKH,GAAGM,WAAWF,OAAAA,GACnB;QAAMG,SAAS,MAAM,OAAO,QAAA,GACtBC,SAASD,OAAOE,OAAO;MAAER,MAAMG;IAAQ,CAAA;AAC7C,QAAII,OAAOE,MAAO,OAAMF,OAAOE;AAC/B,WAAO;;AACT;",
5
- "names": ["fs", "path", "loadEnv", "root", "envPath", "join", "existsSync", "dotenv", "result", "config", "error"]
6
- }
@@ -1,4 +0,0 @@
1
- // for example we have loaders like _vxrn_loader.js safari caches things
2
- // aggressively so we want to have a search params that clears that cache
3
- // uniquely across deploys this will be unique per-deploy nicely:
4
- export const CACHE_KEY = `${Math.random()}`.slice(3)
@@ -1,11 +0,0 @@
1
- import fs from 'node:fs'
2
- import path from 'node:path'
3
-
4
- export async function loadEnv(root: string) {
5
- const envPath = path.join(root, '.env')
6
- if (!fs.existsSync(envPath)) return
7
- const dotenv = await import('dotenv')
8
- const result = dotenv.config({ path: envPath })
9
- if (result.error) throw result.error
10
- return true
11
- }
@@ -1,2 +0,0 @@
1
- export declare const CACHE_KEY: string;
2
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/router/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,QAA8B,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare function loadEnv(root: string): Promise<true | undefined>;
2
- //# sourceMappingURL=loadEnv.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loadEnv.d.ts","sourceRoot":"","sources":["../../src/vite/loadEnv.ts"],"names":[],"mappings":"AAGA,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,6BAOzC"}