@shopify/create-app 3.91.1 → 3.92.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.
@@ -4,6 +4,7 @@ import {
4
4
  BugError,
5
5
  captureOutput,
6
6
  envPaths,
7
+ environmentVariables,
7
8
  exec,
8
9
  fileExists,
9
10
  fileHasWritePermissions,
@@ -20,14 +21,14 @@ import {
20
21
  runWithTimer,
21
22
  unixFileIsOwnedByCurrentUser,
22
23
  writeFile
23
- } from "./chunk-NSOYPXEP.js";
24
+ } from "./chunk-RIXXPHKS.js";
24
25
  import {
25
26
  require_semver
26
- } from "./chunk-D7M6DPGX.js";
27
+ } from "./chunk-Z4EMJFGP.js";
27
28
  import {
28
29
  dirname,
29
30
  joinPath
30
- } from "./chunk-Y2JP6WFP.js";
31
+ } from "./chunk-CFNYEDC6.js";
31
32
  import {
32
33
  __commonJS,
33
34
  __require,
@@ -9016,6 +9017,19 @@ init_cjs_shims();
9016
9017
  // ../cli-kit/dist/private/node/conf-store.js
9017
9018
  init_cjs_shims();
9018
9019
 
9020
+ // ../cli-kit/dist/private/node/context/service.js
9021
+ init_cjs_shims();
9022
+ var Environment;
9023
+ (function(Environment2) {
9024
+ Environment2.Local = "local", Environment2.Production = "production";
9025
+ })(Environment || (Environment = {}));
9026
+ function serviceEnvironment(env = process.env) {
9027
+ return env[environmentVariables.serviceEnv] === "local" ? Environment.Local : Environment.Production;
9028
+ }
9029
+ function isLocalEnvironment(env = process.env) {
9030
+ return serviceEnvironment(env) === Environment.Local;
9031
+ }
9032
+
9019
9033
  // ../cli-kit/dist/public/node/local-storage.js
9020
9034
  init_cjs_shims();
9021
9035
 
@@ -9876,23 +9890,29 @@ var _instance;
9876
9890
  function cliKitStore() {
9877
9891
  return _instance || (_instance = new LocalStorage({ projectName: `shopify-cli-kit${isUnitTest() ? "-test" : ""}` })), _instance;
9878
9892
  }
9893
+ function sessionStoreKey() {
9894
+ return isLocalEnvironment() ? "devSessionStore" : "sessionStore";
9895
+ }
9896
+ function currentSessionIdKey() {
9897
+ return isLocalEnvironment() ? "currentDevSessionId" : "currentSessionId";
9898
+ }
9879
9899
  function getSessions(config = cliKitStore()) {
9880
- return outputDebug(outputContent`Getting session store...`), config.get("sessionStore");
9900
+ return outputDebug(outputContent`Getting session store...`), config.get(sessionStoreKey());
9881
9901
  }
9882
9902
  function setSessions(session, config = cliKitStore()) {
9883
- outputDebug(outputContent`Setting session store...`), config.set("sessionStore", session);
9903
+ outputDebug(outputContent`Setting session store...`), config.set(sessionStoreKey(), session);
9884
9904
  }
9885
9905
  function removeSessions(config = cliKitStore()) {
9886
- outputDebug(outputContent`Removing session store...`), config.delete("sessionStore");
9906
+ outputDebug(outputContent`Removing session store...`), config.delete(sessionStoreKey());
9887
9907
  }
9888
9908
  function getCurrentSessionId(config = cliKitStore()) {
9889
- return outputDebug(outputContent`Getting current session ID...`), config.get("currentSessionId");
9909
+ return outputDebug(outputContent`Getting current session ID...`), config.get(currentSessionIdKey());
9890
9910
  }
9891
9911
  function setCurrentSessionId(sessionId, config = cliKitStore()) {
9892
- outputDebug(outputContent`Setting current session ID...`), config.set("currentSessionId", sessionId);
9912
+ outputDebug(outputContent`Setting current session ID...`), config.set(currentSessionIdKey(), sessionId);
9893
9913
  }
9894
9914
  function removeCurrentSessionId(config = cliKitStore()) {
9895
- outputDebug(outputContent`Removing current session ID...`), config.delete("currentSessionId");
9915
+ outputDebug(outputContent`Removing current session ID...`), config.delete(currentSessionIdKey());
9896
9916
  }
9897
9917
  async function cacheRetrieveOrRepopulate(key, fn, timeout, config = cliKitStore()) {
9898
9918
  let cached = cacheRetrieve(key, config);
@@ -13921,6 +13941,9 @@ function inferPackageManager(optionsPackageManager, env = process.env) {
13921
13941
  }
13922
13942
 
13923
13943
  export {
13944
+ Environment,
13945
+ serviceEnvironment,
13946
+ isLocalEnvironment,
13924
13947
  require_ajv,
13925
13948
  LocalStorage,
13926
13949
  getSessions,
@@ -13996,4 +14019,4 @@ deep-extend/lib/deep-extend.js:
13996
14019
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13997
14020
  *)
13998
14021
  */
13999
- //# sourceMappingURL=chunk-7WLIB5CO.js.map
14022
+ //# sourceMappingURL=chunk-QZMFOTZO.js.map