@apps-in-toss/web-framework 0.0.0-dev.1741174124399 → 0.0.0-dev.1741252452371
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/config/index.cjs +17 -4
- package/dist/config/index.d.cts +19 -3
- package/dist/config/index.d.ts +19 -3
- package/dist/config/index.js +17 -4
- package/package.json +9 -9
package/dist/config/index.cjs
CHANGED
|
@@ -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:
|
package/dist/config/index.d.cts
CHANGED
|
@@ -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
|
-
|
|
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>;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -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
|
-
|
|
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>;
|
package/dist/config/index.js
CHANGED
|
@@ -7918,6 +7918,12 @@ function appsInTossWebBuild(options) {
|
|
|
7918
7918
|
}
|
|
7919
7919
|
await fs3.promises.rename(src, dest);
|
|
7920
7920
|
}
|
|
7921
|
+
const webDistFiles = await fs3.promises.readdir(webDistDir);
|
|
7922
|
+
if (webDistFiles.length === 0) {
|
|
7923
|
+
throw new Error(
|
|
7924
|
+
`\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.`
|
|
7925
|
+
);
|
|
7926
|
+
}
|
|
7921
7927
|
}
|
|
7922
7928
|
}
|
|
7923
7929
|
};
|
|
@@ -7925,7 +7931,8 @@ function appsInTossWebBuild(options) {
|
|
|
7925
7931
|
function appsInTossWeb(options) {
|
|
7926
7932
|
return [
|
|
7927
7933
|
appsInToss({
|
|
7928
|
-
permissions: options.permissions
|
|
7934
|
+
permissions: options.permissions,
|
|
7935
|
+
oauth: options.oauth
|
|
7929
7936
|
}),
|
|
7930
7937
|
appsInTossBabelConfig(options),
|
|
7931
7938
|
appsInTossWebBuild(options),
|
|
@@ -7943,7 +7950,11 @@ var AppsInTossConfigSchema = z.object({
|
|
|
7943
7950
|
build: z.string()
|
|
7944
7951
|
})
|
|
7945
7952
|
}),
|
|
7946
|
-
permissions: z.array(z.custom())
|
|
7953
|
+
permissions: z.array(z.custom()),
|
|
7954
|
+
outdir: z.string().default("dist"),
|
|
7955
|
+
oauth: z.object({
|
|
7956
|
+
scopes: z.array(z.custom())
|
|
7957
|
+
})
|
|
7947
7958
|
});
|
|
7948
7959
|
var defineConfig = async (config) => {
|
|
7949
7960
|
const reactNativeProjectDir = await findUp("react-native", { type: "directory", cwd: __dirname });
|
|
@@ -7956,11 +7967,13 @@ var defineConfig = async (config) => {
|
|
|
7956
7967
|
appsInTossWeb({
|
|
7957
7968
|
port: config.web.port,
|
|
7958
7969
|
commands: config.web.commands,
|
|
7959
|
-
permissions: config.permissions
|
|
7970
|
+
permissions: config.permissions,
|
|
7971
|
+
oauth: config.oauth
|
|
7960
7972
|
})
|
|
7961
7973
|
],
|
|
7962
7974
|
cwd: reactNativeProjectDir,
|
|
7963
|
-
entryFile: path11.join(reactNativeProjectDir, "src", "_app.tsx")
|
|
7975
|
+
entryFile: path11.join(reactNativeProjectDir, "src", "_app.tsx"),
|
|
7976
|
+
outdir: config.outdir
|
|
7964
7977
|
});
|
|
7965
7978
|
};
|
|
7966
7979
|
export {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/web-framework",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-dev.
|
|
4
|
+
"version": "0.0.0-dev.1741252452371",
|
|
5
5
|
"description": "Web Framework for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prepack": "yarn build",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"react-native"
|
|
39
39
|
],
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@react-native-bedrock/bridgepack": "0.0.
|
|
41
|
+
"@react-native-bedrock/bridgepack": "0.0.11",
|
|
42
42
|
"@types/babel__core": "^7.20.5",
|
|
43
43
|
"@types/debug": "^4",
|
|
44
44
|
"@types/node": "^22.10.2",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"vitest": "^3.0.5"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@apps-in-toss/babel-plugin-json": "0.0.0-dev.
|
|
54
|
-
"@apps-in-toss/cli": "0.0.0-dev.
|
|
55
|
-
"@apps-in-toss/framework": "0.0.0-dev.
|
|
53
|
+
"@apps-in-toss/babel-plugin-json": "0.0.0-dev.1741252452371",
|
|
54
|
+
"@apps-in-toss/cli": "0.0.0-dev.1741252452371",
|
|
55
|
+
"@apps-in-toss/framework": "0.0.0-dev.1741252452371",
|
|
56
56
|
"@babel/core": "7.23.9",
|
|
57
57
|
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
58
58
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7",
|
|
@@ -65,18 +65,18 @@
|
|
|
65
65
|
"@babel/preset-react": "^7.16.7",
|
|
66
66
|
"@babel/preset-typescript": "^7.16.7",
|
|
67
67
|
"@babel/runtime": "7.18.9",
|
|
68
|
-
"@react-native-bedrock/mpack-next": "0.0.
|
|
69
|
-
"@react-native-bedrock/native": "0.0.
|
|
68
|
+
"@react-native-bedrock/mpack-next": "0.0.11",
|
|
69
|
+
"@react-native-bedrock/native": "0.0.11",
|
|
70
70
|
"@types/react": "18.3.3",
|
|
71
71
|
"es-toolkit": "^1.32.0",
|
|
72
72
|
"picocolors": "^1.1.1",
|
|
73
73
|
"react": "18.2.0",
|
|
74
74
|
"react-native": "0.72.6",
|
|
75
|
-
"react-native-bedrock": "0.0.
|
|
75
|
+
"react-native-bedrock": "0.0.11",
|
|
76
76
|
"zod": "^3.24.1"
|
|
77
77
|
},
|
|
78
78
|
"publishConfig": {
|
|
79
79
|
"access": "public"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "c4d6d0dd12bd86940962b76917971751b1ab78a1"
|
|
82
82
|
}
|