@hedia/types 2.1.61-alpha.0 → 2.1.61-alpha.1

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 (59) hide show
  1. package/.github/pull_request_template.md +5 -4
  2. package/.github/workflows/ci.yaml +5 -80
  3. package/.github/workflows/publish-release-package.yaml +16 -0
  4. package/.github/workflows/validate-pr-title.yaml +1 -12
  5. package/.npmpackagejsonlintrc.json +11 -11
  6. package/.prettierignore +3 -0
  7. package/.prettierrc +23 -23
  8. package/package.json +15 -12
  9. package/tslint.json +182 -179
  10. package/.github/workflows/release-package.yaml +0 -33
  11. package/dist/index.d.ts +0 -2
  12. package/dist/index.js.map +0 -1
  13. package/dist/types/activity/activity.d.ts +0 -64
  14. package/dist/types/activity/activity.js +0 -33
  15. package/dist/types/activity/activity.js.map +0 -1
  16. package/dist/types/boluscalculator/boluscalculator.d.ts +0 -80
  17. package/dist/types/boluscalculator/boluscalculator.js +0 -28
  18. package/dist/types/boluscalculator/boluscalculator.js.map +0 -1
  19. package/dist/types/cgm/cgm.d.ts +0 -24
  20. package/dist/types/cgm/cgm.js +0 -18
  21. package/dist/types/cgm/cgm.js.map +0 -1
  22. package/dist/types/enums.d.ts +0 -424
  23. package/dist/types/enums.js +0 -442
  24. package/dist/types/enums.js.map +0 -1
  25. package/dist/types/index.d.ts +0 -11
  26. package/dist/types/index.js +0 -24
  27. package/dist/types/index.js.map +0 -1
  28. package/dist/types/logbook/logbook.d.ts +0 -121
  29. package/dist/types/logbook/logbook.js +0 -19
  30. package/dist/types/logbook/logbook.js.map +0 -1
  31. package/dist/types/services/events/logbook.d.ts +0 -11
  32. package/dist/types/services/events/logbook.js +0 -3
  33. package/dist/types/services/events/logbook.js.map +0 -1
  34. package/dist/types/services/outbound/email.d.ts +0 -19
  35. package/dist/types/services/outbound/email.js +0 -16
  36. package/dist/types/services/outbound/email.js.map +0 -1
  37. package/dist/types/services/outbound/notification.d.ts +0 -12
  38. package/dist/types/services/outbound/notification.js +0 -3
  39. package/dist/types/services/outbound/notification.js.map +0 -1
  40. package/dist/types/services/rpc/auth.d.ts +0 -17
  41. package/dist/types/services/rpc/auth.js +0 -3
  42. package/dist/types/services/rpc/auth.js.map +0 -1
  43. package/dist/types/services/rpc/food.d.ts +0 -60
  44. package/dist/types/services/rpc/food.js +0 -18
  45. package/dist/types/services/rpc/food.js.map +0 -1
  46. package/dist/types/services/rpc/logbook.d.ts +0 -28
  47. package/dist/types/services/rpc/logbook.js +0 -3
  48. package/dist/types/services/rpc/logbook.js.map +0 -1
  49. package/dist/types/types.d.ts +0 -4
  50. package/dist/types/types.js +0 -3
  51. package/dist/types/types.js.map +0 -1
  52. package/dist/types/userdetails/userdetails.d.ts +0 -13
  53. package/dist/types/userdetails/userdetails.js +0 -3
  54. package/dist/types/userdetails/userdetails.js.map +0 -1
  55. package/dist/types/usersettings/usersettings.d.ts +0 -107
  56. package/dist/types/usersettings/usersettings.js +0 -54
  57. package/dist/types/usersettings/usersettings.js.map +0 -1
  58. package/types/services/rpc/food.ts +0 -71
  59. package/types/types.ts +0 -4
@@ -1,6 +1,7 @@
1
1
  <!--
2
- ⚠️⚠️ If pointing to master ⚠️⚠️
3
- -----------------------------
4
- - Remember to include HDA on the PR title
5
- - Remember to set the Label
2
+ ⚠️⚠️ For PRs towards master ⚠️⚠️
3
+ ----------------------------------
4
+ - Remember to prefix PR title with 'HDA-'.
5
+ - Remember to set one or more of the following labels: 'feature', 'fix', 'test'.
6
+ - Remember to set one of the following labels: 'major', 'minor', 'patch'.
6
7
  --!>
@@ -2,86 +2,11 @@ name: CI
2
2
 
3
3
  on:
4
4
  pull_request:
5
- branches:
6
- - master
7
5
  types: [opened, reopened, synchronize]
8
6
 
9
- env:
10
- NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
11
-
12
7
  jobs:
13
- ## Defines if following CI steps should be skipped due to autobump commit
14
- should-skip:
15
- runs-on: ubuntu-latest
16
- outputs:
17
- skip: ${{ steps.ci-skip.outputs.ci-skip }}
18
-
19
- steps:
20
- - uses: actions/checkout@v2
21
- with:
22
- fetch-depth: "1000"
23
-
24
- - name: Should skip CI
25
- id: ci-skip
26
- uses: mstachniuk/ci-skip@v1
27
- with:
28
- commit-filter: "autobump"
29
-
30
- ## PR labels validation
31
- validate-pr-labels:
32
- needs: [should-skip]
33
- runs-on: ubuntu-latest
34
- if: ${{ needs.should-skip.outputs.skip == 'false' }}
35
-
36
- steps:
37
- - name: Validate PR labels
38
- uses: docker://agilepathway/pull-request-label-checker:latest
39
- with:
40
- one_of: major,minor,patch
41
- repo_token: ${{ secrets.HEDIA_BOT_GITHUB_PAT }}
42
-
43
- ## Running tests & linting scripts
44
- lint-and-test:
45
- needs: [validate-pr-labels]
46
- runs-on: ubuntu-latest
47
- if: ${{ needs.should-skip.outputs.skip == 'false' }}
48
-
49
- steps:
50
- - uses: actions/checkout@v2
51
-
52
- - name: Setup Node.js
53
- uses: actions/setup-node@v2
54
- with:
55
- node-version: "14.15"
56
-
57
- - name: Register NPM access token
58
- run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
59
- env:
60
- NPM_TOKEN: ${{ env.NPM_TOKEN }}
61
-
62
- - run: npm ci --ignore-scripts
63
- - run: npm run pkg-json-lint
64
- - run: npm run prettier
65
- - run: npm run tslint
66
- - run: npm run tsc
67
-
68
- ## Bump version (if needed) & publish alpha package
69
- version-bump-publish-alpha:
70
- needs: [lint-and-test]
71
- runs-on: ubuntu-latest
72
- if: ${{ needs.should-skip.outputs.skip == 'false' }}
73
-
74
- steps:
75
- - uses: actions/checkout@v2
76
- with:
77
- ref: ${{ github.event.pull_request.head.ref }}
78
- token: ${{ secrets.HEDIA_BOT_GITHUB_PAT }}
79
-
80
- - name: Autobump & Publish
81
- uses: hedia-team/autobump-and-publish@master
82
- with:
83
- github-token: ${{ secrets.HEDIA_BOT_GITHUB_PAT }}
84
- npm-token: ${{ env.NPM_TOKEN }}
85
- git-name: "hedia-bot"
86
- label: ${{ toJson(github.event.pull_request.labels.*.name) }} ## Defines type of version bump
87
- issue-number: ${{ github.event.number }} ## So that publish comment can be written on PR
8
+ ci:
9
+ uses: hedia-team/service-workflows/.github/workflows/ci-package.yaml@hda-2122-update-package-shared-workflows
10
+ secrets:
11
+ NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
12
+ GITHUB_PAT: ${{ secrets.HEDIA_BOT_GITHUB_PAT }}
@@ -0,0 +1,16 @@
1
+ name: Publish release version of package to npm
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - master
7
+ types: [closed]
8
+
9
+ jobs:
10
+ publish-release-package:
11
+ if: github.event.pull_request.merged == true
12
+
13
+ uses: hedia-team/service-workflows/.github/workflows/publish-release-package.yaml@hda-2122-update-package-shared-workflows
14
+ secrets:
15
+ NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
16
+ GITHUB_PAT: ${{ secrets.HEDIA_BOT_GITHUB_PAT }}
@@ -2,19 +2,8 @@ name: Validate PR title
2
2
 
3
3
  on:
4
4
  pull_request:
5
- branches:
6
- - master
7
5
  types: [opened, reopened, edited]
8
6
 
9
- permissions:
10
- pull-requests: read
11
-
12
7
  jobs:
13
8
  validate-pr-title:
14
- runs-on: ubuntu-latest
15
-
16
- steps:
17
- - name: Validate PR title
18
- uses: deepakputhraya/action-pr-title@master
19
- with:
20
- regex: "^(((\\[\\d+\\.\\d+\\.\\d+\\])|(\\[Anytime\\]))\\s-\\s)?HDA-\\d+.*"
9
+ uses: hedia-team/service-workflows/.github/workflows/validate-pr-title.yaml@hda-1973-refactor-service-actions
@@ -1,12 +1,12 @@
1
1
  {
2
- "rules": {
3
- "no-caret-version-dependencies": "error",
4
- "no-caret-version-devDependencies": "error",
5
- "no-duplicate-properties": "error",
6
- "no-repeated-dependencies": "error",
7
- "no-tilde-version-dependencies": "error",
8
- "no-tilde-version-devDependencies": "error",
9
- "prefer-alphabetical-dependencies": "error",
10
- "prefer-alphabetical-devDependencies": "error"
11
- }
12
- }
2
+ "rules": {
3
+ "no-caret-version-dependencies": "error",
4
+ "no-caret-version-devDependencies": "error",
5
+ "no-duplicate-properties": "error",
6
+ "no-repeated-dependencies": "error",
7
+ "no-tilde-version-dependencies": "error",
8
+ "no-tilde-version-devDependencies": "error",
9
+ "prefer-alphabetical-dependencies": "error",
10
+ "prefer-alphabetical-devDependencies": "error"
11
+ }
12
+ }
@@ -0,0 +1,3 @@
1
+ dist/
2
+ src/**/*.d.ts
3
+ src/**/*.guard.ts
package/.prettierrc CHANGED
@@ -1,25 +1,25 @@
1
1
  {
2
- "arrowParens": "always",
3
- "bracketSpacing": true,
4
- "cursorOffset": 2,
5
- "endOfLine": "lf",
6
- "filepath": "none",
7
- "htmlWhitespaceSensitivity": "ignore",
8
- "insertPragma": false,
9
- "jsxBracketSameLine": false,
10
- "jsxSingleQuote": false,
11
- "overrides": [],
12
- "parser": "typescript",
13
- "plugins": [],
14
- "pluginSearchDirs": [],
15
- "printWidth": 120,
16
- "proseWrap": "preserve",
17
- "quoteProps": "preserve",
18
- "requirePragma": false,
19
- "semi": true,
20
- "singleQuote": false,
21
- "tabWidth": 4,
22
- "trailingComma": "all",
23
- "useTabs": true,
24
- "vueIndentScriptAndStyle": false
2
+ "arrowParens": "always",
3
+ "bracketSpacing": true,
4
+ "cursorOffset": 2,
5
+ "endOfLine": "lf",
6
+ "filepath": "none",
7
+ "htmlWhitespaceSensitivity": "ignore",
8
+ "insertPragma": false,
9
+ "bracketSameLine": false,
10
+ "jsxSingleQuote": false,
11
+ "overrides": [],
12
+ "parser": "typescript",
13
+ "plugins": [],
14
+ "pluginSearchDirs": [],
15
+ "printWidth": 120,
16
+ "proseWrap": "preserve",
17
+ "quoteProps": "preserve",
18
+ "requirePragma": false,
19
+ "semi": true,
20
+ "singleQuote": false,
21
+ "tabWidth": 4,
22
+ "trailingComma": "all",
23
+ "useTabs": true,
24
+ "vueIndentScriptAndStyle": false
25
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedia/types",
3
- "version": "2.1.61-alpha.0",
3
+ "version": "2.1.61-alpha.1",
4
4
  "description": "Enums, interfaces, and other common types for use in Hedia's software.",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -8,25 +8,28 @@
8
8
  "url": "git+ssh://git@github.com:hedia-team/hedia-types.git"
9
9
  },
10
10
  "scripts": {
11
- "tsc": "tsc",
12
- "build": "tsc --build",
13
- "clean": "tsc --build --clean",
14
- "tslint": "tslint --project .",
15
- "tslint-fix": "tslint --fix --project . ",
16
- "prettier": "prettier --check \"types/**/*.{ts,tsx}\"",
17
- "prettier-fix": "prettier --write \"types/**/*.{ts,tsx}\"",
11
+ "test": "",
12
+ "tsc": "tsc --noEmit",
13
+ "build": "rm -rf dist/ && tsc --build",
14
+ "clean": "tsc --build --clean && rm -rf dist/",
15
+ "build-guards": "ts-auto-guard src/**/[!index]*.ts",
16
+ "lint": "tslint --project .",
17
+ "lint-fix": "tslint --fix --project .",
18
+ "prettier": "prettier --check \"**/*.{ts,tsx}\"",
19
+ "prettier-fix": "prettier --write \"**/*.{ts,tsx}\"",
18
20
  "pkg-json-lint": "npmPkgJsonLint .",
19
- "package-audit": "npm-audit --high --critical",
20
- "postpublish": "npm run clean",
21
- "prepublishOnly": "npm ci && npm run tsc"
21
+ "package-audit": "npm-audit --critical",
22
+ "prepublishOnly": "npm ci --ignore-scripts && npm run build",
23
+ "postpublish": "npm run clean"
22
24
  },
23
25
  "keywords": [],
24
26
  "author": "Hedia",
25
27
  "license": "ISC",
26
28
  "homepage": "https://github.com/hedia-team/hedia-types#readme",
27
29
  "devDependencies": {
30
+ "@hedia/npm-audit-pipeline": "0.5.0",
28
31
  "npm-package-json-lint": "5.4.0",
29
- "prettier": "2.4.1",
32
+ "prettier": "2.5.1",
30
33
  "tslint": "6.1.3",
31
34
  "tslint-config-prettier": "1.18.0",
32
35
  "typescript": "4.1.5"