From 9f982a5bc9f3e29a2edac3774d2246bc5958f6fe Mon Sep 17 00:00:00 2001 From: sophiebremer <44302338+sophiebremer@users.noreply.github.com> Date: Sun, 17 Mar 2024 15:15:56 +0100 Subject: [PATCH] Initial setup --- .github/ISSUE_TEMPLATE/bug-report.md | 27 +++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++ .github/ISSUE_TEMPLATE/question.md | 15 ++ .github/workflows/node.js.yml | 36 ++++ .gitignore | 108 ++++++++++ .vscode/settings.json | 38 ++++ AUTHORS.md | 2 + CHANGELOG.md | 9 + CONTRIBUTING.md | 77 ++++++++ SECURITY.md | 34 ++++ _config.yml | 43 ++++ _sass/minima/custom-styles.scss | 26 +++ bin/tsl-mastodon-cli.js | 32 +++ package-lock.json | 229 ++++++++++++++++++++++ package.json | 44 +++++ tsconfig.json | 133 +++++++++++++ www/all-libraries.md | 9 + www/downloads.md | 7 + 18 files changed, 889 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/question.md create mode 100644 .github/workflows/node.js.yml create mode 100644 .gitignore create mode 100644 .vscode/settings.json create mode 100644 AUTHORS.md create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md create mode 100644 SECURITY.md create mode 100644 _config.yml create mode 100644 _sass/minima/custom-styles.scss create mode 100755 bin/tsl-mastodon-cli.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 tsconfig.json create mode 100644 www/all-libraries.md create mode 100644 www/downloads.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 0000000..81c3b01 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,27 @@ +--- +name: Bug Report +about: Create a report to help us improve +title: '' +labels: Bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Run '....' +3. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Package (please complete the following information):** + - Source: [e.g. NPM, GitHub] + - Version: [e.g. 1.0.0, main] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..adc97e3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: Feature Request +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 0000000..dc1bce5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,15 @@ +--- +name: Question +about: Ask a question unrelated to a bug or feature +title: '' +labels: Help Wanted, Undecided +assignees: '' + +--- + +**Question** +Ask a clear and concise question. + +**Package (please complete the following information):** + - Source: [e.g. NPM] + - Version [e.g. 1.0.0] diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..b1f91f8 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,36 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: "Node.js" + +on: + pull_request: + branches: [ "main", main* ] + push: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + test: + name: Test + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + steps: + - name: Checkout The Branch + uses: actions/checkout@v3 + - name: Use Node.js v${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - name: Install Dependencies + run: npm ci + - name: Build Package + run: npm run build + - name: Run Tests + run: npm run test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..606edeb --- /dev/null +++ b/.gitignore @@ -0,0 +1,108 @@ +.DS_Store + +/tst-run/ + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and *not* Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..ca9933a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,38 @@ +{ + "editor.detectIndentation": false, + "editor.formatOnSave": true, + "editor.insertSpaces": true, + "editor.rulers": [ + 79, + 80, + 119, + 120 + ], + "files.encoding": "utf8", + "files.eol": "\n", + "files.insertFinalNewline": true, + "files.trimTrailingWhitespace": true, + "javascript.format.insertSpaceAfterCommaDelimiter": true, + "javascript.format.insertSpaceAfterConstructor": true, + "javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true, + "javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": true, + "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, + "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": true, + "javascript.format.insertSpaceAfterSemicolonInForStatements": true, + "javascript.format.insertSpaceBeforeAndAfterBinaryOperators": true, + "javascript.format.insertSpaceBeforeFunctionParenthesis": true, + "javascript.format.placeOpenBraceOnNewLineForControlBlocks": false, + "javascript.format.placeOpenBraceOnNewLineForFunctions": false, + "typescript.format.insertSpaceAfterCommaDelimiter": true, + "typescript.format.insertSpaceAfterConstructor": true, + "typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true, + "typescript.format.insertSpaceAfterKeywordsInControlFlowStatements": true, + "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, + "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": true, + "typescript.format.insertSpaceAfterSemicolonInForStatements": true, + "typescript.format.insertSpaceBeforeAndAfterBinaryOperators": true, + "typescript.format.insertSpaceBeforeFunctionParenthesis": true, + "typescript.format.placeOpenBraceOnNewLineForControlBlocks": false, + "typescript.format.placeOpenBraceOnNewLineForFunctions": false, + "typescript.tsdk": "./node_modules/typescript/lib" +} diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..acbf226 --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,2 @@ +TypeScript Library of the Mastodon CLI is authored by: +* Sophie Bremer diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8e1b4d7 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +Changelog +========= + + + +v0.0.1 +------ + +* Initial release diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..2e7dc58 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,77 @@ +# Instructions for Logging Issues # + + +## 1. Do you have a question? ## + +The issue tracker is for **issues**, in other words, bugs and suggestions. +If you have a *question*, please use + * [Mastodon](https://mastodon.social/tags/MastodonAPI), + * [Stack Overflow](https://stackoverflow.com/questions/tagged/mastodon), + * your favorite search engine, + * or other resources. + + +## 2. Did you find a bug? ## + +When logging a bug, please be sure to include the following: + * What version of TSL-Mastodon-CLI you're using (run `npm list tsl-mastodon-cli`) + * What version of TypeScript you're using (run `tsc --v`) + * If at all possible, an *isolated* way to reproduce the behavior + * The behavior you expect to see, and the actual behavior + + +## 3. Do you have a suggestion? ## + +We also accept suggestions in the issue tracker. + +In general, things we find useful when reviewing suggestions are: +* A description of the problem you're trying to solve +* An overview of the suggested solution +* Examples of how the suggestion would work in various places + * Code examples showing e.g. "this would be an error, this wouldn't" + * Code examples showing the generated JavaScript (if applicable) +* If relevant, precedent in other languages can be useful for establishing context and expected behavior + + + +# Instructions for Contributing Code # + + +## Code of Conduct ## + +This project has adopted a [Code of Conduct](https://typescriptlibs.org/CONDUCT.pdf). +Please contact with any questions or comments. + + +## Contributing bug fixes ## + +TypeScriptLibs is currently accepting contributions in the form of bug fixes. +A bug must have an issue tracking it in the issue tracker that has been approved (set to a Milestone) by the TypeScriptLibs team. +Your pull request should include a link to the bug that you are fixing. +If you've submitted a PR (pull request) for a bug, please post a comment in the bug to avoid duplication of effort. + + +## Contributing features ## + +Features (things that add new or improved functionality) may be accepted, but will need to first be approved (set to a Milestone by a TypeScriptLibs coordinator with the message "Approved") in the suggestion issue. + +Design changes will not be accepted at this time. +If you have a design change proposal, please log a suggestion issue. + + +## Housekeeping ## + +Your pull request should: + +* Include a description of what your change intends to do +* Be a child commit of a reasonably recent commit in the **main** branch + * Requests need not be a single commit, but should be a linear sequence of commits (i.e. no merge commits in your PR) +* It is desirable, but not necessary, for the tests to pass at each commit +* Have clear commit messages + * e.g. "Refactor feature", "Fix issue", "Add tests for issue" +* Include adequate tests + * At least one test should fail in the absence of your non-test code changes. If your PR does not match this criteria, please specify why + * Tests should include reasonable permutations of the target fix/change + * Include baseline changes with your change + * All changed code must have 100% code coverage +* To avoid line ending issues, set `autocrlf = input` and `whitespace = cr-at-eol` in your git configuration diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..51ee85d --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,34 @@ +Security Policy +=============== + + + +Supported Versions +------------------ + +The following versions of tsl-mastodon-cli are currently being supported with security updates. + +| Version | Supported | +| ------- | --------- | +| 0.1.0 | yes | +| < 0.1.0 | no | + + + +Reporting a Vulnerability +------------------------- + +**Please do not report security vulnerabilities through public GitHub issues.** + +Send a detailed description of the security issue to typescriptlibs.org under the `security@` handle. +Please understand that only security issues regarding the library can be addressed. + +If you found a security issue in Mastodon, please contact them instead. +How to report security issues to Mastodon is described at [github.com/mastodon](https://github.com/mastodon/mastodon/security/policy). + +If you found a security issue in TSL-Mastodo-API, please contact them instead. +How to report security issues to TSL-Mastodo-API is described at [github.com/typescriptlibs/tsl-mastodon-api](https://github.com/typescriptlibs/tsl-mastodon-api/security/policy). + +When typescriptlibs.org receives a secruity report, the review process will take about four weeks. +We might ask for more details or assistence in understanding the security impact. +In case of a valid report, a security advisory will be created and security update released. diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..ac0ad2c --- /dev/null +++ b/_config.yml @@ -0,0 +1,43 @@ +# GitHub Pages config + +title: Mastodon CLI TypeScript Library +description: TypeScript Library of the Mastodon CLI +author: © TypeScriptLibs and Contributors + +email: bug@typescriptlibs.org +github_username: typescriptlibs +rss: rss + +github: + private: true + +header_pages: + - www/downloads.md + - SECURITY.md + - LICENSE.md + - www/all-libraries.md + +include: + - LICENSE.md + - README.md + - SECURITY.md + - www/all-libraries.md + - www/downloads.md + +plugins: + - jekyll-feed + - jekyll-seo-tag + - jekyll-titles-from-headings + +show_excerpts: false + +remote_theme: jekyll/minima + +minima: + date_format: "%Y-%m-%d" + skin: auto + +titles_from_headings: + enabled: true + strip_title: true + collections: true diff --git a/_sass/minima/custom-styles.scss b/_sass/minima/custom-styles.scss new file mode 100644 index 0000000..a155ab0 --- /dev/null +++ b/_sass/minima/custom-styles.scss @@ -0,0 +1,26 @@ +a, +a:visited { + color: #609; +} + +.site-header { + border-top-color: #609; +} + +.feed-subscribe { + display: none; +} + + +@media (prefers-color-scheme: dark) { + + a, + a:visited { + color: #C9F; + } + + .site-header { + border-top-color: #C9F; + } + +} diff --git a/bin/tsl-mastodon-cli.js b/bin/tsl-mastodon-cli.js new file mode 100755 index 0000000..eaf83d4 --- /dev/null +++ b/bin/tsl-mastodon-cli.js @@ -0,0 +1,32 @@ +#!/usr/bin/env node +/*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*\ + + TypeScript Library of the Mastodon CLI + + Copyright (c) TypeScriptLibs and Contributors + + Licensed under the MIT License. + You may not use this file except in compliance with the License. + You can get a copy of the License at https://typescriptlibs.org/LICENSE.txt + +\*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*i*/ + + +/* * + * + * Import + * + * */ + + +import CLI from '../lib/CLI.js'; + + +/* * + * + * Runtime + * + * */ + + +CLI.run( process ); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..1cfda3a --- /dev/null +++ b/package-lock.json @@ -0,0 +1,229 @@ +{ + "name": "tsl-mastodon-cli", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "dev": true, + "packages": { + "": { + "name": "tsl-mastodon-cli", + "version": "0.1.0", + "dev": true, + "license": "MIT", + "bin": { + "tsl-mastodon-cli": "bin/tsl-mastodon-cli" + }, + "devDependencies": { + "@typescriptlibs/amd": "^1.3.0", + "@typescriptlibs/tst": "^0.1.0", + "tsl-mastodon-api": "^0.5.0", + "tsl-mastodon-cli": "file:./", + "typescript": "~5.4.2" + }, + "engines": { + "node": ">=18.16.0" + } + }, + "node_modules/@types/node": { + "version": "20.11.28", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.28.tgz", + "integrity": "sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==", + "dev": true, + "peer": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@typescriptlibs/amd": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@typescriptlibs/amd/-/amd-1.3.0.tgz", + "integrity": "sha512-lSY22jwk0PY8+sD6MD8NRmnxMC18PerZxCum4sMlWA1CNbC5zSMUCIjxCf0+KncN+IihGkpMVXkg6aTyW2snUA==", + "dev": true, + "bin": { + "install-amd": "bin/install-amd.mjs" + }, + "engines": { + "node": ">=18.16.0" + } + }, + "node_modules/@typescriptlibs/tst": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@typescriptlibs/tst/-/tst-0.1.0.tgz", + "integrity": "sha512-3rmk4ztNZCseO+1V6wOW7SOWVvvk2HV3M4bcwXZgiOoSvz27r9mXuZ4/a/3PdVauXffBjESMOOBwB3kSYZ/fvw==", + "dev": true, + "bin": { + "tst": "bin/tst.mjs" + }, + "engines": { + "node": ">=10.17.0" + }, + "peerDependencies": { + "@types/node": ">=10.17.0", + "typescript": ">=1.6.0" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "dev": true, + "optional": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "optional": true, + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dev": true, + "optional": true, + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "optional": true, + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "dev": true, + "optional": true, + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/oauth": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.10.0.tgz", + "integrity": "sha512-1orQ9MT1vHFGQxhuy7E/0gECD3fd2fCC+PIX+/jgmU/gI3EpRocXtmtvxCO5x3WZ443FLTLFWNDjl5MPJf9u+Q==", + "dev": true, + "optional": true + }, + "node_modules/tsl-mastodon-api": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/tsl-mastodon-api/-/tsl-mastodon-api-0.5.0.tgz", + "integrity": "sha512-zabkl6OZtFXIDFjzh4hfKqcohANIeLfr4VUoCGgmig0s6xd5Nvg2UU1QQkXLnP4ixXlTEQIJ+M/0IOynGD0azg==", + "dev": true, + "engines": { + "node": ">=18.16.0" + }, + "optionalDependencies": { + "node-fetch": "^3.3.2", + "oauth": "~0.10.0", + "ws": "^8.16.0" + } + }, + "node_modules/tsl-mastodon-cli": { + "resolved": "", + "link": true + }, + "node_modules/typescript": { + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", + "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, + "peer": true + }, + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "dev": true, + "optional": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/ws": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "dev": true, + "optional": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..13e9af0 --- /dev/null +++ b/package.json @@ -0,0 +1,44 @@ +{ + "author": "TypeScriptLibs and Contributers", + "description": "TypeScript Library of the Mastodon CLI", + "license": "MIT", + "name": "tsl-mastodon-cli", + "type": "module", + "version": "0.1.0", + "bin": "bin/tsl-mastodon-cli", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "bugs": "https://github.com/typescriptlibs/tsl-mastodon-cli/issues", + "homepage": "https://typescriptlibs.org/tsl-mastodon-cli/", + "repository": "https://github.com/typescriptlibs/tsl-mastodon-cli.git", + "devDependencies": { + "@typescriptlibs/amd": "^1.3.0", + "@typescriptlibs/tst": "^0.1.0", + "tsl-mastodon-api": "^0.5.0", + "tsl-mastodon-cli": "file:./", + "typescript": "~5.4.2" + }, + "engines": { + "node": ">=18.16.0" + }, + "files": [ + "bin/", + "lib/", + "AUTHORS.md", + "CHANGELOG.md", + "LICENSE.md", + "README.md" + ], + "keywords": [ + "Mastodon", + "TypeScript" + ], + "scripts": { + "build": "npm run clean && npm run build:lib", + "build:lib": "tsc -p src/tsconfig.json", + "clean": "rm -rf lib/ tst-run/", + "test": "npm run clean && npm run build && npm run test:run", + "test:run": "tst --reset --verbose tst/", + "watch": "npm run clean && tsc -p src/tsconfig.json --watch" + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..4db8014 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,133 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* * + * + * Projects + * + * */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* * + * + * Language and Environment + * + * */ + // "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "ESNext", + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* * + * + * Modules + * + * */ + // "module": "commonjs", /* Specify what module code is generated. */ + "module": "NodeNext", + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* * + * + * JavaScript Support + * + * */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* * + * + * Emit + * + * */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + "noEmitOnError": true, + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* * + * + * Interop Constraints + * + * */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + // "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + // "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + "forceConsistentCasingInFileNames": true, + /* * + * + * Type Checking + * + * */ + // "strict": true, /* Enable all strict type-checking options. */ + "strict": true, + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* * + * + * Completeness + * + * */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + // "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + "skipLibCheck": true + } +} diff --git a/www/all-libraries.md b/www/all-libraries.md new file mode 100644 index 0000000..277b11e --- /dev/null +++ b/www/all-libraries.md @@ -0,0 +1,9 @@ +All Libraries +============= + +To see all TypeScript libraries, go to +[typescriptlibs.org](https://typescriptlibs.org/). + + + + diff --git a/www/downloads.md b/www/downloads.md new file mode 100644 index 0000000..def822f --- /dev/null +++ b/www/downloads.md @@ -0,0 +1,7 @@ +Downloads +========= + +To download the package, go to +[typescriptlibs.org/package/tsl-mastodon-cli.html](https://typescriptlibs.org/package/tsl-mastodon-cli.html). + +