Giter VIP home page Giter VIP logo

elsoul / skeet Goto Github PK

View Code? Open in Web Editor NEW
600.0 7.0 22.0 267.15 MB

🚀 Open-Source TypeScript Serverless Framework. It supports all kinds of application development, from small-scale tasks to global full-stack scaling💃

Home Page: https://skeet.dev/

License: Apache License 2.0

TypeScript 95.99% Shell 2.75% JavaScript 0.94% CSS 0.21% Dockerfile 0.10%
firebase google typescript open-source expo firestore google-cloud-platform nextjs react reactnative

skeet's Introduction

Skeet Follow @ELSOUL_LABO2

📗 Doc: https://skeet.dev/

📱 Demo App: https://skeeter.dev/

💃 What's Skeet? 🕺

⚡️ AI Auto-code Development ⚡️

Skeet is an open-source app development solution capable of AI auto-code development.

It allows for rapid development of Web/iOS/Android apps and supports a wide range of developments, including AI-powered chatbot apps, Web3 apps utilizing blockchain, and dApps.

AI is also used in the development flow, overcoming the learning curve that is a challenge in software frameworks.

Developers can quickly start building functional apps and publish them in the cloud.

Overall Architecture Diagram

Skeet Architecture

Skeet is an open-source framework for serverless app development crafted in TypeScript.

It offers the flexibility to select functionalities and the ability to build additional web or mobile interfaces and sophisticated data analytics foundations later on.

It supports Web3 development, eliminates complex infrastructure management, and facilitates auto-scaling and pay-as-you-go pricing.

The Skeet CLI leverages generative AI to reduce overall development costs, is ready for CI/CD automation, and provides enhanced security features.

Currently, it supports development on Google Cloud and Firebase.

Installation

Oneliner installation (Install nodenv, node, npm, @skeet-framework/cli)

$ sh -c "$(curl -sSfL https://storage.googleapis.com/skeet-assets/resources/install-v2.0.5)"

If you already have Node.js installed, you can install Skeet CLI with npm:

$ pnpm add -g firebase-tools
$ pnpm add -g @skeet-framework/cli

Enabling Google Cloud VertexAI/OpenAI

Create a new project in Google Cloud Platform and enable VertexAI. You will need OpenAI API Key to use OpenAI.

Use the following command to enable VertexAI:

$ skeet init
$ skeet ai --help

or you can choose AI engine by passing options

$ skeet ai --openai

You need to set CHAT_GPT_ORG/CHAT_GPT_KEY in your .env

Then you can ask Skeet AI Assistant to create a new function, method, typedoc and more.

SkeetAI

YouTube Video Link: https://www.youtube.com/watch?v=e7J5HDhtpE4

🧪 Dependency 🧪

For Firebase Template

📗 Usage 📗

① Install dependencies

$ curl -fsSL https://get.pnpm.io/install.sh | sh -
$ pnpm add -g @skeet-framework/cli
$ pnpm add -g firebase-tools

② Create Skeet App

$ skeet new
? Enter the name of the app (skeet-app)

③ Initialize Firebase/Google Cloud Project

$ skeet init
Initializing Cloud Configurations...
? What's your GCP Project ID (skeet-framework)

④ Call Your AI Assistant

Now you can call your AI Assistant to create a new function, method, typedoc, and more.

$ skeet ai --help

or You can call check command to check your configurations

$ skeet check

Add Build-in Template

You can add a build-in template to your App.

$ skeet add --help

Solana Mobile Stack

Chatbot

Run Skeet App

$ cd <appName>
$ skeet s

Test Firebase Functions Endpoint

To call Firebase Functions Endpoint, you can use the following command:

e.g. Call root() function

$ skeet c
firebase > root()

Development Environment

Now you have both frontend and backend running locally ⭐️

📲 Frontend(Next.js) - http://localhost:4200/

📲 Frontend(Expo) - http://localhost:19006/

💻 Firebase Emulator - http://localhost:4000/

Skeet Document

Skeet CLI

$ skeet --help
Usage: skeet [options] [command]

CLI for Skeet - Full-stack TypeScript Serverless framework

Options:
  -V, --version                output the version number
  -h, --help                   display help for command

Commands:
  create [options] <appName>   Create Skeet Framework App
  server|s [options]           Run Skeet App
  deploy [options]             Deploy Skeet APP to Firebase
  init [options]               Initialize Google Cloud Setups
  login                        Skeet Login Command - Create Firebase Login Token
  curl [options] <methodName>  Skeet Curl Command - Call Firebase Functions Endpoint
  g|generate                   Skeet Generate Comannd
  log [options]                Deploy Skeet APP to Firebase
  docker                       Docker commands
  db                           Database commands
  iam                          Skeet IAM Comannd to setup Google Cloud Platform
  add                          Skeet Add Comannd to add new functions
  sync                         Skeet Sync Comannd to sync backend and frontend
  delete|d                     Skeet Delete Command
  get                          Get Skeet App List
  ai [options]                 Call Skeet AI Assistant
  config                       Config commands
  run [options]                Run commands
  new|n [options]              Create Skeet Framework App
  console|c                    Call Firebase Console to Test Functions
  check                        Check Cloud Configurations
  help [command]               display help for command

Powered by

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/elsoul/skeet This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The package is available as open source under the terms of the Apache-2.0 License.

Code of Conduct

Everyone interacting in the SKEET project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

skeet's People

Contributors

github-actions[bot] avatar jamesneve avatar kbdharun avatar kishithemechanic avatar poppin-fumi avatar weensy avatar willfelix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

skeet's Issues

Unable to load local environment variables

OPENAI API KEYをローカルの.envファイルに置いたとき、その情報を読み込まない

GraphQL セットアップ文書内の以下のガイダンスに従ってやったが駄目だった

また、簡易的に試すには、functions/openai/.env に記述することもできますが、 この方法は、本番環境には反映されません。

❌functions/openai/.env → ⭕functions/skeet/.secret.local
ではないかと思います。

i  functions: Loaded environment variables from .env.
⬢  functions: Unable to access secret environment variables from Google Cloud Secret Manager. Make sure the credential used for the Functions Emulator have access or provide override values in /workspaces/skeetdev/app-164/functions/skeet/.secret.local:
        FirebaseError: HTTP Error: 404, Secret [projects/188946830090/secrets/CHAT_GPT_ORG] not found or has no versions.
        FirebaseError: HTTP Error: 404, Secret [projects/188946830090/secrets/CHAT_GPT_KEY] not found or has no versions.

error when running `skeet --version` on version 1.5.9 and above

skeet-cli のバージョンを上げたたのですが、実行時にエラーが表示されます。
version 1.5.9 以降で発生しています

$ skeet --version
1.5.8

$ sudo npm i -g @skeet-framework/[email protected]

changed 577 packages in 16s

54 packages are looking for funding
  run `npm fund` for details

$ skeet --version
Error: ENOENT: no such file or directory, scandir './functions/skeet/src/models'
    at readdirSync (node:fs:1527:3)
    at WXo (/usr/local/share/npm-global/lib/node_modules/@skeet-framework/cli/dist/index.js:502:1204)
    at /usr/local/share/npm-global/lib/node_modules/@skeet-framework/cli/dist/index.js:509:33
    at /usr/local/share/npm-global/lib/node_modules/@skeet-framework/cli/dist/index.js:2:263
    at /usr/local/share/npm-global/lib/node_modules/@skeet-framework/cli/dist/index.js:583:359
    at /usr/local/share/npm-global/lib/node_modules/@skeet-framework/cli/dist/index.js:2:263
    at /usr/local/share/npm-global/lib/node_modules/@skeet-framework/cli/dist/index.js:837:1221
    at /usr/local/share/npm-global/lib/node_modules/@skeet-framework/cli/dist/index.js:2:263
    at /usr/local/share/npm-global/lib/node_modules/@skeet-framework/cli/dist/index.js:837:4724
    at /usr/local/share/npm-global/lib/node_modules/@skeet-framework/cli/dist/index.js:2:263 {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: './functions/skeet/src/models'
}
1.5.9

'skeet server' don't work in VSCode devcontainer

VisualStudio CodeのdevContainerを使用して開発を行いたいと思います。
チュートリアルに従って環境の構築をしていったのですが skeet s コマンドを実行すると devContainerとの接続が切れてしまい
実行できなくなってしまいます。特有の環境下におけるエラーだとは思いますが検討いただけると幸いです。

devcontainer内でも直接 yarn skeet を実行した場合は正常にwebアプリと firebaseエミュレーターが立ち上がりました。

ソースコードを見たのですが src/cli/server/server.ts 内でps aux | grep '127.0.0.1' | awk '{print $2} でみつかるプロセスをkillしているようです。これはどのような意図があるのでしょうか?
https://github.com/elsoul/skeet-cli/blob/51e4cfa6fa5d9f536b0419ef67226b025e7a8ac2/src/cli/server/server.ts#L13

これによりdevcontainerのプロセスが落とされているのではないかと思います。

実行環境

OS: Windows11 WSL2(ubuntu22.04 LTS) Docker内のdevcontainer

devcontainer.json

{
	"name": "Skeet Develop Environment",
	// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
	"image": "mcr.microsoft.com/devcontainers/typescript-node:1-18-bullseye",
	"features": {
		"ghcr.io/devcontainers/features/github-cli:1": {},
		"ghcr.io/devcontainers/features/java:1": {},
		"ghcr.io/devcontainers-contrib/features/firebase-cli:2": {},
		"ghcr.io/dhoeric/features/google-cloud-cli:1": {}
	},
	// Use 'postCreateCommand' to run commands after the container is created.
	"postCreateCommand": "sudo npm i -g @skeet-framework/cli"
}

ツール類バージョン

$ node --version
v18.17.0
$ java --version
openjdk 17.0.8 2023-07-18
OpenJDK Runtime Environment Temurin-17.0.8+7 (build 17.0.8+7)
OpenJDK 64-Bit Server VM Temurin-17.0.8+7 (build 17.0.8+7, mixed mode, sharing)
 $ gh --version
gh version 2.32.1 (2023-07-24)
https://github.com/cli/cli/releases/tag/v2.32.1
$ firebase --version
12.4.7
$ gcloud --version
Google Cloud SDK 442.0.0
alpha 2023.08.04
beta 2023.08.04
bq 2.0.96
bundled-python3-unix 3.9.16
core 2023.08.04
gcloud-crc32c 1.0.0
gsutil 5.25

devcontainer環境下でのプロセスと"ps aux | grep '127.0.0.1' | awk '{print $2}'"の結果

node ➜ /workspaces/skeet-dev $ ps aux 
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.0  0.0   2480  1528 ?        Ss   Aug14   0:02 /bin/sh -c echo Container started trap "exit 0" 15  exec "$@" while sleep 1 & wait $!; do :; done -
node          84  0.0  0.0   2480   568 ?        Ss   Aug14   0:00 /bin/sh
node         160  0.0  0.2 620348 36876 ?        Sl   Aug14   0:00 /home/node/.vscode-server/bin/6c3e3dba23e8fadc360aed75ce363ba185c49794/node /tmp/vscode-remote-containers-server-7f217608-1fe6-4625-ac44-400531fa0a06.js
root        3134  0.0  0.0   2480   572 ?        Ss   Aug14   0:00 /bin/sh -c echo "Container already running. Keep-alive process started." ; export VSCODE_REMOTE_CONTAINERS_SESSION=21d67805-cfbb-46ee-a342-36c772d5cd451692015061193 ; /
root        3140  0.0  0.0   2480   508 ?        S    Aug14   0:00 /bin/sh
node        3155  0.0  0.0   2480  1536 ?        Ss   Aug14   0:00 /bin/sh
root        3181  0.0  0.0   2480   508 ?        Ss   Aug14   0:00 /bin/sh
node        3206  0.0  0.0   2480   572 ?        Ss   Aug14   0:00 /bin/sh
node        3285  0.0  0.2 620348 37396 ?        Sl   Aug14   0:00 /home/node/.vscode-server/bin/6c3e3dba23e8fadc360aed75ce363ba185c49794/node /tmp/vscode-remote-containers-server-43dc4fa6-1d7e-4694-835e-222a7d6106fd.js
node        3350  0.0  0.0   2480   508 ?        Ss   Aug14   0:00 sh /home/node/.vscode-server/bin/6c3e3dba23e8fadc360aed75ce363ba185c49794/bin/code-server --log debug --force-disable-user-env --server-data-dir /home/node/.vscode-serv
node        3359  0.0  0.5 941124 84728 ?        Sl   Aug14   0:08 /vscode/vscode-server/bin/linux-x64/6c3e3dba23e8fadc360aed75ce363ba185c49794/node /vscode/vscode-server/bin/linux-x64/6c3e3dba23e8fadc360aed75ce363ba185c49794/out/serve
node        3447  0.0  0.3 838140 52108 ?        Sl   Aug14   0:01 /vscode/vscode-server/bin/linux-x64/6c3e3dba23e8fadc360aed75ce363ba185c49794/node /vscode/vscode-server/bin/linux-x64/6c3e3dba23e8fadc360aed75ce363ba185c49794/out/boots
node        3508  1.4  0.8 994836 142108 ?       Sl   Aug14   3:59 /vscode/vscode-server/bin/linux-x64/6c3e3dba23e8fadc360aed75ce363ba185c49794/node /vscode/vscode-server/bin/linux-x64/6c3e3dba23e8fadc360aed75ce363ba185c49794/out/boots
node        3527  0.0  0.3 643588 57024 ?        Rl   Aug14   0:10 /vscode/vscode-server/bin/linux-x64/6c3e3dba23e8fadc360aed75ce363ba185c49794/node /vscode/vscode-server/bin/linux-x64/6c3e3dba23e8fadc360aed75ce363ba185c49794/out/boots
node        3538  0.1  0.5 638228 94280 ?        Sl   Aug14   0:30 /vscode/vscode-server/bin/linux-x64/6c3e3dba23e8fadc360aed75ce363ba185c49794/node /vscode/vscode-server/bin/linux-x64/6c3e3dba23e8fadc360aed75ce363ba185c49794/extension
node        3544  0.0  0.0  10592  7256 pts/0    Ss   Aug14   0:00 /bin/bash --init-file /vscode/vscode-server/bin/linux-x64/6c3e3dba23e8fadc360aed75ce363ba185c49794/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash
node        3674  0.0  0.0   2480   500 ?        Ss   Aug14   0:00 /bin/sh
node       42533  0.0  0.2 518908 35900 ?        Ssl  02:16   0:00 /home/node/.vscode-server/bin/6c3e3dba23e8fadc360aed75ce363ba185c49794/node -e  ????const net = require('net'); ????const fs = require('fs'); ????process.stdin.pause();
node       42545  0.0  0.2 587628 37092 ?        Ssl  02:16   0:00 /home/node/.vscode-server/bin/6c3e3dba23e8fadc360aed75ce363ba185c49794/node -e  ????const net = require('net'); ????const fs = require('fs'); ????process.stdin.pause();
root       42949  0.0  0.0   2392   496 ?        S    02:19   0:00 sleep 1
node       42951  0.0  0.0   9756  3196 pts/0    R+   02:19   0:00 ps aux
node ➜ /workspaces/skeet-dev $ ps aux | grep '127.0.0.1' | awk '{print $2}'
3350
3359
42533
42545
43006

Ideally, would like to bring the templates configuration files (.eslintrc.js, .eslintrc.json, etc.) from the github templates

Now it recreates the settings file like .eslintrc by CLI but ideally just want to download from the template GitHub repository.

https://github.com/elsoul/skeet-cli/blob/main/src/cli/create/create.ts
https://github.com/elsoul/skeet-cli/blob/main/src/templates/init/eslintrc.json.ts

It became harder to maintain because we needed to use .eslintrc.js for solana-mobile-stack template instead of .eslintrc.json .
(we need condition to maintain /webapp folder with monorepo eslint, typescript setting)

https://github.com/elsoul/skeet-solana-mobile-stack/blob/main/.eslintrc.js

Fail to create new project

I tried to run skeet new and return below error:

skeet new
? Enter the name of the app skeet-app
🚛 Downloading base template...📦 ⠼node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: ENOENT: no such file or directory, open 'skeet-app/package.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'skeet-app/package.json'
}

Node.js v20.11.1

My OS is macOS Sonoma m1

Can't skeet sync routing

✅ Adding backend setup for redeem-staking-bdlcrewards
✅ Creating NEG: redeem-staking-bdlcrewards
✅ Creating backend: redeem-staking-bdlcrewards
✅ Adding backend: redeem-staking-bdlcrewards
✅ Updating backend: redeem-staking-bdlcrewards
✅ Adding backend setup for root
✔️ Already Setup: root
✅ Adding backend setup for stake-bdlc
✅ Creating NEG: stake-bdlc
✅ Creating backend: stake-bdlc
✅ Adding backend: stake-bdlc
✅ Updating backend: stake-bdlc
✅ Adding backend setup for stripe-webhook
✔️ Already Setup: stripe-webhook
✅ Adding backend setup for unstake-bdlc
✅ Creating NEG: unstake-bdlc
✅ Creating backend: unstake-bdlc
✅ Adding backend: unstake-bdlc
✅ Updating backend: unstake-bdlc
✅ Adding backend setup for update-stake-record
✅ Creating NEG: update-stake-record
✅ Creating backend: update-stake-record
✅ Adding backend: update-stake-record
✅ Updating backend: update-stake-record
✅ Adding backend setup for verify-siws
✔️ Already Setup: verify-siws
✅ Adding backend setup for vip-gacha
✔️ Already Setup: vip-gacha
✅ Adding backend setup for x-login
✔️ Already Setup: x-login
✅ Adding backend setup for update-user-status
✔️ Already Setup: update-user-status
✅ Adding backend setup for create-cards
✔️ Already Setup: create-cards
✅ Adding backend setup for get-cards
✔️ Already Setup: get-cards
✅ Creating NEG: staking-db
✅ Creating backend: staking-db
✅ Adding backend: staking-db
✅ Updating backend: staking-db
✅ Creating NEG: card-db
✅ Creating backend: card-db
✅ Adding backend: card-db
✅ Updating backend: card-db
✔ successfully updated routings 🎉

addPathMatcher がちゃんとurlをマップできていないのか、
✅ Adding backend: card-db
✅ Updating backend: card-db
✔ successfully updated routings 🎉
このあたりができているかわからず、ロードバランサーに繋がりません。

✅ Creating NEG: card-db
✅ Creating backend: card-db
これはできてそうです。
Screenshot 2024-03-26 at 1 15 14

ここのUIで作ったはずのbsを選べないので、何かが失敗していそうです

Want `skeet sync model` for webapp also if it exists

➜  epics-platform git:(discord/login) ✗ skeet sync type
⏳ Syncing skeet...
✔ File copied: src/types/http/skeet/checkBdlcRoleTaskParams.ts 🎉
✔ File copied: webapp/src/types/http/skeet/checkBdlcRoleTaskParams.ts 🎉
✔ File copied: src/types/http/skeet/createSignInDataParams.ts 🎉
✔ File copied: webapp/src/types/http/skeet/createSignInDataParams.ts 🎉
✔ File copied: src/types/http/skeet/discordLoginParams.ts 🎉
✔ File copied: webapp/src/types/http/skeet/discordLoginParams.ts 🎉
✔ File copied: src/types/http/skeet/discordRouterParams.ts 🎉
✔ File copied: webapp/src/types/http/skeet/discordRouterParams.ts 🎉
✔ File copied: src/types/http/skeet/myNFTsParams.ts 🎉
✔ File copied: webapp/src/types/http/skeet/myNFTsParams.ts 🎉
✔ File copied: src/types/http/skeet/stripeWebhookParams.ts 🎉
✔ File copied: webapp/src/types/http/skeet/stripeWebhookParams.ts 🎉
✔ File copied: src/types/http/skeet/verifySIWSParams.ts 🎉
✔ File copied: webapp/src/types/http/skeet/verifySIWSParams.ts 🎉
➜  epics-platform git:(discord/login) ✗ skeet sync model
? Select Original Copy of Model skeet
latestModel: skeet
✔ File copied: src/types/models/discordUserModels.ts 🎉
✔ File copied: src/types/models/enterpriseUserModels.ts 🎉
✔ File copied: src/types/models/index.ts 🎉
✔ File copied: src/types/models/paymentChannelModels.ts 🎉
✔ File copied: src/types/models/redeemedUserModels.ts 🎉
✔ File copied: src/types/models/snapshot.ts 🎉
✔ File copied: src/types/models/userModels.ts 🎉
✔ Successfully Synced Models 🎉

Add Devcontainer Configuration

We would like to add Devcontainer settings to help new developers start development smoothly.
This will help maintain consistency in project dependencies and environment settings, streamlining the development process.

Details of Improvement

  • Add the Devcontainer configuration file to the project.
  • Include necessary dependencies and tools in the container image.
  • Add instructions on how to use Devcontainer to the documentation.

Issues of concern

If we provide devcontainer with skeet create command, skeet cli will also be required in the container image created with devcontainer, which feels redundant.

Related Resources

For Devcontainer configuration, we've referred to the following resources:

Cannot Running Tutorial Next/Firestore

以下のエラーが表示され チュートリアルが立ち上がりません

対象バージョン

skeet --version
1.4.6

$ skeet s
yarn run v1.22.19
$ run-p skeet:*
$ yarn dev
$ firebase emulators:start
$ yarn --cwd functions/skeet dev
$ next dev -p 4200
$ nodemon
[nodemon] 2.0.20
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): src/**/*
[nodemon] watching extensions: ts,mjs,js,json
[nodemon] starting `npx ts-node devBuild.ts && node ./dist/index.js`
... 
> [PWA] PWA support is disabled
> [PWA] PWA support is disabled
- event compiled client and server successfully in 248 ms (18 modules)
✘ [ERROR] Could not read from file: xxxxxxxxxxxxxxxxxxxxxx/functions/skeet/node_modules/@skeet-framework/ai/dist/cjs/lib/openai/openAI.js

    node_modules/@skeet-framework/ai/dist/cjs/lib/openai/index.js:17:21:
      17 │ __exportStar(require("./openAI"), exports);
         ╵                      ~~~~~~~~~~

✘ [ERROR] Could not read from file: xxxxxxxxxxxxxxxxxxxxxx/functions/skeet/node_modules/@skeet-framework/ai/dist/cjs/lib/vertexai/vertexAI.js

    node_modules/@skeet-framework/ai/dist/cjs/lib/vertexai/index.js:17:21:
      17 │ __exportStar(require("./vertexAI"), exports);
         ╵                      ~~~~~~~~~~~~

ファイル名の指定の誤りではないでしょうか?

  • openAI.js → openAi.js
  • vertexAI.js → vertexAi.js
 $ ls xxxxxxxxxxxxxxxxxxxxxx/functions/skeet/node_modules/@skeet-framework/ai/dist/cjs/lib/openai/open*
/xxxxxxxxxxxxxxxxxxxxxx/functions/skeet/node_modules/@skeet-framework/ai/dist/cjs/lib/openai/openAi.d.ts
/xxxxxxxxxxxxxxxxxxxxxx/functions/skeet/node_modules/@skeet-framework/ai/dist/cjs/lib/openai/openAi.js
/xxxxxxxxxxxxxxxxxxxxxx/functions/skeet/node_modules/@skeet-framework/ai/dist/cjs/lib/openai/openAi.js.map
/xxxxxxxxxxxxxxxxxxxxxx/functions/skeet/node_modules/@skeet-framework/ai/dist/cjs/lib/openai/openAiStream.d.ts
/xxxxxxxxxxxxxxxxxxxxxx/functions/skeet/node_modules/@skeet-framework/ai/dist/cjs/lib/openai/openAiStream.js
/xxxxxxxxxxxxxxxxxxxxxx/functions/skeet/node_modules/@skeet-framework/ai/dist/cjs/lib/openai/openAiStream.js.map

$ ls /xxxxxxxxxxxxxxxxxxxxxx/functions/skeet/node_modules/@skeet-framework/ai/dist/cjs/lib/vertexai/vertex*
/xxxxxxxxxxxxxxxxxxxxxx/functions/skeet/node_modules/@skeet-framework/ai/dist/cjs/lib/vertexai/vertexAi.d.ts
/xxxxxxxxxxxxxxxxxxxxxx/functions/skeet/node_modules/@skeet-framework/ai/dist/cjs/lib/vertexai/vertexAi.js
/xxxxxxxxxxxxxxxxxxxxxx/functions/skeet/node_modules/@skeet-framework/ai/dist/cjs/lib/vertexai/vertexAi.js.map
/xxxxxxxxxxxxxxxxxxxxxx/functions/skeet/node_modules/@skeet-framework/ai/dist/cjs/lib/vertexai/vertexAiStream.d.ts
/xxxxxxxxxxxxxxxxxxxxxx/functions/skeet/node_modules/@skeet-framework/ai/dist/cjs/lib/vertexai/vertexAiStream.js
/xxxxxxxxxxxxxxxxxxxxxx/functions/skeet/node_modules/@skeet-framework/ai/dist/cjs/lib/vertexai/vertexAiStream.js.ma

Error in skeet init --login

Error message

`Command killed by keyboard interrupt

Service account does not exist, creating new one...
ERROR: (gcloud.iam.service-accounts.create) INVALID_ARGUMENT: The account ID "solv" does not have a length between 6 and 30.
✔ Service account created successfully 🎉`

Comment

  • This will probably use the APPNAME from the skeet create. In this case, I think we should add the number of characters as a validation for skeet create.

functions内とgraphql内について、eslintrc.json等を生まないようにしたい

eslintの設定は複数あると競合するため、rootに書く必要があり、下記リンクの用に、overridesして他のディレクトリに反映させるようにしました。

.eslintrc.json
.eslintignore
.prettierrc
.prettierignore

の4ファイルについて、rootだけに生成してfunctionsやgraphqlでは生成されないようにしたいです

Want to use `skeet login` several times

Now it doesn't work if user exists.

Error: login: FirebaseError: Firebase: Error (auth/email-already-in-use).
    at Y3 (/Users/ktm/.anyenv/envs/nodenv/versions/18.16.0/lib/node_modules/@skeet-framework/cli/dist/index.js:397:124)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Ss.<anonymous> (/Users/ktm/.anyenv/envs/nodenv/versions/18.16.0/lib/node_modules/@skeet-framework/cli/dist/index.js:408:3297)
    at async Ss.parseAsync (/Users/ktm/.anyenv/envs/nodenv/versions/18.16.0/lib/node_modules/@skeet-framework/cli/dist/index.js:15:4063)
    at async r3e (/Users/ktm/.anyenv/envs/nodenv/versions/18.16.0/lib/node_modules/@skeet-framework/cli/dist/index.js:408:4096)

The guidance of environment setting OPEN API KEY is incorrect

Firestore バックエンドのクイックスタートの中で以下の記載がありますが

シークレットキーの設定
skeet add secret コマンドを使って

OpenAI の API キーを環境変数に設定します。

$ skeet add secret CHAT_GPT_ORG
? Enter value for CHAT_GPT_ORG: <yourOpenAIKey>

Enter value for CHAT_GPT_ORG: <yourOpenAIKey>
の部分の案内が誤っていると思います。

正しくは以下の値 Organization ID ではないでしょうか?
image

http function call is wrong when the project id of Google cloud and firebase project are different

GoogleCloudのプロジェクトIDとFirebaseのプロジェクトIDが異なる場合 skeetOptions.json は以下のように

  • "projectId": "myproject-001"
  • "fbProjectId": "myproject"
    のようになりますが(firebaseのプロジェクトはfbProjectIdかと思います)
{
  "name": "compospet-app",
  "projectId": "myproject-001",
  "region": "asia-northeast1",
  "appDomain": "",
  "fbProjectId": "myproject"
}

この状態でチャットルーム作成APIを呼ぶと以下のようにプロジェクトIDはGoogleCloudのIDが使用されるためFirebaseの関数が呼ばれなくなると思います。

Access to fetch at 'http://127.0.0.1:5001/myproject-001/asia-northeast1/addStreamUserChatRoomMessage'
from origin 'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

@skeet-framework/cloud-task v0.3.0 causes some errors

Screenshot 2024-03-06 at 23 38 28

Maybe type export problem?

When we import v0.3.0 and run functions, get like:

node:internal/url:1391
    throw new ERR_INVALID_ARG_TYPE('path', ['string', 'URL'], path);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of URL. Received undefined
    at fileURLToPath (node:internal/url:1391:11)
    at Object.<anonymous> (/Users/ktm/dev/epics-platform/functions/batch/dist/index.js:336:26913)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'ERR_INVALID_ARG_TYPE'
}

skeet sync routing broken

Add await to createNeg but didn't solve it.

➜  epics-platform git:(bdlc/staking) skeet sync routing
 ⌛ syncRoutings... ⠇Error executing command: Error: Command failed with code 1: ERROR: (gcloud.compute.network-endpoint-groups.describe) Could not fetch resource:
 - The resource 'projects/epics-platform/regions/asia-northeast1/networkEndpointGroups/skeet-redeem-staking-bdlcrewards-neg' was not found


    at ChildProcess.<anonymous> (file:///Users/ktm/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@skeet-framework/cli/dist/index.js:873:4237)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
 ⌛ syncRoutings... ⠼Error executing command: Error: Command failed with code 1: ERROR: (gcloud.compute.network-endpoint-groups.describe) Could not fetch resource:
 - The resource 'projects/epics-platform/regions/asia-northeast1/networkEndpointGroups/skeet-unstake-bdlc-neg' was not found


    at ChildProcess.<anonymous> (file:///Users/ktm/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@skeet-framework/cli/dist/index.js:873:4237)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
 ⌛ syncRoutings... ⠙Error executing command: Error: Command failed with code 1: ERROR: (gcloud.compute.network-endpoint-groups.describe) Could not fetch resource:
 - The resource 'projects/epics-platform/regions/asia-northeast1/networkEndpointGroups/skeet-update-stake-record-neg' was not found


    at ChildProcess.<anonymous> (file:///Users/ktm/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@skeet-framework/cli/dist/index.js:873:4237)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
 ⌛ syncRoutings... ⠏Error executing command: Error: Command failed with code 1: ERROR: (gcloud.compute.network-endpoint-groups.describe) Could not fetch resource:
 - The resource 'projects/epics-platform/regions/asia-northeast1/networkEndpointGroups/skeet-staking-db-neg' was not found


    at ChildProcess.<anonymous> (file:///Users/ktm/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@skeet-framework/cli/dist/index.js:873:4237)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
 ⌛ syncRoutings... ⠸Error executing command: Error: Command failed with code 1: ERROR: (gcloud.compute.network-endpoint-groups.describe) Could not fetch resource:
 - The resource 'projects/epics-platform/regions/asia-northeast1/networkEndpointGroups/skeet-card-db-neg' was not found


    at ChildProcess.<anonymous> (file:///Users/ktm/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@skeet-framework/cli/dist/index.js:873:4237)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
 ⌛ syncRoutings... ⠴Error executing command: Error: Command failed with code 1: ERROR: (gcloud.compute.url-maps.add-path-matcher) No host rule with host [undefined] exists. Check your spelling or use [--new-hosts] to create a new host rule.

    at ChildProcess.<anonymous> (file:///Users/ktm/Library/pnpm/global/5/.pnpm/@[email protected]/node_modules/@skeet-framework/cli/dist/index.js:873:4237)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)

neg has not be created.

If neg exists, bs has not be created.

Async / Await problem? I didn't know

invalid import path in the file generated by the SKEET ADD http method

skeet add method で生成されるファイルの中に存在しないパスのimportが作られてしまいます。

skeet-cli バージョン 1.4.7

実行コマンド

$ skeet add method createSensor
Debugger attached.
? Select Instance Type to add http
? Select Functions to add skeet
✔ ./functions/skeet/src/types/http/createSensorParams.ts created 🎉
✔ ./functions/skeet/src/routings/http/createSensor.ts created 🎉
✔ Successfully exported to ./functions/skeet/src/index.ts 🎉
import { onRequest } from 'firebase-functions/v2/https'
import { publicHttpOption } from '@/routings/options'
import { TypedRequestBody } from '@/index'

import { CreateSensorParams } from '@/types/http/createSensorParams'

export const createSensor = onRequest(publicHttpOption, async (req: TypedRequestBody<CreateSensorParams>, res) => {
  try {
    res.json({
      status: 'success'
    })
  } catch (error) {
    res.status(500).json({ status: 'error', message: String(error) })
  }
})

以下の誤りではないかと思います

import { TypedRequestBody } from '@/types/http'

https://github.com/elsoul/skeet-cli/blob/main/src/templates/instanceTypes/genHttpMethod.ts#L12

Add command to switch between development and production environment.

For use cases where different Google cloud and firebase projects are created and deployed in production and staging environments, skeet can use the skeet init --login command to switch between them, but it is not possible to easily switch between them because each execution of this command will cause authentication to firebase. However, each time this command is executed, the user must authenticate to firebase, which makes it difficult to switch easily.

It would be useful to have a command to switch between these two definitions together in the skeet CLI.

Related Resources

can't skeet yarn add packages on webapp

➜  epics-platform git:(discord/login) ✗ skeet yarn add @react-spring/web
? Select Services to run yarn command webapp
yarn add v1.22.19
error Missing list of packages to add to your project.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

skeet yarn i on webapp still works well.

[Question]Why xxxParams not added to index.ts with the skeet add method http?

when create new firebase function, method hello exported to index.ts
but helloParams did not export to index.ts

skeet-cli version 1.11.9
Template of Skeet Next.js (React) - Firestore

 skeet add method hello
? Select Instance Type to add http
✔ ./functions/skeet/src/types/http/helloParams.ts created 🎉
✔ ./functions/skeet/src/routings/http/hello.ts created 🎉
✔ Successfully exported to ./functions/skeet/src/index.ts 🎉

functions/skeet/src/types/http/index.ts

Existing parameters are described, but new parameters are not added

export * from './addVertexMessageParams'
export * from './addStreamUserChatRoomMessageParams'
export * from './addUserChatRoomMessageParams'
export * from './createUserChatRoomParams'
export * from './addVertexMessageParams'
import { Request } from 'firebase-functions/v2/https'

export interface TypedRequestBody<T> extends Request {
  body: T
}

functions/skeet/src/routings/http/hello.ts

It seems that index.ts is not used anywhere because the name of the parameter is directly specified in the place where it is imported.

import { onRequest } from 'firebase-functions/v2/https'
import { publicHttpOption } from '@/routings/options'
import { TypedRequestBody } from '@/types/http'
import { HelloParams } from '@/types/http/helloParams'

export const hello = onRequest(publicHttpOption, async (req: TypedRequestBody<HelloParams>, res) => {
  try {
    res.json({
      status: 'success'
    })
  } catch (error) {
    res.status(500).json({ status: 'error', message: String(error) })
  }
})

feat: support Windows or other OS

When I use the command skeet s on Windows 11, I encountered the following error:
Error in server function: Error: Command failed: lsof -i :9099 | awk 'NR>1 {print $2}
Upon inspecting the source code, I found that the server directly uses the commands lsof and mkdir for implementation, which are missing in Windows's PowerShell.
I hope to use official Node.js modules as much as possible to achieve the functionality, rather than relying entirely on Bash shell implementation.

"skeet s"を実行するとエラーが発生する

初めまして!👋

クイックスタートを行なっていたところ、エラーが発生しました。
skeet sを実行すると、以下のエラーが発生します。

16640
16638
yarn run v1.22.19
$ run-p skeet:*
$ yarn --cwd functions/openai dev
$ yarn webapp
$ firebase emulators:start
$ yarn build:development:webapp
$ nodemon
$ EXPO_USE_PATH_ALIASES=1 expo start --web
$ expo export:web --dev
[nodemon] 2.0.22
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): src/**/*
[nodemon] watching extensions: ts,mjs,js,json
[nodemon] starting `npx ts-node devBuild.ts && node ./dist/index.js`
Starting project at /Users/yuta/skeet-sample
Exporting with Webpack...
i  emulators: Shutting down emulators.

Error: Process `java -version` has exited with code 1. Please make sure Java is installed and on your system PATH.
-----Original stdout-----
-----Original stderr-----
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.


Starting Metro Bundler
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "skeet:dev" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

依存パッケージのバージョンは以下です。

  • TypeScript 5.1.3
  • Node.js v18.16.0
  • Yarn v1.22.19
  • Google Cloud SDK 435.0.1
  • Firebase CLI 12.4.0
  • Github CLI 2.31.0

エラー内容を見るとjavaのパスを通さないといけないようですが、クイックスタートにはjavaの記述がありません。
javaの環境構築が必要でしょうか?

skeet sync on webapp

webapp フォルダがある場合、そこにもsync types とsync modelsできると嬉しいです。
webapp/src/types が理想です

Can't run skeet test

skeet test を実行しても何の結果も現れないという現象があります。
(自環境のせいなのかどうかはまだ特定できていません)
また同じ環境下で yarn test を実行した場合はテスト自体の実行はされますが、エラーになってしまいます。

skeet server 起動済
skeet loginで表示されている環境変数ACCESS_TOKENはコマンドライン上でexport 済

$export ACCESS_TOKEN=eyJhbGciOiJub.........
$ yarn test
yarn run v1.22.19
$ jest --coverage=false --detectOpenHandles --maxWorkers=1
 FAIL  tests/http/createUserChatRoom.test.ts
  ● POST without Bearer Token /createUserChatRoom › Responds with Auth Error

    SyntaxError: Unexpected token N in JSON at position 0
        at JSON.parse (<anonymous>)



  ● POST with Bearer Token /createUserChatRoom › Responds with Success

    SyntaxError: Unexpected token N in JSON at position 0
        at JSON.parse (<anonymous>)



 FAIL  tests/http/getUserChatRoomMessages.test.ts
  ● getUserChatRoomMessages › createUserChatRoom

    SyntaxError: Unexpected token N in JSON at position 0
        at JSON.parse (<anonymous>)



  ● getUserChatRoomMessages › addUserChatRoomMessage

    SyntaxError: Unexpected token N in JSON at position 0
        at JSON.parse (<anonymous>)



 FAIL  tests/http/addStreamUserChatRoomMessage.test.ts
  ● addStreamUserChatRoomMessage › createUserChatRoom

    SyntaxError: Unexpected token N in JSON at position 0
        at JSON.parse (<anonymous>)



  ● addStreamUserChatRoomMessage › addStreamUserChatRoomMessage

    SyntaxError: Unexpected token N in JSON at position 0
        at JSON.parse (<anonymous>)



 FAIL  tests/http/addUserChatRoomMessage.test.ts
  ● POST with Bearer Token /addUserChatRoomMessage › createUserChatRoom

    SyntaxError: Unexpected token N in JSON at position 0
        at JSON.parse (<anonymous>)



  ● POST with Bearer Token /addUserChatRoomMessage › addUserChatRoomMessage

    SyntaxError: Unexpected token N in JSON at position 0
        at JSON.parse (<anonymous>)



 PASS  tests/check.test.ts
  ● Console

    console.log
      OK

      at Object.<anonymous> (tests/check.test.ts:2:11)


Test Suites: 4 failed, 1 passed, 5 total
Tests:       8 failed, 1 passed, 9 total
Snapshots:   0 total
Time:        3.218 s, estimated 4 s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Is there a lack of quickstart explanation in 'Skeet init to setup project' section?

In the quickstart description, 'skeet init --login' execution failed.
Isn't 'gcloud auth login' required before 'skeet init --login'?

$ skeet init --login
? What's your GCP Project ID xxxxxxxxxxxxxxxxxxxxxxxx
? What's your Firebase Project ID xxxxxxxxxxxxxxxxxxxxxxxx
? Select Regions to deploy xxxxxxxxxxxxxxxxxxxxxxxx
Error: Command failed: gcloud projects list --filter xxxxxxxxxxxxxxxxxxxxxxxx
ERROR: (gcloud.projects.list) You do not currently have an active account selected.
Please run:

  $ gcloud auth login

to obtain new credentials.

If you have already logged in with a different account, run:

  $ gcloud config set account ACCOUNT

to select an already authenticated account to use.

    at ChildProcess.exithandler (node:child_process:421:12)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: 'gcloud projects list --filter xxxxxxxxxxxxxxxxxxxxxxxx',
  stdout: '',
  stderr: 'ERROR: (gcloud.projects.list) You do not currently have an active account selected.\n' +
    'Please run:\n' +
    '\n' +
    '  $ gcloud auth login\n' +
    '\n' +
    'to obtain new credentials.\n' +
    '\n' +
    'If you have already logged in with a different account, run:\n' +
    '\n' +
    '  $ gcloud config set account ACCOUNT\n' +
    '\n' +
    'to select an already authenticated account to use.\n'

need more roles for service account key to deploy firestore trigger functions

i  functions: You can either re-run `firebase deploy` as a project owner or manually run the following set of `gcloud` commands:
i  functions: `gcloud projects add-iam-policy-binding epics-platform --member=serviceAccount:[email protected] --role=roles/iam.serviceAccountTokenCreator`
i  functions: `gcloud projects add-iam-policy-binding epics-platform --member=serviceAccount:[email protected] --role=roles/run.invoker`
i  functions: `gcloud projects add-iam-policy-binding epics-platform --member=serviceAccount:[email protected] --role=roles/eventarc.eventReceiver`

Error: We failed to modify the IAM policy for the project. The functions deployment requires specific roles to be granted to service agents, otherwise the deployment will fail.
Error: Process completed with exit code 1.

I think need more
roles/iam.serviceAccountTokenCreator

roles/run.invoker

roles/eventarc.eventReceiver

skeet yarn i fail with solana-mobile-stack template

➜  skeet-solana-mobile-stack git:(main) ✗ skeet yarn i
Error getting function directories: Error: ENOENT: no such file or directory, stat 'functions/skeet/node_modules/@skeet-framework/firestore/node_modules/@firebase/firestore/node_modules/.bin/proto-loader-gen-types'
    at statSync (node:fs:1676:25)
    at /Users/ktm/.anyenv/envs/nodenv/versions/20.10.0/lib/node_modules/@skeet-framework/cli/dist/index.js:1243:912
    at Array.forEach (<anonymous>)
    at getDirectoryLastModified (/Users/ktm/.anyenv/envs/nodenv/versions/20.10.0/lib/node_modules/@skeet-framework/cli/dist/index.js:1243:864)
    at /Users/ktm/.anyenv/envs/nodenv/versions/20.10.0/lib/node_modules/@skeet-framework/cli/dist/index.js:1243:942
    at Array.forEach (<anonymous>)
    at getDirectoryLastModified (/Users/ktm/.anyenv/envs/nodenv/versions/20.10.0/lib/node_modules/@skeet-framework/cli/dist/index.js:1243:864)
    at /Users/ktm/.anyenv/envs/nodenv/versions/20.10.0/lib/node_modules/@skeet-framework/cli/dist/index.js:1243:942
    at Array.forEach (<anonymous>)
    at getDirectoryLastModified (/Users/ktm/.anyenv/envs/nodenv/versions/20.10.0/lib/node_modules/@skeet-framework/cli/dist/index.js:1243:864) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'stat',
  path: 'functions/skeet/node_modules/@skeet-framework/firestore/node_modules/@firebase/firestore/node_modules/.bin/proto-loader-gen-types'
}
? Select Services to run yarn command (Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed)
  = Services = 
❯◯ webapp
 ◯ root

Couldn't use `addStreamUserChatRoomMessage` function on Tutorial

skeet-test-app git:(main) ✗ skeet curl addStreamUserChatRoomMessage --data '{ "userChatRoomId": "f2biuil3L6k0EdHzxMTl", "content": "Do some freestyle rap" }'

{
  production: false,
  functions: false,
  data: '{ "userChatRoomId": "f2biuil3L6k0EdHzxMTl", "content": "Do some freestyle rap" }'
}
curl --location --request POST http://127.0.0.1:5001/skeet-test-app/europe-west6/addStreamUserChatRoomMessage --data '{ "userChatRoomId": "f2biuil3L6k0EdHzxMTl", "content": "Do some freestyle rap" }' --header 'Content-Type: application/json' --header "Authorization: Bearer eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJlbWFpbCI6ImVwaWNzZGFvQGVwaWNzLmRldiIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwiYXV0aF90aW1lIjoxNjg0OTcwMjMzLCJ1c2VyX2lkIjoidmVtZWtiNHJVcDE3MDdRc1NoNzBPWmpHbUliRiIsImZpcmViYXNlIjp7ImlkZW50aXRpZXMiOnsiZW1haWwiOlsiZXBpY3NkYW9AZXBpY3MuZGV2Il19LCJzaWduX2luX3Byb3ZpZGVyIjoicGFzc3dvcmQifSwiaWF0IjoxNjg0OTcwMjMzLCJleHAiOjE2ODQ5NzM4MzMsImF1ZCI6InNrZWV0LXRlc3QtYXBwIiwiaXNzIjoiaHR0cHM6Ly9zZWN1cmV0b2tlbi5nb29nbGUuY29tL3NrZWV0LXRlc3QtYXBwIiwic3ViIjoidmVtZWtiNHJVcDE3MDdRc1NoNzBPWmpHbUliRiJ9." | json_pp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   326  100   246  100    80  74613  24264 --:--:-- --:--:-- --:--:--  318k
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Function europe-west...") at /usr/bin/json_pp5.30 line 52.
Error: curl: Error: Command failed: curl --location --request POST http://127.0.0.1:5001/skeet-test-app/europe-west6/addStreamUserChatRoomMessage --data '{ "userChatRoomId": "f2biuil3L6k0EdHzxMTl", "content": "Do some freestyle rap" }' --header 'Content-Type: application/json' --header "Authorization: Bearer eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJlbWFpbCI6ImVwaWNzZGFvQGVwaWNzLmRldiIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwiYXV0aF90aW1lIjoxNjg0OTcwMjMzLCJ1c2VyX2lkIjoidmVtZWtiNHJVcDE3MDdRc1NoNzBPWmpHbUliRiIsImZpcmViYXNlIjp7ImlkZW50aXRpZXMiOnsiZW1haWwiOlsiZXBpY3NkYW9AZXBpY3MuZGV2Il19LCJzaWduX2luX3Byb3ZpZGVyIjoicGFzc3dvcmQifSwiaWF0IjoxNjg0OTcwMjMzLCJleHAiOjE2ODQ5NzM4MzMsImF1ZCI6InNrZWV0LXRlc3QtYXBwIiwiaXNzIjoiaHR0cHM6Ly9zZWN1cmV0b2tlbi5nb29nbGUuY29tL3NrZWV0LXRlc3QtYXBwIiwic3ViIjoidmVtZWtiNHJVcDE3MDdRc1NoNzBPWmpHbUliRiJ9." | json_pp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   326  100   246  100    80  74613  24264 --:--:-- --:--:-- --:--:--  318k
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Function europe-west...") at /usr/bin/json_pp5.30 line 52.

    at J3 (/Users/ktm/.anyenv/envs/nodenv/versions/18.16.0/lib/node_modules/@skeet-framework/cli/dist/index.js:397:746)
    at Ss.<anonymous> (/Users/ktm/.anyenv/envs/nodenv/versions/18.16.0/lib/node_modules/@skeet-framework/cli/dist/index.js:408:4052)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Ss.parseAsync (/Users/ktm/.anyenv/envs/nodenv/versions/18.16.0/lib/node_modules/@skeet-framework/cli/dist/index.js:15:4063)
    at async r3e (/Users/ktm/.anyenv/envs/nodenv/versions/18.16.0/lib/node_modules/@skeet-framework/cli/dist/index.js:408:4096)

can't create UserChatRoom on Firestore

OpenAI チャットルームで、チャットを行うとエラーになります

発生バージョン 1.6.4 Next-Firesore版 Firebase emulatorで実行
正確には追っていませんが2,3日前のバージョンでも発生しています。

状況

サインアップ時にFirestoreにUserは作成できている。
チャットルーム作成をしても FirestoreにChatRoomのデータができていない。
チャットルーム作成の時にチャットルーム作成したというメッセージは出ています

image

error-chatroom.mp4

The 'Deploy to Firebase' command example in the tutorial does not match the CLI

チュートリアル内の Firebase へデプロイする の中で ドメインを設定しないでデプロイする例が載っていますが

? Do you want to setup your domain? no

がCLI上に出てこず

? What's your domain address for App 

となっています。またここでは no を指定できず

? What's your domain address for App no
>> This is not Domain Name!It must be example.com

となるためドメインを指定しないで完了させることができないです。

Expected behavior

開発フェーズでのfirebase利用時にはドメイン、LBを指定しないで skeet initを実行したい

Skeet Install Script should install Java v.11 (now installing v21) because of Solana Mobile Stack Build

This is confirmed version though, I think the latest v11.x.x works fine also.

$ curl -s "https://get.sdkman.io" | bash
$ sdk install java 11.0.20-zulu
$ sdk use java 11.0.20-zulu

$ java --version
openjdk 11.0.20 2023-07-18 LTS
OpenJDK Runtime Environment Zulu11.66+15-CA (build 11.0.20+8-LTS)
OpenJDK 64-Bit Server VM Zulu11.66+15-CA (build 11.0.20+8-LTS, mixed mode)

After doing this, I think it's the time to upgrade to ver.2

skeet yarn i sometimes fail on template

➜  skeet-solana-mobile-stack git:(main) skeet yarn i
Error getting function directories: Error: ENOENT: no such file or directory, stat 'functions/skeet/node_modules/@skeet-framework/firestore/node_modules/@firebase/firestore/node_modules/.bin/proto-loader-gen-types'
    at statSync (node:fs:1676:25)
    at /Users/ktm/.anyenv/envs/nodenv/versions/20.10.0/lib/node_modules/@skeet-framework/cli/dist/index.js:1277:904
    at Array.forEach (<anonymous>)
    at getDirectoryLastModified (/Users/ktm/.anyenv/envs/nodenv/versions/20.10.0/lib/node_modules/@skeet-framework/cli/dist/index.js:1277:856)
    at /Users/ktm/.anyenv/envs/nodenv/versions/20.10.0/lib/node_modules/@skeet-framework/cli/dist/index.js:1277:934
    at Array.forEach (<anonymous>)
    at getDirectoryLastModified (/Users/ktm/.anyenv/envs/nodenv/versions/20.10.0/lib/node_modules/@skeet-framework/cli/dist/index.js:1277:856)
    at /Users/ktm/.anyenv/envs/nodenv/versions/20.10.0/lib/node_modules/@skeet-framework/cli/dist/index.js:1277:934
    at Array.forEach (<anonymous>)
    at getDirectoryLastModified (/Users/ktm/.anyenv/envs/nodenv/versions/20.10.0/lib/node_modules/@skeet-framework/cli/dist/index.js:1277:856) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'stat',
  path: 'functions/skeet/node_modules/@skeet-framework/firestore/node_modules/@firebase/firestore/node_modules/.bin/proto-loader-gen-types'
}
? Select Services to run yarn command (Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed)
  = Services = 
❯◯ webapp
 ◯ root

Only happens on
skeet-solana-mobile-stack
skeet-next

but
skeet-graphql
skeet-app
are safe.

Add support to Bun Package Manager

main title talks for itself.

making a simple case-study, could seen that bun package manager has growing up in a large scale.

it's nice to add support for them.

fresh tech to fresh stack.

this opinion it's not only of my own.

att.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.