@madewithremy/admin 0.1.34 → 0.1.35

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 = {
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@madewithremy/admin",
3
- "version": "0.1.34",
3
+ "version": "0.1.35",
4
4
  "description": "Admin SDK + CLI for managing production Remy apps",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",