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

@adminforth/import-export

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adminforth/import-export - npm Package Compare versions

Comparing version 1.0.0 to 1.0.2

dist/custom/ExportCsv.vue

18

index.ts

@@ -100,3 +100,3 @@ import AdminForth, { AdminForthPlugin, Filters, suggestIfTypo, AdminForthFilterOperators } from "adminforth";

return { data: csv, total: data.total, ok: true };
return { data: csv, exportedCount: data.total, ok: true };

@@ -116,2 +116,17 @@ }

const columns = Object.keys(data);
// check column names are valid
const errors: string[] = [];
columns.forEach((col) => {
if (!this.resourceConfig.columns.some((c) => c.name === col)) {
const similar = suggestIfTypo(this.resourceConfig.columns.map((c) => c.name), col);
errors.push(`Column '${col}' defined in CSV not found in resource '${this.resourceConfig.resourceId}'. ${
similar ? `If you mean '${similar}', rename it in CSV` : 'If column is in database but not in resource configuration, add it with showIn:[]'}`
);
}
});
if (errors.length > 0) {
return { ok: false, errors };
}
const columnValues: any[] = Object.values(data);

@@ -126,3 +141,2 @@ for (let i = 0; i < columnValues[0].length; i++) {

const errors: string[] = [];
let importedCount = 0;

@@ -129,0 +143,0 @@ await Promise.all(rows.map(async (row) => {

13

package.json
{
"name": "@adminforth/import-export",
"version": "1.0.0",
"version": "1.0.2",
"main": "dist/index.js",

@@ -9,3 +9,4 @@ "types": "dist/index.d.ts",

"build": "tsc && rsync -av --exclude 'node_modules' custom dist/ && npm version patch",
"rollout": "npm publish --access public"
"rollout": "npm run build && npm version patch && npm publish --access public",
"prepare": "npm link adminforth"
},

@@ -16,9 +17,3 @@ "keywords": [],

"description": "",
"devDependencies": {
"@types/node": "^22.6.1",
"adminforth": "file:../..",
"typescript": "^5.6.2"
},
"dependencies": {
}
"dependencies": {}
}

Sorry, the diff of this file is not supported yet

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