@molecule/api-code-sandbox-flyio 1.0.8 → 1.0.9
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/provider.d.ts.map +1 -1
- package/dist/provider.js +11 -5
- package/package.json +1 -1
package/dist/provider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,KAAK,EAUV,eAAe,EAEhB,MAAM,4BAA4B,CAAA;AAGnC,OAAO,EAAE,YAAY,EAAgC,MAAM,UAAU,CAAA;AAsBrE,OAAO,EAAmD,KAAK,WAAW,EAAE,MAAM,cAAc,CAAA;AAEhG,OAAO,KAAK,EAEV,WAAW,EAUZ,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,KAAK,EAUV,eAAe,EAEhB,MAAM,4BAA4B,CAAA;AAGnC,OAAO,EAAE,YAAY,EAAgC,MAAM,UAAU,CAAA;AAsBrE,OAAO,EAAmD,KAAK,WAAW,EAAE,MAAM,cAAc,CAAA;AAEhG,OAAO,KAAK,EAEV,WAAW,EAUZ,MAAM,YAAY,CAAA;AAmzDnB;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,MAAM,CAAC,EAAE,WAAW,EACpB,MAAM,CAAC,EAAE,YAAY,EACrB,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,GACzB,eAAe,CAEjB"}
|
package/dist/provider.js
CHANGED
|
@@ -209,10 +209,16 @@ class FlyioSandboxProvider {
|
|
|
209
209
|
* Builds the Fly Proxy service exposing a sandbox's preview port, or `undefined`
|
|
210
210
|
* when public exposure is disabled.
|
|
211
211
|
*
|
|
212
|
-
* `
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
212
|
+
* `autostart: true` wakes an idle (stopped or suspended) Machine on the next
|
|
213
|
+
* preview request. `autostop` defaults to `'off'` — NOT `'suspend'` — on
|
|
214
|
+
* purpose: Fly's autostop timer counts the PROXY service's idle time, and a
|
|
215
|
+
* sandbox spends its first minutes being provisioned over the exec API with no
|
|
216
|
+
* proxy traffic, so `'suspend'` cold-starts the Machine mid-scaffold (execs are
|
|
217
|
+
* not proxy traffic) and the scaffold's own temp state is lost. Idle-sleep is
|
|
218
|
+
* instead driven by the consumer's own per-tier hibernation loop, which calls
|
|
219
|
+
* `sleep()`/`hibernate()` — the same provider-agnostic mechanism the Docker
|
|
220
|
+
* bond relies on. An operator who wants Fly-native scale-to-zero can still opt
|
|
221
|
+
* in with `config.autostop: 'suspend'`.
|
|
216
222
|
* @returns The service definition, or `undefined`.
|
|
217
223
|
*/
|
|
218
224
|
previewService() {
|
|
@@ -226,7 +232,7 @@ class FlyioSandboxProvider {
|
|
|
226
232
|
{ port: 443, handlers: ['tls', 'http'] },
|
|
227
233
|
],
|
|
228
234
|
autostart: true,
|
|
229
|
-
autostop: this.config.autostop ?? '
|
|
235
|
+
autostop: this.config.autostop ?? 'off',
|
|
230
236
|
min_machines_running: 0,
|
|
231
237
|
};
|
|
232
238
|
}
|