executor 1.2.2 → 1.2.3
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/executor.mjs +41 -3
- package/package.json +1 -1
- package/resources/web/assets/{highlighted-body-TPN3WLV5-C5w_3Mk1.js → highlighted-body-TPN3WLV5-BU4VAH4d.js} +1 -1
- package/resources/web/assets/{index-A2564Iap.js → index-CLUuOdL1.js} +2 -2
- package/resources/web/assets/{mermaid-O7DHMXV3--BgdD7JQ.js → mermaid-O7DHMXV3-Bjib29xY.js} +129 -129
- package/resources/web/index.html +1 -1
package/bin/executor.mjs
CHANGED
|
@@ -382321,13 +382321,47 @@ var googleDiscoveryCatalogOperationFromDefinition = (input) => {
|
|
|
382321
382321
|
providerData: presentation.providerData
|
|
382322
382322
|
};
|
|
382323
382323
|
};
|
|
382324
|
+
var computeMaximalScopes = (manifest) => {
|
|
382325
|
+
const topLevelScopes = Object.keys(manifest.oauthScopes ?? {});
|
|
382326
|
+
if (topLevelScopes.length === 0)
|
|
382327
|
+
return [];
|
|
382328
|
+
const scopeToMethods = new Map;
|
|
382329
|
+
for (const scope4 of topLevelScopes) {
|
|
382330
|
+
scopeToMethods.set(scope4, new Set);
|
|
382331
|
+
}
|
|
382332
|
+
for (const method of manifest.methods) {
|
|
382333
|
+
for (const scope4 of method.scopes) {
|
|
382334
|
+
scopeToMethods.get(scope4)?.add(method.methodId);
|
|
382335
|
+
}
|
|
382336
|
+
}
|
|
382337
|
+
const maximal = topLevelScopes.filter((scope4) => {
|
|
382338
|
+
const methods = scopeToMethods.get(scope4);
|
|
382339
|
+
if (!methods || methods.size === 0)
|
|
382340
|
+
return true;
|
|
382341
|
+
return !topLevelScopes.some((other) => {
|
|
382342
|
+
if (other === scope4)
|
|
382343
|
+
return false;
|
|
382344
|
+
const otherMethods = scopeToMethods.get(other);
|
|
382345
|
+
if (!otherMethods || otherMethods.size <= methods.size)
|
|
382346
|
+
return false;
|
|
382347
|
+
for (const m of methods) {
|
|
382348
|
+
if (!otherMethods.has(m))
|
|
382349
|
+
return false;
|
|
382350
|
+
}
|
|
382351
|
+
return true;
|
|
382352
|
+
});
|
|
382353
|
+
});
|
|
382354
|
+
return maximal;
|
|
382355
|
+
};
|
|
382324
382356
|
var googleDiscoveryOauth2SetupConfig = (source2) => gen2(function* () {
|
|
382325
382357
|
const bindingConfig = yield* googleDiscoveryBindingConfigFromSource(source2);
|
|
382326
382358
|
const configuredScopes = bindingConfig.scopes ?? [];
|
|
382327
|
-
const
|
|
382359
|
+
const manifest = yield* fetchGoogleDiscoveryDocumentWithHeaders({
|
|
382328
382360
|
url: bindingConfig.discoveryUrl,
|
|
382329
382361
|
headers: bindingConfig.defaultHeaders ?? undefined
|
|
382330
|
-
}).pipe(flatMap10((document2) => extractGoogleDiscoveryManifest(source2.name, document2)),
|
|
382362
|
+
}).pipe(flatMap10((document2) => extractGoogleDiscoveryManifest(source2.name, document2)), catchAll2(() => succeed8(null)));
|
|
382363
|
+
const discoveryScopes = manifest ? computeMaximalScopes(manifest) : [];
|
|
382364
|
+
const scopes = discoveryScopes.length > 0 ? [...new Set([...discoveryScopes, ...configuredScopes])] : configuredScopes;
|
|
382331
382365
|
if (scopes.length === 0) {
|
|
382332
382366
|
return null;
|
|
382333
382367
|
}
|
|
@@ -412649,6 +412683,9 @@ var refreshOAuth2AccessToken = (input) => gen2(function* () {
|
|
|
412649
412683
|
if (input.clientAuthentication === "client_secret_post" && input.clientSecret) {
|
|
412650
412684
|
body2.set("client_secret", input.clientSecret);
|
|
412651
412685
|
}
|
|
412686
|
+
if (input.scopes && input.scopes.length > 0) {
|
|
412687
|
+
body2.set("scope", input.scopes.join(" "));
|
|
412688
|
+
}
|
|
412652
412689
|
return yield* postFormToOAuth2TokenEndpoint({
|
|
412653
412690
|
tokenEndpoint: input.tokenEndpoint,
|
|
412654
412691
|
body: body2
|
|
@@ -412784,7 +412821,8 @@ var refreshProviderGrantRefArtifact = (input) => gen2(function* () {
|
|
|
412784
412821
|
clientId: oauthClient.clientId,
|
|
412785
412822
|
clientAuthentication: grant.clientAuthentication,
|
|
412786
412823
|
clientSecret,
|
|
412787
|
-
refreshToken
|
|
412824
|
+
refreshToken,
|
|
412825
|
+
scopes: config3.requiredScopes.length > 0 ? config3.requiredScopes : null
|
|
412788
412826
|
});
|
|
412789
412827
|
const storeSecretMaterial = createDefaultSecretMaterialStorer({
|
|
412790
412828
|
rows: input.rows
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,R as c,M as p,B as x}from"./mermaid-O7DHMXV3
|
|
1
|
+
import{r,R as c,M as p,B as x}from"./mermaid-O7DHMXV3-Bjib29xY.js";import{j as d}from"./index-CRuElBS1.js";var R=({code:i,language:e,raw:t,className:g,startLine:u,...m})=>{let{shikiTheme:o}=r.useContext(c),a=p(),[n,s]=r.useState(t);return r.useEffect(()=>{if(!a){s(t);return}let l=a.highlight({code:i,language:e,themes:o},h=>{s(h)});l&&s(l)},[i,e,o,a,t]),d.jsx(x,{className:g,language:e,result:n,startLine:u,...m})};export{R as HighlightedCodeBlockBody};
|