@blotout/qinto-cli 0.1.3 → 0.1.4

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.
@@ -15471,6 +15471,23 @@ var buildStartWorkflow = (stamp) => {
15471
15471
  return workflow.create({ ...options, params: stampParams(stamp, params) });
15472
15472
  };
15473
15473
  };
15474
+ var buildUiStartWorkflow = (subject, installs) => {
15475
+ return async (workflow, params, options) => {
15476
+ const target = installs.find((install) => {
15477
+ return install.id === options?.installId;
15478
+ });
15479
+ if (options?.installId !== void 0) {
15480
+ if (target === void 0) {
15481
+ throw new Error(`No install ${options.installId} on this site.`);
15482
+ }
15483
+ if (!target.enabled) {
15484
+ throw new Error(`Install ${options.installId} is not enabled on this site.`);
15485
+ }
15486
+ }
15487
+ const stamp = target === void 0 ? subject : { ...subject, ord: target.ord, installId: target.id, installLabel: target.label };
15488
+ return workflow.create({ id: options?.id, params: stampParams(stamp, params) });
15489
+ };
15490
+ };
15474
15491
  var readStamp = (payload) => {
15475
15492
  const params = payload;
15476
15493
  const stamp = params?.q;
@@ -16140,12 +16157,10 @@ var dispatchUi = async ({ request, env, versions }) => {
16140
16157
  installs: projectAllInstallValues(maps, variableKinds, context.installs),
16141
16158
  settings: buildSettings({ env, ticket: context.writeTicket }),
16142
16159
  // The panel's viewer is a portal user, not a visitor, so a workflow it starts carries no subject.
16143
- startWorkflow: buildStartWorkflow({
16144
- ord: context.install.ord,
16145
- installId: context.install.id,
16146
- installLabel: context.install.label,
16147
- anonId: null
16148
- }),
16160
+ startWorkflow: buildUiStartWorkflow(
16161
+ { ord: context.install.ord, installId: context.install.id, installLabel: context.install.label, anonId: null },
16162
+ context.installs
16163
+ ),
16149
16164
  variables,
16150
16165
  secrets,
16151
16166
  appVariables,
@@ -20467,7 +20467,7 @@ var authorizeUi = /* @__PURE__ */ __name(async (c, slug, origin) => {
20467
20467
  }
20468
20468
  const install = app2.installs.find((entry) => (entry.enabled ?? entry.active) && entry.id === verdict.claims.appInstallId);
20469
20469
  if (install === void 0) {
20470
- return refuse2(origin, 403, "forbidden");
20470
+ return refuse2(origin, 401, "token_stale");
20471
20471
  }
20472
20472
  const method = c.req.method;
20473
20473
  const writing = method !== "GET" && method !== "HEAD";
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "main": {
3
3
  "version": "0.1.0",
4
- "gitSha": "a9087748d1cdf6fa9b590b05ebc66ffd48da563e",
5
- "builtAt": "2026-08-25T06:38:11.817Z",
4
+ "gitSha": "831251f361f57a3792c7b65f1c6a3689b0e8519e",
5
+ "builtAt": "2026-08-25T18:19:08.518Z",
6
6
  "compatibilityDate": "2026-06-23",
7
7
  "compatibilityFlags": [
8
8
  "nodejs_compat"
@@ -40,8 +40,8 @@
40
40
  },
41
41
  "app-runtime": {
42
42
  "version": "0.1.0",
43
- "gitSha": "3aabe60a32914ac6facb6f28b3d21218918de80b",
44
- "builtAt": "2026-08-24T16:10:29.698Z",
43
+ "gitSha": "831251f361f57a3792c7b65f1c6a3689b0e8519e",
44
+ "builtAt": "2026-08-25T18:07:48.888Z",
45
45
  "compatibilityDate": "2026-06-23",
46
46
  "compatibilityFlags": [
47
47
  "nodejs_compat"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotout/qinto-cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "description": "Qinto CLI: authenticate against the Qinto platform and operate it from the terminal or from an agent.",
6
6
  "repository": {
@@ -29,7 +29,7 @@
29
29
  ...context.installs.map((install) => {
30
30
  const option = document.createElement('option')
31
31
  option.value = install.id
32
- option.textContent = install.id === context.appInstallId ? `${install.label} (this panel)` : install.label
32
+ option.textContent = install.enabled ? install.label : `${install.label} (disabled)`
33
33
  return option
34
34
  })
35
35
  )