@wvdsh/api 0.1.36 → 0.1.37

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.
@@ -24,7 +24,7 @@ export type DeviceFingerprint = {
24
24
  };
25
25
  /**
26
26
  * Default values used by Game SDKs
27
- * These values are used externally, any changes need to be reflected in the Wavedash SDKs
27
+ * Published externally in the @wvdsh/api package
28
28
  *
29
29
  * We use int values here rather than strings to speed up data marshalling in SDK calls
30
30
  */
@@ -0,0 +1,8 @@
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;
@@ -0,0 +1,22 @@
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
+ }
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './_generated/constants';
2
2
  export * from './_generated/convex_api';
3
+ export * from './_generated/helpers';
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './_generated/constants';
2
2
  export * from './_generated/convex_api';
3
+ export * from './_generated/helpers';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wvdsh/api",
3
- "version": "0.1.36",
3
+ "version": "0.1.37",
4
4
  "description": "Public API types and shared constants for the Wavedash platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",