solidstep 0.2.0 → 0.3.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/README.md +10 -0
- package/package.json +70 -70
- package/server.d.ts +1 -1
- package/server.d.ts.map +1 -1
- package/server.js +380 -401
- package/utils/cache.js +3 -3
- package/utils/path-router.d.ts +70 -0
- package/utils/path-router.d.ts.map +1 -0
- package/utils/path-router.js +97 -0
- package/utils/server-action.server.d.ts.map +1 -1
- package/utils/server-action.server.js +2 -1
package/README.md
CHANGED
|
@@ -805,6 +805,16 @@ As SolidStep is built using Vite, it follows the same guide as stated in [Vite d
|
|
|
805
805
|
- Advanced caching strategies
|
|
806
806
|
- WebSocket support
|
|
807
807
|
|
|
808
|
+
## Testing
|
|
809
|
+
|
|
810
|
+
SolidStep does not include a built-in testing framework. However, we recommend setting up testing using Vitest ecosystem. You can use [Vitest](https://vitest.dev/) for unit and integration tests, and [Playwright](https://playwright.dev/) for end-to-end testing.
|
|
811
|
+
|
|
812
|
+
### Testing Server Actions
|
|
813
|
+
|
|
814
|
+
When testing server actions, you can use Vitest to accomplish this. Just test as you would with any other async function.
|
|
815
|
+
|
|
816
|
+
When testing pages (e2e tests), you can trigger server actions by simulating user interactions that would call those actions. If needed, you can also intercept network requests to directly test the action endpoints. Use the testing framework's capabilities to intercept the requests and ensure the responses have the expected results. If the server action returns json data, stringify it and add it to the response body as well as setting the content-type header to 'application/json'. If the action has a more complex return type, use seroval to serialize the response before sending it back.
|
|
817
|
+
|
|
808
818
|
## License
|
|
809
819
|
|
|
810
820
|
MIT
|
package/package.json
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "solidstep",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Next Step SolidJS Framework for building web applications.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"author": "HamzaKV <hamzakv333@gmail.com>",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "https://github.com/HamzaKV/solidstep.git"
|
|
10
|
-
},
|
|
11
|
-
"license": "MIT",
|
|
12
|
-
"exports": {
|
|
13
|
-
".": "./index.js",
|
|
14
|
-
"./hooks/action-state": "./utils/hooks/action-state.js",
|
|
15
|
-
"./utils/cache": "./utils/cache.js",
|
|
16
|
-
"./utils/cookies": "./utils/cookies.js",
|
|
17
|
-
"./utils/cors": "./utils/cors.js",
|
|
18
|
-
"./utils/csp": "./utils/csp.js",
|
|
19
|
-
"./utils/csrf": "./utils/csrf.js",
|
|
20
|
-
"./utils/error-handler": "./utils/error-handler.js",
|
|
21
|
-
"./utils/fetch.client": "./utils/fetch.client.js",
|
|
22
|
-
"./utils/fetch.server": "./utils/fetch.server.js",
|
|
23
|
-
"./utils/loader": "./utils/loader.js",
|
|
24
|
-
"./utils/logger": "./utils/logger.js",
|
|
25
|
-
"./utils/meta": "./utils/meta.js",
|
|
26
|
-
"./utils/redirect": "./utils/redirect.js",
|
|
27
|
-
"./utils/server-only": "./utils/server-only.js"
|
|
28
|
-
},
|
|
29
|
-
"scripts": {
|
|
30
|
-
"clean": "rimraf ./dist",
|
|
31
|
-
"copy-files:root": "copyfiles -u 0 README.md package.json generate/**/* LICENSE ./dist",
|
|
32
|
-
"build": "pnpm clean && tsc && pnpm copy-files:root",
|
|
33
|
-
"test:local": "pnpm build && cd ./dist && pnpm link --global",
|
|
34
|
-
"test:local:clean": "pnpm unlink && pnpm clean",
|
|
35
|
-
"roll": "pnpm build && cd dist && npm publish"
|
|
36
|
-
},
|
|
37
|
-
"keywords": [
|
|
38
|
-
"solidjs",
|
|
39
|
-
"web-development",
|
|
40
|
-
"typescript",
|
|
41
|
-
"npm",
|
|
42
|
-
"solidstep",
|
|
43
|
-
"framework"
|
|
44
|
-
],
|
|
45
|
-
"dependencies": {
|
|
46
|
-
"@vinxi/server-functions": "0.5.1",
|
|
47
|
-
"pino": "^10.1.0",
|
|
48
|
-
"seroval": "^1.3.2",
|
|
49
|
-
"seroval-plugins": "^1.3.2",
|
|
50
|
-
"undici": "^7.15.0",
|
|
51
|
-
"vite-plugin-solid": "^2.11.7"
|
|
52
|
-
},
|
|
53
|
-
"devDependencies": {
|
|
54
|
-
"copyfiles": "^2.4.1",
|
|
55
|
-
"rimraf": "^6.0.1",
|
|
56
|
-
"solid-js": "^1.9.7",
|
|
57
|
-
"typescript": "^5.8.3",
|
|
58
|
-
"vinxi": "^0.5.8"
|
|
59
|
-
},
|
|
60
|
-
"peerDependencies": {
|
|
61
|
-
"solid-js": "^1.9.7",
|
|
62
|
-
"vinxi": "^0.5.8"
|
|
63
|
-
},
|
|
64
|
-
"engines": {
|
|
65
|
-
"node": ">=20"
|
|
66
|
-
},
|
|
67
|
-
"publishConfig": {
|
|
68
|
-
"access": "public"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "solidstep",
|
|
3
|
+
"version": "0.3.1",
|
|
4
|
+
"description": "Next Step SolidJS Framework for building web applications.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"author": "HamzaKV <hamzakv333@gmail.com>",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/HamzaKV/solidstep.git"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": "./index.js",
|
|
14
|
+
"./hooks/action-state": "./utils/hooks/action-state.js",
|
|
15
|
+
"./utils/cache": "./utils/cache.js",
|
|
16
|
+
"./utils/cookies": "./utils/cookies.js",
|
|
17
|
+
"./utils/cors": "./utils/cors.js",
|
|
18
|
+
"./utils/csp": "./utils/csp.js",
|
|
19
|
+
"./utils/csrf": "./utils/csrf.js",
|
|
20
|
+
"./utils/error-handler": "./utils/error-handler.js",
|
|
21
|
+
"./utils/fetch.client": "./utils/fetch.client.js",
|
|
22
|
+
"./utils/fetch.server": "./utils/fetch.server.js",
|
|
23
|
+
"./utils/loader": "./utils/loader.js",
|
|
24
|
+
"./utils/logger": "./utils/logger.js",
|
|
25
|
+
"./utils/meta": "./utils/meta.js",
|
|
26
|
+
"./utils/redirect": "./utils/redirect.js",
|
|
27
|
+
"./utils/server-only": "./utils/server-only.js"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"clean": "rimraf ./dist",
|
|
31
|
+
"copy-files:root": "copyfiles -u 0 README.md package.json generate/**/* LICENSE ./dist",
|
|
32
|
+
"build": "pnpm clean && tsc && pnpm copy-files:root",
|
|
33
|
+
"test:local": "pnpm build && cd ./dist && pnpm link --global",
|
|
34
|
+
"test:local:clean": "pnpm unlink && pnpm clean",
|
|
35
|
+
"roll": "pnpm build && cd dist && npm publish"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"solidjs",
|
|
39
|
+
"web-development",
|
|
40
|
+
"typescript",
|
|
41
|
+
"npm",
|
|
42
|
+
"solidstep",
|
|
43
|
+
"framework"
|
|
44
|
+
],
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@vinxi/server-functions": "0.5.1",
|
|
47
|
+
"pino": "^10.1.0",
|
|
48
|
+
"seroval": "^1.3.2",
|
|
49
|
+
"seroval-plugins": "^1.3.2",
|
|
50
|
+
"undici": "^7.15.0",
|
|
51
|
+
"vite-plugin-solid": "^2.11.7"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"copyfiles": "^2.4.1",
|
|
55
|
+
"rimraf": "^6.0.1",
|
|
56
|
+
"solid-js": "^1.9.7",
|
|
57
|
+
"typescript": "^5.8.3",
|
|
58
|
+
"vinxi": "^0.5.8"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"solid-js": "^1.9.7",
|
|
62
|
+
"vinxi": "^0.5.8"
|
|
63
|
+
},
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": ">=20"
|
|
66
|
+
},
|
|
67
|
+
"publishConfig": {
|
|
68
|
+
"access": "public"
|
|
69
|
+
}
|
|
70
|
+
}
|
package/server.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const handler: import("vinxi/http").EventHandler<import("vinxi/http").EventHandlerRequest, Promise<
|
|
1
|
+
declare const handler: import("vinxi/http").EventHandler<import("vinxi/http").EventHandlerRequest, Promise<any>>;
|
|
2
2
|
export default handler;
|
|
3
3
|
//# sourceMappingURL=server.d.ts.map
|
package/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../server.ts"],"names":[],"mappings":"AAkfA,QAAA,MAAM,OAAO,2FAmXX,CAAC;AAEH,eAAe,OAAO,CAAC"}
|