@pikokr/command.ts 4.0.2-dev.6d75eff → 4.0.2-dev.a3285fd

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,70 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ dev ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ dev ]
20
+ schedule:
21
+ - cron: '31 4 * * 2'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'javascript' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
+ # Learn more about CodeQL language support at https://git.io/codeql-language-support
38
+
39
+ steps:
40
+ - name: Checkout repository
41
+ uses: actions/checkout@v2
42
+
43
+ # Initializes the CodeQL tools for scanning.
44
+ - name: Initialize CodeQL
45
+ uses: github/codeql-action/init@v1
46
+ with:
47
+ languages: ${{ matrix.language }}
48
+ # If you wish to specify custom queries, you can do so here or in a config file.
49
+ # By default, queries listed here will override any specified in a config file.
50
+ # Prefix the list here with "+" to use these queries and those in the config file.
51
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
52
+
53
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54
+ # If this step fails, then you should remove it and run the build manually (see below)
55
+ - name: Autobuild
56
+ uses: github/codeql-action/autobuild@v1
57
+
58
+ # ℹ️ Command-line programs to run using the OS shell.
59
+ # 📚 https://git.io/JvXDl
60
+
61
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62
+ # and modify them (or add more) to build your code if your project
63
+ # uses a compiled language
64
+
65
+ #- run: |
66
+ # make bootstrap
67
+ # make release
68
+
69
+ - name: Perform CodeQL Analysis
70
+ uses: github/codeql-action/analyze@v1
@@ -0,0 +1,79 @@
1
+ name: Documentation
2
+ on:
3
+ push:
4
+ branches:
5
+ - 'dev'
6
+ - 'master'
7
+ - '!docs'
8
+ tags:
9
+ - '*'
10
+ jobs:
11
+ build:
12
+ name: Build documentation
13
+ runs-on: ubuntu-latest
14
+ outputs:
15
+ BRANCH_NAME: ${{ steps.env.outputs.BRANCH_NAME }}
16
+ BRANCH_OR_TAG: ${{ steps.env.outputs.BRANCH_OR_TAG }}
17
+ SHA: ${{ steps.env.outputs.SHA }}
18
+ if: github.repository_owner == 'pikokr'
19
+ steps:
20
+ - name: Checkout repository
21
+ uses: actions/checkout@v2
22
+
23
+ - name: Install node.js v16
24
+ uses: actions/setup-node@v2
25
+ with:
26
+ node-version: 16
27
+ cache: 'yarn'
28
+ cache-dependency-path: yarn.lock
29
+ - name: Install dependencies
30
+ run: yarn --immutable
31
+
32
+ - name: Build docs
33
+ run: yarn docs
34
+
35
+ - name: Upload artifacts
36
+ uses: actions/upload-artifact@v2
37
+ with:
38
+ name: docs
39
+ path: docs/docs.json
40
+ - name: Set outputs for upload job
41
+ id: env
42
+ run: |
43
+ echo "::set-output name=BRANCH_NAME::${GITHUB_REF_NAME}"
44
+ echo "::set-output name=BRANCH_OR_TAG::${GITHUB_REF_TYPE}"
45
+ echo "::set-output name=SHA::${GITHUB_SHA}"
46
+ upload:
47
+ name: Upload Documentation
48
+ needs: build
49
+ runs-on: ubuntu-latest
50
+ env:
51
+ BRANCH_NAME: ${{ needs.build.outputs.BRANCH_NAME }}
52
+ BRANCH_OR_TAG: ${{ needs.build.outputs.BRANCH_OR_TAG }}
53
+ SHA: ${{ needs.build.outputs.SHA }}
54
+ steps:
55
+ - name: Download artifacts
56
+ uses: actions/download-artifact@v2
57
+ with:
58
+ name: docs
59
+ path: docs
60
+
61
+ - name: Checkout docs repository
62
+ uses: actions/checkout@v2
63
+ with:
64
+ repository: 'pikokr/docs'
65
+ token: ${{ secrets.PIKOKR_DOCS }}
66
+ path: 'out'
67
+
68
+ - name: Move docs to correct directory
69
+ run: |
70
+ mkdir -p out/command.ts
71
+ mv docs/docs.json out/command.ts/${BRANCH_NAME}.json
72
+ - name: Commit and push
73
+ run: |
74
+ cd out
75
+ git config user.name github-actions[bot]
76
+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
77
+ git add .
78
+ git commit -m "Docs build for ${BRANCH_OR_TAG} ${BRANCH_NAME}: ${SHA}" || true
79
+ git push
@@ -0,0 +1,18 @@
1
+ on:
2
+ push:
3
+ branches:
4
+ - stable
5
+
6
+ jobs:
7
+ publish:
8
+ runs-on: ubuntu-latest
9
+ if: "!contains(github.event.head_commit.message, '[skip ci]')"
10
+ steps:
11
+ - uses: actions/checkout@v1
12
+ - uses: actions/setup-node@v1
13
+ with:
14
+ node-version: 16.6
15
+ - run: yarn
16
+ - uses: JS-DevTools/npm-publish@v1
17
+ with:
18
+ token: ${{ secrets.NPM_TOKEN }}
package/docs/index.yml ADDED
@@ -0,0 +1,5 @@
1
+ - name: General
2
+ files:
3
+ - name: Welcome
4
+ id: welcome
5
+ path: ../../README.md
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@pikokr/command.ts",
3
3
  "description": "Discord.js command framework for typescript.",
4
- "version": "4.0.2-dev.6d75eff",
4
+ "version": "4.0.2-dev.a3285fd",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "MIT",
8
8
  "devDependencies": {
9
+ "@discordjs/ts-docgen": "^0.3.4",
9
10
  "@swc/core": "^1.2.135",
10
11
  "@types/lodash": "^4.14.172",
11
12
  "all-contributors-cli": "^6.20.0",
@@ -13,7 +14,7 @@
13
14
  "prettier": "^2.2.1",
14
15
  "ts-node": "^10.1.0",
15
16
  "tsup": "^5.11.12",
16
- "typedoc": "^0.20.35"
17
+ "typedoc": "^0.22.11"
17
18
  },
18
19
  "dependencies": {
19
20
  "@types/node": "^14.14.37",
@@ -32,6 +33,7 @@
32
33
  "prepack": "yarn build",
33
34
  "build": "tsup-node",
34
35
  "docs:dev": "typedoc",
35
- "docs:build": "typedoc"
36
+ "docs:build": "typedoc",
37
+ "docs": "typedoc --json docs/typedoc-out.json src/index.ts && ts-node scripts/docs"
36
38
  }
37
39
  }
@@ -0,0 +1,11 @@
1
+ /*
2
+ * Copyright (c) 2022 pikokr. Licensed under the MIT license
3
+ */
4
+
5
+ import { runGenerator } from '@discordjs/ts-docgen'
6
+
7
+ runGenerator({
8
+ existingOutput: 'docs/typedoc-out.json',
9
+ custom: 'docs/index.yml',
10
+ output: 'docs/docs.json',
11
+ })
package/tsconfig.json CHANGED
@@ -79,5 +79,5 @@
79
79
  "forceConsistentCasingInFileNames": true
80
80
  /* Disallow inconsistently-cased references to the same file. */
81
81
  },
82
- "exclude": ["test", "node_modules", "dist", "tsup.config.ts"]
82
+ "exclude": ["test", "node_modules", "dist", "tsup.config.ts", "scripts"]
83
83
  }