Nick O'Leary
a8ec032553
Allow context store name to be provided in the key
...
For nodes that get/set context, when multiple stores are configured
they will not know to parse the store name from the key. So they
will pass the store name in the key, such as #:(store)::key.
Currently that will cause that full string to be used as the key
and the default context store used - which is wrong.
The code now parses out the store name from the key if it is set -
athough if the call to get/set does include the store argument, it
will take precedence.
This only applies when the key is a string - it doesn't apply when
an array of keys is provided.
2018-09-14 23:21:05 +01:00
Nick O'Leary
75e7c0e50d
Ensure context.flow/global cannot be deleted or enumerated
2018-09-10 22:30:51 +01:00
Nick O'Leary
0f4d46671f
Fix global.get("foo.bar") for functionGlobalContext set values
2018-09-09 11:07:44 +01:00
Nick O'Leary
28b311b7ed
Improve error reporting from context plugin loading
2018-08-16 14:36:11 +01:00
Nick O'Leary
1dc021e871
Improve custom context store module logging
2018-08-09 15:37:04 +01:00
HirokiUchikawa
6533a9793c
Allow get
and keys
to be called without callback
2018-07-27 21:33:38 +09:00
Nick O'Leary
e9be007040
Tidy up context store error messages
2018-07-23 15:20:13 +01:00
Nick O'Leary
3bcffe375d
Merge pull request #1834 from node-red-hitachi/add-tests-for-context-admin-api
...
Add tests for context admin api
2018-07-23 13:29:10 +01:00
Nick O'Leary
9f81a591e1
Move multiple-get/set logic into individual context stores
2018-07-23 13:28:06 +01:00
Hiroyasu Nishiyama
09329e1104
add tests for context admin api
2018-07-21 12:00:54 +09:00
Hiroyasu Nishiyama
a29527ec96
use implicit logging of context store
2018-07-20 23:26:47 +09:00
Hiroyasu Nishiyama
7612481570
ignore default store from logging
2018-07-19 14:12:01 +09:00
Hiroyasu Nishiyama
31ee1be81e
add logging of context store
2018-07-19 07:40:52 +09:00
Nick O'Leary
75c29f1cb7
Disallow store names that are not A-Za-z0-9_
2018-07-16 16:44:33 +01:00
HirokiUchikawa
050acd239c
Allow arrays of different lengths to be passed to set
.
2018-07-13 20:59:45 +09:00
HirokiUchikawa
6b2f5fbb19
Allow multiple keys and values to be passed to set
2018-07-12 19:19:55 +09:00
HirokiUchikawa
e8d76b0555
Allow multiple values to be passed to get
2018-07-12 14:05:36 +09:00
Nick O'Leary
c440a4c730
Expose list of context stores to the editor
2018-07-03 14:17:42 +01:00
Nick O'Leary
7423583508
Create default store for node tests to use
2018-07-02 15:47:47 +01:00
Nick O'Leary
038d821a7c
Apply fGC to all global contexts for default values
2018-07-02 15:21:13 +01:00
Nick O'Leary
466cb4be89
Small tidy up on context plugin loading
2018-06-29 09:48:38 +01:00
Nick O'Leary
c0870c5694
Merge branch '0.19' into context-tab
2018-06-27 16:05:17 +01:00
HirokiUchikawa
40ff54f67e
Improve context storage handling
2018-06-26 11:43:37 +09:00
HirokiUchikawa
f2fa26fb07
Use the callback instead of Promise in context API
...
and remove unnecessary functions
2018-06-22 17:11:54 +09:00
HirokiUchikawa
e6411d11b1
Remove unnecessary context storage APIs
...
and rename context storage APIs
2018-06-20 20:00:39 +09:00
HirokiUchikawa
dd81d947fc
Use native Promise instead of when.js
2018-06-20 19:50:55 +09:00
HirokiUchikawa
41a04a2849
Add async API to context
...
and add test cases for async
2018-06-20 19:42:07 +09:00
HirokiUchikawa
fbe0e2d6eb
Delete async function in context/index
2018-06-20 19:42:03 +09:00
HirokiUchikawa
6e34f0697c
Allow .get/set/keys to return asynchronous results
2018-06-20 19:42:02 +09:00
HirokiUchikawa
c48c74f173
Delete unused variables
2018-06-20 19:42:00 +09:00
HirokiUchikawa
f262348497
Add clean to context plugin
...
and don't delete local context unless the context is deleted by a user
2018-06-20 19:41:59 +09:00
HirokiUchikawa
7185bcd51f
Add open/close API for context
2018-06-20 19:41:58 +09:00
HirokiUchikawa
28d05e2449
Allow multiple instances of a given storage module to exist
2018-06-20 19:41:57 +09:00
Hiroki Uchikawa
7fafa21a1b
Change the order of arguments
2018-06-20 19:41:56 +09:00
HirokiUchikawa
84f598e143
Change prefix from $ to #
2018-06-20 19:41:51 +09:00
Hiroki Uchikawa
0be9c88106
Improve processing when default is an alias
...
and fix test cases
2018-06-20 19:41:01 +09:00
Kazuki-Nakanishi
e046fc1ac5
Refactor parseKey and implement parseStorage
2018-06-20 19:41:00 +09:00
Kazuki-Nakanishi
3a476ac493
Implemented error handlings
2018-06-20 19:40:54 +09:00
Hiroki Uchikawa
e33ec0cf50
update external context
...
- Implement `delete` function
- Swap default easily
- Change memory context as a plugin
- Update localfilesystem plugin
- Change file/folder structure
2018-06-20 19:40:26 +09:00
Hiroki Uchikawa
b4b70a988e
Change delimiter to "_" from ":"
2018-06-20 19:40:25 +09:00
Hiroki Uchikawa
771b598c09
Add persistable context
...
and avoid exception when arg is undefined in util/getMessageProperty
2018-06-20 19:40:24 +09:00
Hiroki Uchikawa
aa6b72ac87
Move context.js to context folder
...
and rename context.js -> index.js
2018-06-20 19:40:22 +09:00