Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cucumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const config = {
requireModule: ["ts-node/register"],
require: ["features/supports/**/*.ts", "features/step_definitions/**/*.ts"],
parallel: 10,
tags: "not @skip",
},
};
module.exports = config;
Binary file added features/assets/plugin_with_issues/image/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions features/assets/plugin_with_issues/js/desktop.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(function () {
// This code uses internal APIs that should be detected
const data = cybozu.data;
console.log(data);

// This code uses internal CSS selectors that should be detected
document.querySelector(".gaia-argoui-button");
document.querySelector(".ocean-ui-dialog");
})();
15 changes: 15 additions & 0 deletions features/assets/plugin_with_issues/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"manifest_version": 1,
"version": 1,
"type": "APP",
"name": {
"en": "test-plugin"
},
"description": {
"en": "Test plugin for E2E testing"
},
"icon": "image/icon.png",
"desktop": {
"js": ["js/desktop.js"]
}
}
51 changes: 51 additions & 0 deletions features/plugin/check.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
@isolated
@plugin-check
Feature: plugin check

Scenario: Show error message when running on standalone binary
Given An asset with key "plugin_project" is available as "src"
When I run the command with args "plugin check --input ./src/manifest.json"
Then I should get the exit code is non-zero
And The output error message should match with the pattern: "not available in the standalone binary version"

# The following scenarios require npm version of cli-kintone.
# They are skipped in E2E tests because E2E tests use standalone binary.

@skip
Scenario: Check a plugin with no issues
Given An asset with key "plugin_project" is available as "src"
When I run the command with args "plugin check --input ./src/manifest.json"
Then I should get the exit code is zero
And The output message should match with the pattern:
"""
Files checked: 3
Problems: 0
"""

@skip
Scenario: Check a plugin with issues
Given An asset with key "plugin_with_issues" is available as "src"
When I run the command with args "plugin check --input ./src/manifest.json"
Then I should get the exit code is zero
And The output message should match with the pattern: "cybozu.data"
And The output message should match with the pattern: "gaia-argoui-"
And The output message should match with the pattern: "Problems: 3"

@skip
Scenario: Check a plugin with JSON format output
Given An asset with key "plugin_with_issues" is available as "src"
When I run the command with args "plugin check --input ./src/manifest.json --format json"
Then I should get the exit code is zero
And The output message should match with the pattern: "\"errorCount\": 3"

@skip
Scenario: Check a plugin zip file
Given An asset with key "plugin_chjjmgadianhfiopehkbjlfkfioglafk_v1.zip" is available as "plugin.zip"
When I run the command with args "plugin check --input ./plugin.zip"
Then I should get the exit code is zero
And The output message should match with the pattern: "Files checked:"

Scenario: Input file is not specified
When I run the command with args "plugin check"
Then I should get the exit code is non-zero
And The output error message should match with the pattern: "Missing required argument: input"
1 change: 1 addition & 0 deletions features/step_definitions/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const assetsRootPath = path.resolve(__dirname, "..", "assets");
*/
const assetMap: Record<string, string | undefined> = {
plugin_project: path.resolve(assetsRootPath, "plugin_project"),
plugin_with_issues: path.resolve(assetsRootPath, "plugin_with_issues"),
"plugin_chjjmgadianhfiopehkbjlfkfioglafk_v1.zip": path.resolve(
assetsRootPath,
"plugin_chjjmgadianhfiopehkbjlfkfioglafk_v1.zip",
Expand Down
16 changes: 16 additions & 0 deletions license-manager.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,22 @@ const OVERRIDE_LICENSES_TEXT = {
licensePageUrl:
"https://raw.githubusercontent.com/komagata/eastasianwidth/master/MIT-LICENSE.txt",
},
imurmurhash: {
// License text is written in README.md
licenseText: "See https://github.com/jensyt/imurmurhash-js#license-mit",
},
keyv: {
licensePageUrl:
"https://raw.githubusercontent.com/jaredwray/keyv/refs/heads/main/LICENSE",
},
"natural-compare": {
// License text is written in README.md
licenseText: "See https://github.com/litejs/natural-compare-lite#licence",
},
esrecurse: {
licensePageUrl:
"https://raw.githubusercontent.com/estools/esrecurse/refs/heads/master/LICENSE.md",
},
};

module.exports = config;
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"build:artifacts": "run-s clean:artifacts build:executables license:analyze license:extract compress",
"build:executables": "run-s build:ncc package",
"build:tsc": "tsc --build ./tsconfig.build.json",
"build:ncc": "ncc build ./src/cli/main.ts -m",
"build:ncc": "ncc build ./src/cli/main.ts -m -e eslint -e @kintone/eslint-plugin",
"package": "mkdirp ./bin && pkg --sea ./dist/index.js -o ./bin/cli-kintone -t linux-x64,macos-arm64,win-x64",
"license:analyze": "license-manager analyze -c license-manager.config.js",
"license:extract": "license-manager extract -c license-manager.config.js -w .",
Expand Down Expand Up @@ -102,12 +102,14 @@
},
"dependencies": {
"@inquirer/prompts": "^7.10.1",
"@kintone/eslint-plugin": "^0.1.1",
"@kintone/plugin-manifest-validator": "^11.1.0",
"@kintone/rest-api-client": "^6.1.2",
"chalk": "4.1.2",
"chokidar": "^4.0.3",
"csv-parse": "^5.6.0",
"csv-stringify": "6.5.2",
"eslint": "^9.38.0",
"https-proxy-agent": "^7.0.6",
Comment on lines 103 to 113
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eslint is now listed in both devDependencies and dependencies (with different ranges). This can lead to duplicate installs and version skew between development and runtime. Since plugin check needs ESLint at runtime, consider keeping a single entry (typically in dependencies) and aligning/removing the devDependency version.

Copilot uses AI. Check for mistakes.
"iconv-lite": "^0.7.2",
"node-rsa": "^1.1.1",
Expand Down
Loading
Loading