taiwan-logistics-skill 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,25 @@
1
+ {
2
+ "platform": "opencode",
3
+ "displayName": "OpenCode",
4
+ "installType": "full",
5
+ "folderStructure": {
6
+ "root": ".opencode",
7
+ "skillPath": "skills/taiwan-invoice",
8
+ "filename": "SKILL.md"
9
+ },
10
+ "scriptPath": "skills/taiwan-invoice/scripts",
11
+ "frontmatter": {
12
+ "name": "taiwan-invoice",
13
+ "description": "Taiwan E-Invoice API integration for ECPay, SmilePay, and Amego.",
14
+ "user-invocable": "true"
15
+ },
16
+ "sections": {
17
+ "examples": true,
18
+ "references": true,
19
+ "scripts": true,
20
+ "quickReference": false
21
+ },
22
+ "title": "Taiwan E-Invoice Skill",
23
+ "description": "Comprehensive guide for Taiwan E-Invoice API integration. Supports ECPay, SmilePay, and Amego providers with B2C/B2B invoice operations.",
24
+ "skillOrWorkflow": "Skill"
25
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "platform": "qoder",
3
+ "displayName": "Qoder",
4
+ "installType": "full",
5
+ "folderStructure": {
6
+ "root": ".qoder",
7
+ "skillPath": "skills/taiwan-invoice",
8
+ "filename": "SKILL.md"
9
+ },
10
+ "scriptPath": "skills/taiwan-invoice/scripts",
11
+ "frontmatter": {
12
+ "name": "taiwan-invoice",
13
+ "description": "Taiwan E-Invoice API integration for ECPay, SmilePay, and Amego.",
14
+ "user-invocable": "true"
15
+ },
16
+ "sections": {
17
+ "examples": true,
18
+ "references": true,
19
+ "scripts": true,
20
+ "quickReference": false
21
+ },
22
+ "title": "Taiwan E-Invoice Skill",
23
+ "description": "Comprehensive guide for Taiwan E-Invoice API integration. Supports ECPay, SmilePay, and Amego providers with B2C/B2B invoice operations.",
24
+ "skillOrWorkflow": "Skill"
25
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "platform": "roocode",
3
+ "displayName": "Roo Code",
4
+ "installType": "full",
5
+ "folderStructure": {
6
+ "root": ".roo",
7
+ "skillPath": "commands/taiwan-invoice",
8
+ "filename": "SKILL.md"
9
+ },
10
+ "scriptPath": "commands/taiwan-invoice/scripts",
11
+ "frontmatter": {
12
+ "name": "taiwan-invoice",
13
+ "description": "Taiwan E-Invoice API integration for ECPay, SmilePay, and Amego.",
14
+ "user-invocable": "true"
15
+ },
16
+ "sections": {
17
+ "examples": true,
18
+ "references": true,
19
+ "scripts": true,
20
+ "quickReference": false
21
+ },
22
+ "title": "Taiwan E-Invoice Skill",
23
+ "description": "Comprehensive guide for Taiwan E-Invoice API integration. Supports ECPay, SmilePay, and Amego providers with B2C/B2B invoice operations.",
24
+ "skillOrWorkflow": "Skill"
25
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "platform": "trae",
3
+ "displayName": "Trae",
4
+ "installType": "full",
5
+ "folderStructure": {
6
+ "root": ".trae",
7
+ "skillPath": "skills/taiwan-invoice",
8
+ "filename": "SKILL.md"
9
+ },
10
+ "scriptPath": "skills/taiwan-invoice/scripts",
11
+ "frontmatter": {
12
+ "name": "taiwan-invoice",
13
+ "description": "Taiwan E-Invoice API integration for ECPay, SmilePay, and Amego.",
14
+ "user-invocable": "true"
15
+ },
16
+ "sections": {
17
+ "examples": true,
18
+ "references": true,
19
+ "scripts": true,
20
+ "quickReference": false
21
+ },
22
+ "title": "Taiwan E-Invoice Skill",
23
+ "description": "Comprehensive guide for Taiwan E-Invoice API integration. Supports ECPay, SmilePay, and Amego providers with B2C/B2B invoice operations.",
24
+ "skillOrWorkflow": "Skill"
25
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "platform": "windsurf",
3
+ "displayName": "Windsurf",
4
+ "installType": "full",
5
+ "folderStructure": {
6
+ "root": ".windsurf",
7
+ "skillPath": "skills/taiwan-invoice",
8
+ "filename": "SKILL.md"
9
+ },
10
+ "scriptPath": "skills/taiwan-invoice/scripts",
11
+ "frontmatter": {
12
+ "name": "taiwan-invoice",
13
+ "description": "Taiwan E-Invoice API integration specialist for ECPay, SmilePay, and Amego. Provides B2C/B2B invoice issuance, void, allowance, query, and print functionality.",
14
+ "user-invocable": "true"
15
+ },
16
+ "sections": {
17
+ "examples": true,
18
+ "references": true,
19
+ "scripts": true,
20
+ "quickReference": false
21
+ },
22
+ "title": "Taiwan E-Invoice Skill",
23
+ "description": "Comprehensive guide for Taiwan E-Invoice API integration. Supports ECPay, SmilePay, and Amego providers with B2C/B2B invoice operations.",
24
+ "skillOrWorkflow": "Skill"
25
+ }
package/dist/index.js CHANGED
@@ -16058,9 +16058,57 @@ var logger = {
16058
16058
  success: (msg) => console.log(import_chalk.default.green("success"), msg),
16059
16059
  warn: (msg) => console.log(import_chalk.default.yellow("warn"), msg),
16060
16060
  error: (msg) => console.log(import_chalk.default.red("error"), msg),
16061
- title: (msg) => console.log(import_chalk.default.bold.cyan(`
16062
- ${msg}
16063
- `)),
16061
+ title: (msg) => {
16062
+ console.log();
16063
+ console.log(import_chalk.default.bold.red(" \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557") + import_chalk.default.bold.yellow(" \u2588\u2588\u2588\u2588\u2588\u2557 ") + import_chalk.default.bold.green(" \u2588\u2588\u2557") + import_chalk.default.bold.cyan(" \u2588\u2588\u2557 \u2588\u2588\u2557") + import_chalk.default.bold.blue(" \u2588\u2588\u2588\u2588\u2588\u2557 ") + import_chalk.default.bold.magenta(" \u2588\u2588\u2588\u2557 \u2588\u2588\u2557"));
16064
+ console.log(import_chalk.default.bold.red(" \u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D") + import_chalk.default.bold.yellow(" \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557") + import_chalk.default.bold.green(" \u2588\u2588\u2551") + import_chalk.default.bold.cyan(" \u2588\u2588\u2551 \u2588\u2588\u2551") + import_chalk.default.bold.blue(" \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557") + import_chalk.default.bold.magenta(" \u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551"));
16065
+ console.log(import_chalk.default.bold.red(" \u2588\u2588\u2551 ") + import_chalk.default.bold.yellow(" \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551") + import_chalk.default.bold.green(" \u2588\u2588\u2551") + import_chalk.default.bold.cyan(" \u2588\u2588\u2551 \u2588\u2557 \u2588\u2588\u2551") + import_chalk.default.bold.blue(" \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551") + import_chalk.default.bold.magenta(" \u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551"));
16066
+ console.log(import_chalk.default.bold.red(" \u2588\u2588\u2551 ") + import_chalk.default.bold.yellow(" \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551") + import_chalk.default.bold.green(" \u2588\u2588\u2551") + import_chalk.default.bold.cyan(" \u2588\u2588\u2551\u2588\u2588\u2588\u2557\u2588\u2588\u2551") + import_chalk.default.bold.blue(" \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551") + import_chalk.default.bold.magenta(" \u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551"));
16067
+ console.log(import_chalk.default.bold.red(" \u2588\u2588\u2551 ") + import_chalk.default.bold.yellow(" \u2588\u2588\u2551 \u2588\u2588\u2551") + import_chalk.default.bold.green(" \u2588\u2588\u2551") + import_chalk.default.bold.cyan(" \u255A\u2588\u2588\u2588\u2554\u2588\u2588\u2588\u2554\u255D") + import_chalk.default.bold.blue(" \u2588\u2588\u2551 \u2588\u2588\u2551") + import_chalk.default.bold.magenta(" \u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551"));
16068
+ console.log(import_chalk.default.bold.red(" \u255A\u2550\u255D ") + import_chalk.default.bold.yellow(" \u255A\u2550\u255D \u255A\u2550\u255D") + import_chalk.default.bold.green(" \u255A\u2550\u255D") + import_chalk.default.bold.cyan(" \u255A\u2550\u2550\u255D\u255A\u2550\u2550\u255D ") + import_chalk.default.bold.blue(" \u255A\u2550\u255D \u255A\u2550\u255D") + import_chalk.default.bold.magenta(" \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D"));
16069
+ console.log();
16070
+ console.log(import_chalk.default.bold.cyan(" \u7269\u6D41\u6574\u5408\u6280\u80FD\u5305"));
16071
+ console.log(import_chalk.default.bold.yellow(` ${msg}`));
16072
+ console.log();
16073
+ },
16074
+ box: (msg) => {
16075
+ const getVisualWidth = (str) => {
16076
+ let width = 0;
16077
+ for (const char of str) {
16078
+ const code = char.charCodeAt(0);
16079
+ if (code >= 19968 && code <= 40959 || // CJK Ideographs
16080
+ code >= 12288 && code <= 12351 || // CJK Symbols and Punctuation
16081
+ code >= 12352 && code <= 12447 || // Hiragana
16082
+ code >= 12448 && code <= 12543 || // Katakana
16083
+ code >= 44032 && code <= 55215 || // Hangul
16084
+ code >= 65280 && code <= 65519) {
16085
+ width += 2;
16086
+ } else {
16087
+ width += 1;
16088
+ }
16089
+ }
16090
+ return width;
16091
+ };
16092
+ const lines = msg.split("\n");
16093
+ const stripAnsi = (str) => str.replace(/\x1b\[[0-9;]*[a-zA-Z]/g, "");
16094
+ const maxWidth = Math.max(...lines.map((l) => getVisualWidth(stripAnsi(l))));
16095
+ const boxWidth = maxWidth + 2;
16096
+ console.log();
16097
+ console.log(import_chalk.default.green("\u256D" + "\u2500".repeat(boxWidth) + "\u256E"));
16098
+ const headerText = " \u5B8C\u6210 ";
16099
+ const headerWidth = getVisualWidth(headerText);
16100
+ const headerPadding = boxWidth - headerWidth;
16101
+ console.log(import_chalk.default.green("\u2502") + import_chalk.default.bold.green(headerText) + " ".repeat(headerPadding) + import_chalk.default.green("\u2502"));
16102
+ console.log(import_chalk.default.green("\u251C" + "\u2500".repeat(boxWidth) + "\u2524"));
16103
+ lines.forEach((line) => {
16104
+ const cleanLine = stripAnsi(line);
16105
+ const visualWidth = getVisualWidth(cleanLine);
16106
+ const padding = boxWidth - visualWidth - 2;
16107
+ console.log(import_chalk.default.green("\u2502 ") + line + " ".repeat(Math.max(0, padding)) + import_chalk.default.green(" \u2502"));
16108
+ });
16109
+ console.log(import_chalk.default.green("\u2570" + "\u2500".repeat(boxWidth) + "\u256F"));
16110
+ console.log();
16111
+ },
16064
16112
  dim: (msg) => console.log(import_chalk.default.dim(msg))
16065
16113
  };
16066
16114
 
@@ -16132,21 +16180,45 @@ async function initCommand(options) {
16132
16180
  if (detected.length > 0) {
16133
16181
  logger.info(`Detected: ${detected.map((t) => import_chalk3.default.cyan(t)).join(", ")}`);
16134
16182
  }
16135
- const response = await (0, import_prompts.default)({
16136
- type: "select",
16137
- name: "aiType",
16138
- message: "Select AI assistant to install for:",
16139
- choices: AI_TYPES.map((type) => ({
16140
- title: getAITypeDescription(type),
16141
- value: type
16142
- })),
16143
- initial: suggested ? AI_TYPES.indexOf(suggested) : 0
16144
- });
16183
+ const response = await (0, import_prompts.default)([
16184
+ {
16185
+ type: "select",
16186
+ name: "aiType",
16187
+ message: "\u4F60\u60F3\u88DD\u5728\u54EA\u500B AI \u52A9\u624B\uFF1F",
16188
+ choices: AI_TYPES.map((type) => ({
16189
+ title: getAITypeDescription(type),
16190
+ value: type
16191
+ })),
16192
+ initial: suggested ? AI_TYPES.indexOf(suggested) : 0
16193
+ },
16194
+ {
16195
+ type: (prev) => prev !== "all" && prev !== "windsurf" ? "toggle" : null,
16196
+ name: "global",
16197
+ message: "\u8981\u5168\u57DF\u5B89\u88DD\u55CE\uFF1F\uFF08\u6240\u6709\u5C08\u6848\u90FD\u80FD\u7528\uFF09",
16198
+ initial: false,
16199
+ active: "\u8981",
16200
+ inactive: "\u4E0D\u8981"
16201
+ },
16202
+ {
16203
+ type: "toggle",
16204
+ name: "force",
16205
+ message: "\u6A94\u6848\u5982\u679C\u5DF2\u7D93\u5B58\u5728\u8981\u8986\u84CB\u55CE\uFF1F",
16206
+ initial: false,
16207
+ active: "\u8981",
16208
+ inactive: "\u4E0D\u8981"
16209
+ }
16210
+ ]);
16145
16211
  if (!response.aiType) {
16146
16212
  logger.warn("Installation cancelled");
16147
16213
  return;
16148
16214
  }
16149
16215
  aiType = response.aiType;
16216
+ if (options.global === void 0 && response.global !== void 0) {
16217
+ options.global = response.global;
16218
+ }
16219
+ if (options.force === void 0 && response.force !== void 0) {
16220
+ options.force = response.force;
16221
+ }
16150
16222
  }
16151
16223
  let targetDir = process.cwd();
16152
16224
  if (options.global && aiType !== "all") {
@@ -16187,14 +16259,49 @@ async function initCommand(options) {
16187
16259
  console.log();
16188
16260
  logger.info("Installed folders:");
16189
16261
  copiedFolders.forEach((folder) => {
16190
- console.log(` ${import_chalk3.default.green("\u2713")} ${folder}`);
16262
+ console.log(` ${import_chalk3.default.green("\u25CF")} ${folder}`);
16191
16263
  });
16192
16264
  console.log();
16193
- logger.success("Taiwan Logistics Skill installed successfully!");
16265
+ logger.box(
16266
+ `\u53F0\u7063\u7269\u6D41\u6280\u80FD\u5305\u5B89\u88DD\u6210\u529F\uFF01
16267
+
16268
+ \u5DF2\u5B89\u88DD\u5230: ${import_chalk3.default.cyan(copiedFolders[0])}
16269
+
16270
+ \u4E0B\u4E00\u6B65\uFF1A
16271
+ 1. \u91CD\u65B0\u555F\u52D5\u4F60\u7684 AI \u52A9\u624B
16272
+ 2. \u8A66\u8A66\u770B\uFF1A\u300C\u5E6B\u6211\u6574\u5408\u7DA0\u754C\u7269\u6D41 API\u300D`
16273
+ );
16194
16274
  console.log();
16195
- console.log(import_chalk3.default.bold("Next steps:"));
16196
- console.log(import_chalk3.default.dim(" 1. Restart your AI coding assistant"));
16197
- console.log(import_chalk3.default.dim(' 2. Try: "Help me integrate ECPay logistics API"'));
16275
+ const tutorialResponse = await (0, import_prompts.default)({
16276
+ type: "toggle",
16277
+ name: "showTutorial",
16278
+ message: "\u8981\u770B\u5FEB\u901F\u4E0A\u624B\u6307\u5357\u55CE\uFF1F",
16279
+ initial: true,
16280
+ active: "\u8981",
16281
+ inactive: "\u4E0D\u7528"
16282
+ });
16283
+ if (tutorialResponse.showTutorial) {
16284
+ console.log();
16285
+ console.log(import_chalk3.default.bold.cyan("\u5FEB\u901F\u4E0A\u624B\u6307\u5357"));
16286
+ console.log();
16287
+ console.log(import_chalk3.default.yellow("\u652F\u63F4\u7684\u7269\u6D41\u5E73\u53F0\uFF1A"));
16288
+ console.log(import_chalk3.default.dim(" \u2022 \u7DA0\u754C\u7269\u6D41 (ECPay)"));
16289
+ console.log(import_chalk3.default.dim(" \u2022 \u85CD\u65B0\u7269\u6D41 (NewebPay)"));
16290
+ console.log(import_chalk3.default.dim(" \u2022 \u7D71\u4E00\u91D1\u6D41 (PayUni)"));
16291
+ console.log();
16292
+ console.log(import_chalk3.default.yellow("\u5E38\u898B\u4F7F\u7528\u7BC4\u4F8B\uFF1A"));
16293
+ console.log(import_chalk3.default.dim(" 1. \u300C\u5E6B\u6211\u6574\u5408\u7DA0\u754C\u8D85\u5546\u53D6\u8CA8 API\u300D"));
16294
+ console.log(import_chalk3.default.dim(" 2. \u300C\u6211\u8981\u5BE6\u4F5C\u7269\u6D41\u8A02\u55AE\u67E5\u8A62\u529F\u80FD\u300D"));
16295
+ console.log(import_chalk3.default.dim(" 3. \u300C\u7522\u751F\u7269\u6D41 B2C \u5BC4\u4EF6\u55AE\u300D"));
16296
+ console.log();
16297
+ console.log(import_chalk3.default.yellow("\u6280\u80FD\u5305\u5167\u5BB9\uFF1A"));
16298
+ console.log(import_chalk3.default.dim(" \u2022 API \u6587\u4EF6\u53C3\u8003 (references/)"));
16299
+ console.log(import_chalk3.default.dim(" \u2022 \u7A0B\u5F0F\u78BC\u7BC4\u4F8B (EXAMPLES.md)"));
16300
+ console.log(import_chalk3.default.dim(" \u2022 \u6E2C\u8A66\u5DE5\u5177 (scripts/)"));
16301
+ console.log();
16302
+ console.log(import_chalk3.default.green("\u63D0\u793A\uFF1A\u91CD\u555F AI \u52A9\u624B\u5F8C\uFF0C\u76F4\u63A5\u7528\u4E2D\u6587\u63CF\u8FF0\u4F60\u8981\u505A\u4EC0\u9EBC\u5C31\u53EF\u4EE5\u4E86\uFF01"));
16303
+ console.log();
16304
+ }
16198
16305
  console.log();
16199
16306
  } catch (error) {
16200
16307
  logger.error("Installation failed");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taiwan-logistics-skill",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "CLI to install Taiwan Logistics skill for AI coding assistants",
5
5
  "bin": {
6
6
  "taiwan-logistics": "./dist/index.js"