solidstep 0.3.4 → 0.4.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/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAUxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAGzC,KAAK,sBAAsB,GAAG,IAAI,CAC9B,YAAY,CAAC,QAAQ,CAAC,EACtB,MAAM,GAAG,YAAY,GAAG,MAAM,GAAG,gBAAgB,GAAG,MAAM,CAC7D,CAAC;AAEF,KAAK,sBAAsB,GAAG,kBAAkB,GAAG;IAC/C,MAAM,CAAC,EAAE,sBAAsB,CAAC;CACnC,CAAC;AAEF,KAAK,MAAM,GAAG;IACV,MAAM,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC;IACpD,OAAO,CAAC,EAAE;QACN,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;QACnC,MAAM,EAAE,GAAG,CAAC;KACf,EAAE,CAAC;IACJ,MAAM,CAAC,EAAE,IAAI,GAAG,aAAa,CAAC;IAC9B,IAAI,CAAC,EACC,sBAAsB,GACtB,CAAC,CAAC,OAAO,EAAE;QACT,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAC;KAC/B,KAAK,sBAAsB,CAAC,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,SAAQ,MAIpC,wBAsHA,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAUxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAGzC,KAAK,sBAAsB,GAAG,IAAI,CAC9B,YAAY,CAAC,QAAQ,CAAC,EACtB,MAAM,GAAG,YAAY,GAAG,MAAM,GAAG,gBAAgB,GAAG,MAAM,CAC7D,CAAC;AAEF,KAAK,sBAAsB,GAAG,kBAAkB,GAAG;IAC/C,MAAM,CAAC,EAAE,sBAAsB,CAAC;CACnC,CAAC;AAEF,KAAK,MAAM,GAAG;IACV,MAAM,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC;IACpD,OAAO,CAAC,EAAE;QACN,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;QACnC,MAAM,EAAE,GAAG,CAAC;KACf,EAAE,CAAC;IACJ,MAAM,CAAC,EAAE,IAAI,GAAG,aAAa,CAAC;IAC9B,IAAI,CAAC,EACC,sBAAsB,GACtB,CAAC,CAAC,OAAO,EAAE;QACT,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAC;KAC/B,KAAK,sBAAsB,CAAC,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,SAAQ,MAIpC,wBAqIA,CAAC"}
package/index.js CHANGED
@@ -22,9 +22,9 @@ export const defineConfig = (config = {
22
22
  };
23
23
  // @ts-ignore
24
24
  globalThis.__SOLIDSTEP_CONFIG__ = sharedConfig;
25
- const viteConfig = typeof config.vite === 'function'
25
+ const viteConfig = (typeof config.vite === 'function'
26
26
  ? config.vite
27
- : () => config.vite || {};
27
+ : () => config.vite || {});
28
28
  const app = createApp({
29
29
  server: {
30
30
  ...config.server,
@@ -77,7 +77,24 @@ export const defineConfig = (config = {
77
77
  serverFunctions.server(),
78
78
  solid({ ssr: true }),
79
79
  viteConfigPlugin('app-server', {
80
- ...(viteConfig({ router: 'server' }) || {}),
80
+ resolve: {
81
+ alias: {
82
+ instrumentation: (() => {
83
+ const userInstrumentationTs = join(process.cwd(), 'app', 'instrumentation.ts');
84
+ const userInstrumentationJs = join(process.cwd(), 'app', 'instrumentation.js');
85
+ if (existsSync(userInstrumentationTs)) {
86
+ return userInstrumentationTs;
87
+ }
88
+ else if (existsSync(userInstrumentationJs)) {
89
+ return userInstrumentationJs;
90
+ }
91
+ else {
92
+ return normalize(fileURLToPath(new URL('./utils/instrumentation-noop.js', import.meta.url)));
93
+ }
94
+ })(),
95
+ ...(viteConfig({ router: 'server' })?.resolve?.alias || {}),
96
+ },
97
+ },
81
98
  }),
82
99
  ],
83
100
  middleware: './app/middleware.ts',
package/package.json CHANGED
@@ -1,72 +1,143 @@
1
- {
2
- "name": "solidstep",
3
- "version": "0.3.4",
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/client-only": "./utils/client-only.js",
17
- "./utils/cookies": "./utils/cookies.js",
18
- "./utils/cors": "./utils/cors.js",
19
- "./utils/csp": "./utils/csp.js",
20
- "./utils/csrf": "./utils/csrf.js",
21
- "./utils/error-handler": "./utils/error-handler.js",
22
- "./utils/fetch.client": "./utils/fetch.client.js",
23
- "./utils/fetch.server": "./utils/fetch.server.js",
24
- "./utils/loader": "./utils/loader.js",
25
- "./utils/logger": "./utils/logger.js",
26
- "./utils/meta": "./utils/meta.js",
27
- "./utils/options": "./utils/options.js",
28
- "./utils/redirect": "./utils/redirect.js",
29
- "./utils/server-only": "./utils/server-only.js"
30
- },
31
- "scripts": {
32
- "clean": "rimraf ./dist",
33
- "copy-files:root": "copyfiles -u 0 README.md package.json generate/**/* LICENSE ./dist",
34
- "build": "pnpm clean && tsc && pnpm copy-files:root",
35
- "test:local": "pnpm build && cd ./dist && pnpm link --global",
36
- "test:local:clean": "pnpm unlink && pnpm clean",
37
- "roll": "pnpm build && cd dist && npm publish"
38
- },
39
- "keywords": [
40
- "solidjs",
41
- "web-development",
42
- "typescript",
43
- "npm",
44
- "solidstep",
45
- "framework"
46
- ],
47
- "dependencies": {
48
- "@vinxi/server-functions": "0.5.1",
49
- "pino": "^10.1.0",
50
- "seroval": "^1.3.2",
51
- "seroval-plugins": "^1.3.2",
52
- "undici": "^7.15.0",
53
- "vite-plugin-solid": "^2.11.7"
54
- },
55
- "devDependencies": {
56
- "copyfiles": "^2.4.1",
57
- "rimraf": "^6.0.1",
58
- "solid-js": "^1.9.7",
59
- "typescript": "^5.8.3",
60
- "vinxi": "^0.5.8"
61
- },
62
- "peerDependencies": {
63
- "solid-js": "^1.9.7",
64
- "vinxi": "^0.5.8"
65
- },
66
- "engines": {
67
- "node": ">=20"
68
- },
69
- "publishConfig": {
70
- "access": "public"
71
- }
72
- }
1
+ {
2
+ "name": "solidstep",
3
+ "version": "0.4.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
+ ".": {
14
+ "types": "./index.d.ts",
15
+ "default": "./index.js"
16
+ },
17
+ "./hooks/action-state": {
18
+ "types": "./utils/hooks/action-state.d.ts",
19
+ "default": "./utils/hooks/action-state.js"
20
+ },
21
+ "./form": {
22
+ "types": "./utils/components/form.d.ts",
23
+ "default": "./utils/components/form.js"
24
+ },
25
+ "./hooks/form-status": {
26
+ "types": "./utils/hooks/form-status.d.ts",
27
+ "default": "./utils/hooks/form-status.js"
28
+ },
29
+ "./utils/cache": {
30
+ "types": "./utils/cache.d.ts",
31
+ "default": "./utils/cache.js"
32
+ },
33
+ "./utils/client-only": {
34
+ "types": "./utils/client-only.d.ts",
35
+ "default": "./utils/client-only.js"
36
+ },
37
+ "./utils/cookies": {
38
+ "types": "./utils/cookies.d.ts",
39
+ "default": "./utils/cookies.js"
40
+ },
41
+ "./utils/cors": {
42
+ "types": "./utils/cors.d.ts",
43
+ "default": "./utils/cors.js"
44
+ },
45
+ "./utils/csp": {
46
+ "types": "./utils/csp.d.ts",
47
+ "default": "./utils/csp.js"
48
+ },
49
+ "./utils/csrf": {
50
+ "types": "./utils/csrf.d.ts",
51
+ "default": "./utils/csrf.js"
52
+ },
53
+ "./utils/error-handler": {
54
+ "types": "./utils/error-handler.d.ts",
55
+ "default": "./utils/error-handler.js"
56
+ },
57
+ "./utils/fetch.client": {
58
+ "types": "./utils/fetch.client.d.ts",
59
+ "default": "./utils/fetch.client.js"
60
+ },
61
+ "./utils/fetch.server": {
62
+ "types": "./utils/fetch.server.d.ts",
63
+ "default": "./utils/fetch.server.js"
64
+ },
65
+ "./utils/instrumentation": {
66
+ "types": "./utils/instrumentation.d.ts",
67
+ "default": "./utils/instrumentation.js"
68
+ },
69
+ "./utils/loader": {
70
+ "types": "./utils/loader.d.ts",
71
+ "default": "./utils/loader.js"
72
+ },
73
+ "./utils/logger": {
74
+ "types": "./utils/logger.d.ts",
75
+ "default": "./utils/logger.js"
76
+ },
77
+ "./utils/meta": {
78
+ "types": "./utils/meta.d.ts",
79
+ "default": "./utils/meta.js"
80
+ },
81
+ "./utils/middleware": {
82
+ "types": "./utils/middleware.d.ts",
83
+ "default": "./utils/middleware.js"
84
+ },
85
+ "./utils/options": {
86
+ "types": "./utils/options.d.ts",
87
+ "default": "./utils/options.js"
88
+ },
89
+ "./utils/redirect": {
90
+ "types": "./utils/redirect.d.ts",
91
+ "default": "./utils/redirect.js"
92
+ },
93
+ "./utils/server-only": {
94
+ "types": "./utils/server-only.d.ts",
95
+ "default": "./utils/server-only.js"
96
+ }
97
+ },
98
+ "scripts": {
99
+ "clean": "rimraf ./dist",
100
+ "copy-files:root": "copyfiles -u 0 README.md package.json generate/**/* LICENSE ./dist",
101
+ "build": "pnpm clean && tsc && pnpm copy-files:root",
102
+ "test": "vitest run",
103
+ "test:watch": "vitest",
104
+ "test:local": "pnpm build && cd ./dist && pnpm link --global",
105
+ "test:local:clean": "pnpm unlink && pnpm clean",
106
+ "roll": "pnpm build && cd dist && npm publish"
107
+ },
108
+ "keywords": [
109
+ "solidjs",
110
+ "web-development",
111
+ "typescript",
112
+ "npm",
113
+ "solidstep",
114
+ "framework"
115
+ ],
116
+ "dependencies": {
117
+ "@vinxi/server-functions": "0.5.1",
118
+ "pino": "^10.1.0",
119
+ "seroval": "^1.3.2",
120
+ "seroval-plugins": "^1.3.2",
121
+ "undici": "^7.15.0",
122
+ "vite-plugin-solid": "^2.11.7"
123
+ },
124
+ "devDependencies": {
125
+ "@vitest/coverage-v8": "^4.1.8",
126
+ "copyfiles": "^2.4.1",
127
+ "rimraf": "^6.0.1",
128
+ "solid-js": "^1.9.7",
129
+ "typescript": "^5.8.3",
130
+ "vinxi": "^0.5.8",
131
+ "vitest": "^4.1.8"
132
+ },
133
+ "peerDependencies": {
134
+ "solid-js": "^1.9.7",
135
+ "vinxi": "^0.5.8"
136
+ },
137
+ "engines": {
138
+ "node": ">=20"
139
+ },
140
+ "publishConfig": {
141
+ "access": "public"
142
+ }
143
+ }
package/server.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../server.ts"],"names":[],"mappings":"AAkfA,QAAA,MAAM,OAAO,2FA+XX,CAAC;AAEH,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../server.ts"],"names":[],"mappings":"AA2iBA,QAAA,MAAM,OAAO,2FAmdX,CAAC;AAEH,eAAe,OAAO,CAAC"}