@wp-playground/tools 3.1.45 → 3.1.47
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/index.cjs +1 -1
- package/index.cjs.map +1 -1
- package/index.js +17 -7
- package/index.js.map +1 -1
- package/package.json +4 -3
- package/phpmyadmin/index.d.ts +11 -0
package/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="5.2.3",
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("@php-wasm/util"),e="5.2.3",P=`https://files.phpmyadmin.net/phpMyAdmin/${e}/phpMyAdmin-${e}-english.zip`,t="/tools/phpmyadmin",i=p.joinPaths(t,"config.inc.php"),s="/phpmyadmin",A="/index.php?route=/database/structure&db=wordpress",M={urlPrefix:s,fsPath:t};async function n(){return[{step:"unzip",zipFile:{resource:"url",url:P},extractToPath:"/tmp"},{step:"mkdir",path:t},{step:"mv",fromPath:`/tmp/phpMyAdmin-${e}-english`,toPath:t},{step:"writeFile",path:`${t}/libraries/classes/Dbal/DbiMysqli.php`,data:(await Promise.resolve().then(()=>require("./DbiMysqli-B38TcdRZ.cjs"))).default},{step:"writeFile",path:i,data:(await Promise.resolve().then(()=>require("./config.inc-BPj6j876.cjs"))).default}]}exports.PHPMYADMIN_CONFIG_PATH=i;exports.PHPMYADMIN_DOWNLOAD_URL=P;exports.PHPMYADMIN_ENTRY_PATH=A;exports.PHPMYADMIN_INSTALL_PATH=t;exports.PHPMYADMIN_PATH_ALIAS=M;exports.PHPMYADMIN_URL_PATH=s;exports.PHPMYADMIN_VERSION=e;exports.getPhpMyAdminInstallSteps=n;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../packages/playground/tools/src/phpmyadmin/index.ts"],"sourcesContent":["import type { StepDefinition } from '@wp-playground/blueprints';\n\nexport const PHPMYADMIN_VERSION = '5.2.3';\nexport const PHPMYADMIN_DOWNLOAD_URL = `https://files.phpmyadmin.net/phpMyAdmin/${PHPMYADMIN_VERSION}/phpMyAdmin-${PHPMYADMIN_VERSION}-english.zip`;\nexport const PHPMYADMIN_INSTALL_PATH = '/tools/phpmyadmin';\nexport const PHPMYADMIN_ENTRY_PATH =\n\t'/index.php?route=/database/structure&db=wordpress';\n\n/**\n * Returns the blueprint steps needed to install phpMyAdmin in Playground.\n *\n * This installs phpMyAdmin and applies the following modifications:\n * 1. Inject a \"config.inc.php\" file to configure phpMyAdmin for Playground.\n * 2. Inject a \"DbiMysqli.php\" file to implement the MySQL-on-SQLite driver.\n *\n * @returns Blueprint steps to install phpMyAdmin in Playground.\n */\nexport async function getPhpMyAdminInstallSteps(): Promise<StepDefinition[]> {\n\treturn [\n\t\t{\n\t\t\tstep: 'unzip',\n\t\t\tzipFile: {\n\t\t\t\tresource: 'url',\n\t\t\t\turl: PHPMYADMIN_DOWNLOAD_URL,\n\t\t\t},\n\t\t\textractToPath: '/tmp',\n\t\t},\n\t\t{\n\t\t\tstep: 'mkdir',\n\t\t\tpath: PHPMYADMIN_INSTALL_PATH,\n\t\t},\n\t\t{\n\t\t\tstep: 'mv',\n\t\t\tfromPath: `/tmp/phpMyAdmin-${PHPMYADMIN_VERSION}-english`,\n\t\t\ttoPath: PHPMYADMIN_INSTALL_PATH,\n\t\t},\n\t\t{\n\t\t\tstep: 'writeFile',\n\t\t\tpath: `${PHPMYADMIN_INSTALL_PATH}/libraries/classes/Dbal/DbiMysqli.php`,\n\t\t\t/* @ts-ignore */\n\t\t\tdata: (await import('./DbiMysqli.php?raw')).default as string,\n\t\t},\n\t\t{\n\t\t\tstep: 'writeFile',\n\t\t\tpath:
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../packages/playground/tools/src/phpmyadmin/index.ts"],"sourcesContent":["import type { StepDefinition } from '@wp-playground/blueprints';\nimport { joinPaths } from '@php-wasm/util';\n\n/**\n * phpMyAdmin installation, detection, URL construction, and request routing\n * live in separate consumers (Website, Personal WP, and CLI). These values are\n * exported from one place to keep that shared contract in sync.\n */\n\n// Keep the downloaded archive and its extracted directory name on the same release.\nexport const PHPMYADMIN_VERSION = '5.2.3';\n\n// The archive installed by the shared Blueprint steps.\nexport const PHPMYADMIN_DOWNLOAD_URL = `https://files.phpmyadmin.net/phpMyAdmin/${PHPMYADMIN_VERSION}/phpMyAdmin-${PHPMYADMIN_VERSION}-english.zip`;\n\n// PHP filesystem path, kept outside the WordPress document root and site exports.\nexport const PHPMYADMIN_INSTALL_PATH = '/tools/phpmyadmin';\n\n// Complete-install marker checked by the UI before deciding whether to reinstall.\nexport const PHPMYADMIN_CONFIG_PATH = joinPaths(\n\tPHPMYADMIN_INSTALL_PATH,\n\t'config.inc.php'\n);\n\n// Default public URL shared by the browser UIs and CLI.\nexport const PHPMYADMIN_URL_PATH = '/phpmyadmin';\n\n// Initial phpMyAdmin route opened after installation.\nexport const PHPMYADMIN_ENTRY_PATH =\n\t'/index.php?route=/database/structure&db=wordpress';\n\n// Default browser-runtime mapping from the public URL to the PHP filesystem path.\nexport const PHPMYADMIN_PATH_ALIAS = {\n\turlPrefix: PHPMYADMIN_URL_PATH,\n\tfsPath: PHPMYADMIN_INSTALL_PATH,\n} as const;\n\n/**\n * Returns the blueprint steps needed to install phpMyAdmin in Playground.\n *\n * This installs phpMyAdmin and applies the following modifications:\n * 1. Inject a \"config.inc.php\" file to configure phpMyAdmin for Playground.\n * 2. Inject a \"DbiMysqli.php\" file to implement the MySQL-on-SQLite driver.\n *\n * @returns Blueprint steps to install phpMyAdmin in Playground.\n */\nexport async function getPhpMyAdminInstallSteps(): Promise<StepDefinition[]> {\n\treturn [\n\t\t{\n\t\t\tstep: 'unzip',\n\t\t\tzipFile: {\n\t\t\t\tresource: 'url',\n\t\t\t\turl: PHPMYADMIN_DOWNLOAD_URL,\n\t\t\t},\n\t\t\textractToPath: '/tmp',\n\t\t},\n\t\t{\n\t\t\tstep: 'mkdir',\n\t\t\tpath: PHPMYADMIN_INSTALL_PATH,\n\t\t},\n\t\t{\n\t\t\tstep: 'mv',\n\t\t\tfromPath: `/tmp/phpMyAdmin-${PHPMYADMIN_VERSION}-english`,\n\t\t\ttoPath: PHPMYADMIN_INSTALL_PATH,\n\t\t},\n\t\t{\n\t\t\tstep: 'writeFile',\n\t\t\tpath: `${PHPMYADMIN_INSTALL_PATH}/libraries/classes/Dbal/DbiMysqli.php`,\n\t\t\t/* @ts-ignore */\n\t\t\tdata: (await import('./DbiMysqli.php?raw')).default as string,\n\t\t},\n\t\t{\n\t\t\tstep: 'writeFile',\n\t\t\tpath: PHPMYADMIN_CONFIG_PATH,\n\t\t\t/* @ts-ignore */\n\t\t\tdata: (await import('./config.inc.php?raw')).default as string,\n\t\t},\n\t];\n}\n"],"names":["PHPMYADMIN_VERSION","PHPMYADMIN_DOWNLOAD_URL","PHPMYADMIN_INSTALL_PATH","PHPMYADMIN_CONFIG_PATH","joinPaths","PHPMYADMIN_URL_PATH","PHPMYADMIN_ENTRY_PATH","PHPMYADMIN_PATH_ALIAS","getPhpMyAdminInstallSteps"],"mappings":"kHAUaA,EAAqB,QAGrBC,EAA0B,2CAA2CD,CAAkB,eAAeA,CAAkB,eAGxHE,EAA0B,oBAG1BC,EAAyBC,EAAAA,UACrCF,EACA,gBACD,EAGaG,EAAsB,cAGtBC,EACZ,oDAGYC,EAAwB,CACpC,UAAWF,EACX,OAAQH,CACT,EAWA,eAAsBM,GAAuD,CAC5E,MAAO,CACN,CACC,KAAM,QACN,QAAS,CACR,SAAU,MACV,IAAKP,CAAA,EAEN,cAAe,MAAA,EAEhB,CACC,KAAM,QACN,KAAMC,CAAA,EAEP,CACC,KAAM,KACN,SAAU,mBAAmBF,CAAkB,WAC/C,OAAQE,CAAA,EAET,CACC,KAAM,YACN,KAAM,GAAGA,CAAuB,wCAEhC,MAAO,MAAM,QAAA,QAAA,EAAA,KAAA,IAAA,QAAO,0BAAqB,IAAG,OAAA,EAE7C,CACC,KAAM,YACN,KAAMC,EAEN,MAAO,MAAM,QAAA,QAAA,EAAA,KAAA,IAAA,QAAO,2BAAsB,IAAG,OAAA,CAC9C,CAEF"}
|
package/index.js
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { joinPaths as i } from "@php-wasm/util";
|
|
2
|
+
const p = "5.2.3", s = `https://files.phpmyadmin.net/phpMyAdmin/${p}/phpMyAdmin-${p}-english.zip`, t = "/tools/phpmyadmin", e = i(
|
|
3
|
+
t,
|
|
4
|
+
"config.inc.php"
|
|
5
|
+
), a = "/phpmyadmin", P = "/index.php?route=/database/structure&db=wordpress", r = {
|
|
6
|
+
urlPrefix: a,
|
|
7
|
+
fsPath: t
|
|
8
|
+
};
|
|
9
|
+
async function o() {
|
|
3
10
|
return [
|
|
4
11
|
{
|
|
5
12
|
step: "unzip",
|
|
6
13
|
zipFile: {
|
|
7
14
|
resource: "url",
|
|
8
|
-
url:
|
|
15
|
+
url: s
|
|
9
16
|
},
|
|
10
17
|
extractToPath: "/tmp"
|
|
11
18
|
},
|
|
@@ -26,17 +33,20 @@ async function a() {
|
|
|
26
33
|
},
|
|
27
34
|
{
|
|
28
35
|
step: "writeFile",
|
|
29
|
-
path:
|
|
36
|
+
path: e,
|
|
30
37
|
/* @ts-ignore */
|
|
31
38
|
data: (await import("./config.inc-Bc6yvduk.js")).default
|
|
32
39
|
}
|
|
33
40
|
];
|
|
34
41
|
}
|
|
35
42
|
export {
|
|
36
|
-
e as
|
|
37
|
-
|
|
43
|
+
e as PHPMYADMIN_CONFIG_PATH,
|
|
44
|
+
s as PHPMYADMIN_DOWNLOAD_URL,
|
|
45
|
+
P as PHPMYADMIN_ENTRY_PATH,
|
|
38
46
|
t as PHPMYADMIN_INSTALL_PATH,
|
|
47
|
+
r as PHPMYADMIN_PATH_ALIAS,
|
|
48
|
+
a as PHPMYADMIN_URL_PATH,
|
|
39
49
|
p as PHPMYADMIN_VERSION,
|
|
40
|
-
|
|
50
|
+
o as getPhpMyAdminInstallSteps
|
|
41
51
|
};
|
|
42
52
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../packages/playground/tools/src/phpmyadmin/index.ts"],"sourcesContent":["import type { StepDefinition } from '@wp-playground/blueprints';\n\nexport const PHPMYADMIN_VERSION = '5.2.3';\nexport const PHPMYADMIN_DOWNLOAD_URL = `https://files.phpmyadmin.net/phpMyAdmin/${PHPMYADMIN_VERSION}/phpMyAdmin-${PHPMYADMIN_VERSION}-english.zip`;\nexport const PHPMYADMIN_INSTALL_PATH = '/tools/phpmyadmin';\nexport const PHPMYADMIN_ENTRY_PATH =\n\t'/index.php?route=/database/structure&db=wordpress';\n\n/**\n * Returns the blueprint steps needed to install phpMyAdmin in Playground.\n *\n * This installs phpMyAdmin and applies the following modifications:\n * 1. Inject a \"config.inc.php\" file to configure phpMyAdmin for Playground.\n * 2. Inject a \"DbiMysqli.php\" file to implement the MySQL-on-SQLite driver.\n *\n * @returns Blueprint steps to install phpMyAdmin in Playground.\n */\nexport async function getPhpMyAdminInstallSteps(): Promise<StepDefinition[]> {\n\treturn [\n\t\t{\n\t\t\tstep: 'unzip',\n\t\t\tzipFile: {\n\t\t\t\tresource: 'url',\n\t\t\t\turl: PHPMYADMIN_DOWNLOAD_URL,\n\t\t\t},\n\t\t\textractToPath: '/tmp',\n\t\t},\n\t\t{\n\t\t\tstep: 'mkdir',\n\t\t\tpath: PHPMYADMIN_INSTALL_PATH,\n\t\t},\n\t\t{\n\t\t\tstep: 'mv',\n\t\t\tfromPath: `/tmp/phpMyAdmin-${PHPMYADMIN_VERSION}-english`,\n\t\t\ttoPath: PHPMYADMIN_INSTALL_PATH,\n\t\t},\n\t\t{\n\t\t\tstep: 'writeFile',\n\t\t\tpath: `${PHPMYADMIN_INSTALL_PATH}/libraries/classes/Dbal/DbiMysqli.php`,\n\t\t\t/* @ts-ignore */\n\t\t\tdata: (await import('./DbiMysqli.php?raw')).default as string,\n\t\t},\n\t\t{\n\t\t\tstep: 'writeFile',\n\t\t\tpath:
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../packages/playground/tools/src/phpmyadmin/index.ts"],"sourcesContent":["import type { StepDefinition } from '@wp-playground/blueprints';\nimport { joinPaths } from '@php-wasm/util';\n\n/**\n * phpMyAdmin installation, detection, URL construction, and request routing\n * live in separate consumers (Website, Personal WP, and CLI). These values are\n * exported from one place to keep that shared contract in sync.\n */\n\n// Keep the downloaded archive and its extracted directory name on the same release.\nexport const PHPMYADMIN_VERSION = '5.2.3';\n\n// The archive installed by the shared Blueprint steps.\nexport const PHPMYADMIN_DOWNLOAD_URL = `https://files.phpmyadmin.net/phpMyAdmin/${PHPMYADMIN_VERSION}/phpMyAdmin-${PHPMYADMIN_VERSION}-english.zip`;\n\n// PHP filesystem path, kept outside the WordPress document root and site exports.\nexport const PHPMYADMIN_INSTALL_PATH = '/tools/phpmyadmin';\n\n// Complete-install marker checked by the UI before deciding whether to reinstall.\nexport const PHPMYADMIN_CONFIG_PATH = joinPaths(\n\tPHPMYADMIN_INSTALL_PATH,\n\t'config.inc.php'\n);\n\n// Default public URL shared by the browser UIs and CLI.\nexport const PHPMYADMIN_URL_PATH = '/phpmyadmin';\n\n// Initial phpMyAdmin route opened after installation.\nexport const PHPMYADMIN_ENTRY_PATH =\n\t'/index.php?route=/database/structure&db=wordpress';\n\n// Default browser-runtime mapping from the public URL to the PHP filesystem path.\nexport const PHPMYADMIN_PATH_ALIAS = {\n\turlPrefix: PHPMYADMIN_URL_PATH,\n\tfsPath: PHPMYADMIN_INSTALL_PATH,\n} as const;\n\n/**\n * Returns the blueprint steps needed to install phpMyAdmin in Playground.\n *\n * This installs phpMyAdmin and applies the following modifications:\n * 1. Inject a \"config.inc.php\" file to configure phpMyAdmin for Playground.\n * 2. Inject a \"DbiMysqli.php\" file to implement the MySQL-on-SQLite driver.\n *\n * @returns Blueprint steps to install phpMyAdmin in Playground.\n */\nexport async function getPhpMyAdminInstallSteps(): Promise<StepDefinition[]> {\n\treturn [\n\t\t{\n\t\t\tstep: 'unzip',\n\t\t\tzipFile: {\n\t\t\t\tresource: 'url',\n\t\t\t\turl: PHPMYADMIN_DOWNLOAD_URL,\n\t\t\t},\n\t\t\textractToPath: '/tmp',\n\t\t},\n\t\t{\n\t\t\tstep: 'mkdir',\n\t\t\tpath: PHPMYADMIN_INSTALL_PATH,\n\t\t},\n\t\t{\n\t\t\tstep: 'mv',\n\t\t\tfromPath: `/tmp/phpMyAdmin-${PHPMYADMIN_VERSION}-english`,\n\t\t\ttoPath: PHPMYADMIN_INSTALL_PATH,\n\t\t},\n\t\t{\n\t\t\tstep: 'writeFile',\n\t\t\tpath: `${PHPMYADMIN_INSTALL_PATH}/libraries/classes/Dbal/DbiMysqli.php`,\n\t\t\t/* @ts-ignore */\n\t\t\tdata: (await import('./DbiMysqli.php?raw')).default as string,\n\t\t},\n\t\t{\n\t\t\tstep: 'writeFile',\n\t\t\tpath: PHPMYADMIN_CONFIG_PATH,\n\t\t\t/* @ts-ignore */\n\t\t\tdata: (await import('./config.inc.php?raw')).default as string,\n\t\t},\n\t];\n}\n"],"names":["PHPMYADMIN_VERSION","PHPMYADMIN_DOWNLOAD_URL","PHPMYADMIN_INSTALL_PATH","PHPMYADMIN_CONFIG_PATH","joinPaths","PHPMYADMIN_URL_PATH","PHPMYADMIN_ENTRY_PATH","PHPMYADMIN_PATH_ALIAS","getPhpMyAdminInstallSteps"],"mappings":";AAUO,MAAMA,IAAqB,SAGrBC,IAA0B,2CAA2CD,CAAkB,eAAeA,CAAkB,gBAGxHE,IAA0B,qBAG1BC,IAAyBC;AAAA,EACrCF;AAAA,EACA;AACD,GAGaG,IAAsB,eAGtBC,IACZ,qDAGYC,IAAwB;AAAA,EACpC,WAAWF;AAAA,EACX,QAAQH;AACT;AAWA,eAAsBM,IAAuD;AAC5E,SAAO;AAAA,IACN;AAAA,MACC,MAAM;AAAA,MACN,SAAS;AAAA,QACR,UAAU;AAAA,QACV,KAAKP;AAAA,MAAA;AAAA,MAEN,eAAe;AAAA,IAAA;AAAA,IAEhB;AAAA,MACC,MAAM;AAAA,MACN,MAAMC;AAAA,IAAA;AAAA,IAEP;AAAA,MACC,MAAM;AAAA,MACN,UAAU,mBAAmBF,CAAkB;AAAA,MAC/C,QAAQE;AAAA,IAAA;AAAA,IAET;AAAA,MACC,MAAM;AAAA,MACN,MAAM,GAAGA,CAAuB;AAAA;AAAA,MAEhC,OAAO,MAAM,OAAO,yBAAqB,GAAG;AAAA,IAAA;AAAA,IAE7C;AAAA,MACC,MAAM;AAAA,MACN,MAAMC;AAAA;AAAA,MAEN,OAAO,MAAM,OAAO,0BAAsB,GAAG;AAAA,IAAA;AAAA,EAC9C;AAEF;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wp-playground/tools",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.47",
|
|
4
4
|
"description": "Tools for WordPress Playground",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,9 +28,10 @@
|
|
|
28
28
|
"access": "public",
|
|
29
29
|
"directory": "../../../dist/packages/playground/tools"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "c7d8be823578baddc82de1bac34f8882632dab90",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@wp-playground/blueprints": "3.1.
|
|
33
|
+
"@wp-playground/blueprints": "3.1.47",
|
|
34
|
+
"@php-wasm/util": "3.1.47"
|
|
34
35
|
},
|
|
35
36
|
"packageManager": "npm@10.9.2",
|
|
36
37
|
"overrides": {
|
package/phpmyadmin/index.d.ts
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import type { StepDefinition } from '@wp-playground/blueprints';
|
|
2
|
+
/**
|
|
3
|
+
* phpMyAdmin installation, detection, URL construction, and request routing
|
|
4
|
+
* live in separate consumers (Website, Personal WP, and CLI). These values are
|
|
5
|
+
* exported from one place to keep that shared contract in sync.
|
|
6
|
+
*/
|
|
2
7
|
export declare const PHPMYADMIN_VERSION = "5.2.3";
|
|
3
8
|
export declare const PHPMYADMIN_DOWNLOAD_URL = "https://files.phpmyadmin.net/phpMyAdmin/5.2.3/phpMyAdmin-5.2.3-english.zip";
|
|
4
9
|
export declare const PHPMYADMIN_INSTALL_PATH = "/tools/phpmyadmin";
|
|
10
|
+
export declare const PHPMYADMIN_CONFIG_PATH: string;
|
|
11
|
+
export declare const PHPMYADMIN_URL_PATH = "/phpmyadmin";
|
|
5
12
|
export declare const PHPMYADMIN_ENTRY_PATH = "/index.php?route=/database/structure&db=wordpress";
|
|
13
|
+
export declare const PHPMYADMIN_PATH_ALIAS: {
|
|
14
|
+
readonly urlPrefix: "/phpmyadmin";
|
|
15
|
+
readonly fsPath: "/tools/phpmyadmin";
|
|
16
|
+
};
|
|
6
17
|
/**
|
|
7
18
|
* Returns the blueprint steps needed to install phpMyAdmin in Playground.
|
|
8
19
|
*
|