alloy 2.0.0 → 2.0.2

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.
@@ -12,7 +12,7 @@ jobs:
12
12
  fetch-depth: 0
13
13
  - uses: actions/setup-node@v1
14
14
  with:
15
- node-version: '12.x'
15
+ node-version: '16.x'
16
16
  - name: Install dependencies
17
17
  run: npm ci
18
18
  - name: Lint
@@ -24,7 +24,7 @@ jobs:
24
24
  strategy:
25
25
  fail-fast: false
26
26
  matrix:
27
- nodeVersion: [ '12.x' ]
27
+ nodeVersion: [ '16.x' ]
28
28
  os: [ macos-latest ]
29
29
  tiSDK: [ latest ]
30
30
  steps:
@@ -418,6 +418,10 @@ The 'redbg' and 'bigger' classes are shown below:
418
418
  * @since 1.7.0
419
419
  */
420
420
  addListener: function(proxy, type, callback) {
421
+ if (!proxy) {
422
+ throw new Error(`Trying to pass proxy, but proxy is null. Attempted to add event listener for type = "${type}"`);
423
+ }
424
+
421
425
  if (!proxy.id) {
422
426
  proxy.id = _.uniqueId('__trackId');
423
427
 
@@ -427,6 +431,11 @@ The 'redbg' and 'bigger' classes are shown below:
427
431
  }
428
432
  }
429
433
 
434
+ // Improve error reporting when passing something wrong to an event listener
435
+ if (typeof proxy.addEventListener !== 'function') {
436
+ throw new Error(`Passed proxy "${proxy.id}" is not a valid Alloy proxy. Attempted to add event listener for type = "${type}"`);
437
+ }
438
+
430
439
  proxy.addEventListener(type, callback);
431
440
  this.__events.push({
432
441
  id: proxy.id,
package/README.md CHANGED
@@ -1,19 +1,12 @@
1
1
  # Alloy
2
2
 
3
- [![Build Status](https://travis-ci.org/appcelerator/alloy.svg?branch=master)](https://travis-ci.org/appcelerator/alloy)
4
- [![Dependency Status](https://david-dm.org/appcelerator/alloy.svg)](https://david-dm.org/appcelerator/alloy)
5
- [![devDependency Status](https://david-dm.org/appcelerator/alloy/dev-status.svg)](https://david-dm.org/appcelerator/alloy#info=devDependencies)
6
- [![NPM version](https://badge.fury.io/js/alloy.svg)](http://badge.fury.io/js/grunt-appc-js)
7
-
8
- [![NPM](https://nodei.co/npm-dl/alloy.png)](https://nodei.co/npm/alloy/)
9
-
10
- Alloy is an MVC application framework by [Appcelerator](http://www.appcelerator.com) for [Titanium](http://www.appcelerator.com/platform). More high-level details can be found here: [http://www.appcelerator.com/platform/alloy/](http://www.appcelerator.com/platform/alloy/)
3
+ Alloy is an MVC application framework by [TiDev](https://tidev.io) for the [Titanium SDK](https://titaniumsdk.com).
11
4
 
12
5
  ## Getting Started
13
6
 
14
- * [Quick Start Guide](http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Framework) that covers _everything_ from installation to building your first app with Alloy.
15
- * Complete collection of [Alloy Guides](http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Framework)
16
- * [Collection of sample apps](https://github.com/tidev/alloy/tree/master/samples/apps) showing various aspects of Alloy in practice.
7
+ * [Quick Start Guide]([http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Framework](https://titaniumsdk.com/guide/Alloy_Framework/Alloy_Getting_Started.html)) that covers _everything_ from installation to building your first app with Alloy.
8
+ * Complete collection of [Alloy Guides]([http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Framework](https://titaniumsdk.com/guide/Alloy_Framework/Alloy_Guide/))
9
+ * [Collection of sample apps]([https://github.com/tidev/alloy/tree/master/samples/apps](https://titaniumsdk.com/guide/Alloy_Framework/Alloy_How-tos/Alloy_Samples.html)) showing various aspects of Alloy in practice.
17
10
 
18
11
  ## Installation
19
12
 
@@ -30,10 +23,6 @@ Alloy is an MVC application framework by [Appcelerator](http://www.appcelerator.
30
23
  [sudo] npm install -g git://github.com/tidev/alloy.git
31
24
  ```
32
25
 
33
- ### from Axway Appcelerator Studio
34
-
35
- ...oh yeah, Studio will do it for you automatically. :)
36
-
37
26
  ## Running Sample Test Apps
38
27
 
39
28
  Alloy includes many sample and test apps in the **sample/apps** folder (see above). For example, [basics/simple](https://github.com/tidev/alloy/tree/master/samples/apps/basics/simple). You can run these in a few different ways:
@@ -70,10 +59,6 @@ npm install
70
59
  jake app:run dir=basics/simple
71
60
  ```
72
61
 
73
- ### C) Importing the "Harness" to Titanium Studio
74
-
75
- You can use these apps through Titanium Studio too. The easiest way to do that would be to import the **test/project/Harness** into Titanium Studio. After that, everytime you run `jake`, your project in Studio will be updated. Once in Studio, you can run for any platform, Titanium SDK version, or change any settings you want. This will give you a lot more options and power than running solely from the command line.
76
-
77
62
  ## Additional Notes on Jake
78
63
 
79
64
  * See the [jake readme](https://github.com/tidev/alloy/blob/master/jakelib/readme.md) for information on using `jake` including the arguments and flags it accepts.
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "html5",
12
12
  "appc-client"
13
13
  ],
14
- "version": "2.0.0",
14
+ "version": "2.0.2",
15
15
  "author": "TiDev, Inc. <npm@tidev.io>",
16
16
  "bugs": {
17
17
  "url": "https://github.com/tidev/alloy/issues"