@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/CHANGELOG.md
ADDED
package/dist/index.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 path10.length > last.length || last.substring(0, path10.length) !== path10;
|
|
72
72
|
};
|
|
73
73
|
return (exceptable, error2) => {
|
|
74
|
-
|
|
74
|
+
var _a;
|
|
75
|
+
if (exceptable && reportable(error2.path)) {
|
|
76
|
+
if (error2.value === void 0)
|
|
77
|
+
(_a = error2.description) !== null && _a !== void 0 ? _a : error2.description = [
|
|
78
|
+
"The value at this path is `undefined`.",
|
|
79
|
+
"",
|
|
80
|
+
`Please fill the \`${error2.expected}\` typed value next time.`
|
|
81
|
+
].join("\n");
|
|
75
82
|
array.push(error2);
|
|
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((error2) => ({
|
|
111
|
+
message: `expected ${error2.expected}, got ${error2.value}`,
|
|
112
|
+
path: typiaPathToStandardSchemaPath(error2.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 = (path10) => {
|
|
128
|
+
if (!path10.startsWith("$input")) {
|
|
129
|
+
throw new Error(`Invalid path: ${JSON.stringify(path10)}`);
|
|
130
|
+
}
|
|
131
|
+
const segments = [];
|
|
132
|
+
let currentSegment = "";
|
|
133
|
+
let state = PathParserState.Start;
|
|
134
|
+
let index = "$input".length - 1;
|
|
135
|
+
while (index < path10.length - 1) {
|
|
136
|
+
index++;
|
|
137
|
+
const char = path10[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 === path10.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 += path10[index];
|
|
163
|
+
index++;
|
|
164
|
+
currentSegment += path10[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 < path10.length - 1) {
|
|
180
|
+
const newChar = path10[index];
|
|
181
|
+
currentSegment = "";
|
|
182
|
+
if (newChar === "[") {
|
|
183
|
+
if (path10[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(path10)}`);
|
|
199
|
+
}
|
|
200
|
+
return segments;
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
|
|
83
205
|
// src/index.ts
|
|
84
206
|
var index_exports = {};
|
|
85
207
|
__export(index_exports, {
|
|
@@ -339,7 +461,8 @@ async function updateAppJsonMetadata(metadata) {
|
|
|
339
461
|
init_cjs_shims();
|
|
340
462
|
var __typia_transform__isFormatUuid = __toESM(require_isFormatUuid(), 1);
|
|
341
463
|
var __typia_transform__validateReport = __toESM(require_validateReport(), 1);
|
|
342
|
-
var
|
|
464
|
+
var __typia_transform__createStandardSchema = __toESM(require_createStandardSchema(), 1);
|
|
465
|
+
var validateAppManifest = (() => {
|
|
343
466
|
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));
|
|
344
467
|
const _io1 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
|
|
345
468
|
const _io2 = (input) => "geolocation" === input.name && "access" === input.access;
|
|
@@ -477,7 +600,7 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
477
600
|
const __is = (input) => "object" === typeof input && null !== input && _io0(input);
|
|
478
601
|
let errors;
|
|
479
602
|
let _report;
|
|
480
|
-
return (input) => {
|
|
603
|
+
return __typia_transform__createStandardSchema._createStandardSchema((input) => {
|
|
481
604
|
if (false === __is(input)) {
|
|
482
605
|
errors = [];
|
|
483
606
|
_report = __typia_transform__validateReport._validateReport(errors);
|
|
@@ -504,11 +627,11 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
504
627
|
success: true,
|
|
505
628
|
data: input
|
|
506
629
|
};
|
|
507
|
-
};
|
|
630
|
+
});
|
|
508
631
|
})();
|
|
509
|
-
var validateAppInTossPluginOptions =
|
|
632
|
+
var validateAppInTossPluginOptions = (() => {
|
|
510
633
|
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));
|
|
511
|
-
const _io1 = (input) => "string" === typeof input.displayName && "string" === typeof input.primaryColor && "string" === typeof input.icon
|
|
634
|
+
const _io1 = (input) => "string" === typeof input.displayName && "string" === typeof input.primaryColor && "string" === typeof input.icon;
|
|
512
635
|
const _io2 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
|
|
513
636
|
const _io3 = (input) => "geolocation" === input.name && "access" === input.access;
|
|
514
637
|
const _io4 = (input) => "contacts" === input.name && ("read" === input.access || "write" === input.access);
|
|
@@ -590,10 +713,6 @@ var validateAppInTossPluginOptions = /* @__PURE__ */ (() => {
|
|
|
590
713
|
path: _path + ".icon",
|
|
591
714
|
expected: "string",
|
|
592
715
|
value: input.icon
|
|
593
|
-
}), "basic" === input.bridgeColorMode || "inverted" === input.bridgeColorMode || _report(_exceptionable, {
|
|
594
|
-
path: _path + ".bridgeColorMode",
|
|
595
|
-
expected: '("basic" | "inverted")',
|
|
596
|
-
value: input.bridgeColorMode
|
|
597
716
|
})].every((flag) => flag);
|
|
598
717
|
const _vo2 = (input, _path, _exceptionable = true) => ["clipboard" === input.name || _report(_exceptionable, {
|
|
599
718
|
path: _path + ".name",
|
|
@@ -742,7 +861,7 @@ var validateAppInTossPluginOptions = /* @__PURE__ */ (() => {
|
|
|
742
861
|
const __is = (input) => "object" === typeof input && null !== input && _io0(input);
|
|
743
862
|
let errors;
|
|
744
863
|
let _report;
|
|
745
|
-
return (input) => {
|
|
864
|
+
return __typia_transform__createStandardSchema._createStandardSchema((input) => {
|
|
746
865
|
if (false === __is(input)) {
|
|
747
866
|
errors = [];
|
|
748
867
|
_report = __typia_transform__validateReport._validateReport(errors);
|
|
@@ -769,7 +888,7 @@ var validateAppInTossPluginOptions = /* @__PURE__ */ (() => {
|
|
|
769
888
|
success: true,
|
|
770
889
|
data: input
|
|
771
890
|
};
|
|
772
|
-
};
|
|
891
|
+
});
|
|
773
892
|
})();
|
|
774
893
|
|
|
775
894
|
// src/utils/createArtifact.ts
|
|
@@ -1138,7 +1257,6 @@ function setupRuntimeSetupScript(config) {
|
|
|
1138
1257
|
{
|
|
1139
1258
|
appType: config.appType,
|
|
1140
1259
|
deploymentId: config.deploymentId,
|
|
1141
|
-
brandBridgeColorMode: config.brand.bridgeColorMode,
|
|
1142
1260
|
brandDisplayName: config.brand.displayName,
|
|
1143
1261
|
brandPrimaryColor: config.brand.primaryColor,
|
|
1144
1262
|
brandIcon: config.brand.icon,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GranitePluginCore } from '@granite-js/plugin-core';
|
|
2
|
+
import * as _standard_schema_spec from '@standard-schema/spec';
|
|
2
3
|
import typia, { tags } from 'typia';
|
|
3
4
|
|
|
4
5
|
type PermissionReadWrite = 'read' | 'write';
|
|
@@ -46,14 +47,13 @@ interface InitialAccessoryButton {
|
|
|
46
47
|
title: string;
|
|
47
48
|
icon: Icon;
|
|
48
49
|
}
|
|
49
|
-
declare const validateAppManifest: (input: unknown) => typia.IValidation<AppManifest>;
|
|
50
|
+
declare const validateAppManifest: ((input: unknown) => typia.IValidation<AppManifest>) & _standard_schema_spec.StandardSchemaV1<unknown, AppManifest>;
|
|
50
51
|
interface AppsInTossPluginOptions {
|
|
51
52
|
appType?: 'general' | 'game';
|
|
52
53
|
brand: {
|
|
53
54
|
displayName: string;
|
|
54
55
|
primaryColor: string;
|
|
55
56
|
icon: string;
|
|
56
|
-
bridgeColorMode: BridgeTheme;
|
|
57
57
|
};
|
|
58
58
|
permissions: AppManifest['permissions'];
|
|
59
59
|
navigationBar?: {
|
|
@@ -62,12 +62,7 @@ interface AppsInTossPluginOptions {
|
|
|
62
62
|
initialAccessoryButton?: InitialAccessoryButton;
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
* - `basic`: 기본 테마 (흰 배경)
|
|
67
|
-
* - `inverted`: 반전 테마 (검은 배경)
|
|
68
|
-
*/
|
|
69
|
-
type BridgeTheme = 'basic' | 'inverted';
|
|
70
|
-
declare const validateAppInTossPluginOptions: (input: unknown) => typia.IValidation<AppsInTossPluginOptions>;
|
|
65
|
+
declare const validateAppInTossPluginOptions: ((input: unknown) => typia.IValidation<AppsInTossPluginOptions>) & _standard_schema_spec.StandardSchemaV1<unknown, AppsInTossPluginOptions>;
|
|
71
66
|
|
|
72
67
|
declare function withAppsInTossCommon(plugins: (GranitePluginCore | Promise<GranitePluginCore>)[], options: AppsInTossPluginOptions & {
|
|
73
68
|
root: string;
|
|
@@ -160,4 +155,4 @@ declare function appsInTossPostNotice(): GranitePluginCore;
|
|
|
160
155
|
|
|
161
156
|
declare function requireMicroFrontendRuntime(): GranitePluginCore;
|
|
162
157
|
|
|
163
|
-
export { type AppManifest, type AppsInTossPluginOptions, type
|
|
158
|
+
export { type AppManifest, type AppsInTossPluginOptions, type BuildResult, type CreateArtifactOptions, type InitialAccessoryButton, type Permission, analytics, appsInToss, appsInTossAppJson, appsInTossCreateArtifact, appsInTossDevServer, appsInTossEsbuildConfig, appsInTossMetroConfig, appsInTossPostNotice, bedrockCompat, collectDependencyVersions, createArtifact, getRuntimeSetupScript, nativeModuleProxyContent, reactNativeModuleProxyContent, requireMicroFrontendRuntime, setupHostRuntimeSetupScript, setupRuntimeSetupScript, validateAppInTossPluginOptions, validateAppManifest, validateZip, withAppsInTossCommon };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GranitePluginCore } from '@granite-js/plugin-core';
|
|
2
|
+
import * as _standard_schema_spec from '@standard-schema/spec';
|
|
2
3
|
import typia, { tags } from 'typia';
|
|
3
4
|
|
|
4
5
|
type PermissionReadWrite = 'read' | 'write';
|
|
@@ -46,14 +47,13 @@ interface InitialAccessoryButton {
|
|
|
46
47
|
title: string;
|
|
47
48
|
icon: Icon;
|
|
48
49
|
}
|
|
49
|
-
declare const validateAppManifest: (input: unknown) => typia.IValidation<AppManifest>;
|
|
50
|
+
declare const validateAppManifest: ((input: unknown) => typia.IValidation<AppManifest>) & _standard_schema_spec.StandardSchemaV1<unknown, AppManifest>;
|
|
50
51
|
interface AppsInTossPluginOptions {
|
|
51
52
|
appType?: 'general' | 'game';
|
|
52
53
|
brand: {
|
|
53
54
|
displayName: string;
|
|
54
55
|
primaryColor: string;
|
|
55
56
|
icon: string;
|
|
56
|
-
bridgeColorMode: BridgeTheme;
|
|
57
57
|
};
|
|
58
58
|
permissions: AppManifest['permissions'];
|
|
59
59
|
navigationBar?: {
|
|
@@ -62,12 +62,7 @@ interface AppsInTossPluginOptions {
|
|
|
62
62
|
initialAccessoryButton?: InitialAccessoryButton;
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
* - `basic`: 기본 테마 (흰 배경)
|
|
67
|
-
* - `inverted`: 반전 테마 (검은 배경)
|
|
68
|
-
*/
|
|
69
|
-
type BridgeTheme = 'basic' | 'inverted';
|
|
70
|
-
declare const validateAppInTossPluginOptions: (input: unknown) => typia.IValidation<AppsInTossPluginOptions>;
|
|
65
|
+
declare const validateAppInTossPluginOptions: ((input: unknown) => typia.IValidation<AppsInTossPluginOptions>) & _standard_schema_spec.StandardSchemaV1<unknown, AppsInTossPluginOptions>;
|
|
71
66
|
|
|
72
67
|
declare function withAppsInTossCommon(plugins: (GranitePluginCore | Promise<GranitePluginCore>)[], options: AppsInTossPluginOptions & {
|
|
73
68
|
root: string;
|
|
@@ -160,4 +155,4 @@ declare function appsInTossPostNotice(): GranitePluginCore;
|
|
|
160
155
|
|
|
161
156
|
declare function requireMicroFrontendRuntime(): GranitePluginCore;
|
|
162
157
|
|
|
163
|
-
export { type AppManifest, type AppsInTossPluginOptions, type
|
|
158
|
+
export { type AppManifest, type AppsInTossPluginOptions, type BuildResult, type CreateArtifactOptions, type InitialAccessoryButton, type Permission, analytics, appsInToss, appsInTossAppJson, appsInTossCreateArtifact, appsInTossDevServer, appsInTossEsbuildConfig, appsInTossMetroConfig, appsInTossPostNotice, bedrockCompat, collectDependencyVersions, createArtifact, getRuntimeSetupScript, nativeModuleProxyContent, reactNativeModuleProxyContent, requireMicroFrontendRuntime, setupHostRuntimeSetupScript, setupRuntimeSetupScript, validateAppInTossPluginOptions, validateAppManifest, validateZip, withAppsInTossCommon };
|
package/dist/index.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 path10.length > last.length || last.substring(0, path10.length) !== path10;
|
|
70
70
|
};
|
|
71
71
|
return (exceptable, error2) => {
|
|
72
|
-
|
|
72
|
+
var _a;
|
|
73
|
+
if (exceptable && reportable(error2.path)) {
|
|
74
|
+
if (error2.value === void 0)
|
|
75
|
+
(_a = error2.description) !== null && _a !== void 0 ? _a : error2.description = [
|
|
76
|
+
"The value at this path is `undefined`.",
|
|
77
|
+
"",
|
|
78
|
+
`Please fill the \`${error2.expected}\` typed value next time.`
|
|
79
|
+
].join("\n");
|
|
73
80
|
array.push(error2);
|
|
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((error2) => ({
|
|
109
|
+
message: `expected ${error2.expected}, got ${error2.value}`,
|
|
110
|
+
path: typiaPathToStandardSchemaPath(error2.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 = (path10) => {
|
|
126
|
+
if (!path10.startsWith("$input")) {
|
|
127
|
+
throw new Error(`Invalid path: ${JSON.stringify(path10)}`);
|
|
128
|
+
}
|
|
129
|
+
const segments = [];
|
|
130
|
+
let currentSegment = "";
|
|
131
|
+
let state = PathParserState.Start;
|
|
132
|
+
let index = "$input".length - 1;
|
|
133
|
+
while (index < path10.length - 1) {
|
|
134
|
+
index++;
|
|
135
|
+
const char = path10[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 === path10.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 += path10[index];
|
|
161
|
+
index++;
|
|
162
|
+
currentSegment += path10[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 < path10.length - 1) {
|
|
178
|
+
const newChar = path10[index];
|
|
179
|
+
currentSegment = "";
|
|
180
|
+
if (newChar === "[") {
|
|
181
|
+
if (path10[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(path10)}`);
|
|
197
|
+
}
|
|
198
|
+
return segments;
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
|
|
81
203
|
// src/index.ts
|
|
82
204
|
init_esm_shims();
|
|
83
205
|
|
|
@@ -312,7 +434,8 @@ async function updateAppJsonMetadata(metadata) {
|
|
|
312
434
|
init_esm_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,11 +600,11 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
477
600
|
success: true,
|
|
478
601
|
data: input
|
|
479
602
|
};
|
|
480
|
-
};
|
|
603
|
+
});
|
|
481
604
|
})();
|
|
482
|
-
var validateAppInTossPluginOptions =
|
|
605
|
+
var validateAppInTossPluginOptions = (() => {
|
|
483
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));
|
|
484
|
-
const _io1 = (input) => "string" === typeof input.displayName && "string" === typeof input.primaryColor && "string" === typeof input.icon
|
|
607
|
+
const _io1 = (input) => "string" === typeof input.displayName && "string" === typeof input.primaryColor && "string" === typeof input.icon;
|
|
485
608
|
const _io2 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
|
|
486
609
|
const _io3 = (input) => "geolocation" === input.name && "access" === input.access;
|
|
487
610
|
const _io4 = (input) => "contacts" === input.name && ("read" === input.access || "write" === input.access);
|
|
@@ -563,10 +686,6 @@ var validateAppInTossPluginOptions = /* @__PURE__ */ (() => {
|
|
|
563
686
|
path: _path + ".icon",
|
|
564
687
|
expected: "string",
|
|
565
688
|
value: input.icon
|
|
566
|
-
}), "basic" === input.bridgeColorMode || "inverted" === input.bridgeColorMode || _report(_exceptionable, {
|
|
567
|
-
path: _path + ".bridgeColorMode",
|
|
568
|
-
expected: '("basic" | "inverted")',
|
|
569
|
-
value: input.bridgeColorMode
|
|
570
689
|
})].every((flag) => flag);
|
|
571
690
|
const _vo2 = (input, _path, _exceptionable = true) => ["clipboard" === input.name || _report(_exceptionable, {
|
|
572
691
|
path: _path + ".name",
|
|
@@ -715,7 +834,7 @@ var validateAppInTossPluginOptions = /* @__PURE__ */ (() => {
|
|
|
715
834
|
const __is = (input) => "object" === typeof input && null !== input && _io0(input);
|
|
716
835
|
let errors;
|
|
717
836
|
let _report;
|
|
718
|
-
return (input) => {
|
|
837
|
+
return __typia_transform__createStandardSchema._createStandardSchema((input) => {
|
|
719
838
|
if (false === __is(input)) {
|
|
720
839
|
errors = [];
|
|
721
840
|
_report = __typia_transform__validateReport._validateReport(errors);
|
|
@@ -742,7 +861,7 @@ var validateAppInTossPluginOptions = /* @__PURE__ */ (() => {
|
|
|
742
861
|
success: true,
|
|
743
862
|
data: input
|
|
744
863
|
};
|
|
745
|
-
};
|
|
864
|
+
});
|
|
746
865
|
})();
|
|
747
866
|
|
|
748
867
|
// src/utils/createArtifact.ts
|
|
@@ -1111,7 +1230,6 @@ function setupRuntimeSetupScript(config) {
|
|
|
1111
1230
|
{
|
|
1112
1231
|
appType: config.appType,
|
|
1113
1232
|
deploymentId: config.deploymentId,
|
|
1114
|
-
brandBridgeColorMode: config.brand.bridgeColorMode,
|
|
1115
1233
|
brandDisplayName: config.brand.displayName,
|
|
1116
1234
|
brandPrimaryColor: config.brand.primaryColor,
|
|
1117
1235
|
brandIcon: config.brand.icon,
|