@webspatial/builder 0.1.16 → 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 _0x2e0811=_0x1318;(function(_0x45284d,_0x4c36bc){const _0xd08a3c=_0x1318,_0x48e74e=_0x45284d();while(!![]){try{const _0x5665cd=parseInt(_0xd08a3c(0x185))/0x1+parseInt(_0xd08a3c(0x180))/0x2+-parseInt(_0xd08a3c(0x169))/0x3+-parseInt(_0xd08a3c(0x19b))/0x4*(parseInt(_0xd08a3c(0x15c))/0x5)+parseInt(_0xd08a3c(0x181))/0x6+-parseInt(_0xd08a3c(0x174))/0x7*(parseInt(_0xd08a3c(0x18f))/0x8)+parseInt(_0xd08a3c(0x18c))/0x9;if(_0x5665cd===_0x4c36bc)break;else _0x48e74e['push'](_0x48e74e['shift']());}catch(_0x31bc29){_0x48e74e['push'](_0x48e74e['shift']());}}}(_0x3040,0x8a27d));function _0x1318(_0x1c8c22,_0x58440d){const _0x30402a=_0x3040();return _0x1318=function(_0x13185e,_0x12cb90){_0x13185e=_0x13185e-0x158;let _0x10332=_0x30402a[_0x13185e];return _0x10332;},_0x1318(_0x1c8c22,_0x58440d);}function _0x3040(){const _0x48a8ce=['exports','requiredOption','xr\x20platform','14TOMsfT','export\x20path','parseAsync','Launch\x20WebSpatial\x20App','run\x20without\x20build','setDownloadFile','run','setFetch','--manifest\x20<manifest>','Current\x20Node.js\x20version\x20is\x20','store','bundle\x20id','987262PJfcmv','3120540ZLDoIa','app\x20version','./lib/cmds/shutdown','./lib/utils/FetchUtils-1','988283CKwLqQ','./lib/cmds/launch','shutdown','build','By\x20compiling\x20or\x20running\x20directly\x20on\x20the\x20simulator\x20the\x20WebSpatial\x20App','--project\x20<project>','./lib/cmds/version','6722478tLmExi','manifest\x20url','--tryWithoutBuild\x20<tryWithoutBuild>','2147296wUMggb','--bundle-id\x20<bundleId>','Shutdown\x20Simulator','node','version','publish','--base\x20<base>','action','fetchUtils','Build\x20WebSpatial\x20App','--version\x20<version>','setDecompressResponseBuffer','70340VAiKOF','option','command','./lib/utils/fetch','base\x20path','--manifest-url\x20<manifestUrl>','manifest\x20path','description','webspatial-builder','project\x20path','235Mdppqf','semver','--teamId\x20<teamId>','launch','team\x20id','configureHelp','--p\x20<password>','\x20Node.js\x20version\x2014\x20or\x20above\x20is\x20required\x20to\x20run\x20XRAPP\x20BUILDER.','username','--buildType\x20<buildType>','major','defineProperty','WebSpatial\x20Builder\x20is\x20a\x20client-side\x20CLI\x20tool\x20used\x20to\x20generate\x20cross\x20platform\x20XRApp\x20projects.','2459226cjxGvn','-v,\x20--version','--platform\x20<platform>','log','--u\x20<username>','decompressResponseBuffer','--export\x20<export>','downloadFile'];_0x3040=function(){return _0x48a8ce;};return _0x3040();}Object[_0x2e0811(0x167)](exports,'__esModule',{'value':!![]});const commander_1=require('commander'),semver_1=require(_0x2e0811(0x15d)),FetchUtils_1_1=require(_0x2e0811(0x184)),build_1=require('./lib/cmds/build'),version_1=require(_0x2e0811(0x18b)),fetch_1=require(_0x2e0811(0x19e)),launch_1=require(_0x2e0811(0x186)),shutdown_1=require(_0x2e0811(0x183));module[_0x2e0811(0x171)]=async()=>{const _0x26dcba=_0x2e0811;if((0x0,semver_1[_0x26dcba(0x166)])(process['versions'][_0x26dcba(0x192)])<0xe)throw new Error(_0x26dcba(0x17d)+process['versions']['node']+'.'+_0x26dcba(0x163));const _0x3c9a26=new commander_1['Command']();FetchUtils_1_1[_0x26dcba(0x197)][_0x26dcba(0x17b)](fetch_1['fetch']),FetchUtils_1_1[_0x26dcba(0x197)][_0x26dcba(0x179)](fetch_1[_0x26dcba(0x170)]),FetchUtils_1_1['fetchUtils'][_0x26dcba(0x19a)](fetch_1[_0x26dcba(0x16e)]),await setupCommands(_0x3c9a26),await _0x3c9a26[_0x26dcba(0x176)](process['argv']);};async function setupCommands(_0x256a4f){const _0x5590e0=_0x2e0811,_0x2418b0=await(0x0,version_1['getVersion'])();_0x256a4f['name'](_0x5590e0(0x15a))[_0x5590e0(0x159)](_0x5590e0(0x168))[_0x5590e0(0x193)](_0x2418b0,_0x5590e0(0x16a))[_0x5590e0(0x161)]({'showGlobalOptions':!![]}),_0x256a4f[_0x5590e0(0x19d)]('run')[_0x5590e0(0x159)](_0x5590e0(0x189))[_0x5590e0(0x19c)]('--manifest\x20<manifest>',_0x5590e0(0x158))[_0x5590e0(0x19c)](_0x5590e0(0x18a),_0x5590e0(0x15b))['option'](_0x5590e0(0x1a0),'manifest\x20url')[_0x5590e0(0x19c)](_0x5590e0(0x16b),'xr\x20platform')['option'](_0x5590e0(0x195),_0x5590e0(0x19f))[_0x5590e0(0x19c)](_0x5590e0(0x190),_0x5590e0(0x17f))[_0x5590e0(0x19c)](_0x5590e0(0x18e),_0x5590e0(0x178))['action'](async _0x4e8db0=>{const _0x3f5365=_0x5590e0;await(0x0,build_1[_0x3f5365(0x17a)])(_0x4e8db0);}),_0x256a4f[_0x5590e0(0x19d)](_0x5590e0(0x188))[_0x5590e0(0x159)](_0x5590e0(0x198))['option'](_0x5590e0(0x17c),'manifest\x20path')['option'](_0x5590e0(0x18a),_0x5590e0(0x15b))[_0x5590e0(0x19c)]('--manifest-url\x20<manifest-url>','manifest\x20url')['option']('--platform\x20<platform>','xr\x20platform')[_0x5590e0(0x19c)]('--version\x20<version>','app\x20version')[_0x5590e0(0x19c)]('--buildType\x20<buildType>','app\x20build\x20type')[_0x5590e0(0x19c)](_0x5590e0(0x16f),_0x5590e0(0x175))[_0x5590e0(0x19c)](_0x5590e0(0x190),_0x5590e0(0x17f))[_0x5590e0(0x172)]('--base\x20<base>',_0x5590e0(0x19f))[_0x5590e0(0x172)](_0x5590e0(0x15e),_0x5590e0(0x160))[_0x5590e0(0x196)](async _0xdc8f4b=>{const _0x1fc165=_0x5590e0;console[_0x1fc165(0x16c)](_0xdc8f4b),await(0x0,build_1[_0x1fc165(0x188)])(_0xdc8f4b);}),_0x256a4f[_0x5590e0(0x19d)](_0x5590e0(0x194))[_0x5590e0(0x159)]('Publish\x20WebSpatial\x20App')[_0x5590e0(0x19c)](_0x5590e0(0x17c),_0x5590e0(0x158))[_0x5590e0(0x19c)]('--project\x20<project>',_0x5590e0(0x15b))['option'](_0x5590e0(0x1a0),_0x5590e0(0x18d))[_0x5590e0(0x19c)](_0x5590e0(0x16b),_0x5590e0(0x173))[_0x5590e0(0x19c)](_0x5590e0(0x165),'app\x20build\x20type')[_0x5590e0(0x19c)]('--export\x20<export>',_0x5590e0(0x175))['option'](_0x5590e0(0x190),_0x5590e0(0x17f))[_0x5590e0(0x172)]('--base\x20<base>','base\x20path')[_0x5590e0(0x172)](_0x5590e0(0x15e),_0x5590e0(0x160))[_0x5590e0(0x172)](_0x5590e0(0x199),_0x5590e0(0x182))[_0x5590e0(0x172)](_0x5590e0(0x16d),_0x5590e0(0x164))[_0x5590e0(0x172)](_0x5590e0(0x162),'password')[_0x5590e0(0x196)](async _0x56b6d9=>{const _0x10e843=_0x5590e0;console[_0x10e843(0x16c)](_0x56b6d9),await(0x0,build_1[_0x10e843(0x17e)])(_0x56b6d9);}),_0x256a4f[_0x5590e0(0x19d)](_0x5590e0(0x15f))[_0x5590e0(0x159)](_0x5590e0(0x177))[_0x5590e0(0x19c)](_0x5590e0(0x190),'bundle\x20id')[_0x5590e0(0x196)](async _0x4f1973=>{const _0x172443=_0x5590e0;console[_0x172443(0x16c)](_0x4f1973),await(0x0,launch_1[_0x172443(0x15f)])(_0x4f1973);}),_0x256a4f[_0x5590e0(0x19d)]('shutdown')[_0x5590e0(0x159)](_0x5590e0(0x191))[_0x5590e0(0x196)](async _0x33eca7=>{const _0x18e382=_0x5590e0;console[_0x18e382(0x16c)](_0x33eca7),await(0x0,shutdown_1[_0x18e382(0x187)])(_0x33eca7);});}
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';function _0x710a(){const _0x121b64=['export','292347lREcmP','fromNet','move\x20web\x20project:\x20ok','app-store-connect','checkBuildParams','228WpIizA','buildType','-------------------\x20parse\x20start\x20-------------------','Same\x20as\x20the\x20previous\x20record','version','project','64kRFCxj','../resource','checkManifest','./check','true','WebSpatialTest','tryWithoutBuild','641pvgfxq','ResourceManager','PWAGenerator','20JWnYEH','6011096uHZDXn','2003215WxPbms','2597157lrECDl','log','name','checkPlatformPath','init','default','moveProjectFrom','stringify','store','20tVDOPZ','-------------------\x20parse\x20end\x20-------------------','parseProject','runWithHistory','dist','../xcode','503406GzyYyP','../utils/history','platform','checkStoreParams','generator','json','build','142752ztIqMJ','defineProperty','upload','XcodeManager','teamId','21MOiiFM'];_0x710a=function(){return _0x121b64;};return _0x710a();}const _0x1105f2=_0x4ae1;(function(_0x156d12,_0x18ce0d){const _0x586e13=_0x4ae1,_0x2a0952=_0x156d12();while(!![]){try{const _0x45aaf7=parseInt(_0x586e13(0x1fb))/0x1*(-parseInt(_0x586e13(0x1d5))/0x2)+parseInt(_0x586e13(0x1e2))/0x3*(parseInt(_0x586e13(0x1f4))/0x4)+parseInt(_0x586e13(0x1cb))/0x5+parseInt(_0x586e13(0x1db))/0x6*(parseInt(_0x586e13(0x1e7))/0x7)+-parseInt(_0x586e13(0x1ca))/0x8+-parseInt(_0x586e13(0x1cc))/0x9*(parseInt(_0x586e13(0x1c9))/0xa)+-parseInt(_0x586e13(0x1e9))/0xb*(-parseInt(_0x586e13(0x1ee))/0xc);if(_0x45aaf7===_0x18ce0d)break;else _0x2a0952['push'](_0x2a0952['shift']());}catch(_0xbc2c36){_0x2a0952['push'](_0x2a0952['shift']());}}}(_0x710a,0x8e81e));Object[_0x1105f2(0x1e3)](exports,'__esModule',{'value':!![]}),exports[_0x1105f2(0x1e1)]=build,exports[_0x1105f2(0x1d4)]=store,exports['run']=run;const pwa_1=require('../pwa'),resource_1=require(_0x1105f2(0x1f5)),xcode_1=require(_0x1105f2(0x1da)),check_1=require(_0x1105f2(0x1f7)),history_1=require(_0x1105f2(0x1dc));async function build(_0x2a6ac1){const _0x19961e=_0x1105f2;var _0xd8419f;console['log']('-------------------\x20parse\x20start\x20-------------------'),resource_1['ResourceManager'][_0x19961e(0x1cf)](_0x2a6ac1['platform']);const _0x20afaf=await doPwa(_0x2a6ac1),_0x1ce705=await doReadyProject((_0xd8419f=_0x2a6ac1[_0x19961e(0x1f3)])!==null&&_0xd8419f!==void 0x0?_0xd8419f:_0x19961e(0x1d9),_0x20afaf);return await doXcode(_0x2a6ac1,_0x1ce705,_0x20afaf),console[_0x19961e(0x1cd)](_0x19961e(0x1d6)),await xcode_1[_0x19961e(0x1e5)][_0x19961e(0x1e1)](_0x2a6ac1[_0x19961e(0x1e8)]),_0x20afaf;}async function store(_0x58fa8b){const _0x57e3bb=_0x1105f2;resource_1[_0x57e3bb(0x1c7)][_0x57e3bb(0x1cf)](_0x58fa8b['platform']),(0x0,check_1[_0x57e3bb(0x1de)])(_0x58fa8b);let _0x109508={'name':_0x57e3bb(0x1f9)};_0x58fa8b[_0x57e3bb(0x1ef)]=_0x57e3bb(0x1ec);if(_0x58fa8b[_0x57e3bb(0x1ce)])_0x109508[_0x57e3bb(0x1ce)]=_0x58fa8b[_0x57e3bb(0x1ce)];else{const _0x52afa7=await build(_0x58fa8b);_0x109508[_0x57e3bb(0x1ce)]=_0x52afa7[_0x57e3bb(0x1e0)][_0x57e3bb(0x1ce)];}await xcode_1[_0x57e3bb(0x1e5)][_0x57e3bb(0x1e4)](_0x58fa8b,_0x109508);}async function run(_0x46630f){const _0x4df749=_0x1105f2;var _0x5d086f;const _0x2eaa81=JSON[_0x4df749(0x1d3)](_0x46630f);history_1['default'][_0x4df749(0x1d0)](_0x2eaa81),console[_0x4df749(0x1cd)](_0x4df749(0x1f0)),resource_1[_0x4df749(0x1c7)][_0x4df749(0x1cf)](_0x46630f[_0x4df749(0x1dd)]);const _0x2912ba=await doPwa(_0x46630f,!![]);history_1[_0x4df749(0x1d1)]['recordManifest'](_0x2912ba[_0x4df749(0x1e0)]);if(_0x2912ba[_0x4df749(0x1ea)]||_0x46630f[_0x4df749(0x1fa)]===_0x4df749(0x1f8)){if(history_1[_0x4df749(0x1d1)][_0x4df749(0x1f6)](_0x2912ba[_0x4df749(0x1e0)])){console['log'](_0x4df749(0x1f1)),await xcode_1[_0x4df749(0x1e5)][_0x4df749(0x1d8)]();return;}}const _0x5725d7=await doReadyProject((_0x5d086f=_0x46630f[_0x4df749(0x1f3)])!==null&&_0x5d086f!==void 0x0?_0x5d086f:_0x4df749(0x1d9),_0x2912ba);await doXcode(_0x46630f,_0x5725d7,_0x2912ba,!![]),console[_0x4df749(0x1cd)](_0x4df749(0x1d6)),await xcode_1['XcodeManager']['runWithSimulator']();}async function doPwa(_0x4a1693,_0x195de2=![]){const _0x23f264=_0x1105f2;return(0x0,check_1[_0x23f264(0x1ed)])(_0x4a1693,_0x195de2),await pwa_1[_0x23f264(0x1c8)][_0x23f264(0x1df)](_0x4a1693,_0x195de2);}function _0x4ae1(_0x1c513e,_0x53b105){const _0x710a11=_0x710a();return _0x4ae1=function(_0x4ae161,_0x3bd37c){_0x4ae161=_0x4ae161-0x1c7;let _0x3f8f69=_0x710a11[_0x4ae161];return _0x3f8f69;},_0x4ae1(_0x1c513e,_0x53b105);}async function doReadyProject(_0x25551f,_0x5491a2){const _0x1d2a48=_0x1105f2;return!_0x5491a2[_0x1d2a48(0x1ea)]&&(await resource_1[_0x1d2a48(0x1c7)][_0x1d2a48(0x1d2)](_0x25551f),console[_0x1d2a48(0x1cd)](_0x1d2a48(0x1eb))),await resource_1[_0x1d2a48(0x1c7)]['generateIcon'](_0x5491a2);}async function doXcode(_0x2e76c7,_0x25ba4d,_0xff5410,_0x113b14=![]){const _0x3acc2d=_0x1105f2;await xcode_1['XcodeManager'][_0x3acc2d(0x1d7)]({'icon':_0x25ba4d,'manifestInfo':_0xff5410,'teamId':_0x2e76c7[_0x3acc2d(0x1e6)],'version':_0x2e76c7[_0x3acc2d(0x1f2)],'buildType':_0x2e76c7['buildType'],'export':_0x2e76c7['export']},_0x113b14);}
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 _0x20cd7d=_0x56a4;(function(_0x14b8a6,_0x386307){const _0x3f479a=_0x56a4,_0x27ad85=_0x14b8a6();while(!![]){try{const _0x29f780=parseInt(_0x3f479a(0x8c))/0x1*(-parseInt(_0x3f479a(0xa1))/0x2)+-parseInt(_0x3f479a(0x90))/0x3+parseInt(_0x3f479a(0x9a))/0x4+-parseInt(_0x3f479a(0x97))/0x5*(-parseInt(_0x3f479a(0x92))/0x6)+parseInt(_0x3f479a(0x95))/0x7+-parseInt(_0x3f479a(0x9e))/0x8+parseInt(_0x3f479a(0x91))/0x9;if(_0x29f780===_0x386307)break;else _0x27ad85['push'](_0x27ad85['shift']());}catch(_0x53a95d){_0x27ad85['push'](_0x27ad85['shift']());}}}(_0xfac5,0x91297));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['checkBuildParams']=checkBuildParams,exports[_0x20cd7d(0x9c)]=checkStoreParams;const validate_1=require('../pwa/validate');function _0x56a4(_0x554463,_0x3a7d9b){const _0xfac501=_0xfac5();return _0x56a4=function(_0x56a4c9,_0x415d94){_0x56a4c9=_0x56a4c9-0x8b;let _0x5e48e3=_0xfac501[_0x56a4c9];return _0x5e48e3;},_0x56a4(_0x554463,_0x3a7d9b);}function _0xfac5(){const _0x4b1848=['--manifest\x20and\x20--manifest-url\x20cannot\x20be\x20used\x20at\x20the\x20same\x20time','2193436mRlHxs','manifest','340PRnhCa','hash','search','2361780dUPKzQ','validateURL','checkStoreParams','split','9288688RKSGax','version','--teamId\x20is\x20required','106188grrHCy','version\x20is\x20required','10vmeobP','manifestUrl','teamId','The\x20base\x20parameter\x20must\x20be\x20a\x20path\x20or\x20url\x20and\x20cannot\x20contain\x20parameters\x20or\x20suffixes.','1720383ZkaWbg','7051941ywYEet','103476KLsFNu','base'];_0xfac5=function(){return _0x4b1848;};return _0xfac5();}function checkBuildParams(_0x21ee4d,_0x2b18ec=![]){const _0x408dd3=_0x20cd7d;if(_0x21ee4d[_0x408dd3(0x96)]&&_0x21ee4d[_0x408dd3(0x8d)])throw new Error(_0x408dd3(0x94));if(!_0x21ee4d[_0x408dd3(0x8e)]&&!_0x2b18ec)throw new Error(_0x408dd3(0xa0));if(_0x21ee4d['base']){if((0x0,validate_1[_0x408dd3(0x9b)])(_0x21ee4d[_0x408dd3(0x93)]))try{const _0xed615e=new URL(_0x21ee4d[_0x408dd3(0x93)]);if(_0xed615e[_0x408dd3(0x99)]||_0xed615e[_0x408dd3(0x98)])throw new Error(_0x408dd3(0x8f));}catch(_0x33898b){throw new Error('The\x20base\x20parameter\x20must\x20be\x20a\x20path\x20or\x20url\x20and\x20cannot\x20contain\x20parameters\x20or\x20suffixes.');}else{const _0x43fb94=/(\?.*|\.\w+|#.*)$/,_0x56d522=_0x21ee4d['base'][_0x408dd3(0x9d)]('/')['pop']()||'';if(_0x43fb94['test'](_0x56d522))throw new Error(_0x408dd3(0x8f));}}}function checkStoreParams(_0x5a1a90){const _0x424d70=_0x20cd7d;if(!(_0x5a1a90['u']&&_0x5a1a90['p']))throw new Error('--u\x20and\x20--p\x20is\x20required');if(!_0x5a1a90[_0x424d70(0x9f)])throw new Error(_0x424d70(0x8b));}
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 _0x29d135=_0xc192;(function(_0x429422,_0x27c892){const _0x54533c=_0xc192,_0x24bdb3=_0x429422();while(!![]){try{const _0x4e7973=-parseInt(_0x54533c(0x86))/0x1+-parseInt(_0x54533c(0x8a))/0x2*(parseInt(_0x54533c(0x89))/0x3)+parseInt(_0x54533c(0x8d))/0x4*(-parseInt(_0x54533c(0x8e))/0x5)+parseInt(_0x54533c(0x8b))/0x6*(parseInt(_0x54533c(0x80))/0x7)+-parseInt(_0x54533c(0x7c))/0x8+parseInt(_0x54533c(0x7d))/0x9*(-parseInt(_0x54533c(0x81))/0xa)+parseInt(_0x54533c(0x82))/0xb;if(_0x4e7973===_0x27c892)break;else _0x24bdb3['push'](_0x24bdb3['shift']());}catch(_0x27e27a){_0x24bdb3['push'](_0x24bdb3['shift']());}}}(_0x3e6a,0xa1bd5));Object[_0x29d135(0x78)](exports,_0x29d135(0x93),{'value':!![]}),exports[_0x29d135(0x85)]=help;function _0xc192(_0xa15911,_0x4bd29a){const _0x3e6a0f=_0x3e6a();return _0xc192=function(_0xc19233,_0x11fbab){_0xc19233=_0xc19233-0x78;let _0x34e7d7=_0x3e6a0f[_0xc19233];return _0x34e7d7;},_0xc192(_0xa15911,_0x4bd29a);}const Log_1=require('../utils/Log'),HELP_MESSAGES=new Map([['main',['webspatial\x20[command]\x20<options>','','','help\x20................\x20shows\x20this\x20menu','build\x20................\x20initializes\x20a\x20new\x20WebSpatial\x20Project'+_0x29d135(0x79),_0x29d135(0x87),_0x29d135(0x8c)][_0x29d135(0x91)]('\x0a')],[_0x29d135(0x84),[_0x29d135(0x8f),'','',_0x29d135(0x7a),'','',_0x29d135(0x83)]['join']('\x0a')],['dev',['Usage:','','','webspatial\x20dev\x20--manifest=<local-manifest-path>\x20--project=<local-web-project-path>','','',_0x29d135(0x7f)][_0x29d135(0x91)]('\x0a')],[_0x29d135(0x88),[_0x29d135(0x8f),'','',_0x29d135(0x92),'','','webspatial\x20publish\x20--manifest-url=<net-manifest-url>\x20--teamId=<teamId>\x20--version=<version>\x20--u=<username>\x20--p=<password>','','',_0x29d135(0x95)][_0x29d135(0x91)]('\x0a')]]);function _0x3e6a(){const _0x50eff1=['webspatial\x20build\x20--manifest=<local-manifest-path>\x20--project=<local-web-project-path>\x20--teamId=<teamId>\x20[--version=version]\x20[--buildType=release-testing]','info','2352184HMeLrF','68157WnDpTi','main','webspatial\x20dev\x20--manifest-url=<net-manifest-url>','14ktuYQN','670ICPvVI','40510745eSUniT','webspatial\x20build\x20--manifest-url=<net-manifest-url>\x20--teamId=<teamId>\x20[--version=version]\x20[--buildType=release-testing]','build','help','149975dlnXcW','run\x20................\x20build\x20and\x20run\x20WebSpatial\x20Project\x20on\x20Apple\x20Vision\x20Pro\x20simulator','publish','3IIxiYL','2519878neojMc','777804dSUqeq','publish..............\x20upload\x20WebSpatial\x20Project\x20to\x20App\x20Store\x20Connect','20udbKwN','1068250uWfmsb','Usage:','ConsoleLog','join','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>','__esModule','get','webspatial\x20publish\x20--name=<app-name>\x20--version=<version>\x20--u=<username>\x20--p=<password>','defineProperty','\x20and\x20generates\x20an\x20Apple\x20Vision\x20Pro\x20App\x20from\x20a\x20WebSpatial\x20Project'];_0x3e6a=function(){return _0x50eff1;};return _0x3e6a();}async function help(_0x5dc4c2,_0x1fe354=new Log_1[(_0x29d135(0x90))](_0x29d135(0x85))){const _0x3aba06=_0x29d135,_0x4b1354=_0x5dc4c2['_'][0x1],_0x4f319a=HELP_MESSAGES[_0x3aba06(0x94)](_0x4b1354)||HELP_MESSAGES[_0x3aba06(0x94)](_0x3aba06(0x7e));return _0x1fe354[_0x3aba06(0x7b)](_0x4f319a),!![];}
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 _0x532686=_0x3ba9;(function(_0x173ddc,_0x4a58b1){const _0x427d34=_0x3ba9,_0x194306=_0x173ddc();while(!![]){try{const _0x120d6b=-parseInt(_0x427d34(0x82))/0x1*(-parseInt(_0x427d34(0x81))/0x2)+parseInt(_0x427d34(0x87))/0x3+parseInt(_0x427d34(0x8c))/0x4*(-parseInt(_0x427d34(0x86))/0x5)+-parseInt(_0x427d34(0x84))/0x6+parseInt(_0x427d34(0x8b))/0x7+-parseInt(_0x427d34(0x89))/0x8*(-parseInt(_0x427d34(0x83))/0x9)+-parseInt(_0x427d34(0x7e))/0xa*(parseInt(_0x427d34(0x7c))/0xb);if(_0x120d6b===_0x4a58b1)break;else _0x194306['push'](_0x194306['shift']());}catch(_0x5a421a){_0x194306['push'](_0x194306['shift']());}}}(_0x1eec,0xef002));function _0x3ba9(_0xceeedb,_0x24f278){const _0x1eec2e=_0x1eec();return _0x3ba9=function(_0x3ba999,_0xc4e8fa){_0x3ba999=_0x3ba999-0x7c;let _0x46d8d0=_0x1eec2e[_0x3ba999];return _0x46d8d0;},_0x3ba9(_0xceeedb,_0x24f278);}function _0x1eec(){const _0x3dadd4=['bundleId','587338VFusCZ','6DXBmCA','9NXesys','3673566scQsan','default','20qBulCh','5164617afuRDb','__esModule','5748832bUQbpz','launchWithSimulator','7623224meWqjA','23612KvhNsA','55pMbUDv','../xcode/xcrun','7352740okDeKa','defineProperty'];_0x1eec=function(){return _0x3dadd4;};return _0x1eec();}Object[_0x532686(0x7f)](exports,_0x532686(0x88),{'value':!![]}),exports['launch']=launch;const xcrun_1=require(_0x532686(0x7d));async function launch(_0x5bd86b){const _0x305c48=_0x532686;var _0x42e439;const _0x5a8822=(_0x42e439=_0x5bd86b[_0x305c48(0x80)])!==null&&_0x42e439!==void 0x0?_0x42e439:'com.webspatial.test',_0x2f07b2={'name':'','id':_0x5a8822};return xcrun_1[_0x305c48(0x85)][_0x305c48(0x8a)](_0x2f07b2),!![];}
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 _0x1eb695=_0xa85e;(function(_0x5290ca,_0x4b0b80){const _0x579579=_0xa85e,_0x250043=_0x5290ca();while(!![]){try{const _0x671494=-parseInt(_0x579579(0x87))/0x1*(-parseInt(_0x579579(0x90))/0x2)+-parseInt(_0x579579(0x89))/0x3*(parseInt(_0x579579(0x91))/0x4)+parseInt(_0x579579(0x8e))/0x5*(-parseInt(_0x579579(0x8d))/0x6)+-parseInt(_0x579579(0x85))/0x7+parseInt(_0x579579(0x84))/0x8+-parseInt(_0x579579(0x8a))/0x9*(-parseInt(_0x579579(0x88))/0xa)+parseInt(_0x579579(0x8b))/0xb;if(_0x671494===_0x4b0b80)break;else _0x250043['push'](_0x250043['shift']());}catch(_0x4652a1){_0x250043['push'](_0x250043['shift']());}}}(_0x2260,0xa3341));function _0xa85e(_0x1aff58,_0x50cbce){const _0x22607b=_0x2260();return _0xa85e=function(_0xa85e28,_0x497e7b){_0xa85e28=_0xa85e28-0x84;let _0x29f8b1=_0x22607b[_0xa85e28];return _0x29f8b1;},_0xa85e(_0x1aff58,_0x50cbce);}Object[_0x1eb695(0x8c)](exports,'__esModule',{'value':!![]}),exports['shutdown']=shutdown;function _0x2260(){const _0x38cad5=['3nykXaV','31095CdNgLQ','15901094zooDRa','defineProperty','1632702wgzVrY','20BQPfit','../xcode/xcrun','2MDmJZx','4483876cHwPFO','8220144zskSHJ','2244466HvFASK','default','3389IfhCcJ','2090MtSjxB'];_0x2260=function(){return _0x38cad5;};return _0x2260();}const xcrun_1=require(_0x1eb695(0x8f));async function shutdown(_0x27aaab){const _0x4de230=_0x1eb695;return xcrun_1[_0x4de230(0x86)]['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 _0x100077=_0x2af8;(function(_0x2773e9,_0x1a8a27){const _0x4a2a0d=_0x2af8,_0x46f784=_0x2773e9();while(!![]){try{const _0x457c2d=-parseInt(_0x4a2a0d(0x17f))/0x1+parseInt(_0x4a2a0d(0x179))/0x2*(-parseInt(_0x4a2a0d(0x17a))/0x3)+-parseInt(_0x4a2a0d(0x17e))/0x4+parseInt(_0x4a2a0d(0x17c))/0x5*(-parseInt(_0x4a2a0d(0x178))/0x6)+-parseInt(_0x4a2a0d(0x186))/0x7+parseInt(_0x4a2a0d(0x181))/0x8+-parseInt(_0x4a2a0d(0x17d))/0x9*(-parseInt(_0x4a2a0d(0x189))/0xa);if(_0x457c2d===_0x1a8a27)break;else _0x46f784['push'](_0x46f784['shift']());}catch(_0x342159){_0x46f784['push'](_0x46f784['shift']());}}}(_0x4db2,0xb7eb2));function _0x2af8(_0x43ab7e,_0x51c27b){const _0x4db212=_0x4db2();return _0x2af8=function(_0x2af864,_0x21c255){_0x2af864=_0x2af864-0x178;let _0x288471=_0x4db212[_0x2af864];return _0x288471;},_0x2af8(_0x43ab7e,_0x51c27b);}Object[_0x100077(0x17b)](exports,_0x100077(0x187),{'value':!![]}),exports[_0x100077(0x185)]=getVersion;const fs=require('fs'),path=require('path');function _0x4db2(){const _0x9f0df9=['toString','10989800ZkafTw','version','../../../package.json','readFile','getVersion','893235ElxVyS','__esModule','parse','2130lbGmPQ','promises','join','6cIGnmn','172jwYqur','6510xONFeF','defineProperty','2679835eeOetl','87273NoVXwi','2757604RDuYaA','1146263ynZqRI'];_0x4db2=function(){return _0x9f0df9;};return _0x4db2();}async function getVersion(){const _0x4c87ae=_0x100077,_0xc899c1=path[_0x4c87ae(0x18b)](__dirname,_0x4c87ae(0x183)),_0x39742e=await(await fs[_0x4c87ae(0x18a)][_0x4c87ae(0x184)](_0xc899c1))[_0x4c87ae(0x180)](),_0xb43228=JSON[_0x4c87ae(0x188)](_0x39742e);return _0xb43228[_0x4c87ae(0x182)];}
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
+ }