spyne 0.22.2 → 0.22.4

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:
@@ -18,38 +17,36 @@ jobs:
18
17
  uses: actions/checkout@v5
19
18
 
20
19
  # 2. Setup Node
21
- # Do not set registry-url or NODE_AUTH_TOKEN when using npm trusted publishing
20
+ # Do not set NODE_AUTH_TOKEN when using npm trusted publishing
21
+ # Do not set registry-url while debugging OIDC/trusted publishing
22
22
  - name: Setup Node
23
23
  uses: actions/setup-node@v5
24
24
  with:
25
- node-version: '22'
25
+ node-version: '24'
26
26
 
27
- # 3. Ensure modern npm with trusted publishing / provenance support
28
- - name: Update npm to latest
29
- run: npm install -g npm@latest
27
+ # 3. Install dependencies
28
+ - name: Install dependencies
29
+ run: npm ci
30
30
 
31
31
  # 4. Confirm versions for debugging
32
32
  - name: Confirm Node and npm versions
33
33
  run: |
34
34
  node --version
35
35
  npm --version
36
+ npm config get registry
36
37
 
37
- # 5. Install dependencies
38
- - name: Install dependencies
39
- run: npm ci
40
-
41
- # 6. Build UMD
38
+ # 5. Build UMD
42
39
  - name: Build UMD
43
40
  run: npm run build
44
41
 
45
- # 7. Build ESM
42
+ # 6. Build ESM
46
43
  - name: Build ESM
47
44
  run: npm run build:esm
48
45
 
49
- # 8. Verify build artifacts exist
46
+ # 7. Verify build artifacts exist
50
47
  - name: Verify dist
51
48
  run: npm run verify:dist
52
49
 
53
- # 9. Publish to npm using GitHub trusted publishing
50
+ # 8. Publish to npm using GitHub trusted publishing
54
51
  - name: Publish to npm
55
52
  run: npm publish --provenance
@@ -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,8 +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
- ![Publish Package](https://github.com/spynejs/spyne/actions/workflows/publish.yml/badge.svg)
6
-
5
+ ![Tests](https://github.com/spynejs/spyne/actions/workflows/tests.yml/badge.svg?branch=main)
7
6
 
8
7
  SpyneJS is a full frontend framework for building modular, scalable web applications — structured for collaborative development between developers and AI assistants.
9
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
  };