Girish Ramakrishnan
31b1265592
repo.js: Remove usage of exec
...
This makes sure we can handle files with spaces and funny characters
like brackets without shell-escaping.
Using exec has security implication since a filename could be 'foo && rm -rf /'
2013-09-18 00:44:26 -07:00
Girish Ramakrishnan
9e8177a139
repo.js: remove exec feature of chaining commands
...
chaining is a shell feature. This is part one of removing
shell usage.
2013-09-18 00:44:26 -07:00
Johannes Zellner
9821a3e515
Add some additional logging
2013-09-16 08:00:07 -07:00
Girish Ramakrishnan
476c7f8ab7
repo.js: add separate function to add content
2013-09-15 23:22:38 -07:00
Girish Ramakrishnan
56bc1fe9fb
s/_op/_operation
...
Note that the _ signifies that the option is internal and not set
by the user.
2013-09-15 19:56:55 -07:00
Girish Ramakrishnan
d3c6ba0345
repo.js: add putFile
2013-09-15 19:52:38 -07:00
Girish Ramakrishnan
d4db16c845
refactor: Move code into repo
2013-09-15 19:24:23 -07:00
Girish Ramakrishnan
87f04cd978
Make rev param mandatory for fileops
...
Specify '*' as rev for don't care.
2013-09-15 19:04:01 -07:00
Johannes Zellner
2df8dd36af
Use volume password header database
...
This database stores the username and the volume password,
encrypted with the users password.
2013-09-13 23:45:28 -07:00
Girish Ramakrishnan
e16b3c91cf
repo.js: fileEntry return ENOENT when file not found
2013-09-13 23:07:46 -07:00
Girish Ramakrishnan
c3a58b44a4
fix typo
2013-09-13 22:59:59 -07:00
Girish Ramakrishnan
dcca98019b
Better error handling
2013-09-13 22:35:13 -07:00
Girish Ramakrishnan
fa15e13cb1
move metadata to repo
2013-09-13 22:14:56 -07:00
Girish Ramakrishnan
20942f6305
Add more asserts to validate arguments
2013-09-12 22:39:39 -07:00
Girish Ramakrishnan
99664c0323
coding style: Remove options from repo.create
...
The style is thus:
- Required arguments are listed as proper arguments
- Optional arguments are in options
- Options object is optional and ca be skipped
2013-09-12 22:29:55 -07:00
Girish Ramakrishnan
0e39b7bfbf
Sprinkle asserts to validate args
2013-09-12 22:23:53 -07:00
Girish Ramakrishnan
1ab311c6fb
s/user/obj
2013-09-12 22:17:23 -07:00
Girish Ramakrishnan
84e1dc32d3
api: implement putFile
2013-09-12 21:03:39 -07:00
Johannes Zellner
2b726e3097
Add better volume error reporting and volume mounting
2013-09-11 10:52:47 -07:00
Johannes Zellner
07a8dbf1c3
Add initial support for user/password headers for volumes
2013-09-09 09:45:40 -07:00
Johannes Zellner
ee8bd13685
Add some more volume related tests
2013-09-08 21:02:36 -07:00
Johannes Zellner
6503885b21
Ask the user for his password to create a volume
2013-09-08 20:24:19 -07:00
Johannes Zellner
51009cae42
make tests cleanup their tmp folders
2013-09-08 14:07:01 -07:00
Johannes Zellner
6326bdd1c3
Minor updates to streamline tests
2013-09-08 13:44:33 -07:00
Johannes Zellner
fa6772ea5c
Add database.js unit tests
2013-09-08 13:43:47 -07:00
Girish Ramakrishnan
0f7b85f52d
repo: implement move and copy
2013-09-08 00:58:14 -07:00
Girish Ramakrishnan
e051ded540
make sure paths are outside .git/
2013-09-08 00:28:39 -07:00
Girish Ramakrishnan
c627a1fc07
path.resolve already takes care of path.join
2013-09-07 23:37:17 -07:00
Girish Ramakrishnan
05fe38512d
use path.join
2013-09-07 23:37:17 -07:00
Girish Ramakrishnan
defaf84532
repo: separate addFileAndCommit from writeFileAndCommit
...
addFileAndCommit can be used to add files that were modified or created
in place in the checkout (for example, copy operation)
2013-09-07 23:15:29 -07:00
Girish Ramakrishnan
78a4daf08d
repo: refactor exec call
2013-09-07 23:12:07 -07:00
Girish Ramakrishnan
925f22d979
api: add delete fileops
2013-09-07 22:23:55 -07:00
Girish Ramakrishnan
7e04452f24
repo: removeFile can now remove directories
2013-09-07 21:43:53 -07:00
Johannes Zellner
eee4955f4c
Add user remove route
2013-09-06 09:54:07 -07:00
Johannes Zellner
c05fc3f79c
First user created is the admin
...
The special */createadmin route is to allow non authorized calls.
As soon as there is one entry in the db, no further calls are allowed.
2013-09-06 08:10:19 -07:00
Johannes Zellner
48ba30a0d1
Use user API in user routes
2013-09-05 21:34:49 -07:00
Johannes Zellner
b7dfcc8576
Add initial user.js to split up the user route and API
2013-09-05 10:02:32 -07:00
Girish Ramakrishnan
10847404da
repo.addFile can now automatically rename a file if it already exists
2013-09-03 01:06:07 -07:00
Girish Ramakrishnan
a29778f6cf
Get server version from package.json
2013-09-02 15:19:59 -07:00
Johannes Zellner
bed03ef56e
Do not include .git folder for volume file listing
2013-09-01 11:54:56 -07:00
Girish Ramakrishnan
c5becb8480
rename options.dirs to options.listSubtrees
2013-09-01 08:37:26 -07:00
Girish Ramakrishnan
5aabc1f4bf
Metadata now returns the tree hash
...
The hash can be provided in a future call to metadata. If there are
no changes, metadata returns 304.
2013-09-01 01:46:27 -07:00
Girish Ramakrishnan
c8795fae1c
Use cat-file instead of show
...
Only to use plumbing as much as possible.
2013-09-01 00:09:36 -07:00
Girish Ramakrishnan
7f31ead9e3
centralize volume error handling
2013-08-31 22:56:52 -07:00
Girish Ramakrishnan
23b41089b4
repo: getTree can now list dirs
2013-08-31 22:46:54 -07:00
Girish Ramakrishnan
2291146416
api: /api/v1/metadata now returns metadata about file or directory
2013-08-31 22:46:54 -07:00
Girish Ramakrishnan
6816e069a1
src -> api
2013-08-31 21:01:21 -07:00