@wvdsh/api 0.1.37 → 0.1.39
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.
|
@@ -189,10 +189,14 @@ export declare const UrlParams: {
|
|
|
189
189
|
readonly PlayKey: "pk";
|
|
190
190
|
readonly SdkConfig: "sdkconfig";
|
|
191
191
|
readonly Caller: "caller";
|
|
192
|
+
readonly GameSlug: "gameSlug";
|
|
192
193
|
};
|
|
193
194
|
export declare const PlayRouteCaller: {
|
|
194
195
|
readonly Wavedash: "wavedash";
|
|
195
196
|
};
|
|
197
|
+
export declare const PAID_CONTENT_PICOMATCH_OPTIONS: {
|
|
198
|
+
readonly dot: true;
|
|
199
|
+
};
|
|
196
200
|
export declare const HEARTBEAT: {
|
|
197
201
|
/** Client sends heartbeat every 30 seconds when tab is visible */
|
|
198
202
|
readonly CLIENT_INTERVAL_MS: 30000;
|
|
@@ -107,11 +107,16 @@ export const UrlParams = {
|
|
|
107
107
|
EngineVersion: 'engineversion',
|
|
108
108
|
PlayKey: 'pk',
|
|
109
109
|
SdkConfig: 'sdkconfig',
|
|
110
|
-
Caller: 'caller'
|
|
110
|
+
Caller: 'caller',
|
|
111
|
+
// Game slug, passed on the iframe URL so the cross-origin play iframe can
|
|
112
|
+
// tag Sentry with the game being played (WVDSH-772).
|
|
113
|
+
GameSlug: 'gameSlug'
|
|
111
114
|
};
|
|
112
115
|
export const PlayRouteCaller = {
|
|
113
116
|
Wavedash: 'wavedash'
|
|
114
117
|
};
|
|
118
|
+
// ========== PAID CONTENT ==========
|
|
119
|
+
export const PAID_CONTENT_PICOMATCH_OPTIONS = { dot: true };
|
|
115
120
|
// ========== HEARTBEAT (client-side constants) ==========
|
|
116
121
|
const HEARTBEAT_CLIENT_INTERVAL_MS = 30_000;
|
|
117
122
|
export const HEARTBEAT = {
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Helper functions shared with external consumers via the @wvdsh/api package
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Match `levels/level2.dat` (literal) or `skins/*` (single-segment wildcard).
|
|
6
|
-
* `**` matches across segments. Patterns are case-sensitive, no leading slash.
|
|
7
|
-
*/
|
|
8
|
-
export declare function matchesPaidContentPattern(pattern: string, path: string): boolean;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// THIS FILE IS AUTOGENERATED — DO NOT EDIT
|
|
2
|
-
// Source: wavedash/src/lib/utils/sharedHelpers.ts
|
|
3
|
-
/**
|
|
4
|
-
* Helper functions shared with external consumers via the @wvdsh/api package
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Match `levels/level2.dat` (literal) or `skins/*` (single-segment wildcard).
|
|
8
|
-
* `**` matches across segments. Patterns are case-sensitive, no leading slash.
|
|
9
|
-
*/
|
|
10
|
-
export function matchesPaidContentPattern(pattern, path) {
|
|
11
|
-
if (!pattern)
|
|
12
|
-
return false;
|
|
13
|
-
if (pattern === path)
|
|
14
|
-
return true;
|
|
15
|
-
// Build a regex: escape regex chars, then expand `**` → `.*` and `*` → `[^/]*`.
|
|
16
|
-
const escaped = pattern.replace(/[.+^${}()|[\]\\]/g, '\\$&');
|
|
17
|
-
const regexSrc = escaped
|
|
18
|
-
.replace(/\*\*/g, '__DOUBLE_STAR__')
|
|
19
|
-
.replace(/\*/g, '[^/]*')
|
|
20
|
-
.replace(/__DOUBLE_STAR__/g, '.*');
|
|
21
|
-
return new RegExp(`^${regexSrc}$`).test(path);
|
|
22
|
-
}
|