@vm0/cli 9.128.0 → 9.129.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/{chunk-ZBGP4ZRV.js → chunk-TO65SA2M.js} +58 -63
- package/{chunk-ZBGP4ZRV.js.map → chunk-TO65SA2M.js.map} +1 -1
- package/index.js +9 -9
- package/package.json +1 -1
- package/zero.js +12 -5
- package/zero.js.map +1 -1
|
@@ -73642,7 +73642,7 @@ if (DSN) {
|
|
|
73642
73642
|
init2({
|
|
73643
73643
|
dsn: DSN,
|
|
73644
73644
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
73645
|
-
release: "9.
|
|
73645
|
+
release: "9.129.1",
|
|
73646
73646
|
sendDefaultPii: false,
|
|
73647
73647
|
tracesSampleRate: 0,
|
|
73648
73648
|
shutdownTimeout: 500,
|
|
@@ -73661,7 +73661,7 @@ if (DSN) {
|
|
|
73661
73661
|
}
|
|
73662
73662
|
});
|
|
73663
73663
|
setContext("cli", {
|
|
73664
|
-
version: "9.
|
|
73664
|
+
version: "9.129.1",
|
|
73665
73665
|
command: process.argv.slice(2).join(" ")
|
|
73666
73666
|
});
|
|
73667
73667
|
setContext("runtime", {
|
|
@@ -91178,6 +91178,11 @@ var openai = {
|
|
|
91178
91178
|
placeholder: "sk-..."
|
|
91179
91179
|
}
|
|
91180
91180
|
}
|
|
91181
|
+
},
|
|
91182
|
+
platform: {
|
|
91183
|
+
label: "Enable",
|
|
91184
|
+
helpText: "No credentials needed. Usage is billed to your org credits.",
|
|
91185
|
+
secrets: {}
|
|
91181
91186
|
}
|
|
91182
91187
|
},
|
|
91183
91188
|
defaultAuthMethod: "api-token"
|
|
@@ -113459,55 +113464,7 @@ function matchFirewallPath(path3, pattern) {
|
|
|
113459
113464
|
if (pi !== pathSegs.length) return null;
|
|
113460
113465
|
return params;
|
|
113461
113466
|
}
|
|
113462
|
-
function
|
|
113463
|
-
const gqlIdx = rest.indexOf(" GraphQL");
|
|
113464
|
-
if (gqlIdx === -1) return null;
|
|
113465
|
-
const path3 = gqlIdx > 0 ? rest.slice(0, gqlIdx) : "/";
|
|
113466
|
-
const suffixParts = rest.slice(gqlIdx + 1).split(/\s+/);
|
|
113467
|
-
let typeFilter = null;
|
|
113468
|
-
let opFilter = null;
|
|
113469
|
-
let fieldFilters = null;
|
|
113470
|
-
for (let i = 1; i < suffixParts.length; i++) {
|
|
113471
|
-
const part = suffixParts[i];
|
|
113472
|
-
if (part.startsWith("type:")) {
|
|
113473
|
-
typeFilter = part.slice(5);
|
|
113474
|
-
} else if (part.startsWith("operationName:")) {
|
|
113475
|
-
opFilter = part.slice(14);
|
|
113476
|
-
} else if (part.startsWith("field:")) {
|
|
113477
|
-
fieldFilters = part.slice(6).split(",");
|
|
113478
|
-
}
|
|
113479
|
-
}
|
|
113480
|
-
return { path: path3, typeFilter, opFilter, fieldFilters };
|
|
113481
|
-
}
|
|
113482
|
-
function matchWildcard(value, pattern) {
|
|
113483
|
-
if (pattern.endsWith("*")) {
|
|
113484
|
-
return value.startsWith(pattern.slice(0, -1));
|
|
113485
|
-
}
|
|
113486
|
-
return value === pattern;
|
|
113487
|
-
}
|
|
113488
|
-
function matchGraphQLBody(body, typeFilter, opFilter, fieldFilters) {
|
|
113489
|
-
if (!body) return false;
|
|
113490
|
-
if (typeFilter !== null && body.type !== typeFilter) {
|
|
113491
|
-
return false;
|
|
113492
|
-
}
|
|
113493
|
-
if (opFilter !== null) {
|
|
113494
|
-
const opName = body.operationName;
|
|
113495
|
-
if (!opName) return false;
|
|
113496
|
-
if (!matchWildcard(opName, opFilter)) return false;
|
|
113497
|
-
}
|
|
113498
|
-
if (fieldFilters !== null) {
|
|
113499
|
-
const fields = body.fields;
|
|
113500
|
-
if (!fields || fields.length === 0) return false;
|
|
113501
|
-
if (!fieldFilters.some((pattern) => {
|
|
113502
|
-
return fields.some((f) => {
|
|
113503
|
-
return matchWildcard(f, pattern);
|
|
113504
|
-
});
|
|
113505
|
-
}))
|
|
113506
|
-
return false;
|
|
113507
|
-
}
|
|
113508
|
-
return true;
|
|
113509
|
-
}
|
|
113510
|
-
function findMatchingPermissions(method, path3, config4, graphqlBody) {
|
|
113467
|
+
function findMatchingPermissions(method, path3, config4) {
|
|
113511
113468
|
const upperMethod = method.toUpperCase();
|
|
113512
113469
|
const matched = /* @__PURE__ */ new Set();
|
|
113513
113470
|
for (const api of config4.apis) {
|
|
@@ -113520,17 +113477,7 @@ function findMatchingPermissions(method, path3, config4, graphqlBody) {
|
|
|
113520
113477
|
const ruleMethod = rule.slice(0, spaceIdx).toUpperCase();
|
|
113521
113478
|
const rest = rule.slice(spaceIdx + 1);
|
|
113522
113479
|
if (ruleMethod !== "ANY" && ruleMethod !== upperMethod) continue;
|
|
113523
|
-
|
|
113524
|
-
const rulePath = gql ? gql.path : rest;
|
|
113525
|
-
if (matchFirewallPath(path3, rulePath) !== null) {
|
|
113526
|
-
if (gql && (gql.typeFilter !== null || gql.opFilter !== null || gql.fieldFilters !== null) && !matchGraphQLBody(
|
|
113527
|
-
graphqlBody,
|
|
113528
|
-
gql.typeFilter,
|
|
113529
|
-
gql.opFilter,
|
|
113530
|
-
gql.fieldFilters
|
|
113531
|
-
)) {
|
|
113532
|
-
continue;
|
|
113533
|
-
}
|
|
113480
|
+
if (matchFirewallPath(path3, rest) !== null) {
|
|
113534
113481
|
matched.add(perm.name);
|
|
113535
113482
|
break;
|
|
113536
113483
|
}
|
|
@@ -115594,6 +115541,26 @@ var checkoutResponseSchema = external_exports.object({
|
|
|
115594
115541
|
var portalResponseSchema = external_exports.object({
|
|
115595
115542
|
url: external_exports.string()
|
|
115596
115543
|
});
|
|
115544
|
+
var redeemResponseSchema = external_exports.discriminatedUnion("status", [
|
|
115545
|
+
external_exports.object({
|
|
115546
|
+
status: external_exports.literal("ready"),
|
|
115547
|
+
checkoutUrl: external_exports.string().url()
|
|
115548
|
+
}),
|
|
115549
|
+
external_exports.object({
|
|
115550
|
+
status: external_exports.literal("already_granted")
|
|
115551
|
+
}),
|
|
115552
|
+
external_exports.object({
|
|
115553
|
+
status: external_exports.literal("processing")
|
|
115554
|
+
}),
|
|
115555
|
+
external_exports.object({
|
|
115556
|
+
status: external_exports.literal("error"),
|
|
115557
|
+
reason: external_exports.enum([
|
|
115558
|
+
"campaign_misconfigured",
|
|
115559
|
+
"admin_required",
|
|
115560
|
+
"billing_unavailable"
|
|
115561
|
+
])
|
|
115562
|
+
})
|
|
115563
|
+
]);
|
|
115597
115564
|
var checkoutRequestSchema = external_exports.object({
|
|
115598
115565
|
tier: external_exports.enum(["pro", "team"]),
|
|
115599
115566
|
successUrl: external_exports.string().url(),
|
|
@@ -115607,6 +115574,10 @@ var autoRechargeUpdateRequestSchema = external_exports.object({
|
|
|
115607
115574
|
threshold: external_exports.number().int().positive().optional(),
|
|
115608
115575
|
amount: external_exports.number().int().min(1e3).optional()
|
|
115609
115576
|
});
|
|
115577
|
+
var redeemRequestSchema = external_exports.object({
|
|
115578
|
+
successUrl: external_exports.string().url(),
|
|
115579
|
+
cancelUrl: external_exports.string().url()
|
|
115580
|
+
});
|
|
115610
115581
|
var zeroBillingStatusContract = c34.router({
|
|
115611
115582
|
get: {
|
|
115612
115583
|
method: "GET",
|
|
@@ -115728,6 +115699,24 @@ var zeroBillingDowngradeContract = c34.router({
|
|
|
115728
115699
|
summary: "Downgrade subscription to a lower tier"
|
|
115729
115700
|
}
|
|
115730
115701
|
});
|
|
115702
|
+
var zeroBillingRedeemContract = c34.router({
|
|
115703
|
+
create: {
|
|
115704
|
+
method: "POST",
|
|
115705
|
+
path: "/api/zero/billing/redeem/:campaign",
|
|
115706
|
+
pathParams: external_exports.object({
|
|
115707
|
+
campaign: external_exports.string()
|
|
115708
|
+
}),
|
|
115709
|
+
headers: authHeadersSchema,
|
|
115710
|
+
body: redeemRequestSchema,
|
|
115711
|
+
responses: {
|
|
115712
|
+
200: redeemResponseSchema,
|
|
115713
|
+
400: apiErrorSchema,
|
|
115714
|
+
401: apiErrorSchema,
|
|
115715
|
+
500: apiErrorSchema
|
|
115716
|
+
},
|
|
115717
|
+
summary: "Redeem a one-time campaign"
|
|
115718
|
+
}
|
|
115719
|
+
});
|
|
115731
115720
|
|
|
115732
115721
|
// ../../packages/core/src/contracts/zero-usage.ts
|
|
115733
115722
|
init_esm_shims();
|
|
@@ -117441,6 +117430,12 @@ var FEATURE_SWITCHES = {
|
|
|
117441
117430
|
maintainer: "ethan@vm0.ai",
|
|
117442
117431
|
description: "Enable the DeepSeek-V3.2 (deepseek-chat) VM0 managed model",
|
|
117443
117432
|
enabled: false
|
|
117433
|
+
},
|
|
117434
|
+
["platformConnectors" /* PlatformConnectors */]: {
|
|
117435
|
+
maintainer: "liangyou@vm0.ai",
|
|
117436
|
+
description: "Gate the entire platform-managed connector UI (Enable button and POST /api/zero/platform-connectors/:type). When off, only api-token and OAuth methods surface in connectors list/search, and the enable endpoint 404s. Staff-only during rollout.",
|
|
117437
|
+
enabled: false,
|
|
117438
|
+
enabledOrgIdHashes: STAFF_ORG_ID_HASHES
|
|
117444
117439
|
}
|
|
117445
117440
|
};
|
|
117446
117441
|
function isFeatureEnabled(key, ctx) {
|
|
@@ -120089,4 +120084,4 @@ undici/lib/web/fetch/body.js:
|
|
|
120089
120084
|
undici/lib/web/websocket/frame.js:
|
|
120090
120085
|
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
|
120091
120086
|
*/
|
|
120092
|
-
//# sourceMappingURL=chunk-
|
|
120087
|
+
//# sourceMappingURL=chunk-TO65SA2M.js.map
|