@strifeapp/astro 1.0.19 → 1.0.20
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/index.js +13 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -274,7 +274,6 @@ function h(e) {
|
|
|
274
274
|
if (i === p)
|
|
275
275
|
return `
|
|
276
276
|
import { DocumentStore, AbstractJavaScriptMultiMapIndexCreationTask, IndexCreation } from "ravendb";
|
|
277
|
-
import https from 'https';
|
|
278
277
|
|
|
279
278
|
const authOptions = {
|
|
280
279
|
type: 'pfx',
|
|
@@ -309,11 +308,13 @@ function h(e) {
|
|
|
309
308
|
console.log('Deploying index...');
|
|
310
309
|
console.log('[vitePluginStrifeStore] Generating virtual module code with config:', ${JSON.stringify(e, null, 2)});
|
|
311
310
|
console.log('Test SSR fetch to RavenDB:', ${s(((o = e.urls) == null ? void 0 : o[0]) || "")});
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
console.
|
|
316
|
-
})
|
|
311
|
+
console.log('Pinging RavenDB server before connecting...');
|
|
312
|
+
try {
|
|
313
|
+
const res = await fetch(${s((r = e.urls) == null ? void 0 : r[0])}, { method: 'GET' });
|
|
314
|
+
console.log('Ping result status:', res.status);
|
|
315
|
+
} catch (err) {
|
|
316
|
+
console.error('Ping failed:', err);
|
|
317
|
+
}
|
|
317
318
|
|
|
318
319
|
await IndexCreation.createIndexes([new Content_ByUrl()], store);
|
|
319
320
|
|
|
@@ -331,10 +332,10 @@ function h(e) {
|
|
|
331
332
|
}
|
|
332
333
|
};
|
|
333
334
|
}
|
|
334
|
-
const
|
|
335
|
+
const g = {
|
|
335
336
|
type: "pfx"
|
|
336
337
|
};
|
|
337
|
-
function
|
|
338
|
+
function T(e, i) {
|
|
338
339
|
let o = process.env.STRIFE_DATABASE_URLS, r = process.env.STRIFE_DATABASE, a = process.env.STRIFE_CERTIFICATE, t = process.env.STRIFE_CERTIFICATE_PASSWORD;
|
|
339
340
|
if (!o || !r || !a || !t) {
|
|
340
341
|
const n = f(e, i ?? "", "");
|
|
@@ -347,15 +348,15 @@ function g(e, i) {
|
|
|
347
348
|
password: t || void 0
|
|
348
349
|
};
|
|
349
350
|
}
|
|
350
|
-
function
|
|
351
|
+
function E(e) {
|
|
351
352
|
return {
|
|
352
353
|
name: "@strife/astro",
|
|
353
354
|
hooks: {
|
|
354
355
|
"astro:config:setup": ({ command: i, config: o, updateConfig: r }) => {
|
|
355
|
-
const a = o.vite.envDir || process.cwd(), t =
|
|
356
|
+
const a = o.vite.envDir || process.cwd(), t = T(i, a);
|
|
356
357
|
console.log("[strifeIntegration] envOptions:", JSON.stringify(t, null, 2)), e ? console.log("[strifeIntegration] options passed by user:", JSON.stringify(e, null, 2)) : console.log("[strifeIntegration] No options explicitly passed.");
|
|
357
358
|
const n = {
|
|
358
|
-
...
|
|
359
|
+
...g,
|
|
359
360
|
...Object.fromEntries(
|
|
360
361
|
Object.entries(t).filter(([l, d]) => !!d)
|
|
361
362
|
),
|
|
@@ -387,5 +388,5 @@ Current values:
|
|
|
387
388
|
};
|
|
388
389
|
}
|
|
389
390
|
export {
|
|
390
|
-
|
|
391
|
+
E as default
|
|
391
392
|
};
|