@vm0/cli 9.175.1 → 9.176.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-23CPS6PB.js → chunk-TPUYVLNY.js} +42 -27
- package/{chunk-23CPS6PB.js.map → chunk-TPUYVLNY.js.map} +1 -1
- package/index.js +9 -9
- package/package.json +1 -1
- package/zero.js +43 -13
- package/zero.js.map +1 -1
|
@@ -74083,7 +74083,7 @@ if (DSN) {
|
|
|
74083
74083
|
init2({
|
|
74084
74084
|
dsn: DSN,
|
|
74085
74085
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
74086
|
-
release: "9.
|
|
74086
|
+
release: "9.176.1",
|
|
74087
74087
|
sendDefaultPii: false,
|
|
74088
74088
|
tracesSampleRate: 0,
|
|
74089
74089
|
shutdownTimeout: 500,
|
|
@@ -74102,7 +74102,7 @@ if (DSN) {
|
|
|
74102
74102
|
}
|
|
74103
74103
|
});
|
|
74104
74104
|
setContext("cli", {
|
|
74105
|
-
version: "9.
|
|
74105
|
+
version: "9.176.1",
|
|
74106
74106
|
command: process.argv.slice(2).join(" ")
|
|
74107
74107
|
});
|
|
74108
74108
|
setContext("runtime", {
|
|
@@ -106669,7 +106669,7 @@ var zeroConnectorSessionsContract = c13.router({
|
|
|
106669
106669
|
401: apiErrorSchema,
|
|
106670
106670
|
403: apiErrorSchema
|
|
106671
106671
|
},
|
|
106672
|
-
summary: "Create connector session for
|
|
106672
|
+
summary: "Create connector session for auth-code handoff"
|
|
106673
106673
|
}
|
|
106674
106674
|
});
|
|
106675
106675
|
var zeroConnectorSessionByIdContract = c13.router({
|
|
@@ -115322,6 +115322,16 @@ var GOOGLE_OAUTH_CONNECTOR_TYPES = [
|
|
|
115322
115322
|
var GOOGLE_OAUTH_CONNECTOR_TYPE_SET = new Set(GOOGLE_OAUTH_CONNECTOR_TYPES);
|
|
115323
115323
|
|
|
115324
115324
|
// ../../packages/connectors/src/connector-utils.ts
|
|
115325
|
+
function getConnectorAuthMethod(type, authMethod) {
|
|
115326
|
+
for (const [methodId, method] of Object.entries(
|
|
115327
|
+
CONNECTOR_TYPES[type].authMethods
|
|
115328
|
+
)) {
|
|
115329
|
+
if (methodId === authMethod) {
|
|
115330
|
+
return method;
|
|
115331
|
+
}
|
|
115332
|
+
}
|
|
115333
|
+
return void 0;
|
|
115334
|
+
}
|
|
115325
115335
|
function connectorAuthMethodValues(type) {
|
|
115326
115336
|
return Object.values(CONNECTOR_TYPES[type].authMethods);
|
|
115327
115337
|
}
|
|
@@ -115350,23 +115360,21 @@ function authMethodAccessPriority(method) {
|
|
|
115350
115360
|
return 1;
|
|
115351
115361
|
}
|
|
115352
115362
|
}
|
|
115353
|
-
function
|
|
115354
|
-
switch (
|
|
115363
|
+
function connectorGrantScopes(grant) {
|
|
115364
|
+
switch (grant?.kind) {
|
|
115355
115365
|
case "auth-code":
|
|
115356
115366
|
case "device-auth":
|
|
115357
|
-
return
|
|
115367
|
+
return grant.scopes;
|
|
115358
115368
|
case "manual":
|
|
115359
115369
|
case "managed":
|
|
115360
|
-
|
|
115370
|
+
case void 0:
|
|
115371
|
+
return [];
|
|
115361
115372
|
}
|
|
115362
115373
|
}
|
|
115363
|
-
function
|
|
115364
|
-
|
|
115365
|
-
|
|
115366
|
-
|
|
115367
|
-
}
|
|
115368
|
-
}
|
|
115369
|
-
return void 0;
|
|
115374
|
+
function getConnectorAuthMethodGrantScopes(type, authMethod) {
|
|
115375
|
+
return [
|
|
115376
|
+
...connectorGrantScopes(getConnectorAuthMethod(type, authMethod)?.grant)
|
|
115377
|
+
];
|
|
115370
115378
|
}
|
|
115371
115379
|
function getConnectorGenerationTypes(type) {
|
|
115372
115380
|
const config4 = CONNECTOR_TYPES[type];
|
|
@@ -115428,20 +115436,15 @@ function getConnectorEnvNamesForSecret(secretName) {
|
|
|
115428
115436
|
}
|
|
115429
115437
|
return null;
|
|
115430
115438
|
}
|
|
115431
|
-
function
|
|
115432
|
-
|
|
115433
|
-
if (!scopes) return true;
|
|
115434
|
-
if (scopes.length === 0) return true;
|
|
115439
|
+
function hasRequiredGrantScopes(requiredScopes, storedScopes) {
|
|
115440
|
+
if (requiredScopes.length === 0) return true;
|
|
115435
115441
|
if (!storedScopes) return false;
|
|
115436
115442
|
const storedSet = new Set(storedScopes);
|
|
115437
|
-
return
|
|
115443
|
+
return requiredScopes.every((s) => {
|
|
115438
115444
|
return storedSet.has(s);
|
|
115439
115445
|
});
|
|
115440
115446
|
}
|
|
115441
|
-
function
|
|
115442
|
-
const currentScopes = [
|
|
115443
|
-
...getConnectorOAuthGrantConfig(connectorType)?.scopes ?? []
|
|
115444
|
-
];
|
|
115447
|
+
function scopeDiff(currentScopes, storedScopes) {
|
|
115445
115448
|
const stored = storedScopes ?? [];
|
|
115446
115449
|
const storedSet = new Set(stored);
|
|
115447
115450
|
const currentSet = new Set(currentScopes);
|
|
@@ -115452,10 +115455,22 @@ function getScopeDiff(connectorType, storedScopes) {
|
|
|
115452
115455
|
removedScopes: stored.filter((s) => {
|
|
115453
115456
|
return !currentSet.has(s);
|
|
115454
115457
|
}),
|
|
115455
|
-
currentScopes,
|
|
115458
|
+
currentScopes: [...currentScopes],
|
|
115456
115459
|
storedScopes: stored
|
|
115457
115460
|
};
|
|
115458
115461
|
}
|
|
115462
|
+
function hasRequiredConnectorAuthMethodScopes(connectorType, authMethod, storedScopes) {
|
|
115463
|
+
return hasRequiredGrantScopes(
|
|
115464
|
+
getConnectorAuthMethodGrantScopes(connectorType, authMethod),
|
|
115465
|
+
storedScopes
|
|
115466
|
+
);
|
|
115467
|
+
}
|
|
115468
|
+
function getConnectorAuthMethodScopeDiff(connectorType, authMethod, storedScopes) {
|
|
115469
|
+
return scopeDiff(
|
|
115470
|
+
getConnectorAuthMethodGrantScopes(connectorType, authMethod),
|
|
115471
|
+
storedScopes
|
|
115472
|
+
);
|
|
115473
|
+
}
|
|
115459
115474
|
function getConnectorTypeForSecretName(name) {
|
|
115460
115475
|
const allTypes = CONNECTOR_TYPE_KEYS;
|
|
115461
115476
|
for (const type of allTypes) {
|
|
@@ -132683,8 +132698,8 @@ export {
|
|
|
132683
132698
|
getConnectorGenerationTypes,
|
|
132684
132699
|
getConnectorEnvBindings,
|
|
132685
132700
|
getConnectorEnvNamesForSecret,
|
|
132686
|
-
|
|
132687
|
-
|
|
132701
|
+
hasRequiredConnectorAuthMethodScopes,
|
|
132702
|
+
getConnectorAuthMethodScopeDiff,
|
|
132688
132703
|
getConnectorTypeForSecretName,
|
|
132689
132704
|
isFirewallConnectorType,
|
|
132690
132705
|
getConnectorFirewall,
|
|
@@ -132717,4 +132732,4 @@ undici/lib/web/fetch/body.js:
|
|
|
132717
132732
|
undici/lib/web/websocket/frame.js:
|
|
132718
132733
|
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
|
132719
132734
|
*/
|
|
132720
|
-
//# sourceMappingURL=chunk-
|
|
132735
|
+
//# sourceMappingURL=chunk-TPUYVLNY.js.map
|