@techdocs/cli 1.8.24 → 1.8.25-next.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/CHANGELOG.md +22 -0
- package/dist/embedded-app/.config-schema.json +1898 -1286
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/{124.c9dccb21.chunk.js → 124.f02a9318.chunk.js} +2 -2
- package/dist/embedded-app/static/{124.c9dccb21.chunk.js.map → 124.f02a9318.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{1297.5286dfc5.chunk.js → 1297.39864036.chunk.js} +2 -2
- package/dist/embedded-app/static/{1297.5286dfc5.chunk.js.map → 1297.39864036.chunk.js.map} +1 -1
- package/dist/embedded-app/static/2177.89ce5c05.chunk.js +4 -0
- package/dist/embedded-app/static/2177.89ce5c05.chunk.js.map +1 -0
- package/dist/embedded-app/static/{2401.73c0abd9.chunk.js → 2401.4d69c234.chunk.js} +2 -2
- package/dist/embedded-app/static/{2401.73c0abd9.chunk.js.map → 2401.4d69c234.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{2420.f4515d6b.chunk.js → 2420.979e1d31.chunk.js} +2 -2
- package/dist/embedded-app/static/{2420.f4515d6b.chunk.js.map → 2420.979e1d31.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{287.93e12210.chunk.js → 287.e0b65890.chunk.js} +2 -2
- package/dist/embedded-app/static/{287.93e12210.chunk.js.map → 287.e0b65890.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{3182.b8a79377.chunk.js → 3182.0ac241c5.chunk.js} +2 -2
- package/dist/embedded-app/static/{3182.b8a79377.chunk.js.map → 3182.0ac241c5.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{3632.e83e9e79.chunk.js → 3632.f343436e.chunk.js} +2 -2
- package/dist/embedded-app/static/{3632.e83e9e79.chunk.js.map → 3632.f343436e.chunk.js.map} +1 -1
- package/dist/embedded-app/static/3720.646b3e89.chunk.js +11 -0
- package/dist/embedded-app/static/3720.646b3e89.chunk.js.map +1 -0
- package/dist/embedded-app/static/5724.a402c41f.chunk.js +4 -0
- package/dist/embedded-app/static/5724.a402c41f.chunk.js.map +1 -0
- package/dist/embedded-app/static/{6271.e3f614f0.chunk.js → 6271.020ea145.chunk.js} +2 -2
- package/dist/embedded-app/static/{6271.e3f614f0.chunk.js.map → 6271.020ea145.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{6415.dd062904.chunk.js → 6415.493349e2.chunk.js} +2 -2
- package/dist/embedded-app/static/{6415.dd062904.chunk.js.map → 6415.493349e2.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8307.a297621e.chunk.js → 8307.b0a2a85f.chunk.js} +2 -2
- package/dist/embedded-app/static/{8307.a297621e.chunk.js.map → 8307.b0a2a85f.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8384.34bb2920.chunk.js → 8384.b9605cda.chunk.js} +2 -2
- package/dist/embedded-app/static/{8384.34bb2920.chunk.js.map → 8384.b9605cda.chunk.js.map} +1 -1
- package/dist/embedded-app/static/8803.20e0d00b.chunk.js +11 -0
- package/dist/embedded-app/static/8803.20e0d00b.chunk.js.map +1 -0
- package/dist/embedded-app/static/{9652.87ca2ab5.chunk.js → 9652.78fa0c73.chunk.js} +2 -2
- package/dist/embedded-app/static/{9652.87ca2ab5.chunk.js.map → 9652.78fa0c73.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{main.008b195d.js → main.b64c6be2.js} +5 -5
- package/dist/embedded-app/static/main.b64c6be2.js.map +1 -0
- package/dist/embedded-app/static/{module-material-ui.05c1a36a.js → module-material-ui.909829ed.js} +3 -3
- package/dist/embedded-app/static/{module-material-ui.05c1a36a.js.map → module-material-ui.909829ed.js.map} +1 -1
- package/dist/embedded-app/static/{runtime.008b195d.js → runtime.b64c6be2.js} +2 -2
- package/dist/embedded-app/static/{runtime.008b195d.js.map → runtime.b64c6be2.js.map} +1 -1
- package/dist/embedded-app/static/vendor.b64c6be2.js +170 -0
- package/dist/embedded-app/static/vendor.b64c6be2.js.map +1 -0
- package/dist/package.json.cjs.js +1 -1
- package/package.json +7 -7
- package/dist/embedded-app/static/2177.8343b97e.chunk.js +0 -4
- package/dist/embedded-app/static/2177.8343b97e.chunk.js.map +0 -1
- package/dist/embedded-app/static/3720.68bd02ba.chunk.js +0 -11
- package/dist/embedded-app/static/3720.68bd02ba.chunk.js.map +0 -1
- package/dist/embedded-app/static/5724.a8d74000.chunk.js +0 -4
- package/dist/embedded-app/static/5724.a8d74000.chunk.js.map +0 -1
- package/dist/embedded-app/static/8803.2d9f247d.chunk.js +0 -11
- package/dist/embedded-app/static/8803.2d9f247d.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.008b195d.js.map +0 -1
- package/dist/embedded-app/static/vendor.008b195d.js +0 -170
- package/dist/embedded-app/static/vendor.008b195d.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static/3720.68bd02ba.chunk.js","mappings":"oJAEIA,GAAyB,EAAQ,IAA8C,EAE/EC,EAA0B,EAAQ,KAA+C,EAErF,EAA6C,CAC3C,MAAO,EACT,EACAC,EAAQ,EAAU,OAElB,IAAIC,EAAQF,EAAwB,EAAQ,KAAO,CAAC,EAEhDG,EAAiBJ,GAAuB,EAAQ,KAAuB,CAAC,EAExEK,KAAeD,EAAe,SAAuBD,EAAM,cAAc,OAAQ,CACnF,EAAG,gKACL,CAAC,EAAG,kBAAkB,EAEtBD,EAAQ,EAAUG,C,mBCnBlB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASa,IAAIC,EAAE,EAAQ,KAAO,EAAE,SAASC,GAAEC,EAAEC,EAAE,CAAC,OAAOD,IAAIC,IAAQD,IAAJ,GAAO,EAAEA,IAAI,EAAEC,IAAID,IAAIA,GAAGC,IAAIA,CAAC,CAAC,IAAIC,EAAe,OAAO,OAAO,IAA3B,WAA8B,OAAO,GAAGH,GAAE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,EAAE,QAAUV,GAAqBQ,EAAU,EAAE,UAAU,KAAOP,GAAsBO,EAAU,EAAE,SAAS,GACnHhE,GAAWiD,EAAW,EAAE,KAAKV,CAAI,EAGjCA,EAAK,CAEb,CACA,OAAAA,EAAK,EACE,IAAI,CACH0E,IACA,aAAaA,CAAK,EAClBA,EAAQ,GAEhB,CACJ,EAAG,CACC1D,EACAC,EACAC,EACA1I,CACJ,CAAC,KAED,iBAAc2J,EAAY,EAKtBvB,GAAY7J,EAAY+E,EAAI,GAAKtD,EAAK,CAItC,GAAI,CAACiB,IAAmBC,GACpB,MAAM,IAAI,MAAM,uDAAuD,EAG3E6H,EAAW,QAAUlC,EACrBmC,EAAU,QAAUhE,EACpB6D,EAAa,QAAU,GACvB,MAAM9B,EAAM5D,GAAQnD,CAAG,EACvB,GAAI,CAACzB,EAAYwI,CAAG,EAAG,CACnB,MAAMkB,EAAU4D,GAAY9E,CAAG,EAC/B,GAAIkB,CAAO,CACf,CACA,GAAI1J,EAAYgE,EAAK,EAAG,CACpB,MAAM0F,EAAUhD,GAAWiD,EAAW,EACjC3J,EAAYoL,EAAY,IACzB1B,EAAQ,OAAS,YACjBA,EAAQ,MAAQ,IAEpB,GAAIA,CAAO,CACf,KACI,OAAM1F,EAEd,CACA,MAAO,CACH,OAAQsJ,GACR,IAAI,MAAQ,CACR,OAAAtC,EAAkB,KAAO,GAClBI,EACX,EACA,IAAI,OAAS,CACT,OAAAJ,EAAkB,MAAQ,GACnBhH,EACX,EACA,IAAI,cAAgB,CAChB,OAAAgH,EAAkB,aAAe,GAC1BqB,EACX,EACA,IAAI,WAAa,CACb,OAAArB,EAAkB,UAAY,GACvBsB,EACX,CACJ,CACJ,EACM,GAAYvM,EAAO,eAAewH,GAAa,eAAgB,CACjE,MAAOP,EACX,CAAC,EAeSuC,GAASV,GAASe,EAAa,C","sources":["webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/icons/AddCircleOutline.js","webpack://techdocs-cli-embedded-app/../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","webpack://techdocs-cli-embedded-app/../../node_modules/use-sync-external-store/shim/index.js","webpack://techdocs-cli-embedded-app/../../node_modules/swr/dist/_internal/index.mjs","webpack://techdocs-cli-embedded-app/../../node_modules/swr/dist/core/index.mjs"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z\"\n}), 'AddCircleOutline');\n\nexports.default = _default;","/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","import React, { useEffect, useLayoutEffect, createContext, useContext, useMemo, useRef, createElement } from 'react';\n\n// Shared state between server components and client components\nconst noop = ()=>{};\n// Using noop() as the undefined value as undefined can be replaced\n// by something else. Prettier ignore and extra parentheses are necessary here\n// to ensure that tsc doesn't remove the __NOINLINE__ comment.\n// prettier-ignore\nconst UNDEFINED = /*#__NOINLINE__*/ noop();\nconst OBJECT = Object;\nconst isUndefined = (v)=>v === UNDEFINED;\nconst isFunction = (v)=>typeof v == 'function';\nconst mergeObjects = (a, b)=>({\n ...a,\n ...b\n });\nconst isPromiseLike = (x)=>isFunction(x.then);\n\n// use WeakMap to store the object->key mapping\n// so the objects can be garbage collected.\n// WeakMap uses a hashtable under the hood, so the lookup\n// complexity is almost O(1).\nconst table = new WeakMap();\n// counter of the key\nlet counter = 0;\n// A stable hash implementation that supports:\n// - Fast and ensures unique hash properties\n// - Handles unserializable values\n// - Handles object key ordering\n// - Generates short results\n//\n// This is not a serialization function, and the result is not guaranteed to be\n// parsable.\nconst stableHash = (arg)=>{\n const type = typeof arg;\n const constructor = arg && arg.constructor;\n const isDate = constructor == Date;\n let result;\n let index;\n if (OBJECT(arg) === arg && !isDate && constructor != RegExp) {\n // Object/function, not null/date/regexp. Use WeakMap to store the id first.\n // If it's already hashed, directly return the result.\n result = table.get(arg);\n if (result) return result;\n // Store the hash first for circular reference detection before entering the\n // recursive `stableHash` calls.\n // For other objects like set and map, we use this id directly as the hash.\n result = ++counter + '~';\n table.set(arg, result);\n if (constructor == Array) {\n // Array.\n result = '@';\n for(index = 0; index < arg.length; index++){\n result += stableHash(arg[index]) + ',';\n }\n table.set(arg, result);\n }\n if (constructor == OBJECT) {\n // Object, sort keys.\n result = '#';\n const keys = OBJECT.keys(arg).sort();\n while(!isUndefined(index = keys.pop())){\n if (!isUndefined(arg[index])) {\n result += index + ':' + stableHash(arg[index]) + ',';\n }\n }\n table.set(arg, result);\n }\n } else {\n result = isDate ? arg.toJSON() : type == 'symbol' ? arg.toString() : type == 'string' ? JSON.stringify(arg) : '' + arg;\n }\n return result;\n};\n\n// Global state used to deduplicate requests and store listeners\nconst SWRGlobalState = new WeakMap();\n\nconst EMPTY_CACHE = {};\nconst INITIAL_CACHE = {};\nconst STR_UNDEFINED = 'undefined';\n// NOTE: Use the function to guarantee it's re-evaluated between jsdom and node runtime for tests.\nconst isWindowDefined = typeof window != STR_UNDEFINED;\nconst isDocumentDefined = typeof document != STR_UNDEFINED;\nconst hasRequestAnimationFrame = ()=>isWindowDefined && typeof window['requestAnimationFrame'] != STR_UNDEFINED;\nconst createCacheHelper = (cache, key)=>{\n const state = SWRGlobalState.get(cache);\n return [\n // Getter\n ()=>!isUndefined(key) && cache.get(key) || EMPTY_CACHE,\n // Setter\n (info)=>{\n if (!isUndefined(key)) {\n const prev = cache.get(key);\n // Before writing to the store, we keep the value in the initial cache\n // if it's not there yet.\n if (!(key in INITIAL_CACHE)) {\n INITIAL_CACHE[key] = prev;\n }\n state[5](key, mergeObjects(prev, info), prev || EMPTY_CACHE);\n }\n },\n // Subscriber\n state[6],\n // Get server cache snapshot\n ()=>{\n if (!isUndefined(key)) {\n // If the cache was updated on the client, we return the stored initial value.\n if (key in INITIAL_CACHE) return INITIAL_CACHE[key];\n }\n // If we haven't done any client-side updates, we return the current value.\n return !isUndefined(key) && cache.get(key) || EMPTY_CACHE;\n }\n ];\n} // export { UNDEFINED, OBJECT, isUndefined, isFunction, mergeObjects, isPromiseLike }\n;\n\n/**\n * Due to the bug https://bugs.chromium.org/p/chromium/issues/detail?id=678075,\n * it's not reliable to detect if the browser is currently online or offline\n * based on `navigator.onLine`.\n * As a workaround, we always assume it's online on the first load, and change\n * the status upon `online` or `offline` events.\n */ let online = true;\nconst isOnline = ()=>online;\n// For node and React Native, `add/removeEventListener` doesn't exist on window.\nconst [onWindowEvent, offWindowEvent] = isWindowDefined && window.addEventListener ? [\n window.addEventListener.bind(window),\n window.removeEventListener.bind(window)\n] : [\n noop,\n noop\n];\nconst isVisible = ()=>{\n const visibilityState = isDocumentDefined && document.visibilityState;\n return isUndefined(visibilityState) || visibilityState !== 'hidden';\n};\nconst initFocus = (callback)=>{\n // focus revalidate\n if (isDocumentDefined) {\n document.addEventListener('visibilitychange', callback);\n }\n onWindowEvent('focus', callback);\n return ()=>{\n if (isDocumentDefined) {\n document.removeEventListener('visibilitychange', callback);\n }\n offWindowEvent('focus', callback);\n };\n};\nconst initReconnect = (callback)=>{\n // revalidate on reconnected\n const onOnline = ()=>{\n online = true;\n callback();\n };\n // nothing to revalidate, just update the status\n const onOffline = ()=>{\n online = false;\n };\n onWindowEvent('online', onOnline);\n onWindowEvent('offline', onOffline);\n return ()=>{\n offWindowEvent('online', onOnline);\n offWindowEvent('offline', onOffline);\n };\n};\nconst preset = {\n isOnline,\n isVisible\n};\nconst defaultConfigOptions = {\n initFocus,\n initReconnect\n};\n\nconst IS_REACT_LEGACY = !React.useId;\nconst IS_SERVER = !isWindowDefined || 'Deno' in window;\n// Polyfill requestAnimationFrame\nconst rAF = (f)=>hasRequestAnimationFrame() ? window['requestAnimationFrame'](f) : setTimeout(f, 1);\n// React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser.\nconst useIsomorphicLayoutEffect = IS_SERVER ? useEffect : useLayoutEffect;\n// This assignment is to extend the Navigator type to use effectiveType.\nconst navigatorConnection = typeof navigator !== 'undefined' && navigator.connection;\n// Adjust the config based on slow connection status (<= 70Kbps).\nconst slowConnection = !IS_SERVER && navigatorConnection && ([\n 'slow-2g',\n '2g'\n].includes(navigatorConnection.effectiveType) || navigatorConnection.saveData);\n\nconst serialize = (key)=>{\n if (isFunction(key)) {\n try {\n key = key();\n } catch (err) {\n // dependencies not ready\n key = '';\n }\n }\n // Use the original key as the argument of fetcher. This can be a string or an\n // array of values.\n const args = key;\n // If key is not falsy, or not an empty array, hash it.\n key = typeof key == 'string' ? key : (Array.isArray(key) ? key.length : key) ? stableHash(key) : '';\n return [\n key,\n args\n ];\n};\n\n// Global timestamp.\nlet __timestamp = 0;\nconst getTimestamp = ()=>++__timestamp;\n\nconst FOCUS_EVENT = 0;\nconst RECONNECT_EVENT = 1;\nconst MUTATE_EVENT = 2;\nconst ERROR_REVALIDATE_EVENT = 3;\n\nvar events = {\n __proto__: null,\n ERROR_REVALIDATE_EVENT: ERROR_REVALIDATE_EVENT,\n FOCUS_EVENT: FOCUS_EVENT,\n MUTATE_EVENT: MUTATE_EVENT,\n RECONNECT_EVENT: RECONNECT_EVENT\n};\n\nasync function internalMutate(...args) {\n const [cache, _key, _data, _opts] = args;\n // When passing as a boolean, it's explicitly used to disable/enable\n // revalidation.\n const options = mergeObjects({\n populateCache: true,\n throwOnError: true\n }, typeof _opts === 'boolean' ? {\n revalidate: _opts\n } : _opts || {});\n let populateCache = options.populateCache;\n const rollbackOnErrorOption = options.rollbackOnError;\n let optimisticData = options.optimisticData;\n const rollbackOnError = (error)=>{\n return typeof rollbackOnErrorOption === 'function' ? rollbackOnErrorOption(error) : rollbackOnErrorOption !== false;\n };\n const throwOnError = options.throwOnError;\n // If the second argument is a key filter, return the mutation results for all\n // filtered keys.\n if (isFunction(_key)) {\n const keyFilter = _key;\n const matchedKeys = [];\n const it = cache.keys();\n for (const key of it){\n if (// Skip the special useSWRInfinite and useSWRSubscription keys.\n !/^\\$(inf|sub)\\$/.test(key) && keyFilter(cache.get(key)._k)) {\n matchedKeys.push(key);\n }\n }\n return Promise.all(matchedKeys.map(mutateByKey));\n }\n return mutateByKey(_key);\n async function mutateByKey(_k) {\n // Serialize key\n const [key] = serialize(_k);\n if (!key) return;\n const [get, set] = createCacheHelper(cache, key);\n const [EVENT_REVALIDATORS, MUTATION, FETCH, PRELOAD] = SWRGlobalState.get(cache);\n const startRevalidate = ()=>{\n const revalidators = EVENT_REVALIDATORS[key];\n const revalidate = isFunction(options.revalidate) ? options.revalidate(get().data, _k) : options.revalidate !== false;\n if (revalidate) {\n // Invalidate the key by deleting the concurrent request markers so new\n // requests will not be deduped.\n delete FETCH[key];\n delete PRELOAD[key];\n if (revalidators && revalidators[0]) {\n return revalidators[0](MUTATE_EVENT).then(()=>get().data);\n }\n }\n return get().data;\n };\n // If there is no new data provided, revalidate the key with current state.\n if (args.length < 3) {\n // Revalidate and broadcast state.\n return startRevalidate();\n }\n let data = _data;\n let error;\n // Update global timestamps.\n const beforeMutationTs = getTimestamp();\n MUTATION[key] = [\n beforeMutationTs,\n 0\n ];\n const hasOptimisticData = !isUndefined(optimisticData);\n const state = get();\n // `displayedData` is the current value on screen. It could be the optimistic value\n // that is going to be overridden by a `committedData`, or get reverted back.\n // `committedData` is the validated value that comes from a fetch or mutation.\n const displayedData = state.data;\n const currentData = state._c;\n const committedData = isUndefined(currentData) ? displayedData : currentData;\n // Do optimistic data update.\n if (hasOptimisticData) {\n optimisticData = isFunction(optimisticData) ? optimisticData(committedData, displayedData) : optimisticData;\n // When we set optimistic data, backup the current committedData data in `_c`.\n set({\n data: optimisticData,\n _c: committedData\n });\n }\n if (isFunction(data)) {\n // `data` is a function, call it passing current cache value.\n try {\n data = data(committedData);\n } catch (err) {\n // If it throws an error synchronously, we shouldn't update the cache.\n error = err;\n }\n }\n // `data` is a promise/thenable, resolve the final data first.\n if (data && isPromiseLike(data)) {\n // This means that the mutation is async, we need to check timestamps to\n // avoid race conditions.\n data = await data.catch((err)=>{\n error = err;\n });\n // Check if other mutations have occurred since we've started this mutation.\n // If there's a race we don't update cache or broadcast the change,\n // just return the data.\n if (beforeMutationTs !== MUTATION[key][0]) {\n if (error) throw error;\n return data;\n } else if (error && hasOptimisticData && rollbackOnError(error)) {\n // Rollback. Always populate the cache in this case but without\n // transforming the data.\n populateCache = true;\n // Reset data to be the latest committed data, and clear the `_c` value.\n set({\n data: committedData,\n _c: UNDEFINED\n });\n }\n }\n // If we should write back the cache after request.\n if (populateCache) {\n if (!error) {\n // Transform the result into data.\n if (isFunction(populateCache)) {\n const populateCachedData = populateCache(data, committedData);\n set({\n data: populateCachedData,\n error: UNDEFINED,\n _c: UNDEFINED\n });\n } else {\n // Only update cached data and reset the error if there's no error. Data can be `undefined` here.\n set({\n data,\n error: UNDEFINED,\n _c: UNDEFINED\n });\n }\n }\n }\n // Reset the timestamp to mark the mutation has ended.\n MUTATION[key][1] = getTimestamp();\n // Update existing SWR Hooks' internal states:\n Promise.resolve(startRevalidate()).then(()=>{\n // The mutation and revalidation are ended, we can clear it since the data is\n // not an optimistic value anymore.\n set({\n _c: UNDEFINED\n });\n });\n // Throw error or return data\n if (error) {\n if (throwOnError) throw error;\n return;\n }\n return data;\n }\n}\n\nconst revalidateAllKeys = (revalidators, type)=>{\n for(const key in revalidators){\n if (revalidators[key][0]) revalidators[key][0](type);\n }\n};\nconst initCache = (provider, options)=>{\n // The global state for a specific provider will be used to deduplicate\n // requests and store listeners. As well as a mutate function that is bound to\n // the cache.\n // The provider's global state might be already initialized. Let's try to get the\n // global state associated with the provider first.\n if (!SWRGlobalState.has(provider)) {\n const opts = mergeObjects(defaultConfigOptions, options);\n // If there's no global state bound to the provider, create a new one with the\n // new mutate function.\n const EVENT_REVALIDATORS = {};\n const mutate = internalMutate.bind(UNDEFINED, provider);\n let unmount = noop;\n const subscriptions = {};\n const subscribe = (key, callback)=>{\n const subs = subscriptions[key] || [];\n subscriptions[key] = subs;\n subs.push(callback);\n return ()=>subs.splice(subs.indexOf(callback), 1);\n };\n const setter = (key, value, prev)=>{\n provider.set(key, value);\n const subs = subscriptions[key];\n if (subs) {\n for (const fn of subs){\n fn(value, prev);\n }\n }\n };\n const initProvider = ()=>{\n if (!SWRGlobalState.has(provider)) {\n // Update the state if it's new, or if the provider has been extended.\n SWRGlobalState.set(provider, [\n EVENT_REVALIDATORS,\n {},\n {},\n {},\n mutate,\n setter,\n subscribe\n ]);\n if (!IS_SERVER) {\n // When listening to the native events for auto revalidations,\n // we intentionally put a delay (setTimeout) here to make sure they are\n // fired after immediate JavaScript executions, which can be\n // React's state updates.\n // This avoids some unnecessary revalidations such as\n // https://github.com/vercel/swr/issues/1680.\n const releaseFocus = opts.initFocus(setTimeout.bind(UNDEFINED, revalidateAllKeys.bind(UNDEFINED, EVENT_REVALIDATORS, FOCUS_EVENT)));\n const releaseReconnect = opts.initReconnect(setTimeout.bind(UNDEFINED, revalidateAllKeys.bind(UNDEFINED, EVENT_REVALIDATORS, RECONNECT_EVENT)));\n unmount = ()=>{\n releaseFocus && releaseFocus();\n releaseReconnect && releaseReconnect();\n // When un-mounting, we need to remove the cache provider from the state\n // storage too because it's a side-effect. Otherwise, when re-mounting we\n // will not re-register those event listeners.\n SWRGlobalState.delete(provider);\n };\n }\n }\n };\n initProvider();\n // This is a new provider, we need to initialize it and setup DOM events\n // listeners for `focus` and `reconnect` actions.\n // We might want to inject an extra layer on top of `provider` in the future,\n // such as key serialization, auto GC, etc.\n // For now, it's just a `Map` interface without any modifications.\n return [\n provider,\n mutate,\n initProvider,\n unmount\n ];\n }\n return [\n provider,\n SWRGlobalState.get(provider)[4]\n ];\n};\n\n// error retry\nconst onErrorRetry = (_, __, config, revalidate, opts)=>{\n const maxRetryCount = config.errorRetryCount;\n const currentRetryCount = opts.retryCount;\n // Exponential backoff\n const timeout = ~~((Math.random() + 0.5) * (1 << (currentRetryCount < 8 ? currentRetryCount : 8))) * config.errorRetryInterval;\n if (!isUndefined(maxRetryCount) && currentRetryCount > maxRetryCount) {\n return;\n }\n setTimeout(revalidate, timeout, opts);\n};\nconst compare = (currentData, newData)=>stableHash(currentData) == stableHash(newData);\n// Default cache provider\nconst [cache, mutate] = initCache(new Map());\n// Default config\nconst defaultConfig = mergeObjects({\n // events\n onLoadingSlow: noop,\n onSuccess: noop,\n onError: noop,\n onErrorRetry,\n onDiscarded: noop,\n // switches\n revalidateOnFocus: true,\n revalidateOnReconnect: true,\n revalidateIfStale: true,\n shouldRetryOnError: true,\n // timeouts\n errorRetryInterval: slowConnection ? 10000 : 5000,\n focusThrottleInterval: 5 * 1000,\n dedupingInterval: 2 * 1000,\n loadingTimeout: slowConnection ? 5000 : 3000,\n // providers\n compare,\n isPaused: ()=>false,\n cache,\n mutate,\n fallback: {}\n}, // use web preset by default\npreset);\n\nconst mergeConfigs = (a, b)=>{\n // Need to create a new object to avoid mutating the original here.\n const v = mergeObjects(a, b);\n // If two configs are provided, merge their `use` and `fallback` options.\n if (b) {\n const { use: u1, fallback: f1 } = a;\n const { use: u2, fallback: f2 } = b;\n if (u1 && u2) {\n v.use = u1.concat(u2);\n }\n if (f1 && f2) {\n v.fallback = mergeObjects(f1, f2);\n }\n }\n return v;\n};\n\nconst SWRConfigContext = createContext({});\nconst SWRConfig = (props)=>{\n const { value } = props;\n const parentConfig = useContext(SWRConfigContext);\n const isFunctionalConfig = isFunction(value);\n const config = useMemo(()=>isFunctionalConfig ? value(parentConfig) : value, [\n isFunctionalConfig,\n parentConfig,\n value\n ]);\n // Extend parent context values and middleware.\n const extendedConfig = useMemo(()=>isFunctionalConfig ? config : mergeConfigs(parentConfig, config), [\n isFunctionalConfig,\n parentConfig,\n config\n ]);\n // Should not use the inherited provider.\n const provider = config && config.provider;\n // initialize the cache only on first access.\n const cacheContextRef = useRef(UNDEFINED);\n if (provider && !cacheContextRef.current) {\n cacheContextRef.current = initCache(provider(extendedConfig.cache || cache), config);\n }\n const cacheContext = cacheContextRef.current;\n // Override the cache if a new provider is given.\n if (cacheContext) {\n extendedConfig.cache = cacheContext[0];\n extendedConfig.mutate = cacheContext[1];\n }\n // Unsubscribe events.\n useIsomorphicLayoutEffect(()=>{\n if (cacheContext) {\n cacheContext[2] && cacheContext[2]();\n return cacheContext[3];\n }\n }, []);\n return createElement(SWRConfigContext.Provider, mergeObjects(props, {\n value: extendedConfig\n }));\n};\n\nconst INFINITE_PREFIX = '$inf$';\n\n// @ts-expect-error\nconst enableDevtools = isWindowDefined && window.__SWR_DEVTOOLS_USE__;\nconst use = enableDevtools ? window.__SWR_DEVTOOLS_USE__ : [];\nconst setupDevTools = ()=>{\n if (enableDevtools) {\n // @ts-expect-error\n window.__SWR_DEVTOOLS_REACT__ = React;\n }\n};\n\nconst normalize = (args)=>{\n return isFunction(args[1]) ? [\n args[0],\n args[1],\n args[2] || {}\n ] : [\n args[0],\n null,\n (args[1] === null ? args[2] : args[1]) || {}\n ];\n};\n\nconst useSWRConfig = ()=>{\n return mergeObjects(defaultConfig, useContext(SWRConfigContext));\n};\n\nconst preload = (key_, fetcher)=>{\n const [key, fnArg] = serialize(key_);\n const [, , , PRELOAD] = SWRGlobalState.get(cache);\n // Prevent preload to be called multiple times before used.\n if (PRELOAD[key]) return PRELOAD[key];\n const req = fetcher(fnArg);\n PRELOAD[key] = req;\n return req;\n};\nconst middleware = (useSWRNext)=>(key_, fetcher_, config)=>{\n // fetcher might be a sync function, so this should not be an async function\n const fetcher = fetcher_ && ((...args)=>{\n const [key] = serialize(key_);\n const [, , , PRELOAD] = SWRGlobalState.get(cache);\n if (key.startsWith(INFINITE_PREFIX)) {\n // we want the infinite fetcher to be called.\n // handling of the PRELOAD cache happens there.\n return fetcher_(...args);\n }\n const req = PRELOAD[key];\n if (isUndefined(req)) return fetcher_(...args);\n delete PRELOAD[key];\n return req;\n });\n return useSWRNext(key_, fetcher, config);\n };\n\nconst BUILT_IN_MIDDLEWARE = use.concat(middleware);\n\n// It's tricky to pass generic types as parameters, so we just directly override\n// the types here.\nconst withArgs = (hook)=>{\n return function useSWRArgs(...args) {\n // Get the default and inherited configuration.\n const fallbackConfig = useSWRConfig();\n // Normalize arguments.\n const [key, fn, _config] = normalize(args);\n // Merge configurations.\n const config = mergeConfigs(fallbackConfig, _config);\n // Apply middleware\n let next = hook;\n const { use } = config;\n const middleware = (use || []).concat(BUILT_IN_MIDDLEWARE);\n for(let i = middleware.length; i--;){\n next = middleware[i](next);\n }\n return next(key, fn || config.fetcher || null, config);\n };\n};\n\n// Add a callback function to a list of keyed callback functions and return\n// the unsubscribe function.\nconst subscribeCallback = (key, callbacks, callback)=>{\n const keyedRevalidators = callbacks[key] || (callbacks[key] = []);\n keyedRevalidators.push(callback);\n return ()=>{\n const index = keyedRevalidators.indexOf(callback);\n if (index >= 0) {\n // O(1): faster than splice\n keyedRevalidators[index] = keyedRevalidators[keyedRevalidators.length - 1];\n keyedRevalidators.pop();\n }\n };\n};\n\n// Create a custom hook with a middleware\nconst withMiddleware = (useSWR, middleware)=>{\n return (...args)=>{\n const [key, fn, config] = normalize(args);\n const uses = (config.use || []).concat(middleware);\n return useSWR(key, fn, {\n ...config,\n use: uses\n });\n };\n};\n\nsetupDevTools();\n\nexport { INFINITE_PREFIX, IS_REACT_LEGACY, IS_SERVER, OBJECT, SWRConfig, SWRGlobalState, UNDEFINED, cache, compare, createCacheHelper, defaultConfig, defaultConfigOptions, getTimestamp, hasRequestAnimationFrame, initCache, internalMutate, isDocumentDefined, isFunction, isPromiseLike, isUndefined, isWindowDefined, mergeConfigs, mergeObjects, mutate, noop, normalize, preload, preset, rAF, events as revalidateEvents, serialize, slowConnection, stableHash, subscribeCallback, useIsomorphicLayoutEffect, useSWRConfig, withArgs, withMiddleware };\n","import 'client-only';\nimport ReactExports, { useRef, useMemo, useCallback, useDebugValue } from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim/index.js';\nimport { serialize, OBJECT, SWRConfig as SWRConfig$1, defaultConfig, withArgs, SWRGlobalState, createCacheHelper, isUndefined, getTimestamp, UNDEFINED, isFunction, revalidateEvents, internalMutate, useIsomorphicLayoutEffect, subscribeCallback, IS_SERVER, rAF, IS_REACT_LEGACY, mergeObjects } from 'swr/_internal';\nexport { mutate, preload, useSWRConfig } from 'swr/_internal';\n\nconst unstable_serialize = (key)=>serialize(key)[0];\n\n/// <reference types=\"react/experimental\" />\nconst use = ReactExports.use || ((promise)=>{\n if (promise.status === 'pending') {\n throw promise;\n } else if (promise.status === 'fulfilled') {\n return promise.value;\n } else if (promise.status === 'rejected') {\n throw promise.reason;\n } else {\n promise.status = 'pending';\n promise.then((v)=>{\n promise.status = 'fulfilled';\n promise.value = v;\n }, (e)=>{\n promise.status = 'rejected';\n promise.reason = e;\n });\n throw promise;\n }\n});\nconst WITH_DEDUPE = {\n dedupe: true\n};\nconst useSWRHandler = (_key, fetcher, config)=>{\n const { cache, compare, suspense, fallbackData, revalidateOnMount, revalidateIfStale, refreshInterval, refreshWhenHidden, refreshWhenOffline, keepPreviousData } = config;\n const [EVENT_REVALIDATORS, MUTATION, FETCH, PRELOAD] = SWRGlobalState.get(cache);\n // `key` is the identifier of the SWR internal state,\n // `fnArg` is the argument/arguments parsed from the key, which will be passed\n // to the fetcher.\n // All of them are derived from `_key`.\n const [key, fnArg] = serialize(_key);\n // If it's the initial render of this hook.\n const initialMountedRef = useRef(false);\n // If the hook is unmounted already. This will be used to prevent some effects\n // to be called after unmounting.\n const unmountedRef = useRef(false);\n // Refs to keep the key and config.\n const keyRef = useRef(key);\n const fetcherRef = useRef(fetcher);\n const configRef = useRef(config);\n const getConfig = ()=>configRef.current;\n const isActive = ()=>getConfig().isVisible() && getConfig().isOnline();\n const [getCache, setCache, subscribeCache, getInitialCache] = createCacheHelper(cache, key);\n const stateDependencies = useRef({}).current;\n const fallback = isUndefined(fallbackData) ? config.fallback[key] : fallbackData;\n const isEqual = (prev, current)=>{\n for(const _ in stateDependencies){\n const t = _;\n if (t === 'data') {\n if (!compare(prev[t], current[t])) {\n if (!isUndefined(prev[t])) {\n return false;\n }\n if (!compare(returnedData, current[t])) {\n return false;\n }\n }\n } else {\n if (current[t] !== prev[t]) {\n return false;\n }\n }\n }\n return true;\n };\n const getSnapshot = useMemo(()=>{\n const shouldStartRequest = (()=>{\n if (!key) return false;\n if (!fetcher) return false;\n // If `revalidateOnMount` is set, we take the value directly.\n if (!isUndefined(revalidateOnMount)) return revalidateOnMount;\n // If it's paused, we skip revalidation.\n if (getConfig().isPaused()) return false;\n if (suspense) return false;\n if (!isUndefined(revalidateIfStale)) return revalidateIfStale;\n return true;\n })();\n // Get the cache and merge it with expected states.\n const getSelectedCache = (state)=>{\n // We only select the needed fields from the state.\n const snapshot = mergeObjects(state);\n delete snapshot._k;\n if (!shouldStartRequest) {\n return snapshot;\n }\n return {\n isValidating: true,\n isLoading: true,\n ...snapshot\n };\n };\n const cachedData = getCache();\n const initialData = getInitialCache();\n const clientSnapshot = getSelectedCache(cachedData);\n const serverSnapshot = cachedData === initialData ? clientSnapshot : getSelectedCache(initialData);\n // To make sure that we are returning the same object reference to avoid\n // unnecessary re-renders, we keep the previous snapshot and use deep\n // comparison to check if we need to return a new one.\n let memorizedSnapshot = clientSnapshot;\n return [\n ()=>{\n const newSnapshot = getSelectedCache(getCache());\n const compareResult = isEqual(newSnapshot, memorizedSnapshot);\n if (compareResult) {\n // Mentally, we should always return the `memorizedSnapshot` here\n // as there's no change between the new and old snapshots.\n // However, since the `isEqual` function only compares selected fields,\n // the values of the unselected fields might be changed. That's\n // simply because we didn't track them.\n // To support the case in https://github.com/vercel/swr/pull/2576,\n // we need to update these fields in the `memorizedSnapshot` too\n // with direct mutations to ensure the snapshot is always up-to-date\n // even for the unselected fields, but only trigger re-renders when\n // the selected fields are changed.\n memorizedSnapshot.data = newSnapshot.data;\n memorizedSnapshot.isLoading = newSnapshot.isLoading;\n memorizedSnapshot.isValidating = newSnapshot.isValidating;\n memorizedSnapshot.error = newSnapshot.error;\n return memorizedSnapshot;\n } else {\n memorizedSnapshot = newSnapshot;\n return newSnapshot;\n }\n },\n ()=>serverSnapshot\n ];\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n cache,\n key\n ]);\n // Get the current state that SWR should return.\n const cached = useSyncExternalStore(useCallback((callback)=>subscribeCache(key, (current, prev)=>{\n if (!isEqual(prev, current)) callback();\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n cache,\n key\n ]), getSnapshot[0], getSnapshot[1]);\n const isInitialMount = !initialMountedRef.current;\n const hasRevalidator = EVENT_REVALIDATORS[key] && EVENT_REVALIDATORS[key].length > 0;\n const cachedData = cached.data;\n const data = isUndefined(cachedData) ? fallback : cachedData;\n const error = cached.error;\n // Use a ref to store previously returned data. Use the initial data as its initial value.\n const laggyDataRef = useRef(data);\n const returnedData = keepPreviousData ? isUndefined(cachedData) ? laggyDataRef.current : cachedData : data;\n // - Suspense mode and there's stale data for the initial render.\n // - Not suspense mode and there is no fallback data and `revalidateIfStale` is enabled.\n // - `revalidateIfStale` is enabled but `data` is not defined.\n const shouldDoInitialRevalidation = (()=>{\n // if a key already has revalidators and also has error, we should not trigger revalidation\n if (hasRevalidator && !isUndefined(error)) return false;\n // If `revalidateOnMount` is set, we take the value directly.\n if (isInitialMount && !isUndefined(revalidateOnMount)) return revalidateOnMount;\n // If it's paused, we skip revalidation.\n if (getConfig().isPaused()) return false;\n // Under suspense mode, it will always fetch on render if there is no\n // stale data so no need to revalidate immediately mount it again.\n // If data exists, only revalidate if `revalidateIfStale` is true.\n if (suspense) return isUndefined(data) ? false : revalidateIfStale;\n // If there is no stale data, we need to revalidate when mount;\n // If `revalidateIfStale` is set to true, we will always revalidate.\n return isUndefined(data) || revalidateIfStale;\n })();\n // Resolve the default validating state:\n // If it's able to validate, and it should revalidate when mount, this will be true.\n const defaultValidatingState = !!(key && fetcher && isInitialMount && shouldDoInitialRevalidation);\n const isValidating = isUndefined(cached.isValidating) ? defaultValidatingState : cached.isValidating;\n const isLoading = isUndefined(cached.isLoading) ? defaultValidatingState : cached.isLoading;\n // The revalidation function is a carefully crafted wrapper of the original\n // `fetcher`, to correctly handle the many edge cases.\n const revalidate = useCallback(async (revalidateOpts)=>{\n const currentFetcher = fetcherRef.current;\n if (!key || !currentFetcher || unmountedRef.current || getConfig().isPaused()) {\n return false;\n }\n let newData;\n let startAt;\n let loading = true;\n const opts = revalidateOpts || {};\n // If there is no ongoing concurrent request, or `dedupe` is not set, a\n // new request should be initiated.\n const shouldStartNewRequest = !FETCH[key] || !opts.dedupe;\n /*\n For React 17\n Do unmount check for calls:\n If key has changed during the revalidation, or the component has been\n unmounted, old dispatch and old event callbacks should not take any\n effect\n\n For React 18\n only check if key has changed\n https://github.com/reactwg/react-18/discussions/82\n */ const callbackSafeguard = ()=>{\n if (IS_REACT_LEGACY) {\n return !unmountedRef.current && key === keyRef.current && initialMountedRef.current;\n }\n return key === keyRef.current;\n };\n // The final state object when the request finishes.\n const finalState = {\n isValidating: false,\n isLoading: false\n };\n const finishRequestAndUpdateState = ()=>{\n setCache(finalState);\n };\n const cleanupState = ()=>{\n // Check if it's still the same request before deleting it.\n const requestInfo = FETCH[key];\n if (requestInfo && requestInfo[1] === startAt) {\n delete FETCH[key];\n }\n };\n // Start fetching. Change the `isValidating` state, update the cache.\n const initialState = {\n isValidating: true\n };\n // It is in the `isLoading` state, if and only if there is no cached data.\n // This bypasses fallback data and laggy data.\n if (isUndefined(getCache().data)) {\n initialState.isLoading = true;\n }\n try {\n if (shouldStartNewRequest) {\n setCache(initialState);\n // If no cache is being rendered currently (it shows a blank page),\n // we trigger the loading slow event.\n if (config.loadingTimeout && isUndefined(getCache().data)) {\n setTimeout(()=>{\n if (loading && callbackSafeguard()) {\n getConfig().onLoadingSlow(key, config);\n }\n }, config.loadingTimeout);\n }\n // Start the request and save the timestamp.\n // Key must be truthy if entering here.\n FETCH[key] = [\n currentFetcher(fnArg),\n getTimestamp()\n ];\n }\n [newData, startAt] = FETCH[key];\n newData = await newData;\n if (shouldStartNewRequest) {\n // If the request isn't interrupted, clean it up after the\n // deduplication interval.\n setTimeout(cleanupState, config.dedupingInterval);\n }\n // If there're other ongoing request(s), started after the current one,\n // we need to ignore the current one to avoid possible race conditions:\n // req1------------------>res1 (current one)\n // req2---------------->res2\n // the request that fired later will always be kept.\n // The timestamp maybe be `undefined` or a number\n if (!FETCH[key] || FETCH[key][1] !== startAt) {\n if (shouldStartNewRequest) {\n if (callbackSafeguard()) {\n getConfig().onDiscarded(key);\n }\n }\n return false;\n }\n // Clear error.\n finalState.error = UNDEFINED;\n // If there're other mutations(s), that overlapped with the current revalidation:\n // case 1:\n // req------------------>res\n // mutate------>end\n // case 2:\n // req------------>res\n // mutate------>end\n // case 3:\n // req------------------>res\n // mutate-------...---------->\n // we have to ignore the revalidation result (res) because it's no longer fresh.\n // meanwhile, a new revalidation should be triggered when the mutation ends.\n const mutationInfo = MUTATION[key];\n if (!isUndefined(mutationInfo) && // case 1\n (startAt <= mutationInfo[0] || // case 2\n startAt <= mutationInfo[1] || // case 3\n mutationInfo[1] === 0)) {\n finishRequestAndUpdateState();\n if (shouldStartNewRequest) {\n if (callbackSafeguard()) {\n getConfig().onDiscarded(key);\n }\n }\n return false;\n }\n // Deep compare with the latest state to avoid extra re-renders.\n // For local state, compare and assign.\n const cacheData = getCache().data;\n // Since the compare fn could be custom fn\n // cacheData might be different from newData even when compare fn returns True\n finalState.data = compare(cacheData, newData) ? cacheData : newData;\n // Trigger the successful callback if it's the original request.\n if (shouldStartNewRequest) {\n if (callbackSafeguard()) {\n getConfig().onSuccess(newData, key, config);\n }\n }\n } catch (err) {\n cleanupState();\n const currentConfig = getConfig();\n const { shouldRetryOnError } = currentConfig;\n // Not paused, we continue handling the error. Otherwise, discard it.\n if (!currentConfig.isPaused()) {\n // Get a new error, don't use deep comparison for errors.\n finalState.error = err;\n // Error event and retry logic. Only for the actual request, not\n // deduped ones.\n if (shouldStartNewRequest && callbackSafeguard()) {\n currentConfig.onError(err, key, currentConfig);\n if (shouldRetryOnError === true || isFunction(shouldRetryOnError) && shouldRetryOnError(err)) {\n if (!getConfig().revalidateOnFocus || !getConfig().revalidateOnReconnect || isActive()) {\n // If it's inactive, stop. It will auto-revalidate when\n // refocusing or reconnecting.\n // When retrying, deduplication is always enabled.\n currentConfig.onErrorRetry(err, key, currentConfig, (_opts)=>{\n const revalidators = EVENT_REVALIDATORS[key];\n if (revalidators && revalidators[0]) {\n revalidators[0](revalidateEvents.ERROR_REVALIDATE_EVENT, _opts);\n }\n }, {\n retryCount: (opts.retryCount || 0) + 1,\n dedupe: true\n });\n }\n }\n }\n }\n }\n // Mark loading as stopped.\n loading = false;\n // Update the current hook's state.\n finishRequestAndUpdateState();\n return true;\n }, // `setState` is immutable, and `eventsCallback`, `fnArg`, and\n // `keyValidating` are depending on `key`, so we can exclude them from\n // the deps array.\n //\n // FIXME:\n // `fn` and `config` might be changed during the lifecycle,\n // but they might be changed every render like this.\n // `useSWR('key', () => fetch('/api/'), { suspense: true })`\n // So we omit the values from the deps array\n // even though it might cause unexpected behaviors.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n key,\n cache\n ]);\n // Similar to the global mutate but bound to the current cache and key.\n // `cache` isn't allowed to change during the lifecycle.\n const boundMutate = useCallback(// Use callback to make sure `keyRef.current` returns latest result every time\n (...args)=>{\n return internalMutate(cache, keyRef.current, ...args);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n []);\n // The logic for updating refs.\n useIsomorphicLayoutEffect(()=>{\n fetcherRef.current = fetcher;\n configRef.current = config;\n // Handle laggy data updates. If there's cached data of the current key,\n // it'll be the correct reference.\n if (!isUndefined(cachedData)) {\n laggyDataRef.current = cachedData;\n }\n });\n // After mounted or key changed.\n useIsomorphicLayoutEffect(()=>{\n if (!key) return;\n const softRevalidate = revalidate.bind(UNDEFINED, WITH_DEDUPE);\n // Expose revalidators to global event listeners. So we can trigger\n // revalidation from the outside.\n let nextFocusRevalidatedAt = 0;\n const onRevalidate = (type, opts = {})=>{\n if (type == revalidateEvents.FOCUS_EVENT) {\n const now = Date.now();\n if (getConfig().revalidateOnFocus && now > nextFocusRevalidatedAt && isActive()) {\n nextFocusRevalidatedAt = now + getConfig().focusThrottleInterval;\n softRevalidate();\n }\n } else if (type == revalidateEvents.RECONNECT_EVENT) {\n if (getConfig().revalidateOnReconnect && isActive()) {\n softRevalidate();\n }\n } else if (type == revalidateEvents.MUTATE_EVENT) {\n return revalidate();\n } else if (type == revalidateEvents.ERROR_REVALIDATE_EVENT) {\n return revalidate(opts);\n }\n return;\n };\n const unsubEvents = subscribeCallback(key, EVENT_REVALIDATORS, onRevalidate);\n // Mark the component as mounted and update corresponding refs.\n unmountedRef.current = false;\n keyRef.current = key;\n initialMountedRef.current = true;\n // Keep the original key in the cache.\n setCache({\n _k: fnArg\n });\n // Trigger a revalidation\n if (shouldDoInitialRevalidation) {\n if (isUndefined(data) || IS_SERVER) {\n // Revalidate immediately.\n softRevalidate();\n } else {\n // Delay the revalidate if we have data to return so we won't block\n // rendering.\n rAF(softRevalidate);\n }\n }\n return ()=>{\n // Mark it as unmounted.\n unmountedRef.current = true;\n unsubEvents();\n };\n }, [\n key\n ]);\n // Polling\n useIsomorphicLayoutEffect(()=>{\n let timer;\n function next() {\n // Use the passed interval\n // ...or invoke the function with the updated data to get the interval\n const interval = isFunction(refreshInterval) ? refreshInterval(getCache().data) : refreshInterval;\n // We only start the next interval if `refreshInterval` is not 0, and:\n // - `force` is true, which is the start of polling\n // - or `timer` is not 0, which means the effect wasn't canceled\n if (interval && timer !== -1) {\n timer = setTimeout(execute, interval);\n }\n }\n function execute() {\n // Check if it's OK to execute:\n // Only revalidate when the page is visible, online, and not errored.\n if (!getCache().error && (refreshWhenHidden || getConfig().isVisible()) && (refreshWhenOffline || getConfig().isOnline())) {\n revalidate(WITH_DEDUPE).then(next);\n } else {\n // Schedule the next interval to check again.\n next();\n }\n }\n next();\n return ()=>{\n if (timer) {\n clearTimeout(timer);\n timer = -1;\n }\n };\n }, [\n refreshInterval,\n refreshWhenHidden,\n refreshWhenOffline,\n key\n ]);\n // Display debug info in React DevTools.\n useDebugValue(returnedData);\n // In Suspense mode, we can't return the empty `data` state.\n // If there is an `error`, the `error` needs to be thrown to the error boundary.\n // If there is no `error`, the `revalidation` promise needs to be thrown to\n // the suspense boundary.\n if (suspense && isUndefined(data) && key) {\n // SWR should throw when trying to use Suspense on the server with React 18,\n // without providing any initial data. See:\n // https://github.com/vercel/swr/issues/1832\n if (!IS_REACT_LEGACY && IS_SERVER) {\n throw new Error('Fallback data is required when using suspense in SSR.');\n }\n // Always update fetcher and config refs even with the Suspense mode.\n fetcherRef.current = fetcher;\n configRef.current = config;\n unmountedRef.current = false;\n const req = PRELOAD[key];\n if (!isUndefined(req)) {\n const promise = boundMutate(req);\n use(promise);\n }\n if (isUndefined(error)) {\n const promise = revalidate(WITH_DEDUPE);\n if (!isUndefined(returnedData)) {\n promise.status = 'fulfilled';\n promise.value = true;\n }\n use(promise);\n } else {\n throw error;\n }\n }\n return {\n mutate: boundMutate,\n get data () {\n stateDependencies.data = true;\n return returnedData;\n },\n get error () {\n stateDependencies.error = true;\n return error;\n },\n get isValidating () {\n stateDependencies.isValidating = true;\n return isValidating;\n },\n get isLoading () {\n stateDependencies.isLoading = true;\n return isLoading;\n }\n };\n};\nconst SWRConfig = OBJECT.defineProperty(SWRConfig$1, 'defaultValue', {\n value: defaultConfig\n});\n/**\n * A hook to fetch data.\n *\n * @link https://swr.vercel.app\n * @example\n * ```jsx\n * import useSWR from 'swr'\n * function Profile() {\n * const { data, error, isLoading } = useSWR('/api/user', fetcher)\n * if (error) return <div>failed to load</div>\n * if (isLoading) return <div>loading...</div>\n * return <div>hello {data.name}!</div>\n * }\n * ```\n */ const useSWR = withArgs(useSWRHandler);\n\nexport { SWRConfig, useSWR as default, unstable_serialize };\n"],"names":["_interopRequireDefault","_interopRequireWildcard","exports","React","_createSvgIcon","_default","e","h","a","b","k","l","m","n","p","q","d","f","c","g","r","t","u","module","noop","UNDEFINED","OBJECT","isUndefined","v","isFunction","mergeObjects","isPromiseLike","x","table","counter","stableHash","arg","type","constructor","isDate","result","index","keys","SWRGlobalState","EMPTY_CACHE","INITIAL_CACHE","STR_UNDEFINED","isWindowDefined","isDocumentDefined","hasRequestAnimationFrame","createCacheHelper","cache","key","state","info","prev","online","isOnline","onWindowEvent","offWindowEvent","isVisible","visibilityState","initFocus","callback","initReconnect","onOnline","onOffline","preset","defaultConfigOptions","IS_REACT_LEGACY","IS_SERVER","rAF","useIsomorphicLayoutEffect","navigatorConnection","slowConnection","args","__timestamp","getTimestamp","FOCUS_EVENT","RECONNECT_EVENT","MUTATE_EVENT","events","internalMutate","_key","_data","_opts","options","populateCache","rollbackOnErrorOption","optimisticData","rollbackOnError","error","throwOnError","keyFilter","matchedKeys","it","mutateByKey","_k","get","set","EVENT_REVALIDATORS","MUTATION","FETCH","PRELOAD","startRevalidate","revalidators","data","beforeMutationTs","hasOptimisticData","displayedData","currentData","committedData","err","populateCachedData","revalidateAllKeys","initCache","provider","opts","mutate","unmount","subscriptions","subscribe","subs","setter","value","fn","initProvider","releaseFocus","releaseReconnect","onErrorRetry","_","__","config","revalidate","maxRetryCount","currentRetryCount","timeout","compare","newData","defaultConfig","mergeConfigs","u1","f1","u2","f2","SWRConfigContext","SWRConfig","props","parentConfig","isFunctionalConfig","extendedConfig","cacheContextRef","cacheContext","INFINITE_PREFIX","enableDevtools","use","setupDevTools","normalize","useSWRConfig","preload","key_","fetcher","fnArg","req","middleware","useSWRNext","fetcher_","BUILT_IN_MIDDLEWARE","withArgs","hook","fallbackConfig","_config","next","i","subscribeCallback","callbacks","keyedRevalidators","withMiddleware","useSWR","uses","unstable_serialize","promise","WITH_DEDUPE","useSWRHandler","suspense","fallbackData","revalidateOnMount","revalidateIfStale","refreshInterval","refreshWhenHidden","refreshWhenOffline","keepPreviousData","initialMountedRef","unmountedRef","keyRef","fetcherRef","configRef","getConfig","isActive","getCache","setCache","subscribeCache","getInitialCache","stateDependencies","fallback","isEqual","current","returnedData","getSnapshot","shouldStartRequest","getSelectedCache","snapshot","cachedData","initialData","clientSnapshot","serverSnapshot","memorizedSnapshot","newSnapshot","cached","isInitialMount","hasRevalidator","laggyDataRef","shouldDoInitialRevalidation","defaultValidatingState","isValidating","isLoading","revalidateOpts","currentFetcher","startAt","loading","shouldStartNewRequest","callbackSafeguard","finalState","finishRequestAndUpdateState","cleanupState","requestInfo","initialState","mutationInfo","cacheData","currentConfig","shouldRetryOnError","boundMutate","softRevalidate","nextFocusRevalidatedAt","unsubEvents","now","timer","interval","execute"],"sourceRoot":""}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[5724],{35773:(B,x,e)=>{e.d(x,{C4:()=>b,tS:()=>R});var t=e(14117);const u="catalog-entity",A=(0,t.i)({name:"catalog.entity.read",attributes:{action:"read"},resourceType:u}),b=(0,t.i)({name:"catalog.entity.create",attributes:{action:"create"}}),L=(0,t.i)({name:"catalog.entity.delete",attributes:{action:"delete"},resourceType:u}),R=(0,t.i)({name:"catalog.entity.refresh",attributes:{action:"update"},resourceType:u}),O=(0,t.i)({name:"catalog.entity.validate",attributes:{}}),S=(0,t.i)({name:"catalog.location.read",attributes:{action:"read"}}),P=(0,t.i)({name:"catalog.location.create",attributes:{action:"create"}}),T=(0,t.i)({name:"catalog.location.analyze",attributes:{}}),j=(0,t.i)({name:"catalog.location.delete",attributes:{action:"delete"}}),c=[A,b,L,R,O,S,P,j,T]},99538:(B,x,e)=>{e.d(x,{T7:()=>S,TY:()=>j,tN:()=>T});var t=e(31085),u=e(6820),A=e(25862),b=e(43836),L=e(10602),R=e(14041);const O=(0,b.tK)("entity-context"),S=c=>{const{children:r,entity:m,loading:v,error:h,refresh:y}=c,g={entity:m,loading:v,error:h,refresh:y};return(0,t.jsx)(O.Provider,{value:(0,L.B)({1:g}),children:(0,t.jsx)(A.Ig,{attributes:{...m?{entityRef:(0,u.U2)(m)}:void 0},children:r})})},P=c=>_jsx(S,{entity:c.entity,loading:!c.entity,error:void 0,refresh:void 0,children:c.children});function T(){const c=(0,b.qO)("entity-context");if(!c)throw new Error("Entity context is not available");const r=c.atVersion(1);if(!r)throw new Error("EntityContext v1 not available");if(!r.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:r.entity}}function j(){const c=(0,b.qO)("entity-context");if(!c)throw new Error("Entity context is not available");const r=c.atVersion(1);if(!r)throw new Error("EntityContext v1 not available");const{entity:m,loading:v,error:h,refresh:y}=r;return{entity:m,loading:v,error:h,refresh:y}}},90759:(B,x,e)=>{e.d(x,{W:()=>u});var t=e(93184);const u=(0,t.h)({id:"catalog",messages:{indexPage:{title:"{{orgName}} Catalog",createButtonTitle:"Create",supportButtonContent:"All your software catalog entities"},aboutCard:{title:"About",refreshButtonTitle:"Schedule entity refresh",editButtonTitle:"Edit Metadata",createSimilarButtonTitle:"Create something similar",refreshScheduledMessage:"Refresh scheduled",launchTemplate:"Launch Template",viewTechdocs:"View TechDocs",viewSource:"View Source",descriptionField:{label:"Description",value:"No description"},ownerField:{label:"Owner",value:"No Owner"},domainField:{label:"Domain",value:"No Domain"},systemField:{label:"System",value:"No System"},parentComponentField:{label:"Parent Component",value:"No Parent Component"},typeField:{label:"Type"},lifecycleField:{label:"Lifecycle"},tagsField:{label:"Tags",value:"No Tags"},targetsField:{label:"Targets"}},searchResultItem:{lifecycle:"Lifecycle",Owner:"Owner"},catalogTable:{warningPanelTitle:"Could not fetch catalog entities.",viewActionTitle:"View",editActionTitle:"Edit",starActionTitle:"Add to favorites",unStarActionTitle:"Remove from favorites"},dependencyOfComponentsCard:{title:"Dependency of components",emptyMessage:"No component depends on this component"},dependsOnComponentsCard:{title:"Depends on components",emptyMessage:"No component is a dependency of this component"},dependsOnResourcesCard:{title:"Depends on resources",emptyMessage:"No resource is a dependency of this component"},entityContextMenu:{copiedMessage:"Copied!",moreButtonTitle:"More",inspectMenuTitle:"Inspect entity",copyURLMenuTitle:"Copy entity URL",unregisterMenuTitle:"Unregister entity"},entityLabelsCard:{title:"Labels",emptyDescription:"No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:",readMoreButtonTitle:"Read more"},entityLabels:{warningPanelTitle:"Entity not found",ownerLabel:"Owner",lifecycleLabel:"Lifecycle"},entityLinksCard:{title:"Links",emptyDescription:"No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:",readMoreButtonTitle:"Read more"},entityNotFound:{title:"Entity was not found",description:"Want to help us build this? Check out our Getting Started documentation.",docButtonTitle:"DOCS"},deleteEntity:{dialogTitle:"Are you sure you want to delete this entity?",deleteButtonTitle:"Delete",cancelButtonTitle:"Cancel",description:"This entity is not referenced by any location and is therefore not receiving updates. Click here to delete."},entityProcessingErrorsDescription:"The error below originates from",entityRelationWarningDescription:`This entity has relations to other entities, which can't be found in the catalog.
|
|
2
|
-
Entities not found are: `,hasComponentsCard:{title:"Has components",emptyMessage:"No component is part of this system"},hasResourcesCard:{title:"Has resources",emptyMessage:"No resource is part of this system"},hasSubcomponentsCard:{title:"Has subcomponents",emptyMessage:"No subcomponent is part of this component"},hasSubdomainsCard:{title:"Has subdomains",emptyMessage:"No subdomain is part of this domain"},hasSystemsCard:{title:"Has systems",emptyMessage:"No system is part of this domain"},relatedEntitiesCard:{emptyHelpLinkTitle:"Learn how to change this"},systemDiagramCard:{title:"System Diagram",description:"Use pinch & zoo to move around the diagram.",edgeLabels:{partOf:"part of",provides:"provides",dependsOn:"depends on"}}}})},65724:(B,x,e)=>{e.r(x),e.d(x,{AboutCard:()=>lt,AboutContent:()=>ce,AboutField:()=>k});var t=e(31085),u=e(72348),A=e(6820),b=e(17736),L=e(40703),R=e(48653),O=e(45685),S=e(37197),P=e(29365),T=e(58837),j=e(72072),c=e(31129),r=e(14041),m=e(53373),v=e.n(m),h=e(86613),y=e(10394),g=e(72501);const f=(0,T.A)(a=>({link:{display:"grid",justifyItems:"center",gridGap:4,textAlign:"center"},disabled:{color:a.palette.text.secondary,cursor:"default"},primary:{color:a.palette.primary.main},secondary:{color:a.palette.secondary.main},label:{textTransform:"uppercase",fontWeight:a.typography.fontWeightBold,letterSpacing:1.2}}),{name:"BackstageIconLinkVertical"});function I({color:a="primary",disabled:n=!1,href:o="#",icon:i=(0,t.jsx)(h.A,{}),label:s,onClick:l,title:d}){const p=f();return n?(0,t.jsxs)(y.A,{title:d,className:v()(p.link,p.disabled),children:[i,(0,t.jsx)(g.A,{variant:"caption",component:"span",className:p.label,children:s})]}):(0,t.jsxs)(j.N_,{title:d,className:v()(p.link,p[a]),to:o,onClick:l,children:[i,(0,t.jsx)(g.A,{variant:"caption",component:"span",className:p.label,children:s})]})}const V=(0,T.A)(a=>({links:{margin:a.spacing(2,0),display:"grid",gridAutoFlow:"column",gridAutoColumns:"min-content",gridGap:a.spacing(3)}}),{name:"BackstageHeaderIconLinkRow"});function J(a){const{links:n}=a,o=V();return(0,t.jsx)("nav",{className:o.links,children:n.map((i,s)=>(0,t.jsx)(I,{...i},s+1))})}var Q=e(96726),ye=e(13660),ee=e(82266);const ge=a=>{const{type:n}=a,o=(0,ee.n)(),i=ye.A,s=n?o.getSystemIcon(n)??i:i;return(0,t.jsx)(s,{})};var z=e(72427),be=e(36017),ve=e(39837),te=e(9222),ne=e(99538),ie=e(7341),ae=e(78692);function xe(a,n){const o=a.metadata.annotations?.[b.I4];if(o)try{const i=(0,ae.aY)(o),s=n.byUrl(i.target);return{locationTargetUrl:i.target,integrationType:s?.type}}catch{return}}var se=e(95203),H=e(51372),W=e(67871),K=e(34428),Ae=e(67720),oe=e(42899),Te=e(4650),Ce=e(82442);const je=(0,T.A)(a=>({value:{fontWeight:"bold",overflow:"hidden",lineHeight:"24px",wordBreak:"break-word"},label:{color:a.palette.text.secondary,textTransform:"uppercase",fontSize:"10px",fontWeight:"bold",letterSpacing:.5,overflow:"hidden",whiteSpace:"nowrap"}}));function k(a){const{label:n,value:o,gridSizes:i,children:s,className:l}=a,d=je(),p=(0,Ce.O)(s,w=>w.getElements()),$=p.length>0?p:(0,t.jsx)(g.A,{variant:"body2",className:d.value,children:o||"unknown"});return(0,t.jsxs)(oe.A,{item:!0,...i,className:l,children:[(0,t.jsx)(g.A,{variant:"h2",className:d.label,children:n}),$]})}var Ee=e(18750),re=e(87849),le=e(90759);const Le=(0,T.A)({description:{wordBreak:"break-word"}});function ke(a,n,o){if(n==="url"||a.includes("://"))return a;const i=o.type==="file"?`file://${o.target}`:o.target;return n==="file"||o.type==="file"?new URL(a,i).href:i}function ce(a){const{entity:n}=a,o=Le(),{t:i}=(0,re.i)(le.W),s=n.kind.toLocaleLowerCase("en-US")==="system",l=n.kind.toLocaleLowerCase("en-US")==="resource",d=n.kind.toLocaleLowerCase("en-US")==="component",p=n.kind.toLocaleLowerCase("en-US")==="api",$=n.kind.toLocaleLowerCase("en-US")==="template",w=n.kind.toLocaleLowerCase("en-US")==="location",D=n.kind.toLocaleLowerCase("en-US")==="group",M=(0,W.t)(n,H.jn,{kind:"system"}),Y=(0,W.t)(n,H.jn,{kind:"component"}),C=(0,W.t)(n,H.jn,{kind:"domain"}),G=(0,W.t)(n,H.vv);let U;try{U=(0,ae.Cr)(n)}catch{U=void 0}return(0,t.jsxs)(oe.A,{container:!0,children:[(0,t.jsx)(k,{label:i("aboutCard.descriptionField.label"),gridSizes:{xs:12},children:(0,t.jsx)(Te.h,{className:o.description,content:n?.metadata?.description||i("aboutCard.descriptionField.value")})}),(0,t.jsx)(k,{label:i("aboutCard.ownerField.label"),value:i("aboutCard.ownerField.value"),className:o.description,gridSizes:{xs:12,sm:6,lg:4},children:G.length>0&&(0,t.jsx)(K.i,{entityRefs:G,defaultKind:"group"})}),(s||C.length>0)&&(0,t.jsx)(k,{label:i("aboutCard.domainField.label"),value:i("aboutCard.domainField.value"),gridSizes:{xs:12,sm:6,lg:4},children:C.length>0&&(0,t.jsx)(K.i,{entityRefs:C,defaultKind:"domain"})}),(p||d||l||M.length>0)&&(0,t.jsx)(k,{label:i("aboutCard.systemField.label"),value:i("aboutCard.systemField.value"),gridSizes:{xs:12,sm:6,lg:4},children:M.length>0&&(0,t.jsx)(K.i,{entityRefs:M,defaultKind:"system"})}),d&&Y.length>0&&(0,t.jsx)(k,{label:i("aboutCard.parentComponentField.label"),value:i("aboutCard.parentComponentField.value"),gridSizes:{xs:12,sm:6,lg:4},children:(0,t.jsx)(K.i,{entityRefs:Y,defaultKind:"component"})}),(p||d||l||$||D||w||typeof n?.spec?.type=="string")&&(0,t.jsx)(k,{label:i("aboutCard.typeField.label"),value:n?.spec?.type,gridSizes:{xs:12,sm:6,lg:4}}),(p||d||typeof n?.spec?.lifecycle=="string")&&(0,t.jsx)(k,{label:i("aboutCard.lifecycleField.label"),value:n?.spec?.lifecycle,gridSizes:{xs:12,sm:6,lg:4}}),(0,t.jsx)(k,{label:i("aboutCard.tagsField.label"),value:i("aboutCard.tagsField.value"),gridSizes:{xs:12,sm:6,lg:4},children:(n?.metadata?.tags||[]).map(E=>(0,t.jsx)(Ae.A,{size:"small",label:E},E))}),w&&(n?.spec?.targets||n?.spec?.target)&&(0,t.jsx)(k,{label:i("aboutCard.targetsField.label"),gridSizes:{xs:12},children:(0,t.jsx)(Ee.m,{cols:1,items:(n.spec.targets||[n.spec.target]).map(E=>E).map(E=>({text:E,href:ke(E,n?.spec?.type||"unknown",U)}))})})]})}var Se=e(74011),Pe=e(25534),we=e(82451),Re=e(75625),Oe=e(11601),Ie=e.n(Oe);const Ne=JSON.parse(`{"$schema":"http://json-schema.org/draft-07/schema","$id":"Entity","description":"The parts of the format that's common to all versions/kinds of entity.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService","description":"Creates Lorems like a pro.","labels":{"product_name":"Random value Generator"},"annotations":{"docs":"https://github.com/..../tree/develop/doc"}},"spec":{"type":"service","lifecycle":"production","owner":"tools"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":false,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"$ref":"EntityMeta"},"spec":{"type":"object","description":"The specification data describing the entity itself."},"relations":{"type":"array","description":"The relations that this entity has with other entities.","items":{"$ref":"common#relation"}},"status":{"$ref":"common#status"}}}`),De=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityEnvelope","description":"The envelope skeleton parts of an entity - whatever is necessary to be able to give it a ref and pass to further validation / policy checking.","examples":[{"apiVersion":"backstage.io/v1alpha1","kind":"Component","metadata":{"name":"LoremService"}}],"type":"object","required":["apiVersion","kind","metadata"],"additionalProperties":true,"properties":{"apiVersion":{"type":"string","description":"The version of specification format for this particular entity that this is written against.","minLength":1,"examples":["backstage.io/v1alpha1","my-company.net/v1","1.0"]},"kind":{"type":"string","description":"The high level entity type being described.","minLength":1,"examples":["API","Component","Domain","Group","Location","Resource","System","Template","User"]},"metadata":{"type":"object","required":["name"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1}}}}}'),Me=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"EntityMeta","description":"Metadata fields common to all versions/kinds of entity.","examples":[{"uid":"e01199ab-08cc-44c2-8e19-5c29ded82521","etag":"lsndfkjsndfkjnsdfkjnsd==","name":"my-component-yay","namespace":"the-namespace","labels":{"backstage.io/custom":"ValueStuff"},"annotations":{"example.com/bindings":"are-secret"},"tags":["java","data"]}],"type":"object","required":["name"],"additionalProperties":true,"properties":{"uid":{"type":"string","description":"A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics.","examples":["e01199ab-08cc-44c2-8e19-5c29ded82521"],"minLength":1},"etag":{"type":"string","description":"An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value.","examples":["lsndfkjsndfkjnsdfkjnsd=="],"minLength":1},"name":{"type":"string","description":"The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair.","examples":["metadata-proxy"],"minLength":1},"namespace":{"type":"string","description":"The namespace that the entity belongs to.","default":"default","examples":["default","admin"],"minLength":1},"title":{"type":"string","description":"A display name of the entity, to be presented in user interfaces instead of the name property, when available.","examples":["React SSR Template"],"minLength":1},"description":{"type":"string","description":"A short (typically relatively few words, on one line) description of the entity."},"labels":{"type":"object","description":"Key/value pairs of identifying information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"annotations":{"type":"object","description":"Key/value pairs of non-identifying auxiliary information attached to the entity.","additionalProperties":true,"patternProperties":{"^.+$":{"type":"string"}}},"tags":{"type":"array","description":"A list of single-valued strings, to for example classify catalog entities in various ways.","items":{"type":"string","minLength":1}},"links":{"type":"array","description":"A list of external hyperlinks related to the entity. Links can provide additional contextual information that may be located outside of Backstage itself. For example, an admin dashboard or external CMS page.","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://admin.example-org.com"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["Admin Dashboard"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"type":{"type":"string","description":"An optional value to categorize links into specific groups.","examples":["runbook","documentation","logs","dashboard"],"minLength":1}}}}}}'),Ue=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"common","type":"object","description":"Common definitions to import from other schemas","definitions":{"reference":{"$id":"#reference","type":"object","description":"A reference by name to another entity.","required":["kind","namespace","name"],"additionalProperties":false,"properties":{"kind":{"type":"string","description":"The kind field of the entity.","minLength":1},"namespace":{"type":"string","description":"The metadata.namespace field of the entity.","minLength":1},"name":{"type":"string","description":"The metadata.name field of the entity.","minLength":1}}},"relation":{"$id":"#relation","type":"object","description":"A directed relation from one entity to another.","required":["type","targetRef"],"additionalProperties":false,"properties":{"type":{"type":"string","minLength":1,"pattern":"^\\\\w+$","description":"The type of relation."},"target":{"$ref":"#reference","deprecated":true},"targetRef":{"type":"string","minLength":1,"description":"The entity ref of the target of this relation."}}},"status":{"$id":"#status","type":"object","description":"The current status of the entity, as claimed by various sources.","required":[],"additionalProperties":true,"properties":{"items":{"type":"array","items":{"$ref":"#statusItem"}}}},"statusItem":{"$id":"#statusItem","type":"object","description":"A specific status item on a well known format.","required":["type","level","message"],"additionalProperties":true,"properties":{"type":{"type":"string","minLength":1},"level":{"$ref":"#statusLevel","description":"The status level / severity of the status item."},"message":{"type":"string","description":"A brief message describing the status, intended for human consumption."},"error":{"$ref":"#error","description":"An optional serialized error object related to the status."}}},"statusLevel":{"$id":"#statusLevel","type":"string","description":"A status level / severity.","enum":["info","warning","error"]},"error":{"$id":"#error","type":"object","description":"A serialized error object.","required":["name","message"],"additionalProperties":true,"properties":{"name":{"type":"string","examples":["Error","InputError"],"description":"The type name of the error","minLength":1},"message":{"type":"string","description":"The message of the error"},"code":{"type":"string","description":"An error code associated with the error"},"stack":{"type":"string","description":"An error stack trace"}}}}}'),de=new Map,Be=[De,Ne,Me,Ue];function $e(a){if(!a?.length)throw new TypeError("Unknown error");const n=a[0];throw new TypeError(`${n.instancePath||"<root>"} ${n.message}${n.params?` - ${Object.entries(n.params).map(([o,i])=>`${o}: ${i}`).join(", ")}`:""}`)}function Fe(a,n={}){const o=n?.disableCache??!1,i=o?"":JSON.stringify(a);if(!o){const p=de.get(i);if(p)return p}const s=ze(a),l=new(Ie())({allowUnionTypes:!0,allErrors:!0,validateSchema:!0});s.length&&l.addSchema(s,void 0,void 0,!0);const d=l.compile(a);return o||de.set(i,d),d}function ze(a){if(typeof a!="object")return[];const n=new Set;a.$id&&n.add(a.$id);const o=new Array,i=[a];for(;i.length;){const s=i.pop();for(const l of Ve(s))if(!n.has(l)){n.add(l);const d=Be.find(p=>p.$id===l);d&&(o.push(d),i.push(d))}}return o}function*Ve(a){const n=[a];for(;n.length;){const o=n.pop();if(typeof o=="object"&&o)for(const[i,s]of Object.entries(o))i==="$ref"&&typeof s=="string"?yield s.split("#")[0]:n.push(s)}}function He(a){const n=Fe(a);return o=>{if(n(o)===!0)return o;const s=n.errors?.filter(l=>["/kind","/apiVersion"].includes(l.instancePath));if(s?.length&&s.every(l=>l.keyword==="enum"))return!1;throw $e(n.errors)}}const We=He(JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema","$id":"TemplateV1beta3","description":"A Template describes a scaffolding task for use with the Scaffolder. It describes the required parameters as well as a series of steps that will be taken to execute the scaffolding task.","examples":[{"apiVersion":"scaffolder.backstage.io/v1beta3","kind":"Template","metadata":{"name":"react-ssr-template","title":"React SSR Template","description":"Next.js application skeleton for creating isomorphic web applications.","tags":["recommended","react"]},"spec":{"owner":"artist-relations-team","type":"website","parameters":{"required":["name","description","repoUrl"],"backstage:permissions":{"tags":["one","two"]},"properties":{"name":{"title":"Name","type":"string","description":"Unique name of the component"},"description":{"title":"Description","type":"string","description":"Description of the component"},"repoUrl":{"title":"Pick a repository","type":"string","ui:field":"RepoUrlPicker"}}},"steps":[{"id":"fetch","name":"Fetch","action":"fetch:plain","parameters":{"url":"./template"},"backstage:permissions":{"tags":["one","two"]}},{"id":"publish","name":"Publish to GitHub","action":"publish:github","parameters":{"repoUrl":"${{ parameters.repoUrl }}"},"if":"${{ parameters.repoUrl }}"}],"output":{"catalogInfoUrl":"${{ steps.publish.output.catalogInfoUrl }}"}}}],"allOf":[{"$ref":"Entity"},{"type":"object","required":["spec"],"properties":{"apiVersion":{"enum":["scaffolder.backstage.io/v1beta3"]},"kind":{"enum":["Template"]},"spec":{"type":"object","required":["type","steps"],"properties":{"type":{"type":"string","description":"The type of component created by the template. The software catalog accepts any type value, but an organization should take great care to establish a proper taxonomy for these. Tools including Backstage itself may read this field and behave differently depending on its value. For example, a website type component may present tooling in the Backstage interface that is specific to just websites.","examples":["service","website","library"],"minLength":1},"owner":{"type":"string","description":"The user (or group) owner of the template","minLength":1},"parameters":{"oneOf":[{"type":"object","description":"The JSONSchema describing the inputs for the template.","properties":{"backstage:permissions":{"type":"object","description":"Object used for authorizing the parameter","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}},{"type":"array","description":"A list of separate forms to collect parameters.","items":{"type":"object","description":"The JSONSchema describing the inputs for the template.","properties":{"backstage:permissions":{"type":"object","description":"Object used for authorizing the parameter","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}}}]},"presentation":{"type":"object","description":"A way to redefine the presentation of the scaffolder.","properties":{"buttonLabels":{"type":"object","description":"A way to redefine the labels for actionable buttons.","properties":{"backButtonText":{"type":"string","description":"A button which return the user to one step back."},"createButtonText":{"type":"string","description":"A button which start the execution of the template."},"reviewButtonText":{"type":"string","description":"A button which open the review step to verify the input prior to start the execution."}}}}},"EXPERIMENTAL_recovery":{"type":"object","description":"A task recovery section.","properties":{"EXPERIMENTAL_strategy":{"type":"string","description":"Recovery strategy for your task (none or startOver). By default none"}}},"EXPERIMENTAL_formDecorators":{"type":"array","description":"A list of decorators and their inputs that the form should trigger before submitting the job","items":{"type":"object","properties":{"id":{"type":"string","description":"The form hook ID"},"input":{"type":"object","description":"A object describing the inputs to the form hook."}}}},"steps":{"type":"array","description":"A list of steps to execute.","items":{"type":"object","description":"A description of the step to execute.","required":["action"],"properties":{"id":{"type":"string","description":"The ID of the step, which can be used to refer to its outputs."},"name":{"type":"string","description":"The name of the step, which will be displayed in the UI during the scaffolding process."},"action":{"type":"string","description":"The name of the action to execute."},"input":{"type":"object","description":"A templated object describing the inputs to the action."},"if":{"type":["string","boolean"],"description":"A templated condition that skips the step when evaluated to false. If the condition is true or not defined, the step is executed. The condition is true, if the input is not `false`, `undefined`, `null`, `\\"\\"`, `0`, or `[]`."},"backstage:permissions":{"type":"object","description":"Object used for authorizing the step","properties":{"tags":{"type":"array","items":{"type":"string"}}}}}}},"output":{"type":"object","description":"A templated object describing the outputs of the scaffolding task.","properties":{"links":{"type":"array","description":"A list of external hyperlinks, typically pointing to resources created or updated by the template","items":{"type":"object","required":[],"properties":{"url":{"type":"string","description":"A url in a standard uri format.","examples":["https://github.com/my-org/my-new-repo"],"minLength":1},"entityRef":{"type":"string","description":"An entity reference to an entity in the catalog.","examples":["Component:default/my-app"],"minLength":1},"title":{"type":"string","description":"A user friendly display name for the link.","examples":["View new repo"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1}}}},"text":{"type":"array","description":"A list of Markdown text blobs, like output data from the template.","items":{"type":"object","required":[],"properties":{"title":{"type":"string","description":"A user friendly display name for the text.","examples":["Output Content"],"minLength":1},"icon":{"type":"string","description":"A key representing a visual icon to be displayed in the UI.","examples":["dashboard"],"minLength":1},"content":{"type":"string","description":"The text blob to display in the UI, rendered as Markdown.","examples":["**hey** _I\'m_ Markdown"]}}}}},"additionalProperties":{"type":"string"}}}}}}]}')),ft={async check(a){return We(a)===a}},Ke=a=>a.apiVersion==="scaffolder.backstage.io/v1beta3"&&a.kind==="Template";var pe=e(36989);function Ye(a){const{entity:n,loading:o,error:i}=(0,ne.TY)(),{allowed:s,loading:l,error:d}=(0,pe.J)({permission:a,resourceRef:n?(0,A.U2)(n):void 0});return o||l?{loading:!0,allowed:!1}:i?{loading:!1,allowed:!1,error:i}:{loading:!1,allowed:s,error:d}}var Ge=e(35773),Je=e(91638);const Qe="backstage.io/source-template",Xe=a=>{const n=(0,z.gf)(ie.v),{value:o}=(0,Je.A)(async()=>{const i=a.metadata.annotations?.[Qe];let s;if(i)try{const l=await n.getEntityByRef(i);return s=(0,A.KU)(i),l!==void 0?s:void 0}catch{return}},[n,a]);return o};var N=e(14117);const me="scaffolder-template",Ze=(0,N.i)({name:"scaffolder.action.execute",attributes:{},resourceType:"scaffolder-action"}),qe=(0,N.i)({name:"scaffolder.template.parameter.read",attributes:{action:"read"},resourceType:me}),_e=(0,N.i)({name:"scaffolder.template.step.read",attributes:{action:"read"},resourceType:me}),et=(0,N.i)({name:"scaffolder.task.read",attributes:{action:"read"}}),ue=(0,N.i)({name:"scaffolder.task.create",attributes:{action:"create"}}),tt=(0,N.i)({name:"scaffolder.task.cancel",attributes:{}}),nt=(0,N.i)({name:"scaffolder.template.management",attributes:{}}),it=[qe,_e],at=[Ze],st=[tt,ue,et],gt=[...it,...at,...st,nt],ot="backstage.io/techdocs-ref",X="backstage.io/techdocs-entity",rt=(0,T.A)({gridItemCard:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px"},fullHeightCard:{display:"flex",flexDirection:"column",height:"100%"},gridItemCardContent:{flex:1},fullHeightCardContent:{flex:1}});function lt(a){const{variant:n}=a,o=(0,ee.n)(),i=rt(),{entity:s}=(0,ne.tN)(),l=(0,z.gf)(Q.Y),d=(0,z.gf)(ie.v),p=(0,z.gf)(be.k),$=(0,z.gf)(ve.m),w=(0,te.S)(se.UJ),D=(0,te.S)(se.Zg),M=Xe(s),{allowed:Y}=Ye(Ge.tS),{t:C}=(0,re.i)(le.W),{allowed:G}=(0,pe.J)({permission:ue}),U=xe(s,l),E=s.metadata.annotations?.[u.P];let F;if(s.metadata.annotations?.[X])try{F=(0,A.KU)(s.metadata.annotations?.[X])}catch{F=void 0}const ct={label:C("aboutCard.viewSource"),disabled:!U,icon:(0,t.jsx)(ge,{type:U?.integrationType}),href:U?.locationTargetUrl},dt={label:C("aboutCard.viewTechdocs"),disabled:!(s.metadata.annotations?.[ot]||s.metadata.annotations?.[X])||!w,icon:(0,t.jsx)(we.A,{}),href:w&&w(F?{namespace:F.namespace||u.oQ,kind:F.kind,name:F.name}:{namespace:s.metadata.namespace||u.oQ,kind:s.kind,name:s.metadata.name})},he=[ct,dt];if(Ke(s)){const _=o.getSystemIcon("scaffolder")??Pe.A,ut={label:C("aboutCard.launchTemplate"),icon:(0,t.jsx)(_,{}),disabled:!D||!G,href:D&&D({templateName:s.metadata.name,namespace:s.metadata.namespace||u.oQ})};he.push(ut)}let Z="";n==="gridItem"?Z=i.gridItemCard:n==="fullHeight"&&(Z=i.fullHeightCard);let q="";n==="gridItem"?q=i.gridItemCardContent:n==="fullHeight"&&(q=i.fullHeightCardContent);const fe=s.metadata.annotations?.[b.Eo],pt=fe?.startsWith("url:")||fe?.startsWith("file:"),mt=(0,r.useCallback)(async()=>{try{await d.refreshEntity((0,A.U2)(s)),p.post({message:C("aboutCard.refreshScheduledMessage"),severity:"info",display:"transient"})}catch(_){$.post(_)}},[d,s,p,C,$]);return(0,t.jsxs)(L.A,{className:Z,children:[(0,t.jsx)(O.A,{title:C("aboutCard.title"),action:(0,t.jsxs)(t.Fragment,{children:[pt&&Y&&(0,t.jsx)(P.A,{"aria-label":"Refresh",title:C("aboutCard.refreshButtonTitle"),onClick:mt,children:(0,t.jsx)(Se.A,{})}),(0,t.jsx)(P.A,{component:j.N_,"aria-label":"Edit",disabled:!E,title:C("aboutCard.editButtonTitle"),to:E??"#",children:(0,t.jsx)(Re.A,{})}),M&&D&&(0,t.jsx)(P.A,{component:j.N_,title:C("aboutCard.createSimilarButtonTitle"),to:D({namespace:M.namespace,templateName:M.name}),children:(0,t.jsx)(c.z9,{id:"scaffolder"})})]}),subheader:(0,t.jsx)(J,{links:he})}),(0,t.jsx)(S.A,{}),(0,t.jsx)(R.A,{className:q,children:(0,t.jsx)(ce,{entity:s})})]})}},18750:(B,x,e)=>{e.d(x,{m:()=>v});var t=e(31085),u=e(24709),A=e(44913),b=e(14041),L=e(10394),R=e(72501),O=e(58837),S=e(23127),P=e(72072);const T=(0,O.A)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}});function j(h){const{href:y,text:g,Icon:f}=h,I=T();return(0,t.jsxs)(L.A,{display:"flex",children:[(0,t.jsx)(L.A,{mr:1,className:I.svgIcon,children:(0,t.jsx)(R.A,{component:"div",children:f?(0,t.jsx)(f,{}):(0,t.jsx)(S.A,{})})}),(0,t.jsx)(L.A,{flexGrow:"1",children:(0,t.jsx)(P.N_,{to:y,target:"_blank",rel:"noopener",children:g||y})})]})}var c=e(5893);const r={xs:1,sm:1,md:1,lg:2,xl:3};function m(h){const y=[(0,c.A)(f=>f.breakpoints.up("xl"))?"xl":null,(0,c.A)(f=>f.breakpoints.up("lg"))?"lg":null,(0,c.A)(f=>f.breakpoints.up("md"))?"md":null,(0,c.A)(f=>f.breakpoints.up("sm"))?"sm":null,(0,c.A)(f=>f.breakpoints.up("xs"))?"xs":null];let g=1;if(typeof h=="number")g=h;else{const f=y.find(I=>I!==null)??"xs";g=h?.[f]??r[f]}return g}function v(h){const{items:y,cols:g=void 0}=h,f=m(g);return(0,t.jsx)(u.A,{rowHeight:"auto",cols:f,children:y.map(({text:I,href:V,Icon:J},Q)=>(0,t.jsx)(A.A,{children:(0,t.jsx)(j,{href:V,text:I??V,Icon:J})},Q))})}},14117:(B,x,e)=>{e.d(x,{i:()=>t});function t({name:u,attributes:A,resourceType:b}){return b?{type:"resource",name:u,attributes:A,resourceType:b}:{type:"basic",name:u,attributes:A}}},36989:(B,x,e)=>{e.d(x,{J:()=>c});var t=e(72427),u=e(96824);function A(r,m){return r.name===m.name}function b(r,m){return"resourceType"in r?!m||r.resourceType===m:!1}function L(r){return r.attributes.action==="create"}function R(r){return r.attributes.action==="read"}function O(r){return r.attributes.action==="update"}function S(r){return r.attributes.action==="delete"}function P(r){return{authorize:async(m,v)=>await r.authorize(m,v),authorizeConditional(m,v){const h=m;return r.authorize(h,v)}}}var T=e(54241),j=e(68721);function c(r){const m=(0,t.gf)(u.x),{data:v,error:h}=(0,j.Ay)(r,async y=>{if(b(y.permission)&&!y.resourceRef)return T.b.DENY;const{result:g}=await m.authorize(y);return g});return h?{error:h,loading:!1,allowed:!1}:v===void 0?{loading:!0,allowed:!1}:{loading:!1,allowed:v===T.b.ALLOW}}}}]);})();
|
|
3
|
-
|
|
4
|
-
//# sourceMappingURL=5724.a8d74000.chunk.js.map
|
|
@@ -1 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wB,CACzD,OAAOA,EAAW1S,WAAWC,SAAW,QAC1C,CAMO,SAAS2Z,EAAmBlH,EAAwB,CACzD,OAAOA,EAAW1S,WAAWC,SAAW,QAC1C,CAOO,SAAS4Z,EACdC,EAA0C,CAE1C,MAAO,CACLC,UAAW,MACTC,EACAtK,IAEiB,MAAMoK,EAAqBC,UAAUC,EAAUtK,CAAO,EAIzEuK,qBACED,EACAtK,EAAiC,CAEjC,MAAMwK,EACJF,EACF,OAAOF,EAAqBC,UAAUG,EAAgBxK,CAAO,CAC/D,CACF,CACF,C,0BChEO,SAASsD,EACdmH,EAQK,CAEL,MAAMC,KAAgB/G,EAAAA,IAAOgH,EAAAA,CAAgBA,EACvC,CAAEvI,KAAAA,EAAM3Q,MAAAA,CAAM,KAAImZ,EAAAA,IAAOH,EAAO,MAAOI,GAAAA,CAM3C,GAAIf,EAAqBe,EAAK7H,UAAU,GAAK,CAAC6H,EAAKtH,YACjD,OAAOuH,EAAAA,EAAgBC,KAGzB,KAAM,CAAEC,OAAAA,CAAO,EAAI,MAAMN,EAAcL,UAAUQ,CAAI,EACrD,OAAOG,CACT,CAAC,EAED,OAAIvZ,EACK,CAAEA,MAAAA,EAAOD,QAAS,GAAO2R,QAAS,EAAM,EAE7Cf,IAASnQ,OACJ,CAAET,QAAS,GAAM2R,QAAS,EAAM,EAElC,CAAE3R,QAAS,GAAO2R,QAASf,IAAS0I,EAAAA,EAAgBG,KAAM,CACnE,C","sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog-common/src/permissions.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/hooks/useEntity.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/alpha/translation.ts","webpack://techdocs-cli-embedded-app/../core-components/src/components/HeaderIconLinkRow/IconLinkVertical.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/components/HeaderIconLinkRow/HeaderIconLinkRow.tsx","webpack://techdocs-cli-embedded-app/../integration-react/src/components/ScmIntegrationIcon/ScmIntegrationIcon.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/utils/getEntitySourceLocation.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/AboutCard/AboutField.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/AboutCard/AboutContent.tsx","webpack://techdocs-cli-embedded-app/../catalog-model/src/validation/ajv.ts","webpack://techdocs-cli-embedded-app/../catalog-model/src/validation/entityKindSchemaValidator.ts","webpack://techdocs-cli-embedded-app/../../plugins/scaffolder-common/src/TemplateEntityV1beta3.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/hooks/useEntityPermission.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/AboutCard/hooks.ts","webpack://techdocs-cli-embedded-app/../../plugins/scaffolder-common/src/permissions.ts","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/AboutCard/AboutCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/IconLink.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/useDynamicColumns.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/EntityLinksCard/LinksGridList.tsx","webpack://techdocs-cli-embedded-app/../../plugins/permission-common/src/permissions/createPermission.ts","webpack://techdocs-cli-embedded-app/../../plugins/permission-common/src/permissions/util.ts","webpack://techdocs-cli-embedded-app/../../plugins/permission-react/src/hooks/usePermission.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createPermission,\n ResourcePermission,\n} from '@backstage/plugin-permission-common';\n\n/**\n * Permission resource type which corresponds to catalog entities.\n *\n * {@link https://backstage.io/docs/features/software-catalog/}\n * @alpha\n */\nexport const RESOURCE_TYPE_CATALOG_ENTITY = 'catalog-entity';\n\n/**\n * Convenience type for catalog entity\n * {@link @backstage/plugin-permission-common#ResourcePermission}s.\n * @alpha\n */\nexport type CatalogEntityPermission = ResourcePermission<\n typeof RESOURCE_TYPE_CATALOG_ENTITY\n>;\n\n/**\n * This permission is used to authorize actions that involve reading one or more\n * entities from the catalog.\n *\n * If this permission is not authorized, it will appear that the entity does not\n * exist in the catalog — both in the frontend and in API responses.\n * @alpha\n */\nexport const catalogEntityReadPermission = createPermission({\n name: 'catalog.entity.read',\n attributes: {\n action: 'read',\n },\n resourceType: RESOURCE_TYPE_CATALOG_ENTITY,\n});\n\n/**\n * This permission is used to authorize actions that involve creating a new\n * catalog entity. This includes registering an existing component into the\n * catalog.\n * @alpha\n */\nexport const catalogEntityCreatePermission = createPermission({\n name: 'catalog.entity.create',\n attributes: {\n action: 'create',\n },\n});\n\n/**\n * This permission is used to designate actions that involve removing one or\n * more entities from the catalog.\n * @alpha\n */\nexport const catalogEntityDeletePermission = createPermission({\n name: 'catalog.entity.delete',\n attributes: {\n action: 'delete',\n },\n resourceType: RESOURCE_TYPE_CATALOG_ENTITY,\n});\n\n/**\n * This permission is used to designate refreshing one or more entities from the\n * catalog.\n * @alpha\n */\nexport const catalogEntityRefreshPermission = createPermission({\n name: 'catalog.entity.refresh',\n attributes: {\n action: 'update',\n },\n resourceType: RESOURCE_TYPE_CATALOG_ENTITY,\n});\n\n/**\n * This permission is used to authorize validating catalog entities.\n * @alpha\n */\nexport const catalogEntityValidatePermission = createPermission({\n name: 'catalog.entity.validate',\n attributes: {},\n});\n\n/**\n * This permission is used to designate actions that involve reading one or more\n * locations from the catalog.\n *\n * If this permission is not authorized, it will appear that the location does\n * not exist in the catalog — both in the frontend and in API responses.\n * @alpha\n */\nexport const catalogLocationReadPermission = createPermission({\n name: 'catalog.location.read',\n attributes: {\n action: 'read',\n },\n});\n\n/**\n * This permission is used to designate actions that involve creating catalog\n * locations.\n * @alpha\n */\nexport const catalogLocationCreatePermission = createPermission({\n name: 'catalog.location.create',\n attributes: {\n action: 'create',\n },\n});\n\n/**\n * This permission is used to authorize analyzing catalog locations.\n * @alpha\n */\nexport const catalogLocationAnalyzePermission = createPermission({\n name: 'catalog.location.analyze',\n attributes: {},\n});\n\n/**\n * This permission is used to designate actions that involve deleting locations\n * from the catalog.\n * @alpha\n */\nexport const catalogLocationDeletePermission = createPermission({\n name: 'catalog.location.delete',\n attributes: {\n action: 'delete',\n },\n});\n\n/**\n * List of all catalog permissions.\n * @alpha\n */\nexport const catalogPermissions = [\n catalogEntityReadPermission,\n catalogEntityCreatePermission,\n catalogEntityDeletePermission,\n catalogEntityRefreshPermission,\n catalogEntityValidatePermission,\n catalogLocationReadPermission,\n catalogLocationCreatePermission,\n catalogLocationDeletePermission,\n catalogLocationAnalyzePermission,\n];\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { AnalyticsContext } from '@backstage/core-plugin-api';\nimport {\n createVersionedContext,\n createVersionedValueMap,\n useVersionedContext,\n} from '@backstage/version-bridge';\nimport React, { ReactNode } from 'react';\n\n/** @public */\nexport type EntityLoadingStatus<TEntity extends Entity = Entity> = {\n entity?: TEntity;\n loading: boolean;\n error?: Error;\n refresh?: VoidFunction;\n};\n\n// This context has support for multiple concurrent versions of this package.\n// It is currently used in parallel with the old context in order to provide\n// a smooth transition, but will eventually be the only context we use.\nconst NewEntityContext = createVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n);\n\n/**\n * Properties for the AsyncEntityProvider component.\n *\n * @public\n */\nexport interface AsyncEntityProviderProps {\n children: ReactNode;\n entity?: Entity;\n loading: boolean;\n error?: Error;\n refresh?: VoidFunction;\n}\n\n/**\n * Provides a loaded entity to be picked up by the `useEntity` hook.\n *\n * @public\n */\nexport const AsyncEntityProvider = (props: AsyncEntityProviderProps) => {\n const { children, entity, loading, error, refresh } = props;\n const value = { entity, loading, error, refresh };\n // We provide both the old and the new context, since\n // consumers might be doing things like `useContext(EntityContext)`\n return (\n <NewEntityContext.Provider value={createVersionedValueMap({ 1: value })}>\n <AnalyticsContext\n attributes={{\n ...(entity ? { entityRef: stringifyEntityRef(entity) } : undefined),\n }}\n >\n {children}\n </AnalyticsContext>\n </NewEntityContext.Provider>\n );\n};\n\n/**\n * Properties for the EntityProvider component.\n *\n * @public\n */\nexport interface EntityProviderProps {\n children: ReactNode;\n entity?: Entity;\n}\n\n/**\n * Provides an entity to be picked up by the `useEntity` hook.\n *\n * @public\n */\nexport const EntityProvider = (props: EntityProviderProps) => (\n <AsyncEntityProvider\n entity={props.entity}\n loading={!Boolean(props.entity)}\n error={undefined}\n refresh={undefined}\n children={props.children}\n />\n);\n\n/**\n * Grab the current entity from the context, throws if the entity has not yet been loaded\n * or is not available.\n *\n * @public\n */\nexport function useEntity<TEntity extends Entity = Entity>(): {\n entity: TEntity;\n} {\n const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n );\n\n if (!versionedHolder) {\n throw new Error('Entity context is not available');\n }\n\n const value = versionedHolder.atVersion(1);\n if (!value) {\n throw new Error('EntityContext v1 not available');\n }\n\n if (!value.entity) {\n throw new Error(\n 'useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.',\n );\n }\n\n return { entity: value.entity as TEntity };\n}\n\n/**\n * Grab the current entity from the context, provides loading state and errors, and the ability to refresh.\n *\n * @public\n */\nexport function useAsyncEntity<\n TEntity extends Entity = Entity,\n>(): EntityLoadingStatus<TEntity> {\n const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n );\n\n if (!versionedHolder) {\n throw new Error('Entity context is not available');\n }\n const value = versionedHolder.atVersion(1);\n if (!value) {\n throw new Error('EntityContext v1 not available');\n }\n\n const { entity, loading, error, refresh } = value;\n return { entity: entity as TEntity, loading, error, refresh };\n}\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const catalogTranslationRef = createTranslationRef({\n id: 'catalog',\n messages: {\n indexPage: {\n title: `{{orgName}} Catalog`,\n createButtonTitle: 'Create',\n supportButtonContent: 'All your software catalog entities',\n },\n aboutCard: {\n title: 'About',\n refreshButtonTitle: 'Schedule entity refresh',\n editButtonTitle: 'Edit Metadata',\n createSimilarButtonTitle: 'Create something similar',\n refreshScheduledMessage: 'Refresh scheduled',\n launchTemplate: 'Launch Template',\n viewTechdocs: 'View TechDocs',\n viewSource: 'View Source',\n descriptionField: {\n label: 'Description',\n value: 'No description',\n },\n ownerField: {\n label: 'Owner',\n value: 'No Owner',\n },\n domainField: {\n label: 'Domain',\n value: 'No Domain',\n },\n systemField: {\n label: 'System',\n value: 'No System',\n },\n parentComponentField: {\n label: 'Parent Component',\n value: 'No Parent Component',\n },\n typeField: {\n label: 'Type',\n },\n lifecycleField: {\n label: 'Lifecycle',\n },\n tagsField: {\n label: 'Tags',\n value: 'No Tags',\n },\n targetsField: {\n label: 'Targets',\n },\n },\n searchResultItem: {\n lifecycle: 'Lifecycle',\n Owner: 'Owner',\n },\n catalogTable: {\n warningPanelTitle: 'Could not fetch catalog entities.',\n viewActionTitle: 'View',\n editActionTitle: 'Edit',\n starActionTitle: 'Add to favorites',\n unStarActionTitle: 'Remove from favorites',\n },\n dependencyOfComponentsCard: {\n title: 'Dependency of components',\n emptyMessage: 'No component depends on this component',\n },\n dependsOnComponentsCard: {\n title: 'Depends on components',\n emptyMessage: 'No component is a dependency of this component',\n },\n dependsOnResourcesCard: {\n title: 'Depends on resources',\n emptyMessage: 'No resource is a dependency of this component',\n },\n entityContextMenu: {\n copiedMessage: 'Copied!',\n moreButtonTitle: 'More',\n inspectMenuTitle: 'Inspect entity',\n copyURLMenuTitle: 'Copy entity URL',\n unregisterMenuTitle: 'Unregister entity',\n },\n entityLabelsCard: {\n title: 'Labels',\n emptyDescription:\n 'No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityLabels: {\n warningPanelTitle: 'Entity not found',\n ownerLabel: 'Owner',\n lifecycleLabel: 'Lifecycle',\n },\n entityLinksCard: {\n title: 'Links',\n emptyDescription:\n 'No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityNotFound: {\n title: 'Entity was not found',\n description:\n 'Want to help us build this? Check out our Getting Started documentation.',\n docButtonTitle: 'DOCS',\n },\n deleteEntity: {\n dialogTitle: 'Are you sure you want to delete this entity?',\n deleteButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n description:\n 'This entity is not referenced by any location and is therefore not receiving updates. Click here to delete.',\n },\n entityProcessingErrorsDescription: 'The error below originates from',\n entityRelationWarningDescription:\n \"This entity has relations to other entities, which can't be found in the catalog.\\n Entities not found are: \",\n hasComponentsCard: {\n title: 'Has components',\n emptyMessage: 'No component is part of this system',\n },\n hasResourcesCard: {\n title: 'Has resources',\n emptyMessage: 'No resource is part of this system',\n },\n hasSubcomponentsCard: {\n title: 'Has subcomponents',\n emptyMessage: 'No subcomponent is part of this component',\n },\n hasSubdomainsCard: {\n title: 'Has subdomains',\n emptyMessage: 'No subdomain is part of this domain',\n },\n hasSystemsCard: {\n title: 'Has systems',\n emptyMessage: 'No system is part of this domain',\n },\n relatedEntitiesCard: {\n emptyHelpLinkTitle: 'Learn how to change this',\n },\n systemDiagramCard: {\n title: 'System Diagram',\n description: 'Use pinch & zoo to move around the diagram.',\n edgeLabels: {\n partOf: 'part of',\n provides: 'provides',\n dependsOn: 'depends on',\n },\n },\n },\n});\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React from 'react';\nimport classnames from 'classnames';\nimport { makeStyles } from '@material-ui/core/styles';\nimport LinkIcon from '@material-ui/icons/Link';\nimport { Link } from '../Link';\nimport Box from '@material-ui/core/Box';\nimport Typography from '@material-ui/core/Typography';\n\nexport type IconLinkVerticalProps = {\n color?: 'primary' | 'secondary';\n disabled?: boolean;\n href?: string;\n icon?: React.ReactNode;\n label: string;\n onClick?: React.MouseEventHandler<HTMLAnchorElement>;\n title?: string;\n};\n\n/** @public */\nexport type IconLinkVerticalClassKey =\n | 'link'\n | 'disabled'\n | 'primary'\n | 'secondary'\n | 'label';\n\nconst useIconStyles = makeStyles(\n theme => ({\n link: {\n display: 'grid',\n justifyItems: 'center',\n gridGap: 4,\n textAlign: 'center',\n },\n disabled: {\n color: theme.palette.text.secondary,\n cursor: 'default',\n },\n primary: {\n color: theme.palette.primary.main,\n },\n secondary: {\n color: theme.palette.secondary.main,\n },\n label: {\n textTransform: 'uppercase',\n fontWeight: theme.typography.fontWeightBold,\n letterSpacing: 1.2,\n },\n }),\n { name: 'BackstageIconLinkVertical' },\n);\n\n/** @public */\nexport function IconLinkVertical({\n color = 'primary',\n disabled = false,\n href = '#',\n icon = <LinkIcon />,\n label,\n onClick,\n title,\n}: IconLinkVerticalProps) {\n const classes = useIconStyles();\n\n if (disabled) {\n return (\n <Box title={title} className={classnames(classes.link, classes.disabled)}>\n {icon}\n <Typography\n variant=\"caption\"\n component=\"span\"\n className={classes.label}\n >\n {label}\n </Typography>\n </Box>\n );\n }\n\n return (\n <Link\n title={title}\n className={classnames(classes.link, classes[color])}\n to={href}\n onClick={onClick}\n >\n {icon}\n <Typography variant=\"caption\" component=\"span\" className={classes.label}>\n {label}\n </Typography>\n </Link>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { makeStyles } from '@material-ui/core/styles';\nimport React from 'react';\nimport { IconLinkVertical, IconLinkVerticalProps } from './IconLinkVertical';\n\n/** @public */\nexport type HeaderIconLinkRowClassKey = 'links';\n\nconst useStyles = makeStyles(\n theme => ({\n links: {\n margin: theme.spacing(2, 0),\n display: 'grid',\n gridAutoFlow: 'column',\n gridAutoColumns: 'min-content',\n gridGap: theme.spacing(3),\n },\n }),\n { name: 'BackstageHeaderIconLinkRow' },\n);\n\ntype Props = {\n links: IconLinkVerticalProps[];\n};\n\n/**\n * HTML nav tag with links mapped inside\n *\n * @public\n *\n */\nexport function HeaderIconLinkRow(props: Props) {\n const { links } = props;\n const classes = useStyles();\n return (\n <nav className={classes.links}>\n {links.map((link, index) => (\n <IconLinkVertical key={index + 1} {...link} />\n ))}\n </nav>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport CodeIcon from '@material-ui/icons/Code';\nimport React from 'react';\nimport { useApp } from '@backstage/core-plugin-api';\n\n/**\n * Props for {@link ScmIntegrationIcon}.\n *\n * @public\n */\nexport type ScmIntegrationIconProps = {\n /**\n * The integration type, e.g. \"github\".\n */\n type?: string;\n};\n\n/**\n * An icon that represents a certain SCM integration.\n *\n * @public\n */\nexport const ScmIntegrationIcon = (props: ScmIntegrationIconProps) => {\n const { type } = props;\n const app = useApp();\n const DefaultIcon = CodeIcon;\n const Icon = type ? app.getSystemIcon(type) ?? DefaultIcon : DefaultIcon;\n return <Icon />;\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n ANNOTATION_SOURCE_LOCATION,\n Entity,\n parseLocationRef,\n} from '@backstage/catalog-model';\nimport { scmIntegrationsApiRef } from '@backstage/integration-react';\n\n/** @public */\nexport type EntitySourceLocation = {\n locationTargetUrl: string;\n integrationType?: string;\n};\n\n/** @public */\nexport function getEntitySourceLocation(\n entity: Entity,\n scmIntegrationsApi: typeof scmIntegrationsApiRef.T,\n): EntitySourceLocation | undefined {\n const sourceLocation =\n entity.metadata.annotations?.[ANNOTATION_SOURCE_LOCATION];\n\n if (!sourceLocation) {\n return undefined;\n }\n\n try {\n const sourceLocationRef = parseLocationRef(sourceLocation);\n const integration = scmIntegrationsApi.byUrl(sourceLocationRef.target);\n return {\n locationTargetUrl: sourceLocationRef.target,\n integrationType: integration?.type,\n };\n } catch {\n return undefined;\n }\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useElementFilter } from '@backstage/core-plugin-api';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport React from 'react';\n\nconst useStyles = makeStyles(theme => ({\n value: {\n fontWeight: 'bold',\n overflow: 'hidden',\n lineHeight: '24px',\n wordBreak: 'break-word',\n },\n label: {\n color: theme.palette.text.secondary,\n textTransform: 'uppercase',\n fontSize: '10px',\n fontWeight: 'bold',\n letterSpacing: 0.5,\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n },\n}));\n\n/**\n * Props for {@link AboutField}.\n *\n * @public\n */\nexport interface AboutFieldProps {\n label: string;\n value?: string;\n gridSizes?: Record<string, number>;\n children?: React.ReactNode;\n className?: string;\n}\n\n/** @public */\nexport function AboutField(props: AboutFieldProps) {\n const { label, value, gridSizes, children, className } = props;\n const classes = useStyles();\n\n const childElements = useElementFilter(children, c => c.getElements());\n\n // Content is either children or a string prop `value`\n const content =\n childElements.length > 0 ? (\n childElements\n ) : (\n <Typography variant=\"body2\" className={classes.value}>\n {value || `unknown`}\n </Typography>\n );\n return (\n <Grid item {...gridSizes} className={className}>\n <Typography variant=\"h2\" className={classes.label}>\n {label}\n </Typography>\n {content}\n </Grid>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Entity,\n getEntitySourceLocation,\n RELATION_OWNED_BY,\n RELATION_PART_OF,\n} from '@backstage/catalog-model';\nimport {\n EntityRefLinks,\n getEntityRelations,\n} from '@backstage/plugin-catalog-react';\nimport { JsonArray } from '@backstage/types';\nimport Chip from '@material-ui/core/Chip';\nimport Grid from '@material-ui/core/Grid';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { MarkdownContent } from '@backstage/core-components';\nimport React from 'react';\nimport { AboutField } from './AboutField';\nimport { LinksGridList } from '../EntityLinksCard/LinksGridList';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { catalogTranslationRef } from '../../alpha/translation';\n\nconst useStyles = makeStyles({\n description: {\n wordBreak: 'break-word',\n },\n});\n\n/**\n * Props for {@link AboutContent}.\n *\n * @public\n */\nexport interface AboutContentProps {\n entity: Entity;\n}\n\nfunction getLocationTargetHref(\n target: string,\n type: string,\n entitySourceLocation: {\n type: string;\n target: string;\n },\n): string {\n if (type === 'url' || target.includes('://')) {\n return target;\n }\n\n const srcLocationUrl =\n entitySourceLocation.type === 'file'\n ? `file://${entitySourceLocation.target}`\n : entitySourceLocation.target;\n\n if (type === 'file' || entitySourceLocation.type === 'file') {\n return new URL(target, srcLocationUrl).href;\n }\n\n return srcLocationUrl;\n}\n\n/** @public */\nexport function AboutContent(props: AboutContentProps) {\n const { entity } = props;\n const classes = useStyles();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const isSystem = entity.kind.toLocaleLowerCase('en-US') === 'system';\n const isResource = entity.kind.toLocaleLowerCase('en-US') === 'resource';\n const isComponent = entity.kind.toLocaleLowerCase('en-US') === 'component';\n const isAPI = entity.kind.toLocaleLowerCase('en-US') === 'api';\n const isTemplate = entity.kind.toLocaleLowerCase('en-US') === 'template';\n const isLocation = entity.kind.toLocaleLowerCase('en-US') === 'location';\n const isGroup = entity.kind.toLocaleLowerCase('en-US') === 'group';\n\n const partOfSystemRelations = getEntityRelations(entity, RELATION_PART_OF, {\n kind: 'system',\n });\n const partOfComponentRelations = getEntityRelations(\n entity,\n RELATION_PART_OF,\n {\n kind: 'component',\n },\n );\n const partOfDomainRelations = getEntityRelations(entity, RELATION_PART_OF, {\n kind: 'domain',\n });\n const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);\n\n let entitySourceLocation:\n | {\n type: string;\n target: string;\n }\n | undefined;\n try {\n entitySourceLocation = getEntitySourceLocation(entity);\n } catch (e) {\n entitySourceLocation = undefined;\n }\n\n return (\n <Grid container>\n <AboutField\n label={t('aboutCard.descriptionField.label')}\n gridSizes={{ xs: 12 }}\n >\n <MarkdownContent\n className={classes.description}\n content={\n entity?.metadata?.description ||\n t('aboutCard.descriptionField.value')\n }\n />\n </AboutField>\n <AboutField\n label={t('aboutCard.ownerField.label')}\n value={t('aboutCard.ownerField.value')}\n className={classes.description}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n {ownedByRelations.length > 0 && (\n <EntityRefLinks entityRefs={ownedByRelations} defaultKind=\"group\" />\n )}\n </AboutField>\n {(isSystem || partOfDomainRelations.length > 0) && (\n <AboutField\n label={t('aboutCard.domainField.label')}\n value={t('aboutCard.domainField.value')}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n {partOfDomainRelations.length > 0 && (\n <EntityRefLinks\n entityRefs={partOfDomainRelations}\n defaultKind=\"domain\"\n />\n )}\n </AboutField>\n )}\n {(isAPI ||\n isComponent ||\n isResource ||\n partOfSystemRelations.length > 0) && (\n <AboutField\n label={t('aboutCard.systemField.label')}\n value={t('aboutCard.systemField.value')}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n {partOfSystemRelations.length > 0 && (\n <EntityRefLinks\n entityRefs={partOfSystemRelations}\n defaultKind=\"system\"\n />\n )}\n </AboutField>\n )}\n {isComponent && partOfComponentRelations.length > 0 && (\n <AboutField\n label={t('aboutCard.parentComponentField.label')}\n value={t('aboutCard.parentComponentField.value')}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n <EntityRefLinks\n entityRefs={partOfComponentRelations}\n defaultKind=\"component\"\n />\n </AboutField>\n )}\n {(isAPI ||\n isComponent ||\n isResource ||\n isTemplate ||\n isGroup ||\n isLocation ||\n typeof entity?.spec?.type === 'string') && (\n <AboutField\n label={t('aboutCard.typeField.label')}\n value={entity?.spec?.type as string}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n />\n )}\n {(isAPI ||\n isComponent ||\n typeof entity?.spec?.lifecycle === 'string') && (\n <AboutField\n label={t('aboutCard.lifecycleField.label')}\n value={entity?.spec?.lifecycle as string}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n />\n )}\n <AboutField\n label={t('aboutCard.tagsField.label')}\n value={t('aboutCard.tagsField.value')}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n {(entity?.metadata?.tags || []).map(tag => (\n <Chip key={tag} size=\"small\" label={tag} />\n ))}\n </AboutField>\n {isLocation && (entity?.spec?.targets || entity?.spec?.target) && (\n <AboutField\n label={t('aboutCard.targetsField.label')}\n gridSizes={{ xs: 12 }}\n >\n <LinksGridList\n cols={1}\n items={((entity.spec.targets as JsonArray) || [entity.spec.target])\n .map(target => target as string)\n .map(target => ({\n text: target,\n href: getLocationTargetHref(\n target,\n (entity?.spec?.type || 'unknown') as string,\n entitySourceLocation!,\n ),\n }))}\n />\n </AboutField>\n )}\n </Grid>\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Ajv, { Schema, ValidateFunction } from 'ajv';\nimport entitySchema from '../schema/Entity.schema.json';\nimport entityEnvelopeSchema from '../schema/EntityEnvelope.schema.json';\nimport entityMetaSchema from '../schema/EntityMeta.schema.json';\nimport commonSchema from '../schema/shared/common.schema.json';\n\n// A local cache of compiled schemas, to avoid duplicate work.\n// The keys are JSON stringified versions of the schema\nconst compiledSchemaCache = new Map<string, ValidateFunction<unknown>>();\n\n// The core schemas that others can depend on\nconst refDependencyCandidates = [\n entityEnvelopeSchema,\n entitySchema,\n entityMetaSchema,\n commonSchema,\n];\n\nexport function throwAjvError(\n errors: ValidateFunction<unknown>['errors'],\n): never {\n if (!errors?.length) {\n throw new TypeError('Unknown error');\n }\n\n const error = errors[0];\n throw new TypeError(\n `${error.instancePath || '<root>'} ${error.message}${\n error.params\n ? ` - ${Object.entries(error.params)\n .map(([key, val]) => `${key}: ${val}`)\n .join(', ')}`\n : ''\n }`,\n );\n}\n\n// Compiles the given schema, and makes sure to also grab any core dependencies\n// that it depends on\nexport function compileAjvSchema(\n schema: Schema,\n options: { disableCache?: boolean } = {},\n): ValidateFunction<unknown> {\n const disableCache = options?.disableCache ?? false;\n const cacheKey = disableCache ? '' : JSON.stringify(schema);\n\n if (!disableCache) {\n const cached = compiledSchemaCache.get(cacheKey);\n if (cached) {\n return cached;\n }\n }\n\n const extraSchemas = getExtraSchemas(schema);\n const ajv = new Ajv({\n allowUnionTypes: true,\n allErrors: true,\n validateSchema: true,\n });\n if (extraSchemas.length) {\n ajv.addSchema(extraSchemas, undefined, undefined, true);\n }\n const compiled = ajv.compile(schema);\n\n if (!disableCache) {\n compiledSchemaCache.set(cacheKey, compiled);\n }\n\n return compiled;\n}\n\n// Find refs in the given schema and recursively in all known schemas it\n// targets, collecting that list of schemas as we go\nfunction getExtraSchemas(schema: Schema): Schema[] {\n if (typeof schema !== 'object') {\n return [];\n }\n\n const seen = new Set<string>();\n if (schema.$id) {\n seen.add(schema.$id);\n }\n\n const selected = new Array<Schema>();\n\n const todo: Schema[] = [schema];\n while (todo.length) {\n const current = todo.pop()!;\n\n for (const ref of getAllRefs(current)) {\n if (!seen.has(ref)) {\n seen.add(ref);\n\n const match = refDependencyCandidates.find(c => c.$id === ref);\n if (match) {\n selected.push(match);\n todo.push(match);\n }\n }\n }\n }\n\n return selected;\n}\n\n// Naively step through the entire schema looking for \"$ref\": \"x\" pairs. The\n// resulting iterator may contain duplicates. Ignores fragments, i.e. for a ref\n// of \"a#b\", it will just yield \"a\".\nfunction* getAllRefs(schema: Schema): Iterable<string> {\n const todo: any[] = [schema];\n while (todo.length) {\n const current = todo.pop()!;\n if (typeof current === 'object' && current) {\n for (const [key, value] of Object.entries(current)) {\n if (key === '$ref' && typeof value === 'string') {\n yield value.split('#')[0];\n } else {\n todo.push(value);\n }\n }\n }\n }\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Schema } from 'ajv';\nimport { Entity } from '../entity';\nimport { compileAjvSchema, throwAjvError } from './ajv';\n\n/**\n * Creates a validation function that takes some arbitrary data, and either\n * returns that data cast to a `T` if it matches that schema, or `false` if the\n * schema apiVersion/kind didn't apply to that data, or throws a\n * {@link globals#TypeError} describing actual errors.\n *\n * @remarks\n *\n * This validator is highly specialized, in that it has special treatment of\n * the `kind` and `apiVersion` root keys. This only works if your schema has\n * their rule set to `\"enum\"`:\n *\n * ```\n * \"apiVersion\": {\n * \"enum\": [\"backstage.io/v1alpha1\", \"backstage.io/v1beta1\"]\n * },\n * \"kind\": {\n * \"enum\": [\"Group\"]\n * },\n * ```\n *\n * In the above example, the created validator will return `false` if and only\n * if the kind and/or apiVersion mismatch.\n *\n * Note that this validator is only meant for applying the base schema checks;\n * it does not take custom policies or additional processor based validation\n * into account.\n *\n * The given schema may contain `$ref` references to the following, which are\n * resolved automatically for you:\n *\n * - {@link Entity}\n *\n * - {@link EntityEnvelope}\n *\n * - {@link EntityMeta}\n *\n * - `common#<id>`\n * @see {@link https://github.com/backstage/backstage/tree/master/packages/catalog-model/src/schema}\n *\n * @public\n */\nexport function entityKindSchemaValidator<T extends Entity>(\n schema: unknown,\n): (data: unknown) => T | false {\n const validate = compileAjvSchema(schema as Schema);\n\n return data => {\n const result = validate(data);\n if (result === true) {\n return data as T;\n }\n\n // Only in the case where kind and/or apiVersion have enum mismatches AND\n // have NO other errors, we call it a soft error.\n const softCandidates = validate.errors?.filter(e =>\n ['/kind', '/apiVersion'].includes(e.instancePath),\n );\n if (\n softCandidates?.length &&\n softCandidates.every(e => e.keyword === 'enum')\n ) {\n return false;\n }\n\n throw throwAjvError(validate.errors);\n };\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Entity,\n entityKindSchemaValidator,\n KindValidator,\n} from '@backstage/catalog-model';\nimport { JsonObject } from '@backstage/types';\nimport schema from './Template.v1beta3.schema.json';\n\n/**\n * Backstage catalog Template kind Entity. Templates are used by the Scaffolder\n * plugin to create new entities, such as Components.\n *\n * @public\n */\nexport interface TemplateEntityV1beta3 extends Entity {\n /**\n * The apiVersion string of the TaskSpec.\n */\n apiVersion: 'scaffolder.backstage.io/v1beta3';\n /**\n * The kind of the entity\n */\n kind: 'Template';\n /**\n * The specification of the Template Entity\n */\n spec: {\n /**\n * The type that the Template will create. For example service, website or library.\n */\n type: string;\n\n /**\n * Template specific configuration of the presentation layer.\n */\n presentation?: TemplatePresentationV1beta3;\n\n /**\n * Recovery strategy for the template\n */\n EXPERIMENTAL_recovery?: TemplateRecoveryV1beta3;\n\n /**\n * Form hooks to be run\n */\n EXPERIMENTAL_formDecorators?: { id: string; input?: JsonObject }[];\n\n /**\n * This is a JSONSchema or an array of JSONSchema's which is used to render a form in the frontend\n * to collect user input and validate it against that schema. This can then be used in the `steps` part below to template\n * variables passed from the user into each action in the template.\n */\n parameters?: TemplateParametersV1beta3 | TemplateParametersV1beta3[];\n /**\n * A list of steps to be executed in sequence which are defined by the template. These steps are a list of the underlying\n * javascript action and some optional input parameters that may or may not have been collected from the end user.\n */\n steps: Array<TemplateEntityStepV1beta3>;\n /**\n * The output is an object where template authors can pull out information from template actions and return them in a known standard way.\n */\n output?: { [name: string]: string };\n /**\n * The owner entityRef of the TemplateEntity\n */\n owner?: string;\n };\n}\n\n/**\n * Depends on how you designed your task you might tailor the behaviour for each of them.\n *\n * @public\n */\nexport interface TemplateRecoveryV1beta3 extends JsonObject {\n /**\n *\n * none - not recover, let the task be marked as failed\n * startOver - do recover, start the execution of the task from the first step.\n *\n * @public\n */\n EXPERIMENTAL_strategy?: 'none' | 'startOver';\n}\n\n/**\n * The presentation of the template.\n *\n * @public\n */\nexport interface TemplatePresentationV1beta3 extends JsonObject {\n /**\n * Overrides default buttons' text\n */\n buttonLabels?: {\n /**\n * The text for the button which leads to the previous template page\n */\n backButtonText?: string;\n /**\n * The text for the button which starts the execution of the template\n */\n createButtonText?: string;\n /**\n * The text for the button which opens template's review/summary\n */\n reviewButtonText?: string;\n };\n}\n\n/**\n * Step that is part of a Template Entity.\n *\n * @public\n */\nexport interface TemplateEntityStepV1beta3 extends JsonObject {\n id?: string;\n name?: string;\n action: string;\n input?: JsonObject;\n if?: string | boolean;\n 'backstage:permissions'?: TemplatePermissionsV1beta3;\n}\n\n/**\n * Parameter that is part of a Template Entity.\n *\n * @public\n */\nexport interface TemplateParametersV1beta3 extends JsonObject {\n 'backstage:permissions'?: TemplatePermissionsV1beta3;\n}\n\n/**\n * Access control properties for parts of a template.\n *\n * @public\n */\nexport interface TemplatePermissionsV1beta3 extends JsonObject {\n tags?: string[];\n}\n\nconst validator = entityKindSchemaValidator(schema);\n\n/**\n * Entity data validator for {@link TemplateEntityV1beta3}.\n *\n * @public\n */\nexport const templateEntityV1beta3Validator: KindValidator = {\n // TODO(freben): Emulate the old KindValidator until we fix that type\n async check(data: Entity) {\n return validator(data) === data;\n },\n};\n\n/**\n * Typeguard for filtering entities and ensuring v1beta3 entities\n * @public\n */\nexport const isTemplateEntityV1beta3 = (\n entity: Entity,\n): entity is TemplateEntityV1beta3 =>\n entity.apiVersion === 'scaffolder.backstage.io/v1beta3' &&\n entity.kind === 'Template';\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport { ResourcePermission } from '@backstage/plugin-permission-common';\nimport { usePermission } from '@backstage/plugin-permission-react';\nimport { useAsyncEntity } from './useEntity';\n\n/**\n * A thin wrapper around the\n * {@link @backstage/plugin-permission-react#usePermission} hook which uses the\n * current entity in context to make an authorization request for the given\n * {@link @backstage/plugin-catalog-common#CatalogEntityPermission}.\n *\n * Note: this hook blocks the permission request until the entity has loaded in\n * context. If you have the entityRef and need concurrent requests, use the\n * `usePermission` hook directly.\n * @alpha\n */\nexport function useEntityPermission(\n // TODO(joeporpeglia) Replace with `CatalogEntityPermission` when the issue described in\n // https://github.com/backstage/backstage/pull/10128 is fixed.\n permission: ResourcePermission<'catalog-entity'>,\n): {\n loading: boolean;\n allowed: boolean;\n error?: Error;\n} {\n const {\n entity,\n loading: loadingEntity,\n error: entityError,\n } = useAsyncEntity();\n const {\n allowed,\n loading: loadingPermission,\n error: permissionError,\n } = usePermission({\n permission,\n resourceRef: entity ? stringifyEntityRef(entity) : undefined,\n });\n\n if (loadingEntity || loadingPermission) {\n return { loading: true, allowed: false };\n }\n if (entityError) {\n return { loading: false, allowed: false, error: entityError };\n }\n return { loading: false, allowed, error: permissionError };\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n CompoundEntityRef,\n Entity,\n parseEntityRef,\n} from '@backstage/catalog-model';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport useAsync from 'react-use/lib/useAsync';\n\n// todo: should this be a constant in a scaffolder package?\nconst SOURCE_TEMPLATE_ANNOTATION = 'backstage.io/source-template';\n\n/**\n * Returns the compound entity ref of the source template that was used to\n * create this entity (assuming that it still exists and the user has access\n * to it).\n */\nexport const useSourceTemplateCompoundEntityRef = (entity: Entity) => {\n const catalogApi = useApi(catalogApiRef);\n const { value: sourceTemplateRef } = useAsync(async () => {\n const refCandidate =\n entity.metadata.annotations?.[SOURCE_TEMPLATE_ANNOTATION];\n let compoundRefCandidate: CompoundEntityRef | undefined;\n\n if (!refCandidate) {\n return undefined;\n }\n\n try {\n // Check for access and that this template still exists.\n const template = await catalogApi.getEntityByRef(refCandidate);\n compoundRefCandidate = parseEntityRef(refCandidate);\n\n return template !== undefined ? compoundRefCandidate : undefined;\n } catch {\n return undefined;\n }\n }, [catalogApi, entity]);\n\n return sourceTemplateRef;\n};\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createPermission } from '@backstage/plugin-permission-common';\n\n/**\n * Permission resource type which corresponds to a scaffolder templates.\n *\n * @alpha\n */\nexport const RESOURCE_TYPE_SCAFFOLDER_TEMPLATE = 'scaffolder-template';\n\n/**\n * Permission resource type which corresponds to a scaffolder action.\n *\n * @alpha\n */\nexport const RESOURCE_TYPE_SCAFFOLDER_ACTION = 'scaffolder-action';\n\n/**\n * This permission is used to authorize actions that involve executing\n * an action from a template.\n *\n * @alpha\n */\nexport const actionExecutePermission = createPermission({\n name: 'scaffolder.action.execute',\n attributes: {},\n resourceType: RESOURCE_TYPE_SCAFFOLDER_ACTION,\n});\n\n/**\n * This permission is used to authorize actions that involve reading\n * one or more parameters from a template.\n *\n * If this permission is not authorized, it will appear that the\n * parameter does not exist in the template — both in the frontend\n * and in API responses.\n *\n * @alpha\n */\nexport const templateParameterReadPermission = createPermission({\n name: 'scaffolder.template.parameter.read',\n attributes: {\n action: 'read',\n },\n resourceType: RESOURCE_TYPE_SCAFFOLDER_TEMPLATE,\n});\n\n/**\n * This permission is used to authorize actions that involve reading\n * one or more steps from a template.\n *\n * If this permission is not authorized, it will appear that the\n * step does not exist in the template — both in the frontend\n * and in API responses. Steps will also not be executed.\n *\n * @alpha\n */\nexport const templateStepReadPermission = createPermission({\n name: 'scaffolder.template.step.read',\n attributes: {\n action: 'read',\n },\n resourceType: RESOURCE_TYPE_SCAFFOLDER_TEMPLATE,\n});\n\n/**\n * This permission is used to authorize actions that involve reading one or more tasks in the scaffolder,\n * and reading logs of tasks\n *\n * @alpha\n */\nexport const taskReadPermission = createPermission({\n name: 'scaffolder.task.read',\n attributes: {\n action: 'read',\n },\n});\n\n/**\n * This permission is used to authorize actions that involve the creation of tasks in the scaffolder.\n *\n * @alpha\n */\nexport const taskCreatePermission = createPermission({\n name: 'scaffolder.task.create',\n attributes: {\n action: 'create',\n },\n});\n\n/**\n * This permission is used to authorize actions that involve the cancellation of tasks in the scaffolder.\n *\n * @alpha\n */\nexport const taskCancelPermission = createPermission({\n name: 'scaffolder.task.cancel',\n attributes: {},\n});\n\n/**\n * This permission is used to authorize template management features.\n *\n * @alpha\n */\nexport const templateManagementPermission = createPermission({\n name: 'scaffolder.template.management',\n attributes: {},\n});\n\n/**\n * List of the scaffolder permissions that are associated with template steps and parameters.\n * @alpha\n */\nexport const scaffolderTemplatePermissions = [\n templateParameterReadPermission,\n templateStepReadPermission,\n];\n\n/**\n * List of the scaffolder permissions that are associated with scaffolder actions.\n * @alpha\n */\nexport const scaffolderActionPermissions = [actionExecutePermission];\n\n/**\n * List of the scaffolder permissions that are associated with scaffolder tasks.\n * @alpha\n */\nexport const scaffolderTaskPermissions = [\n taskCancelPermission,\n taskCreatePermission,\n taskReadPermission,\n];\n\n/**\n * List of all the scaffolder permissions\n * @alpha\n */\nexport const scaffolderPermissions = [\n ...scaffolderTemplatePermissions,\n ...scaffolderActionPermissions,\n ...scaffolderTaskPermissions,\n templateManagementPermission,\n];\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n ANNOTATION_EDIT_URL,\n ANNOTATION_LOCATION,\n CompoundEntityRef,\n DEFAULT_NAMESPACE,\n stringifyEntityRef,\n parseEntityRef,\n} from '@backstage/catalog-model';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Divider from '@material-ui/core/Divider';\nimport IconButton from '@material-ui/core/IconButton';\nimport { makeStyles } from '@material-ui/core/styles';\nimport {\n AppIcon,\n HeaderIconLinkRow,\n IconLinkVerticalProps,\n InfoCardVariants,\n Link,\n} from '@backstage/core-components';\nimport React, { useCallback } from 'react';\nimport {\n ScmIntegrationIcon,\n scmIntegrationsApiRef,\n} from '@backstage/integration-react';\nimport {\n alertApiRef,\n errorApiRef,\n useApi,\n useApp,\n useRouteRef,\n} from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n getEntitySourceLocation,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport { createFromTemplateRouteRef, viewTechDocRouteRef } from '../../routes';\n\nimport { AboutContent } from './AboutContent';\nimport CachedIcon from '@material-ui/icons/Cached';\nimport CreateComponentIcon from '@material-ui/icons/AddCircleOutline';\nimport DocsIcon from '@material-ui/icons/Description';\nimport EditIcon from '@material-ui/icons/Edit';\nimport { isTemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport { useEntityPermission } from '@backstage/plugin-catalog-react/alpha';\nimport { catalogEntityRefreshPermission } from '@backstage/plugin-catalog-common/alpha';\nimport { useSourceTemplateCompoundEntityRef } from './hooks';\nimport { taskCreatePermission } from '@backstage/plugin-scaffolder-common/alpha';\nimport { usePermission } from '@backstage/plugin-permission-react';\nimport { catalogTranslationRef } from '../../alpha/translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\nconst TECHDOCS_ANNOTATION = 'backstage.io/techdocs-ref';\n\nconst TECHDOCS_EXTERNAL_ANNOTATION = 'backstage.io/techdocs-entity';\n\nconst useStyles = makeStyles({\n gridItemCard: {\n display: 'flex',\n flexDirection: 'column',\n height: 'calc(100% - 10px)', // for pages without content header\n marginBottom: '10px',\n },\n fullHeightCard: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n },\n gridItemCardContent: {\n flex: 1,\n },\n fullHeightCardContent: {\n flex: 1,\n },\n});\n\n/**\n * Props for {@link EntityAboutCard}.\n *\n * @public\n */\nexport interface AboutCardProps {\n variant?: InfoCardVariants;\n}\n\n/**\n * Exported publicly via the EntityAboutCard\n *\n * NOTE: We generally do not accept pull requests to extend this class with more\n * props and cusomizability. If you need to tweak it, consider making a bespoke\n * card in your own repository instead, that is perfect for your own needs.\n */\nexport function AboutCard(props: AboutCardProps) {\n const { variant } = props;\n const app = useApp();\n const classes = useStyles();\n const { entity } = useEntity();\n const scmIntegrationsApi = useApi(scmIntegrationsApiRef);\n const catalogApi = useApi(catalogApiRef);\n const alertApi = useApi(alertApiRef);\n const errorApi = useApi(errorApiRef);\n const viewTechdocLink = useRouteRef(viewTechDocRouteRef);\n const templateRoute = useRouteRef(createFromTemplateRouteRef);\n const sourceTemplateRef = useSourceTemplateCompoundEntityRef(entity);\n const { allowed: canRefresh } = useEntityPermission(\n catalogEntityRefreshPermission,\n );\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const { allowed: canCreateTemplateTask } = usePermission({\n permission: taskCreatePermission,\n });\n\n const entitySourceLocation = getEntitySourceLocation(\n entity,\n scmIntegrationsApi,\n );\n const entityMetadataEditUrl =\n entity.metadata.annotations?.[ANNOTATION_EDIT_URL];\n\n let techdocsRef: CompoundEntityRef | undefined;\n\n if (entity.metadata.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION]) {\n try {\n techdocsRef = parseEntityRef(\n entity.metadata.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION],\n );\n // not a fan of this but we don't care if the parseEntityRef fails\n } catch {\n techdocsRef = undefined;\n }\n }\n\n const viewInSource: IconLinkVerticalProps = {\n label: t('aboutCard.viewSource'),\n disabled: !entitySourceLocation,\n icon: <ScmIntegrationIcon type={entitySourceLocation?.integrationType} />,\n href: entitySourceLocation?.locationTargetUrl,\n };\n const viewInTechDocs: IconLinkVerticalProps = {\n label: t('aboutCard.viewTechdocs'),\n disabled:\n !(\n entity.metadata.annotations?.[TECHDOCS_ANNOTATION] ||\n entity.metadata.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION]\n ) || !viewTechdocLink,\n icon: <DocsIcon />,\n href:\n viewTechdocLink &&\n (techdocsRef\n ? viewTechdocLink({\n namespace: techdocsRef.namespace || DEFAULT_NAMESPACE,\n kind: techdocsRef.kind,\n name: techdocsRef.name,\n })\n : viewTechdocLink({\n namespace: entity.metadata.namespace || DEFAULT_NAMESPACE,\n kind: entity.kind,\n name: entity.metadata.name,\n })),\n };\n\n const subHeaderLinks = [viewInSource, viewInTechDocs];\n\n if (isTemplateEntityV1beta3(entity)) {\n const Icon = app.getSystemIcon('scaffolder') ?? CreateComponentIcon;\n\n const launchTemplate: IconLinkVerticalProps = {\n label: t('aboutCard.launchTemplate'),\n icon: <Icon />,\n disabled: !templateRoute || !canCreateTemplateTask,\n href:\n templateRoute &&\n templateRoute({\n templateName: entity.metadata.name,\n namespace: entity.metadata.namespace || DEFAULT_NAMESPACE,\n }),\n };\n\n subHeaderLinks.push(launchTemplate);\n }\n\n let cardClass = '';\n if (variant === 'gridItem') {\n cardClass = classes.gridItemCard;\n } else if (variant === 'fullHeight') {\n cardClass = classes.fullHeightCard;\n }\n\n let cardContentClass = '';\n if (variant === 'gridItem') {\n cardContentClass = classes.gridItemCardContent;\n } else if (variant === 'fullHeight') {\n cardContentClass = classes.fullHeightCardContent;\n }\n\n const entityLocation = entity.metadata.annotations?.[ANNOTATION_LOCATION];\n // Limiting the ability to manually refresh to the less expensive locations\n const allowRefresh =\n entityLocation?.startsWith('url:') || entityLocation?.startsWith('file:');\n const refreshEntity = useCallback(async () => {\n try {\n await catalogApi.refreshEntity(stringifyEntityRef(entity));\n alertApi.post({\n message: t('aboutCard.refreshScheduledMessage'),\n severity: 'info',\n display: 'transient',\n });\n } catch (e) {\n errorApi.post(e);\n }\n }, [catalogApi, entity, alertApi, t, errorApi]);\n\n return (\n <Card className={cardClass}>\n <CardHeader\n title={t('aboutCard.title')}\n action={\n <>\n {allowRefresh && canRefresh && (\n <IconButton\n aria-label=\"Refresh\"\n title={t('aboutCard.refreshButtonTitle')}\n onClick={refreshEntity}\n >\n <CachedIcon />\n </IconButton>\n )}\n <IconButton\n component={Link}\n aria-label=\"Edit\"\n disabled={!entityMetadataEditUrl}\n title={t('aboutCard.editButtonTitle')}\n to={entityMetadataEditUrl ?? '#'}\n >\n <EditIcon />\n </IconButton>\n {sourceTemplateRef && templateRoute && (\n <IconButton\n component={Link}\n title={t('aboutCard.createSimilarButtonTitle')}\n to={templateRoute({\n namespace: sourceTemplateRef.namespace,\n templateName: sourceTemplateRef.name,\n })}\n >\n <AppIcon id=\"scaffolder\" />\n </IconButton>\n )}\n </>\n }\n subheader={<HeaderIconLinkRow links={subHeaderLinks} />}\n />\n <Divider />\n <CardContent className={cardContentClass}>\n <AboutContent entity={entity} />\n </CardContent>\n </Card>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { Link } from '@backstage/core-components';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nconst useStyles = makeStyles({\n svgIcon: {\n display: 'inline-block',\n '& svg': {\n display: 'inline-block',\n fontSize: 'inherit',\n verticalAlign: 'baseline',\n },\n },\n});\n\nexport function IconLink(props: {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}) {\n const { href, text, Icon } = props;\n const classes = useStyles();\n\n return (\n <Box display=\"flex\">\n <Box mr={1} className={classes.svgIcon}>\n <Typography component=\"div\">\n {Icon ? <Icon /> : <LanguageIcon />}\n </Typography>\n </Box>\n <Box flexGrow=\"1\">\n <Link to={href} target=\"_blank\" rel=\"noopener\">\n {text || href}\n </Link>\n </Box>\n </Box>\n );\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\nimport { Theme } from '@material-ui/core/styles';\nimport { Breakpoint, ColumnBreakpoints } from './types';\n\nconst colDefaults: ColumnBreakpoints = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 2,\n xl: 3,\n};\n\nexport function useDynamicColumns(\n cols: ColumnBreakpoints | number | undefined,\n): number {\n const matches: (Breakpoint | null)[] = [\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xl')) ? 'xl' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('lg')) ? 'lg' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('md')) ? 'md' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('sm')) ? 'sm' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xs')) ? 'xs' : null,\n ];\n\n let numOfCols = 1;\n\n if (typeof cols === 'number') {\n numOfCols = cols;\n } else {\n const breakpoint = matches.find(k => k !== null) ?? 'xs';\n numOfCols = cols?.[breakpoint] ?? colDefaults[breakpoint];\n }\n\n return numOfCols;\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport ImageList from '@material-ui/core/ImageList';\nimport ImageListItem from '@material-ui/core/ImageListItem';\nimport React from 'react';\nimport { IconLink } from './IconLink';\nimport { ColumnBreakpoints } from './types';\nimport { useDynamicColumns } from './useDynamicColumns';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nexport interface LinksGridListItem {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}\n\ninterface LinksGridListProps {\n items: LinksGridListItem[];\n cols?: ColumnBreakpoints | number;\n}\n\nexport function LinksGridList(props: LinksGridListProps) {\n const { items, cols = undefined } = props;\n const numOfCols = useDynamicColumns(cols);\n\n return (\n <ImageList rowHeight=\"auto\" cols={numOfCols}>\n {items.map(({ text, href, Icon }, i) => (\n <ImageListItem key={i}>\n <IconLink href={href} text={text ?? href} Icon={Icon} />\n </ImageListItem>\n ))}\n </ImageList>\n );\n}\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n BasicPermission,\n Permission,\n PermissionAttributes,\n ResourcePermission,\n} from '../types';\n\n/**\n * Utility function for creating a valid {@link ResourcePermission}, inferring\n * the appropriate type and resource type parameter.\n *\n * @public\n */\nexport function createPermission<TResourceType extends string>(input: {\n name: string;\n attributes: PermissionAttributes;\n resourceType: TResourceType;\n}): ResourcePermission<TResourceType>;\n/**\n * Utility function for creating a valid {@link BasicPermission}.\n *\n * @public\n */\nexport function createPermission(input: {\n name: string;\n attributes: PermissionAttributes;\n}): BasicPermission;\nexport function createPermission({\n name,\n attributes,\n resourceType,\n}: {\n name: string;\n attributes: PermissionAttributes;\n resourceType?: string;\n}): Permission {\n if (resourceType) {\n return {\n type: 'resource',\n name,\n attributes,\n resourceType,\n };\n }\n\n return {\n type: 'basic',\n name,\n attributes,\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AuthorizePermissionRequest,\n AuthorizePermissionResponse,\n DefinitivePolicyDecision,\n EvaluatorRequestOptions,\n Permission,\n PermissionAuthorizer,\n PermissionEvaluator,\n QueryPermissionRequest,\n QueryPermissionResponse,\n ResourcePermission,\n} from '../types';\n\n/**\n * Check if the two parameters are equivalent permissions.\n * @public\n */\nexport function isPermission<T extends Permission>(\n permission: Permission,\n comparedPermission: T,\n): permission is T {\n return permission.name === comparedPermission.name;\n}\n\n/**\n * Check if a given permission is a {@link ResourcePermission}. When\n * `resourceType` is supplied as the second parameter, also checks if\n * the permission has the specified resource type.\n * @public\n */\nexport function isResourcePermission<T extends string = string>(\n permission: Permission,\n resourceType?: T,\n): permission is ResourcePermission<T> {\n if (!('resourceType' in permission)) {\n return false;\n }\n\n return !resourceType || permission.resourceType === resourceType;\n}\n\n/**\n * Check if a given permission is related to a create action.\n * @public\n */\nexport function isCreatePermission(permission: Permission) {\n return permission.attributes.action === 'create';\n}\n\n/**\n * Check if a given permission is related to a read action.\n * @public\n */\nexport function isReadPermission(permission: Permission) {\n return permission.attributes.action === 'read';\n}\n\n/**\n * Check if a given permission is related to an update action.\n * @public\n */\nexport function isUpdatePermission(permission: Permission) {\n return permission.attributes.action === 'update';\n}\n\n/**\n * Check if a given permission is related to a delete action.\n * @public\n */\nexport function isDeletePermission(permission: Permission) {\n return permission.attributes.action === 'delete';\n}\n\n/**\n * Convert {@link PermissionAuthorizer} to {@link PermissionEvaluator}.\n *\n * @public\n */\nexport function toPermissionEvaluator(\n permissionAuthorizer: PermissionAuthorizer,\n): PermissionEvaluator {\n return {\n authorize: async (\n requests: AuthorizePermissionRequest[],\n options?: EvaluatorRequestOptions,\n ): Promise<AuthorizePermissionResponse[]> => {\n const response = await permissionAuthorizer.authorize(requests, options);\n\n return response as DefinitivePolicyDecision[];\n },\n authorizeConditional(\n requests: QueryPermissionRequest[],\n options?: EvaluatorRequestOptions,\n ): Promise<QueryPermissionResponse[]> {\n const parsedRequests =\n requests as unknown as AuthorizePermissionRequest[];\n return permissionAuthorizer.authorize(parsedRequests, options);\n },\n };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useApi } from '@backstage/core-plugin-api';\nimport { permissionApiRef } from '../apis';\nimport {\n AuthorizeResult,\n isResourcePermission,\n Permission,\n ResourcePermission,\n} from '@backstage/plugin-permission-common';\nimport useSWR from 'swr';\n\n/** @public */\nexport type AsyncPermissionResult = {\n loading: boolean;\n allowed: boolean;\n error?: Error;\n};\n\n/**\n * React hook utility for authorization. Given either a non-resource\n * {@link @backstage/plugin-permission-common#Permission} or a\n * {@link @backstage/plugin-permission-common#ResourcePermission} and an\n * optional resourceRef, it will return whether or not access is allowed (for\n * the given resource, if resourceRef is provided). See\n * {@link @backstage/plugin-permission-common/PermissionClient#authorize} for\n * more details.\n *\n * The resourceRef field is optional to allow calling this hook with an\n * entity that might be loading asynchronously, but when resourceRef is not\n * supplied, the value of `allowed` will always be false.\n *\n * Note: This hook uses stale-while-revalidate to help avoid flicker in UI\n * elements that would be conditionally rendered based on the `allowed` result\n * of this hook.\n * @public\n */\nexport function usePermission(\n input:\n | {\n permission: Exclude<Permission, ResourcePermission>;\n resourceRef?: never;\n }\n | {\n permission: ResourcePermission;\n resourceRef: string | undefined;\n },\n): AsyncPermissionResult {\n const permissionApi = useApi(permissionApiRef);\n const { data, error } = useSWR(input, async (args: typeof input) => {\n // We could make the resourceRef parameter required to avoid this check, but\n // it would make using this hook difficult in situations where the entity\n // must be asynchronously loaded, so instead we short-circuit to a deny when\n // no resourceRef is supplied, on the assumption that the resourceRef is\n // still loading outside the hook.\n if (isResourcePermission(args.permission) && !args.resourceRef) {\n return AuthorizeResult.DENY;\n }\n\n const { result } = await permissionApi.authorize(args);\n return result;\n });\n\n if (error) {\n return { error, loading: false, allowed: false };\n }\n if (data === undefined) {\n return { loading: true, allowed: false };\n }\n return { loading: false, allowed: data === AuthorizeResult.ALLOW };\n}\n"],"names":["RESOURCE_TYPE_CATALOG_ENTITY","catalogEntityReadPermission","createPermission","name","attributes","action","resourceType","catalogEntityCreatePermission","catalogEntityDeletePermission","catalogEntityRefreshPermission","catalogEntityValidatePermission","catalogLocationReadPermission","catalogLocationCreatePermission","catalogLocationAnalyzePermission","catalogLocationDeletePermission","catalogPermissions","NewEntityContext","createVersionedContext","AsyncEntityProvider","props","children","entity","loading","error","refresh","value","Provider","createVersionedValueMap","AnalyticsContext","entityRef","stringifyEntityRef","undefined","EntityProvider","useEntity","versionedHolder","useVersionedContext","Error","atVersion","useAsyncEntity","catalogTranslationRef","createTranslationRef","id","messages","indexPage","title","createButtonTitle","supportButtonContent","aboutCard","refreshButtonTitle","editButtonTitle","createSimilarButtonTitle","refreshScheduledMessage","launchTemplate","viewTechdocs","viewSource","descriptionField","label","ownerField","domainField","systemField","parentComponentField","typeField","lifecycleField","tagsField","targetsField","searchResultItem","lifecycle","Owner","catalogTable","warningPanelTitle","viewActionTitle","editActionTitle","starActionTitle","unStarActionTitle","dependencyOfComponentsCard","emptyMessage","dependsOnComponentsCard","dependsOnResourcesCard","entityContextMenu","copiedMessage","moreButtonTitle","inspectMenuTitle","copyURLMenuTitle","unregisterMenuTitle","entityLabelsCard","emptyDescription","readMoreButtonTitle","entityLabels","ownerLabel","lifecycleLabel","entityLinksCard","entityNotFound","description","docButtonTitle","deleteEntity","dialogTitle","deleteButtonTitle","cancelButtonTitle","entityProcessingErrorsDescription","entityRelationWarningDescription","hasComponentsCard","hasResourcesCard","hasSubcomponentsCard","hasSubdomainsCard","hasSystemsCard","relatedEntitiesCard","emptyHelpLinkTitle","systemDiagramCard","edgeLabels","partOf","provides","dependsOn","useIconStyles","makeStyles","theme","link","display","justifyItems","gridGap","textAlign","disabled","color","palette","text","secondary","cursor","primary","main","textTransform","fontWeight","typography","fontWeightBold","letterSpacing","IconLinkVertical","href","icon","LinkIcon","onClick","classes","Box","className","classnames","Typography","variant","component","Link","to","useStyles","links","margin","spacing","gridAutoFlow","gridAutoColumns","HeaderIconLinkRow","nav","map","index","ScmIntegrationIcon","type","app","useApp","DefaultIcon","CodeIcon","Icon","getSystemIcon","getEntitySourceLocation","scmIntegrationsApi","sourceLocation","metadata","annotations","ANNOTATION_SOURCE_LOCATION","sourceLocationRef","parseLocationRef","integration","byUrl","target","locationTargetUrl","integrationType","overflow","lineHeight","wordBreak","fontSize","whiteSpace","AboutField","gridSizes","childElements","useElementFilter","c","getElements","content","length","Grid","item","getLocationTargetHref","entitySourceLocation","includes","srcLocationUrl","URL","AboutContent","t","useTranslationRef","isSystem","kind","toLocaleLowerCase","isResource","isComponent","isAPI","isTemplate","isLocation","isGroup","partOfSystemRelations","getEntityRelations","RELATION_PART_OF","partOfComponentRelations","partOfDomainRelations","ownedByRelations","RELATION_OWNED_BY","container","xs","MarkdownContent","sm","lg","EntityRefLinks","entityRefs","defaultKind","spec","tags","tag","Chip","size","targets","LinksGridList","cols","items","compiledSchemaCache","Map","refDependencyCandidates","entityEnvelopeSchema","entitySchema","entityMetaSchema","commonSchema","throwAjvError","errors","TypeError","instancePath","message","params","Object","entries","key","val","join","compileAjvSchema","schema","options","disableCache","cacheKey","JSON","stringify","cached","get","extraSchemas","getExtraSchemas","ajv","Ajv","allowUnionTypes","allErrors","validateSchema","addSchema","compiled","compile","set","seen","Set","$id","add","selected","Array","todo","current","pop","ref","getAllRefs","has","match","find","push","split","entityKindSchemaValidator","validate","data","softCandidates","filter","e","every","keyword","validator","templateEntityV1beta3Validator","check","isTemplateEntityV1beta3","apiVersion","useEntityPermission","permission","loadingEntity","entityError","allowed","loadingPermission","permissionError","usePermission","resourceRef","SOURCE_TEMPLATE_ANNOTATION","useSourceTemplateCompoundEntityRef","catalogApi","useApi","catalogApiRef","sourceTemplateRef","useAsync","refCandidate","compoundRefCandidate","template","getEntityByRef","parseEntityRef","RESOURCE_TYPE_SCAFFOLDER_TEMPLATE","actionExecutePermission","templateParameterReadPermission","templateStepReadPermission","taskReadPermission","taskCreatePermission","taskCancelPermission","templateManagementPermission","scaffolderTemplatePermissions","scaffolderActionPermissions","scaffolderTaskPermissions","scaffolderPermissions","TECHDOCS_ANNOTATION","TECHDOCS_EXTERNAL_ANNOTATION","gridItemCard","flexDirection","height","marginBottom","fullHeightCard","gridItemCardContent","flex","fullHeightCardContent","AboutCard","scmIntegrationsApiRef","alertApi","alertApiRef","errorApi","errorApiRef","viewTechdocLink","useRouteRef","viewTechDocRouteRef","templateRoute","createFromTemplateRouteRef","canRefresh","canCreateTemplateTask","entityMetadataEditUrl","ANNOTATION_EDIT_URL","techdocsRef","viewInSource","viewInTechDocs","DocsIcon","namespace","DEFAULT_NAMESPACE","subHeaderLinks","CreateComponentIcon","templateName","cardClass","cardContentClass","entityLocation","ANNOTATION_LOCATION","allowRefresh","startsWith","refreshEntity","useCallback","post","severity","Card","CardHeader","IconButton","aria-label","CachedIcon","EditIcon","AppIcon","subheader","Divider","CardContent","svgIcon","verticalAlign","IconLink","mr","LanguageIcon","flexGrow","rel","colDefaults","md","xl","useDynamicColumns","matches","useMediaQuery","breakpoints","up","numOfCols","breakpoint","k","ImageList","rowHeight","i","ImageListItem","isPermission","comparedPermission","isResourcePermission","isCreatePermission","isReadPermission","isUpdatePermission","isDeletePermission","toPermissionEvaluator","permissionAuthorizer","authorize","requests","authorizeConditional","parsedRequests","input","permissionApi","permissionApiRef","useSWR","args","AuthorizeResult","DENY","result","ALLOW"],"sourceRoot":""}
|