Git Product home page Git Product logo

js-sdk's Introduction

js-sdk

This repository is a monorepo for Kintone development tools!

packages

Name Description Links
@kintone/rest-api-client An API client for Kintone REST API npm version
@kintone/customize-uploader An uploader for Kintone customization npm version
@kintone/plugin-manifest-validator A validator for manifest.json of Kintone plugin npm version
@kintone/create-plugin A CLI tool for creating a Kintone plugin! npm version
@kintone/plugin-packer A tool for packaging a Kintone plugin! npm version
@kintone/webpack-plugin-kintone-plugin A webpack plugin to create a plugin zip of Kintone npm version
@kintone/plugin-uploader A kintone plugin uploader using puppeteer npm version
@kintone/dts-gen A tool for generating type definitions for your Kintone apps npm version

Contribution Guide

License

Author

Cybozu, Inc.

Contributors

koba04 avatar zaki-yama avatar shintaroNagata avatar tasshi-me avatar chick-p avatar teppeis avatar shisama avatar hung-cybo avatar yokotaso avatar tuanphamcybozu avatar toshi-toma avatar sakit0 avatar pirosikick avatar b4h0-c4t avatar mmiyahara avatar nakajmg avatar kjmnmt avatar ksm-cy avatar ueokande avatar sosukesuzuki avatar niki-cy avatar potaracom avatar will-yama avatar minh-nguyen1985 avatar shohei-ihaya avatar ryounasso avatar amishiratori avatar akira345 avatar gorohash avatar snyk-bot avatar Kyome22 avatar jgdevroman avatar cy-takeuchi avatar kosuke-k avatar latica-jp avatar shinsenman avatar the-red avatar r3-yamauchi avatar mura- avatar cloneko avatar

js-sdk's People

Contributors

akira345 avatar b4h0-c4t avatar chick-p avatar dependabot[bot] avatar github-actions[bot] avatar hung-cybo avatar kjmnmt avatar koba04 avatar ksm-cy avatar minh-nguyen1985 avatar mmiyahara avatar nakajmg avatar niki-cy avatar pirosikick avatar potaracom avatar renovate-bot avatar renovate[bot] avatar sakit0 avatar shintaronagata avatar shisama avatar sosukesuzuki avatar tasshi-me avatar teppeis avatar toshi-toma avatar trigger-github-actions-release[bot] avatar tuanphamcybozu avatar ueokande avatar will-yama avatar yokotaso avatar zaki-yama avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

js-sdk's Issues

RequestBody size of RestApiClient is limited to Axios default maxBodyLength

Target Package

Environment

  • Operating System: macOS Big Sur 11.2.3
  • Browser: Google Chrome : 90.0.4430.212๏ผˆx86_64๏ผ‰
  • Node.js version: v14.12.0

Current Behavior

Recently, You have updated Axios version to "^0.21.0".
It cause that request body byte size has been limited.
I think that limited 10MB. it's axios default limit

Expected Behavior

I think you know solution.
You have wrote note. and useful configuration statement has commentouted.
// maxBodyLength: Infinity,
https://github.com/kintone/js-sdk/blob/master/packages/rest-api-client/src/http/AxiosClient.ts#L88-L93

I think that the option parameter is necessary to use current version Axios.
Or We need A way to set maxBodyLengh parameter.

Please tell me any opinion.

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (prConcurrentLimitNone)

customize-uploader: `--proxy` option is ignored

Target Package

  • @kintone/customize-uploader 4.0.9

Environment

  • Operating System: macOS 10.15.7
  • Browser: N.A.
  • Node.js version: v14.16.1

Current Behavior

It looks like --proxy option is not passed to api client.

this.restApiClient = new KintoneRestAPIClient({
baseUrl: kintoneUrl,
auth,
basicAuth,
featureFlags: {
enableAbortSearchError: false,
},
guestSpaceId,
});

Expected Behavior

--proxy option works correctly

feat: updateAllRecords

Motivation

The current limitation of updateRecords (limited until 100 records) is inconvenient so we'd like to add a method to be able to exceed the limitation.

Overview

This method is to be able to update over 100 records to an app.
Here is the interface we plan.

const results = await this.client.record.updateAllRecords({
  app: APP_ID,
  records
});

feat: upsertRecord

Motivation

We'd like to support the situation that we add a record but update an existing record if the record has already been registered.

Overview

This method updates or inserts details of 1 record in an app. this updates a record if the unique key specifying by uniqueKey has matched any record, otherwise inserts a record.

const result = await this.client.record.upsertRecord({
  app: APP_ID,
  updateKey: {
    field,
    value,
  },
  record,
})

extract rest-api-client/scripts as a separate package

rest-api-client has a scripts directory that has scripts that are for testing and examples.
Currently, there are dependencies and npm-scripts only for the scripts in rest-api-client package.

I think it would be nice if the scripts are placed as a separate package.
It isn't an npm package, so it would be nice if the package is put into like examples/.

`buildBaseUrl()` throws an error when `location` is undefined and not passing `baseUrl`

This behavior is related to #855, but still occurs even after merging #855.

Target Package

  • @kintone/rest-api-client (all versions)

Environment

  • React Native (We confirmed the behavior with Expo Go)

Current Behavior

  • Create a React Native project with expo-cli
$ npm install --global expo-cli
$ expo init my-project
  • Install the latest @kintone/rest-api-client
$ npm install @kintone/rest-api-client
  • Modify App.tsx to create KintoneRestAPIClient without baseUrl
 import React from 'react';
 import { StyleSheet, Text, View } from 'react-native';

+import { KintoneRestAPIClient } from "@kintone/rest-api-client";
+
 export default function App() {
+  const client = new KintoneRestAPIClient();
+
   return (
     <View style={styles.container}>
       <Text>Open up App.tsx to start working on your app!</Text>
  • Run npm start and open the app with Expo Go (in iPhone or Android phone)

Then an error occurs.

ReferenceError: Can't find variable: location

Expected Behavior

It would be nice if we can see more helpful error message.
(For example, "In this environment, `baseUrl` is required" )

feat: Support file path argument in `file.uploadFile()`

Motivation

Currently, file.uploadFile() supports only file data and we can't pass its path.
It would be more convenient if it also accepts the path of the file.

NOTE: This feature is available only in Node.js environment.

Overview

// We haven't fixed the interface yet.
const client = new KintoneRestAPIClient({ ... });
const result = await this.client.file.uploadFile({
  file: 'PATH_TO_FILE' // or separate parameter name?
})

Option "guest-space-id" does not work

Target Package

  • @kintone/customize-uploader 3.1.9

Environment

  • Operating System: Windows 10
  • Browser:
  • Node.js version: v14.16.0

Current Behavior

Option "guest-space-id" does not work when I use @kintone/customize-uploader to upload JS file to a guest space app.

Preparation: A guest space, and an app in this space

Steps to reproduce:

  1. Install @kintone/customize-uploader.
  2. Create a JS file.
  3. Use command with "guest-space-id" option to upload the JS file to the guest space app.
    -> Failed to update customize setting and error occurs
E:\github.com\kintone\test>npx kintone-customize-uploader .\dest\customize-manifest.json --guest-space-id 5
? Input your kintone's base URL (https://example.cybozu.com): https://ldong.cybozu.com
? Input your username: test
? Input your password: [hidden]
Start uploading customization files
dest/test.js has been uploaded!
JavaScript/CSS files have been uploaded!
Failed to update customize setting
An error occured, retry
Failed to update customize setting
An error occured, retry
Failed to update customize setting
KintoneRestAPIError: [520] [GAIA_IL23] ใ‚ฒใ‚นใƒˆใ‚นใƒšใƒผใ‚นๅ†…ใฎใ‚ขใƒ—ใƒชใ‚’ๆ“ไฝœใ™ใ‚‹ๅ ดๅˆใฏใ€ใƒชใ‚ฏใ‚จใ‚นใƒˆใฎ้€ไฟกๅ…ˆใ‚’ใ€Œ/k/guest/๏ผˆใ‚ฒใ‚นใƒˆใ‚นใƒšใƒผใ‚นใฎID๏ผ‰/v1/...ใ€ใซใ—ใพใ™ใ€‚ (TdYjpvnw4Rj5kTL0p4JP)
    at KintoneResponseHandler.handleErrorResponse (E:\github.com\kintone\test\node_modules\@kintone\rest-api-client\lib\KintoneResponseHandler.js:57:15)
    at E:\github.com\kintone\test\node_modules\@kintone\rest-api-client\lib\KintoneResponseHandler.js:35:123
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

Note

Maybe problem is here, parameter "guestSpaceId" is missing.

this.restApiClient = new KintoneRestAPIClient({
baseUrl: kintoneUrl,
auth,
basicAuth,
featureFlags: {
enableAbortSearchError: false,
},
});

Expected Behavior

Can use @kintone/customize-uploader to upload JS file to a guest space app.

plugin-uploader: failes to upload plugin

Target Package

Environment

  • Operating System: any
  • Browser: N.A.
  • Node.js version: any (>= 12)

Current Behavior

Currently

$ npm install -g @kintone/plugin-uploader
$ kintone-plugin-uploader <path-to-plugin-file>
Open https://xxx.cybozu.com/login?saml=off
Trying to log in...
Navigate to https://xxx.cybozu.com/k/admin/system/plugin/
Trying to upload SAMPLE_text_connet_plugin_v1.3.4.zip
ใ‚จใƒฉใƒผใŒ็™บ็”Ÿใ—ใพใ—ใŸ TimeoutError: waiting for selector `.ocean-ui-dialog` to be hidden failed: timeout 60000ms exceeded
    at new WaitTask (/Users/***/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:509:34)
    at DOMWorld.waitForSelectorInPage (/Users/***/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:420:26)
    at Object.internalHandler.waitFor (/Users/***/node_modules/puppeteer/lib/cjs/puppeteer/common/QueryHandler.js:31:77)
    at DOMWorld.waitForSelector (/Users/***/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:313:29)
    at Frame.waitForSelector (/Users/***/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:841:51)
    at Page.waitForSelector (/Users/***/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1333:33)
    at /Users/***/node_modules/@kintone/plugin-uploader/dist/index.js:83:20
    at Generator.next (<anonymous>)
    at fulfilled (/Users/***/node_modules/@kintone/plugin-uploader/dist/index.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
โœจ  Done in 65.09s.

Expected Behavior

Can successfully upload the plugin.

Workaround

Use @kintone/[email protected].

feat: support `x-cybozu-warning` header

ref. #65

When retrieving records with query,

https://developer.cybozu.io/hc/ja/articles/202331474-%E3%83%AC%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AE%E5%8F%96%E5%BE%97-GET-

ใ‚ฏใ‚จใƒชๆคœ็ดข็ตๆžœใŒ10ไธ‡ไปถไปฅไธŠๅญ˜ๅœจใ™ใ‚‹ใจใใ€็ตžใ‚Š่พผใฟใŒไธญๆ–ญใ•ใ‚Œใพใ™ใ€‚
ใใฎๅ ดๅˆใƒฌใ‚นใƒใƒณใ‚นใƒ˜ใƒƒใƒ€ใซใ€Œx-cybozu-warning : Filter aborted because of too many search results.ใ€ใŒ่ฟฝๅŠ ใ•ใ‚Œใพใ™ใ€‚

We need to support this header or other ways for users to know this warning.

Continuously send requests when use getAllRecordsWithId

Target Package

  • @kintone/rest-api-client 1.10.0

Environment

  • Operating System: Windows 10
  • Browser: Chrome 88.0.4324.182
  • Node.js version: v14.15.3

Current Behavior

Step 1. Create a new kintone app, no field is OK.
Step 2. Add more than 500 records.
Step 3. On JS Customization page of this APP, add the UMD file of rest-api-client.
Step 4. On list page of this APP, open DevTools of browser and run following code.
const client = new KintoneRestAPIClient(); client.record .getAllRecordsWithId({ app: kintone.app.getId(), condition: '$id != "" or $id = ""' }) .then((resp) => { console.log(resp); }) .catch((err) => { console.log(err); });

=> Bug occurs:
The API requests are send continuously.
Always return the first 500 records.

Memo:
If condition is '($id != "" or $id = "")', this bug does not occur.

I think adding () in rest-api-client is better.

const conditionQuery = condition ? `${condition} and ` : "";

const conditionQuery = condition ? `${condition} and ` : "";
->
const conditionQuery = condition ? `(${condition}) and ` : "";

Expected Behavior

Do not send requests continuously.
Return the correct result.

feat: deleteAllRecords

Motivation

The current limitation of deleteRecords (limited until 100 records) is inconvenient so we'd like to add a method to be able to exceed the limitation.

Overview

This method is to be able to delete over 100 records to an app.
Here is the interface we plan.

const results = await this.client.record.deleteAllRecords({
  app: APP_ID,
  ids,
  revisions
});

data-loader should not expose sensitive information through help messages

Currently, data-loader prints the actual values of each environment variables in help messages.
Those variables often include sensitive values like a password, so I think we shouldn't print the actual values in the help message.
I haven't confirmed whether yargs has a proper way to fix this or not, so the Expected Behavior section might be changed.

Target Package

  • @kintone/data-loader

Environment

  • Operating System:
  • Browser:
  • Node.js version:

Current Behavior

*** is the actual values I've set as environment variables.

ใ‚ชใƒ—ใ‚ทใƒงใƒณ:
  --version              ใƒใƒผใ‚ธใƒงใƒณใ‚’่กจ็คบ                                 [็œŸๅฝ]
  --help                 ใƒ˜ใƒซใƒ—ใ‚’่กจ็คบ                                     [็œŸๅฝ]
  --base-url             Kintone Base Url
                                   [ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆ: "https://***.cybozu.com/"]
  --username, -u         Kintone Username     [ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆ: "***"]
  --password, -p         Kintone Password        [ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆ: "***"]
  --api-token            App's API token
  --basic-auth-username  Kintone Basic Auth Username
  --basic-auth-password  Kintone Basic Auth Password
  --app                  The ID of the app
  --guest-space-id       The ID of guest space
  --file-path            file path
  --pfx-file-path        The path to client certificate file
  --pfx-file-password    The password of client certificate file

Expected Behavior

*** is the actual values I've set as environment variables.

ใ‚ชใƒ—ใ‚ทใƒงใƒณ:
  --version              ใƒใƒผใ‚ธใƒงใƒณใ‚’่กจ็คบ                                 [็œŸๅฝ]
  --help                 ใƒ˜ใƒซใƒ—ใ‚’่กจ็คบ                                     [็œŸๅฝ]
  --base-url             Kintone Base Url
                                   [ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆ: KINTONE_BASE_URL]
  --username, -u         Kintone Username     [ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆ: KINTONE_USER_NAME]
  --password, -p         Kintone Password        [ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆ: KINTONE_PASSWORD]
  --api-token            App's API token
  --basic-auth-username  Kintone Basic Auth Username
  --basic-auth-password  Kintone Basic Auth Password
  --app                  The ID of the app
  --guest-space-id       The ID of guest space
  --file-path            file path
  --pfx-file-path        The path to client certificate file
  --pfx-file-password    The password of client certificate file

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm @types/js-base64 Unavailable
npm @types/mime Unavailable

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/labeler.yml
  • Kesin11/actions-timeline v2@1c2ab3f28225878ae4dd1f76d31279f16ea29e29
  • actions/labeler v5
.github/workflows/license.yml
  • Kesin11/actions-timeline v2@1c2ab3f28225878ae4dd1f76d31279f16ea29e29
  • actions/checkout v4
  • pnpm/action-setup v3
  • actions/setup-node v4
.github/workflows/lint.yml
  • Kesin11/actions-timeline v2@1c2ab3f28225878ae4dd1f76d31279f16ea29e29
  • actions/checkout v4
  • pnpm/action-setup v3
  • actions/setup-node v4
.github/workflows/release.yml
  • actions/create-github-app-token v1
  • googleapis/release-please-action v4@7987652d64b4581673a76e33ad5e98e3dd56832f
  • actions/checkout v4
  • pnpm/action-setup v3
  • actions/setup-node v4
  • Kesin11/actions-timeline v2@1c2ab3f28225878ae4dd1f76d31279f16ea29e29
.github/workflows/test-e2e.yml
  • actions/checkout v4
  • pnpm/action-setup v3
  • actions/setup-node v4
  • Kesin11/actions-timeline v2@1c2ab3f28225878ae4dd1f76d31279f16ea29e29
.github/workflows/test.yml
  • actions/checkout v4
  • pnpm/action-setup v3
  • actions/setup-node v4
  • Kesin11/actions-timeline v2@1c2ab3f28225878ae4dd1f76d31279f16ea29e29
.github/workflows/yamory.yml
  • Kesin11/actions-timeline v2@1c2ab3f28225878ae4dd1f76d31279f16ea29e29
  • actions/checkout v4
  • pnpm/action-setup v3
  • actions/setup-node v4
npm
examples/rest-api-client-demo/package.json
  • @kintone/rest-api-client ^5.5.2
  • yargs ^17.7.2
  • @kintone/customize-uploader ^8.0.13
  • @types/yargs ^17.0.32
  • ts-loader ^9.5.1
  • ts-node ^10.9.2
  • webpack ^5.92.0
  • webpack-cli 5.1.4
package.json
  • @babel/core ^7.24.7
  • @babel/preset-env ^7.24.7
  • @babel/preset-typescript ^7.24.7
  • @cybozu/eslint-config ^23.0.0
  • @cybozu/license-manager ^1.2.1
  • @octokit/rest ^20.1.1
  • @types/jest ^29.5.12
  • @types/node ^18.19.37
  • babel-jest ^29.7.0
  • comment-json ^4.2.3
  • eslint ^8.57.0
  • jest ^29.7.0
  • npm-run-all ^4.1.5
  • prettier ^3.3.2
  • rimraf ^5.0.7
  • ts-node ^10.9.2
  • typescript ^5.4.5
  • pnpm 8.15.8
  • braces >=3.0.3
  • pac-resolver >=7.0.1
  • socks >=2.8.3
  • express >=4.19.2
packages/create-plugin/package.json
  • chalk ^4.1.2
  • glob ^10.4.1
  • inquirer ^8.2.6
  • lodash ^4.17.21
  • meow ^9.0.0
  • node-rsa ^1.1.1
  • normalize-path ^3.0.0
  • os-locale ^5.0.0
  • prettier ^3.3.2
  • rimraf ^5.0.7
  • sort-package-json ^1.57.0
  • @types/glob ^8.1.0
  • @types/inquirer ^8.2.10
  • @types/lodash ^4.17.5
  • @types/node-rsa ^1.1.4
  • @types/normalize-path ^3.0.2
  • cross-env ^7.0.3
  • jest-environment-node ^29.7.0
packages/create-plugin/templates/minimum/package.json
  • @cybozu/eslint-config ^23.0.0
  • @kintone/plugin-packer ^8.1.2
  • eslint ^8.57.0
packages/create-plugin/templates/minimum/with-plugin-uploader.json
  • @kintone/plugin-uploader ^9.1.2
  • npm-run-all ^4.1.5
packages/create-plugin/templates/modern/package.json
  • core-js ^3.37.1
  • @kintone/rest-api-client ^5.5.2
  • @babel/core ^7.24.7
  • @babel/preset-env ^7.24.7
  • @babel/preset-react ^7.24.7
  • @babel/preset-typescript ^7.24.7
  • @cybozu/eslint-config ^23.0.0
  • @kintone/dts-gen ^8.0.12
  • @kintone/webpack-plugin-kintone-plugin ^8.0.9
  • ajv ^8.16.0
  • babel-loader ^9.1.3
  • cross-env ^7.0.3
  • eslint ^8.57.0
  • npm-run-all ^4.1.5
  • prettier ^3.3.2
  • typescript ^5.4.5
  • webpack ^5.92.0
  • webpack-cli ^5.1.4
packages/create-plugin/templates/modern/with-plugin-uploader.json
  • @kintone/plugin-uploader ^9.1.2
packages/customize-uploader/package.json
  • @kintone/rest-api-client ^5.5.2
  • chokidar ^3.6.0
  • inquirer ^8.2.6
  • meow ^9.0.0
  • mkdirp ^3.0.1
  • os-locale ^5.0.0
  • rimraf ^5.0.7
  • @types/inquirer 8.2.10
packages/dts-gen/package.json
  • @cybozu/eslint-config ^23.0.0
  • axios ^1.7.2
  • commander ^12.1.0
  • eslint ^8.57.0
  • form-data ^4.0.0
  • lodash ^4.17.21
  • prettier ^3.3.2
  • @types/eslint ^8.56.10
  • @types/lodash ^4.17.5
  • ts-loader ^9.5.1
  • webpack ^5.92.0
  • webpack-cli ^5.1.4
  • assert ^2.1.0
packages/plugin-manifest-validator/package.json
  • ajv ^8.16.0
  • ajv-formats ^3.0.1
  • bytes ^3.1.2
  • @babel/preset-typescript ^7.24.7
  • @types/bytes ^3.1.4
  • babel-plugin-replace-ts-export-assignment ^0.0.2
  • intelli-espower-loader ^1.1.0
  • json-schema-to-typescript ^14.0.5
  • power-assert ^1.6.1
packages/plugin-packer/package.json
  • @kintone/plugin-manifest-validator ^10.2.2
  • chokidar ^3.6.0
  • debug ^4.3.5
  • denodeify ^1.2.1
  • meow ^9.0.0
  • mkdirp ^3.0.1
  • node-rsa ~1.1.1
  • stream-buffers ^3.0.3
  • yauzl ^3.1.3
  • yazl ^2.5.1
  • @reduxjs/toolkit ^2.2.5
  • @types/debug ^4.1.12
  • @types/node-rsa ^1.1.4
  • @types/stream-buffers ^3.0.7
  • @types/yauzl ^2.10.3
  • @types/yazl ^2.4.5
  • ajv ^8.16.0
  • array-flatten ^3.0.0
  • assert ^2.1.0
  • babel-plugin-replace-ts-export-assignment ^0.0.2
  • browserify-zlib ^0.2.0
  • buffer ^6.0.3
  • constants-browserify ^1.0.0
  • crypto-browserify ^3.12.0
  • cssnano ^7.0.3
  • execa ^5.1.1
  • glob ^10.4.1
  • jest-environment-jsdom ^29.7.0
  • normalize.css ^8.0.1
  • path-browserify ^1.0.1
  • postcss ^8.4.38
  • postcss-cli ^11.0.0
  • process ^0.11.10
  • redux-logger ^3.0.6
  • redux-thunk ^3.1.0
  • rimraf ^5.0.7
  • setimmediate ^1.0.5
  • stream-browserify ^3.0.0
  • util ^0.12.5
  • webpack ^5.92.0
  • webpack-cli 5.1.4
  • webpack-dev-server ^5.0.4
packages/plugin-uploader/package.json
  • chalk ^4.1.2
  • inquirer ^8.2.6
  • meow ^9.0.0
  • os-locale ^5.0.0
  • puppeteer ^22.10.1
  • @types/inquirer 8.2.10
packages/profile-loader/package.json
  • toml ^3.0.0
packages/rest-api-client/package.json
  • core-js ^3.37.1
  • axios ^1.7.2
  • form-data ^4.0.0
  • js-base64 ^3.7.7
  • mime ^3.0.0
  • qs ^6.12.1
  • @rollup/plugin-babel ^6.0.4
  • @rollup/plugin-commonjs ^26.0.1
  • @rollup/plugin-json ^6.1.0
  • @rollup/plugin-node-resolve ^15.2.3
  • @rollup/plugin-terser ^0.4.4
  • @types/core-js ^2.5.8
  • @types/js-base64 ^3.3.1
  • @types/mime ^3.0.4
  • @types/qs ^6.9.15
  • rollup ^4.18.0
  • rollup-plugin-ecma-version-validator ^0.2.13
  • rollup-plugin-license ^3.4.0
  • rollup-plugin-node-globals ^1.4.0
  • rollup-plugin-polyfill-node ^0.13.0
  • webpack ^5.92.0
  • webpack-cli ^5.1.4
  • babel-loader ^9.1.3
  • vite ^5.3.1
  • rimraf ^5.0.7
  • cross-env ^7.0.3
packages/webpack-plugin-kintone-plugin/package.json
  • @kintone/plugin-packer ^8.1.2
  • mkdirp ^3.0.1
  • @types/adm-zip ^0.5.5
  • adm-zip ^0.5.14
  • chokidar ^3.6.0
  • rimraf ^5.0.7
  • webpack ^5.92.0
  • webpack-cli 5.1.4
  • webpack-merge ^5.10.0
  • webpack ^4.0.0 || ^5.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

Roadmap for 2020 Summer

This plan is a roadmap for the next few months.
We will introduce item details in each issue.

Plan Items

  • โš ๏ธ support x-cybozu-warning header (#67)
  • provide type definitions for each field type
  • โœ‹ add a feature like config-helper that retrieves app field information

โš ๏ธ โ€ฆ BREAKING CHANGE
๐Ÿƒ ... work in progress
๐Ÿค” ... under discussion
โœ‹ ... postpone

Japanese version: kintone/js-sdk-ja#2

Lookup field update error

Error: [520] [GAIA_LO04] A value 129 in the field xxx does not exist in the datasource app for lookup, or you do not have permission to view the app or the field.

Hi, I keep getting this error message when updating a lookup field of an app, there is nothing wrong when I update other types of fields.
Can you tell me how to solve this problem?
Thanks a lot.

Feature request: fileUpload supports Stream

kintone-js-sdk ใฎใ‚ˆใ†ใซใ€file.data ใง Streamใ‚’ๅ—ใ‘ๅ–ใ‚Œใ‚‹ใ‚ˆใ†ใซใ—ใฆใ„ใŸใ ใ‘ใ‚‹ใจๅฌ‰ใ—ใ„ใงใ™ใ€‚

Run test and lint scripts on Node.js v14

Package

all packages

  • @kintone/***

Why

Node.js v14 is the recommended version for most users, so we should run tests on CI with the version.

What

  • Add Node.js v14 as a target version to run tests on CI
  • Update the Node.js version to run lint scripts on CI from v12 to v14

BulkRequest ใ™ใ‚‹้š›ใซ buildPathWithGuestSpaceId ใ‚’ไฝฟใ„ใŸใ„

BulkRequest ใฎใƒ‘ใƒฉใƒกใƒผใ‚ฟ requests[].api ใง APIใฎใƒ‘ใ‚นใ‚’ๆŒ‡ๅฎšใ™ใ‚‹้š›ใซๅฟ…่ฆใซใชใ‚‹ใŸใ‚
buildPathWithGuestSpaceId ใƒกใ‚ฝใƒƒใƒ‰ใ‚’ public ใซไฝฟใˆใ‚‹ใ‚ˆใ†ใซใ—ใฆๆฌฒใ—ใ„ใ€‚

โ€ป buildPathWithGuestSpaceId ใƒกใ‚ฝใƒƒใƒ‰ใŒ public ใงใชใ„ใŸใ‚็‹ฌ่‡ชๅฎŸ่ฃ…ใ—ใฆใ„ใ‚‹ไพ‹
https://github.com/r3-yamauchi/kintone-delete-by-cursor/blob/master/src/BulkDel.ts#L48
https://github.com/r3-yamauchi/kintone-delete-by-cursor/blob/master/src/Util.ts#L86

249164c#diff-0c5d15aae00d4d9c3cb6465b57d756aaR301
ใฎใ‚ˆใ†ใซ SDKๅ†…ใงๅ†…้ƒจ็š„ใซ BulkRequest ใ—ใฆใ„ใ‚‹ๅ ดๅˆใฏใ‚ˆใ„ใŒใ€BulkRequest ใ‚’ๅฎŸ่กŒใ™ใ‚‹ๅฎŸ่ฃ…ใ‚’่‡ชๅˆ†ใงๆ›ธใๅ ดๅˆใ‚‚ใ‚ใ‚‹ใŸใ‚

Roadmap for 2020 Spring

This plan is a roadmap for the next few months.
We focus on supporting all features that kintone-js-sdk has.

Plan Items

  • addAllRecords (#102)
  • updateAllRecords (#103)
  • deleteAllRecords (#104)
  • upsert single record (#105)
  • support client certificate (#113)
  • support OAuth bearer token header (#110)
  • support Proxy server (#114)
  • support file path in uploadFile() method (#115)
  • โœ‹ upsert multiple records
  • support UserAgent in Node environment

๐Ÿƒ ... work in progress
๐Ÿค” ... under discussion
โœ‹ ... postpone

feat: Support OAuth access token

Motivation

Kintone has OAuth access token support, but rest-api-client doesn't support yet.
So we want rest-api-client to accept OAuth access token.

ref. #64

Overview

This PR make rest-api-token to be able to accept OAuth token at its constructor.

// This interface hasn't fixed so we might change the interface
const client = new KintoneRestAPIClient({
  baseUrl: "https://example.cybozu.com",
  auth: {
    oauthToken: process.env.KINTONE_OAUTH_TOKEN
  }
});

refactor: explicit test environment for unit testing

rest-api-client supports Node and a browser environment, but some features are only available in one environment.
We run unit testing using Jest, so the unit tests are running on jsdom, which is a default environment for Jest.

Currently, it's not clear which tests are for a browser environment, which one is for a Node environment.
So we have to refactor tests to make a running environment clear.

IMHO, we might not need to use jsdom as the environment, because most tests should run on a Node environment.

[plugin-manifest-validator] Migrate to TypeScript

Package

  • @kintone/plugin-manifest-validator

Why

packages in js-sdk are intended to be written by TypeScript, but plugin-manifest-validator is not.

What

Migrate plugin-manifest-validator to TypeScript.

Can't execute the 'integration test' in the Maintenance Guide.

Target Package

  • @kintone/dts-gen 4.0.0

Environment

  • Operating System: macOS Big Sur 11.2.3
  • Node.js version: 14.16.1

Current Behavior

Following the Maintenance Guide of @kintone/dts-gen, I executed yarn build & node ./dist/integration-tests/setup-test-app.js with some parameters written in the guide.
However, we got the error like bellow:

/path/to/workspace/js-sdk/packages/dts-gen/dist/integration-tests/setup-test-app.js:37
    .version("0.0.1")
     ^

TypeError: program.version is not a function
    at Object.<anonymous> (/path/to/workspace/js-sdk/packages/dts-gen/dist/integration-tests/setup-test-app.js:37:6)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47

Expected Behavior

can execute the setup script with no error.

bug: Incorrect code completions on some methods.

Target Package

  • @kintone/rest-api-client 1.3.0

Environment

  • Operating System: Windows 10 Pro / macOS Catalina
  • Node.js version: v12.15.0
  • Visual Studio Code v1.45.1

Current Behavior

code completion on record.updateAllRecords() is not correct.

2020-05-27_10h42_51

Some methods have the same issue, for example; updateRecords(), updateRecordAssignees(), deleteRecords(), deleteAllRecords(), deleteRecordComment(), and so on.

Expected Behavior

They should be RecordID and RevisionID.

[rest-api-client] unnecessary property in the parameter of `app.updateGeneralNotifications`

Versions

  • @kintone/rest-api-client 1.10.0
  • TypeScript: 4.1.5

Current Behavior

app.updateGeneralNotifications(#607 ) accepts notifications[].notifyToCommenter for their parameter.

Expected Behavior

Remove notifications[].notifyToCommenter from the type definition.
According to cybozu developer network, notificatons[] doesn't require the property notifyToCommenter.
https://developer.cybozu.io/hc/ja/articles/900004873663

Steps to reproduce the issue

N/A

@kintone/rest-api-client Broken Reference Links

Target Package

  • @kintone/rest-api-client 1.41

Environment

  • Operating System: MacOS
  • Browser: Chrome
  • Node.js version: N/A

Current Behavior

Expected Behavior

Screen Shot 2020-06-15 at 10 03 28 AM
Screen Shot 2020-06-15 at 10 05 45 AM

Define plugin-manifest-validator specific error format

Package

  • @kintone/plugin-manifest-validator

Why

Currently, @kintone/plugin-manifest-validator pass-through the Ajv ErrorObject.
It has increased the impact of the disruptive update of Ajv. ( see #786 )
Wrapping in its own error format minimizes external impact.

What

TBD

Unify environment variables used in js-sdk packages

Tasks

  • Add missing environment variables and CLI flags support in @kintone/plugin-uploader @chick-p
    • KINTONE_BASE_URL #534
  • Add missing environment variables and CLI flags support in @kintone/customize-uploader @chick-p
    • KINTONE_BASE_URL #543
    • KINTONE_OAUTH_TOKEN #566
  • Add missing environment variables and CLI flags support in @kintone/dts-gen @koba04 (@potaracom)
  • Release a minor version of the packages
  • Add deprecated warnings for the usage of KINTONE_DOMAIN, which includes domain option as well @chick-p
    • @kintone/plugin-uploader #697
    • @kintone/customize-uploader #602
  • Add deprecated warnings for the usage of host, proxyHost, and proxyPort option
    • @kintone/dts-gen #869
  • Release a minor version of the packages
  • Remove deprecated environment variables and CLI flags from the packages.
    • @kintone/plugin-uploader #1046
    • @kintone/customize-uploader #1047
    • @kintone/dts-gen #1048
  • Release a major version of the packages ๐ŸŽ‰

Package

  • @kintone/dts-gen
  • @kintone/customize-uploader
  • @kintone/plugin-uploader

Why

Currently, those packages have some environment variables support like KINTONE_USERNAME and KINTONE_API_TOKEN, which is useful but the support has some inconsistency like kintone/js-sdk-ja#7 (comment) (Thank you @potaracom)

The inconsistency is cumbersome for developers who use these packages.
So we'd like to address the issue.

What

We will unify the usage of environment variables like the following.

Environment variables we use

  • KINTONE_USERNAME ... Your user name
  • KINTONE_PASSWORD ... Your password
  • KINTONE_BASE_URL ... The URL of your Kintone environment e.g. https://example.kintone.com
  • KINTONE_API_TOKEN ... API Token
  • KINTONE_OAUTH_TOKEN ... OAuth Token
  • KINTONE_BASIC_AUTH_USERNAME ... The user name of Basic Authentication
  • KINTONE_BASIC_AUTH_PASSWORD ... The password of Basic Authentication
  • HTTP_PROXY ... The URL of HTTP proxy server
  • HTTPS_PROXY ... The URL of HTTPS proxy server

Matrix of the environment variables and packages

plugin-uploader customize-uploader dts-gen
KINTONE_USERNAME ๐Ÿ™†โ€โ™€๏ธ ๐Ÿ™†โ€โ™€๏ธ ๐Ÿš€
KINTONE_PASSWORD ๐Ÿ™†โ€โ™€๏ธ ๐Ÿ™†โ€โ™€๏ธ ๐Ÿš€
KINTONE_BASE_URL ๐Ÿš€ ๐Ÿš€ ๐Ÿš€
KINTONE_API_TOKEN โ›” โ›” ๐Ÿš€
KINTONE_OAUTH_TOKEN โ›” ๐Ÿš€ ๐Ÿš€
KINTONE_DOMAIN ๐Ÿ™… ๐Ÿ™… โ›”
KINTONE_BASIC_AUTH_USERNAME ๐Ÿ™†โ€โ™€๏ธ ๐Ÿ™†โ€โ™€๏ธ ๐Ÿš€
KINTONE_BASIC_AUTH_PASSWORD ๐Ÿ™†โ€โ™€๏ธ ๐Ÿ™†โ€โ™€๏ธ ๐Ÿš€
HTTP_PROXY ๐Ÿ™†โ€โ™€๏ธ ๐Ÿ™†โ€โ™€๏ธ ๐Ÿš€
HTTPS_PROXY ๐Ÿ™†โ€โ™€๏ธ ๐Ÿ™†โ€โ™€๏ธ ๐Ÿš€
  • ๐Ÿ™†โ€โ™€๏ธ Already supported
  • ๐Ÿš€ Will be supported in this issue
  • โ›” Won't be supported because of limitations of Kintone
  • ๐Ÿ™… Will be removed in this issue

Adoption strategy

  1. Add missing environment variable support, which includes CLI options if required.
  2. Release a minor version of the packages
  3. Add deprecated warnings for the usage of KINTONE_DOMAIN, which includes domain option as well.
  4. Release a minor version of the packages
  5. Remove deprecated environment variables and CLI flags from the packages.
  6. Release a major version of the packages

Support auto-generated record types for specific Kintone apps

Package

  • @kintone/rest-api-client
  • (@kintone/dts-gen)

Why

Some methods rest-api-client provides accept a type parameter for a type definition of your app.

type MyAppRecord = { /* ... */ }
// the type of the record will be MyAppRecord
const record = client.record.getRecord<MyAppRecord>({ app: 1, id: 10 })

After #404 has been merged, we could define the type definition using types #404 exposes.
But it's a bit cumbersome because we have to define the type definition manually.

dts-gen provides us a command to be able to generate type definitions for your app.
But the type definition dts-gen generates is not compatible with rest-api-client expects (refs. #442).

What

We'd like to provide a way to generate type definitions, which are compatible with rest-api-client, automatically.

We could take some options to fix the issue.

  1. Adding a feature to generate type definitions to be able to use with rest-api-client into dts-gen.
  2. Creating a new package to generate type definitions to be able to use with rest-api-client.

Now, we have several types for a Kintone record type like the following.

  • JS API
  • API Response
  • API Request

So we have to sort each type definition respectively.

file.uploadFile ใง Blob ใงใชใ String ใ‚’ๆŒ‡ๅฎšใ™ใ‚‹ใจใ‚จใƒฉใƒผใŒ็™บ็”Ÿใ™ใ‚‹

https://github.com/kintone/js-sdk/blob/master/packages/rest-api-client/docs/file.md#uploadFile
ใฎ Parameters ใซ
file.data String or Blob ใจๆ›ธใ‹ใ‚ŒใฆใŠใ‚Šใ€ใ“ใฎใƒšใƒผใ‚ธใฎๅ†’้ ญใซใ‚‚

  const FILE = {
    name: "Hello.txt",
    data: "Hello World!"
  };

file.data ใซๆ–‡ๅญ—ๅˆ—ใ‚’ๆŒ‡ๅฎšใ™ใ‚‹ไพ‹ใŒๆ›ธใ‹ใ‚Œใฆใ„ใพใ™ใŒใ€
Uncaught (in promise) TypeError: Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'.
ใŒ็™บ็”Ÿใ—ใพใ™ใ€‚

    const blob = new Blob(["Hello World!"], {
      type: 'text/plain'
    });

    const { fileKey } = await client.file.uploadFile({
      file: {
        name: "Hello.txt",
        data: blob
      }
    });

ใจ Blob ใ‚’ๆŒ‡ๅฎšใ—ใŸๅ ดๅˆใฏๅ•้กŒใ‚ใ‚Šใพใ›ใ‚“ใ€‚

้–ขไฟ‚ใฎใ‚ใ‚‹ใจๆ€ใ‚ใ‚Œใ‚‹ใ‚ฝใƒผใ‚นใ‚ณใƒผใƒ‰็ฎ‡ๆ‰€
https://github.com/kintone/js-sdk/blob/master/packages/rest-api-client/src/client/FileClient.ts#L41

kintone-cli ใ‚’ไฝฟ็”จใ—ใฆ TypeScript ใง ใ‚ซใ‚นใ‚ฟใƒžใ‚คใ‚บใ‚’ๅฎŸ่ฃ…ใ—ใฆใ„ใพใ™ใ€‚

  "dependencies": {
    "@kintone/kintone-ui-component": "^0.6.0",
    "@kintone/rest-api-client": "^1.2.0",
    "react": "^16.8.6",
    "react-dom": "^16.7.0"
  },
  "devDependencies": {
    "local-web-server": "^2.6.1",
    "webpack": "^4.30.0",
    "webpack-cli": "^3.2.3",
    "babel-loader": "^8.0.5",
    "style-loader": "^0.23.1",
    "css-loader": "^2.1.0",
    "core-js": "^3.2.1",
    "regenerator-runtime": "^0.13.3",
    "@babel/core": "^7.3.3",
    "@babel/preset-env": "^7.3.1",
    "@babel/plugin-proposal-class-properties": "^7.3.3",
    "@babel/plugin-syntax-dynamic-import": "^7.2.0",
    "@babel/preset-typescript": "^7.3.3",
    "@babel/preset-react": "^7.0.0",
    "typescript": "^3.6.3",
    "@types/react": "^16.8.16",
    "@types/react-dom": "^16.8.4",
    "@kintone/customize-uploader": "^2.0.5",
    "eslint": "^6.5.1",
    "@cybozu/eslint-config": ">=7.1.0"
  },

feat: addAllRecords

Motivation

The current limitation of addRecords (limited until 100 records) is inconvenient so we'd like to add a method to be able to exceed the limitation.

Overview

This method is to be able to add over 100 records to an app.
Here is the interface we plan.

const results = await this.client.record.addAllRecords({
  app: APP_ID,
  records
});

Description of return value types in the doc

Target Doc

Current Behavior

SUBTABLE field requires type and value.id

I generated type definition of SUBTABLE field.
The type and value.id properties are required, which makes them difficult to use.

  Table: {
    type: 'SUBTABLE';
    value: {
      id: string;
      value: {
        text1: kintone.fieldTypes.SingleLineText;
        text2: kintone.fieldTypes.SingleLineText;
      };
    }[];
  };

I wish the type and value.id properties were no longer required.

  Table: {
    type?: 'SUBTABLE';
    value: {
      id?: string;
      value: {
        text1: kintone.fieldTypes.SingleLineText;
        text2: kintone.fieldTypes.SingleLineText;
      };
    }[];
  };

feat: Support Proxy Server Configuration

Motivation

We want to use rest-api-client under the network using proxy server.

NOTE: This feature is available only in Node.js environment.

Overview

We haven't fixed the interface and need to discuss, but something like the following: The client can accept the proxy server configurations.

const client = new KintoneRestAPIClient({
  baseUrl: "https://example.cybozu.com",
  proxy: 'http://our-proxy-server:port',
  // ...
});

Or we can respect environment variables such as HTTP_PROXY / HTTPS_PROXY.

ref. https://github.com/googleapis/google-api-nodejs-client#using-a-proxy

feat: add a version property into KintoneRestAPIClient

Package

  • @kintone/rest-api-client

Why

for
I want to know which version a RestAPIClient is used from UMD builds.

e.g. React has a version property as React.version.

What

I have three options.
Personally, I prefer option 1.

  1. Add a version property as a static property
KintoneRestAPIClient.version
// "1.3.0"
  1. Add a version property as an instance property
const client = new KintoneRestAPIClient();
client.version;
// "1.3.0"
  1. Add a version as a source comment
// Version: 1.3.0

This should keep the comment even after minification for the production build.

feat: Support Client Certificate Authenticate

Motivation

We want to use rest-api-client for the subdomain in which Client Certificate Authentication is enabled

NOTE: This feature is available only in Node.js environment.

Overview

We haven't fixed the interface and need to discuss, but something like the following: The client can accept the client certificate file and its password.

const client = new KintoneRestAPIClient({
  baseUrl: "https://example.cybozu.com",
  auth: {
    clientCert: {
      file: fs.readFileSync('PATH_TO_CERT_FILE'), // or the path to certificate file
      password: 'PASSWORD'
    }
  }
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.