@strifeapp/astro 1.0.1 → 1.0.3

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 CHANGED
@@ -1,7 +1,10 @@
1
- import { vitePluginStrifeStore } from './vite-plugin-strife-store';
1
+ // Import the vite plugin using a relative path with .js extension
2
+ import { vitePluginStrifeStore } from './vite-plugin-strife-store.js';
3
+
2
4
  const defaultClientConfig = {
3
5
  type: 'pfx',
4
6
  };
7
+
5
8
  export default function strifeIntegration(options = {}) {
6
9
  // Validate options
7
10
  /* if (!options.apiKey) {
@@ -0,0 +1 @@
1
+ export * from './vite-plugin-strife-store';
@@ -0,0 +1,2 @@
1
+ // This file serves as an entry point for the vite-plugin-strife-store module
2
+ export * from './vite-plugin-strife-store.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strifeapp/astro",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Official Strife Astro integration",
5
5
  "keywords": [
6
6
  "astro-integration",
@@ -14,7 +14,8 @@
14
14
  "build": "tsc"
15
15
  },
16
16
  "exports": {
17
- ".": "./dist/index.js"
17
+ ".": "./dist/index.js",
18
+ "./vite-plugin-strife-store": "./dist/vite-plugin-strife-store-entry.js"
18
19
  },
19
20
  "files": [
20
21
  "dist"
@@ -30,5 +31,5 @@
30
31
  "peerDependencies": {
31
32
  "astro": "^4.0.0 || ^5.0.0",
32
33
  "ravendb": "^6.0.0"
33
- }
34
+ }
34
35
  }
@@ -1,3 +0,0 @@
1
- import type { IntegrationOptions } from './index';
2
- import type { PluginOption } from 'vite';
3
- export declare function vitePluginStrifeClient(config: IntegrationOptions): PluginOption;
@@ -1,33 +0,0 @@
1
- //import type {ClientConfig} from '@sanity/client'
2
- import serialize from 'serialize-javascript';
3
- const virtualModuleId = 'strife:store';
4
- const resolvedVirtualModuleId = '\0' + virtualModuleId;
5
- export function vitePluginStrifeClient(config) {
6
- return {
7
- name: 'strife:store',
8
- resolveId(id) {
9
- if (id === virtualModuleId) {
10
- return resolvedVirtualModuleId;
11
- }
12
- },
13
- load(id) {
14
- if (id === resolvedVirtualModuleId) {
15
- return `
16
- import { DocumentStore } from "ravendb";
17
-
18
- const authOptions = {
19
- type: 'pfx',
20
- certificate: Buffer.from(${serialize(config.certificate)}, 'base64'),
21
- password: ${serialize(config.password)},
22
- };
23
-
24
- export const store = new DocumentStore(
25
- ${serialize(config.urls ? config.urls : [])},
26
- ${serialize(config.database || 'default')},
27
- authOptions
28
- ).initialize();
29
- `;
30
- }
31
- },
32
- };
33
- }