@locusai/cli 0.15.0 → 0.15.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.
- package/bin/agent/worker.js +0 -93
- package/bin/locus.js +3458 -15525
- package/package.json +4 -4
package/bin/agent/worker.js
CHANGED
|
@@ -14590,71 +14590,6 @@ var init_invitation = __esm(() => {
|
|
|
14590
14590
|
});
|
|
14591
14591
|
});
|
|
14592
14592
|
|
|
14593
|
-
// ../shared/src/models/job.ts
|
|
14594
|
-
var JobType, JobStatus, JobSeverity, JobScheduleSchema, JobConfigSchema, JobRunResultSchema, JobRunSchema, CreateJobRunSchema, UpdateJobRunSchema;
|
|
14595
|
-
var init_job = __esm(() => {
|
|
14596
|
-
init_zod();
|
|
14597
|
-
((JobType2) => {
|
|
14598
|
-
JobType2["LINT_SCAN"] = "LINT_SCAN";
|
|
14599
|
-
JobType2["DEPENDENCY_CHECK"] = "DEPENDENCY_CHECK";
|
|
14600
|
-
JobType2["TODO_CLEANUP"] = "TODO_CLEANUP";
|
|
14601
|
-
JobType2["FLAKY_TEST_DETECTION"] = "FLAKY_TEST_DETECTION";
|
|
14602
|
-
JobType2["CUSTOM"] = "CUSTOM";
|
|
14603
|
-
})(JobType ||= {});
|
|
14604
|
-
((JobStatus2) => {
|
|
14605
|
-
JobStatus2["IDLE"] = "IDLE";
|
|
14606
|
-
JobStatus2["RUNNING"] = "RUNNING";
|
|
14607
|
-
JobStatus2["COMPLETED"] = "COMPLETED";
|
|
14608
|
-
JobStatus2["FAILED"] = "FAILED";
|
|
14609
|
-
JobStatus2["CANCELLED"] = "CANCELLED";
|
|
14610
|
-
})(JobStatus ||= {});
|
|
14611
|
-
((JobSeverity2) => {
|
|
14612
|
-
JobSeverity2["AUTO_EXECUTE"] = "AUTO_EXECUTE";
|
|
14613
|
-
JobSeverity2["REQUIRE_APPROVAL"] = "REQUIRE_APPROVAL";
|
|
14614
|
-
})(JobSeverity ||= {});
|
|
14615
|
-
JobScheduleSchema = exports_external.object({
|
|
14616
|
-
cronExpression: exports_external.string(),
|
|
14617
|
-
enabled: exports_external.boolean(),
|
|
14618
|
-
lastRunAt: exports_external.string().optional(),
|
|
14619
|
-
nextRunAt: exports_external.string().optional()
|
|
14620
|
-
});
|
|
14621
|
-
JobConfigSchema = exports_external.object({
|
|
14622
|
-
type: exports_external.enum(JobType),
|
|
14623
|
-
schedule: JobScheduleSchema,
|
|
14624
|
-
severity: exports_external.enum(JobSeverity),
|
|
14625
|
-
enabled: exports_external.boolean(),
|
|
14626
|
-
options: exports_external.record(exports_external.string(), exports_external.any())
|
|
14627
|
-
});
|
|
14628
|
-
JobRunResultSchema = exports_external.object({
|
|
14629
|
-
summary: exports_external.string(),
|
|
14630
|
-
filesChanged: exports_external.number(),
|
|
14631
|
-
prUrl: exports_external.string().optional(),
|
|
14632
|
-
errors: exports_external.array(exports_external.string()).optional()
|
|
14633
|
-
});
|
|
14634
|
-
JobRunSchema = exports_external.object({
|
|
14635
|
-
id: exports_external.string(),
|
|
14636
|
-
jobType: exports_external.enum(JobType),
|
|
14637
|
-
status: exports_external.enum(JobStatus),
|
|
14638
|
-
startedAt: exports_external.string(),
|
|
14639
|
-
completedAt: exports_external.string().optional(),
|
|
14640
|
-
result: JobRunResultSchema.optional(),
|
|
14641
|
-
workspaceId: exports_external.string()
|
|
14642
|
-
});
|
|
14643
|
-
CreateJobRunSchema = exports_external.object({
|
|
14644
|
-
jobType: exports_external.enum(JobType),
|
|
14645
|
-
status: exports_external.enum(JobStatus).optional().default("RUNNING" /* RUNNING */),
|
|
14646
|
-
startedAt: exports_external.string().optional(),
|
|
14647
|
-
error: exports_external.string().optional(),
|
|
14648
|
-
result: JobRunResultSchema.optional()
|
|
14649
|
-
});
|
|
14650
|
-
UpdateJobRunSchema = exports_external.object({
|
|
14651
|
-
status: exports_external.enum(JobStatus).optional(),
|
|
14652
|
-
result: JobRunResultSchema.optional(),
|
|
14653
|
-
error: exports_external.string().nullable().optional(),
|
|
14654
|
-
completedAt: exports_external.string().optional()
|
|
14655
|
-
});
|
|
14656
|
-
});
|
|
14657
|
-
|
|
14658
14593
|
// ../shared/src/models/organization.ts
|
|
14659
14594
|
var OrganizationSchema, CreateOrganizationSchema, UpdateOrganizationSchema, AddMemberSchema, MembershipWithUserSchema, OrgIdParamSchema, MembershipIdParamSchema, OrganizationResponseSchema, OrganizationsResponseSchema, MembersResponseSchema, MembershipResponseSchema;
|
|
14660
14595
|
var init_organization = __esm(() => {
|
|
@@ -14940,7 +14875,6 @@ var init_models = __esm(() => {
|
|
|
14940
14875
|
init_doc();
|
|
14941
14876
|
init_doc_group();
|
|
14942
14877
|
init_invitation();
|
|
14943
|
-
init_job();
|
|
14944
14878
|
init_organization();
|
|
14945
14879
|
init_sprint();
|
|
14946
14880
|
init_suggestion();
|
|
@@ -31760,29 +31694,6 @@ var init_invitations = __esm(() => {
|
|
|
31760
31694
|
};
|
|
31761
31695
|
});
|
|
31762
31696
|
|
|
31763
|
-
// ../sdk/src/modules/jobs.ts
|
|
31764
|
-
var JobsModule;
|
|
31765
|
-
var init_jobs = __esm(() => {
|
|
31766
|
-
JobsModule = class JobsModule extends BaseModule {
|
|
31767
|
-
async create(workspaceId, data) {
|
|
31768
|
-
const { data: res } = await this.api.post(`/workspaces/${workspaceId}/job-runs`, data);
|
|
31769
|
-
return res.jobRun;
|
|
31770
|
-
}
|
|
31771
|
-
async list(workspaceId, params) {
|
|
31772
|
-
const { data } = await this.api.get(`/workspaces/${workspaceId}/job-runs`, { params });
|
|
31773
|
-
return data.jobRuns;
|
|
31774
|
-
}
|
|
31775
|
-
async get(workspaceId, id) {
|
|
31776
|
-
const { data } = await this.api.get(`/workspaces/${workspaceId}/job-runs/${id}`);
|
|
31777
|
-
return data.jobRun;
|
|
31778
|
-
}
|
|
31779
|
-
async update(workspaceId, id, data) {
|
|
31780
|
-
const { data: res } = await this.api.patch(`/workspaces/${workspaceId}/job-runs/${id}`, data);
|
|
31781
|
-
return res.jobRun;
|
|
31782
|
-
}
|
|
31783
|
-
};
|
|
31784
|
-
});
|
|
31785
|
-
|
|
31786
31697
|
// ../sdk/src/modules/organizations.ts
|
|
31787
31698
|
var OrganizationsModule;
|
|
31788
31699
|
var init_organizations = __esm(() => {
|
|
@@ -32072,7 +31983,6 @@ class LocusClient {
|
|
|
32072
31983
|
docs;
|
|
32073
31984
|
ci;
|
|
32074
31985
|
instances;
|
|
32075
|
-
jobs;
|
|
32076
31986
|
suggestions;
|
|
32077
31987
|
constructor(config2) {
|
|
32078
31988
|
this.emitter = new LocusEmitter;
|
|
@@ -32094,7 +32004,6 @@ class LocusClient {
|
|
|
32094
32004
|
this.docs = new DocsModule(this.api, this.emitter);
|
|
32095
32005
|
this.ci = new CiModule(this.api, this.emitter);
|
|
32096
32006
|
this.instances = new InstancesModule(this.api, this.emitter);
|
|
32097
|
-
this.jobs = new JobsModule(this.api, this.emitter);
|
|
32098
32007
|
this.suggestions = new SuggestionsModule(this.api, this.emitter);
|
|
32099
32008
|
if (config2.retryOptions) {
|
|
32100
32009
|
this.setupRetryInterceptor(config2.retryOptions);
|
|
@@ -32163,7 +32072,6 @@ var init_src2 = __esm(() => {
|
|
|
32163
32072
|
init_docs();
|
|
32164
32073
|
init_instances();
|
|
32165
32074
|
init_invitations();
|
|
32166
|
-
init_jobs();
|
|
32167
32075
|
init_organizations();
|
|
32168
32076
|
init_sprints();
|
|
32169
32077
|
init_suggestions();
|
|
@@ -32176,7 +32084,6 @@ var init_src2 = __esm(() => {
|
|
|
32176
32084
|
init_docs();
|
|
32177
32085
|
init_instances();
|
|
32178
32086
|
init_invitations();
|
|
32179
|
-
init_jobs();
|
|
32180
32087
|
init_organizations();
|
|
32181
32088
|
init_sprints();
|
|
32182
32089
|
init_suggestions();
|