From e71f083c5068503b65fad915262d5ae6c7c83d58 Mon Sep 17 00:00:00 2001 From: Bat-Zion Rotman Date: Thu, 10 Oct 2024 17:36:52 +0300 Subject: [PATCH] fix(orchestrator): remove docs feature (#2341) * Revert "fix(orchestrator): fix dynamic plugin build (#2326)" This reverts commit 7a3b155992397d6fbabb0b6f47b21bfcbe13ffbd. * fix(orchestrator): remove docs feature that breaks multi-release-version --- .../dist-dynamic/package.json | 12 +- .../dist-dynamic/yarn.lock | 106 +++++++----------- plugins/orchestrator-backend/package.json | 2 +- .../src/OrchestratorPlugin.ts | 4 - .../src/service/router.ts | 10 -- 5 files changed, 49 insertions(+), 85 deletions(-) diff --git a/plugins/orchestrator-backend/dist-dynamic/package.json b/plugins/orchestrator-backend/dist-dynamic/package.json index 32bfb5532b..4f79cf8499 100644 --- a/plugins/orchestrator-backend/dist-dynamic/package.json +++ b/plugins/orchestrator-backend/dist-dynamic/package.json @@ -3,7 +3,7 @@ "version": "2.2.0", "license": "Apache-2.0", "main": "./dist/index.cjs.js", - "types": "./dist/index.d.ts", + "types": "src/index.ts", "publishConfig": { "access": "public" }, @@ -20,7 +20,6 @@ "exports": { ".": { "require": "./dist/index.cjs.js", - "types": "./dist/index.d.ts", "default": "./dist/index.cjs.js" }, "./package.json": "./package.json" @@ -47,7 +46,6 @@ ], "scripts": {}, "dependencies": { - "@janus-idp/backstage-plugin-orchestrator-common": "*", "@urql/core": "^4.1.4", "ajv-formats": "^2.1.1", "cloudevents": "^8.0.0", @@ -58,7 +56,10 @@ "json-schema": "^0.4.0", "moment": "^2.29.4", "openapi-backend": "^5.10.5", - "yn": "^5.0.0" + "yn": "^5.0.0", + "@severlessworkflow/sdk-typescript": "^3.0.3", + "js-yaml": "^4.1.0", + "axios": "^1.7.4" }, "devDependencies": {}, "peerDependencies": { @@ -90,7 +91,6 @@ } }, "resolutions": { - "@aws-sdk/util-utf8-browser": "npm:@smithy/util-utf8@~2", - "@janus-idp/backstage-plugin-orchestrator-common": "file:./embedded/janus-idp-backstage-plugin-orchestrator-common" + "@aws-sdk/util-utf8-browser": "npm:@smithy/util-utf8@~2" } } diff --git a/plugins/orchestrator-backend/dist-dynamic/yarn.lock b/plugins/orchestrator-backend/dist-dynamic/yarn.lock index 349f3a9514..690729d693 100644 --- a/plugins/orchestrator-backend/dist-dynamic/yarn.lock +++ b/plugins/orchestrator-backend/dist-dynamic/yarn.lock @@ -3,14 +3,14 @@ "@0no-co/graphql.web@^1.0.1": - version "1.0.7" - resolved "https://registry.yarnpkg.com/@0no-co/graphql.web/-/graphql.web-1.0.7.tgz#c7a762c887b3482a79ffa68f63de5e96059a62e4" - integrity sha512-E3Qku4mTzdrlwVWGPxklDnME5ANrEGetvYw4i2GCRlppWXXE4QD66j7pwb8HelZwS6LnqEChhrSOGCXpbiu6MQ== + version "1.0.8" + resolved "https://registry.yarnpkg.com/@0no-co/graphql.web/-/graphql.web-1.0.8.tgz#20682c7839b0b5b7728ad944a8602ca46d983e75" + integrity sha512-8BG6woLtDMvXB9Ajb/uE+Zr/U7y4qJ3upXi0JQHZmsKUJa7HjF/gFvmL2f3/mSmfZoQGRr9VoY97LCX2uaFMzA== "@apidevtools/json-schema-ref-parser@^11.1.0": - version "11.6.1" - resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.6.1.tgz#ce462f4fe6d1f952f3695f3c05eac955f177ac43" - integrity sha512-DxjgKBCoyReu4p5HMvpmgSOfRhhBcuf5V5soDDRgOTZMwsA4KSFzol1abFZgiCTE11L2kKGca5Md9GwDdXVBwQ== + version "11.7.0" + resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.7.0.tgz#228d72018a0e7cbee744b677eaa01a8968f302d9" + integrity sha512-pRrmXMCwnmrkS3MLgAIW5dXRzeTv6GLjkjb4HmxNnvAKXN1Nfzp4KmGADBQvlVUcqi+a5D+hfGDLLnd5NnYxog== dependencies: "@jsdevtools/ono" "^7.1.3" "@types/json-schema" "^7.0.15" @@ -24,14 +24,6 @@ "@smithy/util-buffer-from" "^2.2.0" tslib "^2.6.2" -"@janus-idp/backstage-plugin-orchestrator-common@*", "@janus-idp/backstage-plugin-orchestrator-common@file:./embedded\\janus-idp-backstage-plugin-orchestrator-common": - version "1.20.0" - dependencies: - "@severlessworkflow/sdk-typescript" "^3.0.3" - axios "^1.7.4" - js-yaml "^4.1.0" - json-schema "^0.4.0" - "@jsdevtools/ono@^7.1.3": version "7.1.3" resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" @@ -89,14 +81,14 @@ ajv-formats@^2.0.2, ajv-formats@^2.1.1: ajv "^8.0.0" ajv@^8.0.0, ajv@^8.1.0, ajv@^8.11.0, ajv@^8.6.2: - version "8.13.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.13.0.tgz#a3939eaec9fb80d217ddf0c3376948c023f28c91" - integrity sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA== + version "8.17.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== dependencies: fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" json-schema-traverse "^1.0.0" require-from-string "^2.0.2" - uri-js "^4.4.1" argparse@^2.0.1: version "2.0.1" @@ -108,7 +100,7 @@ array-flatten@1.1.1: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== -async-lock@^1.1.0: +async-lock@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/async-lock/-/async-lock-1.4.1.tgz#56b8718915a9b68b10fce2f2a9a3dddf765ef53f" integrity sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ== @@ -126,9 +118,9 @@ available-typed-arrays@^1.0.7: possible-typed-array-names "^1.0.0" axios@^1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.4.tgz#4c8ded1b43683c8dd362973c393f3ede24052aa2" - integrity sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw== + version "1.7.7" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f" + integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0" @@ -184,9 +176,9 @@ clean-git-ref@^2.0.1: integrity sha512-bLSptAy2P0s6hU4PzuIMKmMJJSE6gLXGH1cntDu7bWJUksvuM+7ReOK61mozULErYvP6a15rnYl0zFDef+pyPw== cloudevents@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/cloudevents/-/cloudevents-8.0.0.tgz#d5e3f9f56fc70aad5a97f3ea272559d8b7d74317" - integrity sha512-G1Z/r8QMFAsP+F1PuZSHzx1ocPy4vrdQMTHD3orjDaM5kccmPU6nMmpVrF07b53aaxcrLbORUmRepY/DgvdhVw== + version "8.0.2" + resolved "https://registry.yarnpkg.com/cloudevents/-/cloudevents-8.0.2.tgz#034bde4e1a0ee21a8a34b8fe837e7d98c8bbdf8d" + integrity sha512-93KKRR61D2NNE+2lg2HmLbl17beVTKpf1UYd/8BcXpuiDxbU2fb8gAfriSmVGmj1xX/Oh2t5Fh/xGOWFdu6F4A== dependencies: ajv "^8.11.0" ajv-formats "^2.1.1" @@ -370,6 +362,11 @@ fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +fast-uri@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.2.tgz#d78b298cf70fd3b752fd951175a3da6a7b48f024" + integrity sha512-GR6f0hD7XXyNJa25Tb9BuIdN0tdr+0BMi6/CJPH3wJO1JjNG3n/VsSw38AwRdKZABm8lGbPfakLRkYzx2V9row== + finalhandler@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.3.1.tgz#0c575f1d1d324ddd1da35ad7ece3df7d19088019" @@ -384,9 +381,9 @@ finalhandler@1.3.1: unpipe "~1.0.0" follow-redirects@^1.15.6: - version "1.15.6" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" - integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== + version "1.15.9" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1" + integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== for-each@^0.3.3: version "0.3.3" @@ -501,9 +498,9 @@ iconv-lite@0.4.24: safer-buffer ">= 2.1.2 < 3" ignore@^5.1.4: - version "5.3.1" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" - integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3: version "2.0.4" @@ -548,11 +545,11 @@ is-typed-array@^1.1.3: which-typed-array "^1.1.14" isomorphic-git@^1.23.0: - version "1.25.9" - resolved "https://registry.yarnpkg.com/isomorphic-git/-/isomorphic-git-1.25.9.tgz#e57ec36fe74a4efd90de450dbe622a439e2fef7c" - integrity sha512-s/KFSOP2/0I8EK0RreK9ZHurUW2At30jDEp1W0WUWT0ANtEKt4ArQbSgoUsZ0tyTiiUnTvR3MYx6BtrHwAEa1Q== + version "1.27.1" + resolved "https://registry.yarnpkg.com/isomorphic-git/-/isomorphic-git-1.27.1.tgz#a2752fce23a09f04baa590c41cfaf61e973405b3" + integrity sha512-X32ph5zIWfT75QAqW2l3JCIqnx9/GWd17bRRehmn3qmWc34OYbSXY6Cxv0o9bIIY+CWugoN4nQFHNA+2uYf2nA== dependencies: - async-lock "^1.1.0" + async-lock "^1.4.1" clean-git-ref "^2.0.1" crc-32 "^1.2.0" diff3 "0.0.3" @@ -689,9 +686,9 @@ negotiator@0.6.3: integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== object-inspect@^1.13.1: - version "1.13.1" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" - integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== + version "1.13.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" + integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== on-finished@2.4.1: version "2.4.1" @@ -708,9 +705,9 @@ once@^1.3.1: wrappy "1" openapi-backend@^5.10.5: - version "5.10.6" - resolved "https://registry.yarnpkg.com/openapi-backend/-/openapi-backend-5.10.6.tgz#e719be85d006a1379900d0ff5c8f60baecb5de21" - integrity sha512-vTjBRys/O4JIHdlRHUKZ7pxS+gwIJreAAU9dvYRFrImtPzQ5qxm5a6B8BTVT9m6I8RGGsShJv35MAc3Tu2/y/A== + version "5.11.0" + resolved "https://registry.yarnpkg.com/openapi-backend/-/openapi-backend-5.11.0.tgz#4b92d56f4d203989060ee168a95bbcf4115b30cf" + integrity sha512-c2p93u0NHUc4Fk2kw4rlReakxNnBw4wMMybOTh0LC/BU0Qp7YIphWwJOfNfq2f9nGe/FeCRxGG6VmtCDgkIjdA== dependencies: "@apidevtools/json-schema-ref-parser" "^11.1.0" ajv "^8.6.2" @@ -781,25 +778,13 @@ proxy-from-env@^1.1.0: resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== -punycode@^2.1.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" - integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== - -qs@6.13.0: +qs@6.13.0, qs@^6.9.3: version "6.13.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== dependencies: side-channel "^1.0.6" -qs@^6.9.3: - version "6.12.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.1.tgz#39422111ca7cbdb70425541cba20c7d7b216599a" - integrity sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ== - dependencies: - side-channel "^1.0.6" - range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" @@ -935,9 +920,9 @@ toidentifier@1.0.1: integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== tslib@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" - integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + version "2.7.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01" + integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA== type-is@~1.6.18: version "1.6.18" @@ -957,13 +942,6 @@ unpipe@1.0.0, unpipe@~1.0.0: resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== -uri-js@^4.4.1: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - util-deprecate@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" diff --git a/plugins/orchestrator-backend/package.json b/plugins/orchestrator-backend/package.json index a8bf73c8af..39588b7119 100644 --- a/plugins/orchestrator-backend/package.json +++ b/plugins/orchestrator-backend/package.json @@ -60,7 +60,7 @@ "prepack": "backstage-cli package prepack", "postpack": "backstage-cli package postpack", "postversion": "yarn run export-dynamic", - "export-dynamic": "janus-cli package export-dynamic-plugin" + "export-dynamic": "janus-cli package export-dynamic-plugin --no-embed-as-dependencies" }, "dependencies": { "@backstage/backend-common": "^0.23.3", diff --git a/plugins/orchestrator-backend/src/OrchestratorPlugin.ts b/plugins/orchestrator-backend/src/OrchestratorPlugin.ts index 67b21f323b..1e5927c562 100644 --- a/plugins/orchestrator-backend/src/OrchestratorPlugin.ts +++ b/plugins/orchestrator-backend/src/OrchestratorPlugin.ts @@ -54,10 +54,6 @@ export const orchestratorPlugin = createBackendPlugin({ path: '/health', allow: 'unauthenticated', }); - httpRouter.addAuthPolicy({ - path: '/docs', - allow: 'unauthenticated', - }); }, }); }, diff --git a/plugins/orchestrator-backend/src/service/router.ts b/plugins/orchestrator-backend/src/service/router.ts index c123c70787..dbb64bb5b5 100644 --- a/plugins/orchestrator-backend/src/service/router.ts +++ b/plugins/orchestrator-backend/src/service/router.ts @@ -107,16 +107,6 @@ export async function createBackendRouter( router.use(permissionsIntegrationRouter); router.use('/workflows', express.text()); router.use('/static', express.static(resolvePackagePath(pkg.name, 'static'))); - router.use( - '/docs', - express.static( - resolvePackagePath( - '@janus-idp/backstage-plugin-orchestrator-common', - 'src/generated/docs/html', - ), - ), - ); - router.get('/health', (_, response) => { logger.info('PONG!'); response.json({ status: 'ok' });