@alpic-ai/sdk 0.0.0-dev.gfa6fd7c → 0.0.0-dev.gfdd78d0

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.
@@ -14,10 +14,6 @@ export declare class AlpicAuth {
14
14
  isAuthenticated(): Promise<boolean>;
15
15
  getToken(): Promise<string | undefined>;
16
16
  getUserAccessToken(): Promise<string | undefined>;
17
- getUserInfo(): Promise<{
18
- email: string | undefined;
19
- name: string | undefined;
20
- } | null>;
21
17
  login(opts?: LoginOptions): Promise<{
22
18
  sub: string;
23
19
  }>;
@@ -22,17 +22,6 @@ export class AlpicAuth {
22
22
  async getUserAccessToken() {
23
23
  return (await getOAuthClient().getValidAccessToken())?.access_token;
24
24
  }
25
- async getUserInfo() {
26
- const credentials = await getOAuthClient().getValidAccessToken();
27
- if (!credentials) {
28
- return null;
29
- }
30
- const userInfo = await getOAuthClient().fetchUserInfo(credentials);
31
- if (!userInfo) {
32
- return null;
33
- }
34
- return { email: userInfo.email, name: userInfo.name };
35
- }
36
25
  async login(opts) {
37
26
  const result = await oauthLogin(opts);
38
27
  this.events.emit("authenticated", { sub: result.sub });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAqB,UAAU,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAoB,WAAW,EAAE,MAAM,YAAY,CAAC;AAQ3D,MAAM,OAAO,SAAS;IACH,MAAM,GAAG,IAAI,iBAAiB,EAAc,CAAC;IAE9D,EAAE,CAA6B,KAAQ,EAAE,QAA0C;QACjF,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAClC,CAAC;IAED,GAAG,CAA6B,KAAQ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QACtC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;QACvD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,MAAM;QACV,WAAW,CAAC,gBAAgB,EAAE,CAAC;IACjC,CAAC;CACF"}
package/dist/client.d.ts CHANGED
@@ -1,13 +1,9 @@
1
1
  import { type AlpicApi } from "./api/client.js";
2
2
  import { AlpicAuth } from "./auth/index.js";
3
- import { Deployments } from "./deploy/deployments.js";
4
3
  import { Tunnel } from "./tunnel/tunnel.js";
5
- import { type WhoamiInfo } from "./whoami.js";
6
4
  export declare class Alpic {
7
5
  readonly auth: AlpicAuth;
8
6
  readonly api: AlpicApi;
9
7
  readonly tunnel: Tunnel;
10
- readonly deployments: Deployments;
11
8
  constructor();
12
- whoami(): Promise<WhoamiInfo>;
13
9
  }
package/dist/client.js CHANGED
@@ -1,14 +1,11 @@
1
1
  import { createApiClient } from "./api/client.js";
2
2
  import { AlpicAuth } from "./auth/index.js";
3
- import { Deployments } from "./deploy/deployments.js";
4
3
  import { env } from "./env.js";
5
4
  import { Tunnel } from "./tunnel/tunnel.js";
6
- import { whoami } from "./whoami.js";
7
5
  export class Alpic {
8
6
  auth;
9
7
  api;
10
8
  tunnel;
11
- deployments;
12
9
  constructor() {
13
10
  this.auth = new AlpicAuth();
14
11
  this.api = createApiClient({
@@ -16,10 +13,6 @@ export class Alpic {
16
13
  auth: this.auth,
17
14
  });
18
15
  this.tunnel = new Tunnel({ api: this.api });
19
- this.deployments = new Deployments({ api: this.api });
20
- }
21
- whoami() {
22
- return whoami(this.auth, this.api);
23
16
  }
24
17
  }
25
18
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,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AAS,EAAE,CAAC;QAC5B,IAAI,CAAC,GAAG,GAAG,eAAe,CAAC;YACzB,UAAU,EAAE,GAAG,CAAC,kBAAkB;YAClC,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC9C,CAAC;CACF"}
package/dist/index.d.ts CHANGED
@@ -4,6 +4,4 @@ export { AlpicAuth } from "./auth/index.js";
4
4
  export { getOAuthClient } from "./auth/oauth-client.js";
5
5
  export { GlobalStore, globalStore } from "./auth/store.js";
6
6
  export { Alpic } from "./client.js";
7
- export type { DeployEvent, Deployment, DeploymentStatus, DeployOptions, DeployResult } from "./deploy/deployments.js";
8
7
  export type { OpenTunnelOptions, TunnelCloseInfo, TunnelHandle, TunnelRequest } from "./tunnel/tunnel.js";
9
- export type { Team, WhoamiInfo } from "./whoami.js";
@@ -11099,9 +11099,9 @@ var require_src = __commonJS({
11099
11099
  }
11100
11100
  });
11101
11101
 
11102
- // ../../node_modules/.pnpm/agent-base@6.0.2_supports-color@8.1.1/node_modules/agent-base/dist/src/promisify.js
11102
+ // ../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js
11103
11103
  var require_promisify = __commonJS({
11104
- "../../node_modules/.pnpm/agent-base@6.0.2_supports-color@8.1.1/node_modules/agent-base/dist/src/promisify.js"(exports) {
11104
+ "../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js"(exports) {
11105
11105
  "use strict";
11106
11106
  Object.defineProperty(exports, "__esModule", { value: true });
11107
11107
  function promisify(fn) {
@@ -11121,9 +11121,9 @@ var require_promisify = __commonJS({
11121
11121
  }
11122
11122
  });
11123
11123
 
11124
- // ../../node_modules/.pnpm/agent-base@6.0.2_supports-color@8.1.1/node_modules/agent-base/dist/src/index.js
11124
+ // ../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js
11125
11125
  var require_src2 = __commonJS({
11126
- "../../node_modules/.pnpm/agent-base@6.0.2_supports-color@8.1.1/node_modules/agent-base/dist/src/index.js"(exports, module) {
11126
+ "../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js"(exports, module) {
11127
11127
  "use strict";
11128
11128
  var __importDefault = exports && exports.__importDefault || function(mod) {
11129
11129
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -11304,9 +11304,9 @@ var require_src2 = __commonJS({
11304
11304
  }
11305
11305
  });
11306
11306
 
11307
- // ../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js
11307
+ // ../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js
11308
11308
  var require_parse_proxy_response = __commonJS({
11309
- "../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) {
11309
+ "../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) {
11310
11310
  "use strict";
11311
11311
  var __importDefault = exports && exports.__importDefault || function(mod) {
11312
11312
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -11370,9 +11370,9 @@ var require_parse_proxy_response = __commonJS({
11370
11370
  }
11371
11371
  });
11372
11372
 
11373
- // ../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/agent.js
11373
+ // ../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.js
11374
11374
  var require_agent = __commonJS({
11375
- "../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/agent.js"(exports) {
11375
+ "../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.js"(exports) {
11376
11376
  "use strict";
11377
11377
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
11378
11378
  function adopt(value) {
@@ -11530,9 +11530,9 @@ var require_agent = __commonJS({
11530
11530
  }
11531
11531
  });
11532
11532
 
11533
- // ../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/index.js
11533
+ // ../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.js
11534
11534
  var require_dist = __commonJS({
11535
- "../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/index.js"(exports, module) {
11535
+ "../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.js"(exports, module) {
11536
11536
  "use strict";
11537
11537
  var __importDefault = exports && exports.__importDefault || function(mod) {
11538
11538
  return mod && mod.__esModule ? mod : { "default": mod };