Skip to content

matsuri-tech/endpoints-sdk-cli

Repository files navigation

matsuri-tech/endpoints-sdk-cli (mes)

Endpoints SDK for JavaScript

Usage

pnpm add -D endpoints-sdk-cli
npx mes --help

Commands

mes init

initialize endpoints.config.json

npx mes init

mes add [REPOSITORY]

add service to dependencies & make endpoints files.

npx mes add [REPOSITORY]

Examples:

mes add [username/repository_name]
mes add [username/repository_name] -b [branch_name]
mes add [username/repository_name] -w [workspace_name]
mes add [username/repository_name] -e [period_name]

mes install

generate endpoints files based on endpoints.config.json

npx mes install

mes update [SERVICE]

update service version & regenerate endpoints files

npx mes update [SERVICE]

Support of create-react-app

{
  "environment_identifier": "process.env.REACT_APP_ENV"
}

Override root url

{
  "dependencies": {
    "my-service": {
      "version": "ba832b61d0319f42b3cbb30c815cbdecfece959a",
      "repository": "[email protected]:hoge/my-service.git",
      "roots": {
        "dev": "https://dev.hoge.com",
        "prod": "https://hoge.com",
        "local": "http://localhost:3000"
      }
    }
  }
}