Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dynatrace/backstage-plugin-dql-common

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dynatrace/backstage-plugin-dql-common - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

dist/schema/tabularData.esm.js

34

dist/index.esm.js

@@ -1,34 +0,2 @@

import _ from 'lodash';
import { z } from 'zod';
const tableCell = z.string().or(
z.strictObject({
type: z.literal("link"),
text: z.string(),
url: z.string().url()
})
);
const rowData = z.record(tableCell);
const tabularDataSchema = z.array(rowData);
const validate = (data) => {
if (data.length === 0)
return true;
const keys = _.keys(data[0]);
return data.every((item) => _.isEqual(_.keys(item), keys));
};
const TabularDataFactory = {
fromString: (input) => {
const data = JSON.parse(input);
return TabularDataFactory.fromObject(data);
},
fromObject: (input) => {
const tabularData = tabularDataSchema.parse(input);
if (!validate(tabularData)) {
throw new Error("Invalid tabular data");
}
return tabularData;
}
};
export { TabularDataFactory };
export { TabularDataFactory } from './schema/tabularData.esm.js';
//# sourceMappingURL=index.esm.js.map

@@ -5,3 +5,3 @@ {

"license": "Apache-2.0",
"version": "1.0.0",
"version": "2.0.0",
"main": "dist/index.cjs.js",

@@ -19,6 +19,12 @@ "types": "dist/index.d.ts",

"url": "git+https://github.com/Dynatrace/backstage-plugin.git",
"directory": "plugins/dql-common"
"directory": "plugins\\dql-common"
},
"backstage": {
"role": "common-library"
"role": "common-library",
"pluginId": "dql",
"pluginPackages": [
"@dynatrace/backstage-plugin-dql",
"@dynatrace/backstage-plugin-dql-backend",
"@dynatrace/backstage-plugin-dql-common"
]
},

@@ -35,3 +41,3 @@ "sideEffects": false,

"devDependencies": {
"@backstage/cli": "^0.26.4",
"@backstage/cli": "^0.26.6",
"@types/lodash": "^4.17.0"

@@ -46,4 +52,4 @@ },

},
"gitHead": "f6a63c556035a23eb9f633ffb555eb279be1df9f",
"gitHead": "ea2844b14455e8d0e1d022ecacc86731f7c97266",
"module": "dist/index.esm.js"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc