@mafianacho/nacholens 0.0.0-stage → 0.3.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/LICENSE +202 -0
- package/NOTICE +13 -0
- package/README.de.md +46 -0
- package/README.fr.md +46 -0
- package/README.ja.md +46 -0
- package/README.ko.md +46 -0
- package/README.md +45 -2
- package/README.zh.md +46 -0
- package/demo/shop/v1/README.md +7 -0
- package/demo/shop/v1/api.js +78 -0
- package/demo/shop/v1/db.js +38 -0
- package/demo/shop/v1/gateway.js +50 -0
- package/demo/shop/v1/mock-external.js +17 -0
- package/demo/shop/v1/public/app.js +32 -0
- package/demo/shop/v1/public/format.js +2 -0
- package/demo/shop/v1/public/index.html +13 -0
- package/demo/shop/v1/public/styles.css +4 -0
- package/demo/shop/v2/README.md +7 -0
- package/demo/shop/v2/api.js +88 -0
- package/demo/shop/v2/db.js +38 -0
- package/demo/shop/v2/gateway.js +50 -0
- package/demo/shop/v2/mock-external.js +17 -0
- package/demo/shop/v2/public/app.js +33 -0
- package/demo/shop/v2/public/format.js +3 -0
- package/demo/shop/v2/public/index.html +13 -0
- package/demo/shop/v2/public/styles.css +5 -0
- package/docs/guide.ko.md +97 -0
- package/docs/guide.md +142 -0
- package/docs/model-schema.md +137 -0
- package/docs/review.md +78 -0
- package/examples/demo-shop.artifact.html +1535 -0
- package/examples/demo-shop.artifact.json +7 -0
- package/examples/demo-shop.html +1535 -0
- package/examples/external/README.md +12 -0
- package/examples/external/full-stack-fastapi-template/LICENSE +21 -0
- package/examples/external/full-stack-fastapi-template/changes.json +56 -0
- package/examples/external/full-stack-fastapi-template/full-stack-fastapi-template-backend.html +1535 -0
- package/models/demo-shop/changes.auto.json +121 -0
- package/models/demo-shop/changes.example.json +16 -0
- package/models/demo-shop/intent.example.json +75 -0
- package/models/demo-shop/model.json +3151 -0
- package/package.json +60 -4
- package/skills/nacholens/SKILL.md +235 -0
- package/src/cli.js +377 -0
- package/src/demo.js +42 -0
- package/src/diff.js +254 -0
- package/src/gitio.js +67 -0
- package/src/install.js +94 -0
- package/src/model.js +434 -0
- package/src/page.js +87 -0
- package/src/player/fonts/FONTLOG.md +30 -0
- package/src/player/fonts/OFL-Anton.txt +93 -0
- package/src/player/fonts/OFL-IBMPlex.txt +94 -0
- package/src/player/fonts/anton-400.woff2 +0 -0
- package/src/player/fonts/nacho-mono-500.woff2 +0 -0
- package/src/player/fonts/nacho-mono-600.woff2 +0 -0
- package/src/player/fonts/nacho-sans-400.woff2 +0 -0
- package/src/player/fonts/nacho-sans-500.woff2 +0 -0
- package/src/player/fonts/nacho-sans-600.woff2 +0 -0
- package/src/player/fonts/nacho-sans-700.woff2 +0 -0
- package/src/player/player.css +318 -0
- package/src/player/player.js +872 -0
- package/src/player/review.css +49 -0
- package/src/player/review.js +230 -0
- package/src/player/template.html +58 -0
- package/src/review.js +321 -0
- package/src/scan.js +255 -0
- package/src/template.js +36 -0
- package/src/verify.js +90 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "show shipping status on the order list",
|
|
3
|
+
"summary": "Generated from git diff: 4 changed steps, 3 changed components (browser, api, shipping), 2 changed files outside the model, 1 ignored files.",
|
|
4
|
+
"ref": "demo/shop (built by nacholens demo) 030bf9c..e9f3087",
|
|
5
|
+
"components": [
|
|
6
|
+
{
|
|
7
|
+
"id": "browser",
|
|
8
|
+
"change": "modified",
|
|
9
|
+
"note": "End of a changed step: list-orders/response"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": "api",
|
|
13
|
+
"change": "modified",
|
|
14
|
+
"note": "End of a changed step: list-orders/shipping"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "shipping",
|
|
18
|
+
"change": "added",
|
|
19
|
+
"note": "Component evidence code changed: api.js:12"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"steps": [
|
|
23
|
+
{
|
|
24
|
+
"useCase": "list-orders",
|
|
25
|
+
"step": "shipping",
|
|
26
|
+
"change": "added",
|
|
27
|
+
"note": "Evidence code added: api.js:12-18"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"useCase": "list-orders",
|
|
31
|
+
"step": "shape",
|
|
32
|
+
"change": "modified",
|
|
33
|
+
"note": "Evidence code changed: api.js:65"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"useCase": "list-orders",
|
|
37
|
+
"step": "response",
|
|
38
|
+
"change": "modified",
|
|
39
|
+
"note": "Evidence code changed: api.js:65, public/app.js:16"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"useCase": "place-order",
|
|
43
|
+
"step": "insert",
|
|
44
|
+
"change": "modified",
|
|
45
|
+
"note": "Evidence code changed: api.js:73"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"details": [
|
|
49
|
+
{
|
|
50
|
+
"component": "api",
|
|
51
|
+
"kind": "part",
|
|
52
|
+
"id": "track",
|
|
53
|
+
"change": "added",
|
|
54
|
+
"note": "Evidence code added: api.js:12-18"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"component": "api",
|
|
58
|
+
"kind": "wire",
|
|
59
|
+
"id": "session>orders-post",
|
|
60
|
+
"change": "modified",
|
|
61
|
+
"note": "Evidence code changed: api.js:73"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"component": "api",
|
|
65
|
+
"kind": "wire",
|
|
66
|
+
"id": "orders-get>track",
|
|
67
|
+
"change": "modified",
|
|
68
|
+
"note": "Evidence code changed: api.js:64"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"component": "api",
|
|
72
|
+
"kind": "wire",
|
|
73
|
+
"id": "track>fetch-ext",
|
|
74
|
+
"change": "added",
|
|
75
|
+
"note": "Evidence code added: api.js:15"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"component": "api",
|
|
79
|
+
"kind": "wire",
|
|
80
|
+
"id": "orders-post>db-module",
|
|
81
|
+
"change": "modified",
|
|
82
|
+
"note": "Evidence code changed: api.js:73"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"component": "shipping",
|
|
86
|
+
"kind": "endpoint",
|
|
87
|
+
"id": "track",
|
|
88
|
+
"change": "modified",
|
|
89
|
+
"note": "Evidence code changed: api.js:15-16"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"unmapped": [
|
|
93
|
+
{
|
|
94
|
+
"file": "public/format.js",
|
|
95
|
+
"category": "code",
|
|
96
|
+
"status": "modified",
|
|
97
|
+
"lines": "3 (1 hunk)",
|
|
98
|
+
"hint": "Not in the evidence of any use-case step: add the path to the model, or confirm the change is unrelated"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"file": "public/styles.css",
|
|
102
|
+
"category": "style",
|
|
103
|
+
"status": "modified",
|
|
104
|
+
"lines": "5 (1 hunk)",
|
|
105
|
+
"hint": "Not in the evidence of any use-case step: add the path to the model, or confirm the change is unrelated"
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"ignored": [
|
|
109
|
+
{
|
|
110
|
+
"file": "README.md",
|
|
111
|
+
"reason": "docs"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"generated": {
|
|
115
|
+
"by": "nacholens diff",
|
|
116
|
+
"base": "030bf9c56ec32a5a14c831cc73c8915a1b0a1eba",
|
|
117
|
+
"head": "e9f308776fd0d64ac269e02a5581415c2dfabf43",
|
|
118
|
+
"modelCommit": "e9f308776fd0d64ac269e02a5581415c2dfabf43",
|
|
119
|
+
"lineTranslation": false
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Order list shows shipping status",
|
|
3
|
+
"summary": "The order list now asks the shipping tracker for the status of each order and shows it next to the order. Creating an order also generates a tracking code. (Hand-written example of the change-metadata format; nacholens diff produces the same shape automatically.)",
|
|
4
|
+
"ref": "demo/shop v1 → v2 (api.js, public/app.js)",
|
|
5
|
+
"components": [
|
|
6
|
+
{ "id": "api", "change": "modified", "note": "New trackShipping() calls the tracker for every order that has a tracking code; new orders get a TRK- code." },
|
|
7
|
+
{ "id": "browser", "change": "modified", "note": "The list renders a readable shipping status per order." },
|
|
8
|
+
{ "id": "shipping", "change": "added", "note": "New third-party dependency: GET /track per order." }
|
|
9
|
+
],
|
|
10
|
+
"steps": [
|
|
11
|
+
{ "useCase": "list-orders", "step": "shipping", "change": "added", "note": "New call: one tracker lookup per order with a tracking code, run in parallel. A failure degrades to \"unknown\"." },
|
|
12
|
+
{ "useCase": "list-orders", "step": "shape", "change": "modified", "note": "Each order now carries a shipping field." },
|
|
13
|
+
{ "useCase": "list-orders", "step": "response", "change": "modified", "note": "The page prints the status next to each order." },
|
|
14
|
+
{ "useCase": "place-order", "step": "insert", "change": "modified", "note": "The inserted row includes a generated tracking code." }
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"title": "Show the delivery status in the order list",
|
|
4
|
+
"source": "Example planning note (demo shop)",
|
|
5
|
+
"expectations": [
|
|
6
|
+
{
|
|
7
|
+
"id": "ship-lookup",
|
|
8
|
+
"text": "The order list asks the carrier for the status and shows it",
|
|
9
|
+
"useCase": "list-orders",
|
|
10
|
+
"check": {
|
|
11
|
+
"type": "step",
|
|
12
|
+
"match": {
|
|
13
|
+
"kind": "call",
|
|
14
|
+
"to": "shipping"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "ship-fail-soft",
|
|
20
|
+
"text": "The order list still shows when the carrier lookup fails",
|
|
21
|
+
"useCase": "list-orders",
|
|
22
|
+
"check": {
|
|
23
|
+
"type": "step",
|
|
24
|
+
"match": {
|
|
25
|
+
"text": "failed lookup|instead of failing"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "login-first",
|
|
31
|
+
"text": "The order list reads orders only after checking the sign-in (session)",
|
|
32
|
+
"useCase": "list-orders",
|
|
33
|
+
"check": {
|
|
34
|
+
"type": "order",
|
|
35
|
+
"first": {
|
|
36
|
+
"table": "sessions",
|
|
37
|
+
"op": "read"
|
|
38
|
+
},
|
|
39
|
+
"then": {
|
|
40
|
+
"table": "orders",
|
|
41
|
+
"op": "read"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "admin-only",
|
|
47
|
+
"text": "Only admins can see the sales report",
|
|
48
|
+
"useCase": "sales-report",
|
|
49
|
+
"check": {
|
|
50
|
+
"type": "order",
|
|
51
|
+
"first": {
|
|
52
|
+
"text": "admin"
|
|
53
|
+
},
|
|
54
|
+
"then": {
|
|
55
|
+
"to": "analytics"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "address-check",
|
|
61
|
+
"text": "Creating an order validates the delivery address",
|
|
62
|
+
"useCase": "place-order",
|
|
63
|
+
"check": {
|
|
64
|
+
"type": "step",
|
|
65
|
+
"match": {
|
|
66
|
+
"text": "address"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "ship-wording",
|
|
72
|
+
"text": "Delivery status words are easy for customers to understand"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|