Skip to content

Commit

Permalink
version 1.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
siddarthvader committed Jan 8, 2017
1 parent b7d4d50 commit beb45df
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 10 deletions.
6 changes: 0 additions & 6 deletions angular-httpshooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,3 @@

})();


(function(){
'use strict';
})();


1 change: 1 addition & 0 deletions angular-httpshooter.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular-httpshooter",
"description": "An angular js factory which shoots http calls asynchronously.",
"main": "index.js",
"main": "angular-httpshooter.min.js",
"authors": [
"siddarthvader ([email protected])"
],
Expand Down
115 changes: 115 additions & 0 deletions npm-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'publish' ]
2 info using [email protected]
3 info using [email protected]
4 verbose publish [ '.' ]
5 silly cache add args [ '.', null ]
6 verbose cache add spec .
7 silly cache add parsed spec Result {
7 silly cache add raw: '.',
7 silly cache add scope: null,
7 silly cache add escapedName: null,
7 silly cache add name: null,
7 silly cache add rawSpec: '.',
7 silly cache add spec: '/Users/acetonewebdev4/Desktop/siddarthvader/angular-httpshooter',
7 silly cache add type: 'directory' }
8 verbose addLocalDirectory /Users/acetonewebdev4/.npm/angular-httpshooter/1.0.1/package.tgz not in flight; packing
9 verbose correctMkdir /Users/acetonewebdev4/.npm correctMkdir not in flight; initializing
10 info lifecycle [email protected]~prepublish: [email protected]
11 silly lifecycle [email protected]~prepublish: no script for prepublish, continuing
12 verbose tar pack [ '/Users/acetonewebdev4/.npm/angular-httpshooter/1.0.1/package.tgz',
12 verbose tar pack '/Users/acetonewebdev4/Desktop/siddarthvader/angular-httpshooter' ]
13 verbose tarball /Users/acetonewebdev4/.npm/angular-httpshooter/1.0.1/package.tgz
14 verbose folder /Users/acetonewebdev4/Desktop/siddarthvader/angular-httpshooter
15 verbose addLocalTarball adding from inside cache /Users/acetonewebdev4/.npm/angular-httpshooter/1.0.1/package.tgz
16 verbose correctMkdir /Users/acetonewebdev4/.npm correctMkdir not in flight; initializing
17 silly cache afterAdd [email protected]
18 verbose afterAdd /Users/acetonewebdev4/.npm/angular-httpshooter/1.0.1/package/package.json not in flight; writing
19 verbose correctMkdir /Users/acetonewebdev4/.npm correctMkdir not in flight; initializing
20 verbose afterAdd /Users/acetonewebdev4/.npm/angular-httpshooter/1.0.1/package/package.json written
21 silly publish { name: 'angular-httpshooter',
21 silly publish version: '1.0.1',
21 silly publish description: 'An angular js factory which shoots http calls asynchronously.',
21 silly publish main: 'index.js',
21 silly publish scripts: { test: 'echo "Error: no test specified" && exit 1' },
21 silly publish repository:
21 silly publish { type: 'git',
21 silly publish url: 'git+https://github.com/siddarthvader/angular-httpshooter.git' },
21 silly publish keywords:
21 silly publish [ 'loader',
21 silly publish 'httploader',
21 silly publish 'spinners',
21 silly publish 'blockUI',
21 silly publish 'angular',
21 silly publish 'async',
21 silly publish 'http',
21 silly publish 'calls' ],
21 silly publish author: { name: 'siddarthvader', url: '[email protected]' },
21 silly publish license: 'MIT',
21 silly publish bugs: { url: 'https://github.com/siddarthvader/angular-httpshooter/issues' },
21 silly publish homepage: 'https://github.com/siddarthvader/angular-httpshooter#readme',
21 silly publish readme: '# Angular-httpshooter\n> A factory written in angular 1.0+ which makes/shoots http calls asynchronously.\n\nAngular-httpshooter makes all your api calls asynchronous, idea behind it to make the connection between server and client single threaded, it means shooting only one call at a point of time and wait for the response from server to launch the next call.\n\n\n> It blocks duplicate calls on the basis or either `url` or `data`, you can configure it according to your need.\n\nIt is based on `promise` chaining, it maintains a `queue` and push every call into it and then treat them on the basis of `FIFO`. it makes a promise for every `http` call and `reject`/`resolve` promise on the basis of response from server;\n\n> Angular-httpshooter is here to provide enhanced support to maintain ACID property of DB.\n\nAlmost all new databases handle it on their level and serialize read/write calls using lock-based protocols and other measures, but it is always preferred that client handles the concurrency on its level.\n\n>> NOTE: it will only matches the calls which are yet to take place, past calls are removed from queue as soon as the server returns response.\n\n\n> ![Example network panel](http://i.imgur.com/7i9FSkZ.png)\n\n\n\n## Features\n\n* One api/server call in action at one point of time.\n* it blocks duplicate server calls which generally happens when user press some button twice, read options for more details.\n* \'timeout\' defines the max-time wait limit, it server does not respond before timeout limit, it rejects the promise and you will get 599 status in error block.\n* it releases two events on $rootScope `HTTP_CALL_STARTED` and `HTTP_CALL_STOPPED`, also sends config objects with events, you can catch this event and do many things. e.g. show loader or block UI from interaction.\n\n\n## Use Angular-httpshooter in your webapp\n\ninstall using npm\n```bash\nnpm install angular-httpshooter --save\n```\n\ninstall using bower\n```bash\nbower install angular-httpshooter media-all --save\n```\n\nclone the git repo\n\n```bash\ngit clone https://github.com/siddarthvader/angular-httpshooter.github\n```\n\nOnce you have downloded the package you will have to inject the dependency in your angular app.\n\nIn your Module\n````bash\n app.module(\'angularApp\',[\'angular-httpshooter\']);\n````\n\nIn your Controller\n````bash\n app.controller(\'appCtrl\',[\'$httpshooter\',function($httpshooter){\n\n $httpshooter.queue({\n method:\'POST\',\n url:\'http://example.com/postData\',\n data:data,\n headers:headers \n },timeout).then(function(data){\n // if server returns success response\n console.log(data);// will be main response returned from server, stripped of all other data\n },function(data){\n // if server returns error response\n })\n\n }]);\n````\n\nYes it is as simple as this.\n\n\n\n## Options\n\nHere are defaults values and possible values that can be passed to the factory for further processing.\n\n````bash\n| Property | Acceptable options | Default options |\n|-----------|---------------------------------|-----------------|\n| Method | get,post,delete,head,put,patch | none |\n| url | <string> | none |\n| data | <object> | none |\n| headers | <object> | none |\n| timeout | time in miliseconds | 36000ms |\n\n````\n\n## Events\n \n\n ````bash\n $rootScope.$on(\'HTTP_CALL_STARTED\', function (event,data) {\n console.log(data.url) // url of http call in action\n console.log(data.data) // data of http call\n console.log(data.headers) // headers of http call\n\n // basically you get whole config object in here, including a promise\n // you can start a loader here, or freeze UI or can do anything\n });\n\n $rootScope.$on(\'HTTP_CALL_STOPPED\', function (event,data) {\n // same data as above event\n\n // you can stop a loader here, or enable submit button or anything else\n });\n\n\n ````\n\n\n## Customization\n\nHere are the default values of params used in factory, you can configure them, like this:\n\n````bash\napp.config(function(shootConfig) {\n angular.extend(shootConfig, {\n defaultTimeOut:36000 // miliseconds\n blockDuplicateCalls: true,\n compareDuplicateParam:{\n url:true,\n data:false\n }\n });\n})\n````\n\n* **defaultTimeOut** : default value 36000ms, you can change it if you want to.\n\n* **blockDuplicateCalls** : default value `true`, change if you want to allow all calls to reach server.\n\n* **compareDuplicateParam.url** : default value `true`, if `true` factory matches the calls on the basis of `url` string.\n\n* **compareDuplicateParam.data** : default value `false`, if `true` factory matches the calls on the basis on `data` object\n\n\n## Licence\n\nMIT\n\n### Feel free to fork or report issues, I am here to help. \\m/',
21 silly publish readmeFilename: 'README.md',
21 silly publish gitHead: 'b7d4d50def152d9ff5b75c5b290b10dc9afd8889',
21 silly publish _id: '[email protected]',
21 silly publish _shasum: '85e12ef2b881e943a394f023a221fffe7742c1c1',
21 silly publish _from: '.' }
22 verbose getPublishConfig undefined
23 silly mapToRegistry name angular-httpshooter
24 silly mapToRegistry using default registry
25 silly mapToRegistry registry https://registry.npmjs.org/
26 silly mapToRegistry data Result {
26 silly mapToRegistry raw: 'angular-httpshooter',
26 silly mapToRegistry scope: null,
26 silly mapToRegistry escapedName: 'angular-httpshooter',
26 silly mapToRegistry name: 'angular-httpshooter',
26 silly mapToRegistry rawSpec: '',
26 silly mapToRegistry spec: 'latest',
26 silly mapToRegistry type: 'tag' }
27 silly mapToRegistry uri https://registry.npmjs.org/angular-httpshooter
28 verbose publish registryBase https://registry.npmjs.org/
29 silly publish uploading /Users/acetonewebdev4/.npm/angular-httpshooter/1.0.1/package.tgz
30 verbose request uri https://registry.npmjs.org/angular-httpshooter
31 verbose request sending authorization for write operation
32 info attempt registry request try #1 at 1:18:29 PM
33 verbose request using bearer token for auth
34 verbose request id bce5241d9202697e
35 http request PUT https://registry.npmjs.org/angular-httpshooter
36 http 403 https://registry.npmjs.org/angular-httpshooter
37 verbose headers { 'content-type': 'application/json',
37 verbose headers 'cache-control': 'max-age=300',
37 verbose headers 'content-length': '95',
37 verbose headers 'accept-ranges': 'bytes',
37 verbose headers date: 'Sun, 08 Jan 2017 07:48:32 GMT',
37 verbose headers via: '1.1 varnish',
37 verbose headers connection: 'keep-alive',
37 verbose headers 'x-served-by': 'cache-ams4147-AMS',
37 verbose headers 'x-cache': 'MISS',
37 verbose headers 'x-cache-hits': '0',
37 verbose headers 'x-timer': 'S1483861711.420631,VS0,VE940',
37 verbose headers vary: 'Accept-Encoding' }
38 verbose request invalidating /Users/acetonewebdev4/.npm/registry.npmjs.org/angular-httpshooter on PUT
39 error publish Failed PUT 403
40 verbose stack Error: "You cannot publish over the previously published version 1.0.1." : angular-httpshooter
40 verbose stack at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:264:12)
40 verbose stack at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:252:14)
40 verbose stack at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:172:14)
40 verbose stack at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:200:22)
40 verbose stack at emitTwo (events.js:100:13)
40 verbose stack at Request.emit (events.js:185:7)
40 verbose stack at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1067:10)
40 verbose stack at emitOne (events.js:95:20)
40 verbose stack at Request.emit (events.js:182:7)
40 verbose stack at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:988:12)
41 verbose statusCode 403
42 verbose pkgid angular-httpshooter
43 verbose cwd /Users/acetonewebdev4/Desktop/siddarthvader/angular-httpshooter
44 error Darwin 16.0.0
45 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "publish"
46 error node v5.6.0
47 error npm v3.10.5
48 error code E403
49 error "You cannot publish over the previously published version 1.0.1." : angular-httpshooter
50 error If you need help, you may report this error at:
50 error <https://github.com/npm/npm/issues>
51 verbose exit [ 1, true ]
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "angular-httpshooter",
"version": "1.0.1",
"version": "1.1.0",
"description": "An angular js factory which shoots http calls asynchronously.",
"main": "index.js",
"main": "angular-httpshooter.min.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand All @@ -26,4 +26,4 @@
"url": "https://github.com/siddarthvader/angular-httpshooter/issues"
},
"homepage": "https://github.com/siddarthvader/angular-httpshooter#readme"
}
}

0 comments on commit beb45df

Please sign in to comment.