{"id":19689950,"url":"https://github.com/tidev/titaniumlib","last_synced_at":"2025-08-25T23:03:56.086Z","repository":{"id":41958971,"uuid":"124893054","full_name":"tidev/titaniumlib","owner":"tidev","description":"Titanium SDK Utility Library","archived":false,"fork":false,"pushed_at":"2024-06-10T03:09:16.000Z","size":535,"stargazers_count":4,"open_issues_count":1,"forks_count":5,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-07-26T18:24:35.064Z","etag":null,"topics":["npm-package"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tidev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"tidev","liberapay":"tidev"}},"created_at":"2018-03-12T13:26:32.000Z","updated_at":"2024-05-28T15:33:00.000Z","dependencies_parsed_at":"2025-04-29T08:47:56.690Z","dependency_job_id":null,"html_url":"https://github.com/tidev/titaniumlib","commit_stats":null,"previous_names":["appcelerator/titaniumlib"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/tidev/titaniumlib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidev%2Ftitaniumlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidev%2Ftitaniumlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidev%2Ftitaniumlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidev%2Ftitaniumlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tidev","download_url":"https://codeload.github.com/tidev/titaniumlib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidev%2Ftitaniumlib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272144649,"owners_count":24881141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["npm-package"],"created_at":"2024-11-11T19:03:47.405Z","updated_at":"2025-08-25T23:03:56.063Z","avatar_url":"https://github.com/tidev.png","language":"JavaScript","funding_links":["https://github.com/sponsors/tidev","https://liberapay.com/tidev"],"categories":[],"sub_categories":[],"readme":"# Titanium SDK Library\n\nA library of Titanium SDK platform APIs.\n\n### Features\n\n * Detects installed Titanium SDKs and modules\n * Install or uninstall a Titanium SDKs\n\n### Roadmap\n\n * Create, build, and clean projects\n * `tiapp.xml` reader/writer\n * Build pipeline\n * Asset management\n\n## Options\n\n`titaniumlib`'s options are set via the `options` export.\n\n```js\nimport { options } from 'titaniumlib';\n\noptions.searchPaths = '/some/path';\n```\n\n| Name                           | Description                                                                            | Type                    | Default |\n| ------------------------------ | -------------------------------------------------------------------------------------- | ----------------------- | ------- |\n| `options.searchPaths`          | Additional path or list of Titanium locations to search for Titanium SDKs and modules. | String or Array[String] | `[]`    |\n| `options.network.agentOptions` | Specific agent options like the SSL protocol. See the [agentOptions](https://www.npmjs.com/package/request#using-optionsagentoptions) for more info. | Object | |\n| `options.network.caFile`       | Local path to a certificate authority file.                      | String | |\n| `options.network.certFile`     | Local path to a PEM formatted certificate.                       | String | |\n| `options.network.httpProxy`    | The URL for proxying http requests.                              | String | |\n| `options.network.httpsProxy`   | The URL for proxying https requests.                             | String | |\n| `options.network.keyFile`      | Local path to a PEM formatted private key.                       | String | |\n| `options.network.passphrase`   | The passphrase for the key file.                                 | String | |\n| `options.network.strictSSL`    | When `true`, requires SSL certificates be valid.                 | Boolean | `true` |\n| `options.sdk.searchPaths`      | Additional path or list of paths to search for Titanium SDKs.    | String or Array[String] | `[]` |\n| `options.sdk.urls.branches`    | The URL for the list of branches.                                | String | |\n| `options.sdk.urls.build`       | The URL for downloading a CI build `.zip` file.                  | String | |\n| `options.sdk.urls.builds`      | The URL for the list of CI builds.                               | String | |\n| `options.sdk.urls.releases`    | The URL for the list of GA releases.                             | String | |\n| `options.module.searchPaths`   | Additional path or list of paths to search for Titanium modules. | String or Array[String] | `[]` |\n\n### Search Paths\n\nThere are different kinds of search paths. `options.searchPaths` is used to find Titanium installation directories. These paths would contain the `\"mobilesdk\"` and `\"modules\"` directory. Generally speaking, you probably should use `options.sdk.searchPaths` instead.\n\n`options.sdk.searchPaths` are paths that contain actual SDK directories such as `\"7.5.1.GA\"`. These paths should _not_ point to the actual SDK directory, but rather its parent directory. `titaniumlib` will only scan the search paths and does not recursively descend directories.\n\n## SDK\n\n```js\nimport { sdk } from 'titaniumlib';\n```\n\n### `sdk.getBranches()`\n\nRetrieves the list of CI branches.\n\nReturns `Promise\u003cObject\u003e`.\n\n```js\nconst branches = await sdk.getBranches();\nconsole.log(branches);\n```\n\n```js\n{\n  defaultBranch: 'master',\n  branches: [\n      '3_5_X',\n     '4_0_X',\n     ...\n     '8_0_X',\n     'master',\n     'next'\n  ]\n}\n```\n\n### `sdk.getBuilds([branch])`\n\nRetreives a list of Titanium SDK continuous integration builds.\n\n| Argument | Description             | Type   | Default    |            |\n| -------- | ----------------------- | ------ | ---------- | ---------- |\n| `branch` | The branch to retreive. | String | `\"master\"` | _optional_ |\n\nReturns `Promise\u003cObject\u003e`.\n\n```js\nconst builds = await sdk.getBuilds('8_0_X');\nconsole.log(builds);\n```\n\n```js\n{\n  ...\n  '8.1.0.v20190307130759': {\n    version: '8.1.0',\n    ts: '20190307130759',\n    githash: '60e97ceeb124a20fb374c8a4ed4c2b2b6983831c',\n    date: 2019-03-07T13:07:59.000Z,\n    url: 'http://builds.appcelerator.com/mobile/master/mobilesdk-8.1.0.v20190307130759-osx.zip'\n  },\n  ...\n}\n```\n\n### `sdk.getInstalledSDKs([force])`\n\nDetects installed Titanium SDKs.\n\n| Argument | Description                                             | Type    | Default |            |\n| -------- | ------------------------------------------------------- | ------- | ------- | ---------- |\n| `force`  | When `true`, bypasses the cache and redetects the SDKs. | Boolean | `false` | _optional_ |\n\nReturns `Array.\u003cTitaniumSDK\u003e`.\n\n```js\nconst sdks = await sdk.getInstalledSDKs();\nconsole.log(sdks);\n```\n\n```js\n[\n  TitaniumSDK {\n    name: '8.0.0',\n    manifest: {}\n      name: '8.0.0',\n        version: '8.0.0',\n        moduleAPIVersion: {\n          android: '4',\n          iphone: '2',\n          windows: '6'\n       },\n       githash: '9bcd36593d',\n       platforms: [ 'android', 'iphone' ]\n    },\n    path: '/Users/USER/Library/Application Support/Titanium/mobilesdk/osx/8.0.0'\n  }\n]\n```\n\n### `sdk.getPaths()`\n\nReturns a list of possible SDK install paths.\n\nReturns `Array.\u003cString\u003e`.\n\n```js\nconst paths = sdk.getPaths();\nconsole.log(paths);\n```\n\n```js\n[\n  '/Users/USER/Library/Application Support/Titanium/mobilesdk/osx',\n  '/Library/Application Support/Titanium/mobilesdk/osx'\n]\n```\n\n### `sdk.getReleases([noLatest])`\n\nRetreives a map of Titanium SDK versions to release info including the download URL. By default,\nthe latest version is added to the map of releases.\n\n| Argument   | Description                                              | Type    | Default |            |\n| ---------- | -------------------------------------------------------- | ------- | ------- | ---------- |\n| `noLatest` | When `true`, it does not determine the 'latest' release. | Boolean | `false` | _optional_ |\n\nReturns `Promise\u003cObject\u003e`.\n\n```js\nconst releases = await sdk.getReleases();\nconsole.log(releases);\n```\n\n```js\n{\n  '7.5.1.GA': {\n    version: '7.5.1',\n    url: 'https://builds.appcelerator.com/mobile-releases/7.5.1/mobilesdk-7.5.1.GA-osx.zip'\n  },\n  latest: {\n    version: '7.5.1',\n    url: 'https://builds.appcelerator.com/mobile-releases/7.5.1/mobilesdk-7.5.1.GA-osx.zip'\n  }\n}\n```\n\n### `sdk.install(params)`\n\nInstall a Titanium SDK from either a URI or version. A URI may be either a local file, a URL, an\nSDK version, a CI branch, or a CI branch and build hash.\n\n| Argument | Description         | Type   | Default |            |\n| -------- | ------------------- | ------ | ------- | ---------- |\n| `params` | Various parameters. | Object | `{}`    | _optional_ |\n\n\u003e Note: All parameters are optional.\n\n| Property      | Description                                                                 | Type   | Default           |\n| ------------- | --------------------------------------------------------------------------- | ------ | ----------------- |\n| `downloadDir` | When `uri` is a URL, release, or build, download the SDK to this directory. | String | A temp directory. |\n| `installDir`  | The path to install the SDK.  | String |       The first path in the list of Titanium install locations. |\n| `keep`        | When `true` and `uri` is a URL, release, or build, and `downloadDir` is specified, then the downloaded SDK `.zip` file is not deleted after install. | Boolean | `false` |\n| `overwrite`   | When `true`, overwrites an existing Titanium SDK installation, otherwise an error is thrown. Note that if `overwrite=false`, it will not throw an error if a module is already installed. | Boolean | `false` |\n| `uri`         | A URI to a local file or remote URL to download. | String | `\"latest\"` |\n\nReturns `Promise\u003cString\u003e`.\n\n#### Install from local file\n\n```js\nawait sdk.install({\n    uri: 'file:///path/to/sdk.zip'\n});\n```\n\n```js\nawait sdk.install({\n    uri: '/path/to/sdk.zip'\n});\n```\n\n#### Install from URL\n\n```js\nawait sdk.install({\n    uri: 'https://builds.appcelerator.com/mobile/master/mobilesdk-8.1.0.v20190307130759-osx.zip'\n});\n```\n\n#### Install release\n\n```js\nawait sdk.install({\n    uri: '7.5.0.GA'\n});\n```\n\n```js\nawait sdk.install({\n    uri: '7.5.0'\n});\n```\n\n```js\nawait sdk.install({\n    uri: 'latest'\n});\n```\n\n#### Install latest CI build by branch\n\n```js\nawait sdk.install({\n    uri: 'master'\n});\n```\n\n#### Install specific CI build by branch and git hash\n\n```js\nawait sdk.install({\n    uri: 'master:60e97ceeb124a20fb374c8a4ed4c2b2b6983831c'\n});\n```\n\n#### Install specific CI build by git hash\n\n\u003e Note: This is horribly inefficient. It checks every single branch for a match. You should\n\u003e probably never do this.\n\n```js\nawait sdk.install({\n    uri: '60e97ceeb124a20fb374c8a4ed4c2b2b6983831c'\n});\n```\n\n### `sdk.uninstall(nameOrPath)`\n\nDeletes an installed Titanium SDK by name or path.\n\n| Argument | Description                            | Type   |\n| -------- | -------------------------------------- | ------ |\n| `nameOrPath` | The SDK name or path to uninstall. | String |\n\nReturns `Promise\u003cArray\u003cTitaniumSDK\u003e\u003e`. If SDK is not found, an error is thrown with a `err.code` of `ENOTFOUND`.\n\n```js\nconst sdk = await sdk.uninstall('7.5.1.GA');\nconsole.log(sdk);\n```\n\n```js\n[\n  TitaniumSDK {\n    name: '7.5.1.GA',\n    manifest: {}\n      name: '7.5.1.GA',\n        version: '7.5.1',\n        moduleAPIVersion: {\n          android: '4',\n          iphone: '2',\n          windows: '6'\n       },\n       githash: '4b82d9d6b2',\n       platforms: [ 'android', 'iphone' ]\n    },\n    path: '/Users/USER/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.GA'\n  }\n]\n```\n\n## Modules\n\n```js\nimport { modules } from 'titaniumlib';\n```\n\n### `modules.getInstalledModules([force])`\n\nDetects installed Titanium modules.\n\n| Argument | Description                                                | Type    | Default |            |\n| -------- | ---------------------------------------------------------- | ------- | ------- | ---------- |\n| `force`  | When `true`, bypasses the cache and redetects the modules. | Boolean | `false` | _optional_ |\n\nReturns `Object` where `platform` \u003e `module name` \u003e `version` \u003e `module info`.\n\n```js\nconst mods = await modules.getInstalledModules();\nconsole.log(mods);\n```\n\n```js\n{\n  \"android\": {\n    \"facebook\": {\n      \"7.3.1\": {\n        \"path\": \"/Users/USER/Library/Application Support/Titanium/modules/android/facebook/7.3.1\",\n        \"platform\": \"android\",\n        \"version\": \"7.3.1\",\n        \"apiversion\": 4,\n        \"architectures\": \"arm64-v8a armeabi-v7a x86\",\n        \"description\": \"facebook\",\n        \"author\": \"Mark Mokryn and Ashraf A. S. (Appcelerator)\",\n        \"license\": \"Apache License Version 2.0\",\n        \"copyright\": \"Copyright (c) 2014 by Mark Mokryn, Copyright (c) 2009-present by Appcelerator\",\n        \"name\": \"Facebook\",\n        \"moduleid\": \"facebook\",\n        \"guid\": \"e4f7ac61-1ee7-44c5-bc27-fa6876e2dce9\",\n        \"minsdk\": \"7.0.0\"\n      }\n    }\n  },\n  \"commonjs\": {\n    ...\n  },\n  \"iphone\": {\n   ...\n  },\n  \"windows\": {\n    ...\n  }\n}\n```\n\n### `modules.getPaths()`\n\nReturns a list of possible Titanium module install paths.\n\nReturns `Array.\u003cString\u003e`.\n\n```js\nconst paths = modules.getPaths();\nconsole.log(paths);\n```\n\n```js\n[\n  '/Users/USER/Library/Application Support/Titanium/modules',\n  '/Library/Application Support/Titanium/modules'\n]\n```\n\n## Project\n\nNot available yet.\n\n## License\n\nThis project is open source under the [Apache Public License v2][1] and is developed by\n[Axway, Inc](http://www.axway.com/) and the community. Please read the [`LICENSE`][1] file included\nin this distribution for more information.\n\n[1]: https://github.com/appcelerator/titaniumlib/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidev%2Ftitaniumlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftidev%2Ftitaniumlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidev%2Ftitaniumlib/lists"}