Comparing version 0.0.27 to 0.0.28
{ | ||
"name": "create-oc", | ||
"version": "0.0.27", | ||
"version": "0.0.28", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "", |
@@ -29,3 +29,3 @@ { | ||
"devDependencies": { | ||
"oc-server": "^1.1.1", | ||
"oc-server": "^1.1.3", | ||
"oc-template-elm-compiler": "^0.6.5", | ||
@@ -32,0 +32,0 @@ "elm": "^0.19.1-6", |
@@ -22,26 +22,28 @@ import { Server } from 'oc-server'; | ||
export const server = new Server(async (params: { userId: number }, ctx) => { | ||
const { userId } = params; | ||
const user = await getUser(userId); | ||
const [firstName, lastName] = user.name.split(/\s+/); | ||
export const server = new Server() | ||
.handler(async (params: { userId: number }, ctx) => { | ||
const { userId } = params; | ||
const user = await getUser(userId); | ||
const [firstName, lastName] = user.name.split(/\s+/); | ||
if (firstName === 'Invalid') { | ||
return; | ||
} | ||
if (firstName === 'Invalid') { | ||
return; | ||
} | ||
return { | ||
firstName, | ||
lastName, | ||
born: user.born, | ||
hobbies: user.hobbies, | ||
staticPath: ctx.staticPath, | ||
}; | ||
}).action('funFact', async (params: { year: number }) => { | ||
const { year } = params; | ||
const funFact = await getFunFact(year); | ||
return { | ||
firstName, | ||
lastName, | ||
born: user.born, | ||
hobbies: user.hobbies, | ||
staticPath: ctx.staticPath, | ||
}; | ||
}) | ||
.action('funFact', async (params: { year: number }) => { | ||
const { year } = params; | ||
const funFact = await getFunFact(year); | ||
return { | ||
funFact, | ||
}; | ||
}); | ||
return { | ||
funFact, | ||
}; | ||
}); | ||
@@ -48,0 +50,0 @@ declare module 'oc-server' { |
@@ -27,5 +27,5 @@ { | ||
"devDependencies": { | ||
"oc-server": "^1.1.1", | ||
"oc-server": "^1.1.3", | ||
"oc-template-es6-compiler": "^4.3.5" | ||
} | ||
} |
@@ -22,25 +22,27 @@ import { Server } from 'oc-server'; | ||
export const server = new Server(async (params: { userId: number }) => { | ||
const { userId } = params; | ||
const user = await getUser(userId); | ||
const [firstName, lastName] = user.name.split(/\s+/); | ||
export const server = new Server() | ||
.handler(async (params: { userId: number }) => { | ||
const { userId } = params; | ||
const user = await getUser(userId); | ||
const [firstName, lastName] = user.name.split(/\s+/); | ||
if (firstName === 'Invalid') { | ||
return; | ||
} | ||
if (firstName === 'Invalid') { | ||
return; | ||
} | ||
return { | ||
firstName, | ||
lastName, | ||
born: user.born, | ||
hobbies: user.hobbies, | ||
}; | ||
}).action('funFact', async (params: { year: number }) => { | ||
const { year } = params; | ||
const funFact = await getFunFact(year); | ||
return { | ||
firstName, | ||
lastName, | ||
born: user.born, | ||
hobbies: user.hobbies, | ||
}; | ||
}) | ||
.action('funFact', async (params: { year: number }) => { | ||
const { year } = params; | ||
const funFact = await getFunFact(year); | ||
return { | ||
funFact, | ||
}; | ||
}); | ||
return { | ||
funFact, | ||
}; | ||
}); | ||
@@ -47,0 +49,0 @@ declare module 'oc-server' { |
@@ -37,3 +37,3 @@ { | ||
"jsdom": "^21.1.1", | ||
"oc-server": "^1.1.1", | ||
"oc-server": "^1.1.3", | ||
"oc-template-preact-compiler": "^0.7.5", | ||
@@ -40,0 +40,0 @@ "preact": "^10.13.2", |
@@ -22,25 +22,27 @@ import { Server } from 'oc-server'; | ||
export const server = new Server(async (params: { userId: number }) => { | ||
const { userId } = params; | ||
const user = await getUser(userId); | ||
const [firstName, lastName] = user.name.split(/\s+/); | ||
export const server = new Server() | ||
.handler(async (params: { userId: number }) => { | ||
const { userId } = params; | ||
const user = await getUser(userId); | ||
const [firstName, lastName] = user.name.split(/\s+/); | ||
if (firstName === 'Invalid') { | ||
return; | ||
} | ||
if (firstName === 'Invalid') { | ||
return; | ||
} | ||
return { | ||
firstName, | ||
lastName, | ||
born: user.born, | ||
hobbies: user.hobbies, | ||
}; | ||
}).action('funFact', async (params: { year: number }) => { | ||
const { year } = params; | ||
const funFact = await getFunFact(year); | ||
return { | ||
firstName, | ||
lastName, | ||
born: user.born, | ||
hobbies: user.hobbies, | ||
}; | ||
}) | ||
.action('funFact', async (params: { year: number }) => { | ||
const { year } = params; | ||
const funFact = await getFunFact(year); | ||
return { | ||
funFact, | ||
}; | ||
}); | ||
return { | ||
funFact, | ||
}; | ||
}); | ||
@@ -47,0 +49,0 @@ declare module 'oc-server' { |
@@ -37,4 +37,4 @@ { | ||
"jsdom": "^21.1.1", | ||
"oc-server": "^1.1.1", | ||
"oc-template-react-compiler": "^6.5.1", | ||
"oc-server": "^1.1.3", | ||
"oc-template-react-compiler": "^6.5.2", | ||
"react": "18.2.0", | ||
@@ -41,0 +41,0 @@ "react-dom": "18.2.0", |
@@ -22,25 +22,27 @@ import { Server } from 'oc-server'; | ||
export const server = new Server(async (params: { userId: number }) => { | ||
const { userId } = params; | ||
const user = await getUser(userId); | ||
const [firstName, lastName] = user.name.split(/\s+/); | ||
export const server = new Server() | ||
.handler(async (params: { userId: number }) => { | ||
const { userId } = params; | ||
const user = await getUser(userId); | ||
const [firstName, lastName] = user.name.split(/\s+/); | ||
if (firstName === 'Invalid') { | ||
return; | ||
} | ||
if (firstName === 'Invalid') { | ||
return; | ||
} | ||
return { | ||
firstName, | ||
lastName, | ||
born: user.born, | ||
hobbies: user.hobbies, | ||
}; | ||
}).action('funFact', async (params: { year: number }) => { | ||
const { year } = params; | ||
const funFact = await getFunFact(year); | ||
return { | ||
firstName, | ||
lastName, | ||
born: user.born, | ||
hobbies: user.hobbies, | ||
}; | ||
}) | ||
.action('funFact', async (params: { year: number }) => { | ||
const { year } = params; | ||
const funFact = await getFunFact(year); | ||
return { | ||
funFact, | ||
}; | ||
}); | ||
return { | ||
funFact, | ||
}; | ||
}); | ||
@@ -47,0 +49,0 @@ declare module 'oc-server' { |
@@ -36,3 +36,3 @@ { | ||
"jsdom": "^21.1.1", | ||
"oc-server": "^1.1.1", | ||
"oc-server": "^1.1.3", | ||
"oc-template-solid-compiler": "^0.10.5", | ||
@@ -39,0 +39,0 @@ "solid-js": "^1.8.7", |
@@ -22,25 +22,27 @@ import { Server } from 'oc-server'; | ||
export const server = new Server(async (params: { userId: number }) => { | ||
const { userId } = params; | ||
const user = await getUser(userId); | ||
const [firstName, lastName] = user.name.split(/\s+/); | ||
export const server = new Server() | ||
.handler(async (params: { userId: number }) => { | ||
const { userId } = params; | ||
const user = await getUser(userId); | ||
const [firstName, lastName] = user.name.split(/\s+/); | ||
if (firstName === 'Invalid') { | ||
return; | ||
} | ||
if (firstName === 'Invalid') { | ||
return; | ||
} | ||
return { | ||
firstName, | ||
lastName, | ||
born: user.born, | ||
hobbies: user.hobbies, | ||
}; | ||
}).action('funFact', async (params: { year: number }) => { | ||
const { year } = params; | ||
const funFact = await getFunFact(year); | ||
return { | ||
firstName, | ||
lastName, | ||
born: user.born, | ||
hobbies: user.hobbies, | ||
}; | ||
}) | ||
.action('funFact', async (params: { year: number }) => { | ||
const { year } = params; | ||
const funFact = await getFunFact(year); | ||
return { | ||
funFact, | ||
}; | ||
}); | ||
return { | ||
funFact, | ||
}; | ||
}); | ||
@@ -47,0 +49,0 @@ declare module 'oc-server' { |
@@ -36,3 +36,3 @@ { | ||
"jsdom": "^21.1.1", | ||
"oc-server": "^1.1.1", | ||
"oc-server": "^1.1.3", | ||
"oc-template-vue-compiler": "^0.5.5", | ||
@@ -39,0 +39,0 @@ "typescript": "5.0.2", |
@@ -22,25 +22,27 @@ import { Server } from 'oc-server'; | ||
export const server = new Server(async (params: { userId: number }) => { | ||
const { userId } = params; | ||
const user = await getUser(userId); | ||
const [firstName, lastName] = user.name.split(/\s+/); | ||
export const server = new Server() | ||
.handler(async (params: { userId: number }) => { | ||
const { userId } = params; | ||
const user = await getUser(userId); | ||
const [firstName, lastName] = user.name.split(/\s+/); | ||
if (firstName === 'Invalid') { | ||
return; | ||
} | ||
if (firstName === 'Invalid') { | ||
return; | ||
} | ||
return { | ||
firstName, | ||
lastName, | ||
born: user.born, | ||
hobbies: user.hobbies, | ||
}; | ||
}).action('funFact', async (params: { year: number }) => { | ||
const { year } = params; | ||
const funFact = await getFunFact(year); | ||
return { | ||
firstName, | ||
lastName, | ||
born: user.born, | ||
hobbies: user.hobbies, | ||
}; | ||
}) | ||
.action('funFact', async (params: { year: number }) => { | ||
const { year } = params; | ||
const funFact = await getFunFact(year); | ||
return { | ||
funFact, | ||
}; | ||
}); | ||
return { | ||
funFact, | ||
}; | ||
}); | ||
@@ -47,0 +49,0 @@ declare module 'oc-server' { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
382715
936