@apps-in-toss/framework 0.0.0-dev.1741599933429 → 0.0.0-dev.1741859884482
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/LICENSE +674 -202
- package/README.md +4 -5
- package/{bin.js → bin/ait.js} +0 -1
- package/dist/index.cjs +64 -20
- package/dist/index.d.cts +66 -16
- package/dist/index.d.ts +66 -16
- package/dist/index.js +56 -13
- package/dist/jest/index.cjs +24 -0
- package/dist/jest/index.d.cts +1 -0
- package/dist/jest/index.d.ts +1 -0
- package/dist/jest/index.js +4 -0
- package/dist/plugins/index.cjs +271 -66
- package/dist/plugins/index.d.cts +9 -1
- package/dist/plugins/index.d.ts +9 -1
- package/dist/plugins/index.js +268 -65
- package/jest.d.ts +1 -0
- package/package.json +20 -11
package/dist/plugins/index.js
CHANGED
|
@@ -14238,7 +14238,7 @@ var require_isPlainObject = __commonJS({
|
|
|
14238
14238
|
var funcToString = funcProto.toString;
|
|
14239
14239
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
14240
14240
|
var objectCtorString = funcToString.call(Object);
|
|
14241
|
-
function
|
|
14241
|
+
function isPlainObject2(value) {
|
|
14242
14242
|
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
|
|
14243
14243
|
return false;
|
|
14244
14244
|
}
|
|
@@ -14249,7 +14249,7 @@ var require_isPlainObject = __commonJS({
|
|
|
14249
14249
|
var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
|
|
14250
14250
|
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
14251
14251
|
}
|
|
14252
|
-
module.exports =
|
|
14252
|
+
module.exports = isPlainObject2;
|
|
14253
14253
|
}
|
|
14254
14254
|
});
|
|
14255
14255
|
|
|
@@ -20885,7 +20885,7 @@ var require_file = __commonJS({
|
|
|
20885
20885
|
var flatten = require_flatten();
|
|
20886
20886
|
var difference = require_difference();
|
|
20887
20887
|
var union = require_union();
|
|
20888
|
-
var
|
|
20888
|
+
var isPlainObject2 = require_isPlainObject();
|
|
20889
20889
|
var glob = require_commonjs5();
|
|
20890
20890
|
var file = module.exports = {};
|
|
20891
20891
|
var pathSeparatorRe = /[\/\\]/g;
|
|
@@ -20910,7 +20910,7 @@ var require_file = __commonJS({
|
|
|
20910
20910
|
return fs6.existsSync(filepath);
|
|
20911
20911
|
};
|
|
20912
20912
|
file.expand = function(...args) {
|
|
20913
|
-
var options =
|
|
20913
|
+
var options = isPlainObject2(args[0]) ? args.shift() : {};
|
|
20914
20914
|
var patterns = Array.isArray(args[0]) ? args[0] : args;
|
|
20915
20915
|
if (patterns.length === 0) {
|
|
20916
20916
|
return [];
|
|
@@ -25639,6 +25639,43 @@ var require_archiver = __commonJS({
|
|
|
25639
25639
|
}
|
|
25640
25640
|
});
|
|
25641
25641
|
|
|
25642
|
+
// ../../.yarn/unplugged/typia-virtual-7c91ede42e/node_modules/typia/lib/internal/_isFormatUuid.js
|
|
25643
|
+
var require_isFormatUuid = __commonJS({
|
|
25644
|
+
"../../.yarn/unplugged/typia-virtual-7c91ede42e/node_modules/typia/lib/internal/_isFormatUuid.js"(exports) {
|
|
25645
|
+
"use strict";
|
|
25646
|
+
init_esm_shims();
|
|
25647
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25648
|
+
exports._isFormatUuid = void 0;
|
|
25649
|
+
var _isFormatUuid2 = (str) => PATTERN.test(str);
|
|
25650
|
+
exports._isFormatUuid = _isFormatUuid2;
|
|
25651
|
+
var PATTERN = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
|
|
25652
|
+
}
|
|
25653
|
+
});
|
|
25654
|
+
|
|
25655
|
+
// ../../.yarn/unplugged/typia-virtual-7c91ede42e/node_modules/typia/lib/internal/_validateReport.js
|
|
25656
|
+
var require_validateReport = __commonJS({
|
|
25657
|
+
"../../.yarn/unplugged/typia-virtual-7c91ede42e/node_modules/typia/lib/internal/_validateReport.js"(exports) {
|
|
25658
|
+
"use strict";
|
|
25659
|
+
init_esm_shims();
|
|
25660
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25661
|
+
exports._validateReport = void 0;
|
|
25662
|
+
var _validateReport2 = (array) => {
|
|
25663
|
+
const reportable = (path13) => {
|
|
25664
|
+
if (array.length === 0)
|
|
25665
|
+
return true;
|
|
25666
|
+
const last = array[array.length - 1].path;
|
|
25667
|
+
return path13.length > last.length || last.substring(0, path13.length) !== path13;
|
|
25668
|
+
};
|
|
25669
|
+
return (exceptable, error) => {
|
|
25670
|
+
if (exceptable && reportable(error.path))
|
|
25671
|
+
array.push(error);
|
|
25672
|
+
return false;
|
|
25673
|
+
};
|
|
25674
|
+
};
|
|
25675
|
+
exports._validateReport = _validateReport2;
|
|
25676
|
+
}
|
|
25677
|
+
});
|
|
25678
|
+
|
|
25642
25679
|
// src/plugins/index.ts
|
|
25643
25680
|
init_esm_shims();
|
|
25644
25681
|
|
|
@@ -25650,6 +25687,7 @@ import path12 from "path";
|
|
|
25650
25687
|
|
|
25651
25688
|
// src/plugins/constants.ts
|
|
25652
25689
|
init_esm_shims();
|
|
25690
|
+
var REACT_NATIVE_VERSION = "0_72_6";
|
|
25653
25691
|
var APP_MANIFEST_NAME = "app.json";
|
|
25654
25692
|
|
|
25655
25693
|
// src/plugins/utils/compileHbc.ts
|
|
@@ -32651,6 +32689,7 @@ function resolveFromRoot(rootDir, request) {
|
|
|
32651
32689
|
// src/plugins/utils/createArtifact.ts
|
|
32652
32690
|
init_esm_shims();
|
|
32653
32691
|
import path11 from "path";
|
|
32692
|
+
import { readZipContent } from "@apps-in-toss/cli";
|
|
32654
32693
|
|
|
32655
32694
|
// src/plugins/utils/compressToZip.ts
|
|
32656
32695
|
init_esm_shims();
|
|
@@ -32708,50 +32747,6 @@ init_esm_shims();
|
|
|
32708
32747
|
import * as fs4 from "fs/promises";
|
|
32709
32748
|
import * as path10 from "path";
|
|
32710
32749
|
|
|
32711
|
-
// ../../.yarn/cache/es-toolkit-npm-1.33.0-f181eedbc7-4c8dea3167.zip/node_modules/es-toolkit/dist/index.mjs
|
|
32712
|
-
init_esm_shims();
|
|
32713
|
-
|
|
32714
|
-
// ../../.yarn/cache/es-toolkit-npm-1.33.0-f181eedbc7-4c8dea3167.zip/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
|
|
32715
|
-
init_esm_shims();
|
|
32716
|
-
function isPlainObject2(value) {
|
|
32717
|
-
if (!value || typeof value !== "object") {
|
|
32718
|
-
return false;
|
|
32719
|
-
}
|
|
32720
|
-
const proto = Object.getPrototypeOf(value);
|
|
32721
|
-
const hasObjectPrototype = proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null;
|
|
32722
|
-
if (!hasObjectPrototype) {
|
|
32723
|
-
return false;
|
|
32724
|
-
}
|
|
32725
|
-
return Object.prototype.toString.call(value) === "[object Object]";
|
|
32726
|
-
}
|
|
32727
|
-
|
|
32728
|
-
// ../../.yarn/cache/es-toolkit-npm-1.33.0-f181eedbc7-4c8dea3167.zip/node_modules/es-toolkit/dist/object/merge.mjs
|
|
32729
|
-
init_esm_shims();
|
|
32730
|
-
function merge(target, source) {
|
|
32731
|
-
const sourceKeys = Object.keys(source);
|
|
32732
|
-
for (let i2 = 0; i2 < sourceKeys.length; i2++) {
|
|
32733
|
-
const key = sourceKeys[i2];
|
|
32734
|
-
const sourceValue = source[key];
|
|
32735
|
-
const targetValue = target[key];
|
|
32736
|
-
if (Array.isArray(sourceValue)) {
|
|
32737
|
-
if (Array.isArray(targetValue)) {
|
|
32738
|
-
target[key] = merge(targetValue, sourceValue);
|
|
32739
|
-
} else {
|
|
32740
|
-
target[key] = merge([], sourceValue);
|
|
32741
|
-
}
|
|
32742
|
-
} else if (isPlainObject2(sourceValue)) {
|
|
32743
|
-
if (isPlainObject2(targetValue)) {
|
|
32744
|
-
target[key] = merge(targetValue, sourceValue);
|
|
32745
|
-
} else {
|
|
32746
|
-
target[key] = merge({}, sourceValue);
|
|
32747
|
-
}
|
|
32748
|
-
} else if (targetValue === void 0 || sourceValue !== void 0) {
|
|
32749
|
-
target[key] = sourceValue;
|
|
32750
|
-
}
|
|
32751
|
-
}
|
|
32752
|
-
return target;
|
|
32753
|
-
}
|
|
32754
|
-
|
|
32755
32750
|
// src/plugins/utils/getPackageRoot.ts
|
|
32756
32751
|
init_esm_shims();
|
|
32757
32752
|
import fs3 from "fs";
|
|
@@ -32775,26 +32770,231 @@ async function resolveAppManifestPath() {
|
|
|
32775
32770
|
await fs4.access(appManifestPath, fs4.constants.F_OK);
|
|
32776
32771
|
return appManifestPath;
|
|
32777
32772
|
}
|
|
32773
|
+
async function readAppJson(appJsonPath) {
|
|
32774
|
+
const appJson = await fs4.readFile(appJsonPath, "utf8");
|
|
32775
|
+
return JSON.parse(appJson);
|
|
32776
|
+
}
|
|
32777
|
+
async function writeAppJson(appJsonPath, content) {
|
|
32778
|
+
await fs4.writeFile(appJsonPath, JSON.stringify(content));
|
|
32779
|
+
}
|
|
32778
32780
|
async function updateAppJsonMetadata(metadata) {
|
|
32779
32781
|
const appJsonPath = await resolveAppManifestPath();
|
|
32780
|
-
const appJson = await
|
|
32781
|
-
await
|
|
32782
|
-
|
|
32783
|
-
|
|
32784
|
-
|
|
32785
|
-
_metadata: metadata
|
|
32786
|
-
})
|
|
32787
|
-
)
|
|
32788
|
-
);
|
|
32782
|
+
const appJson = await readAppJson(appJsonPath);
|
|
32783
|
+
await writeAppJson(appJsonPath, {
|
|
32784
|
+
...appJson,
|
|
32785
|
+
_metadata: metadata
|
|
32786
|
+
});
|
|
32789
32787
|
}
|
|
32790
32788
|
|
|
32789
|
+
// src/plugins/types.ts
|
|
32790
|
+
init_esm_shims();
|
|
32791
|
+
var __typia_transform__isFormatUuid = __toESM(require_isFormatUuid(), 1);
|
|
32792
|
+
var __typia_transform__validateReport = __toESM(require_validateReport(), 1);
|
|
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.oauth && null !== input.oauth && _io6(input.oauth)) && ("object" === typeof input._metadata && null !== input._metadata && _io7(input._metadata));
|
|
32795
|
+
const _io1 = (input) => "clipboard" === input.name && ("read" === input.access || "write" === input.access);
|
|
32796
|
+
const _io2 = (input) => "geolocation" === input.name && "access" === input.access;
|
|
32797
|
+
const _io3 = (input) => "contacts" === input.name && ("read" === input.access || "write" === input.access);
|
|
32798
|
+
const _io4 = (input) => "photos" === input.name && ("read" === input.access || "write" === input.access);
|
|
32799
|
+
const _io5 = (input) => "camera" === input.name && "access" === input.access;
|
|
32800
|
+
const _io6 = (input) => Array.isArray(input.scopes) && input.scopes.every((elem) => "user_name" === elem || "user_phone" === elem || "user_birthday" === elem || "user_ci" === elem || "user_gender" === elem || "user_nationality" === elem || "user_email" === elem);
|
|
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));
|
|
32802
|
+
const _iu0 = (input) => (() => {
|
|
32803
|
+
if ("camera" === input.name)
|
|
32804
|
+
return _io5(input);
|
|
32805
|
+
else if ("photos" === input.name)
|
|
32806
|
+
return _io4(input);
|
|
32807
|
+
else if ("contacts" === input.name)
|
|
32808
|
+
return _io3(input);
|
|
32809
|
+
else if ("geolocation" === input.name)
|
|
32810
|
+
return _io2(input);
|
|
32811
|
+
else if ("clipboard" === input.name)
|
|
32812
|
+
return _io1(input);
|
|
32813
|
+
else
|
|
32814
|
+
return false;
|
|
32815
|
+
})();
|
|
32816
|
+
const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.appName || _report(_exceptionable, {
|
|
32817
|
+
path: _path + ".appName",
|
|
32818
|
+
expected: "string",
|
|
32819
|
+
value: input.appName
|
|
32820
|
+
}), (Array.isArray(input.permissions) || _report(_exceptionable, {
|
|
32821
|
+
path: _path + ".permissions",
|
|
32822
|
+
expected: "Array<Permission>",
|
|
32823
|
+
value: input.permissions
|
|
32824
|
+
})) && input.permissions.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
32825
|
+
path: _path + ".permissions[" + _index4 + "]",
|
|
32826
|
+
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
32827
|
+
value: elem
|
|
32828
|
+
})) && _vu0(elem, _path + ".permissions[" + _index4 + "]", _exceptionable) || _report(_exceptionable, {
|
|
32829
|
+
path: _path + ".permissions[" + _index4 + "]",
|
|
32830
|
+
expected: "(CameraPermission | ClipboardPermission | ContactsPermission | GeolocationPermission | PhotosPermission)",
|
|
32831
|
+
value: elem
|
|
32832
|
+
})).every((flag) => flag) || _report(_exceptionable, {
|
|
32833
|
+
path: _path + ".permissions",
|
|
32834
|
+
expected: "Array<Permission>",
|
|
32835
|
+
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
|
+
}), ("object" === typeof input._metadata && null !== input._metadata || _report(_exceptionable, {
|
|
32845
|
+
path: _path + "._metadata",
|
|
32846
|
+
expected: "__type.o1",
|
|
32847
|
+
value: input._metadata
|
|
32848
|
+
})) && _vo7(input._metadata, _path + "._metadata", _exceptionable) || _report(_exceptionable, {
|
|
32849
|
+
path: _path + "._metadata",
|
|
32850
|
+
expected: "__type.o1",
|
|
32851
|
+
value: input._metadata
|
|
32852
|
+
})].every((flag) => flag);
|
|
32853
|
+
const _vo1 = (input, _path, _exceptionable = true) => ["clipboard" === input.name || _report(_exceptionable, {
|
|
32854
|
+
path: _path + ".name",
|
|
32855
|
+
expected: '"clipboard"',
|
|
32856
|
+
value: input.name
|
|
32857
|
+
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
32858
|
+
path: _path + ".access",
|
|
32859
|
+
expected: '("read" | "write")',
|
|
32860
|
+
value: input.access
|
|
32861
|
+
})].every((flag) => flag);
|
|
32862
|
+
const _vo2 = (input, _path, _exceptionable = true) => ["geolocation" === input.name || _report(_exceptionable, {
|
|
32863
|
+
path: _path + ".name",
|
|
32864
|
+
expected: '"geolocation"',
|
|
32865
|
+
value: input.name
|
|
32866
|
+
}), "access" === input.access || _report(_exceptionable, {
|
|
32867
|
+
path: _path + ".access",
|
|
32868
|
+
expected: '"access"',
|
|
32869
|
+
value: input.access
|
|
32870
|
+
})].every((flag) => flag);
|
|
32871
|
+
const _vo3 = (input, _path, _exceptionable = true) => ["contacts" === input.name || _report(_exceptionable, {
|
|
32872
|
+
path: _path + ".name",
|
|
32873
|
+
expected: '"contacts"',
|
|
32874
|
+
value: input.name
|
|
32875
|
+
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
32876
|
+
path: _path + ".access",
|
|
32877
|
+
expected: '("read" | "write")',
|
|
32878
|
+
value: input.access
|
|
32879
|
+
})].every((flag) => flag);
|
|
32880
|
+
const _vo4 = (input, _path, _exceptionable = true) => ["photos" === input.name || _report(_exceptionable, {
|
|
32881
|
+
path: _path + ".name",
|
|
32882
|
+
expected: '"photos"',
|
|
32883
|
+
value: input.name
|
|
32884
|
+
}), "read" === input.access || "write" === input.access || _report(_exceptionable, {
|
|
32885
|
+
path: _path + ".access",
|
|
32886
|
+
expected: '("read" | "write")',
|
|
32887
|
+
value: input.access
|
|
32888
|
+
})].every((flag) => flag);
|
|
32889
|
+
const _vo5 = (input, _path, _exceptionable = true) => ["camera" === input.name || _report(_exceptionable, {
|
|
32890
|
+
path: _path + ".name",
|
|
32891
|
+
expected: '"camera"',
|
|
32892
|
+
value: input.name
|
|
32893
|
+
}), "access" === input.access || _report(_exceptionable, {
|
|
32894
|
+
path: _path + ".access",
|
|
32895
|
+
expected: '"access"',
|
|
32896
|
+
value: input.access
|
|
32897
|
+
})].every((flag) => flag);
|
|
32898
|
+
const _vo6 = (input, _path, _exceptionable = true) => [(Array.isArray(input.scopes) || _report(_exceptionable, {
|
|
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, {
|
|
32912
|
+
path: _path + ".bundleFiles",
|
|
32913
|
+
expected: "Array<string>",
|
|
32914
|
+
value: input.bundleFiles
|
|
32915
|
+
})) && input.bundleFiles.map((elem, _index6) => "string" === typeof elem || _report(_exceptionable, {
|
|
32916
|
+
path: _path + ".bundleFiles[" + _index6 + "]",
|
|
32917
|
+
expected: "string",
|
|
32918
|
+
value: elem
|
|
32919
|
+
})).every((flag) => flag) || _report(_exceptionable, {
|
|
32920
|
+
path: _path + ".bundleFiles",
|
|
32921
|
+
expected: "Array<string>",
|
|
32922
|
+
value: input.bundleFiles
|
|
32923
|
+
}), "string" === typeof input.deploymentId && (__typia_transform__isFormatUuid._isFormatUuid(input.deploymentId) || _report(_exceptionable, {
|
|
32924
|
+
path: _path + ".deploymentId",
|
|
32925
|
+
expected: 'string & Format<"uuid">',
|
|
32926
|
+
value: input.deploymentId
|
|
32927
|
+
})) || _report(_exceptionable, {
|
|
32928
|
+
path: _path + ".deploymentId",
|
|
32929
|
+
expected: '(string & Format<"uuid">)',
|
|
32930
|
+
value: input.deploymentId
|
|
32931
|
+
})].every((flag) => flag);
|
|
32932
|
+
const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
32933
|
+
if ("camera" === input.name)
|
|
32934
|
+
return _vo5(input, _path, _exceptionable);
|
|
32935
|
+
else if ("photos" === input.name)
|
|
32936
|
+
return _vo4(input, _path, _exceptionable);
|
|
32937
|
+
else if ("contacts" === input.name)
|
|
32938
|
+
return _vo3(input, _path, _exceptionable);
|
|
32939
|
+
else if ("geolocation" === input.name)
|
|
32940
|
+
return _vo2(input, _path, _exceptionable);
|
|
32941
|
+
else if ("clipboard" === input.name)
|
|
32942
|
+
return _vo1(input, _path, _exceptionable);
|
|
32943
|
+
else
|
|
32944
|
+
return _report(_exceptionable, {
|
|
32945
|
+
path: _path,
|
|
32946
|
+
expected: "(CameraPermission | PhotosPermission | ContactsPermission | GeolocationPermission | ClipboardPermission)",
|
|
32947
|
+
value: input
|
|
32948
|
+
});
|
|
32949
|
+
})();
|
|
32950
|
+
const __is = (input) => "object" === typeof input && null !== input && _io0(input);
|
|
32951
|
+
let errors;
|
|
32952
|
+
let _report;
|
|
32953
|
+
return (input) => {
|
|
32954
|
+
if (false === __is(input)) {
|
|
32955
|
+
errors = [];
|
|
32956
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
32957
|
+
((input2, _path, _exceptionable = true) => ("object" === typeof input2 && null !== input2 || _report(true, {
|
|
32958
|
+
path: _path + "",
|
|
32959
|
+
expected: "AppManifest",
|
|
32960
|
+
value: input2
|
|
32961
|
+
})) && _vo0(input2, _path + "", true) || _report(true, {
|
|
32962
|
+
path: _path + "",
|
|
32963
|
+
expected: "AppManifest",
|
|
32964
|
+
value: input2
|
|
32965
|
+
}))(input, "$input", true);
|
|
32966
|
+
const success = 0 === errors.length;
|
|
32967
|
+
return success ? {
|
|
32968
|
+
success,
|
|
32969
|
+
data: input
|
|
32970
|
+
} : {
|
|
32971
|
+
success,
|
|
32972
|
+
errors,
|
|
32973
|
+
data: input
|
|
32974
|
+
};
|
|
32975
|
+
}
|
|
32976
|
+
return {
|
|
32977
|
+
success: true,
|
|
32978
|
+
data: input
|
|
32979
|
+
};
|
|
32980
|
+
};
|
|
32981
|
+
})();
|
|
32982
|
+
|
|
32791
32983
|
// src/plugins/utils/createArtifact.ts
|
|
32984
|
+
async function validateZip(zipPath) {
|
|
32985
|
+
const appJsonString = await readZipContent(zipPath, "app.json");
|
|
32986
|
+
const appJson = JSON.parse(appJsonString);
|
|
32987
|
+
const validated = validateAppManifest(appJson);
|
|
32988
|
+
if (!validated.success) {
|
|
32989
|
+
throw new Error("bedrock.config.ts \uAC12\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.");
|
|
32990
|
+
}
|
|
32991
|
+
}
|
|
32792
32992
|
async function createArtifact(options, deps) {
|
|
32793
|
-
const { inputJsFiles, outfile, appJsonPath } = options;
|
|
32993
|
+
const { inputJsFiles, outfile, appJsonPath, reactNativeVersion } = options;
|
|
32794
32994
|
const bundleFiles = await Promise.all(
|
|
32795
32995
|
inputJsFiles.map(async (result) => {
|
|
32796
32996
|
const { compressed } = await createCompressedBytecode(result.path, path11.dirname(outfile), deps);
|
|
32797
|
-
return { path: compressed, name: `bundle.${result.platform}.hbc.gz` };
|
|
32997
|
+
return { path: compressed, name: `bundle.${result.platform}.${reactNativeVersion}.hbc.gz` };
|
|
32798
32998
|
})
|
|
32799
32999
|
);
|
|
32800
33000
|
await updateAppJsonMetadata({
|
|
@@ -32805,6 +33005,7 @@ async function createArtifact(options, deps) {
|
|
|
32805
33005
|
files: [{ path: appJsonPath, name: "app.json" }, ...bundleFiles, ...options.additionalFilesToZip ?? []],
|
|
32806
33006
|
outfile
|
|
32807
33007
|
});
|
|
33008
|
+
await validateZip(outfile);
|
|
32808
33009
|
return outfile;
|
|
32809
33010
|
}
|
|
32810
33011
|
|
|
@@ -33213,6 +33414,7 @@ function appsInTossCreateArtifact(deploymentId) {
|
|
|
33213
33414
|
handler: async ({ buildResults, appName, cwd }) => {
|
|
33214
33415
|
const artifactOutfile = await createArtifact(
|
|
33215
33416
|
{
|
|
33417
|
+
reactNativeVersion: REACT_NATIVE_VERSION,
|
|
33216
33418
|
deploymentId,
|
|
33217
33419
|
inputJsFiles: buildResults.map((buildResult) => ({
|
|
33218
33420
|
path: buildResult.outfile,
|
|
@@ -33269,11 +33471,13 @@ function appsInTossDevServer(options) {
|
|
|
33269
33471
|
config: {
|
|
33270
33472
|
mpack: {
|
|
33271
33473
|
devServer: {
|
|
33272
|
-
enableRouterGen: false,
|
|
33273
33474
|
middlewares: [
|
|
33274
33475
|
createServerPermissionsMiddleware(options.permissions),
|
|
33275
33476
|
createServerOAuthMiddleware(options.oauth)
|
|
33276
|
-
]
|
|
33477
|
+
],
|
|
33478
|
+
routegen: {
|
|
33479
|
+
enabled: false
|
|
33480
|
+
}
|
|
33277
33481
|
}
|
|
33278
33482
|
}
|
|
33279
33483
|
}
|
|
@@ -33326,13 +33530,12 @@ function appsInToss(options) {
|
|
|
33326
33530
|
appsInTossEsbuildConfig(deploymentId)
|
|
33327
33531
|
];
|
|
33328
33532
|
}
|
|
33329
|
-
|
|
33330
|
-
// src/plugins/types.ts
|
|
33331
|
-
init_esm_shims();
|
|
33332
33533
|
export {
|
|
33333
33534
|
appsInToss,
|
|
33334
33535
|
appsInTossAppJson,
|
|
33335
|
-
createArtifact
|
|
33536
|
+
createArtifact,
|
|
33537
|
+
validateAppManifest,
|
|
33538
|
+
validateZip
|
|
33336
33539
|
};
|
|
33337
33540
|
/*! Bundled license information:
|
|
33338
33541
|
|
package/jest.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/jest';
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/framework",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-dev.
|
|
5
|
-
"description": "
|
|
4
|
+
"version": "0.0.0-dev.1741859884482",
|
|
5
|
+
"description": "The framework for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prepack": "yarn build",
|
|
8
8
|
"typecheck": "tsc --noEmit",
|
|
@@ -27,43 +27,52 @@
|
|
|
27
27
|
"types": "./src/bridges.ts",
|
|
28
28
|
"default": "./src/bridges.ts"
|
|
29
29
|
},
|
|
30
|
+
"./jest": {
|
|
31
|
+
"types": "./dist/jest/index.d.ts",
|
|
32
|
+
"import": "./dist/jest/index.js",
|
|
33
|
+
"require": "./dist/jest/index.cjs"
|
|
34
|
+
},
|
|
30
35
|
"./package.json": "./package.json"
|
|
31
36
|
},
|
|
32
37
|
"files": [
|
|
33
38
|
"dist/**/*",
|
|
34
39
|
"src/bridges.ts",
|
|
35
40
|
"hermesc/**/*",
|
|
36
|
-
"plugins.d.ts"
|
|
41
|
+
"plugins.d.ts",
|
|
42
|
+
"jest.d.ts"
|
|
37
43
|
],
|
|
38
44
|
"bin": {
|
|
39
|
-
"ait": "./bin.js"
|
|
45
|
+
"ait": "./bin/ait.js"
|
|
40
46
|
},
|
|
41
47
|
"dependencies": {
|
|
42
|
-
"@apps-in-toss/cli": "
|
|
48
|
+
"@apps-in-toss/cli": "0.0.0-dev.1741859884482"
|
|
43
49
|
},
|
|
44
50
|
"devDependencies": {
|
|
45
|
-
"@react-native-bedrock/mpack-next": "0.0.
|
|
46
|
-
"@react-native-bedrock/native": "0.0.
|
|
51
|
+
"@react-native-bedrock/mpack-next": "0.0.12",
|
|
52
|
+
"@react-native-bedrock/native": "0.0.12",
|
|
53
|
+
"@ryoppippi/unplugin-typia": "^2.0.3",
|
|
54
|
+
"@toss-design-system/react-native": "^0",
|
|
47
55
|
"@types/archiver": "^6.0.3",
|
|
48
56
|
"@types/connect": "^3",
|
|
49
57
|
"@types/react": "18.3.3",
|
|
50
58
|
"archiver": "^7.0.1",
|
|
51
59
|
"connect": "^3.7.0",
|
|
52
|
-
"es-toolkit": "^1.33.0",
|
|
53
60
|
"eslint": "^9.7.0",
|
|
54
61
|
"execa": "^9.5.2",
|
|
55
|
-
"find-up": "^7.0.0",
|
|
56
62
|
"picocolors": "^1.1.1",
|
|
57
63
|
"react": "18.2.0",
|
|
58
64
|
"react-native": "0.72.6",
|
|
59
|
-
"react-native-bedrock": "0.0.
|
|
65
|
+
"react-native-bedrock": "0.0.12",
|
|
60
66
|
"tsup": "^8.3.5",
|
|
61
67
|
"typescript": "4.9.5",
|
|
68
|
+
"typia": "^8.0.1",
|
|
62
69
|
"uuidv7": "^1.0.2",
|
|
63
70
|
"vitest": "^3.0.3"
|
|
64
71
|
},
|
|
65
72
|
"peerDependencies": {
|
|
66
73
|
"@react-native-bedrock/native": "*",
|
|
74
|
+
"@toss-design-system/react-native": "*",
|
|
75
|
+
"@types/react": "*",
|
|
67
76
|
"react": "*",
|
|
68
77
|
"react-native": "*",
|
|
69
78
|
"react-native-bedrock": "*"
|
|
@@ -71,5 +80,5 @@
|
|
|
71
80
|
"publishConfig": {
|
|
72
81
|
"access": "public"
|
|
73
82
|
},
|
|
74
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "3be5cb5032d4e429e47b30124a608440032fff3d"
|
|
75
84
|
}
|