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

@kintone/data-loader

Package Overview
Dependencies
Maintainers
8
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kintone/data-loader - npm Package Compare versions

Comparing version 0.2.4 to 0.3.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [0.3.0](https://github.com/kintone/js-sdk/compare/@kintone/data-loader@0.2.4...@kintone/data-loader@0.3.0) (2021-04-27)
### Features
* **data-loader:** enhance CLI help message (type and requirement of arguments) ([#828](https://github.com/kintone/js-sdk/issues/828)) ([d4599af](https://github.com/kintone/js-sdk/commit/d4599af06f86aec884c87625ed6a868cbf6f0924))
## [0.2.4](https://github.com/kintone/js-sdk/compare/@kintone/data-loader@0.2.3...@kintone/data-loader@0.2.4) (2021-04-20)

@@ -8,0 +19,0 @@

8

lib/__tests__/main.test.js

@@ -31,7 +31,13 @@ "use strict";

return checkRejectArg({
arg: "import --dummy",
arg: "import --base-url https://example.com --app 1 --file-path /your/file/path --dummy",
errorMessage: "Unknown argument: dummy",
});
});
it("should throw error when required arguments are missing", () => {
return checkRejectArg({
arg: "import",
errorMessage: /Missing required arguments:/,
});
});
});
//# sourceMappingURL=main.test.js.map

@@ -5,2 +5,3 @@ "use strict";

const export_1 = require("../controllers/export");
const formats = ["json", "csv"];
exports.command = "export";

@@ -13,2 +14,4 @@ exports.desc = "export the records of the specified app";

defaultDescription: "KINTONE_BASE_URL",
type: "string",
demandOption: true,
})

@@ -20,2 +23,3 @@ .option("username", {

defaultDescription: "KINTONE_USERNAME",
type: "string",
})

@@ -27,2 +31,3 @@ .option("password", {

defaultDescription: "KINTONE_PASSWORD",
type: "string",
})

@@ -33,2 +38,3 @@ .option("api-token", {

defaultDescription: "KINTONE_API_TOKEN",
type: "array",
})

@@ -39,2 +45,3 @@ .option("basic-auth-username", {

defaultDescription: "KINTONE_BASIC_AUTH_USERNAME",
type: "string",
})

@@ -45,5 +52,8 @@ .option("basic-auth-password", {

defaultDescription: "KINTONE_BASIC_AUTH_PASSWORD",
type: "string",
})
.option("app", {
describe: "The ID of the app",
type: "string",
demandOption: true,
})

@@ -54,2 +64,3 @@ .option("guest-space-id", {

defaultDescription: "KINTONE_GUEST_SPACE_ID",
type: "string",
})

@@ -63,2 +74,3 @@ .option("attachment-dir", {

default: "json",
choices: formats,
})

@@ -68,8 +80,11 @@ .option("query", {

describe: "The query string",
type: "string",
})
.option("pfx-file-path", {
describe: "The path to client certificate file",
type: "string",
})
.option("pfx-file-password", {
describe: "The password of client certificate file",
type: "string",
});

@@ -76,0 +91,0 @@ exports.builder = builder;

@@ -12,2 +12,4 @@ "use strict";

defaultDescription: "KINTONE_BASE_URL",
type: "string",
demandOption: true,
})

@@ -19,2 +21,3 @@ .option("username", {

defaultDescription: "KINTONE_USERNAME",
type: "string",
})

@@ -26,2 +29,3 @@ .option("password", {

defaultDescription: "KINTONE_PASSWORD",
type: "string",
})

@@ -32,2 +36,3 @@ .option("api-token", {

defaultDescription: "KINTONE_API_TOKEN",
type: "array",
})

@@ -38,2 +43,3 @@ .option("basic-auth-username", {

defaultDescription: "KINTONE_BASIC_AUTH_USERNAME",
type: "string",
})

@@ -44,5 +50,8 @@ .option("basic-auth-password", {

defaultDescription: "KINTONE_BASIC_AUTH_PASSWORD",
type: "string",
})
.option("app", {
describe: "The ID of the app",
type: "string",
demandOption: true,
})

@@ -53,12 +62,17 @@ .option("guest-space-id", {

defaultDescription: "KINTONE_GUEST_SPACE_ID",
type: "string",
})
.option("file-path", {
describe: 'The path to source file. ".json" or ".csv"',
type: "string",
demandOption: true,
})
.option("pfx-file-path", {
describe: "The path to client certificate file",
type: "string",
})
.option("pfx-file-password", {
describe: "The password of client certificate file",
}).argv;
type: "string",
});
exports.builder = builder;

@@ -65,0 +79,0 @@ const handler = (argv) => import_1.run(argv);

3

lib/controllers/export.d.ts

@@ -7,6 +7,7 @@ import { KintoneRestAPIClient } from "@kintone/rest-api-client";

attachmentDir?: string;
format?: "json" | "csv";
format?: ExportFileFormat;
query?: string;
};
export declare type ExportFileFormat = "json" | "csv";
export declare const run: (argv: RestAPIClientOptions & Options) => Promise<void>;
export declare function exportRecords(apiClient: KintoneRestAPIClient, options: Options): Promise<Record[]>;
{
"name": "@kintone/data-loader",
"version": "0.2.4",
"version": "0.3.0",
"publishConfig": {

@@ -55,10 +55,10 @@ "access": "public"

"cross-env": "^7.0.2",
"pkg": "^4.5.1"
"pkg": "^5.0.0"
},
"dependencies": {
"@kintone/rest-api-client": "^1.12.4",
"@kintone/rest-api-client": "^1.13.0",
"csv-parse": "^4.15.4",
"yargs": "^16.2.0"
},
"gitHead": "75730ddd7b2efc84a236ad7a819fbec2123e8442"
"gitHead": "a1fe9d7dd71403bf6b8367c626898fbf6e1a327c"
}

@@ -63,16 +63,20 @@ # kintone-data-loader

--help Show help [boolean]
--base-url Kintone Base Url [default: KINTONE_BASE_URL]
-u, --username Kintone Username [default: KINTONE_USERNAME]
-p, --password Kintone Password [default: KINTONE_PASSWORD]
--api-token App's API token [default: KINTONE_API_TOKEN]
--base-url Kintone Base Url
[string] [required] [default: KINTONE_BASE_URL]
-u, --username Kintone Username
[string] [default: KINTONE_USERNAME]
-p, --password Kintone Password
[string] [default: KINTONE_PASSWORD]
--api-token App's API token[array] [default: KINTONE_API_TOKEN]
--basic-auth-username Kintone Basic Auth Username
[default: KINTONE_BASIC_AUTH_USERNAME]
[string] [default: KINTONE_BASIC_AUTH_USERNAME]
--basic-auth-password Kintone Basic Auth Password
[default: KINTONE_BASIC_AUTH_PASSWORD]
--app The ID of the app
[string] [default: KINTONE_BASIC_AUTH_PASSWORD]
--app The ID of the app [string] [required]
--guest-space-id The ID of guest space
[default: KINTONE_GUEST_SPACE_ID]
[string] [default: KINTONE_GUEST_SPACE_ID]
--file-path The path to source file. ".json" or ".csv"
--pfx-file-path The path to client certificate file
--pfx-file-password The password of client certificate file
[string] [required]
--pfx-file-path The path to client certificate file [string]
--pfx-file-password The password of client certificate file [string]
```

@@ -102,18 +106,22 @@

--help Show help [boolean]
--base-url Kintone Base Url [default: KINTONE_BASE_URL]
-u, --username Kintone Username [default: KINTONE_USERNAME]
-p, --password Kintone Password [default: KINTONE_PASSWORD]
--api-token App's API token [default: KINTONE_API_TOKEN]
--base-url Kintone Base Url
[string] [required] [default: KINTONE_BASE_URL]
-u, --username Kintone Username
[string] [default: KINTONE_USERNAME]
-p, --password Kintone Password
[string] [default: KINTONE_PASSWORD]
--api-token App's API token[array] [default: KINTONE_API_TOKEN]
--basic-auth-username Kintone Basic Auth Username
[default: KINTONE_BASIC_AUTH_USERNAME]
[string] [default: KINTONE_BASIC_AUTH_USERNAME]
--basic-auth-password Kintone Basic Auth Password
[default: KINTONE_BASIC_AUTH_PASSWORD]
--app The ID of the app
[string] [default: KINTONE_BASIC_AUTH_PASSWORD]
--app The ID of the app [string] [required]
--guest-space-id The ID of guest space
[default: KINTONE_GUEST_SPACE_ID]
[string] [default: KINTONE_GUEST_SPACE_ID]
--attachment-dir Attachment file directory [string]
--format Output format. "json" or "csv" [default: "json"]
-q, --query The query string
--pfx-file-path The path to client certificate file
--pfx-file-password The password of client certificate file
--format Output format. "json" or "csv"
[choices: "json", "csv"] [default: "json"]
-q, --query The query string [string]
--pfx-file-path The path to client certificate file [string]
--pfx-file-password The password of client certificate file [string]
```

@@ -120,0 +128,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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