@php-wasm/scopes 0.9.44 → 0.9.46
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.d.ts +9 -9
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Scopes are unique strings, like `
|
|
2
|
+
* Scopes are unique strings, like `my-site`, used to uniquely brand
|
|
3
3
|
* the outgoing HTTP traffic from each browser tab. This helps the
|
|
4
4
|
* main thread distinguish between the relevant and irrelevant
|
|
5
5
|
* messages received from the Service Worker.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Scopes are included in the `PHPRequestHandler.absoluteUrl` as follows:
|
|
8
8
|
*
|
|
9
9
|
* An **unscoped** URL: http://localhost:8778/wp-login.php
|
|
10
|
-
* A **scoped** URL: http://localhost:8778/scope:
|
|
10
|
+
* A **scoped** URL: http://localhost:8778/scope:my-site/wp-login.php
|
|
11
11
|
*
|
|
12
12
|
* For more information, see the README section on scopes.
|
|
13
13
|
*/
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
18
|
* ```js
|
|
19
|
-
* isURLScoped(new URL('http://localhost/scope:
|
|
19
|
+
* isURLScoped(new URL('http://localhost/scope:my-site/index.php'));
|
|
20
20
|
* // true
|
|
21
21
|
*
|
|
22
22
|
* isURLScoped(new URL('http://localhost/index.php'));
|
|
@@ -32,7 +32,7 @@ export declare function isURLScoped(url: URL): boolean;
|
|
|
32
32
|
*
|
|
33
33
|
* @example
|
|
34
34
|
* ```js
|
|
35
|
-
* getScopeFromURL(new URL('http://localhost/scope:
|
|
35
|
+
* getScopeFromURL(new URL('http://localhost/scope:my-site/index.php'));
|
|
36
36
|
* // '96253'
|
|
37
37
|
*
|
|
38
38
|
* getScopeFromURL(new URL('http://localhost/index.php'));
|
|
@@ -48,11 +48,11 @@ export declare function getURLScope(url: URL): string | null;
|
|
|
48
48
|
*
|
|
49
49
|
* @example
|
|
50
50
|
* ```js
|
|
51
|
-
* setURLScope(new URL('http://localhost/index.php'), '
|
|
52
|
-
* // URL('http://localhost/scope:
|
|
51
|
+
* setURLScope(new URL('http://localhost/index.php'), 'my-site');
|
|
52
|
+
* // URL('http://localhost/scope:my-site/index.php')
|
|
53
53
|
*
|
|
54
|
-
* setURLScope(new URL('http://localhost/scope:
|
|
55
|
-
* // URL('http://localhost/scope:
|
|
54
|
+
* setURLScope(new URL('http://localhost/scope:my-site/index.php'), 'my-site');
|
|
55
|
+
* // URL('http://localhost/scope:my-site/index.php')
|
|
56
56
|
*
|
|
57
57
|
* setURLScope(new URL('http://localhost/index.php'), null);
|
|
58
58
|
* // URL('http://localhost/index.php')
|
|
@@ -68,7 +68,7 @@ export declare function setURLScope(url: URL | string, scope: string | null): UR
|
|
|
68
68
|
*
|
|
69
69
|
* @example
|
|
70
70
|
* ```js
|
|
71
|
-
* removeURLScope(new URL('http://localhost/scope:
|
|
71
|
+
* removeURLScope(new URL('http://localhost/scope:my-site/index.php'));
|
|
72
72
|
* // URL('http://localhost/index.php')
|
|
73
73
|
*
|
|
74
74
|
* removeURLScope(new URL('http://localhost/index.php'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@php-wasm/scopes",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.46",
|
|
4
4
|
"description": "PHP.wasm – scoped URLs utils",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"type": "module",
|
|
24
24
|
"main": "index.js",
|
|
25
25
|
"types": "index.d.ts",
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "fa393bcf69536e421246aa8e321e3e9af4b61c7b",
|
|
27
27
|
"engines": {
|
|
28
28
|
"node": ">=16.15.1",
|
|
29
29
|
"npm": ">=8.11.0"
|