create-codeverse 0.0.0-stage → 0.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.
Files changed (62) hide show
  1. package/ReadMe.MD +457 -0
  2. package/bin/cli.js +280 -0
  3. package/lib/apply/front.js +122 -0
  4. package/lib/apply/test.js +67 -0
  5. package/lib/copyTemplate.js +73 -0
  6. package/lib/desktop.js +13 -0
  7. package/lib/installDependencies.js +37 -0
  8. package/lib/openInEditor.js +14 -0
  9. package/lib/packageJson.js +19 -0
  10. package/lib/paths.js +4 -0
  11. package/lib/prompts.js +68 -0
  12. package/lib/runCommand.js +40 -0
  13. package/lib/secret.js +80 -0
  14. package/lib/templates.js +79 -0
  15. package/lib/validateProjectName.js +24 -0
  16. package/lib/versions.js +50 -0
  17. package/package.json +46 -6
  18. package/templates/codeskills.enc +0 -0
  19. package/templates/extras/test-componentes/cypress/component/Login.cy.jsx +120 -0
  20. package/templates/extras/test-componentes/cypress/fixtures/example.json +5 -0
  21. package/templates/extras/test-componentes/cypress/support/commands.js +25 -0
  22. package/templates/extras/test-componentes/cypress/support/component-index.html +14 -0
  23. package/templates/extras/test-componentes/cypress/support/component.js +24 -0
  24. package/templates/extras/test-componentes/cypress.config.js +10 -0
  25. package/templates/extras/test-componentes/src/app/page.jsx +5 -0
  26. package/templates/extras/test-componentes/src/components/Login.jsx +47 -0
  27. package/templates/extras/test-dependencias/tests/nome-do-script.test.js +79 -0
  28. package/templates/front/.env.example +0 -0
  29. package/templates/front/ReadMe.MD +36 -0
  30. package/templates/front/_gitignore +42 -0
  31. package/templates/front/biome.json +42 -0
  32. package/templates/front/jsconfig.json +8 -0
  33. package/templates/front/next.config.mjs +11 -0
  34. package/templates/front/package.template.json +41 -0
  35. package/templates/front/public/fonts/gitkeep +0 -0
  36. package/templates/front/public/icons/gitkeep +0 -0
  37. package/templates/front/public/images/gitkeep +0 -0
  38. package/templates/front/public/media/gitkeep +0 -0
  39. package/templates/front/public/sounds/gitkeep +0 -0
  40. package/templates/front/src/app/favicon.ico +0 -0
  41. package/templates/front/src/app/globals.css +9 -0
  42. package/templates/front/src/app/layout.js +14 -0
  43. package/templates/front/src/app/nome-da-rota/nome-da-rota.module.css +0 -0
  44. package/templates/front/src/app/nome-da-rota/page.jsx +5 -0
  45. package/templates/front/src/app/page.jsx +39 -0
  46. package/templates/front/src/app/page.module.css +98 -0
  47. package/templates/front/src/components/Nome-do-componente.jsx +5 -0
  48. package/templates/front/src/components/Nome-do-componente.module.css +0 -0
  49. package/templates/integracao/cypress/e2e/meu-teste.cy.js +75 -0
  50. package/templates/integracao/cypress/fixtures/example.json +5 -0
  51. package/templates/integracao/cypress/support/commands.js +25 -0
  52. package/templates/integracao/cypress/support/e2e.js +17 -0
  53. package/templates/integracao/cypress.config.js +7 -0
  54. package/templates/integracao/package.template.json +37 -0
  55. package/templates/test/.env.example +0 -0
  56. package/templates/test/_gitignore +25 -0
  57. package/templates/test/jest.reporters.config.mjs +14 -0
  58. package/templates/test/package.template.json +42 -0
  59. package/templates/test/src/nome-do-seu-script.js +4 -0
  60. package/templates/test/tests/nome-do-script.test.js +40 -0
  61. package/templates/versions.json +81 -0
  62. package/README.md +0 -3
@@ -0,0 +1,14 @@
1
+ export default {
2
+ reporters: [
3
+ 'default',
4
+ [
5
+ 'jest-html-reporters',
6
+ {
7
+ publicPath: './_html-report',
8
+ filename: 'index.html',
9
+ pageTitle: 'Relatório de Testes — CodeVerse',
10
+ openReport: true,
11
+ },
12
+ ],
13
+ ],
14
+ };
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "jest-test",
3
+ "version": "1.0.0",
4
+ "description": "Projeto template didático de testes unitários e de dependências com Jest.",
5
+ "private": true,
6
+ "scripts": {
7
+ "test": "cls && node --experimental-vm-modules node_modules/jest/bin/jest.js --runInBand --verbose",
8
+ "report": "npm test -- --coverage --json --outputFile=coverage/relatorio.json",
9
+ "dashboard": "npm test -- --config jest.reporters.config.mjs"
10
+ },
11
+ "keywords": [
12
+ "javascript",
13
+ "jest",
14
+ "testes",
15
+ "testes-unitarios",
16
+ "testes-de-dependencias",
17
+ "mock",
18
+ "testing",
19
+ "nodejs",
20
+ "codeverse"
21
+ ],
22
+ "homepage": "https://codeverse.dev.br/",
23
+ "author": {
24
+ "name": "Marcello",
25
+ "url": "https://github.com/mapcarboni/"
26
+ },
27
+ "contributors": [
28
+ {
29
+ "name": "Marcello",
30
+ "url": "https://github.com/mapcarboni/"
31
+ },
32
+ {
33
+ "name": "Thiago",
34
+ "url": "https://github.com/thiago-rferreira/"
35
+ }
36
+ ],
37
+ "license": "MIT",
38
+ "type": "module",
39
+ "engines": {
40
+ "node": ">=20"
41
+ }
42
+ }
@@ -0,0 +1,4 @@
1
+ export function nomeDaFuncao(parametro) {
2
+ // TODO: implemente a lógica aqui
3
+ return parametro;
4
+ }
@@ -0,0 +1,40 @@
1
+ import { nomeDaFuncao } from '../src/nome-do-seu-script.js';
2
+
3
+ // describe() agrupa testes relacionados em um bloco
4
+ describe('nomeDaFuncao', () => {
5
+ // it(): cada um é UM caso de teste
6
+ it('deve fazer o que a função promete', () => {
7
+ // expect(valorRecebido).matcher(valorEsperado)
8
+ expect(nomeDaFuncao(1)).toBe(1);
9
+ });
10
+
11
+ it('toBe() compara valores primitivos (número, string, boolean) por igualdade exata', () => {
12
+ expect(1 + 1).toBe(2);
13
+ });
14
+
15
+ it('toEqual() compara objetos e arrays por atributos', () => {
16
+ expect({ nome: 'Ana' }).toEqual({ nome: 'Ana' });
17
+ });
18
+
19
+ it('toContain() verifica se um array ou string contém um item/trecho', () => {
20
+ expect([1, 2, 3]).toContain(2);
21
+ expect('JavaScript').toContain('Script');
22
+ });
23
+
24
+ it('toBeTruthy() verifica se o valor é "verdadeiro" (truthy)', () => {
25
+ expect(1).toBeTruthy();
26
+ });
27
+
28
+ it('toBeFalsy() verifica se o valor é "falso" (falsy: 0, "", null, undefined, NaN, false)', () => {
29
+ expect(0).toBeFalsy();
30
+ });
31
+
32
+ it('toHaveLength() verifica o tamanho (length) de um array ou string', () => {
33
+ expect([1, 2, 3]).toHaveLength(3);
34
+ expect('abc').toHaveLength(3);
35
+ });
36
+
37
+ it('toBeCloseTo() compara números decimais evitando erros de ponto flutuante', () => {
38
+ expect(0.1 + 0.2).toBeCloseTo(0.3);
39
+ });
40
+ });
@@ -0,0 +1,81 @@
1
+ {
2
+ "codeskills": {
3
+ "base": {
4
+ "dependencies": {
5
+ "@prisma/client": "6.19.3",
6
+ "antd": "6.6.8",
7
+ "bcryptjs": "3.0.3",
8
+ "jsonwebtoken": "9.0.3",
9
+ "next": "16.4.3",
10
+ "react": "19.3.1",
11
+ "react-dom": "19.3.1"
12
+ },
13
+ "devDependencies": {
14
+ "@biomejs/biome": "2.6.3",
15
+ "prisma": "6.19.3"
16
+ }
17
+ }
18
+ },
19
+ "front": {
20
+ "base": {
21
+ "dependencies": {
22
+ "next": "latest",
23
+ "react": "latest",
24
+ "react-dom": "latest"
25
+ },
26
+ "devDependencies": {
27
+ "@biomejs/biome": "latest",
28
+ "babel-plugin-react-compiler": "latest"
29
+ }
30
+ },
31
+ "antd": {
32
+ "dependencies": {
33
+ "@ant-design/nextjs-registry": "latest",
34
+ "antd": "latest"
35
+ }
36
+ },
37
+ "axios": {
38
+ "dependencies": {
39
+ "axios": "latest"
40
+ }
41
+ },
42
+ "lucide": {
43
+ "dependencies": {
44
+ "lucide-react": "latest"
45
+ }
46
+ },
47
+ "tailwind": {
48
+ "devDependencies": {
49
+ "@tailwindcss/postcss": "latest",
50
+ "tailwindcss": "latest"
51
+ }
52
+ },
53
+ "toast": {
54
+ "dependencies": {
55
+ "react-hot-toast": "latest"
56
+ }
57
+ }
58
+ },
59
+ "test": {
60
+ "jest": {
61
+ "base": {
62
+ "devDependencies": {
63
+ "jest": "latest",
64
+ "jest-html-reporters": "latest"
65
+ }
66
+ },
67
+ "dependencias": {
68
+ "dependencies": {
69
+ "axios": "latest"
70
+ }
71
+ }
72
+ },
73
+ "cypress": {
74
+ "base": {
75
+ "devDependencies": {
76
+ "cypress": "latest"
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.