create-harper 1.7.4 → 1.8.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/lib/constants/frameworks.js +20 -0
- package/lib/constants/helpMessage.js +2 -2
- package/package.json +6 -2
- package/template-react/README.md +6 -2
- package/template-react/_gitignore +1 -2
- package/template-react/config.yaml +16 -3
- package/template-react/package.json +9 -7
- package/template-react/src/App.jsx +1 -5
- package/template-react/vite.config.js +2 -2
- package/template-react-ssr/README.md +124 -0
- package/template-react-ssr/_aiignore +1 -0
- package/template-react-ssr/_env +1 -0
- package/template-react-ssr/_env.example +1 -0
- package/template-react-ssr/_github/workflow/deploy.yaml +33 -0
- package/template-react-ssr/_gitignore +148 -0
- package/template-react-ssr/_nvmrc +1 -0
- package/template-react-ssr/config.yaml +42 -0
- package/template-react-ssr/eslint.config.js +23 -0
- package/template-react-ssr/graphql.config.yml +3 -0
- package/template-react-ssr/index.html +13 -0
- package/template-react-ssr/package.json +32 -0
- package/template-react-ssr/public/react.svg +14 -0
- package/template-react-ssr/public/vite.svg +42 -0
- package/template-react-ssr/resources/README.md +11 -0
- package/template-react-ssr/schemas/README.md +11 -0
- package/template-react-ssr/schemas/jsdocTypes.js +5 -0
- package/template-react-ssr/src/App.jsx +31 -0
- package/template-react-ssr/src/counter.js +7 -0
- package/template-react-ssr/src/entry-client.jsx +13 -0
- package/template-react-ssr/src/entry-server.jsx +18 -0
- package/template-react-ssr/src/style.css +96 -0
- package/template-react-ssr/src/vite-env.d.ts +9 -0
- package/template-react-ssr/test/counter.test.js +15 -0
- package/template-react-ssr/vite.config.js +22 -0
- package/template-react-ts/README.md +6 -2
- package/template-react-ts/_gitignore +1 -2
- package/template-react-ts/config.yaml +16 -3
- package/template-react-ts/package.json +10 -8
- package/template-react-ts/vite.config.ts +2 -2
- package/template-react-ts-ssr/README.md +132 -0
- package/template-react-ts-ssr/_aiignore +1 -0
- package/template-react-ts-ssr/_env +1 -0
- package/template-react-ts-ssr/_env.example +1 -0
- package/template-react-ts-ssr/_github/workflow/deploy.yaml +33 -0
- package/template-react-ts-ssr/_gitignore +148 -0
- package/template-react-ts-ssr/_nvmrc +1 -0
- package/template-react-ts-ssr/config.yaml +43 -0
- package/template-react-ts-ssr/eslint.config.js +23 -0
- package/template-react-ts-ssr/graphql.config.yml +3 -0
- package/template-react-ts-ssr/index.html +13 -0
- package/template-react-ts-ssr/package.json +36 -0
- package/template-react-ts-ssr/public/react.svg +14 -0
- package/template-react-ts-ssr/public/vite.svg +42 -0
- package/template-react-ts-ssr/resources/README.md +11 -0
- package/template-react-ts-ssr/schemas/README.md +11 -0
- package/template-react-ts-ssr/schemas/globalTypes.d.ts +5 -0
- package/template-react-ts-ssr/schemas/types.ts +5 -0
- package/template-react-ts-ssr/src/App.tsx +35 -0
- package/template-react-ts-ssr/src/counter.ts +7 -0
- package/template-react-ts-ssr/src/entry-client.tsx +13 -0
- package/template-react-ts-ssr/src/entry-server.tsx +17 -0
- package/template-react-ts-ssr/src/style.css +96 -0
- package/template-react-ts-ssr/src/vite-env.d.ts +9 -0
- package/template-react-ts-ssr/test/counter.test.ts +15 -0
- package/template-react-ts-ssr/tsconfig.json +34 -0
- package/template-react-ts-ssr/vite.config.ts +22 -0
- package/template-vanilla/README.md +5 -1
- package/template-vanilla-ts/README.md +5 -1
- package/template-vue/README.md +6 -2
- package/template-vue/_gitignore +1 -2
- package/template-vue/config.yaml +16 -3
- package/template-vue/package.json +9 -7
- package/template-vue/src/App.vue +1 -9
- package/template-vue/vite.config.js +1 -1
- package/template-vue-ssr/README.md +124 -0
- package/template-vue-ssr/_aiignore +1 -0
- package/template-vue-ssr/_env +1 -0
- package/template-vue-ssr/_env.example +1 -0
- package/template-vue-ssr/_github/workflow/deploy.yaml +33 -0
- package/template-vue-ssr/_gitignore +148 -0
- package/template-vue-ssr/_nvmrc +1 -0
- package/template-vue-ssr/config.yaml +42 -0
- package/template-vue-ssr/eslint.config.js +23 -0
- package/template-vue-ssr/graphql.config.yml +3 -0
- package/template-vue-ssr/index.html +13 -0
- package/template-vue-ssr/package.json +31 -0
- package/template-vue-ssr/public/react.svg +14 -0
- package/template-vue-ssr/public/vite.svg +42 -0
- package/template-vue-ssr/public/vue.svg +9 -0
- package/template-vue-ssr/resources/README.md +11 -0
- package/template-vue-ssr/schemas/README.md +11 -0
- package/template-vue-ssr/schemas/jsdocTypes.js +5 -0
- package/template-vue-ssr/src/App.vue +35 -0
- package/template-vue-ssr/src/counter.js +7 -0
- package/template-vue-ssr/src/entry-client.js +7 -0
- package/template-vue-ssr/src/entry-server.js +14 -0
- package/template-vue-ssr/src/style.css +96 -0
- package/template-vue-ssr/test/counter.test.js +15 -0
- package/template-vue-ssr/vite.config.js +22 -0
- package/template-vue-ts/README.md +6 -2
- package/template-vue-ts/_gitignore +1 -2
- package/template-vue-ts/config.yaml +16 -3
- package/template-vue-ts/package.json +8 -6
- package/template-vue-ts/vite.config.ts +1 -1
- package/template-vue-ts-ssr/README.md +132 -0
- package/template-vue-ts-ssr/_aiignore +1 -0
- package/template-vue-ts-ssr/_env +1 -0
- package/template-vue-ts-ssr/_env.example +1 -0
- package/template-vue-ts-ssr/_github/workflow/deploy.yaml +33 -0
- package/template-vue-ts-ssr/_gitignore +148 -0
- package/template-vue-ts-ssr/_nvmrc +1 -0
- package/template-vue-ts-ssr/config.yaml +43 -0
- package/template-vue-ts-ssr/eslint.config.js +23 -0
- package/template-vue-ts-ssr/graphql.config.yml +3 -0
- package/template-vue-ts-ssr/index.html +13 -0
- package/template-vue-ts-ssr/package.json +34 -0
- package/template-vue-ts-ssr/public/react.svg +14 -0
- package/template-vue-ts-ssr/public/vite.svg +42 -0
- package/template-vue-ts-ssr/public/vue.svg +9 -0
- package/template-vue-ts-ssr/resources/README.md +11 -0
- package/template-vue-ts-ssr/schemas/README.md +11 -0
- package/template-vue-ts-ssr/schemas/globalTypes.d.ts +5 -0
- package/template-vue-ts-ssr/schemas/types.ts +5 -0
- package/template-vue-ts-ssr/src/App.vue +43 -0
- package/template-vue-ts-ssr/src/counter.ts +7 -0
- package/template-vue-ts-ssr/src/entry-client.ts +7 -0
- package/template-vue-ts-ssr/src/entry-server.ts +13 -0
- package/template-vue-ts-ssr/src/style.css +96 -0
- package/template-vue-ts-ssr/src/vite-env.d.ts +15 -0
- package/template-vue-ts-ssr/test/counter.test.ts +15 -0
- package/template-vue-ts-ssr/tsconfig.json +33 -0
- package/template-vue-ts-ssr/vite.config.ts +22 -0
- package/template-react/deploy-template/config.yaml +0 -10
- package/template-react/deploy-template/fastify/static.js +0 -14
- package/template-react/deploy-template/package.json +0 -5
- package/template-react-ts/deploy-template/config.yaml +0 -10
- package/template-react-ts/deploy-template/fastify/static.js +0 -14
- package/template-react-ts/deploy-template/package.json +0 -5
- package/template-vue/deploy-template/config.yaml +0 -10
- package/template-vue/deploy-template/fastify/static.js +0 -14
- package/template-vue/deploy-template/package.json +0 -5
- package/template-vue-ts/deploy-template/config.yaml +0 -10
- package/template-vue-ts/deploy-template/fastify/static.js +0 -14
- package/template-vue-ts/deploy-template/package.json +0 -5
- /package/{template-react → template-react-ts-ssr}/public/typescript.svg +0 -0
- /package/{template-vue → template-vue-ts-ssr}/public/typescript.svg +0 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
.DS_Store
|
|
2
|
+
dist
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# https://raw.githubusercontent.com/github/gitignore/refs/heads/main/Node.gitignore
|
|
6
|
+
#
|
|
7
|
+
|
|
8
|
+
# Logs
|
|
9
|
+
logs
|
|
10
|
+
*.log
|
|
11
|
+
npm-debug.log*
|
|
12
|
+
yarn-debug.log*
|
|
13
|
+
yarn-error.log*
|
|
14
|
+
lerna-debug.log*
|
|
15
|
+
|
|
16
|
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
17
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
18
|
+
|
|
19
|
+
# Runtime data
|
|
20
|
+
pids
|
|
21
|
+
*.pid
|
|
22
|
+
*.seed
|
|
23
|
+
*.pid.lock
|
|
24
|
+
|
|
25
|
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
26
|
+
lib-cov
|
|
27
|
+
|
|
28
|
+
# Coverage directory used by tools like istanbul
|
|
29
|
+
coverage
|
|
30
|
+
*.lcov
|
|
31
|
+
|
|
32
|
+
# nyc test coverage
|
|
33
|
+
.nyc_output
|
|
34
|
+
|
|
35
|
+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
36
|
+
.grunt
|
|
37
|
+
|
|
38
|
+
# Bower dependency directory (https://bower.io/)
|
|
39
|
+
bower_components
|
|
40
|
+
|
|
41
|
+
# node-waf configuration
|
|
42
|
+
.lock-wscript
|
|
43
|
+
|
|
44
|
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
45
|
+
build/Release
|
|
46
|
+
|
|
47
|
+
# Dependency directories
|
|
48
|
+
node_modules/
|
|
49
|
+
jspm_packages/
|
|
50
|
+
|
|
51
|
+
# Snowpack dependency directory (https://snowpack.dev/)
|
|
52
|
+
web_modules/
|
|
53
|
+
|
|
54
|
+
# TypeScript cache
|
|
55
|
+
*.tsbuildinfo
|
|
56
|
+
|
|
57
|
+
# Optional npm cache directory
|
|
58
|
+
.npm
|
|
59
|
+
|
|
60
|
+
# Optional eslint cache
|
|
61
|
+
.eslintcache
|
|
62
|
+
|
|
63
|
+
# Optional stylelint cache
|
|
64
|
+
.stylelintcache
|
|
65
|
+
|
|
66
|
+
# Optional REPL history
|
|
67
|
+
.node_repl_history
|
|
68
|
+
|
|
69
|
+
# Output of 'npm pack'
|
|
70
|
+
*.tgz
|
|
71
|
+
|
|
72
|
+
# Yarn Integrity file
|
|
73
|
+
.yarn-integrity
|
|
74
|
+
|
|
75
|
+
# dotenv environment variable files
|
|
76
|
+
.env
|
|
77
|
+
.env.*
|
|
78
|
+
!.env.example
|
|
79
|
+
|
|
80
|
+
# parcel-bundler cache (https://parceljs.org/)
|
|
81
|
+
.cache
|
|
82
|
+
.parcel-cache
|
|
83
|
+
|
|
84
|
+
# Next.js build output
|
|
85
|
+
.next
|
|
86
|
+
out
|
|
87
|
+
|
|
88
|
+
# Nuxt.js build / generate output
|
|
89
|
+
.nuxt
|
|
90
|
+
dist
|
|
91
|
+
.output
|
|
92
|
+
|
|
93
|
+
# Gatsby files
|
|
94
|
+
.cache/
|
|
95
|
+
# Comment in the public line in if your project uses Gatsby and not Next.js
|
|
96
|
+
# https://nextjs.org/blog/next-9-1#public-directory-support
|
|
97
|
+
# public
|
|
98
|
+
|
|
99
|
+
# vuepress build output
|
|
100
|
+
.vuepress/dist
|
|
101
|
+
|
|
102
|
+
# vuepress v2.x temp and cache directory
|
|
103
|
+
.temp
|
|
104
|
+
.cache
|
|
105
|
+
|
|
106
|
+
# Sveltekit cache directory
|
|
107
|
+
.svelte-kit/
|
|
108
|
+
|
|
109
|
+
# vitepress build output
|
|
110
|
+
**/.vitepress/dist
|
|
111
|
+
|
|
112
|
+
# vitepress cache directory
|
|
113
|
+
**/.vitepress/cache
|
|
114
|
+
|
|
115
|
+
# Docusaurus cache and generated files
|
|
116
|
+
.docusaurus
|
|
117
|
+
|
|
118
|
+
# Serverless directories
|
|
119
|
+
.serverless/
|
|
120
|
+
|
|
121
|
+
# FuseBox cache
|
|
122
|
+
.fusebox/
|
|
123
|
+
|
|
124
|
+
# DynamoDB Local files
|
|
125
|
+
.dynamodb/
|
|
126
|
+
|
|
127
|
+
# Firebase cache directory
|
|
128
|
+
.firebase/
|
|
129
|
+
|
|
130
|
+
# TernJS port file
|
|
131
|
+
.tern-port
|
|
132
|
+
|
|
133
|
+
# Stores VSCode versions used for testing VSCode extensions
|
|
134
|
+
.vscode-test
|
|
135
|
+
|
|
136
|
+
# yarn v3
|
|
137
|
+
.pnp.*
|
|
138
|
+
.yarn/*
|
|
139
|
+
!.yarn/patches
|
|
140
|
+
!.yarn/plugins
|
|
141
|
+
!.yarn/releases
|
|
142
|
+
!.yarn/sdks
|
|
143
|
+
!.yarn/versions
|
|
144
|
+
|
|
145
|
+
# Vite files
|
|
146
|
+
vite.config.js.timestamp-*
|
|
147
|
+
vite.config.ts.timestamp-*
|
|
148
|
+
.vite/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
24.13.1
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# yaml-language-server: $schema=./node_modules/harper/config-app.schema.json
|
|
2
|
+
|
|
3
|
+
# This is the configuration file for the application.
|
|
4
|
+
# It specifies built-in Harper components that will load the specified feature and files.
|
|
5
|
+
# For more information, see https://docs.harperdb.io/docs/reference/components/built-in-extensions
|
|
6
|
+
|
|
7
|
+
# Load Environment Variables from the specified file
|
|
8
|
+
# loadEnv:
|
|
9
|
+
# files: '.env'
|
|
10
|
+
|
|
11
|
+
# This provides the HTTP REST interface for all exported resources
|
|
12
|
+
rest: true
|
|
13
|
+
|
|
14
|
+
# These reads GraphQL schemas to define the schema of database/tables/attributes.
|
|
15
|
+
graphqlSchema:
|
|
16
|
+
files: 'schemas/*.graphql'
|
|
17
|
+
|
|
18
|
+
# Loads JavaScript modules such that their exports are exported as resources
|
|
19
|
+
jsResource:
|
|
20
|
+
files: 'resources/*.ts'
|
|
21
|
+
|
|
22
|
+
# Generates types for the schema so your code is schema-aware
|
|
23
|
+
'@harperfast/schema-codegen':
|
|
24
|
+
package: '@harperfast/schema-codegen'
|
|
25
|
+
globalTypes: 'schemas/globalTypes.d.ts'
|
|
26
|
+
schemaTypes: 'schemas/types.ts'
|
|
27
|
+
|
|
28
|
+
# Bootstraps Vite to build your frontend to HTML/JS/CSS.
|
|
29
|
+
# In production it builds your app (and recompiles when files in `files` change) and renders HTML on
|
|
30
|
+
# the server; the `static` component below serves the built assets. Listed before `static` so its dev
|
|
31
|
+
# server wins in `harper dev`.
|
|
32
|
+
'@harperfast/vite':
|
|
33
|
+
package: '@harperfast/vite'
|
|
34
|
+
files: 'src/**/*'
|
|
35
|
+
output: 'dist'
|
|
36
|
+
# Server-side render entry. Renders HTML on the server; omit to serve a client-only (SPA) app.
|
|
37
|
+
ssr: 'src/entry-server.tsx'
|
|
38
|
+
|
|
39
|
+
# Serves the built assets from Vite's output directory. `index: false` because this is an SSR app —
|
|
40
|
+
# the Vite plugin renders index.html; static only serves assets.
|
|
41
|
+
static:
|
|
42
|
+
files: 'dist/**'
|
|
43
|
+
index: false
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import js from '@eslint/js';
|
|
2
|
+
import globals from 'globals';
|
|
3
|
+
|
|
4
|
+
export default [
|
|
5
|
+
js.configs.recommended,
|
|
6
|
+
{
|
|
7
|
+
languageOptions: {
|
|
8
|
+
globals: {
|
|
9
|
+
...globals.browser,
|
|
10
|
+
...globals.node,
|
|
11
|
+
},
|
|
12
|
+
ecmaVersion: 'latest',
|
|
13
|
+
sourceType: 'module',
|
|
14
|
+
},
|
|
15
|
+
rules: {
|
|
16
|
+
'no-unused-vars': 'warn',
|
|
17
|
+
'no-console': 'off',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
ignores: ['node_modules/'],
|
|
22
|
+
},
|
|
23
|
+
];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>your-project-name-here</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="app"><!--ssr-outlet--></div>
|
|
11
|
+
<script type="module" src="/src/entry-client.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "your-package-name-here",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"repository": "github:HarperFast/create-harper",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"agent:run": "npx -y @harperfast/agent@latest",
|
|
8
|
+
"agent:skills:update": "npx -y skills@latest add harperfast/skills --all --yes",
|
|
9
|
+
"start": "harper run .",
|
|
10
|
+
"dev": "harper dev .",
|
|
11
|
+
"lint": "eslint .",
|
|
12
|
+
"format": "prettier --write .",
|
|
13
|
+
"test": "node --test test/*.test.ts",
|
|
14
|
+
"test:watch": "node --watch --test test/*.test.ts",
|
|
15
|
+
"build": "vite build",
|
|
16
|
+
"deploy": "harper deploy_component . restart=true replicated=true"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@harperfast/schema-codegen": "^1.0.10",
|
|
20
|
+
"@harperfast/vite": "^1.1.0",
|
|
21
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
22
|
+
"react": "^19.2.4",
|
|
23
|
+
"react-dom": "^19.2.4",
|
|
24
|
+
"vite": "^8.0.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@eslint/js": "^10.0.1",
|
|
28
|
+
"@types/node": "^24.10.1",
|
|
29
|
+
"@types/react": "^19.2.10",
|
|
30
|
+
"@types/react-dom": "^19.2.3",
|
|
31
|
+
"eslint": "^10.0.2",
|
|
32
|
+
"globals": "^17.4.0",
|
|
33
|
+
"prettier": "^3.8.1",
|
|
34
|
+
"typescript": "~6.0.0"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
width="100%"
|
|
3
|
+
height="100%"
|
|
4
|
+
viewBox="-10.5 -9.45 21 18.9"
|
|
5
|
+
fill="none"
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
>
|
|
8
|
+
<circle cx="0" cy="0" r="2" fill="#58c4dc"></circle>
|
|
9
|
+
<g stroke="#58c4dc" stroke-width="1" fill="none">
|
|
10
|
+
<ellipse rx="10" ry="4.5"></ellipse>
|
|
11
|
+
<ellipse rx="10" ry="4.5" transform="rotate(60)"></ellipse>
|
|
12
|
+
<ellipse rx="10" ry="4.5" transform="rotate(120)"></ellipse>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
+
aria-hidden="true"
|
|
4
|
+
role="img"
|
|
5
|
+
class="iconify iconify--logos"
|
|
6
|
+
width="31.88"
|
|
7
|
+
height="32"
|
|
8
|
+
preserveAspectRatio="xMidYMid meet"
|
|
9
|
+
viewBox="0 0 256 257"
|
|
10
|
+
>
|
|
11
|
+
<defs>
|
|
12
|
+
<linearGradient
|
|
13
|
+
id="IconifyId1813088fe1fbc01fb466"
|
|
14
|
+
x1="-.828%"
|
|
15
|
+
x2="57.636%"
|
|
16
|
+
y1="7.652%"
|
|
17
|
+
y2="78.411%"
|
|
18
|
+
>
|
|
19
|
+
<stop offset="0%" stop-color="#41D1FF"></stop>
|
|
20
|
+
<stop offset="100%" stop-color="#BD34FE"></stop>
|
|
21
|
+
</linearGradient>
|
|
22
|
+
<linearGradient
|
|
23
|
+
id="IconifyId1813088fe1fbc01fb467"
|
|
24
|
+
x1="43.376%"
|
|
25
|
+
x2="50.316%"
|
|
26
|
+
y1="2.242%"
|
|
27
|
+
y2="89.03%"
|
|
28
|
+
>
|
|
29
|
+
<stop offset="0%" stop-color="#FFEA83"></stop>
|
|
30
|
+
<stop offset="8.333%" stop-color="#FFDD35"></stop>
|
|
31
|
+
<stop offset="100%" stop-color="#FFA800"></stop>
|
|
32
|
+
</linearGradient>
|
|
33
|
+
</defs>
|
|
34
|
+
<path
|
|
35
|
+
fill="url(#IconifyId1813088fe1fbc01fb466)"
|
|
36
|
+
d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"
|
|
37
|
+
></path>
|
|
38
|
+
<path
|
|
39
|
+
fill="url(#IconifyId1813088fe1fbc01fb467)"
|
|
40
|
+
d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"
|
|
41
|
+
></path>
|
|
42
|
+
</svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Resources
|
|
2
|
+
|
|
3
|
+
The [schemas you define in .GraphQL files](../.agents/skills/harper-best-practices/rules/adding-tables-with-schemas.md) will [automatically stand-up REST APIs](../.agents/skills/harper-best-practices/rules/automatic-apis.md).
|
|
4
|
+
|
|
5
|
+
But you can [extend your tables with custom logic](../.agents/skills/harper-best-practices/rules/extending-tables.md) and [create your own resources](../.agents/skills/harper-best-practices/rules/custom-resources.md) in this directory.
|
|
6
|
+
|
|
7
|
+
## Want to read more?
|
|
8
|
+
|
|
9
|
+
Check out the rest of the "skills" documentation!
|
|
10
|
+
|
|
11
|
+
[Harper Best Practices Skill](../.agents/skills/harper-best-practices/SKILL.md)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Schemas
|
|
2
|
+
|
|
3
|
+
Your schemas are defined in `.graphql` files within this `schemas` directory. These files contain the structure and types for your database tables, allowing Harper to automatically generate REST APIs for CRUD operations.
|
|
4
|
+
|
|
5
|
+
Take a look at the [Adding Tables with Schemas](../.agents/skills/harper-best-practices/rules/adding-tables-with-schemas.md) to learn more!
|
|
6
|
+
|
|
7
|
+
## Want to read more?
|
|
8
|
+
|
|
9
|
+
Check out the rest of the "skills" documentation!
|
|
10
|
+
|
|
11
|
+
[Harper Best Practices Skill](../.agents/skills/harper-best-practices/SKILL.md)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import reactLogo from '/react.svg';
|
|
2
|
+
import typescriptLogo from '/typescript.svg';
|
|
3
|
+
import viteLogo from '/vite.svg';
|
|
4
|
+
import { increment } from '@/counter.ts';
|
|
5
|
+
import { useCallback, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
export function App() {
|
|
8
|
+
const [counter, setCounter] = useState(0);
|
|
9
|
+
const countUp = useCallback(() => {
|
|
10
|
+
setCounter((counter: number) => increment(counter));
|
|
11
|
+
}, []);
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<>
|
|
15
|
+
<div>
|
|
16
|
+
<a href="https://vite.dev" target="_blank" rel="noopener noreferrer">
|
|
17
|
+
<img src={viteLogo} className="logo" alt="Vite logo" />
|
|
18
|
+
</a>
|
|
19
|
+
<a href="https://www.typescriptlang.org/" target="_blank" rel="noopener noreferrer">
|
|
20
|
+
<img src={typescriptLogo} className="logo vanilla" alt="TypeScript logo" />
|
|
21
|
+
</a>
|
|
22
|
+
<a href="https://react.dev/" target="_blank" rel="noopener noreferrer">
|
|
23
|
+
<img src={reactLogo} className="logo react" alt="React logo" />
|
|
24
|
+
</a>
|
|
25
|
+
<h1>Vite + TypeScript + React</h1>
|
|
26
|
+
<p>Wow, look at this!</p>
|
|
27
|
+
<div className="card">
|
|
28
|
+
<button id="counter" type="button" onClick={countUp}>
|
|
29
|
+
count is {counter}
|
|
30
|
+
</button>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { App } from '@/App.tsx';
|
|
2
|
+
import { StrictMode } from 'react';
|
|
3
|
+
import { hydrateRoot } from 'react-dom/client';
|
|
4
|
+
|
|
5
|
+
import './style.css';
|
|
6
|
+
|
|
7
|
+
// Hydrate the server-rendered markup. (A client-only app would use `createRoot(...).render(...)`.)
|
|
8
|
+
hydrateRoot(
|
|
9
|
+
document.getElementById('app')!,
|
|
10
|
+
<StrictMode>
|
|
11
|
+
<App />
|
|
12
|
+
</StrictMode>,
|
|
13
|
+
);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { App } from '@/App.tsx';
|
|
2
|
+
import { StrictMode } from 'react';
|
|
3
|
+
import { renderToString } from 'react-dom/server';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Server render entry. The Vite Harper plugin calls this for HTML navigations and injects the
|
|
7
|
+
* returned markup into the `<!--ssr-outlet-->` placeholder in index.html.
|
|
8
|
+
*
|
|
9
|
+
* @param _url The request URL — use it to drive routing/data loading per request.
|
|
10
|
+
*/
|
|
11
|
+
export function render(_url: string): string {
|
|
12
|
+
return renderToString(
|
|
13
|
+
<StrictMode>
|
|
14
|
+
<App />
|
|
15
|
+
</StrictMode>,
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
+
line-height: 1.5;
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
|
|
6
|
+
color-scheme: light dark;
|
|
7
|
+
color: rgba(255, 255, 255, 0.87);
|
|
8
|
+
background-color: #242424;
|
|
9
|
+
|
|
10
|
+
font-synthesis: none;
|
|
11
|
+
text-rendering: optimizeLegibility;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
a {
|
|
17
|
+
font-weight: 500;
|
|
18
|
+
color: #646cff;
|
|
19
|
+
text-decoration: inherit;
|
|
20
|
+
}
|
|
21
|
+
a:hover {
|
|
22
|
+
color: #535bf2;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
body {
|
|
26
|
+
margin: 0;
|
|
27
|
+
display: flex;
|
|
28
|
+
place-items: center;
|
|
29
|
+
min-width: 320px;
|
|
30
|
+
min-height: 100vh;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
h1 {
|
|
34
|
+
font-size: 3.2em;
|
|
35
|
+
line-height: 1.1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
#app {
|
|
39
|
+
max-width: 1280px;
|
|
40
|
+
margin: 0 auto;
|
|
41
|
+
padding: 2rem;
|
|
42
|
+
text-align: center;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.logo {
|
|
46
|
+
height: 6em;
|
|
47
|
+
padding: 1.5em;
|
|
48
|
+
will-change: filter;
|
|
49
|
+
transition: filter 300ms;
|
|
50
|
+
}
|
|
51
|
+
.logo:hover {
|
|
52
|
+
filter: drop-shadow(0 0 2em #646cffaa);
|
|
53
|
+
}
|
|
54
|
+
.logo.vanilla:hover {
|
|
55
|
+
filter: drop-shadow(0 0 2em #3178c6aa);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.card {
|
|
59
|
+
padding: 2em;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.read-the-docs {
|
|
63
|
+
color: #888;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
button {
|
|
67
|
+
border-radius: 8px;
|
|
68
|
+
border: 1px solid transparent;
|
|
69
|
+
padding: 0.6em 1.2em;
|
|
70
|
+
font-size: 1em;
|
|
71
|
+
font-weight: 500;
|
|
72
|
+
font-family: inherit;
|
|
73
|
+
background-color: #1a1a1a;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
transition: border-color 0.25s;
|
|
76
|
+
}
|
|
77
|
+
button:hover {
|
|
78
|
+
border-color: #646cff;
|
|
79
|
+
}
|
|
80
|
+
button:focus,
|
|
81
|
+
button:focus-visible {
|
|
82
|
+
outline: 4px auto -webkit-focus-ring-color;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@media (prefers-color-scheme: light) {
|
|
86
|
+
:root {
|
|
87
|
+
color: #213547;
|
|
88
|
+
background-color: #ffffff;
|
|
89
|
+
}
|
|
90
|
+
a:hover {
|
|
91
|
+
color: #747bff;
|
|
92
|
+
}
|
|
93
|
+
button {
|
|
94
|
+
background-color: #f9f9f9;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { strictEqual } from 'node:assert/strict';
|
|
2
|
+
import { test } from 'node:test';
|
|
3
|
+
import { decrement, increment } from '../src/counter.ts';
|
|
4
|
+
|
|
5
|
+
test('increment function', () => {
|
|
6
|
+
strictEqual(increment(0), 1);
|
|
7
|
+
strictEqual(increment(1), 2);
|
|
8
|
+
strictEqual(increment(-1), 0);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
test('decrement function', () => {
|
|
12
|
+
strictEqual(decrement(0), -1);
|
|
13
|
+
strictEqual(decrement(1), 0);
|
|
14
|
+
strictEqual(decrement(-1), -2);
|
|
15
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
+
"types": ["vite/client"],
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"jsx": "react-jsx",
|
|
11
|
+
"baseUrl": ".",
|
|
12
|
+
"paths": {
|
|
13
|
+
"@/*": [
|
|
14
|
+
"./src/*"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
/* Bundler mode */
|
|
19
|
+
"moduleResolution": "bundler",
|
|
20
|
+
"allowImportingTsExtensions": true,
|
|
21
|
+
"verbatimModuleSyntax": true,
|
|
22
|
+
"moduleDetection": "force",
|
|
23
|
+
"noEmit": true,
|
|
24
|
+
|
|
25
|
+
/* Linting */
|
|
26
|
+
"strict": true,
|
|
27
|
+
"noUnusedLocals": true,
|
|
28
|
+
"noUnusedParameters": true,
|
|
29
|
+
"erasableSyntaxOnly": true,
|
|
30
|
+
"noFallthroughCasesInSwitch": true,
|
|
31
|
+
"noUncheckedSideEffectImports": true
|
|
32
|
+
},
|
|
33
|
+
"include": ["src"]
|
|
34
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import react from '@vitejs/plugin-react';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { defineConfig } from 'vite';
|
|
4
|
+
|
|
5
|
+
// https://vite.dev/config/
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [
|
|
8
|
+
react(),
|
|
9
|
+
],
|
|
10
|
+
resolve: {
|
|
11
|
+
alias: {
|
|
12
|
+
'@': path.resolve(import.meta.dirname, './src'),
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
build: {
|
|
16
|
+
outDir: 'dist',
|
|
17
|
+
emptyOutDir: true,
|
|
18
|
+
rolldownOptions: {
|
|
19
|
+
external: ['**/*.test.*', '**/*.spec.*'],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
});
|
|
@@ -105,7 +105,11 @@ Take a look at the [default configuration](./config.yaml), which specifies how f
|
|
|
105
105
|
|
|
106
106
|
When you are ready, head to [https://fabric.harper.fast/](https://fabric.harper.fast/), log in to your account, and create a cluster.
|
|
107
107
|
|
|
108
|
-
Come back
|
|
108
|
+
Come back and log in your local CLI to your cluster:
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
harper login
|
|
112
|
+
```
|
|
109
113
|
|
|
110
114
|
Then you can deploy your app to your cluster:
|
|
111
115
|
|
|
@@ -113,7 +113,11 @@ Take a look at the [default configuration](./config.yaml), which specifies how f
|
|
|
113
113
|
|
|
114
114
|
When you are ready, head to [https://fabric.harper.fast/](https://fabric.harper.fast/), log in to your account, and create a cluster.
|
|
115
115
|
|
|
116
|
-
Come back
|
|
116
|
+
Come back and log in your local CLI to your cluster:
|
|
117
|
+
|
|
118
|
+
```sh
|
|
119
|
+
harper login
|
|
120
|
+
```
|
|
117
121
|
|
|
118
122
|
Then you can deploy your app to your cluster:
|
|
119
123
|
|
package/template-vue/README.md
CHANGED
|
@@ -81,7 +81,7 @@ These schemas are the heart of a great Harper app, specifying which tables you w
|
|
|
81
81
|
|
|
82
82
|
### View Your Website
|
|
83
83
|
|
|
84
|
-
Pop open [http://localhost:9926](http://localhost:9926) to view [
|
|
84
|
+
Pop open [http://localhost:9926](http://localhost:9926) to view [index.html](./index.html) in your browser.
|
|
85
85
|
|
|
86
86
|
### Use Your API
|
|
87
87
|
|
|
@@ -105,7 +105,11 @@ Take a look at the [default configuration](./config.yaml), which specifies how f
|
|
|
105
105
|
|
|
106
106
|
When you are ready, head to [https://fabric.harper.fast/](https://fabric.harper.fast/), log in to your account, and create a cluster.
|
|
107
107
|
|
|
108
|
-
Come back
|
|
108
|
+
Come back and log in your local CLI to your cluster:
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
harper login
|
|
112
|
+
```
|
|
109
113
|
|
|
110
114
|
Then you can deploy your app to your cluster:
|
|
111
115
|
|