Skip to content

Commit 9d6bae6

Browse files
MattDHillclaude
andcommitted
docs: sync package-template with latest hello-world, plus template fixes
- bump start-sdk 1.5.2 → 1.5.3 (package.json, lockfile) - s9pk.mk: install deps with npm ci only; drop lockfile-regen rule - set version 1.0.0:0 with "Initial release for StartOS" notes (all locales) - ship startos/interfaces.ts returning an empty list, wired into init - replace MIT LICENSE with a TODO placeholder + matching TODO.md item - expand assets/README.md to explain what belongs in assets/ Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 95b9ee0 commit 9d6bae6

9 files changed

Lines changed: 46 additions & 43 deletions

File tree

packaging/package-template/LICENSE

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,2 @@
1-
MIT License
2-
3-
Copyright (c) 2024 Start9 Labs
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
1+
TODO: Replace this file with your package's license, and set the matching
2+
`license` field in startos/manifest/index.ts.

packaging/package-template/TODO.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ them, and add items when you defer work.
1212

1313
- [ ] `startos/manifest/index.ts`: fill in `packageRepo`, `upstreamRepo`, and
1414
`marketingUrl` / `donationUrl` (or remove the latter two). Confirm the `license`.
15+
- [ ] Replace the placeholder `LICENSE` file with your package's license, matching the
16+
`license` field in `startos/manifest/index.ts`.
1517
- [ ] `startos/manifest/i18n.ts`: write the short and long descriptions, then translate
1618
them into the other locales.
1719
- [ ] Replace `icon.svg` with a real {{name}} icon (≤ 40 KiB).
@@ -28,9 +30,9 @@ them, and add items when you defer work.
2830
- [ ] `startos/main.ts`: define the daemon(s) and any oneshots. Enable the commented-out
2931
`ready` health check (or add a standalone one), and add its strings to
3032
`startos/i18n/dictionaries` — only the keys actually referenced should remain there.
31-
- [ ] Interfaces: the barebones template ships none. If the service exposes a network
32-
interface, add `startos/interfaces.ts` (`setupInterfaces`) and wire its `setInterfaces`
33-
into `startos/init/index.ts` (see `start-docs/packaging/src/interfaces.md`).
33+
- [ ] Interfaces: `startos/interfaces.ts` ships wired into `startos/init/index.ts` but
34+
returns an empty list. If the service exposes a network interface, bind a port and
35+
export the interface there (see `start-docs/packaging/src/interfaces.md`).
3436
- [ ] `startos/backups.ts`: choose what to back up.
3537
- [ ] `startos/dependencies.ts`: declare any dependencies (or confirm none).
3638
- [ ] `startos/actions/`: add user-facing actions / config as needed.
Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
1-
Use the `/assets` directory to include additional files or scripts needed by your service.
1+
# assets/
2+
3+
Supplementary files that ship inside the `.s9pk` alongside your compiled code —
4+
anything the service needs at runtime that isn't part of the upstream image.
5+
Typical contents:
6+
7+
- entrypoint or wrapper scripts the daemon execs,
8+
- configuration templates / generators,
9+
- static files (default configs, seed data, certificates),
10+
- an `ABOUT.md` or other docs you want bundled.
11+
12+
To make these files visible inside a container, mount them in `startos/main.ts`
13+
with `sdk.Mounts.…mountAssets(…)` and exec against the mountpoint (see the
14+
Volume Mounts section of `start-docs/packaging/src/main.md`).
15+
16+
This directory is **required and must not be empty** — the build fails and git
17+
won't track an empty directory. This README satisfies that requirement, so don't
18+
delete it unless you're adding real assets to replace it.

packaging/package-template/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packaging/package-template/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"check": "tsc --noEmit"
77
},
88
"dependencies": {
9-
"@start9labs/start-sdk": "1.5.2"
9+
"@start9labs/start-sdk": "1.5.3"
1010
},
1111
"devDependencies": {
1212
"@types/node": "^22.19.0",

packaging/package-template/s9pk.mk

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,9 @@ javascript/index.js: $(shell find startos -type f) tsconfig.json node_modules
130130
npm run check
131131
npm run build
132132

133-
node_modules: package-lock.json
133+
node_modules: package-lock.json package.json
134134
npm ci
135135

136-
package-lock.json: package.json
137-
npm i
138-
139136
clean:
140137
@echo "Cleaning up build artifacts..."
141138
@rm -rf $(PACKAGE_ID).s9pk $(PACKAGE_ID)_x86_64.s9pk $(PACKAGE_ID)_aarch64.s9pk $(PACKAGE_ID)_riscv64.s9pk javascript node_modules

packaging/package-template/startos/init/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import { sdk } from '../sdk'
22
import { setDependencies } from '../dependencies'
3+
import { setInterfaces } from '../interfaces'
34
import { versionGraph } from '../versions'
45
import { actions } from '../actions'
56
import { restoreInit } from '../backups'
67

7-
// This package defines no interfaces, so `setInterfaces` is omitted. When you
8-
// add startos/interfaces.ts, import its `setInterfaces` and insert it here,
9-
// conventionally before `setDependencies`.
108
export const init = sdk.setupInit(
119
restoreInit,
1210
versionGraph,
11+
setInterfaces,
1312
setDependencies,
1413
actions,
1514
)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { sdk } from './sdk'
2+
3+
// This package exposes no network interfaces, so it returns an empty list. To
4+
// add one, bind a port with a host (e.g. `sdk.MultiHost.of(...)`), create an
5+
// interface with `sdk.createInterface`, export it, and return its receipt(s)
6+
// here. See start-docs/packaging/src/interfaces.md.
7+
export const setInterfaces = sdk.setupInterfaces(async () => [])

packaging/package-template/startos/versions/current.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { IMPOSSIBLE, VersionInfo } from '@start9labs/start-sdk'
22

33
export const current = VersionInfo.of({
4-
version: '2.0.0:6',
4+
version: '1.0.0:0',
55
releaseNotes: {
6-
en_US: 'Bumps start-sdk → 1.5.2.',
7-
es_ES: 'Actualiza start-sdk → 1.5.2.',
8-
de_DE: 'Aktualisiert start-sdk → 1.5.2.',
9-
pl_PL: 'Aktualizuje start-sdk → 1.5.2.',
10-
fr_FR: 'Met à jour start-sdk → 1.5.2.',
6+
en_US: 'Initial release for StartOS',
7+
es_ES: 'Lanzamiento inicial para StartOS',
8+
de_DE: 'Erstveröffentlichung für StartOS',
9+
pl_PL: 'Pierwsze wydanie dla StartOS',
10+
fr_FR: 'Version initiale pour StartOS',
1111
},
1212
migrations: {
1313
up: async ({ effects }) => {},

0 commit comments

Comments
 (0)