onroute-policy-engine 2.2.0 → 2.2.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.
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "v2.2.0";
1
+ export declare const version = "v2.2.1";
package/dist/version.js CHANGED
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
4
  // Generated by genversion.
5
- exports.version = 'v2.2.0';
5
+ exports.version = 'v2.2.1';
package/package.json CHANGED
@@ -91,5 +91,5 @@
91
91
  ],
92
92
  "testEnvironment": "node"
93
93
  },
94
- "version": "v2.2.0"
94
+ "version": "v2.2.1"
95
95
  }
@@ -1,68 +0,0 @@
1
- name: Analysis
2
-
3
- on:
4
- pull_request:
5
- types: [opened, reopened, synchronize, ready_for_review, converted_to_draft]
6
-
7
- concurrency:
8
- group: ${{ github.workflow }}-${{ github.ref }}
9
- cancel-in-progress: true
10
-
11
- jobs:
12
- validate:
13
- name: Validate PR
14
- if: (! github.event.pull_request.draft)
15
- uses: bcgov/quickstart-openshift-helpers/.github/workflows/.pr-validate.yml@v0.8.1
16
-
17
- lint:
18
- name: lint
19
- if: (! github.event.pull_request.draft)
20
- runs-on: ubuntu-24.04 # Runs on the latest version of Ubuntu
21
- steps:
22
- - name: Checkout code
23
- uses: actions/checkout@v4 # Checks out the code from the repository
24
-
25
- - name: Set up Node.js
26
- uses: actions/setup-node@v4
27
- with:
28
- node-version: '20.x'
29
-
30
- - name: Install dependencies
31
- run: npm install # Installs project dependencies
32
-
33
- - name: Lint code
34
- run: npx eslint "{src,apps,libs,test}/**/*.ts" # Run ESLint with the specified config
35
-
36
-
37
- # https://github.com/marketplace/actions/aqua-security-trivy
38
- trivy:
39
- name: Trivy Security Scan
40
- if: (! github.event.pull_request.draft)
41
- runs-on: ubuntu-22.04
42
- timeout-minutes: 1
43
- steps:
44
- - uses: actions/checkout@v4
45
- - name: Run Trivy vulnerability scanner in repo mode
46
- uses: aquasecurity/trivy-action@0.24.0
47
- with:
48
- format: "sarif"
49
- output: "trivy-results.sarif"
50
- ignore-unfixed: true
51
- scan-type: "fs"
52
- scanners: "vuln,secret,config"
53
- severity: "CRITICAL,HIGH"
54
-
55
- - name: Upload Trivy scan results to GitHub Security tab
56
- uses: github/codeql-action/upload-sarif@v3
57
- with:
58
- sarif_file: "trivy-results.sarif"
59
-
60
- results:
61
- name: Analysis Results
62
- needs: [validate, lint, trivy]
63
- if: always()
64
- runs-on: ubuntu-22.04
65
- steps:
66
- - if: contains(needs.*.result, 'failure')||contains(needs.*.result, 'canceled')
67
- run: echo "At least one job has failed." && exit 1
68
- - run: echo "Success!"
@@ -1,79 +0,0 @@
1
- ---
2
- name: CI/CD Pipleine For Simple Package Publishing
3
- on:
4
- push:
5
- branches: [main]
6
- workflow_dispatch:
7
- jobs:
8
- build:
9
- runs-on: ubuntu-24.04
10
- permissions:
11
- contents: write
12
- packages: write
13
- steps:
14
- - uses: actions/checkout@v4
15
- semver:
16
- runs-on: ubuntu-24.04
17
- outputs:
18
- next-version: ${{ steps.semver.outputs.next }}
19
- permissions:
20
- contents: write
21
- packages: write
22
-
23
- steps:
24
- - name: Checkout Code
25
- uses: actions/checkout@v4
26
-
27
- - name: Get Next Version
28
- id: semver
29
- uses: ietf-tools/semver-action@v1
30
- with:
31
- token: ${{ github.token }}
32
- branch: main
33
- noNewCommitBehavior: warn
34
- noVersionBumpBehavior: warn
35
-
36
- - name: Log if No Version Bump
37
- if: ${{ !steps.semver.outputs.next }}
38
- run: echo "No version bump detected. Skipping deploy."
39
- deploy:
40
- needs: semver
41
- if: ${{ needs.semver.outputs.next-version }}
42
- runs-on: ubuntu-24.04
43
- permissions:
44
- id-token: write # needed for provenance data generation
45
- contents: write
46
- packages: write
47
-
48
- steps:
49
- - name: Checkout Code
50
- uses: actions/checkout@v4
51
-
52
- - name: Injecting Semver Into Package.json
53
- run: |
54
- cat package.json | jq '. + { "version": "${{ needs.semver.outputs.next-version }}" }' | tee package.json
55
-
56
- - uses: actions/setup-node@v4
57
- with:
58
- node-version: '20.x'
59
- registry-url: 'https://registry.npmjs.org'
60
-
61
- - run: npm ci
62
- - run: npm install genversion --save-dev
63
- - run: npx genversion -e src/version.ts
64
- - run: tsc
65
- - run: npm test
66
-
67
- - name: Publish Package
68
- run: npm publish --provenance --access public
69
- env:
70
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
71
-
72
- - name: Create Release
73
- env:
74
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75
- run: |
76
- gh release create "${{ needs.semver.outputs.next-version }}" \
77
- --repo="${{ github.repository }}" \
78
- --title="${{ needs.semver.outputs.next-version }}" \
79
- --generate-notes
@@ -1,21 +0,0 @@
1
- {
2
- // Use IntelliSense to learn about possible attributes.
3
- // Hover to view descriptions of existing attributes.
4
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
- "version": "0.2.0",
6
- "configurations": [
7
-
8
- {
9
- "type": "node",
10
- "request": "launch",
11
- "name": "Debug Jest Test",
12
- "program": "${workspaceFolder}/node_modules/jest/bin/jest.js",
13
- "args": [
14
- "--runInBand"
15
- ],
16
- "console": "integratedTerminal",
17
- "internalConsoleOptions": "neverOpen",
18
- "cwd": "${workspaceFolder}"
19
- }
20
- ]
21
- }
package/eslint.config.mjs DELETED
@@ -1,46 +0,0 @@
1
- import typescriptEslint from "@typescript-eslint/eslint-plugin";
2
- import globals from "globals";
3
- import tsParser from "@typescript-eslint/parser";
4
- import path from "node:path";
5
- import { fileURLToPath } from "node:url";
6
- import js from "@eslint/js";
7
- import { FlatCompat } from "@eslint/eslintrc";
8
-
9
- const __filename = fileURLToPath(import.meta.url);
10
- const __dirname = path.dirname(__filename);
11
- const compat = new FlatCompat({
12
- baseDirectory: __dirname,
13
- recommendedConfig: js.configs.recommended,
14
- allConfig: js.configs.all
15
- });
16
-
17
- export default [{
18
- ignores: ["**/.eslintrc.cjs", "**/node_modules/", "**/dist/", "**/.eslintrc.cjs,", "src/_examples/usage"],
19
- }, ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"), {
20
- plugins: {
21
- "@typescript-eslint": typescriptEslint,
22
- },
23
-
24
- languageOptions: {
25
- globals: {
26
- ...globals.node,
27
- ...globals.jest,
28
- },
29
-
30
- parser: tsParser,
31
- ecmaVersion: 5,
32
- sourceType: "module",
33
-
34
- parserOptions: {
35
- project: ["./tsconfig.json"],
36
- tsconfigRootDir: __dirname,
37
- },
38
- },
39
-
40
- rules: {
41
- "@typescript-eslint/no-explicit-any": "off",
42
- },
43
- },
44
- {
45
- ignores: ["node_modules/*", "dist/*"]
46
- }];