@apps-in-toss/plugins 1.6.0 → 1.6.2
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/CHANGELOG.md +11 -0
- package/dist/index.cjs +137 -19
- package/dist/index.d.cts +4 -9
- package/dist/index.d.ts +4 -9
- package/dist/index.js +137 -19
- package/dist/internal.cjs +394 -10
- package/dist/internal.js +394 -10
- package/package.json +6 -11
package/dist/internal.cjs
CHANGED
|
@@ -33,19 +33,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
//
|
|
36
|
+
// ../../../.yarn/__virtual__/tsup-virtual-dc9661456a/0/cache/tsup-npm-8.4.0-f78d2622c9-c6636ffd6a.zip/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var getImportMetaUrl, importMetaUrl;
|
|
38
38
|
var init_cjs_shims = __esm({
|
|
39
|
-
"
|
|
39
|
+
"../../../.yarn/__virtual__/tsup-virtual-dc9661456a/0/cache/tsup-npm-8.4.0-f78d2622c9-c6636ffd6a.zip/node_modules/tsup/assets/cjs_shims.js"() {
|
|
40
40
|
"use strict";
|
|
41
41
|
getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
42
42
|
importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
//
|
|
46
|
+
// ../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_isFormatUuid.js
|
|
47
47
|
var require_isFormatUuid = __commonJS({
|
|
48
|
-
"
|
|
48
|
+
"../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_isFormatUuid.js"(exports2) {
|
|
49
49
|
"use strict";
|
|
50
50
|
init_cjs_shims();
|
|
51
51
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -56,9 +56,9 @@ var require_isFormatUuid = __commonJS({
|
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
-
//
|
|
59
|
+
// ../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_validateReport.js
|
|
60
60
|
var require_validateReport = __commonJS({
|
|
61
|
-
"
|
|
61
|
+
"../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_validateReport.js"(exports2) {
|
|
62
62
|
"use strict";
|
|
63
63
|
init_cjs_shims();
|
|
64
64
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -71,8 +71,16 @@ var require_validateReport = __commonJS({
|
|
|
71
71
|
return path9.length > last.length || last.substring(0, path9.length) !== path9;
|
|
72
72
|
};
|
|
73
73
|
return (exceptable, error) => {
|
|
74
|
-
|
|
74
|
+
var _a;
|
|
75
|
+
if (exceptable && reportable(error.path)) {
|
|
76
|
+
if (error.value === void 0)
|
|
77
|
+
(_a = error.description) !== null && _a !== void 0 ? _a : error.description = [
|
|
78
|
+
"The value at this path is `undefined`.",
|
|
79
|
+
"",
|
|
80
|
+
`Please fill the \`${error.expected}\` typed value next time.`
|
|
81
|
+
].join("\n");
|
|
75
82
|
array.push(error);
|
|
83
|
+
}
|
|
76
84
|
return false;
|
|
77
85
|
};
|
|
78
86
|
};
|
|
@@ -80,6 +88,120 @@ var require_validateReport = __commonJS({
|
|
|
80
88
|
}
|
|
81
89
|
});
|
|
82
90
|
|
|
91
|
+
// ../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_createStandardSchema.js
|
|
92
|
+
var require_createStandardSchema = __commonJS({
|
|
93
|
+
"../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_createStandardSchema.js"(exports2) {
|
|
94
|
+
"use strict";
|
|
95
|
+
init_cjs_shims();
|
|
96
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
97
|
+
exports2._createStandardSchema = void 0;
|
|
98
|
+
var _createStandardSchema2 = (fn) => Object.assign(fn, {
|
|
99
|
+
"~standard": {
|
|
100
|
+
version: 1,
|
|
101
|
+
vendor: "typia",
|
|
102
|
+
validate: (input) => {
|
|
103
|
+
const result = fn(input);
|
|
104
|
+
if (result.success) {
|
|
105
|
+
return {
|
|
106
|
+
value: result.data
|
|
107
|
+
};
|
|
108
|
+
} else {
|
|
109
|
+
return {
|
|
110
|
+
issues: result.errors.map((error) => ({
|
|
111
|
+
message: `expected ${error.expected}, got ${error.value}`,
|
|
112
|
+
path: typiaPathToStandardSchemaPath(error.path)
|
|
113
|
+
}))
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
exports2._createStandardSchema = _createStandardSchema2;
|
|
120
|
+
var PathParserState;
|
|
121
|
+
(function(PathParserState2) {
|
|
122
|
+
PathParserState2[PathParserState2["Start"] = 0] = "Start";
|
|
123
|
+
PathParserState2[PathParserState2["Property"] = 1] = "Property";
|
|
124
|
+
PathParserState2[PathParserState2["StringKey"] = 2] = "StringKey";
|
|
125
|
+
PathParserState2[PathParserState2["NumberKey"] = 3] = "NumberKey";
|
|
126
|
+
})(PathParserState || (PathParserState = {}));
|
|
127
|
+
var typiaPathToStandardSchemaPath = (path9) => {
|
|
128
|
+
if (!path9.startsWith("$input")) {
|
|
129
|
+
throw new Error(`Invalid path: ${JSON.stringify(path9)}`);
|
|
130
|
+
}
|
|
131
|
+
const segments = [];
|
|
132
|
+
let currentSegment = "";
|
|
133
|
+
let state = PathParserState.Start;
|
|
134
|
+
let index = "$input".length - 1;
|
|
135
|
+
while (index < path9.length - 1) {
|
|
136
|
+
index++;
|
|
137
|
+
const char = path9[index];
|
|
138
|
+
if (state === PathParserState.Property) {
|
|
139
|
+
if (char === "." || char === "[") {
|
|
140
|
+
segments.push({
|
|
141
|
+
key: currentSegment
|
|
142
|
+
});
|
|
143
|
+
state = PathParserState.Start;
|
|
144
|
+
} else if (index === path9.length - 1) {
|
|
145
|
+
currentSegment += char;
|
|
146
|
+
segments.push({
|
|
147
|
+
key: currentSegment
|
|
148
|
+
});
|
|
149
|
+
index++;
|
|
150
|
+
state = PathParserState.Start;
|
|
151
|
+
} else {
|
|
152
|
+
currentSegment += char;
|
|
153
|
+
}
|
|
154
|
+
} else if (state === PathParserState.StringKey) {
|
|
155
|
+
if (char === '"') {
|
|
156
|
+
segments.push({
|
|
157
|
+
key: JSON.parse(currentSegment + char)
|
|
158
|
+
});
|
|
159
|
+
index += 2;
|
|
160
|
+
state = PathParserState.Start;
|
|
161
|
+
} else if (char === "\\") {
|
|
162
|
+
currentSegment += path9[index];
|
|
163
|
+
index++;
|
|
164
|
+
currentSegment += path9[index];
|
|
165
|
+
} else {
|
|
166
|
+
currentSegment += char;
|
|
167
|
+
}
|
|
168
|
+
} else if (state === PathParserState.NumberKey) {
|
|
169
|
+
if (char === "]") {
|
|
170
|
+
segments.push({
|
|
171
|
+
key: Number.parseInt(currentSegment)
|
|
172
|
+
});
|
|
173
|
+
index++;
|
|
174
|
+
state = PathParserState.Start;
|
|
175
|
+
} else {
|
|
176
|
+
currentSegment += char;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
if (state === PathParserState.Start && index < path9.length - 1) {
|
|
180
|
+
const newChar = path9[index];
|
|
181
|
+
currentSegment = "";
|
|
182
|
+
if (newChar === "[") {
|
|
183
|
+
if (path9[index + 1] === '"') {
|
|
184
|
+
state = PathParserState.StringKey;
|
|
185
|
+
index++;
|
|
186
|
+
currentSegment = '"';
|
|
187
|
+
} else {
|
|
188
|
+
state = PathParserState.NumberKey;
|
|
189
|
+
}
|
|
190
|
+
} else if (newChar === ".") {
|
|
191
|
+
state = PathParserState.Property;
|
|
192
|
+
} else {
|
|
193
|
+
throw new Error("Unreachable: pointer points invalid character");
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
if (state !== PathParserState.Start) {
|
|
198
|
+
throw new Error(`Failed to parse path: ${JSON.stringify(path9)}`);
|
|
199
|
+
}
|
|
200
|
+
return segments;
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
|
|
83
205
|
// src/internal.ts
|
|
84
206
|
var internal_exports = {};
|
|
85
207
|
__export(internal_exports, {
|
|
@@ -312,7 +434,8 @@ async function updateAppJsonMetadata(metadata) {
|
|
|
312
434
|
init_cjs_shims();
|
|
313
435
|
var __typia_transform__isFormatUuid = __toESM(require_isFormatUuid(), 1);
|
|
314
436
|
var __typia_transform__validateReport = __toESM(require_validateReport(), 1);
|
|
315
|
-
var
|
|
437
|
+
var __typia_transform__createStandardSchema = __toESM(require_createStandardSchema(), 1);
|
|
438
|
+
var validateAppManifest = (() => {
|
|
316
439
|
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));
|
|
317
440
|
const _io1 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
|
|
318
441
|
const _io2 = (input) => "geolocation" === input.name && "access" === input.access;
|
|
@@ -450,7 +573,7 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
450
573
|
const __is = (input) => "object" === typeof input && null !== input && _io0(input);
|
|
451
574
|
let errors;
|
|
452
575
|
let _report;
|
|
453
|
-
return (input) => {
|
|
576
|
+
return __typia_transform__createStandardSchema._createStandardSchema((input) => {
|
|
454
577
|
if (false === __is(input)) {
|
|
455
578
|
errors = [];
|
|
456
579
|
_report = __typia_transform__validateReport._validateReport(errors);
|
|
@@ -477,7 +600,268 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
477
600
|
success: true,
|
|
478
601
|
data: input
|
|
479
602
|
};
|
|
480
|
-
};
|
|
603
|
+
});
|
|
604
|
+
})();
|
|
605
|
+
var validateAppInTossPluginOptions = (() => {
|
|
606
|
+
const _io0 = (input) => (void 0 === input.appType || "general" === input.appType || "game" === input.appType) && ("object" === typeof input.brand && null !== input.brand && _io1(input.brand)) && (Array.isArray(input.permissions) && input.permissions.every((elem) => "object" === typeof elem && null !== elem && _iu0(elem))) && (void 0 === input.navigationBar || "object" === typeof input.navigationBar && null !== input.navigationBar && false === Array.isArray(input.navigationBar) && _io7(input.navigationBar));
|
|
607
|
+
const _io1 = (input) => "string" === typeof input.displayName && "string" === typeof input.primaryColor && "string" === typeof input.icon;
|
|
608
|
+
const _io2 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
|
|
609
|
+
const _io3 = (input) => "geolocation" === input.name && "access" === input.access;
|
|
610
|
+
const _io4 = (input) => "contacts" === input.name && ("read" === input.access || "write" === input.access);
|
|
611
|
+
const _io5 = (input) => "photos" === input.name && ("read" === input.access || "write" === input.access);
|
|
612
|
+
const _io6 = (input) => "camera" === input.name && "access" === input.access;
|
|
613
|
+
const _io7 = (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 && _io8(input.initialAccessoryButton));
|
|
614
|
+
const _io8 = (input) => "string" === typeof input.id && "string" === typeof input.title && ("object" === typeof input.icon && null !== input.icon && _iu1(input.icon));
|
|
615
|
+
const _io9 = (input) => "object" === typeof input.source && null !== input.source && _io10(input.source) && (null !== input.name && void 0 === input.name);
|
|
616
|
+
const _io10 = (input) => "string" === typeof input.uri;
|
|
617
|
+
const _io11 = (input) => "string" === typeof input.name && (null !== input.source && void 0 === input.source);
|
|
618
|
+
const _iu0 = (input) => (() => {
|
|
619
|
+
if ("camera" === input.name)
|
|
620
|
+
return _io6(input);
|
|
621
|
+
else if ("photos" === input.name)
|
|
622
|
+
return _io5(input);
|
|
623
|
+
else if ("contacts" === input.name)
|
|
624
|
+
return _io4(input);
|
|
625
|
+
else if ("geolocation" === input.name)
|
|
626
|
+
return _io3(input);
|
|
627
|
+
else if ("clipboard" === input.name)
|
|
628
|
+
return _io2(input);
|
|
629
|
+
else
|
|
630
|
+
return false;
|
|
631
|
+
})();
|
|
632
|
+
const _iu1 = (input) => (() => {
|
|
633
|
+
if ("string" === typeof input.name)
|
|
634
|
+
return _io11(input);
|
|
635
|
+
else if ("object" === typeof input.source && null !== input.source && _io10(input.source))
|
|
636
|
+
return _io9(input);
|
|
637
|
+
else
|
|
638
|
+
return false;
|
|
639
|
+
})();
|
|
640
|
+
const _vo0 = (input, _path, _exceptionable = true) => [void 0 === input.appType || "general" === input.appType || "game" === input.appType || _report(_exceptionable, {
|
|
641
|
+
path: _path + ".appType",
|
|
642
|
+
expected: '("game" | "general" | undefined)',
|
|
643
|
+
value: input.appType
|
|
644
|
+
}), ("object" === typeof input.brand && null !== input.brand || _report(_exceptionable, {
|
|
645
|
+
path: _path + ".brand",
|
|
646
|
+
expected: "__type",
|
|
647
|
+
value: input.brand
|
|
648
|
+
})) && _vo1(input.brand, _path + ".brand", _exceptionable) || _report(_exceptionable, {
|
|
649
|
+
path: _path + ".brand",
|
|
650
|
+
expected: "__type",
|
|
651
|
+
value: input.brand
|
|
652
|
+
}), (Array.isArray(input.permissions) || _report(_exceptionable, {
|
|
653
|
+
path: _path + ".permissions",
|
|
654
|
+
expected: "Array<Permission>",
|
|
655
|
+
value: input.permissions
|
|
656
|
+
})) && input.permissions.map((elem, _index2) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
657
|
+
path: _path + ".permissions[" + _index2 + "]",
|
|
658
|
+
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
659
|
+
value: elem
|
|
660
|
+
})) && _vu0(elem, _path + ".permissions[" + _index2 + "]", _exceptionable) || _report(_exceptionable, {
|
|
661
|
+
path: _path + ".permissions[" + _index2 + "]",
|
|
662
|
+
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
663
|
+
value: elem
|
|
664
|
+
})).every((flag) => flag) || _report(_exceptionable, {
|
|
665
|
+
path: _path + ".permissions",
|
|
666
|
+
expected: "Array<Permission>",
|
|
667
|
+
value: input.permissions
|
|
668
|
+
}), void 0 === input.navigationBar || ("object" === typeof input.navigationBar && null !== input.navigationBar && false === Array.isArray(input.navigationBar) || _report(_exceptionable, {
|
|
669
|
+
path: _path + ".navigationBar",
|
|
670
|
+
expected: "(__type.o1 | undefined)",
|
|
671
|
+
value: input.navigationBar
|
|
672
|
+
})) && _vo7(input.navigationBar, _path + ".navigationBar", _exceptionable) || _report(_exceptionable, {
|
|
673
|
+
path: _path + ".navigationBar",
|
|
674
|
+
expected: "(__type.o1 | undefined)",
|
|
675
|
+
value: input.navigationBar
|
|
676
|
+
})].every((flag) => flag);
|
|
677
|
+
const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.displayName || _report(_exceptionable, {
|
|
678
|
+
path: _path + ".displayName",
|
|
679
|
+
expected: "string",
|
|
680
|
+
value: input.displayName
|
|
681
|
+
}), "string" === typeof input.primaryColor || _report(_exceptionable, {
|
|
682
|
+
path: _path + ".primaryColor",
|
|
683
|
+
expected: "string",
|
|
684
|
+
value: input.primaryColor
|
|
685
|
+
}), "string" === typeof input.icon || _report(_exceptionable, {
|
|
686
|
+
path: _path + ".icon",
|
|
687
|
+
expected: "string",
|
|
688
|
+
value: input.icon
|
|
689
|
+
})].every((flag) => flag);
|
|
690
|
+
const _vo2 = (input, _path, _exceptionable = true) => ["clipboard" === input.name || _report(_exceptionable, {
|
|
691
|
+
path: _path + ".name",
|
|
692
|
+
expected: '"clipboard"',
|
|
693
|
+
value: input.name
|
|
694
|
+
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
695
|
+
path: _path + ".access",
|
|
696
|
+
expected: '("read" | "write")',
|
|
697
|
+
value: input.access
|
|
698
|
+
})].every((flag) => flag);
|
|
699
|
+
const _vo3 = (input, _path, _exceptionable = true) => ["geolocation" === input.name || _report(_exceptionable, {
|
|
700
|
+
path: _path + ".name",
|
|
701
|
+
expected: '"geolocation"',
|
|
702
|
+
value: input.name
|
|
703
|
+
}), "access" === input.access || _report(_exceptionable, {
|
|
704
|
+
path: _path + ".access",
|
|
705
|
+
expected: '"access"',
|
|
706
|
+
value: input.access
|
|
707
|
+
})].every((flag) => flag);
|
|
708
|
+
const _vo4 = (input, _path, _exceptionable = true) => ["contacts" === input.name || _report(_exceptionable, {
|
|
709
|
+
path: _path + ".name",
|
|
710
|
+
expected: '"contacts"',
|
|
711
|
+
value: input.name
|
|
712
|
+
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
713
|
+
path: _path + ".access",
|
|
714
|
+
expected: '("read" | "write")',
|
|
715
|
+
value: input.access
|
|
716
|
+
})].every((flag) => flag);
|
|
717
|
+
const _vo5 = (input, _path, _exceptionable = true) => ["photos" === input.name || _report(_exceptionable, {
|
|
718
|
+
path: _path + ".name",
|
|
719
|
+
expected: '"photos"',
|
|
720
|
+
value: input.name
|
|
721
|
+
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
722
|
+
path: _path + ".access",
|
|
723
|
+
expected: '("read" | "write")',
|
|
724
|
+
value: input.access
|
|
725
|
+
})].every((flag) => flag);
|
|
726
|
+
const _vo6 = (input, _path, _exceptionable = true) => ["camera" === input.name || _report(_exceptionable, {
|
|
727
|
+
path: _path + ".name",
|
|
728
|
+
expected: '"camera"',
|
|
729
|
+
value: input.name
|
|
730
|
+
}), "access" === input.access || _report(_exceptionable, {
|
|
731
|
+
path: _path + ".access",
|
|
732
|
+
expected: '"access"',
|
|
733
|
+
value: input.access
|
|
734
|
+
})].every((flag) => flag);
|
|
735
|
+
const _vo7 = (input, _path, _exceptionable = true) => [void 0 === input.withBackButton || "boolean" === typeof input.withBackButton || _report(_exceptionable, {
|
|
736
|
+
path: _path + ".withBackButton",
|
|
737
|
+
expected: "(boolean | undefined)",
|
|
738
|
+
value: input.withBackButton
|
|
739
|
+
}), void 0 === input.withHomeButton || "boolean" === typeof input.withHomeButton || _report(_exceptionable, {
|
|
740
|
+
path: _path + ".withHomeButton",
|
|
741
|
+
expected: "(boolean | undefined)",
|
|
742
|
+
value: input.withHomeButton
|
|
743
|
+
}), void 0 === input.initialAccessoryButton || ("object" === typeof input.initialAccessoryButton && null !== input.initialAccessoryButton || _report(_exceptionable, {
|
|
744
|
+
path: _path + ".initialAccessoryButton",
|
|
745
|
+
expected: "(InitialAccessoryButton | undefined)",
|
|
746
|
+
value: input.initialAccessoryButton
|
|
747
|
+
})) && _vo8(input.initialAccessoryButton, _path + ".initialAccessoryButton", _exceptionable) || _report(_exceptionable, {
|
|
748
|
+
path: _path + ".initialAccessoryButton",
|
|
749
|
+
expected: "(InitialAccessoryButton | undefined)",
|
|
750
|
+
value: input.initialAccessoryButton
|
|
751
|
+
})].every((flag) => flag);
|
|
752
|
+
const _vo8 = (input, _path, _exceptionable = true) => ["string" === typeof input.id || _report(_exceptionable, {
|
|
753
|
+
path: _path + ".id",
|
|
754
|
+
expected: "string",
|
|
755
|
+
value: input.id
|
|
756
|
+
}), "string" === typeof input.title || _report(_exceptionable, {
|
|
757
|
+
path: _path + ".title",
|
|
758
|
+
expected: "string",
|
|
759
|
+
value: input.title
|
|
760
|
+
}), ("object" === typeof input.icon && null !== input.icon || _report(_exceptionable, {
|
|
761
|
+
path: _path + ".icon",
|
|
762
|
+
expected: "(__type.o2 | __type.o4)",
|
|
763
|
+
value: input.icon
|
|
764
|
+
})) && _vu1(input.icon, _path + ".icon", _exceptionable) || _report(_exceptionable, {
|
|
765
|
+
path: _path + ".icon",
|
|
766
|
+
expected: "(__type.o2 | __type.o4)",
|
|
767
|
+
value: input.icon
|
|
768
|
+
})].every((flag) => flag);
|
|
769
|
+
const _vo9 = (input, _path, _exceptionable = true) => [("object" === typeof input.source && null !== input.source || _report(_exceptionable, {
|
|
770
|
+
path: _path + ".source",
|
|
771
|
+
expected: "__type.o3",
|
|
772
|
+
value: input.source
|
|
773
|
+
})) && _vo10(input.source, _path + ".source", _exceptionable) || _report(_exceptionable, {
|
|
774
|
+
path: _path + ".source",
|
|
775
|
+
expected: "__type.o3",
|
|
776
|
+
value: input.source
|
|
777
|
+
}), (null !== input.name || _report(_exceptionable, {
|
|
778
|
+
path: _path + ".name",
|
|
779
|
+
expected: "undefined",
|
|
780
|
+
value: input.name
|
|
781
|
+
})) && (void 0 === input.name || _report(_exceptionable, {
|
|
782
|
+
path: _path + ".name",
|
|
783
|
+
expected: "undefined",
|
|
784
|
+
value: input.name
|
|
785
|
+
}))].every((flag) => flag);
|
|
786
|
+
const _vo10 = (input, _path, _exceptionable = true) => ["string" === typeof input.uri || _report(_exceptionable, {
|
|
787
|
+
path: _path + ".uri",
|
|
788
|
+
expected: "string",
|
|
789
|
+
value: input.uri
|
|
790
|
+
})].every((flag) => flag);
|
|
791
|
+
const _vo11 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
792
|
+
path: _path + ".name",
|
|
793
|
+
expected: "string",
|
|
794
|
+
value: input.name
|
|
795
|
+
}), (null !== input.source || _report(_exceptionable, {
|
|
796
|
+
path: _path + ".source",
|
|
797
|
+
expected: "undefined",
|
|
798
|
+
value: input.source
|
|
799
|
+
})) && (void 0 === input.source || _report(_exceptionable, {
|
|
800
|
+
path: _path + ".source",
|
|
801
|
+
expected: "undefined",
|
|
802
|
+
value: input.source
|
|
803
|
+
}))].every((flag) => flag);
|
|
804
|
+
const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
805
|
+
if ("camera" === input.name)
|
|
806
|
+
return _vo6(input, _path, _exceptionable);
|
|
807
|
+
else if ("photos" === input.name)
|
|
808
|
+
return _vo5(input, _path, _exceptionable);
|
|
809
|
+
else if ("contacts" === input.name)
|
|
810
|
+
return _vo4(input, _path, _exceptionable);
|
|
811
|
+
else if ("geolocation" === input.name)
|
|
812
|
+
return _vo3(input, _path, _exceptionable);
|
|
813
|
+
else if ("clipboard" === input.name)
|
|
814
|
+
return _vo2(input, _path, _exceptionable);
|
|
815
|
+
else
|
|
816
|
+
return _report(_exceptionable, {
|
|
817
|
+
path: _path,
|
|
818
|
+
expected: "(CameraPermission | PhotosPermission | ContactsPermission | GeolocationPermission | ClipboardPermission)",
|
|
819
|
+
value: input
|
|
820
|
+
});
|
|
821
|
+
})();
|
|
822
|
+
const _vu1 = (input, _path, _exceptionable = true) => (() => {
|
|
823
|
+
if ("string" === typeof input.name)
|
|
824
|
+
return _vo11(input, _path, _exceptionable);
|
|
825
|
+
else if ("object" === typeof input.source && null !== input.source && _vo10(input.source, _path + ".source", false))
|
|
826
|
+
return _vo9(input, _path, _exceptionable);
|
|
827
|
+
else
|
|
828
|
+
return _report(_exceptionable, {
|
|
829
|
+
path: _path,
|
|
830
|
+
expected: "(__type.o4 | __type.o2)",
|
|
831
|
+
value: input
|
|
832
|
+
});
|
|
833
|
+
})();
|
|
834
|
+
const __is = (input) => "object" === typeof input && null !== input && _io0(input);
|
|
835
|
+
let errors;
|
|
836
|
+
let _report;
|
|
837
|
+
return __typia_transform__createStandardSchema._createStandardSchema((input) => {
|
|
838
|
+
if (false === __is(input)) {
|
|
839
|
+
errors = [];
|
|
840
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
841
|
+
((input2, _path, _exceptionable = true) => ("object" === typeof input2 && null !== input2 || _report(true, {
|
|
842
|
+
path: _path + "",
|
|
843
|
+
expected: "AppsInTossPluginOptions",
|
|
844
|
+
value: input2
|
|
845
|
+
})) && _vo0(input2, _path + "", true) || _report(true, {
|
|
846
|
+
path: _path + "",
|
|
847
|
+
expected: "AppsInTossPluginOptions",
|
|
848
|
+
value: input2
|
|
849
|
+
}))(input, "$input", true);
|
|
850
|
+
const success = 0 === errors.length;
|
|
851
|
+
return success ? {
|
|
852
|
+
success,
|
|
853
|
+
data: input
|
|
854
|
+
} : {
|
|
855
|
+
success,
|
|
856
|
+
errors,
|
|
857
|
+
data: input
|
|
858
|
+
};
|
|
859
|
+
}
|
|
860
|
+
return {
|
|
861
|
+
success: true,
|
|
862
|
+
data: input
|
|
863
|
+
};
|
|
864
|
+
});
|
|
481
865
|
})();
|
|
482
866
|
|
|
483
867
|
// src/utils/createArtifact.ts
|