oc-template-solid-compiler 1.0.3 → 1.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oc-template-solid-compiler",
3
- "version": "1.0.3",
3
+ "version": "1.1.1",
4
4
  "description": "Compiler for the SolidJS OC template",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
31
  "oc-template-solid": "^0.1.3",
32
- "oc-vite-compiler": "^4.0.2",
32
+ "oc-vite-compiler": "^4.1.0",
33
33
  "solid-js": "^1.8.7",
34
34
  "vite-plugin-solid": "^2.8.0"
35
35
  },
@@ -18,15 +18,6 @@
18
18
  "static": [
19
19
  "public"
20
20
  ]
21
- },
22
- "parameters": {
23
- "userId": {
24
- "default": 1,
25
- "description": "The user id from the user database",
26
- "example": 1,
27
- "mandatory": true,
28
- "type": "number"
29
- }
30
21
  }
31
22
  },
32
23
  "devDependencies": {
@@ -35,7 +26,7 @@
35
26
  "@types/testing-library__jest-dom": "^5.14.5",
36
27
  "jsdom": "^21.1.1",
37
28
  "oc-server": "^2.0.4",
38
- "oc-template-solid-compiler": "^1.0.3",
29
+ "oc-template-solid-compiler": "^1.1.0",
39
30
  "solid-js": "^1.8.21",
40
31
  "typescript": "5.5.4",
41
32
  "vitest": "^2.0.5"
@@ -24,14 +24,19 @@ describe('App - Page', () => {
24
24
  lastName: 'lastName',
25
25
  userId: 0,
26
26
  getData,
27
- getSetting
27
+ getSetting,
28
28
  }}
29
29
  >
30
- <App />
30
+ <App
31
+ firstName="firstName"
32
+ lastName="lastName"
33
+ born={1991}
34
+ hobbies={[]}
35
+ />
31
36
  </DataProvider>
32
37
  ));
33
38
 
34
- const extraInfoButton = getByText(/Get extra information/i);
39
+ const extraInfoButton = getByText(/Fun year fact/i);
35
40
  expect(extraInfoButton).toBeTruthy();
36
41
  });
37
42
  });
@@ -20,7 +20,16 @@ async function getFunFact(year: number) {
20
20
  }
21
21
 
22
22
  export const server = new Server()
23
- .handler(async (params: { userId: number }) => {
23
+ .withParameters({
24
+ userId: {
25
+ default: 1,
26
+ description: 'The user id from the user database',
27
+ example: 1,
28
+ mandatory: true,
29
+ type: 'number',
30
+ },
31
+ })
32
+ .handler(async (params) => {
24
33
  const { userId } = params;
25
34
  const user = await getUser(userId);
26
35
  const [firstName, lastName] = user.name.split(/\s+/);