@xenterprises/fastify-xstripe 1.0.0 → 1.1.0

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 (2) hide show
  1. package/.gitlab-ci.yml +45 -0
  2. package/package.json +1 -1
package/.gitlab-ci.yml ADDED
@@ -0,0 +1,45 @@
1
+ # ============================================================================
2
+ # GitLab CI/CD Pipeline - xStripe
3
+ # ============================================================================
4
+ # Runs tests on merge requests and commits to main/master
5
+
6
+ stages:
7
+ - test
8
+
9
+ variables:
10
+ NODE_ENV: test
11
+
12
+ # ============================================================================
13
+ # Shared Configuration
14
+ # ============================================================================
15
+ .shared_rules: &shared_rules
16
+ rules:
17
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
18
+ - if: '$CI_COMMIT_BRANCH == "main"'
19
+ - if: '$CI_COMMIT_BRANCH == "master"'
20
+ - if: '$CI_COMMIT_TAG'
21
+
22
+ # ============================================================================
23
+ # STAGE: TEST
24
+ # ============================================================================
25
+ test:
26
+ stage: test
27
+ image: node:20-alpine
28
+ <<: *shared_rules
29
+
30
+ cache:
31
+ key: ${CI_COMMIT_REF_SLUG}
32
+ paths:
33
+ - node_modules/
34
+
35
+ before_script:
36
+ - npm ci
37
+
38
+ script:
39
+ - echo "Running xStripe tests..."
40
+ - npm test
41
+ - npm audit --audit-level=high || true
42
+
43
+ retry:
44
+ max: 2
45
+ when: runner_system_failure
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xenterprises/fastify-xstripe",
3
3
  "type": "module",
4
- "version": "1.0.0",
4
+ "version": "1.1.0",
5
5
  "description": "Fastify plugin for Stripe webhooks with simplified, testable handlers for subscription events.",
6
6
  "main": "src/index.js",
7
7
  "exports": {