@topolo/cli 0.6.4 → 0.6.6

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/README.md CHANGED
@@ -109,9 +109,13 @@ this too:
109
109
 
110
110
  ```bash
111
111
  topolo actions call app_topolo_mail.messages.send --data '{"mailboxId":"primary","subject":"Hello"}' --confirm
112
+ topolo actions upload app_topolo_brand.brand_assets.upload --file ./logo.png --data '{"assetId":"asset_1"}' --confirm
113
+ topolo actions upload app_topolo_chat.uploads.request --file ./launch.mp4 --data '{}' --complete-data '{"conversationKind":"channel","conversationId":"channel_1"}' --confirm
112
114
  topolo api mail POST /api/mail/mailboxes/primary/messages --data '{"subject":"Hello"}' --confirm
113
115
  ```
114
116
 
117
+ `actions upload` requires the resolved action to publish an upload contract. It reads the file, infers common MIME types or accepts `--content-type`, then follows either the declared inline-base64 mapping or the complete initiate/upload/finish URL-session flow. `--complete-data` supplies only fields required by a declared completion action; the upload/session id is mapped from the initiation response by contract.
118
+
115
119
  ## Commands
116
120
 
117
121
  ### `topolo whoami`
@@ -483,7 +483,9 @@ function emitBindings(lines, bindings, env) {
483
483
  lines.push(`binding = ${tomlString(d.binding)}`);
484
484
  lines.push(`database_name = ${tomlString(cfg.databaseName)}`);
485
485
  if (cfg.databaseId) lines.push(`database_id = ${tomlString(cfg.databaseId)}`);
486
- if (d.migrationsDir) lines.push(`migrations_dir = ${tomlString(d.migrationsDir)}`);
486
+ if (d.manageMigrations !== false && d.migrationsDir) {
487
+ lines.push(`migrations_dir = ${tomlString(d.migrationsDir)}`);
488
+ }
487
489
  lines.push('');
488
490
  }
489
491
  for (const r of bindings.r2 || []) {
@@ -656,7 +658,11 @@ function emitCloudcontrol() {
656
658
  const reportedHost = host || publicUrlHost(t, env);
657
659
  const reportedRoutes = routes.length ? routes : (host ? [host] : []);
658
660
  const d1Migrations = (t.bindings?.d1 || [])
659
- .filter((binding) => bindingAppliesToEnv(binding, env) && binding[env])
661
+ .filter((binding) => (
662
+ bindingAppliesToEnv(binding, env)
663
+ && binding[env]
664
+ && binding.manageMigrations !== false
665
+ ))
660
666
  .map((binding) => ({
661
667
  binding: binding.binding,
662
668
  ...(binding.migrationsDir || binding.migrations_dir
@@ -687,7 +693,7 @@ function emitCloudcontrol() {
687
693
  ...(Array.isArray(t.requiredSecrets) && t.requiredSecrets.length
688
694
  ? { required_secrets: t.requiredSecrets }
689
695
  : {}),
690
- ...(d1Migrations.length ? { migrations: { d1: d1Migrations } } : {}),
696
+ ...(t.bindings?.d1?.length ? { migrations: { d1: d1Migrations } } : {}),
691
697
  ...preservedCloudControlFields,
692
698
  });
693
699
  }