@apps-in-toss/plugins 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/index.cjs CHANGED
@@ -26562,11 +26562,12 @@ init_cjs_shims();
26562
26562
  var import_fs2 = __toESM(require("fs"), 1);
26563
26563
  var import_path3 = __toESM(require("path"), 1);
26564
26564
 
26565
- // ../../.yarn/cache/@granite-js-utils-npm-0.1.2-cb1031ea38-87c00032d4.zip/node_modules/@granite-js/utils/dist/index.js
26565
+ // ../../.yarn/cache/@react-native-bedrock-utils-npm-0.0.25-695b359c64-87cc7b90a3.zip/node_modules/@react-native-bedrock/utils/dist/index.js
26566
26566
  init_cjs_shims();
26567
26567
  var import_fs = __toESM(require("fs"), 1);
26568
26568
  var import_path = __toESM(require("path"), 1);
26569
26569
  var import_yauzl = __toESM(require_yauzl(), 1);
26570
+ var import_os = __toESM(require("os"), 1);
26570
26571
  function getPackageRoot() {
26571
26572
  let cwd = process.cwd();
26572
26573
  const root = import_path.default.parse(cwd).root;
@@ -26611,6 +26612,13 @@ function readZipContent(zipPath, fileName) {
26611
26612
  });
26612
26613
  });
26613
26614
  }
26615
+ var win32Impl = {
26616
+ normalizePath: (path22) => path22.replace(/\\/g, "/")
26617
+ };
26618
+ var posixImpl = {
26619
+ normalizePath: (path22) => path22
26620
+ };
26621
+ var { normalizePath } = import_os.default.type() === "Windows_NT" ? win32Impl : posixImpl;
26614
26622
 
26615
26623
  // src/appsInToss.ts
26616
26624
  var import_picocolors = __toESM(require_picocolors(), 1);
@@ -27022,9 +27030,6 @@ function extractPackagePath(path8, packageName) {
27022
27030
  }
27023
27031
  throw new Error(`Failed to extract path: ${packageName}`);
27024
27032
  }
27025
- function normalizePath(path8) {
27026
- return path8.replace(/\\/g, "/");
27027
- }
27028
27033
  async function getPackageVersion(packagePath) {
27029
27034
  const packageJson = JSON.parse(await fs2.readFile(path2.join(packagePath, "package.json"), "utf-8"));
27030
27035
  return packageJson.version;
@@ -27061,7 +27066,7 @@ var fs4 = __toESM(require("fs/promises"), 1);
27061
27066
  var path4 = __toESM(require("path"), 1);
27062
27067
  async function resolveAppManifestPath() {
27063
27068
  const cwd = getPackageRoot();
27064
- const appManifestPath = path4.join(cwd, ".granite", APP_MANIFEST_NAME);
27069
+ const appManifestPath = path4.join(cwd, ".bedrock", APP_MANIFEST_NAME);
27065
27070
  await fs4.access(appManifestPath, fs4.constants.F_OK);
27066
27071
  return appManifestPath;
27067
27072
  }
@@ -27087,7 +27092,7 @@ async function validateZip(zipPath) {
27087
27092
  const appJson = JSON.parse(appJsonString);
27088
27093
  const validated = validateAppManifest(appJson);
27089
27094
  if (!validated.success) {
27090
- throw new Error("granite.config.ts \uAC12\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.");
27095
+ throw new Error("bedrock.config.ts \uAC12\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.");
27091
27096
  }
27092
27097
  }
27093
27098
  async function createArtifact(options2) {
@@ -27501,13 +27506,13 @@ var import_node_fs = __toESM(require("fs"), 1);
27501
27506
  var import_node_path = __toESM(require("path"), 1);
27502
27507
  function setupRuntimeSetupScript(config) {
27503
27508
  const packageRoot = getPackageRoot();
27504
- const granitePath = import_node_path.default.join(packageRoot, ".granite");
27509
+ const bedrockPath = import_node_path.default.join(packageRoot, ".bedrock");
27505
27510
  try {
27506
- import_node_fs.default.accessSync(granitePath);
27511
+ import_node_fs.default.accessSync(bedrockPath);
27507
27512
  } catch {
27508
- import_node_fs.default.mkdirSync(granitePath, { recursive: true });
27513
+ import_node_fs.default.mkdirSync(bedrockPath, { recursive: true });
27509
27514
  }
27510
- const envFilePath = import_node_path.default.join(granitePath, ".apps-in-toss.env.js");
27515
+ const envFilePath = import_node_path.default.join(bedrockPath, ".apps-in-toss.env.js");
27511
27516
  const script = `
27512
27517
  (function (global) {
27513
27518
  global.__appsInToss = ${JSON.stringify({
@@ -27535,47 +27540,6 @@ function setupRuntimeSetupScript(config) {
27535
27540
  function log2(...args) {
27536
27541
  console.log(import_picocolors.default.bold(import_picocolors.default.cyan("[AppsInToss]")), ...args);
27537
27542
  }
27538
- function bedrockCompat() {
27539
- const replaceNativeModule = (code, targetModuleName, moduleName) => {
27540
- return code.replace(
27541
- /TurboModuleRegistry\.getEnforcing<[^>]+>\(\s*['"]([^'"]+)['"]\s*\)/g,
27542
- (origin, matchedModuleName) => {
27543
- return matchedModuleName === targetModuleName ? `TurboModuleRegistry.get('${targetModuleName}') || TurboModuleRegistry.getEnforcing('${moduleName}')` : origin;
27544
- }
27545
- );
27546
- };
27547
- return {
27548
- name: "ensure-toss-native-module",
27549
- config: {
27550
- esbuild: {
27551
- banner: {
27552
- js: `
27553
- (function (global) {
27554
- global.__granite_require__ = global.__bedrock_require__;
27555
- })(
27556
- typeof globalThis !== 'undefined'
27557
- ? globalThis
27558
- : typeof global !== 'undefined'
27559
- ? global
27560
- : typeof window !== 'undefined'
27561
- ? window
27562
- : this
27563
- );
27564
- `
27565
- }
27566
- }
27567
- },
27568
- transformSync(id, code) {
27569
- if (id.includes("GraniteModule")) {
27570
- return replaceNativeModule(code, "GraniteModule", "BedrockModule");
27571
- }
27572
- if (id.includes("GraniteCoreModule")) {
27573
- return replaceNativeModule(code, "GraniteCoreModule", "BedrockCoreModule");
27574
- }
27575
- return code;
27576
- }
27577
- };
27578
- }
27579
27543
  function appsInTossCreateArtifact(deploymentId) {
27580
27544
  const packageRoot = getPackageRoot();
27581
27545
  return {
@@ -27600,7 +27564,7 @@ function appsInTossCreateArtifact(deploymentId) {
27600
27564
  }
27601
27565
  ]).flat(),
27602
27566
  outfile: import_path3.default.join(cwd, `${appName}.ait`),
27603
- appJsonPath: import_path3.default.join(packageRoot, ".granite", APP_MANIFEST_NAME)
27567
+ appJsonPath: import_path3.default.join(packageRoot, ".bedrock", APP_MANIFEST_NAME)
27604
27568
  });
27605
27569
  if (!artifactOutfile) {
27606
27570
  throw new Error("\uC544\uD2F0\uD329\uD2B8 \uC0DD\uC131\uC5D0 \uC2E4\uD328\uD588\uC5B4\uC694.");
@@ -27650,7 +27614,7 @@ function appsInTossDevServer(options2) {
27650
27614
  async function appsInTossAppJson(options2) {
27651
27615
  const packageRoot = getPackageRoot();
27652
27616
  const handleAppJson = async (appName) => {
27653
- const appJsonPath = import_path3.default.join(packageRoot, ".granite", APP_MANIFEST_NAME);
27617
+ const appJsonPath = import_path3.default.join(packageRoot, ".bedrock", APP_MANIFEST_NAME);
27654
27618
  const appJsonObject = {
27655
27619
  appName,
27656
27620
  permissions: options2.permissions
@@ -27695,10 +27659,6 @@ function appsInTossPostNotice() {
27695
27659
  build: {
27696
27660
  order: phase,
27697
27661
  async handler({ appName }) {
27698
- if (this.meta.hermes == null) {
27699
- log2(`Hermes \uD50C\uB7EC\uADF8\uC778 \uAD6C\uC131\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC5B4\uC694. \uAC00\uC774\uB4DC\uB97C \uCC38\uACE0\uD558\uC5EC Hermes \uD50C\uB7EC\uADF8\uC778\uC744 \uAD6C\uC131\uD574\uC8FC\uC138\uC694.`);
27700
- return;
27701
- }
27702
27662
  if (this.meta.sentry) {
27703
27663
  const command = [
27704
27664
  "ait sentry upload-sourcemap",
@@ -27729,7 +27689,6 @@ function appsInToss(options2) {
27729
27689
  deploymentId
27730
27690
  });
27731
27691
  return [
27732
- bedrockCompat(),
27733
27692
  appsInTossAppJson(result.data),
27734
27693
  appsInTossDevServer(result.data),
27735
27694
  appsInTossCreateArtifact(deploymentId),
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { GranitePluginCore } from '@granite-js/plugin-core';
1
+ import { BedrockPluginCore } from '@react-native-bedrock/plugin-core';
2
2
  import typia, { tags } from 'typia';
3
3
 
4
4
  type PermissionReadWrite = 'read' | 'write';
@@ -49,13 +49,13 @@ interface AppsInTossPluginOptions {
49
49
  type BridgeTheme = 'basic' | 'inverted';
50
50
  declare const validateAppInTossPluginOptions: (input: unknown) => typia.IValidation<AppsInTossPluginOptions>;
51
51
 
52
- declare function appsInTossEsbuildConfig(envScript: string): GranitePluginCore;
53
- declare function appsInTossMetroConfig(envScriptPath: string): GranitePluginCore;
54
- declare function appsInTossAppJson(options: Pick<AppsInTossPluginOptions, 'permissions'>): Promise<GranitePluginCore>;
55
- declare function appsInTossPostNotice(): GranitePluginCore;
56
- declare function appsInToss(options: AppsInTossPluginOptions): (GranitePluginCore | Promise<GranitePluginCore>)[];
52
+ declare function appsInTossEsbuildConfig(envScript: string): BedrockPluginCore;
53
+ declare function appsInTossMetroConfig(envScriptPath: string): BedrockPluginCore;
54
+ declare function appsInTossAppJson(options: Pick<AppsInTossPluginOptions, 'permissions'>): Promise<BedrockPluginCore>;
55
+ declare function appsInTossPostNotice(): BedrockPluginCore;
56
+ declare function appsInToss(options: AppsInTossPluginOptions): (BedrockPluginCore | Promise<BedrockPluginCore>)[];
57
57
 
58
- declare function analytics(): GranitePluginCore;
58
+ declare function analytics(): BedrockPluginCore;
59
59
 
60
60
  interface AppsInTossBuildMetadata {
61
61
  runtimeVersion: string;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { GranitePluginCore } from '@granite-js/plugin-core';
1
+ import { BedrockPluginCore } from '@react-native-bedrock/plugin-core';
2
2
  import typia, { tags } from 'typia';
3
3
 
4
4
  type PermissionReadWrite = 'read' | 'write';
@@ -49,13 +49,13 @@ interface AppsInTossPluginOptions {
49
49
  type BridgeTheme = 'basic' | 'inverted';
50
50
  declare const validateAppInTossPluginOptions: (input: unknown) => typia.IValidation<AppsInTossPluginOptions>;
51
51
 
52
- declare function appsInTossEsbuildConfig(envScript: string): GranitePluginCore;
53
- declare function appsInTossMetroConfig(envScriptPath: string): GranitePluginCore;
54
- declare function appsInTossAppJson(options: Pick<AppsInTossPluginOptions, 'permissions'>): Promise<GranitePluginCore>;
55
- declare function appsInTossPostNotice(): GranitePluginCore;
56
- declare function appsInToss(options: AppsInTossPluginOptions): (GranitePluginCore | Promise<GranitePluginCore>)[];
52
+ declare function appsInTossEsbuildConfig(envScript: string): BedrockPluginCore;
53
+ declare function appsInTossMetroConfig(envScriptPath: string): BedrockPluginCore;
54
+ declare function appsInTossAppJson(options: Pick<AppsInTossPluginOptions, 'permissions'>): Promise<BedrockPluginCore>;
55
+ declare function appsInTossPostNotice(): BedrockPluginCore;
56
+ declare function appsInToss(options: AppsInTossPluginOptions): (BedrockPluginCore | Promise<BedrockPluginCore>)[];
57
57
 
58
- declare function analytics(): GranitePluginCore;
58
+ declare function analytics(): BedrockPluginCore;
59
59
 
60
60
  interface AppsInTossBuildMetadata {
61
61
  runtimeVersion: string;
package/dist/index.js CHANGED
@@ -26552,11 +26552,12 @@ init_esm_shims();
26552
26552
  import fs6 from "fs";
26553
26553
  import path7 from "path";
26554
26554
 
26555
- // ../../.yarn/cache/@granite-js-utils-npm-0.1.2-cb1031ea38-87c00032d4.zip/node_modules/@granite-js/utils/dist/index.js
26555
+ // ../../.yarn/cache/@react-native-bedrock-utils-npm-0.0.25-695b359c64-87cc7b90a3.zip/node_modules/@react-native-bedrock/utils/dist/index.js
26556
26556
  init_esm_shims();
26557
26557
  var import_yauzl = __toESM(require_yauzl(), 1);
26558
26558
  import fs from "fs";
26559
26559
  import path from "path";
26560
+ import os from "os";
26560
26561
  function getPackageRoot() {
26561
26562
  let cwd = process.cwd();
26562
26563
  const root = path.parse(cwd).root;
@@ -26601,6 +26602,13 @@ function readZipContent(zipPath, fileName) {
26601
26602
  });
26602
26603
  });
26603
26604
  }
26605
+ var win32Impl = {
26606
+ normalizePath: (path22) => path22.replace(/\\/g, "/")
26607
+ };
26608
+ var posixImpl = {
26609
+ normalizePath: (path22) => path22
26610
+ };
26611
+ var { normalizePath } = os.type() === "Windows_NT" ? win32Impl : posixImpl;
26604
26612
 
26605
26613
  // src/appsInToss.ts
26606
26614
  var import_picocolors = __toESM(require_picocolors(), 1);
@@ -27012,9 +27020,6 @@ function extractPackagePath(path8, packageName) {
27012
27020
  }
27013
27021
  throw new Error(`Failed to extract path: ${packageName}`);
27014
27022
  }
27015
- function normalizePath(path8) {
27016
- return path8.replace(/\\/g, "/");
27017
- }
27018
27023
  async function getPackageVersion(packagePath) {
27019
27024
  const packageJson = JSON.parse(await fs2.readFile(path2.join(packagePath, "package.json"), "utf-8"));
27020
27025
  return packageJson.version;
@@ -27051,7 +27056,7 @@ import * as fs4 from "fs/promises";
27051
27056
  import * as path4 from "path";
27052
27057
  async function resolveAppManifestPath() {
27053
27058
  const cwd = getPackageRoot();
27054
- const appManifestPath = path4.join(cwd, ".granite", APP_MANIFEST_NAME);
27059
+ const appManifestPath = path4.join(cwd, ".bedrock", APP_MANIFEST_NAME);
27055
27060
  await fs4.access(appManifestPath, fs4.constants.F_OK);
27056
27061
  return appManifestPath;
27057
27062
  }
@@ -27077,7 +27082,7 @@ async function validateZip(zipPath) {
27077
27082
  const appJson = JSON.parse(appJsonString);
27078
27083
  const validated = validateAppManifest(appJson);
27079
27084
  if (!validated.success) {
27080
- throw new Error("granite.config.ts \uAC12\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.");
27085
+ throw new Error("bedrock.config.ts \uAC12\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.");
27081
27086
  }
27082
27087
  }
27083
27088
  async function createArtifact(options2) {
@@ -27491,13 +27496,13 @@ import fs5 from "node:fs";
27491
27496
  import path6 from "node:path";
27492
27497
  function setupRuntimeSetupScript(config) {
27493
27498
  const packageRoot = getPackageRoot();
27494
- const granitePath = path6.join(packageRoot, ".granite");
27499
+ const bedrockPath = path6.join(packageRoot, ".bedrock");
27495
27500
  try {
27496
- fs5.accessSync(granitePath);
27501
+ fs5.accessSync(bedrockPath);
27497
27502
  } catch {
27498
- fs5.mkdirSync(granitePath, { recursive: true });
27503
+ fs5.mkdirSync(bedrockPath, { recursive: true });
27499
27504
  }
27500
- const envFilePath = path6.join(granitePath, ".apps-in-toss.env.js");
27505
+ const envFilePath = path6.join(bedrockPath, ".apps-in-toss.env.js");
27501
27506
  const script = `
27502
27507
  (function (global) {
27503
27508
  global.__appsInToss = ${JSON.stringify({
@@ -27525,47 +27530,6 @@ function setupRuntimeSetupScript(config) {
27525
27530
  function log2(...args) {
27526
27531
  console.log(import_picocolors.default.bold(import_picocolors.default.cyan("[AppsInToss]")), ...args);
27527
27532
  }
27528
- function bedrockCompat() {
27529
- const replaceNativeModule = (code, targetModuleName, moduleName) => {
27530
- return code.replace(
27531
- /TurboModuleRegistry\.getEnforcing<[^>]+>\(\s*['"]([^'"]+)['"]\s*\)/g,
27532
- (origin, matchedModuleName) => {
27533
- return matchedModuleName === targetModuleName ? `TurboModuleRegistry.get('${targetModuleName}') || TurboModuleRegistry.getEnforcing('${moduleName}')` : origin;
27534
- }
27535
- );
27536
- };
27537
- return {
27538
- name: "ensure-toss-native-module",
27539
- config: {
27540
- esbuild: {
27541
- banner: {
27542
- js: `
27543
- (function (global) {
27544
- global.__granite_require__ = global.__bedrock_require__;
27545
- })(
27546
- typeof globalThis !== 'undefined'
27547
- ? globalThis
27548
- : typeof global !== 'undefined'
27549
- ? global
27550
- : typeof window !== 'undefined'
27551
- ? window
27552
- : this
27553
- );
27554
- `
27555
- }
27556
- }
27557
- },
27558
- transformSync(id, code) {
27559
- if (id.includes("GraniteModule")) {
27560
- return replaceNativeModule(code, "GraniteModule", "BedrockModule");
27561
- }
27562
- if (id.includes("GraniteCoreModule")) {
27563
- return replaceNativeModule(code, "GraniteCoreModule", "BedrockCoreModule");
27564
- }
27565
- return code;
27566
- }
27567
- };
27568
- }
27569
27533
  function appsInTossCreateArtifact(deploymentId) {
27570
27534
  const packageRoot = getPackageRoot();
27571
27535
  return {
@@ -27590,7 +27554,7 @@ function appsInTossCreateArtifact(deploymentId) {
27590
27554
  }
27591
27555
  ]).flat(),
27592
27556
  outfile: path7.join(cwd, `${appName}.ait`),
27593
- appJsonPath: path7.join(packageRoot, ".granite", APP_MANIFEST_NAME)
27557
+ appJsonPath: path7.join(packageRoot, ".bedrock", APP_MANIFEST_NAME)
27594
27558
  });
27595
27559
  if (!artifactOutfile) {
27596
27560
  throw new Error("\uC544\uD2F0\uD329\uD2B8 \uC0DD\uC131\uC5D0 \uC2E4\uD328\uD588\uC5B4\uC694.");
@@ -27640,7 +27604,7 @@ function appsInTossDevServer(options2) {
27640
27604
  async function appsInTossAppJson(options2) {
27641
27605
  const packageRoot = getPackageRoot();
27642
27606
  const handleAppJson = async (appName) => {
27643
- const appJsonPath = path7.join(packageRoot, ".granite", APP_MANIFEST_NAME);
27607
+ const appJsonPath = path7.join(packageRoot, ".bedrock", APP_MANIFEST_NAME);
27644
27608
  const appJsonObject = {
27645
27609
  appName,
27646
27610
  permissions: options2.permissions
@@ -27685,10 +27649,6 @@ function appsInTossPostNotice() {
27685
27649
  build: {
27686
27650
  order: phase,
27687
27651
  async handler({ appName }) {
27688
- if (this.meta.hermes == null) {
27689
- log2(`Hermes \uD50C\uB7EC\uADF8\uC778 \uAD6C\uC131\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC5B4\uC694. \uAC00\uC774\uB4DC\uB97C \uCC38\uACE0\uD558\uC5EC Hermes \uD50C\uB7EC\uADF8\uC778\uC744 \uAD6C\uC131\uD574\uC8FC\uC138\uC694.`);
27690
- return;
27691
- }
27692
27652
  if (this.meta.sentry) {
27693
27653
  const command = [
27694
27654
  "ait sentry upload-sourcemap",
@@ -27719,7 +27679,6 @@ function appsInToss(options2) {
27719
27679
  deploymentId
27720
27680
  });
27721
27681
  return [
27722
- bedrockCompat(),
27723
27682
  appsInTossAppJson(result.data),
27724
27683
  appsInTossDevServer(result.data),
27725
27684
  appsInTossCreateArtifact(deploymentId),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@apps-in-toss/plugins",
3
3
  "type": "module",
4
- "version": "0.0.0-dev.1752115036458",
4
+ "version": "0.0.0-dev.1754906858438",
5
5
  "description": "The plugins for Apps In Toss",
6
6
  "scripts": {
7
7
  "prepack": "yarn build",
@@ -23,8 +23,8 @@
23
23
  "dist/**/*"
24
24
  ],
25
25
  "devDependencies": {
26
- "@granite-js/plugin-core": "0.1.2",
27
- "@granite-js/utils": "0.1.2",
26
+ "@react-native-bedrock/plugin-core": "0.0.25",
27
+ "@react-native-bedrock/utils": "0.0.25",
28
28
  "@ryoppippi/unplugin-typia": "^2.1.3",
29
29
  "@types/archiver": "^6.0.3",
30
30
  "@types/connect": "^3",
@@ -32,6 +32,7 @@
32
32
  "connect": "^3.7.0",
33
33
  "execa": "^9.5.2",
34
34
  "picocolors": "^1.1.1",
35
+ "react-native-bedrock": "0.0.25",
35
36
  "tsup": "^8.4.0",
36
37
  "typescript": "5.8.3",
37
38
  "typia": "^8.0.4",
@@ -43,5 +44,5 @@
43
44
  "publishConfig": {
44
45
  "access": "public"
45
46
  },
46
- "gitHead": "73735f83556eb2727f160e998234101bd17e55f0"
47
+ "gitHead": "ab42632482e7b40fcb50088014b30643f0ad32e3"
47
48
  }