@sjunepark/fs 0.1.0 → 0.2.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/README.md +19 -9
- package/assets/guide/authoring.md +35 -20
- package/dist/pathless.js +1 -1
- package/dist/render/html.js +84 -0
- package/dist/render/html.js.map +1 -0
- package/dist/render/presentation.js +212 -0
- package/dist/render/presentation.js.map +1 -0
- package/dist/render/template.js +1223 -0
- package/dist/render/template.js.map +1 -0
- package/dist/render.js +32 -211
- package/dist/render.js.map +1 -1
- package/dist/validation/model.js.map +1 -1
- package/dist/validation/schema.js +0 -4
- package/dist/validation/schema.js.map +1 -1
- package/dist/validation/semantic.js +0 -13
- package/dist/validation/semantic.js.map +1 -1
- package/dist/validation/snapshot.js +3 -3
- package/dist/validation/validate.js +3 -3
- package/examples/README.md +5 -7
- package/examples/manufacturing-group.json +19 -119
- package/examples/minimal.json +2 -3
- package/package.json +3 -2
- package/schema/fs-document.schema.json +5 -20
- package/schema/snapshot-diff.schema.json +5 -5
- package/schema/validation-result.schema.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://cpaikr.github.io/fs/schema/0.
|
|
3
|
-
"formatVersion": "0.
|
|
2
|
+
"$schema": "https://cpaikr.github.io/fs/schema/0.2/fs-document.schema.json",
|
|
3
|
+
"formatVersion": "0.2",
|
|
4
4
|
"documentId": "manufacturing-group-2025",
|
|
5
5
|
"entity": {
|
|
6
6
|
"id": "example-group",
|
|
@@ -49,10 +49,6 @@
|
|
|
49
49
|
"date": "2024-12-31"
|
|
50
50
|
}
|
|
51
51
|
],
|
|
52
|
-
"groupingColumns": [
|
|
53
|
-
"majorGroup",
|
|
54
|
-
"valuation"
|
|
55
|
-
],
|
|
56
52
|
"statements": [
|
|
57
53
|
{
|
|
58
54
|
"id": "balance-sheet",
|
|
@@ -70,11 +66,7 @@
|
|
|
70
66
|
"at-2025": "400",
|
|
71
67
|
"at-2024": "350"
|
|
72
68
|
},
|
|
73
|
-
"rollupTo": "assets"
|
|
74
|
-
"groupings": {
|
|
75
|
-
"majorGroup": "Assets",
|
|
76
|
-
"valuation": "Cash"
|
|
77
|
-
}
|
|
69
|
+
"rollupTo": "assets"
|
|
78
70
|
},
|
|
79
71
|
{
|
|
80
72
|
"id": "inventory",
|
|
@@ -84,11 +76,7 @@
|
|
|
84
76
|
"at-2025": "600",
|
|
85
77
|
"at-2024": "550"
|
|
86
78
|
},
|
|
87
|
-
"rollupTo": "assets"
|
|
88
|
-
"groupings": {
|
|
89
|
-
"majorGroup": "Assets",
|
|
90
|
-
"valuation": "NWC"
|
|
91
|
-
}
|
|
79
|
+
"rollupTo": "assets"
|
|
92
80
|
},
|
|
93
81
|
{
|
|
94
82
|
"id": "assets",
|
|
@@ -97,10 +85,6 @@
|
|
|
97
85
|
"values": {
|
|
98
86
|
"at-2025": "1000",
|
|
99
87
|
"at-2024": "900"
|
|
100
|
-
},
|
|
101
|
-
"groupings": {
|
|
102
|
-
"majorGroup": "Assets",
|
|
103
|
-
"valuation": null
|
|
104
88
|
}
|
|
105
89
|
},
|
|
106
90
|
{
|
|
@@ -111,11 +95,7 @@
|
|
|
111
95
|
"at-2025": "450",
|
|
112
96
|
"at-2024": "400"
|
|
113
97
|
},
|
|
114
|
-
"rollupTo": "liabilities-and-equity"
|
|
115
|
-
"groupings": {
|
|
116
|
-
"majorGroup": "Liabilities and equity",
|
|
117
|
-
"valuation": "Debt"
|
|
118
|
-
}
|
|
98
|
+
"rollupTo": "liabilities-and-equity"
|
|
119
99
|
},
|
|
120
100
|
{
|
|
121
101
|
"id": "equity",
|
|
@@ -125,11 +105,7 @@
|
|
|
125
105
|
"at-2025": "550",
|
|
126
106
|
"at-2024": "500"
|
|
127
107
|
},
|
|
128
|
-
"rollupTo": "liabilities-and-equity"
|
|
129
|
-
"groupings": {
|
|
130
|
-
"majorGroup": "Liabilities and equity",
|
|
131
|
-
"valuation": "Equity"
|
|
132
|
-
}
|
|
108
|
+
"rollupTo": "liabilities-and-equity"
|
|
133
109
|
},
|
|
134
110
|
{
|
|
135
111
|
"id": "liabilities-and-equity",
|
|
@@ -138,10 +114,6 @@
|
|
|
138
114
|
"values": {
|
|
139
115
|
"at-2025": "1000",
|
|
140
116
|
"at-2024": "900"
|
|
141
|
-
},
|
|
142
|
-
"groupings": {
|
|
143
|
-
"majorGroup": "Liabilities and equity",
|
|
144
|
-
"valuation": null
|
|
145
117
|
}
|
|
146
118
|
}
|
|
147
119
|
]
|
|
@@ -162,11 +134,7 @@
|
|
|
162
134
|
"fy2025": "60",
|
|
163
135
|
"fy2024": "50"
|
|
164
136
|
},
|
|
165
|
-
"rollupTo": "revenue"
|
|
166
|
-
"groupings": {
|
|
167
|
-
"majorGroup": "Revenue",
|
|
168
|
-
"valuation": "Revenue"
|
|
169
|
-
}
|
|
137
|
+
"rollupTo": "revenue"
|
|
170
138
|
},
|
|
171
139
|
{
|
|
172
140
|
"id": "service-revenue",
|
|
@@ -176,11 +144,7 @@
|
|
|
176
144
|
"fy2025": "40",
|
|
177
145
|
"fy2024": "30"
|
|
178
146
|
},
|
|
179
|
-
"rollupTo": "revenue"
|
|
180
|
-
"groupings": {
|
|
181
|
-
"majorGroup": "Revenue",
|
|
182
|
-
"valuation": "Revenue"
|
|
183
|
-
}
|
|
147
|
+
"rollupTo": "revenue"
|
|
184
148
|
},
|
|
185
149
|
{
|
|
186
150
|
"id": "revenue",
|
|
@@ -190,11 +154,7 @@
|
|
|
190
154
|
"fy2025": "100",
|
|
191
155
|
"fy2024": "80"
|
|
192
156
|
},
|
|
193
|
-
"rollupTo": "gross-profit"
|
|
194
|
-
"groupings": {
|
|
195
|
-
"majorGroup": "Revenue",
|
|
196
|
-
"valuation": "Revenue"
|
|
197
|
-
}
|
|
157
|
+
"rollupTo": "gross-profit"
|
|
198
158
|
},
|
|
199
159
|
{
|
|
200
160
|
"id": "materials",
|
|
@@ -204,11 +164,7 @@
|
|
|
204
164
|
"fy2025": "-35",
|
|
205
165
|
"fy2024": "-30"
|
|
206
166
|
},
|
|
207
|
-
"rollupTo": "cost-of-sales"
|
|
208
|
-
"groupings": {
|
|
209
|
-
"majorGroup": "Cost of sales",
|
|
210
|
-
"valuation": null
|
|
211
|
-
}
|
|
167
|
+
"rollupTo": "cost-of-sales"
|
|
212
168
|
},
|
|
213
169
|
{
|
|
214
170
|
"id": "labor",
|
|
@@ -218,11 +174,7 @@
|
|
|
218
174
|
"fy2025": "-25",
|
|
219
175
|
"fy2024": "-20"
|
|
220
176
|
},
|
|
221
|
-
"rollupTo": "cost-of-sales"
|
|
222
|
-
"groupings": {
|
|
223
|
-
"majorGroup": "Cost of sales",
|
|
224
|
-
"valuation": null
|
|
225
|
-
}
|
|
177
|
+
"rollupTo": "cost-of-sales"
|
|
226
178
|
},
|
|
227
179
|
{
|
|
228
180
|
"id": "cost-of-sales",
|
|
@@ -232,11 +184,7 @@
|
|
|
232
184
|
"fy2025": "-60",
|
|
233
185
|
"fy2024": "-50"
|
|
234
186
|
},
|
|
235
|
-
"rollupTo": "gross-profit"
|
|
236
|
-
"groupings": {
|
|
237
|
-
"majorGroup": "Cost of sales",
|
|
238
|
-
"valuation": null
|
|
239
|
-
}
|
|
187
|
+
"rollupTo": "gross-profit"
|
|
240
188
|
},
|
|
241
189
|
{
|
|
242
190
|
"id": "gross-profit",
|
|
@@ -245,10 +193,6 @@
|
|
|
245
193
|
"values": {
|
|
246
194
|
"fy2025": "41",
|
|
247
195
|
"fy2024": "30"
|
|
248
|
-
},
|
|
249
|
-
"groupings": {
|
|
250
|
-
"majorGroup": "Profit",
|
|
251
|
-
"valuation": "EBITDA"
|
|
252
196
|
}
|
|
253
197
|
},
|
|
254
198
|
{
|
|
@@ -260,10 +204,6 @@
|
|
|
260
204
|
"fy2024": {
|
|
261
205
|
"unavailable": true
|
|
262
206
|
}
|
|
263
|
-
},
|
|
264
|
-
"groupings": {
|
|
265
|
-
"majorGroup": "Per share",
|
|
266
|
-
"valuation": "EPS"
|
|
267
207
|
}
|
|
268
208
|
}
|
|
269
209
|
]
|
|
@@ -284,11 +224,7 @@
|
|
|
284
224
|
"fy2025": "30",
|
|
285
225
|
"fy2024": "25"
|
|
286
226
|
},
|
|
287
|
-
"rollupTo": "net-cash-flow"
|
|
288
|
-
"groupings": {
|
|
289
|
-
"majorGroup": "Cash flow",
|
|
290
|
-
"valuation": null
|
|
291
|
-
}
|
|
227
|
+
"rollupTo": "net-cash-flow"
|
|
292
228
|
},
|
|
293
229
|
{
|
|
294
230
|
"id": "investing",
|
|
@@ -298,11 +234,7 @@
|
|
|
298
234
|
"fy2025": "-10",
|
|
299
235
|
"fy2024": "-8"
|
|
300
236
|
},
|
|
301
|
-
"rollupTo": "net-cash-flow"
|
|
302
|
-
"groupings": {
|
|
303
|
-
"majorGroup": "Cash flow",
|
|
304
|
-
"valuation": null
|
|
305
|
-
}
|
|
237
|
+
"rollupTo": "net-cash-flow"
|
|
306
238
|
},
|
|
307
239
|
{
|
|
308
240
|
"id": "financing",
|
|
@@ -312,11 +244,7 @@
|
|
|
312
244
|
"fy2025": "0",
|
|
313
245
|
"fy2024": "-2"
|
|
314
246
|
},
|
|
315
|
-
"rollupTo": "net-cash-flow"
|
|
316
|
-
"groupings": {
|
|
317
|
-
"majorGroup": "Cash flow",
|
|
318
|
-
"valuation": null
|
|
319
|
-
}
|
|
247
|
+
"rollupTo": "net-cash-flow"
|
|
320
248
|
},
|
|
321
249
|
{
|
|
322
250
|
"id": "net-cash-flow",
|
|
@@ -325,10 +253,6 @@
|
|
|
325
253
|
"values": {
|
|
326
254
|
"fy2025": "20",
|
|
327
255
|
"fy2024": "15"
|
|
328
|
-
},
|
|
329
|
-
"groupings": {
|
|
330
|
-
"majorGroup": "Cash flow",
|
|
331
|
-
"valuation": null
|
|
332
256
|
}
|
|
333
257
|
}
|
|
334
258
|
]
|
|
@@ -349,11 +273,7 @@
|
|
|
349
273
|
"at-2025": "200",
|
|
350
274
|
"at-2024": "180"
|
|
351
275
|
},
|
|
352
|
-
"rollupTo": "total-equity"
|
|
353
|
-
"groupings": {
|
|
354
|
-
"majorGroup": "Equity",
|
|
355
|
-
"valuation": "Equity"
|
|
356
|
-
}
|
|
276
|
+
"rollupTo": "total-equity"
|
|
357
277
|
},
|
|
358
278
|
{
|
|
359
279
|
"id": "retained-earnings",
|
|
@@ -363,11 +283,7 @@
|
|
|
363
283
|
"at-2025": "350",
|
|
364
284
|
"at-2024": "320"
|
|
365
285
|
},
|
|
366
|
-
"rollupTo": "total-equity"
|
|
367
|
-
"groupings": {
|
|
368
|
-
"majorGroup": "Equity",
|
|
369
|
-
"valuation": "Equity"
|
|
370
|
-
}
|
|
286
|
+
"rollupTo": "total-equity"
|
|
371
287
|
},
|
|
372
288
|
{
|
|
373
289
|
"id": "total-equity",
|
|
@@ -376,10 +292,6 @@
|
|
|
376
292
|
"values": {
|
|
377
293
|
"at-2025": "550",
|
|
378
294
|
"at-2024": "500"
|
|
379
|
-
},
|
|
380
|
-
"groupings": {
|
|
381
|
-
"majorGroup": "Equity",
|
|
382
|
-
"valuation": "Equity"
|
|
383
295
|
}
|
|
384
296
|
}
|
|
385
297
|
]
|
|
@@ -400,11 +312,7 @@
|
|
|
400
312
|
"fy2025": "35",
|
|
401
313
|
"fy2024": "30"
|
|
402
314
|
},
|
|
403
|
-
"rollupTo": "manufacturing-cost"
|
|
404
|
-
"groupings": {
|
|
405
|
-
"majorGroup": "Manufacturing",
|
|
406
|
-
"valuation": null
|
|
407
|
-
}
|
|
315
|
+
"rollupTo": "manufacturing-cost"
|
|
408
316
|
},
|
|
409
317
|
{
|
|
410
318
|
"id": "labor",
|
|
@@ -414,11 +322,7 @@
|
|
|
414
322
|
"fy2025": "25",
|
|
415
323
|
"fy2024": "20"
|
|
416
324
|
},
|
|
417
|
-
"rollupTo": "manufacturing-cost"
|
|
418
|
-
"groupings": {
|
|
419
|
-
"majorGroup": "Manufacturing",
|
|
420
|
-
"valuation": null
|
|
421
|
-
}
|
|
325
|
+
"rollupTo": "manufacturing-cost"
|
|
422
326
|
},
|
|
423
327
|
{
|
|
424
328
|
"id": "manufacturing-cost",
|
|
@@ -427,10 +331,6 @@
|
|
|
427
331
|
"values": {
|
|
428
332
|
"fy2025": "60",
|
|
429
333
|
"fy2024": "50"
|
|
430
|
-
},
|
|
431
|
-
"groupings": {
|
|
432
|
-
"majorGroup": "Manufacturing",
|
|
433
|
-
"valuation": null
|
|
434
334
|
}
|
|
435
335
|
}
|
|
436
336
|
]
|
package/examples/minimal.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjunepark/fs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Reference CLI for the FS financial statement artifact format",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"financial-statements",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"validation",
|
|
9
9
|
"cli"
|
|
10
10
|
],
|
|
11
|
-
"homepage": "https://cpaikr.github.io/fs/spec/0.
|
|
11
|
+
"homepage": "https://cpaikr.github.io/fs/spec/0.2/",
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "https://github.com/cpaikr/cpaikr.github.io/issues"
|
|
14
14
|
},
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"check:effect": "effect-language-service diagnostics --project tsconfig.json --format text --strict",
|
|
51
51
|
"pack:check": "node scripts/check-pack.mjs",
|
|
52
52
|
"release:check": "pnpm check && npm publish --dry-run",
|
|
53
|
+
"render:example": "pnpm build && node scripts/render-example.mjs",
|
|
53
54
|
"test": "vitest run",
|
|
54
55
|
"test:acceptance": "pnpm build && node scripts/run-cli-acceptance.mjs",
|
|
55
56
|
"test:writer-integration": "pnpm build && node scripts/run-writer-integration.mjs",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://cpaikr.github.io/fs/schema/0.
|
|
4
|
-
"title": "FS
|
|
3
|
+
"$id": "https://cpaikr.github.io/fs/schema/0.2/fs-document.schema.json",
|
|
4
|
+
"title": "FS 0.2 document",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"required": ["formatVersion", "entity", "scope", "units", "periods", "statements"],
|
|
8
8
|
"properties": {
|
|
9
9
|
"$schema": {
|
|
10
|
-
"const": "https://cpaikr.github.io/fs/schema/0.
|
|
10
|
+
"const": "https://cpaikr.github.io/fs/schema/0.2/fs-document.schema.json"
|
|
11
11
|
},
|
|
12
|
-
"formatVersion": { "const": "0.
|
|
12
|
+
"formatVersion": { "const": "0.2" },
|
|
13
13
|
"documentId": { "$ref": "#/$defs/id" },
|
|
14
14
|
"entity": { "$ref": "#/$defs/entity" },
|
|
15
15
|
"scope": { "$ref": "#/$defs/scope" },
|
|
@@ -23,11 +23,6 @@
|
|
|
23
23
|
"minItems": 1,
|
|
24
24
|
"items": { "$ref": "#/$defs/period" }
|
|
25
25
|
},
|
|
26
|
-
"groupingColumns": {
|
|
27
|
-
"type": "array",
|
|
28
|
-
"uniqueItems": true,
|
|
29
|
-
"items": { "$ref": "#/$defs/id" }
|
|
30
|
-
},
|
|
31
26
|
"statements": {
|
|
32
27
|
"type": "array",
|
|
33
28
|
"minItems": 1,
|
|
@@ -137,15 +132,10 @@
|
|
|
137
132
|
"else": { "$ref": "#/$defs/unavailableValue" }
|
|
138
133
|
}
|
|
139
134
|
},
|
|
140
|
-
"groupingCell": {
|
|
141
|
-
"if": { "type": "string" },
|
|
142
|
-
"then": { "$ref": "#/$defs/nonEmptyString" },
|
|
143
|
-
"else": { "type": "null" }
|
|
144
|
-
},
|
|
145
135
|
"item": {
|
|
146
136
|
"type": "object",
|
|
147
137
|
"additionalProperties": false,
|
|
148
|
-
"required": ["id", "label", "unit", "values"
|
|
138
|
+
"required": ["id", "label", "unit", "values"],
|
|
149
139
|
"properties": {
|
|
150
140
|
"id": { "$ref": "#/$defs/id" },
|
|
151
141
|
"label": { "$ref": "#/$defs/nonEmptyString" },
|
|
@@ -156,11 +146,6 @@
|
|
|
156
146
|
"propertyNames": { "$ref": "#/$defs/id" },
|
|
157
147
|
"additionalProperties": { "$ref": "#/$defs/valueCell" }
|
|
158
148
|
},
|
|
159
|
-
"groupings": {
|
|
160
|
-
"type": "object",
|
|
161
|
-
"propertyNames": { "$ref": "#/$defs/id" },
|
|
162
|
-
"additionalProperties": { "$ref": "#/$defs/groupingCell" }
|
|
163
|
-
},
|
|
164
149
|
"rollupTo": { "$ref": "#/$defs/id" }
|
|
165
150
|
}
|
|
166
151
|
},
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://cpaikr.github.io/fs/schema/0.
|
|
4
|
-
"title": "FS
|
|
3
|
+
"$id": "https://cpaikr.github.io/fs/schema/0.2/snapshot-diff.schema.json",
|
|
4
|
+
"title": "FS 0.2 validation snapshot diff",
|
|
5
5
|
"oneOf": [
|
|
6
6
|
{
|
|
7
7
|
"type": "object",
|
|
8
8
|
"additionalProperties": false,
|
|
9
9
|
"required": ["formatVersion", "status"],
|
|
10
10
|
"properties": {
|
|
11
|
-
"formatVersion": { "const": "0.
|
|
11
|
+
"formatVersion": { "const": "0.2" },
|
|
12
12
|
"status": { "const": "not-recorded" }
|
|
13
13
|
}
|
|
14
14
|
},
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"additionalProperties": false,
|
|
18
18
|
"required": ["formatVersion", "status", "reason"],
|
|
19
19
|
"properties": {
|
|
20
|
-
"formatVersion": { "const": "0.
|
|
20
|
+
"formatVersion": { "const": "0.2" },
|
|
21
21
|
"status": { "const": "not-comparable" },
|
|
22
22
|
"reason": { "const": "invalid-snapshot" }
|
|
23
23
|
}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"additionalProperties": false,
|
|
28
28
|
"required": ["formatVersion", "status", "conformance", "calculations", "applications"],
|
|
29
29
|
"properties": {
|
|
30
|
-
"formatVersion": { "const": "0.
|
|
30
|
+
"formatVersion": { "const": "0.2" },
|
|
31
31
|
"status": { "enum": ["match", "mismatch"] },
|
|
32
32
|
"conformance": { "$ref": "#/$defs/conformanceComparison" },
|
|
33
33
|
"calculations": { "$ref": "#/$defs/calculationComparison" },
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://cpaikr.github.io/fs/schema/0.
|
|
4
|
-
"title": "FS
|
|
3
|
+
"$id": "https://cpaikr.github.io/fs/schema/0.2/validation-result.schema.json",
|
|
4
|
+
"title": "FS 0.2 validation result",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
7
|
"required": ["formatVersion", "conformance", "calculations"],
|
|
8
8
|
"properties": {
|
|
9
|
-
"formatVersion": { "const": "0.
|
|
9
|
+
"formatVersion": { "const": "0.2" },
|
|
10
10
|
"conformance": { "$ref": "#/$defs/conformanceResult" },
|
|
11
11
|
"calculations": { "$ref": "#/$defs/calculationResult" }
|
|
12
12
|
},
|