@apps-in-toss/plugins 1.0.2 → 1.0.3
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/index.cjs +114 -4
- package/dist/index.d.cts +21 -2
- package/dist/index.d.ts +21 -2
- package/dist/index.js +114 -4
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -507,13 +507,18 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
507
507
|
};
|
|
508
508
|
})();
|
|
509
509
|
var validateAppInTossPluginOptions = /* @__PURE__ */ (() => {
|
|
510
|
-
const _io0 = (input) => "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)));
|
|
510
|
+
const _io0 = (input) => "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
511
|
const _io1 = (input) => "string" === typeof input.displayName && "string" === typeof input.primaryColor && "string" === typeof input.icon && ("basic" === input.bridgeColorMode || "inverted" === input.bridgeColorMode);
|
|
512
512
|
const _io2 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
|
|
513
513
|
const _io3 = (input) => "geolocation" === input.name && "access" === input.access;
|
|
514
514
|
const _io4 = (input) => "contacts" === input.name && ("read" === input.access || "write" === input.access);
|
|
515
515
|
const _io5 = (input) => "photos" === input.name && ("read" === input.access || "write" === input.access);
|
|
516
516
|
const _io6 = (input) => "camera" === input.name && "access" === input.access;
|
|
517
|
+
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));
|
|
518
|
+
const _io8 = (input) => "string" === typeof input.id && "string" === typeof input.title && ("object" === typeof input.icon && null !== input.icon && _iu1(input.icon));
|
|
519
|
+
const _io9 = (input) => "object" === typeof input.source && null !== input.source && _io10(input.source) && (null !== input.name && void 0 === input.name);
|
|
520
|
+
const _io10 = (input) => "string" === typeof input.uri;
|
|
521
|
+
const _io11 = (input) => "string" === typeof input.name && (null !== input.source && void 0 === input.source);
|
|
517
522
|
const _iu0 = (input) => (() => {
|
|
518
523
|
if ("camera" === input.name)
|
|
519
524
|
return _io6(input);
|
|
@@ -528,6 +533,14 @@ var validateAppInTossPluginOptions = /* @__PURE__ */ (() => {
|
|
|
528
533
|
else
|
|
529
534
|
return false;
|
|
530
535
|
})();
|
|
536
|
+
const _iu1 = (input) => (() => {
|
|
537
|
+
if ("string" === typeof input.name)
|
|
538
|
+
return _io11(input);
|
|
539
|
+
else if ("object" === typeof input.source && null !== input.source && _io10(input.source))
|
|
540
|
+
return _io9(input);
|
|
541
|
+
else
|
|
542
|
+
return false;
|
|
543
|
+
})();
|
|
531
544
|
const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.brand && null !== input.brand || _report(_exceptionable, {
|
|
532
545
|
path: _path + ".brand",
|
|
533
546
|
expected: "__type",
|
|
@@ -552,6 +565,14 @@ var validateAppInTossPluginOptions = /* @__PURE__ */ (() => {
|
|
|
552
565
|
path: _path + ".permissions",
|
|
553
566
|
expected: "Array<Permission>",
|
|
554
567
|
value: input.permissions
|
|
568
|
+
}), void 0 === input.navigationBar || ("object" === typeof input.navigationBar && null !== input.navigationBar && false === Array.isArray(input.navigationBar) || _report(_exceptionable, {
|
|
569
|
+
path: _path + ".navigationBar",
|
|
570
|
+
expected: "(__type.o1 | undefined)",
|
|
571
|
+
value: input.navigationBar
|
|
572
|
+
})) && _vo7(input.navigationBar, _path + ".navigationBar", _exceptionable) || _report(_exceptionable, {
|
|
573
|
+
path: _path + ".navigationBar",
|
|
574
|
+
expected: "(__type.o1 | undefined)",
|
|
575
|
+
value: input.navigationBar
|
|
555
576
|
})].every((flag) => flag);
|
|
556
577
|
const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.displayName || _report(_exceptionable, {
|
|
557
578
|
path: _path + ".displayName",
|
|
@@ -615,6 +636,75 @@ var validateAppInTossPluginOptions = /* @__PURE__ */ (() => {
|
|
|
615
636
|
expected: '"access"',
|
|
616
637
|
value: input.access
|
|
617
638
|
})].every((flag) => flag);
|
|
639
|
+
const _vo7 = (input, _path, _exceptionable = true) => [void 0 === input.withBackButton || "boolean" === typeof input.withBackButton || _report(_exceptionable, {
|
|
640
|
+
path: _path + ".withBackButton",
|
|
641
|
+
expected: "(boolean | undefined)",
|
|
642
|
+
value: input.withBackButton
|
|
643
|
+
}), void 0 === input.withHomeButton || "boolean" === typeof input.withHomeButton || _report(_exceptionable, {
|
|
644
|
+
path: _path + ".withHomeButton",
|
|
645
|
+
expected: "(boolean | undefined)",
|
|
646
|
+
value: input.withHomeButton
|
|
647
|
+
}), void 0 === input.initialAccessoryButton || ("object" === typeof input.initialAccessoryButton && null !== input.initialAccessoryButton || _report(_exceptionable, {
|
|
648
|
+
path: _path + ".initialAccessoryButton",
|
|
649
|
+
expected: "(InitialAccessoryButton | undefined)",
|
|
650
|
+
value: input.initialAccessoryButton
|
|
651
|
+
})) && _vo8(input.initialAccessoryButton, _path + ".initialAccessoryButton", _exceptionable) || _report(_exceptionable, {
|
|
652
|
+
path: _path + ".initialAccessoryButton",
|
|
653
|
+
expected: "(InitialAccessoryButton | undefined)",
|
|
654
|
+
value: input.initialAccessoryButton
|
|
655
|
+
})].every((flag) => flag);
|
|
656
|
+
const _vo8 = (input, _path, _exceptionable = true) => ["string" === typeof input.id || _report(_exceptionable, {
|
|
657
|
+
path: _path + ".id",
|
|
658
|
+
expected: "string",
|
|
659
|
+
value: input.id
|
|
660
|
+
}), "string" === typeof input.title || _report(_exceptionable, {
|
|
661
|
+
path: _path + ".title",
|
|
662
|
+
expected: "string",
|
|
663
|
+
value: input.title
|
|
664
|
+
}), ("object" === typeof input.icon && null !== input.icon || _report(_exceptionable, {
|
|
665
|
+
path: _path + ".icon",
|
|
666
|
+
expected: "(__type.o2 | __type.o4)",
|
|
667
|
+
value: input.icon
|
|
668
|
+
})) && _vu1(input.icon, _path + ".icon", _exceptionable) || _report(_exceptionable, {
|
|
669
|
+
path: _path + ".icon",
|
|
670
|
+
expected: "(__type.o2 | __type.o4)",
|
|
671
|
+
value: input.icon
|
|
672
|
+
})].every((flag) => flag);
|
|
673
|
+
const _vo9 = (input, _path, _exceptionable = true) => [("object" === typeof input.source && null !== input.source || _report(_exceptionable, {
|
|
674
|
+
path: _path + ".source",
|
|
675
|
+
expected: "__type.o3",
|
|
676
|
+
value: input.source
|
|
677
|
+
})) && _vo10(input.source, _path + ".source", _exceptionable) || _report(_exceptionable, {
|
|
678
|
+
path: _path + ".source",
|
|
679
|
+
expected: "__type.o3",
|
|
680
|
+
value: input.source
|
|
681
|
+
}), (null !== input.name || _report(_exceptionable, {
|
|
682
|
+
path: _path + ".name",
|
|
683
|
+
expected: "undefined",
|
|
684
|
+
value: input.name
|
|
685
|
+
})) && (void 0 === input.name || _report(_exceptionable, {
|
|
686
|
+
path: _path + ".name",
|
|
687
|
+
expected: "undefined",
|
|
688
|
+
value: input.name
|
|
689
|
+
}))].every((flag) => flag);
|
|
690
|
+
const _vo10 = (input, _path, _exceptionable = true) => ["string" === typeof input.uri || _report(_exceptionable, {
|
|
691
|
+
path: _path + ".uri",
|
|
692
|
+
expected: "string",
|
|
693
|
+
value: input.uri
|
|
694
|
+
})].every((flag) => flag);
|
|
695
|
+
const _vo11 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
696
|
+
path: _path + ".name",
|
|
697
|
+
expected: "string",
|
|
698
|
+
value: input.name
|
|
699
|
+
}), (null !== input.source || _report(_exceptionable, {
|
|
700
|
+
path: _path + ".source",
|
|
701
|
+
expected: "undefined",
|
|
702
|
+
value: input.source
|
|
703
|
+
})) && (void 0 === input.source || _report(_exceptionable, {
|
|
704
|
+
path: _path + ".source",
|
|
705
|
+
expected: "undefined",
|
|
706
|
+
value: input.source
|
|
707
|
+
}))].every((flag) => flag);
|
|
618
708
|
const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
619
709
|
if ("camera" === input.name)
|
|
620
710
|
return _vo6(input, _path, _exceptionable);
|
|
@@ -633,6 +723,18 @@ var validateAppInTossPluginOptions = /* @__PURE__ */ (() => {
|
|
|
633
723
|
value: input
|
|
634
724
|
});
|
|
635
725
|
})();
|
|
726
|
+
const _vu1 = (input, _path, _exceptionable = true) => (() => {
|
|
727
|
+
if ("string" === typeof input.name)
|
|
728
|
+
return _vo11(input, _path, _exceptionable);
|
|
729
|
+
else if ("object" === typeof input.source && null !== input.source && _vo10(input.source, _path + ".source", false))
|
|
730
|
+
return _vo9(input, _path, _exceptionable);
|
|
731
|
+
else
|
|
732
|
+
return _report(_exceptionable, {
|
|
733
|
+
path: _path,
|
|
734
|
+
expected: "(__type.o4 | __type.o2)",
|
|
735
|
+
value: input
|
|
736
|
+
});
|
|
737
|
+
})();
|
|
636
738
|
const __is = (input) => "object" === typeof input && null !== input && _io0(input);
|
|
637
739
|
let errors;
|
|
638
740
|
let _report;
|
|
@@ -1034,7 +1136,8 @@ function setupRuntimeSetupScript(config) {
|
|
|
1034
1136
|
bridgeColorMode: config.brand.bridgeColorMode,
|
|
1035
1137
|
brandDisplayName: config.brand.displayName,
|
|
1036
1138
|
brandPrimaryColor: config.brand.primaryColor,
|
|
1037
|
-
brandIcon: config.brand.icon
|
|
1139
|
+
brandIcon: config.brand.icon,
|
|
1140
|
+
navigationBar: config.navigationBar ?? {}
|
|
1038
1141
|
},
|
|
1039
1142
|
SERVICE_CONTEXT_IDENTIFIER
|
|
1040
1143
|
);
|
|
@@ -1144,7 +1247,8 @@ function getMicroFrontendCompatScript() {
|
|
|
1144
1247
|
function withAppsInTossCommon(plugins, options) {
|
|
1145
1248
|
const { contents, path: envScriptPath } = setupRuntimeSetupScript({
|
|
1146
1249
|
brand: options.brand,
|
|
1147
|
-
deploymentId: options.deploymentId
|
|
1250
|
+
deploymentId: options.deploymentId,
|
|
1251
|
+
navigationBar: options.navigationBar
|
|
1148
1252
|
});
|
|
1149
1253
|
return [
|
|
1150
1254
|
requireMicroFrontendRuntime(),
|
|
@@ -1173,7 +1277,13 @@ function appsInToss(options) {
|
|
|
1173
1277
|
const root = (0, import_utils7.getPackageRoot)();
|
|
1174
1278
|
return withAppsInTossCommon(
|
|
1175
1279
|
[appsInTossDevServer(options), appsInTossCreateArtifact(deploymentId), appsInTossPostNotice()],
|
|
1176
|
-
{
|
|
1280
|
+
{
|
|
1281
|
+
...options,
|
|
1282
|
+
root,
|
|
1283
|
+
deploymentId,
|
|
1284
|
+
exposePath: import_path5.default.join(root, "./src/_app.tsx"),
|
|
1285
|
+
navigationBar: result.data.navigationBar
|
|
1286
|
+
}
|
|
1177
1287
|
);
|
|
1178
1288
|
}
|
|
1179
1289
|
|
package/dist/index.d.cts
CHANGED
|
@@ -32,6 +32,20 @@ type AppManifest = {
|
|
|
32
32
|
deploymentId: string & tags.Format<'uuid'>;
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
+
type Icon = {
|
|
36
|
+
source: {
|
|
37
|
+
uri: string;
|
|
38
|
+
};
|
|
39
|
+
name?: never;
|
|
40
|
+
} | {
|
|
41
|
+
name: string;
|
|
42
|
+
source?: never;
|
|
43
|
+
};
|
|
44
|
+
interface InitialAccessoryButton {
|
|
45
|
+
id: string;
|
|
46
|
+
title: string;
|
|
47
|
+
icon: Icon;
|
|
48
|
+
}
|
|
35
49
|
declare const validateAppManifest: (input: unknown) => typia.IValidation<AppManifest>;
|
|
36
50
|
interface AppsInTossPluginOptions {
|
|
37
51
|
brand: {
|
|
@@ -41,6 +55,11 @@ interface AppsInTossPluginOptions {
|
|
|
41
55
|
bridgeColorMode: BridgeTheme;
|
|
42
56
|
};
|
|
43
57
|
permissions: AppManifest['permissions'];
|
|
58
|
+
navigationBar?: {
|
|
59
|
+
withBackButton?: boolean;
|
|
60
|
+
withHomeButton?: boolean;
|
|
61
|
+
initialAccessoryButton?: InitialAccessoryButton;
|
|
62
|
+
};
|
|
44
63
|
}
|
|
45
64
|
/**
|
|
46
65
|
* - `basic`: 기본 테마 (흰 배경)
|
|
@@ -91,7 +110,7 @@ interface CreateArtifactOptions {
|
|
|
91
110
|
declare function validateZip(zipPath: string): Promise<void>;
|
|
92
111
|
declare function createArtifact(options: CreateArtifactOptions): Promise<string>;
|
|
93
112
|
|
|
94
|
-
declare function setupRuntimeSetupScript(config: Pick<AppsInTossPluginOptions, 'brand'> & {
|
|
113
|
+
declare function setupRuntimeSetupScript(config: Pick<AppsInTossPluginOptions, 'brand' | 'navigationBar'> & {
|
|
95
114
|
deploymentId: string;
|
|
96
115
|
}): {
|
|
97
116
|
contents: string;
|
|
@@ -139,4 +158,4 @@ declare function appsInTossPostNotice(): GranitePluginCore;
|
|
|
139
158
|
|
|
140
159
|
declare function requireMicroFrontendRuntime(): GranitePluginCore;
|
|
141
160
|
|
|
142
|
-
export { type AppManifest, type AppsInTossPluginOptions, type BridgeTheme, type BuildResult, type CreateArtifactOptions, type Permission, analytics, appsInToss, appsInTossAppJson, appsInTossCreateArtifact, appsInTossDevServer, appsInTossEsbuildConfig, appsInTossMetroConfig, appsInTossPostNotice, bedrockCompat, collectDependencyVersions, createArtifact, getRuntimeSetupScript, nativeModuleProxyContent, reactNativeModuleProxyContent, requireMicroFrontendRuntime, setupHostRuntimeSetupScript, setupRuntimeSetupScript, validateAppInTossPluginOptions, validateAppManifest, validateZip, withAppsInTossCommon };
|
|
161
|
+
export { type AppManifest, type AppsInTossPluginOptions, type BridgeTheme, 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
|
@@ -32,6 +32,20 @@ type AppManifest = {
|
|
|
32
32
|
deploymentId: string & tags.Format<'uuid'>;
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
+
type Icon = {
|
|
36
|
+
source: {
|
|
37
|
+
uri: string;
|
|
38
|
+
};
|
|
39
|
+
name?: never;
|
|
40
|
+
} | {
|
|
41
|
+
name: string;
|
|
42
|
+
source?: never;
|
|
43
|
+
};
|
|
44
|
+
interface InitialAccessoryButton {
|
|
45
|
+
id: string;
|
|
46
|
+
title: string;
|
|
47
|
+
icon: Icon;
|
|
48
|
+
}
|
|
35
49
|
declare const validateAppManifest: (input: unknown) => typia.IValidation<AppManifest>;
|
|
36
50
|
interface AppsInTossPluginOptions {
|
|
37
51
|
brand: {
|
|
@@ -41,6 +55,11 @@ interface AppsInTossPluginOptions {
|
|
|
41
55
|
bridgeColorMode: BridgeTheme;
|
|
42
56
|
};
|
|
43
57
|
permissions: AppManifest['permissions'];
|
|
58
|
+
navigationBar?: {
|
|
59
|
+
withBackButton?: boolean;
|
|
60
|
+
withHomeButton?: boolean;
|
|
61
|
+
initialAccessoryButton?: InitialAccessoryButton;
|
|
62
|
+
};
|
|
44
63
|
}
|
|
45
64
|
/**
|
|
46
65
|
* - `basic`: 기본 테마 (흰 배경)
|
|
@@ -91,7 +110,7 @@ interface CreateArtifactOptions {
|
|
|
91
110
|
declare function validateZip(zipPath: string): Promise<void>;
|
|
92
111
|
declare function createArtifact(options: CreateArtifactOptions): Promise<string>;
|
|
93
112
|
|
|
94
|
-
declare function setupRuntimeSetupScript(config: Pick<AppsInTossPluginOptions, 'brand'> & {
|
|
113
|
+
declare function setupRuntimeSetupScript(config: Pick<AppsInTossPluginOptions, 'brand' | 'navigationBar'> & {
|
|
95
114
|
deploymentId: string;
|
|
96
115
|
}): {
|
|
97
116
|
contents: string;
|
|
@@ -139,4 +158,4 @@ declare function appsInTossPostNotice(): GranitePluginCore;
|
|
|
139
158
|
|
|
140
159
|
declare function requireMicroFrontendRuntime(): GranitePluginCore;
|
|
141
160
|
|
|
142
|
-
export { type AppManifest, type AppsInTossPluginOptions, type BridgeTheme, type BuildResult, type CreateArtifactOptions, type Permission, analytics, appsInToss, appsInTossAppJson, appsInTossCreateArtifact, appsInTossDevServer, appsInTossEsbuildConfig, appsInTossMetroConfig, appsInTossPostNotice, bedrockCompat, collectDependencyVersions, createArtifact, getRuntimeSetupScript, nativeModuleProxyContent, reactNativeModuleProxyContent, requireMicroFrontendRuntime, setupHostRuntimeSetupScript, setupRuntimeSetupScript, validateAppInTossPluginOptions, validateAppManifest, validateZip, withAppsInTossCommon };
|
|
161
|
+
export { type AppManifest, type AppsInTossPluginOptions, type BridgeTheme, 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
|
@@ -480,13 +480,18 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
480
480
|
};
|
|
481
481
|
})();
|
|
482
482
|
var validateAppInTossPluginOptions = /* @__PURE__ */ (() => {
|
|
483
|
-
const _io0 = (input) => "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)));
|
|
483
|
+
const _io0 = (input) => "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
484
|
const _io1 = (input) => "string" === typeof input.displayName && "string" === typeof input.primaryColor && "string" === typeof input.icon && ("basic" === input.bridgeColorMode || "inverted" === input.bridgeColorMode);
|
|
485
485
|
const _io2 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
|
|
486
486
|
const _io3 = (input) => "geolocation" === input.name && "access" === input.access;
|
|
487
487
|
const _io4 = (input) => "contacts" === input.name && ("read" === input.access || "write" === input.access);
|
|
488
488
|
const _io5 = (input) => "photos" === input.name && ("read" === input.access || "write" === input.access);
|
|
489
489
|
const _io6 = (input) => "camera" === input.name && "access" === input.access;
|
|
490
|
+
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));
|
|
491
|
+
const _io8 = (input) => "string" === typeof input.id && "string" === typeof input.title && ("object" === typeof input.icon && null !== input.icon && _iu1(input.icon));
|
|
492
|
+
const _io9 = (input) => "object" === typeof input.source && null !== input.source && _io10(input.source) && (null !== input.name && void 0 === input.name);
|
|
493
|
+
const _io10 = (input) => "string" === typeof input.uri;
|
|
494
|
+
const _io11 = (input) => "string" === typeof input.name && (null !== input.source && void 0 === input.source);
|
|
490
495
|
const _iu0 = (input) => (() => {
|
|
491
496
|
if ("camera" === input.name)
|
|
492
497
|
return _io6(input);
|
|
@@ -501,6 +506,14 @@ var validateAppInTossPluginOptions = /* @__PURE__ */ (() => {
|
|
|
501
506
|
else
|
|
502
507
|
return false;
|
|
503
508
|
})();
|
|
509
|
+
const _iu1 = (input) => (() => {
|
|
510
|
+
if ("string" === typeof input.name)
|
|
511
|
+
return _io11(input);
|
|
512
|
+
else if ("object" === typeof input.source && null !== input.source && _io10(input.source))
|
|
513
|
+
return _io9(input);
|
|
514
|
+
else
|
|
515
|
+
return false;
|
|
516
|
+
})();
|
|
504
517
|
const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.brand && null !== input.brand || _report(_exceptionable, {
|
|
505
518
|
path: _path + ".brand",
|
|
506
519
|
expected: "__type",
|
|
@@ -525,6 +538,14 @@ var validateAppInTossPluginOptions = /* @__PURE__ */ (() => {
|
|
|
525
538
|
path: _path + ".permissions",
|
|
526
539
|
expected: "Array<Permission>",
|
|
527
540
|
value: input.permissions
|
|
541
|
+
}), void 0 === input.navigationBar || ("object" === typeof input.navigationBar && null !== input.navigationBar && false === Array.isArray(input.navigationBar) || _report(_exceptionable, {
|
|
542
|
+
path: _path + ".navigationBar",
|
|
543
|
+
expected: "(__type.o1 | undefined)",
|
|
544
|
+
value: input.navigationBar
|
|
545
|
+
})) && _vo7(input.navigationBar, _path + ".navigationBar", _exceptionable) || _report(_exceptionable, {
|
|
546
|
+
path: _path + ".navigationBar",
|
|
547
|
+
expected: "(__type.o1 | undefined)",
|
|
548
|
+
value: input.navigationBar
|
|
528
549
|
})].every((flag) => flag);
|
|
529
550
|
const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.displayName || _report(_exceptionable, {
|
|
530
551
|
path: _path + ".displayName",
|
|
@@ -588,6 +609,75 @@ var validateAppInTossPluginOptions = /* @__PURE__ */ (() => {
|
|
|
588
609
|
expected: '"access"',
|
|
589
610
|
value: input.access
|
|
590
611
|
})].every((flag) => flag);
|
|
612
|
+
const _vo7 = (input, _path, _exceptionable = true) => [void 0 === input.withBackButton || "boolean" === typeof input.withBackButton || _report(_exceptionable, {
|
|
613
|
+
path: _path + ".withBackButton",
|
|
614
|
+
expected: "(boolean | undefined)",
|
|
615
|
+
value: input.withBackButton
|
|
616
|
+
}), void 0 === input.withHomeButton || "boolean" === typeof input.withHomeButton || _report(_exceptionable, {
|
|
617
|
+
path: _path + ".withHomeButton",
|
|
618
|
+
expected: "(boolean | undefined)",
|
|
619
|
+
value: input.withHomeButton
|
|
620
|
+
}), void 0 === input.initialAccessoryButton || ("object" === typeof input.initialAccessoryButton && null !== input.initialAccessoryButton || _report(_exceptionable, {
|
|
621
|
+
path: _path + ".initialAccessoryButton",
|
|
622
|
+
expected: "(InitialAccessoryButton | undefined)",
|
|
623
|
+
value: input.initialAccessoryButton
|
|
624
|
+
})) && _vo8(input.initialAccessoryButton, _path + ".initialAccessoryButton", _exceptionable) || _report(_exceptionable, {
|
|
625
|
+
path: _path + ".initialAccessoryButton",
|
|
626
|
+
expected: "(InitialAccessoryButton | undefined)",
|
|
627
|
+
value: input.initialAccessoryButton
|
|
628
|
+
})].every((flag) => flag);
|
|
629
|
+
const _vo8 = (input, _path, _exceptionable = true) => ["string" === typeof input.id || _report(_exceptionable, {
|
|
630
|
+
path: _path + ".id",
|
|
631
|
+
expected: "string",
|
|
632
|
+
value: input.id
|
|
633
|
+
}), "string" === typeof input.title || _report(_exceptionable, {
|
|
634
|
+
path: _path + ".title",
|
|
635
|
+
expected: "string",
|
|
636
|
+
value: input.title
|
|
637
|
+
}), ("object" === typeof input.icon && null !== input.icon || _report(_exceptionable, {
|
|
638
|
+
path: _path + ".icon",
|
|
639
|
+
expected: "(__type.o2 | __type.o4)",
|
|
640
|
+
value: input.icon
|
|
641
|
+
})) && _vu1(input.icon, _path + ".icon", _exceptionable) || _report(_exceptionable, {
|
|
642
|
+
path: _path + ".icon",
|
|
643
|
+
expected: "(__type.o2 | __type.o4)",
|
|
644
|
+
value: input.icon
|
|
645
|
+
})].every((flag) => flag);
|
|
646
|
+
const _vo9 = (input, _path, _exceptionable = true) => [("object" === typeof input.source && null !== input.source || _report(_exceptionable, {
|
|
647
|
+
path: _path + ".source",
|
|
648
|
+
expected: "__type.o3",
|
|
649
|
+
value: input.source
|
|
650
|
+
})) && _vo10(input.source, _path + ".source", _exceptionable) || _report(_exceptionable, {
|
|
651
|
+
path: _path + ".source",
|
|
652
|
+
expected: "__type.o3",
|
|
653
|
+
value: input.source
|
|
654
|
+
}), (null !== input.name || _report(_exceptionable, {
|
|
655
|
+
path: _path + ".name",
|
|
656
|
+
expected: "undefined",
|
|
657
|
+
value: input.name
|
|
658
|
+
})) && (void 0 === input.name || _report(_exceptionable, {
|
|
659
|
+
path: _path + ".name",
|
|
660
|
+
expected: "undefined",
|
|
661
|
+
value: input.name
|
|
662
|
+
}))].every((flag) => flag);
|
|
663
|
+
const _vo10 = (input, _path, _exceptionable = true) => ["string" === typeof input.uri || _report(_exceptionable, {
|
|
664
|
+
path: _path + ".uri",
|
|
665
|
+
expected: "string",
|
|
666
|
+
value: input.uri
|
|
667
|
+
})].every((flag) => flag);
|
|
668
|
+
const _vo11 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
|
|
669
|
+
path: _path + ".name",
|
|
670
|
+
expected: "string",
|
|
671
|
+
value: input.name
|
|
672
|
+
}), (null !== input.source || _report(_exceptionable, {
|
|
673
|
+
path: _path + ".source",
|
|
674
|
+
expected: "undefined",
|
|
675
|
+
value: input.source
|
|
676
|
+
})) && (void 0 === input.source || _report(_exceptionable, {
|
|
677
|
+
path: _path + ".source",
|
|
678
|
+
expected: "undefined",
|
|
679
|
+
value: input.source
|
|
680
|
+
}))].every((flag) => flag);
|
|
591
681
|
const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
592
682
|
if ("camera" === input.name)
|
|
593
683
|
return _vo6(input, _path, _exceptionable);
|
|
@@ -606,6 +696,18 @@ var validateAppInTossPluginOptions = /* @__PURE__ */ (() => {
|
|
|
606
696
|
value: input
|
|
607
697
|
});
|
|
608
698
|
})();
|
|
699
|
+
const _vu1 = (input, _path, _exceptionable = true) => (() => {
|
|
700
|
+
if ("string" === typeof input.name)
|
|
701
|
+
return _vo11(input, _path, _exceptionable);
|
|
702
|
+
else if ("object" === typeof input.source && null !== input.source && _vo10(input.source, _path + ".source", false))
|
|
703
|
+
return _vo9(input, _path, _exceptionable);
|
|
704
|
+
else
|
|
705
|
+
return _report(_exceptionable, {
|
|
706
|
+
path: _path,
|
|
707
|
+
expected: "(__type.o4 | __type.o2)",
|
|
708
|
+
value: input
|
|
709
|
+
});
|
|
710
|
+
})();
|
|
609
711
|
const __is = (input) => "object" === typeof input && null !== input && _io0(input);
|
|
610
712
|
let errors;
|
|
611
713
|
let _report;
|
|
@@ -1007,7 +1109,8 @@ function setupRuntimeSetupScript(config) {
|
|
|
1007
1109
|
bridgeColorMode: config.brand.bridgeColorMode,
|
|
1008
1110
|
brandDisplayName: config.brand.displayName,
|
|
1009
1111
|
brandPrimaryColor: config.brand.primaryColor,
|
|
1010
|
-
brandIcon: config.brand.icon
|
|
1112
|
+
brandIcon: config.brand.icon,
|
|
1113
|
+
navigationBar: config.navigationBar ?? {}
|
|
1011
1114
|
},
|
|
1012
1115
|
SERVICE_CONTEXT_IDENTIFIER
|
|
1013
1116
|
);
|
|
@@ -1117,7 +1220,8 @@ function getMicroFrontendCompatScript() {
|
|
|
1117
1220
|
function withAppsInTossCommon(plugins, options) {
|
|
1118
1221
|
const { contents, path: envScriptPath } = setupRuntimeSetupScript({
|
|
1119
1222
|
brand: options.brand,
|
|
1120
|
-
deploymentId: options.deploymentId
|
|
1223
|
+
deploymentId: options.deploymentId,
|
|
1224
|
+
navigationBar: options.navigationBar
|
|
1121
1225
|
});
|
|
1122
1226
|
return [
|
|
1123
1227
|
requireMicroFrontendRuntime(),
|
|
@@ -1146,7 +1250,13 @@ function appsInToss(options) {
|
|
|
1146
1250
|
const root = getPackageRoot6();
|
|
1147
1251
|
return withAppsInTossCommon(
|
|
1148
1252
|
[appsInTossDevServer(options), appsInTossCreateArtifact(deploymentId), appsInTossPostNotice()],
|
|
1149
|
-
{
|
|
1253
|
+
{
|
|
1254
|
+
...options,
|
|
1255
|
+
root,
|
|
1256
|
+
deploymentId,
|
|
1257
|
+
exposePath: path9.join(root, "./src/_app.tsx"),
|
|
1258
|
+
navigationBar: result.data.navigationBar
|
|
1259
|
+
}
|
|
1150
1260
|
);
|
|
1151
1261
|
}
|
|
1152
1262
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/plugins",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"description": "The plugins for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prepack": "yarn build",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "380ad5f697a176bcc6adae409153fa43e700d053"
|
|
55
55
|
}
|