@strifeapp/astro 1.0.24 → 1.0.25
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 +20 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -265,13 +265,13 @@ function storeAs(name, value) {
|
|
|
265
265
|
function h(t) {
|
|
266
266
|
return {
|
|
267
267
|
name: "strife:store",
|
|
268
|
-
resolveId(
|
|
269
|
-
if (
|
|
268
|
+
resolveId(s) {
|
|
269
|
+
if (s === m)
|
|
270
270
|
return p;
|
|
271
271
|
},
|
|
272
|
-
load(
|
|
272
|
+
load(s) {
|
|
273
273
|
var o;
|
|
274
|
-
if (
|
|
274
|
+
if (s === p)
|
|
275
275
|
return `
|
|
276
276
|
import { DocumentStore, AbstractJavaScriptMultiMapIndexCreationTask, IndexCreation } from "ravendb";
|
|
277
277
|
|
|
@@ -322,45 +322,41 @@ function h(t) {
|
|
|
322
322
|
const T = {
|
|
323
323
|
type: "pfx"
|
|
324
324
|
};
|
|
325
|
-
function
|
|
326
|
-
let o = process.env.STRIFE_DATABASE_URLS, e = process.env.STRIFE_DATABASE, r = process.env.STRIFE_CERTIFICATE,
|
|
327
|
-
if (!o || !e || !r || !
|
|
328
|
-
const n = f(t,
|
|
329
|
-
o = o || n.STRIFE_DATABASE_URLS, e = e || n.STRIFE_DATABASE, r = r || n.STRIFE_CERTIFICATE,
|
|
325
|
+
function R(t, s) {
|
|
326
|
+
let o = process.env.STRIFE_DATABASE_URLS, e = process.env.STRIFE_DATABASE, r = process.env.STRIFE_CERTIFICATE, l = process.env.STRIFE_CERTIFICATE_PASSWORD;
|
|
327
|
+
if (!o || !e || !r || !l) {
|
|
328
|
+
const n = f(t, s ?? "", "");
|
|
329
|
+
o = o || n.STRIFE_DATABASE_URLS, e = e || n.STRIFE_DATABASE, r = r || n.STRIFE_CERTIFICATE, l = l || n.STRIFE_CERTIFICATE_PASSWORD;
|
|
330
330
|
}
|
|
331
|
-
return console.log("[strifeIntegration] Loaded environment variables:"), console.log(` STRIFE_DATABASE_URLS: ${o ? "[SET]" : "[NOT SET]"}`), console.log(` STRIFE_DATABASE: ${e || "[NOT SET]"}`), console.log(` STRIFE_CERTIFICATE: ${r ? `[SET, length=${r.length}]` : "[NOT SET]"}`), console.log(` STRIFE_CERTIFICATE_PASSWORD: ${
|
|
331
|
+
return console.log("[strifeIntegration] Loaded environment variables:"), console.log(` STRIFE_DATABASE_URLS: ${o ? "[SET]" : "[NOT SET]"}`), console.log(` STRIFE_DATABASE: ${e || "[NOT SET]"}`), console.log(` STRIFE_CERTIFICATE: ${r ? `[SET, length=${r.length}]` : "[NOT SET]"}`), console.log(` STRIFE_CERTIFICATE_PASSWORD: ${l ? "[SET]" : "[NOT SET]"}`), {
|
|
332
332
|
urls: o ? o.split(",").map((n) => n.trim()).filter(Boolean) : void 0,
|
|
333
333
|
database: e || void 0,
|
|
334
334
|
certificate: r || void 0,
|
|
335
|
-
password:
|
|
335
|
+
password: l || void 0
|
|
336
336
|
};
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function v(t) {
|
|
339
339
|
return {
|
|
340
340
|
name: "@strife/astro",
|
|
341
341
|
hooks: {
|
|
342
|
-
"astro:config:setup": ({ command:
|
|
343
|
-
const r = o.vite.envDir || process.cwd(),
|
|
344
|
-
console.log("[strifeIntegration] envOptions:", JSON.stringify(a, null, 2)), t ? console.log("[strifeIntegration] options passed by user:", JSON.stringify(t, null, 2)) : console.log("[strifeIntegration] No options explicitly passed.");
|
|
345
|
-
const n = {
|
|
342
|
+
"astro:config:setup": ({ command: s, config: o, updateConfig: e }) => {
|
|
343
|
+
const r = o.vite.envDir || process.cwd(), l = R(s, r), n = {
|
|
346
344
|
...T,
|
|
347
345
|
...Object.fromEntries(
|
|
348
|
-
Object.entries(
|
|
346
|
+
Object.entries(l).filter(([a, i]) => !!i)
|
|
349
347
|
),
|
|
350
348
|
...t ? Object.fromEntries(
|
|
351
|
-
Object.entries(t).filter(([
|
|
349
|
+
Object.entries(t).filter(([a, i]) => !!i)
|
|
352
350
|
) : {}
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
const c = ["urls", "database", "certificate", "password"], u = c.filter(
|
|
356
|
-
(s) => !n[s] || Array.isArray(n[s]) && n[s].length === 0
|
|
351
|
+
}, c = ["urls", "database", "certificate", "password"], u = c.filter(
|
|
352
|
+
(a) => !n[a] || Array.isArray(n[a]) && n[a].length === 0
|
|
357
353
|
);
|
|
358
354
|
if (u.length > 0)
|
|
359
355
|
throw new Error(
|
|
360
356
|
`[strifeIntegration] Missing required environment variables: ${u.join(", ")}.
|
|
361
357
|
Set them in your .env file (for local) or Vercel project settings (for deployment).
|
|
362
358
|
Current values:
|
|
363
|
-
` + c.map((
|
|
359
|
+
` + c.map((a) => ` ${a}: ${JSON.stringify(n[a])}`).join(`
|
|
364
360
|
`)
|
|
365
361
|
);
|
|
366
362
|
e({
|
|
@@ -375,5 +371,5 @@ Current values:
|
|
|
375
371
|
};
|
|
376
372
|
}
|
|
377
373
|
export {
|
|
378
|
-
|
|
374
|
+
v as default
|
|
379
375
|
};
|