@apps-in-toss/framework 0.0.0-dev.1741599933429 → 0.0.0-dev.1741859884482

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.
@@ -14233,7 +14233,7 @@ var require_isPlainObject = __commonJS({
14233
14233
  var funcToString = funcProto.toString;
14234
14234
  var hasOwnProperty = objectProto.hasOwnProperty;
14235
14235
  var objectCtorString = funcToString.call(Object);
14236
- function isPlainObject3(value) {
14236
+ function isPlainObject2(value) {
14237
14237
  if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
14238
14238
  return false;
14239
14239
  }
@@ -14244,7 +14244,7 @@ var require_isPlainObject = __commonJS({
14244
14244
  var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
14245
14245
  return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
14246
14246
  }
14247
- module2.exports = isPlainObject3;
14247
+ module2.exports = isPlainObject2;
14248
14248
  }
14249
14249
  });
14250
14250
 
@@ -20880,7 +20880,7 @@ var require_file = __commonJS({
20880
20880
  var flatten = require_flatten();
20881
20881
  var difference = require_difference();
20882
20882
  var union = require_union();
20883
- var isPlainObject3 = require_isPlainObject();
20883
+ var isPlainObject2 = require_isPlainObject();
20884
20884
  var glob = require_commonjs5();
20885
20885
  var file = module2.exports = {};
20886
20886
  var pathSeparatorRe = /[\/\\]/g;
@@ -20905,7 +20905,7 @@ var require_file = __commonJS({
20905
20905
  return fs6.existsSync(filepath);
20906
20906
  };
20907
20907
  file.expand = function(...args) {
20908
- var options = isPlainObject3(args[0]) ? args.shift() : {};
20908
+ var options = isPlainObject2(args[0]) ? args.shift() : {};
20909
20909
  var patterns = Array.isArray(args[0]) ? args[0] : args;
20910
20910
  if (patterns.length === 0) {
20911
20911
  return [];
@@ -25634,12 +25634,51 @@ var require_archiver = __commonJS({
25634
25634
  }
25635
25635
  });
25636
25636
 
25637
+ // ../../.yarn/unplugged/typia-virtual-7c91ede42e/node_modules/typia/lib/internal/_isFormatUuid.js
25638
+ var require_isFormatUuid = __commonJS({
25639
+ "../../.yarn/unplugged/typia-virtual-7c91ede42e/node_modules/typia/lib/internal/_isFormatUuid.js"(exports2) {
25640
+ "use strict";
25641
+ init_cjs_shims();
25642
+ Object.defineProperty(exports2, "__esModule", { value: true });
25643
+ exports2._isFormatUuid = void 0;
25644
+ var _isFormatUuid2 = (str) => PATTERN.test(str);
25645
+ exports2._isFormatUuid = _isFormatUuid2;
25646
+ var PATTERN = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
25647
+ }
25648
+ });
25649
+
25650
+ // ../../.yarn/unplugged/typia-virtual-7c91ede42e/node_modules/typia/lib/internal/_validateReport.js
25651
+ var require_validateReport = __commonJS({
25652
+ "../../.yarn/unplugged/typia-virtual-7c91ede42e/node_modules/typia/lib/internal/_validateReport.js"(exports2) {
25653
+ "use strict";
25654
+ init_cjs_shims();
25655
+ Object.defineProperty(exports2, "__esModule", { value: true });
25656
+ exports2._validateReport = void 0;
25657
+ var _validateReport2 = (array) => {
25658
+ const reportable = (path13) => {
25659
+ if (array.length === 0)
25660
+ return true;
25661
+ const last = array[array.length - 1].path;
25662
+ return path13.length > last.length || last.substring(0, path13.length) !== path13;
25663
+ };
25664
+ return (exceptable, error) => {
25665
+ if (exceptable && reportable(error.path))
25666
+ array.push(error);
25667
+ return false;
25668
+ };
25669
+ };
25670
+ exports2._validateReport = _validateReport2;
25671
+ }
25672
+ });
25673
+
25637
25674
  // src/plugins/index.ts
25638
25675
  var plugins_exports = {};
25639
25676
  __export(plugins_exports, {
25640
25677
  appsInToss: () => appsInToss,
25641
25678
  appsInTossAppJson: () => appsInTossAppJson,
25642
- createArtifact: () => createArtifact
25679
+ createArtifact: () => createArtifact,
25680
+ validateAppManifest: () => validateAppManifest,
25681
+ validateZip: () => validateZip
25643
25682
  });
25644
25683
  module.exports = __toCommonJS(plugins_exports);
25645
25684
  init_cjs_shims();
@@ -25652,6 +25691,7 @@ var import_picocolors = __toESM(require_picocolors(), 1);
25652
25691
 
25653
25692
  // src/plugins/constants.ts
25654
25693
  init_cjs_shims();
25694
+ var REACT_NATIVE_VERSION = "0_72_6";
25655
25695
  var APP_MANIFEST_NAME = "app.json";
25656
25696
 
25657
25697
  // src/plugins/utils/compileHbc.ts
@@ -32648,6 +32688,7 @@ function resolveFromRoot(rootDir, request) {
32648
32688
  // src/plugins/utils/createArtifact.ts
32649
32689
  init_cjs_shims();
32650
32690
  var import_path3 = __toESM(require("path"), 1);
32691
+ var import_cli = require("@apps-in-toss/cli");
32651
32692
 
32652
32693
  // src/plugins/utils/compressToZip.ts
32653
32694
  init_cjs_shims();
@@ -32705,50 +32746,6 @@ init_cjs_shims();
32705
32746
  var fs4 = __toESM(require("fs/promises"), 1);
32706
32747
  var path10 = __toESM(require("path"), 1);
32707
32748
 
32708
- // ../../.yarn/cache/es-toolkit-npm-1.33.0-f181eedbc7-4c8dea3167.zip/node_modules/es-toolkit/dist/index.mjs
32709
- init_cjs_shims();
32710
-
32711
- // ../../.yarn/cache/es-toolkit-npm-1.33.0-f181eedbc7-4c8dea3167.zip/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
32712
- init_cjs_shims();
32713
- function isPlainObject2(value) {
32714
- if (!value || typeof value !== "object") {
32715
- return false;
32716
- }
32717
- const proto = Object.getPrototypeOf(value);
32718
- const hasObjectPrototype = proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null;
32719
- if (!hasObjectPrototype) {
32720
- return false;
32721
- }
32722
- return Object.prototype.toString.call(value) === "[object Object]";
32723
- }
32724
-
32725
- // ../../.yarn/cache/es-toolkit-npm-1.33.0-f181eedbc7-4c8dea3167.zip/node_modules/es-toolkit/dist/object/merge.mjs
32726
- init_cjs_shims();
32727
- function merge(target, source) {
32728
- const sourceKeys = Object.keys(source);
32729
- for (let i2 = 0; i2 < sourceKeys.length; i2++) {
32730
- const key = sourceKeys[i2];
32731
- const sourceValue = source[key];
32732
- const targetValue = target[key];
32733
- if (Array.isArray(sourceValue)) {
32734
- if (Array.isArray(targetValue)) {
32735
- target[key] = merge(targetValue, sourceValue);
32736
- } else {
32737
- target[key] = merge([], sourceValue);
32738
- }
32739
- } else if (isPlainObject2(sourceValue)) {
32740
- if (isPlainObject2(targetValue)) {
32741
- target[key] = merge(targetValue, sourceValue);
32742
- } else {
32743
- target[key] = merge({}, sourceValue);
32744
- }
32745
- } else if (targetValue === void 0 || sourceValue !== void 0) {
32746
- target[key] = sourceValue;
32747
- }
32748
- }
32749
- return target;
32750
- }
32751
-
32752
32749
  // src/plugins/utils/getPackageRoot.ts
32753
32750
  init_cjs_shims();
32754
32751
  var import_fs2 = __toESM(require("fs"), 1);
@@ -32772,26 +32769,231 @@ async function resolveAppManifestPath() {
32772
32769
  await fs4.access(appManifestPath, fs4.constants.F_OK);
32773
32770
  return appManifestPath;
32774
32771
  }
32772
+ async function readAppJson(appJsonPath) {
32773
+ const appJson = await fs4.readFile(appJsonPath, "utf8");
32774
+ return JSON.parse(appJson);
32775
+ }
32776
+ async function writeAppJson(appJsonPath, content) {
32777
+ await fs4.writeFile(appJsonPath, JSON.stringify(content));
32778
+ }
32775
32779
  async function updateAppJsonMetadata(metadata) {
32776
32780
  const appJsonPath = await resolveAppManifestPath();
32777
- const appJson = await fs4.readFile(appJsonPath, "utf8");
32778
- await fs4.writeFile(
32779
- appJsonPath,
32780
- JSON.stringify(
32781
- merge(JSON.parse(appJson), {
32782
- _metadata: metadata
32783
- })
32784
- )
32785
- );
32781
+ const appJson = await readAppJson(appJsonPath);
32782
+ await writeAppJson(appJsonPath, {
32783
+ ...appJson,
32784
+ _metadata: metadata
32785
+ });
32786
32786
  }
32787
32787
 
32788
+ // src/plugins/types.ts
32789
+ init_cjs_shims();
32790
+ var __typia_transform__isFormatUuid = __toESM(require_isFormatUuid(), 1);
32791
+ var __typia_transform__validateReport = __toESM(require_validateReport(), 1);
32792
+ var validateAppManifest = /* @__PURE__ */ (() => {
32793
+ const _io0 = (input) => "string" === typeof input.appName && (Array.isArray(input.permissions) && input.permissions.every((elem) => "object" === typeof elem && null !== elem && _iu0(elem))) && ("object" === typeof input.oauth && null !== input.oauth && _io6(input.oauth)) && ("object" === typeof input._metadata && null !== input._metadata && _io7(input._metadata));
32794
+ const _io1 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
32795
+ const _io2 = (input) => "geolocation" === input.name && "access" === input.access;
32796
+ const _io3 = (input) => "contacts" === input.name && ("read" === input.access || "write" === input.access);
32797
+ const _io4 = (input) => "photos" === input.name && ("read" === input.access || "write" === input.access);
32798
+ const _io5 = (input) => "camera" === input.name && "access" === input.access;
32799
+ const _io6 = (input) => Array.isArray(input.scopes) && input.scopes.every((elem) => "user_name" === elem || "user_phone" === elem || "user_birthday" === elem || "user_ci" === elem || "user_gender" === elem || "user_nationality" === elem || "user_email" === elem);
32800
+ const _io7 = (input) => Array.isArray(input.bundleFiles) && input.bundleFiles.every((elem) => "string" === typeof elem) && ("string" === typeof input.deploymentId && __typia_transform__isFormatUuid._isFormatUuid(input.deploymentId));
32801
+ const _iu0 = (input) => (() => {
32802
+ if ("camera" === input.name)
32803
+ return _io5(input);
32804
+ else if ("photos" === input.name)
32805
+ return _io4(input);
32806
+ else if ("contacts" === input.name)
32807
+ return _io3(input);
32808
+ else if ("geolocation" === input.name)
32809
+ return _io2(input);
32810
+ else if ("clipboard" === input.name)
32811
+ return _io1(input);
32812
+ else
32813
+ return false;
32814
+ })();
32815
+ const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.appName || _report(_exceptionable, {
32816
+ path: _path + ".appName",
32817
+ expected: "string",
32818
+ value: input.appName
32819
+ }), (Array.isArray(input.permissions) || _report(_exceptionable, {
32820
+ path: _path + ".permissions",
32821
+ expected: "Array<Permission>",
32822
+ value: input.permissions
32823
+ })) && input.permissions.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
32824
+ path: _path + ".permissions[" + _index4 + "]",
32825
+ expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
32826
+ value: elem
32827
+ })) && _vu0(elem, _path + ".permissions[" + _index4 + "]", _exceptionable) || _report(_exceptionable, {
32828
+ path: _path + ".permissions[" + _index4 + "]",
32829
+ expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
32830
+ value: elem
32831
+ })).every((flag) => flag) || _report(_exceptionable, {
32832
+ path: _path + ".permissions",
32833
+ expected: "Array<Permission>",
32834
+ value: input.permissions
32835
+ }), ("object" === typeof input.oauth && null !== input.oauth || _report(_exceptionable, {
32836
+ path: _path + ".oauth",
32837
+ expected: "__type",
32838
+ value: input.oauth
32839
+ })) && _vo6(input.oauth, _path + ".oauth", _exceptionable) || _report(_exceptionable, {
32840
+ path: _path + ".oauth",
32841
+ expected: "__type",
32842
+ value: input.oauth
32843
+ }), ("object" === typeof input._metadata && null !== input._metadata || _report(_exceptionable, {
32844
+ path: _path + "._metadata",
32845
+ expected: "__type.o1",
32846
+ value: input._metadata
32847
+ })) && _vo7(input._metadata, _path + "._metadata", _exceptionable) || _report(_exceptionable, {
32848
+ path: _path + "._metadata",
32849
+ expected: "__type.o1",
32850
+ value: input._metadata
32851
+ })].every((flag) => flag);
32852
+ const _vo1 = (input, _path, _exceptionable = true) => ["clipboard" === input.name || _report(_exceptionable, {
32853
+ path: _path + ".name",
32854
+ expected: '"clipboard"',
32855
+ value: input.name
32856
+ }), "read" === input.access || "write" === input.access || _report(_exceptionable, {
32857
+ path: _path + ".access",
32858
+ expected: '("read" | "write")',
32859
+ value: input.access
32860
+ })].every((flag) => flag);
32861
+ const _vo2 = (input, _path, _exceptionable = true) => ["geolocation" === input.name || _report(_exceptionable, {
32862
+ path: _path + ".name",
32863
+ expected: '"geolocation"',
32864
+ value: input.name
32865
+ }), "access" === input.access || _report(_exceptionable, {
32866
+ path: _path + ".access",
32867
+ expected: '"access"',
32868
+ value: input.access
32869
+ })].every((flag) => flag);
32870
+ const _vo3 = (input, _path, _exceptionable = true) => ["contacts" === input.name || _report(_exceptionable, {
32871
+ path: _path + ".name",
32872
+ expected: '"contacts"',
32873
+ value: input.name
32874
+ }), "read" === input.access || "write" === input.access || _report(_exceptionable, {
32875
+ path: _path + ".access",
32876
+ expected: '("read" | "write")',
32877
+ value: input.access
32878
+ })].every((flag) => flag);
32879
+ const _vo4 = (input, _path, _exceptionable = true) => ["photos" === input.name || _report(_exceptionable, {
32880
+ path: _path + ".name",
32881
+ expected: '"photos"',
32882
+ value: input.name
32883
+ }), "read" === input.access || "write" === input.access || _report(_exceptionable, {
32884
+ path: _path + ".access",
32885
+ expected: '("read" | "write")',
32886
+ value: input.access
32887
+ })].every((flag) => flag);
32888
+ const _vo5 = (input, _path, _exceptionable = true) => ["camera" === input.name || _report(_exceptionable, {
32889
+ path: _path + ".name",
32890
+ expected: '"camera"',
32891
+ value: input.name
32892
+ }), "access" === input.access || _report(_exceptionable, {
32893
+ path: _path + ".access",
32894
+ expected: '"access"',
32895
+ value: input.access
32896
+ })].every((flag) => flag);
32897
+ const _vo6 = (input, _path, _exceptionable = true) => [(Array.isArray(input.scopes) || _report(_exceptionable, {
32898
+ path: _path + ".scopes",
32899
+ expected: "Array<OAuthScope>",
32900
+ value: input.scopes
32901
+ })) && input.scopes.map((elem, _index5) => "user_name" === elem || "user_phone" === elem || "user_birthday" === elem || "user_ci" === elem || "user_gender" === elem || "user_nationality" === elem || "user_email" === elem || _report(_exceptionable, {
32902
+ path: _path + ".scopes[" + _index5 + "]",
32903
+ expected: '("user_birthday" | "user_ci" | "user_email" | "user_gender" | "user_name" | "user_nationality" | "user_phone")',
32904
+ value: elem
32905
+ })).every((flag) => flag) || _report(_exceptionable, {
32906
+ path: _path + ".scopes",
32907
+ expected: "Array<OAuthScope>",
32908
+ value: input.scopes
32909
+ })].every((flag) => flag);
32910
+ const _vo7 = (input, _path, _exceptionable = true) => [(Array.isArray(input.bundleFiles) || _report(_exceptionable, {
32911
+ path: _path + ".bundleFiles",
32912
+ expected: "Array<string>",
32913
+ value: input.bundleFiles
32914
+ })) && input.bundleFiles.map((elem, _index6) => "string" === typeof elem || _report(_exceptionable, {
32915
+ path: _path + ".bundleFiles[" + _index6 + "]",
32916
+ expected: "string",
32917
+ value: elem
32918
+ })).every((flag) => flag) || _report(_exceptionable, {
32919
+ path: _path + ".bundleFiles",
32920
+ expected: "Array<string>",
32921
+ value: input.bundleFiles
32922
+ }), "string" === typeof input.deploymentId && (__typia_transform__isFormatUuid._isFormatUuid(input.deploymentId) || _report(_exceptionable, {
32923
+ path: _path + ".deploymentId",
32924
+ expected: 'string & Format<"uuid">',
32925
+ value: input.deploymentId
32926
+ })) || _report(_exceptionable, {
32927
+ path: _path + ".deploymentId",
32928
+ expected: '(string & Format<"uuid">)',
32929
+ value: input.deploymentId
32930
+ })].every((flag) => flag);
32931
+ const _vu0 = (input, _path, _exceptionable = true) => (() => {
32932
+ if ("camera" === input.name)
32933
+ return _vo5(input, _path, _exceptionable);
32934
+ else if ("photos" === input.name)
32935
+ return _vo4(input, _path, _exceptionable);
32936
+ else if ("contacts" === input.name)
32937
+ return _vo3(input, _path, _exceptionable);
32938
+ else if ("geolocation" === input.name)
32939
+ return _vo2(input, _path, _exceptionable);
32940
+ else if ("clipboard" === input.name)
32941
+ return _vo1(input, _path, _exceptionable);
32942
+ else
32943
+ return _report(_exceptionable, {
32944
+ path: _path,
32945
+ expected: "(CameraPermission | PhotosPermission | ContactsPermission | GeolocationPermission | ClipboardPermission)",
32946
+ value: input
32947
+ });
32948
+ })();
32949
+ const __is = (input) => "object" === typeof input && null !== input && _io0(input);
32950
+ let errors;
32951
+ let _report;
32952
+ return (input) => {
32953
+ if (false === __is(input)) {
32954
+ errors = [];
32955
+ _report = __typia_transform__validateReport._validateReport(errors);
32956
+ ((input2, _path, _exceptionable = true) => ("object" === typeof input2 && null !== input2 || _report(true, {
32957
+ path: _path + "",
32958
+ expected: "AppManifest",
32959
+ value: input2
32960
+ })) && _vo0(input2, _path + "", true) || _report(true, {
32961
+ path: _path + "",
32962
+ expected: "AppManifest",
32963
+ value: input2
32964
+ }))(input, "$input", true);
32965
+ const success = 0 === errors.length;
32966
+ return success ? {
32967
+ success,
32968
+ data: input
32969
+ } : {
32970
+ success,
32971
+ errors,
32972
+ data: input
32973
+ };
32974
+ }
32975
+ return {
32976
+ success: true,
32977
+ data: input
32978
+ };
32979
+ };
32980
+ })();
32981
+
32788
32982
  // src/plugins/utils/createArtifact.ts
32983
+ async function validateZip(zipPath) {
32984
+ const appJsonString = await (0, import_cli.readZipContent)(zipPath, "app.json");
32985
+ const appJson = JSON.parse(appJsonString);
32986
+ const validated = validateAppManifest(appJson);
32987
+ if (!validated.success) {
32988
+ throw new Error("bedrock.config.ts \uAC12\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.");
32989
+ }
32990
+ }
32789
32991
  async function createArtifact(options, deps) {
32790
- const { inputJsFiles, outfile, appJsonPath } = options;
32992
+ const { inputJsFiles, outfile, appJsonPath, reactNativeVersion } = options;
32791
32993
  const bundleFiles = await Promise.all(
32792
32994
  inputJsFiles.map(async (result) => {
32793
32995
  const { compressed } = await createCompressedBytecode(result.path, import_path3.default.dirname(outfile), deps);
32794
- return { path: compressed, name: `bundle.${result.platform}.hbc.gz` };
32996
+ return { path: compressed, name: `bundle.${result.platform}.${reactNativeVersion}.hbc.gz` };
32795
32997
  })
32796
32998
  );
32797
32999
  await updateAppJsonMetadata({
@@ -32802,6 +33004,7 @@ async function createArtifact(options, deps) {
32802
33004
  files: [{ path: appJsonPath, name: "app.json" }, ...bundleFiles, ...options.additionalFilesToZip ?? []],
32803
33005
  outfile
32804
33006
  });
33007
+ await validateZip(outfile);
32805
33008
  return outfile;
32806
33009
  }
32807
33010
 
@@ -33210,6 +33413,7 @@ function appsInTossCreateArtifact(deploymentId) {
33210
33413
  handler: async ({ buildResults, appName, cwd }) => {
33211
33414
  const artifactOutfile = await createArtifact(
33212
33415
  {
33416
+ reactNativeVersion: REACT_NATIVE_VERSION,
33213
33417
  deploymentId,
33214
33418
  inputJsFiles: buildResults.map((buildResult) => ({
33215
33419
  path: buildResult.outfile,
@@ -33266,11 +33470,13 @@ function appsInTossDevServer(options) {
33266
33470
  config: {
33267
33471
  mpack: {
33268
33472
  devServer: {
33269
- enableRouterGen: false,
33270
33473
  middlewares: [
33271
33474
  createServerPermissionsMiddleware(options.permissions),
33272
33475
  createServerOAuthMiddleware(options.oauth)
33273
- ]
33476
+ ],
33477
+ routegen: {
33478
+ enabled: false
33479
+ }
33274
33480
  }
33275
33481
  }
33276
33482
  }
@@ -33323,14 +33529,13 @@ function appsInToss(options) {
33323
33529
  appsInTossEsbuildConfig(deploymentId)
33324
33530
  ];
33325
33531
  }
33326
-
33327
- // src/plugins/types.ts
33328
- init_cjs_shims();
33329
33532
  // Annotate the CommonJS export names for ESM import in node:
33330
33533
  0 && (module.exports = {
33331
33534
  appsInToss,
33332
33535
  appsInTossAppJson,
33333
- createArtifact
33536
+ createArtifact,
33537
+ validateAppManifest,
33538
+ validateZip
33334
33539
  });
33335
33540
  /*! Bundled license information:
33336
33541
 
@@ -1,4 +1,5 @@
1
1
  import { BedrockPluginCore } from 'react-native-bedrock/config';
2
+ import typia, { tags } from 'typia';
2
3
 
3
4
  type PermissionReadWrite = 'read' | 'write';
4
5
  type PermissionAccess = 'access';
@@ -41,7 +42,12 @@ type AppManifest = {
41
42
  oauth: {
42
43
  scopes: OAuthScope[];
43
44
  };
45
+ _metadata: {
46
+ bundleFiles: string[];
47
+ deploymentId: string & tags.Format<'uuid'>;
48
+ };
44
49
  };
50
+ declare const validateAppManifest: (input: unknown) => typia.IValidation<AppManifest>;
45
51
 
46
52
  interface AppsInTossPluginOptions {
47
53
  permissions: AppManifest['permissions'];
@@ -71,6 +77,7 @@ interface CreateArtifactOptions {
71
77
  path: string;
72
78
  platform: 'ios' | 'android';
73
79
  }[];
80
+ reactNativeVersion: `${string}_${string}_${string}`;
74
81
  appJsonPath: string;
75
82
  outfile: string;
76
83
  deploymentId: string;
@@ -79,6 +86,7 @@ interface CreateArtifactOptions {
79
86
  name: string;
80
87
  }[];
81
88
  }
89
+ declare function validateZip(zipPath: string): Promise<void>;
82
90
  declare function createArtifact(options: CreateArtifactOptions, deps: CreateCompressedBytecodeDependencies): Promise<string>;
83
91
 
84
- export { type AppManifest, type AppsInTossPluginOptions, type BuildResult, type CreateArtifactOptions, type OAuthScope, type Permission, appsInToss, appsInTossAppJson, createArtifact };
92
+ export { type AppManifest, type AppsInTossPluginOptions, type BuildResult, type CreateArtifactOptions, type OAuthScope, type Permission, appsInToss, appsInTossAppJson, createArtifact, validateAppManifest, validateZip };
@@ -1,4 +1,5 @@
1
1
  import { BedrockPluginCore } from 'react-native-bedrock/config';
2
+ import typia, { tags } from 'typia';
2
3
 
3
4
  type PermissionReadWrite = 'read' | 'write';
4
5
  type PermissionAccess = 'access';
@@ -41,7 +42,12 @@ type AppManifest = {
41
42
  oauth: {
42
43
  scopes: OAuthScope[];
43
44
  };
45
+ _metadata: {
46
+ bundleFiles: string[];
47
+ deploymentId: string & tags.Format<'uuid'>;
48
+ };
44
49
  };
50
+ declare const validateAppManifest: (input: unknown) => typia.IValidation<AppManifest>;
45
51
 
46
52
  interface AppsInTossPluginOptions {
47
53
  permissions: AppManifest['permissions'];
@@ -71,6 +77,7 @@ interface CreateArtifactOptions {
71
77
  path: string;
72
78
  platform: 'ios' | 'android';
73
79
  }[];
80
+ reactNativeVersion: `${string}_${string}_${string}`;
74
81
  appJsonPath: string;
75
82
  outfile: string;
76
83
  deploymentId: string;
@@ -79,6 +86,7 @@ interface CreateArtifactOptions {
79
86
  name: string;
80
87
  }[];
81
88
  }
89
+ declare function validateZip(zipPath: string): Promise<void>;
82
90
  declare function createArtifact(options: CreateArtifactOptions, deps: CreateCompressedBytecodeDependencies): Promise<string>;
83
91
 
84
- export { type AppManifest, type AppsInTossPluginOptions, type BuildResult, type CreateArtifactOptions, type OAuthScope, type Permission, appsInToss, appsInTossAppJson, createArtifact };
92
+ export { type AppManifest, type AppsInTossPluginOptions, type BuildResult, type CreateArtifactOptions, type OAuthScope, type Permission, appsInToss, appsInTossAppJson, createArtifact, validateAppManifest, validateZip };