@seatgeek/backstage-plugin-aws-catalog-common
Advanced tools
Comparing version 1.0.0 to 1.0.1
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var utilArnParser = require('@aws-sdk/util-arn-parser'); | ||
var link2aws = require('link2aws'); | ||
function _interopNamespace(e) { | ||
if (e && e.__esModule) return e; | ||
function _interopNamespaceCompat(e) { | ||
if (e && typeof e === 'object' && 'default' in e) return e; | ||
var n = Object.create(null); | ||
@@ -22,3 +20,3 @@ if (e) { | ||
} | ||
n["default"] = e; | ||
n.default = e; | ||
return Object.freeze(n); | ||
@@ -42,3 +40,3 @@ } | ||
var utilArnParser__namespace = /*#__PURE__*/_interopNamespace(utilArnParser); | ||
var utilArnParser__namespace = /*#__PURE__*/_interopNamespaceCompat(utilArnParser); | ||
@@ -45,0 +43,0 @@ const ANNOTATION = "amazonaws.com/arn"; |
@@ -1,40 +0,3 @@ | ||
import * as utilArnParser from '@aws-sdk/util-arn-parser'; | ||
import { build, validate } from '@aws-sdk/util-arn-parser'; | ||
import { ARN } from 'link2aws'; | ||
function _mergeNamespaces(n, m) { | ||
m.forEach(function (e) { | ||
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) { | ||
if (k !== 'default' && !(k in n)) { | ||
var d = Object.getOwnPropertyDescriptor(e, k); | ||
Object.defineProperty(n, k, d.get ? d : { | ||
enumerable: true, | ||
get: function () { return e[k]; } | ||
}); | ||
} | ||
}); | ||
}); | ||
return Object.freeze(n); | ||
} | ||
const ANNOTATION = "amazonaws.com/arn"; | ||
function linkTo(arn) { | ||
const arnString = typeof arn === "string" ? arn : build(arn); | ||
if (!validate(arnString)) { | ||
return void 0; | ||
} | ||
try { | ||
return new ARN(arnString).consoleLink; | ||
} catch (e) { | ||
return void 0; | ||
} | ||
} | ||
var arn = /*#__PURE__*/_mergeNamespaces({ | ||
__proto__: null, | ||
ANNOTATION: ANNOTATION, | ||
linkTo: linkTo | ||
}, [utilArnParser]); | ||
import * as arn from './arn.esm.js'; | ||
export { arn }; | ||
//# sourceMappingURL=index.esm.js.map |
{ | ||
"name": "@seatgeek/backstage-plugin-aws-catalog-common", | ||
"description": "Common functionality for AWS catalog providers", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "dist/index.cjs.js", | ||
@@ -15,3 +15,8 @@ "types": "dist/index.d.ts", | ||
"backstage": { | ||
"role": "common-library" | ||
"role": "common-library", | ||
"pluginId": "aws-catalog", | ||
"pluginPackages": [ | ||
"@seatgeek/backstage-plugin-aws-catalog-backend", | ||
"@seatgeek/backstage-plugin-aws-catalog-common" | ||
] | ||
}, | ||
@@ -33,3 +38,3 @@ "sideEffects": false, | ||
"devDependencies": { | ||
"@backstage/cli": "^0.25.1" | ||
"@backstage/cli": "^0.27.0" | ||
}, | ||
@@ -36,0 +41,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
9
6997
99