@apps-in-toss/web-framework 0.0.7 → 0.0.8

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.
Files changed (59) hide show
  1. package/dist/chunk-5AYTRYXW.js +27 -0
  2. package/dist/chunk-MHAJE5QI.js +34 -0
  3. package/dist/cli.cjs +4528 -543
  4. package/dist/cli.d.cts +2 -1
  5. package/dist/cli.d.ts +2 -1
  6. package/dist/cli.js +3486 -493
  7. package/dist/config/index.cjs +17 -4
  8. package/dist/config/index.d.cts +19 -3
  9. package/dist/config/index.d.ts +19 -3
  10. package/dist/config/index.js +7714 -23
  11. package/dist/lib-EUN4APCZ.js +1007 -0
  12. package/dist/lib-OD73GAMK.js +1007 -0
  13. package/package.json +14 -12
  14. package/src-web/closeView.d.ts +24 -0
  15. package/src-web/generateHapticFeedback.d.ts +52 -0
  16. package/src-web/getDeviceId.d.ts +32 -0
  17. package/src-web/getLocale.d.ts +31 -0
  18. package/src-web/getNetworkStatus.d.ts +55 -0
  19. package/src-web/getSchemeUri.d.ts +26 -0
  20. package/src-web/index.js +1 -0
  21. package/src-web/setScreenAwakeMode.d.ts +69 -0
  22. package/src-web/setSecureScreen.d.ts +34 -0
  23. package/src-web/share.d.ts +37 -0
  24. package/dist/chunk-CH3CIAIW.js +0 -7688
  25. package/dist/chunk-DI2VGQ6M.js +0 -53
  26. package/dist/chunk-HL7M3JLX.js +0 -53
  27. package/dist/chunk-I3ZDGLIW.js +0 -19
  28. package/dist/chunk-LJBVSTWE.js +0 -7687
  29. package/dist/chunk-OMIGZ2S7.js +0 -7689
  30. package/dist/chunk-TZCMTMV7.js +0 -38
  31. package/dist/cli/index.cjs +0 -644
  32. package/dist/cli/index.d.cts +0 -2
  33. package/dist/cli/index.d.ts +0 -2
  34. package/dist/cli/index.js +0 -592
  35. package/dist/closeView.d.ts +0 -1
  36. package/dist/generateHapticFeedback.d.ts +0 -1
  37. package/dist/getDeviceId.d.ts +0 -1
  38. package/dist/getLocale.d.ts +0 -1
  39. package/dist/getNetworkStatus.d.ts +0 -1
  40. package/dist/getSchemeUri.d.ts +0 -1
  41. package/dist/index.cjs +0 -18
  42. package/dist/index.d.cts +0 -2
  43. package/dist/index.js +0 -1
  44. package/dist/plugins/index.cjs +0 -7682
  45. package/dist/plugins/index.d.cts +0 -15
  46. package/dist/plugins/index.d.ts +0 -15
  47. package/dist/plugins/index.js +0 -11
  48. package/dist/setScreenAwakeMode.d.ts +0 -1
  49. package/dist/setSecureScreen.d.ts +0 -1
  50. package/dist/share.d.ts +0 -1
  51. package/react-native/.bedrock/.env.js +0 -4
  52. /package/{dist → src-web}/fetchAlbumPhotos.d.ts +0 -0
  53. /package/{dist → src-web}/fetchContacts.d.ts +0 -0
  54. /package/{dist → src-web}/getClipboardText.d.ts +0 -0
  55. /package/{dist → src-web}/getCurrentLocation.d.ts +0 -0
  56. /package/{dist → src-web}/index.d.ts +0 -0
  57. /package/{dist → src-web}/openCamera.d.ts +0 -0
  58. /package/{dist → src-web}/setClipboardText.d.ts +0 -0
  59. /package/{dist → src-web}/startUpdateLocation.d.ts +0 -0
@@ -7912,6 +7912,12 @@ function appsInTossWebBuild(options) {
7912
7912
  }
7913
7913
  await import_fs2.default.promises.rename(src, dest);
7914
7914
  }
7915
+ const webDistFiles = await import_fs2.default.promises.readdir(webDistDir);
7916
+ if (webDistFiles.length === 0) {
7917
+ throw new Error(
7918
+ `\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.`
7919
+ );
7920
+ }
7915
7921
  }
7916
7922
  }
7917
7923
  };
@@ -7919,7 +7925,8 @@ function appsInTossWebBuild(options) {
7919
7925
  function appsInTossWeb(options) {
7920
7926
  return [
7921
7927
  (0, import_plugins.appsInToss)({
7922
- permissions: options.permissions
7928
+ permissions: options.permissions,
7929
+ oauth: options.oauth
7923
7930
  }),
7924
7931
  appsInTossBabelConfig(options),
7925
7932
  appsInTossWebBuild(options),
@@ -7937,7 +7944,11 @@ var AppsInTossConfigSchema = import_zod.z.object({
7937
7944
  build: import_zod.z.string()
7938
7945
  })
7939
7946
  }),
7940
- permissions: import_zod.z.array(import_zod.z.custom())
7947
+ permissions: import_zod.z.array(import_zod.z.custom()),
7948
+ outdir: import_zod.z.string().default("dist"),
7949
+ oauth: import_zod.z.object({
7950
+ scopes: import_zod.z.array(import_zod.z.custom())
7951
+ })
7941
7952
  });
7942
7953
  var defineConfig = async (config) => {
7943
7954
  const reactNativeProjectDir = await findUp("react-native", { type: "directory", cwd: __dirname });
@@ -7950,11 +7961,13 @@ var defineConfig = async (config) => {
7950
7961
  appsInTossWeb({
7951
7962
  port: config.web.port,
7952
7963
  commands: config.web.commands,
7953
- permissions: config.permissions
7964
+ permissions: config.permissions,
7965
+ oauth: config.oauth
7954
7966
  })
7955
7967
  ],
7956
7968
  cwd: reactNativeProjectDir,
7957
- entryFile: import_path3.default.join(reactNativeProjectDir, "src", "_app.tsx")
7969
+ entryFile: import_path3.default.join(reactNativeProjectDir, "src", "_app.tsx"),
7970
+ outdir: config.outdir
7958
7971
  });
7959
7972
  };
7960
7973
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,4 +1,4 @@
1
- import { Permission } from '@apps-in-toss/framework/plugins';
1
+ import { Permission, OAuthScope } from '@apps-in-toss/framework/plugins';
2
2
  import { BedrockConfigResponse } from 'react-native-bedrock/config';
3
3
  import { z } from 'zod';
4
4
 
@@ -30,8 +30,21 @@ declare const AppsInTossConfigSchema: z.ZodObject<{
30
30
  };
31
31
  }>;
32
32
  permissions: z.ZodArray<z.ZodType<Permission, z.ZodTypeDef, Permission>, "many">;
33
+ outdir: z.ZodDefault<z.ZodString>;
34
+ oauth: z.ZodObject<{
35
+ scopes: z.ZodArray<z.ZodType<OAuthScope, z.ZodTypeDef, OAuthScope>, "many">;
36
+ }, "strip", z.ZodTypeAny, {
37
+ scopes: OAuthScope[];
38
+ }, {
39
+ scopes: OAuthScope[];
40
+ }>;
33
41
  }, "strip", z.ZodTypeAny, {
42
+ permissions: Permission[];
43
+ oauth: {
44
+ scopes: OAuthScope[];
45
+ };
34
46
  appName: string;
47
+ outdir: string;
35
48
  web: {
36
49
  port: number;
37
50
  commands: {
@@ -39,8 +52,11 @@ declare const AppsInTossConfigSchema: z.ZodObject<{
39
52
  build: string;
40
53
  };
41
54
  };
42
- permissions: Permission[];
43
55
  }, {
56
+ permissions: Permission[];
57
+ oauth: {
58
+ scopes: OAuthScope[];
59
+ };
44
60
  appName: string;
45
61
  web: {
46
62
  port: number;
@@ -49,7 +65,7 @@ declare const AppsInTossConfigSchema: z.ZodObject<{
49
65
  build: string;
50
66
  };
51
67
  };
52
- permissions: Permission[];
68
+ outdir?: string | undefined;
53
69
  }>;
54
70
  type AppsInTossConfig = z.infer<typeof AppsInTossConfigSchema>;
55
71
  declare const defineConfig: (config: z.input<typeof AppsInTossConfigSchema>) => Promise<BedrockConfigResponse>;
@@ -1,4 +1,4 @@
1
- import { Permission } from '@apps-in-toss/framework/plugins';
1
+ import { Permission, OAuthScope } from '@apps-in-toss/framework/plugins';
2
2
  import { BedrockConfigResponse } from 'react-native-bedrock/config';
3
3
  import { z } from 'zod';
4
4
 
@@ -30,8 +30,21 @@ declare const AppsInTossConfigSchema: z.ZodObject<{
30
30
  };
31
31
  }>;
32
32
  permissions: z.ZodArray<z.ZodType<Permission, z.ZodTypeDef, Permission>, "many">;
33
+ outdir: z.ZodDefault<z.ZodString>;
34
+ oauth: z.ZodObject<{
35
+ scopes: z.ZodArray<z.ZodType<OAuthScope, z.ZodTypeDef, OAuthScope>, "many">;
36
+ }, "strip", z.ZodTypeAny, {
37
+ scopes: OAuthScope[];
38
+ }, {
39
+ scopes: OAuthScope[];
40
+ }>;
33
41
  }, "strip", z.ZodTypeAny, {
42
+ permissions: Permission[];
43
+ oauth: {
44
+ scopes: OAuthScope[];
45
+ };
34
46
  appName: string;
47
+ outdir: string;
35
48
  web: {
36
49
  port: number;
37
50
  commands: {
@@ -39,8 +52,11 @@ declare const AppsInTossConfigSchema: z.ZodObject<{
39
52
  build: string;
40
53
  };
41
54
  };
42
- permissions: Permission[];
43
55
  }, {
56
+ permissions: Permission[];
57
+ oauth: {
58
+ scopes: OAuthScope[];
59
+ };
44
60
  appName: string;
45
61
  web: {
46
62
  port: number;
@@ -49,7 +65,7 @@ declare const AppsInTossConfigSchema: z.ZodObject<{
49
65
  build: string;
50
66
  };
51
67
  };
52
- permissions: Permission[];
68
+ outdir?: string | undefined;
53
69
  }>;
54
70
  type AppsInTossConfig = z.infer<typeof AppsInTossConfigSchema>;
55
71
  declare const defineConfig: (config: z.input<typeof AppsInTossConfigSchema>) => Promise<BedrockConfigResponse>;