@apps-in-toss/cli 2.2.0 → 2.4.0

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.
package/dist/index.cjs CHANGED
@@ -1424,7 +1424,7 @@ var BuildCommand = class extends import_clipanion.Command {
1424
1424
  static paths = [["build"]];
1425
1425
  static usage = import_clipanion.Command.Usage({
1426
1426
  category: "Build",
1427
- description: "Build Apps In Toss artifact",
1427
+ description: "\uC571\uC778\uD1A0\uC2A4 \uBC30\uD3EC\uC6A9 .ait \uC544\uD2F0\uD329\uD2B8\uB97C \uBE4C\uB4DC\uD569\uB2C8\uB2E4.",
1428
1428
  examples: [["Build artifact", "ait build"]]
1429
1429
  });
1430
1430
  async execute() {
@@ -1582,7 +1582,8 @@ function uploadStart() {
1582
1582
  Authorization: `Bearer ${config.apiKey}`
1583
1583
  },
1584
1584
  body: JSON.stringify({
1585
- deploymentId: config.deploymentId
1585
+ deploymentId: config.deploymentId,
1586
+ memo: config.memo
1586
1587
  })
1587
1588
  });
1588
1589
  return {
@@ -1668,6 +1669,17 @@ function checkBundleStatus(delayMs = 1e4, maxRetries = 10) {
1668
1669
  // src/DeployCommand.ts
1669
1670
  var DeployCommand = class extends import_clipanion2.Command {
1670
1671
  static paths = [["deploy"]];
1672
+ static usage = import_clipanion2.Command.Usage({
1673
+ category: "Deploy",
1674
+ description: "\uBE4C\uB4DC\uB41C .ait \uC544\uD2F0\uD329\uD2B8\uB97C \uC571\uC778\uD1A0\uC2A4\uC5D0 \uC5C5\uB85C\uB4DC(\uBC30\uD3EC)\uD569\uB2C8\uB2E4.",
1675
+ examples: [
1676
+ ["\uAE30\uBCF8 \uC544\uD2F0\uD329\uD2B8(.ait) \uBC30\uD3EC", "ait deploy"],
1677
+ ["\uD2B9\uC815 .ait \uD30C\uC77C \uBC30\uD3EC", "ait deploy --location ./dist/my-app.ait"],
1678
+ ["\uD504\uB85C\uD544\uC5D0 \uC800\uC7A5\uB41C \uD1A0\uD070\uC73C\uB85C \uBC30\uD3EC", "ait deploy --profile dev"],
1679
+ ["\uCD9C\uC2DC \uBA54\uBAA8\uC640 \uD568\uAED8 \uBC30\uD3EC", 'ait deploy -m "\uCD9C\uC2DC \uBA54\uBAA8(\uCD5C\uB300 1000\uC790)"'],
1680
+ ["\uBC30\uD3EC \uACB0\uACFC scheme\uB9CC \uCD9C\uB825", "ait deploy --scheme-only"]
1681
+ ]
1682
+ });
1671
1683
  apiKey = import_clipanion2.Option.String("--api-key", {
1672
1684
  required: false,
1673
1685
  description: "\uBC30\uD3EC\uB97C \uC704\uD55C API \uD0A4\uC785\uB2C8\uB2E4. \uBA85\uC2DC\uC801\uC73C\uB85C \uC774 \uC635\uC158\uC73C\uB85C api key\uB97C \uC9C1\uC811 \uC785\uB825\uD558\uAC70\uB098, --profile \uC635\uC158\uC744 \uC0AC\uC6A9\uD574\uC11C \uD504\uB85C\uD544\uC744 \uC9C0\uC815\uD558\uBA74 \uD504\uB85C\uD544\uC5D0 \uB4F1\uB85D\uB41C api key\uB97C \uC0AC\uC6A9\uD574\uC694."
@@ -1692,6 +1704,10 @@ var DeployCommand = class extends import_clipanion2.Command {
1692
1704
  required: false,
1693
1705
  description: "\uBC30\uD3EC \uACB0\uACFC\uB97C intoss-private scheme\uB9CC \uCD9C\uB825\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC694. \uAE30\uBCF8\uAC12\uC740 false\uC608\uC694."
1694
1706
  });
1707
+ memo = import_clipanion2.Option.String("-m,--memo", {
1708
+ required: false,
1709
+ description: "\uCD9C\uC2DC \uBA54\uBAA8\uB97C \uC785\uB825\uD574\uC694. \uCD5C\uB300 1000\uC790\uAE4C\uC9C0 \uC785\uB825\uD560 \uC218 \uC788\uC5B4\uC694."
1710
+ });
1695
1711
  async execute() {
1696
1712
  const baseUrl = this.baseUrl;
1697
1713
  const profile = this.profile || this.workspace || "default";
@@ -1703,6 +1719,9 @@ var DeployCommand = class extends import_clipanion2.Command {
1703
1719
  return;
1704
1720
  }
1705
1721
  try {
1722
+ if (this.memo != null && this.memo.length > 1e3) {
1723
+ throw new Error("memo\uB294 \uCD5C\uB300 1000\uC790\uAE4C\uC9C0 \uC785\uB825\uD560 \uC218 \uC788\uC5B4\uC694.");
1724
+ }
1706
1725
  const resolvedArtifactPath = this.getArtifactPath(this.location);
1707
1726
  const buffer = import_fs3.default.readFileSync(resolvedArtifactPath);
1708
1727
  const format = import_ait_format.AppsInTossBundle.detect(buffer);
@@ -1743,6 +1762,7 @@ var DeployCommand = class extends import_clipanion2.Command {
1743
1762
  appName,
1744
1763
  deploymentId,
1745
1764
  apiKey,
1765
+ memo: this.memo,
1746
1766
  baseUrl
1747
1767
  });
1748
1768
  } else {
@@ -1755,6 +1775,7 @@ var DeployCommand = class extends import_clipanion2.Command {
1755
1775
  appName,
1756
1776
  deploymentId,
1757
1777
  apiKey,
1778
+ memo: this.memo,
1758
1779
  baseUrl
1759
1780
  });
1760
1781
  return `${colorAppName} \uBC30\uD3EC\uAC00 \uC644\uB8CC\uB418\uC5C8\uC5B4\uC694`;
@@ -2015,8 +2036,23 @@ async function templateReactNative({ appName, cwd }) {
2015
2036
  }
2016
2037
  var InitCommand = class extends import_clipanion3.Command {
2017
2038
  static paths = [[`init`]];
2018
- template = import_clipanion3.Option.String("--template", { required: false });
2019
- appName = import_clipanion3.Option.String("--app-name", { required: false });
2039
+ static usage = import_clipanion3.Command.Usage({
2040
+ category: "Setup",
2041
+ description: "\uC571\uC778\uD1A0\uC2A4 \uD504\uB85C\uC81D\uD2B8 \uAC1C\uBC1C/\uBC30\uD3EC \uC124\uC815\uC744 \uCD08\uAE30\uD654\uD569\uB2C8\uB2E4.",
2042
+ examples: [
2043
+ ["\uB300\uD654\uD615\uC73C\uB85C \uCD08\uAE30\uD654", "ait init"],
2044
+ ["\uC6F9 \uD504\uB808\uC784\uC6CC\uD06C \uD15C\uD50C\uB9BF\uC73C\uB85C \uCD08\uAE30\uD654", "ait init --template web-framework --app-name my-miniapp"],
2045
+ ["RN(Granite) \uD15C\uD50C\uB9BF\uC73C\uB85C \uCD08\uAE30\uD654", "ait init --template react-native --app-name my-miniapp"]
2046
+ ]
2047
+ });
2048
+ template = import_clipanion3.Option.String("--template", {
2049
+ required: false,
2050
+ description: "\uCD08\uAE30\uD654 \uD15C\uD50C\uB9BF\uC744 \uC9C0\uC815\uD574\uC694. (web-framework | react-native)"
2051
+ });
2052
+ appName = import_clipanion3.Option.String("--app-name", {
2053
+ required: false,
2054
+ description: "\uC571 \uC774\uB984(\uCF00\uBC25-\uCF00\uC774\uC2A4)\uC744 \uC9C0\uC815\uD574\uC694. \uC608) my-miniapp"
2055
+ });
2020
2056
  skipInput = import_clipanion3.Option.Boolean("--skip-input", { required: false, hidden: true });
2021
2057
  async execute() {
2022
2058
  const template = await ensureSelect({
@@ -2882,6 +2918,7 @@ var debug3 = (0, import_debug3.default)("cli:token");
2882
2918
  var TokenCommand = class extends import_clipanion5.Command {
2883
2919
  static paths = [["token"]];
2884
2920
  static usage = import_clipanion5.Command.Usage({
2921
+ category: "Auth",
2885
2922
  description: "\uD1A0\uD070 \uAD00\uB828 \uD558\uC704 \uBA85\uB839\uC744 \uAD00\uB9AC\uD569\uB2C8\uB2E4.",
2886
2923
  examples: [
2887
2924
  ["\uD1A0\uD070 \uCD94\uAC00", "ait token add <profile?>"],
@@ -2895,6 +2932,7 @@ var TokenCommand = class extends import_clipanion5.Command {
2895
2932
  var TokenAddCommand = class extends import_clipanion5.Command {
2896
2933
  static paths = [["token", "add"]];
2897
2934
  static usage = import_clipanion5.Command.Usage({
2935
+ category: "Auth",
2898
2936
  description: "\uC2DC\uD06C\uB9BF \uD1A0\uD070\uC744 \uCD94\uAC00\uD569\uB2C8\uB2E4.",
2899
2937
  examples: [
2900
2938
  ["\uAE30\uBCF8 \uBCC4\uCE6D\uC73C\uB85C \uD1A0\uD070 \uCD94\uAC00", "ait token add"],
@@ -2926,6 +2964,7 @@ var TokenAddCommand = class extends import_clipanion5.Command {
2926
2964
  var TokenRemoveCommand = class extends import_clipanion5.Command {
2927
2965
  static paths = [["token", "remove"]];
2928
2966
  static usage = import_clipanion5.Command.Usage({
2967
+ category: "Auth",
2929
2968
  description: "\uC2DC\uD06C\uB9BF \uD1A0\uD070\uC744 \uC0AD\uC81C\uD569\uB2C8\uB2E4.",
2930
2969
  examples: [
2931
2970
  ["\uAE30\uBCF8 \uC6CC\uD06C\uC2A4\uD398\uC774\uC2A4\uC758 \uD1A0\uD070 \uC0AD\uC81C", "ait token remove"],
package/dist/index.js CHANGED
@@ -1416,7 +1416,7 @@ var BuildCommand = class extends Command {
1416
1416
  static paths = [["build"]];
1417
1417
  static usage = Command.Usage({
1418
1418
  category: "Build",
1419
- description: "Build Apps In Toss artifact",
1419
+ description: "\uC571\uC778\uD1A0\uC2A4 \uBC30\uD3EC\uC6A9 .ait \uC544\uD2F0\uD329\uD2B8\uB97C \uBE4C\uB4DC\uD569\uB2C8\uB2E4.",
1420
1420
  examples: [["Build artifact", "ait build"]]
1421
1421
  });
1422
1422
  async execute() {
@@ -1574,7 +1574,8 @@ function uploadStart() {
1574
1574
  Authorization: `Bearer ${config.apiKey}`
1575
1575
  },
1576
1576
  body: JSON.stringify({
1577
- deploymentId: config.deploymentId
1577
+ deploymentId: config.deploymentId,
1578
+ memo: config.memo
1578
1579
  })
1579
1580
  });
1580
1581
  return {
@@ -1660,6 +1661,17 @@ function checkBundleStatus(delayMs = 1e4, maxRetries = 10) {
1660
1661
  // src/DeployCommand.ts
1661
1662
  var DeployCommand = class extends Command2 {
1662
1663
  static paths = [["deploy"]];
1664
+ static usage = Command2.Usage({
1665
+ category: "Deploy",
1666
+ description: "\uBE4C\uB4DC\uB41C .ait \uC544\uD2F0\uD329\uD2B8\uB97C \uC571\uC778\uD1A0\uC2A4\uC5D0 \uC5C5\uB85C\uB4DC(\uBC30\uD3EC)\uD569\uB2C8\uB2E4.",
1667
+ examples: [
1668
+ ["\uAE30\uBCF8 \uC544\uD2F0\uD329\uD2B8(.ait) \uBC30\uD3EC", "ait deploy"],
1669
+ ["\uD2B9\uC815 .ait \uD30C\uC77C \uBC30\uD3EC", "ait deploy --location ./dist/my-app.ait"],
1670
+ ["\uD504\uB85C\uD544\uC5D0 \uC800\uC7A5\uB41C \uD1A0\uD070\uC73C\uB85C \uBC30\uD3EC", "ait deploy --profile dev"],
1671
+ ["\uCD9C\uC2DC \uBA54\uBAA8\uC640 \uD568\uAED8 \uBC30\uD3EC", 'ait deploy -m "\uCD9C\uC2DC \uBA54\uBAA8(\uCD5C\uB300 1000\uC790)"'],
1672
+ ["\uBC30\uD3EC \uACB0\uACFC scheme\uB9CC \uCD9C\uB825", "ait deploy --scheme-only"]
1673
+ ]
1674
+ });
1663
1675
  apiKey = Option.String("--api-key", {
1664
1676
  required: false,
1665
1677
  description: "\uBC30\uD3EC\uB97C \uC704\uD55C API \uD0A4\uC785\uB2C8\uB2E4. \uBA85\uC2DC\uC801\uC73C\uB85C \uC774 \uC635\uC158\uC73C\uB85C api key\uB97C \uC9C1\uC811 \uC785\uB825\uD558\uAC70\uB098, --profile \uC635\uC158\uC744 \uC0AC\uC6A9\uD574\uC11C \uD504\uB85C\uD544\uC744 \uC9C0\uC815\uD558\uBA74 \uD504\uB85C\uD544\uC5D0 \uB4F1\uB85D\uB41C api key\uB97C \uC0AC\uC6A9\uD574\uC694."
@@ -1684,6 +1696,10 @@ var DeployCommand = class extends Command2 {
1684
1696
  required: false,
1685
1697
  description: "\uBC30\uD3EC \uACB0\uACFC\uB97C intoss-private scheme\uB9CC \uCD9C\uB825\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC694. \uAE30\uBCF8\uAC12\uC740 false\uC608\uC694."
1686
1698
  });
1699
+ memo = Option.String("-m,--memo", {
1700
+ required: false,
1701
+ description: "\uCD9C\uC2DC \uBA54\uBAA8\uB97C \uC785\uB825\uD574\uC694. \uCD5C\uB300 1000\uC790\uAE4C\uC9C0 \uC785\uB825\uD560 \uC218 \uC788\uC5B4\uC694."
1702
+ });
1687
1703
  async execute() {
1688
1704
  const baseUrl = this.baseUrl;
1689
1705
  const profile = this.profile || this.workspace || "default";
@@ -1695,6 +1711,9 @@ var DeployCommand = class extends Command2 {
1695
1711
  return;
1696
1712
  }
1697
1713
  try {
1714
+ if (this.memo != null && this.memo.length > 1e3) {
1715
+ throw new Error("memo\uB294 \uCD5C\uB300 1000\uC790\uAE4C\uC9C0 \uC785\uB825\uD560 \uC218 \uC788\uC5B4\uC694.");
1716
+ }
1698
1717
  const resolvedArtifactPath = this.getArtifactPath(this.location);
1699
1718
  const buffer = fs8.readFileSync(resolvedArtifactPath);
1700
1719
  const format = AppsInTossBundle.detect(buffer);
@@ -1735,6 +1754,7 @@ var DeployCommand = class extends Command2 {
1735
1754
  appName,
1736
1755
  deploymentId,
1737
1756
  apiKey,
1757
+ memo: this.memo,
1738
1758
  baseUrl
1739
1759
  });
1740
1760
  } else {
@@ -1747,6 +1767,7 @@ var DeployCommand = class extends Command2 {
1747
1767
  appName,
1748
1768
  deploymentId,
1749
1769
  apiKey,
1770
+ memo: this.memo,
1750
1771
  baseUrl
1751
1772
  });
1752
1773
  return `${colorAppName} \uBC30\uD3EC\uAC00 \uC644\uB8CC\uB418\uC5C8\uC5B4\uC694`;
@@ -2007,8 +2028,23 @@ async function templateReactNative({ appName, cwd }) {
2007
2028
  }
2008
2029
  var InitCommand = class extends Command3 {
2009
2030
  static paths = [[`init`]];
2010
- template = Option2.String("--template", { required: false });
2011
- appName = Option2.String("--app-name", { required: false });
2031
+ static usage = Command3.Usage({
2032
+ category: "Setup",
2033
+ description: "\uC571\uC778\uD1A0\uC2A4 \uD504\uB85C\uC81D\uD2B8 \uAC1C\uBC1C/\uBC30\uD3EC \uC124\uC815\uC744 \uCD08\uAE30\uD654\uD569\uB2C8\uB2E4.",
2034
+ examples: [
2035
+ ["\uB300\uD654\uD615\uC73C\uB85C \uCD08\uAE30\uD654", "ait init"],
2036
+ ["\uC6F9 \uD504\uB808\uC784\uC6CC\uD06C \uD15C\uD50C\uB9BF\uC73C\uB85C \uCD08\uAE30\uD654", "ait init --template web-framework --app-name my-miniapp"],
2037
+ ["RN(Granite) \uD15C\uD50C\uB9BF\uC73C\uB85C \uCD08\uAE30\uD654", "ait init --template react-native --app-name my-miniapp"]
2038
+ ]
2039
+ });
2040
+ template = Option2.String("--template", {
2041
+ required: false,
2042
+ description: "\uCD08\uAE30\uD654 \uD15C\uD50C\uB9BF\uC744 \uC9C0\uC815\uD574\uC694. (web-framework | react-native)"
2043
+ });
2044
+ appName = Option2.String("--app-name", {
2045
+ required: false,
2046
+ description: "\uC571 \uC774\uB984(\uCF00\uBC25-\uCF00\uC774\uC2A4)\uC744 \uC9C0\uC815\uD574\uC694. \uC608) my-miniapp"
2047
+ });
2012
2048
  skipInput = Option2.Boolean("--skip-input", { required: false, hidden: true });
2013
2049
  async execute() {
2014
2050
  const template = await ensureSelect({
@@ -2874,6 +2910,7 @@ var debug3 = (0, import_debug3.default)("cli:token");
2874
2910
  var TokenCommand = class extends Command5 {
2875
2911
  static paths = [["token"]];
2876
2912
  static usage = Command5.Usage({
2913
+ category: "Auth",
2877
2914
  description: "\uD1A0\uD070 \uAD00\uB828 \uD558\uC704 \uBA85\uB839\uC744 \uAD00\uB9AC\uD569\uB2C8\uB2E4.",
2878
2915
  examples: [
2879
2916
  ["\uD1A0\uD070 \uCD94\uAC00", "ait token add <profile?>"],
@@ -2887,6 +2924,7 @@ var TokenCommand = class extends Command5 {
2887
2924
  var TokenAddCommand = class extends Command5 {
2888
2925
  static paths = [["token", "add"]];
2889
2926
  static usage = Command5.Usage({
2927
+ category: "Auth",
2890
2928
  description: "\uC2DC\uD06C\uB9BF \uD1A0\uD070\uC744 \uCD94\uAC00\uD569\uB2C8\uB2E4.",
2891
2929
  examples: [
2892
2930
  ["\uAE30\uBCF8 \uBCC4\uCE6D\uC73C\uB85C \uD1A0\uD070 \uCD94\uAC00", "ait token add"],
@@ -2918,6 +2956,7 @@ var TokenAddCommand = class extends Command5 {
2918
2956
  var TokenRemoveCommand = class extends Command5 {
2919
2957
  static paths = [["token", "remove"]];
2920
2958
  static usage = Command5.Usage({
2959
+ category: "Auth",
2921
2960
  description: "\uC2DC\uD06C\uB9BF \uD1A0\uD070\uC744 \uC0AD\uC81C\uD569\uB2C8\uB2E4.",
2922
2961
  examples: [
2923
2962
  ["\uAE30\uBCF8 \uC6CC\uD06C\uC2A4\uD398\uC774\uC2A4\uC758 \uD1A0\uD070 \uC0AD\uC81C", "ait token remove"],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@apps-in-toss/cli",
3
3
  "type": "module",
4
- "version": "2.2.0",
4
+ "version": "2.4.0",
5
5
  "description": "CLI for Apps In Toss",
6
6
  "scripts": {
7
7
  "typecheck": "tsc --noEmit",
@@ -43,8 +43,8 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@apps-in-toss/ait-format": "1.0.0",
46
- "@apps-in-toss/plugins": "2.2.0",
47
- "@apps-in-toss/web-config": "2.2.0",
46
+ "@apps-in-toss/plugins": "2.4.0",
47
+ "@apps-in-toss/web-config": "2.4.0",
48
48
  "@clack/prompts": "^0.10.0",
49
49
  "@granite-js/utils": "1.0.10",
50
50
  "@sentry/cli": "^2.46.0",