@openapi-typescript-infra/service 6.10.1 → 6.10.2

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.
Files changed (48) hide show
  1. package/package.json +8 -2
  2. package/.github/workflows/codeql-analysis.yml +0 -77
  3. package/.github/workflows/nodejs.yml +0 -62
  4. package/.trunk/configs/.markdownlint.yaml +0 -10
  5. package/.trunk/configs/.yamllint.yaml +0 -10
  6. package/.trunk/trunk.yaml +0 -35
  7. package/.yarn/patches/confit-npm-3.0.0-eade8c7ce1.patch +0 -52
  8. package/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +0 -541
  9. package/.yarn/releases/yarn-3.2.3.cjs +0 -783
  10. package/.yarnrc.yml +0 -7
  11. package/CHANGELOG.md +0 -525
  12. package/SECURITY.md +0 -12
  13. package/__tests__/config.test.ts +0 -53
  14. package/__tests__/fake-serv/api/fake-serv.yaml +0 -48
  15. package/__tests__/fake-serv/config/config.json +0 -13
  16. package/__tests__/fake-serv/src/handlers/hello.ts +0 -17
  17. package/__tests__/fake-serv/src/index.ts +0 -36
  18. package/__tests__/fake-serv/src/routes/error.ts +0 -16
  19. package/__tests__/fake-serv/src/routes/index.ts +0 -19
  20. package/__tests__/fake-serv/src/routes/other/world.ts +0 -7
  21. package/__tests__/fake-serv.test.ts +0 -119
  22. package/__tests__/vitest.test-setup.ts +0 -15
  23. package/src/bin/start-service.ts +0 -32
  24. package/src/bootstrap.ts +0 -160
  25. package/src/config/index.ts +0 -124
  26. package/src/config/schema.ts +0 -70
  27. package/src/config/shortstops.ts +0 -155
  28. package/src/config/validation.ts +0 -23
  29. package/src/development/port-finder.ts +0 -67
  30. package/src/development/repl.ts +0 -131
  31. package/src/env.ts +0 -29
  32. package/src/error.ts +0 -47
  33. package/src/express-app/app.ts +0 -438
  34. package/src/express-app/index.ts +0 -3
  35. package/src/express-app/internal-server.ts +0 -43
  36. package/src/express-app/modules.ts +0 -10
  37. package/src/express-app/route-loader.ts +0 -40
  38. package/src/express-app/types.ts +0 -32
  39. package/src/hook.ts +0 -36
  40. package/src/index.ts +0 -9
  41. package/src/openapi.ts +0 -184
  42. package/src/telemetry/DummyExporter.ts +0 -17
  43. package/src/telemetry/hook-modules.ts +0 -8
  44. package/src/telemetry/index.ts +0 -168
  45. package/src/telemetry/instrumentations.ts +0 -103
  46. package/src/telemetry/requestLogger.ts +0 -267
  47. package/src/tsx.d.ts +0 -1
  48. package/src/types.ts +0 -223
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openapi-typescript-infra/service",
3
- "version": "6.10.1",
3
+ "version": "6.10.2",
4
4
  "description": "An opinionated framework for building configuration driven services - web, api, or ob. Uses OpenAPI, pino logging, express, confit, Typescript and vitest.",
5
5
  "exports": {
6
6
  ".": {
@@ -14,6 +14,12 @@
14
14
  "./Makefile": "./Makefile"
15
15
  },
16
16
  "type": "module",
17
+ "files": [
18
+ "build",
19
+ "config",
20
+ "Makefile",
21
+ "README.md"
22
+ ],
17
23
  "scripts": {
18
24
  "test": "vitest",
19
25
  "lint": "eslint .",
@@ -137,5 +143,5 @@
137
143
  "resolutions": {
138
144
  "qs": "^6.11.0"
139
145
  },
140
- "packageManager": "yarn@3.2.3"
146
+ "packageManager": "yarn@3.8.7"
141
147
  }
@@ -1,77 +0,0 @@
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: [main]
17
- pull_request:
18
- # The branches below must be a subset of the branches above
19
- branches: [main]
20
- schedule:
21
- - cron: 38 16 * * 6
22
-
23
- permissions:
24
- contents: read
25
- security-events: write
26
-
27
- jobs:
28
- analyze:
29
- name: Analyze
30
- runs-on: ubuntu-latest
31
- permissions:
32
- actions: read
33
- contents: read
34
- security-events: write
35
-
36
- strategy:
37
- fail-fast: false
38
- matrix:
39
- language: [javascript]
40
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
41
- # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
42
-
43
- steps:
44
- - name: Checkout repository
45
- uses: actions/checkout@v3
46
-
47
- # Initializes the CodeQL tools for scanning.
48
- - name: Initialize CodeQL
49
- uses: github/codeql-action/init@v2
50
- with:
51
- languages: ${{ matrix.language }}
52
- # If you wish to specify custom queries, you can do so here or in a config file.
53
- # By default, queries listed here will override any specified in a config file.
54
- # Prefix the list here with "+" to use these queries and those in the config file.
55
-
56
- # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
57
- # queries: security-extended,security-and-quality
58
-
59
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
60
- # If this step fails, then you should remove it and run the build manually (see below)
61
- - name: Autobuild
62
- uses: github/codeql-action/autobuild@v2
63
-
64
- # ℹ️ Command-line programs to run using the OS shell.
65
- # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
66
-
67
- # If the Autobuild fails above, remove it and uncomment the following three lines.
68
- # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
69
-
70
- # - run: |
71
- # echo "Run, Build Application using script"
72
- # ./location_of_script_within_repo/buildscript.sh
73
-
74
- - name: Perform CodeQL Analysis
75
- uses: github/codeql-action/analyze@v2
76
- with:
77
- category: '/language:${{matrix.language}}'
@@ -1,62 +0,0 @@
1
- name: Node CI
2
-
3
- on:
4
- pull_request:
5
- types: [assigned, opened, synchronize, reopened]
6
- push:
7
- branches:
8
- - main
9
- workflow_dispatch:
10
-
11
- permissions:
12
- contents: read
13
-
14
- jobs:
15
- prepare:
16
- runs-on: ubuntu-latest
17
- steps:
18
- - name: Cleanup stale actions
19
- uses: styfle/cancel-workflow-action@0.12.1
20
- with:
21
- access_token: ${{ github.token }}
22
-
23
- build:
24
- runs-on: ubuntu-latest
25
- steps:
26
- - uses: actions/checkout@v4
27
- - name: Use Node.js 18
28
- uses: actions/setup-node@v4
29
- with:
30
- node-version: 22
31
- - name: npm install, lint, build, and test
32
- run: |
33
- yarn install --immutable
34
- yarn lint
35
- yarn build
36
- yarn test
37
- env:
38
- CI: true
39
-
40
- publish-npm:
41
- needs: build
42
- permissions:
43
- contents: write
44
- issues: write
45
- id-token: write
46
- pull-requests: write
47
- runs-on: ubuntu-latest
48
- steps:
49
- - uses: actions/checkout@v4
50
- - uses: actions/setup-node@v4
51
- with:
52
- node-version: 22
53
- registry-url: https://registry.npmjs.org/
54
- - run: yarn install --immutable
55
- - run: yarn build
56
-
57
- - name: Release
58
- env:
59
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60
- NPM_CONFIG_PROVENANCE: "true"
61
- run: |
62
- npx semantic-release
@@ -1,10 +0,0 @@
1
- # Autoformatter friendly markdownlint config (all formatting rules disabled)
2
- default: true
3
- blank_lines: false
4
- bullet: false
5
- html: false
6
- indentation: false
7
- line_length: false
8
- spaces: false
9
- url: false
10
- whitespace: false
@@ -1,10 +0,0 @@
1
- rules:
2
- quoted-strings:
3
- required: only-when-needed
4
- extra-allowed: ['{|}']
5
- empty-values:
6
- forbid-in-block-mappings: true
7
- forbid-in-flow-mappings: true
8
- key-duplicates: {}
9
- octal-values:
10
- forbid-implicit-octal: true
package/.trunk/trunk.yaml DELETED
@@ -1,35 +0,0 @@
1
- version: 0.1
2
- cli:
3
- version: 1.21.0
4
- plugins:
5
- sources:
6
- - id: trunk
7
- ref: v1.4.5
8
- uri: https://github.com/trunk-io/plugins
9
- lint:
10
- enabled:
11
- - actionlint@1.6.27
12
- - checkov@3.2.43
13
- - eslint@8.57.0
14
- - git-diff-check
15
- - markdownlint@0.39.0
16
- - osv-scanner@1.7.0
17
- - prettier@3.2.5
18
- - trivy@0.50.0
19
- - trufflehog@3.70.3
20
- - yamllint@1.35.1
21
- ignore:
22
- - linters: [ALL]
23
- paths:
24
- - .yarn/**
25
- - yarn.lock
26
- runtimes:
27
- enabled:
28
- - node@18.12.1
29
- - python@3.10.8
30
- actions:
31
- enabled:
32
- - trunk-announce
33
- - trunk-check-pre-push
34
- - trunk-fmt-pre-commit
35
- - trunk-upgrade-available
@@ -1,52 +0,0 @@
1
- diff --git a/dist/lib/provider.js b/dist/lib/provider.js
2
- index 3ec01c9a89d0ab60a243361b01266123f2830d98..b7e55de474dd2df02546e13a1dfe8e1c146ec958 100644
3
- --- a/dist/lib/provider.js
4
- +++ b/dist/lib/provider.js
5
- @@ -104,7 +104,7 @@ module.exports = {
6
- for (var _iterator = _core.$for.getIterator(_core.Object.keys(process.env)), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
7
- var env = _step.value;
8
-
9
- - //env:env is decided by process.env.NODE_ENV.
10
- + //env:env is decided by process.env.APP_ENV or process.env.NODE_ENV.
11
- //Not allowing process.env.env to override the env:env value.
12
- if (ignore.indexOf(env) < 0) {
13
- result[env] = process.env[env];
14
- @@ -131,10 +131,10 @@ module.exports = {
15
- convenience: function convenience() {
16
- var nodeEnv, env;
17
-
18
- - nodeEnv = process.env.NODE_ENV || "development";
19
- + nodeEnv = process.env.APP_ENV || process.env.NODE_ENV || "development";
20
- env = {};
21
-
22
- - debug("NODE_ENV set to " + nodeEnv);
23
- + debug("APP_ENV/NODE_ENV set to " + nodeEnv);
24
-
25
- // Normalize env and set convenience values.
26
- var _iteratorNormalCompletion = true;
27
- diff --git a/lib/provider.js b/lib/provider.js
28
- index f3ec9377f40e8f9322310598b6104232d36dc0fe..577ca1812e75a3d5bb97e994385ba5d4a4dab6a6 100644
29
- --- a/lib/provider.js
30
- +++ b/lib/provider.js
31
- @@ -49,7 +49,7 @@ module.exports = {
32
- // process.env is not a normal object, so we
33
- // need to map values.
34
- for (let env of Object.keys(process.env)) {
35
- - //env:env is decided by process.env.NODE_ENV.
36
- + //env:env is decided by process.env.APP_ENV or process.env.NODE_ENV.
37
- //Not allowing process.env.env to override the env:env value.
38
- if (ignore.indexOf(env) < 0) {
39
- result[env] = process.env[env];
40
- @@ -63,10 +63,10 @@ module.exports = {
41
- convenience() {
42
- var nodeEnv, env;
43
-
44
- - nodeEnv = process.env.NODE_ENV || 'development';
45
- + nodeEnv = process.env.APP_ENV || process.env.NODE_ENV || 'development';
46
- env = {};
47
-
48
- - debug(`NODE_ENV set to ${nodeEnv}`);
49
- + debug(`APP_ENV/NODE_ENV set to ${nodeEnv}`);
50
-
51
- // Normalize env and set convenience values.
52
- for (let current of Object.keys(Common.env)) {