@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.
Files changed (2) hide show
  1. package/dist/index.js +20 -24
  2. 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(l) {
269
- if (l === m)
268
+ resolveId(s) {
269
+ if (s === m)
270
270
  return p;
271
271
  },
272
- load(l) {
272
+ load(s) {
273
273
  var o;
274
- if (l === p)
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 g(t, l) {
326
- let o = process.env.STRIFE_DATABASE_URLS, e = process.env.STRIFE_DATABASE, r = process.env.STRIFE_CERTIFICATE, a = process.env.STRIFE_CERTIFICATE_PASSWORD;
327
- if (!o || !e || !r || !a) {
328
- const n = f(t, l ?? "", "");
329
- o = o || n.STRIFE_DATABASE_URLS, e = e || n.STRIFE_DATABASE, r = r || n.STRIFE_CERTIFICATE, a = a || n.STRIFE_CERTIFICATE_PASSWORD;
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: ${a ? "[SET]" : "[NOT SET]"}`), {
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: a || void 0
335
+ password: l || void 0
336
336
  };
337
337
  }
338
- function E(t) {
338
+ function v(t) {
339
339
  return {
340
340
  name: "@strife/astro",
341
341
  hooks: {
342
- "astro:config:setup": ({ command: l, config: o, updateConfig: e }) => {
343
- const r = o.vite.envDir || process.cwd(), a = g(l, r);
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(a).filter(([s, i]) => !!i)
346
+ Object.entries(l).filter(([a, i]) => !!i)
349
347
  ),
350
348
  ...t ? Object.fromEntries(
351
- Object.entries(t).filter(([s, i]) => !!i)
349
+ Object.entries(t).filter(([a, i]) => !!i)
352
350
  ) : {}
353
- };
354
- console.log("[strifeIntegration] Final mergedOptions:", JSON.stringify(n, null, 2));
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((s) => ` ${s}: ${JSON.stringify(n[s])}`).join(`
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
- E as default
374
+ v as default
379
375
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strifeapp/astro",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "Official Strife Astro integration",
5
5
  "keywords": [
6
6
  "astro-integration",