@apps-in-toss/framework 0.0.12 → 0.0.13
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/plugins/index.cjs +15 -58
- package/dist/plugins/index.d.cts +1 -17
- package/dist/plugins/index.d.ts +1 -17
- package/dist/plugins/index.js +15 -58
- package/package.json +3 -3
package/dist/plugins/index.cjs
CHANGED
|
@@ -32790,14 +32790,13 @@ init_cjs_shims();
|
|
|
32790
32790
|
var __typia_transform__isFormatUuid = __toESM(require_isFormatUuid(), 1);
|
|
32791
32791
|
var __typia_transform__validateReport = __toESM(require_validateReport(), 1);
|
|
32792
32792
|
var validateAppManifest = /* @__PURE__ */ (() => {
|
|
32793
|
-
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.
|
|
32793
|
+
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));
|
|
32794
32794
|
const _io1 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
|
|
32795
32795
|
const _io2 = (input) => "geolocation" === input.name && "access" === input.access;
|
|
32796
32796
|
const _io3 = (input) => "contacts" === input.name && ("read" === input.access || "write" === input.access);
|
|
32797
32797
|
const _io4 = (input) => "photos" === input.name && ("read" === input.access || "write" === input.access);
|
|
32798
32798
|
const _io5 = (input) => "camera" === input.name && "access" === input.access;
|
|
32799
|
-
const _io6 = (input) => Array.isArray(input.
|
|
32800
|
-
const _io7 = (input) => Array.isArray(input.bundleFiles) && input.bundleFiles.every((elem) => "string" === typeof elem) && ("string" === typeof input.deploymentId && __typia_transform__isFormatUuid._isFormatUuid(input.deploymentId));
|
|
32799
|
+
const _io6 = (input) => Array.isArray(input.bundleFiles) && input.bundleFiles.every((elem) => "string" === typeof elem) && ("string" === typeof input.deploymentId && __typia_transform__isFormatUuid._isFormatUuid(input.deploymentId));
|
|
32801
32800
|
const _iu0 = (input) => (() => {
|
|
32802
32801
|
if ("camera" === input.name)
|
|
32803
32802
|
return _io5(input);
|
|
@@ -32820,33 +32819,25 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
32820
32819
|
path: _path + ".permissions",
|
|
32821
32820
|
expected: "Array<Permission>",
|
|
32822
32821
|
value: input.permissions
|
|
32823
|
-
})) && input.permissions.map((elem,
|
|
32824
|
-
path: _path + ".permissions[" +
|
|
32822
|
+
})) && input.permissions.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
32823
|
+
path: _path + ".permissions[" + _index3 + "]",
|
|
32825
32824
|
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
32826
32825
|
value: elem
|
|
32827
|
-
})) && _vu0(elem, _path + ".permissions[" +
|
|
32828
|
-
path: _path + ".permissions[" +
|
|
32826
|
+
})) && _vu0(elem, _path + ".permissions[" + _index3 + "]", _exceptionable) || _report(_exceptionable, {
|
|
32827
|
+
path: _path + ".permissions[" + _index3 + "]",
|
|
32829
32828
|
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
32830
32829
|
value: elem
|
|
32831
32830
|
})).every((flag) => flag) || _report(_exceptionable, {
|
|
32832
32831
|
path: _path + ".permissions",
|
|
32833
32832
|
expected: "Array<Permission>",
|
|
32834
32833
|
value: input.permissions
|
|
32835
|
-
}), ("object" === typeof input.oauth && null !== input.oauth || _report(_exceptionable, {
|
|
32836
|
-
path: _path + ".oauth",
|
|
32837
|
-
expected: "__type",
|
|
32838
|
-
value: input.oauth
|
|
32839
|
-
})) && _vo6(input.oauth, _path + ".oauth", _exceptionable) || _report(_exceptionable, {
|
|
32840
|
-
path: _path + ".oauth",
|
|
32841
|
-
expected: "__type",
|
|
32842
|
-
value: input.oauth
|
|
32843
32834
|
}), ("object" === typeof input._metadata && null !== input._metadata || _report(_exceptionable, {
|
|
32844
32835
|
path: _path + "._metadata",
|
|
32845
|
-
expected: "__type
|
|
32836
|
+
expected: "__type",
|
|
32846
32837
|
value: input._metadata
|
|
32847
|
-
})) &&
|
|
32838
|
+
})) && _vo6(input._metadata, _path + "._metadata", _exceptionable) || _report(_exceptionable, {
|
|
32848
32839
|
path: _path + "._metadata",
|
|
32849
|
-
expected: "__type
|
|
32840
|
+
expected: "__type",
|
|
32850
32841
|
value: input._metadata
|
|
32851
32842
|
})].every((flag) => flag);
|
|
32852
32843
|
const _vo1 = (input, _path, _exceptionable = true) => ["clipboard" === input.name || _report(_exceptionable, {
|
|
@@ -32894,25 +32885,12 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
32894
32885
|
expected: '"access"',
|
|
32895
32886
|
value: input.access
|
|
32896
32887
|
})].every((flag) => flag);
|
|
32897
|
-
const _vo6 = (input, _path, _exceptionable = true) => [(Array.isArray(input.
|
|
32898
|
-
path: _path + ".scopes",
|
|
32899
|
-
expected: "Array<OAuthScope>",
|
|
32900
|
-
value: input.scopes
|
|
32901
|
-
})) && input.scopes.map((elem, _index5) => "user_name" === elem || "user_phone" === elem || "user_birthday" === elem || "user_ci" === elem || "user_gender" === elem || "user_nationality" === elem || "user_email" === elem || _report(_exceptionable, {
|
|
32902
|
-
path: _path + ".scopes[" + _index5 + "]",
|
|
32903
|
-
expected: '("user_birthday" | "user_ci" | "user_email" | "user_gender" | "user_name" | "user_nationality" | "user_phone")',
|
|
32904
|
-
value: elem
|
|
32905
|
-
})).every((flag) => flag) || _report(_exceptionable, {
|
|
32906
|
-
path: _path + ".scopes",
|
|
32907
|
-
expected: "Array<OAuthScope>",
|
|
32908
|
-
value: input.scopes
|
|
32909
|
-
})].every((flag) => flag);
|
|
32910
|
-
const _vo7 = (input, _path, _exceptionable = true) => [(Array.isArray(input.bundleFiles) || _report(_exceptionable, {
|
|
32888
|
+
const _vo6 = (input, _path, _exceptionable = true) => [(Array.isArray(input.bundleFiles) || _report(_exceptionable, {
|
|
32911
32889
|
path: _path + ".bundleFiles",
|
|
32912
32890
|
expected: "Array<string>",
|
|
32913
32891
|
value: input.bundleFiles
|
|
32914
|
-
})) && input.bundleFiles.map((elem,
|
|
32915
|
-
path: _path + ".bundleFiles[" +
|
|
32892
|
+
})) && input.bundleFiles.map((elem, _index4) => "string" === typeof elem || _report(_exceptionable, {
|
|
32893
|
+
path: _path + ".bundleFiles[" + _index4 + "]",
|
|
32916
32894
|
expected: "string",
|
|
32917
32895
|
value: elem
|
|
32918
32896
|
})).every((flag) => flag) || _report(_exceptionable, {
|
|
@@ -33008,22 +32986,6 @@ async function createArtifact(options, deps) {
|
|
|
33008
32986
|
return outfile;
|
|
33009
32987
|
}
|
|
33010
32988
|
|
|
33011
|
-
// src/plugins/utils/createServerOAuthMiddleware.ts
|
|
33012
|
-
init_cjs_shims();
|
|
33013
|
-
function createServerOAuthMiddleware(oauth) {
|
|
33014
|
-
const scope = oauth.scopes.sort().join(";");
|
|
33015
|
-
return (req, res, next) => {
|
|
33016
|
-
if (req.method === "GET" && req.url === "/oauth/scope") {
|
|
33017
|
-
res.writeHead(200, {
|
|
33018
|
-
"Content-Length": Buffer.byteLength(scope),
|
|
33019
|
-
"Content-Type": "text/plain"
|
|
33020
|
-
}).end(scope);
|
|
33021
|
-
return;
|
|
33022
|
-
}
|
|
33023
|
-
next();
|
|
33024
|
-
};
|
|
33025
|
-
}
|
|
33026
|
-
|
|
33027
32989
|
// src/plugins/utils/createServerPermissionsMiddleware.ts
|
|
33028
32990
|
init_cjs_shims();
|
|
33029
32991
|
function createServerPermissionsMiddleware(permissions) {
|
|
@@ -33470,10 +33432,7 @@ function appsInTossDevServer(options) {
|
|
|
33470
33432
|
config: {
|
|
33471
33433
|
mpack: {
|
|
33472
33434
|
devServer: {
|
|
33473
|
-
middlewares: [
|
|
33474
|
-
createServerPermissionsMiddleware(options.permissions),
|
|
33475
|
-
createServerOAuthMiddleware(options.oauth)
|
|
33476
|
-
],
|
|
33435
|
+
middlewares: [createServerPermissionsMiddleware(options.permissions)],
|
|
33477
33436
|
routegen: {
|
|
33478
33437
|
enabled: false
|
|
33479
33438
|
}
|
|
@@ -33488,8 +33447,7 @@ async function appsInTossAppJson(options) {
|
|
|
33488
33447
|
const appJsonPath = import_path4.default.join(packageRoot, ".bedrock", APP_MANIFEST_NAME);
|
|
33489
33448
|
const appJsonObject = {
|
|
33490
33449
|
appName,
|
|
33491
|
-
permissions: options.permissions
|
|
33492
|
-
oauth: options.oauth
|
|
33450
|
+
permissions: options.permissions
|
|
33493
33451
|
};
|
|
33494
33452
|
await import_fs3.default.promises.mkdir(import_path4.default.dirname(appJsonPath), { recursive: true });
|
|
33495
33453
|
try {
|
|
@@ -33497,8 +33455,7 @@ async function appsInTossAppJson(options) {
|
|
|
33497
33455
|
const existingAppJsonObject = JSON.parse(existingAppJson);
|
|
33498
33456
|
Object.assign(appJsonObject, existingAppJsonObject, {
|
|
33499
33457
|
appName,
|
|
33500
|
-
permissions: appJsonObject.permissions
|
|
33501
|
-
oauth: appJsonObject.oauth
|
|
33458
|
+
permissions: appJsonObject.permissions
|
|
33502
33459
|
});
|
|
33503
33460
|
} catch (error) {
|
|
33504
33461
|
}
|
package/dist/plugins/index.d.cts
CHANGED
|
@@ -24,24 +24,9 @@ type CameraPermission = {
|
|
|
24
24
|
access: PermissionAccess;
|
|
25
25
|
};
|
|
26
26
|
type Permission = ClipboardPermission | GeolocationPermission | ContactsPermission | PhotosPermission | CameraPermission;
|
|
27
|
-
/**
|
|
28
|
-
* OAuth 인증시 사용할 수 있는 Scope 값이에요.
|
|
29
|
-
*
|
|
30
|
-
* - `user_name`: 유저 이름이에요.
|
|
31
|
-
* - `user_phone`: 유저 휴대폰 번호예요.
|
|
32
|
-
* - `user_birthday`: 유저 생년월일이에요.
|
|
33
|
-
* - `user_ci`: 유저를 식별하는 키인 CI(Connection Information) 값이에요.
|
|
34
|
-
* - `user_gender`: 유저의 성별이에요.
|
|
35
|
-
* - `user_nationality`: 유저의 국적이에요.
|
|
36
|
-
* - `user_email`: 유저의 이메일이에요. 토스 회원의 email이 존재하지 않는 경우 null 응답을 반환해요.
|
|
37
|
-
*/
|
|
38
|
-
type OAuthScope = 'user_name' | 'user_phone' | 'user_birthday' | 'user_ci' | 'user_gender' | 'user_nationality' | 'user_email';
|
|
39
27
|
type AppManifest = {
|
|
40
28
|
appName: string;
|
|
41
29
|
permissions: Permission[];
|
|
42
|
-
oauth: {
|
|
43
|
-
scopes: OAuthScope[];
|
|
44
|
-
};
|
|
45
30
|
_metadata: {
|
|
46
31
|
bundleFiles: string[];
|
|
47
32
|
deploymentId: string & tags.Format<'uuid'>;
|
|
@@ -51,7 +36,6 @@ declare const validateAppManifest: (input: unknown) => typia.IValidation<AppMani
|
|
|
51
36
|
|
|
52
37
|
interface AppsInTossPluginOptions {
|
|
53
38
|
permissions: AppManifest['permissions'];
|
|
54
|
-
oauth: AppManifest['oauth'];
|
|
55
39
|
}
|
|
56
40
|
declare function appsInTossAppJson(options: AppsInTossPluginOptions): Promise<BedrockPluginCore>;
|
|
57
41
|
declare function appsInToss(options: AppsInTossPluginOptions): (BedrockPluginCore | Promise<BedrockPluginCore>)[];
|
|
@@ -89,4 +73,4 @@ interface CreateArtifactOptions {
|
|
|
89
73
|
declare function validateZip(zipPath: string): Promise<void>;
|
|
90
74
|
declare function createArtifact(options: CreateArtifactOptions, deps: CreateCompressedBytecodeDependencies): Promise<string>;
|
|
91
75
|
|
|
92
|
-
export { type AppManifest, type AppsInTossPluginOptions, type BuildResult, type CreateArtifactOptions, type
|
|
76
|
+
export { type AppManifest, type AppsInTossPluginOptions, type BuildResult, type CreateArtifactOptions, type Permission, appsInToss, appsInTossAppJson, createArtifact, validateAppManifest, validateZip };
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -24,24 +24,9 @@ type CameraPermission = {
|
|
|
24
24
|
access: PermissionAccess;
|
|
25
25
|
};
|
|
26
26
|
type Permission = ClipboardPermission | GeolocationPermission | ContactsPermission | PhotosPermission | CameraPermission;
|
|
27
|
-
/**
|
|
28
|
-
* OAuth 인증시 사용할 수 있는 Scope 값이에요.
|
|
29
|
-
*
|
|
30
|
-
* - `user_name`: 유저 이름이에요.
|
|
31
|
-
* - `user_phone`: 유저 휴대폰 번호예요.
|
|
32
|
-
* - `user_birthday`: 유저 생년월일이에요.
|
|
33
|
-
* - `user_ci`: 유저를 식별하는 키인 CI(Connection Information) 값이에요.
|
|
34
|
-
* - `user_gender`: 유저의 성별이에요.
|
|
35
|
-
* - `user_nationality`: 유저의 국적이에요.
|
|
36
|
-
* - `user_email`: 유저의 이메일이에요. 토스 회원의 email이 존재하지 않는 경우 null 응답을 반환해요.
|
|
37
|
-
*/
|
|
38
|
-
type OAuthScope = 'user_name' | 'user_phone' | 'user_birthday' | 'user_ci' | 'user_gender' | 'user_nationality' | 'user_email';
|
|
39
27
|
type AppManifest = {
|
|
40
28
|
appName: string;
|
|
41
29
|
permissions: Permission[];
|
|
42
|
-
oauth: {
|
|
43
|
-
scopes: OAuthScope[];
|
|
44
|
-
};
|
|
45
30
|
_metadata: {
|
|
46
31
|
bundleFiles: string[];
|
|
47
32
|
deploymentId: string & tags.Format<'uuid'>;
|
|
@@ -51,7 +36,6 @@ declare const validateAppManifest: (input: unknown) => typia.IValidation<AppMani
|
|
|
51
36
|
|
|
52
37
|
interface AppsInTossPluginOptions {
|
|
53
38
|
permissions: AppManifest['permissions'];
|
|
54
|
-
oauth: AppManifest['oauth'];
|
|
55
39
|
}
|
|
56
40
|
declare function appsInTossAppJson(options: AppsInTossPluginOptions): Promise<BedrockPluginCore>;
|
|
57
41
|
declare function appsInToss(options: AppsInTossPluginOptions): (BedrockPluginCore | Promise<BedrockPluginCore>)[];
|
|
@@ -89,4 +73,4 @@ interface CreateArtifactOptions {
|
|
|
89
73
|
declare function validateZip(zipPath: string): Promise<void>;
|
|
90
74
|
declare function createArtifact(options: CreateArtifactOptions, deps: CreateCompressedBytecodeDependencies): Promise<string>;
|
|
91
75
|
|
|
92
|
-
export { type AppManifest, type AppsInTossPluginOptions, type BuildResult, type CreateArtifactOptions, type
|
|
76
|
+
export { type AppManifest, type AppsInTossPluginOptions, type BuildResult, type CreateArtifactOptions, type Permission, appsInToss, appsInTossAppJson, createArtifact, validateAppManifest, validateZip };
|
package/dist/plugins/index.js
CHANGED
|
@@ -32791,14 +32791,13 @@ init_esm_shims();
|
|
|
32791
32791
|
var __typia_transform__isFormatUuid = __toESM(require_isFormatUuid(), 1);
|
|
32792
32792
|
var __typia_transform__validateReport = __toESM(require_validateReport(), 1);
|
|
32793
32793
|
var validateAppManifest = /* @__PURE__ */ (() => {
|
|
32794
|
-
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.
|
|
32794
|
+
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));
|
|
32795
32795
|
const _io1 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
|
|
32796
32796
|
const _io2 = (input) => "geolocation" === input.name && "access" === input.access;
|
|
32797
32797
|
const _io3 = (input) => "contacts" === input.name && ("read" === input.access || "write" === input.access);
|
|
32798
32798
|
const _io4 = (input) => "photos" === input.name && ("read" === input.access || "write" === input.access);
|
|
32799
32799
|
const _io5 = (input) => "camera" === input.name && "access" === input.access;
|
|
32800
|
-
const _io6 = (input) => Array.isArray(input.
|
|
32801
|
-
const _io7 = (input) => Array.isArray(input.bundleFiles) && input.bundleFiles.every((elem) => "string" === typeof elem) && ("string" === typeof input.deploymentId && __typia_transform__isFormatUuid._isFormatUuid(input.deploymentId));
|
|
32800
|
+
const _io6 = (input) => Array.isArray(input.bundleFiles) && input.bundleFiles.every((elem) => "string" === typeof elem) && ("string" === typeof input.deploymentId && __typia_transform__isFormatUuid._isFormatUuid(input.deploymentId));
|
|
32802
32801
|
const _iu0 = (input) => (() => {
|
|
32803
32802
|
if ("camera" === input.name)
|
|
32804
32803
|
return _io5(input);
|
|
@@ -32821,33 +32820,25 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
32821
32820
|
path: _path + ".permissions",
|
|
32822
32821
|
expected: "Array<Permission>",
|
|
32823
32822
|
value: input.permissions
|
|
32824
|
-
})) && input.permissions.map((elem,
|
|
32825
|
-
path: _path + ".permissions[" +
|
|
32823
|
+
})) && input.permissions.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
32824
|
+
path: _path + ".permissions[" + _index3 + "]",
|
|
32826
32825
|
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
32827
32826
|
value: elem
|
|
32828
|
-
})) && _vu0(elem, _path + ".permissions[" +
|
|
32829
|
-
path: _path + ".permissions[" +
|
|
32827
|
+
})) && _vu0(elem, _path + ".permissions[" + _index3 + "]", _exceptionable) || _report(_exceptionable, {
|
|
32828
|
+
path: _path + ".permissions[" + _index3 + "]",
|
|
32830
32829
|
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
32831
32830
|
value: elem
|
|
32832
32831
|
})).every((flag) => flag) || _report(_exceptionable, {
|
|
32833
32832
|
path: _path + ".permissions",
|
|
32834
32833
|
expected: "Array<Permission>",
|
|
32835
32834
|
value: input.permissions
|
|
32836
|
-
}), ("object" === typeof input.oauth && null !== input.oauth || _report(_exceptionable, {
|
|
32837
|
-
path: _path + ".oauth",
|
|
32838
|
-
expected: "__type",
|
|
32839
|
-
value: input.oauth
|
|
32840
|
-
})) && _vo6(input.oauth, _path + ".oauth", _exceptionable) || _report(_exceptionable, {
|
|
32841
|
-
path: _path + ".oauth",
|
|
32842
|
-
expected: "__type",
|
|
32843
|
-
value: input.oauth
|
|
32844
32835
|
}), ("object" === typeof input._metadata && null !== input._metadata || _report(_exceptionable, {
|
|
32845
32836
|
path: _path + "._metadata",
|
|
32846
|
-
expected: "__type
|
|
32837
|
+
expected: "__type",
|
|
32847
32838
|
value: input._metadata
|
|
32848
|
-
})) &&
|
|
32839
|
+
})) && _vo6(input._metadata, _path + "._metadata", _exceptionable) || _report(_exceptionable, {
|
|
32849
32840
|
path: _path + "._metadata",
|
|
32850
|
-
expected: "__type
|
|
32841
|
+
expected: "__type",
|
|
32851
32842
|
value: input._metadata
|
|
32852
32843
|
})].every((flag) => flag);
|
|
32853
32844
|
const _vo1 = (input, _path, _exceptionable = true) => ["clipboard" === input.name || _report(_exceptionable, {
|
|
@@ -32895,25 +32886,12 @@ var validateAppManifest = /* @__PURE__ */ (() => {
|
|
|
32895
32886
|
expected: '"access"',
|
|
32896
32887
|
value: input.access
|
|
32897
32888
|
})].every((flag) => flag);
|
|
32898
|
-
const _vo6 = (input, _path, _exceptionable = true) => [(Array.isArray(input.
|
|
32899
|
-
path: _path + ".scopes",
|
|
32900
|
-
expected: "Array<OAuthScope>",
|
|
32901
|
-
value: input.scopes
|
|
32902
|
-
})) && input.scopes.map((elem, _index5) => "user_name" === elem || "user_phone" === elem || "user_birthday" === elem || "user_ci" === elem || "user_gender" === elem || "user_nationality" === elem || "user_email" === elem || _report(_exceptionable, {
|
|
32903
|
-
path: _path + ".scopes[" + _index5 + "]",
|
|
32904
|
-
expected: '("user_birthday" | "user_ci" | "user_email" | "user_gender" | "user_name" | "user_nationality" | "user_phone")',
|
|
32905
|
-
value: elem
|
|
32906
|
-
})).every((flag) => flag) || _report(_exceptionable, {
|
|
32907
|
-
path: _path + ".scopes",
|
|
32908
|
-
expected: "Array<OAuthScope>",
|
|
32909
|
-
value: input.scopes
|
|
32910
|
-
})].every((flag) => flag);
|
|
32911
|
-
const _vo7 = (input, _path, _exceptionable = true) => [(Array.isArray(input.bundleFiles) || _report(_exceptionable, {
|
|
32889
|
+
const _vo6 = (input, _path, _exceptionable = true) => [(Array.isArray(input.bundleFiles) || _report(_exceptionable, {
|
|
32912
32890
|
path: _path + ".bundleFiles",
|
|
32913
32891
|
expected: "Array<string>",
|
|
32914
32892
|
value: input.bundleFiles
|
|
32915
|
-
})) && input.bundleFiles.map((elem,
|
|
32916
|
-
path: _path + ".bundleFiles[" +
|
|
32893
|
+
})) && input.bundleFiles.map((elem, _index4) => "string" === typeof elem || _report(_exceptionable, {
|
|
32894
|
+
path: _path + ".bundleFiles[" + _index4 + "]",
|
|
32917
32895
|
expected: "string",
|
|
32918
32896
|
value: elem
|
|
32919
32897
|
})).every((flag) => flag) || _report(_exceptionable, {
|
|
@@ -33009,22 +32987,6 @@ async function createArtifact(options, deps) {
|
|
|
33009
32987
|
return outfile;
|
|
33010
32988
|
}
|
|
33011
32989
|
|
|
33012
|
-
// src/plugins/utils/createServerOAuthMiddleware.ts
|
|
33013
|
-
init_esm_shims();
|
|
33014
|
-
function createServerOAuthMiddleware(oauth) {
|
|
33015
|
-
const scope = oauth.scopes.sort().join(";");
|
|
33016
|
-
return (req, res, next) => {
|
|
33017
|
-
if (req.method === "GET" && req.url === "/oauth/scope") {
|
|
33018
|
-
res.writeHead(200, {
|
|
33019
|
-
"Content-Length": Buffer.byteLength(scope),
|
|
33020
|
-
"Content-Type": "text/plain"
|
|
33021
|
-
}).end(scope);
|
|
33022
|
-
return;
|
|
33023
|
-
}
|
|
33024
|
-
next();
|
|
33025
|
-
};
|
|
33026
|
-
}
|
|
33027
|
-
|
|
33028
32990
|
// src/plugins/utils/createServerPermissionsMiddleware.ts
|
|
33029
32991
|
init_esm_shims();
|
|
33030
32992
|
function createServerPermissionsMiddleware(permissions) {
|
|
@@ -33471,10 +33433,7 @@ function appsInTossDevServer(options) {
|
|
|
33471
33433
|
config: {
|
|
33472
33434
|
mpack: {
|
|
33473
33435
|
devServer: {
|
|
33474
|
-
middlewares: [
|
|
33475
|
-
createServerPermissionsMiddleware(options.permissions),
|
|
33476
|
-
createServerOAuthMiddleware(options.oauth)
|
|
33477
|
-
],
|
|
33436
|
+
middlewares: [createServerPermissionsMiddleware(options.permissions)],
|
|
33478
33437
|
routegen: {
|
|
33479
33438
|
enabled: false
|
|
33480
33439
|
}
|
|
@@ -33489,8 +33448,7 @@ async function appsInTossAppJson(options) {
|
|
|
33489
33448
|
const appJsonPath = path12.join(packageRoot, ".bedrock", APP_MANIFEST_NAME);
|
|
33490
33449
|
const appJsonObject = {
|
|
33491
33450
|
appName,
|
|
33492
|
-
permissions: options.permissions
|
|
33493
|
-
oauth: options.oauth
|
|
33451
|
+
permissions: options.permissions
|
|
33494
33452
|
};
|
|
33495
33453
|
await fs5.promises.mkdir(path12.dirname(appJsonPath), { recursive: true });
|
|
33496
33454
|
try {
|
|
@@ -33498,8 +33456,7 @@ async function appsInTossAppJson(options) {
|
|
|
33498
33456
|
const existingAppJsonObject = JSON.parse(existingAppJson);
|
|
33499
33457
|
Object.assign(appJsonObject, existingAppJsonObject, {
|
|
33500
33458
|
appName,
|
|
33501
|
-
permissions: appJsonObject.permissions
|
|
33502
|
-
oauth: appJsonObject.oauth
|
|
33459
|
+
permissions: appJsonObject.permissions
|
|
33503
33460
|
});
|
|
33504
33461
|
} catch (error) {
|
|
33505
33462
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/framework",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.13",
|
|
5
5
|
"description": "The framework for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prepack": "yarn build",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"ait": "./bin/ait.js"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@apps-in-toss/cli": "0.0.
|
|
58
|
+
"@apps-in-toss/cli": "0.0.13"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@react-native-bedrock/mpack-next": "0.0.13",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"publishConfig": {
|
|
91
91
|
"access": "public"
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "c5fa235b136ffaefc7687b35b473de5f6a1dca6f"
|
|
94
94
|
}
|