@kirigami/php-prepros 1.1.0-1 → 1.1.0

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/index.d.ts +2 -42
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * @example
11
11
  * ```js
12
- * import { render, sitemap, runenv } from '@kirigami/php-prepros';
12
+ * import { render, sitemap } from '@kirigami/php-prepros';
13
13
  *
14
14
  * // Compile a single page
15
15
  * const result = await render('src/index.php');
@@ -19,9 +19,6 @@
19
19
  *
20
20
  * // Generate sitemap.xml
21
21
  * const sitemap = await sitemap();
22
- *
23
- * // Run an arbitrary PHP script in the same sandboxed environment
24
- * const result = await runenv('scripts/purge-cache.php');
25
22
  * ```
26
23
  */
27
24
 
@@ -109,41 +106,4 @@ export function render(file?: string): Promise<PreprosResult>;
109
106
  * @returns A {@link PreprosResult} with `files` containing the path to the
110
107
  * generated `sitemap.xml`.
111
108
  */
112
- export function sitemap(dir?: string): Promise<PreprosResult>;
113
-
114
-
115
- /**
116
- * Run an arbitrary PHP script — not a page template — inside the same
117
- * sandboxed WASM environment used by {@link render}, with the full
118
- * `php-prepros` class library autoloaded and `kirigami.yaml`'s `kirigami`
119
- * block available as `PREPROS::$config->data`.
120
- *
121
- * Useful for one-off maintenance scripts, data migrations, or CLI-style
122
- * tooling that needs `CACHE`, `SCRAPER`, `IMG`, etc. without going through
123
- * the page-rendering pipeline.
124
- *
125
- * ```js
126
- * // Run a standalone PHP script
127
- * const result = await runenv('scripts/purge-cache.php');
128
- *
129
- * // Also mount extra local paths/files into the sandbox before running
130
- * const result = await runenv('scripts/build-og-images.php', ['assets/photos']);
131
- *
132
- * // Extra arguments are appended and available as $argv[2], $argv[3], … in the script
133
- * const result = await runenv('scripts/import.php', [], '--force');
134
- * ```
135
- *
136
- * @param script Path to a PHP file inside the project, executed with
137
- * `require_once`.
138
- * @param paths Extra local paths (files or directories) to mount into the
139
- * sandbox before the script runs.
140
- * @param args Extra string arguments appended to the script's `$argv`.
141
- *
142
- * @returns A {@link PreprosResult} describing what was written. Call
143
- * `PREPROS::exportFile()` inside the script for any file you want
144
- * listed in `result.files`.
145
- *
146
- * @throws When no `script` path is given.
147
- * @throws When `script` resolves outside the project root, or doesn't exist.
148
- */
149
- export function runenv(script: string, paths?: string[], ...args: string[]): Promise<PreprosResult>;
109
+ export function sitemap(dir?: string): Promise<PreprosResult>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kirigami/php-prepros",
3
- "version": "1.1.0-1",
3
+ "version": "1.1.0",
4
4
  "description": "PHP preprocessor for the Kirigami static site generator. Compile PHP page templates to clean, deployable HTML — with zero server dependency.",
5
5
  "keywords": [
6
6
  "kirigami",