@wp-playground/cli 1.2.2 → 1.2.3
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 +3 -0
- package/blueprints.phar +0 -0
- package/cli.cjs +1 -1
- package/cli.js +1 -1
- package/index.cjs +1 -1
- package/index.js +1 -1
- package/mounts-B-Qdcyyt.js +124 -0
- package/mounts-B-Qdcyyt.js.map +1 -0
- package/mounts-D7bhhGq3.cjs +15 -0
- package/mounts-D7bhhGq3.cjs.map +1 -0
- package/{mount.d.ts → mounts.d.ts} +10 -1
- package/package.json +11 -11
- package/run-cli-B5BfXxxJ.cjs +24 -0
- package/run-cli-B5BfXxxJ.cjs.map +1 -0
- package/run-cli-W9VNXESj.js +586 -0
- package/run-cli-W9VNXESj.js.map +1 -0
- package/run-cli.d.ts +3 -1
- package/v2.d.ts +45 -0
- package/worker-thread-CYvRK9UX.js +130 -0
- package/worker-thread-CYvRK9UX.js.map +1 -0
- package/worker-thread.cjs +2 -2
- package/worker-thread.cjs.map +1 -1
- package/worker-thread.d.ts +2 -1
- package/worker-thread.js +50 -49
- package/worker-thread.js.map +1 -1
- package/cli-auto-mount.d.ts +0 -19
- package/index-CddYZc1x.js +0 -5
- package/index-CddYZc1x.js.map +0 -1
- package/index-CyPmrjJv.cjs +0 -2
- package/index-CyPmrjJv.cjs.map +0 -1
- package/run-cli-Bon3Rz_F.cjs +0 -43
- package/run-cli-Bon3Rz_F.cjs.map +0 -1
- package/run-cli-DyJ6_Vj8.js +0 -8449
- package/run-cli-DyJ6_Vj8.js.map +0 -1
- package/worker-thread-CQBM_bGk.js +0 -171
- package/worker-thread-CQBM_bGk.js.map +0 -1
package/worker-thread.js
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import { loadNodeRuntime as k
|
|
1
|
+
import { loadNodeRuntime as k } from "@php-wasm/node";
|
|
2
2
|
import { EmscriptenDownloadMonitor as v } from "@php-wasm/progress";
|
|
3
|
-
import { exposeAPI as M, PHPWorker as
|
|
4
|
-
import { sprintf as
|
|
3
|
+
import { exposeAPI as M, PHPWorker as S, consumeAPI as W, consumeAPISync as E, sandboxedSpawnHandlerFactory as F } from "@php-wasm/universal";
|
|
4
|
+
import { sprintf as H } from "@php-wasm/util";
|
|
5
|
+
import { RecommendedPHPVersion as I } from "@wp-playground/common";
|
|
5
6
|
import { bootWordPress as L } from "@wp-playground/wordpress";
|
|
6
|
-
import { rootCertificates as
|
|
7
|
-
import {
|
|
8
|
-
import { MessageChannel as D, parentPort as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
t.mkdir(o.vfsPath), t.mount(o.vfsPath, _(o.hostPath));
|
|
12
|
-
}
|
|
13
|
-
function H(t, e, ...o) {
|
|
7
|
+
import { rootCertificates as x } from "tls";
|
|
8
|
+
import { jspi as A } from "wasm-feature-detect";
|
|
9
|
+
import { MessageChannel as D, parentPort as R } from "worker_threads";
|
|
10
|
+
import { m } from "./mounts-B-Qdcyyt.js";
|
|
11
|
+
function C(n, e, ...t) {
|
|
14
12
|
console.log(
|
|
15
13
|
performance.now().toFixed(6).padStart(15, "0"),
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
n.toString().padStart(16, "0"),
|
|
15
|
+
H(e, ...t)
|
|
18
16
|
);
|
|
19
17
|
}
|
|
20
|
-
class
|
|
18
|
+
class G extends S {
|
|
21
19
|
constructor(e) {
|
|
22
20
|
super(void 0, e), this.booted = !1;
|
|
23
21
|
}
|
|
@@ -31,74 +29,77 @@ class R extends W {
|
|
|
31
29
|
* @see phpwasm-emscripten-library-file-locking-for-node.js
|
|
32
30
|
*/
|
|
33
31
|
async useFileLockManager(e) {
|
|
34
|
-
await A() ? this.fileLockManager =
|
|
32
|
+
await A() ? this.fileLockManager = W(e) : this.fileLockManager = await E(e);
|
|
35
33
|
}
|
|
36
34
|
async boot({
|
|
37
35
|
absoluteUrl: e,
|
|
38
|
-
mountsBeforeWpInstall:
|
|
36
|
+
mountsBeforeWpInstall: t,
|
|
39
37
|
mountsAfterWpInstall: f,
|
|
40
|
-
phpVersion:
|
|
38
|
+
phpVersion: P = I,
|
|
41
39
|
wordPressZip: c,
|
|
42
|
-
sqliteIntegrationPluginZip:
|
|
40
|
+
sqliteIntegrationPluginZip: p,
|
|
43
41
|
firstProcessId: i,
|
|
44
|
-
processIdSpaceLength:
|
|
45
|
-
dataSqlPath:
|
|
42
|
+
processIdSpaceLength: h,
|
|
43
|
+
dataSqlPath: u,
|
|
46
44
|
followSymlinks: w,
|
|
47
45
|
trace: y,
|
|
48
|
-
internalCookieStore: g
|
|
46
|
+
internalCookieStore: g,
|
|
47
|
+
withXdebug: b
|
|
49
48
|
}) {
|
|
50
49
|
if (this.booted)
|
|
51
50
|
throw new Error("Playground already booted");
|
|
52
51
|
this.booted = !0;
|
|
53
|
-
let
|
|
54
|
-
const
|
|
52
|
+
let o = i;
|
|
53
|
+
const _ = i + h - 1;
|
|
55
54
|
try {
|
|
56
|
-
const
|
|
55
|
+
const r = {
|
|
57
56
|
WP_DEBUG: !0,
|
|
58
57
|
WP_DEBUG_LOG: !0,
|
|
59
58
|
WP_DEBUG_DISPLAY: !1
|
|
60
|
-
},
|
|
59
|
+
}, l = await L({
|
|
61
60
|
siteUrl: e,
|
|
62
61
|
createPhpRuntime: async () => {
|
|
63
|
-
const
|
|
64
|
-
return
|
|
62
|
+
const s = o;
|
|
63
|
+
return o < _ ? o++ : o = i, await k(P, {
|
|
65
64
|
emscriptenOptions: {
|
|
66
65
|
fileLockManager: this.fileLockManager,
|
|
67
|
-
processId:
|
|
68
|
-
trace: y ?
|
|
66
|
+
processId: s,
|
|
67
|
+
trace: y ? C : void 0
|
|
69
68
|
},
|
|
70
|
-
followSymlinks: w
|
|
69
|
+
followSymlinks: w,
|
|
70
|
+
withXdebug: b
|
|
71
71
|
});
|
|
72
72
|
},
|
|
73
73
|
wordPressZip: c !== void 0 ? new File([c], "wordpress.zip") : void 0,
|
|
74
|
-
sqliteIntegrationPluginZip:
|
|
75
|
-
[
|
|
74
|
+
sqliteIntegrationPluginZip: p !== void 0 ? new File(
|
|
75
|
+
[p],
|
|
76
76
|
"sqlite-integration-plugin.zip"
|
|
77
77
|
) : void 0,
|
|
78
78
|
sapiName: "cli",
|
|
79
79
|
createFiles: {
|
|
80
|
-
"/internal/shared/ca-bundle.crt":
|
|
80
|
+
"/internal/shared/ca-bundle.crt": x.join(`
|
|
81
81
|
`)
|
|
82
82
|
},
|
|
83
|
-
constants:
|
|
83
|
+
constants: r,
|
|
84
84
|
phpIniEntries: {
|
|
85
85
|
"openssl.cafile": "/internal/shared/ca-bundle.crt",
|
|
86
86
|
allow_url_fopen: "1",
|
|
87
87
|
disable_functions: ""
|
|
88
88
|
},
|
|
89
89
|
hooks: {
|
|
90
|
-
async beforeWordPressFiles(
|
|
91
|
-
m(
|
|
90
|
+
async beforeWordPressFiles(s) {
|
|
91
|
+
m(s, t);
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
cookieStore: g ? void 0 : !1,
|
|
95
|
-
dataSqlPath:
|
|
95
|
+
dataSqlPath: u,
|
|
96
|
+
spawnHandler: F
|
|
96
97
|
});
|
|
97
|
-
this.__internal_setRequestHandler(
|
|
98
|
-
const d = await
|
|
99
|
-
await this.setPrimaryPHP(d), m(d, f),
|
|
100
|
-
} catch (
|
|
101
|
-
throw
|
|
98
|
+
this.__internal_setRequestHandler(l);
|
|
99
|
+
const d = await l.getPrimaryPhp();
|
|
100
|
+
await this.setPrimaryPHP(d), m(d, f), U();
|
|
101
|
+
} catch (r) {
|
|
102
|
+
throw q(r), r;
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
105
|
// Provide a named disposal method that can be invoked via comlink.
|
|
@@ -106,19 +107,19 @@ class R extends W {
|
|
|
106
107
|
await this[Symbol.asyncDispose]();
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
|
-
const
|
|
110
|
-
new
|
|
110
|
+
const a = new D(), [U, q] = M(
|
|
111
|
+
new G(new v()),
|
|
111
112
|
void 0,
|
|
112
|
-
|
|
113
|
+
a.port1
|
|
113
114
|
);
|
|
114
|
-
|
|
115
|
+
R.postMessage(
|
|
115
116
|
{
|
|
116
117
|
command: "worker-script-initialized",
|
|
117
|
-
phpPort:
|
|
118
|
+
phpPort: a.port2
|
|
118
119
|
},
|
|
119
|
-
[
|
|
120
|
+
[a.port2]
|
|
120
121
|
);
|
|
121
122
|
export {
|
|
122
|
-
|
|
123
|
+
G as PlaygroundCliWorker
|
|
123
124
|
};
|
|
124
125
|
//# sourceMappingURL=worker-thread.js.map
|
package/worker-thread.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-thread.js","sources":["../../../../packages/playground/cli/src/worker-thread.ts"],"sourcesContent":["import type { FileLockManager } from '@php-wasm/node';\nimport {
|
|
1
|
+
{"version":3,"file":"worker-thread.js","sources":["../../../../packages/playground/cli/src/worker-thread.ts"],"sourcesContent":["import type { FileLockManager } from '@php-wasm/node';\nimport { loadNodeRuntime } from '@php-wasm/node';\nimport { EmscriptenDownloadMonitor } from '@php-wasm/progress';\nimport type { RemoteAPI, SupportedPHPVersion } from '@php-wasm/universal';\nimport {\n\tPHPWorker,\n\tconsumeAPI,\n\tconsumeAPISync,\n\texposeAPI,\n\tsandboxedSpawnHandlerFactory,\n} from '@php-wasm/universal';\nimport { sprintf } from '@php-wasm/util';\nimport { RecommendedPHPVersion } from '@wp-playground/common';\nimport { bootWordPress } from '@wp-playground/wordpress';\nimport { rootCertificates } from 'tls';\nimport { jspi } from 'wasm-feature-detect';\nimport { MessageChannel, type MessagePort, parentPort } from 'worker_threads';\nimport { mountResources } from './mounts';\n\nexport interface Mount {\n\thostPath: string;\n\tvfsPath: string;\n}\n\nexport type PrimaryWorkerBootOptions = {\n\twpVersion?: string;\n\tphpVersion?: SupportedPHPVersion;\n\tabsoluteUrl: string;\n\tmountsBeforeWpInstall: Array<Mount>;\n\tmountsAfterWpInstall: Array<Mount>;\n\twordPressZip?: ArrayBuffer;\n\tsqliteIntegrationPluginZip?: ArrayBuffer;\n\tfirstProcessId: number;\n\tprocessIdSpaceLength: number;\n\tdataSqlPath?: string;\n\tfollowSymlinks: boolean;\n\ttrace: boolean;\n\t/**\n\t * When true, Playground will not send cookies to the client but will manage\n\t * them internally. This can be useful in environments that can't store cookies,\n\t * e.g. VS Code WebView.\n\t *\n\t * Default: false.\n\t */\n\tinternalCookieStore?: boolean;\n\twithXdebug?: boolean;\n};\n\n/**\n * Print trace messages from PHP-WASM.\n *\n * @param {number} processId - The process ID.\n * @param {string} format - The format string.\n * @param {...any} args - The arguments.\n */\nfunction tracePhpWasm(processId: number, format: string, ...args: any[]) {\n\t// eslint-disable-next-line no-console\n\tconsole.log(\n\t\tperformance.now().toFixed(6).padStart(15, '0'),\n\t\tprocessId.toString().padStart(16, '0'),\n\t\tsprintf(format, ...args)\n\t);\n}\n\nexport class PlaygroundCliWorker extends PHPWorker {\n\tbooted = false;\n\tfileLockManager: RemoteAPI<FileLockManager> | FileLockManager | undefined;\n\n\tconstructor(monitor: EmscriptenDownloadMonitor) {\n\t\tsuper(undefined, monitor);\n\t}\n\n\t/**\n\t * Call this method before boot() to use file locking.\n\t *\n\t * This method is separate from boot() to simplify the related Comlink.transferHandlers\n\t * setup – if an argument is a MessagePort, we're transferring it, not copying it.\n\t *\n\t * @see comlink-sync.ts\n\t * @see phpwasm-emscripten-library-file-locking-for-node.js\n\t */\n\tasync useFileLockManager(port: MessagePort) {\n\t\tif (await jspi()) {\n\t\t\t/**\n\t\t\t * If JSPI is available, php.js supports both synchronous and asynchronous locking syscalls.\n\t\t\t * Web browsers, however, only support asynchronous message passing so let's use the\n\t\t\t * asynchronous API. Every method call will return a promise.\n\t\t\t *\n\t\t\t * @see comlink-sync.ts\n\t\t\t * @see phpwasm-emscripten-library-file-locking-for-node.js\n\t\t\t */\n\t\t\tthis.fileLockManager = consumeAPI<FileLockManager>(port);\n\t\t} else {\n\t\t\t/**\n\t\t\t * If JSPI is not available, php.js only supports synchronous locking syscalls.\n\t\t\t * Let's use the synchronous API. Every method call will block this thread\n\t\t\t * until the result is available.\n\t\t\t *\n\t\t\t * @see comlink-sync.ts\n\t\t\t * @see phpwasm-emscripten-library-file-locking-for-node.js\n\t\t\t */\n\t\t\tthis.fileLockManager = await consumeAPISync<FileLockManager>(port);\n\t\t}\n\t}\n\n\tasync boot({\n\t\tabsoluteUrl,\n\t\tmountsBeforeWpInstall,\n\t\tmountsAfterWpInstall,\n\t\tphpVersion = RecommendedPHPVersion,\n\t\twordPressZip,\n\t\tsqliteIntegrationPluginZip,\n\t\tfirstProcessId,\n\t\tprocessIdSpaceLength,\n\t\tdataSqlPath,\n\t\tfollowSymlinks,\n\t\ttrace,\n\t\tinternalCookieStore,\n\t\twithXdebug,\n\t}: PrimaryWorkerBootOptions) {\n\t\tif (this.booted) {\n\t\t\tthrow new Error('Playground already booted');\n\t\t}\n\t\tthis.booted = true;\n\n\t\tlet nextProcessId = firstProcessId;\n\t\tconst lastProcessId = firstProcessId + processIdSpaceLength - 1;\n\n\t\ttry {\n\t\t\tconst constants: Record<string, string | number | boolean | null> =\n\t\t\t\t{\n\t\t\t\t\tWP_DEBUG: true,\n\t\t\t\t\tWP_DEBUG_LOG: true,\n\t\t\t\t\tWP_DEBUG_DISPLAY: false,\n\t\t\t\t};\n\n\t\t\tconst requestHandler = await bootWordPress({\n\t\t\t\tsiteUrl: absoluteUrl,\n\t\t\t\tcreatePhpRuntime: async () => {\n\t\t\t\t\tconst processId = nextProcessId;\n\n\t\t\t\t\tif (nextProcessId < lastProcessId) {\n\t\t\t\t\t\tnextProcessId++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// We've reached the end of the process ID space. Start over.\n\t\t\t\t\t\tnextProcessId = firstProcessId;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn await loadNodeRuntime(phpVersion, {\n\t\t\t\t\t\temscriptenOptions: {\n\t\t\t\t\t\t\tfileLockManager: this.fileLockManager!,\n\t\t\t\t\t\t\tprocessId,\n\t\t\t\t\t\t\ttrace: trace ? tracePhpWasm : undefined,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfollowSymlinks,\n\t\t\t\t\t\twithXdebug,\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\twordPressZip:\n\t\t\t\t\twordPressZip !== undefined\n\t\t\t\t\t\t? new File([wordPressZip], 'wordpress.zip')\n\t\t\t\t\t\t: undefined,\n\t\t\t\tsqliteIntegrationPluginZip:\n\t\t\t\t\tsqliteIntegrationPluginZip !== undefined\n\t\t\t\t\t\t? new File(\n\t\t\t\t\t\t\t\t[sqliteIntegrationPluginZip],\n\t\t\t\t\t\t\t\t'sqlite-integration-plugin.zip'\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: undefined,\n\t\t\t\tsapiName: 'cli',\n\t\t\t\tcreateFiles: {\n\t\t\t\t\t'/internal/shared/ca-bundle.crt':\n\t\t\t\t\t\trootCertificates.join('\\n'),\n\t\t\t\t},\n\t\t\t\tconstants,\n\t\t\t\tphpIniEntries: {\n\t\t\t\t\t'openssl.cafile': '/internal/shared/ca-bundle.crt',\n\t\t\t\t\tallow_url_fopen: '1',\n\t\t\t\t\tdisable_functions: '',\n\t\t\t\t},\n\t\t\t\thooks: {\n\t\t\t\t\tasync beforeWordPressFiles(php) {\n\t\t\t\t\t\tmountResources(php, mountsBeforeWpInstall);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tcookieStore: internalCookieStore ? undefined : false,\n\t\t\t\tdataSqlPath,\n\t\t\t\tspawnHandler: sandboxedSpawnHandlerFactory,\n\t\t\t});\n\t\t\tthis.__internal_setRequestHandler(requestHandler);\n\n\t\t\tconst primaryPhp = await requestHandler.getPrimaryPhp();\n\t\t\tawait this.setPrimaryPHP(primaryPhp);\n\n\t\t\tmountResources(primaryPhp, mountsAfterWpInstall);\n\n\t\t\tsetApiReady();\n\t\t} catch (e) {\n\t\t\tsetAPIError(e as Error);\n\t\t\tthrow e;\n\t\t}\n\t}\n\n\t// Provide a named disposal method that can be invoked via comlink.\n\tasync dispose() {\n\t\tawait this[Symbol.asyncDispose]();\n\t}\n}\n\nconst phpChannel = new MessageChannel();\n\nconst [setApiReady, setAPIError] = exposeAPI(\n\tnew PlaygroundCliWorker(new EmscriptenDownloadMonitor()),\n\tundefined,\n\tphpChannel.port1\n);\n\nparentPort!.postMessage(\n\t{\n\t\tcommand: 'worker-script-initialized',\n\t\tphpPort: phpChannel.port2,\n\t},\n\t[phpChannel.port2 as any]\n);\n"],"names":["tracePhpWasm","processId","format","args","sprintf","PlaygroundCliWorker","PHPWorker","monitor","port","jspi","consumeAPI","consumeAPISync","absoluteUrl","mountsBeforeWpInstall","mountsAfterWpInstall","phpVersion","RecommendedPHPVersion","wordPressZip","sqliteIntegrationPluginZip","firstProcessId","processIdSpaceLength","dataSqlPath","followSymlinks","trace","internalCookieStore","withXdebug","nextProcessId","lastProcessId","constants","requestHandler","bootWordPress","loadNodeRuntime","rootCertificates","php","mountResources","sandboxedSpawnHandlerFactory","primaryPhp","setApiReady","e","setAPIError","phpChannel","MessageChannel","exposeAPI","EmscriptenDownloadMonitor","parentPort"],"mappings":"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"}
|
package/cli-auto-mount.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { StepDefinition } from '@wp-playground/blueprints';
|
|
2
|
-
import type { RunCLIArgs } from './run-cli';
|
|
3
|
-
import type { Mount } from './mount';
|
|
4
|
-
export declare function expandAutoMounts(args: RunCLIArgs): RunCLIArgs;
|
|
5
|
-
export declare function containsFullWordPressInstallation(path: string): boolean;
|
|
6
|
-
export declare function containsWpContentDirectories(path: string): boolean;
|
|
7
|
-
export declare function isThemeDirectory(path: string): boolean;
|
|
8
|
-
export declare function isPluginDirectory(path: string): boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Returns a list of files and directories in the wp-content directory
|
|
11
|
-
* to be mounted individually.
|
|
12
|
-
*
|
|
13
|
-
* This is needed because WordPress needs to be able to write to the
|
|
14
|
-
* wp-content directory without Playground modifying the OS filesystem.
|
|
15
|
-
*
|
|
16
|
-
* See expandAutoMounts for more details.
|
|
17
|
-
*/
|
|
18
|
-
export declare function wpContentMounts(wpContentDir: string): Mount[];
|
|
19
|
-
export declare function getSteps(path: string): StepDefinition[];
|
package/index-CddYZc1x.js
DELETED
package/index-CddYZc1x.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-CddYZc1x.js","sources":["../../../../node_modules/wasm-feature-detect/dist/esm/index.js"],"sourcesContent":["export const bigInt=()=>(async e=>{try{return(await WebAssembly.instantiate(e)).instance.exports.b(BigInt(0))===BigInt(0)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,126,1,126,3,2,1,0,7,5,1,1,98,0,0,10,6,1,4,0,32,0,11])),bulkMemory=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),exceptions=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),exceptionsFinal=()=>(async()=>{try{return new WebAssembly.Module(Uint8Array.from(atob(\"AGFzbQEAAAABBAFgAAADAgEAChABDgACaR9AAQMAAAsACxoL\"),(e=>e.codePointAt(0)))),!0}catch(e){return!1}})(),extendedConst=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,5,3,1,0,1,11,9,1,0,65,1,65,2,106,11,0])),gc=()=>(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,95,1,120,0])))(),jsStringBuiltins=()=>(async()=>{try{return await WebAssembly.instantiate(Uint8Array.from(atob(\"AGFzbQEAAAABBgFgAW8BfwIXAQ53YXNtOmpzLXN0cmluZwR0ZXN0AAA=\"),(e=>e.codePointAt(0))),{},{builtins:[\"js-string\"]}),!0}catch(e){return!1}})(),jspi=()=>(async()=>\"Suspending\"in WebAssembly)(),memory64=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,5,3,1,4,1])),multiMemory=()=>(async()=>{try{return new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,5,5,2,0,0,0,0])),!0}catch(e){return!1}})(),multiValue=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,0,2,127,127,3,2,1,0,10,8,1,6,0,65,0,65,0,11])),mutableGlobals=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1])),referenceTypes=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,7,1,5,0,208,112,26,11])),relaxedSimd=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,15,1,13,0,65,1,253,15,65,2,253,15,253,128,2,11])),saturatedFloatToInt=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11])),signExtensions=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11])),simd=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),streamingCompilation=()=>(async()=>\"compileStreaming\"in WebAssembly)(),tailCall=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,18,0,11])),threads=()=>(async e=>{try{return\"undefined\"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11])),typeReflection=()=>(async()=>\"Function\"in WebAssembly)(),typedFunctionReferences=()=>(async()=>{try{return new WebAssembly.Module(Uint8Array.from(atob(\"AGFzbQEAAAABEANgAX8Bf2ABZAABf2AAAX8DBAMBAAIJBQEDAAEBChwDCwBBCkEqIAAUAGoLBwAgAEEBagsGANIBEAAL\"),(e=>e.codePointAt(0)))),!0}catch(e){return!1}})();\n"],"names":["jspi"],"mappings":"AAAY,MAAmoCA,IAAK,OAAK,YAAS,gBAAe,aAAc;","x_google_ignoreList":[0]}
|
package/index-CyPmrjJv.cjs
DELETED
package/index-CyPmrjJv.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-CyPmrjJv.cjs","sources":["../../../../node_modules/wasm-feature-detect/dist/esm/index.js"],"sourcesContent":["export const bigInt=()=>(async e=>{try{return(await WebAssembly.instantiate(e)).instance.exports.b(BigInt(0))===BigInt(0)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,126,1,126,3,2,1,0,7,5,1,1,98,0,0,10,6,1,4,0,32,0,11])),bulkMemory=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),exceptions=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),exceptionsFinal=()=>(async()=>{try{return new WebAssembly.Module(Uint8Array.from(atob(\"AGFzbQEAAAABBAFgAAADAgEAChABDgACaR9AAQMAAAsACxoL\"),(e=>e.codePointAt(0)))),!0}catch(e){return!1}})(),extendedConst=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,5,3,1,0,1,11,9,1,0,65,1,65,2,106,11,0])),gc=()=>(async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,95,1,120,0])))(),jsStringBuiltins=()=>(async()=>{try{return await WebAssembly.instantiate(Uint8Array.from(atob(\"AGFzbQEAAAABBgFgAW8BfwIXAQ53YXNtOmpzLXN0cmluZwR0ZXN0AAA=\"),(e=>e.codePointAt(0))),{},{builtins:[\"js-string\"]}),!0}catch(e){return!1}})(),jspi=()=>(async()=>\"Suspending\"in WebAssembly)(),memory64=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,5,3,1,4,1])),multiMemory=()=>(async()=>{try{return new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,5,5,2,0,0,0,0])),!0}catch(e){return!1}})(),multiValue=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,0,2,127,127,3,2,1,0,10,8,1,6,0,65,0,65,0,11])),mutableGlobals=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1])),referenceTypes=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,7,1,5,0,208,112,26,11])),relaxedSimd=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,15,1,13,0,65,1,253,15,65,2,253,15,253,128,2,11])),saturatedFloatToInt=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11])),signExtensions=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11])),simd=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),streamingCompilation=()=>(async()=>\"compileStreaming\"in WebAssembly)(),tailCall=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,6,1,4,0,18,0,11])),threads=()=>(async e=>{try{return\"undefined\"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch(e){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11])),typeReflection=()=>(async()=>\"Function\"in WebAssembly)(),typedFunctionReferences=()=>(async()=>{try{return new WebAssembly.Module(Uint8Array.from(atob(\"AGFzbQEAAAABEANgAX8Bf2ABZAABf2AAAX8DBAMBAAIJBQEDAAEBChwDCwBBCkEqIAAUAGoLBwAgAEEBagsGANIBEAAL\"),(e=>e.codePointAt(0)))),!0}catch(e){return!1}})();\n"],"names":["jspi"],"mappings":"aAAY,MAAmoCA,EAAK,KAAK,SAAS,eAAe,aAAc","x_google_ignoreList":[0]}
|