saasaloy 0.6.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 (55) hide show
  1. package/README.md +7 -7
  2. package/dist/index.js +3952 -1899
  3. package/dist/index.js.map +1 -1
  4. package/package.json +2 -1
  5. package/schemas/manifest.schema.json +32 -1
  6. package/schemas/registry-item.schema.json +57 -2
  7. package/schemas/saasaloy-lock.schema.json +9 -0
  8. package/schemas/saasaloy.schema.json +12 -0
  9. package/templates/base/AGENTS.md +86 -19
  10. package/templates/base/README.md +16 -1
  11. package/templates/base/_agents/skills/saasaloy-config/SKILL.md +131 -0
  12. package/templates/base/_agents/skills/saasaloy-deploy/SKILL.md +280 -0
  13. package/templates/base/_agents/skills/saasaloy-env/SKILL.md +8 -7
  14. package/templates/base/_agents/skills/saasaloy-landing-copy/SKILL.md +10 -9
  15. package/templates/base/_agents/skills/saasaloy-setup/SKILL.md +30 -22
  16. package/templates/base/_agents/skills/saasaloy-testing/SKILL.md +85 -0
  17. package/templates/base/_gitignore +4 -0
  18. package/templates/base/_prettierignore +5 -0
  19. package/templates/base/_saasaloy-base.json +6 -2
  20. package/templates/base/apps/web/package.json +1 -0
  21. package/templates/base/apps/web/src/layouts/Layout.astro +2 -1
  22. package/templates/base/apps/web/src/pages/privacy.astro +2 -0
  23. package/templates/base/apps/web/src/pages/terms.astro +2 -0
  24. package/templates/base/docs/runbook-deploy.md +72 -0
  25. package/templates/base/oxlint.config.mjs +28 -0
  26. package/templates/base/package.json +7 -4
  27. package/templates/base/packages/config/package.json +19 -0
  28. package/templates/base/packages/config/src/define.test.ts +134 -0
  29. package/templates/base/packages/config/src/define.ts +135 -0
  30. package/templates/base/packages/config/src/index.ts +34 -0
  31. package/templates/base/packages/config/src/project.ts +25 -0
  32. package/templates/base/packages/config/src/sections/app.ts +27 -0
  33. package/templates/base/packages/config/src/sections.ts +22 -0
  34. package/templates/base/packages/config/tsconfig.json +4 -0
  35. package/templates/base/packages/env/package.json +2 -1
  36. package/templates/base/packages/env/src/deploy.ts +3 -2
  37. package/templates/base/packages/env/src/services.test.ts +27 -11
  38. package/templates/base/packages/tooling/package.json +21 -0
  39. package/templates/base/packages/tooling/src/deploy-production.test.ts +923 -0
  40. package/templates/base/packages/tooling/src/deploy-production.ts +1041 -0
  41. package/templates/base/packages/tooling/src/deploy.config.ts +30 -0
  42. package/templates/base/packages/tooling/src/link-skills.test.ts +126 -0
  43. package/templates/base/packages/tooling/src/link-skills.ts +142 -0
  44. package/templates/base/packages/tooling/src/release.test.ts +205 -0
  45. package/templates/base/packages/tooling/src/release.ts +228 -0
  46. package/templates/base/packages/tooling/src/targets.ts +38 -0
  47. package/templates/base/packages/tooling/src/types.ts +78 -0
  48. package/templates/base/packages/tooling/tsconfig.json +11 -0
  49. package/templates/base/packages/ui/package.json +1 -0
  50. package/templates/base/packages/ui/src/blocks/footer.tsx +5 -3
  51. package/templates/base/packages/ui/src/content/landing.ts +2 -4
  52. package/templates/base/packages/ui/src/index.ts +10 -5
  53. package/templates/base/saasaloy.json +2 -1
  54. package/templates/base/turbo.json +1 -5
  55. package/templates/base/vitest.config.ts +5 -1
@@ -37,14 +37,21 @@ addService({
37
37
  omit: ["DATABASE_URL"],
38
38
  });
39
39
 
40
+ // A module appends its own row (`saasaloy add admin` adds `admin`), so these tests never
41
+ // pin the whole table. They check the rows the base seeds and the two added above, and
42
+ // derive anything else from the table itself.
40
43
  describe("the service table", () => {
41
44
  it("seeds web and deploy, and takes the rows a const-array patch appends", () => {
42
- assert.deepEqual(serviceNames().toSorted(), [
43
- "api",
44
- "deploy",
45
- "ops",
46
- "web",
47
- ]);
45
+ const names = serviceNames();
46
+ for (const name of ["web", "deploy", "api", "ops"]) {
47
+ assert.ok(names.includes(name), `${name} is in the table`);
48
+ }
49
+ assert.equal(
50
+ new Set(names).size,
51
+ names.length,
52
+ "no service is listed twice"
53
+ );
54
+ assert.equal(findService("web")?.file, "apps/web/.env");
48
55
  assert.equal(findService("ops")?.file, "ops/.env");
49
56
  assert.equal(findService("deploy")?.file, undefined);
50
57
  assert.equal(findService("nope"), undefined);
@@ -53,11 +60,20 @@ describe("the service table", () => {
53
60
 
54
61
  describe("selectServices", () => {
55
62
  it("writes every dev service when nothing is named", () => {
56
- assert.deepEqual(
57
- selectServices("dev")
58
- .map((service) => service.name)
59
- .toSorted(),
60
- ["api", "web"]
63
+ const selected = selectServices("dev").map((service) => service.name);
64
+ const expected = SERVICES.filter(
65
+ (service) => service.environment === "dev" && service.file !== undefined
66
+ ).map((service) => service.name);
67
+ assert.deepEqual(selected.toSorted(), expected.toSorted());
68
+ assert.ok(selected.includes("web"));
69
+ assert.ok(selected.includes("api"));
70
+ assert.ok(
71
+ !selected.includes("ops"),
72
+ "a prod service is never a dev default"
73
+ );
74
+ assert.ok(
75
+ !selected.includes("deploy"),
76
+ "a row with no file is never written"
61
77
  );
62
78
  });
63
79
 
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@repo/tooling",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "clean": "rimraf -g dist \"*.tsbuildinfo\"",
8
+ "typecheck": "tsc --noEmit"
9
+ },
10
+ "dependencies": {
11
+ "@release-it/conventional-changelog": "12.0.0",
12
+ "@repo/env": "workspace:*",
13
+ "release-it": "21.0.2"
14
+ },
15
+ "devDependencies": {
16
+ "@repo/tsconfig": "workspace:*",
17
+ "@types/node": "26.4.1",
18
+ "rimraf": "6.1.3",
19
+ "typescript": "7.0.2"
20
+ }
21
+ }