@apps-in-toss/web-framework 0.0.0-dev.1739415803173 → 0.0.0-dev.1740737494440

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.
Files changed (43) hide show
  1. package/ait.js +3 -0
  2. package/bin.js +2 -1
  3. package/config.d.ts +1 -0
  4. package/dist/{chunk-EFYYFBU5.js → chunk-DI2VGQ6M.js} +3 -2
  5. package/dist/chunk-I3ZDGLIW.js +19 -0
  6. package/dist/chunk-LJBVSTWE.js +7687 -0
  7. package/dist/chunk-TZCMTMV7.js +38 -0
  8. package/dist/cli/index.cjs +644 -0
  9. package/dist/cli/index.d.cts +2 -0
  10. package/dist/cli/index.d.ts +2 -0
  11. package/dist/cli/index.js +592 -0
  12. package/dist/cli.cjs +14 -67
  13. package/dist/cli.js +15 -68
  14. package/dist/closeView.d.ts +1 -0
  15. package/dist/config/index.cjs +7962 -0
  16. package/dist/config/index.d.cts +57 -0
  17. package/dist/config/index.d.ts +57 -0
  18. package/dist/config/index.js +290 -0
  19. package/dist/fetchAlbumPhotos.d.ts +75 -0
  20. package/dist/fetchContacts.d.ts +92 -0
  21. package/dist/generateHapticFeedback.d.ts +1 -0
  22. package/dist/getClipboardText.d.ts +42 -0
  23. package/dist/getCurrentLocation.d.ts +109 -0
  24. package/dist/getDeviceId.d.ts +1 -0
  25. package/dist/getLocale.d.ts +1 -0
  26. package/dist/getNetworkStatus.d.ts +1 -0
  27. package/dist/getSchemeUri.d.ts +1 -0
  28. package/dist/index.cjs +0 -45
  29. package/dist/index.d.cts +1 -53
  30. package/dist/index.d.ts +16 -54
  31. package/dist/index.js +1 -9
  32. package/dist/openCamera.d.ts +75 -0
  33. package/dist/plugins/index.cjs +7681 -0
  34. package/dist/plugins/index.d.cts +15 -0
  35. package/dist/plugins/index.d.ts +15 -0
  36. package/dist/plugins/index.js +11 -0
  37. package/dist/setClipboardText.d.ts +34 -0
  38. package/dist/setScreenAwakeMode.d.ts +1 -0
  39. package/dist/setSecureScreen.d.ts +1 -0
  40. package/dist/share.d.ts +1 -0
  41. package/dist/startUpdateLocation.d.ts +151 -0
  42. package/package.json +21 -18
  43. package/react-native/react-native.config.cjs +0 -2
package/dist/cli.cjs CHANGED
@@ -105,7 +105,7 @@ async function build({ distDirname, cache }) {
105
105
  const config = await loadConfig();
106
106
  const rootDir = process.cwd();
107
107
  const reactNativeProjectDir = import_path.default.resolve(__dirname, "..", "react-native");
108
- const projectRootTmp = import_path.default.resolve(process.cwd(), ".bedrock");
108
+ const projectRootTmp = import_path.default.resolve(process.cwd(), ".apps-in-toss");
109
109
  await import_fs.default.promises.mkdir(projectRootTmp, { recursive: true });
110
110
  await import_fs.default.promises.writeFile(
111
111
  import_path.default.join(projectRootTmp, "metadata.json"),
@@ -155,7 +155,7 @@ async function build({ distDirname, cache }) {
155
155
  plugins: [
156
156
  [
157
157
  require.resolve("@apps-in-toss/babel-plugin-json"),
158
- { jsonPath: "./.bedrock/metadata.json", identifierName: "Ait" }
158
+ { jsonPath: "./.apps-in-toss/metadata.json", identifierName: "Ait" }
159
159
  ]
160
160
  ]
161
161
  },
@@ -173,7 +173,7 @@ async function build({ distDirname, cache }) {
173
173
  plugins: [
174
174
  [
175
175
  require.resolve("@apps-in-toss/babel-plugin-json"),
176
- { jsonPath: "./.bedrock/metadata.json", identifierName: "Ait" }
176
+ { jsonPath: "./.apps-in-toss/metadata.json", identifierName: "Ait" }
177
177
  ]
178
178
  ]
179
179
  },
@@ -357,7 +357,7 @@ var DeployCommand = class extends import_clipanion2.Command {
357
357
  }
358
358
  ]);
359
359
  if (deploymentId) {
360
- p.note(import_picocolors2.default.underline(import_picocolors2.default.green(`intoss-sandbox://${appIdentifier}?_deploymentId=${deploymentId}`)));
360
+ p.note(`Deployment ID: ${import_picocolors2.default.underline(import_picocolors2.default.green(deploymentId))}`);
361
361
  }
362
362
  } catch (error) {
363
363
  if (error instanceof Error) {
@@ -393,7 +393,7 @@ var DevCommand = class extends import_clipanion3.Command {
393
393
  port: this.port ? parseInt(this.port, 10) : void 0
394
394
  };
395
395
  const cwd = import_path3.default.resolve(__dirname, "..", "react-native");
396
- const projectRootTmp = import_path3.default.resolve(process.cwd(), ".bedrock");
396
+ const projectRootTmp = import_path3.default.resolve(process.cwd(), ".apps-in-toss");
397
397
  await import_fs2.default.promises.mkdir(projectRootTmp, { recursive: true });
398
398
  await import_fs2.default.promises.writeFile(
399
399
  import_path3.default.join(projectRootTmp, "metadata.json"),
@@ -437,13 +437,11 @@ var DevCommand = class extends import_clipanion3.Command {
437
437
  };
438
438
 
439
439
  // src/InitCommand/InitCommand.ts
440
- var import_fs4 = __toESM(require("fs"), 1);
441
- var import_path5 = __toESM(require("path"), 1);
440
+ var import_fs3 = __toESM(require("fs"), 1);
441
+ var import_path4 = __toESM(require("path"), 1);
442
442
  var p2 = __toESM(require("@clack/prompts"), 1);
443
443
  var import_clipanion4 = require("clipanion");
444
444
  var import_es_toolkit = require("es-toolkit");
445
- var import_execa3 = require("execa");
446
- var import_yaml = __toESM(require("yaml"), 1);
447
445
 
448
446
  // src/InitCommand/templates/index.tsx
449
447
  var CONFIG_TEMPLATE = `import { defineConfig } from '@apps-in-toss/web-framework';
@@ -460,21 +458,6 @@ export default defineConfig({
460
458
  });
461
459
  `;
462
460
 
463
- // src/utils/getPackageRoot.ts
464
- var import_fs3 = __toESM(require("fs"), 1);
465
- var import_path4 = __toESM(require("path"), 1);
466
- function getPackageRoot() {
467
- let cwd = process.cwd();
468
- const root = import_path4.default.parse(cwd).root;
469
- while (cwd !== root) {
470
- if (import_fs3.default.existsSync(import_path4.default.join(cwd, "package.json"))) {
471
- return cwd;
472
- }
473
- cwd = import_path4.default.dirname(cwd);
474
- }
475
- return cwd;
476
- }
477
-
478
461
  // src/utils/transformTemplate.ts
479
462
  function transformTemplate(templateString, values) {
480
463
  let result = templateString;
@@ -489,7 +472,6 @@ function transformTemplate(templateString, values) {
489
472
  var InitCommand = class extends import_clipanion4.Command {
490
473
  static paths = [[`init`]];
491
474
  async execute() {
492
- const cwd = getPackageRoot();
493
475
  p2.intro("\u{1F680} \uC571 \uCD08\uAE30\uD654\uB97C \uC2DC\uC791\uD569\uB2C8\uB2E4");
494
476
  const appName = await p2.text({
495
477
  message: "Enter app name",
@@ -519,7 +501,7 @@ var InitCommand = class extends import_clipanion4.Command {
519
501
  return;
520
502
  }
521
503
  p2.log.step("package.json \uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC124\uC815\uD558\uB294 \uC911...");
522
- const packageJson = await import_fs4.default.promises.readFile(import_path5.default.join(cwd, "package.json"), {
504
+ const packageJson = await import_fs3.default.promises.readFile(import_path4.default.join(process.cwd(), "package.json"), {
523
505
  encoding: "utf-8"
524
506
  });
525
507
  const scripts = JSON.parse(packageJson);
@@ -530,7 +512,7 @@ var InitCommand = class extends import_clipanion4.Command {
530
512
  scripts.scripts.dev = "ait dev";
531
513
  scripts.scripts.build = "ait build";
532
514
  scripts.scripts.deploy = "ait deploy";
533
- await import_fs4.default.promises.writeFile(import_path5.default.join(cwd, "package.json"), JSON.stringify(scripts, null, 2), {
515
+ await import_fs3.default.promises.writeFile(import_path4.default.join(process.cwd(), "package.json"), JSON.stringify(scripts, null, 2), {
534
516
  encoding: "utf-8"
535
517
  });
536
518
  p2.log.step("apps-in-toss.config.web.ts \uD30C\uC77C\uC744 \uC0DD\uC131\uD558\uB294 \uC911...");
@@ -540,14 +522,14 @@ var InitCommand = class extends import_clipanion4.Command {
540
522
  webDevCommand: original.dev === "ait dev" ? "" : original.dev,
541
523
  webBuildCommand: original.build === "ait build" ? "" : original.build
542
524
  });
543
- await import_fs4.default.promises.writeFile(import_path5.default.join(cwd, "apps-in-toss.config.web.ts"), config, {
525
+ await import_fs3.default.promises.writeFile(import_path4.default.join(process.cwd(), "apps-in-toss.config.web.ts"), config, {
544
526
  encoding: "utf-8"
545
527
  });
546
528
  p2.log.step(".gitignore \uD30C\uC77C\uC744 \uC5C5\uB370\uC774\uD2B8\uD558\uB294 \uC911...");
547
- await import_fs4.default.promises.appendFile(import_path5.default.join(cwd, ".gitignore"), "\n.bedrock\n");
529
+ await import_fs3.default.promises.appendFile(import_path4.default.join(process.cwd(), ".gitignore"), "\n.apps-in-toss\n");
548
530
  p2.log.step("app.json \uD30C\uC77C\uC744 \uC0DD\uC131\uD558\uB294 \uC911...");
549
- await import_fs4.default.promises.writeFile(
550
- import_path5.default.join(cwd, "app.json"),
531
+ await import_fs3.default.promises.writeFile(
532
+ import_path4.default.join(process.cwd(), "app.json"),
551
533
  JSON.stringify({
552
534
  clientId: "",
553
535
  appName,
@@ -557,47 +539,12 @@ var InitCommand = class extends import_clipanion4.Command {
557
539
  encoding: "utf-8"
558
540
  }
559
541
  );
560
- const isPnP = import_fs4.default.existsSync(import_path5.default.join(cwd, ".pnp.cjs"));
561
- if (isPnP) {
562
- const yarnrcPath = import_path5.default.join(cwd, ".yarnrc.yml");
563
- let yarnrc = {};
564
- try {
565
- const yarnrcContent = await import_fs4.default.promises.readFile(yarnrcPath, { encoding: "utf-8" });
566
- yarnrc = import_yaml.default.parse(yarnrcContent);
567
- } catch {
568
- p2.log.info(".yarnrc.yml \uD30C\uC77C\uC774 \uC5C6\uC5B4 \uC0C8\uB85C \uC0DD\uC131\uD569\uB2C8\uB2E4.");
569
- }
570
- p2.log.step(".yarnrc.yml \uD30C\uC77C\uC744 \uC5C5\uB370\uC774\uD2B8\uD558\uB294 \uC911...");
571
- yarnrc.packageExtensions = (0, import_es_toolkit.merge)(yarnrc.packageExtensions, {
572
- "@react-native-community/cli-debugger-ui@*": {
573
- dependencies: {
574
- "@babel/runtime": "^7"
575
- }
576
- },
577
- "react-native-video@*": {
578
- peerDependencies: {
579
- react: "*",
580
- "react-native": "*"
581
- }
582
- },
583
- "react-native-fast-image@*": {
584
- dependencies: {
585
- "@babel/runtime": "^7"
586
- }
587
- }
588
- });
589
- await import_fs4.default.promises.writeFile(yarnrcPath, import_yaml.default.stringify(yarnrc), { encoding: "utf-8" });
590
- await (0, import_execa3.execa)("yarn", ["install"], {
591
- cwd,
592
- stdio: "inherit"
593
- });
594
- }
595
542
  p2.outro("\u2728 \uCD08\uAE30\uD654\uAC00 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4!");
596
543
  }
597
544
  };
598
545
 
599
546
  // package.json
600
- var version = "0.0.0-dev.1739415803173";
547
+ var version = "0.1.6-next.6";
601
548
 
602
549
  // src/cli.ts
603
550
  var cli = new import_clipanion5.Cli({
package/dist/cli.js CHANGED
@@ -54,7 +54,7 @@ async function build({ distDirname, cache }) {
54
54
  const config = await loadConfig();
55
55
  const rootDir = process.cwd();
56
56
  const reactNativeProjectDir = path.resolve(__dirname, "..", "react-native");
57
- const projectRootTmp = path.resolve(process.cwd(), ".bedrock");
57
+ const projectRootTmp = path.resolve(process.cwd(), ".apps-in-toss");
58
58
  await fs.promises.mkdir(projectRootTmp, { recursive: true });
59
59
  await fs.promises.writeFile(
60
60
  path.join(projectRootTmp, "metadata.json"),
@@ -104,7 +104,7 @@ async function build({ distDirname, cache }) {
104
104
  plugins: [
105
105
  [
106
106
  __require.resolve("@apps-in-toss/babel-plugin-json"),
107
- { jsonPath: "./.bedrock/metadata.json", identifierName: "Ait" }
107
+ { jsonPath: "./.apps-in-toss/metadata.json", identifierName: "Ait" }
108
108
  ]
109
109
  ]
110
110
  },
@@ -122,7 +122,7 @@ async function build({ distDirname, cache }) {
122
122
  plugins: [
123
123
  [
124
124
  __require.resolve("@apps-in-toss/babel-plugin-json"),
125
- { jsonPath: "./.bedrock/metadata.json", identifierName: "Ait" }
125
+ { jsonPath: "./.apps-in-toss/metadata.json", identifierName: "Ait" }
126
126
  ]
127
127
  ]
128
128
  },
@@ -306,7 +306,7 @@ var DeployCommand = class extends Command2 {
306
306
  }
307
307
  ]);
308
308
  if (deploymentId) {
309
- p.note(picocolors2.underline(picocolors2.green(`intoss-sandbox://${appIdentifier}?_deploymentId=${deploymentId}`)));
309
+ p.note(`Deployment ID: ${picocolors2.underline(picocolors2.green(deploymentId))}`);
310
310
  }
311
311
  } catch (error) {
312
312
  if (error instanceof Error) {
@@ -342,7 +342,7 @@ var DevCommand = class extends Command3 {
342
342
  port: this.port ? parseInt(this.port, 10) : void 0
343
343
  };
344
344
  const cwd = path3.resolve(__dirname, "..", "react-native");
345
- const projectRootTmp = path3.resolve(process.cwd(), ".bedrock");
345
+ const projectRootTmp = path3.resolve(process.cwd(), ".apps-in-toss");
346
346
  await fs3.promises.mkdir(projectRootTmp, { recursive: true });
347
347
  await fs3.promises.writeFile(
348
348
  path3.join(projectRootTmp, "metadata.json"),
@@ -386,13 +386,11 @@ var DevCommand = class extends Command3 {
386
386
  };
387
387
 
388
388
  // src/InitCommand/InitCommand.ts
389
- import fs5 from "fs";
390
- import path5 from "path";
389
+ import fs4 from "fs";
390
+ import path4 from "path";
391
391
  import * as p2 from "@clack/prompts";
392
392
  import { Command as Command4 } from "clipanion";
393
- import { kebabCase, merge } from "es-toolkit";
394
- import { execa as execa3 } from "execa";
395
- import yaml from "yaml";
393
+ import { kebabCase } from "es-toolkit";
396
394
 
397
395
  // src/InitCommand/templates/index.tsx
398
396
  var CONFIG_TEMPLATE = `import { defineConfig } from '@apps-in-toss/web-framework';
@@ -409,21 +407,6 @@ export default defineConfig({
409
407
  });
410
408
  `;
411
409
 
412
- // src/utils/getPackageRoot.ts
413
- import fs4 from "fs";
414
- import path4 from "path";
415
- function getPackageRoot() {
416
- let cwd = process.cwd();
417
- const root = path4.parse(cwd).root;
418
- while (cwd !== root) {
419
- if (fs4.existsSync(path4.join(cwd, "package.json"))) {
420
- return cwd;
421
- }
422
- cwd = path4.dirname(cwd);
423
- }
424
- return cwd;
425
- }
426
-
427
410
  // src/utils/transformTemplate.ts
428
411
  function transformTemplate(templateString, values) {
429
412
  let result = templateString;
@@ -438,7 +421,6 @@ function transformTemplate(templateString, values) {
438
421
  var InitCommand = class extends Command4 {
439
422
  static paths = [[`init`]];
440
423
  async execute() {
441
- const cwd = getPackageRoot();
442
424
  p2.intro("\u{1F680} \uC571 \uCD08\uAE30\uD654\uB97C \uC2DC\uC791\uD569\uB2C8\uB2E4");
443
425
  const appName = await p2.text({
444
426
  message: "Enter app name",
@@ -468,7 +450,7 @@ var InitCommand = class extends Command4 {
468
450
  return;
469
451
  }
470
452
  p2.log.step("package.json \uC2A4\uD06C\uB9BD\uD2B8\uB97C \uC124\uC815\uD558\uB294 \uC911...");
471
- const packageJson = await fs5.promises.readFile(path5.join(cwd, "package.json"), {
453
+ const packageJson = await fs4.promises.readFile(path4.join(process.cwd(), "package.json"), {
472
454
  encoding: "utf-8"
473
455
  });
474
456
  const scripts = JSON.parse(packageJson);
@@ -479,7 +461,7 @@ var InitCommand = class extends Command4 {
479
461
  scripts.scripts.dev = "ait dev";
480
462
  scripts.scripts.build = "ait build";
481
463
  scripts.scripts.deploy = "ait deploy";
482
- await fs5.promises.writeFile(path5.join(cwd, "package.json"), JSON.stringify(scripts, null, 2), {
464
+ await fs4.promises.writeFile(path4.join(process.cwd(), "package.json"), JSON.stringify(scripts, null, 2), {
483
465
  encoding: "utf-8"
484
466
  });
485
467
  p2.log.step("apps-in-toss.config.web.ts \uD30C\uC77C\uC744 \uC0DD\uC131\uD558\uB294 \uC911...");
@@ -489,14 +471,14 @@ var InitCommand = class extends Command4 {
489
471
  webDevCommand: original.dev === "ait dev" ? "" : original.dev,
490
472
  webBuildCommand: original.build === "ait build" ? "" : original.build
491
473
  });
492
- await fs5.promises.writeFile(path5.join(cwd, "apps-in-toss.config.web.ts"), config, {
474
+ await fs4.promises.writeFile(path4.join(process.cwd(), "apps-in-toss.config.web.ts"), config, {
493
475
  encoding: "utf-8"
494
476
  });
495
477
  p2.log.step(".gitignore \uD30C\uC77C\uC744 \uC5C5\uB370\uC774\uD2B8\uD558\uB294 \uC911...");
496
- await fs5.promises.appendFile(path5.join(cwd, ".gitignore"), "\n.bedrock\n");
478
+ await fs4.promises.appendFile(path4.join(process.cwd(), ".gitignore"), "\n.apps-in-toss\n");
497
479
  p2.log.step("app.json \uD30C\uC77C\uC744 \uC0DD\uC131\uD558\uB294 \uC911...");
498
- await fs5.promises.writeFile(
499
- path5.join(cwd, "app.json"),
480
+ await fs4.promises.writeFile(
481
+ path4.join(process.cwd(), "app.json"),
500
482
  JSON.stringify({
501
483
  clientId: "",
502
484
  appName,
@@ -506,47 +488,12 @@ var InitCommand = class extends Command4 {
506
488
  encoding: "utf-8"
507
489
  }
508
490
  );
509
- const isPnP = fs5.existsSync(path5.join(cwd, ".pnp.cjs"));
510
- if (isPnP) {
511
- const yarnrcPath = path5.join(cwd, ".yarnrc.yml");
512
- let yarnrc = {};
513
- try {
514
- const yarnrcContent = await fs5.promises.readFile(yarnrcPath, { encoding: "utf-8" });
515
- yarnrc = yaml.parse(yarnrcContent);
516
- } catch {
517
- p2.log.info(".yarnrc.yml \uD30C\uC77C\uC774 \uC5C6\uC5B4 \uC0C8\uB85C \uC0DD\uC131\uD569\uB2C8\uB2E4.");
518
- }
519
- p2.log.step(".yarnrc.yml \uD30C\uC77C\uC744 \uC5C5\uB370\uC774\uD2B8\uD558\uB294 \uC911...");
520
- yarnrc.packageExtensions = merge(yarnrc.packageExtensions, {
521
- "@react-native-community/cli-debugger-ui@*": {
522
- dependencies: {
523
- "@babel/runtime": "^7"
524
- }
525
- },
526
- "react-native-video@*": {
527
- peerDependencies: {
528
- react: "*",
529
- "react-native": "*"
530
- }
531
- },
532
- "react-native-fast-image@*": {
533
- dependencies: {
534
- "@babel/runtime": "^7"
535
- }
536
- }
537
- });
538
- await fs5.promises.writeFile(yarnrcPath, yaml.stringify(yarnrc), { encoding: "utf-8" });
539
- await execa3("yarn", ["install"], {
540
- cwd,
541
- stdio: "inherit"
542
- });
543
- }
544
491
  p2.outro("\u2728 \uCD08\uAE30\uD654\uAC00 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4!");
545
492
  }
546
493
  };
547
494
 
548
495
  // package.json
549
- var version = "0.0.0-dev.1739415803173";
496
+ var version = "0.1.6-next.6";
550
497
 
551
498
  // src/cli.ts
552
499
  var cli = new Cli({
@@ -0,0 +1 @@
1
+ export {};