##// END OF EJS Templates
release: Merge default into stable for release preparation
marcink -
r802:f6088673 merge stable
parent child Browse files
Show More

The requested changes are too big and content was truncated. Show full diff

@@ -0,0 +1,15 b''
1 {
2 "name": "rhodecode-elements",
3 "description": "User interface for elements for rhodecode",
4 "main": "index.html",
5 "dependencies": {
6 "webcomponentsjs": "^0.7.22",
7 "polymer": "Polymer/polymer#^1.6.1",
8 "paper-button": "PolymerElements/paper-button#^1.0.13",
9 "paper-spinner": "PolymerElements/paper-spinner#^1.2.0",
10 "paper-tooltip": "PolymerElements/paper-tooltip#^1.1.2",
11 "paper-toast": "PolymerElements/paper-toast#^1.3.0",
12 "paper-toggle-button": "PolymerElements/paper-toggle-button#^1.2.0",
13 "iron-ajax": "PolymerElements/iron-ajax#^1.4.3"
14 }
15 }
@@ -0,0 +1,60 b''
1
2 =======================
3 Dependency management
4 =======================
5
6
7 Overview
8 ========
9
10 We use the Nix package manager to handle our dependencies. In general we use the
11 packages out of the package collection `nixpkgs`. For frequently changing
12 dependencies for Python and JavaScript we use the tools which are described in
13 this section to generate the needed Nix derivations.
14
15
16 Python dependencies
17 ===================
18
19 We use the tool `pip2nix` to generate the Nix derivations for our Python
20 dependencies.
21
22 Generating the dependencies should be done with the following command:
23
24 .. code:: shell
25
26 pip2nix generate --license
27
28
29 .. note::
30
31 License extraction support is still experimental, use the version from the
32 following pull request: https://github.com/ktosiek/pip2nix/pull/30
33
34
35
36 Node dependencies
37 =================
38
39 After adding new dependencies via ``npm install --save``, use `node2nix` to
40 update the corresponding Nix derivations:
41
42 .. code:: shell
43
44 cd pkgs
45 node2nix --input ../package.json \
46 -o node-packages.nix \
47 -e node-env.nix \
48 -c node-default.nix \
49 -d --flatten
50
51
52 Bower dependencies
53 ==================
54
55 Frontend dependencies are managed based on `bower`, with `bower2nix` a tool
56 exists which can generate the needed Nix derivations:
57
58 .. code:: shell
59
60 bower2nix bower.json pkgs/bower-packages.nix
@@ -0,0 +1,78 b''
1 |RCE| 4.4.0 |RNS|
2 -----------------
3
4 Release Date
5 ^^^^^^^^^^^^
6
7 - 2016-09-16
8
9
10 General
11 ^^^^^^^
12
13 - UI: introduced Polymer webcomponents into core application. RhodeCode will
14 be now shipped together with Polymer framework webcomponents. Most of
15 dynamic UI components that require large amounts of interaction
16 will be done now with Polymer.
17 - live-notifications: use rhodecode-toast for live notifications instead of
18 toastr jquery plugin.
19 - Svn: moved svn http support out of labs settings. It's tested and stable now.
20
21
22 New Features
23 ^^^^^^^^^^^^
24
25 - Integrations: integrations can now be configure on whole repo group to apply
26 same integrations on multiple projects/groups at once.
27 - Integrations: added scopes on integrations, scopes are: Global,
28 Repository Group (with/without children), Repositories, Root Repositories Only.
29 It will allow to configure exactly which projects use which integrations.
30 - Integrations: show branches/commits separately when posting push events
31 to hipchat/slack, fixes #4192.
32 - Pull-requests: summary page now shows update dates for pull request to
33 easier see which one were receantly updated.
34 - UI: hidden inline comments will be shown in side view when browsing the diffs
35 - Diffs: added inline comments toggle into pull requests diff view. #2884
36 - Live-chat: added summon reviewers functionality. You can now request
37 presence from online users into a chat for collaborative code-review.
38 This requires channelstream to be enabled.
39 - UX: added a static 502 page for gateway error. Once configured via
40 Nginx or Apache it will present a custom RhodeCode page while
41 backend servers are offline. Fixes #4202.
42
43
44 Security
45 ^^^^^^^^
46
47 - Passwords: forced password change will not allow users to put in the
48 old password as new one.
49
50
51 Performance
52 ^^^^^^^^^^^
53
54 - Vcs: refactor vcs-middleware to handle order of .ini file backends in
55 detection of vcs protocol. Detection ends now on first match and speeds
56 overall transaction speed.
57 - Summary: Improve the algorithm and performance of detection README files
58 inside summary page. In some cases we reduced cold-cache time from 50s to 1s.
59 - Safari: improved speed of large diffs on Safari browser.
60 - UX: remove position relative on diff td as it causes very slow
61 rendering in browsers.
62
63 Fixes
64 ^^^^^
65
66 - UX: change confirm password widget to have spacing between the fields to
67 match rest of ui, fixes: #4200.
68 - UX: show multiple tags/branches in changelog/summary instead of
69 truncating them.
70 - My-account: fix test notifications for IE10+
71 - Vcs: change way refs are retrieved for git so same name branch/tags and
72 remotes can be supported, fixes #298.
73 - Lexers: added small extensions table to extend syntax highlighting for file
74 sources. Fixes #4227.
75 - Search: fix bug where file path link was wrong when the repository name was
76 in the file path, fixes #4228
77 - Fixed INT overflow bug
78 - Events: send pushed commits always in the correct in order.
@@ -0,0 +1,186 b''
1 {
2 "dirs": {
3 "css": {
4 "src":"rhodecode/public/css",
5 "dest":"rhodecode/public/css"
6 },
7 "js": {
8 "src": "rhodecode/public/js/src",
9 "dest": "rhodecode/public/js"
10 }
11 },
12 "copy": {
13 "main": {
14 "expand": true,
15 "cwd": "bower_components",
16 "src": "webcomponentsjs/webcomponents-lite.js",
17 "dest": "<%= dirs.js.dest %>/vendors"
18 }
19 },
20 "concat": {
21 "polymercss": {
22 "src": [
23 "<%= dirs.js.src %>/components/root-styles-prefix.html",
24 "<%= dirs.css.src %>/style-polymer.css",
25 "<%= dirs.js.src %>/components/root-styles-suffix.html"
26 ],
27 "dest": "<%= dirs.js.dest %>/src/components/root-styles.gen.html",
28 "nonull": true
29 },
30 "dist": {
31 "src": [
32 "<%= dirs.js.src %>/jquery-1.11.1.min.js",
33 "<%= dirs.js.src %>/logging.js",
34 "<%= dirs.js.src %>/bootstrap.js",
35 "<%= dirs.js.src %>/mousetrap.js",
36 "<%= dirs.js.src %>/moment.js",
37 "<%= dirs.js.src %>/appenlight-client-0.4.1.min.js",
38 "<%= dirs.js.src %>/i18n_utils.js",
39 "<%= dirs.js.src %>/deform.js",
40 "<%= dirs.js.src %>/plugins/jquery.pjax.js",
41 "<%= dirs.js.src %>/plugins/jquery.dataTables.js",
42 "<%= dirs.js.src %>/plugins/flavoured_checkbox.js",
43 "<%= dirs.js.src %>/plugins/jquery.auto-grow-input.js",
44 "<%= dirs.js.src %>/plugins/jquery.autocomplete.js",
45 "<%= dirs.js.src %>/plugins/jquery.debounce.js",
46 "<%= dirs.js.src %>/plugins/jquery.mark.js",
47 "<%= dirs.js.src %>/plugins/jquery.timeago.js",
48 "<%= dirs.js.src %>/plugins/jquery.timeago-extension.js",
49 "<%= dirs.js.src %>/select2/select2.js",
50 "<%= dirs.js.src %>/codemirror/codemirror.js",
51 "<%= dirs.js.src %>/codemirror/codemirror_loadmode.js",
52 "<%= dirs.js.src %>/codemirror/codemirror_hint.js",
53 "<%= dirs.js.src %>/codemirror/codemirror_overlay.js",
54 "<%= dirs.js.src %>/codemirror/codemirror_placeholder.js",
55 "<%= dirs.js.dest %>/mode/meta.js",
56 "<%= dirs.js.dest %>/mode/meta_ext.js",
57 "<%= dirs.js.dest %>/rhodecode/i18n/select2/translations.js",
58 "<%= dirs.js.src %>/rhodecode/utils/array.js",
59 "<%= dirs.js.src %>/rhodecode/utils/string.js",
60 "<%= dirs.js.src %>/rhodecode/utils/pyroutes.js",
61 "<%= dirs.js.src %>/rhodecode/utils/ajax.js",
62 "<%= dirs.js.src %>/rhodecode/utils/autocomplete.js",
63 "<%= dirs.js.src %>/rhodecode/utils/colorgenerator.js",
64 "<%= dirs.js.src %>/rhodecode/utils/ie.js",
65 "<%= dirs.js.src %>/rhodecode/utils/os.js",
66 "<%= dirs.js.src %>/rhodecode/utils/topics.js",
67 "<%= dirs.js.src %>/rhodecode/widgets/multiselect.js",
68 "<%= dirs.js.src %>/rhodecode/init.js",
69 "<%= dirs.js.src %>/rhodecode/codemirror.js",
70 "<%= dirs.js.src %>/rhodecode/comments.js",
71 "<%= dirs.js.src %>/rhodecode/constants.js",
72 "<%= dirs.js.src %>/rhodecode/files.js",
73 "<%= dirs.js.src %>/rhodecode/followers.js",
74 "<%= dirs.js.src %>/rhodecode/menus.js",
75 "<%= dirs.js.src %>/rhodecode/notifications.js",
76 "<%= dirs.js.src %>/rhodecode/permissions.js",
77 "<%= dirs.js.src %>/rhodecode/pjax.js",
78 "<%= dirs.js.src %>/rhodecode/pullrequests.js",
79 "<%= dirs.js.src %>/rhodecode/settings.js",
80 "<%= dirs.js.src %>/rhodecode/select2_widgets.js",
81 "<%= dirs.js.src %>/rhodecode/tooltips.js",
82 "<%= dirs.js.src %>/rhodecode/users.js",
83 "<%= dirs.js.src %>/rhodecode/appenlight.js",
84 "<%= dirs.js.src %>/rhodecode.js"
85 ],
86 "dest": "<%= dirs.js.dest %>/scripts.js",
87 "nonull": true
88 }
89 },
90 "crisper": {
91 "dist": {
92 "options": {
93 "cleanup": false,
94 "onlySplit": true
95 },
96 "src": "<%= dirs.js.dest %>/rhodecode-components.html",
97 "dest": "<%= dirs.js.dest %>/rhodecode-components.js"
98 }
99 },
100 "less": {
101 "development": {
102 "options": {
103 "compress": false,
104 "yuicompress": false,
105 "optimization": 0
106 },
107 "files": {
108 "<%= dirs.css.dest %>/style.css": "<%= dirs.css.src %>/main.less",
109 "<%= dirs.css.dest %>/style-polymer.css": "<%= dirs.css.src %>/polymer.less"
110 }
111 },
112 "production": {
113 "options": {
114 "compress": true,
115 "yuicompress": true,
116 "optimization": 2
117 },
118 "files": {
119 "<%= dirs.css.dest %>/style.css": "<%= dirs.css.src %>/main.less",
120 "<%= dirs.css.dest %>/style-polymer.css": "<%= dirs.css.src %>/polymer.less"
121 }
122 },
123 "components": {
124 "files": [
125 {
126 "cwd": "<%= dirs.js.src %>/components/",
127 "dest": "<%= dirs.js.src %>/components/",
128 "src": [
129 "**/*.less"
130 ],
131 "expand": true,
132 "ext": ".css"
133 }
134 ]
135 }
136 },
137 "watch": {
138 "less": {
139 "files": [
140 "<%= dirs.css.src %>/**/*.less",
141 "<%= dirs.js.src %>/components/**/*.less"
142 ],
143 "tasks": [
144 "less:development",
145 "less:components",
146 "concat:polymercss",
147 "vulcanize"
148 ]
149 },
150 "js": {
151 "files": [
152 "!<%= dirs.js.src %>/components/root-styles.gen.html",
153 "<%= dirs.js.src %>/**/*.js",
154 "<%= dirs.js.src %>/components/**/*.html"
155 ],
156 "tasks": [
157 "less:components",
158 "concat:polymercss",
159 "vulcanize",
160 "crisper",
161 "concat:dist"
162 ]
163 }
164 },
165 "jshint": {
166 "rhodecode": {
167 "src": "<%= dirs.js.src %>/rhodecode/**/*.js",
168 "options": {
169 "jshintrc": ".jshintrc"
170 }
171 }
172 },
173 "vulcanize": {
174 "default": {
175 "options": {
176 "abspath": "",
177 "inlineScripts": true,
178 "inlineCss": true,
179 "stripComments": true
180 },
181 "files": {
182 "<%= dirs.js.dest %>/rhodecode-components.html": "<%= dirs.js.src %>/components/shared-components.html"
183 }
184 }
185 }
186 }
@@ -0,0 +1,67 b''
1 # Backported buildBowerComponents so that we can also use it with the version
2 # 16.03 which is the current stable at the time of this writing.
3 #
4 # This file can be removed once building with 16.03 is not needed anymore.
5
6 { pkgs }:
7
8 { buildInputs ? [], generated, ... } @ attrs:
9
10 let
11 bower2nix-src = pkgs.fetchzip {
12 url = "https://github.com/rvl/bower2nix/archive/v3.0.1.tar.gz";
13 sha256 = "1zbvz96k2j6g0r4lvm5cgh41a73k9dgayk7x63cmg538dzznxvyb";
14 };
15
16 bower2nix = import "${bower2nix-src}/default.nix" { inherit pkgs; };
17
18 fetchbower = import ./backport-16.03-fetchbower.nix {
19 inherit (pkgs) stdenv lib;
20 inherit bower2nix;
21 };
22
23 # Fetches the bower packages. `generated` should be the result of a
24 # `bower2nix` command.
25 bowerPackages = import generated {
26 inherit (pkgs) buildEnv;
27 inherit fetchbower;
28 };
29
30 in pkgs.stdenv.mkDerivation (
31 attrs
32 //
33 {
34 name = "bower_components-" + attrs.name;
35
36 inherit bowerPackages;
37
38 builder = builtins.toFile "builder.sh" ''
39 source $stdenv/setup
40
41 # The project's bower.json is required
42 cp $src/bower.json .
43
44 # Dereference symlinks -- bower doesn't like them
45 cp --recursive --reflink=auto \
46 --dereference --no-preserve=mode \
47 $bowerPackages bc
48
49 # Bower install in offline mode -- links together the fetched
50 # bower packages.
51 HOME=$PWD bower \
52 --config.storage.packages=bc/packages \
53 --config.storage.registry=bc/registry \
54 --offline install
55
56 # Sets up a single bower_components directory within
57 # the output derivation.
58 mkdir -p $out
59 mv bower_components $out
60 '';
61
62 buildInputs = buildInputs ++ [
63 pkgs.git
64 pkgs.nodePackages.bower
65 ];
66 }
67 )
@@ -0,0 +1,26 b''
1 { stdenv, lib, bower2nix }:
2 let
3 bowerVersion = version:
4 let
5 components = lib.splitString "#" version;
6 hash = lib.last components;
7 ver = if builtins.length components == 1 then version else hash;
8 in ver;
9
10 fetchbower = name: version: target: outputHash: stdenv.mkDerivation {
11 name = "${name}-${bowerVersion version}";
12 buildCommand = ''
13 fetch-bower --quiet --out=$PWD/out "${name}" "${target}" "${version}"
14 # In some cases, the result of fetchBower is different depending
15 # on the output directory (e.g. if the bower package contains
16 # symlinks). So use a local output directory before copying to
17 # $out.
18 cp -R out $out
19 '';
20 outputHashMode = "recursive";
21 outputHashAlgo = "sha256";
22 inherit outputHash;
23 buildInputs = [ bower2nix ];
24 };
25
26 in fetchbower
@@ -0,0 +1,31 b''
1 { fetchbower, buildEnv }:
2 buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [
3 (fetchbower "webcomponentsjs" "0.7.22" "^0.7.22" "0ggh3k8ssafd056ib1m5bvzi7cpz3ry7gr5176d79na1w0c3i7dz")
4 (fetchbower "polymer" "Polymer/polymer#1.6.1" "Polymer/polymer#^1.6.1" "09mm0jgk457gvwqlc155swch7gjr6fs3g7spnvhi6vh5b6518540")
5 (fetchbower "paper-button" "PolymerElements/paper-button#1.0.13" "PolymerElements/paper-button#^1.0.13" "0i3y153nqk06pn0gk282vyybnl3g1w3w41d5i9z659cgn27g3fvm")
6 (fetchbower "paper-spinner" "PolymerElements/paper-spinner#1.2.0" "PolymerElements/paper-spinner#^1.2.0" "1av1m6y81jw3hjhz1yqy3rwcgxarjzl58ldfn4q6sn51pgzngfqb")
7 (fetchbower "paper-tooltip" "PolymerElements/paper-tooltip#1.1.2" "PolymerElements/paper-tooltip#^1.1.2" "1j64nprcyk2d2bbl3qwjyr0lbjngm4wclpyfwgai1c4y6g6bigd2")
8 (fetchbower "paper-toast" "PolymerElements/paper-toast#1.3.0" "PolymerElements/paper-toast#^1.3.0" "0x9rqxsks5455s8pk4aikpp99ijdn6kxr9gvhwh99nbcqdzcxq1m")
9 (fetchbower "paper-toggle-button" "PolymerElements/paper-toggle-button#1.2.0" "PolymerElements/paper-toggle-button#^1.2.0" "0mphcng3ngspbpg4jjn0mb91nvr4xc1phq3qswib15h6sfww1b2w")
10 (fetchbower "iron-ajax" "PolymerElements/iron-ajax#1.4.3" "PolymerElements/iron-ajax#^1.4.3" "0m3dx27arwmlcp00b7n516sc5a51f40p9vapr1nvd57l3i3z0pzm")
11 (fetchbower "iron-flex-layout" "PolymerElements/iron-flex-layout#1.3.1" "PolymerElements/iron-flex-layout#^1.0.0" "0nswv3ih3bhflgcd2wjfmddqswzgqxb2xbq65jk9w3rkj26hplbl")
12 (fetchbower "paper-behaviors" "PolymerElements/paper-behaviors#1.0.12" "PolymerElements/paper-behaviors#^1.0.0" "012bqk97awgz55cn7rm9g7cckrdhkqhls3zvp8l6nd4rdwcrdzq8")
13 (fetchbower "paper-material" "PolymerElements/paper-material#1.0.6" "PolymerElements/paper-material#^1.0.0" "0rljmknfdbm5aabvx9pk77754zckj3l127c3mvnmwkpkkr353xnh")
14 (fetchbower "paper-styles" "PolymerElements/paper-styles#1.1.4" "PolymerElements/paper-styles#^1.0.0" "0j8vg74xrcxlni8i93dsab3y80f34kk30lv4yblqpkp9c3nrilf7")
15 (fetchbower "neon-animation" "PolymerElements/neon-animation#1.2.4" "PolymerElements/neon-animation#^1.0.0" "16mz9i2n5w0k5j8d6gha23cnbdgm5syz3fawyh89gdbq97bi2q5j")
16 (fetchbower "iron-a11y-announcer" "PolymerElements/iron-a11y-announcer#1.0.5" "PolymerElements/iron-a11y-announcer#^1.0.0" "0n7c7j1pwk3835s7s2jd9125wdcsqf216yi5gj07wn5s8h8p7m9d")
17 (fetchbower "iron-overlay-behavior" "PolymerElements/iron-overlay-behavior#1.8.6" "PolymerElements/iron-overlay-behavior#^1.0.9" "14brn9gz6qqskarg3fxk91xs7vg02vgcsz9a9743kidxr0l0413m")
18 (fetchbower "iron-fit-behavior" "PolymerElements/iron-fit-behavior#1.2.5" "PolymerElements/iron-fit-behavior#^1.1.0" "1msnlh8lp1xg6v4h6dkjwj9kzac5q5q208ayla3x9hi483ki6rlf")
19 (fetchbower "iron-checked-element-behavior" "PolymerElements/iron-checked-element-behavior#1.0.5" "PolymerElements/iron-checked-element-behavior#^1.0.0" "0l0yy4ah454s8bzfv076s8by7h67zy9ni6xb932qwyhx8br6c1m7")
20 (fetchbower "promise-polyfill" "polymerlabs/promise-polyfill#1.0.1" "polymerlabs/promise-polyfill#^1.0.0" "045bj2caav3famr5hhxgs1dx7n08r4s46mlzwb313vdy17is38xb")
21 (fetchbower "iron-behaviors" "PolymerElements/iron-behaviors#1.0.17" "PolymerElements/iron-behaviors#^1.0.0" "021qvkmbk32jrrmmphpmwgby4bzi5jyf47rh1bxmq2ip07ly4bpr")
22 (fetchbower "paper-ripple" "PolymerElements/paper-ripple#1.0.8" "PolymerElements/paper-ripple#^1.0.0" "0r9sq8ik7wwrw0qb82c3rw0c030ljwd3s466c9y4qbcrsbvfjnns")
23 (fetchbower "font-roboto" "PolymerElements/font-roboto#1.0.1" "PolymerElements/font-roboto#^1.0.1" "02jz43r0wkyr3yp7rq2rc08l5cwnsgca9fr54sr4rhsnl7cjpxrj")
24 (fetchbower "iron-meta" "PolymerElements/iron-meta#1.1.2" "PolymerElements/iron-meta#^1.0.0" "1wl4dx8fnsknw9z9xi8bpc4cy9x70c11x4zxwxnj73hf3smifppl")
25 (fetchbower "iron-resizable-behavior" "PolymerElements/iron-resizable-behavior#1.0.5" "PolymerElements/iron-resizable-behavior#^1.0.0" "1fd5zmbr2hax42vmcasncvk7lzi38fmb1kyii26nn8pnnjak7zkn")
26 (fetchbower "iron-selector" "PolymerElements/iron-selector#1.5.2" "PolymerElements/iron-selector#^1.0.0" "1ajv46llqzvahm5g6g75w7nfyjcslp53ji0wm96l2k94j87spv3r")
27 (fetchbower "web-animations-js" "web-animations/web-animations-js#2.2.2" "web-animations/web-animations-js#^2.2.0" "1izfvm3l67vwys0bqbhidi9rqziw2f8wv289386sc6jsxzgkzhga")
28 (fetchbower "iron-a11y-keys-behavior" "PolymerElements/iron-a11y-keys-behavior#1.1.7" "PolymerElements/iron-a11y-keys-behavior#^1.0.0" "070z46dbbz242002gmqrgy28x0y1fcqp9hnvbi05r3zphiqfx3l7")
29 (fetchbower "iron-validatable-behavior" "PolymerElements/iron-validatable-behavior#1.1.1" "PolymerElements/iron-validatable-behavior#^1.0.0" "1yhxlvywhw2klbbgm3f3cmanxfxggagph4ii635zv0c13707wslv")
30 (fetchbower "iron-form-element-behavior" "PolymerElements/iron-form-element-behavior#1.0.6" "PolymerElements/iron-form-element-behavior#^1.0.0" "0rdhxivgkdhhz2yadgdbjfc70l555p3y83vjh8rfj5hr0asyn6q1")
31 ]; }
@@ -0,0 +1,15 b''
1 # This file has been generated by node2nix 1.0.0. Do not edit!
2
3 {pkgs ? import <nixpkgs> {
4 inherit system;
5 }, system ? builtins.currentSystem}:
6
7 let
8 nodeEnv = import ./node-env.nix {
9 inherit (pkgs) stdenv python utillinux runCommand writeTextFile nodejs;
10 };
11 in
12 import ./node-packages.nix {
13 inherit (pkgs) fetchurl fetchgit;
14 inherit nodeEnv;
15 } No newline at end of file
@@ -0,0 +1,292 b''
1 # This file originates from node2nix
2
3 {stdenv, python, nodejs, utillinux, runCommand, writeTextFile}:
4
5 let
6 # Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise
7 tarWrapper = runCommand "tarWrapper" {} ''
8 mkdir -p $out/bin
9
10 cat > $out/bin/tar <<EOF
11 #! ${stdenv.shell} -e
12 $(type -p tar) "\$@" --warning=no-unknown-keyword
13 EOF
14
15 chmod +x $out/bin/tar
16 '';
17
18 # Function that generates a TGZ file from a NPM project
19 buildNodeSourceDist =
20 { name, version, src, ... }:
21
22 stdenv.mkDerivation {
23 name = "node-tarball-${name}-${version}";
24 inherit src;
25 buildInputs = [ nodejs ];
26 buildPhase = ''
27 export HOME=$TMPDIR
28 tgzFile=$(npm pack)
29 '';
30 installPhase = ''
31 mkdir -p $out/tarballs
32 mv $tgzFile $out/tarballs
33 mkdir -p $out/nix-support
34 echo "file source-dist $out/tarballs/$tgzFile" >> $out/nix-support/hydra-build-products
35 '';
36 };
37
38 includeDependencies = {dependencies}:
39 stdenv.lib.optionalString (dependencies != [])
40 (stdenv.lib.concatMapStrings (dependency:
41 ''
42 # Bundle the dependencies of the package
43 mkdir -p node_modules
44 cd node_modules
45
46 # Only include dependencies if they don't exist. They may also be bundled in the package.
47 if [ ! -e "${dependency.name}" ]
48 then
49 ${composePackage dependency}
50 fi
51
52 cd ..
53 ''
54 ) dependencies);
55
56 # Recursively composes the dependencies of a package
57 composePackage = { name, packageName, src, dependencies ? [], ... }@args:
58 let
59 fixImpureDependencies = writeTextFile {
60 name = "fixDependencies.js";
61 text = ''
62 var fs = require('fs');
63 var url = require('url');
64
65 /*
66 * Replaces an impure version specification by *
67 */
68 function replaceImpureVersionSpec(versionSpec) {
69 var parsedUrl = url.parse(versionSpec);
70
71 if(versionSpec == "latest" || versionSpec == "unstable" ||
72 versionSpec.substr(0, 2) == ".." || dependency.substr(0, 2) == "./" || dependency.substr(0, 2) == "~/" || dependency.substr(0, 1) == '/')
73 return '*';
74 else if(parsedUrl.protocol == "git:" || parsedUrl.protocol == "git+ssh:" || parsedUrl.protocol == "git+http:" || parsedUrl.protocol == "git+https:" ||
75 parsedUrl.protocol == "http:" || parsedUrl.protocol == "https:")
76 return '*';
77 else
78 return versionSpec;
79 }
80
81 var packageObj = JSON.parse(fs.readFileSync('./package.json'));
82
83 /* Replace dependencies */
84 if(packageObj.dependencies !== undefined) {
85 for(var dependency in packageObj.dependencies) {
86 var versionSpec = packageObj.dependencies[dependency];
87 packageObj.dependencies[dependency] = replaceImpureVersionSpec(versionSpec);
88 }
89 }
90
91 /* Replace development dependencies */
92 if(packageObj.devDependencies !== undefined) {
93 for(var dependency in packageObj.devDependencies) {
94 var versionSpec = packageObj.devDependencies[dependency];
95 packageObj.devDependencies[dependency] = replaceImpureVersionSpec(versionSpec);
96 }
97 }
98
99 /* Replace optional dependencies */
100 if(packageObj.optionalDependencies !== undefined) {
101 for(var dependency in packageObj.optionalDependencies) {
102 var versionSpec = packageObj.optionalDependencies[dependency];
103 packageObj.optionalDependencies[dependency] = replaceImpureVersionSpec(versionSpec);
104 }
105 }
106
107 /* Write the fixed JSON file */
108 fs.writeFileSync("package.json", JSON.stringify(packageObj));
109 '';
110 };
111 in
112 ''
113 DIR=$(pwd)
114 cd $TMPDIR
115
116 unpackFile ${src}
117
118 # Make the base dir in which the target dependency resides first
119 mkdir -p "$(dirname "$DIR/${packageName}")"
120
121 if [ -f "${src}" ]
122 then
123 # Figure out what directory has been unpacked
124 packageDir=$(find . -type d -maxdepth 1 | tail -1)
125
126 # Restore write permissions to make building work
127 chmod -R u+w "$packageDir"
128
129 # Move the extracted tarball into the output folder
130 mv "$packageDir" "$DIR/${packageName}"
131 elif [ -d "${src}" ]
132 then
133 # Restore write permissions to make building work
134 chmod -R u+w $strippedName
135
136 # Move the extracted directory into the output folder
137 mv $strippedName "$DIR/${packageName}"
138 fi
139
140 # Unset the stripped name to not confuse the next unpack step
141 unset strippedName
142
143 # Some version specifiers (latest, unstable, URLs, file paths) force NPM to make remote connections or consult paths outside the Nix store.
144 # The following JavaScript replaces these by * to prevent that
145 cd "$DIR/${packageName}"
146 node ${fixImpureDependencies}
147
148 # Include the dependencies of the package
149 ${includeDependencies { inherit dependencies; }}
150 cd ..
151 ${stdenv.lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
152 '';
153
154 # Extract the Node.js source code which is used to compile packages with
155 # native bindings
156 nodeSources = runCommand "node-sources" {} ''
157 tar --no-same-owner --no-same-permissions -xf ${nodejs.src}
158 mv node-* $out
159 '';
160
161 # Builds and composes an NPM package including all its dependencies
162 buildNodePackage = { name, packageName, version, dependencies ? [], production ? true, npmFlags ? "", dontNpmInstall ? false, preRebuild ? "", ... }@args:
163
164 stdenv.lib.makeOverridable stdenv.mkDerivation (builtins.removeAttrs args [ "dependencies" ] // {
165 name = "node-${name}-${version}";
166 buildInputs = [ tarWrapper python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ args.buildInputs or [];
167 dontStrip = args.dontStrip or true; # Striping may fail a build for some package deployments
168
169 inherit dontNpmInstall preRebuild;
170
171 unpackPhase = args.unpackPhase or "true";
172
173 buildPhase = args.buildPhase or "true";
174
175 compositionScript = composePackage args;
176 passAsFile = [ "compositionScript" ];
177
178 installPhase = args.installPhase or ''
179 # Create and enter a root node_modules/ folder
180 mkdir -p $out/lib/node_modules
181 cd $out/lib/node_modules
182
183 # Compose the package and all its dependencies
184 source $compositionScriptPath
185
186 # Patch the shebangs of the bundled modules to prevent them from
187 # calling executables outside the Nix store as much as possible
188 patchShebangs .
189
190 # Deploy the Node.js package by running npm install. Since the
191 # dependencies have been provided already by ourselves, it should not
192 # attempt to install them again, which is good, because we want to make
193 # it Nix's responsibility. If it needs to install any dependencies
194 # anyway (e.g. because the dependency parameters are
195 # incomplete/incorrect), it fails.
196 #
197 # The other responsibilities of NPM are kept -- version checks, build
198 # steps, postprocessing etc.
199
200 export HOME=$TMPDIR
201 cd "${packageName}"
202 runHook preRebuild
203 npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild
204
205 if [ "$dontNpmInstall" != "1" ]
206 then
207 npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install
208 fi
209
210 # Create symlink to the deployed executable folder, if applicable
211 if [ -d "$out/lib/node_modules/.bin" ]
212 then
213 ln -s $out/lib/node_modules/.bin $out/bin
214 fi
215
216 # Create symlinks to the deployed manual page folders, if applicable
217 if [ -d "$out/lib/node_modules/${packageName}/man" ]
218 then
219 mkdir -p $out/share
220 for dir in "$out/lib/node_modules/${packageName}/man/"*
221 do
222 mkdir -p $out/share/man/$(basename "$dir")
223 for page in "$dir"/*
224 do
225 ln -s $page $out/share/man/$(basename "$dir")
226 done
227 done
228 fi
229 '';
230 });
231
232 # Builds a development shell
233 buildNodeShell = { name, packageName, version, src, dependencies ? [], production ? true, npmFlags ? "", dontNpmInstall ? false, ... }@args:
234 let
235 nodeDependencies = stdenv.mkDerivation {
236 name = "node-dependencies-${name}-${version}";
237
238 buildInputs = [ tarWrapper python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ args.buildInputs or [];
239
240 includeScript = includeDependencies { inherit dependencies; };
241 passAsFile = [ "includeScript" ];
242
243 buildCommand = ''
244 mkdir -p $out/lib
245 cd $out/lib
246 source $includeScriptPath
247
248 # Create fake package.json to make the npm commands work properly
249 cat > package.json <<EOF
250 {
251 "name": "${packageName}",
252 "version": "${version}"
253 }
254 EOF
255
256 # Patch the shebangs of the bundled modules to prevent them from
257 # calling executables outside the Nix store as much as possible
258 patchShebangs .
259
260 export HOME=$TMPDIR
261 npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} rebuild
262
263 ${stdenv.lib.optionalString (!dontNpmInstall) ''
264 npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install
265 ''}
266
267 ln -s $out/lib/node_modules/.bin $out/bin
268 '';
269 };
270 in
271 stdenv.lib.makeOverridable stdenv.mkDerivation {
272 name = "node-shell-${name}-${version}";
273
274 buildInputs = [ python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ args.buildInputs or [];
275 buildCommand = ''
276 mkdir -p $out/bin
277 cat > $out/bin/shell <<EOF
278 #! ${stdenv.shell} -e
279 $shellHook
280 exec ${stdenv.shell}
281 EOF
282 chmod +x $out/bin/shell
283 '';
284
285 # Provide the dependencies in a development shell through the NODE_PATH environment variable
286 inherit nodeDependencies;
287 shellHook = stdenv.lib.optionalString (dependencies != []) ''
288 export NODE_PATH=$nodeDependencies/lib/node_modules
289 '';
290 };
291 in
292 { inherit buildNodeSourceDist buildNodePackage buildNodeShell; }
@@ -0,0 +1,33 b''
1 # -*- coding: utf-8 -*-
2
3 # Copyright (C) 2010-2016 RhodeCode GmbH
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License, version 3
7 # (only), as published by the Free Software Foundation.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #
17 # This program is dual-licensed. If you wish to learn more about the
18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20
21 """
22 Base module for form rendering / validation - currently just a wrapper for
23 deform - later can be replaced with something custom.
24 """
25
26 from rhodecode.translation import _
27 from deform import Button, Form, widget, ValidationFailure
28
29
30 class buttons:
31 save = Button(name='Save', type='submit')
32 reset = Button(name=_('Reset'), type='reset')
33 delete = Button(name=_('Delete'), type='submit')
This diff has been collapsed as it changes many lines, (3505 lines changed) Show them Hide them
@@ -0,0 +1,3505 b''
1 # -*- coding: utf-8 -*-
2
3 # Copyright (C) 2010-2016 RhodeCode GmbH
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License, version 3
7 # (only), as published by the Free Software Foundation.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #
17 # This program is dual-licensed. If you wish to learn more about the
18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20
21 """
22 Database Models for RhodeCode Enterprise
23 """
24
25 import os
26 import sys
27 import time
28 import hashlib
29 import logging
30 import datetime
31 import warnings
32 import ipaddress
33 import functools
34 import traceback
35 import collections
36
37
38 from sqlalchemy import *
39 from sqlalchemy.exc import IntegrityError
40 from sqlalchemy.ext.declarative import declared_attr
41 from sqlalchemy.ext.hybrid import hybrid_property
42 from sqlalchemy.orm import (
43 relationship, joinedload, class_mapper, validates, aliased)
44 from sqlalchemy.sql.expression import true
45 from beaker.cache import cache_region, region_invalidate
46 from webob.exc import HTTPNotFound
47 from zope.cachedescriptors.property import Lazy as LazyProperty
48
49 from pylons import url
50 from pylons.i18n.translation import lazy_ugettext as _
51
52 from rhodecode.lib.vcs import get_backend, get_vcs_instance
53 from rhodecode.lib.vcs.utils.helpers import get_scm
54 from rhodecode.lib.vcs.exceptions import VCSError
55 from rhodecode.lib.vcs.backends.base import (
56 EmptyCommit, Reference, MergeFailureReason)
57 from rhodecode.lib.utils2 import (
58 str2bool, safe_str, get_commit_safe, safe_unicode, remove_prefix, md5_safe,
59 time_to_datetime, aslist, Optional, safe_int, get_clone_url, AttributeDict)
60 from rhodecode.lib.jsonalchemy import MutationObj, JsonType, JSONDict
61 from rhodecode.lib.ext_json import json
62 from rhodecode.lib.caching_query import FromCache
63 from rhodecode.lib.encrypt import AESCipher
64
65 from rhodecode.model.meta import Base, Session
66
67 URL_SEP = '/'
68 log = logging.getLogger(__name__)
69
70 # =============================================================================
71 # BASE CLASSES
72 # =============================================================================
73
74 # this is propagated from .ini file rhodecode.encrypted_values.secret or
75 # beaker.session.secret if first is not set.
76 # and initialized at environment.py
77 ENCRYPTION_KEY = None
78
79 # used to sort permissions by types, '#' used here is not allowed to be in
80 # usernames, and it's very early in sorted string.printable table.
81 PERMISSION_TYPE_SORT = {
82 'admin': '####',
83 'write': '###',
84 'read': '##',
85 'none': '#',
86 }
87
88
89 def display_sort(obj):
90 """
91 Sort function used to sort permissions in .permissions() function of
92 Repository, RepoGroup, UserGroup. Also it put the default user in front
93 of all other resources
94 """
95
96 if obj.username == User.DEFAULT_USER:
97 return '#####'
98 prefix = PERMISSION_TYPE_SORT.get(obj.permission.split('.')[-1], '')
99 return prefix + obj.username
100
101
102 def _hash_key(k):
103 return md5_safe(k)
104
105
106 class EncryptedTextValue(TypeDecorator):
107 """
108 Special column for encrypted long text data, use like::
109
110 value = Column("encrypted_value", EncryptedValue(), nullable=False)
111
112 This column is intelligent so if value is in unencrypted form it return
113 unencrypted form, but on save it always encrypts
114 """
115 impl = Text
116
117 def process_bind_param(self, value, dialect):
118 if not value:
119 return value
120 if value.startswith('enc$aes$') or value.startswith('enc$aes_hmac$'):
121 # protect against double encrypting if someone manually starts
122 # doing
123 raise ValueError('value needs to be in unencrypted format, ie. '
124 'not starting with enc$aes')
125 return 'enc$aes_hmac$%s' % AESCipher(
126 ENCRYPTION_KEY, hmac=True).encrypt(value)
127
128 def process_result_value(self, value, dialect):
129 import rhodecode
130
131 if not value:
132 return value
133
134 parts = value.split('$', 3)
135 if not len(parts) == 3:
136 # probably not encrypted values
137 return value
138 else:
139 if parts[0] != 'enc':
140 # parts ok but without our header ?
141 return value
142 enc_strict_mode = str2bool(rhodecode.CONFIG.get(
143 'rhodecode.encrypted_values.strict') or True)
144 # at that stage we know it's our encryption
145 if parts[1] == 'aes':
146 decrypted_data = AESCipher(ENCRYPTION_KEY).decrypt(parts[2])
147 elif parts[1] == 'aes_hmac':
148 decrypted_data = AESCipher(
149 ENCRYPTION_KEY, hmac=True,
150 strict_verification=enc_strict_mode).decrypt(parts[2])
151 else:
152 raise ValueError(
153 'Encryption type part is wrong, must be `aes` '
154 'or `aes_hmac`, got `%s` instead' % (parts[1]))
155 return decrypted_data
156
157
158 class BaseModel(object):
159 """
160 Base Model for all classes
161 """
162
163 @classmethod
164 def _get_keys(cls):
165 """return column names for this model """
166 return class_mapper(cls).c.keys()
167
168 def get_dict(self):
169 """
170 return dict with keys and values corresponding
171 to this model data """
172
173 d = {}
174 for k in self._get_keys():
175 d[k] = getattr(self, k)
176
177 # also use __json__() if present to get additional fields
178 _json_attr = getattr(self, '__json__', None)
179 if _json_attr:
180 # update with attributes from __json__
181 if callable(_json_attr):
182 _json_attr = _json_attr()
183 for k, val in _json_attr.iteritems():
184 d[k] = val
185 return d
186
187 def get_appstruct(self):
188 """return list with keys and values tuples corresponding
189 to this model data """
190
191 l = []
192 for k in self._get_keys():
193 l.append((k, getattr(self, k),))
194 return l
195
196 def populate_obj(self, populate_dict):
197 """populate model with data from given populate_dict"""
198
199 for k in self._get_keys():
200 if k in populate_dict:
201 setattr(self, k, populate_dict[k])
202
203 @classmethod
204 def query(cls):
205 return Session().query(cls)
206
207 @classmethod
208 def get(cls, id_):
209 if id_:
210 return cls.query().get(id_)
211
212 @classmethod
213 def get_or_404(cls, id_):
214 try:
215 id_ = int(id_)
216 except (TypeError, ValueError):
217 raise HTTPNotFound
218
219 res = cls.query().get(id_)
220 if not res:
221 raise HTTPNotFound
222 return res
223
224 @classmethod
225 def getAll(cls):
226 # deprecated and left for backward compatibility
227 return cls.get_all()
228
229 @classmethod
230 def get_all(cls):
231 return cls.query().all()
232
233 @classmethod
234 def delete(cls, id_):
235 obj = cls.query().get(id_)
236 Session().delete(obj)
237
238 @classmethod
239 def identity_cache(cls, session, attr_name, value):
240 exist_in_session = []
241 for (item_cls, pkey), instance in session.identity_map.items():
242 if cls == item_cls and getattr(instance, attr_name) == value:
243 exist_in_session.append(instance)
244 if exist_in_session:
245 if len(exist_in_session) == 1:
246 return exist_in_session[0]
247 log.exception(
248 'multiple objects with attr %s and '
249 'value %s found with same name: %r',
250 attr_name, value, exist_in_session)
251
252 def __repr__(self):
253 if hasattr(self, '__unicode__'):
254 # python repr needs to return str
255 try:
256 return safe_str(self.__unicode__())
257 except UnicodeDecodeError:
258 pass
259 return '<DB:%s>' % (self.__class__.__name__)
260
261
262 class RhodeCodeSetting(Base, BaseModel):
263 __tablename__ = 'rhodecode_settings'
264 __table_args__ = (
265 UniqueConstraint('app_settings_name'),
266 {'extend_existing': True, 'mysql_engine': 'InnoDB',
267 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
268 )
269
270 SETTINGS_TYPES = {
271 'str': safe_str,
272 'int': safe_int,
273 'unicode': safe_unicode,
274 'bool': str2bool,
275 'list': functools.partial(aslist, sep=',')
276 }
277 DEFAULT_UPDATE_URL = 'https://rhodecode.com/api/v1/info/versions'
278 GLOBAL_CONF_KEY = 'app_settings'
279
280 app_settings_id = Column("app_settings_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
281 app_settings_name = Column("app_settings_name", String(255), nullable=True, unique=None, default=None)
282 _app_settings_value = Column("app_settings_value", String(4096), nullable=True, unique=None, default=None)
283 _app_settings_type = Column("app_settings_type", String(255), nullable=True, unique=None, default=None)
284
285 def __init__(self, key='', val='', type='unicode'):
286 self.app_settings_name = key
287 self.app_settings_type = type
288 self.app_settings_value = val
289
290 @validates('_app_settings_value')
291 def validate_settings_value(self, key, val):
292 assert type(val) == unicode
293 return val
294
295 @hybrid_property
296 def app_settings_value(self):
297 v = self._app_settings_value
298 _type = self.app_settings_type
299 if _type:
300 _type = self.app_settings_type.split('.')[0]
301 # decode the encrypted value
302 if 'encrypted' in self.app_settings_type:
303 cipher = EncryptedTextValue()
304 v = safe_unicode(cipher.process_result_value(v, None))
305
306 converter = self.SETTINGS_TYPES.get(_type) or \
307 self.SETTINGS_TYPES['unicode']
308 return converter(v)
309
310 @app_settings_value.setter
311 def app_settings_value(self, val):
312 """
313 Setter that will always make sure we use unicode in app_settings_value
314
315 :param val:
316 """
317 val = safe_unicode(val)
318 # encode the encrypted value
319 if 'encrypted' in self.app_settings_type:
320 cipher = EncryptedTextValue()
321 val = safe_unicode(cipher.process_bind_param(val, None))
322 self._app_settings_value = val
323
324 @hybrid_property
325 def app_settings_type(self):
326 return self._app_settings_type
327
328 @app_settings_type.setter
329 def app_settings_type(self, val):
330 if val.split('.')[0] not in self.SETTINGS_TYPES:
331 raise Exception('type must be one of %s got %s'
332 % (self.SETTINGS_TYPES.keys(), val))
333 self._app_settings_type = val
334
335 def __unicode__(self):
336 return u"<%s('%s:%s[%s]')>" % (
337 self.__class__.__name__,
338 self.app_settings_name, self.app_settings_value,
339 self.app_settings_type
340 )
341
342
343 class RhodeCodeUi(Base, BaseModel):
344 __tablename__ = 'rhodecode_ui'
345 __table_args__ = (
346 UniqueConstraint('ui_key'),
347 {'extend_existing': True, 'mysql_engine': 'InnoDB',
348 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
349 )
350
351 HOOK_REPO_SIZE = 'changegroup.repo_size'
352 # HG
353 HOOK_PRE_PULL = 'preoutgoing.pre_pull'
354 HOOK_PULL = 'outgoing.pull_logger'
355 HOOK_PRE_PUSH = 'prechangegroup.pre_push'
356 HOOK_PUSH = 'changegroup.push_logger'
357
358 # TODO: johbo: Unify way how hooks are configured for git and hg,
359 # git part is currently hardcoded.
360
361 # SVN PATTERNS
362 SVN_BRANCH_ID = 'vcs_svn_branch'
363 SVN_TAG_ID = 'vcs_svn_tag'
364
365 ui_id = Column(
366 "ui_id", Integer(), nullable=False, unique=True, default=None,
367 primary_key=True)
368 ui_section = Column(
369 "ui_section", String(255), nullable=True, unique=None, default=None)
370 ui_key = Column(
371 "ui_key", String(255), nullable=True, unique=None, default=None)
372 ui_value = Column(
373 "ui_value", String(255), nullable=True, unique=None, default=None)
374 ui_active = Column(
375 "ui_active", Boolean(), nullable=True, unique=None, default=True)
376
377 def __repr__(self):
378 return '<%s[%s]%s=>%s]>' % (self.__class__.__name__, self.ui_section,
379 self.ui_key, self.ui_value)
380
381
382 class RepoRhodeCodeSetting(Base, BaseModel):
383 __tablename__ = 'repo_rhodecode_settings'
384 __table_args__ = (
385 UniqueConstraint(
386 'app_settings_name', 'repository_id',
387 name='uq_repo_rhodecode_setting_name_repo_id'),
388 {'extend_existing': True, 'mysql_engine': 'InnoDB',
389 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
390 )
391
392 repository_id = Column(
393 "repository_id", Integer(), ForeignKey('repositories.repo_id'),
394 nullable=False)
395 app_settings_id = Column(
396 "app_settings_id", Integer(), nullable=False, unique=True,
397 default=None, primary_key=True)
398 app_settings_name = Column(
399 "app_settings_name", String(255), nullable=True, unique=None,
400 default=None)
401 _app_settings_value = Column(
402 "app_settings_value", String(4096), nullable=True, unique=None,
403 default=None)
404 _app_settings_type = Column(
405 "app_settings_type", String(255), nullable=True, unique=None,
406 default=None)
407
408 repository = relationship('Repository')
409
410 def __init__(self, repository_id, key='', val='', type='unicode'):
411 self.repository_id = repository_id
412 self.app_settings_name = key
413 self.app_settings_type = type
414 self.app_settings_value = val
415
416 @validates('_app_settings_value')
417 def validate_settings_value(self, key, val):
418 assert type(val) == unicode
419 return val
420
421 @hybrid_property
422 def app_settings_value(self):
423 v = self._app_settings_value
424 type_ = self.app_settings_type
425 SETTINGS_TYPES = RhodeCodeSetting.SETTINGS_TYPES
426 converter = SETTINGS_TYPES.get(type_) or SETTINGS_TYPES['unicode']
427 return converter(v)
428
429 @app_settings_value.setter
430 def app_settings_value(self, val):
431 """
432 Setter that will always make sure we use unicode in app_settings_value
433
434 :param val:
435 """
436 self._app_settings_value = safe_unicode(val)
437
438 @hybrid_property
439 def app_settings_type(self):
440 return self._app_settings_type
441
442 @app_settings_type.setter
443 def app_settings_type(self, val):
444 SETTINGS_TYPES = RhodeCodeSetting.SETTINGS_TYPES
445 if val not in SETTINGS_TYPES:
446 raise Exception('type must be one of %s got %s'
447 % (SETTINGS_TYPES.keys(), val))
448 self._app_settings_type = val
449
450 def __unicode__(self):
451 return u"<%s('%s:%s:%s[%s]')>" % (
452 self.__class__.__name__, self.repository.repo_name,
453 self.app_settings_name, self.app_settings_value,
454 self.app_settings_type
455 )
456
457
458 class RepoRhodeCodeUi(Base, BaseModel):
459 __tablename__ = 'repo_rhodecode_ui'
460 __table_args__ = (
461 UniqueConstraint(
462 'repository_id', 'ui_section', 'ui_key',
463 name='uq_repo_rhodecode_ui_repository_id_section_key'),
464 {'extend_existing': True, 'mysql_engine': 'InnoDB',
465 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
466 )
467
468 repository_id = Column(
469 "repository_id", Integer(), ForeignKey('repositories.repo_id'),
470 nullable=False)
471 ui_id = Column(
472 "ui_id", Integer(), nullable=False, unique=True, default=None,
473 primary_key=True)
474 ui_section = Column(
475 "ui_section", String(255), nullable=True, unique=None, default=None)
476 ui_key = Column(
477 "ui_key", String(255), nullable=True, unique=None, default=None)
478 ui_value = Column(
479 "ui_value", String(255), nullable=True, unique=None, default=None)
480 ui_active = Column(
481 "ui_active", Boolean(), nullable=True, unique=None, default=True)
482
483 repository = relationship('Repository')
484
485 def __repr__(self):
486 return '<%s[%s:%s]%s=>%s]>' % (
487 self.__class__.__name__, self.repository.repo_name,
488 self.ui_section, self.ui_key, self.ui_value)
489
490
491 class User(Base, BaseModel):
492 __tablename__ = 'users'
493 __table_args__ = (
494 UniqueConstraint('username'), UniqueConstraint('email'),
495 Index('u_username_idx', 'username'),
496 Index('u_email_idx', 'email'),
497 {'extend_existing': True, 'mysql_engine': 'InnoDB',
498 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
499 )
500 DEFAULT_USER = 'default'
501 DEFAULT_USER_EMAIL = 'anonymous@rhodecode.org'
502 DEFAULT_GRAVATAR_URL = 'https://secure.gravatar.com/avatar/{md5email}?d=identicon&s={size}'
503
504 user_id = Column("user_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
505 username = Column("username", String(255), nullable=True, unique=None, default=None)
506 password = Column("password", String(255), nullable=True, unique=None, default=None)
507 active = Column("active", Boolean(), nullable=True, unique=None, default=True)
508 admin = Column("admin", Boolean(), nullable=True, unique=None, default=False)
509 name = Column("firstname", String(255), nullable=True, unique=None, default=None)
510 lastname = Column("lastname", String(255), nullable=True, unique=None, default=None)
511 _email = Column("email", String(255), nullable=True, unique=None, default=None)
512 last_login = Column("last_login", DateTime(timezone=False), nullable=True, unique=None, default=None)
513 extern_type = Column("extern_type", String(255), nullable=True, unique=None, default=None)
514 extern_name = Column("extern_name", String(255), nullable=True, unique=None, default=None)
515 api_key = Column("api_key", String(255), nullable=True, unique=None, default=None)
516 inherit_default_permissions = Column("inherit_default_permissions", Boolean(), nullable=False, unique=None, default=True)
517 created_on = Column('created_on', DateTime(timezone=False), nullable=False, default=datetime.datetime.now)
518 _user_data = Column("user_data", LargeBinary(), nullable=True) # JSON data
519
520 user_log = relationship('UserLog')
521 user_perms = relationship('UserToPerm', primaryjoin="User.user_id==UserToPerm.user_id", cascade='all')
522
523 repositories = relationship('Repository')
524 repository_groups = relationship('RepoGroup')
525 user_groups = relationship('UserGroup')
526
527 user_followers = relationship('UserFollowing', primaryjoin='UserFollowing.follows_user_id==User.user_id', cascade='all')
528 followings = relationship('UserFollowing', primaryjoin='UserFollowing.user_id==User.user_id', cascade='all')
529
530 repo_to_perm = relationship('UserRepoToPerm', primaryjoin='UserRepoToPerm.user_id==User.user_id', cascade='all')
531 repo_group_to_perm = relationship('UserRepoGroupToPerm', primaryjoin='UserRepoGroupToPerm.user_id==User.user_id', cascade='all')
532 user_group_to_perm = relationship('UserUserGroupToPerm', primaryjoin='UserUserGroupToPerm.user_id==User.user_id', cascade='all')
533
534 group_member = relationship('UserGroupMember', cascade='all')
535
536 notifications = relationship('UserNotification', cascade='all')
537 # notifications assigned to this user
538 user_created_notifications = relationship('Notification', cascade='all')
539 # comments created by this user
540 user_comments = relationship('ChangesetComment', cascade='all')
541 # user profile extra info
542 user_emails = relationship('UserEmailMap', cascade='all')
543 user_ip_map = relationship('UserIpMap', cascade='all')
544 user_auth_tokens = relationship('UserApiKeys', cascade='all')
545 # gists
546 user_gists = relationship('Gist', cascade='all')
547 # user pull requests
548 user_pull_requests = relationship('PullRequest', cascade='all')
549 # external identities
550 extenal_identities = relationship(
551 'ExternalIdentity',
552 primaryjoin="User.user_id==ExternalIdentity.local_user_id",
553 cascade='all')
554
555 def __unicode__(self):
556 return u"<%s('id:%s:%s')>" % (self.__class__.__name__,
557 self.user_id, self.username)
558
559 @hybrid_property
560 def email(self):
561 return self._email
562
563 @email.setter
564 def email(self, val):
565 self._email = val.lower() if val else None
566
567 @property
568 def firstname(self):
569 # alias for future
570 return self.name
571
572 @property
573 def emails(self):
574 other = UserEmailMap.query().filter(UserEmailMap.user==self).all()
575 return [self.email] + [x.email for x in other]
576
577 @property
578 def auth_tokens(self):
579 return [self.api_key] + [x.api_key for x in self.extra_auth_tokens]
580
581 @property
582 def extra_auth_tokens(self):
583 return UserApiKeys.query().filter(UserApiKeys.user == self).all()
584
585 @property
586 def feed_token(self):
587 feed_tokens = UserApiKeys.query()\
588 .filter(UserApiKeys.user == self)\
589 .filter(UserApiKeys.role == UserApiKeys.ROLE_FEED)\
590 .all()
591 if feed_tokens:
592 return feed_tokens[0].api_key
593 else:
594 # use the main token so we don't end up with nothing...
595 return self.api_key
596
597 @classmethod
598 def extra_valid_auth_tokens(cls, user, role=None):
599 tokens = UserApiKeys.query().filter(UserApiKeys.user == user)\
600 .filter(or_(UserApiKeys.expires == -1,
601 UserApiKeys.expires >= time.time()))
602 if role:
603 tokens = tokens.filter(or_(UserApiKeys.role == role,
604 UserApiKeys.role == UserApiKeys.ROLE_ALL))
605 return tokens.all()
606
607 @property
608 def ip_addresses(self):
609 ret = UserIpMap.query().filter(UserIpMap.user == self).all()
610 return [x.ip_addr for x in ret]
611
612 @property
613 def username_and_name(self):
614 return '%s (%s %s)' % (self.username, self.firstname, self.lastname)
615
616 @property
617 def username_or_name_or_email(self):
618 full_name = self.full_name if self.full_name is not ' ' else None
619 return self.username or full_name or self.email
620
621 @property
622 def full_name(self):
623 return '%s %s' % (self.firstname, self.lastname)
624
625 @property
626 def full_name_or_username(self):
627 return ('%s %s' % (self.firstname, self.lastname)
628 if (self.firstname and self.lastname) else self.username)
629
630 @property
631 def full_contact(self):
632 return '%s %s <%s>' % (self.firstname, self.lastname, self.email)
633
634 @property
635 def short_contact(self):
636 return '%s %s' % (self.firstname, self.lastname)
637
638 @property
639 def is_admin(self):
640 return self.admin
641
642 @property
643 def AuthUser(self):
644 """
645 Returns instance of AuthUser for this user
646 """
647 from rhodecode.lib.auth import AuthUser
648 return AuthUser(user_id=self.user_id, api_key=self.api_key,
649 username=self.username)
650
651 @hybrid_property
652 def user_data(self):
653 if not self._user_data:
654 return {}
655
656 try:
657 return json.loads(self._user_data)
658 except TypeError:
659 return {}
660
661 @user_data.setter
662 def user_data(self, val):
663 if not isinstance(val, dict):
664 raise Exception('user_data must be dict, got %s' % type(val))
665 try:
666 self._user_data = json.dumps(val)
667 except Exception:
668 log.error(traceback.format_exc())
669
670 @classmethod
671 def get_by_username(cls, username, case_insensitive=False,
672 cache=False, identity_cache=False):
673 session = Session()
674
675 if case_insensitive:
676 q = cls.query().filter(
677 func.lower(cls.username) == func.lower(username))
678 else:
679 q = cls.query().filter(cls.username == username)
680
681 if cache:
682 if identity_cache:
683 val = cls.identity_cache(session, 'username', username)
684 if val:
685 return val
686 else:
687 q = q.options(
688 FromCache("sql_cache_short",
689 "get_user_by_name_%s" % _hash_key(username)))
690
691 return q.scalar()
692
693 @classmethod
694 def get_by_auth_token(cls, auth_token, cache=False, fallback=True):
695 q = cls.query().filter(cls.api_key == auth_token)
696
697 if cache:
698 q = q.options(FromCache("sql_cache_short",
699 "get_auth_token_%s" % auth_token))
700 res = q.scalar()
701
702 if fallback and not res:
703 #fallback to additional keys
704 _res = UserApiKeys.query()\
705 .filter(UserApiKeys.api_key == auth_token)\
706 .filter(or_(UserApiKeys.expires == -1,
707 UserApiKeys.expires >= time.time()))\
708 .first()
709 if _res:
710 res = _res.user
711 return res
712
713 @classmethod
714 def get_by_email(cls, email, case_insensitive=False, cache=False):
715
716 if case_insensitive:
717 q = cls.query().filter(func.lower(cls.email) == func.lower(email))
718
719 else:
720 q = cls.query().filter(cls.email == email)
721
722 if cache:
723 q = q.options(FromCache("sql_cache_short",
724 "get_email_key_%s" % _hash_key(email)))
725
726 ret = q.scalar()
727 if ret is None:
728 q = UserEmailMap.query()
729 # try fetching in alternate email map
730 if case_insensitive:
731 q = q.filter(func.lower(UserEmailMap.email) == func.lower(email))
732 else:
733 q = q.filter(UserEmailMap.email == email)
734 q = q.options(joinedload(UserEmailMap.user))
735 if cache:
736 q = q.options(FromCache("sql_cache_short",
737 "get_email_map_key_%s" % email))
738 ret = getattr(q.scalar(), 'user', None)
739
740 return ret
741
742 @classmethod
743 def get_from_cs_author(cls, author):
744 """
745 Tries to get User objects out of commit author string
746
747 :param author:
748 """
749 from rhodecode.lib.helpers import email, author_name
750 # Valid email in the attribute passed, see if they're in the system
751 _email = email(author)
752 if _email:
753 user = cls.get_by_email(_email, case_insensitive=True)
754 if user:
755 return user
756 # Maybe we can match by username?
757 _author = author_name(author)
758 user = cls.get_by_username(_author, case_insensitive=True)
759 if user:
760 return user
761
762 def update_userdata(self, **kwargs):
763 usr = self
764 old = usr.user_data
765 old.update(**kwargs)
766 usr.user_data = old
767 Session().add(usr)
768 log.debug('updated userdata with ', kwargs)
769
770 def update_lastlogin(self):
771 """Update user lastlogin"""
772 self.last_login = datetime.datetime.now()
773 Session().add(self)
774 log.debug('updated user %s lastlogin', self.username)
775
776 def update_lastactivity(self):
777 """Update user lastactivity"""
778 usr = self
779 old = usr.user_data
780 old.update({'last_activity': time.time()})
781 usr.user_data = old
782 Session().add(usr)
783 log.debug('updated user %s lastactivity', usr.username)
784
785 def update_password(self, new_password, change_api_key=False):
786 from rhodecode.lib.auth import get_crypt_password,generate_auth_token
787
788 self.password = get_crypt_password(new_password)
789 if change_api_key:
790 self.api_key = generate_auth_token(self.username)
791 Session().add(self)
792
793 @classmethod
794 def get_first_super_admin(cls):
795 user = User.query().filter(User.admin == true()).first()
796 if user is None:
797 raise Exception('FATAL: Missing administrative account!')
798 return user
799
800 @classmethod
801 def get_all_super_admins(cls):
802 """
803 Returns all admin accounts sorted by username
804 """
805 return User.query().filter(User.admin == true())\
806 .order_by(User.username.asc()).all()
807
808 @classmethod
809 def get_default_user(cls, cache=False):
810 user = User.get_by_username(User.DEFAULT_USER, cache=cache)
811 if user is None:
812 raise Exception('FATAL: Missing default account!')
813 return user
814
815 def _get_default_perms(self, user, suffix=''):
816 from rhodecode.model.permission import PermissionModel
817 return PermissionModel().get_default_perms(user.user_perms, suffix)
818
819 def get_default_perms(self, suffix=''):
820 return self._get_default_perms(self, suffix)
821
822 def get_api_data(self, include_secrets=False, details='full'):
823 """
824 Common function for generating user related data for API
825
826 :param include_secrets: By default secrets in the API data will be replaced
827 by a placeholder value to prevent exposing this data by accident. In case
828 this data shall be exposed, set this flag to ``True``.
829
830 :param details: details can be 'basic|full' basic gives only a subset of
831 the available user information that includes user_id, name and emails.
832 """
833 user = self
834 user_data = self.user_data
835 data = {
836 'user_id': user.user_id,
837 'username': user.username,
838 'firstname': user.name,
839 'lastname': user.lastname,
840 'email': user.email,
841 'emails': user.emails,
842 }
843 if details == 'basic':
844 return data
845
846 api_key_length = 40
847 api_key_replacement = '*' * api_key_length
848
849 extras = {
850 'api_key': api_key_replacement,
851 'api_keys': [api_key_replacement],
852 'active': user.active,
853 'admin': user.admin,
854 'extern_type': user.extern_type,
855 'extern_name': user.extern_name,
856 'last_login': user.last_login,
857 'ip_addresses': user.ip_addresses,
858 'language': user_data.get('language')
859 }
860 data.update(extras)
861
862 if include_secrets:
863 data['api_key'] = user.api_key
864 data['api_keys'] = user.auth_tokens
865 return data
866
867 def __json__(self):
868 data = {
869 'full_name': self.full_name,
870 'full_name_or_username': self.full_name_or_username,
871 'short_contact': self.short_contact,
872 'full_contact': self.full_contact,
873 }
874 data.update(self.get_api_data())
875 return data
876
877
878 class UserApiKeys(Base, BaseModel):
879 __tablename__ = 'user_api_keys'
880 __table_args__ = (
881 Index('uak_api_key_idx', 'api_key'),
882 Index('uak_api_key_expires_idx', 'api_key', 'expires'),
883 UniqueConstraint('api_key'),
884 {'extend_existing': True, 'mysql_engine': 'InnoDB',
885 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
886 )
887 __mapper_args__ = {}
888
889 # ApiKey role
890 ROLE_ALL = 'token_role_all'
891 ROLE_HTTP = 'token_role_http'
892 ROLE_VCS = 'token_role_vcs'
893 ROLE_API = 'token_role_api'
894 ROLE_FEED = 'token_role_feed'
895 ROLES = [ROLE_ALL, ROLE_HTTP, ROLE_VCS, ROLE_API, ROLE_FEED]
896
897 user_api_key_id = Column("user_api_key_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
898 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=True, unique=None, default=None)
899 api_key = Column("api_key", String(255), nullable=False, unique=True)
900 description = Column('description', UnicodeText().with_variant(UnicodeText(1024), 'mysql'))
901 expires = Column('expires', Float(53), nullable=False)
902 role = Column('role', String(255), nullable=True)
903 created_on = Column('created_on', DateTime(timezone=False), nullable=False, default=datetime.datetime.now)
904
905 user = relationship('User', lazy='joined')
906
907 @classmethod
908 def _get_role_name(cls, role):
909 return {
910 cls.ROLE_ALL: _('all'),
911 cls.ROLE_HTTP: _('http/web interface'),
912 cls.ROLE_VCS: _('vcs (git/hg/svn protocol)'),
913 cls.ROLE_API: _('api calls'),
914 cls.ROLE_FEED: _('feed access'),
915 }.get(role, role)
916
917 @property
918 def expired(self):
919 if self.expires == -1:
920 return False
921 return time.time() > self.expires
922
923 @property
924 def role_humanized(self):
925 return self._get_role_name(self.role)
926
927
928 class UserEmailMap(Base, BaseModel):
929 __tablename__ = 'user_email_map'
930 __table_args__ = (
931 Index('uem_email_idx', 'email'),
932 UniqueConstraint('email'),
933 {'extend_existing': True, 'mysql_engine': 'InnoDB',
934 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
935 )
936 __mapper_args__ = {}
937
938 email_id = Column("email_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
939 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=True, unique=None, default=None)
940 _email = Column("email", String(255), nullable=True, unique=False, default=None)
941 user = relationship('User', lazy='joined')
942
943 @validates('_email')
944 def validate_email(self, key, email):
945 # check if this email is not main one
946 main_email = Session().query(User).filter(User.email == email).scalar()
947 if main_email is not None:
948 raise AttributeError('email %s is present is user table' % email)
949 return email
950
951 @hybrid_property
952 def email(self):
953 return self._email
954
955 @email.setter
956 def email(self, val):
957 self._email = val.lower() if val else None
958
959
960 class UserIpMap(Base, BaseModel):
961 __tablename__ = 'user_ip_map'
962 __table_args__ = (
963 UniqueConstraint('user_id', 'ip_addr'),
964 {'extend_existing': True, 'mysql_engine': 'InnoDB',
965 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
966 )
967 __mapper_args__ = {}
968
969 ip_id = Column("ip_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
970 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=True, unique=None, default=None)
971 ip_addr = Column("ip_addr", String(255), nullable=True, unique=False, default=None)
972 active = Column("active", Boolean(), nullable=True, unique=None, default=True)
973 description = Column("description", String(10000), nullable=True, unique=None, default=None)
974 user = relationship('User', lazy='joined')
975
976 @classmethod
977 def _get_ip_range(cls, ip_addr):
978 net = ipaddress.ip_network(ip_addr, strict=False)
979 return [str(net.network_address), str(net.broadcast_address)]
980
981 def __json__(self):
982 return {
983 'ip_addr': self.ip_addr,
984 'ip_range': self._get_ip_range(self.ip_addr),
985 }
986
987 def __unicode__(self):
988 return u"<%s('user_id:%s=>%s')>" % (self.__class__.__name__,
989 self.user_id, self.ip_addr)
990
991 class UserLog(Base, BaseModel):
992 __tablename__ = 'user_logs'
993 __table_args__ = (
994 {'extend_existing': True, 'mysql_engine': 'InnoDB',
995 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
996 )
997 user_log_id = Column("user_log_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
998 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=True, unique=None, default=None)
999 username = Column("username", String(255), nullable=True, unique=None, default=None)
1000 repository_id = Column("repository_id", Integer(), ForeignKey('repositories.repo_id'), nullable=True)
1001 repository_name = Column("repository_name", String(255), nullable=True, unique=None, default=None)
1002 user_ip = Column("user_ip", String(255), nullable=True, unique=None, default=None)
1003 action = Column("action", Text().with_variant(Text(1200000), 'mysql'), nullable=True, unique=None, default=None)
1004 action_date = Column("action_date", DateTime(timezone=False), nullable=True, unique=None, default=None)
1005
1006 def __unicode__(self):
1007 return u"<%s('id:%s:%s')>" % (self.__class__.__name__,
1008 self.repository_name,
1009 self.action)
1010
1011 @property
1012 def action_as_day(self):
1013 return datetime.date(*self.action_date.timetuple()[:3])
1014
1015 user = relationship('User')
1016 repository = relationship('Repository', cascade='')
1017
1018
1019 class UserGroup(Base, BaseModel):
1020 __tablename__ = 'users_groups'
1021 __table_args__ = (
1022 {'extend_existing': True, 'mysql_engine': 'InnoDB',
1023 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
1024 )
1025
1026 users_group_id = Column("users_group_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
1027 users_group_name = Column("users_group_name", String(255), nullable=False, unique=True, default=None)
1028 user_group_description = Column("user_group_description", String(10000), nullable=True, unique=None, default=None)
1029 users_group_active = Column("users_group_active", Boolean(), nullable=True, unique=None, default=None)
1030 inherit_default_permissions = Column("users_group_inherit_default_permissions", Boolean(), nullable=False, unique=None, default=True)
1031 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=False, default=None)
1032 created_on = Column('created_on', DateTime(timezone=False), nullable=False, default=datetime.datetime.now)
1033 _group_data = Column("group_data", LargeBinary(), nullable=True) # JSON data
1034
1035 members = relationship('UserGroupMember', cascade="all, delete, delete-orphan", lazy="joined")
1036 users_group_to_perm = relationship('UserGroupToPerm', cascade='all')
1037 users_group_repo_to_perm = relationship('UserGroupRepoToPerm', cascade='all')
1038 users_group_repo_group_to_perm = relationship('UserGroupRepoGroupToPerm', cascade='all')
1039 user_user_group_to_perm = relationship('UserUserGroupToPerm', cascade='all')
1040 user_group_user_group_to_perm = relationship('UserGroupUserGroupToPerm ', primaryjoin="UserGroupUserGroupToPerm.target_user_group_id==UserGroup.users_group_id", cascade='all')
1041
1042 user = relationship('User')
1043
1044 @hybrid_property
1045 def group_data(self):
1046 if not self._group_data:
1047 return {}
1048
1049 try:
1050 return json.loads(self._group_data)
1051 except TypeError:
1052 return {}
1053
1054 @group_data.setter
1055 def group_data(self, val):
1056 try:
1057 self._group_data = json.dumps(val)
1058 except Exception:
1059 log.error(traceback.format_exc())
1060
1061 def __unicode__(self):
1062 return u"<%s('id:%s:%s')>" % (self.__class__.__name__,
1063 self.users_group_id,
1064 self.users_group_name)
1065
1066 @classmethod
1067 def get_by_group_name(cls, group_name, cache=False,
1068 case_insensitive=False):
1069 if case_insensitive:
1070 q = cls.query().filter(func.lower(cls.users_group_name) ==
1071 func.lower(group_name))
1072
1073 else:
1074 q = cls.query().filter(cls.users_group_name == group_name)
1075 if cache:
1076 q = q.options(FromCache(
1077 "sql_cache_short",
1078 "get_group_%s" % _hash_key(group_name)))
1079 return q.scalar()
1080
1081 @classmethod
1082 def get(cls, user_group_id, cache=False):
1083 user_group = cls.query()
1084 if cache:
1085 user_group = user_group.options(FromCache("sql_cache_short",
1086 "get_users_group_%s" % user_group_id))
1087 return user_group.get(user_group_id)
1088
1089 def permissions(self, with_admins=True, with_owner=True):
1090 q = UserUserGroupToPerm.query().filter(UserUserGroupToPerm.user_group == self)
1091 q = q.options(joinedload(UserUserGroupToPerm.user_group),
1092 joinedload(UserUserGroupToPerm.user),
1093 joinedload(UserUserGroupToPerm.permission),)
1094
1095 # get owners and admins and permissions. We do a trick of re-writing
1096 # objects from sqlalchemy to named-tuples due to sqlalchemy session
1097 # has a global reference and changing one object propagates to all
1098 # others. This means if admin is also an owner admin_row that change
1099 # would propagate to both objects
1100 perm_rows = []
1101 for _usr in q.all():
1102 usr = AttributeDict(_usr.user.get_dict())
1103 usr.permission = _usr.permission.permission_name
1104 perm_rows.append(usr)
1105
1106 # filter the perm rows by 'default' first and then sort them by
1107 # admin,write,read,none permissions sorted again alphabetically in
1108 # each group
1109 perm_rows = sorted(perm_rows, key=display_sort)
1110
1111 _admin_perm = 'usergroup.admin'
1112 owner_row = []
1113 if with_owner:
1114 usr = AttributeDict(self.user.get_dict())
1115 usr.owner_row = True
1116 usr.permission = _admin_perm
1117 owner_row.append(usr)
1118
1119 super_admin_rows = []
1120 if with_admins:
1121 for usr in User.get_all_super_admins():
1122 # if this admin is also owner, don't double the record
1123 if usr.user_id == owner_row[0].user_id:
1124 owner_row[0].admin_row = True
1125 else:
1126 usr = AttributeDict(usr.get_dict())
1127 usr.admin_row = True
1128 usr.permission = _admin_perm
1129 super_admin_rows.append(usr)
1130
1131 return super_admin_rows + owner_row + perm_rows
1132
1133 def permission_user_groups(self):
1134 q = UserGroupUserGroupToPerm.query().filter(UserGroupUserGroupToPerm.target_user_group == self)
1135 q = q.options(joinedload(UserGroupUserGroupToPerm.user_group),
1136 joinedload(UserGroupUserGroupToPerm.target_user_group),
1137 joinedload(UserGroupUserGroupToPerm.permission),)
1138
1139 perm_rows = []
1140 for _user_group in q.all():
1141 usr = AttributeDict(_user_group.user_group.get_dict())
1142 usr.permission = _user_group.permission.permission_name
1143 perm_rows.append(usr)
1144
1145 return perm_rows
1146
1147 def _get_default_perms(self, user_group, suffix=''):
1148 from rhodecode.model.permission import PermissionModel
1149 return PermissionModel().get_default_perms(user_group.users_group_to_perm, suffix)
1150
1151 def get_default_perms(self, suffix=''):
1152 return self._get_default_perms(self, suffix)
1153
1154 def get_api_data(self, with_group_members=True, include_secrets=False):
1155 """
1156 :param include_secrets: See :meth:`User.get_api_data`, this parameter is
1157 basically forwarded.
1158
1159 """
1160 user_group = self
1161
1162 data = {
1163 'users_group_id': user_group.users_group_id,
1164 'group_name': user_group.users_group_name,
1165 'group_description': user_group.user_group_description,
1166 'active': user_group.users_group_active,
1167 'owner': user_group.user.username,
1168 }
1169 if with_group_members:
1170 users = []
1171 for user in user_group.members:
1172 user = user.user
1173 users.append(user.get_api_data(include_secrets=include_secrets))
1174 data['users'] = users
1175
1176 return data
1177
1178
1179 class UserGroupMember(Base, BaseModel):
1180 __tablename__ = 'users_groups_members'
1181 __table_args__ = (
1182 {'extend_existing': True, 'mysql_engine': 'InnoDB',
1183 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
1184 )
1185
1186 users_group_member_id = Column("users_group_member_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
1187 users_group_id = Column("users_group_id", Integer(), ForeignKey('users_groups.users_group_id'), nullable=False, unique=None, default=None)
1188 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
1189
1190 user = relationship('User', lazy='joined')
1191 users_group = relationship('UserGroup')
1192
1193 def __init__(self, gr_id='', u_id=''):
1194 self.users_group_id = gr_id
1195 self.user_id = u_id
1196
1197
1198 class RepositoryField(Base, BaseModel):
1199 __tablename__ = 'repositories_fields'
1200 __table_args__ = (
1201 UniqueConstraint('repository_id', 'field_key'), # no-multi field
1202 {'extend_existing': True, 'mysql_engine': 'InnoDB',
1203 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
1204 )
1205 PREFIX = 'ex_' # prefix used in form to not conflict with already existing fields
1206
1207 repo_field_id = Column("repo_field_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
1208 repository_id = Column("repository_id", Integer(), ForeignKey('repositories.repo_id'), nullable=False, unique=None, default=None)
1209 field_key = Column("field_key", String(250))
1210 field_label = Column("field_label", String(1024), nullable=False)
1211 field_value = Column("field_value", String(10000), nullable=False)
1212 field_desc = Column("field_desc", String(1024), nullable=False)
1213 field_type = Column("field_type", String(255), nullable=False, unique=None)
1214 created_on = Column('created_on', DateTime(timezone=False), nullable=False, default=datetime.datetime.now)
1215
1216 repository = relationship('Repository')
1217
1218 @property
1219 def field_key_prefixed(self):
1220 return 'ex_%s' % self.field_key
1221
1222 @classmethod
1223 def un_prefix_key(cls, key):
1224 if key.startswith(cls.PREFIX):
1225 return key[len(cls.PREFIX):]
1226 return key
1227
1228 @classmethod
1229 def get_by_key_name(cls, key, repo):
1230 row = cls.query()\
1231 .filter(cls.repository == repo)\
1232 .filter(cls.field_key == key).scalar()
1233 return row
1234
1235
1236 class Repository(Base, BaseModel):
1237 __tablename__ = 'repositories'
1238 __table_args__ = (
1239 Index('r_repo_name_idx', 'repo_name', mysql_length=255),
1240 {'extend_existing': True, 'mysql_engine': 'InnoDB',
1241 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
1242 )
1243 DEFAULT_CLONE_URI = '{scheme}://{user}@{netloc}/{repo}'
1244 DEFAULT_CLONE_URI_ID = '{scheme}://{user}@{netloc}/_{repoid}'
1245
1246 STATE_CREATED = 'repo_state_created'
1247 STATE_PENDING = 'repo_state_pending'
1248 STATE_ERROR = 'repo_state_error'
1249
1250 LOCK_AUTOMATIC = 'lock_auto'
1251 LOCK_API = 'lock_api'
1252 LOCK_WEB = 'lock_web'
1253 LOCK_PULL = 'lock_pull'
1254
1255 NAME_SEP = URL_SEP
1256
1257 repo_id = Column(
1258 "repo_id", Integer(), nullable=False, unique=True, default=None,
1259 primary_key=True)
1260 _repo_name = Column(
1261 "repo_name", Text(), nullable=False, default=None)
1262 _repo_name_hash = Column(
1263 "repo_name_hash", String(255), nullable=False, unique=True)
1264 repo_state = Column("repo_state", String(255), nullable=True)
1265
1266 clone_uri = Column(
1267 "clone_uri", EncryptedTextValue(), nullable=True, unique=False,
1268 default=None)
1269 repo_type = Column(
1270 "repo_type", String(255), nullable=False, unique=False, default=None)
1271 user_id = Column(
1272 "user_id", Integer(), ForeignKey('users.user_id'), nullable=False,
1273 unique=False, default=None)
1274 private = Column(
1275 "private", Boolean(), nullable=True, unique=None, default=None)
1276 enable_statistics = Column(
1277 "statistics", Boolean(), nullable=True, unique=None, default=True)
1278 enable_downloads = Column(
1279 "downloads", Boolean(), nullable=True, unique=None, default=True)
1280 description = Column(
1281 "description", String(10000), nullable=True, unique=None, default=None)
1282 created_on = Column(
1283 'created_on', DateTime(timezone=False), nullable=True, unique=None,
1284 default=datetime.datetime.now)
1285 updated_on = Column(
1286 'updated_on', DateTime(timezone=False), nullable=True, unique=None,
1287 default=datetime.datetime.now)
1288 _landing_revision = Column(
1289 "landing_revision", String(255), nullable=False, unique=False,
1290 default=None)
1291 enable_locking = Column(
1292 "enable_locking", Boolean(), nullable=False, unique=None,
1293 default=False)
1294 _locked = Column(
1295 "locked", String(255), nullable=True, unique=False, default=None)
1296 _changeset_cache = Column(
1297 "changeset_cache", LargeBinary(), nullable=True) # JSON data
1298
1299 fork_id = Column(
1300 "fork_id", Integer(), ForeignKey('repositories.repo_id'),
1301 nullable=True, unique=False, default=None)
1302 group_id = Column(
1303 "group_id", Integer(), ForeignKey('groups.group_id'), nullable=True,
1304 unique=False, default=None)
1305
1306 user = relationship('User', lazy='joined')
1307 fork = relationship('Repository', remote_side=repo_id, lazy='joined')
1308 group = relationship('RepoGroup', lazy='joined')
1309 repo_to_perm = relationship(
1310 'UserRepoToPerm', cascade='all',
1311 order_by='UserRepoToPerm.repo_to_perm_id')
1312 users_group_to_perm = relationship('UserGroupRepoToPerm', cascade='all')
1313 stats = relationship('Statistics', cascade='all', uselist=False)
1314
1315 followers = relationship(
1316 'UserFollowing',
1317 primaryjoin='UserFollowing.follows_repo_id==Repository.repo_id',
1318 cascade='all')
1319 extra_fields = relationship(
1320 'RepositoryField', cascade="all, delete, delete-orphan")
1321 logs = relationship('UserLog')
1322 comments = relationship(
1323 'ChangesetComment', cascade="all, delete, delete-orphan")
1324 pull_requests_source = relationship(
1325 'PullRequest',
1326 primaryjoin='PullRequest.source_repo_id==Repository.repo_id',
1327 cascade="all, delete, delete-orphan")
1328 pull_requests_target = relationship(
1329 'PullRequest',
1330 primaryjoin='PullRequest.target_repo_id==Repository.repo_id',
1331 cascade="all, delete, delete-orphan")
1332 ui = relationship('RepoRhodeCodeUi', cascade="all")
1333 settings = relationship('RepoRhodeCodeSetting', cascade="all")
1334 integrations = relationship('Integration',
1335 cascade="all, delete, delete-orphan")
1336
1337 def __unicode__(self):
1338 return u"<%s('%s:%s')>" % (self.__class__.__name__, self.repo_id,
1339 safe_unicode(self.repo_name))
1340
1341 @hybrid_property
1342 def landing_rev(self):
1343 # always should return [rev_type, rev]
1344 if self._landing_revision:
1345 _rev_info = self._landing_revision.split(':')
1346 if len(_rev_info) < 2:
1347 _rev_info.insert(0, 'rev')
1348 return [_rev_info[0], _rev_info[1]]
1349 return [None, None]
1350
1351 @landing_rev.setter
1352 def landing_rev(self, val):
1353 if ':' not in val:
1354 raise ValueError('value must be delimited with `:` and consist '
1355 'of <rev_type>:<rev>, got %s instead' % val)
1356 self._landing_revision = val
1357
1358 @hybrid_property
1359 def locked(self):
1360 if self._locked:
1361 user_id, timelocked, reason = self._locked.split(':')
1362 lock_values = int(user_id), timelocked, reason
1363 else:
1364 lock_values = [None, None, None]
1365 return lock_values
1366
1367 @locked.setter
1368 def locked(self, val):
1369 if val and isinstance(val, (list, tuple)):
1370 self._locked = ':'.join(map(str, val))
1371 else:
1372 self._locked = None
1373
1374 @hybrid_property
1375 def changeset_cache(self):
1376 from rhodecode.lib.vcs.backends.base import EmptyCommit
1377 dummy = EmptyCommit().__json__()
1378 if not self._changeset_cache:
1379 return dummy
1380 try:
1381 return json.loads(self._changeset_cache)
1382 except TypeError:
1383 return dummy
1384 except Exception:
1385 log.error(traceback.format_exc())
1386 return dummy
1387
1388 @changeset_cache.setter
1389 def changeset_cache(self, val):
1390 try:
1391 self._changeset_cache = json.dumps(val)
1392 except Exception:
1393 log.error(traceback.format_exc())
1394
1395 @hybrid_property
1396 def repo_name(self):
1397 return self._repo_name
1398
1399 @repo_name.setter
1400 def repo_name(self, value):
1401 self._repo_name = value
1402 self._repo_name_hash = hashlib.sha1(safe_str(value)).hexdigest()
1403
1404 @classmethod
1405 def normalize_repo_name(cls, repo_name):
1406 """
1407 Normalizes os specific repo_name to the format internally stored inside
1408 database using URL_SEP
1409
1410 :param cls:
1411 :param repo_name:
1412 """
1413 return cls.NAME_SEP.join(repo_name.split(os.sep))
1414
1415 @classmethod
1416 def get_by_repo_name(cls, repo_name, cache=False, identity_cache=False):
1417 session = Session()
1418 q = session.query(cls).filter(cls.repo_name == repo_name)
1419
1420 if cache:
1421 if identity_cache:
1422 val = cls.identity_cache(session, 'repo_name', repo_name)
1423 if val:
1424 return val
1425 else:
1426 q = q.options(
1427 FromCache("sql_cache_short",
1428 "get_repo_by_name_%s" % _hash_key(repo_name)))
1429
1430 return q.scalar()
1431
1432 @classmethod
1433 def get_by_full_path(cls, repo_full_path):
1434 repo_name = repo_full_path.split(cls.base_path(), 1)[-1]
1435 repo_name = cls.normalize_repo_name(repo_name)
1436 return cls.get_by_repo_name(repo_name.strip(URL_SEP))
1437
1438 @classmethod
1439 def get_repo_forks(cls, repo_id):
1440 return cls.query().filter(Repository.fork_id == repo_id)
1441
1442 @classmethod
1443 def base_path(cls):
1444 """
1445 Returns base path when all repos are stored
1446
1447 :param cls:
1448 """
1449 q = Session().query(RhodeCodeUi)\
1450 .filter(RhodeCodeUi.ui_key == cls.NAME_SEP)
1451 q = q.options(FromCache("sql_cache_short", "repository_repo_path"))
1452 return q.one().ui_value
1453
1454 @classmethod
1455 def is_valid(cls, repo_name):
1456 """
1457 returns True if given repo name is a valid filesystem repository
1458
1459 :param cls:
1460 :param repo_name:
1461 """
1462 from rhodecode.lib.utils import is_valid_repo
1463
1464 return is_valid_repo(repo_name, cls.base_path())
1465
1466 @classmethod
1467 def get_all_repos(cls, user_id=Optional(None), group_id=Optional(None),
1468 case_insensitive=True):
1469 q = Repository.query()
1470
1471 if not isinstance(user_id, Optional):
1472 q = q.filter(Repository.user_id == user_id)
1473
1474 if not isinstance(group_id, Optional):
1475 q = q.filter(Repository.group_id == group_id)
1476
1477 if case_insensitive:
1478 q = q.order_by(func.lower(Repository.repo_name))
1479 else:
1480 q = q.order_by(Repository.repo_name)
1481 return q.all()
1482
1483 @property
1484 def forks(self):
1485 """
1486 Return forks of this repo
1487 """
1488 return Repository.get_repo_forks(self.repo_id)
1489
1490 @property
1491 def parent(self):
1492 """
1493 Returns fork parent
1494 """
1495 return self.fork
1496
1497 @property
1498 def just_name(self):
1499 return self.repo_name.split(self.NAME_SEP)[-1]
1500
1501 @property
1502 def groups_with_parents(self):
1503 groups = []
1504 if self.group is None:
1505 return groups
1506
1507 cur_gr = self.group
1508 groups.insert(0, cur_gr)
1509 while 1:
1510 gr = getattr(cur_gr, 'parent_group', None)
1511 cur_gr = cur_gr.parent_group
1512 if gr is None:
1513 break
1514 groups.insert(0, gr)
1515
1516 return groups
1517
1518 @property
1519 def groups_and_repo(self):
1520 return self.groups_with_parents, self
1521
1522 @LazyProperty
1523 def repo_path(self):
1524 """
1525 Returns base full path for that repository means where it actually
1526 exists on a filesystem
1527 """
1528 q = Session().query(RhodeCodeUi).filter(
1529 RhodeCodeUi.ui_key == self.NAME_SEP)
1530 q = q.options(FromCache("sql_cache_short", "repository_repo_path"))
1531 return q.one().ui_value
1532
1533 @property
1534 def repo_full_path(self):
1535 p = [self.repo_path]
1536 # we need to split the name by / since this is how we store the
1537 # names in the database, but that eventually needs to be converted
1538 # into a valid system path
1539 p += self.repo_name.split(self.NAME_SEP)
1540 return os.path.join(*map(safe_unicode, p))
1541
1542 @property
1543 def cache_keys(self):
1544 """
1545 Returns associated cache keys for that repo
1546 """
1547 return CacheKey.query()\
1548 .filter(CacheKey.cache_args == self.repo_name)\
1549 .order_by(CacheKey.cache_key)\
1550 .all()
1551
1552 def get_new_name(self, repo_name):
1553 """
1554 returns new full repository name based on assigned group and new new
1555
1556 :param group_name:
1557 """
1558 path_prefix = self.group.full_path_splitted if self.group else []
1559 return self.NAME_SEP.join(path_prefix + [repo_name])
1560
1561 @property
1562 def _config(self):
1563 """
1564 Returns db based config object.
1565 """
1566 from rhodecode.lib.utils import make_db_config
1567 return make_db_config(clear_session=False, repo=self)
1568
1569 def permissions(self, with_admins=True, with_owner=True):
1570 q = UserRepoToPerm.query().filter(UserRepoToPerm.repository == self)
1571 q = q.options(joinedload(UserRepoToPerm.repository),
1572 joinedload(UserRepoToPerm.user),
1573 joinedload(UserRepoToPerm.permission),)
1574
1575 # get owners and admins and permissions. We do a trick of re-writing
1576 # objects from sqlalchemy to named-tuples due to sqlalchemy session
1577 # has a global reference and changing one object propagates to all
1578 # others. This means if admin is also an owner admin_row that change
1579 # would propagate to both objects
1580 perm_rows = []
1581 for _usr in q.all():
1582 usr = AttributeDict(_usr.user.get_dict())
1583 usr.permission = _usr.permission.permission_name
1584 perm_rows.append(usr)
1585
1586 # filter the perm rows by 'default' first and then sort them by
1587 # admin,write,read,none permissions sorted again alphabetically in
1588 # each group
1589 perm_rows = sorted(perm_rows, key=display_sort)
1590
1591 _admin_perm = 'repository.admin'
1592 owner_row = []
1593 if with_owner:
1594 usr = AttributeDict(self.user.get_dict())
1595 usr.owner_row = True
1596 usr.permission = _admin_perm
1597 owner_row.append(usr)
1598
1599 super_admin_rows = []
1600 if with_admins:
1601 for usr in User.get_all_super_admins():
1602 # if this admin is also owner, don't double the record
1603 if usr.user_id == owner_row[0].user_id:
1604 owner_row[0].admin_row = True
1605 else:
1606 usr = AttributeDict(usr.get_dict())
1607 usr.admin_row = True
1608 usr.permission = _admin_perm
1609 super_admin_rows.append(usr)
1610
1611 return super_admin_rows + owner_row + perm_rows
1612
1613 def permission_user_groups(self):
1614 q = UserGroupRepoToPerm.query().filter(
1615 UserGroupRepoToPerm.repository == self)
1616 q = q.options(joinedload(UserGroupRepoToPerm.repository),
1617 joinedload(UserGroupRepoToPerm.users_group),
1618 joinedload(UserGroupRepoToPerm.permission),)
1619
1620 perm_rows = []
1621 for _user_group in q.all():
1622 usr = AttributeDict(_user_group.users_group.get_dict())
1623 usr.permission = _user_group.permission.permission_name
1624 perm_rows.append(usr)
1625
1626 return perm_rows
1627
1628 def get_api_data(self, include_secrets=False):
1629 """
1630 Common function for generating repo api data
1631
1632 :param include_secrets: See :meth:`User.get_api_data`.
1633
1634 """
1635 # TODO: mikhail: Here there is an anti-pattern, we probably need to
1636 # move this methods on models level.
1637 from rhodecode.model.settings import SettingsModel
1638
1639 repo = self
1640 _user_id, _time, _reason = self.locked
1641
1642 data = {
1643 'repo_id': repo.repo_id,
1644 'repo_name': repo.repo_name,
1645 'repo_type': repo.repo_type,
1646 'clone_uri': repo.clone_uri or '',
1647 'url': url('summary_home', repo_name=self.repo_name, qualified=True),
1648 'private': repo.private,
1649 'created_on': repo.created_on,
1650 'description': repo.description,
1651 'landing_rev': repo.landing_rev,
1652 'owner': repo.user.username,
1653 'fork_of': repo.fork.repo_name if repo.fork else None,
1654 'enable_statistics': repo.enable_statistics,
1655 'enable_locking': repo.enable_locking,
1656 'enable_downloads': repo.enable_downloads,
1657 'last_changeset': repo.changeset_cache,
1658 'locked_by': User.get(_user_id).get_api_data(
1659 include_secrets=include_secrets) if _user_id else None,
1660 'locked_date': time_to_datetime(_time) if _time else None,
1661 'lock_reason': _reason if _reason else None,
1662 }
1663
1664 # TODO: mikhail: should be per-repo settings here
1665 rc_config = SettingsModel().get_all_settings()
1666 repository_fields = str2bool(
1667 rc_config.get('rhodecode_repository_fields'))
1668 if repository_fields:
1669 for f in self.extra_fields:
1670 data[f.field_key_prefixed] = f.field_value
1671
1672 return data
1673
1674 @classmethod
1675 def lock(cls, repo, user_id, lock_time=None, lock_reason=None):
1676 if not lock_time:
1677 lock_time = time.time()
1678 if not lock_reason:
1679 lock_reason = cls.LOCK_AUTOMATIC
1680 repo.locked = [user_id, lock_time, lock_reason]
1681 Session().add(repo)
1682 Session().commit()
1683
1684 @classmethod
1685 def unlock(cls, repo):
1686 repo.locked = None
1687 Session().add(repo)
1688 Session().commit()
1689
1690 @classmethod
1691 def getlock(cls, repo):
1692 return repo.locked
1693
1694 def is_user_lock(self, user_id):
1695 if self.lock[0]:
1696 lock_user_id = safe_int(self.lock[0])
1697 user_id = safe_int(user_id)
1698 # both are ints, and they are equal
1699 return all([lock_user_id, user_id]) and lock_user_id == user_id
1700
1701 return False
1702
1703 def get_locking_state(self, action, user_id, only_when_enabled=True):
1704 """
1705 Checks locking on this repository, if locking is enabled and lock is
1706 present returns a tuple of make_lock, locked, locked_by.
1707 make_lock can have 3 states None (do nothing) True, make lock
1708 False release lock, This value is later propagated to hooks, which
1709 do the locking. Think about this as signals passed to hooks what to do.
1710
1711 """
1712 # TODO: johbo: This is part of the business logic and should be moved
1713 # into the RepositoryModel.
1714
1715 if action not in ('push', 'pull'):
1716 raise ValueError("Invalid action value: %s" % repr(action))
1717
1718 # defines if locked error should be thrown to user
1719 currently_locked = False
1720 # defines if new lock should be made, tri-state
1721 make_lock = None
1722 repo = self
1723 user = User.get(user_id)
1724
1725 lock_info = repo.locked
1726
1727 if repo and (repo.enable_locking or not only_when_enabled):
1728 if action == 'push':
1729 # check if it's already locked !, if it is compare users
1730 locked_by_user_id = lock_info[0]
1731 if user.user_id == locked_by_user_id:
1732 log.debug(
1733 'Got `push` action from user %s, now unlocking', user)
1734 # unlock if we have push from user who locked
1735 make_lock = False
1736 else:
1737 # we're not the same user who locked, ban with
1738 # code defined in settings (default is 423 HTTP Locked) !
1739 log.debug('Repo %s is currently locked by %s', repo, user)
1740 currently_locked = True
1741 elif action == 'pull':
1742 # [0] user [1] date
1743 if lock_info[0] and lock_info[1]:
1744 log.debug('Repo %s is currently locked by %s', repo, user)
1745 currently_locked = True
1746 else:
1747 log.debug('Setting lock on repo %s by %s', repo, user)
1748 make_lock = True
1749
1750 else:
1751 log.debug('Repository %s do not have locking enabled', repo)
1752
1753 log.debug('FINAL locking values make_lock:%s,locked:%s,locked_by:%s',
1754 make_lock, currently_locked, lock_info)
1755
1756 from rhodecode.lib.auth import HasRepoPermissionAny
1757 perm_check = HasRepoPermissionAny('repository.write', 'repository.admin')
1758 if make_lock and not perm_check(repo_name=repo.repo_name, user=user):
1759 # if we don't have at least write permission we cannot make a lock
1760 log.debug('lock state reset back to FALSE due to lack '
1761 'of at least read permission')
1762 make_lock = False
1763
1764 return make_lock, currently_locked, lock_info
1765
1766 @property
1767 def last_db_change(self):
1768 return self.updated_on
1769
1770 @property
1771 def clone_uri_hidden(self):
1772 clone_uri = self.clone_uri
1773 if clone_uri:
1774 import urlobject
1775 url_obj = urlobject.URLObject(clone_uri)
1776 if url_obj.password:
1777 clone_uri = url_obj.with_password('*****')
1778 return clone_uri
1779
1780 def clone_url(self, **override):
1781 qualified_home_url = url('home', qualified=True)
1782
1783 uri_tmpl = None
1784 if 'with_id' in override:
1785 uri_tmpl = self.DEFAULT_CLONE_URI_ID
1786 del override['with_id']
1787
1788 if 'uri_tmpl' in override:
1789 uri_tmpl = override['uri_tmpl']
1790 del override['uri_tmpl']
1791
1792 # we didn't override our tmpl from **overrides
1793 if not uri_tmpl:
1794 uri_tmpl = self.DEFAULT_CLONE_URI
1795 try:
1796 from pylons import tmpl_context as c
1797 uri_tmpl = c.clone_uri_tmpl
1798 except Exception:
1799 # in any case if we call this outside of request context,
1800 # ie, not having tmpl_context set up
1801 pass
1802
1803 return get_clone_url(uri_tmpl=uri_tmpl,
1804 qualifed_home_url=qualified_home_url,
1805 repo_name=self.repo_name,
1806 repo_id=self.repo_id, **override)
1807
1808 def set_state(self, state):
1809 self.repo_state = state
1810 Session().add(self)
1811 #==========================================================================
1812 # SCM PROPERTIES
1813 #==========================================================================
1814
1815 def get_commit(self, commit_id=None, commit_idx=None, pre_load=None):
1816 return get_commit_safe(
1817 self.scm_instance(), commit_id, commit_idx, pre_load=pre_load)
1818
1819 def get_changeset(self, rev=None, pre_load=None):
1820 warnings.warn("Use get_commit", DeprecationWarning)
1821 commit_id = None
1822 commit_idx = None
1823 if isinstance(rev, basestring):
1824 commit_id = rev
1825 else:
1826 commit_idx = rev
1827 return self.get_commit(commit_id=commit_id, commit_idx=commit_idx,
1828 pre_load=pre_load)
1829
1830 def get_landing_commit(self):
1831 """
1832 Returns landing commit, or if that doesn't exist returns the tip
1833 """
1834 _rev_type, _rev = self.landing_rev
1835 commit = self.get_commit(_rev)
1836 if isinstance(commit, EmptyCommit):
1837 return self.get_commit()
1838 return commit
1839
1840 def update_commit_cache(self, cs_cache=None, config=None):
1841 """
1842 Update cache of last changeset for repository, keys should be::
1843
1844 short_id
1845 raw_id
1846 revision
1847 parents
1848 message
1849 date
1850 author
1851
1852 :param cs_cache:
1853 """
1854 from rhodecode.lib.vcs.backends.base import BaseChangeset
1855 if cs_cache is None:
1856 # use no-cache version here
1857 scm_repo = self.scm_instance(cache=False, config=config)
1858 if scm_repo:
1859 cs_cache = scm_repo.get_commit(
1860 pre_load=["author", "date", "message", "parents"])
1861 else:
1862 cs_cache = EmptyCommit()
1863
1864 if isinstance(cs_cache, BaseChangeset):
1865 cs_cache = cs_cache.__json__()
1866
1867 def is_outdated(new_cs_cache):
1868 if (new_cs_cache['raw_id'] != self.changeset_cache['raw_id'] or
1869 new_cs_cache['revision'] != self.changeset_cache['revision']):
1870 return True
1871 return False
1872
1873 # check if we have maybe already latest cached revision
1874 if is_outdated(cs_cache) or not self.changeset_cache:
1875 _default = datetime.datetime.fromtimestamp(0)
1876 last_change = cs_cache.get('date') or _default
1877 log.debug('updated repo %s with new cs cache %s',
1878 self.repo_name, cs_cache)
1879 self.updated_on = last_change
1880 self.changeset_cache = cs_cache
1881 Session().add(self)
1882 Session().commit()
1883 else:
1884 log.debug('Skipping update_commit_cache for repo:`%s` '
1885 'commit already with latest changes', self.repo_name)
1886
1887 @property
1888 def tip(self):
1889 return self.get_commit('tip')
1890
1891 @property
1892 def author(self):
1893 return self.tip.author
1894
1895 @property
1896 def last_change(self):
1897 return self.scm_instance().last_change
1898
1899 def get_comments(self, revisions=None):
1900 """
1901 Returns comments for this repository grouped by revisions
1902
1903 :param revisions: filter query by revisions only
1904 """
1905 cmts = ChangesetComment.query()\
1906 .filter(ChangesetComment.repo == self)
1907 if revisions:
1908 cmts = cmts.filter(ChangesetComment.revision.in_(revisions))
1909 grouped = collections.defaultdict(list)
1910 for cmt in cmts.all():
1911 grouped[cmt.revision].append(cmt)
1912 return grouped
1913
1914 def statuses(self, revisions=None):
1915 """
1916 Returns statuses for this repository
1917
1918 :param revisions: list of revisions to get statuses for
1919 """
1920 statuses = ChangesetStatus.query()\
1921 .filter(ChangesetStatus.repo == self)\
1922 .filter(ChangesetStatus.version == 0)
1923
1924 if revisions:
1925 # Try doing the filtering in chunks to avoid hitting limits
1926 size = 500
1927 status_results = []
1928 for chunk in xrange(0, len(revisions), size):
1929 status_results += statuses.filter(
1930 ChangesetStatus.revision.in_(
1931 revisions[chunk: chunk+size])
1932 ).all()
1933 else:
1934 status_results = statuses.all()
1935
1936 grouped = {}
1937
1938 # maybe we have open new pullrequest without a status?
1939 stat = ChangesetStatus.STATUS_UNDER_REVIEW
1940 status_lbl = ChangesetStatus.get_status_lbl(stat)
1941 for pr in PullRequest.query().filter(PullRequest.source_repo == self).all():
1942 for rev in pr.revisions:
1943 pr_id = pr.pull_request_id
1944 pr_repo = pr.target_repo.repo_name
1945 grouped[rev] = [stat, status_lbl, pr_id, pr_repo]
1946
1947 for stat in status_results:
1948 pr_id = pr_repo = None
1949 if stat.pull_request:
1950 pr_id = stat.pull_request.pull_request_id
1951 pr_repo = stat.pull_request.target_repo.repo_name
1952 grouped[stat.revision] = [str(stat.status), stat.status_lbl,
1953 pr_id, pr_repo]
1954 return grouped
1955
1956 # ==========================================================================
1957 # SCM CACHE INSTANCE
1958 # ==========================================================================
1959
1960 def scm_instance(self, **kwargs):
1961 import rhodecode
1962
1963 # Passing a config will not hit the cache currently only used
1964 # for repo2dbmapper
1965 config = kwargs.pop('config', None)
1966 cache = kwargs.pop('cache', None)
1967 full_cache = str2bool(rhodecode.CONFIG.get('vcs_full_cache'))
1968 # if cache is NOT defined use default global, else we have a full
1969 # control over cache behaviour
1970 if cache is None and full_cache and not config:
1971 return self._get_instance_cached()
1972 return self._get_instance(cache=bool(cache), config=config)
1973
1974 def _get_instance_cached(self):
1975 @cache_region('long_term')
1976 def _get_repo(cache_key):
1977 return self._get_instance()
1978
1979 invalidator_context = CacheKey.repo_context_cache(
1980 _get_repo, self.repo_name, None, thread_scoped=True)
1981
1982 with invalidator_context as context:
1983 context.invalidate()
1984 repo = context.compute()
1985
1986 return repo
1987
1988 def _get_instance(self, cache=True, config=None):
1989 config = config or self._config
1990 custom_wire = {
1991 'cache': cache # controls the vcs.remote cache
1992 }
1993
1994 repo = get_vcs_instance(
1995 repo_path=safe_str(self.repo_full_path),
1996 config=config,
1997 with_wire=custom_wire,
1998 create=False)
1999
2000 return repo
2001
2002 def __json__(self):
2003 return {'landing_rev': self.landing_rev}
2004
2005 def get_dict(self):
2006
2007 # Since we transformed `repo_name` to a hybrid property, we need to
2008 # keep compatibility with the code which uses `repo_name` field.
2009
2010 result = super(Repository, self).get_dict()
2011 result['repo_name'] = result.pop('_repo_name', None)
2012 return result
2013
2014
2015 class RepoGroup(Base, BaseModel):
2016 __tablename__ = 'groups'
2017 __table_args__ = (
2018 UniqueConstraint('group_name', 'group_parent_id'),
2019 CheckConstraint('group_id != group_parent_id'),
2020 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2021 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
2022 )
2023 __mapper_args__ = {'order_by': 'group_name'}
2024
2025 CHOICES_SEPARATOR = '/' # used to generate select2 choices for nested groups
2026
2027 group_id = Column("group_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
2028 group_name = Column("group_name", String(255), nullable=False, unique=True, default=None)
2029 group_parent_id = Column("group_parent_id", Integer(), ForeignKey('groups.group_id'), nullable=True, unique=None, default=None)
2030 group_description = Column("group_description", String(10000), nullable=True, unique=None, default=None)
2031 enable_locking = Column("enable_locking", Boolean(), nullable=False, unique=None, default=False)
2032 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=False, default=None)
2033 created_on = Column('created_on', DateTime(timezone=False), nullable=False, default=datetime.datetime.now)
2034
2035 repo_group_to_perm = relationship('UserRepoGroupToPerm', cascade='all', order_by='UserRepoGroupToPerm.group_to_perm_id')
2036 users_group_to_perm = relationship('UserGroupRepoGroupToPerm', cascade='all')
2037 parent_group = relationship('RepoGroup', remote_side=group_id)
2038 user = relationship('User')
2039
2040 def __init__(self, group_name='', parent_group=None):
2041 self.group_name = group_name
2042 self.parent_group = parent_group
2043
2044 def __unicode__(self):
2045 return u"<%s('id:%s:%s')>" % (self.__class__.__name__, self.group_id,
2046 self.group_name)
2047
2048 @classmethod
2049 def _generate_choice(cls, repo_group):
2050 from webhelpers.html import literal as _literal
2051 _name = lambda k: _literal(cls.CHOICES_SEPARATOR.join(k))
2052 return repo_group.group_id, _name(repo_group.full_path_splitted)
2053
2054 @classmethod
2055 def groups_choices(cls, groups=None, show_empty_group=True):
2056 if not groups:
2057 groups = cls.query().all()
2058
2059 repo_groups = []
2060 if show_empty_group:
2061 repo_groups = [('-1', u'-- %s --' % _('No parent'))]
2062
2063 repo_groups.extend([cls._generate_choice(x) for x in groups])
2064
2065 repo_groups = sorted(
2066 repo_groups, key=lambda t: t[1].split(cls.CHOICES_SEPARATOR)[0])
2067 return repo_groups
2068
2069 @classmethod
2070 def url_sep(cls):
2071 return URL_SEP
2072
2073 @classmethod
2074 def get_by_group_name(cls, group_name, cache=False, case_insensitive=False):
2075 if case_insensitive:
2076 gr = cls.query().filter(func.lower(cls.group_name)
2077 == func.lower(group_name))
2078 else:
2079 gr = cls.query().filter(cls.group_name == group_name)
2080 if cache:
2081 gr = gr.options(FromCache(
2082 "sql_cache_short",
2083 "get_group_%s" % _hash_key(group_name)))
2084 return gr.scalar()
2085
2086 @classmethod
2087 def get_all_repo_groups(cls, user_id=Optional(None), group_id=Optional(None),
2088 case_insensitive=True):
2089 q = RepoGroup.query()
2090
2091 if not isinstance(user_id, Optional):
2092 q = q.filter(RepoGroup.user_id == user_id)
2093
2094 if not isinstance(group_id, Optional):
2095 q = q.filter(RepoGroup.group_parent_id == group_id)
2096
2097 if case_insensitive:
2098 q = q.order_by(func.lower(RepoGroup.group_name))
2099 else:
2100 q = q.order_by(RepoGroup.group_name)
2101 return q.all()
2102
2103 @property
2104 def parents(self):
2105 parents_recursion_limit = 10
2106 groups = []
2107 if self.parent_group is None:
2108 return groups
2109 cur_gr = self.parent_group
2110 groups.insert(0, cur_gr)
2111 cnt = 0
2112 while 1:
2113 cnt += 1
2114 gr = getattr(cur_gr, 'parent_group', None)
2115 cur_gr = cur_gr.parent_group
2116 if gr is None:
2117 break
2118 if cnt == parents_recursion_limit:
2119 # this will prevent accidental infinit loops
2120 log.error(('more than %s parents found for group %s, stopping '
2121 'recursive parent fetching' % (parents_recursion_limit, self)))
2122 break
2123
2124 groups.insert(0, gr)
2125 return groups
2126
2127 @property
2128 def children(self):
2129 return RepoGroup.query().filter(RepoGroup.parent_group == self)
2130
2131 @property
2132 def name(self):
2133 return self.group_name.split(RepoGroup.url_sep())[-1]
2134
2135 @property
2136 def full_path(self):
2137 return self.group_name
2138
2139 @property
2140 def full_path_splitted(self):
2141 return self.group_name.split(RepoGroup.url_sep())
2142
2143 @property
2144 def repositories(self):
2145 return Repository.query()\
2146 .filter(Repository.group == self)\
2147 .order_by(Repository.repo_name)
2148
2149 @property
2150 def repositories_recursive_count(self):
2151 cnt = self.repositories.count()
2152
2153 def children_count(group):
2154 cnt = 0
2155 for child in group.children:
2156 cnt += child.repositories.count()
2157 cnt += children_count(child)
2158 return cnt
2159
2160 return cnt + children_count(self)
2161
2162 def _recursive_objects(self, include_repos=True):
2163 all_ = []
2164
2165 def _get_members(root_gr):
2166 if include_repos:
2167 for r in root_gr.repositories:
2168 all_.append(r)
2169 childs = root_gr.children.all()
2170 if childs:
2171 for gr in childs:
2172 all_.append(gr)
2173 _get_members(gr)
2174
2175 _get_members(self)
2176 return [self] + all_
2177
2178 def recursive_groups_and_repos(self):
2179 """
2180 Recursive return all groups, with repositories in those groups
2181 """
2182 return self._recursive_objects()
2183
2184 def recursive_groups(self):
2185 """
2186 Returns all children groups for this group including children of children
2187 """
2188 return self._recursive_objects(include_repos=False)
2189
2190 def get_new_name(self, group_name):
2191 """
2192 returns new full group name based on parent and new name
2193
2194 :param group_name:
2195 """
2196 path_prefix = (self.parent_group.full_path_splitted if
2197 self.parent_group else [])
2198 return RepoGroup.url_sep().join(path_prefix + [group_name])
2199
2200 def permissions(self, with_admins=True, with_owner=True):
2201 q = UserRepoGroupToPerm.query().filter(UserRepoGroupToPerm.group == self)
2202 q = q.options(joinedload(UserRepoGroupToPerm.group),
2203 joinedload(UserRepoGroupToPerm.user),
2204 joinedload(UserRepoGroupToPerm.permission),)
2205
2206 # get owners and admins and permissions. We do a trick of re-writing
2207 # objects from sqlalchemy to named-tuples due to sqlalchemy session
2208 # has a global reference and changing one object propagates to all
2209 # others. This means if admin is also an owner admin_row that change
2210 # would propagate to both objects
2211 perm_rows = []
2212 for _usr in q.all():
2213 usr = AttributeDict(_usr.user.get_dict())
2214 usr.permission = _usr.permission.permission_name
2215 perm_rows.append(usr)
2216
2217 # filter the perm rows by 'default' first and then sort them by
2218 # admin,write,read,none permissions sorted again alphabetically in
2219 # each group
2220 perm_rows = sorted(perm_rows, key=display_sort)
2221
2222 _admin_perm = 'group.admin'
2223 owner_row = []
2224 if with_owner:
2225 usr = AttributeDict(self.user.get_dict())
2226 usr.owner_row = True
2227 usr.permission = _admin_perm
2228 owner_row.append(usr)
2229
2230 super_admin_rows = []
2231 if with_admins:
2232 for usr in User.get_all_super_admins():
2233 # if this admin is also owner, don't double the record
2234 if usr.user_id == owner_row[0].user_id:
2235 owner_row[0].admin_row = True
2236 else:
2237 usr = AttributeDict(usr.get_dict())
2238 usr.admin_row = True
2239 usr.permission = _admin_perm
2240 super_admin_rows.append(usr)
2241
2242 return super_admin_rows + owner_row + perm_rows
2243
2244 def permission_user_groups(self):
2245 q = UserGroupRepoGroupToPerm.query().filter(UserGroupRepoGroupToPerm.group == self)
2246 q = q.options(joinedload(UserGroupRepoGroupToPerm.group),
2247 joinedload(UserGroupRepoGroupToPerm.users_group),
2248 joinedload(UserGroupRepoGroupToPerm.permission),)
2249
2250 perm_rows = []
2251 for _user_group in q.all():
2252 usr = AttributeDict(_user_group.users_group.get_dict())
2253 usr.permission = _user_group.permission.permission_name
2254 perm_rows.append(usr)
2255
2256 return perm_rows
2257
2258 def get_api_data(self):
2259 """
2260 Common function for generating api data
2261
2262 """
2263 group = self
2264 data = {
2265 'group_id': group.group_id,
2266 'group_name': group.group_name,
2267 'group_description': group.group_description,
2268 'parent_group': group.parent_group.group_name if group.parent_group else None,
2269 'repositories': [x.repo_name for x in group.repositories],
2270 'owner': group.user.username,
2271 }
2272 return data
2273
2274
2275 class Permission(Base, BaseModel):
2276 __tablename__ = 'permissions'
2277 __table_args__ = (
2278 Index('p_perm_name_idx', 'permission_name'),
2279 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2280 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
2281 )
2282 PERMS = [
2283 ('hg.admin', _('RhodeCode Super Administrator')),
2284
2285 ('repository.none', _('Repository no access')),
2286 ('repository.read', _('Repository read access')),
2287 ('repository.write', _('Repository write access')),
2288 ('repository.admin', _('Repository admin access')),
2289
2290 ('group.none', _('Repository group no access')),
2291 ('group.read', _('Repository group read access')),
2292 ('group.write', _('Repository group write access')),
2293 ('group.admin', _('Repository group admin access')),
2294
2295 ('usergroup.none', _('User group no access')),
2296 ('usergroup.read', _('User group read access')),
2297 ('usergroup.write', _('User group write access')),
2298 ('usergroup.admin', _('User group admin access')),
2299
2300 ('hg.repogroup.create.false', _('Repository Group creation disabled')),
2301 ('hg.repogroup.create.true', _('Repository Group creation enabled')),
2302
2303 ('hg.usergroup.create.false', _('User Group creation disabled')),
2304 ('hg.usergroup.create.true', _('User Group creation enabled')),
2305
2306 ('hg.create.none', _('Repository creation disabled')),
2307 ('hg.create.repository', _('Repository creation enabled')),
2308 ('hg.create.write_on_repogroup.true', _('Repository creation enabled with write permission to a repository group')),
2309 ('hg.create.write_on_repogroup.false', _('Repository creation disabled with write permission to a repository group')),
2310
2311 ('hg.fork.none', _('Repository forking disabled')),
2312 ('hg.fork.repository', _('Repository forking enabled')),
2313
2314 ('hg.register.none', _('Registration disabled')),
2315 ('hg.register.manual_activate', _('User Registration with manual account activation')),
2316 ('hg.register.auto_activate', _('User Registration with automatic account activation')),
2317
2318 ('hg.extern_activate.manual', _('Manual activation of external account')),
2319 ('hg.extern_activate.auto', _('Automatic activation of external account')),
2320
2321 ('hg.inherit_default_perms.false', _('Inherit object permissions from default user disabled')),
2322 ('hg.inherit_default_perms.true', _('Inherit object permissions from default user enabled')),
2323 ]
2324
2325 # definition of system default permissions for DEFAULT user
2326 DEFAULT_USER_PERMISSIONS = [
2327 'repository.read',
2328 'group.read',
2329 'usergroup.read',
2330 'hg.create.repository',
2331 'hg.repogroup.create.false',
2332 'hg.usergroup.create.false',
2333 'hg.create.write_on_repogroup.true',
2334 'hg.fork.repository',
2335 'hg.register.manual_activate',
2336 'hg.extern_activate.auto',
2337 'hg.inherit_default_perms.true',
2338 ]
2339
2340 # defines which permissions are more important higher the more important
2341 # Weight defines which permissions are more important.
2342 # The higher number the more important.
2343 PERM_WEIGHTS = {
2344 'repository.none': 0,
2345 'repository.read': 1,
2346 'repository.write': 3,
2347 'repository.admin': 4,
2348
2349 'group.none': 0,
2350 'group.read': 1,
2351 'group.write': 3,
2352 'group.admin': 4,
2353
2354 'usergroup.none': 0,
2355 'usergroup.read': 1,
2356 'usergroup.write': 3,
2357 'usergroup.admin': 4,
2358
2359 'hg.repogroup.create.false': 0,
2360 'hg.repogroup.create.true': 1,
2361
2362 'hg.usergroup.create.false': 0,
2363 'hg.usergroup.create.true': 1,
2364
2365 'hg.fork.none': 0,
2366 'hg.fork.repository': 1,
2367 'hg.create.none': 0,
2368 'hg.create.repository': 1
2369 }
2370
2371 permission_id = Column("permission_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
2372 permission_name = Column("permission_name", String(255), nullable=True, unique=None, default=None)
2373 permission_longname = Column("permission_longname", String(255), nullable=True, unique=None, default=None)
2374
2375 def __unicode__(self):
2376 return u"<%s('%s:%s')>" % (
2377 self.__class__.__name__, self.permission_id, self.permission_name
2378 )
2379
2380 @classmethod
2381 def get_by_key(cls, key):
2382 return cls.query().filter(cls.permission_name == key).scalar()
2383
2384 @classmethod
2385 def get_default_repo_perms(cls, user_id, repo_id=None):
2386 q = Session().query(UserRepoToPerm, Repository, Permission)\
2387 .join((Permission, UserRepoToPerm.permission_id == Permission.permission_id))\
2388 .join((Repository, UserRepoToPerm.repository_id == Repository.repo_id))\
2389 .filter(UserRepoToPerm.user_id == user_id)
2390 if repo_id:
2391 q = q.filter(UserRepoToPerm.repository_id == repo_id)
2392 return q.all()
2393
2394 @classmethod
2395 def get_default_repo_perms_from_user_group(cls, user_id, repo_id=None):
2396 q = Session().query(UserGroupRepoToPerm, Repository, Permission)\
2397 .join(
2398 Permission,
2399 UserGroupRepoToPerm.permission_id == Permission.permission_id)\
2400 .join(
2401 Repository,
2402 UserGroupRepoToPerm.repository_id == Repository.repo_id)\
2403 .join(
2404 UserGroup,
2405 UserGroupRepoToPerm.users_group_id ==
2406 UserGroup.users_group_id)\
2407 .join(
2408 UserGroupMember,
2409 UserGroupRepoToPerm.users_group_id ==
2410 UserGroupMember.users_group_id)\
2411 .filter(
2412 UserGroupMember.user_id == user_id,
2413 UserGroup.users_group_active == true())
2414 if repo_id:
2415 q = q.filter(UserGroupRepoToPerm.repository_id == repo_id)
2416 return q.all()
2417
2418 @classmethod
2419 def get_default_group_perms(cls, user_id, repo_group_id=None):
2420 q = Session().query(UserRepoGroupToPerm, RepoGroup, Permission)\
2421 .join((Permission, UserRepoGroupToPerm.permission_id == Permission.permission_id))\
2422 .join((RepoGroup, UserRepoGroupToPerm.group_id == RepoGroup.group_id))\
2423 .filter(UserRepoGroupToPerm.user_id == user_id)
2424 if repo_group_id:
2425 q = q.filter(UserRepoGroupToPerm.group_id == repo_group_id)
2426 return q.all()
2427
2428 @classmethod
2429 def get_default_group_perms_from_user_group(
2430 cls, user_id, repo_group_id=None):
2431 q = Session().query(UserGroupRepoGroupToPerm, RepoGroup, Permission)\
2432 .join(
2433 Permission,
2434 UserGroupRepoGroupToPerm.permission_id ==
2435 Permission.permission_id)\
2436 .join(
2437 RepoGroup,
2438 UserGroupRepoGroupToPerm.group_id == RepoGroup.group_id)\
2439 .join(
2440 UserGroup,
2441 UserGroupRepoGroupToPerm.users_group_id ==
2442 UserGroup.users_group_id)\
2443 .join(
2444 UserGroupMember,
2445 UserGroupRepoGroupToPerm.users_group_id ==
2446 UserGroupMember.users_group_id)\
2447 .filter(
2448 UserGroupMember.user_id == user_id,
2449 UserGroup.users_group_active == true())
2450 if repo_group_id:
2451 q = q.filter(UserGroupRepoGroupToPerm.group_id == repo_group_id)
2452 return q.all()
2453
2454 @classmethod
2455 def get_default_user_group_perms(cls, user_id, user_group_id=None):
2456 q = Session().query(UserUserGroupToPerm, UserGroup, Permission)\
2457 .join((Permission, UserUserGroupToPerm.permission_id == Permission.permission_id))\
2458 .join((UserGroup, UserUserGroupToPerm.user_group_id == UserGroup.users_group_id))\
2459 .filter(UserUserGroupToPerm.user_id == user_id)
2460 if user_group_id:
2461 q = q.filter(UserUserGroupToPerm.user_group_id == user_group_id)
2462 return q.all()
2463
2464 @classmethod
2465 def get_default_user_group_perms_from_user_group(
2466 cls, user_id, user_group_id=None):
2467 TargetUserGroup = aliased(UserGroup, name='target_user_group')
2468 q = Session().query(UserGroupUserGroupToPerm, UserGroup, Permission)\
2469 .join(
2470 Permission,
2471 UserGroupUserGroupToPerm.permission_id ==
2472 Permission.permission_id)\
2473 .join(
2474 TargetUserGroup,
2475 UserGroupUserGroupToPerm.target_user_group_id ==
2476 TargetUserGroup.users_group_id)\
2477 .join(
2478 UserGroup,
2479 UserGroupUserGroupToPerm.user_group_id ==
2480 UserGroup.users_group_id)\
2481 .join(
2482 UserGroupMember,
2483 UserGroupUserGroupToPerm.user_group_id ==
2484 UserGroupMember.users_group_id)\
2485 .filter(
2486 UserGroupMember.user_id == user_id,
2487 UserGroup.users_group_active == true())
2488 if user_group_id:
2489 q = q.filter(
2490 UserGroupUserGroupToPerm.user_group_id == user_group_id)
2491
2492 return q.all()
2493
2494
2495 class UserRepoToPerm(Base, BaseModel):
2496 __tablename__ = 'repo_to_perm'
2497 __table_args__ = (
2498 UniqueConstraint('user_id', 'repository_id', 'permission_id'),
2499 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2500 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
2501 )
2502 repo_to_perm_id = Column("repo_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
2503 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
2504 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
2505 repository_id = Column("repository_id", Integer(), ForeignKey('repositories.repo_id'), nullable=False, unique=None, default=None)
2506
2507 user = relationship('User')
2508 repository = relationship('Repository')
2509 permission = relationship('Permission')
2510
2511 @classmethod
2512 def create(cls, user, repository, permission):
2513 n = cls()
2514 n.user = user
2515 n.repository = repository
2516 n.permission = permission
2517 Session().add(n)
2518 return n
2519
2520 def __unicode__(self):
2521 return u'<%s => %s >' % (self.user, self.repository)
2522
2523
2524 class UserUserGroupToPerm(Base, BaseModel):
2525 __tablename__ = 'user_user_group_to_perm'
2526 __table_args__ = (
2527 UniqueConstraint('user_id', 'user_group_id', 'permission_id'),
2528 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2529 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
2530 )
2531 user_user_group_to_perm_id = Column("user_user_group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
2532 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
2533 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
2534 user_group_id = Column("user_group_id", Integer(), ForeignKey('users_groups.users_group_id'), nullable=False, unique=None, default=None)
2535
2536 user = relationship('User')
2537 user_group = relationship('UserGroup')
2538 permission = relationship('Permission')
2539
2540 @classmethod
2541 def create(cls, user, user_group, permission):
2542 n = cls()
2543 n.user = user
2544 n.user_group = user_group
2545 n.permission = permission
2546 Session().add(n)
2547 return n
2548
2549 def __unicode__(self):
2550 return u'<%s => %s >' % (self.user, self.user_group)
2551
2552
2553 class UserToPerm(Base, BaseModel):
2554 __tablename__ = 'user_to_perm'
2555 __table_args__ = (
2556 UniqueConstraint('user_id', 'permission_id'),
2557 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2558 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
2559 )
2560 user_to_perm_id = Column("user_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
2561 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
2562 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
2563
2564 user = relationship('User')
2565 permission = relationship('Permission', lazy='joined')
2566
2567 def __unicode__(self):
2568 return u'<%s => %s >' % (self.user, self.permission)
2569
2570
2571 class UserGroupRepoToPerm(Base, BaseModel):
2572 __tablename__ = 'users_group_repo_to_perm'
2573 __table_args__ = (
2574 UniqueConstraint('repository_id', 'users_group_id', 'permission_id'),
2575 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2576 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
2577 )
2578 users_group_to_perm_id = Column("users_group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
2579 users_group_id = Column("users_group_id", Integer(), ForeignKey('users_groups.users_group_id'), nullable=False, unique=None, default=None)
2580 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
2581 repository_id = Column("repository_id", Integer(), ForeignKey('repositories.repo_id'), nullable=False, unique=None, default=None)
2582
2583 users_group = relationship('UserGroup')
2584 permission = relationship('Permission')
2585 repository = relationship('Repository')
2586
2587 @classmethod
2588 def create(cls, users_group, repository, permission):
2589 n = cls()
2590 n.users_group = users_group
2591 n.repository = repository
2592 n.permission = permission
2593 Session().add(n)
2594 return n
2595
2596 def __unicode__(self):
2597 return u'<UserGroupRepoToPerm:%s => %s >' % (self.users_group, self.repository)
2598
2599
2600 class UserGroupUserGroupToPerm(Base, BaseModel):
2601 __tablename__ = 'user_group_user_group_to_perm'
2602 __table_args__ = (
2603 UniqueConstraint('target_user_group_id', 'user_group_id', 'permission_id'),
2604 CheckConstraint('target_user_group_id != user_group_id'),
2605 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2606 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
2607 )
2608 user_group_user_group_to_perm_id = Column("user_group_user_group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
2609 target_user_group_id = Column("target_user_group_id", Integer(), ForeignKey('users_groups.users_group_id'), nullable=False, unique=None, default=None)
2610 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
2611 user_group_id = Column("user_group_id", Integer(), ForeignKey('users_groups.users_group_id'), nullable=False, unique=None, default=None)
2612
2613 target_user_group = relationship('UserGroup', primaryjoin='UserGroupUserGroupToPerm.target_user_group_id==UserGroup.users_group_id')
2614 user_group = relationship('UserGroup', primaryjoin='UserGroupUserGroupToPerm.user_group_id==UserGroup.users_group_id')
2615 permission = relationship('Permission')
2616
2617 @classmethod
2618 def create(cls, target_user_group, user_group, permission):
2619 n = cls()
2620 n.target_user_group = target_user_group
2621 n.user_group = user_group
2622 n.permission = permission
2623 Session().add(n)
2624 return n
2625
2626 def __unicode__(self):
2627 return u'<UserGroupUserGroup:%s => %s >' % (self.target_user_group, self.user_group)
2628
2629
2630 class UserGroupToPerm(Base, BaseModel):
2631 __tablename__ = 'users_group_to_perm'
2632 __table_args__ = (
2633 UniqueConstraint('users_group_id', 'permission_id',),
2634 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2635 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
2636 )
2637 users_group_to_perm_id = Column("users_group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
2638 users_group_id = Column("users_group_id", Integer(), ForeignKey('users_groups.users_group_id'), nullable=False, unique=None, default=None)
2639 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
2640
2641 users_group = relationship('UserGroup')
2642 permission = relationship('Permission')
2643
2644
2645 class UserRepoGroupToPerm(Base, BaseModel):
2646 __tablename__ = 'user_repo_group_to_perm'
2647 __table_args__ = (
2648 UniqueConstraint('user_id', 'group_id', 'permission_id'),
2649 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2650 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
2651 )
2652
2653 group_to_perm_id = Column("group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
2654 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
2655 group_id = Column("group_id", Integer(), ForeignKey('groups.group_id'), nullable=False, unique=None, default=None)
2656 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
2657
2658 user = relationship('User')
2659 group = relationship('RepoGroup')
2660 permission = relationship('Permission')
2661
2662 @classmethod
2663 def create(cls, user, repository_group, permission):
2664 n = cls()
2665 n.user = user
2666 n.group = repository_group
2667 n.permission = permission
2668 Session().add(n)
2669 return n
2670
2671
2672 class UserGroupRepoGroupToPerm(Base, BaseModel):
2673 __tablename__ = 'users_group_repo_group_to_perm'
2674 __table_args__ = (
2675 UniqueConstraint('users_group_id', 'group_id'),
2676 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2677 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
2678 )
2679
2680 users_group_repo_group_to_perm_id = Column("users_group_repo_group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
2681 users_group_id = Column("users_group_id", Integer(), ForeignKey('users_groups.users_group_id'), nullable=False, unique=None, default=None)
2682 group_id = Column("group_id", Integer(), ForeignKey('groups.group_id'), nullable=False, unique=None, default=None)
2683 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
2684
2685 users_group = relationship('UserGroup')
2686 permission = relationship('Permission')
2687 group = relationship('RepoGroup')
2688
2689 @classmethod
2690 def create(cls, user_group, repository_group, permission):
2691 n = cls()
2692 n.users_group = user_group
2693 n.group = repository_group
2694 n.permission = permission
2695 Session().add(n)
2696 return n
2697
2698 def __unicode__(self):
2699 return u'<UserGroupRepoGroupToPerm:%s => %s >' % (self.users_group, self.group)
2700
2701
2702 class Statistics(Base, BaseModel):
2703 __tablename__ = 'statistics'
2704 __table_args__ = (
2705 UniqueConstraint('repository_id'),
2706 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2707 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
2708 )
2709 stat_id = Column("stat_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
2710 repository_id = Column("repository_id", Integer(), ForeignKey('repositories.repo_id'), nullable=False, unique=True, default=None)
2711 stat_on_revision = Column("stat_on_revision", Integer(), nullable=False)
2712 commit_activity = Column("commit_activity", LargeBinary(1000000), nullable=False)#JSON data
2713 commit_activity_combined = Column("commit_activity_combined", LargeBinary(), nullable=False)#JSON data
2714 languages = Column("languages", LargeBinary(1000000), nullable=False)#JSON data
2715
2716 repository = relationship('Repository', single_parent=True)
2717
2718
2719 class UserFollowing(Base, BaseModel):
2720 __tablename__ = 'user_followings'
2721 __table_args__ = (
2722 UniqueConstraint('user_id', 'follows_repository_id'),
2723 UniqueConstraint('user_id', 'follows_user_id'),
2724 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2725 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
2726 )
2727
2728 user_following_id = Column("user_following_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
2729 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
2730 follows_repo_id = Column("follows_repository_id", Integer(), ForeignKey('repositories.repo_id'), nullable=True, unique=None, default=None)
2731 follows_user_id = Column("follows_user_id", Integer(), ForeignKey('users.user_id'), nullable=True, unique=None, default=None)
2732 follows_from = Column('follows_from', DateTime(timezone=False), nullable=True, unique=None, default=datetime.datetime.now)
2733
2734 user = relationship('User', primaryjoin='User.user_id==UserFollowing.user_id')
2735
2736 follows_user = relationship('User', primaryjoin='User.user_id==UserFollowing.follows_user_id')
2737 follows_repository = relationship('Repository', order_by='Repository.repo_name')
2738
2739 @classmethod
2740 def get_repo_followers(cls, repo_id):
2741 return cls.query().filter(cls.follows_repo_id == repo_id)
2742
2743
2744 class CacheKey(Base, BaseModel):
2745 __tablename__ = 'cache_invalidation'
2746 __table_args__ = (
2747 UniqueConstraint('cache_key'),
2748 Index('key_idx', 'cache_key'),
2749 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2750 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
2751 )
2752 CACHE_TYPE_ATOM = 'ATOM'
2753 CACHE_TYPE_RSS = 'RSS'
2754 CACHE_TYPE_README = 'README'
2755
2756 cache_id = Column("cache_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
2757 cache_key = Column("cache_key", String(255), nullable=True, unique=None, default=None)
2758 cache_args = Column("cache_args", String(255), nullable=True, unique=None, default=None)
2759 cache_active = Column("cache_active", Boolean(), nullable=True, unique=None, default=False)
2760
2761 def __init__(self, cache_key, cache_args=''):
2762 self.cache_key = cache_key
2763 self.cache_args = cache_args
2764 self.cache_active = False
2765
2766 def __unicode__(self):
2767 return u"<%s('%s:%s[%s]')>" % (
2768 self.__class__.__name__,
2769 self.cache_id, self.cache_key, self.cache_active)
2770
2771 def _cache_key_partition(self):
2772 prefix, repo_name, suffix = self.cache_key.partition(self.cache_args)
2773 return prefix, repo_name, suffix
2774
2775 def get_prefix(self):
2776 """
2777 Try to extract prefix from existing cache key. The key could consist
2778 of prefix, repo_name, suffix
2779 """
2780 # this returns prefix, repo_name, suffix
2781 return self._cache_key_partition()[0]
2782
2783 def get_suffix(self):
2784 """
2785 get suffix that might have been used in _get_cache_key to
2786 generate self.cache_key. Only used for informational purposes
2787 in repo_edit.html.
2788 """
2789 # prefix, repo_name, suffix
2790 return self._cache_key_partition()[2]
2791
2792 @classmethod
2793 def delete_all_cache(cls):
2794 """
2795 Delete all cache keys from database.
2796 Should only be run when all instances are down and all entries
2797 thus stale.
2798 """
2799 cls.query().delete()
2800 Session().commit()
2801
2802 @classmethod
2803 def get_cache_key(cls, repo_name, cache_type):
2804 """
2805
2806 Generate a cache key for this process of RhodeCode instance.
2807 Prefix most likely will be process id or maybe explicitly set
2808 instance_id from .ini file.
2809 """
2810 import rhodecode
2811 prefix = safe_unicode(rhodecode.CONFIG.get('instance_id') or '')
2812
2813 repo_as_unicode = safe_unicode(repo_name)
2814 key = u'{}_{}'.format(repo_as_unicode, cache_type) \
2815 if cache_type else repo_as_unicode
2816
2817 return u'{}{}'.format(prefix, key)
2818
2819 @classmethod
2820 def set_invalidate(cls, repo_name, delete=False):
2821 """
2822 Mark all caches of a repo as invalid in the database.
2823 """
2824
2825 try:
2826 qry = Session().query(cls).filter(cls.cache_args == repo_name)
2827 if delete:
2828 log.debug('cache objects deleted for repo %s',
2829 safe_str(repo_name))
2830 qry.delete()
2831 else:
2832 log.debug('cache objects marked as invalid for repo %s',
2833 safe_str(repo_name))
2834 qry.update({"cache_active": False})
2835
2836 Session().commit()
2837 except Exception:
2838 log.exception(
2839 'Cache key invalidation failed for repository %s',
2840 safe_str(repo_name))
2841 Session().rollback()
2842
2843 @classmethod
2844 def get_active_cache(cls, cache_key):
2845 inv_obj = cls.query().filter(cls.cache_key == cache_key).scalar()
2846 if inv_obj:
2847 return inv_obj
2848 return None
2849
2850 @classmethod
2851 def repo_context_cache(cls, compute_func, repo_name, cache_type,
2852 thread_scoped=False):
2853 """
2854 @cache_region('long_term')
2855 def _heavy_calculation(cache_key):
2856 return 'result'
2857
2858 cache_context = CacheKey.repo_context_cache(
2859 _heavy_calculation, repo_name, cache_type)
2860
2861 with cache_context as context:
2862 context.invalidate()
2863 computed = context.compute()
2864
2865 assert computed == 'result'
2866 """
2867 from rhodecode.lib import caches
2868 return caches.InvalidationContext(
2869 compute_func, repo_name, cache_type, thread_scoped=thread_scoped)
2870
2871
2872 class ChangesetComment(Base, BaseModel):
2873 __tablename__ = 'changeset_comments'
2874 __table_args__ = (
2875 Index('cc_revision_idx', 'revision'),
2876 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2877 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
2878 )
2879
2880 COMMENT_OUTDATED = u'comment_outdated'
2881
2882 comment_id = Column('comment_id', Integer(), nullable=False, primary_key=True)
2883 repo_id = Column('repo_id', Integer(), ForeignKey('repositories.repo_id'), nullable=False)
2884 revision = Column('revision', String(40), nullable=True)
2885 pull_request_id = Column("pull_request_id", Integer(), ForeignKey('pull_requests.pull_request_id'), nullable=True)
2886 pull_request_version_id = Column("pull_request_version_id", Integer(), ForeignKey('pull_request_versions.pull_request_version_id'), nullable=True)
2887 line_no = Column('line_no', Unicode(10), nullable=True)
2888 hl_lines = Column('hl_lines', Unicode(512), nullable=True)
2889 f_path = Column('f_path', Unicode(1000), nullable=True)
2890 user_id = Column('user_id', Integer(), ForeignKey('users.user_id'), nullable=False)
2891 text = Column('text', UnicodeText().with_variant(UnicodeText(25000), 'mysql'), nullable=False)
2892 created_on = Column('created_on', DateTime(timezone=False), nullable=False, default=datetime.datetime.now)
2893 modified_at = Column('modified_at', DateTime(timezone=False), nullable=False, default=datetime.datetime.now)
2894 renderer = Column('renderer', Unicode(64), nullable=True)
2895 display_state = Column('display_state', Unicode(128), nullable=True)
2896
2897 author = relationship('User', lazy='joined')
2898 repo = relationship('Repository')
2899 status_change = relationship('ChangesetStatus', cascade="all, delete, delete-orphan")
2900 pull_request = relationship('PullRequest', lazy='joined')
2901 pull_request_version = relationship('PullRequestVersion')
2902
2903 @classmethod
2904 def get_users(cls, revision=None, pull_request_id=None):
2905 """
2906 Returns user associated with this ChangesetComment. ie those
2907 who actually commented
2908
2909 :param cls:
2910 :param revision:
2911 """
2912 q = Session().query(User)\
2913 .join(ChangesetComment.author)
2914 if revision:
2915 q = q.filter(cls.revision == revision)
2916 elif pull_request_id:
2917 q = q.filter(cls.pull_request_id == pull_request_id)
2918 return q.all()
2919
2920 def render(self, mentions=False):
2921 from rhodecode.lib import helpers as h
2922 return h.render(self.text, renderer=self.renderer, mentions=mentions)
2923
2924 def __repr__(self):
2925 if self.comment_id:
2926 return '<DB:ChangesetComment #%s>' % self.comment_id
2927 else:
2928 return '<DB:ChangesetComment at %#x>' % id(self)
2929
2930
2931 class ChangesetStatus(Base, BaseModel):
2932 __tablename__ = 'changeset_statuses'
2933 __table_args__ = (
2934 Index('cs_revision_idx', 'revision'),
2935 Index('cs_version_idx', 'version'),
2936 UniqueConstraint('repo_id', 'revision', 'version'),
2937 {'extend_existing': True, 'mysql_engine': 'InnoDB',
2938 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
2939 )
2940 STATUS_NOT_REVIEWED = DEFAULT = 'not_reviewed'
2941 STATUS_APPROVED = 'approved'
2942 STATUS_REJECTED = 'rejected'
2943 STATUS_UNDER_REVIEW = 'under_review'
2944
2945 STATUSES = [
2946 (STATUS_NOT_REVIEWED, _("Not Reviewed")), # (no icon) and default
2947 (STATUS_APPROVED, _("Approved")),
2948 (STATUS_REJECTED, _("Rejected")),
2949 (STATUS_UNDER_REVIEW, _("Under Review")),
2950 ]
2951
2952 changeset_status_id = Column('changeset_status_id', Integer(), nullable=False, primary_key=True)
2953 repo_id = Column('repo_id', Integer(), ForeignKey('repositories.repo_id'), nullable=False)
2954 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None)
2955 revision = Column('revision', String(40), nullable=False)
2956 status = Column('status', String(128), nullable=False, default=DEFAULT)
2957 changeset_comment_id = Column('changeset_comment_id', Integer(), ForeignKey('changeset_comments.comment_id'))
2958 modified_at = Column('modified_at', DateTime(), nullable=False, default=datetime.datetime.now)
2959 version = Column('version', Integer(), nullable=False, default=0)
2960 pull_request_id = Column("pull_request_id", Integer(), ForeignKey('pull_requests.pull_request_id'), nullable=True)
2961
2962 author = relationship('User', lazy='joined')
2963 repo = relationship('Repository')
2964 comment = relationship('ChangesetComment', lazy='joined')
2965 pull_request = relationship('PullRequest', lazy='joined')
2966
2967 def __unicode__(self):
2968 return u"<%s('%s[%s]:%s')>" % (
2969 self.__class__.__name__,
2970 self.status, self.version, self.author
2971 )
2972
2973 @classmethod
2974 def get_status_lbl(cls, value):
2975 return dict(cls.STATUSES).get(value)
2976
2977 @property
2978 def status_lbl(self):
2979 return ChangesetStatus.get_status_lbl(self.status)
2980
2981
2982 class _PullRequestBase(BaseModel):
2983 """
2984 Common attributes of pull request and version entries.
2985 """
2986
2987 # .status values
2988 STATUS_NEW = u'new'
2989 STATUS_OPEN = u'open'
2990 STATUS_CLOSED = u'closed'
2991
2992 title = Column('title', Unicode(255), nullable=True)
2993 description = Column(
2994 'description', UnicodeText().with_variant(UnicodeText(10240), 'mysql'),
2995 nullable=True)
2996 # new/open/closed status of pull request (not approve/reject/etc)
2997 status = Column('status', Unicode(255), nullable=False, default=STATUS_NEW)
2998 created_on = Column(
2999 'created_on', DateTime(timezone=False), nullable=False,
3000 default=datetime.datetime.now)
3001 updated_on = Column(
3002 'updated_on', DateTime(timezone=False), nullable=False,
3003 default=datetime.datetime.now)
3004
3005 @declared_attr
3006 def user_id(cls):
3007 return Column(
3008 "user_id", Integer(), ForeignKey('users.user_id'), nullable=False,
3009 unique=None)
3010
3011 # 500 revisions max
3012 _revisions = Column(
3013 'revisions', UnicodeText().with_variant(UnicodeText(20500), 'mysql'))
3014
3015 @declared_attr
3016 def source_repo_id(cls):
3017 # TODO: dan: rename column to source_repo_id
3018 return Column(
3019 'org_repo_id', Integer(), ForeignKey('repositories.repo_id'),
3020 nullable=False)
3021
3022 source_ref = Column('org_ref', Unicode(255), nullable=False)
3023
3024 @declared_attr
3025 def target_repo_id(cls):
3026 # TODO: dan: rename column to target_repo_id
3027 return Column(
3028 'other_repo_id', Integer(), ForeignKey('repositories.repo_id'),
3029 nullable=False)
3030
3031 target_ref = Column('other_ref', Unicode(255), nullable=False)
3032
3033 # TODO: dan: rename column to last_merge_source_rev
3034 _last_merge_source_rev = Column(
3035 'last_merge_org_rev', String(40), nullable=True)
3036 # TODO: dan: rename column to last_merge_target_rev
3037 _last_merge_target_rev = Column(
3038 'last_merge_other_rev', String(40), nullable=True)
3039 _last_merge_status = Column('merge_status', Integer(), nullable=True)
3040 merge_rev = Column('merge_rev', String(40), nullable=True)
3041
3042 @hybrid_property
3043 def revisions(self):
3044 return self._revisions.split(':') if self._revisions else []
3045
3046 @revisions.setter
3047 def revisions(self, val):
3048 self._revisions = ':'.join(val)
3049
3050 @declared_attr
3051 def author(cls):
3052 return relationship('User', lazy='joined')
3053
3054 @declared_attr
3055 def source_repo(cls):
3056 return relationship(
3057 'Repository',
3058 primaryjoin='%s.source_repo_id==Repository.repo_id' % cls.__name__)
3059
3060 @property
3061 def source_ref_parts(self):
3062 refs = self.source_ref.split(':')
3063 return Reference(refs[0], refs[1], refs[2])
3064
3065 @declared_attr
3066 def target_repo(cls):
3067 return relationship(
3068 'Repository',
3069 primaryjoin='%s.target_repo_id==Repository.repo_id' % cls.__name__)
3070
3071 @property
3072 def target_ref_parts(self):
3073 refs = self.target_ref.split(':')
3074 return Reference(refs[0], refs[1], refs[2])
3075
3076
3077 class PullRequest(Base, _PullRequestBase):
3078 __tablename__ = 'pull_requests'
3079 __table_args__ = (
3080 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3081 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
3082 )
3083
3084 pull_request_id = Column(
3085 'pull_request_id', Integer(), nullable=False, primary_key=True)
3086
3087 def __repr__(self):
3088 if self.pull_request_id:
3089 return '<DB:PullRequest #%s>' % self.pull_request_id
3090 else:
3091 return '<DB:PullRequest at %#x>' % id(self)
3092
3093 reviewers = relationship('PullRequestReviewers',
3094 cascade="all, delete, delete-orphan")
3095 statuses = relationship('ChangesetStatus')
3096 comments = relationship('ChangesetComment',
3097 cascade="all, delete, delete-orphan")
3098 versions = relationship('PullRequestVersion',
3099 cascade="all, delete, delete-orphan")
3100
3101 def is_closed(self):
3102 return self.status == self.STATUS_CLOSED
3103
3104 def get_api_data(self):
3105 from rhodecode.model.pull_request import PullRequestModel
3106 pull_request = self
3107 merge_status = PullRequestModel().merge_status(pull_request)
3108 data = {
3109 'pull_request_id': pull_request.pull_request_id,
3110 'url': url('pullrequest_show', repo_name=self.target_repo.repo_name,
3111 pull_request_id=self.pull_request_id,
3112 qualified=True),
3113 'title': pull_request.title,
3114 'description': pull_request.description,
3115 'status': pull_request.status,
3116 'created_on': pull_request.created_on,
3117 'updated_on': pull_request.updated_on,
3118 'commit_ids': pull_request.revisions,
3119 'review_status': pull_request.calculated_review_status(),
3120 'mergeable': {
3121 'status': merge_status[0],
3122 'message': unicode(merge_status[1]),
3123 },
3124 'source': {
3125 'clone_url': pull_request.source_repo.clone_url(),
3126 'repository': pull_request.source_repo.repo_name,
3127 'reference': {
3128 'name': pull_request.source_ref_parts.name,
3129 'type': pull_request.source_ref_parts.type,
3130 'commit_id': pull_request.source_ref_parts.commit_id,
3131 },
3132 },
3133 'target': {
3134 'clone_url': pull_request.target_repo.clone_url(),
3135 'repository': pull_request.target_repo.repo_name,
3136 'reference': {
3137 'name': pull_request.target_ref_parts.name,
3138 'type': pull_request.target_ref_parts.type,
3139 'commit_id': pull_request.target_ref_parts.commit_id,
3140 },
3141 },
3142 'author': pull_request.author.get_api_data(include_secrets=False,
3143 details='basic'),
3144 'reviewers': [
3145 {
3146 'user': reviewer.get_api_data(include_secrets=False,
3147 details='basic'),
3148 'review_status': st[0][1].status if st else 'not_reviewed',
3149 }
3150 for reviewer, st in pull_request.reviewers_statuses()
3151 ]
3152 }
3153
3154 return data
3155
3156 def __json__(self):
3157 return {
3158 'revisions': self.revisions,
3159 }
3160
3161 def calculated_review_status(self):
3162 # TODO: anderson: 13.05.15 Used only on templates/my_account_pullrequests.html
3163 # because it's tricky on how to use ChangesetStatusModel from there
3164 warnings.warn("Use calculated_review_status from ChangesetStatusModel", DeprecationWarning)
3165 from rhodecode.model.changeset_status import ChangesetStatusModel
3166 return ChangesetStatusModel().calculated_review_status(self)
3167
3168 def reviewers_statuses(self):
3169 warnings.warn("Use reviewers_statuses from ChangesetStatusModel", DeprecationWarning)
3170 from rhodecode.model.changeset_status import ChangesetStatusModel
3171 return ChangesetStatusModel().reviewers_statuses(self)
3172
3173
3174 class PullRequestVersion(Base, _PullRequestBase):
3175 __tablename__ = 'pull_request_versions'
3176 __table_args__ = (
3177 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3178 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
3179 )
3180
3181 pull_request_version_id = Column(
3182 'pull_request_version_id', Integer(), nullable=False, primary_key=True)
3183 pull_request_id = Column(
3184 'pull_request_id', Integer(),
3185 ForeignKey('pull_requests.pull_request_id'), nullable=False)
3186 pull_request = relationship('PullRequest')
3187
3188 def __repr__(self):
3189 if self.pull_request_version_id:
3190 return '<DB:PullRequestVersion #%s>' % self.pull_request_version_id
3191 else:
3192 return '<DB:PullRequestVersion at %#x>' % id(self)
3193
3194
3195 class PullRequestReviewers(Base, BaseModel):
3196 __tablename__ = 'pull_request_reviewers'
3197 __table_args__ = (
3198 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3199 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
3200 )
3201
3202 def __init__(self, user=None, pull_request=None):
3203 self.user = user
3204 self.pull_request = pull_request
3205
3206 pull_requests_reviewers_id = Column(
3207 'pull_requests_reviewers_id', Integer(), nullable=False,
3208 primary_key=True)
3209 pull_request_id = Column(
3210 "pull_request_id", Integer(),
3211 ForeignKey('pull_requests.pull_request_id'), nullable=False)
3212 user_id = Column(
3213 "user_id", Integer(), ForeignKey('users.user_id'), nullable=True)
3214
3215 user = relationship('User')
3216 pull_request = relationship('PullRequest')
3217
3218
3219 class Notification(Base, BaseModel):
3220 __tablename__ = 'notifications'
3221 __table_args__ = (
3222 Index('notification_type_idx', 'type'),
3223 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3224 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
3225 )
3226
3227 TYPE_CHANGESET_COMMENT = u'cs_comment'
3228 TYPE_MESSAGE = u'message'
3229 TYPE_MENTION = u'mention'
3230 TYPE_REGISTRATION = u'registration'
3231 TYPE_PULL_REQUEST = u'pull_request'
3232 TYPE_PULL_REQUEST_COMMENT = u'pull_request_comment'
3233
3234 notification_id = Column('notification_id', Integer(), nullable=False, primary_key=True)
3235 subject = Column('subject', Unicode(512), nullable=True)
3236 body = Column('body', UnicodeText().with_variant(UnicodeText(50000), 'mysql'), nullable=True)
3237 created_by = Column("created_by", Integer(), ForeignKey('users.user_id'), nullable=True)
3238 created_on = Column('created_on', DateTime(timezone=False), nullable=False, default=datetime.datetime.now)
3239 type_ = Column('type', Unicode(255))
3240
3241 created_by_user = relationship('User')
3242 notifications_to_users = relationship('UserNotification', lazy='joined',
3243 cascade="all, delete, delete-orphan")
3244
3245 @property
3246 def recipients(self):
3247 return [x.user for x in UserNotification.query()\
3248 .filter(UserNotification.notification == self)\
3249 .order_by(UserNotification.user_id.asc()).all()]
3250
3251 @classmethod
3252 def create(cls, created_by, subject, body, recipients, type_=None):
3253 if type_ is None:
3254 type_ = Notification.TYPE_MESSAGE
3255
3256 notification = cls()
3257 notification.created_by_user = created_by
3258 notification.subject = subject
3259 notification.body = body
3260 notification.type_ = type_
3261 notification.created_on = datetime.datetime.now()
3262
3263 for u in recipients:
3264 assoc = UserNotification()
3265 assoc.notification = notification
3266
3267 # if created_by is inside recipients mark his notification
3268 # as read
3269 if u.user_id == created_by.user_id:
3270 assoc.read = True
3271
3272 u.notifications.append(assoc)
3273 Session().add(notification)
3274
3275 return notification
3276
3277 @property
3278 def description(self):
3279 from rhodecode.model.notification import NotificationModel
3280 return NotificationModel().make_description(self)
3281
3282
3283 class UserNotification(Base, BaseModel):
3284 __tablename__ = 'user_to_notification'
3285 __table_args__ = (
3286 UniqueConstraint('user_id', 'notification_id'),
3287 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3288 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
3289 )
3290 user_id = Column('user_id', Integer(), ForeignKey('users.user_id'), primary_key=True)
3291 notification_id = Column("notification_id", Integer(), ForeignKey('notifications.notification_id'), primary_key=True)
3292 read = Column('read', Boolean, default=False)
3293 sent_on = Column('sent_on', DateTime(timezone=False), nullable=True, unique=None)
3294
3295 user = relationship('User', lazy="joined")
3296 notification = relationship('Notification', lazy="joined",
3297 order_by=lambda: Notification.created_on.desc(),)
3298
3299 def mark_as_read(self):
3300 self.read = True
3301 Session().add(self)
3302
3303
3304 class Gist(Base, BaseModel):
3305 __tablename__ = 'gists'
3306 __table_args__ = (
3307 Index('g_gist_access_id_idx', 'gist_access_id'),
3308 Index('g_created_on_idx', 'created_on'),
3309 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3310 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
3311 )
3312 GIST_PUBLIC = u'public'
3313 GIST_PRIVATE = u'private'
3314 DEFAULT_FILENAME = u'gistfile1.txt'
3315
3316 ACL_LEVEL_PUBLIC = u'acl_public'
3317 ACL_LEVEL_PRIVATE = u'acl_private'
3318
3319 gist_id = Column('gist_id', Integer(), primary_key=True)
3320 gist_access_id = Column('gist_access_id', Unicode(250))
3321 gist_description = Column('gist_description', UnicodeText().with_variant(UnicodeText(1024), 'mysql'))
3322 gist_owner = Column('user_id', Integer(), ForeignKey('users.user_id'), nullable=True)
3323 gist_expires = Column('gist_expires', Float(53), nullable=False)
3324 gist_type = Column('gist_type', Unicode(128), nullable=False)
3325 created_on = Column('created_on', DateTime(timezone=False), nullable=False, default=datetime.datetime.now)
3326 modified_at = Column('modified_at', DateTime(timezone=False), nullable=False, default=datetime.datetime.now)
3327 acl_level = Column('acl_level', Unicode(128), nullable=True)
3328
3329 owner = relationship('User')
3330
3331 def __repr__(self):
3332 return '<Gist:[%s]%s>' % (self.gist_type, self.gist_access_id)
3333
3334 @classmethod
3335 def get_or_404(cls, id_):
3336 res = cls.query().filter(cls.gist_access_id == id_).scalar()
3337 if not res:
3338 raise HTTPNotFound
3339 return res
3340
3341 @classmethod
3342 def get_by_access_id(cls, gist_access_id):
3343 return cls.query().filter(cls.gist_access_id == gist_access_id).scalar()
3344
3345 def gist_url(self):
3346 import rhodecode
3347 alias_url = rhodecode.CONFIG.get('gist_alias_url')
3348 if alias_url:
3349 return alias_url.replace('{gistid}', self.gist_access_id)
3350
3351 return url('gist', gist_id=self.gist_access_id, qualified=True)
3352
3353 @classmethod
3354 def base_path(cls):
3355 """
3356 Returns base path when all gists are stored
3357
3358 :param cls:
3359 """
3360 from rhodecode.model.gist import GIST_STORE_LOC
3361 q = Session().query(RhodeCodeUi)\
3362 .filter(RhodeCodeUi.ui_key == URL_SEP)
3363 q = q.options(FromCache("sql_cache_short", "repository_repo_path"))
3364 return os.path.join(q.one().ui_value, GIST_STORE_LOC)
3365
3366 def get_api_data(self):
3367 """
3368 Common function for generating gist related data for API
3369 """
3370 gist = self
3371 data = {
3372 'gist_id': gist.gist_id,
3373 'type': gist.gist_type,
3374 'access_id': gist.gist_access_id,
3375 'description': gist.gist_description,
3376 'url': gist.gist_url(),
3377 'expires': gist.gist_expires,
3378 'created_on': gist.created_on,
3379 'modified_at': gist.modified_at,
3380 'content': None,
3381 'acl_level': gist.acl_level,
3382 }
3383 return data
3384
3385 def __json__(self):
3386 data = dict(
3387 )
3388 data.update(self.get_api_data())
3389 return data
3390 # SCM functions
3391
3392 def scm_instance(self, **kwargs):
3393 full_repo_path = os.path.join(self.base_path(), self.gist_access_id)
3394 return get_vcs_instance(
3395 repo_path=safe_str(full_repo_path), create=False)
3396
3397
3398 class DbMigrateVersion(Base, BaseModel):
3399 __tablename__ = 'db_migrate_version'
3400 __table_args__ = (
3401 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3402 'mysql_charset': 'utf8', 'sqlite_autoincrement': True},
3403 )
3404 repository_id = Column('repository_id', String(250), primary_key=True)
3405 repository_path = Column('repository_path', Text)
3406 version = Column('version', Integer)
3407
3408
3409 class ExternalIdentity(Base, BaseModel):
3410 __tablename__ = 'external_identities'
3411 __table_args__ = (
3412 Index('local_user_id_idx', 'local_user_id'),
3413 Index('external_id_idx', 'external_id'),
3414 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3415 'mysql_charset': 'utf8'})
3416
3417 external_id = Column('external_id', Unicode(255), default=u'',
3418 primary_key=True)
3419 external_username = Column('external_username', Unicode(1024), default=u'')
3420 local_user_id = Column('local_user_id', Integer(),
3421 ForeignKey('users.user_id'), primary_key=True)
3422 provider_name = Column('provider_name', Unicode(255), default=u'',
3423 primary_key=True)
3424 access_token = Column('access_token', String(1024), default=u'')
3425 alt_token = Column('alt_token', String(1024), default=u'')
3426 token_secret = Column('token_secret', String(1024), default=u'')
3427
3428 @classmethod
3429 def by_external_id_and_provider(cls, external_id, provider_name,
3430 local_user_id=None):
3431 """
3432 Returns ExternalIdentity instance based on search params
3433
3434 :param external_id:
3435 :param provider_name:
3436 :return: ExternalIdentity
3437 """
3438 query = cls.query()
3439 query = query.filter(cls.external_id == external_id)
3440 query = query.filter(cls.provider_name == provider_name)
3441 if local_user_id:
3442 query = query.filter(cls.local_user_id == local_user_id)
3443 return query.first()
3444
3445 @classmethod
3446 def user_by_external_id_and_provider(cls, external_id, provider_name):
3447 """
3448 Returns User instance based on search params
3449
3450 :param external_id:
3451 :param provider_name:
3452 :return: User
3453 """
3454 query = User.query()
3455 query = query.filter(cls.external_id == external_id)
3456 query = query.filter(cls.provider_name == provider_name)
3457 query = query.filter(User.user_id == cls.local_user_id)
3458 return query.first()
3459
3460 @classmethod
3461 def by_local_user_id(cls, local_user_id):
3462 """
3463 Returns all tokens for user
3464
3465 :param local_user_id:
3466 :return: ExternalIdentity
3467 """
3468 query = cls.query()
3469 query = query.filter(cls.local_user_id == local_user_id)
3470 return query
3471
3472
3473 class Integration(Base, BaseModel):
3474 __tablename__ = 'integrations'
3475 __table_args__ = (
3476 {'extend_existing': True, 'mysql_engine': 'InnoDB',
3477 'mysql_charset': 'utf8', 'sqlite_autoincrement': True}
3478 )
3479
3480 integration_id = Column('integration_id', Integer(), primary_key=True)
3481 integration_type = Column('integration_type', String(255))
3482 enabled = Column('enabled', Boolean(), nullable=False)
3483 name = Column('name', String(255), nullable=False)
3484 settings = Column(
3485 'settings_json', MutationObj.as_mutable(
3486 JsonType(dialect_map=dict(mysql=UnicodeText(16384)))))
3487 repo_id = Column(
3488 'repo_id', Integer(), ForeignKey('repositories.repo_id'),
3489 nullable=True, unique=None, default=None)
3490 repo = relationship('Repository', lazy='joined')
3491
3492 repo_group_id = Column(
3493 'repo_group_id', Integer(), ForeignKey('groups.group_id'),
3494 nullable=True, unique=None, default=None)
3495 repo_group = relationship('RepoGroup', lazy='joined')
3496
3497 def __repr__(self):
3498 if self.repo:
3499 scope = 'repo=%r' % self.repo
3500 elif self.repo_group:
3501 scope = 'repo_group=%r' % self.repo_group
3502 else:
3503 scope = 'global'
3504
3505 return '<Integration(%r, %r)>' % (self.integration_type, scope)
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
The requested commit or file is too big and content was truncated. Show full diff
@@ -1,5 +1,5 b''
1 [bumpversion]
1 [bumpversion]
2 current_version = 4.3.1
2 current_version = 4.4.0
3 message = release: Bump version {current_version} to {new_version}
3 message = release: Bump version {current_version} to {new_version}
4
4
5 [bumpversion:file:rhodecode/VERSION]
5 [bumpversion:file:rhodecode/VERSION]
@@ -8,6 +8,7 b' syntax: glob'
8 *.swp
8 *.swp
9 *.tox
9 *.tox
10 *.DS_Store*
10 *.DS_Store*
11 rhodecode/public/js/src/components/**/*.css
11
12
12 syntax: regexp
13 syntax: regexp
13
14
@@ -23,6 +24,7 b' syntax: regexp'
23 ^_dev
24 ^_dev
24 ^._dev
25 ^._dev
25 ^build/
26 ^build/
27 ^bower_components/
26 ^coverage\.xml$
28 ^coverage\.xml$
27 ^data$
29 ^data$
28 ^\.eggs/
30 ^\.eggs/
@@ -38,7 +40,11 b' syntax: regexp'
38 ^rcextensions/
40 ^rcextensions/
39 ^result$
41 ^result$
40 ^rhodecode/public/css/style.css$
42 ^rhodecode/public/css/style.css$
43 ^rhodecode/public/css/style-polymer.css$
44 ^rhodecode/public/js/rhodecode-components.html$
41 ^rhodecode/public/js/scripts.js$
45 ^rhodecode/public/js/scripts.js$
46 ^rhodecode/public/js/src/components/root-styles.gen.html$
47 ^rhodecode/public/js/vendors/webcomponentsjs/
42 ^rhodecode\.db$
48 ^rhodecode\.db$
43 ^rhodecode\.log$
49 ^rhodecode\.log$
44 ^rhodecode_dev\.log$
50 ^rhodecode_dev\.log$
@@ -4,26 +4,21 b' done = false'
4 [task:bump_version]
4 [task:bump_version]
5 done = true
5 done = true
6
6
7 [task:rc_tools_pinned]
8 done = true
9
10 [task:fixes_on_stable]
7 [task:fixes_on_stable]
11 done = true
12
8
13 [task:pip2nix_generated]
9 [task:pip2nix_generated]
14 done = true
15
10
16 [task:changelog_updated]
11 [task:changelog_updated]
17 done = true
18
12
19 [task:generate_api_docs]
13 [task:generate_api_docs]
20 done = true
14
15 [task:updated_translation]
21
16
22 [release]
17 [release]
23 state = prepared
18 state = in_progress
24 version = 4.3.1
19 version = 4.4.0
25
20
26 [task:updated_translation]
21 [task:rc_tools_pinned]
27
22
28 [task:generate_js_routes]
23 [task:generate_js_routes]
29
24
@@ -1,144 +1,15 b''
1 module.exports = function(grunt) {
1 var gruntConfig = require('./grunt_config.json');
2 grunt.initConfig({
3
4 dirs: {
5 css: "rhodecode/public/css",
6 js: {
7 "src": "rhodecode/public/js/src",
8 "dest": "rhodecode/public/js"
9 }
10 },
11
12 concat: {
13 dist: {
14 src: [
15 // Base libraries
16 '<%= dirs.js.src %>/jquery-1.11.1.min.js',
17 '<%= dirs.js.src %>/logging.js',
18 '<%= dirs.js.src %>/bootstrap.js',
19 '<%= dirs.js.src %>/mousetrap.js',
20 '<%= dirs.js.src %>/moment.js',
21 '<%= dirs.js.src %>/appenlight-client-0.4.1.min.js',
22 '<%= dirs.js.src %>/i18n_utils.js',
23 '<%= dirs.js.src %>/deform.js',
24
25 // Plugins
26 '<%= dirs.js.src %>/plugins/jquery.pjax.js',
27 '<%= dirs.js.src %>/plugins/jquery.dataTables.js',
28 '<%= dirs.js.src %>/plugins/flavoured_checkbox.js',
29 '<%= dirs.js.src %>/plugins/jquery.auto-grow-input.js',
30 '<%= dirs.js.src %>/plugins/jquery.autocomplete.js',
31 '<%= dirs.js.src %>/plugins/jquery.debounce.js',
32 '<%= dirs.js.src %>/plugins/jquery.mark.js',
33 '<%= dirs.js.src %>/plugins/jquery.timeago.js',
34 '<%= dirs.js.src %>/plugins/jquery.timeago-extension.js',
35 '<%= dirs.js.src %>/plugins/toastr.js',
36
37 // Select2
38 '<%= dirs.js.src %>/select2/select2.js',
39
40 // Code-mirror
41 '<%= dirs.js.src %>/codemirror/codemirror.js',
42 '<%= dirs.js.src %>/codemirror/codemirror_loadmode.js',
43 '<%= dirs.js.src %>/codemirror/codemirror_hint.js',
44 '<%= dirs.js.src %>/codemirror/codemirror_overlay.js',
45 '<%= dirs.js.src %>/codemirror/codemirror_placeholder.js',
46 // TODO: mikhail: this is an exception. Since the code mirror modes
47 // are loaded "on the fly", we need to keep them in a public folder
48 '<%= dirs.js.dest %>/mode/meta.js',
49 '<%= dirs.js.dest %>/mode/meta_ext.js',
50 '<%= dirs.js.dest %>/rhodecode/i18n/select2/translations.js',
51
52 // Rhodecode utilities
53 '<%= dirs.js.src %>/rhodecode/utils/array.js',
54 '<%= dirs.js.src %>/rhodecode/utils/string.js',
55 '<%= dirs.js.src %>/rhodecode/utils/pyroutes.js',
56 '<%= dirs.js.src %>/rhodecode/utils/ajax.js',
57 '<%= dirs.js.src %>/rhodecode/utils/autocomplete.js',
58 '<%= dirs.js.src %>/rhodecode/utils/colorgenerator.js',
59 '<%= dirs.js.src %>/rhodecode/utils/ie.js',
60 '<%= dirs.js.src %>/rhodecode/utils/os.js',
61 '<%= dirs.js.src %>/rhodecode/utils/topics.js',
62
63 // Rhodecode widgets
64 '<%= dirs.js.src %>/rhodecode/widgets/multiselect.js',
65
2
66 // Rhodecode components
3 module.exports = function(grunt) {
67 '<%= dirs.js.src %>/rhodecode/init.js',
4 grunt.initConfig(gruntConfig);
68 '<%= dirs.js.src %>/rhodecode/connection_controller.js',
69 '<%= dirs.js.src %>/rhodecode/codemirror.js',
70 '<%= dirs.js.src %>/rhodecode/comments.js',
71 '<%= dirs.js.src %>/rhodecode/constants.js',
72 '<%= dirs.js.src %>/rhodecode/files.js',
73 '<%= dirs.js.src %>/rhodecode/followers.js',
74 '<%= dirs.js.src %>/rhodecode/menus.js',
75 '<%= dirs.js.src %>/rhodecode/notifications.js',
76 '<%= dirs.js.src %>/rhodecode/permissions.js',
77 '<%= dirs.js.src %>/rhodecode/pjax.js',
78 '<%= dirs.js.src %>/rhodecode/pullrequests.js',
79 '<%= dirs.js.src %>/rhodecode/settings.js',
80 '<%= dirs.js.src %>/rhodecode/select2_widgets.js',
81 '<%= dirs.js.src %>/rhodecode/tooltips.js',
82 '<%= dirs.js.src %>/rhodecode/users.js',
83 '<%= dirs.js.src %>/rhodecode/utils/notifications.js',
84 '<%= dirs.js.src %>/rhodecode/appenlight.js',
85
86 // Rhodecode main module
87 '<%= dirs.js.src %>/rhodecode.js'
88 ],
89 dest: '<%= dirs.js.dest %>/scripts.js',
90 nonull: true
91 }
92 },
93
94 less: {
95 development: {
96 options: {
97 compress: false,
98 yuicompress: false,
99 optimization: 0
100 },
101 files: {
102 "<%= dirs.css %>/style.css": "<%= dirs.css %>/main.less"
103 }
104 },
105 production: {
106 options: {
107 compress: true,
108 yuicompress: true,
109 optimization: 2
110 },
111 files: {
112 "<%= dirs.css %>/style.css": "<%= dirs.css %>/main.less"
113 }
114 }
115 },
116
117 watch: {
118 less: {
119 files: ["<%= dirs.css %>/*.less"],
120 tasks: ["less:production"]
121 },
122 js: {
123 files: ["<%= dirs.js.src %>/**/*.js"],
124 tasks: ["concat:dist"]
125 }
126 },
127
128 jshint: {
129 rhodecode: {
130 src: '<%= dirs.js.src %>/rhodecode/**/*.js',
131 options: {
132 jshintrc: '.jshintrc'
133 }
134 }
135 }
136 });
137
5
138 grunt.loadNpmTasks('grunt-contrib-less');
6 grunt.loadNpmTasks('grunt-contrib-less');
139 grunt.loadNpmTasks('grunt-contrib-concat');
7 grunt.loadNpmTasks('grunt-contrib-concat');
140 grunt.loadNpmTasks('grunt-contrib-watch');
8 grunt.loadNpmTasks('grunt-contrib-watch');
141 grunt.loadNpmTasks('grunt-contrib-jshint');
9 grunt.loadNpmTasks('grunt-contrib-jshint');
10 grunt.loadNpmTasks('grunt-vulcanize');
11 grunt.loadNpmTasks('grunt-crisper');
12 grunt.loadNpmTasks('grunt-contrib-copy');
142
13
143 grunt.registerTask('default', ['less:production', 'concat:dist']);
14 grunt.registerTask('default', ['less:production', 'less:components', 'concat:polymercss', 'copy','vulcanize', 'crisper', 'concat:dist']);
144 };
15 };
@@ -29,6 +29,9 b' recursive-include rhodecode *.mako'
29 # 502 page
29 # 502 page
30 include rhodecode/public/502.html
30 include rhodecode/public/502.html
31
31
32 # 502 page
33 include rhodecode/public/502.html
34
32 # images, css
35 # images, css
33 include rhodecode/public/css/*.css
36 include rhodecode/public/css/*.css
34 include rhodecode/public/images/*.*
37 include rhodecode/public/images/*.*
@@ -414,7 +414,7 b' search.location = %(here)s/data/index'
414 ## channelstream enables persistent connections and live notification
414 ## channelstream enables persistent connections and live notification
415 ## in the system. It's also used by the chat system
415 ## in the system. It's also used by the chat system
416
416
417 channelstream.enabled = true
417 channelstream.enabled = false
418 ## location of channelstream server on the backend
418 ## location of channelstream server on the backend
419 channelstream.server = 127.0.0.1:9800
419 channelstream.server = 127.0.0.1:9800
420 ## location of the channelstream server from outside world
420 ## location of the channelstream server from outside world
@@ -388,7 +388,7 b' search.location = %(here)s/data/index'
388 ## channelstream enables persistent connections and live notification
388 ## channelstream enables persistent connections and live notification
389 ## in the system. It's also used by the chat system
389 ## in the system. It's also used by the chat system
390
390
391 channelstream.enabled = true
391 channelstream.enabled = false
392 ## location of channelstream server on the backend
392 ## location of channelstream server on the backend
393 channelstream.server = 127.0.0.1:9800
393 channelstream.server = 127.0.0.1:9800
394 ## location of the channelstream server from outside world
394 ## location of the channelstream server from outside world
@@ -30,6 +30,10 b' let'
30 then pythonPackages
30 then pythonPackages
31 else getAttr pythonPackages pkgs;
31 else getAttr pythonPackages pkgs;
32
32
33 buildBowerComponents =
34 pkgs.buildBowerComponents or
35 (import ./pkgs/backport-16.03-build-bower-components.nix { inherit pkgs; });
36
33 elem = builtins.elem;
37 elem = builtins.elem;
34 basename = path: with pkgs.lib; last (splitString "/" path);
38 basename = path: with pkgs.lib; last (splitString "/" path);
35 startsWith = prefix: full: let
39 startsWith = prefix: full: let
@@ -41,31 +45,28 b' let'
41 ext = last (splitString "." path);
45 ext = last (splitString "." path);
42 in
46 in
43 !elem (basename path) [
47 !elem (basename path) [
44 ".git" ".hg" "__pycache__" ".eggs" "node_modules"
48 ".git" ".hg" "__pycache__" ".eggs"
45 "build" "data" "tmp"] &&
49 "bower_components" "node_modules"
50 "build" "data" "result" "tmp"] &&
46 !elem ext ["egg-info" "pyc"] &&
51 !elem ext ["egg-info" "pyc"] &&
52 # TODO: johbo: This check is wrong, since "path" contains an absolute path,
53 # it would still be good to restore it since we want to ignore "result-*".
47 !startsWith "result" path;
54 !startsWith "result" path;
48
55
49 sources = pkgs.config.rc.sources or {};
56 sources = pkgs.config.rc.sources or {};
57 version = builtins.readFile ./rhodecode/VERSION;
50 rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.;
58 rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.;
51
59
52 # Load the generated node packages
60 nodeEnv = import ./pkgs/node-default.nix {
53 nodePackages = pkgs.callPackage "${pkgs.path}/pkgs/top-level/node-packages.nix" rec {
61 inherit pkgs;
54 self = nodePackages;
55 generated = pkgs.callPackage ./pkgs/node-packages.nix { inherit self; };
56 };
62 };
63 nodeDependencies = nodeEnv.shell.nodeDependencies;
57
64
58 # TODO: Should be taken automatically out of the generates packages.
65 bowerComponents = buildBowerComponents {
59 # apps.nix has one solution for this, although I'd prefer to have the deps
66 name = "enterprise-ce-${version}";
60 # from package.json mapped in here.
67 generated = ./pkgs/bower-packages.nix;
61 nodeDependencies = with nodePackages; [
68 src = rhodecode-enterprise-ce-src;
62 grunt
69 };
63 grunt-contrib-concat
64 grunt-contrib-jshint
65 grunt-contrib-less
66 grunt-contrib-watch
67 jshint
68 ];
69
70
70 pythonGeneratedPackages = self: basePythonPackages.override (a: {
71 pythonGeneratedPackages = self: basePythonPackages.override (a: {
71 inherit self;
72 inherit self;
@@ -86,16 +87,25 b' let'
86 pythonLocalOverrides = self: super: {
87 pythonLocalOverrides = self: super: {
87 rhodecode-enterprise-ce =
88 rhodecode-enterprise-ce =
88 let
89 let
89 version = builtins.readFile ./rhodecode/VERSION;
90 linkNodeAndBowerPackages = ''
90 linkNodeModules = ''
91 echo "Export RhodeCode CE path"
92 export RHODECODE_CE_PATH=${rhodecode-enterprise-ce-src}
91 echo "Link node packages"
93 echo "Link node packages"
92 # TODO: check if this adds stuff as a dependency, closure size
93 rm -fr node_modules
94 rm -fr node_modules
94 mkdir -p node_modules
95 mkdir node_modules
95 ${pkgs.lib.concatMapStrings (dep: ''
96 # johbo: Linking individual packages allows us to run "npm install"
96 ln -sfv ${dep}/lib/node_modules/${dep.pkgName} node_modules/
97 # inside of a shell to try things out. Re-entering the shell will
97 '') nodeDependencies}
98 # restore a clean environment.
99 ln -s ${nodeDependencies}/lib/node_modules/* node_modules/
100
98 echo "DONE: Link node packages"
101 echo "DONE: Link node packages"
102
103 echo "Link bower packages"
104 rm -fr bower_components
105 mkdir bower_components
106
107 ln -s ${bowerComponents}/bower_components/* bower_components/
108 echo "DONE: Link bower packages"
99 '';
109 '';
100 in super.rhodecode-enterprise-ce.override (attrs: {
110 in super.rhodecode-enterprise-ce.override (attrs: {
101
111
@@ -109,6 +119,7 b' let'
109 buildInputs =
119 buildInputs =
110 attrs.buildInputs ++
120 attrs.buildInputs ++
111 (with self; [
121 (with self; [
122 pkgs.nodePackages.bower
112 pkgs.nodePackages.grunt-cli
123 pkgs.nodePackages.grunt-cli
113 pkgs.subversion
124 pkgs.subversion
114 pytest-catchlog
125 pytest-catchlog
@@ -123,7 +134,8 b' let'
123 # pkgs/default.nix?
134 # pkgs/default.nix?
124 passthru = {
135 passthru = {
125 inherit
136 inherit
126 linkNodeModules
137 bowerComponents
138 linkNodeAndBowerPackages
127 myPythonPackagesUnfix
139 myPythonPackagesUnfix
128 pythonLocalOverrides;
140 pythonLocalOverrides;
129 pythonPackages = self;
141 pythonPackages = self;
@@ -145,7 +157,7 b' let'
145 export PYTHONPATH="$tmp_path/${self.python.sitePackages}:$PYTHONPATH"
157 export PYTHONPATH="$tmp_path/${self.python.sitePackages}:$PYTHONPATH"
146 mkdir -p $tmp_path/${self.python.sitePackages}
158 mkdir -p $tmp_path/${self.python.sitePackages}
147 python setup.py develop --prefix $tmp_path --allow-hosts ""
159 python setup.py develop --prefix $tmp_path --allow-hosts ""
148 '' + linkNodeModules;
160 '' + linkNodeAndBowerPackages;
149
161
150 preCheck = ''
162 preCheck = ''
151 export PATH="$out/bin:$PATH"
163 export PATH="$out/bin:$PATH"
@@ -156,7 +168,7 b' let'
156 rm -rf $out/lib/${self.python.libPrefix}/site-packages/rhodecode/tests
168 rm -rf $out/lib/${self.python.libPrefix}/site-packages/rhodecode/tests
157 '';
169 '';
158
170
159 preBuild = linkNodeModules + ''
171 preBuild = linkNodeAndBowerPackages + ''
160 grunt
172 grunt
161 rm -fr node_modules
173 rm -fr node_modules
162 '';
174 '';
@@ -29,13 +29,3 b' 4. You will see the labs setting on the'
29 :menuselection:`Admin --> Settings --> labs` page.
29 :menuselection:`Admin --> Settings --> labs` page.
30
30
31 .. image:: ../images/lab-setting.png
31 .. image:: ../images/lab-setting.png
32
33 Available Lab Extras
34 --------------------
35
36 Once lab settings are enabled, the following features are available.
37
38 .. toctree::
39 :maxdepth: 1
40
41 svn-http
@@ -26,6 +26,7 b' For more information, see the following '
26 * :ref:`vcs-server-versions`
26 * :ref:`vcs-server-versions`
27 * :ref:`vcs-server-maintain`
27 * :ref:`vcs-server-maintain`
28 * :ref:`vcs-server-config-file`
28 * :ref:`vcs-server-config-file`
29 * :ref:`svn-http`
29
30
30 .. _install-vcs:
31 .. _install-vcs:
31
32
@@ -297,5 +298,133 b' For a more detailed explanation of the l'
297 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
298 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
298 datefmt = %Y-%m-%d %H:%M:%S
299 datefmt = %Y-%m-%d %H:%M:%S
299
300
301 .. _svn-http:
300
302
301 .. _Ask Ubuntu: http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue
303 |svn| With Write Over HTTP
304 ^^^^^^^^^^^^^^^^^^^^^^^^^^
305
306 To use |svn| with read/write support over the |svn| HTTP protocol, you have to
307 configure the HTTP |svn| backend.
308
309 Prerequisites
310 =============
311
312 - Enable HTTP support inside the admin VCS settings on your |RCE| instance
313 - You need to install the following tools on the machine that is running an
314 instance of |RCE|:
315 ``Apache HTTP Server`` and
316 ``mod_dav_svn``.
317
318
319 Using Ubuntu Distribution as an example you can run:
320
321 .. code-block:: bash
322
323 $ sudo apt-get install apache2 libapache2-mod-svn
324
325 Once installed you need to enable ``dav_svn``:
326
327 .. code-block:: bash
328
329 $ sudo a2enmod dav_svn
330
331 Configuring Apache Setup
332 ========================
333
334 .. tip::
335
336 It is recommended to run Apache on a port other than 80, due to possible
337 conflicts with other HTTP servers like nginx. To do this, set the
338 ``Listen`` parameter in the ``/etc/apache2/ports.conf`` file, for example
339 ``Listen 8090``.
340
341
342 .. warning::
343
344 Make sure your Apache instance which runs the mod_dav_svn module is
345 only accessible by RhodeCode. Otherwise everyone is able to browse
346 the repositories or run subversion operations (checkout/commit/etc.).
347
348 It is also recommended to run apache as the same user as |RCE|, otherwise
349 permission issues could occur. To do this edit the ``/etc/apache2/envvars``
350
351 .. code-block:: apache
352
353 export APACHE_RUN_USER=rhodecode
354 export APACHE_RUN_GROUP=rhodecode
355
356 1. To configure Apache, create and edit a virtual hosts file, for example
357 :file:`/etc/apache2/sites-available/default.conf`. Below is an example
358 how to use one with auto-generated config ```mod_dav_svn.conf```
359 from configured |RCE| instance.
360
361 .. code-block:: apache
362
363 <VirtualHost *:8080>
364 ServerAdmin rhodecode-admin@localhost
365 DocumentRoot /var/www/html
366 ErrorLog ${'${APACHE_LOG_DIR}'}/error.log
367 CustomLog ${'${APACHE_LOG_DIR}'}/access.log combined
368 Include /home/user/.rccontrol/enterprise-1/mod_dav_svn.conf
369 </VirtualHost>
370
371
372 2. Go to the :menuselection:`Admin --> Settings --> VCS` page, and
373 enable :guilabel:`Proxy Subversion HTTP requests`, and specify the
374 :guilabel:`Subversion HTTP Server URL`.
375
376 3. Open the |RCE| configuration file,
377 :file:`/home/{user}/.rccontrol/{instance-id}/rhodecode.ini`
378
379 4. Add the following configuration option in the ``[app:main]``
380 section if you don't have it yet.
381
382 This enables mapping of the created |RCE| repo groups into special |svn| paths.
383 Each time a new repository group is created, the system will update
384 the template file and create new mapping. Apache web server needs to be
385 reloaded to pick up the changes on this file.
386 It's recommended to add reload into a crontab so the changes can be picked
387 automatically once someone creates a repository group inside RhodeCode.
388
389
390 .. code-block:: ini
391
392 ##############################################
393 ### Subversion proxy support (mod_dav_svn) ###
394 ##############################################
395 ## Enable or disable the config file generation.
396 svn.proxy.generate_config = true
397 ## Generate config file with `SVNListParentPath` set to `On`.
398 svn.proxy.list_parent_path = true
399 ## Set location and file name of generated config file.
400 svn.proxy.config_file_path = %(here)s/mod_dav_svn.conf
401 ## File system path to the directory containing the repositories served by
402 ## RhodeCode.
403 svn.proxy.parent_path_root = /path/to/repo_store
404 ## Used as a prefix to the <Location> block in the generated config file. In
405 ## most cases it should be set to `/`.
406 svn.proxy.location_root = /
407
408
409 This would create a special template file called ```mod_dav_svn.conf```. We
410 used that file path in the apache config above inside the Include statement.
411
412
413 Using |svn|
414 ===========
415
416 Once |svn| has been enabled on your instance, you can use it with the
417 following examples. For more |svn| information, see the `Subversion Red Book`_
418
419 .. code-block:: bash
420
421 # To clone a repository
422 svn checkout http://my-svn-server.example.com/my-svn-repo
423
424 # svn commit
425 svn commit
426
427 .. _Subversion Red Book: http://svnbook.red-bean.com/en/1.7/svn-book.html#svn.ref.svn
428
429
430 .. _Ask Ubuntu: http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue No newline at end of file
@@ -18,3 +18,4 b' Welcome to the contribution guides and d'
18 db-schema
18 db-schema
19 dev-settings
19 dev-settings
20 api
20 api
21 dependencies
@@ -111,15 +111,18 b' time operation::'
111 Compile CSS and JavaScript
111 Compile CSS and JavaScript
112 ^^^^^^^^^^^^^^^^^^^^^^^^^^
112 ^^^^^^^^^^^^^^^^^^^^^^^^^^
113
113
114 To use the application's frontend, you will need to compile the CSS and
114 To use the application's frontend and prepare it for production deployment,
115 JavaScript with Grunt. This is easily done from within the nix-shell using the
115 you will need to compile the CSS and JavaScript with Grunt.
116 following command::
116 This is easily done from within the nix-shell using the following command::
117
118 grunt
117
119
118 make web-build
120 When developing new features you will need to recompile following any
121 changes made to the CSS or JavaScript files when developing the code::
119
122
120 You will need to recompile following any changes made to the CSS or JavaScript
123 grunt watch
121 files.
122
124
125 This prepares the development (with comments/whitespace) versions of files.
123
126
124 Start the Development Server
127 Start the Development Server
125 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
128 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -45,6 +45,11 b' JavaScript'
45 ----------
45 ----------
46 This currently remains undefined. Suggestions welcome!
46 This currently remains undefined. Suggestions welcome!
47
47
48 However, we have decided to go forward with W3C standards and picked
49 WebComponents as the foundation of user interface. New functionality should
50 be implemented as components using the
51 `Polymer Project` <https://www.polymer-project.org>`_ library
52 and should avoid external dependencies like `jquery`.
48
53
49 HTML
54 HTML
50 ----
55 ----
@@ -14,9 +14,6 b' py.test based test suite'
14 The test suite is in the folder :file:`rhodecode/tests/` and should be run with
14 The test suite is in the folder :file:`rhodecode/tests/` and should be run with
15 the test runner `py.test` inside of your `nix-shell` environment::
15 the test runner `py.test` inside of your `nix-shell` environment::
16
16
17 # In case you need the cythonized version
18 CYTHONIZE=1 python setup.py develop --prefix=$tmp_path
19
20 py.test rhodecode
17 py.test rhodecode
21
18
22
19
@@ -26,20 +23,28 b' py.test integration'
26
23
27 The integration with the test runner is based on the following three parts:
24 The integration with the test runner is based on the following three parts:
28
25
29 - `pytest_pylons` is a py.test plugin which does the integration with the
26 - :file:`rhodecode/tests/pylons_plugin.py` is a py.test plugin which does the
30 Pylons web framework. It sets up the Pylons environment based on the given ini
27 integration with the Pylons web framework. It sets up the Pylons environment
31 file.
28 based on the given ini file.
32
29
33 Tests which depend on the Pylons environment to be set up must request the
30 Tests which depend on the Pylons environment to be set up must request the
34 fixture `pylonsapp`.
31 fixture `pylonsapp`.
35
32
36 - :file:`rhodecode/tests/plugin.py` contains the integration of py.test with
33 - :file:`rhodecode/tests/plugin.py` contains the integration of py.test with
37 RhodeCode Enterprise itself.
34 RhodeCode Enterprise itself and it takes care of setting up the needed parts
35 of the Pyramid framework.
38
36
39 - :file:`conftest.py` plugins are used to provide a special integration for
37 - :file:`conftest.py` plugins are used to provide a special integration for
40 certain groups of tests based on the directory location.
38 certain groups of tests based on the directory location.
41
39
42
40
41 .. note::
42
43 We are migrating from Pylons to its successor Pyramid. Eventually the role of
44 the file `pylons_plugin.py` will change to provide only a Pyramid
45 integration.
46
47
43
48
44 VCS backend selection
49 VCS backend selection
45 ---------------------
50 ---------------------
@@ -19,8 +19,7 b' Quick Start Installation Guide'
19
19
20 To get |RCE| up and running, run through the below steps:
20 To get |RCE| up and running, run through the below steps:
21
21
22 1. Download the latest |RCC| installer from your `rhodecode.com`_ profile
22 1. Download the latest |RCC| installer from `rhodecode.com/download`_.
23 or main page.
24 If you don't have an account, sign up at `rhodecode.com/register`_.
23 If you don't have an account, sign up at `rhodecode.com/register`_.
25
24
26 2. Run the |RCC| installer and accept the End User Licence using the
25 2. Run the |RCC| installer and accept the End User Licence using the
@@ -107,3 +106,5 b' 5. Check the status of your installation'
107 .. _rhodecode.com/download/: https://rhodecode.com/download/
106 .. _rhodecode.com/download/: https://rhodecode.com/download/
108 .. _rhodecode.com: https://rhodecode.com/
107 .. _rhodecode.com: https://rhodecode.com/
109 .. _rhodecode.com/register: https://rhodecode.com/register/
108 .. _rhodecode.com/register: https://rhodecode.com/register/
109 .. _rhodecode.com/download: https://rhodecode.com/download/
110
@@ -3,20 +3,20 b''
3 PostgreSQL
3 PostgreSQL
4 ----------
4 ----------
5
5
6 To use a PostgreSQL database you should install and configurevthe database
6 To use a PostgreSQL database, you should install and configure the database
7 before installing |RCV|. This is becausevduring |RCV| installation you will
7 before installing |RCV|. This is because during |RCV| installation you will
8 setup a connection to your PostgreSQL database. To work with PostgreSQL,
8 setup the connection to your PostgreSQL database. To work with PostgreSQL,
9 use the following steps:
9 use the following steps:
10
10
11 1. Depending on your |os|, install avPostgreSQL database following the
11 1. Depending on your |os|, install a PostgreSQL database following the
12 appropriate instructions from the `PostgreSQL website`_.
12 appropriate instructions from the `PostgreSQL website`_.
13 2. Configure the database with a username and password which you will use
13 2. Configure the database with a username and password, which you will use
14 with |RCV|.
14 with |RCV|.
15 3. Install |RCV|, and during installation select PostgreSQL as your database.
15 3. Install |RCV|, and during installation select PostgreSQL as your database.
16 4. Enter the following information to during the database setup:
16 4. Enter the following information during the database setup:
17
17
18 * Your network IP Address
18 * Your network IP Address
19 * The port number for MySQL access. The default MySQL port is ``5434``
19 * The port number for PostgreSQL access; the default port is ``5434``
20 * Your database username
20 * Your database username
21 * Your database password
21 * Your database password
22 * A new database name
22 * A new database name
@@ -9,6 +9,7 b' Release Notes'
9 .. toctree::
9 .. toctree::
10 :maxdepth: 1
10 :maxdepth: 1
11
11
12 release-notes-4.4.0.rst
12 release-notes-4.3.1.rst
13 release-notes-4.3.1.rst
13 release-notes-4.3.0.rst
14 release-notes-4.3.0.rst
14 release-notes-4.2.1.rst
15 release-notes-4.2.1.rst
@@ -3,10 +3,16 b''
3 "version": "0.0.1",
3 "version": "0.0.1",
4 "devDependencies": {
4 "devDependencies": {
5 "grunt": "^0.4.5",
5 "grunt": "^0.4.5",
6 "grunt-contrib-copy": "^1.0.0",
6 "grunt-contrib-concat": "^0.5.1",
7 "grunt-contrib-concat": "^0.5.1",
7 "grunt-contrib-jshint": "^0.12.0",
8 "grunt-contrib-jshint": "^0.12.0",
8 "grunt-contrib-less": "^1.1.0",
9 "grunt-contrib-less": "^1.1.0",
9 "grunt-contrib-watch": "^0.6.1",
10 "grunt-contrib-watch": "^0.6.1",
10 "jshint": "^2.9.1-rc3"
11 "crisper": "^2.0.2",
12 "vulcanize": "^1.14.8",
13 "grunt-crisper": "^1.0.1",
14 "grunt-vulcanize": "^1.0.0",
15 "jshint": "^2.9.1-rc3",
16 "bower": "^1.7.9"
11 }
17 }
12 }
18 }
This diff has been collapsed as it changes many lines, (5578 lines changed) Show them Hide them
@@ -1,3341 +1,2337 b''
1 { self, fetchurl, fetchgit ? null, lib }:
1 # This file has been generated by node2nix 1.0.0. Do not edit!
2
3 {nodeEnv, fetchurl, fetchgit}:
2
4
3 {
5 let
4 by-spec."abbrev"."1" =
6 sources = {
5 self.by-version."abbrev"."1.0.7";
7 "grunt-0.4.5" = {
6 by-version."abbrev"."1.0.7" = lib.makeOverridable self.buildNodePackage {
8 name = "grunt";
7 name = "abbrev-1.0.7";
9 packageName = "grunt";
8 bin = false;
10 version = "0.4.5";
9 src = [
11 src = fetchurl {
10 (fetchurl {
12 url = "https://registry.npmjs.org/grunt/-/grunt-0.4.5.tgz";
11 url = "http://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz";
13 sha1 = "56937cd5194324adff6d207631832a9d6ba4e7f0";
12 name = "abbrev-1.0.7.tgz";
14 };
13 sha1 = "5b6035b2ee9d4fb5cf859f08a9be81b208491843";
15 };
14 })
16 "grunt-contrib-copy-1.0.0" = {
15 ];
17 name = "grunt-contrib-copy";
16 buildInputs =
18 packageName = "grunt-contrib-copy";
17 (self.nativeDeps."abbrev" or []);
19 version = "1.0.0";
18 deps = {
20 src = fetchurl {
21 url = "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-1.0.0.tgz";
22 sha1 = "7060c6581e904b8ab0d00f076e0a8f6e3e7c3573";
23 };
24 };
25 "grunt-contrib-concat-0.5.1" = {
26 name = "grunt-contrib-concat";
27 packageName = "grunt-contrib-concat";
28 version = "0.5.1";
29 src = fetchurl {
30 url = "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-0.5.1.tgz";
31 sha1 = "953c6efdfdfd2c107ab9c85077f2d4b24d31cd49";
32 };
33 };
34 "grunt-contrib-jshint-0.12.0" = {
35 name = "grunt-contrib-jshint";
36 packageName = "grunt-contrib-jshint";
37 version = "0.12.0";
38 src = fetchurl {
39 url = "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-0.12.0.tgz";
40 sha1 = "f6b2f06fc715264837a7ab6c69a1ce1a689c2c29";
41 };
42 };
43 "grunt-contrib-less-1.4.0" = {
44 name = "grunt-contrib-less";
45 packageName = "grunt-contrib-less";
46 version = "1.4.0";
47 src = fetchurl {
48 url = "https://registry.npmjs.org/grunt-contrib-less/-/grunt-contrib-less-1.4.0.tgz";
49 sha1 = "17ee79cad21c9720ee07b3a991fab5103b513514";
50 };
51 };
52 "grunt-contrib-watch-0.6.1" = {
53 name = "grunt-contrib-watch";
54 packageName = "grunt-contrib-watch";
55 version = "0.6.1";
56 src = fetchurl {
57 url = "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-0.6.1.tgz";
58 sha1 = "64fdcba25a635f5b4da1b6ce6f90da0aeb6e3f15";
59 };
60 };
61 "crisper-2.0.2" = {
62 name = "crisper";
63 packageName = "crisper";
64 version = "2.0.2";
65 src = fetchurl {
66 url = "https://registry.npmjs.org/crisper/-/crisper-2.0.2.tgz";
67 sha1 = "188a7da3d00dcf0c64eff7f253d23dacffba7197";
68 };
69 };
70 "vulcanize-1.14.8" = {
71 name = "vulcanize";
72 packageName = "vulcanize";
73 version = "1.14.8";
74 src = fetchurl {
75 url = "https://registry.npmjs.org/vulcanize/-/vulcanize-1.14.8.tgz";
76 sha1 = "3cdd6f81d9baf2c5796ddd6d2d289e45975086f7";
77 };
78 };
79 "grunt-crisper-1.0.1" = {
80 name = "grunt-crisper";
81 packageName = "grunt-crisper";
82 version = "1.0.1";
83 src = fetchurl {
84 url = "https://registry.npmjs.org/grunt-crisper/-/grunt-crisper-1.0.1.tgz";
85 sha1 = "e7c091dcaff10deb0091e3035ca7e54008991fe7";
86 };
87 };
88 "grunt-vulcanize-1.0.0" = {
89 name = "grunt-vulcanize";
90 packageName = "grunt-vulcanize";
91 version = "1.0.0";
92 src = fetchurl {
93 url = "https://registry.npmjs.org/grunt-vulcanize/-/grunt-vulcanize-1.0.0.tgz";
94 sha1 = "f4d6cfef274f8216c06f6c290e7dbb3b9e9e3b0f";
95 };
96 };
97 "jshint-2.9.3" = {
98 name = "jshint";
99 packageName = "jshint";
100 version = "2.9.3";
101 src = fetchurl {
102 url = "https://registry.npmjs.org/jshint/-/jshint-2.9.3.tgz";
103 sha1 = "a2e14ff85c2d6bf8c8080e5aa55129ebc6a2d320";
104 };
105 };
106 "async-0.1.22" = {
107 name = "async";
108 packageName = "async";
109 version = "0.1.22";
110 src = fetchurl {
111 url = "https://registry.npmjs.org/async/-/async-0.1.22.tgz";
112 sha1 = "0fc1aaa088a0e3ef0ebe2d8831bab0dcf8845061";
113 };
114 };
115 "coffee-script-1.3.3" = {
116 name = "coffee-script";
117 packageName = "coffee-script";
118 version = "1.3.3";
119 src = fetchurl {
120 url = "https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz";
121 sha1 = "150d6b4cb522894369efed6a2101c20bc7f4a4f4";
122 };
19 };
123 };
20 peerDependencies = [
124 "colors-0.6.2" = {
21 ];
125 name = "colors";
22 passthru.names = [ "abbrev" ];
126 packageName = "colors";
23 };
127 version = "0.6.2";
24 by-spec."amdefine".">=0.0.4" =
128 src = fetchurl {
25 self.by-version."amdefine"."1.0.0";
129 url = "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz";
26 by-version."amdefine"."1.0.0" = lib.makeOverridable self.buildNodePackage {
130 sha1 = "2423fe6678ac0c5dae8852e5d0e5be08c997abcc";
27 name = "amdefine-1.0.0";
131 };
28 bin = false;
132 };
29 src = [
133 "dateformat-1.0.2-1.2.3" = {
30 (fetchurl {
134 name = "dateformat";
31 url = "http://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz";
135 packageName = "dateformat";
32 name = "amdefine-1.0.0.tgz";
136 version = "1.0.2-1.2.3";
33 sha1 = "fd17474700cb5cc9c2b709f0be9d23ce3c198c33";
137 src = fetchurl {
34 })
138 url = "https://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz";
35 ];
139 sha1 = "b0220c02de98617433b72851cf47de3df2cdbee9";
36 buildInputs =
140 };
37 (self.nativeDeps."amdefine" or []);
141 };
38 deps = {
142 "eventemitter2-0.4.14" = {
143 name = "eventemitter2";
144 packageName = "eventemitter2";
145 version = "0.4.14";
146 src = fetchurl {
147 url = "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz";
148 sha1 = "8f61b75cde012b2e9eb284d4545583b5643b61ab";
149 };
150 };
151 "findup-sync-0.1.3" = {
152 name = "findup-sync";
153 packageName = "findup-sync";
154 version = "0.1.3";
155 src = fetchurl {
156 url = "https://registry.npmjs.org/findup-sync/-/findup-sync-0.1.3.tgz";
157 sha1 = "7f3e7a97b82392c653bf06589bd85190e93c3683";
158 };
159 };
160 "glob-3.1.21" = {
161 name = "glob";
162 packageName = "glob";
163 version = "3.1.21";
164 src = fetchurl {
165 url = "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz";
166 sha1 = "d29e0a055dea5138f4d07ed40e8982e83c2066cd";
167 };
168 };
169 "hooker-0.2.3" = {
170 name = "hooker";
171 packageName = "hooker";
172 version = "0.2.3";
173 src = fetchurl {
174 url = "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz";
175 sha1 = "b834f723cc4a242aa65963459df6d984c5d3d959";
176 };
177 };
178 "iconv-lite-0.2.11" = {
179 name = "iconv-lite";
180 packageName = "iconv-lite";
181 version = "0.2.11";
182 src = fetchurl {
183 url = "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz";
184 sha1 = "1ce60a3a57864a292d1321ff4609ca4bb965adc8";
185 };
186 };
187 "minimatch-0.2.14" = {
188 name = "minimatch";
189 packageName = "minimatch";
190 version = "0.2.14";
191 src = fetchurl {
192 url = "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz";
193 sha1 = "c74e780574f63c6f9a090e90efbe6ef53a6a756a";
194 };
195 };
196 "nopt-1.0.10" = {
197 name = "nopt";
198 packageName = "nopt";
199 version = "1.0.10";
200 src = fetchurl {
201 url = "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz";
202 sha1 = "6ddd21bd2a31417b92727dd585f8a6f37608ebee";
203 };
204 };
205 "rimraf-2.2.8" = {
206 name = "rimraf";
207 packageName = "rimraf";
208 version = "2.2.8";
209 src = fetchurl {
210 url = "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz";
211 sha1 = "e439be2aaee327321952730f99a8929e4fc50582";
212 };
213 };
214 "lodash-0.9.2" = {
215 name = "lodash";
216 packageName = "lodash";
217 version = "0.9.2";
218 src = fetchurl {
219 url = "https://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz";
220 sha1 = "8f3499c5245d346d682e5b0d3b40767e09f1a92c";
221 };
222 };
223 "underscore.string-2.2.1" = {
224 name = "underscore.string";
225 packageName = "underscore.string";
226 version = "2.2.1";
227 src = fetchurl {
228 url = "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz";
229 sha1 = "d7c0fa2af5d5a1a67f4253daee98132e733f0f19";
230 };
231 };
232 "which-1.0.9" = {
233 name = "which";
234 packageName = "which";
235 version = "1.0.9";
236 src = fetchurl {
237 url = "https://registry.npmjs.org/which/-/which-1.0.9.tgz";
238 sha1 = "460c1da0f810103d0321a9b633af9e575e64486f";
239 };
240 };
241 "js-yaml-2.0.5" = {
242 name = "js-yaml";
243 packageName = "js-yaml";
244 version = "2.0.5";
245 src = fetchurl {
246 url = "https://registry.npmjs.org/js-yaml/-/js-yaml-2.0.5.tgz";
247 sha1 = "a25ae6509999e97df278c6719da11bd0687743a8";
248 };
39 };
249 };
40 peerDependencies = [
250 "exit-0.1.2" = {
41 ];
251 name = "exit";
42 passthru.names = [ "amdefine" ];
252 packageName = "exit";
43 };
253 version = "0.1.2";
44 by-spec."ansi-regex"."^0.2.0" =
254 src = fetchurl {
45 self.by-version."ansi-regex"."0.2.1";
255 url = "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz";
46 by-version."ansi-regex"."0.2.1" = lib.makeOverridable self.buildNodePackage {
256 sha1 = "0632638f8d877cc82107d30a0fff1a17cba1cd0c";
47 name = "ansi-regex-0.2.1";
257 };
48 bin = false;
258 };
49 src = [
259 "getobject-0.1.0" = {
50 (fetchurl {
260 name = "getobject";
51 url = "http://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz";
261 packageName = "getobject";
52 name = "ansi-regex-0.2.1.tgz";
262 version = "0.1.0";
53 sha1 = "0d8e946967a3d8143f93e24e298525fc1b2235f9";
263 src = fetchurl {
54 })
264 url = "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz";
55 ];
265 sha1 = "047a449789fa160d018f5486ed91320b6ec7885c";
56 buildInputs =
266 };
57 (self.nativeDeps."ansi-regex" or []);
267 };
58 deps = {
268 "grunt-legacy-util-0.2.0" = {
269 name = "grunt-legacy-util";
270 packageName = "grunt-legacy-util";
271 version = "0.2.0";
272 src = fetchurl {
273 url = "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-0.2.0.tgz";
274 sha1 = "93324884dbf7e37a9ff7c026dff451d94a9e554b";
275 };
276 };
277 "grunt-legacy-log-0.1.3" = {
278 name = "grunt-legacy-log";
279 packageName = "grunt-legacy-log";
280 version = "0.1.3";
281 src = fetchurl {
282 url = "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-0.1.3.tgz";
283 sha1 = "ec29426e803021af59029f87d2f9cd7335a05531";
284 };
285 };
286 "glob-3.2.11" = {
287 name = "glob";
288 packageName = "glob";
289 version = "3.2.11";
290 src = fetchurl {
291 url = "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz";
292 sha1 = "4a973f635b9190f715d10987d5c00fd2815ebe3d";
293 };
294 };
295 "lodash-2.4.2" = {
296 name = "lodash";
297 packageName = "lodash";
298 version = "2.4.2";
299 src = fetchurl {
300 url = "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz";
301 sha1 = "fadd834b9683073da179b3eae6d9c0d15053f73e";
302 };
303 };
304 "inherits-2.0.1" = {
305 name = "inherits";
306 packageName = "inherits";
307 version = "2.0.1";
308 src = fetchurl {
309 url = "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz";
310 sha1 = "b17d08d326b4423e568eff719f91b0b1cbdf69f1";
311 };
312 };
313 "minimatch-0.3.0" = {
314 name = "minimatch";
315 packageName = "minimatch";
316 version = "0.3.0";
317 src = fetchurl {
318 url = "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz";
319 sha1 = "275d8edaac4f1bb3326472089e7949c8394699dd";
320 };
321 };
322 "lru-cache-2.7.3" = {
323 name = "lru-cache";
324 packageName = "lru-cache";
325 version = "2.7.3";
326 src = fetchurl {
327 url = "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz";
328 sha1 = "6d4524e8b955f95d4f5b58851ce21dd72fb4e952";
329 };
330 };
331 "sigmund-1.0.1" = {
332 name = "sigmund";
333 packageName = "sigmund";
334 version = "1.0.1";
335 src = fetchurl {
336 url = "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz";
337 sha1 = "3ff21f198cad2175f9f3b781853fd94d0d19b590";
338 };
339 };
340 "graceful-fs-1.2.3" = {
341 name = "graceful-fs";
342 packageName = "graceful-fs";
343 version = "1.2.3";
344 src = fetchurl {
345 url = "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz";
346 sha1 = "15a4806a57547cb2d2dbf27f42e89a8c3451b364";
347 };
348 };
349 "inherits-1.0.2" = {
350 name = "inherits";
351 packageName = "inherits";
352 version = "1.0.2";
353 src = fetchurl {
354 url = "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz";
355 sha1 = "ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b";
356 };
357 };
358 "abbrev-1.0.9" = {
359 name = "abbrev";
360 packageName = "abbrev";
361 version = "1.0.9";
362 src = fetchurl {
363 url = "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz";
364 sha1 = "91b4792588a7738c25f35dd6f63752a2f8776135";
365 };
366 };
367 "argparse-0.1.16" = {
368 name = "argparse";
369 packageName = "argparse";
370 version = "0.1.16";
371 src = fetchurl {
372 url = "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz";
373 sha1 = "cfd01e0fbba3d6caed049fbd758d40f65196f57c";
374 };
59 };
375 };
60 peerDependencies = [
376 "esprima-1.0.4" = {
61 ];
377 name = "esprima";
62 passthru.names = [ "ansi-regex" ];
378 packageName = "esprima";
63 };
379 version = "1.0.4";
64 by-spec."ansi-regex"."^0.2.1" =
380 src = fetchurl {
65 self.by-version."ansi-regex"."0.2.1";
381 url = "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz";
66 by-spec."ansi-regex"."^2.0.0" =
382 sha1 = "9f557e08fc3b4d26ece9dd34f8fbf476b62585ad";
67 self.by-version."ansi-regex"."2.0.0";
383 };
68 by-version."ansi-regex"."2.0.0" = lib.makeOverridable self.buildNodePackage {
384 };
69 name = "ansi-regex-2.0.0";
385 "underscore-1.7.0" = {
70 bin = false;
386 name = "underscore";
71 src = [
387 packageName = "underscore";
72 (fetchurl {
388 version = "1.7.0";
73 url = "http://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz";
389 src = fetchurl {
74 name = "ansi-regex-2.0.0.tgz";
390 url = "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz";
391 sha1 = "6bbaf0877500d36be34ecaa584e0db9fef035209";
392 };
393 };
394 "underscore.string-2.4.0" = {
395 name = "underscore.string";
396 packageName = "underscore.string";
397 version = "2.4.0";
398 src = fetchurl {
399 url = "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz";
400 sha1 = "8cdd8fbac4e2d2ea1e7e2e8097c42f442280f85b";
401 };
402 };
403 "grunt-legacy-log-utils-0.1.1" = {
404 name = "grunt-legacy-log-utils";
405 packageName = "grunt-legacy-log-utils";
406 version = "0.1.1";
407 src = fetchurl {
408 url = "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-0.1.1.tgz";
409 sha1 = "c0706b9dd9064e116f36f23fe4e6b048672c0f7e";
410 };
411 };
412 "underscore.string-2.3.3" = {
413 name = "underscore.string";
414 packageName = "underscore.string";
415 version = "2.3.3";
416 src = fetchurl {
417 url = "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz";
418 sha1 = "71c08bf6b428b1133f37e78fa3a21c82f7329b0d";
419 };
420 };
421 "chalk-1.1.3" = {
422 name = "chalk";
423 packageName = "chalk";
424 version = "1.1.3";
425 src = fetchurl {
426 url = "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz";
427 sha1 = "a8115c55e4a702fe4d150abd3872822a7e09fc98";
428 };
429 };
430 "file-sync-cmp-0.1.1" = {
431 name = "file-sync-cmp";
432 packageName = "file-sync-cmp";
433 version = "0.1.1";
434 src = fetchurl {
435 url = "https://registry.npmjs.org/file-sync-cmp/-/file-sync-cmp-0.1.1.tgz";
436 sha1 = "a5e7a8ffbfa493b43b923bbd4ca89a53b63b612b";
437 };
438 };
439 "ansi-styles-2.2.1" = {
440 name = "ansi-styles";
441 packageName = "ansi-styles";
442 version = "2.2.1";
443 src = fetchurl {
444 url = "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz";
445 sha1 = "b432dd3358b634cf75e1e4664368240533c1ddbe";
446 };
447 };
448 "escape-string-regexp-1.0.5" = {
449 name = "escape-string-regexp";
450 packageName = "escape-string-regexp";
451 version = "1.0.5";
452 src = fetchurl {
453 url = "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz";
454 sha1 = "1b61c0562190a8dff6ae3bb2cf0200ca130b86d4";
455 };
456 };
457 "has-ansi-2.0.0" = {
458 name = "has-ansi";
459 packageName = "has-ansi";
460 version = "2.0.0";
461 src = fetchurl {
462 url = "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz";
463 sha1 = "34f5049ce1ecdf2b0649af3ef24e45ed35416d91";
464 };
465 };
466 "strip-ansi-3.0.1" = {
467 name = "strip-ansi";
468 packageName = "strip-ansi";
469 version = "3.0.1";
470 src = fetchurl {
471 url = "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz";
472 sha1 = "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf";
473 };
474 };
475 "supports-color-2.0.0" = {
476 name = "supports-color";
477 packageName = "supports-color";
478 version = "2.0.0";
479 src = fetchurl {
480 url = "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz";
481 sha1 = "535d045ce6b6363fa40117084629995e9df324c7";
482 };
483 };
484 "ansi-regex-2.0.0" = {
485 name = "ansi-regex";
486 packageName = "ansi-regex";
487 version = "2.0.0";
488 src = fetchurl {
489 url = "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz";
75 sha1 = "c5061b6e0ef8a81775e50f5d66151bf6bf371107";
490 sha1 = "c5061b6e0ef8a81775e50f5d66151bf6bf371107";
76 })
491 };
77 ];
78 buildInputs =
79 (self.nativeDeps."ansi-regex" or []);
80 deps = {
81 };
492 };
82 peerDependencies = [
493 "chalk-0.5.1" = {
83 ];
494 name = "chalk";
84 passthru.names = [ "ansi-regex" ];
495 packageName = "chalk";
85 };
496 version = "0.5.1";
86 by-spec."ansi-styles"."^1.1.0" =
497 src = fetchurl {
87 self.by-version."ansi-styles"."1.1.0";
498 url = "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz";
88 by-version."ansi-styles"."1.1.0" = lib.makeOverridable self.buildNodePackage {
499 sha1 = "663b3a648b68b55d04690d49167aa837858f2174";
89 name = "ansi-styles-1.1.0";
500 };
90 bin = false;
91 src = [
92 (fetchurl {
93 url = "http://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz";
94 name = "ansi-styles-1.1.0.tgz";
95 sha1 = "eaecbf66cd706882760b2f4691582b8f55d7a7de";
96 })
97 ];
98 buildInputs =
99 (self.nativeDeps."ansi-styles" or []);
100 deps = {
101 };
501 };
102 peerDependencies = [
502 "source-map-0.3.0" = {
103 ];
503 name = "source-map";
104 passthru.names = [ "ansi-styles" ];
504 packageName = "source-map";
105 };
505 version = "0.3.0";
106 by-spec."ansi-styles"."^2.1.0" =
506 src = fetchurl {
107 self.by-version."ansi-styles"."2.1.0";
507 url = "https://registry.npmjs.org/source-map/-/source-map-0.3.0.tgz";
108 by-version."ansi-styles"."2.1.0" = lib.makeOverridable self.buildNodePackage {
508 sha1 = "8586fb9a5a005e5b501e21cd18b6f21b457ad1f9";
109 name = "ansi-styles-2.1.0";
509 };
110 bin = false;
510 };
111 src = [
511 "ansi-styles-1.1.0" = {
112 (fetchurl {
512 name = "ansi-styles";
113 url = "http://registry.npmjs.org/ansi-styles/-/ansi-styles-2.1.0.tgz";
513 packageName = "ansi-styles";
114 name = "ansi-styles-2.1.0.tgz";
514 version = "1.1.0";
115 sha1 = "990f747146927b559a932bf92959163d60c0d0e2";
515 src = fetchurl {
116 })
516 url = "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz";
117 ];
517 sha1 = "eaecbf66cd706882760b2f4691582b8f55d7a7de";
118 buildInputs =
518 };
119 (self.nativeDeps."ansi-styles" or []);
519 };
120 deps = {
520 "has-ansi-0.1.0" = {
521 name = "has-ansi";
522 packageName = "has-ansi";
523 version = "0.1.0";
524 src = fetchurl {
525 url = "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz";
526 sha1 = "84f265aae8c0e6a88a12d7022894b7568894c62e";
527 };
528 };
529 "strip-ansi-0.3.0" = {
530 name = "strip-ansi";
531 packageName = "strip-ansi";
532 version = "0.3.0";
533 src = fetchurl {
534 url = "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz";
535 sha1 = "25f48ea22ca79187f3174a4db8759347bb126220";
536 };
537 };
538 "supports-color-0.2.0" = {
539 name = "supports-color";
540 packageName = "supports-color";
541 version = "0.2.0";
542 src = fetchurl {
543 url = "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz";
544 sha1 = "d92de2694eb3f67323973d7ae3d8b55b4c22190a";
545 };
546 };
547 "ansi-regex-0.2.1" = {
548 name = "ansi-regex";
549 packageName = "ansi-regex";
550 version = "0.2.1";
551 src = fetchurl {
552 url = "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz";
553 sha1 = "0d8e946967a3d8143f93e24e298525fc1b2235f9";
554 };
555 };
556 "amdefine-1.0.0" = {
557 name = "amdefine";
558 packageName = "amdefine";
559 version = "1.0.0";
560 src = fetchurl {
561 url = "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz";
562 sha1 = "fd17474700cb5cc9c2b709f0be9d23ce3c198c33";
563 };
564 };
565 "async-2.0.1" = {
566 name = "async";
567 packageName = "async";
568 version = "2.0.1";
569 src = fetchurl {
570 url = "https://registry.npmjs.org/async/-/async-2.0.1.tgz";
571 sha1 = "b709cc0280a9c36f09f4536be823c838a9049e25";
572 };
573 };
574 "less-2.7.1" = {
575 name = "less";
576 packageName = "less";
577 version = "2.7.1";
578 src = fetchurl {
579 url = "https://registry.npmjs.org/less/-/less-2.7.1.tgz";
580 sha1 = "6cbfea22b3b830304e9a5fb371d54fa480c9d7cf";
581 };
582 };
583 "lodash-4.15.0" = {
584 name = "lodash";
585 packageName = "lodash";
586 version = "4.15.0";
587 src = fetchurl {
588 url = "https://registry.npmjs.org/lodash/-/lodash-4.15.0.tgz";
589 sha1 = "3162391d8f0140aa22cf8f6b3c34d6b7f63d3aa9";
590 };
591 };
592 "errno-0.1.4" = {
593 name = "errno";
594 packageName = "errno";
595 version = "0.1.4";
596 src = fetchurl {
597 url = "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz";
598 sha1 = "b896e23a9e5e8ba33871fc996abd3635fc9a1c7d";
599 };
600 };
601 "graceful-fs-4.1.6" = {
602 name = "graceful-fs";
603 packageName = "graceful-fs";
604 version = "4.1.6";
605 src = fetchurl {
606 url = "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.6.tgz";
607 sha1 = "514c38772b31bee2e08bedc21a0aeb3abf54c19e";
608 };
609 };
610 "image-size-0.5.0" = {
611 name = "image-size";
612 packageName = "image-size";
613 version = "0.5.0";
614 src = fetchurl {
615 url = "https://registry.npmjs.org/image-size/-/image-size-0.5.0.tgz";
616 sha1 = "be7aed1c37b5ac3d9ba1d66a24b4c47ff8397651";
617 };
618 };
619 "mime-1.3.4" = {
620 name = "mime";
621 packageName = "mime";
622 version = "1.3.4";
623 src = fetchurl {
624 url = "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz";
625 sha1 = "115f9e3b6b3daf2959983cb38f149a2d40eb5d53";
626 };
121 };
627 };
122 peerDependencies = [
628 "mkdirp-0.5.1" = {
123 ];
629 name = "mkdirp";
124 passthru.names = [ "ansi-styles" ];
630 packageName = "mkdirp";
125 };
631 version = "0.5.1";
126 by-spec."argparse"."~ 0.1.11" =
632 src = fetchurl {
127 self.by-version."argparse"."0.1.16";
633 url = "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz";
128 by-version."argparse"."0.1.16" = lib.makeOverridable self.buildNodePackage {
634 sha1 = "30057438eac6cf7f8c4767f38648d6697d75c903";
129 name = "argparse-0.1.16";
635 };
130 bin = false;
636 };
131 src = [
637 "promise-7.1.1" = {
132 (fetchurl {
638 name = "promise";
133 url = "http://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz";
639 packageName = "promise";
134 name = "argparse-0.1.16.tgz";
640 version = "7.1.1";
135 sha1 = "cfd01e0fbba3d6caed049fbd758d40f65196f57c";
641 src = fetchurl {
136 })
642 url = "https://registry.npmjs.org/promise/-/promise-7.1.1.tgz";
137 ];
643 sha1 = "489654c692616b8aa55b0724fa809bb7db49c5bf";
138 buildInputs =
644 };
139 (self.nativeDeps."argparse" or []);
645 };
140 deps = {
646 "source-map-0.5.6" = {
141 "underscore-1.7.0" = self.by-version."underscore"."1.7.0";
647 name = "source-map";
142 "underscore.string-2.4.0" = self.by-version."underscore.string"."2.4.0";
648 packageName = "source-map";
649 version = "0.5.6";
650 src = fetchurl {
651 url = "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz";
652 sha1 = "75ce38f52bf0733c5a7f0c118d81334a2bb5f412";
653 };
654 };
655 "prr-0.0.0" = {
656 name = "prr";
657 packageName = "prr";
658 version = "0.0.0";
659 src = fetchurl {
660 url = "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz";
661 sha1 = "1a84b85908325501411853d0081ee3fa86e2926a";
662 };
663 };
664 "minimist-0.0.8" = {
665 name = "minimist";
666 packageName = "minimist";
667 version = "0.0.8";
668 src = fetchurl {
669 url = "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz";
670 sha1 = "857fcabfc3397d2625b8228262e86aa7a011b05d";
671 };
672 };
673 "asap-2.0.4" = {
674 name = "asap";
675 packageName = "asap";
676 version = "2.0.4";
677 src = fetchurl {
678 url = "https://registry.npmjs.org/asap/-/asap-2.0.4.tgz";
679 sha1 = "b391bf7f6bfbc65706022fec8f49c4b07fecf589";
680 };
681 };
682 "gaze-0.5.2" = {
683 name = "gaze";
684 packageName = "gaze";
685 version = "0.5.2";
686 src = fetchurl {
687 url = "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz";
688 sha1 = "40b709537d24d1d45767db5a908689dfe69ac44f";
689 };
690 };
691 "tiny-lr-fork-0.0.5" = {
692 name = "tiny-lr-fork";
693 packageName = "tiny-lr-fork";
694 version = "0.0.5";
695 src = fetchurl {
696 url = "https://registry.npmjs.org/tiny-lr-fork/-/tiny-lr-fork-0.0.5.tgz";
697 sha1 = "1e99e1e2a8469b736ab97d97eefa98c71f76ed0a";
698 };
699 };
700 "async-0.2.10" = {
701 name = "async";
702 packageName = "async";
703 version = "0.2.10";
704 src = fetchurl {
705 url = "https://registry.npmjs.org/async/-/async-0.2.10.tgz";
706 sha1 = "b6bbe0b0674b9d719708ca38de8c237cb526c3d1";
707 };
708 };
709 "globule-0.1.0" = {
710 name = "globule";
711 packageName = "globule";
712 version = "0.1.0";
713 src = fetchurl {
714 url = "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz";
715 sha1 = "d9c8edde1da79d125a151b79533b978676346ae5";
716 };
717 };
718 "lodash-1.0.2" = {
719 name = "lodash";
720 packageName = "lodash";
721 version = "1.0.2";
722 src = fetchurl {
723 url = "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz";
724 sha1 = "8f57560c83b59fc270bd3d561b690043430e2551";
725 };
726 };
727 "qs-0.5.6" = {
728 name = "qs";
729 packageName = "qs";
730 version = "0.5.6";
731 src = fetchurl {
732 url = "https://registry.npmjs.org/qs/-/qs-0.5.6.tgz";
733 sha1 = "31b1ad058567651c526921506b9a8793911a0384";
734 };
735 };
736 "faye-websocket-0.4.4" = {
737 name = "faye-websocket";
738 packageName = "faye-websocket";
739 version = "0.4.4";
740 src = fetchurl {
741 url = "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.4.4.tgz";
742 sha1 = "c14c5b3bf14d7417ffbfd990c0a7495cd9f337bc";
743 };
744 };
745 "noptify-0.0.3" = {
746 name = "noptify";
747 packageName = "noptify";
748 version = "0.0.3";
749 src = fetchurl {
750 url = "https://registry.npmjs.org/noptify/-/noptify-0.0.3.tgz";
751 sha1 = "58f654a73d9753df0c51d9686dc92104a67f4bbb";
752 };
143 };
753 };
144 peerDependencies = [
754 "debug-0.7.4" = {
145 ];
755 name = "debug";
146 passthru.names = [ "argparse" ];
756 packageName = "debug";
147 };
757 version = "0.7.4";
148 by-spec."asap"."~1.0.0" =
758 src = fetchurl {
149 self.by-version."asap"."1.0.0";
759 url = "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz";
150 by-version."asap"."1.0.0" = lib.makeOverridable self.buildNodePackage {
760 sha1 = "06e1ea8082c2cb14e39806e22e2f6f757f92af39";
151 name = "asap-1.0.0";
761 };
152 bin = false;
762 };
153 src = [
763 "nopt-2.0.0" = {
154 (fetchurl {
764 name = "nopt";
155 url = "http://registry.npmjs.org/asap/-/asap-1.0.0.tgz";
765 packageName = "nopt";
156 name = "asap-1.0.0.tgz";
766 version = "2.0.0";
157 sha1 = "b2a45da5fdfa20b0496fc3768cc27c12fa916a7d";
767 src = fetchurl {
158 })
768 url = "https://registry.npmjs.org/nopt/-/nopt-2.0.0.tgz";
159 ];
769 sha1 = "ca7416f20a5e3f9c3b86180f96295fa3d0b52e0d";
160 buildInputs =
770 };
161 (self.nativeDeps."asap" or []);
771 };
162 deps = {
772 "command-line-args-2.1.6" = {
773 name = "command-line-args";
774 packageName = "command-line-args";
775 version = "2.1.6";
776 src = fetchurl {
777 url = "https://registry.npmjs.org/command-line-args/-/command-line-args-2.1.6.tgz";
778 sha1 = "f197d6eaff34c9085577484b2864375b294f5697";
779 };
780 };
781 "dom5-1.3.3" = {
782 name = "dom5";
783 packageName = "dom5";
784 version = "1.3.3";
785 src = fetchurl {
786 url = "https://registry.npmjs.org/dom5/-/dom5-1.3.3.tgz";
787 sha1 = "07e514522c245c7aa8512aa3f9118e8bcab9f909";
788 };
789 };
790 "array-back-1.0.3" = {
791 name = "array-back";
792 packageName = "array-back";
793 version = "1.0.3";
794 src = fetchurl {
795 url = "https://registry.npmjs.org/array-back/-/array-back-1.0.3.tgz";
796 sha1 = "f1128a5cf1b91c80bed4a218f8c5b635c8b10663";
797 };
798 };
799 "command-line-usage-2.0.5" = {
800 name = "command-line-usage";
801 packageName = "command-line-usage";
802 version = "2.0.5";
803 src = fetchurl {
804 url = "https://registry.npmjs.org/command-line-usage/-/command-line-usage-2.0.5.tgz";
805 sha1 = "f80c35ca5e8624841923ea3be3b9bfbf4f7be27b";
806 };
807 };
808 "core-js-2.4.1" = {
809 name = "core-js";
810 packageName = "core-js";
811 version = "2.4.1";
812 src = fetchurl {
813 url = "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz";
814 sha1 = "4de911e667b0eae9124e34254b53aea6fc618d3e";
815 };
816 };
817 "feature-detect-es6-1.3.1" = {
818 name = "feature-detect-es6";
819 packageName = "feature-detect-es6";
820 version = "1.3.1";
821 src = fetchurl {
822 url = "https://registry.npmjs.org/feature-detect-es6/-/feature-detect-es6-1.3.1.tgz";
823 sha1 = "f888736af9cb0c91f55663bfa4762eb96ee7047f";
824 };
825 };
826 "find-replace-1.0.2" = {
827 name = "find-replace";
828 packageName = "find-replace";
829 version = "1.0.2";
830 src = fetchurl {
831 url = "https://registry.npmjs.org/find-replace/-/find-replace-1.0.2.tgz";
832 sha1 = "a2d6ce740d15f0d92b1b26763e2ce9c0e361fd98";
833 };
834 };
835 "typical-2.5.0" = {
836 name = "typical";
837 packageName = "typical";
838 version = "2.5.0";
839 src = fetchurl {
840 url = "https://registry.npmjs.org/typical/-/typical-2.5.0.tgz";
841 sha1 = "81244918aa28180c9e602aa457173404be0604f1";
842 };
843 };
844 "ansi-escape-sequences-2.2.2" = {
845 name = "ansi-escape-sequences";
846 packageName = "ansi-escape-sequences";
847 version = "2.2.2";
848 src = fetchurl {
849 url = "https://registry.npmjs.org/ansi-escape-sequences/-/ansi-escape-sequences-2.2.2.tgz";
850 sha1 = "174c78d6f8b7de75f8957ae81c7f72210c701635";
851 };
852 };
853 "column-layout-2.1.4" = {
854 name = "column-layout";
855 packageName = "column-layout";
856 version = "2.1.4";
857 src = fetchurl {
858 url = "https://registry.npmjs.org/column-layout/-/column-layout-2.1.4.tgz";
859 sha1 = "ed2857092ccf8338026fe538379d9672d70b3641";
860 };
861 };
862 "wordwrapjs-1.2.1" = {
863 name = "wordwrapjs";
864 packageName = "wordwrapjs";
865 version = "1.2.1";
866 src = fetchurl {
867 url = "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-1.2.1.tgz";
868 sha1 = "754a5ea0664cfbff50540dc32d67bda3289fc34b";
869 };
870 };
871 "collect-all-0.2.1" = {
872 name = "collect-all";
873 packageName = "collect-all";
874 version = "0.2.1";
875 src = fetchurl {
876 url = "https://registry.npmjs.org/collect-all/-/collect-all-0.2.1.tgz";
877 sha1 = "7225fb4585c22d4ffac886f0abaf5abc563a1a6a";
878 };
163 };
879 };
164 peerDependencies = [
880 "stream-connect-1.0.2" = {
165 ];
881 name = "stream-connect";
166 passthru.names = [ "asap" ];
882 packageName = "stream-connect";
167 };
883 version = "1.0.2";
168 by-spec."asn1".">=0.2.3 <0.3.0" =
884 src = fetchurl {
169 self.by-version."asn1"."0.2.3";
885 url = "https://registry.npmjs.org/stream-connect/-/stream-connect-1.0.2.tgz";
170 by-version."asn1"."0.2.3" = lib.makeOverridable self.buildNodePackage {
886 sha1 = "18bc81f2edb35b8b5d9a8009200a985314428a97";
171 name = "asn1-0.2.3";
887 };
172 bin = false;
888 };
173 src = [
889 "stream-via-0.1.1" = {
174 (fetchurl {
890 name = "stream-via";
175 url = "http://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz";
891 packageName = "stream-via";
176 name = "asn1-0.2.3.tgz";
892 version = "0.1.1";
177 sha1 = "dac8787713c9966849fc8180777ebe9c1ddf3b86";
893 src = fetchurl {
178 })
894 url = "https://registry.npmjs.org/stream-via/-/stream-via-0.1.1.tgz";
179 ];
895 sha1 = "0cee5df9c959fb1d3f4eda4819f289d5f9205afc";
180 buildInputs =
896 };
181 (self.nativeDeps."asn1" or []);
897 };
182 deps = {
898 "collect-json-1.0.8" = {
899 name = "collect-json";
900 packageName = "collect-json";
901 version = "1.0.8";
902 src = fetchurl {
903 url = "https://registry.npmjs.org/collect-json/-/collect-json-1.0.8.tgz";
904 sha1 = "aa2fa52b4d1d9444ce690f07a1e3617ab74bb827";
905 };
906 };
907 "deep-extend-0.4.1" = {
908 name = "deep-extend";
909 packageName = "deep-extend";
910 version = "0.4.1";
911 src = fetchurl {
912 url = "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.1.tgz";
913 sha1 = "efe4113d08085f4e6f9687759810f807469e2253";
914 };
915 };
916 "object-tools-2.0.6" = {
917 name = "object-tools";
918 packageName = "object-tools";
919 version = "2.0.6";
920 src = fetchurl {
921 url = "https://registry.npmjs.org/object-tools/-/object-tools-2.0.6.tgz";
922 sha1 = "f3fe1c350cda4a6f5d99d9646dc4892a02476ddd";
923 };
924 };
925 "collect-all-1.0.2" = {
926 name = "collect-all";
927 packageName = "collect-all";
928 version = "1.0.2";
929 src = fetchurl {
930 url = "https://registry.npmjs.org/collect-all/-/collect-all-1.0.2.tgz";
931 sha1 = "39450f1e7aa6086570a006bce93ccf1218a77ea1";
932 };
933 };
934 "stream-via-1.0.3" = {
935 name = "stream-via";
936 packageName = "stream-via";
937 version = "1.0.3";
938 src = fetchurl {
939 url = "https://registry.npmjs.org/stream-via/-/stream-via-1.0.3.tgz";
940 sha1 = "cebd32a5a59d74b3b68e3404942e867184ad4ac9";
941 };
183 };
942 };
184 peerDependencies = [
943 "object-get-2.1.0" = {
185 ];
944 name = "object-get";
186 passthru.names = [ "asn1" ];
945 packageName = "object-get";
187 };
946 version = "2.1.0";
188 by-spec."assert-plus".">=0.2.0 <0.3.0" =
947 src = fetchurl {
189 self.by-version."assert-plus"."0.2.0";
948 url = "https://registry.npmjs.org/object-get/-/object-get-2.1.0.tgz";
190 by-version."assert-plus"."0.2.0" = lib.makeOverridable self.buildNodePackage {
949 sha1 = "722bbdb60039efa47cad3c6dc2ce51a85c02c5ae";
191 name = "assert-plus-0.2.0";
950 };
192 bin = false;
951 };
193 src = [
952 "test-value-1.1.0" = {
194 (fetchurl {
953 name = "test-value";
195 url = "http://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz";
954 packageName = "test-value";
196 name = "assert-plus-0.2.0.tgz";
955 version = "1.1.0";
197 sha1 = "d74e1b87e7affc0db8aadb7021f3fe48101ab234";
956 src = fetchurl {
198 })
957 url = "https://registry.npmjs.org/test-value/-/test-value-1.1.0.tgz";
199 ];
958 sha1 = "a09136f72ec043d27c893707c2b159bfad7de93f";
200 buildInputs =
959 };
201 (self.nativeDeps."assert-plus" or []);
960 };
202 deps = {
961 "test-value-2.0.0" = {
962 name = "test-value";
963 packageName = "test-value";
964 version = "2.0.0";
965 src = fetchurl {
966 url = "https://registry.npmjs.org/test-value/-/test-value-2.0.0.tgz";
967 sha1 = "0d65c45ee0b48a757c4507a5e98ec2680a9db137";
968 };
969 };
970 "@types/clone-0.1.29" = {
971 name = "@types/clone";
972 packageName = "@types/clone";
973 version = "0.1.29";
974 src = fetchurl {
975 url = "https://registry.npmjs.org/@types/clone/-/clone-0.1.29.tgz";
976 sha1 = "65a0be88189ffddcd373e450aa6b68c9c83218b7";
977 };
978 };
979 "@types/node-4.0.30" = {
980 name = "@types/node";
981 packageName = "@types/node";
982 version = "4.0.30";
983 src = fetchurl {
984 url = "https://registry.npmjs.org/@types/node/-/node-4.0.30.tgz";
985 sha1 = "553f490ed3030311620f88003e7abfc0edcb301e";
986 };
987 };
988 "@types/parse5-0.0.28" = {
989 name = "@types/parse5";
990 packageName = "@types/parse5";
991 version = "0.0.28";
992 src = fetchurl {
993 url = "https://registry.npmjs.org/@types/parse5/-/parse5-0.0.28.tgz";
994 sha1 = "2a38cb7145bb157688d4ad2c46944c6dffae3cc6";
995 };
996 };
997 "clone-1.0.2" = {
998 name = "clone";
999 packageName = "clone";
1000 version = "1.0.2";
1001 src = fetchurl {
1002 url = "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz";
1003 sha1 = "260b7a99ebb1edfe247538175f783243cb19d149";
1004 };
203 };
1005 };
204 peerDependencies = [
1006 "parse5-1.5.1" = {
205 ];
1007 name = "parse5";
206 passthru.names = [ "assert-plus" ];
1008 packageName = "parse5";
207 };
1009 version = "1.5.1";
208 by-spec."assert-plus"."^0.1.5" =
1010 src = fetchurl {
209 self.by-version."assert-plus"."0.1.5";
1011 url = "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz";
210 by-version."assert-plus"."0.1.5" = lib.makeOverridable self.buildNodePackage {
1012 sha1 = "9b7f3b0de32be78dc2401b17573ccaf0f6f59d94";
211 name = "assert-plus-0.1.5";
1013 };
212 bin = false;
1014 };
213 src = [
1015 "@types/node-6.0.37" = {
214 (fetchurl {
1016 name = "@types/node";
215 url = "http://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz";
1017 packageName = "@types/node";
216 name = "assert-plus-0.1.5.tgz";
1018 version = "6.0.37";
217 sha1 = "ee74009413002d84cec7219c6ac811812e723160";
1019 src = fetchurl {
218 })
1020 url = "https://registry.npmjs.org/@types/node/-/node-6.0.37.tgz";
219 ];
1021 sha1 = "a1e081f2ec60074113d3a1fbf11f35d304f30e39";
220 buildInputs =
1022 };
221 (self.nativeDeps."assert-plus" or []);
1023 };
222 deps = {
1024 "es6-promise-2.3.0" = {
1025 name = "es6-promise";
1026 packageName = "es6-promise";
1027 version = "2.3.0";
1028 src = fetchurl {
1029 url = "https://registry.npmjs.org/es6-promise/-/es6-promise-2.3.0.tgz";
1030 sha1 = "96edb9f2fdb01995822b263dd8aadab6748181bc";
1031 };
1032 };
1033 "hydrolysis-1.24.1" = {
1034 name = "hydrolysis";
1035 packageName = "hydrolysis";
1036 version = "1.24.1";
1037 src = fetchurl {
1038 url = "https://registry.npmjs.org/hydrolysis/-/hydrolysis-1.24.1.tgz";
1039 sha1 = "0f94f055d1065ac0d81ff40b762d143fef07eff4";
1040 };
1041 };
1042 "nopt-3.0.6" = {
1043 name = "nopt";
1044 packageName = "nopt";
1045 version = "3.0.6";
1046 src = fetchurl {
1047 url = "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz";
1048 sha1 = "c6465dbf08abcd4db359317f79ac68a646b28ff9";
1049 };
1050 };
1051 "path-posix-1.0.0" = {
1052 name = "path-posix";
1053 packageName = "path-posix";
1054 version = "1.0.0";
1055 src = fetchurl {
1056 url = "https://registry.npmjs.org/path-posix/-/path-posix-1.0.0.tgz";
1057 sha1 = "06b26113f56beab042545a23bfa88003ccac260f";
1058 };
1059 };
1060 "update-notifier-0.6.3" = {
1061 name = "update-notifier";
1062 packageName = "update-notifier";
1063 version = "0.6.3";
1064 src = fetchurl {
1065 url = "https://registry.npmjs.org/update-notifier/-/update-notifier-0.6.3.tgz";
1066 sha1 = "776dec8daa13e962a341e8a1d98354306b67ae08";
1067 };
1068 };
1069 "babel-polyfill-6.13.0" = {
1070 name = "babel-polyfill";
1071 packageName = "babel-polyfill";
1072 version = "6.13.0";
1073 src = fetchurl {
1074 url = "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.13.0.tgz";
1075 sha1 = "5978215c25d49a697eb78afc54e63c9d3a73d5ec";
1076 };
1077 };
1078 "doctrine-0.7.2" = {
1079 name = "doctrine";
1080 packageName = "doctrine";
1081 version = "0.7.2";
1082 src = fetchurl {
1083 url = "https://registry.npmjs.org/doctrine/-/doctrine-0.7.2.tgz";
1084 sha1 = "7cb860359ba3be90e040b26b729ce4bfa654c523";
1085 };
1086 };
1087 "escodegen-1.8.1" = {
1088 name = "escodegen";
1089 packageName = "escodegen";
1090 version = "1.8.1";
1091 src = fetchurl {
1092 url = "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz";
1093 sha1 = "5a5b53af4693110bebb0867aa3430dd3b70a1018";
1094 };
1095 };
1096 "espree-3.1.7" = {
1097 name = "espree";
1098 packageName = "espree";
1099 version = "3.1.7";
1100 src = fetchurl {
1101 url = "https://registry.npmjs.org/espree/-/espree-3.1.7.tgz";
1102 sha1 = "fd5deec76a97a5120a9cd3a7cb1177a0923b11d2";
1103 };
1104 };
1105 "estraverse-3.1.0" = {
1106 name = "estraverse";
1107 packageName = "estraverse";
1108 version = "3.1.0";
1109 src = fetchurl {
1110 url = "https://registry.npmjs.org/estraverse/-/estraverse-3.1.0.tgz";
1111 sha1 = "15e28a446b8b82bc700ccc8b96c78af4da0d6cba";
1112 };
1113 };
1114 "path-is-absolute-1.0.0" = {
1115 name = "path-is-absolute";
1116 packageName = "path-is-absolute";
1117 version = "1.0.0";
1118 src = fetchurl {
1119 url = "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz";
1120 sha1 = "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912";
1121 };
1122 };
1123 "babel-runtime-6.11.6" = {
1124 name = "babel-runtime";
1125 packageName = "babel-runtime";
1126 version = "6.11.6";
1127 src = fetchurl {
1128 url = "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.11.6.tgz";
1129 sha1 = "6db707fef2d49c49bfa3cb64efdb436b518b8222";
1130 };
223 };
1131 };
224 peerDependencies = [
1132 "regenerator-runtime-0.9.5" = {
225 ];
1133 name = "regenerator-runtime";
226 passthru.names = [ "assert-plus" ];
1134 packageName = "regenerator-runtime";
227 };
1135 version = "0.9.5";
228 by-spec."assert-plus"."^0.2.0" =
1136 src = fetchurl {
229 self.by-version."assert-plus"."0.2.0";
1137 url = "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.9.5.tgz";
230 by-spec."async"."^0.9.0" =
1138 sha1 = "403d6d40a4bdff9c330dd9392dcbb2d9a8bba1fc";
231 self.by-version."async"."0.9.2";
1139 };
232 by-version."async"."0.9.2" = lib.makeOverridable self.buildNodePackage {
1140 };
233 name = "async-0.9.2";
1141 "esutils-1.1.6" = {
234 bin = false;
1142 name = "esutils";
235 src = [
1143 packageName = "esutils";
236 (fetchurl {
1144 version = "1.1.6";
237 url = "http://registry.npmjs.org/async/-/async-0.9.2.tgz";
1145 src = fetchurl {
238 name = "async-0.9.2.tgz";
1146 url = "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz";
239 sha1 = "aea74d5e61c1f899613bf64bda66d4c78f2fd17d";
1147 sha1 = "c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375";
240 })
1148 };
241 ];
1149 };
242 buildInputs =
1150 "isarray-0.0.1" = {
243 (self.nativeDeps."async" or []);
1151 name = "isarray";
244 deps = {
1152 packageName = "isarray";
1153 version = "0.0.1";
1154 src = fetchurl {
1155 url = "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz";
1156 sha1 = "8a18acfca9a8f4177e09abfc6038939b05d1eedf";
1157 };
1158 };
1159 "estraverse-1.9.3" = {
1160 name = "estraverse";
1161 packageName = "estraverse";
1162 version = "1.9.3";
1163 src = fetchurl {
1164 url = "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz";
1165 sha1 = "af67f2dc922582415950926091a4005d29c9bb44";
1166 };
1167 };
1168 "esutils-2.0.2" = {
1169 name = "esutils";
1170 packageName = "esutils";
1171 version = "2.0.2";
1172 src = fetchurl {
1173 url = "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz";
1174 sha1 = "0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b";
1175 };
1176 };
1177 "esprima-2.7.3" = {
1178 name = "esprima";
1179 packageName = "esprima";
1180 version = "2.7.3";
1181 src = fetchurl {
1182 url = "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz";
1183 sha1 = "96e3b70d5779f6ad49cd032673d1c312767ba581";
1184 };
1185 };
1186 "optionator-0.8.1" = {
1187 name = "optionator";
1188 packageName = "optionator";
1189 version = "0.8.1";
1190 src = fetchurl {
1191 url = "https://registry.npmjs.org/optionator/-/optionator-0.8.1.tgz";
1192 sha1 = "e31b4932cdd5fb862a8b0d10bc63d3ee1ec7d78b";
1193 };
1194 };
1195 "source-map-0.2.0" = {
1196 name = "source-map";
1197 packageName = "source-map";
1198 version = "0.2.0";
1199 src = fetchurl {
1200 url = "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz";
1201 sha1 = "dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d";
1202 };
1203 };
1204 "prelude-ls-1.1.2" = {
1205 name = "prelude-ls";
1206 packageName = "prelude-ls";
1207 version = "1.1.2";
1208 src = fetchurl {
1209 url = "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz";
1210 sha1 = "21932a549f5e52ffd9a827f570e04be62a97da54";
1211 };
1212 };
1213 "deep-is-0.1.3" = {
1214 name = "deep-is";
1215 packageName = "deep-is";
1216 version = "0.1.3";
1217 src = fetchurl {
1218 url = "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz";
1219 sha1 = "b369d6fb5dbc13eecf524f91b070feedc357cf34";
1220 };
1221 };
1222 "wordwrap-1.0.0" = {
1223 name = "wordwrap";
1224 packageName = "wordwrap";
1225 version = "1.0.0";
1226 src = fetchurl {
1227 url = "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz";
1228 sha1 = "27584810891456a4171c8d0226441ade90cbcaeb";
1229 };
1230 };
1231 "type-check-0.3.2" = {
1232 name = "type-check";
1233 packageName = "type-check";
1234 version = "0.3.2";
1235 src = fetchurl {
1236 url = "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz";
1237 sha1 = "5884cab512cf1d355e3fb784f30804b2b520db72";
1238 };
1239 };
1240 "levn-0.3.0" = {
1241 name = "levn";
1242 packageName = "levn";
1243 version = "0.3.0";
1244 src = fetchurl {
1245 url = "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz";
1246 sha1 = "3b09924edf9f083c0490fdd4c0bc4421e04764ee";
1247 };
1248 };
1249 "fast-levenshtein-1.1.4" = {
1250 name = "fast-levenshtein";
1251 packageName = "fast-levenshtein";
1252 version = "1.1.4";
1253 src = fetchurl {
1254 url = "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz";
1255 sha1 = "e6a754cc8f15e58987aa9cbd27af66fd6f4e5af9";
1256 };
245 };
1257 };
246 peerDependencies = [
1258 "acorn-3.3.0" = {
247 ];
1259 name = "acorn";
248 passthru.names = [ "async" ];
1260 packageName = "acorn";
249 };
1261 version = "3.3.0";
250 by-spec."async"."^1.4.0" =
1262 src = fetchurl {
251 self.by-version."async"."1.5.2";
1263 url = "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz";
252 by-version."async"."1.5.2" = lib.makeOverridable self.buildNodePackage {
1264 sha1 = "45e37fb39e8da3f25baee3ff5369e2bb5f22017a";
253 name = "async-1.5.2";
1265 };
254 bin = false;
1266 };
255 src = [
1267 "acorn-jsx-3.0.1" = {
256 (fetchurl {
1268 name = "acorn-jsx";
257 url = "http://registry.npmjs.org/async/-/async-1.5.2.tgz";
1269 packageName = "acorn-jsx";
258 name = "async-1.5.2.tgz";
1270 version = "3.0.1";
259 sha1 = "ec6a61ae56480c0c3cb241c95618e20892f9672a";
1271 src = fetchurl {
260 })
1272 url = "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz";
261 ];
1273 sha1 = "afdf9488fb1ecefc8348f6fb22f464e32a58b36b";
262 buildInputs =
1274 };
263 (self.nativeDeps."async" or []);
1275 };
264 deps = {
1276 "boxen-0.3.1" = {
1277 name = "boxen";
1278 packageName = "boxen";
1279 version = "0.3.1";
1280 src = fetchurl {
1281 url = "https://registry.npmjs.org/boxen/-/boxen-0.3.1.tgz";
1282 sha1 = "a7d898243ae622f7abb6bb604d740a76c6a5461b";
1283 };
1284 };
1285 "configstore-2.0.0" = {
1286 name = "configstore";
1287 packageName = "configstore";
1288 version = "2.0.0";
1289 src = fetchurl {
1290 url = "https://registry.npmjs.org/configstore/-/configstore-2.0.0.tgz";
1291 sha1 = "8d81e9cdfa73ebd0e06bc985147856b2f1c4e764";
1292 };
1293 };
1294 "is-npm-1.0.0" = {
1295 name = "is-npm";
1296 packageName = "is-npm";
1297 version = "1.0.0";
1298 src = fetchurl {
1299 url = "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz";
1300 sha1 = "f2fb63a65e4905b406c86072765a1a4dc793b9f4";
1301 };
1302 };
1303 "latest-version-2.0.0" = {
1304 name = "latest-version";
1305 packageName = "latest-version";
1306 version = "2.0.0";
1307 src = fetchurl {
1308 url = "https://registry.npmjs.org/latest-version/-/latest-version-2.0.0.tgz";
1309 sha1 = "56f8d6139620847b8017f8f1f4d78e211324168b";
1310 };
1311 };
1312 "semver-diff-2.1.0" = {
1313 name = "semver-diff";
1314 packageName = "semver-diff";
1315 version = "2.1.0";
1316 src = fetchurl {
1317 url = "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz";
1318 sha1 = "4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36";
1319 };
1320 };
1321 "filled-array-1.1.0" = {
1322 name = "filled-array";
1323 packageName = "filled-array";
1324 version = "1.1.0";
1325 src = fetchurl {
1326 url = "https://registry.npmjs.org/filled-array/-/filled-array-1.1.0.tgz";
1327 sha1 = "c3c4f6c663b923459a9aa29912d2d031f1507f84";
1328 };
1329 };
1330 "object-assign-4.1.0" = {
1331 name = "object-assign";
1332 packageName = "object-assign";
1333 version = "4.1.0";
1334 src = fetchurl {
1335 url = "https://registry.npmjs.org/object-assign/-/object-assign-4.1.0.tgz";
1336 sha1 = "7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0";
1337 };
1338 };
1339 "repeating-2.0.1" = {
1340 name = "repeating";
1341 packageName = "repeating";
1342 version = "2.0.1";
1343 src = fetchurl {
1344 url = "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz";
1345 sha1 = "5214c53a926d3552707527fbab415dbc08d06dda";
1346 };
1347 };
1348 "string-width-1.0.2" = {
1349 name = "string-width";
1350 packageName = "string-width";
1351 version = "1.0.2";
1352 src = fetchurl {
1353 url = "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz";
1354 sha1 = "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3";
1355 };
1356 };
1357 "widest-line-1.0.0" = {
1358 name = "widest-line";
1359 packageName = "widest-line";
1360 version = "1.0.0";
1361 src = fetchurl {
1362 url = "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz";
1363 sha1 = "0c09c85c2a94683d0d7eaf8ee097d564bf0e105c";
1364 };
1365 };
1366 "is-finite-1.0.1" = {
1367 name = "is-finite";
1368 packageName = "is-finite";
1369 version = "1.0.1";
1370 src = fetchurl {
1371 url = "https://registry.npmjs.org/is-finite/-/is-finite-1.0.1.tgz";
1372 sha1 = "6438603eaebe2793948ff4a4262ec8db3d62597b";
1373 };
1374 };
1375 "number-is-nan-1.0.0" = {
1376 name = "number-is-nan";
1377 packageName = "number-is-nan";
1378 version = "1.0.0";
1379 src = fetchurl {
1380 url = "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz";
1381 sha1 = "c020f529c5282adfdd233d91d4b181c3d686dc4b";
1382 };
265 };
1383 };
266 peerDependencies = [
1384 "code-point-at-1.0.0" = {
267 ];
1385 name = "code-point-at";
268 passthru.names = [ "async" ];
1386 packageName = "code-point-at";
269 };
1387 version = "1.0.0";
270 by-spec."async"."~0.1.22" =
1388 src = fetchurl {
271 self.by-version."async"."0.1.22";
1389 url = "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz";
272 by-version."async"."0.1.22" = lib.makeOverridable self.buildNodePackage {
1390 sha1 = "f69b192d3f7d91e382e4b71bddb77878619ab0c6";
273 name = "async-0.1.22";
1391 };
274 bin = false;
1392 };
275 src = [
1393 "is-fullwidth-code-point-1.0.0" = {
276 (fetchurl {
1394 name = "is-fullwidth-code-point";
277 url = "http://registry.npmjs.org/async/-/async-0.1.22.tgz";
1395 packageName = "is-fullwidth-code-point";
278 name = "async-0.1.22.tgz";
1396 version = "1.0.0";
279 sha1 = "0fc1aaa088a0e3ef0ebe2d8831bab0dcf8845061";
1397 src = fetchurl {
280 })
1398 url = "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz";
281 ];
1399 sha1 = "ef9e31386f031a7f0d643af82fde50c457ef00cb";
282 buildInputs =
1400 };
283 (self.nativeDeps."async" or []);
1401 };
284 deps = {
1402 "dot-prop-2.4.0" = {
1403 name = "dot-prop";
1404 packageName = "dot-prop";
1405 version = "2.4.0";
1406 src = fetchurl {
1407 url = "https://registry.npmjs.org/dot-prop/-/dot-prop-2.4.0.tgz";
1408 sha1 = "848e28f7f1d50740c6747ab3cb07670462b6f89c";
1409 };
1410 };
1411 "os-tmpdir-1.0.1" = {
1412 name = "os-tmpdir";
1413 packageName = "os-tmpdir";
1414 version = "1.0.1";
1415 src = fetchurl {
1416 url = "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz";
1417 sha1 = "e9b423a1edaf479882562e92ed71d7743a071b6e";
1418 };
1419 };
1420 "osenv-0.1.3" = {
1421 name = "osenv";
1422 packageName = "osenv";
1423 version = "0.1.3";
1424 src = fetchurl {
1425 url = "https://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz";
1426 sha1 = "83cf05c6d6458fc4d5ac6362ea325d92f2754217";
1427 };
1428 };
1429 "uuid-2.0.2" = {
1430 name = "uuid";
1431 packageName = "uuid";
1432 version = "2.0.2";
1433 src = fetchurl {
1434 url = "https://registry.npmjs.org/uuid/-/uuid-2.0.2.tgz";
1435 sha1 = "48bd5698f0677e3c7901a1c46ef15b1643794726";
1436 };
1437 };
1438 "write-file-atomic-1.2.0" = {
1439 name = "write-file-atomic";
1440 packageName = "write-file-atomic";
1441 version = "1.2.0";
1442 src = fetchurl {
1443 url = "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.2.0.tgz";
1444 sha1 = "14c66d4e4cb3ca0565c28cf3b7a6f3e4d5938fab";
1445 };
285 };
1446 };
286 peerDependencies = [
1447 "xdg-basedir-2.0.0" = {
287 ];
1448 name = "xdg-basedir";
288 passthru.names = [ "async" ];
1449 packageName = "xdg-basedir";
289 };
1450 version = "2.0.0";
290 by-spec."async"."~0.2.9" =
1451 src = fetchurl {
291 self.by-version."async"."0.2.10";
1452 url = "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-2.0.0.tgz";
292 by-version."async"."0.2.10" = lib.makeOverridable self.buildNodePackage {
1453 sha1 = "edbc903cc385fc04523d966a335504b5504d1bd2";
293 name = "async-0.2.10";
1454 };
294 bin = false;
1455 };
295 src = [
1456 "is-obj-1.0.1" = {
296 (fetchurl {
1457 name = "is-obj";
297 url = "http://registry.npmjs.org/async/-/async-0.2.10.tgz";
1458 packageName = "is-obj";
298 name = "async-0.2.10.tgz";
1459 version = "1.0.1";
299 sha1 = "b6bbe0b0674b9d719708ca38de8c237cb526c3d1";
1460 src = fetchurl {
300 })
1461 url = "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz";
301 ];
1462 sha1 = "3e4729ac1f5fde025cd7d83a896dab9f4f67db0f";
302 buildInputs =
1463 };
303 (self.nativeDeps."async" or []);
1464 };
304 deps = {
1465 "os-homedir-1.0.1" = {
1466 name = "os-homedir";
1467 packageName = "os-homedir";
1468 version = "1.0.1";
1469 src = fetchurl {
1470 url = "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz";
1471 sha1 = "0d62bdf44b916fd3bbdcf2cab191948fb094f007";
1472 };
1473 };
1474 "imurmurhash-0.1.4" = {
1475 name = "imurmurhash";
1476 packageName = "imurmurhash";
1477 version = "0.1.4";
1478 src = fetchurl {
1479 url = "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz";
1480 sha1 = "9218b9b2b928a238b13dc4fb6b6d576f231453ea";
1481 };
1482 };
1483 "slide-1.1.6" = {
1484 name = "slide";
1485 packageName = "slide";
1486 version = "1.1.6";
1487 src = fetchurl {
1488 url = "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz";
1489 sha1 = "56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707";
1490 };
1491 };
1492 "package-json-2.3.3" = {
1493 name = "package-json";
1494 packageName = "package-json";
1495 version = "2.3.3";
1496 src = fetchurl {
1497 url = "https://registry.npmjs.org/package-json/-/package-json-2.3.3.tgz";
1498 sha1 = "14895311a963d18edf8801e06b67ea87795d15b9";
1499 };
1500 };
1501 "got-5.6.0" = {
1502 name = "got";
1503 packageName = "got";
1504 version = "5.6.0";
1505 src = fetchurl {
1506 url = "https://registry.npmjs.org/got/-/got-5.6.0.tgz";
1507 sha1 = "bb1d7ee163b78082bbc8eb836f3f395004ea6fbf";
1508 };
305 };
1509 };
306 peerDependencies = [
1510 "rc-1.1.6" = {
307 ];
1511 name = "rc";
308 passthru.names = [ "async" ];
1512 packageName = "rc";
309 };
1513 version = "1.1.6";
310 by-spec."aws-sign2"."~0.6.0" =
1514 src = fetchurl {
311 self.by-version."aws-sign2"."0.6.0";
1515 url = "https://registry.npmjs.org/rc/-/rc-1.1.6.tgz";
312 by-version."aws-sign2"."0.6.0" = lib.makeOverridable self.buildNodePackage {
1516 sha1 = "43651b76b6ae53b5c802f1151fa3fc3b059969c9";
313 name = "aws-sign2-0.6.0";
1517 };
314 bin = false;
1518 };
315 src = [
1519 "registry-url-3.1.0" = {
316 (fetchurl {
1520 name = "registry-url";
317 url = "http://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz";
1521 packageName = "registry-url";
318 name = "aws-sign2-0.6.0.tgz";
1522 version = "3.1.0";
319 sha1 = "14342dd38dbcc94d0e5b87d763cd63612c0e794f";
1523 src = fetchurl {
320 })
1524 url = "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz";
321 ];
1525 sha1 = "3d4ef870f73dde1d77f0cf9a381432444e174942";
322 buildInputs =
1526 };
323 (self.nativeDeps."aws-sign2" or []);
1527 };
324 deps = {
1528 "semver-5.3.0" = {
1529 name = "semver";
1530 packageName = "semver";
1531 version = "5.3.0";
1532 src = fetchurl {
1533 url = "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz";
1534 sha1 = "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f";
1535 };
1536 };
1537 "create-error-class-3.0.2" = {
1538 name = "create-error-class";
1539 packageName = "create-error-class";
1540 version = "3.0.2";
1541 src = fetchurl {
1542 url = "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz";
1543 sha1 = "06be7abef947a3f14a30fd610671d401bca8b7b6";
1544 };
1545 };
1546 "duplexer2-0.1.4" = {
1547 name = "duplexer2";
1548 packageName = "duplexer2";
1549 version = "0.1.4";
1550 src = fetchurl {
1551 url = "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz";
1552 sha1 = "8b12dab878c0d69e3e7891051662a32fc6bddcc1";
1553 };
1554 };
1555 "is-plain-obj-1.1.0" = {
1556 name = "is-plain-obj";
1557 packageName = "is-plain-obj";
1558 version = "1.1.0";
1559 src = fetchurl {
1560 url = "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz";
1561 sha1 = "71a50c8429dfca773c92a390a4a03b39fcd51d3e";
1562 };
1563 };
1564 "is-redirect-1.0.0" = {
1565 name = "is-redirect";
1566 packageName = "is-redirect";
1567 version = "1.0.0";
1568 src = fetchurl {
1569 url = "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz";
1570 sha1 = "1d03dded53bd8db0f30c26e4f95d36fc7c87dc24";
1571 };
1572 };
1573 "is-retry-allowed-1.1.0" = {
1574 name = "is-retry-allowed";
1575 packageName = "is-retry-allowed";
1576 version = "1.1.0";
1577 src = fetchurl {
1578 url = "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz";
1579 sha1 = "11a060568b67339444033d0125a61a20d564fb34";
1580 };
1581 };
1582 "is-stream-1.1.0" = {
1583 name = "is-stream";
1584 packageName = "is-stream";
1585 version = "1.1.0";
1586 src = fetchurl {
1587 url = "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz";
1588 sha1 = "12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44";
1589 };
1590 };
1591 "lowercase-keys-1.0.0" = {
1592 name = "lowercase-keys";
1593 packageName = "lowercase-keys";
1594 version = "1.0.0";
1595 src = fetchurl {
1596 url = "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz";
1597 sha1 = "4e3366b39e7f5457e35f1324bdf6f88d0bfc7306";
1598 };
1599 };
1600 "node-status-codes-1.0.0" = {
1601 name = "node-status-codes";
1602 packageName = "node-status-codes";
1603 version = "1.0.0";
1604 src = fetchurl {
1605 url = "https://registry.npmjs.org/node-status-codes/-/node-status-codes-1.0.0.tgz";
1606 sha1 = "5ae5541d024645d32a58fcddc9ceecea7ae3ac2f";
1607 };
1608 };
1609 "parse-json-2.2.0" = {
1610 name = "parse-json";
1611 packageName = "parse-json";
1612 version = "2.2.0";
1613 src = fetchurl {
1614 url = "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz";
1615 sha1 = "f480f40434ef80741f8469099f8dea18f55a4dc9";
1616 };
1617 };
1618 "pinkie-promise-2.0.1" = {
1619 name = "pinkie-promise";
1620 packageName = "pinkie-promise";
1621 version = "2.0.1";
1622 src = fetchurl {
1623 url = "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz";
1624 sha1 = "2135d6dfa7a358c069ac9b178776288228450ffa";
1625 };
1626 };
1627 "read-all-stream-3.1.0" = {
1628 name = "read-all-stream";
1629 packageName = "read-all-stream";
1630 version = "3.1.0";
1631 src = fetchurl {
1632 url = "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.1.0.tgz";
1633 sha1 = "35c3e177f2078ef789ee4bfafa4373074eaef4fa";
1634 };
325 };
1635 };
326 peerDependencies = [
1636 "readable-stream-2.1.5" = {
327 ];
1637 name = "readable-stream";
328 passthru.names = [ "aws-sign2" ];
1638 packageName = "readable-stream";
329 };
1639 version = "2.1.5";
330 by-spec."balanced-match"."^0.3.0" =
1640 src = fetchurl {
331 self.by-version."balanced-match"."0.3.0";
1641 url = "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.5.tgz";
332 by-version."balanced-match"."0.3.0" = lib.makeOverridable self.buildNodePackage {
1642 sha1 = "66fa8b720e1438b364681f2ad1a63c618448c9d0";
333 name = "balanced-match-0.3.0";
1643 };
334 bin = false;
1644 };
335 src = [
1645 "timed-out-2.0.0" = {
336 (fetchurl {
1646 name = "timed-out";
337 url = "http://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz";
1647 packageName = "timed-out";
338 name = "balanced-match-0.3.0.tgz";
1648 version = "2.0.0";
339 sha1 = "a91cdd1ebef1a86659e70ff4def01625fc2d6756";
1649 src = fetchurl {
340 })
1650 url = "https://registry.npmjs.org/timed-out/-/timed-out-2.0.0.tgz";
341 ];
1651 sha1 = "f38b0ae81d3747d628001f41dafc652ace671c0a";
342 buildInputs =
1652 };
343 (self.nativeDeps."balanced-match" or []);
1653 };
344 deps = {
1654 "unzip-response-1.0.0" = {
1655 name = "unzip-response";
1656 packageName = "unzip-response";
1657 version = "1.0.0";
1658 src = fetchurl {
1659 url = "https://registry.npmjs.org/unzip-response/-/unzip-response-1.0.0.tgz";
1660 sha1 = "bfda54eeec658f00c2df4d4494b9dca0ca00f3e4";
1661 };
1662 };
1663 "url-parse-lax-1.0.0" = {
1664 name = "url-parse-lax";
1665 packageName = "url-parse-lax";
1666 version = "1.0.0";
1667 src = fetchurl {
1668 url = "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz";
1669 sha1 = "7af8f303645e9bd79a272e7a14ac68bc0609da73";
1670 };
1671 };
1672 "capture-stack-trace-1.0.0" = {
1673 name = "capture-stack-trace";
1674 packageName = "capture-stack-trace";
1675 version = "1.0.0";
1676 src = fetchurl {
1677 url = "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz";
1678 sha1 = "4a6fa07399c26bba47f0b2496b4d0fb408c5550d";
1679 };
1680 };
1681 "error-ex-1.3.0" = {
1682 name = "error-ex";
1683 packageName = "error-ex";
1684 version = "1.3.0";
1685 src = fetchurl {
1686 url = "https://registry.npmjs.org/error-ex/-/error-ex-1.3.0.tgz";
1687 sha1 = "e67b43f3e82c96ea3a584ffee0b9fc3325d802d9";
1688 };
1689 };
1690 "is-arrayish-0.2.1" = {
1691 name = "is-arrayish";
1692 packageName = "is-arrayish";
1693 version = "0.2.1";
1694 src = fetchurl {
1695 url = "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz";
1696 sha1 = "77c99840527aa8ecb1a8ba697b80645a7a926a9d";
1697 };
1698 };
1699 "pinkie-2.0.4" = {
1700 name = "pinkie";
1701 packageName = "pinkie";
1702 version = "2.0.4";
1703 src = fetchurl {
1704 url = "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz";
1705 sha1 = "72556b80cfa0d48a974e80e77248e80ed4f7f870";
1706 };
1707 };
1708 "buffer-shims-1.0.0" = {
1709 name = "buffer-shims";
1710 packageName = "buffer-shims";
1711 version = "1.0.0";
1712 src = fetchurl {
1713 url = "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz";
1714 sha1 = "9978ce317388c649ad8793028c3477ef044a8b51";
1715 };
1716 };
1717 "core-util-is-1.0.2" = {
1718 name = "core-util-is";
1719 packageName = "core-util-is";
1720 version = "1.0.2";
1721 src = fetchurl {
1722 url = "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz";
1723 sha1 = "b5fd54220aa2bc5ab57aab7140c940754503c1a7";
1724 };
1725 };
1726 "isarray-1.0.0" = {
1727 name = "isarray";
1728 packageName = "isarray";
1729 version = "1.0.0";
1730 src = fetchurl {
1731 url = "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz";
1732 sha1 = "bb935d48582cba168c06834957a54a3e07124f11";
1733 };
1734 };
1735 "process-nextick-args-1.0.7" = {
1736 name = "process-nextick-args";
1737 packageName = "process-nextick-args";
1738 version = "1.0.7";
1739 src = fetchurl {
1740 url = "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz";
1741 sha1 = "150e20b756590ad3f91093f25a4f2ad8bff30ba3";
1742 };
1743 };
1744 "string_decoder-0.10.31" = {
1745 name = "string_decoder";
1746 packageName = "string_decoder";
1747 version = "0.10.31";
1748 src = fetchurl {
1749 url = "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz";
1750 sha1 = "62e203bc41766c6c28c9fc84301dab1c5310fa94";
1751 };
1752 };
1753 "util-deprecate-1.0.2" = {
1754 name = "util-deprecate";
1755 packageName = "util-deprecate";
1756 version = "1.0.2";
1757 src = fetchurl {
1758 url = "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz";
1759 sha1 = "450d4dc9fa70de732762fbd2d4a28981419a0ccf";
1760 };
345 };
1761 };
346 peerDependencies = [
1762 "prepend-http-1.0.4" = {
347 ];
1763 name = "prepend-http";
348 passthru.names = [ "balanced-match" ];
1764 packageName = "prepend-http";
349 };
1765 version = "1.0.4";
350 by-spec."bl"."~1.0.0" =
1766 src = fetchurl {
351 self.by-version."bl"."1.0.1";
1767 url = "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz";
352 by-version."bl"."1.0.1" = lib.makeOverridable self.buildNodePackage {
1768 sha1 = "d4f4562b0ce3696e41ac52d0e002e57a635dc6dc";
353 name = "bl-1.0.1";
1769 };
354 bin = false;
1770 };
355 src = [
1771 "ini-1.3.4" = {
356 (fetchurl {
1772 name = "ini";
357 url = "http://registry.npmjs.org/bl/-/bl-1.0.1.tgz";
1773 packageName = "ini";
358 name = "bl-1.0.1.tgz";
1774 version = "1.3.4";
359 sha1 = "0e6df7330308c46515751676cafa7334dc9852fd";
1775 src = fetchurl {
360 })
1776 url = "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz";
361 ];
1777 sha1 = "0537cb79daf59b59a1a517dff706c86ec039162e";
362 buildInputs =
1778 };
363 (self.nativeDeps."bl" or []);
1779 };
364 deps = {
1780 "minimist-1.2.0" = {
365 "readable-stream-2.0.5" = self.by-version."readable-stream"."2.0.5";
1781 name = "minimist";
1782 packageName = "minimist";
1783 version = "1.2.0";
1784 src = fetchurl {
1785 url = "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz";
1786 sha1 = "a35008b20f41383eec1fb914f4cd5df79a264284";
1787 };
1788 };
1789 "strip-json-comments-1.0.4" = {
1790 name = "strip-json-comments";
1791 packageName = "strip-json-comments";
1792 version = "1.0.4";
1793 src = fetchurl {
1794 url = "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz";
1795 sha1 = "1e15fbcac97d3ee99bf2d73b4c656b082bbafb91";
1796 };
1797 };
1798 "crisper-1.2.0" = {
1799 name = "crisper";
1800 packageName = "crisper";
1801 version = "1.2.0";
1802 src = fetchurl {
1803 url = "https://registry.npmjs.org/crisper/-/crisper-1.2.0.tgz";
1804 sha1 = "9a91f597d71f6110294e076ad44dbb3408568e46";
1805 };
1806 };
1807 "cli-1.0.0" = {
1808 name = "cli";
1809 packageName = "cli";
1810 version = "1.0.0";
1811 src = fetchurl {
1812 url = "https://registry.npmjs.org/cli/-/cli-1.0.0.tgz";
1813 sha1 = "ee07dfc1390e3f2e6a9957cf88e1d4bfa777719d";
1814 };
1815 };
1816 "console-browserify-1.1.0" = {
1817 name = "console-browserify";
1818 packageName = "console-browserify";
1819 version = "1.1.0";
1820 src = fetchurl {
1821 url = "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz";
1822 sha1 = "f0241c45730a9fc6323b206dbf38edc741d0bb10";
1823 };
1824 };
1825 "htmlparser2-3.8.3" = {
1826 name = "htmlparser2";
1827 packageName = "htmlparser2";
1828 version = "3.8.3";
1829 src = fetchurl {
1830 url = "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz";
1831 sha1 = "996c28b191516a8be86501a7d79757e5c70c1068";
1832 };
1833 };
1834 "minimatch-3.0.3" = {
1835 name = "minimatch";
1836 packageName = "minimatch";
1837 version = "3.0.3";
1838 src = fetchurl {
1839 url = "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz";
1840 sha1 = "2a4e4090b96b2db06a9d7df01055a62a77c9b774";
1841 };
1842 };
1843 "shelljs-0.3.0" = {
1844 name = "shelljs";
1845 packageName = "shelljs";
1846 version = "0.3.0";
1847 src = fetchurl {
1848 url = "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz";
1849 sha1 = "3596e6307a781544f591f37da618360f31db57b1";
1850 };
1851 };
1852 "lodash-3.7.0" = {
1853 name = "lodash";
1854 packageName = "lodash";
1855 version = "3.7.0";
1856 src = fetchurl {
1857 url = "https://registry.npmjs.org/lodash/-/lodash-3.7.0.tgz";
1858 sha1 = "3678bd8ab995057c07ade836ed2ef087da811d45";
1859 };
1860 };
1861 "glob-7.0.6" = {
1862 name = "glob";
1863 packageName = "glob";
1864 version = "7.0.6";
1865 src = fetchurl {
1866 url = "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz";
1867 sha1 = "211bafaf49e525b8cd93260d14ab136152b3f57a";
1868 };
1869 };
1870 "fs.realpath-1.0.0" = {
1871 name = "fs.realpath";
1872 packageName = "fs.realpath";
1873 version = "1.0.0";
1874 src = fetchurl {
1875 url = "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz";
1876 sha1 = "1504ad2523158caa40db4a2787cb01411994ea4f";
1877 };
1878 };
1879 "inflight-1.0.5" = {
1880 name = "inflight";
1881 packageName = "inflight";
1882 version = "1.0.5";
1883 src = fetchurl {
1884 url = "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz";
1885 sha1 = "db3204cd5a9de2e6cd890b85c6e2f66bcf4f620a";
1886 };
366 };
1887 };
367 peerDependencies = [
1888 "once-1.3.3" = {
368 ];
1889 name = "once";
369 passthru.names = [ "bl" ];
1890 packageName = "once";
370 };
1891 version = "1.3.3";
371 by-spec."boom"."2.x.x" =
1892 src = fetchurl {
372 self.by-version."boom"."2.10.1";
1893 url = "https://registry.npmjs.org/once/-/once-1.3.3.tgz";
373 by-version."boom"."2.10.1" = lib.makeOverridable self.buildNodePackage {
1894 sha1 = "b2e261557ce4c314ec8304f3fa82663e4297ca20";
374 name = "boom-2.10.1";
1895 };
375 bin = false;
1896 };
376 src = [
1897 "wrappy-1.0.2" = {
377 (fetchurl {
1898 name = "wrappy";
378 url = "http://registry.npmjs.org/boom/-/boom-2.10.1.tgz";
1899 packageName = "wrappy";
379 name = "boom-2.10.1.tgz";
1900 version = "1.0.2";
380 sha1 = "39c8918ceff5799f83f9492a848f625add0c766f";
1901 src = fetchurl {
381 })
1902 url = "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz";
382 ];
1903 sha1 = "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f";
383 buildInputs =
1904 };
384 (self.nativeDeps."boom" or []);
1905 };
385 deps = {
1906 "brace-expansion-1.1.6" = {
386 "hoek-2.16.3" = self.by-version."hoek"."2.16.3";
1907 name = "brace-expansion";
1908 packageName = "brace-expansion";
1909 version = "1.1.6";
1910 src = fetchurl {
1911 url = "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz";
1912 sha1 = "7197d7eaa9b87e648390ea61fc66c84427420df9";
1913 };
1914 };
1915 "balanced-match-0.4.2" = {
1916 name = "balanced-match";
1917 packageName = "balanced-match";
1918 version = "0.4.2";
1919 src = fetchurl {
1920 url = "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz";
1921 sha1 = "cb3f3e3c732dc0f01ee70b403f302e61d7709838";
1922 };
1923 };
1924 "concat-map-0.0.1" = {
1925 name = "concat-map";
1926 packageName = "concat-map";
1927 version = "0.0.1";
1928 src = fetchurl {
1929 url = "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz";
1930 sha1 = "d8a96bd77fd68df7793a73036a3ba0d5405d477b";
1931 };
1932 };
1933 "date-now-0.1.4" = {
1934 name = "date-now";
1935 packageName = "date-now";
1936 version = "0.1.4";
1937 src = fetchurl {
1938 url = "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz";
1939 sha1 = "eaf439fd4d4848ad74e5cc7dbef200672b9e345b";
1940 };
1941 };
1942 "domhandler-2.3.0" = {
1943 name = "domhandler";
1944 packageName = "domhandler";
1945 version = "2.3.0";
1946 src = fetchurl {
1947 url = "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz";
1948 sha1 = "2de59a0822d5027fabff6f032c2b25a2a8abe738";
1949 };
387 };
1950 };
388 peerDependencies = [
1951 "domutils-1.5.1" = {
389 ];
1952 name = "domutils";
390 passthru.names = [ "boom" ];
1953 packageName = "domutils";
391 };
1954 version = "1.5.1";
392 by-spec."brace-expansion"."^1.0.0" =
1955 src = fetchurl {
393 self.by-version."brace-expansion"."1.1.2";
1956 url = "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz";
394 by-version."brace-expansion"."1.1.2" = lib.makeOverridable self.buildNodePackage {
1957 sha1 = "dcd8488a26f563d61079e48c9f7b7e32373682cf";
395 name = "brace-expansion-1.1.2";
1958 };
396 bin = false;
1959 };
397 src = [
1960 "domelementtype-1.3.0" = {
398 (fetchurl {
1961 name = "domelementtype";
399 url = "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.2.tgz";
1962 packageName = "domelementtype";
400 name = "brace-expansion-1.1.2.tgz";
1963 version = "1.3.0";
401 sha1 = "f21445d0488b658e2771efd870eff51df29f04ef";
1964 src = fetchurl {
402 })
1965 url = "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz";
403 ];
1966 sha1 = "b17aed82e8ab59e52dd9c19b1756e0fc187204c2";
404 buildInputs =
1967 };
405 (self.nativeDeps."brace-expansion" or []);
1968 };
406 deps = {
1969 "readable-stream-1.1.14" = {
407 "balanced-match-0.3.0" = self.by-version."balanced-match"."0.3.0";
1970 name = "readable-stream";
408 "concat-map-0.0.1" = self.by-version."concat-map"."0.0.1";
1971 packageName = "readable-stream";
1972 version = "1.1.14";
1973 src = fetchurl {
1974 url = "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz";
1975 sha1 = "7cf4c54ef648e3813084c636dd2079e166c081d9";
1976 };
409 };
1977 };
410 peerDependencies = [
1978 "entities-1.0.0" = {
411 ];
1979 name = "entities";
412 passthru.names = [ "brace-expansion" ];
1980 packageName = "entities";
1981 version = "1.0.0";
1982 src = fetchurl {
1983 url = "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz";
1984 sha1 = "b2987aa3821347fcde642b24fdfc9e4fb712bf26";
1985 };
1986 };
1987 "dom-serializer-0.1.0" = {
1988 name = "dom-serializer";
1989 packageName = "dom-serializer";
1990 version = "0.1.0";
1991 src = fetchurl {
1992 url = "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz";
1993 sha1 = "073c697546ce0780ce23be4a28e293e40bc30c82";
1994 };
1995 };
1996 "domelementtype-1.1.3" = {
1997 name = "domelementtype";
1998 packageName = "domelementtype";
1999 version = "1.1.3";
2000 src = fetchurl {
2001 url = "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz";
2002 sha1 = "bd28773e2642881aec51544924299c5cd822185b";
2003 };
2004 };
2005 "entities-1.1.1" = {
2006 name = "entities";
2007 packageName = "entities";
2008 version = "1.1.1";
2009 src = fetchurl {
2010 url = "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz";
2011 sha1 = "6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0";
2012 };
2013 };
413 };
2014 };
414 by-spec."caseless"."~0.11.0" =
2015 args = {
415 self.by-version."caseless"."0.11.0";
2016 name = "rhodecode-enterprise";
416 by-version."caseless"."0.11.0" = lib.makeOverridable self.buildNodePackage {
2017 packageName = "rhodecode-enterprise";
417 name = "caseless-0.11.0";
2018 version = "0.0.1";
418 bin = false;
2019 src = ./.;
419 src = [
2020 dependencies = [
420 (fetchurl {
2021 sources."grunt-0.4.5"
421 url = "http://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz";
2022 sources."grunt-contrib-copy-1.0.0"
422 name = "caseless-0.11.0.tgz";
2023 (sources."grunt-contrib-concat-0.5.1" // {
423 sha1 = "715b96ea9841593cc33067923f5ec60ebda4f7d7";
2024 dependencies = [
424 })
2025 sources."chalk-0.5.1"
425 ];
2026 sources."ansi-styles-1.1.0"
426 buildInputs =
2027 sources."has-ansi-0.1.0"
427 (self.nativeDeps."caseless" or []);
2028 sources."strip-ansi-0.3.0"
428 deps = {
2029 sources."supports-color-0.2.0"
429 };
2030 sources."ansi-regex-0.2.1"
430 peerDependencies = [
2031 ];
431 ];
432 passthru.names = [ "caseless" ];
433 };
434 by-spec."chalk"."^0.5.1" =
435 self.by-version."chalk"."0.5.1";
436 by-version."chalk"."0.5.1" = lib.makeOverridable self.buildNodePackage {
437 name = "chalk-0.5.1";
438 bin = false;
439 src = [
440 (fetchurl {
441 url = "http://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz";
442 name = "chalk-0.5.1.tgz";
443 sha1 = "663b3a648b68b55d04690d49167aa837858f2174";
444 })
445 ];
446 buildInputs =
447 (self.nativeDeps."chalk" or []);
448 deps = {
449 "ansi-styles-1.1.0" = self.by-version."ansi-styles"."1.1.0";
450 "escape-string-regexp-1.0.4" = self.by-version."escape-string-regexp"."1.0.4";
451 "has-ansi-0.1.0" = self.by-version."has-ansi"."0.1.0";
452 "strip-ansi-0.3.0" = self.by-version."strip-ansi"."0.3.0";
453 "supports-color-0.2.0" = self.by-version."supports-color"."0.2.0";
454 };
455 peerDependencies = [
456 ];
457 passthru.names = [ "chalk" ];
458 };
459 by-spec."chalk"."^1.0.0" =
460 self.by-version."chalk"."1.1.1";
461 by-version."chalk"."1.1.1" = lib.makeOverridable self.buildNodePackage {
462 name = "chalk-1.1.1";
463 bin = false;
464 src = [
465 (fetchurl {
466 url = "http://registry.npmjs.org/chalk/-/chalk-1.1.1.tgz";
467 name = "chalk-1.1.1.tgz";
468 sha1 = "509afb67066e7499f7eb3535c77445772ae2d019";
469 })
470 ];
471 buildInputs =
472 (self.nativeDeps."chalk" or []);
473 deps = {
474 "ansi-styles-2.1.0" = self.by-version."ansi-styles"."2.1.0";
475 "escape-string-regexp-1.0.4" = self.by-version."escape-string-regexp"."1.0.4";
476 "has-ansi-2.0.0" = self.by-version."has-ansi"."2.0.0";
477 "strip-ansi-3.0.0" = self.by-version."strip-ansi"."3.0.0";
478 "supports-color-2.0.0" = self.by-version."supports-color"."2.0.0";
479 };
480 peerDependencies = [
481 ];
482 passthru.names = [ "chalk" ];
483 };
484 by-spec."chalk"."^1.1.1" =
485 self.by-version."chalk"."1.1.1";
486 by-spec."cli"."0.6.x" =
487 self.by-version."cli"."0.6.6";
488 by-version."cli"."0.6.6" = lib.makeOverridable self.buildNodePackage {
489 name = "cli-0.6.6";
490 bin = false;
491 src = [
492 (fetchurl {
493 url = "http://registry.npmjs.org/cli/-/cli-0.6.6.tgz";
494 name = "cli-0.6.6.tgz";
495 sha1 = "02ad44a380abf27adac5e6f0cdd7b043d74c53e3";
496 })
497 ];
498 buildInputs =
499 (self.nativeDeps."cli" or []);
500 deps = {
501 "glob-3.2.11" = self.by-version."glob"."3.2.11";
502 "exit-0.1.2" = self.by-version."exit"."0.1.2";
503 };
504 peerDependencies = [
505 ];
506 passthru.names = [ "cli" ];
507 };
508 by-spec."coffee-script"."~1.3.3" =
509 self.by-version."coffee-script"."1.3.3";
510 by-version."coffee-script"."1.3.3" = lib.makeOverridable self.buildNodePackage {
511 name = "coffee-script-1.3.3";
512 bin = true;
513 src = [
514 (fetchurl {
515 url = "http://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz";
516 name = "coffee-script-1.3.3.tgz";
517 sha1 = "150d6b4cb522894369efed6a2101c20bc7f4a4f4";
518 })
519 ];
520 buildInputs =
521 (self.nativeDeps."coffee-script" or []);
522 deps = {
523 };
524 peerDependencies = [
525 ];
526 passthru.names = [ "coffee-script" ];
527 };
528 by-spec."colors"."~0.6.2" =
529 self.by-version."colors"."0.6.2";
530 by-version."colors"."0.6.2" = lib.makeOverridable self.buildNodePackage {
531 name = "colors-0.6.2";
532 bin = false;
533 src = [
534 (fetchurl {
535 url = "http://registry.npmjs.org/colors/-/colors-0.6.2.tgz";
536 name = "colors-0.6.2.tgz";
537 sha1 = "2423fe6678ac0c5dae8852e5d0e5be08c997abcc";
538 })
539 ];
540 buildInputs =
541 (self.nativeDeps."colors" or []);
542 deps = {
543 };
544 peerDependencies = [
545 ];
546 passthru.names = [ "colors" ];
547 };
548 by-spec."combined-stream"."^1.0.5" =
549 self.by-version."combined-stream"."1.0.5";
550 by-version."combined-stream"."1.0.5" = lib.makeOverridable self.buildNodePackage {
551 name = "combined-stream-1.0.5";
552 bin = false;
553 src = [
554 (fetchurl {
555 url = "http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz";
556 name = "combined-stream-1.0.5.tgz";
557 sha1 = "938370a57b4a51dea2c77c15d5c5fdf895164009";
558 })
559 ];
560 buildInputs =
561 (self.nativeDeps."combined-stream" or []);
562 deps = {
563 "delayed-stream-1.0.0" = self.by-version."delayed-stream"."1.0.0";
564 };
565 peerDependencies = [
566 ];
567 passthru.names = [ "combined-stream" ];
568 };
569 by-spec."combined-stream"."~1.0.5" =
570 self.by-version."combined-stream"."1.0.5";
571 by-spec."commander"."^2.9.0" =
572 self.by-version."commander"."2.9.0";
573 by-version."commander"."2.9.0" = lib.makeOverridable self.buildNodePackage {
574 name = "commander-2.9.0";
575 bin = false;
576 src = [
577 (fetchurl {
578 url = "http://registry.npmjs.org/commander/-/commander-2.9.0.tgz";
579 name = "commander-2.9.0.tgz";
580 sha1 = "9c99094176e12240cb22d6c5146098400fe0f7d4";
581 })
582 ];
583 buildInputs =
584 (self.nativeDeps."commander" or []);
585 deps = {
586 "graceful-readlink-1.0.1" = self.by-version."graceful-readlink"."1.0.1";
587 };
588 peerDependencies = [
589 ];
590 passthru.names = [ "commander" ];
591 };
592 by-spec."concat-map"."0.0.1" =
593 self.by-version."concat-map"."0.0.1";
594 by-version."concat-map"."0.0.1" = lib.makeOverridable self.buildNodePackage {
595 name = "concat-map-0.0.1";
596 bin = false;
597 src = [
598 (fetchurl {
599 url = "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz";
600 name = "concat-map-0.0.1.tgz";
601 sha1 = "d8a96bd77fd68df7793a73036a3ba0d5405d477b";
602 })
603 ];
604 buildInputs =
605 (self.nativeDeps."concat-map" or []);
606 deps = {
607 };
608 peerDependencies = [
609 ];
610 passthru.names = [ "concat-map" ];
611 };
612 by-spec."console-browserify"."1.1.x" =
613 self.by-version."console-browserify"."1.1.0";
614 by-version."console-browserify"."1.1.0" = lib.makeOverridable self.buildNodePackage {
615 name = "console-browserify-1.1.0";
616 bin = false;
617 src = [
618 (fetchurl {
619 url = "http://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz";
620 name = "console-browserify-1.1.0.tgz";
621 sha1 = "f0241c45730a9fc6323b206dbf38edc741d0bb10";
622 })
623 ];
624 buildInputs =
625 (self.nativeDeps."console-browserify" or []);
626 deps = {
627 "date-now-0.1.4" = self.by-version."date-now"."0.1.4";
628 };
629 peerDependencies = [
630 ];
631 passthru.names = [ "console-browserify" ];
632 };
633 by-spec."core-util-is"."~1.0.0" =
634 self.by-version."core-util-is"."1.0.2";
635 by-version."core-util-is"."1.0.2" = lib.makeOverridable self.buildNodePackage {
636 name = "core-util-is-1.0.2";
637 bin = false;
638 src = [
639 (fetchurl {
640 url = "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz";
641 name = "core-util-is-1.0.2.tgz";
642 sha1 = "b5fd54220aa2bc5ab57aab7140c940754503c1a7";
643 })
644 ];
645 buildInputs =
646 (self.nativeDeps."core-util-is" or []);
647 deps = {
648 };
649 peerDependencies = [
650 ];
651 passthru.names = [ "core-util-is" ];
652 };
653 by-spec."cryptiles"."2.x.x" =
654 self.by-version."cryptiles"."2.0.5";
655 by-version."cryptiles"."2.0.5" = lib.makeOverridable self.buildNodePackage {
656 name = "cryptiles-2.0.5";
657 bin = false;
658 src = [
659 (fetchurl {
660 url = "http://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz";
661 name = "cryptiles-2.0.5.tgz";
662 sha1 = "3bdfecdc608147c1c67202fa291e7dca59eaa3b8";
663 })
664 ];
665 buildInputs =
666 (self.nativeDeps."cryptiles" or []);
667 deps = {
668 "boom-2.10.1" = self.by-version."boom"."2.10.1";
669 };
670 peerDependencies = [
671 ];
672 passthru.names = [ "cryptiles" ];
673 };
674 by-spec."dashdash".">=1.10.1 <2.0.0" =
675 self.by-version."dashdash"."1.12.2";
676 by-version."dashdash"."1.12.2" = lib.makeOverridable self.buildNodePackage {
677 name = "dashdash-1.12.2";
678 bin = false;
679 src = [
680 (fetchurl {
681 url = "http://registry.npmjs.org/dashdash/-/dashdash-1.12.2.tgz";
682 name = "dashdash-1.12.2.tgz";
683 sha1 = "1c6f70588498d047b8cd5777b32ba85a5e25be36";
684 })
685 ];
686 buildInputs =
687 (self.nativeDeps."dashdash" or []);
688 deps = {
689 "assert-plus-0.2.0" = self.by-version."assert-plus"."0.2.0";
690 };
691 peerDependencies = [
692 ];
693 passthru.names = [ "dashdash" ];
694 };
695 by-spec."date-now"."^0.1.4" =
696 self.by-version."date-now"."0.1.4";
697 by-version."date-now"."0.1.4" = lib.makeOverridable self.buildNodePackage {
698 name = "date-now-0.1.4";
699 bin = false;
700 src = [
701 (fetchurl {
702 url = "http://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz";
703 name = "date-now-0.1.4.tgz";
704 sha1 = "eaf439fd4d4848ad74e5cc7dbef200672b9e345b";
705 })
706 ];
707 buildInputs =
708 (self.nativeDeps."date-now" or []);
709 deps = {
710 };
711 peerDependencies = [
712 ];
713 passthru.names = [ "date-now" ];
714 };
715 by-spec."dateformat"."1.0.2-1.2.3" =
716 self.by-version."dateformat"."1.0.2-1.2.3";
717 by-version."dateformat"."1.0.2-1.2.3" = lib.makeOverridable self.buildNodePackage {
718 name = "dateformat-1.0.2-1.2.3";
719 bin = false;
720 src = [
721 (fetchurl {
722 url = "http://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz";
723 name = "dateformat-1.0.2-1.2.3.tgz";
724 sha1 = "b0220c02de98617433b72851cf47de3df2cdbee9";
725 })
726 ];
727 buildInputs =
728 (self.nativeDeps."dateformat" or []);
729 deps = {
730 };
731 peerDependencies = [
732 ];
733 passthru.names = [ "dateformat" ];
734 };
735 by-spec."debug"."~0.7.0" =
736 self.by-version."debug"."0.7.4";
737 by-version."debug"."0.7.4" = lib.makeOverridable self.buildNodePackage {
738 name = "debug-0.7.4";
739 bin = false;
740 src = [
741 (fetchurl {
742 url = "http://registry.npmjs.org/debug/-/debug-0.7.4.tgz";
743 name = "debug-0.7.4.tgz";
744 sha1 = "06e1ea8082c2cb14e39806e22e2f6f757f92af39";
745 })
746 ];
747 buildInputs =
748 (self.nativeDeps."debug" or []);
749 deps = {
750 };
751 peerDependencies = [
752 ];
753 passthru.names = [ "debug" ];
754 };
755 by-spec."delayed-stream"."~1.0.0" =
756 self.by-version."delayed-stream"."1.0.0";
757 by-version."delayed-stream"."1.0.0" = lib.makeOverridable self.buildNodePackage {
758 name = "delayed-stream-1.0.0";
759 bin = false;
760 src = [
761 (fetchurl {
762 url = "http://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz";
763 name = "delayed-stream-1.0.0.tgz";
764 sha1 = "df3ae199acadfb7d440aaae0b29e2272b24ec619";
765 })
766 ];
767 buildInputs =
768 (self.nativeDeps."delayed-stream" or []);
769 deps = {
770 };
771 peerDependencies = [
772 ];
773 passthru.names = [ "delayed-stream" ];
774 };
775 by-spec."dom-serializer"."0" =
776 self.by-version."dom-serializer"."0.1.0";
777 by-version."dom-serializer"."0.1.0" = lib.makeOverridable self.buildNodePackage {
778 name = "dom-serializer-0.1.0";
779 bin = false;
780 src = [
781 (fetchurl {
782 url = "http://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz";
783 name = "dom-serializer-0.1.0.tgz";
784 sha1 = "073c697546ce0780ce23be4a28e293e40bc30c82";
785 })
786 ];
787 buildInputs =
788 (self.nativeDeps."dom-serializer" or []);
789 deps = {
790 "domelementtype-1.1.3" = self.by-version."domelementtype"."1.1.3";
791 "entities-1.1.1" = self.by-version."entities"."1.1.1";
792 };
793 peerDependencies = [
794 ];
795 passthru.names = [ "dom-serializer" ];
796 };
797 by-spec."domelementtype"."1" =
798 self.by-version."domelementtype"."1.3.0";
799 by-version."domelementtype"."1.3.0" = lib.makeOverridable self.buildNodePackage {
800 name = "domelementtype-1.3.0";
801 bin = false;
802 src = [
803 (fetchurl {
804 url = "http://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz";
805 name = "domelementtype-1.3.0.tgz";
806 sha1 = "b17aed82e8ab59e52dd9c19b1756e0fc187204c2";
807 })
808 ];
809 buildInputs =
810 (self.nativeDeps."domelementtype" or []);
811 deps = {
812 };
813 peerDependencies = [
814 ];
815 passthru.names = [ "domelementtype" ];
816 };
817 by-spec."domelementtype"."~1.1.1" =
818 self.by-version."domelementtype"."1.1.3";
819 by-version."domelementtype"."1.1.3" = lib.makeOverridable self.buildNodePackage {
820 name = "domelementtype-1.1.3";
821 bin = false;
822 src = [
823 (fetchurl {
824 url = "http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz";
825 name = "domelementtype-1.1.3.tgz";
826 sha1 = "bd28773e2642881aec51544924299c5cd822185b";
827 })
2032 })
828 ];
2033 sources."grunt-contrib-jshint-0.12.0"
829 buildInputs =
2034 (sources."grunt-contrib-less-1.4.0" // {
830 (self.nativeDeps."domelementtype" or []);
2035 dependencies = [
831 deps = {
2036 sources."async-2.0.1"
832 };
2037 sources."lodash-4.15.0"
833 peerDependencies = [
2038 ];
834 ];
835 passthru.names = [ "domelementtype" ];
836 };
837 by-spec."domhandler"."2.3" =
838 self.by-version."domhandler"."2.3.0";
839 by-version."domhandler"."2.3.0" = lib.makeOverridable self.buildNodePackage {
840 name = "domhandler-2.3.0";
841 bin = false;
842 src = [
843 (fetchurl {
844 url = "http://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz";
845 name = "domhandler-2.3.0.tgz";
846 sha1 = "2de59a0822d5027fabff6f032c2b25a2a8abe738";
847 })
2039 })
848 ];
2040 (sources."grunt-contrib-watch-0.6.1" // {
849 buildInputs =
2041 dependencies = [
850 (self.nativeDeps."domhandler" or []);
2042 sources."lodash-2.4.2"
851 deps = {
2043 sources."async-0.2.10"
852 "domelementtype-1.3.0" = self.by-version."domelementtype"."1.3.0";
2044 ];
853 };
854 peerDependencies = [
855 ];
856 passthru.names = [ "domhandler" ];
857 };
858 by-spec."domutils"."1.5" =
859 self.by-version."domutils"."1.5.1";
860 by-version."domutils"."1.5.1" = lib.makeOverridable self.buildNodePackage {
861 name = "domutils-1.5.1";
862 bin = false;
863 src = [
864 (fetchurl {
865 url = "http://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz";
866 name = "domutils-1.5.1.tgz";
867 sha1 = "dcd8488a26f563d61079e48c9f7b7e32373682cf";
868 })
2045 })
869 ];
2046 sources."crisper-2.0.2"
870 buildInputs =
2047 (sources."vulcanize-1.14.8" // {
871 (self.nativeDeps."domutils" or []);
2048 dependencies = [
872 deps = {
2049 sources."nopt-3.0.6"
873 "dom-serializer-0.1.0" = self.by-version."dom-serializer"."0.1.0";
2050 ];
874 "domelementtype-1.3.0" = self.by-version."domelementtype"."1.3.0";
875 };
876 peerDependencies = [
877 ];
878 passthru.names = [ "domutils" ];
879 };
880 by-spec."ecc-jsbn".">=0.0.1 <1.0.0" =
881 self.by-version."ecc-jsbn"."0.1.1";
882 by-version."ecc-jsbn"."0.1.1" = lib.makeOverridable self.buildNodePackage {
883 name = "ecc-jsbn-0.1.1";
884 bin = false;
885 src = [
886 (fetchurl {
887 url = "http://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz";
888 name = "ecc-jsbn-0.1.1.tgz";
889 sha1 = "0fc73a9ed5f0d53c38193398523ef7e543777505";
890 })
2051 })
891 ];
2052 sources."grunt-crisper-1.0.1"
892 buildInputs =
2053 (sources."grunt-vulcanize-1.0.0" // {
893 (self.nativeDeps."ecc-jsbn" or []);
2054 dependencies = [
894 deps = {
2055 sources."crisper-1.2.0"
895 "jsbn-0.1.0" = self.by-version."jsbn"."0.1.0";
2056 sources."nopt-3.0.6"
896 };
2057 ];
897 peerDependencies = [
2058 })
898 ];
2059 (sources."jshint-2.9.3" // {
899 passthru.names = [ "ecc-jsbn" ];
2060 dependencies = [
900 };
2061 sources."minimatch-3.0.3"
901 by-spec."entities"."1.0" =
2062 sources."lodash-3.7.0"
902 self.by-version."entities"."1.0.0";
2063 ];
903 by-version."entities"."1.0.0" = lib.makeOverridable self.buildNodePackage {
904 name = "entities-1.0.0";
905 bin = false;
906 src = [
907 (fetchurl {
908 url = "http://registry.npmjs.org/entities/-/entities-1.0.0.tgz";
909 name = "entities-1.0.0.tgz";
910 sha1 = "b2987aa3821347fcde642b24fdfc9e4fb712bf26";
911 })
2064 })
912 ];
2065 sources."async-0.1.22"
913 buildInputs =
2066 sources."coffee-script-1.3.3"
914 (self.nativeDeps."entities" or []);
2067 sources."colors-0.6.2"
915 deps = {
2068 sources."dateformat-1.0.2-1.2.3"
916 };
2069 sources."eventemitter2-0.4.14"
917 peerDependencies = [
2070 (sources."findup-sync-0.1.3" // {
918 ];
2071 dependencies = [
919 passthru.names = [ "entities" ];
2072 sources."glob-3.2.11"
920 };
2073 sources."lodash-2.4.2"
921 by-spec."entities"."~1.1.1" =
2074 sources."minimatch-0.3.0"
922 self.by-version."entities"."1.1.1";
2075 ];
923 by-version."entities"."1.1.1" = lib.makeOverridable self.buildNodePackage {
924 name = "entities-1.1.1";
925 bin = false;
926 src = [
927 (fetchurl {
928 url = "http://registry.npmjs.org/entities/-/entities-1.1.1.tgz";
929 name = "entities-1.1.1.tgz";
930 sha1 = "6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0";
931 })
2076 })
932 ];
2077 (sources."glob-3.1.21" // {
933 buildInputs =
2078 dependencies = [
934 (self.nativeDeps."entities" or []);
2079 sources."inherits-1.0.2"
935 deps = {
2080 ];
936 };
937 peerDependencies = [
938 ];
939 passthru.names = [ "entities" ];
940 };
941 by-spec."errno"."^0.1.1" =
942 self.by-version."errno"."0.1.4";
943 by-version."errno"."0.1.4" = lib.makeOverridable self.buildNodePackage {
944 name = "errno-0.1.4";
945 bin = true;
946 src = [
947 (fetchurl {
948 url = "http://registry.npmjs.org/errno/-/errno-0.1.4.tgz";
949 name = "errno-0.1.4.tgz";
950 sha1 = "b896e23a9e5e8ba33871fc996abd3635fc9a1c7d";
951 })
2081 })
952 ];
2082 sources."hooker-0.2.3"
953 buildInputs =
2083 sources."iconv-lite-0.2.11"
954 (self.nativeDeps."errno" or []);
2084 sources."minimatch-0.2.14"
955 deps = {
2085 sources."nopt-1.0.10"
956 "prr-0.0.0" = self.by-version."prr"."0.0.0";
2086 sources."rimraf-2.2.8"
957 };
2087 sources."lodash-0.9.2"
958 peerDependencies = [
2088 sources."underscore.string-2.2.1"
959 ];
2089 sources."which-1.0.9"
960 passthru.names = [ "errno" ];
2090 sources."js-yaml-2.0.5"
961 };
2091 sources."exit-0.1.2"
962 by-spec."escape-string-regexp"."^1.0.0" =
2092 sources."getobject-0.1.0"
963 self.by-version."escape-string-regexp"."1.0.4";
2093 sources."grunt-legacy-util-0.2.0"
964 by-version."escape-string-regexp"."1.0.4" = lib.makeOverridable self.buildNodePackage {
2094 (sources."grunt-legacy-log-0.1.3" // {
965 name = "escape-string-regexp-1.0.4";
2095 dependencies = [
966 bin = false;
2096 sources."lodash-2.4.2"
967 src = [
2097 sources."underscore.string-2.3.3"
968 (fetchurl {
2098 ];
969 url = "http://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.4.tgz";
970 name = "escape-string-regexp-1.0.4.tgz";
971 sha1 = "b85e679b46f72d03fbbe8a3bf7259d535c21b62f";
972 })
973 ];
974 buildInputs =
975 (self.nativeDeps."escape-string-regexp" or []);
976 deps = {
977 };
978 peerDependencies = [
979 ];
980 passthru.names = [ "escape-string-regexp" ];
981 };
982 by-spec."escape-string-regexp"."^1.0.2" =
983 self.by-version."escape-string-regexp"."1.0.4";
984 by-spec."esprima"."~ 1.0.2" =
985 self.by-version."esprima"."1.0.4";
986 by-version."esprima"."1.0.4" = lib.makeOverridable self.buildNodePackage {
987 name = "esprima-1.0.4";
988 bin = true;
989 src = [
990 (fetchurl {
991 url = "http://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz";
992 name = "esprima-1.0.4.tgz";
993 sha1 = "9f557e08fc3b4d26ece9dd34f8fbf476b62585ad";
994 })
995 ];
996 buildInputs =
997 (self.nativeDeps."esprima" or []);
998 deps = {
999 };
1000 peerDependencies = [
1001 ];
1002 passthru.names = [ "esprima" ];
1003 };
1004 by-spec."eventemitter2"."~0.4.13" =
1005 self.by-version."eventemitter2"."0.4.14";
1006 by-version."eventemitter2"."0.4.14" = lib.makeOverridable self.buildNodePackage {
1007 name = "eventemitter2-0.4.14";
1008 bin = false;
1009 src = [
1010 (fetchurl {
1011 url = "http://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz";
1012 name = "eventemitter2-0.4.14.tgz";
1013 sha1 = "8f61b75cde012b2e9eb284d4545583b5643b61ab";
1014 })
2099 })
1015 ];
2100 sources."inherits-2.0.1"
1016 buildInputs =
2101 sources."lru-cache-2.7.3"
1017 (self.nativeDeps."eventemitter2" or []);
2102 sources."sigmund-1.0.1"
1018 deps = {
2103 sources."graceful-fs-1.2.3"
1019 };
2104 sources."abbrev-1.0.9"
1020 peerDependencies = [
2105 (sources."argparse-0.1.16" // {
1021 ];
2106 dependencies = [
1022 passthru.names = [ "eventemitter2" ];
2107 sources."underscore.string-2.4.0"
1023 };
2108 ];
1024 by-spec."exit"."0.1.2" =
1025 self.by-version."exit"."0.1.2";
1026 by-version."exit"."0.1.2" = lib.makeOverridable self.buildNodePackage {
1027 name = "exit-0.1.2";
1028 bin = false;
1029 src = [
1030 (fetchurl {
1031 url = "http://registry.npmjs.org/exit/-/exit-0.1.2.tgz";
1032 name = "exit-0.1.2.tgz";
1033 sha1 = "0632638f8d877cc82107d30a0fff1a17cba1cd0c";
1034 })
1035 ];
1036 buildInputs =
1037 (self.nativeDeps."exit" or []);
1038 deps = {
1039 };
1040 peerDependencies = [
1041 ];
1042 passthru.names = [ "exit" ];
1043 };
1044 by-spec."exit"."0.1.x" =
1045 self.by-version."exit"."0.1.2";
1046 by-spec."exit"."~0.1.1" =
1047 self.by-version."exit"."0.1.2";
1048 by-spec."extend"."~3.0.0" =
1049 self.by-version."extend"."3.0.0";
1050 by-version."extend"."3.0.0" = lib.makeOverridable self.buildNodePackage {
1051 name = "extend-3.0.0";
1052 bin = false;
1053 src = [
1054 (fetchurl {
1055 url = "http://registry.npmjs.org/extend/-/extend-3.0.0.tgz";
1056 name = "extend-3.0.0.tgz";
1057 sha1 = "5a474353b9f3353ddd8176dfd37b91c83a46f1d4";
1058 })
2109 })
1059 ];
2110 sources."esprima-1.0.4"
1060 buildInputs =
2111 sources."underscore-1.7.0"
1061 (self.nativeDeps."extend" or []);
2112 (sources."grunt-legacy-log-utils-0.1.1" // {
1062 deps = {
2113 dependencies = [
1063 };
2114 sources."lodash-2.4.2"
1064 peerDependencies = [
2115 sources."underscore.string-2.3.3"
1065 ];
2116 ];
1066 passthru.names = [ "extend" ];
1067 };
1068 by-spec."extsprintf"."1.0.2" =
1069 self.by-version."extsprintf"."1.0.2";
1070 by-version."extsprintf"."1.0.2" = lib.makeOverridable self.buildNodePackage {
1071 name = "extsprintf-1.0.2";
1072 bin = false;
1073 src = [
1074 (fetchurl {
1075 url = "http://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz";
1076 name = "extsprintf-1.0.2.tgz";
1077 sha1 = "e1080e0658e300b06294990cc70e1502235fd550";
1078 })
2117 })
1079 ];
2118 sources."chalk-1.1.3"
1080 buildInputs =
2119 sources."file-sync-cmp-0.1.1"
1081 (self.nativeDeps."extsprintf" or []);
2120 sources."ansi-styles-2.2.1"
1082 deps = {
2121 sources."escape-string-regexp-1.0.5"
1083 };
2122 sources."has-ansi-2.0.0"
1084 peerDependencies = [
2123 sources."strip-ansi-3.0.1"
1085 ];
2124 sources."supports-color-2.0.0"
1086 passthru.names = [ "extsprintf" ];
2125 sources."ansi-regex-2.0.0"
1087 };
2126 sources."source-map-0.3.0"
1088 by-spec."faye-websocket"."~0.4.3" =
2127 sources."amdefine-1.0.0"
1089 self.by-version."faye-websocket"."0.4.4";
2128 (sources."less-2.7.1" // {
1090 by-version."faye-websocket"."0.4.4" = lib.makeOverridable self.buildNodePackage {
2129 dependencies = [
1091 name = "faye-websocket-0.4.4";
2130 sources."graceful-fs-4.1.6"
1092 bin = false;
2131 sources."source-map-0.5.6"
1093 src = [
2132 ];
1094 (fetchurl {
1095 url = "http://registry.npmjs.org/faye-websocket/-/faye-websocket-0.4.4.tgz";
1096 name = "faye-websocket-0.4.4.tgz";
1097 sha1 = "c14c5b3bf14d7417ffbfd990c0a7495cd9f337bc";
1098 })
1099 ];
1100 buildInputs =
1101 (self.nativeDeps."faye-websocket" or []);
1102 deps = {
1103 };
1104 peerDependencies = [
1105 ];
1106 passthru.names = [ "faye-websocket" ];
1107 };
1108 by-spec."findup-sync"."~0.1.2" =
1109 self.by-version."findup-sync"."0.1.3";
1110 by-version."findup-sync"."0.1.3" = lib.makeOverridable self.buildNodePackage {
1111 name = "findup-sync-0.1.3";
1112 bin = false;
1113 src = [
1114 (fetchurl {
1115 url = "http://registry.npmjs.org/findup-sync/-/findup-sync-0.1.3.tgz";
1116 name = "findup-sync-0.1.3.tgz";
1117 sha1 = "7f3e7a97b82392c653bf06589bd85190e93c3683";
1118 })
2133 })
1119 ];
2134 sources."errno-0.1.4"
1120 buildInputs =
2135 sources."image-size-0.5.0"
1121 (self.nativeDeps."findup-sync" or []);
2136 sources."mime-1.3.4"
1122 deps = {
2137 sources."mkdirp-0.5.1"
1123 "glob-3.2.11" = self.by-version."glob"."3.2.11";
2138 sources."promise-7.1.1"
1124 "lodash-2.4.2" = self.by-version."lodash"."2.4.2";
2139 sources."prr-0.0.0"
1125 };
2140 sources."minimist-0.0.8"
1126 peerDependencies = [
2141 sources."asap-2.0.4"
1127 ];
2142 sources."gaze-0.5.2"
1128 passthru.names = [ "findup-sync" ];
2143 sources."tiny-lr-fork-0.0.5"
1129 };
2144 (sources."globule-0.1.0" // {
1130 by-spec."forever-agent"."~0.6.1" =
2145 dependencies = [
1131 self.by-version."forever-agent"."0.6.1";
2146 sources."lodash-1.0.2"
1132 by-version."forever-agent"."0.6.1" = lib.makeOverridable self.buildNodePackage {
2147 ];
1133 name = "forever-agent-0.6.1";
1134 bin = false;
1135 src = [
1136 (fetchurl {
1137 url = "http://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz";
1138 name = "forever-agent-0.6.1.tgz";
1139 sha1 = "fbc71f0c41adeb37f96c577ad1ed42d8fdacca91";
1140 })
1141 ];
1142 buildInputs =
1143 (self.nativeDeps."forever-agent" or []);
1144 deps = {
1145 };
1146 peerDependencies = [
1147 ];
1148 passthru.names = [ "forever-agent" ];
1149 };
1150 by-spec."form-data"."~1.0.0-rc3" =
1151 self.by-version."form-data"."1.0.0-rc3";
1152 by-version."form-data"."1.0.0-rc3" = lib.makeOverridable self.buildNodePackage {
1153 name = "form-data-1.0.0-rc3";
1154 bin = false;
1155 src = [
1156 (fetchurl {
1157 url = "http://registry.npmjs.org/form-data/-/form-data-1.0.0-rc3.tgz";
1158 name = "form-data-1.0.0-rc3.tgz";
1159 sha1 = "d35bc62e7fbc2937ae78f948aaa0d38d90607577";
1160 })
2148 })
1161 ];
2149 sources."qs-0.5.6"
1162 buildInputs =
2150 sources."faye-websocket-0.4.4"
1163 (self.nativeDeps."form-data" or []);
2151 (sources."noptify-0.0.3" // {
1164 deps = {
2152 dependencies = [
1165 "async-1.5.2" = self.by-version."async"."1.5.2";
2153 sources."nopt-2.0.0"
1166 "combined-stream-1.0.5" = self.by-version."combined-stream"."1.0.5";
2154 ];
1167 "mime-types-2.1.9" = self.by-version."mime-types"."2.1.9";
1168 };
1169 peerDependencies = [
1170 ];
1171 passthru.names = [ "form-data" ];
1172 };
1173 by-spec."gaze"."~0.5.1" =
1174 self.by-version."gaze"."0.5.2";
1175 by-version."gaze"."0.5.2" = lib.makeOverridable self.buildNodePackage {
1176 name = "gaze-0.5.2";
1177 bin = false;
1178 src = [
1179 (fetchurl {
1180 url = "http://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz";
1181 name = "gaze-0.5.2.tgz";
1182 sha1 = "40b709537d24d1d45767db5a908689dfe69ac44f";
1183 })
2155 })
1184 ];
2156 sources."debug-0.7.4"
1185 buildInputs =
2157 sources."command-line-args-2.1.6"
1186 (self.nativeDeps."gaze" or []);
2158 sources."dom5-1.3.3"
1187 deps = {
2159 sources."array-back-1.0.3"
1188 "globule-0.1.0" = self.by-version."globule"."0.1.0";
2160 sources."command-line-usage-2.0.5"
1189 };
2161 sources."core-js-2.4.1"
1190 peerDependencies = [
2162 sources."feature-detect-es6-1.3.1"
1191 ];
2163 (sources."find-replace-1.0.2" // {
1192 passthru.names = [ "gaze" ];
2164 dependencies = [
1193 };
2165 sources."test-value-2.0.0"
1194 by-spec."generate-function"."^2.0.0" =
2166 ];
1195 self.by-version."generate-function"."2.0.0";
1196 by-version."generate-function"."2.0.0" = lib.makeOverridable self.buildNodePackage {
1197 name = "generate-function-2.0.0";
1198 bin = false;
1199 src = [
1200 (fetchurl {
1201 url = "http://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz";
1202 name = "generate-function-2.0.0.tgz";
1203 sha1 = "6858fe7c0969b7d4e9093337647ac79f60dfbe74";
1204 })
1205 ];
1206 buildInputs =
1207 (self.nativeDeps."generate-function" or []);
1208 deps = {
1209 };
1210 peerDependencies = [
1211 ];
1212 passthru.names = [ "generate-function" ];
1213 };
1214 by-spec."generate-object-property"."^1.1.0" =
1215 self.by-version."generate-object-property"."1.2.0";
1216 by-version."generate-object-property"."1.2.0" = lib.makeOverridable self.buildNodePackage {
1217 name = "generate-object-property-1.2.0";
1218 bin = false;
1219 src = [
1220 (fetchurl {
1221 url = "http://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz";
1222 name = "generate-object-property-1.2.0.tgz";
1223 sha1 = "9c0e1c40308ce804f4783618b937fa88f99d50d0";
1224 })
2167 })
1225 ];
2168 sources."typical-2.5.0"
1226 buildInputs =
2169 sources."ansi-escape-sequences-2.2.2"
1227 (self.nativeDeps."generate-object-property" or []);
2170 sources."column-layout-2.1.4"
1228 deps = {
2171 sources."wordwrapjs-1.2.1"
1229 "is-property-1.0.2" = self.by-version."is-property"."1.0.2";
2172 sources."collect-all-0.2.1"
1230 };
2173 sources."stream-connect-1.0.2"
1231 peerDependencies = [
2174 sources."stream-via-0.1.1"
1232 ];
2175 (sources."collect-json-1.0.8" // {
1233 passthru.names = [ "generate-object-property" ];
2176 dependencies = [
1234 };
2177 sources."collect-all-1.0.2"
1235 by-spec."getobject"."~0.1.0" =
2178 sources."stream-via-1.0.3"
1236 self.by-version."getobject"."0.1.0";
2179 ];
1237 by-version."getobject"."0.1.0" = lib.makeOverridable self.buildNodePackage {
1238 name = "getobject-0.1.0";
1239 bin = false;
1240 src = [
1241 (fetchurl {
1242 url = "http://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz";
1243 name = "getobject-0.1.0.tgz";
1244 sha1 = "047a449789fa160d018f5486ed91320b6ec7885c";
1245 })
1246 ];
1247 buildInputs =
1248 (self.nativeDeps."getobject" or []);
1249 deps = {
1250 };
1251 peerDependencies = [
1252 ];
1253 passthru.names = [ "getobject" ];
1254 };
1255 by-spec."glob"."~ 3.2.1" =
1256 self.by-version."glob"."3.2.11";
1257 by-version."glob"."3.2.11" = lib.makeOverridable self.buildNodePackage {
1258 name = "glob-3.2.11";
1259 bin = false;
1260 src = [
1261 (fetchurl {
1262 url = "http://registry.npmjs.org/glob/-/glob-3.2.11.tgz";
1263 name = "glob-3.2.11.tgz";
1264 sha1 = "4a973f635b9190f715d10987d5c00fd2815ebe3d";
1265 })
2180 })
1266 ];
2181 sources."deep-extend-0.4.1"
1267 buildInputs =
2182 sources."object-tools-2.0.6"
1268 (self.nativeDeps."glob" or []);
2183 sources."object-get-2.1.0"
1269 deps = {
2184 sources."test-value-1.1.0"
1270 "inherits-2.0.1" = self.by-version."inherits"."2.0.1";
2185 sources."@types/clone-0.1.29"
1271 "minimatch-0.3.0" = self.by-version."minimatch"."0.3.0";
2186 sources."@types/node-4.0.30"
1272 };
2187 (sources."@types/parse5-0.0.28" // {
1273 peerDependencies = [
2188 dependencies = [
1274 ];
2189 sources."@types/node-6.0.37"
1275 passthru.names = [ "glob" ];
2190 ];
1276 };
1277 by-spec."glob"."~3.1.21" =
1278 self.by-version."glob"."3.1.21";
1279 by-version."glob"."3.1.21" = lib.makeOverridable self.buildNodePackage {
1280 name = "glob-3.1.21";
1281 bin = false;
1282 src = [
1283 (fetchurl {
1284 url = "http://registry.npmjs.org/glob/-/glob-3.1.21.tgz";
1285 name = "glob-3.1.21.tgz";
1286 sha1 = "d29e0a055dea5138f4d07ed40e8982e83c2066cd";
1287 })
1288 ];
1289 buildInputs =
1290 (self.nativeDeps."glob" or []);
1291 deps = {
1292 "minimatch-0.2.14" = self.by-version."minimatch"."0.2.14";
1293 "graceful-fs-1.2.3" = self.by-version."graceful-fs"."1.2.3";
1294 "inherits-1.0.2" = self.by-version."inherits"."1.0.2";
1295 };
1296 peerDependencies = [
1297 ];
1298 passthru.names = [ "glob" ];
1299 };
1300 by-spec."glob"."~3.2.9" =
1301 self.by-version."glob"."3.2.11";
1302 by-spec."globule"."~0.1.0" =
1303 self.by-version."globule"."0.1.0";
1304 by-version."globule"."0.1.0" = lib.makeOverridable self.buildNodePackage {
1305 name = "globule-0.1.0";
1306 bin = false;
1307 src = [
1308 (fetchurl {
1309 url = "http://registry.npmjs.org/globule/-/globule-0.1.0.tgz";
1310 name = "globule-0.1.0.tgz";
1311 sha1 = "d9c8edde1da79d125a151b79533b978676346ae5";
1312 })
2191 })
1313 ];
2192 sources."clone-1.0.2"
1314 buildInputs =
2193 sources."parse5-1.5.1"
1315 (self.nativeDeps."globule" or []);
2194 sources."es6-promise-2.3.0"
1316 deps = {
2195 sources."hydrolysis-1.24.1"
1317 "lodash-1.0.2" = self.by-version."lodash"."1.0.2";
2196 sources."path-posix-1.0.0"
1318 "glob-3.1.21" = self.by-version."glob"."3.1.21";
2197 sources."update-notifier-0.6.3"
1319 "minimatch-0.2.14" = self.by-version."minimatch"."0.2.14";
2198 sources."babel-polyfill-6.13.0"
1320 };
2199 sources."doctrine-0.7.2"
1321 peerDependencies = [
2200 (sources."escodegen-1.8.1" // {
1322 ];
2201 dependencies = [
1323 passthru.names = [ "globule" ];
2202 sources."estraverse-1.9.3"
1324 };
2203 sources."esutils-2.0.2"
1325 by-spec."graceful-fs"."^3.0.5" =
2204 sources."esprima-2.7.3"
1326 self.by-version."graceful-fs"."3.0.8";
2205 sources."source-map-0.2.0"
1327 by-version."graceful-fs"."3.0.8" = lib.makeOverridable self.buildNodePackage {
2206 ];
1328 name = "graceful-fs-3.0.8";
1329 bin = false;
1330 src = [
1331 (fetchurl {
1332 url = "http://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz";
1333 name = "graceful-fs-3.0.8.tgz";
1334 sha1 = "ce813e725fa82f7e6147d51c9a5ca68270551c22";
1335 })
1336 ];
1337 buildInputs =
1338 (self.nativeDeps."graceful-fs" or []);
1339 deps = {
1340 };
1341 peerDependencies = [
1342 ];
1343 passthru.names = [ "graceful-fs" ];
1344 };
1345 by-spec."graceful-fs"."~1.2.0" =
1346 self.by-version."graceful-fs"."1.2.3";
1347 by-version."graceful-fs"."1.2.3" = lib.makeOverridable self.buildNodePackage {
1348 name = "graceful-fs-1.2.3";
1349 bin = false;
1350 src = [
1351 (fetchurl {
1352 url = "http://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz";
1353 name = "graceful-fs-1.2.3.tgz";
1354 sha1 = "15a4806a57547cb2d2dbf27f42e89a8c3451b364";
1355 })
1356 ];
1357 buildInputs =
1358 (self.nativeDeps."graceful-fs" or []);
1359 deps = {
1360 };
1361 peerDependencies = [
1362 ];
1363 passthru.names = [ "graceful-fs" ];
1364 };
1365 by-spec."graceful-readlink".">= 1.0.0" =
1366 self.by-version."graceful-readlink"."1.0.1";
1367 by-version."graceful-readlink"."1.0.1" = lib.makeOverridable self.buildNodePackage {
1368 name = "graceful-readlink-1.0.1";
1369 bin = false;
1370 src = [
1371 (fetchurl {
1372 url = "http://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz";
1373 name = "graceful-readlink-1.0.1.tgz";
1374 sha1 = "4cafad76bc62f02fa039b2f94e9a3dd3a391a725";
1375 })
2207 })
1376 ];
2208 sources."espree-3.1.7"
1377 buildInputs =
2209 sources."estraverse-3.1.0"
1378 (self.nativeDeps."graceful-readlink" or []);
2210 sources."path-is-absolute-1.0.0"
1379 deps = {
2211 sources."babel-runtime-6.11.6"
1380 };
2212 sources."regenerator-runtime-0.9.5"
1381 peerDependencies = [
2213 sources."esutils-1.1.6"
1382 ];
2214 sources."isarray-0.0.1"
1383 passthru.names = [ "graceful-readlink" ];
2215 sources."optionator-0.8.1"
1384 };
2216 sources."prelude-ls-1.1.2"
1385 by-spec."grunt".">=0.4.0" =
2217 sources."deep-is-0.1.3"
1386 self.by-version."grunt"."0.4.5";
2218 sources."wordwrap-1.0.0"
1387 by-version."grunt"."0.4.5" = lib.makeOverridable self.buildNodePackage {
2219 sources."type-check-0.3.2"
1388 name = "grunt-0.4.5";
2220 sources."levn-0.3.0"
1389 bin = false;
2221 sources."fast-levenshtein-1.1.4"
1390 src = [
2222 sources."acorn-3.3.0"
1391 (fetchurl {
2223 sources."acorn-jsx-3.0.1"
1392 url = "http://registry.npmjs.org/grunt/-/grunt-0.4.5.tgz";
2224 sources."boxen-0.3.1"
1393 name = "grunt-0.4.5.tgz";
2225 (sources."configstore-2.0.0" // {
1394 sha1 = "56937cd5194324adff6d207631832a9d6ba4e7f0";
2226 dependencies = [
1395 })
2227 sources."graceful-fs-4.1.6"
1396 ];
2228 ];
1397 buildInputs =
1398 (self.nativeDeps."grunt" or []);
1399 deps = {
1400 "async-0.1.22" = self.by-version."async"."0.1.22";
1401 "coffee-script-1.3.3" = self.by-version."coffee-script"."1.3.3";
1402 "colors-0.6.2" = self.by-version."colors"."0.6.2";
1403 "dateformat-1.0.2-1.2.3" = self.by-version."dateformat"."1.0.2-1.2.3";
1404 "eventemitter2-0.4.14" = self.by-version."eventemitter2"."0.4.14";
1405 "findup-sync-0.1.3" = self.by-version."findup-sync"."0.1.3";
1406 "glob-3.1.21" = self.by-version."glob"."3.1.21";
1407 "hooker-0.2.3" = self.by-version."hooker"."0.2.3";
1408 "iconv-lite-0.2.11" = self.by-version."iconv-lite"."0.2.11";
1409 "minimatch-0.2.14" = self.by-version."minimatch"."0.2.14";
1410 "nopt-1.0.10" = self.by-version."nopt"."1.0.10";
1411 "rimraf-2.2.8" = self.by-version."rimraf"."2.2.8";
1412 "lodash-0.9.2" = self.by-version."lodash"."0.9.2";
1413 "underscore.string-2.2.1" = self.by-version."underscore.string"."2.2.1";
1414 "which-1.0.9" = self.by-version."which"."1.0.9";
1415 "js-yaml-2.0.5" = self.by-version."js-yaml"."2.0.5";
1416 "exit-0.1.2" = self.by-version."exit"."0.1.2";
1417 "getobject-0.1.0" = self.by-version."getobject"."0.1.0";
1418 "grunt-legacy-util-0.2.0" = self.by-version."grunt-legacy-util"."0.2.0";
1419 "grunt-legacy-log-0.1.3" = self.by-version."grunt-legacy-log"."0.1.3";
1420 };
1421 peerDependencies = [
1422 ];
1423 passthru.names = [ "grunt" ];
1424 };
1425 by-spec."grunt"."^0.4.5" =
1426 self.by-version."grunt"."0.4.5";
1427 "grunt" = self.by-version."grunt"."0.4.5";
1428 by-spec."grunt"."~0.4.0" =
1429 self.by-version."grunt"."0.4.5";
1430 by-spec."grunt-contrib-concat"."^0.5.1" =
1431 self.by-version."grunt-contrib-concat"."0.5.1";
1432 by-version."grunt-contrib-concat"."0.5.1" = lib.makeOverridable self.buildNodePackage {
1433 name = "grunt-contrib-concat-0.5.1";
1434 bin = false;
1435 src = [
1436 (fetchurl {
1437 url = "http://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-0.5.1.tgz";
1438 name = "grunt-contrib-concat-0.5.1.tgz";
1439 sha1 = "953c6efdfdfd2c107ab9c85077f2d4b24d31cd49";
1440 })
2229 })
1441 ];
2230 sources."is-npm-1.0.0"
1442 buildInputs =
2231 sources."latest-version-2.0.0"
1443 (self.nativeDeps."grunt-contrib-concat" or []);
2232 sources."semver-diff-2.1.0"
1444 deps = {
2233 sources."filled-array-1.1.0"
1445 "chalk-0.5.1" = self.by-version."chalk"."0.5.1";
2234 sources."object-assign-4.1.0"
1446 "source-map-0.3.0" = self.by-version."source-map"."0.3.0";
2235 sources."repeating-2.0.1"
1447 };
2236 sources."string-width-1.0.2"
1448 peerDependencies = [
2237 sources."widest-line-1.0.0"
1449 self.by-version."grunt"."0.4.5"
2238 sources."is-finite-1.0.1"
1450 ];
2239 sources."number-is-nan-1.0.0"
1451 passthru.names = [ "grunt-contrib-concat" ];
2240 sources."code-point-at-1.0.0"
1452 };
2241 sources."is-fullwidth-code-point-1.0.0"
1453 "grunt-contrib-concat" = self.by-version."grunt-contrib-concat"."0.5.1";
2242 sources."dot-prop-2.4.0"
1454 by-spec."grunt-contrib-jshint"."^0.12.0" =
2243 sources."os-tmpdir-1.0.1"
1455 self.by-version."grunt-contrib-jshint"."0.12.0";
2244 sources."osenv-0.1.3"
1456 by-version."grunt-contrib-jshint"."0.12.0" = lib.makeOverridable self.buildNodePackage {
2245 sources."uuid-2.0.2"
1457 name = "grunt-contrib-jshint-0.12.0";
2246 (sources."write-file-atomic-1.2.0" // {
1458 bin = false;
2247 dependencies = [
1459 src = [
2248 sources."graceful-fs-4.1.6"
1460 (fetchurl {
2249 ];
1461 url = "http://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-0.12.0.tgz";
1462 name = "grunt-contrib-jshint-0.12.0.tgz";
1463 sha1 = "f6b2f06fc715264837a7ab6c69a1ce1a689c2c29";
1464 })
1465 ];
1466 buildInputs =
1467 (self.nativeDeps."grunt-contrib-jshint" or []);
1468 deps = {
1469 "hooker-0.2.3" = self.by-version."hooker"."0.2.3";
1470 "jshint-2.9.1" = self.by-version."jshint"."2.9.1";
1471 };
1472 peerDependencies = [
1473 self.by-version."grunt"."0.4.5"
1474 ];
1475 passthru.names = [ "grunt-contrib-jshint" ];
1476 };
1477 "grunt-contrib-jshint" = self.by-version."grunt-contrib-jshint"."0.12.0";
1478 by-spec."grunt-contrib-less"."^1.1.0" =
1479 self.by-version."grunt-contrib-less"."1.1.0";
1480 by-version."grunt-contrib-less"."1.1.0" = lib.makeOverridable self.buildNodePackage {
1481 name = "grunt-contrib-less-1.1.0";
1482 bin = false;
1483 src = [
1484 (fetchurl {
1485 url = "http://registry.npmjs.org/grunt-contrib-less/-/grunt-contrib-less-1.1.0.tgz";
1486 name = "grunt-contrib-less-1.1.0.tgz";
1487 sha1 = "44d5c5521ad76f3675a12374125d019b5dd03f51";
1488 })
2250 })
1489 ];
2251 sources."xdg-basedir-2.0.0"
1490 buildInputs =
2252 sources."is-obj-1.0.1"
1491 (self.nativeDeps."grunt-contrib-less" or []);
2253 sources."os-homedir-1.0.1"
1492 deps = {
2254 sources."imurmurhash-0.1.4"
1493 "async-0.9.2" = self.by-version."async"."0.9.2";
2255 sources."slide-1.1.6"
1494 "chalk-1.1.1" = self.by-version."chalk"."1.1.1";
2256 sources."package-json-2.3.3"
1495 "less-2.5.3" = self.by-version."less"."2.5.3";
2257 sources."got-5.6.0"
1496 "lodash-3.10.1" = self.by-version."lodash"."3.10.1";
2258 (sources."rc-1.1.6" // {
1497 };
2259 dependencies = [
1498 peerDependencies = [
2260 sources."minimist-1.2.0"
1499 self.by-version."grunt"."0.4.5"
2261 ];
1500 ];
1501 passthru.names = [ "grunt-contrib-less" ];
1502 };
1503 "grunt-contrib-less" = self.by-version."grunt-contrib-less"."1.1.0";
1504 by-spec."grunt-contrib-watch"."^0.6.1" =
1505 self.by-version."grunt-contrib-watch"."0.6.1";
1506 by-version."grunt-contrib-watch"."0.6.1" = lib.makeOverridable self.buildNodePackage {
1507 name = "grunt-contrib-watch-0.6.1";
1508 bin = false;
1509 src = [
1510 (fetchurl {
1511 url = "http://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-0.6.1.tgz";
1512 name = "grunt-contrib-watch-0.6.1.tgz";
1513 sha1 = "64fdcba25a635f5b4da1b6ce6f90da0aeb6e3f15";
1514 })
1515 ];
1516 buildInputs =
1517 (self.nativeDeps."grunt-contrib-watch" or []);
1518 deps = {
1519 "gaze-0.5.2" = self.by-version."gaze"."0.5.2";
1520 "tiny-lr-fork-0.0.5" = self.by-version."tiny-lr-fork"."0.0.5";
1521 "lodash-2.4.2" = self.by-version."lodash"."2.4.2";
1522 "async-0.2.10" = self.by-version."async"."0.2.10";
1523 };
1524 peerDependencies = [
1525 self.by-version."grunt"."0.4.5"
1526 ];
1527 passthru.names = [ "grunt-contrib-watch" ];
1528 };
1529 "grunt-contrib-watch" = self.by-version."grunt-contrib-watch"."0.6.1";
1530 by-spec."grunt-legacy-log"."~0.1.0" =
1531 self.by-version."grunt-legacy-log"."0.1.3";
1532 by-version."grunt-legacy-log"."0.1.3" = lib.makeOverridable self.buildNodePackage {
1533 name = "grunt-legacy-log-0.1.3";
1534 bin = false;
1535 src = [
1536 (fetchurl {
1537 url = "http://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-0.1.3.tgz";
1538 name = "grunt-legacy-log-0.1.3.tgz";
1539 sha1 = "ec29426e803021af59029f87d2f9cd7335a05531";
1540 })
2262 })
1541 ];
2263 sources."registry-url-3.1.0"
1542 buildInputs =
2264 sources."semver-5.3.0"
1543 (self.nativeDeps."grunt-legacy-log" or []);
2265 sources."create-error-class-3.0.2"
1544 deps = {
2266 sources."duplexer2-0.1.4"
1545 "colors-0.6.2" = self.by-version."colors"."0.6.2";
2267 sources."is-plain-obj-1.1.0"
1546 "grunt-legacy-log-utils-0.1.1" = self.by-version."grunt-legacy-log-utils"."0.1.1";
2268 sources."is-redirect-1.0.0"
1547 "hooker-0.2.3" = self.by-version."hooker"."0.2.3";
2269 sources."is-retry-allowed-1.1.0"
1548 "lodash-2.4.2" = self.by-version."lodash"."2.4.2";
2270 sources."is-stream-1.1.0"
1549 "underscore.string-2.3.3" = self.by-version."underscore.string"."2.3.3";
2271 sources."lowercase-keys-1.0.0"
1550 };
2272 sources."node-status-codes-1.0.0"
1551 peerDependencies = [
2273 sources."parse-json-2.2.0"
1552 ];
2274 sources."pinkie-promise-2.0.1"
1553 passthru.names = [ "grunt-legacy-log" ];
2275 sources."read-all-stream-3.1.0"
1554 };
2276 (sources."readable-stream-2.1.5" // {
1555 by-spec."grunt-legacy-log-utils"."~0.1.1" =
2277 dependencies = [
1556 self.by-version."grunt-legacy-log-utils"."0.1.1";
2278 sources."isarray-1.0.0"
1557 by-version."grunt-legacy-log-utils"."0.1.1" = lib.makeOverridable self.buildNodePackage {
2279 ];
1558 name = "grunt-legacy-log-utils-0.1.1";
1559 bin = false;
1560 src = [
1561 (fetchurl {
1562 url = "http://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-0.1.1.tgz";
1563 name = "grunt-legacy-log-utils-0.1.1.tgz";
1564 sha1 = "c0706b9dd9064e116f36f23fe4e6b048672c0f7e";
1565 })
1566 ];
1567 buildInputs =
1568 (self.nativeDeps."grunt-legacy-log-utils" or []);
1569 deps = {
1570 "lodash-2.4.2" = self.by-version."lodash"."2.4.2";
1571 "underscore.string-2.3.3" = self.by-version."underscore.string"."2.3.3";
1572 "colors-0.6.2" = self.by-version."colors"."0.6.2";
1573 };
1574 peerDependencies = [
1575 ];
1576 passthru.names = [ "grunt-legacy-log-utils" ];
1577 };
1578 by-spec."grunt-legacy-util"."~0.2.0" =
1579 self.by-version."grunt-legacy-util"."0.2.0";
1580 by-version."grunt-legacy-util"."0.2.0" = lib.makeOverridable self.buildNodePackage {
1581 name = "grunt-legacy-util-0.2.0";
1582 bin = false;
1583 src = [
1584 (fetchurl {
1585 url = "http://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-0.2.0.tgz";
1586 name = "grunt-legacy-util-0.2.0.tgz";
1587 sha1 = "93324884dbf7e37a9ff7c026dff451d94a9e554b";
1588 })
2280 })
1589 ];
2281 sources."timed-out-2.0.0"
1590 buildInputs =
2282 sources."unzip-response-1.0.0"
1591 (self.nativeDeps."grunt-legacy-util" or []);
2283 sources."url-parse-lax-1.0.0"
1592 deps = {
2284 sources."capture-stack-trace-1.0.0"
1593 "hooker-0.2.3" = self.by-version."hooker"."0.2.3";
2285 sources."error-ex-1.3.0"
1594 "async-0.1.22" = self.by-version."async"."0.1.22";
2286 sources."is-arrayish-0.2.1"
1595 "lodash-0.9.2" = self.by-version."lodash"."0.9.2";
2287 sources."pinkie-2.0.4"
1596 "exit-0.1.2" = self.by-version."exit"."0.1.2";
2288 sources."buffer-shims-1.0.0"
1597 "underscore.string-2.2.1" = self.by-version."underscore.string"."2.2.1";
2289 sources."core-util-is-1.0.2"
1598 "getobject-0.1.0" = self.by-version."getobject"."0.1.0";
2290 sources."process-nextick-args-1.0.7"
1599 "which-1.0.9" = self.by-version."which"."1.0.9";
2291 sources."string_decoder-0.10.31"
1600 };
2292 sources."util-deprecate-1.0.2"
1601 peerDependencies = [
2293 sources."prepend-http-1.0.4"
1602 ];
2294 sources."ini-1.3.4"
1603 passthru.names = [ "grunt-legacy-util" ];
2295 sources."strip-json-comments-1.0.4"
1604 };
2296 (sources."cli-1.0.0" // {
1605 by-spec."har-validator"."~2.0.2" =
2297 dependencies = [
1606 self.by-version."har-validator"."2.0.6";
2298 sources."glob-7.0.6"
1607 by-version."har-validator"."2.0.6" = lib.makeOverridable self.buildNodePackage {
2299 sources."minimatch-3.0.3"
1608 name = "har-validator-2.0.6";
2300 ];
1609 bin = true;
1610 src = [
1611 (fetchurl {
1612 url = "http://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz";
1613 name = "har-validator-2.0.6.tgz";
1614 sha1 = "cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d";
1615 })
2301 })
1616 ];
2302 sources."console-browserify-1.1.0"
1617 buildInputs =
2303 (sources."htmlparser2-3.8.3" // {
1618 (self.nativeDeps."har-validator" or []);
2304 dependencies = [
1619 deps = {
2305 sources."readable-stream-1.1.14"
1620 "chalk-1.1.1" = self.by-version."chalk"."1.1.1";
2306 ];
1621 "commander-2.9.0" = self.by-version."commander"."2.9.0";
1622 "is-my-json-valid-2.12.4" = self.by-version."is-my-json-valid"."2.12.4";
1623 "pinkie-promise-2.0.0" = self.by-version."pinkie-promise"."2.0.0";
1624 };
1625 peerDependencies = [
1626 ];
1627 passthru.names = [ "har-validator" ];
1628 };
1629 by-spec."has-ansi"."^0.1.0" =
1630 self.by-version."has-ansi"."0.1.0";
1631 by-version."has-ansi"."0.1.0" = lib.makeOverridable self.buildNodePackage {
1632 name = "has-ansi-0.1.0";
1633 bin = true;
1634 src = [
1635 (fetchurl {
1636 url = "http://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz";
1637 name = "has-ansi-0.1.0.tgz";
1638 sha1 = "84f265aae8c0e6a88a12d7022894b7568894c62e";
1639 })
2307 })
1640 ];
2308 sources."shelljs-0.3.0"
1641 buildInputs =
2309 sources."fs.realpath-1.0.0"
1642 (self.nativeDeps."has-ansi" or []);
2310 sources."inflight-1.0.5"
1643 deps = {
2311 sources."once-1.3.3"
1644 "ansi-regex-0.2.1" = self.by-version."ansi-regex"."0.2.1";
2312 sources."wrappy-1.0.2"
1645 };
2313 sources."brace-expansion-1.1.6"
1646 peerDependencies = [
2314 sources."balanced-match-0.4.2"
1647 ];
2315 sources."concat-map-0.0.1"
1648 passthru.names = [ "has-ansi" ];
2316 sources."date-now-0.1.4"
1649 };
2317 sources."domhandler-2.3.0"
1650 by-spec."has-ansi"."^2.0.0" =
2318 sources."domutils-1.5.1"
1651 self.by-version."has-ansi"."2.0.0";
2319 sources."domelementtype-1.3.0"
1652 by-version."has-ansi"."2.0.0" = lib.makeOverridable self.buildNodePackage {
2320 sources."entities-1.0.0"
1653 name = "has-ansi-2.0.0";
2321 (sources."dom-serializer-0.1.0" // {
1654 bin = false;
2322 dependencies = [
1655 src = [
2323 sources."domelementtype-1.1.3"
1656 (fetchurl {
2324 sources."entities-1.1.1"
1657 url = "http://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz";
2325 ];
1658 name = "has-ansi-2.0.0.tgz";
1659 sha1 = "34f5049ce1ecdf2b0649af3ef24e45ed35416d91";
1660 })
2326 })
1661 ];
2327 ];
1662 buildInputs =
2328 meta = {
1663 (self.nativeDeps."has-ansi" or []);
1664 deps = {
1665 "ansi-regex-2.0.0" = self.by-version."ansi-regex"."2.0.0";
1666 };
1667 peerDependencies = [
1668 ];
1669 passthru.names = [ "has-ansi" ];
1670 };
1671 by-spec."hawk"."~3.1.0" =
1672 self.by-version."hawk"."3.1.3";
1673 by-version."hawk"."3.1.3" = lib.makeOverridable self.buildNodePackage {
1674 name = "hawk-3.1.3";
1675 bin = false;
1676 src = [
1677 (fetchurl {
1678 url = "http://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz";
1679 name = "hawk-3.1.3.tgz";
1680 sha1 = "078444bd7c1640b0fe540d2c9b73d59678e8e1c4";
1681 })
1682 ];
1683 buildInputs =
1684 (self.nativeDeps."hawk" or []);
1685 deps = {
1686 "hoek-2.16.3" = self.by-version."hoek"."2.16.3";
1687 "boom-2.10.1" = self.by-version."boom"."2.10.1";
1688 "cryptiles-2.0.5" = self.by-version."cryptiles"."2.0.5";
1689 "sntp-1.0.9" = self.by-version."sntp"."1.0.9";
1690 };
1691 peerDependencies = [
1692 ];
1693 passthru.names = [ "hawk" ];
1694 };
1695 by-spec."hoek"."2.x.x" =
1696 self.by-version."hoek"."2.16.3";
1697 by-version."hoek"."2.16.3" = lib.makeOverridable self.buildNodePackage {
1698 name = "hoek-2.16.3";
1699 bin = false;
1700 src = [
1701 (fetchurl {
1702 url = "http://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz";
1703 name = "hoek-2.16.3.tgz";
1704 sha1 = "20bb7403d3cea398e91dc4710a8ff1b8274a25ed";
1705 })
1706 ];
1707 buildInputs =
1708 (self.nativeDeps."hoek" or []);
1709 deps = {
1710 };
1711 peerDependencies = [
1712 ];
1713 passthru.names = [ "hoek" ];
1714 };
1715 by-spec."hooker"."^0.2.3" =
1716 self.by-version."hooker"."0.2.3";
1717 by-version."hooker"."0.2.3" = lib.makeOverridable self.buildNodePackage {
1718 name = "hooker-0.2.3";
1719 bin = false;
1720 src = [
1721 (fetchurl {
1722 url = "http://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz";
1723 name = "hooker-0.2.3.tgz";
1724 sha1 = "b834f723cc4a242aa65963459df6d984c5d3d959";
1725 })
1726 ];
1727 buildInputs =
1728 (self.nativeDeps."hooker" or []);
1729 deps = {
1730 };
1731 peerDependencies = [
1732 ];
1733 passthru.names = [ "hooker" ];
1734 };
1735 by-spec."hooker"."~0.2.3" =
1736 self.by-version."hooker"."0.2.3";
1737 by-spec."htmlparser2"."3.8.x" =
1738 self.by-version."htmlparser2"."3.8.3";
1739 by-version."htmlparser2"."3.8.3" = lib.makeOverridable self.buildNodePackage {
1740 name = "htmlparser2-3.8.3";
1741 bin = false;
1742 src = [
1743 (fetchurl {
1744 url = "http://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz";
1745 name = "htmlparser2-3.8.3.tgz";
1746 sha1 = "996c28b191516a8be86501a7d79757e5c70c1068";
1747 })
1748 ];
1749 buildInputs =
1750 (self.nativeDeps."htmlparser2" or []);
1751 deps = {
1752 "domhandler-2.3.0" = self.by-version."domhandler"."2.3.0";
1753 "domutils-1.5.1" = self.by-version."domutils"."1.5.1";
1754 "domelementtype-1.3.0" = self.by-version."domelementtype"."1.3.0";
1755 "readable-stream-1.1.13" = self.by-version."readable-stream"."1.1.13";
1756 "entities-1.0.0" = self.by-version."entities"."1.0.0";
1757 };
1758 peerDependencies = [
1759 ];
1760 passthru.names = [ "htmlparser2" ];
1761 };
1762 by-spec."http-signature"."~1.1.0" =
1763 self.by-version."http-signature"."1.1.0";
1764 by-version."http-signature"."1.1.0" = lib.makeOverridable self.buildNodePackage {
1765 name = "http-signature-1.1.0";
1766 bin = false;
1767 src = [
1768 (fetchurl {
1769 url = "http://registry.npmjs.org/http-signature/-/http-signature-1.1.0.tgz";
1770 name = "http-signature-1.1.0.tgz";
1771 sha1 = "5d2d7e9b6ef49980ad5b128d8e4ef09a31c90d95";
1772 })
1773 ];
1774 buildInputs =
1775 (self.nativeDeps."http-signature" or []);
1776 deps = {
1777 "assert-plus-0.1.5" = self.by-version."assert-plus"."0.1.5";
1778 "jsprim-1.2.2" = self.by-version."jsprim"."1.2.2";
1779 "sshpk-1.7.3" = self.by-version."sshpk"."1.7.3";
1780 };
1781 peerDependencies = [
1782 ];
1783 passthru.names = [ "http-signature" ];
1784 };
1785 by-spec."iconv-lite"."~0.2.11" =
1786 self.by-version."iconv-lite"."0.2.11";
1787 by-version."iconv-lite"."0.2.11" = lib.makeOverridable self.buildNodePackage {
1788 name = "iconv-lite-0.2.11";
1789 bin = false;
1790 src = [
1791 (fetchurl {
1792 url = "http://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz";
1793 name = "iconv-lite-0.2.11.tgz";
1794 sha1 = "1ce60a3a57864a292d1321ff4609ca4bb965adc8";
1795 })
1796 ];
1797 buildInputs =
1798 (self.nativeDeps."iconv-lite" or []);
1799 deps = {
1800 };
1801 peerDependencies = [
1802 ];
1803 passthru.names = [ "iconv-lite" ];
1804 };
1805 by-spec."image-size"."~0.3.5" =
1806 self.by-version."image-size"."0.3.5";
1807 by-version."image-size"."0.3.5" = lib.makeOverridable self.buildNodePackage {
1808 name = "image-size-0.3.5";
1809 bin = true;
1810 src = [
1811 (fetchurl {
1812 url = "http://registry.npmjs.org/image-size/-/image-size-0.3.5.tgz";
1813 name = "image-size-0.3.5.tgz";
1814 sha1 = "83240eab2fb5b00b04aab8c74b0471e9cba7ad8c";
1815 })
1816 ];
1817 buildInputs =
1818 (self.nativeDeps."image-size" or []);
1819 deps = {
1820 };
1821 peerDependencies = [
1822 ];
1823 passthru.names = [ "image-size" ];
1824 };
1825 by-spec."inherits"."1" =
1826 self.by-version."inherits"."1.0.2";
1827 by-version."inherits"."1.0.2" = lib.makeOverridable self.buildNodePackage {
1828 name = "inherits-1.0.2";
1829 bin = false;
1830 src = [
1831 (fetchurl {
1832 url = "http://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz";
1833 name = "inherits-1.0.2.tgz";
1834 sha1 = "ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b";
1835 })
1836 ];
1837 buildInputs =
1838 (self.nativeDeps."inherits" or []);
1839 deps = {
1840 };
1841 peerDependencies = [
1842 ];
1843 passthru.names = [ "inherits" ];
1844 };
1845 by-spec."inherits"."2" =
1846 self.by-version."inherits"."2.0.1";
1847 by-version."inherits"."2.0.1" = lib.makeOverridable self.buildNodePackage {
1848 name = "inherits-2.0.1";
1849 bin = false;
1850 src = [
1851 (fetchurl {
1852 url = "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz";
1853 name = "inherits-2.0.1.tgz";
1854 sha1 = "b17d08d326b4423e568eff719f91b0b1cbdf69f1";
1855 })
1856 ];
1857 buildInputs =
1858 (self.nativeDeps."inherits" or []);
1859 deps = {
1860 };
1861 peerDependencies = [
1862 ];
1863 passthru.names = [ "inherits" ];
1864 };
1865 by-spec."inherits"."~2.0.1" =
1866 self.by-version."inherits"."2.0.1";
1867 by-spec."is-my-json-valid"."^2.12.4" =
1868 self.by-version."is-my-json-valid"."2.12.4";
1869 by-version."is-my-json-valid"."2.12.4" = lib.makeOverridable self.buildNodePackage {
1870 name = "is-my-json-valid-2.12.4";
1871 bin = false;
1872 src = [
1873 (fetchurl {
1874 url = "http://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.12.4.tgz";
1875 name = "is-my-json-valid-2.12.4.tgz";
1876 sha1 = "d4ed2bc1d7f88daf8d0f763b3e3e39a69bd37880";
1877 })
1878 ];
1879 buildInputs =
1880 (self.nativeDeps."is-my-json-valid" or []);
1881 deps = {
1882 "generate-function-2.0.0" = self.by-version."generate-function"."2.0.0";
1883 "generate-object-property-1.2.0" = self.by-version."generate-object-property"."1.2.0";
1884 "jsonpointer-2.0.0" = self.by-version."jsonpointer"."2.0.0";
1885 "xtend-4.0.1" = self.by-version."xtend"."4.0.1";
1886 };
1887 peerDependencies = [
1888 ];
1889 passthru.names = [ "is-my-json-valid" ];
1890 };
1891 by-spec."is-property"."^1.0.0" =
1892 self.by-version."is-property"."1.0.2";
1893 by-version."is-property"."1.0.2" = lib.makeOverridable self.buildNodePackage {
1894 name = "is-property-1.0.2";
1895 bin = false;
1896 src = [
1897 (fetchurl {
1898 url = "http://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz";
1899 name = "is-property-1.0.2.tgz";
1900 sha1 = "57fe1c4e48474edd65b09911f26b1cd4095dda84";
1901 })
1902 ];
1903 buildInputs =
1904 (self.nativeDeps."is-property" or []);
1905 deps = {
1906 };
1907 peerDependencies = [
1908 ];
1909 passthru.names = [ "is-property" ];
1910 };
1911 by-spec."is-typedarray"."~1.0.0" =
1912 self.by-version."is-typedarray"."1.0.0";
1913 by-version."is-typedarray"."1.0.0" = lib.makeOverridable self.buildNodePackage {
1914 name = "is-typedarray-1.0.0";
1915 bin = false;
1916 src = [
1917 (fetchurl {
1918 url = "http://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz";
1919 name = "is-typedarray-1.0.0.tgz";
1920 sha1 = "e479c80858df0c1b11ddda6940f96011fcda4a9a";
1921 })
1922 ];
1923 buildInputs =
1924 (self.nativeDeps."is-typedarray" or []);
1925 deps = {
1926 };
1927 peerDependencies = [
1928 ];
1929 passthru.names = [ "is-typedarray" ];
1930 };
1931 by-spec."isarray"."0.0.1" =
1932 self.by-version."isarray"."0.0.1";
1933 by-version."isarray"."0.0.1" = lib.makeOverridable self.buildNodePackage {
1934 name = "isarray-0.0.1";
1935 bin = false;
1936 src = [
1937 (fetchurl {
1938 url = "http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz";
1939 name = "isarray-0.0.1.tgz";
1940 sha1 = "8a18acfca9a8f4177e09abfc6038939b05d1eedf";
1941 })
1942 ];
1943 buildInputs =
1944 (self.nativeDeps."isarray" or []);
1945 deps = {
1946 };
1947 peerDependencies = [
1948 ];
1949 passthru.names = [ "isarray" ];
1950 };
1951 by-spec."isstream"."~0.1.2" =
1952 self.by-version."isstream"."0.1.2";
1953 by-version."isstream"."0.1.2" = lib.makeOverridable self.buildNodePackage {
1954 name = "isstream-0.1.2";
1955 bin = false;
1956 src = [
1957 (fetchurl {
1958 url = "http://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz";
1959 name = "isstream-0.1.2.tgz";
1960 sha1 = "47e63f7af55afa6f92e1500e690eb8b8529c099a";
1961 })
1962 ];
1963 buildInputs =
1964 (self.nativeDeps."isstream" or []);
1965 deps = {
1966 };
1967 peerDependencies = [
1968 ];
1969 passthru.names = [ "isstream" ];
1970 };
1971 by-spec."jodid25519".">=1.0.0 <2.0.0" =
1972 self.by-version."jodid25519"."1.0.2";
1973 by-version."jodid25519"."1.0.2" = lib.makeOverridable self.buildNodePackage {
1974 name = "jodid25519-1.0.2";
1975 bin = false;
1976 src = [
1977 (fetchurl {
1978 url = "http://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz";
1979 name = "jodid25519-1.0.2.tgz";
1980 sha1 = "06d4912255093419477d425633606e0e90782967";
1981 })
1982 ];
1983 buildInputs =
1984 (self.nativeDeps."jodid25519" or []);
1985 deps = {
1986 "jsbn-0.1.0" = self.by-version."jsbn"."0.1.0";
1987 };
1988 peerDependencies = [
1989 ];
1990 passthru.names = [ "jodid25519" ];
1991 };
1992 by-spec."js-yaml"."~2.0.5" =
1993 self.by-version."js-yaml"."2.0.5";
1994 by-version."js-yaml"."2.0.5" = lib.makeOverridable self.buildNodePackage {
1995 name = "js-yaml-2.0.5";
1996 bin = true;
1997 src = [
1998 (fetchurl {
1999 url = "http://registry.npmjs.org/js-yaml/-/js-yaml-2.0.5.tgz";
2000 name = "js-yaml-2.0.5.tgz";
2001 sha1 = "a25ae6509999e97df278c6719da11bd0687743a8";
2002 })
2003 ];
2004 buildInputs =
2005 (self.nativeDeps."js-yaml" or []);
2006 deps = {
2007 "argparse-0.1.16" = self.by-version."argparse"."0.1.16";
2008 "esprima-1.0.4" = self.by-version."esprima"."1.0.4";
2009 };
2010 peerDependencies = [
2011 ];
2012 passthru.names = [ "js-yaml" ];
2013 };
2014 by-spec."jsbn".">=0.1.0 <0.2.0" =
2015 self.by-version."jsbn"."0.1.0";
2016 by-version."jsbn"."0.1.0" = lib.makeOverridable self.buildNodePackage {
2017 name = "jsbn-0.1.0";
2018 bin = false;
2019 src = [
2020 (fetchurl {
2021 url = "http://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz";
2022 name = "jsbn-0.1.0.tgz";
2023 sha1 = "650987da0dd74f4ebf5a11377a2aa2d273e97dfd";
2024 })
2025 ];
2026 buildInputs =
2027 (self.nativeDeps."jsbn" or []);
2028 deps = {
2029 };
2030 peerDependencies = [
2031 ];
2032 passthru.names = [ "jsbn" ];
2033 };
2034 by-spec."jsbn"."~0.1.0" =
2035 self.by-version."jsbn"."0.1.0";
2036 by-spec."jshint"."^2.9.1-rc3" =
2037 self.by-version."jshint"."2.9.1";
2038 by-version."jshint"."2.9.1" = lib.makeOverridable self.buildNodePackage {
2039 name = "jshint-2.9.1";
2040 bin = true;
2041 src = [
2042 (fetchurl {
2043 url = "http://registry.npmjs.org/jshint/-/jshint-2.9.1.tgz";
2044 name = "jshint-2.9.1.tgz";
2045 sha1 = "3136b68f8b6fa37423aacb8ec5e18a1ada7a2638";
2046 })
2047 ];
2048 buildInputs =
2049 (self.nativeDeps."jshint" or []);
2050 deps = {
2051 "cli-0.6.6" = self.by-version."cli"."0.6.6";
2052 "console-browserify-1.1.0" = self.by-version."console-browserify"."1.1.0";
2053 "exit-0.1.2" = self.by-version."exit"."0.1.2";
2054 "htmlparser2-3.8.3" = self.by-version."htmlparser2"."3.8.3";
2055 "minimatch-2.0.10" = self.by-version."minimatch"."2.0.10";
2056 "shelljs-0.3.0" = self.by-version."shelljs"."0.3.0";
2057 "strip-json-comments-1.0.4" = self.by-version."strip-json-comments"."1.0.4";
2058 "lodash-3.7.0" = self.by-version."lodash"."3.7.0";
2059 };
2329 };
2060 peerDependencies = [
2330 production = false;
2061 ];
2062 passthru.names = [ "jshint" ];
2063 };
2064 "jshint" = self.by-version."jshint"."2.9.1";
2065 by-spec."jshint"."~2.9.1" =
2066 self.by-version."jshint"."2.9.1";
2067 by-spec."json-schema"."0.2.2" =
2068 self.by-version."json-schema"."0.2.2";
2069 by-version."json-schema"."0.2.2" = lib.makeOverridable self.buildNodePackage {
2070 name = "json-schema-0.2.2";
2071 bin = false;
2072 src = [
2073 (fetchurl {
2074 url = "http://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz";
2075 name = "json-schema-0.2.2.tgz";
2076 sha1 = "50354f19f603917c695f70b85afa77c3b0f23506";
2077 })
2078 ];
2079 buildInputs =
2080 (self.nativeDeps."json-schema" or []);
2081 deps = {
2082 };
2083 peerDependencies = [
2084 ];
2085 passthru.names = [ "json-schema" ];
2086 };
2087 by-spec."json-stringify-safe"."~5.0.1" =
2088 self.by-version."json-stringify-safe"."5.0.1";
2089 by-version."json-stringify-safe"."5.0.1" = lib.makeOverridable self.buildNodePackage {
2090 name = "json-stringify-safe-5.0.1";
2091 bin = false;
2092 src = [
2093 (fetchurl {
2094 url = "http://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz";
2095 name = "json-stringify-safe-5.0.1.tgz";
2096 sha1 = "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb";
2097 })
2098 ];
2099 buildInputs =
2100 (self.nativeDeps."json-stringify-safe" or []);
2101 deps = {
2102 };
2103 peerDependencies = [
2104 ];
2105 passthru.names = [ "json-stringify-safe" ];
2106 };
2107 by-spec."jsonpointer"."2.0.0" =
2108 self.by-version."jsonpointer"."2.0.0";
2109 by-version."jsonpointer"."2.0.0" = lib.makeOverridable self.buildNodePackage {
2110 name = "jsonpointer-2.0.0";
2111 bin = false;
2112 src = [
2113 (fetchurl {
2114 url = "http://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz";
2115 name = "jsonpointer-2.0.0.tgz";
2116 sha1 = "3af1dd20fe85463910d469a385e33017d2a030d9";
2117 })
2118 ];
2119 buildInputs =
2120 (self.nativeDeps."jsonpointer" or []);
2121 deps = {
2122 };
2123 peerDependencies = [
2124 ];
2125 passthru.names = [ "jsonpointer" ];
2126 };
2127 by-spec."jsprim"."^1.2.2" =
2128 self.by-version."jsprim"."1.2.2";
2129 by-version."jsprim"."1.2.2" = lib.makeOverridable self.buildNodePackage {
2130 name = "jsprim-1.2.2";
2131 bin = false;
2132 src = [
2133 (fetchurl {
2134 url = "http://registry.npmjs.org/jsprim/-/jsprim-1.2.2.tgz";
2135 name = "jsprim-1.2.2.tgz";
2136 sha1 = "f20c906ac92abd58e3b79ac8bc70a48832512da1";
2137 })
2138 ];
2139 buildInputs =
2140 (self.nativeDeps."jsprim" or []);
2141 deps = {
2142 "extsprintf-1.0.2" = self.by-version."extsprintf"."1.0.2";
2143 "json-schema-0.2.2" = self.by-version."json-schema"."0.2.2";
2144 "verror-1.3.6" = self.by-version."verror"."1.3.6";
2145 };
2146 peerDependencies = [
2147 ];
2148 passthru.names = [ "jsprim" ];
2149 };
2150 by-spec."less"."~2.5.0" =
2151 self.by-version."less"."2.5.3";
2152 by-version."less"."2.5.3" = lib.makeOverridable self.buildNodePackage {
2153 name = "less-2.5.3";
2154 bin = true;
2155 src = [
2156 (fetchurl {
2157 url = "http://registry.npmjs.org/less/-/less-2.5.3.tgz";
2158 name = "less-2.5.3.tgz";
2159 sha1 = "9ff586e8a703515fc18dc99c7bc498d2f3ad4849";
2160 })
2161 ];
2162 buildInputs =
2163 (self.nativeDeps."less" or []);
2164 deps = {
2165 "errno-0.1.4" = self.by-version."errno"."0.1.4";
2166 "graceful-fs-3.0.8" = self.by-version."graceful-fs"."3.0.8";
2167 "image-size-0.3.5" = self.by-version."image-size"."0.3.5";
2168 "mime-1.3.4" = self.by-version."mime"."1.3.4";
2169 "mkdirp-0.5.1" = self.by-version."mkdirp"."0.5.1";
2170 "promise-6.1.0" = self.by-version."promise"."6.1.0";
2171 "request-2.67.0" = self.by-version."request"."2.67.0";
2172 "source-map-0.4.4" = self.by-version."source-map"."0.4.4";
2173 };
2174 peerDependencies = [
2175 ];
2176 passthru.names = [ "less" ];
2177 };
2178 by-spec."lodash"."3.7.x" =
2179 self.by-version."lodash"."3.7.0";
2180 by-version."lodash"."3.7.0" = lib.makeOverridable self.buildNodePackage {
2181 name = "lodash-3.7.0";
2182 bin = false;
2183 src = [
2184 (fetchurl {
2185 url = "http://registry.npmjs.org/lodash/-/lodash-3.7.0.tgz";
2186 name = "lodash-3.7.0.tgz";
2187 sha1 = "3678bd8ab995057c07ade836ed2ef087da811d45";
2188 })
2189 ];
2190 buildInputs =
2191 (self.nativeDeps."lodash" or []);
2192 deps = {
2193 };
2194 peerDependencies = [
2195 ];
2196 passthru.names = [ "lodash" ];
2197 };
2198 by-spec."lodash"."^3.2.0" =
2199 self.by-version."lodash"."3.10.1";
2200 by-version."lodash"."3.10.1" = lib.makeOverridable self.buildNodePackage {
2201 name = "lodash-3.10.1";
2202 bin = false;
2203 src = [
2204 (fetchurl {
2205 url = "http://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz";
2206 name = "lodash-3.10.1.tgz";
2207 sha1 = "5bf45e8e49ba4189e17d482789dfd15bd140b7b6";
2208 })
2209 ];
2210 buildInputs =
2211 (self.nativeDeps."lodash" or []);
2212 deps = {
2213 };
2214 peerDependencies = [
2215 ];
2216 passthru.names = [ "lodash" ];
2217 };
2218 by-spec."lodash"."~0.9.2" =
2219 self.by-version."lodash"."0.9.2";
2220 by-version."lodash"."0.9.2" = lib.makeOverridable self.buildNodePackage {
2221 name = "lodash-0.9.2";
2222 bin = false;
2223 src = [
2224 (fetchurl {
2225 url = "http://registry.npmjs.org/lodash/-/lodash-0.9.2.tgz";
2226 name = "lodash-0.9.2.tgz";
2227 sha1 = "8f3499c5245d346d682e5b0d3b40767e09f1a92c";
2228 })
2229 ];
2230 buildInputs =
2231 (self.nativeDeps."lodash" or []);
2232 deps = {
2233 };
2234 peerDependencies = [
2235 ];
2236 passthru.names = [ "lodash" ];
2237 };
2238 by-spec."lodash"."~1.0.1" =
2239 self.by-version."lodash"."1.0.2";
2240 by-version."lodash"."1.0.2" = lib.makeOverridable self.buildNodePackage {
2241 name = "lodash-1.0.2";
2242 bin = false;
2243 src = [
2244 (fetchurl {
2245 url = "http://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz";
2246 name = "lodash-1.0.2.tgz";
2247 sha1 = "8f57560c83b59fc270bd3d561b690043430e2551";
2248 })
2249 ];
2250 buildInputs =
2251 (self.nativeDeps."lodash" or []);
2252 deps = {
2253 };
2254 peerDependencies = [
2255 ];
2256 passthru.names = [ "lodash" ];
2257 };
2258 by-spec."lodash"."~2.4.1" =
2259 self.by-version."lodash"."2.4.2";
2260 by-version."lodash"."2.4.2" = lib.makeOverridable self.buildNodePackage {
2261 name = "lodash-2.4.2";
2262 bin = false;
2263 src = [
2264 (fetchurl {
2265 url = "http://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz";
2266 name = "lodash-2.4.2.tgz";
2267 sha1 = "fadd834b9683073da179b3eae6d9c0d15053f73e";
2268 })
2269 ];
2270 buildInputs =
2271 (self.nativeDeps."lodash" or []);
2272 deps = {
2273 };
2274 peerDependencies = [
2275 ];
2276 passthru.names = [ "lodash" ];
2277 };
2278 by-spec."lru-cache"."2" =
2279 self.by-version."lru-cache"."2.7.3";
2280 by-version."lru-cache"."2.7.3" = lib.makeOverridable self.buildNodePackage {
2281 name = "lru-cache-2.7.3";
2282 bin = false;
2283 src = [
2284 (fetchurl {
2285 url = "http://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz";
2286 name = "lru-cache-2.7.3.tgz";
2287 sha1 = "6d4524e8b955f95d4f5b58851ce21dd72fb4e952";
2288 })
2289 ];
2290 buildInputs =
2291 (self.nativeDeps."lru-cache" or []);
2292 deps = {
2293 };
2294 peerDependencies = [
2295 ];
2296 passthru.names = [ "lru-cache" ];
2297 };
2298 by-spec."mime"."^1.2.11" =
2299 self.by-version."mime"."1.3.4";
2300 by-version."mime"."1.3.4" = lib.makeOverridable self.buildNodePackage {
2301 name = "mime-1.3.4";
2302 bin = true;
2303 src = [
2304 (fetchurl {
2305 url = "http://registry.npmjs.org/mime/-/mime-1.3.4.tgz";
2306 name = "mime-1.3.4.tgz";
2307 sha1 = "115f9e3b6b3daf2959983cb38f149a2d40eb5d53";
2308 })
2309 ];
2310 buildInputs =
2311 (self.nativeDeps."mime" or []);
2312 deps = {
2313 };
2314 peerDependencies = [
2315 ];
2316 passthru.names = [ "mime" ];
2317 };
2318 by-spec."mime-db"."~1.21.0" =
2319 self.by-version."mime-db"."1.21.0";
2320 by-version."mime-db"."1.21.0" = lib.makeOverridable self.buildNodePackage {
2321 name = "mime-db-1.21.0";
2322 bin = false;
2323 src = [
2324 (fetchurl {
2325 url = "http://registry.npmjs.org/mime-db/-/mime-db-1.21.0.tgz";
2326 name = "mime-db-1.21.0.tgz";
2327 sha1 = "9b5239e3353cf6eb015a00d890261027c36d4bac";
2328 })
2329 ];
2330 buildInputs =
2331 (self.nativeDeps."mime-db" or []);
2332 deps = {
2333 };
2334 peerDependencies = [
2335 ];
2336 passthru.names = [ "mime-db" ];
2337 };
2338 by-spec."mime-types"."^2.1.3" =
2339 self.by-version."mime-types"."2.1.9";
2340 by-version."mime-types"."2.1.9" = lib.makeOverridable self.buildNodePackage {
2341 name = "mime-types-2.1.9";
2342 bin = false;
2343 src = [
2344 (fetchurl {
2345 url = "http://registry.npmjs.org/mime-types/-/mime-types-2.1.9.tgz";
2346 name = "mime-types-2.1.9.tgz";
2347 sha1 = "dfb396764b5fdf75be34b1f4104bc3687fb635f8";
2348 })
2349 ];
2350 buildInputs =
2351 (self.nativeDeps."mime-types" or []);
2352 deps = {
2353 "mime-db-1.21.0" = self.by-version."mime-db"."1.21.0";
2354 };
2355 peerDependencies = [
2356 ];
2357 passthru.names = [ "mime-types" ];
2358 };
2359 by-spec."mime-types"."~2.1.7" =
2360 self.by-version."mime-types"."2.1.9";
2361 by-spec."minimatch"."0.3" =
2362 self.by-version."minimatch"."0.3.0";
2363 by-version."minimatch"."0.3.0" = lib.makeOverridable self.buildNodePackage {
2364 name = "minimatch-0.3.0";
2365 bin = false;
2366 src = [
2367 (fetchurl {
2368 url = "http://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz";
2369 name = "minimatch-0.3.0.tgz";
2370 sha1 = "275d8edaac4f1bb3326472089e7949c8394699dd";
2371 })
2372 ];
2373 buildInputs =
2374 (self.nativeDeps."minimatch" or []);
2375 deps = {
2376 "lru-cache-2.7.3" = self.by-version."lru-cache"."2.7.3";
2377 "sigmund-1.0.1" = self.by-version."sigmund"."1.0.1";
2378 };
2379 peerDependencies = [
2380 ];
2381 passthru.names = [ "minimatch" ];
2382 };
2383 by-spec."minimatch"."2.0.x" =
2384 self.by-version."minimatch"."2.0.10";
2385 by-version."minimatch"."2.0.10" = lib.makeOverridable self.buildNodePackage {
2386 name = "minimatch-2.0.10";
2387 bin = false;
2388 src = [
2389 (fetchurl {
2390 url = "http://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz";
2391 name = "minimatch-2.0.10.tgz";
2392 sha1 = "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7";
2393 })
2394 ];
2395 buildInputs =
2396 (self.nativeDeps."minimatch" or []);
2397 deps = {
2398 "brace-expansion-1.1.2" = self.by-version."brace-expansion"."1.1.2";
2399 };
2400 peerDependencies = [
2401 ];
2402 passthru.names = [ "minimatch" ];
2403 };
2404 by-spec."minimatch"."~0.2.11" =
2405 self.by-version."minimatch"."0.2.14";
2406 by-version."minimatch"."0.2.14" = lib.makeOverridable self.buildNodePackage {
2407 name = "minimatch-0.2.14";
2408 bin = false;
2409 src = [
2410 (fetchurl {
2411 url = "http://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz";
2412 name = "minimatch-0.2.14.tgz";
2413 sha1 = "c74e780574f63c6f9a090e90efbe6ef53a6a756a";
2414 })
2415 ];
2416 buildInputs =
2417 (self.nativeDeps."minimatch" or []);
2418 deps = {
2419 "lru-cache-2.7.3" = self.by-version."lru-cache"."2.7.3";
2420 "sigmund-1.0.1" = self.by-version."sigmund"."1.0.1";
2421 };
2422 peerDependencies = [
2423 ];
2424 passthru.names = [ "minimatch" ];
2425 };
2426 by-spec."minimatch"."~0.2.12" =
2427 self.by-version."minimatch"."0.2.14";
2428 by-spec."minimist"."0.0.8" =
2429 self.by-version."minimist"."0.0.8";
2430 by-version."minimist"."0.0.8" = lib.makeOverridable self.buildNodePackage {
2431 name = "minimist-0.0.8";
2432 bin = false;
2433 src = [
2434 (fetchurl {
2435 url = "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz";
2436 name = "minimist-0.0.8.tgz";
2437 sha1 = "857fcabfc3397d2625b8228262e86aa7a011b05d";
2438 })
2439 ];
2440 buildInputs =
2441 (self.nativeDeps."minimist" or []);
2442 deps = {
2443 };
2444 peerDependencies = [
2445 ];
2446 passthru.names = [ "minimist" ];
2447 };
2448 by-spec."mkdirp"."^0.5.0" =
2449 self.by-version."mkdirp"."0.5.1";
2450 by-version."mkdirp"."0.5.1" = lib.makeOverridable self.buildNodePackage {
2451 name = "mkdirp-0.5.1";
2452 bin = true;
2453 src = [
2454 (fetchurl {
2455 url = "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz";
2456 name = "mkdirp-0.5.1.tgz";
2457 sha1 = "30057438eac6cf7f8c4767f38648d6697d75c903";
2458 })
2459 ];
2460 buildInputs =
2461 (self.nativeDeps."mkdirp" or []);
2462 deps = {
2463 "minimist-0.0.8" = self.by-version."minimist"."0.0.8";
2464 };
2465 peerDependencies = [
2466 ];
2467 passthru.names = [ "mkdirp" ];
2468 };
2469 by-spec."node-uuid"."~1.4.7" =
2470 self.by-version."node-uuid"."1.4.7";
2471 by-version."node-uuid"."1.4.7" = lib.makeOverridable self.buildNodePackage {
2472 name = "node-uuid-1.4.7";
2473 bin = true;
2474 src = [
2475 (fetchurl {
2476 url = "http://registry.npmjs.org/node-uuid/-/node-uuid-1.4.7.tgz";
2477 name = "node-uuid-1.4.7.tgz";
2478 sha1 = "6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f";
2479 })
2480 ];
2481 buildInputs =
2482 (self.nativeDeps."node-uuid" or []);
2483 deps = {
2484 };
2485 peerDependencies = [
2486 ];
2487 passthru.names = [ "node-uuid" ];
2488 };
2331 };
2489 by-spec."nopt"."~1.0.10" =
2332 in
2490 self.by-version."nopt"."1.0.10";
2333 {
2491 by-version."nopt"."1.0.10" = lib.makeOverridable self.buildNodePackage {
2334 tarball = nodeEnv.buildNodeSourceDist args;
2492 name = "nopt-1.0.10";
2335 package = nodeEnv.buildNodePackage args;
2493 bin = true;
2336 shell = nodeEnv.buildNodeShell args;
2494 src = [
2337 } No newline at end of file
2495 (fetchurl {
2496 url = "http://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz";
2497 name = "nopt-1.0.10.tgz";
2498 sha1 = "6ddd21bd2a31417b92727dd585f8a6f37608ebee";
2499 })
2500 ];
2501 buildInputs =
2502 (self.nativeDeps."nopt" or []);
2503 deps = {
2504 "abbrev-1.0.7" = self.by-version."abbrev"."1.0.7";
2505 };
2506 peerDependencies = [
2507 ];
2508 passthru.names = [ "nopt" ];
2509 };
2510 by-spec."nopt"."~2.0.0" =
2511 self.by-version."nopt"."2.0.0";
2512 by-version."nopt"."2.0.0" = lib.makeOverridable self.buildNodePackage {
2513 name = "nopt-2.0.0";
2514 bin = true;
2515 src = [
2516 (fetchurl {
2517 url = "http://registry.npmjs.org/nopt/-/nopt-2.0.0.tgz";
2518 name = "nopt-2.0.0.tgz";
2519 sha1 = "ca7416f20a5e3f9c3b86180f96295fa3d0b52e0d";
2520 })
2521 ];
2522 buildInputs =
2523 (self.nativeDeps."nopt" or []);
2524 deps = {
2525 "abbrev-1.0.7" = self.by-version."abbrev"."1.0.7";
2526 };
2527 peerDependencies = [
2528 ];
2529 passthru.names = [ "nopt" ];
2530 };
2531 by-spec."noptify"."~0.0.3" =
2532 self.by-version."noptify"."0.0.3";
2533 by-version."noptify"."0.0.3" = lib.makeOverridable self.buildNodePackage {
2534 name = "noptify-0.0.3";
2535 bin = false;
2536 src = [
2537 (fetchurl {
2538 url = "http://registry.npmjs.org/noptify/-/noptify-0.0.3.tgz";
2539 name = "noptify-0.0.3.tgz";
2540 sha1 = "58f654a73d9753df0c51d9686dc92104a67f4bbb";
2541 })
2542 ];
2543 buildInputs =
2544 (self.nativeDeps."noptify" or []);
2545 deps = {
2546 "nopt-2.0.0" = self.by-version."nopt"."2.0.0";
2547 };
2548 peerDependencies = [
2549 ];
2550 passthru.names = [ "noptify" ];
2551 };
2552 by-spec."oauth-sign"."~0.8.0" =
2553 self.by-version."oauth-sign"."0.8.0";
2554 by-version."oauth-sign"."0.8.0" = lib.makeOverridable self.buildNodePackage {
2555 name = "oauth-sign-0.8.0";
2556 bin = false;
2557 src = [
2558 (fetchurl {
2559 url = "http://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.0.tgz";
2560 name = "oauth-sign-0.8.0.tgz";
2561 sha1 = "938fdc875765ba527137d8aec9d178e24debc553";
2562 })
2563 ];
2564 buildInputs =
2565 (self.nativeDeps."oauth-sign" or []);
2566 deps = {
2567 };
2568 peerDependencies = [
2569 ];
2570 passthru.names = [ "oauth-sign" ];
2571 };
2572 by-spec."pinkie"."^2.0.0" =
2573 self.by-version."pinkie"."2.0.1";
2574 by-version."pinkie"."2.0.1" = lib.makeOverridable self.buildNodePackage {
2575 name = "pinkie-2.0.1";
2576 bin = false;
2577 src = [
2578 (fetchurl {
2579 url = "http://registry.npmjs.org/pinkie/-/pinkie-2.0.1.tgz";
2580 name = "pinkie-2.0.1.tgz";
2581 sha1 = "4236c86fc29f261c2045bbe81f78cbb2a5e8306c";
2582 })
2583 ];
2584 buildInputs =
2585 (self.nativeDeps."pinkie" or []);
2586 deps = {
2587 };
2588 peerDependencies = [
2589 ];
2590 passthru.names = [ "pinkie" ];
2591 };
2592 by-spec."pinkie-promise"."^2.0.0" =
2593 self.by-version."pinkie-promise"."2.0.0";
2594 by-version."pinkie-promise"."2.0.0" = lib.makeOverridable self.buildNodePackage {
2595 name = "pinkie-promise-2.0.0";
2596 bin = false;
2597 src = [
2598 (fetchurl {
2599 url = "http://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.0.tgz";
2600 name = "pinkie-promise-2.0.0.tgz";
2601 sha1 = "4c83538de1f6e660c29e0a13446844f7a7e88259";
2602 })
2603 ];
2604 buildInputs =
2605 (self.nativeDeps."pinkie-promise" or []);
2606 deps = {
2607 "pinkie-2.0.1" = self.by-version."pinkie"."2.0.1";
2608 };
2609 peerDependencies = [
2610 ];
2611 passthru.names = [ "pinkie-promise" ];
2612 };
2613 by-spec."process-nextick-args"."~1.0.6" =
2614 self.by-version."process-nextick-args"."1.0.6";
2615 by-version."process-nextick-args"."1.0.6" = lib.makeOverridable self.buildNodePackage {
2616 name = "process-nextick-args-1.0.6";
2617 bin = false;
2618 src = [
2619 (fetchurl {
2620 url = "http://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.6.tgz";
2621 name = "process-nextick-args-1.0.6.tgz";
2622 sha1 = "0f96b001cea90b12592ce566edb97ec11e69bd05";
2623 })
2624 ];
2625 buildInputs =
2626 (self.nativeDeps."process-nextick-args" or []);
2627 deps = {
2628 };
2629 peerDependencies = [
2630 ];
2631 passthru.names = [ "process-nextick-args" ];
2632 };
2633 by-spec."promise"."^6.0.1" =
2634 self.by-version."promise"."6.1.0";
2635 by-version."promise"."6.1.0" = lib.makeOverridable self.buildNodePackage {
2636 name = "promise-6.1.0";
2637 bin = false;
2638 src = [
2639 (fetchurl {
2640 url = "http://registry.npmjs.org/promise/-/promise-6.1.0.tgz";
2641 name = "promise-6.1.0.tgz";
2642 sha1 = "2ce729f6b94b45c26891ad0602c5c90e04c6eef6";
2643 })
2644 ];
2645 buildInputs =
2646 (self.nativeDeps."promise" or []);
2647 deps = {
2648 "asap-1.0.0" = self.by-version."asap"."1.0.0";
2649 };
2650 peerDependencies = [
2651 ];
2652 passthru.names = [ "promise" ];
2653 };
2654 by-spec."prr"."~0.0.0" =
2655 self.by-version."prr"."0.0.0";
2656 by-version."prr"."0.0.0" = lib.makeOverridable self.buildNodePackage {
2657 name = "prr-0.0.0";
2658 bin = false;
2659 src = [
2660 (fetchurl {
2661 url = "http://registry.npmjs.org/prr/-/prr-0.0.0.tgz";
2662 name = "prr-0.0.0.tgz";
2663 sha1 = "1a84b85908325501411853d0081ee3fa86e2926a";
2664 })
2665 ];
2666 buildInputs =
2667 (self.nativeDeps."prr" or []);
2668 deps = {
2669 };
2670 peerDependencies = [
2671 ];
2672 passthru.names = [ "prr" ];
2673 };
2674 by-spec."qs"."~0.5.2" =
2675 self.by-version."qs"."0.5.6";
2676 by-version."qs"."0.5.6" = lib.makeOverridable self.buildNodePackage {
2677 name = "qs-0.5.6";
2678 bin = false;
2679 src = [
2680 (fetchurl {
2681 url = "http://registry.npmjs.org/qs/-/qs-0.5.6.tgz";
2682 name = "qs-0.5.6.tgz";
2683 sha1 = "31b1ad058567651c526921506b9a8793911a0384";
2684 })
2685 ];
2686 buildInputs =
2687 (self.nativeDeps."qs" or []);
2688 deps = {
2689 };
2690 peerDependencies = [
2691 ];
2692 passthru.names = [ "qs" ];
2693 };
2694 by-spec."qs"."~5.2.0" =
2695 self.by-version."qs"."5.2.0";
2696 by-version."qs"."5.2.0" = lib.makeOverridable self.buildNodePackage {
2697 name = "qs-5.2.0";
2698 bin = false;
2699 src = [
2700 (fetchurl {
2701 url = "http://registry.npmjs.org/qs/-/qs-5.2.0.tgz";
2702 name = "qs-5.2.0.tgz";
2703 sha1 = "a9f31142af468cb72b25b30136ba2456834916be";
2704 })
2705 ];
2706 buildInputs =
2707 (self.nativeDeps."qs" or []);
2708 deps = {
2709 };
2710 peerDependencies = [
2711 ];
2712 passthru.names = [ "qs" ];
2713 };
2714 by-spec."readable-stream"."1.1" =
2715 self.by-version."readable-stream"."1.1.13";
2716 by-version."readable-stream"."1.1.13" = lib.makeOverridable self.buildNodePackage {
2717 name = "readable-stream-1.1.13";
2718 bin = false;
2719 src = [
2720 (fetchurl {
2721 url = "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz";
2722 name = "readable-stream-1.1.13.tgz";
2723 sha1 = "f6eef764f514c89e2b9e23146a75ba106756d23e";
2724 })
2725 ];
2726 buildInputs =
2727 (self.nativeDeps."readable-stream" or []);
2728 deps = {
2729 "core-util-is-1.0.2" = self.by-version."core-util-is"."1.0.2";
2730 "isarray-0.0.1" = self.by-version."isarray"."0.0.1";
2731 "string_decoder-0.10.31" = self.by-version."string_decoder"."0.10.31";
2732 "inherits-2.0.1" = self.by-version."inherits"."2.0.1";
2733 };
2734 peerDependencies = [
2735 ];
2736 passthru.names = [ "readable-stream" ];
2737 };
2738 by-spec."readable-stream"."~2.0.5" =
2739 self.by-version."readable-stream"."2.0.5";
2740 by-version."readable-stream"."2.0.5" = lib.makeOverridable self.buildNodePackage {
2741 name = "readable-stream-2.0.5";
2742 bin = false;
2743 src = [
2744 (fetchurl {
2745 url = "http://registry.npmjs.org/readable-stream/-/readable-stream-2.0.5.tgz";
2746 name = "readable-stream-2.0.5.tgz";
2747 sha1 = "a2426f8dcd4551c77a33f96edf2886a23c829669";
2748 })
2749 ];
2750 buildInputs =
2751 (self.nativeDeps."readable-stream" or []);
2752 deps = {
2753 "core-util-is-1.0.2" = self.by-version."core-util-is"."1.0.2";
2754 "inherits-2.0.1" = self.by-version."inherits"."2.0.1";
2755 "isarray-0.0.1" = self.by-version."isarray"."0.0.1";
2756 "process-nextick-args-1.0.6" = self.by-version."process-nextick-args"."1.0.6";
2757 "string_decoder-0.10.31" = self.by-version."string_decoder"."0.10.31";
2758 "util-deprecate-1.0.2" = self.by-version."util-deprecate"."1.0.2";
2759 };
2760 peerDependencies = [
2761 ];
2762 passthru.names = [ "readable-stream" ];
2763 };
2764 by-spec."request"."^2.51.0" =
2765 self.by-version."request"."2.67.0";
2766 by-version."request"."2.67.0" = lib.makeOverridable self.buildNodePackage {
2767 name = "request-2.67.0";
2768 bin = false;
2769 src = [
2770 (fetchurl {
2771 url = "http://registry.npmjs.org/request/-/request-2.67.0.tgz";
2772 name = "request-2.67.0.tgz";
2773 sha1 = "8af74780e2bf11ea0ae9aa965c11f11afd272742";
2774 })
2775 ];
2776 buildInputs =
2777 (self.nativeDeps."request" or []);
2778 deps = {
2779 "bl-1.0.1" = self.by-version."bl"."1.0.1";
2780 "caseless-0.11.0" = self.by-version."caseless"."0.11.0";
2781 "extend-3.0.0" = self.by-version."extend"."3.0.0";
2782 "forever-agent-0.6.1" = self.by-version."forever-agent"."0.6.1";
2783 "form-data-1.0.0-rc3" = self.by-version."form-data"."1.0.0-rc3";
2784 "json-stringify-safe-5.0.1" = self.by-version."json-stringify-safe"."5.0.1";
2785 "mime-types-2.1.9" = self.by-version."mime-types"."2.1.9";
2786 "node-uuid-1.4.7" = self.by-version."node-uuid"."1.4.7";
2787 "qs-5.2.0" = self.by-version."qs"."5.2.0";
2788 "tunnel-agent-0.4.2" = self.by-version."tunnel-agent"."0.4.2";
2789 "tough-cookie-2.2.1" = self.by-version."tough-cookie"."2.2.1";
2790 "http-signature-1.1.0" = self.by-version."http-signature"."1.1.0";
2791 "oauth-sign-0.8.0" = self.by-version."oauth-sign"."0.8.0";
2792 "hawk-3.1.3" = self.by-version."hawk"."3.1.3";
2793 "aws-sign2-0.6.0" = self.by-version."aws-sign2"."0.6.0";
2794 "stringstream-0.0.5" = self.by-version."stringstream"."0.0.5";
2795 "combined-stream-1.0.5" = self.by-version."combined-stream"."1.0.5";
2796 "isstream-0.1.2" = self.by-version."isstream"."0.1.2";
2797 "is-typedarray-1.0.0" = self.by-version."is-typedarray"."1.0.0";
2798 "har-validator-2.0.6" = self.by-version."har-validator"."2.0.6";
2799 };
2800 peerDependencies = [
2801 ];
2802 passthru.names = [ "request" ];
2803 };
2804 by-spec."rimraf"."~2.2.8" =
2805 self.by-version."rimraf"."2.2.8";
2806 by-version."rimraf"."2.2.8" = lib.makeOverridable self.buildNodePackage {
2807 name = "rimraf-2.2.8";
2808 bin = true;
2809 src = [
2810 (fetchurl {
2811 url = "http://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz";
2812 name = "rimraf-2.2.8.tgz";
2813 sha1 = "e439be2aaee327321952730f99a8929e4fc50582";
2814 })
2815 ];
2816 buildInputs =
2817 (self.nativeDeps."rimraf" or []);
2818 deps = {
2819 };
2820 peerDependencies = [
2821 ];
2822 passthru.names = [ "rimraf" ];
2823 };
2824 by-spec."shelljs"."0.3.x" =
2825 self.by-version."shelljs"."0.3.0";
2826 by-version."shelljs"."0.3.0" = lib.makeOverridable self.buildNodePackage {
2827 name = "shelljs-0.3.0";
2828 bin = true;
2829 src = [
2830 (fetchurl {
2831 url = "http://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz";
2832 name = "shelljs-0.3.0.tgz";
2833 sha1 = "3596e6307a781544f591f37da618360f31db57b1";
2834 })
2835 ];
2836 buildInputs =
2837 (self.nativeDeps."shelljs" or []);
2838 deps = {
2839 };
2840 peerDependencies = [
2841 ];
2842 passthru.names = [ "shelljs" ];
2843 };
2844 by-spec."sigmund"."~1.0.0" =
2845 self.by-version."sigmund"."1.0.1";
2846 by-version."sigmund"."1.0.1" = lib.makeOverridable self.buildNodePackage {
2847 name = "sigmund-1.0.1";
2848 bin = false;
2849 src = [
2850 (fetchurl {
2851 url = "http://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz";
2852 name = "sigmund-1.0.1.tgz";
2853 sha1 = "3ff21f198cad2175f9f3b781853fd94d0d19b590";
2854 })
2855 ];
2856 buildInputs =
2857 (self.nativeDeps."sigmund" or []);
2858 deps = {
2859 };
2860 peerDependencies = [
2861 ];
2862 passthru.names = [ "sigmund" ];
2863 };
2864 by-spec."sntp"."1.x.x" =
2865 self.by-version."sntp"."1.0.9";
2866 by-version."sntp"."1.0.9" = lib.makeOverridable self.buildNodePackage {
2867 name = "sntp-1.0.9";
2868 bin = false;
2869 src = [
2870 (fetchurl {
2871 url = "http://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz";
2872 name = "sntp-1.0.9.tgz";
2873 sha1 = "6541184cc90aeea6c6e7b35e2659082443c66198";
2874 })
2875 ];
2876 buildInputs =
2877 (self.nativeDeps."sntp" or []);
2878 deps = {
2879 "hoek-2.16.3" = self.by-version."hoek"."2.16.3";
2880 };
2881 peerDependencies = [
2882 ];
2883 passthru.names = [ "sntp" ];
2884 };
2885 by-spec."source-map"."^0.3.0" =
2886 self.by-version."source-map"."0.3.0";
2887 by-version."source-map"."0.3.0" = lib.makeOverridable self.buildNodePackage {
2888 name = "source-map-0.3.0";
2889 bin = false;
2890 src = [
2891 (fetchurl {
2892 url = "http://registry.npmjs.org/source-map/-/source-map-0.3.0.tgz";
2893 name = "source-map-0.3.0.tgz";
2894 sha1 = "8586fb9a5a005e5b501e21cd18b6f21b457ad1f9";
2895 })
2896 ];
2897 buildInputs =
2898 (self.nativeDeps."source-map" or []);
2899 deps = {
2900 "amdefine-1.0.0" = self.by-version."amdefine"."1.0.0";
2901 };
2902 peerDependencies = [
2903 ];
2904 passthru.names = [ "source-map" ];
2905 };
2906 by-spec."source-map"."^0.4.2" =
2907 self.by-version."source-map"."0.4.4";
2908 by-version."source-map"."0.4.4" = lib.makeOverridable self.buildNodePackage {
2909 name = "source-map-0.4.4";
2910 bin = false;
2911 src = [
2912 (fetchurl {
2913 url = "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz";
2914 name = "source-map-0.4.4.tgz";
2915 sha1 = "eba4f5da9c0dc999de68032d8b4f76173652036b";
2916 })
2917 ];
2918 buildInputs =
2919 (self.nativeDeps."source-map" or []);
2920 deps = {
2921 "amdefine-1.0.0" = self.by-version."amdefine"."1.0.0";
2922 };
2923 peerDependencies = [
2924 ];
2925 passthru.names = [ "source-map" ];
2926 };
2927 by-spec."sshpk"."^1.7.0" =
2928 self.by-version."sshpk"."1.7.3";
2929 by-version."sshpk"."1.7.3" = lib.makeOverridable self.buildNodePackage {
2930 name = "sshpk-1.7.3";
2931 bin = true;
2932 src = [
2933 (fetchurl {
2934 url = "http://registry.npmjs.org/sshpk/-/sshpk-1.7.3.tgz";
2935 name = "sshpk-1.7.3.tgz";
2936 sha1 = "caa8ef95e30765d856698b7025f9f211ab65962f";
2937 })
2938 ];
2939 buildInputs =
2940 (self.nativeDeps."sshpk" or []);
2941 deps = {
2942 "asn1-0.2.3" = self.by-version."asn1"."0.2.3";
2943 "assert-plus-0.2.0" = self.by-version."assert-plus"."0.2.0";
2944 "dashdash-1.12.2" = self.by-version."dashdash"."1.12.2";
2945 "jsbn-0.1.0" = self.by-version."jsbn"."0.1.0";
2946 "tweetnacl-0.13.3" = self.by-version."tweetnacl"."0.13.3";
2947 "jodid25519-1.0.2" = self.by-version."jodid25519"."1.0.2";
2948 "ecc-jsbn-0.1.1" = self.by-version."ecc-jsbn"."0.1.1";
2949 };
2950 peerDependencies = [
2951 ];
2952 passthru.names = [ "sshpk" ];
2953 };
2954 by-spec."string_decoder"."~0.10.x" =
2955 self.by-version."string_decoder"."0.10.31";
2956 by-version."string_decoder"."0.10.31" = lib.makeOverridable self.buildNodePackage {
2957 name = "string_decoder-0.10.31";
2958 bin = false;
2959 src = [
2960 (fetchurl {
2961 url = "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz";
2962 name = "string_decoder-0.10.31.tgz";
2963 sha1 = "62e203bc41766c6c28c9fc84301dab1c5310fa94";
2964 })
2965 ];
2966 buildInputs =
2967 (self.nativeDeps."string_decoder" or []);
2968 deps = {
2969 };
2970 peerDependencies = [
2971 ];
2972 passthru.names = [ "string_decoder" ];
2973 };
2974 by-spec."stringstream"."~0.0.4" =
2975 self.by-version."stringstream"."0.0.5";
2976 by-version."stringstream"."0.0.5" = lib.makeOverridable self.buildNodePackage {
2977 name = "stringstream-0.0.5";
2978 bin = false;
2979 src = [
2980 (fetchurl {
2981 url = "http://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz";
2982 name = "stringstream-0.0.5.tgz";
2983 sha1 = "4e484cd4de5a0bbbee18e46307710a8a81621878";
2984 })
2985 ];
2986 buildInputs =
2987 (self.nativeDeps."stringstream" or []);
2988 deps = {
2989 };
2990 peerDependencies = [
2991 ];
2992 passthru.names = [ "stringstream" ];
2993 };
2994 by-spec."strip-ansi"."^0.3.0" =
2995 self.by-version."strip-ansi"."0.3.0";
2996 by-version."strip-ansi"."0.3.0" = lib.makeOverridable self.buildNodePackage {
2997 name = "strip-ansi-0.3.0";
2998 bin = true;
2999 src = [
3000 (fetchurl {
3001 url = "http://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz";
3002 name = "strip-ansi-0.3.0.tgz";
3003 sha1 = "25f48ea22ca79187f3174a4db8759347bb126220";
3004 })
3005 ];
3006 buildInputs =
3007 (self.nativeDeps."strip-ansi" or []);
3008 deps = {
3009 "ansi-regex-0.2.1" = self.by-version."ansi-regex"."0.2.1";
3010 };
3011 peerDependencies = [
3012 ];
3013 passthru.names = [ "strip-ansi" ];
3014 };
3015 by-spec."strip-ansi"."^3.0.0" =
3016 self.by-version."strip-ansi"."3.0.0";
3017 by-version."strip-ansi"."3.0.0" = lib.makeOverridable self.buildNodePackage {
3018 name = "strip-ansi-3.0.0";
3019 bin = false;
3020 src = [
3021 (fetchurl {
3022 url = "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.0.tgz";
3023 name = "strip-ansi-3.0.0.tgz";
3024 sha1 = "7510b665567ca914ccb5d7e072763ac968be3724";
3025 })
3026 ];
3027 buildInputs =
3028 (self.nativeDeps."strip-ansi" or []);
3029 deps = {
3030 "ansi-regex-2.0.0" = self.by-version."ansi-regex"."2.0.0";
3031 };
3032 peerDependencies = [
3033 ];
3034 passthru.names = [ "strip-ansi" ];
3035 };
3036 by-spec."strip-json-comments"."1.0.x" =
3037 self.by-version."strip-json-comments"."1.0.4";
3038 by-version."strip-json-comments"."1.0.4" = lib.makeOverridable self.buildNodePackage {
3039 name = "strip-json-comments-1.0.4";
3040 bin = true;
3041 src = [
3042 (fetchurl {
3043 url = "http://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz";
3044 name = "strip-json-comments-1.0.4.tgz";
3045 sha1 = "1e15fbcac97d3ee99bf2d73b4c656b082bbafb91";
3046 })
3047 ];
3048 buildInputs =
3049 (self.nativeDeps."strip-json-comments" or []);
3050 deps = {
3051 };
3052 peerDependencies = [
3053 ];
3054 passthru.names = [ "strip-json-comments" ];
3055 };
3056 by-spec."supports-color"."^0.2.0" =
3057 self.by-version."supports-color"."0.2.0";
3058 by-version."supports-color"."0.2.0" = lib.makeOverridable self.buildNodePackage {
3059 name = "supports-color-0.2.0";
3060 bin = true;
3061 src = [
3062 (fetchurl {
3063 url = "http://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz";
3064 name = "supports-color-0.2.0.tgz";
3065 sha1 = "d92de2694eb3f67323973d7ae3d8b55b4c22190a";
3066 })
3067 ];
3068 buildInputs =
3069 (self.nativeDeps."supports-color" or []);
3070 deps = {
3071 };
3072 peerDependencies = [
3073 ];
3074 passthru.names = [ "supports-color" ];
3075 };
3076 by-spec."supports-color"."^2.0.0" =
3077 self.by-version."supports-color"."2.0.0";
3078 by-version."supports-color"."2.0.0" = lib.makeOverridable self.buildNodePackage {
3079 name = "supports-color-2.0.0";
3080 bin = false;
3081 src = [
3082 (fetchurl {
3083 url = "http://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz";
3084 name = "supports-color-2.0.0.tgz";
3085 sha1 = "535d045ce6b6363fa40117084629995e9df324c7";
3086 })
3087 ];
3088 buildInputs =
3089 (self.nativeDeps."supports-color" or []);
3090 deps = {
3091 };
3092 peerDependencies = [
3093 ];
3094 passthru.names = [ "supports-color" ];
3095 };
3096 by-spec."tiny-lr-fork"."0.0.5" =
3097 self.by-version."tiny-lr-fork"."0.0.5";
3098 by-version."tiny-lr-fork"."0.0.5" = lib.makeOverridable self.buildNodePackage {
3099 name = "tiny-lr-fork-0.0.5";
3100 bin = true;
3101 src = [
3102 (fetchurl {
3103 url = "http://registry.npmjs.org/tiny-lr-fork/-/tiny-lr-fork-0.0.5.tgz";
3104 name = "tiny-lr-fork-0.0.5.tgz";
3105 sha1 = "1e99e1e2a8469b736ab97d97eefa98c71f76ed0a";
3106 })
3107 ];
3108 buildInputs =
3109 (self.nativeDeps."tiny-lr-fork" or []);
3110 deps = {
3111 "qs-0.5.6" = self.by-version."qs"."0.5.6";
3112 "faye-websocket-0.4.4" = self.by-version."faye-websocket"."0.4.4";
3113 "noptify-0.0.3" = self.by-version."noptify"."0.0.3";
3114 "debug-0.7.4" = self.by-version."debug"."0.7.4";
3115 };
3116 peerDependencies = [
3117 ];
3118 passthru.names = [ "tiny-lr-fork" ];
3119 };
3120 by-spec."tough-cookie"."~2.2.0" =
3121 self.by-version."tough-cookie"."2.2.1";
3122 by-version."tough-cookie"."2.2.1" = lib.makeOverridable self.buildNodePackage {
3123 name = "tough-cookie-2.2.1";
3124 bin = false;
3125 src = [
3126 (fetchurl {
3127 url = "http://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.1.tgz";
3128 name = "tough-cookie-2.2.1.tgz";
3129 sha1 = "3b0516b799e70e8164436a1446e7e5877fda118e";
3130 })
3131 ];
3132 buildInputs =
3133 (self.nativeDeps."tough-cookie" or []);
3134 deps = {
3135 };
3136 peerDependencies = [
3137 ];
3138 passthru.names = [ "tough-cookie" ];
3139 };
3140 by-spec."tunnel-agent"."~0.4.1" =
3141 self.by-version."tunnel-agent"."0.4.2";
3142 by-version."tunnel-agent"."0.4.2" = lib.makeOverridable self.buildNodePackage {
3143 name = "tunnel-agent-0.4.2";
3144 bin = false;
3145 src = [
3146 (fetchurl {
3147 url = "http://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.2.tgz";
3148 name = "tunnel-agent-0.4.2.tgz";
3149 sha1 = "1104e3f36ac87125c287270067d582d18133bfee";
3150 })
3151 ];
3152 buildInputs =
3153 (self.nativeDeps."tunnel-agent" or []);
3154 deps = {
3155 };
3156 peerDependencies = [
3157 ];
3158 passthru.names = [ "tunnel-agent" ];
3159 };
3160 by-spec."tweetnacl".">=0.13.0 <1.0.0" =
3161 self.by-version."tweetnacl"."0.13.3";
3162 by-version."tweetnacl"."0.13.3" = lib.makeOverridable self.buildNodePackage {
3163 name = "tweetnacl-0.13.3";
3164 bin = false;
3165 src = [
3166 (fetchurl {
3167 url = "http://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz";
3168 name = "tweetnacl-0.13.3.tgz";
3169 sha1 = "d628b56f3bcc3d5ae74ba9d4c1a704def5ab4b56";
3170 })
3171 ];
3172 buildInputs =
3173 (self.nativeDeps."tweetnacl" or []);
3174 deps = {
3175 };
3176 peerDependencies = [
3177 ];
3178 passthru.names = [ "tweetnacl" ];
3179 };
3180 by-spec."underscore"."~1.7.0" =
3181 self.by-version."underscore"."1.7.0";
3182 by-version."underscore"."1.7.0" = lib.makeOverridable self.buildNodePackage {
3183 name = "underscore-1.7.0";
3184 bin = false;
3185 src = [
3186 (fetchurl {
3187 url = "http://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz";
3188 name = "underscore-1.7.0.tgz";
3189 sha1 = "6bbaf0877500d36be34ecaa584e0db9fef035209";
3190 })
3191 ];
3192 buildInputs =
3193 (self.nativeDeps."underscore" or []);
3194 deps = {
3195 };
3196 peerDependencies = [
3197 ];
3198 passthru.names = [ "underscore" ];
3199 };
3200 by-spec."underscore.string"."~2.2.1" =
3201 self.by-version."underscore.string"."2.2.1";
3202 by-version."underscore.string"."2.2.1" = lib.makeOverridable self.buildNodePackage {
3203 name = "underscore.string-2.2.1";
3204 bin = false;
3205 src = [
3206 (fetchurl {
3207 url = "http://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz";
3208 name = "underscore.string-2.2.1.tgz";
3209 sha1 = "d7c0fa2af5d5a1a67f4253daee98132e733f0f19";
3210 })
3211 ];
3212 buildInputs =
3213 (self.nativeDeps."underscore.string" or []);
3214 deps = {
3215 };
3216 peerDependencies = [
3217 ];
3218 passthru.names = [ "underscore.string" ];
3219 };
3220 by-spec."underscore.string"."~2.3.3" =
3221 self.by-version."underscore.string"."2.3.3";
3222 by-version."underscore.string"."2.3.3" = lib.makeOverridable self.buildNodePackage {
3223 name = "underscore.string-2.3.3";
3224 bin = false;
3225 src = [
3226 (fetchurl {
3227 url = "http://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz";
3228 name = "underscore.string-2.3.3.tgz";
3229 sha1 = "71c08bf6b428b1133f37e78fa3a21c82f7329b0d";
3230 })
3231 ];
3232 buildInputs =
3233 (self.nativeDeps."underscore.string" or []);
3234 deps = {
3235 };
3236 peerDependencies = [
3237 ];
3238 passthru.names = [ "underscore.string" ];
3239 };
3240 by-spec."underscore.string"."~2.4.0" =
3241 self.by-version."underscore.string"."2.4.0";
3242 by-version."underscore.string"."2.4.0" = lib.makeOverridable self.buildNodePackage {
3243 name = "underscore.string-2.4.0";
3244 bin = false;
3245 src = [
3246 (fetchurl {
3247 url = "http://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz";
3248 name = "underscore.string-2.4.0.tgz";
3249 sha1 = "8cdd8fbac4e2d2ea1e7e2e8097c42f442280f85b";
3250 })
3251 ];
3252 buildInputs =
3253 (self.nativeDeps."underscore.string" or []);
3254 deps = {
3255 };
3256 peerDependencies = [
3257 ];
3258 passthru.names = [ "underscore.string" ];
3259 };
3260 by-spec."util-deprecate"."~1.0.1" =
3261 self.by-version."util-deprecate"."1.0.2";
3262 by-version."util-deprecate"."1.0.2" = lib.makeOverridable self.buildNodePackage {
3263 name = "util-deprecate-1.0.2";
3264 bin = false;
3265 src = [
3266 (fetchurl {
3267 url = "http://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz";
3268 name = "util-deprecate-1.0.2.tgz";
3269 sha1 = "450d4dc9fa70de732762fbd2d4a28981419a0ccf";
3270 })
3271 ];
3272 buildInputs =
3273 (self.nativeDeps."util-deprecate" or []);
3274 deps = {
3275 };
3276 peerDependencies = [
3277 ];
3278 passthru.names = [ "util-deprecate" ];
3279 };
3280 by-spec."verror"."1.3.6" =
3281 self.by-version."verror"."1.3.6";
3282 by-version."verror"."1.3.6" = lib.makeOverridable self.buildNodePackage {
3283 name = "verror-1.3.6";
3284 bin = false;
3285 src = [
3286 (fetchurl {
3287 url = "http://registry.npmjs.org/verror/-/verror-1.3.6.tgz";
3288 name = "verror-1.3.6.tgz";
3289 sha1 = "cff5df12946d297d2baaefaa2689e25be01c005c";
3290 })
3291 ];
3292 buildInputs =
3293 (self.nativeDeps."verror" or []);
3294 deps = {
3295 "extsprintf-1.0.2" = self.by-version."extsprintf"."1.0.2";
3296 };
3297 peerDependencies = [
3298 ];
3299 passthru.names = [ "verror" ];
3300 };
3301 by-spec."which"."~1.0.5" =
3302 self.by-version."which"."1.0.9";
3303 by-version."which"."1.0.9" = lib.makeOverridable self.buildNodePackage {
3304 name = "which-1.0.9";
3305 bin = true;
3306 src = [
3307 (fetchurl {
3308 url = "http://registry.npmjs.org/which/-/which-1.0.9.tgz";
3309 name = "which-1.0.9.tgz";
3310 sha1 = "460c1da0f810103d0321a9b633af9e575e64486f";
3311 })
3312 ];
3313 buildInputs =
3314 (self.nativeDeps."which" or []);
3315 deps = {
3316 };
3317 peerDependencies = [
3318 ];
3319 passthru.names = [ "which" ];
3320 };
3321 by-spec."xtend"."^4.0.0" =
3322 self.by-version."xtend"."4.0.1";
3323 by-version."xtend"."4.0.1" = lib.makeOverridable self.buildNodePackage {
3324 name = "xtend-4.0.1";
3325 bin = false;
3326 src = [
3327 (fetchurl {
3328 url = "http://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz";
3329 name = "xtend-4.0.1.tgz";
3330 sha1 = "a5c6d532be656e23db820efb943a1f04998d63af";
3331 })
3332 ];
3333 buildInputs =
3334 (self.nativeDeps."xtend" or []);
3335 deps = {
3336 };
3337 peerDependencies = [
3338 ];
3339 passthru.names = [ "xtend" ];
3340 };
3341 }
@@ -14,6 +14,20 b' let'
14 url = http://www.repoze.org/LICENSE.txt;
14 url = http://www.repoze.org/LICENSE.txt;
15 };
15 };
16 };
16 };
17
18 # johbo: Interim bridge which allows us to build with the upcoming
19 # nixos.16.09 branch (unstable at the moment of writing this note) and the
20 # current stable nixos-16.03.
21 backwardsCompatibleFetchgit = { ... }@args:
22 let
23 origSources = pkgs.fetchgit args;
24 in
25 pkgs.lib.overrideDerivation origSources (oldAttrs: {
26 NIX_PREFETCH_GIT_CHECKOUT_HOOK = ''
27 find $out -name '.git*' -print0 | xargs -0 rm -rf
28 '';
29 });
30
17 in
31 in
18
32
19 self: super: {
33 self: super: {
@@ -96,7 +110,7 b' self: super: {'
96 });
110 });
97
111
98 py-gfm = super.py-gfm.override {
112 py-gfm = super.py-gfm.override {
99 src = pkgs.fetchgit {
113 src = backwardsCompatibleFetchgit {
100 url = "https://code.rhodecode.com/upstream/py-gfm";
114 url = "https://code.rhodecode.com/upstream/py-gfm";
101 rev = "0d66a19bc16e3d49de273c0f797d4e4781e8c0f2";
115 rev = "0d66a19bc16e3d49de273c0f797d4e4781e8c0f2";
102 sha256 = "0ryp74jyihd3ckszq31bml5jr3bciimhfp7va7kw6ld92930ksv3";
116 sha256 = "0ryp74jyihd3ckszq31bml5jr3bciimhfp7va7kw6ld92930ksv3";
@@ -120,7 +134,7 b' self: super: {'
120
134
121 Pylons = super.Pylons.override (attrs: {
135 Pylons = super.Pylons.override (attrs: {
122 name = "Pylons-1.0.1-patch1";
136 name = "Pylons-1.0.1-patch1";
123 src = pkgs.fetchgit {
137 src = backwardsCompatibleFetchgit {
124 url = "https://code.rhodecode.com/upstream/pylons";
138 url = "https://code.rhodecode.com/upstream/pylons";
125 rev = "707354ee4261b9c10450404fc9852ccea4fd667d";
139 rev = "707354ee4261b9c10450404fc9852ccea4fd667d";
126 sha256 = "b2763274c2780523a335f83a1df65be22ebe4ff413a7bc9e9288d23c1f62032e";
140 sha256 = "b2763274c2780523a335f83a1df65be22ebe4ff413a7bc9e9288d23c1f62032e";
@@ -51,19 +51,6 b''
51 license = [ { fullName = "BSD-like (http://repoze.org/license.html)"; } ];
51 license = [ { fullName = "BSD-like (http://repoze.org/license.html)"; } ];
52 };
52 };
53 };
53 };
54 Fabric = super.buildPythonPackage {
55 name = "Fabric-1.10.0";
56 buildInputs = with self; [];
57 doCheck = false;
58 propagatedBuildInputs = with self; [paramiko];
59 src = fetchurl {
60 url = "https://pypi.python.org/packages/e3/5f/b6ebdb5241d5ec9eab582a5c8a01255c1107da396f849e538801d2fe64a5/Fabric-1.10.0.tar.gz";
61 md5 = "2cb96473387f0e7aa035210892352f4a";
62 };
63 meta = {
64 license = [ pkgs.lib.licenses.bsdOriginal ];
65 };
66 };
67 FormEncode = super.buildPythonPackage {
54 FormEncode = super.buildPythonPackage {
68 name = "FormEncode-1.2.4";
55 name = "FormEncode-1.2.4";
69 buildInputs = with self; [];
56 buildInputs = with self; [];
@@ -1430,7 +1417,7 b''
1430 };
1417 };
1431 };
1418 };
1432 rhodecode-enterprise-ce = super.buildPythonPackage {
1419 rhodecode-enterprise-ce = super.buildPythonPackage {
1433 name = "rhodecode-enterprise-ce-4.3.1";
1420 name = "rhodecode-enterprise-ce-4.4.0";
1434 buildInputs = with self; [WebTest configobj cssselect flake8 lxml mock pytest pytest-cov pytest-runner];
1421 buildInputs = with self; [WebTest configobj cssselect flake8 lxml mock pytest pytest-cov pytest-runner];
1435 doCheck = true;
1422 doCheck = true;
1436 propagatedBuildInputs = with self; [Babel Beaker FormEncode Mako Markdown MarkupSafe MySQL-python Paste PasteDeploy PasteScript Pygments Pylons Pyro4 Routes SQLAlchemy Tempita URLObject WebError WebHelpers WebHelpers2 WebOb WebTest Whoosh alembic amqplib anyjson appenlight-client authomatic backport-ipaddress celery channelstream colander decorator deform docutils gevent gunicorn infrae.cache ipython iso8601 kombu msgpack-python packaging psycopg2 py-gfm pycrypto pycurl pyparsing pyramid pyramid-debugtoolbar pyramid-mako pyramid-beaker pysqlite python-dateutil python-ldap python-memcached python-pam recaptcha-client repoze.lru requests simplejson waitress zope.cachedescriptors dogpile.cache dogpile.core psutil py-bcrypt];
1423 propagatedBuildInputs = with self; [Babel Beaker FormEncode Mako Markdown MarkupSafe MySQL-python Paste PasteDeploy PasteScript Pygments Pylons Pyro4 Routes SQLAlchemy Tempita URLObject WebError WebHelpers WebHelpers2 WebOb WebTest Whoosh alembic amqplib anyjson appenlight-client authomatic backport-ipaddress celery channelstream colander decorator deform docutils gevent gunicorn infrae.cache ipython iso8601 kombu msgpack-python packaging psycopg2 py-gfm pycrypto pycurl pyparsing pyramid pyramid-debugtoolbar pyramid-mako pyramid-beaker pysqlite python-dateutil python-ldap python-memcached python-pam recaptcha-client repoze.lru requests simplejson waitress zope.cachedescriptors dogpile.cache dogpile.core psutil py-bcrypt];
@@ -1,7 +1,6 b''
1 Babel==1.3
1 Babel==1.3
2 Beaker==1.7.0
2 Beaker==1.7.0
3 CProfileV==1.0.6
3 CProfileV==1.0.6
4 Fabric==1.10.0
5 FormEncode==1.2.4
4 FormEncode==1.2.4
6 Jinja2==2.7.3
5 Jinja2==2.7.3
7 Mako==1.0.1
6 Mako==1.0.1
@@ -1,1 +1,1 b''
1 4.3.1 No newline at end of file
1 4.4.0 No newline at end of file
@@ -51,7 +51,7 b' PYRAMID_SETTINGS = {}'
51 EXTENSIONS = {}
51 EXTENSIONS = {}
52
52
53 __version__ = ('.'.join((str(each) for each in VERSION[:3])))
53 __version__ = ('.'.join((str(each) for each in VERSION[:3])))
54 __dbversion__ = 55 # defines current db version for migrations
54 __dbversion__ = 58 # defines current db version for migrations
55 __platform__ = platform.system()
55 __platform__ = platform.system()
56 __license__ = 'AGPLv3, and Commercial License'
56 __license__ = 'AGPLv3, and Commercial License'
57 __author__ = 'RhodeCode GmbH'
57 __author__ = 'RhodeCode GmbH'
@@ -60,3 +60,4 b' EXTENSIONS = {}'
60 is_windows = __platform__ in ['Windows']
60 is_windows = __platform__ in ['Windows']
61 is_unix = not is_windows
61 is_unix = not is_windows
62 is_test = False
62 is_test = False
63 disable_error_handler = False
@@ -29,7 +29,9 b' from rhodecode.lib.ext_json import json'
29 def url_gen(request):
29 def url_gen(request):
30 urls = {
30 urls = {
31 'connect': request.route_url('channelstream_connect'),
31 'connect': request.route_url('channelstream_connect'),
32 'subscribe': request.route_url('channelstream_subscribe')
32 'subscribe': request.route_url('channelstream_subscribe'),
33 'longpoll': request.registry.settings.get('channelstream.longpoll_url', ''),
34 'ws': request.registry.settings.get('channelstream.ws_url', '')
33 }
35 }
34 return json.dumps(urls)
36 return json.dumps(urls)
35
37
@@ -95,6 +95,7 b' class ChannelstreamView(object):'
95 'display_name': None,
95 'display_name': None,
96 'display_link': None,
96 'display_link': None,
97 }
97 }
98 user_data['permissions'] = c.rhodecode_user.permissions
98 payload = {
99 payload = {
99 'username': user.username,
100 'username': user.username,
100 'user_state': user_data,
101 'user_state': user_data,
@@ -28,7 +28,11 b' from rhodecode.lib.utils2 import __get_l'
28
28
29 # language map is also used by whoosh indexer, which for those specified
29 # language map is also used by whoosh indexer, which for those specified
30 # extensions will index it's content
30 # extensions will index it's content
31 LANGUAGES_EXTENSIONS_MAP = __get_lem()
31 # custom extensions to lexers, format is 'ext': 'LexerClass'
32 extra = {
33 'vbs': 'VbNet'
34 }
35 LANGUAGES_EXTENSIONS_MAP = __get_lem(extra)
32
36
33 DATETIME_FORMAT = "%Y-%m-%d %H:%M:%S"
37 DATETIME_FORMAT = "%Y-%m-%d %H:%M:%S"
34
38
@@ -158,6 +158,8 b' def load_pyramid_environment(global_conf'
158 # This has to be done before the database connection is initialized.
158 # This has to be done before the database connection is initialized.
159 if settings['is_test']:
159 if settings['is_test']:
160 rhodecode.is_test = True
160 rhodecode.is_test = True
161 rhodecode.disable_error_handler = True
162
161 utils.initialize_test_environment(settings_merged)
163 utils.initialize_test_environment(settings_merged)
162
164
163 # Initialize the database connection.
165 # Initialize the database connection.
@@ -44,9 +44,10 b' from rhodecode.config import patches'
44 from rhodecode.config.routing import STATIC_FILE_PREFIX
44 from rhodecode.config.routing import STATIC_FILE_PREFIX
45 from rhodecode.config.environment import (
45 from rhodecode.config.environment import (
46 load_environment, load_pyramid_environment)
46 load_environment, load_pyramid_environment)
47 from rhodecode.lib.exceptions import VCSServerUnavailable
48 from rhodecode.lib.vcs.exceptions import VCSCommunicationError
47 from rhodecode.lib.middleware import csrf
49 from rhodecode.lib.middleware import csrf
48 from rhodecode.lib.middleware.appenlight import wrap_in_appenlight_if_enabled
50 from rhodecode.lib.middleware.appenlight import wrap_in_appenlight_if_enabled
49 from rhodecode.lib.middleware.disable_vcs import DisableVCSPagesWrapper
50 from rhodecode.lib.middleware.https_fixup import HttpsFixup
51 from rhodecode.lib.middleware.https_fixup import HttpsFixup
51 from rhodecode.lib.middleware.vcs import VCSMiddleware
52 from rhodecode.lib.middleware.vcs import VCSMiddleware
52 from rhodecode.lib.plugins.utils import register_rhodecode_plugin
53 from rhodecode.lib.plugins.utils import register_rhodecode_plugin
@@ -193,10 +194,6 b' def make_not_found_view(config):'
193
194
194 pylons_app_as_view = wsgiapp(pylons_app)
195 pylons_app_as_view = wsgiapp(pylons_app)
195
196
196 # Protect from VCS Server error related pages when server is not available
197 if not vcs_server_enabled:
198 pylons_app_as_view = DisableVCSPagesWrapper(pylons_app_as_view)
199
200 def pylons_app_with_error_handler(context, request):
197 def pylons_app_with_error_handler(context, request):
201 """
198 """
202 Handle exceptions from rc pylons app:
199 Handle exceptions from rc pylons app:
@@ -221,10 +218,18 b' def make_not_found_view(config):'
221 return error_handler(response, request)
218 return error_handler(response, request)
222 except HTTPError as e: # pyramid type exceptions
219 except HTTPError as e: # pyramid type exceptions
223 return error_handler(e, request)
220 return error_handler(e, request)
224 except Exception:
221 except Exception as e:
225 if settings.get('debugtoolbar.enabled', False):
222 log.exception(e)
223
224 if (settings.get('debugtoolbar.enabled', False) or
225 rhodecode.disable_error_handler):
226 raise
226 raise
227
228 if isinstance(e, VCSCommunicationError):
229 return error_handler(VCSServerUnavailable(), request)
230
227 return error_handler(HTTPInternalServerError(), request)
231 return error_handler(HTTPInternalServerError(), request)
232
228 return response
233 return response
229
234
230 return pylons_app_with_error_handler
235 return pylons_app_with_error_handler
@@ -249,7 +254,6 b' def webob_to_pyramid_http_response(webob'
249
254
250
255
251 def error_handler(exception, request):
256 def error_handler(exception, request):
252 # TODO: dan: replace the old pylons error controller with this
253 from rhodecode.model.settings import SettingsModel
257 from rhodecode.model.settings import SettingsModel
254 from rhodecode.lib.utils2 import AttributeDict
258 from rhodecode.lib.utils2 import AttributeDict
255
259
@@ -278,6 +282,10 b' def error_handler(exception, request):'
278 if not c.rhodecode_name:
282 if not c.rhodecode_name:
279 c.rhodecode_name = 'Rhodecode'
283 c.rhodecode_name = 'Rhodecode'
280
284
285 c.causes = []
286 if hasattr(base_response, 'causes'):
287 c.causes = base_response.causes
288
281 response = render_to_response(
289 response = render_to_response(
282 '/errors/error_document.html', {'c': c}, request=request,
290 '/errors/error_document.html', {'c': c}, request=request,
283 response=base_response)
291 response=base_response)
@@ -42,6 +42,7 b" STATIC_FILE_PREFIX = '/_static'"
42 URL_NAME_REQUIREMENTS = {
42 URL_NAME_REQUIREMENTS = {
43 # group name can have a slash in them, but they must not end with a slash
43 # group name can have a slash in them, but they must not end with a slash
44 'group_name': r'.*?[^/]',
44 'group_name': r'.*?[^/]',
45 'repo_group_name': r'.*?[^/]',
45 # repo names can have a slash in them, but they must not end with a slash
46 # repo names can have a slash in them, but they must not end with a slash
46 'repo_name': r'.*?[^/]',
47 'repo_name': r'.*?[^/]',
47 # file path eats up everything at the end
48 # file path eats up everything at the end
@@ -531,9 +532,7 b' def make_map(config):'
531 action='my_account_update', conditions={'method': ['POST']})
532 action='my_account_update', conditions={'method': ['POST']})
532
533
533 m.connect('my_account_password', '/my_account/password',
534 m.connect('my_account_password', '/my_account/password',
534 action='my_account_password', conditions={'method': ['GET']})
535 action='my_account_password', conditions={'method': ['GET', 'POST']})
535 m.connect('my_account_password', '/my_account/password',
536 action='my_account_password_update', conditions={'method': ['POST']})
537
536
538 m.connect('my_account_repos', '/my_account/repos',
537 m.connect('my_account_repos', '/my_account/repos',
539 action='my_account_repos', conditions={'method': ['GET']})
538 action='my_account_repos', conditions={'method': ['GET']})
@@ -32,17 +32,21 b' from pylons.controllers.util import redi'
32 from pylons.i18n.translation import _
32 from pylons.i18n.translation import _
33 from sqlalchemy.orm import joinedload
33 from sqlalchemy.orm import joinedload
34
34
35 from rhodecode import forms
35 from rhodecode.lib import helpers as h
36 from rhodecode.lib import helpers as h
36 from rhodecode.lib import auth
37 from rhodecode.lib import auth
37 from rhodecode.lib.auth import (
38 from rhodecode.lib.auth import (
38 LoginRequired, NotAnonymous, AuthUser, generate_auth_token)
39 LoginRequired, NotAnonymous, AuthUser, generate_auth_token)
39 from rhodecode.lib.base import BaseController, render
40 from rhodecode.lib.base import BaseController, render
41 from rhodecode.lib.utils import jsonify
40 from rhodecode.lib.utils2 import safe_int, md5
42 from rhodecode.lib.utils2 import safe_int, md5
41 from rhodecode.lib.ext_json import json
43 from rhodecode.lib.ext_json import json
44
45 from rhodecode.model.validation_schema.schemas import user_schema
42 from rhodecode.model.db import (
46 from rhodecode.model.db import (
43 Repository, PullRequest, PullRequestReviewers, UserEmailMap, User,
47 Repository, PullRequest, PullRequestReviewers, UserEmailMap, User,
44 UserFollowing)
48 UserFollowing)
45 from rhodecode.model.forms import UserForm, PasswordChangeForm
49 from rhodecode.model.forms import UserForm
46 from rhodecode.model.scm import RepoList
50 from rhodecode.model.scm import RepoList
47 from rhodecode.model.user import UserModel
51 from rhodecode.model.user import UserModel
48 from rhodecode.model.repo import RepoModel
52 from rhodecode.model.repo import RepoModel
@@ -185,38 +189,44 b' class MyAccountController(BaseController'
185 force_defaults=False
189 force_defaults=False
186 )
190 )
187
191
188 @auth.CSRFRequired()
192 @auth.CSRFRequired(except_methods=['GET'])
189 def my_account_password_update(self):
190 c.active = 'password'
191 self.__load_data()
192 _form = PasswordChangeForm(c.rhodecode_user.username)()
193 try:
194 form_result = _form.to_python(request.POST)
195 UserModel().update_user(c.rhodecode_user.user_id, **form_result)
196 instance = c.rhodecode_user.get_instance()
197 instance.update_userdata(force_password_change=False)
198 Session().commit()
199 session.setdefault('rhodecode_user', {}).update(
200 {'password': md5(instance.password)})
201 session.save()
202 h.flash(_("Successfully updated password"), category='success')
203 except formencode.Invalid as errors:
204 return htmlfill.render(
205 render('admin/my_account/my_account.html'),
206 defaults=errors.value,
207 errors=errors.error_dict or {},
208 prefix_error=False,
209 encoding="UTF-8",
210 force_defaults=False)
211 except Exception:
212 log.exception("Exception updating password")
213 h.flash(_('Error occurred during update of user password'),
214 category='error')
215 return render('admin/my_account/my_account.html')
216
217 def my_account_password(self):
193 def my_account_password(self):
218 c.active = 'password'
194 c.active = 'password'
219 self.__load_data()
195 self.__load_data()
196
197 schema = user_schema.ChangePasswordSchema().bind(
198 username=c.rhodecode_user.username)
199
200 form = forms.Form(schema,
201 buttons=(forms.buttons.save, forms.buttons.reset))
202
203 if request.method == 'POST':
204 controls = request.POST.items()
205 try:
206 valid_data = form.validate(controls)
207 UserModel().update_user(c.rhodecode_user.user_id, **valid_data)
208 instance = c.rhodecode_user.get_instance()
209 instance.update_userdata(force_password_change=False)
210 Session().commit()
211 except forms.ValidationFailure as e:
212 request.session.flash(
213 _('Error occurred during update of user password'),
214 queue='error')
215 form = e
216 except Exception:
217 log.exception("Exception updating password")
218 request.session.flash(
219 _('Error occurred during update of user password'),
220 queue='error')
221 else:
222 session.setdefault('rhodecode_user', {}).update(
223 {'password': md5(instance.password)})
224 session.save()
225 request.session.flash(
226 _("Successfully updated password"), queue='success')
227 return redirect(url('my_account_password'))
228
229 c.form = form
220 return render('admin/my_account/my_account.html')
230 return render('admin/my_account/my_account.html')
221
231
222 def my_account_repos(self):
232 def my_account_repos(self):
@@ -352,11 +362,10 b' class MyAccountController(BaseController'
352 return render('admin/my_account/my_account.html')
362 return render('admin/my_account/my_account.html')
353
363
354 @auth.CSRFRequired()
364 @auth.CSRFRequired()
365 @jsonify
355 def my_notifications_toggle_visibility(self):
366 def my_notifications_toggle_visibility(self):
356 user = c.rhodecode_user.get_instance()
367 user = c.rhodecode_user.get_instance()
357 user_data = user.user_data
368 new_status = not user.user_data.get('notification_status', True)
358 status = user_data.get('notification_status', False)
369 user.update_userdata(notification_status=new_status)
359 user_data['notification_status'] = not status
360 user.user_data = user_data
361 Session().commit()
370 Session().commit()
362 return redirect(url('my_account_notifications'))
371 return user.user_data['notification_status']
@@ -135,6 +135,7 b' class SettingsController(BaseController)'
135 c.svn_tag_patterns = model.get_global_svn_tag_patterns()
135 c.svn_tag_patterns = model.get_global_svn_tag_patterns()
136
136
137 application_form = ApplicationUiSettingsForm()()
137 application_form = ApplicationUiSettingsForm()()
138
138 try:
139 try:
139 form_result = application_form.to_python(dict(request.POST))
140 form_result = application_form.to_python(dict(request.POST))
140 except formencode.Invalid as errors:
141 except formencode.Invalid as errors:
@@ -151,12 +152,14 b' class SettingsController(BaseController)'
151 )
152 )
152
153
153 try:
154 try:
154 model.update_global_ssl_setting(form_result['web_push_ssl'])
155 if c.visual.allow_repo_location_change:
155 if c.visual.allow_repo_location_change:
156 model.update_global_path_setting(
156 model.update_global_path_setting(
157 form_result['paths_root_path'])
157 form_result['paths_root_path'])
158
159 model.update_global_ssl_setting(form_result['web_push_ssl'])
158 model.update_global_hook_settings(form_result)
160 model.update_global_hook_settings(form_result)
159 model.create_global_svn_settings(form_result)
161
162 model.create_or_update_global_svn_settings(form_result)
160 model.create_or_update_global_hg_settings(form_result)
163 model.create_or_update_global_hg_settings(form_result)
161 model.create_or_update_global_pr_settings(form_result)
164 model.create_or_update_global_pr_settings(form_result)
162 except Exception:
165 except Exception:
@@ -789,18 +792,5 b' LabSetting = collections.namedtuple('
789 # This list has to be kept in sync with the form
792 # This list has to be kept in sync with the form
790 # rhodecode.model.forms.LabsSettingsForm.
793 # rhodecode.model.forms.LabsSettingsForm.
791 _LAB_SETTINGS = [
794 _LAB_SETTINGS = [
792 LabSetting(
795
793 key='rhodecode_proxy_subversion_http_requests',
794 type='bool',
795 group=lazy_ugettext('Subversion HTTP Support'),
796 label=lazy_ugettext('Proxy subversion HTTP requests'),
797 help='' # Do not translate the empty string!
798 ),
799 LabSetting(
800 key='rhodecode_subversion_http_server_url',
801 type='str',
802 group=lazy_ugettext('Subversion HTTP Server URL'),
803 label='', # Do not translate the empty string!
804 help=lazy_ugettext('e.g. http://localhost:8080/')
805 ),
806 ]
796 ]
@@ -44,6 +44,8 b' from rhodecode.lib.vcs.backends.base imp'
44 from rhodecode.lib.vcs.exceptions import (
44 from rhodecode.lib.vcs.exceptions import (
45 CommitError, EmptyRepositoryError, NodeDoesNotExistError)
45 CommitError, EmptyRepositoryError, NodeDoesNotExistError)
46 from rhodecode.model.db import Statistics, CacheKey, User
46 from rhodecode.model.db import Statistics, CacheKey, User
47 from rhodecode.model.repo import ReadmeFinder
48
47
49
48 log = logging.getLogger(__name__)
50 log = logging.getLogger(__name__)
49
51
@@ -61,37 +63,16 b' class SummaryController(BaseRepoControll'
61 @cache_region('long_term')
63 @cache_region('long_term')
62 def _generate_readme(cache_key):
64 def _generate_readme(cache_key):
63 readme_data = None
65 readme_data = None
64 readme_file = None
66 readme_node = None
65 try:
67 readme_filename = None
66 # gets the landing revision or tip if fails
68 commit = self._get_landing_commit_or_none(db_repo)
67 commit = db_repo.get_landing_commit()
69 if commit:
68 if isinstance(commit, EmptyCommit):
70 log.debug("Searching for a README file.")
69 raise EmptyRepositoryError()
71 readme_node = ReadmeFinder(default_renderer).search(commit)
70 renderer = MarkupRenderer()
72 if readme_node:
71 for f in renderer.pick_readme_order(default_renderer):
73 readme_data = self._render_readme_or_none(commit, readme_node)
72 try:
74 readme_filename = readme_node.path
73 node = commit.get_node(f)
75 return readme_data, readme_filename
74 except NodeDoesNotExistError:
75 continue
76
77 if not node.is_file():
78 continue
79
80 readme_file = f
81 log.debug('Found README file `%s` rendering...',
82 readme_file)
83 readme_data = renderer.render(node.content,
84 filename=f)
85 break
86 except CommitError:
87 log.exception("Problem getting commit")
88 pass
89 except EmptyRepositoryError:
90 pass
91 except Exception:
92 log.exception("General failure")
93
94 return readme_data, readme_file
95
76
96 invalidator_context = CacheKey.repo_context_cache(
77 invalidator_context = CacheKey.repo_context_cache(
97 _generate_readme, repo_name, CacheKey.CACHE_TYPE_README)
78 _generate_readme, repo_name, CacheKey.CACHE_TYPE_README)
@@ -102,11 +83,36 b' class SummaryController(BaseRepoControll'
102
83
103 return computed
84 return computed
104
85
86 def _get_landing_commit_or_none(self, db_repo):
87 log.debug("Getting the landing commit.")
88 try:
89 commit = db_repo.get_landing_commit()
90 if not isinstance(commit, EmptyCommit):
91 return commit
92 else:
93 log.debug("Repository is empty, no README to render.")
94 except CommitError:
95 log.exception(
96 "Problem getting commit when trying to render the README.")
97
98 def _render_readme_or_none(self, commit, readme_node):
99 log.debug(
100 'Found README file `%s` rendering...', readme_node.path)
101 renderer = MarkupRenderer()
102 try:
103 return renderer.render(
104 readme_node.content, filename=readme_node.path)
105 except Exception:
106 log.exception(
107 "Exception while trying to render the README")
105
108
106 @LoginRequired()
109 @LoginRequired()
107 @HasRepoPermissionAnyDecorator(
110 @HasRepoPermissionAnyDecorator(
108 'repository.read', 'repository.write', 'repository.admin')
111 'repository.read', 'repository.write', 'repository.admin')
109 def index(self, repo_name):
112 def index(self, repo_name):
113
114 # Prepare the clone URL
115
110 username = ''
116 username = ''
111 if c.rhodecode_user.username != User.DEFAULT_USER:
117 if c.rhodecode_user.username != User.DEFAULT_USER:
112 username = safe_str(c.rhodecode_user.username)
118 username = safe_str(c.rhodecode_user.username)
@@ -124,6 +130,8 b' class SummaryController(BaseRepoControll'
124 c.clone_repo_url_id = c.rhodecode_db_repo.clone_url(
130 c.clone_repo_url_id = c.rhodecode_db_repo.clone_url(
125 user=username, uri_tmpl=_def_clone_uri_by_id)
131 user=username, uri_tmpl=_def_clone_uri_by_id)
126
132
133 # If enabled, get statistics data
134
127 c.show_stats = bool(c.rhodecode_db_repo.enable_statistics)
135 c.show_stats = bool(c.rhodecode_db_repo.enable_statistics)
128
136
129 stats = self.sa.query(Statistics)\
137 stats = self.sa.query(Statistics)\
@@ -47,7 +47,7 b' def _commits_as_dict(commit_ids, repos):'
47 if not commit_ids:
47 if not commit_ids:
48 return []
48 return []
49
49
50 needed_commits = set(commit_ids)
50 needed_commits = list(commit_ids)
51
51
52 commits = []
52 commits = []
53 reviewers = []
53 reviewers = []
@@ -57,6 +57,7 b' def _commits_as_dict(commit_ids, repos):'
57
57
58 vcs_repo = repo.scm_instance(cache=False)
58 vcs_repo = repo.scm_instance(cache=False)
59 try:
59 try:
60 # use copy of needed_commits since we modify it while iterating
60 for commit_id in list(needed_commits):
61 for commit_id in list(needed_commits):
61 try:
62 try:
62 cs = vcs_repo.get_changeset(commit_id)
63 cs = vcs_repo.get_changeset(commit_id)
@@ -78,7 +79,7 b' def _commits_as_dict(commit_ids, repos):'
78 repo.repo_name)
79 repo.repo_name)
79 commits.append(cs_data)
80 commits.append(cs_data)
80
81
81 needed_commits.discard(commit_id)
82 needed_commits.remove(commit_id)
82
83
83 except Exception as e:
84 except Exception as e:
84 log.exception(e)
85 log.exception(e)
@@ -1,21 +1,22 b''
1 # English translations for rhodecode.
1 # Translations template for rhodecode-enterprise-ce.
2 # Copyright (C) 2015 RhodeCode GmbH
2 # Copyright (C) 2016 RhodeCode GmbH
3 # This file is distributed under the same license as the rhodecode project.
3 # This file is distributed under the same license as the rhodecode-enterprise-ce project.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
5 #
4 #
5 # Translators:
6 msgid ""
6 msgid ""
7 msgstr ""
7 msgstr ""
8 "Project-Id-Version: rhodecode 0.1\n"
8 "Project-Id-Version: RhodeCode\n"
9 "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
9 "Report-Msgid-Bugs-To: marcin@rhodecode.com\n"
10 "POT-Creation-Date: 2013-06-01 18:38+0200\n"
10 "POT-Creation-Date: 2013-06-01 18:38+0200\n"
11 "PO-Revision-Date: 2011-02-25 19:13+0100\n"
11 "PO-Revision-Date: 2011-02-25 19:13+0100\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Last-Translator: Marcin Kuzminski <marcin@rhodecode.com>\n"
13 "Language-Team: en <LL@li.org>\n"
13 "Language-Team: en <admin@rhodecode.com>\n"
14 "Plural-Forms: nplurals=2; plural=(n != 1)\n"
15 "MIME-Version: 1.0\n"
14 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=utf-8\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
16 "Content-Transfer-Encoding: 8bit\n"
18 "Generated-By: Babel 0.9.6\n"
17 "Generated-By: Babel 1.3\n"
18 "Language: en\n"
19 "Plural-Forms: nplurals=2; plural=(n != 1)\n"
19
20
20 #: rhodecode/controllers/changelog.py:149
21 #: rhodecode/controllers/changelog.py:149
21 msgid "All Branches"
22 msgid "All Branches"
@@ -20,7 +20,7 b''
20
20
21 import logging
21 import logging
22
22
23 from rhodecode.model.db import Repository, Integration
23 from rhodecode.model.db import Repository, Integration, RepoGroup
24 from rhodecode.config.routing import (
24 from rhodecode.config.routing import (
25 ADMIN_PREFIX, add_route_requirements, URL_NAME_REQUIREMENTS)
25 ADMIN_PREFIX, add_route_requirements, URL_NAME_REQUIREMENTS)
26 from rhodecode.integrations import integration_type_registry
26 from rhodecode.integrations import integration_type_registry
@@ -29,6 +29,17 b' log = logging.getLogger(__name__)'
29
29
30
30
31 def includeme(config):
31 def includeme(config):
32
33 # global integrations
34
35 config.add_route('global_integrations_new',
36 ADMIN_PREFIX + '/integrations/new')
37 config.add_view('rhodecode.integrations.views.GlobalIntegrationsView',
38 attr='new_integration',
39 renderer='rhodecode:templates/admin/integrations/new.html',
40 request_method='GET',
41 route_name='global_integrations_new')
42
32 config.add_route('global_integrations_home',
43 config.add_route('global_integrations_home',
33 ADMIN_PREFIX + '/integrations')
44 ADMIN_PREFIX + '/integrations')
34 config.add_route('global_integrations_list',
45 config.add_route('global_integrations_list',
@@ -46,18 +57,80 b' def includeme(config):'
46 config.add_route('global_integrations_edit',
57 config.add_route('global_integrations_edit',
47 ADMIN_PREFIX + '/integrations/{integration}/{integration_id}',
58 ADMIN_PREFIX + '/integrations/{integration}/{integration_id}',
48 custom_predicates=(valid_integration,))
59 custom_predicates=(valid_integration,))
60
61
49 for route_name in ['global_integrations_create', 'global_integrations_edit']:
62 for route_name in ['global_integrations_create', 'global_integrations_edit']:
50 config.add_view('rhodecode.integrations.views.GlobalIntegrationsView',
63 config.add_view('rhodecode.integrations.views.GlobalIntegrationsView',
51 attr='settings_get',
64 attr='settings_get',
52 renderer='rhodecode:templates/admin/integrations/edit.html',
65 renderer='rhodecode:templates/admin/integrations/form.html',
53 request_method='GET',
66 request_method='GET',
54 route_name=route_name)
67 route_name=route_name)
55 config.add_view('rhodecode.integrations.views.GlobalIntegrationsView',
68 config.add_view('rhodecode.integrations.views.GlobalIntegrationsView',
56 attr='settings_post',
69 attr='settings_post',
57 renderer='rhodecode:templates/admin/integrations/edit.html',
70 renderer='rhodecode:templates/admin/integrations/form.html',
58 request_method='POST',
71 request_method='POST',
59 route_name=route_name)
72 route_name=route_name)
60
73
74
75 # repo group integrations
76 config.add_route('repo_group_integrations_home',
77 add_route_requirements(
78 '{repo_group_name}/settings/integrations',
79 URL_NAME_REQUIREMENTS
80 ),
81 custom_predicates=(valid_repo_group,)
82 )
83 config.add_route('repo_group_integrations_list',
84 add_route_requirements(
85 '{repo_group_name}/settings/integrations/{integration}',
86 URL_NAME_REQUIREMENTS
87 ),
88 custom_predicates=(valid_repo_group, valid_integration))
89 for route_name in ['repo_group_integrations_home', 'repo_group_integrations_list']:
90 config.add_view('rhodecode.integrations.views.RepoGroupIntegrationsView',
91 attr='index',
92 renderer='rhodecode:templates/admin/integrations/list.html',
93 request_method='GET',
94 route_name=route_name)
95
96 config.add_route('repo_group_integrations_new',
97 add_route_requirements(
98 '{repo_group_name}/settings/integrations/new',
99 URL_NAME_REQUIREMENTS
100 ),
101 custom_predicates=(valid_repo_group,))
102 config.add_view('rhodecode.integrations.views.RepoGroupIntegrationsView',
103 attr='new_integration',
104 renderer='rhodecode:templates/admin/integrations/new.html',
105 request_method='GET',
106 route_name='repo_group_integrations_new')
107
108 config.add_route('repo_group_integrations_create',
109 add_route_requirements(
110 '{repo_group_name}/settings/integrations/{integration}/new',
111 URL_NAME_REQUIREMENTS
112 ),
113 custom_predicates=(valid_repo_group, valid_integration))
114 config.add_route('repo_group_integrations_edit',
115 add_route_requirements(
116 '{repo_group_name}/settings/integrations/{integration}/{integration_id}',
117 URL_NAME_REQUIREMENTS
118 ),
119 custom_predicates=(valid_repo_group, valid_integration))
120 for route_name in ['repo_group_integrations_edit', 'repo_group_integrations_create']:
121 config.add_view('rhodecode.integrations.views.RepoGroupIntegrationsView',
122 attr='settings_get',
123 renderer='rhodecode:templates/admin/integrations/form.html',
124 request_method='GET',
125 route_name=route_name)
126 config.add_view('rhodecode.integrations.views.RepoGroupIntegrationsView',
127 attr='settings_post',
128 renderer='rhodecode:templates/admin/integrations/form.html',
129 request_method='POST',
130 route_name=route_name)
131
132
133 # repo integrations
61 config.add_route('repo_integrations_home',
134 config.add_route('repo_integrations_home',
62 add_route_requirements(
135 add_route_requirements(
63 '{repo_name}/settings/integrations',
136 '{repo_name}/settings/integrations',
@@ -74,8 +147,21 b' def includeme(config):'
74 config.add_view('rhodecode.integrations.views.RepoIntegrationsView',
147 config.add_view('rhodecode.integrations.views.RepoIntegrationsView',
75 attr='index',
148 attr='index',
76 request_method='GET',
149 request_method='GET',
150 renderer='rhodecode:templates/admin/integrations/list.html',
77 route_name=route_name)
151 route_name=route_name)
78
152
153 config.add_route('repo_integrations_new',
154 add_route_requirements(
155 '{repo_name}/settings/integrations/new',
156 URL_NAME_REQUIREMENTS
157 ),
158 custom_predicates=(valid_repo,))
159 config.add_view('rhodecode.integrations.views.RepoIntegrationsView',
160 attr='new_integration',
161 renderer='rhodecode:templates/admin/integrations/new.html',
162 request_method='GET',
163 route_name='repo_integrations_new')
164
79 config.add_route('repo_integrations_create',
165 config.add_route('repo_integrations_create',
80 add_route_requirements(
166 add_route_requirements(
81 '{repo_name}/settings/integrations/{integration}/new',
167 '{repo_name}/settings/integrations/{integration}/new',
@@ -91,12 +177,12 b' def includeme(config):'
91 for route_name in ['repo_integrations_edit', 'repo_integrations_create']:
177 for route_name in ['repo_integrations_edit', 'repo_integrations_create']:
92 config.add_view('rhodecode.integrations.views.RepoIntegrationsView',
178 config.add_view('rhodecode.integrations.views.RepoIntegrationsView',
93 attr='settings_get',
179 attr='settings_get',
94 renderer='rhodecode:templates/admin/integrations/edit.html',
180 renderer='rhodecode:templates/admin/integrations/form.html',
95 request_method='GET',
181 request_method='GET',
96 route_name=route_name)
182 route_name=route_name)
97 config.add_view('rhodecode.integrations.views.RepoIntegrationsView',
183 config.add_view('rhodecode.integrations.views.RepoIntegrationsView',
98 attr='settings_post',
184 attr='settings_post',
99 renderer='rhodecode:templates/admin/integrations/edit.html',
185 renderer='rhodecode:templates/admin/integrations/form.html',
100 request_method='POST',
186 request_method='POST',
101 route_name=route_name)
187 route_name=route_name)
102
188
@@ -107,20 +193,37 b' def valid_repo(info, request):'
107 return True
193 return True
108
194
109
195
196 def valid_repo_group(info, request):
197 repo_group = RepoGroup.get_by_group_name(info['match']['repo_group_name'])
198 if repo_group:
199 return True
200 return False
201
202
110 def valid_integration(info, request):
203 def valid_integration(info, request):
111 integration_type = info['match']['integration']
204 integration_type = info['match']['integration']
112 integration_id = info['match'].get('integration_id')
205 integration_id = info['match'].get('integration_id')
113 repo_name = info['match'].get('repo_name')
206 repo_name = info['match'].get('repo_name')
207 repo_group_name = info['match'].get('repo_group_name')
114
208
115 if integration_type not in integration_type_registry:
209 if integration_type not in integration_type_registry:
116 return False
210 return False
117
211
118 repo = None
212 repo, repo_group = None, None
119 if repo_name:
213 if repo_name:
120 repo = Repository.get_by_repo_name(info['match']['repo_name'])
214 repo = Repository.get_by_repo_name(repo_name)
121 if not repo:
215 if not repo:
122 return False
216 return False
123
217
218 if repo_group_name:
219 repo_group = RepoGroup.get_by_group_name(repo_group_name)
220 if not repo_group:
221 return False
222
223 if repo_name and repo_group:
224 raise Exception('Either repo or repo_group can be set, not both')
225
226
124 if integration_id:
227 if integration_id:
125 integration = Integration.get(integration_id)
228 integration = Integration.get(integration_id)
126 if not integration:
229 if not integration:
@@ -129,5 +232,7 b' def valid_integration(info, request):'
129 return False
232 return False
130 if repo and repo.repo_id != integration.repo_id:
233 if repo and repo.repo_id != integration.repo_id:
131 return False
234 return False
235 if repo_group and repo_group.group_id != integration.repo_group_id:
236 return False
132
237
133 return True
238 return True
@@ -20,26 +20,52 b''
20
20
21 import colander
21 import colander
22
22
23 from rhodecode.translation import lazy_ugettext
23 from rhodecode.translation import _
24
24
25
25
26 class IntegrationSettingsSchemaBase(colander.MappingSchema):
26 class IntegrationOptionsSchemaBase(colander.MappingSchema):
27 """
28 This base schema is intended for use in integrations.
29 It adds a few default settings (e.g., "enabled"), so that integration
30 authors don't have to maintain a bunch of boilerplate.
31 """
32 enabled = colander.SchemaNode(
27 enabled = colander.SchemaNode(
33 colander.Bool(),
28 colander.Bool(),
34 default=True,
29 default=True,
35 description=lazy_ugettext('Enable or disable this integration.'),
30 description=_('Enable or disable this integration.'),
36 missing=False,
31 missing=False,
37 title=lazy_ugettext('Enabled'),
32 title=_('Enabled'),
38 )
33 )
39
34
40 name = colander.SchemaNode(
35 name = colander.SchemaNode(
41 colander.String(),
36 colander.String(),
42 description=lazy_ugettext('Short name for this integration.'),
37 description=_('Short name for this integration.'),
43 missing=colander.required,
38 missing=colander.required,
44 title=lazy_ugettext('Integration name'),
39 title=_('Integration name'),
45 )
40 )
41
42
43 class RepoIntegrationOptionsSchema(IntegrationOptionsSchemaBase):
44 pass
45
46
47 class RepoGroupIntegrationOptionsSchema(IntegrationOptionsSchemaBase):
48 child_repos_only = colander.SchemaNode(
49 colander.Bool(),
50 default=True,
51 description=_(
52 'Limit integrations to to work only on the direct children '
53 'repositories of this repository group (no subgroups)'),
54 missing=False,
55 title=_('Limit to childen repos only'),
56 )
57
58
59 class GlobalIntegrationOptionsSchema(IntegrationOptionsSchemaBase):
60 child_repos_only = colander.SchemaNode(
61 colander.Bool(),
62 default=False,
63 description=_(
64 'Limit integrations to to work only on root level repositories'),
65 missing=False,
66 title=_('Root repositories only'),
67 )
68
69
70 class IntegrationSettingsSchemaBase(colander.MappingSchema):
71 pass
@@ -18,25 +18,84 b''
18 # RhodeCode Enterprise Edition, including its added features, Support services,
18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20
20
21 from rhodecode.integrations.schema import IntegrationSettingsSchemaBase
21 import colander
22 from rhodecode.translation import _
22
23
23
24
24 class IntegrationTypeBase(object):
25 class IntegrationTypeBase(object):
25 """ Base class for IntegrationType plugins """
26 """ Base class for IntegrationType plugins """
26
27
28 description = ''
29 icon = '''
30 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
31 <svg
32 xmlns:dc="http://purl.org/dc/elements/1.1/"
33 xmlns:cc="http://creativecommons.org/ns#"
34 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
35 xmlns:svg="http://www.w3.org/2000/svg"
36 xmlns="http://www.w3.org/2000/svg"
37 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
38 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
39 viewBox="0 -256 1792 1792"
40 id="svg3025"
41 version="1.1"
42 inkscape:version="0.48.3.1 r9886"
43 width="100%"
44 height="100%"
45 sodipodi:docname="cog_font_awesome.svg">
46 <metadata
47 id="metadata3035">
48 <rdf:RDF>
49 <cc:Work
50 rdf:about="">
51 <dc:format>image/svg+xml</dc:format>
52 <dc:type
53 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
54 </cc:Work>
55 </rdf:RDF>
56 </metadata>
57 <defs
58 id="defs3033" />
59 <sodipodi:namedview
60 pagecolor="#ffffff"
61 bordercolor="#666666"
62 borderopacity="1"
63 objecttolerance="10"
64 gridtolerance="10"
65 guidetolerance="10"
66 inkscape:pageopacity="0"
67 inkscape:pageshadow="2"
68 inkscape:window-width="640"
69 inkscape:window-height="480"
70 id="namedview3031"
71 showgrid="false"
72 inkscape:zoom="0.13169643"
73 inkscape:cx="896"
74 inkscape:cy="896"
75 inkscape:window-x="0"
76 inkscape:window-y="25"
77 inkscape:window-maximized="0"
78 inkscape:current-layer="svg3025" />
79 <g
80 transform="matrix(1,0,0,-1,121.49153,1285.4237)"
81 id="g3027">
82 <path
83 d="m 1024,640 q 0,106 -75,181 -75,75 -181,75 -106,0 -181,-75 -75,-75 -75,-181 0,-106 75,-181 75,-75 181,-75 106,0 181,75 75,75 75,181 z m 512,109 V 527 q 0,-12 -8,-23 -8,-11 -20,-13 l -185,-28 q -19,-54 -39,-91 35,-50 107,-138 10,-12 10,-25 0,-13 -9,-23 -27,-37 -99,-108 -72,-71 -94,-71 -12,0 -26,9 l -138,108 q -44,-23 -91,-38 -16,-136 -29,-186 -7,-28 -36,-28 H 657 q -14,0 -24.5,8.5 Q 622,-111 621,-98 L 593,86 q -49,16 -90,37 L 362,16 Q 352,7 337,7 323,7 312,18 186,132 147,186 q -7,10 -7,23 0,12 8,23 15,21 51,66.5 36,45.5 54,70.5 -27,50 -41,99 L 29,495 Q 16,497 8,507.5 0,518 0,531 v 222 q 0,12 8,23 8,11 19,13 l 186,28 q 14,46 39,92 -40,57 -107,138 -10,12 -10,24 0,10 9,23 26,36 98.5,107.5 72.5,71.5 94.5,71.5 13,0 26,-10 l 138,-107 q 44,23 91,38 16,136 29,186 7,28 36,28 h 222 q 14,0 24.5,-8.5 Q 914,1391 915,1378 l 28,-184 q 49,-16 90,-37 l 142,107 q 9,9 24,9 13,0 25,-10 129,-119 165,-170 7,-8 7,-22 0,-12 -8,-23 -15,-21 -51,-66.5 -36,-45.5 -54,-70.5 26,-50 41,-98 l 183,-28 q 13,-2 21,-12.5 8,-10.5 8,-23.5 z"
84 id="path3029"
85 inkscape:connector-curvature="0"
86 style="fill:currentColor" />
87 </g>
88 </svg>
89 '''
90
27 def __init__(self, settings):
91 def __init__(self, settings):
28 """
92 """
29 :param settings: dict of settings to be used for the integration
93 :param settings: dict of settings to be used for the integration
30 """
94 """
31 self.settings = settings
95 self.settings = settings
32
96
33
34 def settings_schema(self):
97 def settings_schema(self):
35 """
98 """
36 A colander schema of settings for the integration type
99 A colander schema of settings for the integration type
37
38 Subclasses can return their own schema but should always
39 inherit from IntegrationSettingsSchemaBase
40 """
100 """
41 return IntegrationSettingsSchemaBase()
101 return colander.Schema()
42
@@ -26,11 +26,10 b' import colander'
26 from mako.template import Template
26 from mako.template import Template
27
27
28 from rhodecode import events
28 from rhodecode import events
29 from rhodecode.translation import _, lazy_ugettext
29 from rhodecode.translation import _
30 from rhodecode.lib.celerylib import run_task
30 from rhodecode.lib.celerylib import run_task
31 from rhodecode.lib.celerylib import tasks
31 from rhodecode.lib.celerylib import tasks
32 from rhodecode.integrations.types.base import IntegrationTypeBase
32 from rhodecode.integrations.types.base import IntegrationTypeBase
33 from rhodecode.integrations.schema import IntegrationSettingsSchemaBase
34
33
35
34
36 log = logging.getLogger(__name__)
35 log = logging.getLogger(__name__)
@@ -147,18 +146,79 b" repo_push_template_html = Template('''"
147 </html>
146 </html>
148 ''')
147 ''')
149
148
149 email_icon = '''
150 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
151 <svg
152 xmlns:dc="http://purl.org/dc/elements/1.1/"
153 xmlns:cc="http://creativecommons.org/ns#"
154 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
155 xmlns:svg="http://www.w3.org/2000/svg"
156 xmlns="http://www.w3.org/2000/svg"
157 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
158 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
159 viewBox="0 -256 1850 1850"
160 id="svg2989"
161 version="1.1"
162 inkscape:version="0.48.3.1 r9886"
163 width="100%"
164 height="100%"
165 sodipodi:docname="envelope_font_awesome.svg">
166 <metadata
167 id="metadata2999">
168 <rdf:RDF>
169 <cc:Work
170 rdf:about="">
171 <dc:format>image/svg+xml</dc:format>
172 <dc:type
173 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
174 </cc:Work>
175 </rdf:RDF>
176 </metadata>
177 <defs
178 id="defs2997" />
179 <sodipodi:namedview
180 pagecolor="#ffffff"
181 bordercolor="#666666"
182 borderopacity="1"
183 objecttolerance="10"
184 gridtolerance="10"
185 guidetolerance="10"
186 inkscape:pageopacity="0"
187 inkscape:pageshadow="2"
188 inkscape:window-width="640"
189 inkscape:window-height="480"
190 id="namedview2995"
191 showgrid="false"
192 inkscape:zoom="0.13169643"
193 inkscape:cx="896"
194 inkscape:cy="896"
195 inkscape:window-x="0"
196 inkscape:window-y="25"
197 inkscape:window-maximized="0"
198 inkscape:current-layer="svg2989" />
199 <g
200 transform="matrix(1,0,0,-1,37.966102,1282.678)"
201 id="g2991">
202 <path
203 d="m 1664,32 v 768 q -32,-36 -69,-66 -268,-206 -426,-338 -51,-43 -83,-67 -32,-24 -86.5,-48.5 Q 945,256 897,256 h -1 -1 Q 847,256 792.5,280.5 738,305 706,329 674,353 623,396 465,528 197,734 160,764 128,800 V 32 Q 128,19 137.5,9.5 147,0 160,0 h 1472 q 13,0 22.5,9.5 9.5,9.5 9.5,22.5 z m 0,1051 v 11 13.5 q 0,0 -0.5,13 -0.5,13 -3,12.5 -2.5,-0.5 -5.5,9 -3,9.5 -9,7.5 -6,-2 -14,2.5 H 160 q -13,0 -22.5,-9.5 Q 128,1133 128,1120 128,952 275,836 468,684 676,519 682,514 711,489.5 740,465 757,452 774,439 801.5,420.5 829,402 852,393 q 23,-9 43,-9 h 1 1 q 20,0 43,9 23,9 50.5,27.5 27.5,18.5 44.5,31.5 17,13 46,37.5 29,24.5 35,29.5 208,165 401,317 54,43 100.5,115.5 46.5,72.5 46.5,131.5 z m 128,37 V 32 q 0,-66 -47,-113 -47,-47 -113,-47 H 160 Q 94,-128 47,-81 0,-34 0,32 v 1088 q 0,66 47,113 47,47 113,47 h 1472 q 66,0 113,-47 47,-47 47,-113 z"
204 id="path2993"
205 inkscape:connector-curvature="0"
206 style="fill:currentColor" />
207 </g>
208 </svg>
209 '''
150
210
151 class EmailSettingsSchema(IntegrationSettingsSchemaBase):
211 class EmailSettingsSchema(colander.Schema):
152 @colander.instantiate(validator=colander.Length(min=1))
212 @colander.instantiate(validator=colander.Length(min=1))
153 class recipients(colander.SequenceSchema):
213 class recipients(colander.SequenceSchema):
154 title = lazy_ugettext('Recipients')
214 title = _('Recipients')
155 description = lazy_ugettext('Email addresses to send push events to')
215 description = _('Email addresses to send push events to')
156 widget = deform.widget.SequenceWidget(min_len=1)
216 widget = deform.widget.SequenceWidget(min_len=1)
157
217
158 recipient = colander.SchemaNode(
218 recipient = colander.SchemaNode(
159 colander.String(),
219 colander.String(),
160 title=lazy_ugettext('Email address'),
220 title=_('Email address'),
161 description=lazy_ugettext('Email address'),
221 description=_('Email address'),
162 default='',
222 default='',
163 validator=colander.Email(),
223 validator=colander.Email(),
164 widget=deform.widget.TextInputWidget(
224 widget=deform.widget.TextInputWidget(
@@ -169,8 +229,9 b' class EmailSettingsSchema(IntegrationSet'
169
229
170 class EmailIntegrationType(IntegrationTypeBase):
230 class EmailIntegrationType(IntegrationTypeBase):
171 key = 'email'
231 key = 'email'
172 display_name = lazy_ugettext('Email')
232 display_name = _('Email')
173 SettingsSchema = EmailSettingsSchema
233 description = _('Send repo push summaries to a list of recipients via email')
234 icon = email_icon
174
235
175 def settings_schema(self):
236 def settings_schema(self):
176 schema = EmailSettingsSchema()
237 schema = EmailSettingsSchema()
@@ -29,29 +29,28 b' from celery.task import task'
29 from mako.template import Template
29 from mako.template import Template
30
30
31 from rhodecode import events
31 from rhodecode import events
32 from rhodecode.translation import lazy_ugettext
32 from rhodecode.translation import _
33 from rhodecode.lib import helpers as h
33 from rhodecode.lib import helpers as h
34 from rhodecode.lib.celerylib import run_task
34 from rhodecode.lib.celerylib import run_task
35 from rhodecode.lib.colander_utils import strip_whitespace
35 from rhodecode.lib.colander_utils import strip_whitespace
36 from rhodecode.integrations.types.base import IntegrationTypeBase
36 from rhodecode.integrations.types.base import IntegrationTypeBase
37 from rhodecode.integrations.schema import IntegrationSettingsSchemaBase
38
37
39 log = logging.getLogger(__name__)
38 log = logging.getLogger(__name__)
40
39
41
40
42 class HipchatSettingsSchema(IntegrationSettingsSchemaBase):
41 class HipchatSettingsSchema(colander.Schema):
43 color_choices = [
42 color_choices = [
44 ('yellow', lazy_ugettext('Yellow')),
43 ('yellow', _('Yellow')),
45 ('red', lazy_ugettext('Red')),
44 ('red', _('Red')),
46 ('green', lazy_ugettext('Green')),
45 ('green', _('Green')),
47 ('purple', lazy_ugettext('Purple')),
46 ('purple', _('Purple')),
48 ('gray', lazy_ugettext('Gray')),
47 ('gray', _('Gray')),
49 ]
48 ]
50
49
51 server_url = colander.SchemaNode(
50 server_url = colander.SchemaNode(
52 colander.String(),
51 colander.String(),
53 title=lazy_ugettext('Hipchat server URL'),
52 title=_('Hipchat server URL'),
54 description=lazy_ugettext('Hipchat integration url.'),
53 description=_('Hipchat integration url.'),
55 default='',
54 default='',
56 preparer=strip_whitespace,
55 preparer=strip_whitespace,
57 validator=colander.url,
56 validator=colander.url,
@@ -61,15 +60,15 b' class HipchatSettingsSchema(IntegrationS'
61 )
60 )
62 notify = colander.SchemaNode(
61 notify = colander.SchemaNode(
63 colander.Bool(),
62 colander.Bool(),
64 title=lazy_ugettext('Notify'),
63 title=_('Notify'),
65 description=lazy_ugettext('Make a notification to the users in room.'),
64 description=_('Make a notification to the users in room.'),
66 missing=False,
65 missing=False,
67 default=False,
66 default=False,
68 )
67 )
69 color = colander.SchemaNode(
68 color = colander.SchemaNode(
70 colander.String(),
69 colander.String(),
71 title=lazy_ugettext('Color'),
70 title=_('Color'),
72 description=lazy_ugettext('Background color of message.'),
71 description=_('Background color of message.'),
73 missing='',
72 missing='',
74 validator=colander.OneOf([x[0] for x in color_choices]),
73 validator=colander.OneOf([x[0] for x in color_choices]),
75 widget=deform.widget.Select2Widget(
74 widget=deform.widget.Select2Widget(
@@ -79,29 +78,28 b' class HipchatSettingsSchema(IntegrationS'
79
78
80
79
81 repo_push_template = Template('''
80 repo_push_template = Template('''
82 <b>${data['actor']['username']}</b> pushed to
81 <b>${data['actor']['username']}</b> pushed to repo <a href="${data['repo']['url']}">${data['repo']['repo_name']}</a>:
83 %if data['push']['branches']:
84 ${len(data['push']['branches']) > 1 and 'branches' or 'branch'}
85 ${', '.join('<a href="%s">%s</a>' % (branch['url'], branch['name']) for branch in data['push']['branches'])}
86 %else:
87 unknown branch
88 %endif
89 in <a href="${data['repo']['url']}">${data['repo']['repo_name']}</a>
90 <br>
82 <br>
91 <ul>
83 <ul>
92 %for commit in data['push']['commits']:
84 %for branch, branch_commits in branches_commits.items():
93 <li>
85 <li>
94 <a href="${commit['url']}">${commit['short_id']}</a> - ${commit['message_html']}
86 <a href="${branch_commits['branch']['url']}">branch: ${branch_commits['branch']['name']}</a>
87 <ul>
88 %for commit in branch_commits['commits']:
89 <li><a href="${commit['url']}">${commit['short_id']}</a> - ${commit['message_html']}</li>
90 %endfor
91 </ul>
95 </li>
92 </li>
96 %endfor
93 %endfor
97 </ul>
98 ''')
94 ''')
99
95
100
96
101
102 class HipchatIntegrationType(IntegrationTypeBase):
97 class HipchatIntegrationType(IntegrationTypeBase):
103 key = 'hipchat'
98 key = 'hipchat'
104 display_name = lazy_ugettext('Hipchat')
99 display_name = _('Hipchat')
100 description = _('Send events such as repo pushes and pull requests to '
101 'your hipchat channel.')
102 icon = '''<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve"><g><g transform="translate(0.000000,511.000000) scale(0.100000,-0.100000)"><path fill="#205281" d="M4197.1,4662.4c-1661.5-260.4-3018-1171.6-3682.6-2473.3C219.9,1613.6,100,1120.3,100,462.6c0-1014,376.8-1918.4,1127-2699.4C2326.7-3377.6,3878.5-3898.3,5701-3730.5l486.5,44.5l208.9-123.3c637.2-373.4,1551.8-640.6,2240.4-650.9c304.9-6.9,335.7,0,417.9,75.4c185,174.7,147.3,411.1-89.1,548.1c-315.2,181.6-620,544.7-733.1,870.1l-51.4,157.6l472.7,472.7c349.4,349.4,520.7,551.5,657.7,774.2c784.5,1281.2,784.5,2788.5,0,4052.6c-236.4,376.8-794.8,966-1178.4,1236.7c-572.1,407.7-1264.1,709.1-1993.7,870.1c-267.2,58.2-479.6,75.4-1038,82.2C4714.4,4686.4,4310.2,4679.6,4197.1,4662.4z M5947.6,3740.9c1856.7-380.3,3127.6-1709.4,3127.6-3275c0-1000.3-534.4-1949.2-1466.2-2600.1c-188.4-133.6-287.8-226.1-301.5-284.4c-41.1-157.6,263.8-938.6,397.4-1020.8c20.5-10.3,34.3-44.5,34.3-75.4c0-167.8-811.9,195.3-1363.4,609.8l-181.6,137l-332.3-58.2c-445.3-78.8-1281.2-78.8-1702.6,0C2796-2569.2,1734.1-1832.6,1220.2-801.5C983.8-318.5,905,51.5,929,613.3c27.4,640.6,243.2,1192.1,685.1,1740.3c620,770.8,1661.5,1305.2,2822.8,1452.5C4806.9,3854,5553.7,3819.7,5947.6,3740.9z"/><path fill="#205281" d="M2381.5-345.9c-75.4-106.2-68.5-167.8,34.3-322c332.3-500.2,1010.6-928.4,1760.8-1120.2c417.9-106.2,1226.4-106.2,1644.3,0c712.5,181.6,1270.9,517.3,1685.4,1014C7681-561.7,7715.3-424.7,7616-325.4c-89.1,89.1-167.9,65.1-431.7-133.6c-835.8-630.3-2028-856.4-3086.5-585.8C3683.3-938.6,3142-685,2830.3-448.7C2576.8-253.4,2463.7-229.4,2381.5-345.9z"/></g></g><!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon --></svg>'''
105 valid_events = [
103 valid_events = [
106 events.PullRequestCloseEvent,
104 events.PullRequestCloseEvent,
107 events.PullRequestMergeEvent,
105 events.PullRequestMergeEvent,
@@ -217,8 +215,23 b' class HipchatIntegrationType(Integration'
217 )
215 )
218
216
219 def format_repo_push_event(self, data):
217 def format_repo_push_event(self, data):
218 branch_data = {branch['name']: branch
219 for branch in data['push']['branches']}
220
221 branches_commits = {}
222 for commit in data['push']['commits']:
223 log.critical(commit)
224 if commit['branch'] not in branches_commits:
225 branch_commits = {'branch': branch_data[commit['branch']],
226 'commits': []}
227 branches_commits[commit['branch']] = branch_commits
228
229 branch_commits = branches_commits[commit['branch']]
230 branch_commits['commits'].append(commit)
231
220 result = repo_push_template.render(
232 result = repo_push_template.render(
221 data=data,
233 data=data,
234 branches_commits=branches_commits,
222 )
235 )
223 return result
236 return result
224
237
@@ -29,21 +29,20 b' from celery.task import task'
29 from mako.template import Template
29 from mako.template import Template
30
30
31 from rhodecode import events
31 from rhodecode import events
32 from rhodecode.translation import lazy_ugettext
32 from rhodecode.translation import _
33 from rhodecode.lib import helpers as h
33 from rhodecode.lib import helpers as h
34 from rhodecode.lib.celerylib import run_task
34 from rhodecode.lib.celerylib import run_task
35 from rhodecode.lib.colander_utils import strip_whitespace
35 from rhodecode.lib.colander_utils import strip_whitespace
36 from rhodecode.integrations.types.base import IntegrationTypeBase
36 from rhodecode.integrations.types.base import IntegrationTypeBase
37 from rhodecode.integrations.schema import IntegrationSettingsSchemaBase
38
37
39 log = logging.getLogger(__name__)
38 log = logging.getLogger(__name__)
40
39
41
40
42 class SlackSettingsSchema(IntegrationSettingsSchemaBase):
41 class SlackSettingsSchema(colander.Schema):
43 service = colander.SchemaNode(
42 service = colander.SchemaNode(
44 colander.String(),
43 colander.String(),
45 title=lazy_ugettext('Slack service URL'),
44 title=_('Slack service URL'),
46 description=h.literal(lazy_ugettext(
45 description=h.literal(_(
47 'This can be setup at the '
46 'This can be setup at the '
48 '<a href="https://my.slack.com/services/new/incoming-webhook/">'
47 '<a href="https://my.slack.com/services/new/incoming-webhook/">'
49 'slack app manager</a>')),
48 'slack app manager</a>')),
@@ -56,8 +55,8 b' class SlackSettingsSchema(IntegrationSet'
56 )
55 )
57 username = colander.SchemaNode(
56 username = colander.SchemaNode(
58 colander.String(),
57 colander.String(),
59 title=lazy_ugettext('Username'),
58 title=_('Username'),
60 description=lazy_ugettext('Username to show notifications coming from.'),
59 description=_('Username to show notifications coming from.'),
61 missing='Rhodecode',
60 missing='Rhodecode',
62 preparer=strip_whitespace,
61 preparer=strip_whitespace,
63 widget=deform.widget.TextInputWidget(
62 widget=deform.widget.TextInputWidget(
@@ -66,8 +65,8 b' class SlackSettingsSchema(IntegrationSet'
66 )
65 )
67 channel = colander.SchemaNode(
66 channel = colander.SchemaNode(
68 colander.String(),
67 colander.String(),
69 title=lazy_ugettext('Channel'),
68 title=_('Channel'),
70 description=lazy_ugettext('Channel to send notifications to.'),
69 description=_('Channel to send notifications to.'),
71 missing='',
70 missing='',
72 preparer=strip_whitespace,
71 preparer=strip_whitespace,
73 widget=deform.widget.TextInputWidget(
72 widget=deform.widget.TextInputWidget(
@@ -76,8 +75,8 b' class SlackSettingsSchema(IntegrationSet'
76 )
75 )
77 icon_emoji = colander.SchemaNode(
76 icon_emoji = colander.SchemaNode(
78 colander.String(),
77 colander.String(),
79 title=lazy_ugettext('Emoji'),
78 title=_('Emoji'),
80 description=lazy_ugettext('Emoji to use eg. :studio_microphone:'),
79 description=_('Emoji to use eg. :studio_microphone:'),
81 missing='',
80 missing='',
82 preparer=strip_whitespace,
81 preparer=strip_whitespace,
83 widget=deform.widget.TextInputWidget(
82 widget=deform.widget.TextInputWidget(
@@ -87,25 +86,22 b' class SlackSettingsSchema(IntegrationSet'
87
86
88
87
89 repo_push_template = Template(r'''
88 repo_push_template = Template(r'''
90 *${data['actor']['username']}* pushed to \
89 *${data['actor']['username']}* pushed to repo <${data['repo']['url']}|${data['repo']['repo_name']}>:
91 %if data['push']['branches']:
90 %for branch, branch_commits in branches_commits.items():
92 ${len(data['push']['branches']) > 1 and 'branches' or 'branch'} \
91 branch: <${branch_commits['branch']['url']}|${branch_commits['branch']['name']}>
93 ${', '.join('<%s|%s>' % (branch['url'], branch['name']) for branch in data['push']['branches'])} \
92 %for commit in branch_commits['commits']:
94 %else:
93 > <${commit['url']}|${commit['short_id']}> - ${commit['message_html']|html_to_slack_links}
95 unknown branch \
94 %endfor
96 %endif
97 in <${data['repo']['url']}|${data['repo']['repo_name']}>
98 >>>
99 %for commit in data['push']['commits']:
100 <${commit['url']}|${commit['short_id']}> - ${commit['message_html']|html_to_slack_links}
101 %endfor
95 %endfor
102 ''')
96 ''')
103
97
104
98
105 class SlackIntegrationType(IntegrationTypeBase):
99 class SlackIntegrationType(IntegrationTypeBase):
106 key = 'slack'
100 key = 'slack'
107 display_name = lazy_ugettext('Slack')
101 display_name = _('Slack')
108 SettingsSchema = SlackSettingsSchema
102 description = _('Send events such as repo pushes and pull requests to '
103 'your slack channel.')
104 icon = '''<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"><g><path d="M165.963541,15.8384262 C162.07318,3.86308197 149.212328,-2.69009836 137.239082,1.20236066 C125.263738,5.09272131 118.710557,17.9535738 122.603016,29.9268197 L181.550164,211.292328 C185.597902,222.478689 197.682361,228.765377 209.282098,225.426885 C221.381246,221.943607 228.756984,209.093246 224.896,197.21023 C224.749115,196.756984 165.963541,15.8384262 165.963541,15.8384262" fill="#DFA22F"></path><path d="M74.6260984,45.515541 C70.7336393,33.5422951 57.8727869,26.9891148 45.899541,30.8794754 C33.9241967,34.7698361 27.3710164,47.6306885 31.2634754,59.6060328 L90.210623,240.971541 C94.2583607,252.157902 106.34282,258.44459 117.942557,255.104 C130.041705,251.62282 137.417443,238.772459 133.556459,226.887344 C133.409574,226.436197 74.6260984,45.515541 74.6260984,45.515541" fill="#3CB187"></path><path d="M240.161574,166.045377 C252.136918,162.155016 258.688,149.294164 254.797639,137.31882 C250.907279,125.345574 238.046426,118.792393 226.07318,122.682754 L44.7076721,181.632 C33.5213115,185.677639 27.234623,197.762098 30.5731148,209.361836 C34.0563934,221.460984 46.9067541,228.836721 58.7897705,224.975738 C59.2430164,224.828852 240.161574,166.045377 240.161574,166.045377" fill="#CE1E5B"></path><path d="M82.507541,217.270557 C94.312918,213.434754 109.528131,208.491016 125.855475,203.186361 C122.019672,191.380984 117.075934,176.163672 111.76918,159.83423 L68.4191475,173.924721 L82.507541,217.270557" fill="#392538"></path><path d="M173.847082,187.591344 C190.235279,182.267803 205.467279,177.31777 217.195016,173.507148 C213.359213,161.70177 208.413377,146.480262 203.106623,130.146623 L159.75659,144.237115 L173.847082,187.591344" fill="#BB242A"></path><path d="M210.484459,74.7058361 C222.457705,70.8154754 229.010885,57.954623 225.120525,45.9792787 C221.230164,34.0060328 208.369311,27.4528525 196.393967,31.3432131 L15.028459,90.292459 C3.84209836,94.3380984 -2.44459016,106.422557 0.896,118.022295 C4.37718033,130.121443 17.227541,137.49718 29.1126557,133.636197 C29.5638033,133.489311 210.484459,74.7058361 210.484459,74.7058361" fill="#72C5CD"></path><path d="M52.8220328,125.933115 C64.6274098,122.097311 79.8468197,117.151475 96.1762623,111.84682 C90.8527213,95.4565246 85.9026885,80.2245246 82.0920656,68.4946885 L38.731541,82.5872787 L52.8220328,125.933115" fill="#248C73"></path><path d="M144.159475,96.256 C160.551869,90.9303607 175.785967,85.9803279 187.515803,82.1676066 C182.190164,65.7752131 177.240131,50.5390164 173.42741,38.807082 L130.068984,52.8996721 L144.159475,96.256" fill="#62803A"></path></g></svg>'''
109 valid_events = [
105 valid_events = [
110 events.PullRequestCloseEvent,
106 events.PullRequestCloseEvent,
111 events.PullRequestMergeEvent,
107 events.PullRequestMergeEvent,
@@ -221,8 +217,23 b' class SlackIntegrationType(IntegrationTy'
221 )
217 )
222
218
223 def format_repo_push_event(self, data):
219 def format_repo_push_event(self, data):
220 branch_data = {branch['name']: branch
221 for branch in data['push']['branches']}
222
223 branches_commits = {}
224 for commit in data['push']['commits']:
225 log.critical(commit)
226 if commit['branch'] not in branches_commits:
227 branch_commits = {'branch': branch_data[commit['branch']],
228 'commits': []}
229 branches_commits[commit['branch']] = branch_commits
230
231 branch_commits = branches_commits[commit['branch']]
232 branch_commits['commits'].append(commit)
233
224 result = repo_push_template.render(
234 result = repo_push_template.render(
225 data=data,
235 data=data,
236 branches_commits=branches_commits,
226 html_to_slack_links=html_to_slack_links,
237 html_to_slack_links=html_to_slack_links,
227 )
238 )
228 return result
239 return result
@@ -28,19 +28,19 b' from celery.task import task'
28 from mako.template import Template
28 from mako.template import Template
29
29
30 from rhodecode import events
30 from rhodecode import events
31 from rhodecode.translation import lazy_ugettext
31 from rhodecode.translation import _
32 from rhodecode.integrations.types.base import IntegrationTypeBase
32 from rhodecode.integrations.types.base import IntegrationTypeBase
33 from rhodecode.integrations.schema import IntegrationSettingsSchemaBase
34
33
35 log = logging.getLogger(__name__)
34 log = logging.getLogger(__name__)
36
35
37
36
38 class WebhookSettingsSchema(IntegrationSettingsSchemaBase):
37 class WebhookSettingsSchema(colander.Schema):
39 url = colander.SchemaNode(
38 url = colander.SchemaNode(
40 colander.String(),
39 colander.String(),
41 title=lazy_ugettext('Webhook URL'),
40 title=_('Webhook URL'),
42 description=lazy_ugettext('URL of the webhook to receive POST event.'),
41 description=_('URL of the webhook to receive POST event.'),
43 default='',
42 missing=colander.required,
43 required=True,
44 validator=colander.url,
44 validator=colander.url,
45 widget=deform.widget.TextInputWidget(
45 widget=deform.widget.TextInputWidget(
46 placeholder='https://www.example.com/webhook'
46 placeholder='https://www.example.com/webhook'
@@ -48,18 +48,24 b' class WebhookSettingsSchema(IntegrationS'
48 )
48 )
49 secret_token = colander.SchemaNode(
49 secret_token = colander.SchemaNode(
50 colander.String(),
50 colander.String(),
51 title=lazy_ugettext('Secret Token'),
51 title=_('Secret Token'),
52 description=lazy_ugettext('String used to validate received payloads.'),
52 description=_('String used to validate received payloads.'),
53 default='',
53 default='',
54 missing='',
54 widget=deform.widget.TextInputWidget(
55 widget=deform.widget.TextInputWidget(
55 placeholder='secret_token'
56 placeholder='secret_token'
56 ),
57 ),
57 )
58 )
58
59
59
60
61
62
60 class WebhookIntegrationType(IntegrationTypeBase):
63 class WebhookIntegrationType(IntegrationTypeBase):
61 key = 'webhook'
64 key = 'webhook'
62 display_name = lazy_ugettext('Webhook')
65 display_name = _('Webhook')
66 description = _('Post json events to a webhook endpoint')
67 icon = '''<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg viewBox="0 0 256 239" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid"><g><path d="M119.540432,100.502743 C108.930124,118.338815 98.7646301,135.611455 88.3876025,152.753617 C85.7226696,157.154315 84.4040417,160.738531 86.5332204,166.333309 C92.4107024,181.787152 84.1193605,196.825836 68.5350381,200.908244 C53.8383677,204.759349 39.5192953,195.099955 36.6032893,179.365384 C34.0194114,165.437749 44.8274148,151.78491 60.1824106,149.608284 C61.4694072,149.424428 62.7821041,149.402681 64.944891,149.240571 C72.469175,136.623655 80.1773157,123.700312 88.3025935,110.073173 C73.611854,95.4654658 64.8677898,78.3885437 66.803227,57.2292132 C68.1712787,42.2715849 74.0527146,29.3462646 84.8033863,18.7517722 C105.393354,-1.53572199 136.805164,-4.82141828 161.048542,10.7510424 C184.333097,25.7086706 194.996783,54.8450075 185.906752,79.7822957 C179.052655,77.9239597 172.151111,76.049808 164.563565,73.9917997 C167.418285,60.1274266 165.306899,47.6765751 155.95591,37.0109123 C149.777932,29.9690049 141.850349,26.2780332 132.835442,24.9178894 C114.764113,22.1877169 97.0209573,33.7983633 91.7563309,51.5355878 C85.7800012,71.6669027 94.8245623,88.1111998 119.540432,100.502743 L119.540432,100.502743 Z" fill="#C73A63"></path><path d="M149.841194,79.4106285 C157.316054,92.5969067 164.905578,105.982857 172.427885,119.246236 C210.44865,107.483365 239.114472,128.530009 249.398582,151.063322 C261.81978,178.282014 253.328765,210.520191 228.933162,227.312431 C203.893073,244.551464 172.226236,241.605803 150.040866,219.46195 C155.694953,214.729124 161.376716,209.974552 167.44794,204.895759 C189.360489,219.088306 208.525074,218.420096 222.753207,201.614016 C234.885769,187.277151 234.622834,165.900356 222.138374,151.863988 C207.730339,135.66681 188.431321,135.172572 165.103273,150.721309 C155.426087,133.553447 145.58086,116.521995 136.210101,99.2295848 C133.05093,93.4015266 129.561608,90.0209366 122.440622,88.7873178 C110.547271,86.7253555 102.868785,76.5124151 102.408155,65.0698097 C101.955433,53.7537294 108.621719,43.5249733 119.04224,39.5394355 C129.363912,35.5914599 141.476705,38.7783085 148.419765,47.554004 C154.093621,54.7244134 155.896602,62.7943365 152.911402,71.6372484 C152.081082,74.1025091 151.00562,76.4886916 149.841194,79.4106285 L149.841194,79.4106285 Z" fill="#4B4B4B"></path><path d="M167.706921,187.209935 L121.936499,187.209935 C117.54964,205.253587 108.074103,219.821756 91.7464461,229.085759 C79.0544063,236.285822 65.3738898,238.72736 50.8136292,236.376762 C24.0061432,232.053165 2.08568567,207.920497 0.156179306,180.745298 C-2.02835403,149.962159 19.1309765,122.599149 47.3341915,116.452801 C49.2814904,123.524363 51.2485589,130.663141 53.1958579,137.716911 C27.3195169,150.919004 18.3639187,167.553089 25.6054984,188.352614 C31.9811726,206.657224 50.0900643,216.690262 69.7528413,212.809503 C89.8327554,208.847688 99.9567329,192.160226 98.7211371,165.37844 C117.75722,165.37844 136.809118,165.180745 155.847178,165.475311 C163.280522,165.591951 169.019617,164.820939 174.620326,158.267339 C183.840836,147.48306 200.811003,148.455721 210.741239,158.640984 C220.88894,169.049642 220.402609,185.79839 209.663799,195.768166 C199.302587,205.38802 182.933414,204.874012 173.240413,194.508846 C171.247644,192.37176 169.677943,189.835329 167.706921,187.209935 L167.706921,187.209935 Z" fill="#4A4A4A"></path></g></svg>'''
68
63 valid_events = [
69 valid_events = [
64 events.PullRequestCloseEvent,
70 events.PullRequestCloseEvent,
65 events.PullRequestMergeEvent,
71 events.PullRequestMergeEvent,
@@ -18,23 +18,29 b''
18 # RhodeCode Enterprise Edition, including its added features, Support services,
18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20
20
21 import colander
22 import logging
23 import pylons
21 import pylons
24 import deform
22 import deform
23 import logging
24 import colander
25 import peppercorn
26 import webhelpers.paginate
25
27
26 from pyramid.httpexceptions import HTTPFound, HTTPForbidden
28 from pyramid.httpexceptions import HTTPFound, HTTPForbidden, HTTPBadRequest
27 from pyramid.renderers import render
29 from pyramid.renderers import render
28 from pyramid.response import Response
30 from pyramid.response import Response
29
31
30 from rhodecode.lib import auth
32 from rhodecode.lib import auth
31 from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator
33 from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator
32 from rhodecode.model.db import Repository, Session, Integration
34 from rhodecode.lib.utils2 import safe_int
35 from rhodecode.lib.helpers import Page
36 from rhodecode.model.db import Repository, RepoGroup, Session, Integration
33 from rhodecode.model.scm import ScmModel
37 from rhodecode.model.scm import ScmModel
34 from rhodecode.model.integration import IntegrationModel
38 from rhodecode.model.integration import IntegrationModel
35 from rhodecode.admin.navigation import navigation_list
39 from rhodecode.admin.navigation import navigation_list
36 from rhodecode.translation import _
40 from rhodecode.translation import _
37 from rhodecode.integrations import integration_type_registry
41 from rhodecode.integrations import integration_type_registry
42 from rhodecode.model.validation_schema.schemas.integration_schema import (
43 make_integration_schema, IntegrationScopeType)
38
44
39 log = logging.getLogger(__name__)
45 log = logging.getLogger(__name__)
40
46
@@ -59,28 +65,51 b' class IntegrationSettingsViewBase(object'
59
65
60 self.IntegrationType = None
66 self.IntegrationType = None
61 self.repo = None
67 self.repo = None
68 self.repo_group = None
62 self.integration = None
69 self.integration = None
63 self.integrations = {}
70 self.integrations = {}
64
71
65 request = self.request
72 request = self.request
66
73
67 if 'repo_name' in request.matchdict: # we're in a repo context
74 if 'repo_name' in request.matchdict: # in repo settings context
68 repo_name = request.matchdict['repo_name']
75 repo_name = request.matchdict['repo_name']
69 self.repo = Repository.get_by_repo_name(repo_name)
76 self.repo = Repository.get_by_repo_name(repo_name)
70
77
71 if 'integration' in request.matchdict: # we're in integration context
78 if 'repo_group_name' in request.matchdict: # in group settings context
79 repo_group_name = request.matchdict['repo_group_name']
80 self.repo_group = RepoGroup.get_by_group_name(repo_group_name)
81
82
83 if 'integration' in request.matchdict: # integration type context
72 integration_type = request.matchdict['integration']
84 integration_type = request.matchdict['integration']
73 self.IntegrationType = integration_type_registry[integration_type]
85 self.IntegrationType = integration_type_registry[integration_type]
74
86
75 if 'integration_id' in request.matchdict: # single integration context
87 if 'integration_id' in request.matchdict: # single integration context
76 integration_id = request.matchdict['integration_id']
88 integration_id = request.matchdict['integration_id']
77 self.integration = Integration.get(integration_id)
89 self.integration = Integration.get(integration_id)
78 else: # list integrations context
90
79 for integration in IntegrationModel().get_integrations(self.repo):
91 # extra perms check just in case
80 self.integrations.setdefault(integration.integration_type, []
92 if not self._has_perms_for_integration(self.integration):
81 ).append(integration)
93 raise HTTPForbidden()
82
94
83 self.settings = self.integration and self.integration.settings or {}
95 self.settings = self.integration and self.integration.settings or {}
96 self.admin_view = not (self.repo or self.repo_group)
97
98 def _has_perms_for_integration(self, integration):
99 perms = self.request.user.permissions
100
101 if 'hg.admin' in perms['global']:
102 return True
103
104 if integration.repo:
105 return perms['repositories'].get(
106 integration.repo.repo_name) == 'repository.admin'
107
108 if integration.repo_group:
109 return perms['repositories_groups'].get(
110 integration.repo_group.group_name) == 'group.admin'
111
112 return False
84
113
85 def _template_c_context(self):
114 def _template_c_context(self):
86 # TODO: dan: this is a stopgap in order to inherit from current pylons
115 # TODO: dan: this is a stopgap in order to inherit from current pylons
@@ -91,7 +120,10 b' class IntegrationSettingsViewBase(object'
91 c.active = 'integrations'
120 c.active = 'integrations'
92 c.rhodecode_user = self.request.user
121 c.rhodecode_user = self.request.user
93 c.repo = self.repo
122 c.repo = self.repo
123 c.repo_group = self.repo_group
94 c.repo_name = self.repo and self.repo.repo_name or None
124 c.repo_name = self.repo and self.repo.repo_name or None
125 c.repo_group_name = self.repo_group and self.repo_group.group_name or None
126
95 if self.repo:
127 if self.repo:
96 c.repo_info = self.repo
128 c.repo_info = self.repo
97 c.rhodecode_db_repo = self.repo
129 c.rhodecode_db_repo = self.repo
@@ -102,34 +134,77 b' class IntegrationSettingsViewBase(object'
102 return c
134 return c
103
135
104 def _form_schema(self):
136 def _form_schema(self):
105 if self.integration:
137 schema = make_integration_schema(IntegrationType=self.IntegrationType,
106 settings = self.integration.settings
138 settings=self.settings)
107 else:
108 settings = {}
109 return self.IntegrationType(settings=settings).settings_schema()
110
139
111 def settings_get(self, defaults=None, errors=None, form=None):
140 # returns a clone, important if mutating the schema later
112 """
141 return schema.bind(
113 View that displays the plugin settings as a form.
142 permissions=self.request.user.permissions,
114 """
143 no_scope=not self.admin_view)
115 defaults = defaults or {}
144
116 errors = errors or {}
145
146 def _form_defaults(self):
147 defaults = {}
117
148
118 if self.integration:
149 if self.integration:
119 defaults = self.integration.settings or {}
150 defaults['settings'] = self.integration.settings or {}
120 defaults['name'] = self.integration.name
151 defaults['options'] = {
121 defaults['enabled'] = self.integration.enabled
152 'name': self.integration.name,
153 'enabled': self.integration.enabled,
154 'scope': {
155 'repo': self.integration.repo,
156 'repo_group': self.integration.repo_group,
157 'child_repos_only': self.integration.child_repos_only,
158 },
159 }
122 else:
160 else:
123 if self.repo:
161 if self.repo:
124 scope = self.repo.repo_name
162 scope = _('{repo_name} repository').format(
163 repo_name=self.repo.repo_name)
164 elif self.repo_group:
165 scope = _('{repo_group_name} repo group').format(
166 repo_group_name=self.repo_group.group_name)
125 else:
167 else:
126 scope = _('Global')
168 scope = _('Global')
127
169
128 defaults['name'] = '{} {} integration'.format(scope,
170 defaults['options'] = {
129 self.IntegrationType.display_name)
171 'enabled': True,
130 defaults['enabled'] = True
172 'name': _('{name} integration').format(
173 name=self.IntegrationType.display_name),
174 }
175 defaults['options']['scope'] = {
176 'repo': self.repo,
177 'repo_group': self.repo_group,
178 }
179
180 return defaults
131
181
132 schema = self._form_schema().bind(request=self.request)
182 def _delete_integration(self, integration):
183 Session().delete(self.integration)
184 Session().commit()
185 self.request.session.flash(
186 _('Integration {integration_name} deleted successfully.').format(
187 integration_name=self.integration.name),
188 queue='success')
189
190 if self.repo:
191 redirect_to = self.request.route_url(
192 'repo_integrations_home', repo_name=self.repo.repo_name)
193 elif self.repo_group:
194 redirect_to = self.request.route_url(
195 'repo_group_integrations_home',
196 repo_group_name=self.repo_group.group_name)
197 else:
198 redirect_to = self.request.route_url('global_integrations_home')
199 raise HTTPFound(redirect_to)
200
201 def settings_get(self, defaults=None, form=None):
202 """
203 View that displays the integration settings as a form.
204 """
205
206 defaults = defaults or self._form_defaults()
207 schema = self._form_schema()
133
208
134 if self.integration:
209 if self.integration:
135 buttons = ('submit', 'delete')
210 buttons = ('submit', 'delete')
@@ -138,23 +213,10 b' class IntegrationSettingsViewBase(object'
138
213
139 form = form or deform.Form(schema, appstruct=defaults, buttons=buttons)
214 form = form or deform.Form(schema, appstruct=defaults, buttons=buttons)
140
215
141 for node in schema:
142 setting = self.settings.get(node.name)
143 if setting is not None:
144 defaults.setdefault(node.name, setting)
145 else:
146 if node.default:
147 defaults.setdefault(node.name, node.default)
148
149 template_context = {
216 template_context = {
150 'form': form,
217 'form': form,
151 'defaults': defaults,
152 'errors': errors,
153 'schema': schema,
154 'current_IntegrationType': self.IntegrationType,
218 'current_IntegrationType': self.IntegrationType,
155 'integration': self.integration,
219 'integration': self.integration,
156 'settings': self.settings,
157 'resource': self.context,
158 'c': self._template_c_context(),
220 'c': self._template_c_context(),
159 }
221 }
160
222
@@ -163,71 +225,93 b' class IntegrationSettingsViewBase(object'
163 @auth.CSRFRequired()
225 @auth.CSRFRequired()
164 def settings_post(self):
226 def settings_post(self):
165 """
227 """
166 View that validates and stores the plugin settings.
228 View that validates and stores the integration settings.
167 """
229 """
168 if self.request.params.get('delete'):
230 controls = self.request.POST.items()
169 Session().delete(self.integration)
231 pstruct = peppercorn.parse(controls)
170 Session().commit()
232
171 self.request.session.flash(
233 if self.integration and pstruct.get('delete'):
172 _('Integration {integration_name} deleted successfully.').format(
234 return self._delete_integration(self.integration)
173 integration_name=self.integration.name),
235
174 queue='success')
236 schema = self._form_schema()
175 if self.repo:
237
176 redirect_to = self.request.route_url(
238 skip_settings_validation = False
177 'repo_integrations_home', repo_name=self.repo.repo_name)
239 if self.integration and 'enabled' not in pstruct.get('options', {}):
178 else:
240 skip_settings_validation = True
179 redirect_to = self.request.route_url('global_integrations_home')
241 schema['settings'].validator = None
180 raise HTTPFound(redirect_to)
242 for field in schema['settings'].children:
243 field.validator = None
244 field.missing = ''
181
245
182 schema = self._form_schema().bind(request=self.request)
246 if self.integration:
247 buttons = ('submit', 'delete')
248 else:
249 buttons = ('submit',)
183
250
184 form = deform.Form(schema, buttons=('submit', 'delete'))
251 form = deform.Form(schema, buttons=buttons)
185
252
186 params = {}
253 if not self.admin_view:
187 for node in schema.children:
254 # scope is read only field in these cases, and has to be added
188 if type(node.typ) in (colander.Set, colander.List):
255 options = pstruct.setdefault('options', {})
189 val = self.request.params.getall(node.name)
256 if 'scope' not in options:
190 else:
257 options['scope'] = IntegrationScopeType().serialize(None, {
191 val = self.request.params.get(node.name)
258 'repo': self.repo,
192 if val:
259 'repo_group': self.repo_group,
193 params[node.name] = val
260 })
194
261
195 controls = self.request.POST.items()
196 try:
262 try:
197 valid_data = form.validate(controls)
263 valid_data = form.validate_pstruct(pstruct)
198 except deform.ValidationFailure as e:
264 except deform.ValidationFailure as e:
199 self.request.session.flash(
265 self.request.session.flash(
200 _('Errors exist when saving integration settings. '
266 _('Errors exist when saving integration settings. '
201 'Please check the form inputs.'),
267 'Please check the form inputs.'),
202 queue='error')
268 queue='error')
203 return self.settings_get(errors={}, defaults=params, form=e)
269 return self.settings_get(form=e)
204
270
205 if not self.integration:
271 if not self.integration:
206 self.integration = Integration()
272 self.integration = Integration()
207 self.integration.integration_type = self.IntegrationType.key
273 self.integration.integration_type = self.IntegrationType.key
208 if self.repo:
209 self.integration.repo = self.repo
210 Session().add(self.integration)
274 Session().add(self.integration)
211
275
212 self.integration.enabled = valid_data.pop('enabled', False)
276 scope = valid_data['options']['scope']
213 self.integration.name = valid_data.pop('name')
214 self.integration.settings = valid_data
215
277
278 IntegrationModel().update_integration(self.integration,
279 name=valid_data['options']['name'],
280 enabled=valid_data['options']['enabled'],
281 settings=valid_data['settings'],
282 repo=scope['repo'],
283 repo_group=scope['repo_group'],
284 child_repos_only=scope['child_repos_only'],
285 )
286
287
288 self.integration.settings = valid_data['settings']
216 Session().commit()
289 Session().commit()
217
218 # Display success message and redirect.
290 # Display success message and redirect.
219 self.request.session.flash(
291 self.request.session.flash(
220 _('Integration {integration_name} updated successfully.').format(
292 _('Integration {integration_name} updated successfully.').format(
221 integration_name=self.IntegrationType.display_name),
293 integration_name=self.IntegrationType.display_name),
222 queue='success')
294 queue='success')
223
295
224 if self.repo:
296
225 redirect_to = self.request.route_url(
297 # if integration scope changes, we must redirect to the right place
226 'repo_integrations_edit', repo_name=self.repo.repo_name,
298 # keeping in mind if the original view was for /repo/ or /_admin/
299 admin_view = not (self.repo or self.repo_group)
300
301 if self.integration.repo and not admin_view:
302 redirect_to = self.request.route_path(
303 'repo_integrations_edit',
304 repo_name=self.integration.repo.repo_name,
305 integration=self.integration.integration_type,
306 integration_id=self.integration.integration_id)
307 elif self.integration.repo_group and not admin_view:
308 redirect_to = self.request.route_path(
309 'repo_group_integrations_edit',
310 repo_group_name=self.integration.repo_group.group_name,
227 integration=self.integration.integration_type,
311 integration=self.integration.integration_type,
228 integration_id=self.integration.integration_id)
312 integration_id=self.integration.integration_id)
229 else:
313 else:
230 redirect_to = self.request.route_url(
314 redirect_to = self.request.route_path(
231 'global_integrations_edit',
315 'global_integrations_edit',
232 integration=self.integration.integration_type,
316 integration=self.integration.integration_type,
233 integration_id=self.integration.integration_id)
317 integration_id=self.integration.integration_id)
@@ -235,31 +319,60 b' class IntegrationSettingsViewBase(object'
235 return HTTPFound(redirect_to)
319 return HTTPFound(redirect_to)
236
320
237 def index(self):
321 def index(self):
238 current_integrations = self.integrations
322 """ List integrations """
239 if self.IntegrationType:
323 if self.repo:
240 current_integrations = {
324 scope = self.repo
241 self.IntegrationType.key: self.integrations.get(
325 elif self.repo_group:
242 self.IntegrationType.key, [])
326 scope = self.repo_group
243 }
327 else:
328 scope = 'all'
329
330 integrations = []
331
332 for integration in IntegrationModel().get_integrations(
333 scope=scope, IntegrationType=self.IntegrationType):
334
335 # extra permissions check *just in case*
336 if not self._has_perms_for_integration(integration):
337 continue
338 integrations.append(integration)
339
340 sort_arg = self.request.GET.get('sort', 'name:asc')
341 if ':' in sort_arg:
342 sort_field, sort_dir = sort_arg.split(':')
343 else:
344 sort_field = sort_arg, 'asc'
345
346 assert sort_field in ('name', 'integration_type', 'enabled', 'scope')
347
348 integrations.sort(
349 key=lambda x: getattr(x[1], sort_field), reverse=(sort_dir=='desc'))
350
351
352 page_url = webhelpers.paginate.PageURL(
353 self.request.path, self.request.GET)
354 page = safe_int(self.request.GET.get('page', 1), 1)
355
356 integrations = Page(integrations, page=page, items_per_page=10,
357 url=page_url)
244
358
245 template_context = {
359 template_context = {
360 'sort_field': sort_field,
361 'rev_sort_dir': sort_dir != 'desc' and 'desc' or 'asc',
246 'current_IntegrationType': self.IntegrationType,
362 'current_IntegrationType': self.IntegrationType,
247 'current_integrations': current_integrations,
363 'integrations_list': integrations,
248 'available_integrations': integration_type_registry,
364 'available_integrations': integration_type_registry,
249 'c': self._template_c_context()
365 'c': self._template_c_context(),
366 'request': self.request,
250 }
367 }
368 return template_context
251
369
252 if self.repo:
370 def new_integration(self):
253 html = render('rhodecode:templates/admin/integrations/list.html',
371 template_context = {
254 template_context,
372 'available_integrations': integration_type_registry,
255 request=self.request)
373 'c': self._template_c_context(),
256 else:
374 }
257 html = render('rhodecode:templates/admin/integrations/list.html',
375 return template_context
258 template_context,
259 request=self.request)
260
261 return Response(html)
262
263
376
264 class GlobalIntegrationsView(IntegrationSettingsViewBase):
377 class GlobalIntegrationsView(IntegrationSettingsViewBase):
265 def perm_check(self, user):
378 def perm_check(self, user):
@@ -270,3 +383,10 b' class RepoIntegrationsView(IntegrationSe'
270 def perm_check(self, user):
383 def perm_check(self, user):
271 return auth.HasRepoPermissionAll('repository.admin'
384 return auth.HasRepoPermissionAll('repository.admin'
272 )(repo_name=self.repo.repo_name, user=user)
385 )(repo_name=self.repo.repo_name, user=user)
386
387
388 class RepoGroupIntegrationsView(IntegrationSettingsViewBase):
389 def perm_check(self, user):
390 return auth.HasRepoGroupPermissionAll('group.admin'
391 )(group_name=self.repo_group.group_name, user=user)
392
@@ -48,12 +48,12 b' def annotate_highlight('
48 :param headers: dictionary with headers (keys are whats in ``order``
48 :param headers: dictionary with headers (keys are whats in ``order``
49 parameter)
49 parameter)
50 """
50 """
51 from rhodecode.lib.utils import get_custom_lexer
51 from rhodecode.lib.helpers import get_lexer_for_filenode
52 options['linenos'] = True
52 options['linenos'] = True
53 formatter = AnnotateHtmlFormatter(
53 formatter = AnnotateHtmlFormatter(
54 filenode=filenode, order=order, headers=headers,
54 filenode=filenode, order=order, headers=headers,
55 annotate_from_commit_func=annotate_from_commit_func, **options)
55 annotate_from_commit_func=annotate_from_commit_func, **options)
56 lexer = get_custom_lexer(filenode.extension) or filenode.lexer
56 lexer = get_lexer_for_filenode(filenode)
57 highlighted = highlight(filenode.content, lexer, formatter)
57 highlighted = highlight(filenode.content, lexer, formatter)
58 return highlighted
58 return highlighted
59
59
@@ -1116,9 +1116,11 b' class CSRFRequired(object):'
1116 For use with the ``webhelpers.secure_form`` helper functions.
1116 For use with the ``webhelpers.secure_form`` helper functions.
1117
1117
1118 """
1118 """
1119 def __init__(self, token=csrf_token_key, header='X-CSRF-Token'):
1119 def __init__(self, token=csrf_token_key, header='X-CSRF-Token',
1120 except_methods=None):
1120 self.token = token
1121 self.token = token
1121 self.header = header
1122 self.header = header
1123 self.except_methods = except_methods or []
1122
1124
1123 def __call__(self, func):
1125 def __call__(self, func):
1124 return get_cython_compat_decorator(self.__wrapper, func)
1126 return get_cython_compat_decorator(self.__wrapper, func)
@@ -1131,6 +1133,9 b' class CSRFRequired(object):'
1131 return supplied_token and supplied_token == cur_token
1133 return supplied_token and supplied_token == cur_token
1132
1134
1133 def __wrapper(self, func, *fargs, **fkwargs):
1135 def __wrapper(self, func, *fargs, **fkwargs):
1136 if request.method in self.except_methods:
1137 return func(*fargs, **fkwargs)
1138
1134 cur_token = get_csrf_token(save_if_missing=False)
1139 cur_token = get_csrf_token(save_if_missing=False)
1135 if self.check_csrf(request, cur_token):
1140 if self.check_csrf(request, cur_token):
1136 if request.POST.get(self.token):
1141 if request.POST.get(self.token):
@@ -28,6 +28,7 b' import logging'
28 import socket
28 import socket
29
29
30 import ipaddress
30 import ipaddress
31 import pyramid.threadlocal
31
32
32 from paste.auth.basic import AuthBasicAuthenticator
33 from paste.auth.basic import AuthBasicAuthenticator
33 from paste.httpexceptions import HTTPUnauthorized, HTTPForbidden, get_exception
34 from paste.httpexceptions import HTTPUnauthorized, HTTPForbidden, get_exception
@@ -276,7 +277,7 b' def attach_context_attributes(context, r'
276 # Visual options
277 # Visual options
277 context.visual = AttributeDict({})
278 context.visual = AttributeDict({})
278
279
279 # DB store
280 # DB stored Visual Items
280 context.visual.show_public_icon = str2bool(
281 context.visual.show_public_icon = str2bool(
281 rc_config.get('rhodecode_show_public_icon'))
282 rc_config.get('rhodecode_show_public_icon'))
282 context.visual.show_private_icon = str2bool(
283 context.visual.show_private_icon = str2bool(
@@ -368,6 +369,8 b' def attach_context_attributes(context, r'
368 context.unread_notifications = NotificationModel().get_unread_cnt_for_user(
369 context.unread_notifications = NotificationModel().get_unread_cnt_for_user(
369 context.rhodecode_user.user_id)
370 context.rhodecode_user.user_id)
370
371
372 context.pyramid_request = pyramid.threadlocal.get_current_request()
373
371
374
372 def get_auth_user(environ):
375 def get_auth_user(environ):
373 ip_addr = get_ip_addr(environ)
376 ip_addr = get_ip_addr(environ)
@@ -84,6 +84,7 b' def get_user_data(user_id):'
84 'icon_link': h.gravatar_url(user.email, 14),
84 'icon_link': h.gravatar_url(user.email, 14),
85 'display_name': h.person(user, 'username_or_name_or_email'),
85 'display_name': h.person(user, 'username_or_name_or_email'),
86 'display_link': h.link_to_user(user),
86 'display_link': h.link_to_user(user),
87 'notifications': user.user_data.get('notification_status', True)
87 }
88 }
88
89
89
90
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file renamed from rhodecode/templates/admin/integrations/edit.html to rhodecode/templates/admin/integrations/form.html
NO CONTENT: file renamed from rhodecode/templates/admin/integrations/edit.html to rhodecode/templates/admin/integrations/form.html
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: file was removed
NO CONTENT: file was removed
The requested commit or file is too big and content was truncated. Show full diff
General Comments 0
You need to be logged in to leave comments. Login now