@fabrika/cli 0.8.1 → 0.8.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.
Files changed (2) hide show
  1. package/package.json +12 -12
  2. package/src/control.ts +10 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabrika/cli",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,19 +30,19 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "zod": "^3.25.76",
33
- "@fabrika/app": "0.8.1",
34
- "@fabrika/auth-core": "0.8.1",
35
- "@fabrika/control-contract": "0.8.1",
36
- "@fabrika/provider-contract": "0.8.1",
37
- "@fabrika/db": "0.8.1",
38
- "@fabrika/platform": "0.8.1",
39
- "@fabrika/platform-node": "0.8.1",
40
- "@fabrika/check": "0.8.1"
33
+ "@fabrika/app": "0.8.2",
34
+ "@fabrika/auth-core": "0.8.2",
35
+ "@fabrika/control-contract": "0.8.2",
36
+ "@fabrika/provider-contract": "0.8.2",
37
+ "@fabrika/db": "0.8.2",
38
+ "@fabrika/platform": "0.8.2",
39
+ "@fabrika/platform-node": "0.8.2",
40
+ "@fabrika/check": "0.8.2"
41
41
  },
42
42
  "peerDependencies": {
43
- "@fabrika/builder": "0.8.1",
44
- "@fabrika/provider-cloudflare": "0.8.1",
45
- "@fabrika/provider-zerops": "0.8.1"
43
+ "@fabrika/builder": "0.8.2",
44
+ "@fabrika/provider-cloudflare": "0.8.2",
45
+ "@fabrika/provider-zerops": "0.8.2"
46
46
  },
47
47
  "peerDependenciesMeta": {
48
48
  "@fabrika/builder": {
package/src/control.ts CHANGED
@@ -125,6 +125,11 @@ Namespace placement options, each defaulting to what the preset would choose:
125
125
  SERIOUS is a deliberate choice: a project cannot be downgraded again
126
126
  --public-access=<custom-domain|zerops-subdomain>
127
127
  --exclusive-app=<id> required by, and only by, the \`full\` preset
128
+ --postgres-type=<type> the \`cheap\` preset's shared PostgreSQL; on Zerops postgresql:single@18
129
+ (default) or postgresql:ha@18, which keeps its data through a node loss.
130
+ Fixed once created
131
+ --postgres-profile=<profile> its profile, given together with --postgres-type: oltp-hobby for single,
132
+ oltp-staging (about $11) or oltp-production (about $72) for HA
128
133
 
129
134
  \`namespaces plan\` is a preview and changes nothing. It prints one \`<path>\\t<value>\` row per field of
130
135
  the plan, keyed by its path in \`--json\`; a multi-line value such as the proxy's descriptor file is shown
@@ -826,6 +831,11 @@ const namespacePlan = (flags: Flags): PlanDeploymentNamespaceRequest => {
826
831
  if (project !== undefined) options['projectName'] = project
827
832
  if (corePackage !== undefined) options['corePackage'] = corePackage
828
833
  if (publicAccess !== undefined) options['publicAccess'] = publicAccess
834
+ const postgresType = optional(flags, 'postgres-type')
835
+ const postgresProfile = optional(flags, 'postgres-profile')
836
+ // Together or not at all: a type without a profile gets the platform's default, which for HA is the dedicated ~$72 one.
837
+ if ((postgresType === undefined) !== (postgresProfile === undefined)) throw new Error('--postgres-type and --postgres-profile go together')
838
+ if (postgresType !== undefined && postgresProfile !== undefined) options['postgres'] = { type: postgresType, profile: postgresProfile }
829
839
  return {
830
840
  id: required(flags, 'namespace'),
831
841
  env: required(flags, 'env'),