store-fn 1.0.0 → 1.0.1
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/dist/cli.js +9 -14
- package/dist/index.d.ts +4 -42
- package/dist/index.js +585 -3
- package/dist/index.js.map +1 -1
- package/package.json +13 -4
- package/debug.ts +0 -23
- package/vite-env.d.ts +0 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "store-fn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A simple utility function to sync your Polar store with code.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,8 +20,15 @@
|
|
|
20
20
|
"url": "https://github.com/mattiaz9/store-fn/issues"
|
|
21
21
|
},
|
|
22
22
|
"module": "./dist/index.js",
|
|
23
|
-
"main": "./dist/index.
|
|
23
|
+
"main": "./dist/index.js",
|
|
24
24
|
"types": "./dist/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.js",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
25
32
|
"bin": {
|
|
26
33
|
"store-fn": "./dist/cli.js"
|
|
27
34
|
},
|
|
@@ -39,13 +46,15 @@
|
|
|
39
46
|
},
|
|
40
47
|
"dependencies": {
|
|
41
48
|
"@polar-sh/sdk": "0.42.1",
|
|
42
|
-
"
|
|
49
|
+
"dotenv": "^17.2.0",
|
|
50
|
+
"dotenv-expand": "^12.0.0",
|
|
51
|
+
"picocolors": "1.1.1",
|
|
52
|
+
"tsx": "^4.20.0"
|
|
43
53
|
},
|
|
44
54
|
"devDependencies": {
|
|
45
55
|
"@types/node": "25.0.3",
|
|
46
56
|
"prettier": "3.7.4",
|
|
47
57
|
"tsup": "8.5.1",
|
|
48
|
-
"tsx": "4.21.0",
|
|
49
58
|
"typescript": "5.9.3",
|
|
50
59
|
"vite": "7.3.0",
|
|
51
60
|
"vitest": "4.0.16"
|
package/debug.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// import { URLPattern } from "urlpattern-polyfill/urlpattern"
|
|
2
|
-
// import { safeUrl } from "./src/safe-url"
|
|
3
|
-
|
|
4
|
-
import { createRouteFn } from "./src"
|
|
5
|
-
|
|
6
|
-
// const pattern = new URLPattern({ pathname: safeUrl("/user/:id/settings/:page*") })
|
|
7
|
-
// console.log(pattern.test("http://localhost:3000/user/123/settings/456"))
|
|
8
|
-
// console.log(pattern.test("http://localhost:3000/user/123/settings/456/"))
|
|
9
|
-
// console.log(pattern.test("http://localhost:3000/user/123/settings/456/extra"))
|
|
10
|
-
const route = createRouteFn([
|
|
11
|
-
"/:org/:project/settings",
|
|
12
|
-
"/:org/:project/posts",
|
|
13
|
-
"/:org/:project",
|
|
14
|
-
"/:org/settings/billing",
|
|
15
|
-
"/:org/settings",
|
|
16
|
-
"/:org",
|
|
17
|
-
])
|
|
18
|
-
|
|
19
|
-
// console.log(route.matchUrl("/apple", ["/:org", "/:org/settings", "/:org/settings/billing"]))
|
|
20
|
-
console.log(route.matchUrl("/apple/settings", "/:org/*"))
|
|
21
|
-
// console.log(
|
|
22
|
-
// route.matchUrl("/apple/settings/billing", ["/:org", "/:org/settings", "/:org/settings/billing"])
|
|
23
|
-
// )
|