@apps-in-toss/framework 0.0.8 → 0.0.10

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.
@@ -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,12 +42,51 @@ 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'];
48
54
  oauth: AppManifest['oauth'];
49
55
  }
56
+ declare function appsInTossAppJson(options: AppsInTossPluginOptions): Promise<BedrockPluginCore>;
50
57
  declare function appsInToss(options: AppsInTossPluginOptions): (BedrockPluginCore | Promise<BedrockPluginCore>)[];
51
58
 
52
- export { type AppManifest, type AppsInTossPluginOptions, type OAuthScope, type Permission, appsInToss };
59
+ interface CompileHbcOptions {
60
+ outdir: string;
61
+ filePath: string;
62
+ }
63
+ type CompileHbcFunc = (options: CompileHbcOptions) => Promise<{
64
+ outfile: string;
65
+ }>;
66
+
67
+ interface CreateCompressedBytecodeDependencies {
68
+ compileHbcFn: CompileHbcFunc;
69
+ }
70
+
71
+ type BuildResult = {
72
+ jsFile: string;
73
+ platform: 'ios' | 'android';
74
+ };
75
+ interface CreateArtifactOptions {
76
+ inputJsFiles: {
77
+ path: string;
78
+ platform: 'ios' | 'android';
79
+ }[];
80
+ reactNativeVersion: `${string}_${string}_${string}`;
81
+ appJsonPath: string;
82
+ outfile: string;
83
+ deploymentId: string;
84
+ additionalFilesToZip?: {
85
+ path: string;
86
+ name: string;
87
+ }[];
88
+ }
89
+ declare function validateZip(zipPath: string): Promise<void>;
90
+ declare function createArtifact(options: CreateArtifactOptions, deps: CreateCompressedBytecodeDependencies): Promise<string>;
91
+
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,12 +42,51 @@ 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'];
48
54
  oauth: AppManifest['oauth'];
49
55
  }
56
+ declare function appsInTossAppJson(options: AppsInTossPluginOptions): Promise<BedrockPluginCore>;
50
57
  declare function appsInToss(options: AppsInTossPluginOptions): (BedrockPluginCore | Promise<BedrockPluginCore>)[];
51
58
 
52
- export { type AppManifest, type AppsInTossPluginOptions, type OAuthScope, type Permission, appsInToss };
59
+ interface CompileHbcOptions {
60
+ outdir: string;
61
+ filePath: string;
62
+ }
63
+ type CompileHbcFunc = (options: CompileHbcOptions) => Promise<{
64
+ outfile: string;
65
+ }>;
66
+
67
+ interface CreateCompressedBytecodeDependencies {
68
+ compileHbcFn: CompileHbcFunc;
69
+ }
70
+
71
+ type BuildResult = {
72
+ jsFile: string;
73
+ platform: 'ios' | 'android';
74
+ };
75
+ interface CreateArtifactOptions {
76
+ inputJsFiles: {
77
+ path: string;
78
+ platform: 'ios' | 'android';
79
+ }[];
80
+ reactNativeVersion: `${string}_${string}_${string}`;
81
+ appJsonPath: string;
82
+ outfile: string;
83
+ deploymentId: string;
84
+ additionalFilesToZip?: {
85
+ path: string;
86
+ name: string;
87
+ }[];
88
+ }
89
+ declare function validateZip(zipPath: string): Promise<void>;
90
+ declare function createArtifact(options: CreateArtifactOptions, deps: CreateCompressedBytecodeDependencies): Promise<string>;
91
+
92
+ export { type AppManifest, type AppsInTossPluginOptions, type BuildResult, type CreateArtifactOptions, type OAuthScope, type Permission, appsInToss, appsInTossAppJson, createArtifact, validateAppManifest, validateZip };