@wp-playground/blueprints 0.1.61 → 0.3.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.
@@ -1,230 +0,0 @@
1
- import { PHPRunOptions, PHPRequest } from '@php-wasm/universal';
2
- import { StepHandler } from '.';
3
- /**
4
- * @inheritDoc runPHP
5
- * @hasRunnableExample
6
- * @example
7
- *
8
- * <code>
9
- * {
10
- * "step": "runPHP",
11
- * "code": "<?php echo 'Hello World'; ?>"
12
- * }
13
- * </code>
14
- */
15
- export interface RunPHPStep {
16
- /** The step identifier. */
17
- step: 'runPHP';
18
- /** The PHP code to run. */
19
- code: string;
20
- }
21
- /**
22
- * Runs PHP code.
23
- */
24
- export declare const runPHP: StepHandler<RunPHPStep>;
25
- /**
26
- * @inheritDoc runPHP
27
- * @hasRunnableExample
28
- * @example
29
- *
30
- * <code>
31
- * {
32
- * "step": "runPHP",
33
- * "options": {
34
- * "code": "<?php echo $_SERVER['CONTENT_TYPE']; ?>",
35
- * "headers": {
36
- * "Content-type": "text/plain"
37
- * }
38
- * }
39
- * }
40
- * </code>
41
- */
42
- export interface RunPHPWithOptionsStep {
43
- step: 'runPHPWithOptions';
44
- options: PHPRunOptions;
45
- }
46
- /**
47
- * Runs PHP code with the given options.
48
- */
49
- export declare const runPHPWithOptions: StepHandler<RunPHPWithOptionsStep>;
50
- /**
51
- * @inheritDoc setPhpIniEntry
52
- * @hasRunnableExample
53
- * @example
54
- *
55
- * <code>
56
- * {
57
- * "step": "setPhpIniEntry",
58
- * "key": "display_errors",
59
- * "value": "1"
60
- * }
61
- * </code>
62
- */
63
- export interface SetPhpIniEntryStep {
64
- step: 'setPhpIniEntry';
65
- key: string;
66
- value: string;
67
- }
68
- /**
69
- * Sets a PHP ini entry.
70
- */
71
- export declare const setPhpIniEntry: StepHandler<SetPhpIniEntryStep>;
72
- /**
73
- * @inheritDoc request
74
- * @needsLogin
75
- * @hasRunnableExample
76
- * @example
77
- *
78
- * <code>
79
- * {
80
- * "step": "request",
81
- * "request": {
82
- * "method": "POST",
83
- * "url": "/wp-admin/admin-ajax.php",
84
- * "formData": {
85
- * "action": "my_action",
86
- * "foo": "bar"
87
- * }
88
- * }
89
- * }
90
- * </code>
91
- */
92
- export interface RequestStep {
93
- step: 'request';
94
- request: PHPRequest;
95
- }
96
- /**
97
- * Sends a HTTP request to the Playground.
98
- */
99
- export declare const request: StepHandler<RequestStep>;
100
- /**
101
- * @inheritDoc cp
102
- * @hasRunnableExample
103
- * @landingPage /index2.php
104
- * @example
105
- *
106
- * <code>
107
- * {
108
- * "step": "cp",
109
- * "fromPath": "/wordpress/index.php",
110
- * "toPath": "/wordpress/index2.php"
111
- * }
112
- * </code>
113
- */
114
- export interface CpStep {
115
- step: 'cp';
116
- fromPath: string;
117
- toPath: string;
118
- }
119
- /**
120
- * Copies a file from one path to another.
121
- */
122
- export declare const cp: StepHandler<CpStep>;
123
- /**
124
- * @inheritDoc mv
125
- * @hasRunnableExample
126
- * @landingPage /index2.php
127
- * @example
128
- *
129
- * <code>
130
- * {
131
- * "step": "mv",
132
- * "fromPath": "/wordpress/index.php",
133
- * "toPath": "/wordpress/index2.php"
134
- * }
135
- * </code>
136
- */
137
- export interface MvStep {
138
- step: 'mv';
139
- fromPath: string;
140
- toPath: string;
141
- }
142
- /**
143
- * Moves a file or directory from one path to another.
144
- */
145
- export declare const mv: StepHandler<MvStep>;
146
- /**
147
- * @inheritDoc mkdir
148
- * @hasRunnableExample
149
- * @example
150
- *
151
- * <code>
152
- * {
153
- * "step": "mkdir",
154
- * "path": "/wordpress/my-new-folder"
155
- * }
156
- * </code>
157
- */
158
- export interface MkdirStep {
159
- step: 'mkdir';
160
- path: string;
161
- }
162
- /**
163
- * Creates a directory at the specified path.
164
- */
165
- export declare const mkdir: StepHandler<MkdirStep>;
166
- /**
167
- * @inheritDoc rm
168
- * @hasRunnableExample
169
- * @landingPage /index.php
170
- * @example
171
- *
172
- * <code>
173
- * {
174
- * "step": "rm",
175
- * "path": "/wordpress/index.php"
176
- * }
177
- * </code>
178
- */
179
- export interface RmStep {
180
- step: 'rm';
181
- path: string;
182
- }
183
- /**
184
- * Removes a file at the specified path.
185
- */
186
- export declare const rm: StepHandler<RmStep>;
187
- /**
188
- * @inheritDoc rmdir
189
- * @hasRunnableExample
190
- * @landingPage /wp-admin/
191
- * @example
192
- *
193
- * <code>
194
- * {
195
- * "step": "rm",
196
- * "path": "/wordpress/wp-admin"
197
- * }
198
- * </code>
199
- */
200
- export interface RmdirStep {
201
- step: 'rmdir';
202
- path: string;
203
- }
204
- /**
205
- * Removes a directory at the specified path.
206
- */
207
- export declare const rmdir: StepHandler<RmdirStep>;
208
- /**
209
- * @inheritDoc writeFile
210
- * @hasRunnableExample
211
- * @landingPage /test.php
212
- * @example
213
- *
214
- * <code>
215
- * {
216
- * "step": "writeFile",
217
- * "path": "/wordpress/test.php",
218
- * "data": "<?php echo 'Hello World!'; ?>"
219
- * }
220
- * </code>
221
- */
222
- export interface WriteFileStep<ResourceType> {
223
- step: 'writeFile';
224
- path: string;
225
- data: ResourceType | string | Uint8Array;
226
- }
227
- /**
228
- * Writes data to a file at the specified path.
229
- */
230
- export declare const writeFile: StepHandler<WriteFileStep<File>>;