@openpolicy/astro 0.0.11 → 0.0.13
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/README.md +2 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Astro integration for compiling [OpenPolicy](https://openpolicy.sh) policy documents at build time.
|
|
4
4
|
|
|
5
|
-
A first-class Astro integration that compiles `
|
|
5
|
+
A first-class Astro integration that compiles `defineConfig()` configs to Markdown or HTML — on every build and on save in dev mode. Delegates to `@openpolicy/vite` under the hood.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -31,10 +31,6 @@ import { openPolicy } from "@openpolicy/astro";
|
|
|
31
31
|
export default defineConfig({
|
|
32
32
|
integrations: [
|
|
33
33
|
openPolicy({
|
|
34
|
-
configs: [
|
|
35
|
-
"privacy.config.ts",
|
|
36
|
-
{ config: "terms.config.ts", type: "terms" },
|
|
37
|
-
],
|
|
38
34
|
formats: ["markdown"],
|
|
39
35
|
outDir: "src/generated/policies",
|
|
40
36
|
}),
|
|
@@ -46,7 +42,7 @@ export default defineConfig({
|
|
|
46
42
|
|
|
47
43
|
| Option | Type | Default | Description |
|
|
48
44
|
|---|---|---|---|
|
|
49
|
-
| `
|
|
45
|
+
| `configPath` | `string` | `"openpolicy.ts"` | Path to the unified policy config file, relative to the Astro root. |
|
|
50
46
|
| `formats` | `OutputFormat[]` | `["markdown"]` | `"markdown"` or `"html"` |
|
|
51
47
|
| `outDir` | `string` | `"public/policies"` | Output directory, relative to the Astro root |
|
|
52
48
|
|
package/dist/index.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ import { AstroIntegration } from "astro";
|
|
|
4
4
|
//#region src/index.d.ts
|
|
5
5
|
declare function openPolicy(options?: OpenPolicyOptions): AstroIntegration;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { type OpenPolicyOptions, openPolicy
|
|
7
|
+
export { type OpenPolicyOptions, openPolicy };
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +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
|
|
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"],"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
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openpolicy/astro",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Astro integration for compiling OpenPolicy documents at build time",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "GPL-3.0-only",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/jamiedavenport/openpolicy",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"astro": ">=4.0.0",
|
|
35
|
-
"@openpolicy/vite": ">=0.0.
|
|
36
|
-
"@openpolicy/sdk": ">=0.0.
|
|
37
|
-
"@openpolicy/core": ">=0.0.
|
|
35
|
+
"@openpolicy/vite": ">=0.0.13",
|
|
36
|
+
"@openpolicy/sdk": ">=0.0.13",
|
|
37
|
+
"@openpolicy/core": ">=0.0.13"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@openpolicy/tooling": "workspace:*",
|