@maravilla-labs/adapter-sveltekit 0.1.20 → 0.1.21

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.
@@ -117,7 +117,7 @@ const initialized = server.init({
117
117
  read: async (file) => {
118
118
  // For now, return empty stream for any file read attempts
119
119
  // This is a placeholder until we implement proper static file serving
120
- console.log('Read function called for file:', file);
120
+ // console.log('Read function called for file:', file);
121
121
 
122
122
  // Return an empty ReadableStream to prevent errors
123
123
  return new ReadableStream({
@@ -136,7 +136,7 @@ const initialized = server.init({
136
136
  async function handleRequest(request) {
137
137
  // Apply our fetch/Request overrides when first called
138
138
  if (globalThis.Request !== EnhancedRequest) {
139
- console.log('Applying EnhancedRequest override');
139
+ // console.log('Applying EnhancedRequest override');
140
140
  globalThis.Request = EnhancedRequest;
141
141
  globalThis.fetch = enhancedFetch;
142
142
  }
@@ -146,7 +146,7 @@ async function handleRequest(request) {
146
146
  // The runtime should have already set globalThis.location by now
147
147
  // Log it for debugging
148
148
  if (globalThis.location) {
149
- console.log('globalThis.location is available:', globalThis.location.origin);
149
+ // console.log('globalThis.location is available:', globalThis.location.origin);
150
150
  } else {
151
151
  console.warn('WARNING: globalThis.location not set by runtime - this may cause URL resolution issues');
152
152
  }
@@ -155,11 +155,11 @@ async function handleRequest(request) {
155
155
  let webRequest;
156
156
  if (request instanceof Request) {
157
157
  // It's already a proper Request object from the runtime
158
- console.log('Request is already a Web API Request object');
158
+ // console.log('Request is already a Web API Request object');
159
159
  webRequest = request;
160
160
  } else {
161
161
  // It's a plain object, convert it to a Request (fallback for older runtime)
162
- console.log('Converting plain object to Request');
162
+ // console.log('Converting plain object to Request');
163
163
  const url = new URL(request.url, 'http://localhost');
164
164
 
165
165
  // Prepare the body - handle different types
@@ -197,7 +197,7 @@ async function handleRequest(request) {
197
197
  ? pathname.slice(0, -'/__data.json'.length)
198
198
  : pathname.slice(0, -'.html__data.json'.length) + '.html';
199
199
  test.pathname = candidate;
200
- console.log('Data URL normalization test', { before, candidate, after: test.pathname, href: test.href });
200
+ // console.log('Data URL normalization test', { before, candidate, after: test.pathname, href: test.href });
201
201
  } catch (e) {
202
202
  console.error('Data URL normalization error', e);
203
203
  }
@@ -223,16 +223,16 @@ async function handleRequest(request) {
223
223
 
224
224
  // Let SvelteKit handle the request
225
225
  try {
226
- console.log('SvelteKit server.respond called with:', {
227
- url: webRequest.url,
228
- method: webRequest.method,
229
- hasBody: webRequest.body !== null,
230
- platform: {
231
- hasEnv: !!globalThis.platform?.env,
232
- hasKv: !!globalThis.platform?.kv,
233
- hasDb: !!globalThis.platform?.db
234
- }
235
- });
226
+ // console.log('SvelteKit server.respond called with:', {
227
+ // url: webRequest.url,
228
+ // method: webRequest.method,
229
+ // hasBody: webRequest.body !== null,
230
+ // platform: {
231
+ // hasEnv: !!globalThis.platform?.env,
232
+ // hasKv: !!globalThis.platform?.kv,
233
+ // hasDb: !!globalThis.platform?.db
234
+ // }
235
+ // });
236
236
 
237
237
  const response = await server.respond(webRequest, {
238
238
  platform: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maravilla-labs/adapter-sveltekit",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "SvelteKit adapter for Maravilla Runtime",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",