@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.js
CHANGED
|
@@ -34,16 +34,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
34
34
|
mod
|
|
35
35
|
));
|
|
36
36
|
|
|
37
|
-
//
|
|
37
|
+
// ../../../.yarn/__virtual__/tsup-virtual-dc9661456a/0/cache/tsup-npm-8.4.0-f78d2622c9-c6636ffd6a.zip/node_modules/tsup/assets/esm_shims.js
|
|
38
38
|
var init_esm_shims = __esm({
|
|
39
|
-
"
|
|
39
|
+
"../../../.yarn/__virtual__/tsup-virtual-dc9661456a/0/cache/tsup-npm-8.4.0-f78d2622c9-c6636ffd6a.zip/node_modules/tsup/assets/esm_shims.js"() {
|
|
40
40
|
"use strict";
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
//
|
|
44
|
+
// ../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_isFormatUuid.js
|
|
45
45
|
var require_isFormatUuid = __commonJS({
|
|
46
|
-
"
|
|
46
|
+
"../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_isFormatUuid.js"(exports) {
|
|
47
47
|
"use strict";
|
|
48
48
|
init_esm_shims();
|
|
49
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -54,9 +54,9 @@ var require_isFormatUuid = __commonJS({
|
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
|
|
57
|
-
//
|
|
57
|
+
// ../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_validateReport.js
|
|
58
58
|
var require_validateReport = __commonJS({
|
|
59
|
-
"
|
|
59
|
+
"../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_validateReport.js"(exports) {
|
|
60
60
|
"use strict";
|
|
61
61
|
init_esm_shims();
|
|
62
62
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -69,8 +69,16 @@ var require_validateReport = __commonJS({
|
|
|
69
69
|
return path9.length > last.length || last.substring(0, path9.length) !== path9;
|
|
70
70
|
};
|
|
71
71
|
return (exceptable, error) => {
|
|
72
|
-
|
|
72
|
+
var _a;
|
|
73
|
+
if (exceptable && reportable(error.path)) {
|
|
74
|
+
if (error.value === void 0)
|
|
75
|
+
(_a = error.description) !== null && _a !== void 0 ? _a : error.description = [
|
|
76
|
+
"The value at this path is `undefined`.",
|
|
77
|
+
"",
|
|
78
|
+
`Please fill the \`${error.expected}\` typed value next time.`
|
|
79
|
+
].join("\n");
|
|
73
80
|
array.push(error);
|
|
81
|
+
}
|
|
74
82
|
return false;
|
|
75
83
|
};
|
|
76
84
|
};
|
|
@@ -78,6 +86,120 @@ var require_validateReport = __commonJS({
|
|
|
78
86
|
}
|
|
79
87
|
});
|
|
80
88
|
|
|
89
|
+
// ../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_createStandardSchema.js
|
|
90
|
+
var require_createStandardSchema = __commonJS({
|
|
91
|
+
"../../../.yarn/__virtual__/typia-virtual-6e1bbef80b/0/cache/typia-npm-9.7.2-987d15a303-1b19baddfe.zip/node_modules/typia/lib/internal/_createStandardSchema.js"(exports) {
|
|
92
|
+
"use strict";
|
|
93
|
+
init_esm_shims();
|
|
94
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
95
|
+
exports._createStandardSchema = void 0;
|
|
96
|
+
var _createStandardSchema2 = (fn) => Object.assign(fn, {
|
|
97
|
+
"~standard": {
|
|
98
|
+
version: 1,
|
|
99
|
+
vendor: "typia",
|
|
100
|
+
validate: (input) => {
|
|
101
|
+
const result = fn(input);
|
|
102
|
+
if (result.success) {
|
|
103
|
+
return {
|
|
104
|
+
value: result.data
|
|
105
|
+
};
|
|
106
|
+
} else {
|
|
107
|
+
return {
|
|
108
|
+
issues: result.errors.map((error) => ({
|
|
109
|
+
message: `expected ${error.expected}, got ${error.value}`,
|
|
110
|
+
path: typiaPathToStandardSchemaPath(error.path)
|
|
111
|
+
}))
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
exports._createStandardSchema = _createStandardSchema2;
|
|
118
|
+
var PathParserState;
|
|
119
|
+
(function(PathParserState2) {
|
|
120
|
+
PathParserState2[PathParserState2["Start"] = 0] = "Start";
|
|
121
|
+
PathParserState2[PathParserState2["Property"] = 1] = "Property";
|
|
122
|
+
PathParserState2[PathParserState2["StringKey"] = 2] = "StringKey";
|
|
123
|
+
PathParserState2[PathParserState2["NumberKey"] = 3] = "NumberKey";
|
|
124
|
+
})(PathParserState || (PathParserState = {}));
|
|
125
|
+
var typiaPathToStandardSchemaPath = (path9) => {
|
|
126
|
+
if (!path9.startsWith("$input")) {
|
|
127
|
+
throw new Error(`Invalid path: ${JSON.stringify(path9)}`);
|
|
128
|
+
}
|
|
129
|
+
const segments = [];
|
|
130
|
+
let currentSegment = "";
|
|
131
|
+
let state = PathParserState.Start;
|
|
132
|
+
let index = "$input".length - 1;
|
|
133
|
+
while (index < path9.length - 1) {
|
|
134
|
+
index++;
|
|
135
|
+
const char = path9[index];
|
|
136
|
+
if (state === PathParserState.Property) {
|
|
137
|
+
if (char === "." || char === "[") {
|
|
138
|
+
segments.push({
|
|
139
|
+
key: currentSegment
|
|
140
|
+
});
|
|
141
|
+
state = PathParserState.Start;
|
|
142
|
+
} else if (index === path9.length - 1) {
|
|
143
|
+
currentSegment += char;
|
|
144
|
+
segments.push({
|
|
145
|
+
key: currentSegment
|
|
146
|
+
});
|
|
147
|
+
index++;
|
|
148
|
+
state = PathParserState.Start;
|
|
149
|
+
} else {
|
|
150
|
+
currentSegment += char;
|
|
151
|
+
}
|
|
152
|
+
} else if (state === PathParserState.StringKey) {
|
|
153
|
+
if (char === '"') {
|
|
154
|
+
segments.push({
|
|
155
|
+
key: JSON.parse(currentSegment + char)
|
|
156
|
+
});
|
|
157
|
+
index += 2;
|
|
158
|
+
state = PathParserState.Start;
|
|
159
|
+
} else if (char === "\\") {
|
|
160
|
+
currentSegment += path9[index];
|
|
161
|
+
index++;
|
|
162
|
+
currentSegment += path9[index];
|
|
163
|
+
} else {
|
|
164
|
+
currentSegment += char;
|
|
165
|
+
}
|
|
166
|
+
} else if (state === PathParserState.NumberKey) {
|
|
167
|
+
if (char === "]") {
|
|
168
|
+
segments.push({
|
|
169
|
+
key: Number.parseInt(currentSegment)
|
|
170
|
+
});
|
|
171
|
+
index++;
|
|
172
|
+
state = PathParserState.Start;
|
|
173
|
+
} else {
|
|
174
|
+
currentSegment += char;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (state === PathParserState.Start && index < path9.length - 1) {
|
|
178
|
+
const newChar = path9[index];
|
|
179
|
+
currentSegment = "";
|
|
180
|
+
if (newChar === "[") {
|
|
181
|
+
if (path9[index + 1] === '"') {
|
|
182
|
+
state = PathParserState.StringKey;
|
|
183
|
+
index++;
|
|
184
|
+
currentSegment = '"';
|
|
185
|
+
} else {
|
|
186
|
+
state = PathParserState.NumberKey;
|
|
187
|
+
}
|
|
188
|
+
} else if (newChar === ".") {
|
|
189
|
+
state = PathParserState.Property;
|
|
190
|
+
} else {
|
|
191
|
+
throw new Error("Unreachable: pointer points invalid character");
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
if (state !== PathParserState.Start) {
|
|
196
|
+
throw new Error(`Failed to parse path: ${JSON.stringify(path9)}`);
|
|
197
|
+
}
|
|
198
|
+
return segments;
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
|
|
81
203
|
// src/internal.ts
|
|
82
204
|
init_esm_shims();
|
|
83
205
|
|
|
@@ -305,7 +427,8 @@ async function updateAppJsonMetadata(metadata) {
|
|
|
305
427
|
init_esm_shims();
|
|
306
428
|
var __typia_transform__isFormatUuid = __toESM(require_isFormatUuid(), 1);
|
|
307
429
|
var __typia_transform__validateReport = __toESM(require_validateReport(), 1);
|
|
308
|
-
var
|
|
430
|
+
var __typia_transform__createStandardSchema = __toESM(require_createStandardSchema(), 1);
|
|
431
|
+
var validateAppManifest = (() => {
|
|
309
432
|
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));
|
|
310
433
|
const _io1 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
|
|
311
434
|
const _io2 = (input) => "geolocation" === input.name && "access" === input.access;
|
|
@@ -443,7 +566,7 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
443
566
|
const __is = (input) => "object" === typeof input && null !== input && _io0(input);
|
|
444
567
|
let errors;
|
|
445
568
|
let _report;
|
|
446
|
-
return (input) => {
|
|
569
|
+
return __typia_transform__createStandardSchema._createStandardSchema((input) => {
|
|
447
570
|
if (false === __is(input)) {
|
|
448
571
|
errors = [];
|
|
449
572
|
_report = __typia_transform__validateReport._validateReport(errors);
|
|
@@ -470,7 +593,268 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
470
593
|
success: true,
|
|
471
594
|
data: input
|
|
472
595
|
};
|
|
473
|
-
};
|
|
596
|
+
});
|
|
597
|
+
})();
|
|
598
|
+
var validateAppInTossPluginOptions = (() => {
|
|
599
|
+
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));
|
|
600
|
+
const _io1 = (input) => "string" === typeof input.displayName && "string" === typeof input.primaryColor && "string" === typeof input.icon;
|
|
601
|
+
const _io2 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
|
|
602
|
+
const _io3 = (input) => "geolocation" === input.name && "access" === input.access;
|
|
603
|
+
const _io4 = (input) => "contacts" === input.name && ("read" === input.access || "write" === input.access);
|
|
604
|
+
const _io5 = (input) => "photos" === input.name && ("read" === input.access || "write" === input.access);
|
|
605
|
+
const _io6 = (input) => "camera" === input.name && "access" === input.access;
|
|
606
|
+
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));
|
|
607
|
+
const _io8 = (input) => "string" === typeof input.id && "string" === typeof input.title && ("object" === typeof input.icon && null !== input.icon && _iu1(input.icon));
|
|
608
|
+
const _io9 = (input) => "object" === typeof input.source && null !== input.source && _io10(input.source) && (null !== input.name && void 0 === input.name);
|
|
609
|
+
const _io10 = (input) => "string" === typeof input.uri;
|
|
610
|
+
const _io11 = (input) => "string" === typeof input.name && (null !== input.source && void 0 === input.source);
|
|
611
|
+
const _iu0 = (input) => (() => {
|
|
612
|
+
if ("camera" === input.name)
|
|
613
|
+
return _io6(input);
|
|
614
|
+
else if ("photos" === input.name)
|
|
615
|
+
return _io5(input);
|
|
616
|
+
else if ("contacts" === input.name)
|
|
617
|
+
return _io4(input);
|
|
618
|
+
else if ("geolocation" === input.name)
|
|
619
|
+
return _io3(input);
|
|
620
|
+
else if ("clipboard" === input.name)
|
|
621
|
+
return _io2(input);
|
|
622
|
+
else
|
|
623
|
+
return false;
|
|
624
|
+
})();
|
|
625
|
+
const _iu1 = (input) => (() => {
|
|
626
|
+
if ("string" === typeof input.name)
|
|
627
|
+
return _io11(input);
|
|
628
|
+
else if ("object" === typeof input.source && null !== input.source && _io10(input.source))
|
|
629
|
+
return _io9(input);
|
|
630
|
+
else
|
|
631
|
+
return false;
|
|
632
|
+
})();
|
|
633
|
+
const _vo0 = (input, _path, _exceptionable = true) => [void 0 === input.appType || "general" === input.appType || "game" === input.appType || _report(_exceptionable, {
|
|
634
|
+
path: _path + ".appType",
|
|
635
|
+
expected: '("game" | "general" | undefined)',
|
|
636
|
+
value: input.appType
|
|
637
|
+
}), ("object" === typeof input.brand && null !== input.brand || _report(_exceptionable, {
|
|
638
|
+
path: _path + ".brand",
|
|
639
|
+
expected: "__type",
|
|
640
|
+
value: input.brand
|
|
641
|
+
})) && _vo1(input.brand, _path + ".brand", _exceptionable) || _report(_exceptionable, {
|
|
642
|
+
path: _path + ".brand",
|
|
643
|
+
expected: "__type",
|
|
644
|
+
value: input.brand
|
|
645
|
+
}), (Array.isArray(input.permissions) || _report(_exceptionable, {
|
|
646
|
+
path: _path + ".permissions",
|
|
647
|
+
expected: "Array<Permission>",
|
|
648
|
+
value: input.permissions
|
|
649
|
+
})) && input.permissions.map((elem, _index2) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
650
|
+
path: _path + ".permissions[" + _index2 + "]",
|
|
651
|
+
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
652
|
+
value: elem
|
|
653
|
+
})) && _vu0(elem, _path + ".permissions[" + _index2 + "]", _exceptionable) || _report(_exceptionable, {
|
|
654
|
+
path: _path + ".permissions[" + _index2 + "]",
|
|
655
|
+
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
656
|
+
value: elem
|
|
657
|
+
})).every((flag) => flag) || _report(_exceptionable, {
|
|
658
|
+
path: _path + ".permissions",
|
|
659
|
+
expected: "Array<Permission>",
|
|
660
|
+
value: input.permissions
|
|
661
|
+
}), void 0 === input.navigationBar || ("object" === typeof input.navigationBar && null !== input.navigationBar && false === Array.isArray(input.navigationBar) || _report(_exceptionable, {
|
|
662
|
+
path: _path + ".navigationBar",
|
|
663
|
+
expected: "(__type.o1 | undefined)",
|
|
664
|
+
value: input.navigationBar
|
|
665
|
+
})) && _vo7(input.navigationBar, _path + ".navigationBar", _exceptionable) || _report(_exceptionable, {
|
|
666
|
+
path: _path + ".navigationBar",
|
|
667
|
+
expected: "(__type.o1 | undefined)",
|
|
668
|
+
value: input.navigationBar
|
|
669
|
+
})].every((flag) => flag);
|
|
670
|
+
const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.displayName || _report(_exceptionable, {
|
|
671
|
+
path: _path + ".displayName",
|
|
672
|
+
expected: "string",
|
|
673
|
+
value: input.displayName
|
|
674
|
+
}), "string" === typeof input.primaryColor || _report(_exceptionable, {
|
|
675
|
+
path: _path + ".primaryColor",
|
|
676
|
+
expected: "string",
|
|
677
|
+
value: input.primaryColor
|
|
678
|
+
}), "string" === typeof input.icon || _report(_exceptionable, {
|
|
679
|
+
path: _path + ".icon",
|
|
680
|
+
expected: "string",
|
|
681
|
+
value: input.icon
|
|
682
|
+
})].every((flag) => flag);
|
|
683
|
+
const _vo2 = (input, _path, _exceptionable = true) => ["clipboard" === input.name || _report(_exceptionable, {
|
|
684
|
+
path: _path + ".name",
|
|
685
|
+
expected: '"clipboard"',
|
|
686
|
+
value: input.name
|
|
687
|
+
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
688
|
+
path: _path + ".access",
|
|
689
|
+
expected: '("read" | "write")',
|
|
690
|
+
value: input.access
|
|
691
|
+
})].every((flag) => flag);
|
|
692
|
+
const _vo3 = (input, _path, _exceptionable = true) => ["geolocation" === input.name || _report(_exceptionable, {
|
|
693
|
+
path: _path + ".name",
|
|
694
|
+
expected: '"geolocation"',
|
|
695
|
+
value: input.name
|
|
696
|
+
}), "access" === input.access || _report(_exceptionable, {
|
|
697
|
+
path: _path + ".access",
|
|
698
|
+
expected: '"access"',
|
|
699
|
+
value: input.access
|
|
700
|
+
})].every((flag) => flag);
|
|
701
|
+
const _vo4 = (input, _path, _exceptionable = true) => ["contacts" === input.name || _report(_exceptionable, {
|
|
702
|
+
path: _path + ".name",
|
|
703
|
+
expected: '"contacts"',
|
|
704
|
+
value: input.name
|
|
705
|
+
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
706
|
+
path: _path + ".access",
|
|
707
|
+
expected: '("read" | "write")',
|
|
708
|
+
value: input.access
|
|
709
|
+
})].every((flag) => flag);
|
|
710
|
+
const _vo5 = (input, _path, _exceptionable = true) => ["photos" === input.name || _report(_exceptionable, {
|
|
711
|
+
path: _path + ".name",
|
|
712
|
+
expected: '"photos"',
|
|
713
|
+
value: input.name
|
|
714
|
+
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
715
|
+
path: _path + ".access",
|
|
716
|
+
expected: '("read" | "write")',
|
|
717
|
+
value: input.access
|
|
718
|
+
})].every((flag) => flag);
|
|
719
|
+
const _vo6 = (input, _path, _exceptionable = true) => ["camera" === input.name || _report(_exceptionable, {
|
|
720
|
+
path: _path + ".name",
|
|
721
|
+
expected: '"camera"',
|
|
722
|
+
value: input.name
|
|
723
|
+
}), "access" === input.access || _report(_exceptionable, {
|
|
724
|
+
path: _path + ".access",
|
|
725
|
+
expected: '"access"',
|
|
726
|
+
value: input.access
|
|
727
|
+
})].every((flag) => flag);
|
|
728
|
+
const _vo7 = (input, _path, _exceptionable = true) => [void 0 === input.withBackButton || "boolean" === typeof input.withBackButton || _report(_exceptionable, {
|
|
729
|
+
path: _path + ".withBackButton",
|
|
730
|
+
expected: "(boolean | undefined)",
|
|
731
|
+
value: input.withBackButton
|
|
732
|
+
}), void 0 === input.withHomeButton || "boolean" === typeof input.withHomeButton || _report(_exceptionable, {
|
|
733
|
+
path: _path + ".withHomeButton",
|
|
734
|
+
expected: "(boolean | undefined)",
|
|
735
|
+
value: input.withHomeButton
|
|
736
|
+
}), void 0 === input.initialAccessoryButton || ("object" === typeof input.initialAccessoryButton && null !== input.initialAccessoryButton || _report(_exceptionable, {
|
|
737
|
+
path: _path + ".initialAccessoryButton",
|
|
738
|
+
expected: "(InitialAccessoryButton | undefined)",
|
|
739
|
+
value: input.initialAccessoryButton
|
|
740
|
+
})) && _vo8(input.initialAccessoryButton, _path + ".initialAccessoryButton", _exceptionable) || _report(_exceptionable, {
|
|
741
|
+
path: _path + ".initialAccessoryButton",
|
|
742
|
+
expected: "(InitialAccessoryButton | undefined)",
|
|
743
|
+
value: input.initialAccessoryButton
|
|
744
|
+
})].every((flag) => flag);
|
|
745
|
+
const _vo8 = (input, _path, _exceptionable = true) => ["string" === typeof input.id || _report(_exceptionable, {
|
|
746
|
+
path: _path + ".id",
|
|
747
|
+
expected: "string",
|
|
748
|
+
value: input.id
|
|
749
|
+
}), "string" === typeof input.title || _report(_exceptionable, {
|
|
750
|
+
path: _path + ".title",
|
|
751
|
+
expected: "string",
|
|
752
|
+
value: input.title
|
|
753
|
+
}), ("object" === typeof input.icon && null !== input.icon || _report(_exceptionable, {
|
|
754
|
+
path: _path + ".icon",
|
|
755
|
+
expected: "(__type.o2 | __type.o4)",
|
|
756
|
+
value: input.icon
|
|
757
|
+
})) && _vu1(input.icon, _path + ".icon", _exceptionable) || _report(_exceptionable, {
|
|
758
|
+
path: _path + ".icon",
|
|
759
|
+
expected: "(__type.o2 | __type.o4)",
|
|
760
|
+
value: input.icon
|
|
761
|
+
})].every((flag) => flag);
|
|
762
|
+
const _vo9 = (input, _path, _exceptionable = true) => [("object" === typeof input.source && null !== input.source || _report(_exceptionable, {
|
|
763
|
+
path: _path + ".source",
|
|
764
|
+
expected: "__type.o3",
|
|
765
|
+
value: input.source
|
|
766
|
+
})) && _vo10(input.source, _path + ".source", _exceptionable) || _report(_exceptionable, {
|
|
767
|
+
path: _path + ".source",
|
|
768
|
+
expected: "__type.o3",
|
|
769
|
+
value: input.source
|
|
770
|
+
}), (null !== input.name || _report(_exceptionable, {
|
|
771
|
+
path: _path + ".name",
|
|
772
|
+
expected: "undefined",
|
|
773
|
+
value: input.name
|
|
774
|
+
})) && (void 0 === input.name || _report(_exceptionable, {
|
|
775
|
+
path: _path + ".name",
|
|
776
|
+
expected: "undefined",
|
|
777
|
+
value: input.name
|
|
778
|
+
}))].every((flag) => flag);
|
|
779
|
+
const _vo10 = (input, _path, _exceptionable = true) => ["string" === typeof input.uri || _report(_exceptionable, {
|
|
780
|
+
path: _path + ".uri",
|
|
781
|
+
expected: "string",
|
|
782
|
+
value: input.uri
|
|
783
|
+
})].every((flag) => flag);
|
|
784
|
+
const _vo11 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
785
|
+
path: _path + ".name",
|
|
786
|
+
expected: "string",
|
|
787
|
+
value: input.name
|
|
788
|
+
}), (null !== input.source || _report(_exceptionable, {
|
|
789
|
+
path: _path + ".source",
|
|
790
|
+
expected: "undefined",
|
|
791
|
+
value: input.source
|
|
792
|
+
})) && (void 0 === input.source || _report(_exceptionable, {
|
|
793
|
+
path: _path + ".source",
|
|
794
|
+
expected: "undefined",
|
|
795
|
+
value: input.source
|
|
796
|
+
}))].every((flag) => flag);
|
|
797
|
+
const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
798
|
+
if ("camera" === input.name)
|
|
799
|
+
return _vo6(input, _path, _exceptionable);
|
|
800
|
+
else if ("photos" === input.name)
|
|
801
|
+
return _vo5(input, _path, _exceptionable);
|
|
802
|
+
else if ("contacts" === input.name)
|
|
803
|
+
return _vo4(input, _path, _exceptionable);
|
|
804
|
+
else if ("geolocation" === input.name)
|
|
805
|
+
return _vo3(input, _path, _exceptionable);
|
|
806
|
+
else if ("clipboard" === input.name)
|
|
807
|
+
return _vo2(input, _path, _exceptionable);
|
|
808
|
+
else
|
|
809
|
+
return _report(_exceptionable, {
|
|
810
|
+
path: _path,
|
|
811
|
+
expected: "(CameraPermission | PhotosPermission | ContactsPermission | GeolocationPermission | ClipboardPermission)",
|
|
812
|
+
value: input
|
|
813
|
+
});
|
|
814
|
+
})();
|
|
815
|
+
const _vu1 = (input, _path, _exceptionable = true) => (() => {
|
|
816
|
+
if ("string" === typeof input.name)
|
|
817
|
+
return _vo11(input, _path, _exceptionable);
|
|
818
|
+
else if ("object" === typeof input.source && null !== input.source && _vo10(input.source, _path + ".source", false))
|
|
819
|
+
return _vo9(input, _path, _exceptionable);
|
|
820
|
+
else
|
|
821
|
+
return _report(_exceptionable, {
|
|
822
|
+
path: _path,
|
|
823
|
+
expected: "(__type.o4 | __type.o2)",
|
|
824
|
+
value: input
|
|
825
|
+
});
|
|
826
|
+
})();
|
|
827
|
+
const __is = (input) => "object" === typeof input && null !== input && _io0(input);
|
|
828
|
+
let errors;
|
|
829
|
+
let _report;
|
|
830
|
+
return __typia_transform__createStandardSchema._createStandardSchema((input) => {
|
|
831
|
+
if (false === __is(input)) {
|
|
832
|
+
errors = [];
|
|
833
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
834
|
+
((input2, _path, _exceptionable = true) => ("object" === typeof input2 && null !== input2 || _report(true, {
|
|
835
|
+
path: _path + "",
|
|
836
|
+
expected: "AppsInTossPluginOptions",
|
|
837
|
+
value: input2
|
|
838
|
+
})) && _vo0(input2, _path + "", true) || _report(true, {
|
|
839
|
+
path: _path + "",
|
|
840
|
+
expected: "AppsInTossPluginOptions",
|
|
841
|
+
value: input2
|
|
842
|
+
}))(input, "$input", true);
|
|
843
|
+
const success = 0 === errors.length;
|
|
844
|
+
return success ? {
|
|
845
|
+
success,
|
|
846
|
+
data: input
|
|
847
|
+
} : {
|
|
848
|
+
success,
|
|
849
|
+
errors,
|
|
850
|
+
data: input
|
|
851
|
+
};
|
|
852
|
+
}
|
|
853
|
+
return {
|
|
854
|
+
success: true,
|
|
855
|
+
data: input
|
|
856
|
+
};
|
|
857
|
+
});
|
|
474
858
|
})();
|
|
475
859
|
|
|
476
860
|
// src/utils/createArtifact.ts
|
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/plugins",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.2",
|
|
5
5
|
"description": "The plugins for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"prepack": "yarn build",
|
|
8
7
|
"test": "vitest --run",
|
|
9
8
|
"typecheck": "tsc --noEmit",
|
|
10
9
|
"lint": "eslint .",
|
|
@@ -29,12 +28,12 @@
|
|
|
29
28
|
"dist/**/*"
|
|
30
29
|
],
|
|
31
30
|
"devDependencies": {
|
|
32
|
-
"@ryoppippi/unplugin-typia": "^2.
|
|
31
|
+
"@ryoppippi/unplugin-typia": "^2.6.5",
|
|
33
32
|
"@types/archiver": "^6.0.3",
|
|
34
33
|
"@types/connect": "^3",
|
|
35
34
|
"tsup": "^8.4.0",
|
|
36
35
|
"typescript": "5.8.3",
|
|
37
|
-
"typia": "^
|
|
36
|
+
"typia": "^9.3.0",
|
|
38
37
|
"vitest": "^3.2.4"
|
|
39
38
|
},
|
|
40
39
|
"dependencies": {
|
|
@@ -45,12 +44,8 @@
|
|
|
45
44
|
"archiver": "^7.0.1",
|
|
46
45
|
"connect": "^3.7.0",
|
|
47
46
|
"esbuild": "0.25.5",
|
|
48
|
-
"execa": "
|
|
47
|
+
"execa": "9.3.0",
|
|
49
48
|
"picocolors": "^1.1.1",
|
|
50
49
|
"uuidv7": "^1.0.2"
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
"access": "public"
|
|
54
|
-
},
|
|
55
|
-
"gitHead": "ee1ce0d363246b54246472599e0312cd2d2c1ff5"
|
|
56
|
-
}
|
|
50
|
+
}
|
|
51
|
+
}
|