noofpi 2.0.0 → 2.0.1
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.
- package/dist/{build-PFCGDPPJ.js → build-WPHZ7TYZ.js} +1 -1
- package/dist/{chunk-LL3NO5EI.js → chunk-NHBXVKEQ.js} +7 -2
- package/dist/cli.js +5 -5
- package/dist/{dev-HTWUY27O.js → dev-OAGCOGHA.js} +1 -1
- package/dist/{prepare-KKQ2AEBW.js → prepare-BN7NMCVQ.js} +1 -1
- package/dist/runtime/entry-client.js +6 -3
- package/dist/{start-AJKNZRJQ.js → start-ITRND3BY.js} +1 -1
- package/package.json +3 -3
|
@@ -563,8 +563,11 @@ function presetEntryCode(preset, config) {
|
|
|
563
563
|
case "cloudflare-pages":
|
|
564
564
|
return [
|
|
565
565
|
HANDLER,
|
|
566
|
-
// Pages serves static files through the ASSETS binding; everything else is a page or an API call
|
|
567
|
-
|
|
566
|
+
// Pages serves static files through the ASSETS binding; everything else is a page or an API call.
|
|
567
|
+
// API and proxy paths end in the endpoint name (`/_noofpi/proxy/doofpi.me.getMe`), which looks like a file extension
|
|
568
|
+
`const apiRoot = mod.config.doofpi.root;`,
|
|
569
|
+
`const isApiPath = (pathname) => pathname.startsWith('/_noofpi/') || pathname === apiRoot || pathname.startsWith(apiRoot + '.') || pathname.startsWith(apiRoot + '/');`,
|
|
570
|
+
`const isFile = (request) => { const { pathname } = new URL(request.url); return (request.method === 'GET' || request.method === 'HEAD') && /\\.[a-z0-9]+$/i.test(pathname) && !isApiPath(pathname); };`,
|
|
568
571
|
`export default { fetch: (request, env) => isFile(request) && env.ASSETS ? env.ASSETS.fetch(request) : handler(request, env) };`
|
|
569
572
|
].join("\n");
|
|
570
573
|
default:
|
|
@@ -1067,6 +1070,8 @@ function autoImportPlugins() {
|
|
|
1067
1070
|
"app/utils/*/index.{ts,js}"
|
|
1068
1071
|
],
|
|
1069
1072
|
include: [/\.[jt]sx?$/, /\.vue$/, /\.vue\?vue/],
|
|
1073
|
+
// Without it a util used only in a template compiles to `_ctx.name` and is undefined at runtime
|
|
1074
|
+
vueTemplate: true,
|
|
1070
1075
|
dts: ".noofpi/auto-imports.d.ts"
|
|
1071
1076
|
}),
|
|
1072
1077
|
Components({
|
package/dist/cli.js
CHANGED
|
@@ -150,7 +150,7 @@ async function main() {
|
|
|
150
150
|
await loadEnvFiles(root, mode);
|
|
151
151
|
const config = await loadConfig(root);
|
|
152
152
|
if (command === "dev") {
|
|
153
|
-
const { startDev } = await import("./dev-
|
|
153
|
+
const { startDev } = await import("./dev-OAGCOGHA.js");
|
|
154
154
|
await startDev(root, config, overrides);
|
|
155
155
|
} else if (command === "build" || command === "preview") {
|
|
156
156
|
const preset = args.preset ? assertBuildPreset(args.preset, "--preset") : void 0;
|
|
@@ -161,17 +161,17 @@ async function main() {
|
|
|
161
161
|
`[noofpi] preview can not run the "${target}" preset (use ${PREVIEW_PRESETS.join(" | ")}, or build it and serve .output/ with its own tooling)`
|
|
162
162
|
);
|
|
163
163
|
}
|
|
164
|
-
const { buildApp } = await import("./build-
|
|
164
|
+
const { buildApp } = await import("./build-WPHZ7TYZ.js");
|
|
165
165
|
await buildApp(root, config, preset);
|
|
166
166
|
if (command === "preview") {
|
|
167
|
-
const { startProd } = await import("./start-
|
|
167
|
+
const { startProd } = await import("./start-ITRND3BY.js");
|
|
168
168
|
await startProd(root, config, overrides);
|
|
169
169
|
}
|
|
170
170
|
} else if (command === "start") {
|
|
171
|
-
const { startProd } = await import("./start-
|
|
171
|
+
const { startProd } = await import("./start-ITRND3BY.js");
|
|
172
172
|
await startProd(root, config, overrides);
|
|
173
173
|
} else {
|
|
174
|
-
const { prepareApp } = await import("./prepare-
|
|
174
|
+
const { prepareApp } = await import("./prepare-BN7NMCVQ.js");
|
|
175
175
|
await prepareApp(root, config);
|
|
176
176
|
if (command === "prepare") {
|
|
177
177
|
console.log("noofpi: generated .noofpi/");
|
|
@@ -47,6 +47,10 @@ async function mount() {
|
|
|
47
47
|
const { app, router, payload, error, log, loaders, i18n } = createNoofpiApp({
|
|
48
48
|
server: false
|
|
49
49
|
});
|
|
50
|
+
const navigated = router.isReady().then(
|
|
51
|
+
() => void 0,
|
|
52
|
+
(failure) => ({ failure })
|
|
53
|
+
);
|
|
50
54
|
await i18n?.ready;
|
|
51
55
|
if (import.meta.env.DEV && publicConfig.devtools) {
|
|
52
56
|
const { mountDevtools } = await import("../devtools-PLUN2DYV.js");
|
|
@@ -65,9 +69,8 @@ async function mount() {
|
|
|
65
69
|
}
|
|
66
70
|
});
|
|
67
71
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
});
|
|
72
|
+
const outcome = await navigated;
|
|
73
|
+
if (outcome && !error.value) throw outcome.failure;
|
|
71
74
|
app.mount("#app");
|
|
72
75
|
listenForPrefetch(loaders.prefetch);
|
|
73
76
|
payload.data = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "noofpi",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "A minimal Vue + Vite full-stack framework built around doofpi",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Lior Cohen",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
108
|
"@tailwindcss/vite": "^4.3.5",
|
|
109
|
-
"@types/node": "^24.19.
|
|
109
|
+
"@types/node": "^24.19.4",
|
|
110
110
|
"doofpi": "^1.3.1",
|
|
111
111
|
"sharp": "^0.35.5",
|
|
112
112
|
"tailwindcss": "^4.3.5",
|
|
@@ -114,6 +114,6 @@
|
|
|
114
114
|
"prettier": "^3.10.1",
|
|
115
115
|
"tsup": "^9.0.0",
|
|
116
116
|
"typescript": "~6.0.3",
|
|
117
|
-
"vitest": "^
|
|
117
|
+
"vitest": "^5.1.2"
|
|
118
118
|
}
|
|
119
119
|
}
|