sst 2.11.3 → 2.11.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.
@@ -16,7 +16,7 @@ export function createEventBuilder(props) {
16
16
  Entries: [
17
17
  {
18
18
  // @ts-expect-error
19
- EventBusName: EventBus[props.bus].busName,
19
+ EventBusName: EventBus[props.bus].eventBusName,
20
20
  Source: "console",
21
21
  Detail: JSON.stringify({
22
22
  properties: propertiesSchema.parse(properties),
@@ -0,0 +1,23 @@
1
+ import { OauthBasicConfig } from "./oauth.js";
2
+ /**
3
+ * The Spotify Adapter follows the PKCE flow outlined here:
4
+ * https://developer.spotify.com/documentation/web-api/tutorials/code-pkce-flow
5
+ *
6
+ * List of scopes available:
7
+ * https://developer.spotify.com/documentation/web-api/concepts/scopes
8
+ */
9
+ export declare const SpotifyAdapter: (config: OauthBasicConfig) => () => Promise<{
10
+ type: "success";
11
+ properties: {
12
+ tokenset: import("openid-client").TokenSet;
13
+ client: import("openid-client").BaseClient;
14
+ };
15
+ } | {
16
+ type: "step";
17
+ properties: {
18
+ statusCode: number;
19
+ headers: {
20
+ location: string;
21
+ };
22
+ };
23
+ }>;
@@ -0,0 +1,22 @@
1
+ import { Issuer } from "openid-client";
2
+ import { OauthAdapter } from "./oauth.js";
3
+ const issuer = new Issuer({
4
+ issuer: "https://accounts.spotify.com",
5
+ authorization_endpoint: "https://accounts.spotify.com/authorize",
6
+ token_endpoint: "https://accounts.spotify.com/api/token",
7
+ });
8
+ /**
9
+ * The Spotify Adapter follows the PKCE flow outlined here:
10
+ * https://developer.spotify.com/documentation/web-api/tutorials/code-pkce-flow
11
+ *
12
+ * List of scopes available:
13
+ * https://developer.spotify.com/documentation/web-api/concepts/scopes
14
+ */
15
+ export const SpotifyAdapter =
16
+ /* @__PURE__ */
17
+ (config) => {
18
+ return OauthAdapter({
19
+ issuer,
20
+ ...config,
21
+ });
22
+ };
@@ -8,6 +8,7 @@ export * from "./adapter/github.js";
8
8
  export * from "./adapter/facebook.js";
9
9
  export * from "./adapter/microsoft.js";
10
10
  export * from "./adapter/oauth.js";
11
+ export * from "./adapter/spotify.js";
11
12
  export type { Adapter } from "./adapter/adapter.js";
12
13
  export * from "./session.js";
13
14
  export * from "./handler.js";
@@ -7,6 +7,7 @@ export * from "./adapter/github.js";
7
7
  export * from "./adapter/facebook.js";
8
8
  export * from "./adapter/microsoft.js";
9
9
  export * from "./adapter/oauth.js";
10
+ export * from "./adapter/spotify.js";
10
11
  export * from "./session.js";
11
12
  export * from "./handler.js";
12
13
  export { Issuer } from "openid-client";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.11.3",
4
+ "version": "2.11.5",
5
5
  "bin": {
6
6
  "sst": "cli/sst.js"
7
7
  },