@webspatial/builder 0.1.15 → 0.1.17

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/README.md CHANGED
@@ -1,80 +1,20 @@
1
- # **WebSpatial Builder documentation**
1
+ <div align="left">
2
+ <img src="../../docs/assets/logo.png" alt="WebSpatial Logo" width="400"/>
3
+ </div>
4
+ <br/>
2
5
 
3
- # **Introduction**
6
+ # WebSpatial Builder
4
7
 
5
- WebSpatial Builder is a client-side CLI tool used to generate cross platform XRApp projects.
6
- Currently supporting the generation of XRApp for Apple Vision Pro.
8
+ The build tool transforms websites into Packaged WebSpatial Apps for debugging and distributing on spatial computing platforms.
7
9
 
8
- # **How to use**
9
- Ensure that you have installed Xcode and Apple Vision Pro simulator.
10
- If you wish to package an IPA file or publish it to App Store Connect, you need to register an Apple developer account in advance and confirm that you have upload permissions.
11
- ## **Install**
12
- `pnpm i @webspatial/builder`
10
+ ## Documentation
13
11
 
14
- ## **Usage**
15
- 1. Build and run local WebSpatial project on Apple Vision Pro simulator.
12
+ For WebSpatial Builder:
13
+ - [Add Build Tool for Packaged WebSpatial Apps](../../docs/en/development-guide/enabling-webspatial-in-web-projects/step-2-add-build-tool-for-packaged-webspatial-apps.md)
16
14
 
17
- `webspatial-builder run --manifest=public/manifest.json --project=dist --base=dist/webspatial/avp --platform=visionos --bundle-id=com.webspatial.test`
18
-
19
- - Default parameters
20
- - --manifest=public/manifest.json or --manifest=manifest.webmanifest
21
- - --project=dist
22
- - --platform=visionos
23
- - --bundle-id=com.webspatial.test
24
- - --base=/
25
- - If you don't have a manifest file, CLI will use the default configuration
26
- ```json
27
- {
28
- name: 'WebSpatialTest',
29
- display: 'minimal-ui',
30
- start_url: '/',
31
- scope: '/',
32
- }
33
- ```
34
-
35
- - The --base is the root path to the project. It will be combined with start_url in the manifest.json file to generate the final URL.
36
- ```
37
- Example 1:
38
- start_url:./a/index.html
39
- --base:dist/webspatial/avp
40
- final url:dist/webspatial/avp/a/index.html
41
-
42
- Example 2:
43
- start_url:https://www.domain1.com/a/index.html
44
- --base:http://localhost:5173
45
- final url:http://localhost:5173/a/index.html
46
-
47
- Example 3:
48
- start_url:https://www.domain1.com/a/index.html
49
- --base:dist/webspatial/avp
50
- final url:dist/webspatial/avp/index.html
51
- ```
52
- - The --bundle-id is the bundle identifier of the app.
53
- **For example:**
54
-
55
- 2. Package an IPA file.
56
-
57
- `webspatial-builder build --manifest=manifest.json --project=dist --base=dist/webspatial/avp --platform=visionos --teamId=yourTeamId --bundle-id=com.webspatial.test`
58
-
59
- - Necessary parameters
60
- - --base
61
- - --teamId
62
-
63
-
64
- 3. Publish to App Store Connect.
65
- `webspatial-builder publish --manifest=manifest.json --project=dist --base=dist/webspatial/avp --platform=visionos --teamId=yourTeamId --version=projectVersion --u=yourAppleId --p=yourAppSpecificCode --bundle-id=com.webspatial.test`
66
-
67
- - Necessary parameters
68
- - --base
69
- - --teamId
70
- - --version
71
- - --u
72
- - --p
73
-
74
- 4. Launch the app in the simulator without building.
75
- >When the simulator is shut down, cli will automatically launch the simulator.
76
-
77
- `webspatial-builder launch [--bundle-id=]`
78
-
79
- 5. Shutdown the simulator.
80
- `webspatial-builder shutdown`
15
+ For WebSpatial:
16
+ - [Table of Contents](../../docs/en/README.md)
17
+ - [Introduction](../../docs/en/introduction/README.md)
18
+ - [Quick Start](../../docs/en/quick-start/README.md)
19
+ - [Core Concepts](../../docs/en/core-concepts/README.md)
20
+ - [Development Guide](../../docs/en/development-guide/README.md)
package/dist/index.js CHANGED
@@ -1 +1,99 @@
1
- 'use strict';const _0x5ae9b3=_0x2625;(function(_0x53317a,_0x17ad3f){const _0x108aa2=_0x2625,_0x29d444=_0x53317a();while(!![]){try{const _0x143543=-parseInt(_0x108aa2(0x15a))/0x1+-parseInt(_0x108aa2(0x13f))/0x2*(parseInt(_0x108aa2(0x15f))/0x3)+parseInt(_0x108aa2(0x159))/0x4*(-parseInt(_0x108aa2(0x174))/0x5)+-parseInt(_0x108aa2(0x175))/0x6+parseInt(_0x108aa2(0x16a))/0x7+-parseInt(_0x108aa2(0x140))/0x8*(-parseInt(_0x108aa2(0x148))/0x9)+parseInt(_0x108aa2(0x131))/0xa;if(_0x143543===_0x17ad3f)break;else _0x29d444['push'](_0x29d444['shift']());}catch(_0x431eda){_0x29d444['push'](_0x29d444['shift']());}}}(_0x335b,0xdfb62));function _0x2625(_0x1d8cd9,_0x4c863b){const _0x335ba3=_0x335b();return _0x2625=function(_0x26253e,_0xe58b99){_0x26253e=_0x26253e-0x12f;let _0x1a27f6=_0x335ba3[_0x26253e];return _0x1a27f6;},_0x2625(_0x1d8cd9,_0x4c863b);}function _0x335b(){const _0x4940cb=['manifest\x20path','configureHelp','build','__esModule','By\x20compiling\x20or\x20running\x20directly\x20on\x20the\x20simulator\x20the\x20WebSpatial\x20App','command','requiredOption','--manifest\x20<manifest>','Publish\x20WebSpatial\x20App','username','4211992NIZFDM','379904XQEeDq','name','store','setDecompressResponseBuffer','./lib/cmds/version','152049TKWyPq','defineProperty','Shutdown\x20Simulator','export\x20path','downloadFile','fetch','Command','manifest\x20url','app\x20version','bundle\x20id','./lib/cmds/build','5010936EwVPWB','--manifest-url\x20<manifestUrl>','option','./lib/cmds/shutdown','log','--base\x20<base>','-v,\x20--version','action','major','run','5bnUNuh','9072900LmBmzp','--tryWithoutBuild\x20<tryWithoutBuild>','run\x20without\x20build','--manifest-url\x20<manifest-url>','./lib/cmds/launch','setFetch','exports','--export\x20<export>','19087840mXSqcv','xr\x20platform','publish','team\x20id','decompressResponseBuffer','webspatial-builder','parseAsync','app\x20build\x20type','--u\x20<username>','launch','--teamId\x20<teamId>','./lib/utils/fetch','shutdown','base\x20path','12hozVSf','32jtiHjl','password','argv','--bundle-id\x20<bundleId>','setDownloadFile','--version\x20<version>','project\x20path','--platform\x20<platform>','3466890VZtSBD','description','--buildType\x20<buildType>','fetchUtils','node','Current\x20Node.js\x20version\x20is\x20','getVersion'];_0x335b=function(){return _0x4940cb;};return _0x335b();}Object[_0x5ae9b3(0x160)](exports,_0x5ae9b3(0x152),{'value':!![]});const commander_1=require('commander'),semver_1=require('semver'),FetchUtils_1_1=require('./lib/utils/FetchUtils-1'),build_1=require(_0x5ae9b3(0x169)),version_1=require(_0x5ae9b3(0x15e)),fetch_1=require(_0x5ae9b3(0x13c)),launch_1=require(_0x5ae9b3(0x179)),shutdown_1=require(_0x5ae9b3(0x16d));module[_0x5ae9b3(0x12f)]=async()=>{const _0x454c1e=_0x5ae9b3;if((0x0,semver_1[_0x454c1e(0x172)])(process['versions'][_0x454c1e(0x14c)])<0xe)throw new Error(_0x454c1e(0x14d)+process['versions'][_0x454c1e(0x14c)]+'.'+'\x20Node.js\x20version\x2014\x20or\x20above\x20is\x20required\x20to\x20run\x20XRAPP\x20BUILDER.');const _0x18d874=new commander_1[(_0x454c1e(0x165))]();FetchUtils_1_1[_0x454c1e(0x14b)][_0x454c1e(0x17a)](fetch_1[_0x454c1e(0x164)]),FetchUtils_1_1[_0x454c1e(0x14b)][_0x454c1e(0x144)](fetch_1[_0x454c1e(0x163)]),FetchUtils_1_1[_0x454c1e(0x14b)][_0x454c1e(0x15d)](fetch_1[_0x454c1e(0x135)]),await setupCommands(_0x18d874),await _0x18d874[_0x454c1e(0x137)](process[_0x454c1e(0x142)]);};async function setupCommands(_0x2dc774){const _0x2c67f6=_0x5ae9b3,_0x2343f3=await(0x0,version_1[_0x2c67f6(0x14e)])();_0x2dc774[_0x2c67f6(0x15b)](_0x2c67f6(0x136))[_0x2c67f6(0x149)]('WebSpatial\x20Builder\x20is\x20a\x20client-side\x20CLI\x20tool\x20used\x20to\x20generate\x20cross\x20platform\x20XRApp\x20projects.')['version'](_0x2343f3,_0x2c67f6(0x170))[_0x2c67f6(0x150)]({'showGlobalOptions':!![]}),_0x2dc774[_0x2c67f6(0x154)](_0x2c67f6(0x173))[_0x2c67f6(0x149)](_0x2c67f6(0x153))[_0x2c67f6(0x16c)](_0x2c67f6(0x156),'manifest\x20path')[_0x2c67f6(0x16c)]('--project\x20<project>',_0x2c67f6(0x146))[_0x2c67f6(0x16c)](_0x2c67f6(0x16b),_0x2c67f6(0x166))[_0x2c67f6(0x16c)](_0x2c67f6(0x147),_0x2c67f6(0x132))[_0x2c67f6(0x16c)](_0x2c67f6(0x16f),_0x2c67f6(0x13e))[_0x2c67f6(0x16c)](_0x2c67f6(0x143),_0x2c67f6(0x168))[_0x2c67f6(0x16c)](_0x2c67f6(0x176),_0x2c67f6(0x177))['action'](async _0x1e054e=>{await(0x0,build_1['run'])(_0x1e054e);}),_0x2dc774[_0x2c67f6(0x154)](_0x2c67f6(0x151))['description']('Build\x20WebSpatial\x20App')[_0x2c67f6(0x16c)]('--manifest\x20<manifest>',_0x2c67f6(0x14f))['option']('--project\x20<project>',_0x2c67f6(0x146))[_0x2c67f6(0x16c)](_0x2c67f6(0x178),_0x2c67f6(0x166))['option']('--platform\x20<platform>',_0x2c67f6(0x132))[_0x2c67f6(0x16c)]('--version\x20<version>',_0x2c67f6(0x167))[_0x2c67f6(0x16c)](_0x2c67f6(0x14a),_0x2c67f6(0x138))['option'](_0x2c67f6(0x130),_0x2c67f6(0x162))['option'](_0x2c67f6(0x143),_0x2c67f6(0x168))[_0x2c67f6(0x155)]('--base\x20<base>',_0x2c67f6(0x13e))['requiredOption'](_0x2c67f6(0x13b),'team\x20id')[_0x2c67f6(0x171)](async _0x51413a=>{const _0x3bfac9=_0x2c67f6;console[_0x3bfac9(0x16e)](_0x51413a),await(0x0,build_1['build'])(_0x51413a);}),_0x2dc774['command'](_0x2c67f6(0x133))[_0x2c67f6(0x149)](_0x2c67f6(0x157))[_0x2c67f6(0x16c)](_0x2c67f6(0x156),_0x2c67f6(0x14f))['option']('--project\x20<project>',_0x2c67f6(0x146))[_0x2c67f6(0x16c)](_0x2c67f6(0x16b),_0x2c67f6(0x166))['option'](_0x2c67f6(0x147),_0x2c67f6(0x132))['option'](_0x2c67f6(0x14a),_0x2c67f6(0x138))[_0x2c67f6(0x16c)](_0x2c67f6(0x130),_0x2c67f6(0x162))[_0x2c67f6(0x16c)](_0x2c67f6(0x143),_0x2c67f6(0x168))[_0x2c67f6(0x155)](_0x2c67f6(0x16f),_0x2c67f6(0x13e))[_0x2c67f6(0x155)](_0x2c67f6(0x13b),_0x2c67f6(0x134))[_0x2c67f6(0x155)](_0x2c67f6(0x145),'app\x20version')['requiredOption'](_0x2c67f6(0x139),_0x2c67f6(0x158))[_0x2c67f6(0x155)]('--p\x20<password>',_0x2c67f6(0x141))[_0x2c67f6(0x171)](async _0x21b237=>{const _0x4d8466=_0x2c67f6;console[_0x4d8466(0x16e)](_0x21b237),await(0x0,build_1[_0x4d8466(0x15c)])(_0x21b237);}),_0x2dc774[_0x2c67f6(0x154)](_0x2c67f6(0x13a))[_0x2c67f6(0x149)]('Launch\x20WebSpatial\x20App')['option'](_0x2c67f6(0x143),_0x2c67f6(0x168))[_0x2c67f6(0x171)](async _0x453484=>{console['log'](_0x453484),await(0x0,launch_1['launch'])(_0x453484);}),_0x2dc774[_0x2c67f6(0x154)](_0x2c67f6(0x13d))[_0x2c67f6(0x149)](_0x2c67f6(0x161))[_0x2c67f6(0x171)](async _0x24bbf6=>{const _0x104c48=_0x2c67f6;console[_0x104c48(0x16e)](_0x24bbf6),await(0x0,shutdown_1['shutdown'])(_0x24bbf6);});}
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const commander_1 = require("commander");
4
+ const semver_1 = require("semver");
5
+ const FetchUtils_1_1 = require("./lib/utils/FetchUtils-1");
6
+ const build_1 = require("./lib/cmds/build");
7
+ const version_1 = require("./lib/cmds/version");
8
+ const fetch_1 = require("./lib/utils/fetch");
9
+ const launch_1 = require("./lib/cmds/launch");
10
+ const shutdown_1 = require("./lib/cmds/shutdown");
11
+ module.exports = async () => {
12
+ if ((0, semver_1.major)(process.versions.node) < 14) {
13
+ throw new Error(`Current Node.js version is ${process.versions.node}.` +
14
+ ' Node.js version 14 or above is required to run XRAPP BUILDER.');
15
+ }
16
+ const program = new commander_1.Command();
17
+ FetchUtils_1_1.fetchUtils.setFetch(fetch_1.fetch);
18
+ FetchUtils_1_1.fetchUtils.setDownloadFile(fetch_1.downloadFile);
19
+ FetchUtils_1_1.fetchUtils.setDecompressResponseBuffer(fetch_1.decompressResponseBuffer);
20
+ await setupCommands(program);
21
+ await program.parseAsync(process.argv);
22
+ };
23
+ async function setupCommands(program) {
24
+ const v = await (0, version_1.getVersion)();
25
+ program
26
+ .name('webspatial-builder')
27
+ .description('WebSpatial Builder is a client-side CLI tool used to generate cross platform XRApp projects.')
28
+ .version(v, '-v, --version')
29
+ .configureHelp({ showGlobalOptions: true });
30
+ // run command
31
+ program
32
+ .command('run')
33
+ .description('By compiling or running directly on the simulator the WebSpatial App')
34
+ .option('--manifest <manifest>', 'manifest path')
35
+ .option('--project <project>', 'project path')
36
+ .option('--manifest-url <manifestUrl>', 'manifest url')
37
+ .option('--platform <platform>', 'xr platform')
38
+ .option('--base <base>', 'base path')
39
+ .option('--bundle-id <bundleId>', 'bundle id')
40
+ .option('--tryWithoutBuild <tryWithoutBuild>', 'run without build')
41
+ .action(async (options) => {
42
+ await (0, build_1.run)(options);
43
+ });
44
+ // build command
45
+ program
46
+ .command('build')
47
+ .description('Build WebSpatial App')
48
+ .option('--manifest <manifest>', 'manifest path')
49
+ .option('--project <project>', 'project path')
50
+ .option('--manifest-url <manifest-url>', 'manifest url')
51
+ .option('--platform <platform>', 'xr platform')
52
+ .option('--version <version>', 'app version')
53
+ .option('--buildType <buildType>', 'app build type')
54
+ .option('--export <export>', 'export path')
55
+ .option('--bundle-id <bundleId>', 'bundle id')
56
+ .requiredOption('--base <base>', 'base path')
57
+ .requiredOption('--teamId <teamId>', 'team id')
58
+ .action(async (options) => {
59
+ console.log(options);
60
+ await (0, build_1.build)(options);
61
+ });
62
+ // store command
63
+ program
64
+ .command('publish')
65
+ .description('Publish WebSpatial App')
66
+ .option('--manifest <manifest>', 'manifest path')
67
+ .option('--project <project>', 'project path')
68
+ .option('--manifest-url <manifestUrl>', 'manifest url')
69
+ .option('--platform <platform>', 'xr platform')
70
+ .option('--buildType <buildType>', 'app build type')
71
+ .option('--export <export>', 'export path')
72
+ .option('--bundle-id <bundleId>', 'bundle id')
73
+ .requiredOption('--base <base>', 'base path')
74
+ .requiredOption('--teamId <teamId>', 'team id')
75
+ .requiredOption('--version <version>', 'app version')
76
+ .requiredOption('--u <username>', 'username')
77
+ .requiredOption('--p <password>', 'password')
78
+ .action(async (options) => {
79
+ console.log(options);
80
+ await (0, build_1.store)(options);
81
+ });
82
+ // launch command
83
+ program
84
+ .command('launch')
85
+ .description('Launch WebSpatial App')
86
+ .option('--bundle-id <bundleId>', 'bundle id')
87
+ .action(async (options) => {
88
+ console.log(options);
89
+ await (0, launch_1.launch)(options);
90
+ });
91
+ // shutdown command
92
+ program
93
+ .command('shutdown')
94
+ .description('Shutdown Simulator')
95
+ .action(async (options) => {
96
+ console.log(options);
97
+ await (0, shutdown_1.shutdown)(options);
98
+ });
99
+ }
@@ -1 +1,116 @@
1
- 'use strict';const _0x10fb9d=_0x17d5;(function(_0x37336b,_0x3f2ea4){const _0x2930c7=_0x17d5,_0x393f34=_0x37336b();while(!![]){try{const _0x4670fd=-parseInt(_0x2930c7(0x1fc))/0x1+parseInt(_0x2930c7(0x1fd))/0x2+parseInt(_0x2930c7(0x200))/0x3+-parseInt(_0x2930c7(0x210))/0x4+parseInt(_0x2930c7(0x20f))/0x5*(parseInt(_0x2930c7(0x20a))/0x6)+parseInt(_0x2930c7(0x20c))/0x7+parseInt(_0x2930c7(0x216))/0x8*(-parseInt(_0x2930c7(0x217))/0x9);if(_0x4670fd===_0x3f2ea4)break;else _0x393f34['push'](_0x393f34['shift']());}catch(_0x33c1de){_0x393f34['push'](_0x393f34['shift']());}}}(_0x38f7,0x9a77d));Object['defineProperty'](exports,_0x10fb9d(0x207),{'value':!![]}),exports[_0x10fb9d(0x1f7)]=build,exports['store']=store,exports[_0x10fb9d(0x20b)]=run;const pwa_1=require(_0x10fb9d(0x1f3)),resource_1=require(_0x10fb9d(0x219)),xcode_1=require(_0x10fb9d(0x1ff)),check_1=require(_0x10fb9d(0x21c)),history_1=require(_0x10fb9d(0x215));async function build(_0x4ac952){const _0xc59367=_0x10fb9d;var _0x34acd2;console[_0xc59367(0x21a)](_0xc59367(0x21b)),resource_1[_0xc59367(0x208)]['checkPlatformPath'](_0x4ac952[_0xc59367(0x1f8)]);const _0x4d50e7=await doPwa(_0x4ac952),_0x4dd485=await doReadyProject((_0x34acd2=_0x4ac952['project'])!==null&&_0x34acd2!==void 0x0?_0x34acd2:_0xc59367(0x1f5),_0x4d50e7);return await doXcode(_0x4ac952,_0x4dd485,_0x4d50e7),console[_0xc59367(0x21a)](_0xc59367(0x1fa)),await xcode_1[_0xc59367(0x206)][_0xc59367(0x1f7)](_0x4ac952['export']),_0x4d50e7;}async function store(_0x42a34b){const _0x8a0148=_0x10fb9d;resource_1['ResourceManager'][_0x8a0148(0x20e)](_0x42a34b['platform']),(0x0,check_1[_0x8a0148(0x212)])(_0x42a34b);let _0x4fff94={'name':_0x8a0148(0x1f4)};_0x42a34b['buildType']=_0x8a0148(0x203);if(_0x42a34b['name'])_0x4fff94[_0x8a0148(0x1f2)]=_0x42a34b[_0x8a0148(0x1f2)];else{const _0xb666df=await build(_0x42a34b);_0x4fff94[_0x8a0148(0x1f2)]=_0xb666df[_0x8a0148(0x211)][_0x8a0148(0x1f2)];}await xcode_1[_0x8a0148(0x206)][_0x8a0148(0x1fb)](_0x42a34b,_0x4fff94);}async function run(_0x793ffa){const _0x556d05=_0x10fb9d;var _0x29691a;const _0x19c40b=JSON[_0x556d05(0x1f9)](_0x793ffa);history_1[_0x556d05(0x213)]['init'](_0x19c40b),console[_0x556d05(0x21a)]('-------------------\x20parse\x20start\x20-------------------'),resource_1[_0x556d05(0x208)][_0x556d05(0x20e)](_0x793ffa['platform']);const _0x40ea72=await doPwa(_0x793ffa,!![]);history_1['default'][_0x556d05(0x1ef)](_0x40ea72[_0x556d05(0x211)]);if(_0x40ea72[_0x556d05(0x1f0)]||_0x793ffa[_0x556d05(0x204)]===_0x556d05(0x209)){if(history_1[_0x556d05(0x213)][_0x556d05(0x1f1)](_0x40ea72[_0x556d05(0x211)])){console[_0x556d05(0x21a)]('Same\x20as\x20the\x20previous\x20record'),await xcode_1['XcodeManager'][_0x556d05(0x1f6)]();return;}}const _0x3f0a76=await doReadyProject((_0x29691a=_0x793ffa[_0x556d05(0x214)])!==null&&_0x29691a!==void 0x0?_0x29691a:_0x556d05(0x1f5),_0x40ea72);await doXcode(_0x793ffa,_0x3f0a76,_0x40ea72,!![]),console[_0x556d05(0x21a)](_0x556d05(0x1fa)),await xcode_1[_0x556d05(0x206)]['runWithSimulator']();}function _0x17d5(_0x38942d,_0x4bebff){const _0x38f735=_0x38f7();return _0x17d5=function(_0x17d5c4,_0x2d024d){_0x17d5c4=_0x17d5c4-0x1ef;let _0x4a32b9=_0x38f735[_0x17d5c4];return _0x4a32b9;},_0x17d5(_0x38942d,_0x4bebff);}async function doPwa(_0x4a02ff,_0x84cc8c=![]){const _0x5a37cf=_0x10fb9d;return(0x0,check_1[_0x5a37cf(0x1fe)])(_0x4a02ff,_0x84cc8c),await pwa_1[_0x5a37cf(0x218)]['generator'](_0x4a02ff,_0x84cc8c);}async function doReadyProject(_0x545dd0,_0x4ba58b){const _0x534d6c=_0x10fb9d;return!_0x4ba58b['fromNet']&&(await resource_1[_0x534d6c(0x208)][_0x534d6c(0x205)](_0x545dd0),console[_0x534d6c(0x21a)]('move\x20web\x20project:\x20ok')),await resource_1[_0x534d6c(0x208)]['generateIcon'](_0x4ba58b);}function _0x38f7(){const _0x1f65c5=['2136252gJPnge','run','4589823YdpGAq','version','checkPlatformPath','15AfYjnJ','3112592NWbeLr','json','checkStoreParams','default','project','../utils/history','2221256obUEEa','18ozMoIx','PWAGenerator','../resource','log','-------------------\x20parse\x20start\x20-------------------','./check','recordManifest','fromNet','checkManifest','name','../pwa','WebSpatialTest','dist','runWithHistory','build','platform','stringify','-------------------\x20parse\x20end\x20-------------------','upload','192006mYgZaT','384898msRonp','checkBuildParams','../xcode','725715IOSYNH','export','parseProject','app-store-connect','tryWithoutBuild','moveProjectFrom','XcodeManager','__esModule','ResourceManager','true'];_0x38f7=function(){return _0x1f65c5;};return _0x38f7();}async function doXcode(_0x529c3c,_0x406792,_0xca4ca6,_0x30c78d=![]){const _0x3473d0=_0x10fb9d;await xcode_1['XcodeManager'][_0x3473d0(0x202)]({'icon':_0x406792,'manifestInfo':_0xca4ca6,'teamId':_0x529c3c['teamId'],'version':_0x529c3c[_0x3473d0(0x20d)],'buildType':_0x529c3c['buildType'],'export':_0x529c3c[_0x3473d0(0x201)]},_0x30c78d);}
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.build = build;
4
+ exports.store = store;
5
+ exports.run = run;
6
+ const pwa_1 = require("../pwa");
7
+ const resource_1 = require("../resource");
8
+ const xcode_1 = require("../xcode");
9
+ const check_1 = require("./check");
10
+ const history_1 = require("../utils/history");
11
+ // build and export ipa
12
+ async function build(args) {
13
+ var _a;
14
+ console.log('------------------- parse start -------------------');
15
+ resource_1.ResourceManager.checkPlatformPath(args['platform']);
16
+ const manifestInfo = await doPwa(args);
17
+ const icon = await doReadyProject((_a = args['project']) !== null && _a !== void 0 ? _a : 'dist', manifestInfo);
18
+ await doXcode(args, icon, manifestInfo);
19
+ console.log('------------------- parse end -------------------');
20
+ await xcode_1.XcodeManager.build(args['export']);
21
+ return manifestInfo;
22
+ }
23
+ // build and upload ipa to App Store Connect
24
+ async function store(args) {
25
+ resource_1.ResourceManager.checkPlatformPath(args['platform']);
26
+ (0, check_1.checkStoreParams)(args);
27
+ /*
28
+ There are two ways to upload ipa to App Store Connect:
29
+ 1. Using parameters from the build command, then this command will first archive and export before uploading
30
+ 2. Use the name parameter to specify the IPA name, then this command will skip archiving and exporting, and directly find the specified IPA file in the export folder and execute the upload
31
+ */
32
+ let appInfo = { name: 'WebSpatialTest' };
33
+ args['buildType'] = 'app-store-connect';
34
+ if (args['name']) {
35
+ appInfo.name = args['name'];
36
+ }
37
+ else {
38
+ const manifestInfo = await build(args);
39
+ appInfo.name = manifestInfo.json.name;
40
+ }
41
+ await xcode_1.XcodeManager.upload(args, appInfo);
42
+ }
43
+ // build and run on simulator
44
+ async function run(args) {
45
+ var _a;
46
+ const runCmd = JSON.stringify(args);
47
+ history_1.default.init(runCmd);
48
+ console.log('------------------- parse start -------------------');
49
+ resource_1.ResourceManager.checkPlatformPath(args['platform']);
50
+ const manifestInfo = await doPwa(args, true);
51
+ history_1.default.recordManifest(manifestInfo.json);
52
+ /*
53
+ If it is an online project, there is no need to worry about project changes, just ensure that the parameters are consistent with the previous time and there is no need to compile again.
54
+ If it is a local project, there is a risk of project changes, so it needs to be compiled again.
55
+ If the --tryWithoutBuild=true parameter is used, it will be judged whether it is the same as the previous command.
56
+ If it is the same, it will be defaulted as already compiled, and the compilation will be skipped and the application will be launched directly.
57
+ */
58
+ if (manifestInfo.fromNet || args['tryWithoutBuild'] === 'true') {
59
+ // If this command is a new command, go through the build process; otherwise, go through the launch process
60
+ if (history_1.default.checkManifest(manifestInfo.json) &&
61
+ history_1.default.checkTestAppIsExist()) {
62
+ console.log('Same as the previous record');
63
+ await xcode_1.XcodeManager.runWithHistory();
64
+ return;
65
+ }
66
+ }
67
+ const icon = await doReadyProject((_a = args['project']) !== null && _a !== void 0 ? _a : 'dist', manifestInfo);
68
+ await doXcode(args, icon, manifestInfo, true);
69
+ console.log('------------------- parse end -------------------');
70
+ await xcode_1.XcodeManager.runWithSimulator();
71
+ }
72
+ /**
73
+ * PWA steps
74
+ * 1. Load manifestion.json
75
+ * 2. Check the integrity of manifestion.json parameters
76
+ * 3. Detecting start_url rule
77
+ * 4. Improve start_url, scope, display, and deeplink configurations
78
+ **/
79
+ async function doPwa(args, isDev = false) {
80
+ (0, check_1.checkBuildParams)(args, isDev);
81
+ return await pwa_1.PWAGenerator.generator(args, isDev);
82
+ }
83
+ /**
84
+ * *Resource steps
85
+ * 1. If it is a local project, then
86
+ * A. Check and create project directory
87
+ * B. Mobile Web Engineering
88
+ * 2. Generate icon icon
89
+ **/
90
+ async function doReadyProject(project, manifestInfo) {
91
+ if (!manifestInfo.fromNet) {
92
+ // If it is a local project, the project needs to be moved.
93
+ await resource_1.ResourceManager.moveProjectFrom(project);
94
+ console.log('move web project: ok');
95
+ }
96
+ return await resource_1.ResourceManager.generateIcon(manifestInfo);
97
+ }
98
+ /**
99
+ * Xcode steps
100
+ * 1. Parse the project
101
+ * 2. Configure teamId
102
+ * 3. Bind web project
103
+ * 4. Configure icon
104
+ * 5. Configure manifest
105
+ * 6. Write project
106
+ **/
107
+ async function doXcode(args, icon, manifestInfo, isDev = false) {
108
+ await xcode_1.XcodeManager.parseProject({
109
+ icon,
110
+ manifestInfo,
111
+ teamId: args['teamId'],
112
+ version: args['version'],
113
+ buildType: args['buildType'],
114
+ export: args['export'],
115
+ }, isDev);
116
+ }
@@ -1 +1,41 @@
1
- 'use strict';const _0x3fcb8c=_0x1b91;(function(_0xddda89,_0x2911e4){const _0x398225=_0x1b91,_0x14616f=_0xddda89();while(!![]){try{const _0x12a2b0=-parseInt(_0x398225(0x149))/0x1+parseInt(_0x398225(0x13f))/0x2*(parseInt(_0x398225(0x136))/0x3)+-parseInt(_0x398225(0x13e))/0x4*(-parseInt(_0x398225(0x12f))/0x5)+-parseInt(_0x398225(0x13b))/0x6+parseInt(_0x398225(0x134))/0x7+-parseInt(_0x398225(0x145))/0x8*(parseInt(_0x398225(0x138))/0x9)+-parseInt(_0x398225(0x147))/0xa*(-parseInt(_0x398225(0x140))/0xb);if(_0x12a2b0===_0x2911e4)break;else _0x14616f['push'](_0x14616f['shift']());}catch(_0x127022){_0x14616f['push'](_0x14616f['shift']());}}}(_0x2aa4,0x8609d));Object[_0x3fcb8c(0x146)](exports,_0x3fcb8c(0x13d),{'value':!![]}),exports['checkBuildParams']=checkBuildParams,exports[_0x3fcb8c(0x142)]=checkStoreParams;const validate_1=require(_0x3fcb8c(0x133));function _0x1b91(_0x2d9e36,_0x17f60f){const _0x2aa411=_0x2aa4();return _0x1b91=function(_0x1b91ca,_0x1a0ec5){_0x1b91ca=_0x1b91ca-0x12e;let _0x3c6ca9=_0x2aa411[_0x1b91ca];return _0x3c6ca9;},_0x1b91(_0x2d9e36,_0x17f60f);}function checkBuildParams(_0x1b4909,_0x128fb7=![]){const _0x16b114=_0x3fcb8c;if(_0x1b4909[_0x16b114(0x13a)]&&_0x1b4909[_0x16b114(0x141)])throw new Error(_0x16b114(0x13c));if(!_0x1b4909[_0x16b114(0x143)]&&!_0x128fb7)throw new Error(_0x16b114(0x132));if(_0x1b4909[_0x16b114(0x135)]){if((0x0,validate_1[_0x16b114(0x14a)])(_0x1b4909['base']))try{const _0x7296a5=new URL(_0x1b4909[_0x16b114(0x135)]);if(_0x7296a5[_0x16b114(0x144)]||_0x7296a5[_0x16b114(0x137)])throw new Error(_0x16b114(0x148));}catch(_0x4e912a){throw new Error('The\x20base\x20parameter\x20must\x20be\x20a\x20path\x20or\x20url\x20and\x20cannot\x20contain\x20parameters\x20or\x20suffixes.');}else{const _0x20c580=/(\?.*|\.\w+|#.*)$/,_0x2d870f=_0x1b4909[_0x16b114(0x135)][_0x16b114(0x130)]('/')['pop']()||'';if(_0x20c580['test'](_0x2d870f))throw new Error(_0x16b114(0x148));}}}function checkStoreParams(_0x43a901){const _0xabc42b=_0x3fcb8c;if(!(_0x43a901['u']&&_0x43a901['p']))throw new Error(_0xabc42b(0x12e));if(!_0x43a901[_0xabc42b(0x131)])throw new Error(_0xabc42b(0x139));}function _0x2aa4(){const _0x25eadf=['1671285JsPzaK','base','21FtwOFy','hash','495KFbHOI','version\x20is\x20required','manifest','6535788GCgkWa','--manifest\x20and\x20--manifest-url\x20cannot\x20be\x20used\x20at\x20the\x20same\x20time','__esModule','969692PDowCf','98792gAjKtB','237303snsiDl','manifest-url','checkStoreParams','teamId','search','158968ozfdyX','defineProperty','890gCiJoy','The\x20base\x20parameter\x20must\x20be\x20a\x20path\x20or\x20url\x20and\x20cannot\x20contain\x20parameters\x20or\x20suffixes.','258146SpWbRZ','validateURL','--u\x20and\x20--p\x20is\x20required','10NEpJAd','split','version','--teamId\x20is\x20required','../pwa/validate'];_0x2aa4=function(){return _0x25eadf;};return _0x2aa4();}
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkBuildParams = checkBuildParams;
4
+ exports.checkStoreParams = checkStoreParams;
5
+ const validate_1 = require("../pwa/validate");
6
+ function checkBuildParams(args, isDev = false) {
7
+ if (args['manifest'] && args['manifestUrl']) {
8
+ throw new Error('--manifest and --manifest-url cannot be used at the same time');
9
+ }
10
+ if (!args['teamId'] && !isDev) {
11
+ throw new Error('--teamId is required');
12
+ }
13
+ if (args['base']) {
14
+ if ((0, validate_1.validateURL)(args['base'])) {
15
+ try {
16
+ const baseUrl = new URL(args['base']);
17
+ if (baseUrl.search || baseUrl.hash) {
18
+ throw new Error('The base parameter must be a path or url and cannot contain parameters or suffixes.');
19
+ }
20
+ }
21
+ catch (e) {
22
+ throw new Error('The base parameter must be a path or url and cannot contain parameters or suffixes.');
23
+ }
24
+ }
25
+ else {
26
+ const pathRegex = /(\?.*|\.\w+|#.*)$/;
27
+ const pathPart = args['base'].split('/').pop() || '';
28
+ if (pathRegex.test(pathPart)) {
29
+ throw new Error('The base parameter must be a path or url and cannot contain parameters or suffixes.');
30
+ }
31
+ }
32
+ }
33
+ }
34
+ function checkStoreParams(args) {
35
+ if (!(args['u'] && args['p'])) {
36
+ throw new Error('--u and --p is required');
37
+ }
38
+ if (!args['version']) {
39
+ throw new Error('version is required');
40
+ }
41
+ }
@@ -1 +1,66 @@
1
- 'use strict';const _0x1a5403=_0x5d84;function _0x2a52(){const _0x210760=['webspatial\x20dev\x20--manifest=<local-manifest-path>\x20--project=<local-web-project-path>','get','80628yBGINZ','webspatial\x20build\x20--manifest=<local-manifest-path>\x20--project=<local-web-project-path>\x20--teamId=<teamId>\x20[--version=version]\x20[--buildType=release-testing]','help','133299ZUNzMK','../utils/Log','__esModule','562520mvIIzA','82046GPIpJf','6PyOiCw','main','322521AeWZtI','help\x20................\x20shows\x20this\x20menu','895993QEjTjm','publish','33220SQkrMH','Usage:','270aDatOo','join','webspatial\x20publish\x20--manifest-url=<net-manifest-url>\x20--teamId=<teamId>\x20--version=<version>\x20--u=<username>\x20--p=<password>','dev','build','build\x20................\x20initializes\x20a\x20new\x20WebSpatial\x20Project','150XnsACm','8HycPhj','3540JtEsvU','webspatial\x20publish\x20--name=<app-name>\x20--version=<version>\x20--u=<username>\x20--p=<password>','info','ConsoleLog','webspatial\x20publish\x20--manifest=<local-manifest-path>\x20--project=<local-web-project-path>\x20--teamId=<teamId>\x20--version=<version>\x20--u=<username>\x20--p=<password>','defineProperty'];_0x2a52=function(){return _0x210760;};return _0x2a52();}(function(_0x451022,_0x29c6bc){const _0xe8ab1f=_0x5d84,_0x2f67cd=_0x451022();while(!![]){try{const _0x4c8a44=-parseInt(_0xe8ab1f(0x108))/0x1+parseInt(_0xe8ab1f(0x109))/0x2*(-parseInt(_0xe8ab1f(0x10b))/0x3)+-parseInt(_0xe8ab1f(0x107))/0x4+-parseInt(_0xe8ab1f(0x117))/0x5*(-parseInt(_0xe8ab1f(0x121))/0x6)+parseInt(_0xe8ab1f(0x10d))/0x7*(-parseInt(_0xe8ab1f(0x118))/0x8)+-parseInt(_0xe8ab1f(0x104))/0x9*(parseInt(_0xe8ab1f(0x111))/0xa)+-parseInt(_0xe8ab1f(0x10f))/0xb*(-parseInt(_0xe8ab1f(0x119))/0xc);if(_0x4c8a44===_0x29c6bc)break;else _0x2f67cd['push'](_0x2f67cd['shift']());}catch(_0x5e0b26){_0x2f67cd['push'](_0x2f67cd['shift']());}}}(_0x2a52,0x35f13));function _0x5d84(_0x1e6edd,_0x187d7e){const _0x2a5288=_0x2a52();return _0x5d84=function(_0x5d846a,_0x2d862e){_0x5d846a=_0x5d846a-0x104;let _0x948243=_0x2a5288[_0x5d846a];return _0x948243;},_0x5d84(_0x1e6edd,_0x187d7e);}Object[_0x1a5403(0x11e)](exports,_0x1a5403(0x106),{'value':!![]}),exports[_0x1a5403(0x123)]=help;const Log_1=require(_0x1a5403(0x105)),HELP_MESSAGES=new Map([[_0x1a5403(0x10a),['webspatial\x20[command]\x20<options>','','',_0x1a5403(0x10c),_0x1a5403(0x116)+'\x20and\x20generates\x20an\x20Apple\x20Vision\x20Pro\x20App\x20from\x20a\x20WebSpatial\x20Project','run\x20................\x20build\x20and\x20run\x20WebSpatial\x20Project\x20on\x20Apple\x20Vision\x20Pro\x20simulator','publish..............\x20upload\x20WebSpatial\x20Project\x20to\x20App\x20Store\x20Connect'][_0x1a5403(0x112)]('\x0a')],[_0x1a5403(0x115),[_0x1a5403(0x110),'','',_0x1a5403(0x122),'','','webspatial\x20build\x20--manifest-url=<net-manifest-url>\x20--teamId=<teamId>\x20[--version=version]\x20[--buildType=release-testing]'][_0x1a5403(0x112)]('\x0a')],[_0x1a5403(0x114),['Usage:','','',_0x1a5403(0x11f),'','','webspatial\x20dev\x20--manifest-url=<net-manifest-url>'][_0x1a5403(0x112)]('\x0a')],[_0x1a5403(0x10e),[_0x1a5403(0x110),'','',_0x1a5403(0x11d),'','',_0x1a5403(0x113),'','',_0x1a5403(0x11a)][_0x1a5403(0x112)]('\x0a')]]);async function help(_0x2fbe13,_0x5f1f54=new Log_1[(_0x1a5403(0x11c))]('help')){const _0x5c95ec=_0x1a5403,_0x17eca7=_0x2fbe13['_'][0x1],_0x396ca5=HELP_MESSAGES[_0x5c95ec(0x120)](_0x17eca7)||HELP_MESSAGES['get'](_0x5c95ec(0x10a));return _0x5f1f54[_0x5c95ec(0x11b)](_0x396ca5),!![];}
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.help = help;
4
+ const Log_1 = require("../utils/Log");
5
+ const HELP_MESSAGES = new Map([
6
+ [
7
+ 'main',
8
+ [
9
+ 'webspatial [command] <options>',
10
+ '',
11
+ '',
12
+ 'help ................ shows this menu',
13
+ 'build ................ initializes a new WebSpatial Project' +
14
+ ' and generates an Apple Vision Pro App from a WebSpatial Project',
15
+ 'run ................ build and run WebSpatial Project on Apple Vision Pro simulator',
16
+ 'publish.............. upload WebSpatial Project to App Store Connect',
17
+ ].join('\n'),
18
+ ],
19
+ [
20
+ 'build',
21
+ [
22
+ 'Usage:',
23
+ '',
24
+ '',
25
+ 'webspatial build --manifest=<local-manifest-path> --project=<local-web-project-path> --teamId=<teamId> [--version=version] [--buildType=release-testing]',
26
+ '',
27
+ '',
28
+ 'webspatial build --manifest-url=<net-manifest-url> --teamId=<teamId> [--version=version] [--buildType=release-testing]',
29
+ ].join('\n'),
30
+ ],
31
+ [
32
+ 'dev',
33
+ [
34
+ 'Usage:',
35
+ '',
36
+ '',
37
+ 'webspatial dev --manifest=<local-manifest-path> --project=<local-web-project-path>',
38
+ '',
39
+ '',
40
+ 'webspatial dev --manifest-url=<net-manifest-url>',
41
+ ].join('\n'),
42
+ ],
43
+ [
44
+ 'publish',
45
+ [
46
+ 'Usage:',
47
+ '',
48
+ '',
49
+ 'webspatial publish --manifest=<local-manifest-path> --project=<local-web-project-path> --teamId=<teamId> --version=<version> --u=<username> --p=<password>',
50
+ '',
51
+ '',
52
+ 'webspatial publish --manifest-url=<net-manifest-url> --teamId=<teamId> --version=<version> --u=<username> --p=<password>',
53
+ '',
54
+ '',
55
+ 'webspatial publish --name=<app-name> --version=<version> --u=<username> --p=<password>',
56
+ ].join('\n'),
57
+ ],
58
+ ]);
59
+ async function help(args, log = new Log_1.ConsoleLog('help')) {
60
+ // minimist uses an `_` object to store details.
61
+ const command = args._[1];
62
+ const message = HELP_MESSAGES.get(command) || HELP_MESSAGES.get('main');
63
+ // We know we have a message for 'main', in case the command is invalid.
64
+ log.info(message);
65
+ return true;
66
+ }
@@ -1 +1,14 @@
1
- 'use strict';const _0x449074=_0x2236;(function(_0x4df0b4,_0x5b3849){const _0x16fe27=_0x2236,_0x5c3ee5=_0x4df0b4();while(!![]){try{const _0x391aee=parseInt(_0x16fe27(0x108))/0x1*(-parseInt(_0x16fe27(0x113))/0x2)+parseInt(_0x16fe27(0x110))/0x3*(parseInt(_0x16fe27(0x107))/0x4)+parseInt(_0x16fe27(0x109))/0x5+-parseInt(_0x16fe27(0x10c))/0x6*(-parseInt(_0x16fe27(0x10a))/0x7)+parseInt(_0x16fe27(0x10e))/0x8+parseInt(_0x16fe27(0x10b))/0x9+parseInt(_0x16fe27(0x10f))/0xa*(-parseInt(_0x16fe27(0x115))/0xb);if(_0x391aee===_0x5b3849)break;else _0x5c3ee5['push'](_0x5c3ee5['shift']());}catch(_0x3f36d6){_0x5c3ee5['push'](_0x5c3ee5['shift']());}}}(_0x331e,0x4ef00));function _0x331e(){const _0x245adb=['733545kzdgOj','1141DMRWTm','1321371FIJEvp','20766YcKteA','bundle-id','116648eigIri','873640cppsAh','20319xevPwR','launchWithSimulator','defineProperty','6850BClgvS','default','55UGcdVV','com.webspatial.test','../xcode/xcrun','__esModule','308JdLbZf','185UNdhtg'];_0x331e=function(){return _0x245adb;};return _0x331e();}function _0x2236(_0x365890,_0x137d2d){const _0x331e11=_0x331e();return _0x2236=function(_0x223690,_0x28ad4a){_0x223690=_0x223690-0x104;let _0x575b21=_0x331e11[_0x223690];return _0x575b21;},_0x2236(_0x365890,_0x137d2d);}Object[_0x449074(0x112)](exports,_0x449074(0x106),{'value':!![]}),exports['launch']=launch;const xcrun_1=require(_0x449074(0x105));async function launch(_0x2a5563){const _0x233263=_0x449074;var _0x5c8676;const _0x6361f4=(_0x5c8676=_0x2a5563[_0x233263(0x10d)])!==null&&_0x5c8676!==void 0x0?_0x5c8676:_0x233263(0x104),_0x368a08={'name':'','id':_0x6361f4};return xcrun_1[_0x233263(0x114)][_0x233263(0x111)](_0x368a08),!![];}
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.launch = launch;
4
+ const xcrun_1 = require("../xcode/xcrun");
5
+ async function launch(args) {
6
+ var _a;
7
+ const bundleId = (_a = args['bundleId']) !== null && _a !== void 0 ? _a : 'com.webspatial.test';
8
+ const appInfo = {
9
+ name: '',
10
+ id: bundleId,
11
+ };
12
+ xcrun_1.default.launchWithSimulator(appInfo);
13
+ return true;
14
+ }
@@ -1 +1,8 @@
1
- 'use strict';const _0x510643=_0x5356;(function(_0x39008f,_0x3567e3){const _0x486512=_0x5356,_0x360e21=_0x39008f();while(!![]){try{const _0x3f41ba=parseInt(_0x486512(0xc5))/0x1*(-parseInt(_0x486512(0xc2))/0x2)+parseInt(_0x486512(0xce))/0x3*(parseInt(_0x486512(0xcd))/0x4)+-parseInt(_0x486512(0xc9))/0x5+parseInt(_0x486512(0xc8))/0x6+parseInt(_0x486512(0xca))/0x7+-parseInt(_0x486512(0xc4))/0x8*(parseInt(_0x486512(0xcf))/0x9)+-parseInt(_0x486512(0xc3))/0xa*(-parseInt(_0x486512(0xc7))/0xb);if(_0x3f41ba===_0x3567e3)break;else _0x360e21['push'](_0x360e21['shift']());}catch(_0x16ba9f){_0x360e21['push'](_0x360e21['shift']());}}}(_0x35b0,0xf173f));function _0x5356(_0x33f143,_0x42c29d){const _0x35b0d3=_0x35b0();return _0x5356=function(_0x5356b2,_0x26e918){_0x5356b2=_0x5356b2-0xc2;let _0x449e7b=_0x35b0d3[_0x5356b2];return _0x449e7b;},_0x5356(_0x33f143,_0x42c29d);}Object[_0x510643(0xc6)](exports,_0x510643(0xd0),{'value':!![]}),exports[_0x510643(0xcb)]=shutdown;function _0x35b0(){const _0x878cc1=['6zZYnZD','72ZRemdI','__esModule','1182sofXeh','30nHmGNg','1349392gljxgL','1091qbxhqo','defineProperty','1473791cpWqph','5545950YdxfWz','4572385MXOxbi','7431543gWeBhz','shutdown','../xcode/xcrun','3019448WZFqGR'];_0x35b0=function(){return _0x878cc1;};return _0x35b0();}const xcrun_1=require(_0x510643(0xcc));async function shutdown(_0x3e9bda){return xcrun_1['default']['shutdownSimulator'](),!![];}
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.shutdown = shutdown;
4
+ const xcrun_1 = require("../xcode/xcrun");
5
+ async function shutdown(args) {
6
+ xcrun_1.default.shutdownSimulator();
7
+ return true;
8
+ }
@@ -1 +1,11 @@
1
- 'use strict';const _0x69e615=_0x467d;(function(_0x57ccc1,_0x1d7cf1){const _0x33a591=_0x467d,_0x701f77=_0x57ccc1();while(!![]){try{const _0x39f3b5=parseInt(_0x33a591(0x12d))/0x1*(-parseInt(_0x33a591(0x138))/0x2)+parseInt(_0x33a591(0x12e))/0x3+parseInt(_0x33a591(0x132))/0x4*(-parseInt(_0x33a591(0x136))/0x5)+parseInt(_0x33a591(0x133))/0x6+parseInt(_0x33a591(0x135))/0x7*(parseInt(_0x33a591(0x130))/0x8)+-parseInt(_0x33a591(0x139))/0x9+-parseInt(_0x33a591(0x12f))/0xa;if(_0x39f3b5===_0x1d7cf1)break;else _0x701f77['push'](_0x701f77['shift']());}catch(_0x27a327){_0x701f77['push'](_0x701f77['shift']());}}}(_0x4598,0xc86db));Object[_0x69e615(0x134)](exports,_0x69e615(0x13b),{'value':!![]}),exports['getVersion']=getVersion;const fs=require('fs'),path=require(_0x69e615(0x12a));function _0x467d(_0x73639b,_0xc78254){const _0x4598c7=_0x4598();return _0x467d=function(_0x467d30,_0x347801){_0x467d30=_0x467d30-0x12a;let _0x3bb372=_0x4598c7[_0x467d30];return _0x3bb372;},_0x467d(_0x73639b,_0xc78254);}async function getVersion(){const _0x2ff6f0=_0x69e615,_0x41f172=path[_0x2ff6f0(0x137)](__dirname,_0x2ff6f0(0x13a)),_0x552f6d=await(await fs[_0x2ff6f0(0x12b)][_0x2ff6f0(0x12c)](_0x41f172))['toString'](),_0x5031d7=JSON['parse'](_0x552f6d);return _0x5031d7[_0x2ff6f0(0x131)];}function _0x4598(){const _0x313ced=['join','2jDYKGr','13057668cTlGKB','../../../package.json','__esModule','path','promises','readFile','89633TRjUiq','2631114BuuIWk','8377450LGlmdj','760rWznlF','version','27712cxJfKB','6698106GsOKBi','defineProperty','92932glveik','40THUBsc'];_0x4598=function(){return _0x313ced;};return _0x4598();}
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getVersion = getVersion;
4
+ const fs = require("fs");
5
+ const path = require("path");
6
+ async function getVersion() {
7
+ const packageJsonFile = path.join(__dirname, '../../../package.json');
8
+ const packageJsonContents = await (await fs.promises.readFile(packageJsonFile)).toString();
9
+ const packageJson = JSON.parse(packageJsonContents);
10
+ return packageJson.version;
11
+ }