node-simctl 7.2.2 → 7.3.0

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 (130) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/index.js +9 -17
  3. package/build/lib/helpers.d.ts +13 -0
  4. package/build/lib/helpers.d.ts.map +1 -0
  5. package/build/lib/helpers.js +22 -16
  6. package/build/lib/helpers.js.map +1 -1
  7. package/build/lib/logger.d.ts +4 -0
  8. package/build/lib/logger.d.ts.map +1 -0
  9. package/build/lib/logger.js +13 -19
  10. package/build/lib/logger.js.map +1 -1
  11. package/build/lib/simctl.d.ts +131 -0
  12. package/build/lib/simctl.d.ts.map +1 -0
  13. package/build/lib/simctl.js +170 -94
  14. package/build/lib/simctl.js.map +1 -1
  15. package/build/lib/subcommands/addmedia.d.ts +16 -0
  16. package/build/lib/subcommands/addmedia.d.ts.map +1 -0
  17. package/build/lib/subcommands/addmedia.js +17 -12
  18. package/build/lib/subcommands/addmedia.js.map +1 -1
  19. package/build/lib/subcommands/appinfo.d.ts +45 -0
  20. package/build/lib/subcommands/appinfo.d.ts.map +1 -0
  21. package/build/lib/subcommands/appinfo.js +47 -15
  22. package/build/lib/subcommands/appinfo.js.map +1 -1
  23. package/build/lib/subcommands/boot.d.ts +12 -0
  24. package/build/lib/subcommands/boot.d.ts.map +1 -0
  25. package/build/lib/subcommands/boot.js +47 -22
  26. package/build/lib/subcommands/boot.js.map +1 -1
  27. package/build/lib/subcommands/bootstatus.d.ts +56 -0
  28. package/build/lib/subcommands/bootstatus.d.ts.map +1 -0
  29. package/build/lib/subcommands/bootstatus.js +102 -87
  30. package/build/lib/subcommands/bootstatus.js.map +1 -1
  31. package/build/lib/subcommands/create.d.ts +34 -0
  32. package/build/lib/subcommands/create.d.ts.map +1 -0
  33. package/build/lib/subcommands/create.js +115 -65
  34. package/build/lib/subcommands/create.js.map +1 -1
  35. package/build/lib/subcommands/delete.d.ts +12 -0
  36. package/build/lib/subcommands/delete.d.ts.map +1 -0
  37. package/build/lib/subcommands/delete.js +13 -12
  38. package/build/lib/subcommands/delete.js.map +1 -1
  39. package/build/lib/subcommands/erase.d.ts +15 -0
  40. package/build/lib/subcommands/erase.d.ts.map +1 -0
  41. package/build/lib/subcommands/erase.js +19 -14
  42. package/build/lib/subcommands/erase.js.map +1 -1
  43. package/build/lib/subcommands/get_app_container.d.ts +22 -0
  44. package/build/lib/subcommands/get_app_container.d.ts.map +1 -0
  45. package/build/lib/subcommands/get_app_container.js +26 -19
  46. package/build/lib/subcommands/get_app_container.js.map +1 -1
  47. package/build/lib/subcommands/getenv.d.ts +14 -0
  48. package/build/lib/subcommands/getenv.d.ts.map +1 -0
  49. package/build/lib/subcommands/getenv.js +17 -17
  50. package/build/lib/subcommands/getenv.js.map +1 -1
  51. package/build/lib/subcommands/index.d.ts +3 -0
  52. package/build/lib/subcommands/index.d.ts.map +1 -0
  53. package/build/lib/subcommands/index.js +33 -36
  54. package/build/lib/subcommands/index.js.map +1 -1
  55. package/build/lib/subcommands/install.d.ts +15 -0
  56. package/build/lib/subcommands/install.d.ts.map +1 -0
  57. package/build/lib/subcommands/install.js +16 -12
  58. package/build/lib/subcommands/install.js.map +1 -1
  59. package/build/lib/subcommands/io.d.ts +15 -0
  60. package/build/lib/subcommands/io.d.ts.map +1 -0
  61. package/build/lib/subcommands/io.js +32 -25
  62. package/build/lib/subcommands/io.js.map +1 -1
  63. package/build/lib/subcommands/keychain.d.ts +53 -0
  64. package/build/lib/subcommands/keychain.d.ts.map +1 -0
  65. package/build/lib/subcommands/keychain.js +85 -51
  66. package/build/lib/subcommands/keychain.js.map +1 -1
  67. package/build/lib/subcommands/launch.d.ts +19 -0
  68. package/build/lib/subcommands/launch.d.ts.map +1 -0
  69. package/build/lib/subcommands/launch.js +28 -19
  70. package/build/lib/subcommands/launch.js.map +1 -1
  71. package/build/lib/subcommands/list.d.ts +120 -0
  72. package/build/lib/subcommands/list.d.ts.map +1 -0
  73. package/build/lib/subcommands/list.js +296 -138
  74. package/build/lib/subcommands/list.js.map +1 -1
  75. package/build/lib/subcommands/location.d.ts +20 -0
  76. package/build/lib/subcommands/location.d.ts.map +1 -0
  77. package/build/lib/subcommands/location.js +37 -22
  78. package/build/lib/subcommands/location.js.map +1 -1
  79. package/build/lib/subcommands/openurl.d.ts +17 -0
  80. package/build/lib/subcommands/openurl.d.ts.map +1 -0
  81. package/build/lib/subcommands/openurl.js +18 -12
  82. package/build/lib/subcommands/openurl.js.map +1 -1
  83. package/build/lib/subcommands/pbcopy.d.ts +17 -0
  84. package/build/lib/subcommands/pbcopy.d.ts.map +1 -0
  85. package/build/lib/subcommands/pbcopy.js +26 -20
  86. package/build/lib/subcommands/pbcopy.js.map +1 -1
  87. package/build/lib/subcommands/pbpaste.d.ts +17 -0
  88. package/build/lib/subcommands/pbpaste.d.ts.map +1 -0
  89. package/build/lib/subcommands/pbpaste.js +20 -16
  90. package/build/lib/subcommands/pbpaste.js.map +1 -1
  91. package/build/lib/subcommands/privacy.d.ts +55 -0
  92. package/build/lib/subcommands/privacy.d.ts.map +1 -0
  93. package/build/lib/subcommands/privacy.js +60 -18
  94. package/build/lib/subcommands/privacy.js.map +1 -1
  95. package/build/lib/subcommands/push.d.ts +25 -0
  96. package/build/lib/subcommands/push.d.ts.map +1 -0
  97. package/build/lib/subcommands/push.js +41 -24
  98. package/build/lib/subcommands/push.js.map +1 -1
  99. package/build/lib/subcommands/shutdown.d.ts +12 -0
  100. package/build/lib/subcommands/shutdown.d.ts.map +1 -0
  101. package/build/lib/subcommands/shutdown.js +47 -22
  102. package/build/lib/subcommands/shutdown.js.map +1 -1
  103. package/build/lib/subcommands/spawn.d.ts +26 -0
  104. package/build/lib/subcommands/spawn.d.ts.map +1 -0
  105. package/build/lib/subcommands/spawn.js +42 -26
  106. package/build/lib/subcommands/spawn.js.map +1 -1
  107. package/build/lib/subcommands/terminate.d.ts +15 -0
  108. package/build/lib/subcommands/terminate.d.ts.map +1 -0
  109. package/build/lib/subcommands/terminate.js +16 -12
  110. package/build/lib/subcommands/terminate.js.map +1 -1
  111. package/build/lib/subcommands/ui.d.ts +24 -0
  112. package/build/lib/subcommands/ui.d.ts.map +1 -0
  113. package/build/lib/subcommands/ui.js +32 -20
  114. package/build/lib/subcommands/ui.js.map +1 -1
  115. package/build/lib/subcommands/uninstall.d.ts +16 -0
  116. package/build/lib/subcommands/uninstall.d.ts.map +1 -0
  117. package/build/lib/subcommands/uninstall.js +17 -12
  118. package/build/lib/subcommands/uninstall.js.map +1 -1
  119. package/lib/simctl.js +13 -3
  120. package/lib/subcommands/addmedia.js +1 -1
  121. package/lib/subcommands/bootstatus.js +2 -2
  122. package/lib/subcommands/create.js +2 -2
  123. package/lib/subcommands/erase.js +1 -1
  124. package/lib/subcommands/keychain.js +2 -2
  125. package/lib/subcommands/launch.js +1 -0
  126. package/lib/subcommands/list.js +6 -6
  127. package/lib/subcommands/location.js +1 -1
  128. package/lib/subcommands/openurl.js +1 -1
  129. package/lib/subcommands/spawn.js +2 -2
  130. package/package.json +28 -17
@@ -1 +1 @@
1
- {"version":3,"file":"simctl.js","names":["_lodash","_interopRequireDefault","require","_index","_which","_logger","_interopRequireWildcard","_helpers","_teen_process","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","SIMCTL_ENV_PREFIX","DEFAULT_OPTS","xcrun","path","execTimeout","DEFAULT_EXEC_TIMEOUT","logErrors","Simctl","constructor","opts","_","cloneDeep","defaultsDeep","keys","_udid","isNil","udid","_devicesSetPath","devicesSetPath","value","requireUdid","commandName","Error","requireXcrun","xcrunBinary","getXcrunBinary","which","e","exec","subcommand","args","env","asynchronous","encoding","architectures","defaults","mapKeys","startsWith","process","execOpts","timeout","execArgs","isEmpty","archArgs","flatMap","isArray","map","arch","SubProcess","tpExec","stderr","msg","trim","log","debug","LOG_PREFIX","message","exports","fnName","fn","toPairs","subcommands","_default"],"sources":["../../lib/simctl.js"],"sourcesContent":["import _ from 'lodash';\nimport subcommands from './subcommands/index.js';\nimport which from 'which';\nimport log, { LOG_PREFIX } from './logger';\nimport {\n DEFAULT_EXEC_TIMEOUT, getXcrunBinary,\n} from './helpers';\nimport { exec as tpExec, SubProcess } from 'teen_process';\n\nconst SIMCTL_ENV_PREFIX = 'SIMCTL_CHILD_';\nconst DEFAULT_OPTS = {\n xcrun: {\n path: null,\n },\n execTimeout: DEFAULT_EXEC_TIMEOUT,\n logErrors: true,\n};\n\n/**\n * @typedef {Object} ExecOpts\n * @property {string[]} args [[]] - The list of additional subcommand arguments.\n * It's empty by default.\n * @property {Object} env [{}] - Environment variables mapping. All these variables\n * will be passed Simulator and used in the executing function.\n * @property {boolean} logErrors [true] - Set it to _false_ to throw execution errors\n * immediately without logging any additional information.\n * @property {boolean} asynchronous [false] - Whether to execute the given command\n * 'synchronously' or 'asynchronously'. Affects the returned result of the function.\n * @property {string?} encoding - Explicitly sets streams encoding for the executed\n * command input and outputs.\n * @property {string|string[]} architectures - One or more architecture names to be enforced while\n * executing xcrun. See https://github.com/appium/appium/issues/18966 for more details.\n */\n\n\n/**\n * @typedef {Object} SimctlOpts\n * @property {Object?} xcrun - The xcrun properties. Currently only one property\n * is supported, which is `path` and it by default contains `null`, which enforces\n * the instance to automatically detect the full path to `xcrun` tool and to throw\n * an exception if it cannot be detected. If the path is set upon instance creation\n * then it is going to be used by `exec` and no autodetection will happen.\n * @property {number} execTimeout [600000] - The maximum number of milliseconds\n * to wait for single synchronous xcrun command.\n * @property {boolean} logErrors [true] - Whether to wire xcrun error messages\n * into debug log before throwing them.\n * @property {string?} udid - The unique identifier of the current device, which is\n * going to be implicitly passed to all methods, which require it. It can either be set\n * upon instance creation if it is already known in advance or later when/if needed via the\n * corresponding instance setter.\n * @property {string?} devicesSetPath - Full path to the set of devices that you want to manage.\n * By default this path usually equals to ~/Library/Developer/CoreSimulator/Devices\n */\n\n\nclass Simctl {\n /**\n * @param {SimctlOpts} opts\n */\n constructor (opts = {}) {\n opts = _.cloneDeep(opts);\n _.defaultsDeep(opts, DEFAULT_OPTS);\n for (const key of _.keys(DEFAULT_OPTS)) {\n this[key] = opts[key];\n }\n this._udid = _.isNil(opts.udid) ? null : opts.udid;\n this._devicesSetPath = _.isNil(opts.devicesSetPath) ? null : opts.devicesSetPath;\n }\n\n set udid (value) {\n this._udid = value;\n }\n\n get udid () {\n return this._udid;\n }\n\n set devicesSetPath (value) {\n this._devicesSetPath = value;\n }\n\n get devicesSetPath () {\n return this._devicesSetPath;\n }\n\n requireUdid (commandName = null) {\n if (!this.udid) {\n throw new Error(`udid is required to be set for ` +\n (commandName ? `the '${commandName}' command` : 'this simctl command'));\n }\n return this.udid;\n }\n\n async requireXcrun () {\n const xcrunBinary = getXcrunBinary();\n\n if (!this.xcrun.path) {\n try {\n this.xcrun.path = await which(xcrunBinary);\n } catch (e) {\n throw new Error(`${xcrunBinary} tool has not been found in PATH. ` +\n `Are Xcode developers tools installed?`);\n }\n }\n return this.xcrun.path;\n }\n\n /**\n * Execute the particular simctl command.\n *\n * @param {string} subcommand - One of available simctl subcommands.\n * Execute `xcrun simctl` in Terminal to see the full list\n * of available subcommands.\n * @param {ExecOpts?} opts\n * @return {Promise<ExecResult|SubProcess>} Either the result of teen process's `exec` or\n * `SubProcess` instance depending of `opts.asynchronous` value.\n * @throws {Error} If the simctl subcommand command returns non-zero return code.\n */\n async exec (subcommand, opts = {}) {\n let {\n args = [],\n env = {},\n asynchronous = false,\n encoding,\n logErrors = true,\n architectures,\n } = opts;\n // run a particular simctl command\n args = ['simctl',\n ...(this.devicesSetPath ? ['--set', this.devicesSetPath] : []),\n subcommand,\n ...args\n ];\n // Prefix all passed in environment variables with 'SIMCTL_CHILD_', simctl\n // will then pass these to the child (spawned) process.\n env = _.defaults(\n _.mapKeys(env,\n (value, key) => _.startsWith(key, SIMCTL_ENV_PREFIX) ? key : `${SIMCTL_ENV_PREFIX}${key}`),\n process.env);\n\n const execOpts = {\n env,\n encoding,\n };\n if (!asynchronous) {\n execOpts.timeout = this.execTimeout;\n }\n const xcrun = await this.requireXcrun();\n try {\n let execArgs = [xcrun, args, execOpts];\n if (!_.isEmpty(architectures)) {\n const archArgs = _.flatMap(\n (_.isArray(architectures) ? architectures : [architectures]).map((arch) => ['-arch', arch])\n );\n execArgs = ['arch', [...archArgs, xcrun, ...args], execOpts];\n }\n return asynchronous ? new SubProcess(...execArgs) : await tpExec(...execArgs);\n } catch (e) {\n if (!this.logErrors || !logErrors) {\n // if we don't want to see the errors, just throw and allow the calling\n // code do what it wants\n } else if (e.stderr) {\n const msg = `Error running '${subcommand}': ${e.stderr.trim()}`;\n log.debug(LOG_PREFIX, msg);\n e.message = msg;\n } else {\n log.debug(LOG_PREFIX, e.message);\n }\n throw e;\n }\n }\n}\n\n\n// add all the subcommands to the Simctl prototype\nfor (const [fnName, fn] of _.toPairs(subcommands)) {\n Simctl.prototype[fnName] = fn;\n}\n\nexport default Simctl;\nexport { Simctl };\n"],"mappings":";;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAGA,IAAAM,aAAA,GAAAN,OAAA;AAA0D,SAAAO,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAJ,wBAAAQ,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAA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AG,kBAAkB,UAAU,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;gBAChE,gBAAG,CAAC,KAAK,CAAC,mBAAU,EAAE,GAAG,CAAC,CAAC;gBAC3B,CAAC,CAAC,OAAO,GAAG,GAAG,CAAC;aACjB;iBAAM;gBACL,gBAAG,CAAC,KAAK,CAAC,mBAAU,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;aAClC;YACD,MAAM,CAAC,CAAC;SACT;IACH,CAAC;CACF;AASQ,wBAAM;AANf,kDAAkD;AAClD,KAAK,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,gBAAC,CAAC,OAAO,CAAC,kBAAW,CAAC,EAAE;IACjD,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;CAC/B;AAED,kBAAe,MAAM,CAAC"}
@@ -0,0 +1,16 @@
1
+ export default commands;
2
+ declare namespace commands {
3
+ /**
4
+ * Add the particular media file to Simulator's library.
5
+ * It is required that Simulator is in _booted_ state.
6
+ *
7
+ * @param {string} filePath - Full path to a media file on the local
8
+ * file system.
9
+ * @return {Promise<import('teen_process').TeenProcessExecResult>} Command execution result.
10
+ * @throws {Error} If the corresponding simctl subcommand command
11
+ * returns non-zero return code.
12
+ * @throws {Error} If the `udid` instance property is unset
13
+ */
14
+ function addMedia(filePath: string): Promise<import("teen_process").TeenProcessExecResult<any>>;
15
+ }
16
+ //# sourceMappingURL=addmedia.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addmedia.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/addmedia.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;OAUG;IACH,gGAIC"}
@@ -1,16 +1,21 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- require("source-map-support/register");
2
+ Object.defineProperty(exports, "__esModule", { value: true });
8
3
  const commands = {};
4
+ /**
5
+ * Add the particular media file to Simulator's library.
6
+ * It is required that Simulator is in _booted_ state.
7
+ *
8
+ * @param {string} filePath - Full path to a media file on the local
9
+ * file system.
10
+ * @return {Promise<import('teen_process').TeenProcessExecResult>} Command execution result.
11
+ * @throws {Error} If the corresponding simctl subcommand command
12
+ * returns non-zero return code.
13
+ * @throws {Error} If the `udid` instance property is unset
14
+ */
9
15
  commands.addMedia = async function addMedia(filePath) {
10
- return await this.exec('addmedia', {
11
- args: [this.requireUdid('addmedia'), filePath]
12
- });
16
+ return await this.exec('addmedia', {
17
+ args: [this.requireUdid('addmedia'), filePath],
18
+ });
13
19
  };
14
- var _default = commands;
15
- exports.default = _default;
16
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJjb21tYW5kcyIsImFkZE1lZGlhIiwiZmlsZVBhdGgiLCJleGVjIiwiYXJncyIsInJlcXVpcmVVZGlkIiwiX2RlZmF1bHQiLCJleHBvcnRzIiwiZGVmYXVsdCJdLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9zdWJjb21tYW5kcy9hZGRtZWRpYS5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJjb25zdCBjb21tYW5kcyA9IHt9O1xuXG4vKipcbiAqIEFkZCB0aGUgcGFydGljdWxhciBtZWRpYSBmaWxlIHRvIFNpbXVsYXRvcidzIGxpYnJhcnkuXG4gKiBJdCBpcyByZXF1aXJlZCB0aGF0IFNpbXVsYXRvciBpcyBpbiBfYm9vdGVkXyBzdGF0ZS5cbiAqXG4gKiBAcGFyYW0ge3N0cmluZ30gZmlsZVBhdGggLSBGdWxsIHBhdGggdG8gYSBtZWRpYSBmaWxlIG9uIHRoZSBsb2NhbFxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsZSBzeXN0ZW0uXG4gKiBAcmV0dXJuIHtQcm9taXNlPEV4ZWNSZXN1bHQ+fSBDb21tYW5kIGV4ZWN1dGlvbiByZXN1bHQuXG4gKiBAdGhyb3dzIHtFcnJvcn0gSWYgdGhlIGNvcnJlc3BvbmRpbmcgc2ltY3RsIHN1YmNvbW1hbmQgY29tbWFuZFxuICogICAgICAgICAgICAgICAgIHJldHVybnMgbm9uLXplcm8gcmV0dXJuIGNvZGUuXG4gKiBAdGhyb3dzIHtFcnJvcn0gSWYgdGhlIGB1ZGlkYCBpbnN0YW5jZSBwcm9wZXJ0eSBpcyB1bnNldFxuICovXG5jb21tYW5kcy5hZGRNZWRpYSA9IGFzeW5jIGZ1bmN0aW9uIGFkZE1lZGlhIChmaWxlUGF0aCkge1xuICByZXR1cm4gYXdhaXQgdGhpcy5leGVjKCdhZGRtZWRpYScsIHtcbiAgICBhcmdzOiBbdGhpcy5yZXF1aXJlVWRpZCgnYWRkbWVkaWEnKSwgZmlsZVBhdGhdLFxuICB9KTtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IGNvbW1hbmRzO1xuIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUEsTUFBTUEsUUFBUSxHQUFHLENBQUMsQ0FBQztBQWFuQkEsUUFBUSxDQUFDQyxRQUFRLEdBQUcsZUFBZUEsUUFBUUEsQ0FBRUMsUUFBUSxFQUFFO0VBQ3JELE9BQU8sTUFBTSxJQUFJLENBQUNDLElBQUksQ0FBQyxVQUFVLEVBQUU7SUFDakNDLElBQUksRUFBRSxDQUFDLElBQUksQ0FBQ0MsV0FBVyxDQUFDLFVBQVUsQ0FBQyxFQUFFSCxRQUFRO0VBQy9DLENBQUMsQ0FBQztBQUNKLENBQUM7QUFBQyxJQUFBSSxRQUFBLEdBRWFOLFFBQVE7QUFBQU8sT0FBQSxDQUFBQyxPQUFBLEdBQUFGLFFBQUEifQ==
20
+ exports.default = commands;
21
+ //# sourceMappingURL=addmedia.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"addmedia.js","names":["commands","addMedia","filePath","exec","args","requireUdid","_default","exports","default"],"sources":["../../../lib/subcommands/addmedia.js"],"sourcesContent":["const commands = {};\n\n/**\n * Add the particular media file to Simulator's library.\n * It is required that Simulator is in _booted_ state.\n *\n * @param {string} filePath - Full path to a media file on the local\n * file system.\n * @return {Promise<ExecResult>} Command execution result.\n * @throws {Error} If the corresponding simctl subcommand command\n * returns non-zero return code.\n * @throws {Error} If the `udid` instance property is unset\n */\ncommands.addMedia = async function addMedia (filePath) {\n return await this.exec('addmedia', {\n args: [this.requireUdid('addmedia'), filePath],\n });\n};\n\nexport default commands;\n"],"mappings":";;;;;;;AAAA,MAAMA,QAAQ,GAAG,CAAC,CAAC;AAanBA,QAAQ,CAACC,QAAQ,GAAG,eAAeA,QAAQA,CAAEC,QAAQ,EAAE;EACrD,OAAO,MAAM,IAAI,CAACC,IAAI,CAAC,UAAU,EAAE;IACjCC,IAAI,EAAE,CAAC,IAAI,CAACC,WAAW,CAAC,UAAU,CAAC,EAAEH,QAAQ;EAC/C,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAI,QAAA,GAEaN,QAAQ;AAAAO,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"file":"addmedia.js","sourceRoot":"","sources":["../../../lib/subcommands/addmedia.js"],"names":[],"mappings":";;AAAA,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,QAAQ,CAAC,QAAQ,GAAG,KAAK,UAAU,QAAQ,CAAE,QAAQ;IACnD,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;QACjC,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC;KAC/C,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
@@ -0,0 +1,45 @@
1
+ export default commands;
2
+ declare namespace commands {
3
+ /**
4
+ * Invoke hidden appinfo subcommand to get the information
5
+ * about applications installed on Simulator, including
6
+ * system applications ({@link getAppContainer} does not "see" such apps).
7
+ * Simulator server should be in 'booted' state for this call to work properly.
8
+ * The tool is only available since Xcode SDK 8.1
9
+ *
10
+ * @param {string} bundleId - The bundle identifier of the target application.
11
+ * @return {Promise<string>} The information about installed application.
12
+ *
13
+ * Example output for non-existing application container:
14
+ * <pre>
15
+ * {
16
+ * CFBundleIdentifier = "com.apple.MobileSafari";
17
+ * GroupContainers = {
18
+ * };
19
+ * SBAppTags = (
20
+ * );
21
+ * }
22
+ * </pre>
23
+ *
24
+ * Example output for an existing system application container:
25
+ * <pre>
26
+ * {
27
+ * ApplicationType = Hidden;
28
+ * Bundle = "file:///Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/CoreServices/SpringBoard.app";
29
+ * CFBundleDisplayName = SpringBoard;
30
+ * CFBundleExecutable = SpringBoard;
31
+ * CFBundleIdentifier = "com.apple.springboard";
32
+ * CFBundleName = SpringBoard;
33
+ * CFBundleVersion = 50;
34
+ * GroupContainers = {
35
+ * };
36
+ * Path = "/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/CoreServices/SpringBoard.app";
37
+ * SBAppTags = (
38
+ * );
39
+ * }
40
+ * </pre>
41
+ * @throws {Error} If the `udid` instance property is unset
42
+ */
43
+ function appInfo(bundleId: string): Promise<string>;
44
+ }
45
+ //# sourceMappingURL=appinfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appinfo.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/appinfo.js"],"names":[],"mappings":";;IAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,oDAKC"}
@@ -1,19 +1,51 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- require("source-map-support/register");
2
+ Object.defineProperty(exports, "__esModule", { value: true });
8
3
  const commands = {};
4
+ /**
5
+ * Invoke hidden appinfo subcommand to get the information
6
+ * about applications installed on Simulator, including
7
+ * system applications ({@link getAppContainer} does not "see" such apps).
8
+ * Simulator server should be in 'booted' state for this call to work properly.
9
+ * The tool is only available since Xcode SDK 8.1
10
+ *
11
+ * @param {string} bundleId - The bundle identifier of the target application.
12
+ * @return {Promise<string>} The information about installed application.
13
+ *
14
+ * Example output for non-existing application container:
15
+ * <pre>
16
+ * {
17
+ * CFBundleIdentifier = "com.apple.MobileSafari";
18
+ * GroupContainers = {
19
+ * };
20
+ * SBAppTags = (
21
+ * );
22
+ * }
23
+ * </pre>
24
+ *
25
+ * Example output for an existing system application container:
26
+ * <pre>
27
+ * {
28
+ * ApplicationType = Hidden;
29
+ * Bundle = "file:///Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/CoreServices/SpringBoard.app";
30
+ * CFBundleDisplayName = SpringBoard;
31
+ * CFBundleExecutable = SpringBoard;
32
+ * CFBundleIdentifier = "com.apple.springboard";
33
+ * CFBundleName = SpringBoard;
34
+ * CFBundleVersion = 50;
35
+ * GroupContainers = {
36
+ * };
37
+ * Path = "/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/CoreServices/SpringBoard.app";
38
+ * SBAppTags = (
39
+ * );
40
+ * }
41
+ * </pre>
42
+ * @throws {Error} If the `udid` instance property is unset
43
+ */
9
44
  commands.appInfo = async function appInfo(bundleId) {
10
- const {
11
- stdout
12
- } = await this.exec('appinfo', {
13
- args: [this.requireUdid('appinfo'), bundleId]
14
- });
15
- return (stdout || '').trim();
45
+ const { stdout } = await this.exec('appinfo', {
46
+ args: [this.requireUdid('appinfo'), bundleId],
47
+ });
48
+ return (stdout || '').trim();
16
49
  };
17
- var _default = commands;
18
- exports.default = _default;
19
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJjb21tYW5kcyIsImFwcEluZm8iLCJidW5kbGVJZCIsInN0ZG91dCIsImV4ZWMiLCJhcmdzIiwicmVxdWlyZVVkaWQiLCJ0cmltIiwiX2RlZmF1bHQiLCJleHBvcnRzIiwiZGVmYXVsdCJdLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9zdWJjb21tYW5kcy9hcHBpbmZvLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImNvbnN0IGNvbW1hbmRzID0ge307XG5cbi8qKlxuICogSW52b2tlIGhpZGRlbiBhcHBpbmZvIHN1YmNvbW1hbmQgdG8gZ2V0IHRoZSBpbmZvcm1hdGlvblxuICogYWJvdXQgYXBwbGljYXRpb25zIGluc3RhbGxlZCBvbiBTaW11bGF0b3IsIGluY2x1ZGluZ1xuICogc3lzdGVtIGFwcGxpY2F0aW9ucyAoe0BsaW5rIGdldEFwcENvbnRhaW5lcn0gZG9lcyBub3QgXCJzZWVcIiBzdWNoIGFwcHMpLlxuICogU2ltdWxhdG9yIHNlcnZlciBzaG91bGQgYmUgaW4gJ2Jvb3RlZCcgc3RhdGUgZm9yIHRoaXMgY2FsbCB0byB3b3JrIHByb3Blcmx5LlxuICogVGhlIHRvb2wgaXMgb25seSBhdmFpbGFibGUgc2luY2UgWGNvZGUgU0RLIDguMVxuICpcbiAqIEBwYXJhbSB7c3RyaW5nfSBidW5kbGVJZCAtIFRoZSBidW5kbGUgaWRlbnRpZmllciBvZiB0aGUgdGFyZ2V0IGFwcGxpY2F0aW9uLlxuICogQHJldHVybiB7UHJvbWlzZTxzdHJpbmc+fSBUaGUgaW5mb3JtYXRpb24gYWJvdXQgaW5zdGFsbGVkIGFwcGxpY2F0aW9uLlxuICpcbiAqIEV4YW1wbGUgb3V0cHV0IGZvciBub24tZXhpc3RpbmcgYXBwbGljYXRpb24gY29udGFp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DLENBQUM7RUFDRixPQUFPLENBQUNDLE1BQU0sSUFBSSxFQUFFLEVBQUVJLElBQUksQ0FBQyxDQUFDO0FBQzlCLENBQUM7QUFBQyxJQUFBQyxRQUFBLEdBRWFSLFFBQVE7QUFBQVMsT0FBQSxDQUFBQyxPQUFBLEdBQUFGLFFBQUEifQ==
50
+ exports.default = commands;
51
+ //# sourceMappingURL=appinfo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"appinfo.js","names":["commands","appInfo","bundleId","stdout","exec","args","requireUdid","trim","_default","exports","default"],"sources":["../../../lib/subcommands/appinfo.js"],"sourcesContent":["const commands = {};\n\n/**\n * Invoke hidden appinfo subcommand to get the information\n * about applications installed on Simulator, including\n * system applications ({@link getAppContainer} does not \"see\" such apps).\n * Simulator server should be in 'booted' state for this call to work properly.\n * The tool is only available since Xcode SDK 8.1\n *\n * @param {string} bundleId - The bundle identifier of the target application.\n * @return {Promise<string>} The information about installed application.\n *\n * Example output for non-existing application container:\n * <pre>\n * {\n * CFBundleIdentifier = \"com.apple.MobileSafari\";\n * GroupContainers = {\n * };\n * SBAppTags = (\n * );\n * }\n * </pre>\n *\n * Example output for an existing system application container:\n * <pre>\n * {\n * ApplicationType = Hidden;\n * Bundle = \"file:///Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/CoreServices/SpringBoard.app\";\n * CFBundleDisplayName = SpringBoard;\n * CFBundleExecutable = SpringBoard;\n * CFBundleIdentifier = \"com.apple.springboard\";\n * CFBundleName = SpringBoard;\n * CFBundleVersion = 50;\n * GroupContainers = {\n * };\n * Path = \"/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/CoreServices/SpringBoard.app\";\n * SBAppTags = (\n * );\n * }\n * </pre>\n * @throws {Error} If the `udid` instance property is unset\n */\ncommands.appInfo = async function appInfo (bundleId) {\n const {stdout} = await this.exec('appinfo', {\n args: [this.requireUdid('appinfo'), bundleId],\n });\n return (stdout || '').trim();\n};\n\nexport default commands;\n"],"mappings":";;;;;;;AAAA,MAAMA,QAAQ,GAAG,CAAC,CAAC;AA0CnBA,QAAQ,CAACC,OAAO,GAAG,eAAeA,OAAOA,CAAEC,QAAQ,EAAE;EACnD,MAAM;IAACC;EAAM,CAAC,GAAG,MAAM,IAAI,CAACC,IAAI,CAAC,SAAS,EAAE;IAC1CC,IAAI,EAAE,CAAC,IAAI,CAACC,WAAW,CAAC,SAAS,CAAC,EAAEJ,QAAQ;EAC9C,CAAC,CAAC;EACF,OAAO,CAACC,MAAM,IAAI,EAAE,EAAEI,IAAI,CAAC,CAAC;AAC9B,CAAC;AAAC,IAAAC,QAAA,GAEaR,QAAQ;AAAAS,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"file":"appinfo.js","sourceRoot":"","sources":["../../../lib/subcommands/appinfo.js"],"names":[],"mappings":";;AAAA,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,QAAQ,CAAC,OAAO,GAAG,KAAK,UAAU,OAAO,CAAE,QAAQ;IACjD,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;QAC1C,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC;KAC9C,CAAC,CAAC;IACH,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AAC/B,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
@@ -0,0 +1,12 @@
1
+ export default commands;
2
+ declare namespace commands {
3
+ /**
4
+ * Boot the particular Simulator if it is not running.
5
+ *
6
+ * @throws {Error} If the corresponding simctl subcommand command
7
+ * returns non-zero return code.
8
+ * @throws {Error} If the `udid` instance property is unset
9
+ */
10
+ function bootDevice(): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=boot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boot.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/boot.js"],"names":[],"mappings":";;IAMA;;;;;;OAMG;IACH,qCAWC"}
@@ -1,28 +1,53 @@
1
1
  "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
6
17
  });
7
- exports.default = void 0;
8
- require("source-map-support/register");
9
- var _lodash = _interopRequireDefault(require("lodash"));
10
- var _logger = _interopRequireWildcard(require("../logger"));
11
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const lodash_1 = __importDefault(require("lodash"));
30
+ const logger_1 = __importStar(require("../logger"));
13
31
  const commands = {};
32
+ /**
33
+ * Boot the particular Simulator if it is not running.
34
+ *
35
+ * @throws {Error} If the corresponding simctl subcommand command
36
+ * returns non-zero return code.
37
+ * @throws {Error} If the `udid` instance property is unset
38
+ */
14
39
  commands.bootDevice = async function bootDevice() {
15
- try {
16
- await this.exec('boot', {
17
- args: [this.requireUdid('boot')]
18
- });
19
- } catch (e) {
20
- if (_lodash.default.includes(e.message, 'Unable to boot device in current state: Booted')) {
21
- throw e;
40
+ try {
41
+ await this.exec('boot', {
42
+ args: [this.requireUdid('boot')]
43
+ });
44
+ }
45
+ catch (e) {
46
+ if (lodash_1.default.includes(e.message, 'Unable to boot device in current state: Booted')) {
47
+ throw e;
48
+ }
49
+ logger_1.default.debug(logger_1.LOG_PREFIX, `Simulator already in 'Booted' state. Continuing`);
22
50
  }
23
- _logger.default.debug(_logger.LOG_PREFIX, `Simulator already in 'Booted' state. Continuing`);
24
- }
25
51
  };
26
- var _default = commands;
27
- exports.default = _default;
28
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbG9kYXNoIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsInJlcXVpcmUiLCJfbG9nZ2VyIiwiX2ludGVyb3BSZXF1aXJlV2lsZGNhcmQiLCJfZ2V0UmVxdWlyZVdpbGRjYXJkQ2FjaGUiLCJub2RlSW50ZXJvcCIsIldlYWtNYXAiLCJjYWNoZUJhYmVsSW50ZXJvcCIsImNhY2hlTm9kZUludGVyb3AiLCJvYmoiLCJfX2VzTW9kdWxlIiwiZGVmYXVsdCIsImNhY2hlIiwiaGFzIiwiZ2V0IiwibmV3T2JqIiwiaGFzUHJvcGVydHlEZXNjcmlwdG9yIiwiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IiLCJrZXkiLCJwcm90b3R5cGUiLCJoYXNPd25Qcm9wZXJ0eSIsImNhbGwiLCJkZXNjIiwic2V0IiwiY29tbWFuZHMiLCJib290RGV2aWNlIiwiZXhlYyIsImFyZ3MiLCJyZXF1aXJlVWRpZCIsImUiLCJfIiwiaW5jbHVkZXMiLCJtZXNzYWdlIiwibG9nIiwiZGVidWciLCJMT0dfUFJFRklYIiwiX2RlZmF1bHQiLCJleHBvcnRzIl0sInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL3N1YmNvbW1hbmRzL2Jvb3QuanMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IF8gZnJvbSAnbG9kYXNoJztcbmltcG9ydCBsb2csIHsgTE9HX1BSRUZJWCB9IGZyb20gJy4uL2xvZ2dlcic7XG5cblxuY29uc3QgY29tbWFuZHMgPSB7fTtcblxuLyoqXG4gKiBCb290IHRoZSBwYXJ0aWN1bGFyIFNpbXVsYXRvciBpZiBpdCBpcyBub3QgcnVubmluZy5cbiAqXG4gKiBAdGhyb3dzIH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FDO0FBU25CQSxRQUFRLENBQUNDLFVBQVUsR0FBRyxlQUFlQSxVQUFVQSxDQUFBLEVBQUk7RUFDakQsSUFBSTtJQUNGLE1BQU0sSUFBSSxDQUFDQyxJQUFJLENBQUMsTUFBTSxFQUFFO01BQ3RCQyxJQUFJLEVBQUUsQ0FBQyxJQUFJLENBQUNDLFdBQVcsQ0FBQyxNQUFNLENBQUM7SUFDakMsQ0FBQyxDQUFDO0VBQ0osQ0FBQyxDQUFDLE9BQU9DLENBQUMsRUFBRTtJQUNWLElBQUlDLGVBQUMsQ0FBQ0MsUUFBUSxDQUFDRixDQUFDLENBQUNHLE9BQU8sRUFBRSxnREFBZ0QsQ0FBQyxFQUFFO01BQzNFLE1BQU1ILENBQUM7SUFDVDtJQUNBSSxlQUFHLENBQUNDLEtBQUssQ0FBQ0Msa0JBQVUsRUFBRyxpREFBZ0QsQ0FBQztFQUMxRTtBQUNGLENBQUM7QUFBQyxJQUFBQyxRQUFBLEdBRWFaLFFBQVE7QUFBQWEsT0FBQSxDQUFBNUIsT0FBQSxHQUFBMkIsUUFBQSJ9
52
+ exports.default = commands;
53
+ //# sourceMappingURL=boot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"boot.js","names":["_lodash","_interopRequireDefault","require","_logger","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","commands","bootDevice","exec","args","requireUdid","e","_","includes","message","log","debug","LOG_PREFIX","_default","exports"],"sources":["../../../lib/subcommands/boot.js"],"sourcesContent":["import _ from 'lodash';\nimport log, { LOG_PREFIX } from '../logger';\n\n\nconst commands = {};\n\n/**\n * Boot the particular Simulator if it is not running.\n *\n * @throws {Error} If the corresponding simctl subcommand command\n * returns non-zero return code.\n * @throws {Error} If the `udid` instance property is unset\n */\ncommands.bootDevice = async function bootDevice () {\n try {\n await this.exec('boot', {\n args: [this.requireUdid('boot')]\n });\n } catch (e) {\n if (_.includes(e.message, 'Unable to boot device in current state: Booted')) {\n throw e;\n }\n log.debug(LOG_PREFIX, `Simulator already in 'Booted' state. Continuing`);\n }\n};\n\nexport default commands;\n"],"mappings":";;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA4C,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAF,wBAAAM,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAA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AAC,mBAAU,EAAE,iDAAiD,CAAC,CAAC;KAC1E;AACH,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
@@ -0,0 +1,56 @@
1
+ export default commands;
2
+ export type BootMonitorOptions = {
3
+ /**
4
+ * [240000] - Simulator booting timeout in ms.
5
+ */
6
+ timeout: number;
7
+ /**
8
+ * - This event is fired when data migration stage starts.
9
+ */
10
+ onWaitingDataMigration: Function | null;
11
+ /**
12
+ * - This event is fired when system app wait stage starts.
13
+ */
14
+ onWaitingSystemApp: Function | null;
15
+ /**
16
+ * - This event is fired when Simulator is fully booted.
17
+ */
18
+ onFinished: Function | null;
19
+ /**
20
+ * - This event is fired when there was an error while monitoring the booting process
21
+ * or when the timeout has expired.
22
+ */
23
+ onError: Function | null;
24
+ /**
25
+ * [false] Whether to preboot the Simulator
26
+ * if this command is called and it is not already in booted or booting state.
27
+ */
28
+ shouldPreboot: boolean;
29
+ };
30
+ declare namespace commands {
31
+ /**
32
+ * @typedef {Object} BootMonitorOptions
33
+ * @property {number} timeout [240000] - Simulator booting timeout in ms.
34
+ * @property {Function?} onWaitingDataMigration - This event is fired when data migration stage starts.
35
+ * @property {Function?} onWaitingSystemApp - This event is fired when system app wait stage starts.
36
+ * @property {Function?} onFinished - This event is fired when Simulator is fully booted.
37
+ * @property {Function?} onError - This event is fired when there was an error while monitoring the booting process
38
+ * or when the timeout has expired.
39
+ * @property {boolean} shouldPreboot [false] Whether to preboot the Simulator
40
+ * if this command is called and it is not already in booted or booting state.
41
+ */
42
+ /**
43
+ * Start monitoring for boot status of the particular Simulator.
44
+ * If onFinished property is not set then the method will block
45
+ * until Simulator booting is completed.
46
+ * The method is only available since Xcode8.
47
+ *
48
+ * @param {Partial<BootMonitorOptions>} opts - Monitoring options.
49
+ * @returns {Promise<import('teen_process').SubProcess>} The instance of the corresponding monitoring process.
50
+ * @throws {Error} If the Simulator fails to finish booting within the given timeout and onFinished
51
+ * property is not set.
52
+ * @throws {Error} If the `udid` instance property is unset
53
+ */
54
+ function startBootMonitor(opts?: Partial<BootMonitorOptions>): Promise<import("teen_process").SubProcess>;
55
+ }
56
+ //# sourceMappingURL=bootstatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstatus.d.ts","sourceRoot":"","sources":["../../../lib/subcommands/bootstatus.js"],"names":[],"mappings":";;;;;aAQc,MAAM;;;;;;;;;;;;;;;;;;;;;;mBAMN,OAAO;;;IARrB;;;;;;;;;;OAUG;IAEH;;;;;;;;;;;OAWG;IACH,0GAgFC"}
@@ -1,95 +1,110 @@
1
1
  "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- require("source-map-support/register");
9
- var _logger = _interopRequireDefault(require("../logger"));
10
- var _asyncbox = require("asyncbox");
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const logger_1 = __importDefault(require("../logger"));
7
+ const asyncbox_1 = require("asyncbox");
11
8
  const commands = {};
9
+ /**
10
+ * @typedef {Object} BootMonitorOptions
11
+ * @property {number} timeout [240000] - Simulator booting timeout in ms.
12
+ * @property {Function?} onWaitingDataMigration - This event is fired when data migration stage starts.
13
+ * @property {Function?} onWaitingSystemApp - This event is fired when system app wait stage starts.
14
+ * @property {Function?} onFinished - This event is fired when Simulator is fully booted.
15
+ * @property {Function?} onError - This event is fired when there was an error while monitoring the booting process
16
+ * or when the timeout has expired.
17
+ * @property {boolean} shouldPreboot [false] Whether to preboot the Simulator
18
+ * if this command is called and it is not already in booted or booting state.
19
+ */
20
+ /**
21
+ * Start monitoring for boot status of the particular Simulator.
22
+ * If onFinished property is not set then the method will block
23
+ * until Simulator booting is completed.
24
+ * The method is only available since Xcode8.
25
+ *
26
+ * @param {Partial<BootMonitorOptions>} opts - Monitoring options.
27
+ * @returns {Promise<import('teen_process').SubProcess>} The instance of the corresponding monitoring process.
28
+ * @throws {Error} If the Simulator fails to finish booting within the given timeout and onFinished
29
+ * property is not set.
30
+ * @throws {Error} If the `udid` instance property is unset
31
+ */
12
32
  commands.startBootMonitor = async function startBootMonitor(opts = {}) {
13
- const {
14
- timeout = 240000,
15
- onWaitingDataMigration,
16
- onWaitingSystemApp,
17
- onFinished,
18
- onError,
19
- shouldPreboot
20
- } = opts;
21
- const udid = this.requireUdid('bootstatus');
22
- let status = '';
23
- let isBootingFinished = false;
24
- let error = null;
25
- let timeoutHandler = null;
26
- const args = [udid];
27
- if (shouldPreboot) {
28
- args.push('-b');
29
- }
30
- const bootMonitor = await this.exec('bootstatus', {
31
- args,
32
- asynchronous: true
33
- });
34
- bootMonitor.on('output', (stdout, stderr) => {
35
- status += stdout || stderr;
36
- if (stdout) {
37
- if (stdout.includes('Waiting on Data Migration') && onWaitingDataMigration) {
38
- onWaitingDataMigration();
39
- } else if (stdout.includes('Waiting on System App') && onWaitingSystemApp) {
40
- onWaitingSystemApp();
41
- }
42
- }
43
- });
44
- bootMonitor.on('exit', (code, signal) => {
45
- if (timeoutHandler) {
46
- clearTimeout(timeoutHandler);
47
- }
48
- if (code === 0) {
49
- if (onFinished) {
50
- onFinished();
51
- }
52
- isBootingFinished = true;
53
- } else {
54
- status = status || signal;
55
- error = new Error(status);
56
- if (onError) {
57
- onError(error);
58
- }
33
+ const { timeout = 240000, onWaitingDataMigration, onWaitingSystemApp, onFinished, onError, shouldPreboot, } = opts;
34
+ const udid = this.requireUdid('bootstatus');
35
+ let status = '';
36
+ let isBootingFinished = false;
37
+ let error = null;
38
+ let timeoutHandler = null;
39
+ const args = [udid];
40
+ if (shouldPreboot) {
41
+ args.push('-b');
59
42
  }
60
- });
61
- await bootMonitor.start(0);
62
- const stopMonitor = async () => {
63
- if (bootMonitor.isRunning) {
64
- try {
65
- await bootMonitor.stop();
66
- } catch (e) {
67
- _logger.default.warn(e.message);
68
- }
43
+ const bootMonitor = await this.exec('bootstatus', {
44
+ args,
45
+ asynchronous: true,
46
+ });
47
+ bootMonitor.on('output', (stdout, stderr) => {
48
+ status += stdout || stderr;
49
+ if (stdout) {
50
+ if (stdout.includes('Waiting on Data Migration') && onWaitingDataMigration) {
51
+ onWaitingDataMigration();
52
+ }
53
+ else if (stdout.includes('Waiting on System App') && onWaitingSystemApp) {
54
+ onWaitingSystemApp();
55
+ }
56
+ }
57
+ });
58
+ bootMonitor.on('exit', (code, signal) => {
59
+ if (timeoutHandler) {
60
+ clearTimeout(timeoutHandler);
61
+ }
62
+ if (code === 0) {
63
+ if (onFinished) {
64
+ onFinished();
65
+ }
66
+ isBootingFinished = true;
67
+ }
68
+ else {
69
+ status = status || signal;
70
+ error = new Error(status);
71
+ if (onError) {
72
+ onError(error);
73
+ }
74
+ }
75
+ });
76
+ await bootMonitor.start(0);
77
+ const stopMonitor = async () => {
78
+ if (bootMonitor.isRunning) {
79
+ try {
80
+ await bootMonitor.stop();
81
+ }
82
+ catch (e) {
83
+ logger_1.default.warn(e.message);
84
+ }
85
+ }
86
+ };
87
+ const start = process.hrtime();
88
+ if (onFinished) {
89
+ timeoutHandler = setTimeout(stopMonitor, timeout);
69
90
  }
70
- };
71
- const start = process.hrtime();
72
- if (onFinished) {
73
- timeoutHandler = setTimeout(stopMonitor, timeout);
74
- } else {
75
- try {
76
- await (0, _asyncbox.waitForCondition)(() => {
77
- if (error) {
78
- throw error;
91
+ else {
92
+ try {
93
+ await (0, asyncbox_1.waitForCondition)(() => {
94
+ if (error) {
95
+ throw error;
96
+ }
97
+ return isBootingFinished;
98
+ }, { waitMs: timeout, intervalMs: 500 });
99
+ }
100
+ catch (err) {
101
+ await stopMonitor();
102
+ const [seconds] = process.hrtime(start);
103
+ throw new Error(`The simulator ${udid} has failed to finish booting after ${seconds}s. ` +
104
+ `Original status: ${status}`);
79
105
  }
80
- return isBootingFinished;
81
- }, {
82
- waitMs: timeout,
83
- intervalMs: 500
84
- });
85
- } catch (err) {
86
- await stopMonitor();
87
- const [seconds] = process.hrtime(start);
88
- throw new Error(`The simulator ${udid} has failed to finish booting after ${seconds}s. ` + `Original status: ${status}`);
89
106
  }
90
- }
91
- return bootMonitor;
107
+ return bootMonitor;
92
108
  };
93
- var _default = commands;
94
- exports.default = _default;
95
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbG9nZ2VyIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsInJlcXVpcmUiLCJfYXN5bmNib3giLCJjb21tYW5kcyIsInN0YXJ0Qm9vdE1vbml0b3IiLCJvcHRzIiwidGltZW91dCIsIm9uV2FpdGluZ0RhdGFNaWdyYXRpb24iLCJvbldhaXRpbmdTeXN0ZW1BcHAiLCJvbkZpbmlzaGVkIiwib25FcnJvciIsInNob3VsZFByZWJvb3QiLCJ1ZGlkIiwicmVxdWlyZVVkaWQiLCJzdGF0dXMiLCJpc0Jvb3RpbmdGaW5pc2hlZCIsImVycm9yIiwidGltZW91dEhhbmRsZXIiLCJhcmdzIiwicHVzaCIsImJvb3RNb25pdG9yIiwiZXhlYyIsImFzeW5jaHJvbm91cyIsIm9uIiwic3Rkb3V0Iiwic3RkZXJyIiwiaW5jbHVkZXMiLCJjb2RlIiwic2lnbmFsIiwiY2xlYXJUaW1lb3V0IiwiRXJyb3IiLCJzdGFydCIsInN0b3BNb25pdG9yIiwiaXNSdW5uaW5nIiwic3RvcCIsImUiLCJsb2ciLCJ3YXJuIiwibWVzc2FnZSIsInByb2Nlc3MiLCJocnRpbWUiLCJzZXRUaW1lb3V0Iiwid2FpdEZvckNvbmRpdGlvbiIsIndhaXRNcyIsImludGVydmFsTXMiLCJlcnIiLCJzZWNvbmRzIiwiX2RlZmF1bHQiLCJleHBvcnRzIiwiZGVmYXVsdCJdLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9zdWJjb21tYW5kcy9ib290c3RhdHVzLmpzIl0sInNvdX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