{"id":19885340,"url":"https://github.com/kisaragieffective/serverless-dts-generator","last_synced_at":"2025-09-18T21:31:08.241Z","repository":{"id":98281813,"uuid":"591626417","full_name":"KisaragiEffective/serverless-dts-generator","owner":"KisaragiEffective","description":"create *.d.ts from your serverless.yml","archived":false,"fork":false,"pushed_at":"2024-11-11T23:15:41.000Z","size":95,"stargazers_count":0,"open_issues_count":9,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-12T00:22:47.007Z","etag":null,"topics":["serverless","typescript-definition"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KisaragiEffective.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-Apache-2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-21T10:32:16.000Z","updated_at":"2024-09-21T03:27:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"5840e4d1-c055-4a02-9858-cac9d8e46c10","html_url":"https://github.com/KisaragiEffective/serverless-dts-generator","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KisaragiEffective%2Fserverless-dts-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KisaragiEffective%2Fserverless-dts-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KisaragiEffective%2Fserverless-dts-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KisaragiEffective%2Fserverless-dts-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KisaragiEffective","download_url":"https://codeload.github.com/KisaragiEffective/serverless-dts-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233523901,"owners_count":18689075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["serverless","typescript-definition"],"created_at":"2024-11-12T17:34:00.598Z","updated_at":"2025-09-18T21:31:02.898Z","avatar_url":"https://github.com/KisaragiEffective.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# serverless-dts-generator\n[serverless](https://www.npmjs.com/package/serverless)の[`serverless.yml`](https://www.serverless.com/framework/docs/providers/aws/guide/serverless.yml)から[`*.d.ts`](https://www.typescriptlang.org/docs/handbook/declaration-files/templates/module-d-ts.html)を生成するプログラムです。\n\n## このアプリケーションの使い方\n### ダウンロード\n1. [Releases](https://github.com/KisaragiEffective/serverless-dts-generator/releases)からダウンロードします。\n2. 一番上にあるバージョンを見ます。\n3. `\u003cプラットフォーム\u003e`は以下のとおりです。\n    * Windows: x86_64-pc-windows-gnu\n    * Linux: unknown-linux-musl\n    * macOS: x86_64-apple-darwin\n4. `\u003c拡張子\u003e`は次のとおりです。\n    * Windows: `zip`\n    * Linux: `tar.gz`または`tar.xz`\n    * macOS: `zip`\n5. `serverless-dts-generator_\u003cバージョン\u003e_\u003cプラットフォーム\u003e.\u003c拡張子\u003e`と`serverless-dts-generator_\u003cバージョン\u003e_\u003cプラットフォーム\u003e.\u003c拡張子\u003e.sha256sum`をダウンロードします。\n6. (推奨) [ハッシュ値を検証](#ハッシュ値の検証)します。\n7. `serverless-dts-generator_\u003cバージョン\u003e_\u003cプラットフォーム\u003e.\u003c拡張子\u003e`を展開します。\n8. 使用を開始するためには、[コマンドライン](#コマンドライン)へ移動します。\n\n#### ハッシュ値の検証\nWindows:\n\n1. \u003ckbd\u003eWin\u003c/kbd\u003e + \u003ckbd\u003eR\u003c/kbd\u003eキーを押して、`powershell`と入力し、\u003ckbd\u003eEnter\u003c/kbd\u003eを押します。\n2. 次のコマンドをコピーアンドペーストして\u003ckbd\u003eEnter\u003c/kbd\u003eを押します。\n\n```pwsh\n$archive_file = \"kisaragi-booth-utility_0.1.1_x86_64-pc-windows-gnu.zip\"\n$hash_file = $archive_file + \".sha256sum\"\n$actual_hash = if ($PSVersionTable.PSCompatibleVersions -contains [System.Version]::New(4, 0)) {\n  $hash_obj = Get-FileHash $archive_file -Algorithm SHA256\n  $hash_obj.Hash.ToLower() + \" \" + $(Split-Path $hash_obj.Path -leaf)\n} else {\n  # Get-FileHash is unsupported\n  $hasher = [System.Security.Cryptography.SHA256]::Create()\n  $io = New-Object System.IO.StreamReader $archive_file\n  $hash_arr = $hasher.ComputeHash($io.BaseStream)\n  $stream.Close()\n  $hash = \"\"\n  $hash_arr | %{ $hash += $_.ToString(\"x2\") }\n  $hash\n}\n$expected_hash = (type $hash_file) -join \"\"\nif ($actual_hash -eq $expected_hash) {\n  Write-Host \"Hash OK\"\n} else {\n  Write-Error \"Hash Error: '$actual_hash' != '$expected_hash'\"\n}\n```\n\n3. `Hash OK`と表示された場合、検証が完了しています。\n\nLinux/macOS:\n\n1. お好みのPOSIX互換シェルを開きます。\n2. 次のコードをコピーアンドペーストして実行します。macOSでは`sha256sum`を`gsha256sum`に変える必要があります。\n\n```sh\n#!/bin/sh\nactual_hash=$(sha256sum kisaragi-booth-utility_0.1.1_x86_64-unknown-linux-musl.tar.gz)\nexpected_hash=$(cat kisaragi-booth-utility_0.1.1_x86_64-unknown-linux-musl.tar.gz.sha256sum)\nif [ \"$original_hash\" -eq \"$expected_hash\" ]; then\n    echo \"Hash OK\"\nelse\n    echo \"Hash Error: '$actual_hash' != '$expected_hash'\" \u003e\u00262\nfi\n```\n\n3. `Hash OK`と表示された場合、検証が完了しています。\n\n## コマンドライン\n\n```text\nserverless-dts-generator [serverless.ymlのパス]\n```\n\n* `[serverless.ymlのパス]` - `serverless.yml`のパスを指定します。\n\n## 注意点\n* `*.d.ts`は`serverless.yml`などのスキーマに設定されたパスに応じて生成される場所が変わります。具体的には、`handler`プロパティに設定されたパスと同じディレクトリに、ファイル名と同名の`.d.ts`が生成されます。\n  * 例：`handler`プロパティに`src/hoge/piyo.createPiyo`が設定されている場合、`createPiyo`という名前の`declare const`を生成し、`src/hoge/piyo.d.ts`にそれを書き込みます。\n* 今の所、基本的なHTTPリクエストに対するサポートしかありません。\n  * その他の`event`がある場合は、ごく弱い型しかつきません。\n* 複数の`event`はサポートしていません。\n  * 最初の`event`だけが考慮され、他のイベントは暗黙に無視されます。\n\n## ライセンス\nApache License, Version 2.0とMITライセンスのデュアルライセンスです。どちらかのライセンスを選択することができます。\n\n各ライセンス文はそれぞれLICENSE-Apache-2.0.txtとLICENSE-MIT.txtに同梱してあります。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkisaragieffective%2Fserverless-dts-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkisaragieffective%2Fserverless-dts-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkisaragieffective%2Fserverless-dts-generator/lists"}