@strifeapp/astro 1.0.6 → 1.0.7
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.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AstroIntegration } from 'astro';
|
|
2
|
+
import { IAuthOptions } from 'ravendb';
|
|
3
|
+
export interface IntegrationOptions extends IAuthOptions {
|
|
4
|
+
certificate?: string;
|
|
5
|
+
password?: string;
|
|
6
|
+
urls?: string[];
|
|
7
|
+
database?: string;
|
|
8
|
+
collections?: Collection[];
|
|
9
|
+
}
|
|
10
|
+
export interface Collection {
|
|
11
|
+
name: string;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}
|
|
14
|
+
export default function strifeIntegration(options?: IntegrationOptions): AstroIntegration;
|
package/dist/index.js
CHANGED
|
@@ -208,17 +208,17 @@ function mapDocument(document) {
|
|
|
208
208
|
|
|
209
209
|
return result;
|
|
210
210
|
}
|
|
211
|
-
`, d = "strife:store",
|
|
211
|
+
`, d = "strife:store", i = "\0" + d;
|
|
212
212
|
function h(e) {
|
|
213
213
|
return {
|
|
214
214
|
name: "strife:store",
|
|
215
|
-
resolveId(
|
|
216
|
-
if (
|
|
217
|
-
return
|
|
215
|
+
resolveId(o) {
|
|
216
|
+
if (o === d)
|
|
217
|
+
return i;
|
|
218
218
|
},
|
|
219
|
-
load(
|
|
219
|
+
load(o) {
|
|
220
220
|
var t;
|
|
221
|
-
if (
|
|
221
|
+
if (o === i)
|
|
222
222
|
return `
|
|
223
223
|
import { DocumentStore, AbstractJavaScriptMultiMapIndexCreationTask, IndexCreation } from "ravendb";
|
|
224
224
|
|
|
@@ -240,9 +240,7 @@ function h(e) {
|
|
|
240
240
|
|
|
241
241
|
this.additionalSources = {"Helper": ${r(y)}}
|
|
242
242
|
|
|
243
|
-
${(e.collections || ["Posts"]).map(
|
|
244
|
-
(o) => `this.map("${o.name}", (doc) => mapDocument(doc));`
|
|
245
|
-
).join(`
|
|
243
|
+
${(e.collections || ["Posts"]).map((n) => `this.map("${typeof n == "string" ? n : n.name}", (doc) => mapDocument(doc));`).join(`
|
|
246
244
|
`)}
|
|
247
245
|
|
|
248
246
|
this.deploymentMode = 'Rolling';
|
|
@@ -255,8 +253,8 @@ function h(e) {
|
|
|
255
253
|
|
|
256
254
|
const bulkInsert = store.bulkInsert();
|
|
257
255
|
|
|
258
|
-
${(t = e.collections) == null ? void 0 : t.map((
|
|
259
|
-
bulkInsert.store(${
|
|
256
|
+
${(t = e.collections) == null ? void 0 : t.map((n) => `
|
|
257
|
+
bulkInsert.store(${JSON.stringify(n)}, 'templates/${n.name}', { '@collection': 'Templates' });
|
|
260
258
|
`).join(`
|
|
261
259
|
`)}
|
|
262
260
|
|
|
@@ -270,16 +268,16 @@ function h(e) {
|
|
|
270
268
|
const v = {
|
|
271
269
|
type: "pfx"
|
|
272
270
|
};
|
|
273
|
-
function
|
|
274
|
-
let
|
|
271
|
+
function N(e) {
|
|
272
|
+
let o, t;
|
|
275
273
|
return {
|
|
276
274
|
name: "@strife/astro",
|
|
277
275
|
hooks: {
|
|
278
|
-
"astro:config:setup": ({ command:
|
|
279
|
-
var
|
|
280
|
-
|
|
276
|
+
"astro:config:setup": ({ command: n, config: a, updateConfig: l }) => {
|
|
277
|
+
var s;
|
|
278
|
+
o = n, t = f(o, a.vite.envDir ?? "", "");
|
|
281
279
|
const c = {
|
|
282
|
-
urls: (
|
|
280
|
+
urls: (s = t.STRIFE_DATABASE_URLS) == null ? void 0 : s.split(","),
|
|
283
281
|
database: t.STRIFE_DATABASE,
|
|
284
282
|
certificate: t.STRIFE_CERTIFICATE,
|
|
285
283
|
password: t.STRIFE_CERTIFICATE_PASSWORD
|
|
@@ -305,5 +303,5 @@ function A(e = {}) {
|
|
|
305
303
|
};
|
|
306
304
|
}
|
|
307
305
|
export {
|
|
308
|
-
|
|
306
|
+
N as default
|
|
309
307
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './vite-plugin-strife-store';
|
package/package.json
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strifeapp/astro",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Official Strife Astro integration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro-integration",
|
|
7
7
|
"withastro",
|
|
8
8
|
"strife"
|
|
9
9
|
],
|
|
10
|
-
"main": "dist/index.js",
|
|
11
|
-
"
|
|
10
|
+
"main": "./dist/index.js",
|
|
11
|
+
"module": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
12
13
|
"type": "module",
|
|
13
14
|
"scripts": {
|
|
14
|
-
"
|
|
15
|
+
"clean": "rm -rf dist",
|
|
16
|
+
"build": "npm run clean && vite build",
|
|
17
|
+
"prepublishOnly": "npm run build"
|
|
15
18
|
},
|
|
16
19
|
"exports": {
|
|
17
|
-
".":
|
|
20
|
+
".": {
|
|
21
|
+
"import": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts"
|
|
23
|
+
},
|
|
18
24
|
"./vite-plugin-strife-store": "./dist/vite-plugin-strife-store-entry.js",
|
|
19
25
|
"./module": "./module.d.ts"
|
|
20
26
|
},
|
|
@@ -29,6 +35,7 @@
|
|
|
29
35
|
},
|
|
30
36
|
"devDependencies": {
|
|
31
37
|
"@types/dotenv": "^8.2.0",
|
|
38
|
+
"rimraf": "^6.0.1",
|
|
32
39
|
"typescript": "^5.7.3",
|
|
33
40
|
"vite": "^6.2.1",
|
|
34
41
|
"vite-plugin-dts": "^4.5.3"
|
|
@@ -36,5 +43,10 @@
|
|
|
36
43
|
"peerDependencies": {
|
|
37
44
|
"astro": "^4.0.0 || ^5.0.0",
|
|
38
45
|
"ravendb": "^6.0.0"
|
|
46
|
+
},
|
|
47
|
+
"compilerOptions": {
|
|
48
|
+
"declaration": true,
|
|
49
|
+
"emitDeclarationOnly": false,
|
|
50
|
+
"outDir": "dist"
|
|
39
51
|
}
|
|
40
52
|
}
|