spyne 0.21.4 → 0.22.3

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.
@@ -1,11 +1,10 @@
1
1
  name: Publish Package
2
2
 
3
3
  on:
4
- release:
5
- types: [published] # Publishes when you publish a GitHub Release
4
+ workflow_dispatch:
6
5
 
7
6
  permissions:
8
- id-token: write # REQUIRED for npm trusted publishing (OIDC)
7
+ id-token: write
9
8
  contents: read
10
9
 
11
10
  jobs:
@@ -14,27 +13,33 @@ jobs:
14
13
 
15
14
  steps:
16
15
  # 1. Checkout repo
17
- - uses: actions/checkout@v5
18
-
19
- # 2. Setup Node (OIDC-safe)
20
- # IMPORTANT: Do NOT set registry-url or npm token
21
- - uses: actions/setup-node@v5
16
+ - name: Checkout repo
17
+ uses: actions/checkout@v5
18
+
19
+ # 2. Setup Node
20
+ # Do not set NODE_AUTH_TOKEN when using npm trusted publishing
21
+ # Do not set registry-url while debugging OIDC/trusted publishing
22
+ - name: Setup Node
23
+ uses: actions/setup-node@v5
22
24
  with:
23
- node-version: '22'
24
-
25
- # 3. Ensure modern npm (OIDC + provenance support)
26
- - name: Update npm to latest
27
- run: npm install -g npm@latest
25
+ node-version: '24'
28
26
 
29
- # 4. Install dependencies
27
+ # 3. Install dependencies
30
28
  - name: Install dependencies
31
29
  run: npm ci
32
30
 
33
- # 5. Build UMD (Webpack)
31
+ # 4. Confirm versions for debugging
32
+ - name: Confirm Node and npm versions
33
+ run: |
34
+ node --version
35
+ npm --version
36
+ npm config get registry
37
+
38
+ # 5. Build UMD
34
39
  - name: Build UMD
35
40
  run: npm run build
36
41
 
37
- # 6. Build ESM (Rollup)
42
+ # 6. Build ESM
38
43
  - name: Build ESM
39
44
  run: npm run build:esm
40
45
 
@@ -0,0 +1,28 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ pull_request:
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - name: Checkout repo
16
+ uses: actions/checkout@v5
17
+
18
+ - name: Setup Node
19
+ uses: actions/setup-node@v5
20
+ with:
21
+ node-version: '22'
22
+ cache: 'npm'
23
+
24
+ - name: Install dependencies
25
+ run: npm ci
26
+
27
+ - name: Run Karma tests
28
+ run: npm run test:single
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![NPM version](https://img.shields.io/npm/v/spyne.svg?longCache=true&style=flat-square)](https://www.npmjs.com/package/spyne)
4
4
  [![GitHub license](https://img.shields.io/github/license/spynejs/spyne.svg?longCache=true&style=flat-square)](https://github.com/spynejs/spyne/blob/master/LICENSE)
5
- [![Build Status](https://app.travis-ci.com/spynejs/spyne.svg?token=tUNpKxHHHcwypyVzqWmD&branch=main)](https://travis-ci.com/spynejs/spyne)
5
+ ![Tests](https://github.com/spynejs/spyne/actions/workflows/tests.yml/badge.svg?branch=main)
6
6
 
7
7
  SpyneJS is a full frontend framework for building modular, scalable web applications — structured for collaborative development between developers and AI assistants.
8
8
 
package/karma.conf.js CHANGED
@@ -1,23 +1,18 @@
1
1
  const replace = require('@rollup/plugin-replace');
2
2
  const dotenv = require('dotenv');
3
+
3
4
  dotenv.config();
4
5
 
5
- module.exports = function (config) {
6
- // ...
7
- // Use process.env.IS_PUBLIC as needed
8
- // ...
9
- };
6
+ const isCI = Boolean(
7
+ process.env.GITHUB_ACTIONS ||
8
+ process.env.TRAVIS ||
9
+ process.env.CI
10
+ );
10
11
 
11
12
  module.exports = function (config) {
12
-
13
- if (process.env.TRAVIS) {
14
- config.browsers = ['ChromeHeadlessNoSandbox'];
15
- }
16
-
17
13
  config.set({
18
14
  frameworks: ['mocha', 'chai'],
19
15
 
20
- // Load these plugins so Karma recognizes 'rollup' as a preprocessor
21
16
  plugins: [
22
17
  'karma-mocha',
23
18
  'karma-chai',
@@ -26,20 +21,18 @@ module.exports = function (config) {
26
21
  ],
27
22
 
28
23
  files: [
29
- // Test files
30
24
  { pattern: './node_modules/ramda/dist/ramda.min.js', watched: false },
31
25
  { pattern: './node_modules/rxjs/**/*.js', included: false, watched: false },
32
26
 
33
- // Your test files:
34
27
  { pattern: './src/tests/index.test.js', watched: true },
35
28
  { pattern: './src/tests/spyne-app.test.js', watched: true },
36
29
  { pattern: './src/tests/package-json.spec.test.js', watched: true },
37
30
  { pattern: './src/tests/channels/*.test.js', watched: true },
38
31
  { pattern: './src/tests/utils/*.test.js', watched: true },
39
- { pattern: './src/tests/views/*.test.js', watched: true } ],
32
+ { pattern: './src/tests/views/*.test.js', watched: true }
33
+ ],
40
34
 
41
35
  preprocessors: {
42
- // We want to run Rollup on our test files (and any imports they pull in)
43
36
  './src/tests/*.test.js': ['rollup'],
44
37
  './src/tests/channels/*.test.js': ['rollup'],
45
38
  './src/tests/utils/*.test.js': ['rollup'],
@@ -52,28 +45,48 @@ module.exports = function (config) {
52
45
  name: 'SpyneTest',
53
46
  sourcemap: 'inline'
54
47
  },
48
+
55
49
  plugins: [
56
50
  replace({
57
- // The replacement you want to do:
58
51
  'process.env.IS_PUBLIC': JSON.stringify(process.env.IS_PUBLIC === 'true'),
59
- // Or if you'd rather fallback to 'false' if not set:
60
- // 'process.env.IS_PUBLIC': JSON.stringify(process.env.IS_PUBLIC ?? 'false'),
61
-
62
52
  preventAssignment: true
63
53
  }),
64
54
 
65
- require('@rollup/plugin-node-resolve').default(),
55
+ require('@rollup/plugin-node-resolve').default({
56
+ browser: true
57
+ }),
58
+
66
59
  require('@rollup/plugin-commonjs')({
67
60
  transformMixedEsModules: true
68
61
  }),
62
+
69
63
  require('@rollup/plugin-json')()
70
64
  ]
71
65
  },
72
66
 
73
- // Browsers
74
- browsers: ['Chrome'],
67
+ customLaunchers: {
68
+ ChromeHeadlessNoSandbox: {
69
+ base: 'ChromeHeadless',
70
+ flags: [
71
+ '--no-sandbox',
72
+ '--disable-gpu',
73
+ '--disable-dev-shm-usage',
74
+ '--disable-setuid-sandbox',
75
+ '--remote-debugging-port=9222'
76
+ ]
77
+ }
78
+ },
79
+
80
+ browsers: [isCI ? 'ChromeHeadlessNoSandbox' : 'Chrome'],
81
+
82
+ singleRun: true,
83
+
84
+ autoWatch: false,
85
+
86
+ browserNoActivityTimeout: 60000,
87
+ browserDisconnectTimeout: 10000,
88
+ browserDisconnectTolerance: 2,
75
89
 
76
- // run once and exit or watch
77
- singleRun: true
90
+ reporters: ['progress']
78
91
  });
79
92
  };