@diagonal-hq/cli 0.41.8 → 0.42.1

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/dist/cli.mjs CHANGED
@@ -9297,11 +9297,16 @@ function triggerOf(trigger, references2) {
9297
9297
  if (domain !== null && (typeof domain !== "string" || domain === "")) {
9298
9298
  throw new SourceError('"trigger.domain" must be a domain key or null.');
9299
9299
  }
9300
+ const apiDocs = trigger.apiDocs ?? true;
9301
+ if (typeof apiDocs !== "boolean") {
9302
+ throw new SourceError('"trigger.apiDocs" must be true, false, or null.');
9303
+ }
9300
9304
  return {
9301
9305
  type: "request",
9302
9306
  path: path.startsWith("/") ? path : `/${path}`,
9303
9307
  method,
9304
- ...domain === null ? {} : { domain: references2.domain(domain) }
9308
+ ...domain === null ? {} : { domain: references2.domain(domain) },
9309
+ ...apiDocs ? {} : { apiDocs: false }
9305
9310
  };
9306
9311
  }
9307
9312
  case "scheduled":
@@ -10909,7 +10914,7 @@ async function checkSources() {
10909
10914
  if (existsSync4(DATA_FILE) && existsSync4(SDK_FILE)) {
10910
10915
  return { dataFile: DATA_FILE, sdkFile: SDK_FILE };
10911
10916
  }
10912
- const { checkData, scriptSdk } = await import("./cli-check-data-7TKAM34J.mjs");
10917
+ const { checkData, scriptSdk } = await import("./cli-check-data-3LBUEOMY.mjs");
10913
10918
  return { data: checkData(), sdk: scriptSdk() };
10914
10919
  }
10915
10920
  function isScriptTestPath(path) {
package/dist/index.d.ts CHANGED
@@ -1003,11 +1003,19 @@ export type RequestTrigger = {
1003
1003
  method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
1004
1004
  /**
1005
1005
  * The domain of the workflow, as `Domains.<Name>.key` from `@app/generated/domains`.
1006
- * The workflow answers only on that domain's active hostname, and on no host
1007
- * while the domain has no active hostname. Without `domain`, or on the primary
1008
- * domain, it answers on the primary hostname.
1006
+ * The workflow answers only on that domain's active hostname. While the
1007
+ * domain has no active hostname, a workflow on the primary domain answers on
1008
+ * the assigned workspace host. A workflow on a domain with `fallback: 'primary'`
1009
+ * answers on the primary host. Other bound workflows answer on no host.
1010
+ * Without `domain`, the workflow follows the primary domain.
1009
1011
  */
1010
1012
  domain?: string | null;
1013
+ /**
1014
+ * Whether the generated API docs of the workspace document the endpoint.
1015
+ * `false` leaves it out, for example for an endpoint that only your own cron
1016
+ * job calls. Without `apiDocs`, the docs document it.
1017
+ */
1018
+ apiDocs?: boolean;
1011
1019
  };
1012
1020
 
1013
1021
  export type RecordEventTrigger = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diagonal-hq/cli",
3
- "version": "0.41.8",
3
+ "version": "0.42.1",
4
4
  "description": "The diagonal CLI and the configuration helpers for file-based Diagonal workspaces.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
@@ -51,8 +51,8 @@
51
51
  "bun": "1.4.4"
52
52
  },
53
53
  "optionalDependencies": {
54
- "@diagonal-hq/workflow-script-compiler-darwin-arm64": "0.1.0-h5e67bbdc4685",
55
- "@diagonal-hq/workflow-script-compiler-linux-x64": "0.1.0-h5e67bbdc4685",
56
- "@diagonal-hq/workflow-script-compiler-linux-arm64": "0.1.0-h5e67bbdc4685"
54
+ "@diagonal-hq/workflow-script-compiler-darwin-arm64": "0.1.0-hc493369acda2",
55
+ "@diagonal-hq/workflow-script-compiler-linux-x64": "0.1.0-hc493369acda2",
56
+ "@diagonal-hq/workflow-script-compiler-linux-arm64": "0.1.0-hc493369acda2"
57
57
  }
58
58
  }