@brunosouzas/stackledger 0.5.1 → 0.7.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.
Files changed (59) hide show
  1. package/README.md +18 -16
  2. package/dist/cli.js +1 -1
  3. package/dist/cli.js.map +1 -1
  4. package/dist/discovery/snapshot.d.ts +1 -1
  5. package/dist/discovery/snapshot.js +5 -3
  6. package/dist/discovery/snapshot.js.map +1 -1
  7. package/dist/discovery/sources/apps.d.ts +16 -0
  8. package/dist/discovery/sources/apps.js +13 -8
  9. package/dist/discovery/sources/apps.js.map +1 -1
  10. package/dist/discovery/sources/launchd.d.ts +1 -0
  11. package/dist/discovery/sources/launchd.js +128 -11
  12. package/dist/discovery/sources/launchd.js.map +1 -1
  13. package/dist/discovery/types.d.ts +4 -1
  14. package/dist/discovery/types.js +2 -0
  15. package/dist/discovery/types.js.map +1 -1
  16. package/dist/drift-formats.js +2 -0
  17. package/dist/drift-formats.js.map +1 -1
  18. package/dist/drift.d.ts +4 -1
  19. package/dist/drift.js +19 -2
  20. package/dist/drift.js.map +1 -1
  21. package/dist/map/backdrops/london.d.ts +3 -0
  22. package/dist/map/backdrops/london.js +83 -0
  23. package/dist/map/backdrops/london.js.map +1 -0
  24. package/dist/map/backdrops/types.d.ts +18 -0
  25. package/dist/map/backdrops/types.js +2 -0
  26. package/dist/map/backdrops/types.js.map +1 -0
  27. package/dist/map/command.js +7 -4
  28. package/dist/map/command.js.map +1 -1
  29. package/dist/map/svg.d.ts +18 -1
  30. package/dist/map/svg.js +48 -0
  31. package/dist/map/svg.js.map +1 -1
  32. package/dist/map/themes.d.ts +7 -0
  33. package/dist/map/themes.js +2 -1
  34. package/dist/map/themes.js.map +1 -1
  35. package/dist/scaffold.js +26 -4
  36. package/dist/scaffold.js.map +1 -1
  37. package/dist/schema.d.ts +14 -0
  38. package/dist/schema.js +4 -1
  39. package/dist/schema.js.map +1 -1
  40. package/dist/site/build.js +1 -1
  41. package/dist/site/build.js.map +1 -1
  42. package/dist/site/data.d.ts +2 -0
  43. package/dist/site/data.js +6 -3
  44. package/dist/site/data.js.map +1 -1
  45. package/dist/site/relative.d.ts +3 -2
  46. package/dist/site/relative.js +11 -6
  47. package/dist/site/relative.js.map +1 -1
  48. package/dist/views.d.ts +4 -1
  49. package/dist/views.js +6 -0
  50. package/dist/views.js.map +1 -1
  51. package/examples/catalogue-repository/.github/workflows/stackledger.yml +1 -1
  52. package/examples/catalogue-repository/README.md +3 -3
  53. package/examples/northwind-machine/snapshot.json +25 -4
  54. package/npm-shrinkwrap.json +6 -6
  55. package/package.json +2 -2
  56. package/site/src/pages/map/index.astro +8 -0
  57. package/site/src/styles/pages.css +14 -0
  58. package/site/src/styles/tokens.css +3 -0
  59. package/skills/stackledger/SKILL.md +1 -1
@@ -39,7 +39,7 @@
39
39
  "source": "launchd",
40
40
  "status": "ok",
41
41
  "reason": null,
42
- "items": 3,
42
+ "items": 5,
43
43
  "ignored": 1
44
44
  },
45
45
  {
@@ -252,13 +252,32 @@
252
252
  "path": "/Applications/Notion.app",
253
253
  "appStore": false
254
254
  },
255
+ {
256
+ "source": "launchd",
257
+ "id": "com.1password.1password-launcher",
258
+ "versions": [],
259
+ "scope": "app-login-item",
260
+ "path": "/Applications/1Password.app/Contents/Library/LoginItems/1Password Launcher.app",
261
+ "program": "/Applications/1Password.app/Contents/Library/LoginItems/1Password Launcher.app/Contents/MacOS/1Password Launcher",
262
+ "script": null
263
+ },
255
264
  {
256
265
  "source": "launchd",
257
266
  "id": "com.apple.northwind.helper",
258
267
  "versions": [],
259
268
  "scope": "daemon",
260
269
  "path": "/Library/LaunchDaemons/com.apple.northwind.helper.plist",
261
- "program": "/usr/libexec/northwind-helper"
270
+ "program": "/usr/libexec/northwind-helper",
271
+ "script": null
272
+ },
273
+ {
274
+ "source": "launchd",
275
+ "id": "com.northwind.indexer",
276
+ "versions": [],
277
+ "scope": "user-agent",
278
+ "path": "/Users/username/Library/LaunchAgents/com.northwind.indexer.plist",
279
+ "program": "/usr/bin/python3",
280
+ "script": "/Users/username/northwind/indexer.py"
262
281
  },
263
282
  {
264
283
  "source": "launchd",
@@ -266,7 +285,8 @@
266
285
  "versions": [],
267
286
  "scope": "user-agent",
268
287
  "path": "/Users/username/Library/LaunchAgents/com.northwind.secrets-sync.plist",
269
- "program": "/opt/homebrew/opt/doppler/bin/doppler"
288
+ "program": "/opt/homebrew/opt/doppler/bin/doppler",
289
+ "script": null
270
290
  },
271
291
  {
272
292
  "source": "launchd",
@@ -274,7 +294,8 @@
274
294
  "versions": [],
275
295
  "scope": "agent",
276
296
  "path": "/Library/LaunchAgents/com.northwind.sync.helper.plist",
277
- "program": "/Applications/Northwind Editor.app/Contents/MacOS/sync-helper"
297
+ "program": "/Applications/Northwind Editor.app/Contents/MacOS/sync-helper",
298
+ "script": null
278
299
  },
279
300
  {
280
301
  "source": "mise",
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@brunosouzas/stackledger",
3
- "version": "0.5.1",
3
+ "version": "0.7.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@brunosouzas/stackledger",
9
- "version": "0.5.1",
9
+ "version": "0.7.0",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
- "@brunosouzas/design-system": "0.4.0",
12
+ "@brunosouzas/design-system": "0.5.3",
13
13
  "@fontsource/heebo": "5.3.0",
14
14
  "@fontsource/lato": "5.3.0",
15
15
  "@fontsource/signika": "5.3.0",
@@ -500,9 +500,9 @@
500
500
  ]
501
501
  },
502
502
  "node_modules/@brunosouzas/design-system": {
503
- "version": "0.4.0",
504
- "resolved": "https://registry.npmjs.org/@brunosouzas/design-system/-/design-system-0.4.0.tgz",
505
- "integrity": "sha512-wly8sSN0V8xN6UwgdwKrQ2q7/CgpPAk/BWRxIP8rLajGIDTC1lIPjyXJOSzzdpD+EY8UhSIHjUabe3AR0VE6nw==",
503
+ "version": "0.5.3",
504
+ "resolved": "https://registry.npmjs.org/@brunosouzas/design-system/-/design-system-0.5.3.tgz",
505
+ "integrity": "sha512-rXyIhEGHXN938hDnXyhvDM49sqygU0XltKzN8GQA6cIiHbiNILCqqbM/svk9Xm1RP6BMQUWRDP8oPgxbw65Jpw==",
506
506
  "license": "Apache-2.0",
507
507
  "bin": {
508
508
  "brunosouzas-cover": "dist/scripts/cover.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brunosouzas/stackledger",
3
- "version": "0.5.1",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "description": "Govern your software stack and licences, drawn as a metro map",
6
6
  "keywords": [
@@ -41,7 +41,7 @@
41
41
  "test:perf": "vitest run --config vitest.perf.config.ts"
42
42
  },
43
43
  "dependencies": {
44
- "@brunosouzas/design-system": "0.4.0",
44
+ "@brunosouzas/design-system": "0.5.3",
45
45
  "@fontsource/heebo": "5.3.0",
46
46
  "@fontsource/lato": "5.3.0",
47
47
  "@fontsource/signika": "5.3.0",
@@ -3,6 +3,7 @@
3
3
  // pan, line highlight and zone filter. The map SVG has no title band or legend: the line chips are
4
4
  // the legend (buttons that highlight a line) and the symbols are listed under them. Without
5
5
  // JavaScript the whole map and both legends are shown; only the zoom and zone tools stay hidden.
6
+ // Over a city backdrop the OpenStreetMap credit sits right under the frame (catalogue-site, Map backdrop).
6
7
  import Base from '../../layouts/Base.astro';
7
8
  import Themed from '../../components/Themed.astro';
8
9
  import { site } from '../../lib/site';
@@ -41,6 +42,13 @@ const { lines, zones, symbols } = site.map;
41
42
  <div class="map-frame" data-map>
42
43
  <Themed light={site.map.light} dark={site.map.dark} class="map-canvas" />
43
44
  </div>
45
+ {
46
+ site.map.credit && (
47
+ <p class="map-credit">
48
+ Map data © <a href="https://www.openstreetmap.org/copyright" rel="noopener noreferrer">OpenStreetMap contributors</a>
49
+ </p>
50
+ )
51
+ }
44
52
  {
45
53
  lines.length > 0 && (
46
54
  <div class="map-lines" data-map-lines>
@@ -102,6 +102,20 @@
102
102
  outline: 3px solid var(--color-accent);
103
103
  }
104
104
 
105
+ /* catalogue-site "Map backdrop": the OpenStreetMap credit under the frame, in the backdrop credit token,
106
+ readable on a phone (at least 12 pixels). */
107
+ .map-credit {
108
+ margin: 0.4rem 0 0;
109
+ color: var(--color-map-credit);
110
+ font-size: max(0.8125rem, 12px);
111
+ text-align: center;
112
+ }
113
+
114
+ .map-credit a {
115
+ color: inherit;
116
+ text-decoration: underline;
117
+ }
118
+
105
119
  .line-chips {
106
120
  display: flex;
107
121
  flex-wrap: wrap;
@@ -21,6 +21,7 @@
21
21
  --color-text-dark: var(--ds-site-light-text-dark);
22
22
  --color-text-light: var(--ds-site-light-text-light);
23
23
  --color-on-primary: #ffffff;
24
+ --color-map-credit: var(--ds-surface-light-backdrop-credit);
24
25
 
25
26
  --font-primary: var(--ds-site-font-primary);
26
27
  --font-secondary: var(--ds-site-font-secondary);
@@ -60,6 +61,7 @@
60
61
  --color-text-dark: var(--ds-site-dark-text-dark);
61
62
  --color-text-light: var(--ds-site-dark-text-light);
62
63
  --color-on-primary: #040404;
64
+ --color-map-credit: var(--ds-surface-dark-backdrop-credit);
63
65
 
64
66
  /* On a dark page the ink outline gets a light rim and the shadow turns indigo, as on the map. */
65
67
  --frame-shadow: 0 0 0 var(--ds-surface-dark-rim-width) var(--ds-surface-dark-rim), var(--ds-shadow-small) var(--ds-shadow-small) 0 var(--ds-surface-dark-shadow);
@@ -80,6 +82,7 @@
80
82
  --color-text-dark: var(--ds-site-dark-text-dark);
81
83
  --color-text-light: var(--ds-site-dark-text-light);
82
84
  --color-on-primary: #040404;
85
+ --color-map-credit: var(--ds-surface-dark-backdrop-credit);
83
86
 
84
87
  --frame-shadow: 0 0 0 var(--ds-surface-dark-rim-width) var(--ds-surface-dark-rim), var(--ds-shadow-small) var(--ds-shadow-small) 0 var(--ds-surface-dark-shadow);
85
88
  --frame-pressed: 0 0 0 var(--ds-surface-dark-rim-width) var(--ds-surface-dark-rim);
@@ -130,7 +130,7 @@ Two stations cannot share a cell. A stop without a position, or a position for a
130
130
 
131
131
  1. On the Mac: `node dist/cli.js discover` (read-only; it writes only `~/.stackledger/<machine>/snapshot.json`). Never commit the snapshot: it holds the user name and paths.
132
132
  2. `node dist/cli.js drift /path/to/catalogue --format json` and read the object:
133
- - `notDeclared`: each entry's `annotation` is the line to add, for example `stackledger/cask: northwind-editor`. When `suggestedComponents` is not empty, add the annotation to those components (an app their cask installs). An entry with `note: cannot be annotated` cannot be matched; mention it, do not work around it.
133
+ - `notDeclared`: each entry's `annotation` is the line to add, for example `stackledger/cask: northwind-editor`. When `suggestedComponents` is not empty, add the annotation to those components (an app their cask installs). An entry with `note: cannot be annotated` cannot be matched; mention it, do not work around it. For a launchd entry, `program` and `script` say what the job runs (`script` is the file an interpreter such as `python3` or `bash` runs); use them to find what the job belongs to, and never copy them into a component. A launchd entry with scope `app-agent`, `app-daemon` or `app-login-item` is a helper an app declares (it may not be enabled); its `suggestedComponents` name the app's component, which is where its `stackledger/launchd` annotation goes.
134
134
  - `missing`: a component lists something not installed. Ask whether it was removed (its `lifecycle` may need to change) or the identifier is wrong; `incomplete: true` means the source skipped some entries, so it may be installed after all.
135
135
  - `notChecked`: the source was skipped or failed on that Mac. Conclude nothing.
136
136
  - `shared`: two components claim one item; `validate` warns too. Ask which one owns it.