@wp-playground/blueprints 1.0.4 → 1.0.5

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 (3) hide show
  1. package/index.cjs +4 -8
  2. package/index.js +4 -8
  3. package/package.json +11 -11
package/index.cjs CHANGED
@@ -53,20 +53,16 @@
53
53
  require_once ${i.docroot} . '/wp-load.php';
54
54
 
55
55
  $handle = fopen(${i.sqlFilename}, 'r');
56
- $buffer = '';
57
56
 
58
57
  global $wpdb;
59
58
 
60
- while ($bytes = fgets($handle)) {
61
- $buffer .= $bytes;
62
-
63
- if (!feof($handle) && substr($buffer, -1, 1) !== "
64
- ") {
59
+ while ($line = fgets($handle)) {
60
+ if(trim($line, "
61
+ ;") === '') {
65
62
  continue;
66
63
  }
67
64
 
68
- $wpdb->query($buffer);
69
- $buffer = '';
65
+ $wpdb->query($line);
70
66
  }
71
67
  `});return await lr(r,{path:c}),e},jr=async(r,{request:t})=>{ce.logger.warn('Deprecated: The Blueprint step "request" is deprecated and will be removed in a future release.');const p=await r.request(t);if(p.httpStatusCode>399||p.httpStatusCode<200)throw ce.logger.warn("WordPress response was",{response:p}),new Error(`Request failed with status ${p.httpStatusCode}`);return p},Jr=`<?php
72
68
 
package/index.js CHANGED
@@ -116,20 +116,16 @@ const hr = [
116
116
  require_once ${i.docroot} . '/wp-load.php';
117
117
 
118
118
  $handle = fopen(${i.sqlFilename}, 'r');
119
- $buffer = '';
120
119
 
121
120
  global $wpdb;
122
121
 
123
- while ($bytes = fgets($handle)) {
124
- $buffer .= $bytes;
125
-
126
- if (!feof($handle) && substr($buffer, -1, 1) !== "
127
- ") {
122
+ while ($line = fgets($handle)) {
123
+ if(trim($line, "
124
+ ;") === '') {
128
125
  continue;
129
126
  }
130
127
 
131
- $wpdb->query($buffer);
132
- $buffer = '';
128
+ $wpdb->query($line);
133
129
  }
134
130
  `
135
131
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wp-playground/blueprints",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "exports": {
5
5
  ".": {
6
6
  "import": "./index.js",
@@ -21,7 +21,7 @@
21
21
  "access": "public",
22
22
  "directory": "../../../dist/packages/playground/blueprints"
23
23
  },
24
- "gitHead": "fd76ee2ebbe3d3ff71cf19ab7fe010dca8bcc17b",
24
+ "gitHead": "46db8582432b91516c1f25c591d2d0f346b99c5c",
25
25
  "engines": {
26
26
  "node": ">=18.18.0",
27
27
  "npm": ">=8.11.0"
@@ -44,14 +44,14 @@
44
44
  "sha.js": "2.4.11",
45
45
  "simple-get": "4.0.1",
46
46
  "wasm-feature-detect": "1.8.0",
47
- "@php-wasm/node-polyfills": "1.0.4",
48
- "@php-wasm/universal": "1.0.4",
49
- "@wp-playground/common": "1.0.4",
50
- "@php-wasm/node": "1.0.4",
51
- "@php-wasm/progress": "1.0.4",
52
- "@php-wasm/util": "1.0.4",
53
- "@php-wasm/logger": "1.0.4",
54
- "@wp-playground/storage": "1.0.4",
55
- "@wp-playground/wordpress": "1.0.4"
47
+ "@php-wasm/node-polyfills": "1.0.5",
48
+ "@php-wasm/universal": "1.0.5",
49
+ "@wp-playground/common": "1.0.5",
50
+ "@php-wasm/node": "1.0.5",
51
+ "@php-wasm/progress": "1.0.5",
52
+ "@php-wasm/util": "1.0.5",
53
+ "@php-wasm/logger": "1.0.5",
54
+ "@wp-playground/storage": "1.0.5",
55
+ "@wp-playground/wordpress": "1.0.5"
56
56
  }
57
57
  }