@openpolicy/astro 0.0.8
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 +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/package.json +42 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OpenPolicyOptions } from "@openpolicy/vite";
|
|
2
|
+
import { AstroIntegration } from "astro";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
declare function openPolicy(options?: OpenPolicyOptions): AstroIntegration;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { type OpenPolicyOptions, openPolicy as default, openPolicy };
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;iBAMgB,UAAA,CAAW,OAAA,GAAS,iBAAA,GAAyB,gBAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { openPolicy as openPolicy$1 } from "@openpolicy/vite";
|
|
2
|
+
//#region src/index.ts
|
|
3
|
+
function openPolicy(options = {}) {
|
|
4
|
+
return {
|
|
5
|
+
name: "@openpolicy/astro",
|
|
6
|
+
hooks: { "astro:config:setup": ({ updateConfig }) => {
|
|
7
|
+
updateConfig({ vite: { plugins: [openPolicy$1(options)] } });
|
|
8
|
+
} }
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { openPolicy as default, openPolicy };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["openPolicyVite"],"sources":["../src/index.ts"],"sourcesContent":["import type { OpenPolicyOptions } from \"@openpolicy/vite\";\nimport { openPolicy as openPolicyVite } from \"@openpolicy/vite\";\nimport type { AstroIntegration } from \"astro\";\n\nexport type { OpenPolicyOptions };\n\nexport function openPolicy(options: OpenPolicyOptions = {}): AstroIntegration {\n\treturn {\n\t\tname: \"@openpolicy/astro\",\n\t\thooks: {\n\t\t\t\"astro:config:setup\": ({ updateConfig }) => {\n\t\t\t\tupdateConfig({\n\t\t\t\t\tvite: {\n\t\t\t\t\t\t// biome-ignore lint/suspicious/noExplicitAny: Cast needed: astro bundles its own vite version, causing Plugin type mismatch\n\t\t\t\t\t\tplugins: [openPolicyVite(options) as any],\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t},\n\t\t},\n\t};\n}\n\nexport default openPolicy;\n"],"mappings":";;AAMA,SAAgB,WAAW,UAA6B,EAAE,EAAoB;AAC7E,QAAO;EACN,MAAM;EACN,OAAO,EACN,uBAAuB,EAAE,mBAAmB;AAC3C,gBAAa,EACZ,MAAM,EAEL,SAAS,CAACA,aAAe,QAAQ,CAAQ,EACzC,EACD,CAAC;KAEH;EACD"}
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@openpolicy/astro",
|
|
3
|
+
"version": "0.0.8",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Astro integration for compiling OpenPolicy documents at build time",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/jamiedavenport/openpolicy",
|
|
10
|
+
"directory": "packages/astro"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"astro-integration",
|
|
14
|
+
"openpolicy",
|
|
15
|
+
"privacy-policy"
|
|
16
|
+
],
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"import": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"dev": "rolldown -c --watch",
|
|
29
|
+
"build": "rolldown -c",
|
|
30
|
+
"check-types": "tsc --noEmit",
|
|
31
|
+
"test": "bun test"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"astro": ">=4.0.0",
|
|
35
|
+
"@openpolicy/vite": ">=0.0.8"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@openpolicy/tooling": "workspace:*",
|
|
39
|
+
"@openpolicy/vite": "workspace:*",
|
|
40
|
+
"astro": "^5.0.0"
|
|
41
|
+
}
|
|
42
|
+
}
|