create-trokky 0.1.1 → 0.1.2

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.
@@ -60,17 +60,26 @@ export interface SecretGroup {
60
60
  secrets: Secret[];
61
61
  }
62
62
  /**
63
- * A composition that also exists as a published repository.
63
+ * A composition that also exists as a published project inside the Trokky/templates repository.
64
64
  *
65
65
  * This is what makes one-click deployment possible at all: Cloudflare's Deploy button takes a
66
66
  * public repo URL, and a bundle composed in a browser does not have one. Where a composition
67
67
  * matches a template exactly, the button can serve it; everywhere else it cannot, and saying so
68
68
  * is better than pretending.
69
+ *
70
+ * The repo is shared — one directory per template, `trokky-<id>` for the project name. That is
71
+ * also what keeps adding a template free of new credentials: the deploy button accepts a
72
+ * `/tree/<branch>/<path>` URL and treats that subdirectory as the root of what it deploys (the
73
+ * isolation it asks for — all dependencies inside the directory — is how a generated project
74
+ * is built), and one repo means one deploy key, where GitHub would otherwise refuse the same
75
+ * key across two repositories.
69
76
  */
70
77
  export interface Template {
71
78
  id: string;
72
79
  title: string;
73
80
  repo: string;
81
+ /** The directory inside `repo` this template's project occupies, no slashes. */
82
+ path: string;
74
83
  deployButton: string;
75
84
  composition: Partial<Record<AxisId, string>>;
76
85
  }
package/manifest.json CHANGED
@@ -315,8 +315,9 @@
315
315
  {
316
316
  "id": "magazine",
317
317
  "title": "The magazine template",
318
- "repo": "https://github.com/Trokky/trokky-template",
319
- "deployButton": "https://deploy.workers.cloudflare.com/?url=https://github.com/Trokky/trokky-template",
318
+ "repo": "https://github.com/Trokky/templates",
319
+ "path": "magazine",
320
+ "deployButton": "https://deploy.workers.cloudflare.com/?url=https://github.com/Trokky/templates/tree/main/magazine",
320
321
  "composition": {
321
322
  "target": "workers",
322
323
  "data": "cloudflare-d1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-trokky",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Compose a Trokky project: pick the target, adapters and parts you want.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -49,6 +49,7 @@
49
49
  "devDependencies": {
50
50
  "@types/node": "^22.0.0",
51
51
  "aws4fetch": "^1.0.20",
52
+ "s3rver": "^3.7.1",
52
53
  "typescript": "^5.6.0",
53
54
  "vitest": "^3.2.4"
54
55
  },