@apps-in-toss/web-framework 0.0.0-dev.1747216176095 → 0.0.0-dev.1752049503789
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/cli/index.js +40 -33
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.js +2 -0
- package/dist/prebuilt/dev.android.js +27963 -25690
- package/dist/prebuilt/dev.ios.js +27914 -25652
- package/dist/prebuilt/prod.android.js +5157 -4192
- package/dist/prebuilt/prod.ios.js +5159 -4194
- package/dist/prebuilt/prod.json +6 -6
- package/dist-web/index.d.ts +2 -2
- package/package.json +16 -16
package/dist/cli/index.js
CHANGED
|
@@ -57729,21 +57729,21 @@ var Te = async (t2) => {
|
|
|
57729
57729
|
};
|
|
57730
57730
|
|
|
57731
57731
|
// src/cli/commands/BuildCommand.ts
|
|
57732
|
-
import { getPackageRoot as getPackageRoot4 } from "@
|
|
57732
|
+
import { getPackageRoot as getPackageRoot4 } from "@granite-js/utils";
|
|
57733
57733
|
|
|
57734
57734
|
// src/config/loadConfig.ts
|
|
57735
57735
|
init_esm_shims();
|
|
57736
57736
|
var import_cosmiconfig = __toESM(require_dist(), 1);
|
|
57737
|
-
import { getPackageRoot } from "@
|
|
57737
|
+
import { getPackageRoot } from "@granite-js/utils";
|
|
57738
57738
|
|
|
57739
|
-
// ../../.yarn/__virtual__/cosmiconfig-typescript-loader-virtual-
|
|
57739
|
+
// ../../.yarn/__virtual__/cosmiconfig-typescript-loader-virtual-2f1fb2d612/0/cache/cosmiconfig-typescript-loader-npm-5.1.0-81c399fbcb-9c87ade7b0.zip/node_modules/cosmiconfig-typescript-loader/dist/esm/index.mjs
|
|
57740
57740
|
init_esm_shims();
|
|
57741
57741
|
|
|
57742
|
-
// ../../.yarn/__virtual__/cosmiconfig-typescript-loader-virtual-
|
|
57742
|
+
// ../../.yarn/__virtual__/cosmiconfig-typescript-loader-virtual-2f1fb2d612/0/cache/cosmiconfig-typescript-loader-npm-5.1.0-81c399fbcb-9c87ade7b0.zip/node_modules/cosmiconfig-typescript-loader/dist/esm/loader.mjs
|
|
57743
57743
|
init_esm_shims();
|
|
57744
57744
|
var import_jiti = __toESM(require_lib4(), 1);
|
|
57745
57745
|
|
|
57746
|
-
// ../../.yarn/__virtual__/cosmiconfig-typescript-loader-virtual-
|
|
57746
|
+
// ../../.yarn/__virtual__/cosmiconfig-typescript-loader-virtual-2f1fb2d612/0/cache/cosmiconfig-typescript-loader-npm-5.1.0-81c399fbcb-9c87ade7b0.zip/node_modules/cosmiconfig-typescript-loader/dist/esm/typescript-compile-error.mjs
|
|
57747
57747
|
init_esm_shims();
|
|
57748
57748
|
var TypeScriptCompileError = class _TypeScriptCompileError extends Error {
|
|
57749
57749
|
constructor(message) {
|
|
@@ -57760,7 +57760,7 @@ ${error.message}`;
|
|
|
57760
57760
|
}
|
|
57761
57761
|
};
|
|
57762
57762
|
|
|
57763
|
-
// ../../.yarn/__virtual__/cosmiconfig-typescript-loader-virtual-
|
|
57763
|
+
// ../../.yarn/__virtual__/cosmiconfig-typescript-loader-virtual-2f1fb2d612/0/cache/cosmiconfig-typescript-loader-npm-5.1.0-81c399fbcb-9c87ade7b0.zip/node_modules/cosmiconfig-typescript-loader/dist/esm/loader.mjs
|
|
57764
57764
|
function TypeScriptLoader(options) {
|
|
57765
57765
|
const loader = (0, import_jiti.default)("", { interopDefault: true, ...options });
|
|
57766
57766
|
return (path9) => {
|
|
@@ -57778,8 +57778,8 @@ function TypeScriptLoader(options) {
|
|
|
57778
57778
|
|
|
57779
57779
|
// src/config/loadConfig.ts
|
|
57780
57780
|
var loadConfig = async () => {
|
|
57781
|
-
const explorer = (0, import_cosmiconfig.cosmiconfig)("
|
|
57782
|
-
searchPlaces: ["
|
|
57781
|
+
const explorer = (0, import_cosmiconfig.cosmiconfig)("granite", {
|
|
57782
|
+
searchPlaces: ["granite.config.ts", "granite.config.mts", "granite.config.js", "granite.config.cjs"],
|
|
57783
57783
|
loaders: {
|
|
57784
57784
|
".ts": TypeScriptLoader(),
|
|
57785
57785
|
".mts": TypeScriptLoader()
|
|
@@ -57796,7 +57796,7 @@ import fs2 from "fs";
|
|
|
57796
57796
|
import path7 from "path";
|
|
57797
57797
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
57798
57798
|
import { transform } from "@babel/core";
|
|
57799
|
-
import { getPackageRoot as getPackageRoot3 } from "@
|
|
57799
|
+
import { getPackageRoot as getPackageRoot3 } from "@granite-js/utils";
|
|
57800
57800
|
|
|
57801
57801
|
// ../../.yarn/cache/es-toolkit-npm-1.32.0-019fc7c155-56ba965570.zip/node_modules/es-toolkit/dist/index.mjs
|
|
57802
57802
|
init_esm_shims();
|
|
@@ -58161,9 +58161,10 @@ import {
|
|
|
58161
58161
|
createArtifact,
|
|
58162
58162
|
appsInTossEsbuildConfig,
|
|
58163
58163
|
appsInTossMetroConfig,
|
|
58164
|
-
setupRuntimeSetupScript
|
|
58164
|
+
setupRuntimeSetupScript,
|
|
58165
|
+
collectDependencyVersions
|
|
58165
58166
|
} from "@apps-in-toss/plugins";
|
|
58166
|
-
import { getPackageRoot as getPackageRoot2 } from "@
|
|
58167
|
+
import { getPackageRoot as getPackageRoot2 } from "@granite-js/utils";
|
|
58167
58168
|
|
|
58168
58169
|
// ../../.yarn/cache/execa-npm-9.5.2-ac35c57136-94782a6282.zip/node_modules/execa/index.js
|
|
58169
58170
|
init_esm_shims();
|
|
@@ -65193,7 +65194,7 @@ function appsInTossWebBuild(options) {
|
|
|
65193
65194
|
const webDistFiles = await fs.promises.readdir(webDistDir);
|
|
65194
65195
|
if (webDistFiles.length === 0) {
|
|
65195
65196
|
throw new Error(
|
|
65196
|
-
`\uC6F9 \uBE4C\uB4DC \uACB0\uACFC\uBB3C\uC774 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
|
|
65197
|
+
`\uC6F9 \uBE4C\uB4DC \uACB0\uACFC\uBB3C\uC774 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. granite.config.ts\uC5D0\uC11C \uC124\uC815\uD55C outdir \uACBD\uB85C\uC640 \uBE4C\uB4DC \uBA85\uB839\uC5B4(web.commands.build)\uC758 \uACB0\uACFC\uBB3C \uACBD\uB85C\uAC00 \uAC19\uC740\uC9C0 \uD655\uC778\uD558\uC138\uC694.`
|
|
65197
65198
|
);
|
|
65198
65199
|
}
|
|
65199
65200
|
if (!webDistFiles.includes("index.html")) {
|
|
@@ -65233,6 +65234,7 @@ function appsInTossCreateArtifact(deploymentId) {
|
|
|
65233
65234
|
build: {
|
|
65234
65235
|
order: "post",
|
|
65235
65236
|
handler: async ({ buildResults, appName, cwd, outdir }) => {
|
|
65237
|
+
const { dependencies, devDependencies } = await collectDependencyVersions(cwd);
|
|
65236
65238
|
const additionalFilesToZip = await getWebDistFiles(path6.join(outdir, "web"));
|
|
65237
65239
|
const artifactOutfile = await createArtifact({
|
|
65238
65240
|
reactNativeVersion: REACT_NATIVE_VERSION,
|
|
@@ -65248,8 +65250,12 @@ function appsInTossCreateArtifact(deploymentId) {
|
|
|
65248
65250
|
}
|
|
65249
65251
|
]).flat(),
|
|
65250
65252
|
outfile: path6.join(cwd, `${appName}.ait`),
|
|
65251
|
-
appJsonPath: path6.join(packageRoot, ".
|
|
65252
|
-
additionalFilesToZip
|
|
65253
|
+
appJsonPath: path6.join(packageRoot, ".granite", APP_MANIFEST_NAME),
|
|
65254
|
+
additionalFilesToZip,
|
|
65255
|
+
packageJson: {
|
|
65256
|
+
dependencies,
|
|
65257
|
+
devDependencies
|
|
65258
|
+
}
|
|
65253
65259
|
});
|
|
65254
65260
|
if (!artifactOutfile) {
|
|
65255
65261
|
throw new Error("\uC544\uD2F0\uD329\uD2B8 \uC0DD\uC131\uC5D0 \uC2E4\uD328\uD588\uC5B4\uC694.");
|
|
@@ -65378,8 +65384,11 @@ async function runPrebuildToBuild(cwd, config) {
|
|
|
65378
65384
|
webViewProps: config.webViewProps
|
|
65379
65385
|
})
|
|
65380
65386
|
]);
|
|
65387
|
+
const pluginContext = {
|
|
65388
|
+
meta: /* @__PURE__ */ Object.create(null)
|
|
65389
|
+
};
|
|
65381
65390
|
for (const preHandler of resolvedPlugins.build.preHandlers) {
|
|
65382
|
-
await preHandler?.({
|
|
65391
|
+
await preHandler?.call(pluginContext, {
|
|
65383
65392
|
cwd,
|
|
65384
65393
|
entryFile: "",
|
|
65385
65394
|
appName: config.appName,
|
|
@@ -65413,7 +65422,7 @@ async function runPrebuildToBuild(cwd, config) {
|
|
|
65413
65422
|
throw new Error("Failed to build prod.json");
|
|
65414
65423
|
}
|
|
65415
65424
|
for (const postHandler of resolvedPlugins.build.postHandlers) {
|
|
65416
|
-
await postHandler?.({
|
|
65425
|
+
await postHandler?.call(pluginContext, {
|
|
65417
65426
|
cwd,
|
|
65418
65427
|
entryFile: "",
|
|
65419
65428
|
appName: config.appName,
|
|
@@ -65440,10 +65449,10 @@ var BuildCommand = class extends Command {
|
|
|
65440
65449
|
static paths = [[`build`]];
|
|
65441
65450
|
static usage = Command.Usage({
|
|
65442
65451
|
category: "Build",
|
|
65443
|
-
description: "
|
|
65452
|
+
description: "Granite App \uBC88\uB4E4\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4",
|
|
65444
65453
|
examples: [
|
|
65445
|
-
["\uBE4C\uB4DC\uD558\uAE30", "
|
|
65446
|
-
["\uC9C0\uC815\uB41C \uB300\uC0C1\uB9CC \uBE4C\uB4DC\uD558\uAE30", "
|
|
65454
|
+
["\uBE4C\uB4DC\uD558\uAE30", "granite build"],
|
|
65455
|
+
["\uC9C0\uC815\uB41C \uB300\uC0C1\uB9CC \uBE4C\uB4DC\uD558\uAE30", "granite build --id service-ios"]
|
|
65447
65456
|
]
|
|
65448
65457
|
});
|
|
65449
65458
|
tag = options_exports.String("--tag", {
|
|
@@ -65462,6 +65471,7 @@ var BuildCommand = class extends Command {
|
|
|
65462
65471
|
|
|
65463
65472
|
// src/cli/commands/DevCommand.ts
|
|
65464
65473
|
init_esm_shims();
|
|
65474
|
+
import { getPackageRoot as getPackageRoot5 } from "@granite-js/utils";
|
|
65465
65475
|
|
|
65466
65476
|
// ../../.yarn/__virtual__/@hono-node-server-virtual-cf2888014c/0/cache/@hono-node-server-npm-1.13.8-e78cfff928-5880892fdd.zip/node_modules/@hono/node-server/dist/index.mjs
|
|
65467
65477
|
init_esm_shims();
|
|
@@ -65922,9 +65932,6 @@ var serve = (options, listeningListener) => {
|
|
|
65922
65932
|
return server;
|
|
65923
65933
|
};
|
|
65924
65934
|
|
|
65925
|
-
// src/cli/commands/DevCommand.ts
|
|
65926
|
-
import { getPackageRoot as getPackageRoot5 } from "@react-native-bedrock/utils";
|
|
65927
|
-
|
|
65928
65935
|
// src/server.ts
|
|
65929
65936
|
init_esm_shims();
|
|
65930
65937
|
import fs3 from "fs";
|
|
@@ -67834,14 +67841,14 @@ var createApp = ({ appName, web, permissions, webViewProps, brand }) => {
|
|
|
67834
67841
|
init_esm_shims();
|
|
67835
67842
|
var import_picocolors4 = __toESM(require_picocolors2(), 1);
|
|
67836
67843
|
var LOGO = [
|
|
67837
|
-
"\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\
|
|
67838
|
-
"\u2588\u2588\u2554\u2550\u2550\
|
|
67839
|
-
"\u2588\u2588\
|
|
67840
|
-
"\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\
|
|
67841
|
-
"\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\
|
|
67842
|
-
"\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\
|
|
67844
|
+
" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557",
|
|
67845
|
+
"\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D",
|
|
67846
|
+
"\u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2557 ",
|
|
67847
|
+
"\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u255D ",
|
|
67848
|
+
"\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557",
|
|
67849
|
+
" \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D"
|
|
67843
67850
|
];
|
|
67844
|
-
var GREETING_MESSAGE = "Welcome to
|
|
67851
|
+
var GREETING_MESSAGE = "Welcome to Granite";
|
|
67845
67852
|
function printLogo() {
|
|
67846
67853
|
const maxLength = LOGO.reduce((prev, line) => Math.max(line.length, prev), 0);
|
|
67847
67854
|
console.log();
|
|
@@ -67857,8 +67864,8 @@ var DevCommand = class extends Command {
|
|
|
67857
67864
|
static paths = [[`dev`]];
|
|
67858
67865
|
static usage = Command.Usage({
|
|
67859
67866
|
category: "Development",
|
|
67860
|
-
description: "
|
|
67861
|
-
examples: [["\uAC1C\uBC1C \uC11C\uBC84 \uC2E4\uD589\uD558\uAE30", "
|
|
67867
|
+
description: "Granite \uAC1C\uBC1C \uC11C\uBC84\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4",
|
|
67868
|
+
examples: [["\uAC1C\uBC1C \uC11C\uBC84 \uC2E4\uD589\uD558\uAE30", "granite dev"]]
|
|
67862
67869
|
});
|
|
67863
67870
|
async execute() {
|
|
67864
67871
|
const packageRoot = getPackageRoot5();
|
|
@@ -67887,8 +67894,8 @@ var DevCommand = class extends Command {
|
|
|
67887
67894
|
|
|
67888
67895
|
// src/cli/index.ts
|
|
67889
67896
|
var cli = new Cli({
|
|
67890
|
-
binaryLabel: "
|
|
67891
|
-
binaryName: "
|
|
67897
|
+
binaryLabel: "granite",
|
|
67898
|
+
binaryName: "granite",
|
|
67892
67899
|
enableCapture: true
|
|
67893
67900
|
});
|
|
67894
67901
|
async function initialize() {
|
package/dist/config/index.d.ts
CHANGED
|
@@ -73,6 +73,11 @@ interface AppsInTossWebConfig extends AppsInTossPluginOptions {
|
|
|
73
73
|
* to tap them before they start playing. The default value is `true`.
|
|
74
74
|
*/
|
|
75
75
|
mediaPlaybackRequiresUserAction?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* https://github.com/react-native-webview/react-native-webview/blob/master/docs/Reference.md#allowsbackforwardnavigationgestures
|
|
78
|
+
* this will be able horizontal swipe gestures. The default value is `true`.
|
|
79
|
+
*/
|
|
80
|
+
allowsBackForwardNavigationGestures?: boolean;
|
|
76
81
|
};
|
|
77
82
|
/**
|
|
78
83
|
* @default 'dist'
|
package/dist/config/index.js
CHANGED
|
@@ -40,6 +40,7 @@ function merge(target, source) {
|
|
|
40
40
|
// src/config/defineConfig.ts
|
|
41
41
|
var defineConfig = (config) => {
|
|
42
42
|
const defaultConfig = {
|
|
43
|
+
scheme: "intoss",
|
|
43
44
|
outdir: "dist",
|
|
44
45
|
web: {
|
|
45
46
|
host: "localhost"
|
|
@@ -49,6 +50,7 @@ var defineConfig = (config) => {
|
|
|
49
50
|
mediaPlaybackRequiresUserAction: true,
|
|
50
51
|
allowsInlineMediaPlayback: false,
|
|
51
52
|
bounces: true,
|
|
53
|
+
allowsBackForwardNavigationGestures: true,
|
|
52
54
|
pullToRefreshEnabled: true,
|
|
53
55
|
overScrollMode: "always"
|
|
54
56
|
}
|