@madewithremy/admin 0.1.34 → 0.1.36

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/prod.js CHANGED
@@ -2101,6 +2101,7 @@ async function tailSseToStdout(ctx, apiPath) {
2101
2101
  }
2102
2102
 
2103
2103
  // src/ops/methods.ts
2104
+ var METHOD_RUN_TIMEOUT_MS = 6e5;
2104
2105
  async function list6(ctx) {
2105
2106
  const dashboard = await call(
2106
2107
  ctx,
@@ -2118,7 +2119,13 @@ function invoke(ctx, params) {
2118
2119
  const useImpersonate = impersonate !== void 0 && (impersonate.roles !== void 0 || impersonate.userId !== void 0);
2119
2120
  const apiPath = useImpersonate ? `/_internal/v2/apps/${ctx.appId}/methods/${seg(methodId)}/invoke-as` : `/_internal/v2/apps/${ctx.appId}/methods/${seg(methodId)}/invoke`;
2120
2121
  const body = useImpersonate ? { input, impersonate } : { input };
2121
- return call(ctx, "POST", apiPath, body);
2122
+ return call(
2123
+ ctx,
2124
+ "POST",
2125
+ apiPath,
2126
+ body,
2127
+ METHOD_RUN_TIMEOUT_MS
2128
+ );
2122
2129
  }
2123
2130
 
2124
2131
  // src/commands/methods.ts
@@ -2166,7 +2173,9 @@ async function methodsInvoke(ctx, a) {
2166
2173
  const body = useImpersonate ? { input, impersonate } : { input };
2167
2174
  if (stream) {
2168
2175
  await streamToStdout(ctx, apiPath, { ...body, stream: true });
2169
- } else {
2176
+ return;
2177
+ }
2178
+ try {
2170
2179
  out(
2171
2180
  await invoke(ctx, {
2172
2181
  methodId,
@@ -2174,6 +2183,13 @@ async function methodsInvoke(ctx, a) {
2174
2183
  impersonate: useImpersonate ? impersonate : void 0
2175
2184
  })
2176
2185
  );
2186
+ } catch (err) {
2187
+ if (err instanceof AdminTimeoutError) {
2188
+ fatal(
2189
+ `No answer from ${methodId} within ${METHOD_RUN_TIMEOUT_MS / 6e4} minutes. The method may still be running: \`remy-admin requests list --method ${methodId}\` shows how it ended.`
2190
+ );
2191
+ }
2192
+ throw err;
2177
2193
  }
2178
2194
  }
2179
2195
  var methodsHandlers = {
@@ -5172,7 +5188,7 @@ Bulk ingestion (jobs):
5172
5188
  it; \`jobs approve\` starts the run. Two gates: the corpus has to fit the
5173
5189
  source's placement (a shared-pool source over the per-source cap answers
5174
5190
  plan_requires_dedicated: place it on dedicated capacity first), and the
5175
- workspace has to be able to cover the projection (insufficient_credits).
5191
+ workspace has to be able to cover the projection (insufficient_credits/*).
5176
5192
 
5177
5193
  Options on start:
5178
5194
  --approve Run as soon as the plan passes the gates, no separate approve
@@ -5824,7 +5840,7 @@ Reading documents into the app (readers):
5824
5840
  read more than once, so read() replaces the document's rows as a set,
5825
5841
  keyed by its id, and removed() deletes them. Options on the declaration:
5826
5842
  timeoutMs (per document, default 60000, max 300000) and concurrency
5827
- (frames in flight for the source, default 16, max 64).
5843
+ (documents read at once for the source, default 16, max 64).
5828
5844
 
5829
5845
  The reader always runs against the LIVE release, its code and its
5830
5846
  database: nothing reads until the app publishes one. From then on every
@@ -8908,7 +8924,7 @@ A resource bills by the clock hour at the active rate for every hour it is
8908
8924
  active in, including the hour a resume lands in, and costs nothing while
8909
8925
  hibernated or once destroyed. Provisioning, growing and resuming need a month's
8910
8926
  worth of credits available in the workspace, checked before the request is
8911
- accepted (insufficient_credits); nothing is charged until activation. The
8927
+ accepted (insufficient_credits/*); nothing is charged until activation. The
8912
8928
  provision output prints the price it committed to. Every action below is
8913
8929
  audited.
8914
8930
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@madewithremy/admin",
3
- "version": "0.1.34",
3
+ "version": "0.1.36",
4
4
  "description": "Admin SDK + CLI for managing production Remy apps",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",