@apps-in-toss/web-framework 0.0.12 → 0.0.13
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/cli/index.js +15 -45
- package/dist/config/index.d.ts +0 -15
- package/dist/prebuilt/prod.json +2 -2
- package/package.json +4 -4
package/dist/cli/index.js
CHANGED
|
@@ -86516,14 +86516,13 @@ init_esm_shims2();
|
|
|
86516
86516
|
var __typia_transform__isFormatUuid = __toESM2(require_isFormatUuid(), 1);
|
|
86517
86517
|
var __typia_transform__validateReport = __toESM2(require_validateReport(), 1);
|
|
86518
86518
|
var validateAppManifest = /* @__PURE__ */ (() => {
|
|
86519
|
-
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.
|
|
86519
|
+
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._metadata && null !== input._metadata && _io6(input._metadata));
|
|
86520
86520
|
const _io1 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
|
|
86521
86521
|
const _io2 = (input) => "geolocation" === input.name && "access" === input.access;
|
|
86522
86522
|
const _io3 = (input) => "contacts" === input.name && ("read" === input.access || "write" === input.access);
|
|
86523
86523
|
const _io4 = (input) => "photos" === input.name && ("read" === input.access || "write" === input.access);
|
|
86524
86524
|
const _io5 = (input) => "camera" === input.name && "access" === input.access;
|
|
86525
|
-
const _io6 = (input) => Array.isArray(input.
|
|
86526
|
-
const _io7 = (input) => Array.isArray(input.bundleFiles) && input.bundleFiles.every((elem) => "string" === typeof elem) && ("string" === typeof input.deploymentId && __typia_transform__isFormatUuid._isFormatUuid(input.deploymentId));
|
|
86525
|
+
const _io6 = (input) => Array.isArray(input.bundleFiles) && input.bundleFiles.every((elem) => "string" === typeof elem) && ("string" === typeof input.deploymentId && __typia_transform__isFormatUuid._isFormatUuid(input.deploymentId));
|
|
86527
86526
|
const _iu0 = (input) => (() => {
|
|
86528
86527
|
if ("camera" === input.name)
|
|
86529
86528
|
return _io5(input);
|
|
@@ -86546,33 +86545,25 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
86546
86545
|
path: _path + ".permissions",
|
|
86547
86546
|
expected: "Array<Permission>",
|
|
86548
86547
|
value: input.permissions
|
|
86549
|
-
})) && input.permissions.map((elem,
|
|
86550
|
-
path: _path + ".permissions[" +
|
|
86548
|
+
})) && input.permissions.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
86549
|
+
path: _path + ".permissions[" + _index3 + "]",
|
|
86551
86550
|
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
86552
86551
|
value: elem
|
|
86553
|
-
})) && _vu0(elem, _path + ".permissions[" +
|
|
86554
|
-
path: _path + ".permissions[" +
|
|
86552
|
+
})) && _vu0(elem, _path + ".permissions[" + _index3 + "]", _exceptionable) || _report(_exceptionable, {
|
|
86553
|
+
path: _path + ".permissions[" + _index3 + "]",
|
|
86555
86554
|
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
86556
86555
|
value: elem
|
|
86557
86556
|
})).every((flag) => flag) || _report(_exceptionable, {
|
|
86558
86557
|
path: _path + ".permissions",
|
|
86559
86558
|
expected: "Array<Permission>",
|
|
86560
86559
|
value: input.permissions
|
|
86561
|
-
}), ("object" === typeof input.oauth && null !== input.oauth || _report(_exceptionable, {
|
|
86562
|
-
path: _path + ".oauth",
|
|
86563
|
-
expected: "__type",
|
|
86564
|
-
value: input.oauth
|
|
86565
|
-
})) && _vo6(input.oauth, _path + ".oauth", _exceptionable) || _report(_exceptionable, {
|
|
86566
|
-
path: _path + ".oauth",
|
|
86567
|
-
expected: "__type",
|
|
86568
|
-
value: input.oauth
|
|
86569
86560
|
}), ("object" === typeof input._metadata && null !== input._metadata || _report(_exceptionable, {
|
|
86570
86561
|
path: _path + "._metadata",
|
|
86571
|
-
expected: "__type
|
|
86562
|
+
expected: "__type",
|
|
86572
86563
|
value: input._metadata
|
|
86573
|
-
})) &&
|
|
86564
|
+
})) && _vo6(input._metadata, _path + "._metadata", _exceptionable) || _report(_exceptionable, {
|
|
86574
86565
|
path: _path + "._metadata",
|
|
86575
|
-
expected: "__type
|
|
86566
|
+
expected: "__type",
|
|
86576
86567
|
value: input._metadata
|
|
86577
86568
|
})].every((flag) => flag);
|
|
86578
86569
|
const _vo1 = (input, _path, _exceptionable = true) => ["clipboard" === input.name || _report(_exceptionable, {
|
|
@@ -86620,25 +86611,12 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
86620
86611
|
expected: '"access"',
|
|
86621
86612
|
value: input.access
|
|
86622
86613
|
})].every((flag) => flag);
|
|
86623
|
-
const _vo6 = (input, _path, _exceptionable = true) => [(Array.isArray(input.
|
|
86624
|
-
path: _path + ".scopes",
|
|
86625
|
-
expected: "Array<OAuthScope>",
|
|
86626
|
-
value: input.scopes
|
|
86627
|
-
})) && 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, {
|
|
86628
|
-
path: _path + ".scopes[" + _index5 + "]",
|
|
86629
|
-
expected: '("user_birthday" | "user_ci" | "user_email" | "user_gender" | "user_name" | "user_nationality" | "user_phone")',
|
|
86630
|
-
value: elem
|
|
86631
|
-
})).every((flag) => flag) || _report(_exceptionable, {
|
|
86632
|
-
path: _path + ".scopes",
|
|
86633
|
-
expected: "Array<OAuthScope>",
|
|
86634
|
-
value: input.scopes
|
|
86635
|
-
})].every((flag) => flag);
|
|
86636
|
-
const _vo7 = (input, _path, _exceptionable = true) => [(Array.isArray(input.bundleFiles) || _report(_exceptionable, {
|
|
86614
|
+
const _vo6 = (input, _path, _exceptionable = true) => [(Array.isArray(input.bundleFiles) || _report(_exceptionable, {
|
|
86637
86615
|
path: _path + ".bundleFiles",
|
|
86638
86616
|
expected: "Array<string>",
|
|
86639
86617
|
value: input.bundleFiles
|
|
86640
|
-
})) && input.bundleFiles.map((elem,
|
|
86641
|
-
path: _path + ".bundleFiles[" +
|
|
86618
|
+
})) && input.bundleFiles.map((elem, _index4) => "string" === typeof elem || _report(_exceptionable, {
|
|
86619
|
+
path: _path + ".bundleFiles[" + _index4 + "]",
|
|
86642
86620
|
expected: "string",
|
|
86643
86621
|
value: elem
|
|
86644
86622
|
})).every((flag) => flag) || _report(_exceptionable, {
|
|
@@ -86734,15 +86712,13 @@ async function createArtifact(options, deps) {
|
|
|
86734
86712
|
init_esm_shims2();
|
|
86735
86713
|
init_esm_shims2();
|
|
86736
86714
|
init_esm_shims2();
|
|
86737
|
-
init_esm_shims2();
|
|
86738
86715
|
async function appsInTossAppJson(options) {
|
|
86739
86716
|
const packageRoot = getPackageRoot2();
|
|
86740
86717
|
const handleAppJson = async (appName) => {
|
|
86741
86718
|
const appJsonPath = path12.join(packageRoot, ".bedrock", APP_MANIFEST_NAME);
|
|
86742
86719
|
const appJsonObject = {
|
|
86743
86720
|
appName,
|
|
86744
|
-
permissions: options.permissions
|
|
86745
|
-
oauth: options.oauth
|
|
86721
|
+
permissions: options.permissions
|
|
86746
86722
|
};
|
|
86747
86723
|
await fs5.promises.mkdir(path12.dirname(appJsonPath), { recursive: true });
|
|
86748
86724
|
try {
|
|
@@ -86750,8 +86726,7 @@ async function appsInTossAppJson(options) {
|
|
|
86750
86726
|
const existingAppJsonObject = JSON.parse(existingAppJson);
|
|
86751
86727
|
Object.assign(appJsonObject, existingAppJsonObject, {
|
|
86752
86728
|
appName,
|
|
86753
|
-
permissions: appJsonObject.permissions
|
|
86754
|
-
oauth: appJsonObject.oauth
|
|
86729
|
+
permissions: appJsonObject.permissions
|
|
86755
86730
|
});
|
|
86756
86731
|
} catch (error) {
|
|
86757
86732
|
}
|
|
@@ -94028,7 +94003,6 @@ async function runPrebuildToBuild(cwd, config) {
|
|
|
94028
94003
|
const resolvedPlugins = await resolvePlugins([
|
|
94029
94004
|
appsInTossWeb(deploymentId, {
|
|
94030
94005
|
commands: config.web.commands,
|
|
94031
|
-
oauth: config.oauth,
|
|
94032
94006
|
permissions: config.permissions
|
|
94033
94007
|
})
|
|
94034
94008
|
]);
|
|
@@ -96206,7 +96180,7 @@ function parsePermissions(permissions) {
|
|
|
96206
96180
|
}
|
|
96207
96181
|
return Array.from(permissionMap.entries()).map(([name, accesses]) => `${name}:${Array.from(accesses).sort().join("")}`).sort().join(",");
|
|
96208
96182
|
}
|
|
96209
|
-
var createApp = ({ appName, web,
|
|
96183
|
+
var createApp = ({ appName, web, permissions, webViewProps }) => {
|
|
96210
96184
|
const app = new Hono2();
|
|
96211
96185
|
app.get("/status", (c5) => {
|
|
96212
96186
|
c5.header("X-React-Native-Project-Root", path21.resolve(__dirname, "..", "react-native"));
|
|
@@ -96215,10 +96189,6 @@ var createApp = ({ appName, web, oauth, permissions, webViewProps }) => {
|
|
|
96215
96189
|
app.get("/permissions", (c5) => {
|
|
96216
96190
|
return c5.text(parsePermissions(permissions));
|
|
96217
96191
|
});
|
|
96218
|
-
app.get("/oauth/scope", (c5) => {
|
|
96219
|
-
const scope = oauth.scopes.sort().join(";");
|
|
96220
|
-
return c5.text(scope);
|
|
96221
|
-
});
|
|
96222
96192
|
app.get("/index.bundle", async (c5) => {
|
|
96223
96193
|
const platform3 = c5.req.query("platform");
|
|
96224
96194
|
const prebuilt = import.meta.resolve(`@apps-in-toss/web-framework/prebuilt/dev/${platform3}`).replace("file://", "");
|
package/dist/config/index.d.ts
CHANGED
|
@@ -27,18 +27,6 @@ type CameraPermission = {
|
|
|
27
27
|
access: PermissionAccess;
|
|
28
28
|
};
|
|
29
29
|
type Permission = ClipboardPermission | GeolocationPermission | ContactsPermission | PhotosPermission | CameraPermission;
|
|
30
|
-
/**
|
|
31
|
-
* OAuth 인증시 사용할 수 있는 Scope 값이에요.
|
|
32
|
-
*
|
|
33
|
-
* - `user_name`: 유저 이름이에요.
|
|
34
|
-
* - `user_phone`: 유저 휴대폰 번호예요.
|
|
35
|
-
* - `user_birthday`: 유저 생년월일이에요.
|
|
36
|
-
* - `user_ci`: 유저를 식별하는 키인 CI(Connection Information) 값이에요.
|
|
37
|
-
* - `user_gender`: 유저의 성별이에요.
|
|
38
|
-
* - `user_nationality`: 유저의 국적이에요.
|
|
39
|
-
* - `user_email`: 유저의 이메일이에요. 토스 회원의 email이 존재하지 않는 경우 null 응답을 반환해요.
|
|
40
|
-
*/
|
|
41
|
-
type OAuthScope = 'user_name' | 'user_phone' | 'user_birthday' | 'user_ci' | 'user_gender' | 'user_nationality' | 'user_email';
|
|
42
30
|
interface AppsInTossWebConfig {
|
|
43
31
|
appName: string;
|
|
44
32
|
web: {
|
|
@@ -88,9 +76,6 @@ interface AppsInTossWebConfig {
|
|
|
88
76
|
overScrollMode?: 'never' | 'always' | 'auto';
|
|
89
77
|
};
|
|
90
78
|
permissions: Permission[];
|
|
91
|
-
oauth: {
|
|
92
|
-
scopes: OAuthScope[];
|
|
93
|
-
};
|
|
94
79
|
/**
|
|
95
80
|
* @default 'dist'
|
|
96
81
|
*/
|
package/dist/prebuilt/prod.json
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
{
|
|
3
3
|
"platform": "ios",
|
|
4
4
|
"totalModuleCount": 360,
|
|
5
|
-
"duration":
|
|
5
|
+
"duration": 407.6906250000002,
|
|
6
6
|
"size": 130797
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
9
|
"platform": "android",
|
|
10
10
|
"totalModuleCount": 360,
|
|
11
|
-
"duration":
|
|
11
|
+
"duration": 406.40241600000013,
|
|
12
12
|
"size": 130533
|
|
13
13
|
}
|
|
14
14
|
]
|
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.
|
|
4
|
+
"version": "0.0.13",
|
|
5
5
|
"description": "Web Framework for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prepack": "yarn build",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"config.d.ts"
|
|
51
51
|
],
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@apps-in-toss/framework": "0.0.
|
|
53
|
+
"@apps-in-toss/framework": "0.0.13",
|
|
54
54
|
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
55
55
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7",
|
|
56
56
|
"@babel/plugin-proposal-numeric-separator": "^7.16.7",
|
|
@@ -95,11 +95,11 @@
|
|
|
95
95
|
"zod": "^3.24.1"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@apps-in-toss/cli": "0.0.
|
|
98
|
+
"@apps-in-toss/cli": "0.0.13",
|
|
99
99
|
"@babel/core": "7.23.9"
|
|
100
100
|
},
|
|
101
101
|
"publishConfig": {
|
|
102
102
|
"access": "public"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "c5fa235b136ffaefc7687b35b473de5f6a1dca6f"
|
|
105
105
|
}
|