alpic 0.0.0-dev.f919b25 → 0.0.0-dev.fa013bb

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.
Files changed (55) hide show
  1. package/dist/__tests__/auth.e2e.test.js +5 -3
  2. package/dist/__tests__/auth.e2e.test.js.map +1 -1
  3. package/dist/__tests__/deploy-flags.e2e.test.d.ts +1 -0
  4. package/dist/__tests__/deploy-flags.e2e.test.js +87 -0
  5. package/dist/__tests__/deploy-flags.e2e.test.js.map +1 -0
  6. package/dist/__tests__/deploy.e2e.test.js +1 -50
  7. package/dist/__tests__/deploy.e2e.test.js.map +1 -1
  8. package/dist/__tests__/git-flags.e2e.test.d.ts +1 -0
  9. package/dist/__tests__/git-flags.e2e.test.js +122 -0
  10. package/dist/__tests__/git-flags.e2e.test.js.map +1 -0
  11. package/dist/__tests__/git.e2e.test.js +13 -10
  12. package/dist/__tests__/git.e2e.test.js.map +1 -1
  13. package/dist/__tests__/utils.d.ts +10 -4
  14. package/dist/__tests__/utils.js +50 -4
  15. package/dist/__tests__/utils.js.map +1 -1
  16. package/dist/commands/deploy.d.ts +6 -0
  17. package/dist/commands/deploy.js +39 -11
  18. package/dist/commands/deploy.js.map +1 -1
  19. package/dist/commands/git/connect.d.ts +4 -0
  20. package/dist/commands/git/connect.js +25 -14
  21. package/dist/commands/git/connect.js.map +1 -1
  22. package/dist/commands/git/disconnect.d.ts +3 -0
  23. package/dist/commands/git/disconnect.js +20 -14
  24. package/dist/commands/git/disconnect.js.map +1 -1
  25. package/dist/commands/login.js +3 -2
  26. package/dist/commands/login.js.map +1 -1
  27. package/dist/env.js +1 -1
  28. package/dist/lib/alpic-command.d.ts +2 -0
  29. package/dist/lib/alpic-command.js +13 -3
  30. package/dist/lib/alpic-command.js.map +1 -1
  31. package/dist/lib/auth/oauth/client.d.ts +0 -1
  32. package/dist/lib/auth/oauth/client.js +2 -4
  33. package/dist/lib/auth/oauth/client.js.map +1 -1
  34. package/dist/lib/auth/oauth/server/assets/alpic-mountain.png +0 -0
  35. package/dist/lib/auth/oauth/server/assets/authorize.html +195 -0
  36. package/dist/lib/auth/oauth/server/assets/callback.html +88 -0
  37. package/dist/lib/auth/oauth/server/index.d.ts +8 -0
  38. package/dist/lib/auth/oauth/server/index.js +102 -0
  39. package/dist/lib/auth/oauth/server/index.js.map +1 -0
  40. package/dist/lib/base-workflow.d.ts +10 -0
  41. package/dist/lib/base-workflow.js +22 -0
  42. package/dist/lib/base-workflow.js.map +1 -0
  43. package/dist/lib/deployment.d.ts +1 -0
  44. package/dist/lib/deployment.js +12 -1
  45. package/dist/lib/deployment.js.map +1 -1
  46. package/dist/lib/git.d.ts +9 -1
  47. package/dist/lib/git.js +44 -15
  48. package/dist/lib/git.js.map +1 -1
  49. package/dist/lib/project.d.ts +60 -61
  50. package/dist/lib/project.js +268 -254
  51. package/dist/lib/project.js.map +1 -1
  52. package/package.json +7 -7
  53. package/dist/lib/auth/oauth/server.d.ts +0 -6
  54. package/dist/lib/auth/oauth/server.js +0 -88
  55. package/dist/lib/auth/oauth/server.js.map +0 -1
@@ -1,67 +1,66 @@
1
- import type { RouterOutput } from "@alpic-ai/api";
1
+ import type { RouterOutput, Runtime } from "@alpic-ai/api";
2
2
  import type { ProjectConfig } from "../types.js";
3
- export declare function resolveDeployDir(raw: string | undefined): string;
4
- export declare function confirmDeployWithExistingConfig(existingConfig: ProjectConfig): Promise<boolean | null>;
5
- export declare function selectEnvironmentFromList(environments: RouterOutput["projects"]["get"]["v1"]["environments"]): Promise<{
6
- id: string;
7
- name: string;
8
- sourceBranch: string | null;
9
- mcpServerUrl: string;
10
- createdAt: Date;
11
- projectId: string;
12
- latestDeployment: {
13
- id: string;
14
- status: "ongoing" | "deployed" | "failed" | "canceled";
15
- sourceCommitId: string | null;
16
- sourceCommitMessage: string | null;
17
- completedAt: Date | null;
18
- } | null;
19
- } | null>;
20
- export declare function confirmDeployDirectory(deployDir: string): Promise<boolean>;
21
- export declare function confirmLinkExisting(): Promise<boolean>;
22
- export declare function confirmLinkToAnotherProject(): Promise<boolean>;
23
- export declare function selectProjectFromList(projects: RouterOutput["projects"]["list"]["v1"]): Promise<{
24
- id: string;
25
- name: string;
26
- teamId: string;
27
- sourceRepository: string | null;
28
- runtime: "python3.13" | "python3.14" | "node22" | "node24";
29
- transport: "stdio" | "sse" | "streamablehttp" | null;
30
- rootDirectory: string | null;
31
- buildCommand: string | null;
32
- buildOutputDir: string | null;
33
- installCommand: string | null;
34
- startCommand: string | null;
35
- createdAt: Date;
36
- productionEnvironment: {
37
- id: string;
38
- name: string;
39
- mcpServerUrl: string;
40
- latestDeployment: {
41
- id: string;
42
- status: "ongoing" | "deployed" | "failed" | "canceled";
43
- sourceCommitId: string | null;
44
- sourceCommitMessage: string | null;
45
- completedAt: Date | null;
46
- } | null;
47
- } | null;
48
- environments: {
3
+ import { BaseWorkflow } from "./base-workflow.js";
4
+ export type ProjectFlags = {
5
+ yes?: boolean;
6
+ projectName?: string;
7
+ runtime?: Runtime;
8
+ rootDir?: string;
9
+ };
10
+ export declare class ProjectWorkflow extends BaseWorkflow<ProjectFlags> {
11
+ selectEnvironmentFromList(environments: RouterOutput["projects"]["get"]["v1"]["environments"]): Promise<(typeof environments)[number] | null>;
12
+ selectProjectFromList(projects: RouterOutput["projects"]["list"]["v1"]): Promise<{
49
13
  id: string;
50
14
  name: string;
51
- sourceBranch: string | null;
52
- mcpServerUrl: string;
15
+ teamId: string;
16
+ sourceRepository: string | null;
17
+ runtime: "python3.13" | "python3.14" | "node22" | "node24";
18
+ transport: "stdio" | "sse" | "streamablehttp" | null;
19
+ rootDirectory: string | null;
20
+ buildCommand: string | null;
21
+ buildOutputDir: string | null;
22
+ installCommand: string | null;
23
+ startCommand: string | null;
53
24
  createdAt: Date;
54
- projectId: string;
55
- latestDeployment: {
25
+ productionEnvironment: {
56
26
  id: string;
57
- status: "ongoing" | "deployed" | "failed" | "canceled";
58
- sourceCommitId: string | null;
59
- sourceCommitMessage: string | null;
60
- completedAt: Date | null;
27
+ name: string;
28
+ mcpServerUrl: string;
29
+ latestDeployment: {
30
+ id: string;
31
+ status: "ongoing" | "deployed" | "failed" | "canceled";
32
+ sourceCommitId: string | null;
33
+ sourceCommitMessage: string | null;
34
+ completedAt: Date | null;
35
+ } | null;
61
36
  } | null;
62
- }[];
63
- } | null>;
64
- export declare function promptRootDirectory(deployDir: string): Promise<string | null | undefined>;
65
- export declare function resolveProjectForDeploy(deployDir: string): Promise<(ProjectConfig & {
66
- environmentId: string;
67
- }) | null>;
37
+ environments: {
38
+ id: string;
39
+ name: string;
40
+ sourceBranch: string | null;
41
+ mcpServerUrl: string;
42
+ createdAt: Date;
43
+ projectId: string;
44
+ latestDeployment: {
45
+ id: string;
46
+ status: "ongoing" | "deployed" | "failed" | "canceled";
47
+ sourceCommitId: string | null;
48
+ sourceCommitMessage: string | null;
49
+ completedAt: Date | null;
50
+ } | null;
51
+ }[];
52
+ } | null>;
53
+ promptRootDirectory(deployDir: string): Promise<string | null>;
54
+ private directoryExists;
55
+ private detectRuntime;
56
+ confirmDeployWithExistingConfig(existingConfig: ProjectConfig): Promise<boolean | null>;
57
+ confirmDeployDirectory(deployDir: string): Promise<boolean>;
58
+ confirmLinkExisting(): Promise<boolean>;
59
+ confirmLinkToAnotherProject(): Promise<boolean>;
60
+ resolveProjectForDeploy(deployDir: string): Promise<(ProjectConfig & {
61
+ environmentId: string;
62
+ }) | null>;
63
+ private resolveEnvironmentForProject;
64
+ private runCreateProjectFlow;
65
+ private runLinkingFlow;
66
+ }