@zukhruf/launchd 0.8.19 → 0.8.20

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 (2) hide show
  1. package/README.md +5 -7
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # @zukhruf/launchd
2
2
 
3
- > Status: design for review.
4
-
5
3
  launchd starts and stops the daemons and agents of macOS. A program that must run with no terminal, at login, on a schedule, or again after a crash, gives launchd a job: a property list file in the format of launchd.plist(5). `launchctl` loads the job into a domain, and launchd runs it as a service. Each program that does this must answer the same questions. Which domain is right? Which subcommands of `launchctl` are right, now that Apple calls `load` and `unload` legacy? How does a changed job replace the service that runs? When has launchd let go of the old service? What does each exit code of `launchctl` mean? This package answers them once.
6
4
 
7
5
  It runs `/bin/launchctl` with the current subcommands of launchctl(1): `bootstrap`, `bootout`, `enable`, `disable`, `kickstart`, `kill` and `print` ([ADR 0001](./docs/adr/0001-launchctl-is-the-interface-and-only-its-current-subcommands.md)). A job is a TypeScript type with the keys of launchd.plist(5), in Apple's names ([ADR 0002](./docs/adr/0002-a-job-is-the-typed-launchd-plist-with-apples-key-names.md)). The package depends on `@zukhruf/async`, `@zukhruf/fs` and `plist`. It works only on macOS.
@@ -666,8 +664,8 @@ Each `launchctl` below is `/bin/launchctl`, started with `execFile` and no shell
666
664
 
667
665
  The package leads. Each repository below changes to fit it, with no adapter. Each change is a backlog item in that repository.
668
666
 
669
- | Repository | Change | Backlog |
670
- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
671
- | context-compiler `apps/cli/src/background-watch.ts` | `BackgroundWatch` moves onto the package: `Launchd.agents()`, `install()` in place of `plutil` and its own bootout loop, and `uninstall()`. The job file becomes mode `0644`, so the Google client secret leaves it first (#4280). The end-to-end test (`apps/cli/src/cli.e2e.test.ts:4211-4330`) reads `state()` in place of its own parse of `print`. | context-compiler #4441, after #4280 |
672
- | mac-cleanup `src/tasks/macos/launch-agents.ts` | `assertNotLoaded` reads `launchd.service(label).state()` in place of `launchctl print` and its check of 113, and its advice names `service.target`. It still reads the job files of other programs itself. Its tests (`test/learned.test.ts:476-532, 847-872`) change with it. | mac-cleanup #4442 |
673
- | agent-plugin | The nightly job of backlog #3821, with `StartCalendarInterval`, uses `install()` when it is built. | agent-plugin #3821 |
667
+ | Repository | Change | Backlog |
668
+ | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
669
+ | context-compiler `apps/cli/src/background-watch.ts` | Done (abada22): `BackgroundWatch` runs on the package. `sync watch start` is `install()`, `sync watch restart` is `kickstart({ kill: true })` and `sync watch stop` is `uninstall()`; the hand-written `plutil` render and bootout loop are gone. The job file holds only `HOME`, because the Google client moved to `client_secret.json` (#4280). The end-to-end tests read `state()` and reuse fixed labels (#4467). | context-compiler #4441, #4280, #4467 |
670
+ | mac-cleanup `src/tasks/macos/launch-agents.ts` | Done (efa7a70): `assertNotLoaded` reads `launchd.service(label).state()` in place of `launchctl print` and its check of 113, and its advice names `service.target`. A label that is not one file name keeps its plist with a note. It still reads the job files of other programs itself. | mac-cleanup #4442 |
671
+ | agent-plugin | The nightly job of backlog #3821, with `StartCalendarInterval`, uses `install()` when it is built. | agent-plugin #3821 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zukhruf/launchd",
3
- "version": "0.8.19",
3
+ "version": "0.8.20",
4
4
  "description": "Install the jobs of launchd, the service manager of macOS, from a job typed with the key names of launchd.plist(5), and drive their services with the current subcommands of launchctl. After Homebrew services and nix-darwin, on /bin/launchctl.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -42,11 +42,11 @@
42
42
  "access": "public"
43
43
  },
44
44
  "dependencies": {
45
- "@zukhruf/async": "^0.8.19",
46
- "@zukhruf/fs": "^0.8.19",
45
+ "@zukhruf/async": "^0.8.20",
46
+ "@zukhruf/fs": "^0.8.20",
47
47
  "plist": "^5.1.1"
48
48
  },
49
49
  "devDependencies": {
50
- "@zukhruf/testing": "^0.8.19"
50
+ "@zukhruf/testing": "^0.8.20"
51
51
  }
52
52
  }