@molecule/api-code-sandbox-flyio 1.0.4 → 1.0.5
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 +8 -1
- 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;AAKH,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;AAKH,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;AAwpDnB;;;;;;;;;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
|
@@ -725,7 +725,14 @@ class FlyioSandboxProvider {
|
|
|
725
725
|
// read back from the creation response is stale by definition.
|
|
726
726
|
return this.buildSandbox(app, machine.id, 'running');
|
|
727
727
|
}
|
|
728
|
-
|
|
728
|
+
// `POST .../machines` launches the Machine but returns as soon as it is
|
|
729
|
+
// scheduled — often still `created`/`starting`. The caller's very first
|
|
730
|
+
// action is an `exec` (to scaffold the workspace), which Fly rejects with
|
|
731
|
+
// `412 failed_precondition: machine not running` until the Machine is up.
|
|
732
|
+
// Wait for `started` here so `create` always hands back a live sandbox, as
|
|
733
|
+
// the JSDoc promises — the template path already does this via restore.
|
|
734
|
+
await this.waitForStarted(app, machine.id);
|
|
735
|
+
return this.buildSandbox(app, machine.id, 'running');
|
|
729
736
|
}
|
|
730
737
|
/**
|
|
731
738
|
* Retrieves an existing sandbox by its composite `<app>:<machineId>` id.
|