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.
- package/.github/workflows/publish.yml +21 -16
- package/.github/workflows/tests.yml +28 -0
- package/README.md +1 -1
- package/karma.conf.js +37 -24
- package/lib/spyne.esm.js +3 -3
- package/lib/spyne.esm.js.LICENSE.txt +16 -0
- package/lib/spyne.esm.js.map +1 -1
- package/lib/spyne.umd.js +2 -2
- package/lib/spyne.umd.js.LICENSE.txt +2 -2
- package/package.json +10 -7
- package/rollup.config.js +1 -1
- package/src/spyne/channels/channels-map.js +4 -0
- package/src/spyne/channels/spyne-channel-ai.js +45 -0
- package/src/spyne/spyne-app.js +2 -2
- package/src/spyne/utils/channel-payload-filter.js +1 -1
- package/src/spyne/utils/sanitize-data.js +2 -2
- package/src/spyne/views/dom-element-template.js +308 -54
- package/src/spyne/views/view-stream-selector.js +28 -1
- package/src/tests/views/dom-el-template.test.js +173 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
name: Publish Package
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
|
|
5
|
-
types: [published] # Publishes when you publish a GitHub Release
|
|
4
|
+
workflow_dispatch:
|
|
6
5
|
|
|
7
6
|
permissions:
|
|
8
|
-
id-token: write
|
|
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
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
#
|
|
21
|
-
|
|
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: '
|
|
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
|
-
#
|
|
27
|
+
# 3. Install dependencies
|
|
30
28
|
- name: Install dependencies
|
|
31
29
|
run: npm ci
|
|
32
30
|
|
|
33
|
-
#
|
|
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
|
|
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
|
[](https://www.npmjs.com/package/spyne)
|
|
4
4
|
[](https://github.com/spynejs/spyne/blob/master/LICENSE)
|
|
5
|
-
|
|
5
|
+

|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
74
|
-
|
|
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
|
-
|
|
77
|
-
singleRun: true
|
|
90
|
+
reporters: ['progress']
|
|
78
91
|
});
|
|
79
92
|
};
|