sst 2.38.5 → 2.38.6

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,6 +1,6 @@
1
+ import querystring from "node:querystring";
1
2
  import { generators, Issuer } from "openid-client";
2
3
  import { useBody, useCookie, useDomainName, usePathParam, useResponse, } from "../../../api/index.js";
3
- const querystring = require("querystring");
4
4
  // This adapter support the OAuth flow with the response_mode "form_post" for now.
5
5
  // More details about the flow:
6
6
  // https://developer.apple.com/documentation/devicemanagement/user_enrollment/onboarding_users_with_account_sign-in/implementing_the_oauth2_authentication_user-enrollment_flow
@@ -54,12 +54,14 @@ export const AppleAdapter =
54
54
  };
55
55
  }
56
56
  if (step === "callback") {
57
- let params;
57
+ let params = {};
58
58
  if (config &&
59
59
  config.params &&
60
60
  config.params.response_mode === "form_post") {
61
61
  const body = useBody();
62
- params = querystring.parse(body);
62
+ if (typeof body === "string") {
63
+ params = querystring.parse(body);
64
+ }
63
65
  }
64
66
  const code_verifier = useCookie("auth_code_verifier");
65
67
  const state = useCookie("auth_state");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.38.5",
4
+ "version": "2.38.6",
5
5
  "bin": {
6
6
  "sst": "cli/sst.js"
7
7
  },
@@ -120,7 +120,7 @@
120
120
  "@types/ws": "^8.5.3",
121
121
  "@types/yargs": "^17.0.13",
122
122
  "archiver": "^5.3.1",
123
- "astro-sst": "2.38.5",
123
+ "astro-sst": "2.38.6",
124
124
  "async": "^3.2.4",
125
125
  "tsx": "^3.12.1",
126
126
  "typescript": "^5.2.2",
package/project.js CHANGED
@@ -51,9 +51,9 @@ export async function initProject(globals) {
51
51
  throw new VisibleError("Could not find a configuration file", "Make sure one of the following exists", ...CONFIG_EXTENSIONS.map((x) => ` - sst${x}`));
52
52
  })();
53
53
  const config = await Promise.resolve(sstConfig.config(globals));
54
- const stage = process.env.SST_STAGE ||
55
- globals.stage ||
54
+ const stage = globals.stage ||
56
55
  config.stage ||
56
+ process.env.SST_STAGE ||
57
57
  (await usePersonalStage(out)) ||
58
58
  (await promptPersonalStage(out));
59
59
  // Set stage to SST_STAGE so that if SST spawned processes are aware
package/util/lazy.js CHANGED
@@ -2,7 +2,7 @@ export function lazy(callback) {
2
2
  let loaded = false;
3
3
  let result;
4
4
  return () => {
5
- if (!loaded) {
5
+ if (!loaded || process.env.SST_RESET_LAZY) {
6
6
  result = callback();
7
7
  loaded = true;
8
8
  }