diff --git a/advocacy_docs/pg_extensions/index.mdx b/advocacy_docs/pg_extensions/index.mdx index 3e21a9b47a5..b58a91bf113 100644 --- a/advocacy_docs/pg_extensions/index.mdx +++ b/advocacy_docs/pg_extensions/index.mdx @@ -12,12 +12,13 @@ Categories of extensions: !!! Note For BigAnimal: - - PostgreSQL Compatible corresponds to EDB Postgres Extended Server - - Oracle Compatible corresponds to EDB Postgres Advanced Server + + - PostgreSQL Compatible corresponds to EDB Postgres Extended Server + - Oracle Compatible corresponds to EDB Postgres Advanced Server ## Open source extensions - +
@@ -82,8 +83,8 @@ Categories of extensions: - - + + @@ -94,8 +95,8 @@ Categories of extensions: - - + + @@ -484,18 +485,6 @@ Categories of extensions: - - - - - - - - - - - - @@ -670,8 +659,8 @@ Categories of extensions: - - + + @@ -739,6 +728,30 @@ Categories of extensions: + + + + + + + + + + + + + + + + + + + + + + + + @@ -800,7 +813,7 @@ Categories of extensions: - + @@ -812,8 +825,8 @@ Categories of extensions: - - + + @@ -824,7 +837,7 @@ Categories of extensions: - + @@ -836,8 +849,8 @@ Categories of extensions: - - + + @@ -848,40 +861,40 @@ Categories of extensions: - + - - - + + + - - + + - - - + + + - - + + - - - + + + @@ -891,12 +904,12 @@ Categories of extensions: - - - + + + - + @@ -943,18 +956,6 @@ Categories of extensions: - - - - - - - - - - - - @@ -996,7 +997,7 @@ Categories of extensions: ## EDB extensions -
pgauditYes
pgcrypto Yes
PostgreSQL Non-Contrib Extensions/Modules
pgauditYes
pglogical 2.x
pljava (only v11 and lower)
plpythonu (v12 and lower)plpythonu (default by version) Yes
  plpython2u  hstore_plpythonuYes
  hstore_plpythonu  jsonb_plpythonu Yes
  hstore_plpython2u  ltree_plpythonuYes
  jsonb_plpython2uplpython2u (default v14 and lower)
  jsonb_plpythonuYes  hstore_plpython2u
  ltree_plpythonuYes  jsonb_plpython2u
  ltree_plpython2u
plpython3uplpython3u (default v15 and higher) Yes
pglogical 2.x
pltcl
+
@@ -1154,19 +1155,19 @@ Categories of extensions:
-## Open source and EDB extensions +## EDB supported open source extensions - +
- + - + @@ -1287,7 +1288,7 @@ Categories of extensions: - + diff --git a/scripts/source/extensions-table.js b/scripts/source/extensions-table.js index f0aea910c65..00cb311d756 100644 --- a/scripts/source/extensions-table.js +++ b/scripts/source/extensions-table.js @@ -1,12 +1,10 @@ // retrieve current supported extensions spreadsheet, generate a table from it, write to product_docs/docs/pg_extensions/release/index.mdx // heavily adapted from https://developers.google.com/sheets/api/quickstart/nodejs -const fs = require("fs").promises; -const existsSync = require("fs").existsSync; const path = require("path"); const process = require("process"); -const { authenticate } = require("@google-cloud/local-auth"); const { google } = require("googleapis"); +const { auth } = require("google-auth-library"); const h = require("hastscript"); const toHtml = require("hast-util-to-html"); const remarkParse = require("remark-parse"); @@ -19,16 +17,8 @@ const visit = require("unist-util-visit"); const { read, write } = require("to-vfile"); const rehypeFormat = require("rehype-format"); -// TODO: use token in Github secret store instead of this -// right now, running locally will require you to have configured a project/app -// If modifying these scopes, delete token.json. const SCOPES = ["https://www.googleapis.com/auth/spreadsheets.readonly"]; -// The file token.json stores the user's access and refresh tokens, and is -// created automatically when the authorization flow completes for the first -// time. const SCRIPT_ROOT = path.dirname(process.argv[1]); -const TOKEN_PATH = path.join(SCRIPT_ROOT, "token.json"); -const CREDENTIALS_PATH = path.join(SCRIPT_ROOT, "credentials.json"); const SOURCE_SPREADSHEET = "1GXzzVYT6CULGgGcyp0VtBfOtbxuWxkOU2pRYW42W4pM"; const TARGET_FILE = path.resolve( SCRIPT_ROOT, @@ -41,67 +31,22 @@ const WITNESS_COMMENTS = [ ]; /** - * Reads previously authorized credentials from the save file. - * - * @return {Promise} - */ -async function loadSavedCredentialsIfExist() { - try { - const content = await fs.readFile(TOKEN_PATH); - const credentials = JSON.parse(content); - return google.auth.fromJSON(credentials); - } catch (err) { - return null; - } -} - -/** - * Serializes credentials to a file comptible with GoogleAUth.fromJSON. - * - * @param {OAuth2Client} client - * @return {Promise} - */ -async function saveCredentials(client) { - const content = await fs.readFile(CREDENTIALS_PATH); - const keys = JSON.parse(content); - const key = keys.installed || keys.web; - const payload = JSON.stringify({ - type: "authorized_user", - client_id: key.client_id, - client_secret: key.client_secret, - refresh_token: client.credentials.refresh_token, - }); - await fs.writeFile(TOKEN_PATH, payload); -} - -/** - * Load or request or authorization to call APIs. + * Load credentials for calling APIs. * */ async function authorize() { try { - return google.auth.fromJSON( + let client = auth.fromJSON( JSON.parse(process.env["EXTENSION_SOURCE_TOKEN"]), ); + client.scopes = SCOPES; + return client; } catch (e) { console.error( "Ensure valid client token is stored in EXTENSION_SOURCE_TOKEN!", ); } - if (!existsSync(CREDENTIALS_PATH)) return; - - let client = await loadSavedCredentialsIfExist(); - if (client) { - return client; - } - client = await authenticate({ - scopes: SCOPES, - keyfilePath: CREDENTIALS_PATH, - }); - if (client.credentials) { - await saveCredentials(client); - } - return client; + return null; } const isCellEmpty = (cell) => @@ -182,7 +127,7 @@ const formatCell = (cell, tag) => { /** * Grabs data from the Doc Preview sheet * @see https://docs.google.com/spreadsheets/d/1GXzzVYT6CULGgGcyp0VtBfOtbxuWxkOU2pRYW42W4pM/edit#gid=1884264748 - * @param {google.auth.OAuth2} auth The authenticated Google OAuth client. + * @param {GoogleAuth.JSONClient>} auth The authenticated Google client. */ async function buildTable(auth) { const sheets = google.sheets({ version: "v4", auth }); diff --git a/scripts/source/package-lock.json b/scripts/source/package-lock.json index 5b0c85871f7..5c5ecfa56db 100644 --- a/scripts/source/package-lock.json +++ b/scripts/source/package-lock.json @@ -9,9 +9,9 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@google-cloud/local-auth": "^2.1.0", "arg": "^5.0.1", "globby": "^12.0.1", + "google-auth-library": "^8.7.0", "googleapis": "^105.0.0", "hast-util-to-html": "^7.1.3", "hastscript": "^6.0.0", @@ -334,20 +334,6 @@ "node": ">=6.9.0" } }, - "node_modules/@google-cloud/local-auth": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@google-cloud/local-auth/-/local-auth-2.1.0.tgz", - "integrity": "sha512-ymZ1XuyKcRcro0aiMYz3hVGbZ+QZmN5V1Eyjvw2k1xqq76PwmDer0DIPxdxkLzfW9Inr8+g+MS9t9fZ7dOlTOQ==", - "dependencies": { - "arrify": "^2.0.1", - "google-auth-library": "^8.0.2", - "open": "^7.0.3", - "server-destroy": "^1.0.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/@mdx-js/util": { "version": "1.6.22", "resolved": "https://registry.npmjs.org/@mdx-js/util/-/util-1.6.22.tgz", @@ -817,9 +803,9 @@ } }, "node_modules/google-auth-library": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.5.1.tgz", - "integrity": "sha512-7jNMDRhenfw2HLfL9m0ZP/Jw5hzXygfSprzBdypG3rZ+q2gIUbVC/osrFB7y/Z5dkrUr1mnLoDNlerF+p6VXZA==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.7.0.tgz", + "integrity": "sha512-1M0NG5VDIvJZEnstHbRdckLZESoJwguinwN8Dhae0j2ZKIQFIV63zxm6Fo6nM4xkgqUr2bbMtV5Dgo+Hy6oo0Q==", "dependencies": { "arrify": "^2.0.0", "base64-js": "^1.3.0", @@ -1173,20 +1159,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -1260,17 +1232,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -1471,21 +1432,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/open": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", - "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", - "dependencies": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/parse-entities": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", @@ -1814,11 +1760,6 @@ "semver": "bin/semver" } }, - "node_modules/server-destroy": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", - "integrity": "sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==" - }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -2369,17 +2310,6 @@ "to-fast-properties": "^2.0.0" } }, - "@google-cloud/local-auth": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@google-cloud/local-auth/-/local-auth-2.1.0.tgz", - "integrity": "sha512-ymZ1XuyKcRcro0aiMYz3hVGbZ+QZmN5V1Eyjvw2k1xqq76PwmDer0DIPxdxkLzfW9Inr8+g+MS9t9fZ7dOlTOQ==", - "requires": { - "arrify": "^2.0.1", - "google-auth-library": "^8.0.2", - "open": "^7.0.3", - "server-destroy": "^1.0.1" - } - }, "@mdx-js/util": { "version": "1.6.22", "resolved": "https://registry.npmjs.org/@mdx-js/util/-/util-1.6.22.tgz", @@ -2712,9 +2642,9 @@ } }, "google-auth-library": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.5.1.tgz", - "integrity": "sha512-7jNMDRhenfw2HLfL9m0ZP/Jw5hzXygfSprzBdypG3rZ+q2gIUbVC/osrFB7y/Z5dkrUr1mnLoDNlerF+p6VXZA==", + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.7.0.tgz", + "integrity": "sha512-1M0NG5VDIvJZEnstHbRdckLZESoJwguinwN8Dhae0j2ZKIQFIV63zxm6Fo6nM4xkgqUr2bbMtV5Dgo+Hy6oo0Q==", "requires": { "arrify": "^2.0.0", "base64-js": "^1.3.0", @@ -2946,11 +2876,6 @@ "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==" }, - "is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==" - }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2994,14 +2919,6 @@ "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.4.tgz", "integrity": "sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA==" }, - "is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "requires": { - "is-docker": "^2.0.0" - } - }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3141,15 +3058,6 @@ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" }, - "open": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", - "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", - "requires": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - } - }, "parse-entities": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", @@ -3374,11 +3282,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, - "server-destroy": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", - "integrity": "sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==" - }, "side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", diff --git a/scripts/source/package.json b/scripts/source/package.json index 57d8bf78ad7..31b7f2684ea 100644 --- a/scripts/source/package.json +++ b/scripts/source/package.json @@ -10,9 +10,9 @@ "author": "", "license": "ISC", "dependencies": { - "@google-cloud/local-auth": "^2.1.0", "arg": "^5.0.1", "globby": "^12.0.1", + "google-auth-library": "^8.7.0", "googleapis": "^105.0.0", "hast-util-to-html": "^7.1.3", "hastscript": "^6.0.0",
Virtual Machines/Physical Servers Kubernetes BigAnimal
Extension nameExtension name Requires superuser access PostgreSQL EDB Postgres Extended Server