@apps-in-toss/web-framework 2.0.8 → 2.0.9
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 +0 -471
- package/dist/config/index.js +520 -1
- package/package.json +8 -8
package/dist/cli/index.js
CHANGED
|
@@ -638,152 +638,6 @@ var require_cross_spawn = __commonJS({
|
|
|
638
638
|
}
|
|
639
639
|
});
|
|
640
640
|
|
|
641
|
-
// ../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_validateReport.js
|
|
642
|
-
var require_validateReport = __commonJS({
|
|
643
|
-
"../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_validateReport.js"(exports) {
|
|
644
|
-
"use strict";
|
|
645
|
-
init_esm_shims();
|
|
646
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
647
|
-
exports._validateReport = void 0;
|
|
648
|
-
var _validateReport2 = (array) => {
|
|
649
|
-
const reportable = (path3) => {
|
|
650
|
-
if (array.length === 0)
|
|
651
|
-
return true;
|
|
652
|
-
const last = array[array.length - 1].path;
|
|
653
|
-
return path3.length > last.length || last.substring(0, path3.length) !== path3;
|
|
654
|
-
};
|
|
655
|
-
return (exceptable, error) => {
|
|
656
|
-
var _a;
|
|
657
|
-
if (exceptable && reportable(error.path)) {
|
|
658
|
-
if (error.value === void 0)
|
|
659
|
-
(_a = error.description) !== null && _a !== void 0 ? _a : error.description = [
|
|
660
|
-
"The value at this path is `undefined`.",
|
|
661
|
-
"",
|
|
662
|
-
`Please fill the \`${error.expected}\` typed value next time.`
|
|
663
|
-
].join("\n");
|
|
664
|
-
array.push(error);
|
|
665
|
-
}
|
|
666
|
-
return false;
|
|
667
|
-
};
|
|
668
|
-
};
|
|
669
|
-
exports._validateReport = _validateReport2;
|
|
670
|
-
}
|
|
671
|
-
});
|
|
672
|
-
|
|
673
|
-
// ../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_createStandardSchema.js
|
|
674
|
-
var require_createStandardSchema = __commonJS({
|
|
675
|
-
"../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_createStandardSchema.js"(exports) {
|
|
676
|
-
"use strict";
|
|
677
|
-
init_esm_shims();
|
|
678
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
679
|
-
exports._createStandardSchema = void 0;
|
|
680
|
-
var _createStandardSchema2 = (fn) => Object.assign(fn, {
|
|
681
|
-
"~standard": {
|
|
682
|
-
version: 1,
|
|
683
|
-
vendor: "typia",
|
|
684
|
-
validate: (input) => {
|
|
685
|
-
const result = fn(input);
|
|
686
|
-
if (result.success) {
|
|
687
|
-
return {
|
|
688
|
-
value: result.data
|
|
689
|
-
};
|
|
690
|
-
} else {
|
|
691
|
-
return {
|
|
692
|
-
issues: result.errors.map((error) => ({
|
|
693
|
-
message: `expected ${error.expected}, got ${error.value}`,
|
|
694
|
-
path: typiaPathToStandardSchemaPath(error.path)
|
|
695
|
-
}))
|
|
696
|
-
};
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
});
|
|
701
|
-
exports._createStandardSchema = _createStandardSchema2;
|
|
702
|
-
var PathParserState;
|
|
703
|
-
(function(PathParserState2) {
|
|
704
|
-
PathParserState2[PathParserState2["Start"] = 0] = "Start";
|
|
705
|
-
PathParserState2[PathParserState2["Property"] = 1] = "Property";
|
|
706
|
-
PathParserState2[PathParserState2["StringKey"] = 2] = "StringKey";
|
|
707
|
-
PathParserState2[PathParserState2["NumberKey"] = 3] = "NumberKey";
|
|
708
|
-
})(PathParserState || (PathParserState = {}));
|
|
709
|
-
var typiaPathToStandardSchemaPath = (path3) => {
|
|
710
|
-
if (!path3.startsWith("$input")) {
|
|
711
|
-
throw new Error(`Invalid path: ${JSON.stringify(path3)}`);
|
|
712
|
-
}
|
|
713
|
-
const segments = [];
|
|
714
|
-
let currentSegment = "";
|
|
715
|
-
let state = PathParserState.Start;
|
|
716
|
-
let index = "$input".length - 1;
|
|
717
|
-
while (index < path3.length - 1) {
|
|
718
|
-
index++;
|
|
719
|
-
const char = path3[index];
|
|
720
|
-
if (state === PathParserState.Property) {
|
|
721
|
-
if (char === "." || char === "[") {
|
|
722
|
-
segments.push({
|
|
723
|
-
key: currentSegment
|
|
724
|
-
});
|
|
725
|
-
state = PathParserState.Start;
|
|
726
|
-
} else if (index === path3.length - 1) {
|
|
727
|
-
currentSegment += char;
|
|
728
|
-
segments.push({
|
|
729
|
-
key: currentSegment
|
|
730
|
-
});
|
|
731
|
-
index++;
|
|
732
|
-
state = PathParserState.Start;
|
|
733
|
-
} else {
|
|
734
|
-
currentSegment += char;
|
|
735
|
-
}
|
|
736
|
-
} else if (state === PathParserState.StringKey) {
|
|
737
|
-
if (char === '"') {
|
|
738
|
-
segments.push({
|
|
739
|
-
key: JSON.parse(currentSegment + char)
|
|
740
|
-
});
|
|
741
|
-
index += 2;
|
|
742
|
-
state = PathParserState.Start;
|
|
743
|
-
} else if (char === "\\") {
|
|
744
|
-
currentSegment += path3[index];
|
|
745
|
-
index++;
|
|
746
|
-
currentSegment += path3[index];
|
|
747
|
-
} else {
|
|
748
|
-
currentSegment += char;
|
|
749
|
-
}
|
|
750
|
-
} else if (state === PathParserState.NumberKey) {
|
|
751
|
-
if (char === "]") {
|
|
752
|
-
segments.push({
|
|
753
|
-
key: Number.parseInt(currentSegment)
|
|
754
|
-
});
|
|
755
|
-
index++;
|
|
756
|
-
state = PathParserState.Start;
|
|
757
|
-
} else {
|
|
758
|
-
currentSegment += char;
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
if (state === PathParserState.Start && index < path3.length - 1) {
|
|
762
|
-
const newChar = path3[index];
|
|
763
|
-
currentSegment = "";
|
|
764
|
-
if (newChar === "[") {
|
|
765
|
-
if (path3[index + 1] === '"') {
|
|
766
|
-
state = PathParserState.StringKey;
|
|
767
|
-
index++;
|
|
768
|
-
currentSegment = '"';
|
|
769
|
-
} else {
|
|
770
|
-
state = PathParserState.NumberKey;
|
|
771
|
-
}
|
|
772
|
-
} else if (newChar === ".") {
|
|
773
|
-
state = PathParserState.Property;
|
|
774
|
-
} else {
|
|
775
|
-
throw new Error("Unreachable: pointer points invalid character");
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
}
|
|
779
|
-
if (state !== PathParserState.Start) {
|
|
780
|
-
throw new Error(`Failed to parse path: ${JSON.stringify(path3)}`);
|
|
781
|
-
}
|
|
782
|
-
return segments;
|
|
783
|
-
};
|
|
784
|
-
}
|
|
785
|
-
});
|
|
786
|
-
|
|
787
641
|
// ../../../.yarn/__virtual__/ws-virtual-a7b6462606/0/cache/ws-npm-8.18.1-166778b26f-e498965d69.zip/node_modules/ws/lib/constants.js
|
|
788
642
|
var require_constants = __commonJS({
|
|
789
643
|
"../../../.yarn/__virtual__/ws-virtual-a7b6462606/0/cache/ws-npm-8.18.1-166778b26f-e498965d69.zip/node_modules/ws/lib/constants.js"(exports, module) {
|
|
@@ -13705,320 +13559,6 @@ var {
|
|
|
13705
13559
|
getCancelSignal: getCancelSignal2
|
|
13706
13560
|
} = getIpcExport();
|
|
13707
13561
|
|
|
13708
|
-
// src/plugins/appsInTossWeb.ts
|
|
13709
|
-
init_esm_shims();
|
|
13710
|
-
var __typia_transform__validateReport = __toESM(require_validateReport(), 1);
|
|
13711
|
-
var __typia_transform__createStandardSchema = __toESM(require_createStandardSchema(), 1);
|
|
13712
|
-
var validateAppInTossWebPluginOptions = (() => {
|
|
13713
|
-
const _io0 = (input) => "object" === typeof input.commands && null !== input.commands && _io1(input.commands) && ("object" === typeof input.brand && null !== input.brand && _io2(input.brand)) && (void 0 === input.navigationBar || "object" === typeof input.navigationBar && null !== input.navigationBar && false === Array.isArray(input.navigationBar) && _io3(input.navigationBar)) && (void 0 === input.webViewProps || "object" === typeof input.webViewProps && null !== input.webViewProps && false === Array.isArray(input.webViewProps) && _io8(input.webViewProps)) && (Array.isArray(input.permissions) && input.permissions.every((elem) => "object" === typeof elem && null !== elem && _iu0(elem)));
|
|
13714
|
-
const _io1 = (input) => "string" === typeof input.build;
|
|
13715
|
-
const _io2 = (input) => "string" === typeof input.displayName && "string" === typeof input.primaryColor && "string" === typeof input.icon;
|
|
13716
|
-
const _io3 = (input) => (void 0 === input.withBackButton || "boolean" === typeof input.withBackButton) && (void 0 === input.withHomeButton || "boolean" === typeof input.withHomeButton) && (void 0 === input.initialAccessoryButton || "object" === typeof input.initialAccessoryButton && null !== input.initialAccessoryButton && _io4(input.initialAccessoryButton));
|
|
13717
|
-
const _io4 = (input) => "string" === typeof input.id && "string" === typeof input.title && ("object" === typeof input.icon && null !== input.icon && _iu1(input.icon));
|
|
13718
|
-
const _io5 = (input) => "object" === typeof input.source && null !== input.source && _io6(input.source) && (null !== input.name && void 0 === input.name);
|
|
13719
|
-
const _io6 = (input) => "string" === typeof input.uri;
|
|
13720
|
-
const _io7 = (input) => "string" === typeof input.name && (null !== input.source && void 0 === input.source);
|
|
13721
|
-
const _io8 = (input) => (void 0 === input.type || "partner" === input.type || "external" === input.type || "game" === input.type) && (void 0 === input.allowsInlineMediaPlayback || "boolean" === typeof input.allowsInlineMediaPlayback) && (void 0 === input.bounces || "boolean" === typeof input.bounces) && (void 0 === input.pullToRefreshEnabled || "boolean" === typeof input.pullToRefreshEnabled) && (void 0 === input.overScrollMode || "always" === input.overScrollMode || "content" === input.overScrollMode || "never" === input.overScrollMode) && (void 0 === input.mediaPlaybackRequiresUserAction || "boolean" === typeof input.mediaPlaybackRequiresUserAction) && (void 0 === input.allowsBackForwardNavigationGestures || "boolean" === typeof input.allowsBackForwardNavigationGestures);
|
|
13722
|
-
const _io9 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
|
|
13723
|
-
const _io10 = (input) => "geolocation" === input.name && "access" === input.access;
|
|
13724
|
-
const _io11 = (input) => "contacts" === input.name && ("read" === input.access || "write" === input.access);
|
|
13725
|
-
const _io12 = (input) => "photos" === input.name && ("read" === input.access || "write" === input.access);
|
|
13726
|
-
const _io13 = (input) => "camera" === input.name && "access" === input.access;
|
|
13727
|
-
const _iu0 = (input) => (() => {
|
|
13728
|
-
if ("camera" === input.name)
|
|
13729
|
-
return _io13(input);
|
|
13730
|
-
else if ("photos" === input.name)
|
|
13731
|
-
return _io12(input);
|
|
13732
|
-
else if ("contacts" === input.name)
|
|
13733
|
-
return _io11(input);
|
|
13734
|
-
else if ("geolocation" === input.name)
|
|
13735
|
-
return _io10(input);
|
|
13736
|
-
else if ("clipboard" === input.name)
|
|
13737
|
-
return _io9(input);
|
|
13738
|
-
else
|
|
13739
|
-
return false;
|
|
13740
|
-
})();
|
|
13741
|
-
const _iu1 = (input) => (() => {
|
|
13742
|
-
if ("string" === typeof input.name)
|
|
13743
|
-
return _io7(input);
|
|
13744
|
-
else if ("object" === typeof input.source && null !== input.source && _io6(input.source))
|
|
13745
|
-
return _io5(input);
|
|
13746
|
-
else
|
|
13747
|
-
return false;
|
|
13748
|
-
})();
|
|
13749
|
-
const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.commands && null !== input.commands || _report(_exceptionable, {
|
|
13750
|
-
path: _path + ".commands",
|
|
13751
|
-
expected: "__type",
|
|
13752
|
-
value: input.commands
|
|
13753
|
-
})) && _vo1(input.commands, _path + ".commands", _exceptionable) || _report(_exceptionable, {
|
|
13754
|
-
path: _path + ".commands",
|
|
13755
|
-
expected: "__type",
|
|
13756
|
-
value: input.commands
|
|
13757
|
-
}), ("object" === typeof input.brand && null !== input.brand || _report(_exceptionable, {
|
|
13758
|
-
path: _path + ".brand",
|
|
13759
|
-
expected: "__type.o1",
|
|
13760
|
-
value: input.brand
|
|
13761
|
-
})) && _vo2(input.brand, _path + ".brand", _exceptionable) || _report(_exceptionable, {
|
|
13762
|
-
path: _path + ".brand",
|
|
13763
|
-
expected: "__type.o1",
|
|
13764
|
-
value: input.brand
|
|
13765
|
-
}), void 0 === input.navigationBar || ("object" === typeof input.navigationBar && null !== input.navigationBar && false === Array.isArray(input.navigationBar) || _report(_exceptionable, {
|
|
13766
|
-
path: _path + ".navigationBar",
|
|
13767
|
-
expected: "(__type.o2 | undefined)",
|
|
13768
|
-
value: input.navigationBar
|
|
13769
|
-
})) && _vo3(input.navigationBar, _path + ".navigationBar", _exceptionable) || _report(_exceptionable, {
|
|
13770
|
-
path: _path + ".navigationBar",
|
|
13771
|
-
expected: "(__type.o2 | undefined)",
|
|
13772
|
-
value: input.navigationBar
|
|
13773
|
-
}), void 0 === input.webViewProps || ("object" === typeof input.webViewProps && null !== input.webViewProps && false === Array.isArray(input.webViewProps) || _report(_exceptionable, {
|
|
13774
|
-
path: _path + ".webViewProps",
|
|
13775
|
-
expected: "(__type.o6 | undefined)",
|
|
13776
|
-
value: input.webViewProps
|
|
13777
|
-
})) && _vo8(input.webViewProps, _path + ".webViewProps", _exceptionable) || _report(_exceptionable, {
|
|
13778
|
-
path: _path + ".webViewProps",
|
|
13779
|
-
expected: "(__type.o6 | undefined)",
|
|
13780
|
-
value: input.webViewProps
|
|
13781
|
-
}), (Array.isArray(input.permissions) || _report(_exceptionable, {
|
|
13782
|
-
path: _path + ".permissions",
|
|
13783
|
-
expected: "Array<Permission>",
|
|
13784
|
-
value: input.permissions
|
|
13785
|
-
})) && input.permissions.map((elem, _index2) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
13786
|
-
path: _path + ".permissions[" + _index2 + "]",
|
|
13787
|
-
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
13788
|
-
value: elem
|
|
13789
|
-
})) && _vu0(elem, _path + ".permissions[" + _index2 + "]", _exceptionable) || _report(_exceptionable, {
|
|
13790
|
-
path: _path + ".permissions[" + _index2 + "]",
|
|
13791
|
-
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
13792
|
-
value: elem
|
|
13793
|
-
})).every((flag) => flag) || _report(_exceptionable, {
|
|
13794
|
-
path: _path + ".permissions",
|
|
13795
|
-
expected: "Array<Permission>",
|
|
13796
|
-
value: input.permissions
|
|
13797
|
-
})].every((flag) => flag);
|
|
13798
|
-
const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.build || _report(_exceptionable, {
|
|
13799
|
-
path: _path + ".build",
|
|
13800
|
-
expected: "string",
|
|
13801
|
-
value: input.build
|
|
13802
|
-
})].every((flag) => flag);
|
|
13803
|
-
const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.displayName || _report(_exceptionable, {
|
|
13804
|
-
path: _path + ".displayName",
|
|
13805
|
-
expected: "string",
|
|
13806
|
-
value: input.displayName
|
|
13807
|
-
}), "string" === typeof input.primaryColor || _report(_exceptionable, {
|
|
13808
|
-
path: _path + ".primaryColor",
|
|
13809
|
-
expected: "string",
|
|
13810
|
-
value: input.primaryColor
|
|
13811
|
-
}), "string" === typeof input.icon || _report(_exceptionable, {
|
|
13812
|
-
path: _path + ".icon",
|
|
13813
|
-
expected: "string",
|
|
13814
|
-
value: input.icon
|
|
13815
|
-
})].every((flag) => flag);
|
|
13816
|
-
const _vo3 = (input, _path, _exceptionable = true) => [void 0 === input.withBackButton || "boolean" === typeof input.withBackButton || _report(_exceptionable, {
|
|
13817
|
-
path: _path + ".withBackButton",
|
|
13818
|
-
expected: "(boolean | undefined)",
|
|
13819
|
-
value: input.withBackButton
|
|
13820
|
-
}), void 0 === input.withHomeButton || "boolean" === typeof input.withHomeButton || _report(_exceptionable, {
|
|
13821
|
-
path: _path + ".withHomeButton",
|
|
13822
|
-
expected: "(boolean | undefined)",
|
|
13823
|
-
value: input.withHomeButton
|
|
13824
|
-
}), void 0 === input.initialAccessoryButton || ("object" === typeof input.initialAccessoryButton && null !== input.initialAccessoryButton || _report(_exceptionable, {
|
|
13825
|
-
path: _path + ".initialAccessoryButton",
|
|
13826
|
-
expected: "(InitialAccessoryButton | undefined)",
|
|
13827
|
-
value: input.initialAccessoryButton
|
|
13828
|
-
})) && _vo4(input.initialAccessoryButton, _path + ".initialAccessoryButton", _exceptionable) || _report(_exceptionable, {
|
|
13829
|
-
path: _path + ".initialAccessoryButton",
|
|
13830
|
-
expected: "(InitialAccessoryButton | undefined)",
|
|
13831
|
-
value: input.initialAccessoryButton
|
|
13832
|
-
})].every((flag) => flag);
|
|
13833
|
-
const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.id || _report(_exceptionable, {
|
|
13834
|
-
path: _path + ".id",
|
|
13835
|
-
expected: "string",
|
|
13836
|
-
value: input.id
|
|
13837
|
-
}), "string" === typeof input.title || _report(_exceptionable, {
|
|
13838
|
-
path: _path + ".title",
|
|
13839
|
-
expected: "string",
|
|
13840
|
-
value: input.title
|
|
13841
|
-
}), ("object" === typeof input.icon && null !== input.icon || _report(_exceptionable, {
|
|
13842
|
-
path: _path + ".icon",
|
|
13843
|
-
expected: "(__type.o3 | __type.o5)",
|
|
13844
|
-
value: input.icon
|
|
13845
|
-
})) && _vu1(input.icon, _path + ".icon", _exceptionable) || _report(_exceptionable, {
|
|
13846
|
-
path: _path + ".icon",
|
|
13847
|
-
expected: "(__type.o3 | __type.o5)",
|
|
13848
|
-
value: input.icon
|
|
13849
|
-
})].every((flag) => flag);
|
|
13850
|
-
const _vo5 = (input, _path, _exceptionable = true) => [("object" === typeof input.source && null !== input.source || _report(_exceptionable, {
|
|
13851
|
-
path: _path + ".source",
|
|
13852
|
-
expected: "__type.o4",
|
|
13853
|
-
value: input.source
|
|
13854
|
-
})) && _vo6(input.source, _path + ".source", _exceptionable) || _report(_exceptionable, {
|
|
13855
|
-
path: _path + ".source",
|
|
13856
|
-
expected: "__type.o4",
|
|
13857
|
-
value: input.source
|
|
13858
|
-
}), (null !== input.name || _report(_exceptionable, {
|
|
13859
|
-
path: _path + ".name",
|
|
13860
|
-
expected: "undefined",
|
|
13861
|
-
value: input.name
|
|
13862
|
-
})) && (void 0 === input.name || _report(_exceptionable, {
|
|
13863
|
-
path: _path + ".name",
|
|
13864
|
-
expected: "undefined",
|
|
13865
|
-
value: input.name
|
|
13866
|
-
}))].every((flag) => flag);
|
|
13867
|
-
const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.uri || _report(_exceptionable, {
|
|
13868
|
-
path: _path + ".uri",
|
|
13869
|
-
expected: "string",
|
|
13870
|
-
value: input.uri
|
|
13871
|
-
})].every((flag) => flag);
|
|
13872
|
-
const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
13873
|
-
path: _path + ".name",
|
|
13874
|
-
expected: "string",
|
|
13875
|
-
value: input.name
|
|
13876
|
-
}), (null !== input.source || _report(_exceptionable, {
|
|
13877
|
-
path: _path + ".source",
|
|
13878
|
-
expected: "undefined",
|
|
13879
|
-
value: input.source
|
|
13880
|
-
})) && (void 0 === input.source || _report(_exceptionable, {
|
|
13881
|
-
path: _path + ".source",
|
|
13882
|
-
expected: "undefined",
|
|
13883
|
-
value: input.source
|
|
13884
|
-
}))].every((flag) => flag);
|
|
13885
|
-
const _vo8 = (input, _path, _exceptionable = true) => [void 0 === input.type || "partner" === input.type || "external" === input.type || "game" === input.type || _report(_exceptionable, {
|
|
13886
|
-
path: _path + ".type",
|
|
13887
|
-
expected: '("external" | "game" | "partner" | undefined)',
|
|
13888
|
-
value: input.type
|
|
13889
|
-
}), void 0 === input.allowsInlineMediaPlayback || "boolean" === typeof input.allowsInlineMediaPlayback || _report(_exceptionable, {
|
|
13890
|
-
path: _path + ".allowsInlineMediaPlayback",
|
|
13891
|
-
expected: "(boolean | undefined)",
|
|
13892
|
-
value: input.allowsInlineMediaPlayback
|
|
13893
|
-
}), void 0 === input.bounces || "boolean" === typeof input.bounces || _report(_exceptionable, {
|
|
13894
|
-
path: _path + ".bounces",
|
|
13895
|
-
expected: "(boolean | undefined)",
|
|
13896
|
-
value: input.bounces
|
|
13897
|
-
}), void 0 === input.pullToRefreshEnabled || "boolean" === typeof input.pullToRefreshEnabled || _report(_exceptionable, {
|
|
13898
|
-
path: _path + ".pullToRefreshEnabled",
|
|
13899
|
-
expected: "(boolean | undefined)",
|
|
13900
|
-
value: input.pullToRefreshEnabled
|
|
13901
|
-
}), void 0 === input.overScrollMode || "always" === input.overScrollMode || "content" === input.overScrollMode || "never" === input.overScrollMode || _report(_exceptionable, {
|
|
13902
|
-
path: _path + ".overScrollMode",
|
|
13903
|
-
expected: '("always" | "content" | "never" | undefined)',
|
|
13904
|
-
value: input.overScrollMode
|
|
13905
|
-
}), void 0 === input.mediaPlaybackRequiresUserAction || "boolean" === typeof input.mediaPlaybackRequiresUserAction || _report(_exceptionable, {
|
|
13906
|
-
path: _path + ".mediaPlaybackRequiresUserAction",
|
|
13907
|
-
expected: "(boolean | undefined)",
|
|
13908
|
-
value: input.mediaPlaybackRequiresUserAction
|
|
13909
|
-
}), void 0 === input.allowsBackForwardNavigationGestures || "boolean" === typeof input.allowsBackForwardNavigationGestures || _report(_exceptionable, {
|
|
13910
|
-
path: _path + ".allowsBackForwardNavigationGestures",
|
|
13911
|
-
expected: "(boolean | undefined)",
|
|
13912
|
-
value: input.allowsBackForwardNavigationGestures
|
|
13913
|
-
})].every((flag) => flag);
|
|
13914
|
-
const _vo9 = (input, _path, _exceptionable = true) => ["clipboard" === input.name || _report(_exceptionable, {
|
|
13915
|
-
path: _path + ".name",
|
|
13916
|
-
expected: '"clipboard"',
|
|
13917
|
-
value: input.name
|
|
13918
|
-
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
13919
|
-
path: _path + ".access",
|
|
13920
|
-
expected: '("read" | "write")',
|
|
13921
|
-
value: input.access
|
|
13922
|
-
})].every((flag) => flag);
|
|
13923
|
-
const _vo10 = (input, _path, _exceptionable = true) => ["geolocation" === input.name || _report(_exceptionable, {
|
|
13924
|
-
path: _path + ".name",
|
|
13925
|
-
expected: '"geolocation"',
|
|
13926
|
-
value: input.name
|
|
13927
|
-
}), "access" === input.access || _report(_exceptionable, {
|
|
13928
|
-
path: _path + ".access",
|
|
13929
|
-
expected: '"access"',
|
|
13930
|
-
value: input.access
|
|
13931
|
-
})].every((flag) => flag);
|
|
13932
|
-
const _vo11 = (input, _path, _exceptionable = true) => ["contacts" === input.name || _report(_exceptionable, {
|
|
13933
|
-
path: _path + ".name",
|
|
13934
|
-
expected: '"contacts"',
|
|
13935
|
-
value: input.name
|
|
13936
|
-
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
13937
|
-
path: _path + ".access",
|
|
13938
|
-
expected: '("read" | "write")',
|
|
13939
|
-
value: input.access
|
|
13940
|
-
})].every((flag) => flag);
|
|
13941
|
-
const _vo12 = (input, _path, _exceptionable = true) => ["photos" === input.name || _report(_exceptionable, {
|
|
13942
|
-
path: _path + ".name",
|
|
13943
|
-
expected: '"photos"',
|
|
13944
|
-
value: input.name
|
|
13945
|
-
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
13946
|
-
path: _path + ".access",
|
|
13947
|
-
expected: '("read" | "write")',
|
|
13948
|
-
value: input.access
|
|
13949
|
-
})].every((flag) => flag);
|
|
13950
|
-
const _vo13 = (input, _path, _exceptionable = true) => ["camera" === input.name || _report(_exceptionable, {
|
|
13951
|
-
path: _path + ".name",
|
|
13952
|
-
expected: '"camera"',
|
|
13953
|
-
value: input.name
|
|
13954
|
-
}), "access" === input.access || _report(_exceptionable, {
|
|
13955
|
-
path: _path + ".access",
|
|
13956
|
-
expected: '"access"',
|
|
13957
|
-
value: input.access
|
|
13958
|
-
})].every((flag) => flag);
|
|
13959
|
-
const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
13960
|
-
if ("camera" === input.name)
|
|
13961
|
-
return _vo13(input, _path, _exceptionable);
|
|
13962
|
-
else if ("photos" === input.name)
|
|
13963
|
-
return _vo12(input, _path, _exceptionable);
|
|
13964
|
-
else if ("contacts" === input.name)
|
|
13965
|
-
return _vo11(input, _path, _exceptionable);
|
|
13966
|
-
else if ("geolocation" === input.name)
|
|
13967
|
-
return _vo10(input, _path, _exceptionable);
|
|
13968
|
-
else if ("clipboard" === input.name)
|
|
13969
|
-
return _vo9(input, _path, _exceptionable);
|
|
13970
|
-
else
|
|
13971
|
-
return _report(_exceptionable, {
|
|
13972
|
-
path: _path,
|
|
13973
|
-
expected: "(CameraPermission | PhotosPermission | ContactsPermission | GeolocationPermission | ClipboardPermission)",
|
|
13974
|
-
value: input
|
|
13975
|
-
});
|
|
13976
|
-
})();
|
|
13977
|
-
const _vu1 = (input, _path, _exceptionable = true) => (() => {
|
|
13978
|
-
if ("string" === typeof input.name)
|
|
13979
|
-
return _vo7(input, _path, _exceptionable);
|
|
13980
|
-
else if ("object" === typeof input.source && null !== input.source && _vo6(input.source, _path + ".source", false))
|
|
13981
|
-
return _vo5(input, _path, _exceptionable);
|
|
13982
|
-
else
|
|
13983
|
-
return _report(_exceptionable, {
|
|
13984
|
-
path: _path,
|
|
13985
|
-
expected: "(__type.o5 | __type.o3)",
|
|
13986
|
-
value: input
|
|
13987
|
-
});
|
|
13988
|
-
})();
|
|
13989
|
-
const __is = (input) => "object" === typeof input && null !== input && _io0(input);
|
|
13990
|
-
let errors;
|
|
13991
|
-
let _report;
|
|
13992
|
-
return __typia_transform__createStandardSchema._createStandardSchema((input) => {
|
|
13993
|
-
if (false === __is(input)) {
|
|
13994
|
-
errors = [];
|
|
13995
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
13996
|
-
((input2, _path, _exceptionable = true) => ("object" === typeof input2 && null !== input2 || _report(true, {
|
|
13997
|
-
path: _path + "",
|
|
13998
|
-
expected: "AppsInTossWebPluginOptions",
|
|
13999
|
-
value: input2
|
|
14000
|
-
})) && _vo0(input2, _path + "", true) || _report(true, {
|
|
14001
|
-
path: _path + "",
|
|
14002
|
-
expected: "AppsInTossWebPluginOptions",
|
|
14003
|
-
value: input2
|
|
14004
|
-
}))(input, "$input", true);
|
|
14005
|
-
const success = 0 === errors.length;
|
|
14006
|
-
return success ? {
|
|
14007
|
-
success,
|
|
14008
|
-
data: input
|
|
14009
|
-
} : {
|
|
14010
|
-
success,
|
|
14011
|
-
errors,
|
|
14012
|
-
data: input
|
|
14013
|
-
};
|
|
14014
|
-
}
|
|
14015
|
-
return {
|
|
14016
|
-
success: true,
|
|
14017
|
-
data: input
|
|
14018
|
-
};
|
|
14019
|
-
});
|
|
14020
|
-
})();
|
|
14021
|
-
|
|
14022
13562
|
// src/server.ts
|
|
14023
13563
|
init_esm_shims();
|
|
14024
13564
|
import fs from "fs";
|
|
@@ -15980,17 +15520,6 @@ var DevCommand = class extends Command {
|
|
|
15980
15520
|
async execute() {
|
|
15981
15521
|
const packageRoot = getPackageRoot();
|
|
15982
15522
|
const config = await loadConfig();
|
|
15983
|
-
const result = validateAppInTossWebPluginOptions({
|
|
15984
|
-
commands: config.web.commands,
|
|
15985
|
-
permissions: config.permissions,
|
|
15986
|
-
brand: config.brand,
|
|
15987
|
-
navigationBar: config.navigationBar,
|
|
15988
|
-
webViewProps: config.webViewProps
|
|
15989
|
-
});
|
|
15990
|
-
if (!result.success) {
|
|
15991
|
-
console.error("[Apps In Toss Plugin] \uD50C\uB7EC\uADF8\uC778 \uC635\uC158\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. granite.config.ts \uAD6C\uC131\uC744 \uD655\uC778\uD574\uC8FC\uC138\uC694.");
|
|
15992
|
-
process.exit(1);
|
|
15993
|
-
}
|
|
15994
15523
|
const { app, wss } = createApp({ ...config, production: this.experimental === true });
|
|
15995
15524
|
const server = serve(
|
|
15996
15525
|
{
|
package/dist/config/index.js
CHANGED
|
@@ -1,4 +1,196 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __esm = (fn, res) => function __init() {
|
|
8
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
9
|
+
};
|
|
10
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
11
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
|
|
30
|
+
// ../../../.yarn/__virtual__/tsup-virtual-5fd798e2dc/0/cache/tsup-npm-8.3.5-ed25596739-7794953cbc.zip/node_modules/tsup/assets/esm_shims.js
|
|
31
|
+
var init_esm_shims = __esm({
|
|
32
|
+
"../../../.yarn/__virtual__/tsup-virtual-5fd798e2dc/0/cache/tsup-npm-8.3.5-ed25596739-7794953cbc.zip/node_modules/tsup/assets/esm_shims.js"() {
|
|
33
|
+
"use strict";
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// ../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_validateReport.js
|
|
38
|
+
var require_validateReport = __commonJS({
|
|
39
|
+
"../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_validateReport.js"(exports) {
|
|
40
|
+
"use strict";
|
|
41
|
+
init_esm_shims();
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports._validateReport = void 0;
|
|
44
|
+
var _validateReport2 = (array) => {
|
|
45
|
+
const reportable = (path) => {
|
|
46
|
+
if (array.length === 0)
|
|
47
|
+
return true;
|
|
48
|
+
const last = array[array.length - 1].path;
|
|
49
|
+
return path.length > last.length || last.substring(0, path.length) !== path;
|
|
50
|
+
};
|
|
51
|
+
return (exceptable, error) => {
|
|
52
|
+
var _a;
|
|
53
|
+
if (exceptable && reportable(error.path)) {
|
|
54
|
+
if (error.value === void 0)
|
|
55
|
+
(_a = error.description) !== null && _a !== void 0 ? _a : error.description = [
|
|
56
|
+
"The value at this path is `undefined`.",
|
|
57
|
+
"",
|
|
58
|
+
`Please fill the \`${error.expected}\` typed value next time.`
|
|
59
|
+
].join("\n");
|
|
60
|
+
array.push(error);
|
|
61
|
+
}
|
|
62
|
+
return false;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
exports._validateReport = _validateReport2;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
// ../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_createStandardSchema.js
|
|
70
|
+
var require_createStandardSchema = __commonJS({
|
|
71
|
+
"../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_createStandardSchema.js"(exports) {
|
|
72
|
+
"use strict";
|
|
73
|
+
init_esm_shims();
|
|
74
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
75
|
+
exports._createStandardSchema = void 0;
|
|
76
|
+
var _createStandardSchema2 = (fn) => Object.assign(fn, {
|
|
77
|
+
"~standard": {
|
|
78
|
+
version: 1,
|
|
79
|
+
vendor: "typia",
|
|
80
|
+
validate: (input) => {
|
|
81
|
+
const result = fn(input);
|
|
82
|
+
if (result.success) {
|
|
83
|
+
return {
|
|
84
|
+
value: result.data
|
|
85
|
+
};
|
|
86
|
+
} else {
|
|
87
|
+
return {
|
|
88
|
+
issues: result.errors.map((error) => ({
|
|
89
|
+
message: `expected ${error.expected}, got ${error.value}`,
|
|
90
|
+
path: typiaPathToStandardSchemaPath(error.path)
|
|
91
|
+
}))
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
exports._createStandardSchema = _createStandardSchema2;
|
|
98
|
+
var PathParserState;
|
|
99
|
+
(function(PathParserState2) {
|
|
100
|
+
PathParserState2[PathParserState2["Start"] = 0] = "Start";
|
|
101
|
+
PathParserState2[PathParserState2["Property"] = 1] = "Property";
|
|
102
|
+
PathParserState2[PathParserState2["StringKey"] = 2] = "StringKey";
|
|
103
|
+
PathParserState2[PathParserState2["NumberKey"] = 3] = "NumberKey";
|
|
104
|
+
})(PathParserState || (PathParserState = {}));
|
|
105
|
+
var typiaPathToStandardSchemaPath = (path) => {
|
|
106
|
+
if (!path.startsWith("$input")) {
|
|
107
|
+
throw new Error(`Invalid path: ${JSON.stringify(path)}`);
|
|
108
|
+
}
|
|
109
|
+
const segments = [];
|
|
110
|
+
let currentSegment = "";
|
|
111
|
+
let state = PathParserState.Start;
|
|
112
|
+
let index = "$input".length - 1;
|
|
113
|
+
while (index < path.length - 1) {
|
|
114
|
+
index++;
|
|
115
|
+
const char = path[index];
|
|
116
|
+
if (state === PathParserState.Property) {
|
|
117
|
+
if (char === "." || char === "[") {
|
|
118
|
+
segments.push({
|
|
119
|
+
key: currentSegment
|
|
120
|
+
});
|
|
121
|
+
state = PathParserState.Start;
|
|
122
|
+
} else if (index === path.length - 1) {
|
|
123
|
+
currentSegment += char;
|
|
124
|
+
segments.push({
|
|
125
|
+
key: currentSegment
|
|
126
|
+
});
|
|
127
|
+
index++;
|
|
128
|
+
state = PathParserState.Start;
|
|
129
|
+
} else {
|
|
130
|
+
currentSegment += char;
|
|
131
|
+
}
|
|
132
|
+
} else if (state === PathParserState.StringKey) {
|
|
133
|
+
if (char === '"') {
|
|
134
|
+
segments.push({
|
|
135
|
+
key: JSON.parse(currentSegment + char)
|
|
136
|
+
});
|
|
137
|
+
index += 2;
|
|
138
|
+
state = PathParserState.Start;
|
|
139
|
+
} else if (char === "\\") {
|
|
140
|
+
currentSegment += path[index];
|
|
141
|
+
index++;
|
|
142
|
+
currentSegment += path[index];
|
|
143
|
+
} else {
|
|
144
|
+
currentSegment += char;
|
|
145
|
+
}
|
|
146
|
+
} else if (state === PathParserState.NumberKey) {
|
|
147
|
+
if (char === "]") {
|
|
148
|
+
segments.push({
|
|
149
|
+
key: Number.parseInt(currentSegment)
|
|
150
|
+
});
|
|
151
|
+
index++;
|
|
152
|
+
state = PathParserState.Start;
|
|
153
|
+
} else {
|
|
154
|
+
currentSegment += char;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (state === PathParserState.Start && index < path.length - 1) {
|
|
158
|
+
const newChar = path[index];
|
|
159
|
+
currentSegment = "";
|
|
160
|
+
if (newChar === "[") {
|
|
161
|
+
if (path[index + 1] === '"') {
|
|
162
|
+
state = PathParserState.StringKey;
|
|
163
|
+
index++;
|
|
164
|
+
currentSegment = '"';
|
|
165
|
+
} else {
|
|
166
|
+
state = PathParserState.NumberKey;
|
|
167
|
+
}
|
|
168
|
+
} else if (newChar === ".") {
|
|
169
|
+
state = PathParserState.Property;
|
|
170
|
+
} else {
|
|
171
|
+
throw new Error("Unreachable: pointer points invalid character");
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
if (state !== PathParserState.Start) {
|
|
176
|
+
throw new Error(`Failed to parse path: ${JSON.stringify(path)}`);
|
|
177
|
+
}
|
|
178
|
+
return segments;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
// src/config/index.ts
|
|
184
|
+
init_esm_shims();
|
|
185
|
+
|
|
186
|
+
// src/config/defineConfig.ts
|
|
187
|
+
init_esm_shims();
|
|
188
|
+
|
|
189
|
+
// ../../../.yarn/cache/es-toolkit-npm-1.32.0-019fc7c155-56ba965570.zip/node_modules/es-toolkit/dist/index.mjs
|
|
190
|
+
init_esm_shims();
|
|
191
|
+
|
|
1
192
|
// ../../../.yarn/cache/es-toolkit-npm-1.32.0-019fc7c155-56ba965570.zip/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
|
|
193
|
+
init_esm_shims();
|
|
2
194
|
function isPlainObject(value) {
|
|
3
195
|
if (!value || typeof value !== "object") {
|
|
4
196
|
return false;
|
|
@@ -12,6 +204,7 @@ function isPlainObject(value) {
|
|
|
12
204
|
}
|
|
13
205
|
|
|
14
206
|
// ../../../.yarn/cache/es-toolkit-npm-1.32.0-019fc7c155-56ba965570.zip/node_modules/es-toolkit/dist/object/merge.mjs
|
|
207
|
+
init_esm_shims();
|
|
15
208
|
function merge(target, source) {
|
|
16
209
|
const sourceKeys = Object.keys(source);
|
|
17
210
|
for (let i = 0; i < sourceKeys.length; i++) {
|
|
@@ -37,6 +230,320 @@ function merge(target, source) {
|
|
|
37
230
|
return target;
|
|
38
231
|
}
|
|
39
232
|
|
|
233
|
+
// src/plugins/appsInTossWeb.ts
|
|
234
|
+
init_esm_shims();
|
|
235
|
+
var __typia_transform__validateReport = __toESM(require_validateReport(), 1);
|
|
236
|
+
var __typia_transform__createStandardSchema = __toESM(require_createStandardSchema(), 1);
|
|
237
|
+
var validateAppInTossWebPluginOptions = (() => {
|
|
238
|
+
const _io0 = (input) => "object" === typeof input.commands && null !== input.commands && _io1(input.commands) && ("object" === typeof input.brand && null !== input.brand && _io2(input.brand)) && (void 0 === input.navigationBar || "object" === typeof input.navigationBar && null !== input.navigationBar && false === Array.isArray(input.navigationBar) && _io3(input.navigationBar)) && (void 0 === input.webViewProps || "object" === typeof input.webViewProps && null !== input.webViewProps && false === Array.isArray(input.webViewProps) && _io8(input.webViewProps)) && (Array.isArray(input.permissions) && input.permissions.every((elem) => "object" === typeof elem && null !== elem && _iu0(elem)));
|
|
239
|
+
const _io1 = (input) => "string" === typeof input.build;
|
|
240
|
+
const _io2 = (input) => "string" === typeof input.displayName && "string" === typeof input.primaryColor && "string" === typeof input.icon;
|
|
241
|
+
const _io3 = (input) => (void 0 === input.withBackButton || "boolean" === typeof input.withBackButton) && (void 0 === input.withHomeButton || "boolean" === typeof input.withHomeButton) && (void 0 === input.initialAccessoryButton || "object" === typeof input.initialAccessoryButton && null !== input.initialAccessoryButton && _io4(input.initialAccessoryButton));
|
|
242
|
+
const _io4 = (input) => "string" === typeof input.id && "string" === typeof input.title && ("object" === typeof input.icon && null !== input.icon && _iu1(input.icon));
|
|
243
|
+
const _io5 = (input) => "object" === typeof input.source && null !== input.source && _io6(input.source) && (null !== input.name && void 0 === input.name);
|
|
244
|
+
const _io6 = (input) => "string" === typeof input.uri;
|
|
245
|
+
const _io7 = (input) => "string" === typeof input.name && (null !== input.source && void 0 === input.source);
|
|
246
|
+
const _io8 = (input) => (void 0 === input.type || "partner" === input.type || "external" === input.type || "game" === input.type) && (void 0 === input.allowsInlineMediaPlayback || "boolean" === typeof input.allowsInlineMediaPlayback) && (void 0 === input.bounces || "boolean" === typeof input.bounces) && (void 0 === input.pullToRefreshEnabled || "boolean" === typeof input.pullToRefreshEnabled) && (void 0 === input.overScrollMode || "always" === input.overScrollMode || "content" === input.overScrollMode || "never" === input.overScrollMode) && (void 0 === input.mediaPlaybackRequiresUserAction || "boolean" === typeof input.mediaPlaybackRequiresUserAction) && (void 0 === input.allowsBackForwardNavigationGestures || "boolean" === typeof input.allowsBackForwardNavigationGestures);
|
|
247
|
+
const _io9 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
|
|
248
|
+
const _io10 = (input) => "geolocation" === input.name && "access" === input.access;
|
|
249
|
+
const _io11 = (input) => "contacts" === input.name && ("read" === input.access || "write" === input.access);
|
|
250
|
+
const _io12 = (input) => "photos" === input.name && ("read" === input.access || "write" === input.access);
|
|
251
|
+
const _io13 = (input) => "camera" === input.name && "access" === input.access;
|
|
252
|
+
const _iu0 = (input) => (() => {
|
|
253
|
+
if ("camera" === input.name)
|
|
254
|
+
return _io13(input);
|
|
255
|
+
else if ("photos" === input.name)
|
|
256
|
+
return _io12(input);
|
|
257
|
+
else if ("contacts" === input.name)
|
|
258
|
+
return _io11(input);
|
|
259
|
+
else if ("geolocation" === input.name)
|
|
260
|
+
return _io10(input);
|
|
261
|
+
else if ("clipboard" === input.name)
|
|
262
|
+
return _io9(input);
|
|
263
|
+
else
|
|
264
|
+
return false;
|
|
265
|
+
})();
|
|
266
|
+
const _iu1 = (input) => (() => {
|
|
267
|
+
if ("string" === typeof input.name)
|
|
268
|
+
return _io7(input);
|
|
269
|
+
else if ("object" === typeof input.source && null !== input.source && _io6(input.source))
|
|
270
|
+
return _io5(input);
|
|
271
|
+
else
|
|
272
|
+
return false;
|
|
273
|
+
})();
|
|
274
|
+
const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.commands && null !== input.commands || _report(_exceptionable, {
|
|
275
|
+
path: _path + ".commands",
|
|
276
|
+
expected: "__type",
|
|
277
|
+
value: input.commands
|
|
278
|
+
})) && _vo1(input.commands, _path + ".commands", _exceptionable) || _report(_exceptionable, {
|
|
279
|
+
path: _path + ".commands",
|
|
280
|
+
expected: "__type",
|
|
281
|
+
value: input.commands
|
|
282
|
+
}), ("object" === typeof input.brand && null !== input.brand || _report(_exceptionable, {
|
|
283
|
+
path: _path + ".brand",
|
|
284
|
+
expected: "__type.o1",
|
|
285
|
+
value: input.brand
|
|
286
|
+
})) && _vo2(input.brand, _path + ".brand", _exceptionable) || _report(_exceptionable, {
|
|
287
|
+
path: _path + ".brand",
|
|
288
|
+
expected: "__type.o1",
|
|
289
|
+
value: input.brand
|
|
290
|
+
}), void 0 === input.navigationBar || ("object" === typeof input.navigationBar && null !== input.navigationBar && false === Array.isArray(input.navigationBar) || _report(_exceptionable, {
|
|
291
|
+
path: _path + ".navigationBar",
|
|
292
|
+
expected: "(__type.o2 | undefined)",
|
|
293
|
+
value: input.navigationBar
|
|
294
|
+
})) && _vo3(input.navigationBar, _path + ".navigationBar", _exceptionable) || _report(_exceptionable, {
|
|
295
|
+
path: _path + ".navigationBar",
|
|
296
|
+
expected: "(__type.o2 | undefined)",
|
|
297
|
+
value: input.navigationBar
|
|
298
|
+
}), void 0 === input.webViewProps || ("object" === typeof input.webViewProps && null !== input.webViewProps && false === Array.isArray(input.webViewProps) || _report(_exceptionable, {
|
|
299
|
+
path: _path + ".webViewProps",
|
|
300
|
+
expected: "(__type.o6 | undefined)",
|
|
301
|
+
value: input.webViewProps
|
|
302
|
+
})) && _vo8(input.webViewProps, _path + ".webViewProps", _exceptionable) || _report(_exceptionable, {
|
|
303
|
+
path: _path + ".webViewProps",
|
|
304
|
+
expected: "(__type.o6 | undefined)",
|
|
305
|
+
value: input.webViewProps
|
|
306
|
+
}), (Array.isArray(input.permissions) || _report(_exceptionable, {
|
|
307
|
+
path: _path + ".permissions",
|
|
308
|
+
expected: "Array<Permission>",
|
|
309
|
+
value: input.permissions
|
|
310
|
+
})) && input.permissions.map((elem, _index2) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
311
|
+
path: _path + ".permissions[" + _index2 + "]",
|
|
312
|
+
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
313
|
+
value: elem
|
|
314
|
+
})) && _vu0(elem, _path + ".permissions[" + _index2 + "]", _exceptionable) || _report(_exceptionable, {
|
|
315
|
+
path: _path + ".permissions[" + _index2 + "]",
|
|
316
|
+
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
317
|
+
value: elem
|
|
318
|
+
})).every((flag) => flag) || _report(_exceptionable, {
|
|
319
|
+
path: _path + ".permissions",
|
|
320
|
+
expected: "Array<Permission>",
|
|
321
|
+
value: input.permissions
|
|
322
|
+
})].every((flag) => flag);
|
|
323
|
+
const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.build || _report(_exceptionable, {
|
|
324
|
+
path: _path + ".build",
|
|
325
|
+
expected: "string",
|
|
326
|
+
value: input.build
|
|
327
|
+
})].every((flag) => flag);
|
|
328
|
+
const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.displayName || _report(_exceptionable, {
|
|
329
|
+
path: _path + ".displayName",
|
|
330
|
+
expected: "string",
|
|
331
|
+
value: input.displayName
|
|
332
|
+
}), "string" === typeof input.primaryColor || _report(_exceptionable, {
|
|
333
|
+
path: _path + ".primaryColor",
|
|
334
|
+
expected: "string",
|
|
335
|
+
value: input.primaryColor
|
|
336
|
+
}), "string" === typeof input.icon || _report(_exceptionable, {
|
|
337
|
+
path: _path + ".icon",
|
|
338
|
+
expected: "string",
|
|
339
|
+
value: input.icon
|
|
340
|
+
})].every((flag) => flag);
|
|
341
|
+
const _vo3 = (input, _path, _exceptionable = true) => [void 0 === input.withBackButton || "boolean" === typeof input.withBackButton || _report(_exceptionable, {
|
|
342
|
+
path: _path + ".withBackButton",
|
|
343
|
+
expected: "(boolean | undefined)",
|
|
344
|
+
value: input.withBackButton
|
|
345
|
+
}), void 0 === input.withHomeButton || "boolean" === typeof input.withHomeButton || _report(_exceptionable, {
|
|
346
|
+
path: _path + ".withHomeButton",
|
|
347
|
+
expected: "(boolean | undefined)",
|
|
348
|
+
value: input.withHomeButton
|
|
349
|
+
}), void 0 === input.initialAccessoryButton || ("object" === typeof input.initialAccessoryButton && null !== input.initialAccessoryButton || _report(_exceptionable, {
|
|
350
|
+
path: _path + ".initialAccessoryButton",
|
|
351
|
+
expected: "(InitialAccessoryButton | undefined)",
|
|
352
|
+
value: input.initialAccessoryButton
|
|
353
|
+
})) && _vo4(input.initialAccessoryButton, _path + ".initialAccessoryButton", _exceptionable) || _report(_exceptionable, {
|
|
354
|
+
path: _path + ".initialAccessoryButton",
|
|
355
|
+
expected: "(InitialAccessoryButton | undefined)",
|
|
356
|
+
value: input.initialAccessoryButton
|
|
357
|
+
})].every((flag) => flag);
|
|
358
|
+
const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.id || _report(_exceptionable, {
|
|
359
|
+
path: _path + ".id",
|
|
360
|
+
expected: "string",
|
|
361
|
+
value: input.id
|
|
362
|
+
}), "string" === typeof input.title || _report(_exceptionable, {
|
|
363
|
+
path: _path + ".title",
|
|
364
|
+
expected: "string",
|
|
365
|
+
value: input.title
|
|
366
|
+
}), ("object" === typeof input.icon && null !== input.icon || _report(_exceptionable, {
|
|
367
|
+
path: _path + ".icon",
|
|
368
|
+
expected: "(__type.o3 | __type.o5)",
|
|
369
|
+
value: input.icon
|
|
370
|
+
})) && _vu1(input.icon, _path + ".icon", _exceptionable) || _report(_exceptionable, {
|
|
371
|
+
path: _path + ".icon",
|
|
372
|
+
expected: "(__type.o3 | __type.o5)",
|
|
373
|
+
value: input.icon
|
|
374
|
+
})].every((flag) => flag);
|
|
375
|
+
const _vo5 = (input, _path, _exceptionable = true) => [("object" === typeof input.source && null !== input.source || _report(_exceptionable, {
|
|
376
|
+
path: _path + ".source",
|
|
377
|
+
expected: "__type.o4",
|
|
378
|
+
value: input.source
|
|
379
|
+
})) && _vo6(input.source, _path + ".source", _exceptionable) || _report(_exceptionable, {
|
|
380
|
+
path: _path + ".source",
|
|
381
|
+
expected: "__type.o4",
|
|
382
|
+
value: input.source
|
|
383
|
+
}), (null !== input.name || _report(_exceptionable, {
|
|
384
|
+
path: _path + ".name",
|
|
385
|
+
expected: "undefined",
|
|
386
|
+
value: input.name
|
|
387
|
+
})) && (void 0 === input.name || _report(_exceptionable, {
|
|
388
|
+
path: _path + ".name",
|
|
389
|
+
expected: "undefined",
|
|
390
|
+
value: input.name
|
|
391
|
+
}))].every((flag) => flag);
|
|
392
|
+
const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.uri || _report(_exceptionable, {
|
|
393
|
+
path: _path + ".uri",
|
|
394
|
+
expected: "string",
|
|
395
|
+
value: input.uri
|
|
396
|
+
})].every((flag) => flag);
|
|
397
|
+
const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
398
|
+
path: _path + ".name",
|
|
399
|
+
expected: "string",
|
|
400
|
+
value: input.name
|
|
401
|
+
}), (null !== input.source || _report(_exceptionable, {
|
|
402
|
+
path: _path + ".source",
|
|
403
|
+
expected: "undefined",
|
|
404
|
+
value: input.source
|
|
405
|
+
})) && (void 0 === input.source || _report(_exceptionable, {
|
|
406
|
+
path: _path + ".source",
|
|
407
|
+
expected: "undefined",
|
|
408
|
+
value: input.source
|
|
409
|
+
}))].every((flag) => flag);
|
|
410
|
+
const _vo8 = (input, _path, _exceptionable = true) => [void 0 === input.type || "partner" === input.type || "external" === input.type || "game" === input.type || _report(_exceptionable, {
|
|
411
|
+
path: _path + ".type",
|
|
412
|
+
expected: '("external" | "game" | "partner" | undefined)',
|
|
413
|
+
value: input.type
|
|
414
|
+
}), void 0 === input.allowsInlineMediaPlayback || "boolean" === typeof input.allowsInlineMediaPlayback || _report(_exceptionable, {
|
|
415
|
+
path: _path + ".allowsInlineMediaPlayback",
|
|
416
|
+
expected: "(boolean | undefined)",
|
|
417
|
+
value: input.allowsInlineMediaPlayback
|
|
418
|
+
}), void 0 === input.bounces || "boolean" === typeof input.bounces || _report(_exceptionable, {
|
|
419
|
+
path: _path + ".bounces",
|
|
420
|
+
expected: "(boolean | undefined)",
|
|
421
|
+
value: input.bounces
|
|
422
|
+
}), void 0 === input.pullToRefreshEnabled || "boolean" === typeof input.pullToRefreshEnabled || _report(_exceptionable, {
|
|
423
|
+
path: _path + ".pullToRefreshEnabled",
|
|
424
|
+
expected: "(boolean | undefined)",
|
|
425
|
+
value: input.pullToRefreshEnabled
|
|
426
|
+
}), void 0 === input.overScrollMode || "always" === input.overScrollMode || "content" === input.overScrollMode || "never" === input.overScrollMode || _report(_exceptionable, {
|
|
427
|
+
path: _path + ".overScrollMode",
|
|
428
|
+
expected: '("always" | "content" | "never" | undefined)',
|
|
429
|
+
value: input.overScrollMode
|
|
430
|
+
}), void 0 === input.mediaPlaybackRequiresUserAction || "boolean" === typeof input.mediaPlaybackRequiresUserAction || _report(_exceptionable, {
|
|
431
|
+
path: _path + ".mediaPlaybackRequiresUserAction",
|
|
432
|
+
expected: "(boolean | undefined)",
|
|
433
|
+
value: input.mediaPlaybackRequiresUserAction
|
|
434
|
+
}), void 0 === input.allowsBackForwardNavigationGestures || "boolean" === typeof input.allowsBackForwardNavigationGestures || _report(_exceptionable, {
|
|
435
|
+
path: _path + ".allowsBackForwardNavigationGestures",
|
|
436
|
+
expected: "(boolean | undefined)",
|
|
437
|
+
value: input.allowsBackForwardNavigationGestures
|
|
438
|
+
})].every((flag) => flag);
|
|
439
|
+
const _vo9 = (input, _path, _exceptionable = true) => ["clipboard" === input.name || _report(_exceptionable, {
|
|
440
|
+
path: _path + ".name",
|
|
441
|
+
expected: '"clipboard"',
|
|
442
|
+
value: input.name
|
|
443
|
+
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
444
|
+
path: _path + ".access",
|
|
445
|
+
expected: '("read" | "write")',
|
|
446
|
+
value: input.access
|
|
447
|
+
})].every((flag) => flag);
|
|
448
|
+
const _vo10 = (input, _path, _exceptionable = true) => ["geolocation" === input.name || _report(_exceptionable, {
|
|
449
|
+
path: _path + ".name",
|
|
450
|
+
expected: '"geolocation"',
|
|
451
|
+
value: input.name
|
|
452
|
+
}), "access" === input.access || _report(_exceptionable, {
|
|
453
|
+
path: _path + ".access",
|
|
454
|
+
expected: '"access"',
|
|
455
|
+
value: input.access
|
|
456
|
+
})].every((flag) => flag);
|
|
457
|
+
const _vo11 = (input, _path, _exceptionable = true) => ["contacts" === input.name || _report(_exceptionable, {
|
|
458
|
+
path: _path + ".name",
|
|
459
|
+
expected: '"contacts"',
|
|
460
|
+
value: input.name
|
|
461
|
+
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
462
|
+
path: _path + ".access",
|
|
463
|
+
expected: '("read" | "write")',
|
|
464
|
+
value: input.access
|
|
465
|
+
})].every((flag) => flag);
|
|
466
|
+
const _vo12 = (input, _path, _exceptionable = true) => ["photos" === input.name || _report(_exceptionable, {
|
|
467
|
+
path: _path + ".name",
|
|
468
|
+
expected: '"photos"',
|
|
469
|
+
value: input.name
|
|
470
|
+
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
471
|
+
path: _path + ".access",
|
|
472
|
+
expected: '("read" | "write")',
|
|
473
|
+
value: input.access
|
|
474
|
+
})].every((flag) => flag);
|
|
475
|
+
const _vo13 = (input, _path, _exceptionable = true) => ["camera" === input.name || _report(_exceptionable, {
|
|
476
|
+
path: _path + ".name",
|
|
477
|
+
expected: '"camera"',
|
|
478
|
+
value: input.name
|
|
479
|
+
}), "access" === input.access || _report(_exceptionable, {
|
|
480
|
+
path: _path + ".access",
|
|
481
|
+
expected: '"access"',
|
|
482
|
+
value: input.access
|
|
483
|
+
})].every((flag) => flag);
|
|
484
|
+
const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
485
|
+
if ("camera" === input.name)
|
|
486
|
+
return _vo13(input, _path, _exceptionable);
|
|
487
|
+
else if ("photos" === input.name)
|
|
488
|
+
return _vo12(input, _path, _exceptionable);
|
|
489
|
+
else if ("contacts" === input.name)
|
|
490
|
+
return _vo11(input, _path, _exceptionable);
|
|
491
|
+
else if ("geolocation" === input.name)
|
|
492
|
+
return _vo10(input, _path, _exceptionable);
|
|
493
|
+
else if ("clipboard" === input.name)
|
|
494
|
+
return _vo9(input, _path, _exceptionable);
|
|
495
|
+
else
|
|
496
|
+
return _report(_exceptionable, {
|
|
497
|
+
path: _path,
|
|
498
|
+
expected: "(CameraPermission | PhotosPermission | ContactsPermission | GeolocationPermission | ClipboardPermission)",
|
|
499
|
+
value: input
|
|
500
|
+
});
|
|
501
|
+
})();
|
|
502
|
+
const _vu1 = (input, _path, _exceptionable = true) => (() => {
|
|
503
|
+
if ("string" === typeof input.name)
|
|
504
|
+
return _vo7(input, _path, _exceptionable);
|
|
505
|
+
else if ("object" === typeof input.source && null !== input.source && _vo6(input.source, _path + ".source", false))
|
|
506
|
+
return _vo5(input, _path, _exceptionable);
|
|
507
|
+
else
|
|
508
|
+
return _report(_exceptionable, {
|
|
509
|
+
path: _path,
|
|
510
|
+
expected: "(__type.o5 | __type.o3)",
|
|
511
|
+
value: input
|
|
512
|
+
});
|
|
513
|
+
})();
|
|
514
|
+
const __is = (input) => "object" === typeof input && null !== input && _io0(input);
|
|
515
|
+
let errors;
|
|
516
|
+
let _report;
|
|
517
|
+
return __typia_transform__createStandardSchema._createStandardSchema((input) => {
|
|
518
|
+
if (false === __is(input)) {
|
|
519
|
+
errors = [];
|
|
520
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
521
|
+
((input2, _path, _exceptionable = true) => ("object" === typeof input2 && null !== input2 || _report(true, {
|
|
522
|
+
path: _path + "",
|
|
523
|
+
expected: "AppsInTossWebPluginOptions",
|
|
524
|
+
value: input2
|
|
525
|
+
})) && _vo0(input2, _path + "", true) || _report(true, {
|
|
526
|
+
path: _path + "",
|
|
527
|
+
expected: "AppsInTossWebPluginOptions",
|
|
528
|
+
value: input2
|
|
529
|
+
}))(input, "$input", true);
|
|
530
|
+
const success = 0 === errors.length;
|
|
531
|
+
return success ? {
|
|
532
|
+
success,
|
|
533
|
+
data: input
|
|
534
|
+
} : {
|
|
535
|
+
success,
|
|
536
|
+
errors,
|
|
537
|
+
data: input
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
return {
|
|
541
|
+
success: true,
|
|
542
|
+
data: input
|
|
543
|
+
};
|
|
544
|
+
});
|
|
545
|
+
})();
|
|
546
|
+
|
|
40
547
|
// src/config/defineConfig.ts
|
|
41
548
|
var defineConfig = (config) => {
|
|
42
549
|
const defaultConfig = {
|
|
@@ -59,7 +566,19 @@ var defineConfig = (config) => {
|
|
|
59
566
|
withHomeButton: false
|
|
60
567
|
}
|
|
61
568
|
};
|
|
62
|
-
|
|
569
|
+
const merged = merge(defaultConfig, config);
|
|
570
|
+
const result = validateAppInTossWebPluginOptions({
|
|
571
|
+
commands: merged.web.commands,
|
|
572
|
+
permissions: merged.permissions,
|
|
573
|
+
brand: merged.brand,
|
|
574
|
+
navigationBar: merged.navigationBar,
|
|
575
|
+
webViewProps: merged.webViewProps
|
|
576
|
+
});
|
|
577
|
+
if (!result.success) {
|
|
578
|
+
console.error("[Apps In Toss Plugin] \uD50C\uB7EC\uADF8\uC778 \uC635\uC158\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. granite.config.ts \uAD6C\uC131\uC744 \uD655\uC778\uD574\uC8FC\uC138\uC694.");
|
|
579
|
+
process.exit(1);
|
|
580
|
+
}
|
|
581
|
+
return merged;
|
|
63
582
|
};
|
|
64
583
|
export {
|
|
65
584
|
defineConfig
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/web-framework",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.9",
|
|
5
5
|
"description": "Web Framework for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"typecheck": "tsc --noEmit",
|
|
@@ -86,13 +86,13 @@
|
|
|
86
86
|
"zod": "3.24.4"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@apps-in-toss/bridge-core": "2.0.
|
|
90
|
-
"@apps-in-toss/cli": "2.0.
|
|
91
|
-
"@apps-in-toss/framework": "2.0.
|
|
92
|
-
"@apps-in-toss/plugins": "2.0.
|
|
93
|
-
"@apps-in-toss/web-analytics": "2.0.
|
|
94
|
-
"@apps-in-toss/web-bridge": "2.0.
|
|
95
|
-
"@apps-in-toss/web-config": "2.0.
|
|
89
|
+
"@apps-in-toss/bridge-core": "2.0.9",
|
|
90
|
+
"@apps-in-toss/cli": "2.0.9",
|
|
91
|
+
"@apps-in-toss/framework": "2.0.9",
|
|
92
|
+
"@apps-in-toss/plugins": "2.0.9",
|
|
93
|
+
"@apps-in-toss/web-analytics": "2.0.9",
|
|
94
|
+
"@apps-in-toss/web-bridge": "2.0.9",
|
|
95
|
+
"@apps-in-toss/web-config": "2.0.9",
|
|
96
96
|
"@babel/core": "7.23.9",
|
|
97
97
|
"@granite-js/cli": "1.0.4",
|
|
98
98
|
"@granite-js/mpack": "1.0.4",
|