create-factory 0.1.0-alpha.8 → 0.1.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,121 @@
1
1
  # create-factory
2
2
 
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Standardized the Factory SPA directory and simplified the generated build script because `mastra build` now packages the prebuilt UI automatically. ([#19948](https://github.com/mastra-ai/mastra/pull/19948))
8
+
9
+ Before:
10
+
11
+ ```json
12
+ { "build": "npm run build:ui && mastra build --dir src/mastra" }
13
+ ```
14
+
15
+ After:
16
+
17
+ ```json
18
+ { "build": "mastra build --dir src/mastra" }
19
+ ```
20
+
21
+ Factory assets now land in `src/mastra/public/factory/` during the build and `.mastra/output/factory/` in the deployable output, replacing the previous `ui/` path.
22
+
23
+ - Added EU and US region selection when creating Factory platform projects, with a --region flag for non-interactive setup. ([#20040](https://github.com/mastra-ai/mastra/pull/20040))
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated the generated project README for the single-server setup: the Factory UI and API are both served from `http://localhost:4111`, OAuth callback instructions use the server origin, and the removed `dev:prod` / `build:ui` scripts are no longer documented. ([#20036](https://github.com/mastra-ai/mastra/pull/20036))
28
+
29
+ - Apply prettier formatting to env.test.ts (post-merge follow-up) ([#19965](https://github.com/mastra-ai/mastra/pull/19965))
30
+
31
+ - Harden .env handling in create-factory: tighten file permissions and skip git init when .env cannot be gitignored ([#19945](https://github.com/mastra-ai/mastra/pull/19945))
32
+
33
+ `.env` files created during scaffolding are now written with `0600` permissions so platform secrets (`MASTRA_PLATFORM_SECRET_KEY`, `DATABASE_URL`) are only readable by the owner. If the scaffolder can't add `.env` to `.gitignore` (e.g. permission denied on `.gitignore`), it now skips `git init` entirely and warns the user, so freshly-minted secrets can't accidentally be committed to the initial commit.
34
+
35
+ - Make the Software Factory template installable and buildable against published packages so the sync-softwarefactory-template workflow can push it again. Three changes to the generation step: ([#20001](https://github.com/mastra-ai/mastra/pull/20001))
36
+
37
+ - Pin every synced Mastra dep to `"alpha"` instead of `"latest"` — the Mastra Factory sources on `main` are built against the alpha release train, and the previous `"latest"` default mixed release trains (worse, `@mastra/factory@latest` is currently an empty stub).
38
+ - Emit `.npmrc` with `legacy-peer-deps=true` so npm accepts the internally-consistent prerelease peer graph (the same relaxation pnpm applies automatically inside the monorepo).
39
+ - Downgrade `typescript` from tsgo (v7) to the classic compiler (`^5.9.2`) in the emitted template. The sources happily typecheck under tsgo, but `mastra build` transitively loads TypeScript via `typescript-paths`, which needs the classic `ts.sys` API tsgo doesn't expose. In the monorepo pnpm hoists classic TypeScript from another workspace package, hiding the problem; the standalone template has no hoist.
40
+
41
+ All three are annotated as temporary in the script and README — remove once the packages ship stable releases and the deployer supports tsgo.
42
+
43
+ - Marked projects created by create-factory as factory-enabled on the Mastra platform. ([#19973](https://github.com/mastra-ai/mastra/pull/19973))
44
+
45
+ - Changed the create-factory template sync to pin every Mastra dep to `"latest"` instead of `"alpha"`. Scaffolded projects now install the same set of Mastra packages as every other create-mastra template, and no longer ship a `.npmrc` with `legacy-peer-deps=true` (that flag only existed to accommodate the prerelease peer graph). ([#20052](https://github.com/mastra-ai/mastra/pull/20052))
46
+
47
+ - The factory template now ships a pnpm-workspace.yaml with allowBuilds, preventing pnpm v10+ from exiting with ERR_PNPM_IGNORED_BUILDS during install or build. The file mirrors the mastracode/web build-approval policy minus test-only deps stripped by the template. ([#20056](https://github.com/mastra-ai/mastra/pull/20056))
48
+
49
+ - Improved the create-factory sign-in and success experience: ([#20024](https://github.com/mastra-ai/mastra/pull/20024))
50
+
51
+ - When no Mastra platform session exists, the CLI now pauses with "Mastra account is required, press enter to continue..." before opening the browser auth flow instead of opening it unannounced.
52
+ - The success message now summarizes the infrastructure provisioned on Mastra platform (project, Postgres database, credentials in .env), notes that deployed code agent sessions run inside Mastra platform sandboxes, and links to https://projects.mastra.ai for managing the project.
53
+
54
+ - Stopped writing MASTRA_SHARED_API_URL to the scaffolded project's .env during platform provisioning. Platform consumers now use their built-in default platform URL, so scaffolded factories no longer pin the API endpoint at create time. ([#20021](https://github.com/mastra-ai/mastra/pull/20021))
55
+
56
+ - Added the `create-factory` CLI. It scaffolds a Mastra Software Factory project: enter a project name and the CLI clones the template, installs dependencies, and initializes git. Configuration (model providers, integrations, database) happens in the web UI on first load. ([#19609](https://github.com/mastra-ai/mastra/pull/19609))
57
+
58
+ ```bash
59
+ npm create factory my-factory
60
+ cd my-factory
61
+ npm run dev
62
+ ```
63
+
64
+ - Fixed generated Factory projects to serve the UI and API from a single Mastra development server. ([#20019](https://github.com/mastra-ai/mastra/pull/20019))
65
+
66
+ - Stop shipping `pnpm-workspace.yaml` and `package-lock.json` in projects scaffolded by `npm create factory`. The template generator now excludes the web project's pnpm workspace marker and lockfiles, and the sync workflow validates the template in a throwaway copy so `npm install` artifacts can no longer leak into the published template repository. ([#20041](https://github.com/mastra-ai/mastra/pull/20041))
67
+
68
+ - Simplified the create-factory success message: sandboxes now appear as a bullet in the provisioned resources list so users know code agent sessions run inside Mastra platform sandboxes. ([#20062](https://github.com/mastra-ai/mastra/pull/20062))
69
+
70
+ - Fixed generated Software Factory projects missing their required `@mastra/memory` dependency. ([#19878](https://github.com/mastra-ai/mastra/pull/19878))
71
+
72
+ - Added platform sign-in, project creation, and Neon Postgres provisioning to the `create factory` CLI. After scaffolding, the CLI: ([#19945](https://github.com/mastra-ai/mastra/pull/19945))
73
+
74
+ - Signs the user in via the existing Mastra browser-auth flow.
75
+ - Creates a Mastra platform server project in the chosen organization.
76
+ - Mints an `sk_` organization API key scoped to the new factory.
77
+ - Attaches and provisions a Neon Postgres database.
78
+ - Writes `MASTRA_SHARED_API_URL`, `MASTRA_ORGANIZATION_ID`, `MASTRA_PROJECT_ID`, `MASTRA_PLATFORM_SECRET_KEY`, and `DATABASE_URL` to the project's `.env`.
79
+
80
+ The result is a locally-runnable factory that can talk to the Mastra platform on first `npm run dev` without any manual configuration.
81
+
82
+ **New flags:**
83
+
84
+ - `--no-platform` — skip the platform round-trip; useful when iterating on the template offline.
85
+ - `--region <region>` — pass a specific Neon region id through to the platform.
86
+
87
+ - Updated dependencies [[`c03d857`](https://github.com/mastra-ai/mastra/commit/c03d85791d04177bdc6095cef924aec47a440b70), [`91930d6`](https://github.com/mastra-ai/mastra/commit/91930d69ae8146ded10c792387848970f1ca4b59), [`3b77e77`](https://github.com/mastra-ai/mastra/commit/3b77e7704936522e4769d29de1b5ea6901f302bd), [`8c88764`](https://github.com/mastra-ai/mastra/commit/8c88764162b32c8a24b3bf9d1ad2ec535aba5c9a), [`73db8db`](https://github.com/mastra-ai/mastra/commit/73db8db90d69ab6153c7942749f624db0d96952d), [`bfa8c05`](https://github.com/mastra-ai/mastra/commit/bfa8c056fc235f17805f1eb93e738ee81e8a8cb6), [`0182be3`](https://github.com/mastra-ai/mastra/commit/0182be35cd402209182097098e7ebc07a5a54a2a), [`c9de100`](https://github.com/mastra-ai/mastra/commit/c9de10008ff3f72911bf746294004c305674d855), [`0a50de7`](https://github.com/mastra-ai/mastra/commit/0a50de7024816171701e81ac3b69434cf5a302ea), [`f2e0c72`](https://github.com/mastra-ai/mastra/commit/f2e0c72fa27555bc59c0322b6398e7a6d990d679), [`471e34c`](https://github.com/mastra-ai/mastra/commit/471e34c399410c380d07c03abf7d3bbf2de736e0), [`7eb2707`](https://github.com/mastra-ai/mastra/commit/7eb2707cc388f929a38562fecb075064aed71d44), [`471e34c`](https://github.com/mastra-ai/mastra/commit/471e34c399410c380d07c03abf7d3bbf2de736e0), [`3b77e77`](https://github.com/mastra-ai/mastra/commit/3b77e7704936522e4769d29de1b5ea6901f302bd), [`40ae860`](https://github.com/mastra-ai/mastra/commit/40ae860a674e7ee383a02c1f990d1e050619d5e4), [`471e34c`](https://github.com/mastra-ai/mastra/commit/471e34c399410c380d07c03abf7d3bbf2de736e0), [`f2e0c72`](https://github.com/mastra-ai/mastra/commit/f2e0c72fa27555bc59c0322b6398e7a6d990d679), [`c328769`](https://github.com/mastra-ai/mastra/commit/c3287698ff8ef98dba86d415faa566fa3e5f4d56), [`471e34c`](https://github.com/mastra-ai/mastra/commit/471e34c399410c380d07c03abf7d3bbf2de736e0), [`471e34c`](https://github.com/mastra-ai/mastra/commit/471e34c399410c380d07c03abf7d3bbf2de736e0), [`51f62f0`](https://github.com/mastra-ai/mastra/commit/51f62f0f8ae3906a4b46ceb987f19c8245563cfa), [`20b159d`](https://github.com/mastra-ai/mastra/commit/20b159d8f5d8153493ec8d5b6cd2864af8ce2c8e)]:
88
+ - mastra@1.20.0
89
+
90
+ ## 0.1.0-alpha.12
91
+
92
+ ### Patch Changes
93
+
94
+ - Updated dependencies [[`bfa8c05`](https://github.com/mastra-ai/mastra/commit/bfa8c056fc235f17805f1eb93e738ee81e8a8cb6)]:
95
+ - mastra@1.20.0-alpha.18
96
+
97
+ ## 0.1.0-alpha.11
98
+
99
+ ### Patch Changes
100
+
101
+ - Updated dependencies [[`c9de100`](https://github.com/mastra-ai/mastra/commit/c9de10008ff3f72911bf746294004c305674d855), [`20b159d`](https://github.com/mastra-ai/mastra/commit/20b159d8f5d8153493ec8d5b6cd2864af8ce2c8e)]:
102
+ - mastra@1.20.0-alpha.17
103
+
104
+ ## 0.1.0-alpha.10
105
+
106
+ ### Patch Changes
107
+
108
+ - Changed the create-factory template sync to pin every Mastra dep to `"latest"` instead of `"alpha"`. Scaffolded projects now install the same set of Mastra packages as every other create-mastra template, and no longer ship a `.npmrc` with `legacy-peer-deps=true` (that flag only existed to accommodate the prerelease peer graph). ([#20052](https://github.com/mastra-ai/mastra/pull/20052))
109
+
110
+ - Updated dependencies [[`91930d6`](https://github.com/mastra-ai/mastra/commit/91930d69ae8146ded10c792387848970f1ca4b59)]:
111
+ - mastra@1.20.0-alpha.16
112
+
113
+ ## 0.1.0-alpha.9
114
+
115
+ ### Patch Changes
116
+
117
+ - Simplified the create-factory success message: sandboxes now appear as a bullet in the provisioned resources list so users know code agent sessions run inside Mastra platform sandboxes. ([#20062](https://github.com/mastra-ai/mastra/pull/20062))
118
+
3
119
  ## 0.1.0-alpha.8
4
120
 
5
121
  ### Patch Changes
package/dist/index.js CHANGED
@@ -506,8 +506,8 @@ You can retry manually: cd ${projectName} && ${packageManager} install`
506
506
  `${color.green("Provisioned on Mastra platform")} in ${color.cyan(platformResult.orgName)}:`,
507
507
  ` - Project ${color.cyan(platformResult.project.name)}`,
508
508
  ` - Postgres database (credentials written to ${color.cyan(".env")})`,
509
+ ` - Sandboxes (code agent sessions run here)`,
509
510
  "",
510
- "When deployed, code agent sessions run inside Mastra platform sandboxes.",
511
511
  `Manage your project at ${color.underline("https://projects.mastra.ai")}`
512
512
  );
513
513
  } else if (args.noPlatform) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-factory",
3
- "version": "0.1.0-alpha.8",
3
+ "version": "0.1.0",
4
4
  "description": "Create a Mastra Factory project: an agent-powered software delivery environment built on Mastra. Run `npm create factory` to scaffold and get started.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
38
38
  "picocolors": "^1.1.1",
39
39
  "posthog-node": "^5.37.0",
40
40
  "tinyexec": "^1.2.4",
41
- "mastra": "1.20.0-alpha.15"
41
+ "mastra": "1.20.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/node": "22.20.1",
@@ -46,7 +46,7 @@
46
46
  "tsup": "^8.5.1",
47
47
  "typescript": "^6.0.3",
48
48
  "vitest": "4.1.10",
49
- "@internal/lint": "0.0.114"
49
+ "@internal/lint": "0.0.115"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsup --silent --config tsup.config.ts",