@madewithremy/admin 0.1.9 → 0.1.11
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/dist/index.d.ts +13 -3
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/prod.js +41 -13
- package/package.json +1 -1
package/dist/prod.js
CHANGED
|
@@ -3306,7 +3306,8 @@ function approve(ctx, params) {
|
|
|
3306
3306
|
return call(
|
|
3307
3307
|
ctx,
|
|
3308
3308
|
"POST",
|
|
3309
|
-
`${base2(ctx.appId)}/${encodeURIComponent(params.id)}/approve
|
|
3309
|
+
`${base2(ctx.appId)}/${encodeURIComponent(params.id)}/approve`,
|
|
3310
|
+
params.concurrency !== void 0 ? { concurrency: params.concurrency } : void 0
|
|
3310
3311
|
);
|
|
3311
3312
|
}
|
|
3312
3313
|
function pause(ctx, params) {
|
|
@@ -3320,7 +3321,8 @@ function resume(ctx, params) {
|
|
|
3320
3321
|
return call(
|
|
3321
3322
|
ctx,
|
|
3322
3323
|
"POST",
|
|
3323
|
-
`${base2(ctx.appId)}/${encodeURIComponent(params.id)}/resume
|
|
3324
|
+
`${base2(ctx.appId)}/${encodeURIComponent(params.id)}/resume`,
|
|
3325
|
+
params.concurrency !== void 0 ? { concurrency: params.concurrency } : void 0
|
|
3324
3326
|
);
|
|
3325
3327
|
}
|
|
3326
3328
|
function cancel(ctx, params) {
|
|
@@ -3473,7 +3475,9 @@ function disconnect(ctx, params) {
|
|
|
3473
3475
|
function sync(ctx, params) {
|
|
3474
3476
|
return call(ctx, "POST", `${base3(ctx.appId)}/sync`, {
|
|
3475
3477
|
slug: params.slug,
|
|
3476
|
-
...params.budgetDollars !== void 0 ? { budgetDollars: params.budgetDollars } : {}
|
|
3478
|
+
...params.budgetDollars !== void 0 ? { budgetDollars: params.budgetDollars } : {},
|
|
3479
|
+
...params.limit !== void 0 ? { limit: params.limit } : {},
|
|
3480
|
+
...params.concurrency !== void 0 ? { concurrency: params.concurrency } : {}
|
|
3477
3481
|
});
|
|
3478
3482
|
}
|
|
3479
3483
|
|
|
@@ -3502,10 +3506,12 @@ var dataSourceConnectorsSpecs = {
|
|
|
3502
3506
|
flags: { source: { type: "string" } }
|
|
3503
3507
|
},
|
|
3504
3508
|
"datasources sync": {
|
|
3505
|
-
usage: "Usage: remy-admin datasources sync [--source <slug>] [--budget <dollars>] [--wait] [--timeout <sec>]",
|
|
3509
|
+
usage: "Usage: remy-admin datasources sync [--source <slug>] [--budget <dollars>] [--limit <n>] [--concurrency <n>] [--wait] [--timeout <sec>]",
|
|
3506
3510
|
flags: {
|
|
3507
3511
|
source: { type: "string" },
|
|
3508
3512
|
budget: { type: "number", min: 0.01 },
|
|
3513
|
+
limit: { type: "number", min: 1 },
|
|
3514
|
+
concurrency: { type: "number", min: 1 },
|
|
3509
3515
|
wait: { type: "boolean" },
|
|
3510
3516
|
timeout: { type: "string" }
|
|
3511
3517
|
}
|
|
@@ -3575,9 +3581,13 @@ async function disconnect2(ctx, a) {
|
|
|
3575
3581
|
async function sync2(ctx, a) {
|
|
3576
3582
|
const slug = sourceOf(a);
|
|
3577
3583
|
const budget = a.num("budget");
|
|
3584
|
+
const limit = a.num("limit");
|
|
3585
|
+
const concurrency = a.num("concurrency");
|
|
3578
3586
|
const { job } = await sync(ctx, {
|
|
3579
3587
|
slug,
|
|
3580
|
-
...budget !== void 0 ? { budgetDollars: budget } : {}
|
|
3588
|
+
...budget !== void 0 ? { budgetDollars: budget } : {},
|
|
3589
|
+
...limit !== void 0 ? { limit } : {},
|
|
3590
|
+
...concurrency !== void 0 ? { concurrency } : {}
|
|
3581
3591
|
});
|
|
3582
3592
|
if (!a.bool("wait")) {
|
|
3583
3593
|
out({
|
|
@@ -3602,7 +3612,7 @@ var dataSourceConnectorsHelp = `
|
|
|
3602
3612
|
Following an S3 bucket (connectors):
|
|
3603
3613
|
remy-admin datasources connect --source <slug> --bucket <name> --region <aws-region> [--prefix <p>] --access-key-secret <NAME> --secret-key-secret <NAME> [--deletions mirror|keep] [--budget-per-sync <dollars>]
|
|
3604
3614
|
remy-admin datasources connector [--source <slug>]
|
|
3605
|
-
remy-admin datasources sync [--source <slug>] [--budget <dollars>] [--wait] [--timeout <sec>]
|
|
3615
|
+
remy-admin datasources sync [--source <slug>] [--budget <dollars>] [--limit <n>] [--concurrency <n>] [--wait] [--timeout <sec>]
|
|
3606
3616
|
remy-admin datasources disconnect --source <slug>
|
|
3607
3617
|
|
|
3608
3618
|
A connector makes a bucket the customer owns the origin of a source. The
|
|
@@ -4394,18 +4404,26 @@ var dataSourceJobsSpecs = {
|
|
|
4394
4404
|
flags: { wait: { type: "boolean" }, timeout: { type: "string" } }
|
|
4395
4405
|
},
|
|
4396
4406
|
"datasources jobs approve": {
|
|
4397
|
-
usage: "Usage: remy-admin datasources jobs approve <id> [--wait] [--timeout <sec>]",
|
|
4407
|
+
usage: "Usage: remy-admin datasources jobs approve <id> [--concurrency <n>] [--wait] [--timeout <sec>]",
|
|
4398
4408
|
positionals: [{ name: "id", required: true }],
|
|
4399
|
-
flags: {
|
|
4409
|
+
flags: {
|
|
4410
|
+
concurrency: { type: "number", min: 1 },
|
|
4411
|
+
wait: { type: "boolean" },
|
|
4412
|
+
timeout: { type: "string" }
|
|
4413
|
+
}
|
|
4400
4414
|
},
|
|
4401
4415
|
"datasources jobs pause": {
|
|
4402
4416
|
usage: "Usage: remy-admin datasources jobs pause <id>",
|
|
4403
4417
|
positionals: [{ name: "id", required: true }]
|
|
4404
4418
|
},
|
|
4405
4419
|
"datasources jobs resume": {
|
|
4406
|
-
usage: "Usage: remy-admin datasources jobs resume <id> [--wait] [--timeout <sec>]",
|
|
4420
|
+
usage: "Usage: remy-admin datasources jobs resume <id> [--concurrency <n>] [--wait] [--timeout <sec>]",
|
|
4407
4421
|
positionals: [{ name: "id", required: true }],
|
|
4408
|
-
flags: {
|
|
4422
|
+
flags: {
|
|
4423
|
+
concurrency: { type: "number", min: 1 },
|
|
4424
|
+
wait: { type: "boolean" },
|
|
4425
|
+
timeout: { type: "string" }
|
|
4426
|
+
}
|
|
4409
4427
|
},
|
|
4410
4428
|
"datasources jobs cancel": {
|
|
4411
4429
|
usage: "Usage: remy-admin datasources jobs cancel <id>",
|
|
@@ -4482,7 +4500,11 @@ async function jobsStatus(ctx, a) {
|
|
|
4482
4500
|
}
|
|
4483
4501
|
async function jobsApprove(ctx, a) {
|
|
4484
4502
|
const id = a.req("id");
|
|
4485
|
-
const
|
|
4503
|
+
const concurrency = a.num("concurrency");
|
|
4504
|
+
const { job } = await approve(ctx, {
|
|
4505
|
+
id,
|
|
4506
|
+
...concurrency !== void 0 ? { concurrency } : {}
|
|
4507
|
+
});
|
|
4486
4508
|
if (!a.bool("wait")) {
|
|
4487
4509
|
out({
|
|
4488
4510
|
job,
|
|
@@ -4497,7 +4519,11 @@ async function jobsPause(ctx, a) {
|
|
|
4497
4519
|
}
|
|
4498
4520
|
async function jobsResume(ctx, a) {
|
|
4499
4521
|
const id = a.req("id");
|
|
4500
|
-
const
|
|
4522
|
+
const concurrency = a.num("concurrency");
|
|
4523
|
+
const { job } = await resume(ctx, {
|
|
4524
|
+
id,
|
|
4525
|
+
...concurrency !== void 0 ? { concurrency } : {}
|
|
4526
|
+
});
|
|
4501
4527
|
if (!a.bool("wait")) {
|
|
4502
4528
|
out({ job });
|
|
4503
4529
|
return;
|
|
@@ -4543,9 +4569,11 @@ Bulk ingestion (jobs):
|
|
|
4543
4569
|
Options on start:
|
|
4544
4570
|
--approve Run as soon as the plan passes the gates, no separate approve
|
|
4545
4571
|
--budget <dollars> Pause when estimated spend reaches this (default 1.5x the plan)
|
|
4546
|
-
--concurrency <n> Batches in flight at once (default
|
|
4572
|
+
--concurrency <n> Batches in flight at once (default 64, max 128)
|
|
4547
4573
|
--limit <n> Only the first N objects: a cheap sample of the corpus
|
|
4548
4574
|
--wait Block until the plan is ready (or, with --approve, until done)
|
|
4575
|
+
On approve and resume:
|
|
4576
|
+
--concurrency <n> Batches in flight from here on (max 128); a plan made at 8 can run at 64
|
|
4549
4577
|
|
|
4550
4578
|
While running, documents are read in batches of fifty with one embedding
|
|
4551
4579
|
call per batch. Unchanged documents are skipped by content hash, so re-running
|