one 1.1.311 → 1.1.313
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/cleanUrl.cjs +3 -8
- package/dist/cjs/cleanUrl.cjs.map +2 -2
- package/dist/cjs/cleanUrl.native.js +5 -8
- package/dist/cjs/cleanUrl.native.js.map +2 -2
- package/dist/cjs/cli.cjs +0 -2
- package/dist/cjs/cli.cjs.map +1 -1
- package/dist/cjs/cli.native.js +1 -2
- package/dist/cjs/cli.native.js.map +2 -2
- package/dist/cjs/config.cjs +1 -1
- package/dist/cjs/config.native.js +1 -1
- package/dist/cjs/config.native.js.map +1 -1
- package/dist/cjs/constants.cjs +9 -1
- package/dist/cjs/constants.cjs.map +1 -1
- package/dist/cjs/constants.native.js +9 -1
- package/dist/cjs/constants.native.js.map +2 -2
- package/dist/cjs/createApp.native.cjs +1 -1
- package/dist/cjs/createApp.native.js +1 -1
- package/dist/cjs/createApp.native.js.map +1 -1
- package/dist/cjs/createHandleRequest.cjs +2 -1
- package/dist/cjs/createHandleRequest.cjs.map +1 -1
- package/dist/cjs/createHandleRequest.native.js +2 -2
- package/dist/cjs/createHandleRequest.native.js.map +2 -2
- package/dist/cjs/matchers.cjs +1 -1
- package/dist/cjs/matchers.cjs.map +1 -1
- package/dist/cjs/matchers.native.js +1 -1
- package/dist/cjs/matchers.native.js.map +1 -1
- package/dist/cjs/serve.cjs +36 -22
- package/dist/cjs/serve.cjs.map +2 -2
- package/dist/cjs/serve.native.js +18 -19
- package/dist/cjs/serve.native.js.map +2 -2
- package/dist/cjs/useLoader.cjs +1 -1
- package/dist/cjs/useLoader.native.js +1 -1
- package/dist/cjs/vite/build.cjs +8 -4
- package/dist/cjs/vite/build.cjs.map +1 -1
- package/dist/cjs/vite/build.native.js +5 -2
- package/dist/cjs/vite/build.native.js.map +2 -2
- package/dist/cjs/vite/clientTreeShakePlugin.cjs +1 -1
- package/dist/cjs/vite/clientTreeShakePlugin.native.js +1 -1
- package/dist/cjs/vite/createFileSystemRouter.cjs +1 -1
- package/dist/cjs/vite/createFileSystemRouter.native.js +1 -1
- package/dist/cjs/vite/one.cjs +43 -14
- package/dist/cjs/vite/one.cjs.map +1 -1
- package/dist/cjs/vite/one.native.js +39 -12
- package/dist/cjs/vite/one.native.js.map +2 -2
- package/dist/cjs/vite/virtualEntryPlugin.cjs +5 -5
- package/dist/cjs/vite/virtualEntryPlugin.native.js +5 -5
- package/dist/cjs/vite/virtualEntryPlugin.native.js.map +1 -1
- package/dist/cjs/vite/vitePluginSsrCss.cjs +1 -1
- package/dist/cjs/vite/vitePluginSsrCss.native.js +1 -1
- package/dist/esm/cleanUrl.js +10 -9
- package/dist/esm/cleanUrl.js.map +1 -1
- package/dist/esm/cleanUrl.mjs +4 -9
- package/dist/esm/cleanUrl.mjs.map +1 -1
- package/dist/esm/cleanUrl.native.js +5 -9
- package/dist/esm/cleanUrl.native.js.map +2 -2
- package/dist/esm/cli.js +0 -2
- package/dist/esm/cli.js.map +1 -1
- package/dist/esm/cli.mjs +0 -2
- package/dist/esm/cli.mjs.map +1 -1
- package/dist/esm/cli.native.js +0 -2
- package/dist/esm/cli.native.js.map +2 -2
- package/dist/esm/config.js +1 -1
- package/dist/esm/config.mjs +1 -1
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/config.native.js +1 -1
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/constants.js +5 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/constants.mjs +6 -2
- package/dist/esm/constants.mjs.map +1 -1
- package/dist/esm/constants.native.js +5 -1
- package/dist/esm/constants.native.js.map +2 -2
- package/dist/esm/createApp.native.js +1 -1
- package/dist/esm/createApp.native.js.map +1 -1
- package/dist/esm/createHandleRequest.js +2 -1
- package/dist/esm/createHandleRequest.js.map +1 -1
- package/dist/esm/createHandleRequest.mjs +2 -1
- package/dist/esm/createHandleRequest.mjs.map +1 -1
- package/dist/esm/createHandleRequest.native.js +2 -1
- package/dist/esm/createHandleRequest.native.js.map +2 -2
- package/dist/esm/matchers.js +1 -1
- package/dist/esm/matchers.js.map +1 -1
- package/dist/esm/matchers.mjs +1 -1
- package/dist/esm/matchers.mjs.map +1 -1
- package/dist/esm/matchers.native.js +1 -1
- package/dist/esm/matchers.native.js.map +1 -1
- package/dist/esm/serve.js +12 -15
- package/dist/esm/serve.js.map +1 -1
- package/dist/esm/serve.mjs +30 -16
- package/dist/esm/serve.mjs.map +1 -1
- package/dist/esm/serve.native.js +13 -21
- package/dist/esm/serve.native.js.map +2 -2
- package/dist/esm/useLoader.js +1 -1
- package/dist/esm/useLoader.mjs +1 -1
- package/dist/esm/useLoader.native.js +1 -1
- package/dist/esm/vite/build.js +4 -2
- package/dist/esm/vite/build.js.map +1 -1
- package/dist/esm/vite/build.mjs +6 -2
- package/dist/esm/vite/build.mjs.map +1 -1
- package/dist/esm/vite/build.native.js +6 -2
- package/dist/esm/vite/build.native.js.map +2 -2
- package/dist/esm/vite/clientTreeShakePlugin.js +1 -1
- package/dist/esm/vite/clientTreeShakePlugin.mjs +1 -1
- package/dist/esm/vite/clientTreeShakePlugin.native.js +1 -1
- package/dist/esm/vite/createFileSystemRouter.js +1 -1
- package/dist/esm/vite/createFileSystemRouter.mjs +1 -1
- package/dist/esm/vite/createFileSystemRouter.native.js +1 -1
- package/dist/esm/vite/one.js +43 -14
- package/dist/esm/vite/one.js.map +1 -1
- package/dist/esm/vite/one.mjs +43 -14
- package/dist/esm/vite/one.mjs.map +1 -1
- package/dist/esm/vite/one.native.js +41 -14
- package/dist/esm/vite/one.native.js.map +2 -2
- package/dist/esm/vite/virtualEntryPlugin.js +5 -5
- package/dist/esm/vite/virtualEntryPlugin.mjs +5 -5
- package/dist/esm/vite/virtualEntryPlugin.mjs.map +1 -1
- package/dist/esm/vite/virtualEntryPlugin.native.js +5 -5
- package/dist/esm/vite/virtualEntryPlugin.native.js.map +1 -1
- package/dist/esm/vite/vitePluginSsrCss.js +1 -1
- package/dist/esm/vite/vitePluginSsrCss.mjs +1 -1
- package/dist/esm/vite/vitePluginSsrCss.native.js +1 -1
- package/package.json +8 -8
- package/src/cleanUrl.ts +10 -14
- package/src/cli.ts +0 -3
- package/src/config.ts +1 -1
- package/src/constants.ts +6 -0
- package/src/createApp.native.tsx +2 -2
- package/src/createHandleRequest.ts +2 -1
- package/src/matchers.ts +1 -1
- package/src/serve.ts +31 -16
- package/src/useLoader.ts +1 -1
- package/src/vite/build.ts +4 -1
- package/src/vite/clientTreeShakePlugin.ts +1 -1
- package/src/vite/createFileSystemRouter.tsx +1 -1
- package/src/vite/one.ts +44 -11
- package/src/vite/types.ts +5 -1
- package/src/vite/virtualEntryPlugin.ts +5 -5
- package/src/vite/vitePluginSsrCss.ts +1 -1
- package/types/cleanUrl.d.ts.map +1 -1
- package/types/constants.d.ts +4 -0
- package/types/constants.d.ts.map +1 -1
- package/types/createHandleRequest.d.ts.map +1 -1
- package/types/serve.d.ts.map +1 -1
- package/types/vite/build.d.ts.map +1 -1
- package/types/vite/one.d.ts.map +1 -1
- package/types/vite/types.d.ts +5 -1
- package/types/vite/types.d.ts.map +1 -1
- package/dist/cjs/router/constants.cjs +0 -26
- package/dist/cjs/router/constants.cjs.map +0 -6
- package/dist/cjs/router/constants.native.js +0 -26
- package/dist/cjs/router/constants.native.js.map +0 -6
- package/dist/cjs/vite/loadEnv.cjs +0 -47
- package/dist/cjs/vite/loadEnv.cjs.map +0 -6
- package/dist/cjs/vite/loadEnv.native.js +0 -44
- package/dist/cjs/vite/loadEnv.native.js.map +0 -6
- package/dist/esm/router/constants.js +0 -5
- package/dist/esm/router/constants.js.map +0 -6
- package/dist/esm/router/constants.mjs +0 -3
- package/dist/esm/router/constants.mjs.map +0 -1
- package/dist/esm/router/constants.native.js +0 -5
- package/dist/esm/router/constants.native.js.map +0 -6
- package/dist/esm/vite/loadEnv.js +0 -13
- package/dist/esm/vite/loadEnv.js.map +0 -6
- package/dist/esm/vite/loadEnv.mjs +0 -13
- package/dist/esm/vite/loadEnv.mjs.map +0 -1
- package/dist/esm/vite/loadEnv.native.js +0 -16
- package/dist/esm/vite/loadEnv.native.js.map +0 -6
- package/src/router/constants.ts +0 -4
- package/src/vite/loadEnv.ts +0 -11
- package/types/router/constants.d.ts +0 -2
- package/types/router/constants.d.ts.map +0 -1
- package/types/vite/loadEnv.d.ts +0 -2
- package/types/vite/loadEnv.d.ts.map +0 -1
@@ -27,19 +27,27 @@ __export(one_exports, {
|
|
27
27
|
one: () => one
|
28
28
|
});
|
29
29
|
module.exports = __toCommonJS(one_exports);
|
30
|
-
var import_node_events = __toESM(require("node:events"), 1), import_node_path = __toESM(require("node:path"), 1), import_vite = require("vite"), import_vite_tsconfig_paths = __toESM(require("vite-tsconfig-paths"), 1), import_vxrn = require("vxrn"),
|
30
|
+
var import_resolve = require("@vxrn/resolve"), import_node_events = __toESM(require("node:events"), 1), import_node_path = __toESM(require("node:path"), 1), import_vite = require("vite"), import_vite_tsconfig_paths = __toESM(require("vite-tsconfig-paths"), 1), import_vxrn = require("vxrn"), import_constants = require("../constants"), import_polyfills_server = require("../polyfills-server"), import_existsAsync = require("../utils/existsAsync"), import_clientTreeShakePlugin = require("./clientTreeShakePlugin"), import_createFileSystemRouter = require("./createFileSystemRouter"), import_ensureTsConfig = require("./ensureTsConfig"), import_fixDependenciesPlugin = require("./fixDependenciesPlugin"), import_generateTypesForRoutes = require("./generateTypesForRoutes"), import_virtualEntryPlugin = require("./virtualEntryPlugin"), import_vitePluginSsrCss = require("./vitePluginSsrCss");
|
31
31
|
import_node_events.default.setMaxListeners(1e3);
|
32
32
|
globalThis.__vxrnEnableNativeEnv = !0;
|
33
33
|
function one() {
|
34
34
|
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _options_config;
|
35
|
-
oneOptions = options, (
|
35
|
+
oneOptions = options, ((_options_config = options.config) === null || _options_config === void 0 ? void 0 : _options_config.ensureTSConfig) !== !1 && (0, import_ensureTsConfig.ensureTSConfig)(), globalThis.__vxrnPluginConfig__ = options;
|
36
36
|
var { optimizeDeps } = (0, import_vxrn.getOptimizeDeps)("build"), optimizeIds = optimizeDeps.include, optimizeIdRegex = new RegExp(
|
37
37
|
// santize ids for regex
|
38
38
|
// https://stackoverflow.com/questions/6300183/sanitize-string-of-regex-characters-before-regexp-build
|
39
39
|
`${optimizeIds.map(function(id) {
|
40
40
|
return id.replace(/[#-.]|[[-^]|[?|{}]/g, "\\$&");
|
41
41
|
}).join("|")}`
|
42
|
-
), tsConfigPathsPlugin = null, vxrnOptions = (0, import_vxrn.getOptionsFilled)(), devAndProdPlugins = [
|
42
|
+
), tsConfigPathsPlugin = null, vxrnOptions = (0, import_vxrn.getOptionsFilled)(), _vxrnOptions_mode, { clientEnvDefine } = (0, import_vxrn.loadEnv)((_vxrnOptions_mode = vxrnOptions == null ? void 0 : vxrnOptions.mode) !== null && _vxrnOptions_mode !== void 0 ? _vxrnOptions_mode : "development"), devAndProdPlugins = [
|
43
|
+
{
|
44
|
+
name: "one-define-env",
|
45
|
+
config() {
|
46
|
+
return {
|
47
|
+
define: clientEnvDefine
|
48
|
+
};
|
49
|
+
}
|
50
|
+
},
|
43
51
|
// proxy because you cant add a plugin inside a plugin
|
44
52
|
new Proxy({
|
45
53
|
name: "one:tsconfig-paths",
|
@@ -96,24 +104,40 @@ function one() {
|
|
96
104
|
return {
|
97
105
|
define: {
|
98
106
|
...((_options_web = options.web) === null || _options_web === void 0 ? void 0 : _options_web.defaultRenderMode) && {
|
99
|
-
"process.env.
|
107
|
+
"process.env.ONE_DEFAULT_RENDER_MODE": JSON.stringify(options.web.defaultRenderMode),
|
108
|
+
"import.meta.env.ONE_DEFAULT_RENDER_MODE": JSON.stringify(options.web.defaultRenderMode)
|
100
109
|
},
|
101
110
|
...options.setupFile && {
|
102
|
-
"process.env.
|
111
|
+
"process.env.ONE_SETUP_FILE": JSON.stringify(options.setupFile)
|
103
112
|
},
|
104
113
|
...process.env.NODE_ENV !== "production" && vxrnOptions && {
|
105
|
-
"process.env.ONE_SERVER_URL": JSON.stringify(vxrnOptions.server.url)
|
114
|
+
"process.env.ONE_SERVER_URL": JSON.stringify(vxrnOptions.server.url),
|
115
|
+
"import.meta.env.ONE_SERVER_URL": JSON.stringify(vxrnOptions.server.url)
|
106
116
|
}
|
107
117
|
},
|
108
118
|
environments: {
|
109
119
|
client: {
|
110
120
|
define: {
|
111
|
-
"process.env.VITE_ENVIRONMENT": '"client"'
|
121
|
+
"process.env.VITE_ENVIRONMENT": '"client"',
|
122
|
+
"import.meta.env.VITE_ENVIRONMENT": '"client"'
|
112
123
|
}
|
113
124
|
},
|
114
125
|
ssr: {
|
115
126
|
define: {
|
116
|
-
"process.env.VITE_ENVIRONMENT": '"ssr"'
|
127
|
+
"process.env.VITE_ENVIRONMENT": '"ssr"',
|
128
|
+
"import.meta.env.VITE_ENVIRONMENT": '"ssr"'
|
129
|
+
}
|
130
|
+
},
|
131
|
+
ios: {
|
132
|
+
define: {
|
133
|
+
"process.env.VITE_ENVIRONMENT": '"ios"',
|
134
|
+
"import.meta.env.VITE_ENVIRONMENT": '"ios"'
|
135
|
+
}
|
136
|
+
},
|
137
|
+
android: {
|
138
|
+
define: {
|
139
|
+
"process.env.VITE_ENVIRONMENT": '"android"',
|
140
|
+
"import.meta.env.VITE_ENVIRONMENT": '"android"'
|
117
141
|
}
|
118
142
|
}
|
119
143
|
}
|
@@ -174,19 +198,22 @@ function one() {
|
|
174
198
|
root: "app"
|
175
199
|
}),
|
176
200
|
{
|
177
|
-
name: "define-
|
201
|
+
name: "one-define-environment",
|
178
202
|
config() {
|
179
203
|
var _options_app;
|
180
204
|
if (!((_options_app = options.app) === null || _options_app === void 0) && _options_app.key)
|
181
205
|
return {
|
182
206
|
define: {
|
183
|
-
"process.env.
|
207
|
+
"process.env.ONE_APP_NAME": JSON.stringify(options.app.key),
|
208
|
+
"import.meta.env.ONE_APP_NAME": JSON.stringify(options.app.key),
|
209
|
+
"process.env.ONE_CACHE_KEY": JSON.stringify(import_constants.CACHE_KEY),
|
210
|
+
"import.meta.env.ONE_CACHE_KEY": JSON.stringify(import_constants.CACHE_KEY)
|
184
211
|
}
|
185
212
|
};
|
186
213
|
}
|
187
214
|
},
|
188
215
|
{
|
189
|
-
name: "use-react-18-for-native",
|
216
|
+
name: "one-use-react-18-for-native",
|
190
217
|
enforce: "pre",
|
191
218
|
async config() {
|
192
219
|
var sharedNativeConfig = {
|
@@ -211,7 +238,7 @@ function one() {
|
|
211
238
|
},
|
212
239
|
// this started erroring for no reason..
|
213
240
|
{
|
214
|
-
name: "optimize-deps-load-web-extensions",
|
241
|
+
name: "one-optimize-deps-load-web-extensions",
|
215
242
|
enforce: "pre",
|
216
243
|
applyToEnvironment(environment) {
|
217
244
|
return (0, import_vxrn.isWebEnvironment)(environment);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/one.ts"],
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;
|
5
|
-
"names": ["events", "setMaxListeners", "globalThis", "__vxrnEnableNativeEnv", "one", "options", "oneOptions", "
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;qBAA4B,0BAC5B,qBAAmB,oCACnB,mBAAuC,kCACvC,cAAoF,iBACpF,6BAA0B,4CAC1B,cAA6E,iBAC7E,mBAA0B,yBAC1B,0BAAO,gCACP,qBAA4B,iCAC5B,+BAAsC,oCACtC,gCAAuC,qCACvC,wBAA+B,6BAC/B,+BAAsC,oCACtC,gCAAuC,qCAEvC,4BAAmD,iCACnD,0BAAiC;AAEjCA,mBAAAA,QAAOC,gBAAgB,GAAA;AAGvBC,WAAWC,wBAAwB;AAE5B,SAASC,MAAAA;MAAIC,UAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAA6B,CAAC,GAI5CA;AAHJC,eAAaD,WAGTA,kBAAAA,QAAQE,YAAM,QAAdF,oBAAAA,SAAAA,SA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"names": ["events", "setMaxListeners", "globalThis", "__vxrnEnableNativeEnv", "one", "options", "oneOptions", "config", "ensureTSConfig", "optimizeDeps", "getOptimizeDeps", "optimizeIds", "include", "optimizeIdRegex", "RegExp", "map", "id", "replace", "join", "tsConfigPathsPlugin", "vxrnOptions", "getOptionsFilled", "clientEnvDefine", "loadEnv", "mode", "devAndProdPlugins", "name", "define", "Proxy", "configIncoming", "pathsConfig", "tsConfigPaths", "plugins", "flat", "some", "p", "tsconfigPaths", "configResolved", "resolveId", "get", "target", "key", "thisArg", "Reflect", "enforce", "resolve", "alias", "tslib", "resolvePath", "web", "defaultRenderMode", "JSON", "stringify", "setupFile", "process", "env", "NODE_ENV", "server", "url", "environments", "client", "ssr", "ios", "android", "zero", "TESTING", "REPLICACHE_VERSION", "ZERO_VERSION", "hotUpdate", "modules", "m", "relativePath", "path", "relative", "root", "rootDir", "split", "sep", "acceptedHmrExports", "Set", "__vxrnAddNativePlugins", "clientTreeShakePlugin", "__vxrnAddWebPluginsProd", "createFileSystemRouter", "generateTypesForRoutes", "fixDependenciesPlugin", "deps", "createVirtualEntry", "app", "CACHE_KEY", "sharedNativeConfig", "react", "applyToEnvironment", "environment", "isWebEnvironment", "importer", "shouldOptimize", "test", "absolutePath", "dirname", "webPath", "directoryPath", "existsAsync", "err", "console", "warn", "vitePluginSsrCss", "entries", "virtualEntryId", "getUserOneOptions", "command", "Error", "loadUserOneOptions", "found", "loadConfigFromFile", "cwd", "foundOptions"]
|
6
6
|
}
|
@@ -35,9 +35,9 @@ const virtualEntryIdName = "one-entry",
|
|
35
35
|
virtualEntryIdNativeName = `${virtualEntryIdName}-native`,
|
36
36
|
virtualEntryIdNative = `virtual:${virtualEntryIdNativeName}`,
|
37
37
|
resolvedVirtualEntryIdNative = "\0" + virtualEntryIdNativeName,
|
38
|
-
|
39
|
-
if (process.env.
|
40
|
-
import(/* @vite-ignore */ process.env.
|
38
|
+
USE_ONE_SETUP_FILE = `
|
39
|
+
if (process.env.ONE_SETUP_FILE) {
|
40
|
+
import(/* @vite-ignore */ process.env.ONE_SETUP_FILE)
|
41
41
|
}
|
42
42
|
`;
|
43
43
|
function createVirtualEntry(options) {
|
@@ -51,7 +51,7 @@ function createVirtualEntry(options) {
|
|
51
51
|
},
|
52
52
|
load(id) {
|
53
53
|
if (id === resolvedVirtualEntryId) return `
|
54
|
-
${(0, import_vxrn.isNativeEnvironment)(this.environment) ? "" :
|
54
|
+
${(0, import_vxrn.isNativeEnvironment)(this.environment) ? "" : USE_ONE_SETUP_FILE}
|
55
55
|
|
56
56
|
import { createApp } from 'one'
|
57
57
|
|
@@ -61,7 +61,7 @@ export default createApp({
|
|
61
61
|
})
|
62
62
|
`;
|
63
63
|
if (id === resolvedVirtualEntryIdNative) return `
|
64
|
-
${(0, import_vxrn.isNativeEnvironment)(this.environment) ? "" :
|
64
|
+
${(0, import_vxrn.isNativeEnvironment)(this.environment) ? "" : USE_ONE_SETUP_FILE}
|
65
65
|
|
66
66
|
import { createApp } from 'one'
|
67
67
|
|
@@ -22,9 +22,9 @@ __export(virtualEntryPlugin_exports, {
|
|
22
22
|
virtualEntryIdNative: () => virtualEntryIdNative
|
23
23
|
});
|
24
24
|
module.exports = __toCommonJS(virtualEntryPlugin_exports);
|
25
|
-
var import_vxrn = require("vxrn"), virtualEntryIdName = "one-entry", virtualEntryId = `virtual:${virtualEntryIdName}`, virtalEntryIdClient = `/@id/__x00__virtual:${virtualEntryIdName}`, resolvedVirtualEntryId = "\0" + virtualEntryId, virtualEntryIdNativeName = `${virtualEntryIdName}-native`, virtualEntryIdNative = `virtual:${virtualEntryIdNativeName}`, resolvedVirtualEntryIdNative = "\0" + virtualEntryIdNativeName,
|
26
|
-
if (process.env.
|
27
|
-
import(/* @vite-ignore */ process.env.
|
25
|
+
var import_vxrn = require("vxrn"), virtualEntryIdName = "one-entry", virtualEntryId = `virtual:${virtualEntryIdName}`, virtalEntryIdClient = `/@id/__x00__virtual:${virtualEntryIdName}`, resolvedVirtualEntryId = "\0" + virtualEntryId, virtualEntryIdNativeName = `${virtualEntryIdName}-native`, virtualEntryIdNative = `virtual:${virtualEntryIdNativeName}`, resolvedVirtualEntryIdNative = "\0" + virtualEntryIdNativeName, USE_ONE_SETUP_FILE = `
|
26
|
+
if (process.env.ONE_SETUP_FILE) {
|
27
|
+
import(/* @vite-ignore */ process.env.ONE_SETUP_FILE)
|
28
28
|
}
|
29
29
|
`;
|
30
30
|
function createVirtualEntry(options) {
|
@@ -42,7 +42,7 @@ function createVirtualEntry(options) {
|
|
42
42
|
if (id === resolvedVirtualEntryId) {
|
43
43
|
var prependCode = (0, import_vxrn.isNativeEnvironment)(this.environment) ? "" : (
|
44
44
|
/* `import()` will not work on native */
|
45
|
-
|
45
|
+
USE_ONE_SETUP_FILE
|
46
46
|
);
|
47
47
|
return `
|
48
48
|
${prependCode}
|
@@ -58,7 +58,7 @@ export default createApp({
|
|
58
58
|
if (id === resolvedVirtualEntryIdNative) {
|
59
59
|
var prependCode1 = (0, import_vxrn.isNativeEnvironment)(this.environment) ? "" : (
|
60
60
|
/* `import()` will not work on native */
|
61
|
-
|
61
|
+
USE_ONE_SETUP_FILE
|
62
62
|
);
|
63
63
|
return `
|
64
64
|
${prependCode1}
|
@@ -2,5 +2,5 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../src/vite/Users/n8/one/packages/one/src/vite/virtualEntryPlugin.ts"],
|
4
4
|
"mappings": ";;;;;;;;;;;;;;;AACA;;;;;;;;;kBAAoC,iBAEvBA,qBAAqB,aACrBC,iBAAiB,WAAWD,kBAAAA,IAC5BE,sBAAsB,uBAAuBF,kBAAAA,IACpDG,yBAAyB,OAAOF,gBAEhCG,2BAA2B,GAAGJ,kBAAAA,WACvBK,uBAAuB,WAAWD,wBAAAA,IACzCE,+BAA+B,OAAOF,0BAEtCG,qBAAqB;;;;;AAMpB,SAASC,mBAAmBC,SAAyB;AAC1D,MAAMC,aAAa,IAAID,QAAQE,IAAI;AAEnC,SAAO;IACLC,MAAM;IACNC,SAAS;IAETC,UAAUC,IAAE;AACV,UAAIA,OAAOd;AACT,eAAOE;AAET,UAAIY,OAAOV;AACT,eAAOC;IAEX;IAEAU,KAAKD,IAAE;AACL,UAAIA,OAAOZ,wBAAwB;AACjC,YAAMc,kBAAcC,iCAAoB,KAAKC,WAAW,IACpD;;UACAZ;;AACJ,eAAO;EACbU,WAAAA;;;;cAIYP,UAAAA;;8BAEgBA,UAAAA;;;MAGxB;AAEA,UAAIK,OAAOT,8BAA8B;AACvC,YAAMW,mBAAcC,iCAAoB,KAAKC,WAAW,IACpD;;UACAZ;;AACJ,eAAO;EACbU,YAAAA;;;;cAIYP,UAAAA;;8BAEgBA,UAAAA;;;MAGxB;IACF;EACF;AACF;",
|
5
|
-
"names": ["virtualEntryIdName", "virtualEntryId", "virtalEntryIdClient", "resolvedVirtualEntryId", "virtualEntryIdNativeName", "virtualEntryIdNative", "resolvedVirtualEntryIdNative", "
|
5
|
+
"names": ["virtualEntryIdName", "virtualEntryId", "virtalEntryIdClient", "resolvedVirtualEntryId", "virtualEntryIdNativeName", "virtualEntryIdNative", "resolvedVirtualEntryIdNative", "USE_ONE_SETUP_FILE", "createVirtualEntry", "options", "appDirGlob", "root", "name", "enforce", "resolveId", "id", "load", "prependCode", "isNativeEnvironment", "environment"]
|
6
6
|
}
|
@@ -41,7 +41,7 @@ function vitePluginSsrCss(pluginOpts) {
|
|
41
41
|
let server;
|
42
42
|
const virtualHref = "/@id/__x00__" + VIRTUAL_ENTRY;
|
43
43
|
return {
|
44
|
-
name: "
|
44
|
+
name: "one-plugin-ssr-css",
|
45
45
|
apply: "serve",
|
46
46
|
configureServer(server_) {
|
47
47
|
server = server_, server.middlewares.use(async (req, res, next) => {
|
@@ -32,7 +32,7 @@ var VIRTUAL_ENTRY = "virtual:ssr-css.css";
|
|
32
32
|
function vitePluginSsrCss(pluginOpts) {
|
33
33
|
var server, virtualHref = "/@id/__x00__" + VIRTUAL_ENTRY;
|
34
34
|
return {
|
35
|
-
name: "
|
35
|
+
name: "one-plugin-ssr-css",
|
36
36
|
apply: "serve",
|
37
37
|
configureServer(server_) {
|
38
38
|
server = server_, server.middlewares.use(async function(req, res, next) {
|
package/dist/esm/cleanUrl.js
CHANGED
@@ -1,13 +1,17 @@
|
|
1
|
-
import {
|
1
|
+
import {
|
2
|
+
isNative,
|
3
|
+
LOADER_JS_POSTFIX,
|
4
|
+
LOADER_JS_POSTFIX_UNCACHED,
|
5
|
+
PRELOAD_JS_POSTFIX
|
6
|
+
} from "./constants";
|
2
7
|
import { getURL } from "./getURL";
|
3
|
-
import { CACHE_KEY } from "./router/constants";
|
4
8
|
import { removeSearch } from "./utils/removeSearch";
|
5
9
|
function cleanUrl(path) {
|
6
10
|
return removeSearch(path).replaceAll("/", "_").replace(/_$/, "");
|
7
11
|
}
|
8
|
-
const isClient = typeof window < "u",
|
12
|
+
const isClient = typeof window < "u", clientSideURL = isClient ? getURL() : "";
|
9
13
|
function getPreloadPath(currentPath) {
|
10
|
-
return `${clientSideURL}/assets/${cleanUrl(currentPath.slice(1))}
|
14
|
+
return `${clientSideURL}/assets/${cleanUrl(currentPath.slice(1))}${PRELOAD_JS_POSTFIX}`;
|
11
15
|
}
|
12
16
|
function getLoaderPath(currentPath, includeUrl = isNative) {
|
13
17
|
const baseURL = includeUrl ? getURL() : "", devPath = process.env.NODE_ENV === "development" ? "/_one" : "", currentPathUrl = new URL(
|
@@ -15,13 +19,10 @@ function getLoaderPath(currentPath, includeUrl = isNative) {
|
|
15
19
|
"http://example.com"
|
16
20
|
/* not important, just for `new URL()` to work */
|
17
21
|
);
|
18
|
-
return `${baseURL}${devPath}/assets/${cleanUrl(currentPathUrl.pathname.slice(1))}
|
22
|
+
return `${baseURL}${devPath}/assets/${cleanUrl(currentPathUrl.pathname.slice(1))}${LOADER_JS_POSTFIX}`;
|
19
23
|
}
|
20
24
|
function getPathFromLoaderPath(loaderPath) {
|
21
|
-
return loaderPath.replace("
|
22
|
-
}
|
23
|
-
function getSearchParams(searchParams) {
|
24
|
-
return searchParams ? `${searchParams}&${clientSideSearch.slice(1)}` : clientSideSearch;
|
25
|
+
return loaderPath.replace(LOADER_JS_POSTFIX_UNCACHED, "").replace(/_\d+/, "").replace(/^(\/_one)?\/assets/, "").replaceAll(/_/g, "/");
|
25
26
|
}
|
26
27
|
export {
|
27
28
|
getLoaderPath,
|
package/dist/esm/cleanUrl.js.map
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/cleanUrl.ts"],
|
4
|
-
"mappings": "AAAA,
|
4
|
+
"mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAE7B,SAAS,SAAS,MAAc;AAC9B,SACE,aAAa,IAAI,EACd,WAAW,KAAK,GAAG,EAEnB,QAAQ,MAAM,EAAE;AAEvB;AAEA,MAAM,WAAW,OAAO,SAAW,KAC7B,gBAAgB,WAAW,OAAO,IAAI;AAErC,SAAS,eAAe,aAAqB;AAClD,SAAO,GAAG,aAAa,WAAW,SAAS,YAAY,MAAM,CAAC,CAAC,CAAC,GAAG,kBAAkB;AACvF;AAEO,SAAS,cACd,aAEA,aAAa,UACb;AACA,QAAM,UAAU,aAAa,OAAO,IAAI,IAClC,UAAU,QAAQ,IAAI,aAAa,gBAAgB,UAAU,IAE7D,iBAAiB,IAAI;AAAA,IACzB;AAAA,IACA;AAAA;AAAA,EACF;AAEA,SAAO,GAAG,OAAO,GAAG,OAAO,WAAW,SAAS,eAAe,SAAS,MAAM,CAAC,CAAC,CAAC,GAAG,iBAAiB;AACtG;AAEO,SAAS,sBAAsB,YAAoB;AACxD,SAAO,WACJ,QAAQ,4BAA4B,EAAE,EACtC,QAAQ,QAAQ,EAAE,EAClB,QAAQ,sBAAsB,EAAE,EAChC,WAAW,MAAM,GAAG;AACzB;",
|
5
5
|
"names": []
|
6
6
|
}
|
package/dist/esm/cleanUrl.mjs
CHANGED
@@ -1,28 +1,23 @@
|
|
1
|
-
import { isNative } from "./constants.mjs";
|
1
|
+
import { isNative, LOADER_JS_POSTFIX, LOADER_JS_POSTFIX_UNCACHED, PRELOAD_JS_POSTFIX } from "./constants.mjs";
|
2
2
|
import { getURL } from "./getURL.mjs";
|
3
|
-
import { CACHE_KEY } from "./router/constants.mjs";
|
4
3
|
import { removeSearch } from "./utils/removeSearch.mjs";
|
5
4
|
function cleanUrl(path) {
|
6
5
|
return removeSearch(path).replaceAll("/", "_").replace(/_$/, "");
|
7
6
|
}
|
8
7
|
const isClient = typeof window < "u",
|
9
|
-
clientSideSearch = isClient ? `?cache=${CACHE_KEY}` : "",
|
10
8
|
clientSideURL = isClient ? getURL() : "";
|
11
9
|
function getPreloadPath(currentPath) {
|
12
|
-
return `${clientSideURL}/assets/${cleanUrl(currentPath.slice(1))}
|
10
|
+
return `${clientSideURL}/assets/${cleanUrl(currentPath.slice(1))}${PRELOAD_JS_POSTFIX}`;
|
13
11
|
}
|
14
12
|
function getLoaderPath(currentPath, includeUrl = isNative) {
|
15
13
|
const baseURL = includeUrl ? getURL() : "",
|
16
14
|
devPath = process.env.NODE_ENV === "development" ? "/_one" : "",
|
17
15
|
currentPathUrl = new URL(currentPath, "http://example.com"
|
18
16
|
/* not important, just for `new URL()` to work */);
|
19
|
-
return `${baseURL}${devPath}/assets/${cleanUrl(currentPathUrl.pathname.slice(1))}
|
17
|
+
return `${baseURL}${devPath}/assets/${cleanUrl(currentPathUrl.pathname.slice(1))}${LOADER_JS_POSTFIX}`;
|
20
18
|
}
|
21
19
|
function getPathFromLoaderPath(loaderPath) {
|
22
|
-
return loaderPath.replace("
|
23
|
-
}
|
24
|
-
function getSearchParams(searchParams) {
|
25
|
-
return searchParams ? `${searchParams}&${clientSideSearch.slice(1)}` : clientSideSearch;
|
20
|
+
return loaderPath.replace(LOADER_JS_POSTFIX_UNCACHED, "").replace(/_\d+/, "").replace(/^(\/_one)?\/assets/, "").replaceAll(/_/g, "/");
|
26
21
|
}
|
27
22
|
export { getLoaderPath, getPathFromLoaderPath, getPreloadPath };
|
28
23
|
//# sourceMappingURL=cleanUrl.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["isNative","
|
1
|
+
{"version":3,"names":["isNative","LOADER_JS_POSTFIX","LOADER_JS_POSTFIX_UNCACHED","PRELOAD_JS_POSTFIX","getURL","removeSearch","cleanUrl","path","replaceAll","replace","isClient","window","clientSideURL","getPreloadPath","currentPath","slice","getLoaderPath","includeUrl","baseURL","devPath","process","env","NODE_ENV","currentPathUrl","URL","pathname","getPathFromLoaderPath","loaderPath"],"sources":["../../src/cleanUrl.ts"],"sourcesContent":[null],"mappings":"AAAA,SACEA,QAAA,EACAC,iBAAA,EACAC,0BAAA,EACAC,kBAAA,QACK;AACP,SAASC,MAAA,QAAc;AACvB,SAASC,YAAA,QAAoB;AAE7B,SAASC,SAASC,IAAA,EAAc;EAC9B,OACEF,YAAA,CAAaE,IAAI,EACdC,UAAA,CAAW,KAAK,GAAG,EAEnBC,OAAA,CAAQ,MAAM,EAAE;AAEvB;AAEA,MAAMC,QAAA,GAAW,OAAOC,MAAA,GAAW;EAC7BC,aAAA,GAAgBF,QAAA,GAAWN,MAAA,CAAO,IAAI;AAErC,SAASS,eAAeC,WAAA,EAAqB;EAClD,OAAO,GAAGF,aAAa,WAAWN,QAAA,CAASQ,WAAA,CAAYC,KAAA,CAAM,CAAC,CAAC,CAAC,GAAGZ,kBAAkB;AACvF;AAEO,SAASa,cACdF,WAAA,EAEAG,UAAA,GAAajB,QAAA,EACb;EACA,MAAMkB,OAAA,GAAUD,UAAA,GAAab,MAAA,CAAO,IAAI;IAClCe,OAAA,GAAUC,OAAA,CAAQC,GAAA,CAAIC,QAAA,KAAa,gBAAgB,UAAU;IAE7DC,cAAA,GAAiB,IAAIC,GAAA,CACzBV,WAAA,EACA;IAAA,iDACF;EAEA,OAAO,GAAGI,OAAO,GAAGC,OAAO,WAAWb,QAAA,CAASiB,cAAA,CAAeE,QAAA,CAASV,KAAA,CAAM,CAAC,CAAC,CAAC,GAAGd,iBAAiB;AACtG;AAEO,SAASyB,sBAAsBC,UAAA,EAAoB;EACxD,OAAOA,UAAA,CACJlB,OAAA,CAAQP,0BAAA,EAA4B,EAAE,EACtCO,OAAA,CAAQ,QAAQ,EAAE,EAClBA,OAAA,CAAQ,sBAAsB,EAAE,EAChCD,UAAA,CAAW,MAAM,GAAG;AACzB","ignoreList":[]}
|
@@ -1,23 +1,19 @@
|
|
1
|
-
import { isNative } from "./constants";
|
1
|
+
import { isNative, LOADER_JS_POSTFIX, LOADER_JS_POSTFIX_UNCACHED, PRELOAD_JS_POSTFIX } from "./constants";
|
2
2
|
import { getURL } from "./getURL";
|
3
|
-
import { CACHE_KEY } from "./router/constants";
|
4
3
|
import { removeSearch } from "./utils/removeSearch";
|
5
4
|
function cleanUrl(path) {
|
6
5
|
return removeSearch(path).replaceAll("/", "_").replace(/_$/, "");
|
7
6
|
}
|
8
|
-
var isClient = typeof window < "u",
|
7
|
+
var isClient = typeof window < "u", clientSideURL = isClient ? getURL() : "";
|
9
8
|
function getPreloadPath(currentPath) {
|
10
|
-
return `${clientSideURL}/assets/${cleanUrl(currentPath.slice(1))}
|
9
|
+
return `${clientSideURL}/assets/${cleanUrl(currentPath.slice(1))}${PRELOAD_JS_POSTFIX}`;
|
11
10
|
}
|
12
11
|
function getLoaderPath(currentPath) {
|
13
12
|
var includeUrl = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : isNative, baseURL = includeUrl ? getURL() : "", devPath = process.env.NODE_ENV === "development" ? "/_one" : "", currentPathUrl = new URL(currentPath, "http://example.com");
|
14
|
-
return `${baseURL}${devPath}/assets/${cleanUrl(currentPathUrl.pathname.slice(1))}
|
13
|
+
return `${baseURL}${devPath}/assets/${cleanUrl(currentPathUrl.pathname.slice(1))}${LOADER_JS_POSTFIX}`;
|
15
14
|
}
|
16
15
|
function getPathFromLoaderPath(loaderPath) {
|
17
|
-
return loaderPath.replace("
|
18
|
-
}
|
19
|
-
function getSearchParams(searchParams) {
|
20
|
-
return searchParams ? `${searchParams}&${clientSideSearch.slice(1)}` : clientSideSearch;
|
16
|
+
return loaderPath.replace(LOADER_JS_POSTFIX_UNCACHED, "").replace(/_\d+/, "").replace(/^(\/_one)?\/assets/, "").replaceAll(/_/g, "/");
|
21
17
|
}
|
22
18
|
export {
|
23
19
|
getLoaderPath,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/Users/n8/one/packages/one/src/cleanUrl.ts"],
|
4
|
-
"mappings": "AAAA,
|
5
|
-
"names": ["isNative", "
|
4
|
+
"mappings": "AAAA,SACEA,UACAC,mBACAC,4BACAC,0BACK;AACP,SAASC,cAAc;AACvB,SAASC,oBAAoB;AAE7B,SAASC,SAASC,MAAY;AAC5B,SACEF,aAAaE,IAAAA,EACVC,WAAW,KAAK,GAAA,EAEhBC,QAAQ,MAAM,EAAA;AAErB;AAEA,IAAMC,WAAW,OAAOC,SAAW,KAC7BC,gBAAgBF,WAAWN,OAAAA,IAAW;AAErC,SAASS,eAAeC,aAAmB;AAChD,SAAO,GAAGF,aAAAA,WAAwBN,SAASQ,YAAYC,MAAM,CAAA,CAAA,CAAA,GAAMZ,kBAAAA;AACrE;AAEO,SAASa,cACdF,aAAmB;MAEnBG,aAAAA,UAAAA,SAAAA,KAAAA,UAAAA,CAAAA,MAAAA,SAAAA,UAAAA,CAAAA,IAAajB,UAEPkB,UAAUD,aAAab,OAAAA,IAAW,IAClCe,UAAUC,QAAQC,IAAIC,aAAa,gBAAgB,UAAU,IAE7DC,iBAAiB,IAAIC,IACzBV,aACA,oBAAA;AAGF,SAAO,GAAGI,OAAAA,GAAUC,OAAAA,WAAkBb,SAASiB,eAAeE,SAASV,MAAM,CAAA,CAAA,CAAA,GAAMd,iBAAAA;AACrF;AAEO,SAASyB,sBAAsBC,YAAkB;AACtD,SAAOA,WACJlB,QAAQP,4BAA4B,EAAA,EACpCO,QAAQ,QAAQ,EAAA,EAChBA,QAAQ,sBAAsB,EAAA,EAC9BD,WAAW,MAAM,GAAA;AACtB;",
|
5
|
+
"names": ["isNative", "LOADER_JS_POSTFIX", "LOADER_JS_POSTFIX_UNCACHED", "PRELOAD_JS_POSTFIX", "getURL", "removeSearch", "cleanUrl", "path", "replaceAll", "replace", "isClient", "window", "clientSideURL", "getPreloadPath", "currentPath", "slice", "getLoaderPath", "includeUrl", "baseURL", "devPath", "process", "env", "NODE_ENV", "currentPathUrl", "URL", "pathname", "getPathFromLoaderPath", "loaderPath"]
|
6
6
|
}
|
package/dist/esm/cli.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import { defineCommand, runMain } from "citty";
|
2
2
|
import colors from "picocolors";
|
3
|
-
import { loadEnv } from "./vite/loadEnv";
|
4
3
|
import { readFileSync } from "node:fs";
|
5
4
|
import path from "node:path";
|
6
5
|
import { fileURLToPath } from "node:url";
|
@@ -11,7 +10,6 @@ function getPackageVersion() {
|
|
11
10
|
return JSON.parse(readFileSync(packagePath, "utf-8")).version;
|
12
11
|
}
|
13
12
|
const version = getPackageVersion();
|
14
|
-
loadEnv(process.cwd());
|
15
13
|
path.sep !== "/" && console.warn(
|
16
14
|
colors.bgYellow("WARNING: UNSUPPORTED OS") + colors.yellow(
|
17
15
|
" - It appears you\u2019re using Windows, which is currently not supported. You may experience unexpected issues."
|
package/dist/esm/cli.js.map
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/cli.ts"],
|
4
|
-
"mappings": "AAAA,SAAS,eAAe,eAAe;AACvC,OAAO,YAAY;AACnB,SAAS,
|
4
|
+
"mappings": "AAAA,SAAS,eAAe,eAAe;AACvC,OAAO,YAAY;AACnB,SAAS,oBAAoB;AAC7B,OAAO,UAAU;AACjB,SAAS,qBAAqB;AAE9B,SAAS,oBAAoB;AAC3B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;AACf;AAAA,IACF;AAEA,UAAM,EAAE,QAAQ,IAAI,MAAM,OAAO,YAAY;AAC7C,UAAM,QAAQ,IAAI;AAAA,EACpB;AACF,CAAC;AAED,QAAQ,IAAI;",
|
5
5
|
"names": ["clean"]
|
6
6
|
}
|
package/dist/esm/cli.mjs
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import { defineCommand, runMain } from "citty";
|
2
2
|
import colors from "picocolors";
|
3
|
-
import { loadEnv } from "./vite/loadEnv.mjs";
|
4
3
|
import { readFileSync } from "node:fs";
|
5
4
|
import path from "node:path";
|
6
5
|
import { fileURLToPath } from "node:url";
|
@@ -11,7 +10,6 @@ function getPackageVersion() {
|
|
11
10
|
return JSON.parse(readFileSync(packagePath, "utf-8")).version;
|
12
11
|
}
|
13
12
|
const version = getPackageVersion();
|
14
|
-
loadEnv(process.cwd());
|
15
13
|
path.sep !== "/" && console.warn(colors.bgYellow("WARNING: UNSUPPORTED OS") + colors.yellow(" - It appears you\u2019re using Windows, which is currently not supported. You may experience unexpected issues."));
|
16
14
|
const modes = {
|
17
15
|
development: "development",
|
package/dist/esm/cli.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["defineCommand","runMain","colors","
|
1
|
+
{"version":3,"names":["defineCommand","runMain","colors","readFileSync","path","fileURLToPath","getPackageVersion","dirname","__dirname","import","meta","url","packagePath","join","JSON","parse","version","sep","console","warn","bgYellow","yellow","modes","development","production","dev","name","description","args","clean","type","host","port","https","mode","run","clean2","buildCommand","step","required","only","build","process","exit","serveCommand","platform","compress","cacheHeaders","serve","prebuild","runIos","runAndroid","vxrnClean","root","cwd","subCommands","subMain","main","cliMain"],"sources":["../../src/cli.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,aAAA,EAAeC,OAAA,QAAe;AACvC,OAAOC,MAAA,MAAY;AACnB,SAASC,YAAA,QAAoB;AAC7B,OAAOC,IAAA,MAAU;AACjB,SAASC,aAAA,QAAqB;AAE9B,SAAS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WC,MAAA;IACX,eAAeC,UAAA;IACfH,KAAA,EAAOJ;EACT;EAGMY,OAAA,GAAUxD,aAAA,CAAc;IAC5BU,IAAA,EAAM;MACJgB,IAAA,EAAM;MACNV,OAAA;MACAW,WAAA,EAAa;IACf;IACA4B;EACF,CAAC;EAEKE,IAAA,GAAOzD,aAAA,CAAc;IACzBU,IAAA,EAAM;MACJgB,IAAA,EAAM;MACNV,OAAA;MACAW,WAAA,EAAa;IACf;IACAC,IAAA,EAAM;MACJF,IAAA,EAAM;QACJI,IAAA,EAAM;QACNH,WAAA,EAAa;QACbY,QAAA,EAAU;MACZ;IACF;IACA,MAAMJ,IAAI;MAAEP;IAAK,GAAG;MAClB,IAAI2B,WAAA,CAAY3B,IAAA,CAAKF,IAAI,GAAG;QAE1BzB,OAAA,CAAQuD,OAAO;QACf;MACF;MAEA,MAAM;QAAEE;MAAQ,IAAI,MAAM,OAAO,gBAAY;MAC7C,MAAMA,OAAA,CAAQ9B,IAAI;IACpB;EACF,CAAC;AAED3B,OAAA,CAAQwD,IAAI","ignoreList":[]}
|
package/dist/esm/cli.native.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import { defineCommand, runMain } from "citty";
|
2
2
|
import colors from "picocolors";
|
3
|
-
import { loadEnv } from "./vite/loadEnv";
|
4
3
|
import { readFileSync } from "node:fs";
|
5
4
|
import path from "node:path";
|
6
5
|
import { fileURLToPath } from "node:url";
|
@@ -11,7 +10,6 @@ function getPackageVersion() {
|
|
11
10
|
return packageJson.version;
|
12
11
|
}
|
13
12
|
var version = getPackageVersion();
|
14
|
-
loadEnv(process.cwd());
|
15
13
|
path.sep !== "/" && console.warn(colors.bgYellow("WARNING: UNSUPPORTED OS") + colors.yellow(" - It appears you\u2019re using Windows, which is currently not supported. You may experience unexpected issues."));
|
16
14
|
var modes = {
|
17
15
|
development: "development",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/Users/n8/one/packages/one/src/cli.ts"],
|
4
|
-
"mappings": "AAAA,SAASA,eAAeC,eAAe;AACvC,OAAOC,YAAY;AACnB,SAASC,
|
5
|
-
"names": ["defineCommand", "runMain", "colors", "
|
4
|
+
"mappings": "AAAA,SAASA,eAAeC,eAAe;AACvC,OAAOC,YAAY;AACnB,SAASC,oBAAoB;AAC7B,OAAOC,UAAU;AACjB,SAASC,qBAAqB;AAE9B,SAASC,oBAAAA;AACP,MAAIC;AACJ,EAAI,OAAOC,YAAc,MAEvBD,UAAUC,YAGVD,UAAUH,KAAKG,QAAQF,cAAc,YAAYI,GAAG,CAAA;AAEtD,MAAMC,cAAcN,KAAKO,KAAKJ,SAAS,MAAM,MAAM,cAAA,GAC7CK,cAAcC,KAAKC,MAAMX,aAAaO,aAAa,OAAA,CAAA;AACzD,SAAOE,YAAYG;AACrB;AAEA,IAAMA,UAAUT,kBAAAA;AAEZF,KAAKY,QAAQ,OACfC,QAAQC,KACNhB,OAAOiB,SAAS,yBAAA,IACdjB,OAAOkB,OACL,kHAAA,CAAA;AAKR,IAAMC,QAAQ;EACZC,aAAa;EACbC,YAAY;AACd,GAEMC,MAAMxB,cAAc;EACxByB,MAAM;IACJC,MAAM;IACNX;IACAY,aAAa;EACf;EACAC,MAAM;IACJC,OAAO;MACLC,MAAM;IACR;IACAC,MAAM;MACJD,MAAM;IACR;IACAE,MAAM;MACJF,MAAM;IACR;IACAG,OAAO;MACLH,MAAM;IACR;IACAI,MAAM;MACJJ,MAAM;MACNH,aACE;IACJ;EACF;EACA,MAAMQ,IAAI,OAA4C;QAA5C,EAAEP,MAAM,EAAEC,OAAAA,QAAOE,MAAME,OAAOC,MAAMF,KAAI,EAAE,IAA1C,OACF,EAAEG,IAAG,IAAK,MAAM,OAAO,WAAA;AAC7B,UAAMA,IAAI;MACRN,OAAAA;MACAE;MACAE;MACAC,MAAMb,MAAMa,IAAAA;MACZF;IACF,CAAA;EACF;AACF,CAAA,GAEMI,eAAepC,cAAc;EACjCyB,MA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F,EAAEO,IAAG,IAAK,MAAM,OAAO,cAAA;AAC7B,UAAMA,IAAIP,IAAAA;EACZ;AACF,CAAA,GAEMuB,aAAanD,cAAc;EAC/ByB,MAAM;IACJC,MAAM;IACNX;EACF;EACAa,MAAM,CAAC;EACP,MAAMO,IAAI,OAAQ;QAAR,EAAEP,KAAI,IAAN,OACF,EAAEO,IAAG,IAAK,MAAM,OAAO,kBAAA;AAC7B,UAAMA,IAAIP,IAAAA;EACZ;AACF,CAAA,GAEMC,QAAQ7B,cAAc;EAC1ByB,MAAM;IACJC,MAAM;IACNX,SAAS;IACTY,aAAa;EACf;EACAC,MAAM,CAAC;EACP,MAAMO,MAAAA;AACJ,QAAM,EAAEN,OAAOuB,UAAS,IAAK,MAAM,OAAO,MAAA;AAC1C,UAAMA,UAAU;MACdC,MAAMZ,QAAQa,IAAG;IACnB,CAAA;EACF;AACF,CAAA,GAEMC,cAAc;EAClB/B;EACAK;EACAW,OAAOJ;EACPa;EACA,WAAWC;EACX,eAAeC;EACfJ,OAAOJ;AACT,GAGMa,UAAUxD,cAAc;EAC5ByB,MAAM;IACJC,MAAM;IACNX;IACAY,aAAa;EACf;EACA4B;AACF,CAAA,GAEME,OAAOzD,cAAc;EACzByB,MAAM;IACJC,MAAM;IACNX;IACAY,aAAa;EACf;EACAC,MAAM;IACJF,MAAM;MACJI,MAAM;MACNH,aAAa;MACbW,UAAU;IACZ;EACF;EACA,MAAMH,IAAI,OAAQ;QAAR,EAAEP,KAAI,IAAN;AACR,QAAI2B,YAAY3B,KAAKF,IAAI,GAAG;AAE1BzB,cAAQuD,OAAAA;AACR;IACF;AAEA,QAAM,EAAEE,QAAO,IAAK,MAAM,OAAO,YAAA;AACjC,UAAMA,QAAQ9B,IAAAA;EAChB;AACF,CAAA;AAEA3B,QAAQwD,IAAAA;",
|
5
|
+
"names": ["defineCommand", "runMain", "colors", "readFileSync", "path", "fileURLToPath", "getPackageVersion", "dirname", "__dirname", "url", "packagePath", "join", "packageJson", "JSON", "parse", "version", "sep", "console", "warn", "bgYellow", "yellow", "modes", "development", "production", "dev", "meta", "name", "description", "args", "clean", "type", "host", "port", "https", "mode", "run", "buildCommand", "step", "required", "only", "build", "process", "exit", "serveCommand", "platform", "compress", "cacheHeaders", "serve", "undefined", "prebuild", "runIos", "runAndroid", "vxrnClean", "root", "cwd", "subCommands", "subMain", "main", "cliMain"]
|
6
6
|
}
|
package/dist/esm/config.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { isWebServer } from "./constants";
|
2
|
-
const CLIENT_RENDER_MODE = process.env.
|
2
|
+
const CLIENT_RENDER_MODE = process.env.ONE_DEFAULT_RENDER_MODE, getDefaultRenderMode = () => {
|
3
3
|
const serverConfig = globalThis.__vxrnPluginConfig__;
|
4
4
|
if (isWebServer && !serverConfig)
|
5
5
|
throw new Error("Internal one error: should call setServerConfig before createManifest");
|
package/dist/esm/config.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { isWebServer } from "./constants.mjs";
|
2
|
-
const CLIENT_RENDER_MODE = process.env.
|
2
|
+
const CLIENT_RENDER_MODE = process.env.ONE_DEFAULT_RENDER_MODE,
|
3
3
|
getDefaultRenderMode = () => {
|
4
4
|
const serverConfig = globalThis.__vxrnPluginConfig__;
|
5
5
|
if (isWebServer && !serverConfig) throw new Error("Internal one error: should call setServerConfig before createManifest");
|
package/dist/esm/config.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["isWebServer","CLIENT_RENDER_MODE","process","env","
|
1
|
+
{"version":3,"names":["isWebServer","CLIENT_RENDER_MODE","process","env","ONE_DEFAULT_RENDER_MODE","getDefaultRenderMode","serverConfig","globalThis","__vxrnPluginConfig__","Error","web","defaultRenderMode"],"sources":["../../src/config.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,WAAA,QAAmB;AAG5B,MAAMC,kBAAA,GAAqBC,OAAA,CAAQC,GAAA,CAAIC,uBAAA;EAG1BC,oBAAA,GAAuBA,CAAA,KAAM;IACxC,MAAMC,YAAA,GAAeC,UAAA,CAAWC,oBAAA;IAEhC,IAAIR,WAAA,IAAe,CAACM,YAAA,EAClB,MAAM,IAAIG,KAAA,CAAM,uEAAuE;IAGzF,OAAOR,kBAAA,IAAsBK,YAAA,EAAcI,GAAA,EAAKC,iBAAA,IAAqB;EACvE","ignoreList":[]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { isWebServer } from "./constants";
|
2
|
-
var CLIENT_RENDER_MODE = process.env.
|
2
|
+
var CLIENT_RENDER_MODE = process.env.ONE_DEFAULT_RENDER_MODE, getDefaultRenderMode = function() {
|
3
3
|
var _serverConfig_web, serverConfig = globalThis.__vxrnPluginConfig__;
|
4
4
|
if (isWebServer && !serverConfig)
|
5
5
|
throw new Error("Internal one error: should call setServerConfig before createManifest");
|
@@ -2,5 +2,5 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/Users/n8/one/packages/one/src/config.ts"],
|
4
4
|
"mappings": "AAAA,SAASA,mBAAmB;AAG5B,IAAMC,qBAAqBC,QAAQC,IAAIC,yBAG1BC,uBAAuB,WAAA;MAOLC,mBANvBA,eAAeC,WAAW;AAEhC,MAAIP,eAAe,CAACM;AAClB,UAAM,IAAIE,MAAM,uEAAuE;MAGlFP;AAAP,UAAOA,OAAAA,uBAAsBK,gBAAAA,SAAAA,oBAAAA,aAAcG,SAAG,QAAjBH,sBAAAA,SAAAA,SAAAA,kBAAmBI,wBAAiB,QAA1DT,SAAAA,SAAAA,OAA8D;AACvE;",
|
5
|
-
"names": ["isWebServer", "CLIENT_RENDER_MODE", "process", "env", "
|
5
|
+
"names": ["isWebServer", "CLIENT_RENDER_MODE", "process", "env", "ONE_DEFAULT_RENDER_MODE", "getDefaultRenderMode", "serverConfig", "globalThis", "Error", "web", "defaultRenderMode"]
|
6
6
|
}
|
package/dist/esm/constants.js
CHANGED
@@ -1,5 +1,9 @@
|
|
1
|
-
const isWebClient = typeof window < "u", isWebServer = typeof window > "u", isNative = !1
|
1
|
+
const isWebClient = typeof window < "u", isWebServer = typeof window > "u", isNative = !1, CACHE_KEY = `${process.env.ONE_CACHE_KEY ?? Math.round(Math.random() * 1e8)}`, LOADER_JS_POSTFIX_UNCACHED = "_vxrn_loader.js", LOADER_JS_POSTFIX = `_${CACHE_KEY}${LOADER_JS_POSTFIX_UNCACHED}`, PRELOAD_JS_POSTFIX = `_${CACHE_KEY}_preload.js`;
|
2
2
|
export {
|
3
|
+
CACHE_KEY,
|
4
|
+
LOADER_JS_POSTFIX,
|
5
|
+
LOADER_JS_POSTFIX_UNCACHED,
|
6
|
+
PRELOAD_JS_POSTFIX,
|
3
7
|
isNative,
|
4
8
|
isWebClient,
|
5
9
|
isWebServer
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/constants.ts"],
|
4
|
-
"mappings": "AAAO,MAAM,cAAyD,OAAO,SAAW,KAC3E,cAAyD,OAAO,SAAW,KAC3E,WAAW;",
|
4
|
+
"mappings": "AAAO,MAAM,cAAyD,OAAO,SAAW,KAC3E,cAAyD,OAAO,SAAW,KAC3E,WAAW,IAEX,YAAY,GAAG,QAAQ,IAAI,iBAAiB,KAAK,MAAM,KAAK,OAAO,IAAI,GAAW,CAAC,IAEnF,6BAA6B,mBAC7B,oBAAoB,IAAI,SAAS,GAAG,0BAA0B,IAC9D,qBAAqB,IAAI,SAAS;",
|
5
5
|
"names": []
|
6
6
|
}
|