@devvit/reddit 0.12.1-next-2025-09-10-15-58-19-fe560815f.0 → 0.12.1-next-2025-09-10-17-26-51-8f2b1f263.0
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/models/ShareUrl.d.ts.map +1 -1
- package/models/ShareUrl.js +2 -2
- package/package.json +10 -10
package/models/ShareUrl.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShareUrl.d.ts","sourceRoot":"","sources":["../../src/models/ShareUrl.ts"],"names":[],"mappings":"AAEA,gBAAgB;AAChB,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"ShareUrl.d.ts","sourceRoot":"","sources":["../../src/models/ShareUrl.ts"],"names":[],"mappings":"AAEA,gBAAgB;AAChB,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAyDjE"}
|
package/models/ShareUrl.js
CHANGED
|
@@ -9,9 +9,9 @@ export async function createShareUrl(url) {
|
|
|
9
9
|
throw new Error('Invalid URL. Provide an absolute URL such as https://reddit.com/r/gamesonreddit.');
|
|
10
10
|
}
|
|
11
11
|
// Ensure the URL domain is reddit.com or old.reddit.com
|
|
12
|
-
const allowedDomains = new Set(['reddit.com', 'old.reddit.com']);
|
|
12
|
+
const allowedDomains = new Set(['reddit.com', 'www.reddit.com', 'old.reddit.com']);
|
|
13
13
|
if (!allowedDomains.has(parsedUrl.hostname)) {
|
|
14
|
-
throw new Error('Invalid domain. Only reddit.com and old.reddit.com URLs are supported.');
|
|
14
|
+
throw new Error('Invalid domain. Only reddit.com, www.reddit.com, and old.reddit.com URLs are supported.');
|
|
15
15
|
}
|
|
16
16
|
// Ensure the URL has a non-root path and starts with an allowed prefix
|
|
17
17
|
if (parsedUrl.pathname === '/' || parsedUrl.pathname === '') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devvit/reddit",
|
|
3
|
-
"version": "0.12.1-next-2025-09-10-
|
|
3
|
+
"version": "0.12.1-next-2025-09-10-17-26-51-8f2b1f263.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,22 +31,22 @@
|
|
|
31
31
|
"test:unit-with-coverage": "vitest run --coverage"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@devvit/protos": "0.12.1-next-2025-09-10-
|
|
35
|
-
"@devvit/public-api": "0.12.1-next-2025-09-10-
|
|
36
|
-
"@devvit/shared": "0.12.1-next-2025-09-10-
|
|
37
|
-
"@devvit/shared-types": "0.12.1-next-2025-09-10-
|
|
38
|
-
"@devvit/splash": "0.12.1-next-2025-09-10-
|
|
34
|
+
"@devvit/protos": "0.12.1-next-2025-09-10-17-26-51-8f2b1f263.0",
|
|
35
|
+
"@devvit/public-api": "0.12.1-next-2025-09-10-17-26-51-8f2b1f263.0",
|
|
36
|
+
"@devvit/shared": "0.12.1-next-2025-09-10-17-26-51-8f2b1f263.0",
|
|
37
|
+
"@devvit/shared-types": "0.12.1-next-2025-09-10-17-26-51-8f2b1f263.0",
|
|
38
|
+
"@devvit/splash": "0.12.1-next-2025-09-10-17-26-51-8f2b1f263.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@devvit/server": "*"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@devvit/repo-tools": "0.12.1-next-2025-09-10-
|
|
45
|
-
"@devvit/server": "0.12.1-next-2025-09-10-
|
|
46
|
-
"@devvit/tsconfig": "0.12.1-next-2025-09-10-
|
|
44
|
+
"@devvit/repo-tools": "0.12.1-next-2025-09-10-17-26-51-8f2b1f263.0",
|
|
45
|
+
"@devvit/server": "0.12.1-next-2025-09-10-17-26-51-8f2b1f263.0",
|
|
46
|
+
"@devvit/tsconfig": "0.12.1-next-2025-09-10-17-26-51-8f2b1f263.0",
|
|
47
47
|
"eslint": "9.11.1",
|
|
48
48
|
"typescript": "5.8.3",
|
|
49
49
|
"vitest": "1.6.1"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "934c979b6690fe530afe798070d0ab44862bda1b"
|
|
52
52
|
}
|