@apps-in-toss/web-framework 0.0.0-dev.1752115036458 → 0.0.0-dev.1754906858438

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/cli/index.js CHANGED
@@ -57729,21 +57729,21 @@ var Te = async (t2) => {
57729
57729
  };
57730
57730
 
57731
57731
  // src/cli/commands/BuildCommand.ts
57732
- import { getPackageRoot as getPackageRoot4 } from "@granite-js/utils";
57732
+ import { getPackageRoot as getPackageRoot4 } from "@react-native-bedrock/utils";
57733
57733
 
57734
57734
  // src/config/loadConfig.ts
57735
57735
  init_esm_shims();
57736
57736
  var import_cosmiconfig = __toESM(require_dist(), 1);
57737
- import { getPackageRoot } from "@granite-js/utils";
57737
+ import { getPackageRoot } from "@react-native-bedrock/utils";
57738
57738
 
57739
- // ../../.yarn/__virtual__/cosmiconfig-typescript-loader-virtual-2f1fb2d612/0/cache/cosmiconfig-typescript-loader-npm-5.1.0-81c399fbcb-9c87ade7b0.zip/node_modules/cosmiconfig-typescript-loader/dist/esm/index.mjs
57739
+ // ../../.yarn/__virtual__/cosmiconfig-typescript-loader-virtual-edd09e5a57/0/cache/cosmiconfig-typescript-loader-npm-5.1.0-81c399fbcb-9c87ade7b0.zip/node_modules/cosmiconfig-typescript-loader/dist/esm/index.mjs
57740
57740
  init_esm_shims();
57741
57741
 
57742
- // ../../.yarn/__virtual__/cosmiconfig-typescript-loader-virtual-2f1fb2d612/0/cache/cosmiconfig-typescript-loader-npm-5.1.0-81c399fbcb-9c87ade7b0.zip/node_modules/cosmiconfig-typescript-loader/dist/esm/loader.mjs
57742
+ // ../../.yarn/__virtual__/cosmiconfig-typescript-loader-virtual-edd09e5a57/0/cache/cosmiconfig-typescript-loader-npm-5.1.0-81c399fbcb-9c87ade7b0.zip/node_modules/cosmiconfig-typescript-loader/dist/esm/loader.mjs
57743
57743
  init_esm_shims();
57744
57744
  var import_jiti = __toESM(require_lib4(), 1);
57745
57745
 
57746
- // ../../.yarn/__virtual__/cosmiconfig-typescript-loader-virtual-2f1fb2d612/0/cache/cosmiconfig-typescript-loader-npm-5.1.0-81c399fbcb-9c87ade7b0.zip/node_modules/cosmiconfig-typescript-loader/dist/esm/typescript-compile-error.mjs
57746
+ // ../../.yarn/__virtual__/cosmiconfig-typescript-loader-virtual-edd09e5a57/0/cache/cosmiconfig-typescript-loader-npm-5.1.0-81c399fbcb-9c87ade7b0.zip/node_modules/cosmiconfig-typescript-loader/dist/esm/typescript-compile-error.mjs
57747
57747
  init_esm_shims();
57748
57748
  var TypeScriptCompileError = class _TypeScriptCompileError extends Error {
57749
57749
  constructor(message) {
@@ -57760,7 +57760,7 @@ ${error.message}`;
57760
57760
  }
57761
57761
  };
57762
57762
 
57763
- // ../../.yarn/__virtual__/cosmiconfig-typescript-loader-virtual-2f1fb2d612/0/cache/cosmiconfig-typescript-loader-npm-5.1.0-81c399fbcb-9c87ade7b0.zip/node_modules/cosmiconfig-typescript-loader/dist/esm/loader.mjs
57763
+ // ../../.yarn/__virtual__/cosmiconfig-typescript-loader-virtual-edd09e5a57/0/cache/cosmiconfig-typescript-loader-npm-5.1.0-81c399fbcb-9c87ade7b0.zip/node_modules/cosmiconfig-typescript-loader/dist/esm/loader.mjs
57764
57764
  function TypeScriptLoader(options) {
57765
57765
  const loader = (0, import_jiti.default)("", { interopDefault: true, ...options });
57766
57766
  return (path9) => {
@@ -57778,8 +57778,8 @@ function TypeScriptLoader(options) {
57778
57778
 
57779
57779
  // src/config/loadConfig.ts
57780
57780
  var loadConfig = async () => {
57781
- const explorer = (0, import_cosmiconfig.cosmiconfig)("granite", {
57782
- searchPlaces: ["granite.config.ts", "granite.config.mts", "granite.config.js", "granite.config.cjs"],
57781
+ const explorer = (0, import_cosmiconfig.cosmiconfig)("bedrock", {
57782
+ searchPlaces: ["bedrock.config.ts", "bedrock.config.mts", "bedrock.config.js", "bedrock.config.cjs"],
57783
57783
  loaders: {
57784
57784
  ".ts": TypeScriptLoader(),
57785
57785
  ".mts": TypeScriptLoader()
@@ -57796,7 +57796,7 @@ import fs2 from "fs";
57796
57796
  import path7 from "path";
57797
57797
  import { fileURLToPath as fileURLToPath3 } from "url";
57798
57798
  import { transform } from "@babel/core";
57799
- import { getPackageRoot as getPackageRoot3 } from "@granite-js/utils";
57799
+ import { getPackageRoot as getPackageRoot3 } from "@react-native-bedrock/utils";
57800
57800
 
57801
57801
  // ../../.yarn/cache/es-toolkit-npm-1.32.0-019fc7c155-56ba965570.zip/node_modules/es-toolkit/dist/index.mjs
57802
57802
  init_esm_shims();
@@ -58164,7 +58164,7 @@ import {
58164
58164
  setupRuntimeSetupScript,
58165
58165
  collectDependencyVersions
58166
58166
  } from "@apps-in-toss/plugins";
58167
- import { getPackageRoot as getPackageRoot2 } from "@granite-js/utils";
58167
+ import { getPackageRoot as getPackageRoot2 } from "@react-native-bedrock/utils";
58168
58168
 
58169
58169
  // ../../.yarn/cache/execa-npm-9.5.2-ac35c57136-94782a6282.zip/node_modules/execa/index.js
58170
58170
  init_esm_shims();
@@ -65194,7 +65194,7 @@ function appsInTossWebBuild(options) {
65194
65194
  const webDistFiles = await fs.promises.readdir(webDistDir);
65195
65195
  if (webDistFiles.length === 0) {
65196
65196
  throw new Error(
65197
- `\uC6F9 \uBE4C\uB4DC \uACB0\uACFC\uBB3C\uC774 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. granite.config.ts\uC5D0\uC11C \uC124\uC815\uD55C outdir \uACBD\uB85C\uC640 \uBE4C\uB4DC \uBA85\uB839\uC5B4(web.commands.build)\uC758 \uACB0\uACFC\uBB3C \uACBD\uB85C\uAC00 \uAC19\uC740\uC9C0 \uD655\uC778\uD558\uC138\uC694.`
65197
+ `\uC6F9 \uBE4C\uB4DC \uACB0\uACFC\uBB3C\uC774 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. bedrock.config.ts\uC5D0\uC11C \uC124\uC815\uD55C outdir \uACBD\uB85C\uC640 \uBE4C\uB4DC \uBA85\uB839\uC5B4(web.commands.build)\uC758 \uACB0\uACFC\uBB3C \uACBD\uB85C\uAC00 \uAC19\uC740\uC9C0 \uD655\uC778\uD558\uC138\uC694.`
65198
65198
  );
65199
65199
  }
65200
65200
  if (!webDistFiles.includes("index.html")) {
@@ -65250,7 +65250,7 @@ function appsInTossCreateArtifact(deploymentId) {
65250
65250
  }
65251
65251
  ]).flat(),
65252
65252
  outfile: path6.join(cwd, `${appName}.ait`),
65253
- appJsonPath: path6.join(packageRoot, ".granite", APP_MANIFEST_NAME),
65253
+ appJsonPath: path6.join(packageRoot, ".bedrock", APP_MANIFEST_NAME),
65254
65254
  additionalFilesToZip,
65255
65255
  packageJson: {
65256
65256
  dependencies,
@@ -65323,6 +65323,8 @@ async function babelBuild({
65323
65323
  const prebuilt = fileURLToPath3(import.meta.resolve(`@apps-in-toss/web-framework/prebuilt/prod/${platform2}`));
65324
65324
  const bundle = await fs2.promises.readFile(prebuilt, "utf-8");
65325
65325
  const result = await transform(bundle, {
65326
+ babelrc: false,
65327
+ configFile: false,
65326
65328
  sourceMaps: true,
65327
65329
  plugins: [
65328
65330
  [
@@ -65340,6 +65342,7 @@ async function babelBuild({
65340
65342
  brandBridgeColorMode: config.brand.bridgeColorMode,
65341
65343
  webViewType: config.webViewProps.type,
65342
65344
  webViewHeaderWithBackButton: config.webViewProps.header?.withBackButton,
65345
+ webViewInitialAccessoryButtons: JSON.stringify(config.webViewProps.header?.initialAccessoryButtons ?? []),
65343
65346
  ...config.webViewProps
65344
65347
  },
65345
65348
  identifierName: "Ait"
@@ -65449,10 +65452,10 @@ var BuildCommand = class extends Command {
65449
65452
  static paths = [[`build`]];
65450
65453
  static usage = Command.Usage({
65451
65454
  category: "Build",
65452
- description: "Granite App \uBC88\uB4E4\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4",
65455
+ description: "Bedrock App \uBC88\uB4E4\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4",
65453
65456
  examples: [
65454
- ["\uBE4C\uB4DC\uD558\uAE30", "granite build"],
65455
- ["\uC9C0\uC815\uB41C \uB300\uC0C1\uB9CC \uBE4C\uB4DC\uD558\uAE30", "granite build --id service-ios"]
65457
+ ["\uBE4C\uB4DC\uD558\uAE30", "bedrock build"],
65458
+ ["\uC9C0\uC815\uB41C \uB300\uC0C1\uB9CC \uBE4C\uB4DC\uD558\uAE30", "bedrock build --id service-ios"]
65456
65459
  ]
65457
65460
  });
65458
65461
  tag = options_exports.String("--tag", {
@@ -65471,7 +65474,6 @@ var BuildCommand = class extends Command {
65471
65474
 
65472
65475
  // src/cli/commands/DevCommand.ts
65473
65476
  init_esm_shims();
65474
- import { getPackageRoot as getPackageRoot5 } from "@granite-js/utils";
65475
65477
 
65476
65478
  // ../../.yarn/__virtual__/@hono-node-server-virtual-cf2888014c/0/cache/@hono-node-server-npm-1.13.8-e78cfff928-5880892fdd.zip/node_modules/@hono/node-server/dist/index.mjs
65477
65479
  init_esm_shims();
@@ -65932,6 +65934,9 @@ var serve = (options, listeningListener) => {
65932
65934
  return server;
65933
65935
  };
65934
65936
 
65937
+ // src/cli/commands/DevCommand.ts
65938
+ import { getPackageRoot as getPackageRoot5 } from "@react-native-bedrock/utils";
65939
+
65935
65940
  // src/server.ts
65936
65941
  init_esm_shims();
65937
65942
  import fs3 from "fs";
@@ -67799,6 +67804,8 @@ var createApp = ({ appName, web, permissions, webViewProps, brand }) => {
67799
67804
  return c4.body(transformCache.get(key));
67800
67805
  }
67801
67806
  const result = await transform2(bundle, {
67807
+ babelrc: false,
67808
+ configFile: false,
67802
67809
  plugins: [
67803
67810
  [
67804
67811
  babelJsonReplacementPlugin,
@@ -67815,6 +67822,7 @@ var createApp = ({ appName, web, permissions, webViewProps, brand }) => {
67815
67822
  brandBridgeColorMode: brand.bridgeColorMode,
67816
67823
  webViewType: webViewProps.type,
67817
67824
  webViewHeaderWithBackButton: webViewProps.header?.withBackButton,
67825
+ webViewInitialAccessoryButtons: JSON.stringify(webViewProps.header?.initialAccessoryButtons ?? []),
67818
67826
  ...webViewProps
67819
67827
  },
67820
67828
  identifierName: "Ait"
@@ -67841,14 +67849,14 @@ var createApp = ({ appName, web, permissions, webViewProps, brand }) => {
67841
67849
  init_esm_shims();
67842
67850
  var import_picocolors4 = __toESM(require_picocolors2(), 1);
67843
67851
  var LOGO = [
67844
- " \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557",
67845
- "\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D",
67846
- "\u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2557 ",
67847
- "\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u255D ",
67848
- "\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557",
67849
- " \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D"
67852
+ "\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557",
67853
+ "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2551 \u2588\u2588\u2554\u255D",
67854
+ "\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2554\u255D ",
67855
+ "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2588\u2588\u2557 ",
67856
+ "\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2557",
67857
+ "\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D"
67850
67858
  ];
67851
- var GREETING_MESSAGE = "Welcome to Granite";
67859
+ var GREETING_MESSAGE = "Welcome to Bedrock";
67852
67860
  function printLogo() {
67853
67861
  const maxLength = LOGO.reduce((prev, line) => Math.max(line.length, prev), 0);
67854
67862
  console.log();
@@ -67864,8 +67872,8 @@ var DevCommand = class extends Command {
67864
67872
  static paths = [[`dev`]];
67865
67873
  static usage = Command.Usage({
67866
67874
  category: "Development",
67867
- description: "Granite \uAC1C\uBC1C \uC11C\uBC84\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4",
67868
- examples: [["\uAC1C\uBC1C \uC11C\uBC84 \uC2E4\uD589\uD558\uAE30", "granite dev"]]
67875
+ description: "Bedrock \uAC1C\uBC1C \uC11C\uBC84\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4",
67876
+ examples: [["\uAC1C\uBC1C \uC11C\uBC84 \uC2E4\uD589\uD558\uAE30", "bedrock dev"]]
67869
67877
  });
67870
67878
  async execute() {
67871
67879
  const packageRoot = getPackageRoot5();
@@ -67894,8 +67902,8 @@ var DevCommand = class extends Command {
67894
67902
 
67895
67903
  // src/cli/index.ts
67896
67904
  var cli = new Cli({
67897
- binaryLabel: "granite",
67898
- binaryName: "granite",
67905
+ binaryLabel: "bedrock",
67906
+ binaryName: "bedrock",
67899
67907
  enableCapture: true
67900
67908
  });
67901
67909
  async function initialize() {
@@ -5,6 +5,20 @@ type DeepRequiredKeysOnly<T> = {
5
5
  [K in keyof T]-?: T[K] extends object ? (T[K] extends F ? T[K] : DeepRequiredKeysOnly<T[K]>) : T[K];
6
6
  };
7
7
 
8
+ type Icon = {
9
+ source: {
10
+ uri: string;
11
+ };
12
+ name?: never;
13
+ } | {
14
+ name: string;
15
+ source?: never;
16
+ };
17
+ interface InitialAccessoryButton {
18
+ id: string;
19
+ title: string;
20
+ icon: Icon;
21
+ }
8
22
  interface AppsInTossWebConfig extends AppsInTossPluginOptions {
9
23
  appName: string;
10
24
  web: {
@@ -33,6 +47,23 @@ interface AppsInTossWebConfig extends AppsInTossPluginOptions {
33
47
  * Defaults to `true` when type is 'partner', `false` when type is 'external'
34
48
  */
35
49
  withBackButton?: boolean;
50
+ /**
51
+ * @default []
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * [
56
+ * {
57
+ * title: '버튼 이름',
58
+ * icon: {
59
+ * name: 'icon-name',
60
+ * source: 'icon-source',
61
+ * },
62
+ * },
63
+ * ]
64
+ * ```
65
+ */
66
+ initialAccessoryButtons?: InitialAccessoryButton[];
36
67
  };
37
68
  /**
38
69
  *
@@ -87,4 +118,4 @@ interface AppsInTossWebConfig extends AppsInTossPluginOptions {
87
118
  type AppsInTossWebConfigResponse = DeepRequiredKeysOnly<AppsInTossWebConfig>;
88
119
  declare const defineConfig: (config: AppsInTossWebConfig) => AppsInTossWebConfigResponse;
89
120
 
90
- export { type AppsInTossWebConfig, type AppsInTossWebConfigResponse, defineConfig };
121
+ export { type AppsInTossWebConfig, type AppsInTossWebConfigResponse, type InitialAccessoryButton, defineConfig };
@@ -40,7 +40,6 @@ function merge(target, source) {
40
40
  // src/config/defineConfig.ts
41
41
  var defineConfig = (config) => {
42
42
  const defaultConfig = {
43
- scheme: "intoss",
44
43
  outdir: "dist",
45
44
  web: {
46
45
  host: "localhost"
@@ -52,7 +51,11 @@ var defineConfig = (config) => {
52
51
  bounces: true,
53
52
  allowsBackForwardNavigationGestures: true,
54
53
  pullToRefreshEnabled: true,
55
- overScrollMode: "always"
54
+ overScrollMode: "always",
55
+ header: {
56
+ withBackButton: true,
57
+ initialAccessoryButtons: []
58
+ }
56
59
  }
57
60
  };
58
61
  return merge(defaultConfig, config);