@creationix/jot 0.0.1
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/README.md +92 -0
- package/SUMMARY.md +151 -0
- package/TOKEN_COUNTS.md +97 -0
- package/bun.lock +19 -0
- package/jot.test.ts +133 -0
- package/jot.ts +650 -0
- package/package.json +10 -0
- package/samples/chat.jot +1 -0
- package/samples/chat.json +1 -0
- package/samples/chat.pretty.jot +6 -0
- package/samples/chat.pretty.json +16 -0
- package/samples/firewall.jot +1 -0
- package/samples/firewall.json +1 -0
- package/samples/firewall.pretty.jot +235 -0
- package/samples/firewall.pretty.json +344 -0
- package/samples/github-issue.jot +1 -0
- package/samples/github-issue.json +1 -0
- package/samples/github-issue.pretty.jot +15 -0
- package/samples/github-issue.pretty.json +20 -0
- package/samples/hikes.jot +1 -0
- package/samples/hikes.json +1 -0
- package/samples/hikes.pretty.jot +14 -0
- package/samples/hikes.pretty.json +38 -0
- package/samples/irregular.jot +1 -0
- package/samples/irregular.json +1 -0
- package/samples/irregular.pretty.jot +13 -0
- package/samples/irregular.pretty.json +23 -0
- package/samples/json-counts-cache.jot +1 -0
- package/samples/json-counts-cache.json +1 -0
- package/samples/json-counts-cache.pretty.jot +26 -0
- package/samples/json-counts-cache.pretty.json +26 -0
- package/samples/key-folding-basic.jot +1 -0
- package/samples/key-folding-basic.json +1 -0
- package/samples/key-folding-basic.pretty.jot +7 -0
- package/samples/key-folding-basic.pretty.json +25 -0
- package/samples/key-folding-mixed.jot +1 -0
- package/samples/key-folding-mixed.json +1 -0
- package/samples/key-folding-mixed.pretty.jot +16 -0
- package/samples/key-folding-mixed.pretty.json +24 -0
- package/samples/key-folding-with-array.jot +1 -0
- package/samples/key-folding-with-array.json +1 -0
- package/samples/key-folding-with-array.pretty.jot +6 -0
- package/samples/key-folding-with-array.pretty.json +29 -0
- package/samples/large.jot +1 -0
- package/samples/large.json +1 -0
- package/samples/large.pretty.jot +72 -0
- package/samples/large.pretty.json +93 -0
- package/samples/logs.jot +1 -0
- package/samples/logs.json +1 -0
- package/samples/logs.pretty.jot +96 -0
- package/samples/logs.pretty.json +350 -0
- package/samples/medium.jot +1 -0
- package/samples/medium.json +1 -0
- package/samples/medium.pretty.jot +13 -0
- package/samples/medium.pretty.json +30 -0
- package/samples/metrics.jot +1 -0
- package/samples/metrics.json +1 -0
- package/samples/metrics.pretty.jot +11 -0
- package/samples/metrics.pretty.json +25 -0
- package/samples/package.jot +1 -0
- package/samples/package.json +1 -0
- package/samples/package.pretty.jot +18 -0
- package/samples/package.pretty.json +18 -0
- package/samples/products.jot +1 -0
- package/samples/products.json +1 -0
- package/samples/products.pretty.jot +69 -0
- package/samples/products.pretty.json +235 -0
- package/samples/routes.jot +1 -0
- package/samples/routes.json +1 -0
- package/samples/routes.pretty.jot +142 -0
- package/samples/routes.pretty.json +354 -0
- package/samples/small.jot +1 -0
- package/samples/small.json +1 -0
- package/samples/small.pretty.jot +8 -0
- package/samples/small.pretty.json +12 -0
- package/samples/users-50.jot +1 -0
- package/samples/users-50.json +1 -0
- package/samples/users-50.pretty.jot +53 -0
- package/samples/users-50.pretty.json +354 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
{
|
|
2
|
+
"catalog": {
|
|
3
|
+
"version": "2.1",
|
|
4
|
+
"updated": "2024-01-15",
|
|
5
|
+
"currency": "USD"
|
|
6
|
+
},
|
|
7
|
+
"categories": [
|
|
8
|
+
{
|
|
9
|
+
"id": "electronics",
|
|
10
|
+
"name": "Electronics",
|
|
11
|
+
"parent": null
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"id": "computers",
|
|
15
|
+
"name": "Computers",
|
|
16
|
+
"parent": "electronics"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "phones",
|
|
20
|
+
"name": "Phones",
|
|
21
|
+
"parent": "electronics"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "clothing",
|
|
25
|
+
"name": "Clothing",
|
|
26
|
+
"parent": null
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "mens",
|
|
30
|
+
"name": "Men's",
|
|
31
|
+
"parent": "clothing"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "womens",
|
|
35
|
+
"name": "Women's",
|
|
36
|
+
"parent": "clothing"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"products": [
|
|
40
|
+
{
|
|
41
|
+
"sku": "LAPTOP-001",
|
|
42
|
+
"name": "ProBook 15",
|
|
43
|
+
"category": "computers",
|
|
44
|
+
"price": 1299.99,
|
|
45
|
+
"stock": 45,
|
|
46
|
+
"specs": {
|
|
47
|
+
"cpu": "Intel i7",
|
|
48
|
+
"ram": "16GB",
|
|
49
|
+
"storage": "512GB SSD",
|
|
50
|
+
"display": "15.6 inch"
|
|
51
|
+
},
|
|
52
|
+
"tags": [
|
|
53
|
+
"laptop",
|
|
54
|
+
"business",
|
|
55
|
+
"portable"
|
|
56
|
+
],
|
|
57
|
+
"rating": 4.5,
|
|
58
|
+
"reviews": 234
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"sku": "LAPTOP-002",
|
|
62
|
+
"name": "GameMaster X",
|
|
63
|
+
"category": "computers",
|
|
64
|
+
"price": 1899.99,
|
|
65
|
+
"stock": 23,
|
|
66
|
+
"specs": {
|
|
67
|
+
"cpu": "AMD Ryzen 9",
|
|
68
|
+
"ram": "32GB",
|
|
69
|
+
"storage": "1TB NVMe",
|
|
70
|
+
"gpu": "RTX 4070"
|
|
71
|
+
},
|
|
72
|
+
"tags": [
|
|
73
|
+
"laptop",
|
|
74
|
+
"gaming",
|
|
75
|
+
"high-performance"
|
|
76
|
+
],
|
|
77
|
+
"rating": 4.8,
|
|
78
|
+
"reviews": 567
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"sku": "PHONE-001",
|
|
82
|
+
"name": "SmartPhone Pro",
|
|
83
|
+
"category": "phones",
|
|
84
|
+
"price": 999,
|
|
85
|
+
"stock": 150,
|
|
86
|
+
"specs": {
|
|
87
|
+
"screen": "6.7 inch OLED",
|
|
88
|
+
"camera": "108MP",
|
|
89
|
+
"battery": "5000mAh"
|
|
90
|
+
},
|
|
91
|
+
"tags": [
|
|
92
|
+
"smartphone",
|
|
93
|
+
"flagship",
|
|
94
|
+
"5G"
|
|
95
|
+
],
|
|
96
|
+
"rating": 4.6,
|
|
97
|
+
"reviews": 1023
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"sku": "PHONE-002",
|
|
101
|
+
"name": "BudgetPhone SE",
|
|
102
|
+
"category": "phones",
|
|
103
|
+
"price": 299,
|
|
104
|
+
"stock": 500,
|
|
105
|
+
"specs": {
|
|
106
|
+
"screen": "6.1 inch LCD",
|
|
107
|
+
"camera": "48MP",
|
|
108
|
+
"battery": "4000mAh"
|
|
109
|
+
},
|
|
110
|
+
"tags": [
|
|
111
|
+
"smartphone",
|
|
112
|
+
"budget",
|
|
113
|
+
"value"
|
|
114
|
+
],
|
|
115
|
+
"rating": 4.2,
|
|
116
|
+
"reviews": 445
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"sku": "SHIRT-001",
|
|
120
|
+
"name": "Classic Oxford Shirt",
|
|
121
|
+
"category": "mens",
|
|
122
|
+
"price": 59.99,
|
|
123
|
+
"stock": 200,
|
|
124
|
+
"variants": [
|
|
125
|
+
{
|
|
126
|
+
"size": "S",
|
|
127
|
+
"color": "white",
|
|
128
|
+
"stock": 40
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"size": "M",
|
|
132
|
+
"color": "white",
|
|
133
|
+
"stock": 60
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"size": "L",
|
|
137
|
+
"color": "white",
|
|
138
|
+
"stock": 50
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"size": "M",
|
|
142
|
+
"color": "blue",
|
|
143
|
+
"stock": 30
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"size": "L",
|
|
147
|
+
"color": "blue",
|
|
148
|
+
"stock": 20
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"tags": [
|
|
152
|
+
"shirt",
|
|
153
|
+
"formal",
|
|
154
|
+
"cotton"
|
|
155
|
+
],
|
|
156
|
+
"rating": 4.4,
|
|
157
|
+
"reviews": 89
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"sku": "DRESS-001",
|
|
161
|
+
"name": "Summer Floral Dress",
|
|
162
|
+
"category": "womens",
|
|
163
|
+
"price": 79.99,
|
|
164
|
+
"stock": 75,
|
|
165
|
+
"variants": [
|
|
166
|
+
{
|
|
167
|
+
"size": "XS",
|
|
168
|
+
"color": "floral-pink",
|
|
169
|
+
"stock": 15
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"size": "S",
|
|
173
|
+
"color": "floral-pink",
|
|
174
|
+
"stock": 20
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"size": "M",
|
|
178
|
+
"color": "floral-pink",
|
|
179
|
+
"stock": 25
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"size": "L",
|
|
183
|
+
"color": "floral-pink",
|
|
184
|
+
"stock": 15
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"tags": [
|
|
188
|
+
"dress",
|
|
189
|
+
"casual",
|
|
190
|
+
"summer"
|
|
191
|
+
],
|
|
192
|
+
"rating": 4.7,
|
|
193
|
+
"reviews": 156
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"sku": "MONITOR-001",
|
|
197
|
+
"name": "UltraWide 34",
|
|
198
|
+
"category": "electronics",
|
|
199
|
+
"price": 549.99,
|
|
200
|
+
"stock": 67,
|
|
201
|
+
"specs": {
|
|
202
|
+
"size": "34 inch",
|
|
203
|
+
"resolution": "3440x1440",
|
|
204
|
+
"refresh": "144Hz",
|
|
205
|
+
"panel": "IPS"
|
|
206
|
+
},
|
|
207
|
+
"tags": [
|
|
208
|
+
"monitor",
|
|
209
|
+
"ultrawide",
|
|
210
|
+
"gaming"
|
|
211
|
+
],
|
|
212
|
+
"rating": 4.6,
|
|
213
|
+
"reviews": 312
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"sku": "KEYBOARD-001",
|
|
217
|
+
"name": "Mechanical Pro",
|
|
218
|
+
"category": "electronics",
|
|
219
|
+
"price": 149.99,
|
|
220
|
+
"stock": 120,
|
|
221
|
+
"specs": {
|
|
222
|
+
"switches": "Cherry MX Brown",
|
|
223
|
+
"layout": "full",
|
|
224
|
+
"backlight": "RGB"
|
|
225
|
+
},
|
|
226
|
+
"tags": [
|
|
227
|
+
"keyboard",
|
|
228
|
+
"mechanical",
|
|
229
|
+
"gaming"
|
|
230
|
+
],
|
|
231
|
+
"rating": 4.5,
|
|
232
|
+
"reviews": 678
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{before_filesystem:{{:src,dest;"^/_analytics/script\\.js$","https://cdn.analytics.io/v1/script.js";^/_analytics/events$,"https://events.analytics.io/v1/collect?key=abc123&env=prod";"^/(?:_metrics|perf)/(script\\.js)$","https://cdn.metrics.io/v1/$1";:src,headers,status,continue;"^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$",{Location:/$1},308,true;:src,dest,status,continue;^/_internal/trace$,/404,404,true;:src,status,continue,missing;^/404/?$,404,true,[{type:header,key:x-prerender}];:src,status,continue;^/500$,500,true;:src,has,transforms;^/(.*)$,[{type:header,key:x-action,value:a1b2c3d4e5f6}],[{type:request.headers,op:append,target.key:x-action-name,args:app/api/submit.ts#submitForm}];^/(.*)$,[{type:header,key:x-action,value:f6e5d4c3b2a1}],[{type:request.headers,op:append,target.key:x-action-name,args:app/api/auth.ts#loginUser}];^/(.*)$,[{type:header,key:x-action,value:1a2b3c4d5e6f}],[{type:request.headers,op:append,target.key:x-action-name,args:app/api/auth.ts#logoutUser}];^/(.*)$,[{type:header,key:x-action,value:6f5e4d3c2b1a}],[{type:request.headers,op:append,target.key:x-action-name,args:app/api/data.ts#fetchItems}];^/(.*)$,[{type:header,key:x-action,value:abcdef123456}],[{type:request.headers,op:append,target.key:x-action-name,args:app/api/data.ts#updateItem}];^/(.*)$,[{type:header,key:x-action,value:654321fedcba}],[{type:request.headers,op:append,target.key:x-action-name,args:app/api/data.ts#deleteItem}];:src,dest,has,continue,override;"^/(?<path>.+?)(?:/)?$",/$path.segments/$segmentPath.segment.rsc,{{:type,key,value;header,rsc,"1";header,prefetch,"1";header,segment-prefetch,/(?<segmentPath>.+)}},true,true;^/?$,/index.segments/$segmentPath.segment.rsc,{{:type,key,value;header,rsc,"1";header,prefetch,"1";header,segment-prefetch,/(?<segmentPath>.+)}},true,true;:src,has,dest,headers,continue,override;^/?$,[{type:header,key:rsc,value:"1"}],/index.rsc,{vary:"rsc, state-tree, prefetch, segment-prefetch"},true,true;"^/((?!.+\\.rsc).+?)(?:/)?$",[{type:header,key:rsc,value:"1"}],/$1.rsc,{vary:"rsc, state-tree, prefetch, segment-prefetch"},true,true}},filesystem:{{:src,dest,continue;"^/index(\\.action|\\.rsc)$",/,true;:src,dest,check;"^/\\.rsc$",/index.rsc,true;"^/(.+)/\\.rsc$",/$1.rsc,true}},resource:[{src:^/.*$,status:404}],miss:[{src:^/_static/.+$,status:404,check:true,dest:/_static/not-found.txt,headers.content-type:"text/plain; charset=utf-8"}],rewrite:{{:src,dest,check,override;"^/blog/(?<slug>[^/]+?)\\.segments/blog/\\$slug(?<seg>/__PAGE__\\.segment\\.rsc|\\.segment\\.rsc)$","/blog/[slug].segments/blog/$slug$seg?slug=$slug",true,true;"^/blog/(?<slug>[^/]+?)(?<rsc>\\.rsc|\\.segments/.+\\.segment\\.rsc)$","/blog/[slug]$rsc?slug=$slug",true,true;"^/blog/(?<slug>[^/]+?)(?:/)?$","/blog/[slug]?slug=$slug",true,true;"^/items/(?<id>[^/]+?)\\.segments/items/\\$id(?<seg>/__PAGE__\\.segment\\.rsc|\\.segment\\.rsc)$","/items/[id].segments/items/$id$seg?id=$id",true,true;"^/items/(?<id>[^/]+?)(?<rsc>\\.rsc|\\.segments/.+\\.segment\\.rsc)$","/items/[id]$rsc?id=$id",true,true;"^/items/(?<id>[^/]+?)(?:/)?$","/items/[id]?id=$id",true,true}},hit:{{:src,headers,continue,important;"^/_static/(?:[^/]+/pages|chunks|runtime|css|media)/.+$",{cache-control:"public,max-age=31536000,immutable"},true,true;"^/index(?:/)?$",{x-matched-path:/},true,true;"^/((?!index$).*?)(?:/)?$",{x-matched-path:/$1},true,true}},error:{{:src,dest,status;^/.*$,/404,404;^/.*$,/500,500}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"before_filesystem":[{"src":"^/_analytics/script\\.js$","dest":"https://cdn.analytics.io/v1/script.js"},{"src":"^/_analytics/events$","dest":"https://events.analytics.io/v1/collect?key=abc123&env=prod"},{"src":"^/(?:_metrics|perf)/(script\\.js)$","dest":"https://cdn.metrics.io/v1/$1"},{"src":"^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$","headers":{"Location":"/$1"},"status":308,"continue":true},{"src":"^/_internal/trace$","dest":"/404","status":404,"continue":true},{"src":"^/404/?$","status":404,"continue":true,"missing":[{"type":"header","key":"x-prerender"}]},{"src":"^/500$","status":500,"continue":true},{"src":"^/(.*)$","has":[{"type":"header","key":"x-action","value":"a1b2c3d4e5f6"}],"transforms":[{"type":"request.headers","op":"append","target":{"key":"x-action-name"},"args":"app/api/submit.ts#submitForm"}]},{"src":"^/(.*)$","has":[{"type":"header","key":"x-action","value":"f6e5d4c3b2a1"}],"transforms":[{"type":"request.headers","op":"append","target":{"key":"x-action-name"},"args":"app/api/auth.ts#loginUser"}]},{"src":"^/(.*)$","has":[{"type":"header","key":"x-action","value":"1a2b3c4d5e6f"}],"transforms":[{"type":"request.headers","op":"append","target":{"key":"x-action-name"},"args":"app/api/auth.ts#logoutUser"}]},{"src":"^/(.*)$","has":[{"type":"header","key":"x-action","value":"6f5e4d3c2b1a"}],"transforms":[{"type":"request.headers","op":"append","target":{"key":"x-action-name"},"args":"app/api/data.ts#fetchItems"}]},{"src":"^/(.*)$","has":[{"type":"header","key":"x-action","value":"abcdef123456"}],"transforms":[{"type":"request.headers","op":"append","target":{"key":"x-action-name"},"args":"app/api/data.ts#updateItem"}]},{"src":"^/(.*)$","has":[{"type":"header","key":"x-action","value":"654321fedcba"}],"transforms":[{"type":"request.headers","op":"append","target":{"key":"x-action-name"},"args":"app/api/data.ts#deleteItem"}]},{"src":"^/(?<path>.+?)(?:/)?$","dest":"/$path.segments/$segmentPath.segment.rsc","has":[{"type":"header","key":"rsc","value":"1"},{"type":"header","key":"prefetch","value":"1"},{"type":"header","key":"segment-prefetch","value":"/(?<segmentPath>.+)"}],"continue":true,"override":true},{"src":"^/?$","dest":"/index.segments/$segmentPath.segment.rsc","has":[{"type":"header","key":"rsc","value":"1"},{"type":"header","key":"prefetch","value":"1"},{"type":"header","key":"segment-prefetch","value":"/(?<segmentPath>.+)"}],"continue":true,"override":true},{"src":"^/?$","has":[{"type":"header","key":"rsc","value":"1"}],"dest":"/index.rsc","headers":{"vary":"rsc, state-tree, prefetch, segment-prefetch"},"continue":true,"override":true},{"src":"^/((?!.+\\.rsc).+?)(?:/)?$","has":[{"type":"header","key":"rsc","value":"1"}],"dest":"/$1.rsc","headers":{"vary":"rsc, state-tree, prefetch, segment-prefetch"},"continue":true,"override":true}],"filesystem":[{"src":"^/index(\\.action|\\.rsc)$","dest":"/","continue":true},{"src":"^/\\.rsc$","dest":"/index.rsc","check":true},{"src":"^/(.+)/\\.rsc$","dest":"/$1.rsc","check":true}],"resource":[{"src":"^/.*$","status":404}],"miss":[{"src":"^/_static/.+$","status":404,"check":true,"dest":"/_static/not-found.txt","headers":{"content-type":"text/plain; charset=utf-8"}}],"rewrite":[{"src":"^/blog/(?<slug>[^/]+?)\\.segments/blog/\\$slug(?<seg>/__PAGE__\\.segment\\.rsc|\\.segment\\.rsc)$","dest":"/blog/[slug].segments/blog/$slug$seg?slug=$slug","check":true,"override":true},{"src":"^/blog/(?<slug>[^/]+?)(?<rsc>\\.rsc|\\.segments/.+\\.segment\\.rsc)$","dest":"/blog/[slug]$rsc?slug=$slug","check":true,"override":true},{"src":"^/blog/(?<slug>[^/]+?)(?:/)?$","dest":"/blog/[slug]?slug=$slug","check":true,"override":true},{"src":"^/items/(?<id>[^/]+?)\\.segments/items/\\$id(?<seg>/__PAGE__\\.segment\\.rsc|\\.segment\\.rsc)$","dest":"/items/[id].segments/items/$id$seg?id=$id","check":true,"override":true},{"src":"^/items/(?<id>[^/]+?)(?<rsc>\\.rsc|\\.segments/.+\\.segment\\.rsc)$","dest":"/items/[id]$rsc?id=$id","check":true,"override":true},{"src":"^/items/(?<id>[^/]+?)(?:/)?$","dest":"/items/[id]?id=$id","check":true,"override":true}],"hit":[{"src":"^/_static/(?:[^/]+/pages|chunks|runtime|css|media)/.+$","headers":{"cache-control":"public,max-age=31536000,immutable"},"continue":true,"important":true},{"src":"^/index(?:/)?$","headers":{"x-matched-path":"/"},"continue":true,"important":true},{"src":"^/((?!index$).*?)(?:/)?$","headers":{"x-matched-path":"/$1"},"continue":true,"important":true}],"error":[{"src":"^/.*$","dest":"/404","status":404},{"src":"^/.*$","dest":"/500","status":500}]}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
{
|
|
2
|
+
before_filesystem: {{
|
|
3
|
+
:src, dest
|
|
4
|
+
"^/_analytics/script\\.js$", "https://cdn.analytics.io/v1/script.js"
|
|
5
|
+
^/_analytics/events$, "https://events.analytics.io/v1/collect?key=abc123&env=prod"
|
|
6
|
+
"^/(?:_metrics|perf)/(script\\.js)$", "https://cdn.metrics.io/v1/$1"
|
|
7
|
+
:src, headers, status, continue
|
|
8
|
+
"^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$", { Location: /$1 }, 308, true
|
|
9
|
+
:src, dest, status, continue
|
|
10
|
+
^/_internal/trace$, /404, 404, true
|
|
11
|
+
:src, status, continue, missing
|
|
12
|
+
^/404/?$, 404, true, [{
|
|
13
|
+
type: header,
|
|
14
|
+
key: x-prerender
|
|
15
|
+
}]
|
|
16
|
+
:src, status, continue
|
|
17
|
+
^/500$, 500, true
|
|
18
|
+
:src, has, transforms
|
|
19
|
+
^/(.*)$, [{
|
|
20
|
+
type: header,
|
|
21
|
+
key: x-action,
|
|
22
|
+
value: a1b2c3d4e5f6
|
|
23
|
+
}], [{
|
|
24
|
+
type: request.headers,
|
|
25
|
+
op: append,
|
|
26
|
+
target.key: x-action-name,
|
|
27
|
+
args: app/api/submit.ts#submitForm
|
|
28
|
+
}]
|
|
29
|
+
^/(.*)$, [{
|
|
30
|
+
type: header,
|
|
31
|
+
key: x-action,
|
|
32
|
+
value: f6e5d4c3b2a1
|
|
33
|
+
}], [{
|
|
34
|
+
type: request.headers,
|
|
35
|
+
op: append,
|
|
36
|
+
target.key: x-action-name,
|
|
37
|
+
args: app/api/auth.ts#loginUser
|
|
38
|
+
}]
|
|
39
|
+
^/(.*)$, [{
|
|
40
|
+
type: header,
|
|
41
|
+
key: x-action,
|
|
42
|
+
value: 1a2b3c4d5e6f
|
|
43
|
+
}], [{
|
|
44
|
+
type: request.headers,
|
|
45
|
+
op: append,
|
|
46
|
+
target.key: x-action-name,
|
|
47
|
+
args: app/api/auth.ts#logoutUser
|
|
48
|
+
}]
|
|
49
|
+
^/(.*)$, [{
|
|
50
|
+
type: header,
|
|
51
|
+
key: x-action,
|
|
52
|
+
value: 6f5e4d3c2b1a
|
|
53
|
+
}], [{
|
|
54
|
+
type: request.headers,
|
|
55
|
+
op: append,
|
|
56
|
+
target.key: x-action-name,
|
|
57
|
+
args: app/api/data.ts#fetchItems
|
|
58
|
+
}]
|
|
59
|
+
^/(.*)$, [{
|
|
60
|
+
type: header,
|
|
61
|
+
key: x-action,
|
|
62
|
+
value: abcdef123456
|
|
63
|
+
}], [{
|
|
64
|
+
type: request.headers,
|
|
65
|
+
op: append,
|
|
66
|
+
target.key: x-action-name,
|
|
67
|
+
args: app/api/data.ts#updateItem
|
|
68
|
+
}]
|
|
69
|
+
^/(.*)$, [{
|
|
70
|
+
type: header,
|
|
71
|
+
key: x-action,
|
|
72
|
+
value: 654321fedcba
|
|
73
|
+
}], [{
|
|
74
|
+
type: request.headers,
|
|
75
|
+
op: append,
|
|
76
|
+
target.key: x-action-name,
|
|
77
|
+
args: app/api/data.ts#deleteItem
|
|
78
|
+
}]
|
|
79
|
+
:src, dest, has, continue, override
|
|
80
|
+
"^/(?<path>.+?)(?:/)?$", /$path.segments/$segmentPath.segment.rsc, {{
|
|
81
|
+
:type, key, value
|
|
82
|
+
header, rsc, "1"
|
|
83
|
+
header, prefetch, "1"
|
|
84
|
+
header, segment-prefetch, /(?<segmentPath>.+)
|
|
85
|
+
}}, true, true
|
|
86
|
+
^/?$, /index.segments/$segmentPath.segment.rsc, {{
|
|
87
|
+
:type, key, value
|
|
88
|
+
header, rsc, "1"
|
|
89
|
+
header, prefetch, "1"
|
|
90
|
+
header, segment-prefetch, /(?<segmentPath>.+)
|
|
91
|
+
}}, true, true
|
|
92
|
+
:src, has, dest, headers, continue, override
|
|
93
|
+
^/?$, [{
|
|
94
|
+
type: header,
|
|
95
|
+
key: rsc,
|
|
96
|
+
value: "1"
|
|
97
|
+
}], /index.rsc, { vary: "rsc, state-tree, prefetch, segment-prefetch" }, true, true
|
|
98
|
+
"^/((?!.+\\.rsc).+?)(?:/)?$", [{
|
|
99
|
+
type: header,
|
|
100
|
+
key: rsc,
|
|
101
|
+
value: "1"
|
|
102
|
+
}], /$1.rsc, { vary: "rsc, state-tree, prefetch, segment-prefetch" }, true, true
|
|
103
|
+
}},
|
|
104
|
+
filesystem: {{
|
|
105
|
+
:src, dest, continue
|
|
106
|
+
"^/index(\\.action|\\.rsc)$", /, true
|
|
107
|
+
:src, dest, check
|
|
108
|
+
"^/\\.rsc$", /index.rsc, true
|
|
109
|
+
"^/(.+)/\\.rsc$", /$1.rsc, true
|
|
110
|
+
}},
|
|
111
|
+
resource: [{
|
|
112
|
+
src: ^/.*$,
|
|
113
|
+
status: 404
|
|
114
|
+
}],
|
|
115
|
+
miss: [{
|
|
116
|
+
src: ^/_static/.+$,
|
|
117
|
+
status: 404,
|
|
118
|
+
check: true,
|
|
119
|
+
dest: /_static/not-found.txt,
|
|
120
|
+
headers.content-type: "text/plain; charset=utf-8"
|
|
121
|
+
}],
|
|
122
|
+
rewrite: {{
|
|
123
|
+
:src, dest, check, override
|
|
124
|
+
"^/blog/(?<slug>[^/]+?)\\.segments/blog/\\$slug(?<seg>/__PAGE__\\.segment\\.rsc|\\.segment\\.rsc)$", "/blog/[slug].segments/blog/$slug$seg?slug=$slug", true, true
|
|
125
|
+
"^/blog/(?<slug>[^/]+?)(?<rsc>\\.rsc|\\.segments/.+\\.segment\\.rsc)$", "/blog/[slug]$rsc?slug=$slug", true, true
|
|
126
|
+
"^/blog/(?<slug>[^/]+?)(?:/)?$", "/blog/[slug]?slug=$slug", true, true
|
|
127
|
+
"^/items/(?<id>[^/]+?)\\.segments/items/\\$id(?<seg>/__PAGE__\\.segment\\.rsc|\\.segment\\.rsc)$", "/items/[id].segments/items/$id$seg?id=$id", true, true
|
|
128
|
+
"^/items/(?<id>[^/]+?)(?<rsc>\\.rsc|\\.segments/.+\\.segment\\.rsc)$", "/items/[id]$rsc?id=$id", true, true
|
|
129
|
+
"^/items/(?<id>[^/]+?)(?:/)?$", "/items/[id]?id=$id", true, true
|
|
130
|
+
}},
|
|
131
|
+
hit: {{
|
|
132
|
+
:src, headers, continue, important
|
|
133
|
+
"^/_static/(?:[^/]+/pages|chunks|runtime|css|media)/.+$", { cache-control: "public,max-age=31536000,immutable" }, true, true
|
|
134
|
+
"^/index(?:/)?$", { x-matched-path: / }, true, true
|
|
135
|
+
"^/((?!index$).*?)(?:/)?$", { x-matched-path: /$1 }, true, true
|
|
136
|
+
}},
|
|
137
|
+
error: {{
|
|
138
|
+
:src, dest, status
|
|
139
|
+
^/.*$, /404, 404
|
|
140
|
+
^/.*$, /500, 500
|
|
141
|
+
}}
|
|
142
|
+
}
|