@apps-in-toss/web-framework 0.0.12 → 0.0.14
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 +32 -56
- package/dist/config/index.d.ts +0 -15
- package/dist/prebuilt/dev.android.js +121 -73
- package/dist/prebuilt/dev.ios.js +121 -73
- package/dist/prebuilt/prod.android.js +1 -1
- package/dist/prebuilt/prod.ios.js +1 -1
- package/dist/prebuilt/prod.json +4 -4
- package/{src-web/index.d.ts → dist-web/bridge.d.ts} +2 -0
- package/{src-web/index.js → dist-web/bridge.js} +1 -1
- package/dist-web/checkoutPayment.d.ts +125 -0
- package/dist-web/executePayment.d.ts +266 -0
- package/dist-web/index.d.ts +70 -0
- package/dist-web/index.js +144 -0
- package/package.json +9 -9
- /package/{src-web → dist-web}/appLogin.d.ts +0 -0
- /package/{src-web → dist-web}/closeView.d.ts +0 -0
- /package/{src-web → dist-web}/fetchAlbumPhotos.d.ts +0 -0
- /package/{src-web → dist-web}/fetchContacts.d.ts +0 -0
- /package/{src-web → dist-web}/generateHapticFeedback.d.ts +0 -0
- /package/{src-web → dist-web}/getClipboardText.d.ts +0 -0
- /package/{src-web → dist-web}/getCurrentLocation.d.ts +0 -0
- /package/{src-web → dist-web}/getDeviceId.d.ts +0 -0
- /package/{src-web → dist-web}/getLocale.d.ts +0 -0
- /package/{src-web → dist-web}/getNetworkStatus.d.ts +0 -0
- /package/{src-web → dist-web}/getOperationalEnvironment.d.ts +0 -0
- /package/{src-web → dist-web}/getPlatformOS.d.ts +0 -0
- /package/{src-web → dist-web}/getSchemeUri.d.ts +0 -0
- /package/{src-web → dist-web}/openCamera.d.ts +0 -0
- /package/{src-web → dist-web}/setClipboardText.d.ts +0 -0
- /package/{src-web → dist-web}/setScreenAwakeMode.d.ts +0 -0
- /package/{src-web → dist-web}/setSecureScreen.d.ts +0 -0
- /package/{src-web → dist-web}/share.d.ts +0 -0
- /package/{src-web → dist-web}/startUpdateLocation.d.ts +0 -0
package/dist/cli/index.js
CHANGED
|
@@ -10055,11 +10055,11 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
10055
10055
|
return resolved2;
|
|
10056
10056
|
}(resolved, base, preserveSymlinks);
|
|
10057
10057
|
}
|
|
10058
|
-
function
|
|
10058
|
+
function fileURLToPath8(id) {
|
|
10059
10059
|
return "string" != typeof id || id.startsWith("file://") ? normalizeSlash((0, external_node_url_namespaceObject.fileURLToPath)(id)) : normalizeSlash(id);
|
|
10060
10060
|
}
|
|
10061
10061
|
function pathToFileURL(id) {
|
|
10062
|
-
return (0, external_node_url_namespaceObject.pathToFileURL)(
|
|
10062
|
+
return (0, external_node_url_namespaceObject.pathToFileURL)(fileURLToPath8(id)).toString();
|
|
10063
10063
|
}
|
|
10064
10064
|
const DEFAULT_CONDITIONS_SET = /* @__PURE__ */ new Set(["node", "import"]), DEFAULT_EXTENSIONS = [".mjs", ".cjs", ".js", ".json"], NOT_FOUND_ERRORS = /* @__PURE__ */ new Set(["ERR_MODULE_NOT_FOUND", "ERR_UNSUPPORTED_DIR_IMPORT", "MODULE_NOT_FOUND", "ERR_PACKAGE_PATH_NOT_EXPORTED"]);
|
|
10065
10065
|
function _tryModuleResolve(id, url, conditions) {
|
|
@@ -10072,11 +10072,11 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
10072
10072
|
function _resolve(id, options = {}) {
|
|
10073
10073
|
if ("string" != typeof id) {
|
|
10074
10074
|
if (!(id instanceof URL)) throw new TypeError("input must be a `string` or `URL`");
|
|
10075
|
-
id =
|
|
10075
|
+
id = fileURLToPath8(id);
|
|
10076
10076
|
}
|
|
10077
10077
|
if (/(node|data|http|https):/.test(id)) return id;
|
|
10078
10078
|
if (BUILTIN_MODULES.has(id)) return "node:" + id;
|
|
10079
|
-
if (id.startsWith("file://") && (id =
|
|
10079
|
+
if (id.startsWith("file://") && (id = fileURLToPath8(id)), isAbsolute(id)) try {
|
|
10080
10080
|
if ((0, external_node_fs_namespaceObject.statSync)(id).isFile()) return pathToFileURL(id);
|
|
10081
10081
|
} catch (error) {
|
|
10082
10082
|
if ("ENOENT" !== error?.code) throw error;
|
|
@@ -10106,7 +10106,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
10106
10106
|
return _resolve(id, options);
|
|
10107
10107
|
}
|
|
10108
10108
|
function resolvePathSync(id, options) {
|
|
10109
|
-
return
|
|
10109
|
+
return fileURLToPath8(resolveSync(id, options));
|
|
10110
10110
|
}
|
|
10111
10111
|
const ESM_RE = /([\s;]|^)(import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m, COMMENT_RE = /\/\*.+?\*\/|\/\/.*(?=[nr])/g;
|
|
10112
10112
|
function hasESMSyntax(code, opts = {}) {
|
|
@@ -54191,6 +54191,7 @@ var loadConfig = async () => {
|
|
|
54191
54191
|
init_esm_shims();
|
|
54192
54192
|
import fs8 from "fs";
|
|
54193
54193
|
import path20 from "path";
|
|
54194
|
+
import { fileURLToPath as fileURLToPath6 } from "url";
|
|
54194
54195
|
import { transform as transform2 } from "@babel/core";
|
|
54195
54196
|
|
|
54196
54197
|
// ../../.yarn/cache/uuidv7-npm-1.0.2-36affe4cb7-882187a3b6.zip/node_modules/uuidv7/dist/index.js
|
|
@@ -86516,14 +86517,13 @@ init_esm_shims2();
|
|
|
86516
86517
|
var __typia_transform__isFormatUuid = __toESM2(require_isFormatUuid(), 1);
|
|
86517
86518
|
var __typia_transform__validateReport = __toESM2(require_validateReport(), 1);
|
|
86518
86519
|
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.
|
|
86520
|
+
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
86521
|
const _io1 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
|
|
86521
86522
|
const _io2 = (input) => "geolocation" === input.name && "access" === input.access;
|
|
86522
86523
|
const _io3 = (input) => "contacts" === input.name && ("read" === input.access || "write" === input.access);
|
|
86523
86524
|
const _io4 = (input) => "photos" === input.name && ("read" === input.access || "write" === input.access);
|
|
86524
86525
|
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));
|
|
86526
|
+
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
86527
|
const _iu0 = (input) => (() => {
|
|
86528
86528
|
if ("camera" === input.name)
|
|
86529
86529
|
return _io5(input);
|
|
@@ -86546,33 +86546,25 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
86546
86546
|
path: _path + ".permissions",
|
|
86547
86547
|
expected: "Array<Permission>",
|
|
86548
86548
|
value: input.permissions
|
|
86549
|
-
})) && input.permissions.map((elem,
|
|
86550
|
-
path: _path + ".permissions[" +
|
|
86549
|
+
})) && input.permissions.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
86550
|
+
path: _path + ".permissions[" + _index3 + "]",
|
|
86551
86551
|
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
86552
86552
|
value: elem
|
|
86553
|
-
})) && _vu0(elem, _path + ".permissions[" +
|
|
86554
|
-
path: _path + ".permissions[" +
|
|
86553
|
+
})) && _vu0(elem, _path + ".permissions[" + _index3 + "]", _exceptionable) || _report(_exceptionable, {
|
|
86554
|
+
path: _path + ".permissions[" + _index3 + "]",
|
|
86555
86555
|
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
86556
86556
|
value: elem
|
|
86557
86557
|
})).every((flag) => flag) || _report(_exceptionable, {
|
|
86558
86558
|
path: _path + ".permissions",
|
|
86559
86559
|
expected: "Array<Permission>",
|
|
86560
86560
|
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
86561
|
}), ("object" === typeof input._metadata && null !== input._metadata || _report(_exceptionable, {
|
|
86570
86562
|
path: _path + "._metadata",
|
|
86571
|
-
expected: "__type
|
|
86563
|
+
expected: "__type",
|
|
86572
86564
|
value: input._metadata
|
|
86573
|
-
})) &&
|
|
86565
|
+
})) && _vo6(input._metadata, _path + "._metadata", _exceptionable) || _report(_exceptionable, {
|
|
86574
86566
|
path: _path + "._metadata",
|
|
86575
|
-
expected: "__type
|
|
86567
|
+
expected: "__type",
|
|
86576
86568
|
value: input._metadata
|
|
86577
86569
|
})].every((flag) => flag);
|
|
86578
86570
|
const _vo1 = (input, _path, _exceptionable = true) => ["clipboard" === input.name || _report(_exceptionable, {
|
|
@@ -86620,25 +86612,12 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
86620
86612
|
expected: '"access"',
|
|
86621
86613
|
value: input.access
|
|
86622
86614
|
})].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, {
|
|
86615
|
+
const _vo6 = (input, _path, _exceptionable = true) => [(Array.isArray(input.bundleFiles) || _report(_exceptionable, {
|
|
86637
86616
|
path: _path + ".bundleFiles",
|
|
86638
86617
|
expected: "Array<string>",
|
|
86639
86618
|
value: input.bundleFiles
|
|
86640
|
-
})) && input.bundleFiles.map((elem,
|
|
86641
|
-
path: _path + ".bundleFiles[" +
|
|
86619
|
+
})) && input.bundleFiles.map((elem, _index4) => "string" === typeof elem || _report(_exceptionable, {
|
|
86620
|
+
path: _path + ".bundleFiles[" + _index4 + "]",
|
|
86642
86621
|
expected: "string",
|
|
86643
86622
|
value: elem
|
|
86644
86623
|
})).every((flag) => flag) || _report(_exceptionable, {
|
|
@@ -86734,15 +86713,13 @@ async function createArtifact(options, deps) {
|
|
|
86734
86713
|
init_esm_shims2();
|
|
86735
86714
|
init_esm_shims2();
|
|
86736
86715
|
init_esm_shims2();
|
|
86737
|
-
init_esm_shims2();
|
|
86738
86716
|
async function appsInTossAppJson(options) {
|
|
86739
86717
|
const packageRoot = getPackageRoot2();
|
|
86740
86718
|
const handleAppJson = async (appName) => {
|
|
86741
86719
|
const appJsonPath = path12.join(packageRoot, ".bedrock", APP_MANIFEST_NAME);
|
|
86742
86720
|
const appJsonObject = {
|
|
86743
86721
|
appName,
|
|
86744
|
-
permissions: options.permissions
|
|
86745
|
-
oauth: options.oauth
|
|
86722
|
+
permissions: options.permissions
|
|
86746
86723
|
};
|
|
86747
86724
|
await fs5.promises.mkdir(path12.dirname(appJsonPath), { recursive: true });
|
|
86748
86725
|
try {
|
|
@@ -86750,8 +86727,7 @@ async function appsInTossAppJson(options) {
|
|
|
86750
86727
|
const existingAppJsonObject = JSON.parse(existingAppJson);
|
|
86751
86728
|
Object.assign(appJsonObject, existingAppJsonObject, {
|
|
86752
86729
|
appName,
|
|
86753
|
-
permissions: appJsonObject.permissions
|
|
86754
|
-
oauth: appJsonObject.oauth
|
|
86730
|
+
permissions: appJsonObject.permissions
|
|
86755
86731
|
});
|
|
86756
86732
|
} catch (error) {
|
|
86757
86733
|
}
|
|
@@ -93808,11 +93784,15 @@ async function findHermesBinary() {
|
|
|
93808
93784
|
}
|
|
93809
93785
|
async function compileHbc({ outdir, filePath }) {
|
|
93810
93786
|
const packageRoot = getPackageRoot();
|
|
93811
|
-
const
|
|
93787
|
+
const binary = await findHermesBinary();
|
|
93812
93788
|
const bedrockPath = path18.join(packageRoot, ".bedrock");
|
|
93813
93789
|
await fs6.promises.access(bedrockPath).catch(() => fs6.promises.mkdir(bedrockPath, { recursive: true }));
|
|
93814
|
-
const binaryPath = path18.join(bedrockPath,
|
|
93815
|
-
|
|
93790
|
+
const binaryPath = path18.join(bedrockPath, getHermesOSExe());
|
|
93791
|
+
try {
|
|
93792
|
+
await fs6.promises.access(binaryPath);
|
|
93793
|
+
} catch (error) {
|
|
93794
|
+
await fs6.promises.copyFile(binary, binaryPath);
|
|
93795
|
+
}
|
|
93816
93796
|
const outfile = path18.resolve(outdir, filePath.replace(new RegExp(`${path18.extname(filePath)}$`), ".hbc"));
|
|
93817
93797
|
await execa2(binaryPath, ["-w", "-emit-binary", "-out", outfile, filePath]);
|
|
93818
93798
|
return { outfile };
|
|
@@ -93986,7 +93966,7 @@ async function babelBuild({
|
|
|
93986
93966
|
deploymentId
|
|
93987
93967
|
}) {
|
|
93988
93968
|
const packageRoot = getPackageRoot();
|
|
93989
|
-
const prebuilt = import.meta.resolve(`@apps-in-toss/web-framework/prebuilt/prod/${platform3}`)
|
|
93969
|
+
const prebuilt = fileURLToPath6(import.meta.resolve(`@apps-in-toss/web-framework/prebuilt/prod/${platform3}`));
|
|
93990
93970
|
const bundle = await fs8.promises.readFile(prebuilt, "utf-8");
|
|
93991
93971
|
const result = await transform2(bundle, {
|
|
93992
93972
|
plugins: [
|
|
@@ -94028,7 +94008,6 @@ async function runPrebuildToBuild(cwd, config) {
|
|
|
94028
94008
|
const resolvedPlugins = await resolvePlugins([
|
|
94029
94009
|
appsInTossWeb(deploymentId, {
|
|
94030
94010
|
commands: config.web.commands,
|
|
94031
|
-
oauth: config.oauth,
|
|
94032
94011
|
permissions: config.permissions
|
|
94033
94012
|
})
|
|
94034
94013
|
]);
|
|
@@ -94054,7 +94033,7 @@ async function runPrebuildToBuild(cwd, config) {
|
|
|
94054
94033
|
}
|
|
94055
94034
|
}))
|
|
94056
94035
|
);
|
|
94057
|
-
const prodJsonFile = import.meta.resolve(`@apps-in-toss/web-framework/prebuilt/prod.json`)
|
|
94036
|
+
const prodJsonFile = fileURLToPath6(import.meta.resolve(`@apps-in-toss/web-framework/prebuilt/prod.json`));
|
|
94058
94037
|
const prodJson = await fs8.promises.readFile(prodJsonFile, "utf-8");
|
|
94059
94038
|
const prod = JSON.parse(prodJson);
|
|
94060
94039
|
const prodIos = prod.find((p) => p.platform === "ios");
|
|
@@ -94589,6 +94568,7 @@ var serve = (options, listeningListener) => {
|
|
|
94589
94568
|
init_esm_shims();
|
|
94590
94569
|
import fs9 from "fs";
|
|
94591
94570
|
import path21 from "path";
|
|
94571
|
+
import { fileURLToPath as fileURLToPath7 } from "url";
|
|
94592
94572
|
import { transform as transform3 } from "@babel/core";
|
|
94593
94573
|
|
|
94594
94574
|
// ../../.yarn/cache/hono-npm-4.7.4-9bd547bbac-b189c5b755.zip/node_modules/hono/dist/index.js
|
|
@@ -96206,7 +96186,7 @@ function parsePermissions(permissions) {
|
|
|
96206
96186
|
}
|
|
96207
96187
|
return Array.from(permissionMap.entries()).map(([name, accesses]) => `${name}:${Array.from(accesses).sort().join("")}`).sort().join(",");
|
|
96208
96188
|
}
|
|
96209
|
-
var createApp = ({ appName, web,
|
|
96189
|
+
var createApp = ({ appName, web, permissions, webViewProps }) => {
|
|
96210
96190
|
const app = new Hono2();
|
|
96211
96191
|
app.get("/status", (c5) => {
|
|
96212
96192
|
c5.header("X-React-Native-Project-Root", path21.resolve(__dirname, "..", "react-native"));
|
|
@@ -96215,13 +96195,9 @@ var createApp = ({ appName, web, oauth, permissions, webViewProps }) => {
|
|
|
96215
96195
|
app.get("/permissions", (c5) => {
|
|
96216
96196
|
return c5.text(parsePermissions(permissions));
|
|
96217
96197
|
});
|
|
96218
|
-
app.get("/oauth/scope", (c5) => {
|
|
96219
|
-
const scope = oauth.scopes.sort().join(";");
|
|
96220
|
-
return c5.text(scope);
|
|
96221
|
-
});
|
|
96222
96198
|
app.get("/index.bundle", async (c5) => {
|
|
96223
96199
|
const platform3 = c5.req.query("platform");
|
|
96224
|
-
const prebuilt = import.meta.resolve(`@apps-in-toss/web-framework/prebuilt/dev/${platform3}`)
|
|
96200
|
+
const prebuilt = fileURLToPath7(import.meta.resolve(`@apps-in-toss/web-framework/prebuilt/dev/${platform3}`));
|
|
96225
96201
|
const bundle = await fs9.promises.readFile(prebuilt, "utf-8");
|
|
96226
96202
|
c5.header("Surrogate-Control", "no-store");
|
|
96227
96203
|
c5.header("Cache-Control", "no-store, no-cache, must-revalidate, proxy-revalidate");
|
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
|
*/
|
|
@@ -154513,6 +154513,9 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
154513
154513
|
AppsInToss: function AppsInToss() {
|
|
154514
154514
|
return _AppsInToss;
|
|
154515
154515
|
},
|
|
154516
|
+
TossPay: function TossPay() {
|
|
154517
|
+
return _TossPay;
|
|
154518
|
+
},
|
|
154516
154519
|
WebView: function WebView() {
|
|
154517
154520
|
return _WebView;
|
|
154518
154521
|
},
|
|
@@ -154669,36 +154672,70 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
154669
154672
|
function _startUpdateLocation(eventParams) {
|
|
154670
154673
|
return appsInTossEvent.addEventListener("updateLocationEvent", eventParams);
|
|
154671
154674
|
}
|
|
154672
|
-
function
|
|
154675
|
+
function _checkoutPayment2(_x2) {
|
|
154676
|
+
return _checkoutPayment.apply(this, arguments);
|
|
154677
|
+
}
|
|
154678
|
+
function _checkoutPayment() {
|
|
154679
|
+
_checkoutPayment = _asyncToGenerator(_regeneratorRuntime().mark(function _callee2(options) {
|
|
154680
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
154681
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
154682
|
+
case 0:
|
|
154683
|
+
return _context2.abrupt("return", AppsInTossModule.checkoutPayment(options));
|
|
154684
|
+
case 1:
|
|
154685
|
+
case "end":
|
|
154686
|
+
return _context2.stop();
|
|
154687
|
+
}
|
|
154688
|
+
}, _callee2);
|
|
154689
|
+
}));
|
|
154690
|
+
return _checkoutPayment.apply(this, arguments);
|
|
154691
|
+
}
|
|
154692
|
+
function _executePayment2(_x3) {
|
|
154693
|
+
return _executePayment.apply(this, arguments);
|
|
154694
|
+
}
|
|
154695
|
+
function _executePayment() {
|
|
154696
|
+
_executePayment = _asyncToGenerator(_regeneratorRuntime().mark(function _callee3(options) {
|
|
154697
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
154698
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
154699
|
+
case 0:
|
|
154700
|
+
return _context3.abrupt("return", AppsInTossModule.executePayment(options));
|
|
154701
|
+
case 1:
|
|
154702
|
+
case "end":
|
|
154703
|
+
return _context3.stop();
|
|
154704
|
+
}
|
|
154705
|
+
}, _callee3);
|
|
154706
|
+
}));
|
|
154707
|
+
return _executePayment.apply(this, arguments);
|
|
154708
|
+
}
|
|
154709
|
+
function _setClipboardText(_x4) {
|
|
154673
154710
|
return _setClipboardText2.apply(this, arguments);
|
|
154674
154711
|
}
|
|
154675
154712
|
function _setClipboardText2() {
|
|
154676
|
-
_setClipboardText2 = _asyncToGenerator(_regeneratorRuntime().mark(function
|
|
154713
|
+
_setClipboardText2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee4(text) {
|
|
154677
154714
|
var permissionStatus;
|
|
154678
|
-
return _regeneratorRuntime().wrap(function
|
|
154679
|
-
while (1) switch (
|
|
154715
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
154716
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
154680
154717
|
case 0:
|
|
154681
|
-
|
|
154718
|
+
_context4.next = 2;
|
|
154682
154719
|
return requestPermission({
|
|
154683
154720
|
name: "clipboard",
|
|
154684
154721
|
access: "write"
|
|
154685
154722
|
});
|
|
154686
154723
|
case 2:
|
|
154687
|
-
permissionStatus =
|
|
154724
|
+
permissionStatus = _context4.sent;
|
|
154688
154725
|
if (!(permissionStatus === "denied")) {
|
|
154689
|
-
|
|
154726
|
+
_context4.next = 5;
|
|
154690
154727
|
break;
|
|
154691
154728
|
}
|
|
154692
154729
|
throw new Error("\uD074\uB9BD\uBCF4\uB4DC \uC4F0\uAE30 \uAD8C\uD55C\uC774 \uAC70\uBD80\uB418\uC5C8\uC5B4\uC694.");
|
|
154693
154730
|
case 5:
|
|
154694
|
-
return
|
|
154731
|
+
return _context4.abrupt("return", AppsInTossModule.setClipboardText({
|
|
154695
154732
|
text: text
|
|
154696
154733
|
}));
|
|
154697
154734
|
case 6:
|
|
154698
154735
|
case "end":
|
|
154699
|
-
return
|
|
154736
|
+
return _context4.stop();
|
|
154700
154737
|
}
|
|
154701
|
-
},
|
|
154738
|
+
}, _callee4);
|
|
154702
154739
|
}));
|
|
154703
154740
|
return _setClipboardText2.apply(this, arguments);
|
|
154704
154741
|
}
|
|
@@ -154706,189 +154743,189 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
154706
154743
|
return _getClipboardText2.apply(this, arguments);
|
|
154707
154744
|
}
|
|
154708
154745
|
function _getClipboardText2() {
|
|
154709
|
-
_getClipboardText2 = _asyncToGenerator(_regeneratorRuntime().mark(function
|
|
154746
|
+
_getClipboardText2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee5() {
|
|
154710
154747
|
var permissionStatus;
|
|
154711
|
-
return _regeneratorRuntime().wrap(function
|
|
154712
|
-
while (1) switch (
|
|
154748
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
154749
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
154713
154750
|
case 0:
|
|
154714
|
-
|
|
154751
|
+
_context5.next = 2;
|
|
154715
154752
|
return requestPermission({
|
|
154716
154753
|
name: "clipboard",
|
|
154717
154754
|
access: "read"
|
|
154718
154755
|
});
|
|
154719
154756
|
case 2:
|
|
154720
|
-
permissionStatus =
|
|
154757
|
+
permissionStatus = _context5.sent;
|
|
154721
154758
|
if (!(permissionStatus === "denied")) {
|
|
154722
|
-
|
|
154759
|
+
_context5.next = 5;
|
|
154723
154760
|
break;
|
|
154724
154761
|
}
|
|
154725
154762
|
throw new Error("\uD074\uB9BD\uBCF4\uB4DC \uC77D\uAE30 \uAD8C\uD55C\uC774 \uAC70\uBD80\uB418\uC5C8\uC5B4\uC694.");
|
|
154726
154763
|
case 5:
|
|
154727
|
-
return
|
|
154764
|
+
return _context5.abrupt("return", AppsInTossModule.getClipboardText({}));
|
|
154728
154765
|
case 6:
|
|
154729
154766
|
case "end":
|
|
154730
|
-
return
|
|
154767
|
+
return _context5.stop();
|
|
154731
154768
|
}
|
|
154732
|
-
},
|
|
154769
|
+
}, _callee5);
|
|
154733
154770
|
}));
|
|
154734
154771
|
return _getClipboardText2.apply(this, arguments);
|
|
154735
154772
|
}
|
|
154736
|
-
function _fetchContacts(
|
|
154773
|
+
function _fetchContacts(_x5) {
|
|
154737
154774
|
return _fetchContacts2.apply(this, arguments);
|
|
154738
154775
|
}
|
|
154739
154776
|
function _fetchContacts2() {
|
|
154740
|
-
_fetchContacts2 = _asyncToGenerator(_regeneratorRuntime().mark(function
|
|
154777
|
+
_fetchContacts2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee6(_ref3) {
|
|
154741
154778
|
var _contacts$nextOffset;
|
|
154742
154779
|
var size, offset, query, permissionStatus, contacts;
|
|
154743
|
-
return _regeneratorRuntime().wrap(function
|
|
154744
|
-
while (1) switch (
|
|
154780
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
154781
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
154745
154782
|
case 0:
|
|
154746
154783
|
size = _ref3.size, offset = _ref3.offset, query = _ref3.query;
|
|
154747
|
-
|
|
154784
|
+
_context6.next = 3;
|
|
154748
154785
|
return requestPermission({
|
|
154749
154786
|
name: "contacts",
|
|
154750
154787
|
access: "read"
|
|
154751
154788
|
});
|
|
154752
154789
|
case 3:
|
|
154753
|
-
permissionStatus =
|
|
154790
|
+
permissionStatus = _context6.sent;
|
|
154754
154791
|
if (!(permissionStatus === "denied")) {
|
|
154755
|
-
|
|
154792
|
+
_context6.next = 6;
|
|
154756
154793
|
break;
|
|
154757
154794
|
}
|
|
154758
154795
|
throw new Error("\uC5F0\uB77D\uCC98 \uAD8C\uD55C\uC774 \uAC70\uBD80\uB418\uC5C8\uC5B4\uC694.");
|
|
154759
154796
|
case 6:
|
|
154760
|
-
|
|
154797
|
+
_context6.next = 8;
|
|
154761
154798
|
return AppsInTossModule.fetchContacts({
|
|
154762
154799
|
size: size,
|
|
154763
154800
|
offset: offset,
|
|
154764
154801
|
query: query
|
|
154765
154802
|
});
|
|
154766
154803
|
case 8:
|
|
154767
|
-
contacts =
|
|
154768
|
-
return
|
|
154804
|
+
contacts = _context6.sent;
|
|
154805
|
+
return _context6.abrupt("return", {
|
|
154769
154806
|
result: contacts.result,
|
|
154770
154807
|
nextOffset: (_contacts$nextOffset = contacts.nextOffset) !== null && _contacts$nextOffset !== void 0 ? _contacts$nextOffset : null,
|
|
154771
154808
|
done: contacts.done
|
|
154772
154809
|
});
|
|
154773
154810
|
case 10:
|
|
154774
154811
|
case "end":
|
|
154775
|
-
return
|
|
154812
|
+
return _context6.stop();
|
|
154776
154813
|
}
|
|
154777
|
-
},
|
|
154814
|
+
}, _callee6);
|
|
154778
154815
|
}));
|
|
154779
154816
|
return _fetchContacts2.apply(this, arguments);
|
|
154780
154817
|
}
|
|
154781
154818
|
var DEFAULT_MAX_COUNT = 10;
|
|
154782
154819
|
var DEFAULT_MAX_WIDTH = 1024;
|
|
154783
|
-
function _fetchAlbumPhotos(
|
|
154820
|
+
function _fetchAlbumPhotos(_x6) {
|
|
154784
154821
|
return _fetchAlbumPhotos2.apply(this, arguments);
|
|
154785
154822
|
}
|
|
154786
154823
|
function _fetchAlbumPhotos2() {
|
|
154787
|
-
_fetchAlbumPhotos2 = _asyncToGenerator(_regeneratorRuntime().mark(function
|
|
154824
|
+
_fetchAlbumPhotos2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee7(options) {
|
|
154788
154825
|
var _options$maxCount, _options$maxWidth;
|
|
154789
154826
|
var permissionStatus, albumPhotos;
|
|
154790
|
-
return _regeneratorRuntime().wrap(function
|
|
154791
|
-
while (1) switch (
|
|
154827
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
154828
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
154792
154829
|
case 0:
|
|
154793
|
-
|
|
154830
|
+
_context7.next = 2;
|
|
154794
154831
|
return requestPermission({
|
|
154795
154832
|
name: "photos",
|
|
154796
154833
|
access: "read"
|
|
154797
154834
|
});
|
|
154798
154835
|
case 2:
|
|
154799
|
-
permissionStatus =
|
|
154836
|
+
permissionStatus = _context7.sent;
|
|
154800
154837
|
if (!(permissionStatus === "denied")) {
|
|
154801
|
-
|
|
154838
|
+
_context7.next = 5;
|
|
154802
154839
|
break;
|
|
154803
154840
|
}
|
|
154804
154841
|
throw new Error("\uC0AC\uC9C4\uCCA9 \uAD8C\uD55C\uC774 \uAC70\uBD80\uB418\uC5C8\uC5B4\uC694.");
|
|
154805
154842
|
case 5:
|
|
154806
|
-
|
|
154843
|
+
_context7.next = 7;
|
|
154807
154844
|
return AppsInTossModule.fetchAlbumPhotos(_objectSpread(_objectSpread({}, options), {}, {
|
|
154808
154845
|
maxCount: (_options$maxCount = options.maxCount) !== null && _options$maxCount !== void 0 ? _options$maxCount : DEFAULT_MAX_COUNT,
|
|
154809
154846
|
maxWidth: (_options$maxWidth = options.maxWidth) !== null && _options$maxWidth !== void 0 ? _options$maxWidth : DEFAULT_MAX_WIDTH
|
|
154810
154847
|
}));
|
|
154811
154848
|
case 7:
|
|
154812
|
-
albumPhotos =
|
|
154813
|
-
return
|
|
154849
|
+
albumPhotos = _context7.sent;
|
|
154850
|
+
return _context7.abrupt("return", albumPhotos);
|
|
154814
154851
|
case 9:
|
|
154815
154852
|
case "end":
|
|
154816
|
-
return
|
|
154853
|
+
return _context7.stop();
|
|
154817
154854
|
}
|
|
154818
|
-
},
|
|
154855
|
+
}, _callee7);
|
|
154819
154856
|
}));
|
|
154820
154857
|
return _fetchAlbumPhotos2.apply(this, arguments);
|
|
154821
154858
|
}
|
|
154822
|
-
function _getCurrentLocation(
|
|
154859
|
+
function _getCurrentLocation(_x7) {
|
|
154823
154860
|
return _getCurrentLocation2.apply(this, arguments);
|
|
154824
154861
|
}
|
|
154825
154862
|
function _getCurrentLocation2() {
|
|
154826
|
-
_getCurrentLocation2 = _asyncToGenerator(_regeneratorRuntime().mark(function
|
|
154863
|
+
_getCurrentLocation2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee8(options) {
|
|
154827
154864
|
var permissionStatus, position;
|
|
154828
|
-
return _regeneratorRuntime().wrap(function
|
|
154829
|
-
while (1) switch (
|
|
154865
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
154866
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
154830
154867
|
case 0:
|
|
154831
|
-
|
|
154868
|
+
_context8.next = 2;
|
|
154832
154869
|
return requestPermission({
|
|
154833
154870
|
name: "geolocation",
|
|
154834
154871
|
access: "access"
|
|
154835
154872
|
});
|
|
154836
154873
|
case 2:
|
|
154837
|
-
permissionStatus =
|
|
154874
|
+
permissionStatus = _context8.sent;
|
|
154838
154875
|
if (!(permissionStatus === "denied")) {
|
|
154839
|
-
|
|
154876
|
+
_context8.next = 5;
|
|
154840
154877
|
break;
|
|
154841
154878
|
}
|
|
154842
154879
|
throw new Error("\uC704\uCE58 \uAD8C\uD55C\uC774 \uAC70\uBD80\uB418\uC5C8\uC5B4\uC694.");
|
|
154843
154880
|
case 5:
|
|
154844
|
-
|
|
154881
|
+
_context8.next = 7;
|
|
154845
154882
|
return AppsInTossModule.getCurrentLocation(options);
|
|
154846
154883
|
case 7:
|
|
154847
|
-
position =
|
|
154848
|
-
return
|
|
154884
|
+
position = _context8.sent;
|
|
154885
|
+
return _context8.abrupt("return", position);
|
|
154849
154886
|
case 9:
|
|
154850
154887
|
case "end":
|
|
154851
|
-
return
|
|
154888
|
+
return _context8.stop();
|
|
154852
154889
|
}
|
|
154853
|
-
},
|
|
154890
|
+
}, _callee8);
|
|
154854
154891
|
}));
|
|
154855
154892
|
return _getCurrentLocation2.apply(this, arguments);
|
|
154856
154893
|
}
|
|
154857
|
-
function _openCamera(
|
|
154894
|
+
function _openCamera(_x8) {
|
|
154858
154895
|
return _openCamera2.apply(this, arguments);
|
|
154859
154896
|
}
|
|
154860
154897
|
function _openCamera2() {
|
|
154861
|
-
_openCamera2 = _asyncToGenerator(_regeneratorRuntime().mark(function
|
|
154898
|
+
_openCamera2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee9(options) {
|
|
154862
154899
|
var permissionStatus, photo;
|
|
154863
|
-
return _regeneratorRuntime().wrap(function
|
|
154864
|
-
while (1) switch (
|
|
154900
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
154901
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
154865
154902
|
case 0:
|
|
154866
|
-
|
|
154903
|
+
_context9.next = 2;
|
|
154867
154904
|
return requestPermission({
|
|
154868
154905
|
name: "camera",
|
|
154869
154906
|
access: "access"
|
|
154870
154907
|
});
|
|
154871
154908
|
case 2:
|
|
154872
|
-
permissionStatus =
|
|
154909
|
+
permissionStatus = _context9.sent;
|
|
154873
154910
|
if (!(permissionStatus === "denied")) {
|
|
154874
|
-
|
|
154911
|
+
_context9.next = 5;
|
|
154875
154912
|
break;
|
|
154876
154913
|
}
|
|
154877
154914
|
throw new Error("\uCE74\uBA54\uB77C \uAD8C\uD55C\uC774 \uAC70\uBD80\uB418\uC5C8\uC5B4\uC694.");
|
|
154878
154915
|
case 5:
|
|
154879
|
-
|
|
154916
|
+
_context9.next = 7;
|
|
154880
154917
|
return AppsInTossModule.openCamera(_objectSpread({
|
|
154881
154918
|
base64: false,
|
|
154882
154919
|
maxWidth: 1024
|
|
154883
154920
|
}, options));
|
|
154884
154921
|
case 7:
|
|
154885
|
-
photo =
|
|
154886
|
-
return
|
|
154922
|
+
photo = _context9.sent;
|
|
154923
|
+
return _context9.abrupt("return", photo);
|
|
154887
154924
|
case 9:
|
|
154888
154925
|
case "end":
|
|
154889
|
-
return
|
|
154926
|
+
return _context9.stop();
|
|
154890
154927
|
}
|
|
154891
|
-
},
|
|
154928
|
+
}, _callee9);
|
|
154892
154929
|
}));
|
|
154893
154930
|
return _openCamera2.apply(this, arguments);
|
|
154894
154931
|
}
|
|
@@ -154896,22 +154933,26 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
154896
154933
|
return _appLogin2.apply(this, arguments);
|
|
154897
154934
|
}
|
|
154898
154935
|
function _appLogin2() {
|
|
154899
|
-
_appLogin2 = _asyncToGenerator(_regeneratorRuntime().mark(function
|
|
154900
|
-
return _regeneratorRuntime().wrap(function
|
|
154901
|
-
while (1) switch (
|
|
154936
|
+
_appLogin2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee10() {
|
|
154937
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
154938
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
154902
154939
|
case 0:
|
|
154903
|
-
return
|
|
154940
|
+
return _context10.abrupt("return", AppsInTossModule.appLogin({}));
|
|
154904
154941
|
case 1:
|
|
154905
154942
|
case "end":
|
|
154906
|
-
return
|
|
154943
|
+
return _context10.stop();
|
|
154907
154944
|
}
|
|
154908
|
-
},
|
|
154945
|
+
}, _callee10);
|
|
154909
154946
|
}));
|
|
154910
154947
|
return _appLogin2.apply(this, arguments);
|
|
154911
154948
|
}
|
|
154912
154949
|
function _getOperationalEnvironment() {
|
|
154913
154950
|
return AppsInTossModule.operationalEnvironment;
|
|
154914
154951
|
}
|
|
154952
|
+
var _TossPay = {
|
|
154953
|
+
checkoutPayment: _checkoutPayment2,
|
|
154954
|
+
executePayment: _executePayment2
|
|
154955
|
+
};
|
|
154915
154956
|
var import_react_native_webview = _$$_REQUIRE(_dependencyMap[3], "@react-native-bedrock/native/react-native-webview");
|
|
154916
154957
|
var import_react = _$$_REQUIRE(_dependencyMap[4], "react");
|
|
154917
154958
|
var import_react_native_bedrock4 = _$$_REQUIRE(_dependencyMap[0], "react-native-bedrock");
|
|
@@ -154922,6 +154963,12 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
154922
154963
|
appLogin: function appLogin() {
|
|
154923
154964
|
return _appLogin;
|
|
154924
154965
|
},
|
|
154966
|
+
checkoutPayment: function checkoutPayment() {
|
|
154967
|
+
return _checkoutPayment2;
|
|
154968
|
+
},
|
|
154969
|
+
executePayment: function executePayment() {
|
|
154970
|
+
return _executePayment2;
|
|
154971
|
+
},
|
|
154925
154972
|
fetchAlbumPhotos: function fetchAlbumPhotos() {
|
|
154926
154973
|
return _fetchAlbumPhotos;
|
|
154927
154974
|
},
|
|
@@ -155035,6 +155082,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
155035
155082
|
0 && (module.exports = {
|
|
155036
155083
|
Accuracy: Accuracy,
|
|
155037
155084
|
AppsInToss: _AppsInToss,
|
|
155085
|
+
TossPay: _TossPay,
|
|
155038
155086
|
WebView: _WebView,
|
|
155039
155087
|
appLogin: _appLogin,
|
|
155040
155088
|
env: _env,
|