@walkeros/server-transformer-file 4.1.0-next-1778668930820 → 4.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.
- package/CHANGELOG.md +196 -0
- package/README.md +25 -51
- package/dist/walkerOS.json +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
# @walkeros/server-transformer-file
|
|
2
|
+
|
|
3
|
+
## 4.1.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- adeebea: Add `Flow.Store.cache` for store-level caching: read-through +
|
|
8
|
+
write-through wrapper with single-flight dedup, recursive composition via
|
|
9
|
+
`cache.store`, and per-wrapper counters. `CacheRule` is now a discriminated
|
|
10
|
+
union (`EventCacheRule | StoreCacheRule`); schema rejects inert fields in
|
|
11
|
+
store contexts.
|
|
12
|
+
|
|
13
|
+
Built-in `__cache` upgraded with LRU, `maxEntries: 10000`, batched eviction,
|
|
14
|
+
and active TTL sweep.
|
|
15
|
+
|
|
16
|
+
**Breaking:** `@walkeros/store-memory` is removed. Its logic is absorbed into
|
|
17
|
+
`__cache`. Migration: drop the store declaration, or omit `cache.store` to use
|
|
18
|
+
the built-in tier. `flow_validate` flags legacy references.
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [e155ff8]
|
|
21
|
+
- Updated dependencies [e800974]
|
|
22
|
+
- Updated dependencies [e155ff8]
|
|
23
|
+
- Updated dependencies [1a8f2d7]
|
|
24
|
+
- Updated dependencies [1a8f2d7]
|
|
25
|
+
- Updated dependencies [b276173]
|
|
26
|
+
- Updated dependencies [dd9f5ad]
|
|
27
|
+
- Updated dependencies [c60ef35]
|
|
28
|
+
- Updated dependencies [adeebea]
|
|
29
|
+
- Updated dependencies [13aaeaa]
|
|
30
|
+
- Updated dependencies [e800974]
|
|
31
|
+
- Updated dependencies [adeebea]
|
|
32
|
+
- Updated dependencies [e800974]
|
|
33
|
+
- Updated dependencies [e800974]
|
|
34
|
+
- Updated dependencies [058f7ed]
|
|
35
|
+
- Updated dependencies [28a8ac2]
|
|
36
|
+
- Updated dependencies [fd6076e]
|
|
37
|
+
- @walkeros/core@4.1.0
|
|
38
|
+
|
|
39
|
+
## 4.0.2
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- Updated dependencies [a6a0ea7]
|
|
44
|
+
- @walkeros/core@4.0.2
|
|
45
|
+
|
|
46
|
+
## 4.0.1
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- Updated dependencies [381dfe7]
|
|
51
|
+
- Updated dependencies [1524275]
|
|
52
|
+
- Updated dependencies [03d7055]
|
|
53
|
+
- @walkeros/core@4.0.1
|
|
54
|
+
|
|
55
|
+
## 4.0.0
|
|
56
|
+
|
|
57
|
+
### Patch Changes
|
|
58
|
+
|
|
59
|
+
- Updated dependencies [93ea9c4]
|
|
60
|
+
- Updated dependencies [465775c]
|
|
61
|
+
- Updated dependencies [942a7fe]
|
|
62
|
+
- Updated dependencies [cfc7469]
|
|
63
|
+
- Updated dependencies [8e06b1f]
|
|
64
|
+
- Updated dependencies [3d50dd6]
|
|
65
|
+
- Updated dependencies [1ef33d9]
|
|
66
|
+
- @walkeros/core@4.0.0
|
|
67
|
+
|
|
68
|
+
## 3.4.2
|
|
69
|
+
|
|
70
|
+
### Patch Changes
|
|
71
|
+
|
|
72
|
+
- @walkeros/core@3.4.2
|
|
73
|
+
|
|
74
|
+
## 3.4.1
|
|
75
|
+
|
|
76
|
+
### Patch Changes
|
|
77
|
+
|
|
78
|
+
- Updated dependencies [12adf24]
|
|
79
|
+
- Updated dependencies [75aa26b]
|
|
80
|
+
- @walkeros/core@3.4.1
|
|
81
|
+
|
|
82
|
+
## 3.4.0
|
|
83
|
+
|
|
84
|
+
### Minor Changes
|
|
85
|
+
|
|
86
|
+
- 724f97e: Migrate every step example in every walkerOS package to the
|
|
87
|
+
standardized `[callable, ...args][]` shape introduced in `@walkeros/core`.
|
|
88
|
+
Every step example's `out` is now an array of effect tuples whose first
|
|
89
|
+
element is the callable's public SDK name (`'gtag'`, `'analytics.track'`,
|
|
90
|
+
`'fbq'`, `'dataLayer.push'`, `'sendServer'`, `'fetch'`, `'trackClient.track'`,
|
|
91
|
+
`'amplitude.track'`, `'fs.writeFile'`, `'producer.send'`, `'client.xadd'`,
|
|
92
|
+
`'client.send'`, `'dataset.table.insert'`, etc.). Source examples use `'elb'`
|
|
93
|
+
as the callable; transformer examples use the reserved `'return'` keyword;
|
|
94
|
+
store examples use store-operation callables (`'get'`, `'set'`). Tests capture
|
|
95
|
+
real calls on each component's spy and assert against `example.out` directly —
|
|
96
|
+
the hardcoded `PACKAGE_CALLS` registry in the app is no longer consulted
|
|
97
|
+
(emptied; plan #3 removes it structurally).
|
|
98
|
+
|
|
99
|
+
### Patch Changes
|
|
100
|
+
|
|
101
|
+
- Updated dependencies [74940cc]
|
|
102
|
+
- Updated dependencies [525f5d9]
|
|
103
|
+
- @walkeros/core@3.4.0
|
|
104
|
+
|
|
105
|
+
## 3.3.1
|
|
106
|
+
|
|
107
|
+
### Patch Changes
|
|
108
|
+
|
|
109
|
+
- @walkeros/core@3.3.1
|
|
110
|
+
|
|
111
|
+
## 3.3.0
|
|
112
|
+
|
|
113
|
+
### Patch Changes
|
|
114
|
+
|
|
115
|
+
- Updated dependencies [2849acb]
|
|
116
|
+
- Updated dependencies [08c365a]
|
|
117
|
+
- Updated dependencies [08c365a]
|
|
118
|
+
- Updated dependencies [08c365a]
|
|
119
|
+
- Updated dependencies [08c365a]
|
|
120
|
+
- @walkeros/core@3.3.0
|
|
121
|
+
|
|
122
|
+
## 3.2.0
|
|
123
|
+
|
|
124
|
+
### Patch Changes
|
|
125
|
+
|
|
126
|
+
- Updated dependencies [eb865e1]
|
|
127
|
+
- Updated dependencies [c0a53f9]
|
|
128
|
+
- Updated dependencies [f007c9f]
|
|
129
|
+
- Updated dependencies [bf2dc5b]
|
|
130
|
+
- Updated dependencies [da0b640]
|
|
131
|
+
- @walkeros/core@3.2.0
|
|
132
|
+
|
|
133
|
+
## 3.1.1
|
|
134
|
+
|
|
135
|
+
### Patch Changes
|
|
136
|
+
|
|
137
|
+
- @walkeros/core@3.1.1
|
|
138
|
+
|
|
139
|
+
## 3.1.0
|
|
140
|
+
|
|
141
|
+
### Patch Changes
|
|
142
|
+
|
|
143
|
+
- Updated dependencies [dfc6738]
|
|
144
|
+
- Updated dependencies [966342b]
|
|
145
|
+
- Updated dependencies [bee8ba7]
|
|
146
|
+
- Updated dependencies [966342b]
|
|
147
|
+
- Updated dependencies [df990d4]
|
|
148
|
+
- @walkeros/core@3.1.0
|
|
149
|
+
|
|
150
|
+
## 3.0.2
|
|
151
|
+
|
|
152
|
+
### Patch Changes
|
|
153
|
+
|
|
154
|
+
- @walkeros/core@3.0.2
|
|
155
|
+
|
|
156
|
+
## 3.0.1
|
|
157
|
+
|
|
158
|
+
### Patch Changes
|
|
159
|
+
|
|
160
|
+
- @walkeros/core@3.0.1
|
|
161
|
+
|
|
162
|
+
## 3.0.0
|
|
163
|
+
|
|
164
|
+
### Minor Changes
|
|
165
|
+
|
|
166
|
+
- dd28898: Add file serving transformer that serves static files through any
|
|
167
|
+
Store backend. I/O-agnostic: works with FsStore, MemoryStore, or any
|
|
168
|
+
Store.Instance. Built-in MIME type detection and configurable prefix
|
|
169
|
+
stripping.
|
|
170
|
+
|
|
171
|
+
### Patch Changes
|
|
172
|
+
|
|
173
|
+
- 5cb84c1: Replace hand-written MCP resources with auto-generated JSON Schemas
|
|
174
|
+
from @walkeros/core. Add walkerOS.json to 5 transformer packages. Variables
|
|
175
|
+
resource remains hand-maintained (runtime interpolation patterns).
|
|
176
|
+
- 499e27a: Add sideEffects declarations to all packages for bundler tree-shaking
|
|
177
|
+
support.
|
|
178
|
+
- b6c8fa8: Add stores as a first-class component type in Flow.Config. Stores get
|
|
179
|
+
their own `stores` section in flow settings, a `collector.stores` registry,
|
|
180
|
+
and `$store:storeId` env wiring in the bundler. Includes `storeMemoryInit` for
|
|
181
|
+
Flow.Config compatibility and type widening in cache/file transformers.
|
|
182
|
+
- Updated dependencies [2b259b6]
|
|
183
|
+
- Updated dependencies [2614014]
|
|
184
|
+
- Updated dependencies [6ae0ee3]
|
|
185
|
+
- Updated dependencies [37299a9]
|
|
186
|
+
- Updated dependencies [499e27a]
|
|
187
|
+
- Updated dependencies [0e5eede]
|
|
188
|
+
- Updated dependencies [d11f574]
|
|
189
|
+
- Updated dependencies [d11f574]
|
|
190
|
+
- Updated dependencies [1fe337a]
|
|
191
|
+
- Updated dependencies [5cb84c1]
|
|
192
|
+
- Updated dependencies [23f218a]
|
|
193
|
+
- Updated dependencies [499e27a]
|
|
194
|
+
- Updated dependencies [c83d909]
|
|
195
|
+
- Updated dependencies [b6c8fa8]
|
|
196
|
+
- @walkeros/core@3.0.0
|
package/README.md
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<p align="left">
|
|
2
|
+
<a href="https://www.walkeros.io">
|
|
3
|
+
<img alt="walkerOS" title="walkerOS" src="https://www.walkeros.io/img/walkerOS_logo.svg" width="256px"/>
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
# @walkeros/server-transformer-file
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
3. Calls `store.get(filePath)` to fetch content
|
|
12
|
-
4. Responds with content, correct Content-Type, and Content-Length
|
|
13
|
-
5. Returns `false` to stop the transformer chain
|
|
9
|
+
Serves static files in walkerOS server flows from a pluggable store backend,
|
|
10
|
+
deriving Content-Type from the file extension and responding directly.
|
|
14
11
|
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
[Documentation](https://www.walkeros.io/docs/transformers/file) •
|
|
13
|
+
[NPM Package](https://www.npmjs.com/package/@walkeros/server-transformer-file)
|
|
14
|
+
•
|
|
15
|
+
[Source Code](https://github.com/elbwalker/walkerOS/tree/main/packages/server/transformers/file)
|
|
17
16
|
|
|
18
17
|
## Installation
|
|
19
18
|
|
|
@@ -21,36 +20,11 @@ unchanged.
|
|
|
21
20
|
npm install @walkeros/server-transformer-file
|
|
22
21
|
```
|
|
23
22
|
|
|
24
|
-
##
|
|
25
|
-
|
|
26
|
-
### Settings
|
|
27
|
-
|
|
28
|
-
| Option | Type | Default | Description |
|
|
29
|
-
| ----------- | ------------------------ | ------- | ----------------------------------- |
|
|
30
|
-
| `prefix` | `string` | — | URL prefix to strip before lookup |
|
|
31
|
-
| `headers` | `Record<string, string>` | — | Default headers for all responses |
|
|
32
|
-
| `mimeTypes` | `Record<string, string>` | — | Extension overrides (`.ext` → type) |
|
|
33
|
-
|
|
34
|
-
### Env
|
|
23
|
+
## Quick start
|
|
35
24
|
|
|
36
|
-
|
|
37
|
-
| ------- | ----------- | --------------------------------------------------- |
|
|
38
|
-
| `store` | `FileStore` | Store providing file content (required for serving) |
|
|
39
|
-
|
|
40
|
-
### Example with FsStore
|
|
41
|
-
|
|
42
|
-
```typescript
|
|
25
|
+
```ts
|
|
43
26
|
import { startFlow } from '@walkeros/collector';
|
|
44
27
|
import { transformerFile } from '@walkeros/server-transformer-file';
|
|
45
|
-
import { storeFsInit } from '@walkeros/server-store-fs';
|
|
46
|
-
|
|
47
|
-
const fileStore = storeFsInit({
|
|
48
|
-
collector,
|
|
49
|
-
logger,
|
|
50
|
-
config: { settings: { basePath: './public' } },
|
|
51
|
-
env: {},
|
|
52
|
-
id: 'fs',
|
|
53
|
-
});
|
|
54
28
|
|
|
55
29
|
await startFlow({
|
|
56
30
|
transformers: {
|
|
@@ -68,18 +42,18 @@ await startFlow({
|
|
|
68
42
|
});
|
|
69
43
|
```
|
|
70
44
|
|
|
71
|
-
##
|
|
45
|
+
## Documentation
|
|
46
|
+
|
|
47
|
+
Full configuration, mapping, and examples live in the docs:
|
|
48
|
+
**https://www.walkeros.io/docs/transformers/file**
|
|
72
49
|
|
|
73
|
-
|
|
74
|
-
`.svg`, `.png`, `.jpg`, `.gif`, `.ico`, `.webp`, `.woff`, `.woff2`
|
|
50
|
+
## Contribute
|
|
75
51
|
|
|
76
|
-
|
|
77
|
-
|
|
52
|
+
Feel free to contribute by submitting an
|
|
53
|
+
[issue](https://github.com/elbwalker/walkerOS/issues), starting a
|
|
54
|
+
[discussion](https://github.com/elbwalker/walkerOS/discussions), or getting in
|
|
55
|
+
[contact](https://calendly.com/elb-alexander/30min).
|
|
78
56
|
|
|
79
|
-
##
|
|
57
|
+
## License
|
|
80
58
|
|
|
81
|
-
|
|
82
|
-
- **No store = passthrough** — warns and lets the event continue
|
|
83
|
-
- **No path = passthrough** — skips when `ingest.path` is missing
|
|
84
|
-
- **Prefix mismatch = passthrough** — only serves paths matching the prefix
|
|
85
|
-
- **Stops chain on serve** — returns `false` after responding
|
|
59
|
+
MIT
|
package/dist/walkerOS.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@walkeros/server-transformer-file",
|
|
3
3
|
"description": "File serving transformer for walkerOS - serves static files via pluggable Store backend",
|
|
4
|
-
"version": "4.1.0
|
|
4
|
+
"version": "4.1.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"./walkerOS.json": "./dist/walkerOS.json"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
|
-
"dist/**"
|
|
18
|
+
"dist/**",
|
|
19
|
+
"CHANGELOG.md"
|
|
19
20
|
],
|
|
20
21
|
"scripts": {
|
|
21
22
|
"build": "tsup --silent",
|
|
@@ -27,11 +28,10 @@
|
|
|
27
28
|
"update": "npx npm-check-updates -u && npm update"
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
30
|
-
"@walkeros/core": "4.1.0
|
|
31
|
+
"@walkeros/core": "4.1.0"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
|
-
"@walkeros/core": "4.1.0
|
|
34
|
-
"@walkeros/store-memory": "4.1.0-next-1778668930820"
|
|
34
|
+
"@walkeros/core": "4.1.0"
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|
|
37
37
|
"url": "git+https://github.com/elbwalker/walkerOS.git",
|