@openfn/language-dhis2 3.0.4 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/call-bind/.eslintignore +1 -0
- package/node_modules/call-bind/.eslintrc +17 -0
- package/node_modules/call-bind/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind/.nycrc +13 -0
- package/node_modules/call-bind/CHANGELOG.md +42 -0
- package/node_modules/call-bind/LICENSE +21 -0
- package/node_modules/call-bind/README.md +2 -0
- package/node_modules/call-bind/callBound.js +15 -0
- package/node_modules/call-bind/index.js +47 -0
- package/node_modules/call-bind/package.json +108 -0
- package/node_modules/call-bind/test/callBound.js +55 -0
- package/node_modules/call-bind/test/index.js +66 -0
- package/node_modules/function-bind/.editorconfig +20 -0
- package/node_modules/function-bind/.eslintrc +15 -0
- package/node_modules/function-bind/.jscs.json +176 -0
- package/node_modules/function-bind/.npmignore +22 -0
- package/node_modules/function-bind/.travis.yml +168 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +48 -0
- package/node_modules/function-bind/implementation.js +52 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +100 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/get-intrinsic/.eslintignore +1 -0
- package/node_modules/get-intrinsic/.eslintrc +43 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +13 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +64 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +65 -0
- package/node_modules/get-intrinsic/index.js +330 -0
- package/node_modules/get-intrinsic/package.json +107 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +260 -0
- package/node_modules/has/LICENSE-MIT +22 -0
- package/node_modules/has/README.md +18 -0
- package/node_modules/has/package.json +79 -0
- package/node_modules/has/src/index.js +5 -0
- package/node_modules/has/test/index.js +10 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.github/workflows/rebase.yml +15 -0
- package/node_modules/has-symbols/.travis.yml +12 -0
- package/node_modules/has-symbols/CHANGELOG.md +34 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +45 -0
- package/node_modules/has-symbols/index.js +13 -0
- package/node_modules/has-symbols/package.json +124 -0
- package/node_modules/has-symbols/shams.js +42 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +28 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +28 -0
- package/node_modules/has-symbols/test/tests.js +54 -0
- package/node_modules/qs/.editorconfig +40 -0
- package/node_modules/qs/.eslintrc +38 -0
- package/node_modules/qs/.github/FUNDING.yml +12 -0
- package/node_modules/qs/.nycrc +13 -0
- package/node_modules/qs/CHANGELOG.md +388 -0
- package/node_modules/qs/LICENSE.md +29 -0
- package/node_modules/qs/README.md +623 -0
- package/node_modules/qs/dist/qs.js +2044 -0
- package/node_modules/qs/lib/formats.js +23 -0
- package/node_modules/qs/lib/index.js +11 -0
- package/node_modules/qs/lib/parse.js +263 -0
- package/node_modules/qs/lib/stringify.js +317 -0
- package/node_modules/qs/lib/utils.js +252 -0
- package/node_modules/qs/package.json +104 -0
- package/node_modules/qs/test/parse.js +841 -0
- package/node_modules/qs/test/stringify.js +865 -0
- package/node_modules/qs/test/utils.js +136 -0
- package/node_modules/side-channel/.eslintignore +1 -0
- package/node_modules/side-channel/.eslintrc +11 -0
- package/node_modules/side-channel/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel/.nycrc +13 -0
- package/node_modules/side-channel/CHANGELOG.md +65 -0
- package/node_modules/side-channel/LICENSE +21 -0
- package/node_modules/side-channel/README.md +2 -0
- package/node_modules/side-channel/index.js +124 -0
- package/node_modules/side-channel/node_modules/object-inspect/.eslintignore +1 -0
- package/node_modules/side-channel/node_modules/object-inspect/.eslintrc +53 -0
- package/node_modules/side-channel/node_modules/object-inspect/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel/node_modules/object-inspect/.nycrc +13 -0
- package/node_modules/side-channel/node_modules/object-inspect/CHANGELOG.md +342 -0
- package/node_modules/side-channel/node_modules/object-inspect/LICENSE +21 -0
- package/node_modules/side-channel/node_modules/object-inspect/example/all.js +23 -0
- package/node_modules/side-channel/node_modules/object-inspect/example/circular.js +6 -0
- package/node_modules/side-channel/node_modules/object-inspect/example/fn.js +5 -0
- package/node_modules/side-channel/node_modules/object-inspect/example/inspect.js +10 -0
- package/node_modules/side-channel/node_modules/object-inspect/index.js +511 -0
- package/node_modules/side-channel/node_modules/object-inspect/package.json +112 -0
- package/node_modules/side-channel/node_modules/object-inspect/readme.markdown +86 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/bigint.js +58 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/browser/dom.js +15 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/circular.js +16 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/deep.js +12 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/element.js +53 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/err.js +48 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/fakes.js +29 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/fn.js +76 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/has.js +34 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/holes.js +15 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/indent-option.js +271 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/inspect.js +102 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/lowbyte.js +12 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/number.js +58 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/quoteStyle.js +17 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/toStringTag.js +40 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/undef.js +12 -0
- package/node_modules/side-channel/node_modules/object-inspect/test/values.js +211 -0
- package/node_modules/side-channel/node_modules/object-inspect/test-core-js.js +26 -0
- package/node_modules/side-channel/node_modules/object-inspect/util.inspect.js +1 -0
- package/node_modules/side-channel/package.json +95 -0
- package/node_modules/side-channel/test/index.js +78 -0
- package/package.json +3 -2
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var inspect = require('../');
|
|
4
|
+
var test = require('tape');
|
|
5
|
+
var hasSymbols = require('has-symbols/shams')();
|
|
6
|
+
var hasToStringTag = require('has-tostringtag/shams')();
|
|
7
|
+
|
|
8
|
+
test('values', function (t) {
|
|
9
|
+
t.plan(1);
|
|
10
|
+
var obj = [{}, [], { 'a-b': 5 }];
|
|
11
|
+
t.equal(inspect(obj), '[ {}, [], { \'a-b\': 5 } ]');
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
test('arrays with properties', function (t) {
|
|
15
|
+
t.plan(1);
|
|
16
|
+
var arr = [3];
|
|
17
|
+
arr.foo = 'bar';
|
|
18
|
+
var obj = [1, 2, arr];
|
|
19
|
+
obj.baz = 'quux';
|
|
20
|
+
obj.index = -1;
|
|
21
|
+
t.equal(inspect(obj), '[ 1, 2, [ 3, foo: \'bar\' ], baz: \'quux\', index: -1 ]');
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
test('has', function (t) {
|
|
25
|
+
t.plan(1);
|
|
26
|
+
var has = Object.prototype.hasOwnProperty;
|
|
27
|
+
delete Object.prototype.hasOwnProperty;
|
|
28
|
+
t.equal(inspect({ a: 1, b: 2 }), '{ a: 1, b: 2 }');
|
|
29
|
+
Object.prototype.hasOwnProperty = has; // eslint-disable-line no-extend-native
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
test('indexOf seen', function (t) {
|
|
33
|
+
t.plan(1);
|
|
34
|
+
var xs = [1, 2, 3, {}];
|
|
35
|
+
xs.push(xs);
|
|
36
|
+
|
|
37
|
+
var seen = [];
|
|
38
|
+
seen.indexOf = undefined;
|
|
39
|
+
|
|
40
|
+
t.equal(
|
|
41
|
+
inspect(xs, {}, 0, seen),
|
|
42
|
+
'[ 1, 2, 3, {}, [Circular] ]'
|
|
43
|
+
);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test('seen seen', function (t) {
|
|
47
|
+
t.plan(1);
|
|
48
|
+
var xs = [1, 2, 3];
|
|
49
|
+
|
|
50
|
+
var seen = [xs];
|
|
51
|
+
seen.indexOf = undefined;
|
|
52
|
+
|
|
53
|
+
t.equal(
|
|
54
|
+
inspect(xs, {}, 0, seen),
|
|
55
|
+
'[Circular]'
|
|
56
|
+
);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
test('seen seen seen', function (t) {
|
|
60
|
+
t.plan(1);
|
|
61
|
+
var xs = [1, 2, 3];
|
|
62
|
+
|
|
63
|
+
var seen = [5, xs];
|
|
64
|
+
seen.indexOf = undefined;
|
|
65
|
+
|
|
66
|
+
t.equal(
|
|
67
|
+
inspect(xs, {}, 0, seen),
|
|
68
|
+
'[Circular]'
|
|
69
|
+
);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
test('symbols', { skip: !hasSymbols }, function (t) {
|
|
73
|
+
var sym = Symbol('foo');
|
|
74
|
+
t.equal(inspect(sym), 'Symbol(foo)', 'Symbol("foo") should be "Symbol(foo)"');
|
|
75
|
+
if (typeof sym === 'symbol') {
|
|
76
|
+
// Symbol shams are incapable of differentiating boxed from unboxed symbols
|
|
77
|
+
t.equal(inspect(Object(sym)), 'Object(Symbol(foo))', 'Object(Symbol("foo")) should be "Object(Symbol(foo))"');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
t.test('toStringTag', { skip: !hasToStringTag }, function (st) {
|
|
81
|
+
st.plan(1);
|
|
82
|
+
|
|
83
|
+
var faker = {};
|
|
84
|
+
faker[Symbol.toStringTag] = 'Symbol';
|
|
85
|
+
st.equal(
|
|
86
|
+
inspect(faker),
|
|
87
|
+
'{ [Symbol(Symbol.toStringTag)]: \'Symbol\' }',
|
|
88
|
+
'object lying about being a Symbol inspects as an object'
|
|
89
|
+
);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
t.end();
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
test('Map', { skip: typeof Map !== 'function' }, function (t) {
|
|
96
|
+
var map = new Map();
|
|
97
|
+
map.set({ a: 1 }, ['b']);
|
|
98
|
+
map.set(3, NaN);
|
|
99
|
+
var expectedString = 'Map (2) {' + inspect({ a: 1 }) + ' => ' + inspect(['b']) + ', 3 => NaN}';
|
|
100
|
+
t.equal(inspect(map), expectedString, 'new Map([[{ a: 1 }, ["b"]], [3, NaN]]) should show size and contents');
|
|
101
|
+
t.equal(inspect(new Map()), 'Map (0) {}', 'empty Map should show as empty');
|
|
102
|
+
|
|
103
|
+
var nestedMap = new Map();
|
|
104
|
+
nestedMap.set(nestedMap, map);
|
|
105
|
+
t.equal(inspect(nestedMap), 'Map (1) {[Circular] => ' + expectedString + '}', 'Map containing a Map should work');
|
|
106
|
+
|
|
107
|
+
t.end();
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
test('WeakMap', { skip: typeof WeakMap !== 'function' }, function (t) {
|
|
111
|
+
var map = new WeakMap();
|
|
112
|
+
map.set({ a: 1 }, ['b']);
|
|
113
|
+
var expectedString = 'WeakMap { ? }';
|
|
114
|
+
t.equal(inspect(map), expectedString, 'new WeakMap([[{ a: 1 }, ["b"]]]) should not show size or contents');
|
|
115
|
+
t.equal(inspect(new WeakMap()), 'WeakMap { ? }', 'empty WeakMap should not show as empty');
|
|
116
|
+
|
|
117
|
+
t.end();
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
test('Set', { skip: typeof Set !== 'function' }, function (t) {
|
|
121
|
+
var set = new Set();
|
|
122
|
+
set.add({ a: 1 });
|
|
123
|
+
set.add(['b']);
|
|
124
|
+
var expectedString = 'Set (2) {' + inspect({ a: 1 }) + ', ' + inspect(['b']) + '}';
|
|
125
|
+
t.equal(inspect(set), expectedString, 'new Set([{ a: 1 }, ["b"]]) should show size and contents');
|
|
126
|
+
t.equal(inspect(new Set()), 'Set (0) {}', 'empty Set should show as empty');
|
|
127
|
+
|
|
128
|
+
var nestedSet = new Set();
|
|
129
|
+
nestedSet.add(set);
|
|
130
|
+
nestedSet.add(nestedSet);
|
|
131
|
+
t.equal(inspect(nestedSet), 'Set (2) {' + expectedString + ', [Circular]}', 'Set containing a Set should work');
|
|
132
|
+
|
|
133
|
+
t.end();
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
test('WeakSet', { skip: typeof WeakSet !== 'function' }, function (t) {
|
|
137
|
+
var map = new WeakSet();
|
|
138
|
+
map.add({ a: 1 });
|
|
139
|
+
var expectedString = 'WeakSet { ? }';
|
|
140
|
+
t.equal(inspect(map), expectedString, 'new WeakSet([{ a: 1 }]) should not show size or contents');
|
|
141
|
+
t.equal(inspect(new WeakSet()), 'WeakSet { ? }', 'empty WeakSet should not show as empty');
|
|
142
|
+
|
|
143
|
+
t.end();
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
test('WeakRef', { skip: typeof WeakRef !== 'function' }, function (t) {
|
|
147
|
+
var ref = new WeakRef({ a: 1 });
|
|
148
|
+
var expectedString = 'WeakRef { ? }';
|
|
149
|
+
t.equal(inspect(ref), expectedString, 'new WeakRef({ a: 1 }) should not show contents');
|
|
150
|
+
|
|
151
|
+
t.end();
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
test('FinalizationRegistry', { skip: typeof FinalizationRegistry !== 'function' }, function (t) {
|
|
155
|
+
var registry = new FinalizationRegistry(function () {});
|
|
156
|
+
var expectedString = 'FinalizationRegistry [FinalizationRegistry] {}';
|
|
157
|
+
t.equal(inspect(registry), expectedString, 'new FinalizationRegistry(function () {}) should work normallys');
|
|
158
|
+
|
|
159
|
+
t.end();
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
test('Strings', function (t) {
|
|
163
|
+
var str = 'abc';
|
|
164
|
+
|
|
165
|
+
t.equal(inspect(str), "'" + str + "'", 'primitive string shows as such');
|
|
166
|
+
t.equal(inspect(str, { quoteStyle: 'single' }), "'" + str + "'", 'primitive string shows as such, single quoted');
|
|
167
|
+
t.equal(inspect(str, { quoteStyle: 'double' }), '"' + str + '"', 'primitive string shows as such, double quoted');
|
|
168
|
+
t.equal(inspect(Object(str)), 'Object(' + inspect(str) + ')', 'String object shows as such');
|
|
169
|
+
t.equal(inspect(Object(str), { quoteStyle: 'single' }), 'Object(' + inspect(str, { quoteStyle: 'single' }) + ')', 'String object shows as such, single quoted');
|
|
170
|
+
t.equal(inspect(Object(str), { quoteStyle: 'double' }), 'Object(' + inspect(str, { quoteStyle: 'double' }) + ')', 'String object shows as such, double quoted');
|
|
171
|
+
|
|
172
|
+
t.end();
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
test('Numbers', function (t) {
|
|
176
|
+
var num = 42;
|
|
177
|
+
|
|
178
|
+
t.equal(inspect(num), String(num), 'primitive number shows as such');
|
|
179
|
+
t.equal(inspect(Object(num)), 'Object(' + inspect(num) + ')', 'Number object shows as such');
|
|
180
|
+
|
|
181
|
+
t.end();
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
test('Booleans', function (t) {
|
|
185
|
+
t.equal(inspect(true), String(true), 'primitive true shows as such');
|
|
186
|
+
t.equal(inspect(Object(true)), 'Object(' + inspect(true) + ')', 'Boolean object true shows as such');
|
|
187
|
+
|
|
188
|
+
t.equal(inspect(false), String(false), 'primitive false shows as such');
|
|
189
|
+
t.equal(inspect(Object(false)), 'Object(' + inspect(false) + ')', 'Boolean false object shows as such');
|
|
190
|
+
|
|
191
|
+
t.end();
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
test('Date', function (t) {
|
|
195
|
+
var now = new Date();
|
|
196
|
+
t.equal(inspect(now), String(now), 'Date shows properly');
|
|
197
|
+
t.equal(inspect(new Date(NaN)), 'Invalid Date', 'Invalid Date shows properly');
|
|
198
|
+
|
|
199
|
+
t.end();
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
test('RegExps', function (t) {
|
|
203
|
+
t.equal(inspect(/a/g), '/a/g', 'regex shows properly');
|
|
204
|
+
t.equal(inspect(new RegExp('abc', 'i')), '/abc/i', 'new RegExp shows properly');
|
|
205
|
+
|
|
206
|
+
var match = 'abc abc'.match(/[ab]+/);
|
|
207
|
+
delete match.groups; // for node < 10
|
|
208
|
+
t.equal(inspect(match), '[ \'ab\', index: 0, input: \'abc abc\' ]', 'RegExp match object shows properly');
|
|
209
|
+
|
|
210
|
+
t.end();
|
|
211
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('core-js');
|
|
4
|
+
|
|
5
|
+
var inspect = require('./');
|
|
6
|
+
var test = require('tape');
|
|
7
|
+
|
|
8
|
+
test('Maps', function (t) {
|
|
9
|
+
t.equal(inspect(new Map([[1, 2]])), 'Map (1) {1 => 2}');
|
|
10
|
+
t.end();
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test('WeakMaps', function (t) {
|
|
14
|
+
t.equal(inspect(new WeakMap([[{}, 2]])), 'WeakMap { ? }');
|
|
15
|
+
t.end();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test('Sets', function (t) {
|
|
19
|
+
t.equal(inspect(new Set([[1, 2]])), 'Set (1) {[ 1, 2 ]}');
|
|
20
|
+
t.end();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
test('WeakSets', function (t) {
|
|
24
|
+
t.equal(inspect(new WeakSet([[1, 2]])), 'WeakSet { ? }');
|
|
25
|
+
t.end();
|
|
26
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('util').inspect;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_from": "side-channel@^1.0.4",
|
|
3
|
+
"_id": "side-channel@1.0.4",
|
|
4
|
+
"_inBundle": false,
|
|
5
|
+
"_integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
|
|
6
|
+
"_location": "/side-channel",
|
|
7
|
+
"_phantomChildren": {},
|
|
8
|
+
"_requested": {
|
|
9
|
+
"type": "range",
|
|
10
|
+
"registry": true,
|
|
11
|
+
"raw": "side-channel@^1.0.4",
|
|
12
|
+
"name": "side-channel",
|
|
13
|
+
"escapedName": "side-channel",
|
|
14
|
+
"rawSpec": "^1.0.4",
|
|
15
|
+
"saveSpec": null,
|
|
16
|
+
"fetchSpec": "^1.0.4"
|
|
17
|
+
},
|
|
18
|
+
"_requiredBy": [
|
|
19
|
+
"/qs"
|
|
20
|
+
],
|
|
21
|
+
"_resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
|
|
22
|
+
"_shasum": "efce5c8fdc104ee751b25c58d4290011fa5ea2cf",
|
|
23
|
+
"_spec": "side-channel@^1.0.4",
|
|
24
|
+
"_where": "/Users/taylor/devtools/adaptors/language-dhis2/node_modules/qs",
|
|
25
|
+
"author": {
|
|
26
|
+
"name": "Jordan Harband",
|
|
27
|
+
"email": "ljharb@gmail.com"
|
|
28
|
+
},
|
|
29
|
+
"auto-changelog": {
|
|
30
|
+
"output": "CHANGELOG.md",
|
|
31
|
+
"template": "keepachangelog",
|
|
32
|
+
"unreleased": false,
|
|
33
|
+
"commitLimit": false,
|
|
34
|
+
"backfillLimit": false,
|
|
35
|
+
"hideCredit": true
|
|
36
|
+
},
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/ljharb/side-channel/issues"
|
|
39
|
+
},
|
|
40
|
+
"bundleDependencies": false,
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"call-bind": "^1.0.0",
|
|
43
|
+
"get-intrinsic": "^1.0.2",
|
|
44
|
+
"object-inspect": "^1.9.0"
|
|
45
|
+
},
|
|
46
|
+
"deprecated": false,
|
|
47
|
+
"description": "Store information about any JS value in a side channel. Uses WeakMap if available.",
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@ljharb/eslint-config": "^17.3.0",
|
|
50
|
+
"aud": "^1.1.3",
|
|
51
|
+
"auto-changelog": "^2.2.1",
|
|
52
|
+
"eslint": "^7.16.0",
|
|
53
|
+
"nyc": "^10.3.2",
|
|
54
|
+
"safe-publish-latest": "^1.1.4",
|
|
55
|
+
"tape": "^5.0.1"
|
|
56
|
+
},
|
|
57
|
+
"exports": {
|
|
58
|
+
"./package.json": "./package.json",
|
|
59
|
+
".": [
|
|
60
|
+
{
|
|
61
|
+
"default": "./index.js"
|
|
62
|
+
},
|
|
63
|
+
"./index.js"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"funding": {
|
|
67
|
+
"url": "https://github.com/sponsors/ljharb"
|
|
68
|
+
},
|
|
69
|
+
"homepage": "https://github.com/ljharb/side-channel#readme",
|
|
70
|
+
"keywords": [
|
|
71
|
+
"weakmap",
|
|
72
|
+
"map",
|
|
73
|
+
"side",
|
|
74
|
+
"channel",
|
|
75
|
+
"metadata"
|
|
76
|
+
],
|
|
77
|
+
"license": "MIT",
|
|
78
|
+
"main": "index.js",
|
|
79
|
+
"name": "side-channel",
|
|
80
|
+
"repository": {
|
|
81
|
+
"type": "git",
|
|
82
|
+
"url": "git+https://github.com/ljharb/side-channel.git"
|
|
83
|
+
},
|
|
84
|
+
"scripts": {
|
|
85
|
+
"lint": "eslint .",
|
|
86
|
+
"posttest": "npx aud --production",
|
|
87
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
|
|
88
|
+
"prepublish": "safe-publish-latest",
|
|
89
|
+
"pretest": "npm run lint",
|
|
90
|
+
"test": "npm run tests-only",
|
|
91
|
+
"tests-only": "nyc tape 'test/**/*.js'",
|
|
92
|
+
"version": "auto-changelog && git add CHANGELOG.md"
|
|
93
|
+
},
|
|
94
|
+
"version": "1.0.4"
|
|
95
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('tape');
|
|
4
|
+
|
|
5
|
+
var getSideChannel = require('../');
|
|
6
|
+
|
|
7
|
+
test('export', function (t) {
|
|
8
|
+
t.equal(typeof getSideChannel, 'function', 'is a function');
|
|
9
|
+
t.equal(getSideChannel.length, 0, 'takes no arguments');
|
|
10
|
+
|
|
11
|
+
var channel = getSideChannel();
|
|
12
|
+
t.ok(channel, 'is truthy');
|
|
13
|
+
t.equal(typeof channel, 'object', 'is an object');
|
|
14
|
+
|
|
15
|
+
t.end();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test('assert', function (t) {
|
|
19
|
+
var channel = getSideChannel();
|
|
20
|
+
t['throws'](
|
|
21
|
+
function () { channel.assert({}); },
|
|
22
|
+
TypeError,
|
|
23
|
+
'nonexistent value throws'
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
var o = {};
|
|
27
|
+
channel.set(o, 'data');
|
|
28
|
+
t.doesNotThrow(function () { channel.assert(o); }, 'existent value noops');
|
|
29
|
+
|
|
30
|
+
t.end();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
test('has', function (t) {
|
|
34
|
+
var channel = getSideChannel();
|
|
35
|
+
var o = [];
|
|
36
|
+
|
|
37
|
+
t.equal(channel.has(o), false, 'nonexistent value yields false');
|
|
38
|
+
|
|
39
|
+
channel.set(o, 'foo');
|
|
40
|
+
t.equal(channel.has(o), true, 'existent value yields true');
|
|
41
|
+
|
|
42
|
+
t.end();
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test('get', function (t) {
|
|
46
|
+
var channel = getSideChannel();
|
|
47
|
+
var o = {};
|
|
48
|
+
t.equal(channel.get(o), undefined, 'nonexistent value yields undefined');
|
|
49
|
+
|
|
50
|
+
var data = {};
|
|
51
|
+
channel.set(o, data);
|
|
52
|
+
t.equal(channel.get(o), data, '"get" yields data set by "set"');
|
|
53
|
+
|
|
54
|
+
t.end();
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test('set', function (t) {
|
|
58
|
+
var channel = getSideChannel();
|
|
59
|
+
var o = function () {};
|
|
60
|
+
t.equal(channel.get(o), undefined, 'value not set');
|
|
61
|
+
|
|
62
|
+
channel.set(o, 42);
|
|
63
|
+
t.equal(channel.get(o), 42, 'value was set');
|
|
64
|
+
|
|
65
|
+
channel.set(o, Infinity);
|
|
66
|
+
t.equal(channel.get(o), Infinity, 'value was set again');
|
|
67
|
+
|
|
68
|
+
var o2 = {};
|
|
69
|
+
channel.set(o2, 17);
|
|
70
|
+
t.equal(channel.get(o), Infinity, 'o is not modified');
|
|
71
|
+
t.equal(channel.get(o2), 17, 'o2 is set');
|
|
72
|
+
|
|
73
|
+
channel.set(o, 14);
|
|
74
|
+
t.equal(channel.get(o), 14, 'o is modified');
|
|
75
|
+
t.equal(channel.get(o2), 17, 'o2 is not modified');
|
|
76
|
+
|
|
77
|
+
t.end();
|
|
78
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-dhis2",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"description": "DHIS2 Language Pack for OpenFn",
|
|
5
5
|
"homepage": "https://docs.openfn.org",
|
|
6
6
|
"repository": {
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"bundledDependencies": [
|
|
57
57
|
"@openfn/language-common",
|
|
58
58
|
"axios",
|
|
59
|
-
"lodash"
|
|
59
|
+
"lodash",
|
|
60
|
+
"qs"
|
|
60
61
|
]
|
|
61
62
|
}
|