mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
fix: install dependencies before nebula build
This commit is contained in:
parent
2772e568d5
commit
b19d5d06a0
2
.github/workflows/deploy-hway.yml
vendored
2
.github/workflows/deploy-hway.yml
vendored
@ -11,6 +11,8 @@ jobs:
|
||||
name: Deploy Sonr.ID on Cloudflare
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install devbox
|
||||
uses: jetify-com/devbox-install-action@v0.12.0
|
||||
- name: Deploy
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
|
2
Makefile
2
Makefile
@ -329,7 +329,7 @@ build-motr: gen-templ gen-pkl
|
||||
|
||||
build-nebula:
|
||||
@echo "(nebula) Building nebula"
|
||||
cd pkg/nebula && bun run build
|
||||
cd pkg/nebula && bun install && bun run build
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
@ -30,6 +30,9 @@
|
||||
"TEMPL_EXPERIMENT": "rawgo"
|
||||
},
|
||||
"shell": {
|
||||
"init_hook": [
|
||||
"cd web && bun install"
|
||||
],
|
||||
"scripts": {
|
||||
"build:docker": [
|
||||
"make local-image"
|
||||
|
Binary file not shown.
@ -1,12 +1,16 @@
|
||||
package state
|
||||
|
||||
func UseNavigatorCredentials() {
|
||||
templ.NewOnceHandle().Once()
|
||||
}
|
||||
|
||||
templ NavigatorCredentialsCreate() {
|
||||
<script>
|
||||
function createCredential() {
|
||||
navigator.credentials.create({
|
||||
publicKey: {
|
||||
rp: {
|
||||
name: "Sonr",
|
||||
id: "sonr.id",
|
||||
},
|
||||
user: {
|
||||
id: new Uint8Array(0),
|
||||
@ -32,11 +36,13 @@ templ NavigatorCredentialsCreate() {
|
||||
.catch((error) => {
|
||||
console.error("Error:", error);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
||||
templ NavigatorCredentialsGet() {
|
||||
<script>
|
||||
function getCredential() {
|
||||
navigator.credentials.get({
|
||||
publicKey: {
|
||||
challenge: new Uint8Array(0),
|
||||
@ -51,6 +57,7 @@ templ NavigatorCredentialsGet() {
|
||||
.catch((error) => {
|
||||
console.error("Error:", error);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
@ -8,6 +8,10 @@ package state
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
func UseNavigatorCredentials() {
|
||||
templ.NewOnceHandle().Once()
|
||||
}
|
||||
|
||||
func NavigatorCredentialsCreate() templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
||||
@ -29,7 +33,7 @@ func NavigatorCredentialsCreate() templ.Component {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<script>\n\t\tnavigator.credentials.create({\n\t\t\tpublicKey: {\n\t\t\t\trp: {\n\t\t\t\t\tname: \"Sonr\",\n\t\t\t\t\tid: \"sonr.id\",\n\t\t\t\t},\n\t\t\t\tuser: {\n\t\t\t\t\tid: new Uint8Array(0),\n\t\t\t\t\tname: \"Sonr\",\n\t\t\t\t\tdisplayName: \"Sonr\",\n\t\t\t\t},\n\t\t\t\tchallenge: new Uint8Array(0),\n\t\t\t\tpubKeyCredParams: [{\n\t\t\t\t\ttype: \"public-key\",\n\t\t\t\t\talg: -7,\n\t\t\t\t}],\n\t\t\t\ttimeout: 60000,\n\t\t\t\texcludeCredentials: [],\n\t\t\t\tauthenticatorSelection: {\n\t\t\t\t\trequireResidentKey: false,\n\t\t\t\t\tuserVerification: \"discouraged\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\t\t.then((assertion) => {\n\t\t\t\tconsole.log(\"Assertion:\", assertion);\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tconsole.error(\"Error:\", error);\n\t\t\t});\n\t</script>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<script>\n\tfunction createCredential() {\n\t\tnavigator.credentials.create({\n\t\t\tpublicKey: {\n\t\t\t\trp: {\n\t\t\t\t\tname: \"Sonr\",\n\t\t\t\t},\n\t\t\t\tuser: {\n\t\t\t\t\tid: new Uint8Array(0),\n\t\t\t\t\tname: \"Sonr\",\n\t\t\t\t\tdisplayName: \"Sonr\",\n\t\t\t\t},\n\t\t\t\tchallenge: new Uint8Array(0),\n\t\t\t\tpubKeyCredParams: [{\n\t\t\t\t\ttype: \"public-key\",\n\t\t\t\t\talg: -7,\n\t\t\t\t}],\n\t\t\t\ttimeout: 60000,\n\t\t\t\texcludeCredentials: [],\n\t\t\t\tauthenticatorSelection: {\n\t\t\t\t\trequireResidentKey: false,\n\t\t\t\t\tuserVerification: \"discouraged\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\t\t.then((assertion) => {\n\t\t\t\tconsole.log(\"Assertion:\", assertion);\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tconsole.error(\"Error:\", error);\n\t\t\t});\n\t\t}\n\t</script>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@ -58,7 +62,7 @@ func NavigatorCredentialsGet() templ.Component {
|
||||
templ_7745c5c3_Var2 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<script>\n\t\tnavigator.credentials.get({\n\t\t\tpublicKey: {\n\t\t\t\tchallenge: new Uint8Array(0),\n\t\t\t\tallowCredentials: [],\n\t\t\t\ttimeout: 60000,\n\t\t\t\tuserVerification: \"discouraged\",\n\t\t\t},\n\t\t})\n\t\t\t.then((assertion) => {\n\t\t\t\tconsole.log(\"Assertion:\", assertion);\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tconsole.error(\"Error:\", error);\n\t\t\t});\n\t</script>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<script>\n\t\tfunction getCredential() {\n\t\tnavigator.credentials.get({\n\t\t\tpublicKey: {\n\t\t\t\tchallenge: new Uint8Array(0),\n\t\t\t\tallowCredentials: [],\n\t\t\t\ttimeout: 60000,\n\t\t\t\tuserVerification: \"discouraged\",\n\t\t\t},\n\t\t})\n\t\t\t.then((assertion) => {\n\t\t\t\tconsole.log(\"Assertion:\", assertion);\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tconsole.error(\"Error:\", error);\n\t\t\t});\n\t}\n\t</script>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
@ -7,17 +7,12 @@
|
||||
"build": "bun run fetch:deps && bun run build:css",
|
||||
"watch": "bunx tailwindcss -i ./global/styles/globals.css -o ./assets/css/styles.css --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/forms": "^0.5.7",
|
||||
"@tailwindcss/typography": "^0.5.15",
|
||||
"alpinejs": "^3.14.1",
|
||||
"htmx.org": "^1.9.12",
|
||||
"tailwindcss": "^3.3.0",
|
||||
"tailwindcss-motion": "^0.3.0-beta",
|
||||
"typescript": "^4.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"node-fetch": "^3.3.2",
|
||||
"sonr-es": "^0.5.3"
|
||||
"@tailwindcss/forms": "^0.5.7",
|
||||
"@tailwindcss/typography": "^0.5.15",
|
||||
"sonr-es": "^0.5.3",
|
||||
"tailwindcss": "^3.3.0",
|
||||
"tailwindcss-motion": "^0.3.0-beta"
|
||||
}
|
||||
}
|
||||
|
BIN
web/bun.lockb
Executable file
BIN
web/bun.lockb
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user