@flowscripter/dynamic-cli-framework 3.0.0 → 3.0.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultUpgradeService.d.ts","sourceRoot":"","sources":["../../../../src/service/upgrade/DefaultUpgradeService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EAEZ,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACd,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,aAAa,EACb,aAAa,EACb,WAAW,EACX,KAAK,cAAc,EACpB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAO1E,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAc5C,MAAM,CAAC,OAAO,OAAO,qBAAsB,YAAW,cAAc;;gBAO/C,MAAM,EAAE,sBAAsB,EAAE,SAAS,EAAE,SAAS;IAKhE,eAAe,CACpB,YAAY,EAAE,YAAY,GAAG,SAAS,EACtC,YAAY,EAAE,YAAY,GAAG,SAAS,GACrC,IAAI;IAKA,qBAAqB,CAAC,aAAa,UAAQ,GAAG,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"DefaultUpgradeService.d.ts","sourceRoot":"","sources":["../../../../src/service/upgrade/DefaultUpgradeService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EAEZ,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACd,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,aAAa,EACb,aAAa,EACb,WAAW,EACX,KAAK,cAAc,EACpB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAO1E,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAc5C,MAAM,CAAC,OAAO,OAAO,qBAAsB,YAAW,cAAc;;gBAO/C,MAAM,EAAE,sBAAsB,EAAE,SAAS,EAAE,SAAS;IAKhE,eAAe,CACpB,YAAY,EAAE,YAAY,GAAG,SAAS,EACtC,YAAY,EAAE,YAAY,GAAG,SAAS,GACrC,IAAI;IAKA,qBAAqB,CAAC,aAAa,UAAQ,GAAG,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC;IAyBrF,QAAQ,IAAI,WAAW,GAAG,SAAS;IAanC,UAAU,IAAI,aAAa,GAAG,SAAS;IAWjC,mBAAmB,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;IAgBxE,eAAe,CAC1B,UAAU,CAAC,EAAE,WAAW,EACxB,YAAY,CAAC,EAAE,aAAa,EAC5B,qBAAqB,CAAC,EAAE,aAAa,GACpC,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC;IAmC7B,OAAO,CAClB,UAAU,CAAC,EAAE,WAAW,EACxB,YAAY,CAAC,EAAE,aAAa,EAC5B,qBAAqB,CAAC,EAAE,aAAa,GACpC,OAAO,CAAC,aAAa,CAAC;CAuQ1B"}
|
|
@@ -35,7 +35,17 @@ export default class DefaultUpgradeService {
|
|
|
35
35
|
}
|
|
36
36
|
getUpgradeCheckResult(waitForResult = false) {
|
|
37
37
|
if (!this.#upgradeCheckPromise) {
|
|
38
|
-
|
|
38
|
+
// Only cache a successful result. An `undefined` result can come from a transient
|
|
39
|
+
// failure (e.g. the opportunistic startup check's fetch exceeding
|
|
40
|
+
// VERSION_CHECK_TIMEOUT_MS) - caching that would permanently deny a later, deliberate
|
|
41
|
+
// caller (e.g. the `upgrade` command explicitly waiting via waitForResult=true) any
|
|
42
|
+
// chance of a fresh attempt for the rest of this process's lifetime.
|
|
43
|
+
this.#upgradeCheckPromise = this.checkForUpgrade().then((result) => {
|
|
44
|
+
if (result === undefined) {
|
|
45
|
+
this.#upgradeCheckPromise = undefined;
|
|
46
|
+
}
|
|
47
|
+
return result;
|
|
48
|
+
});
|
|
39
49
|
}
|
|
40
50
|
if (waitForResult) {
|
|
41
51
|
return this.#upgradeCheckPromise;
|
package/package.json
CHANGED
|
@@ -60,7 +60,17 @@ export default class DefaultUpgradeService implements UpgradeService {
|
|
|
60
60
|
|
|
61
61
|
public getUpgradeCheckResult(waitForResult = false): Promise<UpgradeCheckResult | undefined> {
|
|
62
62
|
if (!this.#upgradeCheckPromise) {
|
|
63
|
-
|
|
63
|
+
// Only cache a successful result. An `undefined` result can come from a transient
|
|
64
|
+
// failure (e.g. the opportunistic startup check's fetch exceeding
|
|
65
|
+
// VERSION_CHECK_TIMEOUT_MS) - caching that would permanently deny a later, deliberate
|
|
66
|
+
// caller (e.g. the `upgrade` command explicitly waiting via waitForResult=true) any
|
|
67
|
+
// chance of a fresh attempt for the rest of this process's lifetime.
|
|
68
|
+
this.#upgradeCheckPromise = this.checkForUpgrade().then((result) => {
|
|
69
|
+
if (result === undefined) {
|
|
70
|
+
this.#upgradeCheckPromise = undefined;
|
|
71
|
+
}
|
|
72
|
+
return result;
|
|
73
|
+
});
|
|
64
74
|
}
|
|
65
75
|
if (waitForResult) {
|
|
66
76
|
return this.#upgradeCheckPromise;
|